decord/source/modules/app_analytics/clickstream/ClickstreamEvents.tsx
github-actions e510164e6b chore: update source for alpha 346.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
2026-09-10 05:38:07 +00:00

72 lines
2.9 KiB
TypeScript

// Module ID: 7481
// Function ID: 7482
// Name: ClickstreamEvents
// Dependencies: [1074, 2]
// Exports: getClickstreamDrainEvent
// Module 7481 (ClickstreamEvents)
import Constants from "Constants" /* 1074 */;
import size from "module_2" /* 2 */;
const AnalyticEvents = Constants.AnalyticEvents;
const result = size.fileFinishedImporting("modules/app_analytics/clickstream/ClickstreamEvents.tsx");
export const getClickstreamDrainEvent = function getClickstreamDrainEvent(arg0, arr) {
const date = new Date();
if (AnalyticEvents.GUILD_VIEWED_CLICKSTREAM === arg0) {
const obj2 = {
time_minus: arr.map((timestamp) => {
timestamp = timestamp.timestamp;
const time = date.getTime();
return time - timestamp.getTime();
}),
rtc_states: arr.map((rtc_state) => rtc_state.rtc_state),
guild_ids: arr.map((guild_id) => guild_id.guild_id)
};
return obj2;
} else if (tmp2.FRIENDS_LIST_VIEWED_CLICKSTREAM === arg0) {
const obj3 = {
time_minus: arr.map((timestamp) => {
timestamp = timestamp.timestamp;
const time = date.getTime();
return time - timestamp.getTime();
}),
rtc_states: arr.map((rtc_state) => rtc_state.rtc_state),
tab_opened: arr.map((tab_opened) => tab_opened.tab_opened),
num_friends: arr.map((num_friends) => num_friends.num_friends),
now_playing_visible: arr.map((now_playing_visible) => now_playing_visible.now_playing_visible),
now_playing_num_cards: arr.map((now_playing_num_cards) => now_playing_num_cards.now_playing_num_cards)
};
return obj3;
} else if (tmp2.CHANNEL_OPENED_CLICKSTREAM === arg0) {
const obj4 = {
time_minus: arr.map((timestamp) => {
timestamp = timestamp.timestamp;
const time = date.getTime();
return time - timestamp.getTime();
}),
rtc_states: arr.map((rtc_state) => rtc_state.rtc_state),
channel_ids: arr.map((channel_id) => channel_id.channel_id),
channel_types: arr.map((channel_type) => channel_type.channel_type)
};
return obj4;
} else if (tmp2.CHANNEL_LATEST_MESSAGES_LOADED_CLICKSTREAM === arg0) {
const obj = {
time_minus: arr.map((timestamp) => {
timestamp = timestamp.timestamp;
const time = date.getTime();
return time - timestamp.getTime();
}),
rtc_states: arr.map((rtc_state) => rtc_state.rtc_state),
load_duration_ms: arr.map((load_duration_ms) => load_duration_ms.load_duration_ms),
were_messages_cached: arr.map((were_messages_cached) => were_messages_cached.were_messages_cached),
is_first_load: arr.map((is_first_load) => is_first_load.is_first_load)
};
return obj;
} else {
const _Error = Error;
const _HermesInternal = HermesInternal;
const error = new Error("getClickstreamDrainEvent: Unknown event: " + arg0);
throw error;
}
};