Files
2026-07-28 01:06:53 +03:00

95 lines
6.9 KiB
TypeScript

/* Metro module 9731; source: modules/self_mod/shared/SafetyWarningUtils.tsx; dependencies: [1878, 661, 683, 2] */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
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});
(FileImportTrackerModule).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 = AnalyticsUtils;
const track = defaultImport.track;
const object = {channel_id: channelId};
object.warning_id = warningId != null ? global.parseInt(warningId) : undefined;
object.warning_type = warningType;
object.other_user_id = senderId;
Reflect.apply(track, defaultImport, [a0, object]);
}
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 = AnalyticsUtils;
const track = defaultImport.track;
const SAFETY_WARNING_VIEWED = AnalyticEvents.SAFETY_WARNING_VIEWED;
const object = {channel_id: channelId};
object.warning_id = warningId != null ? global.parseInt(warningId) : undefined;
object.warning_type = warningType;
object.other_user_id = senderId;
object.view_name = viewName;
object.is_nudge_warning = isNudgeWarning;
Reflect.apply(track, defaultImport, [SAFETY_WARNING_VIEWED, object]);
}
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 = AnalyticsUtils;
const track = defaultImport.track;
const SAFETY_WARNING_CTA_CLICKED = AnalyticEvents.SAFETY_WARNING_CTA_CLICKED;
const object = {channel_id: channelId};
object.warning_id = warningId != null ? global.parseInt(warningId) : undefined;
object.warning_type = warningType;
object.other_user_id = senderId;
object.cta = cta;
object.is_nudge_warning = isNudgeWarning;
Reflect.apply(track, defaultImport, [SAFETY_WARNING_CTA_CLICKED, object]);
}
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;
}
}
global.__d(_fun76459, 9731, [1878, 661, 683, 2]) /* metro module 9731, dependencies: [1878, 661, 683, 2] */;