262 lines
10 KiB
JavaScript
262 lines
10 KiB
JavaScript
/* Metro module 206; source: unknown; dependencies: [] */
|
|
function _fun2916(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#2916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:231:6, offset: 0x00c8c28d, size: 200 bytes, params: 8, frame: 15
|
|
var charCodeAt;
|
|
var value2;
|
|
const getLens = function(a0) {
|
|
var property = a0.length;
|
|
var value = 0;
|
|
if (property % 4 > value) {
|
|
throw new global.Error('Invalid string. Length must be a multiple of 4');
|
|
}
|
|
var value2 = a0.indexOf('=');
|
|
var r2 = value2 !== -1 ? value2 : property;
|
|
return [r2, r2 === property ? value : 4 - r2 % 4];
|
|
};
|
|
exports.byteLength = byteLength;
|
|
exports.toByteArray = toByteArray;
|
|
exports.fromByteArray = fromByteArray;
|
|
const items3 = [];
|
|
const items2 = [];
|
|
const Uint8Array = global.Uint8Array;
|
|
let r0 = typeof Uint8Array !== 'undefined' ? global.Uint8Array : global.Array;
|
|
let value = 0;
|
|
r0 = value;
|
|
reducibleLoop4: while (true) {
|
|
items3[r0] = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'[r0];
|
|
charCodeAt = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.charCodeAt;
|
|
items2[Reflect.apply(charCodeAt, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',
|
|
[r0])] = r0;
|
|
value2 = typeof r0 === 'bigint' ? r0 + 1n : +r0 + 1;
|
|
if (value2 < 64) {
|
|
r0 = value2;
|
|
continue reducibleLoop4;
|
|
}
|
|
break reducibleLoop4;
|
|
}
|
|
items2['-'.charCodeAt(value)] = 62;
|
|
value = '_'.charCodeAt(value);
|
|
items2[value] = 63;
|
|
function encodeChunk(a0, a1, a2) { // fn#2918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:231:1262, offset: 0x00c8c3c6, size: 222 bytes, params: 4, frame: 30
|
|
var r15;
|
|
var value3;
|
|
var value4;
|
|
var push;
|
|
var binding;
|
|
var property;
|
|
var value5;
|
|
var value6;
|
|
let value = a1;
|
|
const items2 = [];
|
|
if (value < a2) {
|
|
for (r15 = value; true; r15 = value) {
|
|
value = a0[r15] << 16;
|
|
value3 = a0[r15 + 1] << 8;
|
|
value4 = 255 & a0[r15 + 2];
|
|
value &= 16711680;
|
|
value = value + (value3 & 65280) + value4;
|
|
push = items2.push;
|
|
binding = env0_0;
|
|
property = binding[value >> 18 & 63];
|
|
binding = env0_0;
|
|
value5 = property + binding[value >> 12 & 63];
|
|
binding = env0_0;
|
|
value6 = value5 + binding[value >> 6 & 63];
|
|
binding = env0_0;
|
|
Reflect.apply(push, items2, [value6 + binding[63 & value]]);
|
|
value = r15 + 3;
|
|
if (!(value < a2)) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
return items2.join('');
|
|
}
|
|
|
|
function byteLength(a0) { // fn#2919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:231:57, offset: 0x00c8c4a4, size: 54 bytes, params: 2, frame: 11
|
|
const lens = getLens(a0);
|
|
const property = lens[0];
|
|
const property2 = lens[1];
|
|
return 3 * (property + property2) / 4 - property2;
|
|
}
|
|
|
|
function toByteArray(a0) { // fn#2920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:231:145, offset: 0x00c8c4da, size: 503 bytes, params: 2, frame: 33
|
|
var r17;
|
|
var r2;
|
|
var r12;
|
|
var r5;
|
|
var r11;
|
|
var value8;
|
|
var charCodeAt;
|
|
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;
|
|
var value28;
|
|
let value = environment;
|
|
const lens = getLens(a0);
|
|
const value3 = 0;
|
|
let property = lens[value3];
|
|
const property2 = lens[1];
|
|
let binding = env0_2;
|
|
const binding2 = new binding(3 * (property + property2) / 4 - property2);
|
|
reducibleJoin2: while (true) {
|
|
if (property2 > value3) {
|
|
value8 = property - 4;
|
|
r17 = value8;
|
|
break reducibleJoin2;
|
|
}
|
|
r17 = property;
|
|
break reducibleJoin2;
|
|
}
|
|
if (value3 < r17) {
|
|
r2 = value3;
|
|
r12 = value3;
|
|
reducibleLoop3: while (true) {
|
|
binding = env0_1;
|
|
charCodeAt = a0.charCodeAt;
|
|
value9 = binding[Reflect.apply(charCodeAt, a0, [r12])] << 18;
|
|
binding = env0_1;
|
|
charCodeAt = a0.charCodeAt;
|
|
value10 = binding[Reflect.apply(charCodeAt, a0, [r12 + 1])] << 12;
|
|
binding = env0_1;
|
|
charCodeAt = a0.charCodeAt;
|
|
value11 = binding[Reflect.apply(charCodeAt, a0, [r12 + 2])] << 6;
|
|
binding = env0_1;
|
|
charCodeAt = a0.charCodeAt;
|
|
property = binding[Reflect.apply(charCodeAt, a0, [r12 + 3])];
|
|
value12 = value9 | value10 | value11 | property;
|
|
value13 = typeof r2 === 'bigint' ? r2 : +r2;
|
|
binding2[value13] = value12 >> 16 & 255;
|
|
value14 = typeof value13 === 'bigint' ? value13 + 1n : +value13 + 1;
|
|
value15 = typeof value14 === 'bigint' ? value14 : +value14;
|
|
binding2[value15] = value12 >> 8 & 255;
|
|
value16 = typeof value15 === 'bigint' ? value15 + 1n : +value15 + 1;
|
|
value17 = typeof value16 === 'bigint' ? value16 : +value16;
|
|
value18 = typeof value17 === 'bigint' ? value17 + 1n : +value17 + 1;
|
|
binding2[value17] = 255 & value12;
|
|
value19 = r12 + 4;
|
|
if (value19 < r17) {
|
|
r2 = value18;
|
|
r12 = value19;
|
|
continue reducibleLoop3;
|
|
}
|
|
r5 = value19;
|
|
r11 = value18;
|
|
break reducibleLoop3;
|
|
}
|
|
} else {
|
|
r5 = value3;
|
|
r11 = value3;
|
|
}
|
|
reducibleJoin6: while (true) {
|
|
if (property2 !== 2) {
|
|
r2 = r11;
|
|
break reducibleJoin6;
|
|
}
|
|
binding = env0_1;
|
|
charCodeAt = a0.charCodeAt;
|
|
value20 = binding[Reflect.apply(charCodeAt, a0, [r5])] << 2;
|
|
binding = env0_1;
|
|
charCodeAt = a0.charCodeAt;
|
|
value21 = binding[Reflect.apply(charCodeAt, a0, [r5 + 1])] >> 4;
|
|
value22 = typeof r11 === 'bigint' ? r11 : +r11;
|
|
value23 = typeof value22 === 'bigint' ? value22 + 1n : +value22 + 1;
|
|
binding2[value22] = 255 & (value20 | value21);
|
|
r2 = value23;
|
|
break reducibleJoin6;
|
|
}
|
|
reducibleJoin8: while (true) {
|
|
if (property2 !== 1) {
|
|
break reducibleJoin8;
|
|
}
|
|
binding = env0_1;
|
|
charCodeAt = a0.charCodeAt;
|
|
property = binding[Reflect.apply(charCodeAt, a0, [r5])];
|
|
value24 = property << 10;
|
|
binding = env0_1;
|
|
charCodeAt = a0.charCodeAt;
|
|
value25 = binding[Reflect.apply(charCodeAt, a0, [r5 + 1])] << 4;
|
|
binding = env0_1;
|
|
charCodeAt = a0.charCodeAt;
|
|
value = binding[Reflect.apply(charCodeAt, a0, [r5 + 2])] >> 2;
|
|
value = value24 | value25 | value;
|
|
value26 = typeof r2 === 'bigint' ? r2 : +r2;
|
|
binding2[value26] = value >> 8 & 255;
|
|
value27 = typeof value26 === 'bigint' ? value26 + 1n : +value26 + 1;
|
|
value28 = typeof value27 === 'bigint' ? value27 : +value27;
|
|
binding2[value28] = 255 & value;
|
|
break reducibleJoin8;
|
|
}
|
|
return binding2;
|
|
}
|
|
|
|
function fromByteArray(a0) { // fn#2921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:231:649, offset: 0x00c8c6d1, size: 292 bytes, params: 2, frame: 24
|
|
var r8;
|
|
var r10;
|
|
var push;
|
|
var encodeChunkBinding;
|
|
var value5;
|
|
var binding;
|
|
var property;
|
|
var value6;
|
|
var property2;
|
|
const length = a0.length;
|
|
let value = length % 3;
|
|
const items2 = [];
|
|
const value2 = length - value;
|
|
const value4 = 0;
|
|
if (value4 < value2) {
|
|
r8 = value4;
|
|
while (true) {
|
|
push = items2.push;
|
|
encodeChunkBinding = encodeChunk;
|
|
value5 = r8 + 16383;
|
|
r10 = value5 > value2 ? value2 : value5;
|
|
Reflect.apply(push, items2, [encodeChunkBinding(a0, r8, r10)]);
|
|
if (value5 < value2) {
|
|
r8 = value5;
|
|
continue;
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
if (value === 1) {
|
|
property = a0[length - 1];
|
|
push = items2.push;
|
|
binding = env0_0;
|
|
property2 = binding[property >> 2];
|
|
binding = env0_0;
|
|
Reflect.apply(push, items2, [property2 + binding[property << 4 & 63] + '==']);
|
|
} else if (value === 2) {
|
|
value = a0[length - 2] << 8;
|
|
value += a0[length - 1];
|
|
push = items2.push;
|
|
binding = env0_0;
|
|
property = binding[value >> 10];
|
|
binding = env0_0;
|
|
value6 = property + binding[value >> 4 & 63];
|
|
binding = env0_0;
|
|
Reflect.apply(push, items2, [value6 + binding[value << 2 & 63] + '=']);
|
|
}
|
|
return items2.join('');
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun2916, 206, []) /* metro module 206 */;
|