Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,58 @@
|
||||
/* Metro module 9732; source: modules/self_mod/ChannelSafetyWarningsActionCreators.tsx; dependencies: [9706, 661, 694, 507, 2] */
|
||||
function _fun76464(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9918:6, offset: 0x01dd00fb, size: 215 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(9706) /* metro dependency 9706: ChannelSafetyWarningsStore */).SafetyWarningTypes;
|
||||
const env0_4 = (require(661) /* metro dependency 661: Constants */).Endpoints;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/ChannelSafetyWarningsActionCreators.tsx');
|
||||
exports.dismissChannelSafetyWarnings = dismissChannelSafetyWarnings;
|
||||
exports.setChannelSafetyWarningFeedback = setChannelSafetyWarningFeedback;
|
||||
exports.clearChannelSafetyWarnings = clearChannelSafetyWarnings;
|
||||
exports.acknowledgeChannelSafetyWarningTooltip = acknowledgeChannelSafetyWarningTooltip;
|
||||
exports.reportFalsePositive = function(a0) {
|
||||
var HTTP = require(dependencyMap[3]).HTTP;
|
||||
var object = {};
|
||||
object.url = Endpoints.SAFETY_WARNING_FALSE_POSITIVE(a0);
|
||||
object.rejectWithError = false;
|
||||
return HTTP.post(object);
|
||||
};
|
||||
exports.markAsStrangerDanger = function(a0) {
|
||||
var HTTP = require(dependencyMap[3]).HTTP;
|
||||
var object = {};
|
||||
object.url = Endpoints.ADD_SAFETY_WARNING(a0);
|
||||
object.body = {safety_warning_type: SafetyWarningTypes.STRANGER_DANGER};
|
||||
object.rejectWithError = false;
|
||||
return HTTP.post(object);
|
||||
};
|
||||
}
|
||||
|
||||
function dismissChannelSafetyWarnings(a0, a1) { // fn#76465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9918:266, offset: 0x01dd01d2, size: 143 bytes, params: 3, frame: 17
|
||||
var object2;
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'DISMISS_CHANNEL_SAFETY_WARNINGS',
|
||||
channelId: a0, warningIds: a1});
|
||||
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
|
||||
const post = HTTP.post;
|
||||
object2 = {};
|
||||
object2.url = Endpoints.CHANNEL_SAFETY_WARNINGS_ACK(a0);
|
||||
object2.body = {warning_ids: a1};
|
||||
object2.oldFormErrors = true;
|
||||
object2.rejectWithError = false;
|
||||
return Reflect.apply(post, HTTP, [object2]);
|
||||
}
|
||||
|
||||
function setChannelSafetyWarningFeedback(a0, a1, a2) { // fn#76466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9918:550, offset: 0x01dd0261, size: 72 bytes, params: 4, frame: 13
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANNEL_SAFETY_WARNING_FEEDBACK',
|
||||
channelId: a0, warningId: a1, feedbackType: a2});
|
||||
}
|
||||
|
||||
function clearChannelSafetyWarnings(a0) { // fn#76467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9918:726, offset: 0x01dd02a9, size: 56 bytes, params: 2, frame: 13
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CLEAR_CHANNEL_SAFETY_WARNINGS',
|
||||
channelId: a0});
|
||||
}
|
||||
|
||||
function acknowledgeChannelSafetyWarningTooltip(a0) { // fn#76468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9918:876, offset: 0x01dd02e1, size: 56 bytes, params: 2, frame: 13
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'ACKNOWLEDGE_CHANNEL_SAFETY_WARNING_TOOLTIP',
|
||||
channelId: a0});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,176 @@
|
||||
/* Metro module 15680; source: modules/self_mod/ChannelSafetyWarningsManager.tsx; dependencies: [7, 6, 15, 17, 18, 1379, 1934, 9702, 9730, 15681, 4860, 2] */
|
||||
function _fun120310(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15888:6, offset: 0x0252792c, size: 280 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
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 channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
||||
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
|
||||
value = _fun120317(value);
|
||||
value = new value();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/ChannelSafetyWarningsManager.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_120311() { // fn#120311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15888:168, offset: 0x02527a44, 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_120311_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function handleChannelSelect_120314({channelId}) { // fn#120314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15888:361, offset: 0x02527aa6, size: 262 bytes, params: 2, frame: 16
|
||||
var r0;
|
||||
var moduleValue2;
|
||||
var channel;
|
||||
var inappropriateConversationTakeoverForChannel;
|
||||
var value4;
|
||||
var showTakeoverModal;
|
||||
if (channelId != null) {
|
||||
var value;
|
||||
var moduleValue = require(9702) /* metro dependency 9702: SelfModInappropriateConversationExperiment */;
|
||||
var isEligibleForInappropriateConversationWarning = moduleValue.isEligibleForInappropriateConversationWarning;
|
||||
var object2 = {location: 'channel_select'};
|
||||
if (Reflect.apply(isEligibleForInappropriateConversationWarning, moduleValue, [object2])) {
|
||||
moduleValue2 = require(9730) /* metro dependency 9730: InappropriateConversationUtils */;
|
||||
if (moduleValue2.getSafetyAlertsSettingOrDefault()) {
|
||||
channel = ChannelStore.getChannel(channelId);
|
||||
if (channel == null) {
|
||||
return false;
|
||||
}
|
||||
if (channel.isDM()) {
|
||||
inappropriateConversationTakeoverForChannel = (require(9730) /* metro dependency 9730: InappropriateConversationUtils */).getInappropriateConversationTakeoverForChannel(channelId);
|
||||
value4 = inappropriateConversationTakeoverForChannel != null;
|
||||
if (value4) {
|
||||
value = require(15681) /* metro dependency 15681: showTakeoverModalNative */;
|
||||
showTakeoverModal = value.showTakeoverModal;
|
||||
object2 = {};
|
||||
object2.warningId = inappropriateConversationTakeoverForChannel.id;
|
||||
object2.warningType = inappropriateConversationTakeoverForChannel.type;
|
||||
object2.senderId = channel.getRecipientId();
|
||||
object2.channelId = channelId;
|
||||
Reflect.apply(showTakeoverModal, value, [object2]);
|
||||
value = true;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value4;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function handleChannelUpdates_120315({channels}) { // fn#120315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15888:817, offset: 0x02527bac, size: 305 bytes, params: 2, frame: 16
|
||||
var r2;
|
||||
var r0;
|
||||
var moduleValue2;
|
||||
var value3;
|
||||
var moduleValue3;
|
||||
var getInappropriateConversationTakeoverForChannel;
|
||||
var id;
|
||||
var value4;
|
||||
var showTakeoverModal;
|
||||
var value;
|
||||
const selfModInappropriateConversationExperimentModule = require(9702) /* metro dependency 9702: SelfModInappropriateConversationExperiment */;
|
||||
const isEligibleForInappropriateConversationWarning = selfModInappropriateConversationExperimentModule.isEligibleForInappropriateConversationWarning;
|
||||
let object2 = {location: 'channel_updates'};
|
||||
if (Reflect.apply(isEligibleForInappropriateConversationWarning, selfModInappropriateConversationExperimentModule,
|
||||
[object2])) {
|
||||
moduleValue2 = require(9730) /* metro dependency 9730: InappropriateConversationUtils */;
|
||||
if (moduleValue2.getSafetyAlertsSettingOrDefault()) {
|
||||
if (SelectedChannelStore.getCurrentlySelectedChannelId() == null) {
|
||||
return false;
|
||||
}
|
||||
value3 = channels.find(_fun120316);
|
||||
if (value3 == null) {
|
||||
return false;
|
||||
}
|
||||
moduleValue3 = require(9730) /* metro dependency 9730: InappropriateConversationUtils */;
|
||||
getInappropriateConversationTakeoverForChannel = moduleValue3.getInappropriateConversationTakeoverForChannel;
|
||||
id = value3.id;
|
||||
value4 = Reflect.apply(getInappropriateConversationTakeoverForChannel, moduleValue3, [id]);
|
||||
r2 = value4 == null || !value3.isDM();
|
||||
if (r2) {
|
||||
r0 = !r2;
|
||||
} else {
|
||||
value = require(15681) /* metro dependency 15681: showTakeoverModalNative */;
|
||||
showTakeoverModal = value.showTakeoverModal;
|
||||
object2 = {};
|
||||
id = value4.id;
|
||||
object2.warningId = id;
|
||||
object2.warningType = value4.type;
|
||||
object2.senderId = value3.getRecipientId();
|
||||
id = value3.id;
|
||||
object2.channelId = id;
|
||||
Reflect.apply(showTakeoverModal, value, [object2]);
|
||||
value = true;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function _fun120317(a0) { // fn#120317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15888:1338, offset: 0x02527cdd, size: 42 bytes, params: 2, frame: 14
|
||||
const closure = ChannelSafetyWarningsManager;
|
||||
env0_6(closure, a0);
|
||||
return env0_2(closure);
|
||||
}
|
||||
|
||||
function ChannelSafetyWarningsManager(a0) { // fn#120318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15888:1350, offset: 0x02527d07, size: 152 bytes, params: 2, frame: 20
|
||||
var r0;
|
||||
var Reflect;
|
||||
let value = copyRestArgs(0, undefined);
|
||||
let binding = env1_3;
|
||||
binding(this, ChannelSafetyWarningsManager);
|
||||
const items = [];
|
||||
arraySpread(items, value, 0, items);
|
||||
value = env1_5(ChannelSafetyWarningsManager);
|
||||
binding = env1_4;
|
||||
if (_isNativeReflectConstruct_120311()) {
|
||||
Reflect = global.Reflect;
|
||||
value = Reflect.construct(value, items, env1_5(this).constructor);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = value.apply(this, items);
|
||||
r0 = value;
|
||||
}
|
||||
value = binding(this, r0);
|
||||
value.actions = {CHANNEL_SELECT: handleChannelSelect_120314, CHANNEL_UPDATES: handleChannelUpdates_120315};
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,239 @@
|
||||
/* Metro module 9706; source: modules/self_mod/ChannelSafetyWarningsStore.tsx; dependencies: [6, 7, 15, 17, 18, 1379, 672, 566, 694, 2] */
|
||||
function _fun76269(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9892:6, offset: 0x01dc8f05, size: 557 bytes, params: 8, frame: 24
|
||||
var object3;
|
||||
const closure = CONNECTION_OPEN_76275;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_1 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_2 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_3 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_4 = importDefault(18) /* metro dependency 18 */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
const SECOND = Millis.SECOND;
|
||||
const env0_6 = 5 * SECOND;
|
||||
object3 = {STRANGER_DANGER: 1};
|
||||
object3[1] = 'STRANGER_DANGER';
|
||||
object3.INAPPROPRIATE_CONVERSATION_TIER_1 = 2;
|
||||
object3[2] = 'INAPPROPRIATE_CONVERSATION_TIER_1';
|
||||
object3.INAPPROPRIATE_CONVERSATION_TIER_2 = 3;
|
||||
object3[3] = 'INAPPROPRIATE_CONVERSATION_TIER_2';
|
||||
object3.LIKELY_ATO = 4;
|
||||
object3[4] = 'LIKELY_ATO';
|
||||
const object4 = {UPVOTE: 0};
|
||||
object4[0] = 'UPVOTE';
|
||||
object4.DOWNVOTE = 1;
|
||||
object4[1] = 'DOWNVOTE';
|
||||
const env0_8 = [];
|
||||
const env0_9 = {};
|
||||
const Set = global.Set;
|
||||
let set = new Set();
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
set = _fun76277(Store);
|
||||
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */, {CHANNEL_CREATE: function(a0) {
|
||||
processChannel_76273(a0.channel);
|
||||
}, CHANNEL_DELETE: CHANNEL_DELETE_76285, CHANNEL_UPDATES: function({channels}) {
|
||||
channels.forEach(_fun76287);
|
||||
}, CONNECTION_OPEN: closure, CONNECTION_OPEN_SUPPLEMENTAL: closure,
|
||||
CHANNEL_SAFETY_WARNING_FEEDBACK: CHANNEL_SAFETY_WARNING_FEEDBACK,
|
||||
CLEAR_CHANNEL_SAFETY_WARNINGS: CLEAR_CHANNEL_SAFETY_WARNINGS,
|
||||
DISMISS_CHANNEL_SAFETY_WARNINGS: DISMISS_CHANNEL_SAFETY_WARNINGS,
|
||||
ACKNOWLEDGE_CHANNEL_SAFETY_WARNING_TOOLTIP: ACKNOWLEDGE_CHANNEL_SAFETY_WARNING_TOOLTIP});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/ChannelSafetyWarningsStore.tsx');
|
||||
exports.default = set;
|
||||
exports.SafetyWarningTypes = object3;
|
||||
exports.SafetyWarningFeedbackTypes = object4;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_76270() { // fn#76270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9892:158, offset: 0x01dc9132, 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_76270_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function processChannel_76273(a0) { // fn#76273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9892:733, offset: 0x01dc9194, size: 150 bytes, params: 2, frame: 14
|
||||
var binding;
|
||||
var id;
|
||||
var value2;
|
||||
const safetyWarnings = a0.safetyWarnings;
|
||||
if (safetyWarnings != null) {
|
||||
binding = env0_9;
|
||||
binding[a0.id] = safetyWarnings;
|
||||
value2 = safetyWarnings.some(_fun76274);
|
||||
binding = env0_10;
|
||||
if (value2) {
|
||||
binding.add(a0.id);
|
||||
} else {
|
||||
binding.delete(a0.id);
|
||||
}
|
||||
}
|
||||
if (safetyWarnings == null) {
|
||||
binding = env0_9;
|
||||
id = a0.id;
|
||||
if (binding[id] != null) {
|
||||
delete env0_9[a0.id];
|
||||
}
|
||||
binding = env0_10;
|
||||
id = a0.id;
|
||||
binding.delete(id);
|
||||
}
|
||||
}
|
||||
|
||||
function CONNECTION_OPEN_76275() { // fn#76275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9892:1172, offset: 0x01dc92b7, size: 64 bytes, params: 1, frame: 12
|
||||
env0_9 = {};
|
||||
const Object = global.Object;
|
||||
const values = Object.values;
|
||||
const getMutablePrivateChannels = ChannelStore.getMutablePrivateChannels;
|
||||
Reflect.apply(values, Object, [Reflect.apply(getMutablePrivateChannels, ChannelStore, [])]).forEach(function(a0) {
|
||||
processChannel_76273(a0);
|
||||
});
|
||||
}
|
||||
|
||||
function _fun76277(a0) { // fn#76277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9892:1294, offset: 0x01dc930a, size: 149 bytes, params: 2, frame: 16
|
||||
const closure = ChannelSafetyWarningsStore;
|
||||
env0_4(closure, a0);
|
||||
return env0_1(closure, [{key: 'initialize', value: function() {
|
||||
this.waitFor(ChannelStore);
|
||||
}}, {key: 'getChannelSafetyWarning', value: value_76280}, {key: 'getChannelSafetyWarnings', value: value_76282},
|
||||
{key: 'hasShownInitialTooltipForChannel', value: value_76283}]);
|
||||
}
|
||||
|
||||
function CHANNEL_DELETE_76285({channel}) { // fn#76285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9892:2077, offset: 0x01dc93ed, size: 66 bytes, params: 2, frame: 12
|
||||
if (env0_9[channel.id] != null) {
|
||||
delete env0_9[channel.id];
|
||||
}
|
||||
env0_10.delete(channel.id);
|
||||
}
|
||||
|
||||
function CHANNEL_UPDATES_76286({channels}) { // fn#76286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9892:2187, offset: 0x01dc942f, size: 32 bytes, params: 2, frame: 11
|
||||
channels.forEach(function(a0) {
|
||||
processChannel_76273(a0);
|
||||
});
|
||||
}
|
||||
|
||||
function CHANNEL_SAFETY_WARNING_FEEDBACK({channelId, warningId, feedbackType}) { // fn#76288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9892:2385, offset: 0x01dc944f, size: 76 bytes, params: 2, frame: 13
|
||||
const property = env0_9[channelId];
|
||||
if (property != null) {
|
||||
env0_9[channelId] = property.map(function(a0) {
|
||||
var r0;
|
||||
var object;
|
||||
var value = a0;
|
||||
var id = value.id;
|
||||
if (id !== warningId) {
|
||||
r0 = value;
|
||||
} else {
|
||||
object = {};
|
||||
copyDataProperties(object, value, id);
|
||||
object['feedback_type'] = feedbackType;
|
||||
r0 = object;
|
||||
}
|
||||
return r0;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function CLEAR_CHANNEL_SAFETY_WARNINGS({channelId}) { // fn#76290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9892:2575, offset: 0x01dc94cf, size: 70 bytes, params: 2, frame: 13
|
||||
const property = env0_9[channelId];
|
||||
env0_10.delete(channelId);
|
||||
if (property != null) {
|
||||
env0_9[channelId] = property.map(function(a0) {
|
||||
var r2;
|
||||
var object = {};
|
||||
copyDataProperties(object, a0, r2);
|
||||
object['dismiss_timestamp'] = undefined;
|
||||
return object;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function DISMISS_CHANNEL_SAFETY_WARNINGS({channelId, warningIds}) { // fn#76292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9892:2750, offset: 0x01dc952e, size: 112 bytes, params: 2, frame: 15
|
||||
var Date;
|
||||
var value2;
|
||||
var date;
|
||||
var env0_1;
|
||||
const property = env0_9[channelId];
|
||||
if (property != null) {
|
||||
Date = global.Date;
|
||||
value2 = Object.create(Date.prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
env0_1 = (date instanceof Object ? date : value2).toISOString();
|
||||
env0_9[channelId] = property.map(_fun76293);
|
||||
}
|
||||
}
|
||||
|
||||
function ACKNOWLEDGE_CHANNEL_SAFETY_WARNING_TOOLTIP({channelId}) { // fn#76294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9892:2984, offset: 0x01dc95db, size: 29 bytes, params: 2, frame: 11
|
||||
env0_10.add(channelId);
|
||||
}
|
||||
|
||||
function _fun76274(a0) { // fn#76274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9892:811, offset: 0x01dc922a, size: 141 bytes, params: 2, frame: 14
|
||||
var dismiss_timestamp;
|
||||
var Date;
|
||||
var value5;
|
||||
var date;
|
||||
var time;
|
||||
const type = a0.type;
|
||||
const value = environment.__proto__;
|
||||
const INAPPROPRIATE_CONVERSATION_TIER_1 = env1_7.INAPPROPRIATE_CONVERSATION_TIER_1;
|
||||
let r0 = (type === INAPPROPRIATE_CONVERSATION_TIER_1 || a0.type === env1_7.INAPPROPRIATE_CONVERSATION_TIER_2) && a0.dismiss_timestamp != null;
|
||||
if (r0) {
|
||||
dismiss_timestamp = a0.dismiss_timestamp;
|
||||
Date = global.Date;
|
||||
value5 = Object.create(Date.prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
time = (date instanceof Object ? date : value5).getTime();
|
||||
Date = global.Date;
|
||||
r0 = !(time > Date.now() - env1_6);
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function value_76280(a0, a1) { // fn#76280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9892:1720, offset: 0x01dc939f, size: 54 bytes, params: 3, frame: 12
|
||||
var environment;
|
||||
const env0_0 = a1;
|
||||
const value = environment.__proto__;
|
||||
return env1_9[a0]?.find(function({id}) {
|
||||
return id === require;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun76293(a0) { // fn#76293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9892:2888, offset: 0x01dc959e, size: 61 bytes, params: 2, frame: 14
|
||||
var r0;
|
||||
var object2;
|
||||
const value = a0;
|
||||
const warningIdsBinding = warningIds;
|
||||
if (warningIdsBinding.includes(value.id)) {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, value, warningIdsBinding);
|
||||
object2['dismiss_timestamp'] = env0_1;
|
||||
r0 = object2;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/* Metro module 9734; source: modules/self_mod/Constants.tsx; dependencies: [1244, 2] */
|
||||
function _fun76474(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9920:6, offset: 0x01dd04ef, size: 426 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/Constants.tsx');
|
||||
exports.LOCATION_CONTEXT_MOBILE = 'SAFETY_WARNING_BANNER_MOBILE';
|
||||
exports.LOCATION_CONTEXT_WEB = 'SAFETY_WARNING_BANNER_WEB';
|
||||
exports.UPVOTE_FEEDBACK_CONFIRMATION_TOAST_KEY = 'STRANGER_DANGER_UPVOTE_FEEDBACK_CONFIRMED';
|
||||
exports.DOWNVOTE_FEEDBACK_CONFIRMATION_TOAST_KEY = 'STRANGER_DANGER_DOWNVOTE_FEEDBACK_CONFIRMED';
|
||||
exports.STRANGER_DANGER_MORE_TIPS_MODAL_KEY = 'STRANGER_DANGER_MORE_TIPS_MODAL';
|
||||
exports.SAFETY_TIPS_GRADIENT_START_COLOR = '#5865f200';
|
||||
exports.SAFETY_TIPS_GRADIENT_END_COLOR = '#5865F2';
|
||||
exports.FEEDBACK_BUTTON_ACTIVE_BACKGROUND_COLOR = '#5865f226';
|
||||
exports.TOAST_CHECKMARK_ICON_COLOR = 'status-positive';
|
||||
exports.TOAST_SHIELD_ICON_COLOR = 'text-brand';
|
||||
exports.TAKEOVER_MODAL_KEY = 'INAPPROPRIATE_CONVERSATION_TAKEOVER_MODAL';
|
||||
exports.VIBING_WUMPUS_MODAL_KEY = 'INAPPROPRIATE_CONVERSATION_VIBING_WUMPUS_MODAL';
|
||||
exports.CRISIS_TEXT_LINE_URL = 'https://www.crisistextline.org/';
|
||||
exports.CRISIS_TEXT_LINE_SMS_URI = 'sms:741-741?body=DISCORD';
|
||||
exports.NOFILTR_URL = 'https://nofiltr.org/resources-hub/';
|
||||
exports.THROUGHLINE_URL = 'https://discord.findahelpline.com/';
|
||||
exports.REPORTED_USER_CONFIRMATION_TOAST_KEY = 'STRANGER_DANGER_WARNING_REPORTED_USER_CONFIRMED';
|
||||
exports.MODAL_LOCATION_CONTEXT_MOBILE = 'InappropriateConversationModal-mobile';
|
||||
exports.MODAL_LOCATION_CONTEXT_WEB = 'InappropriateConversationModal-web';
|
||||
exports.ACTION_SHEET_CONTEXT_MOBILE = 'SafetyToolsActionSheet-mobile';
|
||||
exports.SAFETY_TOOLS_MODAL_KEY = 'PRIVATE_DM_SAFETY_TOOLS_MODAL';
|
||||
exports.WEB_SAFETY_TOOLS_CONTEXT = 'SafetyToolsActionSheet-web';
|
||||
exports.getSafetyToolsActionSheetKey = function(a0) {
|
||||
return 'SAFETY_TOOLS_ACTION_SHEET_' + a0;
|
||||
};
|
||||
exports.getStrangerDangerSafetyTips = getStrangerDangerSafetyTips;
|
||||
exports.getInappropriateConversationsSafetyTips = getInappropriateConversationsSafetyTips;
|
||||
exports.SAFETY_TOOLS_IGNORED_USER_TOAST_KEY = 'SAFETY_TOOLS_IGNORED_USER_CONFIRMED';
|
||||
exports.SAFETY_TOOLS_UNIGNORED_USER_TOAST_KEY = 'SAFETY_TOOLS_UNIGNORED_USER_CONFIRMED';
|
||||
}
|
||||
|
||||
function getStrangerDangerSafetyTips() { // fn#76476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9920:1596, offset: 0x01dd06b6, size: 171 bytes, params: 1, frame: 16
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const items2 = [Reflect.apply(string, intl, [t['26fDv4']])];
|
||||
items2[1] = intl.string(t.togDfk);
|
||||
string = intl.string;
|
||||
const O4Ljca = t.O4Ljca;
|
||||
items2[2] = Reflect.apply(string, intl, [O4Ljca]);
|
||||
return items2;
|
||||
}
|
||||
|
||||
function getInappropriateConversationsSafetyTips() { // fn#76477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9920:1761, offset: 0x01dd0761, size: 171 bytes, params: 1, frame: 16
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const items2 = [Reflect.apply(string, intl, [t.bCWw8l])];
|
||||
items2[1] = intl.string(t.mzSucz);
|
||||
string = intl.string;
|
||||
const ZkmC7s = t.ZkmC7s;
|
||||
items2[2] = Reflect.apply(string, intl, [ZkmC7s]);
|
||||
return items2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/* Metro module 9733; source: modules/self_mod/SafetyToolsActionCreators.native.tsx; dependencies: [9734, 4080, 9735, 1962, 2] */
|
||||
function _fun76471(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9919:6, offset: 0x01dd03c0, 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 */).getSafetyToolsActionSheetKey;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/SafetyToolsActionCreators.native.tsx');
|
||||
exports.openSafetyToolsActionSheet = openSafetyToolsActionSheet;
|
||||
}
|
||||
|
||||
function openSafetyToolsActionSheet(a0, a1, a2, a3) { // fn#76472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9919:251, offset: 0x01dd043c, size: 134 bytes, params: 5, frame: 19
|
||||
const safetyToolsActionSheetKey = getSafetyToolsActionSheetKey(a0);
|
||||
const defaultImport = importDefault(dependencyMap[1]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
let value = require(dependencyMap[3]);
|
||||
value = value(dependencyMap[2], dependencyMap.paths);
|
||||
Reflect.apply(openLazy, defaultImport, [value, safetyToolsActionSheetKey, {channelId: a0, warningId: a2,
|
||||
warningType: a3, recipientId: a1, onClose: onClose_76473}]);
|
||||
}
|
||||
|
||||
function openSafetyToolsActionSheetOnClose() { // fn#76473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9919:401, owner: openSafetyToolsActionSheet.onClose, offset: 0x01dd04c2, size: 45 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet(env0_0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/* Metro module 4825; source: modules/self_mod/SelfModUtils.tsx; dependencies: [1878, 2] */
|
||||
function _fun42083(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5003:6, offset: 0x0112fc53, size: 104 bytes, params: 8, frame: 17
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/SelfModUtils.tsx');
|
||||
exports.isCurrentUserTeen = isCurrentUserTeen;
|
||||
}
|
||||
|
||||
function isCurrentUserTeen() { // fn#42084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5003:193, offset: 0x0112fcbb, size: 41 bytes, params: 1, frame: 10
|
||||
return UserStore.getCurrentUser()?.nsfwAllowed === false;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
/* Metro module 11293; source: modules/self_mod/hooks/useChannelSafetyWarning.tsx; dependencies: [9706, 566, 2] */
|
||||
function _fun86190(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11479:6, offset: 0x01f8b03e, 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/hooks/useChannelSafetyWarning.tsx');
|
||||
exports.useChannelSafetyWarning = useChannelSafetyWarning;
|
||||
}
|
||||
|
||||
function useChannelSafetyWarning(a0, a1) { // fn#86191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11479:216, offset: 0x01f8b0b0, size: 117 bytes, params: 3, frame: 16
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
let value = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelSafetyWarningsStore],
|
||||
_fun86192, [a0]);
|
||||
value = value.filter(function({type}) {
|
||||
return type === require;
|
||||
});
|
||||
return value.find(function(a0) {
|
||||
var r1;
|
||||
var r0;
|
||||
var property;
|
||||
var value = a0.dismiss_timestamp == null;
|
||||
if (value) {
|
||||
value = undefined;
|
||||
r1 = a0 == null ? value : a0.expiry;
|
||||
value = r1 == null;
|
||||
if (value) {
|
||||
r1 = value;
|
||||
} else {
|
||||
property = global.Date;
|
||||
value = property.parse(a0.expiry);
|
||||
property = global.Date;
|
||||
value = value > property.now();
|
||||
r1 = value;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
/* Metro module 8169; source: modules/self_mod/hooks/useUserIsTeen.tsx; dependencies: [1878, 566, 2] */
|
||||
function _fun65552(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8354:6, offset: 0x01bd36d7, size: 114 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 */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/hooks/useUserIsTeen.tsx');
|
||||
exports.useUserIsTeen = useUserIsTeen;
|
||||
}
|
||||
|
||||
function useUserIsTeen() { // fn#65553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8354:196, offset: 0x01bd3749, size: 65 bytes, params: 1, frame: 13
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
return Reflect.apply(useStateFromStores, fluxModule, [[UserStore], _fun65554]) === false;
|
||||
}
|
||||
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
/* Metro module 9730; source: modules/self_mod/inappropriate_conversation/InappropriateConversationUtils.tsx; dependencies: [1348, 1878, 9706, 9731, 2] */
|
||||
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) {
|
||||
var r0;
|
||||
var value = a0.filter(_fun76450);
|
||||
var value2 = value.length > 0;
|
||||
if (value2) {
|
||||
value = value.every(_fun76451);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value2;
|
||||
}
|
||||
return r0;
|
||||
};
|
||||
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');
|
||||
exports.getSafetyAlertsSettingOrDefault = getSafetyAlertsSettingOrDefault;
|
||||
exports.getInappropriateConversationTakeoverForChannel = function(a0) {
|
||||
var value = _fun76454(a0);
|
||||
if (value.filter(_fun76456).length > 0) {
|
||||
return null;
|
||||
}
|
||||
value = value.filter(_fun76457);
|
||||
return value.length !== 1 ? null : value[0];
|
||||
};
|
||||
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 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;
|
||||
}
|
||||
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 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;
|
||||
});
|
||||
}
|
||||
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
/* Metro module 9748; source: modules/self_mod/inappropriate_conversation/InappropriateConversationsActionCreators.tsx; dependencies: [661, 694, 507, 2] */
|
||||
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');
|
||||
exports.playVibingWumpusMusic = playVibingWumpusMusic;
|
||||
exports.stopVibingWumpusMusic = stopVibingWumpusMusic;
|
||||
exports.pauseVibingWumpusMusic = pauseVibingWumpusMusic;
|
||||
exports.deleteAllSafetyWarnings = function(a0) {
|
||||
var HTTP = require(dependencyMap[2]).HTTP;
|
||||
var object = {};
|
||||
object.url = Endpoints.DELETE_SAFETY_WARNINGS(a0);
|
||||
object.rejectWithError = false;
|
||||
return HTTP.del(object);
|
||||
};
|
||||
exports.markAsInappropriateConversation = function(a0, a1) {
|
||||
var HTTP = require(dependencyMap[2]).HTTP;
|
||||
var object = {};
|
||||
object.url = Endpoints.ADD_SAFETY_WARNING(a0);
|
||||
object.body = {safety_warning_type: a1};
|
||||
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
|
||||
(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'});
|
||||
}
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
/* Metro module 9747; source: modules/self_mod/inappropriate_conversation/InappropriateConversationsConstants.tsx; dependencies: [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');
|
||||
exports.VibingWumpusAction = {PLAY: 'play', PAUSE: 'pause', BACK_TO_CONVERSATION: 'back_to_conversation'};
|
||||
exports.VibingWumpusSource = {INAPPROPRIATE_CONVERSATION: 'inappropriate_conversation', KEYBIND: 'keybind'};
|
||||
}
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
/* Metro module 9704; source: modules/self_mod/inappropriate_conversation/InappropriateConversationsDefaultOn.tsx; dependencies: [1358, 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 */;
|
||||
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');
|
||||
exports.InappropriateConversationsDefaultOn = value;
|
||||
exports.isEligibleForInappropriateConversationDefaultOn = isEligibleForInappropriateConversationDefaultOn;
|
||||
exports.useIsEligibleForInappropriateConversationDefaultOn = useIsEligibleForInappropriateConversationDefaultOn;
|
||||
}
|
||||
|
||||
+168
@@ -0,0 +1,168 @@
|
||||
/* Metro module 16146; source: modules/self_mod/inappropriate_conversation/InappropriateConversationsManager.tsx; dependencies: [7, 6, 15, 17, 18, 10756, 16147, 4860, 2] */
|
||||
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',
|
||||
'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');
|
||||
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) {
|
||||
}
|
||||
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();
|
||||
}
|
||||
} 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) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
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;
|
||||
}
|
||||
value = binding(this, r0);
|
||||
value.actions = {VIBING_WUMPUS_PLAY_MUSIC: fadeIn_124762, VIBING_WUMPUS_STOP_MUSIC: handleStopMusic,
|
||||
VIBING_WUMPUS_PAUSE_MUSIC: handlePauseMusic};
|
||||
return value;
|
||||
}
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
/* Metro module 9702; source: modules/self_mod/inappropriate_conversation/SelfModInappropriateConversationExperiment.tsx; dependencies: [1358, 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 */;
|
||||
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');
|
||||
exports.InappropriateConversationExperiment = value;
|
||||
exports.isEligibleForInappropriateConversationWarning = isEligibleForInappropriateConversationWarning;
|
||||
exports.useIsEligibleForInappropriateConversationWarning = useIsEligibleForInappropriateConversationWarning;
|
||||
}
|
||||
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
/* Metro module 11294; source: modules/self_mod/inappropriate_conversation/hooks/useInappropriateConversationBannerForChannel.tsx; dependencies: [9706, 9702, 9703, 9705, 11293, 2] */
|
||||
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');
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/* Metro module 9701; source: modules/self_mod/inappropriate_conversation/hooks/useInappropriateConversationSafetyToolsWarningForChannel.tsx; dependencies: [9702, 9703, 9705, 2] */
|
||||
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');
|
||||
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];
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
/* Metro module 9705; source: modules/self_mod/inappropriate_conversation/hooks/useInappropriateConversationWarningsForChannel.tsx; dependencies: [9706, 566, 2] */
|
||||
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');
|
||||
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 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;
|
||||
}
|
||||
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
/* Metro module 12155; source: modules/self_mod/inappropriate_conversation/hooks/useInappropriateConversationsTiers.tsx; dependencies: [1878, 9706, 9702, 566, 11294, 2] */
|
||||
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');
|
||||
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;
|
||||
} else {
|
||||
r0 = value5;
|
||||
}
|
||||
} else {
|
||||
r0 = value5;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/* Metro module 9736; source: modules/self_mod/inappropriate_conversation/hooks/useLastChannelMessage.tsx; dependencies: [4814, 566, 2] */
|
||||
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');
|
||||
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 (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);
|
||||
}
|
||||
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
/* Metro module 9703; source: modules/self_mod/inappropriate_conversation/hooks/useSafetyAlertsSettingOrDefault.tsx; dependencies: [1348, 1878, 566, 8169, 9704, 2] */
|
||||
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');
|
||||
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 = (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;
|
||||
}
|
||||
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
/* Metro module 9729; source: modules/self_mod/inappropriate_conversation/hooks/useShouldShowInitialSafetyToolsButtonTooltip.tsx; dependencies: [9706, 9701, 566, 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');
|
||||
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);
|
||||
}
|
||||
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
/* Metro module 9728; source: modules/self_mod/inappropriate_conversation/hooks/useShouldShowSafetyToolsButtonTooltipForChannel.tsx; dependencies: [9706, 672, 9701, 9705, 9729, 9730, 2] */
|
||||
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');
|
||||
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;
|
||||
});
|
||||
last = value.findLast(_fun76443);
|
||||
if (last != null) {
|
||||
r1 = last;
|
||||
} else {
|
||||
value = value.findLast(_fun76444);
|
||||
r1 = value;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
/* Metro module 9744; source: modules/self_mod/inappropriate_conversation/native/InappropriateConversationBlockAndReportAlert.tsx; dependencies: [31, 33, 9731, 9745, 1244, 2] */
|
||||
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 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;
|
||||
}
|
||||
|
||||
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 _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 _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 _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);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,177 @@
|
||||
/* 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] */
|
||||
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,
|
||||
[{safetyToolsButton: {backgroundColor: BACKGROUND_BRAND}}]);
|
||||
(require(2) /* metro dependency 2 */).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;
|
||||
}
|
||||
}
|
||||
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};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,184 @@
|
||||
/* 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] */
|
||||
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 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 */;
|
||||
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,
|
||||
'gap': null, 'height': '100%'};
|
||||
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
object5.padding = PX_32;
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object5.gap = PX_16;
|
||||
object4.container = object5;
|
||||
const object6 = {};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.marginBottom = PX_16;
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object6.gap = PX_4;
|
||||
object4.warningText = object6;
|
||||
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');
|
||||
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}
|
||||
</View>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
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) {
|
||||
current = env0_2.current;
|
||||
if (current != null) {
|
||||
current.pause();
|
||||
}
|
||||
}
|
||||
}
|
||||
} 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 _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();
|
||||
}
|
||||
|
||||
+275
@@ -0,0 +1,275 @@
|
||||
/* 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] */
|
||||
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 */;
|
||||
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;
|
||||
const env0_11 = value.TAKEOVER_MODAL_KEY;
|
||||
const env0_12 = value.getInappropriateConversationsSafetyTips;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_13 = value.jsx;
|
||||
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,
|
||||
'gap': null, 'height': '100%'};
|
||||
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
object5.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'};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.marginBottom = PX_16;
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object6.gap = PX_4;
|
||||
object4.warningText = object6;
|
||||
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');
|
||||
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}>
|
||||
<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} />)(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)}
|
||||
/>
|
||||
</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});
|
||||
}
|
||||
|
||||
+128
@@ -0,0 +1,128 @@
|
||||
/* 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] */
|
||||
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 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;
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
+216
@@ -0,0 +1,216 @@
|
||||
/* 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] */
|
||||
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 */;
|
||||
const env0_10 = value.MODAL_LOCATION_CONTEXT_MOBILE;
|
||||
const env0_11 = value.NOFILTR_URL;
|
||||
const env0_12 = value.THROUGHLINE_URL;
|
||||
const env0_13 = value.REPORTED_USER_CONFIRMATION_TOAST_KEY;
|
||||
const env0_14 = value.TOAST_CHECKMARK_ICON_COLOR;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_15 = value.jsx;
|
||||
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');
|
||||
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 */;
|
||||
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;
|
||||
} else {
|
||||
object.text = Reflect.apply(string, intl, [t['65XQar']]);
|
||||
object.onPress = onPress_107930;
|
||||
items3 = [<Button {...object} />];
|
||||
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;
|
||||
}
|
||||
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 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/'])]);
|
||||
}
|
||||
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
/* Metro module 15681; source: modules/self_mod/inappropriate_conversation/takeover_modal/showTakeoverModal.native.tsx; dependencies: [9734, 9702, 5080, 14264, 1962, 2] */
|
||||
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');
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/* Metro module 13358; source: modules/self_mod/inappropriate_conversation/updateDmSafetyAlertsSetting.tsx; dependencies: [1362, 1345, 2] */
|
||||
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');
|
||||
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 = (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});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
/* Metro module 9731; source: modules/self_mod/shared/SafetyWarningUtils.tsx; dependencies: [1878, 661, 683, 2] */
|
||||
function _fun76459(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9917:6, offset: 0x01dcfc29, size: 797 bytes, params: 8, frame: 19
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_3 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/shared/SafetyWarningUtils.tsx');
|
||||
exports.trackViewedEvent = trackViewedEvent;
|
||||
exports.ViewNameTypes = {SAFETY_WARNING_BANNER: 'safety_warning_banner',
|
||||
SAFETY_TAKEOVER_MODAL: 'safety_takeover_modal', SAFETY_TOOLS_NUDGE_TOOLTIP: 'safety_tools_nudge_tooltip',
|
||||
SAFETY_TOOLS_BUTTON: 'safety_tools_button'};
|
||||
exports.trackNamedViewEvent = trackNamedViewEvent;
|
||||
exports.CtaEventTypes = {OPEN_MORE_TIPS: 'open_more_tips', USER_BANNER_DISMISS: 'user_banner_dismiss',
|
||||
USER_BANNER_BLOCK_CONFIRM: 'user_banner_block_confirm',
|
||||
USER_BANNER_BLOCK_AND_REPORT_CONFIRM: 'user_banner_block_and_report_confirm',
|
||||
USER_BANNER_BLOCK_CANCEL: 'user_banner_block_cancel',
|
||||
USER_BANNER_OPEN_SAFETY_TOOLS: 'user_banner_open_safety_tools',
|
||||
USER_BANNER_IGNORE_CONFIRM: 'user_banner_ignore_confirm', USER_BANNER_MUTE: 'user_banner_mute',
|
||||
USER_MODAL_BLOCK_CONFIRM: 'user_modal_block_confirm', USER_MODAL_BLOCK_CANCEL: 'user_modal_block_cancel',
|
||||
USER_TAKEOVER_MODAL_DISMISS: 'user_takeover_modal_dismiss',
|
||||
USER_TAKEOVER_MODAL_TAKE_ACTION: 'user_takeover_modal_take_action',
|
||||
USER_TAKEOVER_MODAL_SAFETY_TIPS: 'user_takeover_modal_safety_tips',
|
||||
USER_TAKEOVER_MODAL_BLOCK: 'user_takeover_modal_block',
|
||||
USER_TAKEOVER_MODAL_UNBLOCK: 'user_takeover_modal_unblock',
|
||||
USER_TAKEOVER_MODAL_REPORT: 'user_takeover_modal_report',
|
||||
USER_TAKEOVER_MODAL_NO_FILTR: 'user_takeover_modal_no_filtr',
|
||||
USER_TAKEOVER_MODAL_THROUGHLINE: 'user_takeover_modal_throughline',
|
||||
USER_TAKEOVER_MODAL_CTL: 'user_takeover_modal_ctl', USER_TAKEOVER_MODAL_CTL_SMS: 'user_takeover_modal_ctl_sms',
|
||||
USER_TAKEOVER_MODAL_CTL_WEB: 'user_takeover_modal_ctl_web',
|
||||
USER_SAFETY_TOOLS_BUTTON_CLICK: 'user_safety_tools_button_click',
|
||||
USER_SAFETY_TOOLS_IGNORE: 'user_safety_tools_ignore', USER_SAFETY_TOOLS_UNIGNORE: 'user_safety_tools_unignore',
|
||||
USER_SAFETY_TOOLS_BLOCK_CONFIRM: 'user_safety_tools_block_confirm',
|
||||
USER_SAFETY_TOOLS_BLOCK_AND_REPORT_CONFIRM: 'user_safety_tools_block_and_report_confirm',
|
||||
USER_SAFETY_TOOLS_BLOCK_CANCEL: 'user_safety_tools_block_cancel',
|
||||
USER_SAFETY_TOOLS_UNBLOCK: 'user_safety_tools_unblock', USER_SAFETY_TOOLS_REPORT: 'user_safety_tools_report',
|
||||
USER_SAFETY_TOOLS_NO_FILTR: 'user_safety_tools_no_filtr',
|
||||
USER_SAFETY_TOOLS_THROUGHLINE: 'user_safety_tools_throughline', USER_SAFETY_TOOLS_CTL: 'user_safety_tools_ctl',
|
||||
USER_SAFETY_TOOLS_CTL_SMS: 'user_safety_tools_ctl_sms', USER_SAFETY_TOOLS_CTL_WEB: 'user_safety_tools_ctl_web',
|
||||
USER_SAFETY_TOOLS_VIBING_WUMPUS: 'user_safety_tools_vibing_wumpus',
|
||||
USER_SAFETY_TOOLS_SAFETY_TIPS: 'user_safety_tools_safety_tips',
|
||||
USER_SAFETY_TOOLS_ABOUT_SAFETY_ALERTS: 'user_safety_tools_about_safety_alerts',
|
||||
USER_SAFETY_TOOLS_ABOUT_SAFETY_ALERTS_DISMISS: 'user_safety_tools_about_safety_alerts_dismiss',
|
||||
USER_SAFETY_TOOLS_DISMISS: 'user_safety_tools_dismiss', USER_MODAL_LEARN_MORE: 'user_modal_learn_more',
|
||||
USER_MODAL_MUTE: 'user_modal_mute', USER_MODAL_UNMUTE: 'user_modal_unmute',
|
||||
USER_MODAL_IGNORE: 'user_modal_ignore', USER_MODAL_UNIGNORE: 'user_modal_unignore',
|
||||
FEEDBACK_UPVOTE: 'feedback_upvote', FEEDBACK_DOWNVOTE: 'feedback_downvote'};
|
||||
exports.trackCtaEvent = trackCtaEvent;
|
||||
exports.getUserIsTeen = getUserIsTeen;
|
||||
}
|
||||
|
||||
function trackViewedEvent(a0, {channelId, warningId, senderId, warningType}) { // fn#76460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9917:3138, offset: 0x01dcff46, size: 112 bytes, params: 3, frame: 18
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const object2 = {channel_id: channelId};
|
||||
object2.warning_id = warningId != null ? global.parseInt(warningId) : undefined;
|
||||
object2.warning_type = warningType;
|
||||
object2.other_user_id = senderId;
|
||||
Reflect.apply(track, defaultImport, [a0, object2]);
|
||||
}
|
||||
|
||||
function trackNamedViewEvent({channelId, warningId, senderId, warningType, viewName, isNudgeWarning}) { // fn#76461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9917:3360, offset: 0x01dcffb6, size: 143 bytes, params: 2, frame: 21
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const SAFETY_WARNING_VIEWED = AnalyticEvents.SAFETY_WARNING_VIEWED;
|
||||
const object2 = {channel_id: channelId};
|
||||
object2.warning_id = warningId != null ? global.parseInt(warningId) : undefined;
|
||||
object2.warning_type = warningType;
|
||||
object2.other_user_id = senderId;
|
||||
object2.view_name = viewName;
|
||||
object2.is_nudge_warning = isNudgeWarning;
|
||||
Reflect.apply(track, defaultImport, [SAFETY_WARNING_VIEWED, object2]);
|
||||
}
|
||||
|
||||
function trackCtaEvent({channelId, warningId, senderId, warningType, cta, isNudgeWarning}) { // fn#76462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9917:3658, offset: 0x01dd0045, size: 141 bytes, params: 2, frame: 21
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const SAFETY_WARNING_CTA_CLICKED = AnalyticEvents.SAFETY_WARNING_CTA_CLICKED;
|
||||
const object2 = {channel_id: channelId};
|
||||
object2.warning_id = warningId != null ? global.parseInt(warningId) : undefined;
|
||||
object2.warning_type = warningType;
|
||||
object2.other_user_id = senderId;
|
||||
object2.cta = cta;
|
||||
object2.is_nudge_warning = isNudgeWarning;
|
||||
Reflect.apply(track, defaultImport, [SAFETY_WARNING_CTA_CLICKED, object2]);
|
||||
}
|
||||
|
||||
function getUserIsTeen() { // fn#76463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9917:3926, offset: 0x01dd00d2, size: 41 bytes, params: 1, frame: 10
|
||||
return UserStore.getCurrentUser()?.nsfwAllowed === false;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
/* Metro module 9756; source: modules/self_mod/shared/ShowSafetyToast.native.tsx; dependencies: [3857, 8035, 8036, 2] */
|
||||
function _fun76584(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9942:6, offset: 0x01ddc3d3, size: 103 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/shared/ShowSafetyToast.native.tsx');
|
||||
exports.showSafetyToast = function({id, text}) {
|
||||
var defaultImport = importDefault(dependencyMap[0]);
|
||||
var object = {key: id, icon: importDefault(dependencyMap[1])};
|
||||
object.IconComponent = require(dependencyMap[2]).ShieldIcon;
|
||||
object.iconColor = 'text-brand';
|
||||
object.content = text;
|
||||
defaultImport.open(object);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
/* Metro module 9745; source: modules/self_mod/shared/native/ConfirmBlockUserAlert.tsx; dependencies: [31, 27, 1878, 9734, 33, 4501, 697, 566, 9736, 3995, 8783, 6264, 8153, 4596, 4578, 1244, 4573, 2] */
|
||||
function _fun76541(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9931:6, offset: 0x01dd2ca0, size: 442 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_6 = (require(9734) /* metro dependency 9734: Constants */).LOCATION_CONTEXT_MOBILE;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
|
||||
object2.header = {color: MOBILE_TEXT_HEADING_PRIMARY, textAlign: 'center'};
|
||||
const object5 = {};
|
||||
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
|
||||
object5.color = TEXT_SUBTLE;
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object5.marginTop = PX_8;
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object5.marginBottom = PX_24;
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object5.marginHorizontal = PX_4;
|
||||
object5.textAlign = 'center';
|
||||
object2.text = object5;
|
||||
const object6 = {};
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object6.gap = PX_12;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object6.marginBottom = -PX_8;
|
||||
object2.buttonsContainer = object6;
|
||||
const env0_9 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/shared/native/ConfirmBlockUserAlert.tsx');
|
||||
exports.default = ConfirmBlockUserAlert;
|
||||
}
|
||||
|
||||
function ConfirmBlockUserAlert({userId, channelId, description, onCancel, onClose, onBlockAndReport, onBlock, blockButtonVariant}) { // fn#76542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9931:534, offset: 0x01dd2e5a, size: 881 bytes, params: 2, frame: 33
|
||||
var object2;
|
||||
var r9;
|
||||
var object8;
|
||||
const env0_3 = onClose;
|
||||
const styles = useStyles();
|
||||
const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getUser(userId);
|
||||
});
|
||||
const value2 = (require(9736) /* metro dependency 9736: useLastChannelMessage */).useLastChannelMessage(channelId);
|
||||
const value3 = (importDefault(3995) /* metro dependency 3995: UserUtils */).useName(user);
|
||||
const binding = env0_3;
|
||||
const value4 = binding.useCallback(_fun76544, [userId, channelId]);
|
||||
const env0_8 = binding.useCallback(function() {
|
||||
onClose();
|
||||
onCancel();
|
||||
}, [onClose, onCancel]);
|
||||
const value5 = binding.useCallback(_fun76547, [onClose, value4, onBlock]);
|
||||
const value6 = binding.useCallback(_fun76548, [value2, onClose, value4, onBlockAndReport]);
|
||||
const Alert = importDefault(4596) /* metro dependency 4596: Alert */;
|
||||
object2 = {renderConfirmButton: renderConfirmButton};
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const items2 = [<Text style={styles.header} variant="heading-lg/bold" color="mobile-text-heading-primary">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.x5pOn9,
|
||||
{name: value3})}</Text>];
|
||||
items2[1] = <Text style={styles.text} variant="text-md/medium">{description ?? intl.format((require(1244) /* metro dependency 1244: indexNative */).t.pegItC,
|
||||
{name: value3})}</Text>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const button = <Button size="lg" onPress={value5} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.l4Emac)} variant={blockButtonVariant ?? 'destructive'} />;
|
||||
const value11 = onBlockAndReport != null;
|
||||
if (value11) {
|
||||
r9 = <Button size="lg" onPress={value6} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['39O+8F'])} variant="secondary" />;
|
||||
} else {
|
||||
r9 = value11;
|
||||
}
|
||||
items2[2] = <View style={styles.buttonsContainer}>{button}{r9}</View>;
|
||||
return (
|
||||
<Alert {...object2}>
|
||||
{items2}
|
||||
</Alert>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun76544() { // fn#76544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9931:810, offset: 0x01dd31e6, size: 75 bytes, params: 1, frame: 15
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
const defaultImport = importDefault(8783) /* metro dependency 8783: RelationshipActionCreators */;
|
||||
defaultImport.blockUser(userId, {location: LOCATION_CONTEXT_MOBILE}).then(_fun76545);
|
||||
}
|
||||
|
||||
function _fun76547() { // fn#76547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9931:965, offset: 0x01dd327a, size: 31 bytes, params: 1, frame: 10
|
||||
onClose();
|
||||
env0_7();
|
||||
onBlock();
|
||||
}
|
||||
|
||||
function _fun76548() { // fn#76548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9931:1010, offset: 0x01dd3299, size: 79 bytes, params: 1, frame: 13
|
||||
onClose();
|
||||
env0_7();
|
||||
(require(8153) /* metro dependency 8153: ReportModals */).showReportModalForInappropriateConversationSafetyAlert(env0_6);
|
||||
if (onBlockAndReport != null) {
|
||||
onBlockAndReport();
|
||||
}
|
||||
}
|
||||
|
||||
function ConfirmBlockUserAlertRenderConfirmButton() { // fn#76549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9931:1155, owner: ConfirmBlockUserAlert.renderConfirmButton, offset: 0x01dd32e8, size: 122 bytes, params: 1, frame: 18
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const buttonProps = {size: 'lg', onPress: env0_8};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
buttonProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC']);
|
||||
buttonProps.variant = 'secondary';
|
||||
return <Button {...buttonProps} />;
|
||||
}
|
||||
|
||||
function _fun76545() { // fn#76545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9931:856, offset: 0x01dd3231, size: 50 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(6264) /* metro dependency 6264: SafetyToastsActionCreatorsNative */;
|
||||
value.showBlockSuccessToast(userId, channelId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/* Metro module 6237; source: modules/self_mod/shared/native/SafetyTipsRow.tsx; dependencies: [31, 27, 33, 4501, 697, 6238, 4573, 2] */
|
||||
function _fun49311(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#49311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6415:6, offset: 0x011f4be5, size: 279 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_2 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const object = {'width': 32, 'height': 32, 'backgroundColor': null, 'borderRadius': null, 'alignItems': 'center',
|
||||
'justifyContent': 'center'};
|
||||
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
|
||||
object.backgroundColor = BACKGROUND_MOD_SUBTLE;
|
||||
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object.marginRight = PX_4;
|
||||
const env0_4 = Reflect.apply(createStyles, createStylesModule, [{indexContainer: object}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/shared/native/SafetyTipsRow.tsx');
|
||||
exports.default = SafetyTipsRow;
|
||||
}
|
||||
|
||||
function SafetyTipsRow({index, tip, description, end}) { // fn#49312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6415:448, offset: 0x011f4cfc, size: 117 bytes, params: 2, frame: 19
|
||||
const env0_0 = useStyles();
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
return (
|
||||
<TableRow
|
||||
icon={((Component) => <Component index={index} />)(_fun49313)}
|
||||
label={tip}
|
||||
subLabel={description}
|
||||
end={end}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun49313({index}) { // fn#49313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6415:553, offset: 0x011f4d71, size: 101 bytes, params: 2, frame: 16
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View style={styles.indexContainer}>
|
||||
<Text variant="heading-md/semibold" color="text-brand">
|
||||
{index}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
/* Metro module 9754; source: modules/self_mod/shared/native/SafetyTipsSection.tsx; dependencies: [31, 27, 33, 4501, 697, 4572, 5473, 4573, 1244, 6237, 2] */
|
||||
function _fun76574(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9940:6, offset: 0x01ddb9f6, size: 296 bytes, params: 8, frame: 23
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value.jsx;
|
||||
const env0_5 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object = {};
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
||||
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object.overflow = 'hidden';
|
||||
const env0_6 = Reflect.apply(createStyles, value, [{image: {'alignSelf': 'center', 'justifySelf': 'center'},
|
||||
tips: object, text: {textAlign: 'center'}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/shared/native/SafetyTipsSection.tsx');
|
||||
exports.default = SafetyTipsContainer;
|
||||
}
|
||||
|
||||
function SafetyTipsContainer({description, safetyTips, showHeader}) { // fn#76575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9940:453, offset: 0x01ddbb1e, size: 433 bytes, params: 2, frame: 30
|
||||
var r7;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var intl;
|
||||
const styles = useStyles();
|
||||
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
const SafetyBookletSpotIllustration = (require(5473) /* metro dependency 5473: native */).SafetyBookletSpotIllustration;
|
||||
const items2 = [<View style={styles.image}><SafetyBookletSpotIllustration /></View>];
|
||||
const Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
if (showHeader) {
|
||||
var textProps = {style: styles.text, variant: 'heading-xl/semibold'};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r7 = <Text {...textProps}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eAbVfS)}</Text>;
|
||||
} else {
|
||||
r7 = showHeader;
|
||||
}
|
||||
items2[1] = <Stack2 spacing={8} align="center" justify="center">{r7}<Text style={styles.text} accessibilityRole="header" variant="text-md/medium" color="text-default">{description}</Text></Stack2>;
|
||||
items2[2] = <View style={styles.tips}>{safetyTips.map(_fun76576)}</View>;
|
||||
return (
|
||||
<Stack spacing={16}>
|
||||
{items2}
|
||||
</Stack>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun76576(a0, a1) { // fn#76576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9940:986, offset: 0x01ddbccf, size: 86 bytes, params: 3, frame: 17
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component index={a1 + 1} tip={a0} end={a1 === safetyTips.length - 1} key={a1} />)(importDefault(6237) /* metro dependency 6237: SafetyTipsRow */);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
/* Metro module 9755; source: modules/self_mod/shared/native/SafetyToolsAboutActionSheet.tsx; dependencies: [57, 31, 27, 9734, 661, 33, 4501, 697, 9728, 4080, 9731, 9732, 9756, 1244, 3856, 9741, 6766, 1948, 4578, 4573, 2] */
|
||||
function _fun76577(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9941:6, offset: 0x01ddbd25, size: 379 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
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(9734) /* metro dependency 9734: Constants */).getSafetyToolsActionSheetKey;
|
||||
const env0_7 = (require(661) /* metro dependency 661: Constants */).HelpdeskArticles;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
object2.aboutContainer = {marginHorizontal: PX_32};
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object2.description = {'alignSelf': 'center', 'textAlign': 'center', marginBottom: PX_24};
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.reportFalsePositive = {'alignSelf': 'center', 'textAlign': 'center', marginTop: PX_8};
|
||||
const env0_10 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/shared/native/SafetyToolsAboutActionSheet.tsx');
|
||||
exports.default = SafetyToolsAboutScreen;
|
||||
}
|
||||
|
||||
function SafetyToolsAboutScreen({channelId, recipientId, warningId, warningType, onClose}) { // fn#76578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9941:484, offset: 0x01ddbea0, size: 738 bytes, params: 2, frame: 33
|
||||
var object2;
|
||||
const env0_3 = warningType;
|
||||
const binding = env0_4;
|
||||
const [property, env0_5] = env0_3(binding.useState(false), 2);
|
||||
const styles = useStyles();
|
||||
const value6 = binding.useCallback(_fun76579, [channelId, warningId, warningType, recipientId,
|
||||
(require(9728) /* metro dependency 9728: useShouldShowSafetyToolsButtonTooltipForChannel */).useSafetyToolsButtonTooltipForChannel(channelId) != null]);
|
||||
const env0_7 = binding.useCallback(_fun76580, [channelId, property]);
|
||||
const SafetyToolsActionSheetWrapper = importDefault(9741) /* metro dependency 9741: SafetyToolsActionSheetWrapper */;
|
||||
object2 = {hasHeaderBack: true, recipientId: recipientId, warningId: warningId, warningType: warningType};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
object2.headerTitle = Reflect.apply(string, intl,
|
||||
[(require(1244) /* metro dependency 1244: indexNative */).t.qI14KM]);
|
||||
object2.channelId = channelId;
|
||||
object2.onClose = onClose;
|
||||
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
|
||||
const format = intl.format;
|
||||
const property2 = (require(1244) /* metro dependency 1244: indexNative */).t['njJ/Cg'];
|
||||
const defaultImport2 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
|
||||
const getArticleURL = defaultImport2.getArticleURL;
|
||||
const SAFETY_ALERTS = HelpdeskArticles.SAFETY_ALERTS;
|
||||
let value = <TextWithIOSLinkWorkaround variant="text-md/medium" style={styles.description}>{Reflect.apply(format,
|
||||
intl, [property2, {learnMoreLink: Reflect.apply(getArticleURL, defaultImport2,
|
||||
[SAFETY_ALERTS])}])}</TextWithIOSLinkWorkaround>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
string = intl.string;
|
||||
const Xb2REN = (require(1244) /* metro dependency 1244: indexNative */).t.Xb2REN;
|
||||
value = <View style={styles.aboutContainer}>{value}<Button variant="secondary" size="lg" disabled={property} text={Reflect.apply(string,
|
||||
intl, [Xb2REN])} onPress={value6} /></View>;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<SafetyToolsActionSheetWrapper {...object2}>
|
||||
{value}
|
||||
<Text variant="text-md/medium" style={styles.reportFalsePositive}>
|
||||
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['2uYViD'],
|
||||
{reportFalsePositiveHook: reportFalsePositiveHook})}
|
||||
</Text>
|
||||
</SafetyToolsActionSheetWrapper>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun76579() { // fn#76579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9941:705, offset: 0x01ddc182, size: 149 bytes, params: 1, frame: 17
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
|
||||
const hideActionSheet = defaultImport.hideActionSheet;
|
||||
const getSafetyToolsActionSheetKeyBinding = getSafetyToolsActionSheetKey;
|
||||
const channelIdBinding = channelId;
|
||||
Reflect.apply(hideActionSheet, defaultImport, [getSafetyToolsActionSheetKeyBinding(channelIdBinding)]);
|
||||
value = require(9731) /* metro dependency 9731: SafetyWarningUtils */;
|
||||
const trackCtaEvent = value.trackCtaEvent;
|
||||
const object2 = {channelId: channelIdBinding};
|
||||
object2.warningId = warningId;
|
||||
object2.warningType = warningType;
|
||||
object2.senderId = recipientId;
|
||||
const CtaEventTypes = (require(9731) /* metro dependency 9731: SafetyWarningUtils */).CtaEventTypes;
|
||||
const USER_SAFETY_TOOLS_ABOUT_SAFETY_ALERTS_DISMISS = CtaEventTypes.USER_SAFETY_TOOLS_ABOUT_SAFETY_ALERTS_DISMISS;
|
||||
object2.cta = USER_SAFETY_TOOLS_ABOUT_SAFETY_ALERTS_DISMISS;
|
||||
object2.isNudgeWarning = result;
|
||||
Reflect.apply(trackCtaEvent, value, [object2]);
|
||||
}
|
||||
|
||||
function _fun76580() { // fn#76580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9941:937, offset: 0x01ddc217, size: 102 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var value;
|
||||
if (!env0_4) {
|
||||
env0_5(true);
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(9732) /* metro dependency 9732: ChannelSafetyWarningsActionCreators */;
|
||||
value = moduleValue.reportFalsePositive(channelId);
|
||||
value = value.then(_fun76581);
|
||||
value.catch(_fun76582);
|
||||
}
|
||||
}
|
||||
|
||||
function reportFalsePositiveHook(a0, a1) { // fn#76583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9941:1898, owner: SafetyToolsAboutScreen.reportFalsePositiveHook, offset: 0x01ddc37d, size: 86 bytes, params: 3, frame: 16
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text
|
||||
variant="text-sm/medium"
|
||||
color="text-link"
|
||||
disabled={env0_4}
|
||||
onPress={env0_7}
|
||||
key={a1}
|
||||
>
|
||||
{a0}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun76581() { // fn#76581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9941:990, offset: 0x01ddc27d, size: 157 bytes, params: 1, frame: 19
|
||||
env1_5(false);
|
||||
const showSafetyToastNativeModule = require(9756) /* metro dependency 9756: ShowSafetyToastNative */;
|
||||
const showSafetyToast = showSafetyToastNativeModule.showSafetyToast;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const FhgVWi = (require(1244) /* metro dependency 1244: indexNative */).t.FhgVWi;
|
||||
Reflect.apply(showSafetyToast, showSafetyToastNativeModule, [{id: 'safety-tools-report-false-positive',
|
||||
text: Reflect.apply(string, intl, [FhgVWi])}]);
|
||||
const defaultImport = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
|
||||
defaultImport.hideActionSheet(getSafetyToolsActionSheetKey(channelId));
|
||||
}
|
||||
|
||||
function _fun76582() { // fn#76582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9941:1154, offset: 0x01ddc31a, size: 99 bytes, params: 1, frame: 16
|
||||
let value = environment.__proto__;
|
||||
env1_5(false);
|
||||
value = environment.__proto__.__proto__;
|
||||
value = require(3856) /* metro dependency 3856: ToastUtils */;
|
||||
const presentError = value.presentError;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const R0RpRX = (require(1244) /* metro dependency 1244: indexNative */).t.R0RpRX;
|
||||
Reflect.apply(presentError, value, [Reflect.apply(string, intl, [R0RpRX])]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,364 @@
|
||||
/* Metro module 9735; source: modules/self_mod/shared/native/SafetyToolsActionSheet.tsx; dependencies: [31, 27, 3793, 9734, 33, 4501, 697, 9736, 9737, 9728, 566, 9731, 6818, 1244, 8664, 8663, 4080, 9740, 1962, 3853, 9000, 8748, 8999, 8998, 8783, 9743, 6988, 6264, 4496, 9744, 8666, 8665, 8153, 8842, 8841, 5080, 9746, 9751, 9752, 9753, 8035, 8036, 9755, 9741, 6231, 6238, 6242, 2] */
|
||||
function _fun76478(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9921:6, offset: 0x01dd080c, size: 337 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
let value = require(9734) /* metro dependency 9734: Constants */;
|
||||
const env0_6 = value.ACTION_SHEET_CONTEXT_MOBILE;
|
||||
const env0_7 = value.getSafetyToolsActionSheetKey;
|
||||
const env0_8 = value.THROUGHLINE_URL;
|
||||
const env0_9 = value.NOFILTR_URL;
|
||||
const env0_10 = value.VIBING_WUMPUS_MODAL_KEY;
|
||||
const env0_11 = (require(33) /* metro dependency 33 */).jsx;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object = {};
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object.marginHorizontal = PX_16;
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object.marginBottom = PX_24;
|
||||
const env0_12 = Reflect.apply(createStyles, value, [{container: {flex: 1}, actionRowGroup: object}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/shared/native/SafetyToolsActionSheet.tsx');
|
||||
exports.default = SafetyToolsActionSheet;
|
||||
}
|
||||
|
||||
function SafetyToolsActionSheet({channelId, warningId, warningType, recipientId, onClose}) { // fn#76479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9921:518, offset: 0x01dd095d, size: 561 bytes, params: 2, frame: 32
|
||||
const env0_3 = recipientId;
|
||||
const styles = useStyles();
|
||||
const value2 = (require(9736) /* metro dependency 9736: useLastChannelMessage */).useLastChannelMessage(channelId);
|
||||
const value3 = (require(9737) /* metro dependency 9737: useHelpLineVisibility */).useShouldShowHelplineLink();
|
||||
const value4 = (require(9737) /* metro dependency 9737: useHelpLineVisibility */).useShouldShowThroughlineLink();
|
||||
const value6 = (require(9728) /* metro dependency 9728: useShouldShowSafetyToolsButtonTooltipForChannel */).useSafetyToolsButtonTooltipForChannel(channelId) != null;
|
||||
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RelationshipStore], function() {
|
||||
return RelationshipStore.isBlocked(recipientId);
|
||||
}, [recipientId]);
|
||||
const value8 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RelationshipStore], function() {
|
||||
return RelationshipStore.isIgnored(recipientId);
|
||||
}, [recipientId]);
|
||||
const binding = env0_3;
|
||||
const value10 = binding.useMemo(_fun76483, [value7, value8, value3, value4, binding.useCallback(_fun76482,
|
||||
[channelId, warningId, warningType, recipientId, value6]), recipientId, channelId, warningId, warningType,
|
||||
onClose, value2]);
|
||||
const SafetyToolsActionSheetWrapper = importDefault(9741) /* metro dependency 9741: SafetyToolsActionSheetWrapper */;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const MAhAp6 = (require(1244) /* metro dependency 1244: indexNative */).t.MAhAp6;
|
||||
return (
|
||||
<SafetyToolsActionSheetWrapper
|
||||
headerTitle={Reflect.apply(string, intl, [MAhAp6])}
|
||||
channelId={channelId}
|
||||
recipientId={recipientId}
|
||||
warningId={warningId}
|
||||
warningType={warningType}
|
||||
onClose={onClose}
|
||||
>
|
||||
<View style={styles.container}>
|
||||
{value10.map(_fun76500)}
|
||||
</View>
|
||||
</SafetyToolsActionSheetWrapper>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun76482(a0) { // fn#76482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9921:933, offset: 0x01dd0bc4, size: 95 bytes, params: 2, frame: 14
|
||||
const value = environment.__proto__;
|
||||
(require(9731) /* metro dependency 9731: SafetyWarningUtils */).trackCtaEvent({channelId: channelId,
|
||||
warningId: warningId, senderId: recipientId, warningType: warningType, cta: a0, isNudgeWarning: result});
|
||||
}
|
||||
|
||||
function _fun76483() { // fn#76483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9921:1063, offset: 0x01dd0c23, size: 1699 bytes, params: 1, frame: 28
|
||||
var object18;
|
||||
const value2 = undefined;
|
||||
const ChevronSmallRightIcon = require(dependencyMap[12]).ChevronSmallRightIcon;
|
||||
const INTERACTIVE_TEXT_DEFAULT = importDefault(dependencyMap[6]).colors.INTERACTIVE_TEXT_DEFAULT;
|
||||
const chevronSmallRightIcon = <ChevronSmallRightIcon size="md" color={INTERACTIVE_TEXT_DEFAULT} />;
|
||||
object18 = {};
|
||||
const intl = require(dependencyMap[13]).intl;
|
||||
let string = intl.string;
|
||||
const t = require(dependencyMap[13]).t;
|
||||
let ZSbbMJ = t.ZSbbMJ;
|
||||
object18.label = Reflect.apply(string, intl, [ZSbbMJ]);
|
||||
object18.subLabel = intl.string(require(dependencyMap[13]).t.iNcsrW);
|
||||
object18.icon = importDefault(dependencyMap[14]);
|
||||
const HeartIcon = require(dependencyMap[15]).HeartIcon;
|
||||
object18.IconComponent = HeartIcon;
|
||||
object18.trailing = chevronSmallRightIcon;
|
||||
object18.onPress = onPress_76484;
|
||||
const object4 = {};
|
||||
string = intl.string;
|
||||
ZSbbMJ = require(dependencyMap[13]).t.ZSbbMJ;
|
||||
object4.label = Reflect.apply(string, intl, [ZSbbMJ]);
|
||||
string = intl.string;
|
||||
const S9O1ZZ = require(dependencyMap[13]).t.S9O1ZZ;
|
||||
object4.subLabel = Reflect.apply(string, intl, [S9O1ZZ]);
|
||||
object4.icon = importDefault(dependencyMap[14]);
|
||||
object4.IconComponent = HeartIcon;
|
||||
object4.onPress = onPress_76486;
|
||||
const object8 = {};
|
||||
string = intl.string;
|
||||
ZSbbMJ = require(dependencyMap[13]).t.ZSbbMJ;
|
||||
object8.label = Reflect.apply(string, intl, [ZSbbMJ]);
|
||||
object8.subLabel = intl.string(require(dependencyMap[13]).t.g5uwC5);
|
||||
object8.icon = importDefault(dependencyMap[14]);
|
||||
object8.IconComponent = HeartIcon;
|
||||
object8.onPress = onPress_76487;
|
||||
const object12 = {};
|
||||
let binding = env0_11;
|
||||
string = intl.string;
|
||||
object12.label = binding ? Reflect.apply(string, intl, [t['9e0wLn']]) : Reflect.apply(string, intl, [t.B7ZT06]);
|
||||
object12.subLabel = env0_11 ? value2 : intl.string(require(dependencyMap[13]).t.fCfp49);
|
||||
object12.icon = importDefault(env0_11 ? dependencyMap[20] : dependencyMap[21]);
|
||||
object12.IconComponent = env0_11 ? require(dependencyMap[22]).EyeIcon : require(dependencyMap[23]).EyeSlashIcon;
|
||||
binding = env0_10;
|
||||
object12.disabled = binding;
|
||||
object12.onPress = onPress_76488;
|
||||
const items4 = [object12];
|
||||
const object13 = {};
|
||||
string = intl.string;
|
||||
object13.label = binding ? Reflect.apply(string, intl, [t.Hro40y]) : Reflect.apply(string, intl, [t.oDxaKy]);
|
||||
string = intl.string;
|
||||
const Lj37az = require(dependencyMap[13]).t.Lj37az;
|
||||
object13.subLabel = Reflect.apply(string, intl, [Lj37az]);
|
||||
object13.icon = importDefault(dependencyMap[25]);
|
||||
const CircleXIcon = require(dependencyMap[26]).CircleXIcon;
|
||||
object13.IconComponent = CircleXIcon;
|
||||
object13.onPress = onPress_76489;
|
||||
items4[1] = object13;
|
||||
const object14 = {};
|
||||
string = intl.string;
|
||||
const X27yhD = require(dependencyMap[13]).t.X27yhD;
|
||||
object14.label = Reflect.apply(string, intl, [X27yhD]);
|
||||
object14.subLabel = intl.string(require(dependencyMap[13]).t['0tydOa']);
|
||||
object14.icon = importDefault(dependencyMap[30]);
|
||||
const FlagIcon = require(dependencyMap[31]).FlagIcon;
|
||||
object14.IconComponent = FlagIcon;
|
||||
object14.onPress = onPress_76493;
|
||||
items4[2] = object14;
|
||||
const items2 = [{sectionKey: 'action', buttons: items4}];
|
||||
const object15 = {};
|
||||
object15.label = intl.string(require(dependencyMap[13]).t.syuaPI);
|
||||
string = intl.string;
|
||||
const LLBnNk = require(dependencyMap[13]).t.LLBnNk;
|
||||
object15.subLabel = Reflect.apply(string, intl, [LLBnNk]);
|
||||
object15.icon = importDefault(dependencyMap[33]);
|
||||
const MusicIcon = require(dependencyMap[34]).MusicIcon;
|
||||
object15.IconComponent = MusicIcon;
|
||||
object15.trailing = chevronSmallRightIcon;
|
||||
object15.onPress = onPress_76494;
|
||||
const items3 = [object15];
|
||||
const object16 = {};
|
||||
object16.label = intl.string(require(dependencyMap[13]).t['7LgVmt']);
|
||||
object16.subLabel = intl.string(require(dependencyMap[13]).t.pwoRjc);
|
||||
object16.icon = importDefault(dependencyMap[37]);
|
||||
const EducationIcon = require(dependencyMap[38]).EducationIcon;
|
||||
object16.IconComponent = EducationIcon;
|
||||
object16.trailing = chevronSmallRightIcon;
|
||||
object16.onPress = onPress_76496;
|
||||
items3[1] = object16;
|
||||
items3[2] = env0_7 ? object18 : env0_8 ? object4 : object8;
|
||||
items2[1] = {sectionKey: 'support', buttons: items3};
|
||||
const object17 = {};
|
||||
object17.label = intl.string(require(dependencyMap[13]).t.otdt24);
|
||||
object17.icon = importDefault(dependencyMap[40]);
|
||||
const ShieldIcon = require(dependencyMap[41]).ShieldIcon;
|
||||
object17.IconComponent = ShieldIcon;
|
||||
object17.trailing = chevronSmallRightIcon;
|
||||
object17.onPress = onPress_76498;
|
||||
items2[2] = {sectionKey: 'info', buttons: [object17]};
|
||||
return items2;
|
||||
}
|
||||
|
||||
function _fun76500(a0) { // fn#76500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9921:4789, offset: 0x01dd1910, size: 124 bytes, params: 2, frame: 20
|
||||
const viewBindingProps = {style: styles.actionRowGroup};
|
||||
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
return (
|
||||
<View {...viewBindingProps} key={a0.sectionKey}>
|
||||
<TableRowGroup hasIcons>
|
||||
{a0.buttons.map(_fun76501)}
|
||||
</TableRowGroup>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function onPress_76484() { // fn#76484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9921:1322, offset: 0x01dd12c6, size: 184 bytes, params: 1, frame: 22
|
||||
var environment;
|
||||
let value = environment.__proto__.__proto__;
|
||||
const getSafetyToolsActionSheetKeyBinding = getSafetyToolsActionSheetKey;
|
||||
const channelIdBinding = channelId;
|
||||
const env0_0 = getSafetyToolsActionSheetKeyBinding(channelIdBinding);
|
||||
const defaultImport = importDefault(dependencyMap[16]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
value = require(dependencyMap[18]);
|
||||
value = value(dependencyMap[17], dependencyMap.paths);
|
||||
const safetyToolsActionSheetKeyBinding = getSafetyToolsActionSheetKeyBinding(channelIdBinding);
|
||||
const binding = env1_12;
|
||||
Reflect.apply(openLazy, defaultImport, [value, safetyToolsActionSheetKeyBinding, {recipientId: recipientId,
|
||||
channelId: channelIdBinding, warningId: warningId, warningType: warningType, onClose: onClose_76485,
|
||||
trackAnalyticsEvent: binding}]);
|
||||
const CtaEventTypes = require(dependencyMap[11]).CtaEventTypes;
|
||||
const USER_SAFETY_TOOLS_CTL = CtaEventTypes.USER_SAFETY_TOOLS_CTL;
|
||||
binding(USER_SAFETY_TOOLS_CTL);
|
||||
}
|
||||
|
||||
function onPress_76486() { // fn#76486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9921:1701, offset: 0x01dd13ab, size: 82 bytes, params: 1, frame: 14
|
||||
(importDefault(3853) /* metro dependency 3853: Linking */).openURL(THROUGHLINE_URL);
|
||||
const binding = env1_12;
|
||||
const CtaEventTypes = (require(9731) /* metro dependency 9731: SafetyWarningUtils */).CtaEventTypes;
|
||||
const USER_SAFETY_TOOLS_THROUGHLINE = CtaEventTypes.USER_SAFETY_TOOLS_THROUGHLINE;
|
||||
binding(USER_SAFETY_TOOLS_THROUGHLINE);
|
||||
}
|
||||
|
||||
function onPress_76487() { // fn#76487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9921:1934, offset: 0x01dd13fd, size: 82 bytes, params: 1, frame: 14
|
||||
(importDefault(3853) /* metro dependency 3853: Linking */).openURL(NOFILTR_URL);
|
||||
const binding = env1_12;
|
||||
const CtaEventTypes = (require(9731) /* metro dependency 9731: SafetyWarningUtils */).CtaEventTypes;
|
||||
const USER_SAFETY_TOOLS_NO_FILTR = CtaEventTypes.USER_SAFETY_TOOLS_NO_FILTR;
|
||||
binding(USER_SAFETY_TOOLS_NO_FILTR);
|
||||
}
|
||||
|
||||
function onPress_76488() { // fn#76488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9921:2294, offset: 0x01dd144f, size: 163 bytes, params: 1, frame: 19
|
||||
const CtaEventTypes = (require(9731) /* metro dependency 9731: SafetyWarningUtils */).CtaEventTypes;
|
||||
const binding = env1_11;
|
||||
const defaultImport = importDefault(8783) /* metro dependency 8783: RelationshipActionCreators */;
|
||||
if (binding) {
|
||||
defaultImport.unignoreUser(recipientId, ACTION_SHEET_CONTEXT_MOBILE, channelId);
|
||||
env1_12(CtaEventTypes.USER_SAFETY_TOOLS_UNIGNORE);
|
||||
} else {
|
||||
defaultImport.ignoreUser(recipientId, ACTION_SHEET_CONTEXT_MOBILE, channelId);
|
||||
env1_12(CtaEventTypes.USER_SAFETY_TOOLS_IGNORE);
|
||||
}
|
||||
}
|
||||
|
||||
function onPress_76489() { // fn#76489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9921:2659, offset: 0x01dd14f2, size: 173 bytes, params: 1, frame: 19
|
||||
var environment;
|
||||
var defaultImport;
|
||||
var unblockUser;
|
||||
var recipientIdBinding;
|
||||
var defaultImport2;
|
||||
let value = environment.__proto__;
|
||||
if (env1_10) {
|
||||
defaultImport = importDefault(8783) /* metro dependency 8783: RelationshipActionCreators */;
|
||||
unblockUser = defaultImport.unblockUser;
|
||||
recipientIdBinding = recipientId;
|
||||
Reflect.apply(unblockUser, defaultImport, [recipientIdBinding, {location: ACTION_SHEET_CONTEXT_MOBILE}]);
|
||||
defaultImport2 = importDefault(6264) /* metro dependency 6264: SafetyToastsActionCreatorsNative */;
|
||||
defaultImport2.showUnblockSuccessToast(recipientIdBinding, channelId);
|
||||
env1_12((require(9731) /* metro dependency 9731: SafetyWarningUtils */).CtaEventTypes.USER_SAFETY_TOOLS_UNBLOCK);
|
||||
} else {
|
||||
value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
|
||||
value.openLazy({importer: importer_76490});
|
||||
}
|
||||
}
|
||||
|
||||
function onPress_76493() { // fn#76493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9921:3343, offset: 0x01dd16bc, size: 86 bytes, params: 1, frame: 15
|
||||
onClose();
|
||||
(require(8153) /* metro dependency 8153: ReportModals */).showReportModalForInappropriateConversationSafetyAlert(env1_6);
|
||||
const binding = env1_12;
|
||||
const CtaEventTypes = (require(9731) /* metro dependency 9731: SafetyWarningUtils */).CtaEventTypes;
|
||||
const USER_SAFETY_TOOLS_REPORT = CtaEventTypes.USER_SAFETY_TOOLS_REPORT;
|
||||
binding(USER_SAFETY_TOOLS_REPORT);
|
||||
}
|
||||
|
||||
function onPress_76494() { // fn#76494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9921:3664, offset: 0x01dd1712, size: 152 bytes, params: 1, frame: 19
|
||||
importDefault(dependencyMap[16]).hideActionSheet();
|
||||
const defaultImport2 = importDefault(dependencyMap[35]);
|
||||
defaultImport2.pushLazy(require(dependencyMap[18])(dependencyMap[36], dependencyMap.paths), {onClose: function() {
|
||||
}}, VIBING_WUMPUS_MODAL_KEY);
|
||||
const binding = env1_12;
|
||||
const CtaEventTypes = require(dependencyMap[11]).CtaEventTypes;
|
||||
const USER_SAFETY_TOOLS_VIBING_WUMPUS = CtaEventTypes.USER_SAFETY_TOOLS_VIBING_WUMPUS;
|
||||
binding(USER_SAFETY_TOOLS_VIBING_WUMPUS);
|
||||
}
|
||||
|
||||
function onPress_76496() { // fn#76496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9921:3984, offset: 0x01dd17aa, size: 179 bytes, params: 1, frame: 22
|
||||
var environment;
|
||||
let value = environment.__proto__.__proto__;
|
||||
const getSafetyToolsActionSheetKeyBinding = getSafetyToolsActionSheetKey;
|
||||
const channelIdBinding = channelId;
|
||||
const env0_0 = getSafetyToolsActionSheetKeyBinding(channelIdBinding);
|
||||
const defaultImport = importDefault(dependencyMap[16]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
value = require(dependencyMap[18]);
|
||||
value = value(dependencyMap[39], dependencyMap.paths);
|
||||
Reflect.apply(openLazy, defaultImport, [value, getSafetyToolsActionSheetKeyBinding(channelIdBinding),
|
||||
{recipientId: recipientId, channelId: channelIdBinding, warningId: warningId, warningType: warningType,
|
||||
onClose: onClose_76497}]);
|
||||
const binding = env1_12;
|
||||
const CtaEventTypes = require(dependencyMap[11]).CtaEventTypes;
|
||||
const USER_SAFETY_TOOLS_SAFETY_TIPS = CtaEventTypes.USER_SAFETY_TOOLS_SAFETY_TIPS;
|
||||
binding(USER_SAFETY_TOOLS_SAFETY_TIPS);
|
||||
}
|
||||
|
||||
function onPress_76498() { // fn#76498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9921:4350, offset: 0x01dd185d, size: 179 bytes, params: 1, frame: 22
|
||||
var environment;
|
||||
let value = environment.__proto__.__proto__;
|
||||
const getSafetyToolsActionSheetKeyBinding = getSafetyToolsActionSheetKey;
|
||||
const channelIdBinding = channelId;
|
||||
const env0_0 = getSafetyToolsActionSheetKeyBinding(channelIdBinding);
|
||||
const defaultImport = importDefault(dependencyMap[16]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
value = require(dependencyMap[18]);
|
||||
value = value(dependencyMap[42], dependencyMap.paths);
|
||||
Reflect.apply(openLazy, defaultImport, [value, getSafetyToolsActionSheetKeyBinding(channelIdBinding),
|
||||
{recipientId: recipientId, channelId: channelIdBinding, warningId: warningId, warningType: warningType,
|
||||
onClose: onClose_76499}]);
|
||||
const binding = env1_12;
|
||||
const CtaEventTypes = require(dependencyMap[11]).CtaEventTypes;
|
||||
const USER_SAFETY_TOOLS_ABOUT_SAFETY_ALERTS = CtaEventTypes.USER_SAFETY_TOOLS_ABOUT_SAFETY_ALERTS;
|
||||
binding(USER_SAFETY_TOOLS_ABOUT_SAFETY_ALERTS);
|
||||
}
|
||||
|
||||
function _fun76501({label, subLabel, IconComponent, icon, trailing, onPress, disabled}, a1) { // fn#76501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9921:4891, offset: 0x01dd198c, size: 149 bytes, params: 3, frame: 23
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const TableRowIcon = (require(6242) /* metro dependency 6242: TableRowIconNative */).TableRowIcon;
|
||||
return (
|
||||
<TableRow
|
||||
label={label}
|
||||
subLabel={subLabel}
|
||||
onPress={onPress}
|
||||
trailing={trailing}
|
||||
disabled={disabled}
|
||||
icon={<TableRowIcon source={icon} IconComponent={IconComponent} />}
|
||||
key={a1}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function onPress_76484OnClose() { // fn#76485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9921:1443, owner: onPress_76484.onClose, offset: 0x01dd137e, size: 45 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet(env0_0);
|
||||
}
|
||||
|
||||
function onPress_76489Importer() { // fn#76490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9921:2828, owner: onPress_76489.importer, offset: 0x01dd159f, size: 64 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
let value = environment.__proto__.__proto__.__proto__;
|
||||
value = require(dependencyMap[18]);
|
||||
value = value(dependencyMap[29], dependencyMap.paths);
|
||||
return value.then(function({default: env0_0}) {
|
||||
return _fun76492;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun76491({default: env0_0}) { // fn#76491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9921:2862, offset: 0x01dd15df, size: 23 bytes, params: 2, frame: 2
|
||||
return _fun76492;
|
||||
}
|
||||
|
||||
function _fun76492(a0) { // fn#76492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9921:2877, offset: 0x01dd15f6, size: 198 bytes, params: 2, frame: 18
|
||||
const binding = env0_0;
|
||||
const bindingProps = {...a0};
|
||||
bindingProps['channelId'] = channelId;
|
||||
bindingProps['warningId'] = warningId;
|
||||
bindingProps['warningType'] = warningType;
|
||||
bindingProps['senderId'] = recipientId;
|
||||
const CtaEventTypes = (require(9731) /* metro dependency 9731: SafetyWarningUtils */).CtaEventTypes;
|
||||
const USER_SAFETY_TOOLS_BLOCK_CONFIRM = CtaEventTypes.USER_SAFETY_TOOLS_BLOCK_CONFIRM;
|
||||
bindingProps['analyticsBlockContext'] = USER_SAFETY_TOOLS_BLOCK_CONFIRM;
|
||||
const USER_SAFETY_TOOLS_BLOCK_AND_REPORT_CONFIRM = CtaEventTypes.USER_SAFETY_TOOLS_BLOCK_AND_REPORT_CONFIRM;
|
||||
bindingProps['analyticsBlockAndReportContext'] = USER_SAFETY_TOOLS_BLOCK_AND_REPORT_CONFIRM;
|
||||
const USER_SAFETY_TOOLS_BLOCK_CANCEL = CtaEventTypes.USER_SAFETY_TOOLS_BLOCK_CANCEL;
|
||||
bindingProps['analyticsCancelContext'] = USER_SAFETY_TOOLS_BLOCK_CANCEL;
|
||||
return ((Component) => <Component {...bindingProps} />)(binding);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
/* Metro module 9742; source: modules/self_mod/shared/native/SafetyToolsActionSheetHeader.tsx; dependencies: [31, 27, 33, 4501, 697, 9733, 5282, 4573, 2] */
|
||||
function _fun76530(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9928:6, offset: 0x01dd2700, size: 256 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value.jsx;
|
||||
const env0_5 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
const env0_6 = Reflect.apply(createStyles, value, [{navbarContainer: {'display': 'flex', 'flexDirection': 'row',
|
||||
'justifyContent': 'center'}, navbarLeft: {position: 'absolute', left: PX_16}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/shared/native/SafetyToolsActionSheetHeader.tsx');
|
||||
exports.default = SafetyToolsActionSheetHeader;
|
||||
}
|
||||
|
||||
function SafetyToolsActionSheetHeader({title, channelId, recipientId, warningId, warningType, hasBackButton}) { // fn#76531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9928:315, offset: 0x01dd2800, size: 263 bytes, params: 2, frame: 22
|
||||
const env0_2 = warningId;
|
||||
const styles = useStyles();
|
||||
const binding = env0_2;
|
||||
const value2 = binding.useCallback(_fun76532, [channelId, recipientId, warningId, warningType]);
|
||||
const useMemo = binding.useMemo;
|
||||
const r6 = hasBackButton != null && Reflect.apply(useMemo, binding, [_fun76533, [value2, styles.navbarLeft]]);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View style={styles.navbarContainer}>
|
||||
{r6}
|
||||
<Text variant="heading-lg/bold" color="mobile-text-heading-primary">
|
||||
{title}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun76532() { // fn#76532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9928:459, offset: 0x01dd2907, size: 59 bytes, params: 1, frame: 18
|
||||
let value = environment.__proto__;
|
||||
value = require(9733) /* metro dependency 9733: SafetyToolsActionCreatorsNative */;
|
||||
value.openSafetyToolsActionSheet(channelId, recipientId, warningId, warningType);
|
||||
}
|
||||
|
||||
function _fun76533() { // fn#76533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9928:534, offset: 0x01dd2942, size: 71 bytes, params: 1, frame: 15
|
||||
return ((Component) => <Component style={styles.navbarLeft} />)((require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton(env0_5));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/* Metro module 9741; source: modules/self_mod/shared/native/SafetyToolsActionSheetWrapper.tsx; dependencies: [31, 1379, 33, 566, 6275, 9742, 2] */
|
||||
function _fun76526(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9927:6, offset: 0x01dd2536, size: 158 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/shared/native/SafetyToolsActionSheetWrapper.tsx');
|
||||
exports.default = SafetyToolsActionSheetWrapper;
|
||||
}
|
||||
|
||||
function SafetyToolsActionSheetWrapper({headerTitle, hasHeaderBack, channelId, warningId, warningType, recipientId, children, onClose}) { // fn#76527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9927:136, offset: 0x01dd25d4, size: 273 bytes, params: 2, frame: 25
|
||||
var r0;
|
||||
var BottomSheet;
|
||||
var value;
|
||||
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
|
||||
return ChannelStore.getChannel(channelId);
|
||||
});
|
||||
env0_3.useEffect(function() {
|
||||
if (channel == null) {
|
||||
onClose();
|
||||
}
|
||||
}, [channel, onClose]);
|
||||
if (channel != null) {
|
||||
BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
value = importDefault(9742) /* metro dependency 9742: SafetyToolsActionSheetHeader */;
|
||||
value = <BottomSheet showGradient startExpanded header={((Component) => <Component recipientId={recipientId} warningId={warningId} warningType={warningType} hasBackButton={hasHeaderBack} title={headerTitle} channelId={channelId} />)(value)}>{children}</BottomSheet>;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
/* Metro module 9740; source: modules/self_mod/shared/native/SafetyToolsCrisisTextLineActionSheet.tsx; dependencies: [31, 27, 9734, 33, 4501, 697, 9741, 1244, 4573, 4578, 3853, 9731, 2] */
|
||||
function _fun76522(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9926:6, offset: 0x01dd213a, size: 342 bytes, params: 8, frame: 22
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(9734) /* metro dependency 9734: Constants */;
|
||||
const env0_4 = value.CRISIS_TEXT_LINE_SMS_URI;
|
||||
const env0_5 = value.CRISIS_TEXT_LINE_URL;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {'display': 'flex', 'alignItems': 'center', 'gap': null, 'padding': null, 'paddingTop': 0};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.gap = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.padding = PX_16;
|
||||
object3.container = object4;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object3.description = {'textAlign': 'center', 'marginBottom': null, 'maxWidth': 300, marginBottom: PX_8};
|
||||
const env0_8 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/shared/native/SafetyToolsCrisisTextLineActionSheet.tsx');
|
||||
exports.default = SafetyToolsCrisisTextLineActionSheet;
|
||||
}
|
||||
|
||||
function SafetyToolsCrisisTextLineActionSheet({channelId, recipientId, warningId, warningType, onClose, trackAnalyticsEvent}) { // fn#76523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9926:542, offset: 0x01dd2290, size: 514 bytes, params: 2, frame: 27
|
||||
const styles = useStyles();
|
||||
const SafetyToolsActionSheetWrapper = importDefault(9741) /* metro dependency 9741: SafetyToolsActionSheetWrapper */;
|
||||
const object2 = {hasHeaderBack: true, recipientId: recipientId, warningId: warningId, warningType: warningType};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const NUMAsF = (require(1244) /* metro dependency 1244: indexNative */).t.NUMAsF;
|
||||
object2.headerTitle = Reflect.apply(string, intl, [NUMAsF]);
|
||||
object2.channelId = channelId;
|
||||
object2.onClose = onClose;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const items2 = [<Text variant="text-md/medium" color="text-default" style={styles.description}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.uicS5l)}</Text>];
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
items2[1] = <Button variant="secondary" size="lg" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.lkUb4S)} grow onPress={function() {
|
||||
importDefault(dependencyMap[10]).openURL(CRISIS_TEXT_LINE_SMS_URI);
|
||||
trackAnalyticsEvent(require(dependencyMap[11]).CtaEventTypes.USER_SAFETY_TOOLS_CTL_SMS);
|
||||
}} />;
|
||||
items2[2] = <Button variant="secondary" size="lg" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ogLlvy)} grow onPress={function() {
|
||||
importDefault(dependencyMap[10]).openURL(CRISIS_TEXT_LINE_URL);
|
||||
trackAnalyticsEvent(require(dependencyMap[11]).CtaEventTypes.USER_SAFETY_TOOLS_CTL_WEB);
|
||||
}} />;
|
||||
return (
|
||||
<SafetyToolsActionSheetWrapper {...object2}>
|
||||
<View style={styles.container}>
|
||||
{items2}
|
||||
</View>
|
||||
</SafetyToolsActionSheetWrapper>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
/* Metro module 9753; source: modules/self_mod/shared/native/SafetyToolsSafetyTipsActionSheet.tsx; dependencies: [31, 27, 9734, 33, 4501, 697, 9741, 1244, 9754, 4573, 2] */
|
||||
function _fun76571(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9939:6, offset: 0x01ddb798, size: 243 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_4 = (require(9734) /* metro dependency 9734: Constants */).getInappropriateConversationsSafetyTips;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{safetyTipsContainer: {marginHorizontal: PX_16}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/shared/native/SafetyToolsSafetyTipsActionSheet.tsx');
|
||||
exports.default = SafetyToolsSafetyTipsActionSheet;
|
||||
}
|
||||
|
||||
function SafetyToolsSafetyTipsActionSheet({channelId, recipientId, warningId, warningType, onClose}) { // fn#76572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9939:380, offset: 0x01ddb88b, size: 298 bytes, params: 2, frame: 24
|
||||
const styles = useStyles();
|
||||
const SafetyToolsActionSheetWrapper = importDefault(9741) /* metro dependency 9741: SafetyToolsActionSheetWrapper */;
|
||||
const object2 = {hasHeaderBack: true, recipientId: recipientId, warningId: warningId, warningType: warningType};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const EtNxi6 = (require(1244) /* metro dependency 1244: indexNative */).t.EtNxi6;
|
||||
object2.headerTitle = Reflect.apply(string, intl, [EtNxi6]);
|
||||
object2.channelId = channelId;
|
||||
object2.onClose = onClose;
|
||||
const SafetyTipsSection = importDefault(9754) /* metro dependency 9754: SafetyTipsSection */;
|
||||
string = intl.string;
|
||||
const DJMZX6 = (require(1244) /* metro dependency 1244: indexNative */).t.DJMZX6;
|
||||
return (
|
||||
<SafetyToolsActionSheetWrapper {...object2}>
|
||||
<View style={styles.safetyTipsContainer}>
|
||||
<SafetyTipsSection
|
||||
description={Reflect.apply(string, intl, [DJMZX6])}
|
||||
safetyTips={getInappropriateConversationsSafetyTips().map(_fun76573)}
|
||||
/>
|
||||
</View>
|
||||
</SafetyToolsActionSheetWrapper>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun76573(a0, a1) { // fn#76573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9939:776, offset: 0x01ddb9b5, 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} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
/* Metro module 11298; source: modules/self_mod/shared/native/SafetyWarningBanner.tsx; dependencies: [31, 27, 33, 4501, 697, 4826, 4831, 9731, 1244, 1305, 11299, 11300, 4573, 4578, 2] */
|
||||
function _fun86212(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11484:6, offset: 0x01f8bdff, size: 643 bytes, params: 8, frame: 25
|
||||
var object4;
|
||||
const env0_0 = require;
|
||||
const closure = SafetyWarningBanner;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value.Image;
|
||||
const env0_5 = value.Pressable;
|
||||
const env0_6 = value.View;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object4 = {};
|
||||
const object6 = {};
|
||||
const BACKGROUND_SURFACE_HIGHEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGHEST;
|
||||
object6.backgroundColor = BACKGROUND_SURFACE_HIGHEST;
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.paddingHorizontal = PX_16;
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object6.paddingVertical = PX_12;
|
||||
const SHADOW_LOW = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_LOW;
|
||||
copyDataProperties(object6, SHADOW_LOW, undefined);
|
||||
object4.container = object6;
|
||||
object4.contentContainer = {'flexDirection': 'row', 'alignItems': 'center'};
|
||||
object4.safetyShieldIconContainer = {'width': 42, 'height': 50};
|
||||
object4.safetyShieldIcon = {'flex': 1, 'width': 'auto', 'height': 'auto'};
|
||||
const object8 = {flex: 1};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object8.marginLeft = PX_16;
|
||||
const PX_40 = (importDefault(697) /* metro dependency 697: native */).space.PX_40;
|
||||
object8.marginRight = PX_40;
|
||||
object4.textContainer = object8;
|
||||
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
|
||||
object4.text = {color: MOBILE_TEXT_HEADING_PRIMARY};
|
||||
const object9 = {position: 'absolute'};
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object9.top = PX_8;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object9.right = PX_16;
|
||||
object9.zIndex = 1;
|
||||
object4.closeButton = object9;
|
||||
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
|
||||
object4.closeButtonIcon = {tintColor: INTERACTIVE_TEXT_DEFAULT};
|
||||
const object10 = {flexDirection: 'row'};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object10.marginTop = PX_16;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object10.gap = PX_8;
|
||||
object4.buttonsContainer = object10;
|
||||
const env0_9 = Reflect.apply(createStyles, value, [object4]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/shared/native/SafetyWarningBanner.tsx');
|
||||
exports.default = closure;
|
||||
exports.SafetyWarningBanner = closure;
|
||||
}
|
||||
|
||||
function SafetyWarningBanner({channelId, warningId, senderId, warningType, header, description, onDismiss, buttons}) { // fn#86213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11484:929, offset: 0x01f8c082, size: 693 bytes, params: 2, frame: 34
|
||||
const env0_3 = warningType;
|
||||
const styles = useStyles();
|
||||
env0_3.useEffect(function() {
|
||||
var defaultImport = importDefault(dependencyMap[5]);
|
||||
var object = {};
|
||||
object.name = require(dependencyMap[6]).MetricEvents.SAFETY_WARNING_VIEW;
|
||||
defaultImport.increment(object);
|
||||
}, []);
|
||||
const pressableBindingProps = {style: styles.closeButton, onPress: env0_3.useCallback(function() {
|
||||
if (onDismiss != null) {
|
||||
onDismiss();
|
||||
}
|
||||
var moduleValue = require(dependencyMap[7]);
|
||||
var object = {};
|
||||
object.channelId = channelId;
|
||||
object.warningId = warningId;
|
||||
object.senderId = senderId;
|
||||
object.warningType = warningType;
|
||||
object.cta = require(dependencyMap[7]).CtaEventTypes.USER_BANNER_DISMISS;
|
||||
moduleValue.trackCtaEvent(object);
|
||||
}, [onDismiss, channelId, warningId, senderId, warningType])};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
pressableBindingProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1UatJ0']);
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const iconProps2 = {style: styles.closeButtonIcon, source: importDefault(11299) /* metro dependency 11299 */};
|
||||
const IconSizes = (require(1305) /* metro dependency 1305: native */).IconSizes;
|
||||
const MEDIUM = IconSizes.MEDIUM;
|
||||
iconProps2.size = MEDIUM;
|
||||
const items2 = [<Pressable {...pressableBindingProps}><Icon {...iconProps2} /></Pressable>];
|
||||
const view = <View style={styles.safetyShieldIconContainer}><Image style={styles.safetyShieldIcon} source={importDefault(11300) /* metro dependency 11300 */} resizeMode="contain" /></View>;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
items2[1] = <View style={styles.contentContainer}>{view}<View style={styles.textContainer}><Text style={styles.text} variant="heading-md/semibold">{header}</Text><Text style={styles.text} variant="heading-sm/normal">{description}</Text></View></View>;
|
||||
items2[2] = <View style={styles.buttonsContainer}>{buttons.map(_fun86216)}</View>;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun86216(a0, a1) { // fn#86216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11484:1956, offset: 0x01f8c3fb, size: 119 bytes, params: 3, frame: 18
|
||||
const value = environment.__proto__;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
return (
|
||||
<Button
|
||||
size="md"
|
||||
variant={a0.variant ?? 'primary'}
|
||||
text={a0.text}
|
||||
accessibilityLabel={a0.text}
|
||||
onPress={a0.onpress}
|
||||
grow
|
||||
key={a1}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
/* Metro module 11290; source: modules/self_mod/stranger_danger/hooks/useStrangerDangerWarning.tsx; dependencies: [1878, 9706, 566, 11291, 11292, 11293, 8169, 9705, 2] */
|
||||
function _fun86179(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11476:6, offset: 0x01f8ac65, 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/stranger_danger/hooks/useStrangerDangerWarning.tsx');
|
||||
exports.useStrangerDangerWarning = useStrangerDangerWarning;
|
||||
}
|
||||
|
||||
function useStrangerDangerWarning(a0) { // fn#86180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11476:263, offset: 0x01f8aced, size: 247 bytes, params: 2, frame: 20
|
||||
var value;
|
||||
const value2 = undefined;
|
||||
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
const value3 = (require(11291) /* metro dependency 11291: useIsSpamMessageRequest */).useIsSpamMessageRequest(a0);
|
||||
const value4 = (require(11292) /* metro dependency 11292: useIsMessageRequest */).useIsMessageRequest(a0);
|
||||
const useChannelSafetyWarningModule = require(11293) /* metro dependency 11293: useChannelSafetyWarning */;
|
||||
const useChannelSafetyWarning = useChannelSafetyWarningModule.useChannelSafetyWarning;
|
||||
const STRANGER_DANGER = SafetyWarningTypes.STRANGER_DANGER;
|
||||
const value5 = Reflect.apply(useChannelSafetyWarning, useChannelSafetyWarningModule, [a0, STRANGER_DANGER]);
|
||||
const value6 = (require(8169) /* metro dependency 8169: useUserIsTeen */).useUserIsTeen();
|
||||
const r6 = currentUser == null ? value2 : currentUser.isStaff();
|
||||
const useInappropriateConversationWarningsForChannel = (require(9705) /* metro dependency 9705: useInappropriateConversationWarningsForChannel */).useInappropriateConversationWarningsForChannel;
|
||||
value = Reflect.apply(useInappropriateConversationWarningsForChannel, value, [a0]).length > 0;
|
||||
if (!value6) {
|
||||
if (r6 !== true) {
|
||||
return value2;
|
||||
}
|
||||
}
|
||||
if (value3) {
|
||||
return value2;
|
||||
}
|
||||
if (value4) {
|
||||
return value2;
|
||||
}
|
||||
return value ? value2 : value5;
|
||||
}
|
||||
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
/* Metro module 11307; source: modules/self_mod/stranger_danger/native/components/StrangerDangerMoreTipsModalActionItems.tsx; dependencies: [57, 31, 3793, 1878, 9706, 33, 566, 3995, 9731, 8783, 1244, 8999, 8998, 10625, 6231, 11308, 2] */
|
||||
function _fun86257(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11493:6, offset: 0x01f8deed, size: 212 bytes, params: 8, frame: 19
|
||||
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 relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_7 = (require(9706) /* metro dependency 9706: ChannelSafetyWarningsStore */).SafetyWarningTypes;
|
||||
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/stranger_danger/native/components/StrangerDangerMoreTipsModalActionItems.tsx');
|
||||
exports.default = StrangerDangerMoreTipsModalActionItems;
|
||||
}
|
||||
|
||||
function StrangerDangerMoreTipsModalActionItems({channelId, warningId, senderId, onBlockPressed}) { // fn#86258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11493:317, offset: 0x01f8dfc1, size: 445 bytes, params: 2, frame: 27
|
||||
const env0_3 = onBlockPressed;
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getUser(senderId);
|
||||
}, [senderId]);
|
||||
const binding = value2;
|
||||
const value3 = binding.useMemo(_fun86260, [value2]);
|
||||
const {isIgnored,
|
||||
isBlocked} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([RelationshipStore],
|
||||
function() {
|
||||
var object = {};
|
||||
var senderIdBinding = senderId;
|
||||
object.isIgnored = RelationshipStore.isIgnored(senderIdBinding);
|
||||
object.isBlocked = RelationshipStore.isBlocked(senderIdBinding);
|
||||
return object;
|
||||
}, [senderId]);
|
||||
const [property, property2] = env0_3(binding.useState(isIgnored), 2);
|
||||
const value9 = binding.useMemo(_fun86264, [property, isBlocked, value3, binding.useCallback(_fun86262, [channelId,
|
||||
warningId, senderId, property2]), binding.useCallback(_fun86263, [channelId, warningId, senderId, property2]),
|
||||
onBlockPressed]);
|
||||
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
return (
|
||||
<TableRowGroup hasIcons>
|
||||
{value9.map(_fun86265)}
|
||||
</TableRowGroup>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun86260() { // fn#86260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11493:494, offset: 0x01f8e199, size: 45 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(env0_4);
|
||||
}
|
||||
|
||||
function _fun86262() { // fn#86262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11493:711, offset: 0x01f8e1f8, size: 156 bytes, params: 1, frame: 22
|
||||
const value = environment.__proto__;
|
||||
const safetyWarningUtilsModule = require(9731) /* metro dependency 9731: SafetyWarningUtils */;
|
||||
const trackCtaEvent = safetyWarningUtilsModule.trackCtaEvent;
|
||||
const object2 = {};
|
||||
const channelIdBinding = channelId;
|
||||
object2.channelId = channelIdBinding;
|
||||
object2.warningId = warningId;
|
||||
const senderIdBinding = senderId;
|
||||
object2.senderId = senderIdBinding;
|
||||
const STRANGER_DANGER = SafetyWarningTypes.STRANGER_DANGER;
|
||||
object2.warningType = STRANGER_DANGER;
|
||||
const CtaEventTypes = safetyWarningUtilsModule.CtaEventTypes;
|
||||
const USER_MODAL_IGNORE = CtaEventTypes.USER_MODAL_IGNORE;
|
||||
object2.cta = USER_MODAL_IGNORE;
|
||||
Reflect.apply(trackCtaEvent, safetyWarningUtilsModule, [object2]);
|
||||
(importDefault(8783) /* metro dependency 8783: RelationshipActionCreators */).ignoreUser(senderIdBinding,
|
||||
'mobile_stranger_danger_more', channelIdBinding);
|
||||
env0_8(true);
|
||||
}
|
||||
|
||||
function _fun86263() { // fn#86263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11493:940, offset: 0x01f8e294, size: 156 bytes, params: 1, frame: 22
|
||||
const value = environment.__proto__;
|
||||
const safetyWarningUtilsModule = require(9731) /* metro dependency 9731: SafetyWarningUtils */;
|
||||
const trackCtaEvent = safetyWarningUtilsModule.trackCtaEvent;
|
||||
const object2 = {};
|
||||
const channelIdBinding = channelId;
|
||||
object2.channelId = channelIdBinding;
|
||||
object2.warningId = warningId;
|
||||
const senderIdBinding = senderId;
|
||||
object2.senderId = senderIdBinding;
|
||||
const STRANGER_DANGER = SafetyWarningTypes.STRANGER_DANGER;
|
||||
object2.warningType = STRANGER_DANGER;
|
||||
const CtaEventTypes = safetyWarningUtilsModule.CtaEventTypes;
|
||||
const USER_MODAL_UNIGNORE = CtaEventTypes.USER_MODAL_UNIGNORE;
|
||||
object2.cta = USER_MODAL_UNIGNORE;
|
||||
Reflect.apply(trackCtaEvent, safetyWarningUtilsModule, [object2]);
|
||||
(importDefault(8783) /* metro dependency 8783: RelationshipActionCreators */).unignoreUser(senderIdBinding,
|
||||
'mobile_stranger_danger_more', channelIdBinding);
|
||||
env0_8(false);
|
||||
}
|
||||
|
||||
function _fun86264() { // fn#86264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11493:1169, offset: 0x01f8e330, size: 539 bytes, params: 1, frame: 21
|
||||
let object2 = {};
|
||||
const binding = env0_7;
|
||||
const value3 = undefined;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let formatToPlainString = intl.formatToPlainString;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
object2.title = binding ? Reflect.apply(formatToPlainString, intl, [t.ZLIKgJ,
|
||||
{username: env0_5}]) : Reflect.apply(formatToPlainString, intl, [t.QiyPaJ, {username: env0_5}]);
|
||||
object2.description = env0_7 ? value3 : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.naWE6W);
|
||||
object2.onClick = env0_7 ? env0_10 : env0_9;
|
||||
object2.icon = ((Component) => <Component />)(env0_7 ? (require(8999) /* metro dependency 8999: EyeIcon */).EyeIcon : (require(8998) /* metro dependency 8998: EyeSlashIcon */).EyeSlashIcon);
|
||||
const isBlockedBinding = isBlocked;
|
||||
object2.disabled = isBlockedBinding;
|
||||
const items2 = [object2];
|
||||
object2 = {};
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
object2.title = isBlockedBinding ? Reflect.apply(formatToPlainString, intl, [t.bluEjH,
|
||||
{username: env0_5}]) : Reflect.apply(formatToPlainString, intl, [t['gc/wxc'], {username: env0_5}]);
|
||||
object2.description = isBlocked ? value3 : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.G08MKu);
|
||||
object2.onClick = onBlockPressed;
|
||||
const DenyIcon = (require(10625) /* metro dependency 10625: DenyIcon */).DenyIcon;
|
||||
object2.icon = <DenyIcon color="text-feedback-critical" />;
|
||||
object2.variant = 'danger';
|
||||
object2.disabled = isBlocked;
|
||||
items2[1] = object2;
|
||||
return items2;
|
||||
}
|
||||
|
||||
function _fun86265(a0, a1) { // fn#86265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11493:1835, offset: 0x01f8e54b, size: 75 bytes, params: 3, frame: 17
|
||||
const value = environment.__proto__;
|
||||
const Fragment = env1_4.Fragment;
|
||||
return (
|
||||
<Fragment key={a1}>
|
||||
{((Component) => <Component {...a0} />)(importDefault(11308) /* metro dependency 11308: MoreYouCanDoRow */)}
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
+177
@@ -0,0 +1,177 @@
|
||||
/* Metro module 11306; source: modules/self_mod/stranger_danger/native/components/StrangerDangerWarningBanner.tsx; dependencies: [31, 3793, 9706, 9734, 661, 8781, 33, 4501, 697, 566, 9731, 9732, 5080, 4080, 8794, 1962, 480, 11298, 1244, 11301, 4573, 11307, 2] */
|
||||
function _fun86244(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11492:6, offset: 0x01f8d6a2, size: 335 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const closure = StrangerDangerWarningBanner;
|
||||
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;
|
||||
let value = require(9734) /* metro dependency 9734: Constants */;
|
||||
const env0_6 = value.STRANGER_DANGER_MORE_TIPS_MODAL_KEY;
|
||||
const env0_7 = value.getStrangerDangerSafetyTips;
|
||||
const env0_8 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const env0_9 = (require(8781) /* metro dependency 8781: RestrictionConfirmationConstants */).BLOCK_CONFIRMATION_ACTION_SHEET_KEY;
|
||||
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
const env0_11 = Reflect.apply(createStyles, value, [{moreTipsHeader: {backgroundColor: BACKGROUND_BASE_LOWER,
|
||||
shadowColor: 'transparent'}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/stranger_danger/native/components/StrangerDangerWarningBanner.tsx');
|
||||
exports.default = closure;
|
||||
exports.StrangerDangerWarningBanner = closure;
|
||||
}
|
||||
|
||||
function StrangerDangerWarningBanner({channelId, warningId, senderId}) { // fn#86245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11492:434, offset: 0x01f8d7f1, size: 668 bytes, params: 2, frame: 25
|
||||
var object6;
|
||||
var items;
|
||||
var object4;
|
||||
var intl3;
|
||||
const env0_3 = useStyles();
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RelationshipStore], function() {
|
||||
return RelationshipStore.isBlocked(senderId);
|
||||
}, [senderId]);
|
||||
env0_3.useEffect(function() {
|
||||
var moduleValue = require(dependencyMap[10]);
|
||||
var SAFETY_WARNING_VIEWED = AnalyticEvents.SAFETY_WARNING_VIEWED;
|
||||
moduleValue.trackViewedEvent(SAFETY_WARNING_VIEWED, {channelId: channelId, warningId: warningId,
|
||||
senderId: senderId,
|
||||
warningType: SafetyWarningTypes.STRANGER_DANGER});
|
||||
}, [channelId, warningId, senderId]);
|
||||
const value3 = env0_3.useCallback(function() {
|
||||
require(dependencyMap[11]).dismissChannelSafetyWarnings(channelId, [warningId]);
|
||||
importDefault(dependencyMap[12]).popWithKey(STRANGER_DANGER_MORE_TIPS_MODAL_KEY);
|
||||
}, [channelId, warningId]);
|
||||
const value5 = env0_3.useCallback(function(a0) {
|
||||
var env0_0 = a0;
|
||||
return _fun86252;
|
||||
}, [env0_3.useCallback(function(a0) {
|
||||
var env0_0 = a0;
|
||||
return _fun86250;
|
||||
}, [value3, channelId, warningId, senderId]), value3, channelId, warningId, senderId]);
|
||||
const SafetyWarningBanner = importDefault(11298) /* metro dependency 11298: SafetyWarningBanner */;
|
||||
object6 = {channelId: channelId, warningId: warningId, senderId: senderId};
|
||||
const STRANGER_DANGER = SafetyWarningTypes.STRANGER_DANGER;
|
||||
object6.warningType = STRANGER_DANGER;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
object6.header = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.iOkDpM]);
|
||||
string = intl.string;
|
||||
const ISUbcM = (require(1244) /* metro dependency 1244: indexNative */).t.ISUbcM;
|
||||
object6.description = Reflect.apply(string, intl, [ISUbcM]);
|
||||
object6.onDismiss = value3;
|
||||
const object5 = {};
|
||||
const intl2 = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object5.text = intl2.string((require(1244) /* metro dependency 1244: indexNative */).t['Qk/c48']);
|
||||
object5.variant = 'primary';
|
||||
object5.onpress = onpress;
|
||||
const items2 = [object5];
|
||||
if (value2) {
|
||||
items = [];
|
||||
} else {
|
||||
object4 = {};
|
||||
intl3 = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object4.text = intl3.string((require(1244) /* metro dependency 1244: indexNative */).t.ie0QdN);
|
||||
object4.variant = 'destructive';
|
||||
object4.onpress = value5((require(9731) /* metro dependency 9731: SafetyWarningUtils */).CtaEventTypes.USER_BANNER_BLOCK_CONFIRM);
|
||||
items = [object4];
|
||||
}
|
||||
arraySpread(items2, items, 1, intl);
|
||||
object6.buttons = items2;
|
||||
return <SafetyWarningBanner {...object6} />;
|
||||
}
|
||||
|
||||
function _fun86249(a0) { // fn#86249, offset: 0x01f8db60, size: 18 bytes, params: 2, frame: 2
|
||||
const env0_0 = a0;
|
||||
return _fun86250;
|
||||
}
|
||||
|
||||
function _fun86251(a0) { // fn#86251, offset: 0x01f8dbda, size: 18 bytes, params: 2, frame: 2
|
||||
const env0_0 = a0;
|
||||
return _fun86252;
|
||||
}
|
||||
|
||||
function StrangerDangerWarningBannerOnpress() { // fn#86255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11492:1636, owner: StrangerDangerWarningBanner.onpress, offset: 0x01f8dd36, size: 374 bytes, params: 1, frame: 27
|
||||
const defaultImport = importDefault(dependencyMap[12]);
|
||||
const pushLazy = defaultImport.pushLazy;
|
||||
const value2 = require(dependencyMap[15])(dependencyMap[19], dependencyMap.paths);
|
||||
const object2 = {};
|
||||
object2.modalKey = STRANGER_DANGER_MORE_TIPS_MODAL_KEY;
|
||||
object2.headerStyle = styles.moreTipsHeader;
|
||||
const channelIdBinding = channelId;
|
||||
object2.channelId = channelIdBinding;
|
||||
const warningIdBinding = warningId;
|
||||
object2.warningId = warningIdBinding;
|
||||
const senderIdBinding = senderId;
|
||||
object2.senderId = senderIdBinding;
|
||||
const intl = require(dependencyMap[18]).intl;
|
||||
const string = intl.string;
|
||||
const DJMZX6 = require(dependencyMap[18]).t.DJMZX6;
|
||||
object2.description = Reflect.apply(string, intl, [DJMZX6]);
|
||||
object2.safetyTips = getStrangerDangerSafetyTips().map(_fun86256);
|
||||
const defaultImport2 = importDefault(dependencyMap[21]);
|
||||
const binding = env0_6;
|
||||
const CtaEventTypes = require(dependencyMap[10]).CtaEventTypes;
|
||||
const USER_MODAL_BLOCK_CONFIRM = CtaEventTypes.USER_MODAL_BLOCK_CONFIRM;
|
||||
object2.actionItems = ((Component) => <Component channelId={channelIdBinding} warningId={warningIdBinding} senderId={senderIdBinding} onBlockPressed={binding(USER_MODAL_BLOCK_CONFIRM)} />)(defaultImport2);
|
||||
Reflect.apply(pushLazy, defaultImport, [value2, object2, STRANGER_DANGER_MORE_TIPS_MODAL_KEY]);
|
||||
const moduleValue2 = require(dependencyMap[10]);
|
||||
const trackCtaEvent = moduleValue2.trackCtaEvent;
|
||||
const STRANGER_DANGER = SafetyWarningTypes.STRANGER_DANGER;
|
||||
const OPEN_MORE_TIPS = CtaEventTypes.OPEN_MORE_TIPS;
|
||||
Reflect.apply(trackCtaEvent, moduleValue2, [{channelId: channelIdBinding, warningId: warningIdBinding,
|
||||
senderId: senderIdBinding, warningType: STRANGER_DANGER, cta: OPEN_MORE_TIPS}]);
|
||||
}
|
||||
|
||||
function _fun86250() { // fn#86250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11492:848, offset: 0x01f8db72, size: 104 bytes, params: 1, frame: 15
|
||||
env1_4();
|
||||
const safetyWarningUtilsModule = require(9731) /* metro dependency 9731: SafetyWarningUtils */;
|
||||
const trackCtaEvent = safetyWarningUtilsModule.trackCtaEvent;
|
||||
const STRANGER_DANGER = SafetyWarningTypes.STRANGER_DANGER;
|
||||
Reflect.apply(trackCtaEvent, safetyWarningUtilsModule, [{channelId: channelId, warningId: warningId,
|
||||
senderId: senderId, warningType: STRANGER_DANGER, cta: env0_0}]);
|
||||
}
|
||||
|
||||
function _fun86252() { // fn#86252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11492:987, offset: 0x01f8dbec, size: 175 bytes, params: 1, frame: 21
|
||||
const defaultImport = importDefault(dependencyMap[13]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
const value2 = require(dependencyMap[15])(dependencyMap[14], dependencyMap.paths);
|
||||
const object2 = {};
|
||||
object2.userId = senderId;
|
||||
object2.channelId = channelId;
|
||||
object2.onBlock = env1_5(env0_0);
|
||||
object2.onSuccess = onSuccess_86253;
|
||||
object2.onIgnore = onIgnore;
|
||||
const ImpressionNames = require(dependencyMap[16]).ImpressionNames;
|
||||
const BLOCK_USER_CONFIRMATION = ImpressionNames.BLOCK_USER_CONFIRMATION;
|
||||
object2.impressionName = BLOCK_USER_CONFIRMATION;
|
||||
Reflect.apply(openLazy, defaultImport, [value2, BLOCK_CONFIRMATION_ACTION_SHEET_KEY, object2]);
|
||||
}
|
||||
|
||||
function _fun86256(a0, a1) { // fn#86256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11492:1831, offset: 0x01f8deac, 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 onSuccess_86253() { // fn#86253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11492:1081, offset: 0x01f8dc9b, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
return (importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function onIgnore() { // fn#86254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11492:1121, offset: 0x01f8dcc0, size: 118 bytes, params: 1, frame: 18
|
||||
env2_4();
|
||||
const safetyWarningUtilsModule = require(9731) /* metro dependency 9731: SafetyWarningUtils */;
|
||||
const trackCtaEvent = safetyWarningUtilsModule.trackCtaEvent;
|
||||
const object2 = {};
|
||||
object2.channelId = channelId;
|
||||
object2.warningId = warningId;
|
||||
object2.senderId = senderId;
|
||||
const STRANGER_DANGER = SafetyWarningTypes.STRANGER_DANGER;
|
||||
object2.warningType = STRANGER_DANGER;
|
||||
const CtaEventTypes = safetyWarningUtilsModule.CtaEventTypes;
|
||||
const USER_BANNER_IGNORE_CONFIRM = CtaEventTypes.USER_BANNER_IGNORE_CONFIRM;
|
||||
object2.cta = USER_BANNER_IGNORE_CONFIRM;
|
||||
Reflect.apply(trackCtaEvent, safetyWarningUtilsModule, [object2]);
|
||||
}
|
||||
|
||||
+136
@@ -0,0 +1,136 @@
|
||||
/* Metro module 11301; source: modules/self_mod/stranger_danger/native/components/more_tips_modal/MoreTipsModal.tsx; dependencies: [31, 27, 9706, 661, 33, 4501, 697, 9754, 4573, 1244, 11302, 5277, 5080, 8160, 1305, 1585, 632, 9731, 4826, 4831, 5280, 2] */
|
||||
function _fun86219(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11487:6, offset: 0x01f8c4fe, size: 479 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value.View;
|
||||
const env0_5 = value.ScrollView;
|
||||
const channelSafetyWarningsStore = importDefault(9706) /* metro dependency 9706: ChannelSafetyWarningsStore */;
|
||||
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object2.scroll = {backgroundColor: BACKGROUND_BASE_LOWER};
|
||||
const object4 = {};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.marginHorizontal = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.marginBottom = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.gap = PX_16;
|
||||
object2.contentContainer = object4;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.tipsContainer = {gap: PX_8};
|
||||
object2.learnMore = {alignItems: 'center'};
|
||||
const object5 = {};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object5.marginTop = PX_16;
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object5.marginBottom = PX_4;
|
||||
object2.header = object5;
|
||||
const env0_10 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/stranger_danger/native/components/more_tips_modal/MoreTipsModal.tsx');
|
||||
exports.default = MoreTipsModal;
|
||||
}
|
||||
|
||||
function MoreTipsModalScreen({channelId, warningId, senderId, description, safetyTips, actionItems, learnMore}) { // fn#86220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11487:545, offset: 0x01f8c6dd, size: 457 bytes, params: 2, frame: 33
|
||||
const styles = useStyles();
|
||||
const items2 = [<View style={styles.tipsContainer}>{((Component) => <Component description={description} safetyTips={safetyTips} showHeader />)(importDefault(9754) /* metro dependency 9754: SafetyTipsSection */)}{learnMore != null ? <View style={styles.learnMore}>{learnMore}</View> : null}</View>];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const K5FKtc = (require(1244) /* metro dependency 1244: indexNative */).t.K5FKtc;
|
||||
items2[1] = <View><Text variant="eyebrow" color="text-default" style={styles.header}>{Reflect.apply(string, intl,
|
||||
[K5FKtc])}</Text>{actionItems}</View>;
|
||||
items2[2] = ((Component) => <Component channelId={channelId} warningId={warningId} senderId={senderId} />)(importDefault(11302) /* metro dependency 11302: WasThisHelpfulSection */);
|
||||
return (
|
||||
<ScrollView keyboardShouldPersistTaps="handled" style={styles.scroll}>
|
||||
<View style={styles.contentContainer}>
|
||||
{items2}
|
||||
</View>
|
||||
</ScrollView>
|
||||
);
|
||||
}
|
||||
|
||||
function getScreens_86221({headerStyle, modalKey, channelId, warningId, senderId, description, safetyTips, actionItems, learnMore}) { // fn#86221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11487:1123, offset: 0x01f8c8a6, size: 155 bytes, params: 2, frame: 5
|
||||
return {MORE_TIPS: {headerRight: headerRight_86222, headerTitle: function() {
|
||||
return null;
|
||||
}, headerLeft: function() {
|
||||
return null;
|
||||
}, headerStyle: headerStyle, render: render_86226}};
|
||||
}
|
||||
|
||||
function MoreTipsModal(a0) { // fn#86227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11487:1656, offset: 0x01f8ca63, size: 222 bytes, params: 2, frame: 23
|
||||
const channelId = a0.channelId;
|
||||
const warningId = a0.warningId;
|
||||
const senderId = a0.senderId;
|
||||
const top = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top;
|
||||
const channelSafetyWarning = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelSafetyWarningsStore],
|
||||
function() {
|
||||
return ChannelSafetyWarningsStore.getChannelSafetyWarning(channelId, warningId);
|
||||
});
|
||||
channelSafetyWarning.useEffect(_fun86229, [channelId, warningId, senderId, channelSafetyWarning]);
|
||||
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
|
||||
return (
|
||||
<Navigator
|
||||
screens={getScreens_86221(a0)}
|
||||
initialRouteName="MORE_TIPS"
|
||||
headerStatusBarHeight={top}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function getScreens_86221HeaderRight() { // fn#86222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11487:1289, owner: getScreens_86221.headerRight, offset: 0x01f8c941, size: 158 bytes, params: 1, frame: 18
|
||||
const HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
|
||||
const headerActionButtonProps = {onPress: onPress_86223, source: importDefault(8160) /* metro dependency 8160 */};
|
||||
const IconSizes = (require(1305) /* metro dependency 1305: native */).IconSizes;
|
||||
const MEDIUM = IconSizes.MEDIUM;
|
||||
headerActionButtonProps.iconSize = MEDIUM;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
headerActionButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq);
|
||||
return <HeaderActionButton {...headerActionButtonProps} />;
|
||||
}
|
||||
|
||||
function getScreens_86221Render() { // fn#86226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11487:1531, owner: getScreens_86221.render, offset: 0x01f8ca0c, size: 87 bytes, params: 1, frame: 14
|
||||
return (
|
||||
<MoreTipsModalScreen
|
||||
channelId={channelId}
|
||||
warningId={warningId}
|
||||
senderId={senderId}
|
||||
description={description}
|
||||
safetyTips={safetyTips}
|
||||
actionItems={actionItems}
|
||||
learnMore={learnMore}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun86229() { // fn#86229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11487:1836, offset: 0x01f8cb61, size: 174 bytes, params: 1, frame: 18
|
||||
const value2 = undefined;
|
||||
const safetyWarningUtilsModule = require(9731) /* metro dependency 9731: SafetyWarningUtils */;
|
||||
const trackViewedEvent = safetyWarningUtilsModule.trackViewedEvent;
|
||||
const SAFETY_WARNING_MODAL_VIEWED = AnalyticEvents.SAFETY_WARNING_MODAL_VIEWED;
|
||||
Reflect.apply(trackViewedEvent, safetyWarningUtilsModule, [SAFETY_WARNING_MODAL_VIEWED, {channelId: channelId,
|
||||
warningId: warningId, senderId: senderId,
|
||||
warningType: channelSafetyWarning == null ? value2 : channelSafetyWarning.type}]);
|
||||
const defaultImport = importDefault(4826) /* metro dependency 4826: MonitoringAgent */;
|
||||
const increment = defaultImport.increment;
|
||||
const MetricEvents = (require(4831) /* metro dependency 4831: MetricEvents */).MetricEvents;
|
||||
const SAFETY_WARNING_MODAL_VIEW = MetricEvents.SAFETY_WARNING_MODAL_VIEW;
|
||||
Reflect.apply(increment, defaultImport, [{name: SAFETY_WARNING_MODAL_VIEW}]);
|
||||
return value2;
|
||||
}
|
||||
|
||||
function headerRightOnPress() { // fn#86223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11487:1332, owner: getScreens_86221.headerRight.onPress, offset: 0x01f8c9df, size: 45 bytes, params: 1, frame: 11
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
|
||||
return value.popWithKey(modalKey);
|
||||
}
|
||||
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
/* Metro module 11308; source: modules/self_mod/stranger_danger/native/components/more_tips_modal/MoreYouCanDoRow.tsx; dependencies: [31, 33, 6238, 2] */
|
||||
function _fun86266(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11494:6, offset: 0x01f8e596, size: 131 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/stranger_danger/native/components/more_tips_modal/MoreYouCanDoRow.tsx');
|
||||
exports.default = MoreYouCanDoRow;
|
||||
}
|
||||
|
||||
function MoreYouCanDoRow({title, description, variant, onClick, icon, disabled}) { // fn#86267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11494:248, offset: 0x01f8e619, size: 104 bytes, params: 2, frame: 19
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
return (
|
||||
<TableRow
|
||||
label={title}
|
||||
subLabel={description}
|
||||
onPress={onClick}
|
||||
icon={icon}
|
||||
variant={variant}
|
||||
disabled={disabled}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
/* Metro module 11302; source: modules/self_mod/stranger_danger/native/components/more_tips_modal/WasThisHelpfulSection.tsx; dependencies: [31, 27, 9706, 9734, 33, 4501, 697, 632, 9732, 3857, 1244, 8035, 8036, 9731, 4573, 1305, 11303, 11304, 2] */
|
||||
function _fun86230(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11488:6, offset: 0x01f8cc0f, size: 618 bytes, params: 8, frame: 25
|
||||
var object4;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value.Pressable;
|
||||
const env0_5 = value.View;
|
||||
const channelSafetyWarningsStore = importDefault(9706) /* metro dependency 9706: ChannelSafetyWarningsStore */;
|
||||
const env0_7 = (require(9706) /* metro dependency 9706: ChannelSafetyWarningsStore */).SafetyWarningFeedbackTypes;
|
||||
value = require(9734) /* metro dependency 9734: Constants */;
|
||||
const env0_8 = value.DOWNVOTE_FEEDBACK_CONFIRMATION_TOAST_KEY;
|
||||
const FEEDBACK_BUTTON_ACTIVE_BACKGROUND_COLOR = value.FEEDBACK_BUTTON_ACTIVE_BACKGROUND_COLOR;
|
||||
const env0_9 = value.TOAST_SHIELD_ICON_COLOR;
|
||||
const env0_10 = value.UPVOTE_FEEDBACK_CONFIRMATION_TOAST_KEY;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_11 = value.jsx;
|
||||
const env0_12 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object4 = {container: {'flexDirection': 'column', 'alignItems': 'center'}};
|
||||
const object5 = {flexDirection: 'row'};
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object5.marginTop = PX_8;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object5.gap = PX_8;
|
||||
object4.buttonsContainer = object5;
|
||||
const object6 = {};
|
||||
let PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
object6.width = PX_32;
|
||||
PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
object6.height = PX_32;
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object6.alignItems = 'center';
|
||||
object6.justifyContent = 'center';
|
||||
object4.buttonsBackground = object6;
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object4.buttonsBackgroundInactive = {backgroundColor: BACKGROUND_SURFACE_HIGH};
|
||||
const MOBILE_LEGACY_BUTTON_SECONDARY_BORDER_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_LEGACY_BUTTON_SECONDARY_BORDER_DEFAULT;
|
||||
object4.buttonsBackgroundActive = {borderWidth: 1, borderColor: MOBILE_LEGACY_BUTTON_SECONDARY_BORDER_DEFAULT,
|
||||
backgroundColor: FEEDBACK_BUTTON_ACTIVE_BACKGROUND_COLOR};
|
||||
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
|
||||
object4.buttonIconInactive = {color: INTERACTIVE_TEXT_DEFAULT};
|
||||
const INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
|
||||
object4.buttonIconActive = {color: INTERACTIVE_TEXT_ACTIVE};
|
||||
object4.toastContainer = {'paddingHorizontal': 8, 'paddingVertical': 12};
|
||||
const env0_13 = Reflect.apply(createStyles, value, [object4]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/self_mod/stranger_danger/native/components/more_tips_modal/WasThisHelpfulSection.tsx');
|
||||
exports.default = WasThisHelpfulSection;
|
||||
}
|
||||
|
||||
function WasThisHelpfulSection({channelId, warningId, senderId}) { // fn#86231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11488:1243, offset: 0x01f8ce79, size: 861 bytes, params: 2, frame: 31
|
||||
const styles = useStyles();
|
||||
const env0_3 = styles;
|
||||
const channelSafetyWarning = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelSafetyWarningsStore],
|
||||
function() {
|
||||
return ChannelSafetyWarningsStore.getChannelSafetyWarning(channelId, warningId);
|
||||
});
|
||||
const binding = env0_3;
|
||||
const value2 = binding.useMemo(function() {
|
||||
return channelSafetyWarning?.feedback_type === SafetyWarningFeedbackTypes.UPVOTE;
|
||||
}, [channelSafetyWarning]);
|
||||
const value3 = binding.useMemo(function() {
|
||||
return channelSafetyWarning?.feedback_type === SafetyWarningFeedbackTypes.DOWNVOTE;
|
||||
}, [channelSafetyWarning]);
|
||||
const env0_5 = binding.useCallback(_fun86235, [channelId, warningId, styles.toastContainer, senderId,
|
||||
channelSafetyWarning]);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const L84yVm = (require(1244) /* metro dependency 1244: indexNative */).t.L84yVm;
|
||||
const text = <Text variant="text-sm/normal" color="mobile-text-heading-primary">{Reflect.apply(string, intl,
|
||||
[L84yVm])}</Text>;
|
||||
const pressableProps = {style: [styles.buttonsBackground,
|
||||
value2 ? styles.buttonsBackgroundActive : styles.buttonsBackgroundInactive], disabled: value2,
|
||||
onPress: onPress_86236,
|
||||
accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2GrOCN'])};
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
let Sizes = Icon2.Sizes;
|
||||
let SMALL_20 = Sizes.SMALL_20;
|
||||
const pressable = <Pressable {...pressableProps}><Icon size={SMALL_20} source={importDefault(11303) /* metro dependency 11303 */} color={value2 ? styles.buttonIconActive.color : styles.buttonIconInactive.color} /></Pressable>;
|
||||
const pressableProps2 = {style: [styles.buttonsBackground,
|
||||
value3 ? styles.buttonsBackgroundActive : styles.buttonsBackgroundInactive], disabled: value3,
|
||||
onPress: onPress_86237};
|
||||
string = intl.string;
|
||||
const COp9BO = (require(1244) /* metro dependency 1244: indexNative */).t.COp9BO;
|
||||
pressableProps2.accessibilityLabel = Reflect.apply(string, intl, [COp9BO]);
|
||||
const Icon3 = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
Sizes = Icon3.Sizes;
|
||||
SMALL_20 = Sizes.SMALL_20;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{text}
|
||||
<View style={styles.buttonsContainer}>
|
||||
{pressable}
|
||||
<Pressable {...pressableProps2}>
|
||||
<Icon
|
||||
size={SMALL_20}
|
||||
source={importDefault(11304) /* metro dependency 11304 */}
|
||||
color={value3 ? styles.buttonIconActive.color : styles.buttonIconInactive.color}
|
||||
/>
|
||||
</Pressable>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun86235(a0, a1) { // fn#86235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11488:1546, offset: 0x01f8d234, size: 333 bytes, params: 3, frame: 21
|
||||
const value = environment.__proto__;
|
||||
const value2 = undefined;
|
||||
const channelSafetyWarningsActionCreatorsModule = require(9732) /* metro dependency 9732: ChannelSafetyWarningsActionCreators */;
|
||||
channelSafetyWarningsActionCreatorsModule.setChannelSafetyWarningFeedback(channelId, warningId, a0);
|
||||
const defaultImport = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
|
||||
const open = defaultImport.open;
|
||||
const object2 = {};
|
||||
const UPVOTE = SafetyWarningFeedbackTypes.UPVOTE;
|
||||
object2.key = a0 === UPVOTE ? UPVOTE_FEEDBACK_CONFIRMATION_TOAST_KEY : DOWNVOTE_FEEDBACK_CONFIRMATION_TOAST_KEY;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['gd/Yqs']);
|
||||
object2.icon = importDefault(8035) /* metro dependency 8035 */;
|
||||
const ShieldIcon = (require(8036) /* metro dependency 8036: ShieldIcon */).ShieldIcon;
|
||||
object2.IconComponent = ShieldIcon;
|
||||
object2.iconColor = TOAST_SHIELD_ICON_COLOR;
|
||||
object2.containerStyle = styles.toastContainer;
|
||||
object2.recolorLegacyIcon = true;
|
||||
Reflect.apply(open, defaultImport, [object2]);
|
||||
(require(9731) /* metro dependency 9731: SafetyWarningUtils */).trackCtaEvent({channelId: channelId,
|
||||
warningId: warningId, senderId: senderId,
|
||||
warningType: channelSafetyWarning == null ? value2 : channelSafetyWarning.type, cta: a1});
|
||||
return value2;
|
||||
}
|
||||
|
||||
function WasThisHelpfulSectionOnPress() { // fn#86236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11488:2250, owner: WasThisHelpfulSection.onPress, offset: 0x01f8d381, size: 62 bytes, params: 1, frame: 14
|
||||
const binding = env0_5;
|
||||
const UPVOTE = SafetyWarningFeedbackTypes.UPVOTE;
|
||||
const CtaEventTypes = (require(9731) /* metro dependency 9731: SafetyWarningUtils */).CtaEventTypes;
|
||||
const FEEDBACK_UPVOTE = CtaEventTypes.FEEDBACK_UPVOTE;
|
||||
return binding(UPVOTE, FEEDBACK_UPVOTE);
|
||||
}
|
||||
|
||||
function WasThisHelpfulSectionOnPress_86237() { // fn#86237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11488:2615, owner: WasThisHelpfulSection.onPress, offset: 0x01f8d3bf, size: 62 bytes, params: 1, frame: 14
|
||||
const binding = env0_5;
|
||||
const DOWNVOTE = SafetyWarningFeedbackTypes.DOWNVOTE;
|
||||
const CtaEventTypes = (require(9731) /* metro dependency 9731: SafetyWarningUtils */).CtaEventTypes;
|
||||
const FEEDBACK_DOWNVOTE = CtaEventTypes.FEEDBACK_DOWNVOTE;
|
||||
return binding(DOWNVOTE, FEEDBACK_DOWNVOTE);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user