@argent/x-shared 1.34.4 → 1.34.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/features/simulation/activity/schema.d.ts +858 -96
- package/dist/index.js +2 -2
- package/dist/index.mjs +844 -855
- package/dist/nfts/BackendNftService.d.ts +2 -4
- package/dist/nfts/INFTService.d.ts +1 -1
- package/dist/simulation.js +1 -1
- package/dist/simulation.mjs +42 -42
- package/dist/tokens/service/implementation.d.ts +3 -3
- package/dist/tokens/service/interface.d.ts +2 -2
- package/dist/tokens/service/types/defiPosition.model.d.ts +117 -0
- package/dist/tokens/service/types/index.d.ts +1 -0
- package/dist/tokens/service/types/{token.model.d.ts → webToken.model.d.ts} +27 -18
- package/dist/transactionVersion-CKz-zi84.js +1 -0
- package/dist/{transactionVersion-tQTwHiJA.mjs → transactionVersion-cwkr7wat.mjs} +544 -532
- package/package.json +2 -2
- package/dist/transactionVersion-FKKSXkzh.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z as e } from "zod";
|
|
2
|
-
import { validateChecksumAddress as Cr, validateAndParseAddress as Dr, getChecksumAddress as Pr, num as
|
|
2
|
+
import { validateChecksumAddress as Cr, validateAndParseAddress as Dr, getChecksumAddress as Pr, num as Ne, constants as xe, CairoCustomEnum as jr, uint256 as Qe, hash as St } from "starknet";
|
|
3
3
|
import { memoize as Pt, noop as kr, isString as Ur, isEmpty as Fr } from "lodash-es";
|
|
4
4
|
import "@scure/base";
|
|
5
5
|
import { jsx as xr } from "react/jsx-runtime";
|
|
@@ -8,9 +8,9 @@ import "object-hash";
|
|
|
8
8
|
import "swr";
|
|
9
9
|
function Vr(t, o) {
|
|
10
10
|
let [E, T = ""] = t.split(".");
|
|
11
|
-
const
|
|
12
|
-
return
|
|
13
|
-
value: BigInt(`${
|
|
11
|
+
const S = E.startsWith("-");
|
|
12
|
+
return S && (E = E.slice(1)), T.length > o ? Number(T[o]) >= 5 ? T = (BigInt(T.slice(0, o)) + 1n).toString().padStart(o, "0") : T = T.slice(0, o) : T = T.padEnd(o, "0"), {
|
|
13
|
+
value: BigInt(`${S ? "-" : ""}${E}${T}`),
|
|
14
14
|
decimals: o
|
|
15
15
|
};
|
|
16
16
|
}
|
|
@@ -28,33 +28,33 @@ const jt = e.string().refine((t) => {
|
|
|
28
28
|
} catch {
|
|
29
29
|
}
|
|
30
30
|
return !1;
|
|
31
|
-
}, "Invalid address (validation error)"), Ve = e.string().regex(/^0x[0-9a-fA-F]+$/, "Invalid address"), Xr = Ve.min(50, "Addresses must at least be 50 characters long").max(66, "Addresses must at most be 66 characters long"), Hr = Ve.length(66, "Address must be 66 characters long"), K = Xr.pipe(jt).transform((t) => `0x${(t.startsWith("0x") ? t.slice(2) : t).padStart(64, "0")}`),
|
|
32
|
-
const o = $e(t), E = o.slice(0, 2), T = o.slice(2, 6),
|
|
33
|
-
return `${E}${T}…${
|
|
34
|
-
},
|
|
35
|
-
const o = $e(t), E = o.slice(0, 2),
|
|
36
|
-
return `${E} ${
|
|
31
|
+
}, "Invalid address (validation error)"), Ve = e.string().regex(/^0x[0-9a-fA-F]+$/, "Invalid address"), Xr = Ve.min(50, "Addresses must at least be 50 characters long").max(66, "Addresses must at most be 66 characters long"), Hr = Ve.length(66, "Address must be 66 characters long"), K = Xr.pipe(jt).transform((t) => `0x${(t.startsWith("0x") ? t.slice(2) : t).padStart(64, "0")}`), Fa = K.or(e.literal("")).transform((t) => t === "" ? void 0 : t).optional(), H = Ve.transform((t) => `0x${t.replace(/^0x/, "").toLowerCase().padStart(64, "0")}`), qr = (t) => K.safeParse(t).success, zr = qr, $e = (t) => Pr(t), xa = (t) => {
|
|
32
|
+
const o = $e(t), E = o.slice(0, 2), T = o.slice(2, 6), S = o.slice(-4);
|
|
33
|
+
return `${E}${T}…${S}`;
|
|
34
|
+
}, Ba = (t) => {
|
|
35
|
+
const o = $e(t), E = o.slice(0, 2), S = o.slice(2).match(/.{1,4}/g) || [];
|
|
36
|
+
return `${E} ${S.join(" ")}`;
|
|
37
37
|
}, Wr = (t) => !/^0x[0-9a-f]{63,64}$/.test(t), Kr = (t, o) => {
|
|
38
38
|
try {
|
|
39
|
-
return !t || !o ? !1 :
|
|
39
|
+
return !t || !o ? !1 : Ne.hexToDecimalString(t) === Ne.hexToDecimalString(o);
|
|
40
40
|
} catch {
|
|
41
41
|
}
|
|
42
42
|
return !1;
|
|
43
43
|
}, Yr = (t) => {
|
|
44
44
|
try {
|
|
45
|
-
return
|
|
45
|
+
return Ne.toBigInt(Ve.parse(t)) === xe.ZERO;
|
|
46
46
|
} catch {
|
|
47
47
|
}
|
|
48
48
|
return !1;
|
|
49
|
-
},
|
|
49
|
+
}, Ma = (t, o) => !!(o != null && o.some((E) => Kr(E, t))), Ga = Pt((t) => {
|
|
50
50
|
const o = t.slice(0, 6), E = t.slice(-4);
|
|
51
51
|
return `${o}…${E}`;
|
|
52
|
-
}),
|
|
52
|
+
}), Va = Pt((t, o) => {
|
|
53
53
|
if (t.length < o)
|
|
54
54
|
return t;
|
|
55
|
-
const E = Math.floor((o - 1) / 2), T = t.slice(0, E),
|
|
56
|
-
return `${T}…${
|
|
57
|
-
}),
|
|
55
|
+
const E = Math.floor((o - 1) / 2), T = t.slice(0, E), S = t.slice(-E);
|
|
56
|
+
return `${T}…${S}`;
|
|
57
|
+
}), $a = e.string().regex(/^[a-zA-Z0-9.-]*$/g, "Invalid address character").max(66, "Address cannot be over 66 characters"), Zr = Hr.pipe(jt).pipe($r), Xe = e.string().regex(/^([a-zA-Z0-9-]+\.)+argent.xyz$/, "Invalid Argent name").max(253, "Argent name cannot be over 253 characters"), Jr = (t) => Xe.safeParse(t).success, Qr = (t, o) => {
|
|
58
58
|
try {
|
|
59
59
|
return o ? et(t) === et(o) : !1;
|
|
60
60
|
} catch {
|
|
@@ -69,19 +69,19 @@ const jt = e.string().refine((t) => {
|
|
|
69
69
|
}, tt = (t) => ht.parse(t).toLowerCase(), mt = e.union([
|
|
70
70
|
Xe,
|
|
71
71
|
ht
|
|
72
|
-
]),
|
|
72
|
+
]), Xa = e.union([
|
|
73
73
|
K,
|
|
74
74
|
mt
|
|
75
|
-
]),
|
|
75
|
+
]), Ha = e.union([
|
|
76
76
|
Zr,
|
|
77
77
|
mt
|
|
78
|
-
]),
|
|
78
|
+
]), qa = (t) => mt.safeParse(t).success, za = (t, o) => {
|
|
79
79
|
try {
|
|
80
80
|
return o ? Qr(t, o) || tn(t, o) : !1;
|
|
81
81
|
} catch {
|
|
82
82
|
}
|
|
83
83
|
return !1;
|
|
84
|
-
},
|
|
84
|
+
}, Wa = (t) => en(t) ? tt(t) : Jr(t) ? et(t) : $e(t), rn = e.union([e.literal("0"), e.literal("1")]), Ka = "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7", Ya = "0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d", Za = "0x1a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003", Ja = "0x036078334509b514626504edc9fb252328d1a240e4e948bef8d0c08dff45927f", Qa = "0x737ee2f87ce571a58c6c8da558ec18a07ceb64a6172d5ec46171fbc80077a48", ei = "0x6e150953b26271a740bf2b6e9bca17cc52c68d765f761295de51ceb8526ee72", ti = "0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f";
|
|
85
85
|
function nn(t) {
|
|
86
86
|
var o = [];
|
|
87
87
|
if (t.length === 0)
|
|
@@ -94,10 +94,10 @@ function nn(t) {
|
|
|
94
94
|
}
|
|
95
95
|
t[0].match(/^file:\/\/\//) ? t[0] = t[0].replace(/^([^/:]+):\/*/, "$1:///") : t[0] = t[0].replace(/^([^/:]+):\/*/, "$1://");
|
|
96
96
|
for (var T = 0; T < t.length; T++) {
|
|
97
|
-
var
|
|
98
|
-
if (typeof
|
|
99
|
-
throw new TypeError("Url must be a string. Received " +
|
|
100
|
-
|
|
97
|
+
var S = t[T];
|
|
98
|
+
if (typeof S != "string")
|
|
99
|
+
throw new TypeError("Url must be a string. Received " + S);
|
|
100
|
+
S !== "" && (T > 0 && (S = S.replace(/^[\/]+/, "")), T < t.length - 1 ? S = S.replace(/[\/]+$/, "") : S = S.replace(/[\/]+$/, "/"), o.push(S));
|
|
101
101
|
}
|
|
102
102
|
var D = o.join("/");
|
|
103
103
|
D = D.replace(/\/(\?|&|#[^!])/g, "$1");
|
|
@@ -109,9 +109,9 @@ function an() {
|
|
|
109
109
|
return typeof arguments[0] == "object" ? t = arguments[0] : t = [].slice.call(arguments), nn(t);
|
|
110
110
|
}
|
|
111
111
|
class we extends Error {
|
|
112
|
-
constructor({ code: o, message: E, options: T = {} },
|
|
112
|
+
constructor({ code: o, message: E, options: T = {} }, S) {
|
|
113
113
|
const { error: D, context: w } = T;
|
|
114
|
-
super(E, { cause: D }), this.errorMessages =
|
|
114
|
+
super(E, { cause: D }), this.errorMessages = S, this.name = "BaseError", this.context = w, this.code = o, this.setMessageByCode(o, E);
|
|
115
115
|
}
|
|
116
116
|
setMessageByCode(o, E) {
|
|
117
117
|
!o || !this.errorMessages || E || (this.message = this.errorMessages[o]);
|
|
@@ -134,11 +134,11 @@ class dt extends Error {
|
|
|
134
134
|
super(o), this.status = E, this.data = T, Object.setPrototypeOf(this, dt.prototype);
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
var
|
|
137
|
+
var bt;
|
|
138
138
|
(function(t) {
|
|
139
139
|
t.FAILED_TO_FETCH_URL = "Failed to fetch url", t.FAILED_TO_POST_URL = "Failed to post url";
|
|
140
|
-
})(
|
|
141
|
-
const
|
|
140
|
+
})(bt || (bt = {}));
|
|
141
|
+
const ri = e.object({
|
|
142
142
|
walletAddress: H,
|
|
143
143
|
ens: Xe,
|
|
144
144
|
chain: e.enum(["ethereum", "starknet"]),
|
|
@@ -147,11 +147,11 @@ const ti = e.object({
|
|
|
147
147
|
}).or(e.object({
|
|
148
148
|
status: e.string()
|
|
149
149
|
}));
|
|
150
|
-
async function
|
|
151
|
-
const
|
|
150
|
+
async function ni(t, o, E, T = "starknet") {
|
|
151
|
+
const S = {
|
|
152
152
|
ens: t,
|
|
153
153
|
chain: T
|
|
154
|
-
}, D = new URLSearchParams(
|
|
154
|
+
}, D = new URLSearchParams(S), w = an(E, "wallet", `?${D}`);
|
|
155
155
|
try {
|
|
156
156
|
const k = await o.get(w), L = k && "walletAddress" in k ? k.walletAddress : void 0;
|
|
157
157
|
if (!L)
|
|
@@ -163,7 +163,7 @@ async function ri(t, o, E, T = "starknet") {
|
|
|
163
163
|
code: "ARGENT_NAME_NOT_FOUND",
|
|
164
164
|
message: `${t} not found`
|
|
165
165
|
});
|
|
166
|
-
if (!
|
|
166
|
+
if (!zr(L))
|
|
167
167
|
throw new ke({
|
|
168
168
|
code: "ARGENT_NAME_INVALID_ADDRESS",
|
|
169
169
|
message: `${t} resolved to an invalid address (${L})`
|
|
@@ -180,7 +180,7 @@ var nt;
|
|
|
180
180
|
(function(t) {
|
|
181
181
|
t.NOT_VALID = "Invalid call";
|
|
182
182
|
})(nt || (nt = {}));
|
|
183
|
-
class
|
|
183
|
+
class ai extends we {
|
|
184
184
|
constructor(o) {
|
|
185
185
|
super(o, nt), this.name = "CallError";
|
|
186
186
|
}
|
|
@@ -189,7 +189,7 @@ var at;
|
|
|
189
189
|
(function(t) {
|
|
190
190
|
t.NO_NETWORK_OR_MULTICALL = "Missing networkId or multicall", t.NOT_FOUND = "Network not found";
|
|
191
191
|
})(at || (at = {}));
|
|
192
|
-
class
|
|
192
|
+
class ii extends we {
|
|
193
193
|
constructor(o) {
|
|
194
194
|
super(o, at), this.name = "NetworkError";
|
|
195
195
|
}
|
|
@@ -208,18 +208,18 @@ const De = e.union([e.string(), e.number(), e.bigint()]), sn = e.object({
|
|
|
208
208
|
contractAddress: e.string(),
|
|
209
209
|
calldata: un,
|
|
210
210
|
entrypoint: e.string().optional()
|
|
211
|
-
})),
|
|
211
|
+
})), Nt = e.lazy(() => fn.and(e.object({
|
|
212
212
|
entrypoint: e.string()
|
|
213
|
-
}))), he = e.string().refine((t) => typeof parseInt(t) == "number"),
|
|
213
|
+
}))), he = e.string().refine((t) => typeof parseInt(t) == "number"), si = e.tuple([he]), oi = e.tuple([he]), ci = e.object({
|
|
214
214
|
new_threshold: e.string().refine((t) => typeof parseInt(t) == "number"),
|
|
215
215
|
signers_to_add: e.array(he)
|
|
216
|
-
}),
|
|
216
|
+
}), li = e.object({
|
|
217
217
|
new_threshold: e.string().refine((t) => typeof parseInt(t) == "number"),
|
|
218
218
|
signers_to_remove: e.array(he)
|
|
219
|
-
}),
|
|
219
|
+
}), ui = e.object({
|
|
220
220
|
signer_to_remove: he,
|
|
221
221
|
signer_to_add: he
|
|
222
|
-
}),
|
|
222
|
+
}), fi = e.tuple([he]), pi = e.tuple([he]), hi = e.tuple([he]), mi = e.tuple([he]).rest(he), di = e.object({
|
|
223
223
|
recipient: K,
|
|
224
224
|
amount: e.object({
|
|
225
225
|
low: De,
|
|
@@ -228,14 +228,14 @@ const De = e.union([e.string(), e.number(), e.bigint()]), sn = e.object({
|
|
|
228
228
|
}), pn = e.string().regex(/^(0x)?[0-9a-fA-F]+$/, "Invalid hex string"), Me = pn.transform((t) => {
|
|
229
229
|
const o = t.startsWith("0x") ? t.slice(2) : t;
|
|
230
230
|
return `0x${o.length % 2 === 0 ? o : `0${o}`}`;
|
|
231
|
-
}),
|
|
231
|
+
}), gi = e.object({
|
|
232
232
|
cairoVersion: rn,
|
|
233
233
|
accountClassHash: Me
|
|
234
|
-
}), hn = e.array(e.string()),
|
|
234
|
+
}), hn = e.array(e.string()), Ei = e.object({
|
|
235
235
|
implementation: e.string(),
|
|
236
236
|
selector: Me,
|
|
237
237
|
calldata: hn
|
|
238
|
-
}),
|
|
238
|
+
}), Ii = e.object({
|
|
239
239
|
owner: e.string(),
|
|
240
240
|
guardian: e.string().optional().transform((t) => t ?? "0")
|
|
241
241
|
});
|
|
@@ -243,7 +243,7 @@ var Tt;
|
|
|
243
243
|
(function(t) {
|
|
244
244
|
t.Starknet = "Starknet", t.Secp256k1 = "Secp256k1", t.Secp256r1 = "Secp256r1", t.Eip191 = "Eip191", t.Webauthn = "Webauthn";
|
|
245
245
|
})(Tt || (Tt = {}));
|
|
246
|
-
function
|
|
246
|
+
function Ai(t, o) {
|
|
247
247
|
const E = {
|
|
248
248
|
Starknet: void 0,
|
|
249
249
|
Secp256k1: void 0,
|
|
@@ -257,7 +257,7 @@ var it;
|
|
|
257
257
|
(function(t) {
|
|
258
258
|
t.NOT_FOUND = "Account not found", t.CALCULATED_ADDRESS_NO_MATCH = "Calculated address does not match account address";
|
|
259
259
|
})(it || (it = {}));
|
|
260
|
-
class
|
|
260
|
+
class Si extends we {
|
|
261
261
|
constructor(o) {
|
|
262
262
|
super(o, it), this.name = "AccountError";
|
|
263
263
|
}
|
|
@@ -274,7 +274,7 @@ var st = { exports: {} };
|
|
|
274
274
|
r.unshift("SEMVER"), console.log.apply(console, r);
|
|
275
275
|
} : E = function() {
|
|
276
276
|
}, o.SEMVER_SPEC_VERSION = "2.0.0";
|
|
277
|
-
var T = 256,
|
|
277
|
+
var T = 256, S = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
|
278
278
|
9007199254740991, D = 16, w = T - 6, k = o.re = [], L = o.safeRe = [], A = o.src = [], d = o.tokens = {}, Y = 0;
|
|
279
279
|
function P(r) {
|
|
280
280
|
d[r] = Y++;
|
|
@@ -286,8 +286,8 @@ var st = { exports: {} };
|
|
|
286
286
|
];
|
|
287
287
|
function Ie(r) {
|
|
288
288
|
for (var s = 0; s < ee.length; s++) {
|
|
289
|
-
var l = ee[s][0],
|
|
290
|
-
r = r.split(l + "*").join(l + "{0," +
|
|
289
|
+
var l = ee[s][0], b = ee[s][1];
|
|
290
|
+
r = r.split(l + "*").join(l + "{0," + b + "}").split(l + "+").join(l + "{1," + b + "}");
|
|
291
291
|
}
|
|
292
292
|
return r;
|
|
293
293
|
}
|
|
@@ -347,19 +347,19 @@ var st = { exports: {} };
|
|
|
347
347
|
var l = r.trim().match(s.loose ? L[d.LOOSE] : L[d.FULL]);
|
|
348
348
|
if (!l)
|
|
349
349
|
throw new TypeError("Invalid Version: " + r);
|
|
350
|
-
if (this.raw = r, this.major = +l[1], this.minor = +l[2], this.patch = +l[3], this.major >
|
|
350
|
+
if (this.raw = r, this.major = +l[1], this.minor = +l[2], this.patch = +l[3], this.major > S || this.major < 0)
|
|
351
351
|
throw new TypeError("Invalid major version");
|
|
352
|
-
if (this.minor >
|
|
352
|
+
if (this.minor > S || this.minor < 0)
|
|
353
353
|
throw new TypeError("Invalid minor version");
|
|
354
|
-
if (this.patch >
|
|
354
|
+
if (this.patch > S || this.patch < 0)
|
|
355
355
|
throw new TypeError("Invalid patch version");
|
|
356
|
-
l[4] ? this.prerelease = l[4].split(".").map(function(
|
|
357
|
-
if (/^[0-9]+$/.test(
|
|
358
|
-
var y = +
|
|
359
|
-
if (y >= 0 && y <
|
|
356
|
+
l[4] ? this.prerelease = l[4].split(".").map(function(b) {
|
|
357
|
+
if (/^[0-9]+$/.test(b)) {
|
|
358
|
+
var y = +b;
|
|
359
|
+
if (y >= 0 && y < S)
|
|
360
360
|
return y;
|
|
361
361
|
}
|
|
362
|
-
return
|
|
362
|
+
return b;
|
|
363
363
|
}) : this.prerelease = [], this.build = l[5] ? l[5].split(".") : [], this.format();
|
|
364
364
|
}
|
|
365
365
|
j.prototype.format = function() {
|
|
@@ -379,31 +379,31 @@ var st = { exports: {} };
|
|
|
379
379
|
return 0;
|
|
380
380
|
var s = 0;
|
|
381
381
|
do {
|
|
382
|
-
var l = this.prerelease[s],
|
|
383
|
-
if (E("prerelease compare", s, l,
|
|
382
|
+
var l = this.prerelease[s], b = r.prerelease[s];
|
|
383
|
+
if (E("prerelease compare", s, l, b), l === void 0 && b === void 0)
|
|
384
384
|
return 0;
|
|
385
|
-
if (
|
|
385
|
+
if (b === void 0)
|
|
386
386
|
return 1;
|
|
387
387
|
if (l === void 0)
|
|
388
388
|
return -1;
|
|
389
|
-
if (l ===
|
|
389
|
+
if (l === b)
|
|
390
390
|
continue;
|
|
391
|
-
return h(l,
|
|
391
|
+
return h(l, b);
|
|
392
392
|
} while (++s);
|
|
393
393
|
}, j.prototype.compareBuild = function(r) {
|
|
394
394
|
r instanceof j || (r = new j(r, this.options));
|
|
395
395
|
var s = 0;
|
|
396
396
|
do {
|
|
397
|
-
var l = this.build[s],
|
|
398
|
-
if (E("prerelease compare", s, l,
|
|
397
|
+
var l = this.build[s], b = r.build[s];
|
|
398
|
+
if (E("prerelease compare", s, l, b), l === void 0 && b === void 0)
|
|
399
399
|
return 0;
|
|
400
|
-
if (
|
|
400
|
+
if (b === void 0)
|
|
401
401
|
return 1;
|
|
402
402
|
if (l === void 0)
|
|
403
403
|
return -1;
|
|
404
|
-
if (l ===
|
|
404
|
+
if (l === b)
|
|
405
405
|
continue;
|
|
406
|
-
return h(l,
|
|
406
|
+
return h(l, b);
|
|
407
407
|
} while (++s);
|
|
408
408
|
}, j.prototype.inc = function(r, s) {
|
|
409
409
|
switch (r) {
|
|
@@ -443,33 +443,33 @@ var st = { exports: {} };
|
|
|
443
443
|
}
|
|
444
444
|
return this.format(), this.raw = this.version, this;
|
|
445
445
|
}, o.inc = n;
|
|
446
|
-
function n(r, s, l,
|
|
447
|
-
typeof l == "string" && (
|
|
446
|
+
function n(r, s, l, b) {
|
|
447
|
+
typeof l == "string" && (b = l, l = void 0);
|
|
448
448
|
try {
|
|
449
|
-
return new j(r, l).inc(s,
|
|
449
|
+
return new j(r, l).inc(s, b).version;
|
|
450
450
|
} catch {
|
|
451
451
|
return null;
|
|
452
452
|
}
|
|
453
453
|
}
|
|
454
454
|
o.diff = a;
|
|
455
455
|
function a(r, s) {
|
|
456
|
-
if (
|
|
456
|
+
if (q(r, s))
|
|
457
457
|
return null;
|
|
458
|
-
var l = me(r),
|
|
459
|
-
if (l.prerelease.length ||
|
|
458
|
+
var l = me(r), b = me(s), y = "";
|
|
459
|
+
if (l.prerelease.length || b.prerelease.length) {
|
|
460
460
|
y = "pre";
|
|
461
461
|
var v = "prerelease";
|
|
462
462
|
}
|
|
463
463
|
for (var O in l)
|
|
464
|
-
if ((O === "major" || O === "minor" || O === "patch") && l[O] !==
|
|
464
|
+
if ((O === "major" || O === "minor" || O === "patch") && l[O] !== b[O])
|
|
465
465
|
return y + O;
|
|
466
466
|
return v;
|
|
467
467
|
}
|
|
468
468
|
o.compareIdentifiers = h;
|
|
469
469
|
var i = /^[0-9]+$/;
|
|
470
470
|
function h(r, s) {
|
|
471
|
-
var l = i.test(r),
|
|
472
|
-
return l &&
|
|
471
|
+
var l = i.test(r), b = i.test(s);
|
|
472
|
+
return l && b && (r = +r, s = +s), r === s ? 0 : l && !b ? -1 : b && !l ? 1 : r < s ? -1 : 1;
|
|
473
473
|
}
|
|
474
474
|
o.rcompareIdentifiers = u;
|
|
475
475
|
function u(r, s) {
|
|
@@ -497,23 +497,23 @@ var st = { exports: {} };
|
|
|
497
497
|
}
|
|
498
498
|
o.compareBuild = m;
|
|
499
499
|
function m(r, s, l) {
|
|
500
|
-
var
|
|
501
|
-
return
|
|
500
|
+
var b = new j(r, l), y = new j(s, l);
|
|
501
|
+
return b.compare(y) || b.compareBuild(y);
|
|
502
502
|
}
|
|
503
|
-
o.rcompare =
|
|
504
|
-
function
|
|
503
|
+
o.rcompare = N;
|
|
504
|
+
function N(r, s, l) {
|
|
505
505
|
return f(s, r, l);
|
|
506
506
|
}
|
|
507
507
|
o.sort = _;
|
|
508
508
|
function _(r, s) {
|
|
509
|
-
return r.sort(function(l,
|
|
510
|
-
return o.compareBuild(l,
|
|
509
|
+
return r.sort(function(l, b) {
|
|
510
|
+
return o.compareBuild(l, b, s);
|
|
511
511
|
});
|
|
512
512
|
}
|
|
513
513
|
o.rsort = C;
|
|
514
514
|
function C(r, s) {
|
|
515
|
-
return r.sort(function(l,
|
|
516
|
-
return o.compareBuild(
|
|
515
|
+
return r.sort(function(l, b) {
|
|
516
|
+
return o.compareBuild(b, l, s);
|
|
517
517
|
});
|
|
518
518
|
}
|
|
519
519
|
o.gt = x;
|
|
@@ -524,8 +524,8 @@ var st = { exports: {} };
|
|
|
524
524
|
function X(r, s, l) {
|
|
525
525
|
return f(r, s, l) < 0;
|
|
526
526
|
}
|
|
527
|
-
o.eq =
|
|
528
|
-
function
|
|
527
|
+
o.eq = q;
|
|
528
|
+
function q(r, s, l) {
|
|
529
529
|
return f(r, s, l) === 0;
|
|
530
530
|
}
|
|
531
531
|
o.neq = M;
|
|
@@ -540,8 +540,8 @@ var st = { exports: {} };
|
|
|
540
540
|
function W(r, s, l) {
|
|
541
541
|
return f(r, s, l) <= 0;
|
|
542
542
|
}
|
|
543
|
-
o.cmp =
|
|
544
|
-
function
|
|
543
|
+
o.cmp = Se;
|
|
544
|
+
function Se(r, s, l, b) {
|
|
545
545
|
switch (s) {
|
|
546
546
|
case "===":
|
|
547
547
|
return typeof r == "object" && (r = r.version), typeof l == "object" && (l = l.version), r === l;
|
|
@@ -550,17 +550,17 @@ var st = { exports: {} };
|
|
|
550
550
|
case "":
|
|
551
551
|
case "=":
|
|
552
552
|
case "==":
|
|
553
|
-
return
|
|
553
|
+
return q(r, l, b);
|
|
554
554
|
case "!=":
|
|
555
|
-
return M(r, l,
|
|
555
|
+
return M(r, l, b);
|
|
556
556
|
case ">":
|
|
557
|
-
return x(r, l,
|
|
557
|
+
return x(r, l, b);
|
|
558
558
|
case ">=":
|
|
559
|
-
return $(r, l,
|
|
559
|
+
return $(r, l, b);
|
|
560
560
|
case "<":
|
|
561
|
-
return X(r, l,
|
|
561
|
+
return X(r, l, b);
|
|
562
562
|
case "<=":
|
|
563
|
-
return W(r, l,
|
|
563
|
+
return W(r, l, b);
|
|
564
564
|
default:
|
|
565
565
|
throw new TypeError("Invalid operator: " + s);
|
|
566
566
|
}
|
|
@@ -596,7 +596,7 @@ var st = { exports: {} };
|
|
|
596
596
|
} catch {
|
|
597
597
|
return !1;
|
|
598
598
|
}
|
|
599
|
-
return
|
|
599
|
+
return Se(r, this.operator, this.semver, this.options);
|
|
600
600
|
}, Q.prototype.intersects = function(r, s) {
|
|
601
601
|
if (!(r instanceof Q))
|
|
602
602
|
throw new TypeError("a Comparator is required");
|
|
@@ -609,8 +609,8 @@ var st = { exports: {} };
|
|
|
609
609
|
return this.value === "" ? !0 : (l = new G(r.value, s), je(this.value, l, s));
|
|
610
610
|
if (r.operator === "")
|
|
611
611
|
return r.value === "" ? !0 : (l = new G(this.value, s), je(r.semver, l, s));
|
|
612
|
-
var
|
|
613
|
-
return
|
|
612
|
+
var b = (this.operator === ">=" || this.operator === ">") && (r.operator === ">=" || r.operator === ">"), y = (this.operator === "<=" || this.operator === "<") && (r.operator === "<=" || r.operator === "<"), v = this.semver.version === r.semver.version, O = (this.operator === ">=" || this.operator === "<=") && (r.operator === ">=" || r.operator === "<="), V = Se(this.semver, "<", r.semver, s) && (this.operator === ">=" || this.operator === ">") && (r.operator === "<=" || r.operator === "<"), F = Se(this.semver, ">", r.semver, s) && (this.operator === "<=" || this.operator === "<") && (r.operator === ">=" || r.operator === ">");
|
|
613
|
+
return b || y || v && O || V || F;
|
|
614
614
|
}, o.Range = G;
|
|
615
615
|
function G(r, s) {
|
|
616
616
|
if ((!s || typeof s != "object") && (s = {
|
|
@@ -638,12 +638,12 @@ var st = { exports: {} };
|
|
|
638
638
|
return this.range;
|
|
639
639
|
}, G.prototype.parseRange = function(r) {
|
|
640
640
|
var s = this.options.loose, l = s ? L[d.HYPHENRANGELOOSE] : L[d.HYPHENRANGE];
|
|
641
|
-
r = r.replace(l,
|
|
642
|
-
var
|
|
641
|
+
r = r.replace(l, Sr), E("hyphen replace", r), r = r.replace(L[d.COMPARATORTRIM], R), E("comparator trim", r, L[d.COMPARATORTRIM]), r = r.replace(L[d.TILDETRIM], Ae), r = r.replace(L[d.CARETTRIM], _e), r = r.split(/\s+/).join(" ");
|
|
642
|
+
var b = s ? L[d.COMPARATORLOOSE] : L[d.COMPARATOR], y = r.split(" ").map(function(v) {
|
|
643
643
|
return J(v, this.options);
|
|
644
644
|
}, this).join(" ").split(/\s+/);
|
|
645
645
|
return this.options.loose && (y = y.filter(function(v) {
|
|
646
|
-
return !!v.match(
|
|
646
|
+
return !!v.match(b);
|
|
647
647
|
})), y = y.map(function(v) {
|
|
648
648
|
return new Q(v, this.options);
|
|
649
649
|
}, this), y;
|
|
@@ -651,9 +651,9 @@ var st = { exports: {} };
|
|
|
651
651
|
if (!(r instanceof G))
|
|
652
652
|
throw new TypeError("a Range is required");
|
|
653
653
|
return this.set.some(function(l) {
|
|
654
|
-
return Te(l, s) && r.set.some(function(
|
|
655
|
-
return Te(
|
|
656
|
-
return
|
|
654
|
+
return Te(l, s) && r.set.some(function(b) {
|
|
655
|
+
return Te(b, s) && l.every(function(y) {
|
|
656
|
+
return b.every(function(v) {
|
|
657
657
|
return y.intersects(v, s);
|
|
658
658
|
});
|
|
659
659
|
});
|
|
@@ -661,17 +661,17 @@ var st = { exports: {} };
|
|
|
661
661
|
});
|
|
662
662
|
};
|
|
663
663
|
function Te(r, s) {
|
|
664
|
-
for (var l = !0,
|
|
665
|
-
l =
|
|
664
|
+
for (var l = !0, b = r.slice(), y = b.pop(); l && b.length; )
|
|
665
|
+
l = b.every(function(v) {
|
|
666
666
|
return y.intersects(v, s);
|
|
667
|
-
}), y =
|
|
667
|
+
}), y = b.pop();
|
|
668
668
|
return l;
|
|
669
669
|
}
|
|
670
670
|
o.toComparators = re;
|
|
671
671
|
function re(r, s) {
|
|
672
672
|
return new G(r, s).set.map(function(l) {
|
|
673
|
-
return l.map(function(
|
|
674
|
-
return
|
|
673
|
+
return l.map(function(b) {
|
|
674
|
+
return b.value;
|
|
675
675
|
}).join(" ").trim().split(" ");
|
|
676
676
|
});
|
|
677
677
|
}
|
|
@@ -688,8 +688,8 @@ var st = { exports: {} };
|
|
|
688
688
|
}
|
|
689
689
|
function mr(r, s) {
|
|
690
690
|
var l = s.loose ? L[d.TILDELOOSE] : L[d.TILDE];
|
|
691
|
-
return r.replace(l, function(
|
|
692
|
-
E("tilde", r,
|
|
691
|
+
return r.replace(l, function(b, y, v, O, V) {
|
|
692
|
+
E("tilde", r, b, y, v, O, V);
|
|
693
693
|
var F;
|
|
694
694
|
return B(y) ? F = "" : B(v) ? F = ">=" + y + ".0.0 <" + (+y + 1) + ".0.0" : B(O) ? F = ">=" + y + "." + v + ".0 <" + y + "." + (+v + 1) + ".0" : V ? (E("replaceTilde pr", V), F = ">=" + y + "." + v + "." + O + "-" + V + " <" + y + "." + (+v + 1) + ".0") : F = ">=" + y + "." + v + "." + O + " <" + y + "." + (+v + 1) + ".0", E("tilde return", F), F;
|
|
695
695
|
});
|
|
@@ -702,8 +702,8 @@ var st = { exports: {} };
|
|
|
702
702
|
function gr(r, s) {
|
|
703
703
|
E("caret", r, s);
|
|
704
704
|
var l = s.loose ? L[d.CARETLOOSE] : L[d.CARET];
|
|
705
|
-
return r.replace(l, function(
|
|
706
|
-
E("caret", r,
|
|
705
|
+
return r.replace(l, function(b, y, v, O, V) {
|
|
706
|
+
E("caret", r, b, y, v, O, V);
|
|
707
707
|
var F;
|
|
708
708
|
return B(y) ? F = "" : B(v) ? F = ">=" + y + ".0.0 <" + (+y + 1) + ".0.0" : B(O) ? y === "0" ? F = ">=" + y + "." + v + ".0 <" + y + "." + (+v + 1) + ".0" : F = ">=" + y + "." + v + ".0 <" + (+y + 1) + ".0.0" : V ? (E("replaceCaret pr", V), y === "0" ? v === "0" ? F = ">=" + y + "." + v + "." + O + "-" + V + " <" + y + "." + v + "." + (+O + 1) : F = ">=" + y + "." + v + "." + O + "-" + V + " <" + y + "." + (+v + 1) + ".0" : F = ">=" + y + "." + v + "." + O + "-" + V + " <" + (+y + 1) + ".0.0") : (E("no pr"), y === "0" ? v === "0" ? F = ">=" + y + "." + v + "." + O + " <" + y + "." + v + "." + (+O + 1) : F = ">=" + y + "." + v + "." + O + " <" + y + "." + (+v + 1) + ".0" : F = ">=" + y + "." + v + "." + O + " <" + (+y + 1) + ".0.0"), E("caret return", F), F;
|
|
709
709
|
});
|
|
@@ -716,17 +716,17 @@ var st = { exports: {} };
|
|
|
716
716
|
function Ir(r, s) {
|
|
717
717
|
r = r.trim();
|
|
718
718
|
var l = s.loose ? L[d.XRANGELOOSE] : L[d.XRANGE];
|
|
719
|
-
return r.replace(l, function(
|
|
720
|
-
E("xRange", r,
|
|
719
|
+
return r.replace(l, function(b, y, v, O, V, F) {
|
|
720
|
+
E("xRange", r, b, y, v, O, V, F);
|
|
721
721
|
var ge = B(v), Ee = ge || B(O), se = Ee || B(V), ie = se;
|
|
722
|
-
return y === "=" && ie && (y = ""), F = s.includePrerelease ? "-0" : "", ge ? y === ">" || y === "<" ?
|
|
722
|
+
return y === "=" && ie && (y = ""), F = s.includePrerelease ? "-0" : "", ge ? y === ">" || y === "<" ? b = "<0.0.0-0" : b = "*" : y && ie ? (Ee && (O = 0), V = 0, y === ">" ? (y = ">=", Ee ? (v = +v + 1, O = 0, V = 0) : (O = +O + 1, V = 0)) : y === "<=" && (y = "<", Ee ? v = +v + 1 : O = +O + 1), b = y + v + "." + O + "." + V + F) : Ee ? b = ">=" + v + ".0.0" + F + " <" + (+v + 1) + ".0.0" + F : se && (b = ">=" + v + "." + O + ".0" + F + " <" + v + "." + (+O + 1) + ".0" + F), E("xRange return", b), b;
|
|
723
723
|
});
|
|
724
724
|
}
|
|
725
725
|
function Ar(r, s) {
|
|
726
726
|
return E("replaceStars", r, s), r.trim().replace(L[d.STAR], "");
|
|
727
727
|
}
|
|
728
|
-
function
|
|
729
|
-
return B(l) ? s = "" : B(
|
|
728
|
+
function Sr(r, s, l, b, y, v, O, V, F, ge, Ee, se, ie) {
|
|
729
|
+
return B(l) ? s = "" : B(b) ? s = ">=" + l + ".0.0" : B(y) ? s = ">=" + l + "." + b + ".0" : s = ">=" + s, B(F) ? V = "" : B(ge) ? V = "<" + (+F + 1) + ".0.0" : B(Ee) ? V = "<" + F + "." + (+ge + 1) + ".0" : se ? V = "<=" + F + "." + ge + "." + Ee + "-" + se : V = "<=" + V, (s + " " + V).trim();
|
|
730
730
|
}
|
|
731
731
|
G.prototype.test = function(r) {
|
|
732
732
|
if (!r)
|
|
@@ -738,18 +738,18 @@ var st = { exports: {} };
|
|
|
738
738
|
return !1;
|
|
739
739
|
}
|
|
740
740
|
for (var s = 0; s < this.set.length; s++)
|
|
741
|
-
if (
|
|
741
|
+
if (br(this.set[s], r, this.options))
|
|
742
742
|
return !0;
|
|
743
743
|
return !1;
|
|
744
744
|
};
|
|
745
|
-
function
|
|
746
|
-
for (var
|
|
747
|
-
if (!r[
|
|
745
|
+
function br(r, s, l) {
|
|
746
|
+
for (var b = 0; b < r.length; b++)
|
|
747
|
+
if (!r[b].test(s))
|
|
748
748
|
return !1;
|
|
749
749
|
if (s.prerelease.length && !l.includePrerelease) {
|
|
750
|
-
for (
|
|
751
|
-
if (E(r[
|
|
752
|
-
var y = r[
|
|
750
|
+
for (b = 0; b < r.length; b++)
|
|
751
|
+
if (E(r[b].semver), r[b].semver !== de && r[b].semver.prerelease.length > 0) {
|
|
752
|
+
var y = r[b].semver;
|
|
753
753
|
if (y.major === s.major && y.minor === s.minor && y.patch === s.patch)
|
|
754
754
|
return !0;
|
|
755
755
|
}
|
|
@@ -766,29 +766,29 @@ var st = { exports: {} };
|
|
|
766
766
|
}
|
|
767
767
|
return s.test(r);
|
|
768
768
|
}
|
|
769
|
-
o.maxSatisfying =
|
|
770
|
-
function
|
|
771
|
-
var
|
|
769
|
+
o.maxSatisfying = Nr;
|
|
770
|
+
function Nr(r, s, l) {
|
|
771
|
+
var b = null, y = null;
|
|
772
772
|
try {
|
|
773
773
|
var v = new G(s, l);
|
|
774
774
|
} catch {
|
|
775
775
|
return null;
|
|
776
776
|
}
|
|
777
777
|
return r.forEach(function(O) {
|
|
778
|
-
v.test(O) && (!
|
|
779
|
-
}),
|
|
778
|
+
v.test(O) && (!b || y.compare(O) === -1) && (b = O, y = new j(b, l));
|
|
779
|
+
}), b;
|
|
780
780
|
}
|
|
781
781
|
o.minSatisfying = Tr;
|
|
782
782
|
function Tr(r, s, l) {
|
|
783
|
-
var
|
|
783
|
+
var b = null, y = null;
|
|
784
784
|
try {
|
|
785
785
|
var v = new G(s, l);
|
|
786
786
|
} catch {
|
|
787
787
|
return null;
|
|
788
788
|
}
|
|
789
789
|
return r.forEach(function(O) {
|
|
790
|
-
v.test(O) && (!
|
|
791
|
-
}),
|
|
790
|
+
v.test(O) && (!b || y.compare(O) === 1) && (b = O, y = new j(b, l));
|
|
791
|
+
}), b;
|
|
792
792
|
}
|
|
793
793
|
o.minVersion = yr;
|
|
794
794
|
function yr(r, s) {
|
|
@@ -797,8 +797,8 @@ var st = { exports: {} };
|
|
|
797
797
|
if (r.test(l) || (l = new j("0.0.0-0"), r.test(l)))
|
|
798
798
|
return l;
|
|
799
799
|
l = null;
|
|
800
|
-
for (var
|
|
801
|
-
var y = r.set[
|
|
800
|
+
for (var b = 0; b < r.set.length; ++b) {
|
|
801
|
+
var y = r.set[b];
|
|
802
802
|
y.forEach(function(v) {
|
|
803
803
|
var O = new j(v.semver.version);
|
|
804
804
|
switch (v.operator) {
|
|
@@ -828,15 +828,15 @@ var st = { exports: {} };
|
|
|
828
828
|
}
|
|
829
829
|
o.ltr = vr;
|
|
830
830
|
function vr(r, s, l) {
|
|
831
|
-
return
|
|
831
|
+
return qe(r, s, "<", l);
|
|
832
832
|
}
|
|
833
833
|
o.gtr = Or;
|
|
834
834
|
function Or(r, s, l) {
|
|
835
|
-
return
|
|
835
|
+
return qe(r, s, ">", l);
|
|
836
836
|
}
|
|
837
|
-
o.outside =
|
|
838
|
-
function
|
|
839
|
-
r = new j(r,
|
|
837
|
+
o.outside = qe;
|
|
838
|
+
function qe(r, s, l, b) {
|
|
839
|
+
r = new j(r, b), s = new G(s, b);
|
|
840
840
|
var y, v, O, V, F;
|
|
841
841
|
switch (l) {
|
|
842
842
|
case ">":
|
|
@@ -848,12 +848,12 @@ var st = { exports: {} };
|
|
|
848
848
|
default:
|
|
849
849
|
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
|
850
850
|
}
|
|
851
|
-
if (je(r, s,
|
|
851
|
+
if (je(r, s, b))
|
|
852
852
|
return !1;
|
|
853
853
|
for (var ge = 0; ge < s.set.length; ++ge) {
|
|
854
854
|
var Ee = s.set[ge], se = null, ie = null;
|
|
855
855
|
if (Ee.forEach(function(ye) {
|
|
856
|
-
ye.semver === de && (ye = new Q(">=0.0.0")), se = se || ye, ie = ie || ye, y(ye.semver, se.semver,
|
|
856
|
+
ye.semver === de && (ye = new Q(">=0.0.0")), se = se || ye, ie = ie || ye, y(ye.semver, se.semver, b) ? se = ye : O(ye.semver, ie.semver, b) && (ie = ye);
|
|
857
857
|
}), se.operator === V || se.operator === F || (!ie.operator || ie.operator === V) && v(r, ie.semver))
|
|
858
858
|
return !1;
|
|
859
859
|
if (ie.operator === F && O(r, ie.semver))
|
|
@@ -881,20 +881,20 @@ var st = { exports: {} };
|
|
|
881
881
|
if (!s.rtl)
|
|
882
882
|
l = r.match(L[d.COERCE]);
|
|
883
883
|
else {
|
|
884
|
-
for (var
|
|
885
|
-
(!l ||
|
|
884
|
+
for (var b; (b = L[d.COERCERTL].exec(r)) && (!l || l.index + l[0].length !== r.length); )
|
|
885
|
+
(!l || b.index + b[0].length !== l.index + l[0].length) && (l = b), L[d.COERCERTL].lastIndex = b.index + b[1].length + b[2].length;
|
|
886
886
|
L[d.COERCERTL].lastIndex = -1;
|
|
887
887
|
}
|
|
888
888
|
return l === null ? null : me(l[2] + "." + (l[3] || "0") + "." + (l[4] || "0"), s);
|
|
889
889
|
}
|
|
890
890
|
})(st, st.exports);
|
|
891
891
|
var dn = st.exports;
|
|
892
|
-
const
|
|
892
|
+
const bi = /* @__PURE__ */ mn(dn), Ni = (t) => t == null ? [] : Array.isArray(t) ? t : [t], Ti = e.any().refine((t) => typeof t == "bigint", {
|
|
893
893
|
message: "Value must be a BigInt"
|
|
894
894
|
}).transform((t) => BigInt(t));
|
|
895
|
-
var gn = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,
|
|
895
|
+
var gn = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, ze = Math.ceil, ce = Math.floor, ne = "[BigNumber Error] ", yt = ne + "Number primitive has more than 15 significant digits: ", pe = 1e14, U = 14, We = 9007199254740991, Ke = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], Re = 1e7, Z = 1e9;
|
|
896
896
|
function kt(t) {
|
|
897
|
-
var o, E, T,
|
|
897
|
+
var o, E, T, S = R.prototype = { constructor: R, toString: null, valueOf: null }, D = new R(1), w = 20, k = 4, L = -7, A = 21, d = -1e7, Y = 1e7, P = !1, fe = 1, ee = 0, Ie = {
|
|
898
898
|
prefix: "",
|
|
899
899
|
groupSize: 3,
|
|
900
900
|
secondaryGroupSize: 0,
|
|
@@ -926,7 +926,7 @@ function kt(t) {
|
|
|
926
926
|
}
|
|
927
927
|
(p = g.indexOf(".")) > -1 && (g = g.replace(".", "")), (I = g.search(/e/i)) > 0 ? (p < 0 && (p = I), p += +g.slice(I + 1), g = g.substring(0, I)) : p < 0 && (p = g.length);
|
|
928
928
|
} else {
|
|
929
|
-
if (
|
|
929
|
+
if (z(a, 2, Ae.length, "Base"), a == 10 && _e)
|
|
930
930
|
return m = new R(n), te(m, w + m.e + 1, k);
|
|
931
931
|
if (g = String(n), c = typeof n == "number") {
|
|
932
932
|
if (n * 0 != 0) return T(m, g, c, a);
|
|
@@ -975,10 +975,10 @@ function kt(t) {
|
|
|
975
975
|
var a, i;
|
|
976
976
|
if (n != null)
|
|
977
977
|
if (typeof n == "object") {
|
|
978
|
-
if (n.hasOwnProperty(a = "DECIMAL_PLACES") && (i = n[a],
|
|
978
|
+
if (n.hasOwnProperty(a = "DECIMAL_PLACES") && (i = n[a], z(i, 0, Z, a), w = i), n.hasOwnProperty(a = "ROUNDING_MODE") && (i = n[a], z(i, 0, 8, a), k = i), n.hasOwnProperty(a = "EXPONENTIAL_AT") && (i = n[a], i && i.pop ? (z(i[0], -Z, 0, a), z(i[1], 0, Z, a), L = i[0], A = i[1]) : (z(i, -Z, Z, a), L = -(A = i < 0 ? -i : i))), n.hasOwnProperty(a = "RANGE"))
|
|
979
979
|
if (i = n[a], i && i.pop)
|
|
980
|
-
|
|
981
|
-
else if (
|
|
980
|
+
z(i[0], -Z, -1, a), z(i[1], 1, Z, a), d = i[0], Y = i[1];
|
|
981
|
+
else if (z(i, -Z, Z, a), i)
|
|
982
982
|
d = -(Y = i < 0 ? -i : i);
|
|
983
983
|
else
|
|
984
984
|
throw Error(ne + a + " cannot be zero: " + i);
|
|
@@ -993,7 +993,7 @@ function kt(t) {
|
|
|
993
993
|
P = i;
|
|
994
994
|
else
|
|
995
995
|
throw Error(ne + a + " not true or false: " + i);
|
|
996
|
-
if (n.hasOwnProperty(a = "MODULO_MODE") && (i = n[a],
|
|
996
|
+
if (n.hasOwnProperty(a = "MODULO_MODE") && (i = n[a], z(i, 0, 9, a), fe = i), n.hasOwnProperty(a = "POW_PRECISION") && (i = n[a], z(i, 0, Z, a), ee = i), n.hasOwnProperty(a = "FORMAT"))
|
|
997
997
|
if (i = n[a], typeof i == "object") Ie = i;
|
|
998
998
|
else throw Error(ne + a + " not an object: " + i);
|
|
999
999
|
if (n.hasOwnProperty(a = "ALPHABET"))
|
|
@@ -1045,7 +1045,7 @@ function kt(t) {
|
|
|
1045
1045
|
};
|
|
1046
1046
|
return function(i) {
|
|
1047
1047
|
var h, u, p, I, c, f = 0, g = [], m = new R(D);
|
|
1048
|
-
if (i == null ? i = w :
|
|
1048
|
+
if (i == null ? i = w : z(i, 0, Z), I = ze(i / U), P)
|
|
1049
1049
|
if (crypto.getRandomValues) {
|
|
1050
1050
|
for (h = crypto.getRandomValues(new Uint32Array(I *= 2)); f < I; )
|
|
1051
1051
|
c = h[f] * 131072 + (h[f + 1] >>> 11), c >= 9e15 ? (u = crypto.getRandomValues(new Uint32Array(2)), h[f] = u[0], h[f + 1] = u[1]) : (g.push(c % 1e14), f += 2);
|
|
@@ -1083,31 +1083,31 @@ function kt(t) {
|
|
|
1083
1083
|
return c.reverse();
|
|
1084
1084
|
}
|
|
1085
1085
|
return function(i, h, u, p, I) {
|
|
1086
|
-
var c, f, g, m,
|
|
1086
|
+
var c, f, g, m, N, _, C, x, X = i.indexOf("."), q = w, M = k;
|
|
1087
1087
|
for (X >= 0 && (m = ee, ee = 0, i = i.replace(".", ""), x = new R(h), _ = x.pow(i.length - X), ee = m, x.c = a(
|
|
1088
|
-
|
|
1088
|
+
be(oe(_.c), _.e, "0"),
|
|
1089
1089
|
10,
|
|
1090
1090
|
u,
|
|
1091
1091
|
n
|
|
1092
1092
|
), x.e = x.c.length), C = a(i, h, u, I ? (c = Ae, n) : (c = n, Ae)), g = m = C.length; C[--m] == 0; C.pop()) ;
|
|
1093
1093
|
if (!C[0]) return c.charAt(0);
|
|
1094
|
-
if (X < 0 ? --g : (_.c = C, _.e = g, _.s = p, _ = o(_, x,
|
|
1095
|
-
i =
|
|
1094
|
+
if (X < 0 ? --g : (_.c = C, _.e = g, _.s = p, _ = o(_, x, q, M, u), C = _.c, N = _.r, g = _.e), f = g + q + 1, X = C[f], m = u / 2, N = N || f < 0 || C[f + 1] != null, N = M < 4 ? (X != null || N) && (M == 0 || M == (_.s < 0 ? 3 : 2)) : X > m || X == m && (M == 4 || N || M == 6 && C[f - 1] & 1 || M == (_.s < 0 ? 8 : 7)), f < 1 || !C[0])
|
|
1095
|
+
i = N ? be(c.charAt(1), -q, c.charAt(0)) : c.charAt(0);
|
|
1096
1096
|
else {
|
|
1097
|
-
if (C.length = f,
|
|
1097
|
+
if (C.length = f, N)
|
|
1098
1098
|
for (--u; ++C[--f] > u; )
|
|
1099
1099
|
C[f] = 0, f || (++g, C = [1].concat(C));
|
|
1100
1100
|
for (m = C.length; !C[--m]; ) ;
|
|
1101
1101
|
for (X = 0, i = ""; X <= m; i += c.charAt(C[X++])) ;
|
|
1102
|
-
i =
|
|
1102
|
+
i = be(i, g, c.charAt(0));
|
|
1103
1103
|
}
|
|
1104
1104
|
return i;
|
|
1105
1105
|
};
|
|
1106
1106
|
}(), o = /* @__PURE__ */ function() {
|
|
1107
1107
|
function n(h, u, p) {
|
|
1108
|
-
var I, c, f, g, m = 0,
|
|
1109
|
-
for (h = h.slice();
|
|
1110
|
-
f = h[
|
|
1108
|
+
var I, c, f, g, m = 0, N = h.length, _ = u % Re, C = u / Re | 0;
|
|
1109
|
+
for (h = h.slice(); N--; )
|
|
1110
|
+
f = h[N] % Re, g = h[N] / Re | 0, I = C * f + g * _, c = _ * f + I % Re * Re + m, m = (c / p | 0) + (I / Re | 0) + C * g, h[N] = c % p;
|
|
1111
1111
|
return m && (h = [m].concat(h)), h;
|
|
1112
1112
|
}
|
|
1113
1113
|
function a(h, u, p, I) {
|
|
@@ -1128,7 +1128,7 @@ function kt(t) {
|
|
|
1128
1128
|
for (; !h[0] && h.length > 1; h.splice(0, 1)) ;
|
|
1129
1129
|
}
|
|
1130
1130
|
return function(h, u, p, I, c) {
|
|
1131
|
-
var f, g, m,
|
|
1131
|
+
var f, g, m, N, _, C, x, X, q, M, $, W, Se, Q, de, G, Te, re = h.s == u.s ? 1 : -1, J = h.c, B = u.c;
|
|
1132
1132
|
if (!J || !J[0] || !B || !B[0])
|
|
1133
1133
|
return new R(
|
|
1134
1134
|
// Return NaN if either NaN, or both Infinity or 0.
|
|
@@ -1137,11 +1137,11 @@ function kt(t) {
|
|
|
1137
1137
|
J && J[0] == 0 || !B ? re * 0 : re / 0
|
|
1138
1138
|
)
|
|
1139
1139
|
);
|
|
1140
|
-
for (X = new R(re),
|
|
1140
|
+
for (X = new R(re), q = X.c = [], g = h.e - u.e, re = p + g + 1, c || (c = pe, g = le(h.e / U) - le(u.e / U), re = re / U | 0), m = 0; B[m] == (J[m] || 0); m++) ;
|
|
1141
1141
|
if (B[m] > (J[m] || 0) && g--, re < 0)
|
|
1142
|
-
|
|
1142
|
+
q.push(1), N = !0;
|
|
1143
1143
|
else {
|
|
1144
|
-
for (Q = J.length, G = B.length, m = 0, re += 2, _ = ce(c / (B[0] + 1)), _ > 1 && (B = n(B, _, c), J = n(J, _, c), G = B.length, Q = J.length),
|
|
1144
|
+
for (Q = J.length, G = B.length, m = 0, re += 2, _ = ce(c / (B[0] + 1)), _ > 1 && (B = n(B, _, c), J = n(J, _, c), G = B.length, Q = J.length), Se = G, M = J.slice(0, G), $ = M.length; $ < G; M[$++] = 0) ;
|
|
1145
1145
|
Te = B.slice(), Te = [0].concat(Te), de = B[0], B[1] >= c / 2 && de++;
|
|
1146
1146
|
do {
|
|
1147
1147
|
if (_ = 0, f = a(B, M, G, $), f < 0) {
|
|
@@ -1154,27 +1154,27 @@ function kt(t) {
|
|
|
1154
1154
|
for (; a(B, M, G, $) < 1; )
|
|
1155
1155
|
_++, i(M, G < $ ? Te : B, $, c), $ = M.length;
|
|
1156
1156
|
} else f === 0 && (_++, M = [0]);
|
|
1157
|
-
|
|
1158
|
-
} while ((
|
|
1159
|
-
|
|
1157
|
+
q[m++] = _, M[0] ? M[$++] = J[Se] || 0 : (M = [J[Se]], $ = 1);
|
|
1158
|
+
} while ((Se++ < Q || M[0] != null) && re--);
|
|
1159
|
+
N = M[0] != null, q[0] || q.splice(0, 1);
|
|
1160
1160
|
}
|
|
1161
1161
|
if (c == pe) {
|
|
1162
|
-
for (m = 1, re =
|
|
1163
|
-
te(X, p + (X.e = m + g * U - 1) + 1, I,
|
|
1162
|
+
for (m = 1, re = q[0]; re >= 10; re /= 10, m++) ;
|
|
1163
|
+
te(X, p + (X.e = m + g * U - 1) + 1, I, N);
|
|
1164
1164
|
} else
|
|
1165
|
-
X.e = g, X.r = +
|
|
1165
|
+
X.e = g, X.r = +N;
|
|
1166
1166
|
return X;
|
|
1167
1167
|
};
|
|
1168
1168
|
}();
|
|
1169
1169
|
function ae(n, a, i, h) {
|
|
1170
1170
|
var u, p, I, c, f;
|
|
1171
|
-
if (i == null ? i = k :
|
|
1171
|
+
if (i == null ? i = k : z(i, 0, 8), !n.c) return n.toString();
|
|
1172
1172
|
if (u = n.c[0], I = n.e, a == null)
|
|
1173
|
-
f = oe(n.c), f = h == 1 || h == 2 && (I <= L || I >= A) ? Fe(f, I) :
|
|
1173
|
+
f = oe(n.c), f = h == 1 || h == 2 && (I <= L || I >= A) ? Fe(f, I) : be(f, I, "0");
|
|
1174
1174
|
else if (n = te(new R(n), a, i), p = n.e, f = oe(n.c), c = f.length, h == 1 || h == 2 && (a <= p || p <= L)) {
|
|
1175
1175
|
for (; c < a; f += "0", c++) ;
|
|
1176
1176
|
f = Fe(f, p);
|
|
1177
|
-
} else if (a -= I, f =
|
|
1177
|
+
} else if (a -= I, f = be(f, p, "0"), p + 1 > c) {
|
|
1178
1178
|
if (--a > 0) for (f += "."; a--; f += "0") ;
|
|
1179
1179
|
} else if (a += p - c, a > 0)
|
|
1180
1180
|
for (p + 1 == c && (f += "."); a--; f += "0") ;
|
|
@@ -1197,8 +1197,8 @@ function kt(t) {
|
|
|
1197
1197
|
if (h.test(m))
|
|
1198
1198
|
p.s = isNaN(m) ? null : m < 0 ? -1 : 1;
|
|
1199
1199
|
else {
|
|
1200
|
-
if (!c && (m = m.replace(n, function(
|
|
1201
|
-
return g = (C = C.toLowerCase()) == "x" ? 16 : C == "b" ? 2 : 8, !f || f == g ? _ :
|
|
1200
|
+
if (!c && (m = m.replace(n, function(N, _, C) {
|
|
1201
|
+
return g = (C = C.toLowerCase()) == "x" ? 16 : C == "b" ? 2 : 8, !f || f == g ? _ : N;
|
|
1202
1202
|
}), f && (g = f, m = m.replace(a, "$1").replace(i, "0.$1")), I != m))
|
|
1203
1203
|
return new R(m, g);
|
|
1204
1204
|
if (R.DEBUG)
|
|
@@ -1209,40 +1209,40 @@ function kt(t) {
|
|
|
1209
1209
|
};
|
|
1210
1210
|
}();
|
|
1211
1211
|
function te(n, a, i, h) {
|
|
1212
|
-
var u, p, I, c, f, g, m,
|
|
1213
|
-
if (
|
|
1212
|
+
var u, p, I, c, f, g, m, N = n.c, _ = Ke;
|
|
1213
|
+
if (N) {
|
|
1214
1214
|
e: {
|
|
1215
|
-
for (u = 1, c =
|
|
1215
|
+
for (u = 1, c = N[0]; c >= 10; c /= 10, u++) ;
|
|
1216
1216
|
if (p = a - u, p < 0)
|
|
1217
|
-
p += U, I = a, f =
|
|
1218
|
-
else if (g =
|
|
1217
|
+
p += U, I = a, f = N[g = 0], m = ce(f / _[u - I - 1] % 10);
|
|
1218
|
+
else if (g = ze((p + 1) / U), g >= N.length)
|
|
1219
1219
|
if (h) {
|
|
1220
|
-
for (;
|
|
1220
|
+
for (; N.length <= g; N.push(0)) ;
|
|
1221
1221
|
f = m = 0, u = 1, p %= U, I = p - U + 1;
|
|
1222
1222
|
} else
|
|
1223
1223
|
break e;
|
|
1224
1224
|
else {
|
|
1225
|
-
for (f = c =
|
|
1225
|
+
for (f = c = N[g], u = 1; c >= 10; c /= 10, u++) ;
|
|
1226
1226
|
p %= U, I = p - U + u, m = I < 0 ? 0 : ce(f / _[u - I - 1] % 10);
|
|
1227
1227
|
}
|
|
1228
1228
|
if (h = h || a < 0 || // Are there any non-zero digits after the rounding digit?
|
|
1229
1229
|
// The expression n % pows10[d - j - 1] returns all digits of n to the right
|
|
1230
1230
|
// of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
|
|
1231
|
-
|
|
1232
|
-
(p > 0 ? I > 0 ? f / _[u - I] : 0 :
|
|
1233
|
-
return
|
|
1234
|
-
if (p == 0 ? (
|
|
1231
|
+
N[g + 1] != null || (I < 0 ? f : f % _[u - I - 1]), h = i < 4 ? (m || h) && (i == 0 || i == (n.s < 0 ? 3 : 2)) : m > 5 || m == 5 && (i == 4 || h || i == 6 && // Check whether the digit to the left of the rounding digit is odd.
|
|
1232
|
+
(p > 0 ? I > 0 ? f / _[u - I] : 0 : N[g - 1]) % 10 & 1 || i == (n.s < 0 ? 8 : 7)), a < 1 || !N[0])
|
|
1233
|
+
return N.length = 0, h ? (a -= n.e + 1, N[0] = _[(U - a % U) % U], n.e = -a || 0) : N[0] = n.e = 0, n;
|
|
1234
|
+
if (p == 0 ? (N.length = g, c = 1, g--) : (N.length = g + 1, c = _[U - p], N[g] = I > 0 ? ce(f / _[u - I] % _[I]) * c : 0), h)
|
|
1235
1235
|
for (; ; )
|
|
1236
1236
|
if (g == 0) {
|
|
1237
|
-
for (p = 1, I =
|
|
1238
|
-
for (I =
|
|
1239
|
-
p != c && (n.e++,
|
|
1237
|
+
for (p = 1, I = N[0]; I >= 10; I /= 10, p++) ;
|
|
1238
|
+
for (I = N[0] += c, c = 1; I >= 10; I /= 10, c++) ;
|
|
1239
|
+
p != c && (n.e++, N[0] == pe && (N[0] = 1));
|
|
1240
1240
|
break;
|
|
1241
1241
|
} else {
|
|
1242
|
-
if (
|
|
1243
|
-
|
|
1242
|
+
if (N[g] += c, N[g] != pe) break;
|
|
1243
|
+
N[g--] = 0, c = 1;
|
|
1244
1244
|
}
|
|
1245
|
-
for (p =
|
|
1245
|
+
for (p = N.length; N[--p] === 0; N.pop()) ;
|
|
1246
1246
|
}
|
|
1247
1247
|
n.e > Y ? n.c = n.e = null : n.e < d && (n.c = [n.e = 0]);
|
|
1248
1248
|
}
|
|
@@ -1250,41 +1250,41 @@ function kt(t) {
|
|
|
1250
1250
|
}
|
|
1251
1251
|
function j(n) {
|
|
1252
1252
|
var a, i = n.e;
|
|
1253
|
-
return i === null ? n.toString() : (a = oe(n.c), a = i <= L || i >= A ? Fe(a, i) :
|
|
1253
|
+
return i === null ? n.toString() : (a = oe(n.c), a = i <= L || i >= A ? Fe(a, i) : be(a, i, "0"), n.s < 0 ? "-" + a : a);
|
|
1254
1254
|
}
|
|
1255
|
-
return
|
|
1255
|
+
return S.absoluteValue = S.abs = function() {
|
|
1256
1256
|
var n = new R(this);
|
|
1257
1257
|
return n.s < 0 && (n.s = 1), n;
|
|
1258
|
-
},
|
|
1258
|
+
}, S.comparedTo = function(n, a) {
|
|
1259
1259
|
return Oe(this, new R(n, a));
|
|
1260
|
-
},
|
|
1260
|
+
}, S.decimalPlaces = S.dp = function(n, a) {
|
|
1261
1261
|
var i, h, u, p = this;
|
|
1262
1262
|
if (n != null)
|
|
1263
|
-
return
|
|
1263
|
+
return z(n, 0, Z), a == null ? a = k : z(a, 0, 8), te(new R(p), n + p.e + 1, a);
|
|
1264
1264
|
if (!(i = p.c)) return null;
|
|
1265
1265
|
if (h = ((u = i.length - 1) - le(this.e / U)) * U, u = i[u]) for (; u % 10 == 0; u /= 10, h--) ;
|
|
1266
1266
|
return h < 0 && (h = 0), h;
|
|
1267
|
-
},
|
|
1267
|
+
}, S.dividedBy = S.div = function(n, a) {
|
|
1268
1268
|
return o(this, new R(n, a), w, k);
|
|
1269
|
-
},
|
|
1269
|
+
}, S.dividedToIntegerBy = S.idiv = function(n, a) {
|
|
1270
1270
|
return o(this, new R(n, a), 0, 1);
|
|
1271
|
-
},
|
|
1272
|
-
var i, h, u, p, I, c, f, g, m,
|
|
1271
|
+
}, S.exponentiatedBy = S.pow = function(n, a) {
|
|
1272
|
+
var i, h, u, p, I, c, f, g, m, N = this;
|
|
1273
1273
|
if (n = new R(n), n.c && !n.isInteger())
|
|
1274
1274
|
throw Error(ne + "Exponent not an integer: " + j(n));
|
|
1275
|
-
if (a != null && (a = new R(a)), c = n.e > 14, !
|
|
1276
|
-
return m = new R(Math.pow(+j(
|
|
1275
|
+
if (a != null && (a = new R(a)), c = n.e > 14, !N.c || !N.c[0] || N.c[0] == 1 && !N.e && N.c.length == 1 || !n.c || !n.c[0])
|
|
1276
|
+
return m = new R(Math.pow(+j(N), c ? n.s * (2 - Ue(n)) : +j(n))), a ? m.mod(a) : m;
|
|
1277
1277
|
if (f = n.s < 0, a) {
|
|
1278
1278
|
if (a.c ? !a.c[0] : !a.s) return new R(NaN);
|
|
1279
|
-
h = !f &&
|
|
1279
|
+
h = !f && N.isInteger() && a.isInteger(), h && (N = N.mod(a));
|
|
1280
1280
|
} else {
|
|
1281
|
-
if (n.e > 9 && (
|
|
1282
|
-
return p =
|
|
1283
|
-
ee && (p =
|
|
1281
|
+
if (n.e > 9 && (N.e > 0 || N.e < -1 || (N.e == 0 ? N.c[0] > 1 || c && N.c[1] >= 24e7 : N.c[0] < 8e13 || c && N.c[0] <= 9999975e7)))
|
|
1282
|
+
return p = N.s < 0 && Ue(n) ? -0 : 0, N.e > -1 && (p = 1 / p), new R(f ? 1 / p : p);
|
|
1283
|
+
ee && (p = ze(ee / U + 2));
|
|
1284
1284
|
}
|
|
1285
1285
|
for (c ? (i = new R(0.5), f && (n.s = 1), g = Ue(n)) : (u = Math.abs(+j(n)), g = u % 2), m = new R(D); ; ) {
|
|
1286
1286
|
if (g) {
|
|
1287
|
-
if (m = m.times(
|
|
1287
|
+
if (m = m.times(N), !m.c) break;
|
|
1288
1288
|
p ? m.c.length > p && (m.c.length = p) : h && (m = m.mod(a));
|
|
1289
1289
|
}
|
|
1290
1290
|
if (u) {
|
|
@@ -1296,85 +1296,85 @@ function kt(t) {
|
|
|
1296
1296
|
if (u = +j(n), u === 0) break;
|
|
1297
1297
|
g = u % 2;
|
|
1298
1298
|
}
|
|
1299
|
-
|
|
1299
|
+
N = N.times(N), p ? N.c && N.c.length > p && (N.c.length = p) : h && (N = N.mod(a));
|
|
1300
1300
|
}
|
|
1301
1301
|
return h ? m : (f && (m = D.div(m)), a ? m.mod(a) : p ? te(m, ee, k, I) : m);
|
|
1302
|
-
},
|
|
1302
|
+
}, S.integerValue = function(n) {
|
|
1303
1303
|
var a = new R(this);
|
|
1304
|
-
return n == null ? n = k :
|
|
1305
|
-
},
|
|
1304
|
+
return n == null ? n = k : z(n, 0, 8), te(a, a.e + 1, n);
|
|
1305
|
+
}, S.isEqualTo = S.eq = function(n, a) {
|
|
1306
1306
|
return Oe(this, new R(n, a)) === 0;
|
|
1307
|
-
},
|
|
1307
|
+
}, S.isFinite = function() {
|
|
1308
1308
|
return !!this.c;
|
|
1309
|
-
},
|
|
1309
|
+
}, S.isGreaterThan = S.gt = function(n, a) {
|
|
1310
1310
|
return Oe(this, new R(n, a)) > 0;
|
|
1311
|
-
},
|
|
1311
|
+
}, S.isGreaterThanOrEqualTo = S.gte = function(n, a) {
|
|
1312
1312
|
return (a = Oe(this, new R(n, a))) === 1 || a === 0;
|
|
1313
|
-
},
|
|
1313
|
+
}, S.isInteger = function() {
|
|
1314
1314
|
return !!this.c && le(this.e / U) > this.c.length - 2;
|
|
1315
|
-
},
|
|
1315
|
+
}, S.isLessThan = S.lt = function(n, a) {
|
|
1316
1316
|
return Oe(this, new R(n, a)) < 0;
|
|
1317
|
-
},
|
|
1317
|
+
}, S.isLessThanOrEqualTo = S.lte = function(n, a) {
|
|
1318
1318
|
return (a = Oe(this, new R(n, a))) === -1 || a === 0;
|
|
1319
|
-
},
|
|
1319
|
+
}, S.isNaN = function() {
|
|
1320
1320
|
return !this.s;
|
|
1321
|
-
},
|
|
1321
|
+
}, S.isNegative = function() {
|
|
1322
1322
|
return this.s < 0;
|
|
1323
|
-
},
|
|
1323
|
+
}, S.isPositive = function() {
|
|
1324
1324
|
return this.s > 0;
|
|
1325
|
-
},
|
|
1325
|
+
}, S.isZero = function() {
|
|
1326
1326
|
return !!this.c && this.c[0] == 0;
|
|
1327
|
-
},
|
|
1327
|
+
}, S.minus = function(n, a) {
|
|
1328
1328
|
var i, h, u, p, I = this, c = I.s;
|
|
1329
1329
|
if (n = new R(n, a), a = n.s, !c || !a) return new R(NaN);
|
|
1330
1330
|
if (c != a)
|
|
1331
1331
|
return n.s = -a, I.plus(n);
|
|
1332
|
-
var f = I.e / U, g = n.e / U, m = I.c,
|
|
1332
|
+
var f = I.e / U, g = n.e / U, m = I.c, N = n.c;
|
|
1333
1333
|
if (!f || !g) {
|
|
1334
|
-
if (!m || !
|
|
1335
|
-
if (!m[0] || !
|
|
1336
|
-
return
|
|
1334
|
+
if (!m || !N) return m ? (n.s = -a, n) : new R(N ? I : NaN);
|
|
1335
|
+
if (!m[0] || !N[0])
|
|
1336
|
+
return N[0] ? (n.s = -a, n) : new R(m[0] ? I : (
|
|
1337
1337
|
// IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity
|
|
1338
1338
|
k == 3 ? -0 : 0
|
|
1339
1339
|
));
|
|
1340
1340
|
}
|
|
1341
1341
|
if (f = le(f), g = le(g), m = m.slice(), c = f - g) {
|
|
1342
|
-
for ((p = c < 0) ? (c = -c, u = m) : (g = f, u =
|
|
1342
|
+
for ((p = c < 0) ? (c = -c, u = m) : (g = f, u = N), u.reverse(), a = c; a--; u.push(0)) ;
|
|
1343
1343
|
u.reverse();
|
|
1344
1344
|
} else
|
|
1345
|
-
for (h = (p = (c = m.length) < (a =
|
|
1346
|
-
if (m[a] !=
|
|
1347
|
-
p = m[a] <
|
|
1345
|
+
for (h = (p = (c = m.length) < (a = N.length)) ? c : a, c = a = 0; a < h; a++)
|
|
1346
|
+
if (m[a] != N[a]) {
|
|
1347
|
+
p = m[a] < N[a];
|
|
1348
1348
|
break;
|
|
1349
1349
|
}
|
|
1350
|
-
if (p && (u = m, m =
|
|
1350
|
+
if (p && (u = m, m = N, N = u, n.s = -n.s), a = (h = N.length) - (i = m.length), a > 0) for (; a--; m[i++] = 0) ;
|
|
1351
1351
|
for (a = pe - 1; h > c; ) {
|
|
1352
|
-
if (m[--h] <
|
|
1352
|
+
if (m[--h] < N[h]) {
|
|
1353
1353
|
for (i = h; i && !m[--i]; m[i] = a) ;
|
|
1354
1354
|
--m[i], m[h] += pe;
|
|
1355
1355
|
}
|
|
1356
|
-
m[h] -=
|
|
1356
|
+
m[h] -= N[h];
|
|
1357
1357
|
}
|
|
1358
1358
|
for (; m[0] == 0; m.splice(0, 1), --g) ;
|
|
1359
1359
|
return m[0] ? Le(n, m, g) : (n.s = k == 3 ? -1 : 1, n.c = [n.e = 0], n);
|
|
1360
|
-
},
|
|
1360
|
+
}, S.modulo = S.mod = function(n, a) {
|
|
1361
1361
|
var i, h, u = this;
|
|
1362
1362
|
return n = new R(n, a), !u.c || !n.s || n.c && !n.c[0] ? new R(NaN) : !n.c || u.c && !u.c[0] ? new R(u) : (fe == 9 ? (h = n.s, n.s = 1, i = o(u, n, 0, 3), n.s = h, i.s *= h) : i = o(u, n, 0, fe), n = u.minus(i.times(n)), !n.c[0] && fe == 1 && (n.s = u.s), n);
|
|
1363
|
-
},
|
|
1364
|
-
var i, h, u, p, I, c, f, g, m,
|
|
1363
|
+
}, S.multipliedBy = S.times = function(n, a) {
|
|
1364
|
+
var i, h, u, p, I, c, f, g, m, N, _, C, x, X, q, M = this, $ = M.c, W = (n = new R(n, a)).c;
|
|
1365
1365
|
if (!$ || !W || !$[0] || !W[0])
|
|
1366
1366
|
return !M.s || !n.s || $ && !$[0] && !W || W && !W[0] && !$ ? n.c = n.e = n.s = null : (n.s *= M.s, !$ || !W ? n.c = n.e = null : (n.c = [0], n.e = 0)), n;
|
|
1367
|
-
for (h = le(M.e / U) + le(n.e / U), n.s *= M.s, f = $.length,
|
|
1368
|
-
for (X = pe,
|
|
1369
|
-
for (i = 0, _ = W[u] %
|
|
1370
|
-
g = $[--I] %
|
|
1367
|
+
for (h = le(M.e / U) + le(n.e / U), n.s *= M.s, f = $.length, N = W.length, f < N && (x = $, $ = W, W = x, u = f, f = N, N = u), u = f + N, x = []; u--; x.push(0)) ;
|
|
1368
|
+
for (X = pe, q = Re, u = N; --u >= 0; ) {
|
|
1369
|
+
for (i = 0, _ = W[u] % q, C = W[u] / q | 0, I = f, p = u + I; p > u; )
|
|
1370
|
+
g = $[--I] % q, m = $[I] / q | 0, c = C * g + m * _, g = _ * g + c % q * q + x[p] + i, i = (g / X | 0) + (c / q | 0) + C * m, x[p--] = g % X;
|
|
1371
1371
|
x[p] = i;
|
|
1372
1372
|
}
|
|
1373
1373
|
return i ? ++h : x.splice(0, 1), Le(n, x, h);
|
|
1374
|
-
},
|
|
1374
|
+
}, S.negated = function() {
|
|
1375
1375
|
var n = new R(this);
|
|
1376
1376
|
return n.s = -n.s || null, n;
|
|
1377
|
-
},
|
|
1377
|
+
}, S.plus = function(n, a) {
|
|
1378
1378
|
var i, h = this, u = h.s;
|
|
1379
1379
|
if (n = new R(n, a), a = n.s, !u || !a) return new R(NaN);
|
|
1380
1380
|
if (u != a)
|
|
@@ -1391,19 +1391,19 @@ function kt(t) {
|
|
|
1391
1391
|
for (u = c.length, a = f.length, u - a < 0 && (i = f, f = c, c = i, a = u), u = 0; a; )
|
|
1392
1392
|
u = (c[--a] = c[a] + f[a] + u) / pe | 0, c[a] = pe === c[a] ? 0 : c[a] % pe;
|
|
1393
1393
|
return u && (c = [u].concat(c), ++I), Le(n, c, I);
|
|
1394
|
-
},
|
|
1394
|
+
}, S.precision = S.sd = function(n, a) {
|
|
1395
1395
|
var i, h, u, p = this;
|
|
1396
1396
|
if (n != null && n !== !!n)
|
|
1397
|
-
return
|
|
1397
|
+
return z(n, 1, Z), a == null ? a = k : z(a, 0, 8), te(new R(p), n, a);
|
|
1398
1398
|
if (!(i = p.c)) return null;
|
|
1399
1399
|
if (u = i.length - 1, h = u * U + 1, u = i[u]) {
|
|
1400
1400
|
for (; u % 10 == 0; u /= 10, h--) ;
|
|
1401
1401
|
for (u = i[0]; u >= 10; u /= 10, h++) ;
|
|
1402
1402
|
}
|
|
1403
1403
|
return n && p.e + 1 > h && (h = p.e + 1), h;
|
|
1404
|
-
},
|
|
1405
|
-
return
|
|
1406
|
-
},
|
|
1404
|
+
}, S.shiftedBy = function(n) {
|
|
1405
|
+
return z(n, -We, We), this.times("1e" + n);
|
|
1406
|
+
}, S.squareRoot = S.sqrt = function() {
|
|
1407
1407
|
var n, a, i, h, u, p = this, I = p.c, c = p.s, f = p.e, g = w + 4, m = new R("0.5");
|
|
1408
1408
|
if (c !== 1 || !I || !I[0])
|
|
1409
1409
|
return new R(!c || c < 0 && (!I || I[0]) ? NaN : I ? p : 1 / 0);
|
|
@@ -1422,72 +1422,72 @@ function kt(t) {
|
|
|
1422
1422
|
}
|
|
1423
1423
|
}
|
|
1424
1424
|
return te(i, i.e + w + 1, k, n);
|
|
1425
|
-
},
|
|
1426
|
-
return n != null && (
|
|
1427
|
-
},
|
|
1428
|
-
return n != null && (
|
|
1429
|
-
},
|
|
1425
|
+
}, S.toExponential = function(n, a) {
|
|
1426
|
+
return n != null && (z(n, 0, Z), n++), ae(this, n, a, 1);
|
|
1427
|
+
}, S.toFixed = function(n, a) {
|
|
1428
|
+
return n != null && (z(n, 0, Z), n = n + this.e + 1), ae(this, n, a);
|
|
1429
|
+
}, S.toFormat = function(n, a, i) {
|
|
1430
1430
|
var h, u = this;
|
|
1431
1431
|
if (i == null)
|
|
1432
1432
|
n != null && a && typeof a == "object" ? (i = a, a = null) : n && typeof n == "object" ? (i = n, n = a = null) : i = Ie;
|
|
1433
1433
|
else if (typeof i != "object")
|
|
1434
1434
|
throw Error(ne + "Argument not an object: " + i);
|
|
1435
1435
|
if (h = u.toFixed(n, a), u.c) {
|
|
1436
|
-
var p, I = h.split("."), c = +i.groupSize, f = +i.secondaryGroupSize, g = i.groupSeparator || "", m = I[0],
|
|
1436
|
+
var p, I = h.split("."), c = +i.groupSize, f = +i.secondaryGroupSize, g = i.groupSeparator || "", m = I[0], N = I[1], _ = u.s < 0, C = _ ? m.slice(1) : m, x = C.length;
|
|
1437
1437
|
if (f && (p = c, c = f, f = p, x -= p), c > 0 && x > 0) {
|
|
1438
1438
|
for (p = x % c || c, m = C.substr(0, p); p < x; p += c) m += g + C.substr(p, c);
|
|
1439
1439
|
f > 0 && (m += g + C.slice(p)), _ && (m = "-" + m);
|
|
1440
1440
|
}
|
|
1441
|
-
h =
|
|
1441
|
+
h = N ? m + (i.decimalSeparator || "") + ((f = +i.fractionGroupSize) ? N.replace(
|
|
1442
1442
|
new RegExp("\\d{" + f + "}\\B", "g"),
|
|
1443
1443
|
"$&" + (i.fractionGroupSeparator || "")
|
|
1444
|
-
) :
|
|
1444
|
+
) : N) : m;
|
|
1445
1445
|
}
|
|
1446
1446
|
return (i.prefix || "") + h + (i.suffix || "");
|
|
1447
|
-
},
|
|
1448
|
-
var a, i, h, u, p, I, c, f, g, m,
|
|
1447
|
+
}, S.toFraction = function(n) {
|
|
1448
|
+
var a, i, h, u, p, I, c, f, g, m, N, _, C = this, x = C.c;
|
|
1449
1449
|
if (n != null && (c = new R(n), !c.isInteger() && (c.c || c.s !== 1) || c.lt(D)))
|
|
1450
1450
|
throw Error(ne + "Argument " + (c.isInteger() ? "out of range: " : "not an integer: ") + j(c));
|
|
1451
1451
|
if (!x) return new R(C);
|
|
1452
1452
|
for (a = new R(D), g = i = new R(D), h = f = new R(D), _ = oe(x), p = a.e = _.length - C.e - 1, a.c[0] = Ke[(I = p % U) < 0 ? U + I : I], n = !n || c.comparedTo(a) > 0 ? p > 0 ? a : g : c, I = Y, Y = 1 / 0, c = new R(_), f.c[0] = 0; m = o(c, a, 0, 1), u = i.plus(m.times(h)), u.comparedTo(n) != 1; )
|
|
1453
1453
|
i = h, h = u, g = f.plus(m.times(u = g)), f = u, a = c.minus(m.times(u = a)), c = u;
|
|
1454
|
-
return u = o(n.minus(i), h, 0, 1), f = f.plus(u.times(g)), i = i.plus(u.times(h)), f.s = g.s = C.s, p = p * 2,
|
|
1454
|
+
return u = o(n.minus(i), h, 0, 1), f = f.plus(u.times(g)), i = i.plus(u.times(h)), f.s = g.s = C.s, p = p * 2, N = o(g, h, p, k).minus(C).abs().comparedTo(
|
|
1455
1455
|
o(f, i, p, k).minus(C).abs()
|
|
1456
|
-
) < 1 ? [g, h] : [f, i], Y = I,
|
|
1457
|
-
},
|
|
1456
|
+
) < 1 ? [g, h] : [f, i], Y = I, N;
|
|
1457
|
+
}, S.toNumber = function() {
|
|
1458
1458
|
return +j(this);
|
|
1459
|
-
},
|
|
1460
|
-
return n != null &&
|
|
1461
|
-
},
|
|
1459
|
+
}, S.toPrecision = function(n, a) {
|
|
1460
|
+
return n != null && z(n, 1, Z), ae(this, n, a, 2);
|
|
1461
|
+
}, S.toString = function(n) {
|
|
1462
1462
|
var a, i = this, h = i.s, u = i.e;
|
|
1463
|
-
return u === null ? h ? (a = "Infinity", h < 0 && (a = "-" + a)) : a = "NaN" : (n == null ? a = u <= L || u >= A ? Fe(oe(i.c), u) :
|
|
1464
|
-
},
|
|
1463
|
+
return u === null ? h ? (a = "Infinity", h < 0 && (a = "-" + a)) : a = "NaN" : (n == null ? a = u <= L || u >= A ? Fe(oe(i.c), u) : be(oe(i.c), u, "0") : n === 10 && _e ? (i = te(new R(i), w + u + 1, k), a = be(oe(i.c), i.e, "0")) : (z(n, 2, Ae.length, "Base"), a = E(be(oe(i.c), u, "0"), 10, n, h, !0)), h < 0 && i.c[0] && (a = "-" + a)), a;
|
|
1464
|
+
}, S.valueOf = S.toJSON = function() {
|
|
1465
1465
|
return j(this);
|
|
1466
|
-
},
|
|
1466
|
+
}, S._isBigNumber = !0, S[Symbol.toStringTag] = "BigNumber", S[Symbol.for("nodejs.util.inspect.custom")] = S.valueOf, t != null && R.set(t), R;
|
|
1467
1467
|
}
|
|
1468
1468
|
function le(t) {
|
|
1469
1469
|
var o = t | 0;
|
|
1470
1470
|
return t > 0 || t === o ? o : o - 1;
|
|
1471
1471
|
}
|
|
1472
1472
|
function oe(t) {
|
|
1473
|
-
for (var o, E, T = 1,
|
|
1473
|
+
for (var o, E, T = 1, S = t.length, D = t[0] + ""; T < S; ) {
|
|
1474
1474
|
for (o = t[T++] + "", E = U - o.length; E--; o = "0" + o) ;
|
|
1475
1475
|
D += o;
|
|
1476
1476
|
}
|
|
1477
|
-
for (
|
|
1478
|
-
return D.slice(0,
|
|
1477
|
+
for (S = D.length; D.charCodeAt(--S) === 48; ) ;
|
|
1478
|
+
return D.slice(0, S + 1 || 1);
|
|
1479
1479
|
}
|
|
1480
1480
|
function Oe(t, o) {
|
|
1481
|
-
var E, T,
|
|
1481
|
+
var E, T, S = t.c, D = o.c, w = t.s, k = o.s, L = t.e, A = o.e;
|
|
1482
1482
|
if (!w || !k) return null;
|
|
1483
|
-
if (E =
|
|
1483
|
+
if (E = S && !S[0], T = D && !D[0], E || T) return E ? T ? 0 : -k : w;
|
|
1484
1484
|
if (w != k) return w;
|
|
1485
|
-
if (E = w < 0, T = L == A, !
|
|
1485
|
+
if (E = w < 0, T = L == A, !S || !D) return T ? 0 : !S ^ E ? 1 : -1;
|
|
1486
1486
|
if (!T) return L > A ^ E ? 1 : -1;
|
|
1487
|
-
for (k = (L =
|
|
1487
|
+
for (k = (L = S.length) < (A = D.length) ? L : A, w = 0; w < k; w++) if (S[w] != D[w]) return S[w] > D[w] ^ E ? 1 : -1;
|
|
1488
1488
|
return L == A ? 0 : L > A ^ E ? 1 : -1;
|
|
1489
1489
|
}
|
|
1490
|
-
function
|
|
1490
|
+
function z(t, o, E, T) {
|
|
1491
1491
|
if (t < o || t > E || t !== ce(t))
|
|
1492
1492
|
throw Error(ne + (T || "Argument") + (typeof t == "number" ? t < o || t > E ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(t));
|
|
1493
1493
|
}
|
|
@@ -1498,19 +1498,19 @@ function Ue(t) {
|
|
|
1498
1498
|
function Fe(t, o) {
|
|
1499
1499
|
return (t.length > 1 ? t.charAt(0) + "." + t.slice(1) : t) + (o < 0 ? "e" : "e+") + o;
|
|
1500
1500
|
}
|
|
1501
|
-
function
|
|
1502
|
-
var T,
|
|
1501
|
+
function be(t, o, E) {
|
|
1502
|
+
var T, S;
|
|
1503
1503
|
if (o < 0) {
|
|
1504
|
-
for (
|
|
1505
|
-
t =
|
|
1504
|
+
for (S = E + "."; ++o; S += E) ;
|
|
1505
|
+
t = S + t;
|
|
1506
1506
|
} else if (T = t.length, ++o > T) {
|
|
1507
|
-
for (
|
|
1508
|
-
t +=
|
|
1507
|
+
for (S = E, o -= T; --o; S += E) ;
|
|
1508
|
+
t += S;
|
|
1509
1509
|
} else o < T && (t = t.slice(0, o) + "." + t.slice(o));
|
|
1510
1510
|
return t;
|
|
1511
1511
|
}
|
|
1512
|
-
var
|
|
1513
|
-
const
|
|
1512
|
+
var yi = kt();
|
|
1513
|
+
const Ri = e.boolean().transform((t) => String(t)), vi = e.string().transform((t) => t === "true");
|
|
1514
1514
|
var ot;
|
|
1515
1515
|
(function(t) {
|
|
1516
1516
|
t[t.function = 0] = "function", t[t.l1_handler = 1] = "l1_handler", t[t.constructor = 2] = "constructor";
|
|
@@ -1523,7 +1523,7 @@ const Ut = e.array(e.string()), Ye = e.object({
|
|
|
1523
1523
|
CONSTRUCTOR: e.array(Ye),
|
|
1524
1524
|
EXTERNAL: e.array(Ye),
|
|
1525
1525
|
L1_HANDLER: e.array(Ye)
|
|
1526
|
-
}),
|
|
1526
|
+
}), Oi = e.string(), En = e.object({
|
|
1527
1527
|
builtins: Ut,
|
|
1528
1528
|
data: e.array(e.string())
|
|
1529
1529
|
}), ct = e.object({
|
|
@@ -1540,24 +1540,24 @@ const Ut = e.array(e.string()), Ye = e.object({
|
|
|
1540
1540
|
name: e.string(),
|
|
1541
1541
|
type: e.union([e.literal("felt"), e.literal("felt*"), e.string()]),
|
|
1542
1542
|
kind: e.union([e.literal("key"), e.literal("data")])
|
|
1543
|
-
}),
|
|
1543
|
+
}), Sn = e.object({
|
|
1544
1544
|
name: e.string(),
|
|
1545
1545
|
type: e.literal("event"),
|
|
1546
1546
|
data: e.array(lt),
|
|
1547
1547
|
keys: e.array(lt)
|
|
1548
|
-
}),
|
|
1548
|
+
}), bn = e.object({
|
|
1549
1549
|
name: e.string(),
|
|
1550
1550
|
members: e.array(lt),
|
|
1551
1551
|
kind: e.literal("struct"),
|
|
1552
1552
|
type: e.literal("event")
|
|
1553
|
-
}),
|
|
1553
|
+
}), Nn = e.object({
|
|
1554
1554
|
members: e.array(ct.and(e.object({
|
|
1555
1555
|
offset: e.number()
|
|
1556
1556
|
}))),
|
|
1557
1557
|
name: e.string(),
|
|
1558
1558
|
size: e.number(),
|
|
1559
1559
|
type: e.literal("struct")
|
|
1560
|
-
}), Tn = e.union([
|
|
1560
|
+
}), Tn = e.union([bn, Sn]), xt = e.array(e.union([An, Tn, Nn, e.any()])), yn = e.object({
|
|
1561
1561
|
program: En,
|
|
1562
1562
|
entry_points_by_type: Ft,
|
|
1563
1563
|
abi: xt
|
|
@@ -1585,13 +1585,13 @@ const Ut = e.array(e.string()), Ye = e.object({
|
|
|
1585
1585
|
hints: e.array(e.any()),
|
|
1586
1586
|
pythonic_hints: wn,
|
|
1587
1587
|
entry_points_by_type: Ft
|
|
1588
|
-
}),
|
|
1588
|
+
}), wi = _n, _i = e.union([
|
|
1589
1589
|
yn,
|
|
1590
1590
|
On
|
|
1591
|
-
]), Mt = Br(null), Gt = () => Mr(Mt),
|
|
1591
|
+
]), Mt = Br(null), Gt = () => Mr(Mt), Li = () => {
|
|
1592
1592
|
var t;
|
|
1593
1593
|
return !!((t = Gt()) != null && t.emitter);
|
|
1594
|
-
},
|
|
1594
|
+
}, Ci = ({ emitter: t, children: o }) => /* @__PURE__ */ xr(Mt.Provider, { value: {
|
|
1595
1595
|
emitter: t
|
|
1596
1596
|
}, children: o });
|
|
1597
1597
|
let Rt = !1;
|
|
@@ -1603,10 +1603,10 @@ const Vt = () => {
|
|
|
1603
1603
|
return;
|
|
1604
1604
|
}
|
|
1605
1605
|
return t;
|
|
1606
|
-
},
|
|
1606
|
+
}, Di = () => {
|
|
1607
1607
|
const t = Vt();
|
|
1608
1608
|
return t ? t.emit.bind(t) : kr;
|
|
1609
|
-
},
|
|
1609
|
+
}, Pi = () => {
|
|
1610
1610
|
const t = Vt();
|
|
1611
1611
|
return (E, T) => {
|
|
1612
1612
|
Gr(() => t ? t.on(E, T) : void 0, [E, T]);
|
|
@@ -1667,8 +1667,8 @@ ue.prototype.mainError = function() {
|
|
|
1667
1667
|
if (this._errors.length === 0)
|
|
1668
1668
|
return null;
|
|
1669
1669
|
for (var t = {}, o = null, E = 0, T = 0; T < this._errors.length; T++) {
|
|
1670
|
-
var
|
|
1671
|
-
t[D] = w, w >= E && (o =
|
|
1670
|
+
var S = this._errors[T], D = S.message, w = (t[D] || 0) + 1;
|
|
1671
|
+
t[D] = w, w >= E && (o = S, E = w);
|
|
1672
1672
|
}
|
|
1673
1673
|
return o;
|
|
1674
1674
|
};
|
|
@@ -1691,8 +1691,8 @@ ue.prototype.mainError = function() {
|
|
|
1691
1691
|
maxTimeout: 1 / 0,
|
|
1692
1692
|
randomize: !1
|
|
1693
1693
|
};
|
|
1694
|
-
for (var
|
|
1695
|
-
T[
|
|
1694
|
+
for (var S in E)
|
|
1695
|
+
T[S] = E[S];
|
|
1696
1696
|
if (T.minTimeout > T.maxTimeout)
|
|
1697
1697
|
throw new Error("minTimeout is greater than maxTimeout");
|
|
1698
1698
|
for (var D = [], w = 0; w < T.retries; w++)
|
|
@@ -1701,16 +1701,16 @@ ue.prototype.mainError = function() {
|
|
|
1701
1701
|
return k - L;
|
|
1702
1702
|
}), D;
|
|
1703
1703
|
}, t.createTimeout = function(E, T) {
|
|
1704
|
-
var
|
|
1704
|
+
var S = T.randomize ? Math.random() + 1 : 1, D = Math.round(S * Math.max(T.minTimeout, 1) * Math.pow(T.factor, E));
|
|
1705
1705
|
return D = Math.min(D, T.maxTimeout), D;
|
|
1706
|
-
}, t.wrap = function(E, T,
|
|
1707
|
-
if (T instanceof Array && (
|
|
1708
|
-
|
|
1706
|
+
}, t.wrap = function(E, T, S) {
|
|
1707
|
+
if (T instanceof Array && (S = T, T = null), !S) {
|
|
1708
|
+
S = [];
|
|
1709
1709
|
for (var D in E)
|
|
1710
|
-
typeof E[D] == "function" &&
|
|
1710
|
+
typeof E[D] == "function" && S.push(D);
|
|
1711
1711
|
}
|
|
1712
|
-
for (var w = 0; w <
|
|
1713
|
-
var k =
|
|
1712
|
+
for (var w = 0; w < S.length; w++) {
|
|
1713
|
+
var k = S[w], L = E[k];
|
|
1714
1714
|
E[k] = (function(d) {
|
|
1715
1715
|
var Y = t.operation(T), P = Array.prototype.slice.call(arguments, 1), fe = P.pop();
|
|
1716
1716
|
P.push(function(ee) {
|
|
@@ -1726,7 +1726,7 @@ var ut;
|
|
|
1726
1726
|
(function(t) {
|
|
1727
1727
|
t.NO_TOKEN_API_URL = "NO_TOKEN_API_URL is not defined", t.NO_TOKEN_PRICE_API_URL = "NO_TOKEN_PRICE_API_URL is not defined", t.TOKENS_DEFI_DECOMPOSITION_URL = "TOKENS_DEFI_DECOMPOSITION_URL is not defined", t.TOKENS_AIRDROPS_API_URL = "TOKENS_AIRDROPS_API_URL is not defined", t.TOKEN_PARSING_ERROR = "Unable to parse token data response", t.TOKEN_PRICE_PARSING_ERROR = "Unable to parse token price response", t.TOKEN_DEFI_DECOMPOSITION_PARSING_ERROR = "Unable to parse token defi decomposition response", t.TOKEN_PRICE_NOT_FOUND = "Token price not found", t.TOKEN_NOT_FOUND = "Token not found", t.TOKEN_DETAILS_NOT_FOUND = "Token details not found", t.FEE_TOKEN_NOT_FOUND = "Fee token not found", t.UNABLE_TO_CALCULATE_CURRENCY_VALUE = "Unable to calculate currency value", t.UNSAFE_DECIMALS = "Unsafe decimals in token";
|
|
1728
1728
|
})(ut || (ut = {}));
|
|
1729
|
-
class
|
|
1729
|
+
class ji extends we {
|
|
1730
1730
|
constructor(o) {
|
|
1731
1731
|
super(o, ut), this.name = "TokenError";
|
|
1732
1732
|
}
|
|
@@ -1734,7 +1734,7 @@ class Pi extends we {
|
|
|
1734
1734
|
const $t = e.union([
|
|
1735
1735
|
e.literal("concentratedLiquidityPosition"),
|
|
1736
1736
|
e.literal("collateralizedDebtPosition")
|
|
1737
|
-
]),
|
|
1737
|
+
]), ki = e.object({
|
|
1738
1738
|
status: e.literal("initialising")
|
|
1739
1739
|
}).or(e.object({
|
|
1740
1740
|
status: e.literal("initialised"),
|
|
@@ -1769,15 +1769,15 @@ const $t = e.union([
|
|
|
1769
1769
|
rank: e.number()
|
|
1770
1770
|
}).optional(),
|
|
1771
1771
|
tags: e.array(e.string()).optional()
|
|
1772
|
-
}),
|
|
1772
|
+
}), Ui = e.object({
|
|
1773
1773
|
tokens: e.array(Pe)
|
|
1774
|
-
}),
|
|
1774
|
+
}), Fi = Pe, Xt = e.object({
|
|
1775
1775
|
pricingId: e.number(),
|
|
1776
1776
|
ethValue: e.string(),
|
|
1777
1777
|
ccyValue: e.string(),
|
|
1778
1778
|
ethDayChange: e.string(),
|
|
1779
1779
|
ccyDayChange: e.string()
|
|
1780
|
-
}),
|
|
1780
|
+
}), xi = e.object({
|
|
1781
1781
|
prices: e.array(Xt)
|
|
1782
1782
|
}), vt = e.object({
|
|
1783
1783
|
tokenAddress: H,
|
|
@@ -1789,7 +1789,7 @@ const $t = e.union([
|
|
|
1789
1789
|
}), Ht = e.object({
|
|
1790
1790
|
tokenAddress: K.optional(),
|
|
1791
1791
|
totalBalances: e.record(e.string())
|
|
1792
|
-
}),
|
|
1792
|
+
}), qt = Ht.extend({
|
|
1793
1793
|
tokenId: e.string(),
|
|
1794
1794
|
data: e.object({
|
|
1795
1795
|
poolFeePercentage: e.string(),
|
|
@@ -1797,7 +1797,7 @@ const $t = e.union([
|
|
|
1797
1797
|
token0: vt,
|
|
1798
1798
|
token1: vt
|
|
1799
1799
|
})
|
|
1800
|
-
}),
|
|
1800
|
+
}), Bi = e.array(qt), zt = Ht.extend({
|
|
1801
1801
|
data: e.object({
|
|
1802
1802
|
apy: e.string().optional(),
|
|
1803
1803
|
group: e.number().optional(),
|
|
@@ -1805,7 +1805,7 @@ const $t = e.union([
|
|
|
1805
1805
|
debt: e.boolean(),
|
|
1806
1806
|
lending: e.boolean()
|
|
1807
1807
|
})
|
|
1808
|
-
}),
|
|
1808
|
+
}), Mi = e.array(zt), Dn = e.array(qt.or(zt)), Pn = e.object({
|
|
1809
1809
|
name: e.string(),
|
|
1810
1810
|
manageUrl: e.string(),
|
|
1811
1811
|
type: $t,
|
|
@@ -1817,7 +1817,7 @@ const $t = e.union([
|
|
|
1817
1817
|
}), jn = e.object({
|
|
1818
1818
|
dappId: e.string(),
|
|
1819
1819
|
products: e.array(Pn)
|
|
1820
|
-
}),
|
|
1820
|
+
}), Gi = e.object({
|
|
1821
1821
|
dapps: e.array(jn)
|
|
1822
1822
|
}), kn = e.object({
|
|
1823
1823
|
name: e.string().optional(),
|
|
@@ -1826,18 +1826,16 @@ const $t = e.union([
|
|
|
1826
1826
|
claimUrl: e.string().optional(),
|
|
1827
1827
|
claimStart: e.number(),
|
|
1828
1828
|
claimEnd: e.number().optional()
|
|
1829
|
-
}),
|
|
1829
|
+
}), Vi = e.object({
|
|
1830
1830
|
accountAddress: K,
|
|
1831
1831
|
chain: e.string(),
|
|
1832
1832
|
airdrops: e.array(kn)
|
|
1833
1833
|
}), He = e.object({
|
|
1834
1834
|
address: K,
|
|
1835
1835
|
networkId: e.string({ required_error: "Network is required" })
|
|
1836
|
-
}, { required_error: "
|
|
1837
|
-
He.required().extend({
|
|
1836
|
+
}, { required_error: "WebBaseToken is required" }), $i = He.required().extend({
|
|
1838
1837
|
balance: e.string()
|
|
1839
|
-
})
|
|
1840
|
-
const Wt = He.required().extend({
|
|
1838
|
+
}), Wt = He.required().extend({
|
|
1841
1839
|
id: e.number().optional(),
|
|
1842
1840
|
name: e.string().optional(),
|
|
1843
1841
|
symbol: e.string().optional(),
|
|
@@ -1852,20 +1850,17 @@ const Wt = He.required().extend({
|
|
|
1852
1850
|
balance: e.string()
|
|
1853
1851
|
}), Fn = Wt.extend({
|
|
1854
1852
|
currencyValue: e.string(),
|
|
1853
|
+
currencySymbol: e.string().optional(),
|
|
1855
1854
|
ccyDayChange: e.string().optional(),
|
|
1856
1855
|
ethDayChange: e.string().optional(),
|
|
1857
1856
|
unitCurrencyValue: e.string().optional()
|
|
1858
1857
|
}), Et = Fn.extend({
|
|
1859
1858
|
...Un.shape
|
|
1860
|
-
})
|
|
1861
|
-
e.array(Et);
|
|
1862
|
-
He.extend({
|
|
1859
|
+
}), Xi = e.array(Et), Hi = He.extend({
|
|
1863
1860
|
...Xt.shape
|
|
1864
|
-
})
|
|
1865
|
-
He.extend({
|
|
1861
|
+
}), qi = He.extend({
|
|
1866
1862
|
...Pe.shape
|
|
1867
|
-
})
|
|
1868
|
-
const Ot = Et.extend({
|
|
1863
|
+
}), Ot = Et.extend({
|
|
1869
1864
|
accruedFees: e.string(),
|
|
1870
1865
|
currentPrice: e.string(),
|
|
1871
1866
|
maxPrice: e.string(),
|
|
@@ -1882,7 +1877,7 @@ const Ot = Et.extend({
|
|
|
1882
1877
|
unitCurrencyValueToken1: e.string().optional(),
|
|
1883
1878
|
token0: Ot,
|
|
1884
1879
|
token1: Ot
|
|
1885
|
-
}),
|
|
1880
|
+
}), zi = e.array(Yt), Wi = e.object({
|
|
1886
1881
|
name: e.string().optional(),
|
|
1887
1882
|
healthRatio: e.string().optional(),
|
|
1888
1883
|
accountAddress: K.optional()
|
|
@@ -1898,7 +1893,7 @@ const Ot = Et.extend({
|
|
|
1898
1893
|
token: Et.optional(),
|
|
1899
1894
|
accountAddress: K.optional(),
|
|
1900
1895
|
accountAddressGroup: e.string().optional()
|
|
1901
|
-
}),
|
|
1896
|
+
}), Ki = e.array(Zt), xn = Yt.or(Zt), Bn = e.record(e.object({
|
|
1902
1897
|
name: e.string().optional(),
|
|
1903
1898
|
healthRatio: e.string().optional(),
|
|
1904
1899
|
accountAddress: K.optional()
|
|
@@ -1912,7 +1907,7 @@ const Ot = Et.extend({
|
|
|
1912
1907
|
brandColor: e.string().optional(),
|
|
1913
1908
|
groups: Bn.optional(),
|
|
1914
1909
|
accountAddress: K
|
|
1915
|
-
}), Gn = e.array(Mn),
|
|
1910
|
+
}), Gn = e.array(Mn), Yi = e.object({
|
|
1916
1911
|
dappId: e.string(),
|
|
1917
1912
|
products: Gn
|
|
1918
1913
|
}), Vn = e.object({
|
|
@@ -1923,7 +1918,7 @@ const Ot = Et.extend({
|
|
|
1923
1918
|
claimUrl: e.string().optional(),
|
|
1924
1919
|
claimStart: e.number(),
|
|
1925
1920
|
claimEnd: e.number().optional()
|
|
1926
|
-
}),
|
|
1921
|
+
}), Zi = e.array(Vn), $n = (t, o = 18) => Vr(t.replace(",", "."), Number(o)), Xn = e.string().trim().refine((t) => t !== "", {
|
|
1927
1922
|
message: "Amount is required"
|
|
1928
1923
|
}).refine((t) => {
|
|
1929
1924
|
try {
|
|
@@ -1938,7 +1933,7 @@ const Ot = Et.extend({
|
|
|
1938
1933
|
throw new Error("Amount should be a number");
|
|
1939
1934
|
}
|
|
1940
1935
|
return !0;
|
|
1941
|
-
}, { message: "Invalid amount" }),
|
|
1936
|
+
}, { message: "Invalid amount" }), Ji = (t) => !!Xn.parse(t), Hn = e.object({
|
|
1942
1937
|
data: e.object({
|
|
1943
1938
|
code: e.string().optional(),
|
|
1944
1939
|
// "STARKNAME_NOT_FOUND",
|
|
@@ -1947,29 +1942,29 @@ const Ot = Et.extend({
|
|
|
1947
1942
|
message: e.string()
|
|
1948
1943
|
// "foo.stark not found"
|
|
1949
1944
|
})
|
|
1950
|
-
}),
|
|
1945
|
+
}), Qi = (t) => {
|
|
1951
1946
|
const o = Hn.safeParse(t);
|
|
1952
1947
|
if (o.success)
|
|
1953
1948
|
return o.data.data.message;
|
|
1954
|
-
},
|
|
1955
|
-
const T =
|
|
1956
|
-
return
|
|
1957
|
-
},
|
|
1958
|
-
const
|
|
1959
|
-
return Wn({ estimatedFee:
|
|
1949
|
+
}, qn = 3, Jt = process.env.FEE_OVERHEAD ? parseFloat(process.env.FEE_OVERHEAD) : qn, zn = 1.5, Ge = 10, Wn = ({ estimatedFee: t, overheadMultiplier: o = Jt }) => {
|
|
1950
|
+
const T = Ne.toBigInt(t) * BigInt(o * Ge) / BigInt(Ge);
|
|
1951
|
+
return Ne.toHex(T);
|
|
1952
|
+
}, es = ({ suggestedMaxFee: t, overheadMultiplier: o = Jt, starknetJsOverheadMultiplier: E = zn }) => {
|
|
1953
|
+
const S = Ne.toBigInt(t) * BigInt(Ge) / BigInt(E * Ge);
|
|
1954
|
+
return Wn({ estimatedFee: S, overheadMultiplier: o });
|
|
1960
1955
|
};
|
|
1961
1956
|
var ft;
|
|
1962
1957
|
(function(t) {
|
|
1963
1958
|
t.SIMULATE_AND_REVIEW_FAILED = "Missing simulation";
|
|
1964
1959
|
})(ft || (ft = {}));
|
|
1965
|
-
class
|
|
1960
|
+
class ts extends we {
|
|
1966
1961
|
constructor(o) {
|
|
1967
1962
|
super(o, ft), this.name = "EstimateError";
|
|
1968
1963
|
}
|
|
1969
1964
|
}
|
|
1970
|
-
const
|
|
1965
|
+
const rs = e.object({
|
|
1971
1966
|
type: e.enum(["DECLARE", "DEPLOY", "DEPLOY_ACCOUNT", "INVOKE"]).default("INVOKE"),
|
|
1972
|
-
calls: e.array(
|
|
1967
|
+
calls: e.array(Nt).or(Nt).optional(),
|
|
1973
1968
|
calldata: e.array(e.string()).optional(),
|
|
1974
1969
|
classHash: Me.optional(),
|
|
1975
1970
|
salt: Me.optional(),
|
|
@@ -2176,17 +2171,17 @@ const Zi = e.object({
|
|
|
2176
2171
|
reviewOfTransaction: rr,
|
|
2177
2172
|
simulation: e.undefined(),
|
|
2178
2173
|
simulationError: la
|
|
2179
|
-
}), sr = ar.or(ir),
|
|
2174
|
+
}), sr = ar.or(ir), ns = e.object({
|
|
2180
2175
|
transactions: e.array(sr)
|
|
2181
|
-
}),
|
|
2176
|
+
}), as = e.object({
|
|
2182
2177
|
transactions: e.array(sr),
|
|
2183
2178
|
enrichedFeeEstimation: Yn.optional(),
|
|
2184
2179
|
isBackendDown: e.boolean().default(!1).optional()
|
|
2185
2180
|
});
|
|
2186
|
-
function
|
|
2181
|
+
function is(t) {
|
|
2187
2182
|
return ar.safeParse(t).success;
|
|
2188
2183
|
}
|
|
2189
|
-
function
|
|
2184
|
+
function ss(t) {
|
|
2190
2185
|
return ir.safeParse(t).success;
|
|
2191
2186
|
}
|
|
2192
2187
|
const or = e.object({
|
|
@@ -2241,11 +2236,19 @@ const or = e.object({
|
|
|
2241
2236
|
name: e.string(),
|
|
2242
2237
|
parameters: e.array(e.unknown()).optional()
|
|
2243
2238
|
}), da = e.object({
|
|
2239
|
+
guid: e.string().optional(),
|
|
2240
|
+
signerType: e.string().optional(),
|
|
2241
|
+
// StarknetKey, Secp256k1, Secp256r1, Eip191, Webauthn
|
|
2242
|
+
signer: e.object({
|
|
2243
|
+
publicKey: e.string().optional()
|
|
2244
|
+
}).optional()
|
|
2245
|
+
}), ga = e.object({
|
|
2244
2246
|
activeAt: e.string().optional(),
|
|
2247
|
+
newGuardian: e.string().optional(),
|
|
2245
2248
|
newImplementation: e.string().optional(),
|
|
2246
2249
|
newVersion: e.string().optional(),
|
|
2247
2250
|
signerGuid: e.string().optional(),
|
|
2248
|
-
signers: e.
|
|
2251
|
+
signers: e.array(da).optional()
|
|
2249
2252
|
}), Ct = e.discriminatedUnion("type", [
|
|
2250
2253
|
e.object({
|
|
2251
2254
|
type: e.literal("deploy"),
|
|
@@ -2273,7 +2276,7 @@ const or = e.object({
|
|
|
2273
2276
|
e.object({
|
|
2274
2277
|
type: e.literal("security"),
|
|
2275
2278
|
action: cr,
|
|
2276
|
-
context:
|
|
2279
|
+
context: ga.optional()
|
|
2277
2280
|
}),
|
|
2278
2281
|
e.object({
|
|
2279
2282
|
type: e.literal("dappInteraction"),
|
|
@@ -2281,7 +2284,7 @@ const or = e.object({
|
|
|
2281
2284
|
function: ma.optional().nullable()
|
|
2282
2285
|
// This object is often null. It happens when we were unable to get the ABI or failed decoding the function call
|
|
2283
2286
|
})
|
|
2284
|
-
]),
|
|
2287
|
+
]), Ea = e.union([
|
|
2285
2288
|
Ct,
|
|
2286
2289
|
e.object({
|
|
2287
2290
|
type: e.literal("multicall"),
|
|
@@ -2289,7 +2292,7 @@ const or = e.object({
|
|
|
2289
2292
|
details: Ct
|
|
2290
2293
|
}))
|
|
2291
2294
|
})
|
|
2292
|
-
]),
|
|
2295
|
+
]), Ia = e.object({
|
|
2293
2296
|
dappId: e.string(),
|
|
2294
2297
|
name: e.string().optional().nullable()
|
|
2295
2298
|
}), lr = e.object({
|
|
@@ -2315,7 +2318,7 @@ const or = e.object({
|
|
|
2315
2318
|
}).optional().nullable()
|
|
2316
2319
|
})
|
|
2317
2320
|
])
|
|
2318
|
-
}),
|
|
2321
|
+
}), Aa = e.object({
|
|
2319
2322
|
type: e.string(),
|
|
2320
2323
|
// "gas" for example
|
|
2321
2324
|
to: H,
|
|
@@ -2342,25 +2345,25 @@ const or = e.object({
|
|
|
2342
2345
|
transaction: or,
|
|
2343
2346
|
transfers: e.array(ua),
|
|
2344
2347
|
// to be clarified
|
|
2345
|
-
fees: e.array(
|
|
2348
|
+
fees: e.array(Aa).optional(),
|
|
2346
2349
|
relatedAddresses: e.array(fa).nullable(),
|
|
2347
2350
|
network: e.string(),
|
|
2348
2351
|
networkDetails: pa.optional(),
|
|
2349
|
-
details:
|
|
2352
|
+
details: Ea,
|
|
2350
2353
|
transferSummary: e.array(lr).optional(),
|
|
2351
|
-
dapp:
|
|
2354
|
+
dapp: Ia.optional(),
|
|
2352
2355
|
actions: e.array(Qt).optional(),
|
|
2353
2356
|
title: e.string().optional(),
|
|
2354
2357
|
multisigDetails: e.object({
|
|
2355
2358
|
signers: e.array(H)
|
|
2356
2359
|
}).optional()
|
|
2357
|
-
}),
|
|
2360
|
+
}), Sa = e.object({
|
|
2358
2361
|
title: e.string().optional(),
|
|
2359
2362
|
shortTitle: e.string().optional(),
|
|
2360
2363
|
subtitle: e.string().optional(),
|
|
2361
2364
|
/** let's not import the keys from x-ui here */
|
|
2362
2365
|
icon: e.string().optional()
|
|
2363
|
-
}),
|
|
2366
|
+
}), ba = "native", Na = "rejected", Ta = "cancelled", ya = "queued", os = fr.pick({
|
|
2364
2367
|
status: !0,
|
|
2365
2368
|
actions: !0,
|
|
2366
2369
|
submitted: !0,
|
|
@@ -2372,36 +2375,36 @@ const or = e.object({
|
|
|
2372
2375
|
status: e.union([
|
|
2373
2376
|
ur,
|
|
2374
2377
|
e.enum([
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
+
Na,
|
|
2379
|
+
Ta,
|
|
2380
|
+
ya
|
|
2378
2381
|
])
|
|
2379
2382
|
]),
|
|
2380
|
-
type: e.literal(
|
|
2383
|
+
type: e.literal(ba),
|
|
2381
2384
|
transaction: or.pick({
|
|
2382
2385
|
hash: !0
|
|
2383
2386
|
}),
|
|
2384
2387
|
dapp: tr.optional(),
|
|
2385
|
-
meta:
|
|
2386
|
-
}),
|
|
2387
|
-
activities:
|
|
2388
|
+
meta: Sa.optional()
|
|
2389
|
+
}), Ra = e.array(fr), cs = e.object({
|
|
2390
|
+
activities: Ra,
|
|
2388
2391
|
page: e.number(),
|
|
2389
2392
|
pageSize: e.number(),
|
|
2390
2393
|
totalElements: e.number(),
|
|
2391
2394
|
totalPages: e.number()
|
|
2392
2395
|
});
|
|
2393
|
-
function
|
|
2396
|
+
function ls(t) {
|
|
2394
2397
|
return cr.safeParse(t).success;
|
|
2395
2398
|
}
|
|
2396
|
-
const pr = (t) => lr.safeParse(t).success,
|
|
2397
|
-
Transfer:
|
|
2399
|
+
const pr = (t) => lr.safeParse(t).success, us = (t) => pr(t) && t.asset.type === "token", fs = (t) => pr(t) && t.asset.type === "nft", Dt = {
|
|
2400
|
+
Transfer: St.getSelectorFromName("Transfer"),
|
|
2398
2401
|
// 0x99cd8bde557814842a3121e8ddfd433a539b8c9f14bf31ebf108d12e6196e9
|
|
2399
|
-
Approval:
|
|
2402
|
+
Approval: St.getSelectorFromName("Approval")
|
|
2400
2403
|
// 0x134692b230b9e1ffa39098904722134159652b09c5bc41d88d6698779d228ff
|
|
2401
|
-
},
|
|
2404
|
+
}, va = (t, o, E) => {
|
|
2402
2405
|
for (const T of t) {
|
|
2403
|
-
const { events:
|
|
2404
|
-
for (const w of
|
|
2406
|
+
const { events: S, internal_calls: D } = T;
|
|
2407
|
+
for (const w of S)
|
|
2405
2408
|
for (const k of w.keys)
|
|
2406
2409
|
k === Dt.Approval && o.push({
|
|
2407
2410
|
tokenAddress: K.parse(T.contract_address),
|
|
@@ -2414,13 +2417,13 @@ const pr = (t) => lr.safeParse(t).success, is = (t) => pr(t) && t.asset.type ===
|
|
|
2414
2417
|
to: w.data[1],
|
|
2415
2418
|
value: Qe.uint256ToBN({ low: w.data[2], high: w.data[3] }).toString()
|
|
2416
2419
|
});
|
|
2417
|
-
D &&
|
|
2420
|
+
D && va(D, o, E);
|
|
2418
2421
|
}
|
|
2419
2422
|
return { approvals: o, transfers: E };
|
|
2420
|
-
},
|
|
2423
|
+
}, Oa = /(0x[a-fA-F0-9]+)\s*\('(.*?)'\)/, ps = (t) => {
|
|
2421
2424
|
if (!Ur(t))
|
|
2422
2425
|
return;
|
|
2423
|
-
const o = t.match(
|
|
2426
|
+
const o = t.match(Oa);
|
|
2424
2427
|
if (o && !Fr(o[2]))
|
|
2425
2428
|
return o[2];
|
|
2426
2429
|
};
|
|
@@ -2428,226 +2431,235 @@ var pt;
|
|
|
2428
2431
|
(function(t) {
|
|
2429
2432
|
t.SIMULATE_AND_REVIEW_FAILED = "Something went wrong fetching review", t.NO_CALLS_FOUND = "No calls found", t.ONCHAIN_FEE_ESTIMATION_FAILED = "Failed to estimate fees onchain";
|
|
2430
2433
|
})(pt || (pt = {}));
|
|
2431
|
-
class
|
|
2434
|
+
class hs extends we {
|
|
2432
2435
|
constructor(o) {
|
|
2433
2436
|
super(o, pt), this.name = "ReviewError";
|
|
2434
2437
|
}
|
|
2435
2438
|
}
|
|
2436
|
-
const
|
|
2439
|
+
const ms = e.object({
|
|
2437
2440
|
reason: e.string(),
|
|
2438
2441
|
severity: e.string().optional(),
|
|
2439
2442
|
title: e.string(),
|
|
2440
2443
|
description: e.string().optional()
|
|
2441
|
-
}),
|
|
2442
|
-
const o =
|
|
2443
|
-
return
|
|
2444
|
-
}).transform((t) =>
|
|
2445
|
-
function
|
|
2444
|
+
}), wa = Object.values(xe.TRANSACTION_VERSION), ds = e.string().default("0x3").refine((t) => {
|
|
2445
|
+
const o = Ne.toBigInt(t);
|
|
2446
|
+
return wa.map((E) => Ne.toBigInt(E)).includes(o);
|
|
2447
|
+
}).transform((t) => Ne.toHex(t));
|
|
2448
|
+
function gs(t) {
|
|
2446
2449
|
if (t === xe.TRANSACTION_VERSION.V3 || t === xe.TRANSACTION_VERSION.F3)
|
|
2447
2450
|
throw Error("Only txv1 is supported");
|
|
2448
2451
|
}
|
|
2449
2452
|
export {
|
|
2450
|
-
|
|
2453
|
+
Ba as $,
|
|
2451
2454
|
ke as A,
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2455
|
+
yi as B,
|
|
2456
|
+
ai as C,
|
|
2457
|
+
Fi as D,
|
|
2458
|
+
ki as E,
|
|
2459
|
+
Gi as F,
|
|
2460
|
+
Ya as G,
|
|
2458
2461
|
dt as H,
|
|
2459
|
-
|
|
2460
|
-
|
|
2462
|
+
Ka as I,
|
|
2463
|
+
di as J,
|
|
2461
2464
|
sa as K,
|
|
2462
|
-
|
|
2465
|
+
ts as L,
|
|
2463
2466
|
Tt as M,
|
|
2464
|
-
|
|
2467
|
+
ii as N,
|
|
2465
2468
|
Wn as O,
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2469
|
+
ns as P,
|
|
2470
|
+
ss as Q,
|
|
2471
|
+
hs as R,
|
|
2472
|
+
ti as S,
|
|
2473
|
+
ji as T,
|
|
2471
2474
|
jt as U,
|
|
2472
2475
|
$r as V,
|
|
2473
2476
|
Ve as W,
|
|
2474
2477
|
Xr as X,
|
|
2475
2478
|
Hr as Y,
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2479
|
+
Fa as Z,
|
|
2480
|
+
xa as _,
|
|
2481
|
+
bt as a,
|
|
2482
|
+
Qi as a$,
|
|
2483
|
+
Ma as a0,
|
|
2484
|
+
Ga as a1,
|
|
2485
|
+
Va as a2,
|
|
2483
2486
|
mt as a3,
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
+
Xa as a4,
|
|
2488
|
+
Ha as a5,
|
|
2489
|
+
qa as a6,
|
|
2487
2490
|
za as a7,
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
+
Wa as a8,
|
|
2492
|
+
$a as a9,
|
|
2493
|
+
Vi as aA,
|
|
2491
2494
|
Yt as aB,
|
|
2492
|
-
|
|
2493
|
-
|
|
2495
|
+
zi as aC,
|
|
2496
|
+
Wi as aD,
|
|
2494
2497
|
Zt as aE,
|
|
2495
|
-
|
|
2498
|
+
Ki as aF,
|
|
2496
2499
|
xn as aG,
|
|
2497
2500
|
Bn as aH,
|
|
2498
2501
|
Mn as aI,
|
|
2499
2502
|
Gn as aJ,
|
|
2500
|
-
|
|
2503
|
+
Yi as aK,
|
|
2501
2504
|
$t as aL,
|
|
2502
2505
|
Vn as aM,
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2506
|
+
Zi as aN,
|
|
2507
|
+
He as aO,
|
|
2508
|
+
$i as aP,
|
|
2509
|
+
Wt as aQ,
|
|
2510
|
+
Un as aR,
|
|
2511
|
+
Fn as aS,
|
|
2512
|
+
Et as aT,
|
|
2513
|
+
Xi as aU,
|
|
2514
|
+
Hi as aV,
|
|
2515
|
+
qi as aW,
|
|
2516
|
+
$n as aX,
|
|
2517
|
+
Xn as aY,
|
|
2518
|
+
Ji as aZ,
|
|
2519
|
+
Hn as a_,
|
|
2517
2520
|
Zr as aa,
|
|
2518
2521
|
Xe as ab,
|
|
2519
2522
|
Qr as ac,
|
|
2520
2523
|
et as ad,
|
|
2521
2524
|
rn as ae,
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2525
|
+
Za as af,
|
|
2526
|
+
Ja as ag,
|
|
2527
|
+
Qa as ah,
|
|
2528
|
+
ei as ai,
|
|
2529
|
+
ri as aj,
|
|
2527
2530
|
tn as ak,
|
|
2528
2531
|
tt as al,
|
|
2529
2532
|
we as am,
|
|
2530
2533
|
ut as an,
|
|
2531
2534
|
Pe as ao,
|
|
2532
2535
|
Xt as ap,
|
|
2533
|
-
|
|
2536
|
+
xi as aq,
|
|
2534
2537
|
vt as ar,
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2538
|
+
qt as as,
|
|
2539
|
+
Bi as at,
|
|
2540
|
+
zt as au,
|
|
2541
|
+
Mi as av,
|
|
2539
2542
|
Dn as aw,
|
|
2540
2543
|
Pn as ax,
|
|
2541
2544
|
jn as ay,
|
|
2542
2545
|
kn as az,
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2546
|
+
zr as b,
|
|
2547
|
+
pr as b$,
|
|
2548
|
+
Jt as b0,
|
|
2549
|
+
es as b1,
|
|
2550
|
+
ft as b2,
|
|
2551
|
+
rs as b3,
|
|
2552
|
+
Dt as b4,
|
|
2553
|
+
va as b5,
|
|
2554
|
+
ps as b6,
|
|
2555
|
+
ms as b7,
|
|
2556
|
+
ds as b8,
|
|
2557
|
+
gs as b9,
|
|
2558
|
+
Oi as bA,
|
|
2559
|
+
En as bB,
|
|
2560
|
+
ct as bC,
|
|
2561
|
+
In as bD,
|
|
2562
|
+
An as bE,
|
|
2563
|
+
lt as bF,
|
|
2564
|
+
Sn as bG,
|
|
2565
|
+
bn as bH,
|
|
2566
|
+
Nn as bI,
|
|
2567
|
+
Tn as bJ,
|
|
2568
|
+
xt as bK,
|
|
2569
|
+
yn as bL,
|
|
2570
|
+
Bt as bM,
|
|
2571
|
+
Rn as bN,
|
|
2572
|
+
Ze as bO,
|
|
2573
|
+
vn as bP,
|
|
2574
|
+
On as bQ,
|
|
2575
|
+
wn as bR,
|
|
2576
|
+
_n as bS,
|
|
2577
|
+
wi as bT,
|
|
2578
|
+
_i as bU,
|
|
2579
|
+
Gt as bV,
|
|
2580
|
+
Li as bW,
|
|
2581
|
+
Ci as bX,
|
|
2582
|
+
Vt as bY,
|
|
2583
|
+
Di as bZ,
|
|
2584
|
+
Pi as b_,
|
|
2585
|
+
Ti as ba,
|
|
2586
|
+
pn as bb,
|
|
2587
|
+
Ri as bc,
|
|
2588
|
+
vi as bd,
|
|
2589
|
+
De as be,
|
|
2590
|
+
sn as bf,
|
|
2591
|
+
on as bg,
|
|
2592
|
+
cn as bh,
|
|
2593
|
+
Be as bi,
|
|
2594
|
+
ln as bj,
|
|
2595
|
+
gt as bk,
|
|
2596
|
+
un as bl,
|
|
2597
|
+
fn as bm,
|
|
2598
|
+
he as bn,
|
|
2599
|
+
si as bo,
|
|
2600
|
+
oi as bp,
|
|
2601
|
+
ci as bq,
|
|
2602
|
+
li as br,
|
|
2603
|
+
ui as bs,
|
|
2604
|
+
fi as bt,
|
|
2605
|
+
pi as bu,
|
|
2606
|
+
hi as bv,
|
|
2607
|
+
mi as bw,
|
|
2608
|
+
Ut as bx,
|
|
2609
|
+
Ye as by,
|
|
2610
|
+
Ft as bz,
|
|
2611
|
+
Nt as c,
|
|
2612
|
+
lr as c0,
|
|
2610
2613
|
ba as c1,
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2614
|
+
os as c2,
|
|
2615
|
+
ua as c3,
|
|
2616
|
+
Ea as c4,
|
|
2617
|
+
Ia as c5,
|
|
2618
|
+
Aa as c6,
|
|
2619
|
+
fr as c7,
|
|
2620
|
+
Sa as c8,
|
|
2621
|
+
Na as c9,
|
|
2622
|
+
Ta as ca,
|
|
2623
|
+
ya as cb,
|
|
2624
|
+
Ra as cc,
|
|
2625
|
+
cs as cd,
|
|
2626
|
+
ls as ce,
|
|
2627
|
+
us as cf,
|
|
2628
|
+
fs as cg,
|
|
2629
|
+
wt as ch,
|
|
2630
|
+
Yn as ci,
|
|
2631
|
+
_t as cj,
|
|
2632
|
+
Qt as ck,
|
|
2633
|
+
ea as cl,
|
|
2634
|
+
ta as cm,
|
|
2635
|
+
er as cn,
|
|
2636
|
+
ra as co,
|
|
2637
|
+
tr as cp,
|
|
2638
|
+
as as cq,
|
|
2639
|
+
is as cr,
|
|
2640
|
+
Zn as cs,
|
|
2641
|
+
Jn as ct,
|
|
2642
|
+
qr as d,
|
|
2631
2643
|
en as e,
|
|
2632
2644
|
Jr as f,
|
|
2633
|
-
|
|
2645
|
+
ni as g,
|
|
2634
2646
|
Kr as h,
|
|
2635
2647
|
Yr as i,
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2648
|
+
gi as j,
|
|
2649
|
+
Si as k,
|
|
2650
|
+
Ai as l,
|
|
2651
|
+
Ei as m,
|
|
2640
2652
|
$e as n,
|
|
2641
|
-
|
|
2653
|
+
Ii as o,
|
|
2642
2654
|
Vr as p,
|
|
2643
2655
|
H as q,
|
|
2644
2656
|
ht as r,
|
|
2645
|
-
|
|
2657
|
+
bi as s,
|
|
2646
2658
|
K as t,
|
|
2647
2659
|
an as u,
|
|
2648
|
-
|
|
2660
|
+
Ni as v,
|
|
2649
2661
|
Me as w,
|
|
2650
2662
|
Ln as x,
|
|
2651
2663
|
mn as y,
|
|
2652
|
-
|
|
2664
|
+
Ui as z
|
|
2653
2665
|
};
|