This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,4 +1,11 @@
/* Metro module 9730; source: modules/self_mod/inappropriate_conversation/InappropriateConversationUtils.tsx; dependencies: [1348, 1878, 9706, 9731, 2] */
import UserSettingsProtoStore from '../../user_settings/UserSettingsProtoStore.tsx'; /* Metro dependency 1348 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import ChannelSafetyWarningsStore from '../ChannelSafetyWarningsStore.tsx'; /* Metro dependency 9706 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ChannelSafetyWarningsStoreModule from '../ChannelSafetyWarningsStore.tsx'; /* Metro dependency 9706 */
import * as SafetyWarningUtilsModule from '../shared/SafetyWarningUtils.tsx'; /* Metro dependency 9731 */
function _fun76448(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9916:6, offset: 0x01dcf9af, size: 210 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = function(a0) {
@@ -15,11 +22,7 @@ function _fun76448(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userSettingsProtoStore = importDefault(1348) /* metro dependency 1348: UserSettingsProtoStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const channelSafetyWarningsStore = importDefault(9706) /* metro dependency 9706: ChannelSafetyWarningsStore */;
const env0_5 = (require(9706) /* metro dependency 9706: ChannelSafetyWarningsStore */).SafetyWarningTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/inappropriate_conversation/InappropriateConversationUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/self_mod/inappropriate_conversation/InappropriateConversationUtils.tsx');
exports.getSafetyAlertsSettingOrDefault = getSafetyAlertsSettingOrDefault;
exports.getInappropriateConversationTakeoverForChannel = function(a0) {
var value = _fun76454(a0);
@@ -31,59 +34,78 @@ function _fun76448(global, require, importDefault, importAll, module, exports, d
};
exports.shouldShowInappropriateConversationTakeoverForChannelRecord = shouldShowInappropriateConversationTakeoverForChannelRecord;
exports.shouldShowTakeoverForWarnings = closure;
}
function shouldShowTakeoverForWarnings(a0) { // fn#76449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9916:155, offset: 0x01dcfa81, size: 56 bytes, params: 2, frame: 12
var r0;
let value = a0.filter(function({type}) {
return type === SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_1;
});
const value2 = value.length > 0;
if (value2) {
value = value.every(function(a0) {
return a0.dismiss_timestamp == null;
});
r0 = value;
} else {
r0 = value2;
}
return r0;
function _fun76450({type}) { // fn#76450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9916:213, offset: 0x01dcfab9, size: 27 bytes, params: 2, frame: 2
const INAPPROPRIATE_CONVERSATION_TIER_1 = SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_1;
return type === INAPPROPRIATE_CONVERSATION_TIER_1;
}
function shouldShowTakeoverForWarnings(a0) { // fn#76449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9916:155, offset: 0x01dcfa81, size: 56 bytes, params: 2, frame: 12
var r0;
let value = a0.filter(function({type}) {
return type === SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_1;
});
const value2 = value.length > 0;
if (value2) {
value = value.every(function(a0) {
}
function getSafetyAlertsSettingOrDefault() { // fn#76452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9916:468, offset: 0x01dcfad4, size: 144 bytes, params: 1, frame: 15
const currentUser = UserStore.getCurrentUser();
const value3 = undefined;
const value4 = (currentUser == null ? value3 : currentUser.isStaff()) === true;
const privacy = UserSettingsProtoStore.settings.privacy;
const r3 = privacy == null || privacy.inappropriateConversationWarnings == null ? value3 : privacy.inappropriateConversationWarnings.value;
const r1 = r3 == null || r3;
let value = SafetyWarningUtilsModule;
value = value.getUserIsTeen();
return (value || value4) && r1;
}
function getInappropriateConversationTakeoverForChannel(a0) { // fn#76453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9916:772, offset: 0x01dcfb64, size: 88 bytes, params: 2, frame: 13
let value = getTier1WarningsForChannel(a0);
if (value.filter(function(a0) {
return a0.dismiss_timestamp != null;
}).length > 0) {
return null;
}
value = value.filter(function(a0) {
return a0.dismiss_timestamp == null;
});
r0 = value;
} else {
r0 = value2;
return value.length !== 1 ? null : value[0];
function getTier1WarningsForChannel(a0) { // fn#76454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9916:837, owner: getInappropriateConversationTakeoverForChannel.getTier1WarningsForChannel, offset: 0x01dcfbbc, size: 42 bytes, params: 2, frame: 11
var environment;
const value = environment.__proto__;
return ChannelSafetyWarningsStore.getChannelSafetyWarnings(a0).filter(function({type}) {
return type === SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_1;
});
}
}
return r0;
}
function getSafetyAlertsSettingOrDefault() { // fn#76452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9916:468, offset: 0x01dcfad4, size: 144 bytes, params: 1, frame: 15
const currentUser = UserStore.getCurrentUser();
const value3 = undefined;
const value4 = (currentUser == null ? value3 : currentUser.isStaff()) === true;
const privacy = UserSettingsProtoStore.settings.privacy;
const r3 = privacy == null || privacy.inappropriateConversationWarnings == null ? value3 : privacy.inappropriateConversationWarnings.value;
const r1 = r3 == null || r3;
let value = require(9731) /* metro dependency 9731: SafetyWarningUtils */;
value = value.getUserIsTeen();
return (value || value4) && r1;
}
function getInappropriateConversationTakeoverForChannel(a0) { // fn#76453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9916:772, offset: 0x01dcfb64, size: 88 bytes, params: 2, frame: 13
let value = getTier1WarningsForChannel(a0);
if (value.filter(function(a0) {
return a0.dismiss_timestamp != null;
}).length > 0) {
return null;
function shouldShowInappropriateConversationTakeoverForChannelRecord(a0) { // fn#76458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9916:1180, offset: 0x01dcfc01, size: 40 bytes, params: 2, frame: 12
return a0.safetyWarnings != null && shouldShowTakeoverForWarnings(a0.safetyWarnings);
}
value = value.filter(function(a0) {
return a0.dismiss_timestamp == null;
});
return value.length !== 1 ? null : value[0];
}
function shouldShowInappropriateConversationTakeoverForChannelRecord(a0) { // fn#76458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9916:1180, offset: 0x01dcfc01, size: 40 bytes, params: 2, frame: 12
return a0.safetyWarnings != null && shouldShowTakeoverForWarnings(a0.safetyWarnings);
function _fun76451({dismiss_timestamp}) { // fn#76451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9916:291, offset: 0x01dcf88f, size: 17 bytes, params: 2, frame: 2
return dismiss_timestamp == null;
}
function getTier1WarningsForChannel(a0) { // fn#76454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9916:837, owner: getInappropriateConversationTakeoverForChannel.getTier1WarningsForChannel, offset: 0x01dcfbbc, size: 42 bytes, params: 2, frame: 11
var environment;
const value = environment.__proto__;
return ChannelSafetyWarningsStore.getChannelSafetyWarnings(a0).filter(function({type}) {
return type === SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_1;
});
function _fun76456({dismiss_timestamp}) { // fn#76456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9916:988, offset: 0x01dc8aaa, size: 17 bytes, params: 2, frame: 2
return dismiss_timestamp != null;
}
function _fun76457({dismiss_timestamp}) { // fn#76457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9916:1056, offset: 0x01dcf88f, size: 17 bytes, params: 2, frame: 2
return dismiss_timestamp == null;
}
global.__d(_fun76448, 9730, [1348, 1878, 9706, 9731,
2]) /* metro module 9730, dependencies: [1348, 1878, 9706, 9731, 2] */;
@@ -1,10 +1,13 @@
/* Metro module 9748; source: modules/self_mod/inappropriate_conversation/InappropriateConversationsActionCreators.tsx; dependencies: [661, 694, 507, 2] */
import Dispatcher from '../../../Dispatcher.tsx'; /* Metro dependency 694 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun76560(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9934:6, offset: 0x01dd3d12, size: 178 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(661) /* metro dependency 661: Constants */).Endpoints;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/inappropriate_conversation/InappropriateConversationsActionCreators.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/self_mod/inappropriate_conversation/InappropriateConversationsActionCreators.tsx');
exports.playVibingWumpusMusic = playVibingWumpusMusic;
exports.stopVibingWumpusMusic = stopVibingWumpusMusic;
exports.pauseVibingWumpusMusic = pauseVibingWumpusMusic;
@@ -23,17 +26,18 @@ function _fun76560(global, require, importDefault, importAll, module, exports, d
object.rejectWithError = false;
return HTTP.post(object);
};
function playVibingWumpusMusic() { // fn#76561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9934:262, offset: 0x01dd3dc4, size: 49 bytes, params: 1, frame: 13
(Dispatcher).dispatch({type: 'VIBING_WUMPUS_PLAY_MUSIC'});
}
function stopVibingWumpusMusic() { // fn#76562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9934:372, offset: 0x01dd3df5, size: 49 bytes, params: 1, frame: 13
(Dispatcher).dispatch({type: 'VIBING_WUMPUS_STOP_MUSIC'});
}
function pauseVibingWumpusMusic() { // fn#76563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9934:483, offset: 0x01dd3e26, size: 49 bytes, params: 1, frame: 13
(Dispatcher).dispatch({type: 'VIBING_WUMPUS_PAUSE_MUSIC'});
}
}
function playVibingWumpusMusic() { // fn#76561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9934:262, offset: 0x01dd3dc4, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'VIBING_WUMPUS_PLAY_MUSIC'});
}
function stopVibingWumpusMusic() { // fn#76562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9934:372, offset: 0x01dd3df5, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'VIBING_WUMPUS_STOP_MUSIC'});
}
function pauseVibingWumpusMusic() { // fn#76563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9934:483, offset: 0x01dd3e26, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'VIBING_WUMPUS_PAUSE_MUSIC'});
}
global.__d(_fun76560, 9748, [661, 694, 507, 2]) /* metro module 9748, dependencies: [661, 694, 507, 2] */;
@@ -1,9 +1,12 @@
/* Metro module 9747; source: modules/self_mod/inappropriate_conversation/InappropriateConversationsConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun76559(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9933:6, offset: 0x01dd3c84, size: 142 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/inappropriate_conversation/InappropriateConversationsConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/self_mod/inappropriate_conversation/InappropriateConversationsConstants.tsx');
exports.VibingWumpusAction = {PLAY: 'play', PAUSE: 'pause', BACK_TO_CONVERSATION: 'back_to_conversation'};
exports.VibingWumpusSource = {INAPPROPRIATE_CONVERSATION: 'inappropriate_conversation', KEYBIND: 'keybind'};
}
global.__d(_fun76559, 9747, [2]) /* metro module 9747, dependencies: [2] */;
@@ -1,13 +1,29 @@
/* Metro module 9704; source: modules/self_mod/inappropriate_conversation/InappropriateConversationsDefaultOn.tsx; dependencies: [1358, 2] */
import ApexExperiment from '../../experiments/apex/ApexExperiment.tsx'; /* Metro dependency 1358 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun76262(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9890:6, offset: 0x01dc8d1c, size: 188 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importDefault(1358) /* metro dependency 1358: ApexExperiment */;
let value = ApexExperiment;
value = value({'name': '2026-04-inappropriate-conversations-default-on', 'kind': 'user',
defaultConfig: {enabled: false}, variations: {[0]: {enabled: false}, [1]: {enabled: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/inappropriate_conversation/InappropriateConversationsDefaultOn.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/self_mod/inappropriate_conversation/InappropriateConversationsDefaultOn.tsx');
exports.InappropriateConversationsDefaultOn = value;
exports.isEligibleForInappropriateConversationDefaultOn = isEligibleForInappropriateConversationDefaultOn;
exports.useIsEligibleForInappropriateConversationDefaultOn = useIsEligibleForInappropriateConversationDefaultOn;
function isEligibleForInappropriateConversationDefaultOn({location}) { // fn#76263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9890:452, offset: 0x01195c54, size: 39 bytes, params: 2, frame: 12
const binding = env0_0;
const getConfig = binding.getConfig;
return Reflect.apply(getConfig, binding, [{location: location}]).enabled;
}
function useIsEligibleForInappropriateConversationDefaultOn({location}) { // fn#76264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9890:618, offset: 0x01195c7b, size: 39 bytes, params: 2, frame: 12
const binding = env0_0;
const useConfig = binding.useConfig;
return Reflect.apply(useConfig, binding, [{location: location}]).enabled;
}
}
global.__d(_fun76262, 9704, [1358, 2]) /* metro module 9704, dependencies: [1358, 2] */;
@@ -1,64 +1,83 @@
/* Metro module 16146; source: modules/self_mod/inappropriate_conversation/InappropriateConversationsManager.tsx; dependencies: [7, 6, 15, 17, 18, 10756, 16147, 4860, 2] */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as SoundUtilsModule from '../../sound_playback/SoundUtils.tsx'; /* Metro dependency 10756 */
function _fun124755(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#124755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16354:6, offset: 0x025c245e, size: 341 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(7) /* metro dependency 7 */;
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const env0_7 = (require(10756) /* metro dependency 10756: SoundUtils */).createSound('vibing_wumpus',
const env0_7 = (SoundUtilsModule).createSound('vibing_wumpus',
'vibing_wumpus', 0);
value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
value = _fun124767(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/inappropriate_conversation/InappropriateConversationsManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/self_mod/inappropriate_conversation/InappropriateConversationsManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_124756() { // fn#124756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16354:148, offset: 0x025c25b3, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_124756() { // fn#124756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16354:148, offset: 0x025c25b3, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_124756_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_124756_isNativeReflectConstruct = function() {
return !!result;
})();
}
function fade_124759(a0, a1) { // fn#124759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16354:417, offset: 0x025c2615, size: 208 bytes, params: 3, frame: 20
var binding;
let Math = global.Math;
let value = Math.round(100 * a0);
Math = global.Math;
const value3 = Math.round(100 * env0_9);
Math = global.Math;
const value4 = Math.round(100 * env0_8);
if (value > 0) {
if (value4 >= value3) {
global.clearInterval(env0_10);
if (value3 === 0 && a1 != null) {
a1();
function fade_124759(a0, a1) { // fn#124759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16354:417, offset: 0x025c2615, size: 208 bytes, params: 3, frame: 20
var binding;
let Math = global.Math;
let value = Math.round(100 * a0);
Math = global.Math;
const value3 = Math.round(100 * env0_9);
Math = global.Math;
const value4 = Math.round(100 * env0_8);
if (value > 0) {
if (value4 >= value3) {
global.clearInterval(env0_10);
if (value3 === 0 && a1 != null) {
a1();
}
} else if (value < 0) {
if (value4 <= value3) {
global.clearInterval(env0_10);
if (value3 === 0 && a1 != null) {
a1();
}
} else {
env0_8 = (value4 + value) / 100;
binding = env0_7;
value = importDefault(16147) /* metro dependency 16147 */;
binding.volume = value(env0_8, 0, 0.5);
}
} else {
env0_8 = (value4 + value) / 100;
binding = env0_7;
value = importDefault(16147) /* metro dependency 16147 */;
binding.volume = value(env0_8, 0, 0.5);
}
} else if (value < 0) {
if (value4 <= value3) {
@@ -78,91 +97,77 @@ function fade_124759(a0, a1) { // fn#124759, source: /ci/build/discord/discord/d
value = importDefault(16147) /* metro dependency 16147 */;
binding.volume = value(env0_8, 0, 0.5);
}
} else if (value < 0) {
if (value4 <= value3) {
}
function fadeOut(a0) { // fn#124760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16354:600, offset: 0x025c26e5, size: 91 bytes, params: 2, frame: 14
const env0_0 = a0;
if (env0_10 != null) {
global.clearInterval(env0_10);
if (value3 === 0 && a1 != null) {
a1();
}
} else {
env0_8 = (value4 + value) / 100;
binding = env0_7;
value = importDefault(16147) /* metro dependency 16147 */;
binding.volume = value(env0_8, 0, 0.5);
}
} else {
env0_8 = (value4 + value) / 100;
binding = env0_7;
value = importDefault(16147) /* metro dependency 16147 */;
binding.volume = value(env0_8, 0, 0.5);
const env0_1 = getVolumeChangeAmount();
env0_10 = global.setInterval(_fun124761, 100);
function _fun124761() { // fn#124761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16354:695, offset: 0x025c2740, size: 28 bytes, params: 1, frame: 13
fade_124759(env0_1, env0_0);
}
}
}
function fadeOut(a0) { // fn#124760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16354:600, offset: 0x025c26e5, size: 91 bytes, params: 2, frame: 14
const env0_0 = a0;
if (env0_10 != null) {
global.clearInterval(env0_10);
function fadeIn_124762() { // fn#124762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16354:717, offset: 0x025c275c, size: 106 bytes, params: 1, frame: 14
if (env0_10 != null) {
global.clearInterval(env0_10);
}
env0_7.loop();
const env0_0 = getVolumeChangeAmount();
env0_10 = global.setInterval(_fun124763, 100);
function _fun124763() { // fn#124763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16354:820, offset: 0x025c27c6, size: 23 bytes, params: 1, frame: 11
fade_124759(env0_0);
}
}
const env0_1 = getVolumeChangeAmount();
env0_10 = global.setInterval(_fun124761, 100);
}
function fadeIn_124762() { // fn#124762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16354:717, offset: 0x025c275c, size: 106 bytes, params: 1, frame: 14
if (env0_10 != null) {
global.clearInterval(env0_10);
function handlePauseMusic() { // fn#124764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16354:838, offset: 0x025c27dd, size: 40 bytes, params: 1, frame: 12
fadeOut(env0_7.pause.bind(env0_7));
}
env0_7.loop();
const env0_0 = getVolumeChangeAmount();
env0_10 = global.setInterval(_fun124763, 100);
}
function handlePauseMusic() { // fn#124764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16354:838, offset: 0x025c27dd, size: 40 bytes, params: 1, frame: 12
fadeOut(env0_7.pause.bind(env0_7));
}
function handleStopMusic() { // fn#124765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16354:891, offset: 0x025c2805, size: 40 bytes, params: 1, frame: 12
fadeOut(env0_7.stop.bind(env0_7));
}
function getVolumeChangeAmount() { // fn#124766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16354:942, offset: 0x025c282d, size: 31 bytes, params: 1, frame: 2
return 0.2 * (env0_9 - env0_8);
}
function _fun124767(a0) { // fn#124767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16354:1000, offset: 0x025c284c, size: 42 bytes, params: 2, frame: 14
const closure = InappropriateConversationsManager;
env0_6(closure, a0);
return env0_2(closure);
}
function _fun124761() { // fn#124761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16354:695, offset: 0x025c2740, size: 28 bytes, params: 1, frame: 13
fade_124759(env0_1, env0_0);
}
function _fun124763() { // fn#124763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16354:820, offset: 0x025c27c6, size: 23 bytes, params: 1, frame: 11
fade_124759(env0_0);
}
function InappropriateConversationsManager(a0) { // fn#124768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16354:1012, offset: 0x025c2876, size: 167 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, InappropriateConversationsManager);
const items = [];
arraySpread(items, value, 0, items);
value = env1_5(InappropriateConversationsManager);
binding = env1_4;
if (_isNativeReflectConstruct_124756()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
function handleStopMusic() { // fn#124765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16354:891, offset: 0x025c2805, size: 40 bytes, params: 1, frame: 12
fadeOut(env0_7.stop.bind(env0_7));
}
value = binding(this, r0);
value.actions = {VIBING_WUMPUS_PLAY_MUSIC: fadeIn_124762, VIBING_WUMPUS_STOP_MUSIC: handleStopMusic,
VIBING_WUMPUS_PAUSE_MUSIC: handlePauseMusic};
return value;
function getVolumeChangeAmount() { // fn#124766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16354:942, offset: 0x025c282d, size: 31 bytes, params: 1, frame: 2
return 0.2 * (env0_9 - env0_8);
}
function _fun124767(a0) { // fn#124767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16354:1000, offset: 0x025c284c, size: 42 bytes, params: 2, frame: 14
const InappropriateConversationsManager2 = InappropriateConversationsManager;
Inherits(InappropriateConversationsManager2, a0);
return CreateClass(InappropriateConversationsManager2);
function InappropriateConversationsManager(a0) { // fn#124768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16354:1012, offset: 0x025c2876, size: 167 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, InappropriateConversationsManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_5(InappropriateConversationsManager);
binding = env1_4;
if (_isNativeReflectConstruct_124756()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.actions = {VIBING_WUMPUS_PLAY_MUSIC: fadeIn_124762, VIBING_WUMPUS_STOP_MUSIC: handleStopMusic,
VIBING_WUMPUS_PAUSE_MUSIC: handlePauseMusic};
return value;
}
}
}
global.__d(_fun124755, 16146, [7, 6, 15, 17, 18, 10756, 16147, 4860,
2]) /* metro module 16146, dependencies: [7, 6, 15, 17, 18, 10756, 16147, 4860, 2] */;
@@ -1,13 +1,29 @@
/* Metro module 9702; source: modules/self_mod/inappropriate_conversation/SelfModInappropriateConversationExperiment.tsx; dependencies: [1358, 2] */
import ApexExperiment from '../../experiments/apex/ApexExperiment.tsx'; /* Metro dependency 1358 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun76256(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9888:6, offset: 0x01dc8aed, size: 186 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importDefault(1358) /* metro dependency 1358: ApexExperiment */;
let value = ApexExperiment;
value = value({'name': '2026-04-inappropriate-conversations-prescan', 'kind': 'user',
defaultConfig: {enabled: false}, variations: {[0]: {enabled: false}, [1]: {enabled: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/inappropriate_conversation/SelfModInappropriateConversationExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/self_mod/inappropriate_conversation/SelfModInappropriateConversationExperiment.tsx');
exports.InappropriateConversationExperiment = value;
exports.isEligibleForInappropriateConversationWarning = isEligibleForInappropriateConversationWarning;
exports.useIsEligibleForInappropriateConversationWarning = useIsEligibleForInappropriateConversationWarning;
function isEligibleForInappropriateConversationWarning({location}) { // fn#76257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9888:454, offset: 0x01195c54, size: 39 bytes, params: 2, frame: 12
const binding = env0_0;
const getConfig = binding.getConfig;
return Reflect.apply(getConfig, binding, [{location: location}]).enabled;
}
function useIsEligibleForInappropriateConversationWarning({location}) { // fn#76258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9888:616, offset: 0x01195c7b, size: 39 bytes, params: 2, frame: 12
const binding = env0_0;
const useConfig = binding.useConfig;
return Reflect.apply(useConfig, binding, [{location: location}]).enabled;
}
}
global.__d(_fun76256, 9702, [1358, 2]) /* metro module 9702, dependencies: [1358, 2] */;
@@ -1,36 +1,43 @@
/* Metro module 11294; source: modules/self_mod/inappropriate_conversation/hooks/useInappropriateConversationBannerForChannel.tsx; dependencies: [9706, 9702, 9703, 9705, 11293, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as SelfModInappropriateConversationExperimentModule from '../SelfModInappropriateConversationExperiment.tsx'; /* Metro dependency 9702 */
import * as UseSafetyAlertsSettingOrDefaultModule from './useSafetyAlertsSettingOrDefault.tsx'; /* Metro dependency 9703 */
import * as UseInappropriateConversationWarningsForChannelModule from './useInappropriateConversationWarningsForChannel.tsx'; /* Metro dependency 9705 */
import * as ChannelSafetyWarningsStoreModule from '../../ChannelSafetyWarningsStore.tsx'; /* Metro dependency 9706 */
import * as UseChannelSafetyWarningModule from '../../hooks/useChannelSafetyWarning.tsx'; /* Metro dependency 11293 */
function _fun86195(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11480:6, offset: 0x01f8b193, size: 117 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(9706) /* metro dependency 9706: ChannelSafetyWarningsStore */).SafetyWarningTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/inappropriate_conversation/hooks/useInappropriateConversationBannerForChannel.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/self_mod/inappropriate_conversation/hooks/useInappropriateConversationBannerForChannel.tsx');
exports.useInappropriateConversationBannerForChannel = useInappropriateConversationBannerForChannel;
}
function useInappropriateConversationBannerForChannel(a0, a1) { // fn#86196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11480:304, offset: 0x01f8b208, size: 171 bytes, params: 3, frame: 18
const value2 = (require(9702) /* metro dependency 9702: SelfModInappropriateConversationExperiment */).useIsEligibleForInappropriateConversationWarning({location: a1});
const value3 = (require(9703) /* metro dependency 9703: useSafetyAlertsSettingOrDefault */).useSafetyAlertsSettingOrDefault();
const value4 = (require(9705) /* metro dependency 9705: useInappropriateConversationWarningsForChannel */).useInappropriateConversationWarningsForChannel(a0);
const useChannelSafetyWarningModule = require(11293) /* metro dependency 11293: useChannelSafetyWarning */;
const useChannelSafetyWarning = useChannelSafetyWarningModule.useChannelSafetyWarning;
const INAPPROPRIATE_CONVERSATION_TIER_2 = SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_2;
if (value2) {
if (value3) {
if (value4.length === 0) {
return undefined;
function useInappropriateConversationBannerForChannel(a0, a1) { // fn#86196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11480:304, offset: 0x01f8b208, size: 171 bytes, params: 3, frame: 18
const value2 = (SelfModInappropriateConversationExperimentModule).useIsEligibleForInappropriateConversationWarning({location: a1});
const value3 = (UseSafetyAlertsSettingOrDefaultModule).useSafetyAlertsSettingOrDefault();
const value4 = (UseInappropriateConversationWarningsForChannelModule).useInappropriateConversationWarningsForChannel(a0);
const useChannelSafetyWarning = UseChannelSafetyWarningModule.useChannelSafetyWarning;
const INAPPROPRIATE_CONVERSATION_TIER_2 = SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_2;
if (value2) {
if (value3) {
if (value4.length === 0) {
return undefined;
}
return value4.some(_fun86197) ? undefined : Reflect.apply(useChannelSafetyWarning,
UseChannelSafetyWarningModule,
[a0, INAPPROPRIATE_CONVERSATION_TIER_2]);
}
return value4.some(_fun86197) ? undefined : Reflect.apply(useChannelSafetyWarning,
useChannelSafetyWarningModule,
[a0, INAPPROPRIATE_CONVERSATION_TIER_2]);
}
function _fun86197(a0) { // fn#86197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11480:649, offset: 0x01f8b2b3, size: 67 bytes, params: 2, frame: 4
const type = a0.type;
const value = environment.__proto__;
const INAPPROPRIATE_CONVERSATION_TIER_1 = SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_1;
return type === INAPPROPRIATE_CONVERSATION_TIER_1 || a0.type === SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_2 && a0.dismiss_timestamp != null;
}
}
}
function _fun86197(a0) { // fn#86197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11480:649, offset: 0x01f8b2b3, size: 67 bytes, params: 2, frame: 4
const type = a0.type;
const value = environment.__proto__;
const INAPPROPRIATE_CONVERSATION_TIER_1 = SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_1;
return type === INAPPROPRIATE_CONVERSATION_TIER_1 || a0.type === SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_2 && a0.dismiss_timestamp != null;
}
global.__d(_fun86195, 11294, [9706, 9702, 9703, 9705, 11293,
2]) /* metro module 11294, dependencies: [9706, 9702, 9703, 9705, 11293, 2] */;
@@ -1,29 +1,33 @@
/* Metro module 9701; source: modules/self_mod/inappropriate_conversation/hooks/useInappropriateConversationSafetyToolsWarningForChannel.tsx; dependencies: [9702, 9703, 9705, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as SelfModInappropriateConversationExperimentModule from '../SelfModInappropriateConversationExperiment.tsx'; /* Metro dependency 9702 */
function _fun76252(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9887:6, offset: 0x01dc89af, size: 96 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/inappropriate_conversation/hooks/useInappropriateConversationSafetyToolsWarningForChannel.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/self_mod/inappropriate_conversation/hooks/useInappropriateConversationSafetyToolsWarningForChannel.tsx');
exports.useInappropriateConversationSafetyToolsWarningForChannel = useInappropriateConversationSafetyToolsWarningForChannel;
}
function useInappropriateConversationSafetyToolsWarningForChannel(a0) { // fn#76253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9887:296, offset: 0x01dc8a0f, size: 155 bytes, params: 2, frame: 17
let value = require(9702) /* metro dependency 9702: SelfModInappropriateConversationExperiment */;
value = value.useIsEligibleForInappropriateConversationWarning({location: 'safety-tools-button'});
if (value) {
if ((require(9703) /* metro dependency 9703: useSafetyAlertsSettingOrDefault */).useSafetyAlertsSettingOrDefault()) {
value = (require(9705) /* metro dependency 9705: useInappropriateConversationWarningsForChannel */).useInappropriateConversationWarningsForChannel(a0).filter(function(a0) {
return a0.dismiss_timestamp != null;
});
if (value.length !== 0) {
return value.sort(_fun76255)[0];
function useInappropriateConversationSafetyToolsWarningForChannel(a0) { // fn#76253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9887:296, offset: 0x01dc8a0f, size: 155 bytes, params: 2, frame: 17
let value = SelfModInappropriateConversationExperimentModule;
value = value.useIsEligibleForInappropriateConversationWarning({location: 'safety-tools-button'});
if (value) {
if ((require(9703) /* metro dependency 9703: useSafetyAlertsSettingOrDefault */).useSafetyAlertsSettingOrDefault()) {
value = (require(9705) /* metro dependency 9705: useInappropriateConversationWarningsForChannel */).useInappropriateConversationWarningsForChannel(a0).filter(function(a0) {
return a0.dismiss_timestamp != null;
});
if (value.length !== 0) {
return value.sort(_fun76255)[0];
}
return undefined;
}
return undefined;
}
}
}
function _fun76255(a0, a1) { // fn#76255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9887:653, offset: 0x01dc8abb, size: 50 bytes, params: 3, frame: 4
return a0.type > a1.type || a0.dismiss_timestamp < a1.dismiss_timestamp ? 1 : -1;
}
global.__d(_fun76252, 9701, [9702, 9703, 9705, 2]) /* metro module 9701, dependencies: [9702, 9703, 9705, 2] */;
@@ -1,26 +1,33 @@
/* Metro module 9705; source: modules/self_mod/inappropriate_conversation/hooks/useInappropriateConversationWarningsForChannel.tsx; dependencies: [9706, 566, 2] */
import ChannelSafetyWarningsStore from '../../ChannelSafetyWarningsStore.tsx'; /* Metro dependency 9706 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ChannelSafetyWarningsStoreModule from '../../ChannelSafetyWarningsStore.tsx'; /* Metro dependency 9706 */
function _fun76265(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9891:6, offset: 0x01dc8dd8, size: 133 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelSafetyWarningsStore = importDefault(9706) /* metro dependency 9706: ChannelSafetyWarningsStore */;
const env0_3 = (require(9706) /* metro dependency 9706: ChannelSafetyWarningsStore */).SafetyWarningTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/inappropriate_conversation/hooks/useInappropriateConversationWarningsForChannel.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/self_mod/inappropriate_conversation/hooks/useInappropriateConversationWarningsForChannel.tsx');
exports.useInappropriateConversationWarningsForChannel = useInappropriateConversationWarningsForChannel;
function useInappropriateConversationWarningsForChannel(a0) { // fn#76266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9891:318, offset: 0x01dc8e5d, size: 92 bytes, params: 2, frame: 16
const env0_0 = a0;
const useStateFromStores = FluxModule.useStateFromStores;
return Reflect.apply(useStateFromStores, FluxModule, [[ChannelSafetyWarningsStore], _fun76267,
[a0]]).filter(_fun76268);
function _fun76267() { // fn#76267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9891:416, offset: 0x01dc8eb9, size: 27 bytes, params: 1, frame: 11
return ChannelSafetyWarningsStore.getChannelSafetyWarnings(env0_0);
}
function _fun76268(a0) { // fn#76268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9891:464, offset: 0x01dc8ed4, size: 49 bytes, params: 2, frame: 4
const type = a0.type;
const value = environment.__proto__;
const INAPPROPRIATE_CONVERSATION_TIER_1 = SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_1;
return type === INAPPROPRIATE_CONVERSATION_TIER_1 || a0.type === SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_2;
}
}
}
function useInappropriateConversationWarningsForChannel(a0) { // fn#76266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9891:318, offset: 0x01dc8e5d, size: 92 bytes, params: 2, frame: 16
const env0_0 = a0;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
return Reflect.apply(useStateFromStores, fluxModule, [[ChannelSafetyWarningsStore], _fun76267,
[a0]]).filter(_fun76268);
}
function _fun76268(a0) { // fn#76268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9891:464, offset: 0x01dc8ed4, size: 49 bytes, params: 2, frame: 4
const type = a0.type;
const value = environment.__proto__;
const INAPPROPRIATE_CONVERSATION_TIER_1 = SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_1;
return type === INAPPROPRIATE_CONVERSATION_TIER_1 || a0.type === SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_2;
}
global.__d(_fun76265, 9705, [9706, 566, 2]) /* metro module 9705, dependencies: [9706, 566, 2] */;
@@ -1,43 +1,48 @@
/* Metro module 12155; source: modules/self_mod/inappropriate_conversation/hooks/useInappropriateConversationsTiers.tsx; dependencies: [1878, 9706, 9702, 566, 11294, 2] */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as SelfModInappropriateConversationExperimentModule from '../SelfModInappropriateConversationExperiment.tsx'; /* Metro dependency 9702 */
import * as ChannelSafetyWarningsStoreModule from '../../ChannelSafetyWarningsStore.tsx'; /* Metro dependency 9706 */
import * as UseInappropriateConversationBannerForChannelModule from './useInappropriateConversationBannerForChannel.tsx'; /* Metro dependency 11294 */
function _fun93228(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12341:6, offset: 0x020ab4dd, size: 136 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_3 = (require(9706) /* metro dependency 9706: ChannelSafetyWarningsStore */).SafetyWarningTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/inappropriate_conversation/hooks/useInappropriateConversationsTiers.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/self_mod/inappropriate_conversation/hooks/useInappropriateConversationsTiers.tsx');
exports.useInappropriateConversationsTiers = useInappropriateConversationsTiers;
}
function useInappropriateConversationsTiers(a0) { // fn#93229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12341:294, offset: 0x020ab565, size: 246 bytes, params: 2, frame: 20
var type;
var r0;
const value2 = undefined;
const selfModInappropriateConversationExperimentModule = require(9702) /* metro dependency 9702: SelfModInappropriateConversationExperiment */;
let object2 = {location: 'context-menu-item'};
const value3 = selfModInappropriateConversationExperimentModule.useIsEligibleForInappropriateConversationWarning(object2);
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const value4 = (require(11294) /* metro dependency 11294: useInappropriateConversationBannerForChannel */).useInappropriateConversationBannerForChannel(a0.id,
'context-menu-item');
const value5 = null;
if ((value5 == currentUser ? value2 : currentUser.isStaff()) !== true) {
r0 = value5;
} else if (value3) {
if (a0.isDM()) {
object2 = {};
type = value5 == value4 ? value2 : value4.type;
object2.isTier1 = type === SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_1;
type = value5 == value4 ? value2 : value4.type;
object2.isTier2 = type === SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_2;
r0 = object2;
function useInappropriateConversationsTiers(a0) { // fn#93229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12341:294, offset: 0x020ab565, size: 246 bytes, params: 2, frame: 20
var type;
var r0;
const value2 = undefined;
let object = {location: 'context-menu-item'};
const value3 = SelfModInappropriateConversationExperimentModule.useIsEligibleForInappropriateConversationWarning(object);
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const value4 = (UseInappropriateConversationBannerForChannelModule).useInappropriateConversationBannerForChannel(a0.id,
'context-menu-item');
const value5 = null;
if ((value5 == currentUser ? value2 : currentUser.isStaff()) !== true) {
r0 = value5;
} else if (value3) {
if (a0.isDM()) {
object = {};
type = value5 == value4 ? value2 : value4.type;
object.isTier1 = type === SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_1;
type = value5 == value4 ? value2 : value4.type;
object.isTier2 = type === SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_2;
r0 = object;
} else {
r0 = value5;
}
} else {
r0 = value5;
}
} else {
r0 = value5;
return r0;
}
return r0;
}
global.__d(_fun93228, 12155, [1878, 9706, 9702, 566, 11294,
2]) /* metro module 12155, dependencies: [1878, 9706, 9702, 566, 11294, 2] */;
@@ -1,23 +1,27 @@
/* Metro module 9736; source: modules/self_mod/inappropriate_conversation/hooks/useLastChannelMessage.tsx; dependencies: [4814, 566, 2] */
import MessageStore from '../../../../stores/MessageStore.tsx'; /* Metro dependency 4814 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
function _fun76502(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9922:6, offset: 0x01dd1a21, size: 114 bytes, params: 8, frame: 18
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/inappropriate_conversation/hooks/useLastChannelMessage.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/self_mod/inappropriate_conversation/hooks/useLastChannelMessage.tsx');
exports.useLastChannelMessage = function(a0) {
var env0_0 = a0;
return require(dependencyMap[1]).useStateFromStores([MessageStore], _fun76504);
};
function useLastChannelMessage(a0) { // fn#76503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9922:239, offset: 0x01dd1a93, size: 66 bytes, params: 2, frame: 14
const env0_0 = a0;
return (FluxModule).useStateFromStores([MessageStore], _fun76504);
function _fun76504() { // fn#76504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9922:274, offset: 0x01dd1ad5, size: 54 bytes, params: 1, frame: 13
const value = environment.__proto__;
return MessageStore.getLastNonCurrentUserMessage(env0_0) ?? MessageStore.getLastMessage(env0_0);
}
}
}
function useLastChannelMessage(a0) { // fn#76503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9922:239, offset: 0x01dd1a93, size: 66 bytes, params: 2, frame: 14
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([MessageStore], _fun76504);
}
function _fun76504() { // fn#76504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9922:274, offset: 0x01dd1ad5, size: 54 bytes, params: 1, frame: 13
const value = environment.__proto__;
return MessageStore.getLastNonCurrentUserMessage(env0_0) ?? MessageStore.getLastMessage(env0_0);
}
global.__d(_fun76502, 9736, [4814, 566, 2]) /* metro module 9736, dependencies: [4814, 566, 2] */;
@@ -1,37 +1,43 @@
/* Metro module 9703; source: modules/self_mod/inappropriate_conversation/hooks/useSafetyAlertsSettingOrDefault.tsx; dependencies: [1348, 1878, 566, 8169, 9704, 2] */
import UserSettingsProtoStore from '../../../user_settings/UserSettingsProtoStore.tsx'; /* Metro dependency 1348 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as UseUserIsTeenModule from '../../hooks/useUserIsTeen.tsx'; /* Metro dependency 8169 */
function _fun76259(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9889:6, offset: 0x01dc8ba7, size: 130 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userSettingsProtoStore = importDefault(1348) /* metro dependency 1348: UserSettingsProtoStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/inappropriate_conversation/hooks/useSafetyAlertsSettingOrDefault.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/self_mod/inappropriate_conversation/hooks/useSafetyAlertsSettingOrDefault.tsx');
exports.useSafetyAlertsSettingOrDefault = useSafetyAlertsSettingOrDefault;
}
function useSafetyAlertsSettingOrDefault() { // fn#76260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9889:269, offset: 0x01dc8c29, size: 181 bytes, params: 1, frame: 17
var r1;
var r0;
const currentUser = UserStore.getCurrentUser();
const value3 = undefined;
const value = (FluxModule).useStateFromStores([UserSettingsProtoStore],
_fun76261);
const value4 = (UseUserIsTeenModule).useUserIsTeen();
const r3 = value4 ? !(require(9704) /* metro dependency 9704: InappropriateConversationsDefaultOn */).useIsEligibleForInappropriateConversationDefaultOn({location: 'useSafetyAlertsSettingOrDefault'}) : !value4;
if (r3) {
r1 = value4 || (currentUser == null ? value3 : currentUser.isStaff()) === true;
r1 = r1 && value;
r0 = r1;
} else {
r0 = !r3;
}
return r0;
function _fun76261() { // fn#76261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9889:333, offset: 0x01dc8cde, size: 62 bytes, params: 1, frame: 5
const value = environment.__proto__;
const privacy = UserSettingsProtoStore.settings.privacy;
const r1 = privacy == null || privacy.inappropriateConversationWarnings == null ? undefined : privacy.inappropriateConversationWarnings.value;
return r1 == null || r1;
}
function useSafetyAlertsSettingOrDefault() { // fn#76260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9889:269, offset: 0x01dc8c29, size: 181 bytes, params: 1, frame: 17
var r1;
var r0;
const currentUser = UserStore.getCurrentUser();
const value3 = undefined;
const value = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserSettingsProtoStore],
_fun76261);
const value4 = (require(8169) /* metro dependency 8169: useUserIsTeen */).useUserIsTeen();
const r3 = value4 ? !(require(9704) /* metro dependency 9704: InappropriateConversationsDefaultOn */).useIsEligibleForInappropriateConversationDefaultOn({location: 'useSafetyAlertsSettingOrDefault'}) : !value4;
if (r3) {
r1 = value4 || (currentUser == null ? value3 : currentUser.isStaff()) === true;
r1 = r1 && value;
r0 = r1;
} else {
r0 = !r3;
}
return r0;
}
function _fun76261() { // fn#76261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9889:333, offset: 0x01dc8cde, size: 62 bytes, params: 1, frame: 5
const value = environment.__proto__;
const privacy = UserSettingsProtoStore.settings.privacy;
const r1 = privacy == null || privacy.inappropriateConversationWarnings == null ? undefined : privacy.inappropriateConversationWarnings.value;
return r1 == null || r1;
}
global.__d(_fun76259, 9703, [1348, 1878, 566, 8169, 9704,
2]) /* metro module 9703, dependencies: [1348, 1878, 566, 8169, 9704, 2] */;
@@ -1,20 +1,23 @@
/* Metro module 9729; source: modules/self_mod/inappropriate_conversation/hooks/useShouldShowInitialSafetyToolsButtonTooltip.tsx; dependencies: [9706, 9701, 566, 2] */
import ChannelSafetyWarningsStore from '../../ChannelSafetyWarningsStore.tsx'; /* Metro dependency 9706 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun76445(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9915:6, offset: 0x01dcf8bb, size: 114 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelSafetyWarningsStore = importDefault(9706) /* metro dependency 9706: ChannelSafetyWarningsStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/inappropriate_conversation/hooks/useShouldShowInitialSafetyToolsButtonTooltip.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/self_mod/inappropriate_conversation/hooks/useShouldShowInitialSafetyToolsButtonTooltip.tsx');
exports.useShouldShowInitialSafetyToolsButtonTooltip = useShouldShowInitialSafetyToolsButtonTooltip;
function useShouldShowInitialSafetyToolsButtonTooltip(a0) { // fn#76446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9915:285, offset: 0x01dcf92d, size: 101 bytes, params: 2, frame: 17
const env0_0 = a0;
return (require(9701) /* metro dependency 9701: useInappropriateConversationSafetyToolsWarningForChannel */).useInappropriateConversationSafetyToolsWarningForChannel(a0) != null && !(require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelSafetyWarningsStore],
_fun76447);
function _fun76447() { // fn#76447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9915:450, offset: 0x01dcf992, size: 29 bytes, params: 1, frame: 11
return ChannelSafetyWarningsStore.hasShownInitialTooltipForChannel(env0_0);
}
}
}
function useShouldShowInitialSafetyToolsButtonTooltip(a0) { // fn#76446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9915:285, offset: 0x01dcf92d, size: 101 bytes, params: 2, frame: 17
const env0_0 = a0;
return (require(9701) /* metro dependency 9701: useInappropriateConversationSafetyToolsWarningForChannel */).useInappropriateConversationSafetyToolsWarningForChannel(a0) != null && !(require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelSafetyWarningsStore],
_fun76447);
}
function _fun76447() { // fn#76447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9915:450, offset: 0x01dcf992, size: 29 bytes, params: 1, frame: 11
return ChannelSafetyWarningsStore.hasShownInitialTooltipForChannel(env0_0);
}
global.__d(_fun76445, 9729, [9706, 9701, 566, 2]) /* metro module 9729, dependencies: [9706, 9701, 566, 2] */;
@@ -1,90 +1,101 @@
/* Metro module 9728; source: modules/self_mod/inappropriate_conversation/hooks/useShouldShowSafetyToolsButtonTooltipForChannel.tsx; dependencies: [9706, 672, 9701, 9705, 9729, 9730, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UseInappropriateConversationSafetyToolsWarningForChannelModule from './useInappropriateConversationSafetyToolsWarningForChannel.tsx'; /* Metro dependency 9701 */
import * as UseInappropriateConversationWarningsForChannelModule from './useInappropriateConversationWarningsForChannel.tsx'; /* Metro dependency 9705 */
import * as ChannelSafetyWarningsStoreModule from '../../ChannelSafetyWarningsStore.tsx'; /* Metro dependency 9706 */
function _fun76437(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76437, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9914:6, offset: 0x01dcf609, size: 184 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(9706) /* metro dependency 9706: ChannelSafetyWarningsStore */).SafetyWarningTypes;
let Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
let HOUR = Millis.HOUR;
const env0_3 = 1 * HOUR;
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
HOUR = Millis.HOUR;
const env0_4 = 12 * HOUR;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/inappropriate_conversation/hooks/useShouldShowSafetyToolsButtonTooltipForChannel.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/self_mod/inappropriate_conversation/hooks/useShouldShowSafetyToolsButtonTooltipForChannel.tsx');
exports.useSafetyToolsButtonTooltipForChannel = useSafetyToolsButtonTooltipForChannel;
}
function useSafetyToolsButtonTooltipForChannel(a0) { // fn#76438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9914:350, offset: 0x01dcf6c1, size: 399 bytes, params: 2, frame: 19
var r6;
var r1;
var Date;
var prototype;
var value10;
var date;
var time;
var value13;
var value14;
var last;
var value;
const value2 = (require(9701) /* metro dependency 9701: useInappropriateConversationSafetyToolsWarningForChannel */).useInappropriateConversationSafetyToolsWarningForChannel(a0);
const value3 = (require(9705) /* metro dependency 9705: useInappropriateConversationWarningsForChannel */).useInappropriateConversationWarningsForChannel(a0);
if (value2 != null) {
if ((require(9729) /* metro dependency 9729: useShouldShowInitialSafetyToolsButtonTooltip */).useShouldShowInitialSafetyToolsButtonTooltip(a0)) {
return undefined;
}
var moduleValue4 = require(9730) /* metro dependency 9730: InappropriateConversationUtils */;
if (moduleValue4.shouldShowTakeoverForWarnings(value3)) {
return undefined;
}
var value5 = value3.some(function({type}) {
return type === SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_1;
});
var value7 = value3.filter(function(a0) {
return a0.dismiss_timestamp != null;
}).sort(function(a0, {dismiss_timestamp}) {
return dismiss_timestamp < a0.dismiss_timestamp ? -1 : 1;
});
if (value7.length < 1) {
return undefined;
}
var dismiss_timestamp = value7[0].dismiss_timestamp;
r6 = value5 !== undefined ? value5 : false;
if (dismiss_timestamp == null) {
r1 = true;
} else {
Date = global.Date;
prototype = Date.prototype;
value10 = Object.create(prototype, {constructor: {value: Date}});
date = new Date(dismiss_timestamp);
time = (date instanceof Object ? date : value10).getTime();
r6 = r6 ? env0_3 : env0_4;
value = time + r6;
Date = global.Date;
prototype = Date.prototype;
value13 = Object.create(prototype, {constructor: {value: Date}});
date = new Date();
value14 = date instanceof Object ? date : value13;
value = value14.getTime() >= value;
r1 = value;
}
if (r1) {
value = value3.filter(function(a0) {
return a0.dismiss_timestamp == null;
function useSafetyToolsButtonTooltipForChannel(a0) { // fn#76438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9914:350, offset: 0x01dcf6c1, size: 399 bytes, params: 2, frame: 19
var r6;
var r1;
var Date;
var prototype;
var value10;
var date;
var time;
var value13;
var value14;
var last;
var value;
const value2 = (UseInappropriateConversationSafetyToolsWarningForChannelModule).useInappropriateConversationSafetyToolsWarningForChannel(a0);
const value3 = (UseInappropriateConversationWarningsForChannelModule).useInappropriateConversationWarningsForChannel(a0);
if (value2 != null) {
if ((require(9729) /* metro dependency 9729: useShouldShowInitialSafetyToolsButtonTooltip */).useShouldShowInitialSafetyToolsButtonTooltip(a0)) {
return undefined;
}
var moduleValue4 = require(9730) /* metro dependency 9730: InappropriateConversationUtils */;
if (moduleValue4.shouldShowTakeoverForWarnings(value3)) {
return undefined;
}
var value5 = value3.some(function({type}) {
return type === SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_1;
});
last = value.findLast(_fun76443);
if (last != null) {
r1 = last;
var value7 = value3.filter(function(a0) {
return a0.dismiss_timestamp != null;
}).sort(function(a0, {dismiss_timestamp}) {
return dismiss_timestamp < a0.dismiss_timestamp ? -1 : 1;
});
if (value7.length < 1) {
return undefined;
}
var dismiss_timestamp = value7[0].dismiss_timestamp;
r6 = value5 !== undefined ? value5 : false;
if (dismiss_timestamp == null) {
r1 = true;
} else {
value = value.findLast(_fun76444);
Date = global.Date;
prototype = Date.prototype;
value10 = Object.create(prototype, {constructor: {value: Date}});
date = new Date(dismiss_timestamp);
time = (date instanceof Object ? date : value10).getTime();
r6 = r6 ? env0_3 : env0_4;
value = time + r6;
Date = global.Date;
prototype = Date.prototype;
value13 = Object.create(prototype, {constructor: {value: Date}});
date = new Date();
value14 = date instanceof Object ? date : value13;
value = value14.getTime() >= value;
r1 = value;
}
return r1;
if (r1) {
value = value3.filter(function(a0) {
return a0.dismiss_timestamp == null;
});
last = value.findLast(_fun76443);
if (last != null) {
r1 = last;
} else {
value = value.findLast(_fun76444);
r1 = value;
}
return r1;
}
}
function _fun76443({type}) { // fn#76443, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9914:1064, offset: 0x01dcf850, size: 27 bytes, params: 2, frame: 2
const INAPPROPRIATE_CONVERSATION_TIER_1 = SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_1;
return type === INAPPROPRIATE_CONVERSATION_TIER_1;
}
function _fun76444({type}) { // fn#76444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9914:1129, offset: 0x01dcf8a0, size: 27 bytes, params: 2, frame: 2
const INAPPROPRIATE_CONVERSATION_TIER_2 = SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_2;
return type === INAPPROPRIATE_CONVERSATION_TIER_2;
}
}
}
function _fun76444({type}) { // fn#76444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9914:1129, offset: 0x01dcf8a0, size: 27 bytes, params: 2, frame: 2
const INAPPROPRIATE_CONVERSATION_TIER_2 = SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_2;
return type === INAPPROPRIATE_CONVERSATION_TIER_2;
}
global.__d(_fun76437, 9728, [9706, 672, 9701, 9705, 9729, 9730,
2]) /* metro module 9728, dependencies: [9706, 672, 9701, 9705, 9729, 9730, 2] */;
@@ -1,59 +1,65 @@
/* Metro module 9744; source: modules/self_mod/inappropriate_conversation/native/InappropriateConversationBlockAndReportAlert.tsx; dependencies: [31, 33, 9731, 9745, 1244, 2] */
import ConfirmBlockUserAlert from '../../shared/native/ConfirmBlockUserAlert.tsx'; /* Metro dependency 9745 */
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 JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as SafetyWarningUtilsModule from '../../shared/SafetyWarningUtils.tsx'; /* Metro dependency 9731 */
function _fun76535(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9930:6, offset: 0x01dd29cf, size: 150 bytes, params: 8, frame: 19
const env0_0 = require;
const closure = InappropriateConversationBlockAndReportAlert;
const InappropriateConversationBlockAndReportAlert2 = InappropriateConversationBlockAndReportAlert;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/inappropriate_conversation/native/InappropriateConversationBlockAndReportAlert.tsx');
exports.default = closure;
exports.InappropriateConversationBlockAndReportAlert = closure;
}
(FileImportTrackerModule).fileFinishedImporting('modules/self_mod/inappropriate_conversation/native/InappropriateConversationBlockAndReportAlert.tsx');
exports.default = InappropriateConversationBlockAndReportAlert2;
exports.InappropriateConversationBlockAndReportAlert = InappropriateConversationBlockAndReportAlert2;
function InappropriateConversationBlockAndReportAlert({channelId, warningId, warningType, senderId, analyticsBlockContext, analyticsBlockAndReportContext, analyticsCancelContext, onClose, onDismiss}) { // fn#76536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9930:120, offset: 0x01dd2a65, size: 385 bytes, params: 2, frame: 24
const senderId2 = senderId;
const value2 = senderId2.useCallback(_fun76537, [channelId, warningId, senderId, warningType]);
const value3 = senderId2.useCallback(_fun76538, [value2, analyticsCancelContext]);
const value4 = senderId2.useCallback(_fun76539, [onDismiss, value2, analyticsBlockContext]);
const value5 = senderId2.useCallback(_fun76540, [onDismiss, value2, analyticsBlockAndReportContext]);
const intl = (IndexNativeModule).intl;
return (
<ConfirmBlockUserAlert
userId={senderId}
channelId={channelId}
onClose={onClose}
onCancel={value3}
onBlock={value4}
onBlockAndReport={value5}
blockButtonVariant="primary"
description={intl.string((IndexNativeModule).t['5NhTvu'])}
/>
);
function _fun76537(a0) { // fn#76537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9930:351, offset: 0x01dd2be6, size: 86 bytes, params: 2, frame: 14
const value = environment.__proto__;
(SafetyWarningUtilsModule).trackCtaEvent({channelId: channelId,
warningId: warningId, senderId: senderId, warningType: warningType, cta: a0});
}
function InappropriateConversationBlockAndReportAlert({channelId, warningId, warningType, senderId, analyticsBlockContext, analyticsBlockAndReportContext, analyticsCancelContext, onClose, onDismiss}) { // fn#76536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9930:120, offset: 0x01dd2a65, size: 385 bytes, params: 2, frame: 24
const env0_3 = senderId;
const value2 = env0_3.useCallback(_fun76537, [channelId, warningId, senderId, warningType]);
const value3 = env0_3.useCallback(_fun76538, [value2, analyticsCancelContext]);
const value4 = env0_3.useCallback(_fun76539, [onDismiss, value2, analyticsBlockContext]);
const value5 = env0_3.useCallback(_fun76540, [onDismiss, value2, analyticsBlockAndReportContext]);
const ConfirmBlockUserAlert = importDefault(9745) /* metro dependency 9745: ConfirmBlockUserAlert */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<ConfirmBlockUserAlert
userId={senderId}
channelId={channelId}
onClose={onClose}
onCancel={value3}
onBlock={value4}
onBlockAndReport={value5}
blockButtonVariant="primary"
description={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5NhTvu'])}
/>
);
}
function _fun76538() { // fn#76538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9930:465, offset: 0x01dd2c3c, size: 20 bytes, params: 1, frame: 11
env0_8(analyticsCancelContext);
}
function _fun76537(a0) { // fn#76537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9930:351, offset: 0x01dd2be6, size: 86 bytes, params: 2, frame: 14
const value = environment.__proto__;
(require(9731) /* metro dependency 9731: SafetyWarningUtils */).trackCtaEvent({channelId: channelId,
warningId: warningId, senderId: senderId, warningType: warningType, cta: a0});
}
function _fun76539() { // fn#76539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9930:501, offset: 0x01dd2c50, size: 40 bytes, params: 1, frame: 11
if (onDismiss != null) {
onDismiss();
}
env0_8(analyticsBlockContext);
}
function _fun76538() { // fn#76538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9930:465, offset: 0x01dd2c3c, size: 20 bytes, params: 1, frame: 11
env0_8(analyticsCancelContext);
}
function _fun76540() { // fn#76540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9930:552, offset: 0x01dd2c78, size: 40 bytes, params: 1, frame: 11
if (onDismiss != null) {
onDismiss();
}
env0_8(analyticsBlockAndReportContext);
}
function _fun76539() { // fn#76539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9930:501, offset: 0x01dd2c50, size: 40 bytes, params: 1, frame: 11
if (onDismiss != null) {
onDismiss();
}
env0_8(analyticsBlockContext);
}
function _fun76540() { // fn#76540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9930:552, offset: 0x01dd2c78, size: 40 bytes, params: 1, frame: 11
if (onDismiss != null) {
onDismiss();
}
env0_8(analyticsBlockAndReportContext);
}
global.__d(_fun76535, 9744, [31, 33, 9731, 9745, 1244,
2]) /* metro module 9744, dependencies: [31, 33, 9731, 9745, 1244, 2] */;
@@ -1,177 +1,196 @@
/* Metro module 9727; source: modules/self_mod/inappropriate_conversation/native/SafetyToolsButton.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 9728, 9729, 1244, 9731, 4594, 9732, 9733, 8544, 9697, 8035, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseMountEffect from '../../../../hooks/useMountEffect.tsx'; /* Metro dependency 4594 */
import IconActionButton from '../../../main_tabs_v2/native/shared_components/IconActionButton.tsx'; /* Metro dependency 9697 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as UseTooltipNativeModule from '../../../../design/components/Tooltip/native/useTooltip.native.tsx'; /* Metro dependency 8544 */
import * as UseShouldShowSafetyToolsButtonTooltipForChannelModule from '../hooks/useShouldShowSafetyToolsButtonTooltipForChannel.tsx'; /* Metro dependency 9728 */
import * as UseShouldShowInitialSafetyToolsButtonTooltipModule from '../hooks/useShouldShowInitialSafetyToolsButtonTooltip.tsx'; /* Metro dependency 9729 */
import * as SafetyWarningUtilsModule from '../../shared/SafetyWarningUtils.tsx'; /* Metro dependency 9731 */
function _fun76424(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9913:6, offset: 0x01dceeec, size: 241 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
const env0_7 = Reflect.apply(createStyles, createStylesModule,
const createStyles = CreateStylesModule.createStyles;
const BACKGROUND_BRAND = (Native).colors.BACKGROUND_BRAND;
const env0_7 = Reflect.apply(createStyles, CreateStylesModule,
[{safetyToolsButton: {backgroundColor: BACKGROUND_BRAND}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/inappropriate_conversation/native/SafetyToolsButton.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/self_mod/inappropriate_conversation/native/SafetyToolsButton.tsx');
exports.SafetyToolsButton = SafetyToolsButton;
}
function SafetyToolsButton({channelId, recipientId, warningId, warningType}) { // fn#76425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9913:366, offset: 0x01dcefdd, size: 728 bytes, params: 2, frame: 30
const env0_3 = warningType;
const styles = useStyles();
const value2 = (require(9728) /* metro dependency 9728: useShouldShowSafetyToolsButtonTooltipForChannel */).useSafetyToolsButtonTooltipForChannel(channelId);
const env0_4 = value2;
const value3 = (require(9729) /* metro dependency 9729: useShouldShowInitialSafetyToolsButtonTooltip */).useShouldShowInitialSafetyToolsButtonTooltip(channelId);
const binding = env0_4;
let useState = binding.useState;
const value4 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_3;
const value5 = binding2(value4, 2);
const property = value5[0];
const env0_7 = value5[1];
const value6 = binding.useCallback(_fun76426, [value3, value2]);
useState = binding.useState;
const value7 = binding2(Reflect.apply(useState, binding, [value6()]), 2);
const property2 = value7[0];
const env0_10 = value7[1];
let useMemo = binding.useMemo;
const value8 = Reflect.apply(useMemo, binding, [_fun76427, [property, value2, value3]]);
const value9 = binding.useCallback(_fun76428, [channelId, warningId, warningType, recipientId, value2]);
binding.useEffect(function() {
global.setTimeout(_fun76430, 5);
}, []);
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(_fun76431);
binding.useEffect(_fun76432, [value6, value8, value3, value9]);
const value10 = binding.useCallback(_fun76433, [channelId, value2, value3]);
const value11 = binding.useCallback(_fun76434, [recipientId, value10, channelId, warningId, warningType, value2]);
const value12 = binding.useRef(null);
useMemo = binding.useMemo;
(require(8544) /* metro dependency 8544: useTooltipNative */).useTooltip(value12, Reflect.apply(useMemo, binding,
[_fun76435, [value10, value8, property2]]));
const iconActionButton = importDefault(9697) /* metro dependency 9697: IconActionButton */;
const object = {noMargin: true};
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
object.color = WHITE;
object.source = importDefault(8035) /* metro dependency 8035 */;
object.onPress = value11;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rpc2qv);
object.style = styles.safetyToolsButton;
return (
<View ref={value12}>
{((Component) => <Component {...object} />)(iconActionButton)}
</View>
);
}
function _fun76426() { // fn#76426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9913:624, offset: 0x01dcf2b5, size: 151 bytes, params: 1, frame: 15
var r0;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value;
if (env0_5) {
value = environment.__proto__;
value = intl.string(t['16QyDv']);
r0 = value;
} else {
value = null;
if (value != env0_4) {
value = environment.__proto__;
value = intl.string(t.kCN9i0);
r0 = value;
} else {
r0 = value;
function SafetyToolsButton({channelId, recipientId, warningId, warningType}) { // fn#76425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9913:366, offset: 0x01dcefdd, size: 728 bytes, params: 2, frame: 30
const warningType2 = warningType;
const styles = useStyles();
const value2 = (UseShouldShowSafetyToolsButtonTooltipForChannelModule).useSafetyToolsButtonTooltipForChannel(channelId);
const env0_4 = value2;
const value3 = (UseShouldShowInitialSafetyToolsButtonTooltipModule).useShouldShowInitialSafetyToolsButtonTooltip(channelId);
const binding = env0_4;
let useState = binding.useState;
const value4 = Reflect.apply(useState, binding, [false]);
const binding2 = warningType2;
const value5 = binding2(value4, 2);
const property = value5[0];
const env0_7 = value5[1];
const value6 = binding.useCallback(_fun76426, [value3, value2]);
useState = binding.useState;
const value7 = binding2(Reflect.apply(useState, binding, [value6()]), 2);
const property2 = value7[0];
const env0_10 = value7[1];
let useMemo = binding.useMemo;
const value8 = Reflect.apply(useMemo, binding, [_fun76427, [property, value2, value3]]);
const value9 = binding.useCallback(_fun76428, [channelId, warningId, warningType, recipientId, value2]);
binding.useEffect(function() {
global.setTimeout(_fun76430, 5);
}, []);
(UseMountEffect)(_fun76431);
binding.useEffect(_fun76432, [value6, value8, value3, value9]);
const value10 = binding.useCallback(_fun76433, [channelId, value2, value3]);
const value11 = binding.useCallback(_fun76434, [recipientId, value10, channelId, warningId, warningType, value2]);
const value12 = binding.useRef(null);
useMemo = binding.useMemo;
(UseTooltipNativeModule).useTooltip(value12, Reflect.apply(useMemo, binding,
[_fun76435, [value10, value8, property2]]));
const object2 = {noMargin: true};
const WHITE = (Native).unsafe_rawColors.WHITE;
object2.color = WHITE;
object2.source = importDefault(8035) /* metro dependency 8035 */;
object2.onPress = value11;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rpc2qv);
object2.style = styles.safetyToolsButton;
return (
<View ref={value12}>
{((Component) => <Component {...object2} />)(IconActionButton)}
</View>
);
function _fun76426() { // fn#76426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9913:624, offset: 0x01dcf2b5, size: 151 bytes, params: 1, frame: 15
var r0;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var value;
if (ReactNativeModule.View) {
value = environment.__proto__;
value = intl.string(t['16QyDv']);
r0 = value;
} else {
value = null;
if (value != env0_4) {
value = environment.__proto__;
value = intl.string(t.kCN9i0);
r0 = value;
} else {
r0 = value;
}
}
return r0;
}
function _fun76427() { // fn#76427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9913:784, offset: 0x01dcf34c, size: 32 bytes, params: 1, frame: 4
return JsxRuntimeModule.jsx && (env0_4 != null || ReactNativeModule.View);
}
function _fun76428(a0) { // fn#76428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9913:831, offset: 0x01dcf36c, size: 101 bytes, params: 2, frame: 14
const value = environment.__proto__;
(SafetyWarningUtilsModule).trackNamedViewEvent({channelId: channelId,
warningId: warningId, warningType: warningType, senderId: recipientId, viewName: a0,
isNudgeWarning: env0_4 != null});
}
function _fun76429() { // fn#76429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9913:977, offset: 0x01dcf3d1, size: 30 bytes, params: 1, frame: 13
global.setTimeout(_fun76430, 5);
function _fun76430() { // fn#76430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9913:994, offset: 0x01dcf3ef, size: 18 bytes, params: 1, frame: 11
env1_7(true);
}
}
function _fun76431() { // fn#76431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9913:1026, offset: 0x01dcf401, size: 51 bytes, params: 1, frame: 12
const binding = env0_12;
const ViewNameTypes = (SafetyWarningUtilsModule).ViewNameTypes;
const SAFETY_TOOLS_BUTTON = ViewNameTypes.SAFETY_TOOLS_BUTTON;
binding(SAFETY_TOOLS_BUTTON);
}
function _fun76432() { // fn#76432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9913:1092, offset: 0x01dcf434, size: 93 bytes, params: 1, frame: 13
var value3;
let binding = env0_11;
if (binding && !ReactNativeModule.View) {
binding = env0_12;
value3 = environment.__proto__;
binding((require(9731) /* metro dependency 9731: SafetyWarningUtils */).ViewNameTypes.SAFETY_TOOLS_NUDGE_TOOLTIP);
}
const value4 = env0_8();
if (value4 != null) {
env0_10(value4);
}
}
function _fun76433() { // fn#76433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9913:1214, offset: 0x01dcf491, size: 122 bytes, params: 1, frame: 14
var value2;
var moduleValue;
var value3;
var moduleValue2;
if (ReactNativeModule.View) {
value2 = environment.__proto__;
moduleValue = require(9732) /* metro dependency 9732: ChannelSafetyWarningsActionCreators */;
moduleValue.acknowledgeChannelSafetyWarningTooltip(channelId);
}
if (env0_4 != null) {
value3 = environment.__proto__;
moduleValue2 = require(9732) /* metro dependency 9732: ChannelSafetyWarningsActionCreators */;
moduleValue2.dismissChannelSafetyWarnings(channelId, [env0_4.id]);
}
}
function _fun76434() { // fn#76434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9913:1358, offset: 0x01dcf50b, size: 177 bytes, params: 1, frame: 24
var value2;
var moduleValue;
var openSafetyToolsActionSheet;
var channelIdBinding;
var warningIdBinding;
var warningTypeBinding;
var moduleValue2;
var trackCtaEvent;
var object;
let recipientIdBinding = recipientId;
if (recipientIdBinding != null) {
env0_13();
value2 = environment.__proto__;
moduleValue = require(9733) /* metro dependency 9733: SafetyToolsActionCreatorsNative */;
openSafetyToolsActionSheet = moduleValue.openSafetyToolsActionSheet;
channelIdBinding = channelId;
recipientIdBinding = recipientId;
warningIdBinding = warningId;
warningTypeBinding = warningType;
Reflect.apply(openSafetyToolsActionSheet, moduleValue, [channelIdBinding, recipientIdBinding, warningIdBinding,
warningTypeBinding]);
moduleValue2 = require(9731) /* metro dependency 9731: SafetyWarningUtils */;
trackCtaEvent = moduleValue2.trackCtaEvent;
object = {channelId: channelIdBinding, senderId: recipientIdBinding, warningId: warningIdBinding,
warningType: warningTypeBinding};
object.cta = (require(9731) /* metro dependency 9731: SafetyWarningUtils */).CtaEventTypes.USER_SAFETY_TOOLS_BUTTON_CLICK;
object.isNudgeWarning = env0_4 != null;
Reflect.apply(trackCtaEvent, moduleValue2, [object]);
}
}
function _fun76435() { // fn#76435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9913:1624, offset: 0x01dcf5bc, size: 62 bytes, params: 1, frame: 4
return {position: 'bottom', label: env0_9 ?? '', visible: env0_11, onPress: onPress_76436};
function onPress_76436() { // fn#76436, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9913:1685, offset: 0x01dcf5fa, size: 15 bytes, params: 1, frame: 9
return env1_13();
}
}
}
return r0;
}
function _fun76427() { // fn#76427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9913:784, offset: 0x01dcf34c, size: 32 bytes, params: 1, frame: 4
return env0_6 && (env0_4 != null || env0_5);
}
function _fun76428(a0) { // fn#76428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9913:831, offset: 0x01dcf36c, size: 101 bytes, params: 2, frame: 14
const value = environment.__proto__;
(require(9731) /* metro dependency 9731: SafetyWarningUtils */).trackNamedViewEvent({channelId: channelId,
warningId: warningId, warningType: warningType, senderId: recipientId, viewName: a0,
isNudgeWarning: env0_4 != null});
}
function _fun76429() { // fn#76429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9913:977, offset: 0x01dcf3d1, size: 30 bytes, params: 1, frame: 13
global.setTimeout(_fun76430, 5);
}
function _fun76431() { // fn#76431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9913:1026, offset: 0x01dcf401, size: 51 bytes, params: 1, frame: 12
const binding = env0_12;
const ViewNameTypes = (require(9731) /* metro dependency 9731: SafetyWarningUtils */).ViewNameTypes;
const SAFETY_TOOLS_BUTTON = ViewNameTypes.SAFETY_TOOLS_BUTTON;
binding(SAFETY_TOOLS_BUTTON);
}
function _fun76432() { // fn#76432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9913:1092, offset: 0x01dcf434, size: 93 bytes, params: 1, frame: 13
var value3;
let binding = env0_11;
if (binding && !env0_5) {
binding = env0_12;
value3 = environment.__proto__;
binding((require(9731) /* metro dependency 9731: SafetyWarningUtils */).ViewNameTypes.SAFETY_TOOLS_NUDGE_TOOLTIP);
}
const value4 = env0_8();
if (value4 != null) {
env0_10(value4);
}
}
function _fun76433() { // fn#76433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9913:1214, offset: 0x01dcf491, size: 122 bytes, params: 1, frame: 14
var value2;
var moduleValue;
var value3;
var moduleValue2;
if (env0_5) {
value2 = environment.__proto__;
moduleValue = require(9732) /* metro dependency 9732: ChannelSafetyWarningsActionCreators */;
moduleValue.acknowledgeChannelSafetyWarningTooltip(channelId);
}
if (env0_4 != null) {
value3 = environment.__proto__;
moduleValue2 = require(9732) /* metro dependency 9732: ChannelSafetyWarningsActionCreators */;
moduleValue2.dismissChannelSafetyWarnings(channelId, [env0_4.id]);
}
}
function _fun76434() { // fn#76434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9913:1358, offset: 0x01dcf50b, size: 177 bytes, params: 1, frame: 24
var value2;
var moduleValue;
var openSafetyToolsActionSheet;
var channelIdBinding;
var warningIdBinding;
var warningTypeBinding;
var moduleValue2;
var trackCtaEvent;
var object2;
let recipientIdBinding = recipientId;
if (recipientIdBinding != null) {
env0_13();
value2 = environment.__proto__;
moduleValue = require(9733) /* metro dependency 9733: SafetyToolsActionCreatorsNative */;
openSafetyToolsActionSheet = moduleValue.openSafetyToolsActionSheet;
channelIdBinding = channelId;
recipientIdBinding = recipientId;
warningIdBinding = warningId;
warningTypeBinding = warningType;
Reflect.apply(openSafetyToolsActionSheet, moduleValue, [channelIdBinding, recipientIdBinding, warningIdBinding,
warningTypeBinding]);
moduleValue2 = require(9731) /* metro dependency 9731: SafetyWarningUtils */;
trackCtaEvent = moduleValue2.trackCtaEvent;
object2 = {channelId: channelIdBinding, senderId: recipientIdBinding, warningId: warningIdBinding,
warningType: warningTypeBinding};
object2.cta = (require(9731) /* metro dependency 9731: SafetyWarningUtils */).CtaEventTypes.USER_SAFETY_TOOLS_BUTTON_CLICK;
object2.isNudgeWarning = env0_4 != null;
Reflect.apply(trackCtaEvent, moduleValue2, [object2]);
}
}
function _fun76435() { // fn#76435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9913:1624, offset: 0x01dcf5bc, size: 62 bytes, params: 1, frame: 4
return {position: 'bottom', label: env0_9 ?? '', visible: env0_11, onPress: onPress_76436};
}
global.__d(_fun76424, 9727, [57, 31, 27, 33, 4501, 697, 9728, 9729, 1244, 9731, 4594, 9732, 9733, 8544, 9697, 8035,
2]) /* metro module 9727, dependencies: [57, 31, 27, 33, 4501, 697, 9728, 9729, 1244, 9731, 4594, 9732, 9733, 8544, 9697, 8035, 2] */;
@@ -1,184 +1,224 @@
/* Metro module 9746; source: modules/self_mod/inappropriate_conversation/native/VibingWumpusModal.tsx; dependencies: [57, 31, 27, 4502, 9734, 9747, 661, 33, 4501, 697, 632, 9748, 683, 9749, 6760, 9750, 4573, 1244, 4578, 5080, 9376, 9554, 5280, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import AnalyticsUtils from '../../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import AccessibilityStore from '../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import Module09749 from '../../../../by-id/module-09749.js'; /* Metro dependency 9749 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as NavigatorNativeModule from '../../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as ConstantsModule2 from '../../Constants.tsx'; /* Metro dependency 9734 */
import * as InappropriateConversationsActionCreatorsModule from '../InappropriateConversationsActionCreators.tsx'; /* Metro dependency 9748 */
function _fun76550(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9932:6, offset: 0x01dd3362, size: 574 bytes, params: 8, frame: 24
var object4;
const env0_0 = require;
const closure = VibingWumpusScreen;
const VibingWumpusScreen2 = VibingWumpusScreen;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.Image;
const env0_6 = value.View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const env0_8 = (require(9734) /* metro dependency 9734: Constants */).VIBING_WUMPUS_MODAL_KEY;
value = require(9747) /* metro dependency 9747: InappropriateConversationsConstants */;
const env0_9 = value.VibingWumpusAction;
const env0_10 = value.VibingWumpusSource;
const env0_11 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
value = require(33) /* metro dependency 33 */;
const env0_12 = value.jsx;
const env0_13 = value.jsxs;
const env0_14 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object5 = {'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center', 'padding': null,
object = {};
const object2 = {'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center', 'padding': null,
'gap': null, 'height': '100%'};
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object5.padding = PX_32;
object2.padding = PX_32;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.gap = PX_16;
object4.container = object5;
const object6 = {};
object2.gap = PX_16;
object.container = object2;
const object3 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.marginBottom = PX_16;
object3.marginBottom = PX_16;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object6.gap = PX_4;
object4.warningText = object6;
object3.gap = PX_4;
object.warningText = object3;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.ctaContainer = {'display': 'flex', 'alignItems': 'center', 'alignSelf': 'stretch', gap: PX_16};
object4.takeoverHeader = {textAlign: 'center'};
object4.takeoverDescription = {textAlign: 'center'};
object4.wumpus = {height: 187};
object4.rings = {'position': 'absolute', 'width': '100%', 'height': 440, 'top': 120};
const env0_15 = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/inappropriate_conversation/native/VibingWumpusModal.tsx');
object.ctaContainer = {'display': 'flex', 'alignItems': 'center', 'alignSelf': 'stretch', gap: PX_16};
object.takeoverHeader = {textAlign: 'center'};
object.takeoverDescription = {textAlign: 'center'};
object.wumpus = {height: 187};
object.rings = {'position': 'absolute', 'width': '100%', 'height': 440, 'top': 120};
const env0_15 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/self_mod/inappropriate_conversation/native/VibingWumpusModal.tsx');
exports.default = VibingWumpusModal;
exports.VibingWumpusScreen = closure;
}
function VibingWumpusScreen() { // fn#76551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9932:794, offset: 0x01dd35a0, size: 1006 bytes, params: 1, frame: 35
const value2 = undefined;
const styles = useStyles();
const [property, env0_1] = env0_3(env0_4.useState(false), 2);
const value5 = env0_4.useRef(null);
const useReducedMotion = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
env0_4.useEffect(_fun76553, []);
const jsxRuntimeEnv0_14Binding = jsxRuntimeEnv0_14;
const image = <Image source={importDefault(9749) /* metro dependency 9749 */} style={styles.rings} />;
const items2 = [((Component) => <Component source={require(9750) /* metro dependency 9750 */} ref={value5} autoPlay={!useReducedMotion} loop style={styles.wumpus} progress={useReducedMotion ? 0.8 : value2} />)(importDefault(6760) /* metro dependency 6760: LottieAnimationView */)];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const L4ifkZ = t.L4ifkZ;
const text = <Text variant="heading-xl/semibold" style={styles.takeoverHeader} accessibilityRole="header">{Reflect.apply(string,
intl, [L4ifkZ])}</Text>;
string = intl.string;
const R8LCMZ = (require(1244) /* metro dependency 1244: indexNative */).t.R8LCMZ;
items2[1] = <View style={styles.warningText}>{text}<Text variant="text-md/medium" style={styles.takeoverDescription}>{Reflect.apply(string,
intl, [R8LCMZ])}</Text></View>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const button = <Button variant="primary" size="lg" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8eKkaf'])} grow onPress={function() {
var defaultImport = importDefault(dependencyMap[12]);
var VIBING_WUMPUS_ACTION = AnalyticEvents.VIBING_WUMPUS_ACTION;
defaultImport.track(VIBING_WUMPUS_ACTION, {action: VibingWumpusAction.BACK_TO_CONVERSATION});
importDefault(dependencyMap[19]).popWithKey(VIBING_WUMPUS_MODAL_KEY);
}} />;
const object = {'variant': 'tertiary', 'size': 'lg', 'text': null, 'grow': true};
string = intl.string;
object.text = property ? Reflect.apply(string, intl, [t.RscU7I]) : Reflect.apply(string, intl, [t.ZcgDJX]);
object.onPress = onPress_76556;
const r17 = property ? (require(9376) /* metro dependency 9376: PlayIcon */).PlayIcon : (require(9554) /* metro dependency 9554: PauseIcon */).PauseIcon;
const REDESIGN_BUTTON_TERTIARY_TEXT = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_TEXT;
object.icon = ((Component) => <Component size="md" color={REDESIGN_BUTTON_TERTIARY_TEXT} />)(r17);
items2[2] = <View style={styles.ctaContainer}>{button}<Button {...object} /></View>;
return (
<>
{image}
<View style={styles.container}>
{items2}
exports.VibingWumpusScreen = VibingWumpusScreen2;
function VibingWumpusScreen() { // fn#76551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9932:794, offset: 0x01dd35a0, size: 1006 bytes, params: 1, frame: 35
const value2 = undefined;
const styles = useStyles();
const [property, env0_1] = Module00057(ReactModule.useState(false), 2);
const value5 = ReactModule.useRef(null);
const useReducedMotion = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
ReactModule.useEffect(_fun76553, []);
const jsxRuntimeEnv0_14Binding = jsxRuntimeEnv0_14;
const image = <Image source={Module09749} style={styles.rings} />;
const items2 = [
((Component) => <Component source={require(9750) /* metro dependency 9750 */} ref={value5} autoPlay={!useReducedMotion} loop style={styles.wumpus} progress={useReducedMotion ? 0.8 : value2} />)(importDefault(6760) /* metro dependency 6760: LottieAnimationView */),
];
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const L4ifkZ = t.L4ifkZ;
const text = (
<Text
variant="heading-xl/semibold"
style={styles.takeoverHeader}
accessibilityRole="header"
>
{Reflect.apply(string, intl, [L4ifkZ])}
</Text>
);
string = intl.string;
const R8LCMZ = (require(1244) /* metro dependency 1244: indexNative */).t.R8LCMZ;
items2[1] = (
<View style={styles.warningText}>
{text}
<Text variant="text-md/medium" style={styles.takeoverDescription}>
{Reflect.apply(string, intl, [R8LCMZ])}
</Text>
</View>
</>
);
}
);
const Button = (ButtonNativeModule).Button;
const button = (
<Button
variant="primary"
size="lg"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8eKkaf'])}
grow
onPress={function() {
var defaultImport = importDefault(dependencyMap[12]);
var VIBING_WUMPUS_ACTION = AnalyticEvents.VIBING_WUMPUS_ACTION;
defaultImport.track(VIBING_WUMPUS_ACTION, {action: VibingWumpusAction.BACK_TO_CONVERSATION});
importDefault(dependencyMap[19]).popWithKey(VIBING_WUMPUS_MODAL_KEY);
}}
/>
);
const object2 = {'variant': 'tertiary', 'size': 'lg', 'text': null, 'grow': true};
string = intl.string;
object2.text = property ? Reflect.apply(string, intl, [t.RscU7I]) : Reflect.apply(string, intl, [t.ZcgDJX]);
object2.onPress = onPress_76556;
const r17 = property ? (require(9376) /* metro dependency 9376: PlayIcon */).PlayIcon : (require(9554) /* metro dependency 9554: PauseIcon */).PauseIcon;
const REDESIGN_BUTTON_TERTIARY_TEXT = (Native).colors.REDESIGN_BUTTON_TERTIARY_TEXT;
object2.icon = ((Component) => <Component size="md" color={REDESIGN_BUTTON_TERTIARY_TEXT} />)(r17);
items2[2] = (
<View style={styles.ctaContainer}>
{button}
<Button {...object2} />
</View>
);
return (
<>
{image}
<View style={styles.container}>
{items2}
</View>
</>
);
function _fun76553() { // fn#76553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9932:971, offset: 0x01dd398e, size: 131 bytes, params: 1, frame: 15
var environment;
const Date = global.Date;
let date = new Date();
date = environment.__proto__;
(InappropriateConversationsActionCreatorsModule).playVibingWumpusMusic();
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const VIBING_WUMPUS_VIEWED = AnalyticEvents.VIBING_WUMPUS_VIEWED;
const INAPPROPRIATE_CONVERSATION = VibingWumpusSource.INAPPROPRIATE_CONVERSATION;
Reflect.apply(track, defaultImport, [VIBING_WUMPUS_VIEWED, {source: INAPPROPRIATE_CONVERSATION}]);
return _fun76554;
function _fun76554() { // fn#76554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9932:1108, offset: 0x01dd3a11, size: 154 bytes, params: 1, frame: 19
const value = environment.__proto__.__proto__;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const VIBING_WUMPUS_CLOSED = AnalyticEvents.VIBING_WUMPUS_CLOSED;
const Date = global.Date;
const date = new Date();
let getTime = date.getTime;
const value4 = Reflect.apply(getTime, date, []);
const binding = env0_0;
getTime = binding.getTime;
const INAPPROPRIATE_CONVERSATION = VibingWumpusSource.INAPPROPRIATE_CONVERSATION;
Reflect.apply(track, defaultImport, [VIBING_WUMPUS_CLOSED, {duration_open_ms: value4 - Reflect.apply(getTime,
binding, []), source: INAPPROPRIATE_CONVERSATION}]);
(InappropriateConversationsActionCreatorsModule).stopVibingWumpusMusic();
}
function VibingWumpusModal() { // fn#76557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9932:2698, offset: 0x01dd3c0b, size: 98 bytes, params: 1, frame: 16
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
return (
<Navigator
screens={{VIBING_WUMPUS: {'title': '', 'fullscreen': true, 'headerShown': false, render: render_76558}}}
initialRouteName="VIBING_WUMPUS"
/>
);
}
}
function _fun76553() { // fn#76553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9932:971, offset: 0x01dd398e, size: 131 bytes, params: 1, frame: 15
var environment;
const Date = global.Date;
let date = new Date();
date = environment.__proto__;
(require(9748) /* metro dependency 9748: InappropriateConversationsActionCreators */).playVibingWumpusMusic();
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const VIBING_WUMPUS_VIEWED = AnalyticEvents.VIBING_WUMPUS_VIEWED;
const INAPPROPRIATE_CONVERSATION = VibingWumpusSource.INAPPROPRIATE_CONVERSATION;
Reflect.apply(track, defaultImport, [VIBING_WUMPUS_VIEWED, {source: INAPPROPRIATE_CONVERSATION}]);
return _fun76554;
}
function VibingWumpusScreenOnPress_76556() { // fn#76556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9932:2164, owner: VibingWumpusScreen.onPress, offset: 0x01dd3b06, size: 261 bytes, params: 1, frame: 19
var defaultImport;
var defaultImport2;
var current;
const binding = env0_0;
const inappropriateConversationsActionCreatorsModule = require(9748) /* metro dependency 9748: InappropriateConversationsActionCreators */;
if (binding) {
inappropriateConversationsActionCreatorsModule.playVibingWumpusMusic();
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport2.track(AnalyticEvents.VIBING_WUMPUS_ACTION, {action: VibingWumpusAction.PLAY});
} else {
inappropriateConversationsActionCreatorsModule.pauseVibingWumpusMusic();
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.VIBING_WUMPUS_ACTION, {action: VibingWumpusAction.PAUSE});
}
if (useReducedMotion) {
if (!useReducedMotion) {
if (!env0_0) {
function VibingWumpusScreenOnPress_76556() { // fn#76556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9932:2164, owner: VibingWumpusScreen.onPress, offset: 0x01dd3b06, size: 261 bytes, params: 1, frame: 19
var defaultImport;
var defaultImport2;
var current;
const binding = env0_0;
if (binding) {
InappropriateConversationsActionCreatorsModule.playVibingWumpusMusic();
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport2.track(AnalyticEvents.VIBING_WUMPUS_ACTION, {action: VibingWumpusAction.PLAY});
} else {
InappropriateConversationsActionCreatorsModule.pauseVibingWumpusMusic();
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.VIBING_WUMPUS_ACTION, {action: VibingWumpusAction.PAUSE});
}
if (useReducedMotion) {
if (!useReducedMotion) {
if (!env0_0) {
current = env0_2.current;
if (current != null) {
current.pause();
}
}
}
} else if (env0_0) {
current = env0_2.current;
if (current != null) {
current.pause();
current.resume();
}
} else if (!useReducedMotion) {
if (!env0_0) {
current = env0_2.current;
if (current != null) {
current.pause();
}
}
}
env0_1(!env0_0);
}
} else if (env0_0) {
current = env0_2.current;
if (current != null) {
current.resume();
}
} else if (!useReducedMotion) {
if (!env0_0) {
current = env0_2.current;
if (current != null) {
current.pause();
}
}
}
env0_1(!env0_0);
}
function VibingWumpusModalRender() { // fn#76558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9932:2825, owner: VibingWumpusModal.render, offset: 0x01dd3c6d, size: 23 bytes, params: 1, frame: 13
return <VibingWumpusScreen />;
}
function VibingWumpusModal() { // fn#76557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9932:2698, offset: 0x01dd3c0b, size: 98 bytes, params: 1, frame: 16
const Navigator = (NavigatorNativeModule).Navigator;
return (
<Navigator
screens={{VIBING_WUMPUS: {'title': '', 'fullscreen': true, 'headerShown': false, render: render_76558}}}
initialRouteName="VIBING_WUMPUS"
/>
);
function VibingWumpusModalRender() { // fn#76558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9932:2825, owner: VibingWumpusModal.render, offset: 0x01dd3c6d, size: 23 bytes, params: 1, frame: 13
return <VibingWumpusScreen />;
}
}
function _fun76554() { // fn#76554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9932:1108, offset: 0x01dd3a11, size: 154 bytes, params: 1, frame: 19
const value = environment.__proto__.__proto__;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const VIBING_WUMPUS_CLOSED = AnalyticEvents.VIBING_WUMPUS_CLOSED;
const Date = global.Date;
const date = new Date();
let getTime = date.getTime;
const value4 = Reflect.apply(getTime, date, []);
const binding = env0_0;
getTime = binding.getTime;
const INAPPROPRIATE_CONVERSATION = VibingWumpusSource.INAPPROPRIATE_CONVERSATION;
Reflect.apply(track, defaultImport, [VIBING_WUMPUS_CLOSED, {duration_open_ms: value4 - Reflect.apply(getTime,
binding, []), source: INAPPROPRIATE_CONVERSATION}]);
(require(9748) /* metro dependency 9748: InappropriateConversationsActionCreators */).stopVibingWumpusMusic();
}
global.__d(_fun76550, 9746, [57, 31, 27, 4502, 9734, 9747, 661, 33, 4501, 697, 632, 9748, 683, 9749, 6760, 9750,
4573, 1244, 4578, 5080, 9376, 9554, 5280,
2]) /* metro module 9746, dependencies: [57, 31, 27, 4502, 9734, 9747, 661, 33, 4501, 697, 632, 9748, 683, 9749, 6760, 9750, 4573, 1244, 4578, 5080, 9376, 9554, 5280, 2] */;
@@ -1,16 +1,30 @@
/* Metro module 14264; source: modules/self_mod/inappropriate_conversation/native/components/InappropriateConversationModal.tsx; dependencies: [57, 31, 27, 1878, 9734, 33, 4501, 697, 566, 3995, 1484, 5473, 4573, 1244, 4578, 9731, 14265, 9754, 5282, 9728, 5080, 9732, 5280, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UserStore from '../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import UserUtils from '../../../../../utils/UserUtils.tsx'; /* Metro dependency 3995 */
import ModalActionCreators from '../../../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import SafetyTipsSection from '../../../shared/native/SafetyTipsSection.tsx'; /* Metro dependency 9754 */
import TakeActionScreen2 from './TakeActionScreen.tsx'; /* Metro dependency 14265 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseNavigationNativeModule from '../../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as NavigatorNativeModule from '../../../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as NavigatorHeaderNativeModule from '../../../../../design/components/Navigator/native/NavigatorHeader.native.tsx'; /* Metro dependency 5282 */
import * as NativeModule from '../../../../../design/assets/native.tsx'; /* Metro dependency 5473 */
import * as UseShouldShowSafetyToolsButtonTooltipForChannelModule from '../../hooks/useShouldShowSafetyToolsButtonTooltipForChannel.tsx'; /* Metro dependency 9728 */
import * as SafetyWarningUtilsModule from '../../../shared/SafetyWarningUtils.tsx'; /* Metro dependency 9731 */
function _fun107894(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:6, offset: 0x0230d60d, size: 599 bytes, params: 8, frame: 23
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(31) /* metro dependency 31 */).useState;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_6 = value.Linking;
const env0_7 = value.View;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
value = require(9734) /* metro dependency 9734: Constants */;
const env0_9 = value.CRISIS_TEXT_LINE_SMS_URI;
const env0_10 = value.CRISIS_TEXT_LINE_URL;
@@ -21,255 +35,322 @@ function _fun107894(global, require, importDefault, importAll, module, exports,
const env0_14 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object5 = {'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center', 'padding': null,
object = {};
const object2 = {'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center', 'padding': null,
'gap': null, 'height': '100%'};
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object5.padding = PX_32;
object2.padding = PX_32;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.gap = PX_16;
object4.container = object5;
const object6 = {'marginBottom': null, 'display': 'flex', 'alignItems': 'center'};
object2.gap = PX_16;
object.container = object2;
const object3 = {'marginBottom': null, 'display': 'flex', 'alignItems': 'center'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.marginBottom = PX_16;
object3.marginBottom = PX_16;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object6.gap = PX_4;
object4.warningText = object6;
object3.gap = PX_4;
object.warningText = object3;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.ctaContainer = {'display': 'flex', 'alignItems': 'center', 'alignSelf': 'stretch', gap: PX_16};
object4.takeoverHeader = {'textAlign': 'center', 'maxWidth': 268};
object4.takeoverDescription = {textAlign: 'center'};
object4.safetyTips = {alignSelf: 'stretch'};
const env0_15 = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/inappropriate_conversation/native/components/InappropriateConversationModal.tsx');
object.ctaContainer = {'display': 'flex', 'alignItems': 'center', 'alignSelf': 'stretch', gap: PX_16};
object.takeoverHeader = {'textAlign': 'center', 'maxWidth': 268};
object.takeoverDescription = {textAlign: 'center'};
object.safetyTips = {alignSelf: 'stretch'};
const env0_15 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/self_mod/inappropriate_conversation/native/components/InappropriateConversationModal.tsx');
exports.default = InappropriateConversationModal;
}
function IntroScreen({warningId, senderId, trackAnalyticsEvent}) { // fn#107895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:819, offset: 0x0230d864, size: 725 bytes, params: 2, frame: 32
const styles = useStyles();
const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(senderId);
});
const name = (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(user);
const env0_3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const TrafficConeSpotIllustration = (require(5473) /* metro dependency 5473: native */).TrafficConeSpotIllustration;
const items2 = [<TrafficConeSpotIllustration />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = <View style={styles.warningText}><Text variant="heading-xl/semibold" style={styles.takeoverHeader} accessibilityRole="header">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.sSMgC6)}</Text><Text variant="text-md/medium" style={styles.takeoverDescription}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.q2QrTY,
{username: name})}</Text></View>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items2[2] = <View style={styles.ctaContainer}><Button variant="primary" size="lg" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+o4Q7e'])} grow onPress={onPress_107897} /><Button variant="secondary" size="lg" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xLkGzP)} grow onPress={onPress_107898} /></View>;
return (
<View style={styles.container}>
{items2}
</View>
);
}
function TakeActionScreen({senderId, isReported, channelId, setReported, trackAnalyticsEvent}) { // fn#107899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:1866, offset: 0x0230dbf5, size: 390 bytes, params: 2, frame: 33
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const text = <Text variant="heading-xl/semibold" style={styles.takeoverHeader} accessibilityRole="header">{Reflect.apply(string,
intl, [(require(1244) /* metro dependency 1244: indexNative */).t['mWO+ys']])}</Text>;
string = intl.string;
const S0XtKF = (require(1244) /* metro dependency 1244: indexNative */).t.S0XtKF;
return (
<View style={styles.container}>
function IntroScreen({warningId, senderId, trackAnalyticsEvent}) { // fn#107895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:819, offset: 0x0230d864, size: 725 bytes, params: 2, frame: 32
const styles = useStyles();
const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(senderId);
});
const name = (UserUtils).getName(user);
const env0_3 = (UseNavigationNativeModule).useNavigation();
const TrafficConeSpotIllustration = (NativeModule).TrafficConeSpotIllustration;
const items2 = [
<TrafficConeSpotIllustration />,
];
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = (
<View style={styles.warningText}>
{text}
<Text
variant="heading-xl/semibold"
style={styles.takeoverHeader}
accessibilityRole="header"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.sSMgC6)}
</Text>
<Text variant="text-md/medium" style={styles.takeoverDescription}>
{Reflect.apply(string, intl, [S0XtKF])}
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.q2QrTY, {username: name})}
</Text>
</View>
{((Component) => <Component senderId={senderId} channelId={channelId} isReported={isReported} setReported={setReported} trackAnalyticsEvent={trackAnalyticsEvent} />)(importDefault(14265) /* metro dependency 14265: TakeActionScreen */)}
</View>
);
}
function SafetyTipsScreen() { // fn#107900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:2416, offset: 0x0230dd7b, size: 200 bytes, params: 1, frame: 25
const styles = useStyles();
const SafetyTipsSection = importDefault(9754) /* metro dependency 9754: SafetyTipsSection */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const DJMZX6 = (require(1244) /* metro dependency 1244: indexNative */).t.DJMZX6;
return (
<View style={styles.container}>
<View style={styles.safetyTips}>
<SafetyTipsSection
showHeader
description={Reflect.apply(string, intl, [DJMZX6])}
safetyTips={getInappropriateConversationsSafetyTips().map(_fun107901)}
);
const Button = (ButtonNativeModule).Button;
items2[2] = (
<View style={styles.ctaContainer}>
<Button
variant="primary"
size="lg"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+o4Q7e'])}
grow
onPress={onPress_107897}
/>
<Button
variant="secondary"
size="lg"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xLkGzP)}
grow
onPress={onPress_107898}
/>
</View>
</View>
);
}
function CrisisTextLineScreen({trackAnalyticsEvent}) { // fn#107902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:2696, offset: 0x0230de84, size: 594 bytes, params: 2, frame: 30
const styles = useStyles();
const SafetyChatSpotIllustration = (require(5473) /* metro dependency 5473: native */).SafetyChatSpotIllustration;
const items2 = [<SafetyChatSpotIllustration />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const NUMAsF = (require(1244) /* metro dependency 1244: indexNative */).t.NUMAsF;
items2[1] = <View style={styles.warningText}><Text variant="heading-xl/semibold" style={styles.takeoverHeader} accessibilityRole="header">{Reflect.apply(string,
intl,
[NUMAsF])}</Text><Text variant="text-md/medium" style={styles.takeoverDescription}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.uicS5l)}</Text></View>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items2[2] = <View style={styles.ctaContainer}><Button variant="secondary" size="lg" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.lkUb4S)} grow onPress={function() {
Linking.openURL(CRISIS_TEXT_LINE_SMS_URI);
trackAnalyticsEvent(require(dependencyMap[15]).CtaEventTypes.USER_TAKEOVER_MODAL_CTL_SMS);
}} /><Button variant="secondary" size="lg" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ogLlvy)} grow onPress={function() {
Linking.openURL(CRISIS_TEXT_LINE_URL);
trackAnalyticsEvent(require(dependencyMap[15]).CtaEventTypes.USER_TAKEOVER_MODAL_CTL_WEB);
}} /></View>;
return (
<View style={styles.container}>
{items2}
</View>
);
}
function getScreens_107905({warningId, senderId, channelId, isReported, setReported, handleDismiss, trackAnalyticsEvent}) { // fn#107905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:3577, offset: 0x0230e162, size: 304 bytes, params: 2, frame: 18
const object7 = {'title': '', 'fullscreen': true};
const navigatorHeaderNativeModule = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
object7.headerRight = navigatorHeaderNativeModule.getHeaderCloseButton(function() {
return handleDismiss();
});
object7.headerLeft = navigatorHeaderNativeModule.getHeaderBackButton();
const object8 = {};
const object9 = {};
copyDataProperties(object9, object7, navigatorHeaderNativeModule);
object9['headerLeft'] = function() {
return null;
};
object9['render'] = getScreens_107905Render;
object8.INTRO = object9;
const object10 = {};
copyDataProperties(object10, object7, navigatorHeaderNativeModule);
object10['render'] = getScreens_107905Render_107909;
object8.TAKE_ACTION = object10;
const object11 = {};
copyDataProperties(object11, object7, navigatorHeaderNativeModule);
object11['render'] = getScreens_107905Render_107910;
object8.SAFETY_TIPS = object11;
const object12 = {};
copyDataProperties(object12, object7, navigatorHeaderNativeModule);
object12['render'] = getScreens_107905Render_107911;
object8.CRISIS_TEXT_LINE = object12;
return object8;
}
function InappropriateConversationModal({channelId, warningId, warningType, senderId}) { // fn#107912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:4190, offset: 0x0230e347, size: 370 bytes, params: 2, frame: 26
const [property, property2] = senderId(useState(false), 2);
const value5 = (require(9728) /* metro dependency 9728: useShouldShowSafetyToolsButtonTooltipForChannel */).useSafetyToolsButtonTooltipForChannel(channelId) != null;
const binding = env0_4;
const value6 = binding.useMemo(function() {
return {channelId: channelId, senderId: senderId, warningId: warningId, warningType: warningType,
isNudgeWarning: result};
}, [channelId, warningId, warningType, senderId, value5]);
const value7 = binding.useCallback(_fun107914, [channelId, warningId, value6]);
binding.useEffect(_fun107915, [value6]);
const value8 = binding.useCallback(_fun107916, [channelId, warningId, senderId, warningType, value5]);
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
return (
<Navigator
screens={getScreens_107905({channelId: channelId, warningId: warningId, senderId: senderId,
isReported: property, setReported: property2, handleDismiss: value7, trackAnalyticsEvent: value8})}
initialRouteName="INTRO"
/>
);
}
function IntroScreenOnPress() { // fn#107897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:1549, owner: IntroScreen.onPress, offset: 0x0230db54, size: 90 bytes, params: 1, frame: 14
env0_3.push('TAKE_ACTION', {warningId: warningId, senderId: senderId});
const trackAnalyticsEventBinding = trackAnalyticsEvent;
const CtaEventTypes = (require(9731) /* metro dependency 9731: SafetyWarningUtils */).CtaEventTypes;
const USER_TAKEOVER_MODAL_TAKE_ACTION = CtaEventTypes.USER_TAKEOVER_MODAL_TAKE_ACTION;
trackAnalyticsEventBinding(USER_TAKEOVER_MODAL_TAKE_ACTION);
}
function IntroScreenOnPress_107898() { // fn#107898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:1772, owner: IntroScreen.onPress, offset: 0x0230dbae, size: 71 bytes, params: 1, frame: 12
env0_3.push('SAFETY_TIPS');
const trackAnalyticsEventBinding = trackAnalyticsEvent;
const CtaEventTypes = (require(9731) /* metro dependency 9731: SafetyWarningUtils */).CtaEventTypes;
const USER_TAKEOVER_MODAL_SAFETY_TIPS = CtaEventTypes.USER_TAKEOVER_MODAL_SAFETY_TIPS;
trackAnalyticsEventBinding(USER_TAKEOVER_MODAL_SAFETY_TIPS);
}
function _fun107901(a0, a1) { // fn#107901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:2624, offset: 0x0230de43, size: 65 bytes, params: 3, frame: 15
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return <Text {...{variant: 'text-sm/medium', children: a0}} key={a1} />;
}
function getScreens_107905Render() { // fn#107908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:3855, owner: getScreens_107905.render, offset: 0x0230e292, size: 53 bytes, params: 1, frame: 14
return (
<IntroScreen
warningId={warningId}
senderId={senderId}
trackAnalyticsEvent={trackAnalyticsEvent}
/>
);
}
function getScreens_107905Render_107909() { // fn#107909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:3947, owner: getScreens_107905.render, offset: 0x0230e2c7, size: 70 bytes, params: 1, frame: 14
return (
<TakeActionScreen
senderId={senderId}
channelId={channelId}
isReported={isReported}
setReported={setReported}
trackAnalyticsEvent={trackAnalyticsEvent}
/>
);
}
function getScreens_107905Render_107910() { // fn#107910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:4071, owner: getScreens_107905.render, offset: 0x0230e30d, size: 23 bytes, params: 1, frame: 13
return <SafetyTipsScreen />;
}
function getScreens_107905Render_107911() { // fn#107911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:4129, owner: getScreens_107905.render, offset: 0x0230e324, size: 35 bytes, params: 1, frame: 13
return <CrisisTextLineScreen trackAnalyticsEvent={trackAnalyticsEvent} />;
}
function _fun107914() { // fn#107914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:4493, offset: 0x0230e4ec, size: 155 bytes, params: 1, frame: 18
var object2;
let value = environment.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey(TAKEOVER_MODAL_KEY);
value = require(9732) /* metro dependency 9732: ChannelSafetyWarningsActionCreators */;
const dismissChannelSafetyWarnings = value.dismissChannelSafetyWarnings;
const channelIdBinding = channelId;
const warningIdBinding = warningId;
Reflect.apply(dismissChannelSafetyWarnings, value, [channelIdBinding, [warningIdBinding]]);
value = require(9731) /* metro dependency 9731: SafetyWarningUtils */;
const trackCtaEvent = value.trackCtaEvent;
object2 = {};
copyDataProperties(object2, env0_5, warningIdBinding);
const CtaEventTypes = (require(9731) /* metro dependency 9731: SafetyWarningUtils */).CtaEventTypes;
const USER_TAKEOVER_MODAL_DISMISS = CtaEventTypes.USER_TAKEOVER_MODAL_DISMISS;
object2['cta'] = USER_TAKEOVER_MODAL_DISMISS;
Reflect.apply(trackCtaEvent, value, [object2]);
}
function _fun107915() { // fn#107915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:4676, offset: 0x0230e587, size: 84 bytes, params: 1, frame: 17
let value = environment.__proto__;
value = require(9731) /* metro dependency 9731: SafetyWarningUtils */;
const trackNamedViewEvent = value.trackNamedViewEvent;
const object2 = {};
copyDataProperties(object2, env0_5, environment);
const ViewNameTypes = (require(9731) /* metro dependency 9731: SafetyWarningUtils */).ViewNameTypes;
const SAFETY_TAKEOVER_MODAL = ViewNameTypes.SAFETY_TAKEOVER_MODAL;
object2['viewName'] = SAFETY_TAKEOVER_MODAL;
Reflect.apply(trackNamedViewEvent, value, [object2]);
}
function _fun107916(a0) { // fn#107916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:4800, offset: 0x0230e5db, size: 95 bytes, params: 2, frame: 14
const value = environment.__proto__;
(require(9731) /* metro dependency 9731: SafetyWarningUtils */).trackCtaEvent({channelId: channelId,
warningId: warningId, senderId: senderId, warningType: warningType, cta: a0, isNudgeWarning: result});
);
return (
<View style={styles.container}>
{items2}
</View>
);
function IntroScreenOnPress() { // fn#107897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:1549, owner: IntroScreen.onPress, offset: 0x0230db54, size: 90 bytes, params: 1, frame: 14
env0_3.push('TAKE_ACTION', {warningId: warningId, senderId: senderId});
const trackAnalyticsEventBinding = trackAnalyticsEvent;
const CtaEventTypes = (SafetyWarningUtilsModule).CtaEventTypes;
const USER_TAKEOVER_MODAL_TAKE_ACTION = CtaEventTypes.USER_TAKEOVER_MODAL_TAKE_ACTION;
trackAnalyticsEventBinding(USER_TAKEOVER_MODAL_TAKE_ACTION);
}
function IntroScreenOnPress_107898() { // fn#107898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:1772, owner: IntroScreen.onPress, offset: 0x0230dbae, size: 71 bytes, params: 1, frame: 12
env0_3.push('SAFETY_TIPS');
const trackAnalyticsEventBinding = trackAnalyticsEvent;
const CtaEventTypes = (SafetyWarningUtilsModule).CtaEventTypes;
const USER_TAKEOVER_MODAL_SAFETY_TIPS = CtaEventTypes.USER_TAKEOVER_MODAL_SAFETY_TIPS;
trackAnalyticsEventBinding(USER_TAKEOVER_MODAL_SAFETY_TIPS);
}
}
function TakeActionScreen({senderId, isReported, channelId, setReported, trackAnalyticsEvent}) { // fn#107899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:1866, offset: 0x0230dbf5, size: 390 bytes, params: 2, frame: 33
const styles = useStyles();
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const text = (
<Text
variant="heading-xl/semibold"
style={styles.takeoverHeader}
accessibilityRole="header"
>
{Reflect.apply(string, intl, [(IndexNativeModule).t['mWO+ys']])}
</Text>
);
string = intl.string;
const S0XtKF = (IndexNativeModule).t.S0XtKF;
return (
<View style={styles.container}>
<View style={styles.warningText}>
{text}
<Text variant="text-md/medium" style={styles.takeoverDescription}>
{Reflect.apply(string, intl, [S0XtKF])}
</Text>
</View>
{((Component) => <Component senderId={senderId} channelId={channelId} isReported={isReported} setReported={setReported} trackAnalyticsEvent={trackAnalyticsEvent} />)(TakeActionScreen2)}
</View>
);
}
function SafetyTipsScreen() { // fn#107900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:2416, offset: 0x0230dd7b, size: 200 bytes, params: 1, frame: 25
const styles = useStyles();
const intl = (IndexNativeModule).intl;
const string = intl.string;
const DJMZX6 = (IndexNativeModule).t.DJMZX6;
return (
<View style={styles.container}>
<View style={styles.safetyTips}>
<SafetyTipsSection
showHeader
description={Reflect.apply(string, intl, [DJMZX6])}
safetyTips={getInappropriateConversationsSafetyTips().map(_fun107901)}
/>
</View>
</View>
);
function _fun107901(a0, a1) { // fn#107901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:2624, offset: 0x0230de43, size: 65 bytes, params: 3, frame: 15
const Text = (TextModule).Text;
return <Text {...{variant: 'text-sm/medium', children: a0}} key={a1} />;
}
}
function CrisisTextLineScreen({trackAnalyticsEvent}) { // fn#107902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:2696, offset: 0x0230de84, size: 594 bytes, params: 2, frame: 30
const styles = useStyles();
const SafetyChatSpotIllustration = (NativeModule).SafetyChatSpotIllustration;
const items2 = [
<SafetyChatSpotIllustration />,
];
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const NUMAsF = (require(1244) /* metro dependency 1244: indexNative */).t.NUMAsF;
items2[1] = (
<View style={styles.warningText}>
<Text
variant="heading-xl/semibold"
style={styles.takeoverHeader}
accessibilityRole="header"
>
{Reflect.apply(string, intl, [NUMAsF])}
</Text>
<Text variant="text-md/medium" style={styles.takeoverDescription}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.uicS5l)}
</Text>
</View>
);
const Button = (ButtonNativeModule).Button;
items2[2] = (
<View style={styles.ctaContainer}>
<Button
variant="secondary"
size="lg"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.lkUb4S)}
grow
onPress={function() {
Linking.openURL(CRISIS_TEXT_LINE_SMS_URI);
trackAnalyticsEvent(require(dependencyMap[15]).CtaEventTypes.USER_TAKEOVER_MODAL_CTL_SMS);
}}
/>
<Button
variant="secondary"
size="lg"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ogLlvy)}
grow
onPress={function() {
Linking.openURL(CRISIS_TEXT_LINE_URL);
trackAnalyticsEvent(require(dependencyMap[15]).CtaEventTypes.USER_TAKEOVER_MODAL_CTL_WEB);
}}
/>
</View>
);
return (
<View style={styles.container}>
{items2}
</View>
);
}
function getScreens_107905({warningId, senderId, channelId, isReported, setReported, handleDismiss, trackAnalyticsEvent}) { // fn#107905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:3577, offset: 0x0230e162, size: 304 bytes, params: 2, frame: 18
const object = {'title': '', 'fullscreen': true};
object.headerRight = NavigatorHeaderNativeModule.getHeaderCloseButton(function() {
return handleDismiss();
});
object.headerLeft = NavigatorHeaderNativeModule.getHeaderBackButton();
const object2 = {};
const object3 = {};
copyDataProperties(object3, object, NavigatorHeaderNativeModule);
object3['headerLeft'] = function() {
return null;
};
object3['render'] = getScreens_107905Render;
object2.INTRO = object3;
const object4 = {};
copyDataProperties(object4, object, NavigatorHeaderNativeModule);
object4['render'] = getScreens_107905Render_107909;
object2.TAKE_ACTION = object4;
const object5 = {};
copyDataProperties(object5, object, NavigatorHeaderNativeModule);
object5['render'] = getScreens_107905Render_107910;
object2.SAFETY_TIPS = object5;
const object6 = {};
copyDataProperties(object6, object, NavigatorHeaderNativeModule);
object6['render'] = getScreens_107905Render_107911;
object2.CRISIS_TEXT_LINE = object6;
return object2;
function getScreens_107905Render() { // fn#107908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:3855, owner: getScreens_107905.render, offset: 0x0230e292, size: 53 bytes, params: 1, frame: 14
return (
<IntroScreen
warningId={warningId}
senderId={senderId}
trackAnalyticsEvent={trackAnalyticsEvent}
/>
);
}
function getScreens_107905Render_107909() { // fn#107909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:3947, owner: getScreens_107905.render, offset: 0x0230e2c7, size: 70 bytes, params: 1, frame: 14
return (
<TakeActionScreen
senderId={senderId}
channelId={channelId}
isReported={isReported}
setReported={setReported}
trackAnalyticsEvent={trackAnalyticsEvent}
/>
);
}
function getScreens_107905Render_107910() { // fn#107910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:4071, owner: getScreens_107905.render, offset: 0x0230e30d, size: 23 bytes, params: 1, frame: 13
return <SafetyTipsScreen />;
}
function getScreens_107905Render_107911() { // fn#107911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:4129, owner: getScreens_107905.render, offset: 0x0230e324, size: 35 bytes, params: 1, frame: 13
return <CrisisTextLineScreen trackAnalyticsEvent={trackAnalyticsEvent} />;
}
}
function InappropriateConversationModal({channelId, warningId, warningType, senderId}) { // fn#107912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:4190, offset: 0x0230e347, size: 370 bytes, params: 2, frame: 26
const [property, property2] = senderId(useState(false), 2);
const value5 = (UseShouldShowSafetyToolsButtonTooltipForChannelModule).useSafetyToolsButtonTooltipForChannel(channelId) != null;
const value6 = ReactModule.useMemo(function() {
return {channelId: channelId, senderId: senderId, warningId: warningId, warningType: warningType,
isNudgeWarning: result};
}, [channelId, warningId, warningType, senderId, value5]);
const value7 = ReactModule.useCallback(_fun107914, [channelId, warningId, value6]);
ReactModule.useEffect(_fun107915, [value6]);
const value8 = ReactModule.useCallback(_fun107916, [channelId, warningId, senderId, warningType, value5]);
const Navigator = (NavigatorNativeModule).Navigator;
return (
<Navigator
screens={getScreens_107905({channelId: channelId, warningId: warningId, senderId: senderId,
isReported: property, setReported: property2, handleDismiss: value7, trackAnalyticsEvent: value8})}
initialRouteName="INTRO"
/>
);
function _fun107914() { // fn#107914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:4493, offset: 0x0230e4ec, size: 155 bytes, params: 1, frame: 18
let value = environment.__proto__;
(ModalActionCreators).popWithKey(TAKEOVER_MODAL_KEY);
value = require(9732) /* metro dependency 9732: ChannelSafetyWarningsActionCreators */;
const dismissChannelSafetyWarnings = value.dismissChannelSafetyWarnings;
const channelIdBinding = channelId;
const warningIdBinding = warningId;
Reflect.apply(dismissChannelSafetyWarnings, value, [channelIdBinding, [warningIdBinding]]);
value = require(9731) /* metro dependency 9731: SafetyWarningUtils */;
const trackCtaEvent = value.trackCtaEvent;
object = {};
copyDataProperties(object, ReactModule.useState, warningIdBinding);
const CtaEventTypes = (require(9731) /* metro dependency 9731: SafetyWarningUtils */).CtaEventTypes;
const USER_TAKEOVER_MODAL_DISMISS = CtaEventTypes.USER_TAKEOVER_MODAL_DISMISS;
object['cta'] = USER_TAKEOVER_MODAL_DISMISS;
Reflect.apply(trackCtaEvent, value, [object]);
}
function _fun107915() { // fn#107915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:4676, offset: 0x0230e587, size: 84 bytes, params: 1, frame: 17
let value = environment.__proto__;
value = require(9731) /* metro dependency 9731: SafetyWarningUtils */;
const trackNamedViewEvent = value.trackNamedViewEvent;
const object = {};
copyDataProperties(object, ReactModule.useState, environment);
const ViewNameTypes = (require(9731) /* metro dependency 9731: SafetyWarningUtils */).ViewNameTypes;
const SAFETY_TAKEOVER_MODAL = ViewNameTypes.SAFETY_TAKEOVER_MODAL;
object['viewName'] = SAFETY_TAKEOVER_MODAL;
Reflect.apply(trackNamedViewEvent, value, [object]);
}
function _fun107916(a0) { // fn#107916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14461:4800, offset: 0x0230e5db, size: 95 bytes, params: 2, frame: 14
const value = environment.__proto__;
(SafetyWarningUtilsModule).trackCtaEvent({channelId: channelId,
warningId: warningId, senderId: senderId, warningType: warningType, cta: a0, isNudgeWarning: result});
}
}
}
global.__d(_fun107894, 14264, [57, 31, 27, 1878, 9734, 33, 4501, 697, 566, 3995, 1484, 5473, 4573, 1244, 4578, 9731,
14265, 9754, 5282, 9728, 5080, 9732, 5280,
2]) /* metro module 14264, dependencies: [57, 31, 27, 1878, 9734, 33, 4501, 697, 566, 3995, 1484, 5473, 4573, 1244, 4578, 9731, 14265, 9754, 5282, 9728, 5080, 9732, 5280, 2] */;
@@ -1,128 +1,133 @@
/* Metro module 11309; source: modules/self_mod/inappropriate_conversation/native/components/InappropriateConversationWarningBanner.tsx; dependencies: [31, 3793, 9706, 33, 9731, 566, 9732, 4496, 9744, 1962, 9733, 11298, 1244, 2] */
import RelationshipStore from '../../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import SafetyWarningBanner from '../../../shared/native/SafetyWarningBanner.tsx'; /* Metro dependency 11298 */
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 JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ChannelSafetyWarningsStoreModule from '../../../ChannelSafetyWarningsStore.tsx'; /* Metro dependency 9706 */
import * as SafetyWarningUtilsModule from '../../../shared/SafetyWarningUtils.tsx'; /* Metro dependency 9731 */
import * as SafetyToolsActionCreatorsNativeModule from '../../../SafetyToolsActionCreators.native.tsx'; /* Metro dependency 9733 */
function _fun86268(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11495:6, offset: 0x01f8e681, size: 188 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = InappropriateConversationWarningBanner;
const InappropriateConversationWarningBanner2 = InappropriateConversationWarningBanner;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const env0_5 = (require(9706) /* metro dependency 9706: ChannelSafetyWarningsStore */).SafetyWarningTypes;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/inappropriate_conversation/native/components/InappropriateConversationWarningBanner.tsx');
exports.default = closure;
exports.InappropriateConversationWarningBanner = closure;
}
(FileImportTrackerModule).fileFinishedImporting('modules/self_mod/inappropriate_conversation/native/components/InappropriateConversationWarningBanner.tsx');
exports.default = InappropriateConversationWarningBanner2;
exports.InappropriateConversationWarningBanner = InappropriateConversationWarningBanner2;
function InappropriateConversationWarningBanner({channelId, warningId, senderId}) { // fn#86269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11495:159, offset: 0x01f8e73d, size: 648 bytes, params: 2, frame: 26
var object3;
var items3;
var object;
env0_3.useEffect(function() {
var moduleValue = require(dependencyMap[4]);
var object = {};
object.channelId = channelId;
object.warningId = warningId;
object.senderId = senderId;
object.warningType = SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_2;
object.viewName = require(dependencyMap[4]).ViewNameTypes.SAFETY_WARNING_BANNER;
moduleValue.trackNamedViewEvent(object);
}, [channelId, warningId, senderId]);
const value2 = env0_3.useCallback(function(a0) {
require(dependencyMap[4]).trackCtaEvent({channelId: channelId, warningId: warningId, senderId: senderId,
warningType: SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_2, cta: a0});
}, [channelId, warningId, senderId]);
var env0_3 = value2;
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RelationshipStore], function() {
return RelationshipStore.isBlocked(senderId);
}, [senderId]);
const value4 = env0_3.useCallback(_fun86273, [channelId, warningId]);
const value5 = env0_3.useCallback(_fun86274, [value4, channelId, warningId, senderId]);
const value6 = env0_3.useCallback(_fun86278, [channelId, warningId, senderId, value2]);
object3 = {channelId: channelId, warningId: warningId, senderId: senderId};
const INAPPROPRIATE_CONVERSATION_TIER_2 = SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_2;
object3.warningType = INAPPROPRIATE_CONVERSATION_TIER_2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const ZzlB5p = (require(1244) /* metro dependency 1244: indexNative */).t.ZzlB5p;
object3.header = Reflect.apply(string, intl, [ZzlB5p]);
object3.description = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['D1aU+h']);
object3.onDismiss = value4;
string = intl.string;
const Qyu4UK = (require(1244) /* metro dependency 1244: indexNative */).t.Qyu4UK;
const items2 = [{text: Reflect.apply(string, intl, [Qyu4UK]), variant: 'primary', onpress: value6}];
if (value3) {
items3 = [];
} else {
object = {};
object.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7q0bNY']);
object.variant = 'secondary';
object.onpress = value5;
items3 = [object];
}
arraySpread(items2, items3, 1, undefined);
object3.buttons = items2;
return <SafetyWarningBanner {...object3} />;
function _fun86273() { // fn#86273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11495:667, offset: 0x01f8ea8f, size: 58 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(9732) /* metro dependency 9732: ChannelSafetyWarningsActionCreators */;
value.dismissChannelSafetyWarnings(channelId, [warningId]);
}
function _fun86274() { // fn#86274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11495:742, offset: 0x01f8eac9, size: 54 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
value.openLazy({importer: importer_86275});
function importer_86275() { // fn#86275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11495:774, offset: 0x01f8eaff, size: 64 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__.__proto__;
value = require(dependencyMap[9]);
value = value(dependencyMap[8], dependencyMap.paths);
return value.then(function({default: env0_0}) {
return _fun86277;
});
function _fun86276({default: env0_0}) { // fn#86276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11495:806, offset: 0x01f8eb3f, size: 23 bytes, params: 2, frame: 2
return _fun86277;
function _fun86277(a0) { // fn#86277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11495:821, offset: 0x01f8eb56, size: 217 bytes, params: 2, frame: 19
const binding = env0_0;
const bindingProps = {...a0};
bindingProps['channelId'] = channelId;
bindingProps['warningId'] = warningId;
const INAPPROPRIATE_CONVERSATION_TIER_2 = SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_2;
bindingProps['warningType'] = INAPPROPRIATE_CONVERSATION_TIER_2;
bindingProps['senderId'] = senderId;
const CtaEventTypes = (SafetyWarningUtilsModule).CtaEventTypes;
const USER_BANNER_BLOCK_CONFIRM = CtaEventTypes.USER_BANNER_BLOCK_CONFIRM;
bindingProps['analyticsBlockContext'] = USER_BANNER_BLOCK_CONFIRM;
const USER_BANNER_BLOCK_AND_REPORT_CONFIRM = CtaEventTypes.USER_BANNER_BLOCK_AND_REPORT_CONFIRM;
bindingProps['analyticsBlockAndReportContext'] = USER_BANNER_BLOCK_AND_REPORT_CONFIRM;
const USER_BANNER_BLOCK_CANCEL = CtaEventTypes.USER_BANNER_BLOCK_CANCEL;
bindingProps['analyticsCancelContext'] = USER_BANNER_BLOCK_CANCEL;
bindingProps['onDismiss'] = env3_4;
return ((Component) => <Component {...bindingProps} />)(binding);
}
}
}
}
function _fun86278() { // fn#86278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11495:1195, offset: 0x01f8ec2f, size: 98 bytes, params: 1, frame: 21
const openSafetyToolsActionSheet = SafetyToolsActionCreatorsNativeModule.openSafetyToolsActionSheet;
const channelIdBinding = channelId;
const senderIdBinding = senderId;
const warningIdBinding = warningId;
const INAPPROPRIATE_CONVERSATION_TIER_2 = SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_2;
Reflect.apply(openSafetyToolsActionSheet, SafetyToolsActionCreatorsNativeModule, [channelIdBinding, senderIdBinding,
warningIdBinding, INAPPROPRIATE_CONVERSATION_TIER_2]);
const binding = env0_3;
const CtaEventTypes = (SafetyWarningUtilsModule).CtaEventTypes;
const USER_BANNER_OPEN_SAFETY_TOOLS = CtaEventTypes.USER_BANNER_OPEN_SAFETY_TOOLS;
binding(USER_BANNER_OPEN_SAFETY_TOOLS);
}
function InappropriateConversationWarningBanner({channelId, warningId, senderId}) { // fn#86269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11495:159, offset: 0x01f8e73d, size: 648 bytes, params: 2, frame: 26
var object4;
var items;
var object2;
env0_3.useEffect(function() {
var moduleValue = require(dependencyMap[4]);
var object = {};
object.channelId = channelId;
object.warningId = warningId;
object.senderId = senderId;
object.warningType = SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_2;
object.viewName = require(dependencyMap[4]).ViewNameTypes.SAFETY_WARNING_BANNER;
moduleValue.trackNamedViewEvent(object);
}, [channelId, warningId, senderId]);
const value2 = env0_3.useCallback(function(a0) {
require(dependencyMap[4]).trackCtaEvent({channelId: channelId, warningId: warningId, senderId: senderId,
warningType: SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_2, cta: a0});
}, [channelId, warningId, senderId]);
var env0_3 = value2;
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RelationshipStore], function() {
return RelationshipStore.isBlocked(senderId);
}, [senderId]);
const value4 = env0_3.useCallback(_fun86273, [channelId, warningId]);
const value5 = env0_3.useCallback(_fun86274, [value4, channelId, warningId, senderId]);
const value6 = env0_3.useCallback(_fun86278, [channelId, warningId, senderId, value2]);
const SafetyWarningBanner = importDefault(11298) /* metro dependency 11298: SafetyWarningBanner */;
object4 = {channelId: channelId, warningId: warningId, senderId: senderId};
const INAPPROPRIATE_CONVERSATION_TIER_2 = SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_2;
object4.warningType = INAPPROPRIATE_CONVERSATION_TIER_2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const ZzlB5p = (require(1244) /* metro dependency 1244: indexNative */).t.ZzlB5p;
object4.header = Reflect.apply(string, intl, [ZzlB5p]);
object4.description = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['D1aU+h']);
object4.onDismiss = value4;
string = intl.string;
const Qyu4UK = (require(1244) /* metro dependency 1244: indexNative */).t.Qyu4UK;
const items2 = [{text: Reflect.apply(string, intl, [Qyu4UK]), variant: 'primary', onpress: value6}];
if (value3) {
items = [];
} else {
object2 = {};
object2.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7q0bNY']);
object2.variant = 'secondary';
object2.onpress = value5;
items = [object2];
}
arraySpread(items2, items, 1, undefined);
object4.buttons = items2;
return <SafetyWarningBanner {...object4} />;
}
function _fun86273() { // fn#86273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11495:667, offset: 0x01f8ea8f, size: 58 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(9732) /* metro dependency 9732: ChannelSafetyWarningsActionCreators */;
value.dismissChannelSafetyWarnings(channelId, [warningId]);
}
function _fun86274() { // fn#86274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11495:742, offset: 0x01f8eac9, size: 54 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
value.openLazy({importer: importer_86275});
}
function _fun86278() { // fn#86278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11495:1195, offset: 0x01f8ec2f, size: 98 bytes, params: 1, frame: 21
const safetyToolsActionCreatorsNativeModule = require(9733) /* metro dependency 9733: SafetyToolsActionCreatorsNative */;
const openSafetyToolsActionSheet = safetyToolsActionCreatorsNativeModule.openSafetyToolsActionSheet;
const channelIdBinding = channelId;
const senderIdBinding = senderId;
const warningIdBinding = warningId;
const INAPPROPRIATE_CONVERSATION_TIER_2 = SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_2;
Reflect.apply(openSafetyToolsActionSheet, safetyToolsActionCreatorsNativeModule, [channelIdBinding, senderIdBinding,
warningIdBinding, INAPPROPRIATE_CONVERSATION_TIER_2]);
const binding = env0_3;
const CtaEventTypes = (require(9731) /* metro dependency 9731: SafetyWarningUtils */).CtaEventTypes;
const USER_BANNER_OPEN_SAFETY_TOOLS = CtaEventTypes.USER_BANNER_OPEN_SAFETY_TOOLS;
binding(USER_BANNER_OPEN_SAFETY_TOOLS);
}
function importer_86275() { // fn#86275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11495:774, offset: 0x01f8eaff, size: 64 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__.__proto__;
value = require(dependencyMap[9]);
value = value(dependencyMap[8], dependencyMap.paths);
return value.then(function({default: env0_0}) {
return _fun86277;
});
}
function _fun86276({default: env0_0}) { // fn#86276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11495:806, offset: 0x01f8eb3f, size: 23 bytes, params: 2, frame: 2
return _fun86277;
}
function _fun86277(a0) { // fn#86277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11495:821, offset: 0x01f8eb56, size: 217 bytes, params: 2, frame: 19
const binding = env0_0;
const bindingProps = {...a0};
bindingProps['channelId'] = channelId;
bindingProps['warningId'] = warningId;
const INAPPROPRIATE_CONVERSATION_TIER_2 = SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_2;
bindingProps['warningType'] = INAPPROPRIATE_CONVERSATION_TIER_2;
bindingProps['senderId'] = senderId;
const CtaEventTypes = (require(9731) /* metro dependency 9731: SafetyWarningUtils */).CtaEventTypes;
const USER_BANNER_BLOCK_CONFIRM = CtaEventTypes.USER_BANNER_BLOCK_CONFIRM;
bindingProps['analyticsBlockContext'] = USER_BANNER_BLOCK_CONFIRM;
const USER_BANNER_BLOCK_AND_REPORT_CONFIRM = CtaEventTypes.USER_BANNER_BLOCK_AND_REPORT_CONFIRM;
bindingProps['analyticsBlockAndReportContext'] = USER_BANNER_BLOCK_AND_REPORT_CONFIRM;
const USER_BANNER_BLOCK_CANCEL = CtaEventTypes.USER_BANNER_BLOCK_CANCEL;
bindingProps['analyticsCancelContext'] = USER_BANNER_BLOCK_CANCEL;
bindingProps['onDismiss'] = env3_4;
return ((Component) => <Component {...bindingProps} />)(binding);
}
global.__d(_fun86268, 11309, [31, 3793, 9706, 33, 9731, 566, 9732, 4496, 9744, 1962, 9733, 11298, 1244,
2]) /* metro module 11309, dependencies: [31, 3793, 9706, 33, 9731, 566, 9732, 4496, 9744, 1962, 9733, 11298, 1244, 2] */;
@@ -1,17 +1,29 @@
/* Metro module 14265; source: modules/self_mod/inappropriate_conversation/native/components/TakeActionScreen.tsx; dependencies: [5, 57, 31, 27, 3793, 1878, 9734, 33, 4501, 697, 566, 9736, 9737, 1484, 8783, 6264, 9731, 8153, 3857, 1244, 4073, 3856, 4578, 9743, 8666, 6660, 6250, 3853, 4573, 2] */
import Module00005 from '../../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UserStore from '../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import Linking from '../../../../../lib/native/Linking.tsx'; /* Metro dependency 3853 */
import Module08666 from '../../../../../by-id/module-08666.js'; /* Metro dependency 8666 */
import RelationshipActionCreators from '../../../../../actions/RelationshipActionCreators.tsx'; /* Metro dependency 8783 */
import Module09743 from '../../../../../by-id/module-09743.js'; /* Metro dependency 9743 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as UseNavigationNativeModule from '../../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as SafetyWarningUtilsModule from '../../../shared/SafetyWarningUtils.tsx'; /* Metro dependency 9731 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 9734 */
import * as UseLastChannelMessageModule from '../../hooks/useLastChannelMessage.tsx'; /* Metro dependency 9736 */
import * as UseHelpLineVisibilityModule from '../../../../parent_tools/hooks/useHelpLineVisibility.tsx'; /* Metro dependency 9737 */
function _fun107917(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14462:6, offset: 0x0230e63a, size: 501 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(31) /* metro dependency 31 */).useState;
const env0_7 = (require(27) /* metro dependency 27 */).View;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = require(9734) /* metro dependency 9734: Constants */;
let value = ConstantsModule;
const env0_10 = value.MODAL_LOCATION_CONTEXT_MOBILE;
const env0_11 = value.NOFILTR_URL;
const env0_12 = value.THROUGHLINE_URL;
@@ -22,195 +34,229 @@ function _fun107917(global, require, importDefault, importAll, module, exports,
const env0_16 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.container = {'display': 'flex', 'alignItems': 'center', 'alignSelf': 'stretch', gap: PX_16};
const object4 = {};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.paddingHorizontal = PX_8;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.paddingVertical = PX_12;
object2.toastContainer = object4;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.helplineGroup = {'display': 'flex', 'alignSelf': 'stretch', gap: PX_4};
object2.textCenter = {textAlign: 'center'};
const env0_17 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/inappropriate_conversation/native/components/TakeActionScreen.tsx');
object = {};
const PX_16 = (Native).space.PX_16;
object.container = {'display': 'flex', 'alignItems': 'center', 'alignSelf': 'stretch', gap: PX_16};
const object3 = {};
const PX_8 = (Native).space.PX_8;
object3.paddingHorizontal = PX_8;
const PX_12 = (Native).space.PX_12;
object3.paddingVertical = PX_12;
object.toastContainer = object3;
const PX_4 = (Native).space.PX_4;
object.helplineGroup = {'display': 'flex', 'alignSelf': 'stretch', gap: PX_4};
object.textCenter = {textAlign: 'center'};
const env0_17 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/self_mod/inappropriate_conversation/native/components/TakeActionScreen.tsx');
exports.default = TakeActionButtons;
}
function TakeActionButtons({senderId, channelId, isReported, setReported, trackAnalyticsEvent}) { // fn#107918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14462:799, offset: 0x0230e82f, size: 1344 bytes, params: 2, frame: 37
var r5;
var object;
var items3;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items4;
const env0_3 = trackAnalyticsEvent;
const styles = useStyles();
const env0_4 = styles;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RelationshipStore], function() {
return RelationshipStore.isBlocked(senderId);
}, [senderId]);
const value3 = (require(9736) /* metro dependency 9736: useLastChannelMessage */).useLastChannelMessage(channelId);
const env0_5 = value3;
const value4 = (require(9737) /* metro dependency 9737: useHelpLineVisibility */).useShouldShowHelplineLink();
const [property, env0_6] = env0_4(useState(false), 2);
const env0_7 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const value7 = (require(9737) /* metro dependency 9737: useHelpLineVisibility */).useShouldShowThroughlineLink();
const binding = env0_5;
const value8 = binding.useCallback(function() {
importDefault(dependencyMap[14]).blockUser(senderId,
{location: MODAL_LOCATION_CONTEXT_MOBILE}).then(_fun107921);
trackAnalyticsEvent(require(dependencyMap[16]).CtaEventTypes.USER_TAKEOVER_MODAL_BLOCK);
}, [senderId, channelId, trackAnalyticsEvent]);
const value9 = binding.useCallback(function() {
var defaultImport = importDefault(dependencyMap[14]);
var senderIdBinding = senderId;
defaultImport.unblockUser(senderIdBinding, {location: MODAL_LOCATION_CONTEXT_MOBILE});
importDefault(dependencyMap[15]).showUnblockSuccessToast(senderIdBinding, channelId);
trackAnalyticsEvent(require(dependencyMap[16]).CtaEventTypes.USER_TAKEOVER_MODAL_UNBLOCK);
}, [senderId, channelId, trackAnalyticsEvent]);
const env0_8 = binding.useCallback(env0_3(_fun107924), [senderId, channelId, styles.toastContainer, setReported,
value3, trackAnalyticsEvent]);
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const buttonProps2 = {'variant': 'primary', 'size': 'lg', 'icon': null, 'text': null, 'grow': true,
icon: importDefault(9743) /* metro dependency 9743 */};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
buttonProps2.text = value2 ? Reflect.apply(string, intl, [t.Hro40y]) : Reflect.apply(string, intl, [t.VTIBaD]);
buttonProps2.onPress = value2 ? value9 : value8;
const items2 = [<Button {...buttonProps2} />];
const buttonProps3 = {'variant': 'secondary', 'size': 'lg', icon: importDefault(8666) /* metro dependency 8666 */,
loading: property, disabled: isReported};
string = intl.string;
buttonProps3.text = isReported ? Reflect.apply(string, intl, [t.QvwOJ6]) : Reflect.apply(string, intl,
[t['7fHyE6']]);
buttonProps3.grow = true;
buttonProps3.onPress = onPress_107927;
items2[1] = <Button {...buttonProps3} />;
if (value4) {
r5 = <Button variant="secondary" size="lg" icon={importDefault(6660) /* metro dependency 6660 */} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.sZf6cz)} grow onPress={onPress_107928} />;
} else {
var viewBinding2Props = {style: styles.helplineGroup};
object = {'variant': 'secondary', 'size': 'lg', 'icon': null, 'text': null, 'grow': true};
object.icon = importDefault(6250) /* metro dependency 6250 */;
function TakeActionButtons({senderId, channelId, isReported, setReported, trackAnalyticsEvent}) { // fn#107918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14462:799, offset: 0x0230e82f, size: 1344 bytes, params: 2, frame: 37
var r5;
var object2;
var items3;
const Text = (TextModule).Text;
var items4;
const trackAnalyticsEvent2 = trackAnalyticsEvent;
const styles = useStyles();
const styles2 = styles;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RelationshipStore], function() {
return RelationshipStore.isBlocked(senderId);
}, [senderId]);
const value3 = (UseLastChannelMessageModule).useLastChannelMessage(channelId);
const env0_5 = value3;
const value4 = (UseHelpLineVisibilityModule).useShouldShowHelplineLink();
const [property, env0_6] = styles2(useState(false), 2);
const env0_7 = (UseNavigationNativeModule).useNavigation();
const value7 = (UseHelpLineVisibilityModule).useShouldShowThroughlineLink();
const binding = env0_5;
const value8 = binding.useCallback(function() {
importDefault(dependencyMap[14]).blockUser(senderId,
{location: MODAL_LOCATION_CONTEXT_MOBILE}).then(_fun107921);
trackAnalyticsEvent(require(dependencyMap[16]).CtaEventTypes.USER_TAKEOVER_MODAL_BLOCK);
}, [senderId, channelId, trackAnalyticsEvent]);
const value9 = binding.useCallback(function() {
var defaultImport = importDefault(dependencyMap[14]);
var senderIdBinding = senderId;
defaultImport.unblockUser(senderIdBinding, {location: MODAL_LOCATION_CONTEXT_MOBILE});
importDefault(dependencyMap[15]).showUnblockSuccessToast(senderIdBinding, channelId);
trackAnalyticsEvent(require(dependencyMap[16]).CtaEventTypes.USER_TAKEOVER_MODAL_UNBLOCK);
}, [senderId, channelId, trackAnalyticsEvent]);
const env0_8 = binding.useCallback(trackAnalyticsEvent2(_fun107924), [senderId, channelId, styles.toastContainer,
setReported, value3, trackAnalyticsEvent]);
const Button = (ButtonNativeModule).Button;
const buttonProps2 = {'variant': 'primary', 'size': 'lg', 'icon': null, 'text': null, 'grow': true,
icon: Module09743};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
buttonProps2.text = value2 ? Reflect.apply(string, intl, [t.Hro40y]) : Reflect.apply(string, intl, [t.VTIBaD]);
buttonProps2.onPress = value2 ? value9 : value8;
const items2 = [
<Button {...buttonProps2} />,
];
const buttonProps3 = {'variant': 'secondary', 'size': 'lg', icon: Module08666,
loading: property, disabled: isReported};
string = intl.string;
if (value7) {
object.text = Reflect.apply(string, intl, [t.HQ2nKl]);
object.onPress = function() {
importDefault(dependencyMap[27]).openURL(THROUGHLINE_URL);
trackAnalyticsEvent(require(dependencyMap[16]).CtaEventTypes.USER_TAKEOVER_MODAL_THROUGHLINE);
};
items4 = [<Button {...object} />];
string = intl.string;
items4[1] = <Text variant="text-xs/medium" color="text-default" style={styles.textCenter}>{Reflect.apply(string,
intl, [t['PMeb/r']])}</Text>;
viewBinding2Props.children = items4;
buttonProps3.text = isReported ? Reflect.apply(string, intl, [t.QvwOJ6]) : Reflect.apply(string, intl,
[t['7fHyE6']]);
buttonProps3.grow = true;
buttonProps3.onPress = onPress_107927;
items2[1] = <Button {...buttonProps3} />;
if (value4) {
r5 = (
<Button
variant="secondary"
size="lg"
icon={importDefault(6660) /* metro dependency 6660 */}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.sZf6cz)}
grow
onPress={onPress_107928}
/>
);
} else {
object.text = Reflect.apply(string, intl, [t['65XQar']]);
object.onPress = onPress_107930;
items3 = [<Button {...object} />];
var viewBinding2Props = {style: styles.helplineGroup};
object2 = {'variant': 'secondary', 'size': 'lg', 'icon': null, 'text': null, 'grow': true};
object2.icon = importDefault(6250) /* metro dependency 6250 */;
string = intl.string;
items3[1] = <Text variant="text-xs/medium" color="text-default" style={styles.textCenter}>{Reflect.apply(string,
intl, [t.XNwhxC])}</Text>;
viewBinding2Props.children = items3;
}
r5 = <View {...viewBinding2Props} />;
}
items2[2] = r5;
return (
<View style={styles.container}>
{items2}
</View>
);
}
function _fun107920() { // fn#107920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14462:1163, offset: 0x0230ed8a, size: 112 bytes, params: 1, frame: 18
const defaultImport = importDefault(8783) /* metro dependency 8783: RelationshipActionCreators */;
defaultImport.blockUser(senderId, {location: MODAL_LOCATION_CONTEXT_MOBILE}).then(_fun107921);
const trackAnalyticsEventBinding = trackAnalyticsEvent;
const CtaEventTypes = (require(9731) /* metro dependency 9731: SafetyWarningUtils */).CtaEventTypes;
const USER_TAKEOVER_MODAL_BLOCK = CtaEventTypes.USER_TAKEOVER_MODAL_BLOCK;
trackAnalyticsEventBinding(USER_TAKEOVER_MODAL_BLOCK);
}
function* _fun107924() { // fn#107924, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14462:1497, offset: 0x0230eeb0, size: 219 bytes, params: 1, frame: 20
var environment;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_9;
if (binding.getUser(require) != null) {
useState(true);
binding = env2_0;
var value5 = binding(env2_2[17]);
var submitReportForInappropriateConversationSafetyAlert = value5.submitReportForInappropriateConversationSafetyAlert;
binding = env1_5;
yield Reflect.apply(submitReportForInappropriateConversationSafetyAlert, value5, [binding, _fun107925,
_fun107926]);
if (false) {
return undefined;
if (value7) {
object2.text = Reflect.apply(string, intl, [t.HQ2nKl]);
object2.onPress = function() {
importDefault(dependencyMap[27]).openURL(THROUGHLINE_URL);
trackAnalyticsEvent(require(dependencyMap[16]).CtaEventTypes.USER_TAKEOVER_MODAL_THROUGHLINE);
};
items4 = [
<Button {...object2} />,
];
string = intl.string;
items4[1] = (
<Text
variant="text-xs/medium"
color="text-default"
style={styles.textCenter}
>
{Reflect.apply(string, intl, [t['PMeb/r']])}
</Text>
);
viewBinding2Props.children = items4;
} else {
object2.text = Reflect.apply(string, intl, [t['65XQar']]);
object2.onPress = onPress_107930;
items3 = [
<Button {...object2} />,
];
string = intl.string;
items3[1] = (
<Text
variant="text-xs/medium"
color="text-default"
style={styles.textCenter}
>
{Reflect.apply(string, intl, [t.XNwhxC])}
</Text>
);
viewBinding2Props.children = items3;
}
useState(false);
binding = env2_1;
var binding2 = env2_2;
binding(binding2[15]).showReportSuccessToast(require, importDefault);
binding = env1_3;
var CtaEventTypes = env2_0(binding2[16]).CtaEventTypes;
var USER_TAKEOVER_MODAL_REPORT = CtaEventTypes.USER_TAKEOVER_MODAL_REPORT;
binding(USER_TAKEOVER_MODAL_REPORT);
r5 = <View {...viewBinding2Props} />;
}
items2[2] = r5;
return (
<View style={styles.container}>
{items2}
</View>
);
function _fun107920() { // fn#107920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14462:1163, offset: 0x0230ed8a, size: 112 bytes, params: 1, frame: 18
const defaultImport = RelationshipActionCreators;
defaultImport.blockUser(senderId, {location: MODAL_LOCATION_CONTEXT_MOBILE}).then(_fun107921);
const trackAnalyticsEventBinding = trackAnalyticsEvent;
const CtaEventTypes = (SafetyWarningUtilsModule).CtaEventTypes;
const USER_TAKEOVER_MODAL_BLOCK = CtaEventTypes.USER_TAKEOVER_MODAL_BLOCK;
trackAnalyticsEventBinding(USER_TAKEOVER_MODAL_BLOCK);
function _fun107921() { // fn#107921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14462:1209, offset: 0x0230edfa, size: 50 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = importDefault(6264) /* metro dependency 6264: SafetyToastsActionCreatorsNative */;
value.showBlockSuccessToast(senderId, channelId);
}
}
function* _fun107924() { // fn#107924, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14462:1497, offset: 0x0230eeb0, size: 219 bytes, params: 1, frame: 20
var environment;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_9;
if (binding.getUser(require) != null) {
useState(true);
binding = env2_0;
var value5 = binding(env2_2[17]);
var submitReportForInappropriateConversationSafetyAlert = value5.submitReportForInappropriateConversationSafetyAlert;
binding = env1_5;
yield Reflect.apply(submitReportForInappropriateConversationSafetyAlert, value5, [binding, _fun107925,
_fun107926]);
if (false) {
return undefined;
}
useState(false);
binding = env2_1;
var binding2 = env2_2;
binding(binding2[15]).showReportSuccessToast(require, importDefault);
binding = env1_3;
var CtaEventTypes = env2_0(binding2[16]).CtaEventTypes;
var USER_TAKEOVER_MODAL_REPORT = CtaEventTypes.USER_TAKEOVER_MODAL_REPORT;
binding(USER_TAKEOVER_MODAL_REPORT);
}
}
function _fun107925() { // fn#107925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14462:1606, offset: 0x0230ef8b, size: 165 bytes, params: 1, frame: 19
dependencyMap(true);
let binding = env3_1;
const binding2 = env3_2;
const value3 = binding(binding2[18]);
const open = value3.open;
const object = {key: env3_13};
binding = env3_0;
const intl = binding(binding2[19]).intl;
object.content = intl.string(binding(binding2[19]).t.gn2c6X);
const CircleCheckIcon = binding(binding2[20]).CircleCheckIcon;
object.IconComponent = CircleCheckIcon;
object.iconColor = env3_14;
object.containerStyle = env2_4.toastContainer;
Reflect.apply(open, value3, [object]);
}
function _fun107926() { // fn#107926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14462:1774, offset: 0x0230f030, size: 87 bytes, params: 1, frame: 16
let value = environment.__proto__.__proto__.__proto__;
const binding = env3_0;
const binding2 = env3_2;
value = binding(binding2[21]);
const presentFailedToast = value.presentFailedToast;
const intl = binding(binding2[19]).intl;
Reflect.apply(presentFailedToast, value, [intl.string(binding(binding2[19]).t['0YV04/'])]);
}
}
function TakeActionButtonsOnPress() { // fn#107927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14462:2386, owner: TakeActionButtons.onPress, offset: 0x0216c86e, size: 15 bytes, params: 1, frame: 9
env0_8();
}
function TakeActionButtonsOnPress_107928() { // fn#107928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14462:2524, owner: TakeActionButtons.onPress, offset: 0x0230f087, size: 71 bytes, params: 1, frame: 12
env0_7.push('CRISIS_TEXT_LINE');
const trackAnalyticsEventBinding = trackAnalyticsEvent;
const CtaEventTypes = (SafetyWarningUtilsModule).CtaEventTypes;
const USER_TAKEOVER_MODAL_CTL = CtaEventTypes.USER_TAKEOVER_MODAL_CTL;
trackAnalyticsEventBinding(USER_TAKEOVER_MODAL_CTL);
}
function TakeActionButtonsOnPress_107930() { // fn#107930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14462:3156, owner: TakeActionButtons.onPress, offset: 0x0230f120, size: 82 bytes, params: 1, frame: 14
(Linking).openURL(NOFILTR_URL);
const trackAnalyticsEventBinding = trackAnalyticsEvent;
const CtaEventTypes = (SafetyWarningUtilsModule).CtaEventTypes;
const USER_TAKEOVER_MODAL_NO_FILTR = CtaEventTypes.USER_TAKEOVER_MODAL_NO_FILTR;
trackAnalyticsEventBinding(USER_TAKEOVER_MODAL_NO_FILTR);
}
}
}
function TakeActionButtonsOnPress_107928() { // fn#107928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14462:2524, owner: TakeActionButtons.onPress, offset: 0x0230f087, size: 71 bytes, params: 1, frame: 12
env0_7.push('CRISIS_TEXT_LINE');
const trackAnalyticsEventBinding = trackAnalyticsEvent;
const CtaEventTypes = (require(9731) /* metro dependency 9731: SafetyWarningUtils */).CtaEventTypes;
const USER_TAKEOVER_MODAL_CTL = CtaEventTypes.USER_TAKEOVER_MODAL_CTL;
trackAnalyticsEventBinding(USER_TAKEOVER_MODAL_CTL);
}
function TakeActionButtonsOnPress_107930() { // fn#107930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14462:3156, owner: TakeActionButtons.onPress, offset: 0x0230f120, size: 82 bytes, params: 1, frame: 14
(importDefault(3853) /* metro dependency 3853: Linking */).openURL(NOFILTR_URL);
const trackAnalyticsEventBinding = trackAnalyticsEvent;
const CtaEventTypes = (require(9731) /* metro dependency 9731: SafetyWarningUtils */).CtaEventTypes;
const USER_TAKEOVER_MODAL_NO_FILTR = CtaEventTypes.USER_TAKEOVER_MODAL_NO_FILTR;
trackAnalyticsEventBinding(USER_TAKEOVER_MODAL_NO_FILTR);
}
function _fun107921() { // fn#107921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14462:1209, offset: 0x0230edfa, size: 50 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = importDefault(6264) /* metro dependency 6264: SafetyToastsActionCreatorsNative */;
value.showBlockSuccessToast(senderId, channelId);
}
function _fun107925() { // fn#107925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14462:1606, offset: 0x0230ef8b, size: 165 bytes, params: 1, frame: 19
dependencyMap(true);
let binding = env3_1;
const binding2 = env3_2;
const value3 = binding(binding2[18]);
const open = value3.open;
const object2 = {key: env3_13};
binding = env3_0;
const intl = binding(binding2[19]).intl;
object2.content = intl.string(binding(binding2[19]).t.gn2c6X);
const CircleCheckIcon = binding(binding2[20]).CircleCheckIcon;
object2.IconComponent = CircleCheckIcon;
object2.iconColor = env3_14;
object2.containerStyle = env2_4.toastContainer;
Reflect.apply(open, value3, [object2]);
}
function _fun107926() { // fn#107926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14462:1774, offset: 0x0230f030, size: 87 bytes, params: 1, frame: 16
let value = environment.__proto__.__proto__.__proto__;
const binding = env3_0;
const binding2 = env3_2;
value = binding(binding2[21]);
const presentFailedToast = value.presentFailedToast;
const intl = binding(binding2[19]).intl;
Reflect.apply(presentFailedToast, value, [intl.string(binding(binding2[19]).t['0YV04/'])]);
}
global.__d(_fun107917, 14265, [5, 57, 31, 27, 3793, 1878, 9734, 33, 4501, 697, 566, 9736, 9737, 1484, 8783, 6264,
9731, 8153, 3857, 1244, 4073, 3856, 4578, 9743, 8666, 6660, 6250, 3853, 4573,
2]) /* metro module 14265, dependencies: [5, 57, 31, 27, 3793, 1878, 9734, 33, 4501, 697, 566, 9736, 9737, 1484, 8783, 6264, 9731, 8153, 3857, 1244, 4073, 3856, 4578, 9743, 8666, 6660, 6250, 3853, 4573, 2] */;
@@ -1,20 +1,24 @@
/* Metro module 15681; source: modules/self_mod/inappropriate_conversation/takeover_modal/showTakeoverModal.native.tsx; dependencies: [9734, 9702, 5080, 14264, 1962, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 9734 */
function _fun120319(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15889:6, offset: 0x02527d9f, size: 124 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(9734) /* metro dependency 9734: Constants */).TAKEOVER_MODAL_KEY;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/inappropriate_conversation/takeover_modal/showTakeoverModal.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/self_mod/inappropriate_conversation/takeover_modal/showTakeoverModal.native.tsx');
exports.showTakeoverModal = showTakeoverModal;
}
function showTakeoverModal({warningId, warningType, senderId, channelId}) { // fn#120320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15889:266, offset: 0x02527e1b, size: 171 bytes, params: 2, frame: 21
var defaultImport;
const moduleValue = require(dependencyMap[1]);
if (moduleValue.isEligibleForInappropriateConversationWarning({location: 'takeover-modal'})) {
defaultImport = importDefault(dependencyMap[2]);
defaultImport.pushLazy(require(dependencyMap[4])(dependencyMap[3], dependencyMap.paths), {warningId: warningId,
warningType: warningType, senderId: senderId, channelId: channelId}, TAKEOVER_MODAL_KEY);
function showTakeoverModal({warningId, warningType, senderId, channelId}) { // fn#120320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15889:266, offset: 0x02527e1b, size: 171 bytes, params: 2, frame: 21
var defaultImport;
const moduleValue = require(dependencyMap[1]);
if (moduleValue.isEligibleForInappropriateConversationWarning({location: 'takeover-modal'})) {
defaultImport = importDefault(dependencyMap[2]);
defaultImport.pushLazy(require(dependencyMap[4])(dependencyMap[3], dependencyMap.paths), {warningId: warningId,
warningType: warningType, senderId: senderId, channelId: channelId}, TAKEOVER_MODAL_KEY);
}
}
}
global.__d(_fun120319, 15681, [9734, 9702, 5080, 14264, 1962,
2]) /* metro module 15681, dependencies: [9734, 9702, 5080, 14264, 1962, 2] */;
@@ -1,30 +1,35 @@
/* Metro module 13358; source: modules/self_mod/inappropriate_conversation/updateDmSafetyAlertsSetting.tsx; dependencies: [1362, 1345, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as WrappersModule from '../../../external/discord_common/js/packages/protos/google/protobuf/wrappers.tsx'; /* Metro dependency 1345 */
import * as UserSettingsProtoActionCreatorsModule from '../../user_settings/UserSettingsProtoActionCreators.tsx'; /* Metro dependency 1362 */
function _fun101720(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13548:6, offset: 0x0221cd69, size: 96 bytes, params: 8, frame: 18
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/inappropriate_conversation/updateDmSafetyAlertsSetting.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/self_mod/inappropriate_conversation/updateDmSafetyAlertsSetting.tsx');
exports.updateDmSafetyAlertsSetting = function(a0) {
var env0_0 = a0;
var PreloadedUserSettingsActionCreators = require(dependencyMap[0]).PreloadedUserSettingsActionCreators;
var INFREQUENT_USER_ACTION = require(dependencyMap[0]).UserSettingsDelay.INFREQUENT_USER_ACTION;
return PreloadedUserSettingsActionCreators.updateAsync('privacy', _fun101722, INFREQUENT_USER_ACTION);
};
function updateDmSafetyAlertsSetting(a0) { // fn#101721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13548:231, offset: 0x0221cdc9, size: 86 bytes, params: 2, frame: 17
const env0_0 = a0;
const PreloadedUserSettingsActionCreators = (UserSettingsProtoActionCreatorsModule).PreloadedUserSettingsActionCreators;
const updateAsync = PreloadedUserSettingsActionCreators.updateAsync;
const UserSettingsDelay = (UserSettingsProtoActionCreatorsModule).UserSettingsDelay;
const INFREQUENT_USER_ACTION = UserSettingsDelay.INFREQUENT_USER_ACTION;
return Reflect.apply(updateAsync, PreloadedUserSettingsActionCreators, ['privacy', _fun101722,
INFREQUENT_USER_ACTION]);
function _fun101722(a0) { // fn#101722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13548:301, offset: 0x0221ce1f, size: 65 bytes, params: 2, frame: 13
const value = environment.__proto__;
const BoolValue = (WrappersModule).BoolValue;
a0.inappropriateConversationWarnings = BoolValue.create({value: env0_0});
}
}
}
function updateDmSafetyAlertsSetting(a0) { // fn#101721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13548:231, offset: 0x0221cdc9, size: 86 bytes, params: 2, frame: 17
const env0_0 = a0;
const PreloadedUserSettingsActionCreators = (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).PreloadedUserSettingsActionCreators;
const updateAsync = PreloadedUserSettingsActionCreators.updateAsync;
const UserSettingsDelay = (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).UserSettingsDelay;
const INFREQUENT_USER_ACTION = UserSettingsDelay.INFREQUENT_USER_ACTION;
return Reflect.apply(updateAsync, PreloadedUserSettingsActionCreators, ['privacy', _fun101722,
INFREQUENT_USER_ACTION]);
}
function _fun101722(a0) { // fn#101722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13548:301, offset: 0x0221ce1f, size: 65 bytes, params: 2, frame: 13
const value = environment.__proto__;
const BoolValue = (require(1345) /* metro dependency 1345: wrappers */).BoolValue;
a0.inappropriateConversationWarnings = BoolValue.create({value: env0_0});
}
global.__d(_fun101720, 13358, [1362, 1345, 2]) /* metro module 13358, dependencies: [1362, 1345, 2] */;