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,45 @@
/* Metro module 1386; source: modules/channel/ChannelConstants.tsx; dependencies: [2] */
function _fun16285(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#16285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1513:6, offset: 0x00e4bef1, size: 514 bytes, params: 8, frame: 22
var object3;
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object3 = {ROLE_SUBSCRIPTIONS: 'role-subscriptions',
SERVER_MONETIZATION_ONBOARDING: 'server-monetization-onboarding', GAME_SHOP: 'game-shop', GUILD_SHOP: 'shop',
MEMBER_APPLICATIONS: 'member-applications', GUILD_HOME: '@home', CHANNEL_BROWSER: 'channel-browser',
GUILD_ONBOARDING: 'onboarding', CUSTOMIZE_COMMUNITY: 'customize-community', MEMBER_SAFETY: 'member-safety',
GUILD_BOOSTS: 'boosts', GAME_SERVERS: 'game-servers', REPORT_TO_MOD: 'report-to-mod',
GUILD_OFFICIAL_MESSAGES: 'official-messages'};
let Set = global.Set;
Object = global.Object;
let set = new Set(Object.values(object3));
Object = global.Object;
const value3 = Object.freeze({'GUILD_FEED_REMOVED': 1, 'PINNED': 2, 'ACTIVE_CHANNELS_REMOVED': 4, 'REQUIRE_TAG': 16,
'IS_SPAM': 32, 'IS_GUILD_RESOURCE_CHANNEL': 128, 'CLYDE_AI': 256, 'IS_SCHEDULED_FOR_DELETION': 512,
'IS_MEDIA_CHANNEL': 1024, 'SUMMARIES_DISABLED': 2048, 'IS_ROLE_SUBSCRIPTION_TEMPLATE_PREVIEW_CHANNEL': 8192,
'IS_BROADCASTING': 16384, 'HIDE_MEDIA_DOWNLOAD_OPTIONS': 32768, 'IS_JOIN_REQUEST_INTERVIEW_CHANNEL': 65536,
'OBFUSCATED': 131072, 'IS_MODERATOR_REPORT_CHANNEL': 524288, 'IS_SPOILER_CHANNEL': 2097152,
'IS_GAME_INVITES_CHANNEL': 4194304, 'HAS_ONLY_SYSTEM_MESSAGES': 8388608});
const object4 = {GUILD_HOME: 'home', SERVER_GUIDE: 'guide', CHANNEL_BROWSER: 'browse',
CUSTOMIZE_COMMUNITY: 'customize', LINKED_ROLES: 'linked-roles'};
Set = global.Set;
Object = global.Object;
set = new Set(Object.values(object4));
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/ChannelConstants.tsx');
exports.StaticChannelRoute = object3;
exports.StaticChannelRoutes = set;
exports.isStaticChannelRoute = isStaticChannelRoute;
exports.buildGuildStaticChannelId = function(a0, a1) {
return '' + a0 + '-' + a1;
};
exports.isGuildHomeChannel = isGuildHomeChannel;
exports.ChannelFlags = value3;
exports.MAX_CHANNEL_TOPIC_LENGTH = 1024;
exports.MAX_FORUM_CHANNEL_TOPIC_LENGTH = 4096;
exports.StaticChannelId = object4;
exports.StaticChannelIds = set;
}
function isGuildHomeChannel(a0) { // fn#16288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1513:1649, offset: 0x00e4c12d, size: 43 bytes, params: 2, frame: 12
return !(a0 == null || !a0.includes(env0_0.GUILD_HOME));
}
@@ -0,0 +1,17 @@
/* Metro module 11331; source: modules/channel/ChannelInfoActionCreators.tsx; dependencies: [4257, 5093, 694, 2] */
function _fun86535(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11517:6, offset: 0x01f970f8, size: 130 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const gatewayConnectionStore = importDefault(4257) /* metro dependency 4257: GatewayConnectionStore */;
const channelStatusStore = importDefault(5093) /* metro dependency 5093: ChannelStatusStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/ChannelInfoActionCreators.tsx');
exports.fetchChannelInfo = fetchChannelInfo;
}
function fetchChannelInfo(a0) { // fn#86536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11517:214, offset: 0x01f9717a, size: 114 bytes, params: 2, frame: 15
if (!ChannelStatusStore.hasRequestedStatuses(a0)) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'FETCH_CHANNEL_INFO', guildId: a0});
GatewayConnectionStore.getSocket().requestChannelInfo(a0, ['status', 'voice_start_time']);
}
}
@@ -0,0 +1,94 @@
/* Metro module 9724; source: modules/channel/ChannelMemberCountStore.tsx; dependencies: [6, 7, 15, 17, 18, 4257, 1379, 21, 566, 694, 2] */
function _fun76400(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9910:6, offset: 0x01dce548, size: 384 bytes, params: 8, frame: 19
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const gatewayConnectionStore = importDefault(4257) /* metro dependency 4257: GatewayConnectionStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
Object = global.Object;
const env0_9 = Object.freeze({'online': null, 'total': null});
const env0_10 = {};
const env0_11 = {};
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
let value = _fun76404(PersistedStore);
value.displayName = 'ChannelMemberCountStore';
value.persistKey = 'channelMemberCounts';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{CONNECTION_OPEN: CONNECTION_OPEN_76410, CHANNEL_MEMBER_COUNT_UPDATE: CHANNEL_MEMBER_COUNT_UPDATE});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/ChannelMemberCountStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_76401() { // fn#76401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9910:168, offset: 0x01dce6c8, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_76401_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun76404(a0) { // fn#76404, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9910:430, offset: 0x01dce72a, size: 147 bytes, params: 2, frame: 16
const closure = ChannelMemberCountStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: value_76406}, {key: 'getState', value: value_76407},
{key: 'getMemberCount', value: value_76408}, {key: 'requestCount', value: value_76409}]);
}
function CONNECTION_OPEN_76410() { // fn#76410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9910:1191, offset: 0x01dce83b, size: 114 bytes, params: 1, frame: 14
var socket;
if (env0_12 != null) {
socket = GatewayConnectionStore.getSocket();
socket.requestChannelMemberCount(env0_12.guildId, env0_12.channelId);
}
(importDefault(21) /* metro dependency 21: SnowflakeUtils */).keys(env0_11).forEach(_fun76411);
}
function CHANNEL_MEMBER_COUNT_UPDATE({channelId, online, total}) { // fn#76412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9910:1391, offset: 0x01dce8ad, size: 63 bytes, params: 2, frame: 6
if (!(online == null && total == null)) {
env0_11[channelId] = {online: online, total: total};
}
return true;
}
function value_76406(a0) { // fn#76406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9910:775, offset: 0x01dce7bd, size: 47 bytes, params: 2, frame: 15
const value = a0;
this.waitFor(GatewayConnectionStore, ChannelStore);
env1_11 = value ?? env1_10;
}
function value_76408(a0) { // fn#76408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9910:893, offset: 0x01dce7ec, size: 26 bytes, params: 2, frame: 3
return env1_11[a0] ?? env1_9;
}
function value_76409(a0, a1) { // fn#76409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9910:965, offset: 0x01dce806, size: 53 bytes, params: 3, frame: 13
const object = {guildId: a0, channelId: a1};
const value = environment.__proto__;
GatewayConnectionStore.getSocket().requestChannelMemberCount(a0, a1);
}
@@ -0,0 +1,22 @@
/* Metro module 10628; source: modules/channel/ChannelMuteUtils.tsx; dependencies: [3738, 2] */
function _fun81822(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10814:6, offset: 0x01ee085b, size: 99 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/ChannelMuteUtils.tsx');
exports.getMuteSettings = getMuteSettings_81823;
}
function getMuteSettings_81823(a0) { // fn#81823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10814:180, offset: 0x01ee08be, size: 93 bytes, params: 2, frame: 16
var r2;
let value = null;
if (a0 > 0) {
value = (importDefault(3738) /* metro dependency 3738 */)();
value = value.add(a0, 'second');
value = value.toISOString();
r2 = value;
} else {
r2 = value;
}
return {muted: true, mute_config: {selected_time_window: a0, end_time: r2}};
}
@@ -0,0 +1,20 @@
/* Metro module 12154; source: modules/channel/ChannelPinningExperiment.tsx; dependencies: [1854, 5102, 2] */
function _fun93226(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12340:6, offset: 0x020ab3cf, size: 168 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(1854) /* metro dependency 1854: apex */).createApexExperiment({'name': '2026-04-channel-pinning',
'kind': 'user', defaultConfig: {canPinEverywhere: false}, variations: {[1]: {canPinEverywhere: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/ChannelPinningExperiment.tsx');
exports.useCanPinChannelsInGuild = useCanPinChannelsInGuild;
}
function useCanPinChannelsInGuild(a0) { // fn#93227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12340:351, offset: 0x020ab477, size: 102 bytes, params: 2, frame: 13
const value2 = (require(5102) /* metro dependency 5102: isOptInEnabled */).useOptInEnabledForGuild(a0);
const binding = env0_2;
const useConfig = binding.useConfig;
const canPinEverywhere = Reflect.apply(useConfig, binding,
[{location: 'useCanPinChannelsInGuild'}]).canPinEverywhere;
return {canPin: value2 || canPinEverywhere, pinningNewlyAvailable: !value2 && canPinEverywhere};
}
@@ -0,0 +1,224 @@
/* Metro module 5093; source: modules/channel/ChannelStatusStore.tsx; dependencies: [6, 7, 15, 17, 18, 4257, 677, 566, 694, 2] */
function _fun44411(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5271:6, offset: 0x011703f5, size: 387 bytes, params: 8, frame: 22
const env0_0 = require;
const _arrayLikeToArray_44417 = 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 = CONNECTION_RESUMED_44418;
const closure2 = GUILD_CREATE_44419;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const gatewayConnectionStore = importDefault(4257) /* metro dependency 4257: GatewayConnectionStore */;
const Set = global.Set;
let set = new Set();
const env0_9 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
_fun44420(Store).displayName = 'ChannelStatusStore';
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */, {GUILD_CREATE: closure2,
GUILD_DELETE: closure2, CONNECTION_RESUMED: closure, CONNECTION_OPEN: closure,
VOICE_CHANNEL_STATUS_UPDATE: VOICE_CHANNEL_STATUS_UPDATE_44425, CHANNEL_INFO: CHANNEL_INFO_44426,
FETCH_CHANNEL_INFO: FETCH_CHANNEL_INFO});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/ChannelStatusStore.tsx');
exports.default = set;
}
function _isNativeReflectConstruct_44412() { // fn#44412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5271:160, offset: 0x01170578, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_44412_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_44415(a0, a1) { // fn#44415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5271:353, offset: 0x011705d6, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun44416;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_44417(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_44417(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_44417(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun44416;
}
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 CONNECTION_OPEN_44418() { // fn#44418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5271:1282, offset: 0x01170748, size: 21 bytes, params: 1, frame: 9
env0_8.clear();
}
function GUILD_CREATE_44419({guild}) { // fn#44419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5271:1325, offset: 0x0117075d, size: 34 bytes, params: 2, frame: 11
env0_8.delete(guild.id);
}
function _fun44420(a0) { // fn#44420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5271:1381, offset: 0x0117077f, size: 118 bytes, params: 2, frame: 16
const closure = ChannelStatusStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function() {
this.waitFor(GatewayConnectionStore);
}}, {key: 'getChannelStatus', value: value_44423}, {key: 'hasRequestedStatuses', value: value_44424}]);
}
function VOICE_CHANNEL_STATUS_UPDATE_44425(a0) { // fn#44425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5271:2204, offset: 0x01170870, size: 71 bytes, params: 2, frame: 5
if (env0_9[a0.guildId] == null) {
env0_9[a0.guildId] = {};
}
env0_9[a0.guildId][a0.id] = a0.status;
}
function CHANNEL_INFO_44426({guildId, channels}) { // fn#44426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5271:2327, offset: 0x011708b7, size: 94 bytes, params: 2, frame: 16
var r2;
var value4;
var id;
var status;
var value5;
env0_9[guildId] = {};
const value2 = _createForOfIteratorHelperLoose_44415(channels);
const value3 = value2();
let done = value3.done;
if (!done) {
for (r2 = value3; true; r2 = value5) {
value4 = r2.value;
id = value4.id;
status = value4.status;
env0_9[guildId][id] = status;
value5 = value2();
done = value5.done;
if (done) {
break;
}
}
}
}
function value_44423(a0) { // fn#44423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5271:1760, offset: 0x011707f5, size: 101 bytes, params: 2, frame: 15
var property;
if (a0 != null) {
if (a0.guild_id == null) {
return undefined;
}
var type = a0.type;
var value2 = undefined;
var ChannelTypes = (require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes;
var GUILD_VOICE = ChannelTypes.GUILD_VOICE;
if (type === GUILD_VOICE) {
property = env1_9[a0.guild_id];
return property == null ? value2 : property[a0.id];
}
}
}
@@ -0,0 +1,19 @@
/* Metro module 10913; source: modules/channel/ChannelVisibilityUtils.tsx; dependencies: [4791, 1934, 3969, 2] */
function _fun83638(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11099:6, offset: 0x01f21ede, size: 138 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelSectionStore = importDefault(4791) /* metro dependency 4791: ChannelSectionStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/ChannelVisibilityUtils.tsx');
exports.isChannelCurrentlyVisible = isChannelCurrentlyVisible;
}
function isChannelCurrentlyVisible(a0) { // fn#83639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11099:230, offset: 0x01f21f68, size: 63 bytes, params: 2, frame: 14
const getChannelId = SelectedChannelStore.getChannelId;
const getGuildId = SelectedGuildStore.getGuildId;
const value2 = Reflect.apply(getChannelId, SelectedChannelStore, [Reflect.apply(getGuildId, SelectedGuildStore,
[])]);
return value2 === a0 || ChannelSectionStore.getCurrentSidebarChannelId(value2) === a0;
}
@@ -0,0 +1,13 @@
/* Metro module 5225; source: modules/channel/FakePlaceholderPrivateChannel.tsx; dependencies: [1383, 661, 2] */
function _fun46239(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#46239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5403:6, offset: 0x011a397d, size: 157 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const createChannelRecord = (require(1383) /* metro dependency 1383: ChannelRecord */).createChannelRecord;
const ChannelTypes = (require(661) /* metro dependency 661: Constants */).ChannelTypes;
const DM = ChannelTypes.DM;
const channelRecord = createChannelRecord({'id': '131', 'type': null, 'name': 'Placeholder Channel', type: DM});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/FakePlaceholderPrivateChannel.tsx');
exports.FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID = '131';
exports.FAKE_PLACEHOLDER_PRIVATE_CHANNEL = channelRecord;
}
@@ -0,0 +1,545 @@
/* Metro module 1936; source: modules/channel/GatedChannelStore.tsx; dependencies: [6, 7, 15, 17, 18, 1937, 1383, 1939, 1379, 1945, 1938, 1867, 1878, 661, 3775, 3776, 3777, 566, 694, 2] */
function _fun21461(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#21461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2063:6, offset: 0x00ef11cf, size: 625 bytes, params: 8, frame: 24
const env0_0 = require;
const _arrayLikeToArray_21467 = 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 = CONNECTION_OPEN_21471;
const closure2 = GUILD_CREATE_21472;
const closure3 = GUILD_ROLE_CREATE_21473;
const closure4 = CHANNEL_CREATE_21474;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const impersonateStore = importDefault(1937) /* metro dependency 1937: ImpersonateStore */;
const env0_8 = (require(1383) /* metro dependency 1383: ChannelRecord */).THREAD_CHANNEL_TYPES;
const env0_9 = (require(1939) /* metro dependency 1939: GuildRoleRecord */).hasPermission;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_15 = constantsModule.Permissions;
const env0_16 = constantsModule.GuildFeatures;
const env0_17 = {};
const Set = global.Set;
let set = new Set();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
_fun21475(Store).displayName = 'GatedChannelStore';
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: closure,
OVERLAY_INITIALIZE: closure, CACHE_LOADED_LAZY: closure, GUILD_CREATE: closure2, GUILD_UPDATE: closure2,
GUILD_DELETE: closure2, GUILD_ROLE_CREATE: closure3, GUILD_ROLE_UPDATE: closure3, GUILD_ROLE_DELETE: closure3,
IMPERSONATE_UPDATE: closure3, IMPERSONATE_STOP: closure3, CHANNEL_CREATE: closure4, CHANNEL_DELETE: closure4,
CHANNEL_UPDATES: function({channels}) {
var r2;
var r3;
var r9;
var r0;
var computeForChannelBinding;
var guild_id;
var value5;
var value6;
var value2 = _createForOfIteratorHelperLoose_21465(channels);
var value3 = value2();
var value4 = false;
if (value3.done) {
r0 = value4;
} else {
r2 = value4;
r3 = value3;
while (true) {
channels = r3.value;
if (channels.guild_id == null) {
r9 = r2;
} else {
computeForChannelBinding = computeForChannel;
guild_id = channels.guild_id;
if (!computeForChannelBinding(guild_id, channels.id)) {
continue;
}
value5 = true;
r9 = value5;
}
value6 = value2();
if (value6.done) {
r0 = r9;
break;
}
r2 = r9;
r3 = value6;
continue;
}
}
return r0;
}, GUILD_ROLE_SUBSCRIPTIONS_FETCH_RESTRICTIONS_SUCCESS: GUILD_ROLE_SUBSCRIPTIONS_FETCH_RESTRICTIONS_SUCCESS,
GUILD_ROLE_SUBSCRIPTIONS_FETCH_RESTRICTIONS_FAILURE: GUILD_ROLE_SUBSCRIPTIONS_FETCH_RESTRICTIONS_FAILURE});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/GatedChannelStore.tsx');
exports.default = set;
}
function _isNativeReflectConstruct_21462() { // fn#21462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2063:316, offset: 0x00ef1440, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_21462_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_21465(a0, a1) { // fn#21465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2063:509, offset: 0x00ef149e, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun21466;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_21467(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_21467(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_21467(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun21466;
}
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 isSubscriptionGated({guildId, role, isPreviewingRoles}) { // fn#21468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2063:1438, offset: 0x00ef1610, size: 228 bytes, params: 2, frame: 20
var r2;
var r3;
var r1;
var r0;
var moduleValue2;
var isSubscriptionRoleAvailableForPurchase;
var isSubscriptionRoleAvailableForPurchase2;
var value6;
var currentUser;
const isSubscriptionRole2 = (require(3775) /* metro dependency 3775: PremiumRoleUtils */).isSubscriptionRole(role);
if (isSubscriptionRole2) {
if (isPreviewingRoles) {
r1 = !!isPreviewingRoles;
} else {
moduleValue2 = require(3775) /* metro dependency 3775: PremiumRoleUtils */;
isSubscriptionRoleAvailableForPurchase = moduleValue2.isSubscriptionRoleAvailableForPurchase;
r2 = role ?? undefined;
isSubscriptionRoleAvailableForPurchase2 = Reflect.apply(isSubscriptionRoleAvailableForPurchase,
moduleValue2,
[r2]);
if (isSubscriptionRoleAvailableForPurchase2) {
r2 = !!isSubscriptionRoleAvailableForPurchase2;
} else {
value6 = false;
if (role == null) {
r3 = value6;
} else {
currentUser = UserStore.getCurrentUser();
r3 = currentUser == null ? value6 : GuildMemberStore.getMember(guildId,
currentUser.id) != null && GuildMemberStore.getMember(guildId,
currentUser.id).roles.includes(role.id);
}
r2 = !!r3;
}
r1 = r2;
}
r0 = r1;
} else {
r0 = !!isSubscriptionRole2;
}
return r0;
}
function isChannelSubscriptionGatedInGuild(a0, a1) { // fn#21469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2063:1798, offset: 0x00ef16f4, size: 482 bytes, params: 3, frame: 22
var r1;
var property;
var getRole;
var value4;
var isSubscriptionGatedBinding;
var object2;
var moduleValue;
var isChannelAccessGrantedBy;
var value5;
var _createForOfIteratorHelperLoose_21465Binding;
var getSortedRoles;
var value7;
var value8;
var done;
var value9;
var moduleValue3;
var hasViewChannelPermission;
var value10;
let features = a1.features;
const has = features.has;
const CREATOR_MONETIZABLE = GuildFeatures.CREATOR_MONETIZABLE;
if (!Reflect.apply(has, features, [CREATOR_MONETIZABLE])) {
features = a1.features;
reducibleJoin3: while (true) {
if (!features.has(GuildFeatures.CREATOR_MONETIZABLE_PROVISIONAL)) {
return false;
}
break reducibleJoin3;
}
}
const isViewingServerShop = ImpersonateStore.isViewingServerShop;
let id = a1.id;
const isViewingServerShop2 = Reflect.apply(isViewingServerShop, ImpersonateStore, [id]);
const Object = global.Object;
const keys = Object.keys;
let permissionOverwrites = a0.permissionOverwrites;
const value2 = Reflect.apply(keys, Object, [permissionOverwrites]);
let length = value2.length;
const value3 = 0;
if (value3 < length) {
r1 = value3;
reducibleLoop4: while (true) {
property = value2[r1];
getRole = GuildRoleStore.getRole;
id = a1.id;
value4 = Reflect.apply(getRole, GuildRoleStore, [id, property]);
isSubscriptionGatedBinding = isSubscriptionGated;
object2 = {};
id = a1.id;
object2.guildId = id;
object2.role = value4;
object2.isPreviewingRoles = isViewingServerShop2;
if (isSubscriptionGatedBinding(object2)) {
permissionOverwrites = a0.permissionOverwrites;
property = permissionOverwrites[property];
moduleValue = require(3776) /* metro dependency 3776: RolePermissionUtils */;
isChannelAccessGrantedBy = moduleValue.isChannelAccessGrantedBy;
reducibleJoin6: while (true) {
if (Reflect.apply(isChannelAccessGrantedBy, moduleValue, [a0, property])) {
return true;
}
break reducibleJoin6;
}
}
value5 = typeof r1 === 'bigint' ? r1 + 1n : +r1 + 1;
length = value2.length;
if (value5 < length) {
r1 = value5;
continue reducibleLoop4;
}
break reducibleLoop4;
}
}
const everyoneRole = GuildRoleStore.getEveryoneRole(a1);
const hasPermissionBinding = hasPermission;
const VIEW_CHANNEL = Permissions.VIEW_CHANNEL;
const hasPermission2 = hasPermissionBinding(everyoneRole, VIEW_CHANNEL);
const rolePermissionUtilsModule = require(3776) /* metro dependency 3776: RolePermissionUtils */;
if (!hasPermission2) {
reducibleJoin14: while (true) {
if (rolePermissionUtilsModule.isChannelAccessDeniedBy(a0, a0.permissionOverwrites[a1.id])) {
break reducibleJoin14;
}
_createForOfIteratorHelperLoose_21465Binding = _createForOfIteratorHelperLoose_21465;
getSortedRoles = GuildRoleStore.getSortedRoles;
id = a1.id;
value7 = _createForOfIteratorHelperLoose_21465Binding(Reflect.apply(getSortedRoles, GuildRoleStore, [id]));
value8 = value7();
done = value8.done;
if (done) {
break reducibleJoin14;
}
r1 = value8;
reducibleLoop10: while (true) {
value9 = r1.value;
isSubscriptionGatedBinding = isSubscriptionGated;
object2 = {};
id = a1.id;
object2.guildId = id;
object2.role = value9;
object2.isPreviewingRoles = isViewingServerShop2;
if (isSubscriptionGatedBinding(object2)) {
moduleValue3 = rolePermissionUtilsModule;
hasViewChannelPermission = moduleValue3.hasViewChannelPermission;
reducibleJoin12: while (true) {
if (Reflect.apply(hasViewChannelPermission, moduleValue3, [value9])) {
return true;
}
break reducibleJoin12;
}
}
value10 = value7();
done = value10.done;
if (done) {
break reducibleJoin14;
}
r1 = value10;
continue reducibleLoop10;
}
}
}
return false;
}
function computeForChannel(a0, a1) { // fn#21470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2063:2576, offset: 0x00ef18d6, size: 142 bytes, params: 3, frame: 17
var r0;
const property = env0_17[a0];
if (property == null) {
return false;
}
const channel = ChannelStore.getChannel(a1);
if (channel == null) {
return false;
}
const getGuild = GuildStore.getGuild;
const getGuildId = channel.getGuildId;
const value3 = Reflect.apply(getGuild, GuildStore, [Reflect.apply(getGuildId, channel, [])]);
if (value3 == null) {
return false;
}
const value4 = property.has(a1);
const isChannelSubscriptionGatedInGuild2 = isChannelSubscriptionGatedInGuild(channel, value3);
const value5 = value4 !== isChannelSubscriptionGatedInGuild2;
if (value5) {
if (isChannelSubscriptionGatedInGuild2) {
property.add(a1);
r0 = true;
} else {
property.delete(a1);
r0 = true;
}
} else {
r0 = value5;
}
return r0;
}
function CACHE_LOADED_LAZY_21471() { // fn#21471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2063:2832, offset: 0x00ef1964, size: 27 bytes, params: 1, frame: 9
env0_17 = {};
env0_18.clear();
}
function GUILD_CREATE_21472({guild}) { // fn#21472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2063:2875, offset: 0x00ef197f, size: 28 bytes, params: 2, frame: 2
delete env0_17[guild.id];
}
function GUILD_ROLE_CREATE_21473({guildId}) { // fn#21473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2063:2928, offset: 0x00ef199b, size: 23 bytes, params: 2, frame: 2
delete env0_17[guildId];
}
function CHANNEL_CREATE_21474({channel}) { // fn#21474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2063:2984, offset: 0x00ef19b2, size: 49 bytes, params: 2, frame: 14
return channel.guild_id != null && computeForChannel(channel.guild_id, channel.id);
}
function _fun21475(a0) { // fn#21475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2063:3092, offset: 0x00ef19e3, size: 137 bytes, params: 2, frame: 16
const closure = GatedChannelStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function() {
this.waitFor(ChannelStore, GuildMemberStore, GuildRoleStore, GuildStore, ImpersonateStore, UserStore);
}}, {key: 'isChannelGated', value: value_21478}, {key: 'isChannelGatedAndVisible', value: value_21479},
{key: 'isChannelOrThreadParentGated', value: value_21480}]);
}
function GUILD_ROLE_SUBSCRIPTIONS_FETCH_RESTRICTIONS_SUCCESS({guildId, restrictions}) { // fn#21482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2063:4993, offset: 0x00ef1d1b, size: 81 bytes, params: 2, frame: 14
const isRestrictedFromShowingGuildPurchaseEntryPoints2 = (require(3777) /* metro dependency 3777: CreatorMonetizationRestrictionsUtils */).isRestrictedFromShowingGuildPurchaseEntryPoints(restrictions);
const binding = env0_18;
if (isRestrictedFromShowingGuildPurchaseEntryPoints2) {
binding.add(guildId);
} else {
binding.delete(guildId);
}
}
function GUILD_ROLE_SUBSCRIPTIONS_FETCH_RESTRICTIONS_FAILURE({guildId}) { // fn#21483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2063:5207, offset: 0x00ef1d6c, size: 29 bytes, params: 2, frame: 11
env0_18.add(guildId);
}
function value_21478(a0, a1) { // fn#21478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2063:3474, offset: 0x00ef1b0c, size: 225 bytes, params: 3, frame: 24
var r7;
var r3;
var guild;
var binding;
var set;
var features;
var mutableGuildChannelsForGuild;
var propertyName;
var propertyName2;
var add;
var id;
if (a0 == null) {
return false;
}
const value = environment.__proto__;
let property = env1_17[a0];
if (property != null) {
r3 = property;
} else {
guild = GuildStore.getGuild(a0);
if (guild != null) {
binding = env1_17;
set = new global.Set();
binding[a0] = set;
features = guild.features;
if (features.has(GuildFeatures.ROLE_SUBSCRIPTIONS_ENABLED)) {
mutableGuildChannelsForGuild = ChannelStore.getMutableGuildChannelsForGuild(a0);
for (propertyName in mutableGuildChannelsForGuild) {
property = mutableGuildChannelsForGuild[propertyName];
if (!isChannelSubscriptionGatedInGuild(property, guild)) {
r7 = propertyName2;
continue;
}
add = set.add;
id = property.id;
Reflect.apply(add, set, [id]);
r7 = propertyName2;
}
}
}
property = env1_17[a0];
r3 = property;
}
return r3 != null && r3.has(a1);
}
function value_21479(a0, a1) { // fn#21479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2063:3860, offset: 0x00ef1bed, size: 58 bytes, params: 3, frame: 14
var r1;
var r0;
var binding;
let value = a0 != null;
if (value) {
value = this.isChannelGated(a0, a1);
if (value) {
value = environment.__proto__;
binding = env1_18;
value = !binding.has(a0);
r1 = value;
} else {
r1 = value;
}
r0 = r1;
} else {
r0 = value;
}
return r0;
}
function value_21480(a0, a1) { // fn#21480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2063:3972, offset: 0x00ef1c27, size: 132 bytes, params: 3, frame: 17
var has;
if (a0 == null) {
return false;
}
if (this.isChannelGated(a0, a1)) {
return true;
}
let value = environment.__proto__;
const channel = ChannelStore.getChannel(a1);
let r2 = channel == null || channel.parent_id == null;
if (!r2) {
has = THREAD_CHANNEL_TYPES.has;
value = undefined;
value = !Reflect.apply(has, THREAD_CHANNEL_TYPES, [channel == null ? value : channel.type]);
r2 = value;
}
return !r2 && this.isChannelOrThreadParentGated(a0, channel.parent_id);
}
@@ -0,0 +1,132 @@
/* Metro module 15823; source: modules/channel/SelectedChannelManager.tsx; dependencies: [6, 7, 15, 17, 18, 4259, 1934, 3969, 661, 6947, 4796, 1230, 694, 4860, 2] */
function _fun121611(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16031:6, offset: 0x0254bfdb, size: 349 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const env0_10 = (require(1934) /* metro dependency 1934: SelectedChannelStore */).findFirstVoiceChannelId;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_12 = value.ChannelTypes;
const env0_13 = value.Routes;
const env0_14 = value.ME;
const env0_15 = value.NULL_STRING_GUILD_ID;
value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
value = _fun121615(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/SelectedChannelManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_121612() { // fn#121612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16031:282, offset: 0x0254c138, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_121612_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun121615(a0) { // fn#121615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16031:485, offset: 0x0254c19a, size: 122 bytes, params: 2, frame: 16
const closure = SelectedChannelManager;
env0_7(closure, a0);
return env0_4(closure, [{key: 'handleGuildCreate', value: value_121617}, {key: 'handleChannelCreate',
value: value_121618}, {key: 'handleLogout', value: value_121619}]);
}
function SelectedChannelManager(a0) { // fn#121616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16031:497, offset: 0x0254c214, size: 167 bytes, params: 2, frame: 19
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, SelectedChannelManager);
const items = [];
arraySpread(items, value, 0, items);
value = env1_6(SelectedChannelManager);
binding = env1_5;
if (_isNativeReflectConstruct_121612()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
value.actions = {GUILD_CREATE: value.handleGuildCreate, CHANNEL_CREATE: value.handleChannelCreate,
LOGOUT: value.handleLogout};
return value;
}
function value_121617({guild}) { // fn#121617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16031:947, offset: 0x0254c2bb, size: 174 bytes, params: 2, frame: 14
var moduleValue;
var defaultImport;
const channelId = SelectedChannelStore.getChannelId(ME);
const voiceChannelId = SelectedChannelStore.getVoiceChannelId();
if (guild.id === channelId) {
moduleValue = require(6947) /* metro dependency 6947: transitionToGuildNative */;
moduleValue.transitionToGuild(guild.id);
}
if (guild.id === voiceChannelId && guild.unavailable !== false && voiceChannelId == null) {
defaultImport = importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */;
defaultImport.selectVoiceChannel(findFirstVoiceChannelId(guild.id));
}
}
function value_121618({channel}) { // fn#121618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16031:1168, offset: 0x0254c369, size: 238 bytes, params: 2, frame: 19
var r3;
var originChannelId;
var channelId;
var moduleValue;
var defaultImport;
const type = channel.type;
const GROUP_DM = ChannelTypes.GROUP_DM;
if (type === GROUP_DM) {
originChannelId = channel.originChannelId;
channelId = SelectedChannelStore.getChannelId(NULL_STRING_GUILD_ID);
r3 = SelectedGuildStore.getGuildId() == null && originChannelId != null;
r3 = r3 && originChannelId === channelId;
if (r3) {
moduleValue = require(1230) /* metro dependency 1230: router_utils */;
moduleValue.transitionTo(Routes.CHANNEL(ME, channel.id));
}
if (originChannelId != null && originChannelId === SelectedChannelStore.getVoiceChannelId()) {
defaultImport = importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */;
defaultImport.selectVoiceChannel(channel.id, MediaEngineStore.isVideoEnabled());
}
}
}
function value_121619() { // fn#121619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16031:1455, offset: 0x0254c457, size: 51 bytes, params: 1, frame: 12
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'VOICE_CHANNEL_SELECT',
'channelId': null, 'guildId': null, 'video': false, 'currentVoiceChannelId': null, 'joinVoiceId': null});
}
@@ -0,0 +1,504 @@
/* Metro module 12536; source: modules/channel/VoiceChannelAnimationStateStore.tsx; dependencies: [6, 7, 15, 17, 18, 57, 3969, 4297, 566, 694, 2] */
function _fun95804(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12726:6, offset: 0x0214f399, size: 474 bytes, params: 8, frame: 20
const _arrayLikeToArray_95810 = 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 = function() {
resetAllState();
return true;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const env0_5 = importDefault(57) /* metro dependency 57 */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const env0_9 = {};
const env0_10 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
let value = _fun95817(Store);
value.displayName = 'VoiceChannelAnimationStateStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{VOICE_STATE_UPDATES: VOICE_STATE_UPDATES_95822, CHANNEL_SELECT: CHANNEL_SELECT_95823, CONNECTION_OPEN: closure,
LOGOUT: closure});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/VoiceChannelAnimationStateStore.tsx');
exports.default = value;
exports.AnimationStyle = {GENTLE_AMBIENT: 'GENTLE_AMBIENT', GENTLE_AMBIENT_WITH_INTRO: 'GENTLE_AMBIENT_WITH_INTRO',
HIGH_CONTRAST: 'HIGH_CONTRAST'};
}
function _isNativeReflectConstruct_95805() { // fn#95805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12726:180, offset: 0x0214f573, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_95805_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_95808(a0, a1) { // fn#95808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12726:373, offset: 0x0214f5d5, 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 _fun95809;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_95810(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_95810(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_95810(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun95809;
}
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 clearAnimationTimer(a0) { // fn#95811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12726:1454, offset: 0x0214f749, size: 55 bytes, params: 2, frame: 13
if (env0_10[a0] != null) {
global.clearTimeout(env0_10[a0]);
delete env0_10[a0];
}
}
function scheduleTransitionToGentleAmbient(a0) { // fn#95812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12726:1531, offset: 0x0214f780, size: 60 bytes, params: 2, frame: 15
const env0_0 = a0;
clearAnimationTimer(a0);
env0_10[a0] = global.setTimeout(_fun95813, 2000);
}
function resetAllState() { // fn#95814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12726:1713, offset: 0x0214f81d, size: 90 bytes, params: 1, frame: 16
var r3;
var property;
var clearTimeout;
var value4;
const Object = global.Object;
const value2 = Object.keys(env0_10);
let length = value2.length;
const value3 = 0;
if (value3 < length) {
for (r3 = value3; true; r3 = value4) {
property = value2[r3];
clearTimeout = global.clearTimeout;
clearTimeout(env0_10[property]);
value4 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
length = value2.length;
if (!(value4 < length)) {
break;
}
}
}
env0_10 = {};
env0_9 = {};
}
function updateChannelAnimationState(a0, a1) { // fn#95815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12726:1853, offset: 0x0214f877, size: 248 bytes, params: 3, frame: 19
var r0;
var binding;
var object2;
const property = env0_9[a0];
const userCount = property?.userCount;
const value3 = 0;
const r4 = userCount ?? value3;
const Math = global.Math;
const value4 = Math.max(value3, r4 + a1);
if (value3 !== r4) {
if (r4 > value3) {
if (value4 > r4) {
env0_9[a0] = {style: env0_8.HIGH_CONTRAST, userCount: value4};
scheduleTransitionToGentleAmbient(a0);
r0 = true;
} else if (value3 === value4) {
clearAnimationTimer(a0);
delete env0_9[a0];
r0 = true;
} else {
r0 = property != null && value4 !== r4;
if (r0) {
binding = env0_9;
object2 = {};
copyDataProperties(object2, property, Math);
object2['userCount'] = value4;
binding[a0] = object2;
r0 = true;
}
}
} else if (value3 === value4) {
clearAnimationTimer(a0);
delete env0_9[a0];
r0 = true;
} else {
r0 = property != null && value4 !== r4;
if (r0) {
binding = env0_9;
object2 = {};
copyDataProperties(object2, property, Math);
object2['userCount'] = value4;
binding[a0] = object2;
r0 = true;
}
}
} else if (value4 > value3) {
env0_9[a0] = {style: env0_8.GENTLE_AMBIENT_WITH_INTRO, userCount: value4};
scheduleTransitionToGentleAmbient(a0);
r0 = true;
} else if (r4 > value3) {
if (value4 > r4) {
env0_9[a0] = {style: env0_8.HIGH_CONTRAST, userCount: value4};
scheduleTransitionToGentleAmbient(a0);
r0 = true;
} else if (value3 === value4) {
clearAnimationTimer(a0);
delete env0_9[a0];
r0 = true;
} else {
r0 = property != null && value4 !== r4;
if (r0) {
binding = env0_9;
object2 = {};
copyDataProperties(object2, property, Math);
object2['userCount'] = value4;
binding[a0] = object2;
r0 = true;
}
}
} else if (value3 === value4) {
clearAnimationTimer(a0);
delete env0_9[a0];
r0 = true;
} else {
r0 = property != null && value4 !== r4;
if (r0) {
binding = env0_9;
object2 = {};
copyDataProperties(object2, property, Math);
object2['userCount'] = value4;
binding[a0] = object2;
r0 = true;
}
}
return r0;
}
function _fun95817(a0) { // fn#95817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12726:2337, offset: 0x0214f980, size: 124 bytes, params: 2, frame: 16
const closure = VoiceChannelAnimationStateStoreClass;
env0_4(closure, a0);
return env0_1(closure, [{key: 'initialize', value: function() {
this.waitFor(VoiceStateStore, SelectedGuildStore);
}}, {key: 'getAnimationStyle', value: value_95820}, {key: 'getUserCount', value: value_95821}]);
}
function VOICE_STATE_UPDATES_95822({voiceStates}) { // fn#95822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12726:3107, offset: 0x0214fa75, size: 334 bytes, params: 2, frame: 27
var r4;
var r15;
var r14;
var r2;
var r3;
var value8;
var guildId;
var oldChannelId;
var oldChannelId2;
var property;
var channelId;
var channelId2;
var value9;
var value12;
var updateChannelAnimationStateBinding;
var value13;
var value14;
const guildId2 = SelectedGuildStore.getGuildId();
let r0 = guildId2 !== env0_11 && guildId2 != null;
if (r0) {
}
const object2 = {};
const value5 = _createForOfIteratorHelperLoose_95808(voiceStates);
const value6 = value5();
let done = value6.done;
if (!done) {
r4 = value6;
while (true) {
value8 = r4.value;
guildId = value8.guildId;
if (guildId === guildId2) {
oldChannelId = value8.oldChannelId;
if (oldChannelId == null) {
continue;
}
oldChannelId = value8.oldChannelId;
oldChannelId2 = value8.oldChannelId;
property = object2[oldChannelId2];
if (property != null) {
r15 = property;
continue;
}
r15 = 0;
continue;
object2[oldChannelId] = r15 - 1;
channelId = value8.channelId;
if (channelId == null) {
break;
}
channelId = value8.channelId;
channelId2 = value8.channelId;
property = object2[channelId2];
if (property != null) {
r14 = property;
continue;
}
r14 = 0;
continue;
object2[channelId] = r14 + 1;
break;
}
value9 = value5();
done = value9.done;
if (done) {
break;
}
r4 = value9;
continue;
}
}
const Object = global.Object;
const value10 = Object.entries(object2);
let length = value10.length;
if (0 < length) {
r2 = 0;
r3 = false;
while (true) {
property = value10[r2];
value12 = env0_5(property, 2);
updateChannelAnimationStateBinding = updateChannelAnimationState;
property = value12[0];
if (updateChannelAnimationStateBinding(property, value12[1])) {
value13 = true;
r3 = value13;
}
value14 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
length = value10.length;
if (value14 < length) {
r2 = value14;
continue;
}
r0 = r3;
break;
}
} else {
r0 = false;
}
return r0;
}
function CHANNEL_SELECT_95823({guildId}) { // fn#95823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12726:3601, offset: 0x0214fbc3, size: 276 bytes, params: 2, frame: 23
var r8;
var r11;
var r1;
var property;
var channelId;
var channelId2;
var value5;
var value7;
var property2;
var binding;
var GENTLE_AMBIENT;
var value8;
if (guildId === env0_11) {
return false;
}
if (guildId == null) {
return false;
}
resetAllState();
const voiceStates = VoiceStateStore.getVoiceStates(guildId);
const object2 = {};
let Object = global.Object;
const value3 = Object.values(voiceStates);
let length = value3.length;
if (0 < length) {
r8 = 0;
while (true) {
property = value3[r8];
channelId = property.channelId;
if (channelId != null) {
channelId = property.channelId;
channelId2 = property.channelId;
property = object2[channelId2];
if (property != null) {
r11 = property;
continue;
}
r11 = 0;
continue;
object2[channelId] = r11 + 1;
}
value5 = typeof r8 === 'bigint' ? r8 + 1n : +r8 + 1;
length = value3.length;
if (value5 < length) {
r8 = value5;
continue;
}
break;
}
}
Object = global.Object;
const value6 = Object.entries(object2);
length = value6.length;
if (0 < length) {
r1 = 0;
while (true) {
property = value6[r1];
value7 = env0_5(property, 2);
property = value7[0];
property2 = value7[1];
if (property2 > 0) {
binding = env0_9;
GENTLE_AMBIENT = env0_8.GENTLE_AMBIENT;
binding[property] = {style: GENTLE_AMBIENT, userCount: property2};
}
value8 = typeof r1 === 'bigint' ? r1 + 1n : +r1 + 1;
length = value6.length;
if (value8 < length) {
r1 = value8;
continue;
}
break;
}
}
return true;
}
function _fun95813() { // fn#95813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12726:1617, offset: 0x0214f7bc, size: 97 bytes, params: 1, frame: 16
var binding2;
var object2;
let binding = env1_9;
const property = binding[env0_0];
if (property != null) {
binding = env1_9;
binding2 = env0_0;
object2 = {};
copyDataProperties(object2, property, undefined);
object2['style'] = env1_8.GENTLE_AMBIENT;
binding[binding2] = object2;
binding = env1_12;
binding.emitChange();
}
delete env1_10[env0_0];
}
function value_95820(a0) { // fn#95820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12726:2809, offset: 0x0214fa1a, size: 46 bytes, params: 2, frame: 5
return env1_9[a0]?.style ?? env1_8.GENTLE_AMBIENT;
}
function value_95821(a0) { // fn#95821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12726:2923, offset: 0x0214fa48, size: 45 bytes, params: 2, frame: 4
const value = environment.__proto__;
const userCount = env1_9[a0]?.userCount;
return userCount ?? 0;
}
@@ -0,0 +1,18 @@
/* Metro module 8441; source: modules/channel/VoiceChannelBadgeExperiment.tsx; dependencies: [4108, 4620, 2] */
function _fun67008(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8626:6, offset: 0x01c12361, size: 259 bytes, params: 8, frame: 22
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const CommonTriggerPoints = (require(4108) /* metro dependency 4108: ExperimentConstants */).CommonTriggerPoints;
let value = require(4620) /* metro dependency 4620: experiments */;
const createExperiment = value.createExperiment;
const VOICE_CALL = CommonTriggerPoints.VOICE_CALL;
value = Reflect.apply(createExperiment, value, [{'id': '2026-03_voice_badge', 'kind': 'guild',
'commonTriggerPoint': null, 'label': 'Display Voice Channel Badge', commonTriggerPoint: VOICE_CALL,
defaultConfig: {enabled: false}, treatments: [{'id': 0, 'label': 'Control', config: {enabled: false}}, {'id': 1,
'label': 'Show voice badges', config: {enabled: true}}]}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/VoiceChannelBadgeExperiment.tsx');
exports.VoiceChannelBadgeExperiment = value;
exports.useVoiceChannelBadgeExperiment = useVoiceChannelBadgeExperiment;
exports.getVoiceChannelBadgeExperiment = getVoiceChannelBadgeExperiment;
}
@@ -0,0 +1,22 @@
/* Metro module 15684; source: modules/channel/VoiceChannelHoistingExperiment.tsx; dependencies: [4108, 4620, 2] */
function _fun120331(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15892:6, offset: 0x025282ed, size: 267 bytes, params: 8, frame: 22
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const CommonTriggerPoints = (require(4108) /* metro dependency 4108: ExperimentConstants */).CommonTriggerPoints;
let value = require(4620) /* metro dependency 4620: experiments */;
const createExperiment = value.createExperiment;
const VOICE_CALL = CommonTriggerPoints.VOICE_CALL;
value = Reflect.apply(createExperiment, value, [{'kind': 'guild', 'id': '2025-12_voice_channel_hoisting',
'label': 'Voice Channel Hoisting', commonTriggerPoint: VOICE_CALL, defaultConfig: {'enableWaveformIcon': false,
'enableHighlight': false}, treatments: [{'id': 1, 'label': 'Both waveform and highlight',
config: {'enableWaveformIcon': true, 'enableHighlight': true}}, {'id': 2, 'label': 'Waveform icon only',
config: {'enableWaveformIcon': true, 'enableHighlight': false}}]}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/VoiceChannelHoistingExperiment.tsx');
exports.VoiceChannelHoistingExperiment = value;
exports.useVoiceChannelHoistingExperiment = useVoiceChannelHoistingExperiment;
}
function useVoiceChannelHoistingExperiment(a0, a1) { // fn#120332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15892:670, offset: 0x025283f8, size: 46 bytes, params: 3, frame: 14
return env0_0.useExperiment({guildId: a0, location: a1}, {autoTrackExposure: false});
}
@@ -0,0 +1,251 @@
/* Metro module 9858; source: modules/channel/VoiceChannelStartTimeStore.tsx; dependencies: [6, 7, 15, 17, 18, 4257, 672, 677, 566, 694, 2] */
function _fun77281(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10044:6, offset: 0x01df81c3, size: 422 bytes, params: 8, frame: 22
const env0_0 = require;
const _arrayLikeToArray_77287 = 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 = CONNECTION_RESUMED_77289;
const closure2 = GUILD_CREATE_77290;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const gatewayConnectionStore = importDefault(4257) /* metro dependency 4257: GatewayConnectionStore */;
const Set = global.Set;
let set = new Set();
const env0_10 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
_fun77291(Store).displayName = 'VoiceChannelStartTimeStore';
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */, {GUILD_CREATE: closure2,
GUILD_DELETE: closure2, CONNECTION_RESUMED: closure, CONNECTION_OPEN: closure,
VOICE_CHANNEL_START_TIME_UPDATE: VOICE_CHANNEL_START_TIME_UPDATE, CHANNEL_INFO: CHANNEL_INFO_77297,
FETCH_CHANNEL_INFO: FETCH_CHANNEL_INFO_77298});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/VoiceChannelStartTimeStore.tsx');
exports.default = set;
}
function _isNativeReflectConstruct_77282() { // fn#77282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10044:160, offset: 0x01df8369, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_77282_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_77285(a0, a1) { // fn#77285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10044:353, offset: 0x01df83cb, 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 _fun77286;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_77287(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_77287(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_77287(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun77286;
}
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 _toTimestampMs(a0) { // fn#77288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10044:1282, offset: 0x01df853f, size: 84 bytes, params: 2, frame: 12
const Date = global.Date;
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const SECOND = Millis.SECOND;
const value = a0 * SECOND;
const value2 = Object.create(Date.prototype, {constructor: {value: Date}});
const date = new Date();
return (date instanceof Object ? date : value2).getTime();
}
function CONNECTION_OPEN_77289() { // fn#77289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10044:1360, offset: 0x01df8593, size: 21 bytes, params: 1, frame: 9
env0_9.clear();
}
function GUILD_CREATE_77290({guild}) { // fn#77290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10044:1403, offset: 0x01df85a8, size: 34 bytes, params: 2, frame: 11
env0_9.delete(guild.id);
}
function _fun77291(a0) { // fn#77291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10044:1459, offset: 0x01df85ca, size: 122 bytes, params: 2, frame: 16
const closure = VoiceChannelStartTimeStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'initialize', value: function() {
this.waitFor(GatewayConnectionStore);
}}, {key: 'getStartTime', value: value_77294}, {key: 'hasRequestedStartTimes', value: value_77295}]);
}
function VOICE_CHANNEL_START_TIME_UPDATE({guildId, id, voiceStartTime}) { // fn#77296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10044:2332, offset: 0x01df86a9, size: 80 bytes, params: 2, frame: 15
if (env0_10[guildId] == null) {
env0_10[guildId] = {};
}
env0_10[guildId][id] = voiceStartTime != null ? _toTimestampMs(voiceStartTime) : undefined;
}
function CHANNEL_INFO_77297({guildId, channels}) { // fn#77297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10044:2487, offset: 0x01df86f9, size: 115 bytes, params: 2, frame: 19
var r2;
var r1;
var value5;
var id;
var voiceStartTime;
var property;
var value6;
var value7;
env0_10[guildId] = {};
const value3 = _createForOfIteratorHelperLoose_77285(channels);
const value4 = value3();
let done = value4.done;
if (!done) {
r2 = value4;
while (true) {
value5 = r2.value;
id = value5.id;
voiceStartTime = value5.voiceStartTime;
property = env0_10[guildId];
if (voiceStartTime != null) {
value6 = _toTimestampMs(voiceStartTime);
r1 = value6;
} else {
r1 = undefined;
}
property[id] = r1;
value7 = value3();
done = value7.done;
if (done) {
break;
}
r2 = value7;
continue;
}
}
}
function FETCH_CHANNEL_INFO_77298({guildId}) { // fn#77298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10044:2710, offset: 0x01df876c, size: 29 bytes, params: 2, frame: 11
env0_9.add(guildId);
}
function value_77294(a0) { // fn#77294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10044:1874, offset: 0x01df8644, size: 101 bytes, params: 2, frame: 15
var property;
if (a0 != null) {
if (a0.guild_id == null) {
return undefined;
}
var type = a0.type;
var value2 = undefined;
var ChannelTypes = (require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes;
var GUILD_VOICE = ChannelTypes.GUILD_VOICE;
if (type === GUILD_VOICE) {
property = env1_10[a0.guild_id];
return property == null ? value2 : property[a0.id];
}
}
}
@@ -0,0 +1,14 @@
/* Metro module 4808; source: modules/channel/canJoinVoiceChannel.tsx; dependencies: [1383, 661, 2] */
function _fun41646(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#41646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4986:6, offset: 0x01124c65, size: 129 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(1383) /* metro dependency 1383: ChannelRecord */).isPrivate;
const env0_1 = (require(661) /* metro dependency 661: Constants */).BasicPermissions;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/canJoinVoiceChannel.tsx');
exports.default = canJoinVoiceChannel;
}
function canJoinVoiceChannel(a0, a1) { // fn#41647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4986:226, offset: 0x01124ce6, size: 62 bytes, params: 3, frame: 15
return isPrivate(a0.type) || a1.canBasicChannel(BasicPermissions.CONNECT | BasicPermissions.VIEW_CHANNEL, a0);
}
@@ -0,0 +1,221 @@
/* Metro module 9122; source: modules/channel/getChannelA11yLabel.tsx; dependencies: [1383, 3793, 1878, 661, 1244, 4805, 5107, 3995, 8375, 2] */
function _fun71468(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9307:6, offset: 0x01d212e4, size: 218 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = getStatusLabel;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(1383) /* metro dependency 1383: ChannelRecord */).THREAD_CHANNEL_TYPES;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_6 = constantsModule.ChannelTypes;
const env0_7 = constantsModule.StatusTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/getChannelA11yLabel.tsx');
exports.default = getChannelA11yLabel;
exports.getStatusLabel = closure;
exports.getChannelA11yHint = getChannelA11yHint;
}
function getStatusLabel(a0) { // fn#71469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9307:190, offset: 0x01d213be, size: 254 bytes, params: 2, frame: 12
var moduleValue;
var moduleValue2;
var moduleValue3;
var moduleValue4;
const ONLINE = StatusTypes.ONLINE;
if (ONLINE === a0) {
moduleValue4 = require(3995) /* metro dependency 3995: UserUtils */;
return moduleValue4.humanizeStatus(StatusTypes.ONLINE);
}
const IDLE = StatusTypes.IDLE;
if (IDLE === a0) {
moduleValue3 = require(3995) /* metro dependency 3995: UserUtils */;
return moduleValue3.humanizeStatus(StatusTypes.IDLE);
}
const DND = StatusTypes.DND;
if (DND === a0) {
moduleValue2 = require(3995) /* metro dependency 3995: UserUtils */;
return moduleValue2.humanizeStatus(StatusTypes.DND);
}
const INVISIBLE = StatusTypes.INVISIBLE;
if (INVISIBLE === a0) {
moduleValue = require(3995) /* metro dependency 3995: UserUtils */;
return moduleValue.humanizeStatus(StatusTypes.INVISIBLE);
}
return '';
}
function getChannelA11yLabel({channel, unread, mentionCount, voiceStates, embeddedActivitiesCount, activityNames, isSubscriptionGated, needSubscriptionToAccess, isIncomingCall, isOngoingCall, voiceChannelStartTime}) { // fn#71470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9307:540, offset: 0x01d214bc, size: 2314 bytes, params: 2, frame: 39
var r14;
var r2;
var r20;
var r0;
var r10;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var property;
var TPPk2T;
var formatToPlainString;
var bkpadO;
var object;
var push;
var userLimit;
var value10;
var JQtsGh;
var moduleValue2;
var formatActiveA11yTimestamp;
var Date;
var LmYuHT;
var object2;
var Bo4msg;
unread = !(unread === undefined) && unread;
mentionCount = mentionCount === undefined ? 0 : mentionCount;
isIncomingCall = !(isIncomingCall === undefined) && isIncomingCall;
isOngoingCall = !(isOngoingCall === undefined) && isOngoingCall;
const channelName = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(channel,
UserStore, RelationshipStore);
const r1 = (importDefault(5107) /* metro dependency 5107: isRoleRequired */)(channel) ? intl.string(t['4qvAtn']) : undefined;
const type = channel.type;
const DM = ChannelTypes.DM;
if (DM === type) {
r0 = mentionCount > 0 ? t.TO8LYt : unread ? t.F2MZsu : t.fYqXVY;
r10 = undefined;
r14 = r0;
} else if (ChannelTypes.GROUP_DM === type) {
r20 = mentionCount > 0 ? t.Lo0dCa : unread ? t['fxxUo/'] : t.lts3Ld;
formatToPlainString = intl.formatToPlainString;
object = {channelName: channelName, mentionCount: mentionCount};
object = [Reflect.apply(formatToPlainString, intl, [r20, object])];
formatToPlainString = intl.formatToPlainString;
object[1] = Reflect.apply(formatToPlainString, intl, [t.CxSA5N, {members: channel.recipients.length + 1}]);
r10 = object.join(', ');
r14 = undefined;
} else if (ChannelTypes.GUILD_STORE === type) {
Bo4msg = t.Bo4msg;
r10 = undefined;
r14 = Bo4msg;
} else if (ChannelTypes.GUILD_DIRECTORY === type) {
property = t['92EAF2'];
r10 = undefined;
r14 = property;
} else if (ChannelTypes.GUILD_ANNOUNCEMENT === type) {
r2 = mentionCount > 0 ? t.sDKIpm : unread ? t.VM7z8f : t.WJ3MPt;
r10 = undefined;
r14 = r2;
} else if (ChannelTypes.GUILD_VOICE === type) {
formatToPlainString = intl.formatToPlainString;
bkpadO = t.bkpadO;
object = {channelName: channelName};
object = [Reflect.apply(formatToPlainString, intl, [bkpadO, object])];
if (mentionCount > 0) {
object.push(intl.formatToPlainString(t['3l1GOx'], {mentionCount: mentionCount}));
}
if (unread) {
object.push(intl.string(t.x5zAGZ));
}
userLimit = channel.userLimit;
if (voiceStates != null) {
if (voiceStates.length > 0) {
value10 = voiceStates.length - 3;
object.push(voiceStates.slice(0, 3).map(_fun71471).join(', '));
if (value10 > 0) {
object.push(intl.formatToPlainString(t.sfgpgr, {overflow: value10}));
}
if (userLimit != null && userLimit > 0) {
object.push(intl.formatToPlainString(t['6qgTOF'], {userCount: voiceStates.length,
limit: userLimit}));
}
}
}
if (voiceChannelStartTime != null) {
push = object.push;
formatToPlainString = intl.formatToPlainString;
JQtsGh = t.JQtsGh;
moduleValue2 = require(8375) /* metro dependency 8375: utils */;
formatActiveA11yTimestamp = moduleValue2.formatActiveA11yTimestamp;
Date = global.Date;
Reflect.apply(push, object, [Reflect.apply(formatToPlainString, intl, [JQtsGh,
{duration: Reflect.apply(formatActiveA11yTimestamp, moduleValue2, [{start: voiceChannelStartTime},
Date.now()])}])]);
}
if (activityNames != null && activityNames.length > 0) {
push = object.push;
formatToPlainString = intl.formatToPlainString;
LmYuHT = t.LmYuHT;
object2 = {};
object2.activeActivities = activityNames.join(', ');
Reflect.apply(push, object, [Reflect.apply(formatToPlainString, intl, [LmYuHT, object2])]);
}
r10 = object.join(', ');
r14 = undefined;
} else if (ChannelTypes.GUILD_STAGE_VOICE === type) {
TPPk2T = t.TPPk2T;
r10 = undefined;
r14 = TPPk2T;
} else {
r14 = THREAD_CHANNEL_TYPES.has(channel.type) ? mentionCount > 0 ? t['ZL7+I6'] : unread ? t.YlVvmc : t['0nZpiF'] : mentionCount > 0 ? t.g8ONM0 : unread ? t.smf1CZ : t.s0JADj;
r10 = undefined;
}
if (r10 != null) {
r2 = [r10];
} else if (r14 != null) {
formatToPlainString = intl.formatToPlainString;
object = {channelName: channelName, mentionCount: mentionCount};
object = [Reflect.apply(formatToPlainString, intl, [r14, object])];
r2 = object;
} else {
r2 = [];
}
if (isIncomingCall) {
r2.push(intl.string(t['fk1/bX']));
} else if (isOngoingCall) {
r2.push(intl.string(t['NGg/fm']));
}
if (embeddedActivitiesCount != null && embeddedActivitiesCount > 0) {
r2.push(intl.formatToPlainString(t.O6PLYd, {activitiesCount: embeddedActivitiesCount}));
}
object = {isSubscriptionGated: isSubscriptionGated, needSubscriptionToAccess: needSubscriptionToAccess};
const r4 = object.isSubscriptionGated ? object.needSubscriptionToAccess ? intl.string(t['oj+HOs']) : intl.string(t.xI3TQQ) : undefined;
if (r4 != null) {
r2.push(r4);
}
if (r1 != null) {
r2.push(r1);
}
return r2.join(', ');
}
function getChannelA11yHint({channel, muted, userStatus, isFavorite}) { // fn#71472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9307:3132, offset: 0x01d21e00, size: 284 bytes, params: 2, frame: 19
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const items2 = [];
if (isFavorite) {
items2.push(intl.string(t.cCPjSK));
}
if (muted === true) {
items2.push(intl.string(t.C4zCMb));
return items2.join(', ');
}
const type = channel.type;
const DM = ChannelTypes.DM;
if (type === DM) {
if (userStatus != null) {
items2.push(getStatusLabel(userStatus));
}
}
return items2.length > 0 ? items2.join(', ') : undefined;
}
function _fun71471({nick, user}) { // fn#71471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9307:1767, offset: 0x01d21dc6, size: 58 bytes, params: 2, frame: 13
var r0;
var value;
if (nick != null) {
r0 = nick;
} else {
value = environment.__proto__;
value = require(3995) /* metro dependency 3995: UserUtils */;
value = value.getName(user);
r0 = value;
}
return r0;
}
@@ -0,0 +1,74 @@
/* Metro module 10254; source: modules/channel/getChannelIcon.tsx; dependencies: [57, 1878, 661, 1360, 1423, 2] */
function _fun79628(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10440:6, offset: 0x01e5b9b8, size: 169 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).ChannelTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/getChannelIcon.tsx');
exports.getChannelIconURL = getChannelIconURL_79629;
exports.getChannelIconSource = getChannelIconSource_79630;
}
function getChannelIconURL_79629(a0) { // fn#79629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10440:227, offset: 0x01e5ba61, size: 232 bytes, params: 2, frame: 18
var getChannelIconURL;
var object2;
var recipients;
var value2;
var property;
let value = a1;
const r5 = value !== undefined ? value : 32;
const type = a0.type;
const DM = ChannelTypes.DM;
if (DM === type) {
recipients = a0.recipients;
value2 = recipients.map(UserStore.getUser);
value = env0_3(value2.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish), 1);
property = value[0];
value = null;
return value == property ? value : property.getAvatarURL(undefined, r5, a2);
}
const GROUP_DM = ChannelTypes.GROUP_DM;
if (GROUP_DM === type) {
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
getChannelIconURL = value.getChannelIconURL;
object2 = {};
object2.id = a0.id;
object2.icon = a0.icon;
object2.applicationId = a0.getApplicationId();
object2.size = r5;
return Reflect.apply(getChannelIconURL, value, [object2]);
}
}
function getChannelIconSource_79630(a0) { // fn#79630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10440:550, offset: 0x01e5bb49, size: 224 bytes, params: 2, frame: 15
var getChannelIconSource;
var object2;
var recipients;
var value2;
var property;
const type = a0.type;
var value;
const DM = ChannelTypes.DM;
if (DM === type) {
recipients = a0.recipients;
value2 = recipients.map(UserStore.getUser);
value = env0_3(value2.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish), 1);
property = value[0];
value = null;
return value != property ? property.getAvatarSource(undefined) : value;
}
const GROUP_DM = ChannelTypes.GROUP_DM;
if (GROUP_DM === type) {
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
getChannelIconSource = value.getChannelIconSource;
object2 = {};
object2.id = a0.id;
object2.icon = a0.icon;
object2.applicationId = a0.getApplicationId();
object2.size = 128;
return Reflect.apply(getChannelIconSource, value, [object2]);
}
}
@@ -0,0 +1,83 @@
/* Metro module 5045; source: modules/channel/getConnectionsRoles.tsx; dependencies: [1938, 1867, 661, 483, 2] */
function _fun43709(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5223:6, offset: 0x0115a1be, size: 263 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
let value = require(661) /* metro dependency 661: Constants */;
const ChannelTypes = value.ChannelTypes;
const Permissions = value.Permissions;
const GUILD_TEXT = ChannelTypes.GUILD_TEXT;
items = [GUILD_TEXT];
const GUILD_VOICE = ChannelTypes.GUILD_VOICE;
items[1] = GUILD_VOICE;
const GUILD_ANNOUNCEMENT = ChannelTypes.GUILD_ANNOUNCEMENT;
items[2] = GUILD_ANNOUNCEMENT;
const GUILD_FORUM = ChannelTypes.GUILD_FORUM;
items[3] = GUILD_FORUM;
const PUBLIC_THREAD = ChannelTypes.PUBLIC_THREAD;
items[4] = PUBLIC_THREAD;
const PRIVATE_THREAD = ChannelTypes.PRIVATE_THREAD;
items[5] = PRIVATE_THREAD;
value = importAll(483) /* metro dependency 483: BigFlagUtils */;
const combine = value.combine;
const VIEW_CHANNEL = Permissions.VIEW_CHANNEL;
const SEND_MESSAGES = Permissions.SEND_MESSAGES;
const env0_5 = Reflect.apply(combine, value, [VIEW_CHANNEL, SEND_MESSAGES]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/getConnectionsRoles.tsx');
exports.default = getConnectionsRoles;
}
function getConnectionsRoles(a0) { // fn#43710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5223:391, offset: 0x0115a2c5, size: 150 bytes, params: 2, frame: 15
var r0;
var Object;
if (a0 != null) {
var value;
var binding = env0_4;
if (binding.includes(a0.type)) {
value = GuildStore.getGuild(a0.guild_id);
if (value == null) {
r0 = [];
} else {
Object = global.Object;
value = Object.values(a0.permissionOverwrites);
value = value.filter(_fun43711);
value = value.map(_fun43712);
value = value.filter(function(a0) {
return a0 != null;
});
r0 = value;
}
return r0;
}
}
return [];
}
function _fun43711(a0) { // fn#43711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5223:557, offset: 0x0115a35b, size: 144 bytes, params: 2, frame: 16
var r0;
var moduleValue;
let value = a0.type === 0;
if (value) {
value = environment.__proto__;
value = GuildRoleStore.getRole(env0_0.id, a0.id);
value = (value == null || value.tags == null ? undefined : value.tags.guild_connections) === null;
r0 = value;
} else {
r0 = value;
}
if (r0) {
value = environment.__proto__;
moduleValue = importAll(483) /* metro dependency 483: BigFlagUtils */;
value = !moduleValue.hasAny(a0.deny, env1_5);
r0 = value;
}
return r0;
}
function _fun43712({id}) { // fn#43712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5223:706, offset: 0x0115a3eb, size: 41 bytes, params: 2, frame: 13
const getRole = GuildRoleStore.getRole;
const id = env0_0.id;
return Reflect.apply(getRole, GuildRoleStore, [id, id]);
}
@@ -0,0 +1,24 @@
/* Metro module 5099; source: modules/channel/getFlattedChannelList.tsx; dependencies: [22, 2] */
function _fun44521(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5277:6, offset: 0x01172c36, size: 97 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/getFlattedChannelList.tsx');
exports.default = getFlattenedChannelList;
}
function getFlattenedChannelList(a0, a1) { // fn#44522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5277:177, offset: 0x01172c97, size: 99 bytes, params: 3, frame: 14
let value = a2;
const env0_0 = a1;
const r2 = value !== undefined ? value : function() {
return true;
};
value = importDefault(22) /* metro dependency 22 */;
value = value(a0);
value = value.map(function(a0) {
return a0.channel.id === 'null' ? require[a0.channel.id] : [a0, require[a0.channel.id]];
});
value = value.flattenDeep();
value = value.filter(r2);
return value.value();
}
@@ -0,0 +1,90 @@
/* Metro module 11891; source: modules/channel/hooks/useRequiredLinkedLobbyApplicationAuthorization.tsx; dependencies: [31, 4234, 5109, 566, 6779, 6772, 2] */
function _fun91275(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12077:6, offset: 0x02059d63, size: 174 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(31) /* metro dependency 31 */).useEffect;
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
const authorizedAppsStore = importDefault(5109) /* metro dependency 5109: AuthorizedAppsStore */;
const env0_6 = (require(5109) /* metro dependency 5109: AuthorizedAppsStore */).FetchState;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/hooks/useRequiredLinkedLobbyApplicationAuthorization.tsx');
exports.default = useRequiredLinkedLobbyApplicationAuthorization;
}
function useRequiredLinkedLobbyApplicationAuthorization(a0) { // fn#91276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12077:273, offset: 0x02059e11, size: 395 bytes, params: 2, frame: 24
var r7;
var r6;
const value = null;
const application_id = value != a0 && a0.require_application_authorization ? a0.application_id : value;
const {authorizationsFetchState,
applicationOAuth2Token} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([AuthorizedAppsStore],
function() {
var object = {};
object.authorizationsFetchState = AuthorizedAppsStore.getFetchState();
object.applicationOAuth2Token = AuthorizedAppsStore.getNewestTokenForApplication(application_id);
return object;
});
const application = (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStore],
function() {
return ApplicationStore.getApplication(application_id);
});
const application2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStore],
function() {
return ApplicationStore.getApplication(application?.parentId);
});
useEffect(_fun91280, [authorizationsFetchState, application_id]);
useEffect(_fun91281, [application_id, applicationOAuth2Token, authorizationsFetchState, application]);
useEffect(_fun91282, [application, authorizationsFetchState, application2]);
const r5 = value != application && (value == application.parentId || value != application2);
const value7 = value != application_id;
if (value7) {
r7 = authorizationsFetchState !== FetchState.FETCHED || value == application;
r7 = !r7 ? !r5 : r7;
r6 = r7;
} else {
r6 = value7;
}
return {showLinkedLobbyApplicationLoadingIndicator: r6,
requiredLinkedLobbyApplication: value == applicationOAuth2Token && value != application && r5 ? value == application2 ? application : application2 : value};
}
function _fun91280() { // fn#91280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12077:758, offset: 0x02059ffd, size: 79 bytes, params: 1, frame: 11
var r0;
var authorizationsFetchStateBinding;
var value;
const value2 = application_id != null;
if (value2) {
authorizationsFetchStateBinding = authorizationsFetchState;
value = environment.__proto__;
value = authorizationsFetchStateBinding === FetchState.NOT_FETCHED;
r0 = value;
} else {
r0 = value2;
}
if (r0) {
value = environment.__proto__;
value = importDefault(6779) /* metro dependency 6779: AuthorizedAppsActionCreators */;
value.fetch();
}
}
function _fun91281() { // fn#91281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12077:819, offset: 0x0205a04c, size: 106 bytes, params: 1, frame: 13
var value6;
var defaultImport;
if (application_id != null && application == null && authorizationsFetchState === FetchState.FETCHED) {
value6 = environment.__proto__;
defaultImport = importDefault(6772) /* metro dependency 6772: ApplicationActionCreators */;
defaultImport.fetchApplications([application_id], false);
}
}
function _fun91282() { // fn#91282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12077:907, offset: 0x0205a0b6, size: 129 bytes, params: 1, frame: 13
var value7;
var defaultImport;
if (application != null && application.parentId != null && application == null && authorizationsFetchState === FetchState.FETCHED) {
value7 = environment.__proto__;
defaultImport = importDefault(6772) /* metro dependency 6772: ApplicationActionCreators */;
defaultImport.fetchApplications([application.parentId], false);
}
}
@@ -0,0 +1,52 @@
/* Metro module 5107; source: modules/channel/isRoleRequired.tsx; dependencies: [1383, 482, 3789, 483, 2] */
function _fun44628(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5285:6, offset: 0x0117593f, size: 140 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(1383) /* metro dependency 1383: ChannelRecord */).GUILD_NON_CATEGORY_CHANNEL_TYPES;
const env0_3 = (require(482) /* metro dependency 482: Constants */).Permissions;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/isRoleRequired.tsx');
exports.default = isRoleRequired;
}
function isRoleRequired(a0) { // fn#44629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5285:239, offset: 0x011759cb, size: 197 bytes, params: 2, frame: 15
var r0;
var moduleValue;
var property;
var value2;
var moduleValue2;
if (a0 != null) {
var type = a0.type;
if (a0.guild_id == null) {
return false;
}
var value;
if (GUILD_NON_CATEGORY_CHANNEL_TYPES.has(type)) {
if (a0.isGuildVocal()) {
moduleValue = importAll(3789) /* metro dependency 3789: PermissionUtils */;
if (moduleValue.canEveryoneRole(Permissions.CONNECT, a0)) {
property = a0.permissionOverwrites[a0.guild_id];
value2 = property != null;
if (value2) {
moduleValue2 = importAll(483) /* metro dependency 483: BigFlagUtils */;
r0 = moduleValue2.has(property.deny, Permissions.VIEW_CHANNEL);
} else {
r0 = value2;
}
return r0;
}
return true;
}
property = a0.permissionOverwrites[a0.guild_id];
value2 = property != null;
if (value2) {
moduleValue2 = importAll(483) /* metro dependency 483: BigFlagUtils */;
r0 = moduleValue2.has(property.deny, Permissions.VIEW_CHANNEL);
} else {
r0 = value2;
}
return r0;
}
}
return false;
}
@@ -0,0 +1,16 @@
/* Metro module 12148; source: modules/channel/native/ChannelActionSheetUtils.tsx; dependencies: [4800, 6797, 3856, 2] */
function _fun93209(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12334:6, offset: 0x020aada7, size: 96 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/native/ChannelActionSheetUtils.tsx');
exports.copyGuildChannelOrThreadLink = copyGuildChannelOrThreadLink;
}
function copyGuildChannelOrThreadLink(a0, a1) { // fn#93210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12334:207, offset: 0x020aae07, size: 89 bytes, params: 3, frame: 16
let value = require(4800) /* metro dependency 4800: ChannelUtils */;
value = value.getChannelPermalink(a0, a1);
(require(6797) /* metro dependency 6797: ClipboardUtilsNative */).copy(value);
(require(3856) /* metro dependency 3856: ToastUtils */).presentLinkCopied();
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,98 @@
/* Metro module 10294; source: modules/channel/native/ChannelPickerActionSheet.tsx; dependencies: [31, 3793, 1878, 33, 1585, 6806, 4080, 6758, 7987, 6242, 10295, 6805, 6277, 7988, 6647, 4805, 2] */
function _fun79837(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10480:6, offset: 0x01e6442f, size: 179 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/native/ChannelPickerActionSheet.tsx');
exports.default = ChannelPickerActionSheet;
}
function ChannelPickerActionSheet(a0) { // fn#79838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10480:247, offset: 0x01e644e2, size: 563 bytes, params: 2, frame: 27
var r4;
var r11;
const env0_0 = a0;
const value2 = undefined;
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const header = a0.header;
const env0_1 = a0.guild;
const channels = a0.channels;
const env0_3 = a0.onSelect;
const selectedChannel = a0.selectedChannel;
if (header != null) {
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
r4 = <BottomSheetTitleHeader title={header.title} trailing={header.onClose != null ? ((ActionSheetCloseButton) => <ActionSheetCloseButton onPress={onPress_79839} />)((require(6806) /* metro dependency 6806: ActionSheetCloseButtonNative */).ActionSheetCloseButton) : value2} />;
} else {
r4 = value2;
}
if (a0.noChannelOptionLabel != null) {
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
r11 = <TableRadioRow value="" label={a0.noChannelOptionLabel} icon={((TableRowIcon) => <TableRowIcon source={importDefault(10295) /* metro dependency 10295 */} />)((require(6242) /* metro dependency 6242: TableRowIconNative */).TableRowIcon)} />;
} else {
r11 = value2;
}
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
const object = {paddingBottom: bottom};
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
return (
<ActionSheet scrollable header={r4}>
<BottomSheetScrollView contentContainerStyle={object}>
<TableRadioGroup
defaultValue={(selectedChannel == null ? value2 : selectedChannel.id) ?? ''}
accessibilityLabel={header == null ? value2 : header.title}
onChange={onChange_79840}
hasIcons
>
{[r11, channels.map(_fun79842)]}
</TableRadioGroup>
</BottomSheetScrollView>
</ActionSheet>
);
}
function ChannelPickerActionSheetOnPress() { // fn#79839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10480:474, owner: ChannelPickerActionSheet.onPress, offset: 0x01e64715, size: 48 bytes, params: 1, frame: 11
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
onClose();
}
function ChannelPickerActionSheetOnChange(a0) { // fn#79840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10480:989, owner: ChannelPickerActionSheet.onChange, offset: 0x01e64745, size: 169 bytes, params: 2, frame: 15
var environment;
var value3;
var value4;
const env0_0 = a0;
if (a0 === '') {
if (env0_0.noChannelOptionLabel != null) {
value4 = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
env0_0.onSelect(null);
return undefined;
}
}
const value2 = channels.find(_fun79841);
if (value2 != null) {
value3 = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
onSelect(value2);
}
}
function _fun79842(a0) { // fn#79842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10480:1190, offset: 0x01e647ee, size: 186 bytes, params: 2, frame: 21
const value = environment.__proto__;
const channelIconWithGuild = (require(6647) /* metro dependency 6647: ChannelUtils */).getChannelIconWithGuild(a0,
guild);
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
const tableRadioRowProps = {value: a0.id};
const useChannelNameModule = require(4805) /* metro dependency 4805: useChannelName */;
tableRadioRowProps.label = useChannelNameModule.computeChannelName(a0, UserStore, RelationshipStore);
const value4 = null;
tableRadioRowProps.icon = value4 != channelIconWithGuild ? ((TableRowIcon) => <TableRowIcon source={channelIconWithGuild} />)((require(6242) /* metro dependency 6242: TableRowIconNative */).TableRowIcon) : value4;
return <TableRadioRow {...tableRadioRowProps} key={a0.id} />;
}
@@ -0,0 +1,61 @@
/* Metro module 4016; source: modules/channel/native/ScreenIndexFrozen.tsx; dependencies: [31, 4017, 2] */
function _fun33072(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#33072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4174:6, offset: 0x01027162, size: 232 bytes, params: 8, frame: 22
const env0_0 = require;
const closure = isScreenIndexFrozen;
const closure2 = addFrozenScreenIndexesChangedListener;
const closure3 = removeFrozenScreenIndexesChangedListener;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
let Set = global.Set;
let set = new Set();
Set = global.Set;
set = new Set();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/native/ScreenIndexFrozen.tsx');
exports.freezeScreenIndex = freezeScreenIndex;
exports.isScreenIndexFrozen = closure;
exports.addFrozenScreenIndexesChangedListener = closure2;
exports.removeFrozenScreenIndexesChangedListener = closure3;
exports.useIsScreenIndexFrozenSharedValue = useIsScreenIndexFrozenSharedValue;
}
function addFrozenScreenIndexesChangedListener(a0) { // fn#33074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4174:174, offset: 0x01027260, size: 33 bytes, params: 2, frame: 12
const env0_0 = a0;
env0_4.add(a0);
return _fun33075;
}
function freezeScreenIndex(a0, a1) { // fn#33077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4174:451, offset: 0x01027298, size: 63 bytes, params: 3, frame: 12
const binding = env0_3;
if (a0) {
binding.add(a1);
} else {
binding.delete(a1);
}
env0_4.forEach(function(a0) {
return a0();
});
}
function useIsScreenIndexFrozenSharedValue(a0) { // fn#33079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4174:767, offset: 0x010272d7, size: 92 bytes, params: 2, frame: 16
const env0_0 = a0;
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(isScreenIndexFrozen(a0));
env0_2.useEffect(function() {
return addFrozenScreenIndexesChangedListener(_fun33081);
}, [a0, value2]);
return value2;
}
function _fun33075() { // fn#33075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4174:240, offset: 0x01027281, size: 23 bytes, params: 1, frame: 11
removeFrozenScreenIndexesChangedListener(env0_0);
}
function _fun33080() { // fn#33080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4174:886, offset: 0x01027333, size: 23 bytes, params: 1, frame: 11
return addFrozenScreenIndexesChangedListener(_fun33081);
}
function _fun33081() { // fn#33081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4174:929, offset: 0x0102734a, size: 37 bytes, params: 1, frame: 13
const binding = env1_1;
binding.set(isScreenIndexFrozen(env1_0));
}
@@ -0,0 +1,45 @@
/* Metro module 9091; source: modules/channel/native/components/CreateChannelTypeDescription.tsx; dependencies: [31, 27, 9092, 661, 33, 9093, 6721, 4573, 1244, 2] */
function _fun71094(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9276:6, offset: 0x01d14856, size: 200 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(27) /* metro dependency 27 */).View;
const env0_4 = (require(9092) /* metro dependency 9092: GuildProfileStore */).GuildProfileFetchStatus;
const env0_5 = (require(661) /* metro dependency 661: Constants */).ChannelTypes;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/native/components/CreateChannelTypeDescription.tsx');
exports.default = CreateChannelTypeDescription;
}
function CreateChannelTypeDescription({guildId, channelType}) { // fn#71095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9276:302, offset: 0x01d1491e, size: 328 bytes, params: 2, frame: 22
var r3;
var r0;
var VISIBLE;
var Text;
var intl;
const {guildProfile, fetchGuildProfile,
fetchStatus} = (require(9093) /* metro dependency 9093: useGuildProfile */).useGuildProfile(guildId);
const FETCHED = GuildProfileFetchStatus.FETCHED;
const value3 = fetchStatus !== FETCHED;
const value5 = guildProfile != null;
if (value5) {
VISIBLE = (require(6721) /* metro dependency 6721: GuildProfileVisibility */).GuildProfileVisibilitySets.VISIBLE;
r3 = VISIBLE.has(guildProfile.visibility);
} else {
r3 = value5;
}
const r1 = !value3 && !r3 && channelType === ChannelTypes.GUILD_ANNOUNCEMENT;
env0_2.useEffect(function() {
fetchGuildProfile();
}, [guildId, fetchGuildProfile]);
if (r1) {
Text = (require(4573) /* metro dependency 4573: Text */).Text;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = <View><Text variant="text-sm/normal" color="text-subtle">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2Ab4Id'])}</Text></View>;
} else {
r0 = null;
}
return r0;
}
@@ -0,0 +1,34 @@
/* Metro module 14694; source: modules/channel/native/getChannelSubtitleData.tsx; dependencies: [1244, 2] */
function _fun110867(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14891:6, offset: 0x0238a48a, size: 96 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/native/getChannelSubtitleData.tsx');
exports.getChannelSubtitleData = getChannelSubtitleData;
}
function getChannelSubtitleData(a0) { // fn#110868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14891:200, offset: 0x0238a4ea, size: 190 bytes, params: 2, frame: 17
var object2;
var intl;
if (a0 == null) {
return null;
}
const type = a0.type;
if (type === 'embedded-activities') {
return {subtitle: a0.name, type: a0.type};
}
if (type === 'event') {
return {subtitle: a0.name, type: a0.type};
}
if (type === 'go-live') {
object2 = {};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.subtitle = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Pa817q);
object2.type = a0.type;
return object2;
}
if (type === 'voice') {
return {subtitle: a0.text, type: a0.type};
}
}
@@ -0,0 +1,22 @@
/* Metro module 12129; source: modules/channel/native/openChannelLongPressActionSheet.tsx; dependencies: [4080, 12130, 1962, 2] */
function _fun93065(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12315:6, offset: 0x020a5094, size: 103 bytes, params: 8, frame: 18
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/native/openChannelLongPressActionSheet.tsx');
exports.openChannelLongPressActionSheet = function(a0) {
var value = 'ChannelLongPress-' + a0;
var env0_0 = value;
importDefault(dependencyMap[0]).openLazy(require(dependencyMap[2])(dependencyMap[1], dependencyMap.paths),
value,
{channelId: a0, onClose: _fun93067});
};
}
function openChannelLongPressActionSheet(a0) { // fn#93066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12315:218, offset: 0x020a50fb, size: 124 bytes, params: 2, frame: 19
const value = 'ChannelLongPress-' + a0;
const defaultImport = importDefault(dependencyMap[0]);
defaultImport.openLazy(require(dependencyMap[2])(dependencyMap[1], dependencyMap.paths), value, {channelId: a0,
onClose: onClose_93067});
}
@@ -0,0 +1,44 @@
/* Metro module 11265; source: modules/channel/native/openChannelPicker.tsx; dependencies: [1935, 1867, 4080, 10294, 1962, 1244, 2] */
function _fun86064(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11451:6, offset: 0x01f86848, size: 134 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/native/openChannelPicker.tsx');
exports.default = openChannelPicker;
}
function openChannelPicker(a0) { // fn#86065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11451:204, offset: 0x01f868ce, size: 319 bytes, params: 2, frame: 28
const selectedChannel = a0.selectedChannel;
const guildId = a0.guildId;
const channelType = a0.channelType;
const filterFn = a0.filterFn;
const r10 = filterFn !== undefined ? filterFn : function() {
return true;
};
const onClose = a0.onClose;
const object4 = {'selectedChannel': 0, 'guildId': 0, 'channelType': 0, 'filterFn': 0, 'onClose': 0};
silentSetPrototypeOf(object4, null, undefined);
const value = copyDataProperties({}, a0, object4, undefined);
const guild = GuildStore.getGuild(guildId);
const getChannels = GuildChannelStore.getChannels;
const r9 = Reflect.apply(getChannels, GuildChannelStore, [guildId])[channelType] ?? [];
const defaultImport = importDefault(dependencyMap[2]);
const openLazy = defaultImport.openLazy;
const value4 = require(dependencyMap[4])(dependencyMap[3], dependencyMap.paths);
const object5 = {};
const object6 = {};
const intl = require(dependencyMap[5]).intl;
object6.title = intl.string(require(dependencyMap[5]).t.r2ptsz);
object6.onClose = onClose;
object5.header = object6;
object5.guild = guild;
object5.channels = r9.filter(r10).map(function(a0) {
return a0.channel;
});
object5.selectedChannel = selectedChannel;
copyDataProperties(object5, value, object4);
Reflect.apply(openLazy, defaultImport, [value4, 'ChannelPicker', object5]);
}
@@ -0,0 +1,13 @@
/* Metro module 4806; source: modules/channel/sanitizeGuildTextChannelName.tsx; dependencies: [2] */
function _fun41632(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#41632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4984:6, offset: 0x011244d4, size: 85 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/sanitizeGuildTextChannelName.tsx');
exports.default = function(a0) {
var value = a0.replace(RegExp('[\\s-~]+', 'g'), '-');
value = value.replace(RegExp('^-+', ''), '');
value = value.replace(RegExp('[\\\\\'!"#$%&()*+,./:;<=>?@[\\]^`{|}~]', 'g'), '');
return value.toLowerCase();
};
}
@@ -0,0 +1,34 @@
/* Metro module 10645; source: modules/channel/shouldShowVoiceChannelChangeConfirmation.tsx; dependencies: [4295, 1312, 1226, 1867, 4297, 2] */
function _fun81893(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10831:6, offset: 0x01ee300f, size: 170 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const gameConsoleStore = importDefault(4295) /* metro dependency 4295: GameConsoleStore */;
const unsyncedUserSettingsStore = importDefault(1312) /* metro dependency 1312: UnsyncedUserSettingsStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/shouldShowVoiceChannelChangeConfirmation.tsx');
exports.shouldShowVoiceChannelChangeConfirmation = shouldShowVoiceChannelChangeConfirmation;
}
function shouldShowVoiceChannelChangeConfirmation(a0) { // fn#81894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10831:283, offset: 0x01ee30b9, size: 204 bytes, params: 2, frame: 16
var value4;
if (!UnsyncedUserSettingsStore.disableVoiceChannelChangeAlert) {
var remoteSessionId = GameConsoleStore.getRemoteSessionId();
var getVoiceStateForSession = VoiceStateStore.getVoiceStateForSession;
var getId = AuthenticationStore.getId;
if (Reflect.apply(getVoiceStateForSession, VoiceStateStore, [Reflect.apply(getId, AuthenticationStore, []),
remoteSessionId]) != null) {
return false;
}
if (VoiceStateStore.isCurrentClientInVoiceChannel()) {
if (VoiceStateStore.isInChannel(a0.id)) {
return false;
}
value4 = GuildStore.getGuild(a0.getGuildId());
return value4?.afkChannelId == null || !VoiceStateStore.isInChannel(value4.afkChannelId);
}
}
return false;
}
@@ -0,0 +1,22 @@
/* Metro module 11786; source: modules/channel/trackWaveCtaClicked.tsx; dependencies: [1379, 661, 683, 2] */
function _fun90280(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11972:6, offset: 0x02032cdc, size: 155 bytes, params: 8, frame: 20
const closure = getDmHasMessageHistory;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_3 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/trackWaveCtaClicked.tsx');
exports.getDmHasMessageHistory = closure;
exports.trackWaveCtaClicked = function(a0) {
var defaultImport = importDefault(dependencyMap[2]);
var WAVE_CTA_CLICKED = AnalyticEvents.WAVE_CTA_CLICKED;
var object = {channel_id: a0.channelId, source: a0.source};
object.dm_has_message_history = getDmHasMessageHistory(a0.channelId);
defaultImport.track(WAVE_CTA_CLICKED, object);
};
}
function getDmHasMessageHistory(a0) { // fn#90281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11972:131, offset: 0x02032d77, size: 43 bytes, params: 2, frame: 12
return ChannelStore.getChannel(a0)?.lastMessageId != null;
}
+253
View File
@@ -0,0 +1,253 @@
/* Metro module 4805; source: modules/channel/useChannelName.tsx; dependencies: [57, 4107, 3793, 1878, 661, 1360, 3995, 1244, 566, 2] */
function _fun41619(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#41619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4983:6, offset: 0x01123de2, size: 287 bytes, params: 8, frame: 23
let env0_0 = require;
const closure = computeDefaultGroupDmNameFromUserIds;
const closure2 = function(a0, a1, a2) {
return computeDefaultGroupDmNameFromUserIds(a0.recipients, a1, a2);
};
const closure3 = computeChannelName;
const closure4 = function(a0) {
return a0.replace(RegExp('\\\\', 'g'), '\\\\').replace(RegExp('"', 'g'), '\\"');
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const experimentStore = importDefault(4107) /* metro dependency 4107: ExperimentStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).ChannelTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/useChannelName.tsx');
exports.default = useChannelName;
exports.computeDefaultGroupDmNameFromUserIds = closure;
exports.computeDefaultGroupDmName = closure2;
exports.useComputedGroupDmName = function(a0) {
var env0_0 = a0;
return require(dependencyMap[8]).useStateFromStores([UserStore, RelationshipStore], _fun41629);
};
exports.computeGroupDmName = function(a0) {
var name;
if (!a0.isObfuscated()) {
if (a0.isMultiUserDM()) {
name = a0.name;
return name === '' ? undefined : name;
}
}
};
exports.computeChannelName = closure3;
exports.escapeChannelName = closure4;
exports.unescapeChannelName = function(a0) {
return a0.replace(RegExp('\\\\"', 'g'), '"').replace(RegExp('\\\\\\\\', 'g'), '\\');
};
}
function computeDefaultGroupDmNameFromUserIds(a0, a1, a2) { // fn#41620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4983:159, offset: 0x01123f01, size: 218 bytes, params: 4, frame: 19
var r0;
var intl;
var formatToPlainString;
var property;
const env0_0 = a2;
const map = a0.map;
const getUser = a1.getUser;
let value = Reflect.apply(map, a0, [getUser]);
value = value.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
value = value.map(_fun41621);
if (value.length > 0) {
value = value.join(', ');
r0 = value;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
formatToPlainString = intl.formatToPlainString;
property = (require(1244) /* metro dependency 1244: indexNative */).t['9Uk8PF'];
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
value = Reflect.apply(formatToPlainString, intl, [property, {name: value.getName(a1.getCurrentUser())}]);
r0 = value;
}
return r0;
}
function computeChannelName(a0, a1, a2) { // fn#41623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4983:572, offset: 0x01124042, size: 668 bytes, params: 4, frame: 23
var recipients;
var property;
var intl;
let value = a3;
const value2 = a4;
const r7 = value !== undefined ? value : false;
let r6 = value2 !== undefined ? value2 : false;
const name = a0.name;
const closure = maybeFormatDmName;
if (a0.isObfuscated()) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/YzI63']);
}
const type = a0.type;
const DM = ChannelTypes.DM;
if (DM === type) {
if (name !== '') {
return closure(name);
}
recipients = a0.recipients;
value = recipients.map(a1.getUser);
value = value.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
value = env0_3(value, 1);
property = value[0];
if (property == null) {
return '???';
}
if (property.isProvisional) {
if (property.globalName != null) {
return property.globalName;
}
value = a2.getNickname(property.id);
if (value != null) {
r6 = value;
} else {
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
value = value.getName(property);
r6 = value;
}
value = '???';
return closure(r6 ?? value);
}
value = a2.getNickname(property.id);
if (value != null) {
r6 = value;
} else {
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
value = value.getName(property);
r6 = value;
}
value = '???';
return closure(r6 ?? value);
}
const GROUP_DM = ChannelTypes.GROUP_DM;
if (GROUP_DM === type) {
return name !== '' ? name : computeDefaultGroupDmName(a0, a1, a2);
}
const GUILD_ANNOUNCEMENT = ChannelTypes.GUILD_ANNOUNCEMENT;
if (GUILD_ANNOUNCEMENT === type) {
return r7 ? '#' + name : name;
}
const GUILD_TEXT = ChannelTypes.GUILD_TEXT;
if (GUILD_TEXT === type) {
return r7 ? '#' + name : name;
}
const GUILD_FORUM = ChannelTypes.GUILD_FORUM;
if (GUILD_FORUM === type) {
return r7 ? '#' + name : name;
}
const GUILD_MEDIA = ChannelTypes.GUILD_MEDIA;
if (GUILD_MEDIA === type) {
return r7 ? '#' + name : name;
}
const PUBLIC_THREAD = ChannelTypes.PUBLIC_THREAD;
if (PUBLIC_THREAD === type) {
if (r6) {
value = escapeChannelName(name);
value = '#"' + value + '"';
r6 = value;
} else {
r6 = r7 && a0.isThread() ? '"' + name + '"' : name;
}
return r6;
}
const PRIVATE_THREAD = ChannelTypes.PRIVATE_THREAD;
if (PRIVATE_THREAD === type) {
if (r6) {
value = escapeChannelName(name);
value = '#"' + value + '"';
r6 = value;
} else {
r6 = r7 && a0.isThread() ? '"' + name + '"' : name;
}
return r6;
}
const ANNOUNCEMENT_THREAD = ChannelTypes.ANNOUNCEMENT_THREAD;
if (ANNOUNCEMENT_THREAD === type) {
if (r6) {
value = escapeChannelName(name);
value = '#"' + value + '"';
r6 = value;
} else {
r6 = r7 && a0.isThread() ? '"' + name + '"' : name;
}
return r6;
}
const GUILD_VOICE = ChannelTypes.GUILD_VOICE;
if (GUILD_VOICE === type) {
if (r6) {
value = escapeChannelName(name);
value = '#"' + value + '"';
r6 = value;
} else {
r6 = r7 && a0.isThread() ? '"' + name + '"' : name;
}
return r6;
}
const GUILD_STAGE_VOICE = ChannelTypes.GUILD_STAGE_VOICE;
if (GUILD_STAGE_VOICE === type) {
if (r6) {
value = escapeChannelName(name);
value = '#"' + value + '"';
r6 = value;
} else {
r6 = r7 && a0.isThread() ? '"' + name + '"' : name;
}
return r6;
}
const GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
if (GUILD_CATEGORY === type) {
if (r6) {
value = escapeChannelName(name);
value = '#"' + value + '"';
r6 = value;
} else {
r6 = r7 && a0.isThread() ? '"' + name + '"' : name;
}
return r6;
}
return name;
}
function useChannelName(a0) { // fn#41626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4983:1595, offset: 0x01124349, size: 93 bytes, params: 2, frame: 15
const value = a1;
const env0_0 = a0;
const env0_1 = value !== undefined ? value : false;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore, ExperimentStore,
RelationshipStore], _fun41627);
}
function useComputedGroupDmName(a0) { // fn#41628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4983:1873, offset: 0x011243d5, size: 72 bytes, params: 2, frame: 15
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore, RelationshipStore], _fun41629);
}
function _fun41621(a0) { // fn#41621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4983:269, offset: 0x01123fdb, size: 70 bytes, params: 2, frame: 13
var r0;
let value = importDefault.getNickname(a0.id);
if (value != null) {
r0 = value;
} else {
value = environment.__proto__;
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
value = value.getName(a0);
r0 = value;
}
return r0;
}
function maybeFormatDmName(a0) { // fn#41624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4983:650, owner: computeChannelName.maybeFormatDmName, offset: 0x011242de, size: 40 bytes, params: 2, frame: 12
const value = a0;
return env0_0 ? '@' + value : value;
}
function _fun41627() { // fn#41627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4983:1670, offset: 0x011243a6, size: 47 bytes, params: 1, frame: 18
const value2 = null;
return value2 == env0_0 ? value2 : computeChannelName(env0_0, UserStore, RelationshipStore, env0_1);
}
function _fun41629() { // fn#41629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4983:1949, offset: 0x0112441d, size: 67 bytes, params: 1, frame: 16
const value2 = null;
return value2 != env0_0 && env0_0.isMultiUserDM() ? computeDefaultGroupDmName(env0_0, UserStore,
RelationshipStore) : value2;
}
@@ -0,0 +1,750 @@
/* Metro module 9085; source: modules/channel/useCreateChannelSubmit.tsx; dependencies: [5, 57, 31, 661, 1909, 483, 9086, 4002, 1244, 2] */
function _fun71000(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9270:6, offset: 0x01d119ca, size: 215 bytes, params: 8, frame: 20
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(5) /* metro dependency 5 */;
const env0_5 = importDefault(57) /* metro dependency 57 */;
const env0_6 = importAll(31) /* metro dependency 31 */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_7 = constantsModule.ChannelTypes;
const env0_8 = constantsModule.Permissions;
object2 = {PREMIUM_CHANNEL: 0};
object2[0] = 'PREMIUM_CHANNEL';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/useCreateChannelSubmit.tsx');
exports.default = useCreateChannelSubmit;
exports.CreateChannelMode = object2;
}
function useCreateChannelSubmit(a0) { // fn#71001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9270:324, offset: 0x01d11aa1, size: 138 bytes, params: 2, frame: 20
const env0_0 = a0;
const binding = env0_6;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_5;
let value = binding2(value2, 2);
const property = value[0];
const env0_1 = value[1];
useState = binding.useState;
value = binding2(Reflect.apply(useState, binding, [{}]), 2);
const property2 = value[0];
const env0_2 = value[1];
const useCallback = binding.useCallback;
value = _fun71002();
value = Reflect.apply(useCallback, binding, [value, [a0]]);
return [property, property2, value];
}
function _fun71002() { // fn#71002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9270:459, offset: 0x01d11b2b, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_4(_fun71004);
return _fun71005;
}
async function _fun71004(a0) { // fn#71004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9270:479, offset: 0x01d11b63, size: 673 bytes, params: 2, frame: 32
var r15;
var r12;
var errors;
var r2;
var value;
var value2;
var overwrites;
var bitrate;
var userLimit;
var createMode;
var guildId;
var name;
var channelType;
var categoryId;
var value3;
var value4;
var value5;
var PREMIUM_CHANNEL;
var push;
var object2;
var binding;
var binding2;
var PermissionOverwriteType;
var ROLE;
var VIEW_CHANNEL;
var value6;
var getFlag;
var value7;
var binding3;
var property;
var value8;
var createChannel;
var GUILD_CATEGORY;
var value9;
var value10;
var channel;
var value11;
var value12;
var value13;
var body;
var value14;
var id;
var guild_id;
var value15;
var binding4;
var value16;
var AccessibilityAnnouncer;
var announce;
var value17;
var intl;
var formatToPlainString;
var value18;
var t;
var Wke70b;
var value19;
var value20;
var error;
var binding5;
var value21;
var value22;
var string;
var value23;
var value24;
var value25;
var value26;
exceptionLanding100: while (true) {
value = undefined;
value2 = false;
if (value2) {
return value;
}
overwrites = a0.overwrites;
bitrate = a0.bitrate;
userLimit = a0.userLimit;
createMode = a0.createMode;
guildId = a0.guildId;
name = a0.name;
channelType = a0.channelType;
categoryId = a0.categoryId;
value = undefined;
await value;
value3 = undefined;
value4 = false;
if (value4) {
return value3;
}
value5 = environment.__proto__.__proto__.__proto__;
PREMIUM_CHANNEL = env3_9.PREMIUM_CHANNEL;
reducibleJoin5: while (true) {
if (createMode !== PREMIUM_CHANNEL) {
break reducibleJoin5;
}
push = overwrites.push;
object2 = {id: guildId};
binding = env3_0;
binding2 = env3_3;
PermissionOverwriteType = binding(binding2[4]).PermissionOverwriteType;
ROLE = PermissionOverwriteType.ROLE;
object2.type = ROLE;
VIEW_CHANNEL = env3_8.VIEW_CHANNEL;
object2.deny = VIEW_CHANNEL;
binding = env3_2;
value6 = binding(binding2[5]);
getFlag = value6.getFlag;
object2.allow = Reflect.apply(getFlag, value6, [0]);
Reflect.apply(push, overwrites, [object2]);
break reducibleJoin5;
}
value7 = environment.__proto__.__proto__;
importDefault(true);
reducibleJoin7: while (true) {
reduciblePort99: while (true) {
exceptionLanding68: while (true) {
try {
try {
binding = env3_1;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
break reducibleJoin7;
}
try {
binding = env3_0;
} catch (error) {
break exceptionLanding100;
}
try {
binding5 = env3_3;
} catch (error) {
break exceptionLanding100;
}
try {
property = binding5[7];
} catch (error) {
break exceptionLanding100;
}
try {
value21 = binding(property);
} catch (error) {
break exceptionLanding100;
}
try {
AccessibilityAnnouncer = value21.AccessibilityAnnouncer;
} catch (error) {
break exceptionLanding100;
}
try {
announce = AccessibilityAnnouncer.announce;
} catch (error) {
break exceptionLanding100;
}
try {
property = binding5[8];
} catch (error) {
break exceptionLanding100;
}
try {
value22 = binding(property);
} catch (error) {
break exceptionLanding100;
}
try {
intl = value22.intl;
} catch (error) {
break exceptionLanding100;
}
try {
string = intl.string;
} catch (error) {
break exceptionLanding100;
}
try {
property = binding5[8];
} catch (error) {
break exceptionLanding100;
}
try {
value23 = binding(property);
} catch (error) {
break exceptionLanding100;
}
try {
t = value23.t;
} catch (error) {
break exceptionLanding100;
}
try {
property = t['0SbUzm'];
} catch (error) {
break exceptionLanding100;
}
try {
value24 = Reflect.apply(string, intl, [property]);
} catch (error) {
break exceptionLanding100;
}
try {
Reflect.apply(announce, AccessibilityAnnouncer, [value24]);
} catch (error) {
break exceptionLanding100;
}
try {
} catch (error) {
break exceptionLanding100;
}
try {
body = error.body;
} catch (error) {
break exceptionLanding100;
}
try {
value25 = body == null;
} catch (error) {
break exceptionLanding100;
}
reducibleJoin93: while (true) {
if (value25) {
errors = value;
break reducibleJoin93;
}
try {
errors = body.errors;
} catch (error) {
break exceptionLanding100;
}
break reducibleJoin93;
}
try {
value26 = errors != null;
} catch (error) {
break exceptionLanding100;
}
if (value26) {
r2 = errors;
} else {
try {
object2 = {};
} catch (error) {
break exceptionLanding100;
}
r2 = object2;
}
try {
importAll(r2);
} catch (error) {
break exceptionLanding100;
}
break reduciblePort99;
}
importDefault(false);
return value;
}
try {
try {
binding3 = env3_3;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
property = binding3[6];
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
value8 = binding(property);
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
createChannel = value8.createChannel;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
object2 = {};
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
object2.guildId = guildId;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
object2.type = channelType;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
object2.name = name;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
object2.permissionOverwrites = overwrites;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
object2.bitrate = bitrate;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
object2.userLimit = userLimit;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
binding = env3_7;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
GUILD_CATEGORY = binding.GUILD_CATEGORY;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
value9 = null;
try {
try {
value10 = channelType === GUILD_CATEGORY;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
reducibleJoin25: while (true) {
if (value10) {
r15 = value9;
break reducibleJoin25;
}
r15 = categoryId;
break reducibleJoin25;
}
try {
try {
object2.parentId = r15;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
channel = Reflect.apply(createChannel, value8, [object2]);
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
await channel;
try {
try {
value11 = undefined;
value12 = false;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
if (value12) {
importDefault(false);
return value11;
}
try {
try {
value13 = value9 == value11;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
reducibleJoin66: while (true) {
if (value13) {
break reducibleJoin66;
}
try {
try {
body = value11.body;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
value14 = value9 != body;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
if (value14) {
r12 = body;
} else {
try {
try {
object2 = {};
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
r12 = object2;
}
try {
try {
id = r12.id;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
guild_id = r12.guild_id;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
value15 = value9 == id;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
if (value15) {
break reducibleJoin66;
}
try {
try {
binding = env3_0;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
binding4 = env3_3;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
property = binding4[7];
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
value16 = binding(property);
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
AccessibilityAnnouncer = value16.AccessibilityAnnouncer;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
announce = AccessibilityAnnouncer.announce;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
property = binding4[8];
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
value17 = binding(property);
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
intl = value17.intl;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
formatToPlainString = intl.formatToPlainString;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
property = binding4[8];
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
value18 = binding(property);
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
t = value18.t;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
Wke70b = t.Wke70b;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
object2 = {};
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
object2.name = name;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
value19 = Reflect.apply(formatToPlainString, intl, [Wke70b, object2]);
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
Reflect.apply(announce, AccessibilityAnnouncer, [value19]);
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
value20 = value9 == require;
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
if (value20) {
break reducibleJoin66;
}
try {
try {
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
try {
try {
require(id, guild_id);
} catch (error) {
break exceptionLanding68;
}
} catch (error) {
break exceptionLanding100;
}
break reducibleJoin66;
}
importDefault(false);
return value;
}
importDefault(false);
throw error;
}
@@ -0,0 +1,203 @@
/* Metro module 14472; source: modules/channel/usePrivateChannelWave.native.tsx; dependencies: [5, 57, 31, 661, 4503, 11786, 1230, 7067, 3857, 1244, 11785, 14473, 2] */
function _fun109509(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14669:6, offset: 0x0234fb19, size: 207 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_6 = constantsModule.ME;
const env0_7 = constantsModule.Routes;
const env0_8 = (require(4503) /* metro dependency 4503: MessageConstants */).MessageSendLocation;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/usePrivateChannelWave.native.tsx');
exports.default = usePrivateChannelWave;
}
function usePrivateChannelWave(a0, a1) { // fn#109510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14669:277, offset: 0x0234fbe8, size: 157 bytes, params: 3, frame: 18
var object2;
const env0_0 = a0;
const binding = env0_5;
const [property, env0_2] = env0_4(binding.useState(false), 2);
const value5 = binding.useCallback(env0_3(_fun109512), [a0.id, property]);
object2 = {};
object2.waveShouldShow = (require(14473) /* metro dependency 14473: usePrivateChannelWaveEligible */).usePrivateChannelWaveEligible(a0,
a1);
object2.wavePressed = value5;
return object2;
}
function* _fun109512() { // fn#109512, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14669:376, offset: 0x0234fc90, size: 404 bytes, params: 1, frame: 23
var r2;
var value3;
var binding;
var binding2;
var value4;
var trackWaveCtaClicked;
var object2;
var id;
var value5;
var transitionTo;
var CHANNEL;
var binding3;
var binding4;
var property;
var value6;
var sendStickers;
var SEND_WAVE;
var items2;
var value7;
var value8;
var value9;
var error;
var ok;
var status;
var value10;
var binding5;
var value11;
var open;
var binding6;
var intl;
var string;
var t;
var Whhv4w;
if (true) {
value = environment.__proto__;
if (!importDefault) {
dependencyMap(true);
value3 = environment.__proto__.__proto__;
binding = env2_0;
binding2 = env2_2;
value4 = binding(binding2[5]);
trackWaveCtaClicked = value4.trackWaveCtaClicked;
object2 = {};
id = require.id;
object2.channelId = id;
object2.source = 'Messages Tab';
Reflect.apply(trackWaveCtaClicked, value4, [object2]);
value5 = binding(binding2[6]);
transitionTo = value5.transitionTo;
binding = env2_7;
CHANNEL = binding.CHANNEL;
binding3 = env2_6;
id = require.id;
Reflect.apply(transitionTo, value5, [Reflect.apply(CHANNEL, binding, [binding3, id])]);
reducibleJoin4: while (true) {
reduciblePort26: while (true) {
exceptionLanding22: while (true) {
try {
binding = env2_1;
} catch (error) {
break exceptionLanding22;
}
break reducibleJoin4;
}
ok = error.ok;
reducibleJoin24: while (true) {
if (ok) {
r2 = ok;
break reducibleJoin24;
}
status = error.status;
value10 = status !== 429;
r2 = value10;
break reducibleJoin24;
}
reducibleJoin26: while (true) {
if (r2) {
break reducibleJoin26;
}
binding = env2_1;
binding5 = env2_2;
value11 = binding(binding5[8]);
open = value11.open;
object2 = {key: 'HANDLE_WAVE_PRESS_TOAST'};
binding6 = env2_0;
intl = binding6(binding5[9]).intl;
string = intl.string;
t = binding6(binding5[9]).t;
Whhv4w = t.Whhv4w;
object2.content = Reflect.apply(string, intl, [Whhv4w]);
object2.icon = binding(binding5[10]);
Reflect.apply(open, value11, [object2]);
break reducibleJoin26;
}
break reduciblePort26;
}
dependencyMap(false);
return undefined;
}
try {
binding4 = env2_2;
} catch (error) {
break exceptionLanding22;
}
try {
property = binding4[7];
} catch (error) {
break exceptionLanding22;
}
try {
value6 = binding(property);
} catch (error) {
break exceptionLanding22;
}
try {
sendStickers = value6.sendStickers;
} catch (error) {
break exceptionLanding22;
}
try {
} catch (error) {
break exceptionLanding22;
}
try {
id = require.id;
} catch (error) {
break exceptionLanding22;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding22;
}
try {
binding = env2_8;
} catch (error) {
break exceptionLanding22;
}
try {
SEND_WAVE = binding.SEND_WAVE;
} catch (error) {
break exceptionLanding22;
}
try {
object2.location = SEND_WAVE;
} catch (error) {
break exceptionLanding22;
}
try {
items2 = ['749054660769218631'];
} catch (error) {
break exceptionLanding22;
}
try {
value7 = Reflect.apply(sendStickers, value6, [id, items2, '', object2]);
} catch (error) {
break exceptionLanding22;
}
yield value7;
try {
value8 = undefined;
value9 = false;
} catch (error) {
break exceptionLanding22;
}
if (value9) {
return value8;
}
dependencyMap(false);
}
}
}
@@ -0,0 +1,65 @@
/* Metro module 14473; source: modules/channel/usePrivateChannelWaveEligible.tsx; dependencies: [4814, 3793, 1386, 661, 566, 21, 3826, 3738, 11290, 2] */
function _fun109513(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14670:6, offset: 0x0234fe24, size: 178 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const env0_5 = (require(1386) /* metro dependency 1386: ChannelConstants */).ChannelFlags;
const env0_6 = (require(661) /* metro dependency 661: Constants */).MessageTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/usePrivateChannelWaveEligible.tsx');
exports.usePrivateChannelWaveEligible = usePrivateChannelWaveEligible;
}
function usePrivateChannelWaveEligible(a0, a1) { // fn#109514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14670:277, offset: 0x0234fed6, size: 447 bytes, params: 3, frame: 27
var r5;
var value2;
const env0_0 = a0;
let r0 = a0.isDM() && !a0.isSystemDM() && !a0.rawRecipients.some(function(a0) {
return a0.bot;
});
value = null;
if (r0) {
value2 = a0.getRecipientId();
}
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RelationshipStore], _fun109516);
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RelationshipStore], _fun109517);
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([MessageStore], _fun109518);
const hasFlag = a0.hasFlag;
const HAS_ONLY_SYSTEM_MESSAGES = ChannelFlags.HAS_ONLY_SYSTEM_MESSAGES;
const hasFlag2 = Reflect.apply(hasFlag, a0, [HAS_ONLY_SYSTEM_MESSAGES]);
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([MessageStore], _fun109519);
const defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
const value8 = defaultImport.extractTimestamp(a0.id);
const dateUtilsModule = require(3826) /* metro dependency 3826: DateUtils */;
const isWithinInterval2 = dateUtilsModule.isWithinInterval((importDefault(3738) /* metro dependency 3738 */)(),
(importDefault(3738) /* metro dependency 3738 */)(value8), 1814400000);
const value11 = (require(11290) /* metro dependency 11290: useStrangerDangerWarning */).useStrangerDangerWarning(a0.id);
r0 = r0 && value4 && !value5;
if (r0) {
r5 = hasFlag2 || value == a1;
r5 = !r5 ? value6 : r5;
r0 = r5;
}
r0 = r0 && !value7 && isWithinInterval2 && value == value11;
return r0;
}
function _fun109516() { // fn#109516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14670:450, offset: 0x02350095, size: 40 bytes, params: 1, frame: 12
return env0_1 != null && RelationshipStore.isFriend(env0_1);
}
function _fun109517() { // fn#109517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14670:513, offset: 0x023500bd, size: 40 bytes, params: 1, frame: 12
return env0_1 != null && RelationshipStore.isIgnored(env0_1);
}
function _fun109518() { // fn#109518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14670:577, offset: 0x023500e5, size: 87 bytes, params: 1, frame: 13
const value = environment.__proto__;
const messages = MessageStore.getMessages(env0_0.id);
return messages.length === 1 && messages.first()?.type === MessageTypes.FRIEND_REQUEST_ACCEPTED;
}
function _fun109519() { // fn#109519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14670:772, offset: 0x0235013c, size: 32 bytes, params: 1, frame: 11
return MessageStore.hasCurrentUserSentWaveBlockingMessage(env0_0.id);
}
@@ -0,0 +1,84 @@
/* Metro module 11535; source: modules/channel/useTextareaPlaceholderAndLabels.tsx; dependencies: [661, 4805, 1244, 2] */
function _fun88355(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11721:6, offset: 0x01fe03f2, size: 134 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_3 = constantsModule.ChannelTypes;
const env0_4 = constantsModule.ChannelTypesSets;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/useTextareaPlaceholderAndLabels.tsx');
exports.default = useTextareaPlaceholderAndLabels;
}
function useTextareaPlaceholderAndLabels({channel, isReadonly, isCreatingThread}) { // fn#88356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11721:239, offset: 0x01fe0478, size: 1058 bytes, params: 2, frame: 23
var r0;
var THREADS;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var string;
var YzpScd;
var MKDeyL;
isReadonly = !(isReadonly === undefined) && isReadonly;
isCreatingThread = !(isCreatingThread === undefined) && isCreatingThread;
const value2 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel, true);
const value3 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel, false);
if (channel == null) {
object2 = {};
string = intl.string;
MKDeyL = t.MKDeyL;
object2.placeholder = Reflect.apply(string, intl, [MKDeyL]);
string = intl.string;
MKDeyL = t.MKDeyL;
object2.accessibilityLabel = Reflect.apply(string, intl, [MKDeyL]);
r0 = object2;
} else if (value2 == null) {
object2 = {};
string = intl.string;
MKDeyL = t.MKDeyL;
object2.placeholder = Reflect.apply(string, intl, [MKDeyL]);
string = intl.string;
MKDeyL = t.MKDeyL;
object2.accessibilityLabel = Reflect.apply(string, intl, [MKDeyL]);
r0 = object2;
} else if (isCreatingThread) {
object2 = {};
string = intl.string;
YzpScd = t.YzpScd;
object2.placeholder = Reflect.apply(string, intl, [YzpScd]);
string = intl.string;
YzpScd = t.YzpScd;
object2.accessibilityLabel = Reflect.apply(string, intl, [YzpScd]);
r0 = object2;
} else if (isReadonly) {
object2 = {};
object2.placeholder = intl.string(t['RRvRp/']);
object2.accessibilityLabel = intl.string(t['RRvRp/']);
r0 = object2;
} else if (channel.isForumPost()) {
object2 = {};
object2.placeholder = intl.formatToPlainString(t.Y6qWLc, {channel: value2});
object2.accessibilityLabel = intl.formatToPlainString(t.KffKoR, {channel: value3});
r0 = object2;
} else {
THREADS = ChannelTypesSets.THREADS;
if (THREADS.has(channel.type)) {
object2 = {};
object2.placeholder = intl.formatToPlainString(t['8lzR/R'], {channel: value2});
object2.accessibilityLabel = intl.formatToPlainString(t.UZIMWS, {channel: value3});
r0 = object2;
} else if (channel.type === ChannelTypes.DM) {
object2 = {};
object2.placeholder = intl.formatToPlainString(t['4c+CAx'], {channel: value2});
object2.accessibilityLabel = intl.formatToPlainString(t.fqOxbV, {channel: value3});
r0 = object2;
} else {
object2 = {};
object2.placeholder = intl.formatToPlainString(t['8lzR/R'], {channel: value2});
object2.accessibilityLabel = intl.formatToPlainString(t.ih7ZSA, {channel: value3});
r0 = object2;
}
}
return r0;
}
@@ -0,0 +1,48 @@
/* Metro module 14701; source: modules/channel/useVoiceChannelStartTime.tsx; dependencies: [31, 4646, 9858, 661, 566, 11331, 2] */
function _fun110887(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14898:6, offset: 0x0238b391, size: 171 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const guildAvailabilityStore = importDefault(4646) /* metro dependency 4646: GuildAvailabilityStore */;
const voiceChannelStartTimeStore = importDefault(9858) /* metro dependency 9858: VoiceChannelStartTimeStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).ChannelTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/useVoiceChannelStartTime.tsx');
exports.useStartTime = useStartTime;
}
function useStartTime(a0) { // fn#110888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14898:242, offset: 0x0238b43c, size: 171 bytes, params: 2, frame: 18
const env0_0 = a0;
const {hasRequestedStartTimes, startTime,
isGuildUnavailable} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([VoiceChannelStartTimeStore,
GuildAvailabilityStore], _fun110889);
const env0_2 = isGuildUnavailable;
const type = a0.type;
const GUILD_VOICE = ChannelTypes.GUILD_VOICE;
env0_2.useEffect(_fun110890, [type === GUILD_VOICE, a0.guild_id, hasRequestedStartTimes, isGuildUnavailable]);
return startTime;
}
function _fun110889() { // fn#110889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14898:313, offset: 0x0238b4e7, size: 80 bytes, params: 1, frame: 14
const object2 = {};
const hasRequestedStartTimes = VoiceChannelStartTimeStore.hasRequestedStartTimes;
const binding = env0_0;
object2.hasRequestedStartTimes = Reflect.apply(hasRequestedStartTimes, VoiceChannelStartTimeStore,
[binding.guild_id]);
object2.startTime = VoiceChannelStartTimeStore.getStartTime(binding);
object2.isGuildUnavailable = GuildAvailabilityStore.isUnavailable(binding.guild_id);
return object2;
}
function _fun110890() { // fn#110890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14898:567, offset: 0x0238b537, size: 76 bytes, params: 1, frame: 12
var value3;
var moduleValue;
let r1 = hasRequestedStartTimes || !result;
r1 = !r1 ? isGuildUnavailable : r1;
if (!r1) {
value3 = environment.__proto__;
moduleValue = require(11331) /* metro dependency 11331: ChannelInfoActionCreators */;
moduleValue.fetchChannelInfo(env0_0.guild_id);
}
}