This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

+392
View File
@@ -0,0 +1,392 @@
// Metro module 8194 (f8195).
import ICYMIStore from "./ICYMIStore";
import { AnalyticEvents, ChannelTypes } from "../../Constants";
import { ContentInventoryEntryType } from "../../_bundle/Module7909";
import { ICYMIItemTypes } from "./ICYMITypes";
import AnalyticsUtils from "../../utils/AnalyticsUtils";
const r19 = {
trackItemInteraction: (a0) => {
AnalyticsUtils.track(AnalyticEvents.FEED_ITEM_INTERACTED, {
load_id: ICYMIStore.getLoadId(),
feed_item_type: a0.type,
feed_item_id: a0.id,
home_session_id: "gravity",
action_type: a0.actionType,
feed_item_index: ICYMIStore.getIndexInHydratedFeed(a0.id),
icymi_session_id: a0.icymiSessionId,
impression_id: a0.impressionId,
ux_variation: a0.uxVariation,
session_interaction_index: a0.sessionInteractionIndex
});
},
trackItemShortImpression: (a0, a1, a2) => {
AnalyticsUtils.track(AnalyticEvents.FEED_ITEM_SEEN_BATCH, {
load_id: ICYMIStore.getLoadId(),
home_session_id: "gravity",
feed_item_ids: a0.map((item) => item.item.id),
feed_item_types: a0.map(({ item }) => {
let r15;
const kind = item.data.kind;
if (kind === "end") {
r15 = "end";
} else if (kind === "loading") {
r15 = "loading";
} else {
let r4 = "message";
if (kind === "message") {
if (item.channelType === ChannelTypes.GUILD_ANNOUNCEMENT) {
r4 = "announcement";
}
r15 = r4;
} else {
r15 = kind === "guildEvent" ? "guild_event" : kind === "contentInventory" ? item.data.content.content_type === ContentInventoryEntryType.CUSTOM_STATUS ? "hotwheels_custom_status" : "hotwheels_gaming_activity" : kind === "recommendedGuilds" ? "recommended_guilds" : kind === "forumThread" ? "forum_thread" : kind !== "icymiHeader" ? "unknown" : "icymi_header";
}
}
return r15;
}),
num_items: a0.length,
all_feed_item_ids: a1.map((item) => item.id),
all_feed_item_types: a1.map((item) => item.type),
num_all_items: a1.length,
all_feed_item_indices: a1.map((item, index) => index),
feed_version: a2,
version: 3
});
},
trackItemLongImpression: (a0, a1, a2) => {
AnalyticsUtils.track(AnalyticEvents.FEED_ITEM_SEEN_LONG, {
load_id: ICYMIStore.getLoadId(),
home_session_id: "gravity",
feed_item_ids: a0.map((item) => item.item.id),
feed_item_types: a0.map(({ item }) => {
let r15;
const kind = item.data.kind;
if (kind === "end") {
r15 = "end";
} else if (kind === "loading") {
r15 = "loading";
} else {
let r4 = "message";
if (kind === "message") {
if (item.channelType === ChannelTypes.GUILD_ANNOUNCEMENT) {
r4 = "announcement";
}
r15 = r4;
} else {
r15 = kind === "guildEvent" ? "guild_event" : kind === "contentInventory" ? item.data.content.content_type === ContentInventoryEntryType.CUSTOM_STATUS ? "hotwheels_custom_status" : "hotwheels_gaming_activity" : kind === "recommendedGuilds" ? "recommended_guilds" : kind === "forumThread" ? "forum_thread" : kind !== "icymiHeader" ? "unknown" : "icymi_header";
}
}
return r15;
}),
num_items: a0.length,
all_feed_item_ids: a1.map((item) => item.id),
all_feed_item_types: a1.map((item) => item.type),
num_all_items: a1.length,
all_feed_item_indices: a1.map((item, index) => index),
feed_version: a2,
version: 3
});
},
trackFeedLoaded: (a0) => {
const unread_feed_item_ids = [];
let c16343_0 = unread_feed_item_ids;
const read_feed_item_ids = [];
let c16343_1 = read_feed_item_ids;
const unread_feed_item_types = [];
let c16343_2 = unread_feed_item_types;
const read_feed_item_types = [];
let c16343_3 = read_feed_item_types;
a0.unreadFeedItems.forEach((unreadFeedItem) => {
c16343_0.push(unreadFeedItem.id);
const type = unreadFeedItem.type;
c16343_2.push(ICYMIItemTypes.MESSAGE === type ? unreadFeedItem.data.channel_type === ChannelTypes.GUILD_ANNOUNCEMENT ? "announcement" : "message" : ICYMIItemTypes.ACTIVITY !== type ? ICYMIItemTypes.CUSTOM_STATUS !== type ? ICYMIItemTypes.GUILD_EVENT !== type ? ICYMIItemTypes.RECOMMENDED_GUILDS === type ? "recommended_guilds" : void 0 : "guild_event" : "hotwheels_custom_status" : "hotwheels_gaming_activity");
});
a0.readFeedItems.forEach((readFeedItem) => {
c16343_1.push(readFeedItem.id);
const type = readFeedItem.type;
c16343_3.push(ICYMIItemTypes.MESSAGE === type ? readFeedItem.data.channel_type === ChannelTypes.GUILD_ANNOUNCEMENT ? "announcement" : "message" : ICYMIItemTypes.ACTIVITY !== type ? ICYMIItemTypes.CUSTOM_STATUS !== type ? ICYMIItemTypes.GUILD_EVENT !== type ? ICYMIItemTypes.RECOMMENDED_GUILDS === type ? "recommended_guilds" : void 0 : "guild_event" : "hotwheels_custom_status" : "hotwheels_gaming_activity");
});
AnalyticsUtils.track(AnalyticEvents.FEED_LOADED, {
...a0.newTrackingProps,
home_session_id: a0.homeSessionId,
tab_badged: a0.hasNewContent,
unread_feed_item_ids,
read_feed_item_ids,
unread_feed_item_types,
read_feed_item_types
});
},
trackFeedShown: (a0) => {
AnalyticsUtils.track(AnalyticEvents.FEED_SHOWN, {
load_id: ICYMIStore.getLoadId(),
home_session_id: a0.homeSessionId,
variant: a0.variant
});
},
trackFeedFirstScrollStarted: () => {
AnalyticsUtils.track(AnalyticEvents.HOME_FIRST_SCROLL_STARTED, {
load_id: ICYMIStore.getLoadId(),
home_session_id: "gravity"
});
},
trackFeedFeedbackPromptViewed: () => {
AnalyticsUtils.track(AnalyticEvents.HOME_FEEDBACK_PROMPT_VIEWED);
},
trackFeedFeedbackSubmitted: (a0) => {
AnalyticsUtils.track(AnalyticEvents.HOME_FEEDBACK_SUBMITTED, {
load_id: ICYMIStore.getLoadId(),
home_session_id: "gravity",
...a0
});
},
trackFeedOnboardingScreenSkipped: (a0) => {
AnalyticsUtils.track(AnalyticEvents.ICYMI_ONBOARDING_SCREEN_SKIPPED, {
location: a0.location
});
},
trackFeedOnboardingGuildToggled: (a0) => {
AnalyticsUtils.track(AnalyticEvents.ICYMI_ONBOARDING_GUILD_TOGGLED, {
guild_id: a0.guildId,
toggled: a0.toggled
});
},
trackFeedOnboardingCategoryToggled: (a0) => {
AnalyticsUtils.track(AnalyticEvents.ICYMI_ONBOARDING_CATEGORY_TOGGLED, {
category_id: a0.categoryId,
toggled: a0.toggled
});
},
trackFeedEmptyLoadingSeen: () => {
AnalyticsUtils.track(AnalyticEvents.ICYMI_FEED_EMPTY_LOADING_SEEN, {
load_id: ICYMIStore.getLoadId(),
version: ICYMIStore.getVersion()
});
},
trackFeedEmptyLoadingComplete: (a0) => {
AnalyticsUtils.track(AnalyticEvents.ICYMI_FEED_EMPTY_LOADING_COMPLETE, {
load_id: ICYMIStore.getLoadId(),
dwell_time_ms: a0.dwellTimeMs,
version: ICYMIStore.getVersion()
});
},
trackFeedEmptyLoadingAbandoned: (a0) => {
AnalyticsUtils.track(AnalyticEvents.ICYMI_FEED_EMPTY_LOADING_ABANDONED, {
load_id: ICYMIStore.getLoadId(),
dwell_time_ms: a0.dwellTimeMs,
version: ICYMIStore.getVersion()
});
},
trackFeedSessionStarted: (a0) => {
AnalyticsUtils.track(AnalyticEvents.FEED_SESSION_STARTED, {
load_id: ICYMIStore.getLoadId(),
version: ICYMIStore.getVersion(),
session_start_time_ms: a0.sessionStartTimeMs,
icymi_session_id: a0.icymiSessionId,
previous_icymi_session_count: a0.previousIcymiSessionCount,
ux_variation: a0.uxVariation
});
},
trackFeedSessionCompleted: (a0) => {
AnalyticsUtils.track(AnalyticEvents.FEED_SESSION_COMPLETED, {
load_id: ICYMIStore.getLoadId(),
version: ICYMIStore.getVersion(),
session_duration_ms: a0.sessionDurationMs,
session_start_time_ms: a0.sessionStartTimeMs,
session_end_time_ms: a0.sessionEndTimeMs,
impression_count: a0.impressionCount,
unique_impression_count: a0.uniqueImpressionCount,
icymi_session_id: a0.icymiSessionId,
feed_reload_count: a0.feedReloadCount,
feed_visible_items_changed_count: a0.feedDwelledItemsChangedCount,
feed_fetch_count: a0.feedFetchCount,
impression_item_types: a0.impressionItemTypes,
latest_dwell_start_time_ms: a0.latestDwellStartTimeMs,
previous_icymi_session_count: a0.previousIcyMiSessionCount,
ux_variation: a0.uxVariation,
interaction_count: a0.interactionCount,
dwelled_count: a0.dwelledCount,
unique_dwelled_count: a0.uniqueDwelledCount
});
},
trackFeedItemDwell1s: (a0) => {
const FEED_ITEM_1S_DWELLED = AnalyticEvents.FEED_ITEM_1S_DWELLED;
const r14 = {
load_id: ICYMIStore.getLoadId(),
version: ICYMIStore.getVersion(),
impression_id: a0.impressionId,
item_id: a0.itemId,
item_type: a0.itemType,
dwell_start_time_ms: a0.dwellStartTimeMs,
icymi_session_id: a0.icymiSessionId,
trigger_type: a0.triggerType,
item_occurence_count_in_session: a0.itemOccurenceCountInSession,
item_feed_index: a0.itemFeedIndex,
is_initially_visible: a0.isInitiallyVisible,
item_score: a0.itemScore,
item_channel_type: null,
item_card_height: null,
is_dwelling: null,
interaction_action_types: null,
interaction_count: null,
ux_variation: null,
session_impression_index: null
};
let itemChannelType = a0.itemChannelType;
if (itemChannelType == null) {
itemChannelType = null;
}
r14.item_channel_type = itemChannelType;
r14.item_card_height = a0.itemCardHeight;
r14.is_dwelling = a0.isDwelling;
r14.interaction_action_types = a0.interactionActionTypes;
r14.interaction_count = a0.interactionCount;
r14.ux_variation = a0.uxVariation;
r14.session_impression_index = a0.sessionImpressionIndex;
AnalyticsUtils.track(FEED_ITEM_1S_DWELLED, r14);
},
trackFeedItemDwelled: (a0) => {
const FEED_ITEM_DWELLED = AnalyticEvents.FEED_ITEM_DWELLED;
const r14 = {
load_id: ICYMIStore.getLoadId(),
version: ICYMIStore.getVersion(),
impression_id: a0.impressionId,
dwell_time_ms: a0.dwellTimeMs,
item_id: a0.itemId,
item_type: a0.itemType,
dwell_start_time_ms: a0.dwellStartTimeMs,
dwell_end_time_ms: a0.dwellEndTimeMs,
icymi_session_id: a0.icymiSessionId,
trigger_type: a0.triggerType,
item_occurence_count_in_session: a0.itemOccurenceCountInSession,
item_feed_index: a0.itemFeedIndex,
is_initially_visible: a0.isInitiallyVisible,
item_score: a0.itemScore,
item_channel_type: null,
item_card_height: null,
ux_variation: null,
interaction_action_types: null,
interaction_count: null,
session_impression_index: null
};
let itemChannelType = a0.itemChannelType;
if (itemChannelType == null) {
itemChannelType = null;
}
r14.item_channel_type = itemChannelType;
r14.item_card_height = a0.itemCardHeight;
r14.ux_variation = a0.uxVariation;
r14.interaction_action_types = a0.interactionActionTypes;
r14.interaction_count = a0.interactionCount;
r14.session_impression_index = a0.sessionImpressionIndex;
AnalyticsUtils.track(FEED_ITEM_DWELLED, r14);
},
trackFeedItemActioned: (a0) => {
const FEED_ITEM_ACTIONED = AnalyticEvents.FEED_ITEM_ACTIONED;
const r14 = {
load_id: ICYMIStore.getLoadId(),
icymi_session_id: a0.icymiSessionId,
ux_variation: a0.uxVariation,
version: ICYMIStore.getVersion(),
session_action_index: a0.sessionActionIndex,
item_id: a0.itemId,
item_type: a0.itemType,
impression_id: null,
action_gesture_type: null,
action_target_element: null,
action_intent_type: null,
action_destination_type: null
};
let impressionId = a0.impressionId;
if (impressionId == null) {
impressionId = null;
}
r14.impression_id = impressionId;
r14.action_gesture_type = a0.actionParameters.actionGestureType;
r14.action_target_element = a0.actionParameters.actionTargetElement;
r14.action_intent_type = a0.actionParameters.actionIntentType;
r14.action_destination_type = a0.actionParameters.actionDestinationType;
AnalyticsUtils.track(FEED_ITEM_ACTIONED, r14);
},
trackFeedFilterActioned: (a0) => {
const FEED_FILTER_ACTIONED = AnalyticEvents.FEED_FILTER_ACTIONED;
const r14 = {
load_id: ICYMIStore.getLoadId(),
icymi_session_id: a0.icymiSessionId,
ux_variation: a0.uxVariation,
version: ICYMIStore.getVersion(),
session_action_index: a0.sessionActionIndex,
filter_setting_context: a0.filterParameters.filterSettingContext,
filter_target_type: a0.filterParameters.filterTargetType,
target_guild_id: null,
target_channel_id: null,
previous_tune_setting: null,
new_tune_setting: null,
previous_out_setting: null,
new_out_setting: null,
item_id: null,
item_type: null,
impression_id: null
};
let targetGuildId = a0.filterParameters.targetGuildId;
if (targetGuildId == null) {
targetGuildId = null;
}
r14.target_guild_id = targetGuildId;
let targetChannelId = a0.filterParameters.targetChannelId;
if (targetChannelId == null) {
targetChannelId = null;
}
r14.target_channel_id = targetChannelId;
let previousTuneSetting = a0.filterParameters.previousTuneSetting;
if (previousTuneSetting == null) {
previousTuneSetting = null;
}
r14.previous_tune_setting = previousTuneSetting;
let newTuneSetting = a0.filterParameters.newTuneSetting;
if (newTuneSetting == null) {
newTuneSetting = null;
}
r14.new_tune_setting = newTuneSetting;
let previousOutSetting = a0.filterParameters.previousOutSetting;
if (previousOutSetting == null) {
previousOutSetting = null;
}
r14.previous_out_setting = previousOutSetting;
let newOutSetting = a0.filterParameters.newOutSetting;
if (newOutSetting == null) {
newOutSetting = null;
}
r14.new_out_setting = newOutSetting;
let itemId = a0.itemId;
if (itemId == null) {
itemId = null;
}
r14.item_id = itemId;
let itemType = a0.itemType;
if (itemType == null) {
itemType = null;
}
r14.item_type = itemType;
let impressionId = a0.impressionId;
if (impressionId == null) {
impressionId = null;
}
r14.impression_id = impressionId;
AnalyticsUtils.track(FEED_FILTER_ACTIONED, r14);
},
trackFeedPageActioned: (a0) => {
AnalyticsUtils.track(AnalyticEvents.FEED_PAGE_ACTIONED, {
load_id: ICYMIStore.getLoadId(),
icymi_session_id: a0.icymiSessionId,
ux_variation: a0.uxVariation,
version: ICYMIStore.getVersion(),
session_action_index: a0.sessionActionIndex,
action_gesture_type: a0.actionParameters.actionGestureType,
action_target_element: a0.actionParameters.actionTargetElement,
action_intent_type: a0.actionParameters.actionIntentType,
action_destination_type: a0.actionParameters.actionDestinationType
});
}
};
export const DEFAULT_UX_VARIATION = "default";
export { r19 as ICYMIAnalytics };