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,11 +1,15 @@
/* Metro module 8041; source: modules/application_commands/AgeRestrictedApplicationCommandsExperiment.tsx; dependencies: [1358, 2] */
import ApexExperiment from '../experiments/apex/ApexExperiment.tsx'; /* Metro dependency 1358 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun63743(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8219:6, offset: 0x01b8f161, size: 142 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importDefault(1358) /* metro dependency 1358: ApexExperiment */;
let value = ApexExperiment;
value = value({'kind': 'user', 'name': '2026-05-age-restricted-application-commands',
defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/AgeRestrictedApplicationCommandsExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/AgeRestrictedApplicationCommandsExperiment.tsx');
exports.default = value;
}
global.__d(_fun63743, 8041, [1358, 2]) /* metro module 8041, dependencies: [1358, 2] */;
@@ -1,16 +1,21 @@
/* Metro module 7166; source: modules/application_commands/ApplicationCommandActionCreators.tsx; dependencies: [1226, 7167, 661, 44, 5068, 694, 507, 21, 1909, 2] */
import SnowflakeUtils from '../../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */
import Module00044 from '../../by-id/module-00044.js'; /* Metro dependency 44 */
import Dispatcher from '../../Dispatcher.tsx'; /* Metro dependency 694 */
import AuthenticationStore from '../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import ApplicationCommandAutocompleteStore from './ApplicationCommandAutocompleteStore.tsx'; /* Metro dependency 7167 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun57508(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:6, offset: 0x013e757b, size: 293 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = updateOptionStates;
const updateOptionStates2 = updateOptionStates;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const applicationCommandAutocompleteStore = importDefault(7167) /* metro dependency 7167: ApplicationCommandAutocompleteStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).Endpoints;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/ApplicationCommandActionCreators.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/ApplicationCommandActionCreators.tsx');
exports.setActiveCommand = setActiveCommand;
exports.setPreferredCommandId = setPreferredCommandId;
exports.updateOptionStates = closure;
exports.updateOptionStates = updateOptionStates2;
exports.updateOptionValidationStates = updateOptionValidationStates;
exports.updateChannelState = updateChannelState;
exports.updateApplicationGuildCommandPermissions = function(a0, a1, a2, a3) {
@@ -27,178 +32,180 @@ function _fun57508(global, require, importDefault, importAll, module, exports, d
exports.fetchCommandsForApplication = fetchCommandsForApplication;
exports.updateRegistry = updateRegistry;
exports.setAppLauncherActiveCommand = setAppLauncherActiveCommand;
}
function updateOptionStates(a0, a1) { // fn#57509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:136, offset: 0x013e76a0, size: 64 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'APPLICATION_COMMAND_UPDATE_OPTIONS',
channelId: a0, changedOptionStates: a1});
}
function setActiveCommand({channelId, command, section, location, initialValues, triggerSection, queryLength, sectionName, query, searchResultsPosition, source, commandOrigin}) { // fn#57510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:383, offset: 0x013e76e0, size: 257 bytes, params: 2, frame: 27
if (command != null) {
(importDefault(44) /* metro dependency 44 */)(command.inputType !== (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandInputType.PLACEHOLDER,
'command should not be placeholder');
function updateOptionStates(a0, a1) { // fn#57509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:136, offset: 0x013e76a0, size: 64 bytes, params: 3, frame: 13
(Dispatcher).dispatch({type: 'APPLICATION_COMMAND_UPDATE_OPTIONS',
channelId: a0, changedOptionStates: a1});
}
const dispatcher = importDefault(694) /* metro dependency 694: Dispatcher */;
dispatcher.dispatch({type: 'APPLICATION_COMMAND_SET_ACTIVE_COMMAND', channelId: channelId, command: command,
section: section, initialValues: initialValues, location: location, triggerSection: triggerSection,
queryLength: queryLength, sectionName: sectionName, query: query, searchResultsPosition: searchResultsPosition,
source: source, commandOrigin: commandOrigin});
}
function setPreferredCommandId(a0, a1) { // fn#57511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:941, offset: 0x013e77e1, size: 64 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'APPLICATION_COMMAND_SET_PREFERRED_COMMAND',
channelId: a0, commandId: a1});
}
function setActiveCommand({channelId, command, section, location, initialValues, triggerSection, queryLength, sectionName, query, searchResultsPosition, source, commandOrigin}) { // fn#57510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:383, offset: 0x013e76e0, size: 257 bytes, params: 2, frame: 27
if (command != null) {
(importDefault(44) /* metro dependency 44 */)(command.inputType !== (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandInputType.PLACEHOLDER,
'command should not be placeholder');
}
Dispatcher.dispatch({type: 'APPLICATION_COMMAND_SET_ACTIVE_COMMAND', channelId: channelId, command: command,
section: section, initialValues: initialValues, location: location, triggerSection: triggerSection,
queryLength: queryLength, sectionName: sectionName, query: query, searchResultsPosition: searchResultsPosition,
source: source, commandOrigin: commandOrigin});
}
function updateOptionValidationStates(a0, a1) { // fn#57512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:1142, offset: 0x013e7821, size: 76 bytes, params: 3, frame: 15
var value;
const updateOptionStatesBinding = updateOptionStates;
const Object = global.Object;
const fromEntries = Object.fromEntries;
const Object2 = global.Object;
value = Reflect.apply(fromEntries, Object, [Reflect.apply(Object2.entries(a1).map, value, [function(a0) {
var r0;
var r2;
var r3;
var item3;
var value3;
var iterator = a0[Symbol.iterator]();
var iterator2 = iterator.next;
var item2 = Reflect.apply(iterator2, iterator, []);
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value = undefined;
var value2 = item2 === value;
var r1 = value2 ? value : item;
if (value2) {
r0 = item2;
r2 = value;
r3 = value2;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
function setPreferredCommandId(a0, a1) { // fn#57511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:941, offset: 0x013e77e1, size: 64 bytes, params: 3, frame: 13
(Dispatcher).dispatch({type: 'APPLICATION_COMMAND_SET_PREFERRED_COMMAND',
channelId: a0, commandId: a1});
}
function updateOptionValidationStates(a0, a1) { // fn#57512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:1142, offset: 0x013e7821, size: 76 bytes, params: 3, frame: 15
var value;
const updateOptionStatesBinding = updateOptionStates;
const Object = global.Object;
const fromEntries = Object.fromEntries;
const Object2 = global.Object;
value = Reflect.apply(fromEntries, Object, [Reflect.apply(Object2.entries(a1).map, value, [function(a0) {
var r0;
var r2;
var r3;
var item3;
var value3;
var iterator = a0[Symbol.iterator]();
var iterator2 = iterator.next;
var item2 = Reflect.apply(iterator2, iterator, []);
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value = undefined;
var value2 = item2 === value;
var r1 = value2 ? value : item;
if (value2) {
r0 = item2;
r2 = value;
r3 = value3;
r3 = value2;
} else {
r0 = item3;
r2 = item;
r3 = value3;
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
r2 = value;
r3 = value3;
} else {
r0 = item3;
r2 = item;
r3 = value3;
}
}
if (!r3) {
r0.return();
}
return [r1, {lastValidationResult: r2}];
}])]);
updateOptionStatesBinding(a0, value);
}
function updateChannelState({channelId, command, section, preferredCommandId, location, changedOptionStates}) { // fn#57514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:1312, offset: 0x013e78c1, size: 112 bytes, params: 2, frame: 19
Dispatcher.dispatch({type: 'APPLICATION_COMMAND_UPDATE_CHANNEL_STATE', channelId: channelId, command: command,
section: section, preferredCommandId: preferredCommandId, location: location,
changedOptionStates: changedOptionStates});
}
function performAutocomplete(a0, a1, a2) { // fn#57516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:1831, offset: 0x013e7990, size: 433 bytes, params: 4, frame: 23
var id;
var defaultImport3;
var dispatch;
var object;
var applicationCommandAutocompleteStoreBinding;
var getAutocompleteChoices;
var HTTP;
var post;
var object2;
var guild;
const value2 = undefined;
const defaultImport = Module00044;
let autocomplete = a1.autocomplete;
defaultImport(autocomplete != null, 'Missing autocomplete context');
autocomplete = a1.autocomplete;
const query = autocomplete.query;
const name = autocomplete.name;
const defaultImport2 = SnowflakeUtils;
const fromTimestamp = defaultImport2.fromTimestamp;
const Date = global.Date;
const value3 = Reflect.apply(fromTimestamp, defaultImport2, [Date.now()]);
let channel = a1.channel;
if (channel != null) {
defaultImport3 = importDefault(694) /* metro dependency 694: Dispatcher */;
dispatch = defaultImport3.dispatch;
object = {type: 'APPLICATION_COMMAND_AUTOCOMPLETE_REQUEST', nonce: value3};
channel = a1.channel;
id = channel.id;
object.channelId = id;
object.query = query;
object.name = name;
Reflect.apply(dispatch, defaultImport3, [object]);
applicationCommandAutocompleteStoreBinding = ApplicationCommandAutocompleteStore;
getAutocompleteChoices = applicationCommandAutocompleteStoreBinding.getAutocompleteChoices;
channel = a1.channel;
id = channel.id;
if (Reflect.apply(getAutocompleteChoices, applicationCommandAutocompleteStoreBinding, [id, name,
query]) == null) {
HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
post = HTTP.post;
object = {};
object.url = Endpoints.INTERACTIONS;
object2 = {};
object2.type = (require(1909) /* metro dependency 1909: Server */).InteractionTypes.APPLICATION_COMMAND_AUTOCOMPLETE;
object2.application_id = a0.applicationId;
guild = a1.guild;
id = guild == null ? value2 : guild.id;
object2.guild_id = id;
id = a1.channel.id;
object2.channel_id = id;
object2.session_id = AuthenticationStore.getSessionId();
object2.data = a2;
object2.nonce = value3;
object.body = object2;
object.timeout = 3000;
object.rejectWithError = true;
Reflect.apply(post, HTTP, [object]).catch(_fun57517);
}
}
if (!r3) {
r0.return();
return value2;
function _fun57517() { // fn#57517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:2477, offset: 0x013e7b41, size: 59 bytes, params: 1, frame: 13
const value = environment.__proto__;
(Dispatcher).dispatch({type: 'INTERACTION_FAILURE', nonce: env0_0});
}
return [r1, {lastValidationResult: r2}];
}])]);
updateOptionStatesBinding(a0, value);
}
function updateChannelState({channelId, command, section, preferredCommandId, location, changedOptionStates}) { // fn#57514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:1312, offset: 0x013e78c1, size: 112 bytes, params: 2, frame: 19
const dispatcher = importDefault(694) /* metro dependency 694: Dispatcher */;
dispatcher.dispatch({type: 'APPLICATION_COMMAND_UPDATE_CHANNEL_STATE', channelId: channelId, command: command,
section: section, preferredCommandId: preferredCommandId, location: location,
changedOptionStates: changedOptionStates});
}
}
function performAutocomplete(a0, a1, a2) { // fn#57516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:1831, offset: 0x013e7990, size: 433 bytes, params: 4, frame: 23
var id;
var defaultImport3;
var dispatch;
var object3;
var getAutocompleteChoices;
var HTTP;
var post;
var object4;
var guild;
const value2 = undefined;
const defaultImport = importDefault(44) /* metro dependency 44 */;
let autocomplete = a1.autocomplete;
defaultImport(autocomplete != null, 'Missing autocomplete context');
autocomplete = a1.autocomplete;
const query = autocomplete.query;
const name = autocomplete.name;
const defaultImport2 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
const fromTimestamp = defaultImport2.fromTimestamp;
const Date = global.Date;
const value3 = Reflect.apply(fromTimestamp, defaultImport2, [Date.now()]);
let channel = a1.channel;
if (channel != null) {
defaultImport3 = importDefault(694) /* metro dependency 694: Dispatcher */;
dispatch = defaultImport3.dispatch;
object3 = {type: 'APPLICATION_COMMAND_AUTOCOMPLETE_REQUEST', nonce: value3};
channel = a1.channel;
id = channel.id;
object3.channelId = id;
object3.query = query;
object3.name = name;
Reflect.apply(dispatch, defaultImport3, [object3]);
getAutocompleteChoices = ApplicationCommandAutocompleteStore.getAutocompleteChoices;
channel = a1.channel;
id = channel.id;
if (Reflect.apply(getAutocompleteChoices, ApplicationCommandAutocompleteStore, [id, name, query]) == null) {
HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
post = HTTP.post;
object3 = {};
object3.url = Endpoints.INTERACTIONS;
object4 = {};
object4.type = (require(1909) /* metro dependency 1909: Server */).InteractionTypes.APPLICATION_COMMAND_AUTOCOMPLETE;
object4.application_id = a0.applicationId;
guild = a1.guild;
id = guild == null ? value2 : guild.id;
object4.guild_id = id;
id = a1.channel.id;
object4.channel_id = id;
object4.session_id = AuthenticationStore.getSessionId();
object4.data = a2;
object4.nonce = value3;
object3.body = object4;
object3.timeout = 3000;
object3.rejectWithError = true;
Reflect.apply(post, HTTP, [object3]).catch(_fun57517);
function fetchCommand(a0, a1, a2) { // fn#57518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:2557, offset: 0x013e7b7c, size: 71 bytes, params: 4, frame: 13
(Dispatcher).dispatch({type: 'APPLICATION_COMMAND_FETCH',
channelId: a1, commandId: a2, guildId: a0});
}
function fetchCommands(a0, a1, a2) { // fn#57519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:2690, offset: 0x013e7bc3, size: 71 bytes, params: 4, frame: 13
(Dispatcher).dispatch({type: 'APPLICATION_COMMANDS_FETCH',
channelId: a1, commandIds: a2, guildId: a0});
}
function fetchCommandsForApplication({guildId, channelId, applicationId}) { // fn#57520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:2840, offset: 0x013e7c0a, size: 79 bytes, params: 2, frame: 16
Dispatcher.dispatch({type: 'APPLICATION_COMMANDS_FETCH_FOR_APPLICATION', channelId: channelId, guildId: guildId,
applicationId: applicationId});
}
function updateRegistry(a0, a1, a2) { // fn#57521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:3044, offset: 0x013e7c59, size: 72 bytes, params: 4, frame: 13
(Dispatcher).dispatch({type: 'APPLICATION_COMMAND_REGISTRY_UPDATE',
applications: a1, commands: a0, channelId: a2});
}
function setAppLauncherActiveCommand(a0, a1) { // fn#57522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:3207, offset: 0x013e7ca1, size: 143 bytes, params: 3, frame: 16
if (a1 != null) {
(importDefault(44) /* metro dependency 44 */)(a1.inputType !== (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandInputType.PLACEHOLDER,
'command should not be placeholder');
}
(Dispatcher).dispatch({type: 'APP_LAUNCHER_SET_ACTIVE_COMMAND',
channelId: a0, command: a1});
}
return value2;
}
function fetchCommand(a0, a1, a2) { // fn#57518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:2557, offset: 0x013e7b7c, size: 71 bytes, params: 4, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'APPLICATION_COMMAND_FETCH',
channelId: a1, commandId: a2, guildId: a0});
}
function fetchCommands(a0, a1, a2) { // fn#57519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:2690, offset: 0x013e7bc3, size: 71 bytes, params: 4, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'APPLICATION_COMMANDS_FETCH',
channelId: a1, commandIds: a2, guildId: a0});
}
function fetchCommandsForApplication({guildId, channelId, applicationId}) { // fn#57520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:2840, offset: 0x013e7c0a, size: 79 bytes, params: 2, frame: 16
const dispatcher = importDefault(694) /* metro dependency 694: Dispatcher */;
dispatcher.dispatch({type: 'APPLICATION_COMMANDS_FETCH_FOR_APPLICATION', channelId: channelId, guildId: guildId,
applicationId: applicationId});
}
function updateRegistry(a0, a1, a2) { // fn#57521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:3044, offset: 0x013e7c59, size: 72 bytes, params: 4, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'APPLICATION_COMMAND_REGISTRY_UPDATE',
applications: a1, commands: a0, channelId: a2});
}
function setAppLauncherActiveCommand(a0, a1) { // fn#57522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:3207, offset: 0x013e7ca1, size: 143 bytes, params: 3, frame: 16
if (a1 != null) {
(importDefault(44) /* metro dependency 44 */)(a1.inputType !== (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandInputType.PLACEHOLDER,
'command should not be placeholder');
}
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'APP_LAUNCHER_SET_ACTIVE_COMMAND',
channelId: a0, command: a1});
}
function _fun57517() { // fn#57517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7344:2477, offset: 0x013e7b41, size: 59 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'INTERACTION_FAILURE', nonce: env0_0});
}
global.__d(_fun57508, 7166, [1226, 7167, 661, 44, 5068, 694, 507, 21, 1909,
2]) /* metro module 7166, dependencies: [1226, 7167, 661, 44, 5068, 694, 507, 21, 1909, 2] */;
@@ -1,320 +1,342 @@
/* Metro module 7167; source: modules/application_commands/ApplicationCommandAutocompleteStore.tsx; dependencies: [6, 7, 15, 17, 18, 7168, 661, 477, 1909, 4863, 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 ApplicationCommandStore from './ApplicationCommandStore.tsx'; /* Metro dependency 7168 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as PlatformUtilsModule from '../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as AppAnalyticsUtilsModule from '../app_analytics/AppAnalyticsUtils.tsx'; /* Metro dependency 4863 */
function _fun57523(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:6, offset: 0x013e7d30, size: 508 bytes, params: 8, frame: 22
const env0_0 = require;
const closure = CONNECTION_OPEN_57528;
const closure2 = APPLICATION_COMMAND_SET_ACTIVE_COMMAND;
const CONNECTION_OPEN_575282 = CONNECTION_OPEN_57528;
const APPLICATION_COMMAND_SET_ACTIVE_COMMAND2 = APPLICATION_COMMAND_SET_ACTIVE_COMMAND;
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 applicationCommandStore = importDefault(7168) /* metro dependency 7168: ApplicationCommandStore */;
const env0_8 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
let Map = global.Map;
let map = new Map();
Map = global.Map;
map = new Map();
Map = global.Map;
map = new Map();
const env0_12 = (require(477) /* metro dependency 477: PlatformUtils */).isDesktop();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const env0_12 = (PlatformUtilsModule).isDesktop();
const Store = (Flux).Store;
_fun57531(Store).displayName = 'ApplicationCommandAutocompleteStore';
map = new map(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: closure, LOGOUT: closure,
CHANNEL_SELECT: closure, APPLICATION_COMMAND_AUTOCOMPLETE_REQUEST: APPLICATION_COMMAND_AUTOCOMPLETE_REQUEST,
map = new map(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: CONNECTION_OPEN_575282,
LOGOUT: CONNECTION_OPEN_575282, CHANNEL_SELECT: CONNECTION_OPEN_575282,
APPLICATION_COMMAND_AUTOCOMPLETE_REQUEST: APPLICATION_COMMAND_AUTOCOMPLETE_REQUEST,
APPLICATION_COMMAND_AUTOCOMPLETE_RESPONSE: APPLICATION_COMMAND_AUTOCOMPLETE_RESPONSE,
INTERACTION_FAILURE: INTERACTION_FAILURE_57541, APPLICATION_COMMAND_SET_ACTIVE_COMMAND: closure2,
APP_LAUNCHER_SET_ACTIVE_COMMAND: closure2,
INTERACTION_FAILURE: INTERACTION_FAILURE_57541,
APPLICATION_COMMAND_SET_ACTIVE_COMMAND: APPLICATION_COMMAND_SET_ACTIVE_COMMAND2,
APP_LAUNCHER_SET_ACTIVE_COMMAND: APPLICATION_COMMAND_SET_ACTIVE_COMMAND2,
APPLICATION_COMMAND_UPDATE_CHANNEL_STATE: APPLICATION_COMMAND_UPDATE_CHANNEL_STATE});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/ApplicationCommandAutocompleteStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/ApplicationCommandAutocompleteStore.tsx');
exports.default = map;
}
function _isNativeReflectConstruct_57524() { // fn#57524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:183, offset: 0x013e7f2c, 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_57524_isNativeReflectConstruct = function() {
return !!result;
})();
}
function getOrCreateChannelState(a0) { // fn#57527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:410, offset: 0x013e7f8a, size: 255 bytes, params: 2, frame: 18
var set;
var object2;
var activeCommand;
var value3;
var Map;
var prototype;
var value4;
var map;
var value6;
var value8;
var value10;
let binding = env0_10;
if (!binding.has(a0)) {
binding = env0_10;
set = binding.set;
object2 = {};
activeCommand = ApplicationCommandStore.getActiveCommand(a0);
value3 = undefined;
object2.commandId = activeCommand == null ? value3 : activeCommand.id;
object2.optionName = ApplicationCommandStore.getActiveOptionName(a0);
Map = global.Map;
prototype = Map.prototype;
value4 = Object.create(prototype, {constructor: {value: Map}});
map = new Map();
object2.optionNameToAutocompleteQueries = map instanceof Object ? map : value4;
Map = global.Map;
prototype = Map.prototype;
value6 = Object.create(prototype, {constructor: {value: Map}});
map = new Map();
object2.optionNameToLastResults = map instanceof Object ? map : value6;
Map = global.Map;
prototype = Map.prototype;
value8 = Object.create(prototype, {constructor: {value: Map}});
map = new Map();
object2.optionNameToNonce = map instanceof Object ? map : value8;
Map = global.Map;
prototype = Map.prototype;
value10 = Object.create(prototype, {constructor: {value: Map}});
map = new Map();
object2.optionNameToLastQuery = map instanceof Object ? map : value10;
object2.lastErrored = false;
object2.lastResponseNonce = value3;
Reflect.apply(set, binding, [a0, object2]);
}
return env0_10.get(a0);
}
function CHANNEL_SELECT_57528() { // fn#57528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:747, offset: 0x013e8089, size: 35 bytes, params: 1, frame: 10
env0_9.clear();
env0_10.clear();
return true;
}
function APPLICATION_COMMAND_SET_ACTIVE_COMMAND({channelId, command}) { // fn#57529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:825, offset: 0x013e80ac, size: 47 bytes, params: 2, frame: 15
handleCommandChange(channelId, command?.id);
}
function handleCommandChange(a0, a1) { // fn#57530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:925, offset: 0x013e80db, size: 184 bytes, params: 3, frame: 15
const activeOptionName = ApplicationCommandStore.getActiveOptionName(a0);
let value = env0_10.get(a0);
let r0 = value != null && (a1 !== value.commandId || activeOptionName !== value.optionName);
if (r0) {
if (a1 != null && a1 !== value.commandId) {
value.optionNameToLastResults.clear();
value.optionNameToNonce.clear();
value.optionNameToLastQuery.clear();
value.optionNameToAutocompleteQueries.clear();
function _isNativeReflectConstruct_57524() { // fn#57524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:183, offset: 0x013e7f2c, 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) {
}
value.lastErrored = false;
value.commandId = a1;
value.optionName = activeOptionName;
value = true;
r0 = value;
return (_isNativeReflectConstruct_57524_isNativeReflectConstruct = function() {
return !!result;
})();
}
return r0;
}
function _fun57531(a0) { // fn#57531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:1275, offset: 0x013e8193, size: 164 bytes, params: 2, frame: 16
const closure = ApplicationCommandAutocompleteStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function() {
this.waitFor(ApplicationCommandStore);
}}, {key: 'getLastErrored', value: function(a0) {
return getOrCreateChannelState(a0).lastErrored;
}}, {key: 'getAutocompleteChoices', value: value_57535}, {key: 'getAutocompleteLastChoices', value: function(a0,
a1) {
return getOrCreateChannelState(a0).optionNameToLastResults.get(a1);
}}, {key: 'getLastResponseNonce', value: function(a0) {
return getOrCreateChannelState(a0).lastResponseNonce;
}}]);
}
function APPLICATION_COMMAND_AUTOCOMPLETE_REQUEST({nonce, channelId, query, name}) { // fn#57538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:2382, offset: 0x013e82cb, size: 303 bytes, params: 2, frame: 20
var r1;
const orCreateChannelState = getOrCreateChannelState(channelId);
let optionNameToLastQuery = orCreateChannelState.optionNameToLastQuery;
const get = optionNameToLastQuery.get;
if (Reflect.apply(get, optionNameToLastQuery, [name]) === query) {
return false;
function getOrCreateChannelState(a0) { // fn#57527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:410, offset: 0x013e7f8a, size: 255 bytes, params: 2, frame: 18
var set;
var object;
var activeCommand;
var value3;
var Map;
var prototype;
var value4;
var map;
var value6;
var value8;
var value10;
let binding = env0_10;
if (!binding.has(a0)) {
binding = env0_10;
set = binding.set;
object = {};
activeCommand = ApplicationCommandStore.getActiveCommand(a0);
value3 = undefined;
object.commandId = activeCommand == null ? value3 : activeCommand.id;
object.optionName = ApplicationCommandStore.getActiveOptionName(a0);
Map = global.Map;
prototype = Map.prototype;
value4 = Object.create(prototype, {constructor: {value: Map}});
map = new Map();
object.optionNameToAutocompleteQueries = map instanceof Object ? map : value4;
Map = global.Map;
prototype = Map.prototype;
value6 = Object.create(prototype, {constructor: {value: Map}});
map = new Map();
object.optionNameToLastResults = map instanceof Object ? map : value6;
Map = global.Map;
prototype = Map.prototype;
value8 = Object.create(prototype, {constructor: {value: Map}});
map = new Map();
object.optionNameToNonce = map instanceof Object ? map : value8;
Map = global.Map;
prototype = Map.prototype;
value10 = Object.create(prototype, {constructor: {value: Map}});
map = new Map();
object.optionNameToLastQuery = map instanceof Object ? map : value10;
object.lastErrored = false;
object.lastResponseNonce = value3;
Reflect.apply(set, binding, [a0, object]);
}
return env0_10.get(a0);
}
optionNameToLastQuery = orCreateChannelState.optionNameToLastQuery;
let set = optionNameToLastQuery.set;
Reflect.apply(set, optionNameToLastQuery, [name, query]);
const r2 = orCreateChannelState.optionNameToAutocompleteQueries.get(name)?.get(query);
if (r2 != null) {
orCreateChannelState.lastErrored = false;
orCreateChannelState.optionNameToLastResults.set(name, r2);
function CHANNEL_SELECT_57528() { // fn#57528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:747, offset: 0x013e8089, size: 35 bytes, params: 1, frame: 10
env0_9.clear();
env0_10.clear();
return true;
}
const value6 = orCreateChannelState.optionNameToNonce.get(name);
if (value6 != null) {
env0_9.delete(value6);
function APPLICATION_COMMAND_SET_ACTIVE_COMMAND({channelId, command}) { // fn#57529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:825, offset: 0x013e80ac, size: 47 bytes, params: 2, frame: 15
handleCommandChange(channelId, command?.id);
}
let binding = env0_9;
binding.set(nonce, {channelId: channelId, query: query, name: name});
binding = env0_11;
set = binding.set;
const Date = global.Date;
Reflect.apply(set, binding, [nonce, new Date()]);
orCreateChannelState.optionNameToNonce.set(name, nonce);
if (orCreateChannelState.lastErrored) {
orCreateChannelState.lastErrored = false;
r1 = true;
} else {
r1 = undefined;
function handleCommandChange(a0, a1) { // fn#57530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:925, offset: 0x013e80db, size: 184 bytes, params: 3, frame: 15
const activeOptionName = ApplicationCommandStore.getActiveOptionName(a0);
let value = env0_10.get(a0);
let r0 = value != null && (a1 !== value.commandId || activeOptionName !== value.optionName);
if (r0) {
if (a1 != null && a1 !== value.commandId) {
value.optionNameToLastResults.clear();
value.optionNameToNonce.clear();
value.optionNameToLastQuery.clear();
value.optionNameToAutocompleteQueries.clear();
}
value.lastErrored = false;
value.commandId = a1;
value.optionName = activeOptionName;
value = true;
r0 = value;
}
return r0;
}
return r1;
}
function APPLICATION_COMMAND_AUTOCOMPLETE_RESPONSE({choices, nonce}) { // fn#57539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:2966, offset: 0x013e83fa, size: 534 bytes, params: 2, frame: 22
var r5;
var r3;
var set;
var Map;
var value5;
var map;
var value7;
var Date;
var value12;
var date;
var optionNameToLastResults;
let value = undefined;
let binding = env0_9;
let get = binding.get;
const value3 = Reflect.apply(get, binding, [nonce]);
if (value3 == null) {
return false;
}
env0_9.delete(nonce);
const orCreateChannelState = getOrCreateChannelState(value3.channelId);
let optionNameToAutocompleteQueries = orCreateChannelState.optionNameToAutocompleteQueries;
get = optionNameToAutocompleteQueries.get;
let name = value3.name;
if (Reflect.apply(get, optionNameToAutocompleteQueries, [name]) == null) {
optionNameToAutocompleteQueries = orCreateChannelState.optionNameToAutocompleteQueries;
set = optionNameToAutocompleteQueries.set;
name = value3.name;
Map = global.Map;
value5 = Object.create(Map.prototype, {constructor: {value: Map}});
map = new Map();
Reflect.apply(set, optionNameToAutocompleteQueries, [name, map instanceof Object ? map : value5]);
}
binding = env0_12;
if (binding) {
value7 = ApplicationCommandStore.getActiveOption(value3.channelId);
r5 = (value7 == null ? value : value7.type) === (require(1909) /* metro dependency 1909: Server */).ApplicationCommandOptionType.INTEGER;
} else {
r5 = binding;
}
r5 = choices == null ? value : choices.map(_fun57540);
r5 = r5 ?? [];
const value10 = env0_11.get(nonce);
if (value10 != null) {
Date = global.Date;
value12 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
r3 = (date instanceof Object ? date : value12).getTime() - value10.getTime();
} else {
r3 = 0;
}
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = value.trackWithMetadata;
const APPLICATION_COMMAND_OPTION_STRING_AUTOCOMPLETE_PERFORMANCE = AnalyticEvents.APPLICATION_COMMAND_OPTION_STRING_AUTOCOMPLETE_PERFORMANCE;
Reflect.apply(trackWithMetadata, value, [APPLICATION_COMMAND_OPTION_STRING_AUTOCOMPLETE_PERFORMANCE,
{duration_ms: r3, error: false, num_options: r5.length}]);
env0_11.delete(nonce);
value = orCreateChannelState.optionNameToAutocompleteQueries.get(value3.name);
if (value != null) {
value.set(value3.query, r5);
}
const optionNameToLastQuery = orCreateChannelState.optionNameToLastQuery;
get = optionNameToLastQuery.get;
if (Reflect.apply(get, optionNameToLastQuery, [value3.name]) === value3.query) {
orCreateChannelState.lastErrored = false;
optionNameToLastResults = orCreateChannelState.optionNameToLastResults;
optionNameToLastResults.set(value3.name, r5);
}
orCreateChannelState.lastResponseNonce = nonce;
return true;
}
function _fun57531(a0) { // fn#57531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:1275, offset: 0x013e8193, size: 164 bytes, params: 2, frame: 16
const ApplicationCommandAutocompleteStore2 = ApplicationCommandAutocompleteStore;
Inherits(ApplicationCommandAutocompleteStore2, a0);
return CreateClass(ApplicationCommandAutocompleteStore2, [{key: 'initialize', value: function() {
this.waitFor(ApplicationCommandStore);
}}, {key: 'getLastErrored', value: function(a0) {
return getOrCreateChannelState(a0).lastErrored;
}}, {key: 'getAutocompleteChoices', value: value_57535}, {key: 'getAutocompleteLastChoices', value: function(a0,
a1) {
return getOrCreateChannelState(a0).optionNameToLastResults.get(a1);
}}, {key: 'getLastResponseNonce', value: function(a0) {
return getOrCreateChannelState(a0).lastResponseNonce;
}}]);
function ApplicationCommandAutocompleteStore() { // fn#57532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:1287, offset: 0x00ea76ec, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, ApplicationCommandAutocompleteStore);
const value3 = env1_5(ApplicationCommandAutocompleteStore);
return env1_4(this, _isNativeReflectConstruct_57524() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_57535(a0, a1, a2) { // fn#57535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:1833, offset: 0x013e8250, size: 60 bytes, params: 4, frame: 12
let value = environment.__proto__;
const getOrCreateChannelStateBinding = getOrCreateChannelState;
value = undefined;
const value2 = getOrCreateChannelStateBinding(a0).optionNameToAutocompleteQueries.get(a1);
return value2 == null ? value : value2.get(a2);
}
function INTERACTION_FAILURE_57541({nonce}) { // fn#57541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:3927, offset: 0x013e865b, size: 232 bytes, params: 2, frame: 19
var r0;
var Date;
var value5;
var date;
if (nonce == null) {
return false;
}
const value2 = env0_9.get(nonce);
if (value2 == null) {
return false;
function APPLICATION_COMMAND_AUTOCOMPLETE_REQUEST({nonce, channelId, query, name}) { // fn#57538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:2382, offset: 0x013e82cb, size: 303 bytes, params: 2, frame: 20
var r1;
const orCreateChannelState = getOrCreateChannelState(channelId);
let optionNameToLastQuery = orCreateChannelState.optionNameToLastQuery;
const get = optionNameToLastQuery.get;
if (Reflect.apply(get, optionNameToLastQuery, [name]) === query) {
return false;
}
optionNameToLastQuery = orCreateChannelState.optionNameToLastQuery;
let set = optionNameToLastQuery.set;
Reflect.apply(set, optionNameToLastQuery, [name, query]);
const r2 = orCreateChannelState.optionNameToAutocompleteQueries.get(name)?.get(query);
if (r2 != null) {
orCreateChannelState.lastErrored = false;
orCreateChannelState.optionNameToLastResults.set(name, r2);
return true;
}
const value6 = orCreateChannelState.optionNameToNonce.get(name);
if (value6 != null) {
env0_9.delete(value6);
}
let binding = env0_9;
binding.set(nonce, {channelId: channelId, query: query, name: name});
binding = env0_11;
set = binding.set;
const Date = global.Date;
Reflect.apply(set, binding, [nonce, new Date()]);
orCreateChannelState.optionNameToNonce.set(name, nonce);
if (orCreateChannelState.lastErrored) {
orCreateChannelState.lastErrored = false;
r1 = true;
} else {
r1 = undefined;
}
return r1;
}
env0_9.delete(nonce);
const value3 = env0_11.get(nonce);
if (value3 != null) {
Date = global.Date;
value5 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
r0 = (date instanceof Object ? date : value5).getTime() - value3.getTime();
} else {
r0 = 0;
function APPLICATION_COMMAND_AUTOCOMPLETE_RESPONSE({choices, nonce}) { // fn#57539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:2966, offset: 0x013e83fa, size: 534 bytes, params: 2, frame: 22
var r5;
var r3;
var set;
var Map;
var value5;
var map;
var applicationCommandStoreBinding;
var value7;
var Date;
var value12;
var date;
var optionNameToLastResults;
let value = undefined;
let binding = env0_9;
let get = binding.get;
const value3 = Reflect.apply(get, binding, [nonce]);
if (value3 == null) {
return false;
}
env0_9.delete(nonce);
const orCreateChannelState = getOrCreateChannelState(value3.channelId);
let optionNameToAutocompleteQueries = orCreateChannelState.optionNameToAutocompleteQueries;
get = optionNameToAutocompleteQueries.get;
let name = value3.name;
if (Reflect.apply(get, optionNameToAutocompleteQueries, [name]) == null) {
optionNameToAutocompleteQueries = orCreateChannelState.optionNameToAutocompleteQueries;
set = optionNameToAutocompleteQueries.set;
name = value3.name;
Map = global.Map;
value5 = Object.create(Map.prototype, {constructor: {value: Map}});
map = new Map();
Reflect.apply(set, optionNameToAutocompleteQueries, [name, map instanceof Object ? map : value5]);
}
binding = env0_12;
if (binding) {
applicationCommandStoreBinding = ApplicationCommandStore;
value7 = applicationCommandStoreBinding.getActiveOption(value3.channelId);
r5 = (value7 == null ? value : value7.type) === (require(1909) /* metro dependency 1909: Server */).ApplicationCommandOptionType.INTEGER;
} else {
r5 = binding;
}
r5 = choices == null ? value : choices.map(_fun57540);
r5 = r5 ?? [];
const value10 = env0_11.get(nonce);
if (value10 != null) {
Date = global.Date;
value12 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
r3 = (date instanceof Object ? date : value12).getTime() - value10.getTime();
} else {
r3 = 0;
}
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = value.trackWithMetadata;
const APPLICATION_COMMAND_OPTION_STRING_AUTOCOMPLETE_PERFORMANCE = AnalyticEvents.APPLICATION_COMMAND_OPTION_STRING_AUTOCOMPLETE_PERFORMANCE;
Reflect.apply(trackWithMetadata, value, [APPLICATION_COMMAND_OPTION_STRING_AUTOCOMPLETE_PERFORMANCE,
{duration_ms: r3, error: false, num_options: r5.length}]);
env0_11.delete(nonce);
value = orCreateChannelState.optionNameToAutocompleteQueries.get(value3.name);
if (value != null) {
value.set(value3.query, r5);
}
const optionNameToLastQuery = orCreateChannelState.optionNameToLastQuery;
get = optionNameToLastQuery.get;
if (Reflect.apply(get, optionNameToLastQuery, [value3.name]) === value3.query) {
orCreateChannelState.lastErrored = false;
optionNameToLastResults = orCreateChannelState.optionNameToLastResults;
optionNameToLastResults.set(value3.name, r5);
}
orCreateChannelState.lastResponseNonce = nonce;
return true;
function _fun57540({value, name_localized, name}) { // fn#57540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:3390, offset: 0x013e8610, size: 75 bytes, params: 2, frame: 14
var r1;
const object = {};
object.displayName = name_localized ?? name;
object.name = name;
if (env0_0) {
value = global.Number(value);
r1 = value;
} else {
r1 = value;
}
object.value = r1;
return object;
}
}
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = appAnalyticsUtilsModule.trackWithMetadata;
const APPLICATION_COMMAND_OPTION_STRING_AUTOCOMPLETE_PERFORMANCE = AnalyticEvents.APPLICATION_COMMAND_OPTION_STRING_AUTOCOMPLETE_PERFORMANCE;
Reflect.apply(trackWithMetadata, appAnalyticsUtilsModule,
[APPLICATION_COMMAND_OPTION_STRING_AUTOCOMPLETE_PERFORMANCE, {duration_ms: r0, error: true}]);
env0_11.delete(nonce);
getOrCreateChannelState(value2.channelId).lastErrored = true;
return true;
}
function value_57535(a0, a1, a2) { // fn#57535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:1833, offset: 0x013e8250, size: 60 bytes, params: 4, frame: 12
let value = environment.__proto__;
const getOrCreateChannelStateBinding = getOrCreateChannelState;
value = undefined;
const value2 = getOrCreateChannelStateBinding(a0).optionNameToAutocompleteQueries.get(a1);
return value2 == null ? value : value2.get(a2);
}
function INTERACTION_FAILURE_57541({nonce}) { // fn#57541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:3927, offset: 0x013e865b, size: 232 bytes, params: 2, frame: 19
var r0;
var Date;
var value5;
var date;
if (nonce == null) {
return false;
}
const value2 = env0_9.get(nonce);
if (value2 == null) {
return false;
}
env0_9.delete(nonce);
const value3 = env0_11.get(nonce);
if (value3 != null) {
Date = global.Date;
value5 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
r0 = (date instanceof Object ? date : value5).getTime() - value3.getTime();
} else {
r0 = 0;
}
const trackWithMetadata = AppAnalyticsUtilsModule.trackWithMetadata;
const APPLICATION_COMMAND_OPTION_STRING_AUTOCOMPLETE_PERFORMANCE = AnalyticEvents.APPLICATION_COMMAND_OPTION_STRING_AUTOCOMPLETE_PERFORMANCE;
Reflect.apply(trackWithMetadata, AppAnalyticsUtilsModule,
[APPLICATION_COMMAND_OPTION_STRING_AUTOCOMPLETE_PERFORMANCE, {duration_ms: r0, error: true}]);
env0_11.delete(nonce);
getOrCreateChannelState(value2.channelId).lastErrored = true;
return true;
}
function _fun57540({value, name_localized, name}) { // fn#57540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:3390, offset: 0x013e8610, size: 75 bytes, params: 2, frame: 14
var r1;
const object2 = {};
object2.displayName = name_localized ?? name;
object2.name = name;
if (env0_0) {
value = global.Number(value);
r1 = value;
} else {
r1 = value;
function APPLICATION_COMMAND_UPDATE_CHANNEL_STATE({channelId, command}) { // fn#57542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7345:4445, offset: 0x013e80ac, size: 47 bytes, params: 2, frame: 15
handleCommandChange(channelId, command?.id);
}
object2.value = r1;
return object2;
}
global.__d(_fun57523, 7167, [6, 7, 15, 17, 18, 7168, 661, 477, 1909, 4863, 566, 694,
2]) /* metro module 7167, dependencies: [6, 7, 15, 17, 18, 7168, 661, 477, 1909, 4863, 566, 694, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,4 +1,8 @@
/* Metro module 8053; source: modules/application_commands/ApplicationCommandChoiceUtils.tsx; dependencies: [7167, 5066, 2] */
import ApplicationCommandAutocompleteStore from './ApplicationCommandAutocompleteStore.tsx'; /* Metro dependency 7167 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ApplicationCommandConstantsModule from './ApplicationCommandConstants.tsx'; /* Metro dependency 5066 */
function _fun63878(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8231:6, offset: 0x01b94379, size: 188 bytes, params: 8, frame: 20
const closure = function(a0, a1) {
var r0;
@@ -28,11 +32,7 @@ function _fun63878(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const applicationCommandAutocompleteStore = importDefault(7167) /* metro dependency 7167: ApplicationCommandAutocompleteStore */;
const applicationCommandConstantsModule = require(5066) /* metro dependency 5066: ApplicationCommandConstants */;
const env0_1 = applicationCommandConstantsModule.FALSE_OPTION_NAME;
const env0_2 = applicationCommandConstantsModule.TRUE_OPTION_NAME;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/ApplicationCommandChoiceUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/ApplicationCommandChoiceUtils.tsx');
exports.toChoiceBooleanValue = function(a0) {
var value = a0.toLowerCase();
value = value === TRUE_OPTION_NAME.toLowerCase();
@@ -49,45 +49,54 @@ function _fun63878(global, require, importDefault, importAll, module, exports, d
exports.findChoiceNumberValue = closure2;
exports.findAutocompleteChoiceStringValue = findAutocompleteChoiceStringValue;
exports.findAutocompleteChoiceNumberValue = findAutocompleteChoiceNumberValue;
}
function findChoiceStringValue(a0, a1) { // fn#63879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8231:159, offset: 0x01b94435, size: 70 bytes, params: 3, frame: 14
var r0;
var value2;
const env0_0 = a1;
const value = undefined;
if (a0 == null) {
r0 = value;
} else {
value2 = a0.find(function({displayName}) {
function findChoiceStringValue(a0, a1) { // fn#63879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8231:159, offset: 0x01b94435, size: 70 bytes, params: 3, frame: 14
var r0;
var value2;
const env0_0 = a1;
const value = undefined;
if (a0 == null) {
r0 = value;
} else {
value2 = a0.find(function({displayName}) {
return displayName === require;
});
r0 = value2 == null ? value : value2.value;
}
return typeof r0 === 'string' ? r0 : value;
function _fun63880({displayName}) { // fn#63880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8231:229, offset: 0x01b9447b, size: 21 bytes, params: 2, frame: 2
return displayName === require;
});
r0 = value2 == null ? value : value2.value;
}
return typeof r0 === 'string' ? r0 : value;
}
}
function findChoiceNumberValue(a0, a1) { // fn#63881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8231:299, offset: 0x01b94490, size: 70 bytes, params: 3, frame: 14
var r0;
var value2;
const env0_0 = a1;
const value = undefined;
if (a0 == null) {
r0 = value;
} else {
value2 = a0.find(function({displayName}) {
}
function findChoiceNumberValue(a0, a1) { // fn#63881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8231:299, offset: 0x01b94490, size: 70 bytes, params: 3, frame: 14
var r0;
var value2;
const env0_0 = a1;
const value = undefined;
if (a0 == null) {
r0 = value;
} else {
value2 = a0.find(function({displayName}) {
return displayName === require;
});
r0 = value2 == null ? value : value2.value;
}
return typeof r0 === 'number' ? r0 : value;
function _fun63882({displayName}) { // fn#63882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8231:369, offset: 0x01b9447b, size: 21 bytes, params: 2, frame: 2
return displayName === require;
});
r0 = value2 == null ? value : value2.value;
}
}
return typeof r0 === 'number' ? r0 : value;
}
function findAutocompleteChoiceStringValue(a0, a1, a2) { // fn#63884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8231:813, offset: 0x01b9451d, size: 42 bytes, params: 4, frame: 14
return findChoiceStringValue(ApplicationCommandAutocompleteStore.getAutocompleteLastChoices(a0, a1), a2);
}
function findAutocompleteChoiceStringValue(a0, a1, a2) { // fn#63884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8231:813, offset: 0x01b9451d, size: 42 bytes, params: 4, frame: 14
return findChoiceStringValue(ApplicationCommandAutocompleteStore.getAutocompleteLastChoices(a0, a1), a2);
}
function findAutocompleteChoiceNumberValue(a0, a1, a2) { // fn#63885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8231:966, offset: 0x01b94547, size: 42 bytes, params: 4, frame: 14
return findChoiceNumberValue(ApplicationCommandAutocompleteStore.getAutocompleteLastChoices(a0, a1), a2);
}
function findAutocompleteChoiceNumberValue(a0, a1, a2) { // fn#63885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8231:966, offset: 0x01b94547, size: 42 bytes, params: 4, frame: 14
return findChoiceNumberValue(ApplicationCommandAutocompleteStore.getAutocompleteLastChoices(a0, a1), a2);
}
global.__d(_fun63878, 8053, [7167, 5066, 2]) /* metro module 8053, dependencies: [7167, 5066, 2] */;
@@ -1,4 +1,8 @@
/* Metro module 5066; source: modules/application_commands/ApplicationCommandConstants.tsx; dependencies: [1244, 1909, 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 ServerModule from '../../flow/Server.tsx'; /* Metro dependency 1909 */
function _fun43827(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5244:6, offset: 0x0115ffea, size: 358 bytes, params: 8, frame: 22
const env0_0 = require;
let Object = global.Object;
@@ -7,7 +11,7 @@ function _fun43827(global, require, importDefault, importAll, module, exports, d
const value = Object.freeze([]);
Object = global.Object;
const value2 = Object.freeze([]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/ApplicationCommandConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/ApplicationCommandConstants.tsx');
exports.TRUE_OPTION_NAME = 'True';
exports.FALSE_OPTION_NAME = 'False';
exports.BOOLEAN_CHOICES = [{'name': 'True', 'displayName': 'True', 'value': 'true'}, {'name': 'False',
@@ -27,45 +31,46 @@ function _fun43827(global, require, importDefault, importAll, module, exports, d
exports.EMPTY_COMMANDS_SECTION = value2;
exports.APPLICATION_USER_INSTALL_BETA_USER_LIMIT = 200;
exports.getValidationErrorText = getValidationErrorText;
function getValidationErrorText({choices, type}) { // fn#43828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5244:970, offset: 0x01160150, size: 807 bytes, params: 2, frame: 15
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
if (choices != null) {
return intl.string(t.xi5aah);
}
const ApplicationCommandOptionType = (ServerModule).ApplicationCommandOptionType;
const BOOLEAN = ApplicationCommandOptionType.BOOLEAN;
if (BOOLEAN === type) {
return intl.string(t.ATIx6O);
}
const CHANNEL = ApplicationCommandOptionType.CHANNEL;
if (CHANNEL === type) {
return intl.string(t.Q0z2Gx);
}
const INTEGER = ApplicationCommandOptionType.INTEGER;
if (INTEGER === type) {
return intl.string(t['d/9Rk4']);
}
const NUMBER = ApplicationCommandOptionType.NUMBER;
if (NUMBER === type) {
return intl.string(t['FDyk/V']);
}
const ROLE = ApplicationCommandOptionType.ROLE;
if (ROLE === type) {
return intl.string(t.vrRQn0);
}
const USER = ApplicationCommandOptionType.USER;
if (USER === type) {
return intl.string(t.i2r7j5);
}
const MENTIONABLE = ApplicationCommandOptionType.MENTIONABLE;
if (MENTIONABLE === type) {
return intl.string(t.I7imec);
}
const string = intl.string;
const EkDo1i = t.EkDo1i;
return Reflect.apply(string, intl, [EkDo1i]);
}
}
function getValidationErrorText({choices, type}) { // fn#43828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5244:970, offset: 0x01160150, size: 807 bytes, params: 2, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
if (choices != null) {
return intl.string(t.xi5aah);
}
const ApplicationCommandOptionType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandOptionType;
const BOOLEAN = ApplicationCommandOptionType.BOOLEAN;
if (BOOLEAN === type) {
return intl.string(t.ATIx6O);
}
const CHANNEL = ApplicationCommandOptionType.CHANNEL;
if (CHANNEL === type) {
return intl.string(t.Q0z2Gx);
}
const INTEGER = ApplicationCommandOptionType.INTEGER;
if (INTEGER === type) {
return intl.string(t['d/9Rk4']);
}
const NUMBER = ApplicationCommandOptionType.NUMBER;
if (NUMBER === type) {
return intl.string(t['FDyk/V']);
}
const ROLE = ApplicationCommandOptionType.ROLE;
if (ROLE === type) {
return intl.string(t.vrRQn0);
}
const USER = ApplicationCommandOptionType.USER;
if (USER === type) {
return intl.string(t.i2r7j5);
}
const MENTIONABLE = ApplicationCommandOptionType.MENTIONABLE;
if (MENTIONABLE === type) {
return intl.string(t.I7imec);
}
const string = intl.string;
const EkDo1i = t.EkDo1i;
return Reflect.apply(string, intl, [EkDo1i]);
}
global.__d(_fun43827, 5066, [1244, 1909, 2]) /* metro module 5066, dependencies: [1244, 1909, 2] */;
@@ -1,27 +1,32 @@
/* Metro module 11864; source: modules/application_commands/ApplicationCommandDiscoveryManager.tsx; dependencies: [629, 690, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as Module00629Module from '../../by-id/module-00629.js'; /* Metro dependency 629 */
import * as ReactBatchUpdatesNativeModule from '../../external/discord_common/js/shared/utils/ReactBatchUpdates.native.tsx'; /* Metro dependency 690 */
function _fun90969(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12050:6, offset: 0x0204e1d1, size: 134 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(629) /* metro dependency 629 */;
let value = Module00629Module;
value = value.create(function() {
return {initialSectionId: undefined};
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/ApplicationCommandDiscoveryManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/ApplicationCommandDiscoveryManager.tsx');
exports.useCommandDiscoveryManager = value;
exports.updateInitialSectionId = updateInitialSectionId;
function updateInitialSectionId(a0) { // fn#90971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12050:309, offset: 0x0204e262, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun90972);
function _fun90972() { // fn#90972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12050:366, offset: 0x0204e298, size: 29 bytes, params: 1, frame: 11
return env1_2.setState(_fun90973);
function _fun90973() { // fn#90973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12050:382, offset: 0x0204e2b5, size: 16 bytes, params: 1, frame: 2
return {initialSectionId: env1_0};
}
}
}
}
function updateInitialSectionId(a0) { // fn#90971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12050:309, offset: 0x0204e262, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun90972);
}
function _fun90972() { // fn#90972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12050:366, offset: 0x0204e298, size: 29 bytes, params: 1, frame: 11
return env1_2.setState(_fun90973);
}
function _fun90973() { // fn#90973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12050:382, offset: 0x0204e2b5, size: 16 bytes, params: 1, frame: 2
return {initialSectionId: env1_0};
}
global.__d(_fun90969, 11864, [629, 690, 2]) /* metro module 11864, dependencies: [629, 690, 2] */;
@@ -1,52 +1,52 @@
/* Metro module 7870; source: modules/application_commands/ApplicationCommandFrecencyHooks.tsx; dependencies: [31, 7863, 670, 1362, 566, 2] */
import ApplicationCommandFrecencyStore from './ApplicationCommandFrecencyStore.tsx'; /* Metro dependency 7863 */
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 UserSettingsConstantsModule from '../user_settings/UserSettingsConstants.tsx'; /* Metro dependency 670 */
import * as ApplicationCommandFrecencyStoreModule from './ApplicationCommandFrecencyStore.tsx'; /* Metro dependency 7863 */
function _fun62982(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#62982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8048:6, offset: 0x01b6ddc1, size: 195 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const applicationCommandFrecencyStoreModule = require(7863) /* metro dependency 7863: ApplicationCommandFrecencyStore */;
const env0_3 = applicationCommandFrecencyStoreModule.getFilteredTopCommands;
const env0_4 = applicationCommandFrecencyStoreModule.getTopRealCommands;
const applicationCommandFrecencyStore = importDefault(7863) /* metro dependency 7863: ApplicationCommandFrecencyStore */;
const env0_6 = (require(670) /* metro dependency 670: UserSettingsConstants */).UserSettingsTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/ApplicationCommandFrecencyHooks.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/ApplicationCommandFrecencyHooks.tsx');
exports.useTopCommands = useTopCommands;
exports.useTopRealCommands = useTopRealCommands;
function useTopCommands(a0) { // fn#62983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8048:319, offset: 0x01b6de84, size: 120 bytes, params: 2, frame: 16
const env0_0 = a0;
ReactModule.useEffect(function() {
var FrecencyUserSettingsActionCreators = require(dependencyMap[3]).FrecencyUserSettingsActionCreators;
FrecencyUserSettingsActionCreators.loadIfUncached(UserSettingsTypes.FRECENCY_AND_FAVORITES_SETTINGS);
}, []);
return ReactModule.useMemo(_fun62986,
[(require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationCommandFrecencyStore],
function() {
return ApplicationCommandFrecencyStore.getTopCommandsWithoutLoadingLatest();
}), a0]);
function _fun62986() { // fn#62986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8048:564, offset: 0x01b6df45, size: 28 bytes, params: 1, frame: 13
return getFilteredTopCommands(topCommandsWithoutLoadingLatest, env0_0);
}
}
function useTopRealCommands(a0) { // fn#62987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8048:605, offset: 0x01b6df61, size: 120 bytes, params: 2, frame: 16
const env0_0 = a0;
ReactModule.useEffect(function() {
var FrecencyUserSettingsActionCreators = require(dependencyMap[3]).FrecencyUserSettingsActionCreators;
FrecencyUserSettingsActionCreators.loadIfNecessary();
}, []);
return ReactModule.useMemo(_fun62990,
[(require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationCommandFrecencyStore],
function() {
return ApplicationCommandFrecencyStore.getTopCommandsWithoutLoadingLatest();
}), a0]);
function _fun62990() { // fn#62990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8048:822, offset: 0x01b6e004, size: 37 bytes, params: 1, frame: 14
return getTopRealCommands(getFilteredTopCommands(topCommandsWithoutLoadingLatest, env0_0));
}
}
}
function useTopCommands(a0) { // fn#62983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8048:319, offset: 0x01b6de84, size: 120 bytes, params: 2, frame: 16
const env0_0 = a0;
const binding = env0_2;
binding.useEffect(function() {
var FrecencyUserSettingsActionCreators = require(dependencyMap[3]).FrecencyUserSettingsActionCreators;
FrecencyUserSettingsActionCreators.loadIfUncached(UserSettingsTypes.FRECENCY_AND_FAVORITES_SETTINGS);
}, []);
return binding.useMemo(_fun62986,
[(require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationCommandFrecencyStore],
function() {
return ApplicationCommandFrecencyStore.getTopCommandsWithoutLoadingLatest();
}), a0]);
}
function useTopRealCommands(a0) { // fn#62987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8048:605, offset: 0x01b6df61, size: 120 bytes, params: 2, frame: 16
const env0_0 = a0;
const binding = env0_2;
binding.useEffect(function() {
var FrecencyUserSettingsActionCreators = require(dependencyMap[3]).FrecencyUserSettingsActionCreators;
FrecencyUserSettingsActionCreators.loadIfNecessary();
}, []);
return binding.useMemo(_fun62990,
[(require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationCommandFrecencyStore],
function() {
return ApplicationCommandFrecencyStore.getTopCommandsWithoutLoadingLatest();
}), a0]);
}
function _fun62986() { // fn#62986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8048:564, offset: 0x01b6df45, size: 28 bytes, params: 1, frame: 13
return getFilteredTopCommands(topCommandsWithoutLoadingLatest, env0_0);
}
function _fun62990() { // fn#62990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8048:822, offset: 0x01b6e004, size: 37 bytes, params: 1, frame: 14
return getTopRealCommands(getFilteredTopCommands(topCommandsWithoutLoadingLatest, env0_0));
}
global.__d(_fun62982, 7870, [31, 7863, 670, 1362, 566,
2]) /* metro module 7870, dependencies: [31, 7863, 670, 1362, 566, 2] */;
@@ -1,4 +1,16 @@
/* Metro module 7863; source: modules/application_commands/ApplicationCommandFrecencyStore.tsx; dependencies: [6, 7, 15, 17, 18, 1348, 5066, 4238, 670, 4393, 22, 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 UserSettingsProtoStore from '../user_settings/UserSettingsProtoStore.tsx'; /* Metro dependency 1348 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UserSettingsConstantsModule from '../user_settings/UserSettingsConstants.tsx'; /* Metro dependency 670 */
import * as ApplicationConstantsModule from '../applications/ApplicationConstants.tsx'; /* Metro dependency 4238 */
import * as ApplicationCommandConstantsModule from './ApplicationCommandConstants.tsx'; /* Metro dependency 5066 */
function _fun62911(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#62911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:6, offset: 0x01b6c199, size: 526 bytes, params: 8, frame: 20
const _arrayLikeToArray_62917 = function(a0, a1) {
var r0;
@@ -55,17 +67,10 @@ function _fun62911(global, require, importDefault, importAll, module, exports, d
};
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 userSettingsProtoStore = importDefault(1348) /* metro dependency 1348: UserSettingsProtoStore */;
let value = require(5066) /* metro dependency 5066: ApplicationCommandConstants */;
let value = ApplicationCommandConstantsModule;
const env0_8 = value.DISCOVERY_COMMAND_FRECENCY_GATEWAY_LIMIT;
const env0_9 = value.SUB_COMMAND_KEY_SEPARATOR;
const FREQUENCY_ITEM_LIMIT = (require(4238) /* metro dependency 4238: ApplicationConstants */).FREQUENCY_ITEM_LIMIT;
const env0_10 = (require(670) /* metro dependency 670: UserSettingsConstants */).UserSettingsTypes;
const FREQUENCY_ITEM_LIMIT = (ApplicationConstantsModule).FREQUENCY_ITEM_LIMIT;
object = {pendingUsages: []};
value = importDefault(4393) /* metro dependency 4393: Frecency */;
value = new value({computeBonus: function() {
@@ -74,261 +79,300 @@ function _fun62911(global, require, importDefault, importAll, module, exports, d
return a0;
}, afterCompute: function() {
}, numFrequentlyItems: FREQUENCY_ITEM_LIMIT});
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
const PersistedStore = (Flux).PersistedStore;
value = _fun62925(PersistedStore);
value.displayName = 'ApplicationCommandFrecencyStore';
value.persistKey = 'ApplicationCommandFrecencyV2';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{APPLICATION_COMMAND_USED: APPLICATION_COMMAND_USED_62933,
USER_SETTINGS_PROTO_UPDATE: USER_SETTINGS_PROTO_UPDATE_62934});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/ApplicationCommandFrecencyStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/ApplicationCommandFrecencyStore.tsx');
exports.default = value;
exports.getTopRealCommands = getTopRealCommands;
exports.getFilteredTopCommands = function(a0, a1) {
var env0_0 = a1;
return a0.filter(_fun62937).map(_fun62938);
};
}
function _isNativeReflectConstruct_62912() { // fn#62912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:307, offset: 0x01b6c3a7, 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_62912_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_62915(a0, a1) { // fn#62915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:500, offset: 0x01b6c405, 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_62912() { // fn#62912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:307, offset: 0x01b6c3a7, 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 _fun62916;
return (_isNativeReflectConstruct_62912_isNativeReflectConstruct = function() {
return !!result;
})();
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_62917(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_62915(a0, a1) { // fn#62915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:500, offset: 0x01b6c405, 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 _fun62916;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_62917(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_62917(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_62917(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun62916;
}
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 handleUserSettingsProtoStoreChange_62919() { // fn#62919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:1653, offset: 0x01b6c5ed, size: 111 bytes, params: 1, frame: 17
const applicationCommandFrecency = UserSettingsProtoStore.frecencyWithoutFetchingLatest.applicationCommandFrecency;
const value2 = undefined;
const r7 = (applicationCommandFrecency == null ? value2 : applicationCommandFrecency.applicationCommands) ?? ({});
const binding = env0_12;
binding.overwriteHistory((importDefault(22) /* metro dependency 22 */).mapValues(r7, function(a0) {
var r3;
var object = {};
copyDataProperties(object, a0, r3);
var value = a0.recentUses.map(global.Number);
value = value.filter(_fun62921);
object['recentUses'] = value;
return object;
}), env0_11.pendingUsages);
return value2;
}
function _fun62925(a0) { // fn#62925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:1953, offset: 0x01b6c69f, size: 185 bytes, params: 2, frame: 16
const closure = ApplicationCommandFrecencyStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: value_62927}, {key: 'getState', value: value_62928},
{key: 'hasPendingUsage', value: value_62929}, {key: 'getCommandFrecencyWithoutLoadingLatest',
value: value_62930}, {key: 'getScoreWithoutLoadingLatest', value: value_62931},
{key: 'getTopCommandsWithoutLoadingLatest', value: value_62932}]);
}
function APPLICATION_COMMAND_USED_62933({command, context}) { // fn#62933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:2970, offset: 0x01b6c7c2, size: 107 bytes, params: 2, frame: 17
const key_62918 = getKey_62918(context, command);
const pendingUsages = env0_11.pendingUsages;
const push = pendingUsages.push;
const object2 = {key: key_62918};
const Date = global.Date;
object2.timestamp = Date.now();
Reflect.apply(push, pendingUsages, [object2]);
env0_12.track(key_62918);
env0_12.compute();
}
function USER_SETTINGS_PROTO_UPDATE_62934({settings, wasSaved}) { // fn#62934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:3151, offset: 0x01b6c82d, size: 62 bytes, params: 2, frame: 4
const type = settings.type;
const FRECENCY_AND_FAVORITES_SETTINGS = UserSettingsTypes.FRECENCY_AND_FAVORITES_SETTINGS;
if (type === FRECENCY_AND_FAVORITES_SETTINGS) {
if (wasSaved) {
env0_11.pendingUsages = [];
return undefined;
}
}
return false;
}
function getTopRealCommands(a0) { // fn#62935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:3433, offset: 0x01b6c86b, size: 153 bytes, params: 2, frame: 20
var r9;
var r3;
var value5;
var split;
var property;
var Number;
var size;
var value6;
const Set = global.Set;
const set = new Set();
const value3 = _createForOfIteratorHelperLoose_62915(a0);
const value4 = value3();
let done = value4.done;
if (!done) {
r3 = value4;
while (true) {
value5 = r3.value;
split = value5.split;
property = Reflect.apply(split, value5, [SUB_COMMAND_KEY_SEPARATOR])[0];
Number = global.Number;
if (Number(property) > 0) {
set.add(property);
}
size = set.size;
if (size >= DISCOVERY_COMMAND_FRECENCY_GATEWAY_LIMIT) {
r9 = value5;
break;
}
value6 = value3();
done = value6.done;
if (done) {
r9 = value5;
break;
}
r3 = value6;
continue;
}
}
const items2 = [];
arraySpread(items2, set, 0, r9);
return items2;
}
function getFilteredTopCommands(a0, a1) { // fn#62936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:3644, offset: 0x01b6c904, size: 44 bytes, params: 3, frame: 12
const env0_0 = a1;
return a0.filter(_fun62937).map(function(a0) {
return a0.split(':')[0];
});
}
function _fun62920(a0) { // fn#62920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:1863, offset: 0x01b6c65c, size: 67 bytes, params: 2, frame: 13
const object2 = {};
copyDataProperties(object2, a0, undefined);
const recentUses = a0.recentUses;
const map = recentUses.map;
const Number = global.Number;
let value = Reflect.apply(map, recentUses, [Number]);
value = value.filter(function(a0) {
return a0 > 0;
});
object2['recentUses'] = value;
return object2;
}
function value_62927(a0) { // fn#62927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:2338, offset: 0x01b6c758, size: 54 bytes, params: 2, frame: 14
var value;
if (a0 != null) {
value = environment.__proto__;
env1_11 = a0;
}
this.syncWith([UserSettingsProtoStore], handleUserSettingsProtoStoreChange_62919);
}
function value_62931(a0, a1) { // fn#62931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:2655, offset: 0x01b6c78e, size: 52 bytes, params: 3, frame: 15
const value = environment.__proto__;
return env1_12.getScore(getKey_62918(a0, a1)) ?? 0;
}
function _fun62937(a0) { // fn#62937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:3698, offset: 0x01b6c930, size: 97 bytes, params: 2, frame: 15
var r1;
var r0;
var value4;
var id;
let value = a0.includes(':');
if (value) {
value4 = require?.guild != null;
if (value4) {
id = require.guild.id;
value = a0.split(':');
value = id === value[1];
r1 = value;
} else {
r1 = value4;
r5 = value;
}
r0 = r1;
} else {
r0 = !value;
if (r5) {
if (r5) {
}
return _fun62916;
}
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 _fun62916() { // fn#62916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:1071, 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]};
}
}
return r0;
function handleUserSettingsProtoStoreChange_62919() { // fn#62919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:1653, offset: 0x01b6c5ed, size: 111 bytes, params: 1, frame: 17
const applicationCommandFrecency = UserSettingsProtoStore.frecencyWithoutFetchingLatest.applicationCommandFrecency;
const value2 = undefined;
const r7 = (applicationCommandFrecency == null ? value2 : applicationCommandFrecency.applicationCommands) ?? ({});
const binding = env0_12;
binding.overwriteHistory((importDefault(22) /* metro dependency 22 */).mapValues(r7, function(a0) {
var r3;
var object = {};
copyDataProperties(object, a0, r3);
var value = a0.recentUses.map(global.Number);
value = value.filter(_fun62921);
object['recentUses'] = value;
return object;
}), env0_11.pendingUsages);
return value2;
function _fun62920(a0) { // fn#62920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:1863, offset: 0x01b6c65c, size: 67 bytes, params: 2, frame: 13
const object = {};
copyDataProperties(object, a0, undefined);
const recentUses = a0.recentUses;
const map = recentUses.map;
const Number = global.Number;
let value = Reflect.apply(map, recentUses, [Number]);
value = value.filter(function(a0) {
return a0 > 0;
});
object['recentUses'] = value;
return object;
}
}
function _fun62925(a0) { // fn#62925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:1953, offset: 0x01b6c69f, size: 185 bytes, params: 2, frame: 16
const ApplicationCommandFrecencyStore2 = ApplicationCommandFrecencyStore;
Inherits(ApplicationCommandFrecencyStore2, a0);
return CreateClass(ApplicationCommandFrecencyStore2, [{key: 'initialize', value: value_62927}, {key: 'getState',
value: value_62928}, {key: 'hasPendingUsage', value: value_62929},
{key: 'getCommandFrecencyWithoutLoadingLatest', value: value_62930}, {key: 'getScoreWithoutLoadingLatest',
value: value_62931}, {key: 'getTopCommandsWithoutLoadingLatest', value: value_62932}]);
function ApplicationCommandFrecencyStore() { // fn#62926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:1965, offset: 0x00ea76ec, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, ApplicationCommandFrecencyStore);
const value3 = env1_5(ApplicationCommandFrecencyStore);
return env1_4(this, _isNativeReflectConstruct_62912() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_62927(a0) { // fn#62927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:2338, offset: 0x01b6c758, size: 54 bytes, params: 2, frame: 14
var value;
if (a0 != null) {
value = environment.__proto__;
env1_11 = a0;
}
this.syncWith([UserSettingsProtoStore], handleUserSettingsProtoStoreChange_62919);
}
function value_62928() { // fn#62928, offset: 0x00ef8482, size: 9 bytes, params: 1, frame: 1
return env1_11;
}
function value_62929() { // fn#62929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:2494, offset: 0x01b6c08d, size: 26 bytes, params: 1, frame: 2
return env1_11.pendingUsages.length > 0;
}
function value_62930() { // fn#62930, offset: 0x00e2f9de, size: 9 bytes, params: 1, frame: 1
return env1_12;
}
function value_62931(a0, a1) { // fn#62931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:2655, offset: 0x01b6c78e, size: 52 bytes, params: 3, frame: 15
const value = environment.__proto__;
return env1_12.getScore(getKey_62918(a0, a1)) ?? 0;
}
function value_62932() { // fn#62932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:2770, offset: 0x01b6c0cc, size: 15 bytes, params: 1, frame: 1
return env1_12.frequently;
}
}
function APPLICATION_COMMAND_USED_62933({command, context}) { // fn#62933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:2970, offset: 0x01b6c7c2, size: 107 bytes, params: 2, frame: 17
const key_62918 = getKey_62918(context, command);
const pendingUsages = env0_11.pendingUsages;
const push = pendingUsages.push;
const object = {key: key_62918};
const Date = global.Date;
object.timestamp = Date.now();
Reflect.apply(push, pendingUsages, [object]);
env0_12.track(key_62918);
env0_12.compute();
}
function USER_SETTINGS_PROTO_UPDATE_62934({settings, wasSaved}) { // fn#62934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:3151, offset: 0x01b6c82d, size: 62 bytes, params: 2, frame: 4
const type = settings.type;
const FRECENCY_AND_FAVORITES_SETTINGS = UserSettingsTypes.FRECENCY_AND_FAVORITES_SETTINGS;
if (type === FRECENCY_AND_FAVORITES_SETTINGS) {
if (wasSaved) {
env0_11.pendingUsages = [];
return undefined;
}
}
return false;
}
function getTopRealCommands(a0) { // fn#62935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:3433, offset: 0x01b6c86b, size: 153 bytes, params: 2, frame: 20
var r9;
var r3;
var value5;
var split;
var property;
var Number;
var size;
var value6;
const Set = global.Set;
const set = new Set();
const value3 = _createForOfIteratorHelperLoose_62915(a0);
const value4 = value3();
let done = value4.done;
if (!done) {
r3 = value4;
while (true) {
value5 = r3.value;
split = value5.split;
property = Reflect.apply(split, value5, [SUB_COMMAND_KEY_SEPARATOR])[0];
Number = global.Number;
if (Number(property) > 0) {
set.add(property);
}
size = set.size;
if (size >= DISCOVERY_COMMAND_FRECENCY_GATEWAY_LIMIT) {
r9 = value5;
break;
}
value6 = value3();
done = value6.done;
if (done) {
r9 = value5;
break;
}
r3 = value6;
continue;
}
}
const items2 = [];
arraySpread(items2, set, 0, r9);
return items2;
}
function getFilteredTopCommands(a0, a1) { // fn#62936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:3644, offset: 0x01b6c904, size: 44 bytes, params: 3, frame: 12
const env0_0 = a1;
return a0.filter(_fun62937).map(function(a0) {
return a0.split(':')[0];
});
function _fun62937(a0) { // fn#62937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:3698, offset: 0x01b6c930, size: 97 bytes, params: 2, frame: 15
var r1;
var r0;
var value4;
var id;
let value = a0.includes(':');
if (value) {
value4 = require?.guild != null;
if (value4) {
id = require.guild.id;
value = a0.split(':');
value = id === value[1];
r1 = value;
} else {
r1 = value4;
}
r0 = r1;
} else {
r0 = !value;
}
return r0;
}
}
}
function _fun62921(a0) { // fn#62921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:1917, offset: 0x011bbce4, size: 11 bytes, params: 2, frame: 2
return a0 > 0;
}
function _fun62938(a0) { // fn#62938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8041:3787, offset: 0x01b6c991, size: 25 bytes, params: 2, frame: 11
return a0.split(':')[0];
}
global.__d(_fun62911, 7863, [6, 7, 15, 17, 18, 1348, 5066, 4238, 670, 4393, 22, 566, 694,
2]) /* metro module 7863, dependencies: [6, 7, 15, 17, 18, 1348, 5066, 4238, 670, 4393, 22, 566, 694, 2] */;
@@ -1,203 +1,216 @@
/* Metro module 7865; source: modules/application_commands/ApplicationCommandIndexActionCreators.tsx; dependencies: [5, 661, 694, 507, 672, 683, 1360, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import Dispatcher from '../../Dispatcher.tsx'; /* Metro dependency 694 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as GlobalUtilsModule from '../../utils/GlobalUtils.tsx'; /* Metro dependency 1360 */
function _fun62942(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#62942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:6, offset: 0x01b6ca89, size: 177 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 constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_4 = constantsModule.AnalyticEvents;
const env0_5 = constantsModule.Endpoints;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/ApplicationCommandIndexActionCreators.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/ApplicationCommandIndexActionCreators.tsx');
exports.fetchApplicationCommandIndex = function() {
return _fetchApplicationCommandIndex.apply(this, arguments);
};
exports.requestApplicationCommandIndex = requestApplicationCommandIndex;
}
function _fetchApplicationCommandIndex() { // fn#62943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:149, offset: 0x01b6cb3a, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun62945).apply(this, arguments);
function* _fun62945(a0, a1) { // fn#62945, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:230, offset: 0x01b6cb73, size: 286 bytes, params: 3, frame: 15
var environment;
var binding;
var APPLICATION_COMMAND_INDEX_USER;
if (true) {
var env0_0 = a0;
var env0_1 = a1;
var env0_2;
var env0_3;
var env0_5;
var env0_6;
env0_3 = global.performance.now();
env0_5 = [];
var type = a0.type;
if (type === 'channel') {
value = environment.__proto__.__proto__;
binding = env2_5;
env0_2 = binding.APPLICATION_COMMAND_INDEX_CHANNEL(a0.channelId);
} else if (type === 'guild') {
value = environment.__proto__.__proto__;
binding = env2_5;
env0_2 = binding.APPLICATION_COMMAND_INDEX_GUILD(a0.guildId);
} else if (type === 'user') {
value = environment.__proto__.__proto__;
APPLICATION_COMMAND_INDEX_USER = env2_5.APPLICATION_COMMAND_INDEX_USER;
} else if (type === 'application') {
value = environment.__proto__.__proto__;
binding = env2_5;
env0_2 = binding.APPLICATION_COMMAND_INDEX_APPLICATION(a0.applicationId);
}
env0_6 = _fun62946();
yield fetch_62951();
}
function _fun62946() { // fn#62946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:566, offset: 0x01b6cc91, size: 32 bytes, params: 1, frame: 12
const env0_0 = env3_3(_fun62948);
return _fun62950;
function* _fun62948(a0) { // fn#62948, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:586, offset: 0x01b6ccba, size: 190 bytes, params: 2, frame: 15
var environment;
var binding;
var value7;
if (false) {
return undefined;
}
const env0_0 = a0;
value = environment.__proto__.__proto__;
if (env2_4 >= 3) {
binding = env2_5;
binding.push(1002);
binding = env2_8;
binding({error: true});
value7 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_1;
return binding(env5_2[2]).dispatch({type: 'APPLICATION_COMMAND_INDEX_FETCH_FAILURE', target: env2_0});
}
const Promise = global.Promise;
const value3 = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun62949);
yield promise instanceof Object ? promise : value3;
if (false) {
return undefined;
}
return env2_7();
function _fun62949(a0) { // fn#62949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:738, offset: 0x00fc555a, size: 28 bytes, params: 2, frame: 13
return global.setTimeout(a0, env0_0);
}
function _fetchApplicationCommandIndex() { // fn#62943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:149, offset: 0x01b6cb3a, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun62945).apply(this, arguments);
}
}
function getTargetId(a0) { // fn#62956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:1718, offset: 0x01b6d081, size: 103 bytes, params: 2, frame: 12
const type = a0.type;
if (type === 'channel') {
return a0.channelId;
}
if (type === 'guild') {
return a0.guildId;
}
if (type === 'user') {
return null;
}
if (type === 'application') {
return a0.applicationId;
}
(require(1360) /* metro dependency 1360: GlobalUtils */).assertNever(a0);
}
function _fun62950() { // fn#62950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:778, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
function requestApplicationCommandIndex(a0) { // fn#62958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:2183, offset: 0x01b6d0e8, size: 57 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'APPLICATION_COMMAND_INDEX_FETCH_REQUEST',
target: a0});
}
}
function fetch_62951() { // fn#62951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:830, offset: 0x01b6cd78, size: 129 bytes, params: 1, frame: 16
var environment;
const value = environment.__proto__.__proto__.__proto__;
const HTTP = env3_0(env3_2[3]).HTTP;
const get = HTTP.get;
return Reflect.apply(get, HTTP, [{url: APPLICATION_COMMAND_INDEX_USER, retries: 3 - ConstantsModule.AnalyticEvents - 1,
signal: require.signal, onRequestCreated: onRequestCreated_62952, rejectWithError: false}]).then(_fun62953,
_fun62954);
function fetch_62951OnRequestCreated() { // fn#62952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:905, owner: fetch_62951.onRequestCreated, offset: 0x01b6cdf9, size: 19 bytes, params: 1, frame: 3
const binding = env1_4;
const value2 = typeof binding === 'bigint' ? binding : +binding;
env1_4 = typeof value2 === 'bigint' ? value2 + 1n : +value2 + 1;
return value2;
}
function _fun62953(a0) { // fn#62953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:940, offset: 0x01b6ce0c, size: 138 bytes, params: 2, frame: 15
var r0;
var value;
var value2;
if (a0.status === 202) {
value = environment.__proto__;
env1_5.push(202);
value = env1_6(5000);
r0 = value;
} else {
value = environment.__proto__;
end_62955({error: false});
value2 = environment.__proto__.__proto__.__proto__.__proto__;
value = env4_1(env4_2[2]).dispatch({type: 'APPLICATION_COMMAND_INDEX_FETCH_SUCCESS', target: env1_0,
index: a0.body});
r0 = value;
}
return r0;
}
function _fun62954(a0) { // fn#62954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:1088, offset: 0x01b6ce96, size: 275 bytes, params: 2, frame: 16
var r0;
var binding;
var push;
var end_62955Binding;
var value3;
var retry_after;
let value = environment.__proto__;
if (require.signal.aborted) {
env1_5.push(1001);
end_62955Binding = end_62955;
value = undefined;
end_62955Binding({error: true});
r0 = value;
} else if (a0.status === 429) {
binding = env1_5;
binding.push(429);
binding = env1_6;
retry_after = a0.body.retry_after;
value = environment.__proto__.__proto__.__proto__.__proto__;
value = binding(retry_after * env4_1(env4_2[4]).Millis.SECOND);
r0 = value;
} else {
binding = env1_5;
push = binding.push;
r0 = a0.status ?? 1000;
Reflect.apply(push, binding, [r0]);
end_62955({error: true});
value3 = environment.__proto__.__proto__.__proto__.__proto__;
binding = env4_1;
r0 = binding(env4_2[2]).dispatch({type: 'APPLICATION_COMMAND_INDEX_FETCH_FAILURE', target: env1_0});
}
return r0;
}
}
function end_62955({error}) { // fn#62955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:1365, offset: 0x01b6cfa9, size: 216 bytes, params: 2, frame: 20
let value = global.performance.now();
value -= env0_3;
let binding = env3_1;
const value4 = binding(env3_2[5]);
const track = value4.track;
const APPLICATION_COMMAND_PERFORMANCE = env3_4.APPLICATION_COMMAND_PERFORMANCE;
const object = {duration_ms: value, error: error};
object.aborted = require.signal.aborted;
object.include_applications = true;
const Math = global.Math;
object.retries = Math.max(ConstantsModule.AnalyticEvents - 1, 0);
object.kind = null;
object.command_type = null;
object.url = APPLICATION_COMMAND_INDEX_USER;
binding = env0_0;
object.target_type = binding.type;
object.target_id = env3_7(binding);
object.failure_statuses = env0_5;
Reflect.apply(track, value4, [APPLICATION_COMMAND_PERFORMANCE, object]);
}
function* _fun62945(a0, a1) { // fn#62945, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:230, offset: 0x01b6cb73, size: 286 bytes, params: 3, frame: 15
var environment;
var binding;
var APPLICATION_COMMAND_INDEX_USER;
if (true) {
var env0_0 = a0;
var env0_1 = a1;
var env0_2;
var env0_3;
var env0_5;
var env0_6;
env0_3 = global.performance.now();
env0_5 = [];
var type = a0.type;
if (type === 'channel') {
value = environment.__proto__.__proto__;
binding = env2_5;
env0_2 = binding.APPLICATION_COMMAND_INDEX_CHANNEL(a0.channelId);
} else if (type === 'guild') {
value = environment.__proto__.__proto__;
binding = env2_5;
env0_2 = binding.APPLICATION_COMMAND_INDEX_GUILD(a0.guildId);
} else if (type === 'user') {
value = environment.__proto__.__proto__;
APPLICATION_COMMAND_INDEX_USER = env2_5.APPLICATION_COMMAND_INDEX_USER;
} else if (type === 'application') {
value = environment.__proto__.__proto__;
binding = env2_5;
env0_2 = binding.APPLICATION_COMMAND_INDEX_APPLICATION(a0.applicationId);
}
env0_6 = _fun62946();
yield fetch_62951();
}
}
function _fun62946() { // fn#62946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:566, offset: 0x01b6cc91, size: 32 bytes, params: 1, frame: 12
const env0_0 = env3_3(_fun62948);
return _fun62950;
}
function fetch_62951() { // fn#62951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:830, offset: 0x01b6cd78, size: 129 bytes, params: 1, frame: 16
var environment;
const value = environment.__proto__.__proto__.__proto__;
const HTTP = env3_0(env3_2[3]).HTTP;
const get = HTTP.get;
return Reflect.apply(get, HTTP, [{url: APPLICATION_COMMAND_INDEX_USER, retries: 3 - env0_4 - 1,
signal: require.signal, onRequestCreated: onRequestCreated, rejectWithError: false}]).then(_fun62953, _fun62954);
}
function end_62955({error}) { // fn#62955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:1365, offset: 0x01b6cfa9, size: 216 bytes, params: 2, frame: 20
let value = global.performance.now();
value -= env0_3;
let binding = env3_1;
const value4 = binding(env3_2[5]);
const track = value4.track;
const APPLICATION_COMMAND_PERFORMANCE = env3_4.APPLICATION_COMMAND_PERFORMANCE;
const object2 = {duration_ms: value, error: error};
object2.aborted = require.signal.aborted;
object2.include_applications = true;
const Math = global.Math;
object2.retries = Math.max(env0_4 - 1, 0);
object2.kind = null;
object2.command_type = null;
object2.url = APPLICATION_COMMAND_INDEX_USER;
binding = env0_0;
object2.target_type = binding.type;
object2.target_id = env3_7(binding);
object2.failure_statuses = env0_5;
Reflect.apply(track, value4, [APPLICATION_COMMAND_PERFORMANCE, object2]);
}
function* _fun62948(a0) { // fn#62948, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:586, offset: 0x01b6ccba, size: 190 bytes, params: 2, frame: 15
var environment;
var binding;
var value7;
if (false) {
return undefined;
function getTargetId(a0) { // fn#62956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:1718, offset: 0x01b6d081, size: 103 bytes, params: 2, frame: 12
const type = a0.type;
if (type === 'channel') {
return a0.channelId;
}
if (type === 'guild') {
return a0.guildId;
}
if (type === 'user') {
return null;
}
if (type === 'application') {
return a0.applicationId;
}
(GlobalUtilsModule).assertNever(a0);
}
const env0_0 = a0;
value = environment.__proto__.__proto__;
if (env2_4 >= 3) {
binding = env2_5;
binding.push(1002);
binding = env2_8;
binding({error: true});
value7 = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env5_1;
return binding(env5_2[2]).dispatch({type: 'APPLICATION_COMMAND_INDEX_FETCH_FAILURE', target: env2_0});
function requestApplicationCommandIndex(a0) { // fn#62958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:2183, offset: 0x01b6d0e8, size: 57 bytes, params: 2, frame: 13
(Dispatcher).dispatch({type: 'APPLICATION_COMMAND_INDEX_FETCH_REQUEST',
target: a0});
}
const Promise = global.Promise;
const value3 = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun62949);
yield promise instanceof Object ? promise : value3;
if (false) {
return undefined;
}
return env2_7();
}
function fetch_62951OnRequestCreated() { // fn#62952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:905, owner: fetch_62951.onRequestCreated, offset: 0x01b6cdf9, size: 19 bytes, params: 1, frame: 3
const binding = env1_4;
const value2 = typeof binding === 'bigint' ? binding : +binding;
env1_4 = typeof value2 === 'bigint' ? value2 + 1n : +value2 + 1;
return value2;
}
function _fun62953(a0) { // fn#62953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:940, offset: 0x01b6ce0c, size: 138 bytes, params: 2, frame: 15
var r0;
var value;
var value2;
if (a0.status === 202) {
value = environment.__proto__;
env1_5.push(202);
value = env1_6(5000);
r0 = value;
} else {
value = environment.__proto__;
end_62955({error: false});
value2 = environment.__proto__.__proto__.__proto__.__proto__;
value = env4_1(env4_2[2]).dispatch({type: 'APPLICATION_COMMAND_INDEX_FETCH_SUCCESS', target: env1_0,
index: a0.body});
r0 = value;
}
return r0;
}
function _fun62954(a0) { // fn#62954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8043:1088, offset: 0x01b6ce96, size: 275 bytes, params: 2, frame: 16
var r0;
var binding;
var push;
var end_62955Binding;
var value3;
var retry_after;
let value = environment.__proto__;
if (require.signal.aborted) {
env1_5.push(1001);
end_62955Binding = end_62955;
value = undefined;
end_62955Binding({error: true});
r0 = value;
} else if (a0.status === 429) {
binding = env1_5;
binding.push(429);
binding = env1_6;
retry_after = a0.body.retry_after;
value = environment.__proto__.__proto__.__proto__.__proto__;
value = binding(retry_after * env4_1(env4_2[4]).Millis.SECOND);
r0 = value;
} else {
binding = env1_5;
push = binding.push;
r0 = a0.status ?? 1000;
Reflect.apply(push, binding, [r0]);
end_62955({error: true});
value3 = environment.__proto__.__proto__.__proto__.__proto__;
binding = env4_1;
r0 = binding(env4_2[2]).dispatch({type: 'APPLICATION_COMMAND_INDEX_FETCH_FAILURE', target: env1_0});
}
return r0;
}
global.__d(_fun62942, 7865, [5, 661, 694, 507, 672, 683, 1360,
2]) /* metro module 7865, dependencies: [5, 661, 694, 507, 672, 683, 1360, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,4 +1,10 @@
/* Metro module 8051; source: modules/application_commands/ApplicationCommandOptionUtils.tsx; dependencies: [5066, 44, 8052, 4100, 1909, 2] */
import defaultImport2 from '../../by-id/module-00044.js'; /* Metro dependency 44 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ServerModule from '../../flow/Server.tsx'; /* Metro dependency 1909 */
import * as ApplicationCommandConstantsModule from './ApplicationCommandConstants.tsx'; /* Metro dependency 5066 */
import * as NumberPartsModule from '../../intl/number-parts.tsx'; /* Metro dependency 8052 */
function _fun63857(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:6, offset: 0x01b93765, size: 308 bytes, params: 8, frame: 24
let env0_0 = require;
const _arrayLikeToArray_63860 = function(a0, a1) {
@@ -48,378 +54,384 @@ function _fun63857(global, require, importDefault, importAll, module, exports, d
var env0_0 = a0;
return a0 == null ? [] : a0.filter(_fun63862);
};
const closure2 = getBoolean;
const closure3 = getChannelId;
const closure4 = getUserId_63865;
const closure5 = getRoleId;
const closure6 = getString_63867;
const getBoolean2 = getBoolean;
const getChannelId2 = getChannelId;
const getUserId_638652 = getUserId_63865;
const getRoleId2 = getRoleId;
const getString_638672 = getString_63867;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_6 = (require(5066) /* metro dependency 5066: ApplicationCommandConstants */).TRUE_OPTION_NAME;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/ApplicationCommandOptionUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/ApplicationCommandOptionUtils.tsx');
exports.filterEmpty = closure;
exports.getBoolean = closure2;
exports.getBoolean = getBoolean2;
exports.getOptionalBoolean = getOptionalBoolean;
exports.getChannelId = closure3;
exports.getChannelId = getChannelId2;
exports.getOptionalChannelId = getOptionalChannelId;
exports.getUserId = closure4;
exports.getUserId = getUserId_638652;
exports.getOptionalUserId = getOptionalUserId;
exports.getRoleId = closure5;
exports.getRoleId = getRoleId2;
exports.getOptionalRoleId = getOptionalRoleId;
exports.getString = closure6;
exports.getString = getString_638672;
exports.getOptionalString = getOptionalString;
exports.normalizeNumericString = normalizeNumericString;
exports.getInitialValuesFromInteractionOptions = getInitialValuesFromInteractionOptions;
}
function _createForOfIteratorHelperLoose_63858(a0, a1) { // fn#63858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:134, offset: 0x01b93899, 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)) {
function _createForOfIteratorHelperLoose_63858(a0, a1) { // fn#63858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:134, offset: 0x01b93899, 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);
}
return _fun63859;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_63860(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 _fun63859;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_63860(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_63860(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_63860(a0, value);
r6 = value;
} else {
r6 = value;
}
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun63859;
}
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 filterEmpty(a0) { // fn#63861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:1044, offset: 0x01b93a0b, size: 38 bytes, params: 2, frame: 11
const env0_0 = a0;
return a0 == null ? [] : a0.filter(_fun63862);
}
function getBoolean(a0, a1) { // fn#63863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:1173, offset: 0x01b93a8f, size: 135 bytes, params: 3, frame: 18
const filterEmptyBinding = filterEmpty;
const value2 = undefined;
const value3 = filterEmptyBinding(a0[a1]);
(importDefault(44) /* metro dependency 44 */)(value3.length === 1, 'Contains multiple values');
const defaultImport2 = importDefault(44) /* metro dependency 44 */;
const property = value3[0];
defaultImport2((property == null ? value2 : property.type) === 'text', 'First value is not text');
return value3[0].text === TRUE_OPTION_NAME;
}
function getChannelId(a0, a1) { // fn#63864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:1369, offset: 0x01b93b16, size: 127 bytes, params: 3, frame: 17
const filterEmptyBinding = filterEmpty;
const value2 = undefined;
const value3 = filterEmptyBinding(a0[a1]);
(importDefault(44) /* metro dependency 44 */)(value3.length === 1, 'Contains multiple values');
const value = importDefault(44) /* metro dependency 44 */;
const property = value3[0];
value((property == null ? value2 : property.type) === 'channelMention', 'First value is not a channel mention');
return value3[0].channelId;
}
function getUserId_63865(a0, a1) { // fn#63865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:1591, offset: 0x01b93b95, size: 129 bytes, params: 3, frame: 17
const filterEmptyBinding = filterEmpty;
const value2 = undefined;
const value3 = filterEmptyBinding(a0[a1]);
(importDefault(44) /* metro dependency 44 */)(value3.length === 1, 'Contains multiple values');
const value = importDefault(44) /* metro dependency 44 */;
const property = value3[0];
value((property == null ? value2 : property.type) === 'userMention', 'First value is not a user mention');
return value3[0].userId;
}
function getRoleId(a0, a1) { // fn#63866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:1801, offset: 0x01b93c16, size: 128 bytes, params: 3, frame: 17
const filterEmptyBinding = filterEmpty;
const value2 = undefined;
const value3 = filterEmptyBinding(a0[a1]);
(importDefault(44) /* metro dependency 44 */)(value3.length === 1, 'Contains multiple values');
const value = importDefault(44) /* metro dependency 44 */;
const property = value3[0];
value((property == null ? value2 : property.type) === 'roleMention', 'First value is not a role mention');
return value3[0].roleId;
}
function getString_63867(a0, a1) { // fn#63867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:2011, offset: 0x01b93c96, size: 420 bytes, params: 3, frame: 42
var r2;
var r3;
var r28;
var r24;
var r0;
var value5;
var type;
var animated;
var name;
var replace;
var value6;
var split;
var property;
var emojiId;
var HermesInternal;
var concat;
var value7;
var surrogate;
var value8;
var roleId;
var value9;
var channelId;
var value10;
var userId;
var value11;
var text;
var value12;
var value13;
const value = _createForOfIteratorHelperLoose_63858(a0[a1]);
const value2 = value();
let done = value2.done;
const value3 = '';
if (done) {
r0 = value3;
} else {
r2 = value3;
r3 = value2;
reducibleLoop1: while (true) {
value5 = r3.value;
type = value5.type;
reducibleJoin15: while (true) {
reducibleJoin14: while (true) {
if (type === 'text') {
break reducibleJoin14;
}
if (type === 'textMention') {
break reducibleJoin14;
}
if (type === 'userMention') {
userId = value5.userId;
concat = global.HermesInternal.concat;
value11 = r2 + ('<@' + userId + '>');
r24 = value11;
break reducibleJoin15;
}
if (type === 'channelMention') {
channelId = value5.channelId;
concat = global.HermesInternal.concat;
value10 = r2 + ('<#' + channelId + '>');
r24 = value10;
break reducibleJoin15;
}
if (type === 'roleMention') {
roleId = value5.roleId;
concat = global.HermesInternal.concat;
value9 = r2 + ('<@&' + roleId + '>');
r24 = value9;
break reducibleJoin15;
}
if (type === 'emoji') {
surrogate = value5.surrogate;
value8 = r2 + surrogate;
r24 = value8;
break reducibleJoin15;
}
if (type !== 'customEmoji') {
r24 = r2;
break reducibleJoin15;
}
animated = value5.animated;
r28 = animated ? 'a' : value3;
name = value5.name;
replace = name.replace;
value6 = Reflect.apply(replace, name, [RegExp(':', 'g'), value3]);
split = value6.split;
property = Reflect.apply(split, value6, ['~'])[0];
emojiId = value5.emojiId;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
value7 = r2 + ('<' + r28 + ':' + property + ':' + emojiId + '>');
r24 = value7;
break reducibleJoin15;
}
text = value5.text;
value12 = r2 + text;
r24 = value12;
break reducibleJoin15;
}
value13 = value();
done = value13.done;
if (done) {
r0 = r24;
break reducibleLoop1;
}
r2 = r24;
r3 = value13;
continue reducibleLoop1;
}
}
return r0;
}
function getOptionalBoolean(a0, a1) { // fn#63868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:2633, offset: 0x01b93e3a, size: 36 bytes, params: 3, frame: 14
const value = null;
return value == a0[a1] ? value : getBoolean(a0, a1);
}
function getOptionalChannelId(a0, a1) { // fn#63869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:2759, offset: 0x01b93e5e, size: 36 bytes, params: 3, frame: 14
const value = null;
return value == a0[a1] ? value : getChannelId(a0, a1);
}
function getOptionalUserId(a0, a1) { // fn#63870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:2880, offset: 0x01b93e82, size: 36 bytes, params: 3, frame: 14
const value = null;
return value == a0[a1] ? value : getUserId_63865(a0, a1);
}
function getOptionalRoleId(a0, a1) { // fn#63871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:2995, offset: 0x01b93ea6, size: 36 bytes, params: 3, frame: 14
const value = null;
return value == a0[a1] ? value : getRoleId(a0, a1);
}
function getOptionalString(a0, a1) { // fn#63872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:3110, offset: 0x01b93eca, size: 36 bytes, params: 3, frame: 14
const value = null;
return value == a0[a1] ? value : getString_63867(a0, a1);
}
function normalizeNumericString(a0, a1) { // fn#63873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:3207, offset: 0x01b93eee, size: 263 bytes, params: 3, frame: 21
var r1;
const numberParts = (require(8052) /* metro dependency 8052: numberParts */).numberParts;
var group;
var decimal;
var RegExp;
var value2;
var prototype;
var value3;
var regExp;
var value5;
var value6;
if (a0 !== env0_5) {
env0_5 = a0;
r1 = numberParts[a0] ?? numberParts['en-US'];
group = r1.group;
decimal = r1.decimal;
RegExp = global.RegExp;
value2 = (importDefault(4100) /* metro dependency 4100: RegexUtils */).escape(group);
prototype = RegExp.prototype;
value3 = Object.create(prototype, {constructor: {value: RegExp}});
regExp = new RegExp(value2, 'g');
env0_3 = regExp instanceof Object ? regExp : value3;
RegExp = global.RegExp;
value5 = (importDefault(4100) /* metro dependency 4100: RegexUtils */).escape(decimal);
prototype = RegExp.prototype;
value6 = Object.create(prototype, {constructor: {value: RegExp}});
regExp = new RegExp(value5, 'g');
env0_4 = regExp instanceof Object ? regExp : value6;
}
return a1.replace(env0_3, '').replace(env0_4, '.');
}
function getInitialValuesFromInteractionOptions(a0, a1) { // fn#63874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:3511, offset: 0x01b93ff5, size: 76 bytes, params: 3, frame: 15
var r2;
var value3;
var value4;
const env0_0 = a0;
const closure = getInitialValuesFromInteractionOptions_loop;
const value = _createForOfIteratorHelperLoose_63858(a1);
const value2 = value();
let done = value2.done;
if (!done) {
for (r2 = value2; true; r2 = value4) {
value3 = r2.value;
closure(value3);
value4 = value();
done = value4.done;
if (done) {
break;
}
}
}
return {};
}
function _fun63862(a0, a1) { // fn#63862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:1096, offset: 0x01b93a31, size: 94 bytes, params: 3, frame: 12
var r1;
var r0;
let value = a0.type !== 'text';
if (value) {
r0 = value;
} else {
if (a1 > 0) {
if (a1 < env0_0.length - 1) {
r1 = a0.text !== '';
} else {
value = a0.text.trim();
value = value !== '';
r1 = value;
r5 = r6;
}
} else {
value = a0.text.trim();
value = value !== '';
r1 = value;
r5 = value;
}
r0 = r1;
if (r5) {
if (r5) {
}
return _fun63859;
}
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 _fun63859() { // fn#63859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:705, 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]};
}
}
return r0;
}
function getInitialValuesFromInteractionOptions_loop(a0) { // fn#63875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:3585, owner: getInitialValuesFromInteractionOptions._loop, offset: 0x01b94041, size: 128 bytes, params: 2, frame: 17
var r0;
const options = a0.options;
const value2 = undefined;
const r3 = options == null ? value2 : options.find(_fun63876);
const type = a0.type;
const ApplicationCommandOptionType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandOptionType;
const ATTACHMENT = ApplicationCommandOptionType.ATTACHMENT;
const value5 = 0;
if (type === ATTACHMENT) {
r0 = value5;
} else if (r3 == null) {
env0_1[a0.name] = a0;
r0 = value2;
} else if (r3.autocomplete) {
r0 = value5;
} else {
env0_1[a0.name] = a0;
r0 = value2;
}
return r0;
function filterEmpty(a0) { // fn#63861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:1044, offset: 0x01b93a0b, size: 38 bytes, params: 2, frame: 11
const env0_0 = a0;
return a0 == null ? [] : a0.filter(_fun63862);
function _fun63862(a0, a1) { // fn#63862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:1096, offset: 0x01b93a31, size: 94 bytes, params: 3, frame: 12
var r1;
var r0;
let value = a0.type !== 'text';
if (value) {
r0 = value;
} else {
if (a1 > 0) {
if (a1 < env0_0.length - 1) {
r1 = a0.text !== '';
} else {
value = a0.text.trim();
value = value !== '';
r1 = value;
}
} else {
value = a0.text.trim();
value = value !== '';
r1 = value;
}
r0 = r1;
}
return r0;
}
}
function getBoolean(a0, a1) { // fn#63863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:1173, offset: 0x01b93a8f, size: 135 bytes, params: 3, frame: 18
const filterEmptyBinding = filterEmpty;
const value2 = undefined;
const value3 = filterEmptyBinding(a0[a1]);
(defaultImport2)(value3.length === 1, 'Contains multiple values');
const property = value3[0];
defaultImport2((property == null ? value2 : property.type) === 'text', 'First value is not text');
return value3[0].text === TRUE_OPTION_NAME;
}
function getChannelId(a0, a1) { // fn#63864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:1369, offset: 0x01b93b16, size: 127 bytes, params: 3, frame: 17
const filterEmptyBinding = filterEmpty;
const value2 = undefined;
const value3 = filterEmptyBinding(a0[a1]);
(defaultImport2)(value3.length === 1, 'Contains multiple values');
const property = value3[0];
defaultImport2((property == null ? value2 : property.type) === 'channelMention', 'First value is not a channel mention');
return value3[0].channelId;
}
function getUserId_63865(a0, a1) { // fn#63865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:1591, offset: 0x01b93b95, size: 129 bytes, params: 3, frame: 17
const filterEmptyBinding = filterEmpty;
const value2 = undefined;
const value3 = filterEmptyBinding(a0[a1]);
(defaultImport2)(value3.length === 1, 'Contains multiple values');
const property = value3[0];
defaultImport2((property == null ? value2 : property.type) === 'userMention', 'First value is not a user mention');
return value3[0].userId;
}
function getRoleId(a0, a1) { // fn#63866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:1801, offset: 0x01b93c16, size: 128 bytes, params: 3, frame: 17
const filterEmptyBinding = filterEmpty;
const value2 = undefined;
const value3 = filterEmptyBinding(a0[a1]);
(defaultImport2)(value3.length === 1, 'Contains multiple values');
const property = value3[0];
defaultImport2((property == null ? value2 : property.type) === 'roleMention', 'First value is not a role mention');
return value3[0].roleId;
}
function getString_63867(a0, a1) { // fn#63867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:2011, offset: 0x01b93c96, size: 420 bytes, params: 3, frame: 42
var r2;
var r3;
var r28;
var r24;
var r0;
var value5;
var type;
var animated;
var name;
var replace;
var value6;
var split;
var property;
var emojiId;
var HermesInternal;
var concat;
var value7;
var surrogate;
var value8;
var roleId;
var value9;
var channelId;
var value10;
var userId;
var value11;
var text;
var value12;
var value13;
const value = _createForOfIteratorHelperLoose_63858(a0[a1]);
const value2 = value();
let done = value2.done;
const value3 = '';
if (done) {
r0 = value3;
} else {
r2 = value3;
r3 = value2;
reducibleLoop1: while (true) {
value5 = r3.value;
type = value5.type;
reducibleJoin15: while (true) {
reducibleJoin14: while (true) {
if (type === 'text') {
break reducibleJoin14;
}
if (type === 'textMention') {
break reducibleJoin14;
}
if (type === 'userMention') {
userId = value5.userId;
concat = global.HermesInternal.concat;
value11 = r2 + ('<@' + userId + '>');
r24 = value11;
break reducibleJoin15;
}
if (type === 'channelMention') {
channelId = value5.channelId;
concat = global.HermesInternal.concat;
value10 = r2 + ('<#' + channelId + '>');
r24 = value10;
break reducibleJoin15;
}
if (type === 'roleMention') {
roleId = value5.roleId;
concat = global.HermesInternal.concat;
value9 = r2 + ('<@&' + roleId + '>');
r24 = value9;
break reducibleJoin15;
}
if (type === 'emoji') {
surrogate = value5.surrogate;
value8 = r2 + surrogate;
r24 = value8;
break reducibleJoin15;
}
if (type !== 'customEmoji') {
r24 = r2;
break reducibleJoin15;
}
animated = value5.animated;
r28 = animated ? 'a' : value3;
name = value5.name;
replace = name.replace;
value6 = Reflect.apply(replace, name, [RegExp(':', 'g'), value3]);
split = value6.split;
property = Reflect.apply(split, value6, ['~'])[0];
emojiId = value5.emojiId;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
value7 = r2 + ('<' + r28 + ':' + property + ':' + emojiId + '>');
r24 = value7;
break reducibleJoin15;
}
text = value5.text;
value12 = r2 + text;
r24 = value12;
break reducibleJoin15;
}
value13 = value();
done = value13.done;
if (done) {
r0 = r24;
break reducibleLoop1;
}
r2 = r24;
r3 = value13;
continue reducibleLoop1;
}
}
return r0;
}
function getOptionalBoolean(a0, a1) { // fn#63868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:2633, offset: 0x01b93e3a, size: 36 bytes, params: 3, frame: 14
const value = null;
return value == a0[a1] ? value : getBoolean(a0, a1);
}
function getOptionalChannelId(a0, a1) { // fn#63869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:2759, offset: 0x01b93e5e, size: 36 bytes, params: 3, frame: 14
const value = null;
return value == a0[a1] ? value : getChannelId(a0, a1);
}
function getOptionalUserId(a0, a1) { // fn#63870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:2880, offset: 0x01b93e82, size: 36 bytes, params: 3, frame: 14
const value = null;
return value == a0[a1] ? value : getUserId_63865(a0, a1);
}
function getOptionalRoleId(a0, a1) { // fn#63871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:2995, offset: 0x01b93ea6, size: 36 bytes, params: 3, frame: 14
const value = null;
return value == a0[a1] ? value : getRoleId(a0, a1);
}
function getOptionalString(a0, a1) { // fn#63872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:3110, offset: 0x01b93eca, size: 36 bytes, params: 3, frame: 14
const value = null;
return value == a0[a1] ? value : getString_63867(a0, a1);
}
function normalizeNumericString(a0, a1) { // fn#63873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:3207, offset: 0x01b93eee, size: 263 bytes, params: 3, frame: 21
var r1;
const numberParts = (NumberPartsModule).numberParts;
var group;
var decimal;
var RegExp;
var value2;
var prototype;
var value3;
var regExp;
var value5;
var value6;
if (a0 !== env0_5) {
env0_5 = a0;
r1 = numberParts[a0] ?? numberParts['en-US'];
group = r1.group;
decimal = r1.decimal;
RegExp = global.RegExp;
value2 = (importDefault(4100) /* metro dependency 4100: RegexUtils */).escape(group);
prototype = RegExp.prototype;
value3 = Object.create(prototype, {constructor: {value: RegExp}});
regExp = new RegExp(value2, 'g');
env0_3 = regExp instanceof Object ? regExp : value3;
RegExp = global.RegExp;
value5 = (importDefault(4100) /* metro dependency 4100: RegexUtils */).escape(decimal);
prototype = RegExp.prototype;
value6 = Object.create(prototype, {constructor: {value: RegExp}});
regExp = new RegExp(value5, 'g');
env0_4 = regExp instanceof Object ? regExp : value6;
}
return a1.replace(env0_3, '').replace(env0_4, '.');
}
function getInitialValuesFromInteractionOptions(a0, a1) { // fn#63874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:3511, offset: 0x01b93ff5, size: 76 bytes, params: 3, frame: 15
var r2;
var value3;
var value4;
const env0_0 = a0;
const getInitialValuesFromInteractionOptions_loop2 = getInitialValuesFromInteractionOptions_loop;
const value = _createForOfIteratorHelperLoose_63858(a1);
const value2 = value();
let done = value2.done;
if (!done) {
for (r2 = value2; true; r2 = value4) {
value3 = r2.value;
getInitialValuesFromInteractionOptions_loop2(value3);
value4 = value();
done = value4.done;
if (done) {
break;
}
}
}
return {};
function getInitialValuesFromInteractionOptions_loop(a0) { // fn#63875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:3585, owner: getInitialValuesFromInteractionOptions._loop, offset: 0x01b94041, size: 128 bytes, params: 2, frame: 17
var r0;
const options = a0.options;
const value2 = undefined;
const r3 = options == null ? value2 : options.find(_fun63876);
const type = a0.type;
const ApplicationCommandOptionType = (ServerModule).ApplicationCommandOptionType;
const ATTACHMENT = ApplicationCommandOptionType.ATTACHMENT;
const value5 = 0;
if (type === ATTACHMENT) {
r0 = value5;
} else if (r3 == null) {
env0_1[a0.name] = a0;
r0 = value2;
} else if (r3.autocomplete) {
r0 = value5;
} else {
env0_1[a0.name] = a0;
r0 = value2;
}
return r0;
function _fun63876({name}) { // fn#63876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8229:3640, offset: 0x01b940c1, size: 26 bytes, params: 2, frame: 2
return name === env0_0.name;
}
}
}
}
global.__d(_fun63857, 8051, [5066, 44, 8052, 4100, 1909,
2]) /* metro module 8051, dependencies: [5066, 44, 8052, 4100, 1909, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,10 +1,13 @@
/* Metro module 7869; source: modules/application_commands/ApplicationCommandQueryTypes.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun62981(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#62981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8047:6, offset: 0x01b6dd1b, size: 166 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/ApplicationCommandQueryTypes.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/ApplicationCommandQueryTypes.tsx');
exports.ScoreMethod = {NONE: 'none', APPLICATION_ONLY: 'application_only', COMMAND_ONLY: 'command_only',
COMMAND_OR_APPLICATION: 'command_or_application'};
exports.BuiltInCommandFilter = {ALLOW: 'allow', ONLY_TEXT: 'only_text', DENY: 'deny'};
}
global.__d(_fun62981, 7869, [2]) /* metro module 7869, dependencies: [2] */;
@@ -1,348 +1,367 @@
/* Metro module 7168; source: modules/application_commands/ApplicationCommandStore.tsx; dependencies: [6, 7, 15, 17, 18, 57, 4791, 1934, 5065, 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 Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import SelectedChannelStore from '../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import ChannelSectionStore from '../../stores/ChannelSectionStore.tsx'; /* Metro dependency 4791 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun57543(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:6, offset: 0x013e8743, size: 396 bytes, params: 8, frame: 23
const env0_0 = require;
const closure = function() {
env0_10 = {};
return true;
};
const closure2 = APPLICATION_COMMAND_SET_ACTIVE_COMMAND_57549;
const closure3 = APPLICATION_COMMAND_SET_PREFERRED_COMMAND;
const closure4 = APPLICATION_COMMAND_UPDATE_OPTIONS;
const APPLICATION_COMMAND_SET_ACTIVE_COMMAND_575492 = APPLICATION_COMMAND_SET_ACTIVE_COMMAND_57549;
const APPLICATION_COMMAND_SET_PREFERRED_COMMAND2 = APPLICATION_COMMAND_SET_PREFERRED_COMMAND;
const APPLICATION_COMMAND_UPDATE_OPTIONS2 = APPLICATION_COMMAND_UPDATE_OPTIONS;
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 env0_7 = importDefault(57) /* metro dependency 57 */;
const channelSectionStore = importDefault(4791) /* metro dependency 4791: ChannelSectionStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
let env0_10 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun57553(Store);
value.displayName = 'ApplicationCommandStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: closure,
CHANNEL_SELECT: closure, LOGOUT: closure, APPLICATION_COMMAND_SET_ACTIVE_COMMAND: closure2,
APPLICATION_COMMAND_SET_PREFERRED_COMMAND: closure3, APPLICATION_COMMAND_UPDATE_OPTIONS: closure4,
CHANNEL_SELECT: closure, LOGOUT: closure,
APPLICATION_COMMAND_SET_ACTIVE_COMMAND: APPLICATION_COMMAND_SET_ACTIVE_COMMAND_575492,
APPLICATION_COMMAND_SET_PREFERRED_COMMAND: APPLICATION_COMMAND_SET_PREFERRED_COMMAND2,
APPLICATION_COMMAND_UPDATE_OPTIONS: APPLICATION_COMMAND_UPDATE_OPTIONS2,
APPLICATION_COMMAND_UPDATE_CHANNEL_STATE: APPLICATION_COMMAND_UPDATE_CHANNEL_STATE_57570});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/ApplicationCommandStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/ApplicationCommandStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_57544() { // fn#57544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:178, offset: 0x013e88cf, 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_57544_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _isNativeReflectConstruct_57544() { // fn#57544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:178, offset: 0x013e88cf, 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) {
function getOrCreateChannelState_57548(a0) { // fn#57548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:417, offset: 0x013e893a, size: 65 bytes, params: 2, frame: 5
if (!(a0 in env0_10)) {
env0_10[a0] = {'activeCommand': null, 'activeCommandSection': null, 'activeOptionName': null,
'preferredCommandId': null, 'optionStates': null, 'initialValues': null, 'commandOrigin': null,
optionStates: {}, initialValues: {}};
}
return env0_10[a0];
}
return (_isNativeReflectConstruct_57544_isNativeReflectConstruct = function() {
return !!result;
})();
}
function getOrCreateChannelState_57548(a0) { // fn#57548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:417, offset: 0x013e893a, size: 65 bytes, params: 2, frame: 5
if (!(a0 in env0_10)) {
env0_10[a0] = {'activeCommand': null, 'activeCommandSection': null, 'activeOptionName': null,
'preferredCommandId': null, 'optionStates': null, 'initialValues': null, 'commandOrigin': null,
optionStates: {}, initialValues: {}};
}
return env0_10[a0];
}
function APPLICATION_COMMAND_SET_ACTIVE_COMMAND_57549({channelId, command, section, initialValues, location, triggerSection, queryLength, sectionName, query, searchResultsPosition, source, commandOrigin}) { // fn#57549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:625, offset: 0x013e897b, size: 328 bytes, params: 2, frame: 28
let value = undefined;
const orCreateChannelState_57548 = getOrCreateChannelState_57548(channelId);
const id = command == null ? value : command.id;
const activeCommand = orCreateChannelState_57548.activeCommand;
if (id === (activeCommand == null ? value : activeCommand.id)) {
return false;
}
orCreateChannelState_57548.activeCommand = command;
orCreateChannelState_57548.activeCommandSection = section;
orCreateChannelState_57548.activeOptionName = null;
orCreateChannelState_57548.preferredCommandId = null;
orCreateChannelState_57548.initialValues = initialValues ?? ({});
orCreateChannelState_57548.commandOrigin = commandOrigin ?? null;
orCreateChannelState_57548.source = source;
if ((command == null ? value : command.options) != null) {
command.options.forEach(_fun57550);
}
orCreateChannelState_57548.optionStates = {};
if (command != null) {
value = require(5065) /* metro dependency 5065: ApplicationCommandUtils */;
value.trackCommandSelected({command: command, location: location, triggerSection: triggerSection,
queryLength: queryLength, sectionName: sectionName, query: query,
searchResultsPosition: searchResultsPosition,
source: source});
}
return true;
function _fun57550({name}) { // fn#57550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:1165, offset: 0x013e8ac3, size: 37 bytes, params: 2, frame: 3
env0_0[name] = {'isActive': false, 'hasValue': false, 'lastValidationResult': null, 'optionValue': null};
}
function APPLICATION_COMMAND_SET_ACTIVE_COMMAND_57549({channelId, command, section, initialValues, location, triggerSection, queryLength, sectionName, query, searchResultsPosition, source, commandOrigin}) { // fn#57549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:625, offset: 0x013e897b, size: 328 bytes, params: 2, frame: 28
let value = undefined;
const orCreateChannelState_57548 = getOrCreateChannelState_57548(channelId);
const id = command == null ? value : command.id;
const activeCommand = orCreateChannelState_57548.activeCommand;
if (id === (activeCommand == null ? value : activeCommand.id)) {
return false;
}
orCreateChannelState_57548.activeCommand = command;
orCreateChannelState_57548.activeCommandSection = section;
orCreateChannelState_57548.activeOptionName = null;
orCreateChannelState_57548.preferredCommandId = null;
orCreateChannelState_57548.initialValues = initialValues ?? ({});
orCreateChannelState_57548.commandOrigin = commandOrigin ?? null;
orCreateChannelState_57548.source = source;
if ((command == null ? value : command.options) != null) {
command.options.forEach(_fun57550);
}
orCreateChannelState_57548.optionStates = {};
if (command != null) {
value = require(5065) /* metro dependency 5065: ApplicationCommandUtils */;
value.trackCommandSelected({command: command, location: location, triggerSection: triggerSection,
queryLength: queryLength, sectionName: sectionName, query: query,
searchResultsPosition: searchResultsPosition,
source: source});
}
return true;
}
function APPLICATION_COMMAND_SET_PREFERRED_COMMAND({channelId, commandId}) { // fn#57551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:1419, offset: 0x013e8ae8, size: 130 bytes, params: 2, frame: 16
const getOrCreateChannelState_57548Binding = getOrCreateChannelState_57548;
const value = undefined;
const orCreateChannelState_57548Binding = getOrCreateChannelState_57548Binding(channelId);
let r0 = commandId !== orCreateChannelState_57548Binding.preferredCommandId && (orCreateChannelState_57548Binding.preferredCommandId !== null || commandId !== ((orCreateChannelState_57548Binding.activeCommand == null ? value : orCreateChannelState_57548Binding.activeCommand.id) ?? null));
if (r0) {
orCreateChannelState_57548Binding.activeCommand = null;
orCreateChannelState_57548Binding.activeOptionName = null;
orCreateChannelState_57548Binding.preferredCommandId = commandId;
orCreateChannelState_57548Binding.optionStates = {};
r0 = true;
function APPLICATION_COMMAND_SET_PREFERRED_COMMAND({channelId, commandId}) { // fn#57551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:1419, offset: 0x013e8ae8, size: 130 bytes, params: 2, frame: 16
const getOrCreateChannelState_57548Binding = getOrCreateChannelState_57548;
const value = undefined;
const orCreateChannelState_57548Binding = getOrCreateChannelState_57548Binding(channelId);
let r0 = commandId !== orCreateChannelState_57548Binding.preferredCommandId && (orCreateChannelState_57548Binding.preferredCommandId !== null || commandId !== ((orCreateChannelState_57548Binding.activeCommand == null ? value : orCreateChannelState_57548Binding.activeCommand.id) ?? null));
if (r0) {
orCreateChannelState_57548Binding.activeCommand = null;
orCreateChannelState_57548Binding.activeOptionName = null;
orCreateChannelState_57548Binding.preferredCommandId = commandId;
orCreateChannelState_57548Binding.optionStates = {};
r0 = true;
}
return r0;
}
return r0;
}
function APPLICATION_COMMAND_UPDATE_OPTIONS({channelId, changedOptionStates}) { // fn#57552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:1735, offset: 0x013e8b6a, size: 589 bytes, params: 2, frame: 38
var r8;
var hasValue;
var isActive;
var lastValidationResult;
var r21;
var r27;
var r25;
var property;
var value5;
var property2;
var activeOptionName;
var property3;
var object2;
var optionValue;
var location;
var value6;
var value7;
var object5;
var activeOptionName2;
var value8;
const orCreateChannelState_57548 = getOrCreateChannelState_57548(channelId);
const object6 = {};
let optionStates = orCreateChannelState_57548.optionStates;
copyDataProperties(object6, optionStates, undefined);
const Object = global.Object;
const value3 = Object.entries(changedOptionStates);
let length = value3.length;
if (0 < length) {
r8 = 0;
while (true) {
property = value3[r8];
value5 = env0_7(property, 2);
property = value5[0];
property2 = value5[1];
optionStates = orCreateChannelState_57548.optionStates;
if (property in optionStates) {
hasValue = property2.hasValue;
hasValue = hasValue !== undefined ? property2.hasValue : object6[property].hasValue;
if (hasValue) {
property3 = object6[property];
object2 = {hasValue: true};
isActive = property2.isActive;
isActive = isActive !== undefined ? property2.isActive : property3.isActive;
object2.isActive = isActive;
lastValidationResult = property2.lastValidationResult;
lastValidationResult = lastValidationResult !== undefined ? property2.lastValidationResult : property3.lastValidationResult;
object2.lastValidationResult = lastValidationResult;
optionValue = property2.optionValue;
if (optionValue != null) {
function APPLICATION_COMMAND_UPDATE_OPTIONS({channelId, changedOptionStates}) { // fn#57552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:1735, offset: 0x013e8b6a, size: 589 bytes, params: 2, frame: 38
var r8;
var hasValue;
var isActive;
var lastValidationResult;
var r21;
var r27;
var r25;
var property;
var value5;
var property2;
var activeOptionName;
var property3;
var object;
var optionValue;
var location;
var value6;
var value7;
var object3;
var activeOptionName2;
var value8;
const orCreateChannelState_57548 = getOrCreateChannelState_57548(channelId);
const object4 = {};
let optionStates = orCreateChannelState_57548.optionStates;
copyDataProperties(object4, optionStates, undefined);
const Object = global.Object;
const value3 = Object.entries(changedOptionStates);
let length = value3.length;
if (0 < length) {
r8 = 0;
while (true) {
property = value3[r8];
value5 = Module00057(property, 2);
property = value5[0];
property2 = value5[1];
optionStates = orCreateChannelState_57548.optionStates;
if (property in optionStates) {
hasValue = property2.hasValue;
hasValue = hasValue !== undefined ? property2.hasValue : object4[property].hasValue;
if (hasValue) {
property3 = object4[property];
object = {hasValue: true};
isActive = property2.isActive;
isActive = isActive !== undefined ? property2.isActive : property3.isActive;
object.isActive = isActive;
lastValidationResult = property2.lastValidationResult;
lastValidationResult = lastValidationResult !== undefined ? property2.lastValidationResult : property3.lastValidationResult;
object.lastValidationResult = lastValidationResult;
optionValue = property2.optionValue;
if (optionValue != null) {
r21 = optionValue;
continue;
}
optionValue = property3.optionValue;
r21 = optionValue;
continue;
}
optionValue = property3.optionValue;
r21 = optionValue;
object2.optionValue = r21;
location = property2.location;
if (location != null) {
object.optionValue = r21;
location = property2.location;
if (location != null) {
r21 = location;
continue;
}
location = property3.location;
r21 = location;
continue;
}
location = property3.location;
r21 = location;
object2.location = r21;
length = property2.length;
if (length != null) {
r27 = length;
continue;
}
r27 = property3.length;
object2.length = r27;
object6[property] = object2;
isActive = property2.isActive;
if (isActive === undefined) {
object.location = r21;
length = property2.length;
if (length != null) {
r27 = length;
continue;
}
r27 = property3.length;
object.length = r27;
object4[property] = object;
isActive = property2.isActive;
if (isActive === undefined) {
break;
}
isActive = property2.isActive;
activeOptionName = orCreateChannelState_57548.activeOptionName;
if (isActive) {
value6 = activeOptionName != null;
if (!value6) {
r25 = value6;
continue;
}
activeOptionName = orCreateChannelState_57548.activeOptionName;
value7 = activeOptionName !== property;
r25 = value7;
if (!r25) {
continue;
}
activeOptionName = orCreateChannelState_57548.activeOptionName;
object3 = {};
activeOptionName2 = orCreateChannelState_57548.activeOptionName;
copyDataProperties(object3, object4[activeOptionName2], undefined);
object4[activeOptionName] = object3;
activeOptionName = orCreateChannelState_57548.activeOptionName;
object4[activeOptionName].isActive = false;
orCreateChannelState_57548.activeOptionName = property;
break;
}
if (property !== activeOptionName) {
break;
}
orCreateChannelState_57548.activeOptionName = null;
break;
}
isActive = property2.isActive;
object4[property] = {'hasValue': false, 'isActive': false, 'lastValidationResult': null,
'optionValue': null,
location: undefined, length: undefined};
activeOptionName = orCreateChannelState_57548.activeOptionName;
if (isActive) {
value6 = activeOptionName != null;
if (!value6) {
r25 = value6;
continue;
}
activeOptionName = orCreateChannelState_57548.activeOptionName;
value7 = activeOptionName !== property;
r25 = value7;
if (!r25) {
continue;
}
activeOptionName = orCreateChannelState_57548.activeOptionName;
object5 = {};
activeOptionName2 = orCreateChannelState_57548.activeOptionName;
copyDataProperties(object5, object6[activeOptionName2], undefined);
object6[activeOptionName] = object5;
activeOptionName = orCreateChannelState_57548.activeOptionName;
object6[activeOptionName].isActive = false;
orCreateChannelState_57548.activeOptionName = property;
break;
}
if (property !== activeOptionName) {
if (activeOptionName !== property) {
break;
}
orCreateChannelState_57548.activeOptionName = null;
break;
}
object6[property] = {'hasValue': false, 'isActive': false, 'lastValidationResult': null,
'optionValue': null,
location: undefined, length: undefined};
activeOptionName = orCreateChannelState_57548.activeOptionName;
if (activeOptionName !== property) {
break;
value8 = typeof r8 === 'bigint' ? r8 + 1n : +r8 + 1;
length = value3.length;
if (value8 < length) {
r8 = value8;
continue;
}
orCreateChannelState_57548.activeOptionName = null;
break;
}
value8 = typeof r8 === 'bigint' ? r8 + 1n : +r8 + 1;
length = value3.length;
if (value8 < length) {
r8 = value8;
continue;
}
break;
}
}
orCreateChannelState_57548.optionStates = object6;
return true;
}
function _fun57553(a0) { // fn#57553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:2763, offset: 0x013e8db7, size: 329 bytes, params: 2, frame: 16
const closure = ApplicationCommandStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function() {
this.waitFor(ChannelSectionStore, SelectedChannelStore);
ChannelSectionStore.addChangeListener(_fun57556);
}}, {key: 'getActiveCommand', value: function(a0) {
return getOrCreateChannelState_57548(a0).activeCommand;
}}, {key: 'getActiveCommandSection', value: function(a0) {
return getOrCreateChannelState_57548(a0).activeCommandSection;
}}, {key: 'getActiveOptionName', value: function(a0) {
return getOrCreateChannelState_57548(a0).activeOptionName;
}}, {key: 'getActiveOption', value: value_57560}, {key: 'getPreferredCommandId', value: function(a0) {
return getOrCreateChannelState_57548(a0).preferredCommandId;
}}, {key: 'getOptionStates', value: function(a0) {
return getOrCreateChannelState_57548(a0).optionStates;
}}, {key: 'getOptionState', value: function(a0, a1) {
return getOrCreateChannelState_57548(a0).optionStates[a1];
}}, {key: 'getCommandOrigin', value: function(a0) {
return getOrCreateChannelState_57548(a0).commandOrigin;
}}, {key: 'getSource', value: function(a0) {
return getOrCreateChannelState_57548(a0).source;
}}, {key: 'getOption', value: value_57567}, {key: 'getState', value: function(a0) {
var object = {};
var getOrCreateChannelState_57548Binding = getOrCreateChannelState_57548;
copyDataProperties(object, getOrCreateChannelState_57548Binding(a0), getOrCreateChannelState_57548Binding);
return object;
}}]);
}
function APPLICATION_COMMAND_UPDATE_CHANNEL_STATE_57570({channelId, preferredCommandId, command, section, location, changedOptionStates}) { // fn#57570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:4868, offset: 0x013e9140, size: 152 bytes, params: 2, frame: 18
const value2 = APPLICATION_COMMAND_SET_ACTIVE_COMMAND_57549({type: 'APPLICATION_COMMAND_SET_ACTIVE_COMMAND',
channelId: channelId, command: command, section: section, location: location});
const value3 = APPLICATION_COMMAND_SET_PREFERRED_COMMAND({type: 'APPLICATION_COMMAND_SET_PREFERRED_COMMAND',
channelId: channelId, commandId: preferredCommandId});
APPLICATION_COMMAND_UPDATE_OPTIONS({type: 'APPLICATION_COMMAND_UPDATE_OPTIONS', channelId: channelId,
changedOptionStates: changedOptionStates});
let r0 = value2 || value3;
r0 = !r0 || r0;
return r0;
}
function _fun57550({name}) { // fn#57550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:1165, offset: 0x013e8ac3, size: 37 bytes, params: 2, frame: 3
env0_0[name] = {'isActive': false, 'hasValue': false, 'lastValidationResult': null, 'optionValue': null};
}
function value_57555() { // fn#57555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:3108, offset: 0x013e8f00, size: 48 bytes, params: 1, frame: 13
this.waitFor(ChannelSectionStore, SelectedChannelStore);
ChannelSectionStore.addChangeListener(_fun57556);
}
function value_57560(a0) { // fn#57560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:3631, offset: 0x013e8fe7, size: 84 bytes, params: 2, frame: 14
var environment;
let value = environment.__proto__;
const getOrCreateChannelState_57548Binding = getOrCreateChannelState_57548;
value = undefined;
const activeCommand = getOrCreateChannelState_57548Binding(a0).activeCommand;
const value3 = null;
const r1 = value3 == activeCommand || value3 == activeCommand.options ? value : activeCommand.options.find(_fun57561);
return value3 != r1 ? r1 : value3;
}
function value_57567(a0, a1) { // fn#57567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:4280, offset: 0x013e90d9, size: 75 bytes, params: 3, frame: 14
var environment;
const env0_0 = a1;
let value = environment.__proto__;
const getOrCreateChannelState_57548Binding = getOrCreateChannelState_57548;
value = undefined;
const activeCommand = getOrCreateChannelState_57548Binding(a0).activeCommand;
return activeCommand == null || activeCommand.options == null ? value : activeCommand.options.find(function({name}) {
return name === require;
});
}
function _fun57556() { // fn#57556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:3158, offset: 0x013e8f30, size: 108 bytes, params: 1, frame: 13
var object;
const channelId = SelectedChannelStore.getChannelId();
if (channelId == null) {
env2_10 = {};
orCreateChannelState_57548.optionStates = object4;
return true;
}
const currentSidebarChannelId = ChannelSectionStore.getCurrentSidebarChannelId(channelId);
if (currentSidebarChannelId == null) {
if (channelId in env2_10) {
({})[channelId] = env2_10[channelId];
} else {
object = {};
function _fun57553(a0) { // fn#57553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:2763, offset: 0x013e8db7, size: 329 bytes, params: 2, frame: 16
const ApplicationCommandStore2 = ApplicationCommandStore;
Inherits(ApplicationCommandStore2, a0);
return CreateClass(ApplicationCommandStore2, [{key: 'initialize', value: function() {
var channelSectionStoreBinding = ChannelSectionStore;
this.waitFor(channelSectionStoreBinding, SelectedChannelStore);
channelSectionStoreBinding.addChangeListener(_fun57556);
}}, {key: 'getActiveCommand', value: function(a0) {
return getOrCreateChannelState_57548(a0).activeCommand;
}}, {key: 'getActiveCommandSection', value: function(a0) {
return getOrCreateChannelState_57548(a0).activeCommandSection;
}}, {key: 'getActiveOptionName', value: function(a0) {
return getOrCreateChannelState_57548(a0).activeOptionName;
}}, {key: 'getActiveOption', value: value_57560}, {key: 'getPreferredCommandId', value: function(a0) {
return getOrCreateChannelState_57548(a0).preferredCommandId;
}}, {key: 'getOptionStates', value: function(a0) {
return getOrCreateChannelState_57548(a0).optionStates;
}}, {key: 'getOptionState', value: function(a0, a1) {
return getOrCreateChannelState_57548(a0).optionStates[a1];
}}, {key: 'getCommandOrigin', value: function(a0) {
return getOrCreateChannelState_57548(a0).commandOrigin;
}}, {key: 'getSource', value: function(a0) {
return getOrCreateChannelState_57548(a0).source;
}}, {key: 'getOption', value: value_57567}, {key: 'getState', value: function(a0) {
var object = {};
var getOrCreateChannelState_57548Binding = getOrCreateChannelState_57548;
copyDataProperties(object, getOrCreateChannelState_57548Binding(a0), getOrCreateChannelState_57548Binding);
return object;
}}]);
function ApplicationCommandStore() { // fn#57554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:2775, offset: 0x00ff71a7, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, ApplicationCommandStore);
const value3 = env1_5(ApplicationCommandStore);
return env1_4(this, _isNativeReflectConstruct_57544() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
} else {
if (currentSidebarChannelId in env2_10) {
return false;
function value_57555() { // fn#57555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:3108, offset: 0x013e8f00, size: 48 bytes, params: 1, frame: 13
const waitFor = this.waitFor;
const channelSectionStoreBinding = ChannelSectionStore;
Reflect.apply(waitFor, this, [channelSectionStoreBinding, SelectedChannelStore]);
channelSectionStoreBinding.addChangeListener(_fun57556);
function _fun57556() { // fn#57556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:3158, offset: 0x013e8f30, size: 108 bytes, params: 1, frame: 13
var object3;
var object;
const channelId = SelectedChannelStore.getChannelId();
if (channelId == null) {
object3 = {};
return true;
}
const currentSidebarChannelId = ChannelSectionStore.getCurrentSidebarChannelId(channelId);
if (currentSidebarChannelId == null) {
if (channelId in object3) {
({})[channelId] = object3[channelId];
} else {
object = {};
}
} else {
if (currentSidebarChannelId in object3) {
return false;
}
if (channelId in object3) {
({})[channelId] = object3[channelId];
} else {
object = {};
}
}
}
}
if (channelId in env2_10) {
({})[channelId] = env2_10[channelId];
} else {
object = {};
function value_57560(a0) { // fn#57560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:3631, offset: 0x013e8fe7, size: 84 bytes, params: 2, frame: 14
var environment;
let value = environment.__proto__;
const getOrCreateChannelState_57548Binding = getOrCreateChannelState_57548;
value = undefined;
const activeCommand = getOrCreateChannelState_57548Binding(a0).activeCommand;
const value3 = null;
const r1 = value3 == activeCommand || value3 == activeCommand.options ? value : activeCommand.options.find(_fun57561);
return value3 != r1 ? r1 : value3;
function _fun57561({name}) { // fn#57561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:3758, offset: 0x013e903b, size: 27 bytes, params: 2, frame: 2
return name === env0_0.activeOptionName;
}
}
function value_57567(a0, a1) { // fn#57567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:4280, offset: 0x013e90d9, size: 75 bytes, params: 3, frame: 14
var environment;
const env0_0 = a1;
let value = environment.__proto__;
const getOrCreateChannelState_57548Binding = getOrCreateChannelState_57548;
value = undefined;
const activeCommand = getOrCreateChannelState_57548Binding(a0).activeCommand;
return activeCommand == null || activeCommand.options == null ? value : activeCommand.options.find(function({name}) {
return name === require;
});
}
}
function APPLICATION_COMMAND_UPDATE_CHANNEL_STATE_57570({channelId, preferredCommandId, command, section, location, changedOptionStates}) { // fn#57570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:4868, offset: 0x013e9140, size: 152 bytes, params: 2, frame: 18
const value2 = APPLICATION_COMMAND_SET_ACTIVE_COMMAND_57549({type: 'APPLICATION_COMMAND_SET_ACTIVE_COMMAND',
channelId: channelId, command: command, section: section, location: location});
const value3 = APPLICATION_COMMAND_SET_PREFERRED_COMMAND({type: 'APPLICATION_COMMAND_SET_PREFERRED_COMMAND',
channelId: channelId, commandId: preferredCommandId});
APPLICATION_COMMAND_UPDATE_OPTIONS({type: 'APPLICATION_COMMAND_UPDATE_OPTIONS', channelId: channelId,
changedOptionStates: changedOptionStates});
let r0 = value2 || value3;
r0 = !r0 || r0;
return r0;
}
}
function _fun57561({name}) { // fn#57561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7346:3758, offset: 0x013e903b, size: 27 bytes, params: 2, frame: 2
return name === env0_0.activeOptionName;
}
global.__d(_fun57543, 7168, [6, 7, 15, 17, 18, 57, 4791, 1934, 5065, 566, 694,
2]) /* metro module 7168, dependencies: [6, 7, 15, 17, 18, 57, 4791, 1934, 5065, 566, 694, 2] */;
@@ -1,72 +1,73 @@
/* Metro module 5068; source: modules/application_commands/ApplicationCommandTypes.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun43837(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5246:6, offset: 0x011606b4, size: 880 bytes, params: 8, frame: 23
var object4;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object4 = {BUILT_IN: 0};
object4[0] = 'BUILT_IN';
object4.APPLICATION = 1;
object4[1] = 'APPLICATION';
const object7 = {BUILT_IN: 0};
object7[0] = 'BUILT_IN';
object7.BUILT_IN_TEXT = 1;
object7[1] = 'BUILT_IN_TEXT';
object7.BUILT_IN_INTEGRATION = 2;
object7[2] = 'BUILT_IN_INTEGRATION';
object7.BOT = 3;
object7[3] = 'BOT';
object7.PLACEHOLDER = 4;
object7[4] = 'PLACEHOLDER';
const object8 = {ROLE: 1};
object8[1] = 'ROLE';
object8.USER = 2;
object8[2] = 'USER';
object8.CHANNEL = 3;
object8[3] = 'CHANNEL';
const object9 = {BUILT_IN: 1};
object9[1] = 'BUILT_IN';
object9.FRECENCY = 2;
object9[2] = 'FRECENCY';
object9.APP = 3;
object9[3] = 'APP';
const object10 = {CHAT: 0};
object10[0] = 'CHAT';
object10.APPLICATION_LAUNCHER = 1;
object10[1] = 'APPLICATION_LAUNCHER';
object10.APP_LAUNCHER_APPLICATION_VIEW = 2;
object10[2] = 'APP_LAUNCHER_APPLICATION_VIEW';
object10.IMAGE_RECS_MENU = 3;
object10[3] = 'IMAGE_RECS_MENU';
object10.IMAGE_RECS_SUBMENU = 4;
object10[4] = 'IMAGE_RECS_SUBMENU';
object10.CONTEXT_MENU = 5;
object10[5] = 'CONTEXT_MENU';
object10.VOICE_UI = 6;
object10[6] = 'VOICE_UI';
object10.VOICE_TILE_ACTIVITY_SUGGESTIONS = 7;
object10[7] = 'VOICE_TILE_ACTIVITY_SUGGESTIONS';
object10.MINI_SHELF = 8;
object10[8] = 'MINI_SHELF';
object10.USER_PROFILE = 9;
object10[9] = 'USER_PROFILE';
object10.NOW_PLAYING = 10;
object10[10] = 'NOW_PLAYING';
object10.ACTIVITY_DETAILS = 11;
object10[11] = 'ACTIVITY_DETAILS';
object10.ACTIVITIES_HOME = 12;
object10[12] = 'ACTIVITIES_HOME';
object10.ACTIVITY_INSTANCE_EMBED = 13;
object10[13] = 'ACTIVITY_INSTANCE_EMBED';
object10.ACTIVITY_BOOKMARK_EMBED = 14;
object10[14] = 'ACTIVITY_BOOKMARK_EMBED';
object10.APP_DMS_ENTRY_POINT_COMMAND_BUTTON = 15;
object10[15] = 'APP_DMS_ENTRY_POINT_COMMAND_BUTTON';
object10.APP_MESSAGE_EMBED = 16;
object10[16] = 'APP_MESSAGE_EMBED';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/ApplicationCommandTypes.tsx');
exports.ApplicationCommandSectionType = object4;
exports.ApplicationCommandInputType = object7;
exports.ApplicationCommandPermissionType = object8;
object = {BUILT_IN: 0};
object[0] = 'BUILT_IN';
object.APPLICATION = 1;
object[1] = 'APPLICATION';
const object2 = {BUILT_IN: 0};
object2[0] = 'BUILT_IN';
object2.BUILT_IN_TEXT = 1;
object2[1] = 'BUILT_IN_TEXT';
object2.BUILT_IN_INTEGRATION = 2;
object2[2] = 'BUILT_IN_INTEGRATION';
object2.BOT = 3;
object2[3] = 'BOT';
object2.PLACEHOLDER = 4;
object2[4] = 'PLACEHOLDER';
const object3 = {ROLE: 1};
object3[1] = 'ROLE';
object3.USER = 2;
object3[2] = 'USER';
object3.CHANNEL = 3;
object3[3] = 'CHANNEL';
const object5 = {BUILT_IN: 1};
object5[1] = 'BUILT_IN';
object5.FRECENCY = 2;
object5[2] = 'FRECENCY';
object5.APP = 3;
object5[3] = 'APP';
const object6 = {CHAT: 0};
object6[0] = 'CHAT';
object6.APPLICATION_LAUNCHER = 1;
object6[1] = 'APPLICATION_LAUNCHER';
object6.APP_LAUNCHER_APPLICATION_VIEW = 2;
object6[2] = 'APP_LAUNCHER_APPLICATION_VIEW';
object6.IMAGE_RECS_MENU = 3;
object6[3] = 'IMAGE_RECS_MENU';
object6.IMAGE_RECS_SUBMENU = 4;
object6[4] = 'IMAGE_RECS_SUBMENU';
object6.CONTEXT_MENU = 5;
object6[5] = 'CONTEXT_MENU';
object6.VOICE_UI = 6;
object6[6] = 'VOICE_UI';
object6.VOICE_TILE_ACTIVITY_SUGGESTIONS = 7;
object6[7] = 'VOICE_TILE_ACTIVITY_SUGGESTIONS';
object6.MINI_SHELF = 8;
object6[8] = 'MINI_SHELF';
object6.USER_PROFILE = 9;
object6[9] = 'USER_PROFILE';
object6.NOW_PLAYING = 10;
object6[10] = 'NOW_PLAYING';
object6.ACTIVITY_DETAILS = 11;
object6[11] = 'ACTIVITY_DETAILS';
object6.ACTIVITIES_HOME = 12;
object6[12] = 'ACTIVITIES_HOME';
object6.ACTIVITY_INSTANCE_EMBED = 13;
object6[13] = 'ACTIVITY_INSTANCE_EMBED';
object6.ACTIVITY_BOOKMARK_EMBED = 14;
object6[14] = 'ACTIVITY_BOOKMARK_EMBED';
object6.APP_DMS_ENTRY_POINT_COMMAND_BUTTON = 15;
object6[15] = 'APP_DMS_ENTRY_POINT_COMMAND_BUTTON';
object6.APP_MESSAGE_EMBED = 16;
object6[16] = 'APP_MESSAGE_EMBED';
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/ApplicationCommandTypes.tsx');
exports.ApplicationCommandSectionType = object;
exports.ApplicationCommandInputType = object2;
exports.ApplicationCommandPermissionType = object3;
exports.ApplicationCommandTriggerLocations = {DISCOVERY: 'discovery', SUGGESTION: 'suggestion', MENTION: 'mention',
PASTE: 'paste', RECALL: 'recall', POPULAR_COMMANDS: 'popular_commands', MJ_CHAT_BAR: 'mj_chat_bar',
QUERY: 'query', SLASH_UI: 'slash_ui', APP_LAUNCHER: 'app_launcher', APP_LAUNCHER_HOME: 'app_launcher_home',
@@ -80,7 +81,8 @@ function _fun43837(global, require, importDefault, importAll, module, exports, d
ACTIVITY_BOOKMARK_EMBED: 'activity_bookmark_embed', ACTIVITIES_MINI_SHELF: 'activities_mini_shelf',
VC_TILE_ACTIVITY_SUGGESTION: 'vc_tile_activity_suggestion',
APP_DMS_ENTRY_POINT_COMMAND_BUTTON: 'app_dms_entry_point_command_button'};
exports.ApplicationCommandTriggerSections = object9;
exports.CommandOrigin = object10;
exports.ApplicationCommandTriggerSections = object5;
exports.CommandOrigin = object6;
}
global.__d(_fun43837, 5068, [2]) /* metro module 5068, dependencies: [2] */;
@@ -1,88 +1,93 @@
/* Metro module 8332; source: modules/application_commands/ApplicationCommandUserAppUtils.tsx; dependencies: [8333, 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 EphemeralMessageReasonModule from '../../external/discord_common/js/shared/shared-constants/EphemeralMessageReason.tsx'; /* Metro dependency 8333 */
function _fun66352(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8517:6, offset: 0x01bf7bd7, 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/application_commands/ApplicationCommandUserAppUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/ApplicationCommandUserAppUtils.tsx');
exports.getEphemeralReasonMessage = getEphemeralReasonMessage;
function getEphemeralReasonMessage(a0) { // fn#66353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8517:217, offset: 0x01bf7c37, size: 1776 bytes, params: 2, frame: 15
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const EphemeralMessageReason = (EphemeralMessageReasonModule).EphemeralMessageReason;
const FEATURE_LIMITED = EphemeralMessageReason.FEATURE_LIMITED;
if (FEATURE_LIMITED === a0) {
return intl.string(t.WCvmrR);
}
const GUILD_FEATURE_LIMITED = EphemeralMessageReason.GUILD_FEATURE_LIMITED;
if (GUILD_FEATURE_LIMITED === a0) {
return intl.string(t['0QUDYf']);
}
const USER_FEATURE_LIMITED = EphemeralMessageReason.USER_FEATURE_LIMITED;
if (USER_FEATURE_LIMITED === a0) {
return intl.string(t.gs1sxd);
}
const SLOWMODE = EphemeralMessageReason.SLOWMODE;
if (SLOWMODE === a0) {
return intl.string(t['9UAXh4']);
}
const RATE_LIMIT = EphemeralMessageReason.RATE_LIMIT;
if (RATE_LIMIT === a0) {
return intl.string(t.zBB9xD);
}
const CANNOT_MESSAGE_USER = EphemeralMessageReason.CANNOT_MESSAGE_USER;
if (CANNOT_MESSAGE_USER === a0) {
return intl.string(t.w7sHnP);
}
const USER_VERIFICATION_LEVEL = EphemeralMessageReason.USER_VERIFICATION_LEVEL;
if (USER_VERIFICATION_LEVEL === a0) {
return intl.string(t.SLAkFX);
}
const CANNOT_UNARCHIVE_THREAD = EphemeralMessageReason.CANNOT_UNARCHIVE_THREAD;
if (CANNOT_UNARCHIVE_THREAD === a0) {
return intl.string(t.AIqS3n);
}
const CANNOT_JOIN_THREAD = EphemeralMessageReason.CANNOT_JOIN_THREAD;
if (CANNOT_JOIN_THREAD === a0) {
return intl.string(t.BqKxlT);
}
const MISSING_PERMISSIONS = EphemeralMessageReason.MISSING_PERMISSIONS;
if (MISSING_PERMISSIONS === a0) {
return intl.string(t.LLF2DJ);
}
const CANNOT_SEND_ATTACHMENTS = EphemeralMessageReason.CANNOT_SEND_ATTACHMENTS;
if (CANNOT_SEND_ATTACHMENTS === a0) {
return intl.string(t.Htl7W1);
}
const CANNOT_SEND_EMBEDS = EphemeralMessageReason.CANNOT_SEND_EMBEDS;
if (CANNOT_SEND_EMBEDS === a0) {
return intl.string(t.vGgPMH);
}
const CANNOT_SEND_STICKERS = EphemeralMessageReason.CANNOT_SEND_STICKERS;
if (CANNOT_SEND_STICKERS === a0) {
return intl.string(t.byrr7l);
}
const AUTOMOD_BLOCKED = EphemeralMessageReason.AUTOMOD_BLOCKED;
if (AUTOMOD_BLOCKED === a0) {
return intl.string(t['24PAJ+']);
}
const HARMFUL_LINK = EphemeralMessageReason.HARMFUL_LINK;
if (HARMFUL_LINK === a0) {
return intl.string(t.zeqgmP);
}
const CANNOT_USE_COMMAND = EphemeralMessageReason.CANNOT_USE_COMMAND;
if (CANNOT_USE_COMMAND === a0) {
return intl.string(t.kzMhhk);
}
const BETA_GUILD_SIZE = EphemeralMessageReason.BETA_GUILD_SIZE;
if (BETA_GUILD_SIZE === a0) {
return intl.string(t.Af3rGY);
}
const CANNOT_USE_EXTERNAL_APPS = EphemeralMessageReason.CANNOT_USE_EXTERNAL_APPS;
if (CANNOT_USE_EXTERNAL_APPS === a0) {
return intl.string(t.Ji4l7E);
}
return intl.string(t['v/OAcs']);
}
}
function getEphemeralReasonMessage(a0) { // fn#66353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8517:217, offset: 0x01bf7c37, size: 1776 bytes, params: 2, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const EphemeralMessageReason = (require(8333) /* metro dependency 8333: EphemeralMessageReason */).EphemeralMessageReason;
const FEATURE_LIMITED = EphemeralMessageReason.FEATURE_LIMITED;
if (FEATURE_LIMITED === a0) {
return intl.string(t.WCvmrR);
}
const GUILD_FEATURE_LIMITED = EphemeralMessageReason.GUILD_FEATURE_LIMITED;
if (GUILD_FEATURE_LIMITED === a0) {
return intl.string(t['0QUDYf']);
}
const USER_FEATURE_LIMITED = EphemeralMessageReason.USER_FEATURE_LIMITED;
if (USER_FEATURE_LIMITED === a0) {
return intl.string(t.gs1sxd);
}
const SLOWMODE = EphemeralMessageReason.SLOWMODE;
if (SLOWMODE === a0) {
return intl.string(t['9UAXh4']);
}
const RATE_LIMIT = EphemeralMessageReason.RATE_LIMIT;
if (RATE_LIMIT === a0) {
return intl.string(t.zBB9xD);
}
const CANNOT_MESSAGE_USER = EphemeralMessageReason.CANNOT_MESSAGE_USER;
if (CANNOT_MESSAGE_USER === a0) {
return intl.string(t.w7sHnP);
}
const USER_VERIFICATION_LEVEL = EphemeralMessageReason.USER_VERIFICATION_LEVEL;
if (USER_VERIFICATION_LEVEL === a0) {
return intl.string(t.SLAkFX);
}
const CANNOT_UNARCHIVE_THREAD = EphemeralMessageReason.CANNOT_UNARCHIVE_THREAD;
if (CANNOT_UNARCHIVE_THREAD === a0) {
return intl.string(t.AIqS3n);
}
const CANNOT_JOIN_THREAD = EphemeralMessageReason.CANNOT_JOIN_THREAD;
if (CANNOT_JOIN_THREAD === a0) {
return intl.string(t.BqKxlT);
}
const MISSING_PERMISSIONS = EphemeralMessageReason.MISSING_PERMISSIONS;
if (MISSING_PERMISSIONS === a0) {
return intl.string(t.LLF2DJ);
}
const CANNOT_SEND_ATTACHMENTS = EphemeralMessageReason.CANNOT_SEND_ATTACHMENTS;
if (CANNOT_SEND_ATTACHMENTS === a0) {
return intl.string(t.Htl7W1);
}
const CANNOT_SEND_EMBEDS = EphemeralMessageReason.CANNOT_SEND_EMBEDS;
if (CANNOT_SEND_EMBEDS === a0) {
return intl.string(t.vGgPMH);
}
const CANNOT_SEND_STICKERS = EphemeralMessageReason.CANNOT_SEND_STICKERS;
if (CANNOT_SEND_STICKERS === a0) {
return intl.string(t.byrr7l);
}
const AUTOMOD_BLOCKED = EphemeralMessageReason.AUTOMOD_BLOCKED;
if (AUTOMOD_BLOCKED === a0) {
return intl.string(t['24PAJ+']);
}
const HARMFUL_LINK = EphemeralMessageReason.HARMFUL_LINK;
if (HARMFUL_LINK === a0) {
return intl.string(t.zeqgmP);
}
const CANNOT_USE_COMMAND = EphemeralMessageReason.CANNOT_USE_COMMAND;
if (CANNOT_USE_COMMAND === a0) {
return intl.string(t.kzMhhk);
}
const BETA_GUILD_SIZE = EphemeralMessageReason.BETA_GUILD_SIZE;
if (BETA_GUILD_SIZE === a0) {
return intl.string(t.Af3rGY);
}
const CANNOT_USE_EXTERNAL_APPS = EphemeralMessageReason.CANNOT_USE_EXTERNAL_APPS;
if (CANNOT_USE_EXTERNAL_APPS === a0) {
return intl.string(t.Ji4l7E);
}
return intl.string(t['v/OAcs']);
}
global.__d(_fun66352, 8332, [8333, 1244, 2]) /* metro module 8332, dependencies: [8333, 1244, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,4 +1,8 @@
/* Metro module 11693; source: modules/application_commands/ApplicationCommandValidationUtils.tsx; dependencies: [5066, 5068, 8051, 1244, 11694, 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 ApplicationCommandConstantsModule from './ApplicationCommandConstants.tsx'; /* Metro dependency 5066 */
function _fun89637(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11879:6, offset: 0x02017ecd, size: 163 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_89640 = function(a0, a1) {
@@ -44,147 +48,153 @@ function _fun89637(global, require, importDefault, importAll, module, exports, d
}
return value;
};
const closure = validateOptionContent;
const validateOptionContent2 = validateOptionContent;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(5066) /* metro dependency 5066: ApplicationCommandConstants */).getValidationErrorText;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/ApplicationCommandValidationUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/ApplicationCommandValidationUtils.tsx');
exports.getValidationResults = getValidationResults;
exports.validateOptionContent = closure;
}
function _createForOfIteratorHelperLoose_89638(a0, a1) { // fn#89638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11879:134, offset: 0x02017f70, 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)) {
exports.validateOptionContent = validateOptionContent2;
function _createForOfIteratorHelperLoose_89638(a0, a1) { // fn#89638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11879:134, offset: 0x02017f70, 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 _fun89639;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_89640(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 _fun89639;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_89640(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_89640(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_89640(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun89639;
}
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 validateOptionContent({option, content, guildId, channelId, allowEmptyValues, commandOrigin}) { // fn#89641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11879:1044, offset: 0x020180e4, size: 501 bytes, params: 2, frame: 26
var r3;
var r1;
var moduleValue;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r9 = commandOrigin !== undefined ? commandOrigin : (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).CommandOrigin.CHAT;
const value = '';
if (content != null) {
moduleValue = require(8051) /* metro dependency 8051: ApplicationCommandOptionUtils */;
r3 = moduleValue.getString({content: content}, 'content').trim();
} else {
r3 = value;
}
const required = option.required;
if (content == null) {
return required ? {success: false, error: intl.string(t.JZJQL2)} : {success: true};
}
if (value === r3) {
if (allowEmptyValues) {
r1 = {success: true};
} else {
object2 = {success: false};
if (required) {
object2.error = intl.string(t.JZJQL2);
r1 = object2;
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun89639;
}
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 _fun89639() { // fn#89639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11879:705, 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 validateOptionContent({option, content, guildId, channelId, allowEmptyValues, commandOrigin}) { // fn#89641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11879:1044, offset: 0x020180e4, size: 501 bytes, params: 2, frame: 26
var r3;
var r1;
var moduleValue;
var object;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const r9 = commandOrigin !== undefined ? commandOrigin : (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).CommandOrigin.CHAT;
const value = '';
if (content != null) {
moduleValue = require(8051) /* metro dependency 8051: ApplicationCommandOptionUtils */;
r3 = moduleValue.getString({content: content}, 'content').trim();
} else {
r3 = value;
}
const required = option.required;
if (content == null) {
return required ? {success: false, error: intl.string(t.JZJQL2)} : {success: true};
}
if (value === r3) {
if (allowEmptyValues) {
r1 = {success: true};
} else {
object2.error = getValidationErrorText(option);
r1 = object2;
object = {success: false};
if (required) {
object.error = intl.string(t.JZJQL2);
r1 = object;
} else {
object.error = getValidationErrorText(option);
r1 = object;
}
}
return r1;
}
return r1;
}
const value5 = (importDefault(11694) /* metro dependency 11694: ApplicationCommandValidators */)[option.type](content.length > 1 ? {type: 'text',
text: r3} : content[0], option, channelId, guildId, r9);
if (!(value5.success || value5.error != null)) {
value5.error = getValidationErrorText(option);
const value5 = (importDefault(11694) /* metro dependency 11694: ApplicationCommandValidators */)[option.type](content.length > 1 ? {type: 'text',
text: r3} : content[0], option, channelId, guildId, r9);
if (!(value5.success || value5.error != null)) {
value5.error = getValidationErrorText(option);
}
return value5;
}
return value5;
}
function getValidationResults({options}, a1, a2, a3, a4) { // fn#89642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11879:1717, offset: 0x020182d9, size: 129 bytes, params: 6, frame: 22
var r2;
var value4;
var name;
var property;
var value5;
const object2 = {};
if (options != null) {
var value2 = _createForOfIteratorHelperLoose_89638(options);
var value3 = value2();
var done = value3.done;
if (!done) {
r2 = value3;
reducibleLoop2: while (true) {
value4 = r2.value;
name = value4.name;
property = a1[name];
name = value4.name;
object2[name] = validateOptionContent({option: value4, content: property, guildId: a2, channelId: a3,
allowEmptyValues: a4});
value5 = value2();
done = value5.done;
if (done) {
break reducibleLoop2;
function getValidationResults({options}, a1, a2, a3, a4) { // fn#89642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11879:1717, offset: 0x020182d9, size: 129 bytes, params: 6, frame: 22
var r2;
var value4;
var name;
var property;
var value5;
const object = {};
if (options != null) {
var value2 = _createForOfIteratorHelperLoose_89638(options);
var value3 = value2();
var done = value3.done;
if (!done) {
r2 = value3;
reducibleLoop2: while (true) {
value4 = r2.value;
name = value4.name;
property = a1[name];
name = value4.name;
object[name] = validateOptionContent({option: value4, content: property, guildId: a2, channelId: a3,
allowEmptyValues: a4});
value5 = value2();
done = value5.done;
if (done) {
break reducibleLoop2;
}
r2 = value5;
continue reducibleLoop2;
}
r2 = value5;
continue reducibleLoop2;
}
}
return object;
}
return object2;
}
global.__d(_fun89637, 11693, [5066, 5068, 8051, 1244, 11694,
2]) /* metro module 11693, dependencies: [5066, 5068, 8051, 1244, 11694, 2] */;
@@ -1,26 +1,32 @@
/* Metro module 11694; source: modules/application_commands/ApplicationCommandValidators.tsx; dependencies: [1949, 4644, 1909, 8053, 44, 1244, 8051, 5065, 8054, 2] */
import Module00044 from '../../by-id/module-00044.js'; /* Metro dependency 44 */
import LocaleStore from '../user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */
import UploadAttachmentStore from '../../stores/UploadAttachmentStore.tsx'; /* Metro dependency 4644 */
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 ServerModule from '../../flow/Server.tsx'; /* Metro dependency 1909 */
import * as ApplicationCommandUtilsModule from './ApplicationCommandUtils.tsx'; /* Metro dependency 5065 */
import * as ApplicationCommandOptionUtilsModule from './ApplicationCommandOptionUtils.tsx'; /* Metro dependency 8051 */
function _fun89643(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11880:6, offset: 0x0201835a, size: 535 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const localeNumberFormat = function(a0) {
return a0.toLocaleString(require(dependencyMap[5]).intl.currentLocale, {useGrouping: false});
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const uploadAttachmentStore = importDefault(4644) /* metro dependency 4644: UploadAttachmentStore */;
object2 = {};
const ApplicationCommandOptionType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandOptionType;
object = {};
const ApplicationCommandOptionType = (ServerModule).ApplicationCommandOptionType;
const SUB_COMMAND = ApplicationCommandOptionType.SUB_COMMAND;
object2[SUB_COMMAND] = function() {
object[SUB_COMMAND] = function() {
return {success: false};
};
const SUB_COMMAND_GROUP = ApplicationCommandOptionType.SUB_COMMAND_GROUP;
object2[SUB_COMMAND_GROUP] = function() {
object[SUB_COMMAND_GROUP] = function() {
return {success: false};
};
const BOOLEAN = ApplicationCommandOptionType.BOOLEAN;
object2[BOOLEAN] = function(a0) {
object[BOOLEAN] = function(a0) {
if (a0.type !== 'text') {
return {success: false};
}
@@ -29,507 +35,508 @@ function _fun89643(global, require, importDefault, importAll, module, exports, d
return {success: value != null};
};
const STRING = ApplicationCommandOptionType.STRING;
object2[STRING] = _fun89649;
object[STRING] = _fun89649;
const INTEGER = ApplicationCommandOptionType.INTEGER;
object2[INTEGER] = _fun89650;
object[INTEGER] = _fun89650;
const NUMBER = ApplicationCommandOptionType.NUMBER;
object2[NUMBER] = _fun89651;
object[NUMBER] = _fun89651;
const USER = ApplicationCommandOptionType.USER;
object2[USER] = _fun89652;
object[USER] = _fun89652;
const CHANNEL = ApplicationCommandOptionType.CHANNEL;
object2[CHANNEL] = _fun89653;
object[CHANNEL] = _fun89653;
const ROLE = ApplicationCommandOptionType.ROLE;
object2[ROLE] = _fun89654;
object[ROLE] = _fun89654;
const MENTIONABLE = ApplicationCommandOptionType.MENTIONABLE;
object2[MENTIONABLE] = _fun89655;
object[MENTIONABLE] = _fun89655;
const ATTACHMENT = ApplicationCommandOptionType.ATTACHMENT;
object2[ATTACHMENT] = _fun89656;
object[ATTACHMENT] = _fun89656;
const isValidRoleMention = function(a0) {
return a0.type === 'roleMention' || a0.type === 'textMention' && a0.text === '@everyone';
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/ApplicationCommandValidators.tsx');
exports.default = object2;
}
function validateNumericOptionRange(a0, a1, a2, a3, a4) { // fn#89644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11880:4844, offset: 0x02018571, size: 361 bytes, params: 6, frame: 17
var maxValue;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
var object;
var localeNumberFormatBinding;
var object5;
var object6;
let minValue = a1.minValue;
if (minValue == null) {
if (a1.maxValue == null) {
return {success: true};
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/ApplicationCommandValidators.tsx');
exports.default = object;
function validateNumericOptionRange(a0, a1, a2, a3, a4) { // fn#89644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11880:4844, offset: 0x02018571, size: 361 bytes, params: 6, frame: 17
var maxValue;
const intl = (IndexNativeModule).intl;
var formatToPlainString;
var object2;
var localeNumberFormatBinding;
var object3;
var object4;
let minValue = a1.minValue;
if (minValue == null) {
if (a1.maxValue == null) {
return {success: true};
}
} else {
minValue = a1.minValue;
if (a0 < minValue) {
maxValue = a1.maxValue;
if (maxValue == null) {
if (a1.minValue != null) {
formatToPlainString = intl.formatToPlainString;
object3 = {};
object3.minimum = localeNumberFormat(a1.minValue);
return {success: false, error: Reflect.apply(formatToPlainString, intl, [a3, object3])};
}
if (a1.maxValue != null) {
formatToPlainString = intl.formatToPlainString;
object2 = {};
object2.maximum = localeNumberFormat(a1.maxValue);
return {success: false, error: Reflect.apply(formatToPlainString, intl, [a4, object2])};
}
return {success: true};
}
minValue = a1.minValue;
if (minValue != null) {
formatToPlainString = intl.formatToPlainString;
object4 = {};
localeNumberFormatBinding = localeNumberFormat;
object4.minimum = localeNumberFormatBinding(a1.minValue);
object4.maximum = localeNumberFormatBinding(a1.maxValue);
return {success: false, error: Reflect.apply(formatToPlainString, intl, [a2, object4])};
}
minValue = a1.minValue;
if (minValue != null) {
formatToPlainString = intl.formatToPlainString;
object3 = {};
object3.minimum = localeNumberFormat(a1.minValue);
return {success: false, error: Reflect.apply(formatToPlainString, intl, [a3, object3])};
}
maxValue = a1.maxValue;
if (maxValue != null) {
formatToPlainString = intl.formatToPlainString;
object2 = {};
object2.maximum = localeNumberFormat(a1.maxValue);
return {success: false, error: Reflect.apply(formatToPlainString, intl, [a4, object2])};
}
return {success: true};
}
if (a1.maxValue == null) {
return {success: true};
}
}
} else {
minValue = a1.minValue;
if (a0 < minValue) {
maxValue = a1.maxValue;
if (a0 > maxValue) {
maxValue = a1.maxValue;
if (maxValue == null) {
if (a1.minValue != null) {
formatToPlainString = intl.formatToPlainString;
object5 = {};
object5.minimum = localeNumberFormat(a1.minValue);
return {success: false, error: Reflect.apply(formatToPlainString, intl, [a3, object5])};
object3 = {};
object3.minimum = localeNumberFormat(a1.minValue);
return {success: false, error: Reflect.apply(formatToPlainString, intl, [a3, object3])};
}
if (a1.maxValue != null) {
formatToPlainString = intl.formatToPlainString;
object = {};
object.maximum = localeNumberFormat(a1.maxValue);
return {success: false, error: Reflect.apply(formatToPlainString, intl, [a4, object])};
object2 = {};
object2.maximum = localeNumberFormat(a1.maxValue);
return {success: false, error: Reflect.apply(formatToPlainString, intl, [a4, object2])};
}
return {success: true};
}
minValue = a1.minValue;
if (minValue != null) {
formatToPlainString = intl.formatToPlainString;
object6 = {};
object4 = {};
localeNumberFormatBinding = localeNumberFormat;
object6.minimum = localeNumberFormatBinding(a1.minValue);
object6.maximum = localeNumberFormatBinding(a1.maxValue);
return {success: false, error: Reflect.apply(formatToPlainString, intl, [a2, object6])};
object4.minimum = localeNumberFormatBinding(a1.minValue);
object4.maximum = localeNumberFormatBinding(a1.maxValue);
return {success: false, error: Reflect.apply(formatToPlainString, intl, [a2, object4])};
}
minValue = a1.minValue;
if (minValue != null) {
formatToPlainString = intl.formatToPlainString;
object5 = {};
object5.minimum = localeNumberFormat(a1.minValue);
return {success: false, error: Reflect.apply(formatToPlainString, intl, [a3, object5])};
object3 = {};
object3.minimum = localeNumberFormat(a1.minValue);
return {success: false, error: Reflect.apply(formatToPlainString, intl, [a3, object3])};
}
maxValue = a1.maxValue;
if (maxValue != null) {
formatToPlainString = intl.formatToPlainString;
object = {};
object.maximum = localeNumberFormat(a1.maxValue);
return {success: false, error: Reflect.apply(formatToPlainString, intl, [a4, object])};
object2 = {};
object2.maximum = localeNumberFormat(a1.maxValue);
return {success: false, error: Reflect.apply(formatToPlainString, intl, [a4, object2])};
}
return {success: true};
}
if (a1.maxValue == null) {
return {success: true};
}
return {success: true};
}
maxValue = a1.maxValue;
if (a0 > maxValue) {
maxValue = a1.maxValue;
if (maxValue == null) {
if (a1.minValue != null) {
formatToPlainString = intl.formatToPlainString;
object5 = {};
object5.minimum = localeNumberFormat(a1.minValue);
return {success: false, error: Reflect.apply(formatToPlainString, intl, [a3, object5])};
}
if (a1.maxValue != null) {
formatToPlainString = intl.formatToPlainString;
object = {};
object.maximum = localeNumberFormat(a1.maxValue);
return {success: false, error: Reflect.apply(formatToPlainString, intl, [a4, object])};
}
return {success: true};
}
minValue = a1.minValue;
if (minValue != null) {
formatToPlainString = intl.formatToPlainString;
object6 = {};
localeNumberFormatBinding = localeNumberFormat;
object6.minimum = localeNumberFormatBinding(a1.minValue);
object6.maximum = localeNumberFormatBinding(a1.maxValue);
return {success: false, error: Reflect.apply(formatToPlainString, intl, [a2, object6])};
}
minValue = a1.minValue;
if (minValue != null) {
formatToPlainString = intl.formatToPlainString;
object5 = {};
object5.minimum = localeNumberFormat(a1.minValue);
return {success: false, error: Reflect.apply(formatToPlainString, intl, [a3, object5])};
}
maxValue = a1.maxValue;
if (maxValue != null) {
formatToPlainString = intl.formatToPlainString;
object = {};
object.maximum = localeNumberFormat(a1.maxValue);
return {success: false, error: Reflect.apply(formatToPlainString, intl, [a4, object])};
}
}
return {success: true};
}
function _fun89649(a0, a1, a2) { // fn#89649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11880:475, offset: 0x02018780, size: 934 bytes, params: 4, frame: 25
var r5;
var object2;
var moduleValue;
var maxLength;
var length;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
var maxErrorMessage;
var localeNumberFormatBinding;
var minErrorMessage;
var rangeErrorMessage;
var exactRangeErrorMessage;
var value;
const defaultImport = importDefault(44) /* metro dependency 44 */;
let type = a1.type;
const ApplicationCommandOptionType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandOptionType;
const STRING = ApplicationCommandOptionType.STRING;
defaultImport(type === STRING, 'option type must match validator type');
type = a0.type;
if (type === 'emoji') {
r5 = a0.surrogate;
} else {
if (type !== 'text') {
function _fun89649(a0, a1, a2) { // fn#89649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11880:475, offset: 0x02018780, size: 934 bytes, params: 4, frame: 25
var r5;
var object;
var moduleValue;
var maxLength;
var length;
const intl = (IndexNativeModule).intl;
var formatToPlainString;
var maxErrorMessage;
var localeNumberFormatBinding;
var minErrorMessage;
var rangeErrorMessage;
var exactRangeErrorMessage;
var value;
const defaultImport = Module00044;
let type = a1.type;
const ApplicationCommandOptionType = (ServerModule).ApplicationCommandOptionType;
const STRING = ApplicationCommandOptionType.STRING;
defaultImport(type === STRING, 'option type must match validator type');
type = a0.type;
if (type === 'emoji') {
r5 = a0.surrogate;
} else {
if (type !== 'text') {
return {success: false};
}
r5 = a0.text.trim();
}
if (a1.choices != null) {
value = require(8053) /* metro dependency 8053: ApplicationCommandChoiceUtils */;
return {success: value.findChoiceStringValue(a1.choices, r5) != null};
}
if (a1.autocomplete) {
moduleValue = require(8053) /* metro dependency 8053: ApplicationCommandChoiceUtils */;
reducibleJoin8: while (true) {
if (moduleValue.findAutocompleteChoiceStringValue(a2, a1.name, r5) != null) {
return {success: true};
}
break reducibleJoin8;
}
}
let minLength = a1.minLength;
if (minLength === undefined) {
maxLength = a1.maxLength;
reducibleJoin10: while (true) {
if (maxLength === undefined) {
return {success: true};
}
break reducibleJoin10;
}
}
if (r5 == null) {
return {success: false};
}
r5 = a0.text.trim();
}
if (a1.choices != null) {
value = require(8053) /* metro dependency 8053: ApplicationCommandChoiceUtils */;
return {success: value.findChoiceStringValue(a1.choices, r5) != null};
}
if (a1.autocomplete) {
moduleValue = require(8053) /* metro dependency 8053: ApplicationCommandChoiceUtils */;
reducibleJoin8: while (true) {
if (moduleValue.findAutocompleteChoiceStringValue(a2, a1.name, r5) != null) {
return {success: true};
}
break reducibleJoin8;
}
}
let minLength = a1.minLength;
if (minLength === undefined) {
maxLength = a1.maxLength;
reducibleJoin10: while (true) {
if (maxLength === undefined) {
return {success: true};
}
break reducibleJoin10;
}
}
if (r5 == null) {
return {success: false};
}
let object3 = {};
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object3.exactRangeErrorMessage = t['e+9/SY'];
const IE1sTh = t.IE1sTh;
object3.rangeErrorMessage = IE1sTh;
object3.minErrorMessage = t.rXAFQD;
object3.maxErrorMessage = t['ycEPx/'];
minLength = a1.minLength;
reducibleJoin27: while (true) {
reducibleJoin22: while (true) {
if (minLength === undefined) {
maxLength = a1.maxLength;
if (maxLength === undefined) {
break reducibleJoin22;
}
length = r5.length;
maxLength = a1.maxLength;
if (length > maxLength) {
let object4 = {};
const t = (IndexNativeModule).t;
object4.exactRangeErrorMessage = t['e+9/SY'];
const IE1sTh = t.IE1sTh;
object4.rangeErrorMessage = IE1sTh;
object4.minErrorMessage = t.rXAFQD;
object4.maxErrorMessage = t['ycEPx/'];
minLength = a1.minLength;
reducibleJoin27: while (true) {
reducibleJoin22: while (true) {
if (minLength === undefined) {
maxLength = a1.maxLength;
if (maxLength !== undefined) {
if (a1.minLength !== undefined) {
if (a1.minLength === a1.maxLength) {
if (maxLength === undefined) {
break reducibleJoin22;
}
length = r5.length;
maxLength = a1.maxLength;
if (length > maxLength) {
maxLength = a1.maxLength;
if (maxLength !== undefined) {
if (a1.minLength !== undefined) {
if (a1.minLength === a1.maxLength) {
formatToPlainString = intl.formatToPlainString;
exactRangeErrorMessage = object4.exactRangeErrorMessage;
object4 = {};
object4.value = localeNumberFormat(a1.minLength);
object = {success: false, error: Reflect.apply(formatToPlainString, intl,
[exactRangeErrorMessage,
object4])};
break reducibleJoin27;
}
}
}
maxLength = a1.maxLength;
if (maxLength !== undefined) {
if (a1.minLength !== undefined) {
formatToPlainString = intl.formatToPlainString;
exactRangeErrorMessage = object3.exactRangeErrorMessage;
object3 = {};
object3.value = localeNumberFormat(a1.minLength);
object2 = {success: false, error: Reflect.apply(formatToPlainString, intl,
[exactRangeErrorMessage,
object3])};
rangeErrorMessage = object4.rangeErrorMessage;
object4 = {};
localeNumberFormatBinding = localeNumberFormat;
object4.minimum = localeNumberFormatBinding(a1.minLength);
object4.maximum = localeNumberFormatBinding(a1.maxLength);
object = {success: false, error: Reflect.apply(formatToPlainString, intl,
[rangeErrorMessage,
object4])};
break reducibleJoin27;
}
}
}
maxLength = a1.maxLength;
if (maxLength !== undefined) {
if (a1.minLength !== undefined) {
formatToPlainString = intl.formatToPlainString;
rangeErrorMessage = object3.rangeErrorMessage;
object3 = {};
localeNumberFormatBinding = localeNumberFormat;
object3.minimum = localeNumberFormatBinding(a1.minLength);
object3.maximum = localeNumberFormatBinding(a1.maxLength);
object2 = {success: false, error: Reflect.apply(formatToPlainString, intl,
[rangeErrorMessage,
object3])};
minErrorMessage = object4.minErrorMessage;
object4 = {};
object4.minimum = localeNumberFormat(a1.minLength);
object = {success: false, error: Reflect.apply(formatToPlainString, intl, [minErrorMessage,
object4])};
break reducibleJoin27;
}
maxLength = a1.maxLength;
if (maxLength !== undefined) {
formatToPlainString = intl.formatToPlainString;
maxErrorMessage = object4.maxErrorMessage;
object4 = {};
object4.maximum = localeNumberFormat(a1.maxLength);
object = {success: false, error: Reflect.apply(formatToPlainString, intl, [maxErrorMessage,
object4])};
break reducibleJoin27;
}
break reducibleJoin22;
}
if (a1.minLength !== undefined) {
formatToPlainString = intl.formatToPlainString;
minErrorMessage = object3.minErrorMessage;
object3 = {};
object3.minimum = localeNumberFormat(a1.minLength);
object2 = {success: false, error: Reflect.apply(formatToPlainString, intl, [minErrorMessage,
object3])};
break reducibleJoin27;
}
maxLength = a1.maxLength;
if (maxLength !== undefined) {
formatToPlainString = intl.formatToPlainString;
maxErrorMessage = object3.maxErrorMessage;
object3 = {};
object3.maximum = localeNumberFormat(a1.maxLength);
object2 = {success: false, error: Reflect.apply(formatToPlainString, intl, [maxErrorMessage,
object3])};
break reducibleJoin27;
}
break reducibleJoin22;
}
break reducibleJoin22;
}
length = r5.length;
minLength = a1.minLength;
if (!(length < minLength)) {
if (a1.maxLength === undefined) {
break reducibleJoin22;
}
length = r5.length;
if (!(length > a1.maxLength)) {
break reducibleJoin22;
minLength = a1.minLength;
if (!(length < minLength)) {
if (a1.maxLength === undefined) {
break reducibleJoin22;
}
length = r5.length;
if (!(length > a1.maxLength)) {
break reducibleJoin22;
}
}
}
maxLength = a1.maxLength;
if (maxLength !== undefined) {
if (a1.minLength !== undefined) {
if (a1.minLength === a1.maxLength) {
maxLength = a1.maxLength;
if (maxLength !== undefined) {
if (a1.minLength !== undefined) {
if (a1.minLength === a1.maxLength) {
formatToPlainString = intl.formatToPlainString;
exactRangeErrorMessage = object4.exactRangeErrorMessage;
object4 = {};
object4.value = localeNumberFormat(a1.minLength);
object = {success: false, error: Reflect.apply(formatToPlainString, intl,
[exactRangeErrorMessage,
object4])};
break reducibleJoin27;
}
}
}
maxLength = a1.maxLength;
if (maxLength !== undefined) {
if (a1.minLength !== undefined) {
formatToPlainString = intl.formatToPlainString;
exactRangeErrorMessage = object3.exactRangeErrorMessage;
object3 = {};
object3.value = localeNumberFormat(a1.minLength);
object2 = {success: false, error: Reflect.apply(formatToPlainString, intl,
[exactRangeErrorMessage,
object3])};
rangeErrorMessage = object4.rangeErrorMessage;
object4 = {};
localeNumberFormatBinding = localeNumberFormat;
object4.minimum = localeNumberFormatBinding(a1.minLength);
object4.maximum = localeNumberFormatBinding(a1.maxLength);
object = {success: false, error: Reflect.apply(formatToPlainString, intl, [rangeErrorMessage,
object4])};
break reducibleJoin27;
}
}
}
maxLength = a1.maxLength;
if (maxLength !== undefined) {
if (a1.minLength !== undefined) {
minLength = a1.minLength;
if (minLength !== undefined) {
formatToPlainString = intl.formatToPlainString;
rangeErrorMessage = object3.rangeErrorMessage;
object3 = {};
minErrorMessage = object4.minErrorMessage;
object4 = {};
localeNumberFormatBinding = localeNumberFormat;
object3.minimum = localeNumberFormatBinding(a1.minLength);
object3.maximum = localeNumberFormatBinding(a1.maxLength);
object2 = {success: false, error: Reflect.apply(formatToPlainString, intl, [rangeErrorMessage,
object3])};
minLength = a1.minLength;
object4.minimum = localeNumberFormatBinding(minLength);
object = {success: false, error: Reflect.apply(formatToPlainString, intl, [minErrorMessage, object4])};
break reducibleJoin27;
}
}
minLength = a1.minLength;
if (minLength !== undefined) {
formatToPlainString = intl.formatToPlainString;
minErrorMessage = object3.minErrorMessage;
object3 = {};
localeNumberFormatBinding = localeNumberFormat;
minLength = a1.minLength;
object3.minimum = localeNumberFormatBinding(minLength);
object2 = {success: false, error: Reflect.apply(formatToPlainString, intl, [minErrorMessage, object3])};
break reducibleJoin27;
}
maxLength = a1.maxLength;
if (maxLength !== undefined) {
formatToPlainString = intl.formatToPlainString;
maxErrorMessage = object3.maxErrorMessage;
object3 = {};
localeNumberFormatBinding = localeNumberFormat;
maxLength = a1.maxLength;
object3.maximum = localeNumberFormatBinding(maxLength);
object2 = {success: false, error: Reflect.apply(formatToPlainString, intl, [maxErrorMessage, object3])};
break reducibleJoin27;
if (maxLength !== undefined) {
formatToPlainString = intl.formatToPlainString;
maxErrorMessage = object4.maxErrorMessage;
object4 = {};
localeNumberFormatBinding = localeNumberFormat;
maxLength = a1.maxLength;
object4.maximum = localeNumberFormatBinding(maxLength);
object = {success: false, error: Reflect.apply(formatToPlainString, intl, [maxErrorMessage, object4])};
break reducibleJoin27;
}
break reducibleJoin22;
}
break reducibleJoin22;
object = {success: true};
break reducibleJoin27;
}
object2 = {success: true};
break reducibleJoin27;
}
if (object2.success) {
return {success: true};
}
return object2;
}
function _fun89650(a0, a1, a2) { // fn#89650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11880:2061, offset: 0x02018b26, size: 498 bytes, params: 4, frame: 24
var moduleValue;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value;
const defaultImport = importDefault(44) /* metro dependency 44 */;
let type = a1.type;
const ApplicationCommandOptionType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandOptionType;
const INTEGER = ApplicationCommandOptionType.INTEGER;
defaultImport(type === INTEGER, 'option type must match validator type');
type = a0.type;
const value2 = null;
const r5 = type !== 'text' ? value2 : a0.text.trim();
if (value2 == r5) {
return {success: false};
}
if (r5.length === 0) {
return {success: false};
}
if (value2 != a1.choices) {
value = require(8053) /* metro dependency 8053: ApplicationCommandChoiceUtils */;
return {success: value2 != value.findChoiceNumberValue(a1.choices, r5)};
}
if (a1.autocomplete) {
moduleValue = require(8053) /* metro dependency 8053: ApplicationCommandChoiceUtils */;
if (value2 != moduleValue.findAutocompleteChoiceNumberValue(a2, a1.name, r5)) {
if (object.success) {
return {success: true};
}
return object;
}
const Number = global.Number;
const moduleValue2 = importAll(8051) /* metro dependency 8051: ApplicationCommandOptionUtils */;
const value4 = Number(moduleValue2.normalizeNumericString(LocaleStore.locale, r5));
return value2 == value4 || global.isNaN(value4) ? {success: false} : global.Number.isInteger(value4) && global.Number.isSafeInteger(value4) ? validateNumericOptionRange(value4,
a1, t['8Y5zsp'], t.CyRLmH, t['VD3Q+S']) : {success: false};
}
function _fun89651(a0, a1, a2) { // fn#89651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11880:2719, offset: 0x02018d18, size: 480 bytes, params: 4, frame: 24
var moduleValue;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value;
const defaultImport = importDefault(44) /* metro dependency 44 */;
let type = a1.type;
const ApplicationCommandOptionType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandOptionType;
const NUMBER = ApplicationCommandOptionType.NUMBER;
defaultImport(type === NUMBER, 'option type must match validator type');
type = a0.type;
const value2 = null;
const r5 = type !== 'text' ? value2 : a0.text.trim();
if (value2 == r5) {
return {success: false};
}
if (r5.length === 0) {
return {success: false};
}
if (value2 != a1.choices) {
value = require(8053) /* metro dependency 8053: ApplicationCommandChoiceUtils */;
return {success: value2 != value.findChoiceNumberValue(a1.choices, r5)};
}
if (a1.autocomplete) {
moduleValue = require(8053) /* metro dependency 8053: ApplicationCommandChoiceUtils */;
if (value2 != moduleValue.findAutocompleteChoiceNumberValue(a2, a1.name, r5)) {
return {success: true};
function _fun89650(a0, a1, a2) { // fn#89650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11880:2061, offset: 0x02018b26, size: 498 bytes, params: 4, frame: 24
var moduleValue;
const t = (IndexNativeModule).t;
var value;
const defaultImport = Module00044;
let type = a1.type;
const ApplicationCommandOptionType = (ServerModule).ApplicationCommandOptionType;
const INTEGER = ApplicationCommandOptionType.INTEGER;
defaultImport(type === INTEGER, 'option type must match validator type');
type = a0.type;
const value2 = null;
const r5 = type !== 'text' ? value2 : a0.text.trim();
if (value2 == r5) {
return {success: false};
}
}
const Number = global.Number;
const moduleValue2 = importAll(8051) /* metro dependency 8051: ApplicationCommandOptionUtils */;
const value4 = Number(moduleValue2.normalizeNumericString(LocaleStore.locale, r5));
return global.isNaN(value4) || value4 > global.Number.MAX_SAFE_INTEGER || value4 < global.Number.MIN_SAFE_INTEGER ? {success: false} : validateNumericOptionRange(value4,
a1, t['8Y5zsp'], t.CyRLmH, t['VD3Q+S']);
}
function _fun89652(a0, a1, a2, a3) { // fn#89652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11880:3372, offset: 0x02018ef8, size: 186 bytes, params: 5, frame: 18
var value;
var value2;
var moduleValue;
var isSnowflake;
var text;
var resolveApplicationCommandOption;
if (a0.type === 'text') {
value2 = undefined;
moduleValue = require(5065) /* metro dependency 5065: ApplicationCommandUtils */;
isSnowflake = moduleValue.isSnowflake;
text = a0.text;
if (Reflect.apply(isSnowflake, moduleValue, [text])) {
return {success: true};
if (r5.length === 0) {
return {success: false};
}
value = require(8054) /* metro dependency 8054: PlaintextResolvers */;
resolveApplicationCommandOption = value.resolveApplicationCommandOption;
text = a0.text;
value = Reflect.apply(resolveApplicationCommandOption, value, [text, a3, a2, {allowRoles: false}]);
return {success: (value == null ? value2 : value.type) === 'userMention'};
}
return {success: a0.type === 'userMention'};
}
function _fun89653(a0, a1, a2, a3) { // fn#89653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11880:3671, offset: 0x02018fb2, size: 170 bytes, params: 5, frame: 16
var value;
var value2;
var moduleValue;
var isSnowflake;
var text;
var resolveApplicationCommandOption;
if (a0.type === 'text') {
value2 = undefined;
moduleValue = require(5065) /* metro dependency 5065: ApplicationCommandUtils */;
isSnowflake = moduleValue.isSnowflake;
text = a0.text;
if (Reflect.apply(isSnowflake, moduleValue, [text])) {
return {success: true};
if (value2 != a1.choices) {
value = require(8053) /* metro dependency 8053: ApplicationCommandChoiceUtils */;
return {success: value2 != value.findChoiceNumberValue(a1.choices, r5)};
}
value = require(8054) /* metro dependency 8054: PlaintextResolvers */;
resolveApplicationCommandOption = value.resolveApplicationCommandOption;
text = a0.text;
value = Reflect.apply(resolveApplicationCommandOption, value, [text, a3, a2]);
return {success: (value == null ? value2 : value.type) === 'channelMention'};
}
return {success: a0.type === 'channelMention'};
}
function _fun89654(a0, a1, a2, a3) { // fn#89654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11880:3957, offset: 0x0201905c, size: 183 bytes, params: 5, frame: 18
var value;
var value2;
var moduleValue;
var isSnowflake;
var text;
var resolveApplicationCommandOption;
if (a0.type === 'text') {
value2 = undefined;
moduleValue = require(5065) /* metro dependency 5065: ApplicationCommandUtils */;
isSnowflake = moduleValue.isSnowflake;
text = a0.text;
if (Reflect.apply(isSnowflake, moduleValue, [text])) {
return {success: true};
if (a1.autocomplete) {
moduleValue = require(8053) /* metro dependency 8053: ApplicationCommandChoiceUtils */;
if (value2 != moduleValue.findAutocompleteChoiceNumberValue(a2, a1.name, r5)) {
return {success: true};
}
}
value = require(8054) /* metro dependency 8054: PlaintextResolvers */;
resolveApplicationCommandOption = value.resolveApplicationCommandOption;
text = a0.text;
value = Reflect.apply(resolveApplicationCommandOption, value, [text, a3, a2, {allowUsers: false}]);
return {success: (value == null ? value2 : value.type) === 'roleMention'};
const Number = global.Number;
const value4 = Number(ApplicationCommandOptionUtilsModule.normalizeNumericString(LocaleStore.locale, r5));
return value2 == value4 || global.isNaN(value4) ? {success: false} : global.Number.isInteger(value4) && global.Number.isSafeInteger(value4) ? validateNumericOptionRange(value4,
a1, t['8Y5zsp'], t.CyRLmH, t['VD3Q+S']) : {success: false};
}
const object2 = {};
object2.success = isValidRoleMention(a0);
return object2;
}
function _fun89655(a0, a1, a2, a3) { // fn#89655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11880:4259, offset: 0x02019113, size: 204 bytes, params: 5, frame: 17
var moduleValue;
var isSnowflake;
var text;
var moduleValue2;
var resolveApplicationCommandOption;
var applicationCommandOption;
if (a0.type === 'text') {
moduleValue = require(5065) /* metro dependency 5065: ApplicationCommandUtils */;
isSnowflake = moduleValue.isSnowflake;
text = a0.text;
if (Reflect.apply(isSnowflake, moduleValue, [text])) {
return {success: true};
function _fun89651(a0, a1, a2) { // fn#89651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11880:2719, offset: 0x02018d18, size: 480 bytes, params: 4, frame: 24
var moduleValue;
const t = (IndexNativeModule).t;
var value;
const defaultImport = Module00044;
let type = a1.type;
const ApplicationCommandOptionType = (ServerModule).ApplicationCommandOptionType;
const NUMBER = ApplicationCommandOptionType.NUMBER;
defaultImport(type === NUMBER, 'option type must match validator type');
type = a0.type;
const value2 = null;
const r5 = type !== 'text' ? value2 : a0.text.trim();
if (value2 == r5) {
return {success: false};
}
moduleValue2 = require(8054) /* metro dependency 8054: PlaintextResolvers */;
resolveApplicationCommandOption = moduleValue2.resolveApplicationCommandOption;
text = a0.text;
applicationCommandOption = Reflect.apply(resolveApplicationCommandOption, moduleValue2, [text, a3, a2]);
return {success: applicationCommandOption != null && (applicationCommandOption.type === 'userMention' || isValidRoleMention(applicationCommandOption))};
if (r5.length === 0) {
return {success: false};
}
if (value2 != a1.choices) {
value = require(8053) /* metro dependency 8053: ApplicationCommandChoiceUtils */;
return {success: value2 != value.findChoiceNumberValue(a1.choices, r5)};
}
if (a1.autocomplete) {
moduleValue = require(8053) /* metro dependency 8053: ApplicationCommandChoiceUtils */;
if (value2 != moduleValue.findAutocompleteChoiceNumberValue(a2, a1.name, r5)) {
return {success: true};
}
}
const Number = global.Number;
const value4 = Number(ApplicationCommandOptionUtilsModule.normalizeNumericString(LocaleStore.locale, r5));
return global.isNaN(value4) || value4 > global.Number.MAX_SAFE_INTEGER || value4 < global.Number.MIN_SAFE_INTEGER ? {success: false} : validateNumericOptionRange(value4,
a1, t['8Y5zsp'], t.CyRLmH, t['VD3Q+S']);
}
return {success: a0.type === 'userMention' || isValidRoleMention(a0)};
}
function _fun89656(a0, {name}, a2, a3, a4) { // fn#89656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11880:4585, offset: 0x020191df, size: 127 bytes, params: 6, frame: 17
if (a0.type !== 'text') {
return {success: false};
}
const getUpload = UploadAttachmentStore.getUpload;
let value = require(5065) /* metro dependency 5065: ApplicationCommandUtils */;
value = value.getCommandAttachmentDraftType(a4);
value = Reflect.apply(getUpload, UploadAttachmentStore, [a2, name, value]);
return {success: value != null && value.filename === a0.text};
function _fun89652(a0, a1, a2, a3) { // fn#89652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11880:3372, offset: 0x02018ef8, size: 186 bytes, params: 5, frame: 18
var value;
var value2;
var moduleValue;
var isSnowflake;
var text;
var resolveApplicationCommandOption;
if (a0.type === 'text') {
value2 = undefined;
moduleValue = require(5065) /* metro dependency 5065: ApplicationCommandUtils */;
isSnowflake = moduleValue.isSnowflake;
text = a0.text;
if (Reflect.apply(isSnowflake, moduleValue, [text])) {
return {success: true};
}
value = require(8054) /* metro dependency 8054: PlaintextResolvers */;
resolveApplicationCommandOption = value.resolveApplicationCommandOption;
text = a0.text;
value = Reflect.apply(resolveApplicationCommandOption, value, [text, a3, a2, {allowRoles: false}]);
return {success: (value == null ? value2 : value.type) === 'userMention'};
}
return {success: a0.type === 'userMention'};
}
function _fun89653(a0, a1, a2, a3) { // fn#89653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11880:3671, offset: 0x02018fb2, size: 170 bytes, params: 5, frame: 16
var value;
var value2;
var moduleValue;
var isSnowflake;
var text;
var resolveApplicationCommandOption;
if (a0.type === 'text') {
value2 = undefined;
moduleValue = require(5065) /* metro dependency 5065: ApplicationCommandUtils */;
isSnowflake = moduleValue.isSnowflake;
text = a0.text;
if (Reflect.apply(isSnowflake, moduleValue, [text])) {
return {success: true};
}
value = require(8054) /* metro dependency 8054: PlaintextResolvers */;
resolveApplicationCommandOption = value.resolveApplicationCommandOption;
text = a0.text;
value = Reflect.apply(resolveApplicationCommandOption, value, [text, a3, a2]);
return {success: (value == null ? value2 : value.type) === 'channelMention'};
}
return {success: a0.type === 'channelMention'};
}
function _fun89654(a0, a1, a2, a3) { // fn#89654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11880:3957, offset: 0x0201905c, size: 183 bytes, params: 5, frame: 18
var value;
var value2;
var moduleValue;
var isSnowflake;
var text;
var resolveApplicationCommandOption;
if (a0.type === 'text') {
value2 = undefined;
moduleValue = require(5065) /* metro dependency 5065: ApplicationCommandUtils */;
isSnowflake = moduleValue.isSnowflake;
text = a0.text;
if (Reflect.apply(isSnowflake, moduleValue, [text])) {
return {success: true};
}
value = require(8054) /* metro dependency 8054: PlaintextResolvers */;
resolveApplicationCommandOption = value.resolveApplicationCommandOption;
text = a0.text;
value = Reflect.apply(resolveApplicationCommandOption, value, [text, a3, a2, {allowUsers: false}]);
return {success: (value == null ? value2 : value.type) === 'roleMention'};
}
const object = {};
object.success = isValidRoleMention(a0);
return object;
}
function _fun89655(a0, a1, a2, a3) { // fn#89655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11880:4259, offset: 0x02019113, size: 204 bytes, params: 5, frame: 17
var moduleValue;
var isSnowflake;
var text;
var moduleValue2;
var resolveApplicationCommandOption;
var applicationCommandOption;
if (a0.type === 'text') {
moduleValue = require(5065) /* metro dependency 5065: ApplicationCommandUtils */;
isSnowflake = moduleValue.isSnowflake;
text = a0.text;
if (Reflect.apply(isSnowflake, moduleValue, [text])) {
return {success: true};
}
moduleValue2 = require(8054) /* metro dependency 8054: PlaintextResolvers */;
resolveApplicationCommandOption = moduleValue2.resolveApplicationCommandOption;
text = a0.text;
applicationCommandOption = Reflect.apply(resolveApplicationCommandOption, moduleValue2, [text, a3, a2]);
return {success: applicationCommandOption != null && (applicationCommandOption.type === 'userMention' || isValidRoleMention(applicationCommandOption))};
}
return {success: a0.type === 'userMention' || isValidRoleMention(a0)};
}
function _fun89656(a0, {name}, a2, a3, a4) { // fn#89656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11880:4585, offset: 0x020191df, size: 127 bytes, params: 6, frame: 17
if (a0.type !== 'text') {
return {success: false};
}
const uploadAttachmentStoreBinding = UploadAttachmentStore;
const getUpload = uploadAttachmentStoreBinding.getUpload;
let value = ApplicationCommandUtilsModule;
value = value.getCommandAttachmentDraftType(a4);
value = Reflect.apply(getUpload, uploadAttachmentStoreBinding, [a2, name, value]);
return {success: value != null && value.filename === a0.text};
}
}
global.__d(_fun89643, 11694, [1949, 4644, 1909, 8053, 44, 1244, 8051, 5065, 8054,
2]) /* metro module 11694, dependencies: [1949, 4644, 1909, 8053, 44, 1244, 8051, 5065, 8054, 2] */;
@@ -1,4 +1,17 @@
/* Metro module 7866; source: modules/application_commands/CommandPermissionContext.tsx; dependencies: [31, 1937, 1383, 1226, 1379, 1945, 3784, 1878, 661, 7867, 566, 483, 1909, 2] */
import AuthenticationStore from '../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import ImpersonateStore from '../impersonate/ImpersonateStore.tsx'; /* Metro dependency 1937 */
import GuildMemberStore from '../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import PermissionStore from '../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
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 ChannelRecordModule from '../../records/ChannelRecord.tsx'; /* Metro dependency 1383 */
import * as ServerModule from '../../flow/Server.tsx'; /* Metro dependency 1909 */
import * as AgeRestrictedContentSettingsUtilsModule from '../user_settings/content_and_social/AgeRestrictedContentSettingsUtils.tsx'; /* Metro dependency 7867 */
function _fun62959(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#62959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8044:6, offset: 0x01b6d121, size: 324 bytes, params: 8, frame: 21
const env0_0 = require;
const computeAllowNsfw = function(a0, a1, a2) {
@@ -9,183 +22,171 @@ function _fun62959(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 impersonateStore = importDefault(1937) /* metro dependency 1937: ImpersonateStore */;
const env0_5 = (require(1383) /* metro dependency 1383: ChannelRecord */).ChannelRecordBase;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_11 = constantsModule.ChannelTypes;
const env0_12 = constantsModule.Permissions;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/CommandPermissionContext.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/CommandPermissionContext.tsx');
exports.buildPermissionContext = buildPermissionContext;
exports.usePermissionContext = usePermissionContext;
exports.computeCommandContextType = computeCommandContextType;
exports.getContextGuildId = closure;
}
function computePermissions_62961(a0, a1) { // fn#62961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8044:330, offset: 0x01b6d2a1, size: 350 bytes, params: 3, frame: 20
var r5;
var r2;
var r3;
var permissions;
var moduleValue;
var has;
var value2;
var value4;
var value5;
var moduleValue3;
var moduleValue4;
var object2;
if (a0 instanceof ChannelRecordBase) {
if (a0.isPrivate()) {
object2 = {'computedPermissions': null, 'hasBaseAccessPermissions': true,
'hasSendMessagesPermission': true};
object2.computedPermissions = (importAll(483) /* metro dependency 483: BigFlagUtils */).deserialize(0);
return object2;
}
if (a0 == null) {
object2 = {'computedPermissions': null, 'hasBaseAccessPermissions': true,
'hasSendMessagesPermission': true};
object2.computedPermissions = (importAll(483) /* metro dependency 483: BigFlagUtils */).deserialize(0);
return object2;
}
permissions = PermissionStore.computePermissions(a0);
value2 = (importAll(483) /* metro dependency 483: BigFlagUtils */).has(permissions, Permissions.ADMINISTRATOR);
} else {
if (a0 == null) {
object2 = {'computedPermissions': null, 'hasBaseAccessPermissions': true,
'hasSendMessagesPermission': true};
object2.computedPermissions = (importAll(483) /* metro dependency 483: BigFlagUtils */).deserialize(0);
return object2;
}
permissions = PermissionStore.computePermissions(a0);
moduleValue = importAll(483) /* metro dependency 483: BigFlagUtils */;
value2 = moduleValue.has(permissions, Permissions.ADMINISTRATOR);
}
const value3 = true;
if (value2) {
r2 = value3;
r3 = value3;
} else {
value4 = a0 instanceof ChannelRecordBase;
value5 = (importAll(483) /* metro dependency 483: BigFlagUtils */).has(permissions, Permissions.VIEW_CHANNEL);
if (value4) {
if (value5) {
moduleValue3 = importAll(483) /* metro dependency 483: BigFlagUtils */;
r5 = moduleValue3.has(permissions, Permissions.USE_APPLICATION_COMMANDS);
} else {
r5 = value5;
function computePermissions_62961(a0, a1) { // fn#62961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8044:330, offset: 0x01b6d2a1, size: 350 bytes, params: 3, frame: 20
var r5;
var r2;
var r3;
var permissions;
var moduleValue;
var has;
var value2;
var value4;
var value5;
var moduleValue3;
var moduleValue4;
var object;
if (a0 instanceof ChannelRecordBase) {
if (a0.isPrivate()) {
object = {'computedPermissions': null, 'hasBaseAccessPermissions': true, 'hasSendMessagesPermission': true};
object.computedPermissions = (importAll(483) /* metro dependency 483: BigFlagUtils */).deserialize(0);
return object;
}
moduleValue4 = importAll(483) /* metro dependency 483: BigFlagUtils */;
has = moduleValue4.has;
r2 = a1 ? Reflect.apply(has, moduleValue4, [permissions,
Permissions.SEND_MESSAGES_IN_THREADS]) : Reflect.apply(has,
moduleValue4, [permissions, Permissions.SEND_MESSAGES]);
r3 = r5;
if (a0 == null) {
object = {'computedPermissions': null, 'hasBaseAccessPermissions': true, 'hasSendMessagesPermission': true};
object.computedPermissions = (importAll(483) /* metro dependency 483: BigFlagUtils */).deserialize(0);
return object;
}
permissions = PermissionStore.computePermissions(a0);
value2 = (importAll(483) /* metro dependency 483: BigFlagUtils */).has(permissions, Permissions.ADMINISTRATOR);
} else {
r2 = value3;
r3 = value5;
if (a0 == null) {
object = {'computedPermissions': null, 'hasBaseAccessPermissions': true, 'hasSendMessagesPermission': true};
object.computedPermissions = (importAll(483) /* metro dependency 483: BigFlagUtils */).deserialize(0);
return object;
}
permissions = PermissionStore.computePermissions(a0);
moduleValue = importAll(483) /* metro dependency 483: BigFlagUtils */;
value2 = moduleValue.has(permissions, Permissions.ADMINISTRATOR);
}
const value3 = true;
if (value2) {
r2 = value3;
r3 = value3;
} else {
value4 = a0 instanceof ChannelRecordBase;
value5 = (importAll(483) /* metro dependency 483: BigFlagUtils */).has(permissions, Permissions.VIEW_CHANNEL);
if (value4) {
if (value5) {
moduleValue3 = importAll(483) /* metro dependency 483: BigFlagUtils */;
r5 = moduleValue3.has(permissions, Permissions.USE_APPLICATION_COMMANDS);
} else {
r5 = value5;
}
moduleValue4 = importAll(483) /* metro dependency 483: BigFlagUtils */;
has = moduleValue4.has;
r2 = a1 ? Reflect.apply(has, moduleValue4, [permissions,
Permissions.SEND_MESSAGES_IN_THREADS]) : Reflect.apply(has,
moduleValue4, [permissions, Permissions.SEND_MESSAGES]);
r3 = r5;
} else {
r2 = value3;
r3 = value5;
}
}
return {computedPermissions: permissions, hasBaseAccessPermissions: r3, hasSendMessagesPermission: r2};
}
return {computedPermissions: permissions, hasBaseAccessPermissions: r3, hasSendMessagesPermission: r2};
}
function buildPermissionContext(a0, a1) { // fn#62963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8044:1076, offset: 0x01b6d41e, size: 340 bytes, params: 3, frame: 22
var r8;
var r0;
var member;
let value = a0;
const r5 = value instanceof ChannelRecordBase && value.isThread() ? ChannelStore.getChannel(value.parent_id) ?? value : value;
const value4 = undefined;
const r7 = r5 != null ? getContextGuildId(r5) : value4;
const viewNsfwCommandsOrDefault = (require(7867) /* metro dependency 7867: AgeRestrictedContentSettingsUtils */).getViewNsfwCommandsOrDefault();
const id = AuthenticationStore.getId();
const currentUser = UserStore.getCurrentUser();
const nsfwAllowed = currentUser == null ? value4 : currentUser.nsfwAllowed;
const r2 = nsfwAllowed != null && nsfwAllowed;
if (r7 == null) {
r8 = [];
} else {
member = GuildMemberStore.getMember(r7, id);
r8 = (member == null ? value4 : member.roles) ?? [];
function buildPermissionContext(a0, a1) { // fn#62963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8044:1076, offset: 0x01b6d41e, size: 340 bytes, params: 3, frame: 22
var r8;
var r0;
var member;
let value = a0;
const r5 = value instanceof ChannelRecordBase && value.isThread() ? ChannelStore.getChannel(value.parent_id) ?? value : value;
const value4 = undefined;
const r7 = r5 != null ? getContextGuildId(r5) : value4;
const viewNsfwCommandsOrDefault = (AgeRestrictedContentSettingsUtilsModule).getViewNsfwCommandsOrDefault();
const id = AuthenticationStore.getId();
const currentUser = UserStore.getCurrentUser();
const nsfwAllowed = currentUser == null ? value4 : currentUser.nsfwAllowed;
const r2 = nsfwAllowed != null && nsfwAllowed;
if (r7 == null) {
r8 = [];
} else {
member = GuildMemberStore.getMember(r7, id);
r8 = (member == null ? value4 : member.roles) ?? [];
}
const isViewingRoles2 = ImpersonateStore.isViewingRoles(r7);
const computePermissions_62961Binding = computePermissions_62961;
const value11 = value instanceof ChannelRecordBase;
if (value11) {
value = value.isThread();
r0 = value;
} else {
r0 = value11;
}
value = computePermissions_62961Binding(r5, r0);
const object = {context: r5, userId: id, roleIds: r8, isImpersonating: isViewingRoles2, commandTypes: a1};
object.computedPermissions = value.computedPermissions;
object.hasBaseAccessPermissions = value.hasBaseAccessPermissions;
object.hasSendMessagesPermission = value.hasSendMessagesPermission;
object.allowNsfw = computeAllowNsfw(r5, r2, viewNsfwCommandsOrDefault);
return object;
}
const isViewingRoles2 = ImpersonateStore.isViewingRoles(r7);
const computePermissions_62961Binding = computePermissions_62961;
const value11 = value instanceof ChannelRecordBase;
if (value11) {
value = value.isThread();
r0 = value;
} else {
r0 = value11;
function usePermissionContext(a0, a1) { // fn#62964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8044:1780, offset: 0x01b6d572, size: 337 bytes, params: 3, frame: 25
const env0_0 = a0;
const env0_1 = a1;
const value2 = env0_3.useMemo(_fun62965, [a0]);
var env0_3 = value2 != null ? getContextGuildId(value2) : undefined;
return env0_3.useMemo(_fun62970, [a1, value2,
(require(566) /* metro dependency 566: flux */).useStateFromStores([ImpersonateStore], _fun62969),
(require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildMemberStore], _fun62968),
(require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore], function() {
return AuthenticationStore.getId();
}), (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun62967),
(require(7867) /* metro dependency 7867: AgeRestrictedContentSettingsUtils */).useViewNsfwCommandsOrDefault(),
a0]);
function _fun62965() { // fn#62965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8044:1832, offset: 0x01b6d6c3, size: 74 bytes, params: 1, frame: 12
return env0_0 instanceof ChannelRecordBase && env0_0.isThread() ? ChannelStore.getChannel(env0_0.parent_id) ?? env0_0 : env0_0;
}
function _fun62967() { // fn#62967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8044:2092, offset: 0x01b6d70d, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__;
const nsfwAllowed = UserStore.getCurrentUser()?.nsfwAllowed;
return nsfwAllowed != null && nsfwAllowed;
}
function _fun62968() { // fn#62968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8044:2218, offset: 0x01b6d73a, size: 65 bytes, params: 1, frame: 14
return env0_3 == null ? [] : GuildMemberStore.getMember(env0_3, id)?.roles ?? [];
}
function _fun62969() { // fn#62969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8044:2342, offset: 0x01b6d77b, size: 27 bytes, params: 1, frame: 11
return ImpersonateStore.isViewingRoles(env0_3);
}
function _fun62970() { // fn#62970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8044:2386, offset: 0x01b6d796, size: 155 bytes, params: 1, frame: 19
const computePermissions_62961Binding = computePermissions_62961;
let binding = env0_2;
const {computedPermissions, hasBaseAccessPermissions,
hasSendMessagesPermission} = computePermissions_62961Binding(binding,
env0_0 instanceof ChannelRecordBase && env0_0.isThread());
const object = {};
binding = env0_2;
object.context = binding;
object.userId = id;
object.roleIds = env0_7;
object.commandTypes = require;
object.isImpersonating = env0_8;
object.computedPermissions = computedPermissions;
object.hasBaseAccessPermissions = hasBaseAccessPermissions;
object.hasSendMessagesPermission = hasSendMessagesPermission;
object.allowNsfw = computeAllowNsfw(binding, env0_6, env0_4);
return object;
}
}
value = computePermissions_62961Binding(r5, r0);
const object2 = {context: r5, userId: id, roleIds: r8, isImpersonating: isViewingRoles2, commandTypes: a1};
object2.computedPermissions = value.computedPermissions;
object2.hasBaseAccessPermissions = value.hasBaseAccessPermissions;
object2.hasSendMessagesPermission = value.hasSendMessagesPermission;
object2.allowNsfw = computeAllowNsfw(r5, r2, viewNsfwCommandsOrDefault);
return object2;
}
function usePermissionContext(a0, a1) { // fn#62964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8044:1780, offset: 0x01b6d572, size: 337 bytes, params: 3, frame: 25
const env0_0 = a0;
const env0_1 = a1;
const value2 = env0_3.useMemo(_fun62965, [a0]);
var env0_3 = value2 != null ? getContextGuildId(value2) : undefined;
return env0_3.useMemo(_fun62970, [a1, value2,
(require(566) /* metro dependency 566: flux */).useStateFromStores([ImpersonateStore], _fun62969),
(require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildMemberStore], _fun62968),
(require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore], function() {
return AuthenticationStore.getId();
}), (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun62967),
(require(7867) /* metro dependency 7867: AgeRestrictedContentSettingsUtils */).useViewNsfwCommandsOrDefault(),
a0]);
}
function computeCommandContextType(a0, a1) { // fn#62971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8044:2762, offset: 0x01b6d831, size: 203 bytes, params: 3, frame: 15
const InteractionContextType = (ServerModule).InteractionContextType;
return a0 instanceof ChannelRecordBase && a0?.guild_id == null ? a0?.type !== ChannelTypes.DM ? InteractionContextType.PRIVATE_CHANNEL : a0?.getRecipientId() === a1 ? InteractionContextType.BOT_DM : InteractionContextType.PRIVATE_CHANNEL : InteractionContextType.GUILD;
}
function computeCommandContextType(a0, a1) { // fn#62971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8044:2762, offset: 0x01b6d831, size: 203 bytes, params: 3, frame: 15
const InteractionContextType = (require(1909) /* metro dependency 1909: Server */).InteractionContextType;
return a0 instanceof ChannelRecordBase && a0?.guild_id == null ? a0?.type !== ChannelTypes.DM ? InteractionContextType.PRIVATE_CHANNEL : a0?.getRecipientId() === a1 ? InteractionContextType.BOT_DM : InteractionContextType.PRIVATE_CHANNEL : InteractionContextType.GUILD;
}
function _fun62965() { // fn#62965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8044:1832, offset: 0x01b6d6c3, size: 74 bytes, params: 1, frame: 12
return env0_0 instanceof ChannelRecordBase && env0_0.isThread() ? ChannelStore.getChannel(env0_0.parent_id) ?? env0_0 : env0_0;
}
function _fun62967() { // fn#62967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8044:2092, offset: 0x01b6d70d, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__;
const nsfwAllowed = UserStore.getCurrentUser()?.nsfwAllowed;
return nsfwAllowed != null && nsfwAllowed;
}
function _fun62968() { // fn#62968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8044:2218, offset: 0x01b6d73a, size: 65 bytes, params: 1, frame: 14
return env0_3 == null ? [] : GuildMemberStore.getMember(env0_3, id)?.roles ?? [];
}
function _fun62969() { // fn#62969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8044:2342, offset: 0x01b6d77b, size: 27 bytes, params: 1, frame: 11
return ImpersonateStore.isViewingRoles(env0_3);
}
function _fun62970() { // fn#62970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8044:2386, offset: 0x01b6d796, size: 155 bytes, params: 1, frame: 19
const computePermissions_62961Binding = computePermissions_62961;
let binding = env0_2;
const {computedPermissions, hasBaseAccessPermissions,
hasSendMessagesPermission} = computePermissions_62961Binding(binding,
env0_0 instanceof ChannelRecordBase && env0_0.isThread());
const object2 = {};
binding = env0_2;
object2.context = binding;
object2.userId = id;
object2.roleIds = env0_7;
object2.commandTypes = require;
object2.isImpersonating = env0_8;
object2.computedPermissions = computedPermissions;
object2.hasBaseAccessPermissions = hasBaseAccessPermissions;
object2.hasSendMessagesPermission = hasSendMessagesPermission;
object2.allowNsfw = computeAllowNsfw(binding, env0_6, env0_4);
return object2;
}
global.__d(_fun62959, 7866, [31, 1937, 1383, 1226, 1379, 1945, 3784, 1878, 661, 7867, 566, 483, 1909,
2]) /* metro module 7866, dependencies: [31, 1937, 1383, 1226, 1379, 1945, 3784, 1878, 661, 7867, 566, 483, 1909, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -1,128 +1,133 @@
/* Metro module 10657; source: modules/application_commands/getPrimaryAppCommand.tsx; dependencies: [5, 31, 1379, 7861, 1909, 7869, 7865, 8042, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import ApplicationCommandIndexStore from './ApplicationCommandIndexStore.tsx'; /* Metro dependency 7861 */
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 ServerModule from '../../flow/Server.tsx'; /* Metro dependency 1909 */
import * as ApplicationCommandIndexStoreModule from './ApplicationCommandIndexStore.tsx'; /* Metro dependency 7861 */
import * as ApplicationCommandQueryTypesModule from './ApplicationCommandQueryTypes.tsx'; /* Metro dependency 7869 */
function _fun81967(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10843:6, offset: 0x01ee5bfa, size: 342 bytes, params: 8, frame: 23
const env0_0 = require;
const closure = queryForPrimaryAppCommand;
const closure2 = useGetPrimaryAppCommand;
const closure3 = useQueryForPrimaryAppCommand;
const closure4 = isPrimaryAppCommandUsableInAppDM;
const queryForPrimaryAppCommand2 = queryForPrimaryAppCommand;
const useGetPrimaryAppCommand2 = useGetPrimaryAppCommand;
const useQueryForPrimaryAppCommand2 = useQueryForPrimaryAppCommand;
const isPrimaryAppCommandUsableInAppDM2 = isPrimaryAppCommandUsableInAppDM;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const applicationCommandIndexStoreModule = require(7861) /* metro dependency 7861: ApplicationCommandIndexStore */;
const env0_5 = applicationCommandIndexStoreModule.getOrFetchApplicationCommandIndexForTarget;
const env0_6 = applicationCommandIndexStoreModule.useQueryState;
const applicationCommandIndexStore = importDefault(7861) /* metro dependency 7861: ApplicationCommandIndexStore */;
const ApplicationCommandType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandType;
const ApplicationCommandType = (ServerModule).ApplicationCommandType;
const PRIMARY_ENTRY_POINT = ApplicationCommandType.PRIMARY_ENTRY_POINT;
object = [PRIMARY_ENTRY_POINT];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/getPrimaryAppCommand.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/getPrimaryAppCommand.tsx');
exports.default = function() {
return _getPrimaryAppCommand.apply(this, arguments);
};
exports.NO_PRIMARY_APP_COMMAND_ERROR = 'no primary app command for application';
exports.queryForPrimaryAppCommand = closure;
exports.useGetPrimaryAppCommand = closure2;
exports.useQueryForPrimaryAppCommand = closure3;
exports.queryForPrimaryAppCommand = queryForPrimaryAppCommand2;
exports.useGetPrimaryAppCommand = useGetPrimaryAppCommand2;
exports.useQueryForPrimaryAppCommand = useQueryForPrimaryAppCommand2;
exports.useIsPrimaryAppCommandUsableInAppDM = useIsPrimaryAppCommandUsableInAppDM;
exports.isPrimaryAppCommandUsableInAppDM = closure4;
}
function _getPrimaryAppCommand() { // fn#81968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10843:309, offset: 0x01ee5d50, size: 50 bytes, params: 1, frame: 14
return env0_2(_fun81970).apply(this, arguments);
}
function queryForPrimaryAppCommand(a0, a1) { // fn#81971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10843:667, offset: 0x01ee5e45, size: 139 bytes, params: 3, frame: 18
const query = ApplicationCommandIndexStore.query;
const object2 = {};
const ApplicationCommandType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandType;
const PRIMARY_ENTRY_POINT = ApplicationCommandType.PRIMARY_ENTRY_POINT;
object2.commandTypes = [PRIMARY_ENTRY_POINT];
const ScoreMethod = (require(7869) /* metro dependency 7869: ApplicationCommandQueryTypes */).ScoreMethod;
const COMMAND_ONLY = ScoreMethod.COMMAND_ONLY;
return Reflect.apply(query, ApplicationCommandIndexStore, [a0, object2, {'placeholderCount': 1, 'scoreMethod': null,
'applicationId': null, 'allowFetch': false, 'allowApplicationState': true, scoreMethod: COMMAND_ONLY,
applicationId: a1}]).commands[0];
}
function useGetPrimaryAppCommand(a0, a1) { // fn#81972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10843:926, offset: 0x01ee5ed0, size: 99 bytes, params: 3, frame: 17
const env0_0 = a1;
const {commands, loading} = useQueryForPrimaryAppCommand(a0, a1);
const property = commands[0];
env0_3.useEffect(_fun81973, [a1, property != null, loading]);
return property;
}
function useQueryForPrimaryAppCommand(a0, a1) { // fn#81974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10843:1167, offset: 0x01ee5f7e, size: 93 bytes, params: 3, frame: 16
const object2 = {commandTypes: env0_9};
const ScoreMethod = (require(7869) /* metro dependency 7869: ApplicationCommandQueryTypes */).ScoreMethod;
const COMMAND_ONLY = ScoreMethod.COMMAND_ONLY;
return useQueryState(a0, object2, {'placeholderCount': 1, 'scoreMethod': null, 'applicationId': null,
'allowFetch': false, 'allowApplicationState': true, scoreMethod: COMMAND_ONLY, applicationId: a1});
}
function isPrimaryAppCommandUsableInAppDM(a0) { // fn#81975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10843:1360, offset: 0x01ee5fdb, size: 156 bytes, params: 2, frame: 16
if (a0 == null) {
return false;
}
return a0.integration_types != null && a0.integration_types.includes((require(8042) /* metro dependency 8042: ApplicationIntegrationType */).ApplicationIntegrationType.USER_INSTALL) && (a0.contexts != null && a0.contexts.includes((require(1909) /* metro dependency 1909: Server */).InteractionContextType.BOT_DM));
}
function useIsPrimaryAppCommandUsableInAppDM({context, applicationId, botUserId}) { // fn#81977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10843:2043, offset: 0x01ee6077, size: 64 bytes, params: 2, frame: 16
const value2 = useGetPrimaryAppCommand(context, applicationId);
return value2 != null && (botUserId != null && isPrimaryAppCommandUsableInAppDM(value2));
}
function* _fun81970(a0, a1) { // fn#81970, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10843:374, offset: 0x01ee5d8d, size: 184 bytes, params: 3, frame: 20
var r1;
var r2;
var value6;
var Error;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let binding = env2_4;
const channel = binding.getChannel(a0);
const value4 = channel != null;
if (value4) {
value6 = env2_11({channel: channel, type: 'channel'}, a1);
r1 = value6 == null;
r2 = value6;
} else {
r1 = value4;
r2 = undefined;
}
if (r1) {
binding = env2_5;
yield binding({type: 'application', applicationId: a1});
if (false) {
return undefined;
exports.isPrimaryAppCommandUsableInAppDM = isPrimaryAppCommandUsableInAppDM2;
function _getPrimaryAppCommand() { // fn#81968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10843:309, offset: 0x01ee5d50, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun81970).apply(this, arguments);
function* _fun81970(a0, a1) { // fn#81970, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10843:374, offset: 0x01ee5d8d, size: 184 bytes, params: 3, frame: 20
var r1;
var r2;
var value6;
var Error;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let binding = env2_4;
const channel = binding.getChannel(a0);
const value4 = channel != null;
if (value4) {
value6 = env2_11({channel: channel, type: 'channel'}, a1);
r1 = value6 == null;
r2 = value6;
} else {
r1 = value4;
r2 = undefined;
}
if (r1) {
binding = env2_5;
yield binding({type: 'application', applicationId: a1});
if (false) {
return undefined;
}
binding = env2_11;
r2 = binding({channel: channel, type: 'channel'}, a1);
if (r2 != null) {
return r2;
}
Error = global.Error;
binding = env2_8;
throw new Error(binding);
}
if (r2 != null) {
return r2;
}
Error = global.Error;
throw new Error(env2_8);
}
binding = env2_11;
r2 = binding({channel: channel, type: 'channel'}, a1);
if (r2 != null) {
return r2;
}
function queryForPrimaryAppCommand(a0, a1) { // fn#81971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10843:667, offset: 0x01ee5e45, size: 139 bytes, params: 3, frame: 18
const applicationCommandIndexStoreBinding = ApplicationCommandIndexStore;
const query = applicationCommandIndexStoreBinding.query;
const object = {};
const ApplicationCommandType = (ServerModule).ApplicationCommandType;
const PRIMARY_ENTRY_POINT = ApplicationCommandType.PRIMARY_ENTRY_POINT;
object.commandTypes = [PRIMARY_ENTRY_POINT];
const ScoreMethod = (ApplicationCommandQueryTypesModule).ScoreMethod;
const COMMAND_ONLY = ScoreMethod.COMMAND_ONLY;
return Reflect.apply(query, applicationCommandIndexStoreBinding, [a0, object, {'placeholderCount': 1,
'scoreMethod': null, 'applicationId': null, 'allowFetch': false, 'allowApplicationState': true,
scoreMethod: COMMAND_ONLY, applicationId: a1}]).commands[0];
}
function useGetPrimaryAppCommand(a0, a1) { // fn#81972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10843:926, offset: 0x01ee5ed0, size: 99 bytes, params: 3, frame: 17
const env0_0 = a1;
const {commands, loading} = useQueryForPrimaryAppCommand(a0, a1);
const property = commands[0];
ReactModule.useEffect(_fun81973, [a1, property != null, loading]);
return property;
function _fun81973() { // fn#81973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10843:1066, offset: 0x01ee5f33, size: 75 bytes, params: 1, frame: 13
var value2;
if (!(result || loading)) {
value2 = environment.__proto__;
(require(7865) /* metro dependency 7865: ApplicationCommandIndexActionCreators */).requestApplicationCommandIndex({type: 'application',
applicationId: require});
}
}
Error = global.Error;
binding = env2_8;
throw new Error(binding);
}
if (r2 != null) {
return r2;
}
Error = global.Error;
throw new Error(env2_8);
}
function _fun81973() { // fn#81973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10843:1066, offset: 0x01ee5f33, size: 75 bytes, params: 1, frame: 13
var value2;
if (!(result || loading)) {
value2 = environment.__proto__;
(require(7865) /* metro dependency 7865: ApplicationCommandIndexActionCreators */).requestApplicationCommandIndex({type: 'application',
applicationId: require});
function useQueryForPrimaryAppCommand(a0, a1) { // fn#81974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10843:1167, offset: 0x01ee5f7e, size: 93 bytes, params: 3, frame: 16
const object = {commandTypes: env0_9};
const ScoreMethod = (ApplicationCommandQueryTypesModule).ScoreMethod;
const COMMAND_ONLY = ScoreMethod.COMMAND_ONLY;
return useQueryState(a0, object, {'placeholderCount': 1, 'scoreMethod': null, 'applicationId': null,
'allowFetch': false, 'allowApplicationState': true, scoreMethod: COMMAND_ONLY, applicationId: a1});
}
function isPrimaryAppCommandUsableInAppDM(a0) { // fn#81975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10843:1360, offset: 0x01ee5fdb, size: 156 bytes, params: 2, frame: 16
if (a0 == null) {
return false;
}
return a0.integration_types != null && a0.integration_types.includes((require(8042) /* metro dependency 8042: ApplicationIntegrationType */).ApplicationIntegrationType.USER_INSTALL) && (a0.contexts != null && a0.contexts.includes((require(1909) /* metro dependency 1909: Server */).InteractionContextType.BOT_DM));
}
function useIsPrimaryAppCommandUsableInAppDM({context, applicationId, botUserId}) { // fn#81977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10843:2043, offset: 0x01ee6077, size: 64 bytes, params: 2, frame: 16
const value2 = useGetPrimaryAppCommand(context, applicationId);
return value2 != null && (botUserId != null && isPrimaryAppCommandUsableInAppDM(value2));
}
}
global.__d(_fun81967, 10657, [5, 31, 1379, 7861, 1909, 7869, 7865, 8042,
2]) /* metro module 10657, dependencies: [5, 31, 1379, 7861, 1909, 7869, 7865, 8042, 2] */;
@@ -1,367 +1,437 @@
/* Metro module 11869; source: modules/application_commands/native/ApplicationCommandBar.tsx; dependencies: [57, 31, 27, 1945, 33, 4501, 697, 6235, 5278, 1244, 1305, 566, 11752, 5475, 4573, 7972, 6266, 11870, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import GuildMemberStore from '../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import UsePrevious from '../../../hooks/usePrevious.tsx'; /* Metro dependency 6266 */
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 NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as LegacyTokensModule from '../../../design/migrations/native/LegacyTokens.tsx'; /* Metro dependency 6235 */
import * as NativeModule2 from '../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
import * as ApplicationCommandUtilsModule from './ApplicationCommandUtils.tsx'; /* Metro dependency 11752 */
function _fun91003(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:6, offset: 0x0204f649, size: 963 bytes, params: 8, frame: 26
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.View;
const StyleSheet = value.StyleSheet;
const env0_6 = value.ScrollView;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
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 = {flexDirection: 'column'};
object = {};
const object2 = {flexDirection: 'column'};
const MOBILE_COMMAND_BAR_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_COMMAND_BAR_BACKGROUND;
object6.backgroundColor = MOBILE_COMMAND_BAR_BACKGROUND;
object2.backgroundColor = MOBILE_COMMAND_BAR_BACKGROUND;
const CHAT_INPUT_FLOATING_BORDER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_FLOATING_BORDER_RADIUS;
object6.borderRadius = CHAT_INPUT_FLOATING_BORDER_RADIUS;
object2.borderRadius = CHAT_INPUT_FLOATING_BORDER_RADIUS;
const CHAT_INPUT_FLOATING_ACCESSORY_BORDER_WIDTH = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_FLOATING_ACCESSORY_BORDER_WIDTH;
object6.borderWidth = CHAT_INPUT_FLOATING_ACCESSORY_BORDER_WIDTH;
object2.borderWidth = CHAT_INPUT_FLOATING_ACCESSORY_BORDER_WIDTH;
const MOBILE_FLOATING_ACCESSORY_BORDER = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_FLOATING_ACCESSORY_BORDER;
object6.borderColor = MOBILE_FLOATING_ACCESSORY_BORDER;
object6.overflow = 'hidden';
object5.applicationCommandBar = object6;
const object7 = {'width': 24, 'height': 24, 'borderRadius': null, 'marginRight': 16};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object5.applicationIcon = object7;
object5.applicationTopWrapperScrollView = {'flexDirection': 'row', 'alignItems': 'center', 'paddingHorizontal': 16,
object2.borderColor = MOBILE_FLOATING_ACCESSORY_BORDER;
object2.overflow = 'hidden';
object.applicationCommandBar = object2;
const object3 = {'width': 24, 'height': 24, 'borderRadius': null, 'marginRight': 16};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object.applicationIcon = object3;
object.applicationTopWrapperScrollView = {'flexDirection': 'row', 'alignItems': 'center', 'paddingHorizontal': 16,
'paddingVertical': 8};
object5.applicationName = {'textAlignVertical': 'center', 'marginRight': 12};
const object9 = {'width': null, 'marginVertical': 8, 'marginHorizontal': 12, 'backgroundColor': null,
object.applicationName = {'textAlignVertical': 'center', 'marginRight': 12};
const object4 = {'width': null, 'marginVertical': 8, 'marginHorizontal': 12, 'backgroundColor': null,
'height': '100%'};
object9.width = StyleSheet.hairlineWidth;
object4.width = StyleSheet.hairlineWidth;
const BACKGROUND_MOD_NORMAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_NORMAL;
object9.backgroundColor = BACKGROUND_MOD_NORMAL;
object5.applicationOptionalOptionsDivider = object9;
object5.applicationOptionalOptionsDividerWithNoRequired = {marginLeft: 4};
object5.applicationOptionalOptionsIndicator = {'marginHorizontal': 4, 'paddingVertical': 8};
object5.applicationDescriptionContainer = {flexShrink: 1};
object4.backgroundColor = BACKGROUND_MOD_NORMAL;
object.applicationOptionalOptionsDivider = object4;
object.applicationOptionalOptionsDividerWithNoRequired = {marginLeft: 4};
object.applicationOptionalOptionsIndicator = {'marginHorizontal': 4, 'paddingVertical': 8};
object.applicationDescriptionContainer = {flexShrink: 1};
const MOBILE_COMMAND_BAR_DIVIDER = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_COMMAND_BAR_DIVIDER;
object5.applicationDescriptionDivider = {marginLeft: 0, backgroundColor: MOBILE_COMMAND_BAR_DIVIDER};
const object10 = {'marginHorizontal': 4, 'padding': 8, 'fontSize': 12, 'alignItems': 'center'};
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const DARK_PRIMARY_800_LIGHT_PRIMARY_300 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_PRIMARY_800_LIGHT_PRIMARY_300;
object10.backgroundColor = DARK_PRIMARY_800_LIGHT_PRIMARY_300;
object5.applicationCommandOption = object10;
object.applicationDescriptionDivider = {marginLeft: 0, backgroundColor: MOBILE_COMMAND_BAR_DIVIDER};
const object8 = {'marginHorizontal': 4, 'padding': 8, 'fontSize': 12, 'alignItems': 'center'};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const DARK_PRIMARY_800_LIGHT_PRIMARY_300 = (LegacyTokensModule).DARK_PRIMARY_800_LIGHT_PRIMARY_300;
object8.backgroundColor = DARK_PRIMARY_800_LIGHT_PRIMARY_300;
object.applicationCommandOption = object8;
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
object5.applicationCommandOptionText = {color: TEXT_DEFAULT};
object.applicationCommandOptionText = {color: TEXT_DEFAULT};
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object5.activeCommandOption = {backgroundColor: BACKGROUND_BRAND};
object.activeCommandOption = {backgroundColor: BACKGROUND_BRAND};
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object5.activeCommandOptionText = {color: WHITE};
object5.completeCommandOptionText = {opacity: 0.5};
object.activeCommandOptionText = {color: WHITE};
object.completeCommandOptionText = {opacity: 0.5};
const TEXT_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_CRITICAL;
object5.errorCommandOptionText = {color: TEXT_FEEDBACK_CRITICAL};
object5.optionDescriptionContainer = {'overflow': 'hidden', 'paddingHorizontal': 16, 'paddingVertical': 8,
object.errorCommandOptionText = {color: TEXT_FEEDBACK_CRITICAL};
object.optionDescriptionContainer = {'overflow': 'hidden', 'paddingHorizontal': 16, 'paddingVertical': 8,
'flexDirection': 'row'};
const MOBILE_FLOATING_ACCESSORY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_FLOATING_ACCESSORY_BACKGROUND;
object5.descriptionEllipsis = {marginLeft: 10, backgroundColor: MOBILE_FLOATING_ACCESSORY_BACKGROUND};
object.descriptionEllipsis = {marginLeft: 10, backgroundColor: MOBILE_FLOATING_ACCESSORY_BACKGROUND};
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object5.descriptionEllipsisDots = {backgroundColor: INTERACTIVE_TEXT_DEFAULT};
const DARK_PRIMARY_660_LIGHT_PRIMARY_300 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_PRIMARY_660_LIGHT_PRIMARY_300;
object5.completeCommandOption = {backgroundColor: DARK_PRIMARY_660_LIGHT_PRIMARY_300};
const env0_11 = Reflect.apply(createStyles, value, [object5]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationCommandBar.tsx');
object.descriptionEllipsisDots = {backgroundColor: INTERACTIVE_TEXT_DEFAULT};
const DARK_PRIMARY_660_LIGHT_PRIMARY_300 = (LegacyTokensModule).DARK_PRIMARY_660_LIGHT_PRIMARY_300;
object.completeCommandOption = {backgroundColor: DARK_PRIMARY_660_LIGHT_PRIMARY_300};
const env0_11 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/ApplicationCommandBar.tsx');
exports.default = _default_91009;
}
function ApplicationCommandOptionItem(a0) { // fn#91004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:2157, offset: 0x0204fa0c, size: 501 bytes, params: 2, frame: 27
const option = a0.option;
const optionState = a0.optionState;
const value = Object.create(null);
value.option = 0;
value.optionState = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const value4 = undefined;
const styles = useStyles();
const isActive = optionState == null ? value4 : optionState.isActive;
let r9 = isActive != null && isActive;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.evoEHc,
{optionName: option.displayName});
object2.accessibilityRole = 'button';
object2.disabled = r9;
const value6 = !r9;
object2.style = [styles.applicationCommandOption, r9 && styles.activeCommandOption,
(r9 ? value6 : optionState == null || optionState.lastValidationResult == null ? value4 : optionState.lastValidationResult.success) && styles.completeCommandOption];
copyDataProperties(object2, value2, value);
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const items2 = [styles.applicationCommandOptionText];
items2[1] = r9 && styles.activeCommandOptionText;
items2[2] = (r9 ? value6 : optionState == null || optionState.lastValidationResult == null ? value4 : optionState.lastValidationResult.success) && styles.completeCommandOptionText;
r9 = (r9 ? value6 : (optionState == null || optionState.lastValidationResult == null ? value4 : optionState.lastValidationResult.success) === false) && styles.errorCommandOptionText;
items2[3] = r9;
return (
<PressableOpacity {...object2}>
<LegacyText style={items2} numberOfLines={1}>
{option.displayName}
</LegacyText>
</PressableOpacity>
);
}
function ApplicationCommandOptionDescription({command, option, optionState}) { // fn#91005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:2945, offset: 0x0204fc01, size: 675 bytes, params: 2, frame: 31
var r8;
var value;
const styles = useStyles();
const value3 = (importDefault(6266) /* metro dependency 6266: usePrevious */)(option);
const binding = env0_4;
let useState = binding.useState;
const value4 = Reflect.apply(useState, binding, [undefined]);
const binding2 = env0_3;
const value5 = binding2(value4, 2);
const property = value5[0];
var env0_3 = value5[1];
useState = binding.useState;
const value6 = binding2(Reflect.apply(useState, binding, [0]), 2);
const property2 = value6[0];
const env0_5 = value6[1];
useState = binding.useState;
const value7 = binding2(Reflect.apply(useState, binding, [0]), 2);
const property3 = value7[0];
const env0_6 = value7[1];
binding.useEffect(_fun91006, [value3, option, property2,
(importDefault(6266) /* metro dependency 6266: usePrevious */)(property2)]);
const value9 = binding.useCallback(_fun91007, [property]);
const closure = onLayout_91008;
const r5 = property === 1 && property3 === property2;
const r6 = r5 ? 'text' : 'button';
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const view = <View style={styles.applicationDescriptionContainer}>{(optionState == null || optionState.lastValidationResult == null ? undefined : optionState.lastValidationResult.error) != null ? ((Text) => <Text lineClamp={property} onLayout={closure} variant="text-sm/medium" color="text-feedback-critical">{optionState.lastValidationResult.error}</Text>)((require(4573) /* metro dependency 4573: Text */).Text) : ((Text) => <Text lineClamp={property} onLayout={closure} variant="text-sm/medium" color="mobile-text-heading-primary">{option != null ? option.displayDescription : command.displayDescription}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View>;
if (property3 === property2) {
r8 = null;
} else {
value = importDefault(11870) /* metro dependency 11870: DescriptionEllipsis */;
value = ((Component) => <Component style={styles.descriptionEllipsis} dotStyle={styles.descriptionEllipsisDots} />)(value);
r8 = value;
function ApplicationCommandOptionItem(a0) { // fn#91004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:2157, offset: 0x0204fa0c, size: 501 bytes, params: 2, frame: 27
const option = a0.option;
const optionState = a0.optionState;
const value = Object.create(null);
value.option = 0;
value.optionState = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const value4 = undefined;
const styles = useStyles();
const isActive = optionState == null ? value4 : optionState.isActive;
let r9 = isActive != null && isActive;
const PressableOpacity = (PressablesModule).PressableOpacity;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.evoEHc,
{optionName: option.displayName});
object.accessibilityRole = 'button';
object.disabled = r9;
const value6 = !r9;
object.style = [styles.applicationCommandOption, r9 && styles.activeCommandOption,
(r9 ? value6 : optionState == null || optionState.lastValidationResult == null ? value4 : optionState.lastValidationResult.success) && styles.completeCommandOption];
copyDataProperties(object, value2, value);
const LegacyText = (NativeModule).LegacyText;
const items2 = [styles.applicationCommandOptionText];
items2[1] = r9 && styles.activeCommandOptionText;
items2[2] = (r9 ? value6 : optionState == null || optionState.lastValidationResult == null ? value4 : optionState.lastValidationResult.success) && styles.completeCommandOptionText;
r9 = (r9 ? value6 : (optionState == null || optionState.lastValidationResult == null ? value4 : optionState.lastValidationResult.success) === false) && styles.errorCommandOptionText;
items2[3] = r9;
return (
<PressableOpacity {...object}>
<LegacyText style={items2} numberOfLines={1}>
{option.displayName}
</LegacyText>
</PressableOpacity>
);
}
return (
<PressableOpacity
accessibilityRole={r6}
disabled={r5}
onPress={value9}
>
<View style={styles.optionDescriptionContainer}>
{view}
{r8}
function ApplicationCommandOptionDescription({command, option, optionState}) { // fn#91005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:2945, offset: 0x0204fc01, size: 675 bytes, params: 2, frame: 31
var r8;
var value;
const styles = useStyles();
const value3 = (UsePrevious)(option);
let useState = ReactModule.useState;
const value4 = Reflect.apply(useState, ReactModule, [undefined]);
const binding2 = env0_3;
const value5 = binding2(value4, 2);
const property = value5[0];
var env0_3 = value5[1];
useState = ReactModule.useState;
const value6 = binding2(Reflect.apply(useState, ReactModule, [0]), 2);
const property2 = value6[0];
const env0_5 = value6[1];
useState = ReactModule.useState;
const value7 = binding2(Reflect.apply(useState, ReactModule, [0]), 2);
const property3 = value7[0];
const env0_6 = value7[1];
ReactModule.useEffect(_fun91006, [value3, option, property2,
(UsePrevious)(property2)]);
const value9 = ReactModule.useCallback(_fun91007, [property]);
const onLayout_910082 = onLayout_91008;
const r5 = property === 1 && property3 === property2;
const r6 = r5 ? 'text' : 'button';
const PressableOpacity = (PressablesModule).PressableOpacity;
const view = (
<View style={styles.applicationDescriptionContainer}>
{
(optionState == null || optionState.lastValidationResult == null ? undefined : optionState.lastValidationResult.error) != null
? ((Text) => <Text lineClamp={property} onLayout={onLayout_910082} variant="text-sm/medium" color="text-feedback-critical">{optionState.lastValidationResult.error}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)
: ((Text) => <Text lineClamp={property} onLayout={onLayout_910082} variant="text-sm/medium" color="mobile-text-heading-primary">{option != null ? option.displayDescription : command.displayDescription}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)
}
</View>
</PressableOpacity>
);
}
function _default_91009({command, section, guildId, currentOption, optionStates, onPressOption}) { // fn#91009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4105, offset: 0x0204ff71, size: 1077 bytes, params: 2, frame: 36
var r7;
var jsxRuntimeEnv0_9Binding;
var items3;
var intl;
const env0_3 = currentOption;
const env0_4 = optionStates;
const styles = useStyles();
const binding = env0_4;
const value4 = binding.useRef(null);
const env0_8 = binding.useRef({});
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 env0_9 = value6[1];
useState = binding.useState;
const value7 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value7[0];
const env0_10 = value7[1];
useState = binding.useState;
const value8 = binding2(Reflect.apply(useState, binding, []), 2);
const property3 = value8[0];
const env0_12 = value8[1];
binding.useEffect(_fun91010, [command]);
binding.useEffect(_fun91012, [currentOption]);
binding.useEffect(_fun91013, [property3, styles]);
const value9 = binding.useMemo(_fun91015, [section,
(require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun91014)]);
const env0_14 = binding.useCallback(_fun91016, []);
const r12 = currentOption?.name != null ? optionStates[currentOption?.name] : undefined;
const items2 = [value9 != null && ((Component) => <Component style={styles.applicationIcon} source={value9} />)(importDefault(5475) /* metro dependency 5475: FastImage */)];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <Text style={styles.applicationName} lineClamp={1} variant="text-sm/semibold" color="mobile-text-heading-primary">{'/ ' + command.displayName}</Text>;
items2[2] = command.options?.map(_fun91017);
if (property) {
jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
items3 = [<View style={[styles.applicationOptionalOptionsDivider,
!property2 && styles.applicationOptionalOptionsDividerWithNoRequired]} />];
var textProps = {'style': null, 'lineClamp': 1, 'variant': 'eyebrow', 'color': 'text-muted',
style: styles.applicationOptionalOptionsIndicator};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items3[1] = <Text {...textProps}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.U19GM3)}</Text>;
items3[2] = command.options?.map(_fun91020);
r7 = <>{items3}</>;
} else {
r7 = null;
}
items2[3] = r7;
const items4 = [<ScrollView ref={value4} contentContainerStyle={styles.applicationTopWrapperScrollView} keyboardShouldPersistTaps="always" showsHorizontalScrollIndicator={false} horizontal>{items2}</ScrollView>];
const FormDivider = (require(7972) /* metro dependency 7972: native */).FormDivider;
items4[1] = <FormDivider style={styles.applicationDescriptionDivider} />;
items4[2] = <ApplicationCommandOptionDescription command={command} option={currentOption} optionState={r12} />;
items4[3] = <FormDivider style={styles.applicationDescriptionDivider} />;
return (
<View style={styles.applicationCommandBar}>
{items4}
</View>
);
}
function _fun91006() { // fn#91006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:3159, offset: 0x0204fea4, size: 90 bytes, params: 1, frame: 12
if (env0_1 !== option) {
env0_5(0);
env0_6(0);
env0_3(undefined);
} else if (env0_4 > 0 && env0_7 === 0) {
env0_3(1);
}
}
function _fun91007() { // fn#91007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:3243, offset: 0x0204fefe, size: 29 bytes, params: 1, frame: 11
const binding = env0_3;
const value = 1;
binding(value !== env0_2 ? value : undefined);
}
function ApplicationCommandOptionDescriptionOnLayout({nativeEvent}) { // fn#91008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:3293, owner: ApplicationCommandOptionDescription.onLayout, offset: 0x0204ff1b, size: 86 bytes, params: 2, frame: 13
const height = nativeEvent.layout.height;
const Math = global.Math;
const value = Math.trunc(height);
if (env0_2 === undefined || value > env0_4) {
env0_5(value);
}
env0_6(value);
}
function _fun91010() { // fn#91010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4365, offset: 0x020503a6, size: 77 bytes, params: 1, frame: 13
const env0_0 = false;
const env0_1 = false;
const options = command.options;
if (options != null) {
options.forEach(_fun91011);
}
env0_9(env0_0);
env0_10(env0_1);
}
function _fun91012() { // fn#91012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4481, offset: 0x02050416, size: 40 bytes, params: 1, frame: 13
const binding = env0_12;
const currentOptionBinding = currentOption;
const value2 = undefined;
binding(currentOptionBinding == null ? value2 : currentOption.name);
return value2;
}
function _fun91013() { // fn#91013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4531, offset: 0x0205043e, size: 104 bytes, params: 1, frame: 13
var current;
const value2 = null;
const r4 = value2 != env0_11 ? env0_8.current[env0_11] : value2;
if (value2 != r4) {
current = env0_7.current;
if (value2 != current) {
current.scrollTo({x: r4.x - styles.applicationTopWrapperScrollView.paddingHorizontal, animated: true});
);
if (property3 === property2) {
r8 = null;
} else {
value = importDefault(11870) /* metro dependency 11870: DescriptionEllipsis */;
value = ((Component) => <Component style={styles.descriptionEllipsis} dotStyle={styles.descriptionEllipsisDots} />)(value);
r8 = value;
}
}
}
function _fun91014() { // fn#91014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4734, offset: 0x020504a6, size: 79 bytes, params: 1, frame: 13
var value3;
if (guildId != null) {
if (section?.botId != null) {
value3 = environment.__proto__;
return GuildMemberStore.getMember(guildId, section.botId);
return (
<PressableOpacity
accessibilityRole={r6}
disabled={r5}
onPress={value9}
>
<View style={styles.optionDescriptionContainer}>
{view}
{r8}
</View>
</PressableOpacity>
);
function _fun91006() { // fn#91006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:3159, offset: 0x0204fea4, size: 90 bytes, params: 1, frame: 12
if (env0_1 !== option) {
env0_5(0);
env0_6(0);
env0_3(undefined);
} else if (ReactModule > 0 && env0_7 === 0) {
env0_3(1);
}
}
function _fun91007() { // fn#91007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:3243, offset: 0x0204fefe, size: 29 bytes, params: 1, frame: 11
const binding = env0_3;
const value = 1;
binding(value !== env0_2 ? value : undefined);
}
function ApplicationCommandOptionDescriptionOnLayout({nativeEvent}) { // fn#91008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:3293, owner: ApplicationCommandOptionDescription.onLayout, offset: 0x0204ff1b, size: 86 bytes, params: 2, frame: 13
const height = nativeEvent.layout.height;
const Math = global.Math;
const value = Math.trunc(height);
if (env0_2 === undefined || value > ReactModule) {
env0_5(value);
}
env0_6(value);
}
}
}
function _fun91015() { // fn#91015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4828, offset: 0x020504f5, size: 50 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (require(11752) /* metro dependency 11752: ApplicationCommandUtils */).getApplicationCommandsIconSource(section,
member);
}
function _default_91009({command, section, guildId, currentOption, optionStates, onPressOption}) { // fn#91009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4105, offset: 0x0204ff71, size: 1077 bytes, params: 2, frame: 36
var r7;
var jsxRuntimeEnv0_9Binding;
var items3;
var intl;
const currentOption2 = currentOption;
const optionStates2 = optionStates;
const styles = useStyles();
const binding = optionStates2;
const value4 = binding.useRef(null);
const env0_8 = binding.useRef({});
let useState = binding.useState;
const value5 = Reflect.apply(useState, binding, [false]);
const binding2 = currentOption2;
const value6 = binding2(value5, 2);
const property = value6[0];
const env0_9 = value6[1];
useState = binding.useState;
const value7 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value7[0];
const env0_10 = value7[1];
useState = binding.useState;
const value8 = binding2(Reflect.apply(useState, binding, []), 2);
const property3 = value8[0];
const env0_12 = value8[1];
binding.useEffect(_fun91010, [command]);
binding.useEffect(_fun91012, [currentOption]);
binding.useEffect(_fun91013, [property3, styles]);
const value9 = binding.useMemo(_fun91015, [section,
(FluxModule).useStateFromStores([GuildMemberStore], _fun91014)]);
const env0_14 = binding.useCallback(_fun91016, []);
const r12 = currentOption?.name != null ? optionStates[currentOption?.name] : undefined;
const items2 = [
value9 != null && ((Component) => <Component style={styles.applicationIcon} source={value9} />)(importDefault(5475) /* metro dependency 5475: FastImage */),
];
const Text = (TextModule).Text;
items2[1] = (
<Text
style={styles.applicationName}
lineClamp={1}
variant="text-sm/semibold"
color="mobile-text-heading-primary"
>
{'/ ' + command.displayName}
</Text>
);
items2[2] = command.options?.map(_fun91017);
if (property) {
jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
items3 = [
<View
style={[styles.applicationOptionalOptionsDivider,
!property2 && styles.applicationOptionalOptionsDividerWithNoRequired]}
/>,
];
var textProps = {'style': null, 'lineClamp': 1, 'variant': 'eyebrow', 'color': 'text-muted',
style: styles.applicationOptionalOptionsIndicator};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items3[1] = (
<Text {...textProps}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.U19GM3)}
</Text>
);
items3[2] = command.options?.map(_fun91020);
r7 = (
<>
{items3}
</>
);
} else {
r7 = null;
}
items2[3] = r7;
const items4 = [
<ScrollView
ref={value4}
contentContainerStyle={styles.applicationTopWrapperScrollView}
keyboardShouldPersistTaps="always"
showsHorizontalScrollIndicator={false}
horizontal
>
{items2}
</ScrollView>,
];
const FormDivider = (NativeModule2).FormDivider;
items4[1] = <FormDivider style={styles.applicationDescriptionDivider} />;
items4[2] = (
<ApplicationCommandOptionDescription
command={command}
option={currentOption}
optionState={r12}
/>
);
items4[3] = <FormDivider style={styles.applicationDescriptionDivider} />;
return (
<View style={styles.applicationCommandBar}>
{items4}
</View>
);
function _fun91010() { // fn#91010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4365, offset: 0x020503a6, size: 77 bytes, params: 1, frame: 13
const env0_0 = false;
const env0_1 = false;
const options = command.options;
if (options != null) {
options.forEach(_fun91011);
}
env0_9(env0_0);
env0_10(env0_1);
function _fun91011({required}) { // fn#91011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4418, offset: 0x020503f3, size: 35 bytes, params: 2, frame: 2
if (required !== true) {
}
}
function _fun91016({nativeEvent}, {name}) { // fn#91016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4904, offset: 0x02050527, size: 75 bytes, params: 3, frame: 6
const binding = env0_8;
const current = binding.current;
current[name] = {x: nativeEvent.layout.x, width: nativeEvent.layout.width};
binding.current = current;
}
}
function _fun91012() { // fn#91012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4481, offset: 0x02050416, size: 40 bytes, params: 1, frame: 13
const binding = env0_12;
const currentOptionBinding = currentOption;
const value2 = undefined;
binding(currentOptionBinding == null ? value2 : currentOption.name);
return value2;
}
function _fun91013() { // fn#91013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4531, offset: 0x0205043e, size: 104 bytes, params: 1, frame: 13
var current;
const value2 = null;
const r4 = value2 != env0_11 ? env0_8.current[env0_11] : value2;
if (value2 != r4) {
current = env0_7.current;
if (value2 != current) {
current.scrollTo({x: r4.x - styles.applicationTopWrapperScrollView.paddingHorizontal, animated: true});
}
}
}
function _fun91014() { // fn#91014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4734, offset: 0x020504a6, size: 79 bytes, params: 1, frame: 13
var value3;
var guildMemberStoreBinding;
if (guildId != null) {
if (section?.botId != null) {
value3 = environment.__proto__;
guildMemberStoreBinding = GuildMemberStore;
return guildMemberStoreBinding.getMember(guildId, section.botId);
}
}
}
function _fun91015() { // fn#91015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4828, offset: 0x020504f5, size: 50 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (ApplicationCommandUtilsModule).getApplicationCommandsIconSource(section,
member);
}
function _fun91016({nativeEvent}, {name}) { // fn#91016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4904, offset: 0x02050527, size: 75 bytes, params: 3, frame: 6
const binding = env0_8;
const current = binding.current;
current[name] = {x: nativeEvent.layout.x, width: nativeEvent.layout.width};
binding.current = current;
}
function _fun91017(a0) { // fn#91017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:5518, offset: 0x02050572, size: 98 bytes, params: 2, frame: 18
var environment;
var r0;
var object;
var optionStatesBinding;
var name;
const env0_0 = a0;
const required = a0.required;
let value = null;
if (required) {
value = environment.__proto__;
object = {option: a0, onPress: onPress_91018};
optionStatesBinding = optionStates;
name = a0.name;
object.optionState = optionStatesBinding[name];
object.onLayout = onLayout_91019;
name = a0.name;
value = <ApplicationCommandOptionItem {...object} key={name} />;
r0 = value;
} else {
r0 = value;
}
return r0;
function onPress_91018() { // fn#91018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:5581, offset: 0x020505d4, size: 38 bytes, params: 1, frame: 12
const value = environment.__proto__;
return onPressOption?.(env0_0);
}
function onLayout_91019(a0) { // fn#91019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:5636, offset: 0x020505fa, size: 27 bytes, params: 2, frame: 13
return env1_14(a0, env0_0);
}
}
function _fun91020(a0) { // fn#91020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:5977, offset: 0x02050615, size: 98 bytes, params: 2, frame: 18
var environment;
var r0;
var object;
var optionStatesBinding;
var name;
const env0_0 = a0;
const required = a0.required;
let value = null;
if (required) {
r0 = value;
} else {
value = environment.__proto__;
object = {option: a0, onPress: onPress_91021};
optionStatesBinding = optionStates;
name = a0.name;
object.optionState = optionStatesBinding[name];
object.onLayout = onLayout_91022;
name = a0.name;
value = <ApplicationCommandOptionItem {...object} key={name} />;
r0 = value;
}
return r0;
function onPress_91021() { // fn#91021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:6045, offset: 0x01bda28e, size: 23 bytes, params: 1, frame: 11
return onPressOption(env0_0);
}
function onLayout_91022(a0) { // fn#91022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:6085, offset: 0x020505fa, size: 27 bytes, params: 2, frame: 13
return env1_14(a0, env0_0);
}
}
function _fun91017(a0) { // fn#91017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:5518, offset: 0x02050572, size: 98 bytes, params: 2, frame: 18
var environment;
var r0;
var object2;
var optionStatesBinding;
var name;
const env0_0 = a0;
const required = a0.required;
let value = null;
if (required) {
value = environment.__proto__;
object2 = {option: a0, onPress: onPress_91018};
optionStatesBinding = optionStates;
name = a0.name;
object2.optionState = optionStatesBinding[name];
object2.onLayout = onLayout_91019;
name = a0.name;
value = <ApplicationCommandOptionItem {...object2} key={name} />;
r0 = value;
} else {
r0 = value;
}
return r0;
}
function _fun91020(a0) { // fn#91020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:5977, offset: 0x02050615, size: 98 bytes, params: 2, frame: 18
var environment;
var r0;
var object2;
var optionStatesBinding;
var name;
const env0_0 = a0;
const required = a0.required;
let value = null;
if (required) {
r0 = value;
} else {
value = environment.__proto__;
object2 = {option: a0, onPress: onPress_91021};
optionStatesBinding = optionStates;
name = a0.name;
object2.optionState = optionStatesBinding[name];
object2.onLayout = onLayout_91022;
name = a0.name;
value = <ApplicationCommandOptionItem {...object2} key={name} />;
r0 = value;
}
return r0;
}
function _fun91011({required}) { // fn#91011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:4418, offset: 0x020503f3, size: 35 bytes, params: 2, frame: 2
if (required !== true) {
}
}
function onPress_91018() { // fn#91018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:5581, offset: 0x020505d4, size: 38 bytes, params: 1, frame: 12
const value = environment.__proto__;
return onPressOption?.(env0_0);
}
function onLayout_91019(a0) { // fn#91019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12055:5636, offset: 0x020505fa, size: 27 bytes, params: 2, frame: 13
return env1_14(a0, env0_0);
}
global.__d(_fun91003, 11869, [57, 31, 27, 1945, 33, 4501, 697, 6235, 5278, 1244, 1305, 566, 11752, 5475, 4573, 7972,
6266, 11870,
2]) /* metro module 11869, dependencies: [57, 31, 27, 1945, 33, 4501, 697, 6235, 5278, 1244, 1305, 566, 11752, 5475, 4573, 7972, 6266, 11870, 2] */;
@@ -1,105 +1,113 @@
/* Metro module 7873; source: modules/application_commands/native/ApplicationCommandBuiltIns.tsx; dependencies: [3793, 1878, 5066, 1909, 5068, 1244, 4805, 4647, 4603, 7067, 2] */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
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 ServerModule from '../../../flow/Server.tsx'; /* Metro dependency 1909 */
import * as ApplicationCommandConstantsModule from '../ApplicationCommandConstants.tsx'; /* Metro dependency 5066 */
import * as ApplicationCommandTypesModule from '../ApplicationCommandTypes.tsx'; /* Metro dependency 5068 */
function _fun63116(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8051:6, offset: 0x01b70e18, size: 284 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const BuiltInSectionId = (require(5066) /* metro dependency 5066: ApplicationCommandConstants */).BuiltInSectionId;
object2 = {'id': '-15', 'untranslatedName': 'leave', 'displayName': 'leave'};
const ApplicationCommandType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandType;
const BuiltInSectionId = (ApplicationCommandConstantsModule).BuiltInSectionId;
object = {'id': '-15', 'untranslatedName': 'leave', 'displayName': 'leave'};
const ApplicationCommandType = (ServerModule).ApplicationCommandType;
const CHAT = ApplicationCommandType.CHAT;
object2.type = CHAT;
const ApplicationCommandInputType = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandInputType;
object.type = CHAT;
const ApplicationCommandInputType = (ApplicationCommandTypesModule).ApplicationCommandInputType;
let BUILT_IN = ApplicationCommandInputType.BUILT_IN;
object2.inputType = BUILT_IN;
object.inputType = BUILT_IN;
BUILT_IN = BuiltInSectionId.BUILT_IN;
object2.applicationId = BUILT_IN;
Object.defineProperty(object2, 'untranslatedDescription', {get: function() {
object.applicationId = BUILT_IN;
Object.defineProperty(object, 'untranslatedDescription', {get: function() {
return require(dependencyMap[5]).intl.string(require(dependencyMap[5]).t['26C4oi']);
}, set: undefined, enumerable: true, configurable: true});
Object.defineProperty(object2, 'displayDescription', {get: function() {
Object.defineProperty(object, 'displayDescription', {get: function() {
return require(dependencyMap[5]).intl.string(require(dependencyMap[5]).t['26C4oi']);
}, set: undefined, enumerable: true, configurable: true});
object2.predicate = function({channel}) {
object.predicate = function({channel}) {
return channel != null && channel.isGroupDM();
};
object2.execute = execute_63120;
const items2 = [object2];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationCommandBuiltIns.tsx');
object.execute = execute_63120;
const items2 = [object];
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/ApplicationCommandBuiltIns.tsx');
exports.default = items2;
}
function execute_63120(a0, {channel}) { // fn#63120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8051:533, offset: 0x01b70f8f, size: 457 bytes, params: 3, frame: 24
var r6;
var r7;
var channelName;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var object2;
var value2;
var format;
var SSIVOu;
var value4;
var defaultImport;
var show;
if (channel != null) {
channelName = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(channel, UserStore,
RelationshipStore);
value2 = intl.formatToPlainString(t.hJ5Ap4, {name: channelName});
format = intl.format;
SSIVOu = t.SSIVOu;
object2 = {name: channelName};
if (channel.isManaged()) {
value4 = intl.formatToPlainString(t.hVGjEW, {name: channelName});
r6 = intl.format(t.IK1Qvs, {name: channelName});
r7 = value4;
} else {
r6 = Reflect.apply(format, intl, [SSIVOu, object2]);
r7 = value2;
function execute_63120(a0, {channel}) { // fn#63120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8051:533, offset: 0x01b70f8f, size: 457 bytes, params: 3, frame: 24
var r6;
var r7;
var moduleValue;
var channelName;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var object;
var value2;
var format;
var SSIVOu;
var value4;
var defaultImport;
var show;
if (channel != null) {
moduleValue = require(4805) /* metro dependency 4805: useChannelName */;
channelName = moduleValue.computeChannelName(channel, UserStore, RelationshipStore);
value2 = intl.formatToPlainString(t.hJ5Ap4, {name: channelName});
format = intl.format;
SSIVOu = t.SSIVOu;
object = {name: channelName};
if (channel.isManaged()) {
value4 = intl.formatToPlainString(t.hVGjEW, {name: channelName});
r6 = intl.format(t.IK1Qvs, {name: channelName});
r7 = value4;
} else {
r6 = Reflect.apply(format, intl, [SSIVOu, object]);
r7 = value2;
}
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport.show;
object = {title: r7, body: r6};
object.confirmText = intl.string(t['26C4oi']);
object.cancelText = intl.string(t['ETE/oC']);
object.onConfirm = onConfirm_63121;
Reflect.apply(show, defaultImport, [object]);
}
function execute_63120OnConfirm() { // fn#63121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8051:986, owner: execute_63120.onConfirm, offset: 0x01b71158, size: 158 bytes, params: 1, frame: 18
var value;
var property;
var defaultImport;
var closePrivateChannel;
var value2;
var id;
var error;
var defaultImport2;
var sendBotMessage;
var value3;
var intl;
var string;
var t;
try {
value = environment.__proto__;
property = dependencyMap[8];
defaultImport = importDefault(property);
closePrivateChannel = defaultImport.closePrivateChannel;
value2 = environment;
id = channel.id;
Reflect.apply(closePrivateChannel, defaultImport, [id]);
} catch (error) {
defaultImport2 = importDefault(dependencyMap[9]);
sendBotMessage = defaultImport2.sendBotMessage;
value3 = environment;
id = channel.id;
intl = require(dependencyMap[5]).intl;
string = intl.string;
t = require(dependencyMap[5]).t;
Reflect.apply(sendBotMessage, defaultImport2, [id, Reflect.apply(string, intl, [t['YOsuT/']])]);
}
}
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport.show;
object2 = {title: r7, body: r6};
object2.confirmText = intl.string(t['26C4oi']);
object2.cancelText = intl.string(t['ETE/oC']);
object2.onConfirm = onConfirm;
Reflect.apply(show, defaultImport, [object2]);
}
}
function execute_63120OnConfirm() { // fn#63121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8051:986, owner: execute_63120.onConfirm, offset: 0x01b71158, size: 158 bytes, params: 1, frame: 18
var value;
var property;
var defaultImport;
var closePrivateChannel;
var value2;
var id;
var error;
var defaultImport2;
var sendBotMessage;
var value3;
var intl;
var string;
var t;
try {
value = environment.__proto__;
property = dependencyMap[8];
defaultImport = importDefault(property);
closePrivateChannel = defaultImport.closePrivateChannel;
value2 = environment;
id = channel.id;
Reflect.apply(closePrivateChannel, defaultImport, [id]);
} catch (error) {
defaultImport2 = importDefault(dependencyMap[9]);
sendBotMessage = defaultImport2.sendBotMessage;
value3 = environment;
id = channel.id;
intl = require(dependencyMap[5]).intl;
string = intl.string;
t = require(dependencyMap[5]).t;
Reflect.apply(sendBotMessage, defaultImport2, [id, Reflect.apply(string, intl, [t['YOsuT/']])]);
}
}
global.__d(_fun63116, 7873, [3793, 1878, 5066, 1909, 5068, 1244, 4805, 4647, 4603, 7067,
2]) /* metro module 7873, dependencies: [3793, 1878, 5066, 1909, 5068, 1244, 4805, 4647, 4603, 7067, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,82 +1,121 @@
/* Metro module 11867; source: modules/application_commands/native/ApplicationCommandItem.tsx; dependencies: [31, 27, 1945, 11018, 33, 4501, 697, 4584, 566, 11752, 5278, 1244, 5475, 4573, 2] */
import GuildMemberStore from '../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as UseFontScaleModule from '../../screen/native/useFontScale.tsx'; /* Metro dependency 4584 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as ApplicationCommandsConstantsModule from './ApplicationCommandsConstants.tsx'; /* Metro dependency 11018 */
import * as ApplicationCommandUtilsModule from './ApplicationCommandUtils.tsx'; /* Metro dependency 11752 */
function _fun90990(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12053:6, offset: 0x0204ed84, size: 243 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const env0_6 = (require(11018) /* metro dependency 11018: ApplicationCommandsConstants */).AUTOCOMPLETE_ROW_HEIGHT;
const value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun90991);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationCommandItem.tsx');
const env0_9 = (CreateStylesModule).createStyles(_fun90991);
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/ApplicationCommandItem.tsx');
exports.default = _default_90992;
}
function _fun90991(a0) { // fn#90991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12053:216, offset: 0x0204ee77, size: 187 bytes, params: 2, frame: 16
const object3 = {};
const object5 = {'flexDirection': 'row', 'paddingVertical': 8, 'paddingHorizontal': 16, 'alignItems': 'center'};
const Math = global.Math;
object5.height = Math.max(a0 * AUTOCOMPLETE_ROW_HEIGHT, AUTOCOMPLETE_ROW_HEIGHT);
object3.applicationCommandItem = object5;
const INTERACTIVE_BACKGROUND_HOVER = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_HOVER;
object3.highlightedApplicationCommandItem = {backgroundColor: INTERACTIVE_BACKGROUND_HOVER};
const object6 = {'width': 32, 'height': 32, 'borderRadius': null, 'marginRight': 16};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object3.applicationCommandIcon = object6;
object3.applicationCommandDescriptionWrapper = {'flexDirection': 'column', 'flexShrink': 1, 'alignSelf': 'flex-end'};
object3.applicationCommandSectionName = {'paddingLeft': 16, 'marginLeft': 'auto'};
return object3;
}
function _default_90992({command, onPress, section, guildId, showIcon, highlighted}) { // fn#90992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12053:707, offset: 0x0204ef32, size: 688 bytes, params: 2, frame: 28
showIcon = showIcon === undefined || showIcon;
highlighted = !(highlighted === undefined) && highlighted;
const styles = useStyles((require(4584) /* metro dependency 4584: useFontScale */).useFontScale());
const member = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun90993);
const value6 = env0_3.useMemo(_fun90994, [section, member]);
const r8 = member?.nick != null ? member.nick : section?.name;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const eo8b3e = (require(1244) /* metro dependency 1244: indexNative */).t.eo8b3e;
const object = {applicationName: r8};
object.commandDescription = command.displayDescription;
object.commandName = command.displayName;
const object4 = {};
copyDataProperties(object4, styles.applicationCommandItem, undefined);
copyDataProperties(object4, highlighted ? styles.highlightedApplicationCommandItem : {}, undefined);
const items2 = [showIcon && value6 != null && ((Component) => <Component style={styles.applicationCommandIcon} source={value6} />)(importDefault(5475) /* metro dependency 5475: FastImage */)];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <View style={styles.applicationCommandDescriptionWrapper}><Text lineClamp={1} variant="text-md/semibold" color="mobile-text-heading-primary">{'/ ' + command.displayName}</Text><Text lineClamp={1} variant="text-xs/medium" color="text-default">{command.displayDescription}</Text></View>;
items2[2] = <Text style={styles.applicationCommandSectionName} variant="eyebrow" color="text-muted">{r8}</Text>;
return (
<PressableOpacity
accessibilityLabel={Reflect.apply(formatToPlainString, intl, [eo8b3e, object])}
style={object4}
accessibilityRole="button"
onPress={onPress}
>
{items2}
</PressableOpacity>
);
}
function _fun90993() { // fn#90993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12053:854, offset: 0x0204f1e2, size: 79 bytes, params: 1, frame: 13
var value3;
if (guildId != null) {
if (section?.botId != null) {
value3 = environment.__proto__;
return GuildMemberStore.getMember(guildId, section.botId);
}
function _fun90991(a0) { // fn#90991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12053:216, offset: 0x0204ee77, size: 187 bytes, params: 2, frame: 16
const object = {};
const object2 = {'flexDirection': 'row', 'paddingVertical': 8, 'paddingHorizontal': 16, 'alignItems': 'center'};
const Math = global.Math;
object2.height = Math.max(a0 * AUTOCOMPLETE_ROW_HEIGHT, AUTOCOMPLETE_ROW_HEIGHT);
object.applicationCommandItem = object2;
const INTERACTIVE_BACKGROUND_HOVER = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_HOVER;
object.highlightedApplicationCommandItem = {backgroundColor: INTERACTIVE_BACKGROUND_HOVER};
const object4 = {'width': 32, 'height': 32, 'borderRadius': null, 'marginRight': 16};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object.applicationCommandIcon = object4;
object.applicationCommandDescriptionWrapper = {'flexDirection': 'column', 'flexShrink': 1, 'alignSelf': 'flex-end'};
object.applicationCommandSectionName = {'paddingLeft': 16, 'marginLeft': 'auto'};
return object;
}
function _default_90992({command, onPress, section, guildId, showIcon, highlighted}) { // fn#90992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12053:707, offset: 0x0204ef32, size: 688 bytes, params: 2, frame: 28
showIcon = showIcon === undefined || showIcon;
highlighted = !(highlighted === undefined) && highlighted;
const styles = useStyles((UseFontScaleModule).useFontScale());
const member = (FluxModule).useStateFromStores([GuildMemberStore], _fun90993);
const value6 = ReactModule.useMemo(_fun90994, [section, member]);
const r8 = member?.nick != null ? member.nick : section?.name;
const PressableOpacity = (PressablesModule).PressableOpacity;
const intl = (IndexNativeModule).intl;
const formatToPlainString = intl.formatToPlainString;
const eo8b3e = (IndexNativeModule).t.eo8b3e;
const object2 = {applicationName: r8};
object2.commandDescription = command.displayDescription;
object2.commandName = command.displayName;
const object3 = {};
copyDataProperties(object3, styles.applicationCommandItem, undefined);
copyDataProperties(object3, highlighted ? styles.highlightedApplicationCommandItem : {}, undefined);
const items2 = [
showIcon && value6 != null && ((Component) => <Component style={styles.applicationCommandIcon} source={value6} />)(importDefault(5475) /* metro dependency 5475: FastImage */),
];
const Text = (TextModule).Text;
items2[1] = (
<View style={styles.applicationCommandDescriptionWrapper}>
<Text
lineClamp={1}
variant="text-md/semibold"
color="mobile-text-heading-primary"
>
{'/ ' + command.displayName}
</Text>
<Text
lineClamp={1}
variant="text-xs/medium"
color="text-default"
>
{command.displayDescription}
</Text>
</View>
);
items2[2] = (
<Text
style={styles.applicationCommandSectionName}
variant="eyebrow"
color="text-muted"
>
{r8}
</Text>
);
return (
<PressableOpacity
accessibilityLabel={Reflect.apply(formatToPlainString, intl, [eo8b3e, object2])}
style={object3}
accessibilityRole="button"
onPress={onPress}
>
{items2}
</PressableOpacity>
);
function _fun90993() { // fn#90993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12053:854, offset: 0x0204f1e2, size: 79 bytes, params: 1, frame: 13
var value3;
var guildMemberStoreBinding;
if (guildId != null) {
if (section?.botId != null) {
value3 = environment.__proto__;
guildMemberStoreBinding = GuildMemberStore;
return guildMemberStoreBinding.getMember(guildId, section.botId);
}
}
}
function _fun90994() { // fn#90994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12053:948, offset: 0x0204f231, size: 50 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (ApplicationCommandUtilsModule).getApplicationCommandsIconSource(section,
member);
}
}
}
function _fun90994() { // fn#90994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12053:948, offset: 0x0204f231, size: 50 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (require(11752) /* metro dependency 11752: ApplicationCommandUtils */).getApplicationCommandsIconSource(section,
member);
}
global.__d(_fun90990, 11867, [31, 27, 1945, 11018, 33, 4501, 697, 4584, 566, 11752, 5278, 1244, 5475, 4573,
2]) /* metro module 11867, dependencies: [31, 27, 1945, 11018, 33, 4501, 697, 4584, 566, 11752, 5278, 1244, 5475, 4573, 2] */;
@@ -1,76 +1,84 @@
/* Metro module 11868; source: modules/application_commands/native/ApplicationCommandList.tsx; dependencies: [31, 27, 11018, 33, 8060, 1909, 7869, 5068, 11866, 11867, 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 */
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 ServerModule from '../../../flow/Server.tsx'; /* Metro dependency 1909 */
import * as ApplicationCommandTypesModule from '../ApplicationCommandTypes.tsx'; /* Metro dependency 5068 */
import * as ApplicationCommandQueryTypesModule from '../ApplicationCommandQueryTypes.tsx'; /* Metro dependency 7869 */
import * as ApplicationCommandQueryApiModule from '../ApplicationCommandQueryApi.tsx'; /* Metro dependency 8060 */
import * as ApplicationCommandsConstantsModule from './ApplicationCommandsConstants.tsx'; /* Metro dependency 11018 */
function _fun90995(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12054:6, offset: 0x0204f263, size: 194 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).FlatList;
const AUTOCOMPLETE_ROW_HEIGHT = (require(11018) /* metro dependency 11018: ApplicationCommandsConstants */).AUTOCOMPLETE_ROW_HEIGHT;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const AUTOCOMPLETE_ROW_HEIGHT = (ApplicationCommandsConstantsModule).AUTOCOMPLETE_ROW_HEIGHT;
const env0_7 = 3 * AUTOCOMPLETE_ROW_HEIGHT;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationCommandList.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/ApplicationCommandList.tsx');
exports.default = _default_90996;
}
function _default_90996({style, channel, onPressCommandItem, query, ItemSeparatorComponent, getItemLayout, onCommandsChange}) { // fn#90996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12054:188, offset: 0x0204f325, size: 406 bytes, params: 2, frame: 27
const useQuery = ApplicationCommandQueryApiModule.useQuery;
const object = {channel: channel, type: 'channel'};
const object2 = {text: query};
const ApplicationCommandType = (ServerModule).ApplicationCommandType;
const CHAT = ApplicationCommandType.CHAT;
object2.commandTypes = [CHAT];
const ScoreMethod = (ApplicationCommandQueryTypesModule).ScoreMethod;
const COMMAND_OR_APPLICATION = ScoreMethod.COMMAND_OR_APPLICATION;
const value3 = Reflect.apply(useQuery, ApplicationCommandQueryApiModule, [object, object2, {'placeholderCount': 3,
'limit': 7, scoreMethod: COMMAND_OR_APPLICATION}]);
const commands = value3.commands;
const sections = value3.sections;
const sections2 = sections;
const scrollDown = value3.scrollDown;
const binding = sections2;
const value4 = binding.useCallback(_fun90997, [sections, channel.guild_id, onPressCommandItem]);
binding.useEffect(_fun91000, [commands?.length, onCommandsChange]);
return (
<FlatList
style={style}
keyExtractor={function(a0) {
return a0.id;
}}
data={commands}
renderItem={value4}
ItemSeparatorComponent={ItemSeparatorComponent}
getItemLayout={getItemLayout}
onScroll={sections2.useCallback(_fun91001, [scrollDown])}
/>
);
function _fun90997({item, index}) { // fn#90997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12054:554, offset: 0x0204f4bb, size: 230 bytes, params: 2, frame: 20
const inputType = item.inputType;
const ApplicationCommandInputType = (ApplicationCommandTypesModule).ApplicationCommandInputType;
const PLACEHOLDER = ApplicationCommandInputType.PLACEHOLDER;
if (inputType === PLACEHOLDER) {
return ((Component) => <Component />)(importDefault(11866) /* metro dependency 11866: ApplicationCommandLoadingItem */);
}
return ((Component) => <Component command={item} section={sections?.find(function({id}) {
return id === item.applicationId;
})} onPress={onPress_90999} guildId={channel.guild_id} highlighted={index === 0} />)(importDefault(11867) /* metro dependency 11867: ApplicationCommandItem */);
function onPress_90999() { // fn#90999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12054:764, offset: 0x0204f5a1, size: 28 bytes, params: 1, frame: 13
return onPressCommandItem(item, env0_1);
}
function _default_90996({style, channel, onPressCommandItem, query, ItemSeparatorComponent, getItemLayout, onCommandsChange}) { // fn#90996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12054:188, offset: 0x0204f325, size: 406 bytes, params: 2, frame: 27
const applicationCommandQueryApiModule = importAll(8060) /* metro dependency 8060: ApplicationCommandQueryApi */;
const useQuery = applicationCommandQueryApiModule.useQuery;
const object3 = {channel: channel, type: 'channel'};
const object4 = {text: query};
const ApplicationCommandType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandType;
const CHAT = ApplicationCommandType.CHAT;
object4.commandTypes = [CHAT];
const ScoreMethod = (require(7869) /* metro dependency 7869: ApplicationCommandQueryTypes */).ScoreMethod;
const COMMAND_OR_APPLICATION = ScoreMethod.COMMAND_OR_APPLICATION;
const value3 = Reflect.apply(useQuery, applicationCommandQueryApiModule, [object3, object4, {'placeholderCount': 3,
'limit': 7, scoreMethod: COMMAND_OR_APPLICATION}]);
const commands = value3.commands;
const sections = value3.sections;
const env0_4 = sections;
const scrollDown = value3.scrollDown;
const binding = env0_4;
const value4 = binding.useCallback(_fun90997, [sections, channel.guild_id, onPressCommandItem]);
binding.useEffect(_fun91000, [commands?.length, onCommandsChange]);
return (
<FlatList
style={style}
keyExtractor={function(a0) {
return a0.id;
}}
data={commands}
renderItem={value4}
ItemSeparatorComponent={ItemSeparatorComponent}
getItemLayout={getItemLayout}
onScroll={env0_4.useCallback(_fun91001, [scrollDown])}
/>
);
}
}
function _fun91000() { // fn#91000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12054:847, offset: 0x0204f5bd, size: 62 bytes, params: 1, frame: 14
if (onCommandsChange != null) {
onCommandsChange(commands?.length ?? 0);
}
}
function _fun91001({nativeEvent}) { // fn#91001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12054:960, offset: 0x0204f5fb, size: 78 bytes, params: 2, frame: 10
if (nativeEvent.contentOffset.y + nativeEvent.layoutMeasurement.height >= nativeEvent.contentSize.height - env1_7) {
scrollDown();
}
}
function _fun90997({item, index}) { // fn#90997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12054:554, offset: 0x0204f4bb, size: 230 bytes, params: 2, frame: 20
const inputType = item.inputType;
const ApplicationCommandInputType = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandInputType;
const PLACEHOLDER = ApplicationCommandInputType.PLACEHOLDER;
if (inputType === PLACEHOLDER) {
return ((Component) => <Component />)(importDefault(11866) /* metro dependency 11866: ApplicationCommandLoadingItem */);
}
return ((Component) => <Component command={item} section={sections?.find(function({id}) {
return id === item.applicationId;
})} onPress={onPress_90999} guildId={channel.guild_id} highlighted={index === 0} />)(importDefault(11867) /* metro dependency 11867: ApplicationCommandItem */);
}
function _fun91000() { // fn#91000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12054:847, offset: 0x0204f5bd, size: 62 bytes, params: 1, frame: 14
if (onCommandsChange != null) {
onCommandsChange(commands?.length ?? 0);
}
}
function _fun91001({nativeEvent}) { // fn#91001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12054:960, offset: 0x0204f5fb, size: 78 bytes, params: 2, frame: 10
if (nativeEvent.contentOffset.y + nativeEvent.layoutMeasurement.height >= nativeEvent.contentSize.height - env1_7) {
scrollDown();
}
}
function onPress_90999() { // fn#90999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12054:764, offset: 0x0204f5a1, size: 28 bytes, params: 1, frame: 13
return onPressCommandItem(item, env0_1);
}
global.__d(_fun90995, 11868, [31, 27, 11018, 33, 8060, 1909, 7869, 5068, 11866, 11867,
2]) /* metro module 11868, dependencies: [31, 27, 11018, 33, 8060, 1909, 7869, 5068, 11866, 11867, 2] */;
@@ -1,48 +1,58 @@
/* Metro module 11866; source: modules/application_commands/native/ApplicationCommandLoadingItem.tsx; dependencies: [31, 27, 11018, 33, 4501, 697, 4584, 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 */
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 UseFontScaleModule from '../../screen/native/useFontScale.tsx'; /* Metro dependency 4584 */
import * as ApplicationCommandsConstantsModule from './ApplicationCommandsConstants.tsx'; /* Metro dependency 11018 */
function _fun90987(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12052:6, offset: 0x0204eb0e, size: 223 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(27) /* metro dependency 27 */).View;
const env0_4 = (require(11018) /* metro dependency 11018: ApplicationCommandsConstants */).AUTOCOMPLETE_ROW_HEIGHT;
const value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun90988);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationCommandLoadingItem.tsx');
ReactModule;
const env0_7 = (CreateStylesModule).createStyles(_fun90988);
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/ApplicationCommandLoadingItem.tsx');
exports.default = _default_90989;
function _fun90988(a0) { // fn#90988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12052:209, offset: 0x0204ebed, size: 227 bytes, params: 2, frame: 16
const object = {};
const object2 = {'flexDirection': 'row', 'paddingVertical': 4, 'paddingHorizontal': 16, 'alignItems': 'center'};
const Math = global.Math;
object2.height = Math.max(a0 * AUTOCOMPLETE_ROW_HEIGHT, AUTOCOMPLETE_ROW_HEIGHT);
object.applicationCommandLoadingItem = object2;
object.applicationCommandLoadingLeftWrapper = {'flexDirection': 'column', 'width': '75%', 'height': '100%',
'justifyContent': 'space-between'};
let BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object.applicationCommandLoadingName = {'backgroundColor': null, 'height': 16, 'borderRadius': 16, 'width': '20%',
backgroundColor: BACKGROUND_MOD_STRONG};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.applicationCommandLoadingDescription = {'backgroundColor': null, 'height': 16, 'borderRadius': 16,
'width': '80%', backgroundColor: BACKGROUND_BASE_LOW};
BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object.applicationCommandLoadingSectionName = {'backgroundColor': null, 'paddingLeft': 16, 'width': '25%',
'marginLeft': 'auto', 'height': 16, 'borderRadius': 16, backgroundColor: BACKGROUND_MOD_STRONG};
return object;
}
function _default_90989() { // fn#90989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12052:888, offset: 0x0204ecd0, size: 180 bytes, params: 1, frame: 19
const styles = useStyles((UseFontScaleModule).useFontScale());
let view = <View style={styles.applicationCommandLoadingName} />;
view = (
<View style={styles.applicationCommandLoadingLeftWrapper}>
{view}
<View style={styles.applicationCommandLoadingDescription} />
</View>
);
return (
<View style={styles.applicationCommandLoadingItem}>
{view}
<View style={styles.applicationCommandLoadingSectionName} />
</View>
);
}
}
function _fun90988(a0) { // fn#90988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12052:209, offset: 0x0204ebed, size: 227 bytes, params: 2, frame: 16
const object3 = {};
const object4 = {'flexDirection': 'row', 'paddingVertical': 4, 'paddingHorizontal': 16, 'alignItems': 'center'};
const Math = global.Math;
object4.height = Math.max(a0 * AUTOCOMPLETE_ROW_HEIGHT, AUTOCOMPLETE_ROW_HEIGHT);
object3.applicationCommandLoadingItem = object4;
object3.applicationCommandLoadingLeftWrapper = {'flexDirection': 'column', 'width': '75%', 'height': '100%',
'justifyContent': 'space-between'};
let BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object3.applicationCommandLoadingName = {'backgroundColor': null, 'height': 16, 'borderRadius': 16, 'width': '20%',
backgroundColor: BACKGROUND_MOD_STRONG};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object3.applicationCommandLoadingDescription = {'backgroundColor': null, 'height': 16, 'borderRadius': 16,
'width': '80%', backgroundColor: BACKGROUND_BASE_LOW};
BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object3.applicationCommandLoadingSectionName = {'backgroundColor': null, 'paddingLeft': 16, 'width': '25%',
'marginLeft': 'auto', 'height': 16, 'borderRadius': 16, backgroundColor: BACKGROUND_MOD_STRONG};
return object3;
}
function _default_90989() { // fn#90989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12052:888, offset: 0x0204ecd0, size: 180 bytes, params: 1, frame: 19
const styles = useStyles((require(4584) /* metro dependency 4584: useFontScale */).useFontScale());
let view = <View style={styles.applicationCommandLoadingName} />;
view = <View style={styles.applicationCommandLoadingLeftWrapper}>{view}<View style={styles.applicationCommandLoadingDescription} /></View>;
return (
<View style={styles.applicationCommandLoadingItem}>
{view}
<View style={styles.applicationCommandLoadingSectionName} />
</View>
);
}
global.__d(_fun90987, 11866, [31, 27, 11018, 33, 4501, 697, 4584,
2]) /* metro module 11866, dependencies: [31, 27, 11018, 33, 4501, 697, 4584, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,80 +1,87 @@
/* Metro module 11752; source: modules/application_commands/native/ApplicationCommandUtils.tsx; dependencies: [4645, 4644, 5066, 1423, 11753, 11754, 5068, 1860, 11093, 7879, 2] */
import UploadAttachmentStore from '../../../stores/UploadAttachmentStore.tsx'; /* Metro dependency 4644 */
import UploadAttachmentActionCreators from '../../../actions/UploadAttachmentActionCreators.tsx'; /* Metro dependency 7879 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as DraftStoreModule from '../../../stores/DraftStore.tsx'; /* Metro dependency 4645 */
import * as ApplicationCommandConstantsModule from '../ApplicationCommandConstants.tsx'; /* Metro dependency 5066 */
import * as ApplicationCommandTypesModule from '../ApplicationCommandTypes.tsx'; /* Metro dependency 5068 */
function _fun90058(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11938:6, offset: 0x02028f7a, size: 175 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(4645) /* metro dependency 4645: DraftStore */).DraftType;
const uploadAttachmentStore = importDefault(4644) /* metro dependency 4644: UploadAttachmentStore */;
const env0_5 = (require(5066) /* metro dependency 5066: ApplicationCommandConstants */).BuiltInSectionId;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationCommandUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/ApplicationCommandUtils.tsx');
exports.getApplicationCommandsIconSource = getApplicationCommandsIconSource;
exports.openCommandAttachmentPreview = openCommandAttachmentPreview;
}
function getApplicationCommandsIconSource(a0, a1) { // fn#90059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11938:286, offset: 0x02029029, size: 308 bytes, params: 3, frame: 17
var r2;
var getApplicationIconSource;
var application;
if (a0 == null) {
return null;
}
const id = a0.id;
var value;
const BUILT_IN = BuiltInSectionId.BUILT_IN;
if (BUILT_IN === id) {
return (importDefault(1423) /* metro dependency 1423: AvatarUtils */).makeSource(importDefault(11753) /* metro dependency 11753 */);
}
const FRECENCY = BuiltInSectionId.FRECENCY;
if (FRECENCY === id) {
return (importDefault(1423) /* metro dependency 1423: AvatarUtils */).makeSource(importDefault(11754) /* metro dependency 11754 */);
}
const type = a0.type;
const value2 = undefined;
const ApplicationCommandSectionType = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandSectionType;
const APPLICATION = ApplicationCommandSectionType.APPLICATION;
if (type === APPLICATION) {
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
getApplicationIconSource = value.getApplicationIconSource;
application = a0.application;
value = Reflect.apply(getApplicationIconSource, value, [{id: a0.id, icon: a0.icon,
bot: application == null ? value2 : application.bot, botIconFirst: true, guildMember: a1}]);
r2 = value;
} else {
r2 = importDefault(1860) /* metro dependency 1860 */;
}
return r2;
}
function openCommandAttachmentPreview(a0, a1, a2, a3) { // fn#90060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11938:671, offset: 0x0202915d, size: 132 bytes, params: 5, frame: 17
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const getUpload = UploadAttachmentStore.getUpload;
const SlashCommand = DraftType.SlashCommand;
const value2 = Reflect.apply(getUpload, UploadAttachmentStore, [a1, a2, SlashCommand]);
if (value2 != null) {
(importDefault(11093) /* metro dependency 11093: showUploadPreviewActionSheet */)({channelId: a1,
disableSpoiler: true, onClose: a3, onRemove: onRemove, upload: value2});
}
}
function openCommandAttachmentPreviewOnRemove() { // fn#90061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11938:823, owner: openCommandAttachmentPreview.onRemove, offset: 0x020291e1, size: 189 bytes, params: 1, frame: 18
var environment;
const value = environment.__proto__;
const value2 = undefined;
const defaultImport = importDefault(7879) /* metro dependency 7879: UploadAttachmentActionCreators */;
const remove = defaultImport.remove;
const id = env0_3.id;
const SlashCommand = DraftType.SlashCommand;
Reflect.apply(remove, defaultImport, [require, id, SlashCommand]);
const r5 = env0_0 == null || env0_0.props.activeCommand == null || env0_0.props.activeCommand.options == null ? value2 : env0_0.props.activeCommand.options.find(function({name}) {
return name === importDefault;
});
if (r5 != null) {
if (env0_0 != null) {
env0_0.insertOrJumpCommandOption(r5, value2, false, {displayText: ''});
function getApplicationCommandsIconSource(a0, a1) { // fn#90059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11938:286, offset: 0x02029029, size: 308 bytes, params: 3, frame: 17
var r2;
var getApplicationIconSource;
var application;
if (a0 == null) {
return null;
}
const id = a0.id;
var value;
const BUILT_IN = BuiltInSectionId.BUILT_IN;
if (BUILT_IN === id) {
return (importDefault(1423) /* metro dependency 1423: AvatarUtils */).makeSource(importDefault(11753) /* metro dependency 11753 */);
}
const FRECENCY = BuiltInSectionId.FRECENCY;
if (FRECENCY === id) {
return (importDefault(1423) /* metro dependency 1423: AvatarUtils */).makeSource(importDefault(11754) /* metro dependency 11754 */);
}
const type = a0.type;
const value2 = undefined;
const ApplicationCommandSectionType = (ApplicationCommandTypesModule).ApplicationCommandSectionType;
const APPLICATION = ApplicationCommandSectionType.APPLICATION;
if (type === APPLICATION) {
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
getApplicationIconSource = value.getApplicationIconSource;
application = a0.application;
value = Reflect.apply(getApplicationIconSource, value, [{id: a0.id, icon: a0.icon,
bot: application == null ? value2 : application.bot, botIconFirst: true, guildMember: a1}]);
r2 = value;
} else {
r2 = importDefault(1860) /* metro dependency 1860 */;
}
return r2;
}
return value2;
function openCommandAttachmentPreview(a0, a1, a2, a3) { // fn#90060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11938:671, offset: 0x0202915d, size: 132 bytes, params: 5, frame: 17
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const uploadAttachmentStoreBinding = UploadAttachmentStore;
const getUpload = uploadAttachmentStoreBinding.getUpload;
const SlashCommand = DraftType.SlashCommand;
const value2 = Reflect.apply(getUpload, uploadAttachmentStoreBinding, [a1, a2, SlashCommand]);
if (value2 != null) {
(importDefault(11093) /* metro dependency 11093: showUploadPreviewActionSheet */)({channelId: a1,
disableSpoiler: true, onClose: a3, onRemove: onRemove_90061, upload: value2});
}
function openCommandAttachmentPreviewOnRemove() { // fn#90061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11938:823, owner: openCommandAttachmentPreview.onRemove, offset: 0x020291e1, size: 189 bytes, params: 1, frame: 18
var environment;
const value = environment.__proto__;
const value2 = undefined;
const defaultImport = UploadAttachmentActionCreators;
const remove = defaultImport.remove;
const id = DraftStoreModule.DraftType.id;
const SlashCommand = DraftType.SlashCommand;
Reflect.apply(remove, defaultImport, [require, id, SlashCommand]);
const r5 = env0_0 == null || env0_0.props.activeCommand == null || env0_0.props.activeCommand.options == null ? value2 : env0_0.props.activeCommand.options.find(function({name}) {
return name === importDefault;
});
if (r5 != null) {
if (env0_0 != null) {
env0_0.insertOrJumpCommandOption(r5, value2, false, {displayText: ''});
}
}
return value2;
}
}
}
global.__d(_fun90058, 11752, [4645, 4644, 5066, 1423, 11753, 11754, 5068, 1860, 11093, 7879,
2]) /* metro module 11752, dependencies: [4645, 4644, 5066, 1423, 11753, 11754, 5068, 1860, 11093, 7879, 2] */;
@@ -1,4 +1,6 @@
/* Metro module 11695; source: modules/application_commands/native/ApplicationCommandValidationUtils.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun89658(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11881:6, offset: 0x02019297, size: 109 bytes, params: 8, frame: 16
const _arrayLikeToArray_89661 = function(a0, a1) {
var r0;
@@ -45,117 +47,123 @@ function _fun89658(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationCommandValidationUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/ApplicationCommandValidationUtils.tsx');
exports.getFirstInvalidOption = getFirstInvalidOption;
}
function _createForOfIteratorHelperLoose_89659(a0, a1) { // fn#89659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11881:46, offset: 0x02019304, 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_89659(a0, a1) { // fn#89659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11881:46, offset: 0x02019304, 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 _fun89660;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_89661(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 _fun89660;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_89661(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_89661(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_89661(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun89660;
}
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 _fun89660() { // fn#89660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11881:617, 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]};
}
return _fun89660;
}
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 getFirstInvalidOption({options}, a1) { // fn#89662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11881:1139, offset: 0x02019478, size: 111 bytes, params: 3, frame: 16
var r3;
var value3;
var name;
var property;
var required;
var success;
var value4;
if (options != null) {
var value;
value = _createForOfIteratorHelperLoose_89659(options);
var value2 = value();
var done = value2.done;
if (!done) {
r3 = value2;
reducibleLoop2: while (true) {
value3 = r3.value;
name = value3.name;
property = a1[name];
required = value3.required;
if (required) {
reducibleJoin4: while (true) {
if (property == null) {
return value3;
}
function getFirstInvalidOption({options}, a1) { // fn#89662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11881:1139, offset: 0x02019478, size: 111 bytes, params: 3, frame: 16
var r3;
var value3;
var name;
var property;
var required;
var success;
var value4;
if (options != null) {
var value;
value = _createForOfIteratorHelperLoose_89659(options);
var value2 = value();
var done = value2.done;
if (!done) {
r3 = value2;
reducibleLoop2: while (true) {
value3 = r3.value;
name = value3.name;
property = a1[name];
required = value3.required;
if (required) {
reducibleJoin4: while (true) {
if (property == null) {
return value3;
}
break reducibleJoin4;
}
break reducibleJoin4;
}
}
if (property != null) {
success = property.success;
reducibleJoin7: while (true) {
if (!success) {
return value3;
if (property != null) {
success = property.success;
reducibleJoin7: while (true) {
if (!success) {
return value3;
}
break reducibleJoin7;
}
break reducibleJoin7;
}
value4 = value();
done = value4.done;
if (done) {
return null;
}
r3 = value4;
continue reducibleLoop2;
}
value4 = value();
done = value4.done;
if (done) {
return null;
}
r3 = value4;
continue reducibleLoop2;
}
}
return null;
}
return null;
}
global.__d(_fun89658, 11695, [2]) /* metro module 11695, dependencies: [2] */;
@@ -1,188 +1,197 @@
/* Metro module 11865; source: modules/application_commands/native/ApplicationCommandsCategories.tsx; dependencies: [31, 27, 1310, 1945, 11862, 33, 4501, 697, 566, 11752, 5475, 5278, 1244, 1357, 4081, 4082, 4564, 4002, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ThemeStore from '../../user_settings/ThemeStore.tsx'; /* Metro dependency 1310 */
import GuildMemberStore from '../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as MobileVisualRefreshExperimentModule from '../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as ApplicationCommandUtilsModule from './ApplicationCommandUtils.tsx'; /* Metro dependency 11752 */
import * as ApplicationCommandsCategoriesConstantsModule from './ApplicationCommandsCategoriesConstants.tsx'; /* Metro dependency 11862 */
function _fun90974(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:6, offset: 0x0204e2c5, size: 542 bytes, params: 8, frame: 29
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.View;
const env0_5 = value2.StyleSheet;
const env0_6 = value2.FlatList;
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const applicationCommandsCategoriesConstantsModule = require(11862) /* metro dependency 11862: ApplicationCommandsCategoriesConstants */;
const ICON_SIZE = applicationCommandsCategoriesConstantsModule.ICON_SIZE;
const NODE_SIZE = applicationCommandsCategoriesConstantsModule.NODE_SIZE;
const NODE_MARGIN = applicationCommandsCategoriesConstantsModule.NODE_MARGIN;
const env0_9 = applicationCommandsCategoriesConstantsModule.ITEM_WIDTH;
const value4 = require(33) /* metro dependency 33 */;
const env0_10 = value4.jsx;
const env0_11 = value4.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object4 = {'backgroundColor': null, 'borderTopWidth': null, 'borderTopColor': null, 'paddingHorizontal': 8,
const ICON_SIZE = ApplicationCommandsCategoriesConstantsModule.ICON_SIZE;
const NODE_SIZE = ApplicationCommandsCategoriesConstantsModule.NODE_SIZE;
const NODE_MARGIN = ApplicationCommandsCategoriesConstantsModule.NODE_MARGIN;
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {'backgroundColor': null, 'borderTopWidth': null, 'borderTopColor': null, 'paddingHorizontal': 8,
'paddingVertical': 4, 'flexDirection': 'row', 'alignItems': 'center'};
const MOBILE_COMMAND_CATEGORIES_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_COMMAND_CATEGORIES_BACKGROUND;
object4.backgroundColor = MOBILE_COMMAND_CATEGORIES_BACKGROUND;
const CHAT_INPUT_COMMAND_CATEGORIES_BORDER_TOP_WIDTH = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_COMMAND_CATEGORIES_BORDER_TOP_WIDTH;
object4.borderTopWidth = CHAT_INPUT_COMMAND_CATEGORIES_BORDER_TOP_WIDTH;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object4.borderTopColor = BORDER_SUBTLE;
object3.container = object4;
object3.categoryImage = {height: ICON_SIZE, width: ICON_SIZE, borderRadius: ICON_SIZE / 2};
object3.fadedItem = {opacity: 0.5};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object3.activeItem = {opacity: 1, backgroundColor: BACKGROUND_BASE_LOWER};
object3.item = {marginVertical: NODE_MARGIN, marginHorizontal: NODE_MARGIN, height: NODE_SIZE, width: NODE_SIZE,
const MOBILE_COMMAND_CATEGORIES_BACKGROUND = (Native).colors.MOBILE_COMMAND_CATEGORIES_BACKGROUND;
object2.backgroundColor = MOBILE_COMMAND_CATEGORIES_BACKGROUND;
const CHAT_INPUT_COMMAND_CATEGORIES_BORDER_TOP_WIDTH = (Native).modules.mobile.CHAT_INPUT_COMMAND_CATEGORIES_BORDER_TOP_WIDTH;
object2.borderTopWidth = CHAT_INPUT_COMMAND_CATEGORIES_BORDER_TOP_WIDTH;
const BORDER_SUBTLE = (Native).colors.BORDER_SUBTLE;
object2.borderTopColor = BORDER_SUBTLE;
object.container = object2;
object.categoryImage = {height: ICON_SIZE, width: ICON_SIZE, borderRadius: ICON_SIZE / 2};
object.fadedItem = {opacity: 0.5};
const BACKGROUND_BASE_LOWER = (Native).colors.BACKGROUND_BASE_LOWER;
object.activeItem = {opacity: 1, backgroundColor: BACKGROUND_BASE_LOWER};
object.item = {marginVertical: NODE_MARGIN, marginHorizontal: NODE_MARGIN, height: NODE_SIZE, width: NODE_SIZE,
borderRadius: NODE_SIZE / 2, alignItems: 'center', justifyContent: 'center'};
const env0_12 = Reflect.apply(createStyles, createStylesModule, [object3]);
const env0_13 = value.memo(_fun90975);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationCommandsCategories.tsx');
const env0_12 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const env0_13 = ReactModule.memo(_fun90975);
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/ApplicationCommandsCategories.tsx');
exports.default = _default_90979;
}
function _fun90975({section, handlePressCategory, active, index, guildId}) { // fn#90975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:862, offset: 0x0204e4e3, size: 437 bytes, params: 2, frame: 25
const styles = useStyles();
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
const value2 = guildId.useMemo(_fun90977, [section, Reflect.apply(useStateFromStores, fluxModule,
[[GuildMemberStore], _fun90976])]);
const r8 = value2 != null && ((Component) => <Component style={styles.categoryImage} source={value2} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return (
<PressableOpacity
onPress={function() {
return handlePressCategory(index);
}}
accessibilityRole="button"
accessibilityLabel={active ? Reflect.apply(formatToPlainString, intl, [t.yl24Gd,
{applicationName: section.name}]) : Reflect.apply(formatToPlainString, intl, [t['9uqD4O'],
{applicationName: section.name}])}
key={section.name}
>
<View style={[styles.item, active ? styles.activeItem : styles.fadedItem]}>
{r8}
</View>
</PressableOpacity>
);
}
function _default_90979({style, sections, onPressSection, selectedIndex, guildId}) { // fn#90979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:1535, offset: 0x0204e719, size: 563 bytes, params: 2, frame: 28
var r6;
var VisualEffectView;
var moduleValue2;
const styles = useStyles();
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
const useMobileVisualRefreshConfig = mobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const enabled = Reflect.apply(useMobileVisualRefreshConfig, mobileVisualRefreshExperimentModule,
[{location: 'ApplicationCommandsCategories'}]).enabled;
const binding = env0_3;
var env0_3 = binding.useRef(null);
const env0_4 = binding.useRef(null);
const env0_5 = binding.useRef(null);
const value2 = binding.useRef(null);
binding.useEffect(_fun90980, [selectedIndex]);
const value3 = binding.useCallback(function(a0) {
onPressSection(a0);
require(dependencyMap[14]).triggerHapticFeedback(importDefault(dependencyMap[15]).IMPACT_LIGHT);
}, [onPressSection]);
const value4 = binding.useCallback(_fun90982, []);
const value5 = binding.useCallback(_fun90983, []);
const value6 = binding.useCallback(function(a0, a1) {
return {length: ITEM_WIDTH, offset: ITEM_WIDTH * a1, index: a1};
}, []);
const value7 = binding.useCallback(_fun90985, [selectedIndex, value3, guildId]);
const items2 = [styles.container, style];
if (enabled) {
r6 = !enabled;
} else {
VisualEffectView = importDefault(4564) /* metro dependency 4564: VisualEffectView */;
moduleValue2 = require(4002) /* metro dependency 4002: shared */;
r6 = <VisualEffectView blurTheme={moduleValue2.isThemeDark(ThemeStore.theme) ? 'dark' : 'light'} style={StyleSheet.absoluteFill} />;
}
return (
<View style={items2}>
{r6}
<FlatList
ref={value2}
getItemLayout={value6}
data={sections}
keyboardShouldPersistTaps="always"
horizontal
keyExtractor={function(a0) {
return a0.id;
}}
renderItem={value7}
showsHorizontalScrollIndicator={false}
onScroll={value4}
onLayout={value5}
/>
</View>
);
}
function _fun90976() { // fn#90976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:977, offset: 0x0204e698, size: 79 bytes, params: 1, frame: 13
var value3;
if (guildId != null) {
if (section?.botId != null) {
value3 = environment.__proto__;
return GuildMemberStore.getMember(guildId, section.botId);
function _fun90975({section, handlePressCategory, active, index, guildId}) { // fn#90975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:862, offset: 0x0204e4e3, size: 437 bytes, params: 2, frame: 25
const styles = useStyles();
const useStateFromStores = FluxModule.useStateFromStores;
const value2 = guildId.useMemo(_fun90977, [section, Reflect.apply(useStateFromStores, FluxModule,
[[GuildMemberStore], _fun90976])]);
const r8 = value2 != null && ((Component) => <Component style={styles.categoryImage} source={value2} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
const PressableOpacity = (PressablesModule).PressableOpacity;
const intl = (IndexNativeModule).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (IndexNativeModule).t;
return (
<PressableOpacity
onPress={function() {
return handlePressCategory(index);
}}
accessibilityRole="button"
accessibilityLabel={active ? Reflect.apply(formatToPlainString, intl, [t.yl24Gd,
{applicationName: section.name}]) : Reflect.apply(formatToPlainString, intl, [t['9uqD4O'],
{applicationName: section.name}])}
key={section.name}
>
<View style={[styles.item, active ? styles.activeItem : styles.fadedItem]}>
{r8}
</View>
</PressableOpacity>
);
function _fun90976() { // fn#90976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:977, offset: 0x0204e698, size: 79 bytes, params: 1, frame: 13
var value3;
var guildMemberStoreBinding;
if (guildId != null) {
if (section?.botId != null) {
value3 = environment.__proto__;
guildMemberStoreBinding = GuildMemberStore;
return guildMemberStoreBinding.getMember(guildId, section.botId);
}
}
}
function _fun90977() { // fn#90977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:1071, offset: 0x0204e6e7, size: 50 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (ApplicationCommandUtilsModule).getApplicationCommandsIconSource(section,
member);
}
}
}
function _fun90977() { // fn#90977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:1071, offset: 0x0204e6e7, size: 50 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (require(11752) /* metro dependency 11752: ApplicationCommandUtils */).getApplicationCommandsIconSource(section,
member);
}
function _fun90980() { // fn#90980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:1786, offset: 0x0204e94c, size: 135 bytes, params: 1, frame: 12
var selectedIndexBinding;
var value2;
var value3;
let current = env0_3.current;
if (current != null) {
current = env0_4.current;
if (current != null) {
current = env0_6.current;
function _default_90979({style, sections, onPressSection, selectedIndex, guildId}) { // fn#90979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:1535, offset: 0x0204e719, size: 563 bytes, params: 2, frame: 28
var r6;
var VisualEffectView;
var moduleValue2;
const styles = useStyles();
const useMobileVisualRefreshConfig = MobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const enabled = Reflect.apply(useMobileVisualRefreshConfig, MobileVisualRefreshExperimentModule,
[{location: 'ApplicationCommandsCategories'}]).enabled;
const binding = env0_3;
var env0_3 = binding.useRef(null);
const env0_4 = binding.useRef(null);
const env0_5 = binding.useRef(null);
const value2 = binding.useRef(null);
binding.useEffect(_fun90980, [selectedIndex]);
const value3 = binding.useCallback(function(a0) {
onPressSection(a0);
require(dependencyMap[14]).triggerHapticFeedback(importDefault(dependencyMap[15]).IMPACT_LIGHT);
}, [onPressSection]);
const value4 = binding.useCallback(_fun90982, []);
const value5 = binding.useCallback(_fun90983, []);
const value6 = binding.useCallback(function(a0, a1) {
return {length: ITEM_WIDTH, offset: ITEM_WIDTH * a1, index: a1};
}, []);
const value7 = binding.useCallback(_fun90985, [selectedIndex, value3, guildId]);
const items2 = [styles.container, style];
if (enabled) {
r6 = !enabled;
} else {
VisualEffectView = importDefault(4564) /* metro dependency 4564: VisualEffectView */;
moduleValue2 = require(4002) /* metro dependency 4002: shared */;
r6 = (
<VisualEffectView
blurTheme={moduleValue2.isThemeDark(ThemeStore.theme) ? 'dark' : 'light'}
style={StyleSheet.absoluteFill}
/>
);
}
return (
<View style={items2}>
{r6}
<FlatList
ref={value2}
getItemLayout={value6}
data={sections}
keyboardShouldPersistTaps="always"
horizontal
keyExtractor={function(a0) {
return a0.id;
}}
renderItem={value7}
showsHorizontalScrollIndicator={false}
onScroll={value4}
onLayout={value5}
/>
</View>
);
function _fun90980() { // fn#90980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:1786, offset: 0x0204e94c, size: 135 bytes, params: 1, frame: 12
var selectedIndexBinding;
var value2;
var value3;
let current = env0_3.current;
if (current != null) {
current = env0_5.current;
current = env0_4.current;
if (current != null) {
selectedIndexBinding = selectedIndex;
value2 = environment.__proto__;
value3 = selectedIndexBinding * ITEM_WIDTH;
current = env0_4.current;
if (value3 > current || value3 < env0_3.current) {
current = env0_6.current;
current.scrollToOffset({offset: value3});
current = ReactNativeModule.FlatList.current;
if (current != null) {
current = env0_5.current;
if (current != null) {
selectedIndexBinding = selectedIndex;
value2 = environment.__proto__;
value3 = selectedIndexBinding * ITEM_WIDTH;
current = env0_4.current;
if (value3 > current || value3 < env0_3.current) {
current = ReactNativeModule.FlatList.current;
current.scrollToOffset({offset: value3});
}
}
}
}
}
}
function _fun90982({nativeEvent}) { // fn#90982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:2053, offset: 0x0204ea1e, size: 67 bytes, params: 2, frame: 5
const contentOffset = nativeEvent.contentOffset;
const layoutMeasurement = nativeEvent.layoutMeasurement;
env0_3.current = contentOffset.x;
env0_4.current = contentOffset.x + layoutMeasurement.width;
}
function _fun90983({nativeEvent}) { // fn#90983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:2176, offset: 0x0204ea61, size: 64 bytes, params: 2, frame: 4
const layout = nativeEvent.layout;
env0_3.current = 0;
env0_4.current = layout.width;
env0_5.current = layout.width;
}
function _fun90985({item, index}) { // fn#90985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:2339, offset: 0x0204eac0, size: 78 bytes, params: 2, frame: 16
return ((Component) => <Component active={index === selectedIndex} section={item} index={index} handlePressCategory={env0_7} guildId={guildId} />)(env1_13);
}
}
}
function _fun90982({nativeEvent}) { // fn#90982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:2053, offset: 0x0204ea1e, size: 67 bytes, params: 2, frame: 5
const contentOffset = nativeEvent.contentOffset;
const layoutMeasurement = nativeEvent.layoutMeasurement;
env0_3.current = contentOffset.x;
env0_4.current = contentOffset.x + layoutMeasurement.width;
}
function _fun90983({nativeEvent}) { // fn#90983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:2176, offset: 0x0204ea61, size: 64 bytes, params: 2, frame: 4
const layout = nativeEvent.layout;
env0_3.current = 0;
env0_4.current = layout.width;
env0_5.current = layout.width;
}
function _fun90985({item, index}) { // fn#90985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12051:2339, offset: 0x0204eac0, size: 78 bytes, params: 2, frame: 16
return ((Component) => <Component active={index === selectedIndex} section={item} index={index} handlePressCategory={env0_7} guildId={guildId} />)(env1_13);
}
global.__d(_fun90974, 11865, [31, 27, 1310, 1945, 11862, 33, 4501, 697, 566, 11752, 5475, 5278, 1244, 1357, 4081,
4082, 4564, 4002,
2]) /* metro module 11865, dependencies: [31, 27, 1310, 1945, 11862, 33, 4501, 697, 566, 11752, 5475, 5278, 1244, 1357, 4081, 4082, 4564, 4002, 2] */;
@@ -1,8 +1,10 @@
/* Metro module 11862; source: modules/application_commands/native/ApplicationCommandsCategoriesConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun90965(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12048:6, offset: 0x0204de61, size: 114 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationCommandsCategoriesConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/ApplicationCommandsCategoriesConstants.tsx');
exports.ICON_SIZE = 24;
exports.NODE_SIZE = 32;
exports.NODE_MARGIN = 4;
@@ -10,3 +12,4 @@ function _fun90965(global, require, importDefault, importAll, module, exports, d
exports.ITEM_HEIGHT = 40;
}
global.__d(_fun90965, 11862, [2]) /* metro module 11862, dependencies: [2] */;
@@ -1,12 +1,16 @@
/* Metro module 11018; source: modules/application_commands/native/ApplicationCommandsConstants.tsx; dependencies: [477, 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 _fun84402(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11204:6, offset: 0x01f48922, size: 118 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(477) /* metro dependency 477: PlatformUtils */;
let value = PlatformUtilsModule;
value = value.isAndroid();
const r1 = value ? 64 : 56;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationCommandsConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/ApplicationCommandsConstants.tsx');
exports.AUTOCOMPLETE_ROW_HEIGHT = 48;
exports.AUTOCOMPLETE_EMOJI_ROW_HEIGHT = r1;
}
global.__d(_fun84402, 11018, [477, 2]) /* metro module 11018, dependencies: [477, 2] */;
@@ -1,62 +1,73 @@
/* Metro module 11863; source: modules/application_commands/native/ApplicationSectionHeader.tsx; dependencies: [31, 27, 1945, 33, 4501, 697, 566, 11752, 1244, 5475, 4573, 2] */
import GuildMemberStore from '../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ApplicationCommandUtilsModule from './ApplicationCommandUtils.tsx'; /* Metro dependency 11752 */
function _fun90966(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12049:6, offset: 0x0204ded3, size: 314 bytes, params: 8, frame: 23
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 guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
const MOBILE_FLOATING_ACCESSORY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_FLOATING_ACCESSORY_BACKGROUND;
object2.applicationHeaderWrapper = {'flexDirection': 'row', 'alignItems': 'center', 'height': 32,
object.applicationHeaderWrapper = {'flexDirection': 'row', 'alignItems': 'center', 'height': 32,
'backgroundColor': null, 'paddingHorizontal': 16, backgroundColor: MOBILE_FLOATING_ACCESSORY_BACKGROUND};
const object4 = {'width': 16, 'height': 16, 'borderRadius': null, 'marginRight': 8};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.applicationIcon = object4;
const env0_7 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationSectionHeader.tsx');
const object3 = {'width': 16, 'height': 16, 'borderRadius': null, 'marginRight': 8};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.applicationIcon = object3;
const env0_7 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/ApplicationSectionHeader.tsx');
exports.default = _default_90967;
exports.APPLICATION_SECTION_HEADER_HEIGHT = 32;
}
function _default_90967({section, guildId}) { // fn#90967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12049:438, offset: 0x0204e00d, size: 373 bytes, params: 2, frame: 23
const styles = useStyles();
const member = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun90968);
const applicationCommandsIconSource = (require(11752) /* metro dependency 11752: ApplicationCommandUtils */).getApplicationCommandsIconSource(section,
member);
const r8 = member?.nick != null ? member.nick : section?.name;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const property = (require(1244) /* metro dependency 1244: indexNative */).t['Ocw/sM'];
const object = {applicationName: r8};
const r6 = applicationCommandsIconSource != null && ((Component) => <Component style={styles.applicationIcon} source={applicationCommandsIconSource} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View
style={styles.applicationHeaderWrapper}
accessibilityLabel={Reflect.apply(formatToPlainString, intl, [property, object])}
>
{r6}
<Text variant="eyebrow" color="interactive-text-default">
{r8}
</Text>
</View>
);
}
function _fun90968() { // fn#90968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12049:508, offset: 0x0204e182, size: 79 bytes, params: 1, frame: 13
var value3;
if (guildId != null) {
if (section?.botId != null) {
value3 = environment.__proto__;
return GuildMemberStore.getMember(guildId, section.botId);
function _default_90967({section, guildId}) { // fn#90967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12049:438, offset: 0x0204e00d, size: 373 bytes, params: 2, frame: 23
const styles = useStyles();
const member = (FluxModule).useStateFromStores([GuildMemberStore], _fun90968);
const applicationCommandsIconSource = (ApplicationCommandUtilsModule).getApplicationCommandsIconSource(section,
member);
const r8 = member?.nick != null ? member.nick : section?.name;
const intl = (IndexNativeModule).intl;
const formatToPlainString = intl.formatToPlainString;
const property = (IndexNativeModule).t['Ocw/sM'];
const object2 = {applicationName: r8};
const r6 = applicationCommandsIconSource != null && ((Component) => <Component style={styles.applicationIcon} source={applicationCommandsIconSource} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
const Text = (TextModule).Text;
return (
<View
style={styles.applicationHeaderWrapper}
accessibilityLabel={Reflect.apply(formatToPlainString, intl, [property, object2])}
>
{r6}
<Text variant="eyebrow" color="interactive-text-default">
{r8}
</Text>
</View>
);
function _fun90968() { // fn#90968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12049:508, offset: 0x0204e182, size: 79 bytes, params: 1, frame: 13
var value3;
var guildMemberStoreBinding;
if (guildId != null) {
if (section?.botId != null) {
value3 = environment.__proto__;
guildMemberStoreBinding = GuildMemberStore;
return guildMemberStoreBinding.getMember(guildId, section.botId);
}
}
}
}
}
global.__d(_fun90966, 11863, [31, 27, 1945, 33, 4501, 697, 566, 11752, 1244, 5475, 4573,
2]) /* metro module 11863, dependencies: [31, 27, 1945, 33, 4501, 697, 566, 11752, 1244, 5475, 4573, 2] */;
@@ -1,34 +1,47 @@
/* Metro module 15230; source: modules/application_commands/native/ContextMenuCommandAppScreen.tsx; dependencies: [31, 33, 4501, 697, 5463, 7705, 15229, 8671, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsKeyboardAwareNative from '../../safe_area/useSafeAreaInsetsKeyboardAware.native.tsx'; /* Metro dependency 5463 */
import UseScaledRowHeight from '../../main_tabs_v2/native/shared_components/user_list/useScaledRowHeight.tsx'; /* Metro dependency 7705 */
import FastestListAndroid from '../../fastest_list/FastestList.android.tsx'; /* Metro dependency 8671 */
import ContextMenuCommandItem from './ContextMenuCommandItem.tsx'; /* Metro dependency 15229 */
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 _fun116514(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15427:6, offset: 0x0248c55d, size: 200 bytes, params: 8, frame: 21
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const env0_4 = Reflect.apply(createStyles, createStylesModule, [{list: {marginHorizontal: PX_16}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ContextMenuCommandAppScreen.tsx');
const createStyles = CreateStylesModule.createStyles;
const PX_16 = (Native).space.PX_16;
const env0_4 = Reflect.apply(createStyles, CreateStylesModule, [{list: {marginHorizontal: PX_16}}]);
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/ContextMenuCommandAppScreen.tsx');
exports.default = ContextMenuCommandAppScreen;
function ContextMenuCommandAppScreen(a0) { // fn#116515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15427:301, offset: 0x0248c625, size: 255 bytes, params: 2, frame: 23
const {section, commands, onPressCommand} = a0.route.params;
const onPressCommand2 = onPressCommand;
const insets = (UseSafeAreaInsetsKeyboardAwareNative)({includeKeyboardHeight: true}).insets;
const value2 = (UseScaledRowHeight)();
const binding = onPressCommand2;
const value3 = binding.useMemo(function() {
return [commands.length];
}, [commands.length]);
const value4 = binding.useCallback(_fun116517, [commands, onPressCommand, section]);
const styles = useStyles();
return ((Component) => <Component style={styles.list} sections={value3} estimatedListSize="windowSize" itemSize={value2} insetEnd={insets.bottom} renderItem={value4} />)(FastestListAndroid);
function _fun116517(a0, a1) { // fn#116517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15427:515, offset: 0x0248c73a, size: 119 bytes, params: 3, frame: 20
const commandsBinding = commands;
const property = commandsBinding[a1];
return ((Component) => <Component item={property} onPress={onPress_116518} section={section} start={a1 === 0} end={a1 === commandsBinding.length - 1} key={property.id} />)(ContextMenuCommandItem);
function onPress_116518() { // fn#116518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15427:584, offset: 0x016f88b2, size: 23 bytes, params: 1, frame: 11
return onPressCommand(env0_0);
}
}
}
}
function ContextMenuCommandAppScreen(a0) { // fn#116515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15427:301, offset: 0x0248c625, size: 255 bytes, params: 2, frame: 23
const {section, commands, onPressCommand} = a0.route.params;
const env0_2 = onPressCommand;
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
const value2 = (importDefault(7705) /* metro dependency 7705: useScaledRowHeight */)();
const binding = env0_2;
const value3 = binding.useMemo(function() {
return [commands.length];
}, [commands.length]);
const value4 = binding.useCallback(_fun116517, [commands, onPressCommand, section]);
const styles = useStyles();
return ((Component) => <Component style={styles.list} sections={value3} estimatedListSize="windowSize" itemSize={value2} insetEnd={insets.bottom} renderItem={value4} />)(importDefault(8671) /* metro dependency 8671: FastestListAndroid */);
}
function _fun116517(a0, a1) { // fn#116517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15427:515, offset: 0x0248c73a, size: 119 bytes, params: 3, frame: 20
const commandsBinding = commands;
const property = commandsBinding[a1];
return ((Component) => <Component item={property} onPress={onPress_116518} section={section} start={a1 === 0} end={a1 === commandsBinding.length - 1} key={property.id} />)(importDefault(15229) /* metro dependency 15229: ContextMenuCommandItem */);
}
global.__d(_fun116514, 15230, [31, 33, 4501, 697, 5463, 7705, 15229, 8671,
2]) /* metro module 15230, dependencies: [31, 33, 4501, 697, 5463, 7705, 15229, 8671, 2] */;
@@ -1,131 +1,140 @@
/* Metro module 15229; source: modules/application_commands/native/ContextMenuCommandItem.tsx; dependencies: [31, 27, 33, 4501, 697, 6238, 22, 1244, 11752, 5475, 1909, 4058, 2] */
import Module00022 from '../../../by-id/module-00022.js'; /* Metro dependency 22 */
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 ServerModule from '../../../flow/Server.tsx'; /* Metro dependency 1909 */
import * as SendMessageIconModule from '../../../design/components/Icon/native/redesign/generated/SendMessageIcon.tsx'; /* Metro dependency 4058 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TableRowNativeModule from '../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as ApplicationCommandUtilsModule from './ApplicationCommandUtils.tsx'; /* Metro dependency 11752 */
function _fun116508(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15426:6, offset: 0x0248bfc8, size: 369 bytes, params: 8, frame: 22
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 env0_5 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object5 = {'width': 32, 'height': 32};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object3.commandIcon = object5;
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {'width': 32, 'height': 32};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object.commandIcon = object2;
let BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object3.loadingIcon = {backgroundColor: BACKGROUND_MOD_MUTED};
const object6 = {};
object.loadingIcon = {backgroundColor: BACKGROUND_MOD_MUTED};
const object4 = {};
BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object6.backgroundColor = BACKGROUND_MOD_MUTED;
object6.height = 24;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object3.loadingName = object6;
const env0_6 = Reflect.apply(createStyles, createStylesModule, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ContextMenuCommandItem.tsx');
object4.backgroundColor = BACKGROUND_MOD_MUTED;
object4.height = 24;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object.loadingName = object4;
const env0_6 = Reflect.apply(createStyles, CreateStylesModule, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/ContextMenuCommandItem.tsx');
exports.default = ContextMenuCommandItem;
exports.ContextMenuCommandLoadingItem = ContextMenuCommandLoadingItem;
exports.ContextMenuCommandEmptyItem = ContextMenuCommandEmptyItem;
exports.ContextMenuCommandAppItem = ContextMenuCommandAppItem;
}
function ContextMenuCommandItem({item, onPress, section, start, end}) { // fn#116509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15426:503, offset: 0x0248c139, size: 290 bytes, params: 2, frame: 24
const styles = useStyles();
const value3 = ReactModule.useMemo(_fun116510, [item, section?.name]);
const applicationCommandsIconSource = (ApplicationCommandUtilsModule).getApplicationCommandsIconSource(section);
const TableRow = (TableRowNativeModule).TableRow;
const displayName = item.displayName;
const r7 = applicationCommandsIconSource != null && ((Component) => <Component style={styles.commandIcon} source={applicationCommandsIconSource} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
const SendMessageIcon = (SendMessageIconModule).SendMessageIcon;
return (
<TableRow
accessibilityLabel={value3}
onPress={onPress}
label={displayName}
icon={r7}
trailing={<SendMessageIcon />}
start={start}
end={end}
/>
);
function _fun116510() { // fn#116510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15426:602, offset: 0x0248c25b, size: 193 bytes, params: 1, frame: 17
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const type = item.type;
const value3 = undefined;
const ApplicationCommandType = (ServerModule).ApplicationCommandType;
const MESSAGE = ApplicationCommandType.MESSAGE;
if (MESSAGE === type) {
return intl.formatToPlainString(t.Pk4Mz3, {applicationName: section == null ? value3 : section.name,
commandName: item.displayName});
}
const USER = ApplicationCommandType.USER;
if (USER === type) {
return intl.formatToPlainString(t.Pk4Mz3, {applicationName: section == null ? value3 : section.name,
commandName: item.displayName});
}
return value3;
}
function ContextMenuCommandItem({item, onPress, section, start, end}) { // fn#116509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15426:503, offset: 0x0248c139, size: 290 bytes, params: 2, frame: 24
const styles = useStyles();
const value3 = env0_3.useMemo(_fun116510, [item, section?.name]);
const applicationCommandsIconSource = (require(11752) /* metro dependency 11752: ApplicationCommandUtils */).getApplicationCommandsIconSource(section);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const displayName = item.displayName;
const r7 = applicationCommandsIconSource != null && ((Component) => <Component style={styles.commandIcon} source={applicationCommandsIconSource} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
const SendMessageIcon = (require(4058) /* metro dependency 4058: SendMessageIcon */).SendMessageIcon;
return (
<TableRow
accessibilityLabel={value3}
onPress={onPress}
label={displayName}
icon={r7}
trailing={<SendMessageIcon />}
start={start}
end={end}
/>
);
}
function ContextMenuCommandLoadingItem({start, end}) { // fn#116511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15426:1147, offset: 0x0248c31c, size: 219 bytes, params: 2, frame: 24
const styles = useStyles();
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const items2 = [styles.loadingName];
let value = importDefault(22) /* metro dependency 22 */;
value = value.random(60, 80);
items2[1] = {width: '' + value + '%'};
return (
<TableRow
label={<View style={items2} />}
icon={<View style={[styles.commandIcon, styles.loadingIcon]} />}
start={start}
end={end}
/>
);
}
function ContextMenuCommandEmptyItem({start, end}) { // fn#116512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15426:1406, offset: 0x0248c3f7, size: 171 bytes, params: 2, frame: 22
const styles = useStyles();
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const YSNlV2 = (require(1244) /* metro dependency 1244: indexNative */).t.YSNlV2;
return (
<TableRow
label={Reflect.apply(string, intl, [YSNlV2])}
icon={<View style={[styles.commandIcon, styles.loadingIcon]} />}
start={start}
end={end}
/>
);
}
function ContextMenuCommandAppItem({section, onPress, start, end}) { // fn#116513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15426:1634, offset: 0x0248c4a2, size: 187 bytes, params: 2, frame: 22
var r6;
var value;
const styles = useStyles();
const applicationCommandsIconSource = (require(11752) /* metro dependency 11752: ApplicationCommandUtils */).getApplicationCommandsIconSource(section);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const name = section.name;
const value3 = applicationCommandsIconSource != null;
if (value3) {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component style={styles.commandIcon} source={applicationCommandsIconSource} />)(value);
r6 = value;
} else {
r6 = value3;
}
return (
<TableRow
onPress={onPress}
label={name}
icon={r6}
start={start}
end={end}
arrow
/>
);
}
function _fun116510() { // fn#116510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15426:602, offset: 0x0248c25b, size: 193 bytes, params: 1, frame: 17
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const type = item.type;
const value3 = undefined;
const ApplicationCommandType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandType;
const MESSAGE = ApplicationCommandType.MESSAGE;
if (MESSAGE === type) {
return intl.formatToPlainString(t.Pk4Mz3, {applicationName: section == null ? value3 : section.name,
commandName: item.displayName});
function ContextMenuCommandLoadingItem({start, end}) { // fn#116511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15426:1147, offset: 0x0248c31c, size: 219 bytes, params: 2, frame: 24
const styles = useStyles();
const TableRow = (TableRowNativeModule).TableRow;
const items2 = [styles.loadingName];
let value = Module00022;
value = value.random(60, 80);
items2[1] = {width: '' + value + '%'};
return (
<TableRow
label={<View style={items2} />}
icon={<View style={[styles.commandIcon, styles.loadingIcon]} />}
start={start}
end={end}
/>
);
}
const USER = ApplicationCommandType.USER;
if (USER === type) {
return intl.formatToPlainString(t.Pk4Mz3, {applicationName: section == null ? value3 : section.name,
commandName: item.displayName});
function ContextMenuCommandEmptyItem({start, end}) { // fn#116512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15426:1406, offset: 0x0248c3f7, size: 171 bytes, params: 2, frame: 22
const styles = useStyles();
const TableRow = (TableRowNativeModule).TableRow;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const YSNlV2 = (IndexNativeModule).t.YSNlV2;
return (
<TableRow
label={Reflect.apply(string, intl, [YSNlV2])}
icon={<View style={[styles.commandIcon, styles.loadingIcon]} />}
start={start}
end={end}
/>
);
}
function ContextMenuCommandAppItem({section, onPress, start, end}) { // fn#116513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15426:1634, offset: 0x0248c4a2, size: 187 bytes, params: 2, frame: 22
var r6;
var value;
const styles = useStyles();
const applicationCommandsIconSource = (ApplicationCommandUtilsModule).getApplicationCommandsIconSource(section);
const TableRow = (TableRowNativeModule).TableRow;
const name = section.name;
const value3 = applicationCommandsIconSource != null;
if (value3) {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component style={styles.commandIcon} source={applicationCommandsIconSource} />)(value);
r6 = value;
} else {
r6 = value3;
}
return (
<TableRow
onPress={onPress}
label={name}
icon={r6}
start={start}
end={end}
arrow
/>
);
}
return value3;
}
global.__d(_fun116508, 15229, [31, 27, 33, 4501, 697, 6238, 22, 1244, 11752, 5475, 1909, 4058,
2]) /* metro module 15229, dependencies: [31, 27, 33, 4501, 697, 6238, 22, 1244, 11752, 5475, 1909, 4058, 2] */;
@@ -1,93 +1,118 @@
/* Metro module 15227; source: modules/application_commands/native/ContextMenuCommandNavigator.tsx; dependencies: [31, 27, 33, 9884, 4501, 697, 4884, 5280, 1585, 9603, 1244, 15228, 15230, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
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 TTIAnalyticsUtilsModule from '../../tti_analytics/native/TTIAnalyticsUtils.tsx'; /* Metro dependency 4884 */
import * as NavigatorNativeModule from '../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as HeaderSharedModule from '../../main_tabs_v2/native/shared_components/HeaderShared.tsx'; /* Metro dependency 9603 */
import * as Module09884Module from '../../../by-id/module-09884.js'; /* Metro dependency 9884 */
function _fun116476(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15424:6, offset: 0x0248ae64, size: 293 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const env0_7 = (require(9884) /* metro dependency 9884 */).createNativeStackNavigator();
const env0_7 = (Module09884Module).createNativeStackNavigator();
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOWEST};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object2.content = {backgroundColor: BACKGROUND_BASE_LOWER};
const env0_8 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ContextMenuCommandNavigator.tsx');
object = {};
const BACKGROUND_BASE_LOWEST = (Native).colors.BACKGROUND_BASE_LOWEST;
object.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOWEST};
const BACKGROUND_BASE_LOWER = (Native).colors.BACKGROUND_BASE_LOWER;
object.content = {backgroundColor: BACKGROUND_BASE_LOWER};
const env0_8 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/ContextMenuCommandNavigator.tsx');
exports.default = ContextMenuCommandNavigator;
}
function ContextMenuCommandNavigator() { // fn#116477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15424:461, offset: 0x0248af89, size: 351 bytes, params: 1, frame: 26
const styles = useStyles();
let binding = ReactModule;
binding.useLayoutEffect(_fun116478, []);
const env0_1 = (NavigatorNativeModule).useAccessibilityNativeStackOptions();
const {left, right} = (UseSafeAreaInsetsNative)();
const items2 = [styles.container];
items2[1] = {paddingLeft: left, paddingRight: right};
binding = env0_7;
const Navigator = binding.Navigator;
const object2 = {screenOptions: screenOptions_116479};
let Screen = binding.Screen;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const PHjkRE = (IndexNativeModule).t.PHjkRE;
const screen = (
<Screen
name="root"
options={{title: Reflect.apply(string, intl, [PHjkRE])}}
getComponent={function() {
return require(dependencyMap[11]).default;
}}
/>
);
Screen = binding.Screen;
return (
<View style={items2}>
<Navigator {...object2}>
{screen}
<Screen
name="app"
options={function({route}) {
route = route.params.section;
return {title: route?.name};
}}
getComponent={function() {
return require(dependencyMap[12]).default;
}}
/>
</Navigator>
</View>
);
function _fun116478() { // fn#116478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15424:529, offset: 0x0248b0e8, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (TTIAnalyticsUtilsModule).trackAppUIViewed();
}
function ContextMenuCommandNavigator() { // fn#116477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15424:461, offset: 0x0248af89, size: 351 bytes, params: 1, frame: 26
const styles = useStyles();
let binding = env0_3;
binding.useLayoutEffect(_fun116478, []);
const env0_1 = (require(5280) /* metro dependency 5280: NavigatorNative */).useAccessibilityNativeStackOptions();
const {left, right} = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const items2 = [styles.container];
items2[1] = {paddingLeft: left, paddingRight: right};
binding = env0_7;
const Navigator = binding.Navigator;
const object = {screenOptions: screenOptions_116479};
let Screen = binding.Screen;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const PHjkRE = (require(1244) /* metro dependency 1244: indexNative */).t.PHjkRE;
const screen = <Screen name="root" options={{title: Reflect.apply(string, intl,
[PHjkRE])}} getComponent={function() {
return require(dependencyMap[11]).default;
}} />;
Screen = binding.Screen;
return (
<View style={items2}>
<Navigator {...object}>
{screen}
<Screen
name="app"
options={function({route}) {
route = route.params.section;
return {title: route?.name};
}}
getComponent={function() {
return require(dependencyMap[12]).default;
}}
/>
</Navigator>
</View>
);
}
function ContextMenuCommandNavigatorScreenOptions({navigation, route}) { // fn#116479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15424:748, owner: ContextMenuCommandNavigator.screenOptions, offset: 0x0248b10d, size: 192 bytes, params: 2, frame: 16
var r6;
var environment;
var r2;
var value2;
var value4;
const object = {};
object.contentStyle = styles.content;
object.headerShadowVisible = false;
object.headerTitle = headerTitle_116480;
object.headerTitleAlign = 'center';
const getState = navigation.getState;
if (Reflect.apply(getState, navigation, []).routes[0].key === route.key) {
value4 = environment.__proto__;
r2 = (require(9603) /* metro dependency 9603: HeaderShared */).getRenderModalCloseImage(navigation);
r6 = require;
} else {
value2 = environment.__proto__;
r2 = (require(9603) /* metro dependency 9603: HeaderShared */).getRenderModalBackImage(navigation);
}
object.headerLeft = r2;
copyDataProperties(object, env0_1, r6);
return object;
function screenOptionsHeaderTitle_116480(a0) { // fn#116480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15424:834, owner: ContextMenuCommandNavigator.screenOptions.headerTitle, offset: 0x0248b1cd, size: 87 bytes, params: 2, frame: 16
const children = a0.children;
const value = Object.create(null);
value.children = 0;
const value2 = copyDataProperties({}, a0, value, children);
const GenericHeaderTitle = (HeaderSharedModule).GenericHeaderTitle;
return <GenericHeaderTitle title={children} {...value2} />;
}
function _fun116478() { // fn#116478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15424:529, offset: 0x0248b0e8, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(4884) /* metro dependency 4884: TTIAnalyticsUtils */).trackAppUIViewed();
}
}
function ContextMenuCommandNavigatorScreenOptions({navigation, route}) { // fn#116479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15424:748, owner: ContextMenuCommandNavigator.screenOptions, offset: 0x0248b10d, size: 192 bytes, params: 2, frame: 16
var r6;
var environment;
var r2;
var value2;
var value4;
const object2 = {};
object2.contentStyle = styles.content;
object2.headerShadowVisible = false;
object2.headerTitle = headerTitle_116480;
object2.headerTitleAlign = 'center';
const getState = navigation.getState;
if (Reflect.apply(getState, navigation, []).routes[0].key === route.key) {
value4 = environment.__proto__;
r2 = (require(9603) /* metro dependency 9603: HeaderShared */).getRenderModalCloseImage(navigation);
r6 = require;
} else {
value2 = environment.__proto__;
r2 = (require(9603) /* metro dependency 9603: HeaderShared */).getRenderModalBackImage(navigation);
}
object2.headerLeft = r2;
copyDataProperties(object2, env0_1, r6);
return object2;
}
global.__d(_fun116476, 15227, [31, 27, 33, 9884, 4501, 697, 4884, 5280, 1585, 9603, 1244, 15228, 15230,
2]) /* metro module 15227, dependencies: [31, 27, 33, 9884, 4501, 697, 4884, 5280, 1585, 9603, 1244, 15228, 15230, 2] */;
@@ -1,14 +1,23 @@
/* Metro module 15228; source: modules/application_commands/native/ContextMenuCommandRootScreen.tsx; dependencies: [57, 31, 27, 1867, 5066, 33, 4501, 697, 566, 8060, 7869, 8050, 5463, 7705, 8518, 1244, 4573, 15229, 6984, 8671, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UseSafeAreaInsetsKeyboardAwareNative from '../../safe_area/useSafeAreaInsetsKeyboardAware.native.tsx'; /* Metro dependency 5463 */
import UseScaledRowHeight from '../../main_tabs_v2/native/shared_components/user_list/useScaledRowHeight.tsx'; /* Metro dependency 7705 */
import ExecuteCommand from '../executeCommand.tsx'; /* Metro dependency 8050 */
import FastestListAndroid from '../../fastest_list/FastestList.android.tsx'; /* Metro dependency 8671 */
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 TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ApplicationCommandConstantsModule from '../ApplicationCommandConstants.tsx'; /* Metro dependency 5066 */
import * as ApplicationCommandQueryApiModule from '../ApplicationCommandQueryApi.tsx'; /* Metro dependency 8060 */
import * as UseScaledTextLineHeightAndroidModule from '../../screen/native/useScaledTextLineHeight.android.tsx'; /* Metro dependency 8518 */
function _fun116484(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:6, offset: 0x0248b271, size: 384 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).View;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
let value = require(5066) /* metro dependency 5066: ApplicationCommandConstants */;
let value = ApplicationCommandConstantsModule;
const env0_8 = value.CONTEXT_MENU_COMMANDS_QUERY_LIMIT;
const env0_9 = value.BuiltInSectionId;
value = require(33) /* metro dependency 33 */;
@@ -16,317 +25,331 @@ function _fun116484(global, require, importDefault, importAll, module, exports,
const env0_11 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.container = {flex: 1, marginHorizontal: PX_16};
const object4 = {};
object.container = {flex: 1, marginHorizontal: PX_16};
const object3 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingTop = PX_16;
object3.paddingTop = PX_16;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.paddingBottom = PX_8;
object3.paddingBottom = PX_8;
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object4.backgroundColor = BACKGROUND_BASE_LOWER;
object2.sectionHeader = object4;
const env0_12 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ContextMenuCommandRootScreen.tsx');
object3.backgroundColor = BACKGROUND_BASE_LOWER;
object.sectionHeader = object3;
const env0_12 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/ContextMenuCommandRootScreen.tsx');
exports.default = ContextMenuCommandRootScreen;
}
function ContextMenuCommandRootScreen(a0) { // fn#116485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:568, offset: 0x0248b3f1, size: 1323 bytes, params: 2, frame: 32
var object10;
var object2;
var object3;
var SearchField;
var object8;
var intl;
const navigation = a0.navigation;
const {channel, commandType, commandTargetId, onPressAppCommand, onClose} = a0.route.params;
const env0_4 = onClose;
const value = undefined;
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(channel.guild_id);
});
const env0_5 = guild;
let binding = env0_5;
const env0_6 = binding.useRef(false);
const value4 = env0_4(binding.useState(''), 2);
const value5 = 0;
const property = value4[value5];
const property2 = value4[1];
const value6 = property !== '';
binding.useEffect(function() {
return navigation.addListener('beforeRemove', _fun116488);
}, [navigation, onClose]);
const applicationCommandQueryApiModule = importAll(8060) /* metro dependency 8060: ApplicationCommandQueryApi */;
const useDiscovery = applicationCommandQueryApiModule.useDiscovery;
object10 = {context: {channel: channel, type: 'channel'}};
object10.filters = {text: value6 ? property : value, commandTypes: [commandType]};
const object9 = {};
object9.limit = CONTEXT_MENU_COMMANDS_QUERY_LIMIT;
object9.includeFrecency = !value6;
const COMMAND_OR_APPLICATION = value6 ? (require(7869) /* metro dependency 7869: ApplicationCommandQueryTypes */).ScoreMethod.COMMAND_OR_APPLICATION : value;
object9.scoreMethod = COMMAND_OR_APPLICATION;
object10.options = object9;
object10.allowFetch = true;
const {commands, commandsByActiveSection, sectionDescriptors, loading} = Reflect.apply(useDiscovery,
applicationCommandQueryApiModule, [object10]);
binding = env0_5;
const useMemo = binding.useMemo;
const sections = Reflect.apply(useMemo, binding, [function() {
sectionDescriptors.forEach(_fun116490);
return {sections: {}};
}, [sectionDescriptors]]).sections;
const value8 = binding.useCallback(_fun116491, [channel, commandTargetId, guild, navigation, onPressAppCommand]);
const value9 = binding.useCallback(_fun116492, [commandsByActiveSection, navigation, value8]);
const value10 = binding.useMemo(_fun116494, [loading, commands.length, commandsByActiveSection]);
const frecencyItems = value10.frecencyItems;
const value11 = binding.useMemo(_fun116499, [loading, commands, value6, frecencyItems, value10.appItems]);
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
const value12 = (importDefault(7705) /* metro dependency 7705: useScaledRowHeight */)();
const value13 = binding.useMemo(_fun116501, [value11]);
const styles = useStyles();
const value14 = (require(8518) /* metro dependency 8518: useScaledTextLineHeightAndroid */).useScaledTextLineHeight('text-sm/semibold');
const value15 = binding.useCallback(_fun116503, [loading, commands.length, value6, frecencyItems.length,
styles.sectionHeader]);
const value16 = binding.useCallback(_fun116504, [value11, value8, value9, sections]);
const value17 = binding.useMemo(_fun116507, [loading, commands.length, value6, value14,
styles.sectionHeader.paddingTop, styles.sectionHeader.paddingBottom]);
let r6 = value6 || !loading && commands.length > value5;
if (r6) {
object2 = {};
object3 = {};
object3.marginBottom = value6 ? (importDefault(697) /* metro dependency 697: native */).space.PX_16 : value5;
object2.style = object3;
SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
object8 = {size: 'md', onChange: property2};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object8.placeholder = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.m1UwbP);
r6 = <View {...object2}><SearchField {...object8} /></View>;
}
return (
<View style={styles.container}>
{r6}
{((Component) => <Component sections={value13} estimatedListSize="windowSize" itemSize={value12} insetEnd={insets.bottom} renderItem={value16} renderSectionHeader={value15} sectionHeaderSize={value17} />)(importDefault(8671) /* metro dependency 8671: FastestListAndroid */)}
</View>
);
}
function _fun116487() { // fn#116487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:855, offset: 0x0248b93c, size: 34 bytes, params: 1, frame: 13
return navigation.addListener('beforeRemove', _fun116488);
}
function _fun116489() { // fn#116489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:1242, offset: 0x0248b988, size: 41 bytes, params: 1, frame: 12
sectionDescriptors.forEach(_fun116490);
return {sections: {}};
}
function _fun116491(a0) { // fn#116491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:1337, offset: 0x0248b9b1, size: 147 bytes, params: 2, frame: 15
if (onPressAppCommand != null) {
onPressAppCommand();
}
env0_6.current = true;
(importDefault(8050) /* metro dependency 8050: executeCommand */)({command: a0, optionValues: {},
context: {channel: channel, guild: guild}, commandTargetId: commandTargetId});
(navigation.getParent() ?? navigation).goBack();
}
function _fun116492(a0) { // fn#116492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:1528, offset: 0x0248ba44, size: 103 bytes, params: 2, frame: 16
const env0_0 = a0;
const value2 = commandsByActiveSection.find(_fun116493);
const value3 = undefined;
const r5 = (value2 == null ? value3 : value2.data) ?? [];
const navigationBinding = navigation;
navigationBinding.navigate('app', {section: a0, commands: r5, onPressCommand: env0_13});
return value3;
}
function _fun116494() { // fn#116494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:1696, offset: 0x0248baab, size: 167 bytes, params: 1, frame: 16
var r2;
var object2;
var value;
if (loading) {
object2 = {frecencyItems: [], appItems: []};
} else {
if (commands.length === 0) {
return {frecencyItems: [], appItems: []};
function ContextMenuCommandRootScreen(a0) { // fn#116485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:568, offset: 0x0248b3f1, size: 1323 bytes, params: 2, frame: 32
var object7;
var object;
var object4;
var SearchField;
var object5;
var intl;
const navigation = a0.navigation;
const {channel, commandType, commandTargetId, onPressAppCommand, onClose} = a0.route.params;
const onClose2 = onClose;
const value = undefined;
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(channel.guild_id);
});
const guild2 = guild;
let binding = guild2;
const env0_6 = binding.useRef(false);
const value4 = onClose2(binding.useState(''), 2);
const value5 = 0;
const property = value4[value5];
const property2 = value4[1];
const value6 = property !== '';
binding.useEffect(function() {
return navigation.addListener('beforeRemove', _fun116488);
}, [navigation, onClose]);
const useDiscovery = ApplicationCommandQueryApiModule.useDiscovery;
object7 = {context: {channel: channel, type: 'channel'}};
object7.filters = {text: value6 ? property : value, commandTypes: [commandType]};
const object6 = {};
object6.limit = CONTEXT_MENU_COMMANDS_QUERY_LIMIT;
object6.includeFrecency = !value6;
const COMMAND_OR_APPLICATION = value6 ? (require(7869) /* metro dependency 7869: ApplicationCommandQueryTypes */).ScoreMethod.COMMAND_OR_APPLICATION : value;
object6.scoreMethod = COMMAND_OR_APPLICATION;
object7.options = object6;
object7.allowFetch = true;
const {commands, commandsByActiveSection, sectionDescriptors, loading} = Reflect.apply(useDiscovery,
ApplicationCommandQueryApiModule, [object7]);
binding = guild2;
const useMemo = binding.useMemo;
const sections = Reflect.apply(useMemo, binding, [function() {
sectionDescriptors.forEach(_fun116490);
return {sections: {}};
}, [sectionDescriptors]]).sections;
const value8 = binding.useCallback(_fun116491, [channel, commandTargetId, guild, navigation, onPressAppCommand]);
const value9 = binding.useCallback(_fun116492, [commandsByActiveSection, navigation, value8]);
const value10 = binding.useMemo(_fun116494, [loading, commands.length, commandsByActiveSection]);
const frecencyItems = value10.frecencyItems;
const value11 = binding.useMemo(_fun116499, [loading, commands, value6, frecencyItems, value10.appItems]);
const insets = (UseSafeAreaInsetsKeyboardAwareNative)({includeKeyboardHeight: true}).insets;
const value12 = (UseScaledRowHeight)();
const value13 = binding.useMemo(_fun116501, [value11]);
const styles = useStyles();
const value14 = (UseScaledTextLineHeightAndroidModule).useScaledTextLineHeight('text-sm/semibold');
const value15 = binding.useCallback(_fun116503, [loading, commands.length, value6, frecencyItems.length,
styles.sectionHeader]);
const value16 = binding.useCallback(_fun116504, [value11, value8, value9, sections]);
const value17 = binding.useMemo(_fun116507, [loading, commands.length, value6, value14,
styles.sectionHeader.paddingTop, styles.sectionHeader.paddingBottom]);
let r6 = value6 || !loading && commands.length > value5;
if (r6) {
object = {};
object4 = {};
object4.marginBottom = value6 ? (importDefault(697) /* metro dependency 697: native */).space.PX_16 : value5;
object.style = object4;
SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
object5 = {size: 'md', onChange: property2};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object5.placeholder = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.m1UwbP);
r6 = (
<View {...object}>
<SearchField {...object5} />
</View>
);
}
var value2 = commandsByActiveSection.find(function(a0) {
return a0.section.id === BuiltInSectionId.FRECENCY;
});
value = commandsByActiveSection.filter(function(a0) {
return a0.section.id !== BuiltInSectionId.FRECENCY;
});
object2 = {};
r2 = value2 == null ? undefined : value2.data.map(function(a0) {
return {type: 'command', command: a0};
});
r2 = r2 ?? [];
object2.frecencyItems = r2;
object2.appItems = value.map(function({section}) {
return {type: 'app', section: section};
});
}
return object2;
}
return (
<View style={styles.container}>
{r6}
{((Component) => <Component sections={value13} estimatedListSize="windowSize" itemSize={value12} insetEnd={insets.bottom} renderItem={value16} renderSectionHeader={value15} sectionHeaderSize={value17} />)(FastestListAndroid)}
</View>
);
function _fun116487() { // fn#116487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:855, offset: 0x0248b93c, size: 34 bytes, params: 1, frame: 13
return navigation.addListener('beforeRemove', _fun116488);
function _fun116488() { // fn#116488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:889, offset: 0x0248b95e, size: 42 bytes, params: 1, frame: 11
if (!(env1_6.current || onClose == null)) {
onClose();
}
}
function _fun116499() { // fn#116499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:2077, offset: 0x0248bbc2, size: 186 bytes, params: 1, frame: 13
var object;
if (loading) {
object = {type: 'placeholder'};
object = [[object]];
} else {
var length = commands.length;
if (length === 0) {
object = {type: 'no_commands'};
object = [[object]];
}
function _fun116489() { // fn#116489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:1242, offset: 0x0248b988, size: 41 bytes, params: 1, frame: 12
sectionDescriptors.forEach(_fun116490);
return {sections: {}};
function _fun116490(a0) { // fn#116490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:1274, offset: 0x0115ee18, size: 23 bytes, params: 2, frame: 3
env0_0[a0.id] = a0;
}
}
function _fun116491(a0) { // fn#116491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:1337, offset: 0x0248b9b1, size: 147 bytes, params: 2, frame: 15
if (onPressAppCommand != null) {
onPressAppCommand();
}
env0_6.current = true;
(ExecuteCommand)({command: a0, optionValues: {},
context: {channel: channel, guild: guild}, commandTargetId: commandTargetId});
(navigation.getParent() ?? navigation).goBack();
}
function _fun116492(a0) { // fn#116492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:1528, offset: 0x0248ba44, size: 103 bytes, params: 2, frame: 16
const env0_0 = a0;
const value2 = commandsByActiveSection.find(_fun116493);
const value3 = undefined;
const r5 = (value2 == null ? value3 : value2.data) ?? [];
const navigationBinding = navigation;
navigationBinding.navigate('app', {section: a0, commands: r5, onPressCommand: env0_13});
return value3;
function _fun116493({section}) { // fn#116493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:1568, offset: 0x0204d7c8, size: 32 bytes, params: 2, frame: 2
return section.id === env0_0.id;
}
}
function _fun116494() { // fn#116494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:1696, offset: 0x0248baab, size: 167 bytes, params: 1, frame: 16
var r2;
var object;
var value;
if (loading) {
object = {frecencyItems: [], appItems: []};
} else {
if (commands.length === 0) {
return {frecencyItems: [], appItems: []};
}
var value2 = commandsByActiveSection.find(function(a0) {
return a0.section.id === BuiltInSectionId.FRECENCY;
});
value = commandsByActiveSection.filter(function(a0) {
return a0.section.id !== BuiltInSectionId.FRECENCY;
});
object = {};
r2 = value2 == null ? undefined : value2.data.map(function(a0) {
return {type: 'command', command: a0};
});
r2 = r2 ?? [];
object.frecencyItems = r2;
object.appItems = value.map(function({section}) {
return {type: 'app', section: section};
});
}
return object;
}
if (result) {
return [commands.map(function(a0) {
return {type: 'command', command: a0};
})];
function _fun116499() { // fn#116499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:2077, offset: 0x0248bbc2, size: 186 bytes, params: 1, frame: 13
var object;
if (loading) {
object = {type: 'placeholder'};
object = [[object]];
} else {
var length = commands.length;
if (length === 0) {
object = {type: 'no_commands'};
object = [[object]];
return object;
}
if (result) {
return [commands.map(function(a0) {
return {type: 'command', command: a0};
})];
}
object = [];
length = frecencyItems.length;
if (length > 0) {
object.push(frecencyItems);
}
length = appItems.length;
if (length > 0) {
object.push(appItems);
}
}
return object;
}
object = [];
length = frecencyItems.length;
if (length > 0) {
object.push(frecencyItems);
function _fun116501() { // fn#116501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:2368, offset: 0x0248bc7c, size: 28 bytes, params: 1, frame: 11
return env0_17.map(function(a0) {
return a0.length;
});
}
length = appItems.length;
if (length > 0) {
object.push(appItems);
function _fun116503(a0) { // fn#116503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:2481, offset: 0x0248bc98, size: 269 bytes, params: 2, frame: 17
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
if (loading) {
return null;
}
if (commands.length === 0) {
return null;
}
if (result) {
return null;
}
const r4 = a0 !== 0 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PHjkRE) : frecencyItems.length > 0 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.V0w2ap) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PHjkRE);
const Text = (TextModule).Text;
return (
<Text
variant={env0_19}
color="text-default"
style={styles.sectionHeader}
>
{r4}
</Text>
);
}
function _fun116504(a0, a1) { // fn#116504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:2773, offset: 0x0248bda5, size: 405 bytes, params: 3, frame: 22
var environment;
var ContextMenuCommandAppItem;
var object;
var section;
var value4;
var ContextMenuCommandItem;
var command;
var sectionsBinding;
const property = env0_17[a0][a1];
const value2 = a1 === 0;
const value3 = a1 === env0_17[a0].length - 1;
const type = property.type;
if (type === 'placeholder') {
value = environment.__proto__;
const ContextMenuCommandLoadingItem = (require(15229) /* metro dependency 15229: ContextMenuCommandItem */).ContextMenuCommandLoadingItem;
return (
<ContextMenuCommandLoadingItem
start={value2}
end={value3}
key="placeholder"
/>
);
}
if (type === 'no_commands') {
value = environment.__proto__;
const ContextMenuCommandEmptyItem = (require(15229) /* metro dependency 15229: ContextMenuCommandItem */).ContextMenuCommandEmptyItem;
return (
<ContextMenuCommandEmptyItem
start={value2}
end={value3}
key="no_commands"
/>
);
}
if (type === 'command') {
value4 = environment.__proto__;
ContextMenuCommandItem = importDefault(15229) /* metro dependency 15229: ContextMenuCommandItem */;
object = {};
command = property.command;
object.item = command;
object.onPress = onPress_116505;
sectionsBinding = sections;
command = property.command;
object.section = sectionsBinding[command.applicationId];
object.start = value2;
object.end = value3;
command = property.command;
return <ContextMenuCommandItem {...object} key={command.id} />;
}
if (type === 'app') {
value = environment.__proto__;
ContextMenuCommandAppItem = (require(15229) /* metro dependency 15229: ContextMenuCommandItem */).ContextMenuCommandAppItem;
object = {};
section = property.section;
object.section = section;
object.onPress = onPress_116506;
object.start = value2;
object.end = value3;
section = property.section;
return <ContextMenuCommandAppItem {...object} key={section.id} />;
}
function onPress_116505() { // fn#116505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:3086, offset: 0x0248bf3a, size: 29 bytes, params: 1, frame: 11
return env1_13(env0_0.command);
}
function onPress_116506() { // fn#116506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:3248, offset: 0x0248bf57, size: 29 bytes, params: 1, frame: 11
return env1_14(env0_0.section);
}
}
function _fun116507() { // fn#116507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:3321, offset: 0x0248bf74, size: 84 bytes, params: 1, frame: 4
var r0;
var binding;
var sectionHeader;
var value3;
const loadingBinding = loading;
const value2 = 0;
if (loadingBinding) {
r0 = value2;
} else if (value2 === commands.length) {
r0 = value2;
} else if (result) {
r0 = value2;
} else {
binding = env0_20;
sectionHeader = styles.sectionHeader;
value3 = binding + sectionHeader.paddingTop;
sectionHeader = styles.sectionHeader;
r0 = value3 + sectionHeader.paddingBottom;
}
return r0;
}
}
return object;
}
function _fun116501() { // fn#116501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:2368, offset: 0x0248bc7c, size: 28 bytes, params: 1, frame: 11
return env0_17.map(function(a0) {
return a0.length;
});
}
function _fun116503(a0) { // fn#116503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:2481, offset: 0x0248bc98, size: 269 bytes, params: 2, frame: 17
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
if (loading) {
return null;
}
if (commands.length === 0) {
return null;
}
if (result) {
return null;
}
const r4 = a0 !== 0 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PHjkRE) : frecencyItems.length > 0 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.V0w2ap) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PHjkRE);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
variant={env0_19}
color="text-default"
style={styles.sectionHeader}
>
{r4}
</Text>
);
}
function _fun116504(a0, a1) { // fn#116504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:2773, offset: 0x0248bda5, size: 405 bytes, params: 3, frame: 22
var environment;
var ContextMenuCommandAppItem;
var object2;
var section;
var value4;
var ContextMenuCommandItem;
var command;
var sectionsBinding;
const property = env0_17[a0][a1];
const value2 = a1 === 0;
const value3 = a1 === env0_17[a0].length - 1;
const type = property.type;
if (type === 'placeholder') {
value = environment.__proto__;
const ContextMenuCommandLoadingItem = (require(15229) /* metro dependency 15229: ContextMenuCommandItem */).ContextMenuCommandLoadingItem;
return (
<ContextMenuCommandLoadingItem
start={value2}
end={value3}
key="placeholder"
/>
);
}
if (type === 'no_commands') {
value = environment.__proto__;
const ContextMenuCommandEmptyItem = (require(15229) /* metro dependency 15229: ContextMenuCommandItem */).ContextMenuCommandEmptyItem;
return (
<ContextMenuCommandEmptyItem
start={value2}
end={value3}
key="no_commands"
/>
);
}
if (type === 'command') {
value4 = environment.__proto__;
ContextMenuCommandItem = importDefault(15229) /* metro dependency 15229: ContextMenuCommandItem */;
object2 = {};
command = property.command;
object2.item = command;
object2.onPress = onPress_116505;
sectionsBinding = sections;
command = property.command;
object2.section = sectionsBinding[command.applicationId];
object2.start = value2;
object2.end = value3;
command = property.command;
return <ContextMenuCommandItem {...object2} key={command.id} />;
}
if (type === 'app') {
value = environment.__proto__;
ContextMenuCommandAppItem = (require(15229) /* metro dependency 15229: ContextMenuCommandItem */).ContextMenuCommandAppItem;
object2 = {};
section = property.section;
object2.section = section;
object2.onPress = onPress_116506;
object2.start = value2;
object2.end = value3;
section = property.section;
return <ContextMenuCommandAppItem {...object2} key={section.id} />;
}
}
function _fun116507() { // fn#116507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:3321, offset: 0x0248bf74, size: 84 bytes, params: 1, frame: 4
var r0;
var binding;
var sectionHeader;
var value3;
const loadingBinding = loading;
const value2 = 0;
if (loadingBinding) {
r0 = value2;
} else if (value2 === commands.length) {
r0 = value2;
} else if (result) {
r0 = value2;
} else {
binding = env0_20;
sectionHeader = styles.sectionHeader;
value3 = binding + sectionHeader.paddingTop;
sectionHeader = styles.sectionHeader;
r0 = value3 + sectionHeader.paddingBottom;
}
return r0;
}
function _fun116488() { // fn#116488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:889, offset: 0x0248b95e, size: 42 bytes, params: 1, frame: 11
if (!(env1_6.current || onClose == null)) {
onClose();
}
}
function onPress_116505() { // fn#116505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:3086, offset: 0x0248bf3a, size: 29 bytes, params: 1, frame: 11
return env1_13(env0_0.command);
}
function onPress_116506() { // fn#116506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15425:3248, offset: 0x0248bf57, size: 29 bytes, params: 1, frame: 11
return env1_14(env0_0.section);
}
global.__d(_fun116484, 15228, [57, 31, 27, 1867, 5066, 33, 4501, 697, 566, 8060, 7869, 8050, 5463, 7705, 8518, 1244,
4573, 15229, 6984, 8671,
2]) /* metro module 15228, dependencies: [57, 31, 27, 1867, 5066, 33, 4501, 697, 566, 8060, 7869, 8050, 5463, 7705, 8518, 1244, 4573, 15229, 6984, 8671, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,17 +1,20 @@
/* Metro module 9900; source: modules/application_commands/native/showExecutedApplicationCommandPopout.tsx; dependencies: [4080, 9901, 1962, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun77584(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10086:6, offset: 0x01e02018, 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/application_commands/native/showExecutedApplicationCommandPopout.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/showExecutedApplicationCommandPopout.tsx');
exports.default = showExecutedApplicationCommandPopout;
function showExecutedApplicationCommandPopout(a0) { // fn#77585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10086:212, offset: 0x01e0207f, size: 105 bytes, params: 2, frame: 18
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, 'ExecutedCommandPopout:' + a0.messageId, a0]);
}
}
function showExecutedApplicationCommandPopout(a0) { // fn#77585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10086:212, offset: 0x01e0207f, size: 105 bytes, params: 2, frame: 18
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, 'ExecutedCommandPopout:' + a0.messageId, a0]);
}
global.__d(_fun77584, 9900, [4080, 9901, 1962, 2]) /* metro module 9900, dependencies: [4080, 9901, 1962, 2] */;