decord/source/modules/app_analytics/clickstream/Clickstream.tsx

83 lines
2.5 KiB
TypeScript
Raw Normal View History

2026-08-06 08:05:19 +00:00
// Module ID: 6847
// Function ID: 6848
2026-07-29 08:29:29 +00:00
// Name: isClickstreamEnabled
2026-08-06 08:05:19 +00:00
// Dependencies: [32, 1218, 4356, 11, 6848, 698, 6849, 2]
2026-07-20 16:05:17 +00:00
// Exports: trackClickstream
2026-08-06 08:05:19 +00:00
// Module 6847 (isClickstreamEnabled)
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray";
2026-07-29 08:29:29 +00:00
import fetchFingerprint from "fetchFingerprint";
import createRTCConnection from "createRTCConnection";
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-20 16:05:17 +00:00
function isClickstreamEnabled(flag) {
if (flag === undefined) {
flag = true;
}
if (flag) {
2026-07-29 08:29:29 +00:00
const extractTimestampResult = importDefault(11).extractTimestamp(store.getId());
2026-07-23 10:11:24 +00:00
if (extractTimestampResult !== c7) {
2026-07-20 16:05:17 +00:00
drainClickstream(false);
2026-07-23 10:11:24 +00:00
c7 = extractTimestampResult;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const obj = importDefault(11);
2026-08-06 08:05:19 +00:00
let closure_8 = require(6848) /* clickstreamExperimentEnabled */.clickstreamExperimentEnabled();
const obj2 = require(6848) /* clickstreamExperimentEnabled */;
2026-07-20 16:05:17 +00:00
}
return closure_8;
}
function drainClickstream(flag) {
if (flag === undefined) {
flag = true;
}
if (isClickstreamEnabled(flag)) {
2026-07-29 08:29:29 +00:00
const tmp3 = obj[Symbol.iterator]();
while (tmp3 !== undefined) {
let tmp7 = callback;
let tmp8 = callback(tmp5, 2);
let first = tmp8[0];
let tmp10 = importDefault;
let tmp11 = dependencyMap;
let obj2 = importDefault(698);
let tmp12 = require;
2026-08-06 08:05:19 +00:00
let obj3 = require(6849) /* getClickstreamDrainEvent */;
2026-07-29 08:29:29 +00:00
let trackResult = obj2.track(first, obj3.getClickstreamDrainEvent(first, tmp8[1]));
continue;
2026-07-20 16:05:17 +00:00
}
map.clear();
} else {
2026-07-29 08:29:29 +00:00
obj.clear();
2026-07-20 16:05:17 +00:00
}
}
const map = new Map();
2026-07-23 10:11:24 +00:00
let c7 = -1;
let c8 = false;
2026-07-29 08:29:29 +00:00
let result = require("createRTCConnection").fileFinishedImporting("modules/app_analytics/clickstream/Clickstream.tsx");
2026-07-20 16:05:17 +00:00
export const trackClickstream = function trackClickstream(GUILD_VIEWED_CLICKSTREAM, arg1) {
2026-07-29 08:29:29 +00:00
let obj = importDefault(11);
const extractTimestampResult = obj.extractTimestamp(store.getId());
if (extractTimestampResult !== c7) {
drainClickstream(false);
c7 = extractTimestampResult;
}
2026-08-06 08:05:19 +00:00
const result = require(6848) /* clickstreamExperimentEnabled */.clickstreamExperimentEnabled();
2026-07-29 08:29:29 +00:00
let c8 = result;
if (result) {
2026-07-20 16:05:17 +00:00
if (!map.has(GUILD_VIEWED_CLICKSTREAM)) {
2026-07-29 08:29:29 +00:00
const result1 = obj3.set(GUILD_VIEWED_CLICKSTREAM, []);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const value = obj3.get(GUILD_VIEWED_CLICKSTREAM);
if (value != null) {
obj = { timestamp: null, rtc_state: null };
2026-07-20 16:05:17 +00:00
const _Date = Date;
const date = new Date();
2026-07-29 08:29:29 +00:00
obj[0] = date;
obj[1] = state.getState();
2026-07-20 16:05:17 +00:00
const merged = Object.assign(arg1);
value.push(obj);
}
}
};
export { drainClickstream };