decord/source/__polyfill/14xxx/module_14498.js
github-actions da5b5e5efe chore: update source for alpha 346.6
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-12 13:45:10 +00:00

53 lines
1.1 KiB
JavaScript

// Module ID: 14498
// Function ID: 14499
// Dependencies: []
// Module 14498
export default (arg0) => {
let map = arg0;
if (!arg0) {
const _Map = Map;
map = new Map();
}
return {
all: map,
on(arg0, arg1) {
value = map.get(arg0);
if (value) {
value.push(arg1);
} else {
const items = [arg1];
const result = map.set(arg0, items);
}
},
off(arg0, arg1) {
value = map.get(arg0);
if (value) {
if (arg1) {
value.splice(value.indexOf(arg1) >>> 0, 1);
} else {
const result = map.set(arg0, []);
}
}
},
emit(arg0, arg1) {
closure_0 = arg0;
closure_1 = arg1;
value = map.get(arg0);
if (value) {
const substr = value.slice();
const mapped = substr.map((fn) => {
fn(closure_1);
});
}
value2 = map.get("*");
if (value2) {
const substr1 = value2.slice();
const mapped1 = substr1.map((fn) => {
fn(closure_0, closure_1);
});
}
}
};
};