decord/beta/source/modules/activate_device/useActivateDeviceStepTracking.tsx

90 lines
2.9 KiB
TypeScript
Raw Permalink Normal View History

2026-10-12 16:32:48 +00:00
// Module ID: 14103
// Function ID: 14104
// Name: useActivateDeviceStepTracking
2026-10-12 16:32:48 +00:00
// Dependencies: [19, 1085, 558, 576, 5922, 14104, 1265, 2]
2026-10-12 16:32:48 +00:00
// Module 14103 (useActivateDeviceStepTracking)
2026-10-07 22:43:51 +00:00
import Constants from "Constants" /* 1085 */;
2026-10-12 16:32:48 +00:00
import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1265 */;
import usePreviousDefault from "usePrevious" /* 5922 */;
import ActivateDeviceUtils from "ActivateDeviceUtils" /* 14104 */;
2026-10-01 14:13:23 +00:00
import react from "react" /* 19 */;
2026-10-02 13:37:24 +00:00
import ReactCompilerGating from "ReactCompilerGating" /* 558 */;
2026-10-01 14:13:23 +00:00
import size from "module_2" /* 2 */;
2026-10-02 13:37:24 +00:00
const require = globalThis.__r;
let _require, importDefault;
2026-10-01 14:13:23 +00:00
const AnalyticEvents = Constants.AnalyticEvents;
2026-10-12 16:32:48 +00:00
let tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? (function useActivateDeviceStepTracking(arg0) {
2026-10-02 13:37:24 +00:00
let closure_1;
_require = arg0;
let obj = require("react");
const cResult = obj.c(4);
const tmp2 = usePreviousDefault(arg0);
importDefault = tmp2;
if (cResult[0] === tmp2) {
let tmp3;
let tmp4;
if (cResult[1] === arg0) {
tmp3 = cResult[2];
tmp4 = cResult[3];
}
const effect = react.useEffect(tmp3, tmp4);
}
const fn = function p() {
if (type !== closure_1) {
let result = null;
const tmp3 = "user-code-input" !== tmp.type && "handoff" !== tmp.type;
if (tmp3) {
const obj = ActivateDeviceUtils;
result = obj.clientIdToActivateDevicePlatform(tmp.userCodeData.clientId);
}
type = undefined;
const track = AnalyticsUtilsDefault.track;
const DEVICE_LINK_STEP = AnalyticEvents.DEVICE_LINK_STEP;
AnalyticsUtilsDefault;
if (closure_1 != null) {
type = tmp2.type;
}
const obj2 = { previous_step: type, current_step: type.type, platform_type: result };
track(DEVICE_LINK_STEP, obj2);
}
};
const items = [tmp2, arg0];
cResult[0] = tmp2;
cResult[1] = arg0;
cResult[2] = fn;
cResult[3] = items;
tmp4 = items;
tmp3 = fn;
2026-10-12 16:32:48 +00:00
}) : (function useActivateDeviceStepTracking(arg0) {
2026-10-01 14:13:23 +00:00
let closure_1;
let type = arg0;
const tmp = usePreviousDefault(arg0);
importDefault = tmp;
const items = [tmp, arg0];
2026-10-01 14:13:23 +00:00
const effect = react.useEffect(() => {
if (type !== closure_1) {
let result = null;
2026-10-01 14:13:23 +00:00
const tmp3 = "user-code-input" !== tmp.type && "handoff" !== tmp.type;
if (tmp3) {
2026-10-01 14:13:23 +00:00
const obj = ActivateDeviceUtils;
result = obj.clientIdToActivateDevicePlatform(tmp.userCodeData.clientId);
}
2026-10-01 14:13:23 +00:00
type = undefined;
const track = AnalyticsUtilsDefault.track;
const DEVICE_LINK_STEP = AnalyticEvents.DEVICE_LINK_STEP;
AnalyticsUtilsDefault;
if (closure_1 != null) {
type = tmp2.type;
}
2026-10-01 14:13:23 +00:00
const obj2 = { previous_step: type, current_step: type.type, platform_type: result };
track(DEVICE_LINK_STEP, obj2);
}
}, items);
2026-10-02 13:37:24 +00:00
});
let result = size.fileFinishedImporting("modules/activate_device/useActivateDeviceStepTracking.tsx");
export const useActivateDeviceStepTracking = tmp2;