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

No files matched your search

@@ -1,25 +1,28 @@
/* Metro module 8270; source: modules/messages/ApplicationCommands.tsx; dependencies: [57, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun66117(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8455:6, offset: 0x01bec9df, size: 124 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(57) /* metro dependency 57 */;
const env0_1 = RegExp('<\\/([^\\s]+):(\\d+)>(?:\\s?(.*))?', '');
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/ApplicationCommands.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/ApplicationCommands.tsx');
exports.getApplicationCommand = getApplicationCommand;
}
function getApplicationCommand(a0) { // fn#66118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8455:239, offset: 0x01beca5b, size: 190 bytes, params: 2, frame: 19
const value2 = env0_1.exec(a0);
const value3 = null;
if (value3 == value2) {
return value3;
function getApplicationCommand(a0) { // fn#66118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8455:239, offset: 0x01beca5b, size: 190 bytes, params: 2, frame: 19
const value2 = env0_1.exec(a0);
const value3 = null;
if (value3 == value2) {
return value3;
}
const value = Module00057(value2, 4);
value[0];
const property = value[1];
const property2 = value[2];
const property3 = value[3];
return value3 == property || value3 == property2 ? value3 : {content: '/' + property + (value3 != property3 ? ' ' + property3 : ''),
name: property, id: property2, hasOptions: value3 != property3 && property3 !== ''};
}
const value = env0_0(value2, 4);
value[0];
const property = value[1];
const property2 = value[2];
const property3 = value[3];
return value3 == property || value3 == property2 ? value3 : {content: '/' + property + (value3 != property3 ? ' ' + property3 : ''),
name: property, id: property2, hasOptions: value3 != property3 && property3 !== ''};
}
global.__d(_fun66117, 8270, [57, 2]) /* metro module 8270, dependencies: [57, 2] */;
@@ -1,129 +1,133 @@
/* Metro module 7144; source: modules/messages/BackgroundTaskManager.native.tsx; dependencies: [5, 27, 477, 7145, 7146, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as PlatformUtilsModule from '../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
function _fun57141(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7322:6, offset: 0x013ddbfb, size: 249 bytes, params: 8, frame: 20
var object2;
const env0_0 = require;
const closure = backgroundify;
const backgroundify2 = backgroundify;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const NativeModules = (require(27) /* metro dependency 27 */).NativeModules;
let value = require(477) /* metro dependency 477: PlatformUtils */;
const NativeModules = (ReactNativeModule).NativeModules;
let value = PlatformUtilsModule;
value = value.isAndroid();
const backgroundTaskIdentifierInvalid = value ? -1 : NativeModules.DCDBackgroundTaskManager.backgroundTaskIdentifierInvalid;
const closure2 = startBackgroundTask;
const closure3 = endBackgroundTask;
object2 = {backgroundTaskIdentifierInvalid: backgroundTaskIdentifierInvalid, backgroundify: closure,
startBackgroundTask: closure2, endBackgroundTask: closure3};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/BackgroundTaskManager.native.tsx');
exports.default = object2;
const startBackgroundTask2 = startBackgroundTask;
const endBackgroundTask2 = endBackgroundTask;
object = {backgroundTaskIdentifierInvalid: backgroundTaskIdentifierInvalid, backgroundify: backgroundify2,
startBackgroundTask: startBackgroundTask2, endBackgroundTask: endBackgroundTask2};
(FileImportTrackerModule).fileFinishedImporting('modules/messages/BackgroundTaskManager.native.tsx');
exports.default = object;
exports.backgroundTaskIdentifierInvalid = backgroundTaskIdentifierInvalid;
exports.startBackgroundTask = closure2;
exports.endBackgroundTask = closure3;
exports.backgroundify = closure;
}
exports.startBackgroundTask = startBackgroundTask2;
exports.endBackgroundTask = endBackgroundTask2;
exports.backgroundify = backgroundify2;
function backgroundify(a0, a1) { // fn#57142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7322:688, offset: 0x013ddcf4, size: 37 bytes, params: 3, frame: 11
const env0_0 = a0;
const env0_1 = a1;
return Module00005(_fun57144);
function* _fun57144() { // fn#57144, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7322:726, offset: 0x013ddd22, size: 103 bytes, params: 1, frame: 14
var environment;
var binding;
var value3;
var value4;
var value5;
var error;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
var env0_0;
try {
binding = env2_6;
} catch (error) {
value = environment.__proto__;
return require();
}
value = environment.__proto__;
try {
} catch (error) {
value = environment.__proto__;
return require();
}
try {
value3 = binding(importDefault);
} catch (error) {
value = environment.__proto__;
return require();
}
yield value3;
try {
value4 = undefined;
value5 = false;
} catch (error) {
value = environment.__proto__;
return require();
}
if (value5) {
return value4;
}
try {
env0_0 = value4;
} catch (error) {
value = environment.__proto__;
return require();
}
return require().finally(_fun57145);
function _fun57145() { // fn#57145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7322:821, offset: 0x013ddd89, size: 23 bytes, params: 1, frame: 11
env3_7(env0_0);
}
function backgroundify(a0, a1) { // fn#57142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7322:688, offset: 0x013ddcf4, size: 37 bytes, params: 3, frame: 11
const env0_0 = a0;
const env0_1 = a1;
return env0_3(_fun57144);
}
function startBackgroundTask(a0) { // fn#57146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7322:234, offset: 0x013ddda0, size: 224 bytes, params: 2, frame: 16
var title;
var content;
var defaultImport;
var addServiceHandler;
var object2;
var Promise;
var promise;
var value;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
if (a0 == null) {
Promise = global.Promise;
value = Object.create(Promise.prototype, {constructor: {value: Promise}});
promise = new Promise(function(a0) {
return a0(backgroundTaskIdentifierInvalid);
});
return promise instanceof Object ? promise : value;
}
title = a0.title;
content = a0.content;
defaultImport = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */;
addServiceHandler = defaultImport.addServiceHandler;
object2 = {title: title, content: content};
object2.priority = (require(7146) /* metro dependency 7146: ForegroundServiceManagerTypes */).ServiceNotificationPriority.MEDIUM;
object2.type = (require(7146) /* metro dependency 7146: ForegroundServiceManagerTypes */).ServiceNotificationType.FILE_UPLOAD;
object2.usesGateway = false;
return Reflect.apply(addServiceHandler, defaultImport, [object2]);
}
const DCDBackgroundTaskManager = NativeModules.DCDBackgroundTaskManager;
return DCDBackgroundTaskManager.startBackgroundTask();
}
function endBackgroundTask(a0) { // fn#57148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7322:574, offset: 0x013dde93, size: 107 bytes, params: 2, frame: 13
var moduleValue;
if (a0 !== backgroundTaskIdentifierInvalid) {
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue.isAndroid()) {
(importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */).removeServiceHandler(a0);
} else {
NativeModules.DCDBackgroundTaskManager.endBackgroundTask(a0);
}
function startBackgroundTask(a0) { // fn#57146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7322:234, offset: 0x013ddda0, size: 224 bytes, params: 2, frame: 16
var title;
var content;
var defaultImport;
var addServiceHandler;
var object;
var Promise;
var promise;
var value;
if (PlatformUtilsModule.isAndroid()) {
if (a0 == null) {
Promise = global.Promise;
value = Object.create(Promise.prototype, {constructor: {value: Promise}});
promise = new Promise(function(a0) {
return a0(backgroundTaskIdentifierInvalid);
});
return promise instanceof Object ? promise : value;
}
title = a0.title;
content = a0.content;
defaultImport = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */;
addServiceHandler = defaultImport.addServiceHandler;
object = {title: title, content: content};
object.priority = (require(7146) /* metro dependency 7146: ForegroundServiceManagerTypes */).ServiceNotificationPriority.MEDIUM;
object.type = (require(7146) /* metro dependency 7146: ForegroundServiceManagerTypes */).ServiceNotificationType.FILE_UPLOAD;
object.usesGateway = false;
return Reflect.apply(addServiceHandler, defaultImport, [object]);
}
const DCDBackgroundTaskManager = NativeModules.DCDBackgroundTaskManager;
return DCDBackgroundTaskManager.startBackgroundTask();
}
function endBackgroundTask(a0) { // fn#57148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7322:574, offset: 0x013dde93, size: 107 bytes, params: 2, frame: 13
var moduleValue;
if (a0 !== backgroundTaskIdentifierInvalid) {
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue.isAndroid()) {
(importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */).removeServiceHandler(a0);
} else {
NativeModules.DCDBackgroundTaskManager.endBackgroundTask(a0);
}
}
}
}
function* _fun57144() { // fn#57144, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7322:726, offset: 0x013ddd22, size: 103 bytes, params: 1, frame: 14
var environment;
var binding;
var value3;
var value4;
var value5;
var error;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
var env0_0;
try {
binding = env2_6;
} catch (error) {
value = environment.__proto__;
return require();
}
value = environment.__proto__;
try {
} catch (error) {
value = environment.__proto__;
return require();
}
try {
value3 = binding(importDefault);
} catch (error) {
value = environment.__proto__;
return require();
}
yield value3;
try {
value4 = undefined;
value5 = false;
} catch (error) {
value = environment.__proto__;
return require();
}
if (value5) {
return value4;
}
try {
env0_0 = value4;
} catch (error) {
value = environment.__proto__;
return require();
}
return require().finally(_fun57145);
}
function _fun57145() { // fn#57145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7322:821, offset: 0x013ddd89, size: 23 bytes, params: 1, frame: 11
env3_7(env0_0);
}
global.__d(_fun57141, 7144, [5, 27, 477, 7145, 7146,
2]) /* metro module 7144, dependencies: [5, 27, 477, 7145, 7146, 2] */;
@@ -1,9 +1,13 @@
/* Metro module 7210; source: modules/messages/BurstReactionEffectUtils.tsx; dependencies: [4000, 22, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as Module00022Module from '../../by-id/module-00022.js'; /* Metro dependency 22 */
import * as ColorUtilsModule from '../../utils/ColorUtils.tsx'; /* Metro dependency 4000 */
function _fun57692(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7388:6, offset: 0x016b33b6, size: 128 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(22) /* metro dependency 22 */;
let value = Module00022Module;
value = value.memoize(function(a0) {
var r1;
var r3;
@@ -28,22 +32,23 @@ function _fun57692(global, require, importDefault, importAll, module, exports, d
var Math = global.Math;
return Math.abs(r2);
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/BurstReactionEffectUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/BurstReactionEffectUtils.tsx');
exports.replaceAnimationColors = replaceAnimationColors;
exports.getBurstAnimationHash = value;
function replaceAnimationColors(a0, {r, g, b}) { // fn#57694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7388:304, offset: 0x016b3489, size: 265 bytes, params: 3, frame: 27
let value = ColorUtilsModule;
value = value.getComplimentaryPaletteForColor([r, g, b], 2);
let replace = a0.replace;
const value6 = Reflect.apply(replace, a0, [RegExp('(\\[1,0,0,)', 'g'),
'[' + value[0][0] / 255 + ',' + value[0][1] / 255 + ',' + value[0][2] / 255 + ',']);
replace = value6.replace;
const value7 = value[1][0] / 255;
const value8 = value[1][1] / 255;
value = value[1][2] / 255;
value = '[' + value7 + ',' + value8 + ',' + value + ',';
return Reflect.apply(replace, value6, [RegExp('\\[0,0,1,', 'g'), value]);
}
}
function replaceAnimationColors(a0, {r, g, b}) { // fn#57694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7388:304, offset: 0x016b3489, size: 265 bytes, params: 3, frame: 27
let value = require(4000) /* metro dependency 4000: ColorUtils */;
value = value.getComplimentaryPaletteForColor([r, g, b], 2);
let replace = a0.replace;
const value6 = Reflect.apply(replace, a0, [RegExp('(\\[1,0,0,)', 'g'),
'[' + value[0][0] / 255 + ',' + value[0][1] / 255 + ',' + value[0][2] / 255 + ',']);
replace = value6.replace;
const value7 = value[1][0] / 255;
const value8 = value[1][1] / 255;
value = value[1][2] / 255;
value = '[' + value7 + ',' + value8 + ',' + value + ',';
return Reflect.apply(replace, value6, [RegExp('\\[0,0,1,', 'g'), value]);
}
global.__d(_fun57692, 7210, [4000, 22, 2]) /* metro module 7210, dependencies: [4000, 22, 2] */;
@@ -1,8 +1,11 @@
/* Metro module 11318; source: modules/messages/ChatOverlayConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun86341(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11504:6, offset: 0x01f91e2d, size: 112 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/ChatOverlayConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/ChatOverlayConstants.tsx');
exports.ChatOverlays = {NEW_MESSAGES: 'new_messages', OPT_IN_CHANNEL: 'opt_in_channel', SUMMARIES: 'summaries'};
}
global.__d(_fun86341, 11318, [2]) /* metro module 11318, dependencies: [2] */;
+20 -17
View File
@@ -1,31 +1,34 @@
/* Metro module 10609; source: modules/messages/CtaButtonUtils.tsx; dependencies: [10610, 4813, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UseShouldRenderReportFalsePositiveButtonModule from '../explicit_media_redaction/hooks/useShouldRenderReportFalsePositiveButton.tsx'; /* Metro dependency 10610 */
function _fun81754(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10795:6, offset: 0x01edd121, size: 147 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/messages/CtaButtonUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/CtaButtonUtils.tsx');
exports.CtaButtonType = {MARK_AS_FALSE_POSITIVE: 'mark_as_false_positive',
AGE_VERIFICATION_RETRY: 'age_verification_retry'};
exports.getCtaButtonType = getCtaButtonType;
exports.useCtaButtonType = useCtaButtonType;
}
function getCtaButtonType(a0, a1) { // fn#81755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10795:330, offset: 0x01edd1b4, size: 105 bytes, params: 3, frame: 15
var r0;
var moduleValue2;
const value2 = undefined;
if (UseShouldRenderReportFalsePositiveButtonModule.shouldRenderReportFalsePositiveButton(a0)) {
r0 = env0_2.MARK_AS_FALSE_POSITIVE;
} else {
moduleValue2 = require(4813) /* metro dependency 4813: AgeVerificationUtils */;
r0 = moduleValue2.isAgeVerificationMessageWithRetryCta(a1, a0) ? env0_2.AGE_VERIFICATION_RETRY : value2;
}
return r0;
}
function getCtaButtonType(a0, a1) { // fn#81755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10795:330, offset: 0x01edd1b4, size: 105 bytes, params: 3, frame: 15
var r0;
var moduleValue2;
const value2 = undefined;
const useShouldRenderReportFalsePositiveButtonModule = require(10610) /* metro dependency 10610: useShouldRenderReportFalsePositiveButton */;
if (useShouldRenderReportFalsePositiveButtonModule.shouldRenderReportFalsePositiveButton(a0)) {
r0 = env0_2.MARK_AS_FALSE_POSITIVE;
} else {
moduleValue2 = require(4813) /* metro dependency 4813: AgeVerificationUtils */;
r0 = moduleValue2.isAgeVerificationMessageWithRetryCta(a1, a0) ? env0_2.AGE_VERIFICATION_RETRY : value2;
function useCtaButtonType(a0, a1) { // fn#81756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10795:544, offset: 0x01edd21d, size: 97 bytes, params: 3, frame: 16
return (require(10610) /* metro dependency 10610: useShouldRenderReportFalsePositiveButton */).useShouldRenderReportFalsePositiveButton(a0) ? env0_2.MARK_AS_FALSE_POSITIVE : (require(4813) /* metro dependency 4813: AgeVerificationUtils */).isAgeVerificationMessageWithRetryCta(a1,
a0) ? env0_2.AGE_VERIFICATION_RETRY : undefined;
}
return r0;
}
function useCtaButtonType(a0, a1) { // fn#81756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10795:544, offset: 0x01edd21d, size: 97 bytes, params: 3, frame: 16
return (require(10610) /* metro dependency 10610: useShouldRenderReportFalsePositiveButton */).useShouldRenderReportFalsePositiveButton(a0) ? env0_2.MARK_AS_FALSE_POSITIVE : (require(4813) /* metro dependency 4813: AgeVerificationUtils */).isAgeVerificationMessageWithRetryCta(a1,
a0) ? env0_2.AGE_VERIFICATION_RETRY : undefined;
}
global.__d(_fun81754, 10609, [10610, 4813, 2]) /* metro module 10609, dependencies: [10610, 4813, 2] */;
+6 -2
View File
@@ -1,8 +1,11 @@
/* Metro module 4642; source: modules/messages/EmbedConstants.tsx; dependencies: [661, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun39921(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4820:6, offset: 0x010effa4, size: 340 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const MessageEmbedTypes = (require(661) /* metro dependency 661: Constants */).MessageEmbedTypes;
const MessageEmbedTypes = (ConstantsModule).MessageEmbedTypes;
let Set = global.Set;
let AUTO_MODERATION_MESSAGE = MessageEmbedTypes.AUTO_MODERATION_MESSAGE;
let AUTO_MODERATION_NOTIFICATION = MessageEmbedTypes.AUTO_MODERATION_NOTIFICATION;
@@ -26,8 +29,9 @@ function _fun39921(global, require, importDefault, importAll, module, exports, d
POLL_RESULT = MessageEmbedTypes.POLL_RESULT;
set = new Set([AUTO_MODERATION_MESSAGE, AUTO_MODERATION_NOTIFICATION, AGE_VERIFICATION_SYSTEM_NOTIFICATION,
APPLICATION_NEWS, POST_PREVIEW, SAFETY_POLICY_NOTICE, SAFETY_SYSTEM_NOTIFICATION, VOICE_CHANNEL, POLL_RESULT]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/EmbedConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/EmbedConstants.tsx');
exports.EMBED_TYPES_WITH_PARSEABLE_FIELDS = set;
exports.EMBED_TYPES_WITH_SPECIAL_RENDERER = set;
}
global.__d(_fun39921, 4642, [661, 2]) /* metro module 4642, dependencies: [661, 2] */;
@@ -1,110 +1,116 @@
/* Metro module 10577; source: modules/messages/EmbeddedApplicationInstanceUtils.tsx; dependencies: [31, 1244, 8448, 8107, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as GetEmbeddedActivityJoinabilityModule from '../activities/utils/getEmbeddedActivityJoinability.tsx'; /* Metro dependency 8107 */
import * as ActivitiesInTextUtilsModule from '../activities/ActivitiesInTextUtils.tsx'; /* Metro dependency 8448 */
function _fun81589(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10763:6, offset: 0x01ed5dcd, size: 174 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const closure = getJoinOrStartButtonState;
const getJoinOrStartButtonState2 = getJoinOrStartButtonState;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
object2 = {ACTIVE: 0};
object2[0] = 'ACTIVE';
object2.ENDED = 1;
object2[1] = 'ENDED';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/EmbeddedApplicationInstanceUtils.tsx');
exports.EmbedStates = object2;
object = {ACTIVE: 0};
object[0] = 'ACTIVE';
object.ENDED = 1;
object[1] = 'ENDED';
(FileImportTrackerModule).fileFinishedImporting('modules/messages/EmbeddedApplicationInstanceUtils.tsx');
exports.EmbedStates = object;
exports.useJoinOrStartButtonState = useJoinOrStartButtonState;
exports.getJoinOrStartButtonState = closure;
}
function getJoinOrStartButtonState({embeddedActivity, joinability, currentEmbeddedActivity, channel}) { // fn#81590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10763:178, offset: 0x01ed5e7b, size: 1209 bytes, params: 2, frame: 24
var r7;
const EmbeddedActivityJoinability = (require(8107) /* metro dependency 8107: getEmbeddedActivityJoinability */).EmbeddedActivityJoinability;
var object5;
var object6;
var object7;
const value = embeddedActivity == null;
const object8 = {disabled: false, isJoinAction: !value};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object8.text = value ? Reflect.apply(string, intl, [t.RscU7I]) : Reflect.apply(string, intl, [t.sqe0hj]);
object8.tooltip = undefined;
const isActivitiesInTextEnabled2 = (require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).isActivitiesInTextEnabled(channel);
if (embeddedActivity == null) {
if (value) {
object6 = {};
copyDataProperties(object6, object8, undefined);
object6['disabled'] = !isActivitiesInTextEnabled2;
object6['tooltip'] = isActivitiesInTextEnabled2 ? undefined : intl.string(t.f41E1g);
return object6;
}
if (joinability == null) {
return object8;
}
if (joinability !== EmbeddedActivityJoinability.CAN_JOIN) {
r7 = EmbeddedActivityJoinability.NO_USE_EMBEDDED_ACTIVITIES_PERMISSION === joinability ? intl.string(t.hHGrWz) : EmbeddedActivityJoinability.ACTIVITY_AGE_GATED === joinability ? intl.string(t['4WuFRE']) : EmbeddedActivityJoinability.ACTIVITIES_FEATURE_NOT_ENABLED_FOR_OS === joinability ? intl.string(t.uGDCcw) : EmbeddedActivityJoinability.ACTIVITY_NOT_SUPPORTED_ON_OS === joinability ? intl.string(t.UXoQTp) : EmbeddedActivityJoinability.CHANNEL_FULL === joinability ? intl.string(t.rZfiNq) : EmbeddedActivityJoinability.NO_CHANNEL_CONNECT_PERMISSION === joinability ? intl.string(t.w5SAps) : EmbeddedActivityJoinability.NO_CHANNEL === joinability || EmbeddedActivityJoinability.NO_GUILD === joinability || EmbeddedActivityJoinability.NO_USER === joinability ? intl.string(t.Etp6uI) : EmbeddedActivityJoinability.IS_AFK_CHANNEL !== joinability ? undefined : intl.string(t.Etp6uI);
object5 = {};
copyDataProperties(object5, object8, undefined);
object5['disabled'] = true;
object5['tooltip'] = r7;
return object5;
}
} else {
if (currentEmbeddedActivity == null) {
exports.getJoinOrStartButtonState = getJoinOrStartButtonState2;
function getJoinOrStartButtonState({embeddedActivity, joinability, currentEmbeddedActivity, channel}) { // fn#81590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10763:178, offset: 0x01ed5e7b, size: 1209 bytes, params: 2, frame: 24
var r7;
const EmbeddedActivityJoinability = (GetEmbeddedActivityJoinabilityModule).EmbeddedActivityJoinability;
var object;
var object2;
var object3;
const value = embeddedActivity == null;
const object4 = {disabled: false, isJoinAction: !value};
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
object4.text = value ? Reflect.apply(string, intl, [t.RscU7I]) : Reflect.apply(string, intl, [t.sqe0hj]);
object4.tooltip = undefined;
const isActivitiesInTextEnabled2 = (ActivitiesInTextUtilsModule).isActivitiesInTextEnabled(channel);
if (embeddedActivity == null) {
if (value) {
object6 = {};
copyDataProperties(object6, object8, undefined);
object6['disabled'] = !isActivitiesInTextEnabled2;
object6['tooltip'] = isActivitiesInTextEnabled2 ? undefined : intl.string(t.f41E1g);
return object6;
object2 = {};
copyDataProperties(object2, object4, undefined);
object2['disabled'] = !isActivitiesInTextEnabled2;
object2['tooltip'] = isActivitiesInTextEnabled2 ? undefined : intl.string(t.f41E1g);
return object2;
}
if (joinability == null) {
return object8;
return object4;
}
if (joinability !== EmbeddedActivityJoinability.CAN_JOIN) {
r7 = EmbeddedActivityJoinability.NO_USE_EMBEDDED_ACTIVITIES_PERMISSION === joinability ? intl.string(t.hHGrWz) : EmbeddedActivityJoinability.ACTIVITY_AGE_GATED === joinability ? intl.string(t['4WuFRE']) : EmbeddedActivityJoinability.ACTIVITIES_FEATURE_NOT_ENABLED_FOR_OS === joinability ? intl.string(t.uGDCcw) : EmbeddedActivityJoinability.ACTIVITY_NOT_SUPPORTED_ON_OS === joinability ? intl.string(t.UXoQTp) : EmbeddedActivityJoinability.CHANNEL_FULL === joinability ? intl.string(t.rZfiNq) : EmbeddedActivityJoinability.NO_CHANNEL_CONNECT_PERMISSION === joinability ? intl.string(t.w5SAps) : EmbeddedActivityJoinability.NO_CHANNEL === joinability || EmbeddedActivityJoinability.NO_GUILD === joinability || EmbeddedActivityJoinability.NO_USER === joinability ? intl.string(t.Etp6uI) : EmbeddedActivityJoinability.IS_AFK_CHANNEL !== joinability ? undefined : intl.string(t.Etp6uI);
object5 = {};
copyDataProperties(object5, object8, undefined);
object5['disabled'] = true;
object5['tooltip'] = r7;
return object5;
object = {};
copyDataProperties(object, object4, undefined);
object['disabled'] = true;
object['tooltip'] = r7;
return object;
}
} else {
if (currentEmbeddedActivity == null) {
if (value) {
object2 = {};
copyDataProperties(object2, object4, undefined);
object2['disabled'] = !isActivitiesInTextEnabled2;
object2['tooltip'] = isActivitiesInTextEnabled2 ? undefined : intl.string(t.f41E1g);
return object2;
}
if (joinability == null) {
return object4;
}
if (joinability !== EmbeddedActivityJoinability.CAN_JOIN) {
r7 = EmbeddedActivityJoinability.NO_USE_EMBEDDED_ACTIVITIES_PERMISSION === joinability ? intl.string(t.hHGrWz) : EmbeddedActivityJoinability.ACTIVITY_AGE_GATED === joinability ? intl.string(t['4WuFRE']) : EmbeddedActivityJoinability.ACTIVITIES_FEATURE_NOT_ENABLED_FOR_OS === joinability ? intl.string(t.uGDCcw) : EmbeddedActivityJoinability.ACTIVITY_NOT_SUPPORTED_ON_OS === joinability ? intl.string(t.UXoQTp) : EmbeddedActivityJoinability.CHANNEL_FULL === joinability ? intl.string(t.rZfiNq) : EmbeddedActivityJoinability.NO_CHANNEL_CONNECT_PERMISSION === joinability ? intl.string(t.w5SAps) : EmbeddedActivityJoinability.NO_CHANNEL === joinability || EmbeddedActivityJoinability.NO_GUILD === joinability || EmbeddedActivityJoinability.NO_USER === joinability ? intl.string(t.Etp6uI) : EmbeddedActivityJoinability.IS_AFK_CHANNEL !== joinability ? undefined : intl.string(t.Etp6uI);
object = {};
copyDataProperties(object, object4, undefined);
object['disabled'] = true;
object['tooltip'] = r7;
return object;
}
return object4;
}
if (embeddedActivity.launchId === currentEmbeddedActivity.launchId) {
object3 = {};
copyDataProperties(object3, object4, undefined);
object3['disabled'] = true;
object3['text'] = intl.string(t.DPfdsq);
object3['tooltip'] = undefined;
return object3;
}
if (value) {
object2 = {};
copyDataProperties(object2, object4, undefined);
object2['disabled'] = !isActivitiesInTextEnabled2;
object2['tooltip'] = isActivitiesInTextEnabled2 ? undefined : intl.string(t.f41E1g);
return object2;
}
if (joinability == null) {
return object4;
}
if (joinability !== EmbeddedActivityJoinability.CAN_JOIN) {
r7 = EmbeddedActivityJoinability.NO_USE_EMBEDDED_ACTIVITIES_PERMISSION === joinability ? intl.string(t.hHGrWz) : EmbeddedActivityJoinability.ACTIVITY_AGE_GATED === joinability ? intl.string(t['4WuFRE']) : EmbeddedActivityJoinability.ACTIVITIES_FEATURE_NOT_ENABLED_FOR_OS === joinability ? intl.string(t.uGDCcw) : EmbeddedActivityJoinability.ACTIVITY_NOT_SUPPORTED_ON_OS === joinability ? intl.string(t.UXoQTp) : EmbeddedActivityJoinability.CHANNEL_FULL === joinability ? intl.string(t.rZfiNq) : EmbeddedActivityJoinability.NO_CHANNEL_CONNECT_PERMISSION === joinability ? intl.string(t.w5SAps) : EmbeddedActivityJoinability.NO_CHANNEL === joinability || EmbeddedActivityJoinability.NO_GUILD === joinability || EmbeddedActivityJoinability.NO_USER === joinability ? intl.string(t.Etp6uI) : EmbeddedActivityJoinability.IS_AFK_CHANNEL !== joinability ? undefined : intl.string(t.Etp6uI);
object = {};
copyDataProperties(object, object4, undefined);
object['disabled'] = true;
object['tooltip'] = r7;
return object;
}
return object8;
}
if (embeddedActivity.launchId === currentEmbeddedActivity.launchId) {
object7 = {};
copyDataProperties(object7, object8, undefined);
object7['disabled'] = true;
object7['text'] = intl.string(t.DPfdsq);
object7['tooltip'] = undefined;
return object7;
}
if (value) {
object6 = {};
copyDataProperties(object6, object8, undefined);
object6['disabled'] = !isActivitiesInTextEnabled2;
object6['tooltip'] = isActivitiesInTextEnabled2 ? undefined : intl.string(t.f41E1g);
return object6;
}
if (joinability == null) {
return object8;
}
if (joinability !== EmbeddedActivityJoinability.CAN_JOIN) {
r7 = EmbeddedActivityJoinability.NO_USE_EMBEDDED_ACTIVITIES_PERMISSION === joinability ? intl.string(t.hHGrWz) : EmbeddedActivityJoinability.ACTIVITY_AGE_GATED === joinability ? intl.string(t['4WuFRE']) : EmbeddedActivityJoinability.ACTIVITIES_FEATURE_NOT_ENABLED_FOR_OS === joinability ? intl.string(t.uGDCcw) : EmbeddedActivityJoinability.ACTIVITY_NOT_SUPPORTED_ON_OS === joinability ? intl.string(t.UXoQTp) : EmbeddedActivityJoinability.CHANNEL_FULL === joinability ? intl.string(t.rZfiNq) : EmbeddedActivityJoinability.NO_CHANNEL_CONNECT_PERMISSION === joinability ? intl.string(t.w5SAps) : EmbeddedActivityJoinability.NO_CHANNEL === joinability || EmbeddedActivityJoinability.NO_GUILD === joinability || EmbeddedActivityJoinability.NO_USER === joinability ? intl.string(t.Etp6uI) : EmbeddedActivityJoinability.IS_AFK_CHANNEL !== joinability ? undefined : intl.string(t.Etp6uI);
object5 = {};
copyDataProperties(object5, object8, undefined);
object5['disabled'] = true;
object5['tooltip'] = r7;
return object5;
}
return object4;
}
function useJoinOrStartButtonState({embeddedActivity, joinability, currentEmbeddedActivity, channel}) { // fn#81591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10763:1873, offset: 0x01ed6334, size: 91 bytes, params: 2, frame: 17
return currentEmbeddedActivity.useMemo(function() {
return getJoinOrStartButtonState({embeddedActivity: embeddedActivity, joinability: joinability,
currentEmbeddedActivity: currentEmbeddedActivity, channel: channel});
}, [embeddedActivity, joinability, currentEmbeddedActivity, channel]);
}
return object8;
}
function useJoinOrStartButtonState({embeddedActivity, joinability, currentEmbeddedActivity, channel}) { // fn#81591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10763:1873, offset: 0x01ed6334, size: 91 bytes, params: 2, frame: 17
return currentEmbeddedActivity.useMemo(function() {
return getJoinOrStartButtonState({embeddedActivity: embeddedActivity, joinability: joinability,
currentEmbeddedActivity: currentEmbeddedActivity, channel: channel});
}, [embeddedActivity, joinability, currentEmbeddedActivity, channel]);
}
global.__d(_fun81589, 10577, [31, 1244, 8448, 8107,
2]) /* metro module 10577, dependencies: [31, 1244, 8448, 8107, 2] */;
+316 -288
View File
@@ -1,4 +1,16 @@
/* Metro module 4815; source: modules/messages/EphemeralMessageStore.tsx; dependencies: [6, 7, 15, 17, 18, 1379, 661, 1391, 4625, 566, 694, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as FlagUtilsModule from '../../external/discord_common/js/shared/utils/FlagUtils.tsx'; /* Metro dependency 1391 */
import * as MessageRecordUtilsModule from './MessageRecordUtils.tsx'; /* Metro dependency 4625 */
function _fun41888(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#41888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:6, offset: 0x0112ad78, size: 465 bytes, params: 8, frame: 21
const env0_0 = require;
const _arrayLikeToArray_41894 = function(a0, a1) {
@@ -44,331 +56,347 @@ function _fun41888(global, require, importDefault, importAll, module, exports, d
}
return value;
};
const closure = CACHE_LOADED_41896;
const CACHE_LOADED_418962 = CACHE_LOADED_41896;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
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 env0_8 = (require(661) /* metro dependency 661: Constants */).MessageFlags;
const env0_9 = [];
const Map = global.Map;
let map = new Map();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun41897(Store).displayName = 'EphemeralMessageStore';
map = new map(importDefault(694) /* metro dependency 694: Dispatcher */, {MESSAGE_CREATE: MESSAGE_CREATE_41901,
MESSAGE_UPDATE: MESSAGE_UPDATE_41902, MESSAGE_DELETE: MESSAGE_DELETE_41903,
MESSAGE_DELETE_BULK: MESSAGE_DELETE_BULK_41904, CLEAR_MESSAGES: CLEAR_MESSAGES_41905,
CHANNEL_DELETE: CHANNEL_DELETE_41906, THREAD_DELETE: THREAD_DELETE_41907, GUILD_DELETE: GUILD_DELETE_41908,
CACHE_LOADED: closure, CONNECTION_OPEN: closure, OVERLAY_INITIALIZE: closure, LOGOUT: closure});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/EphemeralMessageStore.tsx');
CACHE_LOADED: CACHE_LOADED_418962, CONNECTION_OPEN: CACHE_LOADED_418962,
OVERLAY_INITIALIZE: CACHE_LOADED_418962, LOGOUT: CACHE_LOADED_418962});
(FileImportTrackerModule).fileFinishedImporting('modules/messages/EphemeralMessageStore.tsx');
exports.default = map;
}
function _isNativeReflectConstruct_41889() { // fn#41889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:184, offset: 0x0112af49, size: 94 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_41889_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_41892(a0, a1) { // fn#41892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:377, offset: 0x0112afa7, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
function _isNativeReflectConstruct_41889() { // fn#41889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:184, offset: 0x0112af49, size: 94 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 _fun41893;
return (_isNativeReflectConstruct_41889_isNativeReflectConstruct = function() {
return !!result;
})();
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_41894(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
function _createForOfIteratorHelperLoose_41892(a0, a1) { // fn#41892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:377, offset: 0x0112afa7, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun41893;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_41894(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_41894(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_41894(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun41893;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function dropChannelIfEmpty(a0, {size}) { // fn#41895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:1306, offset: 0x0112b119, size: 38 bytes, params: 3, frame: 11
if (size === 0) {
env0_10.delete(a0);
}
}
function CACHE_LOADED_41896() { // fn#41896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:1363, offset: 0x0112b13f, size: 40 bytes, params: 1, frame: 10
if (env0_10.size === 0) {
return false;
}
env0_10.clear();
}
function _fun41897(a0) { // fn#41897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:1422, offset: 0x0112b167, size: 91 bytes, params: 2, frame: 16
const closure = EphemeralMessageStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function() {
this.waitFor(ChannelStore);
}}, {key: 'getMessages', value: value_41900}]);
}
function MESSAGE_CREATE_41901({channelId, message}) { // fn#41901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:1985, offset: 0x0112b20a, size: 264 bytes, params: 2, frame: 19
var r2;
var value3;
var map;
var set;
var id;
var size;
var next;
var done;
var value;
const flagUtilsModule = require(1391) /* metro dependency 1391: FlagUtils */;
const hasFlag = flagUtilsModule.hasFlag;
const r4 = message.flags ?? 0;
const EPHEMERAL = MessageFlags.EPHEMERAL;
if (Reflect.apply(hasFlag, flagUtilsModule, [r4, EPHEMERAL])) {
value3 = env0_10.get(channelId);
if (value3 != null) {
r2 = value3;
} else {
map = new global.Map();
env0_10.set(channelId, map);
r2 = map;
r5 = value;
}
set = r2.set;
id = message.id;
value = require(4625) /* metro dependency 4625: MessageRecordUtils */;
Reflect.apply(set, r2, [id, value.createMessageRecord(message)]);
size = r2.size;
if (size > 50) {
while (true) {
value = r2.keys();
next = value.next;
value = Reflect.apply(next, value, []);
done = value.done;
if (done === true) {
if (r5) {
if (r5) {
}
return _fun41893;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun41893() { // fn#41893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:948, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
function dropChannelIfEmpty(a0, {size}) { // fn#41895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:1306, offset: 0x0112b119, size: 38 bytes, params: 3, frame: 11
if (size === 0) {
env0_10.delete(a0);
}
}
function CACHE_LOADED_41896() { // fn#41896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:1363, offset: 0x0112b13f, size: 40 bytes, params: 1, frame: 10
if (env0_10.size === 0) {
return false;
}
env0_10.clear();
}
function _fun41897(a0) { // fn#41897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:1422, offset: 0x0112b167, size: 91 bytes, params: 2, frame: 16
const EphemeralMessageStore2 = EphemeralMessageStore;
Inherits(EphemeralMessageStore2, a0);
return CreateClass(EphemeralMessageStore2, [{key: 'initialize', value: function() {
this.waitFor(ChannelStore);
}}, {key: 'getMessages', value: value_41900}]);
function EphemeralMessageStore() { // fn#41898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:1434, offset: 0x00ff71a7, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, EphemeralMessageStore);
const value3 = env1_5(EphemeralMessageStore);
return env1_4(this, _isNativeReflectConstruct_41889() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_41900(a0) { // fn#41900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:1811, offset: 0x0112b1c2, size: 72 bytes, params: 2, frame: 13
const value = environment.__proto__;
const value2 = env1_10.get(a0);
return value2 == null || value2.size === 0 ? env1_9 : global.Array.from(value2.values());
}
}
function MESSAGE_CREATE_41901({channelId, message}) { // fn#41901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:1985, offset: 0x0112b20a, size: 264 bytes, params: 2, frame: 19
var r2;
var value3;
var map;
var set;
var id;
var size;
var next;
var done;
var value;
const hasFlag = FlagUtilsModule.hasFlag;
const r4 = message.flags ?? 0;
const EPHEMERAL = MessageFlags.EPHEMERAL;
if (Reflect.apply(hasFlag, FlagUtilsModule, [r4, EPHEMERAL])) {
value3 = env0_10.get(channelId);
if (value3 != null) {
r2 = value3;
} else {
map = new global.Map();
env0_10.set(channelId, map);
r2 = map;
}
set = r2.set;
id = message.id;
value = require(4625) /* metro dependency 4625: MessageRecordUtils */;
Reflect.apply(set, r2, [id, value.createMessageRecord(message)]);
size = r2.size;
if (size > 50) {
while (true) {
value = r2.keys();
next = value.next;
value = Reflect.apply(next, value, []);
done = value.done;
if (done === true) {
break;
}
value = value.value;
r2.delete(value);
size = r2.size;
if (size > 50) {
continue;
}
break;
}
value = value.value;
r2.delete(value);
size = r2.size;
if (size > 50) {
continue;
}
break;
}
}
return undefined;
}
return false;
}
function MESSAGE_UPDATE_41902({message}) { // fn#41902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:2344, offset: 0x0112b312, size: 122 bytes, params: 2, frame: 17
const channel_id = message.channel_id;
const id = message.id;
if (channel_id == null) {
return false;
}
if (id == null) {
return false;
}
const value2 = env0_10.get(channel_id);
if (value2 == null) {
return false;
}
const value3 = value2.get(id);
if (value3 == null) {
return false;
}
const set = value2.set;
const messageRecordUtilsModule = require(4625) /* metro dependency 4625: MessageRecordUtils */;
Reflect.apply(set, value2, [id, messageRecordUtilsModule.updateMessageRecord(value3, message)]);
}
function MESSAGE_DELETE_41903({channelId, id}) { // fn#41903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:2570, offset: 0x0112b38c, size: 67 bytes, params: 2, frame: 14
const value2 = env0_10.get(channelId);
if (value2 != null) {
if (value2.delete(id)) {
dropChannelIfEmpty(channelId, value2);
return undefined;
}
return false;
}
return false;
}
function MESSAGE_DELETE_BULK_41904({channelId, ids}) { // fn#41904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:2713, offset: 0x0112b3cf, size: 128 bytes, params: 2, frame: 22
var r7;
var r8;
var r5;
var value6;
var value7;
var value8;
const value2 = env0_10.get(channelId);
if (value2 != null) {
var value3 = _createForOfIteratorHelperLoose_41892(ids);
var value4 = value3();
var done = value4.done;
if (done) {
r5 = false;
} else {
r7 = false;
r8 = value4;
while (true) {
value6 = r8.value;
if (value2.delete(value6)) {
value7 = true;
r7 = value7;
function MESSAGE_UPDATE_41902({message}) { // fn#41902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:2344, offset: 0x0112b312, size: 122 bytes, params: 2, frame: 17
const channel_id = message.channel_id;
const id = message.id;
if (channel_id == null) {
return false;
}
if (id == null) {
return false;
}
const value2 = env0_10.get(channel_id);
if (value2 == null) {
return false;
}
const value3 = value2.get(id);
if (value3 == null) {
return false;
}
const set = value2.set;
Reflect.apply(set, value2, [id, MessageRecordUtilsModule.updateMessageRecord(value3, message)]);
}
function MESSAGE_DELETE_41903({channelId, id}) { // fn#41903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:2570, offset: 0x0112b38c, size: 67 bytes, params: 2, frame: 14
const value2 = env0_10.get(channelId);
if (value2 != null) {
if (value2.delete(id)) {
dropChannelIfEmpty(channelId, value2);
return undefined;
}
}
return false;
}
function MESSAGE_DELETE_BULK_41904({channelId, ids}) { // fn#41904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:2713, offset: 0x0112b3cf, size: 128 bytes, params: 2, frame: 22
var r7;
var r8;
var r5;
var value6;
var value7;
var value8;
const value2 = env0_10.get(channelId);
if (value2 != null) {
var value3 = _createForOfIteratorHelperLoose_41892(ids);
var value4 = value3();
var done = value4.done;
if (done) {
r5 = false;
} else {
r7 = false;
r8 = value4;
while (true) {
value6 = r8.value;
if (value2.delete(value6)) {
value7 = true;
r7 = value7;
}
value8 = value3();
done = value8.done;
if (done) {
r5 = r7;
break;
}
r8 = value8;
continue;
}
value8 = value3();
done = value8.done;
}
if (r5) {
dropChannelIfEmpty(channelId, value2);
return undefined;
}
}
return false;
}
function CLEAR_MESSAGES_41905({channelId}) { // fn#41905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:2959, offset: 0x0112b44f, size: 50 bytes, params: 2, frame: 12
const binding = env0_10;
if (binding.has(channelId)) {
env0_10.delete(channelId);
return undefined;
}
return false;
}
function CHANNEL_DELETE_41906({channel}) { // fn#41906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:3053, offset: 0x0112b481, size: 41 bytes, params: 2, frame: 11
if (env0_10.delete(channel.id)) {
return undefined;
}
return false;
}
function THREAD_DELETE_41907({channel}) { // fn#41907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:3138, offset: 0x0112b481, size: 41 bytes, params: 2, frame: 11
if (env0_10.delete(channel.id)) {
return undefined;
}
return false;
}
function GUILD_DELETE_41908() { // fn#41908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:3221, offset: 0x0112b4aa, size: 137 bytes, params: 1, frame: 19
var r3;
var r4;
var r2;
var value7;
var channelStoreBinding;
var getChannel;
var value8;
var value9;
if (env0_10.size === 0) {
return false;
}
const _createForOfIteratorHelperLoose_41892Binding = _createForOfIteratorHelperLoose_41892;
let binding = env0_10;
const value2 = binding.keys();
const value3 = undefined;
const value4 = _createForOfIteratorHelperLoose_41892Binding(value2);
const value5 = value4();
let done = value5.done;
const value6 = false;
if (done) {
r2 = value6;
} else {
r3 = value6;
r4 = value5;
while (true) {
value7 = r4.value;
channelStoreBinding = ChannelStore;
getChannel = channelStoreBinding.getChannel;
if (Reflect.apply(getChannel, channelStoreBinding, [value7]) == null) {
binding = env0_10;
binding.delete(value7);
value8 = true;
r3 = value8;
}
value9 = value4();
done = value9.done;
if (done) {
r5 = r7;
r2 = r3;
break;
}
r8 = value8;
r4 = value9;
continue;
}
}
if (r5) {
dropChannelIfEmpty(channelId, value2);
return undefined;
}
return r2 ? value3 : !!r2;
}
return false;
}
function CLEAR_MESSAGES_41905({channelId}) { // fn#41905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:2959, offset: 0x0112b44f, size: 50 bytes, params: 2, frame: 12
const binding = env0_10;
if (binding.has(channelId)) {
env0_10.delete(channelId);
return undefined;
}
return false;
}
function CHANNEL_DELETE_41906({channel}) { // fn#41906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:3053, offset: 0x0112b481, size: 41 bytes, params: 2, frame: 11
if (env0_10.delete(channel.id)) {
return undefined;
}
return false;
}
function GUILD_DELETE_41908() { // fn#41908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:3221, offset: 0x0112b4aa, size: 137 bytes, params: 1, frame: 19
var r3;
var r4;
var r2;
var value7;
var getChannel;
var value8;
var value9;
if (env0_10.size === 0) {
return false;
}
const _createForOfIteratorHelperLoose_41892Binding = _createForOfIteratorHelperLoose_41892;
let binding = env0_10;
const value2 = binding.keys();
const value3 = undefined;
const value4 = _createForOfIteratorHelperLoose_41892Binding(value2);
const value5 = value4();
let done = value5.done;
const value6 = false;
if (done) {
r2 = value6;
} else {
r3 = value6;
r4 = value5;
while (true) {
value7 = r4.value;
getChannel = ChannelStore.getChannel;
if (Reflect.apply(getChannel, ChannelStore, [value7]) == null) {
binding = env0_10;
binding.delete(value7);
value8 = true;
r3 = value8;
}
value9 = value4();
done = value9.done;
if (done) {
r2 = r3;
break;
}
r4 = value9;
continue;
}
}
return r2 ? value3 : !!r2;
}
function value_41900(a0) { // fn#41900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:1811, offset: 0x0112b1c2, size: 72 bytes, params: 2, frame: 13
const value = environment.__proto__;
const value2 = env1_10.get(a0);
return value2 == null || value2.size === 0 ? env1_9 : global.Array.from(value2.values());
}
global.__d(_fun41888, 4815, [6, 7, 15, 17, 18, 1379, 661, 1391, 4625, 566, 694,
2]) /* metro module 4815, dependencies: [6, 7, 15, 17, 18, 1379, 661, 1391, 4625, 566, 694, 2] */;
@@ -1,21 +1,24 @@
/* Metro module 6858; source: modules/messages/GuildOfficialMessageUtils.tsx; dependencies: [1867, 3784, 4503, 661, 673, 674, 4000, 4002, 6859, 566, 6860, 5216, 2] */
import defaultImport3 from '../../by-id/module-00674.js'; /* Metro dependency 674 */
import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import PermissionStore from '../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import GuildOfficialMessagesExperiment from './GuildOfficialMessagesExperiment.tsx'; /* Metro dependency 6859 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as ColorUtilsModule from '../../external/discord_common/js/shared/utils/ColorUtils.tsx'; /* Metro dependency 673 */
import * as SharedModule from '../../design/shared.tsx'; /* Metro dependency 4002 */
import * as MessageConstantsModule from './MessageConstants.tsx'; /* Metro dependency 4503 */
function _fun54093(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7036:6, offset: 0x0135c805, size: 323 bytes, params: 8, frame: 23
const env0_0 = require;
const closure = isGuildOfficialMessagesEnabled;
const closure2 = useIsGuildOfficialMessagesEnabled;
const closure3 = canManageGuildOfficialMessages;
const closure4 = useCanManageGuildOfficialMessages;
const isGuildOfficialMessagesEnabled2 = isGuildOfficialMessagesEnabled;
const useIsGuildOfficialMessagesEnabled2 = useIsGuildOfficialMessagesEnabled;
const canManageGuildOfficialMessages2 = canManageGuildOfficialMessages;
const useCanManageGuildOfficialMessages2 = useCanManageGuildOfficialMessages;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const env0_5 = (require(4503) /* metro dependency 4503: MessageConstants */).GUILD_OFFICIAL_HIGHLIGHT_ALPHA;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_6 = constantsModule.ChannelTypes;
const env0_7 = constantsModule.GuildFeatures;
const env0_8 = constantsModule.MessageFlags;
const env0_9 = constantsModule.Permissions;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/GuildOfficialMessageUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/GuildOfficialMessageUtils.tsx');
exports.getAccessibleGuildOfficialTextColor = getAccessibleGuildOfficialTextColor;
exports.showGuildOfficialMessageGradient = function(a0) {
return a0 !== 'no_gradient' && a0 !== 'hidden';
@@ -23,110 +26,111 @@ function _fun54093(global, require, importDefault, importAll, module, exports, d
exports.showGuildOfficialMessageTextColor = function(a0) {
return a0 !== 'no_text_color' && a0 !== 'hidden';
};
exports.isGuildOfficialMessagesEnabled = closure;
exports.useIsGuildOfficialMessagesEnabled = closure2;
exports.canManageGuildOfficialMessages = closure3;
exports.useCanManageGuildOfficialMessages = closure4;
exports.isGuildOfficialMessagesEnabled = isGuildOfficialMessagesEnabled2;
exports.useIsGuildOfficialMessagesEnabled = useIsGuildOfficialMessagesEnabled2;
exports.canManageGuildOfficialMessages = canManageGuildOfficialMessages2;
exports.useCanManageGuildOfficialMessages = useCanManageGuildOfficialMessages2;
exports.useCanToggleGuildOfficialMessages = useCanToggleGuildOfficialMessages;
exports.canSendGuildOfficialMessages = canSendGuildOfficialMessages;
}
function isGuildOfficialMessagesEnabled(a0, a1) { // fn#54094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7036:235, offset: 0x0135c948, size: 105 bytes, params: 3, frame: 13
let value = a0 != null;
let r0 = value && a0.features.has(GuildFeatures.VERIFIED);
if (r0) {
value = importDefault(6859) /* metro dependency 6859: GuildOfficialMessagesExperiment */;
r0 = value.getCurrentConfig({guildId: a0.id, location: a1}).enabled;
}
return r0;
}
function useIsGuildOfficialMessagesEnabled(a0, a1) { // fn#54095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7036:384, offset: 0x0135c9b1, size: 169 bytes, params: 3, frame: 20
const value = a0;
const value3 = undefined;
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun54096, [value]);
const defaultImport = importDefault(6859) /* metro dependency 6859: GuildOfficialMessagesExperiment */;
const useExperiment = defaultImport.useExperiment;
return value4 != null && value4.features.has(GuildFeatures.VERIFIED) && Reflect.apply(useExperiment, defaultImport,
[{guildId: value ?? value3, location: a1}]).enabled;
}
function canManageGuildOfficialMessages(a0, a1, a2) { // fn#54097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7036:624, offset: 0x0135ca82, size: 55 bytes, params: 4, frame: 14
return isGuildOfficialMessagesEnabled(a0, a2) && PermissionStore.can(Permissions.MANAGE_OFFICIAL_MESSAGES, a1);
}
function useCanManageGuildOfficialMessages(a0, a1, a2) { // fn#54098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7036:751, offset: 0x0135cab9, size: 95 bytes, params: 4, frame: 18
const env0_0 = a1;
const value2 = useIsGuildOfficialMessagesEnabled(a0, a2);
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
return value2 && Reflect.apply(useStateFromStores, fluxModule, [[PermissionStore], function() {
var MANAGE_OFFICIAL_MESSAGES = Permissions.MANAGE_OFFICIAL_MESSAGES;
return PermissionStore.can(MANAGE_OFFICIAL_MESSAGES, require);
}, [a1]]);
}
function isChannelOfficialMessageEligible(a0) { // fn#54100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7036:938, offset: 0x0135cb3e, size: 116 bytes, params: 2, frame: 13
let value = a0 != null;
let r0 = value && !a0.isPrivate();
if (r0) {
value = require(6860) /* metro dependency 6860: ThreadHooks */;
value = value.getIsActiveChannelOrUnarchivableThread(a0);
r0 = value;
}
r0 = r0 && a0.type !== ChannelTypes.GUILD_VOICE && a0.type !== ChannelTypes.GUILD_STAGE_VOICE;
return r0;
}
function getAccessibleGuildOfficialTextColor(a0, a1) { // fn#54101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7036:1239, offset: 0x0135cbb2, size: 263 bytes, params: 3, frame: 24
let value = a2;
const value2 = a3;
const r3 = value !== undefined ? value : 1;
const r12 = value2 !== undefined ? value2 : GUILD_OFFICIAL_HIGHLIGHT_ALPHA;
const value3 = (require(673) /* metro dependency 673: ColorUtils */).int2hex(a0);
const value4 = (importDefault(674) /* metro dependency 674 */)(a1);
const value5 = (importDefault(674) /* metro dependency 674 */)(value3);
const value6 = (importDefault(674) /* metro dependency 674 */).mix(value4, value3, r12, 'rgb');
const defaultImport3 = importDefault(674) /* metro dependency 674 */;
const value7 = defaultImport3.contrast(value5, value6);
const defaultImport4 = defaultImport3;
const r4 = value7 < defaultImport4.contrast(value5, value4) ? value6 : value4;
value = require(4000) /* metro dependency 4000: ColorUtils */;
const getAccessibleForegroundColor = value.getAccessibleForegroundColor;
const object2 = {foreground: value5, background: r4};
const WCAGContrastRatios = (require(4002) /* metro dependency 4002: shared */).WCAGContrastRatios;
const Text = WCAGContrastRatios.Text;
object2.ratio = Text;
object2.saturationFactor = r3;
return Reflect.apply(getAccessibleForegroundColor, value, [object2]);
}
function useCanToggleGuildOfficialMessages(a0, a1, a2) { // fn#54104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7036:2102, offset: 0x0135cced, size: 152 bytes, params: 4, frame: 18
var value;
let r1 = a1.guild_id ?? undefined;
const value3 = useCanManageGuildOfficialMessages(r1, a1, a2);
let r0 = value3 ? (importDefault(5216) /* metro dependency 5216: isSystemMessage */)(a0) : !value3;
if (r0) {
r0 = !r0;
} else {
if (a0.hasFlag(MessageFlags.IS_GUILD_OFFICIAL)) {
value = require(6860) /* metro dependency 6860: ThreadHooks */;
value = value.getIsActiveChannelOrUnarchivableThread(a1);
r1 = value;
} else {
r1 = isChannelOfficialMessageEligible(a1);
function isGuildOfficialMessagesEnabled(a0, a1) { // fn#54094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7036:235, offset: 0x0135c948, size: 105 bytes, params: 3, frame: 13
let value = a0 != null;
let r0 = value && a0.features.has(GuildFeatures.VERIFIED);
if (r0) {
value = importDefault(6859) /* metro dependency 6859: GuildOfficialMessagesExperiment */;
r0 = value.getCurrentConfig({guildId: a0.id, location: a1}).enabled;
}
r0 = r1;
return r0;
}
return r0;
}
function canSendGuildOfficialMessages(a0, a1, a2) { // fn#54105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7036:2403, offset: 0x0135cd85, size: 39 bytes, params: 4, frame: 16
return canManageGuildOfficialMessages(a0, a1, a2) && isChannelOfficialMessageEligible(a1);
}
function useIsGuildOfficialMessagesEnabled(a0, a1) { // fn#54095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7036:384, offset: 0x0135c9b1, size: 169 bytes, params: 3, frame: 20
const value = a0;
const value3 = undefined;
const value4 = (FluxModule).useStateFromStores([GuildStore], _fun54096, [value]);
const defaultImport = GuildOfficialMessagesExperiment;
const useExperiment = defaultImport.useExperiment;
return value4 != null && value4.features.has(GuildFeatures.VERIFIED) && Reflect.apply(useExperiment, defaultImport,
[{guildId: value ?? value3, location: a1}]).enabled;
function _fun54096() { // fn#54096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7036:470, offset: 0x0135ca5a, size: 40 bytes, params: 1, frame: 12
const value2 = null;
return value2 != env0_0 ? GuildStore.getGuild(env0_0) : value2;
}
}
function canManageGuildOfficialMessages(a0, a1, a2) { // fn#54097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7036:624, offset: 0x0135ca82, size: 55 bytes, params: 4, frame: 14
return isGuildOfficialMessagesEnabled(a0, a2) && PermissionStore.can(Permissions.MANAGE_OFFICIAL_MESSAGES, a1);
}
function useCanManageGuildOfficialMessages(a0, a1, a2) { // fn#54098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7036:751, offset: 0x0135cab9, size: 95 bytes, params: 4, frame: 18
const env0_0 = a1;
const value2 = useIsGuildOfficialMessagesEnabled(a0, a2);
const useStateFromStores = FluxModule.useStateFromStores;
return value2 && Reflect.apply(useStateFromStores, FluxModule, [[PermissionStore], function() {
var permissionStoreBinding = PermissionStore;
var MANAGE_OFFICIAL_MESSAGES = Permissions.MANAGE_OFFICIAL_MESSAGES;
return permissionStoreBinding.can(MANAGE_OFFICIAL_MESSAGES, require);
}, [a1]]);
}
function isChannelOfficialMessageEligible(a0) { // fn#54100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7036:938, offset: 0x0135cb3e, size: 116 bytes, params: 2, frame: 13
let value = a0 != null;
let r0 = value && !a0.isPrivate();
if (r0) {
value = require(6860) /* metro dependency 6860: ThreadHooks */;
value = value.getIsActiveChannelOrUnarchivableThread(a0);
r0 = value;
}
r0 = r0 && a0.type !== ChannelTypes.GUILD_VOICE && a0.type !== ChannelTypes.GUILD_STAGE_VOICE;
return r0;
}
function getAccessibleGuildOfficialTextColor(a0, a1) { // fn#54101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7036:1239, offset: 0x0135cbb2, size: 263 bytes, params: 3, frame: 24
let value = a2;
const value2 = a3;
const r3 = value !== undefined ? value : 1;
const r12 = value2 !== undefined ? value2 : GUILD_OFFICIAL_HIGHLIGHT_ALPHA;
const value3 = (ColorUtilsModule).int2hex(a0);
const value4 = (defaultImport3)(a1);
const value5 = (defaultImport3)(value3);
const value6 = (defaultImport3).mix(value4, value3, r12, 'rgb');
const value7 = defaultImport3.contrast(value5, value6);
const defaultImport4 = defaultImport3;
const r4 = value7 < defaultImport4.contrast(value5, value4) ? value6 : value4;
value = require(4000) /* metro dependency 4000: ColorUtils */;
const getAccessibleForegroundColor = value.getAccessibleForegroundColor;
const object = {foreground: value5, background: r4};
const WCAGContrastRatios = (SharedModule).WCAGContrastRatios;
const Text = WCAGContrastRatios.Text;
object.ratio = Text;
object.saturationFactor = r3;
return Reflect.apply(getAccessibleForegroundColor, value, [object]);
}
function useCanToggleGuildOfficialMessages(a0, a1, a2) { // fn#54104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7036:2102, offset: 0x0135cced, size: 152 bytes, params: 4, frame: 18
var value;
let r1 = a1.guild_id ?? undefined;
const value3 = useCanManageGuildOfficialMessages(r1, a1, a2);
let r0 = value3 ? (importDefault(5216) /* metro dependency 5216: isSystemMessage */)(a0) : !value3;
if (r0) {
r0 = !r0;
} else {
if (a0.hasFlag(MessageFlags.IS_GUILD_OFFICIAL)) {
value = require(6860) /* metro dependency 6860: ThreadHooks */;
value = value.getIsActiveChannelOrUnarchivableThread(a1);
r1 = value;
} else {
r1 = isChannelOfficialMessageEligible(a1);
}
r0 = r1;
}
return r0;
}
function canSendGuildOfficialMessages(a0, a1, a2) { // fn#54105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7036:2403, offset: 0x0135cd85, size: 39 bytes, params: 4, frame: 16
return canManageGuildOfficialMessages(a0, a1, a2) && isChannelOfficialMessageEligible(a1);
}
function _fun54096() { // fn#54096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7036:470, offset: 0x0135ca5a, size: 40 bytes, params: 1, frame: 12
const value2 = null;
return value2 != env0_0 ? GuildStore.getGuild(env0_0) : value2;
}
global.__d(_fun54093, 6858, [1867, 3784, 4503, 661, 673, 674, 4000, 4002, 6859, 566, 6860, 5216,
2]) /* metro module 6858, dependencies: [1867, 3784, 4503, 661, 673, 674, 4000, 4002, 6859, 566, 6860, 5216, 2] */;
@@ -1,12 +1,16 @@
/* Metro module 6859; source: modules/messages/GuildOfficialMessagesExperiment.tsx; dependencies: [4620, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ExperimentsModule from '../experiments/index.tsx'; /* Metro dependency 4620 */
function _fun54106(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7037:6, offset: 0x0135cdac, size: 166 bytes, params: 8, frame: 21
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(4620) /* metro dependency 4620: experiments */;
let value = ExperimentsModule;
value = value.createExperiment({'kind': 'guild', 'id': '2026-03_guild_official_messages',
'label': 'Guild Official Messages', defaultConfig: {enabled: false}, treatments: [{'id': 1,
'label': 'Enable official messages', config: {enabled: true}}]});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/GuildOfficialMessagesExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/GuildOfficialMessagesExperiment.tsx');
exports.default = value;
}
global.__d(_fun54106, 6859, [4620, 2]) /* metro module 6859, dependencies: [4620, 2] */;
File diff suppressed because it is too large. Load diff
+166 -163
View File
@@ -1,6 +1,11 @@
/* Metro module 11542; source: modules/messages/LegacyCommands.tsx; dependencies: [57, 6540, 4814, 661, 3829, 7874, 3855, 7151, 3795, 7067, 4863, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import MessageStore from '../../stores/MessageStore.tsx'; /* Metro dependency 4814 */
import EmojiStore from '../emojis/EmojiStore.tsx'; /* Metro dependency 6540 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun88444(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11728:6, offset: 0x01fe332a, size: 502 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const executeCommand_88445 = function(a0, a1, a2, a3) {
var defaultImport = importDefault(dependencyMap[10]);
@@ -10,141 +15,149 @@ function _fun88444(global, require, importDefault, importAll, module, exports, d
};
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const emojiStore = importDefault(6540) /* metro dependency 6540: EmojiStore */;
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_6 = constantsModule.AnalyticEvents;
const env0_7 = constantsModule.MARKDOWN_SPOILER_WRAPPER;
const env0_8 = constantsModule.ME;
const env0_9 = RegExp('\\\\([*?+/])', 'g');
object2 = {};
object2.tts = {action: function() {
object = {};
object.tts = {action: function() {
var object = {};
var EnableTTSCommand = require(dependencyMap[4]).EnableTTSCommand;
object.tts = EnableTTSCommand.getSetting();
return object;
}};
object2.me = {action: function(a0) {
object.me = {action: function(a0) {
return {content: '_' + a0 + '_'};
}};
object2.tableflip = {action: function(a0) {
object.tableflip = {action: function(a0) {
var object = {};
object.content = ('' + a0 + ' (╯°□°)╯︵ ┻━┻').trim();
return object;
}};
object2.unflip = {action: function(a0) {
object.unflip = {action: function(a0) {
var object = {};
object.content = ('' + a0 + ' ┬─┬ノ( º _ ºノ)').trim();
return object;
}};
object2.shrug = {action: function(a0) {
object.shrug = {action: function(a0) {
var object = {};
object.content = ('' + a0 + ' ¯\\_(ツ)_/¯').trim();
return object;
}};
object2.nick = {action: action_88451};
const object3 = {};
object3.match = (importDefault(3855) /* metro dependency 3855 */).anyScopeRegex(RegExp('^\\+:(.+?): *$', ''));
object3.action = action_88452;
object2.reaction = object3;
const object4 = {};
object4.match = (importDefault(3855) /* metro dependency 3855 */).anyScopeRegex(RegExp('^s\\/([^\\/\\\\]*(?:\\\\.[^\\/\\\\]*)*)\\/([^\\/\\\\]*(?:\\\\.[^\\/\\\\]*)*)(?:\\/([g]*))?$',
object.nick = {action: action_88451};
const object5 = {};
object5.match = (importDefault(3855) /* metro dependency 3855 */).anyScopeRegex(RegExp('^\\+:(.+?): *$', ''));
object5.action = action_88452;
object.reaction = object5;
const object6 = {};
object6.match = (importDefault(3855) /* metro dependency 3855 */).anyScopeRegex(RegExp('^s\\/([^\\/\\\\]*(?:\\\\.[^\\/\\\\]*)*)\\/([^\\/\\\\]*(?:\\\\.[^\\/\\\\]*)*)(?:\\/([g]*))?$',
''));
object4.action = action_88453;
object2.searchReplace = object4;
object2.spoiler = {action: action_88456};
object6.action = action_88453;
object.searchReplace = object6;
object.spoiler = {action: action_88456};
Object = global.Object;
Object.setPrototypeOf(object2, null);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/LegacyCommands.tsx');
exports.COMMANDS = object2;
Object.setPrototypeOf(object, null);
(FileImportTrackerModule).fileFinishedImporting('modules/messages/LegacyCommands.tsx');
exports.COMMANDS = object;
exports.handleLegacyCommands = handleLegacyCommands;
}
function action_88451(a0, {channel}) { // fn#88451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11728:522, offset: 0x01fe3659, size: 90 bytes, params: 3, frame: 17
var defaultImport;
if (channel.guild_id != null) {
defaultImport = importDefault(7874) /* metro dependency 7874: ChangeNicknameActionCreators */;
defaultImport.changeNickname(channel.guild_id, channel.id, ME, a0);
return {content: ''};
function action_88451(a0, {channel}) { // fn#88451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11728:522, offset: 0x01fe3659, size: 90 bytes, params: 3, frame: 17
var defaultImport;
if (channel.guild_id != null) {
defaultImport = importDefault(7874) /* metro dependency 7874: ChangeNicknameActionCreators */;
defaultImport.changeNickname(channel.guild_id, channel.id, ME, a0);
return {content: ''};
}
}
}
function action_88452(a0, {isEdit, channel}) { // fn#88452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11728:685, offset: 0x01fe36b3, size: 252 bytes, params: 3, frame: 20
var getMessages;
var value3;
var value4;
var getByName;
var value5;
var value6;
var addReaction;
var id2;
var moduleValue;
if (!isEdit) {
function action_88452(a0, {isEdit, channel}) { // fn#88452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11728:685, offset: 0x01fe36b3, size: 252 bytes, params: 3, frame: 20
var getMessages;
var value3;
var emojiStoreBinding;
var value4;
var getByName;
var value5;
var value6;
var addReaction;
var id2;
var moduleValue;
if (!isEdit) {
var value;
var hasPresent = MessageStore.hasPresent;
var id = channel.id;
if (Reflect.apply(hasPresent, messageStoreBinding, [id])) {
messageStoreBinding = MessageStore;
getMessages = messageStoreBinding.getMessages;
id = channel.id;
value3 = Reflect.apply(getMessages, messageStoreBinding, [id]).last();
if (value3 == null) {
return undefined;
}
id = value3.id;
if (id == null) {
return undefined;
}
emojiStoreBinding = EmojiStore;
value4 = emojiStoreBinding.getDisambiguatedEmojiContext(channel.guild_id);
getByName = value4.getByName;
value5 = a0.trim();
value6 = Reflect.apply(getByName, value4, [value5.slice(2, -1)]);
if (value6 == null) {
return undefined;
}
value = require(7151) /* metro dependency 7151: ReactionActionCreators */;
addReaction = value.addReaction;
id = channel.id;
id2 = value3.id;
moduleValue = require(3795) /* metro dependency 3795: ReactionUtils */;
Reflect.apply(addReaction, value, [id, id2, moduleValue.toReactionEmoji(value6)]);
return {content: ''};
}
}
}
function action_88453(a0, {isEdit, channel}) { // fn#88453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11728:1093, offset: 0x01fe37af, size: 450 bytes, params: 3, frame: 23
var r8;
var r5;
if (isEdit) {
return undefined;
}
var value;
var hasPresent = MessageStore.hasPresent;
var id = channel.id;
if (Reflect.apply(hasPresent, MessageStore, [id])) {
getMessages = MessageStore.getMessages;
id = channel.id;
value3 = Reflect.apply(getMessages, MessageStore, [id]).last();
if (value3 == null) {
return undefined;
const lastEditableMessage = MessageStore.getLastEditableMessage(channel.id);
if (lastEditableMessage != null) {
if (lastEditableMessage.id == null) {
return {content: ''};
}
id = value3.id;
if (id == null) {
return undefined;
}
value4 = EmojiStore.getDisambiguatedEmojiContext(channel.guild_id);
getByName = value4.getByName;
value5 = a0.trim();
value6 = Reflect.apply(getByName, value4, [value5.slice(2, -1)]);
if (value6 == null) {
return undefined;
}
value = require(7151) /* metro dependency 7151: ReactionActionCreators */;
addReaction = value.addReaction;
id = channel.id;
id2 = value3.id;
moduleValue = require(3795) /* metro dependency 3795: ReactionUtils */;
Reflect.apply(addReaction, value, [id, id2, moduleValue.toReactionEmoji(value6)]);
return {content: ''};
}
}
}
function action_88453(a0, {isEdit, channel}) { // fn#88453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11728:1093, offset: 0x01fe37af, size: 450 bytes, params: 3, frame: 23
var r8;
var r5;
if (isEdit) {
return undefined;
}
var value;
const lastEditableMessage = MessageStore.getLastEditableMessage(channel.id);
if (lastEditableMessage != null) {
if (lastEditableMessage.id == null) {
return {content: ''};
}
var Array = global.Array;
var value6 = env0_3(Array.from(a0.match(this.match.regex) ?? []), 4);
value6[0];
var property = value6[1];
var property2 = value6[2];
r8 = value6[3]?.split('');
r8 = r8 ?? [];
var replace = property.replace;
var binding = env0_9;
var value8 = Reflect.apply(replace, property, [binding, function(a0, a1) {
return a1;
}]);
var value9 = property2.replace(binding, function(a0, a1) {
return a1;
});
var value10 = r8.includes('g');
var content = lastEditableMessage.content;
r5 = value10 ? content.replaceAll(value8, value9) : content.replace(value8, value9);
if (r5 == null) {
if (lastEditableMessage.attachments.length !== 0) {
var Array = global.Array;
var value6 = Module00057(Array.from(a0.match(this.match.regex) ?? []), 4);
value6[0];
var property = value6[1];
var property2 = value6[2];
r8 = value6[3]?.split('');
r8 = r8 ?? [];
var replace = property.replace;
var binding = env0_9;
var value8 = Reflect.apply(replace, property, [binding, function(a0, a1) {
return a1;
}]);
var value9 = property2.replace(binding, function(a0, a1) {
return a1;
});
var value10 = r8.includes('g');
var content = lastEditableMessage.content;
r5 = value10 ? content.replaceAll(value8, value9) : content.replace(value8, value9);
if (r5 == null) {
if (lastEditableMessage.attachments.length !== 0) {
if (r5 !== lastEditableMessage.content) {
value = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
value.editMessage(channel.id, lastEditableMessage.id, {content: r5});
}
} else {
value = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
value.deleteMessage(channel.id, lastEditableMessage.id);
}
} else if (r5.trim() !== '') {
if (r5 !== lastEditableMessage.content) {
value = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
value.editMessage(channel.id, lastEditableMessage.id, {content: r5});
}
} else if (lastEditableMessage.attachments.length !== 0) {
if (r5 !== lastEditableMessage.content) {
value = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
value.editMessage(channel.id, lastEditableMessage.id, {content: r5});
@@ -153,69 +166,59 @@ function action_88453(a0, {isEdit, channel}) { // fn#88453, source: /ci/build/di
value = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
value.deleteMessage(channel.id, lastEditableMessage.id);
}
} else if (r5.trim() !== '') {
if (r5 !== lastEditableMessage.content) {
value = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
value.editMessage(channel.id, lastEditableMessage.id, {content: r5});
}
} else if (lastEditableMessage.attachments.length !== 0) {
if (r5 !== lastEditableMessage.content) {
value = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
value.editMessage(channel.id, lastEditableMessage.id, {content: r5});
}
} else {
value = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
value.deleteMessage(channel.id, lastEditableMessage.id);
}
return {content: ''};
}
return {content: ''};
}
function action_88456(a0) { // fn#88456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11728:1660, offset: 0x01fe3971, size: 35 bytes, params: 2, frame: 12
const object2 = {};
object2.content = MARKDOWN_SPOILER_WRAPPER(a0).trim();
return object2;
}
function handleLegacyCommands(a0, a1) { // fn#88457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11728:1940, offset: 0x01fe3994, size: 115 bytes, params: 3, frame: 25
var propertyName;
var propertyName2;
var property;
var match;
var regex;
var test;
const properties = Object.keys(env0_10);
const properties2 = 0;
const properties3 = properties.length;
if (properties === undefined) {
return undefined;
function action_88456(a0) { // fn#88456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11728:1660, offset: 0x01fe3971, size: 35 bytes, params: 2, frame: 12
const object = {};
object.content = MARKDOWN_SPOILER_WRAPPER(a0).trim();
return object;
}
let r10 = properties2;
loopExit1: while (true) {
propertyName = properties[r10];
propertyName2 = r10 + 1;
if (propertyName === undefined) {
function handleLegacyCommands(a0, a1) { // fn#88457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11728:1940, offset: 0x01fe3994, size: 115 bytes, params: 3, frame: 25
var propertyName;
var propertyName2;
var property;
var match;
var regex;
var test;
const properties = Object.keys(env0_10);
const properties2 = 0;
const properties3 = properties.length;
if (properties === undefined) {
return undefined;
}
property = env0_10[propertyName];
match = property.match;
if (match == null) {
let r10 = properties2;
loopExit1: while (true) {
propertyName = properties[r10];
propertyName2 = r10 + 1;
if (propertyName === undefined) {
return undefined;
}
property = env0_10[propertyName];
match = property.match;
if (match == null) {
r10 = propertyName2;
continue;
}
match = property.match;
regex = match.regex;
if (regex == null) {
r10 = propertyName2;
continue;
}
test = regex.test;
if (Reflect.apply(test, regex, [a0])) {
break loopExit1;
}
r10 = propertyName2;
continue;
}
match = property.match;
regex = match.regex;
if (regex == null) {
r10 = propertyName2;
continue;
}
test = regex.test;
if (Reflect.apply(test, regex, [a0])) {
break loopExit1;
}
r10 = propertyName2;
continue;
return executeCommand_88445(propertyName, property, a0, a1);
}
return executeCommand_88445(propertyName, property, a0, a1);
}
global.__d(_fun88444, 11542, [57, 6540, 4814, 661, 3829, 7874, 3855, 7151, 3795, 7067, 4863,
2]) /* metro module 11542, dependencies: [57, 6540, 4814, 661, 3829, 7874, 3855, 7151, 3795, 7067, 4863, 2] */;
+69 -62
View File
@@ -1,11 +1,13 @@
/* Metro module 4631; source: modules/messages/MediaFormatTesters.tsx; dependencies: [57, 477, 4632, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun39850(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:6, offset: 0x010edc53, size: 500 bytes, params: 8, frame: 19
var regexp;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const closure = urlMatchesFileExtension;
const urlMatchesFileExtension2 = urlMatchesFileExtension;
const env0_5 = RegExp('\\.(png|jpe?g|jfif|webp|gif|heic|heif|dng|avif)$', 'i');
const env0_6 = RegExp('\\.(webp|gif|avif)$', 'i');
let value = require(477) /* metro dependency 477: PlatformUtils */;
@@ -28,10 +30,10 @@ function _fun39850(global, require, importDefault, importAll, module, exports, d
(require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
regexp = RegExp('\\.(mp4|webm|mov|qt)$', 'i');
}
const closure2 = isWebPlayerVideoUrl;
const closure3 = isWebPlayerVideoFile;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/MediaFormatTesters.tsx');
exports.urlMatchesFileExtension = closure;
const isWebPlayerVideoUrl2 = isWebPlayerVideoUrl;
const isWebPlayerVideoFile2 = isWebPlayerVideoFile;
(FileImportTrackerModule).fileFinishedImporting('modules/messages/MediaFormatTesters.tsx');
exports.urlMatchesFileExtension = urlMatchesFileExtension2;
exports.isImageUrl = isImageUrl;
exports.isImageFile = isImageFile;
exports.isImageContentType = function(a0) {
@@ -39,78 +41,83 @@ function _fun39850(global, require, importDefault, importAll, module, exports, d
};
exports.isAnimatedImageUrl = isAnimatedImageUrl;
exports.isAudioFile = isAudioFile;
exports.isWebPlayerVideoUrl = closure2;
exports.isWebPlayerVideoUrl = isWebPlayerVideoUrl2;
exports.isVideoUrl = isVideoUrl;
exports.isWebPlayerVideoFile = closure3;
exports.isWebPlayerVideoFile = isWebPlayerVideoFile2;
exports.isVideoFile = isVideoFile;
exports.isRiveFile = isRiveFile;
exports.isVideoContentType = function(a0) {
return contentTypeMatches(a0, 'video');
};
}
function urlMatchesFileExtension(a0, a1) { // fn#39851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:130, offset: 0x010ede47, size: 84 bytes, params: 3, frame: 15
if (a0 == null) {
return false;
function urlMatchesFileExtension(a0, a1) { // fn#39851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:130, offset: 0x010ede47, size: 84 bytes, params: 3, frame: 15
if (a0 == null) {
return false;
}
let value = a0.split(RegExp('\\?', ''), 1);
value = Module00057(value, 2);
const property = value[0];
value[1];
return a1.test(property);
}
let value = a0.split(RegExp('\\?', ''), 1);
value = env0_2(value, 2);
const property = value[0];
value[1];
return a1.test(property);
}
function contentTypeMatches(a0, a1) { // fn#39852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:238, offset: 0x010ede9b, size: 67 bytes, params: 3, frame: 13
if (a0 == null) {
return false;
function contentTypeMatches(a0, a1) { // fn#39852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:238, offset: 0x010ede9b, size: 67 bytes, params: 3, frame: 13
if (a0 == null) {
return false;
}
let value = a0.split('/');
value = Module00057(value, 2);
const property = value[0];
value[1];
return property === a1;
}
let value = a0.split('/');
value = env0_2(value, 2);
const property = value[0];
value[1];
return property === a1;
}
function isWebPlayerVideoUrl(a0) { // fn#39853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:687, offset: 0x010edede, size: 57 bytes, params: 2, frame: 14
return (require(4632) /* metro dependency 4632: WebViewWebmSupportTestNative */).isIOSWithWebM() && urlMatchesFileExtension(a0,
env0_8);
}
function isWebPlayerVideoFile(a0) { // fn#39854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:765, offset: 0x010edf17, size: 69 bytes, params: 2, frame: 13
var r0;
let value = a0 != null;
if (value) {
value = require(4632) /* metro dependency 4632: WebViewWebmSupportTestNative */;
value = value.isIOSWithWebM();
r0 = value;
} else {
r0 = value;
function isWebPlayerVideoUrl(a0) { // fn#39853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:687, offset: 0x010edede, size: 57 bytes, params: 2, frame: 14
return (require(4632) /* metro dependency 4632: WebViewWebmSupportTestNative */).isIOSWithWebM() && urlMatchesFileExtension(a0,
env0_8);
}
r0 = r0 && env0_8.test(a0);
return r0;
}
function isImageUrl(a0) { // fn#39855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:948, offset: 0x010edf5c, size: 24 bytes, params: 2, frame: 13
return urlMatchesFileExtension(a0, env0_5);
}
function isWebPlayerVideoFile(a0) { // fn#39854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:765, offset: 0x010edf17, size: 69 bytes, params: 2, frame: 13
var r0;
let value = a0 != null;
if (value) {
value = require(4632) /* metro dependency 4632: WebViewWebmSupportTestNative */;
value = value.isIOSWithWebM();
r0 = value;
} else {
r0 = value;
}
r0 = r0 && env0_8.test(a0);
return r0;
}
function isImageFile(a0) { // fn#39856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:994, offset: 0x010edf74, size: 31 bytes, params: 2, frame: 12
return a0 != null && env0_5.test(a0);
}
function isImageUrl(a0) { // fn#39855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:948, offset: 0x010edf5c, size: 24 bytes, params: 2, frame: 13
return urlMatchesFileExtension(a0, env0_5);
}
function isAnimatedImageUrl(a0) { // fn#39858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:1091, offset: 0x010edfab, size: 24 bytes, params: 2, frame: 13
return urlMatchesFileExtension(a0, env0_6);
}
function isImageFile(a0) { // fn#39856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:994, offset: 0x010edf74, size: 31 bytes, params: 2, frame: 12
return a0 != null && env0_5.test(a0);
}
function isVideoUrl(a0) { // fn#39860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:1214, offset: 0x010edfc3, size: 36 bytes, params: 2, frame: 14
return urlMatchesFileExtension(a0, env0_10) || isWebPlayerVideoUrl(a0);
}
function isAnimatedImageUrl(a0) { // fn#39858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:1091, offset: 0x010edfab, size: 24 bytes, params: 2, frame: 13
return urlMatchesFileExtension(a0, env0_6);
}
function isVideoFile(a0) { // fn#39861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:1328, offset: 0x010edfe7, size: 48 bytes, params: 2, frame: 13
return a0 != null && (env0_10.test(a0) || isWebPlayerVideoFile(a0));
}
function isAudioFile(a0) { // fn#39859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:1137, offset: 0x0103615d, size: 31 bytes, params: 2, frame: 12
return a0 != null && env0_7.test(a0);
}
function isVideoUrl(a0) { // fn#39860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:1214, offset: 0x010edfc3, size: 36 bytes, params: 2, frame: 14
return urlMatchesFileExtension(a0, env0_10) || isWebPlayerVideoUrl(a0);
}
function isVideoFile(a0) { // fn#39861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:1328, offset: 0x010edfe7, size: 48 bytes, params: 2, frame: 13
return a0 != null && (env0_10.test(a0) || isWebPlayerVideoFile(a0));
}
function isRiveFile(a0) { // fn#39862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:1390, offset: 0x010ee017, size: 31 bytes, params: 2, frame: 12
return a0 != null && env0_9.test(a0);
}
function isRiveFile(a0) { // fn#39862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:1390, offset: 0x010ee017, size: 31 bytes, params: 2, frame: 12
return a0 != null && env0_9.test(a0);
}
global.__d(_fun39850, 4631, [57, 477, 4632, 2]) /* metro module 4631, dependencies: [57, 477, 4632, 2] */;
@@ -1,172 +1,176 @@
/* Metro module 11558; source: modules/messages/MessageAttachmentUtils.tsx; dependencies: [3784, 661, 4838, 4841, 4840, 1391, 9587, 632, 3829, 11334, 1244, 2] */
import PermissionStore from '../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import ComputeGlobalSpoilerDisplay from './computeGlobalSpoilerDisplay.tsx'; /* Metro dependency 11334 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UseStateFromStoresModule from '../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UserSettingsModule from '../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
import * as ObscuredMediaUtilsModule from '../explicit_media_redaction/ObscuredMediaUtils.tsx'; /* Metro dependency 4838 */
import * as ObscureMediaModelsModule from '../explicit_media_redaction/ObscureMediaModels.tsx'; /* Metro dependency 4840 */
import * as ExplicitMediaRedactionModelsModule from '../explicit_media_redaction/ExplicitMediaRedactionModels.tsx'; /* Metro dependency 4841 */
import * as ForumPostMediaUtilsModule from '../forums/ForumPostMediaUtils.tsx'; /* Metro dependency 9587 */
function _fun88572(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11744:6, offset: 0x01fe90a5, size: 221 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = getForumPostShouldObscure;
const getForumPostShouldObscure2 = getForumPostShouldObscure;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_4 = constantsModule.MessageAttachmentFlags;
const env0_5 = constantsModule.Permissions;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/MessageAttachmentUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/MessageAttachmentUtils.tsx');
exports.getObscureReasonForAttachment = getObscureReasonForAttachment;
exports.getObscureReasonForEmbed = getObscureReasonForEmbed;
exports.getObscureReasonForUnfurledMediaItem = getObscureReasonForUnfurledMediaItem;
exports.getForumPostShouldObscure = closure;
exports.getForumPostShouldObscure = getForumPostShouldObscure2;
exports.useShouldObscure = useShouldObscure;
exports.getObscuredAlt = getObscuredAlt;
}
function getForumPostShouldObscure(a0, a1, a2) { // fn#88573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11744:159, offset: 0x01fe9182, size: 540 bytes, params: 4, frame: 19
var r0;
var items;
const ObscuredMediaTypes = (require(4841) /* metro dependency 4841: ExplicitMediaRedactionModels */).ObscuredMediaTypes;
const ObscureReason = (require(4840) /* metro dependency 4840: ObscureMediaModels */).ObscureReason;
let value = null;
if (value == a0) {
return [false, undefined];
}
const type = a0.type;
const ForumPostMediaTypes = (require(9587) /* metro dependency 9587: ForumPostMediaUtils */).ForumPostMediaTypes;
const EMBED = ForumPostMediaTypes.EMBED;
const r6 = EMBED === type ? {type: ObscuredMediaTypes.Embed,
media: a0} : ForumPostMediaTypes.ATTACHMENT === type ? {type: ObscuredMediaTypes.Attachment,
media: a0} : ForumPostMediaTypes.COMPONENT !== type ? value : {type: ObscuredMediaTypes.GenericMedia,
media: a0.srcUnfurledMediaItem};
if (value == r6) {
return [false, undefined];
}
value = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
value = value.getMediaObscuredReasonFromBitmask(r6, a2);
if (value.length > 0) {
r0 = [true, value[0]];
} else {
items = [];
if ((require(4838) /* metro dependency 4838: ObscuredMediaUtils */).isMediaScanPending(r6, a2)) {
items[0] = true;
items[1] = ObscureReason.POTENTIAL_EXPLICIT_CONTENT;
r0 = items;
} else if (a0.spoiler) {
items[0] = a1;
items[1] = ObscureReason.SPOILER;
r0 = items;
function getForumPostShouldObscure(a0, a1, a2) { // fn#88573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11744:159, offset: 0x01fe9182, size: 540 bytes, params: 4, frame: 19
var r0;
var items2;
const ObscuredMediaTypes = (ExplicitMediaRedactionModelsModule).ObscuredMediaTypes;
const ObscureReason = (ObscureMediaModelsModule).ObscureReason;
let value = null;
if (value == a0) {
return [false, undefined];
}
const type = a0.type;
const ForumPostMediaTypes = (ForumPostMediaUtilsModule).ForumPostMediaTypes;
const EMBED = ForumPostMediaTypes.EMBED;
const r6 = EMBED === type ? {type: ObscuredMediaTypes.Embed,
media: a0} : ForumPostMediaTypes.ATTACHMENT === type ? {type: ObscuredMediaTypes.Attachment,
media: a0} : ForumPostMediaTypes.COMPONENT !== type ? value : {type: ObscuredMediaTypes.GenericMedia,
media: a0.srcUnfurledMediaItem};
if (value == r6) {
return [false, undefined];
}
value = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
value = value.getMediaObscuredReasonFromBitmask(r6, a2);
if (value.length > 0) {
r0 = [true, value[0]];
} else {
items[0] = false;
items[1] = undefined;
r0 = items;
items2 = [];
if ((require(4838) /* metro dependency 4838: ObscuredMediaUtils */).isMediaScanPending(r6, a2)) {
items2[0] = true;
items2[1] = ObscureReason.POTENTIAL_EXPLICIT_CONTENT;
r0 = items2;
} else if (a0.spoiler) {
items2[0] = a1;
items2[1] = ObscureReason.SPOILER;
r0 = items2;
} else {
items2[0] = false;
items2[1] = undefined;
r0 = items2;
}
}
return r0;
}
function getObscureReasonForAttachment(a0, a1) { // fn#88574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11744:1000, offset: 0x01fe939e, size: 292 bytes, params: 3, frame: 24
var SPOILER;
var r0;
const ObscureReason = (ObscureMediaModelsModule).ObscureReason;
const spoiler = a0.spoiler;
const flags = a0.flags;
let value = 0;
const r7 = flags === undefined ? value : flags;
const getMediaObscuredReasonFromBitmask = ObscuredMediaUtilsModule.getMediaObscuredReasonFromBitmask;
const ObscuredMediaTypes = (ExplicitMediaRedactionModelsModule).ObscuredMediaTypes;
let Attachment = ObscuredMediaTypes.Attachment;
const value3 = Reflect.apply(getMediaObscuredReasonFromBitmask, ObscuredMediaUtilsModule, [{type: Attachment,
media: a0}, a1]);
const isMediaScanPending = ObscuredMediaUtilsModule.isMediaScanPending;
object = {};
Attachment = ObscuredMediaTypes.Attachment;
object.type = Attachment;
object.media = a0;
if (value3.length > value) {
r0 = value3[value];
} else if (Reflect.apply(isMediaScanPending, ObscuredMediaUtilsModule, [object, a1])) {
r0 = ObscureReason.POTENTIAL_EXPLICIT_CONTENT;
} else {
if (spoiler) {
SPOILER = ObscureReason.SPOILER;
} else {
value = require(1391) /* metro dependency 1391: FlagUtils */;
value = value.hasFlag(r7, MessageAttachmentFlags.IS_SPOILER);
SPOILER = value ? ObscureReason.SPOILER : null;
}
r0 = SPOILER;
}
return r0;
}
function getObscureReasonForEmbed(a0, {author}, a2, a3) { // fn#88575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11744:1408, offset: 0x01fe94c2, size: 256 bytes, params: 5, frame: 21
const ObscureReason = (ObscureMediaModelsModule).ObscureReason;
const getMediaObscuredReasonFromBitmask = ObscuredMediaUtilsModule.getMediaObscuredReasonFromBitmask;
const ObscuredMediaTypes = (ExplicitMediaRedactionModelsModule).ObscuredMediaTypes;
const Embed = ObscuredMediaTypes.Embed;
const value2 = Reflect.apply(getMediaObscuredReasonFromBitmask, ObscuredMediaUtilsModule, [{type: Embed, media: a0},
a3]);
let r0 = !author.bot && ObscuredMediaUtilsModule.isMediaScanPending({type: ObscuredMediaTypes.Embed, media: a0}, a3);
r0 = value2.length > 0 ? value2[0] : r0 ? ObscureReason.POTENTIAL_EXPLICIT_CONTENT : a2 ? ObscureReason.SPOILER : null;
return r0;
}
function getObscureReasonForUnfurledMediaItem(a0, a1) { // fn#88576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11744:1765, offset: 0x01fe95c2, size: 461 bytes, params: 3, frame: 22
const value = a2;
const value2 = a3;
const r2 = value !== undefined ? value : false;
let r0 = value2 !== undefined ? value2 : false;
const getMediaObscuredReasonFromBitmask = ObscuredMediaUtilsModule.getMediaObscuredReasonFromBitmask;
const ObscuredMediaTypes = (ExplicitMediaRedactionModelsModule).ObscuredMediaTypes;
const GenericMedia = ObscuredMediaTypes.GenericMedia;
const value3 = Reflect.apply(getMediaObscuredReasonFromBitmask, ObscuredMediaUtilsModule, [{type: GenericMedia,
media: a0}, a1]);
r0 = !r0 && ObscuredMediaUtilsModule.isMediaScanPending({type: ObscuredMediaTypes.GenericMedia, media: a0}, a1);
const includes = value3.includes;
const ObscureReason = (ObscureMediaModelsModule).ObscureReason;
const EXPLICIT_CONTENT = ObscureReason.EXPLICIT_CONTENT;
r0 = Reflect.apply(includes, value3,
[EXPLICIT_CONTENT]) ? ObscureReason.EXPLICIT_CONTENT : value3.includes(ObscureReason.GORE_CONTENT) ? ObscureReason.GORE_CONTENT : value3.includes(ObscureReason.SELF_HARM_CONTENT) ? ObscureReason.SELF_HARM_CONTENT : r0 ? ObscureReason.POTENTIAL_EXPLICIT_CONTENT : r2 ? ObscureReason.SPOILER : null;
return r0;
}
function useShouldObscure({channel, media}) { // fn#88577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11744:2413, offset: 0x01fe978f, size: 188 bytes, params: 2, frame: 20
const value2 = (UseStateFromStoresModule).useStateFromStores([PermissionStore],
_fun88578);
const RenderSpoilers = (UserSettingsModule).RenderSpoilers;
const value3 = RenderSpoilers.useSetting();
const getEnabledHarmTypesBitmaskForChannelType = ObscuredMediaUtilsModule.getEnabledHarmTypesBitmaskForChannelType;
const ContentHarmTypeChannel = (ExplicitMediaRedactionModelsModule).ContentHarmTypeChannel;
const GUILD = ContentHarmTypeChannel.GUILD;
return getForumPostShouldObscure(media,
!(ComputeGlobalSpoilerDisplay)(value3, value2),
Reflect.apply(getEnabledHarmTypesBitmaskForChannelType, ObscuredMediaUtilsModule, [GUILD]));
function _fun88578() { // fn#88578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11744:2498, offset: 0x01fe984b, size: 51 bytes, params: 1, frame: 14
return channel != null && PermissionStore.can(Permissions.MANAGE_MESSAGES, channel);
}
}
function getObscuredAlt(a0) { // fn#88579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11744:2737, offset: 0x01fe987e, size: 269 bytes, params: 2, frame: 15
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const ObscureReason = (ObscureMediaModelsModule).ObscureReason;
const EXPLICIT_CONTENT = ObscureReason.EXPLICIT_CONTENT;
if (EXPLICIT_CONTENT === a0) {
return intl.string(t.SEgHFh);
}
const GORE_CONTENT = ObscureReason.GORE_CONTENT;
if (GORE_CONTENT === a0) {
return intl.string(t.SEgHFh);
}
const SELF_HARM_CONTENT = ObscureReason.SELF_HARM_CONTENT;
if (SELF_HARM_CONTENT === a0) {
return intl.string(t.SEgHFh);
}
const SPOILER = ObscureReason.SPOILER;
if (SPOILER === a0) {
return intl.string(t['XpfDH+']);
}
}
return r0;
}
function getObscureReasonForAttachment(a0, a1) { // fn#88574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11744:1000, offset: 0x01fe939e, size: 292 bytes, params: 3, frame: 24
var object2;
var SPOILER;
var r0;
const ObscureReason = (require(4840) /* metro dependency 4840: ObscureMediaModels */).ObscureReason;
const spoiler = a0.spoiler;
const flags = a0.flags;
let value = 0;
const r7 = flags === undefined ? value : flags;
const obscuredMediaUtilsModule = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
const getMediaObscuredReasonFromBitmask = obscuredMediaUtilsModule.getMediaObscuredReasonFromBitmask;
const ObscuredMediaTypes = (require(4841) /* metro dependency 4841: ExplicitMediaRedactionModels */).ObscuredMediaTypes;
let Attachment = ObscuredMediaTypes.Attachment;
const value3 = Reflect.apply(getMediaObscuredReasonFromBitmask, obscuredMediaUtilsModule, [{type: Attachment,
media: a0}, a1]);
const moduleValue2 = obscuredMediaUtilsModule;
const isMediaScanPending = moduleValue2.isMediaScanPending;
object2 = {};
Attachment = ObscuredMediaTypes.Attachment;
object2.type = Attachment;
object2.media = a0;
if (value3.length > value) {
r0 = value3[value];
} else if (Reflect.apply(isMediaScanPending, moduleValue2, [object2, a1])) {
r0 = ObscureReason.POTENTIAL_EXPLICIT_CONTENT;
} else {
if (spoiler) {
SPOILER = ObscureReason.SPOILER;
} else {
value = require(1391) /* metro dependency 1391: FlagUtils */;
value = value.hasFlag(r7, MessageAttachmentFlags.IS_SPOILER);
SPOILER = value ? ObscureReason.SPOILER : null;
}
r0 = SPOILER;
}
return r0;
}
function getObscureReasonForEmbed(a0, {author}, a2, a3) { // fn#88575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11744:1408, offset: 0x01fe94c2, size: 256 bytes, params: 5, frame: 21
const ObscureReason = (require(4840) /* metro dependency 4840: ObscureMediaModels */).ObscureReason;
const obscuredMediaUtilsModule = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
const getMediaObscuredReasonFromBitmask = obscuredMediaUtilsModule.getMediaObscuredReasonFromBitmask;
const ObscuredMediaTypes = (require(4841) /* metro dependency 4841: ExplicitMediaRedactionModels */).ObscuredMediaTypes;
const Embed = ObscuredMediaTypes.Embed;
const value2 = Reflect.apply(getMediaObscuredReasonFromBitmask, obscuredMediaUtilsModule, [{type: Embed, media: a0},
a3]);
let r0 = !author.bot && obscuredMediaUtilsModule.isMediaScanPending({type: ObscuredMediaTypes.Embed, media: a0}, a3);
r0 = value2.length > 0 ? value2[0] : r0 ? ObscureReason.POTENTIAL_EXPLICIT_CONTENT : a2 ? ObscureReason.SPOILER : null;
return r0;
}
function getObscureReasonForUnfurledMediaItem(a0, a1) { // fn#88576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11744:1765, offset: 0x01fe95c2, size: 461 bytes, params: 3, frame: 22
const value = a2;
const value2 = a3;
const r2 = value !== undefined ? value : false;
let r0 = value2 !== undefined ? value2 : false;
const obscuredMediaUtilsModule = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
const getMediaObscuredReasonFromBitmask = obscuredMediaUtilsModule.getMediaObscuredReasonFromBitmask;
const ObscuredMediaTypes = (require(4841) /* metro dependency 4841: ExplicitMediaRedactionModels */).ObscuredMediaTypes;
const GenericMedia = ObscuredMediaTypes.GenericMedia;
const value3 = Reflect.apply(getMediaObscuredReasonFromBitmask, obscuredMediaUtilsModule, [{type: GenericMedia,
media: a0}, a1]);
r0 = !r0 && obscuredMediaUtilsModule.isMediaScanPending({type: ObscuredMediaTypes.GenericMedia, media: a0}, a1);
const includes = value3.includes;
const ObscureReason = (require(4840) /* metro dependency 4840: ObscureMediaModels */).ObscureReason;
const EXPLICIT_CONTENT = ObscureReason.EXPLICIT_CONTENT;
r0 = Reflect.apply(includes, value3,
[EXPLICIT_CONTENT]) ? ObscureReason.EXPLICIT_CONTENT : value3.includes(ObscureReason.GORE_CONTENT) ? ObscureReason.GORE_CONTENT : value3.includes(ObscureReason.SELF_HARM_CONTENT) ? ObscureReason.SELF_HARM_CONTENT : r0 ? ObscureReason.POTENTIAL_EXPLICIT_CONTENT : r2 ? ObscureReason.SPOILER : null;
return r0;
}
function useShouldObscure({channel, media}) { // fn#88577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11744:2413, offset: 0x01fe978f, size: 188 bytes, params: 2, frame: 20
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([PermissionStore],
_fun88578);
const RenderSpoilers = (require(3829) /* metro dependency 3829: UserSettings */).RenderSpoilers;
const value3 = RenderSpoilers.useSetting();
const obscuredMediaUtilsModule = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
const getEnabledHarmTypesBitmaskForChannelType = obscuredMediaUtilsModule.getEnabledHarmTypesBitmaskForChannelType;
const ContentHarmTypeChannel = (require(4841) /* metro dependency 4841: ExplicitMediaRedactionModels */).ContentHarmTypeChannel;
const GUILD = ContentHarmTypeChannel.GUILD;
return getForumPostShouldObscure(media,
!(importDefault(11334) /* metro dependency 11334: computeGlobalSpoilerDisplay */)(value3, value2),
Reflect.apply(getEnabledHarmTypesBitmaskForChannelType, obscuredMediaUtilsModule, [GUILD]));
}
function getObscuredAlt(a0) { // fn#88579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11744:2737, offset: 0x01fe987e, size: 269 bytes, params: 2, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const ObscureReason = (require(4840) /* metro dependency 4840: ObscureMediaModels */).ObscureReason;
const EXPLICIT_CONTENT = ObscureReason.EXPLICIT_CONTENT;
if (EXPLICIT_CONTENT === a0) {
return intl.string(t.SEgHFh);
}
const GORE_CONTENT = ObscureReason.GORE_CONTENT;
if (GORE_CONTENT === a0) {
return intl.string(t.SEgHFh);
}
const SELF_HARM_CONTENT = ObscureReason.SELF_HARM_CONTENT;
if (SELF_HARM_CONTENT === a0) {
return intl.string(t.SEgHFh);
}
const SPOILER = ObscureReason.SPOILER;
if (SPOILER === a0) {
return intl.string(t['XpfDH+']);
}
}
function _fun88578() { // fn#88578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11744:2498, offset: 0x01fe984b, size: 51 bytes, params: 1, frame: 14
return channel != null && PermissionStore.can(Permissions.MANAGE_MESSAGES, channel);
}
global.__d(_fun88572, 11558, [3784, 661, 4838, 4841, 4840, 1391, 9587, 632, 3829, 11334, 1244,
2]) /* metro module 11558, dependencies: [3784, 661, 4838, 4841, 4840, 1391, 9587, 632, 3829, 11334, 1244, 2] */;
+16 -13
View File
@@ -1,34 +1,36 @@
/* Metro module 4503; source: modules/messages/MessageConstants.tsx; dependencies: [661, 672, 561, 2] */
import Backoff from '../../external/discord_common/js/packages/backoff/Backoff.tsx'; /* Metro dependency 561 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun38545(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4681:6, offset: 0x010c28d0, size: 928 bytes, params: 8, frame: 25
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(661) /* metro dependency 661: Constants */).ChannelStreamTypes;
Object = global.Object;
const value = Object.freeze({'referencedAvatarProfile': false, 'referencedUsernameProfile': false,
'interactionAvatarProfile': false, 'interactionUsernameProfile': false, 'interactionData': false,
'avatarProfile': false, 'usernameProfile': false, 'emojiPicker': false, 'emojiBurstPicker': false,
'moreUtilities': false, 'contextMenu': false});
const object = {};
const object2 = {};
const object3 = {};
const object4 = {};
let Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
let SECOND = Millis.SECOND;
object2.response = 10 * SECOND;
object4.response = 10 * SECOND;
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const MINUTE = Millis.MINUTE;
object2.deadline = 1 * MINUTE;
object.timeout = object2;
const backoff = importDefault(561) /* metro dependency 561: Backoff */;
object4.deadline = 1 * MINUTE;
object3.timeout = object4;
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
SECOND = Millis.SECOND;
const value3 = 0.5 * SECOND;
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
SECOND = Millis.SECOND;
const value4 = 60 * SECOND;
const value5 = Object.create(backoff.prototype, {constructor: {value: backoff}});
const backoff2 = new backoff(value3, value4);
object.backoff = backoff2 instanceof Object ? backoff2 : value5;
object.retries = 8;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/MessageConstants.tsx');
const value5 = Object.create(Backoff.prototype, {constructor: {value: Backoff}});
const backoff2 = new Backoff(value3, value4);
object3.backoff = backoff2 instanceof Object ? backoff2 : value5;
object3.retries = 8;
(FileImportTrackerModule).fileFinishedImporting('modules/messages/MessageConstants.tsx');
exports.MESSAGE_GROUP_SPACING = [0, 4, 8, 16, 24];
exports.DEFAULT_COZY_SPACING = 16;
exports.DEFAULT_COMPACT_SPACING = 0;
@@ -55,7 +57,7 @@ function _fun38545(global, require, importDefault, importAll, module, exports, d
exports.isChannelStreamMessage = function({type}) {
return type === ChannelStreamTypes.MESSAGE;
};
exports.MESSAGE_HTTP_TIMEOUT_RETRY_OPTIONS = object;
exports.MESSAGE_HTTP_TIMEOUT_RETRY_OPTIONS = object3;
exports.MessageSendLocation = {PUSH_NOTIFICATION: 'push_notification', CHAT_INPUT: 'chat_input',
SHARE_MODAL: 'share_modal', VOICE_MESSAGE: 'voice_message', THREAD_CREATION: 'thread_creation',
FORWARDING: 'forwarding', USER_PROFILE: 'user_profile', RETRY: 'explicit_retry', OVERLAY: 'overlay',
@@ -67,3 +69,4 @@ function _fun38545(global, require, importDefault, importAll, module, exports, d
OTHER: 'other'};
}
global.__d(_fun38545, 4503, [661, 672, 561, 2]) /* metro module 4503, dependencies: [661, 672, 561, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -1,80 +1,86 @@
/* Metro module 15768; source: modules/messages/MessageQueueManager.tsx; dependencies: [6, 7, 15, 17, 18, 4862, 4860, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import AutomaticLifecycleManager from '../../lib/AutomaticLifecycleManager.tsx'; /* Metro dependency 4860 */
import MessageQueue from '../../lib/MessageQueue.tsx'; /* Metro dependency 4862 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun121156(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15976:6, offset: 0x0253fbce, size: 226 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
let value = AutomaticLifecycleManager;
value = _fun121160(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/MessageQueueManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/MessageQueueManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_121157() { // fn#121157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15976:148, offset: 0x0253fcb0, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_121157() { // fn#121157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15976:148, offset: 0x0253fcb0, 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_121157_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_121157_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun121160(a0) { // fn#121160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15976:351, offset: 0x0253fd12, size: 72 bytes, params: 2, frame: 15
const closure = MessageQueueManager;
env0_6(closure, a0);
return env0_3(closure, [{key: 'handleLogout', value: value_121162}]);
}
function _fun121160(a0) { // fn#121160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15976:351, offset: 0x0253fd12, size: 72 bytes, params: 2, frame: 15
const MessageQueueManager2 = MessageQueueManager;
Inherits(MessageQueueManager2, a0);
return CreateClass(MessageQueueManager2, [{key: 'handleLogout', value: value_121162}]);
function MessageQueueManager(a0) { // fn#121161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15976:363, offset: 0x0253fd5a, size: 145 bytes, params: 2, frame: 19
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_2;
binding(this, MessageQueueManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_5(MessageQueueManager);
binding = env1_4;
if (_isNativeReflectConstruct_121157()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.actions = {LOGOUT: value.handleLogout};
return value;
}
function value_121162() { // fn#121162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15976:723, offset: 0x0253fdeb, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(MessageQueue).clear();
}
function MessageQueueManager(a0) { // fn#121161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15976:363, offset: 0x0253fd5a, size: 145 bytes, params: 2, frame: 19
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_2;
binding(this, MessageQueueManager);
const items = [];
arraySpread(items, value, 0, items);
value = env1_5(MessageQueueManager);
binding = env1_4;
if (_isNativeReflectConstruct_121157()) {
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 = {LOGOUT: value.handleLogout};
return value;
}
function value_121162() { // fn#121162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15976:723, offset: 0x0253fdeb, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(importDefault(4862) /* metro dependency 4862: MessageQueue */).clear();
}
global.__d(_fun121156, 15768, [6, 7, 15, 17, 18, 4862, 4860,
2]) /* metro module 15768, dependencies: [6, 7, 15, 17, 18, 4862, 4860, 2] */;
@@ -1,20 +1,22 @@
/* Metro module 7152; source: modules/messages/MessageReactionsTypes.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun57267(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7330:6, offset: 0x013e1261, size: 189 bytes, params: 8, frame: 17
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {NORMAL: 0};
object2[0] = 'NORMAL';
object2.BURST = 1;
object2[1] = 'BURST';
object2.VOTE = 2;
object2[2] = 'VOTE';
object = {NORMAL: 0};
object[0] = 'NORMAL';
object.BURST = 1;
object[1] = 'BURST';
object.VOTE = 2;
object[2] = 'VOTE';
const Set = global.Set;
const NORMAL = object2.NORMAL;
const BURST = object2.BURST;
const NORMAL = object.NORMAL;
const BURST = object.BURST;
const set = new Set([NORMAL, BURST]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/MessageReactionsTypes.tsx');
exports.ReactionTypes = object2;
(FileImportTrackerModule).fileFinishedImporting('modules/messages/MessageReactionsTypes.tsx');
exports.ReactionTypes = object;
exports.NOTIFICATION_REACTION_TYPES = set;
}
global.__d(_fun57267, 7152, [2]) /* metro module 7152, dependencies: [2] */;
+460 -448
View File
@@ -1,7 +1,23 @@
/* Metro module 4625; source: modules/messages/MessageRecordUtils.tsx; dependencies: [4626, 3794, 1885, 1226, 3793, 1878, 4503, 661, 4627, 4096, 4634, 21, 4639, 4129, 4640, 3738, 4641, 4643, 2] */
import AuthenticationStore from '../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import MessageRecord from '../../records/MessageRecord.tsx'; /* Metro dependency 3794 */
import InteractionRecord from '../../records/InteractionRecord.tsx'; /* Metro dependency 4626 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as MessageRecordModule from '../../records/MessageRecord.tsx'; /* Metro dependency 3794 */
import * as GiftCodeUtilsModule from '../../utils/GiftCodeUtils.tsx'; /* Metro dependency 4129 */
import * as MessageConstantsModule from './MessageConstants.tsx'; /* Metro dependency 4503 */
import * as InteractionComponentUtilsModule from '../interaction_components/InteractionComponentUtils.tsx'; /* Metro dependency 4627 */
import * as UseMessageAuthorModule from './useMessageAuthor.tsx'; /* Metro dependency 4634 */
import * as IsMessageMentionedModule from './isMessageMentioned.tsx'; /* Metro dependency 4639 */
import * as EmbedUtilsModule from '../../utils/EmbedUtils.tsx'; /* Metro dependency 4641 */
import * as StickersUtilsModule from '../stickers/StickersUtils.tsx'; /* Metro dependency 4643 */
function _fun39774(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:6, offset: 0x010e9f9e, size: 429 bytes, params: 8, frame: 20
let env0_0 = require;
const closure = createMessageRecord;
const createMessageRecord2 = createMessageRecord;
const transformAttachments = function(a0) {
return a0.attachments == null ? [] : a0.attachments.map(_fun39779);
};
@@ -17,23 +33,13 @@ function _fun39774(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const interactionRecord = importDefault(4626) /* metro dependency 4626: InteractionRecord */;
let value = require(3794) /* metro dependency 3794: MessageRecord */;
let value = MessageRecordModule;
const env0_4 = value.MessageSnapshotRecord;
const env0_5 = value.MinimalMessageRecord;
const messageRecord = importDefault(3794) /* metro dependency 3794: MessageRecord */;
value = importDefault(1885) /* metro dependency 1885: UserRecord */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_11 = (require(4503) /* metro dependency 4503: MessageConstants */).SPOILER_ATTACHMENT_PREFIX;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_12 = constantsModule.MessageFlags;
const env0_13 = constantsModule.MessageTypes;
const env0_14 = constantsModule.MessageTypesSets;
value = new value({'id': '???', 'username': '???'});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/MessageRecordUtils.tsx');
exports.createMessageRecord = closure;
(FileImportTrackerModule).fileFinishedImporting('modules/messages/MessageRecordUtils.tsx');
exports.createMessageRecord = createMessageRecord2;
exports.updateServerMessage = function(a0, a1) {
var r4;
var r0;
@@ -55,241 +61,293 @@ function _fun39774(global, require, importDefault, importAll, module, exports, d
exports.updateMessageRecord = updateMessageRecord;
exports.canEditMessageWithStickers = canEditMessageWithStickers;
exports.hasEphemeralAppearance = hasEphemeralAppearance;
}
function createMinimalMessageRecord(a0) { // fn#39775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:357, offset: 0x010ea14b, size: 313 bytes, params: 2, frame: 18
var r5;
var r3;
var value;
const object2 = {};
copyDataProperties(object2, a0, undefined);
const Date = global.Date;
const timestamp = a0.timestamp;
const value2 = Object.create(Date.prototype, {constructor: {value: Date}});
let date = new Date(timestamp);
object2['timestamp'] = date instanceof Object ? date : value2;
const edited_timestamp = a0.edited_timestamp;
const value4 = null;
if (value4 != edited_timestamp) {
date = new global.Date(a0.edited_timestamp);
} else {
r5 = value4;
}
object2['editedTimestamp'] = r5;
object2['attachments'] = transformAttachments(a0);
object2['embeds'] = transformEmbeds(a0);
const interactionComponentUtilsModule = require(4627) /* metro dependency 4627: InteractionComponentUtils */;
const transformComponents = interactionComponentUtilsModule.transformComponents;
const components = a0.components;
object2['components'] = Reflect.apply(transformComponents, interactionComponentUtilsModule,
[value4 != components ? components : []]);
const NON_PARSED = MessageTypesSets.NON_PARSED;
if (NON_PARSED.has(a0.type)) {
r3 = [];
} else {
value = importDefault(4096) /* metro dependency 4096: findCodedLinks */;
value = value(a0.content);
r3 = value;
}
object2['codedLinks'] = r3;
value = Object.create(MinimalMessageRecord.prototype, {constructor: {value: MinimalMessageRecord}});
const minimalMessageRecord = new MinimalMessageRecord(object2);
return minimalMessageRecord instanceof Object ? minimalMessageRecord : value;
}
function createMessageRecord(a0) { // fn#39776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:719, offset: 0x010ea284, size: 1327 bytes, params: 2, frame: 34
var r21;
var r14;
var r13;
var r8;
var value5;
var userRecord;
var defaultImport;
var isProbablyAValidSnowflake;
var value11;
var defaultImport2;
var value12;
let value = a1;
const value2 = undefined;
const r0 = value !== value2 ? value : {};
let reactions = r0.reactions;
const interactionData = r0.interactionData;
const minimalMessageRecord = createMinimalMessageRecord(a0);
const mentions = a0.mentions;
const value3 = null;
let r19 = value3 == mentions ? value2 : mentions.map(function(a0) {
return a0.id;
});
r19 = value3 == r19 ? [] : r19;
const mention_roles = a0.mention_roles;
const r18 = value3 != mention_roles ? mention_roles : [];
const mention_channels = a0.mention_channels;
const r20 = value3 != mention_channels ? mention_channels : [];
const mention_games = a0.mention_games;
const r17 = value3 != mention_games ? mention_games : [];
const message_reference = a0.message_reference;
if (value3 == a0.author) {
r21 = env0_15;
} else if (value3 != a0.webhook_id) {
userRecord = new UserRecord(a0.author);
} else {
value5 = UserStore.getUser(a0.author.id);
if (value3 != value5) {
r21 = value5;
function createMinimalMessageRecord(a0) { // fn#39775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:357, offset: 0x010ea14b, size: 313 bytes, params: 2, frame: 18
var r5;
var r3;
var value;
const object = {};
copyDataProperties(object, a0, undefined);
const Date = global.Date;
const timestamp = a0.timestamp;
const value2 = Object.create(Date.prototype, {constructor: {value: Date}});
let date = new Date(timestamp);
object['timestamp'] = date instanceof Object ? date : value2;
const edited_timestamp = a0.edited_timestamp;
const value4 = null;
if (value4 != edited_timestamp) {
date = new global.Date(a0.edited_timestamp);
} else {
userRecord = new UserRecord(a0.author);
r5 = value4;
}
object['editedTimestamp'] = r5;
object['attachments'] = transformAttachments(a0);
object['embeds'] = transformEmbeds(a0);
const transformComponents = InteractionComponentUtilsModule.transformComponents;
const components = a0.components;
object['components'] = Reflect.apply(transformComponents, InteractionComponentUtilsModule,
[value4 != components ? components : []]);
const NON_PARSED = MessageTypesSets.NON_PARSED;
if (NON_PARSED.has(a0.type)) {
r3 = [];
} else {
value = importDefault(4096) /* metro dependency 4096: findCodedLinks */;
value = value(a0.content);
r3 = value;
}
object['codedLinks'] = r3;
value = Object.create(MinimalMessageRecord.prototype, {constructor: {value: MinimalMessageRecord}});
const minimalMessageRecord = new MinimalMessageRecord(object);
return minimalMessageRecord instanceof Object ? minimalMessageRecord : value;
}
const messageAuthor = (require(4634) /* metro dependency 4634: useMessageAuthor */).getMessageAuthor({channel_id: a0.channel_id,
author: r21});
const gift_info = value3 == a0 ? value2 : a0.gift_info;
const gifting_prompt = a0.gifting_prompt;
const r10 = value3 != a0.interaction ? InteractionRecord.createFromServer(a0.interaction) : value3;
let type = a0.type;
const THREAD_STARTER_MESSAGE = MessageTypes.THREAD_STARTER_MESSAGE;
const r24 = type !== THREAD_STARTER_MESSAGE || value3 == a0.referenced_message || value3 == a0.referenced_message.author ? value2 : a0.referenced_message.author.id;
let content = a0.content;
type = a0.type;
const PREMIUM_REFERRAL = MessageTypes.PREMIUM_REFERRAL;
if (type !== PREMIUM_REFERRAL) {
r14 = value2;
} else {
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
isProbablyAValidSnowflake = defaultImport.isProbablyAValidSnowflake;
content = a0.content;
content = Reflect.apply(isProbablyAValidSnowflake, defaultImport, [content]) ? a0.content : value2;
value11 = '';
r14 = content;
content = value11;
}
type = a0.type;
const PREMIUM_GROUP_INVITE = MessageTypes.PREMIUM_GROUP_INVITE;
if (type !== PREMIUM_GROUP_INVITE) {
r13 = value2;
} else {
defaultImport2 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
isProbablyAValidSnowflake = defaultImport2.isProbablyAValidSnowflake;
content = a0.content;
content = Reflect.apply(isProbablyAValidSnowflake, defaultImport2, [content]) ? a0.content : value2;
value12 = '';
r13 = content;
content = value12;
}
const object3 = {};
copyDataProperties(object3, a0, r24);
copyDataProperties(object3, messageAuthor, r24);
copyDataProperties(object3, minimalMessageRecord.toJS(), r24);
object3['author'] = r21;
object3['webhookId'] = a0.webhook_id;
object3['blocked'] = RelationshipStore.isBlockedForMessage(a0) || value3 != r24 && RelationshipStore.isBlocked(r24);
object3['ignored'] = RelationshipStore.isIgnoredForMessage(a0) || value3 != r24 && RelationshipStore.isIgnored(r24);
let mention_everyone = a0.mention_everyone;
object3['mentionEveryone'] = mention_everyone;
object3['mentions'] = r19;
object3['mentionRoles'] = r18;
object3['mentionChannels'] = r20;
object3['mentionGames'] = r17;
object3['messageReference'] = message_reference;
const isMessageMentionedModule = require(4639) /* metro dependency 4639: isMessageMentioned */;
const isMentioned = isMessageMentionedModule.isMentioned;
const object4 = {};
object4.userId = AuthenticationStore.getId();
object4.channelId = a0.channel_id;
mention_everyone = a0.mention_everyone;
object4.mentionEveryone = value3 != mention_everyone && mention_everyone;
object4.mentionUsers = r19;
object4.mentionRoles = r18;
object3['mentioned'] = Reflect.apply(isMentioned, isMessageMentionedModule, [object4]);
const isGiftCodeEmbed2 = (require(4129) /* metro dependency 4129: GiftCodeUtils */).isGiftCodeEmbed(a0);
const giftCodeUtilsModule = require(4129) /* metro dependency 4129: GiftCodeUtils */;
const findGiftCodes = giftCodeUtilsModule.findGiftCodes;
object3['giftCodes'] = isGiftCodeEmbed2 ? Reflect.apply(findGiftCodes, giftCodeUtilsModule,
[value3 == a0 ? value2 : a0.embeds[0].url]) : Reflect.apply(findGiftCodes, giftCodeUtilsModule, [a0.content]);
object3['content'] = content;
object3['referralTrialOfferId'] = r14;
object3['premiumGroupInviteId'] = r13;
object3['call'] = transformMessageCall(a0.call, minimalMessageRecord.timestamp);
object3['messageSnapshots'] = transformMessageSnapshots(a0);
const transformReactionsBinding = transformReactions;
reactions = value3 == reactions ? a0.reactions : reactions;
object3['reactions'] = transformReactionsBinding(reactions, a0.poll);
object3['interaction'] = r10;
object3['interactionData'] = value3 != interactionData ? interactionData : a0.interaction_data;
object3['interactionMetadata'] = a0.interaction_metadata;
object3['roleSubscriptionData'] = a0.role_subscription_data;
object3['purchaseNotification'] = a0.purchase_notification;
if (value3 == a0.poll) {
r8 = value2;
} else {
value = importDefault(4640) /* metro dependency 4640: transformMessagPoll */;
value = value(a0.poll);
r8 = value;
}
object3['poll'] = r8;
object3['sharedClientTheme'] = a0.shared_client_theme;
object3['giftInfo'] = value3 == gift_info ? value2 : gift_info;
object3['giftingPrompt'] = gifting_prompt;
object3['boostingPrompt'] = a0.boosting_prompt;
value = Object.create(MessageRecord.prototype, {constructor: {value: MessageRecord}});
const messageRecord = new MessageRecord();
return messageRecord instanceof Object ? messageRecord : value;
}
function transformAttachments(a0) { // fn#39778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:2833, offset: 0x010ea7b3, size: 46 bytes, params: 2, frame: 11
return a0.attachments == null ? [] : a0.attachments.map(_fun39779);
}
function createMessageRecord(a0) { // fn#39776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:719, offset: 0x010ea284, size: 1327 bytes, params: 2, frame: 34
var r21;
var r14;
var r13;
var r8;
var userStoreBinding;
var value5;
var userRecord2;
var userRecord3;
var defaultImport;
var isProbablyAValidSnowflake;
var value11;
var defaultImport2;
var value12;
let value = a1;
const value2 = undefined;
const r0 = value !== value2 ? value : {};
let reactions = r0.reactions;
const interactionData = r0.interactionData;
const minimalMessageRecord = createMinimalMessageRecord(a0);
const mentions = a0.mentions;
const value3 = null;
let r19 = value3 == mentions ? value2 : mentions.map(function(a0) {
return a0.id;
});
r19 = value3 == r19 ? [] : r19;
const mention_roles = a0.mention_roles;
const r18 = value3 != mention_roles ? mention_roles : [];
const mention_channels = a0.mention_channels;
const r20 = value3 != mention_channels ? mention_channels : [];
const mention_games = a0.mention_games;
const r17 = value3 != mention_games ? mention_games : [];
const message_reference = a0.message_reference;
if (value3 == a0.author) {
r21 = env0_15;
} else if (value3 != a0.webhook_id) {
userRecord3 = new userRecord(a0.author);
} else {
userStoreBinding = UserStore;
value5 = userStoreBinding.getUser(a0.author.id);
if (value3 != value5) {
r21 = value5;
} else {
userRecord2 = new userRecord(a0.author);
}
}
const messageAuthor = (UseMessageAuthorModule).getMessageAuthor({channel_id: a0.channel_id,
author: r21});
const gift_info = value3 == a0 ? value2 : a0.gift_info;
const gifting_prompt = a0.gifting_prompt;
const r10 = value3 != a0.interaction ? InteractionRecord.createFromServer(a0.interaction) : value3;
let type = a0.type;
const THREAD_STARTER_MESSAGE = MessageTypes.THREAD_STARTER_MESSAGE;
const r24 = type !== THREAD_STARTER_MESSAGE || value3 == a0.referenced_message || value3 == a0.referenced_message.author ? value2 : a0.referenced_message.author.id;
let content = a0.content;
type = a0.type;
const PREMIUM_REFERRAL = MessageTypes.PREMIUM_REFERRAL;
if (type !== PREMIUM_REFERRAL) {
r14 = value2;
} else {
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
isProbablyAValidSnowflake = defaultImport.isProbablyAValidSnowflake;
content = a0.content;
content = Reflect.apply(isProbablyAValidSnowflake, defaultImport, [content]) ? a0.content : value2;
value11 = '';
r14 = content;
content = value11;
}
type = a0.type;
const PREMIUM_GROUP_INVITE = MessageTypes.PREMIUM_GROUP_INVITE;
if (type !== PREMIUM_GROUP_INVITE) {
r13 = value2;
} else {
defaultImport2 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
isProbablyAValidSnowflake = defaultImport2.isProbablyAValidSnowflake;
content = a0.content;
content = Reflect.apply(isProbablyAValidSnowflake, defaultImport2, [content]) ? a0.content : value2;
value12 = '';
r13 = content;
content = value12;
}
const messageRecordBinding = MessageRecord;
const object = {};
copyDataProperties(object, a0, r24);
copyDataProperties(object, messageAuthor, r24);
copyDataProperties(object, minimalMessageRecord.toJS(), r24);
object['author'] = r21;
object['webhookId'] = a0.webhook_id;
object['blocked'] = RelationshipStore.isBlockedForMessage(a0) || value3 != r24 && RelationshipStore.isBlocked(r24);
object['ignored'] = RelationshipStore.isIgnoredForMessage(a0) || value3 != r24 && RelationshipStore.isIgnored(r24);
let mention_everyone = a0.mention_everyone;
object['mentionEveryone'] = mention_everyone;
object['mentions'] = r19;
object['mentionRoles'] = r18;
object['mentionChannels'] = r20;
object['mentionGames'] = r17;
object['messageReference'] = message_reference;
const isMentioned = IsMessageMentionedModule.isMentioned;
const object2 = {};
object2.userId = AuthenticationStore.getId();
object2.channelId = a0.channel_id;
mention_everyone = a0.mention_everyone;
object2.mentionEveryone = value3 != mention_everyone && mention_everyone;
object2.mentionUsers = r19;
object2.mentionRoles = r18;
object['mentioned'] = Reflect.apply(isMentioned, IsMessageMentionedModule, [object2]);
const isGiftCodeEmbed2 = (GiftCodeUtilsModule).isGiftCodeEmbed(a0);
const findGiftCodes = GiftCodeUtilsModule.findGiftCodes;
object['giftCodes'] = isGiftCodeEmbed2 ? Reflect.apply(findGiftCodes, GiftCodeUtilsModule,
[value3 == a0 ? value2 : a0.embeds[0].url]) : Reflect.apply(findGiftCodes, GiftCodeUtilsModule, [a0.content]);
object['content'] = content;
object['referralTrialOfferId'] = r14;
object['premiumGroupInviteId'] = r13;
object['call'] = transformMessageCall(a0.call, minimalMessageRecord.timestamp);
object['messageSnapshots'] = transformMessageSnapshots(a0);
const transformReactionsBinding = transformReactions;
reactions = value3 == reactions ? a0.reactions : reactions;
object['reactions'] = transformReactionsBinding(reactions, a0.poll);
object['interaction'] = r10;
object['interactionData'] = value3 != interactionData ? interactionData : a0.interaction_data;
object['interactionMetadata'] = a0.interaction_metadata;
object['roleSubscriptionData'] = a0.role_subscription_data;
object['purchaseNotification'] = a0.purchase_notification;
if (value3 == a0.poll) {
r8 = value2;
} else {
value = importDefault(4640) /* metro dependency 4640: transformMessagPoll */;
value = value(a0.poll);
r8 = value;
}
object['poll'] = r8;
object['sharedClientTheme'] = a0.shared_client_theme;
object['giftInfo'] = value3 == gift_info ? value2 : gift_info;
object['giftingPrompt'] = gifting_prompt;
object['boostingPrompt'] = a0.boosting_prompt;
value = Object.create(messageRecordBinding.prototype, {constructor: {value: messageRecordBinding}});
const messageRecord2 = new messageRecordBinding();
return messageRecord2 instanceof Object ? messageRecord2 : value;
}
function transformMessageCall(a0, a1) { // fn#39780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:2962, offset: 0x010ea813, size: 174 bytes, params: 3, frame: 16
var r2;
var r1;
var ended_timestamp;
var defaultImport;
var Date;
var value3;
var date;
let value = null;
if (value != a0) {
ended_timestamp = a0.ended_timestamp;
if (value != ended_timestamp) {
defaultImport = importDefault(3738) /* metro dependency 3738 */;
Date = global.Date;
function transformAttachments(a0) { // fn#39778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:2833, offset: 0x010ea7b3, size: 46 bytes, params: 2, frame: 11
return a0.attachments == null ? [] : a0.attachments.map(_fun39779);
function _fun39779(a0) { // fn#39779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:2915, offset: 0x010ea7e1, size: 50 bytes, params: 2, frame: 13
const object = {};
copyDataProperties(object, a0, undefined);
const filename = a0.filename;
const startsWith = filename.startsWith;
const value = environment.__proto__;
object['spoiler'] = Reflect.apply(startsWith, filename, [SPOILER_ATTACHMENT_PREFIX]);
return object;
}
}
function transformMessageCall(a0, a1) { // fn#39780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:2962, offset: 0x010ea813, size: 174 bytes, params: 3, frame: 16
var r2;
var r1;
var ended_timestamp;
var defaultImport;
var Date;
var value3;
var date;
let value = null;
if (value != a0) {
ended_timestamp = a0.ended_timestamp;
value3 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
r2 = defaultImport(date instanceof Object ? date : value3);
} else {
r2 = value;
if (value != ended_timestamp) {
defaultImport = importDefault(3738) /* metro dependency 3738 */;
Date = global.Date;
ended_timestamp = a0.ended_timestamp;
value3 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
r2 = defaultImport(date instanceof Object ? date : value3);
} else {
r2 = value;
}
if (value != r2) {
value = importDefault(3738) /* metro dependency 3738 */;
value = value.duration(r2.diff(a1));
r1 = value;
} else {
r1 = value;
}
return {participants: a0.participants, endedTimestamp: r2, duration: r1};
}
if (value != r2) {
value = importDefault(3738) /* metro dependency 3738 */;
value = value.duration(r2.diff(a1));
r1 = value;
} else {
r1 = value;
return value;
}
function transformEmbeds(a0) { // fn#39781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:3202, offset: 0x010ea8c1, size: 86 bytes, params: 2, frame: 12
const env0_0 = a0;
if (a0.embeds == null) {
return [];
}
return (EmbedUtilsModule).mergeEmbedsOnURL(a0.embeds.map(_fun39782));
function _fun39782(a0) { // fn#39782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:3277, offset: 0x010ea917, size: 60 bytes, params: 2, frame: 15
let value = environment.__proto__;
value = require(4641) /* metro dependency 4641: EmbedUtils */;
const sanitizeEmbed = value.sanitizeEmbed;
const binding = env0_0;
return Reflect.apply(sanitizeEmbed, value, [binding.channel_id, binding.id, a0]);
}
return {participants: a0.participants, endedTimestamp: r2, duration: r1};
}
return value;
}
function transformEmbeds(a0) { // fn#39781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:3202, offset: 0x010ea8c1, size: 86 bytes, params: 2, frame: 12
const env0_0 = a0;
if (a0.embeds == null) {
return [];
}
return (require(4641) /* metro dependency 4641: EmbedUtils */).mergeEmbedsOnURL(a0.embeds.map(_fun39782));
}
function transformReactions(a0, a1) { // fn#39783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:3364, offset: 0x010ea953, size: 148 bytes, params: 3, frame: 17
var r6;
var results;
var r3;
var r5;
var value3;
var answer_counts;
var items2;
let value = a0;
if (value != null) {
function transformReactions(a0, a1) { // fn#39783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:3364, offset: 0x010ea953, size: 148 bytes, params: 3, frame: 17
var r6;
var results;
var r3;
var r5;
var value3;
var answer_counts;
var items2;
let value = a0;
if (value != null) {
value3 = undefined;
if (a1 == null) {
r3 = value3;
} else {
results = a1.results;
if (results == null) {
r3 = value3;
} else {
answer_counts = results.answer_counts;
r3 = answer_counts.map(function(a0) {
var object = {};
object.count_details = {vote: a0.count};
object.me_vote = a0.me_voted;
var object3 = {'id': null, 'name': '', 'animated': false};
object3.id = a0.id.toString();
object.emoji = object3;
object.me = false;
object.me_burst = false;
object.count = a0.count;
object.burst_count = 0;
return object;
});
r6 = answer_counts;
}
}
r5 = value ?? [];
items2 = [];
value = arraySpread(items2, r5, 0, r6);
r3 = r3 ?? [];
arraySpread(items2, r3, value, r6);
return items2.map(_fun39785);
}
if (a1?.results == null) {
return [];
}
value3 = undefined;
if (a1 == null) {
r3 = value3;
@@ -320,234 +378,188 @@ function transformReactions(a0, a1) { // fn#39783, source: /ci/build/discord/dis
value = arraySpread(items2, r5, 0, r6);
r3 = r3 ?? [];
arraySpread(items2, r3, value, r6);
return items2.map(_fun39785);
}
if (a1?.results == null) {
return [];
}
value3 = undefined;
if (a1 == null) {
r3 = value3;
} else {
results = a1.results;
if (results == null) {
r3 = value3;
} else {
answer_counts = results.answer_counts;
r3 = answer_counts.map(function(a0) {
var object = {};
object.count_details = {vote: a0.count};
object.me_vote = a0.me_voted;
var object3 = {'id': null, 'name': '', 'animated': false};
object3.id = a0.id.toString();
object.emoji = object3;
object.me = false;
object.me_burst = false;
object.count = a0.count;
return items2.map(function(a0) {
var r5;
var property;
var object = {};
copyDataProperties(object, a0, r5);
var value = undefined;
if ((object == null ? value : object.count_details) != null) {
property = object.count_details.burst;
value = 0;
object.burst_count = property ?? value;
property = object.count_details.normal;
object.count = property ?? value;
}
if (object.count < 0) {
object.count = 0;
}
if (object.burst_count < 0) {
object.burst_count = 0;
return object;
});
r6 = answer_counts;
}
}
r5 = value ?? [];
items2 = [];
value = arraySpread(items2, r5, 0, r6);
r3 = r3 ?? [];
arraySpread(items2, r3, value, r6);
return items2.map(function(a0) {
var r5;
var property;
var object = {};
copyDataProperties(object, a0, r5);
var value = undefined;
if ((object == null ? value : object.count_details) != null) {
property = object.count_details.burst;
value = 0;
object.burst_count = property ?? value;
property = object.count_details.normal;
object.count = property ?? value;
}
if (object.count < 0) {
object.count = 0;
}
if (object.burst_count < 0) {
object.burst_count = 0;
}
return object;
});
}
function transformMessageSnapshots(a0) { // fn#39786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:3943, offset: 0x010eaacf, size: 46 bytes, params: 2, frame: 11
return a0.message_snapshots == null ? [] : a0.message_snapshots.map(_fun39787);
}
function updateMessageRecord(a0, a1) { // fn#39789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:4449, offset: 0x010eab9a, size: 960 bytes, params: 3, frame: 19
var r1;
var r2;
var r8;
var set;
var author;
var value23;
var userRecord;
var moduleValue;
var transformReactionsBinding;
var defaultImport;
var object2;
let value = a0;
if (a1.edited_timestamp != null) {
return createMessageRecord(a1, {reactions: value.reactions, interactionData: value.interactionData});
}
let r6 = a1.call == null ? value : value.set('call', transformMessageCall(a1.call, value.timestamp));
let r7 = a1.attachments == null ? r6 : r6.set('attachments', transformAttachments(a1));
r6 = a1.application == null ? r7 : r7.set('application', a1.application);
r7 = a1.activity == null ? r6 : r6.set('activity', a1.activity);
r6 = a1.content != null && a1.content !== '' ? r7.set('content', a1.content) : r7;
r7 = a1.embeds == null ? r6 : r6.set('embeds', transformEmbeds(a1));
r6 = a1.message_snapshots == null ? r7 : r7.set('messageSnapshots', transformMessageSnapshots(a1));
r7 = a1.pinned === r6.pinned ? r6 : r6.set('pinned', a1.pinned);
if (r7.webhookId != null && a1.author != null) {
set = r7.set;
author = a1.author;
value23 = Object.create(UserRecord.prototype, {constructor: {value: UserRecord}});
userRecord = new UserRecord();
r6 = Reflect.apply(set, r7, ['author', userRecord instanceof Object ? userRecord : value23]);
} else {
r6 = r7;
}
r7 = a1.flags != null && a1.flags !== r6.flags ? r6.set('flags', a1.flags) : r6;
if (a1.components == null) {
r6 = r7;
} else {
set = r7.set;
moduleValue = require(4627) /* metro dependency 4627: InteractionComponentUtils */;
r6 = Reflect.apply(set, r7, ['components', moduleValue.transformComponents(a1.components)]);
}
r7 = a1.role_subscription_data == null ? r6 : r6.set('roleSubscriptionData', a1.role_subscription_data);
let reactions = a1.reactions;
if (reactions == null) {
r6 = r7;
} else {
set = r7.set;
transformReactionsBinding = transformReactions;
reactions = value.reactions;
reactions = reactions ?? a1.reactions;
value = transformReactionsBinding(reactions);
value = Reflect.apply(set, r7, ['reactions', value]);
r6 = value;
}
if (a1.poll == null) {
r7 = r6;
} else {
set = r6.set;
value = importDefault(4640) /* metro dependency 4640: transformMessagPoll */;
value = value(a1.poll);
value = Reflect.apply(set, r6, ['poll', value]);
r7 = value;
}
const mentions = a1.mentions;
value = false;
if (mentions != null) {
set = r7.set;
value = a1.mentions.map(function(a0) {
return a0.id;
}
return object;
});
value = Reflect.apply(set, r7, ['mentions', value]);
r2 = true;
r8 = value;
} else {
r2 = value;
r8 = r7;
}
if (a1.mention_everyone == null) {
r7 = r8;
} else {
value = r8.set('mentionEveryone', a1.mention_everyone);
r2 = true;
r7 = value;
function transformMessageSnapshots(a0) { // fn#39786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:3943, offset: 0x010eaacf, size: 46 bytes, params: 2, frame: 11
return a0.message_snapshots == null ? [] : a0.message_snapshots.map(_fun39787);
function _fun39787({message, moderator_report}) { // fn#39787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:4042, offset: 0x010eaafd, size: 68 bytes, params: 2, frame: 14
let value = environment.__proto__;
const object = {};
object.message = createMinimalMessageRecord(message);
object.moderator_report = moderator_report;
value = Object.create(MessageSnapshotRecord.prototype, {constructor: {value: MessageSnapshotRecord}});
const messageSnapshotRecord = new MessageSnapshotRecord(object);
return messageSnapshotRecord instanceof Object ? messageSnapshotRecord : value;
}
}
if (a1.mention_roles == null) {
r6 = r7;
} else {
value = r7.set('mentionRoles', a1.mention_roles);
r2 = true;
r6 = value;
function updateMessageRecord(a0, a1) { // fn#39789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:4449, offset: 0x010eab9a, size: 960 bytes, params: 3, frame: 19
var r1;
var r2;
var r8;
var set;
var author;
var userRecordBinding;
var value23;
var userRecord2;
var moduleValue;
var transformReactionsBinding;
var defaultImport;
var object;
let value = a0;
if (a1.edited_timestamp != null) {
return createMessageRecord(a1, {reactions: value.reactions, interactionData: value.interactionData});
}
let r6 = a1.call == null ? value : value.set('call', transformMessageCall(a1.call, value.timestamp));
let r7 = a1.attachments == null ? r6 : r6.set('attachments', transformAttachments(a1));
r6 = a1.application == null ? r7 : r7.set('application', a1.application);
r7 = a1.activity == null ? r6 : r6.set('activity', a1.activity);
r6 = a1.content != null && a1.content !== '' ? r7.set('content', a1.content) : r7;
r7 = a1.embeds == null ? r6 : r6.set('embeds', transformEmbeds(a1));
r6 = a1.message_snapshots == null ? r7 : r7.set('messageSnapshots', transformMessageSnapshots(a1));
r7 = a1.pinned === r6.pinned ? r6 : r6.set('pinned', a1.pinned);
if (r7.webhookId != null && a1.author != null) {
set = r7.set;
userRecordBinding = userRecord;
author = a1.author;
value23 = Object.create(userRecordBinding.prototype, {constructor: {value: userRecordBinding}});
userRecord2 = new userRecordBinding();
r6 = Reflect.apply(set, r7, ['author', userRecord2 instanceof Object ? userRecord2 : value23]);
} else {
r6 = r7;
}
r7 = a1.flags != null && a1.flags !== r6.flags ? r6.set('flags', a1.flags) : r6;
if (a1.components == null) {
r6 = r7;
} else {
set = r7.set;
moduleValue = require(4627) /* metro dependency 4627: InteractionComponentUtils */;
r6 = Reflect.apply(set, r7, ['components', moduleValue.transformComponents(a1.components)]);
}
r7 = a1.role_subscription_data == null ? r6 : r6.set('roleSubscriptionData', a1.role_subscription_data);
let reactions = a1.reactions;
if (reactions == null) {
r6 = r7;
} else {
set = r7.set;
transformReactionsBinding = transformReactions;
reactions = value.reactions;
reactions = reactions ?? a1.reactions;
value = transformReactionsBinding(reactions);
value = Reflect.apply(set, r7, ['reactions', value]);
r6 = value;
}
if (a1.poll == null) {
r7 = r6;
} else {
set = r6.set;
value = importDefault(4640) /* metro dependency 4640: transformMessagPoll */;
value = value(a1.poll);
value = Reflect.apply(set, r6, ['poll', value]);
r7 = value;
}
const mentions = a1.mentions;
value = false;
if (mentions != null) {
set = r7.set;
value = a1.mentions.map(function(a0) {
return a0.id;
});
value = Reflect.apply(set, r7, ['mentions', value]);
r2 = true;
r8 = value;
} else {
r2 = value;
r8 = r7;
}
if (a1.mention_everyone == null) {
r7 = r8;
} else {
value = r8.set('mentionEveryone', a1.mention_everyone);
r2 = true;
r7 = value;
}
if (a1.mention_roles == null) {
r6 = r7;
} else {
value = r7.set('mentionRoles', a1.mention_roles);
r2 = true;
r6 = value;
}
if (r2) {
set = r6.set;
defaultImport = importDefault(4639) /* metro dependency 4639: isMessageMentioned */;
object = {message: r6};
object.userId = AuthenticationStore.getId();
value = defaultImport(object);
value = Reflect.apply(set, r6, ['mentioned', value]);
r1 = value;
} else {
r1 = r6;
}
return r1;
}
if (r2) {
set = r6.set;
defaultImport = importDefault(4639) /* metro dependency 4639: isMessageMentioned */;
object2 = {message: r6};
object2.userId = AuthenticationStore.getId();
value = defaultImport(object2);
value = Reflect.apply(set, r6, ['mentioned', value]);
r1 = value;
} else {
r1 = r6;
function canEditMessageWithStickers(a0) { // fn#39791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:5904, offset: 0x010eaf5a, size: 68 bytes, params: 2, frame: 12
var value;
const getMessageStickers = (StickersUtilsModule).getMessageStickers;
value = Reflect.apply(getMessageStickers, value, [a0]).length === 0;
return value || a0.content !== '';
}
return r1;
}
function canEditMessageWithStickers(a0) { // fn#39791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:5904, offset: 0x010eaf5a, size: 68 bytes, params: 2, frame: 12
var value;
const getMessageStickers = (require(4643) /* metro dependency 4643: StickersUtils */).getMessageStickers;
value = Reflect.apply(getMessageStickers, value, [a0]).length === 0;
return value || a0.content !== '';
}
function hasEphemeralAppearance(a0) { // fn#39792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:5991, offset: 0x010eaf9e, size: 51 bytes, params: 2, frame: 12
const hasFlag = a0.hasFlag;
const EPHEMERAL = MessageFlags.EPHEMERAL;
return Reflect.apply(hasFlag, a0, [EPHEMERAL]) && a0.type !== MessageTypes.IN_GAME_MESSAGE_NUX;
}
function hasEphemeralAppearance(a0) { // fn#39792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:5991, offset: 0x010eaf9e, size: 51 bytes, params: 2, frame: 12
const hasFlag = a0.hasFlag;
const EPHEMERAL = MessageFlags.EPHEMERAL;
return Reflect.apply(hasFlag, a0, [EPHEMERAL]) && a0.type !== MessageTypes.IN_GAME_MESSAGE_NUX;
}
function _fun39779(a0) { // fn#39779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:2915, offset: 0x010ea7e1, size: 50 bytes, params: 2, frame: 13
const object2 = {};
copyDataProperties(object2, a0, undefined);
const filename = a0.filename;
const startsWith = filename.startsWith;
const value = environment.__proto__;
object2['spoiler'] = Reflect.apply(startsWith, filename, [SPOILER_ATTACHMENT_PREFIX]);
return object2;
}
function _fun39782(a0) { // fn#39782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:3277, offset: 0x010ea917, size: 60 bytes, params: 2, frame: 15
let value = environment.__proto__;
value = require(4641) /* metro dependency 4641: EmbedUtils */;
const sanitizeEmbed = value.sanitizeEmbed;
const binding = env0_0;
return Reflect.apply(sanitizeEmbed, value, [binding.channel_id, binding.id, a0]);
}
function _fun39785(a0) { // fn#39785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:3715, offset: 0x010eaa4f, size: 128 bytes, params: 2, frame: 15
var burst;
const object2 = {};
copyDataProperties(object2, a0, undefined);
const object = {};
copyDataProperties(object, a0, undefined);
let value = undefined;
let count_details = object2 == null ? value : object2.count_details;
let count_details = object == null ? value : object.count_details;
if (count_details != null) {
count_details = object2.count_details;
count_details = object.count_details;
burst = count_details.burst;
value = 0;
object2.burst_count = burst ?? value;
count_details = object2.count_details;
object2.count = count_details.normal ?? value;
object.burst_count = burst ?? value;
count_details = object.count_details;
object.count = count_details.normal ?? value;
}
if (object2.count < 0) {
object2.count = 0;
if (object.count < 0) {
object.count = 0;
}
if (object2.burst_count < 0) {
object2.burst_count = 0;
if (object.burst_count < 0) {
object.burst_count = 0;
}
return object2;
}
function _fun39787({message, moderator_report}) { // fn#39787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:4042, offset: 0x010eaafd, size: 68 bytes, params: 2, frame: 14
let value = environment.__proto__;
const object2 = {};
object2.message = createMinimalMessageRecord(message);
object2.moderator_report = moderator_report;
value = Object.create(MessageSnapshotRecord.prototype, {constructor: {value: MessageSnapshotRecord}});
const messageSnapshotRecord = new MessageSnapshotRecord(object2);
return messageSnapshotRecord instanceof Object ? messageSnapshotRecord : value;
return object;
}
global.__d(_fun39774, 4625, [4626, 3794, 1885, 1226, 3793, 1878, 4503, 661, 4627, 4096, 4634, 21, 4639, 4129, 4640,
3738, 4641, 4643,
2]) /* metro module 4625, dependencies: [4626, 3794, 1885, 1226, 3793, 1878, 4503, 661, 4627, 4096, 4634, 21, 4639, 4129, 4640, 3738, 4641, 4643, 2] */;
@@ -1,4 +1,17 @@
/* Metro module 7070; source: modules/messages/MessageRoundtripTrackerStore.tsx; dependencies: [6, 7, 15, 17, 18, 1379, 4111, 4401, 661, 3, 4873, 683, 7071, 566, 694, 2] */
import Logger from '../debug/Logger.tsx'; /* Metro dependency 3 */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildMemberCountStore from '../../stores/GuildMemberCountStore.tsx'; /* Metro dependency 4111 */
import NetworkStore from '../../stores/NetworkStore.tsx'; /* Metro dependency 4401 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun56334(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7248:6, offset: 0x013c52ba, size: 393 bytes, params: 8, frame: 19
const env0_0 = require;
const isCompleted = function(a0) {
@@ -6,204 +19,199 @@ function _fun56334(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildMemberCountStore = importDefault(4111) /* metro dependency 4111: GuildMemberCountStore */;
const networkStore = importDefault(4401) /* metro dependency 4401: NetworkStore */;
const env0_11 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
let value = importDefault(3) /* metro dependency 3: Logger */;
let value = Logger;
value = new value('MessageRoundtripTrackerStore');
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
value = _fun56340(Store);
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {MESSAGE_CREATE: MESSAGE_CREATE_56347});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/MessageRoundtripTrackerStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/MessageRoundtripTrackerStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_56335() { // fn#56335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7248:203, offset: 0x013c5443, size: 94 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_56335_isNativeReflectConstruct = function() {
return !!result;
})();
}
function trackRoundtrip(a0) { // fn#56339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7248:537, offset: 0x013c54bf, size: 440 bytes, params: 2, frame: 24
var r11;
var r10;
var binding;
var signalStrength;
var defaultImport;
var track;
var SEND_MESSAGE_ROUNDTRIP;
var object2;
var guild_id;
var getMemberCount;
var value;
const basicChannel = ChannelStore.getBasicChannel(a0.channelId);
const value3 = null;
if (value3 != basicChannel) {
if (!(global.Math.random() > 0.1)) {
r11 = value3 == a0.apiResponseTimestamp ? value3 : a0.apiResponseTimestamp - a0.initialSendTimestamp;
r10 = value3 == a0.gatewaySeenTimestamp ? value3 : a0.gatewaySeenTimestamp - a0.initialSendTimestamp;
signalStrength = require(dependencyMap[10]).getSignalStrength();
defaultImport = importDefault(dependencyMap[11]);
track = defaultImport.track;
SEND_MESSAGE_ROUNDTRIP = AnalyticEvents.SEND_MESSAGE_ROUNDTRIP;
object2 = {};
copyDataProperties(object2, importDefault(dependencyMap[12])(), dependencyMap);
object2['api_latency_ms'] = r11;
object2['gateway_latency_ms'] = r10;
object2['channel_id'] = basicChannel.id;
object2['channel_type'] = basicChannel.type;
guild_id = basicChannel.guild_id;
object2['guild_id'] = guild_id;
getMemberCount = GuildMemberCountStore.getMemberCount;
guild_id = basicChannel.guild_id;
object2['guild_size'] = Reflect.apply(getMemberCount, GuildMemberCountStore, [guild_id]);
value = NetworkStore.getType();
object2['mobile_network_type'] = value;
object2['num_attachments'] = a0.attachmentCount;
value = value3 != signalStrength;
copyDataProperties(object2, value && ({mobile_signal_strength_level: signalStrength}), dependencyMap);
Reflect.apply(track, defaultImport, [SEND_MESSAGE_ROUNDTRIP, object2]);
function _isNativeReflectConstruct_56335() { // fn#56335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7248:203, offset: 0x013c5443, size: 94 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) {
}
} else {
binding = env0_12;
binding.warn('Ignoring a messageData for channel ' + a0.channelId + " because we can't find that channel.");
return (_isNativeReflectConstruct_56335_isNativeReflectConstruct = function() {
return !!result;
})();
}
}
function _fun56340(a0) { // fn#56340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7248:1250, offset: 0x013c5677, size: 143 bytes, params: 2, frame: 16
const closure = MessageRoundtripTrackerStoreClass;
env0_7(closure, a0);
return env0_4(closure, [{key: 'initialize', value: function() {
this.waitFor(ChannelStore, GuildMemberCountStore, NetworkStore);
}}, {key: 'recordMessageSendAttempt', value: value_56343}, {key: 'recordMessageSendApiResponse',
value: value_56345}, {key: 'recordGatewayResponse', value: value_56346}]);
}
function MESSAGE_CREATE_56347({optimistic, message}) { // fn#56347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7248:2700, offset: 0x013c59b3, size: 56 bytes, params: 2, frame: 11
const nonce = message.nonce;
if (!(optimistic || nonce == null)) {
env0_13.recordGatewayResponse(nonce);
}
}
function MessageRoundtripTrackerStoreClass(a0) { // fn#56341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7248:1262, offset: 0x013c5706, size: 160 bytes, params: 2, frame: 19
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, MessageRoundtripTrackerStoreClass);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(MessageRoundtripTrackerStoreClass);
binding = env1_5;
if (_isNativeReflectConstruct_56335()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
const Map = global.Map;
const value4 = Object.create(Map.prototype, {constructor: {value: Map}});
const map = new Map();
value.pendingMessages = map instanceof Object ? map : value4;
return value;
}
function value_56343(a0, a1) { // fn#56343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7248:1753, offset: 0x013c57a6, size: 188 bytes, params: 3, frame: 19
let value = a2;
const env0_1 = a1;
const value2 = undefined;
const r5 = value !== value2 ? value : {};
const attachments = r5.attachments;
const r2 = (attachments == null ? value2 : attachments.length) ?? 0;
const attachmentsToUpload = r5.attachmentsToUpload;
value = r2 + ((attachmentsToUpload == null ? value2 : attachmentsToUpload.length) ?? value);
const object2 = {'initialSendTimestamp': null, 'apiResponseTimestamp': null, 'gatewaySeenTimestamp': null};
const Date = global.Date;
object2.initialSendTimestamp = Date.now();
object2.channelId = a0;
object2.attachmentCount = value;
this.pendingMessages.set(a1, object2);
global.setTimeout(_fun56344, 30000);
return value2;
}
function value_56345(a0) { // fn#56345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7248:2216, offset: 0x013c58ad, size: 131 bytes, params: 2, frame: 16
var object2;
let value = this.pendingMessages.get(a0);
if (value != null) {
object2 = {};
copyDataProperties(object2, value, undefined);
value = global.Date.now();
object2['apiResponseTimestamp'] = value;
value = environment.__proto__;
if (isCompleted(object2)) {
trackRoundtrip(object2);
this.pendingMessages.delete(a0);
function trackRoundtrip(a0) { // fn#56339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7248:537, offset: 0x013c54bf, size: 440 bytes, params: 2, frame: 24
var r11;
var r10;
var binding;
var signalStrength;
var defaultImport;
var track;
var SEND_MESSAGE_ROUNDTRIP;
var object;
var guild_id;
var guildMemberCountStoreBinding;
var getMemberCount;
var value;
const basicChannel = ChannelStore.getBasicChannel(a0.channelId);
const value3 = null;
if (value3 != basicChannel) {
if (!(global.Math.random() > 0.1)) {
r11 = value3 == a0.apiResponseTimestamp ? value3 : a0.apiResponseTimestamp - a0.initialSendTimestamp;
r10 = value3 == a0.gatewaySeenTimestamp ? value3 : a0.gatewaySeenTimestamp - a0.initialSendTimestamp;
signalStrength = require(dependencyMap[10]).getSignalStrength();
defaultImport = importDefault(dependencyMap[11]);
track = defaultImport.track;
SEND_MESSAGE_ROUNDTRIP = AnalyticEvents.SEND_MESSAGE_ROUNDTRIP;
object = {};
copyDataProperties(object, importDefault(dependencyMap[12])(), dependencyMap);
object['api_latency_ms'] = r11;
object['gateway_latency_ms'] = r10;
object['channel_id'] = basicChannel.id;
object['channel_type'] = basicChannel.type;
guild_id = basicChannel.guild_id;
object['guild_id'] = guild_id;
guildMemberCountStoreBinding = GuildMemberCountStore;
getMemberCount = guildMemberCountStoreBinding.getMemberCount;
guild_id = basicChannel.guild_id;
object['guild_size'] = Reflect.apply(getMemberCount, guildMemberCountStoreBinding, [guild_id]);
value = NetworkStore.getType();
object['mobile_network_type'] = value;
object['num_attachments'] = a0.attachmentCount;
value = value3 != signalStrength;
copyDataProperties(object, value && ({mobile_signal_strength_level: signalStrength}), dependencyMap);
Reflect.apply(track, defaultImport, [SEND_MESSAGE_ROUNDTRIP, object]);
}
} else {
this.pendingMessages.set(a0, object2);
binding = env0_12;
binding.warn('Ignoring a messageData for channel ' + a0.channelId + " because we can't find that channel.");
}
}
}
function value_56346(a0) { // fn#56346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7248:2453, offset: 0x013c5930, size: 131 bytes, params: 2, frame: 16
var object2;
let value = this.pendingMessages.get(a0);
if (value != null) {
object2 = {};
copyDataProperties(object2, value, undefined);
value = global.Date.now();
object2['gatewaySeenTimestamp'] = value;
value = environment.__proto__;
if (isCompleted(object2)) {
trackRoundtrip(object2);
this.pendingMessages.delete(a0);
} else {
this.pendingMessages.set(a0, object2);
function _fun56340(a0) { // fn#56340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7248:1250, offset: 0x013c5677, size: 143 bytes, params: 2, frame: 16
const MessageRoundtripTrackerStoreClass2 = MessageRoundtripTrackerStoreClass;
Inherits(MessageRoundtripTrackerStoreClass2, a0);
return CreateClass(MessageRoundtripTrackerStoreClass2, [{key: 'initialize', value: function() {
this.waitFor(ChannelStore, GuildMemberCountStore, NetworkStore);
}}, {key: 'recordMessageSendAttempt', value: value_56343}, {key: 'recordMessageSendApiResponse',
value: value_56345}, {key: 'recordGatewayResponse', value: value_56346}]);
function MessageRoundtripTrackerStoreClass(a0) { // fn#56341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7248:1262, offset: 0x013c5706, size: 160 bytes, params: 2, frame: 19
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, MessageRoundtripTrackerStoreClass);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(MessageRoundtripTrackerStoreClass);
binding = env1_5;
if (_isNativeReflectConstruct_56335()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
const Map = global.Map;
const value4 = Object.create(Map.prototype, {constructor: {value: Map}});
const map = new Map();
value.pendingMessages = map instanceof Object ? map : value4;
return value;
}
function value_56343(a0, a1) { // fn#56343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7248:1753, offset: 0x013c57a6, size: 188 bytes, params: 3, frame: 19
let value = a2;
const env0_1 = a1;
const value2 = undefined;
const r5 = value !== value2 ? value : {};
const attachments = r5.attachments;
const r2 = (attachments == null ? value2 : attachments.length) ?? 0;
const attachmentsToUpload = r5.attachmentsToUpload;
value = r2 + ((attachmentsToUpload == null ? value2 : attachmentsToUpload.length) ?? value);
const object = {'initialSendTimestamp': null, 'apiResponseTimestamp': null, 'gatewaySeenTimestamp': null};
const Date = global.Date;
object.initialSendTimestamp = Date.now();
object.channelId = a0;
object.attachmentCount = value;
this.pendingMessages.set(a1, object);
global.setTimeout(_fun56344, 30000);
return value2;
function _fun56344() { // fn#56344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7248:2066, offset: 0x013c5862, size: 75 bytes, params: 1, frame: 12
var value3;
const value2 = env0_0.pendingMessages.get(require);
if (value2 != null) {
value3 = environment.__proto__.__proto__;
trackRoundtrip(value2);
env0_0.pendingMessages.delete(require);
}
}
}
function value_56345(a0) { // fn#56345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7248:2216, offset: 0x013c58ad, size: 131 bytes, params: 2, frame: 16
var object;
let value = this.pendingMessages.get(a0);
if (value != null) {
object = {};
copyDataProperties(object, value, undefined);
value = global.Date.now();
object['apiResponseTimestamp'] = value;
value = environment.__proto__;
if (isCompleted(object)) {
trackRoundtrip(object);
this.pendingMessages.delete(a0);
} else {
this.pendingMessages.set(a0, object);
}
}
}
function value_56346(a0) { // fn#56346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7248:2453, offset: 0x013c5930, size: 131 bytes, params: 2, frame: 16
var object;
let value = this.pendingMessages.get(a0);
if (value != null) {
object = {};
copyDataProperties(object, value, undefined);
value = global.Date.now();
object['gatewaySeenTimestamp'] = value;
value = environment.__proto__;
if (isCompleted(object)) {
trackRoundtrip(object);
this.pendingMessages.delete(a0);
} else {
this.pendingMessages.set(a0, object);
}
}
}
}
function MESSAGE_CREATE_56347({optimistic, message}) { // fn#56347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7248:2700, offset: 0x013c59b3, size: 56 bytes, params: 2, frame: 11
const nonce = message.nonce;
if (!(optimistic || nonce == null)) {
env0_13.recordGatewayResponse(nonce);
}
}
}
function _fun56344() { // fn#56344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7248:2066, offset: 0x013c5862, size: 75 bytes, params: 1, frame: 12
var value3;
const value2 = env0_0.pendingMessages.get(require);
if (value2 != null) {
value3 = environment.__proto__.__proto__;
trackRoundtrip(value2);
env0_0.pendingMessages.delete(require);
}
}
global.__d(_fun56334, 7070, [6, 7, 15, 17, 18, 1379, 4111, 4401, 661, 3, 4873, 683, 7071, 566, 694,
2]) /* metro module 7070, dependencies: [6, 7, 15, 17, 18, 1379, 4111, 4401, 661, 3, 4873, 683, 7071, 566, 694, 2] */;
+20 -17
View File
@@ -1,29 +1,32 @@
/* Metro module 10910; source: modules/messages/MessageUtils.tsx; dependencies: [1379, 1878, 5072, 2] */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun83608(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11096:6, offset: 0x01f200a3, size: 145 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/MessageUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/MessageUtils.tsx');
exports.canViewPotentiallyNSFWChannel = canViewPotentiallyNSFWChannel;
exports.getGuildIdFromMessage = getGuildIdFromMessage;
}
function canViewPotentiallyNSFWChannel(a0) { // fn#83609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11096:215, offset: 0x01f20134, size: 87 bytes, params: 2, frame: 13
var value;
const currentUser = UserStore.getCurrentUser();
const channel = ChannelStore.getChannel(a0);
let r0 = currentUser != null && channel != null;
if (r0) {
value = require(5072) /* metro dependency 5072: AgeGateUtils */;
value = !value.isChannelContentGated(channel);
r0 = value;
}
return r0;
}
function canViewPotentiallyNSFWChannel(a0) { // fn#83609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11096:215, offset: 0x01f20134, size: 87 bytes, params: 2, frame: 13
var value;
const currentUser = UserStore.getCurrentUser();
const channel = ChannelStore.getChannel(a0);
let r0 = currentUser != null && channel != null;
if (r0) {
value = require(5072) /* metro dependency 5072: AgeGateUtils */;
value = !value.isChannelContentGated(channel);
r0 = value;
function getGuildIdFromMessage({channel_id}) { // fn#83610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11096:384, offset: 0x01f2018b, size: 55 bytes, params: 2, frame: 13
return ChannelStore.getChannel(channel_id)?.guild_id ?? undefined;
}
return r0;
}
function getGuildIdFromMessage({channel_id}) { // fn#83610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11096:384, offset: 0x01f2018b, size: 55 bytes, params: 2, frame: 13
return ChannelStore.getChannel(channel_id)?.guild_id ?? undefined;
}
global.__d(_fun83608, 10910, [1379, 1878, 5072, 2]) /* metro module 10910, dependencies: [1379, 1878, 5072, 2] */;
@@ -1,4 +1,15 @@
/* Metro module 9855; source: modules/messages/MessageViewTrackingManager.tsx; dependencies: [6, 7, 15, 17, 18, 661, 480, 6789, 1360, 1393, 683, 4860, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Module01393 from '../../by-id/module-01393.js'; /* Metro dependency 1393 */
import AutomaticLifecycleManager from '../../lib/AutomaticLifecycleManager.tsx'; /* Metro dependency 4860 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as GlobalUtilsModule from '../../utils/GlobalUtils.tsx'; /* Metro dependency 1360 */
function _fun77250(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:6, offset: 0x01df6cb7, size: 354 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_77253 = function(a0, a1) {
@@ -46,266 +57,442 @@ function _fun77250(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const env0_8 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
let value = AutomaticLifecycleManager;
value = _fun77259(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/MessageViewTrackingManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/MessageViewTrackingManager.tsx');
exports.default = value;
exports.MessageViewTrackingType = {ANNOUNCEMENT: 'announcement', APP_EMBED: 'app_embed',
OFFICIAL_MESSAGE: 'official_message', VOICE_INVITE_EMBED: 'voice_invite_embed'};
}
function _createForOfIteratorHelperLoose_77251(a0, a1) { // fn#77251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:176, offset: 0x01df6e19, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
function _createForOfIteratorHelperLoose_77251(a0, a1) { // fn#77251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:176, offset: 0x01df6e19, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
return _fun77252;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_77253(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun77252;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_77253(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_77253(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_77253(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun77252;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function _isNativeReflectConstruct_77254() { // fn#77254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:1086, offset: 0x01df6f8d, 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_77254_isNativeReflectConstruct = function() {
return !!result;
})();
}
function getAnalyticsConfig(a0) { // fn#77257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:1445, offset: 0x01df6fef, size: 529 bytes, params: 2, frame: 19
var r4;
var object3;
var object4;
var treatmentRendered;
var INVITE_EMBED;
var items2;
const type = a0.type;
const ANNOUNCEMENT = env0_9.ANNOUNCEMENT;
if (ANNOUNCEMENT === type) {
return {event: AnalyticEvents.ANNOUNCEMENT_MESSAGE_VIEWED, properties: {message_id: a0.messageId,
channel_id: a0.channelId, guild_id: a0.guildId, source_channel_id: a0.sourceChannelId,
source_guild_id: a0.sourceGuildId}};
}
const APP_EMBED = env0_9.APP_EMBED;
if (APP_EMBED === type) {
return {event: AnalyticEvents.APP_EMBED_VIEWED, properties: {application_id: a0.applicationId,
link_type: a0.linkType, message_id: a0.messageId, channel_id: a0.channelId, guild_id: a0.guildId}};
}
const OFFICIAL_MESSAGE = env0_9.OFFICIAL_MESSAGE;
if (OFFICIAL_MESSAGE === type) {
return {event: AnalyticEvents.OFFICIAL_MESSAGE_VIEWED, properties: {message_id: a0.messageId,
channel_id: a0.channelId, guild_id: a0.guildId}};
}
const VOICE_INVITE_EMBED = env0_9.VOICE_INVITE_EMBED;
if (VOICE_INVITE_EMBED === type) {
object3 = {};
object3.event = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames.VOICE_INVITE_EMBED;
object4 = {};
object4.impression_type = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionTypes.VIEW;
object4.invite_code = a0.inviteCode;
object4.invite_guild_id = a0.inviteGuildId;
object4.invite_channel_id = a0.inviteChannelId;
object4.invite_instance_id = a0.inviteInstanceId;
object4.has_active_stream = a0.hasActiveStream;
treatmentRendered = a0.treatmentRendered;
INVITE_EMBED = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).INVITE_EMBED;
if (treatmentRendered) {
items2 = [INVITE_EMBED];
items2[1] = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).VOICE_CHANNEL_LIST_INVITE_EMBED;
r4 = items2;
} else {
r4 = [INVITE_EMBED];
r5 = value;
}
object4.location_stack = r4;
object3.properties = object4;
return object3;
}
return (require(1360) /* metro dependency 1360: GlobalUtils */).assertNever(a0);
}
function getMessageViewKey(a0) { // fn#77258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:2494, offset: 0x01df7200, size: 114 bytes, params: 2, frame: 19
const type = a0.type;
const VOICE_INVITE_EMBED = env0_9.VOICE_INVITE_EMBED;
return type === VOICE_INVITE_EMBED ? '' + a0.messageId + '-' + a0.inviteCode + '-' + a0.type : '' + a0.messageId + '-' + a0.type;
}
function _fun77259(a0) { // fn#77259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:2641, offset: 0x01df7272, size: 228 bytes, params: 2, frame: 16
const closure = MessageViewTrackingManager;
env0_7(closure, a0);
return env0_4(closure, [{key: 'handleMessageBecameVisible', value: value_77262},
{key: 'handleMessageLostVisibility', value: value_77264}, {key: 'handleMessageListVisibilityChange',
value: value_77265}, {key: 'clearTimer', value: function(a0) {
var property = this.currentlyVisibleMessageTimers[a0];
if (property != null) {
(0, global.clearTimeout)(property);
delete this.currentlyVisibleMessageTimers[a0];
}
}}, {key: 'handleChannelSelect', value: function() {
var r3;
var value3;
var property = global.Object;
var value = property.values(this.currentlyVisibleMessageTimers);
var value2 = 0;
if (value2 < value.length) {
for (r3 = value2; true; r3 = value3) {
property = value[r3];
(0, global.clearTimeout)(property);
value3 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
if (!(value3 < value.length)) {
break;
}
if (r5) {
if (r5) {
}
return _fun77252;
}
this.currentlyVisibleMessageTimers = {};
this.viewsInCurrentChannel.clear();
this.drainBuffer();
}}, {key: 'drainBuffer', value: value_77268}, {key: 'bufferViewTrack', value: function(a0) {
var env0_0 = this;
if (this.batchBuffer.length >= 10) {
this.drainBuffer();
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun77252() { // fn#77252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:747, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
this.batchBuffer.push(a0);
if (this.batchTimerId == null) {
this.batchTimerId = global.setTimeout(_fun77270, 2000);
}
}}]);
}
function MessageViewTrackingManager(a0) { // fn#77260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:2653, offset: 0x01df7356, size: 272 bytes, params: 2, frame: 21
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, MessageViewTrackingManager);
const items = [];
arraySpread(items, value, 0, items);
value = env1_6(MessageViewTrackingManager);
binding = env1_5;
if (_isNativeReflectConstruct_77254()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
value.currentlyVisibleMessageTimers = {};
const Set = global.Set;
const value4 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
value.viewsInCurrentChannel = set instanceof Object ? set : value4;
const defaultImport = importDefault(1393) /* metro dependency 1393 */;
const value6 = Object.create(defaultImport.prototype, {constructor: {value: defaultImport}});
const defaultImport2 = new defaultImport({'max': 500, 'maxAge': 60000});
value.recentViewTimes = defaultImport2 instanceof Object ? defaultImport2 : value6;
value.batchBuffer = [];
value.batchTimerId = null;
value.actions = {CHANNEL_SELECT: CHANNEL_SELECT_77261};
return value;
}
function value_77262(a0) { // fn#77262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:3240, offset: 0x01df7479, size: 159 bytes, params: 2, frame: 16
var environment;
var viewsInCurrentChannel;
var value2;
var Date;
const env0_1 = a0;
let value = environment.__proto__;
value = getMessageViewKey(a0);
if (this.currentlyVisibleMessageTimers[value] == null) {
viewsInCurrentChannel = this.viewsInCurrentChannel;
if (!viewsInCurrentChannel.has(value)) {
value2 = this.recentViewTimes.get(value);
if (value2 == null) {
this.currentlyVisibleMessageTimers[value] = global.setTimeout(_fun77263, 1000);
function _isNativeReflectConstruct_77254() { // fn#77254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:1086, offset: 0x01df6f8d, 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_77254_isNativeReflectConstruct = function() {
return !!result;
})();
}
function getAnalyticsConfig(a0) { // fn#77257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:1445, offset: 0x01df6fef, size: 529 bytes, params: 2, frame: 19
var r4;
var object;
var object2;
var treatmentRendered;
var INVITE_EMBED;
var items2;
const type = a0.type;
const ANNOUNCEMENT = env0_9.ANNOUNCEMENT;
if (ANNOUNCEMENT === type) {
return {event: AnalyticEvents.ANNOUNCEMENT_MESSAGE_VIEWED, properties: {message_id: a0.messageId,
channel_id: a0.channelId, guild_id: a0.guildId, source_channel_id: a0.sourceChannelId,
source_guild_id: a0.sourceGuildId}};
}
const APP_EMBED = env0_9.APP_EMBED;
if (APP_EMBED === type) {
return {event: AnalyticEvents.APP_EMBED_VIEWED, properties: {application_id: a0.applicationId,
link_type: a0.linkType, message_id: a0.messageId, channel_id: a0.channelId, guild_id: a0.guildId}};
}
const OFFICIAL_MESSAGE = env0_9.OFFICIAL_MESSAGE;
if (OFFICIAL_MESSAGE === type) {
return {event: AnalyticEvents.OFFICIAL_MESSAGE_VIEWED, properties: {message_id: a0.messageId,
channel_id: a0.channelId, guild_id: a0.guildId}};
}
const VOICE_INVITE_EMBED = env0_9.VOICE_INVITE_EMBED;
if (VOICE_INVITE_EMBED === type) {
object = {};
object.event = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames.VOICE_INVITE_EMBED;
object2 = {};
object2.impression_type = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionTypes.VIEW;
object2.invite_code = a0.inviteCode;
object2.invite_guild_id = a0.inviteGuildId;
object2.invite_channel_id = a0.inviteChannelId;
object2.invite_instance_id = a0.inviteInstanceId;
object2.has_active_stream = a0.hasActiveStream;
treatmentRendered = a0.treatmentRendered;
INVITE_EMBED = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).INVITE_EMBED;
if (treatmentRendered) {
items2 = [INVITE_EMBED];
items2[1] = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).VOICE_CHANNEL_LIST_INVITE_EMBED;
r4 = items2;
} else {
Date = global.Date;
if (!(Date.now() - value2 < 60000)) {
this.currentlyVisibleMessageTimers[value] = global.setTimeout(_fun77263, 1000);
r4 = [INVITE_EMBED];
}
object2.location_stack = r4;
object.properties = object2;
return object;
}
return (GlobalUtilsModule).assertNever(a0);
}
function getMessageViewKey(a0) { // fn#77258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:2494, offset: 0x01df7200, size: 114 bytes, params: 2, frame: 19
const type = a0.type;
const VOICE_INVITE_EMBED = env0_9.VOICE_INVITE_EMBED;
return type === VOICE_INVITE_EMBED ? '' + a0.messageId + '-' + a0.inviteCode + '-' + a0.type : '' + a0.messageId + '-' + a0.type;
}
function _fun77259(a0) { // fn#77259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:2641, offset: 0x01df7272, size: 228 bytes, params: 2, frame: 16
const MessageViewTrackingManager2 = MessageViewTrackingManager;
Inherits(MessageViewTrackingManager2, a0);
return CreateClass(MessageViewTrackingManager2, [{key: 'handleMessageBecameVisible', value: value_77262},
{key: 'handleMessageLostVisibility', value: value_77264}, {key: 'handleMessageListVisibilityChange',
value: value_77265}, {key: 'clearTimer', value: function(a0) {
var property = this.currentlyVisibleMessageTimers[a0];
if (property != null) {
(0, global.clearTimeout)(property);
delete this.currentlyVisibleMessageTimers[a0];
}
}}, {key: 'handleChannelSelect', value: function() {
var r3;
var value3;
var property = global.Object;
var value = property.values(this.currentlyVisibleMessageTimers);
var value2 = 0;
if (value2 < value.length) {
for (r3 = value2; true; r3 = value3) {
property = value[r3];
(0, global.clearTimeout)(property);
value3 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
if (!(value3 < value.length)) {
break;
}
}
}
this.currentlyVisibleMessageTimers = {};
this.viewsInCurrentChannel.clear();
this.drainBuffer();
}}, {key: 'drainBuffer', value: value_77268}, {key: 'bufferViewTrack', value: function(a0) {
var env0_0 = this;
if (this.batchBuffer.length >= 10) {
this.drainBuffer();
}
this.batchBuffer.push(a0);
if (this.batchTimerId == null) {
this.batchTimerId = global.setTimeout(_fun77270, 2000);
}
}}]);
function MessageViewTrackingManager(a0) { // fn#77260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:2653, offset: 0x01df7356, size: 272 bytes, params: 2, frame: 21
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, MessageViewTrackingManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(MessageViewTrackingManager);
binding = env1_5;
if (_isNativeReflectConstruct_77254()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.currentlyVisibleMessageTimers = {};
const Set = global.Set;
const value4 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
value.viewsInCurrentChannel = set instanceof Object ? set : value4;
const defaultImport = Module01393;
const value6 = Object.create(defaultImport.prototype, {constructor: {value: defaultImport}});
const defaultImport2 = new defaultImport({'max': 500, 'maxAge': 60000});
value.recentViewTimes = defaultImport2 instanceof Object ? defaultImport2 : value6;
value.batchBuffer = [];
value.batchTimerId = null;
value.actions = {CHANNEL_SELECT: CHANNEL_SELECT_77261};
return value;
function MessageViewTrackingManagerCHANNEL_SELECT() { // fn#77261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:3100, owner: MessageViewTrackingManager.CHANNEL_SELECT, offset: 0x01df7466, size: 19 bytes, params: 1, frame: 9
return env0_0.handleChannelSelect();
}
}
function value_77262(a0) { // fn#77262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:3240, offset: 0x01df7479, size: 159 bytes, params: 2, frame: 16
var environment;
var viewsInCurrentChannel;
var value2;
var Date;
const env0_1 = a0;
let value = environment.__proto__;
value = getMessageViewKey(a0);
if (this.currentlyVisibleMessageTimers[value] == null) {
viewsInCurrentChannel = this.viewsInCurrentChannel;
if (!viewsInCurrentChannel.has(value)) {
value2 = this.recentViewTimes.get(value);
if (value2 == null) {
this.currentlyVisibleMessageTimers[value] = global.setTimeout(_fun77263, 1000);
} else {
Date = global.Date;
if (!(Date.now() - value2 < 60000)) {
this.currentlyVisibleMessageTimers[value] = global.setTimeout(_fun77263, 1000);
}
}
}
}
function _fun77263() { // fn#77263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:3448, offset: 0x01df7518, size: 92 bytes, params: 1, frame: 16
const binding = env0_0;
const currentlyVisibleMessageTimers = binding.currentlyVisibleMessageTimers;
const binding2 = env0_2;
delete currentlyVisibleMessageTimers[binding2];
binding.viewsInCurrentChannel.add(binding2);
const recentViewTimes = binding.recentViewTimes;
const set = recentViewTimes.set;
const Date = global.Date;
Reflect.apply(set, recentViewTimes, [binding2, Date.now()]);
binding.bufferViewTrack(env0_1);
}
}
function value_77265(a0, a1) { // fn#77265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:3907, offset: 0x01df75f7, size: 250 bytes, params: 3, frame: 19
var r3;
var r2;
var r1;
var value4;
var handleMessageBecameVisible;
var value5;
var Set;
var map;
var value7;
var prototype;
var value8;
var set;
var value9;
var value10;
var value11;
var endsWith;
var HermesInternal;
var concat;
var value12;
var has;
var value13;
var clearTimer;
var value14;
let value = environment.__proto__;
const value2 = _createForOfIteratorHelperLoose_77251(a0);
const value3 = value2();
let done = value3.done;
if (!done) {
r3 = value3;
reducibleLoop1: while (true) {
value4 = r3.value;
handleMessageBecameVisible = this.handleMessageBecameVisible;
Reflect.apply(handleMessageBecameVisible, this, [value4]);
value5 = value2();
done = value5.done;
if (done) {
break reducibleLoop1;
}
r3 = value5;
continue reducibleLoop1;
}
}
const Object = global.Object;
const value6 = Object.keys(this.currentlyVisibleMessageTimers);
reducibleJoin9: while (true) {
if (!(value6.length > 0)) {
break reducibleJoin9;
}
Set = global.Set;
map = a0.map;
value7 = Reflect.apply(map, a0, [getMessageViewKey]);
prototype = Set.prototype;
value8 = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value9 = set instanceof Object ? set : value8;
value = _createForOfIteratorHelperLoose_77251(value6);
value10 = value();
done = value10.done;
if (done) {
break reducibleJoin9;
}
r2 = value10;
reducibleLoop4: while (true) {
value11 = r2.value;
endsWith = value11.endsWith;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
value12 = Reflect.apply(endsWith, value11, ['-' + a1]);
reducibleJoin6: while (true) {
if (value12) {
has = value9.has;
value13 = !Reflect.apply(has, value9, [value11]);
r1 = value13;
break reducibleJoin6;
}
r1 = value12;
break reducibleJoin6;
}
reducibleJoin8: while (true) {
if (r1) {
clearTimer = this.clearTimer;
Reflect.apply(clearTimer, this, [value11]);
break reducibleJoin8;
}
break reducibleJoin8;
}
value14 = value();
done = value14.done;
if (done) {
break reducibleJoin9;
}
r2 = value14;
continue reducibleLoop4;
}
}
}
function value_77268() { // fn#77268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:4692, offset: 0x01df778e, size: 156 bytes, params: 1, frame: 19
var r3;
var getAnalyticsConfigBinding;
var value4;
var analyticsConfigBinding;
var defaultImport;
var track;
var event;
var properties;
var value6;
var clearTimeout;
const value2 = _createForOfIteratorHelperLoose_77251(this.batchBuffer);
const value3 = value2();
let done = value3.done;
if (!done) {
r3 = value3;
reducibleLoop1: while (true) {
getAnalyticsConfigBinding = getAnalyticsConfig;
value4 = r3.value;
analyticsConfigBinding = getAnalyticsConfigBinding(value4);
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
event = analyticsConfigBinding.event;
properties = analyticsConfigBinding.properties;
Reflect.apply(track, defaultImport, [event, properties]);
value6 = value2();
done = value6.done;
if (done) {
break reducibleLoop1;
}
r3 = value6;
continue reducibleLoop1;
}
}
this.batchBuffer = [];
let batchTimerId = this.batchTimerId;
reducibleJoin4: while (true) {
if (batchTimerId == null) {
break reducibleJoin4;
}
clearTimeout = global.clearTimeout;
batchTimerId = this.batchTimerId;
clearTimeout(batchTimerId);
this.batchTimerId = null;
break reducibleJoin4;
}
}
function value_77269(a0) { // fn#77269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:4985, offset: 0x01df782a, size: 107 bytes, params: 2, frame: 14
if (this.batchBuffer.length >= 10) {
this.drainBuffer();
}
this.batchBuffer.push(a0);
if (this.batchTimerId == null) {
this.batchTimerId = global.setTimeout(_fun77270, 2000);
}
function _fun77270() { // fn#77270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:5126, offset: 0x01df7895, size: 19 bytes, params: 1, frame: 9
return env0_0.drainBuffer();
}
}
}
}
function value_77264(a0, a1, a2) { // fn#77264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:3687, offset: 0x01df7574, size: 131 bytes, params: 4, frame: 21
@@ -317,180 +504,5 @@ function value_77264(a0, a1, a2) { // fn#77264, source: /ci/build/discord/discor
}
}
function value_77265(a0, a1) { // fn#77265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:3907, offset: 0x01df75f7, size: 250 bytes, params: 3, frame: 19
var r3;
var r2;
var r1;
var value4;
var handleMessageBecameVisible;
var value5;
var Set;
var map;
var value7;
var prototype;
var value8;
var set;
var value9;
var value10;
var value11;
var endsWith;
var HermesInternal;
var concat;
var value12;
var has;
var value13;
var clearTimer;
var value14;
let value = environment.__proto__;
const value2 = _createForOfIteratorHelperLoose_77251(a0);
const value3 = value2();
let done = value3.done;
if (!done) {
r3 = value3;
reducibleLoop1: while (true) {
value4 = r3.value;
handleMessageBecameVisible = this.handleMessageBecameVisible;
Reflect.apply(handleMessageBecameVisible, this, [value4]);
value5 = value2();
done = value5.done;
if (done) {
break reducibleLoop1;
}
r3 = value5;
continue reducibleLoop1;
}
}
const Object = global.Object;
const value6 = Object.keys(this.currentlyVisibleMessageTimers);
reducibleJoin9: while (true) {
if (!(value6.length > 0)) {
break reducibleJoin9;
}
Set = global.Set;
map = a0.map;
value7 = Reflect.apply(map, a0, [getMessageViewKey]);
prototype = Set.prototype;
value8 = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value9 = set instanceof Object ? set : value8;
value = _createForOfIteratorHelperLoose_77251(value6);
value10 = value();
done = value10.done;
if (done) {
break reducibleJoin9;
}
r2 = value10;
reducibleLoop4: while (true) {
value11 = r2.value;
endsWith = value11.endsWith;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
value12 = Reflect.apply(endsWith, value11, ['-' + a1]);
reducibleJoin6: while (true) {
if (value12) {
has = value9.has;
value13 = !Reflect.apply(has, value9, [value11]);
r1 = value13;
break reducibleJoin6;
}
r1 = value12;
break reducibleJoin6;
}
reducibleJoin8: while (true) {
if (r1) {
clearTimer = this.clearTimer;
Reflect.apply(clearTimer, this, [value11]);
break reducibleJoin8;
}
break reducibleJoin8;
}
value14 = value();
done = value14.done;
if (done) {
break reducibleJoin9;
}
r2 = value14;
continue reducibleLoop4;
}
}
}
function value_77268() { // fn#77268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:4692, offset: 0x01df778e, size: 156 bytes, params: 1, frame: 19
var r3;
var getAnalyticsConfigBinding;
var value4;
var analyticsConfigBinding;
var defaultImport;
var track;
var event;
var properties;
var value6;
var clearTimeout;
const value2 = _createForOfIteratorHelperLoose_77251(this.batchBuffer);
const value3 = value2();
let done = value3.done;
if (!done) {
r3 = value3;
reducibleLoop1: while (true) {
getAnalyticsConfigBinding = getAnalyticsConfig;
value4 = r3.value;
analyticsConfigBinding = getAnalyticsConfigBinding(value4);
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
event = analyticsConfigBinding.event;
properties = analyticsConfigBinding.properties;
Reflect.apply(track, defaultImport, [event, properties]);
value6 = value2();
done = value6.done;
if (done) {
break reducibleLoop1;
}
r3 = value6;
continue reducibleLoop1;
}
}
this.batchBuffer = [];
let batchTimerId = this.batchTimerId;
reducibleJoin4: while (true) {
if (batchTimerId == null) {
break reducibleJoin4;
}
clearTimeout = global.clearTimeout;
batchTimerId = this.batchTimerId;
clearTimeout(batchTimerId);
this.batchTimerId = null;
break reducibleJoin4;
}
}
function value_77269(a0) { // fn#77269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:4985, offset: 0x01df782a, size: 107 bytes, params: 2, frame: 14
if (this.batchBuffer.length >= 10) {
this.drainBuffer();
}
this.batchBuffer.push(a0);
if (this.batchTimerId == null) {
this.batchTimerId = global.setTimeout(_fun77270, 2000);
}
}
function MessageViewTrackingManagerCHANNEL_SELECT() { // fn#77261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:3100, owner: MessageViewTrackingManager.CHANNEL_SELECT, offset: 0x01df7466, size: 19 bytes, params: 1, frame: 9
return env0_0.handleChannelSelect();
}
function _fun77263() { // fn#77263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:3448, offset: 0x01df7518, size: 92 bytes, params: 1, frame: 16
const binding = env0_0;
const currentlyVisibleMessageTimers = binding.currentlyVisibleMessageTimers;
const binding2 = env0_2;
delete currentlyVisibleMessageTimers[binding2];
binding.viewsInCurrentChannel.add(binding2);
const recentViewTimes = binding.recentViewTimes;
const set = recentViewTimes.set;
const Date = global.Date;
Reflect.apply(set, recentViewTimes, [binding2, Date.now()]);
binding.bufferViewTrack(env0_1);
}
function _fun77270() { // fn#77270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:5126, offset: 0x01df7895, size: 19 bytes, params: 1, frame: 9
return env0_0.drainBuffer();
}
global.__d(_fun77250, 9855, [6, 7, 15, 17, 18, 661, 480, 6789, 1360, 1393, 683, 4860,
2]) /* metro module 9855, dependencies: [6, 7, 15, 17, 18, 661, 480, 6789, 1360, 1393, 683, 4860, 2] */;
+150 -146
View File
@@ -1,11 +1,13 @@
/* Metro module 9779; source: modules/messages/MosaicMediaType.tsx; dependencies: [661, 4631, 1391, 9780, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun76714(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9965:6, offset: 0x01de2197, size: 165 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(661) /* metro dependency 661: Constants */).MessageAttachmentFlags;
const env0_3 = RegExp('\\.(mp3|m4a|ogg|opus|wav|flac)$', 'i');
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/MosaicMediaType.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/MosaicMediaType.tsx');
exports.isVisualMedia = function(a0) {
var r0;
r0 = a0 === 'IMAGE' || a0 === 'VIDEO';
@@ -15,41 +17,50 @@ function _fun76714(global, require, importDefault, importAll, module, exports, d
};
exports.getMosaicMediaTypeForAttachment = getMosaicMediaTypeForAttachment;
exports.getMosaicMediaTypeForUnfurledMediaItem = getMosaicMediaTypeForUnfurledMediaItem;
}
function getMosaicMediaTypeForAttachment(a0, a1) { // fn#76716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9965:351, offset: 0x01de226c, size: 345 bytes, params: 3, frame: 20
var r1;
var r0;
var r2;
var value;
var binding;
var url;
var moduleValue;
var isVideoFile2;
var value5;
var moduleValue4;
const filename = a0.filename;
const width = a0.width;
const height = a0.height;
if (a1) {
if (width == null) {
if (a1 == null) {
url = a0.url;
value = 'OTHER';
if (url != null) {
moduleValue = require(9780) /* metro dependency 9780: PlaintextFilePreviewHelpers */;
r1 = moduleValue.isPlaintextPreviewableFile(filename) ? 'PLAINTEXT_PREVIEW' : value;
} else {
r1 = value;
}
r0 = r1;
} else {
binding = env0_3;
if (binding.test(filename)) {
function getMosaicMediaTypeForAttachment(a0, a1) { // fn#76716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9965:351, offset: 0x01de226c, size: 345 bytes, params: 3, frame: 20
var r1;
var r0;
var r2;
var value;
var binding;
var url;
var moduleValue;
var isVideoFile2;
var value5;
var moduleValue4;
const filename = a0.filename;
const width = a0.width;
const height = a0.height;
if (a1) {
if (width == null) {
if (a1 == null) {
url = a0.url;
value = 'AUDIO';
value = 'OTHER';
if (url != null) {
r0 = value;
moduleValue = require(9780) /* metro dependency 9780: PlaintextFilePreviewHelpers */;
r1 = moduleValue.isPlaintextPreviewableFile(filename) ? 'PLAINTEXT_PREVIEW' : value;
} else {
r1 = value;
}
r0 = r1;
} else {
binding = env0_3;
if (binding.test(filename)) {
url = a0.url;
value = 'AUDIO';
if (url != null) {
r0 = value;
} else {
url = a0.url;
value = 'OTHER';
if (url != null) {
moduleValue = require(9780) /* metro dependency 9780: PlaintextFilePreviewHelpers */;
r1 = moduleValue.isPlaintextPreviewableFile(filename) ? 'PLAINTEXT_PREVIEW' : value;
} else {
r1 = value;
}
r0 = r1;
}
} else {
url = a0.url;
value = 'OTHER';
@@ -61,23 +72,72 @@ function getMosaicMediaTypeForAttachment(a0, a1) { // fn#76716, source: /ci/buil
}
r0 = r1;
}
} else {
url = a0.url;
value = 'OTHER';
if (url != null) {
moduleValue = require(9780) /* metro dependency 9780: PlaintextFilePreviewHelpers */;
r1 = moduleValue.isPlaintextPreviewableFile(filename) ? 'PLAINTEXT_PREVIEW' : value;
} else {
r1 = value;
}
r0 = r1;
}
}
} else {
value = 0;
if (width > value) {
if (height == null) {
if (a1 == null) {
} else {
value = 0;
if (width > value) {
if (height == null) {
if (a1 == null) {
url = a0.url;
value = 'OTHER';
if (url != null) {
moduleValue = require(9780) /* metro dependency 9780: PlaintextFilePreviewHelpers */;
r1 = moduleValue.isPlaintextPreviewableFile(filename) ? 'PLAINTEXT_PREVIEW' : value;
} else {
r1 = value;
}
r0 = r1;
} else {
binding = env0_3;
if (binding.test(filename)) {
url = a0.url;
value = 'AUDIO';
if (url != null) {
r0 = value;
} else {
url = a0.url;
value = 'OTHER';
if (url != null) {
moduleValue = require(9780) /* metro dependency 9780: PlaintextFilePreviewHelpers */;
r1 = moduleValue.isPlaintextPreviewableFile(filename) ? 'PLAINTEXT_PREVIEW' : value;
} else {
r1 = value;
}
r0 = r1;
}
} else {
url = a0.url;
value = 'OTHER';
if (url != null) {
moduleValue = require(9780) /* metro dependency 9780: PlaintextFilePreviewHelpers */;
r1 = moduleValue.isPlaintextPreviewableFile(filename) ? 'PLAINTEXT_PREVIEW' : value;
} else {
r1 = value;
}
r0 = r1;
}
}
} else if (height > value) {
if ((require(4631) /* metro dependency 4631: MediaFormatTesters */).isImageFile(filename)) {
r1 = 'IMAGE';
} else {
isVideoFile2 = (require(4631) /* metro dependency 4631: MediaFormatTesters */).isVideoFile(filename);
value5 = 'INVALID';
if (isVideoFile2) {
if (a0.proxy_url != null) {
moduleValue4 = require(1391) /* metro dependency 1391: FlagUtils */;
value = moduleValue4.hasFlag(a0.flags ?? value, MessageAttachmentFlags.IS_CLIP);
r2 = value ? 'CLIP' : 'VIDEO';
} else {
r2 = value5;
}
} else {
r2 = value5;
}
r1 = r2;
}
r0 = r1;
} else if (a1 == null) {
url = a0.url;
value = 'OTHER';
if (url != null) {
@@ -117,26 +177,6 @@ function getMosaicMediaTypeForAttachment(a0, a1) { // fn#76716, source: /ci/buil
r0 = r1;
}
}
} else if (height > value) {
if ((require(4631) /* metro dependency 4631: MediaFormatTesters */).isImageFile(filename)) {
r1 = 'IMAGE';
} else {
isVideoFile2 = (require(4631) /* metro dependency 4631: MediaFormatTesters */).isVideoFile(filename);
value5 = 'INVALID';
if (isVideoFile2) {
if (a0.proxy_url != null) {
moduleValue4 = require(1391) /* metro dependency 1391: FlagUtils */;
value = moduleValue4.hasFlag(a0.flags ?? value, MessageAttachmentFlags.IS_CLIP);
r2 = value ? 'CLIP' : 'VIDEO';
} else {
r2 = value5;
}
} else {
r2 = value5;
}
r1 = r2;
}
r0 = r1;
} else if (a1 == null) {
url = a0.url;
value = 'OTHER';
@@ -177,34 +217,24 @@ function getMosaicMediaTypeForAttachment(a0, a1) { // fn#76716, source: /ci/buil
r0 = r1;
}
}
} else if (a1 == null) {
url = a0.url;
value = 'OTHER';
if (url != null) {
moduleValue = require(9780) /* metro dependency 9780: PlaintextFilePreviewHelpers */;
r1 = moduleValue.isPlaintextPreviewableFile(filename) ? 'PLAINTEXT_PREVIEW' : value;
} else {
r1 = value;
}
r0 = r1;
}
} else if (a1 == null) {
url = a0.url;
value = 'OTHER';
if (url != null) {
moduleValue = require(9780) /* metro dependency 9780: PlaintextFilePreviewHelpers */;
r1 = moduleValue.isPlaintextPreviewableFile(filename) ? 'PLAINTEXT_PREVIEW' : value;
} else {
binding = env0_3;
if (binding.test(filename)) {
url = a0.url;
value = 'AUDIO';
if (url != null) {
r0 = value;
} else {
url = a0.url;
value = 'OTHER';
if (url != null) {
moduleValue = require(9780) /* metro dependency 9780: PlaintextFilePreviewHelpers */;
r1 = moduleValue.isPlaintextPreviewableFile(filename) ? 'PLAINTEXT_PREVIEW' : value;
} else {
r1 = value;
}
r0 = r1;
}
r1 = value;
}
r0 = r1;
} else {
binding = env0_3;
if (binding.test(filename)) {
url = a0.url;
value = 'AUDIO';
if (url != null) {
r0 = value;
} else {
url = a0.url;
value = 'OTHER';
@@ -216,25 +246,6 @@ function getMosaicMediaTypeForAttachment(a0, a1) { // fn#76716, source: /ci/buil
}
r0 = r1;
}
}
}
} else if (a1 == null) {
url = a0.url;
value = 'OTHER';
if (url != null) {
moduleValue = require(9780) /* metro dependency 9780: PlaintextFilePreviewHelpers */;
r1 = moduleValue.isPlaintextPreviewableFile(filename) ? 'PLAINTEXT_PREVIEW' : value;
} else {
r1 = value;
}
r0 = r1;
} else {
binding = env0_3;
if (binding.test(filename)) {
url = a0.url;
value = 'AUDIO';
if (url != null) {
r0 = value;
} else {
url = a0.url;
value = 'OTHER';
@@ -246,43 +257,36 @@ function getMosaicMediaTypeForAttachment(a0, a1) { // fn#76716, source: /ci/buil
}
r0 = r1;
}
} else {
url = a0.url;
value = 'OTHER';
if (url != null) {
moduleValue = require(9780) /* metro dependency 9780: PlaintextFilePreviewHelpers */;
r1 = moduleValue.isPlaintextPreviewableFile(filename) ? 'PLAINTEXT_PREVIEW' : value;
} else {
r1 = value;
}
r0 = r1;
}
return r0;
}
return r0;
}
function getMosaicMediaTypeForUnfurledMediaItem({contentType, width, height}) { // fn#76717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9965:782, offset: 0x01de23c5, size: 127 bytes, params: 2, frame: 14
var value;
var moduleValue;
if (width != null) {
if (width > 0) {
if (height == null) {
return 'VISUAL_PLACEHOLDER';
}
if (height > 0) {
moduleValue = require(4631) /* metro dependency 4631: MediaFormatTesters */;
if (moduleValue.isImageContentType(contentType)) {
return 'IMAGE';
function getMosaicMediaTypeForUnfurledMediaItem({contentType, width, height}) { // fn#76717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9965:782, offset: 0x01de23c5, size: 127 bytes, params: 2, frame: 14
var value;
var moduleValue;
if (width != null) {
if (width > 0) {
if (height == null) {
return 'VISUAL_PLACEHOLDER';
}
value = require(4631) /* metro dependency 4631: MediaFormatTesters */;
if (value.isVideoContentType(contentType)) {
return 'VIDEO';
if (height > 0) {
moduleValue = require(4631) /* metro dependency 4631: MediaFormatTesters */;
if (moduleValue.isImageContentType(contentType)) {
return 'IMAGE';
}
value = require(4631) /* metro dependency 4631: MediaFormatTesters */;
if (value.isVideoContentType(contentType)) {
return 'VIDEO';
}
return 'VISUAL_PLACEHOLDER';
}
return 'VISUAL_PLACEHOLDER';
}
return 'VISUAL_PLACEHOLDER';
}
return 'VISUAL_PLACEHOLDER';
}
return 'VISUAL_PLACEHOLDER';
}
global.__d(_fun76714, 9779, [661, 4631, 1391, 9780,
2]) /* metro module 9779, dependencies: [661, 4631, 1391, 9780, 2] */;
@@ -1,4 +1,6 @@
/* Metro module 9780; source: modules/messages/PlaintextFilePreviewHelpers.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun76718(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9966:6, offset: 0x01de2444, size: 135 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
@@ -35,16 +37,17 @@ function _fun76718(global, require, importDefault, importAll, module, exports, d
'terraform', 'tf', 'hcl', 'tap', 'thrift', 'tp', 'tsql', 'ttml', 'twig', 'craftcms', 'typescript', 'ts', 'tsx',
'unicorn-rails-log', 'vbnet', 'vb', 'vba', 'vbscript', 'vbs', 'vhdl', 'vala', 'verilog', 'v', 'vim', 'vtt',
'axapta', 'x++', 'x86asm', 'xl', 'tao', 'xquery', 'xpath', 'xq', 'yml', 'yaml', 'zephir', 'zep']);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/PlaintextFilePreviewHelpers.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/PlaintextFilePreviewHelpers.tsx');
exports.PLAINTEXT_FILE_EXTENSIONS = set;
exports.isPlaintextPreviewableFile = isPlaintextPreviewableFile;
function isPlaintextPreviewableFile(a0) { // fn#76719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9966:3282, offset: 0x01de24cb, size: 58 bytes, params: 2, frame: 13
const binding = env0_0;
const has = binding.has;
let value = a0.split('.');
value = value.slice(-1);
return Reflect.apply(has, binding, [value[0]]);
}
}
function isPlaintextPreviewableFile(a0) { // fn#76719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9966:3282, offset: 0x01de24cb, size: 58 bytes, params: 2, frame: 13
const binding = env0_0;
const has = binding.has;
let value = a0.split('.');
value = value.slice(-1);
return Reflect.apply(has, binding, [value[0]]);
}
global.__d(_fun76718, 9780, [2]) /* metro module 9780, dependencies: [2] */;
@@ -1,72 +1,89 @@
/* Metro module 11006; source: modules/messages/SendMessageOptionsStore.tsx; dependencies: [6, 7, 15, 17, 18, 4503, 566, 694, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as MessageConstantsModule from './MessageConstants.tsx'; /* Metro dependency 4503 */
function _fun84263(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11192:6, offset: 0x01f42dc4, size: 293 bytes, params: 8, frame: 19
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 env0_5 = (require(4503) /* metro dependency 4503: MessageConstants */).MessageSendLocation;
const env0_6 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun84267(Store);
value.displayName = 'SendMessageOptionsStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {MESSAGE_CREATE: MESSAGE_CREATE_84270});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/SendMessageOptionsStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/SendMessageOptionsStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_84264() { // fn#84264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11192:178, offset: 0x01f42ee9, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_84264() { // fn#84264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11192:178, offset: 0x01f42ee9, 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_84264_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_84264_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun84267(a0) { // fn#84267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11192:386, offset: 0x01f42f4b, size: 72 bytes, params: 2, frame: 15
const closure = SendMessageOptionsStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'getOptions', value: value_84269}]);
}
function _fun84267(a0) { // fn#84267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11192:386, offset: 0x01f42f4b, size: 72 bytes, params: 2, frame: 15
const SendMessageOptionsStore2 = SendMessageOptionsStore;
Inherits(SendMessageOptionsStore2, a0);
return CreateClass(SendMessageOptionsStore2, [{key: 'getOptions', value: value_84269}]);
function SendMessageOptionsStore() { // fn#84268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11192:398, offset: 0x00e3db8d, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, SendMessageOptionsStore);
const value3 = env1_3(SendMessageOptionsStore);
return env1_2(this, _isNativeReflectConstruct_84264() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function value_84269(a0) { // fn#84269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11192:731, offset: 0x00fbe09c, size: 16 bytes, params: 2, frame: 2
return env1_6[a0];
}
function MESSAGE_CREATE_84270({message, sendMessageOptions}) { // fn#84270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11192:851, offset: 0x01f42f93, size: 130 bytes, params: 2, frame: 17
var binding;
var id;
var object2;
if (sendMessageOptions != null) {
binding = env0_6;
id = message.id;
object2 = {};
copyDataProperties(object2, sendMessageOptions, undefined);
object2['location'] = sendMessageOptions.location ?? MessageSendLocation.OTHER;
binding[id] = object2;
}
if (message.nonce != null && message.nonce in env0_6) {
delete env0_6[message.nonce];
function MESSAGE_CREATE_84270({message, sendMessageOptions}) { // fn#84270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11192:851, offset: 0x01f42f93, size: 130 bytes, params: 2, frame: 17
var binding;
var id;
var object;
if (sendMessageOptions != null) {
binding = env0_6;
id = message.id;
object = {};
copyDataProperties(object, sendMessageOptions, undefined);
object['location'] = sendMessageOptions.location ?? MessageSendLocation.OTHER;
binding[id] = object;
}
if (message.nonce != null && message.nonce in env0_6) {
delete env0_6[message.nonce];
}
}
}
global.__d(_fun84263, 11006, [6, 7, 15, 17, 18, 4503, 566, 694,
2]) /* metro module 11006, dependencies: [6, 7, 15, 17, 18, 4503, 566, 694, 2] */;
@@ -1,11 +1,14 @@
/* Metro module 7148; source: modules/messages/SentMessageIntentsHandler.android.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun57175(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7326:6, offset: 0x013de74f, size: 112 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/SentMessageIntentsHandler.android.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/SentMessageIntentsHandler.android.tsx');
exports.default = {init: function() {
}, donateSentMessage: function() {
}, deleteAllInteractions: function() {
}};
}
global.__d(_fun57175, 7148, [2]) /* metro module 7148, dependencies: [2] */;
@@ -1,7 +1,13 @@
/* Metro module 9598; source: modules/messages/SignedAttachmentLinkUtils.tsx; dependencies: [5, 661, 672, 1471, 507, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import Durations from '../../utils/Durations.tsx'; /* Metro dependency 672 */
import URLUtils from '../../utils/URLUtils.tsx'; /* Metro dependency 1471 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun75228(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:6, offset: 0x01da70f0, size: 648 bytes, params: 8, frame: 26
const env0_0 = require;
const closure = isAttachmentUrl;
const isAttachmentUrl2 = isAttachmentUrl;
const closure2 = function({searchParams}) {
var value = searchParams.get('ex');
searchParams = global.parseInt;
@@ -13,8 +19,6 @@ function _fun75228(global, require, importDefault, importAll, module, exports, d
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = undefined;
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).Endpoints;
const closure3 = function(a0) {
return a0 == null ? undefined : a0.split(':')[0];
};
@@ -22,17 +26,17 @@ function _fun75228(global, require, importDefault, importAll, module, exports, d
let set = new Set(['/attachments/', '/ephemeral-attachments/']);
Set = global.Set;
set = new Set(['/external/']);
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const Millis = (Durations).Millis;
const HOUR = Millis.HOUR;
const env0_7 = 1 * HOUR;
Set = global.Set;
let GLOBAL_ENV = global.window.GLOBAL_ENV;
const CDN_HOST = GLOBAL_ENV.CDN_HOST;
items = [CDN_HOST];
items2 = [CDN_HOST];
GLOBAL_ENV = global.window.GLOBAL_ENV;
const MEDIA_PROXY_ENDPOINT = GLOBAL_ENV.MEDIA_PROXY_ENDPOINT;
items[1] = MEDIA_PROXY_ENDPOINT == null ? value : MEDIA_PROXY_ENDPOINT.substring(2);
const value7 = items.map(closure3);
items2[1] = MEDIA_PROXY_ENDPOINT == null ? value : MEDIA_PROXY_ENDPOINT.substring(2);
const value7 = items2.map(closure3);
let filter = value7.filter;
let Boolean = global.Boolean;
set = new Set(Reflect.apply(filter, value7, [Boolean]));
@@ -47,8 +51,8 @@ function _fun75228(global, require, importDefault, importAll, module, exports, d
filter = value13.filter;
Boolean = global.Boolean;
set = new Set(Reflect.apply(filter, value13, [Boolean]));
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/SignedAttachmentLinkUtils.tsx');
exports.isAttachmentUrl = closure;
(FileImportTrackerModule).fileFinishedImporting('modules/messages/SignedAttachmentLinkUtils.tsx');
exports.isAttachmentUrl = isAttachmentUrl2;
exports.isExternalProxiedAttachmentUrl = isExternalProxiedAttachmentUrl;
exports.removeSignedUrlParameters = removeSignedUrlParameters;
exports.getSignedAttachmentExpiration = closure2;
@@ -57,146 +61,156 @@ function _fun75228(global, require, importDefault, importAll, module, exports, d
return _maybeRefreshAttachmentUrl.apply(this, arguments);
};
return value;
}
function isAttachmentUrl(a0) { // fn#75229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:612, offset: 0x01da7378, size: 86 bytes, params: 2, frame: 13
const env0_0 = a0;
const binding = env0_8;
const value2 = binding.has(a0.hostname);
const Array = global.Array;
let value = Array.from(env0_5);
value = value.some(_fun75230);
return value2 ? value : !!value2;
}
function shouldRefreshAttachmentUrl(a0) { // fn#75232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:877, offset: 0x01da7460, size: 57 bytes, params: 2, frame: 13
const signedAttachmentExpiration = getSignedAttachmentExpiration(a0);
return signedAttachmentExpiration == null || signedAttachmentExpiration <= global.Date.now() + env0_7;
}
function isAttachmentExpired({url}) { // fn#75233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:987, offset: 0x01da7499, size: 64 bytes, params: 2, frame: 13
const value2 = (importDefault(1471) /* metro dependency 1471: URLUtils */).toURLSafe(url);
return value2 != null && shouldRefreshAttachmentUrl(value2);
}
function isEmbedMediaExpiredAttachment(a0) { // fn#75234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:1096, offset: 0x01da74d9, size: 93 bytes, params: 2, frame: 14
var r0;
var isAttachmentUrl2;
if (a0 == null) {
return false;
}
const defaultImport = importDefault(1471) /* metro dependency 1471: URLUtils */;
const value2 = defaultImport.toURLSafe(a0.url);
const value3 = value2 != null;
if (value3) {
isAttachmentUrl2 = isAttachmentUrl(value2);
r0 = isAttachmentUrl2 ? shouldRefreshAttachmentUrl(value2) : !!isAttachmentUrl2;
} else {
r0 = value3;
}
return r0;
}
function embedHasExpiredAttachmentUrl(a0) { // fn#75235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:1259, offset: 0x01da7536, size: 81 bytes, params: 2, frame: 16
let r0 = isEmbedMediaExpiredAttachment(a0.image) || a0.images?.some(isEmbedMediaExpiredAttachment);
r0 = !r0 ? isEmbedMediaExpiredAttachment(a0.video) : r0;
return r0;
}
function _refreshAttachmentUrl() { // fn#75236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:1459, offset: 0x01da7587, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun75238).apply(this, arguments);
}
function _maybeRefreshAttachmentUrl() { // fn#75239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:1727, offset: 0x01da765e, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun75241).apply(this, arguments);
}
function isExternalProxiedAttachmentUrl(a0) { // fn#75245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:2222, offset: 0x01da7743, size: 86 bytes, params: 2, frame: 13
const env0_0 = a0;
const binding = env0_9;
const value2 = binding.has(a0.hostname);
const Array = global.Array;
let value = Array.from(env0_6);
value = value.some(_fun75246);
return value2 ? value : !!value2;
}
function removeSignedUrlParameters(a0) { // fn#75247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:2383, offset: 0x01da7799, size: 105 bytes, params: 2, frame: 15
var r3;
var property;
var searchParams;
var value3;
let value = importDefault(1471) /* metro dependency 1471: URLUtils */;
value = value.toURLSafe(a0);
if (value == null) {
return a0;
}
const items2 = ['ex', 'is', 'hm'];
let length = items2.length;
const value2 = 0;
if (value2 < length) {
r3 = value2;
reducibleLoop2: while (true) {
property = items2[r3];
searchParams = value.searchParams;
searchParams.delete(property);
value3 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
length = items2.length;
if (value3 < length) {
r3 = value3;
continue reducibleLoop2;
}
break reducibleLoop2;
function isAttachmentUrl(a0) { // fn#75229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:612, offset: 0x01da7378, size: 86 bytes, params: 2, frame: 13
const env0_0 = a0;
const binding = env0_8;
const value2 = binding.has(a0.hostname);
const Array = global.Array;
let value = Array.from(env0_5);
value = value.some(_fun75230);
return value2 ? value : !!value2;
function _fun75230(a0) { // fn#75230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:686, offset: 0x01da73ce, size: 29 bytes, params: 2, frame: 11
return env0_0.pathname.startsWith(a0);
}
}
return value;
}
function messageHasExpiredAttachmentUrl(a0) { // fn#75248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:2656, offset: 0x01da7802, size: 53 bytes, params: 2, frame: 13
const attachments = a0.attachments;
return attachments.some(isAttachmentExpired) || a0.embeds.some(embedHasExpiredAttachmentUrl);
}
function _fun75230(a0) { // fn#75230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:686, offset: 0x01da73ce, size: 29 bytes, params: 2, frame: 11
return env0_0.pathname.startsWith(a0);
}
function* _fun75238(a0) { // fn#75238, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:1524, offset: 0x01da75c4, size: 154 bytes, params: 2, frame: 16
if (false) {
return undefined;
function shouldRefreshAttachmentUrl(a0) { // fn#75232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:877, offset: 0x01da7460, size: 57 bytes, params: 2, frame: 13
const signedAttachmentExpiration = getSignedAttachmentExpiration(a0);
return signedAttachmentExpiration == null || signedAttachmentExpiration <= global.Date.now() + env0_7;
}
value = environment.__proto__.__proto__;
const binding = env2_0;
const value3 = undefined;
const HTTP = binding(env2_2[4]).HTTP;
const post = HTTP.post;
const ATTACHMENTS_REFRESH_URLS = env2_4.ATTACHMENTS_REFRESH_URLS;
yield Reflect.apply(post, HTTP, [{url: ATTACHMENTS_REFRESH_URLS, body: {attachment_urls: [a0]},
rejectWithError: false}]);
value = undefined;
if (false) {
function isAttachmentExpired({url}) { // fn#75233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:987, offset: 0x01da7499, size: 64 bytes, params: 2, frame: 13
const value2 = (URLUtils).toURLSafe(url);
return value2 != null && shouldRefreshAttachmentUrl(value2);
}
function isEmbedMediaExpiredAttachment(a0) { // fn#75234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:1096, offset: 0x01da74d9, size: 93 bytes, params: 2, frame: 14
var r0;
var isAttachmentUrl2;
if (a0 == null) {
return false;
}
const defaultImport = URLUtils;
const value2 = defaultImport.toURLSafe(a0.url);
const value3 = value2 != null;
if (value3) {
isAttachmentUrl2 = isAttachmentUrl(value2);
r0 = isAttachmentUrl2 ? shouldRefreshAttachmentUrl(value2) : !!isAttachmentUrl2;
} else {
r0 = value3;
}
return r0;
}
function embedHasExpiredAttachmentUrl(a0) { // fn#75235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:1259, offset: 0x01da7536, size: 81 bytes, params: 2, frame: 16
let r0 = isEmbedMediaExpiredAttachment(a0.image) || a0.images?.some(isEmbedMediaExpiredAttachment);
r0 = !r0 ? isEmbedMediaExpiredAttachment(a0.video) : r0;
return r0;
}
function _refreshAttachmentUrl() { // fn#75236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:1459, offset: 0x01da7587, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun75238).apply(this, arguments);
function* _fun75238(a0) { // fn#75238, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:1524, offset: 0x01da75c4, size: 154 bytes, params: 2, frame: 16
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const binding = env2_0;
const value3 = undefined;
const HTTP = binding(env2_2[4]).HTTP;
const post = HTTP.post;
const ATTACHMENTS_REFRESH_URLS = env2_4.ATTACHMENTS_REFRESH_URLS;
yield Reflect.apply(post, HTTP, [{url: ATTACHMENTS_REFRESH_URLS, body: {attachment_urls: [a0]},
rejectWithError: false}]);
value = undefined;
if (false) {
return value;
}
return value.ok ? value.body.refreshed_urls[0].refreshed : value3;
}
}
function _maybeRefreshAttachmentUrl() { // fn#75239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:1727, offset: 0x01da765e, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun75241).apply(this, arguments);
function* _fun75241(a0) { // fn#75241, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:1802, offset: 0x01da769b, size: 113 bytes, params: 2, frame: 15
var value7;
const value = a0;
if (false) {
return undefined;
}
const value6 = env2_1(env2_2[3]).toURLSafe(value);
if (value6 != null) {
if (env2_12(value6)) {
yield refreshAttachmentUrl(value);
value7 = undefined;
if (false) {
return value7;
}
return value7 ?? value;
}
}
return value;
function refreshAttachmentUrl() { // fn#75242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:1917, offset: 0x00eedcb2, size: 30 bytes, params: 1, frame: 13
return env3_16.apply(this, arguments);
}
}
}
function isExternalProxiedAttachmentUrl(a0) { // fn#75245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:2222, offset: 0x01da7743, size: 86 bytes, params: 2, frame: 13
const env0_0 = a0;
const binding = env0_9;
const value2 = binding.has(a0.hostname);
const Array = global.Array;
let value = Array.from(env0_6);
value = value.some(_fun75246);
return value2 ? value : !!value2;
function _fun75246(a0) { // fn#75246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:2311, offset: 0x01da73ce, size: 29 bytes, params: 2, frame: 11
return env0_0.pathname.startsWith(a0);
}
}
function removeSignedUrlParameters(a0) { // fn#75247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:2383, offset: 0x01da7799, size: 105 bytes, params: 2, frame: 15
var r3;
var property;
var searchParams;
var value3;
let value = URLUtils;
value = value.toURLSafe(a0);
if (value == null) {
return a0;
}
const items2 = ['ex', 'is', 'hm'];
let length = items2.length;
const value2 = 0;
if (value2 < length) {
r3 = value2;
reducibleLoop2: while (true) {
property = items2[r3];
searchParams = value.searchParams;
searchParams.delete(property);
value3 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
length = items2.length;
if (value3 < length) {
r3 = value3;
continue reducibleLoop2;
}
break reducibleLoop2;
}
}
return value;
}
return value.ok ? value.body.refreshed_urls[0].refreshed : value3;
}
function* _fun75241(a0) { // fn#75241, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:1802, offset: 0x01da769b, size: 113 bytes, params: 2, frame: 15
var value7;
const value = a0;
if (false) {
return undefined;
function messageHasExpiredAttachmentUrl(a0) { // fn#75248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:2656, offset: 0x01da7802, size: 53 bytes, params: 2, frame: 13
const attachments = a0.attachments;
return attachments.some(isAttachmentExpired) || a0.embeds.some(embedHasExpiredAttachmentUrl);
}
const value6 = env2_1(env2_2[3]).toURLSafe(value);
if (value6 != null) {
if (env2_12(value6)) {
yield refreshAttachmentUrl(value);
value7 = undefined;
if (false) {
return value7;
}
return value7 ?? value;
}
}
return value;
}
global.__d(_fun75228, 9598, [5, 661, 672, 1471, 507,
2]) /* metro module 9598, dependencies: [5, 661, 672, 1471, 507, 2] */;
@@ -1,21 +1,25 @@
/* Metro module 9856; source: modules/messages/VoiceChannelListInviteExperiment.tsx; dependencies: [4620, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ExperimentsModule from '../experiments/index.tsx'; /* Metro dependency 4620 */
function _fun77271(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10042:6, offset: 0x01df78a8, size: 194 bytes, params: 8, frame: 22
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(4620) /* metro dependency 4620: experiments */).createExperiment({'kind': 'guild',
const env0_0 = (ExperimentsModule).createExperiment({'kind': 'guild',
'id': '2026-05_voice_channel_list_invite_embed', 'label': 'Voice Channel List Invite Embed',
defaultConfig: {enabled: false}, treatments: [{'id': 1, 'label': 'Enable channel-list-style voice invite embed',
config: {enabled: true}}]});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/VoiceChannelListInviteExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/VoiceChannelListInviteExperiment.tsx');
exports.getVoiceChannelListInviteExperiment = getVoiceChannelListInviteExperiment;
exports.useVoiceChannelListInviteExperiment = useVoiceChannelListInviteExperiment;
function getVoiceChannelListInviteExperiment({guildId, location}) { // fn#77272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10042:469, offset: 0x01df796a, size: 43 bytes, params: 2, frame: 13
return env0_0.getCurrentConfig({guildId: guildId, location: location});
}
function useVoiceChannelListInviteExperiment({guildId, location}) { // fn#77273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10042:627, offset: 0x01df7995, size: 43 bytes, params: 2, frame: 13
return env0_0.useExperiment({guildId: guildId, location: location});
}
}
function getVoiceChannelListInviteExperiment({guildId, location}) { // fn#77272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10042:469, offset: 0x01df796a, size: 43 bytes, params: 2, frame: 13
return env0_0.getCurrentConfig({guildId: guildId, location: location});
}
function useVoiceChannelListInviteExperiment({guildId, location}) { // fn#77273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10042:627, offset: 0x01df7995, size: 43 bytes, params: 2, frame: 13
return env0_0.useExperiment({guildId: guildId, location: location});
}
global.__d(_fun77271, 9856, [4620, 2]) /* metro module 9856, dependencies: [4620, 2] */;
+141 -128
View File
@@ -1,4 +1,15 @@
/* Metro module 8319; source: modules/messages/VoiceSessionUtils.tsx; dependencies: [31, 5221, 1379, 1878, 8320, 566, 8213, 4634, 1244, 22, 2] */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import UserAffinitiesV2Store from '../user_affinities/UserAffinitiesV2Store.tsx'; /* Metro dependency 5221 */
import GetHumanizedCallDuration from './getHumanizedCallDuration.tsx'; /* Metro dependency 8213 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as Module00022Module from '../../by-id/module-00022.js'; /* Metro dependency 22 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseMessageAuthorModule from './useMessageAuthor.tsx'; /* Metro dependency 4634 */
function _fun66244(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:6, offset: 0x01bf4d30, size: 201 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = function(a0) {
@@ -8,143 +19,145 @@ function _fun66244(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const userAffinitiesV2Store = importDefault(5221) /* metro dependency 5221: UserAffinitiesV2Store */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/VoiceSessionUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/VoiceSessionUtils.tsx');
exports.getSortedVoiceSessionParticipants = closure;
exports.useSortedVoiceSessionParticipants = useSortedVoiceSessionParticipants;
exports.getVoiceSessionMessageContent = getVoiceSessionMessageContent;
}
function getSortedVoiceSessionParticipants(a0) { // fn#66245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:136, offset: 0x01bf4df9, size: 77 bytes, params: 2, frame: 16
return (require(8320) /* metro dependency 8320: maybeSortByProbability */).maybeSortByProbability(((a0) => {
var r0;
var env0_0 = a0;
var property = a0.call;
r0 = property == null ? undefined : property.participants.reduce(_fun66247, []);
r0 = r0 ?? [];
return r0;
})(a0), UserAffinitiesV2Store.getUserAffinitiesMap(), 'VoiceSessionUtils - participants');
function _fun66246(a0) { // fn#66246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:189, offset: 0x01bf4e46, size: 64 bytes, params: 2, frame: 15
const env0_0 = a0;
const call = a0.call;
let r0 = call == null ? undefined : call.participants.reduce(_fun66247, []);
r0 = r0 ?? [];
return r0;
function _fun66247(a0, a1) { // fn#66247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:264, offset: 0x01bf4e86, size: 96 bytes, params: 3, frame: 15
var r0;
var items2;
let value = a0;
const user = UserStore.getUser(a1);
if (user == null) {
r0 = value;
} else if (user.id === env0_0.author.id) {
r0 = value;
} else {
items2 = [];
value = arraySpread(items2, value, 0, value);
items2[value] = user;
value + 1;
r0 = items2;
}
return r0;
}
function getSortedVoiceSessionParticipants(a0) { // fn#66245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:136, offset: 0x01bf4df9, size: 77 bytes, params: 2, frame: 16
return (require(8320) /* metro dependency 8320: maybeSortByProbability */).maybeSortByProbability(((a0) => {
}
}
function useSortedVoiceSessionParticipants(a0) { // fn#66248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:638, offset: 0x01bf4ee6, size: 121 bytes, params: 2, frame: 18
return ReactModule.useMemo(_fun66255, [((a0) => {
var env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([UserStore], _fun66250,
[a0.author.id, a0.call]);
})(a0), (require(566) /* metro dependency 566: flux */).useStateFromStores([UserAffinitiesV2Store], function() {
return UserAffinitiesV2Store.getUserAffinitiesMap();
}, [])]);
function _fun66249(a0) { // fn#66249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:691, offset: 0x01bf4f5f, size: 96 bytes, params: 2, frame: 17
const env0_0 = a0;
return (FluxModule).useStateFromStoresArray([UserStore], _fun66250,
[a0.author.id, a0.call]);
function _fun66250() { // fn#66250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:731, offset: 0x01bf4fbf, size: 109 bytes, params: 1, frame: 14
var r0;
var value;
if (env0_0.call?.participants != null) {
value = env0_0.call.participants.map(function(a0) {
return UserStore.getUser(a0);
});
value = value.filter(_fun66252);
value = value.filter(_fun66253);
r0 = value;
} else {
r0 = [];
}
return r0;
function _fun66253({id}) { // fn#66253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:868, offset: 0x01bf5043, size: 32 bytes, params: 2, frame: 2
return id !== env1_0.author.id;
}
}
}
function _fun66255() { // fn#66255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:1009, offset: 0x01bf5076, size: 57 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(8320) /* metro dependency 8320: maybeSortByProbability */;
return value.maybeSortByProbability(env0_0, env0_1, 'VoiceSessionUtils - participants');
}
}
function getVoiceSessionMessageContent(a0) { // fn#66256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:1125, offset: 0x01bf50af, size: 461 bytes, params: 2, frame: 24
var nick;
var r0;
var env0_0 = a0;
var property = a0.call;
r0 = property == null ? undefined : property.participants.reduce(_fun66247, []);
r0 = r0 ?? [];
const intl = (IndexNativeModule).intl;
var formatToPlainString;
const t = (IndexNativeModule).t;
var atbXuX;
var object;
var length;
const identity = (Module00022Module).identity;
var property;
const env0_0 = ChannelStore.getChannel(a0.channel_id);
const value2 = undefined;
const value3 = (GetHumanizedCallDuration)(a0);
const messageAuthor = (UseMessageAuthorModule).getMessageAuthor(a0);
const value6 = getSortedVoiceSessionParticipants(a0).map(_fun66257);
if (value3 == null) {
r0 = intl.formatToPlainString(t.HzBfIN, {username: messageAuthor.nick, usernameOnClick: identity});
} else {
formatToPlainString = intl.formatToPlainString;
atbXuX = t.atbXuX;
object = {};
length = value6.length;
object.userCount = length + 1;
nick = messageAuthor.nick;
object.username = nick;
object.usernameOnClick = identity;
property = value6[0];
nick = property == null ? value2 : property.messageAuthor.nick;
object.username2 = nick;
object.username2OnClick = identity;
property = value6[1];
nick = property == null ? value2 : property.messageAuthor.nick;
object.username3 = nick;
object.username3OnClick = identity;
length = value6.length;
object.otherCount = length - 1;
object.duration = value3;
r0 = Reflect.apply(formatToPlainString, intl, [atbXuX, object]);
}
return r0;
})(a0), UserAffinitiesV2Store.getUserAffinitiesMap(), 'VoiceSessionUtils - participants');
}
function _fun66257(a0) { // fn#66257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:1291, offset: 0x01bf527c, size: 60 bytes, params: 2, frame: 14
const object = {user: a0};
const value = environment.__proto__;
object.messageAuthor = (require(4634) /* metro dependency 4634: useMessageAuthor */).getUserAuthor(a0, env0_0);
return object;
}
function useSortedVoiceSessionParticipants(a0) { // fn#66248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:638, offset: 0x01bf4ee6, size: 121 bytes, params: 2, frame: 18
return env0_3.useMemo(_fun66255, [((a0) => {
var env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([UserStore], _fun66250,
[a0.author.id, a0.call]);
})(a0), (require(566) /* metro dependency 566: flux */).useStateFromStores([UserAffinitiesV2Store], function() {
return UserAffinitiesV2Store.getUserAffinitiesMap();
}, [])]);
}
function getVoiceSessionMessageContent(a0) { // fn#66256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:1125, offset: 0x01bf50af, size: 461 bytes, params: 2, frame: 24
var nick;
var r0;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var atbXuX;
var object2;
var length;
const identity = (require(22) /* metro dependency 22 */).identity;
var property;
const env0_0 = ChannelStore.getChannel(a0.channel_id);
const value2 = undefined;
const value3 = (importDefault(8213) /* metro dependency 8213: getHumanizedCallDuration */)(a0);
const messageAuthor = (require(4634) /* metro dependency 4634: useMessageAuthor */).getMessageAuthor(a0);
const value6 = getSortedVoiceSessionParticipants(a0).map(_fun66257);
if (value3 == null) {
r0 = intl.formatToPlainString(t.HzBfIN, {username: messageAuthor.nick, usernameOnClick: identity});
} else {
formatToPlainString = intl.formatToPlainString;
atbXuX = t.atbXuX;
object2 = {};
length = value6.length;
object2.userCount = length + 1;
nick = messageAuthor.nick;
object2.username = nick;
object2.usernameOnClick = identity;
property = value6[0];
nick = property == null ? value2 : property.messageAuthor.nick;
object2.username2 = nick;
object2.username2OnClick = identity;
property = value6[1];
nick = property == null ? value2 : property.messageAuthor.nick;
object2.username3 = nick;
object2.username3OnClick = identity;
length = value6.length;
object2.otherCount = length - 1;
object2.duration = value3;
r0 = Reflect.apply(formatToPlainString, intl, [atbXuX, object2]);
}
return r0;
}
function _fun66246(a0) { // fn#66246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:189, offset: 0x01bf4e46, size: 64 bytes, params: 2, frame: 15
const env0_0 = a0;
const call = a0.call;
let r0 = call == null ? undefined : call.participants.reduce(_fun66247, []);
r0 = r0 ?? [];
return r0;
}
function _fun66249(a0) { // fn#66249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:691, offset: 0x01bf4f5f, size: 96 bytes, params: 2, frame: 17
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([UserStore], _fun66250,
[a0.author.id, a0.call]);
}
function _fun66255() { // fn#66255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:1009, offset: 0x01bf5076, size: 57 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(8320) /* metro dependency 8320: maybeSortByProbability */;
return value.maybeSortByProbability(env0_0, env0_1, 'VoiceSessionUtils - participants');
}
function _fun66257(a0) { // fn#66257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:1291, offset: 0x01bf527c, size: 60 bytes, params: 2, frame: 14
const object2 = {user: a0};
const value = environment.__proto__;
object2.messageAuthor = (require(4634) /* metro dependency 4634: useMessageAuthor */).getUserAuthor(a0, env0_0);
return object2;
}
function _fun66247(a0, a1) { // fn#66247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:264, offset: 0x01bf4e86, size: 96 bytes, params: 3, frame: 15
var r0;
var items2;
let value = a0;
const user = UserStore.getUser(a1);
if (user == null) {
r0 = value;
} else if (user.id === env0_0.author.id) {
r0 = value;
} else {
items2 = [];
value = arraySpread(items2, value, 0, value);
items2[value] = user;
value + 1;
r0 = items2;
}
return r0;
}
function _fun66250() { // fn#66250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:731, offset: 0x01bf4fbf, size: 109 bytes, params: 1, frame: 14
var r0;
var value;
if (env0_0.call?.participants != null) {
value = env0_0.call.participants.map(function(a0) {
return UserStore.getUser(a0);
});
value = value.filter(_fun66252);
value = value.filter(_fun66253);
r0 = value;
} else {
r0 = [];
}
return r0;
}
function _fun66253({id}) { // fn#66253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:868, offset: 0x01bf5043, size: 32 bytes, params: 2, frame: 2
return id !== env1_0.author.id;
function _fun66252(a0) { // fn#66252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:847, offset: 0x00d0b2f0, size: 11 bytes, params: 2, frame: 2
return a0 != null;
}
global.__d(_fun66244, 8319, [31, 5221, 1379, 1878, 8320, 566, 8213, 4634, 1244, 22,
2]) /* metro module 8319, dependencies: [31, 5221, 1379, 1878, 8320, 566, 8213, 4634, 1244, 22, 2] */;
@@ -1,50 +1,53 @@
/* Metro module 4632; source: modules/messages/WebViewWebmSupportTest.native.tsx; dependencies: [477, 4092, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as PlatformUtilsModule from '../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
function _fun39864(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4810:6, offset: 0x010ee04e, size: 94 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/messages/WebViewWebmSupportTest.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/WebViewWebmSupportTest.native.tsx');
exports.isIOSWithWebM = isIOSWithWebM;
}
function isIOSWithWebM() { // fn#39865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4810:207, offset: 0x010ee0ac, size: 233 bytes, params: 1, frame: 17
var r0;
var r1;
var r3;
var r2;
var value6;
var value7;
var value;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isIOS()) {
value = require(4092) /* metro dependency 4092: DeviceUtils */;
value = value.getSocName();
r0 = value == null || !value.startsWith('ARM64_');
if (!r0) {
value = value.substring(6);
r1 = value[0] !== 'T' && value[0] !== 'S';
if (!r1) {
value = value.substring(1);
value6 = value[0] !== '7';
if (value6) {
value7 = value[0] !== '8';
if (value7) {
r3 = value7;
function isIOSWithWebM() { // fn#39865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4810:207, offset: 0x010ee0ac, size: 233 bytes, params: 1, frame: 17
var r0;
var r1;
var r3;
var r2;
var value6;
var value7;
var value;
if (PlatformUtilsModule.isIOS()) {
value = require(4092) /* metro dependency 4092: DeviceUtils */;
value = value.getSocName();
r0 = value == null || !value.startsWith('ARM64_');
if (!r0) {
value = value.substring(6);
r1 = value[0] !== 'T' && value[0] !== 'S';
if (!r1) {
value = value.substring(1);
value6 = value[0] !== '7';
if (value6) {
value7 = value[0] !== '8';
if (value7) {
r3 = value7;
} else {
value = global.parseInt(value, 10);
value = value >= 8101;
r3 = value;
}
r2 = r3;
} else {
value = global.parseInt(value, 10);
value = value >= 8101;
r3 = value;
r2 = value6;
}
r2 = r3;
} else {
r2 = value6;
r1 = r2;
}
r1 = r2;
r0 = r1;
}
r0 = r1;
return r0;
}
return r0;
return false;
}
return false;
}
global.__d(_fun39864, 4632, [477, 4092, 2]) /* metro module 4632, dependencies: [477, 4092, 2] */;
@@ -1,10 +1,20 @@
/* Metro module 16156; source: modules/messages/YYTextReplacementExperiment.tsx; dependencies: [1854, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ApexModule from '../experiments/apex/index.tsx'; /* Metro dependency 1854 */
function _fun124895(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#124895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16364:6, offset: 0x025c6a9c, size: 158 bytes, params: 8, frame: 21
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(1854) /* metro dependency 1854: apex */).createApexExperiment({'name': '2026-01-yytext-replacement-ios',
const env0_0 = (ApexModule).createApexExperiment({'name': '2026-01-yytext-replacement-ios',
'kind': 'user', defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/YYTextReplacementExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/YYTextReplacementExperiment.tsx');
exports.shouldEnableYYTextReplacement = shouldEnableYYTextReplacement;
function shouldEnableYYTextReplacement({location}) { // fn#124896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16364:349, offset: 0x01195c54, size: 39 bytes, params: 2, frame: 12
const binding = env0_0;
const getConfig = binding.getConfig;
return Reflect.apply(getConfig, binding, [{location: location}]).enabled;
}
}
global.__d(_fun124895, 16156, [1854, 2]) /* metro module 16156, dependencies: [1854, 2] */;
+34 -33
View File
@@ -1,49 +1,50 @@
/* Metro module 5260; source: modules/messages/canEditMessage.tsx; dependencies: [661, 5216, 4625, 4845, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun46780(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#46780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5438:6, offset: 0x011aea56, size: 142 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_3 = constantsModule.MessageFlags;
const env0_4 = constantsModule.MessageStates;
const env0_5 = constantsModule.MessageTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/canEditMessage.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/canEditMessage.tsx');
exports.default = canEditMessage;
}
function canEditMessage(a0, a1) { // fn#46781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5438:237, offset: 0x011aeae4, size: 275 bytes, params: 3, frame: 22
var r3;
var r2;
var r1;
var r0;
var value2;
var value3;
var canEditMessageWithStickers2;
let value = a1 != null;
if (value) {
value = a0.author.id === a1;
function canEditMessage(a0, a1) { // fn#46781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5438:237, offset: 0x011aeae4, size: 275 bytes, params: 3, frame: 22
var r3;
var r2;
var r1;
var r0;
var value2;
var value3;
var canEditMessageWithStickers2;
let value = a1 != null;
if (value) {
value2 = a0.state === MessageStates.SENT;
if (value2) {
value3 = (importDefault(5216) /* metro dependency 5216: isSystemMessage */)(a0);
if (value3) {
r3 = !value3;
value = a0.author.id === a1;
if (value) {
value2 = a0.state === MessageStates.SENT;
if (value2) {
value3 = (importDefault(5216) /* metro dependency 5216: isSystemMessage */)(a0);
if (value3) {
r3 = !value3;
} else {
canEditMessageWithStickers2 = (require(4625) /* metro dependency 4625: MessageRecordUtils */).canEditMessageWithStickers(a0);
r3 = canEditMessageWithStickers2 ? !a0.hasFlag(MessageFlags.IS_VOICE_MESSAGE) && (a0.referralTrialOfferId == null && (!a0.isPoll() && (!(importDefault(4845) /* metro dependency 4845: isForwardMessage */)(a0) && a0.type !== MessageTypes.MEDIA_MENTION_MESSAGE))) : !!canEditMessageWithStickers2;
}
r2 = r3;
} else {
canEditMessageWithStickers2 = (require(4625) /* metro dependency 4625: MessageRecordUtils */).canEditMessageWithStickers(a0);
r3 = canEditMessageWithStickers2 ? !a0.hasFlag(MessageFlags.IS_VOICE_MESSAGE) && (a0.referralTrialOfferId == null && (!a0.isPoll() && (!(importDefault(4845) /* metro dependency 4845: isForwardMessage */)(a0) && a0.type !== MessageTypes.MEDIA_MENTION_MESSAGE))) : !!canEditMessageWithStickers2;
r2 = value2;
}
r2 = r3;
r1 = r2;
} else {
r2 = value2;
r1 = value;
}
r1 = r2;
r0 = r1;
} else {
r1 = value;
r0 = value;
}
r0 = r1;
} else {
r0 = value;
return r0;
}
return r0;
}
global.__d(_fun46780, 5260, [661, 5216, 4625, 4845,
2]) /* metro module 5260, dependencies: [661, 5216, 4625, 4845, 2] */;
@@ -1,4 +1,10 @@
/* Metro module 11334; source: modules/messages/computeGlobalSpoilerDisplay.tsx; dependencies: [3784, 661, 632, 3829, 2] */
import PermissionStore from '../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UseStateFromStoresModule from '../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as UserSettingsModule from '../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
function _fun86558(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11520:6, offset: 0x01f97b00, size: 163 bytes, params: 8, frame: 19
let env0_0 = require;
const closure = function(a0, a1) {
@@ -13,11 +19,7 @@ function _fun86558(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_3 = constantsModule.Permissions;
const env0_4 = constantsModule.SpoilerRenderSetting;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/computeGlobalSpoilerDisplay.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/computeGlobalSpoilerDisplay.tsx');
exports.default = closure;
exports.useShouldDisplaySpoilerObscurity = function(a0) {
var env0_0 = a0;
@@ -26,21 +28,24 @@ function _fun86558(global, require, importDefault, importAll, module, exports, d
var RenderSpoilers = require(dependencyMap[3]).RenderSpoilers;
return !computeGlobalSpoilerDisplayBinding(RenderSpoilers.useSetting(), value2);
};
function useShouldDisplaySpoilerObscurity(a0) { // fn#86560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11520:450, offset: 0x01f97bdc, size: 107 bytes, params: 2, frame: 18
const env0_0 = a0;
const value2 = (UseStateFromStoresModule).useStateFromStores([PermissionStore],
_fun86561);
const computeGlobalSpoilerDisplayBinding = computeGlobalSpoilerDisplay;
const RenderSpoilers = (UserSettingsModule).RenderSpoilers;
const useSetting = RenderSpoilers.useSetting;
return !computeGlobalSpoilerDisplayBinding(Reflect.apply(useSetting, RenderSpoilers, []), value2);
function _fun86561() { // fn#86561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11520:533, offset: 0x01f97c47, size: 38 bytes, params: 1, frame: 13
const permissionStoreBinding = PermissionStore;
const can = permissionStoreBinding.can;
const MANAGE_MESSAGES = Permissions.MANAGE_MESSAGES;
return Reflect.apply(can, permissionStoreBinding, [MANAGE_MESSAGES, env0_0]);
}
}
}
function useShouldDisplaySpoilerObscurity(a0) { // fn#86560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11520:450, offset: 0x01f97bdc, size: 107 bytes, params: 2, frame: 18
const env0_0 = a0;
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([PermissionStore],
_fun86561);
const computeGlobalSpoilerDisplayBinding = computeGlobalSpoilerDisplay;
const RenderSpoilers = (require(3829) /* metro dependency 3829: UserSettings */).RenderSpoilers;
const useSetting = RenderSpoilers.useSetting;
return !computeGlobalSpoilerDisplayBinding(Reflect.apply(useSetting, RenderSpoilers, []), value2);
}
function _fun86561() { // fn#86561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11520:533, offset: 0x01f97c47, size: 38 bytes, params: 1, frame: 13
const can = PermissionStore.can;
const MANAGE_MESSAGES = Permissions.MANAGE_MESSAGES;
return Reflect.apply(can, PermissionStore, [MANAGE_MESSAGES, env0_0]);
}
global.__d(_fun86558, 11334, [3784, 661, 632, 3829,
2]) /* metro module 11334, dependencies: [3784, 661, 632, 3829, 2] */;
@@ -1,8 +1,10 @@
/* Metro module 11406; source: modules/messages/countContentTypes.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun87390(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11592:6, offset: 0x01fbd0d3, size: 87 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/countContentTypes.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/countContentTypes.tsx');
exports.default = countContentTypes;
}
@@ -17,3 +19,4 @@ function countContentTypes(a0) { // fn#87391, source: /ci/build/discord/discord/
return a0.poll == null ? r1 : typeof r1 === 'bigint' ? r1 + 1n : +r1 + 1;
}
global.__d(_fun87390, 11406, [2]) /* metro module 11406, dependencies: [2] */;
+107 -108
View File
@@ -1,4 +1,11 @@
/* Metro module 7141; source: modules/messages/createMessage.tsx; dependencies: [4833, 1885, 1878, 661, 44, 7142, 2] */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import UserRecord from '../../records/UserRecord.tsx'; /* Metro dependency 1885 */
import ReferencedMessageStore from '../replies/ReferencedMessageStore.tsx'; /* Metro dependency 4833 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as ReferencedMessageStoreModule from '../replies/ReferencedMessageStore.tsx'; /* Metro dependency 4833 */
function _fun57133(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7319:6, offset: 0x013dd58b, size: 255 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = function({id, username, avatar, discriminator, bot, globalName, primaryGuild}) {
@@ -8,121 +15,113 @@ function _fun57133(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const referencedMessageStore = importDefault(4833) /* metro dependency 4833: ReferencedMessageStore */;
const env0_4 = (require(4833) /* metro dependency 4833: ReferencedMessageStore */).ReferencedMessageState;
const userRecord = importDefault(1885) /* metro dependency 1885: UserRecord */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_7 = constantsModule.MessageStates;
const env0_8 = constantsModule.MessageTypes;
const env0_9 = constantsModule.LOCAL_BOT_ID;
const env0_10 = constantsModule.NON_USER_BOT_DISCRIMINATOR;
const env0_11 = constantsModule.MessageFlags;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/createMessage.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/createMessage.tsx');
exports.default = createMessage;
exports.userRecordToServer = closure;
exports.createBotMessage = createBotMessage;
}
function createMessage({channelId, content, tts, type, messageReference, allowedMentions, author, flags, nonce, poll, sharedCustomTheme, changelogId, giftingPrompt, boostingPrompt, state, mediaMention}) { // fn#57135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7319:538, offset: 0x013dd6dc, size: 579 bytes, params: 2, frame: 33
var messageByReference;
let value = undefined;
tts = !(tts === value) && tts;
const r18 = type !== value ? type : MessageTypes.DEFAULT;
const items2 = [];
const REPLY = MessageTypes.REPLY;
if (r18 === REPLY) {
(importDefault(44) /* metro dependency 44 */)(messageReference != null,
'Replies must have a message reference');
if (allowedMentions == null) {
messageByReference = ReferencedMessageStore.getMessageByReference(messageReference);
state = messageByReference == null ? value : messageByReference.state;
if (state === ReferencedMessageState.LOADED) {
items2.push(userRecordToServer(messageByReference.message.author));
}
} else if (allowedMentions.replied_user) {
messageByReference = ReferencedMessageStore.getMessageByReference(messageReference);
state = messageByReference == null ? value : messageByReference.state;
if (state === ReferencedMessageState.LOADED) {
items2.push(userRecordToServer(messageByReference.message.author));
function createMessage({channelId, content, tts, type, messageReference, allowedMentions, author, flags, nonce, poll, sharedCustomTheme, changelogId, giftingPrompt, boostingPrompt, state, mediaMention}) { // fn#57135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7319:538, offset: 0x013dd6dc, size: 579 bytes, params: 2, frame: 33
var messageByReference;
let value = undefined;
tts = !(tts === value) && tts;
const r18 = type !== value ? type : MessageTypes.DEFAULT;
const items2 = [];
const REPLY = MessageTypes.REPLY;
if (r18 === REPLY) {
(importDefault(44) /* metro dependency 44 */)(messageReference != null,
'Replies must have a message reference');
if (allowedMentions == null) {
messageByReference = ReferencedMessageStore.getMessageByReference(messageReference);
state = messageByReference == null ? value : messageByReference.state;
if (state === ReferencedMessageState.LOADED) {
items2.push(userRecordToServer(messageByReference.message.author));
}
} else if (allowedMentions.replied_user) {
messageByReference = ReferencedMessageStore.getMessageByReference(messageReference);
state = messageByReference == null ? value : messageByReference.state;
if (state === ReferencedMessageState.LOADED) {
items2.push(userRecordToServer(messageByReference.message.author));
}
}
}
let r19 = author ?? UserStore.getCurrentUser();
const r14 = r19 instanceof UserRecord ? userRecordToServer(r19) : r19;
(importDefault(44) /* metro dependency 44 */)(r14 != null, 'createMessage: author cannot be undefined');
const object = {};
if (nonce != null) {
r19 = nonce;
} else {
value = require(7142) /* metro dependency 7142: createNonce */;
value = value.createNonce();
r19 = value;
}
object.id = r19;
object.type = r18;
object.content = content;
object.channel_id = channelId;
object.author = r14;
object.attachments = [];
object.embeds = [];
object.pinned = false;
object.mentions = items2;
object.mention_channels = [];
object.mention_roles = [];
object.mention_everyone = false;
const Date = global.Date;
object.timestamp = new Date().toISOString();
object.state = state ?? MessageStates.SENDING;
object.tts = tts;
object.message_reference = messageReference;
object.message_snapshots = [];
object.flags = flags;
object.nonce = nonce;
object.poll = poll;
object.shared_client_theme = sharedCustomTheme;
object.changelog_id = changelogId;
object.gifting_prompt = giftingPrompt;
object.boosting_prompt = boostingPrompt;
object.media_mention = mediaMention;
return object;
}
let r19 = author ?? UserStore.getCurrentUser();
const r14 = r19 instanceof UserRecord ? userRecordToServer(r19) : r19;
(importDefault(44) /* metro dependency 44 */)(r14 != null, 'createMessage: author cannot be undefined');
const object2 = {};
if (nonce != null) {
r19 = nonce;
} else {
value = require(7142) /* metro dependency 7142: createNonce */;
value = value.createNonce();
r19 = value;
function createBotMessage({messageId, channelId, content, embeds, loggingName}) { // fn#57136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7319:1595, offset: 0x013dd91f, size: 285 bytes, params: 2, frame: 18
var r3;
var value;
const object = {};
if (messageId != null) {
r3 = messageId;
} else {
value = require(7142) /* metro dependency 7142: createNonce */;
value = value.createNonce();
r3 = value;
}
object.id = r3;
const DEFAULT = MessageTypes.DEFAULT;
object.type = DEFAULT;
const EPHEMERAL = MessageFlags.EPHEMERAL;
object.flags = EPHEMERAL;
object.content = content;
object.channel_id = channelId;
object.author = {'id': null, 'username': 'Clyde', 'discriminator': null, 'avatar': 'clyde', 'bot': true,
id: LOCAL_BOT_ID, discriminator: NON_USER_BOT_DISCRIMINATOR};
object.attachments = [];
object.embeds = embeds ?? [];
object.pinned = false;
object.mentions = [];
object.mention_channels = [];
object.mention_roles = [];
object.mention_everyone = false;
const Date = global.Date;
const value2 = Object.create(Date.prototype, {constructor: {value: Date}});
const date = new Date();
object.timestamp = (date instanceof Object ? date : value2).toISOString();
const SENT = MessageStates.SENT;
object.state = SENT;
object.tts = false;
object.loggingName = loggingName;
return object;
}
object2.id = r19;
object2.type = r18;
object2.content = content;
object2.channel_id = channelId;
object2.author = r14;
object2.attachments = [];
object2.embeds = [];
object2.pinned = false;
object2.mentions = items2;
object2.mention_channels = [];
object2.mention_roles = [];
object2.mention_everyone = false;
const Date = global.Date;
object2.timestamp = new Date().toISOString();
object2.state = state ?? MessageStates.SENDING;
object2.tts = tts;
object2.message_reference = messageReference;
object2.message_snapshots = [];
object2.flags = flags;
object2.nonce = nonce;
object2.poll = poll;
object2.shared_client_theme = sharedCustomTheme;
object2.changelog_id = changelogId;
object2.gifting_prompt = giftingPrompt;
object2.boosting_prompt = boostingPrompt;
object2.media_mention = mediaMention;
return object2;
}
function createBotMessage({messageId, channelId, content, embeds, loggingName}) { // fn#57136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7319:1595, offset: 0x013dd91f, size: 285 bytes, params: 2, frame: 18
var r3;
var value;
const object2 = {};
if (messageId != null) {
r3 = messageId;
} else {
value = require(7142) /* metro dependency 7142: createNonce */;
value = value.createNonce();
r3 = value;
}
object2.id = r3;
const DEFAULT = MessageTypes.DEFAULT;
object2.type = DEFAULT;
const EPHEMERAL = MessageFlags.EPHEMERAL;
object2.flags = EPHEMERAL;
object2.content = content;
object2.channel_id = channelId;
object2.author = {'id': null, 'username': 'Clyde', 'discriminator': null, 'avatar': 'clyde', 'bot': true,
id: LOCAL_BOT_ID, discriminator: NON_USER_BOT_DISCRIMINATOR};
object2.attachments = [];
object2.embeds = embeds ?? [];
object2.pinned = false;
object2.mentions = [];
object2.mention_channels = [];
object2.mention_roles = [];
object2.mention_everyone = false;
const Date = global.Date;
const value2 = Object.create(Date.prototype, {constructor: {value: Date}});
const date = new Date();
object2.timestamp = (date instanceof Object ? date : value2).toISOString();
const SENT = MessageStates.SENT;
object2.state = SENT;
object2.tts = false;
object2.loggingName = loggingName;
return object2;
}
global.__d(_fun57133, 7141, [4833, 1885, 1878, 661, 44, 7142,
2]) /* metro module 7141, dependencies: [4833, 1885, 1878, 661, 44, 7142, 2] */;
+15 -10
View File
@@ -1,19 +1,24 @@
/* Metro module 7142; source: modules/messages/createNonce.tsx; dependencies: [21, 2] */
import SnowflakeUtils from '../../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as SnowflakeUtilsModule from '../../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */
function _fun57137(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7320:6, offset: 0x013dda3c, size: 142 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const SnowflakeSequence = (require(21) /* metro dependency 21: SnowflakeUtils */).SnowflakeSequence;
const SnowflakeSequence = (SnowflakeUtilsModule).SnowflakeSequence;
const snowflakeSequence = new SnowflakeSequence();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/createNonce.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/createNonce.tsx');
exports.createNonce = createNonce;
}
function createNonce() { // fn#57138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7320:213, offset: 0x013ddaca, size: 85 bytes, params: 1, frame: 14
const Date = global.Date;
const value = Date.now();
if (env0_2 !== value) {
env0_3.reset();
function createNonce() { // fn#57138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7320:213, offset: 0x013ddaca, size: 85 bytes, params: 1, frame: 14
const Date = global.Date;
const value = Date.now();
if (env0_2 !== value) {
env0_3.reset();
}
return (SnowflakeUtils).fromTimestampWithSequence(value, env0_3);
}
return (importDefault(21) /* metro dependency 21: SnowflakeUtils */).fromTimestampWithSequence(value, env0_3);
}
global.__d(_fun57137, 7142, [21, 2]) /* metro module 7142, dependencies: [21, 2] */;
@@ -1,9 +1,11 @@
/* Metro module 9599; source: modules/messages/getAdaptiveMessageLimit.native.tsx; dependencies: [661, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun75250(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9785:6, offset: 0x01da7837, size: 124 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(661) /* metro dependency 661: Constants */).MAX_MESSAGES_PER_CHANNEL;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/getAdaptiveMessageLimit.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/getAdaptiveMessageLimit.native.tsx');
exports.getMessageLimit = function() {
return MAX_MESSAGES_PER_CHANNEL;
};
@@ -12,3 +14,4 @@ function _fun75250(global, require, importDefault, importAll, module, exports, d
};
}
global.__d(_fun75250, 9599, [661, 2]) /* metro module 9599, dependencies: [661, 2] */;
@@ -1,9 +1,11 @@
/* Metro module 7173; source: modules/messages/getBurstAnimation.native.tsx; dependencies: [5, 7174, 7175, 7176, 7177, 7178, 7179, 7180, 7181, 7182, 7183, 7184, 7185, 7186, 7187, 7188, 7189, 7190, 7191, 7192, 7193, 7194, 7195, 7196, 7197, 7198, 7199, 7200, 7201, 7202, 7203, 7204, 7205, 7206, 7207, 7208, 7209, 7210, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun57615(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7351:6, offset: 0x013ea78e, size: 708 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const items3 = [{load: function() {
return require(dependencyMap[1]);
}}];
@@ -113,28 +115,36 @@ function _fun57615(global, require, importDefault, importAll, module, exports, d
return require(dependencyMap[36]);
}};
const value = _fun57652();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/getBurstAnimation.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/getBurstAnimation.native.tsx');
exports.getBurstAnimation = value;
}
function _fun57652() { // fn#57652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7351:827, offset: 0x013eac53, size: 32 bytes, params: 1, frame: 12
const env0_0 = Module00005(_fun57654);
return _fun57655;
async function _fun57654(a0, a1, a2) { // fn#57654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7351:847, offset: 0x013eac85, size: 147 bytes, params: 4, frame: 21
let value = a3;
if (false) {
return undefined;
}
let r3 = value !== undefined ? value : false;
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const burstAnimationHash = env2_0(env2_1[37]).getBurstAnimationHash('' + a0 + a1 + a2);
r3 = r3 ? env2_3 : env2_4;
return r3[burstAnimationHash % env2_4.length].load();
}
function _fun57652() { // fn#57652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7351:827, offset: 0x013eac53, size: 32 bytes, params: 1, frame: 12
const env0_0 = env0_2(_fun57654);
return _fun57655;
}
function _fun57655() { // fn#57655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7351:965, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
async function _fun57654(a0, a1, a2) { // fn#57654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7351:847, offset: 0x013eac85, size: 147 bytes, params: 4, frame: 21
let value = a3;
if (false) {
return undefined;
}
let r3 = value !== undefined ? value : false;
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const burstAnimationHash = env2_0(env2_1[37]).getBurstAnimationHash('' + a0 + a1 + a2);
r3 = r3 ? env2_3 : env2_4;
return r3[burstAnimationHash % env2_4.length].load();
}
global.__d(_fun57615, 7173, [5, 7174, 7175, 7176, 7177, 7178, 7179, 7180, 7181, 7182, 7183, 7184, 7185, 7186, 7187,
7188, 7189, 7190, 7191, 7192, 7193, 7194, 7195, 7196, 7197, 7198, 7199, 7200, 7201, 7202, 7203, 7204, 7205,
7206, 7207, 7208, 7209, 7210,
2]) /* metro module 7173, dependencies: [5, 7174, 7175, 7176, 7177, 7178, 7179, 7180, 7181, 7182, 7183, 7184, 7185, 7186, 7187, 7188, 7189, 7190, 7191, 7192, 7193, 7194, 7195, 7196, 7197, 7198, 7199, 7200, 7201, 7202, 7203, 7204, 7205, 7206, 7207, 7208, 7209, 7210, 2] */;
@@ -1,8 +1,10 @@
/* Metro module 8430; source: modules/messages/getDisplayFilename.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun66915(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8615:6, offset: 0x01c0f84d, size: 87 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/getDisplayFilename.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/getDisplayFilename.tsx');
exports.default = function(a0) {
var r1;
var value;
@@ -22,3 +24,4 @@ function _fun66915(global, require, importDefault, importAll, module, exports, d
};
}
global.__d(_fun66915, 8430, [2]) /* metro module 8430, dependencies: [2] */;
@@ -1,115 +1,119 @@
/* Metro module 8632; source: modules/messages/getEmojiPopoutMessage.tsx; dependencies: [6820, 1244, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ExpressionSourceRecordModule from '../emojis/records/ExpressionSourceRecord.tsx'; /* Metro dependency 6820 */
function _fun68124(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8817:6, offset: 0x01c3ffed, size: 237 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(6820) /* metro dependency 6820: ExpressionSourceRecord */).EmojiSourceDataTypes;
object = {DEFAULT: 'Custom Emoji Popout', CROSS_SERVER: 'Custom Emoji Popout (Cross-Server)',
UPSELL_CURRENT_SERVER_JOINED: 'Custom Emoji Popout (Upsell Joined Current-Server)',
UPSELL_CROSS_SERVER_JOINED: 'Custom Emoji Popout (Upsell Joined Cross-Server)',
UPSELL_CROSS_SERVER_JOINABLE: 'Custom Emoji Popout (Upsell Not-Joined Cross-Server)',
UPSELL_CROSS_SERVER_UNJOINABLE: 'Custom Emoji Popout (Soft Upsell)'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/getEmojiPopoutMessage.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/getEmojiPopoutMessage.tsx');
exports.EmojiPopoutType = {GET_PREMIUM: 'GET_PREMIUM', JOIN_GUILD: 'JOIN_GUILD', UNAVAILABLE: 'UNAVAILABLE'};
exports.getEmojiPopoutData = getEmojiPopoutData;
}
function getEmojiPopoutData(a0) { // fn#68125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8817:788, offset: 0x01c400da, size: 1236 bytes, params: 2, frame: 28
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var object4;
const sourceType = a0.sourceType;
const expressionSourceApplication = a0.expressionSourceApplication;
let isPremium = a0.isPremium;
let hasJoinedEmojiSourceGuild = a0.hasJoinedEmojiSourceGuild;
let isUnusableRoleSubscriptionEmoji = a0.isUnusableRoleSubscriptionEmoji;
let isDiscoverable = a0.isDiscoverable;
let emojiComesFromCurrentGuild = a0.emojiComesFromCurrentGuild;
const userIsRoleSubscriber = a0.userIsRoleSubscriber;
const isRoleSubscriptionEmoji = a0.isRoleSubscriptionEmoji;
const shouldHideRoleSubscriptionCTA = a0.shouldHideRoleSubscriptionCTA;
const onOpenPremiumSettings = a0.onOpenPremiumSettings;
const APPLICATION = EmojiSourceDataTypes.APPLICATION;
const r3 = sourceType !== APPLICATION ? isPremium ? hasJoinedEmojiSourceGuild ? isRoleSubscriptionEmoji ? shouldHideRoleSubscriptionCTA && isUnusableRoleSubscriptionEmoji ? intl.string(t.xFb68j) : isUnusableRoleSubscriptionEmoji ? userIsRoleSubscriber ? intl.string(t.vLklfF) : intl.string(t['g8i/bf']) : intl.string(t.Eoynp0) : emojiComesFromCurrentGuild ? intl.string(t.hU4kIe) : intl.string(t.GM0xaX) : isDiscoverable ? intl.string(t.xE9WGt) : intl.string(t['0LMpW+']) : hasJoinedEmojiSourceGuild ? shouldHideRoleSubscriptionCTA && isUnusableRoleSubscriptionEmoji ? intl.string(t.xFb68j) : isUnusableRoleSubscriptionEmoji ? userIsRoleSubscriber ? intl.string(t.vLklfF) : intl.string(t['g8i/bf']) : emojiComesFromCurrentGuild ? intl.string(t.ICPhqa) : intl.string(t.jQy3aM) : isDiscoverable ? intl.string(t.FJ6Z01) : intl.format(t.U6vLcA,
{openPremiumSettings: onOpenPremiumSettings}) : expressionSourceApplication != null ? intl.formatToPlainString(t.uERlTd,
{appName: expressionSourceApplication.name}) : isPremium ? hasJoinedEmojiSourceGuild ? isRoleSubscriptionEmoji ? shouldHideRoleSubscriptionCTA && isUnusableRoleSubscriptionEmoji ? intl.string(t.xFb68j) : isUnusableRoleSubscriptionEmoji ? userIsRoleSubscriber ? intl.string(t.vLklfF) : intl.string(t['g8i/bf']) : intl.string(t.Eoynp0) : emojiComesFromCurrentGuild ? intl.string(t.hU4kIe) : intl.string(t.GM0xaX) : isDiscoverable ? intl.string(t.xE9WGt) : intl.string(t['0LMpW+']) : hasJoinedEmojiSourceGuild ? shouldHideRoleSubscriptionCTA && isUnusableRoleSubscriptionEmoji ? intl.string(t.xFb68j) : isUnusableRoleSubscriptionEmoji ? userIsRoleSubscriber ? intl.string(t.vLklfF) : intl.string(t['g8i/bf']) : emojiComesFromCurrentGuild ? intl.string(t.ICPhqa) : intl.string(t.jQy3aM) : isDiscoverable ? intl.string(t.FJ6Z01) : intl.format(t.U6vLcA,
{openPremiumSettings: onOpenPremiumSettings});
isPremium = a0.isPremium;
hasJoinedEmojiSourceGuild = a0.hasJoinedEmojiSourceGuild;
isUnusableRoleSubscriptionEmoji = a0.isUnusableRoleSubscriptionEmoji;
emojiComesFromCurrentGuild = a0.emojiComesFromCurrentGuild;
isDiscoverable = a0.isDiscoverable;
const DEFAULT = env0_3.DEFAULT;
const r2 = isPremium ? hasJoinedEmojiSourceGuild ? isPremium ? isPremium || hasJoinedEmojiSourceGuild ? DEFAULT : isDiscoverable ? env0_3.UPSELL_CROSS_SERVER_JOINABLE : env0_3.UPSELL_CROSS_SERVER_UNJOINABLE : hasJoinedEmojiSourceGuild ? isUnusableRoleSubscriptionEmoji ? isPremium || hasJoinedEmojiSourceGuild ? DEFAULT : isDiscoverable ? env0_3.UPSELL_CROSS_SERVER_JOINABLE : env0_3.UPSELL_CROSS_SERVER_UNJOINABLE : emojiComesFromCurrentGuild ? env0_3.UPSELL_CURRENT_SERVER_JOINED : env0_3.UPSELL_CROSS_SERVER_JOINED : isPremium || hasJoinedEmojiSourceGuild ? DEFAULT : isDiscoverable ? env0_3.UPSELL_CROSS_SERVER_JOINABLE : env0_3.UPSELL_CROSS_SERVER_UNJOINABLE : isDiscoverable ? env0_3.CROSS_SERVER : isPremium ? isPremium || hasJoinedEmojiSourceGuild ? DEFAULT : isDiscoverable ? env0_3.UPSELL_CROSS_SERVER_JOINABLE : env0_3.UPSELL_CROSS_SERVER_UNJOINABLE : hasJoinedEmojiSourceGuild ? isUnusableRoleSubscriptionEmoji ? isPremium || hasJoinedEmojiSourceGuild ? DEFAULT : isDiscoverable ? env0_3.UPSELL_CROSS_SERVER_JOINABLE : env0_3.UPSELL_CROSS_SERVER_UNJOINABLE : emojiComesFromCurrentGuild ? env0_3.UPSELL_CURRENT_SERVER_JOINED : env0_3.UPSELL_CROSS_SERVER_JOINED : isPremium || hasJoinedEmojiSourceGuild ? DEFAULT : isDiscoverable ? env0_3.UPSELL_CROSS_SERVER_JOINABLE : env0_3.UPSELL_CROSS_SERVER_UNJOINABLE : isPremium ? isPremium || hasJoinedEmojiSourceGuild ? DEFAULT : isDiscoverable ? env0_3.UPSELL_CROSS_SERVER_JOINABLE : env0_3.UPSELL_CROSS_SERVER_UNJOINABLE : hasJoinedEmojiSourceGuild ? isUnusableRoleSubscriptionEmoji ? isPremium || hasJoinedEmojiSourceGuild ? DEFAULT : isDiscoverable ? env0_3.UPSELL_CROSS_SERVER_JOINABLE : env0_3.UPSELL_CROSS_SERVER_UNJOINABLE : emojiComesFromCurrentGuild ? env0_3.UPSELL_CURRENT_SERVER_JOINED : env0_3.UPSELL_CROSS_SERVER_JOINED : isPremium || hasJoinedEmojiSourceGuild ? DEFAULT : isDiscoverable ? env0_3.UPSELL_CROSS_SERVER_JOINABLE : env0_3.UPSELL_CROSS_SERVER_UNJOINABLE;
const object3 = {};
isPremium = a0.isPremium;
hasJoinedEmojiSourceGuild = a0.hasJoinedEmojiSourceGuild;
isUnusableRoleSubscriptionEmoji = a0.isUnusableRoleSubscriptionEmoji;
let r1 = !hasJoinedEmojiSourceGuild && a0.isDiscoverable;
if (isPremium) {
if (r1) {
r1 = {type: env0_4.JOIN_GUILD, text: intl.string(t.riu2R5), description: null};
function getEmojiPopoutData(a0) { // fn#68125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8817:788, offset: 0x01c400da, size: 1236 bytes, params: 2, frame: 28
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var object2;
const sourceType = a0.sourceType;
const expressionSourceApplication = a0.expressionSourceApplication;
let isPremium = a0.isPremium;
let hasJoinedEmojiSourceGuild = a0.hasJoinedEmojiSourceGuild;
let isUnusableRoleSubscriptionEmoji = a0.isUnusableRoleSubscriptionEmoji;
let isDiscoverable = a0.isDiscoverable;
let emojiComesFromCurrentGuild = a0.emojiComesFromCurrentGuild;
const userIsRoleSubscriber = a0.userIsRoleSubscriber;
const isRoleSubscriptionEmoji = a0.isRoleSubscriptionEmoji;
const shouldHideRoleSubscriptionCTA = a0.shouldHideRoleSubscriptionCTA;
const onOpenPremiumSettings = a0.onOpenPremiumSettings;
const APPLICATION = EmojiSourceDataTypes.APPLICATION;
const r3 = sourceType !== APPLICATION ? isPremium ? hasJoinedEmojiSourceGuild ? isRoleSubscriptionEmoji ? shouldHideRoleSubscriptionCTA && isUnusableRoleSubscriptionEmoji ? intl.string(t.xFb68j) : isUnusableRoleSubscriptionEmoji ? userIsRoleSubscriber ? intl.string(t.vLklfF) : intl.string(t['g8i/bf']) : intl.string(t.Eoynp0) : emojiComesFromCurrentGuild ? intl.string(t.hU4kIe) : intl.string(t.GM0xaX) : isDiscoverable ? intl.string(t.xE9WGt) : intl.string(t['0LMpW+']) : hasJoinedEmojiSourceGuild ? shouldHideRoleSubscriptionCTA && isUnusableRoleSubscriptionEmoji ? intl.string(t.xFb68j) : isUnusableRoleSubscriptionEmoji ? userIsRoleSubscriber ? intl.string(t.vLklfF) : intl.string(t['g8i/bf']) : emojiComesFromCurrentGuild ? intl.string(t.ICPhqa) : intl.string(t.jQy3aM) : isDiscoverable ? intl.string(t.FJ6Z01) : intl.format(t.U6vLcA,
{openPremiumSettings: onOpenPremiumSettings}) : expressionSourceApplication != null ? intl.formatToPlainString(t.uERlTd,
{appName: expressionSourceApplication.name}) : isPremium ? hasJoinedEmojiSourceGuild ? isRoleSubscriptionEmoji ? shouldHideRoleSubscriptionCTA && isUnusableRoleSubscriptionEmoji ? intl.string(t.xFb68j) : isUnusableRoleSubscriptionEmoji ? userIsRoleSubscriber ? intl.string(t.vLklfF) : intl.string(t['g8i/bf']) : intl.string(t.Eoynp0) : emojiComesFromCurrentGuild ? intl.string(t.hU4kIe) : intl.string(t.GM0xaX) : isDiscoverable ? intl.string(t.xE9WGt) : intl.string(t['0LMpW+']) : hasJoinedEmojiSourceGuild ? shouldHideRoleSubscriptionCTA && isUnusableRoleSubscriptionEmoji ? intl.string(t.xFb68j) : isUnusableRoleSubscriptionEmoji ? userIsRoleSubscriber ? intl.string(t.vLklfF) : intl.string(t['g8i/bf']) : emojiComesFromCurrentGuild ? intl.string(t.ICPhqa) : intl.string(t.jQy3aM) : isDiscoverable ? intl.string(t.FJ6Z01) : intl.format(t.U6vLcA,
{openPremiumSettings: onOpenPremiumSettings});
isPremium = a0.isPremium;
hasJoinedEmojiSourceGuild = a0.hasJoinedEmojiSourceGuild;
isUnusableRoleSubscriptionEmoji = a0.isUnusableRoleSubscriptionEmoji;
emojiComesFromCurrentGuild = a0.emojiComesFromCurrentGuild;
isDiscoverable = a0.isDiscoverable;
const DEFAULT = env0_3.DEFAULT;
const r2 = isPremium ? hasJoinedEmojiSourceGuild ? isPremium ? isPremium || hasJoinedEmojiSourceGuild ? DEFAULT : isDiscoverable ? env0_3.UPSELL_CROSS_SERVER_JOINABLE : env0_3.UPSELL_CROSS_SERVER_UNJOINABLE : hasJoinedEmojiSourceGuild ? isUnusableRoleSubscriptionEmoji ? isPremium || hasJoinedEmojiSourceGuild ? DEFAULT : isDiscoverable ? env0_3.UPSELL_CROSS_SERVER_JOINABLE : env0_3.UPSELL_CROSS_SERVER_UNJOINABLE : emojiComesFromCurrentGuild ? env0_3.UPSELL_CURRENT_SERVER_JOINED : env0_3.UPSELL_CROSS_SERVER_JOINED : isPremium || hasJoinedEmojiSourceGuild ? DEFAULT : isDiscoverable ? env0_3.UPSELL_CROSS_SERVER_JOINABLE : env0_3.UPSELL_CROSS_SERVER_UNJOINABLE : isDiscoverable ? env0_3.CROSS_SERVER : isPremium ? isPremium || hasJoinedEmojiSourceGuild ? DEFAULT : isDiscoverable ? env0_3.UPSELL_CROSS_SERVER_JOINABLE : env0_3.UPSELL_CROSS_SERVER_UNJOINABLE : hasJoinedEmojiSourceGuild ? isUnusableRoleSubscriptionEmoji ? isPremium || hasJoinedEmojiSourceGuild ? DEFAULT : isDiscoverable ? env0_3.UPSELL_CROSS_SERVER_JOINABLE : env0_3.UPSELL_CROSS_SERVER_UNJOINABLE : emojiComesFromCurrentGuild ? env0_3.UPSELL_CURRENT_SERVER_JOINED : env0_3.UPSELL_CROSS_SERVER_JOINED : isPremium || hasJoinedEmojiSourceGuild ? DEFAULT : isDiscoverable ? env0_3.UPSELL_CROSS_SERVER_JOINABLE : env0_3.UPSELL_CROSS_SERVER_UNJOINABLE : isPremium ? isPremium || hasJoinedEmojiSourceGuild ? DEFAULT : isDiscoverable ? env0_3.UPSELL_CROSS_SERVER_JOINABLE : env0_3.UPSELL_CROSS_SERVER_UNJOINABLE : hasJoinedEmojiSourceGuild ? isUnusableRoleSubscriptionEmoji ? isPremium || hasJoinedEmojiSourceGuild ? DEFAULT : isDiscoverable ? env0_3.UPSELL_CROSS_SERVER_JOINABLE : env0_3.UPSELL_CROSS_SERVER_UNJOINABLE : emojiComesFromCurrentGuild ? env0_3.UPSELL_CURRENT_SERVER_JOINED : env0_3.UPSELL_CROSS_SERVER_JOINED : isPremium || hasJoinedEmojiSourceGuild ? DEFAULT : isDiscoverable ? env0_3.UPSELL_CROSS_SERVER_JOINABLE : env0_3.UPSELL_CROSS_SERVER_UNJOINABLE;
const object = {};
isPremium = a0.isPremium;
hasJoinedEmojiSourceGuild = a0.hasJoinedEmojiSourceGuild;
isUnusableRoleSubscriptionEmoji = a0.isUnusableRoleSubscriptionEmoji;
let r1 = !hasJoinedEmojiSourceGuild && a0.isDiscoverable;
if (isPremium) {
if (r1) {
r1 = {type: env0_4.JOIN_GUILD, text: intl.string(t.riu2R5), description: null};
} else if (isPremium) {
r1 = {'type': null, 'text': null, 'description': null, type: env0_4.UNAVAILABLE};
} else if (hasJoinedEmojiSourceGuild) {
if (isUnusableRoleSubscriptionEmoji) {
if (r1) {
object2 = {};
object2.type = env0_4.GET_PREMIUM;
object2.text = intl.string(t['gl/XHJ']);
object2.description = null;
r1 = object2;
} else {
r1 = {'type': null, 'text': null, 'description': null, type: env0_4.UNAVAILABLE};
}
} else {
object2 = {};
object2.type = env0_4.GET_PREMIUM;
object2.text = intl.string(t['gl/XHJ']);
object2.description = null;
r1 = object2;
}
} else if (r1) {
object2 = {};
object2.type = env0_4.GET_PREMIUM;
object2.text = intl.string(t['gl/XHJ']);
object2.description = null;
r1 = object2;
} else {
r1 = {'type': null, 'text': null, 'description': null, type: env0_4.UNAVAILABLE};
}
} else if (isPremium) {
r1 = {'type': null, 'text': null, 'description': null, type: env0_4.UNAVAILABLE};
} else if (hasJoinedEmojiSourceGuild) {
if (isUnusableRoleSubscriptionEmoji) {
if (r1) {
object4 = {};
object4.type = env0_4.GET_PREMIUM;
object4.text = intl.string(t['gl/XHJ']);
object4.description = null;
r1 = object4;
object2 = {};
object2.type = env0_4.GET_PREMIUM;
object2.text = intl.string(t['gl/XHJ']);
object2.description = null;
r1 = object2;
} else {
r1 = {'type': null, 'text': null, 'description': null, type: env0_4.UNAVAILABLE};
}
} else {
object4 = {};
object4.type = env0_4.GET_PREMIUM;
object4.text = intl.string(t['gl/XHJ']);
object4.description = null;
r1 = object4;
object2 = {};
object2.type = env0_4.GET_PREMIUM;
object2.text = intl.string(t['gl/XHJ']);
object2.description = null;
r1 = object2;
}
} else if (r1) {
object4 = {};
object4.type = env0_4.GET_PREMIUM;
object4.text = intl.string(t['gl/XHJ']);
object4.description = null;
r1 = object4;
object2 = {};
object2.type = env0_4.GET_PREMIUM;
object2.text = intl.string(t['gl/XHJ']);
object2.description = null;
r1 = object2;
} else {
r1 = {'type': null, 'text': null, 'description': null, type: env0_4.UNAVAILABLE};
}
} else if (isPremium) {
r1 = {'type': null, 'text': null, 'description': null, type: env0_4.UNAVAILABLE};
} else if (hasJoinedEmojiSourceGuild) {
if (isUnusableRoleSubscriptionEmoji) {
if (r1) {
object4 = {};
object4.type = env0_4.GET_PREMIUM;
object4.text = intl.string(t['gl/XHJ']);
object4.description = null;
r1 = object4;
} else {
r1 = {'type': null, 'text': null, 'description': null, type: env0_4.UNAVAILABLE};
}
} else {
object4 = {};
object4.type = env0_4.GET_PREMIUM;
object4.text = intl.string(t['gl/XHJ']);
object4.description = null;
r1 = object4;
}
} else if (r1) {
object4 = {};
object4.type = env0_4.GET_PREMIUM;
object4.text = intl.string(t['gl/XHJ']);
object4.description = null;
r1 = object4;
} else {
r1 = {'type': null, 'text': null, 'description': null, type: env0_4.UNAVAILABLE};
copyDataProperties(object, r1, onOpenPremiumSettings);
object['emojiDescription'] = r3;
object['analyticsType'] = r2;
return object;
}
copyDataProperties(object3, r1, onOpenPremiumSettings);
object3['emojiDescription'] = r3;
object3['analyticsType'] = r2;
return object3;
}
global.__d(_fun68124, 8632, [6820, 1244, 2]) /* metro module 8632, dependencies: [6820, 1244, 2] */;
@@ -1,22 +1,26 @@
/* Metro module 10546; source: modules/messages/getHeaderTextForInvite.tsx; dependencies: [1244, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
function _fun81321(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10732:6, offset: 0x01eca6e8, 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/messages/getHeaderTextForInvite.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/getHeaderTextForInvite.tsx');
exports.getHeaderTextForInvite = getHeaderTextForInvite;
function getHeaderTextForInvite({isVoiceChannel, isHubGuild, isOwnInvite, isGuest, isStage, isStream}) { // fn#81322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10732:194, offset: 0x01eca748, size: 312 bytes, params: 2, frame: 20
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
return isVoiceChannel ? isOwnInvite ? isStream ? Reflect.apply(string, intl,
[t.N85DCl]) : isStage ? Reflect.apply(string, intl, [t.TJQcNv]) : isGuest ? Reflect.apply(string, intl,
[t.mJyBir]) : Reflect.apply(string, intl, [t.lxTgP9]) : isStream ? Reflect.apply(string, intl,
[t.Mnvc3C]) : isStage ? Reflect.apply(string, intl, [t.FdPNr5]) : isGuest ? Reflect.apply(string, intl,
[t.f4gmrf]) : Reflect.apply(string, intl, [t.H39rEY]) : isHubGuild ? isOwnInvite ? Reflect.apply(string, intl,
[t.UxmnHx]) : Reflect.apply(string, intl, [t.sigPEf]) : isOwnInvite ? Reflect.apply(string, intl,
[t['oU/lsl']]) : Reflect.apply(string, intl, [t.BoQUFf]);
}
}
function getHeaderTextForInvite({isVoiceChannel, isHubGuild, isOwnInvite, isGuest, isStage, isStream}) { // fn#81322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10732:194, offset: 0x01eca748, size: 312 bytes, params: 2, frame: 20
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return isVoiceChannel ? isOwnInvite ? isStream ? Reflect.apply(string, intl,
[t.N85DCl]) : isStage ? Reflect.apply(string, intl, [t.TJQcNv]) : isGuest ? Reflect.apply(string, intl,
[t.mJyBir]) : Reflect.apply(string, intl, [t.lxTgP9]) : isStream ? Reflect.apply(string, intl,
[t.Mnvc3C]) : isStage ? Reflect.apply(string, intl, [t.FdPNr5]) : isGuest ? Reflect.apply(string, intl,
[t.f4gmrf]) : Reflect.apply(string, intl, [t.H39rEY]) : isHubGuild ? isOwnInvite ? Reflect.apply(string, intl,
[t.UxmnHx]) : Reflect.apply(string, intl, [t.sigPEf]) : isOwnInvite ? Reflect.apply(string, intl,
[t['oU/lsl']]) : Reflect.apply(string, intl, [t.BoQUFf]);
}
global.__d(_fun81321, 10546, [1244, 2]) /* metro module 10546, dependencies: [1244, 2] */;
@@ -1,8 +1,10 @@
/* Metro module 8213; source: modules/messages/getHumanizedCallDuration.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun65767(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8398:6, offset: 0x01bddd5b, size: 87 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/getHumanizedCallDuration.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/getHumanizedCallDuration.tsx');
exports.default = function(a0) {
var r2;
var value = null;
@@ -11,3 +13,4 @@ function _fun65767(global, require, importDefault, importAll, module, exports, d
};
}
global.__d(_fun65767, 8213, [2]) /* metro module 8213, dependencies: [2] */;
@@ -1,36 +1,40 @@
/* Metro module 11068; source: modules/messages/getStickerDiscoverableGuild.tsx; dependencies: [661, 507, 6946, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as HTTPUtilsModule from '../../external/discord_common/js/packages/http-utils/HTTPUtils.tsx'; /* Metro dependency 507 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun84748(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11254:6, offset: 0x01f56137, 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(661) /* metro dependency 661: Constants */).Endpoints;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/getStickerDiscoverableGuild.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/getStickerDiscoverableGuild.tsx');
exports.default = _default_84749;
}
function _default_84749(a0) { // fn#84749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11254:125, offset: 0x01f561ac, size: 113 bytes, params: 2, frame: 15
const HTTP = (HTTPUtilsModule).HTTP;
const get = HTTP.get;
const object = {'url': null, 'oldFormErrors': true, 'rejectWithError': true};
object.url = Endpoints.STICKER_GUILD_DATA(a0);
let value = Reflect.apply(get, HTTP, [object]);
value = value.then(_fun84750);
return value.catch(function() {
return null;
});
function _fun84750(a0) { // fn#84750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11254:218, offset: 0x01f5621d, size: 71 bytes, params: 2, frame: 14
var r0;
let value = null;
if (value != (value == a0 ? undefined : a0.body)) {
value = environment.__proto__;
value = require(6946) /* metro dependency 6946: GuildDiscoveryUtils */;
value = value.makeDiscoverableGuild(a0.body);
r0 = value;
} else {
r0 = value;
}
return r0;
}
function _default_84749(a0) { // fn#84749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11254:125, offset: 0x01f561ac, size: 113 bytes, params: 2, frame: 15
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const get = HTTP.get;
const object2 = {'url': null, 'oldFormErrors': true, 'rejectWithError': true};
object2.url = Endpoints.STICKER_GUILD_DATA(a0);
let value = Reflect.apply(get, HTTP, [object2]);
value = value.then(_fun84750);
return value.catch(function() {
return null;
});
}
function _fun84750(a0) { // fn#84750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11254:218, offset: 0x01f5621d, size: 71 bytes, params: 2, frame: 14
var r0;
let value = null;
if (value != (value == a0 ? undefined : a0.body)) {
value = environment.__proto__;
value = require(6946) /* metro dependency 6946: GuildDiscoveryUtils */;
value = value.makeDiscoverableGuild(a0.body);
r0 = value;
} else {
r0 = value;
}
return r0;
}
global.__d(_fun84748, 11068, [661, 507, 6946, 2]) /* metro module 11068, dependencies: [661, 507, 6946, 2] */;
+20 -20
View File
@@ -1,29 +1,29 @@
/* Metro module 8296; source: modules/messages/isCrosspost.tsx; dependencies: [661, 1391, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun66178(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8481:6, offset: 0x01bf0b04, size: 137 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_2 = constantsModule.MessageFlags;
const env0_3 = constantsModule.MessageReferenceTypes;
const env0_4 = constantsModule.MessageTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/isCrosspost.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/isCrosspost.tsx');
exports.default = isCrosspost;
}
function isCrosspost(a0) { // fn#66179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8481:242, offset: 0x01bf0b8d, size: 122 bytes, params: 2, frame: 16
var r0;
var moduleValue;
const type = a0.type;
const DEFAULT = MessageTypes.DEFAULT;
const value2 = type === DEFAULT;
if (value2) {
moduleValue = require(1391) /* metro dependency 1391: FlagUtils */;
r0 = moduleValue.hasFlag(a0.flags, MessageFlags.IS_CROSSPOST);
} else {
r0 = value2;
function isCrosspost(a0) { // fn#66179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8481:242, offset: 0x01bf0b8d, size: 122 bytes, params: 2, frame: 16
var r0;
var moduleValue;
const type = a0.type;
const DEFAULT = MessageTypes.DEFAULT;
const value2 = type === DEFAULT;
if (value2) {
moduleValue = require(1391) /* metro dependency 1391: FlagUtils */;
r0 = moduleValue.hasFlag(a0.flags, MessageFlags.IS_CROSSPOST);
} else {
r0 = value2;
}
r0 = r0 && a0.messageReference != null && a0.messageReference.type !== MessageReferenceTypes.FORWARD;
return r0;
}
r0 = r0 && a0.messageReference != null && a0.messageReference.type !== MessageReferenceTypes.FORWARD;
return r0;
}
global.__d(_fun66178, 8296, [661, 1391, 2]) /* metro module 8296, dependencies: [661, 1391, 2] */;
+104 -94
View File
@@ -1,108 +1,118 @@
/* Metro module 4639; source: modules/messages/isMessageMentioned.tsx; dependencies: [1379, 1945, 1867, 2] */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import GuildMemberStore from '../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun39895(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4817:6, offset: 0x010ef071, size: 162 bytes, params: 8, frame: 19
const closure = isMentioned;
const isMentioned2 = isMentioned;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/isMessageMentioned.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/isMessageMentioned.tsx');
exports.default = isMessageMentioned;
exports.isRawMessageMentioned = isRawMessageMentioned;
exports.isMentioned = closure;
}
function isMentioned({userId, channelId, mentionEveryone, mentionUsers, mentionRoles, suppressEveryone, suppressRoles}) { // fn#39896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4817:126, offset: 0x010ef113, size: 234 bytes, params: 2, frame: 19
var value;
var channel;
var guildId;
suppressEveryone = !(suppressEveryone === undefined) && suppressEveryone;
suppressRoles = !(suppressRoles === undefined) && suppressRoles;
if (mentionEveryone) {
if (suppressEveryone) {
if (mentionUsers.includes(userId)) {
return true;
exports.isMentioned = isMentioned2;
function isMentioned({userId, channelId, mentionEveryone, mentionUsers, mentionRoles, suppressEveryone, suppressRoles}) { // fn#39896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4817:126, offset: 0x010ef113, size: 234 bytes, params: 2, frame: 19
var value;
var channel;
var guildId;
var guildStoreBinding;
suppressEveryone = !(suppressEveryone === undefined) && suppressEveryone;
suppressRoles = !(suppressRoles === undefined) && suppressRoles;
if (mentionEveryone) {
if (suppressEveryone) {
if (mentionUsers.includes(userId)) {
return true;
}
if (suppressRoles) {
return false;
}
if (mentionRoles == null) {
return false;
}
if (mentionRoles.length === 0) {
return false;
}
channel = ChannelStore.getChannel(channelId);
if (channel == null) {
return false;
}
guildId = channel.getGuildId();
if (guildId == null) {
return false;
}
guildStoreBinding = GuildStore;
if (guildStoreBinding.getGuild(guildId) == null) {
return false;
}
value = GuildMemberStore.getMember(guildId, userId);
value = value != null;
return value && mentionRoles.some(_fun39897);
}
if (suppressRoles) {
return false;
}
if (mentionRoles == null) {
return false;
}
if (mentionRoles.length === 0) {
return false;
}
channel = ChannelStore.getChannel(channelId);
if (channel == null) {
return false;
}
guildId = channel.getGuildId();
if (guildId == null) {
return false;
}
if (GuildStore.getGuild(guildId) == null) {
return false;
}
value = GuildMemberStore.getMember(guildId, userId);
value = value != null;
return value && mentionRoles.some(_fun39897);
return true;
}
return true;
if (mentionUsers.includes(userId)) {
return true;
}
if (suppressRoles) {
return false;
}
if (mentionRoles == null) {
return false;
}
if (mentionRoles.length === 0) {
return false;
}
channel = ChannelStore.getChannel(channelId);
if (channel == null) {
return false;
}
guildId = channel.getGuildId();
if (guildId == null) {
return false;
}
guildStoreBinding = GuildStore;
const getGuild = guildStoreBinding.getGuild;
if (Reflect.apply(getGuild, guildStoreBinding, [guildId]) == null) {
return false;
}
value = GuildMemberStore.getMember(guildId, userId);
value = value != null;
return value && mentionRoles.some(_fun39897);
function _fun39897(a0) { // fn#39897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4817:503, offset: 0x010ef1fd, size: 28 bytes, params: 2, frame: 11
return env0_0.roles.includes(a0);
}
}
if (mentionUsers.includes(userId)) {
return true;
function isMessageMentioned({message, userId, suppressEveryone, suppressRoles}) { // fn#39898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4817:611, offset: 0x010ef219, size: 111 bytes, params: 2, frame: 15
suppressEveryone = !(suppressEveryone === undefined) && suppressEveryone;
suppressRoles = !(suppressRoles === undefined) && suppressRoles;
return isMentioned({userId: userId, channelId: message.channel_id, mentionEveryone: message.mentionEveryone,
mentionUsers: message.mentions, mentionRoles: message.mentionRoles, suppressEveryone: suppressEveryone,
suppressRoles: suppressRoles});
}
if (suppressRoles) {
return false;
function isRawMessageMentioned({rawMessage, userId, suppressEveryone, suppressRoles}) { // fn#39899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4817:902, offset: 0x010ef288, size: 166 bytes, params: 2, frame: 19
suppressEveryone = !(suppressEveryone === undefined) && suppressEveryone;
suppressRoles = !(suppressRoles === undefined) && suppressRoles;
const isMentionedBinding = isMentioned;
const object = {userId: userId};
object.channelId = rawMessage.channel_id;
const mention_everyone = rawMessage.mention_everyone;
let r7 = mention_everyone != null && mention_everyone;
object.mentionEveryone = r7;
r7 = rawMessage.mentions?.map(function(a0) {
return a0.id;
});
r7 = r7 ?? [];
object.mentionUsers = r7;
object.mentionRoles = rawMessage.mention_roles ?? [];
object.suppressEveryone = suppressEveryone;
object.suppressRoles = suppressRoles;
return isMentionedBinding(object);
}
if (mentionRoles == null) {
return false;
}
if (mentionRoles.length === 0) {
return false;
}
channel = ChannelStore.getChannel(channelId);
if (channel == null) {
return false;
}
guildId = channel.getGuildId();
if (guildId == null) {
return false;
}
const getGuild = GuildStore.getGuild;
if (Reflect.apply(getGuild, GuildStore, [guildId]) == null) {
return false;
}
value = GuildMemberStore.getMember(guildId, userId);
value = value != null;
return value && mentionRoles.some(_fun39897);
}
function isMessageMentioned({message, userId, suppressEveryone, suppressRoles}) { // fn#39898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4817:611, offset: 0x010ef219, size: 111 bytes, params: 2, frame: 15
suppressEveryone = !(suppressEveryone === undefined) && suppressEveryone;
suppressRoles = !(suppressRoles === undefined) && suppressRoles;
return isMentioned({userId: userId, channelId: message.channel_id, mentionEveryone: message.mentionEveryone,
mentionUsers: message.mentions, mentionRoles: message.mentionRoles, suppressEveryone: suppressEveryone,
suppressRoles: suppressRoles});
}
function isRawMessageMentioned({rawMessage, userId, suppressEveryone, suppressRoles}) { // fn#39899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4817:902, offset: 0x010ef288, size: 166 bytes, params: 2, frame: 19
suppressEveryone = !(suppressEveryone === undefined) && suppressEveryone;
suppressRoles = !(suppressRoles === undefined) && suppressRoles;
const isMentionedBinding = isMentioned;
const object2 = {userId: userId};
object2.channelId = rawMessage.channel_id;
const mention_everyone = rawMessage.mention_everyone;
let r7 = mention_everyone != null && mention_everyone;
object2.mentionEveryone = r7;
r7 = rawMessage.mentions?.map(function(a0) {
return a0.id;
});
r7 = r7 ?? [];
object2.mentionUsers = r7;
object2.mentionRoles = rawMessage.mention_roles ?? [];
object2.suppressEveryone = suppressEveryone;
object2.suppressRoles = suppressRoles;
return isMentionedBinding(object2);
}
global.__d(_fun39895, 4639, [1379, 1945, 1867, 2]) /* metro module 4639, dependencies: [1379, 1945, 1867, 2] */;
+31 -28
View File
@@ -1,36 +1,39 @@
/* Metro module 11405; source: modules/messages/isMessagePinnable.tsx; dependencies: [3784, 661, 5216, 6860, 2] */
import PermissionStore from '../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun87388(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11591:6, offset: 0x01fbcf51, size: 150 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_4 = constantsModule.ChannelTypes;
const env0_5 = constantsModule.Permissions;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/isMessagePinnable.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/isMessagePinnable.tsx');
exports.default = isMessagePinnable;
function isMessagePinnable(a0, a1) { // fn#87389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11591:231, offset: 0x01fbcfe7, size: 236 bytes, params: 3, frame: 16
var r0;
let value = a1.isSystemDM();
if (value) {
r0 = !value;
} else {
value = importDefault(5216) /* metro dependency 5216: isSystemMessage */;
value = !value(a0);
r0 = value;
}
const permissionStoreBinding = PermissionStore;
const can = permissionStoreBinding.can;
const PIN_MESSAGES = Permissions.PIN_MESSAGES;
let r3 = Reflect.apply(can, permissionStoreBinding, [PIN_MESSAGES,
a1]) && PermissionStore.can(Permissions.READ_MESSAGE_HISTORY, a1);
if (r0) {
r3 = !r3 ? a1.isPrivate() : r3;
r0 = r3;
}
r0 = r0 && (require(6860) /* metro dependency 6860: ThreadHooks */).getIsActiveChannelOrUnarchivableThread(a1) && a1.type !== ChannelTypes.GUILD_VOICE;
r0 = r0 && a1.type !== ChannelTypes.GUILD_STAGE_VOICE && a1.type !== ChannelTypes.MEDIA_THREAD;
return r0;
}
}
function isMessagePinnable(a0, a1) { // fn#87389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11591:231, offset: 0x01fbcfe7, size: 236 bytes, params: 3, frame: 16
var r0;
let value = a1.isSystemDM();
if (value) {
r0 = !value;
} else {
value = importDefault(5216) /* metro dependency 5216: isSystemMessage */;
value = !value(a0);
r0 = value;
}
const can = PermissionStore.can;
const PIN_MESSAGES = Permissions.PIN_MESSAGES;
let r3 = Reflect.apply(can, PermissionStore, [PIN_MESSAGES,
a1]) && PermissionStore.can(Permissions.READ_MESSAGE_HISTORY, a1);
if (r0) {
r3 = !r3 ? a1.isPrivate() : r3;
r0 = r3;
}
r0 = r0 && (require(6860) /* metro dependency 6860: ThreadHooks */).getIsActiveChannelOrUnarchivableThread(a1) && a1.type !== ChannelTypes.GUILD_VOICE;
r0 = r0 && a1.type !== ChannelTypes.GUILD_STAGE_VOICE && a1.type !== ChannelTypes.MEDIA_THREAD;
return r0;
}
global.__d(_fun87388, 11405, [3784, 661, 5216, 6860,
2]) /* metro module 11405, dependencies: [3784, 661, 5216, 6860, 2] */;
+158 -156
View File
@@ -1,180 +1,182 @@
/* Metro module 11519; source: modules/messages/isNewMessageGroup.tsx; dependencies: [661, 672, 5216, 21, 3826, 2] */
import Durations from '../../utils/Durations.tsx'; /* Metro dependency 672 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun88197(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11705:6, offset: 0x01fd94bf, size: 198 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = isNewMessageGroup;
const isNewMessageGroup2 = isNewMessageGroup;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_3 = constantsModule.MessageTypes;
const env0_4 = constantsModule.ChannelStreamTypes;
const env0_5 = constantsModule.MessageFlags;
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const Millis = (Durations).Millis;
const MINUTE = Millis.MINUTE;
const env0_6 = 7 * MINUTE;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/isNewMessageGroup.tsx');
exports.default = closure;
(FileImportTrackerModule).fileFinishedImporting('modules/messages/isNewMessageGroup.tsx');
exports.default = isNewMessageGroup2;
exports.isNewGroupItem = isNewGroupItem;
}
function isNewMessageGroup(a0, a1, a2) { // fn#88198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11705:189, offset: 0x01fd9585, size: 742 bytes, params: 4, frame: 27
var r8;
var r10;
var r12;
var r13;
var r14;
var r11;
var r9;
var r6;
var r3;
var r2;
var r0;
var value7;
var author;
var id;
var value9;
var EPHEMERAL;
var hasFlag3;
var value10;
var value11;
var username;
var defaultImport;
var moduleValue;
var isSameDay2;
var moduleValue2;
var isWithinInterval2;
var hasFlag4;
var hasFlag6;
var value22;
let hasFlag = a2.hasFlag;
var value;
const HAS_THREAD = MessageFlags.HAS_THREAD;
let r1 = !Reflect.apply(hasFlag, a2, [HAS_THREAD]) && !a2.isCommandType();
if (r1) {
r1 = a1.blocked !== a2.blocked || a1.ignored !== a2.ignored;
if (!r1) {
if (a2.type > MessageTypes.DEFAULT) {
value22 = (importDefault(5216) /* metro dependency 5216: isSystemMessage */)(a1);
r2 = value22 ? a2.type === MessageTypes.REPLY : !value22;
} else {
value7 = (importDefault(5216) /* metro dependency 5216: isSystemMessage */)(a1);
if (value7) {
r2 = !!value7;
function isNewMessageGroup(a0, a1, a2) { // fn#88198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11705:189, offset: 0x01fd9585, size: 742 bytes, params: 4, frame: 27
var r8;
var r10;
var r12;
var r13;
var r14;
var r11;
var r9;
var r6;
var r3;
var r2;
var r0;
var value7;
var author;
var id;
var value9;
var EPHEMERAL;
var hasFlag3;
var value10;
var value11;
var username;
var defaultImport;
var moduleValue;
var isSameDay2;
var moduleValue2;
var isWithinInterval2;
var hasFlag4;
var hasFlag6;
var value22;
let hasFlag = a2.hasFlag;
var value;
const HAS_THREAD = MessageFlags.HAS_THREAD;
let r1 = !Reflect.apply(hasFlag, a2, [HAS_THREAD]) && !a2.isCommandType();
if (r1) {
r1 = a1.blocked !== a2.blocked || a1.ignored !== a2.ignored;
if (!r1) {
if (a2.type > MessageTypes.DEFAULT) {
value22 = (importDefault(5216) /* metro dependency 5216: isSystemMessage */)(a1);
r2 = value22 ? a2.type === MessageTypes.REPLY : !value22;
} else {
author = a1.author;
id = author.id;
author = a2.author;
value9 = id !== author.id;
if (value9) {
r3 = value9;
value7 = (importDefault(5216) /* metro dependency 5216: isSystemMessage */)(a1);
if (value7) {
r2 = !!value7;
} else {
hasFlag = a1.hasFlag;
EPHEMERAL = MessageFlags.EPHEMERAL;
hasFlag3 = Reflect.apply(hasFlag, a1, [EPHEMERAL]);
hasFlag = a2.hasFlag;
EPHEMERAL = MessageFlags.EPHEMERAL;
value10 = hasFlag3 !== Reflect.apply(hasFlag, a2, [EPHEMERAL]);
if (value10) {
r6 = value10;
author = a1.author;
id = author.id;
author = a2.author;
value9 = id !== author.id;
if (value9) {
r3 = value9;
} else {
value11 = a2.webhookId != null;
if (value11) {
author = a1.author;
username = author.username;
author = a2.author;
r8 = username !== author.username;
hasFlag = a1.hasFlag;
EPHEMERAL = MessageFlags.EPHEMERAL;
hasFlag3 = Reflect.apply(hasFlag, a1, [EPHEMERAL]);
hasFlag = a2.hasFlag;
EPHEMERAL = MessageFlags.EPHEMERAL;
value10 = hasFlag3 !== Reflect.apply(hasFlag, a2, [EPHEMERAL]);
if (value10) {
r6 = value10;
} else {
r8 = value11;
}
if (!r8) {
r10 = a0 == null || !a0.isForumPost();
if (!r10) {
id = a1.id;
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
r10 = id !== defaultImport.castChannelIdAsMessageId(a0.id);
}
if (r10) {
moduleValue = require(3826) /* metro dependency 3826: DateUtils */;
isSameDay2 = moduleValue.isSameDay(a1.timestamp, a2.timestamp);
if (isSameDay2) {
moduleValue2 = require(3826) /* metro dependency 3826: DateUtils */;
isWithinInterval2 = moduleValue2.isWithinInterval(a1.timestamp, a2.timestamp,
env0_6);
if (isWithinInterval2) {
hasFlag4 = a2.hasFlag(MessageFlags.SUPPRESS_NOTIFICATIONS);
r12 = hasFlag4 ? a1.hasFlag(MessageFlags.SUPPRESS_NOTIFICATIONS) : !hasFlag4;
if (r12) {
hasFlag6 = a1.hasFlag(MessageFlags.SUPPRESS_NOTIFICATIONS);
r13 = hasFlag6 ? a2.hasFlag(MessageFlags.SUPPRESS_NOTIFICATIONS) : !hasFlag6;
if (!r13) {
value = a2.mentions.length > 0;
r14 = value || a2.mentionRoles.length > 0;
r14 = !r14 ? a2.mentionEveryone : r14;
value = !r14;
r13 = value;
}
value = !r13;
r13 = r13 ? a2.applicationId !== a1.applicationId : value;
r12 = r13;
} else {
r12 = !r12;
}
r11 = r12;
} else {
r11 = !isWithinInterval2;
}
r10 = r11;
} else {
r10 = !isSameDay2;
}
r9 = r10;
value11 = a2.webhookId != null;
if (value11) {
author = a1.author;
username = author.username;
author = a2.author;
r8 = username !== author.username;
} else {
r9 = !r10;
r8 = value11;
}
r8 = r9;
if (!r8) {
r10 = a0 == null || !a0.isForumPost();
if (!r10) {
id = a1.id;
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
r10 = id !== defaultImport.castChannelIdAsMessageId(a0.id);
}
if (r10) {
moduleValue = require(3826) /* metro dependency 3826: DateUtils */;
isSameDay2 = moduleValue.isSameDay(a1.timestamp, a2.timestamp);
if (isSameDay2) {
moduleValue2 = require(3826) /* metro dependency 3826: DateUtils */;
isWithinInterval2 = moduleValue2.isWithinInterval(a1.timestamp, a2.timestamp,
env0_6);
if (isWithinInterval2) {
hasFlag4 = a2.hasFlag(MessageFlags.SUPPRESS_NOTIFICATIONS);
r12 = hasFlag4 ? a1.hasFlag(MessageFlags.SUPPRESS_NOTIFICATIONS) : !hasFlag4;
if (r12) {
hasFlag6 = a1.hasFlag(MessageFlags.SUPPRESS_NOTIFICATIONS);
r13 = hasFlag6 ? a2.hasFlag(MessageFlags.SUPPRESS_NOTIFICATIONS) : !hasFlag6;
if (!r13) {
value = a2.mentions.length > 0;
r14 = value || a2.mentionRoles.length > 0;
r14 = !r14 ? a2.mentionEveryone : r14;
value = !r14;
r13 = value;
}
value = !r13;
r13 = r13 ? a2.applicationId !== a1.applicationId : value;
r12 = r13;
} else {
r12 = !r12;
}
r11 = r12;
} else {
r11 = !isWithinInterval2;
}
r10 = r11;
} else {
r10 = !isSameDay2;
}
r9 = r10;
} else {
r9 = !r10;
}
r8 = r9;
}
r6 = r8;
}
r6 = r8;
r3 = r6;
}
r3 = r6;
r2 = r3;
}
r2 = r3;
}
r1 = r2;
}
r1 = r2;
}
r0 = r1;
} else {
r0 = !r1;
}
return r0;
}
function isNewGroupItem(a0, a1, a2) { // fn#88199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11705:1090, offset: 0x01fd986b, size: 143 bytes, params: 4, frame: 18
var r1;
var r2;
var r0;
var value2;
var content;
var id;
const value = a1 == null;
if (value) {
r0 = value;
} else {
value2 = a1.type === ChannelStreamTypes.MESSAGE;
if (value2) {
content = a1.content;
id = content.id;
content = a1.content;
r1 = id === content.channel_id;
r0 = r1;
} else {
r1 = value2;
r0 = !r1;
}
if (!r1) {
r2 = a1.type !== ChannelStreamTypes.MESSAGE && a1.type !== ChannelStreamTypes.THREAD_STARTER_MESSAGE;
r2 = !r2 ? isNewMessageGroup(a0, a1.content, a2) : r2;
r1 = r2;
}
r0 = r1;
return r0;
}
return r0;
function isNewGroupItem(a0, a1, a2) { // fn#88199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11705:1090, offset: 0x01fd986b, size: 143 bytes, params: 4, frame: 18
var r1;
var r2;
var r0;
var value2;
var content;
var id;
const value = a1 == null;
if (value) {
r0 = value;
} else {
value2 = a1.type === ChannelStreamTypes.MESSAGE;
if (value2) {
content = a1.content;
id = content.id;
content = a1.content;
r1 = id === content.channel_id;
} else {
r1 = value2;
}
if (!r1) {
r2 = a1.type !== ChannelStreamTypes.MESSAGE && a1.type !== ChannelStreamTypes.THREAD_STARTER_MESSAGE;
r2 = !r2 ? isNewMessageGroup(a0, a1.content, a2) : r2;
r1 = r2;
}
r0 = r1;
}
return r0;
}
}
global.__d(_fun88197, 11519, [661, 672, 5216, 21, 3826,
2]) /* metro module 11519, dependencies: [661, 672, 5216, 21, 3826, 2] */;
+30 -29
View File
@@ -1,39 +1,40 @@
/* Metro module 5050; source: modules/messages/isSpam.tsx; dependencies: [1878, 661, 5051, 2] */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun43727(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5228:6, offset: 0x0115bdae, size: 172 bytes, params: 8, frame: 19
const env0_0 = require;
const closure = isSpammer;
const isSpammer2 = isSpammer;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_3 = constantsModule.UserFlags;
const env0_4 = constantsModule.ChannelTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/isSpam.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/isSpam.tsx');
exports.isSpamSupported = isSpamSupported;
exports.isSpammer = closure;
exports.isSpammer = isSpammer2;
exports.isSpam = isSpam_43730;
}
function isSpammer(a0) { // fn#43728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5228:147, offset: 0x0115be5a, size: 65 bytes, params: 2, frame: 13
const hasFlag = UserStore.getUser(a0)?.hasFlag(UserFlags.SPAMMER);
return hasFlag != null && hasFlag;
}
function isSpamSupported(a0) { // fn#43729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5228:327, offset: 0x0115be9b, size: 36 bytes, params: 2, frame: 3
return a0 !== undefined && a0.type !== ChannelTypes.DM;
}
function isSpam_43730(a0) { // fn#43730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5228:420, offset: 0x0115bebf, size: 67 bytes, params: 2, frame: 14
var r0;
var value;
const isSpammer2 = isSpammer(a0.author.id);
if (isSpammer2) {
value = require(5051) /* metro dependency 5051: AutomodMessageUtils */;
value = !value.isAutomodMessageRecord(a0);
r0 = value;
} else {
r0 = isSpammer2;
function isSpammer(a0) { // fn#43728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5228:147, offset: 0x0115be5a, size: 65 bytes, params: 2, frame: 13
const hasFlag = UserStore.getUser(a0)?.hasFlag(UserFlags.SPAMMER);
return hasFlag != null && hasFlag;
}
return r0;
function isSpamSupported(a0) { // fn#43729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5228:327, offset: 0x0115be9b, size: 36 bytes, params: 2, frame: 3
return a0 !== undefined && a0.type !== ChannelTypes.DM;
}
function isSpam_43730(a0) { // fn#43730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5228:420, offset: 0x0115bebf, size: 67 bytes, params: 2, frame: 14
var r0;
var value;
const isSpammer2 = isSpammer(a0.author.id);
if (isSpammer2) {
value = require(5051) /* metro dependency 5051: AutomodMessageUtils */;
value = !value.isAutomodMessageRecord(a0);
r0 = value;
} else {
r0 = isSpammer2;
}
return r0;
}
}
global.__d(_fun43727, 5050, [1878, 661, 5051, 2]) /* metro module 5050, dependencies: [1878, 661, 5051, 2] */;
+4 -1
View File
@@ -1,12 +1,15 @@
/* Metro module 5216; source: modules/messages/isSystemMessage.tsx; dependencies: [671, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun46132(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#46132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5394:6, offset: 0x011a0bf2, size: 94 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/messages/isSystemMessage.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/isSystemMessage.tsx');
exports.default = function(a0) {
var USER_MESSAGE = require(dependencyMap[0]).MessageTypesSets.USER_MESSAGE;
return !USER_MESSAGE.has(a0.type);
};
}
global.__d(_fun46132, 5216, [671, 2]) /* metro module 5216, dependencies: [671, 2] */;
@@ -1,4 +1,8 @@
/* Metro module 7228; source: modules/messages/logMessageSendFailure.tsx; dependencies: [661, 4863, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as AppAnalyticsUtilsModule from '../app_analytics/AppAnalyticsUtils.tsx'; /* Metro dependency 4863 */
function _fun57896(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7406:6, offset: 0x016b8e32, size: 130 bytes, params: 8, frame: 19
const env0_0 = require;
const closure = function(a0) {
@@ -6,29 +10,32 @@ function _fun57896(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/logMessageSendFailure.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/logMessageSendFailure.tsx');
exports.logMessageSendFailure = logMessageSendFailure;
exports.getAttachmentMimeTypes = closure;
function getAttachmentMimeTypes(a0) { // fn#57897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7406:121, offset: 0x016b8eb4, size: 22 bytes, params: 2, frame: 11
return a0.map(function({mimeType}) {
return mimeType ?? 'unknown';
});
}
function logMessageSendFailure(a0) { // fn#57899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7406:323, offset: 0x016b8ee5, size: 143 bytes, params: 2, frame: 17
const r5 = a0.fileItems != null ? getAttachmentMimeTypes(a0.fileItems) : [];
const errorMessage = a0.errorMessage;
const value = undefined;
const r6 = errorMessage ?? value;
const r7 = a0.failureCode ?? value;
const trackWithMetadata = AppAnalyticsUtilsModule.trackWithMetadata;
const SEND_MESSAGE_FAILURE = AnalyticEvents.SEND_MESSAGE_FAILURE;
Reflect.apply(trackWithMetadata, AppAnalyticsUtilsModule, [SEND_MESSAGE_FAILURE, {failure_code: r7,
error_message: r6, attachment_mimetypes: r5}]);
return value;
}
}
function getAttachmentMimeTypes(a0) { // fn#57897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7406:121, offset: 0x016b8eb4, size: 22 bytes, params: 2, frame: 11
return a0.map(function({mimeType}) {
return mimeType ?? 'unknown';
});
}
function logMessageSendFailure(a0) { // fn#57899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7406:323, offset: 0x016b8ee5, size: 143 bytes, params: 2, frame: 17
const r5 = a0.fileItems != null ? getAttachmentMimeTypes(a0.fileItems) : [];
const errorMessage = a0.errorMessage;
const value = undefined;
const r6 = errorMessage ?? value;
const r7 = a0.failureCode ?? value;
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = appAnalyticsUtilsModule.trackWithMetadata;
const SEND_MESSAGE_FAILURE = AnalyticEvents.SEND_MESSAGE_FAILURE;
Reflect.apply(trackWithMetadata, appAnalyticsUtilsModule, [SEND_MESSAGE_FAILURE, {failure_code: r7,
error_message: r6, attachment_mimetypes: r5}]);
return value;
function _fun57898({mimeType}) { // fn#57898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7406:170, offset: 0x016b8eca, size: 27 bytes, params: 2, frame: 3
return mimeType ?? 'unknown';
}
global.__d(_fun57896, 7228, [661, 4863, 2]) /* metro module 7228, dependencies: [661, 4863, 2] */;
+140 -135
View File
@@ -1,77 +1,126 @@
/* Metro module 11171; source: modules/messages/markUnread.tsx; dependencies: [5, 3786, 1379, 4814, 4605, 1878, 661, 3, 21, 7153, 507, 2] */
import Logger from '../debug/Logger.tsx'; /* Metro dependency 3 */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import JoinedThreadsStore from '../threads/JoinedThreadsStore.tsx'; /* Metro dependency 3786 */
import MessageStore from '../../stores/MessageStore.tsx'; /* Metro dependency 4814 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as ReadStateStoreModule from '../../stores/ReadStateStore.tsx'; /* Metro dependency 4605 */
function _fun85310(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11357:6, offset: 0x01f6ac4b, size: 279 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const joinedThreadsStore = importDefault(3786) /* metro dependency 3786: JoinedThreadsStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
const env0_7 = (require(4605) /* metro dependency 4605: ReadStateStore */).shouldBadgeMessage;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_9 = (require(661) /* metro dependency 661: Constants */).Endpoints;
let value = importDefault(3) /* metro dependency 3: Logger */;
let value = Logger;
value = new value('markUnread');
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/markUnread.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/markUnread.tsx');
exports.default = function() {
return _markUnread.apply(this, arguments);
};
}
function _markUnread() { // fn#85311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11357:225, offset: 0x01f6ad62, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun85313).apply(this, arguments);
}
function* _fun85313(a0, a1) { // fn#85313, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11357:270, offset: 0x01f6ad9f, size: 505 bytes, params: 3, frame: 22
var environment;
var r9;
var value13;
var value16;
var object2;
var HTTP;
var post;
if (true) {
var env0_0 = a1;
var env0_3;
value = environment.__proto__.__proto__;
var binding = env2_8;
if (binding.getCurrentUser() != null) {
binding = env2_6;
var messages = binding.getMessages(a0);
var property = messages.toArray().filter(_fun85314).sort(_fun85315).reverse()[0];
r9 = property == null ? env2_1(env2_2[8]).atPreviousMillisecond(a1) : property.id;
env0_3 = 0;
messages.forAll(_fun85316);
binding = env2_5;
var channel = binding.getChannel(a0);
if (channel != null && channel.isThread()) {
if (channel.isArchivedThread()) {
binding = env2_1;
value13 = binding(env2_2[9]);
yield value13.unarchiveThread(channel, false);
if (false) {
return undefined;
}
binding = env2_4;
if (binding.hasJoined(a0)) {
function _markUnread() { // fn#85311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11357:225, offset: 0x01f6ad62, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun85313).apply(this, arguments);
function* _fun85313(a0, a1) { // fn#85313, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11357:270, offset: 0x01f6ad9f, size: 505 bytes, params: 3, frame: 22
var environment;
var r9;
var value13;
var value16;
var object;
var HTTP;
var post;
if (true) {
var env0_0 = a1;
var env0_3;
value = environment.__proto__.__proto__;
var binding = env2_8;
if (binding.getCurrentUser() != null) {
binding = env2_6;
var messages = binding.getMessages(a0);
var property = messages.toArray().filter(_fun85314).sort(_fun85315).reverse()[0];
r9 = property == null ? env2_1(env2_2[8]).atPreviousMillisecond(a1) : property.id;
env0_3 = 0;
messages.forAll(_fun85316);
binding = env2_5;
var channel = binding.getChannel(a0);
if (channel != null && channel.isThread()) {
if (channel.isArchivedThread()) {
binding = env2_1;
value13 = binding(env2_2[9]);
yield value13.unarchiveThread(channel, false);
if (false) {
return undefined;
}
binding = env2_4;
if (binding.hasJoined(a0)) {
binding = env2_10;
binding.log('Marking unread', {channelId: a0, messageId: a1});
binding = env2_0;
HTTP = binding(env2_2[10]).HTTP;
post = HTTP.post;
object = {};
binding = env2_9;
object.url = binding.MESSAGE_ACK(a0, r9);
object.body = {manual: true, mention_count: env0_3};
object.oldFormErrors = true;
object.rejectWithError = true;
Reflect.apply(post, HTTP, [object]);
return undefined;
}
binding = env2_1;
value16 = binding(env2_2[9]);
yield value16.joinThread(channel, 'Mark Unread');
if (false) {
return undefined;
}
binding = env2_10;
binding.log('Marking unread', {channelId: a0, messageId: a1});
binding = env2_0;
HTTP = binding(env2_2[10]).HTTP;
post = HTTP.post;
object = {};
binding = env2_9;
object.url = binding.MESSAGE_ACK(a0, r9);
object.body = {manual: true, mention_count: env0_3};
object.oldFormErrors = true;
object.rejectWithError = true;
Reflect.apply(post, HTTP, [object]);
return undefined;
}
binding = env2_4;
if (binding.hasJoined(a0)) {
binding = env2_10;
binding.log('Marking unread', {channelId: a0, messageId: a1});
binding = env2_0;
HTTP = binding(env2_2[10]).HTTP;
post = HTTP.post;
object = {};
binding = env2_9;
object.url = binding.MESSAGE_ACK(a0, r9);
object.body = {manual: true, mention_count: env0_3};
object.oldFormErrors = true;
object.rejectWithError = true;
Reflect.apply(post, HTTP, [object]);
return undefined;
}
binding = env2_1;
value16 = binding(env2_2[9]);
yield value16.joinThread(channel, 'Mark Unread');
if (false) {
return undefined;
}
binding = env2_10;
binding.log('Marking unread', {channelId: a0, messageId: a1});
binding = env2_0;
HTTP = binding(env2_2[10]).HTTP;
post = HTTP.post;
object2 = {};
object = {};
binding = env2_9;
object2.url = binding.MESSAGE_ACK(a0, r9);
object2.body = {manual: true, mention_count: env0_3};
object2.oldFormErrors = true;
object2.rejectWithError = true;
Reflect.apply(post, HTTP, [object2]);
return undefined;
}
binding = env2_1;
value16 = binding(env2_2[9]);
yield value16.joinThread(channel, 'Mark Unread');
if (false) {
object.url = binding.MESSAGE_ACK(a0, r9);
object.body = {manual: true, mention_count: env0_3};
object.oldFormErrors = true;
object.rejectWithError = true;
Reflect.apply(post, HTTP, [object]);
return undefined;
}
binding = env2_10;
@@ -79,86 +128,42 @@ function* _fun85313(a0, a1) { // fn#85313, original name: ?anon_0_, source: /ci/
binding = env2_0;
HTTP = binding(env2_2[10]).HTTP;
post = HTTP.post;
object2 = {};
object = {};
binding = env2_9;
object2.url = binding.MESSAGE_ACK(a0, r9);
object2.body = {manual: true, mention_count: env0_3};
object2.oldFormErrors = true;
object2.rejectWithError = true;
Reflect.apply(post, HTTP, [object2]);
return undefined;
object.url = binding.MESSAGE_ACK(a0, r9);
object.body = {manual: true, mention_count: env0_3};
object.oldFormErrors = true;
object.rejectWithError = true;
Reflect.apply(post, HTTP, [object]);
}
binding = env2_4;
if (binding.hasJoined(a0)) {
binding = env2_10;
binding.log('Marking unread', {channelId: a0, messageId: a1});
binding = env2_0;
HTTP = binding(env2_2[10]).HTTP;
post = HTTP.post;
object2 = {};
binding = env2_9;
object2.url = binding.MESSAGE_ACK(a0, r9);
object2.body = {manual: true, mention_count: env0_3};
object2.oldFormErrors = true;
object2.rejectWithError = true;
Reflect.apply(post, HTTP, [object2]);
return undefined;
}
binding = env2_1;
value16 = binding(env2_2[9]);
yield value16.joinThread(channel, 'Mark Unread');
if (false) {
return undefined;
}
binding = env2_10;
binding.log('Marking unread', {channelId: a0, messageId: a1});
binding = env2_0;
HTTP = binding(env2_2[10]).HTTP;
post = HTTP.post;
object2 = {};
binding = env2_9;
object2.url = binding.MESSAGE_ACK(a0, r9);
object2.body = {manual: true, mention_count: env0_3};
object2.oldFormErrors = true;
object2.rejectWithError = true;
Reflect.apply(post, HTTP, [object2]);
return undefined;
}
binding = env2_10;
binding.log('Marking unread', {channelId: a0, messageId: a1});
binding = env2_0;
HTTP = binding(env2_2[10]).HTTP;
post = HTTP.post;
object2 = {};
binding = env2_9;
object2.url = binding.MESSAGE_ACK(a0, r9);
object2.body = {manual: true, mention_count: env0_3};
object2.oldFormErrors = true;
object2.rejectWithError = true;
Reflect.apply(post, HTTP, [object2]);
function _fun85314({id}) { // fn#85314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11357:367, offset: 0x01f6af98, size: 60 bytes, params: 2, frame: 13
let value = environment.__proto__.__proto__.__proto__;
value = env3_1(env3_2[8]);
value = value.compare(id, require);
return value < 0;
}
function _fun85315({id}, {id}) { // fn#85315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11357:404, offset: 0x01f6afd4, size: 55 bytes, params: 3, frame: 13
const value = environment.__proto__.__proto__.__proto__;
return env3_1(env3_2[8]).compare(id, id);
}
function _fun85316(a0) { // fn#85316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11357:515, offset: 0x01f6b00b, size: 91 bytes, params: 2, frame: 17
const value = environment.__proto__.__proto__.__proto__;
let binding = env3_1;
const value2 = binding(env3_2[8]);
if (value2.compare(a0.id, env0_2) > 0 && env3_7(a0, env0_1)) {
binding = env0_3;
env0_3 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
}
}
}
}
}
function _fun85314({id}) { // fn#85314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11357:367, offset: 0x01f6af98, size: 60 bytes, params: 2, frame: 13
let value = environment.__proto__.__proto__.__proto__;
value = env3_1(env3_2[8]);
value = value.compare(id, require);
return value < 0;
}
function _fun85315({id}, {id}) { // fn#85315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11357:404, offset: 0x01f6afd4, size: 55 bytes, params: 3, frame: 13
const value = environment.__proto__.__proto__.__proto__;
return env3_1(env3_2[8]).compare(id, id);
}
function _fun85316(a0) { // fn#85316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11357:515, offset: 0x01f6b00b, size: 91 bytes, params: 2, frame: 17
const value = environment.__proto__.__proto__.__proto__;
let binding = env3_1;
const value2 = binding(env3_2[8]);
if (value2.compare(a0.id, env0_2) > 0 && env3_7(a0, env0_1)) {
binding = env0_3;
env0_3 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
}
}
global.__d(_fun85310, 11171, [5, 3786, 1379, 4814, 4605, 1878, 661, 3, 21, 7153, 507,
2]) /* metro module 11171, dependencies: [5, 3786, 1379, 4814, 4605, 1878, 661, 3, 21, 7153, 507, 2] */;
@@ -1,60 +1,63 @@
/* Metro module 11345; source: modules/messages/native/ChannelLatestMessageLoadingStatsManager.tsx; dependencies: [6, 7, 661, 4878, 2] */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun86743(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11531:6, offset: 0x01f9e4a5, size: 188 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const value = _fun86744();
const Set = global.Set;
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
value.seenChannelIds = set instanceof Object ? set : value2;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/ChannelLatestMessageLoadingStatsManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/ChannelLatestMessageLoadingStatsManager.tsx');
exports.default = value;
}
function _fun86744() { // fn#86744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11531:143, offset: 0x01f9e561, size: 109 bytes, params: 1, frame: 15
return env0_3(ChannelLatestMessageLoadingStatsManager, [{key: 'start', value: function(a0) {
var object = {channelId: a0.channelId};
var Date = global.Date;
object.startMs = Date.now();
this.latestChannelMessagesLoad = object;
}}, {key: 'cancel', value: function() {
this.latestChannelMessagesLoad = undefined;
}}, {key: 'finish', value: value_86748}]);
}
function ChannelLatestMessageLoadingStatsManager(a0) { // fn#86745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11531:154, offset: 0x01f9e5ce, size: 36 bytes, params: 2, frame: 13
env1_2(this, ChannelLatestMessageLoadingStatsManager);
this.label = a0;
}
function value_86748(a0) { // fn#86748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11531:515, offset: 0x01f9e630, size: 204 bytes, params: 2, frame: 18
var value;
var seenChannelIds;
var value3;
var value4;
var moduleValue;
const latestChannelMessagesLoad = this.latestChannelMessagesLoad;
if (latestChannelMessagesLoad != null) {
if (latestChannelMessagesLoad.channelId === a0.channelId) {
value = global.Date.now();
value -= latestChannelMessagesLoad.startMs;
seenChannelIds = ChannelLatestMessageLoadingStatsManager.seenChannelIds;
value3 = seenChannelIds.has(a0.channelId);
if (!value3) {
seenChannelIds = ChannelLatestMessageLoadingStatsManager.seenChannelIds;
seenChannelIds.add(a0.channelId);
}
value4 = environment.__proto__;
moduleValue = require(4878) /* metro dependency 4878: Clickstream */;
moduleValue.trackClickstream(AnalyticEvents.CHANNEL_LATEST_MESSAGES_LOADED_CLICKSTREAM,
{load_duration_ms: value,
were_messages_cached: a0.areMessagesCached, is_first_load: !value3});
function _fun86744() { // fn#86744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11531:143, offset: 0x01f9e561, size: 109 bytes, params: 1, frame: 15
return CreateClass(ChannelLatestMessageLoadingStatsManager, [{key: 'start', value: function(a0) {
var object = {channelId: a0.channelId};
var Date = global.Date;
object.startMs = Date.now();
this.latestChannelMessagesLoad = object;
}}, {key: 'cancel', value: function() {
this.latestChannelMessagesLoad = undefined;
}}, {key: 'finish', value: value_86748}]);
function ChannelLatestMessageLoadingStatsManager(a0) { // fn#86745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11531:154, offset: 0x01f9e5ce, size: 36 bytes, params: 2, frame: 13
env1_2(this, ChannelLatestMessageLoadingStatsManager);
this.label = a0;
}
function value_86748(a0) { // fn#86748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11531:515, offset: 0x01f9e630, size: 204 bytes, params: 2, frame: 18
var value;
var seenChannelIds;
var value3;
var value4;
var moduleValue;
const latestChannelMessagesLoad = this.latestChannelMessagesLoad;
if (latestChannelMessagesLoad != null) {
if (latestChannelMessagesLoad.channelId === a0.channelId) {
value = global.Date.now();
value -= latestChannelMessagesLoad.startMs;
seenChannelIds = ChannelLatestMessageLoadingStatsManager.seenChannelIds;
value3 = seenChannelIds.has(a0.channelId);
if (!value3) {
seenChannelIds = ChannelLatestMessageLoadingStatsManager.seenChannelIds;
seenChannelIds.add(a0.channelId);
}
value4 = environment.__proto__;
moduleValue = require(4878) /* metro dependency 4878: Clickstream */;
moduleValue.trackClickstream(AnalyticEvents.CHANNEL_LATEST_MESSAGES_LOADED_CLICKSTREAM,
{load_duration_ms: value,
were_messages_cached: a0.areMessagesCached, is_first_load: !value3});
this.latestChannelMessagesLoad = undefined;
}
}
}
}
}
global.__d(_fun86743, 11345, [6, 7, 661, 4878, 2]) /* metro module 11345, dependencies: [6, 7, 661, 4878, 2] */;
+353 -262
View File
@@ -1,17 +1,32 @@
/* Metro module 11317; source: modules/messages/native/ChatBanner.tsx; dependencies: [31, 27, 4257, 4605, 11318, 661, 33, 4501, 697, 11319, 11320, 566, 21, 1357, 683, 4863, 6609, 4573, 1244, 4578, 6860, 7153, 5278, 5097, 8222, 2] */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import MobileVisualRefreshExperiment from '../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import GatewayConnectionStore from '../../gateway/GatewayConnectionStore.tsx'; /* Metro dependency 4257 */
import ReadStateStore from '../../../stores/ReadStateStore.tsx'; /* Metro dependency 4605 */
import ThreadActionCreators from '../../threads/ThreadActionCreators.tsx'; /* Metro dependency 7153 */
import UseShowChannelOptInNotice from '../../opt_in_channels/useShowChannelOptInNotice.tsx'; /* Metro dependency 11319 */
import UseAllowedChatOverlays from '../useAllowedChatOverlays.tsx'; /* Metro dependency 11320 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as AppAnalyticsUtilsModule from '../../app_analytics/AppAnalyticsUtils.tsx'; /* Metro dependency 4863 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as OptInChannelsActionCreatorsModule from '../../opt_in_channels/OptInChannelsActionCreators.tsx'; /* Metro dependency 6609 */
import * as ThreadHooksModule from '../../threads/ThreadHooks.tsx'; /* Metro dependency 6860 */
import * as ChatOverlayConstantsModule from '../ChatOverlayConstants.tsx'; /* Metro dependency 11318 */
function _fun86326(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:6, offset: 0x01f90ec2, size: 713 bytes, params: 8, frame: 26
var object2;
const env0_0 = require;
const closure = OptInChannelBanner;
const OptInChannelBanner2 = OptInChannelBanner;
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 */;
let value = ReactNativeModule;
const StyleSheet = value.StyleSheet;
const env0_4 = value.View;
const gatewayConnectionStore = importDefault(4257) /* metro dependency 4257: GatewayConnectionStore */;
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
const env0_7 = (require(11318) /* metro dependency 11318: ChatOverlayConstants */).ChatOverlays;
value = require(661) /* metro dependency 661: Constants */;
const env0_8 = value.AnalyticsObjectTypes;
const env0_9 = value.AnalyticsObjects;
@@ -22,278 +37,354 @@ function _fun86326(global, require, importDefault, importAll, module, exports, d
const env0_13 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.threadBannerContainer = {'alignSelf': 'stretch', 'minHeight': 60, 'flexDirection': 'row',
object.threadBannerContainer = {'alignSelf': 'stretch', 'minHeight': 60, 'flexDirection': 'row',
'paddingHorizontal': 16, 'paddingVertical': 12, 'alignItems': 'center', 'flexGrow': 0, 'zIndex': 100,
backgroundColor: BACKGROUND_SURFACE_HIGH};
object2.threadBannerTitle = {'flex': 1, 'lineHeight': 18};
object2.threadBannerButton = {'flexGrow': 0, 'paddingVertical': 7, 'paddingHorizontal': 16, 'marginLeft': 16};
object.threadBannerTitle = {'flex': 1, 'lineHeight': 18};
object.threadBannerButton = {'flexGrow': 0, 'paddingVertical': 7, 'paddingHorizontal': 16, 'marginLeft': 16};
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object2.newMessageBar = {'backgroundColor': null, 'flexDirection': 'row', 'justifyContent': 'center',
object.newMessageBar = {'backgroundColor': null, 'flexDirection': 'row', 'justifyContent': 'center',
'alignItems': 'center', 'overflow': 'hidden', 'zIndex': 100, 'minHeight': 45, backgroundColor: BACKGROUND_BRAND};
object2.newMessageBarTextContainer = {'flex': 1, 'paddingLeft': 16, 'paddingVertical': 10};
object2.newMessageBarCloseButton = {paddingHorizontal: 12};
const object3 = {'flexDirection': 'row', 'justifyContent': 'space-between', 'alignItems': 'center',
object.newMessageBarTextContainer = {'flex': 1, 'paddingLeft': 16, 'paddingVertical': 10};
object.newMessageBarCloseButton = {paddingHorizontal: 12};
const object5 = {'flexDirection': 'row', 'justifyContent': 'space-between', 'alignItems': 'center',
'overflow': 'hidden', 'padding': 8, 'paddingLeft': 16, 'paddingRight': 16, 'zIndex': 100};
const CHAT_BANNER_BG = (importDefault(697) /* metro dependency 697: native */).colors.CHAT_BANNER_BG;
object3.backgroundColor = CHAT_BANNER_BG;
object3.borderBottomWidth = StyleSheet.hairlineWidth;
object5.backgroundColor = CHAT_BANNER_BG;
object5.borderBottomWidth = StyleSheet.hairlineWidth;
let CHAT_BORDER = (importDefault(697) /* metro dependency 697: native */).colors.CHAT_BORDER;
object3.borderBottomColor = CHAT_BORDER;
object2.optInChannelBannerContainer = object3;
object5.borderBottomColor = CHAT_BORDER;
object.optInChannelBannerContainer = object5;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object2.optInChannelBannerLegacyBorder = {borderBottomWidth: 1, borderBottomColor: BORDER_SUBTLE};
const object4 = {};
object4.borderTopWidth = StyleSheet.hairlineWidth;
object.optInChannelBannerLegacyBorder = {borderBottomWidth: 1, borderBottomColor: BORDER_SUBTLE};
const object6 = {};
object6.borderTopWidth = StyleSheet.hairlineWidth;
CHAT_BORDER = (importDefault(697) /* metro dependency 697: native */).colors.CHAT_BORDER;
object4.borderTopColor = CHAT_BORDER;
object2.topBorder = object4;
object2.optInChannelBannerText = {flex: 1};
object2.optInChannelBannerButtonContainer = {'flexShrink': 0, 'marginLeft': 8};
const env0_14 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/ChatBanner.tsx');
object6.borderTopColor = CHAT_BORDER;
object.topBorder = object6;
object.optInChannelBannerText = {flex: 1};
object.optInChannelBannerButtonContainer = {'flexShrink': 0, 'marginLeft': 8};
const env0_14 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/ChatBanner.tsx');
exports.default = ChatBanner;
exports.OptInChannelBanner = closure;
}
function OptInChannelBanner({channel, topBorder}) { // fn#86327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:1536, offset: 0x01f9118b, size: 439 bytes, params: 2, frame: 25
const styles = useStyles();
const value2 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('OptInChannelBanner');
env0_3.useEffect(_fun86328, [channel]);
const value3 = env0_3.useCallback(_fun86329, [channel]);
const items2 = [styles.optInChannelBannerContainer];
items2[1] = value2 ? null : styles.optInChannelBannerLegacyBorder;
topBorder = topBorder ? styles.topBorder : null;
items2[2] = topBorder;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const text = <Text lineClamp={2} style={styles.optInChannelBannerText} variant="text-sm/semibold">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.iOWmmB)}</Text>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<View style={items2}>
{text}
<View style={styles.optInChannelBannerButtonContainer}>
<Button
onPress={value3}
size="sm"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['TD/+zP'])}
/>
exports.OptInChannelBanner = OptInChannelBanner2;
function OptInChannelBanner({channel, topBorder}) { // fn#86327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:1536, offset: 0x01f9118b, size: 439 bytes, params: 2, frame: 25
const styles = useStyles();
const value2 = (MobileVisualRefreshExperiment)('OptInChannelBanner');
ReactModule.useEffect(_fun86328, [channel]);
const value3 = ReactModule.useCallback(_fun86329, [channel]);
const items2 = [styles.optInChannelBannerContainer];
items2[1] = value2 ? null : styles.optInChannelBannerLegacyBorder;
topBorder = topBorder ? styles.topBorder : null;
items2[2] = topBorder;
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
const text = (
<Text
lineClamp={2}
style={styles.optInChannelBannerText}
variant="text-sm/semibold"
>
{intl.string((IndexNativeModule).t.iOWmmB)}
</Text>
);
const Button = (ButtonNativeModule).Button;
return (
<View style={items2}>
{text}
<View style={styles.optInChannelBannerButtonContainer}>
<Button
onPress={value3}
size="sm"
text={intl.string((IndexNativeModule).t['TD/+zP'])}
/>
</View>
</View>
</View>
);
}
function ArchivedLockedThreadChatBanner({channel}) { // fn#86330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:2542, offset: 0x01f914a8, size: 420 bytes, params: 2, frame: 27
const styles = useStyles();
env0_3.useEffect(_fun86331, [channel]);
const value2 = (require(6860) /* metro dependency 6860: ThreadHooks */).useCanUnarchiveThread(channel);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const isForumPost2 = channel.isForumPost();
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return (
<View style={styles.threadBannerContainer}>
<Text
lineClamp={4}
style={styles.threadBannerTitle}
variant="text-sm/medium"
color="text-default"
>
{isForumPost2 ? Reflect.apply(string, intl, [t['833FDn']]) : Reflect.apply(string, intl, [t.rEeodK])}
</Text>
{value2 && <View style={styles.threadBannerButton}>{((Button) => <Button variant="secondary" size="sm" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0dvvEi'])} onPress={onPress_86332} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>}
</View>
);
}
function LockedThreadChatBanner({channel}) { // fn#86333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:3488, offset: 0x01f9178f, size: 420 bytes, params: 2, frame: 27
const styles = useStyles();
env0_3.useEffect(_fun86334, [channel]);
const value2 = (require(6860) /* metro dependency 6860: ThreadHooks */).useIsThreadModerator(channel);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const isForumPost2 = channel.isForumPost();
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return (
<View style={styles.threadBannerContainer}>
<Text
lineClamp={4}
style={styles.threadBannerTitle}
variant="text-sm/medium"
color="text-default"
>
{isForumPost2 ? Reflect.apply(string, intl, [t.E7oO8u]) : Reflect.apply(string, intl, [t['V/JF2N']])}
</Text>
{value2 && <View style={styles.threadBannerButton}>{((Button) => <Button variant="secondary" size="sm" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zA9d1J)} onPress={onPress_86335} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>}
</View>
);
}
function NewMessagesChatBar({channel, unreadCount, oldestUnreadTimestamp, handleScrollToNewMessages}) { // fn#86336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:4413, offset: 0x01f919e4, size: 555 bytes, params: 2, frame: 36
var r23;
var r1;
var r0;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items2;
const styles = useStyles();
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
if (Reflect.apply(useStateFromStores, fluxModule, [[GatewayConnectionStore], function() {
return GatewayConnectionStore.isConnected();
}, []])) {
if (unreadCount <= 0) {
r1 = null;
} else {
r23 = ReadStateStore.isEstimated(channel.id) ? t.wvtbbG : t['BctFH/'];
var viewBindingProps = {style: styles.newMessageBar};
items2 = [<PressableOpacity accessibilityRole="button" style={styles.newMessageBarTextContainer} onPress={handleScrollToNewMessages}>{((Text) => <Text variant="text-sm/semibold" color="always-white">{intl.format(r23,
{count: unreadCount,
timestamp: oldestUnreadTimestamp})}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</PressableOpacity>];
items2[1] = <PressableOpacity style={styles.newMessageBarCloseButton} accessibilityRole="button" accessibilityLabel={intl.string(t.e6RscS)} onPress={function() {
return require(dependencyMap[23]).ack(channel.id, {section: AnalyticsSections.NEW_MESSAGES_BANNER,
object: AnalyticsObjects.MARK_CHANNEL_AS_READ_BUTTON, objectType: AnalyticsObjectTypes.ACK_MANUAL});
}}>{((XSmallBoldIcon) => <XSmallBoldIcon size="sm" color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} />)((require(8222) /* metro dependency 8222: XSmallBoldIcon */).XSmallBoldIcon)}</PressableOpacity>;
r1 = <View {...viewBindingProps}>{items2}</View>;
);
function _fun86328() { // fn#86328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:1645, offset: 0x01f91342, size: 143 bytes, params: 1, frame: 21
let value = environment.__proto__;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const CHANNEL_BANNER_VIEWED = AnalyticEvents.CHANNEL_BANNER_VIEWED;
const object = {};
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const collectGuildAnalyticsMetadata = value.collectGuildAnalyticsMetadata;
const channelBinding = channel;
const getGuildId = channelBinding.getGuildId;
copyDataProperties(object, Reflect.apply(collectGuildAnalyticsMetadata, value, [Reflect.apply(getGuildId,
channelBinding, [])]), value);
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object, appAnalyticsUtilsModule.collectChannelAnalyticsMetadata(channelBinding), value);
object['banner_type'] = 'channel_opt_in';
Reflect.apply(track, defaultImport, [CHANNEL_BANNER_VIEWED, object]);
}
r0 = r1;
} else {
r0 = null;
function _fun86329() { // fn#86329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:1854, offset: 0x01f913d1, size: 215 bytes, params: 1, frame: 24
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const CHANNEL_BANNER_CTA_CLICKED = AnalyticEvents.CHANNEL_BANNER_CTA_CLICKED;
const object = {};
const collectGuildAnalyticsMetadata = AppAnalyticsUtilsModule.collectGuildAnalyticsMetadata;
const channelBinding = channel;
const getGuildId = channelBinding.getGuildId;
copyDataProperties(object, Reflect.apply(collectGuildAnalyticsMetadata, AppAnalyticsUtilsModule,
[Reflect.apply(getGuildId, channelBinding, [])]), undefined);
copyDataProperties(object, AppAnalyticsUtilsModule.collectChannelAnalyticsMetadata(channelBinding), undefined);
object['banner_type'] = 'channel_opt_in';
object['cta_type'] = 'add channel';
Reflect.apply(track, defaultImport, [CHANNEL_BANNER_CTA_CLICKED, object]);
const setOptInChannel = OptInChannelsActionCreatorsModule.setOptInChannel;
const guild_id = channelBinding.guild_id;
const id = channelBinding.id;
const CHANNEL = AnalyticsSections.CHANNEL;
Reflect.apply(setOptInChannel, OptInChannelsActionCreatorsModule, [guild_id, id, true, {section: CHANNEL}]);
}
}
return r0;
}
function ChatBanner({channel, handleScrollToNewMessages}) { // fn#86339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:5381, offset: 0x01f91c71, size: 330 bytes, params: 2, frame: 22
const value2 = (importDefault(11319) /* metro dependency 11319: useShowChannelOptInNotice */)(channel);
const value3 = (importDefault(11320) /* metro dependency 11320: useAllowedChatOverlays */)();
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ReadStateStore], _fun86340,
[channel.id]);
const unreadCount = value4.unreadCount;
return channel.isArchivedLockedThread() ? <ArchivedLockedThreadChatBanner channel={channel} /> : channel.isLockedThread() ? <LockedThreadChatBanner channel={channel} /> : unreadCount > 0 && value3.includes(ChatOverlays.NEW_MESSAGES) ? <NewMessagesChatBar unreadCount={unreadCount} oldestUnreadTimestamp={value4.oldestUnreadTimestamp} channel={channel} handleScrollToNewMessages={handleScrollToNewMessages} /> : value2 && value3.includes(ChatOverlays.OPT_IN_CHANNEL) ? <OptInChannelBanner channel={channel} /> : null;
}
function ArchivedLockedThreadChatBanner({channel}) { // fn#86330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:2542, offset: 0x01f914a8, size: 420 bytes, params: 2, frame: 27
const styles = useStyles();
ReactModule.useEffect(_fun86331, [channel]);
const value2 = (ThreadHooksModule).useCanUnarchiveThread(channel);
const Text = (TextModule).Text;
const isForumPost2 = channel.isForumPost();
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return (
<View style={styles.threadBannerContainer}>
<Text
lineClamp={4}
style={styles.threadBannerTitle}
variant="text-sm/medium"
color="text-default"
>
{isForumPost2 ? Reflect.apply(string, intl, [t['833FDn']]) : Reflect.apply(string, intl, [t.rEeodK])}
</Text>
{value2 && <View style={styles.threadBannerButton}>{((Button) => <Button variant="secondary" size="sm" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0dvvEi'])} onPress={onPress_86332} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>}
</View>
);
function _fun86331() { // fn#86331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:2618, offset: 0x01f9164c, size: 141 bytes, params: 1, frame: 21
let value = environment.__proto__;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const CHANNEL_BANNER_VIEWED = AnalyticEvents.CHANNEL_BANNER_VIEWED;
const object = {};
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const collectGuildAnalyticsMetadata = value.collectGuildAnalyticsMetadata;
const channelBinding = channel;
const getGuildId = channelBinding.getGuildId;
copyDataProperties(object, Reflect.apply(collectGuildAnalyticsMetadata, value, [Reflect.apply(getGuildId,
channelBinding, [])]), value);
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object, appAnalyticsUtilsModule.collectChannelAnalyticsMetadata(channelBinding), value);
object['banner_type'] = 'thread';
Reflect.apply(track, defaultImport, [CHANNEL_BANNER_VIEWED, object]);
}
function _fun86328() { // fn#86328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:1645, offset: 0x01f91342, size: 143 bytes, params: 1, frame: 21
let value = environment.__proto__;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const CHANNEL_BANNER_VIEWED = AnalyticEvents.CHANNEL_BANNER_VIEWED;
const object2 = {};
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const collectGuildAnalyticsMetadata = value.collectGuildAnalyticsMetadata;
const channelBinding = channel;
const getGuildId = channelBinding.getGuildId;
copyDataProperties(object2, Reflect.apply(collectGuildAnalyticsMetadata, value, [Reflect.apply(getGuildId,
channelBinding, [])]), value);
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object2, appAnalyticsUtilsModule.collectChannelAnalyticsMetadata(channelBinding), value);
object2['banner_type'] = 'channel_opt_in';
Reflect.apply(track, defaultImport, [CHANNEL_BANNER_VIEWED, object2]);
}
function ArchivedLockedThreadChatBannerOnPress() { // fn#86332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:3250, owner: ArchivedLockedThreadChatBanner.onPress, offset: 0x01f916d9, size: 182 bytes, params: 1, frame: 22
let value = environment.__proto__;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const CHANNEL_BANNER_CTA_CLICKED = AnalyticEvents.CHANNEL_BANNER_CTA_CLICKED;
const object = {};
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const collectGuildAnalyticsMetadata = value.collectGuildAnalyticsMetadata;
const channelBinding = channel;
const getGuildId = channelBinding.getGuildId;
copyDataProperties(object, Reflect.apply(collectGuildAnalyticsMetadata, value, [Reflect.apply(getGuildId,
channelBinding, [])]), value);
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object, appAnalyticsUtilsModule.collectChannelAnalyticsMetadata(channelBinding), value);
object['banner_type'] = 'thread';
object['cta_type'] = 'unarchive';
Reflect.apply(track, defaultImport, [CHANNEL_BANNER_CTA_CLICKED, object]);
(ThreadActionCreators).unarchiveThread(channelBinding, false);
}
function _fun86329() { // fn#86329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:1854, offset: 0x01f913d1, size: 215 bytes, params: 1, frame: 24
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const CHANNEL_BANNER_CTA_CLICKED = AnalyticEvents.CHANNEL_BANNER_CTA_CLICKED;
const object2 = {};
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const collectGuildAnalyticsMetadata = appAnalyticsUtilsModule.collectGuildAnalyticsMetadata;
const channelBinding = channel;
const getGuildId = channelBinding.getGuildId;
copyDataProperties(object2, Reflect.apply(collectGuildAnalyticsMetadata, appAnalyticsUtilsModule,
[Reflect.apply(getGuildId, channelBinding, [])]), undefined);
const moduleValue2 = appAnalyticsUtilsModule;
copyDataProperties(object2, moduleValue2.collectChannelAnalyticsMetadata(channelBinding), undefined);
object2['banner_type'] = 'channel_opt_in';
object2['cta_type'] = 'add channel';
Reflect.apply(track, defaultImport, [CHANNEL_BANNER_CTA_CLICKED, object2]);
const optInChannelsActionCreatorsModule = require(6609) /* metro dependency 6609: OptInChannelsActionCreators */;
const setOptInChannel = optInChannelsActionCreatorsModule.setOptInChannel;
const guild_id = channelBinding.guild_id;
const id = channelBinding.id;
const CHANNEL = AnalyticsSections.CHANNEL;
Reflect.apply(setOptInChannel, optInChannelsActionCreatorsModule, [guild_id, id, true, {section: CHANNEL}]);
}
function _fun86331() { // fn#86331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:2618, offset: 0x01f9164c, size: 141 bytes, params: 1, frame: 21
let value = environment.__proto__;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const CHANNEL_BANNER_VIEWED = AnalyticEvents.CHANNEL_BANNER_VIEWED;
const object2 = {};
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const collectGuildAnalyticsMetadata = value.collectGuildAnalyticsMetadata;
const channelBinding = channel;
const getGuildId = channelBinding.getGuildId;
copyDataProperties(object2, Reflect.apply(collectGuildAnalyticsMetadata, value, [Reflect.apply(getGuildId,
channelBinding, [])]), value);
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object2, appAnalyticsUtilsModule.collectChannelAnalyticsMetadata(channelBinding), value);
object2['banner_type'] = 'thread';
Reflect.apply(track, defaultImport, [CHANNEL_BANNER_VIEWED, object2]);
}
function ArchivedLockedThreadChatBannerOnPress() { // fn#86332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:3250, owner: ArchivedLockedThreadChatBanner.onPress, offset: 0x01f916d9, size: 182 bytes, params: 1, frame: 22
let value = environment.__proto__;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const CHANNEL_BANNER_CTA_CLICKED = AnalyticEvents.CHANNEL_BANNER_CTA_CLICKED;
const object2 = {};
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const collectGuildAnalyticsMetadata = value.collectGuildAnalyticsMetadata;
const channelBinding = channel;
const getGuildId = channelBinding.getGuildId;
copyDataProperties(object2, Reflect.apply(collectGuildAnalyticsMetadata, value, [Reflect.apply(getGuildId,
channelBinding, [])]), value);
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object2, appAnalyticsUtilsModule.collectChannelAnalyticsMetadata(channelBinding), value);
object2['banner_type'] = 'thread';
object2['cta_type'] = 'unarchive';
Reflect.apply(track, defaultImport, [CHANNEL_BANNER_CTA_CLICKED, object2]);
(importDefault(7153) /* metro dependency 7153: ThreadActionCreators */).unarchiveThread(channelBinding, false);
}
function LockedThreadChatBannerOnPress() { // fn#86335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:4184, owner: LockedThreadChatBanner.onPress, offset: 0x01f91933, size: 177 bytes, params: 1, frame: 22
let value = environment.__proto__;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const CHANNEL_BANNER_CTA_CLICKED = AnalyticEvents.CHANNEL_BANNER_CTA_CLICKED;
const object2 = {};
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const collectGuildAnalyticsMetadata = value.collectGuildAnalyticsMetadata;
const channelBinding = channel;
const getGuildId = channelBinding.getGuildId;
copyDataProperties(object2, Reflect.apply(collectGuildAnalyticsMetadata, value, [Reflect.apply(getGuildId,
channelBinding, [])]), value);
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object2, appAnalyticsUtilsModule.collectChannelAnalyticsMetadata(channelBinding), value);
object2['banner_type'] = 'thread';
object2['cta_type'] = 'unlock';
Reflect.apply(track, defaultImport, [CHANNEL_BANNER_CTA_CLICKED, object2]);
(importDefault(7153) /* metro dependency 7153: ThreadActionCreators */).unlockThread(channelBinding);
}
function _fun86340() { // fn#86340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:5513, offset: 0x01f91dbb, size: 114 bytes, params: 1, frame: 15
var r1;
let value = environment.__proto__;
const getOldestUnreadTimestamp = ReadStateStore.getOldestUnreadTimestamp;
const channelBinding = channel;
const value3 = Reflect.apply(getOldestUnreadTimestamp, ReadStateStore, [channelBinding.id]);
const object2 = {};
object2.unreadCount = ReadStateStore.getUnreadCount(channelBinding.id);
if (value3 !== 0) {
r1 = value3;
} else {
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.extractTimestamp(channel.id);
r1 = value;
}
object2.oldestUnreadTimestamp = r1;
return object2;
function LockedThreadChatBanner({channel}) { // fn#86333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:3488, offset: 0x01f9178f, size: 420 bytes, params: 2, frame: 27
const styles = useStyles();
ReactModule.useEffect(_fun86334, [channel]);
const value2 = (ThreadHooksModule).useIsThreadModerator(channel);
const Text = (TextModule).Text;
const isForumPost2 = channel.isForumPost();
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return (
<View style={styles.threadBannerContainer}>
<Text
lineClamp={4}
style={styles.threadBannerTitle}
variant="text-sm/medium"
color="text-default"
>
{isForumPost2 ? Reflect.apply(string, intl, [t.E7oO8u]) : Reflect.apply(string, intl, [t['V/JF2N']])}
</Text>
{value2 && <View style={styles.threadBannerButton}>{((Button) => <Button variant="secondary" size="sm" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zA9d1J)} onPress={onPress_86335} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>}
</View>
);
function _fun86334() { // fn#86334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:3556, offset: 0x01f9164c, size: 141 bytes, params: 1, frame: 21
let value = environment.__proto__;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const CHANNEL_BANNER_VIEWED = AnalyticEvents.CHANNEL_BANNER_VIEWED;
const object = {};
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const collectGuildAnalyticsMetadata = value.collectGuildAnalyticsMetadata;
const channelBinding = channel;
const getGuildId = channelBinding.getGuildId;
copyDataProperties(object, Reflect.apply(collectGuildAnalyticsMetadata, value, [Reflect.apply(getGuildId,
channelBinding, [])]), value);
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object, appAnalyticsUtilsModule.collectChannelAnalyticsMetadata(channelBinding), value);
object['banner_type'] = 'thread';
Reflect.apply(track, defaultImport, [CHANNEL_BANNER_VIEWED, object]);
}
function LockedThreadChatBannerOnPress() { // fn#86335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:4184, owner: LockedThreadChatBanner.onPress, offset: 0x01f91933, size: 177 bytes, params: 1, frame: 22
let value = environment.__proto__;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const CHANNEL_BANNER_CTA_CLICKED = AnalyticEvents.CHANNEL_BANNER_CTA_CLICKED;
const object = {};
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const collectGuildAnalyticsMetadata = value.collectGuildAnalyticsMetadata;
const channelBinding = channel;
const getGuildId = channelBinding.getGuildId;
copyDataProperties(object, Reflect.apply(collectGuildAnalyticsMetadata, value, [Reflect.apply(getGuildId,
channelBinding, [])]), value);
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object, appAnalyticsUtilsModule.collectChannelAnalyticsMetadata(channelBinding), value);
object['banner_type'] = 'thread';
object['cta_type'] = 'unlock';
Reflect.apply(track, defaultImport, [CHANNEL_BANNER_CTA_CLICKED, object]);
(ThreadActionCreators).unlockThread(channelBinding);
}
}
function NewMessagesChatBar({channel, unreadCount, oldestUnreadTimestamp, handleScrollToNewMessages}) { // fn#86336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:4413, offset: 0x01f919e4, size: 555 bytes, params: 2, frame: 36
var r23;
var r1;
var r0;
var readStateStoreBinding;
const t = (IndexNativeModule).t;
const PressableOpacity = (PressablesModule).PressableOpacity;
const intl = (IndexNativeModule).intl;
var items2;
const styles = useStyles();
const useStateFromStores = FluxModule.useStateFromStores;
if (Reflect.apply(useStateFromStores, FluxModule, [[GatewayConnectionStore], function() {
return GatewayConnectionStore.isConnected();
}, []])) {
if (unreadCount <= 0) {
r1 = null;
} else {
readStateStoreBinding = ReadStateStore;
r23 = readStateStoreBinding.isEstimated(channel.id) ? t.wvtbbG : t['BctFH/'];
var viewBindingProps = {style: styles.newMessageBar};
items2 = [
<PressableOpacity
accessibilityRole="button"
style={styles.newMessageBarTextContainer}
onPress={handleScrollToNewMessages}
>
{((Text) => <Text variant="text-sm/semibold" color="always-white">{intl.format(r23,
{count: unreadCount,
timestamp: oldestUnreadTimestamp})}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</PressableOpacity>,
];
items2[1] = (
<PressableOpacity
style={styles.newMessageBarCloseButton}
accessibilityRole="button"
accessibilityLabel={intl.string(t.e6RscS)}
onPress={function() {
return require(dependencyMap[23]).ack(channel.id, {section: AnalyticsSections.NEW_MESSAGES_BANNER,
object: AnalyticsObjects.MARK_CHANNEL_AS_READ_BUTTON, objectType: AnalyticsObjectTypes.ACK_MANUAL});
}}
>
{((XSmallBoldIcon) => <XSmallBoldIcon size="sm" color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} />)((require(8222) /* metro dependency 8222: XSmallBoldIcon */).XSmallBoldIcon)}
</PressableOpacity>
);
r1 = (
<View {...viewBindingProps}>
{items2}
</View>
);
}
r0 = r1;
} else {
r0 = null;
}
return r0;
}
function ChatBanner({channel, handleScrollToNewMessages}) { // fn#86339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:5381, offset: 0x01f91c71, size: 330 bytes, params: 2, frame: 22
const value2 = (UseShowChannelOptInNotice)(channel);
const value3 = (UseAllowedChatOverlays)();
const value4 = (FluxModule).useStateFromStoresObject([ReadStateStore], _fun86340,
[channel.id]);
const unreadCount = value4.unreadCount;
return (
channel.isArchivedLockedThread()
? (
<ArchivedLockedThreadChatBanner channel={channel} />
)
: (
channel.isLockedThread()
? (
<LockedThreadChatBanner channel={channel} />
)
: (
unreadCount > 0 && value3.includes(ChatOverlays.NEW_MESSAGES)
? (
<NewMessagesChatBar
unreadCount={unreadCount}
oldestUnreadTimestamp={value4.oldestUnreadTimestamp}
channel={channel}
handleScrollToNewMessages={handleScrollToNewMessages}
/>
)
: (
value2 && value3.includes(ChatOverlays.OPT_IN_CHANNEL)
? (
<OptInChannelBanner channel={channel} />
)
: null
)
)
)
);
function _fun86340() { // fn#86340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:5513, offset: 0x01f91dbb, size: 114 bytes, params: 1, frame: 15
var r1;
let value = environment.__proto__;
const readStateStoreBinding = ReadStateStore;
const getOldestUnreadTimestamp = readStateStoreBinding.getOldestUnreadTimestamp;
const channelBinding = channel;
const value3 = Reflect.apply(getOldestUnreadTimestamp, readStateStoreBinding, [channelBinding.id]);
const object = {};
object.unreadCount = ReadStateStore.getUnreadCount(channelBinding.id);
if (value3 !== 0) {
r1 = value3;
} else {
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.extractTimestamp(channel.id);
r1 = value;
}
object.oldestUnreadTimestamp = r1;
return object;
}
}
}
global.__d(_fun86326, 11317, [31, 27, 4257, 4605, 11318, 661, 33, 4501, 697, 11319, 11320, 566, 21, 1357, 683, 4863,
6609, 4573, 1244, 4578, 6860, 7153, 5278, 5097, 8222,
2]) /* metro module 11317, dependencies: [31, 27, 4257, 4605, 11318, 661, 33, 4501, 697, 11319, 11320, 566, 21, 1357, 683, 4863, 6609, 4573, 1244, 4578, 6860, 7153, 5278, 5097, 8222, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,122 +1,129 @@
/* Metro module 8216; source: modules/messages/native/MessageAccessibilityActions.tsx; dependencies: [4798, 3784, 661, 3829, 8217, 1244, 8220, 8228, 2] */
import PermissionStore from '../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import GuildVerificationStore from '../../../stores/GuildVerificationStore.tsx'; /* Metro dependency 4798 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UserSettingsModule from '../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
import * as DoubleTapExpandExperimentModule from '../../double_tap_to_react/native/DoubleTapExpandExperiment.tsx'; /* Metro dependency 8220 */
import * as CanReplyToMessageModule from '../../replies/canReplyToMessage.tsx'; /* Metro dependency 8228 */
function _fun65778(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8401:6, offset: 0x01bde2c0, size: 258 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildVerificationStore = importDefault(4798) /* metro dependency 4798: GuildVerificationStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).Permissions;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/MessageAccessibilityActions.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/MessageAccessibilityActions.tsx');
exports.MessageAccessibilityAction = {VIEW_PROFILE: 'view_profile', ADD_REACTION: 'add_reaction',
ADD_QUICK_REACTION: 'add_quick_reaction', REPLY: 'reply', MESSAGE_ACTIONS_MENU: 'message_actions_menu',
EDIT_GDM: 'edit_gdm'};
exports.getMessageAccessibilityActionFromLabel = getMessageAccessibilityActionFromLabel;
exports.createMessageAccessibilityActions = createMessageAccessibilityActions;
}
function getQuickReactionLabel() { // fn#65779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8401:352, offset: 0x01bde3c2, size: 307 bytes, params: 1, frame: 19
var r2;
const DoubleTapExpandExperiment = (require(8220) /* metro dependency 8220: DoubleTapExpandExperiment */).DoubleTapExpandExperiment;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const value2 = undefined;
const DoubleTapReactionEmoji = (require(3829) /* metro dependency 3829: UserSettings */).DoubleTapReactionEmoji;
const setting = DoubleTapReactionEmoji.getSetting();
const value4 = null;
if ((value4 == setting ? value2 : setting.disableDoubleTap) === true) {
return value4;
}
if (value4 == setting) {
r2 = DoubleTapExpandExperiment.getConfig({location: 'createMessageAccessibilityActions'}).enabled ? intl.formatToPlainString(t.eQIttH,
{emojiName: 'heart'}) : value4;
} else {
var value5 = (require(8217) /* metro dependency 8217: DoubleTapToReactUtils */).disambiguatedEmojiFromSettingsValue(setting);
if (value4 != value5) {
return intl.formatToPlainString(t.eQIttH, {emojiName: value5.name});
function getQuickReactionLabel() { // fn#65779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8401:352, offset: 0x01bde3c2, size: 307 bytes, params: 1, frame: 19
var r2;
const DoubleTapExpandExperiment = (DoubleTapExpandExperimentModule).DoubleTapExpandExperiment;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const value2 = undefined;
const DoubleTapReactionEmoji = (UserSettingsModule).DoubleTapReactionEmoji;
const setting = DoubleTapReactionEmoji.getSetting();
const value4 = null;
if ((value4 == setting ? value2 : setting.disableDoubleTap) === true) {
return value4;
}
r2 = DoubleTapExpandExperiment.getConfig({location: 'createMessageAccessibilityActions'}).enabled ? intl.formatToPlainString(t.eQIttH,
{emojiName: 'heart'}) : value4;
if (value4 == setting) {
r2 = DoubleTapExpandExperiment.getConfig({location: 'createMessageAccessibilityActions'}).enabled ? intl.formatToPlainString(t.eQIttH,
{emojiName: 'heart'}) : value4;
} else {
var value5 = (require(8217) /* metro dependency 8217: DoubleTapToReactUtils */).disambiguatedEmojiFromSettingsValue(setting);
if (value4 != value5) {
return intl.formatToPlainString(t.eQIttH, {emojiName: value5.name});
}
r2 = DoubleTapExpandExperiment.getConfig({location: 'createMessageAccessibilityActions'}).enabled ? intl.formatToPlainString(t.eQIttH,
{emojiName: 'heart'}) : value4;
}
return r2;
}
return r2;
}
function getMessageAccessibilityActionFromLabel(a0) { // fn#65780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8401:988, offset: 0x01bde4f5, size: 334 bytes, params: 2, frame: 18
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const value2 = Reflect.apply(string, intl, [t.iXAna6]);
const binding = env0_5;
const VIEW_PROFILE = binding.VIEW_PROFILE;
object2[value2] = VIEW_PROFILE;
const value3 = intl.string(t.lfIHs4);
const ADD_REACTION = binding.ADD_REACTION;
object2[value3] = ADD_REACTION;
const value4 = intl.string(t['5IEsGx']);
const REPLY = binding.REPLY;
object2[value4] = REPLY;
string = intl.string;
const ChPNkN = t.ChPNkN;
const value5 = Reflect.apply(string, intl, [ChPNkN]);
const MESSAGE_ACTIONS_MENU = binding.MESSAGE_ACTIONS_MENU;
object2[value5] = MESSAGE_ACTIONS_MENU;
const value6 = intl.string(t['5Q9+/L']);
const EDIT_GDM = binding.EDIT_GDM;
object2[value6] = EDIT_GDM;
const quickReactionLabel = getQuickReactionLabel();
if (quickReactionLabel != null) {
object2[quickReactionLabel] = env0_5.ADD_QUICK_REACTION;
}
return object2[a0];
}
function createMessageAccessibilityActions(a0, a1) { // fn#65781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8401:1437, offset: 0x01bde643, size: 520 bytes, params: 3, frame: 21
var r2;
var push;
var quickReactionLabel;
if (a1 == null) {
return [];
}
let value = a1.getGuildId();
const value2 = value != null;
if (value2) {
value = GuildVerificationStore.canChatInGuild(value);
r2 = value;
} else {
r2 = value2;
}
r2 = r2 && PermissionStore.can(Permissions.ADD_REACTIONS, a1);
r2 = !r2 ? a1.isPrivate() : r2;
let object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2.label = Reflect.apply(string, intl, [t.iXAna6]);
const VIEW_PROFILE = env0_5.VIEW_PROFILE;
object2.name = VIEW_PROFILE;
const items2 = [object2];
if (r2) {
items2.push({label: intl.string(t.lfIHs4), name: env0_5.ADD_REACTION});
quickReactionLabel = getQuickReactionLabel();
function getMessageAccessibilityActionFromLabel(a0) { // fn#65780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8401:988, offset: 0x01bde4f5, size: 334 bytes, params: 2, frame: 18
const object = {};
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
const value2 = Reflect.apply(string, intl, [t.iXAna6]);
const binding = env0_5;
const VIEW_PROFILE = binding.VIEW_PROFILE;
object[value2] = VIEW_PROFILE;
const value3 = intl.string(t.lfIHs4);
const ADD_REACTION = binding.ADD_REACTION;
object[value3] = ADD_REACTION;
const value4 = intl.string(t['5IEsGx']);
const REPLY = binding.REPLY;
object[value4] = REPLY;
string = intl.string;
const ChPNkN = t.ChPNkN;
const value5 = Reflect.apply(string, intl, [ChPNkN]);
const MESSAGE_ACTIONS_MENU = binding.MESSAGE_ACTIONS_MENU;
object[value5] = MESSAGE_ACTIONS_MENU;
const value6 = intl.string(t['5Q9+/L']);
const EDIT_GDM = binding.EDIT_GDM;
object[value6] = EDIT_GDM;
const quickReactionLabel = getQuickReactionLabel();
if (quickReactionLabel != null) {
items2.push({label: quickReactionLabel, name: env0_5.ADD_QUICK_REACTION});
object[quickReactionLabel] = env0_5.ADD_QUICK_REACTION;
}
return object[a0];
}
const canReplyToMessageModule = require(8228) /* metro dependency 8228: canReplyToMessage */;
if (canReplyToMessageModule.canReplyToMessage(a1, a0)) {
function createMessageAccessibilityActions(a0, a1) { // fn#65781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8401:1437, offset: 0x01bde643, size: 520 bytes, params: 3, frame: 21
var r2;
var push;
var quickReactionLabel;
if (a1 == null) {
return [];
}
let value = a1.getGuildId();
const value2 = value != null;
if (value2) {
value = GuildVerificationStore.canChatInGuild(value);
r2 = value;
} else {
r2 = value2;
}
r2 = r2 && PermissionStore.can(Permissions.ADD_REACTIONS, a1);
r2 = !r2 ? a1.isPrivate() : r2;
let object = {};
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
object.label = Reflect.apply(string, intl, [t.iXAna6]);
const VIEW_PROFILE = env0_5.VIEW_PROFILE;
object.name = VIEW_PROFILE;
const items2 = [object];
if (r2) {
items2.push({label: intl.string(t.lfIHs4), name: env0_5.ADD_REACTION});
quickReactionLabel = getQuickReactionLabel();
if (quickReactionLabel != null) {
items2.push({label: quickReactionLabel, name: env0_5.ADD_QUICK_REACTION});
}
}
if (CanReplyToMessageModule.canReplyToMessage(a1, a0)) {
push = items2.push;
object = {};
object.label = intl.string(t['5IEsGx']);
object.name = env0_5.REPLY;
Reflect.apply(push, items2, [object]);
}
push = items2.push;
object2 = {};
object2.label = intl.string(t['5IEsGx']);
object2.name = env0_5.REPLY;
Reflect.apply(push, items2, [object2]);
string = intl.string;
const ChPNkN = t.ChPNkN;
const MESSAGE_ACTIONS_MENU = env0_5.MESSAGE_ACTIONS_MENU;
Reflect.apply(push, items2, [{label: Reflect.apply(string, intl, [ChPNkN]), name: MESSAGE_ACTIONS_MENU}]);
return items2;
}
push = items2.push;
string = intl.string;
const ChPNkN = t.ChPNkN;
const MESSAGE_ACTIONS_MENU = env0_5.MESSAGE_ACTIONS_MENU;
Reflect.apply(push, items2, [{label: Reflect.apply(string, intl, [ChPNkN]), name: MESSAGE_ACTIONS_MENU}]);
return items2;
}
global.__d(_fun65778, 8216, [4798, 3784, 661, 3829, 8217, 1244, 8220, 8228,
2]) /* metro module 8216, dependencies: [4798, 3784, 661, 3829, 8217, 1244, 8220, 8228, 2] */;
@@ -1,80 +1,109 @@
/* Metro module 11434; source: modules/messages/native/MessageGameIconActionSheet.tsx; dependencies: [31, 27, 4234, 661, 33, 4501, 477, 697, 566, 6275, 1305, 4573, 6766, 1244, 1948, 2] */
import ApplicationStore from '../../applications/ApplicationStore.tsx'; /* Metro dependency 4234 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun87512(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11620:6, offset: 0x01fc114c, size: 377 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = 0;
importAll(dependencyMap[value]);
const env0_3 = (require(27) /* metro dependency 27 */).View;
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).HelpdeskArticles;
const value2 = require(33) /* metro dependency 33 */;
const env0_6 = value2.jsx;
const env0_7 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
object2.contentWrapper = {'paddingHorizontal': 24, 'paddingTop': 8,
paddingBottom: platformUtilsModule.isAndroid() ? 16 : value};
object2.gameDescriptionWrapper = {'flexDirection': 'column', 'justifyContent': 'flex-start', 'flex': 1};
const object4 = {'width': 56, 'height': 56, 'marginRight': 8};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.gameIcon = object4;
object2.gameDescriptionWrapperOuter = {flexDirection: 'row'};
object2.timestamp = {marginBottom: 4};
const env0_8 = Reflect.apply(createStyles, createStylesModule, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/MessageGameIconActionSheet.tsx');
const createStyles = CreateStylesModule.createStyles;
object = {};
object.contentWrapper = {'paddingHorizontal': 24, 'paddingTop': 8,
paddingBottom: PlatformUtilsModule.isAndroid() ? 16 : value};
object.gameDescriptionWrapper = {'flexDirection': 'column', 'justifyContent': 'flex-start', 'flex': 1};
const object3 = {'width': 56, 'height': 56, 'marginRight': 8};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.gameIcon = object3;
object.gameDescriptionWrapperOuter = {flexDirection: 'row'};
object.timestamp = {marginBottom: 4};
const env0_8 = Reflect.apply(createStyles, CreateStylesModule, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/MessageGameIconActionSheet.tsx');
exports.default = _default_87513;
}
function _default_87513({applicationId, messageTimestamp}) { // fn#87513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11620:542, offset: 0x01fc12c5, size: 627 bytes, params: 2, frame: 34
var r0;
var BottomSheet;
var Icon;
var object;
var items4;
var items2;
var TextWithIOSLinkWorkaround;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var format;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items3;
var BPDKoA;
var defaultImport;
const styles = useStyles();
const application = (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStore],
function() {
return ApplicationStore.getApplication(applicationId);
});
if (application == null) {
r0 = null;
} else {
BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
var viewBindingProps = {style: styles.contentWrapper};
var viewBindingProps2 = {style: styles.gameDescriptionWrapperOuter};
Icon = (require(1305) /* metro dependency 1305: native */).Icon;
var iconProps = {style: styles.gameIcon, resizeMode: 'contain'};
object = {};
object.uri = application?.getIconURL(56) ?? '';
iconProps.source = object;
iconProps.disableColor = true;
items4 = [<Icon {...iconProps} />];
var viewBinding2Props = {style: styles.gameDescriptionWrapper};
items2 = [((Text) => <Text style={styles.timestamp} variant="text-xs/medium" color="text-muted">{messageTimestamp}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)];
TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
format = intl.format;
items3 = [Reflect.apply(format, intl, [t.J3s8JP, {applicationName: application.name}]), ' '];
format = intl.format;
BPDKoA = t.BPDKoA;
defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
items3[2] = Reflect.apply(format, intl, [BPDKoA,
{helpdeskArticle: defaultImport.getArticleURL(HelpdeskArticles.SOCIAL_LAYER_CONNECTIONS)}]);
items2[1] = <TextWithIOSLinkWorkaround variant="text-sm/medium">{items3}</TextWithIOSLinkWorkaround>;
items4[1] = <View {...viewBinding2Props}>{items2}</View>;
r0 = <BottomSheet startExpanded><View {...viewBindingProps}><View {...viewBindingProps2}>{items4}</View></View></BottomSheet>;
function _default_87513({applicationId, messageTimestamp}) { // fn#87513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11620:542, offset: 0x01fc12c5, size: 627 bytes, params: 2, frame: 34
var r0;
var BottomSheet;
var Icon;
var object2;
var items4;
var items2;
var TextWithIOSLinkWorkaround;
const intl = (IndexNativeModule).intl;
var format;
const t = (IndexNativeModule).t;
var items3;
var BPDKoA;
var defaultImport;
const styles = useStyles();
const application = (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStore],
function() {
return ApplicationStore.getApplication(applicationId);
});
if (application == null) {
r0 = null;
} else {
BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
var viewBindingProps = {style: styles.contentWrapper};
var viewBindingProps2 = {style: styles.gameDescriptionWrapperOuter};
Icon = (require(1305) /* metro dependency 1305: native */).Icon;
var iconProps = {style: styles.gameIcon, resizeMode: 'contain'};
object2 = {};
object2.uri = application?.getIconURL(56) ?? '';
iconProps.source = object2;
iconProps.disableColor = true;
items4 = [
<Icon {...iconProps} />,
];
var viewBinding2Props = {style: styles.gameDescriptionWrapper};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2 = [
<Text
style={styles.timestamp}
variant="text-xs/medium"
color="text-muted"
>
{messageTimestamp}
</Text>,
];
TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
format = intl.format;
items3 = [Reflect.apply(format, intl, [t.J3s8JP, {applicationName: application.name}]), ' '];
format = intl.format;
BPDKoA = t.BPDKoA;
defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
items3[2] = Reflect.apply(format, intl, [BPDKoA,
{helpdeskArticle: defaultImport.getArticleURL(HelpdeskArticles.SOCIAL_LAYER_CONNECTIONS)}]);
items2[1] = (
<TextWithIOSLinkWorkaround variant="text-sm/medium">
{items3}
</TextWithIOSLinkWorkaround>
);
items4[1] = (
<View {...viewBinding2Props}>
{items2}
</View>
);
r0 = (
<BottomSheet startExpanded>
<View {...viewBindingProps}>
<View {...viewBindingProps2}>
{items4}
</View>
</View>
</BottomSheet>
);
}
return r0;
}
return r0;
}
global.__d(_fun87512, 11434, [31, 27, 4234, 661, 33, 4501, 477, 697, 566, 6275, 1305, 4573, 6766, 1244, 1948,
2]) /* metro module 11434, dependencies: [31, 27, 4234, 661, 33, 4501, 477, 697, 566, 6275, 1305, 4573, 6766, 1244, 1948, 2] */;
@@ -1,4 +1,15 @@
/* Metro module 9854; source: modules/messages/native/MessageImpressionAnalyticsHelpers.tsx; dependencies: [31, 4097, 4300, 661, 7082, 4118, 9855, 6858, 4101, 4116, 9856, 9857, 4098, 2] */
import InviteStore from '../../../stores/InviteStore.tsx'; /* Metro dependency 4097 */
import SortedVoiceStateStore from '../../../stores/views/SortedVoiceStateStore.tsx'; /* Metro dependency 4300 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as CodedLinkModule from '../../coded_links/CodedLink.tsx'; /* Metro dependency 4101 */
import * as InviteTypeUtilsModule from '../../instant_invite/InviteTypeUtils.tsx'; /* Metro dependency 4116 */
import * as ConstantsModule2 from '../../instant_invite/Constants.tsx'; /* Metro dependency 4118 */
import * as MessageEmbedConstantsModule from '../../applications/message_embed/MessageEmbedConstants.tsx'; /* Metro dependency 7082 */
import * as MessageViewTrackingManagerModule from '../MessageViewTrackingManager.tsx'; /* Metro dependency 9855 */
function _fun77223(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:6, offset: 0x01df5df5, size: 373 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_77226 = function(a0, a1) {
@@ -46,17 +57,7 @@ function _fun77223(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const inviteStore = importDefault(4097) /* metro dependency 4097: InviteStore */;
const sortedVoiceStateStore = importDefault(4300) /* metro dependency 4300: SortedVoiceStateStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_6 = constantsModule.ChannelTypes;
const env0_7 = constantsModule.GuildFeatures;
const env0_8 = constantsModule.InviteStates;
const env0_9 = constantsModule.MessageFlags;
const env0_10 = (require(7082) /* metro dependency 7082: MessageEmbedConstants */).LinkType;
const env0_11 = (require(4118) /* metro dependency 4118: Constants */).InviteTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/MessageImpressionAnalyticsHelpers.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/MessageImpressionAnalyticsHelpers.tsx');
exports.useShouldTrackAnnouncementMessageViews = useShouldTrackAnnouncementMessageViews;
exports.useShouldTrackRichPresenceInviteEmbedViews = useShouldTrackRichPresenceInviteEmbedViews;
exports.handleAnnouncementMessageViewTracking = handleAnnouncementMessageViewTracking;
@@ -65,471 +66,486 @@ function _fun77223(global, require, importDefault, importAll, module, exports, d
exports.handleOfficialMessageViewTracking = handleOfficialMessageViewTracking;
exports.useShouldTrackVoiceInviteEmbedViews = useShouldTrackVoiceInviteEmbedViews;
exports.handleVoiceInviteEmbedViewTracking = handleVoiceInviteEmbedViewTracking;
}
function _createForOfIteratorHelperLoose_77224(a0, a1) { // fn#77224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:254, offset: 0x01df5f6a, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
function _createForOfIteratorHelperLoose_77224(a0, a1) { // fn#77224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:254, offset: 0x01df5f6a, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
return _fun77225;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_77226(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun77225;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_77226(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_77226(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_77226(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun77225;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function getVoiceInviteEmbedRenderInfo(a0) { // fn#77227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:1164, offset: 0x01df60de, size: 340 bytes, params: 2, frame: 17
var r2;
var r0;
var moduleValue3;
var enabled;
let state = a0.state;
var value;
const RESOLVING = InviteStates.RESOLVING;
if (state === RESOLVING) {
return null;
}
state = a0.state;
const EXPIRED = InviteStates.EXPIRED;
if (state === EXPIRED) {
return null;
}
state = a0.state;
const BANNED = InviteStates.BANNED;
if (state === BANNED) {
return null;
}
state = a0.state;
const ERROR = InviteStates.ERROR;
if (state === ERROR) {
return null;
}
const value2 = undefined;
const inviteType = (require(4116) /* metro dependency 4116: InviteTypeUtils */).getInviteType(a0);
const GUILD = InviteTypes.GUILD;
if (inviteType !== GUILD) {
return null;
}
const guildInviteExtendedType = (require(4116) /* metro dependency 4116: InviteTypeUtils */).getGuildInviteExtendedType(a0);
const GuildInviteExtendedType = (require(4116) /* metro dependency 4116: InviteTypeUtils */).GuildInviteExtendedType;
const VOICE_CHANNEL = GuildInviteExtendedType.VOICE_CHANNEL;
if (guildInviteExtendedType !== VOICE_CHANNEL) {
return null;
}
const guild = a0.guild;
const value5 = null;
const id = value5 == guild ? value2 : guild.id;
if (value5 == id) {
r0 = value5;
} else {
moduleValue3 = require(9856) /* metro dependency 9856: VoiceChannelListInviteExperiment */;
enabled = moduleValue3.getVoiceChannelListInviteExperiment({guildId: id,
location: 'mobile_invite_embed_impression'}).enabled;
if (enabled) {
value = require(9857) /* metro dependency 9857: VoiceChannelListInviteEmbed */;
value = value.canShowVoiceChannelListInviteEmbed(a0);
r2 = value;
} else {
r2 = enabled;
r5 = value;
}
r0 = {treatmentRendered: r2};
}
return r0;
}
function useShouldTrackAnnouncementMessageViews({guild, channel, messages, isMessagesReady}) { // fn#77228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:1836, offset: 0x01df6232, size: 169 bytes, params: 2, frame: 18
const r1 = guild == null || guild.features == null ? undefined : guild.features.has(GuildFeatures.COMMUNITY);
const r6 = r1 != null && r1;
return r6.useMemo(_fun77229, [channel.type, channel.guild_id, r6, isMessagesReady, messages]);
}
function useShouldTrackRichPresenceInviteEmbedViews({messages, isMessagesReady}) { // fn#77231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:2270, offset: 0x01df6372, size: 64 bytes, params: 2, frame: 15
return env0_3.useMemo(_fun77232, [messages, isMessagesReady]);
}
function handleAnnouncementMessageViewTracking(a0, a1, a2, a3) { // fn#77234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:2507, offset: 0x01df6406, size: 122 bytes, params: 5, frame: 16
var defaultImport;
const env0_0 = a2;
const env0_1 = a3;
if (a1) {
if (a2 != null) {
a0.forEach(_fun77235);
defaultImport = importDefault(9855) /* metro dependency 9855: MessageViewTrackingManager */;
defaultImport.handleMessageListVisibilityChange([],
(require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType.ANNOUNCEMENT);
if (r5) {
if (r5) {
}
return _fun77225;
}
}
}
function handleRichPresenceInviteEmbedViewTracking(a0, a1, a2, a3) { // fn#77236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:3287, offset: 0x01df65d2, size: 116 bytes, params: 5, frame: 16
var defaultImport;
const env0_0 = a2;
const env0_1 = a3;
if (a1) {
a0.forEach(_fun77237);
defaultImport = importDefault(9855) /* metro dependency 9855: MessageViewTrackingManager */;
defaultImport.handleMessageListVisibilityChange([],
(require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType.APP_EMBED);
}
}
function useShouldTrackOfficialMessageViews({guild, messages, isMessagesReady}) { // fn#77238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:3771, offset: 0x01df6713, size: 145 bytes, params: 2, frame: 19
let value = undefined;
value = (require(6858) /* metro dependency 6858: GuildOfficialMessageUtils */).useIsGuildOfficialMessagesEnabled((guild == null ? value : guild.id) ?? null,
'useShouldTrackOfficialMessageViews');
return env0_3.useMemo(_fun77239, [value, isMessagesReady, messages]);
}
function handleOfficialMessageViewTracking(a0, a1, a2, a3) { // fn#77241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:4101, offset: 0x01df67ec, size: 122 bytes, params: 5, frame: 16
var defaultImport;
const env0_0 = a2;
const env0_1 = a3;
if (a1) {
if (a2 != null) {
a0.forEach(_fun77242);
defaultImport = importDefault(9855) /* metro dependency 9855: MessageViewTrackingManager */;
defaultImport.handleMessageListVisibilityChange([],
(require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType.OFFICIAL_MESSAGE);
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun77225() { // fn#77225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:825, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
}
function useShouldTrackVoiceInviteEmbedViews({messages, isMessagesReady}) { // fn#77243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:4505, offset: 0x01df68ff, size: 64 bytes, params: 2, frame: 15
return env0_3.useMemo(_fun77244, [messages, isMessagesReady]);
}
function handleVoiceInviteEmbedViewTracking(a0, a1, a2, a3) { // fn#77247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:4730, offset: 0x01df69b5, size: 116 bytes, params: 5, frame: 16
var defaultImport;
const env0_0 = a2;
const env0_1 = a3;
if (a1) {
a0.forEach(_fun77248);
defaultImport = importDefault(9855) /* metro dependency 9855: MessageViewTrackingManager */;
defaultImport.handleMessageListVisibilityChange([],
(require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType.VOICE_INVITE_EMBED);
}
}
function _fun77229() { // fn#77229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:2031, offset: 0x01df62db, size: 75 bytes, params: 1, frame: 13
const type = channel.type;
const GUILD_ANNOUNCEMENT = ChannelTypes.GUILD_ANNOUNCEMENT;
let r0 = type === GUILD_ANNOUNCEMENT && env0_3;
r0 = !r0 ? isMessagesReady && messages.some(_fun77230) : r0;
return r0;
}
function _fun77232() { // fn#77232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:2372, offset: 0x01df63b2, size: 36 bytes, params: 1, frame: 12
return isMessagesReady && messages.some(function(a0) {
return a0.activity != null && a0.activity.party_id != null && a0.application != null;
});
}
function _fun77235({message}) { // fn#77235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:2598, offset: 0x01df6480, size: 338 bytes, params: 2, frame: 19
const MessageViewTrackingType = (require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType;
const r2 = message.messageReference?.guild_id != null && message.webhookId != null && message.hasFlag(MessageFlags.IS_CROSSPOST);
const hasFlag = message.hasFlag;
const EPHEMERAL = MessageFlags.EPHEMERAL;
if (!Reflect.apply(hasFlag, message, [EPHEMERAL])) {
if (importAll.type === ChannelTypes.GUILD_ANNOUNCEMENT) {
env0_2.push({type: MessageViewTrackingType.ANNOUNCEMENT,
messageId: r2 && message.messageReference != null ? message.messageReference.message_id : message.id,
channelId: importAll.id, guildId: importDefault,
sourceChannelId: r2 && message.messageReference != null ? message.messageReference.channel_id : importAll.id,
sourceGuildId: r2 && message.messageReference?.guild_id != null ? message.messageReference.guild_id : importDefault});
} else if (r2) {
env0_2.push({type: MessageViewTrackingType.ANNOUNCEMENT,
messageId: r2 && message.messageReference != null ? message.messageReference.message_id : message.id,
channelId: importAll.id, guildId: importDefault,
sourceChannelId: r2 && message.messageReference != null ? message.messageReference.channel_id : importAll.id,
sourceGuildId: r2 && message.messageReference?.guild_id != null ? message.messageReference.guild_id : importDefault});
function getVoiceInviteEmbedRenderInfo(a0) { // fn#77227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:1164, offset: 0x01df60de, size: 340 bytes, params: 2, frame: 17
var r2;
var r0;
var moduleValue3;
var enabled;
let state = a0.state;
var value;
const RESOLVING = InviteStates.RESOLVING;
if (state === RESOLVING) {
return null;
}
state = a0.state;
const EXPIRED = InviteStates.EXPIRED;
if (state === EXPIRED) {
return null;
}
state = a0.state;
const BANNED = InviteStates.BANNED;
if (state === BANNED) {
return null;
}
state = a0.state;
const ERROR = InviteStates.ERROR;
if (state === ERROR) {
return null;
}
const value2 = undefined;
const inviteType = (InviteTypeUtilsModule).getInviteType(a0);
const GUILD = InviteTypes.GUILD;
if (inviteType !== GUILD) {
return null;
}
const guildInviteExtendedType = (InviteTypeUtilsModule).getGuildInviteExtendedType(a0);
const GuildInviteExtendedType = (InviteTypeUtilsModule).GuildInviteExtendedType;
const VOICE_CHANNEL = GuildInviteExtendedType.VOICE_CHANNEL;
if (guildInviteExtendedType !== VOICE_CHANNEL) {
return null;
}
const guild = a0.guild;
const value5 = null;
const id = value5 == guild ? value2 : guild.id;
if (value5 == id) {
r0 = value5;
} else {
moduleValue3 = require(9856) /* metro dependency 9856: VoiceChannelListInviteExperiment */;
enabled = moduleValue3.getVoiceChannelListInviteExperiment({guildId: id,
location: 'mobile_invite_embed_impression'}).enabled;
if (enabled) {
value = require(9857) /* metro dependency 9857: VoiceChannelListInviteEmbed */;
value = value.canShowVoiceChannelListInviteEmbed(a0);
r2 = value;
} else {
r2 = enabled;
}
r0 = {treatmentRendered: r2};
}
return r0;
}
}
function _fun77237({message}) { // fn#77237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:3373, offset: 0x01df6646, size: 205 bytes, params: 2, frame: 17
var binding;
var push;
var object2;
var id;
const hasFlag = message.hasFlag;
const EPHEMERAL = MessageFlags.EPHEMERAL;
let r0 = Reflect.apply(hasFlag, message, [EPHEMERAL]) || message.activity == null;
r0 = !r0 ? message.activity.party_id == null : r0;
r0 = !r0 ? message.application == null : r0;
if (!r0) {
binding = env0_2;
push = binding.push;
object2 = {};
object2.type = (require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType.APP_EMBED;
id = message.id;
object2.messageId = id;
id = importAll.id;
object2.channelId = id;
object2.guildId = importDefault;
id = message.application.id;
object2.applicationId = id;
object2.linkType = LinkType.RICH_PRESENCE_INVITE;
Reflect.apply(push, binding, [object2]);
}
}
function _fun77239() { // fn#77239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:3999, offset: 0x01df67a4, size: 43 bytes, params: 1, frame: 12
return env0_2 && isMessagesReady && messages.some(function(a0) {
return a0.hasFlag(MessageFlags.IS_GUILD_OFFICIAL);
});
}
function _fun77242({message}) { // fn#77242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:4188, offset: 0x01df6866, size: 153 bytes, params: 2, frame: 16
var binding;
var push;
var object2;
var id;
const hasFlag = message.hasFlag;
const EPHEMERAL = MessageFlags.EPHEMERAL;
if (!Reflect.apply(hasFlag, message, [EPHEMERAL]) && message.hasFlag(MessageFlags.IS_GUILD_OFFICIAL)) {
binding = env0_2;
push = binding.push;
object2 = {};
object2.type = (require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType.OFFICIAL_MESSAGE;
id = message.id;
object2.messageId = id;
id = importAll.id;
object2.channelId = id;
object2.guildId = importDefault;
Reflect.apply(push, binding, [object2]);
}
}
function _fun77244() { // fn#77244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:4600, offset: 0x01df693f, size: 36 bytes, params: 1, frame: 12
return isMessagesReady && messages.some(function({codedLinks}) {
return codedLinks.some(_fun77246);
});
}
function _fun77248({message}) { // fn#77248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:4809, offset: 0x01df6a29, size: 637 bytes, params: 2, frame: 55
var r11;
var id;
var r32;
var r31;
var r0;
var r43;
var _createForOfIteratorHelperLoose_77224Binding;
var codedLinks;
var value2;
var value3;
var value4;
var done;
var value6;
var value7;
var type;
var CodedLinkType;
var INVITE;
var getInvite;
var code;
var value8;
var voiceInviteEmbedRenderInfo;
var channel;
var guild;
var value10;
var value11;
var voiceStatesForChannelAlt;
var value13;
var binding;
var push;
var object2;
var MessageViewTrackingType;
var VOICE_INVITE_EMBED;
var moduleValue;
var getInviteInstanceId;
var value14;
var treatmentRendered;
var value15;
const hasFlag = message.hasFlag;
const EPHEMERAL = MessageFlags.EPHEMERAL;
if (!Reflect.apply(hasFlag, message, [EPHEMERAL])) {
_createForOfIteratorHelperLoose_77224Binding = _createForOfIteratorHelperLoose_77224;
codedLinks = message.codedLinks;
value2 = undefined;
value3 = _createForOfIteratorHelperLoose_77224Binding(codedLinks);
value4 = value3();
done = value4.done;
value6 = null;
if (!done) {
r11 = value4;
while (true) {
value7 = r11.value;
type = value7.type;
CodedLinkType = (require(4101) /* metro dependency 4101: CodedLink */).CodedLinkType;
INVITE = CodedLinkType.INVITE;
if (type === INVITE) {
getInvite = InviteStore.getInvite;
code = value7.code;
value8 = Reflect.apply(getInvite, InviteStore, [code]);
if (value6 == value8) {
break;
}
voiceInviteEmbedRenderInfo = getVoiceInviteEmbedRenderInfo(value8);
if (value6 == voiceInviteEmbedRenderInfo) {
break;
}
channel = value8.channel;
if (value6 == channel) {
id = value2;
continue;
}
id = channel.id;
if (value6 != id) {
r32 = id;
continue;
}
r32 = value6;
continue;
guild = value8.guild;
if (value6 == guild) {
id = value2;
continue;
}
id = guild.id;
if (value6 != id) {
r31 = id;
continue;
}
r31 = value6;
continue;
value10 = value6 != r32;
if (!value10) {
r0 = value10;
continue;
}
value11 = value6 != r31;
r0 = value11;
if (!r0) {
continue;
}
voiceStatesForChannelAlt = SortedVoiceStateStore.getVoiceStatesForChannelAlt(r32, r31);
value13 = voiceStatesForChannelAlt.some(function(a0) {
return a0.voiceState.selfStream;
});
r0 = value13;
binding = env0_2;
push = binding.push;
object2 = {};
MessageViewTrackingType = (require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType;
VOICE_INVITE_EMBED = MessageViewTrackingType.VOICE_INVITE_EMBED;
object2.type = VOICE_INVITE_EMBED;
id = message.id;
object2.messageId = id;
id = importAll.id;
object2.channelId = id;
object2.guildId = importDefault;
code = value7.code;
object2.inviteCode = code;
object2.inviteGuildId = r31;
object2.inviteChannelId = r32;
moduleValue = require(4098) /* metro dependency 4098: InviteCodeUtils */;
getInviteInstanceId = moduleValue.getInviteInstanceId;
code = value7.code;
id = message.id;
value14 = Reflect.apply(getInviteInstanceId, moduleValue, [code, id]);
if (value6 != value14) {
r43 = value14;
continue;
}
r43 = value6;
continue;
object2.inviteInstanceId = r43;
treatmentRendered = voiceInviteEmbedRenderInfo.treatmentRendered;
object2.treatmentRendered = treatmentRendered;
object2.hasActiveStream = r0;
Reflect.apply(push, binding, [object2]);
break;
function useShouldTrackAnnouncementMessageViews({guild, channel, messages, isMessagesReady}) { // fn#77228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:1836, offset: 0x01df6232, size: 169 bytes, params: 2, frame: 18
const r1 = guild == null || guild.features == null ? undefined : guild.features.has(GuildFeatures.COMMUNITY);
const r6 = r1 != null && r1;
return r6.useMemo(_fun77229, [channel.type, channel.guild_id, r6, isMessagesReady, messages]);
function _fun77229() { // fn#77229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:2031, offset: 0x01df62db, size: 75 bytes, params: 1, frame: 13
const type = channel.type;
const GUILD_ANNOUNCEMENT = ChannelTypes.GUILD_ANNOUNCEMENT;
let r0 = type === GUILD_ANNOUNCEMENT && ReactModule;
r0 = !r0 ? isMessagesReady && messages.some(_fun77230) : r0;
return r0;
function _fun77230(a0) { // fn#77230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:2088, offset: 0x01df6326, size: 76 bytes, params: 2, frame: 13
var hasFlag;
let value = a0.messageReference != null;
let r0 = value && a0.webhookId != null;
if (r0) {
hasFlag = a0.hasFlag;
value = environment.__proto__.__proto__;
value = Reflect.apply(hasFlag, a0, [MessageFlags.IS_CROSSPOST]);
r0 = value;
}
value15 = value3();
done = value15.done;
if (done) {
break;
if (r0) {
value = environment.__proto__;
value = channel.guild_id != null;
r0 = value;
}
r11 = value15;
continue;
return r0;
}
}
}
function useShouldTrackRichPresenceInviteEmbedViews({messages, isMessagesReady}) { // fn#77231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:2270, offset: 0x01df6372, size: 64 bytes, params: 2, frame: 15
return ReactModule.useMemo(_fun77232, [messages, isMessagesReady]);
function _fun77232() { // fn#77232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:2372, offset: 0x01df63b2, size: 36 bytes, params: 1, frame: 12
return isMessagesReady && messages.some(function(a0) {
return a0.activity != null && a0.activity.party_id != null && a0.application != null;
});
}
}
function handleAnnouncementMessageViewTracking(a0, a1, a2, a3) { // fn#77234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:2507, offset: 0x01df6406, size: 122 bytes, params: 5, frame: 16
var defaultImport;
const env0_0 = a2;
const env0_1 = a3;
if (a1) {
if (a2 != null) {
a0.forEach(_fun77235);
defaultImport = importDefault(9855) /* metro dependency 9855: MessageViewTrackingManager */;
defaultImport.handleMessageListVisibilityChange([],
(require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType.ANNOUNCEMENT);
}
}
function _fun77235({message}) { // fn#77235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:2598, offset: 0x01df6480, size: 338 bytes, params: 2, frame: 19
const MessageViewTrackingType = (MessageViewTrackingManagerModule).MessageViewTrackingType;
const r2 = message.messageReference?.guild_id != null && message.webhookId != null && message.hasFlag(MessageFlags.IS_CROSSPOST);
const hasFlag = message.hasFlag;
const EPHEMERAL = MessageFlags.EPHEMERAL;
if (!Reflect.apply(hasFlag, message, [EPHEMERAL])) {
if (importAll.type === ChannelTypes.GUILD_ANNOUNCEMENT) {
env0_2.push({type: MessageViewTrackingType.ANNOUNCEMENT,
messageId: r2 && message.messageReference != null ? message.messageReference.message_id : message.id,
channelId: importAll.id, guildId: importDefault,
sourceChannelId: r2 && message.messageReference != null ? message.messageReference.channel_id : importAll.id,
sourceGuildId: r2 && message.messageReference?.guild_id != null ? message.messageReference.guild_id : importDefault});
} else if (r2) {
env0_2.push({type: MessageViewTrackingType.ANNOUNCEMENT,
messageId: r2 && message.messageReference != null ? message.messageReference.message_id : message.id,
channelId: importAll.id, guildId: importDefault,
sourceChannelId: r2 && message.messageReference != null ? message.messageReference.channel_id : importAll.id,
sourceGuildId: r2 && message.messageReference?.guild_id != null ? message.messageReference.guild_id : importDefault});
}
}
}
}
function handleRichPresenceInviteEmbedViewTracking(a0, a1, a2, a3) { // fn#77236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:3287, offset: 0x01df65d2, size: 116 bytes, params: 5, frame: 16
var defaultImport;
const env0_0 = a2;
const env0_1 = a3;
if (a1) {
a0.forEach(_fun77237);
defaultImport = importDefault(9855) /* metro dependency 9855: MessageViewTrackingManager */;
defaultImport.handleMessageListVisibilityChange([],
(require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType.APP_EMBED);
}
function _fun77237({message}) { // fn#77237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:3373, offset: 0x01df6646, size: 205 bytes, params: 2, frame: 17
var binding;
var push;
var object;
var id;
const hasFlag = message.hasFlag;
const EPHEMERAL = MessageFlags.EPHEMERAL;
let r0 = Reflect.apply(hasFlag, message, [EPHEMERAL]) || message.activity == null;
r0 = !r0 ? message.activity.party_id == null : r0;
r0 = !r0 ? message.application == null : r0;
if (!r0) {
binding = env0_2;
push = binding.push;
object = {};
object.type = (require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType.APP_EMBED;
id = message.id;
object.messageId = id;
id = importAll.id;
object.channelId = id;
object.guildId = importDefault;
id = message.application.id;
object.applicationId = id;
object.linkType = LinkType.RICH_PRESENCE_INVITE;
Reflect.apply(push, binding, [object]);
}
}
}
function useShouldTrackOfficialMessageViews({guild, messages, isMessagesReady}) { // fn#77238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:3771, offset: 0x01df6713, size: 145 bytes, params: 2, frame: 19
let value = undefined;
value = (require(6858) /* metro dependency 6858: GuildOfficialMessageUtils */).useIsGuildOfficialMessagesEnabled((guild == null ? value : guild.id) ?? null,
'useShouldTrackOfficialMessageViews');
return ReactModule.useMemo(_fun77239, [value, isMessagesReady, messages]);
function _fun77239() { // fn#77239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:3999, offset: 0x01df67a4, size: 43 bytes, params: 1, frame: 12
return env0_2 && isMessagesReady && messages.some(function(a0) {
return a0.hasFlag(MessageFlags.IS_GUILD_OFFICIAL);
});
}
}
function handleOfficialMessageViewTracking(a0, a1, a2, a3) { // fn#77241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:4101, offset: 0x01df67ec, size: 122 bytes, params: 5, frame: 16
var defaultImport;
const env0_0 = a2;
const env0_1 = a3;
if (a1) {
if (a2 != null) {
a0.forEach(_fun77242);
defaultImport = importDefault(9855) /* metro dependency 9855: MessageViewTrackingManager */;
defaultImport.handleMessageListVisibilityChange([],
(require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType.OFFICIAL_MESSAGE);
}
}
function _fun77242({message}) { // fn#77242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:4188, offset: 0x01df6866, size: 153 bytes, params: 2, frame: 16
var binding;
var push;
var object;
var id;
const hasFlag = message.hasFlag;
const EPHEMERAL = MessageFlags.EPHEMERAL;
if (!Reflect.apply(hasFlag, message, [EPHEMERAL]) && message.hasFlag(MessageFlags.IS_GUILD_OFFICIAL)) {
binding = env0_2;
push = binding.push;
object = {};
object.type = (require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType.OFFICIAL_MESSAGE;
id = message.id;
object.messageId = id;
id = importAll.id;
object.channelId = id;
object.guildId = importDefault;
Reflect.apply(push, binding, [object]);
}
}
}
function useShouldTrackVoiceInviteEmbedViews({messages, isMessagesReady}) { // fn#77243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:4505, offset: 0x01df68ff, size: 64 bytes, params: 2, frame: 15
return ReactModule.useMemo(_fun77244, [messages, isMessagesReady]);
function _fun77244() { // fn#77244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:4600, offset: 0x01df693f, size: 36 bytes, params: 1, frame: 12
return isMessagesReady && messages.some(function({codedLinks}) {
return codedLinks.some(_fun77246);
});
function _fun77245({codedLinks}) { // fn#77245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:4615, offset: 0x01df6963, size: 31 bytes, params: 2, frame: 11
return codedLinks.some(function({type}) {
return type === require(dependencyMap[8]).CodedLinkType.INVITE;
});
function _fun77246({type}) { // fn#77246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:4637, offset: 0x01df6982, size: 51 bytes, params: 2, frame: 12
const CodedLinkType = (CodedLinkModule).CodedLinkType;
const INVITE = CodedLinkType.INVITE;
return type === INVITE;
}
}
}
}
function handleVoiceInviteEmbedViewTracking(a0, a1, a2, a3) { // fn#77247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:4730, offset: 0x01df69b5, size: 116 bytes, params: 5, frame: 16
var defaultImport;
const env0_0 = a2;
const env0_1 = a3;
if (a1) {
a0.forEach(_fun77248);
defaultImport = importDefault(9855) /* metro dependency 9855: MessageViewTrackingManager */;
defaultImport.handleMessageListVisibilityChange([],
(require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType.VOICE_INVITE_EMBED);
}
function _fun77248({message}) { // fn#77248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:4809, offset: 0x01df6a29, size: 637 bytes, params: 2, frame: 55
var r11;
var id;
var r32;
var r31;
var r0;
var r43;
var _createForOfIteratorHelperLoose_77224Binding;
var codedLinks;
var value2;
var value3;
var value4;
var done;
var value6;
var value7;
var type;
var CodedLinkType;
var INVITE;
var inviteStoreBinding;
var getInvite;
var code;
var value8;
var voiceInviteEmbedRenderInfo;
var channel;
var guild;
var value10;
var value11;
var voiceStatesForChannelAlt;
var value13;
var binding;
var push;
var object;
var MessageViewTrackingType;
var VOICE_INVITE_EMBED;
var moduleValue;
var getInviteInstanceId;
var value14;
var treatmentRendered;
var value15;
const hasFlag = message.hasFlag;
const EPHEMERAL = MessageFlags.EPHEMERAL;
if (!Reflect.apply(hasFlag, message, [EPHEMERAL])) {
_createForOfIteratorHelperLoose_77224Binding = _createForOfIteratorHelperLoose_77224;
codedLinks = message.codedLinks;
value2 = undefined;
value3 = _createForOfIteratorHelperLoose_77224Binding(codedLinks);
value4 = value3();
done = value4.done;
value6 = null;
if (!done) {
r11 = value4;
while (true) {
value7 = r11.value;
type = value7.type;
CodedLinkType = (require(4101) /* metro dependency 4101: CodedLink */).CodedLinkType;
INVITE = CodedLinkType.INVITE;
if (type === INVITE) {
inviteStoreBinding = InviteStore;
getInvite = inviteStoreBinding.getInvite;
code = value7.code;
value8 = Reflect.apply(getInvite, inviteStoreBinding, [code]);
if (value6 == value8) {
break;
}
voiceInviteEmbedRenderInfo = getVoiceInviteEmbedRenderInfo(value8);
if (value6 == voiceInviteEmbedRenderInfo) {
break;
}
channel = value8.channel;
if (value6 == channel) {
id = value2;
continue;
}
id = channel.id;
if (value6 != id) {
r32 = id;
continue;
}
r32 = value6;
continue;
guild = value8.guild;
if (value6 == guild) {
id = value2;
continue;
}
id = guild.id;
if (value6 != id) {
r31 = id;
continue;
}
r31 = value6;
continue;
value10 = value6 != r32;
if (!value10) {
r0 = value10;
continue;
}
value11 = value6 != r31;
r0 = value11;
if (!r0) {
continue;
}
voiceStatesForChannelAlt = SortedVoiceStateStore.getVoiceStatesForChannelAlt(r32, r31);
value13 = voiceStatesForChannelAlt.some(function(a0) {
return a0.voiceState.selfStream;
});
r0 = value13;
binding = env0_2;
push = binding.push;
object = {};
MessageViewTrackingType = (require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType;
VOICE_INVITE_EMBED = MessageViewTrackingType.VOICE_INVITE_EMBED;
object.type = VOICE_INVITE_EMBED;
id = message.id;
object.messageId = id;
id = importAll.id;
object.channelId = id;
object.guildId = importDefault;
code = value7.code;
object.inviteCode = code;
object.inviteGuildId = r31;
object.inviteChannelId = r32;
moduleValue = require(4098) /* metro dependency 4098: InviteCodeUtils */;
getInviteInstanceId = moduleValue.getInviteInstanceId;
code = value7.code;
id = message.id;
value14 = Reflect.apply(getInviteInstanceId, moduleValue, [code, id]);
if (value6 != value14) {
r43 = value14;
continue;
}
r43 = value6;
continue;
object.inviteInstanceId = r43;
treatmentRendered = voiceInviteEmbedRenderInfo.treatmentRendered;
object.treatmentRendered = treatmentRendered;
object.hasActiveStream = r0;
Reflect.apply(push, binding, [object]);
break;
}
value15 = value3();
done = value15.done;
if (done) {
break;
}
r11 = value15;
continue;
}
}
}
}
}
}
function _fun77230(a0) { // fn#77230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:2088, offset: 0x01df6326, size: 76 bytes, params: 2, frame: 13
var hasFlag;
let value = a0.messageReference != null;
let r0 = value && a0.webhookId != null;
if (r0) {
hasFlag = a0.hasFlag;
value = environment.__proto__.__proto__;
value = Reflect.apply(hasFlag, a0, [MessageFlags.IS_CROSSPOST]);
r0 = value;
}
if (r0) {
value = environment.__proto__;
value = channel.guild_id != null;
r0 = value;
}
return r0;
}
function _fun77245({codedLinks}) { // fn#77245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:4615, offset: 0x01df6963, size: 31 bytes, params: 2, frame: 11
return codedLinks.some(function({type}) {
return type === require(dependencyMap[8]).CodedLinkType.INVITE;
});
}
global.__d(_fun77223, 9854, [31, 4097, 4300, 661, 7082, 4118, 9855, 6858, 4101, 4116, 9856, 9857, 4098,
2]) /* metro module 9854, dependencies: [31, 4097, 4300, 661, 7082, 4118, 9855, 6858, 4101, 4116, 9856, 9857, 4098, 2] */;
@@ -1,152 +1,164 @@
/* Metro module 16154; source: modules/messages/native/MessageSendFailureNotificationManager.tsx; dependencies: [7, 6, 15, 17, 18, 1934, 3969, 1878, 7030, 661, 12560, 10920, 10921, 10741, 1244, 4860, 2] */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import SelectedChannelStore from '../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import SelectedGuildStore from '../../../stores/SelectedGuildStore.tsx'; /* Metro dependency 3969 */
import AppStateStore from '../../../stores/native/AppStateStore.tsx'; /* Metro dependency 7030 */
import InAppNotificationActionCreators from '../../../actions/native/InAppNotificationActionCreators.tsx'; /* Metro dependency 10920 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ConstantsModule2 from '../../local_push_notification/native/Constants.tsx'; /* Metro dependency 12560 */
function _fun124876(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#124876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16362:6, offset: 0x025c6084, size: 370 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const appStateStore = importDefault(7030) /* metro dependency 7030: AppStateStore */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_12 = value.InAppNotificationTypes;
const env0_13 = value.MessageStates;
const env0_14 = (require(12560) /* metro dependency 12560: Constants */).LocalNotificationTypes;
value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
value = _fun124884(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/MessageSendFailureNotificationManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/MessageSendFailureNotificationManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_124877() { // fn#124877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16362:277, offset: 0x025c61f6, 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_124877_isNativeReflectConstruct = function() {
return !!result;
})();
}
function handleMessageSendFailure(a0) { // fn#124880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16362:470, offset: 0x025c6258, size: 407 bytes, params: 2, frame: 21
var defaultImport;
var enqueueNotification;
var object2;
var defaultImport2;
var presentLocalNotification;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const channelId = a0.channelId;
const messageId = a0.messageId;
if (a0.shouldNotify) {
if (AppStateStore.getState() !== 'active') {
defaultImport2 = importDefault(10741) /* metro dependency 10741: PushNotification */;
presentLocalNotification = defaultImport2.presentLocalNotification;
object2 = {category: 'local'};
object2.alertTitle = intl.string(t.LdlH2M);
object2.alertBody = intl.string(t.xxRPOT);
object2.userInfo = {channelId: channelId, messageId: messageId,
type: LocalNotificationTypes.MESSAGE_SEND_FAILED};
Reflect.apply(presentLocalNotification, defaultImport2, [object2]);
return undefined;
function _isNativeReflectConstruct_124877() { // fn#124877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16362:277, offset: 0x025c61f6, 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) {
}
if (channelId === SelectedChannelStore.getChannelId(SelectedGuildStore.getGuildId())) {
return undefined;
return (_isNativeReflectConstruct_124877_isNativeReflectConstruct = function() {
return !!result;
})();
}
function handleMessageSendFailure(a0) { // fn#124880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16362:470, offset: 0x025c6258, size: 407 bytes, params: 2, frame: 21
var guildId;
var selectedChannelStoreBinding;
var defaultImport;
var enqueueNotification;
var object;
var defaultImport2;
var presentLocalNotification;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const channelId = a0.channelId;
const messageId = a0.messageId;
if (a0.shouldNotify) {
if (AppStateStore.getState() !== 'active') {
defaultImport2 = importDefault(10741) /* metro dependency 10741: PushNotification */;
presentLocalNotification = defaultImport2.presentLocalNotification;
object = {category: 'local'};
object.alertTitle = intl.string(t.LdlH2M);
object.alertBody = intl.string(t.xxRPOT);
object.userInfo = {channelId: channelId, messageId: messageId,
type: LocalNotificationTypes.MESSAGE_SEND_FAILED};
Reflect.apply(presentLocalNotification, defaultImport2, [object]);
return undefined;
}
guildId = SelectedGuildStore.getGuildId();
selectedChannelStoreBinding = SelectedChannelStore;
if (channelId === selectedChannelStoreBinding.getChannelId(guildId)) {
return undefined;
}
defaultImport = importDefault(10920) /* metro dependency 10920: InAppNotificationActionCreators */;
enqueueNotification = defaultImport.enqueueNotification;
object = {};
object.type = InAppNotificationTypes.MESSAGE_FAILED_TO_SEND;
object.channelId = channelId;
object.messageId = messageId;
object.key = channelId + '-' + messageId;
object.duration = 5000;
object.onDismiss = onDismiss_124881;
object.inAppNotificationId = (require(10921) /* metro dependency 10921: InAppNotificationUtils */).generateInAppNotificationId();
Reflect.apply(enqueueNotification, defaultImport, [object]);
}
defaultImport = importDefault(10920) /* metro dependency 10920: InAppNotificationActionCreators */;
enqueueNotification = defaultImport.enqueueNotification;
object2 = {};
object2.type = InAppNotificationTypes.MESSAGE_FAILED_TO_SEND;
object2.channelId = channelId;
object2.messageId = messageId;
object2.key = channelId + '-' + messageId;
object2.duration = 5000;
object2.onDismiss = onDismiss_124881;
object2.inAppNotificationId = (require(10921) /* metro dependency 10921: InAppNotificationUtils */).generateInAppNotificationId();
Reflect.apply(enqueueNotification, defaultImport, [object2]);
function handleMessageSendFailureOnDismiss() { // fn#124881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16362:972, owner: handleMessageSendFailure.onDismiss, offset: 0x025c63ef, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(InAppNotificationActionCreators).clearNotification();
}
}
}
function handleMessageCreate_124882({message, sendMessageOptions}) { // fn#124882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16362:1069, offset: 0x025c6414, size: 153 bytes, params: 2, frame: 17
var id;
var value2;
var author;
let value = sendMessageOptions != null;
let r1 = value && sendMessageOptions.isHydratingExpiredPendingMessage && message.state === MessageStates.SEND_FAILED;
if (r1) {
value = UserStore.getCurrentUser();
value2 = undefined;
id = value == null ? value2 : value.id;
author = message.author;
value = id === (author == null ? value2 : author.id);
r1 = value;
function handleMessageCreate_124882({message, sendMessageOptions}) { // fn#124882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16362:1069, offset: 0x025c6414, size: 153 bytes, params: 2, frame: 17
var id;
var value2;
var author;
let value = sendMessageOptions != null;
let r1 = value && sendMessageOptions.isHydratingExpiredPendingMessage && message.state === MessageStates.SEND_FAILED;
if (r1) {
value = UserStore.getCurrentUser();
value2 = undefined;
id = value == null ? value2 : value.id;
author = message.author;
value = id === (author == null ? value2 : author.id);
r1 = value;
}
if (r1) {
global.setTimeout(function() {
var handleMessageSendFailureBinding = handleMessageSendFailure;
var messageBinding = message;
handleMessageSendFailureBinding({channelId: messageBinding.channel_id, messageId: messageBinding.id,
shouldNotify: true});
}, 3000);
}
}
if (r1) {
global.setTimeout(function() {
var handleMessageSendFailureBinding = handleMessageSendFailure;
var messageBinding = message;
handleMessageSendFailureBinding({channelId: messageBinding.channel_id, messageId: messageBinding.id,
shouldNotify: true});
}, 3000);
function _fun124884(a0) { // fn#124884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16362:1405, offset: 0x025c64df, size: 42 bytes, params: 2, frame: 14
const MessageSendFailureNotificationManager2 = MessageSendFailureNotificationManager;
Inherits(MessageSendFailureNotificationManager2, a0);
return CreateClass(MessageSendFailureNotificationManager2);
function MessageSendFailureNotificationManager(a0) { // fn#124885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16362:1417, offset: 0x025c6509, size: 152 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, MessageSendFailureNotificationManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(MessageSendFailureNotificationManager);
binding = env1_5;
if (_isNativeReflectConstruct_124877()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.actions = {MESSAGE_CREATE: handleMessageCreate_124882, MESSAGE_SEND_FAILED: handleMessageSendFailure};
return value;
}
}
}
function _fun124884(a0) { // fn#124884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16362:1405, offset: 0x025c64df, size: 42 bytes, params: 2, frame: 14
const closure = MessageSendFailureNotificationManager;
env0_7(closure, a0);
return env0_3(closure);
}
function handleMessageSendFailureOnDismiss() { // fn#124881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16362:972, owner: handleMessageSendFailure.onDismiss, offset: 0x025c63ef, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(importDefault(10920) /* metro dependency 10920: InAppNotificationActionCreators */).clearNotification();
}
function MessageSendFailureNotificationManager(a0) { // fn#124885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16362:1417, offset: 0x025c6509, size: 152 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, MessageSendFailureNotificationManager);
const items = [];
arraySpread(items, value, 0, items);
value = env1_6(MessageSendFailureNotificationManager);
binding = env1_5;
if (_isNativeReflectConstruct_124877()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
value.actions = {MESSAGE_CREATE: handleMessageCreate_124882, MESSAGE_SEND_FAILED: handleMessageSendFailure};
return value;
}
global.__d(_fun124876, 16154, [7, 6, 15, 17, 18, 1934, 3969, 1878, 7030, 661, 12560, 10920, 10921, 10741, 1244,
4860,
2]) /* metro module 16154, dependencies: [7, 6, 15, 17, 18, 1934, 3969, 1878, 7030, 661, 12560, 10920, 10921, 10741, 1244, 4860, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+358 -323
View File
@@ -1,4 +1,16 @@
/* Metro module 11330; source: modules/messages/native/MessagesHooks.tsx; dependencies: [57, 31, 27, 9858, 7729, 4646, 1867, 4396, 566, 22, 628, 6772, 1360, 4116, 11331, 9835, 11332, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import PresenceStore from '../../../stores/PresenceStore.tsx'; /* Metro dependency 4396 */
import GuildAvailabilityStore from '../../../stores/GuildAvailabilityStore.tsx'; /* Metro dependency 4646 */
import VoiceChannelStartTimeStore from '../../channel/VoiceChannelStartTimeStore.tsx'; /* Metro dependency 9858 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ShallowEqualModule from '../../../external/discord_common/js/packages/shallow-equal/shallowEqual.tsx'; /* Metro dependency 628 */
import * as UseChatBottomManagerUIStoreModule from '../../chat_input/native/useChatBottomManagerUIStore.tsx'; /* Metro dependency 7729 */
function _fun86505(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:6, offset: 0x01f966dc, size: 355 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_86508 = function(a0, a1) {
@@ -46,357 +58,380 @@ function _fun86505(global, require, importDefault, importAll, module, exports, d
};
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 */).findNodeHandle;
const voiceChannelStartTimeStore = importDefault(9858) /* metro dependency 9858: VoiceChannelStartTimeStore */;
const env0_7 = (require(7729) /* metro dependency 7729: useChatBottomManagerUIStore */).updateShouldShowJumpToPresentButton;
const guildAvailabilityStore = importDefault(4646) /* metro dependency 4646: GuildAvailabilityStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/MessagesHooks.tsx');
exports.useMessageAuthorActivities = useMessageAuthorActivities;
exports.useFetchMessageApplications = useFetchMessageApplications;
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/MessagesHooks.tsx');
exports.useMessageAuthorActivities = useMessageAuthorActivities_86509;
exports.useFetchMessageApplications = useFetchMessageApplications_86514;
exports.useFetchVoiceChannelInviteStartTimes = useFetchVoiceChannelInviteStartTimes;
exports.useMessagesLifecycle = useMessagesLifecycle;
exports.useScrollState = useScrollState_86525;
exports.useChatUpdatesQueue = useChatUpdatesQueue;
exports.useMessagesState = useMessagesState;
}
function _createForOfIteratorHelperLoose_86506(a0, a1) { // fn#86506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:234, offset: 0x01f9683f, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
function _createForOfIteratorHelperLoose_86506(a0, a1) { // fn#86506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:234, offset: 0x01f9683f, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
return _fun86507;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_86508(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun86507;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_86508(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_86508(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_86508(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun86507;
}
return _fun86507;
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun86507() { // fn#86507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:805, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function useMessageAuthorActivities(a0) { // fn#86509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:1251, offset: 0x01f969b3, size: 110 bytes, params: 2, frame: 16
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([PresenceStore], _fun86512,
[env0_4.useMemo(function() {
var object = {};
object.forEach(_fun86511);
return object;
}, [a0])]);
}
function useFetchMessageApplications(a0) { // fn#86514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:1553, offset: 0x01f96a91, size: 94 bytes, params: 2, frame: 14
const env0_0 = a0;
const binding = env0_4;
const value = binding.useMemo(function() {
var value2 = new global.Set();
value2.forEach(_fun86516);
return global.Array.from(value2);
}, [a0]);
const env0_2 = binding.useRef([]);
binding.useEffect(_fun86517, [value]);
}
function useFetchVoiceChannelInviteStartTimes(a0) { // fn#86518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:1971, offset: 0x01f96be9, size: 122 bytes, params: 2, frame: 19
const env0_0 = a0;
env0_4.useEffect(_fun86520, [a0,
(require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildStore, GuildAvailabilityStore],
_fun86519, [a0])]);
}
function useMessagesLifecycle({messages, isMessagesReady, oldestUnreadMessageId, channelId, screenIndex, updateRows, scrollToMessageId}) { // fn#86521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:2576, offset: 0x01f96def, size: 137 bytes, params: 2, frame: 16
const binding = screenIndex;
binding.useEffect(_fun86522, []);
binding.useEffect(function() {
return _fun86524;
}, [channelId, screenIndex]);
}
function useScrollState_86525() { // fn#86525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:2978, offset: 0x01f96f20, size: 101 bytes, params: 1, frame: 15
const binding = env0_4;
const value = env0_3(binding.useState({'animated': false, 'hasHandledScroll': false, 'isAtBottom': false,
'isNearBottom': false, 'isNearTop': false, 'decelerating': false, 'dragging': false,
'hasMoreMessagesAfterForLastUpdate': false, '_loaded': false}), 2);
const property = value[0];
const env0_0 = value[1];
const useCallback = binding.useCallback;
return [property, Reflect.apply(useCallback, binding, [function(a0) {
a0(_fun86527);
}, []])];
}
function useChatUpdatesQueue(a0, a1) { // fn#86528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:3279, offset: 0x01f96fa5, size: 85 bytes, params: 3, frame: 15
const env0_0 = a0;
const env0_1 = a1;
const binding = env0_4;
const value = binding.useMemo(_fun86529, [a0, a1]);
binding.useEffect(function() {
return _fun86533;
}, [value]);
return value;
}
function useMessagesState() { // fn#86534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:3481, offset: 0x01f97097, size: 97 bytes, params: 1, frame: 19
const binding = env0_4;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_3;
let value = binding2(value2, 2);
const property = value[0];
const property2 = value[1];
useState = binding.useState;
value = binding2(Reflect.apply(useState, binding, [false]), 2);
return {shouldForceRender: property, hasJumpedToOriginalPost: value[0], setHasJumpedToOriginalPost: value[1],
setShouldForceRender: property2};
}
function _fun86510() { // fn#86510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:1307, offset: 0x01f96a21, size: 34 bytes, params: 1, frame: 12
const object2 = {};
object2.forEach(_fun86511);
return object2;
}
function _fun86512() { // fn#86512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:1457, offset: 0x01f96a43, size: 55 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
return value.mapValues(env0_1, function(a0, a1) {
return PresenceStore.getPrimaryActivity(a1);
});
}
function _fun86515() { // fn#86515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:1610, offset: 0x01f96aef, size: 76 bytes, params: 1, frame: 13
const Set = global.Set;
const set = new Set();
set.forEach(_fun86516);
const Array = global.Array;
return Array.from(set);
}
function _fun86517() { // fn#86517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:1770, offset: 0x01f96b3b, size: 174 bytes, params: 1, frame: 19
var defaultImport;
var fetchApplications;
var defaultImport2;
var value3;
let value = environment.__proto__;
const shallowEqualModule = require(628) /* metro dependency 628: shallowEqual */;
const areArraysShallowEqual = shallowEqualModule.areArraysShallowEqual;
let binding = env0_1;
if (!Reflect.apply(areArraysShallowEqual, shallowEqualModule, [binding, env0_2.current])) {
defaultImport = importDefault(6772) /* metro dependency 6772: ApplicationActionCreators */;
fetchApplications = defaultImport.fetchApplications;
defaultImport2 = importDefault(22) /* metro dependency 22 */;
binding = env0_1;
value3 = defaultImport2(binding);
value = value3.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
value = value.uniq();
value = value.value();
Reflect.apply(fetchApplications, defaultImport, [value, false]);
env0_2.current = binding;
}
}
function _fun86519() { // fn#86519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:2067, offset: 0x01f96c63, size: 185 bytes, params: 1, frame: 21
var r3;
var r10;
var value6;
var guild;
var moduleValue;
var isVoiceChannelInvite;
var id;
var getGuild;
var value7;
var isUnavailable;
var value8;
var value9;
const object2 = {};
const value4 = _createForOfIteratorHelperLoose_86506(env0_0.values());
const value5 = value4();
let done = value5.done;
if (!done) {
r3 = value5;
while (true) {
value6 = r3.value;
guild = value6.guild;
if (guild != null) {
moduleValue = require(4116) /* metro dependency 4116: InviteTypeUtils */;
isVoiceChannelInvite = moduleValue.isVoiceChannelInvite;
if (Reflect.apply(isVoiceChannelInvite, moduleValue, [value6])) {
guild = value6.guild;
id = guild.id;
getGuild = GuildStore.getGuild;
value7 = Reflect.apply(getGuild, GuildStore, [id]) != null;
if (!value7) {
r10 = value7;
continue;
}
isUnavailable = GuildAvailabilityStore.isUnavailable;
value8 = !Reflect.apply(isUnavailable, GuildAvailabilityStore, [id]);
r10 = value8;
object2[id] = r10;
break;
function useMessageAuthorActivities_86509(a0) { // fn#86509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:1251, offset: 0x01f969b3, size: 110 bytes, params: 2, frame: 16
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([PresenceStore], _fun86512,
[ReactModule.useMemo(function() {
var object = {};
object.forEach(_fun86511);
return object;
}, [a0])]);
function _fun86510() { // fn#86510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:1307, offset: 0x01f96a21, size: 34 bytes, params: 1, frame: 12
const object = {};
object.forEach(_fun86511);
return object;
function _fun86511(a0) { // fn#86511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:1339, offset: 0x01f93bdc, size: 57 bytes, params: 2, frame: 4
if (a0.author != null && a0.activity != null) {
env0_0[a0.author.id] = null;
}
break;
}
value9 = value4();
done = value9.done;
if (done) {
break;
}
r3 = value9;
continue;
}
}
return object2;
}
function _fun86520() { // fn#86520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:2309, offset: 0x01f96d1c, size: 211 bytes, params: 1, frame: 23
var r3;
var r12;
var value6;
var guild;
var moduleValue;
var isVoiceChannelInvite;
var id;
var value7;
var hasRequestedStartTimes2;
var moduleValue2;
var value8;
const value4 = _createForOfIteratorHelperLoose_86506(env0_0.values());
const value5 = value4();
let done = value5.done;
if (!done) {
r3 = value5;
while (true) {
value6 = r3.value;
guild = value6.guild;
if (guild != null) {
moduleValue = require(4116) /* metro dependency 4116: InviteTypeUtils */;
isVoiceChannelInvite = moduleValue.isVoiceChannelInvite;
if (Reflect.apply(isVoiceChannelInvite, moduleValue, [value6])) {
}
function _fun86512() { // fn#86512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:1457, offset: 0x01f96a43, size: 55 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
return value.mapValues(env0_1, function(a0, a1) {
return PresenceStore.getPrimaryActivity(a1);
});
}
}
function useFetchMessageApplications_86514(a0) { // fn#86514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:1553, offset: 0x01f96a91, size: 94 bytes, params: 2, frame: 14
const env0_0 = a0;
const value = ReactModule.useMemo(function() {
var value2 = new global.Set();
value2.forEach(_fun86516);
return global.Array.from(value2);
}, [a0]);
const env0_2 = ReactModule.useRef([]);
ReactModule.useEffect(_fun86517, [value]);
function _fun86515() { // fn#86515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:1610, offset: 0x01f96aef, size: 76 bytes, params: 1, frame: 13
const Set = global.Set;
const set = new Set();
set.forEach(_fun86516);
const Array = global.Array;
return Array.from(set);
function _fun86516(a0) { // fn#86516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:1647, offset: 0x01f93d0d, size: 55 bytes, params: 2, frame: 12
var binding;
if (a0.applicationId != null && a0.application == null) {
binding = env0_0;
binding.add(a0.applicationId);
}
}
}
function _fun86517() { // fn#86517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:1770, offset: 0x01f96b3b, size: 174 bytes, params: 1, frame: 19
var defaultImport;
var fetchApplications;
var defaultImport2;
var value3;
let value = environment.__proto__;
const areArraysShallowEqual = ShallowEqualModule.areArraysShallowEqual;
let binding = env0_1;
if (!Reflect.apply(areArraysShallowEqual, ShallowEqualModule, [binding, env0_2.current])) {
defaultImport = importDefault(6772) /* metro dependency 6772: ApplicationActionCreators */;
fetchApplications = defaultImport.fetchApplications;
defaultImport2 = importDefault(22) /* metro dependency 22 */;
binding = env0_1;
value3 = defaultImport2(binding);
value = value3.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
value = value.uniq();
value = value.value();
Reflect.apply(fetchApplications, defaultImport, [value, false]);
env0_2.current = binding;
}
}
}
function useFetchVoiceChannelInviteStartTimes(a0) { // fn#86518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:1971, offset: 0x01f96be9, size: 122 bytes, params: 2, frame: 19
const env0_0 = a0;
ReactModule.useEffect(_fun86520, [a0,
(FluxModule).useStateFromStoresObject([GuildStore, GuildAvailabilityStore],
_fun86519, [a0])]);
function _fun86519() { // fn#86519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:2067, offset: 0x01f96c63, size: 185 bytes, params: 1, frame: 21
var r3;
var r10;
var value6;
var guild;
var moduleValue;
var isVoiceChannelInvite;
var id;
var guildStoreBinding;
var getGuild;
var value7;
var guildAvailabilityStoreBinding;
var isUnavailable;
var value8;
var value9;
const object = {};
const value4 = _createForOfIteratorHelperLoose_86506(env0_0.values());
const value5 = value4();
let done = value5.done;
if (!done) {
r3 = value5;
while (true) {
value6 = r3.value;
guild = value6.guild;
id = guild.id;
value7 = env0_1[id] !== true;
if (value7) {
r12 = value7;
continue;
}
hasRequestedStartTimes2 = VoiceChannelStartTimeStore.hasRequestedStartTimes(id);
r12 = hasRequestedStartTimes2;
if (r12) {
if (guild != null) {
moduleValue = require(4116) /* metro dependency 4116: InviteTypeUtils */;
isVoiceChannelInvite = moduleValue.isVoiceChannelInvite;
if (Reflect.apply(isVoiceChannelInvite, moduleValue, [value6])) {
guild = value6.guild;
id = guild.id;
guildStoreBinding = GuildStore;
getGuild = guildStoreBinding.getGuild;
value7 = Reflect.apply(getGuild, guildStoreBinding, [id]) != null;
if (!value7) {
r10 = value7;
continue;
}
guildAvailabilityStoreBinding = GuildAvailabilityStore;
isUnavailable = guildAvailabilityStoreBinding.isUnavailable;
value8 = !Reflect.apply(isUnavailable, guildAvailabilityStoreBinding, [id]);
r10 = value8;
object[id] = r10;
break;
}
break;
}
moduleValue2 = require(11331) /* metro dependency 11331: ChannelInfoActionCreators */;
moduleValue2.fetchChannelInfo(id);
break;
value9 = value4();
done = value9.done;
if (done) {
break;
}
r3 = value9;
continue;
}
break;
}
value8 = value4();
done = value8.done;
if (done) {
break;
}
r3 = value8;
continue;
return object;
}
function _fun86520() { // fn#86520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:2309, offset: 0x01f96d1c, size: 211 bytes, params: 1, frame: 23
var r3;
var r12;
var value6;
var guild;
var moduleValue;
var isVoiceChannelInvite;
var id;
var value7;
var hasRequestedStartTimes2;
var moduleValue2;
var value8;
const value4 = _createForOfIteratorHelperLoose_86506(env0_0.values());
const value5 = value4();
let done = value5.done;
if (!done) {
r3 = value5;
while (true) {
value6 = r3.value;
guild = value6.guild;
if (guild != null) {
moduleValue = require(4116) /* metro dependency 4116: InviteTypeUtils */;
isVoiceChannelInvite = moduleValue.isVoiceChannelInvite;
if (Reflect.apply(isVoiceChannelInvite, moduleValue, [value6])) {
guild = value6.guild;
id = guild.id;
value7 = env0_1[id] !== true;
if (value7) {
r12 = value7;
continue;
}
hasRequestedStartTimes2 = VoiceChannelStartTimeStore.hasRequestedStartTimes(id);
r12 = hasRequestedStartTimes2;
if (r12) {
break;
}
moduleValue2 = require(11331) /* metro dependency 11331: ChannelInfoActionCreators */;
moduleValue2.fetchChannelInfo(id);
break;
}
break;
}
value8 = value4();
done = value8.done;
if (done) {
break;
}
r3 = value8;
continue;
}
}
}
}
function useMessagesLifecycle({messages, isMessagesReady, oldestUnreadMessageId, channelId, screenIndex, updateRows, scrollToMessageId}) { // fn#86521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:2576, offset: 0x01f96def, size: 137 bytes, params: 2, frame: 16
const binding = screenIndex;
binding.useEffect(_fun86522, []);
binding.useEffect(function() {
return _fun86524;
}, [channelId, screenIndex]);
function _fun86522() { // fn#86522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:2734, offset: 0x01f96e78, size: 126 bytes, params: 1, frame: 20
let value = environment.__proto__;
value = require(9835) /* metro dependency 9835: MessagesUtils */;
const syncMessageDisplay = value.syncMessageDisplay;
const messagesBinding = messages;
const channelIdBinding = channelId;
Reflect.apply(syncMessageDisplay, value, [{messages: messagesBinding, isMessagesReady: isMessagesReady,
oldestUnreadMessageId: oldestUnreadMessageId, channelId: channelIdBinding, screenIndex: screenIndex,
updateRows: updateRows, scrollToMessageId: scrollToMessageId}]);
(require(9835) /* metro dependency 9835: MessagesUtils */).recordTimings(channelIdBinding, messagesBinding);
}
function _fun86523() { // fn#86523, offset: 0x01f96ef6, size: 11 bytes, params: 1, frame: 1
return function() {
updateShouldShowJumpToPresentButton(channelId, screenIndex, false);
};
function _fun86524() { // fn#86524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:2935, offset: 0x01f96f01, size: 31 bytes, params: 1, frame: 15
updateShouldShowJumpToPresentButton(channelId, screenIndex, false);
}
}
}
function useScrollState_86525() { // fn#86525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:2978, offset: 0x01f96f20, size: 101 bytes, params: 1, frame: 15
const value = Module00057(ReactModule.useState({'animated': false, 'hasHandledScroll': false, 'isAtBottom': false,
'isNearBottom': false, 'isNearTop': false, 'decelerating': false, 'dragging': false,
'hasMoreMessagesAfterForLastUpdate': false, '_loaded': false}), 2);
const property = value[0];
const env0_0 = value[1];
const useCallback = ReactModule.useCallback;
return [property, Reflect.apply(useCallback, ReactModule, [function(a0) {
a0(_fun86527);
}, []])];
function _fun86526(a0) { // fn#86526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:3222, offset: 0x01f96f85, size: 32 bytes, params: 2, frame: 11
a0(_fun86527);
function _fun86527(a0) { // fn#86527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:3229, offset: 0x01d0cd72, size: 28 bytes, params: 2, frame: 11
const object = {};
copyDataProperties(object, a0, undefined);
copyDataProperties(object, env0_0, environment);
return object;
}
}
}
function useChatUpdatesQueue(a0, a1) { // fn#86528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:3279, offset: 0x01f96fa5, size: 85 bytes, params: 3, frame: 15
const env0_0 = a0;
const env0_1 = a1;
const value = ReactModule.useMemo(_fun86529, [a0, a1]);
ReactModule.useEffect(function() {
return _fun86533;
}, [value]);
return value;
function _fun86529() { // fn#86529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:3330, offset: 0x01f96ffa, size: 63 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = importDefault(11332) /* metro dependency 11332: ChatUpdatesQueue */;
const value2 = Object.create(value.prototype, {constructor: {value: value}});
value = new value(_fun86530, function(a0) {
require(a0);
});
return value instanceof Object ? value : value2;
function _fun86530() { // fn#86530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:3349, offset: 0x01f97039, size: 43 bytes, params: 1, frame: 12
const value = environment.__proto__;
const current = env1_0.current;
const value2 = null;
return value2 === current ? value2 : findNodeHandle(env1_0.current);
}
}
function _fun86532() { // fn#86532, offset: 0x01f97077, size: 11 bytes, params: 1, frame: 1
return _fun86533;
function _fun86533() { // fn#86533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:3434, offset: 0x01f97082, size: 21 bytes, params: 1, frame: 9
env1_2.cleanup();
}
}
}
function useMessagesState() { // fn#86534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:3481, offset: 0x01f97097, size: 97 bytes, params: 1, frame: 19
let useState = ReactModule.useState;
const value2 = Reflect.apply(useState, ReactModule, [false]);
let value = Module00057(value2, 2);
const property = value[0];
const property2 = value[1];
useState = ReactModule.useState;
value = Module00057(Reflect.apply(useState, ReactModule, [false]), 2);
return {shouldForceRender: property, hasJumpedToOriginalPost: value[0], setHasJumpedToOriginalPost: value[1],
setShouldForceRender: property2};
}
}
function _fun86522() { // fn#86522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:2734, offset: 0x01f96e78, size: 126 bytes, params: 1, frame: 20
let value = environment.__proto__;
value = require(9835) /* metro dependency 9835: MessagesUtils */;
const syncMessageDisplay = value.syncMessageDisplay;
const messagesBinding = messages;
const channelIdBinding = channelId;
Reflect.apply(syncMessageDisplay, value, [{messages: messagesBinding, isMessagesReady: isMessagesReady,
oldestUnreadMessageId: oldestUnreadMessageId, channelId: channelIdBinding, screenIndex: screenIndex,
updateRows: updateRows, scrollToMessageId: scrollToMessageId}]);
(require(9835) /* metro dependency 9835: MessagesUtils */).recordTimings(channelIdBinding, messagesBinding);
}
function _fun86523() { // fn#86523, offset: 0x01f96ef6, size: 11 bytes, params: 1, frame: 1
return function() {
updateShouldShowJumpToPresentButton(channelId, screenIndex, false);
};
}
function _fun86526(a0) { // fn#86526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:3222, offset: 0x01f96f85, size: 32 bytes, params: 2, frame: 11
a0(_fun86527);
}
function _fun86529() { // fn#86529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:3330, offset: 0x01f96ffa, size: 63 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = importDefault(11332) /* metro dependency 11332: ChatUpdatesQueue */;
const value2 = Object.create(value.prototype, {constructor: {value: value}});
value = new value(_fun86530, function(a0) {
require(a0);
});
return value instanceof Object ? value : value2;
}
function _fun86532() { // fn#86532, offset: 0x01f97077, size: 11 bytes, params: 1, frame: 1
return _fun86533;
}
function _fun86530() { // fn#86530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:3349, offset: 0x01f97039, size: 43 bytes, params: 1, frame: 12
const value = environment.__proto__;
const current = env1_0.current;
const value2 = null;
return value2 === current ? value2 : findNodeHandle(env1_0.current);
}
function _fun86533() { // fn#86533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:3434, offset: 0x01f97082, size: 21 bytes, params: 1, frame: 9
env1_2.cleanup();
}
global.__d(_fun86505, 11330, [57, 31, 27, 9858, 7729, 4646, 1867, 4396, 566, 22, 628, 6772, 1360, 4116, 11331, 9835,
11332,
2]) /* metro module 11330, dependencies: [57, 31, 27, 9858, 7729, 4646, 1867, 4396, 566, 22, 628, 6772, 1360, 4116, 11331, 9835, 11332, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -1,94 +1,117 @@
/* Metro module 11381; source: modules/messages/native/RoleMembersActionSheet.tsx; dependencies: [31, 27, 4502, 6875, 1938, 33, 4501, 697, 21, 6738, 566, 6736, 1305, 4573, 6275, 11382, 2] */
import GuildRoleStore from '../../../stores/GuildRoleStore.tsx'; /* Metro dependency 1938 */
import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ChannelMemberStoreModule from '../../../stores/ChannelMemberStore.tsx'; /* Metro dependency 6875 */
function _fun87242(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11567:6, offset: 0x01fb4f6e, size: 426 bytes, params: 8, frame: 24
var object3;
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 accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const env0_6 = (require(6875) /* metro dependency 6875: ChannelMemberStore */).EVERYONE_CHANNEL_ID;
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {'flexDirection': 'row', 'alignItems': 'center'};
object = {};
const object2 = {'flexDirection': 'row', 'alignItems': 'center'};
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object4.gap = PX_4;
object2.gap = PX_4;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.paddingTop = PX_12;
object2.paddingTop = PX_12;
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object4.paddingBottom = PX_4;
object2.paddingBottom = PX_4;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingHorizontal = PX_16;
object3.header = object4;
object3.headerText = {flex: 1};
object3.roleDot = {paddingTop: 0};
object2.paddingHorizontal = PX_16;
object.header = object2;
object.headerText = {flex: 1};
object.roleDot = {paddingTop: 0};
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object3.memberCount = {color: TEXT_MUTED};
const env0_10 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/RoleMembersActionSheet.tsx');
object.memberCount = {color: TEXT_MUTED};
const env0_10 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/RoleMembersActionSheet.tsx');
exports.default = _default_87243;
}
function _default_87243({guildId, roleId, channelId}) { // fn#87243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11567:496, offset: 0x01fb5118, size: 486 bytes, params: 2, frame: 25
const styles = useStyles();
let binding = env0_3;
binding.useEffect(function() {
if (roleId !== importDefault(dependencyMap[8]).castGuildIdAsEveryoneGuildRoleId(guildId)) {
require(dependencyMap[9]).requestMembersForRole(guildId, roleId);
}
}, [guildId, roleId]);
const fluxModule = require(566) /* metro dependency 566: flux */;
let useStateFromStores = fluxModule.useStateFromStores;
const value3 = Reflect.apply(useStateFromStores, fluxModule, [[GuildRoleStore], function() {
return GuildRoleStore.getRole(guildId, roleId);
}, [guildId, roleId]]);
var env0_3 = value3;
const moduleValue2 = fluxModule;
useStateFromStores = moduleValue2.useStateFromStores;
const r13 = Reflect.apply(useStateFromStores, moduleValue2, [[AccessibilityStore], function() {
return AccessibilityStore.roleStyle;
}]) === 'dot' && value3?.colorString != null;
const r12 = roleId === (importDefault(21) /* metro dependency 21: SnowflakeUtils */).castGuildIdAsEveryoneGuildRoleId(guildId) ? null : (importDefault(6736) /* metro dependency 6736: useGuildRoleMemberCounts */)(guildId)?.[roleId] ?? null;
binding = env0_3;
const useMemo = binding.useMemo;
if (value3 == null) {
return null;
} else {
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
return (
<BottomSheet scrollable header={Reflect.apply(useMemo, binding, [_fun87247, [r13, value3, r12, styles]])}>
{((Component) => <Component guildId={guildId} channelId={channelId ?? EVERYONE_CHANNEL_ID} roleId={roleId} headerShown={false} inActionSheet disableStickySections disableThemedGradient />)(importDefault(11382) /* metro dependency 11382: GuildChannelUserList */)}
</BottomSheet>
);
}
}
function _fun87247() { // fn#87247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11567:944, offset: 0x01fb537b, size: 323 bytes, params: 1, frame: 23
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var r0;
var RoleDot;
var binding;
const value = environment.__proto__;
const value3 = null;
if (env0_4) {
RoleDot = (require(1305) /* metro dependency 1305: native */).RoleDot;
function _default_87243({guildId, roleId, channelId}) { // fn#87243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11567:496, offset: 0x01fb5118, size: 486 bytes, params: 2, frame: 25
const styles = useStyles();
let binding = env0_3;
binding.useEffect(function() {
if (roleId !== importDefault(dependencyMap[8]).castGuildIdAsEveryoneGuildRoleId(guildId)) {
require(dependencyMap[9]).requestMembersForRole(guildId, roleId);
}
}, [guildId, roleId]);
let useStateFromStores = FluxModule.useStateFromStores;
const value3 = Reflect.apply(useStateFromStores, FluxModule, [[GuildRoleStore], function() {
return GuildRoleStore.getRole(guildId, roleId);
}, [guildId, roleId]]);
var env0_3 = value3;
useStateFromStores = FluxModule.useStateFromStores;
const r13 = Reflect.apply(useStateFromStores, FluxModule, [[AccessibilityStore], function() {
return AccessibilityStore.roleStyle;
}]) === 'dot' && value3?.colorString != null;
const r12 = roleId === (importDefault(21) /* metro dependency 21: SnowflakeUtils */).castGuildIdAsEveryoneGuildRoleId(guildId) ? null : (importDefault(6736) /* metro dependency 6736: useGuildRoleMemberCounts */)(guildId)?.[roleId] ?? null;
binding = env0_3;
r0 = <RoleDot color={binding.colorString} colors={binding.colorStrings} size="small" containerStyles={styles.roleDot} />;
} else {
r0 = value3;
const useMemo = binding.useMemo;
if (value3 == null) {
return null;
} else {
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
return (
<BottomSheet scrollable header={Reflect.apply(useMemo, binding, [_fun87247, [r13, value3, r12, styles]])}>
{((Component) => <Component guildId={guildId} channelId={channelId ?? EVERYONE_CHANNEL_ID} roleId={roleId} headerShown={false} inActionSheet disableStickySections disableThemedGradient />)(importDefault(11382) /* metro dependency 11382: GuildChannelUserList */)}
</BottomSheet>
);
}
function _fun87247() { // fn#87247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11567:944, offset: 0x01fb537b, size: 323 bytes, params: 1, frame: 23
const Text = (TextModule).Text;
var r0;
var RoleDot;
var binding;
const value = environment.__proto__;
const value3 = null;
if (ReactNativeModule.View) {
RoleDot = (require(1305) /* metro dependency 1305: native */).RoleDot;
binding = env0_3;
r0 = (
<RoleDot
color={binding.colorString}
colors={binding.colorStrings}
size="small"
containerStyles={styles.roleDot}
/>
);
} else {
r0 = value3;
}
const items2 = [r0];
items2[1] = (
<Text variant="text-sm/semibold" style={styles.headerText}>
{value3 == env0_3 ? undefined : env0_3.name}
</Text>
);
items2[2] = (
value3 != env0_5
? (
<Text variant="text-sm/medium" style={styles.memberCount}>
{env0_5}
</Text>
)
: value3
);
return (
<View style={styles.header}>
{items2}
</View>
);
}
}
const items2 = [r0];
items2[1] = <Text variant="text-sm/semibold" style={styles.headerText}>{value3 == env0_3 ? undefined : env0_3.name}</Text>;
items2[2] = value3 != env0_5 ? <Text variant="text-sm/medium" style={styles.memberCount}>{env0_5}</Text> : value3;
return (
<View style={styles.header}>
{items2}
</View>
);
}
global.__d(_fun87242, 11381, [31, 27, 4502, 6875, 1938, 33, 4501, 697, 21, 6738, 566, 6736, 1305, 4573, 6275, 11382,
2]) /* metro module 11381, dependencies: [31, 27, 4502, 6875, 1938, 33, 4501, 697, 21, 6738, 566, 6736, 1305, 4573, 6275, 11382, 2] */;
@@ -1,10 +1,13 @@
/* Metro module 11274; source: modules/messages/native/VisibleMessagesWindowHandler.tsx; dependencies: [7, 6, 8178, 2] */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as RowGeneratorConstantsModule from './renderer/RowGeneratorConstants.tsx'; /* Metro dependency 8178 */
function _fun86106(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11460:6, offset: 0x01f87f4a, size: 160 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importDefault(7) /* metro dependency 7 */;
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = (require(8178) /* metro dependency 8178: RowGeneratorConstants */).RowType;
let value = CreateClass;
value = value(function() {
this(this, VisibleMessagesWindowHandler);
this.data = null;
@@ -13,157 +16,157 @@ function _fun86106(global, require, importDefault, importAll, module, exports, d
this.clearCallback = _fun86110;
this.handleScrollPosition = _fun86111;
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/VisibleMessagesWindowHandler.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/VisibleMessagesWindowHandler.tsx');
exports.default = value;
}
function getRowMessageId(a0) { // fn#86107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11460:134, offset: 0x01f87fea, size: 102 bytes, params: 2, frame: 4
if (a0 == null) {
return undefined;
}
if ('rowType' in a0) {
if (a0.rowType === RowType.MESSAGE) {
return a0.message.id;
function getRowMessageId(a0) { // fn#86107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11460:134, offset: 0x01f87fea, size: 102 bytes, params: 2, frame: 4
if (a0 == null) {
return undefined;
}
return undefined;
}
const type = a0.type;
const MESSAGE = RowType.MESSAGE;
if (type !== MESSAGE) {
return undefined;
}
return a0.message?.id;
}
function VisibleMessagesWindowHandler() { // fn#86108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11460:317, offset: 0x01f88050, size: 87 bytes, params: 1, frame: 14
this(this, VisibleMessagesWindowHandler);
this.data = null;
this.callback = null;
this.setCallback = setCallback;
this.clearCallback = clearCallback;
this.handleScrollPosition = handleScrollPosition;
}
function setCallback(a0) { // fn#86109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11460:445, owner: VisibleMessagesWindowHandler.setCallback, offset: 0x01f880a7, size: 51 bytes, params: 2, frame: 11
let binding = env0_0;
binding.callback = a0;
if (binding.data != null) {
binding = env0_0;
binding.callback(binding.data);
}
}
function clearCallback() { // fn#86110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11460:527, owner: VisibleMessagesWindowHandler.clearCallback, offset: 0x01f880da, size: 25 bytes, params: 1, frame: 3
const binding = env0_0;
binding.callback = null;
binding.data = null;
}
function VisibleMessagesWindowHandlerHandleScrollPosition({rows, firstVisibleMessageRowIndex, lastVisibleMessageRowIndex}) { // fn#86111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11460:593, owner: VisibleMessagesWindowHandler.handleScrollPosition, offset: 0x01f880f3, size: 316 bytes, params: 2, frame: 20
var r1;
var r4;
var r6;
var r7;
var r3;
var value3;
var rowMessageId;
var value5;
var length;
var value6;
var rowMessageId2;
var value8;
var Math;
var value9;
var value10;
var rowMessageId3;
var value12;
var binding;
if (env0_0.callback != null) {
if (firstVisibleMessageRowIndex != null) {
value3 = environment.__proto__;
if (firstVisibleMessageRowIndex >= 0) {
r1 = firstVisibleMessageRowIndex;
while (true) {
rowMessageId = getRowMessageId(rows[r1]);
if (rowMessageId != null) {
r4 = rowMessageId;
break;
}
value5 = typeof r1 === 'bigint' ? r1 - 1n : +r1 - 1;
if (value5 >= 0) {
r1 = value5;
continue;
}
r4 = null;
break;
}
} else {
r4 = null;
if ('rowType' in a0) {
if (a0.rowType === RowType.MESSAGE) {
return a0.message.id;
}
} else {
r4 = null;
return undefined;
}
if (lastVisibleMessageRowIndex != null) {
length = rows.length;
value6 = environment.__proto__;
if (lastVisibleMessageRowIndex < length) {
r6 = lastVisibleMessageRowIndex;
while (true) {
rowMessageId2 = getRowMessageId(rows[r6]);
if (rowMessageId2 != null) {
r1 = rowMessageId2;
break;
}
value8 = typeof r6 === 'bigint' ? r6 + 1n : +r6 + 1;
length = rows.length;
if (value8 < length) {
r6 = value8;
continue;
}
r1 = null;
break;
}
} else {
r1 = null;
const type = a0.type;
const MESSAGE = RowType.MESSAGE;
if (type !== MESSAGE) {
return undefined;
}
return a0.message?.id;
}
function VisibleMessagesWindowHandler() { // fn#86108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11460:317, offset: 0x01f88050, size: 87 bytes, params: 1, frame: 14
this(this, VisibleMessagesWindowHandler);
this.data = null;
this.callback = null;
this.setCallback = setCallback;
this.clearCallback = clearCallback;
this.handleScrollPosition = handleScrollPosition;
function setCallback(a0) { // fn#86109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11460:445, owner: VisibleMessagesWindowHandler.setCallback, offset: 0x01f880a7, size: 51 bytes, params: 2, frame: 11
let binding = ClassCallCheck;
binding.callback = a0;
if (binding.data != null) {
binding = ClassCallCheck;
binding.callback(binding.data);
}
} else {
r1 = null;
}
if (firstVisibleMessageRowIndex != null) {
if (lastVisibleMessageRowIndex != null) {
Math = global.Math;
value9 = firstVisibleMessageRowIndex + Math.floor((lastVisibleMessageRowIndex - firstVisibleMessageRowIndex) / 2);
length = rows.length;
value10 = environment.__proto__;
if (value9 < length) {
r7 = value9;
while (true) {
rowMessageId3 = getRowMessageId(rows[r7]);
if (rowMessageId3 != null) {
r3 = rowMessageId3;
function clearCallback() { // fn#86110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11460:527, owner: VisibleMessagesWindowHandler.clearCallback, offset: 0x01f880da, size: 25 bytes, params: 1, frame: 3
ClassCallCheck.callback = null;
ClassCallCheck.data = null;
}
function handleScrollPosition({rows, firstVisibleMessageRowIndex, lastVisibleMessageRowIndex}) { // fn#86111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11460:593, owner: VisibleMessagesWindowHandler.handleScrollPosition, offset: 0x01f880f3, size: 316 bytes, params: 2, frame: 20
var r1;
var r4;
var r6;
var r7;
var r3;
var value3;
var rowMessageId;
var value5;
var length;
var value6;
var rowMessageId2;
var value8;
var Math;
var value9;
var value10;
var rowMessageId3;
var value12;
var binding;
if (ClassCallCheck.callback != null) {
if (firstVisibleMessageRowIndex != null) {
value3 = environment.__proto__;
if (firstVisibleMessageRowIndex >= 0) {
r1 = firstVisibleMessageRowIndex;
while (true) {
rowMessageId = getRowMessageId(rows[r1]);
if (rowMessageId != null) {
r4 = rowMessageId;
break;
}
value5 = typeof r1 === 'bigint' ? r1 - 1n : +r1 - 1;
if (value5 >= 0) {
r1 = value5;
continue;
}
r4 = null;
break;
}
value12 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
length = rows.length;
if (value12 < length) {
r7 = value12;
continue;
} else {
r4 = null;
}
} else {
r4 = null;
}
if (lastVisibleMessageRowIndex != null) {
length = rows.length;
value6 = environment.__proto__;
if (lastVisibleMessageRowIndex < length) {
r6 = lastVisibleMessageRowIndex;
while (true) {
rowMessageId2 = getRowMessageId(rows[r6]);
if (rowMessageId2 != null) {
r1 = rowMessageId2;
break;
}
value8 = typeof r6 === 'bigint' ? r6 + 1n : +r6 + 1;
length = rows.length;
if (value8 < length) {
r6 = value8;
continue;
}
r1 = null;
break;
}
} else {
r1 = null;
}
} else {
r1 = null;
}
if (firstVisibleMessageRowIndex != null) {
if (lastVisibleMessageRowIndex != null) {
Math = global.Math;
value9 = firstVisibleMessageRowIndex + Math.floor((lastVisibleMessageRowIndex - firstVisibleMessageRowIndex) / 2);
length = rows.length;
value10 = environment.__proto__;
if (value9 < length) {
r7 = value9;
while (true) {
rowMessageId3 = getRowMessageId(rows[r7]);
if (rowMessageId3 != null) {
r3 = rowMessageId3;
break;
}
value12 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
length = rows.length;
if (value12 < length) {
r7 = value12;
continue;
}
r3 = null;
break;
}
} else {
r3 = null;
}
} else {
r3 = null;
break;
}
} else {
r3 = null;
}
} else {
r3 = null;
binding = ClassCallCheck;
binding.data = {topVisibleMessage: r4, middleVisibleMessage: r3, bottomVisibleMessage: r1};
binding.callback(binding.data);
}
} else {
r3 = null;
}
binding = env0_0;
binding.data = {topVisibleMessage: r4, middleVisibleMessage: r3, bottomVisibleMessage: r1};
binding.callback(binding.data);
}
}
global.__d(_fun86106, 11274, [7, 6, 8178, 2]) /* metro module 11274, dependencies: [7, 6, 8178, 2] */;
@@ -1,43 +1,49 @@
/* Metro module 7214; source: modules/messages/native/burst_reactions/BurstReactionAnimation.tsx; dependencies: [31, 4502, 33, 4501, 7172, 566, 7215, 6760, 2] */
import AccessibilityStore from '../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun57703(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7392:6, offset: 0x016b3cb3, size: 196 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({content: {width: '100%'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/burst_reactions/BurstReactionAnimation.tsx');
ReactModule;
const env0_5 = (CreateStylesModule).createStyles({content: {width: '100%'}});
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/burst_reactions/BurstReactionAnimation.tsx');
exports.default = BurstReactionAnimation;
function BurstReactionAnimation(a0) { // fn#57704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7392:287, offset: 0x016b3d77, size: 337 bytes, params: 2, frame: 26
const channelId = a0.channelId;
const messageId = a0.messageId;
const emoji = a0.emoji;
const isFullscreen = a0.isFullscreen;
const onComplete = a0.onComplete;
let withFadeOut = a0.withFadeOut;
withFadeOut = withFadeOut === undefined || withFadeOut;
const object = {'channelId': 0, 'messageId': 0, 'emoji': 0, 'isFullscreen': 0, 'onComplete': 0, 'withFadeOut': 0};
silentSetPrototypeOf(object, null, undefined);
const value = copyDataProperties({}, a0, object, emoji);
const styles = useStyles();
const value3 = require(dependencyMap[4]).useBurstReactionAnimationSource({emoji: emoji, messageId: messageId,
channelId: channelId, isFullscreen: isFullscreen});
const useReducedMotion = require(dependencyMap[5]).useStateFromStores([AccessibilityStore], function() {
return AccessibilityStore.useReducedMotion;
});
if (value3 == null) {
return null;
}
const defaultImport = importDefault(withFadeOut ? dependencyMap[6] : dependencyMap[7]);
const object3 = {};
if (withFadeOut) {
object3.onComplete = onComplete;
} else {
object3.onAnimationFinish = onComplete;
}
return ((Component) => <Component style={styles.content} loop={false} speed={useReducedMotion ? 0.5 : 1.2} {...value} {...object3} {...{['source']: value3}} />)(defaultImport);
}
}
function BurstReactionAnimation(a0) { // fn#57704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7392:287, offset: 0x016b3d77, size: 337 bytes, params: 2, frame: 26
const channelId = a0.channelId;
const messageId = a0.messageId;
const emoji = a0.emoji;
const isFullscreen = a0.isFullscreen;
const onComplete = a0.onComplete;
let withFadeOut = a0.withFadeOut;
withFadeOut = withFadeOut === undefined || withFadeOut;
const object2 = {'channelId': 0, 'messageId': 0, 'emoji': 0, 'isFullscreen': 0, 'onComplete': 0, 'withFadeOut': 0};
silentSetPrototypeOf(object2, null, undefined);
const value = copyDataProperties({}, a0, object2, emoji);
const styles = useStyles();
const value3 = require(dependencyMap[4]).useBurstReactionAnimationSource({emoji: emoji, messageId: messageId,
channelId: channelId, isFullscreen: isFullscreen});
const useReducedMotion = require(dependencyMap[5]).useStateFromStores([AccessibilityStore], function() {
return AccessibilityStore.useReducedMotion;
});
if (value3 == null) {
return null;
}
const defaultImport = importDefault(withFadeOut ? dependencyMap[6] : dependencyMap[7]);
const object4 = {};
if (withFadeOut) {
object4.onComplete = onComplete;
} else {
object4.onAnimationFinish = onComplete;
}
return ((Component) => <Component style={styles.content} loop={false} speed={useReducedMotion ? 0.5 : 1.2} {...value} {...object4} {...{['source']: value3}} />)(defaultImport);
}
global.__d(_fun57703, 7214, [31, 4502, 33, 4501, 7172, 566, 7215, 6760,
2]) /* metro module 7214, dependencies: [31, 4502, 33, 4501, 7172, 566, 7215, 6760, 2] */;
@@ -1,239 +1,286 @@
/* Metro module 15265; source: modules/messages/native/burst_reactions/BurstReactionAnimationContainer.tsx; dependencies: [57, 31, 27, 1376, 33, 4501, 697, 7172, 4081, 4082, 694, 4017, 4504, 10357, 1365, 1305, 7214, 4573, 1244, 3868, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Dispatcher from '../../../../Dispatcher.tsx'; /* Metro dependency 694 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import HapticFeedbackTypes from '../../../haptics/HapticFeedbackTypes.tsx'; /* Metro dependency 4082 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as Dismissible_contentModule from '../../../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/dismissible_content.tsx'; /* Metro dependency 1365 */
import * as DismissibleContentConstantsModule from '../../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
import * as NativeModule2 from '../../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as HapticUtilsNativeModule from '../../../haptics/HapticUtils.native.tsx'; /* Metro dependency 4081 */
import * as BurstReactionEffectUtilsModule from './BurstReactionEffectUtils.tsx'; /* Metro dependency 7172 */
function _fun116710(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:6, offset: 0x024945dc, size: 526 bytes, params: 8, frame: 25
var object5;
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 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.TouchableOpacity;
const env0_6 = value.View;
const StyleSheet = value.StyleSheet;
const env0_7 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.Fragment;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object5 = {};
const object6 = {};
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
object = {};
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object6['backgroundColor'] = BLACK;
const BACKDROP_OPACITY = (require(7172) /* metro dependency 7172: BurstReactionEffectUtils */).BACKDROP_OPACITY;
object6['opacity'] = BACKDROP_OPACITY;
object5.background = object6;
const object7 = {};
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
object7['flex'] = 1;
object7['alignItems'] = 'center';
object7['justifyContent'] = 'center';
object5.fill = object7;
object5.dismissTextContainer = {'position': 'absolute', 'bottom': 48, 'zIndex': 1};
const object8 = {'backgroundColor': null, 'borderRadius': null, 'position': 'absolute', 'bottom': -600,
object2['backgroundColor'] = BLACK;
const BACKDROP_OPACITY = (BurstReactionEffectUtilsModule).BACKDROP_OPACITY;
object2['opacity'] = BACKDROP_OPACITY;
object.background = object2;
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
object3['flex'] = 1;
object3['alignItems'] = 'center';
object3['justifyContent'] = 'center';
object.fill = object3;
object.dismissTextContainer = {'position': 'absolute', 'bottom': 48, 'zIndex': 1};
const object4 = {'backgroundColor': null, 'borderRadius': null, 'position': 'absolute', 'bottom': -600,
'height': 700, 'width': 700};
const BACKGROUND_SURFACE_HIGHEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGHEST;
object8.backgroundColor = BACKGROUND_SURFACE_HIGHEST;
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object5.dismissTextBackground = object8;
const env0_11 = Reflect.apply(createStyles, value, [object5]);
object5 = {code: "function BurstReactionAnimationContainerTsx1(){const{animationData,showAnimation,withTiming,runOnJS,handleComponentFinish}=this.__closure;if(animationData==null){return{opacity:0};}if(!showAnimation){return{opacity:withTiming(0,{duration:300},'respect-motion-settings',function(finished){if(finished)runOnJS(handleComponentFinish)();})};}return{opacity:withTiming(1,{duration:300})};}"};
object5 = {code: 'function BurstReactionAnimationContainerTsx2(finished){const{runOnJS,handleComponentFinish}=this.__closure;if(finished)runOnJS(handleComponentFinish)();}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/burst_reactions/BurstReactionAnimationContainer.tsx');
object4.backgroundColor = BACKGROUND_SURFACE_HIGHEST;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.dismissTextBackground = object4;
const env0_11 = Reflect.apply(createStyles, value, [object]);
object = {code: "function BurstReactionAnimationContainerTsx1(){const{animationData,showAnimation,withTiming,runOnJS,handleComponentFinish}=this.__closure;if(animationData==null){return{opacity:0};}if(!showAnimation){return{opacity:withTiming(0,{duration:300},'respect-motion-settings',function(finished){if(finished)runOnJS(handleComponentFinish)();})};}return{opacity:withTiming(1,{duration:300})};}"};
object = {code: 'function BurstReactionAnimationContainerTsx2(finished){const{runOnJS,handleComponentFinish}=this.__closure;if(finished)runOnJS(handleComponentFinish)();}'};
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/burst_reactions/BurstReactionAnimationContainer.tsx');
exports.default = BurstReactionAnimationContainer;
}
function BurstReactionAnimationContainerInner() { // fn#116711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:1252, offset: 0x024947ea, size: 404 bytes, params: 1, frame: 24
const closure = handleComponentFinish;
const env0_0 = useStyles();
const binding = env0_4Binding;
const value2 = null;
const [property, env0_2] = env0_3(binding.useState(value2), 2);
var [property2, env0_4] = env0_3(env0_4Binding.useState(false), 2);
const env0_5 = env0_4Binding.useRef(false);
env0_4Binding.useEffect(_fun116714, []);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure3 = BurstReactionAnimationContainerInnerY;
const object2 = {animationData: property, showAnimation: property2};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.handleComponentFinish = closure;
closure3.__closure = object2;
closure3.__workletHash = 12044515783370;
closure3.__initData = env0_12;
const env0_6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure3]);
return value2 == property ? value2 : ((Component) => <Component contentTypes={[(require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.SUPER_REACTIONS_MOBILE_FULLSCREEN_TAP_TO_DISMISS]}>{children_116719}</Component>)(importDefault(10357) /* metro dependency 10357: SelectedDismissibleContent */);
}
function BurstReactionAnimationContainer() { // fn#116723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:3458, offset: 0x02494e5f, size: 98 bytes, params: 1, frame: 17
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
const DARKER = (importDefault(697) /* metro dependency 697: native */).themes.DARKER;
return (
<ThemeContextProvider theme={DARKER}>
<BurstReactionAnimationContainerInner />
</ThemeContextProvider>
);
}
function handleComponentFinish() { // fn#116712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:1407, owner: BurstReactionAnimationContainerInner.handleComponentFinish, offset: 0x0249497e, size: 35 bytes, params: 1, frame: 11
if (env0_5.current === false) {
env0_2(null);
}
}
function handleAnimationFinish(a0) { // fn#116713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:1464, owner: BurstReactionAnimationContainerInner.handleAnimationFinish, offset: 0x024949a1, size: 41 bytes, params: 2, frame: 13
env0_4(false);
env0_5.current = false;
if (a0 != null) {
a0();
}
}
function _fun116714() { // fn#116714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:1543, offset: 0x024949ca, size: 65 bytes, params: 1, frame: 14
var environment;
const closure = handleEffectReceived;
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).subscribe('BURST_REACTION_EFFECT_SEND', closure);
return _fun116716;
}
function BurstReactionAnimationContainerInnerY() { // fn#116717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:1920, owner: BurstReactionAnimationContainerInner.y, offset: 0x02494abe, size: 201 bytes, params: 1, frame: 23
var environment;
var r0;
var binding;
var object4;
var value2;
var moduleValue;
var withTiming;
var object5;
var closure;
var object6;
if (env0_1 == null) {
r0 = {opacity: 0};
} else {
binding = env0_3;
object4 = {};
value2 = environment.__proto__;
moduleValue = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue.withTiming;
object5 = {duration: 300};
if (binding) {
object4.opacity = Reflect.apply(withTiming, moduleValue, [1, object5]);
r0 = object4;
} else {
closure = yN;
object6 = {};
object6.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object6.handleComponentFinish = handleComponentFinish;
closure.__closure = object6;
closure.__workletHash = 9326347209552;
closure.__initData = env1_13;
object4.opacity = Reflect.apply(withTiming, moduleValue, [0, object5, 'respect-motion-settings', closure]);
r0 = object4;
function BurstReactionAnimationContainerInner() { // fn#116711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:1252, offset: 0x024947ea, size: 404 bytes, params: 1, frame: 24
const handleComponentFinish2 = handleComponentFinish;
const env0_0 = useStyles();
const binding = env0_4Binding;
const value2 = null;
const [property, env0_2] = Module00057(binding.useState(value2), 2);
var [property2, env0_4] = Module00057(env0_4Binding.useState(false), 2);
const env0_5 = env0_4Binding.useRef(false);
env0_4Binding.useEffect(_fun116714, []);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const BurstReactionAnimationContainerInnerY2 = BurstReactionAnimationContainerInnerY;
const object = {animationData: property, showAnimation: property2};
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object.runOnJS = ReanimatedRexportModule.runOnJS;
object.handleComponentFinish = handleComponentFinish2;
BurstReactionAnimationContainerInnerY2.__closure = object;
BurstReactionAnimationContainerInnerY2.__workletHash = 12044515783370;
BurstReactionAnimationContainerInnerY2.__initData = env0_12;
const env0_6 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [BurstReactionAnimationContainerInnerY2]);
return (
value2 == property
? value2
: ((Component) => <Component contentTypes={[(require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.SUPER_REACTIONS_MOBILE_FULLSCREEN_TAP_TO_DISMISS]}>{children_116719}</Component>)(importDefault(10357) /* metro dependency 10357: SelectedDismissibleContent */)
);
function handleComponentFinish() { // fn#116712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:1407, owner: BurstReactionAnimationContainerInner.handleComponentFinish, offset: 0x0249497e, size: 35 bytes, params: 1, frame: 11
if (env0_5.current === false) {
env0_2(null);
}
}
function BurstReactionAnimationContainerInnerHandleAnimationFinish(a0) { // fn#116713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:1464, owner: BurstReactionAnimationContainerInner.handleAnimationFinish, offset: 0x024949a1, size: 41 bytes, params: 2, frame: 13
env0_4(false);
env0_5.current = false;
if (a0 != null) {
a0();
}
}
function _fun116714() { // fn#116714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:1543, offset: 0x024949ca, size: 65 bytes, params: 1, frame: 14
var environment;
const handleEffectReceived2 = handleEffectReceived;
const value = environment.__proto__;
(Dispatcher).subscribe('BURST_REACTION_EFFECT_SEND',
handleEffectReceived2);
return _fun116716;
function handleEffectReceived({channelId, emoji, messageId}) { // fn#116715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:1548, offset: 0x02494a0b, size: 127 bytes, params: 2, frame: 14
env1_2({channelId: channelId, emoji: emoji, messageId: messageId});
env1_4(true);
env1_5.current = true;
const triggerHapticFeedback = HapticUtilsNativeModule.triggerHapticFeedback;
const IMPACT_HEAVY = (HapticFeedbackTypes).IMPACT_HEAVY;
Reflect.apply(triggerHapticFeedback, HapticUtilsNativeModule, [IMPACT_HEAVY]);
}
function _fun116716() { // fn#116716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:1798, offset: 0x02494a8a, size: 52 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.unsubscribe('BURST_REACTION_EFFECT_SEND', handleEffectReceived);
}
}
function BurstReactionAnimationContainerInnerY() { // fn#116717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:1920, owner: BurstReactionAnimationContainerInner.y, offset: 0x02494abe, size: 201 bytes, params: 1, frame: 23
var environment;
var r0;
var binding;
var object;
var value2;
var moduleValue;
var withTiming;
var object2;
var yN2;
var object3;
if (env0_1 == null) {
r0 = {opacity: 0};
} else {
binding = Module00057;
object = {};
value2 = environment.__proto__;
moduleValue = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue.withTiming;
object2 = {duration: 300};
if (binding) {
object.opacity = Reflect.apply(withTiming, moduleValue, [1, object2]);
r0 = object;
} else {
yN2 = yN;
object3 = {};
object3.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object3.handleComponentFinish = handleComponentFinish;
yN2.__closure = object3;
yN2.__workletHash = 9326347209552;
yN2.__initData = env1_13;
object.opacity = Reflect.apply(withTiming, moduleValue, [0, object2, 'respect-motion-settings', yN2]);
r0 = object;
}
}
return r0;
function yN(a0) { // fn#116718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:2083, owner: BurstReactionAnimationContainerInner.y.n, offset: 0x02494b87, size: 56 bytes, params: 2, frame: 12
var value;
var runOnJS;
var value2;
if (a0) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
Reflect.apply(runOnJS, value, [handleComponentFinish])();
}
}
}
function BurstReactionAnimationContainerInnerChildren({visibleContent, markAsDismissed}) { // fn#116719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:2608, owner: BurstReactionAnimationContainerInner.children, offset: 0x02494bbf, size: 603 bytes, params: 2, frame: 34
var environment;
var r15;
var r11;
var BurstReactionAnimation;
var binding;
var jsxRuntimeEnv1_9Binding;
var Text;
var object;
var intl;
const value = environment.__proto__;
const OverlayView = (NativeModule).OverlayView;
const object3 = {};
let stylesBinding = styles;
let fill = stylesBinding.fill;
object3.style = fill;
const View2 = (ReanimatedRexport).View;
const items3 = [stylesBinding.fill, env0_6];
const object6 = {};
const BACKDROP_OPACITY = (BurstReactionEffectUtilsModule).BACKDROP_OPACITY;
object6.activeOpacity = BACKDROP_OPACITY;
object6.onPress = function() {
BurstReactionAnimationContainerInnerHandleAnimationFinish(_fun116721);
};
object6.style = stylesBinding.fill;
const items2 = [
<View style={stylesBinding.background} />,
];
fill = stylesBinding.fill;
if (Module00057) {
BurstReactionAnimation = importDefault(7214) /* metro dependency 7214: BurstReactionAnimation */;
binding = env0_1;
r15 = (
<BurstReactionAnimation
isFullscreen
channelId={binding.channelId}
messageId={binding.messageId}
emoji={binding.emoji}
loop={false}
withFadeOut={false}
onComplete={function() {
BurstReactionAnimationContainerInnerHandleAnimationFinish();
}}
/>
);
} else {
r15 = null;
}
items2[1] = (
<View style={fill}>
{r15}
</View>
);
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
const SUPER_REACTIONS_MOBILE_FULLSCREEN_TAP_TO_DISMISS = DismissibleContent.SUPER_REACTIONS_MOBILE_FULLSCREEN_TAP_TO_DISMISS;
const value6 = visibleContent === SUPER_REACTIONS_MOBILE_FULLSCREEN_TAP_TO_DISMISS;
if (value6) {
jsxRuntimeEnv1_9Binding = jsxRuntimeEnv1_9;
Text = (require(4573) /* metro dependency 4573: Text */).Text;
object = {};
stylesBinding = styles;
object.style = stylesBinding.dismissTextContainer;
object.variant = 'text-sm/medium';
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r11 = (
<>
<Text {...object}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.QpPMih)}
</Text>
<View style={stylesBinding.dismissTextBackground} />
</>
);
} else {
r11 = value6;
}
items2[2] = r11;
return (
<OverlayView {...object3}>
<View2 style={items3}>
<TouchableOpacity {...object6}>
{items2}
</TouchableOpacity>
</View2>
</OverlayView>
);
function childrenOnPress_116720() { // fn#116720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:2789, owner: BurstReactionAnimationContainerInner.children.onPress, offset: 0x02494e1a, size: 25 bytes, params: 1, frame: 11
BurstReactionAnimationContainerInnerHandleAnimationFinish(function() {
return markAsDismissed(ContentDismissActionType.UNKNOWN);
});
function _fun116721() { // fn#116721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:2816, offset: 0x02494e33, size: 29 bytes, params: 1, frame: 11
const markAsDismissedBinding = markAsDismissed;
const UNKNOWN = ContentDismissActionType.UNKNOWN;
return markAsDismissedBinding(UNKNOWN);
}
}
}
}
return r0;
}
function BurstReactionAnimationContainerInnerChildren({visibleContent, markAsDismissed}) { // fn#116719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:2608, owner: BurstReactionAnimationContainerInner.children, offset: 0x02494bbf, size: 603 bytes, params: 2, frame: 34
var environment;
var r15;
var r11;
var BurstReactionAnimation;
var binding;
var jsxRuntimeEnv1_9Binding;
var Text;
var object2;
var intl;
const value = environment.__proto__;
const OverlayView = (require(1305) /* metro dependency 1305: native */).OverlayView;
const object4 = {};
let stylesBinding = styles;
let fill = stylesBinding.fill;
object4.style = fill;
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items3 = [stylesBinding.fill, env0_6];
const object5 = {};
const BACKDROP_OPACITY = (require(7172) /* metro dependency 7172: BurstReactionEffectUtils */).BACKDROP_OPACITY;
object5.activeOpacity = BACKDROP_OPACITY;
object5.onPress = function() {
handleAnimationFinish(_fun116721);
};
object5.style = stylesBinding.fill;
const items2 = [<View style={stylesBinding.background} />];
fill = stylesBinding.fill;
if (env0_3) {
BurstReactionAnimation = importDefault(7214) /* metro dependency 7214: BurstReactionAnimation */;
binding = env0_1;
r15 = <BurstReactionAnimation isFullscreen channelId={binding.channelId} messageId={binding.messageId} emoji={binding.emoji} loop={false} withFadeOut={false} onComplete={function() {
handleAnimationFinish();
}} />;
} else {
r15 = null;
function BurstReactionAnimationContainer() { // fn#116723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:3458, offset: 0x02494e5f, size: 98 bytes, params: 1, frame: 17
const ThemeContextProvider = (NativeModule2).ThemeContextProvider;
const DARKER = (Native).themes.DARKER;
return (
<ThemeContextProvider theme={DARKER}>
<BurstReactionAnimationContainerInner />
</ThemeContextProvider>
);
}
items2[1] = <View style={fill}>{r15}</View>;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const SUPER_REACTIONS_MOBILE_FULLSCREEN_TAP_TO_DISMISS = DismissibleContent.SUPER_REACTIONS_MOBILE_FULLSCREEN_TAP_TO_DISMISS;
const value6 = visibleContent === SUPER_REACTIONS_MOBILE_FULLSCREEN_TAP_TO_DISMISS;
if (value6) {
jsxRuntimeEnv1_9Binding = jsxRuntimeEnv1_9;
Text = (require(4573) /* metro dependency 4573: Text */).Text;
object2 = {};
stylesBinding = styles;
object2.style = stylesBinding.dismissTextContainer;
object2.variant = 'text-sm/medium';
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r11 = <><Text {...object2}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.QpPMih)}</Text><View style={stylesBinding.dismissTextBackground} /></>;
} else {
r11 = value6;
}
items2[2] = r11;
return (
<OverlayView {...object4}>
<View2 style={items3}>
<TouchableOpacity {...object5}>
{items2}
</TouchableOpacity>
</View2>
</OverlayView>
);
}
function handleEffectReceived({channelId, emoji, messageId}) { // fn#116715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:1548, offset: 0x02494a0b, size: 127 bytes, params: 2, frame: 14
env1_2({channelId: channelId, emoji: emoji, messageId: messageId});
env1_4(true);
env1_5.current = true;
const hapticUtilsNativeModule = require(4081) /* metro dependency 4081: HapticUtilsNative */;
const triggerHapticFeedback = hapticUtilsNativeModule.triggerHapticFeedback;
const IMPACT_HEAVY = (importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */).IMPACT_HEAVY;
Reflect.apply(triggerHapticFeedback, hapticUtilsNativeModule, [IMPACT_HEAVY]);
}
function _fun116716() { // fn#116716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:1798, offset: 0x02494a8a, size: 52 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.unsubscribe('BURST_REACTION_EFFECT_SEND', handleEffectReceived);
}
function yN(a0) { // fn#116718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:2083, owner: BurstReactionAnimationContainerInner.y.n, offset: 0x02494b87, size: 56 bytes, params: 2, frame: 12
var value;
var runOnJS;
var value2;
if (a0) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
Reflect.apply(runOnJS, value, [handleComponentFinish])();
}
}
function childrenOnPress_116720() { // fn#116720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:2789, owner: BurstReactionAnimationContainerInner.children.onPress, offset: 0x02494e1a, size: 25 bytes, params: 1, frame: 11
handleAnimationFinish(function() {
return markAsDismissed(ContentDismissActionType.UNKNOWN);
});
}
global.__d(_fun116710, 15265, [57, 31, 27, 1376, 33, 4501, 697, 7172, 4081, 4082, 694, 4017, 4504, 10357, 1365,
1305, 7214, 4573, 1244, 3868,
2]) /* metro module 15265, dependencies: [57, 31, 27, 1376, 33, 4501, 697, 7172, 4081, 4082, 694, 4017, 4504, 10357, 1365, 1305, 7214, 4573, 1244, 3868, 2] */;
@@ -1,26 +1,31 @@
/* Metro module 7213; source: modules/messages/native/burst_reactions/BurstReactionAnimationPreview.tsx; dependencies: [31, 33, 7152, 7214, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as MessageReactionsTypesModule from '../../MessageReactionsTypes.tsx'; /* Metro dependency 7152 */
function _fun57701(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7391:6, offset: 0x016b3bb1, size: 136 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_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/burst_reactions/BurstReactionAnimationPreview.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/burst_reactions/BurstReactionAnimationPreview.tsx');
exports.default = BurstReactionAnimationPreview;
}
function BurstReactionAnimationPreview({channelId, emoji, messageId, reactionType}) { // fn#57702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7391:235, offset: 0x016b3c39, size: 122 bytes, params: 2, frame: 18
var r0;
var value;
const ReactionTypes = (require(7152) /* metro dependency 7152: MessageReactionsTypes */).ReactionTypes;
const BURST = ReactionTypes.BURST;
if (reactionType !== BURST) {
r0 = null;
} else {
value = importDefault(7214) /* metro dependency 7214: BurstReactionAnimation */;
value = ((Component) => <Component isFullscreen channelId={channelId} messageId={messageId} emoji={emoji} />)(value);
r0 = value;
function BurstReactionAnimationPreview({channelId, emoji, messageId, reactionType}) { // fn#57702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7391:235, offset: 0x016b3c39, size: 122 bytes, params: 2, frame: 18
var r0;
var value;
const ReactionTypes = (MessageReactionsTypesModule).ReactionTypes;
const BURST = ReactionTypes.BURST;
if (reactionType !== BURST) {
r0 = null;
} else {
value = importDefault(7214) /* metro dependency 7214: BurstReactionAnimation */;
value = ((Component) => <Component isFullscreen channelId={channelId} messageId={messageId} emoji={emoji} />)(value);
r0 = value;
}
return r0;
}
return r0;
}
global.__d(_fun57701, 7213, [31, 33, 7152, 7214, 2]) /* metro module 7213, dependencies: [31, 33, 7152, 7214, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,128 +1,142 @@
/* Metro module 7215; source: modules/messages/native/burst_reactions/FadeOutLottieAnimation.tsx; dependencies: [57, 31, 4502, 33, 4501, 566, 4017, 4504, 6760, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import AccessibilityStore from '../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun57706(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7393:6, offset: 0x016b3ed7, size: 248 bytes, params: 8, frame: 20
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 accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({content: {width: '100%'}});
const env0_7 = (CreateStylesModule).createStyles({content: {width: '100%'}});
object = {code: "function FadeOutLottieAnimationTsx1(){const{isAnimationComplete,isFadeOut,withTiming,runOnJS,setIsFadeOut}=this.__closure;if(!isAnimationComplete){return{opacity:1};}if(isFadeOut){return{opacity:withTiming(0,{duration:300},'respect-motion-settings',function(finished){if(finished)runOnJS(setIsFadeOut)(false);})};}return{opacity:0};}"};
object = {code: 'function FadeOutLottieAnimationTsx2(finished){const{runOnJS,setIsFadeOut}=this.__closure;if(finished)runOnJS(setIsFadeOut)(false);}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/burst_reactions/FadeOutLottieAnimation.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/burst_reactions/FadeOutLottieAnimation.tsx');
exports.default = FadeOutLottieAnimation;
}
function FadeOutLottieAnimation(a0) { // fn#57707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7393:787, offset: 0x016b3fcf, size: 441 bytes, params: 2, frame: 29
var object2;
var r0;
var View;
const env0_0 = a0.onComplete;
let value = null;
const value2 = Object.create(value);
value2.onComplete = 0;
const value3 = copyDataProperties({}, a0, value2, undefined);
const styles = useStyles();
const binding = env0_4;
let useState = binding.useState;
const value5 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_3;
const value6 = binding2(value5, 2);
const property = value6[0];
const value7 = 1;
const env0_2 = value6[value7];
useState = binding.useState;
const value8 = binding2(Reflect.apply(useState, binding, [true]), 2);
const property2 = value8[0];
const property3 = value8[value7];
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
let closure = _fun57709;
binding.useEffect(closure, []);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
closure = FadeOutLottieAnimationT;
object2 = {isAnimationComplete: property, isFadeOut: property2};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.setIsFadeOut = property3;
closure.__closure = object2;
closure.__workletHash = 1137618554665;
closure.__initData = env0_8;
const value9 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
if (property) {
if (property2) {
function FadeOutLottieAnimation(a0) { // fn#57707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7393:787, offset: 0x016b3fcf, size: 441 bytes, params: 2, frame: 29
var r0;
var View;
const env0_0 = a0.onComplete;
let value = null;
const value2 = Object.create(value);
value2.onComplete = 0;
const value3 = copyDataProperties({}, a0, value2, undefined);
const styles = useStyles();
let useState = ReactModule.useState;
const value5 = Reflect.apply(useState, ReactModule, [false]);
const value6 = Module00057(value5, 2);
const property = value6[0];
const value7 = 1;
const env0_2 = value6[value7];
useState = ReactModule.useState;
const value8 = Module00057(Reflect.apply(useState, ReactModule, [true]), 2);
const property2 = value8[0];
const property3 = value8[value7];
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
let closure = _fun57709;
ReactModule.useEffect(closure, []);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = FadeOutLottieAnimationT;
object = {isAnimationComplete: property, isFadeOut: property2};
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object.runOnJS = ReanimatedRexportModule.runOnJS;
object.setIsFadeOut = property3;
closure.__closure = object;
closure.__workletHash = 1137618554665;
closure.__initData = env0_8;
const value9 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
if (property) {
if (property2) {
View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
object = {style: value9};
value = importDefault(6760) /* metro dependency 6760: LottieAnimationView */;
value = (
<View {...object}>
{((Component) => <Component style={styles.content} speed={useReducedMotion ? 0.5 : value7} onAnimationFinish={onAnimationFinish_57712} {...value3} />)(value)}
</View>
);
r0 = value;
} else {
r0 = value;
}
} else {
View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
object2 = {style: value9};
object = {style: value9};
value = importDefault(6760) /* metro dependency 6760: LottieAnimationView */;
value = <View {...object2}>{((Component) => <Component style={styles.content} speed={useReducedMotion ? 0.5 : value7} onAnimationFinish={onAnimationFinish} {...value3} />)(value)}</View>;
r0 = value;
} else {
value = (
<View {...object}>
{((Component) => <Component style={styles.content} speed={useReducedMotion ? 0.5 : value7} onAnimationFinish={onAnimationFinish_57712} {...value3} />)(value)}
</View>
);
r0 = value;
}
} else {
View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
object2 = {style: value9};
value = importDefault(6760) /* metro dependency 6760: LottieAnimationView */;
value = <View {...object2}>{((Component) => <Component style={styles.content} speed={useReducedMotion ? 0.5 : value7} onAnimationFinish={onAnimationFinish} {...value3} />)(value)}</View>;
r0 = value;
}
return r0;
}
function FadeOutLottieAnimationT() { // fn#57710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7393:1056, owner: FadeOutLottieAnimation.T, offset: 0x016b419a, size: 194 bytes, params: 1, frame: 25
var environment;
var value2;
var moduleValue;
var withTiming;
var closure;
var object2;
const binding = env0_1;
const object4 = {};
if (binding) {
if (env0_3) {
value2 = environment.__proto__;
moduleValue = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue.withTiming;
closure = TT_57711;
object2 = {};
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.setIsFadeOut = env0_4;
closure.__closure = object2;
closure.__workletHash = 14133863353798;
closure.__initData = env1_9;
object4.opacity = Reflect.apply(withTiming, moduleValue, [0, {duration: 300}, 'respect-motion-settings',
closure]);
} else {
object4.opacity = 0;
return r0;
function _fun57709() { // fn#57709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7393:1002, offset: 0x016b4188, size: 18 bytes, params: 1, frame: 11
env0_2(false);
}
} else {
object4.opacity = 1;
}
return object4;
}
function onAnimationFinish(a0) { // fn#57712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7393:1599, owner: FadeOutLottieAnimation.onAnimationFinish, offset: 0x016b4297, size: 42 bytes, params: 2, frame: 12
if (onComplete != null) {
onComplete(a0);
}
env0_2(true);
}
function FadeOutLottieAnimationT() { // fn#57710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7393:1056, owner: FadeOutLottieAnimation.T, offset: 0x016b419a, size: 194 bytes, params: 1, frame: 25
var environment;
var value2;
var moduleValue;
var withTiming;
var TT_577112;
var object;
const binding = env0_1;
const object3 = {};
if (binding) {
if (Module00057) {
value2 = environment.__proto__;
moduleValue = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue.withTiming;
TT_577112 = TT_57711;
object = {};
object.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object.setIsFadeOut = ReactModule;
TT_577112.__closure = object;
TT_577112.__workletHash = 14133863353798;
TT_577112.__initData = env1_9;
object3.opacity = Reflect.apply(withTiming, moduleValue, [0, {duration: 300}, 'respect-motion-settings',
TT_577112]);
} else {
object3.opacity = 0;
}
} else {
object3.opacity = 1;
}
return object3;
function TT_57711(a0) { // fn#57711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7393:1152, owner: FadeOutLottieAnimation.T.t, offset: 0x016b425c, size: 59 bytes, params: 2, frame: 12
var value;
var runOnJS;
var value2;
if (a0) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
value = Reflect.apply(runOnJS, value, [env1_4]);
value(false);
}
}
}
function FadeOutLottieAnimationOnAnimationFinish(a0) { // fn#57712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7393:1599, owner: FadeOutLottieAnimation.onAnimationFinish, offset: 0x016b4297, size: 42 bytes, params: 2, frame: 12
if (onComplete != null) {
onComplete(a0);
}
env0_2(true);
}
function TT_57711(a0) { // fn#57711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7393:1152, owner: FadeOutLottieAnimation.T.t, offset: 0x016b425c, size: 59 bytes, params: 2, frame: 12
var value;
var runOnJS;
var value2;
if (a0) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
value = Reflect.apply(runOnJS, value, [env1_4]);
value(false);
}
}
global.__d(_fun57706, 7215, [57, 31, 4502, 33, 4501, 566, 4017, 4504, 6760,
2]) /* metro module 7215, dependencies: [57, 31, 4502, 33, 4501, 566, 4017, 4504, 6760, 2] */;
@@ -1,32 +1,37 @@
/* Metro module 8573; source: modules/messages/native/burst_reactions/SuperReactionLocalImageAnimation.tsx; dependencies: [31, 33, 7172, 7215, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as BurstReactionEffectUtilsModule from './BurstReactionEffectUtils.tsx'; /* Metro dependency 7172 */
function _fun67838(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8758:6, offset: 0x01c33ca0, size: 138 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_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/burst_reactions/SuperReactionLocalImageAnimation.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/burst_reactions/SuperReactionLocalImageAnimation.tsx');
exports.default = SuperReactionLocalImageAnimation;
}
function SuperReactionLocalImageAnimation(a0) { // fn#67839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8758:238, offset: 0x01c33d2a, size: 154 bytes, params: 2, frame: 19
var r0;
const localImageSource = a0.localImageSource;
const animationSource = a0.animationSource;
let value = null;
const value2 = Object.create(value);
value2.localImageSource = 0;
value2.animationSource = 0;
const value3 = copyDataProperties({}, a0, value2, animationSource);
const value5 = (require(7172) /* metro dependency 7172: BurstReactionEffectUtils */).useSuperReactionAnimationSourceFromLocalImage({animationSource: animationSource,
localImageSource: localImageSource});
if (value == value5) {
r0 = value;
} else {
value = importDefault(7215) /* metro dependency 7215: FadeOutLottieAnimation */;
value = ((Component) => <Component loop source={value5} {...value3} />)(value);
r0 = value;
function SuperReactionLocalImageAnimation(a0) { // fn#67839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8758:238, offset: 0x01c33d2a, size: 154 bytes, params: 2, frame: 19
var r0;
const localImageSource = a0.localImageSource;
const animationSource = a0.animationSource;
let value = null;
const value2 = Object.create(value);
value2.localImageSource = 0;
value2.animationSource = 0;
const value3 = copyDataProperties({}, a0, value2, animationSource);
const value5 = (BurstReactionEffectUtilsModule).useSuperReactionAnimationSourceFromLocalImage({animationSource: animationSource,
localImageSource: localImageSource});
if (value == value5) {
r0 = value;
} else {
value = importDefault(7215) /* metro dependency 7215: FadeOutLottieAnimation */;
value = ((Component) => <Component loop source={value5} {...value3} />)(value);
r0 = value;
}
return r0;
}
return r0;
}
global.__d(_fun67838, 8573, [31, 33, 7172, 7215, 2]) /* metro module 8573, dependencies: [31, 33, 7172, 7215, 2] */;
@@ -1,16 +1,28 @@
/* Metro module 8565; source: modules/messages/native/burst_reactions/SuperReactionUpsellActionSheet.tsx; dependencies: [31, 27, 1878, 661, 33, 1365, 8566, 8567, 8568, 8569, 8570, 8571, 8572, 4501, 697, 6771, 566, 3802, 5080, 7028, 1962, 7940, 22, 8573, 7183, 8574, 1244, 7172, 1305, 4080, 2] */
import Module00022 from '../../../../by-id/module-00022.js'; /* Metro dependency 22 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import UseAnalyticsLocations from '../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import SuperReactionLocalImageAnimation from './SuperReactionLocalImageAnimation.tsx'; /* Metro dependency 8573 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as Dismissible_contentModule from '../../../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/dismissible_content.tsx'; /* Metro dependency 1365 */
import * as PremiumUtilsModule from '../../../../utils/PremiumUtils.tsx'; /* Metro dependency 3802 */
import * as Module07183Module from '../../../../by-id/module-07183.js'; /* Metro dependency 7183 */
function _fun67825(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8750:6, offset: 0x01c3354a, size: 523 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 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const StyleSheet = value.StyleSheet;
const env0_4 = value.View;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).AnalyticsPages;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
const env0_8 = DismissibleContent.SUPER_REACTIONS_COACHMARK_MOBILE;
object = [require(8566) /* metro dependency 8566 */, require(8567) /* metro dependency 8567 */,
require(8568) /* metro dependency 8568 */, require(8569) /* metro dependency 8569 */,
@@ -19,90 +31,92 @@ function _fun67825(global, require, importDefault, importAll, module, exports, d
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object = {};
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
object3['flex'] = 1;
object3['alignItems'] = 'center';
object3['justifyContent'] = 'center';
object3['top'] = -150;
object.fill = object3;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
object2['flex'] = 1;
object2['alignItems'] = 'center';
object2['justifyContent'] = 'center';
object2['top'] = -150;
object.fill = object2;
const WHITE = (Native).colors.WHITE;
object.nitroIcon = {'tintColor': null, 'width': 32, 'height': 32, 'marginVertical': -8, 'marginRight': -4,
tintColor: WHITE};
object.description = {paddingHorizontal: 16};
const env0_10 = Reflect.apply(createStyles, value, [object]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/burst_reactions/SuperReactionUpsellActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/burst_reactions/SuperReactionUpsellActionSheet.tsx');
exports.default = SuperReactionCoachmarkActionSheet;
}
function SuperReactionCoachmarkActionSheet({onDismiss}) { // fn#67826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8750:690, offset: 0x01c33755, size: 512 bytes, params: 2, frame: 25
var r0;
var PremiumUpsellTooltipActionSheet;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var object;
const styles = useStyles();
const env0_1 = (UseAnalyticsLocations)().analyticsLocations;
const object2 = {};
const PREMIUM_UPSELL_BURST_REACTIONS = AnalyticsPages.PREMIUM_UPSELL_BURST_REACTIONS;
object2.page = PREMIUM_UPSELL_BURST_REACTIONS;
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const isPremium2 = (PremiumUtilsModule).isPremium(currentUser);
const useMemo = ReactModule.useMemo;
if (isPremium2) {
r0 = null;
} else {
PremiumUpsellTooltipActionSheet = importDefault(8574) /* metro dependency 8574: PremiumUpsellTooltipActionSheet */;
var premiumUpsellTooltipActionSheetProps = {title: intl.string(t.Wfl5zp)};
object = {};
object.backdropOpacity = (require(7172) /* metro dependency 7172: BurstReactionEffectUtils */).BACKDROP_OPACITY;
object.backdropChildren = Reflect.apply(useMemo, ReactModule, [_fun67828, [styles]]);
premiumUpsellTooltipActionSheetProps.backdropProps = object;
premiumUpsellTooltipActionSheetProps.description = intl.string(t.eikz43);
premiumUpsellTooltipActionSheetProps.descriptionStyle = styles.description;
premiumUpsellTooltipActionSheetProps.dismissibleContent = SUPER_REACTIONS_COACHMARK_MOBILE;
premiumUpsellTooltipActionSheetProps.primaryButtonText = intl.string(t.sEAnVH);
premiumUpsellTooltipActionSheetProps.primaryButtonIcon = primaryButtonIcon;
premiumUpsellTooltipActionSheetProps.onPrimaryButtonPress = onPrimaryButtonPress;
premiumUpsellTooltipActionSheetProps.secondaryButtonText = intl.string(t.TulDPl);
premiumUpsellTooltipActionSheetProps.onDismiss = onDismiss;
r0 = <PremiumUpsellTooltipActionSheet {...premiumUpsellTooltipActionSheetProps} />;
}
return r0;
function _fun67828() { // fn#67828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8750:929, offset: 0x01c33955, size: 144 bytes, params: 1, frame: 18
const binding = env1_9;
const defaultImport = Module00022;
return (
<View style={styles.fill}>
{((Component) => <Component localImageSource={binding[defaultImport.random(0,
binding.length - 1)]} animationSource={Module07183Module} />)(SuperReactionLocalImageAnimation)}
</View>
);
}
function primaryButtonIcon() { // fn#67829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8750:1403, owner: SuperReactionCoachmarkActionSheet.primaryButtonIcon, offset: 0x01c339e5, size: 62 bytes, params: 1, frame: 14
const NitroWheel = (NativeModule).NitroWheel;
return <NitroWheel style={styles.nitroIcon} />;
}
function onPrimaryButtonPress() { // fn#67830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8750:1471, owner: SuperReactionCoachmarkActionSheet.onPrimaryButtonPress, offset: 0x01c33a23, size: 147 bytes, params: 1, frame: 18
let value = environment.__proto__;
importDefault(dependencyMap[29]).hideActionSheet();
const defaultImport2 = importDefault(dependencyMap[18]);
const pushLazy = defaultImport2.pushLazy;
value = require(dependencyMap[20]);
value = value(dependencyMap[19], dependencyMap.paths);
const object = {};
object.analyticsLocation = env0_2;
object.analyticsLocations = analyticsLocations;
const PremiumFeatureCardOrder = require(dependencyMap[21]).PremiumFeatureCardOrder;
const TIER_2_LEADING = PremiumFeatureCardOrder.TIER_2_LEADING;
object.premiumFeatureCardOrder = TIER_2_LEADING;
Reflect.apply(pushLazy, defaultImport2, [value, object]);
}
function SuperReactionCoachmarkActionSheet({onDismiss}) { // fn#67826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8750:690, offset: 0x01c33755, size: 512 bytes, params: 2, frame: 25
var r0;
var PremiumUpsellTooltipActionSheet;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var object3;
const styles = useStyles();
const env0_1 = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const object4 = {};
const PREMIUM_UPSELL_BURST_REACTIONS = AnalyticsPages.PREMIUM_UPSELL_BURST_REACTIONS;
object4.page = PREMIUM_UPSELL_BURST_REACTIONS;
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const isPremium2 = (require(3802) /* metro dependency 3802: PremiumUtils */).isPremium(currentUser);
const binding = env0_3;
const useMemo = binding.useMemo;
if (isPremium2) {
r0 = null;
} else {
PremiumUpsellTooltipActionSheet = importDefault(8574) /* metro dependency 8574: PremiumUpsellTooltipActionSheet */;
var premiumUpsellTooltipActionSheetProps = {title: intl.string(t.Wfl5zp)};
object3 = {};
object3.backdropOpacity = (require(7172) /* metro dependency 7172: BurstReactionEffectUtils */).BACKDROP_OPACITY;
object3.backdropChildren = Reflect.apply(useMemo, binding, [_fun67828, [styles]]);
premiumUpsellTooltipActionSheetProps.backdropProps = object3;
premiumUpsellTooltipActionSheetProps.description = intl.string(t.eikz43);
premiumUpsellTooltipActionSheetProps.descriptionStyle = styles.description;
premiumUpsellTooltipActionSheetProps.dismissibleContent = SUPER_REACTIONS_COACHMARK_MOBILE;
premiumUpsellTooltipActionSheetProps.primaryButtonText = intl.string(t.sEAnVH);
premiumUpsellTooltipActionSheetProps.primaryButtonIcon = primaryButtonIcon;
premiumUpsellTooltipActionSheetProps.onPrimaryButtonPress = onPrimaryButtonPress;
premiumUpsellTooltipActionSheetProps.secondaryButtonText = intl.string(t.TulDPl);
premiumUpsellTooltipActionSheetProps.onDismiss = onDismiss;
r0 = <PremiumUpsellTooltipActionSheet {...premiumUpsellTooltipActionSheetProps} />;
}
return r0;
}
function _fun67828() { // fn#67828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8750:929, offset: 0x01c33955, size: 144 bytes, params: 1, frame: 18
const binding = env1_9;
const defaultImport = importDefault(22) /* metro dependency 22 */;
return (
<View style={styles.fill}>
{((Component) => <Component localImageSource={binding[defaultImport.random(0,
binding.length - 1)]} animationSource={require(7183) /* metro dependency 7183 */} />)(importDefault(8573) /* metro dependency 8573: SuperReactionLocalImageAnimation */)}
</View>
);
}
function primaryButtonIcon() { // fn#67829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8750:1403, owner: SuperReactionCoachmarkActionSheet.primaryButtonIcon, offset: 0x01c339e5, size: 62 bytes, params: 1, frame: 14
const NitroWheel = (require(1305) /* metro dependency 1305: native */).NitroWheel;
return <NitroWheel style={styles.nitroIcon} />;
}
function onPrimaryButtonPress() { // fn#67830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8750:1471, owner: SuperReactionCoachmarkActionSheet.onPrimaryButtonPress, offset: 0x01c33a23, size: 147 bytes, params: 1, frame: 18
let value = environment.__proto__;
importDefault(dependencyMap[29]).hideActionSheet();
const defaultImport2 = importDefault(dependencyMap[18]);
const pushLazy = defaultImport2.pushLazy;
value = require(dependencyMap[20]);
value = value(dependencyMap[19], dependencyMap.paths);
const object2 = {};
object2.analyticsLocation = env0_2;
object2.analyticsLocations = analyticsLocations;
const PremiumFeatureCardOrder = require(dependencyMap[21]).PremiumFeatureCardOrder;
const TIER_2_LEADING = PremiumFeatureCardOrder.TIER_2_LEADING;
object2.premiumFeatureCardOrder = TIER_2_LEADING;
Reflect.apply(pushLazy, defaultImport2, [value, object2]);
}
global.__d(_fun67825, 8565, [31, 27, 1878, 661, 33, 1365, 8566, 8567, 8568, 8569, 8570, 8571, 8572, 4501, 697, 6771,
566, 3802, 5080, 7028, 1962, 7940, 22, 8573, 7183, 8574, 1244, 7172, 1305, 4080,
2]) /* metro module 8565, dependencies: [31, 27, 1878, 661, 33, 1365, 8566, 8567, 8568, 8569, 8570, 8571, 8572, 4501, 697, 6771, 566, 3802, 5080, 7028, 1962, 7940, 22, 8573, 7183, 8574, 1244, 7172, 1305, 4080, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,16 +1,36 @@
/* Metro module 8631; source: modules/messages/native/emoji/CustomEmojiContent.tsx; dependencies: [31, 27, 6541, 3969, 1878, 661, 33, 4501, 697, 3802, 683, 5080, 7028, 1962, 4080, 8625, 566, 6771, 3800, 6545, 3777, 8533, 6796, 3829, 8632, 7007, 8626, 8633, 8635, 4573, 1244, 8629, 3857, 8637, 8638, 1305, 4578, 5475, 8640, 7972, 8641, 8645, 2] */
import AnalyticsUtils from '../../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import PremiumUtils from '../../../../utils/PremiumUtils.tsx'; /* Metro dependency 3802 */
import SelectedGuildStore from '../../../../stores/SelectedGuildStore.tsx'; /* Metro dependency 3969 */
import FastImage from '../../../../components_native/common/FastImage.tsx'; /* Metro dependency 5475 */
import SubscriptionRoleStore from '../../../guild_role_subscriptions/SubscriptionRoleStore.tsx'; /* Metro dependency 6541 */
import UseAnalyticsLocations from '../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import TidaWebformExperiment from '../../../guild/TidaWebformExperiment.tsx'; /* Metro dependency 6796 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as UserSettingsModule from '../../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as OpenUserSettingsModule from '../../../user_settings/core/native/openUserSettings.tsx'; /* Metro dependency 7007 */
import * as EmojiPickerUtilsModule from '../../../emoji_picker/EmojiPickerUtils.tsx'; /* Metro dependency 8533 */
import * as UseSharedMessageEmojiStylesModule from './useSharedMessageEmojiStyles.tsx'; /* Metro dependency 8625 */
import * as EmojiActionCreatorsModule from '../../../../actions/EmojiActionCreators.tsx'; /* Metro dependency 8629 */
import * as GetEmojiPopoutMessageModule from '../../getEmojiPopoutMessage.tsx'; /* Metro dependency 8632 */
import * as StarOutlineIconModule from '../../../../design/components/Icon/native/redesign/generated/StarOutlineIcon.tsx'; /* Metro dependency 8635 */
import * as GuildUtilsModule from '../../../guild/GuildUtils.tsx'; /* Metro dependency 8640 */
function _fun68107(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:6, offset: 0x01c3ec6f, size: 687 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.Pressable;
const env0_6 = value.View;
const subscriptionRoleStore = importDefault(6541) /* metro dependency 6541: SubscriptionRoleStore */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
value = require(661) /* metro dependency 661: Constants */;
const env0_10 = value.UserSettingsSections;
const env0_11 = value.AnalyticEvents;
@@ -22,398 +42,480 @@ function _fun68107(global, require, importDefault, importAll, module, exports, d
const env0_16 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {nitroWheel: {'height': 32, 'width': 32}};
const CONTROL_BRAND_FOREGROUND_NEW = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_BRAND_FOREGROUND_NEW;
object2.nitroWheelPurple = {tintColor: CONTROL_BRAND_FOREGROUND_NEW};
object2.emojiDescriptionWrapperOuter = {'flexDirection': 'row', 'flex': 1, 'alignItems': 'center', 'gap': 8};
object2.starIcon = {'height': 32, 'width': 32, 'margin': 0, 'padding': 0, 'flex': 0};
const ICON_FEEDBACK_WARNING = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_WARNING;
object2.starIconSelected = {tintColor: ICON_FEEDBACK_WARNING};
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object2.starIconUnselected = {tintColor: INTERACTIVE_TEXT_DEFAULT};
const INTERACTIVE_ICON_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_ICON_DEFAULT;
object2.moreMenuIcon = {'height': 32, 'width': 32, 'justifyContent': 'center', 'alignItems': 'center',
object = {nitroWheel: {'height': 32, 'width': 32}};
const CONTROL_BRAND_FOREGROUND_NEW = (Native).colors.CONTROL_BRAND_FOREGROUND_NEW;
object.nitroWheelPurple = {tintColor: CONTROL_BRAND_FOREGROUND_NEW};
object.emojiDescriptionWrapperOuter = {'flexDirection': 'row', 'flex': 1, 'alignItems': 'center', 'gap': 8};
object.starIcon = {'height': 32, 'width': 32, 'margin': 0, 'padding': 0, 'flex': 0};
const ICON_FEEDBACK_WARNING = (Native).colors.ICON_FEEDBACK_WARNING;
object.starIconSelected = {tintColor: ICON_FEEDBACK_WARNING};
const INTERACTIVE_TEXT_DEFAULT = (Native).colors.INTERACTIVE_TEXT_DEFAULT;
object.starIconUnselected = {tintColor: INTERACTIVE_TEXT_DEFAULT};
const INTERACTIVE_ICON_DEFAULT = (Native).colors.INTERACTIVE_ICON_DEFAULT;
object.moreMenuIcon = {'height': 32, 'width': 32, 'justifyContent': 'center', 'alignItems': 'center',
color: INTERACTIVE_ICON_DEFAULT};
object2.bottomCtaButton = {marginTop: 24};
object2.ctaDescriptionWrapper = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center',
object.bottomCtaButton = {marginTop: 24};
object.ctaDescriptionWrapper = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center',
'justifyContent': 'flex-start', 'marginTop': 8};
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object2.betaTag = {backgroundColor: WHITE};
const BRAND_530 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_530;
object2.betaTagTextAddPack = {color: BRAND_530};
const PRIMARY_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_500;
object2.betaTagTextRemovePack = {color: PRIMARY_500};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.favoriteButtonContainer = {paddingTop: PX_4};
const env0_17 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/emoji/CustomEmojiContent.tsx');
const WHITE = (Native).colors.WHITE;
object.betaTag = {backgroundColor: WHITE};
const BRAND_530 = (Native).unsafe_rawColors.BRAND_530;
object.betaTagTextAddPack = {color: BRAND_530};
const PRIMARY_500 = (Native).unsafe_rawColors.PRIMARY_500;
object.betaTagTextRemovePack = {color: PRIMARY_500};
const PX_4 = (Native).space.PX_4;
object.favoriteButtonContainer = {paddingTop: PX_4};
const env0_17 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/emoji/CustomEmojiContent.tsx');
exports.default = _default_68108;
}
function _default_68108({emojiNode, sourceType, expressionSourceApplication, expressionSourceGuild, customEmojiFromJoinedGuild, hasJoinedEmojiSourceGuild, nonce}) { // fn#68108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:1227, offset: 0x01c3ef1e, size: 2595 bytes, params: 2, frame: 49
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var r19;
var r32;
var r27;
var r5;
var r16;
var moduleValue4;
var object2;
var StarOutlineIcon;
var object3;
var StarIcon;
var object5;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
var jsxRuntimeEnv0_16Binding2;
var items9;
var jsxRuntimeEnv0_16Binding3;
var items11;
const _default_68108CloseActionSheet = function() {
importDefault(dependencyMap[14]).hideActionSheet();
var defaultImport2 = importDefault(dependencyMap[10]);
var CLOSE_POPOUT = AnalyticEvents.CLOSE_POPOUT;
defaultImport2.track(CLOSE_POPOUT, {nonce: nonce});
};
let object6 = {};
const styles = useStyles();
copyDataProperties(object6, styles, undefined);
const useSharedMessageEmojiStylesModule = require(8625) /* metro dependency 8625: useSharedMessageEmojiStyles */;
const useSharedMessageEmojiStyles = useSharedMessageEmojiStylesModule.useSharedMessageEmojiStyles;
copyDataProperties(object6, Reflect.apply(useSharedMessageEmojiStyles, useSharedMessageEmojiStylesModule, []),
undefined);
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const isPremium2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).isPremium(currentUser);
const guildId2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedGuildStore],
function() {
return SelectedGuildStore.getGuildId();
});
const r15 = guildId2 != null && guildId2 === expressionSourceGuild?.id;
const env0_8 = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const {isRoleSubscriptionEmoji, isUnusableRoleSubscriptionEmoji, userIsRoleSubscriber} = env0_4.useMemo(_fun68112,
[customEmojiFromJoinedGuild, guildId2]);
const value7 = !isUnusableRoleSubscriptionEmoji;
let r1 = isUnusableRoleSubscriptionEmoji ? customEmojiFromJoinedGuild?.type !== (require(3800) /* metro dependency 3800: EmojiTypes */).EmojiTypes.GUILD : value7;
if (r1) {
r19 = !r1;
} else {
moduleValue4 = require(3777) /* metro dependency 3777: CreatorMonetizationRestrictionsUtils */;
r19 = moduleValue4.shouldHideGuildPurchaseEntryPoints(customEmojiFromJoinedGuild?.guildId);
}
const value10 = (require(8533) /* metro dependency 8533: EmojiPickerUtils */).useIsFavoriteEmoji(guildId2,
customEmojiFromJoinedGuild);
let defaultImport2 = importDefault(6796) /* metro dependency 6796: TidaWebformExperiment */;
const useExperiment = defaultImport2.useExperiment;
const tidaWebformEnabled = Reflect.apply(useExperiment, defaultImport2, [{location: 'CustomEmojiContent'},
{autoTrackExposure: false}]).tidaWebformEnabled;
const DeveloperMode = (require(3829) /* metro dependency 3829: UserSettings */).DeveloperMode;
const value11 = DeveloperMode.useSetting();
r1 = expressionSourceGuild?.isDiscoverable();
const r9 = r1 != null && r1;
const object8 = {};
object8.page = guildId2 != null ? AnalyticsPages.GUILD_CHANNEL : AnalyticsPages.DM_CHANNEL;
const EMOJI_UPSELL_POPOUT = AnalyticsSections.EMOJI_UPSELL_POPOUT;
object8.section = EMOJI_UPSELL_POPOUT;
const emojiPopoutData = (require(8632) /* metro dependency 8632: getEmojiPopoutMessage */).getEmojiPopoutData({sourceType: sourceType,
expressionSourceApplication: expressionSourceApplication, isPremium: isPremium2,
hasJoinedEmojiSourceGuild: hasJoinedEmojiSourceGuild, isRoleSubscriptionEmoji: isRoleSubscriptionEmoji,
isUnusableRoleSubscriptionEmoji: isUnusableRoleSubscriptionEmoji, userIsRoleSubscriber: userIsRoleSubscriber,
shouldHideRoleSubscriptionCTA: r19, emojiComesFromCurrentGuild: r15, isDiscoverable: r9,
onOpenPremiumSettings: onOpenPremiumSettings});
(require(8626) /* metro dependency 8626: useTrackOpenPopout */).useTrackOpenPopout({emojiId: emojiNode.id,
currentGuildId: guildId2, popoutData: emojiPopoutData, emojiSourceGuildId: expressionSourceGuild?.id,
nonce: nonce});
const emojiDescription = emojiPopoutData.emojiDescription;
const type = emojiPopoutData.type;
const closure = onPress_68115;
const r8 = isUnusableRoleSubscriptionEmoji ? value7 : hasJoinedEmojiSourceGuild;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r25 = hasJoinedEmojiSourceGuild ? Reflect.apply(string, intl, [t.ohTzZH]) : Reflect.apply(string, intl,
[t['eLfh+a']]);
const EmojiPopoutType = (require(8632) /* metro dependency 8632: getEmojiPopoutMessage */).EmojiPopoutType;
let JOIN_GUILD = EmojiPopoutType.JOIN_GUILD;
const value16 = type === JOIN_GUILD;
const object9 = {};
let GET_PREMIUM = EmojiPopoutType.GET_PREMIUM;
const items4 = [GET_PREMIUM];
JOIN_GUILD = EmojiPopoutType.JOIN_GUILD;
items4[1] = JOIN_GUILD;
copyDataProperties(object9, items4.includes(type) ? object6.ctaButton : object6.bottomCtaButton, undefined);
object9['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.xl;
const jsxRuntimeEnv0_16Binding = jsxRuntimeEnv0_16;
const object11 = {};
copyDataProperties(object11, object6.emojiContainer, undefined);
object11['marginTop'] = 8;
const value17 = ((Component) => <Component style={object6.emojiIcon} source={{uri: emojiNode.src}} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
const emojiDescriptionWrapperOuter = object6.emojiDescriptionWrapperOuter;
const items7 = [<View style={object6.emojiDescriptionWrapper}><Text variant="text-md/bold" color="mobile-text-heading-primary">{':' + emojiNode.alt + ':'}</Text>{emojiDescription != null && <Text variant="text-sm/medium">{emojiDescription}</Text>}</View>];
if (r8) {
if (tidaWebformEnabled) {
r27 = null;
function _default_68108({emojiNode, sourceType, expressionSourceApplication, expressionSourceGuild, customEmojiFromJoinedGuild, hasJoinedEmojiSourceGuild, nonce}) { // fn#68108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:1227, offset: 0x01c3ef1e, size: 2595 bytes, params: 2, frame: 49
const Text = (TextModule).Text;
var r19;
var r32;
var r27;
var r5;
var r16;
var moduleValue4;
var object;
var StarOutlineIcon;
var object4;
var StarIcon;
var object7;
const Button = (ButtonNativeModule).Button;
var jsxRuntimeEnv0_16Binding2;
var items9;
var jsxRuntimeEnv0_16Binding3;
var items11;
const _default_68108CloseActionSheet = function() {
importDefault(dependencyMap[14]).hideActionSheet();
var defaultImport2 = importDefault(dependencyMap[10]);
var CLOSE_POPOUT = AnalyticEvents.CLOSE_POPOUT;
defaultImport2.track(CLOSE_POPOUT, {nonce: nonce});
};
let object10 = {};
const styles = useStyles();
copyDataProperties(object10, styles, undefined);
const useSharedMessageEmojiStyles = UseSharedMessageEmojiStylesModule.useSharedMessageEmojiStyles;
copyDataProperties(object10, Reflect.apply(useSharedMessageEmojiStyles, UseSharedMessageEmojiStylesModule, []),
undefined);
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const isPremium2 = (PremiumUtils).isPremium(currentUser);
const guildId2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedGuildStore],
function() {
return SelectedGuildStore.getGuildId();
});
const r15 = guildId2 != null && guildId2 === expressionSourceGuild?.id;
const env0_8 = (UseAnalyticsLocations)().analyticsLocations;
const {isRoleSubscriptionEmoji, isUnusableRoleSubscriptionEmoji, userIsRoleSubscriber} = ReactModule.useMemo(_fun68112,
[customEmojiFromJoinedGuild, guildId2]);
const value7 = !isUnusableRoleSubscriptionEmoji;
let r1 = isUnusableRoleSubscriptionEmoji ? customEmojiFromJoinedGuild?.type !== (require(3800) /* metro dependency 3800: EmojiTypes */).EmojiTypes.GUILD : value7;
if (r1) {
r19 = !r1;
} else {
object2 = {};
string = intl.string;
r32 = value10 ? Reflect.apply(string, intl, [t.aBUcp3]) : Reflect.apply(string, intl, [t.yZFibY]);
object2.accessibilityLabel = r32;
object2.style = object6.moreMenuIcon;
object2.onPress = closure;
if (value10) {
StarIcon = (require(8633) /* metro dependency 8633: StarIcon */).StarIcon;
object5 = {};
copyDataProperties(object5, object6.starIcon, undefined);
copyDataProperties(object5, object6.starIconSelected, undefined);
r32 = <StarIcon style={object5} />;
moduleValue4 = require(3777) /* metro dependency 3777: CreatorMonetizationRestrictionsUtils */;
r19 = moduleValue4.shouldHideGuildPurchaseEntryPoints(customEmojiFromJoinedGuild?.guildId);
}
const value10 = (EmojiPickerUtilsModule).useIsFavoriteEmoji(guildId2,
customEmojiFromJoinedGuild);
let defaultImport2 = TidaWebformExperiment;
const useExperiment = defaultImport2.useExperiment;
const tidaWebformEnabled = Reflect.apply(useExperiment, defaultImport2, [{location: 'CustomEmojiContent'},
{autoTrackExposure: false}]).tidaWebformEnabled;
const DeveloperMode = (UserSettingsModule).DeveloperMode;
const value11 = DeveloperMode.useSetting();
r1 = expressionSourceGuild?.isDiscoverable();
const r9 = r1 != null && r1;
const object12 = {};
object12.page = guildId2 != null ? AnalyticsPages.GUILD_CHANNEL : AnalyticsPages.DM_CHANNEL;
const EMOJI_UPSELL_POPOUT = AnalyticsSections.EMOJI_UPSELL_POPOUT;
object12.section = EMOJI_UPSELL_POPOUT;
const emojiPopoutData = (GetEmojiPopoutMessageModule).getEmojiPopoutData({sourceType: sourceType,
expressionSourceApplication: expressionSourceApplication, isPremium: isPremium2,
hasJoinedEmojiSourceGuild: hasJoinedEmojiSourceGuild, isRoleSubscriptionEmoji: isRoleSubscriptionEmoji,
isUnusableRoleSubscriptionEmoji: isUnusableRoleSubscriptionEmoji, userIsRoleSubscriber: userIsRoleSubscriber,
shouldHideRoleSubscriptionCTA: r19, emojiComesFromCurrentGuild: r15, isDiscoverable: r9,
onOpenPremiumSettings: onOpenPremiumSettings});
(require(8626) /* metro dependency 8626: useTrackOpenPopout */).useTrackOpenPopout({emojiId: emojiNode.id,
currentGuildId: guildId2, popoutData: emojiPopoutData, emojiSourceGuildId: expressionSourceGuild?.id,
nonce: nonce});
const emojiDescription = emojiPopoutData.emojiDescription;
const type = emojiPopoutData.type;
const onPress_681152 = onPress_68115;
const r8 = isUnusableRoleSubscriptionEmoji ? value7 : hasJoinedEmojiSourceGuild;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r25 = hasJoinedEmojiSourceGuild ? Reflect.apply(string, intl, [t.ohTzZH]) : Reflect.apply(string, intl,
[t['eLfh+a']]);
const EmojiPopoutType = (GetEmojiPopoutMessageModule).EmojiPopoutType;
let JOIN_GUILD = EmojiPopoutType.JOIN_GUILD;
const value16 = type === JOIN_GUILD;
const object13 = {};
let GET_PREMIUM = EmojiPopoutType.GET_PREMIUM;
const items4 = [GET_PREMIUM];
JOIN_GUILD = EmojiPopoutType.JOIN_GUILD;
items4[1] = JOIN_GUILD;
copyDataProperties(object13, items4.includes(type) ? object10.ctaButton : object10.bottomCtaButton, undefined);
object13['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.xl;
const jsxRuntimeEnv0_16Binding = jsxRuntimeEnv0_16;
const object14 = {};
copyDataProperties(object14, object10.emojiContainer, undefined);
object14['marginTop'] = 8;
const value17 = ((Component) => <Component style={object10.emojiIcon} source={{uri: emojiNode.src}} />)(FastImage);
const emojiDescriptionWrapperOuter = object10.emojiDescriptionWrapperOuter;
const items7 = [
<View style={object10.emojiDescriptionWrapper}>
<Text variant="text-md/bold" color="mobile-text-heading-primary">
{':' + emojiNode.alt + ':'}
</Text>
{emojiDescription != null && <Text variant="text-sm/medium">{emojiDescription}</Text>}
</View>,
];
if (r8) {
if (tidaWebformEnabled) {
r27 = null;
} else {
StarOutlineIcon = (require(8635) /* metro dependency 8635: StarOutlineIcon */).StarOutlineIcon;
object3 = {};
copyDataProperties(object3, object6.starIconUnselected, copyDataProperties(object3, object6.starIcon,
undefined));
r32 = <StarOutlineIcon style={object3} />;
object = {};
string = intl.string;
r32 = value10 ? Reflect.apply(string, intl, [t.aBUcp3]) : Reflect.apply(string, intl, [t.yZFibY]);
object.accessibilityLabel = r32;
object.style = object10.moreMenuIcon;
object.onPress = onPress_681152;
if (value10) {
StarIcon = (require(8633) /* metro dependency 8633: StarIcon */).StarIcon;
object7 = {};
copyDataProperties(object7, object10.starIcon, undefined);
copyDataProperties(object7, object10.starIconSelected, undefined);
r32 = <StarIcon style={object7} />;
} else {
StarOutlineIcon = (require(8635) /* metro dependency 8635: StarOutlineIcon */).StarOutlineIcon;
object4 = {};
copyDataProperties(object4, object10.starIconUnselected, copyDataProperties(object4, object10.starIcon,
undefined));
r32 = <StarOutlineIcon style={object4} />;
}
r27 = (
<Pressable {...object}>
{r32}
</Pressable>
);
}
r27 = <Pressable {...object2}>{r32}</Pressable>;
}
} else {
r27 = null;
}
items7[1] = r27;
items7[2] = tidaWebformEnabled && value11 ? <Pressable accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PdRCRg)} style={object6.moreMenuIcon} onPress={onPress_68119}>{((MoreHorizontalIcon) => <MoreHorizontalIcon color={(importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT} />)((require(8638) /* metro dependency 8638: MoreHorizontalIcon */).MoreHorizontalIcon)}</Pressable> : null;
const items8 = [<View style={object11}>{value17}<View style={emojiDescriptionWrapperOuter}>{items7}</View></View>];
GET_PREMIUM = EmojiPopoutType.GET_PREMIUM;
items8[1] = type === GET_PREMIUM ? renderPremiumUpsellButton() : value16 ? <View style={object9}><Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.riu2R5)} size="md" grow onPress={onPress_68123} /></View> : null;
if (hasJoinedEmojiSourceGuild) {
if (expressionSourceGuild == null) {
r5 = null;
} else {
jsxRuntimeEnv0_16Binding2 = jsxRuntimeEnv0_16;
items9 = [((FormDivider) => <FormDivider style={object6.divider} />)((require(7972) /* metro dependency 7972: native */).FormDivider)];
items9[1] = ((Component) => <Component guild={expressionSourceGuild} hasJoinedGuild={hasJoinedEmojiSourceGuild} title={r25} showingJoinGuildCta={value16} />)(importDefault(8641) /* metro dependency 8641: ExpressionGuildDetails */);
items9[2] = !hasJoinedEmojiSourceGuild && ((EmojiGrid) => <EmojiGrid expressionSourceGuild={expressionSourceGuild} doNotDisplayEmojiIds={[emojiNode.id]} />)((require(8645) /* metro dependency 8645: EmojiGrid */).EmojiGrid);
r5 = <>{items9}</>;
r27 = null;
}
} else if (r9) {
if (expressionSourceGuild == null) {
r5 = null;
} else {
jsxRuntimeEnv0_16Binding2 = jsxRuntimeEnv0_16;
items9 = [((FormDivider) => <FormDivider style={object6.divider} />)((require(7972) /* metro dependency 7972: native */).FormDivider)];
items9[1] = ((Component) => <Component guild={expressionSourceGuild} hasJoinedGuild={hasJoinedEmojiSourceGuild} title={r25} showingJoinGuildCta={value16} />)(importDefault(8641) /* metro dependency 8641: ExpressionGuildDetails */);
items9[2] = !hasJoinedEmojiSourceGuild && ((EmojiGrid) => <EmojiGrid expressionSourceGuild={expressionSourceGuild} doNotDisplayEmojiIds={[emojiNode.id]} />)((require(8645) /* metro dependency 8645: EmojiGrid */).EmojiGrid);
r5 = <>{items9}</>;
}
} else {
r5 = null;
}
items8[2] = r5;
if (r8) {
if (tidaWebformEnabled) {
jsxRuntimeEnv0_16Binding3 = jsxRuntimeEnv0_16;
items11 = [((FormDivider) => <FormDivider style={object6.divider} />)((require(7972) /* metro dependency 7972: native */).FormDivider)];
var viewBindingProps = {style: object6.favoriteButtonContainer};
object6 = {};
string = intl.string;
r16 = value10 ? Reflect.apply(string, intl, [t.Ay49KA]) : Reflect.apply(string, intl, [t.nNsr67]);
object6.text = r16;
r16 = value10 ? 'tertiary' : 'primary';
object6.variant = r16;
object6.size = 'md';
object6.onPress = closure;
items11[1] = <View {...viewBindingProps}><Button {...object6} /></View>;
r5 = <>{items11}</>;
items7[1] = r27;
items7[2] = (
tidaWebformEnabled && value11
? (
<Pressable
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PdRCRg)}
style={object10.moreMenuIcon}
onPress={onPress_68119}
>
{((MoreHorizontalIcon) => <MoreHorizontalIcon color={(importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT} />)((require(8638) /* metro dependency 8638: MoreHorizontalIcon */).MoreHorizontalIcon)}
</Pressable>
)
: null
);
const items8 = [
<View style={object14}>
{value17}
<View style={emojiDescriptionWrapperOuter}>
{items7}
</View>
</View>,
];
GET_PREMIUM = EmojiPopoutType.GET_PREMIUM;
items8[1] = (
type === GET_PREMIUM
? renderPremiumUpsellButton()
: (
value16
? (
<View style={object13}>
<Button
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.riu2R5)}
size="md"
grow
onPress={onPress_68123}
/>
</View>
)
: null
)
);
if (hasJoinedEmojiSourceGuild) {
if (expressionSourceGuild == null) {
r5 = null;
} else {
jsxRuntimeEnv0_16Binding2 = jsxRuntimeEnv0_16;
const FormDivider = (require(7972) /* metro dependency 7972: native */).FormDivider;
items9 = [
<FormDivider style={object10.divider} />,
];
items9[1] = ((Component) => <Component guild={expressionSourceGuild} hasJoinedGuild={hasJoinedEmojiSourceGuild} title={r25} showingJoinGuildCta={value16} />)(importDefault(8641) /* metro dependency 8641: ExpressionGuildDetails */);
items9[2] = !hasJoinedEmojiSourceGuild && ((EmojiGrid) => <EmojiGrid expressionSourceGuild={expressionSourceGuild} doNotDisplayEmojiIds={[emojiNode.id]} />)((require(8645) /* metro dependency 8645: EmojiGrid */).EmojiGrid);
r5 = (
<>
{items9}
</>
);
}
} else if (r9) {
if (expressionSourceGuild == null) {
r5 = null;
} else {
jsxRuntimeEnv0_16Binding2 = jsxRuntimeEnv0_16;
const FormDivider2 = (require(7972) /* metro dependency 7972: native */).FormDivider;
items9 = [
<FormDivider2 style={object10.divider} />,
];
items9[1] = ((Component) => <Component guild={expressionSourceGuild} hasJoinedGuild={hasJoinedEmojiSourceGuild} title={r25} showingJoinGuildCta={value16} />)(importDefault(8641) /* metro dependency 8641: ExpressionGuildDetails */);
items9[2] = !hasJoinedEmojiSourceGuild && ((EmojiGrid) => <EmojiGrid expressionSourceGuild={expressionSourceGuild} doNotDisplayEmojiIds={[emojiNode.id]} />)((require(8645) /* metro dependency 8645: EmojiGrid */).EmojiGrid);
r5 = (
<>
{items9}
</>
);
}
} else {
r5 = null;
}
} else {
r5 = null;
}
items8[3] = r5;
return (
<>
{items8}
</>
);
}
function _fun68112() { // fn#68112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:1748, offset: 0x01c3f9a8, size: 212 bytes, params: 1, frame: 20
var r0;
var type;
var value2;
var object2;
var moduleValue;
var isPurchasableRoleSubscriptionEmoji;
var moduleValue2;
let customEmojiFromJoinedGuildBinding = customEmojiFromJoinedGuild;
if (customEmojiFromJoinedGuildBinding == null) {
r0 = {'isRoleSubscriptionEmoji': false, 'isUnusableRoleSubscriptionEmoji': false,
'userIsRoleSubscriber': false};
} else {
type = customEmojiFromJoinedGuild.type;
value2 = environment.__proto__;
if (type !== (require(3800) /* metro dependency 3800: EmojiTypes */).EmojiTypes.GUILD) {
r0 = {'isRoleSubscriptionEmoji': false, 'isUnusableRoleSubscriptionEmoji': false,
'userIsRoleSubscriber': false};
items8[2] = r5;
if (r8) {
if (tidaWebformEnabled) {
jsxRuntimeEnv0_16Binding3 = jsxRuntimeEnv0_16;
const FormDivider3 = (require(7972) /* metro dependency 7972: native */).FormDivider;
items11 = [
<FormDivider3 style={object10.divider} />,
];
var viewBindingProps = {style: object10.favoriteButtonContainer};
object10 = {};
string = intl.string;
r16 = value10 ? Reflect.apply(string, intl, [t.Ay49KA]) : Reflect.apply(string, intl, [t.nNsr67]);
object10.text = r16;
r16 = value10 ? 'tertiary' : 'primary';
object10.variant = r16;
object10.size = 'md';
object10.onPress = onPress_681152;
items11[1] = (
<View {...viewBindingProps}>
<Button {...object10} />
</View>
);
r5 = (
<>
{items11}
</>
);
} else {
r5 = null;
}
} else {
object2 = {};
moduleValue = importAll(6545) /* metro dependency 6545: RoleSubscriptionEmojiUtils */;
isPurchasableRoleSubscriptionEmoji = moduleValue.isPurchasableRoleSubscriptionEmoji;
customEmojiFromJoinedGuildBinding = customEmojiFromJoinedGuild;
object2.isRoleSubscriptionEmoji = Reflect.apply(isPurchasableRoleSubscriptionEmoji, moduleValue,
[customEmojiFromJoinedGuildBinding]);
moduleValue2 = importAll(6545) /* metro dependency 6545: RoleSubscriptionEmojiUtils */;
object2.isUnusableRoleSubscriptionEmoji = moduleValue2.isUnusableRoleSubscriptionEmoji(customEmojiFromJoinedGuildBinding,
guildId ?? undefined);
object2.userIsRoleSubscriber = SubscriptionRoleStore.getUserSubscriptionRoles(customEmojiFromJoinedGuild.guildId).size > 0;
r0 = object2;
r5 = null;
}
items8[3] = r5;
return (
<>
{items8}
</>
);
function _fun68112() { // fn#68112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:1748, offset: 0x01c3f9a8, size: 212 bytes, params: 1, frame: 20
var r0;
var type;
var value2;
var object;
var moduleValue;
var isPurchasableRoleSubscriptionEmoji;
var moduleValue2;
var subscriptionRoleStoreBinding;
let customEmojiFromJoinedGuildBinding = customEmojiFromJoinedGuild;
if (customEmojiFromJoinedGuildBinding == null) {
r0 = {'isRoleSubscriptionEmoji': false, 'isUnusableRoleSubscriptionEmoji': false,
'userIsRoleSubscriber': false};
} else {
type = customEmojiFromJoinedGuild.type;
value2 = environment.__proto__;
if (type !== (require(3800) /* metro dependency 3800: EmojiTypes */).EmojiTypes.GUILD) {
r0 = {'isRoleSubscriptionEmoji': false, 'isUnusableRoleSubscriptionEmoji': false,
'userIsRoleSubscriber': false};
} else {
object = {};
moduleValue = importAll(6545) /* metro dependency 6545: RoleSubscriptionEmojiUtils */;
isPurchasableRoleSubscriptionEmoji = moduleValue.isPurchasableRoleSubscriptionEmoji;
customEmojiFromJoinedGuildBinding = customEmojiFromJoinedGuild;
object.isRoleSubscriptionEmoji = Reflect.apply(isPurchasableRoleSubscriptionEmoji, moduleValue,
[customEmojiFromJoinedGuildBinding]);
moduleValue2 = importAll(6545) /* metro dependency 6545: RoleSubscriptionEmojiUtils */;
object.isUnusableRoleSubscriptionEmoji = moduleValue2.isUnusableRoleSubscriptionEmoji(customEmojiFromJoinedGuildBinding,
guildId ?? undefined);
subscriptionRoleStoreBinding = SubscriptionRoleStore;
object.userIsRoleSubscriber = subscriptionRoleStoreBinding.getUserSubscriptionRoles(customEmojiFromJoinedGuild.guildId).size > 0;
r0 = object;
}
}
return r0;
}
function onOpenPremiumSettings() { // fn#68113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:2940, owner: _default_68108.onOpenPremiumSettings, offset: 0x01c3fa7c, size: 151 bytes, params: 1, frame: 18
_default_68108CloseActionSheet();
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const PREMIUM_PROMOTION_OPENED = AnalyticEvents.PREMIUM_PROMOTION_OPENED;
Reflect.apply(track, defaultImport, [PREMIUM_PROMOTION_OPENED, {location_page: env0_10.page,
location_section: env0_10.section}]);
const openUserSettings = OpenUserSettingsModule.openUserSettings;
const PREMIUM = UserSettingsSections.PREMIUM;
Reflect.apply(openUserSettings, OpenUserSettingsModule, [{screen: PREMIUM, params: {analyticsLocation: env0_10}}]);
}
function renderStarIcon({isSelected}) { // fn#68114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:3305, owner: _default_68108.renderStarIcon, offset: 0x01c3fb13, size: 158 bytes, params: 2, frame: 16
const object = {};
const binding = env0_5;
copyDataProperties(object, binding.starIcon, undefined);
if (isSelected) {
copyDataProperties(object, binding.starIconSelected, undefined);
value = environment.__proto__;
const StarIcon = (require(8633) /* metro dependency 8633: StarIcon */).StarIcon;
return <StarIcon style={object} />;
}
copyDataProperties(object, binding.starIconUnselected, undefined);
const StarOutlineIcon = (StarOutlineIconModule).StarOutlineIcon;
return <StarOutlineIcon style={object} />;
}
function _default_68108OnPress() { // fn#68115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:3528, owner: _default_68108.onPress, offset: 0x01c3fbb1, size: 194 bytes, params: 1, frame: 19
var value;
_default_68108CloseActionSheet();
const content2 = content;
const binding = env0_9;
if (binding) {
EmojiActionCreatorsModule.unfavoriteEmoji(customEmojiFromJoinedGuild);
value = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
value.open({key: 'EMOJI_UNFAVORITED', icon: function() {
return renderStarIcon({isSelected: false});
}, content: content2});
} else {
EmojiActionCreatorsModule.favoriteEmoji(customEmojiFromJoinedGuild);
value = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
value.open({key: 'EMOJI_FAVORITED', icon: icon, content: content2});
}
function content() { // fn#68116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:3564, owner: _default_68108.onPress.content, offset: 0x01c3fc73, size: 154 bytes, params: 1, frame: 19
const value = environment.__proto__.__proto__;
const Text = (TextModule).Text;
const binding = env1_9;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
return (
<Text style={{'marginLeft': 8, 'marginTop': 2}} variant="text-md/bold">
{binding ? Reflect.apply(string, intl, [t.in1rga]) : Reflect.apply(string, intl, [t.mE2e8A])}
</Text>
);
}
function onPressIcon_68118() { // fn#68118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:3933, owner: _default_68108.onPress.icon, offset: 0x01c3fd26, size: 25 bytes, params: 1, frame: 11
return renderStarIcon({isSelected: true});
}
}
function _default_68108OnPress_68119() { // fn#68119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:4016, owner: _default_68108.onPress, offset: 0x01c3fd3f, size: 107 bytes, params: 1, frame: 18
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[14]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[13]);
value = value(dependencyMap[33], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'EmojiOptionsActionSheet', {emojiSrc: emojiNode.src}, 'stack']);
}
function renderNitroWheel() { // fn#68120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:4270, owner: _default_68108.renderNitroWheel, offset: 0x01c3fdaa, size: 129 bytes, params: 1, frame: 15
var r4;
var object;
let value = a0;
let shouldTintPurple = (value !== undefined ? value : {shouldTintPurple: false}).shouldTintPurple;
shouldTintPurple = !(shouldTintPurple === undefined) && shouldTintPurple;
const binding = env0_5;
const nitroWheel = binding.nitroWheel;
if (shouldTintPurple) {
object = {};
copyDataProperties(object, nitroWheel, undefined);
copyDataProperties(object, binding.nitroWheelPurple, undefined);
r4 = object;
} else {
r4 = nitroWheel;
}
value = environment.__proto__;
const NitroWheel = (NativeModule).NitroWheel;
return <NitroWheel style={r4} />;
}
function renderPremiumUpsellButton() { // fn#68121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:4602, owner: _default_68108.renderPremiumUpsellButton, offset: 0x01c3fe2b, size: 167 bytes, params: 1, frame: 18
const typeBinding = type;
const EmojiPopoutType = (GetEmojiPopoutMessageModule).EmojiPopoutType;
const GET_PREMIUM = EmojiPopoutType.GET_PREMIUM;
return (
typeBinding !== GET_PREMIUM
? null
: (
<View style={env0_15}>
{((Button) => <Button icon={renderNitroWheel()} text={env0_11.text} variant="active" size="md" grow onPress={onPress_68122} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}
</View>
)
);
function renderPremiumUpsellButtonOnPress() { // fn#68122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:4772, owner: _default_68108.renderPremiumUpsellButton.onPress, offset: 0x01c3fed2, size: 218 bytes, params: 1, frame: 20
var r1;
var defaultImport;
var defaultImport2;
var pushLazy;
let value = environment.__proto__;
const currentUserBinding = currentUser;
const binding = env1_10;
const analyticsLocationsBinding = analyticsLocations;
const _default_68108CloseActionSheetBinding = _default_68108CloseActionSheet;
value = currentUserBinding == null;
if (value) {
r1 = value;
} else {
value = environment.__proto__.__proto__;
value = importDefault(dependencyMap[9]);
value = value.canUseEmojisEverywhere(currentUserBinding);
r1 = value;
}
if (!r1) {
_default_68108CloseActionSheetBinding();
value = environment.__proto__.__proto__;
defaultImport = importDefault(dependencyMap[10]);
defaultImport.track(AnalyticEvents.PREMIUM_PROMOTION_OPENED, {location_page: binding.page,
location_section: binding.section});
defaultImport2 = importDefault(dependencyMap[11]);
pushLazy = defaultImport2.pushLazy;
value = require(dependencyMap[13]);
value = value(dependencyMap[12], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport2, [value, {analyticsLocation: binding,
analyticsLocations: analyticsLocationsBinding}]);
}
}
}
function _default_68108OnPress_68123() { // fn#68123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:6179, owner: _default_68108.onPress, offset: 0x01c3ffac, size: 65 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = undefined;
GuildUtilsModule.handleJoinGuild(expressionSourceGuild == null ? value : expressionSourceGuild.id);
return value;
}
}
return r0;
}
function onOpenPremiumSettings() { // fn#68113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:2940, owner: _default_68108.onOpenPremiumSettings, offset: 0x01c3fa7c, size: 151 bytes, params: 1, frame: 18
_default_68108CloseActionSheet();
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const PREMIUM_PROMOTION_OPENED = AnalyticEvents.PREMIUM_PROMOTION_OPENED;
Reflect.apply(track, defaultImport, [PREMIUM_PROMOTION_OPENED, {location_page: env0_10.page,
location_section: env0_10.section}]);
const openUserSettingsModule = require(7007) /* metro dependency 7007: openUserSettings */;
const openUserSettings = openUserSettingsModule.openUserSettings;
const PREMIUM = UserSettingsSections.PREMIUM;
Reflect.apply(openUserSettings, openUserSettingsModule, [{screen: PREMIUM, params: {analyticsLocation: env0_10}}]);
}
function renderStarIcon({isSelected}) { // fn#68114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:3305, owner: _default_68108.renderStarIcon, offset: 0x01c3fb13, size: 158 bytes, params: 2, frame: 16
const object2 = {};
const binding = env0_5;
copyDataProperties(object2, binding.starIcon, undefined);
if (isSelected) {
copyDataProperties(object2, binding.starIconSelected, undefined);
value = environment.__proto__;
const StarIcon = (require(8633) /* metro dependency 8633: StarIcon */).StarIcon;
return <StarIcon style={object2} />;
}
copyDataProperties(object2, binding.starIconUnselected, undefined);
const StarOutlineIcon = (require(8635) /* metro dependency 8635: StarOutlineIcon */).StarOutlineIcon;
return <StarOutlineIcon style={object2} />;
}
function _default_68108OnPress() { // fn#68115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:3528, owner: _default_68108.onPress, offset: 0x01c3fbb1, size: 194 bytes, params: 1, frame: 19
var value;
_default_68108CloseActionSheet();
const closure = content_68116;
const binding = env0_9;
const emojiActionCreatorsModule = require(8629) /* metro dependency 8629: EmojiActionCreators */;
if (binding) {
emojiActionCreatorsModule.unfavoriteEmoji(customEmojiFromJoinedGuild);
value = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
value.open({key: 'EMOJI_UNFAVORITED', icon: function() {
return renderStarIcon({isSelected: false});
}, content: closure});
} else {
emojiActionCreatorsModule.favoriteEmoji(customEmojiFromJoinedGuild);
value = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
value.open({key: 'EMOJI_FAVORITED', icon: icon_68118, content: closure});
}
}
function _default_68108OnPress_68119() { // fn#68119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:4016, owner: _default_68108.onPress, offset: 0x01c3fd3f, size: 107 bytes, params: 1, frame: 18
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[14]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[13]);
value = value(dependencyMap[33], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'EmojiOptionsActionSheet', {emojiSrc: emojiNode.src}, 'stack']);
}
function renderNitroWheel() { // fn#68120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:4270, owner: _default_68108.renderNitroWheel, offset: 0x01c3fdaa, size: 129 bytes, params: 1, frame: 15
var r4;
var object2;
let value = a0;
let shouldTintPurple = (value !== undefined ? value : {shouldTintPurple: false}).shouldTintPurple;
shouldTintPurple = !(shouldTintPurple === undefined) && shouldTintPurple;
const binding = env0_5;
const nitroWheel = binding.nitroWheel;
if (shouldTintPurple) {
object2 = {};
copyDataProperties(object2, nitroWheel, undefined);
copyDataProperties(object2, binding.nitroWheelPurple, undefined);
r4 = object2;
} else {
r4 = nitroWheel;
}
value = environment.__proto__;
const NitroWheel = (require(1305) /* metro dependency 1305: native */).NitroWheel;
return <NitroWheel style={r4} />;
}
function renderPremiumUpsellButton() { // fn#68121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:4602, owner: _default_68108.renderPremiumUpsellButton, offset: 0x01c3fe2b, size: 167 bytes, params: 1, frame: 18
const typeBinding = type;
const EmojiPopoutType = (require(8632) /* metro dependency 8632: getEmojiPopoutMessage */).EmojiPopoutType;
const GET_PREMIUM = EmojiPopoutType.GET_PREMIUM;
return typeBinding !== GET_PREMIUM ? null : <View style={env0_15}>{((Button) => <Button icon={renderNitroWheel()} text={env0_11.text} variant="active" size="md" grow onPress={onPress_68122} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>;
}
function _default_68108OnPress_68123() { // fn#68123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:6179, owner: _default_68108.onPress, offset: 0x01c3ffac, size: 65 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = undefined;
const guildUtilsModule = require(8640) /* metro dependency 8640: GuildUtils */;
guildUtilsModule.handleJoinGuild(expressionSourceGuild == null ? value : expressionSourceGuild.id);
return value;
}
function onPressContent() { // fn#68116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:3564, owner: _default_68108.onPress.content, offset: 0x01c3fc73, size: 154 bytes, params: 1, frame: 19
const value = environment.__proto__.__proto__;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const binding = env1_9;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return (
<Text style={{'marginLeft': 8, 'marginTop': 2}} variant="text-md/bold">
{binding ? Reflect.apply(string, intl, [t.in1rga]) : Reflect.apply(string, intl, [t.mE2e8A])}
</Text>
);
}
function onPressIcon_68118() { // fn#68118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:3933, owner: _default_68108.onPress.icon, offset: 0x01c3fd26, size: 25 bytes, params: 1, frame: 11
return renderStarIcon({isSelected: true});
}
function renderPremiumUpsellButtonOnPress() { // fn#68122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:4772, owner: _default_68108.renderPremiumUpsellButton.onPress, offset: 0x01c3fed2, size: 218 bytes, params: 1, frame: 20
var r1;
var defaultImport;
var defaultImport2;
var pushLazy;
let value = environment.__proto__;
const currentUserBinding = currentUser;
const binding = env1_10;
const analyticsLocationsBinding = analyticsLocations;
const _default_68108CloseActionSheetBinding = _default_68108CloseActionSheet;
value = currentUserBinding == null;
if (value) {
r1 = value;
} else {
value = environment.__proto__.__proto__;
value = importDefault(dependencyMap[9]);
value = value.canUseEmojisEverywhere(currentUserBinding);
r1 = value;
}
if (!r1) {
_default_68108CloseActionSheetBinding();
value = environment.__proto__.__proto__;
defaultImport = importDefault(dependencyMap[10]);
defaultImport.track(AnalyticEvents.PREMIUM_PROMOTION_OPENED, {location_page: binding.page,
location_section: binding.section});
defaultImport2 = importDefault(dependencyMap[11]);
pushLazy = defaultImport2.pushLazy;
value = require(dependencyMap[13]);
value = value(dependencyMap[12], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport2, [value, {analyticsLocation: binding,
analyticsLocations: analyticsLocationsBinding}]);
}
}
global.__d(_fun68107, 8631, [31, 27, 6541, 3969, 1878, 661, 33, 4501, 697, 3802, 683, 5080, 7028, 1962, 4080, 8625,
566, 6771, 3800, 6545, 3777, 8533, 6796, 3829, 8632, 7007, 8626, 8633, 8635, 4573, 1244, 8629, 3857, 8637, 8638,
1305, 4578, 5475, 8640, 7972, 8641, 8645,
2]) /* metro module 8631, dependencies: [31, 27, 6541, 3969, 1878, 661, 33, 4501, 697, 3802, 683, 5080, 7028, 1962, 4080, 8625, 566, 6771, 3800, 6545, 3777, 8533, 6796, 3829, 8632, 7007, 8626, 8633, 8635, 4573, 1244, 8629, 3857, 8637, 8638, 1305, 4578, 5475, 8640, 7972, 8641, 8645, 2] */;
@@ -1,88 +1,94 @@
/* Metro module 8645; source: modules/messages/native/emoji/EmojiGrid.tsx; dependencies: [31, 27, 33, 4501, 697, 3801, 1423, 6739, 8625, 8646, 8649, 2] */
import Emoji from '../../../emojis/native/Emoji.tsx'; /* Metro dependency 6739 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as UseSharedMessageEmojiStylesModule from './useSharedMessageEmojiStyles.tsx'; /* Metro dependency 8625 */
import * as LayoutUtilsModule from '../../../guild_role_subscriptions/native/components/LayoutUtils.tsx'; /* Metro dependency 8649 */
function _fun68150(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8830:6, offset: 0x01c41574, size: 301 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(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {'height': 40, 'width': 40};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const env0_5 = Reflect.apply(createStyles, createStylesModule, [{gridEmojiFastImage: object,
ReactModule;
const createStyles = CreateStylesModule.createStyles;
const object2 = {'height': 40, 'width': 40};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const env0_5 = Reflect.apply(createStyles, CreateStylesModule, [{gridEmojiFastImage: object2,
gridEmojiText: {'fontSize': 18, 'lineHeight': 44}, emojiGridRowContainer: {'marginTop': 16,
'flexDirection': 'row'}, emojiGridContainer: {'marginTop': 8, 'alignItems': 'center'}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/emoji/EmojiGrid.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/emoji/EmojiGrid.tsx');
exports.EmojiGrid = EmojiGrid;
}
function Emoji_68151({guildEmoji}) { // fn#68151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8830:389, offset: 0x01c416a1, size: 207 bytes, params: 2, frame: 21
var r6;
var value;
const styles = useStyles();
const Emoji = importDefault(6739) /* metro dependency 6739: Emoji */;
if (guildEmoji.id == null) {
value = importDefault(3801) /* metro dependency 3801: EmojiUtils */;
value = value.getURL(guildEmoji.name);
r6 = value;
} else {
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
value = value.getEmojiURL({id: guildEmoji.id, animated: guildEmoji.animated, size: 48});
r6 = value;
function Emoji_68151({guildEmoji}) { // fn#68151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8830:389, offset: 0x01c416a1, size: 207 bytes, params: 2, frame: 21
var r6;
var value;
const styles = useStyles();
if (guildEmoji.id == null) {
value = importDefault(3801) /* metro dependency 3801: EmojiUtils */;
value = value.getURL(guildEmoji.name);
r6 = value;
} else {
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
value = value.getEmojiURL({id: guildEmoji.id, animated: guildEmoji.animated, size: 48});
r6 = value;
}
return (
<Emoji
src={r6}
fastImageStyle={styles.gridEmojiFastImage}
textEmojiStyle={styles.gridEmojiText}
name={guildEmoji.name}
key={guildEmoji.id}
/>
);
}
return (
<Emoji
src={r6}
fastImageStyle={styles.gridEmojiFastImage}
textEmojiStyle={styles.gridEmojiText}
name={guildEmoji.name}
key={guildEmoji.id}
/>
);
}
function EmojiGrid({expressionSourceGuild, doNotDisplayEmojiIds = [], numberToShow, maxPerRow}) { // fn#68152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8830:721, offset: 0x01c41770, size: 310 bytes, params: 2, frame: 20
numberToShow = numberToShow === undefined ? 10 : numberToShow;
maxPerRow = maxPerRow === undefined ? 5 : maxPerRow;
const object2 = {};
const useSharedMessageEmojiStylesModule = require(8625) /* metro dependency 8625: useSharedMessageEmojiStyles */;
const useSharedMessageEmojiStyles = useSharedMessageEmojiStylesModule.useSharedMessageEmojiStyles;
copyDataProperties(object2, Reflect.apply(useSharedMessageEmojiStyles, useSharedMessageEmojiStylesModule, []),
undefined);
const styles = useStyles();
copyDataProperties(object2, styles, undefined);
const value8 = (importDefault(8646) /* metro dependency 8646 */)((expressionSourceGuild?.emojis ?? []).slice(0,
numberToShow + 1).filter(_fun68153).slice(0, numberToShow), maxPerRow);
const emojiGridContainer = object2.emojiGridContainer;
const GappedList = (require(8649) /* metro dependency 8649: LayoutUtils */).GappedList;
return (
<View style={emojiGridContainer}>
<GappedList gap={8}>
{value8.map(_fun68154)}
</GappedList>
</View>
);
}
function EmojiGrid({expressionSourceGuild, doNotDisplayEmojiIds = [], numberToShow, maxPerRow}) { // fn#68152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8830:721, offset: 0x01c41770, size: 310 bytes, params: 2, frame: 20
numberToShow = numberToShow === undefined ? 10 : numberToShow;
maxPerRow = maxPerRow === undefined ? 5 : maxPerRow;
const object = {};
const useSharedMessageEmojiStyles = UseSharedMessageEmojiStylesModule.useSharedMessageEmojiStyles;
copyDataProperties(object, Reflect.apply(useSharedMessageEmojiStyles, UseSharedMessageEmojiStylesModule, []),
undefined);
const styles = useStyles();
copyDataProperties(object, styles, undefined);
const value8 = (importDefault(8646) /* metro dependency 8646 */)((expressionSourceGuild?.emojis ?? []).slice(0,
numberToShow + 1).filter(_fun68153).slice(0, numberToShow), maxPerRow);
const emojiGridContainer = object.emojiGridContainer;
const GappedList = (LayoutUtilsModule).GappedList;
return (
<View style={emojiGridContainer}>
<GappedList gap={8}>
{value8.map(_fun68154)}
</GappedList>
</View>
);
function _fun68153({id}) { // fn#68153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8830:931, offset: 0x01c418a6, size: 30 bytes, params: 2, frame: 11
const binding = env0_0;
return !binding.includes(id);
}
function _fun68153({id}) { // fn#68153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8830:931, offset: 0x01c418a6, size: 30 bytes, params: 2, frame: 11
const binding = env0_0;
return !binding.includes(id);
}
function _fun68154(a0, a1) { // fn#68154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8830:1074, offset: 0x01c418c4, size: 115 bytes, params: 3, frame: 19
const emojiGridRowContainer = env0_1.emojiGridRowContainer;
const GappedList = (LayoutUtilsModule).GappedList;
return (
<View style={emojiGridRowContainer} key={a1}>
<GappedList gap={32}>
{a0.map(_fun68155)}
</GappedList>
</View>
);
function _fun68155(a0) { // fn#68155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8830:1171, offset: 0x01c41937, size: 37 bytes, params: 2, frame: 15
return <Emoji_68151 guildEmoji={a0} key={a0.id} />;
}
function _fun68154(a0, a1) { // fn#68154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8830:1074, offset: 0x01c418c4, size: 115 bytes, params: 3, frame: 19
const emojiGridRowContainer = env0_1.emojiGridRowContainer;
const GappedList = (require(8649) /* metro dependency 8649: LayoutUtils */).GappedList;
return (
<View style={emojiGridRowContainer} key={a1}>
<GappedList gap={32}>
{a0.map(_fun68155)}
</GappedList>
</View>
);
}
}
}
function _fun68155(a0) { // fn#68155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8830:1171, offset: 0x01c41937, size: 37 bytes, params: 2, frame: 15
return <Emoji_68151 guildEmoji={a0} key={a0.id} />;
}
global.__d(_fun68150, 8645, [31, 27, 33, 4501, 697, 3801, 1423, 6739, 8625, 8646, 8649,
2]) /* metro module 8645, dependencies: [31, 27, 33, 4501, 697, 3801, 1423, 6739, 8625, 8646, 8649, 2] */;
@@ -1,31 +1,49 @@
/* Metro module 8637; source: modules/messages/native/emoji/EmojiOptionsActionSheet.tsx; dependencies: [31, 33, 6797, 3856, 4080, 6805, 6231, 6238, 4056, 1244, 2] */
import ActionSheetActionCreators from '../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ToastUtilsModule from '../../../toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */
import * as LinkIconModule from '../../../../design/components/Icon/native/redesign/generated/LinkIcon.tsx'; /* Metro dependency 4056 */
import * as TableRowGroupNativeModule from '../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as ClipboardUtilsNativeModule from '../../../../utils/ClipboardUtils.native.tsx'; /* Metro dependency 6797 */
import * as ActionSheetNativeModule from '../../../../design/components/Sheet/native/ActionSheet.native.tsx'; /* Metro dependency 6805 */
function _fun68132(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8822:6, offset: 0x01c4074e, size: 142 bytes, params: 8, frame: 18
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(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/emoji/EmojiOptionsActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/emoji/EmojiOptionsActionSheet.tsx');
exports.default = EmojiOptionsActionSheet;
function EmojiOptionsActionSheet({emojiSrc}) { // fn#68133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8822:222, offset: 0x01c407dc, size: 242 bytes, params: 2, frame: 23
const value2 = ReactModule.useCallback(_fun68134, [emojiSrc]);
const ActionSheet = (ActionSheetNativeModule).ActionSheet;
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const TableRow = (TableRowNativeModule).TableRow;
const object2 = {};
const LinkIcon = (LinkIconModule).LinkIcon;
object2.icon = <LinkIcon />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cIoudn);
object2.onPress = value2;
return (
<ActionSheet>
<TableRowGroup hasIcons>
<TableRow {...object2} />
</TableRowGroup>
</ActionSheet>
);
function _fun68134() { // fn#68134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8822:290, offset: 0x01c408ce, size: 93 bytes, params: 1, frame: 15
const value = environment.__proto__;
ClipboardUtilsNativeModule.copy(emojiSrc);
(ToastUtilsModule).presentCopiedToClipboard();
(ActionSheetActionCreators).hideActionSheet();
}
}
}
function EmojiOptionsActionSheet({emojiSrc}) { // fn#68133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8822:222, offset: 0x01c407dc, size: 242 bytes, params: 2, frame: 23
const value2 = env0_3.useCallback(_fun68134, [emojiSrc]);
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object = {};
const LinkIcon = (require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon;
object.icon = <LinkIcon />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cIoudn);
object.onPress = value2;
return (
<ActionSheet>
<TableRowGroup hasIcons>
<TableRow {...object} />
</TableRowGroup>
</ActionSheet>
);
}
global.__d(_fun68132, 8637, [31, 33, 6797, 3856, 4080, 6805, 6231, 6238, 4056, 1244,
2]) /* metro module 8637, dependencies: [31, 33, 6797, 3856, 4080, 6805, 6231, 6238, 4056, 1244, 2] */;
@@ -1,108 +1,153 @@
/* Metro module 8641; source: modules/messages/native/emoji/ExpressionGuildDetails.tsx; dependencies: [31, 27, 6820, 33, 4501, 697, 6819, 1423, 5475, 4573, 1244, 5278, 8640, 8642, 1305, 2] */
import GuildBadge from '../../../guild/native/GuildBadge.tsx'; /* Metro dependency 8642 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ExpressionSourceRecordModule from '../../../emojis/records/ExpressionSourceRecord.tsx'; /* Metro dependency 6820 */
function _fun68141(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8826:6, offset: 0x01c40ad1, size: 518 bytes, params: 8, frame: 24
var object2;
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(6820) /* metro dependency 6820: ExpressionSourceRecord */).ExpressionSourceGuildRecord;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.Fragment;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.guildDetailsContainer = {flexDirection: 'column'};
object2.guildDetailsContent = {'flexDirection': 'row', 'marginTop': 8, 'alignItems': 'center'};
const object4 = {'width': 40, 'height': 40, 'borderRadius': null, 'marginRight': 12};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.guildIcon = object4;
object2.guildNameAndOnlineMembers = {flexDirection: 'column'};
object2.guildNameWrapper = {'flexDirection': 'row', 'alignItems': 'center', 'marginRight': 32};
object2.guildPartnerIcon = {marginRight: 8};
object2.guildDescriptionSection = {'flexDirection': 'row', 'alignItems': 'center', 'marginTop': 4};
const object5 = {'width': 4, 'height': 4, 'borderRadius': null, 'marginRight': 8, 'marginLeft': 8};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object = {};
object.guildDetailsContainer = {flexDirection: 'column'};
object.guildDetailsContent = {'flexDirection': 'row', 'marginTop': 8, 'alignItems': 'center'};
const object3 = {'width': 40, 'height': 40, 'borderRadius': null, 'marginRight': 12};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.guildIcon = object3;
object.guildNameAndOnlineMembers = {flexDirection: 'column'};
object.guildNameWrapper = {'flexDirection': 'row', 'alignItems': 'center', 'marginRight': 32};
object.guildPartnerIcon = {marginRight: 8};
object.guildDescriptionSection = {'flexDirection': 'row', 'alignItems': 'center', 'marginTop': 4};
const object6 = {'width': 4, 'height': 4, 'borderRadius': null, 'marginRight': 8, 'marginLeft': 8};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object5.backgroundColor = BACKGROUND_MOD_MUTED;
object2.dotSeparator = object5;
const object8 = {'borderRadius': null, 'borderColor': null, 'borderWidth': 1, 'paddingHorizontal': 4,
object6.backgroundColor = BACKGROUND_MOD_MUTED;
object.dotSeparator = object6;
const object7 = {'borderRadius': null, 'borderColor': null, 'borderWidth': 1, 'paddingHorizontal': 4,
'paddingBottom': 2};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object8.borderColor = BORDER_STRONG;
object2.joinGuildButton = object8;
const env0_8 = Reflect.apply(createStyles, value, [object2]);
const closure = ExpressionGuildDetails;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/emoji/ExpressionGuildDetails.tsx');
exports.default = closure;
exports.ExpressionGuildDetails = closure;
}
function ExpressionGuildDetails({guild, title, hasJoinedGuild, showingJoinGuildCta}) { // fn#68142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8826:959, offset: 0x01c40cd7, size: 1149 bytes, params: 2, frame: 39
var r7;
var r11;
var defaultImport;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var jsxRuntimeEnv0_6Binding;
var items5;
const styles = useStyles();
const fromGuildType = ExpressionSourceGuildRecord.createFromGuildType(guild);
const isDiscoverable2 = fromGuildType.isDiscoverable();
if (isDiscoverable2) {
r7 = ((Component) => <Component style={styles.guildIcon} guild={fromGuildType} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.XLARGE} animate />)(importDefault(6819) /* metro dependency 6819: GuildIcon */);
} else if (hasJoinedGuild) {
r7 = ((Component) => <Component style={styles.guildIcon} guild={fromGuildType} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.XLARGE} animate />)(importDefault(6819) /* metro dependency 6819: GuildIcon */);
} else {
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
r7 = ((Component) => <Component style={styles.guildIcon} source={defaultImport.getGuildIconSource({id: guild.id,
icon: guild.icon, canAnimate: true,
size: 32})} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
}
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="eyebrow" color="text-default">{title}</Text>;
const GuildBadge = importDefault(8642) /* metro dependency 8642: GuildBadge */;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon.Sizes;
const REFRESH_SMALL_16 = Sizes.REFRESH_SMALL_16;
const view = <View style={styles.guildNameWrapper}><GuildBadge guild={guild} style={styles.guildPartnerIcon} size={REFRESH_SMALL_16} disableColor /><Text variant="text-md/bold" color="mobile-text-heading-primary">{guild.name}</Text></View>;
if (isDiscoverable2) {
if (fromGuildType.presenceCount != null) {
jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
items5 = [<Text variant="text-xs/medium" color="text-default">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['LC+S+m'],
{membersOnline: fromGuildType.presenceCount})}</Text>];
items5[1] = <View style={styles.dotSeparator} />;
items5[2] = hasJoinedGuild || showingJoinGuildCta ? <Text variant="text-xs/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.inyJqO)}</Text> : ((PressableOpacity) => <PressableOpacity style={styles.joinGuildButton} onPress={onPress_68143}><Text variant="text-xs/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.riu2R5)}</Text></PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity);
r11 = <>{items5}</>;
object7.borderColor = BORDER_STRONG;
object.joinGuildButton = object7;
const env0_8 = Reflect.apply(createStyles, value, [object]);
const ExpressionGuildDetails2 = ExpressionGuildDetails;
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/emoji/ExpressionGuildDetails.tsx');
exports.default = ExpressionGuildDetails2;
exports.ExpressionGuildDetails = ExpressionGuildDetails2;
function ExpressionGuildDetails({guild, title, hasJoinedGuild, showingJoinGuildCta}) { // fn#68142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8826:959, offset: 0x01c40cd7, size: 1149 bytes, params: 2, frame: 39
var r7;
var r11;
var defaultImport;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var jsxRuntimeEnv0_6Binding;
var items5;
const styles = useStyles();
const fromGuildType = ExpressionSourceGuildRecord.createFromGuildType(guild);
const isDiscoverable2 = fromGuildType.isDiscoverable();
if (isDiscoverable2) {
r7 = ((Component) => <Component style={styles.guildIcon} guild={fromGuildType} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.XLARGE} animate />)(importDefault(6819) /* metro dependency 6819: GuildIcon */);
} else if (hasJoinedGuild) {
r7 = ((Component) => <Component style={styles.guildIcon} guild={fromGuildType} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.XLARGE} animate />)(importDefault(6819) /* metro dependency 6819: GuildIcon */);
} else {
r11 = <Text variant="text-xs/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.H29mx4)}</Text>;
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
r7 = ((Component) => <Component style={styles.guildIcon} source={defaultImport.getGuildIconSource({id: guild.id,
icon: guild.icon, canAnimate: true,
size: 32})} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
}
} else {
r11 = <Text variant="text-xs/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.H29mx4)}</Text>;
}
return (
<View style={styles.guildDetailsContainer}>
{text}
<View style={styles.guildDetailsContent}>
{r7}
<View style={styles.guildNameAndOnlineMembers}>
{view}
<View style={styles.guildDescriptionSection}>
{r11}
const Text = (TextModule).Text;
const text = (
<Text variant="eyebrow" color="text-default">
{title}
</Text>
);
const Icon = (NativeModule).Icon;
const Sizes = Icon.Sizes;
const REFRESH_SMALL_16 = Sizes.REFRESH_SMALL_16;
const view = (
<View style={styles.guildNameWrapper}>
<GuildBadge
guild={guild}
style={styles.guildPartnerIcon}
size={REFRESH_SMALL_16}
disableColor
/>
<Text variant="text-md/bold" color="mobile-text-heading-primary">
{guild.name}
</Text>
</View>
);
if (isDiscoverable2) {
if (fromGuildType.presenceCount != null) {
jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
items5 = [
<Text variant="text-xs/medium" color="text-default">
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['LC+S+m'],
{membersOnline: fromGuildType.presenceCount})}
</Text>,
];
items5[1] = <View style={styles.dotSeparator} />;
items5[2] = (
hasJoinedGuild || showingJoinGuildCta
? (
<Text variant="text-xs/medium" color="text-default">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.inyJqO)}
</Text>
)
: ((PressableOpacity) => <PressableOpacity style={styles.joinGuildButton} onPress={onPress_68143}><Text variant="text-xs/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.riu2R5)}</Text></PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)
);
r11 = (
<>
{items5}
</>
);
} else {
r11 = (
<Text variant="text-xs/medium" color="text-default">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.H29mx4)}
</Text>
);
}
} else {
r11 = (
<Text variant="text-xs/medium" color="text-default">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.H29mx4)}
</Text>
);
}
return (
<View style={styles.guildDetailsContainer}>
{text}
<View style={styles.guildDetailsContent}>
{r7}
<View style={styles.guildNameAndOnlineMembers}>
{view}
<View style={styles.guildDescriptionSection}>
{r11}
</View>
</View>
</View>
</View>
</View>
);
}
);
function ExpressionGuildDetailsOnPress() { // fn#68143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8826:2196, owner: ExpressionGuildDetails.onPress, offset: 0x01c41154, size: 50 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(8640) /* metro dependency 8640: GuildUtils */;
return value.handleJoinGuild(guild.id);
}
}
function ExpressionGuildDetailsOnPress() { // fn#68143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8826:2196, owner: ExpressionGuildDetails.onPress, offset: 0x01c41154, size: 50 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(8640) /* metro dependency 8640: GuildUtils */;
return value.handleJoinGuild(guild.id);
}
global.__d(_fun68141, 8641, [31, 27, 6820, 33, 4501, 697, 6819, 1423, 5475, 4573, 1244, 5278, 8640, 8642, 1305,
2]) /* metro module 8641, dependencies: [31, 27, 6820, 33, 4501, 697, 6819, 1423, 5475, 4573, 1244, 5278, 8640, 8642, 1305, 2] */;
@@ -1,68 +1,93 @@
/* Metro module 8623; source: modules/messages/native/emoji/MessageEmojiActionSheet.tsx; dependencies: [31, 27, 661, 33, 4501, 477, 491, 6275, 683, 8624, 8630, 8631, 2] */
import AnalyticsUtils from '../../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import StandardEmojiContent from './StandardEmojiContent.tsx'; /* Metro dependency 8624 */
import CustomEmojiContent from './CustomEmojiContent.tsx'; /* Metro dependency 8631 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as Module00491Module from '../../../../by-id/module-00491.js'; /* Metro dependency 491 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as BottomSheetNativeModule from '../../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as UseEmojiAndSourceModule from '../../../emojis/hooks/useEmojiAndSource.tsx'; /* Metro dependency 8630 */
function _fun68055(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8808:6, offset: 0x01c3cfde, size: 278 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = 0;
importAll(dependencyMap[value]);
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {};
const createStyles = CreateStylesModule.createStyles;
const object2 = {};
const value3 = 16;
object.paddingHorizontal = value3;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
object.paddingBottom = platformUtilsModule.isAndroid() ? value3 : value;
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{contentWrapper: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/emoji/MessageEmojiActionSheet.tsx');
object2.paddingHorizontal = value3;
object2.paddingBottom = PlatformUtilsModule.isAndroid() ? value3 : value;
const env0_6 = Reflect.apply(createStyles, CreateStylesModule, [{contentWrapper: object2}]);
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/emoji/MessageEmojiActionSheet.tsx');
exports.default = _default_68060;
}
function MessageStandardEmojiActionSheet({emojiNode}) { // fn#68056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8808:293, offset: 0x01c3d0f4, size: 173 bytes, params: 2, frame: 20
const styles = useStyles();
const value2 = (Module00491Module).v4();
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
return (
<BottomSheet startExpanded onDismiss={onDismiss_68057}>
<View style={styles.contentWrapper}>
{((Component) => <Component emojiNode={emojiNode} nonce={value2} />)(StandardEmojiContent)}
</View>
</BottomSheet>
);
function MessageStandardEmojiActionSheetOnDismiss() { // fn#68057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8808:393, owner: MessageStandardEmojiActionSheet.onDismiss, offset: 0x01c3d1a1, size: 62 bytes, params: 1, frame: 15
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const CLOSE_POPOUT = AnalyticEvents.CLOSE_POPOUT;
Reflect.apply(track, defaultImport, [CLOSE_POPOUT, {nonce: env0_0}]);
}
function MessageStandardEmojiActionSheet({emojiNode}) { // fn#68056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8808:293, offset: 0x01c3d0f4, size: 173 bytes, params: 2, frame: 20
const styles = useStyles();
const value2 = (require(491) /* metro dependency 491 */).v4();
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
return (
<BottomSheet startExpanded onDismiss={onDismiss_68057}>
<View style={styles.contentWrapper}>
{((Component) => <Component emojiNode={emojiNode} nonce={value2} />)(importDefault(8624) /* metro dependency 8624: StandardEmojiContent */)}
</View>
</BottomSheet>
);
}
function MessageCustomEmojiActionSheet({emojiNode}) { // fn#68058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8808:553, offset: 0x01c3d1df, size: 291 bytes, params: 2, frame: 25
const styles = useStyles();
const value2 = (require(8630) /* metro dependency 8630: useEmojiAndSource */).useEmojiAndSource({emojiId: emojiNode.id});
const sourceType = value2.sourceType;
const expressionSourceGuild = value2.expressionSourceGuild;
const expressionSourceApplication = value2.expressionSourceApplication;
const hasJoinedEmojiSourceGuild = value2.hasJoinedEmojiSourceGuild;
const emoji = value2.emoji;
if (value2.isFetching) {
return null;
}
const value3 = (require(491) /* metro dependency 491 */).v4();
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
return (
<BottomSheet startExpanded onDismiss={onDismiss_68059}>
<View style={styles.contentWrapper}>
{((Component) => <Component emojiNode={emojiNode} sourceType={sourceType} expressionSourceApplication={expressionSourceApplication} expressionSourceGuild={expressionSourceGuild} customEmojiFromJoinedGuild={emoji} hasJoinedEmojiSourceGuild={hasJoinedEmojiSourceGuild} nonce={value3} />)(importDefault(8631) /* metro dependency 8631: CustomEmojiContent */)}
</View>
</BottomSheet>
);
}
function _default_68060({emojiNode}) { // fn#68060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8808:1107, offset: 0x01c3d302, size: 69 bytes, params: 2, frame: 15
return 'surrogate' in emojiNode ? <MessageStandardEmojiActionSheet emojiNode={emojiNode} /> : <MessageCustomEmojiActionSheet emojiNode={emojiNode} />;
}
function MessageCustomEmojiActionSheet({emojiNode}) { // fn#68058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8808:553, offset: 0x01c3d1df, size: 291 bytes, params: 2, frame: 25
const styles = useStyles();
const value2 = (UseEmojiAndSourceModule).useEmojiAndSource({emojiId: emojiNode.id});
const sourceType = value2.sourceType;
const expressionSourceGuild = value2.expressionSourceGuild;
const expressionSourceApplication = value2.expressionSourceApplication;
const hasJoinedEmojiSourceGuild = value2.hasJoinedEmojiSourceGuild;
const emoji = value2.emoji;
if (value2.isFetching) {
return null;
}
const value3 = (Module00491Module).v4();
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
return (
<BottomSheet startExpanded onDismiss={onDismiss_68059}>
<View style={styles.contentWrapper}>
{((Component) => <Component emojiNode={emojiNode} sourceType={sourceType} expressionSourceApplication={expressionSourceApplication} expressionSourceGuild={expressionSourceGuild} customEmojiFromJoinedGuild={emoji} hasJoinedEmojiSourceGuild={hasJoinedEmojiSourceGuild} nonce={value3} />)(CustomEmojiContent)}
</View>
</BottomSheet>
);
function MessageCustomEmojiActionSheetOnDismiss() { // fn#68059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8808:843, owner: MessageCustomEmojiActionSheet.onDismiss, offset: 0x01c3d1a1, size: 62 bytes, params: 1, frame: 15
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const CLOSE_POPOUT = AnalyticEvents.CLOSE_POPOUT;
Reflect.apply(track, defaultImport, [CLOSE_POPOUT, {nonce: env0_0}]);
}
}
function _default_68060({emojiNode}) { // fn#68060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8808:1107, offset: 0x01c3d302, size: 69 bytes, params: 2, frame: 15
return (
'surrogate' in emojiNode
? (
<MessageStandardEmojiActionSheet emojiNode={emojiNode} />
)
: (
<MessageCustomEmojiActionSheet emojiNode={emojiNode} />
)
);
}
function MessageStandardEmojiActionSheetOnDismiss() { // fn#68057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8808:393, owner: MessageStandardEmojiActionSheet.onDismiss, offset: 0x01c3d1a1, size: 62 bytes, params: 1, frame: 15
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const CLOSE_POPOUT = AnalyticEvents.CLOSE_POPOUT;
Reflect.apply(track, defaultImport, [CLOSE_POPOUT, {nonce: env0_0}]);
}
global.__d(_fun68055, 8623, [31, 27, 661, 33, 4501, 477, 491, 6275, 683, 8624, 8630, 8631,
2]) /* metro module 8623, dependencies: [31, 27, 661, 33, 4501, 477, 491, 6275, 683, 8624, 8630, 8631, 2] */;
@@ -1,104 +1,141 @@
/* Metro module 8624; source: modules/messages/native/emoji/StandardEmojiContent.tsx; dependencies: [31, 27, 3969, 33, 4501, 697, 8625, 3801, 5475, 4573, 8626, 3797, 8533, 8627, 1244, 7972, 4578, 8629, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import EmojiUtils from '../../../../utils/EmojiUtils.tsx'; /* Metro dependency 3801 */
import SelectedGuildStore from '../../../../stores/SelectedGuildStore.tsx'; /* Metro dependency 3969 */
import UseMaybeAddReactionMarketingEasterEggNote from '../../useMaybeAddReactionMarketingEasterEggNote.tsx'; /* Metro dependency 8627 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as NativeModule from '../../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
import * as EmojiPickerUtilsModule from '../../../emoji_picker/EmojiPickerUtils.tsx'; /* Metro dependency 8533 */
import * as UseSharedMessageEmojiStylesModule from './useSharedMessageEmojiStyles.tsx'; /* Metro dependency 8625 */
import * as UseTrackOpenPopoutModule from '../../../emojis/useTrackOpenPopout.tsx'; /* Metro dependency 8626 */
import * as EmojiActionCreatorsModule from '../../../../actions/EmojiActionCreators.tsx'; /* Metro dependency 8629 */
function _fun68061(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8809:6, offset: 0x01c3d347, size: 291 bytes, params: 8, frame: 21
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 selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
const PX_4 = (Native).space.PX_4;
const env0_9 = Reflect.apply(createStyles, value, [{emojiSurrogate: {'lineHeight': 48, 'fontSize': 40, 'margin': 8},
ctaContainer: {paddingTop: PX_4}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/emoji/StandardEmojiContent.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/emoji/StandardEmojiContent.tsx');
exports.default = _default_68063;
}
function Emoji({surrogate}) { // fn#68062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8809:294, offset: 0x01c3d46a, size: 256 bytes, params: 2, frame: 21
var r4;
const object2 = {};
var value;
const styles = useStyles();
copyDataProperties(object2, styles, undefined);
const useSharedMessageEmojiStylesModule = require(8625) /* metro dependency 8625: useSharedMessageEmojiStyles */;
const useSharedMessageEmojiStyles = useSharedMessageEmojiStylesModule.useSharedMessageEmojiStyles;
copyDataProperties(object2, Reflect.apply(useSharedMessageEmojiStyles, useSharedMessageEmojiStylesModule, []),
undefined);
const uRL = (importDefault(3801) /* metro dependency 3801: EmojiUtils */).getURL(surrogate);
const emojiWrapper = object2.emojiWrapper;
if (uRL !== '') {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component style={object2.emojiIcon} resizeMode="contain" source={{uri: uRL}} />)(value);
r4 = value;
} else {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
r4 = <Text style={object2.emojiSurrogate} variant="text-md/medium">{surrogate}</Text>;
function Emoji_68062({surrogate}) { // fn#68062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8809:294, offset: 0x01c3d46a, size: 256 bytes, params: 2, frame: 21
var r4;
const object = {};
var value;
const styles = useStyles();
copyDataProperties(object, styles, undefined);
const useSharedMessageEmojiStyles = UseSharedMessageEmojiStylesModule.useSharedMessageEmojiStyles;
copyDataProperties(object, Reflect.apply(useSharedMessageEmojiStyles, UseSharedMessageEmojiStylesModule, []),
undefined);
const uRL = (EmojiUtils).getURL(surrogate);
const emojiWrapper = object.emojiWrapper;
if (uRL !== '') {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component style={object.emojiIcon} resizeMode="contain" source={{uri: uRL}} />)(value);
r4 = value;
} else {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
r4 = (
<Text style={object.emojiSurrogate} variant="text-md/medium">
{surrogate}
</Text>
);
}
return (
<View style={emojiWrapper}>
{r4}
</View>
);
}
return (
<View style={emojiWrapper}>
{r4}
</View>
);
}
function _default_68063({emojiNode, nonce}) { // fn#68063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8809:608, offset: 0x01c3d56a, size: 695 bytes, params: 2, frame: 32
const object2 = {};
const styles = useStyles();
copyDataProperties(object2, styles, undefined);
const useSharedMessageEmojiStylesModule = require(8625) /* metro dependency 8625: useSharedMessageEmojiStyles */;
const useSharedMessageEmojiStyles = useSharedMessageEmojiStylesModule.useSharedMessageEmojiStyles;
copyDataProperties(object2, Reflect.apply(useSharedMessageEmojiStyles, useSharedMessageEmojiStylesModule, []),
undefined);
const guildId = SelectedGuildStore.getGuildId();
(require(8626) /* metro dependency 8626: useTrackOpenPopout */).useTrackOpenPopout({currentGuildId: guildId,
nonce: nonce});
const value4 = (require(8533) /* metro dependency 8533: EmojiPickerUtils */).useIsFavoriteEmoji(guildId,
env0_3.useMemo(_fun68064, [emojiNode.surrogate]));
const value5 = (importDefault(8627) /* metro dependency 8627: useMaybeAddReactionMarketingEasterEggNote */)(emojiNode.content);
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
const emojiContainer = object2.emojiContainer;
const emoji = <Emoji surrogate={emojiNode.surrogate} />;
const emojiDescriptionWrapper = object2.emojiDescriptionWrapper;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="text-md/bold" color="mobile-text-heading-primary">{value5}</Text>;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const items4 = [<View style={emojiContainer}>{emoji}<View style={emojiDescriptionWrapper}>{text}<Text variant="text-sm/medium">{Reflect.apply(string,
intl, [t.sXdH8c])}</Text></View></View>];
const FormDivider = (require(7972) /* metro dependency 7972: native */).FormDivider;
items4[1] = <FormDivider style={object2.divider} />;
const ctaContainer = object2.ctaContainer;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
items4[2] = <View style={ctaContainer}><Button text={value4 ? Reflect.apply(string, intl,
[t.Ay49KA]) : Reflect.apply(string, intl,
[t.nNsr67])} variant={value4 ? 'tertiary' : 'primary'} onPress={onPress_68065} /></View>;
return (
<>
{items4}
</>
);
}
function _default_68063({emojiNode, nonce}) { // fn#68063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8809:608, offset: 0x01c3d56a, size: 695 bytes, params: 2, frame: 32
const object = {};
const styles = useStyles();
copyDataProperties(object, styles, undefined);
const useSharedMessageEmojiStyles = UseSharedMessageEmojiStylesModule.useSharedMessageEmojiStyles;
copyDataProperties(object, Reflect.apply(useSharedMessageEmojiStyles, UseSharedMessageEmojiStylesModule, []),
undefined);
const guildId = SelectedGuildStore.getGuildId();
(UseTrackOpenPopoutModule).useTrackOpenPopout({currentGuildId: guildId,
nonce: nonce});
const value4 = (EmojiPickerUtilsModule).useIsFavoriteEmoji(guildId,
ReactModule.useMemo(_fun68064, [emojiNode.surrogate]));
const value5 = (UseMaybeAddReactionMarketingEasterEggNote)(emojiNode.content);
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
const emojiContainer = object.emojiContainer;
const emoji_68062 = <Emoji_68062 surrogate={emojiNode.surrogate} />;
const emojiDescriptionWrapper = object.emojiDescriptionWrapper;
const Text = (TextModule).Text;
const text = (
<Text variant="text-md/bold" color="mobile-text-heading-primary">
{value5}
</Text>
);
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
const items4 = [
<View style={emojiContainer}>
{emoji_68062}
<View style={emojiDescriptionWrapper}>
{text}
<Text variant="text-sm/medium">
{Reflect.apply(string, intl, [t.sXdH8c])}
</Text>
</View>
</View>,
];
const FormDivider = (NativeModule).FormDivider;
items4[1] = <FormDivider style={object.divider} />;
const ctaContainer = object.ctaContainer;
const Button = (ButtonNativeModule).Button;
string = intl.string;
items4[2] = (
<View style={ctaContainer}>
<Button
text={value4 ? Reflect.apply(string, intl, [t.Ay49KA]) : Reflect.apply(string, intl, [t.nNsr67])}
variant={value4 ? 'tertiary' : 'primary'}
onPress={onPress_68065}
/>
</View>
);
return (
<>
{items4}
</>
);
function _fun68064() { // fn#68064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8809:780, offset: 0x01c3d821, size: 51 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = importDefault(3797) /* metro dependency 3797: UnicodeEmojis */;
return value.convertSurrogateToBase(emojiNode.surrogate);
}
function _fun68064() { // fn#68064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8809:780, offset: 0x01c3d821, size: 51 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = importDefault(3797) /* metro dependency 3797: UnicodeEmojis */;
return value.convertSurrogateToBase(emojiNode.surrogate);
}
function _default_68063OnPress() { // fn#68065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8809:1450, owner: _default_68063.onPress, offset: 0x01c3d854, size: 69 bytes, params: 1, frame: 13
const binding = env0_2;
if (binding) {
EmojiActionCreatorsModule.unfavoriteEmoji(env0_1);
} else {
EmojiActionCreatorsModule.favoriteEmoji(env0_1);
}
}
function _default_68063OnPress() { // fn#68065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8809:1450, owner: _default_68063.onPress, offset: 0x01c3d854, size: 69 bytes, params: 1, frame: 13
const binding = env0_2;
const emojiActionCreatorsModule = require(8629) /* metro dependency 8629: EmojiActionCreators */;
if (binding) {
emojiActionCreatorsModule.unfavoriteEmoji(env0_1);
} else {
emojiActionCreatorsModule.favoriteEmoji(env0_1);
}
}
global.__d(_fun68061, 8624, [31, 27, 3969, 33, 4501, 697, 8625, 3801, 5475, 4573, 8626, 3797, 8533, 8627, 1244,
7972, 4578, 8629,
2]) /* metro module 8624, dependencies: [31, 27, 3969, 33, 4501, 697, 8625, 3801, 5475, 4573, 8626, 3797, 8533, 8627, 1244, 7972, 4578, 8629, 2] */;
@@ -1,29 +1,32 @@
/* Metro module 8625; source: modules/messages/native/emoji/useSharedMessageEmojiStyles.tsx; dependencies: [4501, 697, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun68066(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8810:6, offset: 0x01c3d899, size: 320 bytes, params: 8, frame: 22
var object4;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(4501) /* metro dependency 4501: createStyles */;
let value = CreateStylesModule;
const createStyles = value.createStyles;
object4 = {emojiContainer: {'flexDirection': 'row', 'alignItems': 'center'},
object = {emojiContainer: {'flexDirection': 'row', 'alignItems': 'center'},
emojiDescriptionWrapper: {'flexDirection': 'column', 'flex': 1}, emojiWrapper: {'marginLeft': -8,
'marginRight': 8}};
const object5 = {'width': 40, 'height': 40, 'marginRight': 12, 'borderRadius': null, 'resizeMode': 'contain'};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object4.emojiIcon = object5;
const object6 = {};
const object2 = {'width': 40, 'height': 40, 'marginRight': 12, 'borderRadius': null, 'resizeMode': 'contain'};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.emojiIcon = object2;
const object3 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.marginTop = PX_16;
object3.marginTop = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.marginBottom = PX_16;
object6.marginLeft = 0;
object3.marginBottom = PX_16;
object3.marginLeft = 0;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object6.backgroundColor = BORDER_SUBTLE;
object6.height = 0.5;
object4.divider = object6;
object4.ctaButton = {marginTop: 16};
value = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/emoji/useSharedMessageEmojiStyles.tsx');
object3.backgroundColor = BORDER_SUBTLE;
object3.height = 0.5;
object.divider = object3;
object.ctaButton = {marginTop: 16};
value = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/emoji/useSharedMessageEmojiStyles.tsx');
exports.useSharedMessageEmojiStyles = value;
}
global.__d(_fun68066, 8625, [4501, 697, 2]) /* metro module 8625, dependencies: [4501, 697, 2] */;
@@ -1,8 +1,10 @@
/* Metro module 11343; source: modules/messages/native/getEmbeddedActivityKey.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun86734(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11529:6, offset: 0x01f9e1db, size: 102 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/getEmbeddedActivityKey.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/getEmbeddedActivityKey.tsx');
exports.default = function(a0) {
return '' + a0.location.id + ':' + a0.applicationId + ':' + a0.launchId;
};
@@ -12,3 +14,4 @@ function _fun86734(global, require, importDefault, importAll, module, exports, d
};
}
global.__d(_fun86734, 11343, [2]) /* metro module 11343, dependencies: [2] */;
@@ -1,45 +1,48 @@
/* Metro module 11379; source: modules/messages/native/handlers/handleMessagesLongPressChannel.tsx; dependencies: [4800, 9862, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun87227(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11565:6, offset: 0x01fb47cd, 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/messages/native/handlers/handleMessagesLongPressChannel.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/handlers/handleMessagesLongPressChannel.tsx');
exports.handleMessagesLongPressChannel = handleMessagesLongPressChannel;
}
function handleMessagesLongPressChannel({data}) { // fn#87228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11565:226, offset: 0x01fb4834, size: 137 bytes, params: 2, frame: 18
var r6;
var value;
const guildId = data.guildId;
const channelId = data.channelId;
const messageId = data.messageId;
const originalLink = data.originalLink;
if (channelId != null) {
if (originalLink != null) {
r6 = originalLink;
} else {
value = require(4800) /* metro dependency 4800: ChannelUtils */;
value = value.getChannelPermalink(guildId, channelId, messageId);
r6 = value;
}
if (r6 != null) {
(importDefault(9862) /* metro dependency 9862: showLongPressURLActionSheet */)({urlString: r6,
guildId: guildId,
channelId: channelId, messageId: messageId});
}
} else if (originalLink != null) {
if (originalLink != null) {
r6 = originalLink;
} else {
value = require(4800) /* metro dependency 4800: ChannelUtils */;
value = value.getChannelPermalink(guildId, channelId, messageId);
r6 = value;
}
if (r6 != null) {
(importDefault(9862) /* metro dependency 9862: showLongPressURLActionSheet */)({urlString: r6,
guildId: guildId,
channelId: channelId, messageId: messageId});
function handleMessagesLongPressChannel({data}) { // fn#87228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11565:226, offset: 0x01fb4834, size: 137 bytes, params: 2, frame: 18
var r6;
var value;
const guildId = data.guildId;
const channelId = data.channelId;
const messageId = data.messageId;
const originalLink = data.originalLink;
if (channelId != null) {
if (originalLink != null) {
r6 = originalLink;
} else {
value = require(4800) /* metro dependency 4800: ChannelUtils */;
value = value.getChannelPermalink(guildId, channelId, messageId);
r6 = value;
}
if (r6 != null) {
(importDefault(9862) /* metro dependency 9862: showLongPressURLActionSheet */)({urlString: r6,
guildId: guildId,
channelId: channelId, messageId: messageId});
}
} else if (originalLink != null) {
if (originalLink != null) {
r6 = originalLink;
} else {
value = require(4800) /* metro dependency 4800: ChannelUtils */;
value = value.getChannelPermalink(guildId, channelId, messageId);
r6 = value;
}
if (r6 != null) {
(importDefault(9862) /* metro dependency 9862: showLongPressURLActionSheet */)({urlString: r6,
guildId: guildId,
channelId: channelId, messageId: messageId});
}
}
}
}
global.__d(_fun87227, 11379, [4800, 9862, 2]) /* metro module 11379, dependencies: [4800, 9862, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,9 +1,11 @@
/* Metro module 11395; source: modules/messages/native/handlers/handleMessagesTapGameMention.tsx; dependencies: [9959, 9963, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun87325(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11581:6, offset: 0x01fb8956, 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/messages/native/handlers/handleMessagesTapGameMention.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/handlers/handleMessagesTapGameMention.tsx');
exports.handleMessagesTapGameMention = function({gameId}) {
var defaultImport = importDefault(dependencyMap[0]);
var object = {gameId: gameId};
@@ -13,3 +15,4 @@ function _fun87325(global, require, importDefault, importAll, module, exports, d
};
}
global.__d(_fun87325, 11395, [9959, 9963, 2]) /* metro module 11395, dependencies: [9959, 9963, 2] */;
@@ -1,468 +1,475 @@
/* Metro module 11348; source: modules/messages/native/handlers/handleMessagesTapImage.tsx; dependencies: [4833, 3793, 1878, 661, 9548, 9877, 679, 9546, 3853, 4633, 9544, 4805, 6647, 2] */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import ReferencedMessageStore from '../../../replies/ReferencedMessageStore.tsx'; /* Metro dependency 4833 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as MessageReferenceTypesModule from '../../../../external/discord_common/js/shared/shared-constants/MessageReferenceTypes.tsx'; /* Metro dependency 679 */
function _fun86899(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11534:6, offset: 0x01fa6531, size: 172 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const referencedMessageStore = importDefault(4833) /* metro dependency 4833: ReferencedMessageStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).MessageTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/handlers/handleMessagesTapImage.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/handlers/handleMessagesTapImage.tsx');
exports.handleMessagesTapImage = handleMessagesTapImage;
}
function handleMessagesTapImage({tapImageData, allowWithinModal, message, messageChannel, selectedChannelId, showContextName}) { // fn#86900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11534:275, offset: 0x01fa65dd, size: 1476 bytes, params: 2, frame: 42
var environment;
var r17;
var r16;
var r26;
var r23;
var components;
var r6;
var r7;
var value2;
var moduleValue;
var markPortalAlive;
var moduleValue2;
var messageReference;
var getMessageByReference;
var message2;
var property;
var length;
var moduleValue3;
var extractMediaFromAttachment;
var guild_id;
var url;
var moduleValue4;
var value6;
var value7;
var moduleValue5;
var flattenSource;
var value8;
var accessoryType;
var mediaViewIndex;
var mediaIndex;
var value9;
var noCarousel;
var moduleValue6;
var setMediaSourcePortal;
var value10;
var object;
var moduleValue7;
var embeds;
var find;
var value11;
var moduleValue8;
var extractMediaSourcesFromComponent;
var moduleValue9;
var asComponentId;
var value12;
var sources;
var initialIndex;
var moduleValue10;
var moduleValue11;
var extractMediaSourcesFromEmbed;
var value13;
var binding;
var moduleValue12;
var some;
var value14;
var moduleValue13;
var openMediaModal;
var id;
var moduleValue14;
var computeChannelName;
var channelName;
var moduleValue15;
var getChannelIcon;
var value15;
var defaultImport;
var Error;
var concat;
const index = tapImageData.index;
const type2 = tapImageData.type;
const layout = tapImageData.layout;
const portal = tapImageData.portal;
const embedIndex = tapImageData.embedIndex;
const componentId = tapImageData.componentId;
const componentMediaIndex = tapImageData.componentMediaIndex;
const embedId = tapImageData.embedId;
const value = undefined;
reducibleJoin2: while (true) {
if (portal == null) {
function handleMessagesTapImage({tapImageData, allowWithinModal, message, messageChannel, selectedChannelId, showContextName}) { // fn#86900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11534:275, offset: 0x01fa65dd, size: 1476 bytes, params: 2, frame: 42
var environment;
var r17;
var r16;
var r26;
var r23;
var components;
var r6;
var r7;
var value2;
var moduleValue;
var markPortalAlive;
var moduleValue2;
var messageReference;
var referencedMessageStoreBinding;
var getMessageByReference;
var message2;
var property;
var length;
var moduleValue3;
var extractMediaFromAttachment;
var guild_id;
var url;
var moduleValue4;
var value6;
var value7;
var moduleValue5;
var flattenSource;
var value8;
var accessoryType;
var mediaViewIndex;
var mediaIndex;
var value9;
var noCarousel;
var moduleValue6;
var setMediaSourcePortal;
var value10;
var object;
var moduleValue7;
var embeds;
var find;
var value11;
var moduleValue8;
var extractMediaSourcesFromComponent;
var moduleValue9;
var asComponentId;
var value12;
var sources;
var initialIndex;
var moduleValue10;
var moduleValue11;
var extractMediaSourcesFromEmbed;
var value13;
var binding;
var moduleValue12;
var some;
var value14;
var moduleValue13;
var openMediaModal;
var id;
var moduleValue14;
var computeChannelName;
var channelName;
var moduleValue15;
var getChannelIcon;
var value15;
var defaultImport;
var Error;
var concat;
const index = tapImageData.index;
const type2 = tapImageData.type;
const layout = tapImageData.layout;
const portal = tapImageData.portal;
const embedIndex = tapImageData.embedIndex;
const componentId = tapImageData.componentId;
const componentMediaIndex = tapImageData.componentMediaIndex;
const embedId = tapImageData.embedId;
const value = undefined;
reducibleJoin2: while (true) {
if (portal == null) {
break reducibleJoin2;
}
value2 = environment;
moduleValue = require(9548) /* metro dependency 9548: NativePortalView */;
markPortalAlive = moduleValue.markPortalAlive;
Reflect.apply(markPortalAlive, moduleValue, [portal]);
break reducibleJoin2;
}
value2 = environment;
moduleValue = require(9548) /* metro dependency 9548: NativePortalView */;
markPortalAlive = moduleValue.markPortalAlive;
Reflect.apply(markPortalAlive, moduleValue, [portal]);
break reducibleJoin2;
}
if (allowWithinModal !== true) {
moduleValue2 = require(9877) /* metro dependency 9877: isAlertOrActionSheetOpen */;
reducibleJoin4: while (true) {
if (moduleValue2.isAlertOrActionSheetOpen(selectedChannelId)) {
return value;
if (allowWithinModal !== true) {
moduleValue2 = require(9877) /* metro dependency 9877: isAlertOrActionSheetOpen */;
reducibleJoin4: while (true) {
if (moduleValue2.isAlertOrActionSheetOpen(selectedChannelId)) {
return value;
}
break reducibleJoin4;
}
break reducibleJoin4;
}
}
if (type2 !== 'attachment') {
reducibleJoin8: while (true) {
if (type2 === 'embed') {
if (type2 !== 'attachment') {
reducibleJoin8: while (true) {
if (type2 === 'embed') {
break reducibleJoin8;
}
if (type2 === 'sticker') {
break reducibleJoin8;
}
if (type2 !== 'component') {
Error = global.Error;
concat = global.HermesInternal.concat;
throw new Error('Unsupported thumbnail type: ' + type2);
}
break reducibleJoin8;
}
if (type2 === 'sticker') {
break reducibleJoin8;
}
let type = message.type;
const THREAD_STARTER_MESSAGE = MessageTypes.THREAD_STARTER_MESSAGE;
reducibleJoin11: while (true) {
if (type !== THREAD_STARTER_MESSAGE) {
r17 = message;
break reducibleJoin11;
}
if (type2 !== 'component') {
Error = global.Error;
concat = global.HermesInternal.concat;
throw new Error('Unsupported thumbnail type: ' + type2);
messageReference = message.messageReference;
if (messageReference == null) {
r17 = message;
break reducibleJoin11;
}
break reducibleJoin8;
}
}
let type = message.type;
const THREAD_STARTER_MESSAGE = MessageTypes.THREAD_STARTER_MESSAGE;
reducibleJoin11: while (true) {
if (type !== THREAD_STARTER_MESSAGE) {
r17 = message;
referencedMessageStoreBinding = ReferencedMessageStore;
getMessageByReference = referencedMessageStoreBinding.getMessageByReference;
messageReference = message.messageReference;
message2 = Reflect.apply(getMessageByReference, referencedMessageStoreBinding, [messageReference]).message;
if (message2 == null) {
r17 = message;
break reducibleJoin11;
}
r17 = message2;
break reducibleJoin11;
}
messageReference = message.messageReference;
if (messageReference == null) {
r17 = message;
break reducibleJoin11;
}
getMessageByReference = ReferencedMessageStore.getMessageByReference;
messageReference = message.messageReference;
message2 = Reflect.apply(getMessageByReference, ReferencedMessageStore, [messageReference]).message;
if (message2 == null) {
r17 = message;
break reducibleJoin11;
}
r17 = message2;
break reducibleJoin11;
}
messageReference = r17.messageReference;
reducibleJoin13: while (true) {
if (messageReference == null) {
type = value;
messageReference = r17.messageReference;
reducibleJoin13: while (true) {
if (messageReference == null) {
type = value;
break reducibleJoin13;
}
type = messageReference.type;
break reducibleJoin13;
}
type = messageReference.type;
break reducibleJoin13;
}
const MessageReferenceTypes = (require(679) /* metro dependency 679: MessageReferenceTypes */).MessageReferenceTypes;
const FORWARD = MessageReferenceTypes.FORWARD;
if (type !== FORWARD) {
r16 = r17;
} else {
property = r17.messageSnapshots[0];
reducibleJoin16: while (true) {
if (property == null) {
message = value;
const MessageReferenceTypes = (MessageReferenceTypesModule).MessageReferenceTypes;
const FORWARD = MessageReferenceTypes.FORWARD;
if (type !== FORWARD) {
r16 = r17;
} else {
property = r17.messageSnapshots[0];
reducibleJoin16: while (true) {
if (property == null) {
message = value;
break reducibleJoin16;
}
message = property.message;
break reducibleJoin16;
}
message = property.message;
break reducibleJoin16;
}
reducibleJoin17: while (true) {
if (message == null) {
return value;
}
r16 = message;
break reducibleJoin17;
}
}
const value5 = r17.attachments.filter(_fun86901);
if (type2 === 'attachment') {
length = value5.length;
reducibleJoin22: while (true) {
if (index < length) {
property = value5[index];
moduleValue3 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
extractMediaFromAttachment = moduleValue3.extractMediaFromAttachment;
guild_id = messageChannel.guild_id;
if (Reflect.apply(extractMediaFromAttachment, moduleValue3, [property, r17, index, guild_id]) != null) {
break reducibleJoin22;
}
url = property.url;
if (url == null) {
break reducibleJoin22;
}
url = property.url;
if (url !== '') {
defaultImport = importDefault(3853) /* metro dependency 3853: Linking */;
defaultImport.openURL(property.url);
reducibleJoin17: while (true) {
if (message == null) {
return value;
}
r16 = message;
break reducibleJoin17;
}
}
const value5 = r17.attachments.filter(_fun86901);
if (type2 === 'attachment') {
length = value5.length;
reducibleJoin22: while (true) {
if (index < length) {
property = value5[index];
moduleValue3 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
extractMediaFromAttachment = moduleValue3.extractMediaFromAttachment;
guild_id = messageChannel.guild_id;
if (Reflect.apply(extractMediaFromAttachment, moduleValue3, [property, r17, index, guild_id]) != null) {
break reducibleJoin22;
}
url = property.url;
if (url == null) {
break reducibleJoin22;
}
url = property.url;
if (url !== '') {
defaultImport = importDefault(3853) /* metro dependency 3853: Linking */;
defaultImport.openURL(property.url);
return value;
}
break reducibleJoin22;
}
break reducibleJoin22;
}
break reducibleJoin22;
}
}
let env0_1 = -1;
if (type2 === 'embed') {
reducibleJoin24: while (true) {
if (embedIndex != null) {
embeds = r16.embeds;
property = embeds[index];
env0_1 = embedIndex;
moduleValue11 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
extractMediaSourcesFromEmbed = moduleValue11.extractMediaSourcesFromEmbed;
guild_id = messageChannel.guild_id;
value13 = Reflect.apply(extractMediaSourcesFromEmbed, moduleValue11, [r17, r16, property, index,
guild_id]);
binding = env0_1;
length = value13.length;
reducibleJoin51: while (true) {
if (binding < length) {
moduleValue12 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
setMediaSourcePortal = moduleValue12.setMediaSourcePortal;
Reflect.apply(setMediaSourcePortal, moduleValue12, [value13[env0_1], portal]);
let env0_1 = -1;
if (type2 === 'embed') {
reducibleJoin24: while (true) {
if (embedIndex != null) {
embeds = r16.embeds;
property = embeds[index];
env0_1 = embedIndex;
moduleValue11 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
extractMediaSourcesFromEmbed = moduleValue11.extractMediaSourcesFromEmbed;
guild_id = messageChannel.guild_id;
value13 = Reflect.apply(extractMediaSourcesFromEmbed, moduleValue11, [r17, r16, property, index,
guild_id]);
binding = env0_1;
length = value13.length;
reducibleJoin51: while (true) {
if (binding < length) {
moduleValue12 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
setMediaSourcePortal = moduleValue12.setMediaSourcePortal;
Reflect.apply(setMediaSourcePortal, moduleValue12, [value13[env0_1], portal]);
r6 = value13;
break reducibleJoin51;
}
r6 = value13;
break reducibleJoin51;
}
r6 = value13;
break reducibleJoin51;
}
some = r6.some;
value14 = Reflect.apply(some, r6, [_fun86904]);
reducibleJoin60: while (true) {
if (env0_1 === -1) {
break reducibleJoin60;
}
moduleValue13 = require(9544) /* metro dependency 9544: openMediaModal */;
openMediaModal = moduleValue13.openMediaModal;
object = {disableDownload: value14, initialSources: r6, initialIndex: env0_1,
originViewOrOriginLayout: layout,
analyticsSource: 'Channel'};
id = messageChannel.id;
object.channelId = id;
reducibleJoin54: while (true) {
if (showContextName) {
moduleValue14 = require(4805) /* metro dependency 4805: useChannelName */;
computeChannelName = moduleValue14.computeChannelName;
channelName = Reflect.apply(computeChannelName, moduleValue14, [messageChannel, UserStore,
RelationshipStore,
false]);
r7 = channelName;
some = r6.some;
value14 = Reflect.apply(some, r6, [_fun86904]);
reducibleJoin60: while (true) {
if (env0_1 === -1) {
break reducibleJoin60;
}
moduleValue13 = require(9544) /* metro dependency 9544: openMediaModal */;
openMediaModal = moduleValue13.openMediaModal;
object = {disableDownload: value14, initialSources: r6, initialIndex: env0_1,
originViewOrOriginLayout: layout,
analyticsSource: 'Channel'};
id = messageChannel.id;
object.channelId = id;
reducibleJoin54: while (true) {
if (showContextName) {
moduleValue14 = require(4805) /* metro dependency 4805: useChannelName */;
computeChannelName = moduleValue14.computeChannelName;
channelName = Reflect.apply(computeChannelName, moduleValue14, [messageChannel, UserStore,
RelationshipStore,
false]);
r7 = channelName;
break reducibleJoin54;
}
r7 = value;
break reducibleJoin54;
}
r7 = value;
break reducibleJoin54;
}
object.contextName = r7;
reducibleJoin56: while (true) {
if (showContextName) {
moduleValue15 = require(6647) /* metro dependency 6647: ChannelUtils */;
getChannelIcon = moduleValue15.getChannelIcon;
value15 = Reflect.apply(getChannelIcon, moduleValue15, [messageChannel]);
r7 = value15;
object.contextName = r7;
reducibleJoin56: while (true) {
if (showContextName) {
moduleValue15 = require(6647) /* metro dependency 6647: ChannelUtils */;
getChannelIcon = moduleValue15.getChannelIcon;
value15 = Reflect.apply(getChannelIcon, moduleValue15, [messageChannel]);
r7 = value15;
break reducibleJoin56;
}
r7 = value;
break reducibleJoin56;
}
r7 = value;
break reducibleJoin56;
object.contextIcon = r7;
Reflect.apply(openMediaModal, moduleValue13, [object]);
break reducibleJoin60;
}
object.contextIcon = r7;
Reflect.apply(openMediaModal, moduleValue13, [object]);
break reducibleJoin60;
return value;
}
break reducibleJoin24;
}
}
if (type2 === 'component') {
if (componentId == null) {
return null;
}
reducibleJoin42: while (true) {
reducibleJoin41: while (true) {
if (embedId == null) {
break reducibleJoin41;
}
if (embedId === '') {
break reducibleJoin41;
}
embeds = r16.embeds;
find = embeds.find;
value11 = Reflect.apply(find, embeds, [function({id}) {
return id === embedId;
}]);
reducibleJoin40: while (true) {
if (value11 == null) {
components = value;
break reducibleJoin40;
}
components = value11.components;
break reducibleJoin40;
}
break reducibleJoin42;
}
components = r16.components;
break reducibleJoin42;
}
reducibleJoin51: while (true) {
reducibleJoin47: while (true) {
if (components == null) {
break reducibleJoin47;
}
length = components.length;
if (length === 0) {
break reducibleJoin47;
}
moduleValue8 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
extractMediaSourcesFromComponent = moduleValue8.extractMediaSourcesFromComponent;
guild_id = messageChannel.guild_id;
moduleValue9 = require(4633) /* metro dependency 4633: InteractionComponentTypes */;
asComponentId = moduleValue9.asComponentId;
value12 = Reflect.apply(extractMediaSourcesFromComponent, moduleValue8, [r17, components, guild_id,
Reflect.apply(asComponentId, moduleValue9, [componentId]), componentMediaIndex]);
if (value12 == null) {
return value;
}
sources = value12.sources;
initialIndex = value12.initialIndex;
env0_1 = initialIndex;
moduleValue10 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
setMediaSourcePortal = moduleValue10.setMediaSourcePortal;
Reflect.apply(setMediaSourcePortal, moduleValue10, [sources[env0_1], portal]);
r6 = sources;
break reducibleJoin51;
}
return value;
}
break reducibleJoin24;
}
}
if (type2 === 'component') {
if (componentId == null) {
return null;
}
reducibleJoin42: while (true) {
reducibleJoin41: while (true) {
if (embedId == null) {
break reducibleJoin41;
}
if (embedId === '') {
break reducibleJoin41;
}
embeds = r16.embeds;
find = embeds.find;
value11 = Reflect.apply(find, embeds, [function({id}) {
return id === embedId;
}]);
reducibleJoin40: while (true) {
if (value11 == null) {
components = value;
break reducibleJoin40;
}
components = value11.components;
break reducibleJoin40;
}
break reducibleJoin42;
}
components = r16.components;
break reducibleJoin42;
}
reducibleJoin51: while (true) {
reducibleJoin47: while (true) {
if (components == null) {
break reducibleJoin47;
}
length = components.length;
if (length === 0) {
break reducibleJoin47;
}
moduleValue8 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
extractMediaSourcesFromComponent = moduleValue8.extractMediaSourcesFromComponent;
guild_id = messageChannel.guild_id;
moduleValue9 = require(4633) /* metro dependency 4633: InteractionComponentTypes */;
asComponentId = moduleValue9.asComponentId;
value12 = Reflect.apply(extractMediaSourcesFromComponent, moduleValue8, [r17, components, guild_id,
Reflect.apply(asComponentId, moduleValue9, [componentId]), componentMediaIndex]);
if (value12 == null) {
return value;
}
sources = value12.sources;
initialIndex = value12.initialIndex;
env0_1 = initialIndex;
moduleValue10 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
setMediaSourcePortal = moduleValue10.setMediaSourcePortal;
Reflect.apply(setMediaSourcePortal, moduleValue10, [sources[env0_1], portal]);
r6 = sources;
break reducibleJoin51;
}
return value;
}
} else {
moduleValue4 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
value6 = moduleValue4.extractMediaSourcesFromMessage(r17, r16, messageChannel.guild_id);
length = value6.length;
value7 = 0;
if (value7 < length) {
r26 = value7;
reducibleLoop26: while (true) {
moduleValue5 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
flattenSource = moduleValue5.flattenSource;
value8 = Reflect.apply(flattenSource, moduleValue5, [value6[r26]]);
if (value8 != null) {
accessoryType = value8.accessoryType;
reducibleJoin31: while (true) {
if (accessoryType !== type2) {
break reducibleJoin31;
}
mediaViewIndex = value8.mediaViewIndex;
reducibleJoin30: while (true) {
if (mediaViewIndex != null) {
r23 = mediaViewIndex;
} else {
moduleValue4 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
value6 = moduleValue4.extractMediaSourcesFromMessage(r17, r16, messageChannel.guild_id);
length = value6.length;
value7 = 0;
if (value7 < length) {
r26 = value7;
reducibleLoop26: while (true) {
moduleValue5 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
flattenSource = moduleValue5.flattenSource;
value8 = Reflect.apply(flattenSource, moduleValue5, [value6[r26]]);
if (value8 != null) {
accessoryType = value8.accessoryType;
reducibleJoin31: while (true) {
if (accessoryType !== type2) {
break reducibleJoin31;
}
mediaViewIndex = value8.mediaViewIndex;
reducibleJoin30: while (true) {
if (mediaViewIndex != null) {
r23 = mediaViewIndex;
break reducibleJoin30;
}
mediaIndex = value8.mediaIndex;
r23 = mediaIndex;
break reducibleJoin30;
}
mediaIndex = value8.mediaIndex;
r23 = mediaIndex;
break reducibleJoin30;
}
if (r23 === index) {
noCarousel = value8.noCarousel;
if (noCarousel) {
property = value6[r26];
object = [property];
env0_1 = value7;
moduleValue7 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
setMediaSourcePortal = moduleValue7.setMediaSourcePortal;
Reflect.apply(setMediaSourcePortal, moduleValue7, [object[value7], portal]);
r6 = object;
} else {
env0_1 = r26;
moduleValue6 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
setMediaSourcePortal = moduleValue6.setMediaSourcePortal;
Reflect.apply(setMediaSourcePortal, moduleValue6, [value6[r26], portal]);
value10 = value6.filter(_fun86903);
r6 = value10;
if (r23 === index) {
noCarousel = value8.noCarousel;
if (noCarousel) {
property = value6[r26];
object = [property];
env0_1 = value7;
moduleValue7 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
setMediaSourcePortal = moduleValue7.setMediaSourcePortal;
Reflect.apply(setMediaSourcePortal, moduleValue7, [object[value7], portal]);
r6 = object;
} else {
env0_1 = r26;
moduleValue6 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
setMediaSourcePortal = moduleValue6.setMediaSourcePortal;
Reflect.apply(setMediaSourcePortal, moduleValue6, [value6[r26], portal]);
value10 = value6.filter(_fun86903);
r6 = value10;
}
break reducibleLoop26;
}
break reducibleLoop26;
break reducibleJoin31;
}
break reducibleJoin31;
}
value9 = typeof r26 === 'bigint' ? r26 + 1n : +r26 + 1;
length = value6.length;
if (value9 < length) {
r26 = value9;
continue reducibleLoop26;
}
r6 = value6;
break reducibleLoop26;
}
value9 = typeof r26 === 'bigint' ? r26 + 1n : +r26 + 1;
length = value6.length;
if (value9 < length) {
r26 = value9;
continue reducibleLoop26;
}
} else {
r6 = value6;
break reducibleLoop26;
}
} else {
r6 = value6;
}
}
reducibleJoin60: while (true) {
if (env0_1 === -1) {
break reducibleJoin60;
}
moduleValue13 = require(9544) /* metro dependency 9544: openMediaModal */;
openMediaModal = moduleValue13.openMediaModal;
object = {disableDownload: r6.some(_fun86904), initialSources: r6, initialIndex: env0_1,
originViewOrOriginLayout: layout, analyticsSource: 'Channel'};
id = messageChannel.id;
object.channelId = id;
reducibleJoin54: while (true) {
if (showContextName) {
moduleValue14 = require(4805) /* metro dependency 4805: useChannelName */;
computeChannelName = moduleValue14.computeChannelName;
channelName = Reflect.apply(computeChannelName, moduleValue14, [messageChannel, UserStore,
RelationshipStore,
false]);
r7 = channelName;
reducibleJoin60: while (true) {
if (env0_1 === -1) {
break reducibleJoin60;
}
moduleValue13 = require(9544) /* metro dependency 9544: openMediaModal */;
openMediaModal = moduleValue13.openMediaModal;
object = {disableDownload: r6.some(_fun86904), initialSources: r6, initialIndex: env0_1,
originViewOrOriginLayout: layout, analyticsSource: 'Channel'};
id = messageChannel.id;
object.channelId = id;
reducibleJoin54: while (true) {
if (showContextName) {
moduleValue14 = require(4805) /* metro dependency 4805: useChannelName */;
computeChannelName = moduleValue14.computeChannelName;
channelName = Reflect.apply(computeChannelName, moduleValue14, [messageChannel, UserStore,
RelationshipStore,
false]);
r7 = channelName;
break reducibleJoin54;
}
r7 = value;
break reducibleJoin54;
}
r7 = value;
break reducibleJoin54;
}
object.contextName = r7;
reducibleJoin56: while (true) {
if (showContextName) {
moduleValue15 = require(6647) /* metro dependency 6647: ChannelUtils */;
getChannelIcon = moduleValue15.getChannelIcon;
value15 = Reflect.apply(getChannelIcon, moduleValue15, [messageChannel]);
r7 = value15;
object.contextName = r7;
reducibleJoin56: while (true) {
if (showContextName) {
moduleValue15 = require(6647) /* metro dependency 6647: ChannelUtils */;
getChannelIcon = moduleValue15.getChannelIcon;
value15 = Reflect.apply(getChannelIcon, moduleValue15, [messageChannel]);
r7 = value15;
break reducibleJoin56;
}
r7 = value;
break reducibleJoin56;
}
r7 = value;
break reducibleJoin56;
object.contextIcon = r7;
Reflect.apply(openMediaModal, moduleValue13, [object]);
break reducibleJoin60;
}
object.contextIcon = r7;
Reflect.apply(openMediaModal, moduleValue13, [object]);
break reducibleJoin60;
return value;
function _fun86901(a0) { // fn#86901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11534:1051, offset: 0x01fa6ba1, size: 44 bytes, params: 2, frame: 11
let value = environment.__proto__;
value = require(9546) /* metro dependency 9546: MediaSourceUtil */;
return !value.isThumbnailAttachment(a0);
}
function _fun86903(a0, a1) { // fn#86903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11534:2104, offset: 0x01fa6bcd, size: 96 bytes, params: 3, frame: 12
var binding;
let value = environment.__proto__;
value = require(9546) /* metro dependency 9546: MediaSourceUtil */;
value = value.flattenSource(a0);
const r0 = value != null && !value.noCarousel;
if (!r0 && env0_1 >= a1) {
binding = env0_1;
env0_1 = typeof binding === 'bigint' ? binding - 1n : +binding - 1;
}
return r0;
}
function _fun86904(a0) { // fn#86904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11534:2216, offset: 0x01fa6c2d, size: 59 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = require(9546) /* metro dependency 9546: MediaSourceUtil */;
value = value.flattenSource(a0, true);
return value != null && value.disableDownload;
}
}
return value;
}
function _fun86901(a0) { // fn#86901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11534:1051, offset: 0x01fa6ba1, size: 44 bytes, params: 2, frame: 11
let value = environment.__proto__;
value = require(9546) /* metro dependency 9546: MediaSourceUtil */;
return !value.isThumbnailAttachment(a0);
}
function _fun86903(a0, a1) { // fn#86903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11534:2104, offset: 0x01fa6bcd, size: 96 bytes, params: 3, frame: 12
var binding;
let value = environment.__proto__;
value = require(9546) /* metro dependency 9546: MediaSourceUtil */;
value = value.flattenSource(a0);
const r0 = value != null && !value.noCarousel;
if (!r0 && env0_1 >= a1) {
binding = env0_1;
env0_1 = typeof binding === 'bigint' ? binding - 1n : +binding - 1;
}
return r0;
}
function _fun86904(a0) { // fn#86904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11534:2216, offset: 0x01fa6c2d, size: 59 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = require(9546) /* metro dependency 9546: MediaSourceUtil */;
value = value.flattenSource(a0, true);
return value != null && value.disableDownload;
}
global.__d(_fun86899, 11348, [4833, 3793, 1878, 661, 9548, 9877, 679, 9546, 3853, 4633, 9544, 4805, 6647,
2]) /* metro module 11348, dependencies: [4833, 3793, 1878, 661, 9548, 9877, 679, 9546, 3853, 4633, 9544, 4805, 6647, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,51 +1,56 @@
/* Metro module 11344; source: modules/messages/native/hooks/useChannelLoading.tsx; dependencies: [57, 31, 11345, 9835, 4595, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
function _fun86737(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11530:6, offset: 0x01f9e2c4, size: 137 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 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/hooks/useChannelLoading.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/hooks/useChannelLoading.tsx');
exports.default = useChannelLoading;
function useChannelLoading({channelId, jumpTargetId, oldestUnreadMessageId, shouldJumpToOriginalPost}) { // fn#86738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11530:211, offset: 0x01f9e34d, size: 150 bytes, params: 2, frame: 16
const property = shouldJumpToOriginalPost(ReactModule.useState(_fun86739), 1)[0];
const startOrCancelLatestMessagesLoad2 = startOrCancelLatestMessagesLoad;
(importDefault(4595) /* metro dependency 4595: useMountEffect */)(function() {
startOrCancelLatestMessagesLoad(false);
return _fun86742;
});
return {channelLatestMessageLoadingStatsManager: property,
startOrCancelLatestMessagesLoad: startOrCancelLatestMessagesLoad2};
function _fun86739() { // fn#86739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11530:337, offset: 0x01f9e3e3, size: 51 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = importDefault(11345) /* metro dependency 11345: ChannelLatestMessageLoadingStatsManager */;
const value2 = Object.create(value.prototype, {constructor: {value: value}});
value = new value('Messages');
return value instanceof Object ? value : value2;
}
function startOrCancelLatestMessagesLoad(a0) { // fn#86740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11530:412, owner: useChannelLoading.startOrCancelLatestMessagesLoad, offset: 0x01f9e416, size: 95 bytes, params: 2, frame: 15
let value = environment.__proto__;
value = require(9835) /* metro dependency 9835: MessagesUtils */;
const startOrCancelChannelLatestMessagesLoad = value.startOrCancelChannelLatestMessagesLoad;
const object = {};
object.jumpTargetId = jumpTargetId;
object.oldestUnreadMessageId = oldestUnreadMessageId;
object.shouldJumpToOriginalPost = shouldJumpToOriginalPost(a0);
object.channelId = channelId;
object.tracker = ReactModule;
Reflect.apply(startOrCancelChannelLatestMessagesLoad, value, [object]);
}
function _fun86741() { // fn#86741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11530:574, offset: 0x01f9e475, size: 27 bytes, params: 1, frame: 11
startOrCancelLatestMessagesLoad(false);
return _fun86742;
function _fun86742() { // fn#86742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11530:615, offset: 0x01f9e490, size: 21 bytes, params: 1, frame: 9
env1_4.cancel();
}
}
}
}
function useChannelLoading({channelId, jumpTargetId, oldestUnreadMessageId, shouldJumpToOriginalPost}) { // fn#86738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11530:211, offset: 0x01f9e34d, size: 150 bytes, params: 2, frame: 16
const property = shouldJumpToOriginalPost(env0_4.useState(_fun86739), 1)[0];
const closure = startOrCancelLatestMessagesLoad;
(importDefault(4595) /* metro dependency 4595: useMountEffect */)(function() {
startOrCancelLatestMessagesLoad(false);
return _fun86742;
});
return {channelLatestMessageLoadingStatsManager: property, startOrCancelLatestMessagesLoad: closure};
}
function _fun86739() { // fn#86739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11530:337, offset: 0x01f9e3e3, size: 51 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = importDefault(11345) /* metro dependency 11345: ChannelLatestMessageLoadingStatsManager */;
const value2 = Object.create(value.prototype, {constructor: {value: value}});
value = new value('Messages');
return value instanceof Object ? value : value2;
}
function startOrCancelLatestMessagesLoad(a0) { // fn#86740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11530:412, owner: useChannelLoading.startOrCancelLatestMessagesLoad, offset: 0x01f9e416, size: 95 bytes, params: 2, frame: 15
let value = environment.__proto__;
value = require(9835) /* metro dependency 9835: MessagesUtils */;
const startOrCancelChannelLatestMessagesLoad = value.startOrCancelChannelLatestMessagesLoad;
const object2 = {};
object2.jumpTargetId = jumpTargetId;
object2.oldestUnreadMessageId = oldestUnreadMessageId;
object2.shouldJumpToOriginalPost = shouldJumpToOriginalPost(a0);
object2.channelId = channelId;
object2.tracker = env0_4;
Reflect.apply(startOrCancelChannelLatestMessagesLoad, value, [object2]);
}
function _fun86741() { // fn#86741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11530:574, offset: 0x01f9e475, size: 27 bytes, params: 1, frame: 11
startOrCancelLatestMessagesLoad(false);
return _fun86742;
}
function _fun86742() { // fn#86742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11530:615, offset: 0x01f9e490, size: 21 bytes, params: 1, frame: 9
env1_4.cancel();
}
global.__d(_fun86737, 11344, [57, 31, 11345, 9835, 4595,
2]) /* metro module 11344, dependencies: [57, 31, 11345, 9835, 4595, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,92 +1,142 @@
/* Metro module 11346; source: modules/messages/native/hooks/useScrollHandlers.tsx; dependencies: [31, 7729, 3, 4559, 9764, 690, 9850, 9852, 6531, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as UseChatBottomManagerUIStoreModule from '../../../chat_input/native/useChatBottomManagerUIStore.tsx'; /* Metro dependency 7729 */
import * as ChatChangesetUpdateTrackerModule from '../../../chat/native/ChatChangesetUpdateTracker.tsx'; /* Metro dependency 9852 */
function _fun86749(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:6, offset: 0x01f9e6fc, size: 195 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 */;
let value = require(7729) /* metro dependency 7729: useChatBottomManagerUIStore */;
let value = UseChatBottomManagerUIStoreModule;
const env0_4 = value.updateIsAtBottom;
const env0_5 = value.updateShouldShowJumpToPresentButton;
value = importDefault(3) /* metro dependency 3: Logger */;
value = new value('useScrollHandlers');
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/hooks/useScrollHandlers.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/hooks/useScrollHandlers.tsx');
exports.default = useScrollHandlers;
}
function useScrollHandlers({chatRef, chatManager, chatUpdatesQueue, pendingUpdatesQueueRef, animatedRef, fetchMoreBefore, fetchMoreAfter, handleVisibleMessagesChange, applyNativeRowsUpdate, messages, channel, channelId, screenIndex, onScroll, useReducedMotion, isStaff, visibleMessagesWindowHandler}) { // fn#86750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:308, offset: 0x01f9e7bf, size: 445 bytes, params: 2, frame: 21
const binding = pendingUpdatesQueueRef;
return {hasHandledScrollRef: binding.useRef(false), isAtBottomRef: binding.useRef(false),
isNearBottomRef: binding.useRef(false), isNearTopRef: binding.useRef(false),
deceleratingRef: binding.useRef(false), draggingRef: binding.useRef(false),
firstIgnoredScrollEventTimestampRef: binding.useRef(undefined), loadMoreBefore: function() {
animatedRef.current = true;
fetchMoreBefore();
}, loadMoreAfter: function() {
animatedRef.current = true;
fetchMoreAfter();
}, scrollToTop: scrollToTop_86756, scrollToRelativeOffset: scrollToRelativeOffset_86757,
scrollToTopMessage: scrollToTopMessage_86758, updateNativeRows: updateNativeRows,
handleScrollCallbacks: handleScrollCallbacks, handleScroll: handleScroll,
handleScrollPosition: handleScrollPosition};
}
function handleScrollCallbacks({eventTimestamp, isAtBottom, isNearBottom, isNearTop, dragging, decelerating, isFirstMessageVisible}) { // fn#86753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:837, owner: useScrollHandlers.handleScrollCallbacks, offset: 0x01f9e9b2, size: 436 bytes, params: 2, frame: 26
var r10;
var r5;
var loadingMore;
var value3;
var isScreenReaderEnabled;
var defaultImport;
isNearBottom = !(isNearBottom === undefined) && isNearBottom;
isNearTop = !(isNearTop === undefined) && isNearTop;
dragging = !(dragging === undefined) && dragging;
decelerating = !(decelerating === undefined) && decelerating;
isFirstMessageVisible = !(isFirstMessageVisible === undefined) && isFirstMessageVisible;
if (channel == null) {
return false;
}
if (messages.length !== 0) {
value3 = environment.__proto__;
isScreenReaderEnabled = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).getIsScreenReaderEnabled();
loadingMore = messages.loadingMore;
if (loadingMore) {
r5 = !loadingMore;
} else {
r10 = dragging || decelerating;
r10 = !r10 ? isScreenReaderEnabled : r10;
r5 = r10;
}
r5 = r5 && pendingUpdatesQueueRef.current.length === 0;
if (env0_21.current) {
if (env0_20.current) {
if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
function useScrollHandlers({chatRef, chatManager, chatUpdatesQueue, pendingUpdatesQueueRef, animatedRef, fetchMoreBefore, fetchMoreAfter, handleVisibleMessagesChange, applyNativeRowsUpdate, messages, channel, channelId, screenIndex, onScroll, useReducedMotion, isStaff, visibleMessagesWindowHandler}) { // fn#86750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:308, offset: 0x01f9e7bf, size: 445 bytes, params: 2, frame: 21
const binding = pendingUpdatesQueueRef;
return {hasHandledScrollRef: binding.useRef(false), isAtBottomRef: binding.useRef(false),
isNearBottomRef: binding.useRef(false), isNearTopRef: binding.useRef(false),
deceleratingRef: binding.useRef(false), draggingRef: binding.useRef(false),
firstIgnoredScrollEventTimestampRef: binding.useRef(undefined), loadMoreBefore: function() {
animatedRef.current = true;
fetchMoreBefore();
}, loadMoreAfter: function() {
animatedRef.current = true;
fetchMoreAfter();
}, scrollToTop: scrollToTop_86756, scrollToRelativeOffset: scrollToRelativeOffset_86757,
scrollToTopMessage: scrollToTopMessage_86758, updateNativeRows: updateNativeRows,
handleScrollCallbacks: handleScrollCallbacks, handleScroll: handleScroll_86754,
handleScrollPosition: handleScrollPosition_86760};
function handleScrollCallbacks({eventTimestamp, isAtBottom, isNearBottom, isNearTop, dragging, decelerating, isFirstMessageVisible}) { // fn#86753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:837, owner: useScrollHandlers.handleScrollCallbacks, offset: 0x01f9e9b2, size: 436 bytes, params: 2, frame: 26
var r10;
var r5;
var loadingMore;
var value3;
var isScreenReaderEnabled;
var defaultImport;
isNearBottom = !(isNearBottom === undefined) && isNearBottom;
isNearTop = !(isNearTop === undefined) && isNearTop;
dragging = !(dragging === undefined) && dragging;
decelerating = !(decelerating === undefined) && decelerating;
isFirstMessageVisible = !(isFirstMessageVisible === undefined) && isFirstMessageVisible;
if (channel == null) {
return false;
}
if (messages.length !== 0) {
value3 = environment.__proto__;
isScreenReaderEnabled = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).getIsScreenReaderEnabled();
loadingMore = messages.loadingMore;
if (loadingMore) {
r5 = !loadingMore;
} else {
r10 = dragging || decelerating;
r10 = !r10 ? isScreenReaderEnabled : r10;
r5 = r10;
}
} else if (isNearBottom) {
if (messages.hasMoreAfter) {
if (r5) {
loadMoreAfter_86752();
r5 = r5 && pendingUpdatesQueueRef.current.length === 0;
if (env0_21.current) {
if (env0_20.current) {
if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (isNearBottom) {
if (messages.hasMoreAfter) {
if (r5) {
loadMoreAfter_86752();
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (isNearTop) {
if (messages.hasMoreBefore) {
if (r5) {
loadMoreBefore_86751();
} else if (env0_20.current) {
if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (isNearBottom) {
if (messages.hasMoreAfter) {
if (r5) {
loadMoreAfter_86752();
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (env0_20.current) {
if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (isNearBottom) {
if (messages.hasMoreAfter) {
if (r5) {
loadMoreAfter_86752();
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (isNearTop) {
if (messages.hasMoreBefore) {
if (r5) {
loadMoreBefore_86751();
} else if (env0_20.current) {
if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
@@ -112,103 +162,103 @@ function handleScrollCallbacks({eventTimestamp, isAtBottom, isNearBottom, isNear
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (env0_20.current) {
if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
onScroll({isFirstMessageVisible: isFirstMessageVisible});
chatUpdatesQueue.tryFlush();
} else {
loadingMore = messages.loadingMore;
if (loadingMore) {
return false;
}
} else if (isNearBottom) {
if (messages.hasMoreAfter) {
if (r5) {
loadMoreAfter_86752();
isScreenReaderEnabled = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).getIsScreenReaderEnabled();
loadingMore = messages.loadingMore;
if (loadingMore) {
r5 = !loadingMore;
} else {
r10 = dragging || decelerating;
r10 = !r10 ? isScreenReaderEnabled : r10;
r5 = r10;
}
r5 = r5 && pendingUpdatesQueueRef.current.length === 0;
if (env0_21.current) {
if (env0_20.current) {
if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (isNearBottom) {
if (messages.hasMoreAfter) {
if (r5) {
loadMoreAfter_86752();
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (env0_20.current) {
if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (isNearBottom) {
if (messages.hasMoreAfter) {
if (r5) {
loadMoreAfter_86752();
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
onScroll({isFirstMessageVisible: isFirstMessageVisible});
chatUpdatesQueue.tryFlush();
} else {
loadingMore = messages.loadingMore;
if (loadingMore) {
return false;
}
isScreenReaderEnabled = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).getIsScreenReaderEnabled();
loadingMore = messages.loadingMore;
if (loadingMore) {
r5 = !loadingMore;
} else {
r10 = dragging || decelerating;
r10 = !r10 ? isScreenReaderEnabled : r10;
r5 = r10;
}
r5 = r5 && pendingUpdatesQueueRef.current.length === 0;
if (env0_21.current) {
if (env0_20.current) {
if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (isNearBottom) {
if (messages.hasMoreAfter) {
if (r5) {
loadMoreAfter_86752();
} else if (isNearTop) {
if (messages.hasMoreBefore) {
if (r5) {
loadMoreBefore_86751();
} else if (env0_20.current) {
if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (isNearBottom) {
if (messages.hasMoreAfter) {
if (r5) {
loadMoreAfter_86752();
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (env0_20.current) {
if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (isNearBottom) {
if (messages.hasMoreAfter) {
if (r5) {
loadMoreAfter_86752();
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (isNearTop) {
if (messages.hasMoreBefore) {
if (r5) {
loadMoreBefore_86751();
} else if (env0_20.current) {
if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
@@ -234,181 +284,138 @@ function handleScrollCallbacks({eventTimestamp, isAtBottom, isNearBottom, isNear
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (env0_20.current) {
if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (isNearBottom) {
if (messages.hasMoreAfter) {
if (r5) {
loadMoreAfter_86752();
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
onScroll({isFirstMessageVisible: isFirstMessageVisible});
chatUpdatesQueue.tryFlush();
}
} else if (env0_20.current) {
if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
return true;
}
function useScrollHandlersHandleScroll({eventTimestamp, isAtBottom, isNearBottom, isNearTop, dragging, decelerating, shouldShowJumpToPresent, isFirstMessageVisible}) { // fn#86754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:1361, owner: useScrollHandlers.handleScroll, offset: 0x01f9eb66, size: 249 bytes, params: 2, frame: 21
var environment;
var value;
isNearBottom = !(isNearBottom === undefined) && isNearBottom;
isNearTop = !(isNearTop === undefined) && isNearTop;
dragging = !(dragging === undefined) && dragging;
decelerating = !(decelerating === undefined) && decelerating;
shouldShowJumpToPresent = !(shouldShowJumpToPresent === undefined) && shouldShowJumpToPresent;
isFirstMessageVisible = !(isFirstMessageVisible === undefined) && isFirstMessageVisible;
if (handleScrollCallbacks({eventTimestamp: eventTimestamp, isAtBottom: isAtBottom, isNearBottom: isNearBottom,
isNearTop: isNearTop, dragging: dragging, decelerating: decelerating,
shouldShowJumpToPresent: shouldShowJumpToPresent, isFirstMessageVisible: isFirstMessageVisible})) {
env0_19.current = isAtBottom;
env0_20.current = isNearBottom;
env0_21.current = isNearTop;
env0_23.current = dragging;
env0_22.current = decelerating;
value = environment.__proto__;
value = require(690) /* metro dependency 690: ReactBatchUpdatesNative */;
value.batchUpdates(function() {
updateShouldShowJumpToPresentButton(channelId, screenIndex,
shouldShowJumpToPresent || messages.hasMoreAfter);
updateIsAtBottom(screenIndex, isAtBottom);
});
}
} else if (isNearBottom) {
if (messages.hasMoreAfter) {
if (r5) {
loadMoreAfter_86752();
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
function useScrollHandlersScrollToTop() { // fn#86756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:2020, owner: useScrollHandlers.scrollToTop, offset: 0x01f9eca2, size: 70 bytes, params: 1, frame: 16
let value = a0;
let r4 = !(value !== undefined) || value;
value = environment.__proto__;
value = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
const scrollToTop = value.scrollToTop;
const current = chatRef.current;
r4 = r4 && !useReducedMotion;
Reflect.apply(scrollToTop, value, [current, r4]);
}
function useScrollHandlersScrollToRelativeOffset(a0) { // fn#86757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:2090, owner: useScrollHandlers.scrollToRelativeOffset, offset: 0x01f9ece8, size: 74 bytes, params: 2, frame: 17
let value = a1;
let r5 = !(value !== undefined) || value;
value = environment.__proto__;
value = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
const scrollToRelativeOffset = value.scrollToRelativeOffset;
const current = chatRef.current;
r5 = r5 && !useReducedMotion;
Reflect.apply(scrollToRelativeOffset, value, [current, a0, r5]);
}
function useScrollHandlersScrollToTopMessage() { // fn#86758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:2171, owner: useScrollHandlers.scrollToTopMessage, offset: 0x01f9ed32, size: 90 bytes, params: 1, frame: 14
var value3;
var defaultImport;
const previousRows = chatManager.getPreviousRows();
if (previousRows.length > 0) {
value3 = environment.__proto__;
defaultImport = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport.scrollTo(chatRef.current, previousRows.length - 1);
}
}
function updateNativeRows(a0) { // fn#86759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:2271, owner: useScrollHandlers.updateNativeRows, offset: 0x01f9ed8c, size: 101 bytes, params: 2, frame: 12
if (chatUpdatesQueue.isBlocking) {
chatUpdatesQueue.add(a0);
} else if (a0.isLoadingAtTop) {
if (env0_22.current) {
chatUpdatesQueue.add(a0);
} else if (env0_23.current) {
chatUpdatesQueue.add(a0);
} else {
applyNativeRowsUpdate(a0);
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
} else {
applyNativeRowsUpdate(a0);
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
onScroll({isFirstMessageVisible: isFirstMessageVisible});
chatUpdatesQueue.tryFlush();
}
return true;
}
function handleScroll({eventTimestamp, isAtBottom, isNearBottom, isNearTop, dragging, decelerating, shouldShowJumpToPresent, isFirstMessageVisible}) { // fn#86754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:1361, owner: useScrollHandlers.handleScroll, offset: 0x01f9eb66, size: 249 bytes, params: 2, frame: 21
var environment;
var value;
isNearBottom = !(isNearBottom === undefined) && isNearBottom;
isNearTop = !(isNearTop === undefined) && isNearTop;
dragging = !(dragging === undefined) && dragging;
decelerating = !(decelerating === undefined) && decelerating;
shouldShowJumpToPresent = !(shouldShowJumpToPresent === undefined) && shouldShowJumpToPresent;
isFirstMessageVisible = !(isFirstMessageVisible === undefined) && isFirstMessageVisible;
if (handleScrollCallbacks({eventTimestamp: eventTimestamp, isAtBottom: isAtBottom, isNearBottom: isNearBottom,
isNearTop: isNearTop, dragging: dragging, decelerating: decelerating,
shouldShowJumpToPresent: shouldShowJumpToPresent, isFirstMessageVisible: isFirstMessageVisible})) {
env0_19.current = isAtBottom;
env0_20.current = isNearBottom;
env0_21.current = isNearTop;
env0_23.current = dragging;
env0_22.current = decelerating;
value = environment.__proto__;
value = require(690) /* metro dependency 690: ReactBatchUpdatesNative */;
value.batchUpdates(function() {
updateShouldShowJumpToPresentButton(channelId, screenIndex,
shouldShowJumpToPresent || messages.hasMoreAfter);
updateIsAtBottom(screenIndex, isAtBottom);
});
}
}
function useScrollHandlersScrollToTop() { // fn#86756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:2020, owner: useScrollHandlers.scrollToTop, offset: 0x01f9eca2, size: 70 bytes, params: 1, frame: 16
let value = a0;
let r4 = !(value !== undefined) || value;
value = environment.__proto__;
value = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
const scrollToTop = value.scrollToTop;
const current = chatRef.current;
r4 = r4 && !useReducedMotion;
Reflect.apply(scrollToTop, value, [current, r4]);
}
function useScrollHandlersScrollToRelativeOffset(a0) { // fn#86757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:2090, owner: useScrollHandlers.scrollToRelativeOffset, offset: 0x01f9ece8, size: 74 bytes, params: 2, frame: 17
let value = a1;
let r5 = !(value !== undefined) || value;
value = environment.__proto__;
value = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
const scrollToRelativeOffset = value.scrollToRelativeOffset;
const current = chatRef.current;
r5 = r5 && !useReducedMotion;
Reflect.apply(scrollToRelativeOffset, value, [current, a0, r5]);
}
function useScrollHandlersScrollToTopMessage() { // fn#86758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:2171, owner: useScrollHandlers.scrollToTopMessage, offset: 0x01f9ed32, size: 90 bytes, params: 1, frame: 14
var value3;
var defaultImport;
const previousRows = chatManager.getPreviousRows();
if (previousRows.length > 0) {
value3 = environment.__proto__;
defaultImport = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport.scrollTo(chatRef.current, previousRows.length - 1);
}
}
function updateNativeRows(a0) { // fn#86759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:2271, owner: useScrollHandlers.updateNativeRows, offset: 0x01f9ed8c, size: 101 bytes, params: 2, frame: 12
if (chatUpdatesQueue.isBlocking) {
chatUpdatesQueue.add(a0);
} else if (a0.isLoadingAtTop) {
if (env0_22.current) {
chatUpdatesQueue.add(a0);
} else if (env0_23.current) {
chatUpdatesQueue.add(a0);
} else {
applyNativeRowsUpdate(a0);
function useScrollHandlersHandleScrollPosition({timeStamp, nativeEvent}) { // fn#86760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:2444, owner: useScrollHandlers.handleScrollPosition, offset: 0x01f9edf1, size: 407 bytes, params: 2, frame: 32
var binding;
const isAtBottom = nativeEvent.isAtBottom;
const isNearBottom = nativeEvent.isNearBottom;
const isNearTop = nativeEvent.isNearTop;
const dragging = nativeEvent.dragging;
const decelerating = nativeEvent.decelerating;
const shouldShowJumpToPresent = nativeEvent.shouldShowJumpToPresent;
const isFirstMessageVisible = nativeEvent.isFirstMessageVisible;
const firstVisibleMessageIndex = nativeEvent.firstVisibleMessageIndex;
const firstVisibleMessagePercentVisible = nativeEvent.firstVisibleMessagePercentVisible;
const lastVisibleMessageIndex = nativeEvent.lastVisibleMessageIndex;
const changesetUpdateId = nativeEvent.changesetUpdateId;
const lastVisibleMessagePercentVisible = nativeEvent.lastVisibleMessagePercentVisible;
const changesetIdForChat = (ChatChangesetUpdateTrackerModule).getChangesetIdForChat(chatRef.current);
if (changesetUpdateId !== changesetIdForChat) {
if (env0_17.current == null) {
env0_17.current = timeStamp;
}
if (isStaff) {
binding = env1_6;
binding.log('STAFF-ACK-LOG: Ignoring outdated scroll event.', channelId, changesetUpdateId,
changesetIdForChat,
timeStamp);
}
} else {
var handleVisibleMessagesChangeBinding = handleVisibleMessagesChange;
var object = {firstVisibleMessageRowIndex: firstVisibleMessageIndex,
lastVisibleMessageRowIndex: lastVisibleMessageIndex,
firstVisibleMessagePercentVisible: firstVisibleMessagePercentVisible,
lastVisibleMessagePercentVisible: lastVisibleMessagePercentVisible};
var QuestsVisibleMessagesChangedSource = (require(6531) /* metro dependency 6531: QuestTypes */).QuestsVisibleMessagesChangedSource;
var SCROLL = QuestsVisibleMessagesChangedSource.SCROLL;
object.source = SCROLL;
handleVisibleMessagesChangeBinding(object);
var r17 = env0_17.current ?? timeStamp;
env0_17.current = undefined;
handleScroll_86754({eventTimestamp: r17, isAtBottom: isAtBottom, isNearBottom: isNearBottom,
isNearTop: isNearTop,
dragging: dragging, decelerating: decelerating, shouldShowJumpToPresent: shouldShowJumpToPresent,
isFirstMessageVisible: isFirstMessageVisible});
visibleMessagesWindowHandler.handleScrollPosition({rows: chatManager._rows,
firstVisibleMessageRowIndex: firstVisibleMessageIndex,
lastVisibleMessageRowIndex: lastVisibleMessageIndex});
}
}
} else {
applyNativeRowsUpdate(a0);
}
}
function useScrollHandlersHandleScrollPosition({timeStamp, nativeEvent}) { // fn#86760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:2444, owner: useScrollHandlers.handleScrollPosition, offset: 0x01f9edf1, size: 407 bytes, params: 2, frame: 32
var binding;
const isAtBottom = nativeEvent.isAtBottom;
const isNearBottom = nativeEvent.isNearBottom;
const isNearTop = nativeEvent.isNearTop;
const dragging = nativeEvent.dragging;
const decelerating = nativeEvent.decelerating;
const shouldShowJumpToPresent = nativeEvent.shouldShowJumpToPresent;
const isFirstMessageVisible = nativeEvent.isFirstMessageVisible;
const firstVisibleMessageIndex = nativeEvent.firstVisibleMessageIndex;
const firstVisibleMessagePercentVisible = nativeEvent.firstVisibleMessagePercentVisible;
const lastVisibleMessageIndex = nativeEvent.lastVisibleMessageIndex;
const changesetUpdateId = nativeEvent.changesetUpdateId;
const lastVisibleMessagePercentVisible = nativeEvent.lastVisibleMessagePercentVisible;
const changesetIdForChat = (require(9852) /* metro dependency 9852: ChatChangesetUpdateTracker */).getChangesetIdForChat(chatRef.current);
if (changesetUpdateId !== changesetIdForChat) {
if (env0_17.current == null) {
env0_17.current = timeStamp;
}
if (isStaff) {
binding = env1_6;
binding.log('STAFF-ACK-LOG: Ignoring outdated scroll event.', channelId, changesetUpdateId,
changesetIdForChat,
timeStamp);
}
} else {
var handleVisibleMessagesChangeBinding = handleVisibleMessagesChange;
var object2 = {firstVisibleMessageRowIndex: firstVisibleMessageIndex,
lastVisibleMessageRowIndex: lastVisibleMessageIndex,
firstVisibleMessagePercentVisible: firstVisibleMessagePercentVisible,
lastVisibleMessagePercentVisible: lastVisibleMessagePercentVisible};
var QuestsVisibleMessagesChangedSource = (require(6531) /* metro dependency 6531: QuestTypes */).QuestsVisibleMessagesChangedSource;
var SCROLL = QuestsVisibleMessagesChangedSource.SCROLL;
object2.source = SCROLL;
handleVisibleMessagesChangeBinding(object2);
var r17 = env0_17.current ?? timeStamp;
env0_17.current = undefined;
handleScroll({eventTimestamp: r17, isAtBottom: isAtBottom, isNearBottom: isNearBottom, isNearTop: isNearTop,
dragging: dragging, decelerating: decelerating, shouldShowJumpToPresent: shouldShowJumpToPresent,
isFirstMessageVisible: isFirstMessageVisible});
visibleMessagesWindowHandler.handleScrollPosition({rows: chatManager._rows,
firstVisibleMessageRowIndex: firstVisibleMessageIndex,
lastVisibleMessageRowIndex: lastVisibleMessageIndex});
}
}
global.__d(_fun86749, 11346, [31, 7729, 3, 4559, 9764, 690, 9850, 9852, 6531,
2]) /* metro module 11346, dependencies: [31, 7729, 3, 4559, 9764, 690, 9850, 9852, 6531, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -1,24 +1,30 @@
/* Metro module 11167; source: modules/messages/native/long_press/LongPressMessageChatItemPreview.tsx; dependencies: [33, 4501, 697, 8177, 9773, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ChatItem from '../../../../components_native/chat/ChatItem.tsx'; /* Metro dependency 9773 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun85262(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11353:6, offset: 0x01f692d0, size: 222 bytes, params: 8, frame: 22
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
let value = require(4501) /* metro dependency 4501: createStyles */;
let value = CreateStylesModule;
const createStyles = value.createStyles;
const PX_80 = (importDefault(697) /* metro dependency 697: native */).space.PX_80;
const PX_80 = (Native).space.PX_80;
const env0_3 = Reflect.apply(createStyles, value, [{chatItem: {maxHeight: 2 * PX_80}}]);
value = importDefault(8177) /* metro dependency 8177: RowGenerator */;
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/long_press/LongPressMessageChatItemPreview.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/long_press/LongPressMessageChatItemPreview.tsx');
exports.default = LongPressMessageChatItemPreview;
function LongPressMessageChatItemPreview({message}) { // fn#85263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11353:308, offset: 0x01f693ae, size: 112 bytes, params: 2, frame: 18
const styles = useStyles();
const defaultImportProps = {rowGenerator: env0_4, message: message, maxHeight: styles.chatItem.maxHeight};
const MOBILE_ALERT_BACKGROUND_DEFAULT = (Native).colors.MOBILE_ALERT_BACKGROUND_DEFAULT;
defaultImportProps.backgroundColor = MOBILE_ALERT_BACKGROUND_DEFAULT;
return <ChatItem {...defaultImportProps} />;
}
}
function LongPressMessageChatItemPreview({message}) { // fn#85263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11353:308, offset: 0x01f693ae, size: 112 bytes, params: 2, frame: 18
const styles = useStyles();
const ChatItem = importDefault(9773) /* metro dependency 9773: ChatItem */;
const defaultImportProps = {rowGenerator: env0_4, message: message, maxHeight: styles.chatItem.maxHeight};
const MOBILE_ALERT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ALERT_BACKGROUND_DEFAULT;
defaultImportProps.backgroundColor = MOBILE_ALERT_BACKGROUND_DEFAULT;
return <ChatItem {...defaultImportProps} />;
}
global.__d(_fun85262, 11167, [33, 4501, 697, 8177, 9773,
2]) /* metro module 11167, dependencies: [33, 4501, 697, 8177, 9773, 2] */;
@@ -1,17 +1,20 @@
/* Metro module 11401; source: modules/messages/native/long_press/showLongPressMessageActionSheet.tsx; dependencies: [4080, 11402, 1962, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun87341(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11587:6, offset: 0x01fb9d0f, 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/messages/native/long_press/showLongPressMessageActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/long_press/showLongPressMessageActionSheet.tsx');
exports.showLongPressMessageActionSheet = showLongPressMessageActionSheet;
function showLongPressMessageActionSheet(a0) { // fn#87342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11587:230, offset: 0x01fb9d76, size: 82 bytes, params: 2, frame: 16
const defaultImport = importDefault(dependencyMap[0]);
const openLazy = defaultImport.openLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'MessageLongPressActionSheet', a0]);
}
}
function showLongPressMessageActionSheet(a0) { // fn#87342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11587:230, offset: 0x01fb9d76, size: 82 bytes, params: 2, frame: 16
const defaultImport = importDefault(dependencyMap[0]);
const openLazy = defaultImport.openLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'MessageLongPressActionSheet', a0]);
}
global.__d(_fun87341, 11401, [4080, 11402, 1962, 2]) /* metro module 11401, dependencies: [4080, 11402, 1962, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,24 +1,27 @@
/* Metro module 8191; source: modules/messages/native/renderer/EmbedUtils.tsx; dependencies: [27, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
function _fun65695(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8376:6, offset: 0x01bda508, size: 187 bytes, params: 8, frame: 20
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(27) /* metro dependency 27 */).Image;
Object = global.Object;
const freeze = Object.freeze;
const Set = global.Set;
let set = new Set(['YouTube', 'TikTok']);
set = Reflect.apply(freeze, Object, [set]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/EmbedUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/renderer/EmbedUtils.tsx');
exports.getAssetUriForEmbed = function(a0) {
return Image.resolveAssetSource(a0).uri;
};
exports.SUPPORTED_VIDEO_PARTNERS = set;
exports.shouldPlayVideoInline = shouldPlayVideoInline;
function shouldPlayVideoInline(a0) { // fn#65697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8376:387, offset: 0x01bda5df, size: 38 bytes, params: 2, frame: 13
const value = a0;
const binding = env0_1;
return binding.has(value ?? '');
}
}
function shouldPlayVideoInline(a0) { // fn#65697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8376:387, offset: 0x01bda5df, size: 38 bytes, params: 2, frame: 13
const value = a0;
const binding = env0_1;
return binding.has(value ?? '');
}
global.__d(_fun65695, 8191, [27, 2]) /* metro module 8191, dependencies: [27, 2] */;
@@ -1,9 +1,15 @@
/* Metro module 8367; source: modules/messages/native/renderer/ExplicitMediaUtils.tsx; dependencies: [661, 1391, 4838, 4841, 4813, 1244, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as FlagUtilsModule from '../../../../external/discord_common/js/shared/utils/FlagUtils.tsx'; /* Metro dependency 1391 */
import * as ObscuredMediaUtilsModule from '../../../explicit_media_redaction/ObscuredMediaUtils.tsx'; /* Metro dependency 4838 */
import * as ExplicitMediaRedactionModelsModule from '../../../explicit_media_redaction/ExplicitMediaRedactionModels.tsx'; /* Metro dependency 4841 */
function _fun66607(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8552:6, offset: 0x01c0295e, size: 165 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(661) /* metro dependency 661: Constants */).MessageAttachmentFlags;
const getContentScanVersionFromMedia = function(a0) {
var value = undefined;
if (value !== a0.content_scan_version) {
@@ -11,98 +17,95 @@ function _fun66607(global, require, importDefault, importAll, module, exports, d
}
return value === a0.contentScanVersion ? value : a0.contentScanVersion;
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/ExplicitMediaUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/renderer/ExplicitMediaUtils.tsx');
exports.getAttachmentObscurityProps = getAttachmentObscurityProps;
exports.getUnfurledMediaItemObscurityProps = getUnfurledMediaItemObscurityProps;
exports.getAttachmentObscurityDefaults = function() {
return {'isSpoiler': false, 'spoiler': ''};
};
function getSpoilerDescriptionForType(a0) { // fn#66608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8552:311, offset: 0x01c02a03, size: 301 bytes, params: 2, frame: 14
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
if (a0 === 'image') {
return intl.string(t.sb2W2J);
}
if (a0 === 'video') {
return intl.string(t.ehBaMc);
}
if (a0 === 'file') {
return intl.string(t['3Gc2XP']);
}
if (a0 === 'generic') {
return intl.string(t.G71b77);
}
}
function getAttachmentObscurityProps({attachment, shouldObscureSpoiler, enabledContentHarmTypeFlags, shouldAgeVerify}) { // fn#66610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8552:714, offset: 0x01c02b5b, size: 528 bytes, params: 2, frame: 26
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const spoiler = attachment.spoiler;
const hasFlag = FlagUtilsModule.hasFlag;
const r5 = attachment.flags ?? 0;
const IS_SPOILER = MessageAttachmentFlags.IS_SPOILER;
const hasFlag2 = Reflect.apply(hasFlag, FlagUtilsModule, [r5, IS_SPOILER]);
let object = {};
object.contentScanVersion = getContentScanVersionFromMedia(attachment) ?? 0;
object.flags = attachment.flags ?? 0;
const getMediaObscuredReasonFromBitmask = ObscuredMediaUtilsModule.getMediaObscuredReasonFromBitmask;
const ObscuredMediaTypes = (ExplicitMediaRedactionModelsModule).ObscuredMediaTypes;
let Attachment = ObscuredMediaTypes.Attachment;
const value4 = Reflect.apply(getMediaObscuredReasonFromBitmask, ObscuredMediaUtilsModule, [{type: Attachment,
media: object}, enabledContentHarmTypeFlags]);
const isMediaScanPending = ObscuredMediaUtilsModule.isMediaScanPending;
Attachment = ObscuredMediaTypes.Attachment;
const isMediaScanPending2 = Reflect.apply(isMediaScanPending, ObscuredMediaUtilsModule, [{type: Attachment, media: object},
enabledContentHarmTypeFlags]);
const value5 = value4.length > 0;
const r2 = value5 && (require(4813) /* metro dependency 4813: AgeVerificationUtils */).isVerifiedTeen();
object = {};
object.isSpoiler = shouldObscureSpoiler && (spoiler || hasFlag2);
const value6 = '';
object.spoiler = shouldObscureSpoiler && (spoiler || hasFlag2) ? intl.string(t['F+x38C']).toUpperCase() : value6;
object.obscure = value5;
object.obscureDescription = value5 ? intl.string(t.SpxcUR) : value6;
object.obscureAwaitingScan = isMediaScanPending2;
object.verifyAge = value5 && shouldAgeVerify;
object.obscureHideControls = r2;
object.obscureIsOpaque = value5;
return object;
}
function getUnfurledMediaItemObscurityProps({type, mediaItem, isSpoilered, isAuthorBot, shouldObscureSpoiler, enabledContentHarmTypeFlags, shouldAgeVerify}) { // fn#66611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8552:1532, offset: 0x01c02d6b, size: 363 bytes, params: 2, frame: 25
var r5;
var intl;
const getMediaObscuredReasonFromBitmask = ObscuredMediaUtilsModule.getMediaObscuredReasonFromBitmask;
const ObscuredMediaTypes = (ExplicitMediaRedactionModelsModule).ObscuredMediaTypes;
const GenericMedia = ObscuredMediaTypes.GenericMedia;
const value2 = Reflect.apply(getMediaObscuredReasonFromBitmask, ObscuredMediaUtilsModule, [{type: GenericMedia,
media: mediaItem}, enabledContentHarmTypeFlags]);
const r3 = !isAuthorBot && ObscuredMediaUtilsModule.isMediaScanPending({type: ObscuredMediaTypes.GenericMedia,
media: mediaItem}, enabledContentHarmTypeFlags);
const r8 = isSpoilered && shouldObscureSpoiler;
const value4 = value2.length > 0;
const r2 = value4 && (require(4813) /* metro dependency 4813: AgeVerificationUtils */).isVerifiedTeen();
object = {isSpoiler: r8};
object.spoilerDescription = r8 ? getSpoilerDescriptionForType(type) : null;
object.isObscured = value4;
if (value4) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r5 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.SpxcUR);
} else {
r5 = null;
}
object.obscureDescription = r5;
object.obscureAwaitingScan = r3;
object.verifyAge = value4 && shouldAgeVerify;
object.obscureHideControls = r2;
object.obscureIsOpaque = value4;
return object;
}
}
function getSpoilerDescriptionForType(a0) { // fn#66608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8552:311, offset: 0x01c02a03, size: 301 bytes, params: 2, frame: 14
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
if (a0 === 'image') {
return intl.string(t.sb2W2J);
}
if (a0 === 'video') {
return intl.string(t.ehBaMc);
}
if (a0 === 'file') {
return intl.string(t['3Gc2XP']);
}
if (a0 === 'generic') {
return intl.string(t.G71b77);
}
}
function getAttachmentObscurityProps({attachment, shouldObscureSpoiler, enabledContentHarmTypeFlags, shouldAgeVerify}) { // fn#66610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8552:714, offset: 0x01c02b5b, size: 528 bytes, params: 2, frame: 26
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const spoiler = attachment.spoiler;
const flagUtilsModule = require(1391) /* metro dependency 1391: FlagUtils */;
const hasFlag = flagUtilsModule.hasFlag;
const r5 = attachment.flags ?? 0;
const IS_SPOILER = MessageAttachmentFlags.IS_SPOILER;
const hasFlag2 = Reflect.apply(hasFlag, flagUtilsModule, [r5, IS_SPOILER]);
let object2 = {};
object2.contentScanVersion = getContentScanVersionFromMedia(attachment) ?? 0;
object2.flags = attachment.flags ?? 0;
const obscuredMediaUtilsModule = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
const getMediaObscuredReasonFromBitmask = obscuredMediaUtilsModule.getMediaObscuredReasonFromBitmask;
const ObscuredMediaTypes = (require(4841) /* metro dependency 4841: ExplicitMediaRedactionModels */).ObscuredMediaTypes;
let Attachment = ObscuredMediaTypes.Attachment;
const value4 = Reflect.apply(getMediaObscuredReasonFromBitmask, obscuredMediaUtilsModule, [{type: Attachment,
media: object2}, enabledContentHarmTypeFlags]);
const moduleValue3 = obscuredMediaUtilsModule;
const isMediaScanPending = moduleValue3.isMediaScanPending;
Attachment = ObscuredMediaTypes.Attachment;
const isMediaScanPending2 = Reflect.apply(isMediaScanPending, moduleValue3, [{type: Attachment, media: object2},
enabledContentHarmTypeFlags]);
const value5 = value4.length > 0;
const r2 = value5 && (require(4813) /* metro dependency 4813: AgeVerificationUtils */).isVerifiedTeen();
object2 = {};
object2.isSpoiler = shouldObscureSpoiler && (spoiler || hasFlag2);
const value6 = '';
object2.spoiler = shouldObscureSpoiler && (spoiler || hasFlag2) ? intl.string(t['F+x38C']).toUpperCase() : value6;
object2.obscure = value5;
object2.obscureDescription = value5 ? intl.string(t.SpxcUR) : value6;
object2.obscureAwaitingScan = isMediaScanPending2;
object2.verifyAge = value5 && shouldAgeVerify;
object2.obscureHideControls = r2;
object2.obscureIsOpaque = value5;
return object2;
}
function getUnfurledMediaItemObscurityProps({type, mediaItem, isSpoilered, isAuthorBot, shouldObscureSpoiler, enabledContentHarmTypeFlags, shouldAgeVerify}) { // fn#66611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8552:1532, offset: 0x01c02d6b, size: 363 bytes, params: 2, frame: 25
var object2;
var r5;
var intl;
const obscuredMediaUtilsModule = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
const getMediaObscuredReasonFromBitmask = obscuredMediaUtilsModule.getMediaObscuredReasonFromBitmask;
const ObscuredMediaTypes = (require(4841) /* metro dependency 4841: ExplicitMediaRedactionModels */).ObscuredMediaTypes;
const GenericMedia = ObscuredMediaTypes.GenericMedia;
const value2 = Reflect.apply(getMediaObscuredReasonFromBitmask, obscuredMediaUtilsModule, [{type: GenericMedia,
media: mediaItem}, enabledContentHarmTypeFlags]);
const r3 = !isAuthorBot && obscuredMediaUtilsModule.isMediaScanPending({type: ObscuredMediaTypes.GenericMedia,
media: mediaItem}, enabledContentHarmTypeFlags);
const r8 = isSpoilered && shouldObscureSpoiler;
const value4 = value2.length > 0;
const r2 = value4 && (require(4813) /* metro dependency 4813: AgeVerificationUtils */).isVerifiedTeen();
object2 = {isSpoiler: r8};
object2.spoilerDescription = r8 ? getSpoilerDescriptionForType(type) : null;
object2.isObscured = value4;
if (value4) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r5 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.SpxcUR);
} else {
r5 = null;
}
object2.obscureDescription = r5;
object2.obscureAwaitingScan = r3;
object2.verifyAge = value4 && shouldAgeVerify;
object2.obscureHideControls = r2;
object2.obscureIsOpaque = value4;
return object2;
}
global.__d(_fun66607, 8367, [661, 1391, 4838, 4841, 4813, 1244,
2]) /* metro module 8367, dependencies: [661, 1391, 4838, 4841, 4813, 1244, 2] */;
@@ -1,240 +1,242 @@
/* Metro module 8335; source: modules/messages/native/renderer/MarkupParsers.tsx; dependencies: [661, 672, 1393, 6622, 8336, 8349, 2] */
import Durations from '../../../../utils/Durations.tsx'; /* Metro dependency 672 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
function _fun66357(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8520:6, offset: 0x01bf854f, size: 384 bytes, params: 8, frame: 22
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(661) /* metro dependency 661: Constants */).MessageTypes;
object3 = {'max': Infinity, 'maxAge': null, 'updateAgeOnGet': true};
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
object = {'max': Infinity, 'maxAge': null, 'updateAgeOnGet': true};
const Millis = (Durations).Millis;
const MINUTE = Millis.MINUTE;
object3.maxAge = 15 * MINUTE;
object.maxAge = 15 * MINUTE;
let value = importDefault(1393) /* metro dependency 1393 */;
value = new value(object3);
value = new value(object);
value = importDefault(1393) /* metro dependency 1393 */;
value = new value(object3);
value = new value(object);
value = importDefault(1393) /* metro dependency 1393 */;
const object4 = {};
copyDataProperties(object4, object3, undefined);
object4['updateAgeOnGet'] = false;
value = new value(object4);
const object2 = {};
copyDataProperties(object2, object, undefined);
object2['updateAgeOnGet'] = false;
value = new value(object2);
value = importDefault(1393) /* metro dependency 1393 */;
value = new value(object3);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/MarkupParsers.tsx');
value = new value(object);
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/renderer/MarkupParsers.tsx');
exports.parseEmbedTitleMarkup = parseEmbedTitleMarkup;
exports.parseEmbedTitleMarkupWithoutLinks = parseEmbedTitleMarkupWithoutLinks;
exports.parseEmbedDescriptionMarkup = parseEmbedDescriptionMarkup;
exports.parseMessageMarkup = parseMessageMarkup;
}
function parseEmbedTitleMarkup(a0, a1) { // fn#66358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8520:396, offset: 0x01bf86cf, size: 120 bytes, params: 3, frame: 18
var r0;
var embedTitleToAST;
const value = '' + a0 + '-' + a1;
const value3 = env0_4.get(value);
if (value3 != null) {
r0 = value3;
} else {
embedTitleToAST = (importDefault(6622) /* metro dependency 6622: MarkupUtils */).parseEmbedTitleToAST(a0, true,
{channelId: a1});
env0_4.set(value, embedTitleToAST);
r0 = embedTitleToAST;
}
return r0;
}
function parseEmbedTitleMarkupWithoutLinks(a0, a1) { // fn#66359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8520:580, offset: 0x01bf8747, size: 129 bytes, params: 3, frame: 19
var r0;
var embedTitleWithoutLinksToAST;
const value = '' + a0 + '-' + a1 + '-nolinks';
const value3 = env0_5.get(value);
if (value3 != null) {
r0 = value3;
} else {
embedTitleWithoutLinksToAST = (importDefault(6622) /* metro dependency 6622: MarkupUtils */).parseEmbedTitleWithoutLinksToAST(a0,
true, {channelId: a1});
env0_5.set(value, embedTitleWithoutLinksToAST);
r0 = embedTitleWithoutLinksToAST;
}
return r0;
}
function parseEmbedDescriptionMarkup({description, channelId, isField, ignoreCache, replaceMap, showListsAndHeaders, showMaskedLinks}) { // fn#66360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8520:790, offset: 0x01bf87c8, size: 247 bytes, params: 2, frame: 27
var r2;
var r10;
var r6;
var propertyName;
var propertyName2;
var replaceAll;
var value4;
const value = '' + description + '-' + channelId;
const value3 = env0_6.get(value);
if (value3 != null) {
reducibleJoin3: while (true) {
if (!ignoreCache) {
return value3;
}
break reducibleJoin3;
}
}
const properties = Object.keys(replaceMap);
const properties3 = properties.length;
if (properties === undefined) {
r6 = description;
} else {
r2 = description;
r10 = 0;
reducibleLoop4: while (true) {
propertyName = properties[r10];
propertyName2 = r10 + 1;
if (propertyName === undefined) {
r6 = r2;
break reducibleLoop4;
}
replaceAll = r2.replaceAll;
value4 = Reflect.apply(replaceAll, r2, [propertyName, replaceMap[propertyName]]);
r2 = value4;
r10 = propertyName2;
continue reducibleLoop4;
}
}
const toAST = (importDefault(6622) /* metro dependency 6622: MarkupUtils */).parseToAST(r6, true,
{'channelId': null, 'allowLinks': true, 'allowEmojiLinks': true, channelId: channelId,
allowHeading: !isField && showListsAndHeaders, allowList: showListsAndHeaders,
previewLinkTarget: showMaskedLinks});
env0_6.set(value, toAST);
return toAST;
}
function parseMessageMarkup(a0, a1, a2) { // fn#66361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8520:1199, offset: 0x01bf88bf, size: 418 bytes, params: 4, frame: 27
var r8;
var r1;
var r0;
var object4;
var moduleValue;
var renderMessageMarkupToAST;
var object5;
var defaultImport;
var astParserFor;
var moduleValue2;
var value6;
var content;
var object6;
const value = a3;
const value2 = a4;
const value3 = a5;
const value4 = a6;
let r12 = value !== undefined ? value : false;
let r10 = value2 !== undefined ? value2 : false;
const r11 = value3 !== undefined ? value3 : false;
const r4 = value4 !== undefined ? value4 : false;
const value5 = env0_7.get(a0);
if (value5 == null) {
if (a0.type !== MessageTypes.CHANGELOG) {
object4 = {};
moduleValue = require(8349) /* metro dependency 8349: renderMessageMarkup */;
renderMessageMarkupToAST = moduleValue.renderMessageMarkupToAST;
object5 = {contentMessage: a1, hideSimpleEmbedContent: a2, formatInline: r12, allowGameMentions: true};
r8 = r10 || r11;
object5.allowHeading = r8;
r8 = r10 || r11;
object5.allowList = r8;
object5.allowLinks = r4;
object5.previewLinkTarget = r4;
copyDataProperties(object4, Reflect.apply(renderMessageMarkupToAST, moduleValue, [a0, object5]), undefined);
object4['isInlineReplyPreview'] = r12;
env0_7.set(a0, object4);
r1 = object4;
} else if (a0.changelogId != null) {
object4 = {'content': null, 'isInlineReplyPreview': false, 'hasSpoilerEmbeds': false,
'hasBailedAst': false};
defaultImport = importDefault(6622) /* metro dependency 6622: MarkupUtils */;
astParserFor = defaultImport.astParserFor;
moduleValue2 = require(8336) /* metro dependency 8336: ChangeLogStandardTemplate */;
value6 = Reflect.apply(astParserFor, defaultImport, [moduleValue2.changelogRules(a0.changelogId, true)]);
content = a0.content;
object6 = {hideSimpleEmbedContent: a2, formatInline: r12};
r12 = r10 || r11;
object6.allowHeading = r12;
r10 = !r10 ? r11 : r10;
object6.allowList = r10;
object6.allowLinks = r4;
object6.previewLinkTarget = r4;
object4.content = value6(content, false, object6);
env0_7.set(a0, object4);
r1 = object4;
function parseEmbedTitleMarkup(a0, a1) { // fn#66358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8520:396, offset: 0x01bf86cf, size: 120 bytes, params: 3, frame: 18
var r0;
var embedTitleToAST;
const value = '' + a0 + '-' + a1;
const value3 = env0_4.get(value);
if (value3 != null) {
r0 = value3;
} else {
object4 = {};
moduleValue = require(8349) /* metro dependency 8349: renderMessageMarkup */;
renderMessageMarkupToAST = moduleValue.renderMessageMarkupToAST;
object5 = {contentMessage: a1, hideSimpleEmbedContent: a2, formatInline: r12, allowGameMentions: true};
r8 = r10 || r11;
object5.allowHeading = r8;
r8 = r10 || r11;
object5.allowList = r8;
object5.allowLinks = r4;
object5.previewLinkTarget = r4;
copyDataProperties(object4, Reflect.apply(renderMessageMarkupToAST, moduleValue, [a0, object5]), undefined);
object4['isInlineReplyPreview'] = r12;
env0_7.set(a0, object4);
r1 = object4;
embedTitleToAST = (importDefault(6622) /* metro dependency 6622: MarkupUtils */).parseEmbedTitleToAST(a0, true,
{channelId: a1});
env0_4.set(value, embedTitleToAST);
r0 = embedTitleToAST;
}
r0 = r1;
} else if (value5.isInlineReplyPreview === r12) {
r0 = value5;
} else {
if (a0.type !== MessageTypes.CHANGELOG) {
object4 = {};
moduleValue = require(8349) /* metro dependency 8349: renderMessageMarkup */;
renderMessageMarkupToAST = moduleValue.renderMessageMarkupToAST;
object5 = {contentMessage: a1, hideSimpleEmbedContent: a2, formatInline: r12, allowGameMentions: true};
r8 = r10 || r11;
object5.allowHeading = r8;
r8 = r10 || r11;
object5.allowList = r8;
object5.allowLinks = r4;
object5.previewLinkTarget = r4;
copyDataProperties(object4, Reflect.apply(renderMessageMarkupToAST, moduleValue, [a0, object5]), undefined);
object4['isInlineReplyPreview'] = r12;
env0_7.set(a0, object4);
r1 = object4;
} else if (a0.changelogId != null) {
object4 = {'content': null, 'isInlineReplyPreview': false, 'hasSpoilerEmbeds': false,
'hasBailedAst': false};
defaultImport = importDefault(6622) /* metro dependency 6622: MarkupUtils */;
astParserFor = defaultImport.astParserFor;
moduleValue2 = require(8336) /* metro dependency 8336: ChangeLogStandardTemplate */;
value6 = Reflect.apply(astParserFor, defaultImport, [moduleValue2.changelogRules(a0.changelogId, true)]);
content = a0.content;
object6 = {hideSimpleEmbedContent: a2, formatInline: r12};
r12 = r10 || r11;
object6.allowHeading = r12;
r10 = !r10 ? r11 : r10;
object6.allowList = r10;
object6.allowLinks = r4;
object6.previewLinkTarget = r4;
object4.content = value6(content, false, object6);
env0_7.set(a0, object4);
r1 = object4;
} else {
object4 = {};
moduleValue = require(8349) /* metro dependency 8349: renderMessageMarkup */;
renderMessageMarkupToAST = moduleValue.renderMessageMarkupToAST;
object5 = {contentMessage: a1, hideSimpleEmbedContent: a2, formatInline: r12, allowGameMentions: true};
r8 = r10 || r11;
object5.allowHeading = r8;
r8 = r10 || r11;
object5.allowList = r8;
object5.allowLinks = r4;
object5.previewLinkTarget = r4;
copyDataProperties(object4, Reflect.apply(renderMessageMarkupToAST, moduleValue, [a0, object5]), undefined);
object4['isInlineReplyPreview'] = r12;
env0_7.set(a0, object4);
r1 = object4;
}
r0 = r1;
return r0;
}
return r0;
function parseEmbedTitleMarkupWithoutLinks(a0, a1) { // fn#66359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8520:580, offset: 0x01bf8747, size: 129 bytes, params: 3, frame: 19
var r0;
var embedTitleWithoutLinksToAST;
const value = '' + a0 + '-' + a1 + '-nolinks';
const value3 = env0_5.get(value);
if (value3 != null) {
r0 = value3;
} else {
embedTitleWithoutLinksToAST = (importDefault(6622) /* metro dependency 6622: MarkupUtils */).parseEmbedTitleWithoutLinksToAST(a0,
true, {channelId: a1});
env0_5.set(value, embedTitleWithoutLinksToAST);
r0 = embedTitleWithoutLinksToAST;
}
return r0;
}
function parseEmbedDescriptionMarkup({description, channelId, isField, ignoreCache, replaceMap, showListsAndHeaders, showMaskedLinks}) { // fn#66360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8520:790, offset: 0x01bf87c8, size: 247 bytes, params: 2, frame: 27
var r2;
var r10;
var r6;
var propertyName;
var propertyName2;
var replaceAll;
var value4;
const value = '' + description + '-' + channelId;
const value3 = env0_6.get(value);
if (value3 != null) {
reducibleJoin3: while (true) {
if (!ignoreCache) {
return value3;
}
break reducibleJoin3;
}
}
const properties = Object.keys(replaceMap);
const properties3 = properties.length;
if (properties === undefined) {
r6 = description;
} else {
r2 = description;
r10 = 0;
reducibleLoop4: while (true) {
propertyName = properties[r10];
propertyName2 = r10 + 1;
if (propertyName === undefined) {
r6 = r2;
break reducibleLoop4;
}
replaceAll = r2.replaceAll;
value4 = Reflect.apply(replaceAll, r2, [propertyName, replaceMap[propertyName]]);
r2 = value4;
r10 = propertyName2;
continue reducibleLoop4;
}
}
const toAST = (importDefault(6622) /* metro dependency 6622: MarkupUtils */).parseToAST(r6, true,
{'channelId': null, 'allowLinks': true, 'allowEmojiLinks': true, channelId: channelId,
allowHeading: !isField && showListsAndHeaders, allowList: showListsAndHeaders,
previewLinkTarget: showMaskedLinks});
env0_6.set(value, toAST);
return toAST;
}
function parseMessageMarkup(a0, a1, a2) { // fn#66361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8520:1199, offset: 0x01bf88bf, size: 418 bytes, params: 4, frame: 27
var r8;
var r1;
var r0;
var object;
var moduleValue;
var renderMessageMarkupToAST;
var object2;
var defaultImport;
var astParserFor;
var moduleValue2;
var value6;
var content;
var object3;
const value = a3;
const value2 = a4;
const value3 = a5;
const value4 = a6;
let r12 = value !== undefined ? value : false;
let r10 = value2 !== undefined ? value2 : false;
const r11 = value3 !== undefined ? value3 : false;
const r4 = value4 !== undefined ? value4 : false;
const value5 = env0_7.get(a0);
if (value5 == null) {
if (a0.type !== MessageTypes.CHANGELOG) {
object = {};
moduleValue = require(8349) /* metro dependency 8349: renderMessageMarkup */;
renderMessageMarkupToAST = moduleValue.renderMessageMarkupToAST;
object2 = {contentMessage: a1, hideSimpleEmbedContent: a2, formatInline: r12, allowGameMentions: true};
r8 = r10 || r11;
object2.allowHeading = r8;
r8 = r10 || r11;
object2.allowList = r8;
object2.allowLinks = r4;
object2.previewLinkTarget = r4;
copyDataProperties(object, Reflect.apply(renderMessageMarkupToAST, moduleValue, [a0, object2]), undefined);
object['isInlineReplyPreview'] = r12;
env0_7.set(a0, object);
r1 = object;
} else if (a0.changelogId != null) {
object = {'content': null, 'isInlineReplyPreview': false, 'hasSpoilerEmbeds': false, 'hasBailedAst': false};
defaultImport = importDefault(6622) /* metro dependency 6622: MarkupUtils */;
astParserFor = defaultImport.astParserFor;
moduleValue2 = require(8336) /* metro dependency 8336: ChangeLogStandardTemplate */;
value6 = Reflect.apply(astParserFor, defaultImport, [moduleValue2.changelogRules(a0.changelogId, true)]);
content = a0.content;
object3 = {hideSimpleEmbedContent: a2, formatInline: r12};
r12 = r10 || r11;
object3.allowHeading = r12;
r10 = !r10 ? r11 : r10;
object3.allowList = r10;
object3.allowLinks = r4;
object3.previewLinkTarget = r4;
object.content = value6(content, false, object3);
env0_7.set(a0, object);
r1 = object;
} else {
object = {};
moduleValue = require(8349) /* metro dependency 8349: renderMessageMarkup */;
renderMessageMarkupToAST = moduleValue.renderMessageMarkupToAST;
object2 = {contentMessage: a1, hideSimpleEmbedContent: a2, formatInline: r12, allowGameMentions: true};
r8 = r10 || r11;
object2.allowHeading = r8;
r8 = r10 || r11;
object2.allowList = r8;
object2.allowLinks = r4;
object2.previewLinkTarget = r4;
copyDataProperties(object, Reflect.apply(renderMessageMarkupToAST, moduleValue, [a0, object2]), undefined);
object['isInlineReplyPreview'] = r12;
env0_7.set(a0, object);
r1 = object;
}
r0 = r1;
} else if (value5.isInlineReplyPreview === r12) {
r0 = value5;
} else {
if (a0.type !== MessageTypes.CHANGELOG) {
object = {};
moduleValue = require(8349) /* metro dependency 8349: renderMessageMarkup */;
renderMessageMarkupToAST = moduleValue.renderMessageMarkupToAST;
object2 = {contentMessage: a1, hideSimpleEmbedContent: a2, formatInline: r12, allowGameMentions: true};
r8 = r10 || r11;
object2.allowHeading = r8;
r8 = r10 || r11;
object2.allowList = r8;
object2.allowLinks = r4;
object2.previewLinkTarget = r4;
copyDataProperties(object, Reflect.apply(renderMessageMarkupToAST, moduleValue, [a0, object2]), undefined);
object['isInlineReplyPreview'] = r12;
env0_7.set(a0, object);
r1 = object;
} else if (a0.changelogId != null) {
object = {'content': null, 'isInlineReplyPreview': false, 'hasSpoilerEmbeds': false, 'hasBailedAst': false};
defaultImport = importDefault(6622) /* metro dependency 6622: MarkupUtils */;
astParserFor = defaultImport.astParserFor;
moduleValue2 = require(8336) /* metro dependency 8336: ChangeLogStandardTemplate */;
value6 = Reflect.apply(astParserFor, defaultImport, [moduleValue2.changelogRules(a0.changelogId, true)]);
content = a0.content;
object3 = {hideSimpleEmbedContent: a2, formatInline: r12};
r12 = r10 || r11;
object3.allowHeading = r12;
r10 = !r10 ? r11 : r10;
object3.allowList = r10;
object3.allowLinks = r4;
object3.previewLinkTarget = r4;
object.content = value6(content, false, object3);
env0_7.set(a0, object);
r1 = object;
} else {
object = {};
moduleValue = require(8349) /* metro dependency 8349: renderMessageMarkup */;
renderMessageMarkupToAST = moduleValue.renderMessageMarkupToAST;
object2 = {contentMessage: a1, hideSimpleEmbedContent: a2, formatInline: r12, allowGameMentions: true};
r8 = r10 || r11;
object2.allowHeading = r8;
r8 = r10 || r11;
object2.allowList = r8;
object2.allowLinks = r4;
object2.previewLinkTarget = r4;
copyDataProperties(object, Reflect.apply(renderMessageMarkupToAST, moduleValue, [a0, object2]), undefined);
object['isInlineReplyPreview'] = r12;
env0_7.set(a0, object);
r1 = object;
}
r0 = r1;
}
return r0;
}
}
global.__d(_fun66357, 8335, [661, 672, 1393, 6622, 8336, 8349,
2]) /* metro module 8335, dependencies: [661, 672, 1393, 6622, 8336, 8349, 2] */;
@@ -1,65 +1,82 @@
/* Metro module 8182; source: modules/messages/native/renderer/MessageWithContent.tsx; dependencies: [8183, 8178, 8184, 1244, 8352, 2] */
import GuildAutomodMessageStore from '../../../guild_automod/GuildAutomodMessageStore.tsx'; /* Metro dependency 8183 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as RowGeneratorConstantsModule from './RowGeneratorConstants.tsx'; /* Metro dependency 8178 */
function _fun65624(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8367:6, offset: 0x01bd5821, size: 140 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildAutomodMessageStore = importDefault(8183) /* metro dependency 8183: GuildAutomodMessageStore */;
const env0_4 = (require(8178) /* metro dependency 8178: RowGeneratorConstants */).RowType;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/MessageWithContent.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/renderer/MessageWithContent.tsx');
exports.generateMessageRowData = generateMessageRowData;
function generateMessageRowData(a0, a1, a2) { // fn#65625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8367:238, offset: 0x01bd58ad, size: 710 bytes, params: 4, frame: 34
var r3;
var defaultImport2;
var createBackgroundHighlight;
var guildAutomodMessageStoreBinding;
const changeType = a0.changeType;
const message = a0.message;
const roleStyle = a0.roleStyle;
const isFirst = a0.isFirst;
const isEditing = a0.isEditing;
const separatorBefore = a0.separatorBefore;
const canAddNewReactions = a0.canAddNewReactions;
const reactionsTheme = a0.reactionsTheme;
const isSystemDM = a0.isSystemDM;
const r20 = isSystemDM !== undefined && isSystemDM;
const canShowImages = a0.canShowImages;
const r21 = canShowImages === undefined || canShowImages;
const truncation = a0.truncation;
const renderContentOnly = a0.renderContentOnly;
const pushFeedbackType = a0.pushFeedbackType;
const alwaysShowAddReaction = a0.alwaysShowAddReaction;
const r4 = alwaysShowAddReaction !== undefined && alwaysShowAddReaction;
const overrideBackgroundHighlight = a0.overrideBackgroundHighlight;
const showContentInventoryEntryFallbackEmbed = a0.showContentInventoryEntryFallbackEmbed;
const object = {};
const MESSAGE = RowType.MESSAGE;
object.type = MESSAGE;
object.message = (importDefault(8184) /* metro dependency 8184: createMessageContent */)({options: a1,
message: message, roleStyle: roleStyle, isFirst: isFirst, isEditing: isEditing, canShowImages: r21,
isSystemDM: r20, isInlineReplyPreview: false, pushFeedbackType: pushFeedbackType,
renderContentOnly: renderContentOnly,
showContentInventoryEntryFallbackEmbed: showContentInventoryEntryFallbackEmbed});
object.canAddNewReactions = canAddNewReactions;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
object.addNewReactionAccessibilityLabel = Reflect.apply(string, intl, [t.lfIHs4]);
object.reactionsTheme = reactionsTheme;
object.highlightLabel = intl.string(t['IOS/dU']);
object.renderContentOnly = renderContentOnly;
object.separatorBefore = separatorBefore;
object.changeType = changeType;
object.truncation = truncation;
object.alwaysShowAddReaction = r4;
if (overrideBackgroundHighlight != null) {
r3 = overrideBackgroundHighlight;
} else {
defaultImport2 = importDefault(8352) /* metro dependency 8352: RowGeneratorUtils */;
createBackgroundHighlight = defaultImport2.createBackgroundHighlight;
guildAutomodMessageStoreBinding = GuildAutomodMessageStore;
r3 = Reflect.apply(createBackgroundHighlight, defaultImport2, [{message: message, theme: a2,
isEditing: isEditing,
isAutomodBlockedMessage: guildAutomodMessageStoreBinding.getMessage(message.id) != null}]);
}
object.backgroundHighlight = r3;
const defaultImport3 = importDefault(8352) /* metro dependency 8352: RowGeneratorUtils */;
object.swipeActions = defaultImport3.createSwipeActions(a1.enableSwipeActions && a0.canReply,
a1.enableSwipeActions && a0.canEdit);
object.replyAccessibilityLabel = intl.string(t['5IEsGx']);
string = intl.string;
const I3ltXO = t.I3ltXO;
object.forwardAccessibilityLabel = Reflect.apply(string, intl, [I3ltXO]);
object.threadAccessibilityLabel = intl.string(t.rBIGBL);
return object;
}
}
function generateMessageRowData(a0, a1, a2) { // fn#65625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8367:238, offset: 0x01bd58ad, size: 710 bytes, params: 4, frame: 34
const changeType = a0.changeType;
const message = a0.message;
const roleStyle = a0.roleStyle;
const isFirst = a0.isFirst;
const isEditing = a0.isEditing;
const separatorBefore = a0.separatorBefore;
const canAddNewReactions = a0.canAddNewReactions;
const reactionsTheme = a0.reactionsTheme;
const isSystemDM = a0.isSystemDM;
const r20 = isSystemDM !== undefined && isSystemDM;
const canShowImages = a0.canShowImages;
const r21 = canShowImages === undefined || canShowImages;
const truncation = a0.truncation;
const renderContentOnly = a0.renderContentOnly;
const pushFeedbackType = a0.pushFeedbackType;
const alwaysShowAddReaction = a0.alwaysShowAddReaction;
const r4 = alwaysShowAddReaction !== undefined && alwaysShowAddReaction;
const overrideBackgroundHighlight = a0.overrideBackgroundHighlight;
const showContentInventoryEntryFallbackEmbed = a0.showContentInventoryEntryFallbackEmbed;
const object2 = {};
const MESSAGE = RowType.MESSAGE;
object2.type = MESSAGE;
object2.message = (importDefault(8184) /* metro dependency 8184: createMessageContent */)({options: a1,
message: message, roleStyle: roleStyle, isFirst: isFirst, isEditing: isEditing, canShowImages: r21,
isSystemDM: r20, isInlineReplyPreview: false, pushFeedbackType: pushFeedbackType,
renderContentOnly: renderContentOnly,
showContentInventoryEntryFallbackEmbed: showContentInventoryEntryFallbackEmbed});
object2.canAddNewReactions = canAddNewReactions;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2.addNewReactionAccessibilityLabel = Reflect.apply(string, intl, [t.lfIHs4]);
object2.reactionsTheme = reactionsTheme;
object2.highlightLabel = intl.string(t['IOS/dU']);
object2.renderContentOnly = renderContentOnly;
object2.separatorBefore = separatorBefore;
object2.changeType = changeType;
object2.truncation = truncation;
object2.alwaysShowAddReaction = r4;
object2.backgroundHighlight = overrideBackgroundHighlight ?? (importDefault(8352) /* metro dependency 8352: RowGeneratorUtils */).createBackgroundHighlight({message: message,
theme: a2, isEditing: isEditing,
isAutomodBlockedMessage: GuildAutomodMessageStore.getMessage(message.id) != null});
const defaultImport3 = importDefault(8352) /* metro dependency 8352: RowGeneratorUtils */;
object2.swipeActions = defaultImport3.createSwipeActions(a1.enableSwipeActions && a0.canReply,
a1.enableSwipeActions && a0.canEdit);
object2.replyAccessibilityLabel = intl.string(t['5IEsGx']);
string = intl.string;
const I3ltXO = t.I3ltXO;
object2.forwardAccessibilityLabel = Reflect.apply(string, intl, [I3ltXO]);
object2.threadAccessibilityLabel = intl.string(t.rBIGBL);
return object2;
}
global.__d(_fun65624, 8182, [8183, 8178, 8184, 1244, 8352,
2]) /* metro module 8182, dependencies: [8183, 8178, 8184, 1244, 8352, 2] */;
@@ -1,16 +1,17 @@
/* Metro module 8179; source: modules/messages/native/renderer/RenderMessageOptionsContext.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun65617(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8364:6, offset: 0x01bd53c7, size: 158 bytes, params: 8, frame: 16
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {USER_SETTING: 0};
object2[0] = 'USER_SETTING';
object2.FORCE_ENABLE = 1;
object2[1] = 'FORCE_ENABLE';
object2.FORCE_DISABLE = 2;
object2[2] = 'FORCE_DISABLE';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/RenderMessageOptionsContext.tsx');
exports.UserOption = object2;
object = {USER_SETTING: 0};
object[0] = 'USER_SETTING';
object.FORCE_ENABLE = 1;
object[1] = 'FORCE_ENABLE';
object.FORCE_DISABLE = 2;
object[2] = 'FORCE_DISABLE';
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/renderer/RenderMessageOptionsContext.tsx');
exports.UserOption = object;
exports.DEFAULT_OPTIONS = {'renderEmbeds': true, 'renderReactions': true, 'inlineEmbedMedia': true,
'inlineAttachmentMedia': true, 'animateEmoji': true, 'gifAutoPlay': false, 'timestampHourCycle': 0,
'renderCodedLinks': true, 'renderGiftCode': true, 'renderActivityInstanceEmbed': true,
@@ -21,3 +22,4 @@ function _fun65617(global, require, importDefault, importAll, module, exports, d
'useAlternateEmbedColors': false, 'restrictedPreview': false};
}
global.__d(_fun65617, 8179, [2]) /* metro module 8179, dependencies: [2] */;
Loaded 100 of 22448 files, more files were not shown because too many files have changed in this diff. Show more