decord/source/modules/activate_device/useActivateDeviceStepTracking.tsx

44 lines
1.4 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 13394
// Function ID: 13395
2026-07-20 16:05:17 +00:00
// Name: useActivateDeviceStepTracking
2026-08-24 06:08:38 +00:00
// Dependencies: [19, 676, 6738, 13395, 698, 2]
2026-07-20 16:05:17 +00:00
// Exports: useActivateDeviceStepTracking
2026-08-24 06:08:38 +00:00
// Module 13394 (useActivateDeviceStepTracking)
import usePreviousDefault from "usePrevious" /* 6738 */;
import closure_3 from "noop" /* 19 */;
import { AnalyticEvents } from "ME" /* 676 */;
2026-07-20 16:05:17 +00:00
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-08-24 06:08:38 +00:00
let result = require("set").fileFinishedImporting("modules/activate_device/useActivateDeviceStepTracking.tsx");
2026-07-20 16:05:17 +00:00
export const useActivateDeviceStepTracking = function useActivateDeviceStepTracking(first) {
2026-08-24 06:08:38 +00:00
closure_0 = first;
const tmp = usePreviousDefault(first);
2026-07-23 10:11:24 +00:00
importDefault = tmp;
2026-07-20 16:05:17 +00:00
const items = [tmp, first];
2026-07-23 10:11:24 +00:00
const effect = React.useEffect(() => {
2026-08-24 06:08:38 +00:00
if (callback !== callback2) {
2026-07-29 08:29:29 +00:00
let tmp3 = "user-code-input" !== tmp.type;
if (tmp3) {
tmp3 = "handoff" !== tmp.type;
2026-07-20 16:05:17 +00:00
}
let result = null;
2026-07-29 08:29:29 +00:00
if (tmp3) {
2026-08-24 06:08:38 +00:00
let obj = callback(closure_1_2[3]);
2026-07-29 08:29:29 +00:00
result = obj.clientIdToActivateDevicePlatform(tmp.userCodeData.clientId);
2026-07-20 16:05:17 +00:00
}
let type;
2026-07-29 08:29:29 +00:00
if (tmp2 != null) {
type = tmp2.type;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { previous_step: null, current_step: null, platform_type: null };
obj[0] = type;
obj[1] = tmp.type;
obj[2] = result;
2026-08-24 06:08:38 +00:00
callback2(closure_1_2[4]).track(closure_1_4.DEVICE_LINK_STEP, obj);
const obj2 = callback2(closure_1_2[4]);
2026-07-20 16:05:17 +00:00
}
}, items);
};