Files
discord-decomp/sources/modules/quests/lib/analytics/AnalyticsActions.tsx
T
2026-07-28 01:06:53 +03:00

504 lines
30 KiB
TypeScript

/* Metro module 7110; source: modules/quests/lib/analytics/AnalyticsActions.tsx; dependencies: [5, 7111, 691, 7093, 661, 4875, 7113, 7091, 7114, 7116, 7120, 7121, 4863, 683, 7122, 7071, 477, 491, 7127, 6531, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import AnalyticsUtils from '../../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import DeveloperOptionsStore from '../../../../stores/DeveloperOptionsStore.tsx'; /* Metro dependency 691 */
import QuestStore from '../../QuestStore.tsx'; /* Metro dependency 7093 */
import DevToolsSettingsStore from '../../../devtools/DevToolsSettingsStore.tsx'; /* Metro dependency 7111 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as QuestTypesModule from '../../QuestTypes.tsx'; /* Metro dependency 6531 */
import * as QuestDataUtilsModule from '../../utils/QuestDataUtils.tsx'; /* Metro dependency 7091 */
import * as SessionAdGeneratorModule from '../../../analytics_sessions/SessionAdGenerator.tsx'; /* Metro dependency 7113 */
import * as AnalyticsTypesModule from './AnalyticsTypes.tsx'; /* Metro dependency 7120 */
import * as AdCreativeTypeModule from '../../../../external/discord_common/js/shared/shared-constants/AdCreativeType.tsx'; /* Metro dependency 7121 */
function _fun56794(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:6, offset: 0x013d20f7, size: 500 bytes, params: 8, frame: 23
const env0_0 = require;
const trackQuestEvent2 = trackQuestEvent;
const trackAdContentEvent2 = trackAdContentEvent;
const closure3 = function() {
return _getCommonClickEventProperties.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const AnalyticEvents = (ConstantsModule).AnalyticEvents;
const Set = global.Set;
const QUEST_CONTENT_VIEWED = AnalyticEvents.QUEST_CONTENT_VIEWED;
const QUEST_CONTENT_CLICKED = AnalyticEvents.QUEST_CONTENT_CLICKED;
const set = new Set([QUEST_CONTENT_VIEWED, QUEST_CONTENT_CLICKED]);
(FileImportTrackerModule).fileFinishedImporting('modules/quests/lib/analytics/AnalyticsActions.tsx');
exports.trackQuestEvent = trackQuestEvent2;
exports.trackAppStoreOverlayEvent = trackAppStoreOverlayEvent;
exports.trackAdContentAppStoreOverlayEvent = trackAdContentAppStoreOverlayEvent;
exports.trackAdContentEvent = trackAdContentEvent2;
exports.getCommonClickEventProperties = closure3;
exports.trackQuestContentClicked = function() {
return _trackQuestContentClicked.apply(this, arguments);
};
exports.trackAdContentClicked = function() {
return _trackAdContentClicked.apply(this, arguments);
};
exports.trackBountyCarouselScroll = trackBountyCarouselScroll;
exports.trackBountyCarouselEmptyStateViewed = trackBountyCarouselEmptyStateViewed;
exports.trackBountyVerticalScroll = trackBountyVerticalScroll;
exports.trackQuestHomeCarouselScroll = trackQuestHomeCarouselScroll;
exports.trackQuestHomeSearchEntered = function({searchSessionId}) {
var uuid = require(dependencyMap[6]).getOrRefreshAdSession().uuid;
var defaultImport = importDefault(dependencyMap[13]);
var QUEST_HOME_SEARCH_ENTERED = AnalyticEvents.QUEST_HOME_SEARCH_ENTERED;
var object = {client_ad_session_id: uuid};
object.billing_session_id = assignBillingSessionId(uuid, false);
object.search_session_id = searchSessionId;
defaultImport.track(QUEST_HOME_SEARCH_ENTERED, object);
};
exports.trackQuestHomeSearchClosed = trackQuestHomeSearchClosed;
exports.trackQuestHomeSearchQuerySubmitted = trackQuestHomeSearchQuerySubmitted;
exports.trackQuestBarOrDockModeChange = trackQuestBarOrDockModeChange;
exports.trackQuestEmbedFallbackViewed = function(a0, a1) {
var defaultImport = importDefault(dependencyMap[12]);
var QUEST_EMBED_FALLBACK_VIEWED = AnalyticEvents.QUEST_EMBED_FALLBACK_VIEWED;
defaultImport.trackWithMetadata(QUEST_EMBED_FALLBACK_VIEWED, {quest_id: a0, reason: a1});
};
function assignBillingSessionId(a0, a1) { // fn#56795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:221, offset: 0x013d22eb, size: 76 bytes, params: 3, frame: 13
var uuid;
var r0;
var activeSessionUnsafe;
var value3;
let value = a0;
if (a1) {
r0 = value;
} else {
value = undefined;
activeSessionUnsafe = (require(4875) /* metro dependency 4875: SessionHeartbeatScheduler */).getActiveSessionUnsafe();
value3 = null;
uuid = value3 == activeSessionUnsafe ? value : activeSessionUnsafe.uuid;
r0 = value3 != uuid ? uuid : value3;
}
return r0;
}
function getCommonProperties(a0, a1, a2, a3) { // fn#56796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:351, offset: 0x013d2337, size: 161 bytes, params: 5, frame: 21
const value = a2;
const getOrRefreshAdSession = SessionAdGeneratorModule.getOrRefreshAdSession;
const uuid = Reflect.apply(getOrRefreshAdSession, SessionAdGeneratorModule, [a3]).uuid;
const adDecisionData = (QuestDataUtilsModule).getAdDecisionData(a0, a1);
const object = {client_ad_session_id: uuid};
const assignBillingSessionIdBinding = assignBillingSessionId;
object.billing_session_id = assignBillingSessionIdBinding(uuid, QuestDataUtilsModule.isBillableQuestContent(a1));
object.ad_content_id = a0;
copyDataProperties(object, adDecisionData, undefined);
object['creative_type'] = adDecisionData.creative_type ?? value;
return object;
}
function getCommonQuestProperties(a0, a1, a2) { // fn#56797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:643, offset: 0x013d23d8, size: 239 bytes, params: 4, frame: 20
const object = {};
let id = a0.id;
object.quest_id = id;
object.quest_type = (require(7114) /* metro dependency 7114: QuestUtils */).getQuestType(a0.config);
object.game_id = a0.config.application.id;
object.game_name = a0.config.application.name;
object.application_ids = (require(7116) /* metro dependency 7116: QuestTaskUtils */).getAllApplicationIds(a0) ?? [];
object.quest_status = (require(7120) /* metro dependency 7120: AnalyticsTypes */).getQuestStatus(a0);
const getCommonPropertiesBinding = getCommonProperties;
id = a0.id;
const AdCreativeType = (AdCreativeTypeModule).AdCreativeType;
const QUEST = AdCreativeType.QUEST;
copyDataProperties(object, getCommonPropertiesBinding(id, a1, QUEST, a2), QUEST);
return object;
}
function getCommonAdContentProperties({adContentId, adCreativeType, sourceQuestContent, shouldExtendSession, relatedQuestId}) { // fn#56798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:988, offset: 0x013d24c7, size: 276 bytes, params: 2, frame: 23
var r2;
let value = null;
const r4 = value != relatedQuestId ? QuestStore.getQuest(relatedQuestId) : value;
const object = {};
copyDataProperties(object, getCommonProperties(adContentId, sourceQuestContent, adCreativeType,
shouldExtendSession), adCreativeType);
const adMetadataSealed = (QuestDataUtilsModule).getAdMetadataSealed(sourceQuestContent,
adContentId);
object['metadata_sealed'] = value != adMetadataSealed ? adMetadataSealed : value;
const adTrafficMetadataSealed = (QuestDataUtilsModule).getAdTrafficMetadataSealed(sourceQuestContent,
undefined, adContentId);
object['traffic_metadata_sealed'] = value != adTrafficMetadataSealed ? adTrafficMetadataSealed : value;
object['quest_id'] = value != relatedQuestId ? relatedQuestId : value;
if (value != r4) {
value = require(7120) /* metro dependency 7120: AnalyticsTypes */;
value = value.getQuestStatus(r4);
r2 = value;
} else {
r2 = value;
}
object['quest_status'] = r2;
return object;
}
function trackEvent(a0, a1) { // fn#56799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:1428, offset: 0x013d25db, size: 156 bytes, params: 3, frame: 20
var value2;
let value = a2;
const r1 = value !== undefined ? value : false;
if (DevToolsSettingsStore.displayTools) {
if (DevToolsSettingsStore.lastOpenTabId === 'quest_preview') {
return undefined;
}
DeveloperOptionsStore.isLoggingAnalyticsEvents;
if (a3) {
return undefined;
}
value2 = env0_8.has(a0);
if (r1) {
return (importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */).trackWithMetadata(a0, a1,
value2);
}
value = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
value.track(a0, a1, {flush: value2});
} else {
DeveloperOptionsStore.isLoggingAnalyticsEvents;
if (a3) {
return undefined;
}
value2 = env0_8.has(a0);
if (r1) {
return (importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */).trackWithMetadata(a0, a1,
value2);
}
value = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
value.track(a0, a1, {flush: value2});
}
}
function trackQuestEvent({questId, event, properties, trackGuildAndChannelMetadata, shouldExtendSession, sourceQuestContent}) { // fn#56800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:1641, offset: 0x013d2677, size: 133 bytes, params: 2, frame: 21
var trackEventBinding;
var object;
shouldExtendSession = !(shouldExtendSession === undefined) && shouldExtendSession;
const value2 = QuestStore.quests.get(questId);
if (value2 != null) {
trackEventBinding = trackEvent;
object = {};
copyDataProperties(object, getCommonQuestProperties(value2, sourceQuestContent, shouldExtendSession),
undefined);
copyDataProperties(object, properties, undefined);
trackEventBinding(event, object, trackGuildAndChannelMetadata, value2.preview);
}
}
function trackAdContentEvent({adContentId, relatedQuestId, adCreativeType, event, properties, trackGuildAndChannelMetadata, shouldExtendSession, sourceQuestContent}) { // fn#56801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:1876, offset: 0x013d26fc, size: 140 bytes, params: 2, frame: 24
shouldExtendSession = !(shouldExtendSession === undefined) && shouldExtendSession;
const trackEventBinding = trackEvent;
const object = {};
copyDataProperties(object, getCommonAdContentProperties({adContentId: adContentId, adCreativeType: adCreativeType,
sourceQuestContent: sourceQuestContent, shouldExtendSession: shouldExtendSession,
relatedQuestId: relatedQuestId}), undefined);
copyDataProperties(object, properties, undefined);
trackEventBinding(event, object, trackGuildAndChannelMetadata, false);
}
function _getCommonClickEventProperties() { // fn#56803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:2307, offset: 0x013d2788, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun56805).apply(this, arguments);
async function _fun56805({questContent, questContentPosition, questContentRowIndex, questContentCTA, impressionId, clickId}) { // fn#56805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:2390, offset: 0x013d27ca, size: 397 bytes, params: 2, frame: 25
var advertisingId;
var r5;
var value10;
var value11;
if (false) {
return undefined;
}
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let binding = env2_0;
const binding2 = env2_2;
const value4 = binding(binding2[14]);
const getAdUser = value4.getAdUser;
const value5 = binding(binding2[10]);
const getQuestContentName = value5.getQuestContentName;
await Reflect.apply(getAdUser, value4, [Reflect.apply(getQuestContentName, value5, [questContent])]);
if (false) {
return undefined;
}
const object = {};
binding = env2_0;
const binding3 = env2_2;
const value8 = binding(binding3[10]);
const getContentProperties = value8.getContentProperties;
copyDataProperties(object, Reflect.apply(getContentProperties, value8, [questContent, questContentPosition,
questContentRowIndex]), undefined);
copyDataProperties(object, env2_1(binding3[15])(), undefined);
object['cta_name'] = questContentCTA;
object['impression_id'] = impressionId;
if (null != undefined) {
value10 = env2_0(env2_2[16]);
advertisingId = value10.isIOS() ? undefined.advertisingId : null;
} else {
advertisingId = null;
}
object['apple_advertising_id'] = advertisingId;
if (null != undefined) {
value11 = env2_0(env2_2[16]);
advertisingId = value11.isAndroid() ? undefined.advertisingId : null;
} else {
advertisingId = null;
}
object['android_advertising_id'] = advertisingId;
if (clickId != null) {
r5 = clickId;
} else {
value = env2_0(env2_2[17]);
value = value.v4();
r5 = value;
}
object['click_id'] = r5;
return object;
}
}
function _trackQuestContentClicked() { // fn#56806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:2861, offset: 0x013d2957, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun56808).apply(this, arguments);
async function _fun56808({questId, questContent, questContentCTA, questContentPosition, questContentRowIndex, impressionId, clickId, trackGuildAndChannelMetadata, sourceQuestContent}) { // fn#56808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:2934, offset: 0x013d2999, size: 412 bytes, params: 2, frame: 29
if (false) {
return undefined;
}
value = undefined;
await value;
if (false) {
return undefined;
}
let binding = env2_0;
const adTrafficMetadataSealed = binding(env2_2[7]).getAdTrafficMetadataSealed(sourceQuestContent, questId);
binding = env2_14;
const object = {questId: questId};
const QUEST_CONTENT_CLICKED = env2_7.QUEST_CONTENT_CLICKED;
object.event = QUEST_CONTENT_CLICKED;
const object2 = {};
await env2_16({questContent: questContent, questContentPosition: questContentPosition,
questContentRowIndex: questContentRowIndex, questContentCTA: questContentCTA, impressionId: impressionId,
clickId: clickId});
if (false) {
return undefined;
}
copyDataProperties(object2, undefined, undefined);
object2['metadata_sealed'] = env2_0(env2_2[7]).getAdMetadataSealed(sourceQuestContent) ?? null;
object2['traffic_metadata_sealed'] = adTrafficMetadataSealed ?? null;
const currentQuestHomeSearchSession = env2_0(env2_2[18]).getCurrentQuestHomeSearchSession();
object2['search_session_id'] = (currentQuestHomeSearchSession == null ? value : currentQuestHomeSearchSession.uuid) ?? null;
object.properties = object2;
object.trackGuildAndChannelMetadata = trackGuildAndChannelMetadata;
object.shouldExtendSession = env2_0(env2_2[7]).isBillableQuestContent(questContent);
object.sourceQuestContent = sourceQuestContent;
binding(object);
return value;
}
}
function _trackAdContentClicked() { // fn#56809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:3721, offset: 0x013d2b35, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun56811).apply(this, arguments);
async function _fun56811({adContentId, relatedQuestId, adCreativeType, questContent, questContentCTA, questContentPosition, questContentRowIndex, impressionId, trackGuildAndChannelMetadata, sourceQuestContent}) { // fn#56811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:3788, offset: 0x013d2b77, size: 241 bytes, params: 2, frame: 24
if (true) {
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
var binding = env2_15;
var object = {adContentId: adContentId, relatedQuestId: relatedQuestId, adCreativeType: adCreativeType};
var QUEST_CONTENT_CLICKED = env2_7.QUEST_CONTENT_CLICKED;
object.event = QUEST_CONTENT_CLICKED;
await env2_16({questContent: questContent, questContentPosition: questContentPosition,
questContentRowIndex: questContentRowIndex, questContentCTA: questContentCTA, impressionId: impressionId});
if (false) {
return undefined;
}
object.properties = undefined;
object.trackGuildAndChannelMetadata = trackGuildAndChannelMetadata;
object.shouldExtendSession = env2_0(env2_2[7]).isBillableQuestContent(questContent);
object.sourceQuestContent = sourceQuestContent;
binding(object);
}
}
}
function trackAppStoreOverlayEvent({id}, a1, a2, a3, a4) { // fn#56812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:4518, offset: 0x013d2c68, size: 245 bytes, params: 6, frame: 21
var r4;
var object;
const object2 = {};
object2.content_name = AnalyticsTypesModule.getQuestContentName(a1.content);
object2.cta_name = a1.ctaContent;
object2.impression_id = a1.impressionId;
object2.source_content_name = AnalyticsTypesModule.getQuestContentName(a1.sourceQuestContent);
object2.app_id = a2;
object2.content_position = a1.position;
const QUEST_APP_STORE_OVERLAY_CLOSED = AnalyticEvents.QUEST_APP_STORE_OVERLAY_CLOSED;
const r5 = (a3 === QUEST_APP_STORE_OVERLAY_CLOSED || a3 === AnalyticEvents.QUEST_APP_STORE_OVERLAY_RETURNED) && a4 !== undefined;
const trackQuestEventBinding = trackQuestEvent;
const object3 = {};
object3.questId = id;
object3.event = a3;
if (r5) {
object = {};
copyDataProperties(object, object2, AnalyticsTypesModule);
object['time_spent_ms'] = a4;
r4 = object;
} else {
r4 = object2;
}
object3.properties = r4;
object3.sourceQuestContent = a1.sourceQuestContent;
trackQuestEventBinding(object3);
}
function trackAdContentAppStoreOverlayEvent({adContentId, adCreativeType}, a1, a2, a3, a4) { // fn#56813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:5033, offset: 0x013d2d5d, size: 251 bytes, params: 6, frame: 23
var r4;
var object;
const object2 = {};
object2.content_name = AnalyticsTypesModule.getQuestContentName(a1.content);
object2.cta_name = a1.ctaContent;
object2.impression_id = a1.impressionId;
object2.source_content_name = AnalyticsTypesModule.getQuestContentName(a1.sourceQuestContent);
object2.app_id = a2;
object2.content_position = a1.position;
const trackAdContentEventBinding = trackAdContentEvent;
const object3 = {adContentId: adContentId, adCreativeType: adCreativeType, event: a3};
const QUEST_APP_STORE_OVERLAY_CLOSED = AnalyticEvents.QUEST_APP_STORE_OVERLAY_CLOSED;
if (a3 === QUEST_APP_STORE_OVERLAY_CLOSED) {
if (a4 === undefined) {
r4 = object2;
} else {
object = {};
copyDataProperties(object, object2, AnalyticsTypesModule);
object['time_spent_ms'] = a4;
r4 = object;
}
} else if (a3 !== AnalyticEvents.QUEST_APP_STORE_OVERLAY_RETURNED) {
r4 = object2;
} else if (a4 === undefined) {
r4 = object2;
} else {
object = {};
copyDataProperties(object, object2, AnalyticsTypesModule);
object['time_spent_ms'] = a4;
r4 = object;
}
object3.properties = r4;
object3.sourceQuestContent = a1.sourceQuestContent;
trackAdContentEventBinding(object3);
}
function trackBountyCarouselScroll({scrollingType, scrollingDirection, carouselPosition, questContent}) { // fn#56816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:5930, offset: 0x013d2e58, size: 197 bytes, params: 2, frame: 24
const getOrRefreshAdSession = SessionAdGeneratorModule.getOrRefreshAdSession;
const uuid = Reflect.apply(getOrRefreshAdSession, SessionAdGeneratorModule, []).uuid;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const BOUNTY_CAROUSEL_SCROLL = AnalyticEvents.BOUNTY_CAROUSEL_SCROLL;
const object = {client_ad_session_id: uuid};
const assignBillingSessionIdBinding = assignBillingSessionId;
object.billing_session_id = assignBillingSessionIdBinding(uuid,
QuestDataUtilsModule.isBillableQuestContent(questContent));
object.scrolling_type = scrollingType;
object.scrolling_direction = scrollingDirection;
object.carousel_position = carouselPosition;
object.content_name = (require(7120) /* metro dependency 7120: AnalyticsTypes */).getQuestContentName(questContent);
Reflect.apply(track, defaultImport, [BOUNTY_CAROUSEL_SCROLL, object]);
}
function trackBountyCarouselEmptyStateViewed(a0) { // fn#56817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:6370, offset: 0x013d2f1d, size: 157 bytes, params: 2, frame: 21
const getOrRefreshAdSession = SessionAdGeneratorModule.getOrRefreshAdSession;
const uuid = Reflect.apply(getOrRefreshAdSession, SessionAdGeneratorModule, []).uuid;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const BOUNTY_CAROUSEL_EMPTY_STATE_VIEWED = AnalyticEvents.BOUNTY_CAROUSEL_EMPTY_STATE_VIEWED;
const object = {client_ad_session_id: uuid};
const assignBillingSessionIdBinding = assignBillingSessionId;
const isBillableQuestContent = QuestDataUtilsModule.isBillableQuestContent;
const QuestContent = (QuestTypesModule).QuestContent;
const QUEST_HOME_MOBILE_CAROUSEL = QuestContent.QUEST_HOME_MOBILE_CAROUSEL;
object.billing_session_id = assignBillingSessionIdBinding(uuid, Reflect.apply(isBillableQuestContent, QuestDataUtilsModule,
[QUEST_HOME_MOBILE_CAROUSEL]));
object.reason = a0;
Reflect.apply(track, defaultImport, [BOUNTY_CAROUSEL_EMPTY_STATE_VIEWED, object]);
}
function trackBountyVerticalScroll({scrollingType, scrollingDirection, verticalScrollingPosition, scrollSessionId, timeWatchedPreScrollMs}) { // fn#56818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:6703, offset: 0x013d2fba, size: 168 bytes, params: 2, frame: 22
const getOrRefreshAdSession = SessionAdGeneratorModule.getOrRefreshAdSession;
const uuid = Reflect.apply(getOrRefreshAdSession, SessionAdGeneratorModule, []).uuid;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const BOUNTY_VERTICAL_SCROLL = AnalyticEvents.BOUNTY_VERTICAL_SCROLL;
const object = {client_ad_session_id: uuid};
object.billing_session_id = assignBillingSessionId(uuid, false);
object.scrolling_type = scrollingType;
object.scrolling_direction = scrollingDirection;
object.vertical_scrolling_position = verticalScrollingPosition;
object.scroll_session_id = scrollSessionId;
object.time_watched_pre_scroll_ms = timeWatchedPreScrollMs;
Reflect.apply(track, defaultImport, [BOUNTY_VERTICAL_SCROLL, object]);
}
function trackQuestHomeCarouselScroll({scrollingType, scrollingDirection, scrollWindowStartIndex, scrollWindowEndIndex, scrollWindowSize, questContent, carouselSize}) { // fn#56819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:7156, offset: 0x013d3062, size: 249 bytes, params: 2, frame: 26
const getOrRefreshAdSession = SessionAdGeneratorModule.getOrRefreshAdSession;
const uuid = Reflect.apply(getOrRefreshAdSession, SessionAdGeneratorModule, []).uuid;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const QUEST_HOME_CAROUSEL_SCROLL = AnalyticEvents.QUEST_HOME_CAROUSEL_SCROLL;
const object = {scrolling_type: scrollingType, client_ad_session_id: uuid};
const assignBillingSessionIdBinding = assignBillingSessionId;
object.billing_session_id = assignBillingSessionIdBinding(uuid,
QuestDataUtilsModule.isBillableQuestContent(questContent));
object.scrolling_direction = scrollingDirection;
object.scroll_window_start_index = scrollWindowStartIndex;
object.scroll_window_end_index = scrollWindowEndIndex;
object.scroll_window_size = scrollWindowSize;
object.content_name = (require(7120) /* metro dependency 7120: AnalyticsTypes */).getQuestContentName(questContent);
object.content_id = questContent;
object.carousel_size = carouselSize;
Reflect.apply(track, defaultImport, [QUEST_HOME_CAROUSEL_SCROLL, object]);
}
function trackQuestHomeSearchClosed({searchSessionId, searchSessionDurationMs}) { // fn#56821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:8010, offset: 0x013d31d1, size: 131 bytes, params: 2, frame: 19
const getOrRefreshAdSession = SessionAdGeneratorModule.getOrRefreshAdSession;
const uuid = Reflect.apply(getOrRefreshAdSession, SessionAdGeneratorModule, []).uuid;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const QUEST_HOME_SEARCH_CLOSED = AnalyticEvents.QUEST_HOME_SEARCH_CLOSED;
const object = {client_ad_session_id: uuid};
object.billing_session_id = assignBillingSessionId(uuid, false);
object.search_session_id = searchSessionId;
object.search_session_duration_ms = searchSessionDurationMs;
Reflect.apply(track, defaultImport, [QUEST_HOME_SEARCH_CLOSED, object]);
}
function trackQuestHomeSearchQuerySubmitted({searchSessionId, searchQuery, searchQueryLength, resultsCount, hasResults}) { // fn#56822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:8339, offset: 0x013d3254, size: 172 bytes, params: 2, frame: 22
const getOrRefreshAdSession = SessionAdGeneratorModule.getOrRefreshAdSession;
const uuid = Reflect.apply(getOrRefreshAdSession, SessionAdGeneratorModule, []).uuid;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const QUEST_HOME_SEARCH_QUERY_SUBMITTED = AnalyticEvents.QUEST_HOME_SEARCH_QUERY_SUBMITTED;
const object = {client_ad_session_id: uuid};
object.billing_session_id = assignBillingSessionId(uuid, false);
object.search_session_id = searchSessionId;
object.search_query = searchQuery;
object.search_query_length = searchQueryLength;
object.results_count = resultsCount;
object.has_results = hasResults;
Reflect.apply(track, defaultImport, [QUEST_HOME_SEARCH_QUERY_SUBMITTED, object]);
}
function trackQuestBarOrDockModeChange({questContent, sourceQuestContent, questId, mode, prevMode}) { // fn#56823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7288:8754, offset: 0x013d3300, size: 146 bytes, params: 2, frame: 17
const contentProperties = (AnalyticsTypesModule).getContentProperties(questContent);
const trackQuestEventBinding = trackQuestEvent;
const QUEST_BAR_MODE_CHANGED = AnalyticEvents.QUEST_BAR_MODE_CHANGED;
trackQuestEventBinding({questId: questId, event: QUEST_BAR_MODE_CHANGED,
properties: {content_id: contentProperties.content_id, content_name: contentProperties.content_name, mode: mode,
previous_mode: prevMode}, sourceQuestContent: sourceQuestContent});
}
}
global.__d(_fun56794, 7110, [5, 7111, 691, 7093, 661, 4875, 7113, 7091, 7114, 7116, 7120, 7121, 4863, 683, 7122,
7071, 477, 491, 7127, 6531,
2]) /* metro module 7110, dependencies: [5, 7111, 691, 7093, 661, 4875, 7113, 7091, 7114, 7116, 7120, 7121, 4863, 683, 7122, 7071, 477, 491, 7127, 6531, 2] */;