decord/source/modules/icymi/useICYMIEmptyLoadingAnalytics.tsx
github-actions 777dc50a28 chore: update source for alpha 346.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4790.js (118.4 MB)
2026-09-10 19:12:31 +00:00

50 lines
1.7 KiB
TypeScript

// Module ID: 16571
// Function ID: 16572
// Name: useICYMIEmptyLoadingAnalytics
// Dependencies: [19, 8424, 2]
// Exports: useICYMIEmptyLoadingAnalytics
// Module 16571 (useICYMIEmptyLoadingAnalytics)
import ICYMIAnalytics3 from "ICYMIAnalytics" /* 8424 */;
import noop from "module_19" /* 19 */;
require = fn;
const size = fn(2);
let result = size.fileFinishedImporting("modules/icymi/useICYMIEmptyLoadingAnalytics.tsx");
export const useICYMIEmptyLoadingAnalytics = function useICYMIEmptyLoadingAnalytics(loading, isFocused) {
closure_0 = loading;
closure_1 = isFocused;
noop = noop.useRef(null);
const items = [loading, isFocused];
const effect = noop.useEffect(() => {
if (closure_1) {
if (closure_0) {
const _Date = Date;
tmp2.current = Date.now();
const ICYMIAnalytics = ICYMIAnalytics3.ICYMIAnalytics;
const result = ICYMIAnalytics.trackFeedEmptyLoadingSeen();
} else if (null != tmp2.current) {
const _Date2 = Date;
const diff = Date.now() - tmp2.current;
const ICYMIAnalytics2 = ICYMIAnalytics3.ICYMIAnalytics;
const obj = { dwellTimeMs: diff };
const result1 = ICYMIAnalytics2.trackFeedEmptyLoadingComplete(obj);
tmp2.current = null;
}
}
}, items);
const items1 = [isFocused];
const effect1 = noop.useEffect(() => {
if (!closure_1) {
if (null != ref.current) {
const _Date = Date;
const diff = Date.now() - tmp.current;
const ICYMIAnalytics = ICYMIAnalytics3.ICYMIAnalytics;
const obj = { dwellTimeMs: diff };
const result = ICYMIAnalytics.trackFeedEmptyLoadingAbandoned(obj);
tmp.current = null;
}
}
}, items1);
};