/* Metro module 9731; source: modules/self_mod/shared/SafetyWarningUtils.tsx; dependencies: [1878, 661, 683, 2] */ function _fun76459(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9917:6, offset: 0x01dcfc29, size: 797 bytes, params: 8, frame: 19 const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const userStore = importDefault(1878) /* metro dependency 1878: UserStore */; const env0_3 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents; (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/shared/SafetyWarningUtils.tsx'); exports.trackViewedEvent = trackViewedEvent; exports.ViewNameTypes = {SAFETY_WARNING_BANNER: 'safety_warning_banner', SAFETY_TAKEOVER_MODAL: 'safety_takeover_modal', SAFETY_TOOLS_NUDGE_TOOLTIP: 'safety_tools_nudge_tooltip', SAFETY_TOOLS_BUTTON: 'safety_tools_button'}; exports.trackNamedViewEvent = trackNamedViewEvent; exports.CtaEventTypes = {OPEN_MORE_TIPS: 'open_more_tips', USER_BANNER_DISMISS: 'user_banner_dismiss', USER_BANNER_BLOCK_CONFIRM: 'user_banner_block_confirm', USER_BANNER_BLOCK_AND_REPORT_CONFIRM: 'user_banner_block_and_report_confirm', USER_BANNER_BLOCK_CANCEL: 'user_banner_block_cancel', USER_BANNER_OPEN_SAFETY_TOOLS: 'user_banner_open_safety_tools', USER_BANNER_IGNORE_CONFIRM: 'user_banner_ignore_confirm', USER_BANNER_MUTE: 'user_banner_mute', USER_MODAL_BLOCK_CONFIRM: 'user_modal_block_confirm', USER_MODAL_BLOCK_CANCEL: 'user_modal_block_cancel', USER_TAKEOVER_MODAL_DISMISS: 'user_takeover_modal_dismiss', USER_TAKEOVER_MODAL_TAKE_ACTION: 'user_takeover_modal_take_action', USER_TAKEOVER_MODAL_SAFETY_TIPS: 'user_takeover_modal_safety_tips', USER_TAKEOVER_MODAL_BLOCK: 'user_takeover_modal_block', USER_TAKEOVER_MODAL_UNBLOCK: 'user_takeover_modal_unblock', USER_TAKEOVER_MODAL_REPORT: 'user_takeover_modal_report', USER_TAKEOVER_MODAL_NO_FILTR: 'user_takeover_modal_no_filtr', USER_TAKEOVER_MODAL_THROUGHLINE: 'user_takeover_modal_throughline', USER_TAKEOVER_MODAL_CTL: 'user_takeover_modal_ctl', USER_TAKEOVER_MODAL_CTL_SMS: 'user_takeover_modal_ctl_sms', USER_TAKEOVER_MODAL_CTL_WEB: 'user_takeover_modal_ctl_web', USER_SAFETY_TOOLS_BUTTON_CLICK: 'user_safety_tools_button_click', USER_SAFETY_TOOLS_IGNORE: 'user_safety_tools_ignore', USER_SAFETY_TOOLS_UNIGNORE: 'user_safety_tools_unignore', USER_SAFETY_TOOLS_BLOCK_CONFIRM: 'user_safety_tools_block_confirm', USER_SAFETY_TOOLS_BLOCK_AND_REPORT_CONFIRM: 'user_safety_tools_block_and_report_confirm', USER_SAFETY_TOOLS_BLOCK_CANCEL: 'user_safety_tools_block_cancel', USER_SAFETY_TOOLS_UNBLOCK: 'user_safety_tools_unblock', USER_SAFETY_TOOLS_REPORT: 'user_safety_tools_report', USER_SAFETY_TOOLS_NO_FILTR: 'user_safety_tools_no_filtr', USER_SAFETY_TOOLS_THROUGHLINE: 'user_safety_tools_throughline', USER_SAFETY_TOOLS_CTL: 'user_safety_tools_ctl', USER_SAFETY_TOOLS_CTL_SMS: 'user_safety_tools_ctl_sms', USER_SAFETY_TOOLS_CTL_WEB: 'user_safety_tools_ctl_web', USER_SAFETY_TOOLS_VIBING_WUMPUS: 'user_safety_tools_vibing_wumpus', USER_SAFETY_TOOLS_SAFETY_TIPS: 'user_safety_tools_safety_tips', USER_SAFETY_TOOLS_ABOUT_SAFETY_ALERTS: 'user_safety_tools_about_safety_alerts', USER_SAFETY_TOOLS_ABOUT_SAFETY_ALERTS_DISMISS: 'user_safety_tools_about_safety_alerts_dismiss', USER_SAFETY_TOOLS_DISMISS: 'user_safety_tools_dismiss', USER_MODAL_LEARN_MORE: 'user_modal_learn_more', USER_MODAL_MUTE: 'user_modal_mute', USER_MODAL_UNMUTE: 'user_modal_unmute', USER_MODAL_IGNORE: 'user_modal_ignore', USER_MODAL_UNIGNORE: 'user_modal_unignore', FEEDBACK_UPVOTE: 'feedback_upvote', FEEDBACK_DOWNVOTE: 'feedback_downvote'}; exports.trackCtaEvent = trackCtaEvent; exports.getUserIsTeen = getUserIsTeen; } function trackViewedEvent(a0, {channelId, warningId, senderId, warningType}) { // fn#76460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9917:3138, offset: 0x01dcff46, size: 112 bytes, params: 3, frame: 18 const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */; const track = defaultImport.track; const object2 = {channel_id: channelId}; object2.warning_id = warningId != null ? global.parseInt(warningId) : undefined; object2.warning_type = warningType; object2.other_user_id = senderId; Reflect.apply(track, defaultImport, [a0, object2]); } function trackNamedViewEvent({channelId, warningId, senderId, warningType, viewName, isNudgeWarning}) { // fn#76461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9917:3360, offset: 0x01dcffb6, size: 143 bytes, params: 2, frame: 21 const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */; const track = defaultImport.track; const SAFETY_WARNING_VIEWED = AnalyticEvents.SAFETY_WARNING_VIEWED; const object2 = {channel_id: channelId}; object2.warning_id = warningId != null ? global.parseInt(warningId) : undefined; object2.warning_type = warningType; object2.other_user_id = senderId; object2.view_name = viewName; object2.is_nudge_warning = isNudgeWarning; Reflect.apply(track, defaultImport, [SAFETY_WARNING_VIEWED, object2]); } function trackCtaEvent({channelId, warningId, senderId, warningType, cta, isNudgeWarning}) { // fn#76462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9917:3658, offset: 0x01dd0045, size: 141 bytes, params: 2, frame: 21 const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */; const track = defaultImport.track; const SAFETY_WARNING_CTA_CLICKED = AnalyticEvents.SAFETY_WARNING_CTA_CLICKED; const object2 = {channel_id: channelId}; object2.warning_id = warningId != null ? global.parseInt(warningId) : undefined; object2.warning_type = warningType; object2.other_user_id = senderId; object2.cta = cta; object2.is_nudge_warning = isNudgeWarning; Reflect.apply(track, defaultImport, [SAFETY_WARNING_CTA_CLICKED, object2]); } function getUserIsTeen() { // fn#76463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9917:3926, offset: 0x01dd00d2, size: 41 bytes, params: 1, frame: 10 return UserStore.getCurrentUser()?.nsfwAllowed === false; }