/* Metro module 9949; source: modules/quests/lib/analytics/AnalyticsHooks.tsx; dependencies: [31, 661, 9513, 7110, 7091, 7122, 7120, 7071, 491, 477, 7127, 6531, 7121, 683, 2] */ import AnalyticsUtils from '../../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */ import GetDeviceMetadataNative from '../../../device/getDeviceMetadata.native.tsx'; /* Metro dependency 7071 */ import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */ 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 AnalyticsActionsModule from './AnalyticsActions.tsx'; /* Metro dependency 7110 */ import * as AnalyticsTypesModule from './AnalyticsTypes.tsx'; /* Metro dependency 7120 */ import * as AdDataUtilsAndroidModule from '../../../ads/utils/AdDataUtils.android.tsx'; /* Metro dependency 7122 */ import * as QuestHomeSearchSessionModule from './QuestHomeSearchSession.tsx'; /* Metro dependency 7127 */ import * as ContentImpressionTrackerHooksModule from './ContentImpressionTrackerHooks.tsx'; /* Metro dependency 9513 */ function _fun77879(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:6, offset: 0x01e0f97d, size: 239 bytes, params: 8, frame: 20 const env0_0 = require; const useTrackQuestEventWithImpression2 = useTrackQuestEventWithImpression; const useTrackAdContentEventWithImpression2 = useTrackAdContentEventWithImpression; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); (FileImportTrackerModule).fileFinishedImporting('modules/quests/lib/analytics/AnalyticsHooks.tsx'); exports.useTrackQuestEventWithImpression = useTrackQuestEventWithImpression2; exports.useTrackQuestContentClickedWithImpression = useTrackQuestContentClickedWithImpression; exports.useTrackAdContentEventWithImpression = useTrackAdContentEventWithImpression2; exports.useTrackAdContentClickedWithImpression = useTrackAdContentClickedWithImpression; exports.useQuestsEmbedFallbackAnalytics = useQuestsEmbedFallbackAnalytics; exports.useBountyCarouselEmptyStateAnalytics = useBountyCarouselEmptyStateAnalytics; exports.useQuestHomeEntrypointAnalyticsEvents = useQuestHomeEntrypointAnalyticsEvents; function useTrackQuestEventWithImpression() { // fn#77880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:131, offset: 0x01e0fa6c, size: 73 bytes, params: 1, frame: 14 return ReactModule.useCallback(_fun77881, [(ContentImpressionTrackerHooksModule).useQuestImpression()]); function _fun77881(a0) { // fn#77881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:232, offset: 0x01e0fab5, size: 118 bytes, params: 2, frame: 17 let value = environment.__proto__; value = undefined; const trackQuestEvent = AnalyticsActionsModule.trackQuestEvent; const object = {}; copyDataProperties(object, a0, undefined); const object2 = {}; copyDataProperties(object2, a0.properties, undefined); object2['impression_id'] = env0_0 == null ? value : env0_0.getId(); object['properties'] = object2; Reflect.apply(trackQuestEvent, AnalyticsActionsModule, [object]); return value; } } function useTrackAdContentEventWithImpression() { // fn#77882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:343, offset: 0x01e0fb2b, size: 73 bytes, params: 1, frame: 14 return ReactModule.useCallback(_fun77883, [(ContentImpressionTrackerHooksModule).useQuestImpression()]); function _fun77883(a0) { // fn#77883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:448, offset: 0x01e0fb74, size: 118 bytes, params: 2, frame: 17 let value = environment.__proto__; value = undefined; const trackAdContentEvent = AnalyticsActionsModule.trackAdContentEvent; const object = {}; copyDataProperties(object, a0, undefined); const object2 = {}; copyDataProperties(object2, a0.properties, undefined); object2['impression_id'] = env0_0 == null ? value : env0_0.getId(); object['properties'] = object2; Reflect.apply(trackAdContentEvent, AnalyticsActionsModule, [object]); return value; } } function useTrackQuestContentClickedWithImpression() { // fn#77884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:757, offset: 0x01e0fbea, size: 51 bytes, params: 1, frame: 14 return ReactModule.useCallback(_fun77885, [useTrackQuestEventWithImpression()]); function _fun77885({questId, questContent, questContentCTA, questContentPosition, questContentRowIndex, trackGuildAndChannelMetadata, sourceQuestContent}) { // fn#77885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:873, offset: 0x01e0fc1d, size: 205 bytes, params: 2, frame: 19 var environment; let value = environment.__proto__; const env0_7 = (QuestDataUtilsModule).getAdMetadataSealed(sourceQuestContent); const env0_8 = (QuestDataUtilsModule).getAdTrafficMetadataSealed(sourceQuestContent, questId); const getAdUser = (AdDataUtilsAndroidModule).getAdUser; const getQuestContentName = AnalyticsTypesModule.getQuestContentName; value = Reflect.apply(getAdUser, value, [Reflect.apply(getQuestContentName, AnalyticsTypesModule, [questContent])]); value.then(_fun77886); function _fun77886(a0) { // fn#77886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:1155, offset: 0x01e0fcea, size: 481 bytes, params: 2, frame: 24 var advertisingId; var moduleValue3; var moduleValue4; const binding = env1_0; const object = {}; object.questId = questId; const QUEST_CONTENT_CLICKED = AnalyticEvents.QUEST_CONTENT_CLICKED; object.event = QUEST_CONTENT_CLICKED; const object2 = {}; const value3 = undefined; const getContentProperties = AnalyticsTypesModule.getContentProperties; copyDataProperties(object2, Reflect.apply(getContentProperties, AnalyticsTypesModule, [questContent, questContentPosition, questContentRowIndex]), undefined); copyDataProperties(object2, (GetDeviceMetadataNative)(), undefined); object2['cta_name'] = questContentCTA; object2['click_id'] = (require(491) /* metro dependency 491 */).v4(); const value5 = null; if (value5 != a0) { moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */; advertisingId = moduleValue3.isIOS() ? a0.advertisingId : value5; } else { advertisingId = value5; } object2['apple_advertising_id'] = advertisingId; if (value5 != a0) { moduleValue4 = require(477) /* metro dependency 477: PlatformUtils */; advertisingId = moduleValue4.isAndroid() ? a0.advertisingId : value5; } else { advertisingId = value5; } object2['android_advertising_id'] = advertisingId; object2['metadata_sealed'] = value5 != env0_7 ? env0_7 : value5; object2['traffic_metadata_sealed'] = value5 != env0_8 ? env0_8 : value5; const currentQuestHomeSearchSession = (QuestHomeSearchSessionModule).getCurrentQuestHomeSearchSession(); const uuid = value5 == currentQuestHomeSearchSession ? value3 : currentQuestHomeSearchSession.uuid; object2['search_session_id'] = value5 != uuid ? uuid : value5; object.properties = object2; object.trackGuildAndChannelMetadata = trackGuildAndChannelMetadata; object.shouldExtendSession = QuestDataUtilsModule.isBillableQuestContent(questContent); object.sourceQuestContent = sourceQuestContent; binding(object); return value3; } } } function useTrackAdContentClickedWithImpression() { // fn#77887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:1857, offset: 0x01e0fecb, size: 51 bytes, params: 1, frame: 14 return ReactModule.useCallback(_fun77888, [useTrackAdContentEventWithImpression()]); function _fun77888({adContentId, relatedQuestId, adCreativeType, questContent, questContentCTA, questContentPosition, questContentRowIndex, trackGuildAndChannelMetadata, sourceQuestContent}) { // fn#77888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:1974, offset: 0x01e0fefe, size: 173 bytes, params: 2, frame: 16 var environment; let value = environment.__proto__; const getAdUser = (AdDataUtilsAndroidModule).getAdUser; const getQuestContentName = AnalyticsTypesModule.getQuestContentName; value = Reflect.apply(getAdUser, value, [Reflect.apply(getQuestContentName, AnalyticsTypesModule, [questContent])]); value.then(_fun77889); function _fun77889(a0) { // fn#77889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:2215, offset: 0x01e0ffab, size: 447 bytes, params: 2, frame: 24 var advertisingId; var moduleValue3; var moduleValue4; const binding = env1_0; const object = {}; object.adContentId = adContentId; object.relatedQuestId = relatedQuestId; object.adCreativeType = adCreativeType; const QUEST_CONTENT_CLICKED = AnalyticEvents.QUEST_CONTENT_CLICKED; object.event = QUEST_CONTENT_CLICKED; const object2 = {}; const value3 = undefined; const getContentProperties = AnalyticsTypesModule.getContentProperties; copyDataProperties(object2, Reflect.apply(getContentProperties, AnalyticsTypesModule, [questContent, questContentPosition, questContentRowIndex]), undefined); copyDataProperties(object2, (GetDeviceMetadataNative)(), undefined); object2['cta_name'] = questContentCTA; object2['click_id'] = (require(491) /* metro dependency 491 */).v4(); const value5 = null; if (value5 != a0) { moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */; advertisingId = moduleValue3.isIOS() ? a0.advertisingId : value5; } else { advertisingId = value5; } object2['apple_advertising_id'] = advertisingId; if (value5 != a0) { moduleValue4 = require(477) /* metro dependency 477: PlatformUtils */; advertisingId = moduleValue4.isAndroid() ? a0.advertisingId : value5; } else { advertisingId = value5; } object2['android_advertising_id'] = advertisingId; const currentQuestHomeSearchSession = (QuestHomeSearchSessionModule).getCurrentQuestHomeSearchSession(); const uuid = value5 == currentQuestHomeSearchSession ? value3 : currentQuestHomeSearchSession.uuid; object2['search_session_id'] = value5 != uuid ? uuid : value5; object.properties = object2; object.trackGuildAndChannelMetadata = trackGuildAndChannelMetadata; object.shouldExtendSession = QuestDataUtilsModule.isBillableQuestContent(questContent); object.sourceQuestContent = sourceQuestContent; binding(object); return value3; } } } function useQuestsEmbedFallbackAnalytics(a0, a1) { // fn#77890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:2802, offset: 0x01e1016a, size: 57 bytes, params: 3, frame: 15 const env0_0 = a0; const env0_1 = a1; ReactModule.useEffect(_fun77891, [a0, a1]); function _fun77891() { // fn#77891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:2861, offset: 0x01e101a3, size: 50 bytes, params: 1, frame: 14 const value = environment.__proto__; (AnalyticsActionsModule).trackQuestEmbedFallbackViewed(require, env0_0); } } function useBountyCarouselEmptyStateAnalytics(a0) { // fn#77892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:2958, offset: 0x01e101d5, size: 46 bytes, params: 2, frame: 14 const env0_0 = a0; ReactModule.useEffect(_fun77893, [a0]); function _fun77893() { // fn#77893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:3020, offset: 0x01e10203, size: 57 bytes, params: 1, frame: 12 var value2; if (env0_0 != null) { value2 = environment.__proto__; (require(7110) /* metro dependency 7110: AnalyticsActions */).trackBountyCarouselEmptyStateViewed(env0_0); } } } function useQuestHomeEntrypointAnalyticsEvents({questHomeHero, shouldShowQuestHomeHeroContent}) { // fn#77894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:3129, offset: 0x01e1023c, size: 367 bytes, params: 2, frame: 19 let env0_3 = undefined; const QuestContent = (QuestTypesModule).QuestContent; const r3 = shouldShowQuestHomeHeroContent ? QuestContent.QUEST_HOME_ENTRYPOINT_THEMED : QuestContent.QUEST_HOME_ENTRYPOINT; const value2 = env0_3.useMemo(_fun77895, [r3]); env0_3 = value2; const value3 = env0_3.useCallback(_fun77896, [questHomeHero, shouldShowQuestHomeHeroContent, r3, value2]); return env0_3.useMemo(_fun77901, [env0_3.useCallback(_fun77897, [value3]), env0_3.useCallback(_fun77898, [value3]), env0_3.useCallback(function() { importDefault(dependencyMap[13]).track(AnalyticEvents.QUEST_HOME_ONBOARDING_POPOVER_RENDERED); }, []), env0_3.useCallback(_fun77900, [value2, questHomeHero])]); function _fun77895() { // fn#77895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:3344, offset: 0x01e103ab, size: 50 bytes, params: 1, frame: 11 let value = environment.__proto__; value = require(7120) /* metro dependency 7120: AnalyticsTypes */; value = value.getContentProperties(env0_2); delete value.row_index; return value; } function _fun77896(a0) { // fn#77896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:3439, offset: 0x01e103dd, size: 173 bytes, params: 2, frame: 18 var value2; var value3; var moduleValue; var trackAdContentEvent; var object; if (questHomeHero == null) { value2 = environment.__proto__; (importDefault(683) /* metro dependency 683: AnalyticsUtils */).track(a0, env0_3); } else if (shouldShowQuestHomeHeroContent) { value3 = environment.__proto__; moduleValue = require(7110) /* metro dependency 7110: AnalyticsActions */; trackAdContentEvent = moduleValue.trackAdContentEvent; object = {}; object.adContentId = questHomeHero.id; object.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.QUEST_HOME_HERO; object.event = a0; object.properties = env0_3; object.sourceQuestContent = env0_2; Reflect.apply(trackAdContentEvent, moduleValue, [object]); } else { value2 = environment.__proto__; (importDefault(683) /* metro dependency 683: AnalyticsUtils */).track(a0, env0_3); } } function _fun77897() { // fn#77897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:3649, offset: 0x01e1048a, size: 29 bytes, params: 1, frame: 11 const QUEST_HOVER = AnalyticEvents.QUEST_HOVER; (0, ConstantsModule.AnalyticEvents)(QUEST_HOVER); } function _fun77898() { // fn#77898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:3695, offset: 0x01e104a7, size: 29 bytes, params: 1, frame: 11 const QUEST_HOVER_OFF = AnalyticEvents.QUEST_HOVER_OFF; (0, ConstantsModule.AnalyticEvents)(QUEST_HOVER_OFF); } function _fun77900() { // fn#77900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:3830, offset: 0x01e104f3, size: 114 bytes, params: 1, frame: 17 var object; var r7; var id; let value = environment.__proto__; const defaultImport = AnalyticsUtils; const track = defaultImport.track; const QUEST_CONTENT_CLICKED = AnalyticEvents.QUEST_CONTENT_CLICKED; const object4 = {is_targeted: false}; value = environment; copyDataProperties(object4, env0_3, value); if (questHomeHero != null) { id = questHomeHero.id; object = {ad_content_id: id}; r7 = id; } else { object = {}; r7 = value; } copyDataProperties(object4, object, r7); Reflect.apply(track, defaultImport, [QUEST_CONTENT_CLICKED, object4]); } function _fun77901() { // fn#77901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10135:3959, offset: 0x01e10565, size: 51 bytes, params: 1, frame: 3 return {handleMouseEnter: env0_5, handleMouseLeave: env0_6, handleOnboardingPopoutRender: env0_7, handleEntrypointClick: env0_8}; } } } global.__d(_fun77879, 9949, [31, 661, 9513, 7110, 7091, 7122, 7120, 7071, 491, 477, 7127, 6531, 7121, 683, 2]) /* metro module 9949, dependencies: [31, 661, 9513, 7110, 7091, 7122, 7120, 7071, 491, 477, 7127, 6531, 7121, 683, 2] */;