232 lines
9.2 KiB
TypeScript
232 lines
9.2 KiB
TypeScript
/* Metro module 1931; source: modules/cache/deserializeChannels.tsx; dependencies: [57, 483, 2] */
|
|
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
|
|
function _fun21352(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#21352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2058:6, offset: 0x00eee5fa, size: 159 bytes, params: 8, frame: 18
|
|
const _arrayLikeToArray_21355 = 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 deserializeChannels2 = deserializeChannels;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/cache/deserializeChannels.tsx');
|
|
exports.default = deserializeChannels2;
|
|
exports.deserializeChannelEntries = deserializeChannelEntries;
|
|
exports.deserializeChannel = deserializeChannel;
|
|
function _createForOfIteratorHelperLoose_21353(a0, a1) { // fn#21353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2058:110, offset: 0x00eee699, 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 _fun21354;
|
|
}
|
|
value = undefined;
|
|
if (a0) {
|
|
if (typeof a0 === 'string') {
|
|
value = _arrayLikeToArray_21355(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_21355(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
|
if (regexp.test(r9)) {
|
|
value = _arrayLikeToArray_21355(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
}
|
|
r5 = r6;
|
|
}
|
|
} else {
|
|
r5 = value;
|
|
}
|
|
if (r5) {
|
|
if (r5) {
|
|
}
|
|
return _fun21354;
|
|
}
|
|
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 _fun21354() { // fn#21354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2058:681, 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 deserializeChannels(a0) { // fn#21356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2058:1020, offset: 0x00eee80b, size: 170 bytes, params: 2, frame: 26
|
|
var r2;
|
|
var r8;
|
|
var value4;
|
|
var permissionOverwrites_;
|
|
var properties;
|
|
var properties2;
|
|
var properties3;
|
|
var propertyName;
|
|
var propertyName2;
|
|
var property;
|
|
var moduleValue;
|
|
var deserialize;
|
|
var allow;
|
|
var moduleValue2;
|
|
var deny;
|
|
var value5;
|
|
const value2 = _createForOfIteratorHelperLoose_21353(a0);
|
|
const value3 = value2();
|
|
let done = value3.done;
|
|
if (!done) {
|
|
r2 = value3;
|
|
while (true) {
|
|
value4 = r2.value;
|
|
permissionOverwrites_ = value4.permissionOverwrites_;
|
|
if (permissionOverwrites_ != null) {
|
|
properties = Object.keys(permissionOverwrites_);
|
|
properties2 = 0;
|
|
properties3 = properties.length;
|
|
if (properties === undefined) {
|
|
break;
|
|
}
|
|
for (r8 = properties2; true; r8 = propertyName2) {
|
|
propertyName = properties[r8];
|
|
propertyName2 = r8 + 1;
|
|
if (propertyName === undefined) {
|
|
break;
|
|
}
|
|
property = permissionOverwrites_[propertyName];
|
|
moduleValue = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
|
deserialize = moduleValue.deserialize;
|
|
allow = property.allow;
|
|
property.allow = Reflect.apply(deserialize, moduleValue, [allow]);
|
|
moduleValue2 = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
|
deserialize = moduleValue2.deserialize;
|
|
deny = property.deny;
|
|
property.deny = Reflect.apply(deserialize, moduleValue2, [deny]);
|
|
}
|
|
}
|
|
value5 = value2();
|
|
done = value5.done;
|
|
if (done) {
|
|
break;
|
|
}
|
|
r2 = value5;
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
|
|
function deserializeChannelEntries(a0) { // fn#21357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2058:1397, offset: 0x00eee8b5, size: 86 bytes, params: 2, frame: 18
|
|
var r2;
|
|
var value4;
|
|
var value5;
|
|
var value6;
|
|
const value2 = _createForOfIteratorHelperLoose_21353(a0);
|
|
const value3 = value2();
|
|
let done = value3.done;
|
|
if (!done) {
|
|
for (r2 = value3; true; r2 = value6) {
|
|
value4 = r2.value;
|
|
value5 = Module00057(value4, 2);
|
|
value5[0];
|
|
deserializeChannels(value5[1]);
|
|
value6 = value2();
|
|
done = value6.done;
|
|
if (done) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function deserializeChannel(a0) { // fn#21358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2058:1576, offset: 0x00eee90b, size: 126 bytes, params: 2, frame: 24
|
|
var propertyName;
|
|
var property;
|
|
var moduleValue;
|
|
var deserialize;
|
|
var allow;
|
|
var moduleValue2;
|
|
var deny;
|
|
const permissionOverwrites_ = a0.permissionOverwrites_;
|
|
if (permissionOverwrites_ != null) {
|
|
for (propertyName in permissionOverwrites_) {
|
|
property = permissionOverwrites_[propertyName];
|
|
moduleValue = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
|
deserialize = moduleValue.deserialize;
|
|
allow = property.allow;
|
|
property.allow = Reflect.apply(deserialize, moduleValue, [allow]);
|
|
moduleValue2 = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
|
deserialize = moduleValue2.deserialize;
|
|
deny = property.deny;
|
|
property.deny = Reflect.apply(deserialize, moduleValue2, [deny]);
|
|
}
|
|
}
|
|
return a0;
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun21352, 1931, [57, 483, 2]) /* metro module 1931, dependencies: [57, 483, 2] */;
|