Files
discord-decomp/sources/by-id/module-00509.jsx
T
2026-07-27 16:20:00 +03:00

276 lines
8.8 KiB
React

/* Metro module 509; source: unknown; dependencies: [] */
function _fun6539(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#6539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:559:6, offset: 0x00cfec96, size: 125 bytes, params: 8, frame: 4
const _arrayLikeToArray_6548 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var property;
var value6;
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) {
property = a0.length;
r1 = property;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
var value4 = new global.Array();
var value5 = 0;
if (value5 < r1) {
r2 = value5;
reducibleLoop5: while (true) {
value4[r2] = a0[r2];
value6 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value6 < r1) {
r2 = value6;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value4;
};
exports.type = function(a0) {
return a0.split(RegExp(' *; *', '')).shift();
};
exports.params = params;
exports.parseLinks = parseLinks;
exports.cleanHeader = function(a0, a1) {
delete a0['content-type'];
delete a0['content-length'];
delete a0['transfer-encoding'];
delete a0.host;
if (a1) {
delete a0.authorization;
delete a0.cookie;
}
return a0;
};
exports.isObject = function(a0) {
return a0 !== null && typeof a0 === 'object';
};
let Object = global.Object;
exports.hasOwn = Object.hasOwn || (function(a0, a1) {
var property;
if (a0 == null) {
throw new global.TypeError('Cannot convert undefined or null to object');
}
property = global.Object.prototype.hasOwnProperty;
var Object = global.Object;
return property.call(new Object(a0), a1);
});
exports.mixin = mixin;
}
function _createForOfIteratorHelper_6540(a0, a1) { // fn#6540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:559:46, offset: 0x00cfed13, size: 443 bytes, params: 3, frame: 18
var r7;
var value3;
var regexp;
var closure;
const env0_0 = a0;
const Symbol = global.Symbol;
let r2 = typeof Symbol !== 'undefined' && a0[global.Symbol.iterator];
r2 = !r2 ? a0['@@iterator'] : r2;
const env0_1 = r2;
if (r2) {
return {s: s_6544, n: n_6545, e: function(a0) {
env0_5 = true;
env0_3 = a0;
}, f: f_6547};
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (env0_1) {
}
closure = function() {
};
return {s: closure, n: n_6542, e: e_6543, f: closure};
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_6548(a0, value);
r2 = value;
} else {
value3 = global.Object.prototype.toString.call(a0).slice(8, -1);
r7 = value3 === 'Object' && a0.constructor ? a0.constructor.name : value3;
if (r7 === 'Map') {
r2 = global.Array.from(a0);
} else if (r7 === 'Set') {
r2 = global.Array.from(a0);
} else if (r7 === 'Arguments') {
value = _arrayLikeToArray_6548(a0, value);
r2 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r7)) {
value = _arrayLikeToArray_6548(a0, value);
r2 = value;
} else {
r2 = value;
}
}
}
} else {
r2 = value;
}
if (r2) {
if (r2) {
}
closure = function() {
};
return {s: closure, n: n_6542, e: e_6543, f: closure};
}
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 params(a0) { // fn#6550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:559:1270, offset: 0x00cfeef5, size: 237 bytes, params: 2, frame: 18
var r3;
var r2;
var value2;
var done;
var value3;
var regexp;
var value4;
var value5;
var value6;
var value7;
var error;
const object2 = {};
const _createForOfIteratorHelper_6540Binding = _createForOfIteratorHelper_6540;
let split = a0.split;
const value = _createForOfIteratorHelper_6540Binding(Reflect.apply(split, a0, [RegExp(' *; *', '')]));
try {
try {
value.s();
value2 = value.n();
done = value2.done;
if (!done) {
r3 = value2;
while (true) {
value3 = r3.value;
split = value3.split;
regexp = RegExp(' *= *', '');
value4 = Reflect.apply(split, value3, [regexp]);
value5 = value4.shift();
value6 = value4.shift();
if (!value5) {
r2 = value5;
continue;
}
r2 = value6;
if (!r2) {
continue;
}
object2[value5] = value6;
value7 = value.n();
done = value7.done;
if (done) {
break;
}
r3 = value7;
continue;
}
}
} catch (error) {
value.e(error);
}
} catch (error) {
value.f();
throw error;
}
value.f();
return object2;
}
function parseLinks(a0) { // fn#6551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:559:1496, offset: 0x00cfefe2, size: 261 bytes, params: 2, frame: 20
var r6;
var value2;
var done;
var value3;
var regexp;
var value4;
var property;
var value5;
var value6;
var value7;
var value8;
var error;
const object2 = {};
const _createForOfIteratorHelper_6540Binding = _createForOfIteratorHelper_6540;
let split = a0.split;
const value = _createForOfIteratorHelper_6540Binding(Reflect.apply(split, a0, [RegExp(' *, *', '')]));
try {
try {
value.s();
value2 = value.n();
done = value2.done;
if (!done) {
r6 = value2;
while (true) {
value3 = r6.value;
split = value3.split;
regexp = RegExp(' *; *', '');
value4 = Reflect.apply(split, value3, [regexp]);
property = value4[0];
value5 = property.slice(1, -1);
property = value4[1];
split = property.split;
regexp = RegExp(' *= *', '');
value6 = Reflect.apply(split, property, [regexp]);
property = value6[1];
value7 = property.slice(1, -1);
object2[value7] = value5;
value8 = value.n();
done = value8.done;
if (done) {
break;
}
r6 = value8;
continue;
}
}
} catch (error) {
value.e(error);
}
} catch (error) {
value.f();
throw error;
}
value.f();
return object2;
}
function mixin(a0, a1) { // fn#6555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:559:2158, offset: 0x00cff17d, size: 65 bytes, params: 3, frame: 20
var r3;
var propertyName;
var propertyName2;
var binding;
var hasOwn;
for (propertyName in a1) {
binding = env0_0;
hasOwn = binding.hasOwn;
if (!Reflect.apply(hasOwn, binding, [a1, propertyName])) {
r3 = propertyName2;
continue;
}
a0[propertyName] = a1[propertyName];
r3 = propertyName2;
}
}