decord/alpha/source/modules/icymi/useICYMIEmptyLoadingAnalytics.tsx

128 lines
3.8 KiB
TypeScript
Raw Normal View History

2026-10-13 12:43:34 +00:00
// Module ID: 17253
// Function ID: 17254
2026-07-20 16:05:17 +00:00
// Name: useICYMIEmptyLoadingAnalytics
2026-10-13 12:43:34 +00:00
// Dependencies: [19, 558, 576, 14976, 2]
2026-07-20 16:05:17 +00:00
2026-10-13 12:43:34 +00:00
// Module 17253 (useICYMIEmptyLoadingAnalytics)
import ICYMIAnalytics3 from "ICYMIAnalytics" /* 14976 */;
2026-10-03 08:58:59 +00:00
import react_mod from "react" /* 19 */;
import ReactCompilerGating from "ReactCompilerGating" /* 558 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
2026-10-03 08:58:59 +00:00
const require = globalThis.__r;
let _require, dependencyMap;
2026-07-20 16:05:17 +00:00
2026-10-03 08:58:59 +00:00
let react = react_mod;
2026-10-08 09:57:35 +00:00
let tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? (function useICYMIEmptyLoadingAnalytics(arg0, arg1) {
2026-10-03 08:58:59 +00:00
let closure_0;
let closure_1;
let ref;
_require = arg0;
dependencyMap = arg1;
let obj = require("react");
const cResult = obj.c(7);
react = react.useRef(null);
if (cResult[0] === arg1) {
let tmp2;
let tmp3;
let tmp6;
let tmp5;
if (cResult[1] === arg0) {
tmp2 = cResult[2];
tmp3 = cResult[3];
}
const effect = obj2.useEffect(tmp2, tmp3);
if (cResult[4] !== arg1) {
const fn2 = function s() {
const tmp = closure_1;
if (!tmp) {
if (null != ref.current) {
const _Date = Date;
const diff = Date.now() - tmp2.current;
const ICYMIAnalytics = ICYMIAnalytics3.ICYMIAnalytics;
const obj = { dwellTimeMs: diff };
const result = ICYMIAnalytics.trackFeedEmptyLoadingAbandoned(obj);
ref.current = null;
}
}
};
const items = [arg1];
cResult[4] = arg1;
cResult[5] = fn2;
cResult[6] = items;
tmp6 = items;
tmp5 = fn2;
} else {
tmp5 = cResult[5];
tmp6 = cResult[6];
}
const effect1 = obj2.useEffect(tmp5, tmp6);
}
const fn = function c() {
const tmp = closure_1;
if (tmp) {
if (closure_0) {
2026-07-20 16:05:17 +00:00
const _Date = Date;
2026-10-03 08:58:59 +00:00
ref.current = Date.now();
const ICYMIAnalytics = ICYMIAnalytics3.ICYMIAnalytics;
2026-07-20 16:05:17 +00:00
const result = ICYMIAnalytics.trackFeedEmptyLoadingSeen();
2026-10-03 08:58:59 +00:00
} else if (null != ref.current) {
2026-07-20 16:05:17 +00:00
const _Date2 = Date;
2026-10-03 08:58:59 +00:00
const diff = Date.now() - tmp3.current;
const ICYMIAnalytics2 = ICYMIAnalytics3.ICYMIAnalytics;
const obj = { dwellTimeMs: diff };
2026-07-20 16:05:17 +00:00
const result1 = ICYMIAnalytics2.trackFeedEmptyLoadingComplete(obj);
2026-10-03 08:58:59 +00:00
ref.current = null;
}
}
};
const items1 = [arg0, arg1];
cResult[0] = arg1;
cResult[1] = arg0;
cResult[2] = fn;
cResult[3] = items1;
tmp3 = items1;
tmp2 = fn;
2026-10-08 09:57:35 +00:00
}) : (function useICYMIEmptyLoadingAnalytics(arg0, arg1) {
2026-10-03 08:58:59 +00:00
let ref;
let closure_0 = arg0;
let closure_1 = arg1;
react = react.useRef(null);
const items = [arg0, arg1];
const effect = react.useEffect(() => {
const tmp = closure_1;
if (tmp) {
if (closure_0) {
const _Date = Date;
ref.current = Date.now();
const ICYMIAnalytics = ICYMIAnalytics3.ICYMIAnalytics;
const result = ICYMIAnalytics.trackFeedEmptyLoadingSeen();
} else if (null != ref.current) {
const _Date2 = Date;
const diff = Date.now() - tmp3.current;
const ICYMIAnalytics2 = ICYMIAnalytics3.ICYMIAnalytics;
const obj = { dwellTimeMs: diff };
const result1 = ICYMIAnalytics2.trackFeedEmptyLoadingComplete(obj);
ref.current = null;
2026-07-20 16:05:17 +00:00
}
}
}, items);
2026-10-03 08:58:59 +00:00
const items1 = [arg1];
const effect1 = react.useEffect(() => {
const tmp = closure_1;
if (!tmp) {
2026-07-20 16:05:17 +00:00
if (null != ref.current) {
const _Date = Date;
2026-10-03 08:58:59 +00:00
const diff = Date.now() - tmp2.current;
const ICYMIAnalytics = ICYMIAnalytics3.ICYMIAnalytics;
const obj = { dwellTimeMs: diff };
2026-07-20 16:05:17 +00:00
const result = ICYMIAnalytics.trackFeedEmptyLoadingAbandoned(obj);
2026-10-03 08:58:59 +00:00
ref.current = null;
2026-07-20 16:05:17 +00:00
}
}
}, items1);
2026-10-03 08:58:59 +00:00
});
let result = size.fileFinishedImporting("modules/icymi/useICYMIEmptyLoadingAnalytics.tsx");
export const useICYMIEmptyLoadingAnalytics = tmp2;