decord/source/333_set.js

51 lines
1.6 KiB
JavaScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 333
// Function ID: 334
2026-07-20 16:05:17 +00:00
// Name: set
2026-07-29 08:29:29 +00:00
// Dependencies: [19, 334]
2026-07-20 16:05:17 +00:00
// Exports: unstable_getImageComponentDecorator, unstable_registerImageAttachedCallback, unstable_setImageComponentDecorator, unstable_unregisterImageAttachedCallback, useWrapRefWithImageAttachedCallbacks
2026-07-29 08:29:29 +00:00
// Module 333 (set)
2026-08-24 06:08:38 +00:00
import noopAll from "noop" /* 19 */;
import useMergeRefsDefault from "useMergeRefs" /* 334 */;
import { useRef } from "noop" /* 19 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
noopAll;
2026-07-20 16:05:17 +00:00
const set = new Set();
export function unstable_setImageComponentDecorator(arg0) {
2026-08-24 06:08:38 +00:00
closure_2 = arg0;
2026-07-20 16:05:17 +00:00
}
export function unstable_getImageComponentDecorator() {
return closure_2;
}
export const unstable_registerImageAttachedCallback = function unstable_registerImageAttachedCallback(arg0) {
set.add(arg0);
};
export const unstable_unregisterImageAttachedCallback = function unstable_unregisterImageAttachedCallback(arg0) {
set.delete(arg0);
};
export const useWrapRefWithImageAttachedCallbacks = function useWrapRefWithImageAttachedCallbacks(ref) {
2026-08-24 06:08:38 +00:00
importDefault = useRef([]);
2026-07-23 10:11:24 +00:00
let tmp = useRef(null);
2026-07-20 16:05:17 +00:00
if (null == tmp.current) {
tmp.current = (arg0) => {
if (null == arg0) {
if (ref.current.length > 0) {
2026-07-29 08:29:29 +00:00
let current = tmp3.current;
2026-07-20 16:05:17 +00:00
const item = current.forEach((arg0) => arg0());
2026-07-29 08:29:29 +00:00
tmp3.current = [];
2026-07-20 16:05:17 +00:00
}
} else {
2026-08-24 06:08:38 +00:00
const item1 = closure_1_4.forEach((arg0) => {
2026-07-23 10:11:24 +00:00
const tmp = arg0(ref);
2026-07-20 16:05:17 +00:00
if (null != tmp) {
2026-07-23 10:11:24 +00:00
const current = ref.current;
2026-07-20 16:05:17 +00:00
current.push(tmp);
}
});
}
};
}
2026-08-24 06:08:38 +00:00
return useMergeRefsDefault(ref, tmp.current);
2026-07-20 16:05:17 +00:00
};