Files
2026-07-28 01:06:53 +03:00

752 lines
33 KiB
JavaScript

/* Metro module 1222; source: unknown; dependencies: [] */
function _fun13674(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#13674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1349:6, offset: 0x00df1b4a, size: 56 bytes, params: 8, frame: 13
const value = global;
_fun13675(typeof global.window !== 'undefined' ? global.window : value === undefined ? this : value);
function _fun13675(a0) { // fn#13675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1349:37, offset: 0x00df1b82, size: 358 bytes, params: 2, frame: 22
var r4;
var TextDecoder;
var Object;
var defineProperty;
var prototype;
const closure = function() {
};
const TextDecoder2 = TextDecoder;
if (a0.TextEncoder) {
if (a0.TextDecoder) {
return false;
}
var env0_0 = ['utf-8', 'utf8', 'unicode-1-1-utf-8'];
Object = global.Object;
defineProperty = Object.defineProperty;
prototype = closure.prototype;
Reflect.apply(defineProperty, Object, [prototype, 'encoding', {value: 'utf-8'}]);
prototype = closure.prototype;
prototype.encode = encode_13679;
Object = global.Object;
defineProperty = Object.defineProperty;
prototype = TextDecoder2.prototype;
Reflect.apply(defineProperty, Object, [prototype, 'encoding', {value: 'utf-8'}]);
Object = global.Object;
defineProperty = Object.defineProperty;
prototype = TextDecoder2.prototype;
Reflect.apply(defineProperty, Object, [prototype, 'fatal', {value: false}]);
Object = global.Object;
defineProperty = Object.defineProperty;
prototype = TextDecoder2.prototype;
Reflect.apply(defineProperty, Object, [prototype, 'ignoreBOM', {value: false}]);
var env0_1;
if (typeof global.Buffer !== 'function') {
r4 = typeof global.Blob === 'function' && typeof global.URL === 'function';
r4 = r4 && typeof global.URL.createObjectURL === 'function';
if (r4) {
}
} else if (global.Buffer.from) {
env0_1 = function(a0) {
var Buffer = global.Buffer;
return Buffer.from(a0.buffer, a0.byteOffset, a0.byteLength).toString('utf-8');
};
} else {
r4 = typeof global.Blob === 'function' && typeof global.URL === 'function';
r4 = r4 && typeof global.URL.createObjectURL === 'function';
if (r4) {
}
}
prototype = TextDecoder2.prototype;
prototype.decode = decode_13682;
a0.TextEncoder = closure;
a0.TextDecoder = TextDecoder2;
} else {
var env0_0 = ['utf-8', 'utf8', 'unicode-1-1-utf-8'];
Object = global.Object;
defineProperty = Object.defineProperty;
prototype = closure.prototype;
Reflect.apply(defineProperty, Object, [prototype, 'encoding', {value: 'utf-8'}]);
prototype = closure.prototype;
prototype.encode = encode_13679;
Object = global.Object;
defineProperty = Object.defineProperty;
prototype = TextDecoder2.prototype;
Reflect.apply(defineProperty, Object, [prototype, 'encoding', {value: 'utf-8'}]);
Object = global.Object;
defineProperty = Object.defineProperty;
prototype = TextDecoder2.prototype;
Reflect.apply(defineProperty, Object, [prototype, 'fatal', {value: false}]);
Object = global.Object;
defineProperty = Object.defineProperty;
prototype = TextDecoder2.prototype;
Reflect.apply(defineProperty, Object, [prototype, 'ignoreBOM', {value: false}]);
var env0_1;
if (typeof global.Buffer !== 'function') {
r4 = typeof global.Blob === 'function' && typeof global.URL === 'function';
r4 = r4 && typeof global.URL.createObjectURL === 'function';
if (r4) {
}
} else if (global.Buffer.from) {
env0_1 = function(a0) {
var Buffer = global.Buffer;
return Buffer.from(a0.buffer, a0.byteOffset, a0.byteLength).toString('utf-8');
};
} else {
r4 = typeof global.Blob === 'function' && typeof global.URL === 'function';
r4 = r4 && typeof global.URL.createObjectURL === 'function';
if (r4) {
}
}
prototype = TextDecoder2.prototype;
prototype.decode = decode_13682;
a0.TextEncoder = closure;
a0.TextDecoder = TextDecoder2;
}
function TextDecoder(a0, a1) { // fn#13677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1349:63, offset: 0x00df1ce8, size: 157 bytes, params: 3, frame: 14
var RangeError;
var value4;
var rangeError;
let value = a0;
const value2 = a1;
const r1 = value === undefined ? 'utf-8' : value;
const r0 = value2 !== undefined ? value2 : {fatal: false};
const binding = env0_0;
value = binding.indexOf(r1.toLowerCase());
if (value === -1) {
RangeError = global.RangeError;
value = "Failed to construct 'TextDecoder': The encoding label provided ('" + r1;
value4 = Object.create(RangeError.prototype, {constructor: {value: RangeError}});
value += "') is invalid.";
rangeError = new RangeError(value);
value = rangeError instanceof Object ? rangeError : value4;
throw value;
}
if (r0.fatal) {
throw global.Error("Failed to construct 'TextDecoder': the 'fatal' option is unsupported.");
}
}
function u_13681(a0) { // fn#13681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1349:2206, offset: 0x00df233a, size: 223 bytes, params: 2, frame: 21
var URL;
var createObjectURL;
var Blob;
var prototype;
var value;
var blob;
var XMLHttpRequest;
var xMLHttpRequest;
var value3;
var open;
var send;
var responseText;
var revokeObjectURL;
var error;
var value4;
var qBinding;
var value5;
exceptionSkip19: while (true) {
exceptionLanding19: while (true) {
exceptionSkip14: while (true) {
exceptionLanding14: while (true) {
URL = global.URL;
createObjectURL = URL.createObjectURL;
Blob = global.Blob;
prototype = Blob.prototype;
value = Object.create(prototype, {constructor: {value: Blob}});
blob = new Blob([a0], {type: 'text/plain;charset=UTF-8'});
value = blob instanceof Object ? blob : value;
value = Reflect.apply(createObjectURL, URL, [value]);
try {
try {
XMLHttpRequest = global.XMLHttpRequest;
} catch (error) {
break exceptionLanding14;
}
} catch (error) {
break exceptionLanding19;
}
try {
try {
prototype = XMLHttpRequest.prototype;
} catch (error) {
break exceptionLanding14;
}
} catch (error) {
break exceptionLanding19;
}
try {
try {
} catch (error) {
break exceptionLanding14;
}
} catch (error) {
break exceptionLanding19;
}
try {
try {
xMLHttpRequest = new XMLHttpRequest();
} catch (error) {
break exceptionLanding14;
}
} catch (error) {
break exceptionLanding19;
}
try {
try {
value3 = xMLHttpRequest instanceof Object ? xMLHttpRequest : undefined;
} catch (error) {
break exceptionLanding14;
}
} catch (error) {
break exceptionLanding19;
}
try {
try {
open = value3.open;
} catch (error) {
break exceptionLanding14;
}
} catch (error) {
break exceptionLanding19;
}
try {
try {
Reflect.apply(open, value3, ['GET', value, false]);
} catch (error) {
break exceptionLanding14;
}
} catch (error) {
break exceptionLanding19;
}
try {
try {
send = value3.send;
} catch (error) {
break exceptionLanding14;
}
} catch (error) {
break exceptionLanding19;
}
try {
try {
Reflect.apply(send, value3, []);
} catch (error) {
break exceptionLanding14;
}
} catch (error) {
break exceptionLanding19;
}
try {
try {
responseText = value3.responseText;
} catch (error) {
break exceptionLanding14;
}
} catch (error) {
break exceptionLanding19;
}
URL = global.URL;
revokeObjectURL = URL.revokeObjectURL;
Reflect.apply(revokeObjectURL, URL, [value]);
return responseText;
break exceptionSkip14;
}
value4 = environment;
try {
qBinding = q;
} catch (error) {
break exceptionLanding19;
}
try {
value5 = qBinding(a0);
} catch (error) {
break exceptionLanding19;
}
URL = global.URL;
revokeObjectURL = URL.revokeObjectURL;
Reflect.apply(revokeObjectURL, URL, [error]);
return value5;
break exceptionSkip14;
}
break exceptionSkip19;
}
URL = global.URL;
revokeObjectURL = URL.revokeObjectURL;
Reflect.apply(revokeObjectURL, URL, [value]);
throw error;
break exceptionSkip19;
}
}
function decode_13682(a0, a1) { // fn#13682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1349:2448, offset: 0x00df2419, size: 163 bytes, params: 3, frame: 15
const value = a0;
const value2 = a1;
if ((value2 !== undefined ? value2 : {stream: false}).stream) {
throw global.Error("Failed to decode: the 'stream' option is unsupported.");
}
const Uint8Array = global.Uint8Array;
return env0_1(value instanceof Uint8Array ? value : value.buffer instanceof global.ArrayBuffer ? new global.Uint8Array() : new global.Uint8Array(value));
}
}
}
function q(a0) { // fn#13678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1349:368, offset: 0x00df1d85, size: 571 bytes, params: 2, frame: 46
var r27;
var r28;
var r29;
var r31;
var r32;
var push;
var String;
var fromCharCode;
var apply;
var subarray;
var value6;
var property;
var value7;
var value8;
var value9;
var value10;
var value11;
var value12;
var value13;
var value14;
var value15;
var value16;
var value17;
var value18;
var value19;
var value20;
var value21;
var value22;
var value23;
var value24;
var value25;
var value26;
var value27;
let value = a0;
const Math = global.Math;
const min = Math.min;
let length = value.length;
const value2 = Reflect.apply(min, Math, [65536, length + 1]);
const Uint16Array = global.Uint16Array;
const uint16Array = new Uint16Array(value2);
const items2 = [];
const value5 = 0;
let r0 = value5;
let r1 = value5;
let r26 = value;
reducibleLoop1: while (true) {
length = r26.length;
value = r1 < length;
reducibleJoin3: while (true) {
if (value) {
if (r0 >= value2 - 1) {
break reducibleJoin3;
}
r27 = r26;
r28 = r1;
r29 = r0;
value = typeof r28 === 'bigint' ? r28 : +r28;
value6 = typeof value === 'bigint' ? value + 1n : +value + 1;
property = r27[value];
if (128 & property) {
if ((224 & property) === 192) {
value = typeof value6 === 'bigint' ? value6 : +value6;
value25 = typeof value === 'bigint' ? value + 1n : +value + 1;
value = 63 & r27[value];
value26 = typeof r29 === 'bigint' ? r29 : +r29;
value27 = typeof value26 === 'bigint' ? value26 + 1n : +value26 + 1;
uint16Array[value26] = (31 & property) << 6 | value;
r0 = value27;
r1 = value25;
r26 = r27;
continue reducibleLoop1;
}
if ((240 & property) === 224) {
value = typeof value6 === 'bigint' ? value6 : +value6;
value20 = 63 & r27[value];
value = typeof value === 'bigint' ? value + 1n : +value + 1;
value = typeof value === 'bigint' ? value : +value;
value21 = typeof value === 'bigint' ? value + 1n : +value + 1;
value = 63 & r27[value];
value22 = typeof r29 === 'bigint' ? r29 : +r29;
value23 = typeof value22 === 'bigint' ? value22 + 1n : +value22 + 1;
value24 = (31 & property) << 12;
uint16Array[value22] = value24 | value20 << 6 | value;
r0 = value23;
r1 = value21;
r26 = r27;
continue reducibleLoop1;
}
if ((248 & property) !== 240) {
r0 = r29;
r1 = value6;
r26 = r27;
continue reducibleLoop1;
}
value = 7 & property;
value8 = typeof value6 === 'bigint' ? value6 : +value6;
value9 = 63 & r27[value8];
value10 = typeof value8 === 'bigint' ? value8 + 1n : +value8 + 1;
value11 = typeof value10 === 'bigint' ? value10 : +value10;
value12 = 63 & r27[value11];
value13 = typeof value11 === 'bigint' ? value11 + 1n : +value11 + 1;
value14 = typeof value13 === 'bigint' ? value13 : +value13;
value15 = typeof value14 === 'bigint' ? value14 + 1n : +value14 + 1;
value16 = 63 & r27[value14];
value <<= 18;
value |= value9 << 12;
value = value | value12 << 6 | value16;
reducibleJoin13: while (true) {
if (65535 < value) {
value -= 65536;
value17 = typeof r29 === 'bigint' ? r29 : +r29;
value18 = typeof value17 === 'bigint' ? value17 + 1n : +value17 + 1;
uint16Array[value17] = value >>> 10 & 1023 | 55296;
value = 56320 | 1023 & value;
r31 = value18;
r32 = value;
break reducibleJoin13;
}
r31 = r29;
r32 = value;
break reducibleJoin13;
}
value = typeof r31 === 'bigint' ? r31 : +r31;
value19 = typeof value === 'bigint' ? value + 1n : +value + 1;
uint16Array[value] = r32;
r0 = value19;
r1 = value15;
r26 = r27;
continue reducibleLoop1;
}
value = typeof r29 === 'bigint' ? r29 : +r29;
value7 = typeof value === 'bigint' ? value + 1n : +value + 1;
uint16Array[value] = property;
r0 = value7;
r1 = value6;
r26 = r27;
continue reducibleLoop1;
}
break reducibleJoin3;
}
push = items2.push;
String = global.String;
fromCharCode = String.fromCharCode;
apply = fromCharCode.apply;
subarray = uint16Array.subarray;
Reflect.apply(push, items2, [Reflect.apply(apply, fromCharCode, [null, Reflect.apply(subarray, uint16Array,
[value5,
r0])])]);
if (value) {
subarray = r26.subarray;
value = Reflect.apply(subarray, r26, [r1]);
r27 = value;
r28 = value5;
r29 = value5;
value = typeof r28 === 'bigint' ? r28 : +r28;
value6 = typeof value === 'bigint' ? value + 1n : +value + 1;
property = r27[value];
if (128 & property) {
if ((224 & property) === 192) {
value = typeof value6 === 'bigint' ? value6 : +value6;
value25 = typeof value === 'bigint' ? value + 1n : +value + 1;
value = 63 & r27[value];
value26 = typeof r29 === 'bigint' ? r29 : +r29;
value27 = typeof value26 === 'bigint' ? value26 + 1n : +value26 + 1;
uint16Array[value26] = (31 & property) << 6 | value;
r0 = value27;
r1 = value25;
r26 = r27;
continue reducibleLoop1;
}
if ((240 & property) === 224) {
value = typeof value6 === 'bigint' ? value6 : +value6;
value20 = 63 & r27[value];
value = typeof value === 'bigint' ? value + 1n : +value + 1;
value = typeof value === 'bigint' ? value : +value;
value21 = typeof value === 'bigint' ? value + 1n : +value + 1;
value = 63 & r27[value];
value22 = typeof r29 === 'bigint' ? r29 : +r29;
value23 = typeof value22 === 'bigint' ? value22 + 1n : +value22 + 1;
value24 = (31 & property) << 12;
uint16Array[value22] = value24 | value20 << 6 | value;
r0 = value23;
r1 = value21;
r26 = r27;
continue reducibleLoop1;
}
if ((248 & property) !== 240) {
r0 = r29;
r1 = value6;
r26 = r27;
continue reducibleLoop1;
}
value = 7 & property;
value8 = typeof value6 === 'bigint' ? value6 : +value6;
value9 = 63 & r27[value8];
value10 = typeof value8 === 'bigint' ? value8 + 1n : +value8 + 1;
value11 = typeof value10 === 'bigint' ? value10 : +value10;
value12 = 63 & r27[value11];
value13 = typeof value11 === 'bigint' ? value11 + 1n : +value11 + 1;
value14 = typeof value13 === 'bigint' ? value13 : +value13;
value15 = typeof value14 === 'bigint' ? value14 + 1n : +value14 + 1;
value16 = 63 & r27[value14];
value <<= 18;
value |= value9 << 12;
value = value | value12 << 6 | value16;
reducibleJoin13: while (true) {
if (65535 < value) {
value -= 65536;
value17 = typeof r29 === 'bigint' ? r29 : +r29;
value18 = typeof value17 === 'bigint' ? value17 + 1n : +value17 + 1;
uint16Array[value17] = value >>> 10 & 1023 | 55296;
value = 56320 | 1023 & value;
r31 = value18;
r32 = value;
break reducibleJoin13;
}
r31 = r29;
r32 = value;
break reducibleJoin13;
}
value = typeof r31 === 'bigint' ? r31 : +r31;
value19 = typeof value === 'bigint' ? value + 1n : +value + 1;
uint16Array[value] = r32;
r0 = value19;
r1 = value15;
r26 = r27;
continue reducibleLoop1;
}
value = typeof r29 === 'bigint' ? r29 : +r29;
value7 = typeof value === 'bigint' ? value + 1n : +value + 1;
uint16Array[value] = property;
r0 = value7;
r1 = value6;
r26 = r27;
continue reducibleLoop1;
}
break reducibleLoop1;
}
return items2.join('');
}
function encode_13679(a0, a1) { // fn#13679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1349:1065, offset: 0x00df1fc0, size: 831 bytes, params: 3, frame: 60
var r0;
var r3;
var r7;
var r8;
var r9;
var r39;
var r43;
var r46;
var r47;
var r44;
var r45;
var r40;
var r41;
var r4;
var r5;
var charCodeAt;
var value7;
var value8;
var value9;
var value10;
var length2;
var length3;
var value11;
var value12;
var set;
var value13;
var value14;
var value15;
var value16;
var value17;
let value = a1;
reducibleJoin2: while (true) {
if (value !== undefined) {
r0 = value;
break reducibleJoin2;
}
r0 = {stream: false};
break reducibleJoin2;
}
if (r0.stream) {
throw global.Error("Failed to encode: the 'stream' option is unsupported.");
}
const length = a0.length;
const Math = global.Math;
value = Math.max(32, length + (length >>> 1) + 7);
let Uint8Array = global.Uint8Array;
const value2 = value >>> 3;
let prototype = Uint8Array.prototype;
const value3 = Object.create(prototype, {constructor: {value: Uint8Array}});
let uint8Array = new Uint8Array(value2 << 3);
const value5 = uint8Array instanceof Object ? uint8Array : value3;
const value6 = 0;
if (value6 < length) {
r3 = value5;
r7 = value;
r8 = value6;
r9 = value6;
reducibleLoop4: while (true) {
charCodeAt = a0.charCodeAt;
value = typeof r9 === 'bigint' ? r9 : +r9;
value7 = typeof value === 'bigint' ? value + 1n : +value + 1;
value = Reflect.apply(charCodeAt, a0, [value]);
reducibleJoin22: while (true) {
reducibleJoin13: while (true) {
if (55296 <= value) {
if (56319 >= value) {
reducibleJoin9: while (true) {
if (value7 < length) {
charCodeAt = a0.charCodeAt;
value8 = Reflect.apply(charCodeAt, a0, [value7]);
if ((64512 & value8) !== 56320) {
r39 = value7;
r43 = value;
break reducibleJoin9;
}
value9 = typeof value7 === 'bigint' ? value7 + 1n : +value7 + 1;
value = 1023 & value;
value10 = 1023 & value8;
value = (value << 10) + value10 + 65536;
r39 = value9;
r43 = value;
break reducibleJoin9;
}
r39 = value7;
r43 = value;
break reducibleJoin9;
}
if (55296 <= r43) {
if (56319 >= r43) {
r9 = r39;
r39 = r3;
r40 = r8;
r41 = r7;
break reducibleJoin22;
}
r46 = r39;
r47 = r43;
} else {
r46 = r39;
r47 = r43;
}
} else {
r46 = value7;
r47 = value;
}
value = r8 + 4;
if (value > r3.length) {
value = r7 + 8;
length3 = a0.length;
value = value * (1 + r46 / length3 * 2) >>> 3 << 3;
Uint8Array = global.Uint8Array;
prototype = Uint8Array.prototype;
value11 = Object.create(prototype, {constructor: {value: Uint8Array}});
uint8Array = new Uint8Array(value);
value12 = uint8Array instanceof Object ? uint8Array : value11;
set = value12.set;
Reflect.apply(set, value12, [r3]);
r43 = value12;
r44 = value;
break reducibleJoin13;
}
r43 = r3;
r44 = r7;
break reducibleJoin13;
}
r46 = value7;
r47 = value;
value = r8 + 4;
length2 = r3.length;
if (value > length2) {
value = r7 + 8;
length3 = a0.length;
value = value * (1 + r46 / length3 * 2) >>> 3 << 3;
Uint8Array = global.Uint8Array;
prototype = Uint8Array.prototype;
value11 = Object.create(prototype, {constructor: {value: Uint8Array}});
uint8Array = new Uint8Array(value);
value12 = uint8Array instanceof Object ? uint8Array : value11;
set = value12.set;
Reflect.apply(set, value12, [r3]);
r43 = value12;
r44 = value;
break reducibleJoin13;
}
r43 = r3;
r44 = r7;
break reducibleJoin13;
}
if (4294967168 & r47) {
if (4294965248 & r47) {
if (4294901760 & r47) {
if (4292870144 & r47) {
r9 = r46;
r39 = r43;
r40 = r8;
r41 = r44;
break reducibleJoin22;
}
value = typeof r8 === 'bigint' ? r8 : +r8;
r43[value] = r47 >>> 18 & 7 | 240;
value = typeof value === 'bigint' ? value + 1n : +value + 1;
value = typeof value === 'bigint' ? value : +value;
r43[value] = r47 >>> 12 & 63 | 128;
value = typeof value === 'bigint' ? value + 1n : +value + 1;
value = typeof value === 'bigint' ? value : +value;
value16 = typeof value === 'bigint' ? value + 1n : +value + 1;
r43[value] = r47 >>> 6 & 63 | 128;
r45 = value16;
} else {
value = typeof r8 === 'bigint' ? r8 : +r8;
r43[value] = r47 >>> 12 & 15 | 224;
value = typeof value === 'bigint' ? value + 1n : +value + 1;
value = typeof value === 'bigint' ? value : +value;
value15 = typeof value === 'bigint' ? value + 1n : +value + 1;
r43[value] = r47 >>> 6 & 63 | 128;
r45 = value15;
}
} else {
value = typeof r8 === 'bigint' ? r8 : +r8;
value14 = typeof value === 'bigint' ? value + 1n : +value + 1;
r43[value] = r47 >>> 6 & 31 | 192;
r45 = value14;
}
value = typeof r45 === 'bigint' ? r45 : +r45;
value17 = typeof value === 'bigint' ? value + 1n : +value + 1;
r43[value] = 63 & r47 | 128;
r9 = r46;
r39 = r43;
r40 = value17;
r41 = r44;
break reducibleJoin22;
}
value = typeof r8 === 'bigint' ? r8 : +r8;
value13 = typeof value === 'bigint' ? value + 1n : +value + 1;
r43[value] = r47;
r9 = r46;
r39 = r43;
r40 = value13;
r41 = r44;
break reducibleJoin22;
}
if (r9 < length) {
r3 = r39;
r7 = r41;
r8 = r40;
continue reducibleLoop4;
}
r4 = r39;
r5 = r40;
break reducibleLoop4;
}
} else {
r4 = value5;
r5 = value6;
}
return r4.slice ? r4.slice(value6, r5) : r4.subarray(value6, r5);
}
global.__d(_fun13674, 1222, []) /* metro module 1222 */;