283 lines
14 KiB
JavaScript
283 lines
14 KiB
JavaScript
/* Metro module 1321; source: unknown; dependencies: [57, 164, 65, 6, 7, 1322, 1320, 1323] */
|
|
import * as ClassCallCheckModule from './module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
|
|
import * as CreateClassModule from './module-00007-CreateClass.js'; /* Metro dependency 7 */
|
|
import * as Module00057Module from './module-00057.js'; /* Metro dependency 57 */
|
|
import * as Module00065Module from './module-00065.js'; /* Metro dependency 65 */
|
|
import * as Module00164Module from './module-00164.js'; /* Metro dependency 164 */
|
|
import * as Module01320Module from './module-01320.js'; /* Metro dependency 1320 */
|
|
import * as Module01323Module from './module-01323.js'; /* Metro dependency 1323 */
|
|
|
|
function _fun15088(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#15088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1448:6, offset: 0x00e229ea, size: 197 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
exports.binaryReadOptions = undefined;
|
|
exports.BinaryReader = undefined;
|
|
object = {readUnknownField: true, readerFactory: readerFactory};
|
|
exports.binaryReadOptions = binaryReadOptions;
|
|
exports.BinaryReader = _fun15091();
|
|
function readerFactory(a0) { // fn#15089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1448:229, offset: 0x00e22aaf, size: 32 bytes, params: 2, frame: 11
|
|
const binding = env0_8;
|
|
const value = Object.create(binding.prototype, {constructor: {value: binding}});
|
|
const binding2 = new binding(a0);
|
|
return binding2 instanceof Object ? binding2 : value;
|
|
}
|
|
|
|
function binaryReadOptions(a0) { // fn#15090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1448:293, offset: 0x00e22acf, size: 62 bytes, params: 2, frame: 17
|
|
return a0 ? global.Object.assign(global.Object.assign({}, env0_7), a0) : env0_7;
|
|
}
|
|
|
|
function _fun15091() { // fn#15091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1448:378, offset: 0x00e22b0d, size: 431 bytes, params: 1, frame: 15
|
|
return CreateClassModule(BinaryReader, [{key: 'tag', value: function() {
|
|
var Error;
|
|
var value3;
|
|
var value = this.uint32();
|
|
var value2 = value >>> 3;
|
|
value = 7 & value;
|
|
if (value2 <= 0) {
|
|
Error = global.Error;
|
|
value3 = Object.create(Error.prototype, {constructor: {value: Error}});
|
|
value = 'illegal tag: field no ' + value2 + ' wire type ' + value;
|
|
value = new Error(value);
|
|
value = value instanceof Object ? value : value3;
|
|
throw value;
|
|
}
|
|
if (value < 0) {
|
|
Error = global.Error;
|
|
value3 = Object.create(Error.prototype, {constructor: {value: Error}});
|
|
value = 'illegal tag: field no ' + value2 + ' wire type ' + value;
|
|
value = new Error(value);
|
|
value = value instanceof Object ? value : value3;
|
|
throw value;
|
|
}
|
|
if (value > 5) {
|
|
Error = global.Error;
|
|
value3 = Object.create(Error.prototype, {constructor: {value: Error}});
|
|
value = 'illegal tag: field no ' + value2 + ' wire type ' + value;
|
|
value = new Error(value);
|
|
value = value instanceof Object ? value : value3;
|
|
throw value;
|
|
}
|
|
return [value2, value];
|
|
}}, {key: 'skip', value: value_15094}, {key: 'assertBounds', value: function() {
|
|
if (this.pos > this.len) {
|
|
throw new global.RangeError('premature EOF');
|
|
}
|
|
}}, {key: 'int32', value: function() {
|
|
return this.uint32() | 0;
|
|
}}, {key: 'sint32', value: function() {
|
|
var value = this.uint32();
|
|
return value >>> 1 ^ -(1 & value);
|
|
}}, {key: 'int64', value: value_15098}, {key: 'uint64', value: value_15099}, {key: 'sint64', value: value_15100},
|
|
{key: 'bool', value: value_15101}, {key: 'fixed32', value: function() {
|
|
var view = this.view;
|
|
var value = this.pos + 4;
|
|
this.pos = value;
|
|
return view.getUint32(value - 4, true);
|
|
}}, {key: 'sfixed32', value: function() {
|
|
var view = this.view;
|
|
var value = this.pos + 4;
|
|
this.pos = value;
|
|
return view.getInt32(value - 4, true);
|
|
}}, {key: 'fixed64', value: value_15104}, {key: 'sfixed64', value: value_15105}, {key: 'float', value: function() {
|
|
var view = this.view;
|
|
var value = this.pos + 4;
|
|
this.pos = value;
|
|
return view.getFloat32(value - 4, true);
|
|
}}, {key: 'double', value: function() {
|
|
var view = this.view;
|
|
var value = this.pos + 8;
|
|
this.pos = value;
|
|
return view.getFloat64(value - 8, true);
|
|
}}, {key: 'bytes', value: function() {
|
|
var value = this.uint32();
|
|
var pos = this.pos;
|
|
this.pos += value;
|
|
this.assertBounds();
|
|
return this.buf.subarray(pos, pos + value);
|
|
}}, {key: 'string', value: function() {
|
|
return this.textDecoder.decode(this.bytes());
|
|
}}]);
|
|
function BinaryReader(a0, a1) { // fn#15092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1448:399, offset: 0x00e22cbc, size: 217 bytes, params: 3, frame: 19
|
|
const value = a1;
|
|
env1_5(this, BinaryReader);
|
|
this.varint64 = (require(1322) /* metro dependency 1322 */).varint64read;
|
|
this.uint32 = (require(1322) /* metro dependency 1322 */).varint32read;
|
|
this.buf = a0;
|
|
this.len = a0.length;
|
|
this.pos = 0;
|
|
const DataView = global.DataView;
|
|
const buffer = a0.buffer;
|
|
const byteOffset = a0.byteOffset;
|
|
const byteLength = a0.byteLength;
|
|
const value4 = Object.create(DataView.prototype, {constructor: {value: DataView}});
|
|
const dataView = new DataView(buffer, byteOffset, byteLength);
|
|
this.view = dataView instanceof Object ? dataView : value4;
|
|
this.textDecoder = value ?? new global.TextDecoder('utf-8', {'fatal': true, 'ignoreBOM': true});
|
|
}
|
|
|
|
function value_15094(a0) { // fn#15094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1448:875, offset: 0x00e22e05, size: 513 bytes, params: 2, frame: 18
|
|
var r2;
|
|
var Bit32;
|
|
var LengthDelimited;
|
|
var StartGroup;
|
|
var tag;
|
|
var value3;
|
|
var property;
|
|
var EndGroup;
|
|
var skip;
|
|
var uint32;
|
|
var pos2;
|
|
var pos3;
|
|
var pos4;
|
|
var buf;
|
|
var pos5;
|
|
var pos6;
|
|
var assertBounds;
|
|
var subarray;
|
|
var pos7;
|
|
const pos = this.pos;
|
|
let value = environment.__proto__;
|
|
const WireType = (Module01320Module).WireType;
|
|
const Varint = WireType.Varint;
|
|
if (Varint === a0) {
|
|
buf = this.buf;
|
|
pos5 = this.pos;
|
|
value = typeof pos5 === 'bigint' ? pos5 : +pos5;
|
|
this.pos = typeof value === 'bigint' ? value + 1n : +value + 1;
|
|
if (128 & buf[value]) {
|
|
reducibleLoop12: while (true) {
|
|
buf = this.buf;
|
|
pos6 = this.pos;
|
|
value = typeof pos6 === 'bigint' ? pos6 : +pos6;
|
|
this.pos = typeof value === 'bigint' ? value + 1n : +value + 1;
|
|
if (128 & buf[value]) {
|
|
continue reducibleLoop12;
|
|
}
|
|
break reducibleLoop12;
|
|
}
|
|
}
|
|
} else {
|
|
reducibleJoin13: while (true) {
|
|
reducibleJoin10: while (true) {
|
|
if (WireType.Bit64 === a0) {
|
|
pos3 = this.pos;
|
|
this.pos = pos3 + 4;
|
|
break reducibleJoin10;
|
|
}
|
|
Bit32 = WireType.Bit32;
|
|
if (Bit32 === a0) {
|
|
break reducibleJoin10;
|
|
}
|
|
LengthDelimited = WireType.LengthDelimited;
|
|
if (LengthDelimited === a0) {
|
|
uint32 = this.uint32;
|
|
value = Reflect.apply(uint32, this, []);
|
|
pos2 = this.pos;
|
|
this.pos = pos2 + value;
|
|
break reducibleJoin13;
|
|
}
|
|
StartGroup = WireType.StartGroup;
|
|
if (StartGroup !== a0) {
|
|
throw new global.Error('cant skip wire type ' + a0);
|
|
}
|
|
tag = this.tag;
|
|
value3 = Reflect.apply(tag, this, []);
|
|
property = value3[1];
|
|
EndGroup = WireType.EndGroup;
|
|
if (property !== EndGroup) {
|
|
r2 = property;
|
|
reducibleLoop7: while (true) {
|
|
skip = this.skip;
|
|
Reflect.apply(skip, this, [r2]);
|
|
tag = this.tag;
|
|
property = Reflect.apply(tag, this, [])[1];
|
|
EndGroup = WireType.EndGroup;
|
|
if (property !== EndGroup) {
|
|
r2 = property;
|
|
continue reducibleLoop7;
|
|
}
|
|
break reducibleJoin13;
|
|
}
|
|
assertBounds = this.assertBounds;
|
|
Reflect.apply(assertBounds, this, []);
|
|
buf = this.buf;
|
|
subarray = buf.subarray;
|
|
pos7 = this.pos;
|
|
return Reflect.apply(subarray, buf, [pos, pos7]);
|
|
}
|
|
break reducibleJoin13;
|
|
}
|
|
pos4 = this.pos;
|
|
this.pos = pos4 + 4;
|
|
break reducibleJoin13;
|
|
}
|
|
}
|
|
this.assertBounds();
|
|
buf = this.buf;
|
|
return buf.subarray(pos, this.pos);
|
|
}
|
|
|
|
function value_15098() { // fn#15098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1448:1635, offset: 0x00e23073, size: 65 bytes, params: 1, frame: 15
|
|
const binding = env1_3;
|
|
const PbLong = (Module01323Module).PbLong;
|
|
return binding(PbLong, env1_4(this.varint64()));
|
|
}
|
|
|
|
function value_15099() { // fn#15099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1448:1718, offset: 0x00e230b4, size: 65 bytes, params: 1, frame: 15
|
|
const binding = env1_3;
|
|
const PbULong = (Module01323Module).PbULong;
|
|
return binding(PbULong, env1_4(this.varint64()));
|
|
}
|
|
|
|
function value_15100() { // fn#15100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1448:1803, offset: 0x00e230f5, size: 130 bytes, params: 1, frame: 17
|
|
let value = this.varint64();
|
|
value = env1_2(value, 2);
|
|
const property = value[0];
|
|
const property2 = value[1];
|
|
value = -(1 & property);
|
|
const value3 = property >>> 1;
|
|
const value4 = 1 & property2;
|
|
const value5 = property2 >>> 1;
|
|
const PbLong = (Module01323Module).PbLong;
|
|
const value6 = Object.create(PbLong.prototype, {constructor: {value: PbLong}});
|
|
const value7 = (value3 | value4 << 31) ^ value;
|
|
value = value5 ^ value;
|
|
const pbLong = new PbLong(value7, value);
|
|
return pbLong instanceof Object ? pbLong : value6;
|
|
}
|
|
|
|
function value_15101() { // fn#15101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1448:1959, offset: 0x00e23177, size: 57 bytes, params: 1, frame: 13
|
|
let value = this.varint64();
|
|
value = env1_2(value, 2);
|
|
value = value[0] !== 0;
|
|
return value || value[1] !== 0;
|
|
}
|
|
|
|
function value_15104() { // fn#15104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1448:2242, offset: 0x00e2320e, size: 76 bytes, params: 1, frame: 13
|
|
let value = environment.__proto__;
|
|
const PbULong = (Module01323Module).PbULong;
|
|
value = this.sfixed32();
|
|
const value2 = this.sfixed32();
|
|
const value3 = Object.create(PbULong.prototype, {constructor: {value: PbULong}});
|
|
const pbULong = new PbULong(value, value2);
|
|
return pbULong instanceof Object ? pbULong : value3;
|
|
}
|
|
|
|
function value_15105() { // fn#15105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1448:2346, offset: 0x00e2325a, size: 76 bytes, params: 1, frame: 13
|
|
let value = environment.__proto__;
|
|
const PbLong = (Module01323Module).PbLong;
|
|
value = this.sfixed32();
|
|
const value2 = this.sfixed32();
|
|
const value3 = Object.create(PbLong.prototype, {constructor: {value: PbLong}});
|
|
const pbLong = new PbLong(value, value2);
|
|
return pbLong instanceof Object ? pbLong : value3;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun15088, 1321, [57, 164, 65, 6, 7, 1322, 1320,
|
|
1323]) /* metro module 1321, dependencies: [57, 164, 65, 6, 7, 1322, 1320, 1323] */;
|