293 lines
11 KiB
TypeScript
293 lines
11 KiB
TypeScript
/* Metro module 16222; source: modules/app_startup/ManagerRegistryShared.tsx; dependencies: [694, 2] */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
|
|
function _fun125452(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#125452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16430:6, offset: 0x025d8c07, size: 195 bytes, params: 8, frame: 18
|
|
const _arrayLikeToArray_125455 = 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 validateInDevMode = function(a0, a1) {
|
|
a1.actions;
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const Set = global.Set;
|
|
Object.create(Set.prototype, {constructor: {value: Set}});
|
|
new Set(['CHANNEL_SELECT', 'CHANNEL_PRELOAD', 'MESSAGE_CREATE']);
|
|
const env0_2 = {};
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/app_startup/ManagerRegistryShared.tsx');
|
|
exports.initialize = function(a0) {
|
|
var propertyName;
|
|
var property;
|
|
for (propertyName in a0) {
|
|
property = a0[propertyName];
|
|
validateInDevMode(undefined, property);
|
|
populateMap(property);
|
|
}
|
|
importDefault(dependencyMap[0]).addInterceptor(handleAction);
|
|
};
|
|
function _createForOfIteratorHelperLoose_125453(a0, a1) { // fn#125453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16430:46, offset: 0x025d8cca, 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 _fun125454;
|
|
}
|
|
value = undefined;
|
|
if (a0) {
|
|
if (typeof a0 === 'string') {
|
|
value = _arrayLikeToArray_125455(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_125455(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
|
if (regexp.test(r9)) {
|
|
value = _arrayLikeToArray_125455(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
}
|
|
r5 = r6;
|
|
}
|
|
} else {
|
|
r5 = value;
|
|
}
|
|
if (r5) {
|
|
if (r5) {
|
|
}
|
|
return _fun125454;
|
|
}
|
|
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 _fun125454() { // fn#125454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16430:617, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
|
|
return env0_1 >= env0_0.length ? {done: true} : {done: false,
|
|
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
|
|
}
|
|
|
|
}
|
|
|
|
function populateMap(a0) { // fn#125457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16430:1125, offset: 0x025d8e4b, size: 249 bytes, params: 2, frame: 18
|
|
var r6;
|
|
var r2;
|
|
var items2;
|
|
var value;
|
|
var value4;
|
|
var binding;
|
|
var property;
|
|
var value5;
|
|
const r4 = a0.actions ?? [];
|
|
let r0 = a0.hasStoreChangeListeners || a0.loadAfterConnectionOpen;
|
|
if (r0) {
|
|
if (r4.includes('POST_CONNECTION_OPEN')) {
|
|
r0 = r4;
|
|
} else {
|
|
items2 = [];
|
|
value = arraySpread(items2, r4, 0, undefined);
|
|
items2[value] = 'POST_CONNECTION_OPEN';
|
|
value + 1;
|
|
r0 = items2;
|
|
}
|
|
r6 = r0;
|
|
} else {
|
|
r6 = r4;
|
|
}
|
|
if (a0.loadRightBeforeConnectionOpen) {
|
|
if (r6.includes('CONNECTION_OPEN')) {
|
|
r0 = r6;
|
|
} else {
|
|
items2 = [];
|
|
value = arraySpread(items2, r6, 0, undefined);
|
|
items2[value] = 'CONNECTION_OPEN';
|
|
value + 1;
|
|
r0 = items2;
|
|
}
|
|
r2 = r0;
|
|
} else {
|
|
r2 = r6;
|
|
}
|
|
const value2 = _createForOfIteratorHelperLoose_125453(r2);
|
|
const value3 = value2();
|
|
let done = value3.done;
|
|
if (!done) {
|
|
r2 = value3;
|
|
while (true) {
|
|
value4 = r2.value;
|
|
if (!(value4 in env0_2)) {
|
|
binding = env0_2;
|
|
binding[value4] = [];
|
|
}
|
|
property = env0_2[value4];
|
|
property.push(a0);
|
|
value5 = value2();
|
|
done = value5.done;
|
|
if (done) {
|
|
break;
|
|
}
|
|
r2 = value5;
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
|
|
function handleAction(a0) { // fn#125458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16430:1514, offset: 0x025d8f44, size: 217 bytes, params: 2, frame: 16
|
|
var r1;
|
|
var r4;
|
|
var items2;
|
|
var _createForOfIteratorHelperLoose_125453Binding;
|
|
var binding;
|
|
var value2;
|
|
var value3;
|
|
var done;
|
|
var value4;
|
|
var neverLoadBeforeConnectionOpen;
|
|
var push;
|
|
var inlineRequire;
|
|
var value5;
|
|
var initialize;
|
|
var value6;
|
|
var length;
|
|
let type = a0.type;
|
|
let value = type !== 'CONNECTION_OPEN';
|
|
reducibleJoin2: while (true) {
|
|
if (value) {
|
|
type = a0.type;
|
|
value = type !== 'OVERLAY_INITIALIZE';
|
|
r1 = value;
|
|
break reducibleJoin2;
|
|
}
|
|
r1 = value;
|
|
break reducibleJoin2;
|
|
}
|
|
reducibleJoin4: while (true) {
|
|
if (r1) {
|
|
break reducibleJoin4;
|
|
}
|
|
value = environment;
|
|
env0_3 = true;
|
|
break reducibleJoin4;
|
|
}
|
|
type = a0.type;
|
|
reducibleJoin14: while (true) {
|
|
if (type in env0_2) {
|
|
items2 = [];
|
|
_createForOfIteratorHelperLoose_125453Binding = _createForOfIteratorHelperLoose_125453;
|
|
binding = env0_2;
|
|
type = a0.type;
|
|
value2 = _createForOfIteratorHelperLoose_125453Binding(binding[type]);
|
|
value3 = value2();
|
|
done = value3.done;
|
|
if (!done) {
|
|
r4 = value3;
|
|
reducibleLoop6: while (true) {
|
|
value4 = r4.value;
|
|
reducibleJoin10: while (true) {
|
|
reducibleJoin9: while (true) {
|
|
if (env0_3) {
|
|
break reducibleJoin9;
|
|
}
|
|
neverLoadBeforeConnectionOpen = value4.neverLoadBeforeConnectionOpen;
|
|
if (neverLoadBeforeConnectionOpen) {
|
|
push = items2.push;
|
|
Reflect.apply(push, items2, [value4]);
|
|
break reducibleJoin10;
|
|
}
|
|
break reducibleJoin9;
|
|
}
|
|
inlineRequire = value4.inlineRequire;
|
|
value5 = Reflect.apply(inlineRequire, value4, []);
|
|
initialize = value5.initialize;
|
|
Reflect.apply(initialize, value5, []);
|
|
break reducibleJoin10;
|
|
}
|
|
value6 = value2();
|
|
done = value6.done;
|
|
if (done) {
|
|
break reducibleLoop6;
|
|
}
|
|
r4 = value6;
|
|
continue reducibleLoop6;
|
|
}
|
|
}
|
|
length = items2.length;
|
|
if (length > 0) {
|
|
env0_2[a0.type] = items2;
|
|
break reducibleJoin14;
|
|
}
|
|
binding = env0_2;
|
|
type = a0.type;
|
|
delete binding[type];
|
|
break reducibleJoin14;
|
|
}
|
|
break reducibleJoin14;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun125452, 16222, [694, 2]) /* metro module 16222, dependencies: [694, 2] */;
|