251 lines
11 KiB
TypeScript
251 lines
11 KiB
TypeScript
/* Metro module 5093; source: modules/channel/ChannelStatusStore.tsx; dependencies: [6, 7, 15, 17, 18, 4257, 677, 566, 694, 2] */
|
|
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
|
|
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
|
|
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
|
|
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
|
|
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
|
|
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
|
|
import GatewayConnectionStore from '../gateway/GatewayConnectionStore.tsx'; /* Metro dependency 4257 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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 CONNECTION_RESUMED_444182 = CONNECTION_RESUMED_44418;
|
|
const GUILD_CREATE_444192 = GUILD_CREATE_44419;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const Set = global.Set;
|
|
let set = new Set();
|
|
const env0_9 = {};
|
|
const Store = (Flux).Store;
|
|
_fun44420(Store).displayName = 'ChannelStatusStore';
|
|
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */, {GUILD_CREATE: GUILD_CREATE_444192,
|
|
GUILD_DELETE: GUILD_CREATE_444192, CONNECTION_RESUMED: CONNECTION_RESUMED_444182,
|
|
CONNECTION_OPEN: CONNECTION_RESUMED_444182, VOICE_CHANNEL_STATUS_UPDATE: VOICE_CHANNEL_STATUS_UPDATE_44425,
|
|
CHANNEL_INFO: CHANNEL_INFO_44426, FETCH_CHANNEL_INFO: FETCH_CHANNEL_INFO});
|
|
(FileImportTrackerModule).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 _fun44416() { // fn#44416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5271:924, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
|
|
return env0_1 >= env0_0.length ? {done: true} : {done: false,
|
|
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
|
|
}
|
|
|
|
}
|
|
|
|
function 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 ChannelStatusStore2 = ChannelStatusStore;
|
|
Inherits(ChannelStatusStore2, a0);
|
|
return CreateClass(ChannelStatusStore2, [{key: 'initialize', value: function() {
|
|
this.waitFor(GatewayConnectionStore);
|
|
}}, {key: 'getChannelStatus', value: value_44423}, {key: 'hasRequestedStatuses', value: value_44424}]);
|
|
function ChannelStatusStore() { // fn#44421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5271:1393, offset: 0x00ec62ac, size: 113 bytes, params: 1, frame: 20
|
|
const value = environment.__proto__;
|
|
env1_2(this, ChannelStatusStore);
|
|
const value3 = env1_5(ChannelStatusStore);
|
|
return env1_4(this, _isNativeReflectConstruct_44412() ? global.Reflect.construct(value3, arguments,
|
|
env1_5(this).constructor) : value3.apply(this, arguments));
|
|
}
|
|
|
|
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];
|
|
}
|
|
}
|
|
}
|
|
|
|
function value_44424(a0) { // fn#44424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5271:1933, offset: 0x0117085a, size: 22 bytes, params: 2, frame: 11
|
|
return env1_8.has(a0);
|
|
}
|
|
|
|
}
|
|
|
|
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 FETCH_CHANNEL_INFO({guildId}) { // fn#44427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5271:2512, offset: 0x0113f016, size: 29 bytes, params: 2, frame: 11
|
|
env0_8.add(guildId);
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun44411, 5093, [6, 7, 15, 17, 18, 4257, 677, 566, 694,
|
|
2]) /* metro module 5093, dependencies: [6, 7, 15, 17, 18, 4257, 677, 566, 694, 2] */;
|