Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,862 @@
/* Metro module 11647; source: modules/chat_input/native/ApplicationCommandOptionValueParser.tsx; dependencies: [7, 6, 31, 5071, 1383, 1935, 1945, 1938, 3793, 1878, 6625, 22, 1360, 4805, 6526, 1909, 7076, 2] */
function _fun89301(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11833:6, offset: 0x020089d8, size: 444 bytes, params: 8, frame: 22
let env0_0 = require;
const _arrayLikeToArray_89304 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const closure = getUsers;
const closure2 = getRoles;
const closure3 = getChannels;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importDefault(7) /* metro dependency 7 */;
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const activeJoinedThreadsStore = importDefault(5071) /* metro dependency 5071: ActiveJoinedThreadsStore */;
const env0_6 = (require(1383) /* metro dependency 1383: ChannelRecord */).isGuildSelectableChannelType;
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const channelAutocompleteConstantsModule = require(6625) /* metro dependency 6625: ChannelAutocompleteConstants */;
const env0_12 = channelAutocompleteConstantsModule.MENTION_SENTINEL;
const env0_13 = channelAutocompleteConstantsModule.CHANNEL_SENTINEL;
const env0_14 = RegExp('^@(([^@#:]+)#([0-9]{4}))$', 'i');
const matchPrefix_89318 = function(a0, a1, a2) {
var env0_0 = a0;
if (a1[0] !== a0) {
return null;
}
var env0_1 = a1.substr(a0.length);
var value = a2.sortBy(_fun89319);
value = value.filter(_fun89320);
value = value.map(_fun89321);
return value.first();
};
value = value(ApplicationCommandOptionValueParser);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/ApplicationCommandOptionValueParser.tsx');
exports.getUsers = closure;
exports.getRoles = closure2;
exports.getChannels = closure3;
exports.ApplicationCommandOptionValueParser = value;
exports.parseOptionValuesForSend = parseOptionValuesForSend;
exports.useApplicationCommandOptionValueParser = useApplicationCommandOptionValueParser;
}
function _createForOfIteratorHelperLoose_89302(a0, a1) { // fn#89302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11833:285, offset: 0x02008b94, 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)) {
if (r1) {
}
return _fun89303;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_89304(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') {
value = _arrayLikeToArray_89304(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_89304(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun89303;
}
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 getUsers(a0) { // fn#89305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11833:1449, offset: 0x02008d08, size: 264 bytes, params: 2, frame: 16
var r3;
let value = a0.getGuildId();
if (a0.isPrivate()) {
value = importDefault(22) /* metro dependency 22 */;
value = value(a0.recipients);
value = value.map(function(a0) {
return {userId: a0};
});
r3 = value;
} else if (value != null) {
value = (importDefault(22) /* metro dependency 22 */)(GuildMemberStore.getMembers(value));
value = value.map(_fun89307);
r3 = value;
} else {
value = importDefault(22) /* metro dependency 22 */;
value = value([]);
r3 = value;
}
value = Reflect.apply(r3.map(function({userId}) {
return UserStore.getUser(userId);
}).filter, value, [(require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish]);
return value.map(function(a0) {
return {id: a0.id, text: a0.tag};
});
}
function getRoles({guild_id}) { // fn#89310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11833:1738, offset: 0x02008e60, size: 89 bytes, params: 2, frame: 12
return (importDefault(22) /* metro dependency 22 */)(guild_id != null ? GuildRoleStore.getSortedRoles(guild_id) : []).map(function({id,
name}) {
return {id: id, text: name};
});
}
function getChannels(a0, a1) { // fn#89312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11833:1868, offset: 0x02008eb9, size: 273 bytes, params: 3, frame: 19
var items2;
const env0_0 = a1;
let value = a0.getGuildId();
if (value == null) {
items2 = [];
value = a1 == null;
if (value || a1.includes(a0.type)) {
items2.push(a0);
}
value = (importDefault(22) /* metro dependency 22 */)(items2);
return value.map(function(a0) {
var object = {id: a0.id};
object.text = require(dependencyMap[13]).computeChannelName(a0, UserStore, RelationshipStore);
return object;
});
}
const env0_2 = GuildChannelStore.getTextChannelNameDisambiguations(value);
const defaultImport = importDefault(22) /* metro dependency 22 */;
const COMMAND_SUPPORTED_CHANNEL_TYPE_KEYS = (require(6526) /* metro dependency 6526: AutocompleteUtils */).COMMAND_SUPPORTED_CHANNEL_TYPE_KEYS;
const value4 = defaultImport(COMMAND_SUPPORTED_CHANNEL_TYPE_KEYS).flatMap(_fun89314);
value = value4.concat(ActiveJoinedThreadsStore.computeAllActiveJoinedThreads(value));
value = value.filter(_fun89316);
return value.map(_fun89317);
}
function matchPrefix_89318(a0, a1, a2) { // fn#89318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11833:1242, offset: 0x020090b8, size: 113 bytes, params: 4, frame: 13
const env0_0 = a0;
if (a1[0] !== a0) {
return null;
}
const env0_1 = a1.substr(a0.length);
let value = a2.sortBy(function(a0) {
return -a0.text.length;
});
value = value.filter(_fun89320);
value = value.map(_fun89321);
return value.first();
}
function ApplicationCommandOptionValueParser(a0) { // fn#89322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11833:2445, offset: 0x02009176, size: 52 bytes, params: 2, frame: 14
env0_3(this, ApplicationCommandOptionValueParser);
this.parse = parse_89323;
this.channel = a0;
}
function parseOptionValuesForSend(a0, a1, a2) { // fn#89327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11833:4067, offset: 0x020094d6, size: 299 bytes, params: 4, frame: 30
var r2;
var value4;
var name;
var property;
var type;
var ApplicationCommandOptionType;
var STRING;
var choices;
var autocomplete;
var defaultImport;
var parse;
var text;
var content;
var value5;
if (a1.options == null) {
return {};
}
const object2 = {};
const parserState = (require(7076) /* metro dependency 7076: MessageParser */).createParserState(a0);
const value2 = _createForOfIteratorHelperLoose_89302(a1.options);
const value3 = value2();
let done = value3.done;
if (!done) {
r2 = value3;
reducibleLoop2: while (true) {
value4 = r2.value;
name = value4.name;
property = a2[name];
reducibleJoin9: while (true) {
if (property == null) {
break reducibleJoin9;
}
type = property[0].type;
if (type === 'text') {
type = value4.type;
ApplicationCommandOptionType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandOptionType;
STRING = ApplicationCommandOptionType.STRING;
if (type === STRING) {
choices = value4.choices;
if (choices == null) {
autocomplete = value4.autocomplete;
if (!autocomplete) {
name = value4.name;
defaultImport = importDefault(7076) /* metro dependency 7076: MessageParser */;
parse = defaultImport.parse;
text = property[0].text;
content = Reflect.apply(parse, defaultImport, [a0, text, parserState]).content;
object2[name] = [{type: 'text', text: content}];
break reducibleJoin9;
}
}
}
}
name = value4.name;
object2[name] = property;
break reducibleJoin9;
}
value5 = value2();
done = value5.done;
if (done) {
break reducibleLoop2;
}
r2 = value5;
continue reducibleLoop2;
}
}
return object2;
}
function useApplicationCommandOptionValueParser({channel}) { // fn#89328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11833:4492, offset: 0x02009601, size: 49 bytes, params: 2, frame: 14
return env0_4.useMemo(_fun89329, [channel]);
}
function _fun89307({userId}) { // fn#89307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11833:1597, offset: 0x02008e1b, size: 16 bytes, params: 2, frame: 2
return {userId: userId};
}
function _fun89314(a0) { // fn#89314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11833:2175, offset: 0x0200900c, size: 53 bytes, params: 2, frame: 11
var environment;
const value = environment.__proto__;
return GuildChannelStore.getChannels(env0_1)[a0].map(function(a0) {
return a0.channel;
});
}
function _fun89317(a0) { // fn#89317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11833:2309, offset: 0x02009041, size: 119 bytes, params: 2, frame: 18
const object2 = {};
object2.id = a0.id;
const value = environment.__proto__;
object2.text = isGuildSelectableChannelType(a0.type) && env0_2[a0.id]?.name != null ? env0_2[a0.id]?.name : (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(a0,
UserStore, RelationshipStore);
return object2;
}
function _fun89320({text}) { // fn#89320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11833:1350, offset: 0x02009129, size: 41 bytes, params: 2, frame: 10
const binding = env0_1;
return binding.toLowerCase() === text.toLowerCase();
}
function _fun89321({id, text}) { // fn#89321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11833:1403, offset: 0x02009152, size: 36 bytes, params: 2, frame: 4
return {text: env0_0 + text, id: id};
}
function ApplicationCommandOptionValueParserParse(a0, a1) { // fn#89323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11833:2548, owner: ApplicationCommandOptionValueParser.parse, offset: 0x020091aa, size: 578 bytes, params: 3, frame: 26
var value7;
var value8;
var value9;
var value10;
let value = a0.trim();
const env0_0 = value;
const getUsersBinding = getUsers;
let binding = env0_0;
const usersBinding = getUsersBinding(binding.channel);
const env0_2 = getRoles(binding.channel);
const env0_3 = usersBinding.map(function(a0) {
var r3;
var object = {};
copyDataProperties(object, a0, r3);
object['text'] = a0.text.split('#')[0];
return object;
});
const closure = matchUser;
const closure2 = matchRole;
let type = a1.type;
const ApplicationCommandOptionType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandOptionType;
const USER = ApplicationCommandOptionType.USER;
if (type !== USER) {
type = a1.type;
if (type !== ApplicationCommandOptionType.ROLE) {
type = a1.type;
if (type !== ApplicationCommandOptionType.CHANNEL) {
if (a1.type !== ApplicationCommandOptionType.MENTIONABLE) {
return {type: 'text', text: a0};
}
value9 = closure2();
if (value9 != null) {
return value9;
}
value10 = closure();
if (value10 != null) {
return value10;
}
binding = env1_14;
binding.lastIndex = 0;
value = binding.exec(value);
if (value == null) {
return {type: 'text', text: a0};
}
value = UserStore.findByTag(value[2], value[3]);
if (value != null) {
return {type: 'userMention', userId: value.id};
}
return {type: 'text', text: a0};
}
value8 = matchPrefix_89318(CHANNEL_SENTINEL, value, getChannels(env0_0.channel, a1.channelTypes));
if (value8 == null) {
if (a1.type !== ApplicationCommandOptionType.MENTIONABLE) {
return {type: 'text', text: a0};
}
value9 = closure2();
if (value9 != null) {
return value9;
}
value10 = closure();
if (value10 != null) {
return value10;
}
binding = env1_14;
binding.lastIndex = 0;
value = binding.exec(value);
if (value == null) {
return {type: 'text', text: a0};
}
value = UserStore.findByTag(value[2], value[3]);
if (value != null) {
return {type: 'userMention', userId: value.id};
}
return {type: 'text', text: a0};
}
if (value8.id != null) {
return {type: 'channelMention', channelId: value8.id};
}
type = a1.type;
if (type !== ApplicationCommandOptionType.MENTIONABLE) {
return {type: 'text', text: a0};
}
value9 = closure2();
if (value9 != null) {
return value9;
}
value10 = closure();
if (value10 != null) {
return value10;
}
binding = env1_14;
binding.lastIndex = 0;
value = binding.exec(value);
if (value == null) {
return {type: 'text', text: a0};
}
value = UserStore.findByTag(value[2], value[3]);
if (value != null) {
return {type: 'userMention', userId: value.id};
}
return {type: 'text', text: a0};
}
value7 = closure2();
if (value7 != null) {
return value7;
}
type = a1.type;
if (type !== ApplicationCommandOptionType.CHANNEL) {
if (a1.type !== ApplicationCommandOptionType.MENTIONABLE) {
return {type: 'text', text: a0};
}
value9 = closure2();
if (value9 != null) {
return value9;
}
value10 = closure();
if (value10 != null) {
return value10;
}
binding = env1_14;
binding.lastIndex = 0;
value = binding.exec(value);
if (value == null) {
return {type: 'text', text: a0};
}
value = UserStore.findByTag(value[2], value[3]);
if (value != null) {
return {type: 'userMention', userId: value.id};
}
return {type: 'text', text: a0};
}
value8 = matchPrefix_89318(CHANNEL_SENTINEL, value, getChannels(env0_0.channel, a1.channelTypes));
if (value8 == null) {
if (a1.type !== ApplicationCommandOptionType.MENTIONABLE) {
return {type: 'text', text: a0};
}
value9 = closure2();
if (value9 != null) {
return value9;
}
value10 = closure();
if (value10 != null) {
return value10;
}
binding = env1_14;
binding.lastIndex = 0;
value = binding.exec(value);
if (value == null) {
return {type: 'text', text: a0};
}
value = UserStore.findByTag(value[2], value[3]);
if (value != null) {
return {type: 'userMention', userId: value.id};
}
return {type: 'text', text: a0};
}
if (value8.id != null) {
return {type: 'channelMention', channelId: value8.id};
}
type = a1.type;
if (type !== ApplicationCommandOptionType.MENTIONABLE) {
return {type: 'text', text: a0};
}
} else {
var value5 = closure();
if (value5 != null) {
return value5;
}
binding = env1_14;
binding.lastIndex = 0;
var value6 = binding.exec(value);
if (value6 == null) {
type = a1.type;
if (type !== ApplicationCommandOptionType.ROLE) {
type = a1.type;
if (type !== ApplicationCommandOptionType.CHANNEL) {
if (a1.type !== ApplicationCommandOptionType.MENTIONABLE) {
return {type: 'text', text: a0};
}
value9 = closure2();
if (value9 != null) {
return value9;
}
value10 = closure();
if (value10 != null) {
return value10;
}
binding = env1_14;
binding.lastIndex = 0;
value = binding.exec(value);
if (value == null) {
return {type: 'text', text: a0};
}
value = UserStore.findByTag(value[2], value[3]);
if (value != null) {
return {type: 'userMention', userId: value.id};
}
return {type: 'text', text: a0};
}
value8 = matchPrefix_89318(CHANNEL_SENTINEL, value, getChannels(env0_0.channel, a1.channelTypes));
if (value8 == null) {
if (a1.type !== ApplicationCommandOptionType.MENTIONABLE) {
return {type: 'text', text: a0};
}
value9 = closure2();
if (value9 != null) {
return value9;
}
value10 = closure();
if (value10 != null) {
return value10;
}
binding = env1_14;
binding.lastIndex = 0;
value = binding.exec(value);
if (value == null) {
return {type: 'text', text: a0};
}
value = UserStore.findByTag(value[2], value[3]);
if (value != null) {
return {type: 'userMention', userId: value.id};
}
return {type: 'text', text: a0};
}
if (value8.id != null) {
return {type: 'channelMention', channelId: value8.id};
}
type = a1.type;
if (type !== ApplicationCommandOptionType.MENTIONABLE) {
return {type: 'text', text: a0};
}
value9 = closure2();
if (value9 != null) {
return value9;
}
value10 = closure();
if (value10 != null) {
return value10;
}
binding = env1_14;
binding.lastIndex = 0;
value = binding.exec(value);
if (value == null) {
return {type: 'text', text: a0};
}
value = UserStore.findByTag(value[2], value[3]);
if (value != null) {
return {type: 'userMention', userId: value.id};
}
return {type: 'text', text: a0};
}
value7 = closure2();
if (value7 != null) {
return value7;
}
type = a1.type;
if (type !== ApplicationCommandOptionType.CHANNEL) {
if (a1.type !== ApplicationCommandOptionType.MENTIONABLE) {
return {type: 'text', text: a0};
}
value9 = closure2();
if (value9 != null) {
return value9;
}
value10 = closure();
if (value10 != null) {
return value10;
}
binding = env1_14;
binding.lastIndex = 0;
value = binding.exec(value);
if (value == null) {
return {type: 'text', text: a0};
}
value = UserStore.findByTag(value[2], value[3]);
if (value != null) {
return {type: 'userMention', userId: value.id};
}
return {type: 'text', text: a0};
}
value8 = matchPrefix_89318(CHANNEL_SENTINEL, value, getChannels(env0_0.channel, a1.channelTypes));
if (value8 == null) {
if (a1.type !== ApplicationCommandOptionType.MENTIONABLE) {
return {type: 'text', text: a0};
}
value9 = closure2();
if (value9 != null) {
return value9;
}
value10 = closure();
if (value10 != null) {
return value10;
}
binding = env1_14;
binding.lastIndex = 0;
value = binding.exec(value);
if (value == null) {
return {type: 'text', text: a0};
}
value = UserStore.findByTag(value[2], value[3]);
if (value != null) {
return {type: 'userMention', userId: value.id};
}
return {type: 'text', text: a0};
}
if (value8.id != null) {
return {type: 'channelMention', channelId: value8.id};
}
type = a1.type;
if (type !== ApplicationCommandOptionType.MENTIONABLE) {
return {type: 'text', text: a0};
}
value9 = closure2();
if (value9 != null) {
return value9;
}
value10 = closure();
if (value10 != null) {
return value10;
}
binding = env1_14;
binding.lastIndex = 0;
value = binding.exec(value);
if (value == null) {
return {type: 'text', text: a0};
}
value = UserStore.findByTag(value[2], value[3]);
if (value != null) {
return {type: 'userMention', userId: value.id};
}
return {type: 'text', text: a0};
}
var byTag = UserStore.findByTag(value6[2], value6[3]);
if (byTag != null) {
return {type: 'userMention', userId: byTag.id};
}
type = a1.type;
if (type !== ApplicationCommandOptionType.ROLE) {
type = a1.type;
if (type !== ApplicationCommandOptionType.CHANNEL) {
if (a1.type !== ApplicationCommandOptionType.MENTIONABLE) {
return {type: 'text', text: a0};
}
value9 = closure2();
if (value9 != null) {
return value9;
}
value10 = closure();
if (value10 != null) {
return value10;
}
binding = env1_14;
binding.lastIndex = 0;
value = binding.exec(value);
if (value == null) {
return {type: 'text', text: a0};
}
value = UserStore.findByTag(value[2], value[3]);
if (value != null) {
return {type: 'userMention', userId: value.id};
}
return {type: 'text', text: a0};
}
value8 = matchPrefix_89318(CHANNEL_SENTINEL, value, getChannels(env0_0.channel, a1.channelTypes));
if (value8 == null) {
if (a1.type !== ApplicationCommandOptionType.MENTIONABLE) {
return {type: 'text', text: a0};
}
value9 = closure2();
if (value9 != null) {
return value9;
}
value10 = closure();
if (value10 != null) {
return value10;
}
binding = env1_14;
binding.lastIndex = 0;
value = binding.exec(value);
if (value == null) {
return {type: 'text', text: a0};
}
value = UserStore.findByTag(value[2], value[3]);
if (value != null) {
return {type: 'userMention', userId: value.id};
}
return {type: 'text', text: a0};
}
if (value8.id != null) {
return {type: 'channelMention', channelId: value8.id};
}
type = a1.type;
if (type !== ApplicationCommandOptionType.MENTIONABLE) {
return {type: 'text', text: a0};
}
value9 = closure2();
if (value9 != null) {
return value9;
}
value10 = closure();
if (value10 != null) {
return value10;
}
binding = env1_14;
binding.lastIndex = 0;
value = binding.exec(value);
if (value == null) {
return {type: 'text', text: a0};
}
value = UserStore.findByTag(value[2], value[3]);
if (value != null) {
return {type: 'userMention', userId: value.id};
}
return {type: 'text', text: a0};
}
value7 = closure2();
if (value7 != null) {
return value7;
}
type = a1.type;
if (type !== ApplicationCommandOptionType.CHANNEL) {
if (a1.type !== ApplicationCommandOptionType.MENTIONABLE) {
return {type: 'text', text: a0};
}
value9 = closure2();
if (value9 != null) {
return value9;
}
value10 = closure();
if (value10 != null) {
return value10;
}
binding = env1_14;
binding.lastIndex = 0;
value = binding.exec(value);
if (value == null) {
return {type: 'text', text: a0};
}
value = UserStore.findByTag(value[2], value[3]);
if (value != null) {
return {type: 'userMention', userId: value.id};
}
return {type: 'text', text: a0};
}
value8 = matchPrefix_89318(CHANNEL_SENTINEL, value, getChannels(env0_0.channel, a1.channelTypes));
if (value8 == null) {
if (a1.type !== ApplicationCommandOptionType.MENTIONABLE) {
return {type: 'text', text: a0};
}
value9 = closure2();
if (value9 != null) {
return value9;
}
value10 = closure();
if (value10 != null) {
return value10;
}
binding = env1_14;
binding.lastIndex = 0;
value = binding.exec(value);
if (value == null) {
return {type: 'text', text: a0};
}
value = UserStore.findByTag(value[2], value[3]);
if (value != null) {
return {type: 'userMention', userId: value.id};
}
return {type: 'text', text: a0};
}
if (value8.id != null) {
return {type: 'channelMention', channelId: value8.id};
}
type = a1.type;
if (type !== ApplicationCommandOptionType.MENTIONABLE) {
return {type: 'text', text: a0};
}
}
value9 = closure2();
if (value9 != null) {
return value9;
}
value10 = closure();
if (value10 != null) {
return value10;
}
binding = env1_14;
binding.lastIndex = 0;
value = binding.exec(value);
if (value != null) {
value = UserStore.findByTag(value[2], value[3]);
if (value != null) {
return {type: 'userMention', userId: value.id};
}
}
return {type: 'text', text: a0};
}
function _fun89329() { // fn#89329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11833:4518, offset: 0x02009632, size: 36 bytes, params: 1, frame: 11
let value = environment.__proto__;
const binding = env1_16;
const channelBinding = channel;
value = Object.create(binding.prototype, {constructor: {value: binding}});
const binding2 = new binding(channelBinding);
return binding2 instanceof Object ? binding2 : value;
}
function matchUser() { // fn#89325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11833:2680, owner: ApplicationCommandOptionValueParser.parse.matchUser, offset: 0x020093ec, size: 126 bytes, params: 1, frame: 17
var r0;
let value = environment.__proto__.__proto__;
const matchPrefix_89318Binding = matchPrefix_89318;
const binding = env0_0;
const value3 = undefined;
const value4 = matchPrefix_89318Binding(MENTION_SENTINEL, binding, env0_1);
if ((value4 == null ? value3 : value4.id) != null) {
r0 = {type: 'userMention', userId: value4.id};
} else {
value = matchPrefix_89318(MENTION_SENTINEL, env0_0, env0_3);
r0 = (value == null ? value3 : value.id) != null ? {type: 'userMention', userId: value.id} : value3;
}
return r0;
}
function matchRole() { // fn#89326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11833:2856, owner: ApplicationCommandOptionValueParser.parse.matchRole, offset: 0x0200946a, size: 108 bytes, params: 1, frame: 16
const matchPrefix_89318Binding = matchPrefix_89318;
const binding = env0_0;
const value2 = undefined;
const value3 = matchPrefix_89318Binding(MENTION_SENTINEL, binding, env0_2);
return (value3 == null ? value2 : value3.id) != null ? {type: 'roleMention',
roleId: value3.id} : env0_0 !== '@everyone' ? value2 : {'type': 'textMention', 'text': '@everyone'};
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,185 @@
/* Metro module 11884; source: modules/chat_input/native/ChatInputAppCommandManager.tsx; dependencies: [57, 31, 7167, 7168, 4501, 697, 11647, 566, 11857, 8060, 1909, 11885, 11858, 2] */
function _fun91167(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12070:6, offset: 0x02054604, size: 448 bytes, params: 8, frame: 24
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const applicationCommandAutocompleteStore = importDefault(7167) /* metro dependency 7167: ApplicationCommandAutocompleteStore */;
const applicationCommandStore = importDefault(7168) /* metro dependency 7168: ApplicationCommandStore */;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object4 = {};
const object5 = {};
let BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object5.backgroundColor = BACKGROUND_BASE_LOWER;
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
object5.color = TEXT_DEFAULT;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object5.fontSize = 14;
object4.commandOption = object5;
const object6 = {};
BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object6.backgroundColor = BACKGROUND_BASE_LOWER;
const TEXT_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_CRITICAL;
object6.color = TEXT_FEEDBACK_CRITICAL;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object6.fontSize = 14;
object4.commandErrorOption = object6;
const TEXT_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_BRAND;
object4.autocomplete = {color: TEXT_BRAND, fontWeight: 'bold'};
const env0_8 = Reflect.apply(createStyles, createStylesModule, [object4]);
const value3 = value.forwardRef(_fun91168);
value3.displayName = 'ChatInputAppCommandManager';
value = value.memo(value3);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/ChatInputAppCommandManager.tsx');
exports.default = value;
}
function _fun91168({chatInputRef, chatInputStateRef, channel, commandsDisabled}, a1) { // fn#91168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12070:548, offset: 0x020547c4, size: 517 bytes, params: 3, frame: 28
var object2;
const styles = useStyles();
const env0_4 = styles;
const value2 = (require(11647) /* metro dependency 11647: ApplicationCommandOptionValueParser */).useApplicationCommandOptionValueParser({channel: channel});
const env0_5 = value2;
const activeCommand = (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationCommandStore],
function() {
return ApplicationCommandStore.getActiveCommand(channel.id);
});
const lastResponseNonce = (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationCommandAutocompleteStore],
function() {
return ApplicationCommandAutocompleteStore.getLastResponseNonce(channel.id);
});
const binding = env0_5;
const useRef = binding.useRef;
const chatInputCommandOptionParserModule = require(11857) /* metro dependency 11857: ChatInputCommandOptionParser */;
const getTextBeforeFirstOption = chatInputCommandOptionParserModule.getTextBeforeFirstOption;
let text = chatInputStateRef.current.text;
text = Reflect.apply(getTextBeforeFirstOption, chatInputCommandOptionParserModule, [text]).text;
const value3 = text.slice(1);
const value4 = Reflect.apply(useRef, binding, [value3.trimEnd()]);
const useState = binding.useState;
const value6 = env0_4(Reflect.apply(useState, binding, [value4.current]), 2);
const property = value6[0];
const env0_9 = value6[1];
const applicationCommandQueryApiModule = importAll(8060) /* metro dependency 8060: ApplicationCommandQueryApi */;
const useCachedResults = applicationCommandQueryApiModule.useCachedResults;
object2 = {type: 'channel', channel: channel};
const ApplicationCommandType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandType;
const CHAT = ApplicationCommandType.CHAT;
const commands = Reflect.apply(useCachedResults, applicationCommandQueryApiModule, [object2, CHAT,
property]).commands;
const env0_11 = binding.useRef(undefined);
binding.useEffect(_fun91175, [binding.useCallback(_fun91171, [activeCommand, channel, chatInputRef,
chatInputStateRef, commandsDisabled, lastResponseNonce, value2, commands, styles])]);
binding.useImperativeHandle(a1, function() {
return {getApplicationCommandManager: _fun91177, updateState: _fun91178};
});
return null;
}
function _fun91171() { // fn#91171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12070:1103, offset: 0x02054a0b, size: 382 bytes, params: 1, frame: 17
var environment;
var binding;
var value2;
var defaultImport;
var object2;
var value3;
var defaultImport2;
let current = chatInputStateRef.current;
const editId = current.editId;
const focused = current.focused;
const selectionStart = current.selectionStart;
const selectionEnd = current.selectionEnd;
let text = current.text;
const object4 = {};
object4.activeCommand = activeCommand;
object4.channel = channel;
object4.commandsDisabled = commandsDisabled;
object4.editId = editId;
object4.focused = focused;
object4.lastCommandAutocompleteResponseNonce = lastResponseNonce;
object4.queryCommands = commands;
object4.selectionStart = selectionStart;
object4.selectionEnd = selectionEnd;
object4.text = text;
current = env0_11.current;
if (current == null) {
binding = env0_11;
value2 = environment.__proto__;
defaultImport = importDefault(11885) /* metro dependency 11885: ApplicationCommandManager */;
object2 = {props: object4};
object2.ref = chatInputRef;
object2.optionValueParser = env0_5;
object2.styles = {commandOption: commandOption, commandErrorOption: commandErrorOption,
autocomplete: autocomplete};
value3 = Object.create(defaultImport.prototype, {constructor: {value: defaultImport}});
defaultImport2 = new defaultImport();
binding.current = defaultImport2 instanceof Object ? defaultImport2 : value3;
} else {
current = env0_11.current;
current.updateApplicationCommandManagerState({newState: object4});
}
const chatInputCommandOptionParserModule = require(11857) /* metro dependency 11857: ChatInputCommandOptionParser */;
const getTextBeforeFirstOption = chatInputCommandOptionParserModule.getTextBeforeFirstOption;
text = Reflect.apply(getTextBeforeFirstOption, chatInputCommandOptionParserModule, [text]).text;
const value8 = text.slice(1).trimEnd();
if (env0_8.current !== value8) {
env0_9(value8);
env0_8.current = value8;
}
}
function _fun91176() { // fn#91176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12070:1954, offset: 0x02054c70, size: 30 bytes, params: 1, frame: 3
return {getApplicationCommandManager: getApplicationCommandManager_91177, updateState: updateState_91178};
}
function commandOption() { // fn#91172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12070:1451, offset: 0x02054b89, size: 51 bytes, params: 1, frame: 11
let value = environment.__proto__.__proto__;
value = require(11858) /* metro dependency 11858: ChatInputParser */;
return value.convertToNativeStyle(styles.commandOption);
}
function commandErrorOption() { // fn#91173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12070:1521, offset: 0x02054bbc, size: 51 bytes, params: 1, frame: 11
let value = environment.__proto__.__proto__;
value = require(11858) /* metro dependency 11858: ChatInputParser */;
return value.convertToNativeStyle(styles.commandErrorOption);
}
function autocomplete(a0) { // fn#91174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12070:1590, offset: 0x02054bef, size: 129 bytes, params: 2, frame: 14
var r0;
var value;
var convertToNativeStyle;
var object2;
var value2;
var value3;
if (a0 == null) {
value = environment.__proto__.__proto__;
value = require(11858) /* metro dependency 11858: ChatInputParser */;
convertToNativeStyle = value.convertToNativeStyle;
value3 = environment.__proto__;
value = Reflect.apply(convertToNativeStyle, value, [styles.autocomplete]);
r0 = value;
} else {
value = environment.__proto__.__proto__;
value = require(11858) /* metro dependency 11858: ChatInputParser */;
convertToNativeStyle = value.convertToNativeStyle;
object2 = {};
value2 = environment.__proto__;
copyDataProperties(object2, styles.autocomplete, a0);
object2['color'] = a0;
value = Reflect.apply(convertToNativeStyle, value, [object2]);
r0 = value;
}
return r0;
}
function getApplicationCommandManager_91177() { // fn#91177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12070:1989, offset: 0x02054c8e, size: 14 bytes, params: 1, frame: 1
return env1_11.current;
}
function updateState_91178() { // fn#91178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12070:2015, offset: 0x02054c9c, size: 15 bytes, params: 1, frame: 9
return env1_12();
}
@@ -0,0 +1,790 @@
/* Metro module 11857; source: modules/chat_input/native/ChatInputCommandOptionParser.tsx; dependencies: [4502, 6540, 1938, 3784, 661, 1881, 11858, 3801, 11647, 697, 4805, 2] */
function _fun90896(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12043:6, offset: 0x0204b46e, size: 457 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_90899 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const emojiStore = importDefault(6540) /* metro dependency 6540: EmojiStore */;
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).Permissions;
const env0_8 = (require(1881) /* metro dependency 1881: EmojiConstants */).EmojiIntention;
const regexp = RegExp('[\\t-\\r \\xA0\\u1680\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000\\uFEFF]((?:[\\x2D0-9A-Z_a-z\\xAA\\xB2\\xB3\\xB5\\xB9\\xBA\\xBC-\\xBE\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u064A\\u0660-\\u0669\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07C0-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u0870-\\u0887\\u0889-\\u088E\\u08A0-\\u08C9\\u0900-\\u0950\\u0955-\\u0963\\u0966-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09E6-\\u09F1\\u09F4-\\u09F9\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A6F\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AE6-\\u0AEF\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B66-\\u0B6F\\u0B71-\\u0B77\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0BE6-\\u0BF2\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C5D\\u0C60\\u0C61\\u0C66-\\u0C6F\\u0C78-\\u0C7E\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDD\\u0CDE\\u0CE0\\u0CE1\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D04-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D58-\\u0D61\\u0D66-\\u0D78\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DE6-\\u0DEF\\u0E01-\\u0E3A\\u0E40-\\u0E5B\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F20-\\u0F33\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F-\\u1049\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u1090-\\u1099\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1369-\\u137C\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u1711\\u171F-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u17E0-\\u17E9\\u17F0-\\u17F9\\u1810-\\u1819\\u1820-\\u1878\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19DA\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4C\\u1B50-\\u1B59\\u1B83-\\u1BA0\\u1BAE-\\u1BE5\\u1C00-\\u1C23\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1C80-\\u1C8A\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5\\u1CF6\\u1CFA\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2070\\u2071\\u2074-\\u2079\\u207F-\\u2089\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2150-\\u2189\\u2460-\\u249B\\u24EA-\\u24FF\\u2776-\\u2793\\u2C00-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2CFD\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u3192-\\u3195\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3220-\\u3229\\u3248-\\u324F\\u3251-\\u325F\\u3280-\\u3289\\u32B1-\\u32BF\\u3400-\\u4DBF\\u4E00-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7CD\\uA7D0\\uA7D1\\uA7D3\\uA7D5-\\uA7DC\\uA7F2-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA830-\\uA835\\uA840-\\uA873\\uA882-\\uA8B3\\uA8D0-\\uA8D9\\uA8E0-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF-\\uA9D9\\uA9E0-\\uA9E4\\uA9E6-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\Line truncated
'g');
const env0_10 = RegExp(':((?:[\\0-\\x08\\x0E-\\x1F!-9;-\\x9F\\xA1-\\u167F\\u1681-\\u1FFF\\u200B-\\u2027\\u202A-\\u202E\\u2030-\\u205E\\u2060-\\u2FFF\\u3001-\\uD7FF\\uE000-\\uFEFE\\uFF00-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])+?(?:::skin-tone-[0-9])?):',
'g');
const env0_11 = RegExp('@((?:(?:[\\0-\\x08\\x0E-\\x1F!-\\x9F\\xA1-\\u167F\\u1681-\\u1FFF\\u200B-\\u2027\\u202A-\\u202E\\u2030-\\u205E\\u2060-\\u2FFF\\u3001-\\uD7FF\\uE000-\\uFEFE\\uFF00-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])(?:[\\0-"\\$-9;-\\?A-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])+)#([0-9]{4}))',
'g');
const env0_12 = RegExp('@([\\.0-9_a-z]{2,32})', 'g');
const env0_13 = RegExp('@(((?:[\\0-"\\$-9;-\\?A-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]){1,100}))(?![0-9A-Z_a-z]*#)',
'g');
const env0_14 = RegExp('#(((?:[\\0-\\x08\\x0E-\\x1F!"\\$-9;-\\?A-\\x9F\\xA1-\\u167F\\u1681-\\u1FFF\\u200B-\\u2027\\u202A-\\u202E\\u2030-\\u205E\\u2060-\\u2FFF\\u3001-\\uD7FF\\uE000-\\uFEFE\\uFF00-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])+))',
'g');
const env0_15 = RegExp('^@(silent(?![^\\s]))', '');
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/ChatInputCommandOptionParser.tsx');
exports.commandOptionRegex = regexp;
exports.getMatchedOptionsWithValue = getMatchedOptionsWithValue;
exports.getMatchedOptions = getMatchedOptions;
exports.getTextBeforeFirstOption = getTextBeforeFirstOption;
exports.getEmojiHighlightNodes = getEmojiHighlightNodes;
exports.getUsernameHighlightNodes = getUsernameHighlightNodes;
exports.getRoleHighlightNodes = getRoleHighlightNodes;
exports.getSilentHighlightNodes = getSilentHighlightNodes;
exports.getChannelHighlightNodes = getChannelHighlightNodes;
}
function _createForOfIteratorHelperLoose_90897(a0, a1) { // fn#90897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12043:194, offset: 0x0204b637, 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)) {
if (r1) {
}
return _fun90898;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_90899(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') {
value = _arrayLikeToArray_90899(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_90899(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun90898;
}
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 getMatchedOptionsWithValue(a0, a1) { // fn#90900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12043:12045, offset: 0x0204b7ab, size: 633 bytes, params: 3, frame: 39
var r6;
var r7;
var r18;
var r19;
var r21;
var r22;
var r17;
var r3;
var length;
var property;
var substring;
var value8;
var value9;
var displayName;
var value10;
var push;
var object3;
var location;
var index;
var data;
var option;
var name;
var object5;
var ChatInputParseResultDataType;
var COMMAND_OPTION;
var value11;
var value12;
var object6;
const env0_0 = a0;
const value = null;
const value2 = undefined;
const options = value == a1 || value == a1.activeCommand ? value2 : a1.activeCommand.options;
if (value == (value == a1 ? value2 : a1.activeCommand)) {
return [];
}
if (value == options) {
return [];
}
const env0_1 = a1.preferredOptionValues;
const closure = optionValueLength;
let binding = env0_9;
const value4 = 0;
binding.lastIndex = value4;
const items2 = [];
const Set = global.Set;
const set = new Set();
const value7 = binding.exec(a0);
if (value != value7) {
r6 = value;
r7 = value7;
while (true) {
length = r7[value4].length;
if (length > 1) {
property = r7[value4];
substring = property.substring;
length = r7[value4].length;
value8 = Reflect.apply(substring, property, [1, length - 1]);
length = options.length;
if (!(value4 < length)) {
r17 = r6;
break;
}
r18 = value4;
r19 = r6;
while (true) {
value9 = set.has(r18);
if (value9) {
r21 = value9;
} else {
value10 = options[r18].displayName !== value8;
r21 = value10;
}
if (r21) {
r22 = r19;
continue;
}
if (value == r19) {
continue;
}
push = items2.push;
object3 = {};
location = r19.location;
object3.location = location;
location = r19.location;
index = r7.index;
data = r19.data;
option = data.option;
name = option.name;
data = r19.data;
option = data.option;
displayName = option.displayName;
object3.length = closure(location, index, name, displayName);
data = r19.data;
object3.data = data;
Reflect.apply(push, items2, [object3]);
object5 = {};
index = r7.index;
object5.location = index + 1;
object5.length = r7[value4].length - 1;
ChatInputParseResultDataType = (require(11858) /* metro dependency 11858: ChatInputParser */).ChatInputParseResultDataType;
COMMAND_OPTION = ChatInputParseResultDataType.COMMAND_OPTION;
object5.data = {type: COMMAND_OPTION, option: options[r18]};
set.add(r18);
r22 = object5;
value11 = typeof r18 === 'bigint' ? r18 + 1n : +r18 + 1;
length = options.length;
if (value11 < length) {
r18 = value11;
r19 = r22;
continue;
}
r17 = r22;
break;
}
} else {
r17 = r6;
}
binding = env0_9;
index = r7.index;
binding.lastIndex = index + 1;
value12 = binding.exec(a0);
if (value != value12) {
r6 = r17;
r7 = value12;
continue;
}
r3 = r17;
break;
}
} else {
r3 = value;
}
if (value != r3) {
push = items2.push;
object6 = {};
location = r3.location;
object6.location = location;
location = r3.location;
length = a0.length;
data = r3.data;
option = data.option;
name = option.name;
data = r3.data;
option = data.option;
object6.length = closure(location, length, name, option.displayName);
data = r3.data;
object6.data = data;
Reflect.apply(push, items2, [object6]);
}
return items2;
}
function getMatchedOptions(a0, a1) { // fn#90902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12043:13041, offset: 0x0204bab7, size: 414 bytes, params: 3, frame: 30
var r3;
var r14;
var r16;
var length;
var property;
var substring;
var value7;
var value8;
var displayName;
var value9;
var push;
var object2;
var index;
var ChatInputParseResultDataType;
var COMMAND_OPTION;
var value10;
var value11;
const value = undefined;
const options = a1 == null || a1.activeCommand == null ? value : a1.activeCommand.options;
if ((a1 == null ? value : a1.activeCommand) == null) {
return [];
}
if (options == null) {
return [];
}
let binding = env0_9;
const value3 = 0;
binding.lastIndex = value3;
const items2 = [];
const Set = global.Set;
const set = new Set();
const value6 = binding.exec(a0);
if (value6 != null) {
r3 = value6;
while (true) {
length = r3[value3].length;
if (length > 1) {
property = r3[value3];
substring = property.substring;
length = r3[value3].length;
value7 = Reflect.apply(substring, property, [1, length - 1]);
length = options.length;
if (!(value3 < length)) {
break;
}
r14 = value3;
while (true) {
value8 = set.has(r14);
if (value8) {
r16 = value8;
} else {
displayName = options[r14].displayName;
value9 = displayName !== value7;
r16 = value9;
}
if (r16) {
continue;
}
push = items2.push;
object2 = {};
index = r3.index;
object2.location = index + 1;
object2.length = r3[value3].length - 1;
ChatInputParseResultDataType = (require(11858) /* metro dependency 11858: ChatInputParser */).ChatInputParseResultDataType;
COMMAND_OPTION = ChatInputParseResultDataType.COMMAND_OPTION;
object2.data = {type: COMMAND_OPTION, option: options[r14]};
Reflect.apply(push, items2, [object2]);
set.add(r14);
value10 = typeof r14 === 'bigint' ? r14 + 1n : +r14 + 1;
length = options.length;
if (value10 < length) {
r14 = value10;
continue;
}
break;
}
}
binding = env0_9;
index = r3.index;
binding.lastIndex = index + 1;
value11 = binding.exec(a0);
if (value11 != null) {
r3 = value11;
continue;
}
break;
}
}
return items2;
}
function getTextBeforeFirstOption(a0) { // fn#90903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12043:13538, offset: 0x0204bc55, size: 85 bytes, params: 2, frame: 16
const value = a0;
const binding = env0_9;
binding.lastIndex = 0;
const value3 = binding.exec(value);
return {match: value3, text: value3 == null ? value : value.slice(0, env0_9.lastIndex - value3[0].length)};
}
function getEmojiHighlightNodes(a0, a1) { // fn#90904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12043:13665, offset: 0x0204bcaa, size: 268 bytes, params: 3, frame: 24
var r1;
var r2;
var r15;
var getDisambiguatedEmojiContext;
var getGuildId;
var value4;
var property;
var value5;
var byId;
var byName;
var defaultImport;
var getEmojiUnavailableReason;
var object2;
var CHAT;
var push;
var index;
var value8;
let length = a1.length;
if (length === 0) {
return [];
}
const items2 = [];
let binding = env0_10;
const value2 = binding.exec(a1);
const value3 = null;
if (value3 != value2) {
r1 = value3;
r2 = value2;
while (true) {
if (value3 == r1) {
getDisambiguatedEmojiContext = EmojiStore.getDisambiguatedEmojiContext;
getGuildId = a0.getGuildId;
value4 = Reflect.apply(getDisambiguatedEmojiContext, EmojiStore, [Reflect.apply(getGuildId, a0, [])]);
r1 = value4;
}
property = r2[1];
value5 = property.trim();
byId = r1.getById(value5);
if (value3 != byId) {
r15 = byId;
continue;
}
byName = r1.getByName(value5);
r15 = byName;
if (value3 == r15) {
continue;
}
defaultImport = importDefault(3801) /* metro dependency 3801: EmojiUtils */;
getEmojiUnavailableReason = defaultImport.getEmojiUnavailableReason;
object2 = {emoji: r15, channel: a0};
CHAT = EmojiIntention.CHAT;
object2.intention = CHAT;
if (value3 !== Reflect.apply(getEmojiUnavailableReason, defaultImport, [object2])) {
continue;
}
push = items2.push;
index = r2.index;
length = r2[0].length;
Reflect.apply(push, items2, [{location: index, length: length}]);
binding = env0_10;
value8 = binding.exec(a1);
if (value3 != value8) {
r2 = value8;
continue;
}
break;
}
}
return items2;
}
function getUsernameHighlightNodes(a0, a1) { // fn#90905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12043:14073, offset: 0x0204bdb6, size: 103 bytes, params: 3, frame: 17
let env0_0 = a1;
let closure = function(a0, a1) {
var value3;
var env0_0 = a1;
var closure = _fun90907;
var value2 = a0.exec(require);
var env0_1 = value2;
if (value2 != null) {
while (true) {
closure();
value3 = a0.exec(require);
env0_1 = value3;
if (value3 == null) {
break;
}
}
}
};
const env0_2 = (require(11647) /* metro dependency 11647: ApplicationCommandOptionValueParser */).getUsers(a0);
closure(env0_11, function(a0) {
return a0;
});
closure(env0_12, function(a0) {
return a0.split('#')[0];
});
return [];
}
function getRoleHighlightNodes(a0, a1) { // fn#90911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12043:14422, offset: 0x0204bf18, size: 204 bytes, params: 3, frame: 20
var r2;
var guildId;
var object2;
var value4;
var value5;
var done;
var value6;
var name;
var value7;
var closure;
var binding;
var exec;
var value8;
var value9;
const can = PermissionStore.can;
const MENTION_EVERYONE = Permissions.MENTION_EVERYONE;
if (Reflect.apply(can, PermissionStore, [MENTION_EVERYONE, a0])) {
guildId = a0.getGuildId();
object2 = {};
value4 = _createForOfIteratorHelperLoose_90897(guildId != null ? GuildRoleStore.getSortedRoles(guildId) : []);
value5 = value4();
done = value5.done;
if (!done) {
r2 = value5;
reducibleLoop6: while (true) {
value6 = r2.value;
name = value6.name;
object2[name] = value6;
value7 = value4();
done = value7.done;
if (done) {
break reducibleLoop6;
}
r2 = value7;
continue reducibleLoop6;
}
}
closure = getRoleHighlightNodes_loop2;
binding = env0_13;
value8 = binding.exec(a1);
var env0_1;
if (value8 != null) {
reducibleLoop8: while (true) {
closure();
binding = env0_13;
exec = binding.exec;
value9 = Reflect.apply(exec, binding, [a1]);
env0_1 = value9;
if (value9 != null) {
continue reducibleLoop8;
}
break reducibleLoop8;
}
}
}
return [];
}
function getSilentHighlightNodes(a0) { // fn#90915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12043:15380, offset: 0x0204c255, size: 69 bytes, params: 2, frame: 13
const items2 = [];
const value = env0_15.exec(a0);
if (value != null) {
items2.push({location: value.index, length: value[0].length});
}
return items2;
}
function getChannelHighlightNodes(a0, a1) { // fn#90916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12043:15530, offset: 0x0204c29a, size: 89 bytes, params: 3, frame: 14
const env0_0 = a1;
const env0_2 = (require(11647) /* metro dependency 11647: ApplicationCommandOptionValueParser */).getChannels(a0);
const closure = _loop3;
if (!closure()) {
while (true) {
if (closure()) {
break;
}
}
}
return [];
}
function optionValueLength(a0, a1, a2, a3) { // fn#90901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12043:12221, owner: getMatchedOptionsWithValue.optionValueLength, offset: 0x0204ba24, size: 147 bytes, params: 5, frame: 18
var r0;
var binding;
var length;
var value;
const r1 = preferredOptionValues?.[a2];
const value3 = a1 - a0;
let r3 = r1 != null && r1.displayText !== '';
if (r3) {
binding = env0_0;
value = binding.substring(a0 + a3.length + 1, a1);
value = value.startsWith(r1.displayText);
r3 = value;
}
if (r3) {
length = a3.length;
value = length + 1;
length = r1.displayText.length;
value += length;
r0 = value;
} else {
r0 = value3;
}
return r0;
}
function processRegex(a0, a1) { // fn#90906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12043:14145, owner: getUsernameHighlightNodes.processRegex, offset: 0x0204be1d, size: 78 bytes, params: 3, frame: 16
var value3;
const env0_0 = a1;
const closure = processRegex_loop;
const value2 = a0.exec(require);
var env0_1;
if (value2 != null) {
while (true) {
closure();
value3 = a0.exec(require);
env0_1 = value3;
if (value3 == null) {
break;
}
}
}
}
function getRoleHighlightNodes_loop2() { // fn#90912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12043:14637, owner: getRoleHighlightNodes._loop2, offset: 0x0204bfe4, size: 563 bytes, params: 1, frame: 23
var environment;
var binding;
var push;
var object4;
var object5;
const ChatInputParseResultDataType = (require(11858) /* metro dependency 11858: ChatInputParser */).ChatInputParseResultDataType;
var object6;
let property = env0_1[1];
if (property[0] === ' ') {
return 1;
}
const value2 = property.trimEnd();
const value3 = '';
const env0_0 = value3;
const value6 = value2.split(RegExp('\\s', '')).map(_fun90913).reverse();
const value7 = value6.find(_fun90914);
const value8 = null;
const r4 = value8 != value7 ? value7 : value3;
property = value6[value6.length - 1];
const property2 = env0_2[r4];
if (value8 != property2) {
binding = env0_0;
push = binding.push;
value = environment.__proto__;
Reflect.apply(push, binding, [{location: env0_1.index, length: r4.length + 1,
data: {type: ChatInputParseResultDataType.ROLE_HIGHLIGHT,
color: AccessibilityStore.roleStyle !== 'username' ? value8 : property2.colorString}}]);
} else if (property.startsWith('everyone')) {
binding = env0_0;
push = binding.push;
object4 = {};
object4.location = env0_1.index;
object4.length = 9;
object6 = {};
value = environment.__proto__;
object6.type = ChatInputParseResultDataType.ROLE_HIGHLIGHT;
object6.color = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_500;
object4.data = object6;
Reflect.apply(push, binding, [object4]);
} else if (property.startsWith('here')) {
binding = env0_0;
push = binding.push;
object4 = {};
object4.location = env0_1.index;
object4.length = 5;
object5 = {};
value = environment.__proto__;
object5.type = ChatInputParseResultDataType.ROLE_HIGHLIGHT;
object5.color = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_500;
object4.data = object5;
Reflect.apply(push, binding, [object4]);
}
}
function _loop3() { // fn#90917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12043:15619, owner: getChannelHighlightNodes._loop3, offset: 0x0204c2f3, size: 462 bytes, params: 1, frame: 19
var environment;
var value3;
var binding;
var value4;
var property;
var trim;
var find;
var push;
var index;
var length;
var value5;
var binding2;
var binding3;
var value6;
var value7;
var moduleValue;
var binding5;
const value2 = require.indexOf('#', env0_3);
env0_3 = value2;
if (value2 < 0) {
return 1;
}
if (require[env0_3 + 1] === '"') {
binding = env0_3;
value5 = binding + 2;
env0_3 = value5;
length = require.length;
if (value5 < length) {
reducibleLoop6: while (true) {
if (require[env0_3] !== '\\') {
reducibleJoin9: while (true) {
if (require[env0_3] === '"') {
break reducibleLoop6;
}
break reducibleJoin9;
}
} else {
binding2 = env0_3;
env0_3 = typeof binding2 === 'bigint' ? binding2 + 1n : +binding2 + 1;
}
binding3 = env0_3;
value6 = typeof binding3 === 'bigint' ? binding3 + 1n : +binding3 + 1;
env0_3 = value6;
length = require.length;
if (value6 < length) {
continue reducibleLoop6;
}
break reducibleLoop6;
}
}
value7 = environment.__proto__;
moduleValue = require(4805) /* metro dependency 4805: useChannelName */;
var env0_0 = moduleValue.unescapeChannelName(require.substring(binding + 2, env0_3));
if (env0_2.find(_fun90918) != null) {
binding5 = env0_1;
binding5.push({location: binding, length: env0_3 - binding + 1});
} else {
env0_3 = binding + 1;
}
} else {
value3 = environment.__proto__;
binding = env1_14;
binding.lastIndex = env0_3;
value4 = binding.exec(require);
reducibleJoin13: while (true) {
if (value4 == null) {
break reducibleJoin13;
}
property = value4[1];
trim = property.trim;
var env0_1 = Reflect.apply(trim, property, []);
binding = env0_2;
find = binding.find;
if (Reflect.apply(find, binding, [_fun90919]) == null) {
break reducibleJoin13;
}
binding = env0_1;
push = binding.push;
index = value4.index;
length = value4[0].length;
Reflect.apply(push, binding, [{location: index, length: length}]);
break reducibleJoin13;
}
}
binding = env0_3;
env0_3 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
}
function processRegex_loop() { // fn#90907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12043:14188, owner: getUsernameHighlightNodes.processRegex._loop, offset: 0x0204be6b, size: 113 bytes, params: 1, frame: 13
const env0_0 = env0_1[1].trim();
if (env1_2.find(_fun90908) != null) {
env1_1.push({location: env0_1.index, length: env0_1[0].length});
}
}
function _fun90913(a0) { // fn#90913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12043:14728, offset: 0x0204c217, size: 40 bytes, params: 2, frame: 11
return (env0_0 + (a0 + ' ')).trim();
}
function _fun90914(a0) { // fn#90914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12043:14780, offset: 0x0204c23f, size: 22 bytes, params: 2, frame: 2
return env1_2[a0] != null;
}
function _fun90918({text}) { // fn#90918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12043:15825, offset: 0x0204c4c1, size: 21 bytes, params: 2, frame: 2
return text === env0_0;
}
function _fun90919({text}) { // fn#90919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12043:15964, offset: 0x0204c4d6, size: 21 bytes, params: 2, frame: 2
return text === env0_1;
}
function _fun90908({text}) { // fn#90908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12043:14231, offset: 0x0204bedc, size: 35 bytes, params: 2, frame: 11
const value = environment.__proto__;
return require(text) === env0_0;
}
@@ -0,0 +1,53 @@
/* Metro module 11529; source: modules/chat_input/native/ChatInputConstants.tsx; dependencies: [1305, 2] */
function _fun88305(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11715:6, offset: 0x01fded33, size: 595 bytes, params: 8, frame: 26
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const object = {PHOTOS: 0};
object[0] = 'PHOTOS';
object.APPS = 1;
object[1] = 'APPS';
object.THREAD = 2;
object[2] = 'THREAD';
object.NITRO_GIFT = 3;
object[3] = 'NITRO_GIFT';
object.ALL_PHOTOS = 4;
object[4] = 'ALL_PHOTOS';
const object3 = {};
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
object3.easing = STANDARD_EASING;
object3.duration = 250;
const object8 = {};
object8.easing = STANDARD_EASING;
object8.duration = 50;
const object9 = {};
object9.easing = STANDARD_EASING;
object9.duration = 100;
const object10 = {};
object10.easing = STANDARD_EASING;
object10.duration = 200;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/ChatInputConstants.tsx');
exports.TextAreaCta = {CHANNEL_LIST: 'channel_list', CHANNEL_LINK: 'channel_link', BACK_TO_HOME: 'back_to_home',
VERIFY_PHONE: 'verify_phone', VERIFY_EMAIL: 'verify_email', JOIN_GUILD: 'join_guild',
FOLLOW_ANNOUNCEMENT: 'follow_announcement', BACK_TO_DISCOVERY: 'back_to_discovery',
MEMBER_VERIFICATION: 'member_verification', MEMBER_VERIFICATION_CONFIRMED: 'member_verification_confirmed',
MEMBER_VERIFICATION_REJECTED: 'member_verification_rejected', UNBLOCK: 'unblock'};
exports.ChatInputActionType = object;
exports.ChatInputOmniButtonActionType = {OPENED: 'opened', CLOSED: 'dismissed'};
exports.CHAT_INPUT_ACTION_BUTTON_SIZE = 40;
exports.CHAT_INPUT_ACTION_BUTTON_MARGIN = 4;
exports.CHAT_INPUT_ACTION_BUTTON_WIDTH = 48;
exports.CHAT_INPUT_PILL_PADDING = 2;
exports.CHAT_INPUT_PILL_CONTENT_SIZE = 36;
exports.CHAT_INPUT_MORE_BUTTON_WIDTH = 36;
exports.CHAT_INPUT_HORIZONTAL_PADDING = 12;
exports.CHAT_INPUT_HORIZONTAL_PADDING_PARENT = 4;
exports.CHAT_INPUT_HEIGHT = 54;
exports.CHAT_INPUT_TIMING_CONFIG = object3;
exports.CHAT_INPUT_FLOATING_COLLAPSED_SCALE = 0.5;
exports.CHAT_INPUT_FLOATING_EXIT_TIMING_CONFIG = object8;
exports.CHAT_INPUT_FLOATING_SLIDE_TIMING_CONFIG = object9;
exports.CHAT_INPUT_FLOATING_ENTER_OPACITY_TIMING_CONFIG = object10;
exports.CHAT_INPUT_FLOATING_BOUNCE_SPRING_CONFIG = {'mass': 0.5, 'damping': 13, 'stiffness': 400};
exports.CHAT_INPUT_FLOATING_BOUNCE_ENTER_DELAY_MS = 50;
}
@@ -0,0 +1,555 @@
/* Metro module 11002; source: modules/chat_input/native/ChatInputContextBar.tsx; dependencies: [31, 27, 4502, 1878, 661, 33, 1305, 4501, 697, 1357, 4573, 1244, 5278, 8523, 566, 3874, 4635, 8699, 8206, 4020, 11003, 3963, 4017, 4504, 11004, 683, 11005, 1230, 4634, 11206, 2] */
function _fun84199(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:6, offset: 0x01f3e60d, size: 458 bytes, params: 8, frame: 21
var object2;
const env0_0 = require;
const closure = ChatInputReplyBar;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.StyleSheet;
const env0_5 = value2.View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_8 = constantsModule.AnalyticEvents;
const env0_9 = constantsModule.Routes;
const value4 = require(33) /* metro dependency 33 */;
const env0_10 = value4.jsx;
const env0_11 = value4.jsxs;
const env0_12 = value4.Fragment;
object2 = {duration: 250};
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
object2.easing = STANDARD_EASING;
const env0_14 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function(a0) {
return {contextBar: {backgroundColor: a0 ?? importDefault(dependencyMap[8]).colors.MOBILE_FLOATING_ACCESSORY_BACKGROUND}};
});
const env0_15 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun84208);
object2 = {code: 'function ChatInputContextBarTsx1(){const{stylesBackgroundColor,chatInputFloating,heightSv}=this.__closure;return{backgroundColor:stylesBackgroundColor,...(chatInputFloating?{maxHeight:heightSv.get()}:{height:heightSv.get()})};}'};
object2 = {code: 'function ChatInputContextBarTsx2(finished){const{runOnJS,handleTransitionFinished}=this.__closure;if(finished){runOnJS(handleTransitionFinished)();}}'};
const env0_18 = value.forwardRef(_fun84209);
value = value.memo(ChatInputContextBar);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/ChatInputContextBar.tsx');
exports.default = value;
exports.ChatInputReplyBar = closure;
}
function ChatInputReplyBarNoAuthor({onCancelReplying}) { // fn#84200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:1989, offset: 0x01f3e7d7, size: 788 bytes, params: 2, frame: 30
var r0;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items3;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items2;
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
const useMobileVisualRefreshConfig = mobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const object2 = {location: 'ChatInputContextBar'};
const chatInputFloating = Reflect.apply(useMobileVisualRefreshConfig, mobileVisualRefreshExperimentModule,
[object2]).chatInputFloating;
const styles = useStyles();
if (chatInputFloating) {
var viewBindingProps = {style: styles.contextBarRow};
string = intl.string;
items2 = [<Text lineClamp={1} variant="text-sm/normal" color="text-strong" style={styles.floatingReplyTextWrapper}>{Reflect.apply(string,
intl, [t['5IEsGx']])}</Text>];
string = intl.string;
items2[1] = <View style={styles.floatingRightActions}><PressableOpacity activeOpacity={0.5} accessibilityRole="button" accessibilityLabel={Reflect.apply(string,
intl,
[t.jSnJGT])} onPress={onCancelReplying}>{((Icon) => <Icon source={importDefault(8523) /* metro dependency 8523 */} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.CUSTOM} style={styles.floatingCloseIcon} />)((require(1305) /* metro dependency 1305: native */).Icon)}</PressableOpacity></View>;
r0 = <View {...viewBindingProps}>{items2}</View>;
} else {
var pressableOpacityProps = {'activeOpacity': 0.5, 'accessibilityRole': 'button',
accessibilityLabel: intl.string(t.jSnJGT), onPress: onCancelReplying, style: styles.contextBarRow};
items3 = [<View style={styles.contextCancelIconWrapper}>{((Icon) => <Icon source={importDefault(8523) /* metro dependency 8523 */} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL_20} />)((require(1305) /* metro dependency 1305: native */).Icon)}</View>];
items3[1] = <Text lineClamp={1} variant="text-sm/medium" color="text-default" style={styles.contextButtonText}>{intl.string(t['5IEsGx'])}</Text>;
r0 = <PressableOpacity {...pressableOpacityProps}>{items3}</PressableOpacity>;
}
return r0;
}
function ChatInputReplyBar({pendingReply, pendingReplyAuthor, onTapContextBarReply, onCancelReplying, onToggleReplyMention, chatInputFloatingOverride}) { // fn#84201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:3094, offset: 0x01f3eaeb, size: 1870 bytes, params: 2, frame: 34
var object5;
var r10;
var r17;
var r5;
var r16;
var r14;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var string;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var object2;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
var Sizes;
var items2;
var object4;
var items4;
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
const useMobileVisualRefreshConfig = mobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const r6 = Reflect.apply(useMobileVisualRefreshConfig, mobileVisualRefreshExperimentModule,
[{location: 'ChatInputContextBar'}]).chatInputFloating || chatInputFloatingOverride;
const styles = useStyles();
const roleStyle = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.roleStyle;
});
const useA11yRolesNativeModule = require(3874) /* metro dependency 3874: useA11yRolesNative */;
const useCheckboxA11yNative = useA11yRolesNativeModule.useCheckboxA11yNative;
object5 = {};
let shouldMention = pendingReply.shouldMention;
object5.checked = shouldMention;
const {accessibilityRole, accessibilityState} = Reflect.apply(useCheckboxA11yNative, useA11yRolesNativeModule,
[object5]);
const colorString = pendingReplyAuthor.colorString;
const colorStrings = pendingReplyAuthor.colorStrings;
const env0_3 = colorStrings;
const nick = pendingReplyAuthor.nick;
const guildId = pendingReplyAuthor.guildId;
const env0_6 = env0_3.useMemo(function() {
var roleStyleBinding = roleStyle;
var value2 = undefined;
return roleStyleBinding === 'hidden' ? value2 : colorString != null ? [{color: colorString}] : value2;
}, [colorString, roleStyle]);
const env0_7 = (require(8699) /* metro dependency 8699: useDisplayNameStylesFont */).useDisplayNameStylesFont({displayNameStyles: (importDefault(4635) /* metro dependency 4635: useDisplayNameStyles */)({userId: pendingReply.message.author.id,
guildId: guildId})});
const env0_9 = (require(8206) /* metro dependency 8206: EnhancedRoleColorUtils */).useIsRoleStyleAndRoleColorsEligibleForERC(guildId,
pendingReply.message.author.id, roleStyle,
(require(8206) /* metro dependency 8206: EnhancedRoleColorUtils */).useProcessColorStringsArray(colorStrings));
const closure = function(a0) {
var env0_0 = 'text-sm/semibold';
return require(dependencyMap[11]).intl.format(require(dependencyMap[11]).t['8E4GxS'], {userHook: _fun84205});
};
if (onTapContextBarReply == null) {
object5 = {lineClamp: 1};
r10 = r6 ? 'text-sm/normal' : 'text-sm/medium';
object5.variant = r10;
r10 = r6 ? 'text-strong' : 'text-default';
object5.color = r10;
r5 = <Text {...object5}>{closure('text-sm/semibold')}</Text>;
} else {
var pressableOpacityProps2 = {style: r6 ? styles.floatingReplyTextWrapper : styles.contextButtonText,
accessibilityRole: 'link', accessibilityLabel: intl.formatToPlainString(t.EpJL4E, {username: nick}),
accessibilityHint: intl.string(t['0CfCVW']), activeOpacity: 0.5, onPress: onTapContextBarReply};
object2 = {lineClamp: 1};
r17 = r6 ? 'text-sm/normal' : 'text-sm/medium';
object2.variant = r17;
r17 = r6 ? 'text-strong' : 'text-default';
object2.color = r17;
r5 = <PressableOpacity {...pressableOpacityProps2}><Text {...object2}>{closure('text-sm/semibold')}</Text></PressableOpacity>;
}
if (onCancelReplying != null) {
var pressableOpacityProps = {'accessibilityRole': 'button', 'accessibilityLabel': null, 'activeOpacity': 0.5,
accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jSnJGT),
style: r6 ? undefined : styles.contextCancelIconWrapper, onPress: onCancelReplying};
var iconProps = {source: importDefault(8523) /* metro dependency 8523 */};
Sizes = (require(1305) /* metro dependency 1305: native */).Icon.Sizes;
iconProps.size = r6 ? Sizes.CUSTOM : Sizes.SMALL_20;
iconProps.style = r6 ? styles.floatingCloseIcon : undefined;
r10 = <PressableOpacity {...pressableOpacityProps}><Icon {...iconProps} /></PressableOpacity>;
} else {
r10 = null;
}
if (pendingReply != null) {
if (pendingReply.showMentionToggle) {
var pressableOpacityProps = {accessibilityRole: accessibilityRole, accessibilityState: accessibilityState,
accessibilityLabel: intl.string(t.P8tvKG)};
shouldMention = pendingReply.shouldMention;
string = intl.string;
pressableOpacityProps.accessibilityHint = shouldMention ? Reflect.apply(string, intl,
[t.PBgTSF]) : Reflect.apply(string, intl, [t['+LXBxU']]);
pressableOpacityProps.activeOpacity = 0.5;
pressableOpacityProps.onPress = onToggleReplyMention;
pressableOpacityProps.style = r6 ? styles.floatingMentionGroup : styles.replyMentionButton;
var iconProps = {source: importDefault(11003) /* metro dependency 11003 */,
size: (require(1305) /* metro dependency 1305: native */).Icon.Sizes.CUSTOM};
shouldMention = pendingReply.shouldMention;
r16 = shouldMention && styles.replyMentionIconActive;
iconProps.style = [styles.replyMentionIcon, r16];
items2 = [<Icon {...iconProps} />];
object4 = {};
r16 = r6 ? 'text-sm/semibold' : 'text-sm/bold';
object4.variant = r16;
object4.color = 'text-muted';
shouldMention = pendingReply.shouldMention;
object4.style = shouldMention ? styles.replyMentionButtonActive : undefined;
shouldMention = pendingReply.shouldMention;
string = intl.string;
r16 = shouldMention ? Reflect.apply(string, intl, [t.p9jC2r]) : Reflect.apply(string, intl, [t.U7f3bK]);
items2[1] = <Text {...object4}>{r16}</Text>;
r14 = <PressableOpacity {...pressableOpacityProps}>{items2}</PressableOpacity>;
} else {
r14 = null;
}
} else {
r14 = null;
}
const items3 = [!r6 && r10, r5];
if (r6) {
var viewBinding2Props = {style: styles.floatingRightActions};
items4 = [r14];
items4[1] = pendingReply?.showMentionToggle && <View style={styles.floatingDivider} />;
items4[2] = r10;
r5 = <View {...viewBinding2Props}>{items4}</View>;
} else {
r5 = r14;
}
items3[2] = r5;
return (
<View style={styles.contextBarRow}>
{items3}
</View>
);
}
function ChatInputEditBar({onCancelEditing}) { // fn#84206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:6170, offset: 0x01f3f488, size: 583 bytes, params: 2, frame: 24
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
const useMobileVisualRefreshConfig = mobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const chatInputFloating = Reflect.apply(useMobileVisualRefreshConfig, mobileVisualRefreshExperimentModule,
[{location: 'ChatInputContextBar'}]).chatInputFloating;
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const textProps = {lineClamp: 1, variant: chatInputFloating ? 'text-sm/normal' : 'text-sm/medium',
color: chatInputFloating ? 'text-strong' : 'text-default',
style: chatInputFloating ? styles.floatingReplyTextWrapper : styles.contextButtonText};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const text = <Text {...textProps}>{Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t.rtNXxN])}</Text>;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
string = intl.string;
const qv9j1K = (require(1244) /* metro dependency 1244: indexNative */).t.qv9j1K;
const contextCancelIconWrapper = chatInputFloating ? undefined : styles.contextCancelIconWrapper;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const iconProps = {source: importDefault(8523) /* metro dependency 8523 */};
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
iconProps.size = chatInputFloating ? Sizes.CUSTOM : Sizes.SMALL_20;
iconProps.style = chatInputFloating ? styles.floatingCloseIcon : undefined;
const pressableOpacity = <PressableOpacity accessibilityRole="button" accessibilityLabel={Reflect.apply(string,
intl,
[qv9j1K])} activeOpacity={0.5} style={contextCancelIconWrapper} onPress={onCancelEditing}><Icon {...iconProps} /></PressableOpacity>;
const jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
const object = {};
const items2 = [];
if (chatInputFloating) {
items2[0] = text;
items2[1] = <View style={styles.floatingRightActions}>{pressableOpacity}</View>;
object.children = items2;
} else {
items2[0] = pressableOpacity;
items2[1] = text;
object.children = items2;
}
return (
<View style={styles.contextBarRow}>
{((Fragment) => <Fragment {...object} />)(jsxRuntimeEnv0_12Binding)}
</View>
);
}
function _fun84208() { // fn#84208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:436, offset: 0x01f3f70b, size: 586 bytes, params: 1, frame: 18
const object4 = {};
const object6 = {'overflow': 'hidden', 'flexDirection': 'row', 'alignItems': 'center'};
const CHAT_INPUT_CONTEXT_BAR_PADDING_HORIZONTAL = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_CONTEXT_BAR_PADDING_HORIZONTAL;
object6.paddingHorizontal = CHAT_INPUT_CONTEXT_BAR_PADDING_HORIZONTAL;
const CHAT_INPUT_CONTEXT_BAR_PADDING_VERTICAL = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_CONTEXT_BAR_PADDING_VERTICAL;
object6.paddingVertical = CHAT_INPUT_CONTEXT_BAR_PADDING_VERTICAL;
const CHAT_INPUT_CONTEXT_BAR_GAP = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_CONTEXT_BAR_GAP;
object6.gap = CHAT_INPUT_CONTEXT_BAR_GAP;
object4.contextBarRow = object6;
object4.floatingReplyTextWrapper = {'flexShrink': 1, 'minWidth': 0};
object4.contextCancelIconWrapper = {'paddingHorizontal': 12, 'paddingVertical': 10};
object4.contextButtonText = {'flexGrow': 1, 'flexShrink': 1, 'justifyContent': 'center', 'alignSelf': 'stretch',
'paddingRight': 12, 'paddingVertical': 10};
const object8 = {};
object8.borderBottomWidth = StyleSheet.hairlineWidth;
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
object8.borderBottomColor = BORDER_MUTED;
object8.overflow = 'hidden';
object4.floatingContextBar = object8;
object4.replyMentionButton = {'flexDirection': 'row', 'alignItems': 'center', 'paddingHorizontal': 12,
'paddingVertical': 10};
let CONTROL_BRAND_FOREGROUND = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_BRAND_FOREGROUND;
object4.replyMentionButtonActive = {color: CONTROL_BRAND_FOREGROUND};
const object9 = {};
let CHAT_INPUT_REPLY_MENTION_ICON_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_REPLY_MENTION_ICON_SIZE;
object9.width = CHAT_INPUT_REPLY_MENTION_ICON_SIZE;
CHAT_INPUT_REPLY_MENTION_ICON_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_REPLY_MENTION_ICON_SIZE;
object9.height = CHAT_INPUT_REPLY_MENTION_ICON_SIZE;
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object9.tintColor = TEXT_MUTED;
const CHAT_INPUT_REPLY_MENTION_ICON_MARGIN_RIGHT = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_REPLY_MENTION_ICON_MARGIN_RIGHT;
object9.marginRight = CHAT_INPUT_REPLY_MENTION_ICON_MARGIN_RIGHT;
object4.replyMentionIcon = object9;
CONTROL_BRAND_FOREGROUND = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_BRAND_FOREGROUND;
object4.replyMentionIconActive = {tintColor: CONTROL_BRAND_FOREGROUND};
object4.floatingRightActions = {'flexGrow': 1, 'flexShrink': 0, 'flexDirection': 'row', 'alignItems': 'center',
'justifyContent': 'flex-end', 'gap': 8};
object4.floatingMentionGroup = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 2};
const object10 = {};
object10.width = StyleSheet.hairlineWidth;
object10.alignSelf = 'stretch';
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object10.backgroundColor = BORDER_SUBTLE;
object4.floatingDivider = object10;
const INTERACTIVE_ICON_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_ICON_DEFAULT;
object4.floatingCloseIcon = {'width': 16, 'height': 16, tintColor: INTERACTIVE_ICON_DEFAULT};
return object4;
}
function _fun84209({children}, a1) { // fn#84209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:7414, offset: 0x01f3f955, size: 431 bytes, params: 3, frame: 23
const clientThemesUtilsModule = require(3963) /* metro dependency 3963: ClientThemesUtils */;
const useGradientValue = clientThemesUtilsModule.useGradientValue;
const GradientPercentage = clientThemesUtilsModule.GradientPercentage;
const END = GradientPercentage.END;
const value2 = Reflect.apply(useGradientValue, clientThemesUtilsModule, [END]);
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
const useMobileVisualRefreshConfig = mobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const chatInputFloating = Reflect.apply(useMobileVisualRefreshConfig, mobileVisualRefreshExperimentModule,
[{location: 'ChatInputContextBar'}]).chatInputFloating;
let styles = useStyles(value2);
const backgroundColor = styles.contextBar.backgroundColor;
styles = useStyles();
const env0_2 = chatInputFloating ? 60 : 40;
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const env0_3 = value5;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = o_84210;
closure.__closure = {stylesBackgroundColor: backgroundColor, chatInputFloating: chatInputFloating, heightSv: value5};
closure.__workletHash = 3976432455712;
closure.__initData = env0_16;
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const env0_5 = env0_3.useCallback(_fun84211, [env0_3.useRef(null)]);
env0_3.useImperativeHandle(a1, function() {
return {componentDidAppear: _fun84213, componentDidEnter: _fun84214, componentWillLeave: _fun84215};
});
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View style={[value6, chatInputFloating && styles.floatingContextBar]}>
{children}
</View>
);
}
function ChatInputContextBar({channel, chatInputRef, pendingEdit, pendingReply}) { // fn#84217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:8452, offset: 0x01f3fca5, size: 389 bytes, params: 2, frame: 29
const {onCancelEditing, onCancelReplying, onTapContextBarReply, onToggleReplyMention} = env0_3.useMemo(function() {
return {onCancelEditing: _fun84219, onCancelReplying: _fun84220, onTapContextBarReply: _fun84221,
onToggleReplyMention: _fun84222};
}, [channel, chatInputRef, pendingReply]);
const value4 = (require(4634) /* metro dependency 4634: useMessageAuthor */).useNullableMessageAuthor(pendingReply?.message);
const TransitionGroup = (require(11206) /* metro dependency 11206: TransitionGroup */).TransitionGroup;
return (
<TransitionGroup component={View}>
{pendingReply != null && value4 != null && ((Component) => <Component><ChatInputReplyBar pendingReply={pendingReply} pendingReplyAuthor={value4} onTapContextBarReply={onTapContextBarReply} onCancelReplying={onCancelReplying} onToggleReplyMention={onToggleReplyMention} /></Component>)(env0_18)}
{pendingReply != null && value4 == null && ((Component) => <Component><ChatInputReplyBarNoAuthor onCancelReplying={onCancelReplying} /></Component>)(env0_18)}
{pendingEdit != null && ((Component) => <Component><ChatInputEditBar onCancelEditing={onCancelEditing} /></Component>)(env0_18)}
</TransitionGroup>
);
}
function replyText(a0) { // fn#84204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:3877, owner: ChatInputReplyBar.replyText, offset: 0x01f3f27f, size: 91 bytes, params: 2, frame: 16
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return intl.format((require(1244) /* metro dependency 1244: indexNative */).t['8E4GxS'], {userHook: userHook_84205});
}
function o_84210() { // fn#84210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:7708, offset: 0x01f3fb04, size: 64 bytes, params: 1, frame: 14
const object3 = {};
object3.backgroundColor = backgroundColor;
const chatInputFloatingBinding = chatInputFloating;
const object4 = {};
const binding = env0_3;
const value = binding.get();
if (chatInputFloatingBinding) {
object4.maxHeight = value;
} else {
object4.height = value;
}
copyDataProperties(object3, object4, binding);
return object3;
}
function _fun84211() { // fn#84211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:7927, offset: 0x01f3fb44, size: 35 bytes, params: 1, frame: 10
if (env0_4.current != null) {
env0_4.current();
}
}
function _fun84212() { // fn#84212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:8000, offset: 0x01f3fb67, size: 42 bytes, params: 1, frame: 3
return {componentDidAppear: componentDidAppear, componentDidEnter: componentDidEnter,
componentWillLeave: componentWillLeave};
}
function _fun84218() { // fn#84218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:8555, offset: 0x01f3fe2a, size: 54 bytes, params: 1, frame: 3
return {onCancelEditing: function() {
var current = chatInputRef.current;
if (current != null) {
current.handleCancelEditing();
}
}, onCancelReplying: onCancelReplying, onTapContextBarReply: onTapContextBarReply,
onToggleReplyMention: onToggleReplyMention_84222};
}
function replyTextUserHook(a0, a1) { // fn#84205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:3932, owner: ChatInputReplyBar.replyText.userHook, offset: 0x01f3f2da, size: 430 bytes, params: 3, frame: 25
var r0;
var value2;
var value3;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var object;
var moduleValue;
var value6;
var jsxRuntimeEnv2_12Binding;
var value7;
var items2;
const value = environment.__proto__;
if (roleStyle !== 'dot') {
value2 = environment.__proto__.__proto__;
value3 = undefined;
var textProps = {variant: env0_0};
moduleValue = require(4020) /* metro dependency 4020: FabricUtils */;
textProps.experimental_useNativeText = !moduleValue.isFabric();
textProps.style = [env1_6, env1_7 != null && ({fontFamily: env1_7})];
r0 = env1_9 ? env1_8 : value3;
textProps.gradientColors = r0;
r0 = <Text {...textProps} key={'' + a1 + '-' + pendingReply.message.author.id}>{nick}</Text>;
} else if (colorString != null) {
value6 = environment.__proto__.__proto__;
jsxRuntimeEnv2_12Binding = jsxRuntimeEnv2_12;
value7 = undefined;
items2 = [((RoleDot) => <RoleDot color={colorString} colors={colorStrings} guildId={guildId} size="small" />)((require(1305) /* metro dependency 1305: native */).RoleDot)];
items2[1] = <Text variant={env0_0} style={env1_7 != null ? {fontFamily: env1_7} : value7} key={a1}>{nick}</Text>;
r0 = <>{items2}</>;
} else {
value2 = environment.__proto__.__proto__;
value3 = undefined;
var textProps = {variant: env0_0};
moduleValue = require(4020) /* metro dependency 4020: FabricUtils */;
textProps.experimental_useNativeText = !moduleValue.isFabric();
textProps.style = [env1_6, env1_7 != null && ({fontFamily: env1_7})];
r0 = env1_9 ? env1_8 : value3;
textProps.gradientColors = r0;
r0 = <Text {...textProps} key={'' + a1 + '-' + pendingReply.message.author.id}>{nick}</Text>;
}
return r0;
}
function componentDidAppear() { // fn#84213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:8006, offset: 0x01f3fb91, size: 63 bytes, params: 1, frame: 16
const binding = env1_3;
const set = binding.set;
const timingModule = require(4504) /* metro dependency 4504: timing */;
Reflect.apply(set, binding, [timingModule.withTiming(env1_2, env2_13)]);
}
function componentWillLeave(a0) { // fn#84215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:8113, offset: 0x01f3fbd0, size: 157 bytes, params: 2, frame: 24
env1_4.current = a0;
const binding = env1_3;
const set = binding.set;
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
const binding2 = env2_13;
const closure = componentWillLeaveN;
const object2 = {};
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.handleTransitionFinished = env1_5;
closure.__closure = object2;
closure.__workletHash = 10908592279914;
closure.__initData = env2_17;
Reflect.apply(set, binding, [Reflect.apply(withTiming, timingModule, [0, binding2, 'respect-motion-settings',
closure])]);
}
function onCancelReplying() { // fn#84220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:8651, offset: 0x01f3fe80, size: 277 bytes, params: 1, frame: 21
var id;
var value2;
var value3;
var moduleValue;
var deletePendingReply;
var channelBinding;
var defaultImport;
var track;
var CHAT_CONTEXT_BAR_ACTION_CANCELED;
var object2;
var currentUser;
if (pendingReply != null) {
value2 = environment.__proto__.__proto__;
value3 = undefined;
moduleValue = require(11004) /* metro dependency 11004: PendingReplyActionCreators */;
deletePendingReply = moduleValue.deletePendingReply;
id = channel.id;
Reflect.apply(deletePendingReply, moduleValue, [id]);
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
CHAT_CONTEXT_BAR_ACTION_CANCELED = AnalyticEvents.CHAT_CONTEXT_BAR_ACTION_CANCELED;
object2 = {};
id = pendingReply == null ? value3 : pendingReply.message.id;
object2.message_id = id;
channelBinding = channel;
id = channelBinding.id;
object2.channel_id = id;
object2.guild_id = channelBinding.guild_id;
object2.context_action = 'reply';
object2.reason = (require(11005) /* metro dependency 11005: LongPressMessageActionSheetUtils */).getContextBarCancelReason('reply',
'cancel');
currentUser = UserStore.getCurrentUser();
id = currentUser == null ? value3 : currentUser.id;
object2.is_own_message = id === (pendingReply == null ? value3 : pendingReply.message.author.id);
Reflect.apply(track, defaultImport, [CHAT_CONTEXT_BAR_ACTION_CANCELED, object2]);
}
}
function onTapContextBarReply() { // fn#84221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:9037, offset: 0x01f3ff95, size: 109 bytes, params: 1, frame: 17
var value2;
var moduleValue;
var transitionTo;
var CHANNEL;
var channel;
let value = environment.__proto__;
let pendingReplyBinding = pendingReply;
if (pendingReplyBinding != null) {
value2 = environment.__proto__.__proto__;
moduleValue = require(1230) /* metro dependency 1230: router_utils */;
transitionTo = moduleValue.transitionTo;
CHANNEL = Routes.CHANNEL;
pendingReplyBinding = pendingReply;
channel = pendingReplyBinding.channel;
value = channel.getGuildId();
channel = pendingReplyBinding.channel;
Reflect.apply(transitionTo, moduleValue, [Reflect.apply(CHANNEL, Routes, [value, channel.id,
pendingReplyBinding.message.id])]);
}
}
function onToggleReplyMention_84222() { // fn#84222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:9156, offset: 0x01f40002, size: 77 bytes, params: 1, frame: 13
var value2;
var moduleValue;
var setPendingReplyShouldMention;
let pendingReplyBinding = pendingReply;
if (pendingReplyBinding != null) {
value2 = environment.__proto__.__proto__;
moduleValue = require(11004) /* metro dependency 11004: PendingReplyActionCreators */;
setPendingReplyShouldMention = moduleValue.setPendingReplyShouldMention;
pendingReplyBinding = pendingReply;
Reflect.apply(setPendingReplyShouldMention, moduleValue, [pendingReplyBinding.channel.id,
!pendingReplyBinding.shouldMention]);
}
}
function componentWillLeaveN(a0) { // fn#84216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:8213, owner: componentWillLeave.n, offset: 0x01f3fc6d, size: 56 bytes, params: 2, frame: 12
var value;
var runOnJS;
var value2;
if (a0) {
value = environment.__proto__.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__.__proto__;
Reflect.apply(runOnJS, value, [env2_5])();
}
}
@@ -0,0 +1,225 @@
/* Metro module 11538; source: modules/chat_input/native/ChatInputNativeCommands.tsx; dependencies: [27, 477, 11539, 7142, 1216, 2] */
function _fun88407(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11724:6, offset: 0x01fe2221, size: 273 bytes, params: 8, frame: 18
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = require(27) /* metro dependency 27 */;
const env0_3 = value.findNodeHandle;
const env0_4 = value.NativeModules;
object2 = {backspace: backspace, blur: blur_88409, closeCustomKeyboard: closeCustomKeyboard_88410,
flushText: flushText, getText: getText_88412, focus: focus_88414, openCustomKeyboard: openCustomKeyboard,
openSystemKeyboard: openSystemKeyboard, setText: setText_88417, setSelectedRange: setSelectedRange,
updateTextBlocks: updateTextBlocks, replaceRange: replaceRange};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/ChatInputNativeCommands.tsx');
exports.default = object2;
}
function backspace(a0) { // fn#88408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11724:156, offset: 0x01fe2332, size: 120 bytes, params: 2, frame: 14
var moduleValue;
var DCDChatInputManager;
if (a0 != null) {
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue.isAndroid()) {
(require(11539) /* metro dependency 11539: ChatInputNativeComponent */).Commands.backspace(a0);
} else {
DCDChatInputManager = NativeModules.DCDChatInputManager;
DCDChatInputManager.backspace(findNodeHandle(a0));
}
}
}
function blur_88409(a0) { // fn#88409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11724:265, offset: 0x01fe23aa, size: 120 bytes, params: 2, frame: 14
var moduleValue;
var DCDChatInputManager;
if (a0 != null) {
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue.isAndroid()) {
(require(11539) /* metro dependency 11539: ChatInputNativeComponent */).Commands.blur(a0);
} else {
DCDChatInputManager = NativeModules.DCDChatInputManager;
DCDChatInputManager.blur(findNodeHandle(a0));
}
}
}
function closeCustomKeyboard_88410(a0) { // fn#88410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11724:379, offset: 0x01fe2422, size: 117 bytes, params: 2, frame: 13
if (a0 != null) {
var value;
var moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue.isAndroid()) {
throw new global.Error('closeCustomKeyboard is not supported/needed on Android');
}
var DCDChatInputManager = NativeModules.DCDChatInputManager;
DCDChatInputManager.closeCustomKeyboard(findNodeHandle(a0));
}
}
function flushText(a0, a1) { // fn#88411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11724:552, offset: 0x01fe2497, size: 128 bytes, params: 3, frame: 15
if (a0 == null) {
return undefined;
}
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
(require(11539) /* metro dependency 11539: ChatInputNativeComponent */).Commands.flushText(a0, a1);
return undefined;
}
const Error = global.Error;
throw new Error('flushText is not supported/needed on iOS');
}
function getText_88412(a0, a1, a2) { // fn#88412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11724:698, offset: 0x01fe2517, size: 336 bytes, params: 4, frame: 21
var nodeHandle;
var DCDChatInputManager;
var captureException;
var Error;
var value4;
var error;
const env0_0 = a1;
const env0_1 = a2;
if (a0 == null) {
return null;
}
var value;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
value = require(7142) /* metro dependency 7142: createNonce */;
value = value.createNonce();
a1.set(value, _fun88413);
(require(11539) /* metro dependency 11539: ChatInputNativeComponent */).Commands.flushText(a0, value);
} else {
nodeHandle = findNodeHandle(a0);
if (nodeHandle == null) {
value = importDefault(1216) /* metro dependency 1216: SentryUtilsNative */;
captureException = value.captureException;
Error = global.Error;
value4 = Object.create(Error.prototype, {constructor: {value: Error}});
error = new Error('inputRef is null');
Reflect.apply(captureException, value, [error instanceof Object ? error : value4]);
} else {
DCDChatInputManager = NativeModules.DCDChatInputManager;
DCDChatInputManager.markTextInputChanged(findNodeHandle(a0));
DCDChatInputManager = NativeModules.DCDChatInputManager;
DCDChatInputManager.getText(nodeHandle).then(a2).catch((importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureException);
}
}
}
function focus_88414(a0) { // fn#88414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11724:1060, offset: 0x01fe268c, size: 120 bytes, params: 2, frame: 14
var moduleValue;
var DCDChatInputManager;
if (a0 != null) {
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue.isAndroid()) {
(require(11539) /* metro dependency 11539: ChatInputNativeComponent */).Commands.focus(a0);
} else {
DCDChatInputManager = NativeModules.DCDChatInputManager;
DCDChatInputManager.focus(findNodeHandle(a0));
}
}
}
function openCustomKeyboard(a0) { // fn#88415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11724:1175, offset: 0x01fe2704, size: 124 bytes, params: 2, frame: 14
if (a0 == null) {
return undefined;
}
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
(require(11539) /* metro dependency 11539: ChatInputNativeComponent */).Commands.openCustomKeyboard(a0);
return undefined;
}
const Error = global.Error;
throw new Error('openCustomKeyboard is not supported/needed on iOS');
}
function openSystemKeyboard(a0) { // fn#88416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11724:1344, offset: 0x01fe2780, size: 120 bytes, params: 2, frame: 14
var moduleValue;
var DCDChatInputManager;
if (a0 != null) {
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue.isAndroid()) {
(require(11539) /* metro dependency 11539: ChatInputNativeComponent */).Commands.openSystemKeyboard(a0);
} else {
DCDChatInputManager = NativeModules.DCDChatInputManager;
DCDChatInputManager.openSystemKeyboard(findNodeHandle(a0));
}
}
}
function setText_88417(a0, a1) { // fn#88417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11724:1474, offset: 0x01fe27f8, size: 125 bytes, params: 3, frame: 16
var moduleValue;
var DCDChatInputManager;
if (a0 != null) {
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue.isAndroid()) {
(require(11539) /* metro dependency 11539: ChatInputNativeComponent */).Commands.setText(a0, a1);
} else {
DCDChatInputManager = NativeModules.DCDChatInputManager;
DCDChatInputManager.setText(findNodeHandle(a0), a1);
}
}
}
function setSelectedRange(a0, a1, a2) { // fn#88418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11724:1599, offset: 0x01fe2875, size: 130 bytes, params: 4, frame: 18
var moduleValue;
var DCDChatInputManager;
if (a0 != null) {
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue.isAndroid()) {
(require(11539) /* metro dependency 11539: ChatInputNativeComponent */).Commands.setSelectedRange(a0, a1,
a2);
} else {
DCDChatInputManager = NativeModules.DCDChatInputManager;
DCDChatInputManager.setSelectedRange(findNodeHandle(a0), a1, a2);
}
}
}
function updateTextBlocks(a0, a1, a2) { // fn#88419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11724:1748, offset: 0x01fe28f7, size: 164 bytes, params: 4, frame: 19
var value3;
var moduleValue;
var DCDChatInputManager;
var Commands;
const value = a2;
if (a0 != null) {
value3 = undefined;
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue.isAndroid()) {
Commands = (require(11539) /* metro dependency 11539: ChatInputNativeComponent */).Commands;
Commands.updateTextBlocks(a0, global.JSON.stringify(a1), value ?? value3);
} else {
DCDChatInputManager = NativeModules.DCDChatInputManager;
DCDChatInputManager.updateTextBlocks(findNodeHandle(a0), a1, value);
}
}
}
function replaceRange(a0, {location, length, text, nodes = [], keepCursorPosition, editId}) { // fn#88420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11724:1924, offset: 0x01fe299b, size: 230 bytes, params: 3, frame: 26
var moduleValue;
var DCDChatInputManager;
var replaceRange;
var Commands;
var JSON;
keepCursorPosition = !(keepCursorPosition === undefined) && keepCursorPosition;
if (a0 != null) {
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue.isAndroid()) {
Commands = (require(11539) /* metro dependency 11539: ChatInputNativeComponent */).Commands;
replaceRange = Commands.replaceRange;
JSON = global.JSON;
Reflect.apply(replaceRange, Commands, [a0, location, length, text, JSON.stringify(nodes),
keepCursorPosition,
editId]);
} else {
DCDChatInputManager = NativeModules.DCDChatInputManager;
DCDChatInputManager.replaceRange(findNodeHandle(a0), location, length, text, nodes, keepCursorPosition,
editId);
}
}
}
function _fun88413(a0) { // fn#88413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11724:792, offset: 0x01fe2667, size: 37 bytes, params: 2, frame: 12
require.delete(env0_2);
importDefault(a0);
}
@@ -0,0 +1,58 @@
/* Metro module 11773; source: modules/chat_input/native/ChatInputNativeComponent.tsx; dependencies: [31, 27, 3964, 33, 4501, 697, 1244, 4048, 4002, 4000, 477, 11533, 11539, 2] */
function _fun90157(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11959:6, offset: 0x0202e2e5, size: 357 bytes, params: 8, frame: 24
var object2;
var value4;
var property;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const requireNativeComponent = (require(27) /* metro dependency 27 */).requireNativeComponent;
const clientThemesBackgroundStore = importDefault(3964) /* metro dependency 3964: ClientThemesBackgroundStore */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
object2.style = {flex: 1};
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
object2.textColor = {color: TEXT_DEFAULT};
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object2.placeholderColor = {color: TEXT_MUTED};
const env0_5 = Reflect.apply(createStyles, createStylesModule, [object2]);
value = value.forwardRef(_fun90158);
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
property = (require(11539) /* metro dependency 11539: ChatInputNativeComponent */).default;
} else {
value4 = requireNativeComponent('DCDChatInput');
}
value.displayName = 'ChatInputNativeComponent';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/ChatInputNativeComponent.tsx');
exports.default = value;
}
function _fun90158({accessibilityLabel, customKeyboard, placeholder, editable, markAsSpoilerTitle, setNoExtractUI, shouldShowCursor, onBeginFocus, onEndBlur, onChangeContentSize, onMaxHeightChanged, onSelectionOrTextChange, onTextFlushed, onPasteImage, onPasteCommand, onTapAction, onRequestSend, verticalInset}, a1) { // fn#90158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11959:317, offset: 0x0202e44a, size: 655 bytes, params: 3, frame: 38
var r22;
var intl;
if (markAsSpoilerTitle !== undefined) {
r22 = markAsSpoilerTitle;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r22 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['gsI+xC']);
}
const styles = useStyles();
const color = styles.textColor.color;
const color2 = styles.placeholderColor.color;
const isThemeDark2 = (require(4002) /* metro dependency 4002: shared */).isThemeDark((require(4048) /* metro dependency 4048: useTheme */).useTheme());
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
const hexWithOpacity = colorUtilsModule.hexWithOpacity;
const unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
const value8 = Reflect.apply(hexWithOpacity, colorUtilsModule,
[isThemeDark2 ? unsafe_rawColors.WHITE : unsafe_rawColors.PRIMARY_500,
ClientThemesBackgroundStore.gradientPreset != null ? 0.8 : 0.6]);
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
const r27 = platformUtilsModule.isAndroid() ? undefined : accessibilityLabel;
const moduleValue5 = platformUtilsModule;
return ((Component) => <Component accessibilityLabel={r27} children={moduleValue5.isAndroid() ? undefined : customKeyboard} editable={editable} keyboardAppearance={isThemeDark2 ? 1 : 2} keyboardType={platformUtilsModule.isAndroid() ? undefined : 'default'} markAsSpoilerTitle={r22} maxHeight={(importDefault(11533) /* metro dependency 11533: useChatInputMaxHeight */)(onMaxHeightChanged)} onBeginFocus={onBeginFocus} onEndBlur={onEndBlur} onChangeContentSize={onChangeContentSize} onSelectionOrTextChange={onSelectionOrTextChange} onTextFlushed={onTextFlushed} onPasteImage={onPasteImage} onPasteCommand={onPasteCommand} onTapAction={onTapAction} onRequestSend={onRequestSend} placeholder={placeholder} placeholderColor={color2} ref={a1} selectionColor={value8} setNoExtractUI={setNoExtractUI} shouldShowCursor={shouldShowCursor} style={styles.style} textColor={color} verticalInset={verticalInset} />)(env0_6);
}
@@ -0,0 +1,114 @@
/* Metro module 11858; source: modules/chat_input/native/ChatInputParser.tsx; dependencies: [6, 7, 27, 22, 2] */
function _fun90920(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12044:6, offset: 0x0204c4eb, size: 312 bytes, params: 8, frame: 23
var object3;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = (require(27) /* metro dependency 27 */).processColor;
object3 = {COMMAND_OPTION: 0};
object3[0] = 'COMMAND_OPTION';
object3.ROLE_HIGHLIGHT = 1;
object3[1] = 'ROLE_HIGHLIGHT';
const object4 = {COMMAND_OPTION: 0};
object4[0] = 'COMMAND_OPTION';
object4.COMMAND_OPTION_WITH_VALUE = 1;
object4[1] = 'COMMAND_OPTION_WITH_VALUE';
object4.EMOJI_HIGHLIGHT = 2;
object4[2] = 'EMOJI_HIGHLIGHT';
object4.USER_HIGHLIGHT = 3;
object4[3] = 'USER_HIGHLIGHT';
object4.ROLE_HIGHLIGHT = 4;
object4[4] = 'ROLE_HIGHLIGHT';
object4.CHANNEL_HIGHLIGHT = 5;
object4[5] = 'CHANNEL_HIGHLIGHT';
object4.SILENT_HIGHLIGHT = 6;
object4[6] = 'SILENT_HIGHLIGHT';
const value = _fun90921();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/ChatInputParser.tsx');
exports.default = value;
exports.convertToNativeStyle = convertToNativeStyle;
exports.ChatInputParseResultDataType = object3;
exports.ChatInputNodeType = object4;
}
function _fun90921() { // fn#90921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12044:582, offset: 0x0204c623, size: 109 bytes, params: 1, frame: 15
return env0_3(ChatInputParser, [{key: 'addRule', value: function(a0) {
this.rules[a0.ruleId] = a0;
}}, {key: 'removeRule', value: function(a0) {
delete this.rules[a0];
}}, {key: 'parse', value: value_90925}]);
}
function convertToNativeStyle(a0) { // fn#90928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12044:1329, offset: 0x0204c820, size: 138 bytes, params: 2, frame: 18
var r2;
var object4;
const backgroundColor = a0.backgroundColor;
const color = a0.color;
const borderRadius = a0.borderRadius;
const object5 = {'backgroundColor': 0, 'color': 0, 'borderRadius': 0};
const value = null;
silentSetPrototypeOf(object5, value, undefined);
const value2 = copyDataProperties({}, a0, object5, backgroundColor);
if (value != backgroundColor) {
if (value != borderRadius) {
object4 = {};
object4.backgroundColor = processColor(backgroundColor);
object4.cornerRadius = borderRadius;
r2 = object4;
} else {
r2 = value;
}
} else {
r2 = value;
}
const object6 = {};
object6.color = processColor(color);
object6.backgroundStyle = r2;
copyDataProperties(object6, value2, object5);
return object6;
}
function ChatInputParser() { // fn#90922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12044:603, offset: 0x0204c690, size: 35 bytes, params: 1, frame: 13
env1_2(this, ChatInputParser);
this.rules = {};
}
function value_90925(a0, a1) { // fn#90925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12044:807, offset: 0x0204c6e1, size: 86 bytes, params: 3, frame: 13
var environment;
const env0_0 = a0;
const env0_1 = a1;
let value = environment.__proto__;
value = Reflect.apply((importDefault(22) /* metro dependency 22 */).valuesIn, value, [this.rules]);
return value.reduce(_fun90926, []);
}
function _fun90926(a0, a1) { // fn#90926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12044:865, offset: 0x0204c737, size: 64 bytes, params: 3, frame: 15
const env0_0 = a1;
let value = a1.matchFunction(env0_0, require);
value = value.map(_fun90927);
return a0.concat(value);
}
function _fun90927(a0) { // fn#90927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12044:905, offset: 0x0204c777, size: 169 bytes, params: 2, frame: 16
var r4;
var r6;
const r3 = typeof require.deleteNodeOnBackspace === 'function' ? require.deleteNodeOnBackspace(a0) : require.deleteNodeOnBackspace;
const r2 = typeof require.editDisabled === 'function' ? require.editDisabled(a0) : require.editDisabled;
const object2 = {};
object2.type = require.type;
const value4 = require.style == null;
if (value4) {
r4 = undefined;
r6 = value4;
} else {
r4 = require.style(a0);
r6 = require;
}
object2.style = r4;
object2.deleteNodeOnBackspace = r3;
object2.editDisabled = r2;
copyDataProperties(object2, a0, r6);
return object2;
}
@@ -0,0 +1,101 @@
/* Metro module 11530; source: modules/chat_input/native/FloatingChatInputContainer.tsx; dependencies: [57, 31, 33, 4017, 3860, 697, 1599, 4022, 1583, 4504, 4507, 2] */
function _fun88306(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11716:6, offset: 0x01fdef86, size: 226 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
const env0_6 = Easing.bezier(0.2, 0, 0, 1);
object = {code: 'function FloatingChatInputContainerTsx1(){const{paddingSV}=this.__closure;return{paddingBottom:paddingSV.get()};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/FloatingChatInputContainer.tsx');
exports.default = FloatingChatInputContainer;
}
function FloatingChatInputContainer({style, onLayout, children}) { // fn#88307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11716:394, offset: 0x01fdf068, size: 101 bytes, params: 2, frame: 18
const value = useKeyboardOpenPaddingStyle();
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View style={[style, value]} onLayout={onLayout}>
{children}
</View>
);
}
function useKeyboardOpenPaddingStyle() { // fn#88308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11716:469, owner: FloatingChatInputContainer.useKeyboardOpenPaddingStyle, offset: 0x01fdf0cd, size: 384 bytes, params: 1, frame: 23
var environment;
const value = environment.__proto__;
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const CHAT_INPUT_FLOATING_CONTENT_PADDING_VERTICAL = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_FLOATING_CONTENT_PADDING_VERTICAL;
const value2 = Reflect.apply(useToken, useTokenModule, [CHAT_INPUT_FLOATING_CONTENT_PADDING_VERTICAL]);
const binding = env1_4;
const value4 = env1_3(binding.useState(_fun88309), 2);
const value5 = 0;
const property = value4[value5];
let env0_1 = value4[1];
binding.useEffect(function() {
var KeyboardEvents = require(dependencyMap[6]).KeyboardEvents;
var env0_0 = KeyboardEvents.addListener('keyboardWillShow', _fun88311);
var env0_1 = KeyboardEvents.addListener('keyboardWillHide', _fun88312);
return _fun88313;
}, []);
const useKeyboardTypeModule = require(4022) /* metro dependency 4022: useKeyboardType */;
const useKeyboardContextForType = useKeyboardTypeModule.useKeyboardContextForType;
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
let SYSTEM = KeyboardTypes.SYSTEM;
const value6 = Reflect.apply(useKeyboardContextForType, useKeyboardTypeModule, [SYSTEM]).keyboardWillOpen === true;
const value7 = (importDefault(4022) /* metro dependency 4022: useKeyboardType */)();
SYSTEM = KeyboardTypes.SYSTEM;
const value8 = value7 !== SYSTEM;
let r9 = property || value6;
r9 = !r9 ? value8 : r9;
env1_4.useEffect(_fun88314, [r9, value2,
(require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(r9 ? value2 : value5)]);
return (require(4017) /* metro dependency 4017: ReanimatedRexport */).useAnimatedStyle(_fun88315());
}
function _fun88309() { // fn#88309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11716:614, offset: 0x01fdf24d, size: 74 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = undefined;
const KeyboardController = (require(1599) /* metro dependency 1599 */).KeyboardController;
const value2 = KeyboardController.state();
const height = value2 == null ? value : value2.height;
value = 0;
return (height ?? value) > value;
}
function _fun88310() { // fn#88310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11716:751, offset: 0x01fdf297, size: 115 bytes, params: 1, frame: 18
const KeyboardEvents = (require(1599) /* metro dependency 1599 */).KeyboardEvents;
const env0_0 = KeyboardEvents.addListener('keyboardWillShow', _fun88311);
const env0_1 = KeyboardEvents.addListener('keyboardWillHide', _fun88312);
return _fun88313;
}
function _fun88314() { // fn#88314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11716:1135, offset: 0x01fdf30a, size: 109 bytes, params: 1, frame: 20
const binding = env0_3;
const set = binding.set;
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
const r4 = env0_2 ? env0_0 : 0;
const object2 = {};
object2.duration = (require(4507) /* metro dependency 4507: timingPresets */).timingStandardDuration;
object2.easing = env2_6;
Reflect.apply(set, binding, [Reflect.apply(withTiming, timingModule, [r4, object2])]);
}
function _fun88315() { // fn#88315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11716:1261, offset: 0x01fdf377, size: 62 bytes, params: 1, frame: 3
const closure = FloatingChatInputContainerTsx1;
closure.__closure = {paddingSV: env0_3};
closure.__workletHash = 5673482424037;
closure.__initData = env2_7;
return closure;
}
function FloatingChatInputContainerTsx1() { // fn#88316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11716:1307, offset: 0x01fdf3b5, size: 25 bytes, params: 1, frame: 10
const object2 = {};
object2.paddingBottom = env1_3.get();
return object2;
}
@@ -0,0 +1,66 @@
/* Metro module 11772; source: modules/chat_input/native/GiftIconTrinketsAnimation.tsx; dependencies: [31, 27, 4502, 33, 4501, 4582, 1357, 3860, 697, 566, 1861, 477, 7897, 5475, 2] */
function _fun90153(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11958:6, offset: 0x0202dfc0, size: 218 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun90154);
value = value.memo(_fun90155);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/GiftIconTrinketsAnimation.tsx');
exports.GiftIconTrinketsAnimation = value;
}
function _fun90154(a0) { // fn#90154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11958:169, offset: 0x0202e09a, size: 163 bytes, params: 2, frame: 14
const SMALL_BUTTON_HEIGHT = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).SMALL_BUTTON_HEIGHT;
const SMALL_BUTTON_PADDING = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).SMALL_BUTTON_PADDING;
const value = SMALL_BUTTON_HEIGHT + SMALL_BUTTON_PADDING + 2;
return {container: {'position': 'absolute', 'top': 0, 'left': 0, 'width': null, 'height': null,
'overflow': 'visible', 'marginLeft': 4, 'zIndex': 0, width: value, height: value},
containerRefresh: {'position': 'absolute', 'top': 0, 'left': 0, 'width': null, 'height': null,
'overflow': 'visible', 'marginLeft': 0, 'zIndex': 0, width: a0, height: a0}, trinkets: {'zIndex': 4,
'position': 'absolute', 'pointerEvents': 'none', 'width': '100%', 'height': '100%', 'top': 0, 'left': 0},
trinketsRefresh: {'zIndex': 4, 'position': 'absolute', 'pointerEvents': 'none', 'width': '175%',
'height': '175%', 'top': '-37.5%', 'left': '-37.5%'}};
}
function _fun90155({trinketsAnimationUrl}) { // fn#90155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11958:695, offset: 0x0202e13d, size: 424 bytes, params: 2, frame: 23
var r5;
var r0;
var value;
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
const useMobileVisualRefreshConfig = mobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
let object2 = {location: 'GiftIconTrinketsAnimation'};
const enabled = Reflect.apply(useMobileVisualRefreshConfig, mobileVisualRefreshExperimentModule, [object2]).enabled;
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const CHAT_INPUT_ACTION_BUTTON_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_ACTION_BUTTON_SIZE;
const styles = useStyles(Reflect.apply(useToken, useTokenModule, [CHAT_INPUT_ACTION_BUTTON_SIZE]));
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const r9 = enabled ? styles.trinketsRefresh : styles.trinkets;
if ((require(1861) /* metro dependency 1861: StringUtils */).isNullOrEmpty(trinketsAnimationUrl)) {
r0 = null;
} else {
object2 = {};
r5 = enabled ? styles.containerRefresh : styles.container;
object2.style = r5;
object2.pointerEvents = 'none';
if ((require(477) /* metro dependency 477: PlatformUtils */).isAndroid()) {
const APNGPlayer = (require(7897) /* metro dependency 7897: APNGPlayerAndroid */).APNGPlayer;
r5 = <APNGPlayer url={trinketsAnimationUrl} autoplay={!useReducedMotion} style={r9} />;
} else {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component source={{uri: trinketsAnimationUrl}} style={r9} resizeMode="contain" enableAnimation={!useReducedMotion} />)(value);
r5 = value;
}
value = <View {...object2}>{r5}</View>;
r0 = value;
}
return r0;
}
@@ -0,0 +1,39 @@
/* Metro module 11783; source: modules/chat_input/native/accessories/ChatInputAccessibilityDivider.tsx; dependencies: [31, 27, 33, 4559, 477, 1244, 2] */
function _fun90260(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11969:6, offset: 0x02031f36, size: 172 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_2 = value2.StyleSheet;
const env0_3 = value2.View;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(_fun90261);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/accessories/ChatInputAccessibilityDivider.tsx');
exports.ChatInputAccessibilityDivider = value;
}
function _fun90261() { // fn#90261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11969:164, offset: 0x02031fe2, size: 209 bytes, params: 1, frame: 20
var r0;
var moduleValue2;
var object;
var intl;
const value2 = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).useIsScreenReaderEnabled();
const value3 = null;
if (value2) {
moduleValue2 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue2.isAndroid()) {
r0 = value3;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = <View nativeID="chat-input-accessibility-divider" accessible accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['uKZtC/'])} accessibilityRole="header" style={[StyleSheet.absoluteFill,
{height: 1}]} />;
}
} else {
r0 = value3;
}
return r0;
}
@@ -0,0 +1,83 @@
/* Metro module 11886; source: modules/chat_input/native/accessories/ChatInputCharCounter.tsx; dependencies: [57, 31, 1878, 661, 1880, 33, 4501, 566, 3802, 7875, 7882, 3857, 1244, 5278, 4573, 7954, 2] */
function _fun91238(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12072:6, offset: 0x02057f03, size: 306 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).UpsellTypes;
const env0_7 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumUpsellTypes;
const value2 = require(33) /* metro dependency 33 */;
const env0_8 = value2.jsx;
const env0_9 = value2.jsxs;
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'alignItems': 'center',
'paddingBottom': 6}});
const value4 = value.forwardRef(_fun91239);
value4.displayName = 'ChatInputCharCounter';
value = value.memo(value4);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/accessories/ChatInputCharCounter.tsx');
exports.default = value;
}
function _fun91239({analyticsLocations}, a1) { // fn#91239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12072:294, offset: 0x02058035, size: 388 bytes, params: 3, frame: 22
var r0;
var PressableOpacity;
var value;
const styles = useStyles();
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return importDefault(dependencyMap[8]).canUseIncreasedMessageLength(UserStore.getCurrentUser());
});
const binding = env0_4;
const [property, env0_2] = env0_3(binding.useState(0), 2);
const value5 = (importDefault(7875) /* metro dependency 7875: useMessageMaxLength */)();
binding.useImperativeHandle(a1, function() {
return {onMessageLengthChanged: _fun91242};
});
const useCallback = binding.useCallback;
if (property > 0) {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
var pressableOpacityProps = {onPress: Reflect.apply(useCallback, binding, [_fun91243, [analyticsLocations,
value2,
value5]]), style: styles.container};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
value = <Text color="icon-feedback-critical" lineClamp={1} variant="text-xs/medium">{'-' + property}</Text>;
value = <PressableOpacity {...pressableOpacityProps}>{value}{((NitroWheelIcon) => <NitroWheelIcon size="sm" />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon)}</PressableOpacity>;
r0 = value;
} else {
r0 = null;
}
return r0;
}
function _fun91241() { // fn#91241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12072:512, offset: 0x020581ec, size: 18 bytes, params: 1, frame: 2
return {onMessageLengthChanged: onMessageLengthChanged};
}
function _fun91243() { // fn#91243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12072:598, offset: 0x0205822e, size: 205 bytes, params: 1, frame: 19
var object2;
var defaultImport2;
var open;
var intl;
if (env0_1) {
defaultImport2 = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
open = defaultImport2.open;
object2 = {};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.content = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.vcvHa0,
{maxLength: env0_3});
object2.key = 'premium-message-length-info-toast';
Reflect.apply(open, defaultImport2, [object2]);
} else {
(importDefault(7882) /* metro dependency 7882: PremiumUpsellUtils */).handleShowUpsellAlert({initialUpsellKey: UpsellTypes.LONGER_MESSAGE,
analyticsLocations: analyticsLocations,
analyticsProperties: {type: PremiumUpsellTypes.MESSAGE_LENGTH_UPSELL}});
}
}
function onMessageLengthChanged(a0) { // fn#91242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12072:541, offset: 0x020581fe, size: 48 bytes, params: 2, frame: 14
const Math = global.Math;
env1_2(Math.max(0, a0 - env1_3));
}
@@ -0,0 +1,65 @@
/* Metro module 11775; source: modules/chat_input/native/accessories/ChatInputCover.tsx; dependencies: [31, 27, 33, 4559, 1583, 2] */
function _fun90163(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11961:6, offset: 0x0202eb0c, size: 209 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_3 = value2.StyleSheet;
const env0_4 = value2.TouchableWithoutFeedback;
const env0_5 = value2.View;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const value3 = value.forwardRef(_fun90164);
value3.displayName = 'ChatInputCover';
value = value.memo(value3);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/accessories/ChatInputCover.tsx');
exports.default = value;
}
function _fun90164({enabled, keyboardType, onSelectKeyboard}, a1) { // fn#90164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11961:199, offset: 0x0202ebdd, size: 264 bytes, params: 3, frame: 20
enabled = enabled === undefined || enabled;
const env0_2 = onSelectKeyboard;
const value2 = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).useIsScreenReaderEnabled();
const binding = env0_2;
const {imperativeHandle, openSystemKeyboard} = binding.useMemo(function() {
return {imperativeHandle: _fun90166, openSystemKeyboard: _fun90168};
}, [enabled, value2, keyboardType, onSelectKeyboard]);
binding.useImperativeHandle(a1, imperativeHandle);
return enabled ? keyboardType === (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes.SYSTEM || value2 ? null : <TouchableWithoutFeedback accessible={false} accessibilityRole="none" onPress={openSystemKeyboard}><View style={StyleSheet.absoluteFill} /></TouchableWithoutFeedback> : null;
}
function _fun90165() { // fn#90165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11961:314, offset: 0x0202ece5, size: 30 bytes, params: 1, frame: 3
return {imperativeHandle: function() {
return {focused: _fun90167};
}, openSystemKeyboard: function() {
var onSelectKeyboardBinding = onSelectKeyboard;
var object = {};
object.type = require(dependencyMap[4]).KeyboardTypes.SYSTEM;
onSelectKeyboardBinding(object);
}};
}
function imperativeHandle() { // fn#90166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11961:337, offset: 0x0202ed03, size: 18 bytes, params: 1, frame: 2
return {focused: focused};
}
function focused(a0) { // fn#90167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11961:351, owner: imperativeHandle.focused, offset: 0x0202ed15, size: 130 bytes, params: 2, frame: 14
var keyboardTypeBinding;
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
var onSelectKeyboardBinding;
let value = a0;
let r1 = enabled && value;
if (r1) {
keyboardTypeBinding = keyboardType;
value = environment.__proto__.__proto__.__proto__;
value = keyboardTypeBinding !== KeyboardTypes.SYSTEM;
r1 = value;
}
r1 = r1 && env2_3;
if (r1) {
onSelectKeyboardBinding = onSelectKeyboard;
value = environment.__proto__.__proto__.__proto__;
onSelectKeyboardBinding({type: KeyboardTypes.SYSTEM});
}
}
@@ -0,0 +1,113 @@
/* Metro module 11711; source: modules/chat_input/native/accessories/ChatInputExpressionButton.tsx; dependencies: [31, 33, 4501, 697, 1357, 3860, 5278, 1244, 1305, 11160, 7951, 2] */
function _fun89776(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11897:6, offset: 0x0201dd6d, size: 185 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun89777);
value = value.memo(_fun89778);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/accessories/ChatInputExpressionButton.tsx');
exports.default = value;
}
function _fun89777(a0, a1, a2) { // fn#89777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11897:144, offset: 0x0201de26, size: 290 bytes, params: 4, frame: 19
var r3;
var object4;
var modules;
var mobile;
var CHAT_INPUT_PILL_PADDING;
const object6 = {};
const object7 = {};
const radii = (importDefault(697) /* metro dependency 697: native */).radii;
object7.borderRadius = a0 ? radii.sm : radii.round;
object7.height = a2;
object7.width = a2;
if (a0) {
r3 = {'alignItems': 'center', 'justifyContent': 'center'};
} else {
object4 = {};
modules = (importDefault(697) /* metro dependency 697: native */).modules;
mobile = modules.mobile;
CHAT_INPUT_PILL_PADDING = mobile.CHAT_INPUT_PILL_PADDING;
object4.paddingHorizontal = CHAT_INPUT_PILL_PADDING;
modules = (importDefault(697) /* metro dependency 697: native */).modules;
mobile = modules.mobile;
CHAT_INPUT_PILL_PADDING = mobile.CHAT_INPUT_PILL_PADDING;
object4.paddingVertical = CHAT_INPUT_PILL_PADDING;
r3 = object4;
}
copyDataProperties(object7, r3, undefined);
object6.expressionButton = object7;
const object8 = {position: 'absolute'};
const CHAT_INPUT_EXPRESSION_OFFSET_LEFT = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_EXPRESSION_OFFSET_LEFT;
object8.left = CHAT_INPUT_EXPRESSION_OFFSET_LEFT;
const CHAT_INPUT_EXPRESSION_OFFSET_TOP = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_EXPRESSION_OFFSET_TOP;
object8.top = CHAT_INPUT_EXPRESSION_OFFSET_TOP;
object6.expressionButtonIconPosition = object8;
const CHAT_INPUT_ICON_DEFAULT_TINT = (importDefault(697) /* metro dependency 697: native */).colors.CHAT_INPUT_ICON_DEFAULT_TINT;
object6.expressionButtonIconTint = {tintColor: CHAT_INPUT_ICON_DEFAULT_TINT};
return object6;
}
function _fun89778({style, active, showKeyboardIcon = active, onPress}) { // fn#89778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11897:692, offset: 0x0201df48, size: 727 bytes, params: 2, frame: 30
active = !(active === undefined) && active;
const {enabled,
chatInputFloating} = require(dependencyMap[4]).useMobileVisualRefreshConfig({location: 'ChatInputExpressionButton'});
const moduleValue2 = require(dependencyMap[5]);
let useToken = moduleValue2.useToken;
const CHAT_INPUT_ACTION_BUTTON_SIZE = importDefault(dependencyMap[3]).modules.mobile.CHAT_INPUT_ACTION_BUTTON_SIZE;
const value5 = Reflect.apply(useToken, moduleValue2, [CHAT_INPUT_ACTION_BUTTON_SIZE]);
const moduleValue3 = require(dependencyMap[5]);
useToken = moduleValue3.useToken;
const CHAT_INPUT_PILL_PADDING = importDefault(dependencyMap[3]).modules.mobile.CHAT_INPUT_PILL_PADDING;
const value6 = Reflect.apply(useToken, moduleValue3, [CHAT_INPUT_PILL_PADDING]);
const moduleValue4 = require(dependencyMap[5]);
useToken = moduleValue4.useToken;
const CHAT_INPUT_PILL_BORDER_WIDTH = importDefault(dependencyMap[3]).modules.mobile.CHAT_INPUT_PILL_BORDER_WIDTH;
const value7 = Reflect.apply(useToken, moduleValue4, [CHAT_INPUT_PILL_BORDER_WIDTH]);
const moduleValue5 = require(dependencyMap[5]);
useToken = moduleValue5.useToken;
const CHAT_INPUT_ICON_SIZE = importDefault(dependencyMap[3]).modules.mobile.CHAT_INPUT_ICON_SIZE;
const value8 = Reflect.apply(useToken, moduleValue5, [CHAT_INPUT_ICON_SIZE]);
const moduleValue6 = require(dependencyMap[5]);
useToken = moduleValue6.useToken;
const CHAT_INPUT_ACTION_BUTTON_MIN_TOUCH_TARGET_SIZE = importDefault(dependencyMap[3]).modules.mobile.CHAT_INPUT_ACTION_BUTTON_MIN_TOUCH_TARGET_SIZE;
const value9 = Reflect.apply(useToken, moduleValue6, [CHAT_INPUT_ACTION_BUTTON_MIN_TOUCH_TARGET_SIZE]);
const r1 = enabled ? value5 : value5 - 2 * (value6 + value7);
const styles = useStyles(enabled, chatInputFloating, r1);
const Math = global.Math;
const value11 = Math.max(0, (value9 - r1) / 2);
const binding = env0_3;
const value12 = binding.useCallback(function() {
onPress(undefined);
}, [onPress]);
const value13 = binding.useRef(null);
const PressableOpacity = require(dependencyMap[6]).PressableOpacity;
const items2 = [styles.expressionButton, style];
const r5 = value11 > 0 ? value11 : undefined;
const intl = require(dependencyMap[7]).intl;
const string = intl.string;
const iZ7Mz9 = require(dependencyMap[7]).t.iZ7Mz9;
const object = {expanded: active};
const Icon = require(dependencyMap[8]).Icon;
showKeyboardIcon = showKeyboardIcon ? dependencyMap[9] : dependencyMap[10];
return (
<PressableOpacity
ref={value13}
style={items2}
hitSlop={r5}
accessibilityRole="button"
accessibilityLabel={Reflect.apply(string, intl, [iZ7Mz9])}
accessibilityState={object}
onPress={value12}
>
<Icon
size={value8}
style={[!enabled && styles.expressionButtonIconPosition, styles.expressionButtonIconTint]}
source={importDefault(showKeyboardIcon)}
/>
</PressableOpacity>
);
}
@@ -0,0 +1,37 @@
/* Metro module 11755; source: modules/chat_input/native/accessories/ChatInputImageCarousel.tsx; dependencies: [31, 7168, 4645, 4644, 7729, 33, 566, 11091, 2] */
function _fun90065(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11941:6, offset: 0x0202933f, size: 224 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const applicationCommandStore = importDefault(7168) /* metro dependency 7168: ApplicationCommandStore */;
const env0_4 = (require(4645) /* metro dependency 4645: DraftStore */).DraftType;
const uploadAttachmentStore = importDefault(4644) /* metro dependency 4644: UploadAttachmentStore */;
const env0_6 = (require(7729) /* metro dependency 7729: useChatBottomManagerUIStore */).useChatShowingAutoComplete;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(ChatInputImageCarousel);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/accessories/ChatInputImageCarousel.tsx');
exports.default = value;
}
function ChatInputImageCarousel({canUpload, channelId, screenIndex}) { // fn#90066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11941:211, offset: 0x0202941f, size: 175 bytes, params: 2, frame: 21
var r0;
var value;
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UploadAttachmentStore,
ApplicationCommandStore], _fun90067, [channelId, canUpload, useChatShowingAutoComplete(screenIndex)]);
if (value3 != null) {
value = importDefault(11091) /* metro dependency 11091: ImageCarousel */;
value = ((Component) => <Component attachments={value3} channelId={channelId} />)(value);
r0 = value;
} else {
r0 = null;
}
return r0;
}
function _fun90067() { // fn#90067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11941:331, offset: 0x020294ce, size: 89 bytes, params: 1, frame: 17
const value2 = null;
return env0_2 ? value2 : canUpload && value2 == ApplicationCommandStore.getActiveCommand(channelId) ? UploadAttachmentStore.getUploads(channelId,
DraftType.ChannelMessage) : value2;
}
@@ -0,0 +1,201 @@
/* Metro module 11871; source: modules/chat_input/native/accessories/ChatInputNotificationNudge.tsx; dependencies: [57, 31, 27, 3786, 4864, 11872, 661, 1376, 11873, 33, 4501, 697, 1357, 683, 10629, 4573, 5278, 11874, 1244, 11875, 5312, 566, 8869, 11883, 7013, 1365, 2] */
function _fun91025(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12057:6, offset: 0x0205085b, size: 403 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = require(31) /* metro dependency 31 */;
const env0_4 = value.useCallback;
const env0_5 = value.useEffect;
const env0_6 = (require(27) /* metro dependency 27 */).View;
const joinedThreadsStore = importDefault(3786) /* metro dependency 3786: JoinedThreadsStore */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const env0_9 = (require(11872) /* metro dependency 11872: PushNotificationPermissionStore */).PermissionPromptType;
value = require(661) /* metro dependency 661: Constants */;
const env0_10 = value.AnalyticEvents;
const env0_11 = value.NOOP;
const env0_12 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
value = require(11873) /* metro dependency 11873: NotificationPermissionConstants */;
const env0_13 = value.EventActionLocation;
const env0_14 = value.EventActionType;
const env0_15 = value.NotificationNudgeAnalyticsAction;
const env0_16 = value.NotificationNudgeSurface;
value = require(33) /* metro dependency 33 */;
const env0_17 = value.jsx;
const env0_18 = value.jsxs;
const env0_19 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun91030);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/accessories/ChatInputNotificationNudge.tsx');
exports.default = ChatInputNotificationNudge;
}
function ChatInputNotificationNudgeImpl({promptType, location, surface, body, onDismiss}) { // fn#91026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12057:1325, offset: 0x020509ee, size: 764 bytes, params: 2, frame: 33
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
const useMobileVisualRefreshConfig = mobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const enabled = Reflect.apply(useMobileVisualRefreshConfig, mobileVisualRefreshExperimentModule,
[{location: 'ChatInputNotificationNudge'}]).enabled;
const styles = useStyles(enabled);
useEffect(function() {
var defaultImport = importDefault(dependencyMap[13]);
var CONTEXTUAL_REMINDER_ACTION = AnalyticEvents.CONTEXTUAL_REMINDER_ACTION;
defaultImport.track(CONTEXTUAL_REMINDER_ACTION, {action: NotificationNudgeAnalyticsAction.IMPRESSION,
prompt_type: surface});
}, [surface]);
const items3 = [styles.container];
items3[1] = enabled && styles.containerRefreshShadow;
const BellSlashIcon = (require(10629) /* metro dependency 10629: BellSlashIcon */).BellSlashIcon;
const ICON_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.ICON_STRONG;
const items2 = [<View style={styles.iconContainer}><BellSlashIcon size="sm" color={ICON_STRONG} /></View>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant={enabled ? 'text-sm/medium' : 'text-md/medium'} color={enabled ? 'text-default' : 'text-strong'}>{body}</Text>;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const r9 = enabled ? 'text-xs/medium' : 'text-sm/semibold';
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
items2[1] = <View style={styles.contentContainer}>{text}<PressableOpacity hitSlop={8} onPress={function() {
require(dependencyMap[17]).requestPushNotificationPermission(EventActionType.ALLOW_TO_REQUEST, location, NOOP);
importDefault(dependencyMap[13]).track(AnalyticEvents.CONTEXTUAL_REMINDER_ACTION,
{action: NotificationNudgeAnalyticsAction.ACCEPT, prompt_type: surface});
}} style={styles.ctaButton} accessibilityRole="button"><Text variant={r9} color="text-brand">{Reflect.apply(string,
intl, [(require(1244) /* metro dependency 1244: indexNative */).t['+7MDbQ']])}</Text></PressableOpacity></View>;
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
string = intl.string;
const WAI6xu = (require(1244) /* metro dependency 1244: indexNative */).t.WAI6xu;
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
items2[2] = <PressableHighlight onPress={function() {
require(dependencyMap[19]).setPushPermissionReactivationSeen(promptType);
var defaultImport = importDefault(dependencyMap[13]);
var CONTEXTUAL_REMINDER_ACTION = AnalyticEvents.CONTEXTUAL_REMINDER_ACTION;
defaultImport.track(CONTEXTUAL_REMINDER_ACTION, {action: NotificationNudgeAnalyticsAction.DISMISS,
prompt_type: surface, dismiss_logic: 'relaxed'});
onDismiss();
}} hitSlop={8} accessibilityRole="button" accessibilityLabel={Reflect.apply(string, intl,
[WAI6xu])}><XSmallIcon size="sm" color="icon-subtle" /></PressableHighlight>;
return (
<View style={items3}>
{items2}
</View>
);
}
function _fun91030(a0) { // fn#91030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12057:457, offset: 0x02050e2f, size: 458 bytes, params: 2, frame: 18
const object5 = {};
const object6 = {'display': 'flex', 'flexDirection': 'row', 'padding': null, 'backgroundColor': null,
'alignItems': 'center'};
const value2 = undefined;
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object6.padding = PX_12;
const MOBILE_FLOATING_ACCESSORY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_FLOATING_ACCESSORY_BACKGROUND;
object6.backgroundColor = MOBILE_FLOATING_ACCESSORY_BACKGROUND;
const CHAT_INPUT_FLOATING_ACCESSORY_TOP_BORDER_WIDTH = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_FLOATING_ACCESSORY_TOP_BORDER_WIDTH;
object6.borderTopWidth = CHAT_INPUT_FLOATING_ACCESSORY_TOP_BORDER_WIDTH;
const MOBILE_FLOATING_ACCESSORY_BORDER = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_FLOATING_ACCESSORY_BORDER;
object6.borderColor = MOBILE_FLOATING_ACCESSORY_BORDER;
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;
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;
const CHAT_INPUT_FLOATING_ACCESSORY_MARGIN_BOTTOM = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_FLOATING_ACCESSORY_MARGIN_BOTTOM;
object6.marginBottom = CHAT_INPUT_FLOATING_ACCESSORY_MARGIN_BOTTOM;
object6.gap = a0 ? 12 : value2;
object5.container = object6;
const object7 = {};
const SHADOW_MEDIUM = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_MEDIUM;
copyDataProperties(object7, SHADOW_MEDIUM, CHAT_INPUT_FLOATING_ACCESSORY_BORDER_WIDTH);
object5.containerRefreshShadow = object7;
const object8 = {};
object8.padding = a0 ? 0 : 10;
const BACKGROUND_MOD_STRONG = a0 ? 'transparent' : (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object8.backgroundColor = BACKGROUND_MOD_STRONG;
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object5.iconContainer = object8;
PX_12 = a0 ? 0 : (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.contentContainer = {flex: 1, marginLeft: PX_12};
object5.ctaButton = {alignSelf: 'flex-start'};
return object5;
}
function ChatInputNotificationNudge({channel}) { // fn#91031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12057:2815, offset: 0x02050ff9, size: 855 bytes, params: 2, frame: 28
var r0;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
let object = [JoinedThreadsStore];
object[1] = UserGuildSettingsStore;
const r16 = !Reflect.apply(useStateFromStores, fluxModule, [object,
_fun91032]) && !(importDefault(8869) /* metro dependency 8869: useIsAppDM */)(channel);
const notificationPermissionUtilModule = require(11874) /* metro dependency 11874: NotificationPermissionUtil */;
let useShouldShowPushNotificationNudgeByPromptType = notificationPermissionUtilModule.useShouldShowPushNotificationNudgeByPromptType;
let CHANNEL_BANNER = PermissionPromptType.CHANNEL_BANNER;
const value6 = Reflect.apply(useShouldShowPushNotificationNudgeByPromptType, notificationPermissionUtilModule,
[CHANNEL_BANNER]);
const defaultImport = importDefault(11883) /* metro dependency 11883: PostReactionPermissionNudgeExperiment */;
const useConfig = defaultImport.useConfig;
const enabled = Reflect.apply(useConfig, defaultImport, [{location: 'ChatInputNotificationNudge'}]).enabled;
const moduleValue3 = notificationPermissionUtilModule;
useShouldShowPushNotificationNudgeByPromptType = moduleValue3.useShouldShowPushNotificationNudgeByPromptType;
let POST_REACTION_BANNER = PermissionPromptType.POST_REACTION_BANNER;
const value7 = Reflect.apply(useShouldShowPushNotificationNudgeByPromptType, moduleValue3, [POST_REACTION_BANNER]);
const useSelectedDismissibleContentModule = require(7013) /* metro dependency 7013: useSelectedDismissibleContent */;
let useSelectedTimeRecurringDismissibleContent = useSelectedDismissibleContentModule.useSelectedTimeRecurringDismissibleContent;
let NOTIFICATION_NUDGE_CHAT_BOTTOM_BANNER = r16 && value6 ? (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.NOTIFICATION_NUDGE_CHAT_BOTTOM_BANNER : null;
const value10 = env0_3(Reflect.apply(useSelectedTimeRecurringDismissibleContent,
useSelectedDismissibleContentModule, [NOTIFICATION_NUDGE_CHAT_BOTTOM_BANNER, {cooldownDurationMs: 604800000},
undefined, true]), 2);
const property = value10[0];
const property2 = value10[1];
const moduleValue5 = useSelectedDismissibleContentModule;
useSelectedTimeRecurringDismissibleContent = moduleValue5.useSelectedTimeRecurringDismissibleContent;
const NOTIFICATION_NUDGE_POST_REACTION_BANNER = r16 && enabled && (value7 && property == null) ? (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.NOTIFICATION_NUDGE_POST_REACTION_BANNER : null;
const value12 = env0_3(Reflect.apply(useSelectedTimeRecurringDismissibleContent, moduleValue5,
[NOTIFICATION_NUDGE_POST_REACTION_BANNER, {cooldownDurationMs: 604800000}, undefined, true]), 2);
const property3 = value12[0];
const property4 = value12[1];
const value13 = useCallback(_fun91033, [property2]);
const value14 = useCallback(_fun91034, [property4]);
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
NOTIFICATION_NUDGE_CHAT_BOTTOM_BANNER = DismissibleContent.NOTIFICATION_NUDGE_CHAT_BOTTOM_BANNER;
if (property === NOTIFICATION_NUDGE_CHAT_BOTTOM_BANNER) {
object = {};
CHANNEL_BANNER = PermissionPromptType.CHANNEL_BANNER;
object.promptType = CHANNEL_BANNER;
CHANNEL_BANNER = EventActionLocation.CHANNEL_BANNER;
object.location = CHANNEL_BANNER;
CHANNEL_BANNER = NotificationNudgeSurface.CHANNEL_BANNER;
object.surface = CHANNEL_BANNER;
object.body = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/6SnPw']);
object.onDismiss = value13;
r0 = <ChatInputNotificationNudgeImpl {...object} />;
} else if (property3 !== (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.NOTIFICATION_NUDGE_POST_REACTION_BANNER) {
r0 = null;
} else {
object = {};
POST_REACTION_BANNER = PermissionPromptType.POST_REACTION_BANNER;
object.promptType = POST_REACTION_BANNER;
object.location = EventActionLocation.POST_REACTION;
POST_REACTION_BANNER = NotificationNudgeSurface.POST_REACTION_BANNER;
object.surface = POST_REACTION_BANNER;
object.body = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.VS6ey0);
object.onDismiss = value14;
r0 = <ChatInputNotificationNudgeImpl {...object} />;
}
return r0;
}
function _fun91032() { // fn#91032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12057:2905, offset: 0x02051350, size: 86 bytes, params: 1, frame: 15
const channelBinding = channel;
return channelBinding.isThread() ? JoinedThreadsStore.isMuted(channel.id) : UserGuildSettingsStore.isChannelMuted(channelBinding.getGuildId(),
channel.id);
}
function _fun91033() { // fn#91033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12057:3639, offset: 0x020513a6, size: 29 bytes, params: 1, frame: 11
const binding = env0_1;
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
return binding(USER_DISMISS);
}
function _fun91034() { // fn#91034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12057:3672, offset: 0x020513c3, size: 29 bytes, params: 1, frame: 11
const binding = env0_2;
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
return binding(USER_DISMISS);
}
@@ -0,0 +1,188 @@
/* Metro module 11776; source: modules/chat_input/native/accessories/ChatInputSendButton.tsx; dependencies: [57, 31, 27, 4502, 7080, 11529, 33, 4501, 697, 3860, 11768, 11777, 11759, 4058, 1244, 1357, 566, 4508, 11781, 4017, 2] */
function _fun90169(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11962:6, offset: 0x0202edd0, size: 407 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const slowmodeStore = importDefault(7080) /* metro dependency 7080: SlowmodeStore */;
const env0_8 = (require(11529) /* metro dependency 11529: ChatInputConstants */).CHAT_INPUT_FLOATING_BOUNCE_ENTER_DELAY_MS;
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
object = {BUTTON_SEND: 'send-button', BUTTON_SEND_DISABLED: 'send-button-disabled',
BUTTON_SEND_VOICE_MESSAGE: 'voice-message-button',
BUTTON_SEND_VOICE_MESSAGE_DISABLED: 'voice-message-button-disabled'};
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function(a0, a1) {
var object = {};
object.button = {width: a0, height: a1};
var object3 = {};
object3.backgroundColor = importDefault(dependencyMap[8]).colors.CHAT_INPUT_SEND_BUTTON_ACTIVE_BACKGROUND;
object.buttonActive = object3;
object.iconActive = {tintColor: importDefault(dependencyMap[8]).colors.CHAT_INPUT_SEND_BUTTON_ICON_ACTIVE_TINT};
return object;
});
const env0_12 = value.memo(_fun90174);
const value3 = value.forwardRef(_fun90175);
value3.displayName = 'ChatInputSendButton';
value = value.memo(value3);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/accessories/ChatInputSendButton.tsx');
exports.default = value;
}
function renderChatInputSendButton(a0, a1, a2, a3) { // fn#90170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11962:1368, offset: 0x0202ef67, size: 56 bytes, params: 5, frame: 15
return ((Component) => <Component type={a0} state={a2} cleanup={a3} {...a1} key={a0} />)(env0_12);
}
function getChatInputSendButtonItemKey({isOnCooldown, sendVoiceMessageEnabled, sendEnabled}) { // fn#90171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11962:1458, offset: 0x0202ef9f, size: 72 bytes, params: 2, frame: 4
const binding = env0_10;
return sendVoiceMessageEnabled ? isOnCooldown ? binding.BUTTON_SEND_VOICE_MESSAGE_DISABLED : binding.BUTTON_SEND_VOICE_MESSAGE : sendEnabled ? binding.BUTTON_SEND : binding.BUTTON_SEND_DISABLED;
}
function FloatingSlot({buttonWidth, buttonHeight, buttonMargin, sendVoiceMessageEnabled, children}) { // fn#90172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11962:3201, offset: 0x0202efe7, size: 164 bytes, params: 2, frame: 21
const animatedStyle = (importDefault(11781) /* metro dependency 11781: useChatInputFloatingWidth */)({expanded: !sendVoiceMessageEnabled,
collapsedWidth: buttonHeight + 2 * buttonMargin, expandedWidth: buttonWidth + 2 * buttonMargin}).animatedStyle;
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View style={[{height: buttonHeight}, animatedStyle]}>
{children}
</View>
);
}
function _fun90174({onSendMessage, sendEnabled, isOnCooldown, channelId, state, cleanup, type, withBounce}) { // fn#90174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11962:680, offset: 0x0202f0f3, size: 467 bytes, params: 2, frame: 27
var r4;
var ChatInputActionButton;
var intl;
var value;
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
let useToken = useTokenModule.useToken;
const CHAT_INPUT_SEND_BUTTON_WIDTH = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_SEND_BUTTON_WIDTH;
const value2 = Reflect.apply(useToken, useTokenModule, [CHAT_INPUT_SEND_BUTTON_WIDTH]);
const moduleValue2 = useTokenModule;
useToken = moduleValue2.useToken;
const CHAT_INPUT_SEND_BUTTON_HEIGHT = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_SEND_BUTTON_HEIGHT;
const styles = useStyles(value2, Reflect.apply(useToken, moduleValue2, [CHAT_INPUT_SEND_BUTTON_HEIGHT]));
const BUTTON_SEND_VOICE_MESSAGE = env0_10.BUTTON_SEND_VOICE_MESSAGE;
const CHAT_INPUT_FLOATING_BOUNCE_ENTER_DELAY_MS2 = type === BUTTON_SEND_VOICE_MESSAGE || type === env0_10.BUTTON_SEND_VOICE_MESSAGE_DISABLED ? CHAT_INPUT_FLOATING_BOUNCE_ENTER_DELAY_MS : 0;
const ChatInputActionButtonTransitionItem = importDefault(11768) /* metro dependency 11768: ChatInputActionButtonTransitionItem */;
if (r4) {
value = importDefault(11777) /* metro dependency 11777: VoiceMessageButton */;
value = ((Component) => <Component disabled={isOnCooldown} channelId={channelId} />)(value);
r4 = value;
} else {
ChatInputActionButton = importDefault(11759) /* metro dependency 11759: ChatInputActionButton */;
var chatInputActionButtonProps = {active: true, style: styles.button, activeStyle: styles.buttonActive,
activeIconStyle: styles.iconActive,
IconComponent: (require(4058) /* metro dependency 4058: SendMessageIcon */).SendMessageIcon};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
chatInputActionButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.TXNS7S);
chatInputActionButtonProps.onPress = onSendMessage;
chatInputActionButtonProps.disabled = !sendEnabled;
r4 = <ChatInputActionButton {...chatInputActionButtonProps} />;
}
return (
<ChatInputActionButtonTransitionItem
cleanup={cleanup}
state={state}
withBounce={withBounce}
bounceEnterDelayMs={CHAT_INPUT_FLOATING_BOUNCE_ENTER_DELAY_MS2}
>
{r4}
</ChatInputActionButtonTransitionItem>
);
}
function _fun90175({channel, defaultValue, canSendVoiceMessage, hasPendingAttachments, hasPendingEdit, onSendMessage, requireTextContent}, a1) { // fn#90175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11962:1690, offset: 0x0202f2c6, size: 984 bytes, params: 3, frame: 32
var r5;
var value13;
var ChatInputActionButton;
var intl;
requireTextContent = !(requireTextContent === undefined) && requireTextContent;
let env0_3 = undefined;
let env0_4 = undefined;
var value;
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
let useToken = useTokenModule.useToken;
const CHAT_INPUT_SEND_BUTTON_WIDTH = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_SEND_BUTTON_WIDTH;
const value2 = Reflect.apply(useToken, useTokenModule, [CHAT_INPUT_SEND_BUTTON_WIDTH]);
const moduleValue2 = useTokenModule;
useToken = moduleValue2.useToken;
const CHAT_INPUT_SEND_BUTTON_HEIGHT = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_SEND_BUTTON_HEIGHT;
const value3 = Reflect.apply(useToken, moduleValue2, [CHAT_INPUT_SEND_BUTTON_HEIGHT]);
const moduleValue3 = useTokenModule;
useToken = moduleValue3.useToken;
const CHAT_INPUT_ACTION_BUTTON_MARGIN = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_ACTION_BUTTON_MARGIN;
const value4 = Reflect.apply(useToken, moduleValue3, [CHAT_INPUT_ACTION_BUTTON_MARGIN]);
const styles = useStyles(value2, value3);
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
const useMobileVisualRefreshConfig = mobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
let object2 = {location: 'ChatInputSendButton'};
const chatInputFloating = Reflect.apply(useMobileVisualRefreshConfig, mobileVisualRefreshExperimentModule,
[object2]).chatInputFloating;
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
let binding = env0_4;
const useState = binding.useState;
const value6 = env0_3(Reflect.apply(useState, binding, [defaultValue.length > 0]), 2);
const property = value6[0];
env0_3 = value6[1];
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SlowmodeStore], function() {
return SlowmodeStore.isChannelOnCooldown(channel);
}, [channel]);
env0_4 = value7;
let r11 = value7 ? hasPendingEdit : !value7;
if (r11) {
r5 = property || hasPendingAttachments;
r5 = !r5 ? !requireTextContent : r5;
r11 = r5;
}
let r4 = canSendVoiceMessage && !r11;
binding = env0_4;
const value11 = binding.useMemo(_fun90178, [channel.id, value7, onSendMessage, r11, r4, chatInputFloating]);
binding.useImperativeHandle(a1, _fun90179);
if (useReducedMotion) {
if (chatInputFloating) {
object2 = {};
value13 = 2 * value4;
object2.style = {width: r4 ? value3 + value13 : value2 + value13, height: value3, alignItems: 'center',
justifyContent: 'center'};
if (r4) {
value = importDefault(11777) /* metro dependency 11777: VoiceMessageButton */;
value = ((Component) => <Component disabled={value7} channelId={channel.id} />)(value);
r4 = value;
} else {
ChatInputActionButton = importDefault(11759) /* metro dependency 11759: ChatInputActionButton */;
var chatInputActionButtonProps = {active: true, style: styles.button, activeStyle: styles.buttonActive,
activeIconStyle: styles.iconActive,
IconComponent: (require(4058) /* metro dependency 4058: SendMessageIcon */).SendMessageIcon};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
chatInputActionButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.TXNS7S);
chatInputActionButtonProps.onPress = onSendMessage;
chatInputActionButtonProps.disabled = !r11;
r4 = <ChatInputActionButton {...chatInputActionButtonProps} />;
}
return (
<View {...object2}>
{r4}
</View>
);
}
}
const TransitionGroup = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionGroup;
const transitionGroup = <TransitionGroup items={value11} renderItem={renderChatInputSendButton} getItemKey={getChatInputSendButtonItemKey} />;
return chatInputFloating ? <FloatingSlot buttonWidth={value2} buttonHeight={value3} buttonMargin={value4} sendVoiceMessageEnabled={r4}>{transitionGroup}</FloatingSlot> : <View style={{width: value2 + 2 * value4,
height: value3}}>{transitionGroup}</View>;
}
function _fun90178() { // fn#90178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11962:2378, offset: 0x0202f6b9, size: 73 bytes, params: 1, frame: 3
return [{channelId: channel.id, isOnCooldown: env0_4, onSendMessage: onSendMessage, sendEnabled: env0_5,
sendVoiceMessageEnabled: env0_6, withBounce: chatInputFloating}];
}
function _fun90179() { // fn#90179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11962:2532, offset: 0x0202f702, size: 16 bytes, params: 1, frame: 2
return {setHasText: env0_3};
}
@@ -0,0 +1,548 @@
/* Metro module 11543; source: modules/chat_input/native/accessories/ChatInputSendUtils.tsx; dependencies: [5, 4645, 7080, 4644, 1878, 661, 4503, 1880, 7879, 1216, 7165, 11542, 7076, 11004, 7067, 7880, 7875, 3802, 7882, 4647, 1244, 683, 11012, 9587, 4080, 11544, 1962, 4697, 4655, 6789, 10658, 8050, 11573, 5068, 2] */
function _fun88458(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11729:6, offset: 0x01fe3a07, size: 378 bytes, params: 8, frame: 21
const env0_0 = require;
const _arrayLikeToArray_88461 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const closure = chatInputValidateContentLength;
const closure2 = showFileSizeExceededAlert;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = (require(4645) /* metro dependency 4645: DraftStore */).DraftType;
const slowmodeStore = importDefault(7080) /* metro dependency 7080: SlowmodeStore */;
const uploadAttachmentStore = importDefault(4644) /* metro dependency 4644: UploadAttachmentStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_8 = constantsModule.AnalyticEvents;
const env0_9 = constantsModule.AnalyticsSections;
const env0_10 = constantsModule.UpsellTypes;
const env0_11 = (require(4503) /* metro dependency 4503: MessageConstants */).MessageSendLocation;
const env0_12 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumUpsellTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/accessories/ChatInputSendUtils.tsx');
exports.chatInputValidateContentLength = closure;
exports.chatInputHandleSendText = chatInputHandleSendText;
exports.chatInputCreateThread = chatInputCreateThread;
exports.showFileSizeExceededAlert = closure2;
exports.chatInputSendApplicationCommand = function() {
return _chatInputSendApplicationCommand.apply(this, arguments);
};
}
function _createForOfIteratorHelperLoose_88459(a0, a1) { // fn#88459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11729:290, offset: 0x01fe3b81, 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)) {
if (r1) {
}
return _fun88460;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_88461(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') {
value = _arrayLikeToArray_88461(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_88461(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun88460;
}
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 chatInputSendMessage({text, parsedMessage, tts, source, params}) { // fn#88462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11729:1200, offset: 0x01fe3cf5, size: 740 bytes, params: 2, frame: 28
var r9;
var r4;
var r5;
var r12;
var r8;
var content;
var value7;
var defaultImport5;
tts = !(tts === undefined) && tts;
const channel = params.channel;
const chatInputRef = params.chatInputRef;
const hasAttachmentsToUpload = params.hasAttachmentsToUpload;
const pendingReply = params.pendingReply;
const env0_2 = params.analyticsLocations;
if (text === '') {
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).addBreadcrumb({message: 'Empty text from ' + source});
}
const defaultImport2 = importDefault(7165) /* metro dependency 7165: DraftActionCreators */;
const saveDraft = defaultImport2.saveDraft;
let id = channel.id;
const ChannelMessage = DraftType.ChannelMessage;
Reflect.apply(saveDraft, defaultImport2, [id, '', ChannelMessage]);
let current = chatInputRef.current;
if (current != null) {
current.clearText();
}
current = chatInputRef.current;
if (current != null) {
current.showSideActions();
}
const legacyCommandsModule = require(11542) /* metro dependency 11542: LegacyCommands */;
const value5 = legacyCommandsModule.handleLegacyCommands(text, {channel: channel, isEdit: false});
if (value5 == null) {
r4 = tts;
r5 = parsedMessage;
r12 = text;
} else {
content = value5.content;
if (content == null) {
r9 = text;
} else {
content = value5.content;
parsedMessage = undefined;
r9 = content;
}
tts = value5.tts ?? tts;
r4 = tts;
r5 = parsedMessage;
r12 = r9;
}
r5 = r5 ?? (importDefault(7076) /* metro dependency 7076: MessageParser */).parse(channel, r12);
r5.tts = r4;
const pendingReplyActionCreatorsModule = require(11004) /* metro dependency 11004: PendingReplyActionCreators */;
pendingReplyActionCreatorsModule.deletePendingReply(channel.id);
const object2 = {};
const defaultImport4 = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
const getSendMessageOptionsForReply = defaultImport4.getSendMessageOptionsForReply;
copyDataProperties(object2, Reflect.apply(getSendMessageOptionsForReply, defaultImport4, [pendingReply]), undefined);
const CHAT_INPUT = MessageSendLocation.CHAT_INPUT;
object2['location'] = CHAT_INPUT;
id = channel.id;
if (hasAttachmentsToUpload) {
value7 = UploadAttachmentStore.getUploads(id, DraftType.ChannelMessage);
if (value7 == null) {
r9 = [];
} else {
defaultImport5 = importDefault(7879) /* metro dependency 7879: UploadAttachmentActionCreators */;
defaultImport5.clearAll(id, DraftType.ChannelMessage);
r9 = value7;
}
r8 = r9;
} else {
r8 = [];
}
if (!(hasAttachmentsToUpload || r5.content !== '')) {
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).addBreadcrumb({message: 'Parsed empty message content from text',
data: {text: r12}});
}
const defaultImport7 = defaultImport4;
const sendMessage = defaultImport7.sendMessage;
id = channel.id;
const object3 = {};
copyDataProperties(object3, object2, undefined);
object3['attachmentsToUpload'] = r8;
object3['onAttachmentUploadError'] = chatInputSendMessageOnAttachmentUploadError;
Reflect.apply(sendMessage, defaultImport7, [id, r5, undefined, object3]);
}
function chatInputValidateContentLength({text, params}) { // fn#88464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11729:2484, offset: 0x01fe40c4, size: 454 bytes, params: 2, frame: 25
var object2;
var defaultImport4;
var show;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var formatToPlainString;
var FfjF15;
var object4;
var defaultImport5;
const channel = params.channel;
const analyticsLocations = params.analyticsLocations;
const value2 = (importDefault(7076) /* metro dependency 7076: MessageParser */).parse(channel, text);
const length = value2.content.length;
const useMessageMaxLengthModule = require(7875) /* metro dependency 7875: useMessageMaxLength */;
const getMaxMessageLength = useMessageMaxLengthModule.getMaxMessageLength;
if (length <= Reflect.apply(getMaxMessageLength, useMessageMaxLengthModule, [])) {
return value2;
}
const defaultImport2 = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
const canUseIncreasedMessageLength = defaultImport2.canUseIncreasedMessageLength;
const getCurrentUser = UserStore.getCurrentUser;
if (Reflect.apply(canUseIncreasedMessageLength, defaultImport2, [Reflect.apply(getCurrentUser, UserStore, [])])) {
defaultImport4 = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport4.show;
object2 = {};
object2.title = intl.string(t.l8rYLt);
formatToPlainString = intl.formatToPlainString;
FfjF15 = t.FfjF15;
object4 = {currentLength: length};
object4.maxLength = useMessageMaxLengthModule.getMaxMessageLength();
object2.body = Reflect.apply(formatToPlainString, intl, [FfjF15, object4]);
Reflect.apply(show, defaultImport4, [object2]);
defaultImport5 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport5.track(AnalyticEvents.OPEN_MODAL, {type: 'Message Too Long Alert iOS',
message_content_length: length});
} else {
(importDefault(7882) /* metro dependency 7882: PremiumUpsellUtils */).handleShowUpsellAlert({initialUpsellKey: UpsellTypes.LONGER_MESSAGE,
analyticsLocation: {}, analyticsLocations: analyticsLocations,
analyticsProperties: {type: PremiumUpsellTypes.MESSAGE_LENGTH_UPSELL}});
}
}
function showFileSizeExceededAlert(a0, a1) { // fn#88465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11729:3166, offset: 0x01fe428a, size: 434 bytes, params: 3, frame: 20
var defaultImport2;
var handleShowUpsellAlert;
var object2;
var FILE_UPLOAD_POPOUT;
var kestrelConfig;
var defaultImport3;
var show;
var enabled;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var formatToPlainString;
var fxEKdS;
var object3;
const currentUser = UserStore.getCurrentUser();
const defaultImport = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
if (defaultImport.canUploadLargeFiles(currentUser)) {
kestrelConfig = (require(4697) /* metro dependency 4697: KestrelExperiment */).getKestrelConfig({location: 'native.showFileSizeExceededAlert'});
defaultImport3 = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport3.show;
object2 = {};
enabled = kestrelConfig.enabled;
string = intl.string;
object2.title = enabled ? Reflect.apply(string, intl, [t.bRYgjH]) : Reflect.apply(string, intl, [t['/tGlcj']]);
formatToPlainString = intl.formatToPlainString;
fxEKdS = t.fxEKdS;
object3 = {};
object3.maxSize = (require(4655) /* metro dependency 4655: FileUtils */).sizeString(a0);
object2.body = Reflect.apply(formatToPlainString, intl, [fxEKdS, object3]);
Reflect.apply(show, defaultImport3, [object2]);
} else {
defaultImport2 = importDefault(7882) /* metro dependency 7882: PremiumUpsellUtils */;
handleShowUpsellAlert = defaultImport2.handleShowUpsellAlert;
object2 = {};
object2.initialUpsellKey = UpsellTypes.UPLOAD;
FILE_UPLOAD_POPOUT = AnalyticsSections.FILE_UPLOAD_POPOUT;
object2.analyticsLocation = {section: FILE_UPLOAD_POPOUT};
FILE_UPLOAD_POPOUT = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).FILE_UPLOAD_POPOUT;
object2.analyticsLocations = [FILE_UPLOAD_POPOUT];
object2.analyticsProperties = {type: PremiumUpsellTypes.UPLOAD_ERROR_UPSELL};
object2.largestFileSize = a1;
Reflect.apply(handleShowUpsellAlert, defaultImport2, [object2]);
}
}
function _chatInputSendApplicationCommand() { // fn#88466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11729:3791, offset: 0x01fe443c, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun88468).apply(this, arguments);
}
function chatInputHandleSendText({text, params}) { // fn#88469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11729:4740, offset: 0x01fe460b, size: 655 bytes, params: 2, frame: 28
var environment;
var r6;
var chatInputValidateContentLengthBinding;
var object2;
var value2;
var _createForOfIteratorHelperLoose_88459Binding;
var RESTRICTIONS;
var value3;
var value4;
var done;
var value5;
var check;
var getGuildId;
var value6;
var value7;
var defaultImport;
var show;
const intl = require(dependencyMap[20]).intl;
var string;
const t = require(dependencyMap[20]).t;
var getUploads;
var id;
var ChannelMessage;
var value8;
var moduleValue;
var shouldShowAddMediaToOriginalPostModal;
var defaultImport2;
var openLazy;
var property;
var paths;
var env0_2;
const channel = params.channel;
const hasAttachmentsToUpload = params.hasAttachmentsToUpload;
let value = environment;
if (!SlowmodeStore.isChannelOnCooldown(channel)) {
reducibleJoin12: while (true) {
reducibleJoin3: while (true) {
if (text.length !== 0) {
break reducibleJoin3;
}
if (hasAttachmentsToUpload) {
break reducibleJoin3;
}
break reducibleJoin12;
}
chatInputValidateContentLengthBinding = chatInputValidateContentLength;
object2 = {text: text, params: params};
value2 = chatInputValidateContentLengthBinding(object2);
env0_2 = value2;
if (value2 == null) {
break reducibleJoin12;
}
_createForOfIteratorHelperLoose_88459Binding = _createForOfIteratorHelperLoose_88459;
RESTRICTIONS = require(dependencyMap[22]).RESTRICTIONS;
value3 = _createForOfIteratorHelperLoose_88459Binding(RESTRICTIONS);
value4 = value3();
done = value4.done;
if (!done) {
r6 = value4;
reducibleLoop5: while (true) {
value5 = r6.value;
check = value5.check;
getGuildId = channel.getGuildId;
value6 = check(text, channel, Reflect.apply(getGuildId, channel, []) != null);
if (value6 !== false) {
defaultImport = importDefault(dependencyMap[19]);
show = defaultImport.show;
object2 = {};
string = intl.string;
object2.title = Reflect.apply(string, intl, [t.mY3Y38]);
object2.body = value6.body;
string = intl.string;
object2.confirmText = Reflect.apply(string, intl, [t.KJnHq3]);
object2.onConfirm = onConfirm;
string = intl.string;
object2.cancelText = Reflect.apply(string, intl, [t.fsBWmS]);
Reflect.apply(show, defaultImport, [object2]);
return undefined;
}
value7 = value3();
done = value7.done;
if (done) {
break reducibleLoop5;
}
r6 = value7;
continue reducibleLoop5;
}
}
getUploads = UploadAttachmentStore.getUploads;
id = channel.id;
ChannelMessage = DraftType.ChannelMessage;
value8 = Reflect.apply(getUploads, UploadAttachmentStore, [id, ChannelMessage]);
if (value8 != null) {
moduleValue = require(dependencyMap[23]);
shouldShowAddMediaToOriginalPostModal = moduleValue.shouldShowAddMediaToOriginalPostModal;
id = channel.id;
if (Reflect.apply(shouldShowAddMediaToOriginalPostModal, moduleValue, [value8, id])) {
defaultImport2 = importDefault(dependencyMap[24]);
openLazy = defaultImport2.openLazy;
value = require(dependencyMap[26]);
property = dependencyMap[25];
paths = dependencyMap.paths;
value = value(property, paths);
id = channel.id;
Reflect.apply(openLazy, defaultImport2, [value, 'add-media-to-original-forum-post', {threadId: id,
attachments: value8, sendMessage: sendMessage_88471}]);
break reducibleJoin12;
}
}
chatInputSendMessage({text: text, parsedMessage: value2, tts: undefined, source: 'handleSendMessage',
params: params});
break reducibleJoin12;
}
}
}
function chatInputCreateThread({text, threadCreationCallback}) { // fn#88472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11729:5871, offset: 0x01fe4916, size: 185 bytes, params: 2, frame: 16
var defaultImport;
const length = text.length;
const useMessageMaxLengthModule = require(7875) /* metro dependency 7875: useMessageMaxLength */;
const getMaxMessageLength = useMessageMaxLengthModule.getMaxMessageLength;
if (length > Reflect.apply(getMaxMessageLength, useMessageMaxLengthModule, [])) {
defaultImport = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
if (defaultImport.canUseIncreasedMessageLength(UserStore.getCurrentUser())) {
threadCreationCallback(text);
return undefined;
}
(importDefault(7882) /* metro dependency 7882: PremiumUpsellUtils */).handleShowUpsellAlert({initialUpsellKey: UpsellTypes.LONGER_MESSAGE,
analyticsProperties: {type: PremiumUpsellTypes.MESSAGE_LENGTH_UPSELL}});
} else {
threadCreationCallback(text);
}
}
function chatInputSendMessageOnAttachmentUploadError(a0, a1, a2) { // fn#88463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11729:2207, owner: chatInputSendMessage.onAttachmentUploadError, offset: 0x01fe3fd9, size: 235 bytes, params: 4, frame: 20
var defaultImport;
var setUploads;
var id;
var ChannelMessage;
var defaultImport2;
var saveDraft;
var binding;
const handleUploadAttachmentErrorsNativeModule = require(7880) /* metro dependency 7880: handleUploadAttachmentErrorsNative */;
const handleUploadMessageAttachmentsErrors = handleUploadAttachmentErrorsNativeModule.handleUploadMessageAttachmentsErrors;
const object2 = {file: a0};
object2.guildId = channel.getGuildId();
object2.analyticsLocations = analyticsLocations;
object2.code = a1;
object2.reason = a2;
if (Reflect.apply(handleUploadMessageAttachmentsErrors, handleUploadAttachmentErrorsNativeModule,
[object2]) && env0_3.length > 0) {
defaultImport = importDefault(7879) /* metro dependency 7879: UploadAttachmentActionCreators */;
setUploads = defaultImport.setUploads;
channelBinding = channel;
id = channelBinding.id;
ChannelMessage = DraftType.ChannelMessage;
Reflect.apply(setUploads, defaultImport, [{channelId: id, uploads: env0_3, draftType: ChannelMessage,
resetState: true}]);
defaultImport2 = importDefault(7165) /* metro dependency 7165: DraftActionCreators */;
saveDraft = defaultImport2.saveDraft;
id = channelBinding.id;
binding = env0_0;
ChannelMessage = DraftType.ChannelMessage;
Reflect.apply(saveDraft, defaultImport2, [id, binding, ChannelMessage]);
}
}
async function _fun88468({applicationCommand, params}) { // fn#88468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11729:3878, offset: 0x01fe4482, size: 393 bytes, params: 2, frame: 22
var binding2;
var value7;
var value8;
var value9;
var inputType;
if (true) {
var command = applicationCommand.command;
var optionValues = applicationCommand.optionValues;
await undefined;
if (false) {
return undefined;
}
var channel = params.channel;
var current = params.chatInputRef.current;
if (current != null) {
current.clearText();
}
value = environment.__proto__.__proto__;
var binding = env2_0;
var value4 = binding(env2_2[30]);
var installApplicationOnDemandIfNeeded = value4.installApplicationOnDemandIfNeeded;
var object2 = {};
object2.applicationId = command.applicationId;
object2.channel = params.channel;
object2.commandIntegrationTypes = command.integration_types;
await Reflect.apply(installApplicationOnDemandIfNeeded, value4, [object2]);
if (false) {
return undefined;
}
if (undefined.isAuthorized) {
binding = env2_1;
binding2 = env2_2;
value7 = binding(binding2[31]);
object2 = {command: command, optionValues: optionValues};
binding = env2_0;
value8 = binding(binding2[32]);
object2.context = value8.getCommandContext({channel: channel, type: 'channel'});
object2.maxSizeCallback = env2_17;
await value7(object2);
value9 = undefined;
if (false) {
return value9;
}
inputType = command.inputType;
binding = env2_0;
if (inputType === binding(env2_2[33]).ApplicationCommandInputType.BUILT_IN_TEXT && value9 != null) {
env2_15({text: value9.content, parsedMessage: undefined, tts: value9.tts,
source: 'handleSendApplicationCommand',
params: params});
}
}
}
}
function chatInputHandleSendTextOnConfirm() { // fn#88470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11729:5247, owner: chatInputHandleSendText.onConfirm, offset: 0x01fe489a, size: 62 bytes, params: 1, frame: 13
chatInputSendMessage({text: text, parsedMessage: env0_2, tts: undefined, source: 'alert onConfirm', params: params});
}
function chatInputHandleSendTextSendMessage() { // fn#88471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11729:5626, owner: chatInputHandleSendText.sendMessage, offset: 0x01fe48d8, size: 62 bytes, params: 1, frame: 13
chatInputSendMessage({text: text, parsedMessage: env0_2, tts: undefined,
source: 'AddMediaToOriginalForumPostActionSheet', params: params});
}
@@ -0,0 +1,96 @@
/* Metro module 11759; source: modules/chat_input/native/action_buttons/ChatInputActionButton.tsx; dependencies: [31, 27, 33, 4501, 697, 1357, 3860, 5278, 2] */
function _fun90089(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11945:6, offset: 0x0202a558, size: 214 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).StyleSheet;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun90090);
value = value.memo(value.forwardRef(_fun90091));
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/action_buttons/ChatInputActionButton.tsx');
exports.default = value;
}
function _fun90090(a0, a1, a2) { // fn#90090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11945:165, offset: 0x0202a62e, size: 313 bytes, params: 4, frame: 18
const object4 = {};
const object5 = {};
const value2 = undefined;
const radii = (importDefault(697) /* metro dependency 697: native */).radii;
object5.borderRadius = a0 ? radii.sm : radii.round;
object5.height = a1;
object5.width = a1;
object5.marginHorizontal = a2;
object5.flexShrink = 0;
object5.flexDirection = 'row';
object5.alignItems = 'center';
object5.justifyContent = 'center';
const REDESIGN_BUTTON_TERTIARY_BACKGROUND = a0 ? value2 : (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object5.backgroundColor = REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object4.actionButton = object5;
const object6 = {};
const CHAT_INPUT_ACTION_BUTTON_ICON_DEFAULT_TINT = (importDefault(697) /* metro dependency 697: native */).colors.CHAT_INPUT_ACTION_BUTTON_ICON_DEFAULT_TINT;
object6.tintColor = CHAT_INPUT_ACTION_BUTTON_ICON_DEFAULT_TINT;
let CHAT_INPUT_ACTION_ICON_PIXEL_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_ACTION_ICON_PIXEL_SIZE;
object6.width = CHAT_INPUT_ACTION_ICON_PIXEL_SIZE;
CHAT_INPUT_ACTION_ICON_PIXEL_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_ACTION_ICON_PIXEL_SIZE;
object6.height = CHAT_INPUT_ACTION_ICON_PIXEL_SIZE;
object4.actionButtonIcon = object6;
const REDESIGN_BUTTON_TERTIARY_PRESSED_TEXT = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_PRESSED_TEXT;
object4.actionButtonIconActive = {tintColor: REDESIGN_BUTTON_TERTIARY_PRESSED_TEXT};
const ICON_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.ICON_MUTED;
object4.actionButtonIconDisabled = {tintColor: ICON_MUTED};
return object4;
}
function _fun90091({active, style, activeStyle, activeIconStyle, disabled, onPress, accessible, accessibilityLabel, accessibilityHint, accessibilityState, accessibilityActions, onAccessibilityAction, IconComponent}, a1) { // fn#90091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11945:817, offset: 0x0202a767, size: 633 bytes, params: 3, frame: 36
active = !(active === undefined) && active;
const {enabled,
chatInputFloating} = (require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */).useMobileVisualRefreshConfig({location: 'ChatInputActionButton'});
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
let useToken = useTokenModule.useToken;
const CHAT_INPUT_ACTION_BUTTON_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_ACTION_BUTTON_SIZE;
const value5 = Reflect.apply(useToken, useTokenModule, [CHAT_INPUT_ACTION_BUTTON_SIZE]);
const moduleValue3 = useTokenModule;
useToken = moduleValue3.useToken;
const CHAT_INPUT_ACTION_BUTTON_MARGIN = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_ACTION_BUTTON_MARGIN;
const value6 = Reflect.apply(useToken, moduleValue3, [CHAT_INPUT_ACTION_BUTTON_MARGIN]);
const moduleValue4 = useTokenModule;
useToken = moduleValue4.useToken;
const CHAT_INPUT_ACTION_BUTTON_MIN_TOUCH_TARGET_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_ACTION_BUTTON_MIN_TOUCH_TARGET_SIZE;
const value7 = Reflect.apply(useToken, moduleValue4, [CHAT_INPUT_ACTION_BUTTON_MIN_TOUCH_TARGET_SIZE]);
const styles = useStyles(enabled, value5, value6);
const r1 = chatInputFloating ? StyleSheet.flatten(style)?.height : undefined;
const r0 = typeof r1 !== 'number' ? value5 : r1;
const Math = global.Math;
const value9 = Math.max(0, (value7 - r0) / 2);
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const items2 = [styles.actionButton, style];
items2[2] = active && !disabled && activeStyle;
const r17 = value9 > 0 ? value9 : undefined;
const object = {disabled: disabled};
copyDataProperties(object, accessibilityState, undefined);
return (
<PressableOpacity
ref={a1}
style={items2}
hitSlop={r17}
disabled={disabled}
accessible={accessible}
accessibilityRole="button"
accessibilityState={object}
accessibilityLabel={accessibilityLabel}
accessibilityHint={accessibilityHint}
accessibilityActions={accessibilityActions}
onAccessibilityAction={onAccessibilityAction}
onPress={onPress}
>
<IconComponent
size="custom"
style={[styles.actionButtonIcon, active && styles.actionButtonIconActive, active && activeIconStyle,
disabled && styles.actionButtonIconDisabled]}
/>
</PressableOpacity>
);
}
@@ -0,0 +1,133 @@
/* Metro module 11763; source: modules/chat_input/native/action_buttons/ChatInputActionButtonApps.tsx; dependencies: [31, 27, 11529, 33, 11584, 11640, 11764, 11759, 4570, 11766, 1244, 2] */
function _fun90098(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11949:6, offset: 0x0202ad5f, size: 204 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(11529) /* metro dependency 11529: ChatInputConstants */).ChatInputActionType;
const value2 = require(33) /* metro dependency 33 */;
const env0_6 = value2.jsx;
const env0_7 = value2.jsxs;
value = value.memo(ChatInputActionButtonApps);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/action_buttons/ChatInputActionButtonApps.tsx');
exports.default = value;
}
function ChatInputActionButtonApps({accessible, active, disabled, styleButton, styleActive, styleActiveIcon, channel, onPress}) { // fn#90099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11949:194, offset: 0x0202ae2b, size: 525 bytes, params: 2, frame: 29
let binding = env0_3;
const value4 = binding.useRef(null);
const value5 = (importDefault(11584) /* metro dependency 11584: useCanShowAppLauncherOnboarding */)({channelId: channel.id});
const canShowOnboarding = value5.canShowOnboarding;
const canShowBotsBanner = value5.canShowBotsBanner;
var env0_3 = canShowBotsBanner;
const canShowAppsOrActivitiesBanner = value5.canShowAppsOrActivitiesBanner;
const fromTriggeredOnboarding = value5.fromTriggeredOnboarding;
const willShowGlobalSearchOnboarding = value5.willShowGlobalSearchOnboarding;
const r6 = canShowOnboarding && !fromTriggeredOnboarding;
binding = env0_3;
const env0_7 = binding.useRef(-1);
binding.useEffect(_fun90100, [r6, canShowAppsOrActivitiesBanner, canShowBotsBanner, channel?.guild_id, channel.id,
willShowGlobalSearchOnboarding]);
const r5 = r6 ? active ? null : ((AppLauncherOnboardingChatInputButtonAnimation) => <AppLauncherOnboardingChatInputButtonAnimation channelId={channel.id} />)((require(11764) /* metro dependency 11764: AppLauncherOnboardingChatInputButtonAnimation */).AppLauncherOnboardingChatInputButtonAnimation) : null;
const ChatInputActionButton = importDefault(11759) /* metro dependency 11759: ChatInputActionButton */;
const object = {ref: value4, accessible: accessible, style: styleButton, disabled: disabled, active: active,
activeIconStyle: styleActiveIcon, activeStyle: styleActive, onPress: onPress_90102};
const AppLauncherButtonIcon = (require(11766) /* metro dependency 11766: AppLauncherButtonIcon */).AppLauncherButtonIcon;
object.IconComponent = AppLauncherButtonIcon;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rugBPp);
object.accessibilityState = {expanded: active};
return (
<View>
{r5}
<ChatInputActionButton {...object} />
</View>
);
}
function _fun90100() { // fn#90100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11949:564, offset: 0x0202b038, size: 466 bytes, params: 1, frame: 17
var environment;
var value2;
var value3;
var moduleValue;
var setTriggeredOnboardingContentMetadata;
var object2;
var channelBinding;
var value4;
var value5;
var moduleValue2;
var value6;
var value7;
var moduleValue3;
var binding;
var setTimeout;
if (env0_6) {
if (canShowBotsBanner) {
value4 = environment.__proto__;
value5 = undefined;
moduleValue2 = require(11640) /* metro dependency 11640: AppLauncherOnboardingActionCreators */;
setTriggeredOnboardingContentMetadata = moduleValue2.setTriggeredOnboardingContentMetadata;
object2 = {};
channelBinding = channel;
object2.channelId = channelBinding.id;
object2.timeMs = global.Date.now();
object2.guildId = channelBinding == null ? value5 : channel.guild_id;
object2.canShowBotsBanner = true;
object2.canShowAppsOrActivitiesBanner = false;
object2.willShowGlobalSearchOnboarding = willShowGlobalSearchOnboarding;
Reflect.apply(setTriggeredOnboardingContentMetadata, moduleValue2, [object2]);
} else if (canShowAppsOrActivitiesBanner) {
value2 = environment.__proto__;
value3 = undefined;
moduleValue = require(11640) /* metro dependency 11640: AppLauncherOnboardingActionCreators */;
setTriggeredOnboardingContentMetadata = moduleValue.setTriggeredOnboardingContentMetadata;
object2 = {};
channelBinding = channel;
object2.channelId = channelBinding.id;
object2.timeMs = global.Date.now();
object2.guildId = channelBinding == null ? value3 : channel.guild_id;
object2.canShowBotsBanner = false;
object2.canShowAppsOrActivitiesBanner = true;
object2.willShowGlobalSearchOnboarding = willShowGlobalSearchOnboarding;
Reflect.apply(setTriggeredOnboardingContentMetadata, moduleValue, [object2]);
}
if (willShowGlobalSearchOnboarding) {
value6 = environment.__proto__;
value7 = undefined;
moduleValue3 = require(11640) /* metro dependency 11640: AppLauncherOnboardingActionCreators */;
setTriggeredOnboardingContentMetadata = moduleValue3.setTriggeredOnboardingContentMetadata;
object2 = {};
channelBinding = channel;
object2.channelId = channelBinding.id;
object2.timeMs = global.Date.now();
object2.guildId = channelBinding == null ? value7 : channel.guild_id;
object2.canShowAppsOrActivitiesBanner = canShowAppsOrActivitiesBanner;
object2.canShowBotsBanner = canShowBotsBanner;
object2.willShowGlobalSearchOnboarding = true;
Reflect.apply(setTriggeredOnboardingContentMetadata, moduleValue3, [object2]);
}
binding = env0_7;
setTimeout = global.setTimeout;
value = environment.__proto__;
binding.current = setTimeout(_fun90101,
(require(11764) /* metro dependency 11764: AppLauncherOnboardingChatInputButtonAnimation */).APP_LAUNCHER_ONBOARDING_CHAT_INPUT_BUTTON_ANIMATION_DURATION_MS);
}
}
function ChatInputActionButtonAppsOnPress(a0) { // fn#90102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11949:1562, owner: ChatInputActionButtonApps.onPress, offset: 0x0202b22f, size: 97 bytes, params: 2, frame: 16
const clearTimeout = global.clearTimeout;
clearTimeout(env0_7.current);
const onPressBinding = onPress;
const APPS = ChatInputActionType.APPS;
const binding = env0_2;
onPressBinding(a0, APPS, binding);
const value = require(4570) /* metro dependency 4570: setAccessibilityFocusAndroid */;
value.setAccessibilityFocus({ref: binding});
}
function _fun90101() { // fn#90101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11949:1211, offset: 0x0202b20a, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
(require(11640) /* metro dependency 11640: AppLauncherOnboardingActionCreators */).setLastSeenTimeMs();
}
@@ -0,0 +1,172 @@
/* Metro module 11770; source: modules/chat_input/native/action_buttons/ChatInputActionButtonGift.tsx; dependencies: [57, 31, 27, 4502, 7261, 11529, 1376, 33, 4501, 697, 566, 1357, 7583, 1861, 7013, 1365, 11771, 10112, 1244, 4589, 11759, 1367, 11772, 2] */
function _fun90137(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11956:6, offset: 0x0202d262, size: 307 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const promotionsStore = importDefault(7261) /* metro dependency 7261: PromotionsStore */;
const env0_8 = (require(11529) /* metro dependency 11529: ChatInputConstants */).ChatInputActionType;
const env0_9 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
const value2 = require(33) /* metro dependency 33 */;
const env0_10 = value2.jsx;
const env0_11 = value2.jsxs;
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun90138);
value = value.memo(ChatInputActionButtonGift);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/action_buttons/ChatInputActionButtonGift.tsx');
exports.default = value;
}
function _fun90138() { // fn#90138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11956:269, offset: 0x0202d395, size: 168 bytes, params: 1, frame: 15
const object4 = {};
const object5 = {'position': 'absolute', 'top': 0, 'left': null, 'right': null, 'bottom': 0};
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object5.left = PX_4;
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object5.right = PX_4;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object4.gradientContainer = object5;
const object6 = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object4.gradientContainerRefresh = object6;
object4.transparentBackground = {backgroundColor: 'transparent'};
return object4;
}
function ChatInputActionButtonGift({accessible, disabled, channel, onPress, style, styleButton}) { // fn#90139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11956:591, offset: 0x0202d43d, size: 1242 bytes, params: 2, frame: 41
var r7;
var items2;
var ChatInputActionButton;
var object4;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var PremiumAnimatedGiftButton;
let binding = env0_4;
const value4 = binding.useRef(null);
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
const useMobileVisualRefreshConfig = mobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const enabled = Reflect.apply(useMobileVisualRefreshConfig, mobileVisualRefreshExperimentModule,
[{location: 'ChatInputActionButtonGift'}]).enabled;
const styles = useStyles();
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PromotionsStore], _fun90141);
const env0_3 = value5;
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PromotionsStore], _fun90142);
var env0_4 = value6;
const boxAnimationUrl = value5?.boxAnimationUrl;
const trinketAnimationUrl = value5?.trinketAnimationUrl;
const gradient = value5?.gradient;
const isNullOrEmpty2 = (require(1861) /* metro dependency 1861: StringUtils */).isNullOrEmpty(boxAnimationUrl);
const value7 = !isNullOrEmpty2;
let r5 = !(require(1861) /* metro dependency 1861: StringUtils */).isNullOrEmpty(trinketAnimationUrl) && !value7;
binding = env0_4;
let [property, env0_5] = env0_3(binding.useState(false), 2);
const value12 = binding.useCallback(_fun90143, []);
const useSelectedDismissibleContentModule = require(7013) /* metro dependency 7013: useSelectedDismissibleContent */;
const useSelectedSnowflakeBoundDismissibleContent = useSelectedDismissibleContentModule.useSelectedSnowflakeBoundDismissibleContent;
let GIFTING_PROMOTION_ICON = isNullOrEmpty2 ? r5 ? property ? null : (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.GIFTING_PROMOTION_ICON : null : property ? null : (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.GIFTING_PROMOTION_ICON;
const value14 = env0_3(Reflect.apply(useSelectedSnowflakeBoundDismissibleContent,
useSelectedDismissibleContentModule, [GIFTING_PROMOTION_ICON, value6, undefined, true]), 2);
property = value14[0];
const env0_6 = value14[1];
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
GIFTING_PROMOTION_ICON = DismissibleContent.GIFTING_PROMOTION_ICON;
const value15 = property === GIFTING_PROMOTION_ICON;
const r4 = isNullOrEmpty2 ? value7 : value15;
r5 = r5 && value15;
let r22 = gradient != null && gradient.colors.length > 0 && r5;
env0_4.useEffect(_fun90144, [r4, value15, r5, useReducedMotion]);
if (r4) {
PremiumAnimatedGiftButton = (require(11771) /* metro dependency 11771: PremiumAnimatedGiftButton */).PremiumAnimatedGiftButton;
r7 = <PremiumAnimatedGiftButton channelId={channel.id} animationDataUrl={boxAnimationUrl} disabled={disabled} active={false} loop={false} onPress={onPress_90146} onAnimationFinished={value12} IconComponent={(require(10112) /* metro dependency 10112: GiftIcon */).GiftIcon} accessible={accessible} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Z1RnTk)} />;
} else {
items2 = [r22 && ((Component) => <Component style={enabled ? styles.gradientContainerRefresh : styles.gradientContainer} useAngle angle={gradient.angle ?? 180} angleCenter={{'x': 0.5,
'y': 0.5}} colors={gradient.colors} />)(importDefault(4589) /* metro dependency 4589 */)];
ChatInputActionButton = importDefault(11759) /* metro dependency 11759: ChatInputActionButton */;
r22 = r22 && styles.transparentBackground;
items2[1] = <ChatInputActionButton ref={value4} style={[styleButton,
r22]} disabled={disabled} accessible={accessible} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Z1RnTk)} active={false} IconComponent={(require(10112) /* metro dependency 10112: GiftIcon */).GiftIcon} onPress={onPress_90147} />;
r7 = <View>{items2}</View>;
}
r5 = r5 && ((GiftIconTrinketsAnimation) => <GiftIconTrinketsAnimation trinketsAnimationUrl={trinketAnimationUrl} />)((require(11772) /* metro dependency 11772: GiftIconTrinketsAnimation */).GiftIconTrinketsAnimation);
return (
<View style={style}>
{r7}
{r5}
</View>
);
}
function _fun90141() { // fn#90141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11956:907, offset: 0x0202d917, size: 111 bytes, params: 1, frame: 13
var giftIcon;
var properties;
let value = environment.__proto__;
const getMarketingComponentByType = PromotionsStore.getMarketingComponentByType;
const MarketingComponentType = (require(7583) /* metro dependency 7583: MarketingComponentType */).MarketingComponentType;
const GIFT_ICON = MarketingComponentType.GIFT_ICON;
value = Reflect.apply(getMarketingComponentByType, PromotionsStore, [GIFT_ICON]);
const value2 = null;
if (value2 != value) {
properties = value.properties;
properties = properties.properties;
if (properties.oneofKind !== 'giftIcon') {
giftIcon = value2;
} else {
properties = value.properties;
properties = properties.properties;
giftIcon = properties.giftIcon;
}
} else {
giftIcon = value2;
}
return giftIcon;
}
function _fun90142() { // fn#90142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11956:1130, offset: 0x0202d986, size: 49 bytes, params: 1, frame: 11
const value = environment.__proto__;
return PromotionsStore.getGiftPromotion()?.id ?? '';
}
function _fun90143(a0) { // fn#90143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11956:1432, offset: 0x0202d9b7, size: 26 bytes, params: 2, frame: 11
if (!a0) {
env0_5(true);
}
}
function _fun90144() { // fn#90144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11956:1731, offset: 0x0202d9d1, size: 59 bytes, params: 1, frame: 13
let r0 = useReducedMotion && env0_7;
r0 = !r0 ? env0_8 : r0;
if (r0) {
global.setTimeout(_fun90145, 7000);
}
}
function ChatInputActionButtonGiftOnPress(a0) { // fn#90146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11956:1924, owner: ChatInputActionButtonGift.onPress, offset: 0x0202da1e, size: 57 bytes, params: 2, frame: 15
const binding = env0_6;
const TAKE_ACTION = ContentDismissActionType.TAKE_ACTION;
binding(TAKE_ACTION);
const onPressBinding = onPress;
const NITRO_GIFT = ChatInputActionType.NITRO_GIFT;
onPressBinding(a0, NITRO_GIFT, env0_1);
}
function ChatInputActionButtonGiftOnPress_90147(a0) { // fn#90147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11956:2451, owner: ChatInputActionButtonGift.onPress, offset: 0x0202da57, size: 131 bytes, params: 2, frame: 18
var value2;
var moduleValue;
if (env0_3 != null) {
value2 = environment.__proto__;
moduleValue = require(1367) /* metro dependency 1367: DismissibleContentUtils */;
moduleValue.markSnowflakeBoundDismissibleContentAsDismissed((require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.GIFTING_PROMOTION_ICON,
env0_4, {dismissAction: ContentDismissActionType.TAKE_ACTION});
}
const onPressBinding = onPress;
const NITRO_GIFT = ChatInputActionType.NITRO_GIFT;
onPressBinding(a0, NITRO_GIFT, env0_1);
}
@@ -0,0 +1,78 @@
/* Metro module 11767; source: modules/chat_input/native/action_buttons/ChatInputActionButtonGiftOrThread.tsx; dependencies: [31, 27, 11529, 33, 4501, 11768, 11759, 1244, 11757, 11770, 3860, 697, 4508, 2] */
function _fun90114(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11953:6, offset: 0x0202c43d, size: 250 bytes, params: 8, frame: 19
const env0_0 = require;
const getChatInputActionButtonGiftAndThreadKey = function(a0) {
return a0.shouldShowThread ? 'thread' : 'gift';
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(11529) /* metro dependency 11529: ChatInputConstants */).ChatInputActionType;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function(a0, a1) {
return {container: {width: a0 + 2 * a1, height: a0}};
});
value = value.memo(ChatInputActionButtonGiftOrThread);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/action_buttons/ChatInputActionButtonGiftOrThread.tsx');
exports.default = value;
}
function renderChatInputActionButtonGiftAndThread(a0, {accessible, canStartThreads, channel, onPress, shouldShowThread, styleButton, styleButtonWrapper}, a2, a3) { // fn#90115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11953:237, offset: 0x0202c537, size: 294 bytes, params: 5, frame: 28
var r0;
var ChatInputActionButton;
var object;
var intl;
var value;
const ChatInputActionButtonTransitionItem = importDefault(11768) /* metro dependency 11768: ChatInputActionButtonTransitionItem */;
if (shouldShowThread) {
ChatInputActionButton = importDefault(11759) /* metro dependency 11759: ChatInputActionButton */;
object = {accessible: accessible};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['4WNcpu']);
object.disabled = !canStartThreads;
object.IconComponent = (require(11757) /* metro dependency 11757: ThreadPlusIcon */).ThreadPlusIcon;
object.onPress = function(a0) {
return onPress(a0, ChatInputActionType.THREAD);
};
object.style = styleButton;
r0 = <ChatInputActionButton {...object} />;
} else {
value = importDefault(11770) /* metro dependency 11770: ChatInputActionButtonGift */;
value = ((Component) => <Component accessible={accessible} channel={channel} onPress={onPress} style={styleButtonWrapper} styleButton={styleButton} />)(value);
r0 = value;
}
return (
<ChatInputActionButtonTransitionItem
cleanup={a3}
state={a2}
key={a0}
>
{r0}
</ChatInputActionButtonTransitionItem>
);
}
function ChatInputActionButtonGiftOrThread(a0) { // fn#90119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11953:799, offset: 0x0202c6b7, size: 250 bytes, params: 2, frame: 21
const env0_0 = a0;
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
let useToken = useTokenModule.useToken;
const CHAT_INPUT_ACTION_BUTTON_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_ACTION_BUTTON_SIZE;
const value2 = Reflect.apply(useToken, useTokenModule, [CHAT_INPUT_ACTION_BUTTON_SIZE]);
const moduleValue2 = useTokenModule;
useToken = moduleValue2.useToken;
const CHAT_INPUT_ACTION_BUTTON_MARGIN = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_ACTION_BUTTON_MARGIN;
const styles = useStyles(value2, Reflect.apply(useToken, moduleValue2, [CHAT_INPUT_ACTION_BUTTON_MARGIN]));
const value4 = env0_3.useMemo(_fun90120, [a0]);
const TransitionGroup = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionGroup;
return (
<View style={styles.container}>
<TransitionGroup
items={value4}
renderItem={renderChatInputActionButtonGiftAndThread}
getItemKey={getChatInputActionButtonGiftAndThreadKey}
/>
</View>
);
}
@@ -0,0 +1,112 @@
/* Metro module 11768; source: modules/chat_input/native/action_buttons/ChatInputActionButtonTransitionItem.tsx; dependencies: [31, 27, 11529, 33, 4508, 4017, 4504, 11769, 2] */
function _fun90121(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11954:6, offset: 0x0202c7b1, size: 303 bytes, params: 8, frame: 21
const env0_0 = require;
const closure = function(a0) {
return {pointerEvents: a0 ? 'auto' : 'none', accessibilityElementsHidden: !a0,
importantForAccessibility: a0 ? 'auto' : 'no-hide-descendants'};
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const StyleSheet = (require(27) /* metro dependency 27 */).StyleSheet;
const env0_4 = (require(11529) /* metro dependency 11529: ChatInputConstants */).CHAT_INPUT_TIMING_CONFIG;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const env0_6 = StyleSheet.create({transitionItem: {position: 'absolute'},
transitionItemCentered: {'position': 'absolute', 'top': 0, 'bottom': 0, 'left': 0, 'right': 0,
'alignItems': 'center', 'justifyContent': 'center'}});
object = {code: 'function ChatInputActionButtonTransitionItemTsx1(finished){const{runOnJS,cleanup}=this.__closure;if(finished===true){runOnJS(cleanup)();}}'};
object = {code: 'function ChatInputActionButtonTransitionItemTsx2(){const{visible}=this.__closure;return{opacity:visible.get()};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/action_buttons/ChatInputActionButtonTransitionItem.tsx');
exports.default = ChatInputActionButtonTransitionItem;
exports.interactivityProps = closure;
}
function FadeTransitionItem({state, cleanup, children}) { // fn#90123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11954:781, offset: 0x0202c911, size: 307 bytes, params: 2, frame: 21
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const YEETED = TransitionStates.YEETED;
const value2 = state === YEETED;
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(value2 ? 0 : 1);
env0_3.useEffect(_fun90124, [state, value5, cleanup]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = FadeTransitionItemT;
closure.__closure = {visible: value5};
closure.__workletHash = 13386937038500;
closure.__initData = env0_8;
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View style={[env0_6.transitionItem, value6]} {...interactivityProps(!value2)}>
{children}
</View>
);
}
function BounceTransitionItem({state, cleanup, bounceEnterDelayMs, children}) { // fn#90127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11954:1463, offset: 0x0202cb8f, size: 238 bytes, params: 2, frame: 22
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const ENTERED = TransitionStates.ENTERED;
const defaultImport = importDefault(11769) /* metro dependency 11769: useChatInputFloatingBounce */;
const YEETED = TransitionStates.YEETED;
const {animatedStyle, isInteractive} = defaultImport({visible: state !== YEETED,
initiallyVisible: !(state === ENTERED), enterDelayMs: bounceEnterDelayMs, onExitComplete: cleanup,
interactiveDuringEnter: true});
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View style={[env0_6.transitionItemCentered, animatedStyle]} {...interactivityProps(isInteractive)}>
{children}
</View>
);
}
function ChatInputActionButtonTransitionItem({state, cleanup, children, withBounce, bounceEnterDelayMs}) { // fn#90128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11954:1862, offset: 0x0202cc7d, size: 114 bytes, params: 2, frame: 19
withBounce = !(withBounce === undefined) && withBounce;
bounceEnterDelayMs = bounceEnterDelayMs === undefined ? 0 : bounceEnterDelayMs;
return withBounce ? <BounceTransitionItem state={state} cleanup={cleanup} bounceEnterDelayMs={bounceEnterDelayMs}>{children}</BounceTransitionItem> : <FadeTransitionItem state={state} cleanup={cleanup}>{children}</FadeTransitionItem>;
}
function _fun90124() { // fn#90124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11954:928, offset: 0x0202ca44, size: 248 bytes, params: 1, frame: 24
var binding;
var set;
var withTiming;
var moduleValue;
var closure;
var object2;
var value;
const stateBinding = state;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const YEETED = TransitionStates.YEETED;
if (stateBinding === YEETED) {
binding = env0_2;
set = binding.set;
moduleValue = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue.withTiming;
closure = t_90125;
object2 = {};
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.cleanup = cleanup;
closure.__closure = object2;
closure.__workletHash = 10965161938750;
closure.__initData = env1_7;
Reflect.apply(set, binding, [Reflect.apply(withTiming, moduleValue, [0, CHAT_INPUT_TIMING_CONFIG,
'respect-motion-settings', closure])]);
} else {
binding = env0_2;
set = binding.set;
value = require(4504) /* metro dependency 4504: timing */;
Reflect.apply(set, binding, [value.withTiming(1, CHAT_INPUT_TIMING_CONFIG, 'respect-motion-settings')]);
}
}
function t_90125(a0) { // fn#90125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11954:1034, offset: 0x0202cb3c, size: 59 bytes, params: 2, frame: 12
var value;
var runOnJS;
var value2;
if (a0 === true) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
Reflect.apply(runOnJS, value, [cleanup])();
}
}
@@ -0,0 +1,335 @@
/* Metro module 11756; source: modules/chat_input/native/action_buttons/ChatInputActions.tsx; dependencies: [57, 31, 11529, 661, 33, 4501, 697, 4582, 1357, 7701, 3860, 6996, 4022, 1583, 4570, 1244, 11098, 11757, 8840, 9786, 683, 4017, 4504, 8811, 11759, 3864, 11760, 11763, 6697, 11767, 2] */
function _fun90068(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11942:6, offset: 0x02029527, size: 443 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const chatInputConstantsModule = require(11529) /* metro dependency 11529: ChatInputConstants */;
const CHAT_INPUT_TIMING_CONFIG = chatInputConstantsModule.CHAT_INPUT_TIMING_CONFIG;
const env0_5 = chatInputConstantsModule.ChatInputActionType;
const env0_6 = chatInputConstantsModule.ChatInputOmniButtonActionType;
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const value3 = require(33) /* metro dependency 33 */;
const env0_8 = value3.jsx;
const env0_9 = value3.Fragment;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {actions: {'flexDirection': 'row', 'alignItems': 'center'}};
const CARD_SECONDARY_BG = (importDefault(697) /* metro dependency 697: native */).colors.CARD_SECONDARY_BG;
object2.themedChatInput = {backgroundColor: CARD_SECONDARY_BG};
const SMALL_BUTTON_HEIGHT = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).SMALL_BUTTON_HEIGHT;
const SMALL_BUTTON_PADDING = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).SMALL_BUTTON_PADDING;
object2.buttonWrapper = {maxHeight: SMALL_BUTTON_HEIGHT + SMALL_BUTTON_PADDING};
const CHAT_INPUT_ACTION_ICON_ACTIVE_TINT = (importDefault(697) /* metro dependency 697: native */).colors.CHAT_INPUT_ACTION_ICON_ACTIVE_TINT;
object2.activeBrand = {tintColor: CHAT_INPUT_ACTION_ICON_ACTIVE_TINT};
const env0_11 = Reflect.apply(createStyles, createStylesModule, [object2]);
object2 = {code: "function ChatInputActionsTsx1(){const{chatInputFloating,withTiming,showPhotosOnly,actionButtonWidth,actionButtonsWidth,timingConfig}=this.__closure;if(chatInputFloating){return{opacity:1};}return{overflow:'hidden',opacity:1,width:withTiming(showPhotosOnly?actionButtonWidth:actionButtonsWidth,timingConfig)};}"};
const value5 = value.forwardRef(_fun90069);
value5.displayName = 'ChatInputActions';
value = value.memo(value5);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/action_buttons/ChatInputActions.tsx');
exports.default = value;
}
function _fun90069({canStartThreads, channel, isAppLauncherEnabled, keyboardType, onPressAction, shouldPhotosButtonBeDisabled, shouldShowGiftButton, canUpload, canPostPolls, onPollsPress, onAttachPress}, a1) { // fn#90069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11942:912, offset: 0x020296e2, size: 1278 bytes, params: 3, frame: 40
var r11;
var r9;
var object4;
const env0_3 = onPressAction;
const {enabled,
chatInputFloating} = (require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */).useMobileVisualRefreshConfig({location: 'ChatInputActions'});
const styles = useStyles();
const env0_12 = (require(7701) /* metro dependency 7701: ClientThemesOverrides */).useClientThemesOverride(styles.themedChatInput);
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
let useToken = useTokenModule.useToken;
const CHAT_INPUT_ACTION_BUTTON_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_ACTION_BUTTON_SIZE;
const value4 = Reflect.apply(useToken, useTokenModule, [CHAT_INPUT_ACTION_BUTTON_SIZE]);
const moduleValue4 = useTokenModule;
useToken = moduleValue4.useToken;
const CHAT_INPUT_ACTION_BUTTON_MARGIN = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_ACTION_BUTTON_MARGIN;
const value5 = Reflect.apply(useToken, moduleValue4, [CHAT_INPUT_ACTION_BUTTON_MARGIN]);
const moduleValue5 = useTokenModule;
useToken = moduleValue5.useToken;
const CHAT_INPUT_ACTION_BUTTON_GAP = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_ACTION_BUTTON_GAP;
const value6 = Reflect.apply(useToken, moduleValue5, [CHAT_INPUT_ACTION_BUTTON_GAP]);
const value7 = value4 + 2 * value5;
const value8 = (importDefault(6996) /* metro dependency 6996: useKeyboardIsOpen */)({includeCustomKeyboard: true});
const useKeyboardTypeModule = require(4022) /* metro dependency 4022: useKeyboardType */;
const useKeyboardContextForType = useKeyboardTypeModule.useKeyboardContextForType;
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
const SYSTEM = KeyboardTypes.SYSTEM;
const keyboardWillOpen = Reflect.apply(useKeyboardContextForType, useKeyboardTypeModule, [SYSTEM]).keyboardWillOpen;
const binding = shouldPhotosButtonBeDisabled;
let useState = binding.useState;
const value9 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_3;
const value10 = binding2(value9, 2);
const property = value10[0];
const env0_14 = value10[1];
useState = binding.useState;
const value12 = binding2(Reflect.apply(useState, binding, [true]), 2);
const property2 = value12[0];
const env0_15 = value12[1];
const env0_16 = binding.useRef(null);
const useMemo = binding.useMemo;
let closure = function() {
var env0_0 = {onDismissActions: _fun90071, onShowActions: _fun90072, focusPhotosButton: _fun90073};
return {showActionsImperativeApi: _fun90074};
};
binding.useImperativeHandle(a1, Reflect.apply(useMemo, binding, [closure, []]).showActionsImperativeApi);
const env0_17 = binding.useMemo(_fun90075, [enabled, canPostPolls, canStartThreads, isAppLauncherEnabled, canUpload,
onPressAction, onPollsPress, onAttachPress]);
const env0_18 = binding.useCallback(function() {
var defaultImport = importDefault(dependencyMap[20]);
var CHAT_INPUT_OMNI_BUTTON_ACTION = AnalyticEvents.CHAT_INPUT_OMNI_BUTTON_ACTION;
defaultImport.track(CHAT_INPUT_OMNI_BUTTON_ACTION, {type: ChatInputOmniButtonActionType.OPENED});
}, []);
const env0_19 = binding.useCallback(_fun90079, []);
items = [];
let push = items.push;
const object5 = {};
const PHOTOS = ChatInputActionType.PHOTOS;
object5.type = PHOTOS;
const MEDIA = KeyboardTypes.MEDIA;
object5.active = keyboardType === MEDIA || chatInputFloating && keyboardType === (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes.APP_LAUNCHER;
Reflect.apply(push, items, [object5]);
if (!chatInputFloating && isAppLauncherEnabled) {
push = items.push;
object4 = {};
object4.type = ChatInputActionType.APPS;
object4.active = keyboardType === (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes.APP_LAUNCHER;
Reflect.apply(push, items, [object4]);
}
const value16 = canStartThreads === true;
if (value16) {
r11 = value8 || keyboardWillOpen;
r11 = !r11 ? property : r11;
r9 = r11;
} else {
r9 = value16;
}
if (!chatInputFloating) {
if (r9) {
items.push({type: ChatInputActionType.THREAD});
} else if (shouldShowGiftButton) {
items.push({type: ChatInputActionType.NITRO_GIFT});
}
}
const value17 = !property2;
const value19 = items.length * value7 + (items.length > 1 ? (items.length - 1) * value6 : 0);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
closure = et;
const object7 = {chatInputFloating: chatInputFloating};
object7.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object7.showPhotosOnly = value17;
object7.actionButtonWidth = value7;
object7.actionButtonsWidth = value19;
object7.timingConfig = CHAT_INPUT_TIMING_CONFIG;
closure.__closure = object7;
closure.__workletHash = 11213591113353;
closure.__initData = env0_12;
const value20 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<>
<View style={[styles.actions, value20, {gap: value6, maxWidth: chatInputFloating ? undefined : value19}]}>
{items.map(_fun90081)}
</View>
</>
);
}
function _fun90070() { // fn#90070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11942:1752, offset: 0x02029be0, size: 60 bytes, params: 1, frame: 3
const object = {onDismissActions: onDismissActions, onShowActions: onShowActions,
focusPhotosButton: focusPhotosButton};
return {showActionsImperativeApi: showActionsImperativeApi};
}
function _fun90075() { // fn#90075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11942:2018, offset: 0x02029c92, size: 478 bytes, params: 1, frame: 19
var environment;
var push;
var object5;
var value2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var object6;
var value3;
var object7;
var value4;
var object8;
var value5;
const enabledBinding = enabled;
const items2 = [];
if (enabledBinding) {
if (canPostPolls) {
push = items2.push;
object5 = {};
value2 = environment.__proto__;
object5.label = intl.string(t.RgIi2B);
object5.IconComponent = (require(11098) /* metro dependency 11098: PollsIcon */).PollsIcon;
object5.action = onPollsPress;
Reflect.apply(push, items2, [object5]);
}
if (canStartThreads) {
push = items2.push;
object6 = {};
value3 = environment.__proto__;
object6.label = intl.string(t['7Xm5QI']);
object6.IconComponent = (require(11757) /* metro dependency 11757: ThreadPlusIcon */).ThreadPlusIcon;
object6.action = function() {
var onPressActionBinding = onPressAction;
var THREAD = ChatInputActionType.THREAD;
return onPressActionBinding({}, THREAD);
};
Reflect.apply(push, items2, [object6]);
}
if (isAppLauncherEnabled) {
push = items2.push;
object7 = {};
value4 = environment.__proto__;
object7.label = intl.string(t.PHjkRE);
object7.IconComponent = (require(8840) /* metro dependency 8840: AppsIcon */).AppsIcon;
object7.action = action_90077;
Reflect.apply(push, items2, [object7]);
}
if (canUpload) {
push = items2.push;
object8 = {};
value5 = environment.__proto__;
object8.label = intl.string(t['8Hvr3+']);
object8.IconComponent = (require(9786) /* metro dependency 9786: AttachmentIcon */).AttachmentIcon;
object8.action = onAttachPress;
Reflect.apply(push, items2, [object8]);
}
}
return items2;
}
function _fun90079(a0) { // fn#90079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11942:2637, offset: 0x02029ef0, size: 72 bytes, params: 2, frame: 14
var value;
var defaultImport;
if (a0) {
value = environment.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.CHAT_INPUT_OMNI_BUTTON_ACTION, {type: ChatInputOmniButtonActionType.CLOSED});
}
}
function et() { // fn#90080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11942:3086, offset: 0x02029f38, size: 101 bytes, params: 1, frame: 16
var object;
var value2;
var moduleValue;
if (chatInputFloating) {
object = {opacity: 1};
} else {
value2 = environment.__proto__;
moduleValue = require(4504) /* metro dependency 4504: timing */;
object = {'overflow': 'hidden', 'opacity': 1, width: moduleValue.withTiming(env0_21 ? env0_13 : env0_22,
CHAT_INPUT_TIMING_CONFIG)};
}
return object;
}
function _fun90081({type, active}, a1) { // fn#90081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11942:3481, offset: 0x02029f9d, size: 862 bytes, params: 3, frame: 25
var environment;
var r0;
var object;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var defaultImport2;
const value = environment.__proto__;
const PHOTOS = ChatInputActionType.PHOTOS;
if (PHOTOS === type) {
if (enabled) {
if (env0_17.length > 0) {
const ContextMenu = (require(8811) /* metro dependency 8811: ContextMenuNative */).ContextMenu;
r0 = <ContextMenu items={env0_17} triggerOnLongPress align="above" onOpen={env0_18} onClose={env0_19} key={a1}>{children_90082}</ContextMenu>;
} else {
defaultImport2 = importDefault(11759) /* metro dependency 11759: ChatInputActionButton */;
r0 = ((Component) => <Component ref={env0_16} accessibilityLabel={intl.string(t.aDZSuz)} accessibilityHint={intl.string(t.o7j1jA)} accessibilityState={{expanded: active}} active={active} activeIconStyle={styles.activeBrand} disabled={shouldPhotosButtonBeDisabled} IconComponent={(require(11760) /* metro dependency 11760: MediaKeyboardButtonIcon */).MediaKeyboardButtonIcon} onPress={function(a0) {
return onPressAction(a0, ChatInputActionType.PHOTOS);
}} style={env0_12} key={a1} />)(defaultImport2);
}
} else {
defaultImport2 = importDefault(11759) /* metro dependency 11759: ChatInputActionButton */;
r0 = ((Component) => <Component ref={env0_16} accessibilityLabel={intl.string(t.aDZSuz)} accessibilityHint={intl.string(t.o7j1jA)} accessibilityState={{expanded: active}} active={active} activeIconStyle={styles.activeBrand} disabled={shouldPhotosButtonBeDisabled} IconComponent={(require(11760) /* metro dependency 11760: MediaKeyboardButtonIcon */).MediaKeyboardButtonIcon} onPress={onPress_90084} style={env0_12} key={a1} />)(defaultImport2);
}
return r0;
}
const APPS = ChatInputActionType.APPS;
if (APPS === type) {
return ((Component) => <Component accessible={!env0_21} active={active} channel={channel} onPress={onPressAction} styleButton={env0_12} styleActiveIcon={styles.activeBrand} key={a1} />)(importDefault(11763) /* metro dependency 11763: ChatInputActionButtonApps */);
}
const ALL_PHOTOS = ChatInputActionType.ALL_PHOTOS;
if (ALL_PHOTOS === type) {
return ((Component) => <Component accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ZT24In)} accessible={!env0_21} accessibilityState={{expanded: active}} active={active} activeIconStyle={styles.activeBrand} disabled={!canUpload} IconComponent={(require(6697) /* metro dependency 6697: ImageIcon */).ImageIcon} onPress={function(a0) {
return onPressAction(a0, ChatInputActionType.ALL_PHOTOS);
}} style={env0_12} key={a1} />)(importDefault(11759) /* metro dependency 11759: ChatInputActionButton */);
}
const THREAD = ChatInputActionType.THREAD;
if (THREAD === type) {
return ((Component) => <Component accessible={!env0_21} canStartThreads={canStartThreads} channel={channel} onPress={onPressAction} styleButtonWrapper={styles.buttonWrapper} styleButton={env0_12} shouldShowThread={env0_20} key="gift-or-thread" />)(importDefault(11767) /* metro dependency 11767: ChatInputActionButtonGiftOrThread */);
}
const NITRO_GIFT = ChatInputActionType.NITRO_GIFT;
if (NITRO_GIFT === type) {
return ((Component) => <Component accessible={!env0_21} canStartThreads={canStartThreads} channel={channel} onPress={onPressAction} styleButtonWrapper={styles.buttonWrapper} styleButton={env0_12} shouldShowThread={env0_20} key="gift-or-thread" />)(importDefault(11767) /* metro dependency 11767: ChatInputActionButtonGiftOrThread */);
}
}
function onDismissActions(a0) { // fn#90071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11942:1781, offset: 0x02029c1c, size: 30 bytes, params: 2, frame: 12
env1_14(a0);
env1_15(false);
}
function onShowActions(a0) { // fn#90072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11942:1811, offset: 0x02029c3a, size: 30 bytes, params: 2, frame: 12
env1_14(a0);
env1_15(true);
}
function focusPhotosButton() { // fn#90073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11942:1845, offset: 0x02029c58, size: 58 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__;
(require(4570) /* metro dependency 4570: setAccessibilityFocusAndroid */).setAccessibilityFocus({ref: env1_16,
delay: 0});
}
function action_90077() { // fn#90077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11942:2377, offset: 0x02029e90, size: 32 bytes, params: 1, frame: 13
const onPressActionBinding = onPressAction;
const APPS = ChatInputActionType.APPS;
return onPressActionBinding({}, APPS);
}
function children_90082({ref, accessibilityActions, onAccessibilityAction}) { // fn#90082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11942:3646, offset: 0x0202a2fb, size: 298 bytes, params: 2, frame: 22
var environment;
const value = environment.__proto__.__proto__;
const ChatInputActionButton = importDefault(11759) /* metro dependency 11759: ChatInputActionButton */;
const chatInputActionButtonProps = {ref: (require(3864) /* metro dependency 3864: mergePropsNative */).mergeRefs(ref,
env1_16)};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
chatInputActionButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.aDZSuz);
chatInputActionButtonProps.accessibilityHint = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.o7j1jA);
const activeBinding = active;
chatInputActionButtonProps.accessibilityState = {expanded: activeBinding};
chatInputActionButtonProps.accessibilityActions = accessibilityActions;
chatInputActionButtonProps.onAccessibilityAction = onAccessibilityAction;
chatInputActionButtonProps.active = activeBinding;
chatInputActionButtonProps.activeIconStyle = styles.activeBrand;
chatInputActionButtonProps.disabled = shouldPhotosButtonBeDisabled;
const MediaKeyboardButtonIcon = (require(11760) /* metro dependency 11760: MediaKeyboardButtonIcon */).MediaKeyboardButtonIcon;
chatInputActionButtonProps.IconComponent = MediaKeyboardButtonIcon;
chatInputActionButtonProps.onPress = function(a0) {
return onPressAction(a0, ChatInputActionType.PHOTOS);
};
chatInputActionButtonProps.style = env1_12;
return <ChatInputActionButton {...chatInputActionButtonProps} />;
}
function onPress_90084(a0) { // fn#90084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11942:4348, offset: 0x0202a446, size: 33 bytes, params: 2, frame: 13
const onPressActionBinding = onPressAction;
const PHOTOS = ChatInputActionType.PHOTOS;
return onPressActionBinding(a0, PHOTOS);
}
@@ -0,0 +1,100 @@
/* Metro module 11887; source: modules/chat_input/native/action_buttons/ChatInputRightActions.tsx; dependencies: [57, 31, 27, 11529, 33, 4501, 697, 3860, 4508, 11711, 1583, 11769, 4017, 11768, 11767, 2] */
function _fun91244(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12073:6, offset: 0x020582fb, size: 287 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const env0_6 = (require(11529) /* metro dependency 11529: ChatInputConstants */).CHAT_INPUT_FLOATING_BOUNCE_ENTER_DELAY_MS;
const value2 = require(33) /* metro dependency 33 */;
const env0_7 = value2.jsx;
const env0_8 = value2.jsxs;
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function() {
var object2 = {'flexDirection': 'row', 'alignItems': 'center'};
object2.gap = importDefault(dependencyMap[6]).modules.mobile.CHAT_INPUT_ACTION_BUTTON_GAP;
return {container: object2, leftSlot: {'alignItems': 'center', 'justifyContent': 'center'}};
});
const value4 = value.forwardRef(_fun91247);
value4.displayName = 'ChatInputRightActions';
value = value.memo(value4);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/action_buttons/ChatInputRightActions.tsx');
exports.default = value;
}
function LeftSlot({state, cleanup, channel, onPress, slotWidth, wrapperStyle}) { // fn#91245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12073:1194, offset: 0x0205841a, size: 309 bytes, params: 2, frame: 24
const {YEETED, ENTERED} = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const {animatedStyle,
isInteractive} = (importDefault(11769) /* metro dependency 11769: useChatInputFloatingBounce */)({visible: state !== YEETED,
initiallyVisible: !(state === ENTERED), enterDelayMs: CHAT_INPUT_FLOATING_BOUNCE_ENTER_DELAY_MS,
onExitComplete: cleanup});
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const viewProps = {style: [wrapperStyle, {width: slotWidth}, animatedStyle]};
const chatInputActionButtonTransitionItemModule = require(11768) /* metro dependency 11768: ChatInputActionButtonTransitionItem */;
copyDataProperties(viewProps, chatInputActionButtonTransitionItemModule.interactivityProps(isInteractive),
slotWidth);
let value = importDefault(11767) /* metro dependency 11767: ChatInputActionButtonGiftOrThread */;
value = ((Component) => <Component canStartThreads={false} channel={channel} onPress={onPress} styleButton={undefined} shouldShowThread={false} />)(value);
return (
<View {...viewProps}>
{value}
</View>
);
}
function _fun91247({channel, keyboardType, showKeyboardIcon, shouldShowGiftButton, onPressAction, onPressExpression}, a1) { // fn#91247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12073:423, offset: 0x020585a3, size: 509 bytes, params: 3, frame: 27
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
let useToken = useTokenModule.useToken;
const CHAT_INPUT_ACTION_BUTTON_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_ACTION_BUTTON_SIZE;
const value3 = Reflect.apply(useToken, useTokenModule, [CHAT_INPUT_ACTION_BUTTON_SIZE]);
const moduleValue2 = useTokenModule;
useToken = moduleValue2.useToken;
const CHAT_INPUT_ACTION_BUTTON_MARGIN = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_ACTION_BUTTON_MARGIN;
const value5 = value3 + 2 * Reflect.apply(useToken, moduleValue2, [CHAT_INPUT_ACTION_BUTTON_MARGIN]);
const styles = useStyles();
const env0_3 = styles;
const binding = env0_4;
var [property, env0_4] = env0_3(binding.useState(true), 2);
binding.useImperativeHandle(a1, function() {
return {onDismissActions: _fun91249, onShowActions: _fun91250};
}, []);
const value8 = binding.useMemo(function() {
return {};
}, []);
const useCallback = binding.useCallback;
const r5 = shouldShowGiftButton ? ((TransitionItem) => <TransitionItem item={property ? value8 : undefined} renderItem={Reflect.apply(useCallback,
binding, [_fun91252, [channel, onPressAction, value5,
styles.leftSlot]])} />)((require(4508) /* metro dependency 4508: TransitionGroup */).TransitionItem) : null;
const ChatInputExpressionButton = importDefault(11711) /* metro dependency 11711: ChatInputExpressionButton */;
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
const EXPRESSION = KeyboardTypes.EXPRESSION;
return (
<View style={styles.container}>
{r5}
<ChatInputExpressionButton
active={keyboardType === EXPRESSION}
showKeyboardIcon={showKeyboardIcon}
onPress={onPressExpression}
/>
</View>
);
}
function _fun91248() { // fn#91248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12073:763, offset: 0x020587a0, size: 30 bytes, params: 1, frame: 3
return {onDismissActions: onDismissActions_91249, onShowActions: onShowActions_91250};
}
function _fun91252(a0, a1, a2, a3) { // fn#91252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12073:875, offset: 0x020587d0, size: 85 bytes, params: 5, frame: 15
return (
<LeftSlot
state={a2}
cleanup={a3}
channel={channel}
onPress={onPressAction}
wrapperStyle={styles.leftSlot}
slotWidth={env0_2}
key={a0}
/>
);
}
@@ -0,0 +1,150 @@
/* Metro module 11769; source: modules/chat_input/native/action_buttons/useChatInputFloatingBounce.tsx; dependencies: [57, 31, 11529, 4017, 4504, 4577, 2] */
function _fun90129(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11955:6, offset: 0x0202ccef, size: 233 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
const chatInputConstantsModule = require(11529) /* metro dependency 11529: ChatInputConstants */;
const env0_4 = chatInputConstantsModule.CHAT_INPUT_FLOATING_BOUNCE_SPRING_CONFIG;
const env0_5 = chatInputConstantsModule.CHAT_INPUT_FLOATING_COLLAPSED_SCALE;
const env0_6 = chatInputConstantsModule.CHAT_INPUT_FLOATING_ENTER_OPACITY_TIMING_CONFIG;
const env0_7 = chatInputConstantsModule.CHAT_INPUT_FLOATING_EXIT_TIMING_CONFIG;
object = {code: 'function useChatInputFloatingBounceTsx1(finished){const{runOnJS,setEnterFinished}=this.__closure;if(finished===true){runOnJS(setEnterFinished)(true);}}'};
object = {code: 'function useChatInputFloatingBounceTsx2(finished){const{runOnJS,handleExitFinished}=this.__closure;if(finished===true){runOnJS(handleExitFinished)();}}'};
object = {code: 'function useChatInputFloatingBounceTsx3(){const{opacity,scale}=this.__closure;return{opacity:opacity.get(),transform:[{scale:scale.get()}]};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/action_buttons/useChatInputFloatingBounce.tsx');
exports.default = useChatInputFloatingBounce;
}
function useChatInputFloatingBounce({visible, initiallyVisible = visible, enterDelayMs, onExitComplete, interactiveDuringEnter}) { // fn#90130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11955:900, offset: 0x0202cdd8, size: 451 bytes, params: 2, frame: 27
enterDelayMs = enterDelayMs === undefined ? 0 : enterDelayMs;
const env0_2 = onExitComplete;
interactiveDuringEnter = !(interactiveDuringEnter === undefined) && interactiveDuringEnter;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useSharedValue = reanimatedRexportModule.useSharedValue;
let r1 = initiallyVisible ? 1 : 0;
const value4 = Reflect.apply(useSharedValue, reanimatedRexportModule, [r1]);
const env0_3 = value4;
const value6 = reanimatedRexportModule.useSharedValue(initiallyVisible ? 1 : CHAT_INPUT_FLOATING_COLLAPSED_SCALE);
let binding = env0_3;
let useState = binding.useState;
const value7 = Reflect.apply(useState, binding, [initiallyVisible]);
const binding2 = env0_2;
const value8 = binding2(value7, 2);
const property = value8[0];
const property2 = value8[1];
useState = binding.useState;
const value9 = binding2(Reflect.apply(useState, binding, [visible]), 2);
if (visible !== value9[0]) {
value9[1](visible);
if (!visible) {
property2(false);
}
}
r1 = interactiveDuringEnter ? visible : visible && property;
binding = env0_3;
const env0_6 = binding.useRef(onExitComplete);
binding.useEffect(_fun90131, [onExitComplete]);
binding.useEffect(_fun90132, [visible, enterDelayMs, value4, value6]);
const moduleValue3 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue3.useAnimatedStyle;
const closure = useChatInputFloatingBounceW;
closure.__closure = {opacity: value4, scale: value6};
closure.__workletHash = 8631256891065;
closure.__initData = env0_10;
return {animatedStyle: Reflect.apply(useAnimatedStyle, moduleValue3, [closure]), isInteractive: r1};
}
function _fun90132() { // fn#90132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11955:1289, offset: 0x0202cf9b, size: 498 bytes, params: 1, frame: 27
var r0;
var binding;
var set;
var moduleValue;
var withTiming;
var closure2;
const runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
var moduleValue2;
var value3;
var moduleValue3;
var value5;
var moduleValue5;
let closure = handleExitFinished;
var value;
if (visible) {
moduleValue2 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue2.withTiming;
closure = n_90134;
closure.__closure = {runOnJS: runOnJS, setEnterFinished: env0_5};
closure.__workletHash = 9490441890617;
closure.__initData = env1_8;
value3 = Reflect.apply(withTiming, moduleValue2, [1, CHAT_INPUT_FLOATING_ENTER_OPACITY_TIMING_CONFIG,
'respect-motion-settings', closure]);
binding = env0_3;
set = binding.set;
if (enterDelayMs > 0) {
moduleValue3 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
r0 = moduleValue3.withDelay(enterDelayMs, value3);
} else {
r0 = value3;
}
Reflect.apply(set, binding, [r0]);
value5 = (require(4577) /* metro dependency 4577: spring */).withSpring(1,
CHAT_INPUT_FLOATING_BOUNCE_SPRING_CONFIG,
'respect-motion-settings');
binding = env0_4;
set = binding.set;
if (enterDelayMs > 0) {
moduleValue5 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
r0 = moduleValue5.withDelay(enterDelayMs, value5);
} else {
r0 = value5;
}
Reflect.apply(set, binding, [r0]);
} else {
binding = env0_3;
set = binding.set;
moduleValue = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue.withTiming;
closure2 = t_90135;
closure2.__closure = {runOnJS: runOnJS, handleExitFinished: closure};
closure2.__workletHash = 6186469155404;
closure2.__initData = env1_9;
Reflect.apply(set, binding, [Reflect.apply(withTiming, moduleValue, [0, CHAT_INPUT_FLOATING_EXIT_TIMING_CONFIG,
'respect-motion-settings', closure2])]);
binding = env0_4;
set = binding.set;
value = require(4504) /* metro dependency 4504: timing */;
withTiming = value.withTiming;
Reflect.apply(set, binding, [Reflect.apply(withTiming, value, [CHAT_INPUT_FLOATING_COLLAPSED_SCALE,
CHAT_INPUT_FLOATING_EXIT_TIMING_CONFIG, 'respect-motion-settings'])]);
}
}
function handleExitFinished() { // fn#90133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11955:1321, offset: 0x0202d18d, size: 38 bytes, params: 1, frame: 10
const value = environment.__proto__;
return env1_6.current?.();
}
function n_90134(a0) { // fn#90134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11955:1425, offset: 0x0202d1b3, size: 60 bytes, params: 2, frame: 13
var value;
var runOnJS;
var value2;
if (a0 === true) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
Reflect.apply(runOnJS, value, [env1_5])(true);
}
}
function t_90135(a0) { // fn#90135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11955:1766, offset: 0x0202d1ef, size: 59 bytes, params: 2, frame: 12
var value;
if (a0 === true) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(handleExitFinished)();
}
}
@@ -0,0 +1,77 @@
/* Metro module 11781; source: modules/chat_input/native/action_buttons/useChatInputFloatingWidth.tsx; dependencies: [31, 11529, 4017, 4504, 2] */
function _fun90254(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11967:6, offset: 0x02031bf0, size: 152 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 env0_3 = (require(11529) /* metro dependency 11529: ChatInputConstants */).CHAT_INPUT_FLOATING_SLIDE_TIMING_CONFIG;
object = {code: 'function useChatInputFloatingWidthTsx1(){const{collapsedWidth,expandedWidth,progress}=this.__closure;return{width:collapsedWidth+(expandedWidth-collapsedWidth)*progress.get()};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/action_buttons/useChatInputFloatingWidth.tsx');
exports.default = useChatInputFloatingWidth;
}
function useChatInputFloatingWidth({expanded, collapsedWidth, expandedWidth, enterDelayMs}) { // fn#90255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11967:459, offset: 0x02031c88, size: 234 bytes, params: 2, frame: 21
const env0_2 = expandedWidth;
enterDelayMs = enterDelayMs === undefined ? 0 : enterDelayMs;
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(expanded ? 1 : 0);
const env0_4 = value4;
env0_2.useEffect(_fun90256, [expanded, enterDelayMs, value4]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = useChatInputFloatingWidthP;
closure.__closure = {collapsedWidth: collapsedWidth, expandedWidth: expandedWidth, progress: value4};
closure.__workletHash = 2289574047387;
closure.__initData = env0_4;
return {animatedStyle: Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure])};
}
function _fun90256() { // fn#90256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11967:616, offset: 0x02031d72, size: 191 bytes, params: 1, frame: 20
var enterDelayMsBinding;
var binding;
var set;
var value2;
var moduleValue;
var value3;
var moduleValue2;
var withDelay;
var value;
if (expanded) {
enterDelayMsBinding = enterDelayMs;
if (enterDelayMsBinding > 0) {
binding = env0_4;
set = binding.set;
value3 = environment.__proto__;
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withDelay = moduleValue2.withDelay;
enterDelayMsBinding = enterDelayMs;
value = require(4504) /* metro dependency 4504: timing */;
Reflect.apply(set, binding, [Reflect.apply(withDelay, moduleValue2, [enterDelayMsBinding,
value.withTiming(1,
CHAT_INPUT_FLOATING_SLIDE_TIMING_CONFIG, 'respect-motion-settings')])]);
} else {
binding = env0_4;
set = binding.set;
value2 = environment.__proto__;
moduleValue = require(4504) /* metro dependency 4504: timing */;
Reflect.apply(set, binding, [moduleValue.withTiming(expanded ? 1 : 0,
CHAT_INPUT_FLOATING_SLIDE_TIMING_CONFIG,
'respect-motion-settings')]);
}
} else {
binding = env0_4;
set = binding.set;
value2 = environment.__proto__;
moduleValue = require(4504) /* metro dependency 4504: timing */;
Reflect.apply(set, binding, [moduleValue.withTiming(expanded ? 1 : 0, CHAT_INPUT_FLOATING_SLIDE_TIMING_CONFIG,
'respect-motion-settings')]);
}
}
function useChatInputFloatingWidthP() { // fn#90257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11967:822, owner: useChatInputFloatingWidth.p, offset: 0x02031e31, size: 44 bytes, params: 1, frame: 12
const collapsedWidthBinding = collapsedWidth;
const value2 = expandedWidth - collapsedWidthBinding;
const binding = env0_4;
const get = binding.get;
return {width: collapsedWidthBinding + value2 * Reflect.apply(get, binding, [])};
}
@@ -0,0 +1,28 @@
/* Metro module 11782; source: modules/chat_input/native/getChatInputPositionStyle.tsx; dependencies: [27, 477, 2] */
function _fun90258(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11968:6, offset: 0x02031e5d, size: 141 bytes, params: 8, frame: 18
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {};
const StyleSheet = (require(27) /* metro dependency 27 */).StyleSheet;
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
object2['top'] = undefined;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/getChatInputPositionStyle.tsx');
exports.default = getChatInputPositionStyle;
}
function getChatInputPositionStyle() { // fn#90259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11968:251, offset: 0x02031eea, size: 76 bytes, params: 1, frame: 14
var moduleValue;
const value = a0;
const value2 = undefined;
let r0 = value !== value2 ? value : {isCreatingThread: false};
if (r0.isCreatingThread) {
r0 = value2;
} else {
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
r0 = moduleValue.isIOS() ? env0_2 : value2;
}
return r0;
}
@@ -0,0 +1,183 @@
/* Metro module 11904; source: modules/chat_input/native/guard/ChatInputGuard.tsx; dependencies: [31, 27, 7729, 33, 4501, 697, 815, 7702, 11782, 7704, 477, 11790, 6238, 8341, 11905, 9898, 4573, 4578, 6261, 8554, 2] */
function _fun91365(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12090:6, offset: 0x0205c9ec, size: 250 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_4 = value.StyleSheet;
const env0_5 = value.View;
const env0_6 = (require(7729) /* metro dependency 7729: useChatBottomManagerUIStore */).updateChatInputContainerHeight;
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(_fun91366);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/guard/ChatInputGuard.tsx');
exports.default = ChatInputGuard;
exports.ChatInputGuardContainer = ChatInputGuardContainer;
}
function _fun91366(a0) { // fn#91366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12090:232, offset: 0x0205cae6, size: 561 bytes, params: 2, frame: 19
const object3 = {};
const object7 = {};
const value2 = undefined;
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object7.paddingHorizontal = PX_12;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object7.paddingBottom = PX_8;
object3.container = object7;
object3.content = {borderRadius: a0 ? (importDefault(697) /* metro dependency 697: native */).radii.lg : value2,
overflow: a0 ? 'hidden' : value2};
const object8 = {};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object8.backgroundColor = BACKGROUND_BASE_LOWER;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
const Radius = (require(815) /* metro dependency 815: generatedDefinitions */).Radius;
object8.height = PX_8 + Radius.lg;
copyDataProperties(object8, StyleSheet.absoluteFillObject, require);
object8['top'] = value2;
object3.underlay = object8;
const object9 = {};
let BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
object9.borderColor = BORDER_MUTED;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object9.paddingHorizontal = PX_12;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object9.paddingTop = PX_16;
let BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object9.backgroundColor = BACKGROUND_SURFACE_HIGH;
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object9.borderWidth = 1;
object3.wrapper = object9;
const object10 = {};
BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object10.backgroundColor = BACKGROUND_SURFACE_HIGH;
const TABLE_ROW_BORDER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_BORDER_RADIUS;
object10.borderRadius = TABLE_ROW_BORDER_RADIUS;
BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
object10.borderColor = BORDER_MUTED;
object10.borderWidth = 1;
object3.floating = object10;
object3.text = {textAlign: 'center'};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object3.subtext = {marginTop: PX_4, textAlign: 'center'};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.spacing = {marginTop: PX_8};
return object3;
}
function ChatInputGuard(a0) { // fn#91367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12090:1070, offset: 0x0205cd17, size: 1050 bytes, params: 2, frame: 36
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
var r6;
var message;
var subtext;
var countdown;
var icon;
var actionIcon;
var actionLabel;
var actionOnPress;
var TableRow;
var value8;
var value;
const styles = useStyles((importDefault(7702) /* metro dependency 7702: useIsUsingClientTheme */)());
if (a0.type === 'simple-action') {
icon = a0.icon;
message = a0.message;
countdown = a0.countdown;
subtext = a0.subtext;
actionIcon = a0.actionIcon;
actionLabel = a0.actionLabel;
actionOnPress = a0.actionOnPress;
var viewBindingProps = {style: styles.floating};
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
value8 = null;
return (
<View {...viewBindingProps}>
<TableRow
arrow={false}
accessibilityRole="button"
onPress={actionOnPress}
icon={icon}
start
end
trailing={value8 == actionLabel ? value8 != countdown ? ((Component) => <Component style={[styles.text,
styles.spacing]} deadline={countdown} />)(importDefault(9898) /* metro dependency 9898: CountDown */) : value8 : value8 != actionOnPress ? ((IconButton) => <IconButton accessibilityLabel={actionLabel} icon={value8 != actionIcon ? actionIcon : ((ArrowSmallRightIcon) => <ArrowSmallRightIcon color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} />)((require(11905) /* metro dependency 11905: ArrowSmallRightIcon */).ArrowSmallRightIcon)} size="sm" onPress={actionOnPress} />)((require(8341) /* metro dependency 8341: IconButtonNative */).IconButton) : value8 != countdown ? ((Component) => <Component style={[styles.text,
styles.spacing]} deadline={countdown} />)(importDefault(9898) /* metro dependency 9898: CountDown */) : value8}
label={<Text variant="text-sm/semibold">{message}</Text>}
subLabel={subtext}
/>
</View>
);
}
message = a0.message;
subtext = a0.subtext;
const buttonPrimaryText = a0.buttonPrimaryText;
const buttonPrimaryOnPress = a0.buttonPrimaryOnPress;
const buttonPrimaryDisabled = a0.buttonPrimaryDisabled;
const buttonPrimaryLoading = a0.buttonPrimaryLoading;
const buttonPrimaryVariant = a0.buttonPrimaryVariant;
const buttonSecondaryText = a0.buttonSecondaryText;
const buttonSecondaryOnPress = a0.buttonSecondaryOnPress;
const buttonSecondaryDisabled = a0.buttonSecondaryDisabled;
const buttonSecondaryLoading = a0.buttonSecondaryLoading;
countdown = a0.countdown;
const button = <Button disabled={buttonPrimaryDisabled} loading={buttonPrimaryLoading} text={buttonPrimaryText} onPress={buttonPrimaryOnPress} size="sm" variant={buttonPrimaryVariant} />;
const items2 = [<Text style={styles.text} variant="text-sm/semibold">{message}</Text>];
const value5 = null;
items2[1] = value5 != subtext ? typeof subtext !== 'string' ? value5 : subtext.length > 0 ? <Text style={styles.subtext} variant="text-xs/medium" color="text-muted">{subtext}</Text> : value5 : value5;
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
items2[2] = <ButtonGroup>{value5 == buttonSecondaryText || value5 == buttonSecondaryOnPress ? button : ((TwinButtons) => <TwinButtons>{button}<Button disabled={buttonSecondaryDisabled} loading={buttonSecondaryLoading} text={buttonSecondaryText} onPress={buttonSecondaryOnPress} variant="secondary" size="sm" /></TwinButtons>)((require(8554) /* metro dependency 8554: native */).TwinButtons)}</ButtonGroup>;
if (value5 != countdown) {
value = importDefault(9898) /* metro dependency 9898: CountDown */;
value = ((Component) => <Component style={[styles.text, styles.spacing]} deadline={countdown} />)(value);
r6 = value;
} else {
r6 = value5;
}
items2[3] = r6;
return (
<View style={styles.wrapper}>
{items2}
</View>
);
}
function ChatInputGuardContainer({screenIndex, channelId, onJumpToPresent, children}) { // fn#91368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12090:2653, offset: 0x0205d131, size: 407 bytes, params: 2, frame: 28
var r5;
var value;
const value2 = (importDefault(7702) /* metro dependency 7702: useIsUsingClientTheme */)();
const styles = useStyles(value2);
const value3 = env0_3.useCallback(function(a0) {
updateChatInputContainerHeight(screenIndex, a0.nativeEvent.layout.height);
}, [screenIndex]);
const items3 = [styles.container];
items3[1] = (importDefault(11782) /* metro dependency 11782: getChatInputPositionStyle */)({isCreatingThread: false});
const items2 = [value2 ? null : <View style={styles.underlay} />];
items2[1] = <View style={styles.content}>{value2 ? ((Component) => <Component absolute wide tall mix />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */) : null}{children}</View>;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isIOS()) {
if (channelId != null) {
value = importDefault(11790) /* metro dependency 11790: JumpToPresentButton */;
value = ((Component) => <Component channelId={channelId} screenIndex={screenIndex} onJumpToPresent={onJumpToPresent} />)(value);
r5 = value;
} else {
r5 = null;
}
} else {
r5 = null;
}
items2[2] = r5;
return (
<View
style={items3}
onLayout={value3}
collapsable={false}
>
{items2}
</View>
);
}
@@ -0,0 +1,62 @@
/* Metro module 11922; source: modules/chat_input/native/guard/ChatInputGuardAutomodUserProfileQuarantine.tsx; dependencies: [31, 1226, 1945, 3772, 33, 566, 3790, 11453, 1244, 11904, 11923, 2] */
function _fun91431(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12108:6, offset: 0x02064147, size: 206 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const env0_6 = (require(3772) /* metro dependency 3772: GuildMemberConstants */).GuildMemberFlags;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(ChatInputGuardAutomodUserProfileQuarantine);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/guard/ChatInputGuardAutomodUserProfileQuarantine.tsx');
exports.default = value;
}
function ChatInputGuardAutomodUserProfileQuarantine({guildId}) { // fn#91432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12108:181, offset: 0x02064215, size: 487 bytes, params: 2, frame: 21
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore,
GuildMemberStore], _fun91433, [guildId]);
const value3 = env0_3.useCallback(_fun91434, [guildId]);
const automodReason = (require(3790) /* metro dependency 3790: AutomodPermissionUtils */).getAutomodReason(value2);
let AUTOMOD_QUARANTINED_SERVER_TAG = GuildMemberFlags.AUTOMOD_QUARANTINED_SERVER_TAG;
const r6 = automodReason === AUTOMOD_QUARANTINED_SERVER_TAG ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Viksoo) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/PGQf0']);
AUTOMOD_QUARANTINED_SERVER_TAG = GuildMemberFlags.AUTOMOD_QUARANTINED_SERVER_TAG;
const r4 = automodReason === AUTOMOD_QUARANTINED_SERVER_TAG ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ml72ZU) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8HW7r9']);
const ChatInputGuard = importDefault(11904) /* metro dependency 11904: ChatInputGuard */;
const ChatXIcon = (require(11923) /* metro dependency 11923: ChatXIcon */).ChatXIcon;
return (
<ChatInputGuard
type="simple-action"
actionOnPress={value3}
actionLabel={r6}
icon={<ChatXIcon />}
message={r4}
/>
);
}
function _fun91433() { // fn#91433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12108:286, offset: 0x020643fc, size: 115 bytes, params: 1, frame: 15
var Set;
var set;
var value;
if (guildId == null) {
Set = global.Set;
value = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
return set instanceof Object ? set : value;
}
const id = AuthenticationStore.getId();
const automodPermissionUtilsModule = require(3790) /* metro dependency 3790: AutomodPermissionUtils */;
const getAutomodQuarantinedGuildMemberFlags = automodPermissionUtilsModule.getAutomodQuarantinedGuildMemberFlags;
const getMember = GuildMemberStore.getMember;
return Reflect.apply(getAutomodQuarantinedGuildMemberFlags, automodPermissionUtilsModule, [Reflect.apply(getMember,
GuildMemberStore, [guildId, id])]);
}
function _fun91434() { // fn#91434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12108:428, offset: 0x0206446f, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(11453) /* metro dependency 11453: GuildAutomodActionActionCreatorsNative */;
value.openAutomodProfileQuarantineAlert(guildId);
}
@@ -0,0 +1,36 @@
/* Metro module 11919; source: modules/chat_input/native/guard/ChatInputGuardGuildCommunicationDisabled.tsx; dependencies: [31, 1947, 33, 11920, 11904, 10317, 1244, 2] */
function _fun91413(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12105:6, offset: 0x02063858, size: 170 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(1947) /* metro dependency 1947: GuildDisableCommunicationConstants */).GUILD_COMMUNICATION_DISABLED_RESOURCE_LINK;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(CommunicationDisabledNoticeForGuild);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/guard/ChatInputGuardGuildCommunicationDisabled.tsx');
exports.default = value;
}
function CommunicationDisabledNoticeForGuild({guildMember}) { // fn#91414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12105:187, offset: 0x02063902, size: 317 bytes, params: 2, frame: 21
var date;
(require(11920) /* metro dependency 11920: useCommunicationDisabledCountdownCleanup */).useCommunicationDisabledCountdownCleanup(guildMember);
const communicationDisabledUntil = guildMember.communicationDisabledUntil;
if (communicationDisabledUntil == null) {
date = new global.Date();
} else {
date = new global.Date(communicationDisabledUntil);
}
const ChatInputGuard = importDefault(11904) /* metro dependency 11904: ChatInputGuard */;
const object2 = {type: 'simple-action'};
const ClockWarningIcon = (require(10317) /* metro dependency 10317: ClockWarningIcon */).ClockWarningIcon;
object2.icon = <ClockWarningIcon />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const VSpdzK = (require(1244) /* metro dependency 1244: indexNative */).t.VSpdzK;
object2.message = Reflect.apply(string, intl, [VSpdzK]);
object2.subtext = intl.format((require(1244) /* metro dependency 1244: indexNative */).t['4ZwD5G'],
{link: GUILD_COMMUNICATION_DISABLED_RESOURCE_LINK});
object2.countdown = undefined;
return <ChatInputGuard {...object2} />;
}
@@ -0,0 +1,103 @@
/* Metro module 11914; source: modules/chat_input/native/guard/ChatInputGuardGuildMemberVerification.tsx; dependencies: [31, 27, 4502, 11529, 661, 33, 4501, 8936, 3972, 11915, 1244, 4863, 8926, 11916, 5312, 8919, 566, 11904, 6760, 11917, 2] */
function _fun91401(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12100:6, offset: 0x0205e5cc, size: 292 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).Image;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const env0_5 = (require(11529) /* metro dependency 11529: ChatInputConstants */).TextAreaCta;
const env0_6 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({noticeIcon: {'height': 36,
'width': 36, 'resizeMode': 'contain'}, lottieAnimation: {'height': 36, 'width': 36}});
value = value.memo(ChatInputGuardGuildMemberVerification);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/guard/ChatInputGuardGuildMemberVerification.tsx');
exports.default = value;
}
function ChatInputGuardGuildMemberVerification({guildId}) { // fn#91402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12100:323, offset: 0x0205e6f0, size: 688 bytes, params: 2, frame: 26
var r4;
var r6;
var r7;
var r12;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var value4;
var defaultImport;
var xSmallIcon;
var value6;
var defaultImport2;
var value7;
const styles = useStyles();
const applicationStatus = (require(8936) /* metro dependency 8936: useCurrentUserGuildJoinRequest */).useCurrentUserGuildJoinRequest(guildId)?.applicationStatus;
const GuildJoinRequestApplicationStatuses = (require(3972) /* metro dependency 3972: MemberVerificationTypes */).GuildJoinRequestApplicationStatuses;
const REJECTED = GuildJoinRequestApplicationStatuses.REJECTED;
if (REJECTED === applicationStatus) {
defaultImport2 = importDefault(11915) /* metro dependency 11915 */;
value7 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.lk30cY);
r4 = ChatInputGuardGuildMemberVerificationA;
r6 = undefined;
r7 = value7;
r12 = defaultImport2;
} else if ((require(3972) /* metro dependency 3972: MemberVerificationTypes */).GuildJoinRequestApplicationStatuses.SUBMITTED === applicationStatus) {
defaultImport = importDefault(11916) /* metro dependency 11916 */;
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
xSmallIcon = <XSmallIcon />;
value6 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5iLvSx']);
r4 = ChatInputGuardGuildMemberVerificationA_91404;
r6 = xSmallIcon;
r7 = value6;
r12 = defaultImport;
} else {
value4 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rEBKvg);
r4 = ChatInputGuardGuildMemberVerificationA_91405;
r6 = undefined;
r7 = value4;
r12 = undefined;
}
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
return ((Component) => <Component type="simple-action" icon={r12 != null ? <Image style={styles.noticeIcon} source={r12} /> : ((Component) => <Component style={styles.lottieAnimation} source={require(11917) /* metro dependency 11917 */} autoPlay={!useReducedMotion} />)(importDefault(6760) /* metro dependency 6760: LottieAnimationView */)} message={r7} actionIcon={r6} actionLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['r8/DT+'])} actionOnPress={r4} />)(importDefault(11904) /* metro dependency 11904: ChatInputGuard */);
}
function ChatInputGuardGuildMemberVerificationA() { // fn#91403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12100:609, owner: ChatInputGuardGuildMemberVerification.A, offset: 0x0205e9a0, size: 113 bytes, params: 1, frame: 17
const value = environment.__proto__;
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = defaultImport.trackWithMetadata;
const TEXT_AREA_CTA_CLICKED = AnalyticEvents.TEXT_AREA_CTA_CLICKED;
const MEMBER_VERIFICATION_REJECTED = TextAreaCta.MEMBER_VERIFICATION_REJECTED;
Reflect.apply(trackWithMetadata, defaultImport, [TEXT_AREA_CTA_CLICKED, {cta_type: MEMBER_VERIFICATION_REJECTED}]);
(require(8926) /* metro dependency 8926: MemberVerificationAlertActionCreators */).openMemberVerificationRejectedAlert({guildId: guildId,
canWithdraw: false});
}
function ChatInputGuardGuildMemberVerificationA_91404() { // fn#91404, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12100:933, owner: ChatInputGuardGuildMemberVerification.A, offset: 0x0205ea11, size: 160 bytes, params: 1, frame: 18
var object2;
let value = environment.__proto__;
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = defaultImport.trackWithMetadata;
const TEXT_AREA_CTA_CLICKED = AnalyticEvents.TEXT_AREA_CTA_CLICKED;
const MEMBER_VERIFICATION_CONFIRMED = TextAreaCta.MEMBER_VERIFICATION_CONFIRMED;
Reflect.apply(trackWithMetadata, defaultImport, [TEXT_AREA_CTA_CLICKED, {cta_type: MEMBER_VERIFICATION_CONFIRMED}]);
value = require(8926) /* metro dependency 8926: MemberVerificationAlertActionCreators */;
const openMemberVerificationCancelPendingAlert = value.openMemberVerificationCancelPendingAlert;
object2 = {};
object2.guildId = guildId;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.subtitleText = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13tjTU']);
Reflect.apply(openMemberVerificationCancelPendingAlert, value, [object2]);
}
function ChatInputGuardGuildMemberVerificationA_91405() { // fn#91405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12100:1211, owner: ChatInputGuardGuildMemberVerification.A, offset: 0x0205eab1, size: 100 bytes, params: 1, frame: 17
let value = environment.__proto__;
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = defaultImport.trackWithMetadata;
const TEXT_AREA_CTA_CLICKED = AnalyticEvents.TEXT_AREA_CTA_CLICKED;
const MEMBER_VERIFICATION = TextAreaCta.MEMBER_VERIFICATION;
Reflect.apply(trackWithMetadata, defaultImport, [TEXT_AREA_CTA_CLICKED, {cta_type: MEMBER_VERIFICATION}]);
value = require(8919) /* metro dependency 8919: MemberVerificationModalActionCreators */;
value.openMemberVerificationModal(guildId);
}
@@ -0,0 +1,127 @@
/* Metro module 11913; source: modules/chat_input/native/guard/ChatInputGuardLurking.tsx; dependencies: [31, 3785, 1379, 11529, 661, 33, 566, 1230, 4863, 11261, 6927, 1314, 6946, 6593, 11904, 1244, 2] */
function _fun91395(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12099:6, offset: 0x0205df8d, size: 242 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const lurkingStore = importDefault(3785) /* metro dependency 3785: LurkingStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_7 = (require(11529) /* metro dependency 11529: ChatInputConstants */).TextAreaCta;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_8 = constantsModule.AnalyticEvents;
const env0_9 = constantsModule.JoinGuildSources;
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(ChatInputGuardLurking);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/guard/ChatInputGuardLurking.tsx');
exports.default = value;
}
function ChatInputGuardLurking({channel, isReadonlyAnnouncementsChannel}) { // fn#91396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12099:226, offset: 0x0205e07f, size: 822 bytes, params: 2, frame: 26
var r9;
var r0;
var ChatInputGuard;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var ChatInputGuard2;
let value = channel.getGuildId();
const {isLurking,
lurkingSource} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([LurkingStore],
_fun91397, [value]);
const binding = env0_4;
let useCallback = binding.useCallback;
const value5 = Reflect.apply(useCallback, binding, [_fun91398, []]);
useCallback = binding.useCallback;
object = [value];
object[1] = channel.id;
const value6 = Reflect.apply(useCallback, binding, [_fun91399, object]);
value = binding.useCallback(_fun91400, [value]);
const type = lurkingSource?.type;
const DIRECTORY_ENTRY = JoinGuildSources.DIRECTORY_ENTRY;
if (type === DIRECTORY_ENTRY) {
ChatInputGuard2 = importDefault(11904) /* metro dependency 11904: ChatInputGuard */;
value = <ChatInputGuard2 type="button-action" message={intl.string(t.G42YmG)} buttonSecondaryText={intl.string(t.GlKb5i)} buttonSecondaryOnPress={value5} buttonPrimaryText={intl.string(t.RLch70)} buttonPrimaryOnPress={value} />;
r0 = value;
} else {
ChatInputGuard = importDefault(11904) /* metro dependency 11904: ChatInputGuard */;
if (isReadonlyAnnouncementsChannel) {
object = {type: 'button-action'};
object.message = intl.string(t.Hl0Mqh);
r9 = isLurking ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.VJlc0S) : undefined;
object.buttonSecondaryText = r9;
r9 = isLurking ? value : undefined;
object.buttonSecondaryOnPress = r9;
object.buttonPrimaryText = intl.string(t['3aOv+h']);
object.buttonPrimaryOnPress = value6;
r0 = object;
} else {
object = {type: 'button-action'};
object.message = intl.string(t.G42YmG);
object.buttonPrimaryText = intl.string(t.RLch70);
object.buttonPrimaryOnPress = value;
r0 = object;
}
value = <ChatInputGuard {...r0} />;
r0 = value;
}
return r0;
}
function _fun91397() { // fn#91397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12099:364, offset: 0x0205e3b5, size: 74 bytes, params: 1, frame: 14
const object2 = {};
object2.isLurking = env0_1 != null && LurkingStore.isLurking(env0_1);
object2.lurkingSource = LurkingStore.getLurkingSourceForGuild(env0_1);
return object2;
}
function _fun91398() { // fn#91398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12099:505, offset: 0x0205e3ff, size: 47 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(1230) /* metro dependency 1230: router_utils */;
value = value.getHistory();
value.goBack();
}
function _fun91399() { // fn#91399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12099:563, offset: 0x0205e42e, size: 122 bytes, params: 1, frame: 18
var value2;
var defaultImport;
var moduleValue;
if (env0_1 != null) {
value2 = environment.__proto__;
defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
defaultImport.trackWithMetadata(AnalyticEvents.TEXT_AREA_CTA_CLICKED,
{cta_type: TextAreaCta.FOLLOW_ANNOUNCEMENT});
moduleValue = require(11261) /* metro dependency 11261: showChannelFollowingActionSheet */;
moduleValue.showChannelFollowingActionSheet(channel.id, env0_1);
}
}
function _fun91400() { // fn#91400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12099:740, offset: 0x0205e4a8, size: 292 bytes, params: 1, frame: 19
var value2;
var lurkingSourceForGuild;
var value5;
var moduleValue;
var moduleValue2;
var trackGuildJoinClicked;
var binding;
var value;
if (env0_1 != null) {
value2 = environment.__proto__;
lurkingSourceForGuild = LurkingStore.getLurkingSourceForGuild(env0_1);
if (lurkingSourceForGuild?.type === JoinGuildSources.DIRECTORY_ENTRY) {
value5 = ChannelStore.getChannel(lurkingSourceForGuild.directoryChannelId);
if (value5 != null) {
moduleValue = require(6927) /* metro dependency 6927: HubProgressActionCreators */;
moduleValue.setHubProgressActionComplete(value5.getGuildId(),
(require(1314) /* metro dependency 1314: preloaded_user_settings */).HubProgressStep.JOIN_GUILD);
}
}
moduleValue2 = importAll(6946) /* metro dependency 6946: GuildDiscoveryUtils */;
trackGuildJoinClicked = moduleValue2.trackGuildJoinClicked;
binding = env0_1;
Reflect.apply(trackGuildJoinClicked, moduleValue2, [binding]);
value = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
value.trackWithMetadata(AnalyticEvents.TEXT_AREA_CTA_CLICKED, {cta_type: TextAreaCta.JOIN_GUILD});
value = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
value.joinGuild(binding, {source: JoinGuildSources.CHAT_INPUT_BLOCKER});
}
}
@@ -0,0 +1,101 @@
/* Metro module 11894; source: modules/chat_input/native/guard/ChatInputGuardLurkingPreviewBar.tsx; dependencies: [31, 27, 1867, 11529, 661, 33, 4501, 697, 566, 4080, 9300, 1962, 4863, 5278, 6819, 4573, 6915, 1305, 6818, 1244, 9321, 2] */
function _fun91297(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12080:6, offset: 0x0205a6bf, size: 642 bytes, params: 8, frame: 25
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const env0_6 = (require(11529) /* metro dependency 11529: ChatInputConstants */).TextAreaCta;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_7 = constantsModule.AnalyticEvents;
const env0_8 = constantsModule.JoinGuildSources;
const value3 = require(33) /* metro dependency 33 */;
const env0_9 = value3.jsx;
const env0_10 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object5 = {};
const BACKGROUND_SURFACE_HIGHEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGHEST;
object5.backgroundColor = BACKGROUND_SURFACE_HIGHEST;
const TABLE_ROW_BORDER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_BORDER_RADIUS;
object5.borderRadius = TABLE_ROW_BORDER_RADIUS;
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.paddingHorizontal = PX_12;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.paddingVertical = PX_12;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.gap = PX_12;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object5.borderColor = BORDER_SUBTLE;
object5.borderWidth = 1;
const SHADOW_HIGH = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_HIGH;
copyDataProperties(object5, SHADOW_HIGH, undefined);
object3.cardContainer = object5;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object3.headerRow = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_12};
const object6 = {};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object3.guildIcon = object6;
object3.textColumn = {'flex': 1, 'flexShrink': 1, 'minWidth': 0};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object3.nameRow = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_4};
object3.chevron = {marginLeft: -2};
object3.badge = {flexShrink: 0};
const env0_11 = Reflect.apply(createStyles, createStylesModule, [object3]);
value = value.memo(ChatInputGuardLurkingPreviewBar);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/guard/ChatInputGuardLurkingPreviewBar.tsx');
exports.default = value;
}
function ChatInputGuardLurkingPreviewBar({guildId}) { // fn#91298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12080:868, offset: 0x0205a941, size: 729 bytes, params: 2, frame: 34
var r0;
var PressableOpacity;
var name;
var items2;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items4;
var intl;
const styles = useStyles();
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
}, [guildId]);
const binding = env0_3;
if (value2 == null) {
r0 = null;
} else {
var viewBindingProps = {style: styles.cardContainer};
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
var pressableOpacityProps = {style: styles.headerRow, onPress: binding.useCallback(_fun91300, [guildId]),
accessibilityRole: 'button'};
name = value2.name;
pressableOpacityProps.accessibilityLabel = name;
items2 = [((Component) => <Component guild={value2} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.LARGE} style={styles.guildIcon} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */)];
var viewBindingProps2 = {style: styles.textColumn};
name = value2.name;
items4 = [<View style={styles.nameRow}><Text variant="text-md/semibold" color="text-default" lineClamp={1}>{name}</Text>{((Component) => <Component size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL} guild={value2} style={styles.badge} />)(importDefault(6915) /* metro dependency 6915: GuildBadgeV2 */)}{((ChevronSmallRightIcon) => <ChevronSmallRightIcon size="xs" color={(importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED} style={styles.chevron} />)((require(6818) /* metro dependency 6818: ChevronSmallRightIcon */).ChevronSmallRightIcon)}</View>];
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items4[1] = <Text variant="text-sm/normal" color="text-muted" lineClamp={1}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.BRSnEj)}</Text>;
items2[1] = <View {...viewBindingProps2}>{items4}</View>;
r0 = <View {...viewBindingProps}><PressableOpacity {...pressableOpacityProps}>{items2}</PressableOpacity>{((Component) => <Component guildId={guildId} joinSource={JoinGuildSources.CHAT_INPUT_BLOCKER} onBeforeJoin={binding.useCallback(function() {
var defaultImport = importDefault(dependencyMap[12]);
var TEXT_AREA_CTA_CLICKED = AnalyticEvents.TEXT_AREA_CTA_CLICKED;
defaultImport.trackWithMetadata(TEXT_AREA_CTA_CLICKED, {cta_type: TextAreaCta.JOIN_GUILD});
}, [])} />)(importDefault(9321) /* metro dependency 9321: LurkerServerPreviewJoinButton */)}</View>;
}
return r0;
}
function _fun91300() { // fn#91300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12080:1007, offset: 0x0205ac1a, size: 111 bytes, params: 1, frame: 17
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[9]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[11]);
value = value(dependencyMap[10], dependencyMap.paths);
const guildIdBinding = guildId;
Reflect.apply(openLazy, defaultImport, [value, 'GuildProfileActionSheet:' + guildIdBinding,
{guildId: guildIdBinding}]);
}
@@ -0,0 +1,95 @@
/* Metro module 11895; source: modules/chat_input/native/guard/ChatInputGuardMessageRequest.tsx; dependencies: [5, 31, 1878, 33, 1484, 11896, 566, 11898, 3857, 1244, 8947, 4601, 11904, 2] */
function _fun91302(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12081:6, offset: 0x0205accb, size: 180 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 */;
let value = importAll(31) /* metro dependency 31 */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(ChatInputGuardMessageRequest);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/guard/ChatInputGuardMessageRequest.tsx');
exports.default = value;
}
function ChatInputGuardMessageRequest({channel}) { // fn#91303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12081:156, offset: 0x0205ad7f, size: 636 bytes, params: 2, frame: 29
var object2;
const env0_1 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const value2 = (require(11896) /* metro dependency 11896: useIsMessageRequestRestrictedViewer */).useIsMessageRequestRestrictedViewer('ChatInputGuardMessageRequest');
const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(channel.getRecipientId());
});
const value3 = (require(11898) /* metro dependency 11898: useMessageRequestActions */).useMessageRequestActions({user: user,
onError: function() {
var defaultImport = importDefault(dependencyMap[8]);
var object = {key: 'MESSAGE_REQUEST_REQUEST_ERROR_ALERT_TITLE'};
object.content = require(dependencyMap[9]).intl.string(require(dependencyMap[9]).t['EDYbS+']);
object.icon = importDefault(dependencyMap[10]);
defaultImport.open(object);
}, onRejectSuccess: onRejectSuccess});
const env0_2 = value3.acceptMessageRequest;
const env0_3 = value3.rejectMessageRequest;
const isAcceptLoading = value3.isAcceptLoading;
const isRejectLoading = value3.isRejectLoading;
const isUserProfileLoading = value3.isUserProfileLoading;
const isOptimisticAccepted = value3.isOptimisticAccepted;
const isOptimisticRejected = value3.isOptimisticRejected;
let r6 = isAcceptLoading || isRejectLoading;
r6 = !r6 ? isUserProfileLoading : r6;
r6 = !r6 ? isOptimisticAccepted : r6;
r6 = !r6 ? isOptimisticRejected : r6;
const value4 = _fun91307();
const value5 = _fun91311();
const ChatInputGuard = importDefault(11904) /* metro dependency 11904: ChatInputGuard */;
object2 = {type: 'button-action'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2.message = Reflect.apply(string, intl, [t['e/eQVB']]);
object2.subtext = intl.string(value2 ? t.YQ0uUE : t.HcVzGI);
string = intl.string;
const Kz8Pwr = (require(1244) /* metro dependency 1244: indexNative */).t.Kz8Pwr;
object2.buttonPrimaryText = Reflect.apply(string, intl, [Kz8Pwr]);
object2.buttonPrimaryOnPress = value4;
object2.buttonPrimaryDisabled = r6;
let r9 = isAcceptLoading || isUserProfileLoading;
r9 = !r9 ? isOptimisticAccepted : r9;
object2.buttonPrimaryLoading = r9;
object2.buttonSecondaryText = intl.string(value2 ? t.BVN4pL : t.B2nygW);
object2.buttonSecondaryOnPress = value5;
object2.buttonSecondaryDisabled = r6;
object2.buttonSecondaryLoading = isRejectLoading || isOptimisticRejected;
return <ChatInputGuard {...object2} />;
}
function _fun91307() { // fn#91307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12081:784, offset: 0x0205b099, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun91309);
return _fun91310;
}
function _fun91311() { // fn#91311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12081:967, offset: 0x0205b13b, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun91313);
return _fun91314;
}
function* _fun91309(a0) { // fn#91309, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12081:804, offset: 0x0205b0c8, size: 115 bytes, params: 2, frame: 17
if (true) {
a0.stopPropagation();
value = environment.__proto__.__proto__;
yield dependencyMap(require.id);
if (false) {
return undefined;
}
var value6 = env3_0(env3_2[11]);
value6.transitionToChannel(require.id, {navigationReplace: true});
}
}
function* _fun91313(a0) { // fn#91313, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12081:987, offset: 0x0205b16a, size: 62 bytes, params: 2, frame: 12
if (true) {
a0.stopPropagation();
value = environment.__proto__.__proto__;
yield env2_3(require.id);
}
}
@@ -0,0 +1,28 @@
/* Metro module 11909; source: modules/chat_input/native/guard/ChatInputGuardQuarantineDM.tsx; dependencies: [31, 11910, 33, 11904, 11911, 1244, 2] */
function _fun91388(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12095:6, offset: 0x0205dae9, size: 170 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(11910) /* metro dependency 11910: QuarantineConstants */).QUARANTINE_APPEAL_LINK;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(ChatInputGuardQuarantineDM);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/guard/ChatInputGuardQuarantineDM.tsx');
exports.default = value;
}
function ChatInputGuardQuarantineDM() { // fn#91389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12095:167, offset: 0x0205db93, size: 197 bytes, params: 1, frame: 20
const ChatInputGuard = importDefault(11904) /* metro dependency 11904: ChatInputGuard */;
const object2 = {type: 'simple-action'};
const ChatWarningIcon = (require(11911) /* metro dependency 11911: ChatWarningIcon */).ChatWarningIcon;
object2.icon = <ChatWarningIcon />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const EouHwv = (require(1244) /* metro dependency 1244: indexNative */).t.EouHwv;
object2.message = Reflect.apply(string, intl, [EouHwv]);
const format = intl.format;
const PThBel = (require(1244) /* metro dependency 1244: indexNative */).t.PThBel;
object2.subtext = Reflect.apply(format, intl, [PThBel, {appealLink: QUARANTINE_APPEAL_LINK}]);
return <ChatInputGuard {...object2} />;
}
@@ -0,0 +1,150 @@
/* Metro module 11925; source: modules/chat_input/native/guard/ChatInputGuardReadonly.tsx; dependencies: [31, 1383, 1379, 1935, 3784, 4605, 3793, 1878, 11529, 661, 33, 11810, 566, 1360, 1244, 4805, 4863, 1230, 21, 11904, 2] */
function _fun91438(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12111:6, offset: 0x0206456c, size: 350 bytes, params: 8, frame: 19
const env0_0 = require;
const sortChannelsByLastMessageId = function(a0, a1) {
return importDefault(dependencyMap[18]).compare(ReadStateStore.lastMessageId(a1.id),
ReadStateStore.lastMessageId(a0.id));
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(1383) /* metro dependency 1383: ChannelRecord */).isTextChannel;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
const env0_6 = (require(1935) /* metro dependency 1935: GuildChannelStore */).GUILD_SELECTABLE_CHANNELS_KEY;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_11 = (require(11529) /* metro dependency 11529: ChatInputConstants */).TextAreaCta;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_12 = constantsModule.AnalyticEvents;
const env0_13 = constantsModule.Permissions;
const env0_14 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(ChatInputGuardReadonly);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/guard/ChatInputGuardReadonly.tsx');
exports.default = value;
}
function ChatInputGuardReadonly(a0) { // fn#91440, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12111:437, offset: 0x0206471f, size: 155 bytes, params: 2, frame: 19
const {text, handlePress} = useNotice(a0.guildId, a0.channel);
const ChatInputGuard = importDefault(11904) /* metro dependency 11904: ChatInputGuard */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<ChatInputGuard
type="simple-action"
actionOnPress={handlePress}
actionLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9cs5LM'])}
message={text}
/>
);
}
function useNotice(a0, a1) { // fn#91441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12111:498, owner: ChatInputGuardReadonly.useNotice, offset: 0x020647ba, size: 610 bytes, params: 3, frame: 25
var environment;
var r6;
var r0;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var q1krfU;
var moduleValue6;
var object2;
const env0_0 = a0;
const value = environment.__proto__;
const value2 = undefined;
const memberActionUtilsModule = require(11810) /* metro dependency 11810: MemberActionUtils */;
const useMemberActionsForChannel = memberActionUtilsModule.useMemberActionsForChannel;
const channelAction = Reflect.apply(useMemberActionsForChannel, memberActionUtilsModule, [a0, a1]).channelAction;
const env0_1 = memberActionUtilsModule.useNextMemberAction(a0,
channelAction == null ? value2 : channelAction.channelId);
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
let object = [ChannelStore];
const channel = Reflect.apply(useStateFromStores, fluxModule, [object, _fun91442]);
const value4 = fluxModule.useStateFromStoresArray([PermissionStore], _fun91445,
[fluxModule.useStateFromStoresArray([GuildChannelStore], _fun91443)]);
if (channel != null) {
formatToPlainString = intl.formatToPlainString;
q1krfU = t.q1krfU;
object2 = {};
object2.channelName = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(channel,
UserStore, RelationshipStore);
r0 = {text: Reflect.apply(formatToPlainString, intl, [q1krfU, object2]), handlePress: handlePress_91448};
} else if (value4.length === 0) {
object = {};
object.text = intl.string(t['gHD/nZ']);
object.handlePress = handlePress_91449;
r0 = object;
} else {
formatToPlainString = intl.formatToPlainString;
q1krfU = t.q1krfU;
if (value4[0] != null) {
moduleValue6 = require(4805) /* metro dependency 4805: useChannelName */;
r6 = moduleValue6.computeChannelName(value4[0], UserStore, RelationshipStore);
} else {
r6 = '';
}
r0 = {text: Reflect.apply(formatToPlainString, intl, [q1krfU, {channelName: r6}]),
handlePress: handlePress_91450};
}
return r0;
}
function _fun91442() { // fn#91442, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12111:679, offset: 0x02064a1c, size: 46 bytes, params: 1, frame: 13
return ChannelStore.getChannel(env0_1?.channelId);
}
function _fun91443() { // fn#91443, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12111:766, offset: 0x02064a4a, size: 69 bytes, params: 1, frame: 12
const value4 = GuildChannelStore.getChannels(env0_0)[GUILD_SELECTABLE_CHANNELS_KEY].map(function(a0) {
return a0.channel;
});
return value4.sort(sortChannelsByLastMessageId);
}
function _fun91445() { // fn#91445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12111:886, offset: 0x02064a8f, size: 86 bytes, params: 1, frame: 14
var environment;
const binding = env0_3;
const filter = binding.filter;
let value = environment.__proto__.__proto__;
value = Reflect.apply(filter, binding, [(require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish]);
value = value.filter(function(a0) {
return isTextChannel(a0.type);
});
return value.filter(function(a0) {
return PermissionStore.can(Permissions.SEND_MESSAGES, a0);
});
}
function useNoticeHandlePress() { // fn#91448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12111:1124, owner: ChatInputGuardReadonly.useNotice.handlePress, offset: 0x02064b1f, size: 110 bytes, params: 1, frame: 17
let value = environment.__proto__.__proto__;
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = defaultImport.trackWithMetadata;
const TEXT_AREA_CTA_CLICKED = AnalyticEvents.TEXT_AREA_CTA_CLICKED;
const CHANNEL_LINK = TextAreaCta.CHANNEL_LINK;
Reflect.apply(trackWithMetadata, defaultImport, [TEXT_AREA_CTA_CLICKED, {cta_type: CHANNEL_LINK}]);
value = require(1230) /* metro dependency 1230: router_utils */;
value.transitionToGuild(env0_0, channel.id);
}
function useNoticeHandlePress_91449() { // fn#91449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12111:1318, owner: ChatInputGuardReadonly.useNotice.handlePress, offset: 0x02064b8d, size: 101 bytes, params: 1, frame: 17
const value = environment.__proto__.__proto__;
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = defaultImport.trackWithMetadata;
const TEXT_AREA_CTA_CLICKED = AnalyticEvents.TEXT_AREA_CTA_CLICKED;
const CHANNEL_LIST = TextAreaCta.CHANNEL_LIST;
Reflect.apply(trackWithMetadata, defaultImport, [TEXT_AREA_CTA_CLICKED, {cta_type: CHANNEL_LIST}]);
(require(1230) /* metro dependency 1230: router_utils */).transitionToGuild(env0_0, undefined);
}
function useNoticeHandlePress_91450() { // fn#91450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12111:1577, owner: ChatInputGuardReadonly.useNotice.handlePress, offset: 0x02064bf2, size: 116 bytes, params: 1, frame: 17
let value = environment.__proto__.__proto__;
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = defaultImport.trackWithMetadata;
const TEXT_AREA_CTA_CLICKED = AnalyticEvents.TEXT_AREA_CTA_CLICKED;
const CHANNEL_LINK = TextAreaCta.CHANNEL_LINK;
Reflect.apply(trackWithMetadata, defaultImport, [TEXT_AREA_CTA_CLICKED, {cta_type: CHANNEL_LINK}]);
value = require(1230) /* metro dependency 1230: router_utils */;
value.transitionToGuild(env0_0, env0_4[0].id);
}
@@ -0,0 +1,46 @@
/* Metro module 11918; source: modules/chat_input/native/guard/ChatInputGuardRequiredLobbyApplicationAuthorization.tsx; dependencies: [31, 27, 33, 4501, 697, 11904, 1244, 3853, 2] */
function _fun91410(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12104:6, offset: 0x020635cb, size: 243 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).Image;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {'height': 40, 'width': 40, 'resizeMode': 'contain'};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const env0_5 = Reflect.apply(createStyles, createStylesModule, [{icon: object}]);
value = value.memo(ChatInputGuardRequiredLobbyApplicationAuthorization);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/guard/ChatInputGuardRequiredLobbyApplicationAuthorization.tsx');
exports.default = value;
}
function ChatInputGuardRequiredLobbyApplicationAuthorization({showLinkedLobbyApplicationLoadingIndicator, requiredLinkedLobbyApplication}) { // fn#91411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12104:253, offset: 0x020636be, size: 365 bytes, params: 2, frame: 24
const styles = useStyles();
if (showLinkedLobbyApplicationLoadingIndicator) {
return ((Component) => <Component type="simple-action" message="" />)(importDefault(11904) /* metro dependency 11904: ChatInputGuard */);
}
if (requiredLinkedLobbyApplication == null) {
return ((Component) => <Component type="simple-action" message="" />)(importDefault(11904) /* metro dependency 11904: ChatInputGuard */);
}
const iconSource = requiredLinkedLobbyApplication.getIconSource(80);
const connectionEntrypointUrl = requiredLinkedLobbyApplication.connectionEntrypointUrl;
const ChatInputGuard = importDefault(11904) /* metro dependency 11904: ChatInputGuard */;
const defaultImportProps = {type: 'simple-action',
icon: iconSource != null ? <Image style={styles.icon} source={iconSource} /> : undefined};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const format = intl.format;
const EvDn1D = (require(1244) /* metro dependency 1244: indexNative */).t.EvDn1D;
defaultImportProps.message = Reflect.apply(format, intl, [EvDn1D, {name: requiredLinkedLobbyApplication.name}]);
defaultImportProps.actionLabel = connectionEntrypointUrl != null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.S0W8Z5) : undefined;
defaultImportProps.actionOnPress = connectionEntrypointUrl != null ? _fun91412 : undefined;
return <ChatInputGuard {...defaultImportProps} />;
}
function _fun91412() { // fn#91412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12104:760, offset: 0x0206382b, size: 45 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = importDefault(3853) /* metro dependency 3853: Linking */;
return value.openURLExternally(connectionEntrypointUrl);
}
@@ -0,0 +1,47 @@
/* Metro module 11912; source: modules/chat_input/native/guard/ChatInputGuardReturnToGameProfile.tsx; dependencies: [31, 27, 33, 4501, 697, 11904, 1423, 1244, 10207, 2] */
function _fun91393(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12098:6, offset: 0x0205dd36, size: 243 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).Image;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {'height': 40, 'width': 40, 'resizeMode': 'contain'};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const env0_5 = Reflect.apply(createStyles, createStylesModule, [{icon: object}]);
value = value.memo(ChatInputGuardReturnToGameProfile);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/guard/ChatInputGuardReturnToGameProfile.tsx');
exports.default = value;
}
function ChatInputGuardReturnToGameProfile({pendingGameProfileReturn}) { // fn#91394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12098:253, offset: 0x0205de29, size: 356 bytes, params: 2, frame: 23
var r5;
var moduleValue;
const styles = useStyles();
const ChatInputGuard = importDefault(11904) /* metro dependency 11904: ChatInputGuard */;
const object2 = {type: 'simple-action'};
if (pendingGameProfileReturn.gameIconUrl != null) {
var imageBindingProps = {style: styles.icon};
moduleValue = require(1423) /* metro dependency 1423: AvatarUtils */;
imageBindingProps.source = moduleValue.makeSource(pendingGameProfileReturn.gameIconUrl);
r5 = <Image {...imageBindingProps} />;
} else {
r5 = undefined;
}
object2.icon = r5;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const format = intl.format;
const HRHaSF = (require(1244) /* metro dependency 1244: indexNative */).t.HRHaSF;
object2.message = Reflect.apply(format, intl, [HRHaSF, {gameName: pendingGameProfileReturn.gameName}]);
const string = intl.string;
const DjifDP = (require(1244) /* metro dependency 1244: indexNative */).t.DjifDP;
object2.actionLabel = Reflect.apply(string, intl, [DjifDP]);
const ArrowSmallLeftIcon = (require(10207) /* metro dependency 10207: ArrowSmallLeftIcon */).ArrowSmallLeftIcon;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object2.actionIcon = <ArrowSmallLeftIcon color={WHITE} />;
object2.actionOnPress = pendingGameProfileReturn.onReturnToGameProfile;
return <ChatInputGuard {...object2} />;
}
@@ -0,0 +1,73 @@
/* Metro module 11907; source: modules/chat_input/native/guard/ChatInputGuardSpamMessageRequest.tsx; dependencies: [31, 1878, 33, 1484, 566, 11908, 11898, 3857, 1244, 8947, 11904, 4601, 2] */
function _fun91373(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12093:6, offset: 0x0205d3c4, size: 168 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(ChatInputGuardSpamMessageRequest);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/guard/ChatInputGuardSpamMessageRequest.tsx');
exports.default = value;
}
function ChatInputGuardSpamMessageRequest({channel}) { // fn#91374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12093:146, offset: 0x0205d46c, size: 586 bytes, params: 2, frame: 25
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(channel.getRecipientId());
});
const useLongestChannelMessageBeforeReplyModule = require(11908) /* metro dependency 11908: useLongestChannelMessageBeforeReply */;
const useLongestChannelMessageBeforeReply = useLongestChannelMessageBeforeReplyModule.useLongestChannelMessageBeforeReply;
const id = channel.id;
const getRecipientId = channel.getRecipientId;
const env0_2 = Reflect.apply(useLongestChannelMessageBeforeReply, useLongestChannelMessageBeforeReplyModule, [id,
Reflect.apply(getRecipientId, channel, [])]);
const value4 = (require(11898) /* metro dependency 11898: useMessageRequestActions */).useMessageRequestActions({user: user,
onError: function() {
var defaultImport = importDefault(dependencyMap[7]);
var object = {key: 'MESSAGE_REQUEST_REQUEST_ERROR_ALERT_TITLE'};
object.content = require(dependencyMap[8]).intl.string(require(dependencyMap[8]).t['EDYbS+']);
object.icon = importDefault(dependencyMap[9]);
defaultImport.open(object);
}, onRejectSuccess: env0_3.useCallback(_fun91376, [value2])});
var env0_3 = value4.rejectMessageRequest;
const isRejectLoading = value4.isRejectLoading;
const isUserProfileLoading = value4.isUserProfileLoading;
const isOptimisticRejected = value4.isOptimisticRejected;
const env0_4 = value4.markAsNotSpam;
let r5 = isRejectLoading || isUserProfileLoading;
r5 = !r5 ? isOptimisticRejected : r5;
const ChatInputGuard = importDefault(11904) /* metro dependency 11904: ChatInputGuard */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<ChatInputGuard
type="button-action"
message={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fS08qB)}
subtext={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8U5OXE'])}
buttonPrimaryText={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)}
buttonPrimaryOnPress={function(a0) {
a0.stopPropagation();
rejectMessageRequest(channel.id);
}}
buttonPrimaryDisabled={r5}
buttonPrimaryLoading={isRejectLoading || isOptimisticRejected}
buttonPrimaryVariant="destructive"
buttonSecondaryText={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.olZgw5)}
buttonSecondaryOnPress={buttonSecondaryOnPress}
buttonSecondaryDisabled={r5}
buttonSecondaryLoading={isUserProfileLoading}
/>
);
}
function buttonSecondaryOnPress(a0) { // fn#91379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12093:1146, owner: ChatInputGuardSpamMessageRequest.buttonSecondaryOnPress, offset: 0x0205d755, size: 48 bytes, params: 2, frame: 15
a0.stopPropagation();
markAsNotSpam(channel, env0_2, _fun91380);
}
function _fun91380() { // fn#91380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12093:1177, offset: 0x0205d785, size: 60 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = require(4601) /* metro dependency 4601: transitionToChannel */;
return value.transitionToChannel(channel.id, {navigationReplace: true});
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,48 @@
/* Metro module 11536; source: modules/chat_input/native/useAnniversaryPlaceholder.tsx; dependencies: [8326, 566, 11433, 2] */
function _fun88357(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11722:6, offset: 0x01fe089a, size: 114 bytes, params: 8, frame: 18
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const premiumGiftingIntentStore = importDefault(8326) /* metro dependency 8326: PremiumGiftingIntentStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/useAnniversaryPlaceholder.tsx');
exports.default = function(a0) {
var env0_0 = a0;
return require(dependencyMap[1]).useStateFromStores([PremiumGiftingIntentStore], _fun88359, [a0]);
};
}
function useAnniversaryPlaceholder(a0) { // fn#88358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11722:205, offset: 0x01fe090c, size: 75 bytes, params: 2, frame: 16
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([PremiumGiftingIntentStore], _fun88359,
[a0]);
}
function _fun88359() { // fn#88359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11722:282, offset: 0x01fe0957, size: 121 bytes, params: 1, frame: 14
var r1;
var value3;
var friendAnniversaries;
var value;
const value2 = null;
if (value2 != env0_0) {
var binding = env0_0;
if (binding.isDM()) {
value = env0_0.getRecipientId();
if (value2 != value) {
value3 = environment.__proto__;
friendAnniversaries = PremiumGiftingIntentStore.getFriendAnniversaries();
if (friendAnniversaries.includes(value)) {
value = require(11433) /* metro dependency 11433: GiftIntentExpressionPickerState */;
value = value.getGiftIntentCustomMessagePlaceholder();
r1 = value;
} else {
r1 = value2;
}
} else {
r1 = value2;
}
return r1;
}
}
return value2;
}
@@ -0,0 +1,145 @@
/* Metro module 7729; source: modules/chat_input/native/useChatBottomManagerUIStore.tsx; dependencies: [587, 629, 4015, 2] */
function _fun61850(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7907:6, offset: 0x01b4c94a, size: 225 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 */;
value = value.create(_fun61852);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/useChatBottomManagerUIStore.tsx');
exports.default = value;
exports.updateChatInputContainerHeight = updateChatInputContainerHeight;
exports.updateShowingAutoComplete = updateShowingAutoComplete;
exports.updateShouldShowJumpToPresentButton = updateShouldShowJumpToPresentButton;
exports.useChatInputContainerHeight = useChatInputContainerHeight;
exports.useChatShowingAutoComplete = useChatShowingAutoComplete;
exports.updateIsAtBottom = updateIsAtBottom;
exports.useChatIsAtBottom = useChatIsAtBottom;
exports.useBestActiveChatInputContainerHeight = useBestActiveChatInputContainerHeight;
}
function getChatInputContainerHeight() { // fn#61851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7907:125, offset: 0x01b4ca2b, size: 59 bytes, params: 1, frame: 14
const value2 = 0;
const Storage = require(dependencyMap[value2]).Storage;
return Storage.get(env0_2, value2) ?? value2;
}
function _fun61852() { // fn#61852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7907:238, offset: 0x01b4ca66, size: 130 bytes, params: 1, frame: 11
const object2 = {};
let Map = global.Map;
object2.chatInputContainerHeight = new Map();
Map = global.Map;
object2.showingAutoComplete = new Map();
Map = global.Map;
object2.showJumpToPresentButtonChannelId = new Map();
Map = global.Map;
object2.isAtBottom = new Map();
return object2;
}
function updateChatInputContainerHeight(a0, a1) { // fn#61853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7907:513, offset: 0x01b4cae8, size: 99 bytes, params: 3, frame: 15
const env0_0 = a0;
const env0_1 = a1;
if (typeof a0 === 'number') {
(require(587) /* metro dependency 587: Storage */).Storage.set(env0_2, a1);
}
env0_3.setState(_fun61854);
}
function updateShowingAutoComplete(a0, a1) { // fn#61855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7907:784, offset: 0x01b4cb8f, size: 43 bytes, params: 3, frame: 11
const env0_0 = a0;
const env0_1 = a1;
env0_3.setState(_fun61856);
}
function updateShouldShowJumpToPresentButton(a0, a1, a2) { // fn#61857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7907:961, offset: 0x01b4cbfe, size: 50 bytes, params: 4, frame: 11
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
env0_3.setState(_fun61858);
}
function useChatInputContainerHeight(a0) { // fn#61859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7907:1177, offset: 0x01b4cc7d, size: 30 bytes, params: 2, frame: 11
const env0_0 = a0;
return env0_3(_fun61860);
}
function useChatShowingAutoComplete(a0) { // fn#61861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7907:1353, offset: 0x01b4ccca, size: 30 bytes, params: 2, frame: 11
const env0_0 = a0;
return env0_3(_fun61862);
}
function updateIsAtBottom(a0, a1) { // fn#61863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7907:1484, offset: 0x01b4cd10, size: 43 bytes, params: 3, frame: 11
const env0_0 = a0;
const env0_1 = a1;
env0_3.setState(_fun61864);
}
function useChatIsAtBottom(a0) { // fn#61865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7907:1652, offset: 0x01b4cd9d, size: 30 bytes, params: 2, frame: 11
const env0_0 = a0;
return env0_3(_fun61866);
}
function useBestActiveChatInputContainerHeight() { // fn#61867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7907:1786, offset: 0x01b4cde3, size: 23 bytes, params: 1, frame: 11
return env0_3(_fun61868);
}
function _fun61854({chatInputContainerHeight}) { // fn#61854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7907:659, offset: 0x01b4cb4b, size: 68 bytes, params: 2, frame: 13
const Map = global.Map;
const map = new Map(chatInputContainerHeight);
map.set(env0_0, require);
return {chatInputContainerHeight: map};
}
function _fun61856({showingAutoComplete}) { // fn#61856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7907:836, offset: 0x01b4cbba, size: 68 bytes, params: 2, frame: 13
const Map = global.Map;
const map = new Map(showingAutoComplete);
map.set(env0_0, require);
return {showingAutoComplete: map};
}
function _fun61858({showJumpToPresentButtonChannelId}) { // fn#61858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7907:1025, offset: 0x01b4cc30, size: 77 bytes, params: 2, frame: 15
const Map = global.Map;
const map = new Map(showJumpToPresentButtonChannelId);
map.set(require, importDefault ? env0_0 : undefined);
return {showJumpToPresentButtonChannelId: map};
}
function _fun61860({chatInputContainerHeight}) { // fn#61860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7907:1227, offset: 0x01b4cc9b, size: 47 bytes, params: 2, frame: 11
var r0;
let value = chatInputContainerHeight.get(env0_0);
if (value != null) {
r0 = value;
} else {
value = environment.__proto__;
value = getChatInputContainerHeight();
r0 = value;
}
return r0;
}
function _fun61862({showingAutoComplete}) { // fn#61862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7907:1402, offset: 0x01b4cce8, size: 40 bytes, params: 2, frame: 11
const value = showingAutoComplete.get(env0_0);
return value != null && value;
}
function _fun61864(a0) { // fn#61864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7907:1527, offset: 0x01b4cd3b, size: 98 bytes, params: 2, frame: 14
if (a0.isAtBottom.get(env0_0) === require) {
return a0;
}
const Map = global.Map;
const map = new Map(a0.isAtBottom);
map.set(env0_0, require);
return {isAtBottom: map};
}
function _fun61866({isAtBottom}) { // fn#61866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7907:1692, offset: 0x01b4cdbb, size: 40 bytes, params: 2, frame: 11
const value = isAtBottom.get(env0_0);
return value != null && value;
}
function _fun61868(a0) { // fn#61868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7907:1845, offset: 0x01b4cdfa, size: 84 bytes, params: 2, frame: 14
const value = environment.__proto__;
const highestActiveScreenIndex = (require(4015) /* metro dependency 4015: ChatInputUtils */).getHighestActiveScreenIndex();
return highestActiveScreenIndex == null ? getChatInputContainerHeight() : a0.chatInputContainerHeight.get(highestActiveScreenIndex) ?? getChatInputContainerHeight();
}
@@ -0,0 +1,93 @@
/* Metro module 11533; source: modules/chat_input/native/useChatInputMaxHeight.tsx; dependencies: [57, 31, 1480, 11529, 1851, 5466, 4022, 1583, 1478, 11534, 4504, 4507, 4017, 2] */
function _fun88343(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11719:6, offset: 0x01fe0014, size: 220 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = getChatInputMaxHeight;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const subscribeToKeyboardUIStore = importDefault(1480) /* metro dependency 1480: subscribeToKeyboardUIStore */;
const env0_6 = (require(11529) /* metro dependency 11529: ChatInputConstants */).CHAT_INPUT_PILL_CONTENT_SIZE;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/useChatInputMaxHeight.tsx');
exports.default = useChatInputMaxHeight;
exports.getChatInputMinHeight = function() {
return CHAT_INPUT_PILL_CONTENT_SIZE;
};
exports.getChatInputMaxHeight = closure;
exports.getChatInputHeightAnimationTiming = getChatInputHeightAnimationTiming;
}
function getChatInputMaxHeight() { // fn#88344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11719:169, offset: 0x01fe00f0, size: 215 bytes, params: 1, frame: 17
const systemKeyboardHeight = (require(1851) /* metro dependency 1851: useSystemKeyboardHeightNative */).getSystemKeyboardHeight();
const customKeyboardHeight = (require(5466) /* metro dependency 5466: useCustomKeyboardHeight */).getCustomKeyboardHeight();
const keyboardType = (require(4022) /* metro dependency 4022: useKeyboardType */).getKeyboardType();
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
const SYSTEM = KeyboardTypes.SYSTEM;
const r2 = keyboardType === SYSTEM ? systemKeyboardHeight : customKeyboardHeight;
const useWindowDimensionsNativeModule = require(1478) /* metro dependency 1478: useWindowDimensionsNative */;
const getWindowDimensions = useWindowDimensionsNativeModule.getWindowDimensions;
const value5 = Reflect.apply(getWindowDimensions, useWindowDimensionsNativeModule,
[{ignoreKeyboard: true}]).height - r2;
const Math = global.Math;
const min = Math.min;
const Math2 = global.Math;
return Reflect.apply(min, Math, [200, Math2.max(2 * CHAT_INPUT_PILL_CONTENT_SIZE, value5 - 200)]);
}
function useChatInputMaxHeight(a0) { // fn#88345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11719:538, offset: 0x01fe01c7, size: 90 bytes, params: 2, frame: 16
let env0_0 = a0;
const binding = env0_4;
const useState = binding.useState;
const value = env0_3(Reflect.apply(useState, binding, [getChatInputMaxHeight]), 2);
const property = value[0];
let env0_1 = value[1];
binding.useEffect(function() {
var closure = _fun88347;
var env0_0 = importDefault(dependencyMap[9])(closure);
var env0_1 = subscribeToKeyboardUIStore(closure);
return _fun88349;
}, [a0]);
return property;
}
function getChatInputHeightAnimationTiming(a0) { // fn#88351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11719:1000, offset: 0x01fe02ac, size: 121 bytes, params: 2, frame: 17
const Math = global.Math;
const value3 = Math.min(a0, getChatInputMaxHeight());
const value = require(4504) /* metro dependency 4504: timing */;
const withTiming = value.withTiming;
const object2 = {};
object2.duration = (require(4507) /* metro dependency 4507: timingPresets */).timingFastDuration;
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
object2.easing = Easing.linear;
return Reflect.apply(withTiming, value, [value3, object2]);
}
function _fun88346() { // fn#88346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11719:655, offset: 0x01fe0221, size: 65 bytes, params: 1, frame: 14
const closure = maybeUpdateMaxHeight;
const env0_0 = (importDefault(11534) /* metro dependency 11534: subscribeToWindowDimensionsNative */)(closure);
const env0_1 = subscribeToKeyboardUIStore(closure);
return _fun88349;
}
function maybeUpdateMaxHeight() { // fn#88347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11719:685, offset: 0x01fe0262, size: 25 bytes, params: 1, frame: 11
env1_1(_fun88348);
}
function _fun88348(a0) { // fn#88348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11719:693, offset: 0x01fe027b, size: 49 bytes, params: 2, frame: 13
var r0;
let value = a0;
const chatInputMaxHeight = getChatInputMaxHeight();
if (value === chatInputMaxHeight) {
r0 = value;
} else {
value = environment.__proto__.__proto__;
if (env2_0 == null) {
r0 = chatInputMaxHeight;
} else {
env2_0();
r0 = chatInputMaxHeight;
}
}
return r0;
}
@@ -0,0 +1,757 @@
/* Metro module 11537; source: modules/chat_input/native/useChatInputRefs.tsx; dependencies: [31, 6583, 4645, 7075, 7080, 1878, 7729, 661, 6625, 4503, 6518, 4015, 22, 11538, 11540, 11541, 7875, 7165, 4022, 1583, 1482, 477, 4023, 1848, 683, 11005, 7067, 11004, 11542, 7076, 11543, 4643, 11574, 6996, 2] */
function _fun88360(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:6, offset: 0x01fe09d0, size: 295 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 stickersStore = importDefault(6583) /* metro dependency 6583: StickersStore */;
const env0_5 = (require(4645) /* metro dependency 4645: DraftStore */).DraftType;
const editMessageStore = importDefault(7075) /* metro dependency 7075: EditMessageStore */;
const slowmodeStore = importDefault(7080) /* metro dependency 7080: SlowmodeStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_9 = (require(7729) /* metro dependency 7729: useChatBottomManagerUIStore */).updateChatInputContainerHeight;
const env0_10 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_11 = (require(6625) /* metro dependency 6625: ChannelAutocompleteConstants */).COMMAND_SENTINEL;
const env0_12 = (require(4503) /* metro dependency 4503: MessageConstants */).MessageSendLocation;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/useChatInputRefs.tsx');
exports.default = useChatInputRefs;
}
function useChatInputRefs({chatInputProps, chatInputTextFieldHeight, ref}) { // fn#88361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:380, offset: 0x01fe0af7, size: 520 bytes, params: 2, frame: 21
const binding = env0_3;
let useRef = binding.useRef;
const env0_2 = Reflect.apply(useRef, binding, [null]);
var env0_3 = binding.useRef(null);
const env0_4 = binding.useRef(null);
const env0_5 = binding.useRef(null);
const env0_6 = binding.useRef(null);
const env0_7 = binding.useRef(null);
const env0_8 = binding.useRef(null);
const env0_9 = binding.useRef(null);
useRef = binding.useRef;
const Map = global.Map;
const value2 = Object.create(Map.prototype, {constructor: {value: Map}});
const map = new Map();
const env0_10 = Reflect.apply(useRef, binding, [map instanceof Object ? map : value2]);
let value = importDefault(6518) /* metro dependency 6518: useInitialValue */;
value = value(_fun88362);
const env0_12 = binding.useRef(chatInputProps);
const env0_13 = binding.useRef(chatInputProps);
binding.useEffect(_fun88363, [chatInputProps]);
binding.useEffect(_fun88364, [chatInputProps.channel.id]);
binding.useEffect(_fun88365, [value, chatInputProps.channel.id]);
const env0_14 = binding.useRef((importDefault(6518) /* metro dependency 6518: useInitialValue */)(function() {
var chatInputPropsBinding = chatInputProps;
return {'editId': null, 'focused': false, 'selectionStart': 0, 'selectionEnd': 0, 'text': null,
'textPrev': null,
'textFieldContentSize': 0, text: chatInputPropsBinding.defaultValue,
textPrev: chatInputPropsBinding.defaultValue, textFieldHeight: chatInputTextFieldHeight};
}));
const env0_15 = binding.useRef({'handledHereMention': false, 'sending': false});
value = binding.useMemo(_fun88368, [value]);
const chatInputRefObject = value.chatInputRefObject;
const chatInputRefObjectCallback = value.chatInputRefObjectCallback;
const env0_16 = binding.useRef(chatInputRefObject);
binding.useImperativeHandle(ref, chatInputRefObjectCallback);
return binding.useMemo(_fun88406, []);
}
function _fun88362() { // fn#88362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:631, offset: 0x01fe0cff, size: 62 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(4015) /* metro dependency 4015: ChatInputUtils */;
const createInputRefTracker = value.createInputRefTracker;
const chatInputPropsBinding = chatInputProps;
return Reflect.apply(createInputRefTracker, value, [chatInputPropsBinding.channel.id,
chatInputPropsBinding.screenIndex]);
}
function _fun88363() { // fn#88363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:737, offset: 0x01fe0d3d, size: 98 bytes, params: 1, frame: 11
let current = env0_13.current;
if (current.channel.id !== chatInputProps.channel.id) {
current = env0_16.current;
if (current != null) {
current.flushPendingDraftSave();
}
}
const binding = env0_12;
const binding2 = env0_13;
binding.current = binding2.current;
binding2.current = chatInputProps;
}
function _fun88364() { // fn#88364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:886, offset: 0x01fe0d9f, size: 24 bytes, params: 1, frame: 2
env0_15.current.handledHereMention = false;
}
function _fun88365() { // fn#88365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:954, offset: 0x01fe0db7, size: 53 bytes, params: 1, frame: 13
const binding = env0_11;
binding.handleRef(env0_16.current, chatInputProps.channel.id);
return _fun88366;
}
function _fun88368() { // fn#88368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:1292, offset: 0x01fe0e4b, size: 503 bytes, params: 1, frame: 18
var environment;
const value = environment.__proto__;
const env0_0 = (importDefault(22) /* metro dependency 22 */).throttle(_fun88369, 200);
const env0_1 = (importDefault(22) /* metro dependency 22 */).throttle(_fun88370, 500);
const env0_2 = (importDefault(22) /* metro dependency 22 */).debounce(_fun88371, 32);
return {chatInputRefObject: {backspace: backspace_88372, blur: blur_88373,
chatInputTrackerRegister: chatInputTrackerRegister, chatInputTrackerUnregister: chatInputTrackerUnregister,
clearText: clearText_88376, closeCustomKeyboard: closeCustomKeyboard_88377,
dismissKeyboard: dismissKeyboard_88378, flushPendingDraftSave: flushPendingDraftSave, focus: focus_88380,
getApplicationCommandManager: getApplicationCommandManager, getText: getText_88382,
handleCancelEditing: handleCancelEditing, handlePressKey: handlePressKey, handleSaveEditing: handleSaveEditing,
handleSend: handleSend, handleSelectGIF: handleSelectGIF, handleSelectSticker: handleSelectSticker,
hideSideActions: hideSideActions, handleTextChanged: handleTextChanged, insertText: insertText,
isFocused: isFocused_88396, openCustomKeyboard: openCustomKeyboard_88397,
openSystemKeyboard: openSystemKeyboard_88398, replaceRange: replaceRange_88399,
setSelectedRange: setSelectedRange_88400, setText: setText_88401, showSideActions: showSideActions,
updateNativeTextBlocksThrottled: updateNativeTextBlocksThrottled,
updateChatInputContainerHeightDebounced: updateChatInputContainerHeightDebounced},
chatInputRefObjectCallback: chatInputRefObjectCallback};
}
function _fun88406() { // fn#88406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:7437, offset: 0x01fe21a7, size: 122 bytes, params: 1, frame: 3
return {chatInput: env0_16, chatInputCharCounter: env0_6, chatInputCover: env0_7, chatInputActions: env0_2,
chatInputRightActions: env0_3, chatInputAutocomplete: env0_5, chatInputAppCommandManager: env0_4,
chatInputNative: env0_8, chatInputSendButton: env0_9, chatInputTextFlushedResponses: env0_10, props: env0_13,
propsPrev: env0_12, state: env0_14};
}
function _fun88366() { // fn#88366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:995, offset: 0x01fe0dec, size: 39 bytes, params: 1, frame: 13
const binding = env1_11;
binding.handleRef(null, chatInputProps.channel.id);
}
function _fun88369(a0, a1) { // fn#88369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:1322, offset: 0x01fe1042, size: 58 bytes, params: 3, frame: 16
let value = environment.__proto__.__proto__;
value = importDefault(11538) /* metro dependency 11538: ChatInputNativeCommands */;
value.updateTextBlocks(env1_8.current, a0, a1);
}
function _fun88370(a0) { // fn#88370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:1399, offset: 0x01fe107c, size: 384 bytes, params: 2, frame: 20
var startsWith;
var value2;
var defaultImport;
var value3;
var defaultImport2;
var defaultImport3;
var value4;
var moduleValue;
var defaultImport4;
const current = env1_13.current;
const channel = current.channel;
if (current.pendingEdit == null) {
if (a0.length > 0) {
startsWith = a0.startsWith;
value2 = environment.__proto__.__proto__;
if (Reflect.apply(startsWith, a0, [COMMAND_SENTINEL])) {
value3 = environment.__proto__.__proto__;
defaultImport2 = importDefault(11540) /* metro dependency 11540: TypingActionCreators */;
defaultImport2.stopTyping(channel.id);
} else {
defaultImport = importDefault(11540) /* metro dependency 11540: TypingActionCreators */;
defaultImport.startTyping(channel.id);
}
} else {
value3 = environment.__proto__.__proto__;
defaultImport2 = importDefault(11540) /* metro dependency 11540: TypingActionCreators */;
defaultImport2.stopTyping(channel.id);
}
if (current.threadCreationCallback == null) {
if (!env1_15.current.handledHereMention) {
value4 = environment.__proto__.__proto__;
moduleValue = require(11541) /* metro dependency 11541: ChatInputContentCallbacks */;
if (moduleValue.tryUpdateSubscriptionForHereMention(a0,
(require(7875) /* metro dependency 7875: useMessageMaxLength */).getMaxMessageLength(),
channel.guild_id,
channel.id)) {
env1_15.current.handledHereMention = true;
}
}
value = environment.__proto__.__proto__;
defaultImport4 = importDefault(7165) /* metro dependency 7165: DraftActionCreators */;
defaultImport4.saveDraft(channel.id, a0, DraftType.ChannelMessage);
} else {
value = environment.__proto__.__proto__;
defaultImport3 = importDefault(7165) /* metro dependency 7165: DraftActionCreators */;
defaultImport3.saveDraft(channel.id, a0, DraftType.FirstThreadMessage);
}
}
}
function _fun88371(a0) { // fn#88371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:1863, offset: 0x01fe11fc, size: 38 bytes, params: 2, frame: 13
updateChatInputContainerHeight(env1_13.current.screenIndex, a0);
}
function backspace_88372() { // fn#88372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:1913, offset: 0x01fe1222, size: 50 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = importDefault(11538) /* metro dependency 11538: ChatInputNativeCommands */;
value.backspace(env1_8.current);
}
function blur_88373() { // fn#88373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:1954, offset: 0x01fe1254, size: 50 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = importDefault(11538) /* metro dependency 11538: ChatInputNativeCommands */;
value.blur(env1_8.current);
}
function chatInputTrackerRegister() { // fn#88374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:2010, offset: 0x01fe1286, size: 21 bytes, params: 1, frame: 9
env1_11.register();
}
function chatInputTrackerUnregister() { // fn#88375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:2056, offset: 0x01fe129b, size: 21 bytes, params: 1, frame: 9
env1_11.unregister();
}
function clearText_88376() { // fn#88376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:2087, offset: 0x01fe12b0, size: 37 bytes, params: 1, frame: 11
const current = env1_16.current;
if (current != null) {
current.setText('');
}
}
function closeCustomKeyboard_88377() { // fn#88377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:2154, offset: 0x01fe12d5, size: 229 bytes, params: 1, frame: 16
var defaultImport;
var closeCustomKeyboard;
var value3;
const value = environment.__proto__.__proto__;
const keyboardType = (require(4022) /* metro dependency 4022: useKeyboardType */).getKeyboardType();
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
const SYSTEM = KeyboardTypes.SYSTEM;
if (keyboardType !== SYSTEM) {
(require(1482) /* metro dependency 1482: KeyboardUIStoreNative */).setKeyboardType({type: KeyboardTypes.SYSTEM});
}
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (!platformUtilsModule.isAndroid()) {
defaultImport = importDefault(11538) /* metro dependency 11538: ChatInputNativeCommands */;
closeCustomKeyboard = defaultImport.closeCustomKeyboard;
value3 = environment.__proto__;
Reflect.apply(closeCustomKeyboard, defaultImport, [env1_8.current]);
}
(require(4023) /* metro dependency 4023: PortalKeyboardUIStoreNative */).closePortalKeyboardRequest();
}
function dismissKeyboard_88378() { // fn#88378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:2399, offset: 0x01fe13ba, size: 65 bytes, params: 1, frame: 11
let value = environment.__proto__.__proto__;
(require(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard();
value = environment.__proto__;
const current = env1_16.current;
if (current != null) {
current.closeCustomKeyboard();
}
}
function flushPendingDraftSave() { // fn#88379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:2511, offset: 0x01fe13fb, size: 21 bytes, params: 1, frame: 9
env0_1.flush();
}
function focus_88380() { // fn#88380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:2533, offset: 0x01fe1410, size: 50 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = importDefault(11538) /* metro dependency 11538: ChatInputNativeCommands */;
value.focus(env1_8.current);
}
function getApplicationCommandManager() { // fn#88381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:2594, offset: 0x01fe1442, size: 35 bytes, params: 1, frame: 10
const value = environment.__proto__;
return env1_4.current?.getApplicationCommandManager();
}
function getText_88382() { // fn#88382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:2681, offset: 0x01fe1465, size: 19 bytes, params: 1, frame: 1
return env1_14.current.text;
}
function handleCancelEditing() { // fn#88383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:2720, offset: 0x01fe1478, size: 272 bytes, params: 1, frame: 22
var value3;
var defaultImport;
var track;
var CHAT_CONTEXT_BAR_ACTION_CANCELED;
var object2;
var currentUser;
var endEditMessage;
let value = environment.__proto__;
const channel = env1_13.current.channel;
env0_1.cancel();
value = environment.__proto__.__proto__;
const getEditingMessage = EditMessageStore.getEditingMessage;
let id = channel.id;
const value2 = Reflect.apply(getEditingMessage, EditMessageStore, [id]);
if (value2 != null) {
value3 = undefined;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
CHAT_CONTEXT_BAR_ACTION_CANCELED = AnalyticEvents.CHAT_CONTEXT_BAR_ACTION_CANCELED;
object2 = {};
id = value2.id;
object2.message_id = id;
id = channel.id;
object2.channel_id = id;
object2.guild_id = channel.guild_id;
object2.context_action = 'edit';
object2.reason = (require(11005) /* metro dependency 11005: LongPressMessageActionSheetUtils */).getContextBarCancelReason('edit',
'cancel');
currentUser = UserStore.getCurrentUser();
id = currentUser == null ? value3 : currentUser.id;
object2.is_own_message = id === value2.author.id;
Reflect.apply(track, defaultImport, [CHAT_CONTEXT_BAR_ACTION_CANCELED, object2]);
value = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
endEditMessage = value.endEditMessage;
id = channel.id;
Reflect.apply(endEditMessage, value, [id]);
}
}
function handlePressKey(a0) { // fn#88384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:3109, offset: 0x01fe1588, size: 279 bytes, params: 2, frame: 16
var r5;
let value = environment.__proto__;
let current = env1_13.current;
const pendingEdit = current.pendingEdit;
const pendingReply = current.pendingReply;
const channel = current.channel;
const isChannelOnCooldown2 = SlowmodeStore.isChannelOnCooldown(channel);
if (a0 === '\r') {
current = env1_16.current;
r5 = current?.getText() ?? '';
if (r5.trim().length > 0) {
if (pendingEdit != null) {
current = env1_16.current;
if (current != null) {
current.handleSaveEditing();
}
} else if (!isChannelOnCooldown2) {
current = env1_16.current;
if (current != null) {
current.handleSend();
}
}
} else if (!isChannelOnCooldown2) {
current = env1_16.current;
if (current != null) {
current.handleSend();
}
}
} else if (a0 === 'UIKeyInputEscape') {
if (pendingEdit != null) {
current = env1_16.current;
if (current != null) {
current.handleCancelEditing();
}
} else if (pendingReply != null) {
value = require(11004) /* metro dependency 11004: PendingReplyActionCreators */;
value.deletePendingReply(channel.id);
}
}
}
function handleSaveEditing(a0) { // fn#88385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:3571, offset: 0x01fe169f, size: 90 bytes, params: 2, frame: 15
var environment;
var value;
var getText;
var value2;
const closure = handleSaveEditing_body;
if (a0 == null) {
value = environment.__proto__.__proto__;
value = importDefault(11538) /* metro dependency 11538: ChatInputNativeCommands */;
getText = value.getText;
value2 = environment.__proto__;
Reflect.apply(getText, value, [env1_8.current, env1_10.current, closure]);
} else {
closure(a0);
}
}
function handleSend() { // fn#88387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:4057, offset: 0x01fe1821, size: 335 bytes, params: 1, frame: 19
var environment;
var r0;
var sendCommand;
var text;
var value6;
var defaultImport;
var getText;
var value7;
var defaultImport2;
let current = env1_15.current;
if (!current.sending) {
current = env1_15.current;
current.sending = true;
env0_0.cancel();
current = env1_13.current;
if (current.threadCreationCallback != null) {
value7 = environment.__proto__.__proto__;
defaultImport2 = importDefault(11538) /* metro dependency 11538: ChatInputNativeCommands */;
getText = defaultImport2.getText;
current = env1_8.current;
Reflect.apply(getText, defaultImport2, [current, env1_10.current, _fun88388]);
current = env1_15.current;
current.sending = false;
return undefined;
}
current = env1_16.current;
var applicationCommandManager = current.getApplicationCommandManager();
if (applicationCommandManager == null) {
r0 = undefined;
} else {
sendCommand = applicationCommandManager.sendCommand;
current = env1_14.current;
text = current.text;
current = env1_13.current;
r0 = Reflect.apply(sendCommand, applicationCommandManager, [text, current.channel, _fun88389]);
}
if (!r0) {
value6 = environment.__proto__.__proto__;
defaultImport = importDefault(11538) /* metro dependency 11538: ChatInputNativeCommands */;
defaultImport.getText(env1_8.current, env1_10.current, _fun88390);
}
current = env1_15.current;
current.sending = false;
}
}
function handleSelectGIF({url}) { // fn#88391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:5005, offset: 0x01fe1b59, size: 271 bytes, params: 2, frame: 26
var defaultImport;
var sendMessage;
var id;
var value4;
var object2;
var defaultImport3;
var moduleValue;
var deletePendingReply;
const {channel, pendingReply, threadCreationCallback} = env1_13.current;
if (!(SlowmodeStore.isChannelOnCooldown(channel) || url.length === 0)) {
if (threadCreationCallback != null) {
threadCreationCallback(url);
} else {
defaultImport = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
sendMessage = defaultImport.sendMessage;
id = channel.id;
value4 = (importDefault(7076) /* metro dependency 7076: MessageParser */).parse(channel, url);
object2 = {};
defaultImport3 = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
copyDataProperties(object2, defaultImport3.getSendMessageOptionsForReply(pendingReply), undefined);
object2['location'] = MessageSendLocation.GIF_REPLY;
Reflect.apply(sendMessage, defaultImport, [id, value4, true, object2]);
moduleValue = require(11004) /* metro dependency 11004: PendingReplyActionCreators */;
deletePendingReply = moduleValue.deletePendingReply;
id = channel.id;
Reflect.apply(deletePendingReply, moduleValue, [id]);
}
env1_16.current.dismissKeyboard();
}
}
function handleSelectSticker(a0) { // fn#88392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:5347, offset: 0x01fe1c68, size: 524 bytes, params: 2, frame: 30
var moduleValue;
var text;
var moduleValue2;
var chatInputValidateContentLength;
var object;
var object4;
var value3;
var defaultImport;
var sendStickers;
var id;
var object5;
var defaultImport2;
var moduleValue3;
var deletePendingReply;
var defaultImport3;
var saveDraft;
let current = env1_13.current;
const channel = current.channel;
const pendingReply = current.pendingReply;
const threadCreationCallback = current.threadCreationCallback;
if (!SlowmodeStore.isChannelOnCooldown(channel)) {
if (a0 != null) {
moduleValue = require(4643) /* metro dependency 4643: StickersUtils */;
if (moduleValue.isStandardSticker(a0)) {
if (StickersStore.getStickerPack(a0.pack_id) != null) {
current = env1_14.current;
text = current.text;
moduleValue2 = require(11543) /* metro dependency 11543: ChatInputSendUtils */;
chatInputValidateContentLength = moduleValue2.chatInputValidateContentLength;
object = {text: text};
object4 = {};
current = env1_13.current;
copyDataProperties(object4, current, undefined);
object4['chatInputRef'] = env1_16;
object.params = object4;
value3 = Reflect.apply(chatInputValidateContentLength, moduleValue2, [object]);
if (value3 != null) {
env0_1.cancel();
if (threadCreationCallback != null) {
threadCreationCallback(text, [a0.id]);
} else {
defaultImport = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
sendStickers = defaultImport.sendStickers;
id = channel.id;
object = [a0.id];
object5 = {};
defaultImport2 = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
copyDataProperties(object5, defaultImport2.getSendMessageOptionsForReply(pendingReply),
undefined);
object5['location'] = MessageSendLocation.STICKER_REPLY;
Reflect.apply(sendStickers, defaultImport, [id, object, value3, object5]);
moduleValue3 = require(11004) /* metro dependency 11004: PendingReplyActionCreators */;
deletePendingReply = moduleValue3.deletePendingReply;
id = channel.id;
Reflect.apply(deletePendingReply, moduleValue3, [id]);
defaultImport3 = importDefault(7165) /* metro dependency 7165: DraftActionCreators */;
saveDraft = defaultImport3.saveDraft;
id = channel.id;
Reflect.apply(saveDraft, defaultImport3, [id, '', DraftType.ChannelMessage]);
current = env1_16.current;
if (current != null) {
current.clearText();
}
current = env1_16.current;
if (current != null) {
current.showSideActions();
}
}
current = env1_16.current;
current.dismissKeyboard();
}
}
} else {
current = env1_14.current;
text = current.text;
moduleValue2 = require(11543) /* metro dependency 11543: ChatInputSendUtils */;
chatInputValidateContentLength = moduleValue2.chatInputValidateContentLength;
object = {text: text};
object4 = {};
current = env1_13.current;
copyDataProperties(object4, current, undefined);
object4['chatInputRef'] = env1_16;
object.params = object4;
value3 = Reflect.apply(chatInputValidateContentLength, moduleValue2, [object]);
if (value3 != null) {
env0_1.cancel();
if (threadCreationCallback != null) {
threadCreationCallback(text, [a0.id]);
} else {
defaultImport = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
sendStickers = defaultImport.sendStickers;
id = channel.id;
object = [a0.id];
object5 = {};
defaultImport2 = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
copyDataProperties(object5, defaultImport2.getSendMessageOptionsForReply(pendingReply),
undefined);
object5['location'] = MessageSendLocation.STICKER_REPLY;
Reflect.apply(sendStickers, defaultImport, [id, object, value3, object5]);
moduleValue3 = require(11004) /* metro dependency 11004: PendingReplyActionCreators */;
deletePendingReply = moduleValue3.deletePendingReply;
id = channel.id;
Reflect.apply(deletePendingReply, moduleValue3, [id]);
defaultImport3 = importDefault(7165) /* metro dependency 7165: DraftActionCreators */;
saveDraft = defaultImport3.saveDraft;
id = channel.id;
Reflect.apply(saveDraft, defaultImport3, [id, '', DraftType.ChannelMessage]);
current = env1_16.current;
if (current != null) {
current.clearText();
}
current = env1_16.current;
if (current != null) {
current.showSideActions();
}
}
current = env1_16.current;
current.dismissKeyboard();
}
}
}
}
}
function hideSideActions() { // fn#88393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:6010, offset: 0x01fe1e74, size: 87 bytes, params: 1, frame: 13
let current = env1_2.current;
if (current != null) {
current.onDismissActions(env1_14.current.focused);
}
current = env1_3.current;
if (current != null) {
current.onDismissActions(env1_14.current.focused);
}
}
function insertText(a0, a1, a2) { // fn#88395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:6181, offset: 0x01fe1ecb, size: 141 bytes, params: 4, frame: 16
var r5;
let value = a0;
const r6 = a1 ?? env1_14.current.selectionStart;
const current = env1_16.current;
const replaceRange = current.replaceRange;
const object2 = {location: r6};
object2.length = env1_14.current.selectionEnd - r6;
if (a2) {
value += ' ';
r5 = value;
} else {
r5 = value;
}
object2.text = r5;
const editId = env1_14.current.editId;
value = undefined;
object2.editId = editId ?? value;
Reflect.apply(replaceRange, current, [object2]);
return value;
}
function isFocused_88396() { // fn#88396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:6372, offset: 0x01fe1f58, size: 20 bytes, params: 1, frame: 1
return env1_14.current.focused;
}
function openCustomKeyboard_88397(a0) { // fn#88397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:6413, offset: 0x01fe1f6c, size: 97 bytes, params: 2, frame: 14
const {channel, secondaryTextFieldRef} = env1_13.current;
(importDefault(11574) /* metro dependency 11574: openCustomKeyboardAndroid */)({channelId: channel.id,
chatInputRef: env1_16, chatInputNativeRef: env1_8, keyboardParams: a0,
secondaryTextFieldRef: secondaryTextFieldRef});
}
function openSystemKeyboard_88398() { // fn#88398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:6595, offset: 0x01fe1fcd, size: 221 bytes, params: 1, frame: 16
var openSystemKeyboard;
var value5;
let value = environment.__proto__.__proto__;
const keyboardType = (require(4022) /* metro dependency 4022: useKeyboardType */).getKeyboardType();
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
const SYSTEM = KeyboardTypes.SYSTEM;
if (!(keyboardType === SYSTEM && (require(6996) /* metro dependency 6996: useKeyboardIsOpen */).getKeyboardIsOpen({includeCustomKeyboard: false}))) {
(require(1482) /* metro dependency 1482: KeyboardUIStoreNative */).setKeyboardType({type: KeyboardTypes.SYSTEM,
context: {keyboardWillOpen: true}});
value = importDefault(11538) /* metro dependency 11538: ChatInputNativeCommands */;
openSystemKeyboard = value.openSystemKeyboard;
value5 = environment.__proto__;
Reflect.apply(openSystemKeyboard, value, [env1_8.current]);
}
}
function replaceRange_88399(a0) { // fn#88399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:6864, offset: 0x01fe20aa, size: 54 bytes, params: 2, frame: 14
let value = environment.__proto__.__proto__;
value = importDefault(11538) /* metro dependency 11538: ChatInputNativeCommands */;
value.replaceRange(env1_8.current, a0);
}
function setSelectedRange_88400(a0, a1) { // fn#88400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:6921, offset: 0x01fe20e0, size: 58 bytes, params: 3, frame: 16
let value = environment.__proto__.__proto__;
value = importDefault(11538) /* metro dependency 11538: ChatInputNativeCommands */;
value.setSelectedRange(env1_8.current, a0, a1);
}
function setText_88401(a0) { // fn#88401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:6979, offset: 0x01fe211a, size: 54 bytes, params: 2, frame: 14
let value = environment.__proto__.__proto__;
value = importDefault(11538) /* metro dependency 11538: ChatInputNativeCommands */;
value.setText(env1_8.current, a0);
}
function showSideActions() { // fn#88402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:7030, offset: 0x01fe2150, size: 87 bytes, params: 1, frame: 13
let current = env1_2.current;
if (current != null) {
current.onShowActions(env1_14.current.focused);
}
current = env1_3.current;
if (current != null) {
current.onShowActions(env1_14.current.focused);
}
}
function handleSaveEditing_body(a0) { // fn#88386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:3597, owner: handleSaveEditing.body, offset: 0x01fe16f9, size: 296 bytes, params: 2, frame: 21
var r10;
var value6;
var moduleValue;
var value7;
var getEditingTextValue;
var defaultImport;
var endEditMessage;
let value = a0;
let current = env2_13.current;
const channel = current.channel;
env1_1.cancel();
const getEditingMessage = EditMessageStore.getEditingMessage;
let id = channel.id;
const value5 = Reflect.apply(getEditingMessage, EditMessageStore, [id]);
if (value5 != null) {
value6 = undefined;
moduleValue = require(11542) /* metro dependency 11542: LegacyCommands */;
value7 = moduleValue.handleLegacyCommands(value, {channel: channel, isEdit: true});
r10 = (value7 == null ? value6 : value7.content) == null ? value : value7.content;
getEditingTextValue = EditMessageStore.getEditingTextValue;
id = channel.id;
if (r10 !== Reflect.apply(getEditingTextValue, EditMessageStore, [id])) {
value = importDefault(7076) /* metro dependency 7076: MessageParser */;
value = value.parse(channel, r10);
defaultImport = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
defaultImport.editMessage(channel.id, value5.id, value);
}
value = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
endEditMessage = value.endEditMessage;
id = channel.id;
Reflect.apply(endEditMessage, value, [id]);
current = env2_16.current;
if (current != null) {
current.showSideActions();
}
}
}
function _fun88388(a0) { // fn#88388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:4218, offset: 0x01fe1970, size: 138 bytes, params: 2, frame: 19
const value = environment.__proto__.__proto__.__proto__;
const chatInputSendUtilsModule = require(11543) /* metro dependency 11543: ChatInputSendUtils */;
const chatInputValidateContentLength = chatInputSendUtilsModule.chatInputValidateContentLength;
const object3 = {text: a0};
const object4 = {};
const binding = env2_13;
copyDataProperties(object4, binding.current, binding);
object4['chatInputRef'] = env2_16;
object3.params = object4;
if (Reflect.apply(chatInputValidateContentLength, chatInputSendUtilsModule, [object3]) != null) {
chatInputSendUtilsModule.chatInputCreateThread({text: a0, threadCreationCallback: threadCreationCallback});
}
}
function _fun88389(a0, a1) { // fn#88389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:4519, offset: 0x01fe19fa, size: 102 bytes, params: 3, frame: 16
let value = environment.__proto__.__proto__.__proto__;
value = require(11543) /* metro dependency 11543: ChatInputSendUtils */;
const chatInputSendApplicationCommand = value.chatInputSendApplicationCommand;
const object = {};
const binding = env2_13;
copyDataProperties(object, binding.current, binding);
object['chatInputRef'] = env2_16;
Reflect.apply(chatInputSendApplicationCommand, value, [{applicationCommand: {command: a0, optionValues: a1},
params: object}]);
}
function _fun88390(a0) { // fn#88390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:4697, offset: 0x01fe1a60, size: 249 bytes, params: 2, frame: 18
var value2;
var value3;
var moduleValue;
var chatInputHandleSendText;
var object;
var value4;
let current = env2_13.current;
if (current.pendingEdit != null) {
value4 = environment.__proto__;
env1_1.cancel();
current = env2_16.current;
if (current != null) {
current.handleSaveEditing(a0);
}
} else {
value2 = environment.__proto__;
env1_1.cancel();
value3 = environment.__proto__.__proto__.__proto__;
moduleValue = require(11543) /* metro dependency 11543: ChatInputSendUtils */;
chatInputHandleSendText = moduleValue.chatInputHandleSendText;
object = {};
copyDataProperties(object, env2_13.current, undefined);
object['chatInputRef'] = env2_16;
Reflect.apply(chatInputHandleSendText, moduleValue, [{text: a0, params: object}]);
}
const keyboardType = (require(4022) /* metro dependency 4022: useKeyboardType */).getKeyboardType();
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
const SYSTEM = KeyboardTypes.SYSTEM;
if (keyboardType === SYSTEM) {
env2_16.current.focus();
}
}