2026-07-29 08:29:29 +00:00
|
|
|
// Module ID: 1314
|
|
|
|
|
// Function ID: 1315
|
|
|
|
|
// Name: _isNativeReflectConstruct
|
|
|
|
|
// Dependencies: [32, 93, 95, 98, 41, 42, 1313]
|
|
|
|
|
|
|
|
|
|
// Module 1314 (_isNativeReflectConstruct)
|
2026-08-24 06:08:38 +00:00
|
|
|
import closure_2 from "_slicedToArray" /* 32 */;
|
|
|
|
|
import closure_3 from "_possibleConstructorReturn" /* 93 */;
|
|
|
|
|
import closure_4 from "_getPrototypeOf" /* 95 */;
|
|
|
|
|
import _inherits from "_inherits" /* 98 */;
|
|
|
|
|
import closure_5 from "_classCallCheck" /* 41 */;
|
|
|
|
|
import _createClass from "_createClass" /* 42 */;
|
2026-07-29 08:29:29 +00:00
|
|
|
|
|
|
|
|
let PbLong = require;
|
|
|
|
|
function _isNativeReflectConstruct() {
|
|
|
|
|
try {
|
|
|
|
|
const _Boolean = Boolean;
|
|
|
|
|
const call = valueOf.call;
|
|
|
|
|
const _Reflect = Reflect;
|
|
|
|
|
const _Boolean2 = Boolean;
|
|
|
|
|
if (typeof call === "unknown") {
|
|
|
|
|
let callResult = valueOf();
|
|
|
|
|
} else {
|
|
|
|
|
callResult = call(constructResult);
|
|
|
|
|
}
|
2026-08-24 06:08:38 +00:00
|
|
|
closure_0 = !callResult;
|
|
|
|
|
_isNativeReflectConstruct = function _isNativeReflectConstruct() {
|
2026-07-29 08:29:29 +00:00
|
|
|
return closure_0;
|
2026-08-24 06:08:38 +00:00
|
|
|
};
|
2026-07-29 08:29:29 +00:00
|
|
|
return _isNativeReflectConstruct();
|
|
|
|
|
} catch (err) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const arrayBuffer = new ArrayBuffer(8);
|
|
|
|
|
const dataView = new DataView(arrayBuffer);
|
|
|
|
|
let tmp6;
|
|
|
|
|
if (undefined !== BigInt) {
|
2026-08-04 21:03:28 +00:00
|
|
|
if (typeof dataView.getBigInt64 === "function") {
|
|
|
|
|
if (typeof dataView.getBigUint64 === "function") {
|
|
|
|
|
if (typeof dataView.setBigInt64 === "function") {
|
|
|
|
|
if (typeof dataView.setBigUint64 === "function") {
|
2026-07-29 08:29:29 +00:00
|
|
|
let obj = { MIN: null, MAX: null, UMIN: null, UMAX: null, C: null, V: null };
|
|
|
|
|
const _BigInt = BigInt;
|
|
|
|
|
obj[0] = BigInt("-9223372036854775808");
|
|
|
|
|
const _BigInt2 = BigInt;
|
|
|
|
|
obj[1] = BigInt("9223372036854775807");
|
|
|
|
|
const _BigInt3 = BigInt;
|
|
|
|
|
obj[2] = BigInt("0");
|
|
|
|
|
const _BigInt4 = BigInt;
|
|
|
|
|
obj[3] = BigInt("18446744073709551615");
|
|
|
|
|
const _BigInt5 = BigInt;
|
|
|
|
|
obj[4] = BigInt;
|
|
|
|
|
obj[5] = dataView;
|
|
|
|
|
tmp6 = obj;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-08-24 06:08:38 +00:00
|
|
|
obj = tmp6;
|
2026-07-29 08:29:29 +00:00
|
|
|
const re8 = /^-?[0-9]+$/;
|
|
|
|
|
let c9 = 4294967296;
|
|
|
|
|
class SharedPbLong {
|
|
|
|
|
constructor(arg0, arg1) {
|
2026-08-24 06:08:38 +00:00
|
|
|
tmp = closure_5(this, PbLong);
|
2026-07-29 08:29:29 +00:00
|
|
|
this.lo = global | 0;
|
|
|
|
|
this.hi = require | 0;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
PbLong = SharedPbLong;
|
|
|
|
|
obj = {
|
|
|
|
|
key: "isZero",
|
|
|
|
|
value: function isZero() {
|
|
|
|
|
return 0 == this.lo && 0 == this.hi;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
const items = [
|
|
|
|
|
obj,
|
|
|
|
|
{
|
|
|
|
|
key: "toNumber",
|
|
|
|
|
value: function toNumber() {
|
|
|
|
|
const sum = this.hi * c9 + (this.lo >>> 0);
|
|
|
|
|
if (Number.isSafeInteger(sum)) {
|
|
|
|
|
return sum;
|
|
|
|
|
} else {
|
|
|
|
|
const _Error = Error;
|
2026-08-24 06:08:38 +00:00
|
|
|
error = new Error("cannot convert to safe number");
|
2026-07-29 08:29:29 +00:00
|
|
|
throw error;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
const _module1Result = _createClass(SharedPbLong, items);
|
|
|
|
|
class PbULong {
|
|
|
|
|
constructor() {
|
|
|
|
|
self = this;
|
2026-08-24 06:08:38 +00:00
|
|
|
tmp = closure_5(this, PbLong);
|
|
|
|
|
tmp2 = closure_4;
|
|
|
|
|
obj = closure_4(PbLong);
|
|
|
|
|
tmp3 = closure_3;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (_isNativeReflectConstruct()) {
|
|
|
|
|
tmp7 = globalThis;
|
|
|
|
|
_Reflect = Reflect;
|
|
|
|
|
tmp8 = arguments;
|
|
|
|
|
constructResult = Reflect.construct(obj, arguments, tmp2(self).constructor);
|
|
|
|
|
} else {
|
|
|
|
|
tmp4 = arguments;
|
|
|
|
|
tmp5 = arguments;
|
|
|
|
|
constructResult = obj(...arguments);
|
|
|
|
|
}
|
|
|
|
|
return tmp3(self, constructResult);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
PbLong = PbULong;
|
|
|
|
|
_inherits(PbULong, _module1Result);
|
|
|
|
|
obj = {
|
|
|
|
|
key: "toString",
|
|
|
|
|
value: function toString() {
|
|
|
|
|
const self = this;
|
2026-08-24 06:08:38 +00:00
|
|
|
if (obj) {
|
2026-07-29 08:29:29 +00:00
|
|
|
let str = self.toBigInt();
|
|
|
|
|
str = str.toString();
|
|
|
|
|
} else {
|
2026-08-24 06:08:38 +00:00
|
|
|
obj = PbLong(1313);
|
|
|
|
|
str = obj.int64toString(self.lo, self.hi);
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
|
|
|
|
return str;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
const items1 = [
|
|
|
|
|
obj,
|
|
|
|
|
{
|
|
|
|
|
key: "toBigInt",
|
|
|
|
|
value: function toBigInt() {
|
2026-08-24 06:08:38 +00:00
|
|
|
if (obj) {
|
2026-07-29 08:29:29 +00:00
|
|
|
const self = this;
|
|
|
|
|
const V = tmp.V;
|
|
|
|
|
V.setInt32(0, this.lo, true);
|
|
|
|
|
const V2 = tmp.V;
|
|
|
|
|
V2.setInt32(4, this.hi, true);
|
|
|
|
|
const V3 = tmp.V;
|
|
|
|
|
return V3.getBigUint64(0, true);
|
|
|
|
|
} else {
|
|
|
|
|
const _Error = Error;
|
2026-08-24 06:08:38 +00:00
|
|
|
error = new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support");
|
2026-07-29 08:29:29 +00:00
|
|
|
throw error;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
const items2 = [
|
|
|
|
|
{
|
|
|
|
|
key: "from",
|
|
|
|
|
value: function from(trimmed) {
|
|
|
|
|
const self = this;
|
2026-08-24 06:08:38 +00:00
|
|
|
if (obj) {
|
2026-07-29 08:29:29 +00:00
|
|
|
if ("string" === tmp) {
|
|
|
|
|
if ("0" == trimmed) {
|
|
|
|
|
return self.ZERO;
|
|
|
|
|
} else if ("" == trimmed) {
|
|
|
|
|
const _Error7 = Error;
|
2026-08-24 06:08:38 +00:00
|
|
|
error = new Error("string is no integer");
|
2026-07-29 08:29:29 +00:00
|
|
|
throw error;
|
|
|
|
|
} else {
|
|
|
|
|
let CResult = obj.C(trimmed);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
CResult = trimmed;
|
|
|
|
|
if ("number" !== tmp) {
|
|
|
|
|
let CResult1 = trimmed;
|
|
|
|
|
}
|
|
|
|
|
if (CResult1) {
|
|
|
|
|
if (CResult1 < obj.UMIN) {
|
|
|
|
|
const _Error6 = Error;
|
|
|
|
|
const error1 = new Error("signed value for ulong");
|
|
|
|
|
throw error1;
|
|
|
|
|
} else if (CResult1 > obj.UMAX) {
|
|
|
|
|
const _Error5 = Error;
|
|
|
|
|
const error2 = new Error("ulong too large");
|
|
|
|
|
throw error2;
|
|
|
|
|
} else {
|
|
|
|
|
const V = obj.V;
|
|
|
|
|
V.setBigUint64(0, CResult1, true);
|
|
|
|
|
({ V: V2, V: V3 } = obj);
|
|
|
|
|
const int32 = V2.getInt32(0, true);
|
|
|
|
|
const int321 = V3.getInt32(4, true);
|
|
|
|
|
const tmp42 = PbLong(int32, int321);
|
|
|
|
|
return tmp42;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
return self.ZERO;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (0 === CResult) {
|
|
|
|
|
return self.ZERO;
|
|
|
|
|
} else {
|
|
|
|
|
CResult1 = obj.C(CResult);
|
|
|
|
|
}
|
|
|
|
|
} else if ("string" === tmp) {
|
|
|
|
|
if ("0" == trimmed) {
|
|
|
|
|
return self.ZERO;
|
|
|
|
|
} else {
|
|
|
|
|
trimmed = trimmed.trim();
|
|
|
|
|
if (re8.test(trimmed)) {
|
|
|
|
|
const obj2 = PbLong(1313);
|
|
|
|
|
if (tmp24[0]) {
|
|
|
|
|
const _Error4 = Error;
|
|
|
|
|
const error3 = new Error("signed value");
|
|
|
|
|
throw error3;
|
|
|
|
|
} else {
|
|
|
|
|
const tmp28 = PbLong(tmp25, tmp26);
|
|
|
|
|
return tmp28;
|
|
|
|
|
}
|
2026-08-24 06:08:38 +00:00
|
|
|
tmp24 = callback(PbLong(1313).int64fromString(trimmed), 3);
|
2026-07-29 08:29:29 +00:00
|
|
|
} else {
|
|
|
|
|
const _Error3 = Error;
|
|
|
|
|
const error4 = new Error("string is no integer");
|
|
|
|
|
throw error4;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else if ("number" === tmp) {
|
|
|
|
|
if (0 == trimmed) {
|
|
|
|
|
return self.ZERO;
|
|
|
|
|
} else {
|
|
|
|
|
const _Number = Number;
|
|
|
|
|
if (Number.isSafeInteger(trimmed)) {
|
|
|
|
|
if (trimmed < 0) {
|
|
|
|
|
const _Error2 = Error;
|
|
|
|
|
const error5 = new Error("signed value for ulong");
|
|
|
|
|
throw error5;
|
|
|
|
|
} else {
|
|
|
|
|
const result = trimmed / c9;
|
|
|
|
|
const tmp10 = PbLong(trimmed, result);
|
|
|
|
|
return tmp10;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
const _Error = Error;
|
|
|
|
|
const error6 = new Error("number is no integer");
|
|
|
|
|
throw error6;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const error7 = new Error("unknown value " + tmp);
|
|
|
|
|
throw error7;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
const _module1Result1 = _createClass(PbULong, items1, items2);
|
|
|
|
|
_module1Result1.ZERO = new _module1Result1(0, 0);
|
|
|
|
|
class PbLong {
|
|
|
|
|
constructor() {
|
|
|
|
|
self = this;
|
2026-08-24 06:08:38 +00:00
|
|
|
tmp = closure_5(this, PbLong);
|
|
|
|
|
tmp2 = closure_4;
|
|
|
|
|
obj = closure_4(PbLong);
|
|
|
|
|
tmp3 = closure_3;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (_isNativeReflectConstruct()) {
|
|
|
|
|
tmp7 = globalThis;
|
|
|
|
|
_Reflect = Reflect;
|
|
|
|
|
tmp8 = arguments;
|
|
|
|
|
constructResult = Reflect.construct(obj, arguments, tmp2(self).constructor);
|
|
|
|
|
} else {
|
|
|
|
|
tmp4 = arguments;
|
|
|
|
|
tmp5 = arguments;
|
|
|
|
|
constructResult = obj(...arguments);
|
|
|
|
|
}
|
|
|
|
|
return tmp3(self, constructResult);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
_inherits(PbLong, _module1Result);
|
|
|
|
|
const items3 = [
|
|
|
|
|
{
|
|
|
|
|
key: "isNegative",
|
|
|
|
|
value: function isNegative() {
|
|
|
|
|
return 2147483648 & this.hi;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: "negate",
|
|
|
|
|
value: function negate() {
|
|
|
|
|
const lo = this.lo;
|
|
|
|
|
if (lo) {
|
|
|
|
|
let sum = 1 + ~lo;
|
|
|
|
|
let sum1 = tmp;
|
|
|
|
|
} else {
|
|
|
|
|
sum1 = tmp + 1;
|
|
|
|
|
sum = lo;
|
|
|
|
|
}
|
|
|
|
|
return PbLong(sum, sum1);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: "toString",
|
|
|
|
|
value: function toString() {
|
|
|
|
|
const self = this;
|
2026-08-24 06:08:38 +00:00
|
|
|
if (obj) {
|
2026-07-29 08:29:29 +00:00
|
|
|
return self.toBigInt().toString();
|
|
|
|
|
} else if (self.isNegative()) {
|
|
|
|
|
const negateResult = self.negate();
|
|
|
|
|
return "-" + PbLong(1313).int64toString(negateResult.lo, negateResult.hi);
|
|
|
|
|
} else {
|
2026-08-24 06:08:38 +00:00
|
|
|
obj = PbLong(1313);
|
|
|
|
|
return obj.int64toString(self.lo, self.hi);
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: "toBigInt",
|
|
|
|
|
value: function toBigInt() {
|
2026-08-24 06:08:38 +00:00
|
|
|
if (obj) {
|
2026-07-29 08:29:29 +00:00
|
|
|
const self = this;
|
|
|
|
|
const V = tmp.V;
|
|
|
|
|
V.setInt32(0, this.lo, true);
|
|
|
|
|
const V2 = tmp.V;
|
|
|
|
|
V2.setInt32(4, this.hi, true);
|
|
|
|
|
const V3 = tmp.V;
|
|
|
|
|
return V3.getBigInt64(0, true);
|
|
|
|
|
} else {
|
|
|
|
|
const _Error = Error;
|
2026-08-24 06:08:38 +00:00
|
|
|
error = new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support");
|
2026-07-29 08:29:29 +00:00
|
|
|
throw error;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
const items4 = [
|
|
|
|
|
{
|
|
|
|
|
key: "from",
|
|
|
|
|
value: function from(trimmed) {
|
|
|
|
|
const self = this;
|
2026-08-24 06:08:38 +00:00
|
|
|
if (obj) {
|
2026-07-29 08:29:29 +00:00
|
|
|
if ("string" === tmp) {
|
|
|
|
|
if ("0" == trimmed) {
|
|
|
|
|
return self.ZERO;
|
|
|
|
|
} else if ("" == trimmed) {
|
|
|
|
|
const _Error5 = Error;
|
2026-08-24 06:08:38 +00:00
|
|
|
error = new Error("string is no integer");
|
2026-07-29 08:29:29 +00:00
|
|
|
throw error;
|
|
|
|
|
} else {
|
|
|
|
|
let CResult = obj.C(trimmed);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
CResult = trimmed;
|
|
|
|
|
if ("number" !== tmp) {
|
|
|
|
|
let CResult1 = trimmed;
|
|
|
|
|
}
|
|
|
|
|
if (CResult1) {
|
|
|
|
|
if (CResult1 < obj.MIN) {
|
|
|
|
|
const _Error4 = Error;
|
|
|
|
|
const error1 = new Error("ulong too small");
|
|
|
|
|
throw error1;
|
|
|
|
|
} else if (CResult1 > obj.MAX) {
|
|
|
|
|
const _Error3 = Error;
|
|
|
|
|
const error2 = new Error("ulong too large");
|
|
|
|
|
throw error2;
|
|
|
|
|
} else {
|
|
|
|
|
const V = obj.V;
|
|
|
|
|
V.setBigInt64(0, CResult1, true);
|
|
|
|
|
({ V: V2, V: V3 } = obj);
|
|
|
|
|
const int32 = V2.getInt32(0, true);
|
|
|
|
|
const int321 = V3.getInt32(4, true);
|
|
|
|
|
const tmp37 = PbLong(int32, int321);
|
|
|
|
|
return tmp37;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
return self.ZERO;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (0 === CResult) {
|
|
|
|
|
return self.ZERO;
|
|
|
|
|
} else {
|
|
|
|
|
CResult1 = obj.C(CResult);
|
|
|
|
|
}
|
|
|
|
|
} else if ("string" === tmp) {
|
|
|
|
|
if ("0" == trimmed) {
|
|
|
|
|
return self.ZERO;
|
|
|
|
|
} else {
|
|
|
|
|
trimmed = trimmed.trim();
|
|
|
|
|
if (re8.test(trimmed)) {
|
|
|
|
|
const obj3 = PbLong(1313);
|
2026-08-24 06:08:38 +00:00
|
|
|
[tmp24, tmp26, tmp27] = callback(PbLong(1313).int64fromString(trimmed), 3);
|
2026-07-29 08:29:29 +00:00
|
|
|
const obj4 = PbLong(tmp26, tmp27);
|
|
|
|
|
let negateResult = obj4;
|
|
|
|
|
if (tmp24) {
|
|
|
|
|
negateResult = obj4.negate();
|
|
|
|
|
}
|
|
|
|
|
return negateResult;
|
|
|
|
|
} else {
|
|
|
|
|
const _Error2 = Error;
|
|
|
|
|
const error3 = new Error("string is no integer");
|
|
|
|
|
throw error3;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else if ("number" === tmp) {
|
|
|
|
|
if (0 == trimmed) {
|
|
|
|
|
return self.ZERO;
|
|
|
|
|
} else {
|
|
|
|
|
const _Number = Number;
|
|
|
|
|
if (Number.isSafeInteger(trimmed)) {
|
|
|
|
|
if (trimmed > 0) {
|
|
|
|
|
const result = trimmed / c9;
|
|
|
|
|
let negateResult1 = PbLong(trimmed, result);
|
|
|
|
|
} else {
|
|
|
|
|
const result1 = -trimmed / c9;
|
|
|
|
|
const obj2 = PbLong(-trimmed, result1);
|
|
|
|
|
negateResult1 = obj2.negate();
|
|
|
|
|
const tmp7 = -trimmed;
|
|
|
|
|
}
|
|
|
|
|
return negateResult1;
|
|
|
|
|
} else {
|
|
|
|
|
const _Error = Error;
|
|
|
|
|
const error4 = new Error("number is no integer");
|
|
|
|
|
throw error4;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const error5 = new Error("unknown value " + tmp);
|
|
|
|
|
throw error5;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
const _module1Result2 = _createClass(PbLong, items3, items4);
|
|
|
|
|
const obj1 = {
|
|
|
|
|
key: "from",
|
|
|
|
|
value: function from(trimmed) {
|
|
|
|
|
const self = this;
|
2026-08-24 06:08:38 +00:00
|
|
|
if (obj) {
|
2026-07-29 08:29:29 +00:00
|
|
|
if ("string" === tmp) {
|
|
|
|
|
if ("0" == trimmed) {
|
|
|
|
|
return self.ZERO;
|
|
|
|
|
} else if ("" == trimmed) {
|
|
|
|
|
const _Error7 = Error;
|
2026-08-24 06:08:38 +00:00
|
|
|
error = new Error("string is no integer");
|
2026-07-29 08:29:29 +00:00
|
|
|
throw error;
|
|
|
|
|
} else {
|
|
|
|
|
let CResult = obj.C(trimmed);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
CResult = trimmed;
|
|
|
|
|
if ("number" !== tmp) {
|
|
|
|
|
let CResult1 = trimmed;
|
|
|
|
|
}
|
|
|
|
|
if (CResult1) {
|
|
|
|
|
if (CResult1 < obj.UMIN) {
|
|
|
|
|
const _Error6 = Error;
|
|
|
|
|
const error1 = new Error("signed value for ulong");
|
|
|
|
|
throw error1;
|
|
|
|
|
} else if (CResult1 > obj.UMAX) {
|
|
|
|
|
const _Error5 = Error;
|
|
|
|
|
const error2 = new Error("ulong too large");
|
|
|
|
|
throw error2;
|
|
|
|
|
} else {
|
|
|
|
|
const V = obj.V;
|
|
|
|
|
V.setBigUint64(0, CResult1, true);
|
|
|
|
|
({ V: V2, V: V3 } = obj);
|
|
|
|
|
const int32 = V2.getInt32(0, true);
|
|
|
|
|
const int321 = V3.getInt32(4, true);
|
|
|
|
|
const tmp42 = PbLong(int32, int321);
|
|
|
|
|
return tmp42;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
return self.ZERO;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (0 === CResult) {
|
|
|
|
|
return self.ZERO;
|
|
|
|
|
} else {
|
|
|
|
|
CResult1 = obj.C(CResult);
|
|
|
|
|
}
|
|
|
|
|
} else if ("string" === tmp) {
|
|
|
|
|
if ("0" == trimmed) {
|
|
|
|
|
return self.ZERO;
|
|
|
|
|
} else {
|
|
|
|
|
trimmed = trimmed.trim();
|
|
|
|
|
if (re8.test(trimmed)) {
|
|
|
|
|
const obj2 = PbLong(1313);
|
|
|
|
|
if (tmp24[0]) {
|
|
|
|
|
const _Error4 = Error;
|
|
|
|
|
const error3 = new Error("signed value");
|
|
|
|
|
throw error3;
|
|
|
|
|
} else {
|
|
|
|
|
const tmp28 = PbLong(tmp25, tmp26);
|
|
|
|
|
return tmp28;
|
|
|
|
|
}
|
2026-08-24 06:08:38 +00:00
|
|
|
tmp24 = callback(PbLong(1313).int64fromString(trimmed), 3);
|
2026-07-29 08:29:29 +00:00
|
|
|
} else {
|
|
|
|
|
const _Error3 = Error;
|
|
|
|
|
const error4 = new Error("string is no integer");
|
|
|
|
|
throw error4;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else if ("number" === tmp) {
|
|
|
|
|
if (0 == trimmed) {
|
|
|
|
|
return self.ZERO;
|
|
|
|
|
} else {
|
|
|
|
|
const _Number = Number;
|
|
|
|
|
if (Number.isSafeInteger(trimmed)) {
|
|
|
|
|
if (trimmed < 0) {
|
|
|
|
|
const _Error2 = Error;
|
|
|
|
|
const error5 = new Error("signed value for ulong");
|
|
|
|
|
throw error5;
|
|
|
|
|
} else {
|
|
|
|
|
const result = trimmed / c9;
|
|
|
|
|
const tmp10 = PbLong(trimmed, result);
|
|
|
|
|
return tmp10;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
const _Error = Error;
|
|
|
|
|
const error6 = new Error("number is no integer");
|
|
|
|
|
throw error6;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const error7 = new Error("unknown value " + tmp);
|
|
|
|
|
throw error7;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
let obj2 = {
|
|
|
|
|
key: "isNegative",
|
|
|
|
|
value: function isNegative() {
|
|
|
|
|
return 2147483648 & this.hi;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
let obj3 = {
|
|
|
|
|
key: "from",
|
|
|
|
|
value: function from(trimmed) {
|
|
|
|
|
const self = this;
|
2026-08-24 06:08:38 +00:00
|
|
|
if (obj) {
|
2026-07-29 08:29:29 +00:00
|
|
|
if ("string" === tmp) {
|
|
|
|
|
if ("0" == trimmed) {
|
|
|
|
|
return self.ZERO;
|
|
|
|
|
} else if ("" == trimmed) {
|
|
|
|
|
const _Error5 = Error;
|
2026-08-24 06:08:38 +00:00
|
|
|
error = new Error("string is no integer");
|
2026-07-29 08:29:29 +00:00
|
|
|
throw error;
|
|
|
|
|
} else {
|
|
|
|
|
let CResult = obj.C(trimmed);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
CResult = trimmed;
|
|
|
|
|
if ("number" !== tmp) {
|
|
|
|
|
let CResult1 = trimmed;
|
|
|
|
|
}
|
|
|
|
|
if (CResult1) {
|
|
|
|
|
if (CResult1 < obj.MIN) {
|
|
|
|
|
const _Error4 = Error;
|
|
|
|
|
const error1 = new Error("ulong too small");
|
|
|
|
|
throw error1;
|
|
|
|
|
} else if (CResult1 > obj.MAX) {
|
|
|
|
|
const _Error3 = Error;
|
|
|
|
|
const error2 = new Error("ulong too large");
|
|
|
|
|
throw error2;
|
|
|
|
|
} else {
|
|
|
|
|
const V = obj.V;
|
|
|
|
|
V.setBigInt64(0, CResult1, true);
|
|
|
|
|
({ V: V2, V: V3 } = obj);
|
|
|
|
|
const int32 = V2.getInt32(0, true);
|
|
|
|
|
const int321 = V3.getInt32(4, true);
|
|
|
|
|
const tmp37 = PbLong(int32, int321);
|
|
|
|
|
return tmp37;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
return self.ZERO;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (0 === CResult) {
|
|
|
|
|
return self.ZERO;
|
|
|
|
|
} else {
|
|
|
|
|
CResult1 = obj.C(CResult);
|
|
|
|
|
}
|
|
|
|
|
} else if ("string" === tmp) {
|
|
|
|
|
if ("0" == trimmed) {
|
|
|
|
|
return self.ZERO;
|
|
|
|
|
} else {
|
|
|
|
|
trimmed = trimmed.trim();
|
|
|
|
|
if (re8.test(trimmed)) {
|
|
|
|
|
const obj3 = PbLong(1313);
|
2026-08-24 06:08:38 +00:00
|
|
|
[tmp24, tmp26, tmp27] = callback(PbLong(1313).int64fromString(trimmed), 3);
|
2026-07-29 08:29:29 +00:00
|
|
|
const obj4 = PbLong(tmp26, tmp27);
|
|
|
|
|
let negateResult = obj4;
|
|
|
|
|
if (tmp24) {
|
|
|
|
|
negateResult = obj4.negate();
|
|
|
|
|
}
|
|
|
|
|
return negateResult;
|
|
|
|
|
} else {
|
|
|
|
|
const _Error2 = Error;
|
|
|
|
|
const error3 = new Error("string is no integer");
|
|
|
|
|
throw error3;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else if ("number" === tmp) {
|
|
|
|
|
if (0 == trimmed) {
|
|
|
|
|
return self.ZERO;
|
|
|
|
|
} else {
|
|
|
|
|
const _Number = Number;
|
|
|
|
|
if (Number.isSafeInteger(trimmed)) {
|
|
|
|
|
if (trimmed > 0) {
|
|
|
|
|
const result = trimmed / c9;
|
|
|
|
|
let negateResult1 = PbLong(trimmed, result);
|
|
|
|
|
} else {
|
|
|
|
|
const result1 = -trimmed / c9;
|
|
|
|
|
const obj2 = PbLong(-trimmed, result1);
|
|
|
|
|
negateResult1 = obj2.negate();
|
|
|
|
|
const tmp7 = -trimmed;
|
|
|
|
|
}
|
|
|
|
|
return negateResult1;
|
|
|
|
|
} else {
|
|
|
|
|
const _Error = Error;
|
|
|
|
|
const error4 = new Error("number is no integer");
|
|
|
|
|
throw error4;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const error5 = new Error("unknown value " + tmp);
|
|
|
|
|
throw error5;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
const tmp2Result1 = new _module1Result1(0, 0);
|
|
|
|
|
_module1Result2.ZERO = new _module1Result2(0, 0);
|
|
|
|
|
|
|
|
|
|
export const PbULong = _module1Result1;
|
|
|
|
|
export const PbLong = _module1Result2;
|