decord/source/316_ChildListCollection.js

117 lines
3.2 KiB
JavaScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 316
// Function ID: 317
2026-07-20 16:05:17 +00:00
// Name: ChildListCollection
2026-07-29 08:29:29 +00:00
// Dependencies: [41, 42, 38]
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
// Module 316 (ChildListCollection)
2026-07-23 10:11:24 +00:00
import _classCallCheck from "_classCallCheck";
2026-07-29 08:29:29 +00:00
import _createClass from "_createClass";
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
const ChildListCollection = importDefault;
class ChildListCollection {
constructor() {
tmp = outer1_2(this, ChildListCollection);
map = new Map();
this._cellKeyToChildren = map;
map1 = new Map();
this._childrenToCellKey = map1;
return;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
}
let items = [
{
2026-07-20 16:05:17 +00:00
key: "add",
value: function add(arg0, arg1) {
const self = this;
const _childrenToCellKey = this._childrenToCellKey;
2026-07-29 08:29:29 +00:00
ChildListCollection(38)(!_childrenToCellKey.has(arg0), "Trying to add already present child list");
2026-07-20 16:05:17 +00:00
const _cellKeyToChildren = this._cellKeyToChildren;
let set = _cellKeyToChildren.get(arg1);
2026-07-29 08:29:29 +00:00
if (set == null) {
2026-07-20 16:05:17 +00:00
const _Set = Set;
set = new Set();
}
set.add(arg0);
const _cellKeyToChildren2 = self._cellKeyToChildren;
const result = _cellKeyToChildren2.set(arg1, set);
const _childrenToCellKey2 = self._childrenToCellKey;
const result1 = _childrenToCellKey2.set(arg0, arg1);
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "remove",
value: function remove(arg0) {
const _childrenToCellKey = this._childrenToCellKey;
let value = _childrenToCellKey.get(arg0);
2026-07-29 08:29:29 +00:00
ChildListCollection(38)(null != value, "Trying to remove non-present child list");
2026-07-20 16:05:17 +00:00
const _childrenToCellKey2 = this._childrenToCellKey;
_childrenToCellKey2.delete(arg0);
const _cellKeyToChildren = this._cellKeyToChildren;
value = _cellKeyToChildren.get(value);
2026-07-29 08:29:29 +00:00
ChildListCollection(38)(value, "_cellKeyToChildren should contain cellKey");
2026-07-20 16:05:17 +00:00
value.delete(arg0);
if (0 === value.size) {
const _cellKeyToChildren2 = this._cellKeyToChildren;
_cellKeyToChildren2.delete(value);
}
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "forEach",
value: function forEach(arg0) {
const _cellKeyToChildren = this._cellKeyToChildren;
const values = _cellKeyToChildren.values();
2026-07-29 08:29:29 +00:00
for (const item10009 of values) {
let tmp2 = item10009;
let tmp3 = item10009;
for (const item10014 of item10009) {
let tmp4 = arg0(item10014);
2026-07-23 10:11:24 +00:00
continue;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
continue;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "forEachInCell",
2026-07-23 10:11:24 +00:00
value: function forEachInCell(closure_0, arg1) {
2026-07-20 16:05:17 +00:00
const _cellKeyToChildren = this._cellKeyToChildren;
2026-07-23 10:11:24 +00:00
let items = _cellKeyToChildren.get(closure_0);
2026-07-29 08:29:29 +00:00
if (items == null) {
2026-07-20 16:05:17 +00:00
items = [];
}
2026-07-29 08:29:29 +00:00
for (const item10011 of items) {
let tmp = arg1(item10011);
2026-07-23 10:11:24 +00:00
continue;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "anyInCell",
value: function anyInCell(value, arg1) {
const _cellKeyToChildren = this._cellKeyToChildren;
let items = _cellKeyToChildren.get(value);
2026-07-29 08:29:29 +00:00
if (items == null) {
2026-07-20 16:05:17 +00:00
items = [];
}
2026-07-29 08:29:29 +00:00
for (const item10011 of items) {
if (arg1(item10011)) {
let tmp = obj;
2026-07-20 16:05:17 +00:00
obj.return();
let flag = true;
return true;
}
}
return false;
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "size",
value: function size() {
return this._childrenToCellKey.size;
}
2026-07-29 08:29:29 +00:00
}
];
export default _createClass(ChildListCollection, items);