zigap-utils 3.1.0-preview.6 → 3.1.0-preview.8
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/hooks/useDeeplinkResume.d.ts +2 -1
- package/dist/index.es.js +788 -788
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var H1 = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var un = (e, t, r) =>
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
2
|
+
var D1 = (e, t, r) => t in e ? H1(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var un = (e, t, r) => D1(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
+
import * as F1 from "react";
|
|
5
|
+
import Ie, { useRef as hr, useEffect as tr, useState as Te, useCallback as Yi } from "react";
|
|
6
6
|
import lr from "styled-components";
|
|
7
7
|
var Zr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
8
8
|
function di(e) {
|
|
@@ -25,7 +25,7 @@ function nf(e) {
|
|
|
25
25
|
}), r;
|
|
26
26
|
}
|
|
27
27
|
var hc, Uo = { exports: {} }, bi = {}, ns = {};
|
|
28
|
-
const Z1 = nf(
|
|
28
|
+
const Z1 = nf(F1);
|
|
29
29
|
/**
|
|
30
30
|
* @license React
|
|
31
31
|
* react-jsx-runtime.development.js
|
|
@@ -98,8 +98,8 @@ process.env.NODE_ENV === "production" ? Uo.exports = function() {
|
|
|
98
98
|
j = !0;
|
|
99
99
|
}
|
|
100
100
|
if (j) {
|
|
101
|
-
var
|
|
102
|
-
return
|
|
101
|
+
var F = (j = console).error, $ = typeof Symbol == "function" && Symbol.toStringTag && R[Symbol.toStringTag] || R.constructor.name || "Object";
|
|
102
|
+
return F.call(j, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", $), t(R);
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
function n(R) {
|
|
@@ -119,7 +119,7 @@ process.env.NODE_ENV === "production" ? Uo.exports = function() {
|
|
|
119
119
|
var R = e(this.type);
|
|
120
120
|
return l[R] || (l[R] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")), (R = this.props.ref) !== void 0 ? R : null;
|
|
121
121
|
}
|
|
122
|
-
function a(R, j,
|
|
122
|
+
function a(R, j, F, $, V, D, U, G) {
|
|
123
123
|
var Nt, dt = j.children;
|
|
124
124
|
if (dt !== void 0) if ($) if (y(dt)) {
|
|
125
125
|
for ($ = 0; $ < dt.length; $++) o(dt[$]);
|
|
@@ -138,22 +138,22 @@ React keys must be passed directly to JSX without using spread:
|
|
|
138
138
|
let props = %s;
|
|
139
139
|
<%s key={someKey} {...props} />`, $, dt, gt, dt), O[dt + $] = !0);
|
|
140
140
|
}
|
|
141
|
-
if (dt = null,
|
|
141
|
+
if (dt = null, F !== void 0 && (r(F), dt = "" + F), function(mt) {
|
|
142
142
|
if (h.call(mt, "key")) {
|
|
143
143
|
var Mt = Object.getOwnPropertyDescriptor(mt, "key").get;
|
|
144
144
|
if (Mt && Mt.isReactWarning) return !1;
|
|
145
145
|
}
|
|
146
146
|
return mt.key !== void 0;
|
|
147
|
-
}(j) && (r(j.key), dt = "" + j.key), "key" in j) for (var
|
|
148
|
-
else
|
|
147
|
+
}(j) && (r(j.key), dt = "" + j.key), "key" in j) for (var Ft in F = {}, j) Ft !== "key" && (F[Ft] = j[Ft]);
|
|
148
|
+
else F = j;
|
|
149
149
|
return dt && function(mt, Mt) {
|
|
150
150
|
function Zt() {
|
|
151
151
|
c || (c = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", Mt));
|
|
152
152
|
}
|
|
153
153
|
Zt.isReactWarning = !0, Object.defineProperty(mt, "key", { get: Zt, configurable: !0 });
|
|
154
|
-
}(
|
|
154
|
+
}(F, typeof R == "function" ? R.displayName || R.name || "Unknown" : R), function(mt, Mt, Zt, jt, oe, Qe, Yt, ee) {
|
|
155
155
|
return Zt = Qe.ref, mt = { $$typeof: u, type: mt, key: Mt, props: Qe, _owner: oe }, (Zt !== void 0 ? Zt : null) !== null ? Object.defineProperty(mt, "ref", { enumerable: !1, get: s }) : Object.defineProperty(mt, "ref", { enumerable: !1, value: null }), mt._store = {}, Object.defineProperty(mt._store, "validated", { configurable: !1, enumerable: !1, writable: !0, value: 0 }), Object.defineProperty(mt, "_debugInfo", { configurable: !1, enumerable: !1, writable: !0, value: null }), Object.defineProperty(mt, "_debugStack", { configurable: !1, enumerable: !1, writable: !0, value: Yt }), Object.defineProperty(mt, "_debugTask", { configurable: !1, enumerable: !1, writable: !0, value: ee }), Object.freeze && (Object.freeze(mt.props), Object.freeze(mt)), mt;
|
|
156
|
-
}(R, dt,
|
|
156
|
+
}(R, dt, D, 0, (Nt = d.A) === null ? null : Nt.getOwner(), F, U, G);
|
|
157
157
|
}
|
|
158
158
|
function o(R) {
|
|
159
159
|
typeof R == "object" && R !== null && R.$$typeof === u && R._store && (R._store.validated = 1);
|
|
@@ -163,12 +163,12 @@ React keys must be passed directly to JSX without using spread:
|
|
|
163
163
|
}, l = {}, g = (f = { "react-stack-bottom-frame": function(R) {
|
|
164
164
|
return R();
|
|
165
165
|
} })["react-stack-bottom-frame"].bind(f, i)(), x = m(n(i)), O = {};
|
|
166
|
-
ns.Fragment = w, ns.jsx = function(R, j,
|
|
167
|
-
var
|
|
168
|
-
return a(R, j,
|
|
169
|
-
}, ns.jsxs = function(R, j,
|
|
170
|
-
var
|
|
171
|
-
return a(R, j,
|
|
166
|
+
ns.Fragment = w, ns.jsx = function(R, j, F, $, V) {
|
|
167
|
+
var D = 1e4 > d.recentlyCreatedOwnerStacks++;
|
|
168
|
+
return a(R, j, F, !1, 0, V, D ? Error("react-stack-top-frame") : g, D ? m(n(R)) : x);
|
|
169
|
+
}, ns.jsxs = function(R, j, F, $, V) {
|
|
170
|
+
var D = 1e4 > d.recentlyCreatedOwnerStacks++;
|
|
171
|
+
return a(R, j, F, !0, 0, V, D ? Error("react-stack-top-frame") : g, D ? m(n(R)) : x);
|
|
172
172
|
};
|
|
173
173
|
}()), ns);
|
|
174
174
|
var Ct = Uo.exports, sf = { exports: {} };
|
|
@@ -184,8 +184,8 @@ sf.exports = function() {
|
|
|
184
184
|
return (g <= 0 ? "+" : "-") + k(O, 2, "0") + ":" + k(R, 2, "0");
|
|
185
185
|
}, m: function l(g, x) {
|
|
186
186
|
if (g.date() < x.date()) return -l(x, g);
|
|
187
|
-
var O = 12 * (x.year() - g.year()) + (x.month() - g.month()), R = g.clone().add(O, f), j = x - R < 0,
|
|
188
|
-
return +(-(O + (x - R) / (j ? R -
|
|
187
|
+
var O = 12 * (x.year() - g.year()) + (x.month() - g.month()), R = g.clone().add(O, f), j = x - R < 0, F = g.clone().add(O + (j ? -1 : 1), f);
|
|
188
|
+
return +(-(O + (x - R) / (j ? R - F : F - R)) || 0);
|
|
189
189
|
}, a: function(l) {
|
|
190
190
|
return l < 0 ? Math.ceil(l) || 0 : Math.floor(l);
|
|
191
191
|
}, p: function(l) {
|
|
@@ -202,8 +202,8 @@ sf.exports = function() {
|
|
|
202
202
|
if (typeof g == "string") {
|
|
203
203
|
var j = g.toLowerCase();
|
|
204
204
|
I[j] && (R = j), x && (I[j] = x, R = j);
|
|
205
|
-
var
|
|
206
|
-
if (!R &&
|
|
205
|
+
var F = g.split("-");
|
|
206
|
+
if (!R && F.length > 1) return l(F[0]);
|
|
207
207
|
} else {
|
|
208
208
|
var $ = g.name;
|
|
209
209
|
I[$] = g, R = $;
|
|
@@ -229,10 +229,10 @@ sf.exports = function() {
|
|
|
229
229
|
if (h.u(R)) return /* @__PURE__ */ new Date();
|
|
230
230
|
if (R instanceof Date) return new Date(R);
|
|
231
231
|
if (typeof R == "string" && !/Z$/i.test(R)) {
|
|
232
|
-
var
|
|
233
|
-
if (
|
|
234
|
-
var $ =
|
|
235
|
-
return j ? new Date(Date.UTC(
|
|
232
|
+
var F = R.match(S);
|
|
233
|
+
if (F) {
|
|
234
|
+
var $ = F[2] - 1 || 0, V = (F[7] || "0").substring(0, 3);
|
|
235
|
+
return j ? new Date(Date.UTC(F[1], $, F[3] || 1, F[4] || 0, F[5] || 0, F[6] || 0, V)) : new Date(F[1], $, F[3] || 1, F[4] || 0, F[5] || 0, F[6] || 0, V);
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
return new Date(R);
|
|
@@ -258,20 +258,20 @@ sf.exports = function() {
|
|
|
258
258
|
}, g.valueOf = function() {
|
|
259
259
|
return this.$d.getTime();
|
|
260
260
|
}, g.startOf = function(x, O) {
|
|
261
|
-
var R = this, j = !!h.u(O) || O,
|
|
262
|
-
var Mt = h.w(R.$u ? Date.UTC(R.$y, mt,
|
|
261
|
+
var R = this, j = !!h.u(O) || O, F = h.p(x), $ = function(Ft, mt) {
|
|
262
|
+
var Mt = h.w(R.$u ? Date.UTC(R.$y, mt, Ft) : new Date(R.$y, mt, Ft), R);
|
|
263
263
|
return j ? Mt : Mt.endOf(o);
|
|
264
|
-
}, V = function(
|
|
265
|
-
return h.w(R.toDate()[
|
|
266
|
-
},
|
|
267
|
-
switch (
|
|
264
|
+
}, V = function(Ft, mt) {
|
|
265
|
+
return h.w(R.toDate()[Ft].apply(R.toDate("s"), (j ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(mt)), R);
|
|
266
|
+
}, D = this.$W, U = this.$M, G = this.$D, Nt = "set" + (this.$u ? "UTC" : "");
|
|
267
|
+
switch (F) {
|
|
268
268
|
case p:
|
|
269
269
|
return j ? $(1, 0) : $(31, 11);
|
|
270
270
|
case f:
|
|
271
271
|
return j ? $(1, U) : $(0, U + 1);
|
|
272
272
|
case c:
|
|
273
|
-
var dt = this.$locale().weekStart || 0, gt = (
|
|
274
|
-
return $(j ?
|
|
273
|
+
var dt = this.$locale().weekStart || 0, gt = (D < dt ? D + 7 : D) - dt;
|
|
274
|
+
return $(j ? G - gt : G + (6 - gt), U);
|
|
275
275
|
case o:
|
|
276
276
|
case w:
|
|
277
277
|
return V(Nt + "Hours", 0);
|
|
@@ -287,10 +287,10 @@ sf.exports = function() {
|
|
|
287
287
|
}, g.endOf = function(x) {
|
|
288
288
|
return this.startOf(x, !1);
|
|
289
289
|
}, g.$set = function(x, O) {
|
|
290
|
-
var R, j = h.p(x),
|
|
290
|
+
var R, j = h.p(x), F = "set" + (this.$u ? "UTC" : ""), $ = (R = {}, R[o] = F + "Date", R[w] = F + "Date", R[f] = F + "Month", R[p] = F + "FullYear", R[a] = F + "Hours", R[s] = F + "Minutes", R[i] = F + "Seconds", R[n] = F + "Milliseconds", R)[j], V = j === o ? this.$D + (O - this.$W) : O;
|
|
291
291
|
if (j === f || j === p) {
|
|
292
|
-
var
|
|
293
|
-
|
|
292
|
+
var D = this.clone().set(w, 1);
|
|
293
|
+
D.$d[$](V), D.init(), this.$d = D.set(w, Math.min(this.$D, D.daysInMonth())).$d;
|
|
294
294
|
} else $ && this.$d[$](V);
|
|
295
295
|
return this.init(), this;
|
|
296
296
|
}, g.set = function(x, O) {
|
|
@@ -300,26 +300,26 @@ sf.exports = function() {
|
|
|
300
300
|
}, g.add = function(x, O) {
|
|
301
301
|
var R, j = this;
|
|
302
302
|
x = Number(x);
|
|
303
|
-
var
|
|
304
|
-
var
|
|
305
|
-
return h.w(
|
|
303
|
+
var F = h.p(O), $ = function(U) {
|
|
304
|
+
var G = d(j);
|
|
305
|
+
return h.w(G.date(G.date() + Math.round(U * x)), j);
|
|
306
306
|
};
|
|
307
|
-
if (
|
|
308
|
-
if (
|
|
309
|
-
if (
|
|
310
|
-
if (
|
|
311
|
-
var V = (R = {}, R[s] = t, R[a] = r, R[i] = e, R)[
|
|
312
|
-
return h.w(
|
|
307
|
+
if (F === f) return this.set(f, this.$M + x);
|
|
308
|
+
if (F === p) return this.set(p, this.$y + x);
|
|
309
|
+
if (F === o) return $(1);
|
|
310
|
+
if (F === c) return $(7);
|
|
311
|
+
var V = (R = {}, R[s] = t, R[a] = r, R[i] = e, R)[F] || 1, D = this.$d.getTime() + x * V;
|
|
312
|
+
return h.w(D, this);
|
|
313
313
|
}, g.subtract = function(x, O) {
|
|
314
314
|
return this.add(-1 * x, O);
|
|
315
315
|
}, g.format = function(x) {
|
|
316
316
|
var O = this, R = this.$locale();
|
|
317
317
|
if (!this.isValid()) return R.invalidDate || v;
|
|
318
|
-
var j = x || "YYYY-MM-DDTHH:mm:ssZ",
|
|
318
|
+
var j = x || "YYYY-MM-DDTHH:mm:ssZ", F = h.z(this), $ = this.$H, V = this.$m, D = this.$M, U = R.weekdays, G = R.months, Nt = R.meridiem, dt = function(mt, Mt, Zt, jt) {
|
|
319
319
|
return mt && (mt[Mt] || mt(O, j)) || Zt[Mt].slice(0, jt);
|
|
320
320
|
}, gt = function(mt) {
|
|
321
321
|
return h.s($ % 12 || 12, mt, "0");
|
|
322
|
-
},
|
|
322
|
+
}, Ft = Nt || function(mt, Mt, Zt) {
|
|
323
323
|
var jt = mt < 12 ? "AM" : "PM";
|
|
324
324
|
return Zt ? jt.toLowerCase() : jt;
|
|
325
325
|
};
|
|
@@ -331,13 +331,13 @@ sf.exports = function() {
|
|
|
331
331
|
case "YYYY":
|
|
332
332
|
return h.s(O.$y, 4, "0");
|
|
333
333
|
case "M":
|
|
334
|
-
return
|
|
334
|
+
return D + 1;
|
|
335
335
|
case "MM":
|
|
336
|
-
return h.s(
|
|
336
|
+
return h.s(D + 1, 2, "0");
|
|
337
337
|
case "MMM":
|
|
338
|
-
return dt(R.monthsShort,
|
|
338
|
+
return dt(R.monthsShort, D, G, 3);
|
|
339
339
|
case "MMMM":
|
|
340
|
-
return dt(
|
|
340
|
+
return dt(G, D);
|
|
341
341
|
case "D":
|
|
342
342
|
return O.$D;
|
|
343
343
|
case "DD":
|
|
@@ -359,9 +359,9 @@ sf.exports = function() {
|
|
|
359
359
|
case "hh":
|
|
360
360
|
return gt(2);
|
|
361
361
|
case "a":
|
|
362
|
-
return
|
|
362
|
+
return Ft($, V, !0);
|
|
363
363
|
case "A":
|
|
364
|
-
return
|
|
364
|
+
return Ft($, V, !1);
|
|
365
365
|
case "m":
|
|
366
366
|
return String(V);
|
|
367
367
|
case "mm":
|
|
@@ -373,32 +373,32 @@ sf.exports = function() {
|
|
|
373
373
|
case "SSS":
|
|
374
374
|
return h.s(O.$ms, 3, "0");
|
|
375
375
|
case "Z":
|
|
376
|
-
return
|
|
376
|
+
return F;
|
|
377
377
|
}
|
|
378
378
|
return null;
|
|
379
|
-
}(mt) ||
|
|
379
|
+
}(mt) || F.replace(":", "");
|
|
380
380
|
});
|
|
381
381
|
}, g.utcOffset = function() {
|
|
382
382
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
383
383
|
}, g.diff = function(x, O, R) {
|
|
384
|
-
var j,
|
|
385
|
-
return h.m(
|
|
384
|
+
var j, F = this, $ = h.p(O), V = d(x), D = (V.utcOffset() - this.utcOffset()) * t, U = this - V, G = function() {
|
|
385
|
+
return h.m(F, V);
|
|
386
386
|
};
|
|
387
387
|
switch ($) {
|
|
388
388
|
case p:
|
|
389
|
-
j =
|
|
389
|
+
j = G() / 12;
|
|
390
390
|
break;
|
|
391
391
|
case f:
|
|
392
|
-
j =
|
|
392
|
+
j = G();
|
|
393
393
|
break;
|
|
394
394
|
case u:
|
|
395
|
-
j =
|
|
395
|
+
j = G() / 3;
|
|
396
396
|
break;
|
|
397
397
|
case c:
|
|
398
|
-
j = (U -
|
|
398
|
+
j = (U - D) / 6048e5;
|
|
399
399
|
break;
|
|
400
400
|
case o:
|
|
401
|
-
j = (U -
|
|
401
|
+
j = (U - D) / 864e5;
|
|
402
402
|
break;
|
|
403
403
|
case a:
|
|
404
404
|
j = U / r;
|
|
@@ -448,16 +448,16 @@ var mn, pc, V1 = Object.defineProperty, _s = Object.getOwnPropertySymbols, of =
|
|
|
448
448
|
for (var r in t || (t = {})) of.call(t, r) && mc(e, r, t[r]);
|
|
449
449
|
if (_s) for (var r of _s(t)) af.call(t, r) && mc(e, r, t[r]);
|
|
450
450
|
return e;
|
|
451
|
-
},
|
|
451
|
+
}, Do = (e, t) => {
|
|
452
452
|
var r = {};
|
|
453
453
|
for (var n in e) of.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
|
|
454
454
|
if (e != null && _s) for (var n of _s(e)) t.indexOf(n) < 0 && af.call(e, n) && (r[n] = e[n]);
|
|
455
455
|
return r;
|
|
456
456
|
};
|
|
457
457
|
((e) => {
|
|
458
|
-
const t = class
|
|
458
|
+
const t = class Dt {
|
|
459
459
|
constructor(c, f, u, p) {
|
|
460
|
-
if (this.version = c, this.errorCorrectionLevel = f, this.modules = [], this.isFunction = [], c <
|
|
460
|
+
if (this.version = c, this.errorCorrectionLevel = f, this.modules = [], this.isFunction = [], c < Dt.MIN_VERSION || c > Dt.MAX_VERSION) throw new RangeError("Version value out of range");
|
|
461
461
|
if (p < -1 || p > 7) throw new RangeError("Mask value out of range");
|
|
462
462
|
this.size = 4 * c + 17;
|
|
463
463
|
let w = [];
|
|
@@ -477,36 +477,36 @@ var mn, pc, V1 = Object.defineProperty, _s = Object.getOwnPropertySymbols, of =
|
|
|
477
477
|
}
|
|
478
478
|
static encodeText(c, f) {
|
|
479
479
|
const u = e.QrSegment.makeSegments(c);
|
|
480
|
-
return
|
|
480
|
+
return Dt.encodeSegments(u, f);
|
|
481
481
|
}
|
|
482
482
|
static encodeBinary(c, f) {
|
|
483
483
|
const u = e.QrSegment.makeBytes(c);
|
|
484
|
-
return
|
|
484
|
+
return Dt.encodeSegments([u], f);
|
|
485
485
|
}
|
|
486
486
|
static encodeSegments(c, f, u = 1, p = 40, w = -1, v = !0) {
|
|
487
|
-
if (!(
|
|
487
|
+
if (!(Dt.MIN_VERSION <= u && u <= p && p <= Dt.MAX_VERSION) || w < -1 || w > 7) throw new RangeError("Invalid value");
|
|
488
488
|
let S, E;
|
|
489
489
|
for (S = u; ; S++) {
|
|
490
|
-
const P = 8 *
|
|
490
|
+
const P = 8 * Dt.getNumDataCodewords(S, f), I = a.getTotalBits(c, S);
|
|
491
491
|
if (I <= P) {
|
|
492
492
|
E = I;
|
|
493
493
|
break;
|
|
494
494
|
}
|
|
495
495
|
if (S >= p) throw new RangeError("Data too long");
|
|
496
496
|
}
|
|
497
|
-
for (const P of [
|
|
497
|
+
for (const P of [Dt.Ecc.MEDIUM, Dt.Ecc.QUARTILE, Dt.Ecc.HIGH]) v && E <= 8 * Dt.getNumDataCodewords(S, P) && (f = P);
|
|
498
498
|
let _ = [];
|
|
499
499
|
for (const P of c) {
|
|
500
500
|
r(P.mode.modeBits, 4, _), r(P.numChars, P.mode.numCharCountBits(S), _);
|
|
501
501
|
for (const I of P.getData()) _.push(I);
|
|
502
502
|
}
|
|
503
503
|
i(_.length == E);
|
|
504
|
-
const k = 8 *
|
|
504
|
+
const k = 8 * Dt.getNumDataCodewords(S, f);
|
|
505
505
|
i(_.length <= k), r(0, Math.min(4, k - _.length), _), r(0, (8 - _.length % 8) % 8, _), i(_.length % 8 == 0);
|
|
506
506
|
for (let P = 236; _.length < k; P ^= 253) r(P, 8, _);
|
|
507
507
|
let A = [];
|
|
508
508
|
for (; 8 * A.length < _.length; ) A.push(0);
|
|
509
|
-
return _.forEach((P, I) => A[I >>> 3] |= P << 7 - (7 & I)), new
|
|
509
|
+
return _.forEach((P, I) => A[I >>> 3] |= P << 7 - (7 & I)), new Dt(S, f, A, w);
|
|
510
510
|
}
|
|
511
511
|
getModule(c, f) {
|
|
512
512
|
return 0 <= c && c < this.size && 0 <= f && f < this.size && this.modules[f][c];
|
|
@@ -559,14 +559,14 @@ var mn, pc, V1 = Object.defineProperty, _s = Object.getOwnPropertySymbols, of =
|
|
|
559
559
|
}
|
|
560
560
|
addEccAndInterleave(c) {
|
|
561
561
|
const f = this.version, u = this.errorCorrectionLevel;
|
|
562
|
-
if (c.length !=
|
|
563
|
-
const p =
|
|
562
|
+
if (c.length != Dt.getNumDataCodewords(f, u)) throw new RangeError("Invalid argument");
|
|
563
|
+
const p = Dt.NUM_ERROR_CORRECTION_BLOCKS[u.ordinal][f], w = Dt.ECC_CODEWORDS_PER_BLOCK[u.ordinal][f], v = Math.floor(Dt.getNumRawDataModules(f) / 8), S = p - v % p, E = Math.floor(v / p);
|
|
564
564
|
let _ = [];
|
|
565
|
-
const k =
|
|
565
|
+
const k = Dt.reedSolomonComputeDivisor(w);
|
|
566
566
|
for (let P = 0, I = 0; P < p; P++) {
|
|
567
567
|
let N = c.slice(I, I + E - w + (P < S ? 0 : 1));
|
|
568
568
|
I += N.length;
|
|
569
|
-
const z =
|
|
569
|
+
const z = Dt.reedSolomonComputeRemainder(N, k);
|
|
570
570
|
P < S && N.push(0), _.push(N.concat(z));
|
|
571
571
|
}
|
|
572
572
|
let A = [];
|
|
@@ -576,7 +576,7 @@ var mn, pc, V1 = Object.defineProperty, _s = Object.getOwnPropertySymbols, of =
|
|
|
576
576
|
return i(A.length == v), A;
|
|
577
577
|
}
|
|
578
578
|
drawCodewords(c) {
|
|
579
|
-
if (c.length != Math.floor(
|
|
579
|
+
if (c.length != Math.floor(Dt.getNumRawDataModules(this.version) / 8)) throw new RangeError("Invalid argument");
|
|
580
580
|
let f = 0;
|
|
581
581
|
for (let u = this.size - 1; u >= 1; u -= 2) {
|
|
582
582
|
u == 6 && (u = 5);
|
|
@@ -626,22 +626,22 @@ var mn, pc, V1 = Object.defineProperty, _s = Object.getOwnPropertySymbols, of =
|
|
|
626
626
|
let c = 0;
|
|
627
627
|
for (let w = 0; w < this.size; w++) {
|
|
628
628
|
let v = !1, S = 0, E = [0, 0, 0, 0, 0, 0, 0];
|
|
629
|
-
for (let _ = 0; _ < this.size; _++) this.modules[w][_] == v ? (S++, S == 5 ? c +=
|
|
630
|
-
c += this.finderPenaltyTerminateAndCount(v, S, E) *
|
|
629
|
+
for (let _ = 0; _ < this.size; _++) this.modules[w][_] == v ? (S++, S == 5 ? c += Dt.PENALTY_N1 : S > 5 && c++) : (this.finderPenaltyAddHistory(S, E), v || (c += this.finderPenaltyCountPatterns(E) * Dt.PENALTY_N3), v = this.modules[w][_], S = 1);
|
|
630
|
+
c += this.finderPenaltyTerminateAndCount(v, S, E) * Dt.PENALTY_N3;
|
|
631
631
|
}
|
|
632
632
|
for (let w = 0; w < this.size; w++) {
|
|
633
633
|
let v = !1, S = 0, E = [0, 0, 0, 0, 0, 0, 0];
|
|
634
|
-
for (let _ = 0; _ < this.size; _++) this.modules[_][w] == v ? (S++, S == 5 ? c +=
|
|
635
|
-
c += this.finderPenaltyTerminateAndCount(v, S, E) *
|
|
634
|
+
for (let _ = 0; _ < this.size; _++) this.modules[_][w] == v ? (S++, S == 5 ? c += Dt.PENALTY_N1 : S > 5 && c++) : (this.finderPenaltyAddHistory(S, E), v || (c += this.finderPenaltyCountPatterns(E) * Dt.PENALTY_N3), v = this.modules[_][w], S = 1);
|
|
635
|
+
c += this.finderPenaltyTerminateAndCount(v, S, E) * Dt.PENALTY_N3;
|
|
636
636
|
}
|
|
637
637
|
for (let w = 0; w < this.size - 1; w++) for (let v = 0; v < this.size - 1; v++) {
|
|
638
638
|
const S = this.modules[w][v];
|
|
639
|
-
S == this.modules[w][v + 1] && S == this.modules[w + 1][v] && S == this.modules[w + 1][v + 1] && (c +=
|
|
639
|
+
S == this.modules[w][v + 1] && S == this.modules[w + 1][v] && S == this.modules[w + 1][v + 1] && (c += Dt.PENALTY_N2);
|
|
640
640
|
}
|
|
641
641
|
let f = 0;
|
|
642
642
|
for (const w of this.modules) f = w.reduce((v, S) => v + (S ? 1 : 0), f);
|
|
643
643
|
const u = this.size * this.size, p = Math.ceil(Math.abs(20 * f - 10 * u) / u) - 1;
|
|
644
|
-
return i(0 <= p && p <= 9), c += p *
|
|
644
|
+
return i(0 <= p && p <= 9), c += p * Dt.PENALTY_N4, i(0 <= c && c <= 2568888), c;
|
|
645
645
|
}
|
|
646
646
|
getAlignmentPatternPositions() {
|
|
647
647
|
if (this.version == 1) return [];
|
|
@@ -653,7 +653,7 @@ var mn, pc, V1 = Object.defineProperty, _s = Object.getOwnPropertySymbols, of =
|
|
|
653
653
|
}
|
|
654
654
|
}
|
|
655
655
|
static getNumRawDataModules(c) {
|
|
656
|
-
if (c <
|
|
656
|
+
if (c < Dt.MIN_VERSION || c > Dt.MAX_VERSION) throw new RangeError("Version number out of range");
|
|
657
657
|
let f = (16 * c + 128) * c + 64;
|
|
658
658
|
if (c >= 2) {
|
|
659
659
|
const u = Math.floor(c / 7) + 2;
|
|
@@ -662,7 +662,7 @@ var mn, pc, V1 = Object.defineProperty, _s = Object.getOwnPropertySymbols, of =
|
|
|
662
662
|
return i(208 <= f && f <= 29648), f;
|
|
663
663
|
}
|
|
664
664
|
static getNumDataCodewords(c, f) {
|
|
665
|
-
return Math.floor(
|
|
665
|
+
return Math.floor(Dt.getNumRawDataModules(c) / 8) - Dt.ECC_CODEWORDS_PER_BLOCK[f.ordinal][c] * Dt.NUM_ERROR_CORRECTION_BLOCKS[f.ordinal][c];
|
|
666
666
|
}
|
|
667
667
|
static reedSolomonComputeDivisor(c) {
|
|
668
668
|
if (c < 1 || c > 255) throw new RangeError("Degree out of range");
|
|
@@ -671,8 +671,8 @@ var mn, pc, V1 = Object.defineProperty, _s = Object.getOwnPropertySymbols, of =
|
|
|
671
671
|
f.push(1);
|
|
672
672
|
let u = 1;
|
|
673
673
|
for (let p = 0; p < c; p++) {
|
|
674
|
-
for (let w = 0; w < f.length; w++) f[w] =
|
|
675
|
-
u =
|
|
674
|
+
for (let w = 0; w < f.length; w++) f[w] = Dt.reedSolomonMultiply(f[w], u), w + 1 < f.length && (f[w] ^= f[w + 1]);
|
|
675
|
+
u = Dt.reedSolomonMultiply(u, 2);
|
|
676
676
|
}
|
|
677
677
|
return f;
|
|
678
678
|
}
|
|
@@ -680,7 +680,7 @@ var mn, pc, V1 = Object.defineProperty, _s = Object.getOwnPropertySymbols, of =
|
|
|
680
680
|
let u = f.map((p) => 0);
|
|
681
681
|
for (const p of c) {
|
|
682
682
|
const w = p ^ u.shift();
|
|
683
|
-
u.push(0), f.forEach((v, S) => u[S] ^=
|
|
683
|
+
u.push(0), f.forEach((v, S) => u[S] ^= Dt.reedSolomonMultiply(v, w));
|
|
684
684
|
}
|
|
685
685
|
return u;
|
|
686
686
|
}
|
|
@@ -714,7 +714,7 @@ var mn, pc, V1 = Object.defineProperty, _s = Object.getOwnPropertySymbols, of =
|
|
|
714
714
|
if (!o) throw new Error("Assertion error");
|
|
715
715
|
}
|
|
716
716
|
t.MIN_VERSION = 1, t.MAX_VERSION = 40, t.PENALTY_N1 = 3, t.PENALTY_N2 = 3, t.PENALTY_N3 = 40, t.PENALTY_N4 = 10, t.ECC_CODEWORDS_PER_BLOCK = [[-1, 7, 10, 15, 20, 26, 18, 20, 24, 30, 18, 20, 24, 26, 30, 22, 24, 28, 30, 28, 28, 28, 28, 30, 30, 26, 28, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30], [-1, 10, 16, 26, 18, 24, 16, 18, 22, 22, 26, 30, 22, 22, 24, 24, 28, 28, 26, 26, 26, 26, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28], [-1, 13, 22, 18, 26, 18, 24, 18, 22, 20, 24, 28, 26, 24, 20, 30, 24, 28, 28, 26, 30, 28, 30, 30, 30, 30, 28, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30], [-1, 17, 28, 22, 16, 22, 28, 26, 26, 24, 28, 24, 28, 22, 24, 24, 30, 28, 28, 26, 28, 30, 24, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30]], t.NUM_ERROR_CORRECTION_BLOCKS = [[-1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 4, 4, 4, 4, 6, 6, 6, 6, 7, 8, 8, 9, 9, 10, 12, 12, 12, 13, 14, 15, 16, 17, 18, 19, 19, 20, 21, 22, 24, 25], [-1, 1, 1, 1, 2, 2, 4, 4, 4, 5, 5, 5, 8, 9, 9, 10, 10, 11, 13, 14, 16, 17, 17, 18, 20, 21, 23, 25, 26, 28, 29, 31, 33, 35, 37, 38, 40, 43, 45, 47, 49], [-1, 1, 1, 2, 2, 4, 4, 6, 6, 8, 8, 8, 10, 12, 16, 12, 17, 16, 18, 21, 20, 23, 23, 25, 27, 29, 34, 34, 35, 38, 40, 43, 45, 48, 51, 53, 56, 59, 62, 65, 68], [-1, 1, 1, 2, 4, 4, 4, 5, 6, 8, 8, 11, 11, 16, 16, 18, 16, 19, 21, 25, 25, 25, 34, 30, 32, 35, 37, 40, 42, 45, 48, 51, 54, 57, 60, 63, 66, 70, 74, 77, 81]], e.QrCode = t;
|
|
717
|
-
const s = class
|
|
717
|
+
const s = class we {
|
|
718
718
|
constructor(c, f, u) {
|
|
719
719
|
if (this.mode = c, this.numChars = f, this.bitData = u, f < 0) throw new RangeError("Invalid argument");
|
|
720
720
|
this.bitData = u.slice();
|
|
@@ -722,28 +722,28 @@ var mn, pc, V1 = Object.defineProperty, _s = Object.getOwnPropertySymbols, of =
|
|
|
722
722
|
static makeBytes(c) {
|
|
723
723
|
let f = [];
|
|
724
724
|
for (const u of c) r(u, 8, f);
|
|
725
|
-
return new
|
|
725
|
+
return new we(we.Mode.BYTE, c.length, f);
|
|
726
726
|
}
|
|
727
727
|
static makeNumeric(c) {
|
|
728
|
-
if (!
|
|
728
|
+
if (!we.isNumeric(c)) throw new RangeError("String contains non-numeric characters");
|
|
729
729
|
let f = [];
|
|
730
730
|
for (let u = 0; u < c.length; ) {
|
|
731
731
|
const p = Math.min(c.length - u, 3);
|
|
732
732
|
r(parseInt(c.substring(u, u + p), 10), 3 * p + 1, f), u += p;
|
|
733
733
|
}
|
|
734
|
-
return new
|
|
734
|
+
return new we(we.Mode.NUMERIC, c.length, f);
|
|
735
735
|
}
|
|
736
736
|
static makeAlphanumeric(c) {
|
|
737
|
-
if (!
|
|
737
|
+
if (!we.isAlphanumeric(c)) throw new RangeError("String contains unencodable characters in alphanumeric mode");
|
|
738
738
|
let f, u = [];
|
|
739
739
|
for (f = 0; f + 2 <= c.length; f += 2) {
|
|
740
|
-
let p = 45 *
|
|
741
|
-
p +=
|
|
740
|
+
let p = 45 * we.ALPHANUMERIC_CHARSET.indexOf(c.charAt(f));
|
|
741
|
+
p += we.ALPHANUMERIC_CHARSET.indexOf(c.charAt(f + 1)), r(p, 11, u);
|
|
742
742
|
}
|
|
743
|
-
return f < c.length && r(
|
|
743
|
+
return f < c.length && r(we.ALPHANUMERIC_CHARSET.indexOf(c.charAt(f)), 6, u), new we(we.Mode.ALPHANUMERIC, c.length, u);
|
|
744
744
|
}
|
|
745
745
|
static makeSegments(c) {
|
|
746
|
-
return c == "" ? [] :
|
|
746
|
+
return c == "" ? [] : we.isNumeric(c) ? [we.makeNumeric(c)] : we.isAlphanumeric(c) ? [we.makeAlphanumeric(c)] : [we.makeBytes(we.toUtf8ByteArray(c))];
|
|
747
747
|
}
|
|
748
748
|
static makeEci(c) {
|
|
749
749
|
let f = [];
|
|
@@ -754,13 +754,13 @@ var mn, pc, V1 = Object.defineProperty, _s = Object.getOwnPropertySymbols, of =
|
|
|
754
754
|
if (!(c < 1e6)) throw new RangeError("ECI assignment value out of range");
|
|
755
755
|
r(6, 3, f), r(c, 21, f);
|
|
756
756
|
}
|
|
757
|
-
return new
|
|
757
|
+
return new we(we.Mode.ECI, 0, f);
|
|
758
758
|
}
|
|
759
759
|
static isNumeric(c) {
|
|
760
|
-
return
|
|
760
|
+
return we.NUMERIC_REGEX.test(c);
|
|
761
761
|
}
|
|
762
762
|
static isAlphanumeric(c) {
|
|
763
|
-
return
|
|
763
|
+
return we.ALPHANUMERIC_REGEX.test(c);
|
|
764
764
|
}
|
|
765
765
|
getData() {
|
|
766
766
|
return this.bitData.slice();
|
|
@@ -804,7 +804,7 @@ var mn, pc, V1 = Object.defineProperty, _s = Object.getOwnPropertySymbols, of =
|
|
|
804
804
|
r.NUMERIC = new r(1, [10, 12, 14]), r.ALPHANUMERIC = new r(2, [9, 11, 13]), r.BYTE = new r(4, [8, 16, 16]), r.KANJI = new r(8, [8, 10, 12]), r.ECI = new r(7, [0, 0, 0]), t.Mode = r;
|
|
805
805
|
})(e.QrSegment || (e.QrSegment = {}));
|
|
806
806
|
})(mn || (mn = {}));
|
|
807
|
-
var
|
|
807
|
+
var Dn = mn, K1 = { L: Dn.QrCode.Ecc.LOW, M: Dn.QrCode.Ecc.MEDIUM, Q: Dn.QrCode.Ecc.QUARTILE, H: Dn.QrCode.Ecc.HIGH }, cf = 128, df = "L", ff = "#FFFFFF", uf = "#000000", hf = !1, lf = 1;
|
|
808
808
|
/**
|
|
809
809
|
* @license qrcode.react
|
|
810
810
|
* Copyright (c) Paul O'Shannessy
|
|
@@ -828,11 +828,11 @@ function mf(e, t) {
|
|
|
828
828
|
return e.slice().map((r, n) => n < t.y || n >= t.y + t.h ? r : r.map((i, s) => (s < t.x || s >= t.x + t.w) && i));
|
|
829
829
|
}
|
|
830
830
|
function bf({ value: e, level: t, minVersion: r, includeMargin: n, marginSize: i, imageSettings: s, size: a, boostLevel: o }) {
|
|
831
|
-
let c =
|
|
832
|
-
const v = (Array.isArray(e) ? e : [e]).reduce((S, E) => (S.push(...
|
|
833
|
-
return
|
|
831
|
+
let c = Ie.useMemo(() => {
|
|
832
|
+
const v = (Array.isArray(e) ? e : [e]).reduce((S, E) => (S.push(...Dn.QrSegment.makeSegments(E)), S), []);
|
|
833
|
+
return Dn.QrCode.encodeSegments(v, K1[t], r, void 0, void 0, o);
|
|
834
834
|
}, [e, t, r, o]);
|
|
835
|
-
const { cells: f, margin: u, numCells: p, calculatedImageSettings: w } =
|
|
835
|
+
const { cells: f, margin: u, numCells: p, calculatedImageSettings: w } = Ie.useMemo(() => {
|
|
836
836
|
let v = c.getModules();
|
|
837
837
|
const S = function(k, A) {
|
|
838
838
|
return A != null ? Math.max(Math.floor(A), 0) : k ? 4 : 0;
|
|
@@ -857,11 +857,11 @@ var W1 = function() {
|
|
|
857
857
|
return !1;
|
|
858
858
|
}
|
|
859
859
|
return !0;
|
|
860
|
-
}(), Cn =
|
|
861
|
-
const r = e, { value: n, size: i = cf, level: s = df, bgColor: a = ff, fgColor: o = uf, includeMargin: c = hf, minVersion: f = lf, boostLevel: u, marginSize: p, imageSettings: w } = r, v =
|
|
860
|
+
}(), Cn = Ie.forwardRef(function(e, t) {
|
|
861
|
+
const r = e, { value: n, size: i = cf, level: s = df, bgColor: a = ff, fgColor: o = uf, includeMargin: c = hf, minVersion: f = lf, boostLevel: u, marginSize: p, imageSettings: w } = r, v = Do(r, ["value", "size", "level", "bgColor", "fgColor", "includeMargin", "minVersion", "boostLevel", "marginSize", "imageSettings"]), { style: S } = v, E = Do(v, ["style"]), _ = w == null ? void 0 : w.src, k = Ie.useRef(null), A = Ie.useRef(null), P = Ie.useCallback((l) => {
|
|
862
862
|
k.current = l, typeof t == "function" ? t(l) : t && (t.current = l);
|
|
863
|
-
}, [t]), [I, N] =
|
|
864
|
-
|
|
863
|
+
}, [t]), [I, N] = Ie.useState(!1), { margin: z, cells: B, numCells: d, calculatedImageSettings: h } = bf({ value: n, level: s, minVersion: f, boostLevel: u, includeMargin: c, marginSize: p, imageSettings: w, size: i });
|
|
864
|
+
Ie.useEffect(() => {
|
|
865
865
|
if (k.current != null) {
|
|
866
866
|
const l = k.current, g = l.getContext("2d");
|
|
867
867
|
if (!g) return;
|
|
@@ -870,29 +870,29 @@ var W1 = function() {
|
|
|
870
870
|
R && h.excavation != null && (x = mf(B, h.excavation));
|
|
871
871
|
const j = window.devicePixelRatio || 1;
|
|
872
872
|
l.height = l.width = i * j;
|
|
873
|
-
const
|
|
874
|
-
g.scale(
|
|
875
|
-
$.forEach(function(
|
|
876
|
-
|
|
873
|
+
const F = i / d * j;
|
|
874
|
+
g.scale(F, F), g.fillStyle = a, g.fillRect(0, 0, d, d), g.fillStyle = o, W1 ? g.fill(new Path2D(pf(x, z))) : B.forEach(function($, V) {
|
|
875
|
+
$.forEach(function(D, U) {
|
|
876
|
+
D && g.fillRect(U + z, V + z, 1, 1);
|
|
877
877
|
});
|
|
878
878
|
}), h && (g.globalAlpha = h.opacity), R && g.drawImage(O, h.x + z, h.y + z, h.w, h.h);
|
|
879
879
|
}
|
|
880
|
-
}),
|
|
880
|
+
}), Ie.useEffect(() => {
|
|
881
881
|
N(!1);
|
|
882
882
|
}, [_]);
|
|
883
883
|
const y = Ho({ height: i, width: i }, S);
|
|
884
884
|
let m = null;
|
|
885
|
-
return _ != null && (m =
|
|
885
|
+
return _ != null && (m = Ie.createElement("img", { src: _, key: _, style: { display: "none" }, onLoad: () => {
|
|
886
886
|
N(!0);
|
|
887
|
-
}, ref: A, crossOrigin: h == null ? void 0 : h.crossOrigin })),
|
|
887
|
+
}, ref: A, crossOrigin: h == null ? void 0 : h.crossOrigin })), Ie.createElement(Ie.Fragment, null, Ie.createElement("canvas", Ho({ style: y, height: i, width: i, ref: P, role: "img" }, E)), m);
|
|
888
888
|
});
|
|
889
889
|
Cn.displayName = "QRCodeCanvas";
|
|
890
|
-
var Y1 =
|
|
891
|
-
const r = e, { value: n, size: i = cf, level: s = df, bgColor: a = ff, fgColor: o = uf, includeMargin: c = hf, minVersion: f = lf, boostLevel: u, title: p, marginSize: w, imageSettings: v } = r, S =
|
|
890
|
+
var Y1 = Ie.forwardRef(function(e, t) {
|
|
891
|
+
const r = e, { value: n, size: i = cf, level: s = df, bgColor: a = ff, fgColor: o = uf, includeMargin: c = hf, minVersion: f = lf, boostLevel: u, title: p, marginSize: w, imageSettings: v } = r, S = Do(r, ["value", "size", "level", "bgColor", "fgColor", "includeMargin", "minVersion", "boostLevel", "title", "marginSize", "imageSettings"]), { margin: E, cells: _, numCells: k, calculatedImageSettings: A } = bf({ value: n, level: s, minVersion: f, boostLevel: u, includeMargin: c, marginSize: w, imageSettings: v, size: i });
|
|
892
892
|
let P = _, I = null;
|
|
893
|
-
v != null && A != null && (A.excavation != null && (P = mf(_, A.excavation)), I =
|
|
893
|
+
v != null && A != null && (A.excavation != null && (P = mf(_, A.excavation)), I = Ie.createElement("image", { href: v.src, height: A.h, width: A.w, x: A.x + E, y: A.y + E, preserveAspectRatio: "none", opacity: A.opacity, crossOrigin: A.crossOrigin }));
|
|
894
894
|
const N = pf(P, E);
|
|
895
|
-
return
|
|
895
|
+
return Ie.createElement("svg", Ho({ height: i, width: i, viewBox: `0 0 ${k} ${k}`, ref: t, role: "img" }, S), !!p && Ie.createElement("title", null, p), Ie.createElement("path", { fill: a, d: `M0,0 h${k}v${k}H0z`, shapeRendering: "crispEdges" }), Ie.createElement("path", { fill: o, d: N, shapeRendering: "crispEdges" }), I);
|
|
896
896
|
});
|
|
897
897
|
Y1.displayName = "QRCodeSVG";
|
|
898
898
|
const Er = /* @__PURE__ */ Object.create(null);
|
|
@@ -901,7 +901,7 @@ const ps = /* @__PURE__ */ Object.create(null);
|
|
|
901
901
|
Object.keys(Er).forEach((e) => {
|
|
902
902
|
ps[Er[e]] = e;
|
|
903
903
|
});
|
|
904
|
-
const
|
|
904
|
+
const Fo = { type: "error", data: "parser error" }, gf = typeof Blob == "function" || typeof Blob < "u" && Object.prototype.toString.call(Blob) === "[object BlobConstructor]", yf = typeof ArrayBuffer == "function", vf = (e) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(e) : e && e.buffer instanceof ArrayBuffer, $a = ({ type: e, data: t }, r, n) => gf && t instanceof Blob ? r ? n(t) : bc(t, n) : yf && (t instanceof ArrayBuffer || vf(t)) ? r ? n(t) : bc(new Blob([t]), n) : n(Er[e] + (t || "")), bc = (e, t) => {
|
|
905
905
|
const r = new FileReader();
|
|
906
906
|
return r.onload = function() {
|
|
907
907
|
const n = r.result.split(",")[1];
|
|
@@ -914,12 +914,12 @@ function gc(e) {
|
|
|
914
914
|
let ao;
|
|
915
915
|
const Q1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Si = typeof Uint8Array > "u" ? [] : new Uint8Array(256);
|
|
916
916
|
for (let e = 0; e < 64; e++) Si[Q1.charCodeAt(e)] = e;
|
|
917
|
-
const
|
|
917
|
+
const J1 = typeof ArrayBuffer == "function", qa = (e, t) => {
|
|
918
918
|
if (typeof e != "string") return { type: "message", data: wf(e, t) };
|
|
919
919
|
const r = e.charAt(0);
|
|
920
|
-
return r === "b" ? { type: "message", data:
|
|
921
|
-
},
|
|
922
|
-
if (
|
|
920
|
+
return r === "b" ? { type: "message", data: G1(e.substring(1), t) } : ps[r] ? e.length > 1 ? { type: ps[r], data: e.substring(1) } : { type: ps[r] } : Fo;
|
|
921
|
+
}, G1 = (e, t) => {
|
|
922
|
+
if (J1) {
|
|
923
923
|
const r = ((n) => {
|
|
924
924
|
let i, s, a, o, c, f = 0.75 * n.length, u = n.length, p = 0;
|
|
925
925
|
n[n.length - 1] === "=" && (f--, n[n.length - 2] === "=" && f--);
|
|
@@ -965,20 +965,20 @@ function ss(e, t) {
|
|
|
965
965
|
for (let i = 0; i < t; i++) r[i] = e[0][n++], n === e[0].length && (e.shift(), n = 0);
|
|
966
966
|
return e.length && n < e[0].length && (e[0] = e[0].slice(n)), r;
|
|
967
967
|
}
|
|
968
|
-
function
|
|
968
|
+
function ke(e) {
|
|
969
969
|
if (e) return function(t) {
|
|
970
|
-
for (var r in
|
|
970
|
+
for (var r in ke.prototype) t[r] = ke.prototype[r];
|
|
971
971
|
return t;
|
|
972
972
|
}(e);
|
|
973
973
|
}
|
|
974
|
-
|
|
974
|
+
ke.prototype.on = ke.prototype.addEventListener = function(e, t) {
|
|
975
975
|
return this._callbacks = this._callbacks || {}, (this._callbacks["$" + e] = this._callbacks["$" + e] || []).push(t), this;
|
|
976
|
-
},
|
|
976
|
+
}, ke.prototype.once = function(e, t) {
|
|
977
977
|
function r() {
|
|
978
978
|
this.off(e, r), t.apply(this, arguments);
|
|
979
979
|
}
|
|
980
980
|
return r.fn = t, this.on(e, r), this;
|
|
981
|
-
},
|
|
981
|
+
}, ke.prototype.off = ke.prototype.removeListener = ke.prototype.removeAllListeners = ke.prototype.removeEventListener = function(e, t) {
|
|
982
982
|
if (this._callbacks = this._callbacks || {}, arguments.length == 0) return this._callbacks = {}, this;
|
|
983
983
|
var r, n = this._callbacks["$" + e];
|
|
984
984
|
if (!n) return this;
|
|
@@ -988,7 +988,7 @@ Ae.prototype.on = Ae.prototype.addEventListener = function(e, t) {
|
|
|
988
988
|
break;
|
|
989
989
|
}
|
|
990
990
|
return n.length === 0 && delete this._callbacks["$" + e], this;
|
|
991
|
-
},
|
|
991
|
+
}, ke.prototype.emit = function(e) {
|
|
992
992
|
this._callbacks = this._callbacks || {};
|
|
993
993
|
for (var t = new Array(arguments.length - 1), r = this._callbacks["$" + e], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
|
|
994
994
|
if (r) {
|
|
@@ -996,9 +996,9 @@ Ae.prototype.on = Ae.prototype.addEventListener = function(e, t) {
|
|
|
996
996
|
for (var i = (r = r.slice(0)).length; n < i; ++n) r[n].apply(this, t);
|
|
997
997
|
}
|
|
998
998
|
return this;
|
|
999
|
-
},
|
|
999
|
+
}, ke.prototype.emitReserved = ke.prototype.emit, ke.prototype.listeners = function(e) {
|
|
1000
1000
|
return this._callbacks = this._callbacks || {}, this._callbacks["$" + e] || [];
|
|
1001
|
-
},
|
|
1001
|
+
}, ke.prototype.hasListeners = function(e) {
|
|
1002
1002
|
return !!this.listeners(e).length;
|
|
1003
1003
|
};
|
|
1004
1004
|
const Us = typeof Promise == "function" && typeof Promise.resolve == "function" ? (e) => Promise.resolve().then(e) : (e, t) => t(e, 0), ur = typeof self < "u" ? self : typeof window < "u" ? window : Function("return this")();
|
|
@@ -1024,7 +1024,7 @@ class nu extends Error {
|
|
|
1024
1024
|
super(t), this.description = r, this.context = n, this.type = "TransportError";
|
|
1025
1025
|
}
|
|
1026
1026
|
}
|
|
1027
|
-
let Ua = class extends
|
|
1027
|
+
let Ua = class extends ke {
|
|
1028
1028
|
constructor(e) {
|
|
1029
1029
|
super(), this.writable = !1, Hs(this, e), this.opts = e, this.query = e.query, this.socket = e.socket, this.supportsBinary = !e.forceBase64;
|
|
1030
1030
|
}
|
|
@@ -1169,7 +1169,7 @@ class au extends iu {
|
|
|
1169
1169
|
}), this.pollXhr = t;
|
|
1170
1170
|
}
|
|
1171
1171
|
}
|
|
1172
|
-
class Nr extends
|
|
1172
|
+
class Nr extends ke {
|
|
1173
1173
|
constructor(t, r, n) {
|
|
1174
1174
|
super(), this.createRequest = t, Hs(this, n), this._opts = n, this._method = n.method || "GET", this._uri = r, this._data = n.data !== void 0 ? n.data : null, this._create();
|
|
1175
1175
|
}
|
|
@@ -1332,7 +1332,7 @@ const fo = ur.WebSocket || ur.MozWebSocket, fu = { websocket: class extends du {
|
|
|
1332
1332
|
if (is(c) < 8) break;
|
|
1333
1333
|
const S = ss(c, 8), E = new DataView(S.buffer, S.byteOffset, S.length), _ = E.getUint32(0);
|
|
1334
1334
|
if (_ > Math.pow(2, 21) - 1) {
|
|
1335
|
-
v.enqueue(
|
|
1335
|
+
v.enqueue(Fo);
|
|
1336
1336
|
break;
|
|
1337
1337
|
}
|
|
1338
1338
|
u = _ * Math.pow(2, 32) + E.getUint32(4), f = 3;
|
|
@@ -1342,7 +1342,7 @@ const fo = ur.WebSocket || ur.MozWebSocket, fu = { websocket: class extends du {
|
|
|
1342
1342
|
v.enqueue(qa(p ? S : co.decode(S), o)), f = 0;
|
|
1343
1343
|
}
|
|
1344
1344
|
if (u === 0 || u > a) {
|
|
1345
|
-
v.enqueue(
|
|
1345
|
+
v.enqueue(Fo);
|
|
1346
1346
|
break;
|
|
1347
1347
|
}
|
|
1348
1348
|
}
|
|
@@ -1406,7 +1406,7 @@ const Vo = typeof addEventListener == "function" && typeof removeEventListener =
|
|
|
1406
1406
|
Vo && addEventListener("offline", () => {
|
|
1407
1407
|
ms.forEach((e) => e());
|
|
1408
1408
|
}, !1);
|
|
1409
|
-
class on extends
|
|
1409
|
+
class on extends ke {
|
|
1410
1410
|
constructor(t, r) {
|
|
1411
1411
|
if (super(), this.binaryType = "arraybuffer", this.writeBuffer = [], this._prevBufferLen = 0, this._pingInterval = -1, this._pingTimeout = -1, this._maxPayload = -1, this._pingTimeoutTime = 1 / 0, t && typeof t == "object" && (r = t, t = null), t) {
|
|
1412
1412
|
const n = Zo(t);
|
|
@@ -1652,14 +1652,14 @@ function Wo(e, t) {
|
|
|
1652
1652
|
return e;
|
|
1653
1653
|
}
|
|
1654
1654
|
const wu = ["connect", "connect_error", "disconnect", "disconnecting", "newListener", "removeListener"];
|
|
1655
|
-
var
|
|
1655
|
+
var Gt;
|
|
1656
1656
|
(function(e) {
|
|
1657
1657
|
e[e.CONNECT = 0] = "CONNECT", e[e.DISCONNECT = 1] = "DISCONNECT", e[e.EVENT = 2] = "EVENT", e[e.ACK = 3] = "ACK", e[e.CONNECT_ERROR = 4] = "CONNECT_ERROR", e[e.BINARY_EVENT = 5] = "BINARY_EVENT", e[e.BINARY_ACK = 6] = "BINARY_ACK";
|
|
1658
|
-
})(
|
|
1658
|
+
})(Gt || (Gt = {}));
|
|
1659
1659
|
function wc(e) {
|
|
1660
1660
|
return Object.prototype.toString.call(e) === "[object Object]";
|
|
1661
1661
|
}
|
|
1662
|
-
class
|
|
1662
|
+
class Da extends ke {
|
|
1663
1663
|
constructor(t) {
|
|
1664
1664
|
super(), this.reviver = t;
|
|
1665
1665
|
}
|
|
@@ -1668,8 +1668,8 @@ class Fa extends Ae {
|
|
|
1668
1668
|
if (typeof t == "string") {
|
|
1669
1669
|
if (this.reconstructor) throw new Error("got plaintext data when reconstructing a packet");
|
|
1670
1670
|
r = this.decodeString(t);
|
|
1671
|
-
const n = r.type ===
|
|
1672
|
-
n || r.type ===
|
|
1671
|
+
const n = r.type === Gt.BINARY_EVENT;
|
|
1672
|
+
n || r.type === Gt.BINARY_ACK ? (r.type = n ? Gt.EVENT : Gt.ACK, this.reconstructor = new _u(r), r.attachments === 0 && super.emitReserved("decoded", r)) : super.emitReserved("decoded", r);
|
|
1673
1673
|
} else {
|
|
1674
1674
|
if (!Ha(t) && !t.base64) throw new Error("Unknown type: " + t);
|
|
1675
1675
|
if (!this.reconstructor) throw new Error("got binary data when not reconstructing a packet");
|
|
@@ -1679,8 +1679,8 @@ class Fa extends Ae {
|
|
|
1679
1679
|
decodeString(t) {
|
|
1680
1680
|
let r = 0;
|
|
1681
1681
|
const n = { type: Number(t.charAt(0)) };
|
|
1682
|
-
if (
|
|
1683
|
-
if (n.type ===
|
|
1682
|
+
if (Gt[n.type] === void 0) throw new Error("unknown packet type " + n.type);
|
|
1683
|
+
if (n.type === Gt.BINARY_EVENT || n.type === Gt.BINARY_ACK) {
|
|
1684
1684
|
const s = r + 1;
|
|
1685
1685
|
for (; t.charAt(++r) !== "-" && r != t.length; ) ;
|
|
1686
1686
|
const a = t.substring(s, r);
|
|
@@ -1708,7 +1708,7 @@ class Fa extends Ae {
|
|
|
1708
1708
|
}
|
|
1709
1709
|
if (t.charAt(++r)) {
|
|
1710
1710
|
const s = this.tryParse(t.substr(r));
|
|
1711
|
-
if (!
|
|
1711
|
+
if (!Da.isPayloadValid(n.type, s)) throw new Error("invalid payload");
|
|
1712
1712
|
n.data = s;
|
|
1713
1713
|
}
|
|
1714
1714
|
return n;
|
|
@@ -1722,17 +1722,17 @@ class Fa extends Ae {
|
|
|
1722
1722
|
}
|
|
1723
1723
|
static isPayloadValid(t, r) {
|
|
1724
1724
|
switch (t) {
|
|
1725
|
-
case
|
|
1725
|
+
case Gt.CONNECT:
|
|
1726
1726
|
return wc(r);
|
|
1727
|
-
case
|
|
1727
|
+
case Gt.DISCONNECT:
|
|
1728
1728
|
return r === void 0;
|
|
1729
|
-
case
|
|
1729
|
+
case Gt.CONNECT_ERROR:
|
|
1730
1730
|
return typeof r == "string" || wc(r);
|
|
1731
|
-
case
|
|
1732
|
-
case
|
|
1731
|
+
case Gt.EVENT:
|
|
1732
|
+
case Gt.BINARY_EVENT:
|
|
1733
1733
|
return Array.isArray(r) && (typeof r[0] == "number" || typeof r[0] == "string" && wu.indexOf(r[0]) === -1);
|
|
1734
|
-
case
|
|
1735
|
-
case
|
|
1734
|
+
case Gt.ACK:
|
|
1735
|
+
case Gt.BINARY_ACK:
|
|
1736
1736
|
return Array.isArray(r);
|
|
1737
1737
|
}
|
|
1738
1738
|
}
|
|
@@ -1755,23 +1755,23 @@ class _u {
|
|
|
1755
1755
|
this.reconPack = null, this.buffers = [];
|
|
1756
1756
|
}
|
|
1757
1757
|
}
|
|
1758
|
-
const xu = Object.freeze(Object.defineProperty({ __proto__: null, Decoder:
|
|
1758
|
+
const xu = Object.freeze(Object.defineProperty({ __proto__: null, Decoder: Da, Encoder: class {
|
|
1759
1759
|
constructor(e) {
|
|
1760
1760
|
this.replacer = e;
|
|
1761
1761
|
}
|
|
1762
1762
|
encode(e) {
|
|
1763
|
-
return e.type !==
|
|
1763
|
+
return e.type !== Gt.EVENT && e.type !== Gt.ACK || !bs(e) ? [this.encodeAsString(e)] : this.encodeAsBinary({ type: e.type === Gt.EVENT ? Gt.BINARY_EVENT : Gt.BINARY_ACK, nsp: e.nsp, data: e.data, id: e.id });
|
|
1764
1764
|
}
|
|
1765
1765
|
encodeAsString(e) {
|
|
1766
1766
|
let t = "" + e.type;
|
|
1767
|
-
return e.type !==
|
|
1767
|
+
return e.type !== Gt.BINARY_EVENT && e.type !== Gt.BINARY_ACK || (t += e.attachments + "-"), e.nsp && e.nsp !== "/" && (t += e.nsp + ","), e.id != null && (t += e.id), e.data != null && (t += JSON.stringify(e.data, this.replacer)), t;
|
|
1768
1768
|
}
|
|
1769
1769
|
encodeAsBinary(e) {
|
|
1770
1770
|
const t = yu(e), r = this.encodeAsString(t.packet), n = t.buffers;
|
|
1771
1771
|
return n.unshift(r), n;
|
|
1772
1772
|
}
|
|
1773
1773
|
}, get PacketType() {
|
|
1774
|
-
return
|
|
1774
|
+
return Gt;
|
|
1775
1775
|
}, protocol: 5 }, Symbol.toStringTag, { value: "Module" }));
|
|
1776
1776
|
function gr(e, t, r) {
|
|
1777
1777
|
return e.on(t, r), function() {
|
|
@@ -1779,7 +1779,7 @@ function gr(e, t, r) {
|
|
|
1779
1779
|
};
|
|
1780
1780
|
}
|
|
1781
1781
|
const Su = Object.freeze({ connect: 1, connect_error: 1, disconnect: 1, disconnecting: 1, newListener: 1, removeListener: 1 });
|
|
1782
|
-
class Ef extends
|
|
1782
|
+
class Ef extends ke {
|
|
1783
1783
|
constructor(t, r, n) {
|
|
1784
1784
|
super(), this.connected = !1, this.recovered = !1, this.receiveBuffer = [], this.sendBuffer = [], this._queue = [], this._queueSeq = 0, this.ids = 0, this.acks = {}, this.flags = {}, this.io = t, this.nsp = r, n && n.auth && (this.auth = n.auth), this._opts = Object.assign({}, n), this.io._autoConnect && this.open();
|
|
1785
1785
|
}
|
|
@@ -1807,7 +1807,7 @@ class Ef extends Ae {
|
|
|
1807
1807
|
var n, i, s;
|
|
1808
1808
|
if (Su.hasOwnProperty(t)) throw new Error('"' + t.toString() + '" is a reserved event name');
|
|
1809
1809
|
if (r.unshift(t), this._opts.retries && !this.flags.fromQueue && !this.flags.volatile) return this._addToQueue(r), this;
|
|
1810
|
-
const a = { type:
|
|
1810
|
+
const a = { type: Gt.EVENT, data: r, options: {} };
|
|
1811
1811
|
if (a.options.compress = this.flags.compress !== !1, typeof r[r.length - 1] == "function") {
|
|
1812
1812
|
const f = this.ids++, u = r.pop();
|
|
1813
1813
|
this._registerAckCallback(f, u), a.id = f;
|
|
@@ -1857,7 +1857,7 @@ class Ef extends Ae {
|
|
|
1857
1857
|
}) : this._sendConnectPacket(this.auth);
|
|
1858
1858
|
}
|
|
1859
1859
|
_sendConnectPacket(t) {
|
|
1860
|
-
this.packet({ type:
|
|
1860
|
+
this.packet({ type: Gt.CONNECT, data: this._pid ? Object.assign({ pid: this._pid, offset: this._lastOffset }, t) : t });
|
|
1861
1861
|
}
|
|
1862
1862
|
onerror(t) {
|
|
1863
1863
|
this.connected || this.emitReserved("connect_error", t);
|
|
@@ -1875,21 +1875,21 @@ class Ef extends Ae {
|
|
|
1875
1875
|
}
|
|
1876
1876
|
onpacket(t) {
|
|
1877
1877
|
if (t.nsp === this.nsp) switch (t.type) {
|
|
1878
|
-
case
|
|
1878
|
+
case Gt.CONNECT:
|
|
1879
1879
|
t.data && t.data.sid ? this.onconnect(t.data.sid, t.data.pid) : this.emitReserved("connect_error", new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));
|
|
1880
1880
|
break;
|
|
1881
|
-
case
|
|
1882
|
-
case
|
|
1881
|
+
case Gt.EVENT:
|
|
1882
|
+
case Gt.BINARY_EVENT:
|
|
1883
1883
|
this.onevent(t);
|
|
1884
1884
|
break;
|
|
1885
|
-
case
|
|
1886
|
-
case
|
|
1885
|
+
case Gt.ACK:
|
|
1886
|
+
case Gt.BINARY_ACK:
|
|
1887
1887
|
this.onack(t);
|
|
1888
1888
|
break;
|
|
1889
|
-
case
|
|
1889
|
+
case Gt.DISCONNECT:
|
|
1890
1890
|
this.ondisconnect();
|
|
1891
1891
|
break;
|
|
1892
|
-
case
|
|
1892
|
+
case Gt.CONNECT_ERROR:
|
|
1893
1893
|
this.destroy();
|
|
1894
1894
|
const r = new Error(t.data.message);
|
|
1895
1895
|
r.data = t.data.data, this.emitReserved("connect_error", r);
|
|
@@ -1910,7 +1910,7 @@ class Ef extends Ae {
|
|
|
1910
1910
|
const r = this;
|
|
1911
1911
|
let n = !1;
|
|
1912
1912
|
return function(...i) {
|
|
1913
|
-
n || (n = !0, r.packet({ type:
|
|
1913
|
+
n || (n = !0, r.packet({ type: Gt.ACK, id: t, data: i }));
|
|
1914
1914
|
};
|
|
1915
1915
|
}
|
|
1916
1916
|
onack(t) {
|
|
@@ -1932,7 +1932,7 @@ class Ef extends Ae {
|
|
|
1932
1932
|
this.subs && (this.subs.forEach((t) => t()), this.subs = void 0), this.io._destroy(this);
|
|
1933
1933
|
}
|
|
1934
1934
|
disconnect() {
|
|
1935
|
-
return this.connected && this.packet({ type:
|
|
1935
|
+
return this.connected && this.packet({ type: Gt.DISCONNECT }), this.destroy(), this.connected && this.onclose("io client disconnect"), this;
|
|
1936
1936
|
}
|
|
1937
1937
|
close() {
|
|
1938
1938
|
return this.disconnect();
|
|
@@ -2006,7 +2006,7 @@ $n.prototype.duration = function() {
|
|
|
2006
2006
|
}, $n.prototype.setJitter = function(e) {
|
|
2007
2007
|
this.jitter = e;
|
|
2008
2008
|
};
|
|
2009
|
-
class Yo extends
|
|
2009
|
+
class Yo extends ke {
|
|
2010
2010
|
constructor(t, r) {
|
|
2011
2011
|
var n;
|
|
2012
2012
|
super(), this.nsps = {}, this.subs = [], t && typeof t == "object" && (r = t, t = void 0), (r = r || {}).path = r.path || "/socket.io", this.opts = r, Hs(this, r), this.reconnection(r.reconnection !== !1), this.reconnectionAttempts(r.reconnectionAttempts || 1 / 0), this.reconnectionDelay(r.reconnectionDelay || 1e3), this.reconnectionDelayMax(r.reconnectionDelayMax || 5e3), this.randomizationFactor((n = r.randomizationFactor) !== null && n !== void 0 ? n : 0.5), this.backoff = new $n({ min: this.reconnectionDelay(), max: this.reconnectionDelayMax(), jitter: this.randomizationFactor() }), this.timeout(r.timeout == null ? 2e4 : r.timeout), this._readyState = "closed", this.uri = t;
|
|
@@ -2150,14 +2150,14 @@ function Tf(e) {
|
|
|
2150
2150
|
throw new Error('Could not dynamically require "' + e + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
2151
2151
|
}
|
|
2152
2152
|
var _c = { exports: {} };
|
|
2153
|
-
const
|
|
2153
|
+
const Ds = nf(Object.freeze(Object.defineProperty({ __proto__: null, default: {} }, Symbol.toStringTag, { value: "Module" })));
|
|
2154
2154
|
var xc;
|
|
2155
|
-
function
|
|
2155
|
+
function Jt() {
|
|
2156
2156
|
return xc || (xc = 1, _c.exports = function() {
|
|
2157
2157
|
var e = e || function(t, r) {
|
|
2158
2158
|
var n;
|
|
2159
2159
|
if (typeof window < "u" && window.crypto && (n = window.crypto), typeof self < "u" && self.crypto && (n = self.crypto), typeof globalThis < "u" && globalThis.crypto && (n = globalThis.crypto), !n && typeof window < "u" && window.msCrypto && (n = window.msCrypto), !n && Zr !== void 0 && Zr.crypto && (n = Zr.crypto), !n) try {
|
|
2160
|
-
n =
|
|
2160
|
+
n = Ds;
|
|
2161
2161
|
} catch {
|
|
2162
2162
|
}
|
|
2163
2163
|
var i = function() {
|
|
@@ -2298,7 +2298,7 @@ function xs() {
|
|
|
2298
2298
|
return o;
|
|
2299
2299
|
} });
|
|
2300
2300
|
}(), e;
|
|
2301
|
-
}(
|
|
2301
|
+
}(Jt())), Ac.exports;
|
|
2302
2302
|
}
|
|
2303
2303
|
var kc, Mc = { exports: {} };
|
|
2304
2304
|
function Au() {
|
|
@@ -2314,7 +2314,7 @@ function Au() {
|
|
|
2314
2314
|
n.prototype = t;
|
|
2315
2315
|
}
|
|
2316
2316
|
}(), e.lib.WordArray;
|
|
2317
|
-
}(
|
|
2317
|
+
}(Jt())), Mc.exports;
|
|
2318
2318
|
}
|
|
2319
2319
|
var Ec, Ic = { exports: {} };
|
|
2320
2320
|
function ku() {
|
|
@@ -2344,7 +2344,7 @@ function ku() {
|
|
|
2344
2344
|
return r.create(o, 2 * a);
|
|
2345
2345
|
} };
|
|
2346
2346
|
}(), e.enc.Utf16;
|
|
2347
|
-
}(
|
|
2347
|
+
}(Jt())), Ic.exports;
|
|
2348
2348
|
}
|
|
2349
2349
|
var Tc, Rc = { exports: {} };
|
|
2350
2350
|
function yn() {
|
|
@@ -2379,7 +2379,7 @@ function yn() {
|
|
|
2379
2379
|
return n(i, s, o);
|
|
2380
2380
|
}, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" };
|
|
2381
2381
|
}(), e.enc.Base64;
|
|
2382
|
-
}(
|
|
2382
|
+
}(Jt())), Rc.exports;
|
|
2383
2383
|
}
|
|
2384
2384
|
var Nc, Oc = { exports: {} };
|
|
2385
2385
|
function Mu() {
|
|
@@ -2416,7 +2416,7 @@ function Mu() {
|
|
|
2416
2416
|
return n(i, a, c);
|
|
2417
2417
|
}, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", _safe_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_" };
|
|
2418
2418
|
}(), e.enc.Base64url;
|
|
2419
|
-
}(
|
|
2419
|
+
}(Jt())), Oc.exports;
|
|
2420
2420
|
}
|
|
2421
2421
|
var Cc, Bc = { exports: {} };
|
|
2422
2422
|
function vn() {
|
|
@@ -2433,8 +2433,8 @@ function vn() {
|
|
|
2433
2433
|
var _ = S + E, k = v[_];
|
|
2434
2434
|
v[_] = 16711935 & (k << 8 | k >>> 24) | 4278255360 & (k << 24 | k >>> 8);
|
|
2435
2435
|
}
|
|
2436
|
-
var A = this._hash.words, P = v[S + 0], I = v[S + 1], N = v[S + 2], z = v[S + 3], B = v[S + 4], d = v[S + 5], h = v[S + 6], y = v[S + 7], m = v[S + 8], l = v[S + 9], g = v[S + 10], x = v[S + 11], O = v[S + 12], R = v[S + 13], j = v[S + 14],
|
|
2437
|
-
$ = f($, V,
|
|
2436
|
+
var A = this._hash.words, P = v[S + 0], I = v[S + 1], N = v[S + 2], z = v[S + 3], B = v[S + 4], d = v[S + 5], h = v[S + 6], y = v[S + 7], m = v[S + 8], l = v[S + 9], g = v[S + 10], x = v[S + 11], O = v[S + 12], R = v[S + 13], j = v[S + 14], F = v[S + 15], $ = A[0], V = A[1], D = A[2], U = A[3];
|
|
2437
|
+
$ = f($, V, D, U, P, 7, o[0]), U = f(U, $, V, D, I, 12, o[1]), D = f(D, U, $, V, N, 17, o[2]), V = f(V, D, U, $, z, 22, o[3]), $ = f($, V, D, U, B, 7, o[4]), U = f(U, $, V, D, d, 12, o[5]), D = f(D, U, $, V, h, 17, o[6]), V = f(V, D, U, $, y, 22, o[7]), $ = f($, V, D, U, m, 7, o[8]), U = f(U, $, V, D, l, 12, o[9]), D = f(D, U, $, V, g, 17, o[10]), V = f(V, D, U, $, x, 22, o[11]), $ = f($, V, D, U, O, 7, o[12]), U = f(U, $, V, D, R, 12, o[13]), D = f(D, U, $, V, j, 17, o[14]), $ = u($, V = f(V, D, U, $, F, 22, o[15]), D, U, I, 5, o[16]), U = u(U, $, V, D, h, 9, o[17]), D = u(D, U, $, V, x, 14, o[18]), V = u(V, D, U, $, P, 20, o[19]), $ = u($, V, D, U, d, 5, o[20]), U = u(U, $, V, D, g, 9, o[21]), D = u(D, U, $, V, F, 14, o[22]), V = u(V, D, U, $, B, 20, o[23]), $ = u($, V, D, U, l, 5, o[24]), U = u(U, $, V, D, j, 9, o[25]), D = u(D, U, $, V, z, 14, o[26]), V = u(V, D, U, $, m, 20, o[27]), $ = u($, V, D, U, R, 5, o[28]), U = u(U, $, V, D, N, 9, o[29]), D = u(D, U, $, V, y, 14, o[30]), $ = p($, V = u(V, D, U, $, O, 20, o[31]), D, U, d, 4, o[32]), U = p(U, $, V, D, m, 11, o[33]), D = p(D, U, $, V, x, 16, o[34]), V = p(V, D, U, $, j, 23, o[35]), $ = p($, V, D, U, I, 4, o[36]), U = p(U, $, V, D, B, 11, o[37]), D = p(D, U, $, V, y, 16, o[38]), V = p(V, D, U, $, g, 23, o[39]), $ = p($, V, D, U, R, 4, o[40]), U = p(U, $, V, D, P, 11, o[41]), D = p(D, U, $, V, z, 16, o[42]), V = p(V, D, U, $, h, 23, o[43]), $ = p($, V, D, U, l, 4, o[44]), U = p(U, $, V, D, O, 11, o[45]), D = p(D, U, $, V, F, 16, o[46]), $ = w($, V = p(V, D, U, $, N, 23, o[47]), D, U, P, 6, o[48]), U = w(U, $, V, D, y, 10, o[49]), D = w(D, U, $, V, j, 15, o[50]), V = w(V, D, U, $, d, 21, o[51]), $ = w($, V, D, U, O, 6, o[52]), U = w(U, $, V, D, z, 10, o[53]), D = w(D, U, $, V, g, 15, o[54]), V = w(V, D, U, $, I, 21, o[55]), $ = w($, V, D, U, m, 6, o[56]), U = w(U, $, V, D, F, 10, o[57]), D = w(D, U, $, V, h, 15, o[58]), V = w(V, D, U, $, R, 21, o[59]), $ = w($, V, D, U, B, 6, o[60]), U = w(U, $, V, D, x, 10, o[61]), D = w(D, U, $, V, N, 15, o[62]), V = w(V, D, U, $, l, 21, o[63]), A[0] = A[0] + $ | 0, A[1] = A[1] + V | 0, A[2] = A[2] + D | 0, A[3] = A[3] + U | 0;
|
|
2438
2438
|
}, _doFinalize: function() {
|
|
2439
2439
|
var v = this._data, S = v.words, E = 8 * this._nDataBytes, _ = 8 * v.sigBytes;
|
|
2440
2440
|
S[_ >>> 5] |= 128 << 24 - _ % 32;
|
|
@@ -2467,7 +2467,7 @@ function vn() {
|
|
|
2467
2467
|
}
|
|
2468
2468
|
r.MD5 = s._createHelper(c), r.HmacMD5 = s._createHmacHelper(c);
|
|
2469
2469
|
}(Math), e.MD5;
|
|
2470
|
-
}(
|
|
2470
|
+
}(Jt())), Bc.exports;
|
|
2471
2471
|
}
|
|
2472
2472
|
var Pc, Lc = { exports: {} };
|
|
2473
2473
|
function Rf() {
|
|
@@ -2495,7 +2495,7 @@ function Rf() {
|
|
|
2495
2495
|
} });
|
|
2496
2496
|
t.SHA1 = i._createHelper(o), t.HmacSHA1 = i._createHmacHelper(o);
|
|
2497
2497
|
}(), e.SHA1;
|
|
2498
|
-
}(
|
|
2498
|
+
}(Jt())), Lc.exports;
|
|
2499
2499
|
}
|
|
2500
2500
|
var zc, jc = { exports: {} };
|
|
2501
2501
|
function uo() {
|
|
@@ -2534,7 +2534,7 @@ function uo() {
|
|
|
2534
2534
|
} });
|
|
2535
2535
|
r.SHA256 = s._createHelper(u), r.HmacSHA256 = s._createHmacHelper(u);
|
|
2536
2536
|
}(Math), e.SHA256;
|
|
2537
|
-
}(
|
|
2537
|
+
}(Jt())), jc.exports;
|
|
2538
2538
|
}
|
|
2539
2539
|
var $c, Eu = { exports: {} }, qc, Uc = { exports: {} };
|
|
2540
2540
|
function Hc() {
|
|
@@ -2551,17 +2551,17 @@ function Hc() {
|
|
|
2551
2551
|
var u = a.SHA512 = r.extend({ _doReset: function() {
|
|
2552
2552
|
this._hash = new s.init([new i.init(1779033703, 4089235720), new i.init(3144134277, 2227873595), new i.init(1013904242, 4271175723), new i.init(2773480762, 1595750129), new i.init(1359893119, 2917565137), new i.init(2600822924, 725511199), new i.init(528734635, 4215389547), new i.init(1541459225, 327033209)]);
|
|
2553
2553
|
}, _doProcessBlock: function(p, w) {
|
|
2554
|
-
for (var v = this._hash.words, S = v[0], E = v[1], _ = v[2], k = v[3], A = v[4], P = v[5], I = v[6], N = v[7], z = S.high, B = S.low, d = E.high, h = E.low, y = _.high, m = _.low, l = k.high, g = k.low, x = A.high, O = A.low, R = P.high, j = P.low,
|
|
2554
|
+
for (var v = this._hash.words, S = v[0], E = v[1], _ = v[2], k = v[3], A = v[4], P = v[5], I = v[6], N = v[7], z = S.high, B = S.low, d = E.high, h = E.low, y = _.high, m = _.low, l = k.high, g = k.low, x = A.high, O = A.low, R = P.high, j = P.low, F = I.high, $ = I.low, V = N.high, D = N.low, U = z, G = B, Nt = d, dt = h, gt = y, Ft = m, mt = l, Mt = g, Zt = x, jt = O, oe = R, Qe = j, Yt = F, ee = $, zr = V, ae = D, Vt = 0; Vt < 80; Vt++) {
|
|
2555
2555
|
var Ke, ie, ce = f[Vt];
|
|
2556
2556
|
if (Vt < 16) ie = ce.high = 0 | p[w + 2 * Vt], Ke = ce.low = 0 | p[w + 2 * Vt + 1];
|
|
2557
2557
|
else {
|
|
2558
|
-
var jr = f[Vt - 15], se = jr.high, de = jr.low, Yr = (se >>> 1 | de << 31) ^ (se >>> 8 | de << 24) ^ se >>> 7, fe = (de >>> 1 | se << 31) ^ (de >>> 8 | se << 24) ^ (de >>> 7 | se << 25), re = f[Vt - 2], $e = re.high, ne = re.low, pe = ($e >>> 19 | ne << 13) ^ ($e << 3 | ne >>> 29) ^ $e >>> 6,
|
|
2559
|
-
ie = (ie = (ie = Yr + T + ((Ke = fe + C) >>> 0 < fe >>> 0 ? 1 : 0)) + pe + ((Ke +=
|
|
2558
|
+
var jr = f[Vt - 15], se = jr.high, de = jr.low, Yr = (se >>> 1 | de << 31) ^ (se >>> 8 | de << 24) ^ se >>> 7, fe = (de >>> 1 | se << 31) ^ (de >>> 8 | se << 24) ^ (de >>> 7 | se << 25), re = f[Vt - 2], $e = re.high, ne = re.low, pe = ($e >>> 19 | ne << 13) ^ ($e << 3 | ne >>> 29) ^ $e >>> 6, Me = (ne >>> 19 | $e << 13) ^ (ne << 3 | $e >>> 29) ^ (ne >>> 6 | $e << 26), he = f[Vt - 7], T = he.high, C = he.low, L = f[Vt - 16], b = L.high, M = L.low;
|
|
2559
|
+
ie = (ie = (ie = Yr + T + ((Ke = fe + C) >>> 0 < fe >>> 0 ? 1 : 0)) + pe + ((Ke += Me) >>> 0 < Me >>> 0 ? 1 : 0)) + b + ((Ke += M) >>> 0 < M >>> 0 ? 1 : 0), ce.high = ie, ce.low = Ke;
|
|
2560
2560
|
}
|
|
2561
|
-
var H, Z = Zt & oe ^ ~Zt & Yt, W = jt & Qe ^ ~jt & ee, q = U & Nt ^ U & gt ^ Nt & gt, Y =
|
|
2562
|
-
zr = Yt, ae = ee, Yt = oe, ee = Qe, oe = Zt, Qe = jt, Zt = mt + (ot = (ot = (ot = ot + Z + ((H += W) >>> 0 < W >>> 0 ? 1 : 0)) + ut + ((H += St) >>> 0 < St >>> 0 ? 1 : 0)) + ie + ((H += Ke) >>> 0 < Ke >>> 0 ? 1 : 0)) + ((jt = Mt + H | 0) >>> 0 < Mt >>> 0 ? 1 : 0) | 0, mt = gt, Mt =
|
|
2561
|
+
var H, Z = Zt & oe ^ ~Zt & Yt, W = jt & Qe ^ ~jt & ee, q = U & Nt ^ U & gt ^ Nt & gt, Y = G & dt ^ G & Ft ^ dt & Ft, vt = (U >>> 28 | G << 4) ^ (U << 30 | G >>> 2) ^ (U << 25 | G >>> 7), X = (G >>> 28 | U << 4) ^ (G << 30 | U >>> 2) ^ (G << 25 | U >>> 7), ct = (Zt >>> 14 | jt << 18) ^ (Zt >>> 18 | jt << 14) ^ (Zt << 23 | jt >>> 9), _t = (jt >>> 14 | Zt << 18) ^ (jt >>> 18 | Zt << 14) ^ (jt << 23 | Zt >>> 9), nt = c[Vt], ut = nt.high, St = nt.low, ot = zr + ct + ((H = ae + _t) >>> 0 < ae >>> 0 ? 1 : 0), ht = X + Y;
|
|
2562
|
+
zr = Yt, ae = ee, Yt = oe, ee = Qe, oe = Zt, Qe = jt, Zt = mt + (ot = (ot = (ot = ot + Z + ((H += W) >>> 0 < W >>> 0 ? 1 : 0)) + ut + ((H += St) >>> 0 < St >>> 0 ? 1 : 0)) + ie + ((H += Ke) >>> 0 < Ke >>> 0 ? 1 : 0)) + ((jt = Mt + H | 0) >>> 0 < Mt >>> 0 ? 1 : 0) | 0, mt = gt, Mt = Ft, gt = Nt, Ft = dt, Nt = U, dt = G, U = ot + (vt + q + (ht >>> 0 < X >>> 0 ? 1 : 0)) + ((G = H + ht | 0) >>> 0 < H >>> 0 ? 1 : 0) | 0;
|
|
2563
2563
|
}
|
|
2564
|
-
B = S.low = B +
|
|
2564
|
+
B = S.low = B + G, S.high = z + U + (B >>> 0 < G >>> 0 ? 1 : 0), h = E.low = h + dt, E.high = d + Nt + (h >>> 0 < dt >>> 0 ? 1 : 0), m = _.low = m + Ft, _.high = y + gt + (m >>> 0 < Ft >>> 0 ? 1 : 0), g = k.low = g + Mt, k.high = l + mt + (g >>> 0 < Mt >>> 0 ? 1 : 0), O = A.low = O + jt, A.high = x + Zt + (O >>> 0 < jt >>> 0 ? 1 : 0), j = P.low = j + Qe, P.high = R + oe + (j >>> 0 < Qe >>> 0 ? 1 : 0), $ = I.low = $ + ee, I.high = F + Yt + ($ >>> 0 < ee >>> 0 ? 1 : 0), D = N.low = D + ae, N.high = V + zr + (D >>> 0 < ae >>> 0 ? 1 : 0);
|
|
2565
2565
|
}, _doFinalize: function() {
|
|
2566
2566
|
var p = this._data, w = p.words, v = 8 * this._nDataBytes, S = 8 * p.sigBytes;
|
|
2567
2567
|
return w[S >>> 5] |= 128 << 24 - S % 32, w[30 + (S + 128 >>> 10 << 5)] = Math.floor(v / 4294967296), w[31 + (S + 128 >>> 10 << 5)] = v, p.sigBytes = 4 * w.length, this._process(), this._hash.toX32();
|
|
@@ -2571,11 +2571,11 @@ function Hc() {
|
|
|
2571
2571
|
}, blockSize: 32 });
|
|
2572
2572
|
t.SHA512 = r._createHelper(u), t.HmacSHA512 = r._createHmacHelper(u);
|
|
2573
2573
|
}(), e.SHA512;
|
|
2574
|
-
}(
|
|
2574
|
+
}(Jt(), xs())), Uc.exports;
|
|
2575
2575
|
}
|
|
2576
|
-
var
|
|
2576
|
+
var Dc, Iu = { exports: {} }, Fc, Zc = { exports: {} };
|
|
2577
2577
|
function Tu() {
|
|
2578
|
-
return
|
|
2578
|
+
return Fc || (Fc = 1, Zc.exports = function(e) {
|
|
2579
2579
|
return function(t) {
|
|
2580
2580
|
var r = e, n = r.lib, i = n.WordArray, s = n.Hasher, a = r.x64.Word, o = r.algo, c = [], f = [], u = [];
|
|
2581
2581
|
(function() {
|
|
@@ -2606,32 +2606,32 @@ function Tu() {
|
|
|
2606
2606
|
}, _doProcessBlock: function(v, S) {
|
|
2607
2607
|
for (var E = this._state, _ = this.blockSize / 2, k = 0; k < _; k++) {
|
|
2608
2608
|
var A = v[S + 2 * k], P = v[S + 2 * k + 1];
|
|
2609
|
-
A = 16711935 & (A << 8 | A >>> 24) | 4278255360 & (A << 24 | A >>> 8), P = 16711935 & (P << 8 | P >>> 24) | 4278255360 & (P << 24 | P >>> 8), (
|
|
2609
|
+
A = 16711935 & (A << 8 | A >>> 24) | 4278255360 & (A << 24 | A >>> 8), P = 16711935 & (P << 8 | P >>> 24) | 4278255360 & (P << 24 | P >>> 8), (D = E[k]).high ^= P, D.low ^= A;
|
|
2610
2610
|
}
|
|
2611
2611
|
for (var I = 0; I < 24; I++) {
|
|
2612
2612
|
for (var N = 0; N < 5; N++) {
|
|
2613
|
-
for (var z = 0, B = 0, d = 0; d < 5; d++) z ^= (
|
|
2613
|
+
for (var z = 0, B = 0, d = 0; d < 5; d++) z ^= (D = E[N + 5 * d]).high, B ^= D.low;
|
|
2614
2614
|
var h = p[N];
|
|
2615
2615
|
h.high = z, h.low = B;
|
|
2616
2616
|
}
|
|
2617
2617
|
for (N = 0; N < 5; N++) {
|
|
2618
2618
|
var y = p[(N + 4) % 5], m = p[(N + 1) % 5], l = m.high, g = m.low;
|
|
2619
|
-
for (z = y.high ^ (l << 1 | g >>> 31), B = y.low ^ (g << 1 | l >>> 31), d = 0; d < 5; d++) (
|
|
2619
|
+
for (z = y.high ^ (l << 1 | g >>> 31), B = y.low ^ (g << 1 | l >>> 31), d = 0; d < 5; d++) (D = E[N + 5 * d]).high ^= z, D.low ^= B;
|
|
2620
2620
|
}
|
|
2621
2621
|
for (var x = 1; x < 25; x++) {
|
|
2622
|
-
var O = (
|
|
2622
|
+
var O = (D = E[x]).high, R = D.low, j = c[x];
|
|
2623
2623
|
j < 32 ? (z = O << j | R >>> 32 - j, B = R << j | O >>> 32 - j) : (z = R << j - 32 | O >>> 64 - j, B = O << j - 32 | R >>> 64 - j);
|
|
2624
|
-
var
|
|
2625
|
-
|
|
2624
|
+
var F = p[f[x]];
|
|
2625
|
+
F.high = z, F.low = B;
|
|
2626
2626
|
}
|
|
2627
2627
|
var $ = p[0], V = E[0];
|
|
2628
2628
|
for ($.high = V.high, $.low = V.low, N = 0; N < 5; N++) for (d = 0; d < 5; d++) {
|
|
2629
|
-
var
|
|
2630
|
-
|
|
2629
|
+
var D = E[x = N + 5 * d], U = p[x], G = p[(N + 1) % 5 + 5 * d], Nt = p[(N + 2) % 5 + 5 * d];
|
|
2630
|
+
D.high = U.high ^ ~G.high & Nt.high, D.low = U.low ^ ~G.low & Nt.low;
|
|
2631
2631
|
}
|
|
2632
|
-
|
|
2632
|
+
D = E[0];
|
|
2633
2633
|
var dt = u[I];
|
|
2634
|
-
|
|
2634
|
+
D.high ^= dt.high, D.low ^= dt.low;
|
|
2635
2635
|
}
|
|
2636
2636
|
}, _doFinalize: function() {
|
|
2637
2637
|
var v = this._data, S = v.words;
|
|
@@ -2649,7 +2649,7 @@ function Tu() {
|
|
|
2649
2649
|
} });
|
|
2650
2650
|
r.SHA3 = s._createHelper(w), r.HmacSHA3 = s._createHmacHelper(w);
|
|
2651
2651
|
}(Math), e.SHA3;
|
|
2652
|
-
}(
|
|
2652
|
+
}(Jt(), xs())), Zc.exports;
|
|
2653
2653
|
}
|
|
2654
2654
|
var Vc, Ru = { exports: {} }, Kc, Wc = { exports: {} };
|
|
2655
2655
|
function Qo() {
|
|
@@ -2672,11 +2672,11 @@ function Qo() {
|
|
|
2672
2672
|
return s.reset(), s.finalize(this._oKey.clone().concat(a));
|
|
2673
2673
|
} });
|
|
2674
2674
|
})();
|
|
2675
|
-
}(
|
|
2675
|
+
}(Jt())), Wc.exports;
|
|
2676
2676
|
}
|
|
2677
|
-
var Yc, Nu = { exports: {} }, Qc,
|
|
2677
|
+
var Yc, Nu = { exports: {} }, Qc, Jc = { exports: {} };
|
|
2678
2678
|
function nn() {
|
|
2679
|
-
return Qc || (Qc = 1,
|
|
2679
|
+
return Qc || (Qc = 1, Jc.exports = function(e) {
|
|
2680
2680
|
return function() {
|
|
2681
2681
|
var t = e, r = t.lib, n = r.Base, i = r.WordArray, s = t.algo, a = s.MD5, o = s.EvpKDF = n.extend({ cfg: n.extend({ keySize: 4, hasher: a, iterations: 1 }), init: function(c) {
|
|
2682
2682
|
this.cfg = this.cfg.extend(c);
|
|
@@ -2692,11 +2692,11 @@ function nn() {
|
|
|
2692
2692
|
return o.create(u).compute(c, f);
|
|
2693
2693
|
};
|
|
2694
2694
|
}(), e.EvpKDF;
|
|
2695
|
-
}(
|
|
2695
|
+
}(Jt(), Rf(), Qo())), Jc.exports;
|
|
2696
2696
|
}
|
|
2697
|
-
var
|
|
2697
|
+
var Gc, Xc = { exports: {} };
|
|
2698
2698
|
function Be() {
|
|
2699
|
-
return
|
|
2699
|
+
return Gc || (Gc = 1, Xc.exports = function(e) {
|
|
2700
2700
|
e.lib.Cipher || function(t) {
|
|
2701
2701
|
var r = e, n = r.lib, i = n.Base, s = n.WordArray, a = n.BufferedBlockAlgorithm, o = r.enc;
|
|
2702
2702
|
o.Utf8;
|
|
@@ -2800,7 +2800,7 @@ function Be() {
|
|
|
2800
2800
|
return B.iv = d.iv, k.decrypt.call(this, I, N, d.key, B);
|
|
2801
2801
|
} });
|
|
2802
2802
|
}();
|
|
2803
|
-
}(
|
|
2803
|
+
}(Jt(), nn())), Xc.exports;
|
|
2804
2804
|
}
|
|
2805
2805
|
var t0, e0 = { exports: {} };
|
|
2806
2806
|
function Ou() {
|
|
@@ -2820,7 +2820,7 @@ function Ou() {
|
|
|
2820
2820
|
r.call(this, n, i, a, s), this._prevBlock = o;
|
|
2821
2821
|
} }), t;
|
|
2822
2822
|
}(), e.mode.CFB;
|
|
2823
|
-
}(
|
|
2823
|
+
}(Jt(), Be())), e0.exports;
|
|
2824
2824
|
}
|
|
2825
2825
|
var r0, n0 = { exports: {} };
|
|
2826
2826
|
function Cu() {
|
|
@@ -2833,7 +2833,7 @@ function Cu() {
|
|
|
2833
2833
|
for (var u = 0; u < a; u++) n[i + u] ^= f[u];
|
|
2834
2834
|
} }), t.Decryptor = r, t), e.mode.CTR;
|
|
2835
2835
|
var t, r;
|
|
2836
|
-
}(
|
|
2836
|
+
}(Jt(), Be())), n0.exports;
|
|
2837
2837
|
}
|
|
2838
2838
|
var i0, s0 = { exports: {} };
|
|
2839
2839
|
function Bu() {
|
|
@@ -2865,7 +2865,7 @@ function Bu() {
|
|
|
2865
2865
|
} });
|
|
2866
2866
|
return t.Decryptor = i, t;
|
|
2867
2867
|
}(), e.mode.CTRGladman;
|
|
2868
|
-
}(
|
|
2868
|
+
}(Jt(), Be())), s0.exports;
|
|
2869
2869
|
}
|
|
2870
2870
|
var o0, a0 = { exports: {} };
|
|
2871
2871
|
function Pu() {
|
|
@@ -2876,10 +2876,10 @@ function Pu() {
|
|
|
2876
2876
|
for (var f = 0; f < a; f++) n[i + f] ^= c[f];
|
|
2877
2877
|
} }), t.Decryptor = r, t), e.mode.OFB;
|
|
2878
2878
|
var t, r;
|
|
2879
|
-
}(
|
|
2879
|
+
}(Jt(), Be())), a0.exports;
|
|
2880
2880
|
}
|
|
2881
|
-
var c0, Lu = { exports: {} }, d0, zu = { exports: {} }, f0, ju = { exports: {} }, u0, $u = { exports: {} }, h0, qu = { exports: {} }, l0, Uu = { exports: {} }, p0, Hu = { exports: {} }, m0,
|
|
2882
|
-
function
|
|
2881
|
+
var c0, Lu = { exports: {} }, d0, zu = { exports: {} }, f0, ju = { exports: {} }, u0, $u = { exports: {} }, h0, qu = { exports: {} }, l0, Uu = { exports: {} }, p0, Hu = { exports: {} }, m0, Du = { exports: {} }, b0, g0 = { exports: {} };
|
|
2882
|
+
function Fu() {
|
|
2883
2883
|
return b0 || (b0 = 1, g0.exports = function(e) {
|
|
2884
2884
|
return function() {
|
|
2885
2885
|
var t = e, r = t.lib, n = r.WordArray, i = r.BlockCipher, s = t.algo, a = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4], o = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32], c = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28], f = [{ 0: 8421888, 268435456: 32768, 536870912: 8421378, 805306368: 2, 1073741824: 512, 1342177280: 8421890, 1610612736: 8389122, 1879048192: 8388608, 2147483648: 514, 2415919104: 8389120, 2684354560: 33280, 2952790016: 8421376, 3221225472: 32770, 3489660928: 8388610, 3758096384: 0, 4026531840: 33282, 134217728: 0, 402653184: 8421890, 671088640: 33282, 939524096: 32768, 1207959552: 8421888, 1476395008: 512, 1744830464: 8421378, 2013265920: 2, 2281701376: 8389120, 2550136832: 33280, 2818572288: 8421376, 3087007744: 8389122, 3355443200: 8388610, 3623878656: 32770, 3892314112: 514, 4160749568: 8388608, 1: 32768, 268435457: 2, 536870913: 8421888, 805306369: 8388608, 1073741825: 8421378, 1342177281: 33280, 1610612737: 512, 1879048193: 8389122, 2147483649: 8421890, 2415919105: 8421376, 2684354561: 8388610, 2952790017: 33282, 3221225473: 514, 3489660929: 8389120, 3758096385: 32770, 4026531841: 0, 134217729: 8421890, 402653185: 8421376, 671088641: 8388608, 939524097: 512, 1207959553: 32768, 1476395009: 8388610, 1744830465: 2, 2013265921: 33282, 2281701377: 32770, 2550136833: 8389122, 2818572289: 514, 3087007745: 8421888, 3355443201: 8389120, 3623878657: 0, 3892314113: 33280, 4160749569: 8421378 }, { 0: 1074282512, 16777216: 16384, 33554432: 524288, 50331648: 1074266128, 67108864: 1073741840, 83886080: 1074282496, 100663296: 1073758208, 117440512: 16, 134217728: 540672, 150994944: 1073758224, 167772160: 1073741824, 184549376: 540688, 201326592: 524304, 218103808: 0, 234881024: 16400, 251658240: 1074266112, 8388608: 1073758208, 25165824: 540688, 41943040: 16, 58720256: 1073758224, 75497472: 1074282512, 92274688: 1073741824, 109051904: 524288, 125829120: 1074266128, 142606336: 524304, 159383552: 0, 176160768: 16384, 192937984: 1074266112, 209715200: 1073741840, 226492416: 540672, 243269632: 1074282496, 260046848: 16400, 268435456: 0, 285212672: 1074266128, 301989888: 1073758224, 318767104: 1074282496, 335544320: 1074266112, 352321536: 16, 369098752: 540688, 385875968: 16384, 402653184: 16400, 419430400: 524288, 436207616: 524304, 452984832: 1073741840, 469762048: 540672, 486539264: 1073758208, 503316480: 1073741824, 520093696: 1074282512, 276824064: 540688, 293601280: 524288, 310378496: 1074266112, 327155712: 16384, 343932928: 1073758208, 360710144: 1074282512, 377487360: 16, 394264576: 1073741824, 411041792: 1074282496, 427819008: 1073741840, 444596224: 1073758224, 461373440: 524304, 478150656: 0, 494927872: 16400, 511705088: 1074266128, 528482304: 540672 }, { 0: 260, 1048576: 0, 2097152: 67109120, 3145728: 65796, 4194304: 65540, 5242880: 67108868, 6291456: 67174660, 7340032: 67174400, 8388608: 67108864, 9437184: 67174656, 10485760: 65792, 11534336: 67174404, 12582912: 67109124, 13631488: 65536, 14680064: 4, 15728640: 256, 524288: 67174656, 1572864: 67174404, 2621440: 0, 3670016: 67109120, 4718592: 67108868, 5767168: 65536, 6815744: 65540, 7864320: 260, 8912896: 4, 9961472: 256, 11010048: 67174400, 12058624: 65796, 13107200: 65792, 14155776: 67109124, 15204352: 67174660, 16252928: 67108864, 16777216: 67174656, 17825792: 65540, 18874368: 65536, 19922944: 67109120, 20971520: 256, 22020096: 67174660, 23068672: 67108868, 24117248: 0, 25165824: 67109124, 26214400: 67108864, 27262976: 4, 28311552: 65792, 29360128: 67174400, 30408704: 260, 31457280: 65796, 32505856: 67174404, 17301504: 67108864, 18350080: 260, 19398656: 67174656, 20447232: 0, 21495808: 65540, 22544384: 67109120, 23592960: 256, 24641536: 67174404, 25690112: 65536, 26738688: 67174660, 27787264: 65796, 28835840: 67108868, 29884416: 67109124, 30932992: 67174400, 31981568: 4, 33030144: 65792 }, { 0: 2151682048, 65536: 2147487808, 131072: 4198464, 196608: 2151677952, 262144: 0, 327680: 4198400, 393216: 2147483712, 458752: 4194368, 524288: 2147483648, 589824: 4194304, 655360: 64, 720896: 2147487744, 786432: 2151678016, 851968: 4160, 917504: 4096, 983040: 2151682112, 32768: 2147487808, 98304: 64, 163840: 2151678016, 229376: 2147487744, 294912: 4198400, 360448: 2151682112, 425984: 0, 491520: 2151677952, 557056: 4096, 622592: 2151682048, 688128: 4194304, 753664: 4160, 819200: 2147483648, 884736: 4194368, 950272: 4198464, 1015808: 2147483712, 1048576: 4194368, 1114112: 4198400, 1179648: 2147483712, 1245184: 0, 1310720: 4160, 1376256: 2151678016, 1441792: 2151682048, 1507328: 2147487808, 1572864: 2151682112, 1638400: 2147483648, 1703936: 2151677952, 1769472: 4198464, 1835008: 2147487744, 1900544: 4194304, 1966080: 64, 2031616: 4096, 1081344: 2151677952, 1146880: 2151682112, 1212416: 0, 1277952: 4198400, 1343488: 4194368, 1409024: 2147483648, 1474560: 2147487808, 1540096: 64, 1605632: 2147483712, 1671168: 4096, 1736704: 2147487744, 1802240: 2151678016, 1867776: 4160, 1933312: 2151682048, 1998848: 4194304, 2064384: 4198464 }, { 0: 128, 4096: 17039360, 8192: 262144, 12288: 536870912, 16384: 537133184, 20480: 16777344, 24576: 553648256, 28672: 262272, 32768: 16777216, 36864: 537133056, 40960: 536871040, 45056: 553910400, 49152: 553910272, 53248: 0, 57344: 17039488, 61440: 553648128, 2048: 17039488, 6144: 553648256, 10240: 128, 14336: 17039360, 18432: 262144, 22528: 537133184, 26624: 553910272, 30720: 536870912, 34816: 537133056, 38912: 0, 43008: 553910400, 47104: 16777344, 51200: 536871040, 55296: 553648128, 59392: 16777216, 63488: 262272, 65536: 262144, 69632: 128, 73728: 536870912, 77824: 553648256, 81920: 16777344, 86016: 553910272, 90112: 537133184, 94208: 16777216, 98304: 553910400, 102400: 553648128, 106496: 17039360, 110592: 537133056, 114688: 262272, 118784: 536871040, 122880: 0, 126976: 17039488, 67584: 553648256, 71680: 16777216, 75776: 17039360, 79872: 537133184, 83968: 536870912, 88064: 17039488, 92160: 128, 96256: 553910272, 100352: 262272, 104448: 553910400, 108544: 0, 112640: 553648128, 116736: 16777344, 120832: 262144, 124928: 537133056, 129024: 536871040 }, { 0: 268435464, 256: 8192, 512: 270532608, 768: 270540808, 1024: 268443648, 1280: 2097152, 1536: 2097160, 1792: 268435456, 2048: 0, 2304: 268443656, 2560: 2105344, 2816: 8, 3072: 270532616, 3328: 2105352, 3584: 8200, 3840: 270540800, 128: 270532608, 384: 270540808, 640: 8, 896: 2097152, 1152: 2105352, 1408: 268435464, 1664: 268443648, 1920: 8200, 2176: 2097160, 2432: 8192, 2688: 268443656, 2944: 270532616, 3200: 0, 3456: 270540800, 3712: 2105344, 3968: 268435456, 4096: 268443648, 4352: 270532616, 4608: 270540808, 4864: 8200, 5120: 2097152, 5376: 268435456, 5632: 268435464, 5888: 2105344, 6144: 2105352, 6400: 0, 6656: 8, 6912: 270532608, 7168: 8192, 7424: 268443656, 7680: 270540800, 7936: 2097160, 4224: 8, 4480: 2105344, 4736: 2097152, 4992: 268435464, 5248: 268443648, 5504: 8200, 5760: 270540808, 6016: 270532608, 6272: 270540800, 6528: 270532616, 6784: 8192, 7040: 2105352, 7296: 2097160, 7552: 0, 7808: 268435456, 8064: 268443656 }, { 0: 1048576, 16: 33555457, 32: 1024, 48: 1049601, 64: 34604033, 80: 0, 96: 1, 112: 34603009, 128: 33555456, 144: 1048577, 160: 33554433, 176: 34604032, 192: 34603008, 208: 1025, 224: 1049600, 240: 33554432, 8: 34603009, 24: 0, 40: 33555457, 56: 34604032, 72: 1048576, 88: 33554433, 104: 33554432, 120: 1025, 136: 1049601, 152: 33555456, 168: 34603008, 184: 1048577, 200: 1024, 216: 34604033, 232: 1, 248: 1049600, 256: 33554432, 272: 1048576, 288: 33555457, 304: 34603009, 320: 1048577, 336: 33555456, 352: 34604032, 368: 1049601, 384: 1025, 400: 34604033, 416: 1049600, 432: 1, 448: 0, 464: 34603008, 480: 33554433, 496: 1024, 264: 1049600, 280: 33555457, 296: 34603009, 312: 1, 328: 33554432, 344: 1048576, 360: 1025, 376: 34604032, 392: 33554433, 408: 34603008, 424: 0, 440: 34604033, 456: 1049601, 472: 1024, 488: 33555456, 504: 1048577 }, { 0: 134219808, 1: 131072, 2: 134217728, 3: 32, 4: 131104, 5: 134350880, 6: 134350848, 7: 2048, 8: 134348800, 9: 134219776, 10: 133120, 11: 134348832, 12: 2080, 13: 0, 14: 134217760, 15: 133152, 2147483648: 2048, 2147483649: 134350880, 2147483650: 134219808, 2147483651: 134217728, 2147483652: 134348800, 2147483653: 133120, 2147483654: 133152, 2147483655: 32, 2147483656: 134217760, 2147483657: 2080, 2147483658: 131104, 2147483659: 134350848, 2147483660: 0, 2147483661: 134348832, 2147483662: 134219776, 2147483663: 131072, 16: 133152, 17: 134350848, 18: 32, 19: 2048, 20: 134219776, 21: 134217760, 22: 134348832, 23: 131072, 24: 0, 25: 131104, 26: 134348800, 27: 134219808, 28: 134350880, 29: 133120, 30: 2080, 31: 134217728, 2147483664: 131072, 2147483665: 2048, 2147483666: 134348832, 2147483667: 133152, 2147483668: 32, 2147483669: 134348800, 2147483670: 134217728, 2147483671: 134219808, 2147483672: 134350880, 2147483673: 134217760, 2147483674: 134219776, 2147483675: 0, 2147483676: 133120, 2147483677: 2080, 2147483678: 131104, 2147483679: 134350848 }], u = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679], p = s.DES = i.extend({ _doReset: function() {
|
|
@@ -2929,7 +2929,7 @@ function Du() {
|
|
|
2929
2929
|
}, keySize: 6, ivSize: 2, blockSize: 2 });
|
|
2930
2930
|
t.TripleDES = i._createHelper(S);
|
|
2931
2931
|
}(), e.TripleDES;
|
|
2932
|
-
}(
|
|
2932
|
+
}(Jt(), yn(), vn(), nn(), Be())), g0.exports;
|
|
2933
2933
|
}
|
|
2934
2934
|
var y0, Zu = { exports: {} }, v0, Vu = { exports: {} }, w0, Ku = { exports: {} }, _0, x0 = { exports: {} };
|
|
2935
2935
|
function Wu() {
|
|
@@ -2978,11 +2978,11 @@ function Wu() {
|
|
|
2978
2978
|
}, blockSize: 2, keySize: 4, ivSize: 2 });
|
|
2979
2979
|
t.Blowfish = r._createHelper(w);
|
|
2980
2980
|
}(), e.Blowfish;
|
|
2981
|
-
}(
|
|
2981
|
+
}(Jt(), yn(), vn(), nn(), Be())), x0.exports;
|
|
2982
2982
|
}
|
|
2983
2983
|
If.exports = /* @__PURE__ */ function(e) {
|
|
2984
2984
|
return e;
|
|
2985
|
-
}(
|
|
2985
|
+
}(Jt(), xs(), Au(), ku(), yn(), Mu(), vn(), Rf(), uo(), $c || ($c = 1, Eu.exports = function(e) {
|
|
2986
2986
|
return function() {
|
|
2987
2987
|
var t = e, r = t.lib.WordArray, n = t.algo, i = n.SHA256, s = n.SHA224 = i.extend({ _doReset: function() {
|
|
2988
2988
|
this._hash = new r.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]);
|
|
@@ -2992,7 +2992,7 @@ If.exports = /* @__PURE__ */ function(e) {
|
|
|
2992
2992
|
} });
|
|
2993
2993
|
t.SHA224 = i._createHelper(s), t.HmacSHA224 = i._createHmacHelper(s);
|
|
2994
2994
|
}(), e.SHA224;
|
|
2995
|
-
}(
|
|
2995
|
+
}(Jt(), uo())), Hc(), Dc || (Dc = 1, Iu.exports = function(e) {
|
|
2996
2996
|
return function() {
|
|
2997
2997
|
var t = e, r = t.x64, n = r.Word, i = r.WordArray, s = t.algo, a = s.SHA512, o = s.SHA384 = a.extend({ _doReset: function() {
|
|
2998
2998
|
this._hash = new i.init([new n.init(3418070365, 3238371032), new n.init(1654270250, 914150663), new n.init(2438529370, 812702999), new n.init(355462360, 4144912697), new n.init(1731405415, 4290775857), new n.init(2394180231, 1750603025), new n.init(3675008525, 1694076839), new n.init(1203062813, 3204075428)]);
|
|
@@ -3002,7 +3002,7 @@ If.exports = /* @__PURE__ */ function(e) {
|
|
|
3002
3002
|
} });
|
|
3003
3003
|
t.SHA384 = a._createHelper(o), t.HmacSHA384 = a._createHmacHelper(o);
|
|
3004
3004
|
}(), e.SHA384;
|
|
3005
|
-
}(
|
|
3005
|
+
}(Jt(), xs(), Hc())), Tu(), Vc || (Vc = 1, Ru.exports = function(e) {
|
|
3006
3006
|
/** @preserve
|
|
3007
3007
|
(c) 2012 by Cédric Mesnil. All rights reserved.
|
|
3008
3008
|
|
|
@@ -3021,9 +3021,9 @@ If.exports = /* @__PURE__ */ function(e) {
|
|
|
3021
3021
|
var z = I + N, B = P[z];
|
|
3022
3022
|
P[z] = 16711935 & (B << 8 | B >>> 24) | 4278255360 & (B << 24 | B >>> 8);
|
|
3023
3023
|
}
|
|
3024
|
-
var d, h, y, m, l, g, x, O, R, j,
|
|
3025
|
-
for (g = d = $[0], x = h = $[1], O = y = $[2], R = m = $[3], j = l = $[4], N = 0; N < 80; N += 1)
|
|
3026
|
-
|
|
3024
|
+
var d, h, y, m, l, g, x, O, R, j, F, $ = this._hash.words, V = u.words, D = p.words, U = a.words, G = o.words, Nt = c.words, dt = f.words;
|
|
3025
|
+
for (g = d = $[0], x = h = $[1], O = y = $[2], R = m = $[3], j = l = $[4], N = 0; N < 80; N += 1) F = d + P[I + U[N]] | 0, F += N < 16 ? v(h, y, m) + V[0] : N < 32 ? S(h, y, m) + V[1] : N < 48 ? E(h, y, m) + V[2] : N < 64 ? _(h, y, m) + V[3] : k(h, y, m) + V[4], F = (F = A(F |= 0, Nt[N])) + l | 0, d = l, l = m, m = A(y, 10), y = h, h = F, F = g + P[I + G[N]] | 0, F += N < 16 ? k(x, O, R) + D[0] : N < 32 ? _(x, O, R) + D[1] : N < 48 ? E(x, O, R) + D[2] : N < 64 ? S(x, O, R) + D[3] : v(x, O, R) + D[4], F = (F = A(F |= 0, dt[N])) + j | 0, g = j, j = R, R = A(O, 10), O = x, x = F;
|
|
3026
|
+
F = $[1] + y + R | 0, $[1] = $[2] + m + j | 0, $[2] = $[3] + l + g | 0, $[3] = $[4] + d + x | 0, $[4] = $[0] + h + O | 0, $[0] = F;
|
|
3027
3027
|
}, _doFinalize: function() {
|
|
3028
3028
|
var P = this._data, I = P.words, N = 8 * this._nDataBytes, z = 8 * P.sigBytes;
|
|
3029
3029
|
I[z >>> 5] |= 128 << 24 - z % 32, I[14 + (z + 64 >>> 9 << 4)] = 16711935 & (N << 8 | N >>> 24) | 4278255360 & (N << 24 | N >>> 8), P.sigBytes = 4 * (I.length + 1), this._process();
|
|
@@ -3056,7 +3056,7 @@ If.exports = /* @__PURE__ */ function(e) {
|
|
|
3056
3056
|
}
|
|
3057
3057
|
t.RIPEMD160 = i._createHelper(w), t.HmacRIPEMD160 = i._createHmacHelper(w);
|
|
3058
3058
|
}(), e.RIPEMD160;
|
|
3059
|
-
}(
|
|
3059
|
+
}(Jt())), Qo(), Yc || (Yc = 1, Nu.exports = function(e) {
|
|
3060
3060
|
return function() {
|
|
3061
3061
|
var t = e, r = t.lib, n = r.Base, i = r.WordArray, s = t.algo, a = s.SHA256, o = s.HMAC, c = s.PBKDF2 = n.extend({ cfg: n.extend({ keySize: 4, hasher: a, iterations: 25e4 }), init: function(f) {
|
|
3062
3062
|
this.cfg = this.cfg.extend(f);
|
|
@@ -3076,14 +3076,14 @@ If.exports = /* @__PURE__ */ function(e) {
|
|
|
3076
3076
|
return c.create(p).compute(f, u);
|
|
3077
3077
|
};
|
|
3078
3078
|
}(), e.PBKDF2;
|
|
3079
|
-
}(
|
|
3079
|
+
}(Jt(), uo(), Qo())), nn(), Be(), Ou(), Cu(), Bu(), Pu(), c0 || (c0 = 1, Lu.exports = function(e) {
|
|
3080
3080
|
return e.mode.ECB = ((t = e.lib.BlockCipherMode.extend()).Encryptor = t.extend({ processBlock: function(r, n) {
|
|
3081
3081
|
this._cipher.encryptBlock(r, n);
|
|
3082
3082
|
} }), t.Decryptor = t.extend({ processBlock: function(r, n) {
|
|
3083
3083
|
this._cipher.decryptBlock(r, n);
|
|
3084
3084
|
} }), t), e.mode.ECB;
|
|
3085
3085
|
var t;
|
|
3086
|
-
}(
|
|
3086
|
+
}(Jt(), Be())), d0 || (d0 = 1, zu.exports = function(e) {
|
|
3087
3087
|
return e.pad.AnsiX923 = { pad: function(t, r) {
|
|
3088
3088
|
var n = t.sigBytes, i = 4 * r, s = i - n % i, a = n + s - 1;
|
|
3089
3089
|
t.clamp(), t.words[a >>> 2] |= s << 24 - a % 4 * 8, t.sigBytes += s;
|
|
@@ -3091,7 +3091,7 @@ If.exports = /* @__PURE__ */ function(e) {
|
|
|
3091
3091
|
var r = 255 & t.words[t.sigBytes - 1 >>> 2];
|
|
3092
3092
|
t.sigBytes -= r;
|
|
3093
3093
|
} }, e.pad.Ansix923;
|
|
3094
|
-
}(
|
|
3094
|
+
}(Jt(), Be())), f0 || (f0 = 1, ju.exports = function(e) {
|
|
3095
3095
|
return e.pad.Iso10126 = { pad: function(t, r) {
|
|
3096
3096
|
var n = 4 * r, i = n - t.sigBytes % n;
|
|
3097
3097
|
t.concat(e.lib.WordArray.random(i - 1)).concat(e.lib.WordArray.create([i << 24], 1));
|
|
@@ -3099,13 +3099,13 @@ If.exports = /* @__PURE__ */ function(e) {
|
|
|
3099
3099
|
var r = 255 & t.words[t.sigBytes - 1 >>> 2];
|
|
3100
3100
|
t.sigBytes -= r;
|
|
3101
3101
|
} }, e.pad.Iso10126;
|
|
3102
|
-
}(
|
|
3102
|
+
}(Jt(), Be())), u0 || (u0 = 1, $u.exports = function(e) {
|
|
3103
3103
|
return e.pad.Iso97971 = { pad: function(t, r) {
|
|
3104
3104
|
t.concat(e.lib.WordArray.create([2147483648], 1)), e.pad.ZeroPadding.pad(t, r);
|
|
3105
3105
|
}, unpad: function(t) {
|
|
3106
3106
|
e.pad.ZeroPadding.unpad(t), t.sigBytes--;
|
|
3107
3107
|
} }, e.pad.Iso97971;
|
|
3108
|
-
}(
|
|
3108
|
+
}(Jt(), Be())), h0 || (h0 = 1, qu.exports = function(e) {
|
|
3109
3109
|
return e.pad.ZeroPadding = { pad: function(t, r) {
|
|
3110
3110
|
var n = 4 * r;
|
|
3111
3111
|
t.clamp(), t.sigBytes += n - (t.sigBytes % n || n);
|
|
@@ -3116,11 +3116,11 @@ If.exports = /* @__PURE__ */ function(e) {
|
|
|
3116
3116
|
break;
|
|
3117
3117
|
}
|
|
3118
3118
|
} }, e.pad.ZeroPadding;
|
|
3119
|
-
}(
|
|
3119
|
+
}(Jt(), Be())), l0 || (l0 = 1, Uu.exports = function(e) {
|
|
3120
3120
|
return e.pad.NoPadding = { pad: function() {
|
|
3121
3121
|
}, unpad: function() {
|
|
3122
3122
|
} }, e.pad.NoPadding;
|
|
3123
|
-
}(
|
|
3123
|
+
}(Jt(), Be())), p0 || (p0 = 1, Hu.exports = function(e) {
|
|
3124
3124
|
return r = (t = e).lib.CipherParams, n = t.enc.Hex, t.format.Hex = { stringify: function(i) {
|
|
3125
3125
|
return i.ciphertext.toString(n);
|
|
3126
3126
|
}, parse: function(i) {
|
|
@@ -3128,7 +3128,7 @@ If.exports = /* @__PURE__ */ function(e) {
|
|
|
3128
3128
|
return r.create({ ciphertext: s });
|
|
3129
3129
|
} }, e.format.Hex;
|
|
3130
3130
|
var t, r, n;
|
|
3131
|
-
}(
|
|
3131
|
+
}(Jt(), Be())), m0 || (m0 = 1, Du.exports = function(e) {
|
|
3132
3132
|
return function() {
|
|
3133
3133
|
var t = e, r = t.lib.BlockCipher, n = t.algo, i = [], s = [], a = [], o = [], c = [], f = [], u = [], p = [], w = [], v = [];
|
|
3134
3134
|
(function() {
|
|
@@ -3157,14 +3157,14 @@ If.exports = /* @__PURE__ */ function(e) {
|
|
|
3157
3157
|
_[k + 1] = _[k + 3], _[k + 3] = A, this._doCryptBlock(_, k, this._invKeySchedule, u, p, w, v, s), A = _[k + 1], _[k + 1] = _[k + 3], _[k + 3] = A;
|
|
3158
3158
|
}, _doCryptBlock: function(_, k, A, P, I, N, z, B) {
|
|
3159
3159
|
for (var d = this._nRounds, h = _[k] ^ A[0], y = _[k + 1] ^ A[1], m = _[k + 2] ^ A[2], l = _[k + 3] ^ A[3], g = 4, x = 1; x < d; x++) {
|
|
3160
|
-
var O = P[h >>> 24] ^ I[y >>> 16 & 255] ^ N[m >>> 8 & 255] ^ z[255 & l] ^ A[g++], R = P[y >>> 24] ^ I[m >>> 16 & 255] ^ N[l >>> 8 & 255] ^ z[255 & h] ^ A[g++], j = P[m >>> 24] ^ I[l >>> 16 & 255] ^ N[h >>> 8 & 255] ^ z[255 & y] ^ A[g++],
|
|
3161
|
-
h = O, y = R, m = j, l =
|
|
3160
|
+
var O = P[h >>> 24] ^ I[y >>> 16 & 255] ^ N[m >>> 8 & 255] ^ z[255 & l] ^ A[g++], R = P[y >>> 24] ^ I[m >>> 16 & 255] ^ N[l >>> 8 & 255] ^ z[255 & h] ^ A[g++], j = P[m >>> 24] ^ I[l >>> 16 & 255] ^ N[h >>> 8 & 255] ^ z[255 & y] ^ A[g++], F = P[l >>> 24] ^ I[h >>> 16 & 255] ^ N[y >>> 8 & 255] ^ z[255 & m] ^ A[g++];
|
|
3161
|
+
h = O, y = R, m = j, l = F;
|
|
3162
3162
|
}
|
|
3163
|
-
O = (B[h >>> 24] << 24 | B[y >>> 16 & 255] << 16 | B[m >>> 8 & 255] << 8 | B[255 & l]) ^ A[g++], R = (B[y >>> 24] << 24 | B[m >>> 16 & 255] << 16 | B[l >>> 8 & 255] << 8 | B[255 & h]) ^ A[g++], j = (B[m >>> 24] << 24 | B[l >>> 16 & 255] << 16 | B[h >>> 8 & 255] << 8 | B[255 & y]) ^ A[g++],
|
|
3163
|
+
O = (B[h >>> 24] << 24 | B[y >>> 16 & 255] << 16 | B[m >>> 8 & 255] << 8 | B[255 & l]) ^ A[g++], R = (B[y >>> 24] << 24 | B[m >>> 16 & 255] << 16 | B[l >>> 8 & 255] << 8 | B[255 & h]) ^ A[g++], j = (B[m >>> 24] << 24 | B[l >>> 16 & 255] << 16 | B[h >>> 8 & 255] << 8 | B[255 & y]) ^ A[g++], F = (B[l >>> 24] << 24 | B[h >>> 16 & 255] << 16 | B[y >>> 8 & 255] << 8 | B[255 & m]) ^ A[g++], _[k] = O, _[k + 1] = R, _[k + 2] = j, _[k + 3] = F;
|
|
3164
3164
|
}, keySize: 8 });
|
|
3165
3165
|
t.AES = r._createHelper(E);
|
|
3166
3166
|
}(), e.AES;
|
|
3167
|
-
}(
|
|
3167
|
+
}(Jt(), yn(), vn(), nn(), Be())), Fu(), y0 || (y0 = 1, Zu.exports = function(e) {
|
|
3168
3168
|
return function() {
|
|
3169
3169
|
var t = e, r = t.lib.StreamCipher, n = t.algo, i = n.RC4 = r.extend({ _doReset: function() {
|
|
3170
3170
|
for (var o = this._key, c = o.words, f = o.sigBytes, u = this._S = [], p = 0; p < 256; p++) u[p] = p;
|
|
@@ -3194,7 +3194,7 @@ If.exports = /* @__PURE__ */ function(e) {
|
|
|
3194
3194
|
} });
|
|
3195
3195
|
t.RC4Drop = r._createHelper(a);
|
|
3196
3196
|
}(), e.RC4;
|
|
3197
|
-
}(
|
|
3197
|
+
}(Jt(), yn(), vn(), nn(), Be())), v0 || (v0 = 1, Vu.exports = function(e) {
|
|
3198
3198
|
return function() {
|
|
3199
3199
|
var t = e, r = t.lib.StreamCipher, n = t.algo, i = [], s = [], a = [], o = n.Rabbit = r.extend({ _doReset: function() {
|
|
3200
3200
|
for (var f = this._key.words, u = this.cfg.iv, p = 0; p < 4; p++) f[p] = 16711935 & (f[p] << 8 | f[p] >>> 24) | 4278255360 & (f[p] << 24 | f[p] >>> 8);
|
|
@@ -3220,7 +3220,7 @@ If.exports = /* @__PURE__ */ function(e) {
|
|
|
3220
3220
|
}
|
|
3221
3221
|
t.Rabbit = r._createHelper(o);
|
|
3222
3222
|
}(), e.Rabbit;
|
|
3223
|
-
}(
|
|
3223
|
+
}(Jt(), yn(), vn(), nn(), Be())), w0 || (w0 = 1, Ku.exports = function(e) {
|
|
3224
3224
|
return function() {
|
|
3225
3225
|
var t = e, r = t.lib.StreamCipher, n = t.algo, i = [], s = [], a = [], o = n.RabbitLegacy = r.extend({ _doReset: function() {
|
|
3226
3226
|
var f = this._key.words, u = this.cfg.iv, p = this._X = [f[0], f[3] << 16 | f[2] >>> 16, f[1], f[0] << 16 | f[3] >>> 16, f[2], f[1] << 16 | f[0] >>> 16, f[3], f[2] << 16 | f[1] >>> 16], w = this._C = [f[2] << 16 | f[2] >>> 16, 4294901760 & f[0] | 65535 & f[1], f[3] << 16 | f[3] >>> 16, 4294901760 & f[1] | 65535 & f[2], f[0] << 16 | f[0] >>> 16, 4294901760 & f[2] | 65535 & f[3], f[1] << 16 | f[1] >>> 16, 4294901760 & f[3] | 65535 & f[0]];
|
|
@@ -3246,8 +3246,8 @@ If.exports = /* @__PURE__ */ function(e) {
|
|
|
3246
3246
|
}
|
|
3247
3247
|
t.RabbitLegacy = r._createHelper(o);
|
|
3248
3248
|
}(), e.RabbitLegacy;
|
|
3249
|
-
}(
|
|
3250
|
-
const
|
|
3249
|
+
}(Jt(), yn(), vn(), nn(), Be())), Wu());
|
|
3250
|
+
const Se = di(If.exports);
|
|
3251
3251
|
var Nf = {};
|
|
3252
3252
|
const Yu = "6.6.1";
|
|
3253
3253
|
var nr = {}, Of = { exports: {} };
|
|
@@ -3268,7 +3268,7 @@ var nr = {}, Of = { exports: {} };
|
|
|
3268
3268
|
var s;
|
|
3269
3269
|
typeof e == "object" ? e.exports = i : t.BN = i, i.BN = i, i.wordSize = 26;
|
|
3270
3270
|
try {
|
|
3271
|
-
s = typeof window < "u" && window.Buffer !== void 0 ? window.Buffer :
|
|
3271
|
+
s = typeof window < "u" && window.Buffer !== void 0 ? window.Buffer : Ds.Buffer;
|
|
3272
3272
|
} catch {
|
|
3273
3273
|
}
|
|
3274
3274
|
function a(d, h) {
|
|
@@ -3321,9 +3321,9 @@ var nr = {}, Of = { exports: {} };
|
|
|
3321
3321
|
m--, l = l / h | 0;
|
|
3322
3322
|
for (var g = d.length - y, x = g % m, O = Math.min(g, g - x) + y, R = 0, j = y; j < O; j += m) R = c(d, j, j + m, h), this.imuln(l), this.words[0] + R < 67108864 ? this.words[0] += R : this._iaddn(R);
|
|
3323
3323
|
if (x !== 0) {
|
|
3324
|
-
var
|
|
3325
|
-
for (R = c(d, j, d.length, h), j = 0; j < x; j++)
|
|
3326
|
-
this.imuln(
|
|
3324
|
+
var F = 1;
|
|
3325
|
+
for (R = c(d, j, d.length, h), j = 0; j < x; j++) F *= h;
|
|
3326
|
+
this.imuln(F), this.words[0] + R < 67108864 ? this.words[0] += R : this._iaddn(R);
|
|
3327
3327
|
}
|
|
3328
3328
|
this.strip();
|
|
3329
3329
|
}, i.prototype.copy = function(d) {
|
|
@@ -3352,11 +3352,11 @@ var nr = {}, Of = { exports: {} };
|
|
|
3352
3352
|
var l = 0 | d.words[0], g = 0 | h.words[0], x = l * g, O = 67108863 & x, R = x / 67108864 | 0;
|
|
3353
3353
|
y.words[0] = O;
|
|
3354
3354
|
for (var j = 1; j < m; j++) {
|
|
3355
|
-
for (var
|
|
3356
|
-
var U = j -
|
|
3357
|
-
|
|
3355
|
+
for (var F = R >>> 26, $ = 67108863 & R, V = Math.min(j, h.length - 1), D = Math.max(0, j - d.length + 1); D <= V; D++) {
|
|
3356
|
+
var U = j - D | 0;
|
|
3357
|
+
F += (x = (l = 0 | d.words[U]) * (g = 0 | h.words[D]) + $) / 67108864 | 0, $ = 67108863 & x;
|
|
3358
3358
|
}
|
|
3359
|
-
y.words[j] = 0 | $, R = 0 |
|
|
3359
|
+
y.words[j] = 0 | $, R = 0 | F;
|
|
3360
3360
|
}
|
|
3361
3361
|
return R !== 0 ? y.words[j] = 0 | R : y.length--, y.strip();
|
|
3362
3362
|
}
|
|
@@ -3374,10 +3374,10 @@ var nr = {}, Of = { exports: {} };
|
|
|
3374
3374
|
if (d === (0 | d) && d >= 2 && d <= 36) {
|
|
3375
3375
|
var R = u[d], j = p[d];
|
|
3376
3376
|
y = "";
|
|
3377
|
-
var
|
|
3378
|
-
for (
|
|
3379
|
-
var $ =
|
|
3380
|
-
y = (
|
|
3377
|
+
var F = this.clone();
|
|
3378
|
+
for (F.negative = 0; !F.isZero(); ) {
|
|
3379
|
+
var $ = F.modn(j).toString(d);
|
|
3380
|
+
y = (F = F.idivn(j)).isZero() ? $ + y : f[R - $.length] + $ + y;
|
|
3381
3381
|
}
|
|
3382
3382
|
for (this.isZero() && (y = "0" + y); y.length % h !== 0; ) y = "0" + y;
|
|
3383
3383
|
return this.negative !== 0 && (y = "-" + y), y;
|
|
@@ -3511,30 +3511,30 @@ var nr = {}, Of = { exports: {} };
|
|
|
3511
3511
|
return this.clone().isub(d);
|
|
3512
3512
|
};
|
|
3513
3513
|
var v = function(d, h, y) {
|
|
3514
|
-
var m, l, g, x = d.words, O = h.words, R = y.words, j = 0,
|
|
3514
|
+
var m, l, g, x = d.words, O = h.words, R = y.words, j = 0, F = 0 | x[0], $ = 8191 & F, V = F >>> 13, D = 0 | x[1], U = 8191 & D, G = D >>> 13, Nt = 0 | x[2], dt = 8191 & Nt, gt = Nt >>> 13, Ft = 0 | x[3], mt = 8191 & Ft, Mt = Ft >>> 13, Zt = 0 | x[4], jt = 8191 & Zt, oe = Zt >>> 13, Qe = 0 | x[5], Yt = 8191 & Qe, ee = Qe >>> 13, zr = 0 | x[6], ae = 8191 & zr, Vt = zr >>> 13, Ke = 0 | x[7], ie = 8191 & Ke, ce = Ke >>> 13, jr = 0 | x[8], se = 8191 & jr, de = jr >>> 13, Yr = 0 | x[9], fe = 8191 & Yr, re = Yr >>> 13, $e = 0 | O[0], ne = 8191 & $e, pe = $e >>> 13, Me = 0 | O[1], he = 8191 & Me, T = Me >>> 13, C = 0 | O[2], L = 8191 & C, b = C >>> 13, M = 0 | O[3], H = 8191 & M, Z = M >>> 13, W = 0 | O[4], q = 8191 & W, Y = W >>> 13, vt = 0 | O[5], X = 8191 & vt, ct = vt >>> 13, _t = 0 | O[6], nt = 8191 & _t, ut = _t >>> 13, St = 0 | O[7], ot = 8191 & St, ht = St >>> 13, At = 0 | O[8], it = 8191 & At, lt = At >>> 13, Lt = 0 | O[9], at = 8191 & Lt, K = Lt >>> 13;
|
|
3515
3515
|
y.negative = d.negative ^ h.negative, y.length = 19;
|
|
3516
3516
|
var Q = (j + (m = Math.imul($, ne)) | 0) + ((8191 & (l = (l = Math.imul($, pe)) + Math.imul(V, ne) | 0)) << 13) | 0;
|
|
3517
|
-
j = ((g = Math.imul(V, pe)) + (l >>> 13) | 0) + (Q >>> 26) | 0, Q &= 67108863, m = Math.imul(U, ne), l = (l = Math.imul(U, pe)) + Math.imul(
|
|
3517
|
+
j = ((g = Math.imul(V, pe)) + (l >>> 13) | 0) + (Q >>> 26) | 0, Q &= 67108863, m = Math.imul(U, ne), l = (l = Math.imul(U, pe)) + Math.imul(G, ne) | 0, g = Math.imul(G, pe);
|
|
3518
3518
|
var st = (j + (m = m + Math.imul($, he) | 0) | 0) + ((8191 & (l = (l = l + Math.imul($, T) | 0) + Math.imul(V, he) | 0)) << 13) | 0;
|
|
3519
|
-
j = ((g = g + Math.imul(V, T) | 0) + (l >>> 13) | 0) + (st >>> 26) | 0, st &= 67108863, m = Math.imul(dt, ne), l = (l = Math.imul(dt, pe)) + Math.imul(gt, ne) | 0, g = Math.imul(gt, pe), m = m + Math.imul(U, he) | 0, l = (l = l + Math.imul(U, T) | 0) + Math.imul(
|
|
3519
|
+
j = ((g = g + Math.imul(V, T) | 0) + (l >>> 13) | 0) + (st >>> 26) | 0, st &= 67108863, m = Math.imul(dt, ne), l = (l = Math.imul(dt, pe)) + Math.imul(gt, ne) | 0, g = Math.imul(gt, pe), m = m + Math.imul(U, he) | 0, l = (l = l + Math.imul(U, T) | 0) + Math.imul(G, he) | 0, g = g + Math.imul(G, T) | 0;
|
|
3520
3520
|
var tt = (j + (m = m + Math.imul($, L) | 0) | 0) + ((8191 & (l = (l = l + Math.imul($, b) | 0) + Math.imul(V, L) | 0)) << 13) | 0;
|
|
3521
|
-
j = ((g = g + Math.imul(V, b) | 0) + (l >>> 13) | 0) + (tt >>> 26) | 0, tt &= 67108863, m = Math.imul(mt, ne), l = (l = Math.imul(mt, pe)) + Math.imul(Mt, ne) | 0, g = Math.imul(Mt, pe), m = m + Math.imul(dt, he) | 0, l = (l = l + Math.imul(dt, T) | 0) + Math.imul(gt, he) | 0, g = g + Math.imul(gt, T) | 0, m = m + Math.imul(U, L) | 0, l = (l = l + Math.imul(U, b) | 0) + Math.imul(
|
|
3521
|
+
j = ((g = g + Math.imul(V, b) | 0) + (l >>> 13) | 0) + (tt >>> 26) | 0, tt &= 67108863, m = Math.imul(mt, ne), l = (l = Math.imul(mt, pe)) + Math.imul(Mt, ne) | 0, g = Math.imul(Mt, pe), m = m + Math.imul(dt, he) | 0, l = (l = l + Math.imul(dt, T) | 0) + Math.imul(gt, he) | 0, g = g + Math.imul(gt, T) | 0, m = m + Math.imul(U, L) | 0, l = (l = l + Math.imul(U, b) | 0) + Math.imul(G, L) | 0, g = g + Math.imul(G, b) | 0;
|
|
3522
3522
|
var et = (j + (m = m + Math.imul($, H) | 0) | 0) + ((8191 & (l = (l = l + Math.imul($, Z) | 0) + Math.imul(V, H) | 0)) << 13) | 0;
|
|
3523
|
-
j = ((g = g + Math.imul(V, Z) | 0) + (l >>> 13) | 0) + (et >>> 26) | 0, et &= 67108863, m = Math.imul(jt, ne), l = (l = Math.imul(jt, pe)) + Math.imul(oe, ne) | 0, g = Math.imul(oe, pe), m = m + Math.imul(mt, he) | 0, l = (l = l + Math.imul(mt, T) | 0) + Math.imul(Mt, he) | 0, g = g + Math.imul(Mt, T) | 0, m = m + Math.imul(dt, L) | 0, l = (l = l + Math.imul(dt, b) | 0) + Math.imul(gt, L) | 0, g = g + Math.imul(gt, b) | 0, m = m + Math.imul(U, H) | 0, l = (l = l + Math.imul(U, Z) | 0) + Math.imul(
|
|
3523
|
+
j = ((g = g + Math.imul(V, Z) | 0) + (l >>> 13) | 0) + (et >>> 26) | 0, et &= 67108863, m = Math.imul(jt, ne), l = (l = Math.imul(jt, pe)) + Math.imul(oe, ne) | 0, g = Math.imul(oe, pe), m = m + Math.imul(mt, he) | 0, l = (l = l + Math.imul(mt, T) | 0) + Math.imul(Mt, he) | 0, g = g + Math.imul(Mt, T) | 0, m = m + Math.imul(dt, L) | 0, l = (l = l + Math.imul(dt, b) | 0) + Math.imul(gt, L) | 0, g = g + Math.imul(gt, b) | 0, m = m + Math.imul(U, H) | 0, l = (l = l + Math.imul(U, Z) | 0) + Math.imul(G, H) | 0, g = g + Math.imul(G, Z) | 0;
|
|
3524
3524
|
var rt = (j + (m = m + Math.imul($, q) | 0) | 0) + ((8191 & (l = (l = l + Math.imul($, Y) | 0) + Math.imul(V, q) | 0)) << 13) | 0;
|
|
3525
|
-
j = ((g = g + Math.imul(V, Y) | 0) + (l >>> 13) | 0) + (rt >>> 26) | 0, rt &= 67108863, m = Math.imul(Yt, ne), l = (l = Math.imul(Yt, pe)) + Math.imul(ee, ne) | 0, g = Math.imul(ee, pe), m = m + Math.imul(jt, he) | 0, l = (l = l + Math.imul(jt, T) | 0) + Math.imul(oe, he) | 0, g = g + Math.imul(oe, T) | 0, m = m + Math.imul(mt, L) | 0, l = (l = l + Math.imul(mt, b) | 0) + Math.imul(Mt, L) | 0, g = g + Math.imul(Mt, b) | 0, m = m + Math.imul(dt, H) | 0, l = (l = l + Math.imul(dt, Z) | 0) + Math.imul(gt, H) | 0, g = g + Math.imul(gt, Z) | 0, m = m + Math.imul(U, q) | 0, l = (l = l + Math.imul(U, Y) | 0) + Math.imul(
|
|
3525
|
+
j = ((g = g + Math.imul(V, Y) | 0) + (l >>> 13) | 0) + (rt >>> 26) | 0, rt &= 67108863, m = Math.imul(Yt, ne), l = (l = Math.imul(Yt, pe)) + Math.imul(ee, ne) | 0, g = Math.imul(ee, pe), m = m + Math.imul(jt, he) | 0, l = (l = l + Math.imul(jt, T) | 0) + Math.imul(oe, he) | 0, g = g + Math.imul(oe, T) | 0, m = m + Math.imul(mt, L) | 0, l = (l = l + Math.imul(mt, b) | 0) + Math.imul(Mt, L) | 0, g = g + Math.imul(Mt, b) | 0, m = m + Math.imul(dt, H) | 0, l = (l = l + Math.imul(dt, Z) | 0) + Math.imul(gt, H) | 0, g = g + Math.imul(gt, Z) | 0, m = m + Math.imul(U, q) | 0, l = (l = l + Math.imul(U, Y) | 0) + Math.imul(G, q) | 0, g = g + Math.imul(G, Y) | 0;
|
|
3526
3526
|
var Pt = (j + (m = m + Math.imul($, X) | 0) | 0) + ((8191 & (l = (l = l + Math.imul($, ct) | 0) + Math.imul(V, X) | 0)) << 13) | 0;
|
|
3527
|
-
j = ((g = g + Math.imul(V, ct) | 0) + (l >>> 13) | 0) + (Pt >>> 26) | 0, Pt &= 67108863, m = Math.imul(ae, ne), l = (l = Math.imul(ae, pe)) + Math.imul(Vt, ne) | 0, g = Math.imul(Vt, pe), m = m + Math.imul(Yt, he) | 0, l = (l = l + Math.imul(Yt, T) | 0) + Math.imul(ee, he) | 0, g = g + Math.imul(ee, T) | 0, m = m + Math.imul(jt, L) | 0, l = (l = l + Math.imul(jt, b) | 0) + Math.imul(oe, L) | 0, g = g + Math.imul(oe, b) | 0, m = m + Math.imul(mt, H) | 0, l = (l = l + Math.imul(mt, Z) | 0) + Math.imul(Mt, H) | 0, g = g + Math.imul(Mt, Z) | 0, m = m + Math.imul(dt, q) | 0, l = (l = l + Math.imul(dt, Y) | 0) + Math.imul(gt, q) | 0, g = g + Math.imul(gt, Y) | 0, m = m + Math.imul(U, X) | 0, l = (l = l + Math.imul(U, ct) | 0) + Math.imul(
|
|
3527
|
+
j = ((g = g + Math.imul(V, ct) | 0) + (l >>> 13) | 0) + (Pt >>> 26) | 0, Pt &= 67108863, m = Math.imul(ae, ne), l = (l = Math.imul(ae, pe)) + Math.imul(Vt, ne) | 0, g = Math.imul(Vt, pe), m = m + Math.imul(Yt, he) | 0, l = (l = l + Math.imul(Yt, T) | 0) + Math.imul(ee, he) | 0, g = g + Math.imul(ee, T) | 0, m = m + Math.imul(jt, L) | 0, l = (l = l + Math.imul(jt, b) | 0) + Math.imul(oe, L) | 0, g = g + Math.imul(oe, b) | 0, m = m + Math.imul(mt, H) | 0, l = (l = l + Math.imul(mt, Z) | 0) + Math.imul(Mt, H) | 0, g = g + Math.imul(Mt, Z) | 0, m = m + Math.imul(dt, q) | 0, l = (l = l + Math.imul(dt, Y) | 0) + Math.imul(gt, q) | 0, g = g + Math.imul(gt, Y) | 0, m = m + Math.imul(U, X) | 0, l = (l = l + Math.imul(U, ct) | 0) + Math.imul(G, X) | 0, g = g + Math.imul(G, ct) | 0;
|
|
3528
3528
|
var $t = (j + (m = m + Math.imul($, nt) | 0) | 0) + ((8191 & (l = (l = l + Math.imul($, ut) | 0) + Math.imul(V, nt) | 0)) << 13) | 0;
|
|
3529
|
-
j = ((g = g + Math.imul(V, ut) | 0) + (l >>> 13) | 0) + ($t >>> 26) | 0, $t &= 67108863, m = Math.imul(ie, ne), l = (l = Math.imul(ie, pe)) + Math.imul(ce, ne) | 0, g = Math.imul(ce, pe), m = m + Math.imul(ae, he) | 0, l = (l = l + Math.imul(ae, T) | 0) + Math.imul(Vt, he) | 0, g = g + Math.imul(Vt, T) | 0, m = m + Math.imul(Yt, L) | 0, l = (l = l + Math.imul(Yt, b) | 0) + Math.imul(ee, L) | 0, g = g + Math.imul(ee, b) | 0, m = m + Math.imul(jt, H) | 0, l = (l = l + Math.imul(jt, Z) | 0) + Math.imul(oe, H) | 0, g = g + Math.imul(oe, Z) | 0, m = m + Math.imul(mt, q) | 0, l = (l = l + Math.imul(mt, Y) | 0) + Math.imul(Mt, q) | 0, g = g + Math.imul(Mt, Y) | 0, m = m + Math.imul(dt, X) | 0, l = (l = l + Math.imul(dt, ct) | 0) + Math.imul(gt, X) | 0, g = g + Math.imul(gt, ct) | 0, m = m + Math.imul(U, nt) | 0, l = (l = l + Math.imul(U, ut) | 0) + Math.imul(
|
|
3529
|
+
j = ((g = g + Math.imul(V, ut) | 0) + (l >>> 13) | 0) + ($t >>> 26) | 0, $t &= 67108863, m = Math.imul(ie, ne), l = (l = Math.imul(ie, pe)) + Math.imul(ce, ne) | 0, g = Math.imul(ce, pe), m = m + Math.imul(ae, he) | 0, l = (l = l + Math.imul(ae, T) | 0) + Math.imul(Vt, he) | 0, g = g + Math.imul(Vt, T) | 0, m = m + Math.imul(Yt, L) | 0, l = (l = l + Math.imul(Yt, b) | 0) + Math.imul(ee, L) | 0, g = g + Math.imul(ee, b) | 0, m = m + Math.imul(jt, H) | 0, l = (l = l + Math.imul(jt, Z) | 0) + Math.imul(oe, H) | 0, g = g + Math.imul(oe, Z) | 0, m = m + Math.imul(mt, q) | 0, l = (l = l + Math.imul(mt, Y) | 0) + Math.imul(Mt, q) | 0, g = g + Math.imul(Mt, Y) | 0, m = m + Math.imul(dt, X) | 0, l = (l = l + Math.imul(dt, ct) | 0) + Math.imul(gt, X) | 0, g = g + Math.imul(gt, ct) | 0, m = m + Math.imul(U, nt) | 0, l = (l = l + Math.imul(U, ut) | 0) + Math.imul(G, nt) | 0, g = g + Math.imul(G, ut) | 0;
|
|
3530
3530
|
var Bt = (j + (m = m + Math.imul($, ot) | 0) | 0) + ((8191 & (l = (l = l + Math.imul($, ht) | 0) + Math.imul(V, ot) | 0)) << 13) | 0;
|
|
3531
|
-
j = ((g = g + Math.imul(V, ht) | 0) + (l >>> 13) | 0) + (Bt >>> 26) | 0, Bt &= 67108863, m = Math.imul(se, ne), l = (l = Math.imul(se, pe)) + Math.imul(de, ne) | 0, g = Math.imul(de, pe), m = m + Math.imul(ie, he) | 0, l = (l = l + Math.imul(ie, T) | 0) + Math.imul(ce, he) | 0, g = g + Math.imul(ce, T) | 0, m = m + Math.imul(ae, L) | 0, l = (l = l + Math.imul(ae, b) | 0) + Math.imul(Vt, L) | 0, g = g + Math.imul(Vt, b) | 0, m = m + Math.imul(Yt, H) | 0, l = (l = l + Math.imul(Yt, Z) | 0) + Math.imul(ee, H) | 0, g = g + Math.imul(ee, Z) | 0, m = m + Math.imul(jt, q) | 0, l = (l = l + Math.imul(jt, Y) | 0) + Math.imul(oe, q) | 0, g = g + Math.imul(oe, Y) | 0, m = m + Math.imul(mt, X) | 0, l = (l = l + Math.imul(mt, ct) | 0) + Math.imul(Mt, X) | 0, g = g + Math.imul(Mt, ct) | 0, m = m + Math.imul(dt, nt) | 0, l = (l = l + Math.imul(dt, ut) | 0) + Math.imul(gt, nt) | 0, g = g + Math.imul(gt, ut) | 0, m = m + Math.imul(U, ot) | 0, l = (l = l + Math.imul(U, ht) | 0) + Math.imul(
|
|
3531
|
+
j = ((g = g + Math.imul(V, ht) | 0) + (l >>> 13) | 0) + (Bt >>> 26) | 0, Bt &= 67108863, m = Math.imul(se, ne), l = (l = Math.imul(se, pe)) + Math.imul(de, ne) | 0, g = Math.imul(de, pe), m = m + Math.imul(ie, he) | 0, l = (l = l + Math.imul(ie, T) | 0) + Math.imul(ce, he) | 0, g = g + Math.imul(ce, T) | 0, m = m + Math.imul(ae, L) | 0, l = (l = l + Math.imul(ae, b) | 0) + Math.imul(Vt, L) | 0, g = g + Math.imul(Vt, b) | 0, m = m + Math.imul(Yt, H) | 0, l = (l = l + Math.imul(Yt, Z) | 0) + Math.imul(ee, H) | 0, g = g + Math.imul(ee, Z) | 0, m = m + Math.imul(jt, q) | 0, l = (l = l + Math.imul(jt, Y) | 0) + Math.imul(oe, q) | 0, g = g + Math.imul(oe, Y) | 0, m = m + Math.imul(mt, X) | 0, l = (l = l + Math.imul(mt, ct) | 0) + Math.imul(Mt, X) | 0, g = g + Math.imul(Mt, ct) | 0, m = m + Math.imul(dt, nt) | 0, l = (l = l + Math.imul(dt, ut) | 0) + Math.imul(gt, nt) | 0, g = g + Math.imul(gt, ut) | 0, m = m + Math.imul(U, ot) | 0, l = (l = l + Math.imul(U, ht) | 0) + Math.imul(G, ot) | 0, g = g + Math.imul(G, ht) | 0;
|
|
3532
3532
|
var Kt = (j + (m = m + Math.imul($, it) | 0) | 0) + ((8191 & (l = (l = l + Math.imul($, lt) | 0) + Math.imul(V, it) | 0)) << 13) | 0;
|
|
3533
|
-
j = ((g = g + Math.imul(V, lt) | 0) + (l >>> 13) | 0) + (Kt >>> 26) | 0, Kt &= 67108863, m = Math.imul(fe, ne), l = (l = Math.imul(fe, pe)) + Math.imul(re, ne) | 0, g = Math.imul(re, pe), m = m + Math.imul(se, he) | 0, l = (l = l + Math.imul(se, T) | 0) + Math.imul(de, he) | 0, g = g + Math.imul(de, T) | 0, m = m + Math.imul(ie, L) | 0, l = (l = l + Math.imul(ie, b) | 0) + Math.imul(ce, L) | 0, g = g + Math.imul(ce, b) | 0, m = m + Math.imul(ae, H) | 0, l = (l = l + Math.imul(ae, Z) | 0) + Math.imul(Vt, H) | 0, g = g + Math.imul(Vt, Z) | 0, m = m + Math.imul(Yt, q) | 0, l = (l = l + Math.imul(Yt, Y) | 0) + Math.imul(ee, q) | 0, g = g + Math.imul(ee, Y) | 0, m = m + Math.imul(jt, X) | 0, l = (l = l + Math.imul(jt, ct) | 0) + Math.imul(oe, X) | 0, g = g + Math.imul(oe, ct) | 0, m = m + Math.imul(mt, nt) | 0, l = (l = l + Math.imul(mt, ut) | 0) + Math.imul(Mt, nt) | 0, g = g + Math.imul(Mt, ut) | 0, m = m + Math.imul(dt, ot) | 0, l = (l = l + Math.imul(dt, ht) | 0) + Math.imul(gt, ot) | 0, g = g + Math.imul(gt, ht) | 0, m = m + Math.imul(U, it) | 0, l = (l = l + Math.imul(U, lt) | 0) + Math.imul(
|
|
3533
|
+
j = ((g = g + Math.imul(V, lt) | 0) + (l >>> 13) | 0) + (Kt >>> 26) | 0, Kt &= 67108863, m = Math.imul(fe, ne), l = (l = Math.imul(fe, pe)) + Math.imul(re, ne) | 0, g = Math.imul(re, pe), m = m + Math.imul(se, he) | 0, l = (l = l + Math.imul(se, T) | 0) + Math.imul(de, he) | 0, g = g + Math.imul(de, T) | 0, m = m + Math.imul(ie, L) | 0, l = (l = l + Math.imul(ie, b) | 0) + Math.imul(ce, L) | 0, g = g + Math.imul(ce, b) | 0, m = m + Math.imul(ae, H) | 0, l = (l = l + Math.imul(ae, Z) | 0) + Math.imul(Vt, H) | 0, g = g + Math.imul(Vt, Z) | 0, m = m + Math.imul(Yt, q) | 0, l = (l = l + Math.imul(Yt, Y) | 0) + Math.imul(ee, q) | 0, g = g + Math.imul(ee, Y) | 0, m = m + Math.imul(jt, X) | 0, l = (l = l + Math.imul(jt, ct) | 0) + Math.imul(oe, X) | 0, g = g + Math.imul(oe, ct) | 0, m = m + Math.imul(mt, nt) | 0, l = (l = l + Math.imul(mt, ut) | 0) + Math.imul(Mt, nt) | 0, g = g + Math.imul(Mt, ut) | 0, m = m + Math.imul(dt, ot) | 0, l = (l = l + Math.imul(dt, ht) | 0) + Math.imul(gt, ot) | 0, g = g + Math.imul(gt, ht) | 0, m = m + Math.imul(U, it) | 0, l = (l = l + Math.imul(U, lt) | 0) + Math.imul(G, it) | 0, g = g + Math.imul(G, lt) | 0;
|
|
3534
3534
|
var Qt = (j + (m = m + Math.imul($, at) | 0) | 0) + ((8191 & (l = (l = l + Math.imul($, K) | 0) + Math.imul(V, at) | 0)) << 13) | 0;
|
|
3535
3535
|
j = ((g = g + Math.imul(V, K) | 0) + (l >>> 13) | 0) + (Qt >>> 26) | 0, Qt &= 67108863, m = Math.imul(fe, he), l = (l = Math.imul(fe, T)) + Math.imul(re, he) | 0, g = Math.imul(re, T), m = m + Math.imul(se, L) | 0, l = (l = l + Math.imul(se, b) | 0) + Math.imul(de, L) | 0, g = g + Math.imul(de, b) | 0, m = m + Math.imul(ie, H) | 0, l = (l = l + Math.imul(ie, Z) | 0) + Math.imul(ce, H) | 0, g = g + Math.imul(ce, Z) | 0, m = m + Math.imul(ae, q) | 0, l = (l = l + Math.imul(ae, Y) | 0) + Math.imul(Vt, q) | 0, g = g + Math.imul(Vt, Y) | 0, m = m + Math.imul(Yt, X) | 0, l = (l = l + Math.imul(Yt, ct) | 0) + Math.imul(ee, X) | 0, g = g + Math.imul(ee, ct) | 0, m = m + Math.imul(jt, nt) | 0, l = (l = l + Math.imul(jt, ut) | 0) + Math.imul(oe, nt) | 0, g = g + Math.imul(oe, ut) | 0, m = m + Math.imul(mt, ot) | 0, l = (l = l + Math.imul(mt, ht) | 0) + Math.imul(Mt, ot) | 0, g = g + Math.imul(Mt, ht) | 0, m = m + Math.imul(dt, it) | 0, l = (l = l + Math.imul(dt, lt) | 0) + Math.imul(gt, it) | 0, g = g + Math.imul(gt, lt) | 0;
|
|
3536
|
-
var Xt = (j + (m = m + Math.imul(U, at) | 0) | 0) + ((8191 & (l = (l = l + Math.imul(U, K) | 0) + Math.imul(
|
|
3537
|
-
j = ((g = g + Math.imul(
|
|
3536
|
+
var Xt = (j + (m = m + Math.imul(U, at) | 0) | 0) + ((8191 & (l = (l = l + Math.imul(U, K) | 0) + Math.imul(G, at) | 0)) << 13) | 0;
|
|
3537
|
+
j = ((g = g + Math.imul(G, K) | 0) + (l >>> 13) | 0) + (Xt >>> 26) | 0, Xt &= 67108863, m = Math.imul(fe, L), l = (l = Math.imul(fe, b)) + Math.imul(re, L) | 0, g = Math.imul(re, b), m = m + Math.imul(se, H) | 0, l = (l = l + Math.imul(se, Z) | 0) + Math.imul(de, H) | 0, g = g + Math.imul(de, Z) | 0, m = m + Math.imul(ie, q) | 0, l = (l = l + Math.imul(ie, Y) | 0) + Math.imul(ce, q) | 0, g = g + Math.imul(ce, Y) | 0, m = m + Math.imul(ae, X) | 0, l = (l = l + Math.imul(ae, ct) | 0) + Math.imul(Vt, X) | 0, g = g + Math.imul(Vt, ct) | 0, m = m + Math.imul(Yt, nt) | 0, l = (l = l + Math.imul(Yt, ut) | 0) + Math.imul(ee, nt) | 0, g = g + Math.imul(ee, ut) | 0, m = m + Math.imul(jt, ot) | 0, l = (l = l + Math.imul(jt, ht) | 0) + Math.imul(oe, ot) | 0, g = g + Math.imul(oe, ht) | 0, m = m + Math.imul(mt, it) | 0, l = (l = l + Math.imul(mt, lt) | 0) + Math.imul(Mt, it) | 0, g = g + Math.imul(Mt, lt) | 0;
|
|
3538
3538
|
var kt = (j + (m = m + Math.imul(dt, at) | 0) | 0) + ((8191 & (l = (l = l + Math.imul(dt, K) | 0) + Math.imul(gt, at) | 0)) << 13) | 0;
|
|
3539
3539
|
j = ((g = g + Math.imul(gt, K) | 0) + (l >>> 13) | 0) + (kt >>> 26) | 0, kt &= 67108863, m = Math.imul(fe, H), l = (l = Math.imul(fe, Z)) + Math.imul(re, H) | 0, g = Math.imul(re, Z), m = m + Math.imul(se, q) | 0, l = (l = l + Math.imul(se, Y) | 0) + Math.imul(de, q) | 0, g = g + Math.imul(de, Y) | 0, m = m + Math.imul(ie, X) | 0, l = (l = l + Math.imul(ie, ct) | 0) + Math.imul(ce, X) | 0, g = g + Math.imul(ce, ct) | 0, m = m + Math.imul(ae, nt) | 0, l = (l = l + Math.imul(ae, ut) | 0) + Math.imul(Vt, nt) | 0, g = g + Math.imul(Vt, ut) | 0, m = m + Math.imul(Yt, ot) | 0, l = (l = l + Math.imul(Yt, ht) | 0) + Math.imul(ee, ot) | 0, g = g + Math.imul(ee, ht) | 0, m = m + Math.imul(jt, it) | 0, l = (l = l + Math.imul(jt, lt) | 0) + Math.imul(oe, it) | 0, g = g + Math.imul(oe, lt) | 0;
|
|
3540
3540
|
var Tt = (j + (m = m + Math.imul(mt, at) | 0) | 0) + ((8191 & (l = (l = l + Math.imul(mt, K) | 0) + Math.imul(Mt, at) | 0)) << 13) | 0;
|
|
@@ -3563,13 +3563,13 @@ var nr = {}, Of = { exports: {} };
|
|
|
3563
3563
|
return y = this.length === 10 && d.length === 10 ? v(this, d, h) : m < 63 ? w(this, d, h) : m < 1024 ? function(l, g, x) {
|
|
3564
3564
|
x.negative = g.negative ^ l.negative, x.length = l.length + g.length;
|
|
3565
3565
|
for (var O = 0, R = 0, j = 0; j < x.length - 1; j++) {
|
|
3566
|
-
var
|
|
3566
|
+
var F = R;
|
|
3567
3567
|
R = 0;
|
|
3568
|
-
for (var $ = 67108863 & O, V = Math.min(j, g.length - 1),
|
|
3569
|
-
var U = j -
|
|
3570
|
-
$ = 67108863 & (Nt = Nt + $ | 0), R += (
|
|
3568
|
+
for (var $ = 67108863 & O, V = Math.min(j, g.length - 1), D = Math.max(0, j - l.length + 1); D <= V; D++) {
|
|
3569
|
+
var U = j - D, G = (0 | l.words[U]) * (0 | g.words[D]), Nt = 67108863 & G;
|
|
3570
|
+
$ = 67108863 & (Nt = Nt + $ | 0), R += (F = (F = F + (G / 67108864 | 0) | 0) + (Nt >>> 26) | 0) >>> 26, F &= 67108863;
|
|
3571
3571
|
}
|
|
3572
|
-
x.words[j] = $, O =
|
|
3572
|
+
x.words[j] = $, O = F, F = R;
|
|
3573
3573
|
}
|
|
3574
3574
|
return O !== 0 ? x.words[j] = O : x.length--, x.strip();
|
|
3575
3575
|
}(this, d, h) : S(this, d, h), y;
|
|
@@ -3584,9 +3584,9 @@ var nr = {}, Of = { exports: {} };
|
|
|
3584
3584
|
for (var x = 0; x < g; x++) m[x] = h[d[x]], l[x] = y[d[x]];
|
|
3585
3585
|
}, E.prototype.transform = function(d, h, y, m, l, g) {
|
|
3586
3586
|
this.permute(g, d, h, y, m, l);
|
|
3587
|
-
for (var x = 1; x < l; x <<= 1) for (var O = x << 1, R = Math.cos(2 * Math.PI / O), j = Math.sin(2 * Math.PI / O),
|
|
3588
|
-
var U = y[
|
|
3589
|
-
dt = $ * dt + V * Nt, Nt = gt, y[
|
|
3587
|
+
for (var x = 1; x < l; x <<= 1) for (var O = x << 1, R = Math.cos(2 * Math.PI / O), j = Math.sin(2 * Math.PI / O), F = 0; F < l; F += O) for (var $ = R, V = j, D = 0; D < x; D++) {
|
|
3588
|
+
var U = y[F + D], G = m[F + D], Nt = y[F + D + x], dt = m[F + D + x], gt = $ * Nt - V * dt;
|
|
3589
|
+
dt = $ * dt + V * Nt, Nt = gt, y[F + D] = U + Nt, m[F + D] = G + dt, y[F + D + x] = U - Nt, m[F + D + x] = G - dt, D !== O && (gt = R * $ - j * V, V = R * V + j * $, $ = gt);
|
|
3590
3590
|
}
|
|
3591
3591
|
}, E.prototype.guessLen13b = function(d, h) {
|
|
3592
3592
|
var y = 1 | Math.max(h, d), m = 1 & y, l = 0;
|
|
@@ -3611,11 +3611,11 @@ var nr = {}, Of = { exports: {} };
|
|
|
3611
3611
|
for (var h = new Array(d), y = 0; y < d; y++) h[y] = 0;
|
|
3612
3612
|
return h;
|
|
3613
3613
|
}, E.prototype.mulp = function(d, h, y) {
|
|
3614
|
-
var m = 2 * this.guessLen13b(d.length, h.length), l = this.makeRBT(m), g = this.stub(m), x = new Array(m), O = new Array(m), R = new Array(m), j = new Array(m),
|
|
3615
|
-
V.length = m, this.convert13b(d.words, d.length, x, m), this.convert13b(h.words, h.length, j, m), this.transform(x, g, O, R, m, l), this.transform(j, g,
|
|
3616
|
-
for (var
|
|
3617
|
-
var U = O[
|
|
3618
|
-
R[
|
|
3614
|
+
var m = 2 * this.guessLen13b(d.length, h.length), l = this.makeRBT(m), g = this.stub(m), x = new Array(m), O = new Array(m), R = new Array(m), j = new Array(m), F = new Array(m), $ = new Array(m), V = y.words;
|
|
3615
|
+
V.length = m, this.convert13b(d.words, d.length, x, m), this.convert13b(h.words, h.length, j, m), this.transform(x, g, O, R, m, l), this.transform(j, g, F, $, m, l);
|
|
3616
|
+
for (var D = 0; D < m; D++) {
|
|
3617
|
+
var U = O[D] * F[D] - R[D] * $[D];
|
|
3618
|
+
R[D] = O[D] * $[D] + R[D] * F[D], O[D] = U;
|
|
3619
3619
|
}
|
|
3620
3620
|
return this.conjugate(O, R, m), this.transform(O, R, V, g, m, l), this.conjugate(V, g, m), this.normalize13b(V, m), y.negative = d.negative ^ h.negative, y.length = d.length + h.length, y.strip();
|
|
3621
3621
|
}, i.prototype.mul = function(d) {
|
|
@@ -3682,8 +3682,8 @@ var nr = {}, Of = { exports: {} };
|
|
|
3682
3682
|
else this.words[0] = 0, this.length = 1;
|
|
3683
3683
|
var j = 0;
|
|
3684
3684
|
for (R = this.length - 1; R >= 0 && (j !== 0 || R >= m); R--) {
|
|
3685
|
-
var
|
|
3686
|
-
this.words[R] = j << 26 - l |
|
|
3685
|
+
var F = 0 | this.words[R];
|
|
3686
|
+
this.words[R] = j << 26 - l | F >>> l, j = F & x;
|
|
3687
3687
|
}
|
|
3688
3688
|
return O && j !== 0 && (O.words[O.length++] = j), this.length === 0 && (this.words[0] = 0, this.length = 1), this.strip();
|
|
3689
3689
|
}, i.prototype.ishrn = function(d, h, y) {
|
|
@@ -3754,10 +3754,10 @@ var nr = {}, Of = { exports: {} };
|
|
|
3754
3754
|
}
|
|
3755
3755
|
var j = m.clone()._ishlnsubmul(l, 1, O);
|
|
3756
3756
|
j.negative === 0 && (m = j, x && (x.words[O] = 1));
|
|
3757
|
-
for (var
|
|
3758
|
-
var $ = 67108864 * (0 | m.words[l.length +
|
|
3759
|
-
for ($ = Math.min($ / g | 0, 67108863), m._ishlnsubmul(l, $,
|
|
3760
|
-
x && (x.words[
|
|
3757
|
+
for (var F = O - 1; F >= 0; F--) {
|
|
3758
|
+
var $ = 67108864 * (0 | m.words[l.length + F]) + (0 | m.words[l.length + F - 1]);
|
|
3759
|
+
for ($ = Math.min($ / g | 0, 67108863), m._ishlnsubmul(l, $, F); m.negative !== 0; ) $--, m.negative = 0, m._ishlnsubmul(l, 1, F), m.isZero() || (m.negative ^= 1);
|
|
3760
|
+
x && (x.words[F] = $);
|
|
3761
3761
|
}
|
|
3762
3762
|
return x && x.strip(), m.strip(), h !== "div" && y !== 0 && m.iushrn(y), { div: x || null, mod: m };
|
|
3763
3763
|
}, i.prototype.divmod = function(d, h, y) {
|
|
@@ -3793,9 +3793,9 @@ var nr = {}, Of = { exports: {} };
|
|
|
3793
3793
|
h = h.negative !== 0 ? h.umod(d) : h.clone();
|
|
3794
3794
|
for (var m = new i(1), l = new i(0), g = new i(0), x = new i(1), O = 0; h.isEven() && y.isEven(); ) h.iushrn(1), y.iushrn(1), ++O;
|
|
3795
3795
|
for (var R = y.clone(), j = h.clone(); !h.isZero(); ) {
|
|
3796
|
-
for (var
|
|
3797
|
-
if (
|
|
3798
|
-
for (var V = 0,
|
|
3796
|
+
for (var F = 0, $ = 1; !(h.words[0] & $) && F < 26; ++F, $ <<= 1) ;
|
|
3797
|
+
if (F > 0) for (h.iushrn(F); F-- > 0; ) (m.isOdd() || l.isOdd()) && (m.iadd(R), l.isub(j)), m.iushrn(1), l.iushrn(1);
|
|
3798
|
+
for (var V = 0, D = 1; !(y.words[0] & D) && V < 26; ++V, D <<= 1) ;
|
|
3799
3799
|
if (V > 0) for (y.iushrn(V); V-- > 0; ) (g.isOdd() || x.isOdd()) && (g.iadd(R), x.isub(j)), g.iushrn(1), x.iushrn(1);
|
|
3800
3800
|
h.cmp(y) >= 0 ? (h.isub(y), m.isub(g), l.isub(x)) : (y.isub(h), g.isub(m), x.isub(l));
|
|
3801
3801
|
}
|
|
@@ -3807,7 +3807,7 @@ var nr = {}, Of = { exports: {} };
|
|
|
3807
3807
|
for (var m, l = new i(1), g = new i(0), x = y.clone(); h.cmpn(1) > 0 && y.cmpn(1) > 0; ) {
|
|
3808
3808
|
for (var O = 0, R = 1; !(h.words[0] & R) && O < 26; ++O, R <<= 1) ;
|
|
3809
3809
|
if (O > 0) for (h.iushrn(O); O-- > 0; ) l.isOdd() && l.iadd(x), l.iushrn(1);
|
|
3810
|
-
for (var j = 0,
|
|
3810
|
+
for (var j = 0, F = 1; !(y.words[0] & F) && j < 26; ++j, F <<= 1) ;
|
|
3811
3811
|
if (j > 0) for (y.iushrn(j); j-- > 0; ) g.isOdd() && g.iadd(x), g.iushrn(1);
|
|
3812
3812
|
h.cmp(y) >= 0 ? (h.isub(y), l.isub(g)) : (y.isub(h), g.isub(l));
|
|
3813
3813
|
}
|
|
@@ -4049,13 +4049,13 @@ var nr = {}, Of = { exports: {} };
|
|
|
4049
4049
|
r(!m.isZero());
|
|
4050
4050
|
var g = new i(1).toRed(this), x = g.redNeg(), O = this.m.subn(1).iushrn(1), R = this.m.bitLength();
|
|
4051
4051
|
for (R = new i(2 * R * R).toRed(this); this.pow(R, O).cmp(x) !== 0; ) R.redIAdd(x);
|
|
4052
|
-
for (var j = this.pow(R, m),
|
|
4053
|
-
for (var
|
|
4052
|
+
for (var j = this.pow(R, m), F = this.pow(d, m.addn(1).iushrn(1)), $ = this.pow(d, m), V = l; $.cmp(g) !== 0; ) {
|
|
4053
|
+
for (var D = $, U = 0; D.cmp(g) !== 0; U++) D = D.redSqr();
|
|
4054
4054
|
r(U < V);
|
|
4055
|
-
var
|
|
4056
|
-
|
|
4055
|
+
var G = this.pow(j, new i(1).iushln(V - U - 1));
|
|
4056
|
+
F = F.redMul(G), j = G.redSqr(), $ = $.redMul(j), V = U;
|
|
4057
4057
|
}
|
|
4058
|
-
return
|
|
4058
|
+
return F;
|
|
4059
4059
|
}, z.prototype.invm = function(d) {
|
|
4060
4060
|
var h = d._invmp(this.m);
|
|
4061
4061
|
return h.negative !== 0 ? (h.negative = 0, this.imod(h).redNeg()) : this.imod(h);
|
|
@@ -4068,8 +4068,8 @@ var nr = {}, Of = { exports: {} };
|
|
|
4068
4068
|
var l = y[0], g = 0, x = 0, O = h.bitLength() % 26;
|
|
4069
4069
|
for (O === 0 && (O = 26), m = h.length - 1; m >= 0; m--) {
|
|
4070
4070
|
for (var R = h.words[m], j = O - 1; j >= 0; j--) {
|
|
4071
|
-
var
|
|
4072
|
-
l !== y[0] && (l = this.sqr(l)),
|
|
4071
|
+
var F = R >> j & 1;
|
|
4072
|
+
l !== y[0] && (l = this.sqr(l)), F !== 0 || g !== 0 ? (g <<= 1, g |= F, (++x === 4 || m === 0 && j === 0) && (l = this.mul(l, y[g]), x = 0, g = 0)) : x = 0;
|
|
4073
4073
|
}
|
|
4074
4074
|
O = 26;
|
|
4075
4075
|
}
|
|
@@ -4106,9 +4106,9 @@ function Cf(e, t) {
|
|
|
4106
4106
|
Cf.equal = function(e, t, r) {
|
|
4107
4107
|
if (e != t) throw new Error(r || "Assertion failed: " + e + " != " + t);
|
|
4108
4108
|
};
|
|
4109
|
-
var
|
|
4109
|
+
var Jo = {};
|
|
4110
4110
|
(function() {
|
|
4111
|
-
var e =
|
|
4111
|
+
var e = Jo;
|
|
4112
4112
|
function t(n) {
|
|
4113
4113
|
return n.length === 1 ? "0" + n : n;
|
|
4114
4114
|
}
|
|
@@ -4135,7 +4135,7 @@ var Go = {};
|
|
|
4135
4135
|
return i === "hex" ? r(n) : n;
|
|
4136
4136
|
};
|
|
4137
4137
|
})(), function() {
|
|
4138
|
-
var e = nr, t = Wr, r = Bn, n =
|
|
4138
|
+
var e = nr, t = Wr, r = Bn, n = Jo;
|
|
4139
4139
|
e.assert = r, e.toArray = n.toArray, e.zero2 = n.zero2, e.toHex = n.toHex, e.encode = n.encode, e.getNAF = function(i, s, a) {
|
|
4140
4140
|
var o, c = new Array(Math.max(i.bitLength(), a) + 1);
|
|
4141
4141
|
for (o = 0; o < c.length; o += 1) c[o] = 0;
|
|
@@ -4164,13 +4164,13 @@ var Go = {};
|
|
|
4164
4164
|
return new t(i, "hex", "le");
|
|
4165
4165
|
};
|
|
4166
4166
|
}();
|
|
4167
|
-
var ho,
|
|
4167
|
+
var ho, Go = { exports: {} };
|
|
4168
4168
|
function Qr(e) {
|
|
4169
4169
|
this.rand = e;
|
|
4170
4170
|
}
|
|
4171
|
-
if (
|
|
4171
|
+
if (Go.exports = function(e) {
|
|
4172
4172
|
return ho || (ho = new Qr(null)), ho.generate(e);
|
|
4173
|
-
},
|
|
4173
|
+
}, Go.exports.Rand = Qr, Qr.prototype.generate = function(e) {
|
|
4174
4174
|
return this._rand(e);
|
|
4175
4175
|
}, Qr.prototype._rand = function(e) {
|
|
4176
4176
|
if (this.rand.getBytes) return this.rand.getBytes(e);
|
|
@@ -4186,20 +4186,20 @@ if (Jo.exports = function(e) {
|
|
|
4186
4186
|
throw new Error("Not implemented yet");
|
|
4187
4187
|
});
|
|
4188
4188
|
else try {
|
|
4189
|
-
var S0 =
|
|
4189
|
+
var S0 = Ds;
|
|
4190
4190
|
if (typeof S0.randomBytes != "function") throw new Error("Not supported");
|
|
4191
4191
|
Qr.prototype._rand = function(e) {
|
|
4192
4192
|
return S0.randomBytes(e);
|
|
4193
4193
|
};
|
|
4194
4194
|
} catch {
|
|
4195
4195
|
}
|
|
4196
|
-
var Bf =
|
|
4196
|
+
var Bf = Go.exports, Fa = {}, hn = Wr, Ri = nr, os = Ri.getNAF, Qu = Ri.getJSF, as = Ri.assert;
|
|
4197
4197
|
function tn(e, t) {
|
|
4198
4198
|
this.type = e, this.p = new hn(t.p, 16), this.red = t.prime ? hn.red(t.prime) : hn.mont(this.p), this.zero = new hn(0).toRed(this.red), this.one = new hn(1).toRed(this.red), this.two = new hn(2).toRed(this.red), this.n = t.n && new hn(t.n, 16), this.g = t.g && this.pointFromJSON(t.g, t.gRed), this._wnafT1 = new Array(4), this._wnafT2 = new Array(4), this._wnafT3 = new Array(4), this._wnafT4 = new Array(4), this._bitLength = this.n ? this.n.bitLength() : 0;
|
|
4199
4199
|
var r = this.n && this.p.div(this.n);
|
|
4200
4200
|
!r || r.cmpn(100) > 0 ? this.redN = null : (this._maxwellTrick = !0, this.redN = this.n.toRed(this.red));
|
|
4201
4201
|
}
|
|
4202
|
-
var
|
|
4202
|
+
var Fs = tn;
|
|
4203
4203
|
function ir(e, t) {
|
|
4204
4204
|
this.curve = e, this.type = t, this.precomputed = null;
|
|
4205
4205
|
}
|
|
@@ -4319,40 +4319,40 @@ typeof Object.create == "function" ? Xo.exports = function(e, t) {
|
|
|
4319
4319
|
r.prototype = t.prototype, e.prototype = new r(), e.prototype.constructor = e;
|
|
4320
4320
|
}
|
|
4321
4321
|
};
|
|
4322
|
-
var Zs = Xo.exports,
|
|
4322
|
+
var Zs = Xo.exports, _e = Wr, ta = Zs, ei = Fs, Ju = nr.assert;
|
|
4323
4323
|
function cr(e) {
|
|
4324
|
-
ei.call(this, "short", e), this.a = new
|
|
4324
|
+
ei.call(this, "short", e), this.a = new _e(e.a, 16).toRed(this.red), this.b = new _e(e.b, 16).toRed(this.red), this.tinv = this.two.redInvm(), this.zeroA = this.a.fromRed().cmpn(0) === 0, this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0, this.endo = this._getEndomorphism(e), this._endoWnafT1 = new Array(4), this._endoWnafT2 = new Array(4);
|
|
4325
4325
|
}
|
|
4326
4326
|
ta(cr, ei);
|
|
4327
|
-
var
|
|
4328
|
-
function
|
|
4329
|
-
ei.BasePoint.call(this, e, "affine"), t === null && r === null ? (this.x = null, this.y = null, this.inf = !0) : (this.x = new
|
|
4327
|
+
var Gu = cr;
|
|
4328
|
+
function Re(e, t, r, n) {
|
|
4329
|
+
ei.BasePoint.call(this, e, "affine"), t === null && r === null ? (this.x = null, this.y = null, this.inf = !0) : (this.x = new _e(t, 16), this.y = new _e(r, 16), n && (this.x.forceRed(this.curve.red), this.y.forceRed(this.curve.red)), this.x.red || (this.x = this.x.toRed(this.curve.red)), this.y.red || (this.y = this.y.toRed(this.curve.red)), this.inf = !1);
|
|
4330
4330
|
}
|
|
4331
4331
|
function qe(e, t, r, n) {
|
|
4332
|
-
ei.BasePoint.call(this, e, "jacobian"), t === null && r === null && n === null ? (this.x = this.curve.one, this.y = this.curve.one, this.z = new
|
|
4332
|
+
ei.BasePoint.call(this, e, "jacobian"), t === null && r === null && n === null ? (this.x = this.curve.one, this.y = this.curve.one, this.z = new _e(0)) : (this.x = new _e(t, 16), this.y = new _e(r, 16), this.z = new _e(n, 16)), this.x.red || (this.x = this.x.toRed(this.curve.red)), this.y.red || (this.y = this.y.toRed(this.curve.red)), this.z.red || (this.z = this.z.toRed(this.curve.red)), this.zOne = this.z === this.curve.one;
|
|
4333
4333
|
}
|
|
4334
4334
|
cr.prototype._getEndomorphism = function(e) {
|
|
4335
4335
|
if (this.zeroA && this.g && this.n && this.p.modn(3) === 1) {
|
|
4336
4336
|
var t, r;
|
|
4337
|
-
if (e.beta) t = new
|
|
4337
|
+
if (e.beta) t = new _e(e.beta, 16).toRed(this.red);
|
|
4338
4338
|
else {
|
|
4339
4339
|
var n = this._getEndoRoots(this.p);
|
|
4340
4340
|
t = (t = n[0].cmp(n[1]) < 0 ? n[0] : n[1]).toRed(this.red);
|
|
4341
4341
|
}
|
|
4342
|
-
if (e.lambda) r = new
|
|
4342
|
+
if (e.lambda) r = new _e(e.lambda, 16);
|
|
4343
4343
|
else {
|
|
4344
4344
|
var i = this._getEndoRoots(this.n);
|
|
4345
|
-
this.g.mul(i[0]).x.cmp(this.g.x.redMul(t)) === 0 ? r = i[0] : (r = i[1],
|
|
4345
|
+
this.g.mul(i[0]).x.cmp(this.g.x.redMul(t)) === 0 ? r = i[0] : (r = i[1], Ju(this.g.mul(r).x.cmp(this.g.x.redMul(t)) === 0));
|
|
4346
4346
|
}
|
|
4347
4347
|
return { beta: t, lambda: r, basis: e.basis ? e.basis.map(function(s) {
|
|
4348
|
-
return { a: new
|
|
4348
|
+
return { a: new _e(s.a, 16), b: new _e(s.b, 16) };
|
|
4349
4349
|
}) : this._getEndoBasis(r) };
|
|
4350
4350
|
}
|
|
4351
4351
|
}, cr.prototype._getEndoRoots = function(e) {
|
|
4352
|
-
var t = e === this.p ? this.red :
|
|
4352
|
+
var t = e === this.p ? this.red : _e.mont(e), r = new _e(2).toRed(t).redInvm(), n = r.redNeg(), i = new _e(3).toRed(t).redNeg().redSqrt().redMul(r);
|
|
4353
4353
|
return [n.redAdd(i).fromRed(), n.redSub(i).fromRed()];
|
|
4354
4354
|
}, cr.prototype._getEndoBasis = function(e) {
|
|
4355
|
-
for (var t, r, n, i, s, a, o, c, f, u = this.n.ushrn(Math.floor(this.n.bitLength() / 2)), p = e, w = this.n.clone(), v = new
|
|
4355
|
+
for (var t, r, n, i, s, a, o, c, f, u = this.n.ushrn(Math.floor(this.n.bitLength() / 2)), p = e, w = this.n.clone(), v = new _e(1), S = new _e(0), E = new _e(0), _ = new _e(1), k = 0; p.cmpn(0) !== 0; ) {
|
|
4356
4356
|
var A = w.div(p);
|
|
4357
4357
|
c = w.sub(A.mul(p)), f = E.sub(A.mul(v));
|
|
4358
4358
|
var P = _.sub(A.mul(S));
|
|
@@ -4367,7 +4367,7 @@ cr.prototype._getEndomorphism = function(e) {
|
|
|
4367
4367
|
var t = this.endo.basis, r = t[0], n = t[1], i = n.b.mul(e).divRound(this.n), s = r.b.neg().mul(e).divRound(this.n), a = i.mul(r.a), o = s.mul(n.a), c = i.mul(r.b), f = s.mul(n.b);
|
|
4368
4368
|
return { k1: e.sub(a).sub(o), k2: c.add(f).neg() };
|
|
4369
4369
|
}, cr.prototype.pointFromX = function(e, t) {
|
|
4370
|
-
(e = new
|
|
4370
|
+
(e = new _e(e, 16)).red || (e = e.toRed(this.red));
|
|
4371
4371
|
var r = e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b), n = r.redSqrt();
|
|
4372
4372
|
if (n.redSqr().redSub(r).cmp(this.zero) !== 0) throw new Error("invalid point");
|
|
4373
4373
|
var i = n.fromRed().isOdd();
|
|
@@ -4383,11 +4383,11 @@ cr.prototype._getEndomorphism = function(e) {
|
|
|
4383
4383
|
}
|
|
4384
4384
|
for (var f = this._wnafMulAdd(1, n, i, 2 * s, r), u = 0; u < 2 * s; u++) n[u] = null, i[u] = null;
|
|
4385
4385
|
return f;
|
|
4386
|
-
}, ta(
|
|
4387
|
-
return new
|
|
4386
|
+
}, ta(Re, ei.BasePoint), cr.prototype.point = function(e, t, r) {
|
|
4387
|
+
return new Re(this, e, t, r);
|
|
4388
4388
|
}, cr.prototype.pointFromJSON = function(e, t) {
|
|
4389
|
-
return
|
|
4390
|
-
},
|
|
4389
|
+
return Re.fromJSON(this, e, t);
|
|
4390
|
+
}, Re.prototype._getBeta = function() {
|
|
4391
4391
|
if (this.curve.endo) {
|
|
4392
4392
|
var e = this.precomputed;
|
|
4393
4393
|
if (e && e.beta) return e.beta;
|
|
@@ -4400,9 +4400,9 @@ cr.prototype._getEndomorphism = function(e) {
|
|
|
4400
4400
|
}
|
|
4401
4401
|
return t;
|
|
4402
4402
|
}
|
|
4403
|
-
},
|
|
4403
|
+
}, Re.prototype.toJSON = function() {
|
|
4404
4404
|
return this.precomputed ? [this.x, this.y, this.precomputed && { doubles: this.precomputed.doubles && { step: this.precomputed.doubles.step, points: this.precomputed.doubles.points.slice(1) }, naf: this.precomputed.naf && { wnd: this.precomputed.naf.wnd, points: this.precomputed.naf.points.slice(1) } }] : [this.x, this.y];
|
|
4405
|
-
},
|
|
4405
|
+
}, Re.fromJSON = function(e, t, r) {
|
|
4406
4406
|
typeof t == "string" && (t = JSON.parse(t));
|
|
4407
4407
|
var n = e.point(t[0], t[1], r);
|
|
4408
4408
|
if (!t[2]) return n;
|
|
@@ -4411,11 +4411,11 @@ cr.prototype._getEndomorphism = function(e) {
|
|
|
4411
4411
|
}
|
|
4412
4412
|
var s = t[2];
|
|
4413
4413
|
return n.precomputed = { beta: null, doubles: s.doubles && { step: s.doubles.step, points: [n].concat(s.doubles.points.map(i)) }, naf: s.naf && { wnd: s.naf.wnd, points: [n].concat(s.naf.points.map(i)) } }, n;
|
|
4414
|
-
},
|
|
4414
|
+
}, Re.prototype.inspect = function() {
|
|
4415
4415
|
return this.isInfinity() ? "<EC Point Infinity>" : "<EC Point x: " + this.x.fromRed().toString(16, 2) + " y: " + this.y.fromRed().toString(16, 2) + ">";
|
|
4416
|
-
},
|
|
4416
|
+
}, Re.prototype.isInfinity = function() {
|
|
4417
4417
|
return this.inf;
|
|
4418
|
-
},
|
|
4418
|
+
}, Re.prototype.add = function(e) {
|
|
4419
4419
|
if (this.inf) return e;
|
|
4420
4420
|
if (e.inf) return this;
|
|
4421
4421
|
if (this.eq(e)) return this.dbl();
|
|
@@ -4425,27 +4425,27 @@ cr.prototype._getEndomorphism = function(e) {
|
|
|
4425
4425
|
t.cmpn(0) !== 0 && (t = t.redMul(this.x.redSub(e.x).redInvm()));
|
|
4426
4426
|
var r = t.redSqr().redISub(this.x).redISub(e.x), n = t.redMul(this.x.redSub(r)).redISub(this.y);
|
|
4427
4427
|
return this.curve.point(r, n);
|
|
4428
|
-
},
|
|
4428
|
+
}, Re.prototype.dbl = function() {
|
|
4429
4429
|
if (this.inf) return this;
|
|
4430
4430
|
var e = this.y.redAdd(this.y);
|
|
4431
4431
|
if (e.cmpn(0) === 0) return this.curve.point(null, null);
|
|
4432
4432
|
var t = this.curve.a, r = this.x.redSqr(), n = e.redInvm(), i = r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n), s = i.redSqr().redISub(this.x.redAdd(this.x)), a = i.redMul(this.x.redSub(s)).redISub(this.y);
|
|
4433
4433
|
return this.curve.point(s, a);
|
|
4434
|
-
},
|
|
4434
|
+
}, Re.prototype.getX = function() {
|
|
4435
4435
|
return this.x.fromRed();
|
|
4436
|
-
},
|
|
4436
|
+
}, Re.prototype.getY = function() {
|
|
4437
4437
|
return this.y.fromRed();
|
|
4438
|
-
},
|
|
4439
|
-
return e = new
|
|
4440
|
-
},
|
|
4438
|
+
}, Re.prototype.mul = function(e) {
|
|
4439
|
+
return e = new _e(e, 16), this.isInfinity() ? this : this._hasDoubles(e) ? this.curve._fixedNafMul(this, e) : this.curve.endo ? this.curve._endoWnafMulAdd([this], [e]) : this.curve._wnafMul(this, e);
|
|
4440
|
+
}, Re.prototype.mulAdd = function(e, t, r) {
|
|
4441
4441
|
var n = [this, t], i = [e, r];
|
|
4442
4442
|
return this.curve.endo ? this.curve._endoWnafMulAdd(n, i) : this.curve._wnafMulAdd(1, n, i, 2);
|
|
4443
|
-
},
|
|
4443
|
+
}, Re.prototype.jmulAdd = function(e, t, r) {
|
|
4444
4444
|
var n = [this, t], i = [e, r];
|
|
4445
4445
|
return this.curve.endo ? this.curve._endoWnafMulAdd(n, i, !0) : this.curve._wnafMulAdd(1, n, i, 2, !0);
|
|
4446
|
-
},
|
|
4446
|
+
}, Re.prototype.eq = function(e) {
|
|
4447
4447
|
return this === e || this.inf === e.inf && (this.inf || this.x.cmp(e.x) === 0 && this.y.cmp(e.y) === 0);
|
|
4448
|
-
},
|
|
4448
|
+
}, Re.prototype.neg = function(e) {
|
|
4449
4449
|
if (this.inf) return this;
|
|
4450
4450
|
var t = this.curve.point(this.x, this.y.redNeg());
|
|
4451
4451
|
if (e && this.precomputed) {
|
|
@@ -4455,7 +4455,7 @@ cr.prototype._getEndomorphism = function(e) {
|
|
|
4455
4455
|
t.precomputed = { naf: r.naf && { wnd: r.naf.wnd, points: r.naf.points.map(n) }, doubles: r.doubles && { step: r.doubles.step, points: r.doubles.points.map(n) } };
|
|
4456
4456
|
}
|
|
4457
4457
|
return t;
|
|
4458
|
-
},
|
|
4458
|
+
}, Re.prototype.toJ = function() {
|
|
4459
4459
|
return this.inf ? this.curve.jpoint(null, null, null) : this.curve.jpoint(this.x, this.y, this.curve.one);
|
|
4460
4460
|
}, ta(qe, ei.BasePoint), cr.prototype.jpoint = function(e, t, r) {
|
|
4461
4461
|
return new qe(this, e, t, r);
|
|
@@ -4549,7 +4549,7 @@ cr.prototype._getEndomorphism = function(e) {
|
|
|
4549
4549
|
var v = this.z.redAdd(a).redSqr().redISub(r).redISub(o);
|
|
4550
4550
|
return this.curve.jpoint(p, w, v);
|
|
4551
4551
|
}, qe.prototype.mul = function(e, t) {
|
|
4552
|
-
return e = new
|
|
4552
|
+
return e = new _e(e, t), this.curve._wnafMul(this, e);
|
|
4553
4553
|
}, qe.prototype.eq = function(e) {
|
|
4554
4554
|
if (e.type === "affine") return this.eq(e.toJ());
|
|
4555
4555
|
if (this === e) return !0;
|
|
@@ -4569,57 +4569,57 @@ cr.prototype._getEndomorphism = function(e) {
|
|
|
4569
4569
|
}, qe.prototype.isInfinity = function() {
|
|
4570
4570
|
return this.z.cmpn(0) === 0;
|
|
4571
4571
|
};
|
|
4572
|
-
var
|
|
4572
|
+
var Fn = Wr, Pf = Zs, Vs = Fs, Xu = nr;
|
|
4573
4573
|
function Zn(e) {
|
|
4574
|
-
Vs.call(this, "mont", e), this.a = new
|
|
4574
|
+
Vs.call(this, "mont", e), this.a = new Fn(e.a, 16).toRed(this.red), this.b = new Fn(e.b, 16).toRed(this.red), this.i4 = new Fn(4).toRed(this.red).redInvm(), this.two = new Fn(2).toRed(this.red), this.a24 = this.i4.redMul(this.a.redAdd(this.two));
|
|
4575
4575
|
}
|
|
4576
4576
|
Pf(Zn, Vs);
|
|
4577
4577
|
var th = Zn;
|
|
4578
|
-
function
|
|
4579
|
-
Vs.BasePoint.call(this, e, "projective"), t === null && r === null ? (this.x = this.curve.one, this.z = this.curve.zero) : (this.x = new
|
|
4578
|
+
function Ne(e, t, r) {
|
|
4579
|
+
Vs.BasePoint.call(this, e, "projective"), t === null && r === null ? (this.x = this.curve.one, this.z = this.curve.zero) : (this.x = new Fn(t, 16), this.z = new Fn(r, 16), this.x.red || (this.x = this.x.toRed(this.curve.red)), this.z.red || (this.z = this.z.toRed(this.curve.red)));
|
|
4580
4580
|
}
|
|
4581
4581
|
Zn.prototype.validate = function(e) {
|
|
4582
4582
|
var t = e.normalize().x, r = t.redSqr(), n = r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);
|
|
4583
4583
|
return n.redSqrt().redSqr().cmp(n) === 0;
|
|
4584
|
-
}, Pf(
|
|
4584
|
+
}, Pf(Ne, Vs.BasePoint), Zn.prototype.decodePoint = function(e, t) {
|
|
4585
4585
|
return this.point(Xu.toArray(e, t), 1);
|
|
4586
4586
|
}, Zn.prototype.point = function(e, t) {
|
|
4587
|
-
return new
|
|
4587
|
+
return new Ne(this, e, t);
|
|
4588
4588
|
}, Zn.prototype.pointFromJSON = function(e) {
|
|
4589
|
-
return
|
|
4590
|
-
},
|
|
4591
|
-
},
|
|
4589
|
+
return Ne.fromJSON(this, e);
|
|
4590
|
+
}, Ne.prototype.precompute = function() {
|
|
4591
|
+
}, Ne.prototype._encode = function() {
|
|
4592
4592
|
return this.getX().toArray("be", this.curve.p.byteLength());
|
|
4593
|
-
},
|
|
4594
|
-
return new
|
|
4595
|
-
},
|
|
4593
|
+
}, Ne.fromJSON = function(e, t) {
|
|
4594
|
+
return new Ne(e, t[0], t[1] || e.one);
|
|
4595
|
+
}, Ne.prototype.inspect = function() {
|
|
4596
4596
|
return this.isInfinity() ? "<EC Point Infinity>" : "<EC Point x: " + this.x.fromRed().toString(16, 2) + " z: " + this.z.fromRed().toString(16, 2) + ">";
|
|
4597
|
-
},
|
|
4597
|
+
}, Ne.prototype.isInfinity = function() {
|
|
4598
4598
|
return this.z.cmpn(0) === 0;
|
|
4599
|
-
},
|
|
4599
|
+
}, Ne.prototype.dbl = function() {
|
|
4600
4600
|
var e = this.x.redAdd(this.z).redSqr(), t = this.x.redSub(this.z).redSqr(), r = e.redSub(t), n = e.redMul(t), i = r.redMul(t.redAdd(this.curve.a24.redMul(r)));
|
|
4601
4601
|
return this.curve.point(n, i);
|
|
4602
|
-
},
|
|
4602
|
+
}, Ne.prototype.add = function() {
|
|
4603
4603
|
throw new Error("Not supported on Montgomery curve");
|
|
4604
|
-
},
|
|
4604
|
+
}, Ne.prototype.diffAdd = function(e, t) {
|
|
4605
4605
|
var r = this.x.redAdd(this.z), n = this.x.redSub(this.z), i = e.x.redAdd(e.z), s = e.x.redSub(e.z).redMul(r), a = i.redMul(n), o = t.z.redMul(s.redAdd(a).redSqr()), c = t.x.redMul(s.redISub(a).redSqr());
|
|
4606
4606
|
return this.curve.point(o, c);
|
|
4607
|
-
},
|
|
4607
|
+
}, Ne.prototype.mul = function(e) {
|
|
4608
4608
|
for (var t = e.clone(), r = this, n = this.curve.point(null, null), i = []; t.cmpn(0) !== 0; t.iushrn(1)) i.push(t.andln(1));
|
|
4609
4609
|
for (var s = i.length - 1; s >= 0; s--) i[s] === 0 ? (r = r.diffAdd(n, this), n = n.dbl()) : (n = r.diffAdd(n, this), r = r.dbl());
|
|
4610
4610
|
return n;
|
|
4611
|
-
},
|
|
4611
|
+
}, Ne.prototype.mulAdd = function() {
|
|
4612
4612
|
throw new Error("Not supported on Montgomery curve");
|
|
4613
|
-
},
|
|
4613
|
+
}, Ne.prototype.jumlAdd = function() {
|
|
4614
4614
|
throw new Error("Not supported on Montgomery curve");
|
|
4615
|
-
},
|
|
4615
|
+
}, Ne.prototype.eq = function(e) {
|
|
4616
4616
|
return this.getX().cmp(e.getX()) === 0;
|
|
4617
|
-
},
|
|
4617
|
+
}, Ne.prototype.normalize = function() {
|
|
4618
4618
|
return this.x = this.x.redMul(this.z.redInvm()), this.z = this.curve.one, this;
|
|
4619
|
-
},
|
|
4619
|
+
}, Ne.prototype.getX = function() {
|
|
4620
4620
|
return this.normalize(), this.x.fromRed();
|
|
4621
4621
|
};
|
|
4622
|
-
var Vr = Wr, Lf = Zs, Ks =
|
|
4622
|
+
var Vr = Wr, Lf = Zs, Ks = Fs, eh = nr.assert;
|
|
4623
4623
|
function Ar(e) {
|
|
4624
4624
|
this.twisted = (0 | e.a) != 1, this.mOneA = this.twisted && (0 | e.a) == -1, this.extended = this.mOneA, Ks.call(this, "edwards", e), this.a = new Vr(e.a, 16).umod(this.red.m), this.a = this.a.toRed(this.red), this.c = new Vr(e.c, 16).toRed(this.red), this.c2 = this.c.redSqr(), this.d = new Vr(e.d, 16).toRed(this.red), this.dd = this.d.redAdd(this.d), eh(!this.twisted || this.c.fromRed().cmpn(1) === 0), this.oneC = (0 | e.c) == 1;
|
|
4625
4625
|
}
|
|
@@ -4714,8 +4714,8 @@ Ar.prototype._mulA = function(e) {
|
|
|
4714
4714
|
}
|
|
4715
4715
|
}, le.prototype.toP = le.prototype.normalize, le.prototype.mixedAdd = le.prototype.add, function(e) {
|
|
4716
4716
|
var t = e;
|
|
4717
|
-
t.base =
|
|
4718
|
-
}(
|
|
4717
|
+
t.base = Fs, t.short = Gu, t.mont = th, t.edwards = rh;
|
|
4718
|
+
}(Fa);
|
|
4719
4719
|
var Ws = {}, Ss = {}, Wt = {}, nh = Bn, ih = Zs;
|
|
4720
4720
|
function sh(e, t) {
|
|
4721
4721
|
return (64512 & e.charCodeAt(t)) == 55296 && !(t < 0 || t + 1 >= e.length) && (64512 & e.charCodeAt(t + 1)) == 56320;
|
|
@@ -4894,13 +4894,13 @@ var Ah = Hr;
|
|
|
4894
4894
|
Hr.blockSize = 512, Hr.outSize = 224, Hr.hmacStrength = 192, Hr.padLength = 64, Hr.prototype._digest = function(e) {
|
|
4895
4895
|
return e === "hex" ? ea.toHex32(this.h.slice(0, 7), "big") : ea.split32(this.h.slice(0, 7), "big");
|
|
4896
4896
|
};
|
|
4897
|
-
var er = Wt, kh = fi, Mh = Bn, Or = er.rotr64_hi, Cr = er.rotr64_lo, Uf = er.shr64_hi, Hf = er.shr64_lo,
|
|
4897
|
+
var er = Wt, kh = fi, Mh = Bn, Or = er.rotr64_hi, Cr = er.rotr64_lo, Uf = er.shr64_hi, Hf = er.shr64_lo, Jr = er.sum64, po = er.sum64_hi, mo = er.sum64_lo, Eh = er.sum64_4_hi, Ih = er.sum64_4_lo, Th = er.sum64_5_hi, Rh = er.sum64_5_lo, Df = kh.BlockHash, Nh = [1116352408, 3609767458, 1899447441, 602891725, 3049323471, 3964484399, 3921009573, 2173295548, 961987163, 4081628472, 1508970993, 3053834265, 2453635748, 2937671579, 2870763221, 3664609560, 3624381080, 2734883394, 310598401, 1164996542, 607225278, 1323610764, 1426881987, 3590304994, 1925078388, 4068182383, 2162078206, 991336113, 2614888103, 633803317, 3248222580, 3479774868, 3835390401, 2666613458, 4022224774, 944711139, 264347078, 2341262773, 604807628, 2007800933, 770255983, 1495990901, 1249150122, 1856431235, 1555081692, 3175218132, 1996064986, 2198950837, 2554220882, 3999719339, 2821834349, 766784016, 2952996808, 2566594879, 3210313671, 3203337956, 3336571891, 1034457026, 3584528711, 2466948901, 113926993, 3758326383, 338241895, 168717936, 666307205, 1188179964, 773529912, 1546045734, 1294757372, 1522805485, 1396182291, 2643833823, 1695183700, 2343527390, 1986661051, 1014477480, 2177026350, 1206759142, 2456956037, 344077627, 2730485921, 1290863460, 2820302411, 3158454273, 3259730800, 3505952657, 3345764771, 106217008, 3516065817, 3606008344, 3600352804, 1432725776, 4094571909, 1467031594, 275423344, 851169720, 430227734, 3100823752, 506948616, 1363258195, 659060556, 3750685593, 883997877, 3785050280, 958139571, 3318307427, 1322822218, 3812723403, 1537002063, 2003034995, 1747873779, 3602036899, 1955562222, 1575990012, 2024104815, 1125592928, 2227730452, 2716904306, 2361852424, 442776044, 2428436474, 593698344, 2756734187, 3733110249, 3204031479, 2999351573, 3329325298, 3815920427, 3391569614, 3928383900, 3515267271, 566280711, 3940187606, 3454069534, 4118630271, 4000239992, 116418474, 1914138554, 174292421, 2731055270, 289380356, 3203993006, 460393269, 320620315, 685471733, 587496836, 852142971, 1086792851, 1017036298, 365543100, 1126000580, 2618297676, 1288033470, 3409855158, 1501505948, 4234509866, 1607167915, 987167468, 1816402316, 1246189591];
|
|
4898
4898
|
function yr() {
|
|
4899
4899
|
if (!(this instanceof yr)) return new yr();
|
|
4900
|
-
|
|
4900
|
+
Df.call(this), this.h = [1779033703, 4089235720, 3144134277, 2227873595, 1013904242, 4271175723, 2773480762, 1595750129, 1359893119, 2917565137, 2600822924, 725511199, 528734635, 4215389547, 1541459225, 327033209], this.k = Nh, this.W = new Array(160);
|
|
4901
4901
|
}
|
|
4902
|
-
er.inherits(yr,
|
|
4903
|
-
var
|
|
4902
|
+
er.inherits(yr, Df);
|
|
4903
|
+
var Ff = yr;
|
|
4904
4904
|
function Oh(e, t, r, n, i) {
|
|
4905
4905
|
var s = e & r ^ ~e & i;
|
|
4906
4906
|
return s < 0 && (s += 4294967296), s;
|
|
@@ -4945,14 +4945,14 @@ function Hh(e, t) {
|
|
|
4945
4945
|
var r = Or(e, t, 19) ^ Or(t, e, 29) ^ Uf(e, t, 6);
|
|
4946
4946
|
return r < 0 && (r += 4294967296), r;
|
|
4947
4947
|
}
|
|
4948
|
-
function
|
|
4948
|
+
function Dh(e, t) {
|
|
4949
4949
|
var r = Cr(e, t, 19) ^ Cr(t, e, 29) ^ Hf(e, t, 6);
|
|
4950
4950
|
return r < 0 && (r += 4294967296), r;
|
|
4951
4951
|
}
|
|
4952
4952
|
yr.blockSize = 1024, yr.outSize = 512, yr.hmacStrength = 192, yr.padLength = 128, yr.prototype._prepareBlock = function(e, t) {
|
|
4953
4953
|
for (var r = this.W, n = 0; n < 32; n++) r[n] = e[t + n];
|
|
4954
4954
|
for (; n < r.length; n += 2) {
|
|
4955
|
-
var i = Hh(r[n - 4], r[n - 3]), s =
|
|
4955
|
+
var i = Hh(r[n - 4], r[n - 3]), s = Dh(r[n - 4], r[n - 3]), a = r[n - 14], o = r[n - 13], c = qh(r[n - 30], r[n - 29]), f = Uh(r[n - 30], r[n - 29]), u = r[n - 32], p = r[n - 31];
|
|
4956
4956
|
r[n] = Eh(i, s, a, o, c, f, u, p), r[n + 1] = Ih(i, s, a, o, c, f, u, p);
|
|
4957
4957
|
}
|
|
4958
4958
|
}, yr.prototype._update = function(e, t) {
|
|
@@ -4965,20 +4965,20 @@ yr.blockSize = 1024, yr.outSize = 512, yr.hmacStrength = 192, yr.padLength = 128
|
|
|
4965
4965
|
var R = po(I, N, z, B), j = mo(I, N, z, B);
|
|
4966
4966
|
k = E, A = _, E = v, _ = S, v = p, S = w, p = po(f, u, x, O), w = mo(u, u, x, O), f = o, u = c, o = s, c = a, s = n, a = i, n = po(x, O, R, j), i = mo(x, O, R, j);
|
|
4967
4967
|
}
|
|
4968
|
-
|
|
4968
|
+
Jr(this.h, 0, n, i), Jr(this.h, 2, s, a), Jr(this.h, 4, o, c), Jr(this.h, 6, f, u), Jr(this.h, 8, p, w), Jr(this.h, 10, v, S), Jr(this.h, 12, E, _), Jr(this.h, 14, k, A);
|
|
4969
4969
|
}, yr.prototype._digest = function(e) {
|
|
4970
4970
|
return e === "hex" ? er.toHex32(this.h, "big") : er.split32(this.h, "big");
|
|
4971
4971
|
};
|
|
4972
|
-
var ra = Wt, Zf =
|
|
4973
|
-
function
|
|
4974
|
-
if (!(this instanceof
|
|
4972
|
+
var ra = Wt, Zf = Ff;
|
|
4973
|
+
function Dr() {
|
|
4974
|
+
if (!(this instanceof Dr)) return new Dr();
|
|
4975
4975
|
Zf.call(this), this.h = [3418070365, 3238371032, 1654270250, 914150663, 2438529370, 812702999, 355462360, 4144912697, 1731405415, 4290775857, 2394180231, 1750603025, 3675008525, 1694076839, 1203062813, 3204075428];
|
|
4976
4976
|
}
|
|
4977
|
-
ra.inherits(
|
|
4978
|
-
var
|
|
4979
|
-
|
|
4977
|
+
ra.inherits(Dr, Zf);
|
|
4978
|
+
var Fh = Dr;
|
|
4979
|
+
Dr.blockSize = 1024, Dr.outSize = 384, Dr.hmacStrength = 192, Dr.padLength = 128, Dr.prototype._digest = function(e) {
|
|
4980
4980
|
return e === "hex" ? ra.toHex32(this.h.slice(0, 12), "big") : ra.split32(this.h.slice(0, 12), "big");
|
|
4981
|
-
}, qn.sha1 = hh, qn.sha224 = Ah, qn.sha256 = $f, qn.sha384 =
|
|
4981
|
+
}, qn.sha1 = hh, qn.sha224 = Ah, qn.sha256 = $f, qn.sha384 = Fh, qn.sha512 = Ff;
|
|
4982
4982
|
var Vf = {}, An = Wt, Zh = fi, ds = An.rotl32, N0 = An.sum32, vi = An.sum32_3, O0 = An.sum32_4, Kf = Zh.BlockHash;
|
|
4983
4983
|
function Mr() {
|
|
4984
4984
|
if (!(this instanceof Mr)) return new Mr();
|
|
@@ -4996,16 +4996,16 @@ function Kh(e) {
|
|
|
4996
4996
|
An.inherits(Mr, Kf), Vf.ripemd160 = Mr, Mr.blockSize = 512, Mr.outSize = 160, Mr.hmacStrength = 192, Mr.padLength = 64, Mr.prototype._update = function(e, t) {
|
|
4997
4997
|
for (var r = this.h[0], n = this.h[1], i = this.h[2], s = this.h[3], a = this.h[4], o = r, c = n, f = i, u = s, p = a, w = 0; w < 80; w++) {
|
|
4998
4998
|
var v = N0(ds(O0(r, C0(w, n, i, s), e[Wh[w] + t], Vh(w)), Qh[w]), a);
|
|
4999
|
-
r = a, a = s, s = ds(i, 10), i = n, n = v, v = N0(ds(O0(o, C0(79 - w, c, f, u), e[Yh[w] + t], Kh(w)),
|
|
4999
|
+
r = a, a = s, s = ds(i, 10), i = n, n = v, v = N0(ds(O0(o, C0(79 - w, c, f, u), e[Yh[w] + t], Kh(w)), Jh[w]), p), o = p, p = u, u = ds(f, 10), f = c, c = v;
|
|
5000
5000
|
}
|
|
5001
5001
|
v = vi(this.h[1], i, u), this.h[1] = vi(this.h[2], s, p), this.h[2] = vi(this.h[3], a, o), this.h[3] = vi(this.h[4], r, c), this.h[4] = vi(this.h[0], n, f), this.h[0] = v;
|
|
5002
5002
|
}, Mr.prototype._digest = function(e) {
|
|
5003
5003
|
return e === "hex" ? An.toHex32(this.h, "little") : An.split32(this.h, "little");
|
|
5004
5004
|
};
|
|
5005
|
-
var Wh = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13], Yh = [5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11], Qh = [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6],
|
|
5005
|
+
var Wh = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13], Yh = [5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11], Qh = [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6], Jh = [8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11], Gh = Wt, Xh = Bn;
|
|
5006
5006
|
function Qn(e, t, r) {
|
|
5007
5007
|
if (!(this instanceof Qn)) return new Qn(e, t, r);
|
|
5008
|
-
this.Hash = e, this.blockSize = e.blockSize / 8, this.outSize = e.outSize / 8, this.inner = null, this.outer = null, this._init(
|
|
5008
|
+
this.Hash = e, this.blockSize = e.blockSize / 8, this.outSize = e.outSize / 8, this.inner = null, this.outer = null, this._init(Gh.toArray(t, r));
|
|
5009
5009
|
}
|
|
5010
5010
|
var B0, P0, t2 = Qn;
|
|
5011
5011
|
Qn.prototype._init = function(e) {
|
|
@@ -5022,7 +5022,7 @@ Qn.prototype._init = function(e) {
|
|
|
5022
5022
|
var e = Ss;
|
|
5023
5023
|
e.utils = Wt, e.common = fi, e.sha = qn, e.ripemd = Vf, e.hmac = t2, e.sha1 = e.sha.sha1, e.sha256 = e.sha.sha256, e.sha224 = e.sha.sha224, e.sha384 = e.sha.sha384, e.sha512 = e.sha.sha512, e.ripemd160 = e.ripemd.ripemd160;
|
|
5024
5024
|
}(), function() {
|
|
5025
|
-
var e, t = Ws, r = Ss, n =
|
|
5025
|
+
var e, t = Ws, r = Ss, n = Fa, i = nr.assert;
|
|
5026
5026
|
function s(o) {
|
|
5027
5027
|
o.type === "short" ? this.curve = new n.short(o) : o.type === "edwards" ? this.curve = new n.edwards(o) : this.curve = new n.mont(o), this.g = this.curve.g, this.n = this.curve.n, this.hash = o.hash, i(this.g.validate(), "Invalid curve"), i(this.g.mul(this.n).isInfinity(), "Invalid curve, G*N != O");
|
|
5028
5028
|
}
|
|
@@ -5040,7 +5040,7 @@ Qn.prototype._init = function(e) {
|
|
|
5040
5040
|
}
|
|
5041
5041
|
a("secp256k1", { type: "short", prime: "k256", p: "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f", a: "0", b: "7", n: "ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141", h: "1", hash: r.sha256, beta: "7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee", lambda: "5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72", basis: [{ a: "3086d221a7d46bcde86c90e49284eb15", b: "-e4437ed6010e88286f547fa90abfe4c3" }, { a: "114ca50f7a8e2f3f657c1108d9d44cfd8", b: "3086d221a7d46bcde86c90e49284eb15" }], gRed: !1, g: ["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", "483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8", e] });
|
|
5042
5042
|
}();
|
|
5043
|
-
var e2 = Ss, _n =
|
|
5043
|
+
var e2 = Ss, _n = Jo, Wf = Bn;
|
|
5044
5044
|
function sn(e) {
|
|
5045
5045
|
if (!(this instanceof sn)) return new sn(e);
|
|
5046
5046
|
this.hash = e.hash, this.predResist = !!e.predResist, this.outLen = this.hash.outSize, this.minEntropy = e.minEntropy || this.hash.hmacStrength, this._reseed = null, this.reseedInterval = null, this.K = null, this.V = null;
|
|
@@ -5068,33 +5068,33 @@ sn.prototype._init = function(e, t, r) {
|
|
|
5068
5068
|
return this._update(r), this._reseed++, _n.encode(s, t);
|
|
5069
5069
|
};
|
|
5070
5070
|
var n2 = Wr, bo = nr.assert;
|
|
5071
|
-
function
|
|
5071
|
+
function Fe(e, t) {
|
|
5072
5072
|
this.ec = e, this.priv = null, this.pub = null, t.priv && this._importPrivate(t.priv, t.privEnc), t.pub && this._importPublic(t.pub, t.pubEnc);
|
|
5073
5073
|
}
|
|
5074
|
-
var i2 =
|
|
5075
|
-
|
|
5076
|
-
return t instanceof
|
|
5077
|
-
},
|
|
5078
|
-
return t instanceof
|
|
5079
|
-
},
|
|
5074
|
+
var i2 = Fe;
|
|
5075
|
+
Fe.fromPublic = function(e, t, r) {
|
|
5076
|
+
return t instanceof Fe ? t : new Fe(e, { pub: t, pubEnc: r });
|
|
5077
|
+
}, Fe.fromPrivate = function(e, t, r) {
|
|
5078
|
+
return t instanceof Fe ? t : new Fe(e, { priv: t, privEnc: r });
|
|
5079
|
+
}, Fe.prototype.validate = function() {
|
|
5080
5080
|
var e = this.getPublic();
|
|
5081
5081
|
return e.isInfinity() ? { result: !1, reason: "Invalid public key" } : e.validate() ? e.mul(this.ec.curve.n).isInfinity() ? { result: !0, reason: null } : { result: !1, reason: "Public key * N != O" } : { result: !1, reason: "Public key is not a point" };
|
|
5082
|
-
},
|
|
5082
|
+
}, Fe.prototype.getPublic = function(e, t) {
|
|
5083
5083
|
return typeof e == "string" && (t = e, e = null), this.pub || (this.pub = this.ec.g.mul(this.priv)), t ? this.pub.encode(t, e) : this.pub;
|
|
5084
|
-
},
|
|
5084
|
+
}, Fe.prototype.getPrivate = function(e) {
|
|
5085
5085
|
return e === "hex" ? this.priv.toString(16, 2) : this.priv;
|
|
5086
|
-
},
|
|
5086
|
+
}, Fe.prototype._importPrivate = function(e, t) {
|
|
5087
5087
|
this.priv = new n2(e, t || 16), this.priv = this.priv.umod(this.ec.curve.n);
|
|
5088
|
-
},
|
|
5088
|
+
}, Fe.prototype._importPublic = function(e, t) {
|
|
5089
5089
|
if (e.x || e.y) return this.ec.curve.type === "mont" ? bo(e.x, "Need x coordinate") : this.ec.curve.type !== "short" && this.ec.curve.type !== "edwards" || bo(e.x && e.y, "Need both x and y coordinate"), void (this.pub = this.ec.curve.point(e.x, e.y));
|
|
5090
5090
|
this.pub = this.ec.curve.decodePoint(e, t);
|
|
5091
|
-
},
|
|
5091
|
+
}, Fe.prototype.derive = function(e) {
|
|
5092
5092
|
return e.validate() || bo(e.validate(), "public point not validated"), e.mul(this.priv).getX();
|
|
5093
|
-
},
|
|
5093
|
+
}, Fe.prototype.sign = function(e, t, r) {
|
|
5094
5094
|
return this.ec.sign(e, this, t, r);
|
|
5095
|
-
},
|
|
5095
|
+
}, Fe.prototype.verify = function(e, t, r) {
|
|
5096
5096
|
return this.ec.verify(e, t, this, void 0, r);
|
|
5097
|
-
},
|
|
5097
|
+
}, Fe.prototype.inspect = function() {
|
|
5098
5098
|
return "<Key priv: " + (this.priv && this.priv.toString(16, 2)) + " pub: " + (this.pub && this.pub.inspect()) + " >";
|
|
5099
5099
|
};
|
|
5100
5100
|
var As = Wr, na = nr, s2 = na.assert;
|
|
@@ -5236,38 +5236,38 @@ dr.prototype.keyPair = function(e) {
|
|
|
5236
5236
|
throw new Error("Unable to find valid recovery factor");
|
|
5237
5237
|
};
|
|
5238
5238
|
var Ni = nr, j0 = Ni.assert, $0 = Ni.parseBytes, zn = Ni.cachedProperty;
|
|
5239
|
-
function
|
|
5239
|
+
function Ce(e, t) {
|
|
5240
5240
|
this.eddsa = e, this._secret = $0(t.secret), e.isPoint(t.pub) ? this._pub = t.pub : this._pubBytes = $0(t.pub);
|
|
5241
5241
|
}
|
|
5242
|
-
|
|
5243
|
-
return t instanceof
|
|
5244
|
-
},
|
|
5245
|
-
return t instanceof
|
|
5246
|
-
},
|
|
5242
|
+
Ce.fromPublic = function(e, t) {
|
|
5243
|
+
return t instanceof Ce ? t : new Ce(e, { pub: t });
|
|
5244
|
+
}, Ce.fromSecret = function(e, t) {
|
|
5245
|
+
return t instanceof Ce ? t : new Ce(e, { secret: t });
|
|
5246
|
+
}, Ce.prototype.secret = function() {
|
|
5247
5247
|
return this._secret;
|
|
5248
|
-
}, zn(
|
|
5248
|
+
}, zn(Ce, "pubBytes", function() {
|
|
5249
5249
|
return this.eddsa.encodePoint(this.pub());
|
|
5250
|
-
}), zn(
|
|
5250
|
+
}), zn(Ce, "pub", function() {
|
|
5251
5251
|
return this._pubBytes ? this.eddsa.decodePoint(this._pubBytes) : this.eddsa.g.mul(this.priv());
|
|
5252
|
-
}), zn(
|
|
5252
|
+
}), zn(Ce, "privBytes", function() {
|
|
5253
5253
|
var e = this.eddsa, t = this.hash(), r = e.encodingLength - 1, n = t.slice(0, e.encodingLength);
|
|
5254
5254
|
return n[0] &= 248, n[r] &= 127, n[r] |= 64, n;
|
|
5255
|
-
}), zn(
|
|
5255
|
+
}), zn(Ce, "priv", function() {
|
|
5256
5256
|
return this.eddsa.decodeInt(this.privBytes());
|
|
5257
|
-
}), zn(
|
|
5257
|
+
}), zn(Ce, "hash", function() {
|
|
5258
5258
|
return this.eddsa.hash().update(this.secret()).digest();
|
|
5259
|
-
}), zn(
|
|
5259
|
+
}), zn(Ce, "messagePrefix", function() {
|
|
5260
5260
|
return this.hash().slice(this.eddsa.encodingLength);
|
|
5261
|
-
}),
|
|
5261
|
+
}), Ce.prototype.sign = function(e) {
|
|
5262
5262
|
return j0(this._secret, "KeyPair can only verify"), this.eddsa.sign(e, this);
|
|
5263
|
-
},
|
|
5263
|
+
}, Ce.prototype.verify = function(e, t) {
|
|
5264
5264
|
return this.eddsa.verify(e, t, this);
|
|
5265
|
-
},
|
|
5265
|
+
}, Ce.prototype.getSecret = function(e) {
|
|
5266
5266
|
return j0(this._secret, "KeyPair is public only"), Ni.encode(this.secret(), e);
|
|
5267
|
-
},
|
|
5267
|
+
}, Ce.prototype.getPublic = function(e) {
|
|
5268
5268
|
return Ni.encode(this.pubBytes(), e);
|
|
5269
5269
|
};
|
|
5270
|
-
var f2 =
|
|
5270
|
+
var f2 = Ce, u2 = Wr, Ys = nr, q0 = Ys.assert, us = Ys.cachedProperty, h2 = Ys.parseBytes;
|
|
5271
5271
|
function gn(e, t) {
|
|
5272
5272
|
this.eddsa = e, typeof t != "object" && (t = h2(t)), Array.isArray(t) && (q0(t.length === 2 * e.encodingLength, "Signature has invalid size"), t = { R: t.slice(0, e.encodingLength), S: t.slice(e.encodingLength) }), q0(t.R && t.S, "Signature without R or S"), e.isPoint(t.R) && (this._R = t.R), t.S instanceof u2 && (this._S = t.S), this._Rencoded = Array.isArray(t.R) ? t.R : t.Rencoded, this._Sencoded = Array.isArray(t.S) ? t.S : t.Sencoded;
|
|
5273
5273
|
}
|
|
@@ -5284,44 +5284,44 @@ us(gn, "S", function() {
|
|
|
5284
5284
|
}, gn.prototype.toHex = function() {
|
|
5285
5285
|
return Ys.encode(this.toBytes(), "hex").toUpperCase();
|
|
5286
5286
|
};
|
|
5287
|
-
var l2 = gn, p2 = Ss, m2 = Ws, Vn = nr, b2 = Vn.assert, U0 = Vn.parseBytes, H0 = f2,
|
|
5288
|
-
function
|
|
5289
|
-
if (b2(e === "ed25519", "only tested with ed25519 so far"), !(this instanceof
|
|
5287
|
+
var l2 = gn, p2 = Ss, m2 = Ws, Vn = nr, b2 = Vn.assert, U0 = Vn.parseBytes, H0 = f2, D0 = l2;
|
|
5288
|
+
function Je(e) {
|
|
5289
|
+
if (b2(e === "ed25519", "only tested with ed25519 so far"), !(this instanceof Je)) return new Je(e);
|
|
5290
5290
|
e = m2[e].curve, this.curve = e, this.g = e.g, this.g.precompute(e.n.bitLength() + 1), this.pointClass = e.point().constructor, this.encodingLength = Math.ceil(e.n.bitLength() / 8), this.hash = p2.sha512;
|
|
5291
5291
|
}
|
|
5292
|
-
var Ai, ki, ia,
|
|
5293
|
-
|
|
5292
|
+
var Ai, ki, ia, F0, g2 = Je;
|
|
5293
|
+
Je.prototype.sign = function(e, t) {
|
|
5294
5294
|
e = U0(e);
|
|
5295
5295
|
var r = this.keyFromSecret(t), n = this.hashInt(r.messagePrefix(), e), i = this.g.mul(n), s = this.encodePoint(i), a = this.hashInt(s, r.pubBytes(), e).mul(r.priv()), o = n.add(a).umod(this.curve.n);
|
|
5296
5296
|
return this.makeSignature({ R: i, S: o, Rencoded: s });
|
|
5297
|
-
},
|
|
5297
|
+
}, Je.prototype.verify = function(e, t, r) {
|
|
5298
5298
|
if (e = U0(e), (t = this.makeSignature(t)).S().gte(t.eddsa.curve.n) || t.S().isNeg()) return !1;
|
|
5299
5299
|
var n = this.keyFromPublic(r), i = this.hashInt(t.Rencoded(), n.pubBytes(), e), s = this.g.mul(t.S());
|
|
5300
5300
|
return t.R().add(n.pub().mul(i)).eq(s);
|
|
5301
|
-
},
|
|
5301
|
+
}, Je.prototype.hashInt = function() {
|
|
5302
5302
|
for (var e = this.hash(), t = 0; t < arguments.length; t++) e.update(arguments[t]);
|
|
5303
5303
|
return Vn.intFromLE(e.digest()).umod(this.curve.n);
|
|
5304
|
-
},
|
|
5304
|
+
}, Je.prototype.keyFromPublic = function(e) {
|
|
5305
5305
|
return H0.fromPublic(this, e);
|
|
5306
|
-
},
|
|
5306
|
+
}, Je.prototype.keyFromSecret = function(e) {
|
|
5307
5307
|
return H0.fromSecret(this, e);
|
|
5308
|
-
},
|
|
5309
|
-
return e instanceof
|
|
5310
|
-
},
|
|
5308
|
+
}, Je.prototype.makeSignature = function(e) {
|
|
5309
|
+
return e instanceof D0 ? e : new D0(this, e);
|
|
5310
|
+
}, Je.prototype.encodePoint = function(e) {
|
|
5311
5311
|
var t = e.getY().toArray("le", this.encodingLength);
|
|
5312
5312
|
return t[this.encodingLength - 1] |= e.getX().isOdd() ? 128 : 0, t;
|
|
5313
|
-
},
|
|
5313
|
+
}, Je.prototype.decodePoint = function(e) {
|
|
5314
5314
|
var t = (e = Vn.parseBytes(e)).length - 1, r = e.slice(0, t).concat(-129 & e[t]), n = !!(128 & e[t]), i = Vn.intFromLE(r);
|
|
5315
5315
|
return this.curve.pointFromY(i, n);
|
|
5316
|
-
},
|
|
5316
|
+
}, Je.prototype.encodeInt = function(e) {
|
|
5317
5317
|
return e.toArray("le", this.encodingLength);
|
|
5318
|
-
},
|
|
5318
|
+
}, Je.prototype.decodeInt = function(e) {
|
|
5319
5319
|
return Vn.intFromLE(e);
|
|
5320
|
-
},
|
|
5320
|
+
}, Je.prototype.isPoint = function(e) {
|
|
5321
5321
|
return e instanceof this.pointClass;
|
|
5322
5322
|
}, function(e) {
|
|
5323
5323
|
var t = e;
|
|
5324
|
-
t.version = Yu, t.utils = nr, t.rand = Bf, t.curve =
|
|
5324
|
+
t.version = Yu, t.utils = nr, t.rand = Bf, t.curve = Fa, t.curves = Ws, t.ec = d2, t.eddsa = g2;
|
|
5325
5325
|
}(Nf), function(e) {
|
|
5326
5326
|
e.NUMBER = "NUMBER_NUMBER", e.HEX = "NUMBER_HEX", e.STR = "NUMBER_STR", e.BIGINT = "NUMBER_BIGINT";
|
|
5327
5327
|
}(Ai || (Ai = {})), function(e) {
|
|
@@ -5330,7 +5330,7 @@ Ge.prototype.sign = function(e, t) {
|
|
|
5330
5330
|
e.EARLIEST = "earliest", e.LATEST = "latest", e.PENDING = "pending", e.SAFE = "safe", e.FINALIZED = "finalized", e.COMMITTED = "committed";
|
|
5331
5331
|
}(ia || (ia = {})), function(e) {
|
|
5332
5332
|
e.chainstart = "chainstart", e.frontier = "frontier", e.homestead = "homestead", e.dao = "dao", e.tangerineWhistle = "tangerineWhistle", e.spuriousDragon = "spuriousDragon", e.byzantium = "byzantium", e.constantinople = "constantinople", e.petersburg = "petersburg", e.istanbul = "istanbul", e.muirGlacier = "muirGlacier", e.berlin = "berlin", e.london = "london", e.altair = "altair", e.arrowGlacier = "arrowGlacier", e.grayGlacier = "grayGlacier", e.bellatrix = "bellatrix", e.merge = "merge", e.capella = "capella", e.shanghai = "shanghai";
|
|
5333
|
-
}(
|
|
5333
|
+
}(F0 || (F0 = {}));
|
|
5334
5334
|
var Z0 = function(e, t, r, n) {
|
|
5335
5335
|
return new (r || (r = Promise))(function(i, s) {
|
|
5336
5336
|
function a(f) {
|
|
@@ -5601,7 +5601,7 @@ function hi(e, ...t) {
|
|
|
5601
5601
|
var r;
|
|
5602
5602
|
if (t.length > 0 && !t.includes(e.length)) throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`);
|
|
5603
5603
|
}
|
|
5604
|
-
function
|
|
5604
|
+
function Jf(e) {
|
|
5605
5605
|
if (typeof e != "function" || typeof e.create != "function") throw new Error("Hash should be wrapped by utils.wrapConstructor");
|
|
5606
5606
|
Oi(e.outputLen), Oi(e.blockLen);
|
|
5607
5607
|
}
|
|
@@ -5616,7 +5616,7 @@ function Ka(e, t) {
|
|
|
5616
5616
|
}
|
|
5617
5617
|
const B2 = { number: Oi, bool: function(e) {
|
|
5618
5618
|
if (typeof e != "boolean") throw new Error(`boolean expected, not ${e}`);
|
|
5619
|
-
}, bytes: hi, hash:
|
|
5619
|
+
}, bytes: hi, hash: Jf, exists: Mn, output: Ka }, hs = BigInt(2 ** 32 - 1), Y0 = BigInt(32);
|
|
5620
5620
|
function P2(e, t = !1) {
|
|
5621
5621
|
return t ? { h: Number(e & hs), l: Number(e >> Y0 & hs) } : { h: 0 | Number(e >> Y0 & hs), l: 0 | Number(e & hs) };
|
|
5622
5622
|
}
|
|
@@ -5629,23 +5629,23 @@ function L2(e, t = !1) {
|
|
|
5629
5629
|
return [r, n];
|
|
5630
5630
|
}
|
|
5631
5631
|
const _o = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0, xo = (e) => new DataView(e.buffer, e.byteOffset, e.byteLength), Sr = (e, t) => e << 32 - t | e >>> t, Q0 = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68, z2 = (e) => e << 24 & 4278190080 | e << 8 & 16711680 | e >>> 8 & 65280 | e >>> 24 & 255;
|
|
5632
|
-
function
|
|
5632
|
+
function J0(e) {
|
|
5633
5633
|
for (let t = 0; t < e.length; t++) e[t] = z2(e[t]);
|
|
5634
5634
|
}
|
|
5635
|
-
function
|
|
5635
|
+
function Jn(e) {
|
|
5636
5636
|
if (typeof e != "string") throw new Error("utf8ToBytes expected string, got " + typeof e);
|
|
5637
5637
|
return new Uint8Array(new TextEncoder().encode(e));
|
|
5638
5638
|
}
|
|
5639
|
-
function
|
|
5640
|
-
return typeof e == "string" && (e =
|
|
5639
|
+
function Js(e) {
|
|
5640
|
+
return typeof e == "string" && (e = Jn(e)), hi(e), e;
|
|
5641
5641
|
}
|
|
5642
5642
|
class Wa {
|
|
5643
5643
|
clone() {
|
|
5644
5644
|
return this._cloneInto();
|
|
5645
5645
|
}
|
|
5646
5646
|
}
|
|
5647
|
-
function
|
|
5648
|
-
const t = (n) => e().update(
|
|
5647
|
+
function Gf(e) {
|
|
5648
|
+
const t = (n) => e().update(Js(n)).digest(), r = e();
|
|
5649
5649
|
return t.outputLen = r.outputLen, t.blockLen = r.blockLen, t.create = () => e(), t;
|
|
5650
5650
|
}
|
|
5651
5651
|
function Xf(e = 32) {
|
|
@@ -5659,7 +5659,7 @@ for (let e = 0, t = wi, r = 1, n = 0; e < 24; e++) {
|
|
|
5659
5659
|
for (let s = 0; s < 7; s++) t = (t << wi ^ (t >> q2) * H2) % U2, t & $2 && (i ^= wi << (wi << BigInt(s)) - wi);
|
|
5660
5660
|
r1.push(i);
|
|
5661
5661
|
}
|
|
5662
|
-
const [
|
|
5662
|
+
const [D2, F2] = L2(r1, !0), G0 = (e, t, r) => r > 32 ? ((n, i, s) => i << s - 32 | n >>> 64 - s)(e, t, r) : ((n, i, s) => n << s | i >>> 32 - s)(e, t, r), X0 = (e, t, r) => r > 32 ? ((n, i, s) => n << s - 32 | i >>> 64 - s)(e, t, r) : ((n, i, s) => i << s | n >>> 32 - s)(e, t, r);
|
|
5663
5663
|
class Ya extends Wa {
|
|
5664
5664
|
constructor(t, r, n, i = !1, s = 24) {
|
|
5665
5665
|
if (super(), this.blockLen = t, this.suffix = r, this.outputLen = n, this.enableXOF = i, this.rounds = s, this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, Oi(n), 0 >= this.blockLen || this.blockLen >= 200) throw new Error("Sha3 supports only keccak-f1600 function");
|
|
@@ -5667,31 +5667,31 @@ class Ya extends Wa {
|
|
|
5667
5667
|
this.state = new Uint8Array(200), this.state32 = (a = this.state, new Uint32Array(a.buffer, a.byteOffset, Math.floor(a.byteLength / 4)));
|
|
5668
5668
|
}
|
|
5669
5669
|
keccak() {
|
|
5670
|
-
Q0 ||
|
|
5670
|
+
Q0 || J0(this.state32), function(t, r = 24) {
|
|
5671
5671
|
const n = new Uint32Array(10);
|
|
5672
5672
|
for (let i = 24 - r; i < 24; i++) {
|
|
5673
5673
|
for (let o = 0; o < 10; o++) n[o] = t[o] ^ t[o + 10] ^ t[o + 20] ^ t[o + 30] ^ t[o + 40];
|
|
5674
5674
|
for (let o = 0; o < 10; o += 2) {
|
|
5675
|
-
const c = (o + 8) % 10, f = (o + 2) % 10, u = n[f], p = n[f + 1], w =
|
|
5675
|
+
const c = (o + 8) % 10, f = (o + 2) % 10, u = n[f], p = n[f + 1], w = G0(u, p, 1) ^ n[c], v = X0(u, p, 1) ^ n[c + 1];
|
|
5676
5676
|
for (let S = 0; S < 50; S += 10) t[o + S] ^= w, t[o + S + 1] ^= v;
|
|
5677
5677
|
}
|
|
5678
5678
|
let s = t[2], a = t[3];
|
|
5679
5679
|
for (let o = 0; o < 24; o++) {
|
|
5680
|
-
const c = e1[o], f =
|
|
5680
|
+
const c = e1[o], f = G0(s, a, c), u = X0(s, a, c), p = t1[o];
|
|
5681
5681
|
s = t[p], a = t[p + 1], t[p] = f, t[p + 1] = u;
|
|
5682
5682
|
}
|
|
5683
5683
|
for (let o = 0; o < 50; o += 10) {
|
|
5684
5684
|
for (let c = 0; c < 10; c++) n[c] = t[o + c];
|
|
5685
5685
|
for (let c = 0; c < 10; c++) t[o + c] ^= ~n[(c + 2) % 10] & n[(c + 4) % 10];
|
|
5686
5686
|
}
|
|
5687
|
-
t[0] ^=
|
|
5687
|
+
t[0] ^= D2[i], t[1] ^= F2[i];
|
|
5688
5688
|
}
|
|
5689
5689
|
n.fill(0);
|
|
5690
|
-
}(this.state32, this.rounds), Q0 ||
|
|
5690
|
+
}(this.state32, this.rounds), Q0 || J0(this.state32), this.posOut = 0, this.pos = 0;
|
|
5691
5691
|
}
|
|
5692
5692
|
update(t) {
|
|
5693
5693
|
Mn(this);
|
|
5694
|
-
const { blockLen: r, state: n } = this, i = (t =
|
|
5694
|
+
const { blockLen: r, state: n } = this, i = (t = Js(t)).length;
|
|
5695
5695
|
for (let s = 0; s < i; ) {
|
|
5696
5696
|
const a = Math.min(r - this.pos, i - s);
|
|
5697
5697
|
for (let o = 0; o < a; o++) n[this.pos++] ^= t[s++];
|
|
@@ -5737,7 +5737,7 @@ class Ya extends Wa {
|
|
|
5737
5737
|
return t || (t = new Ya(r, n, i, a, s)), t.state32.set(this.state32), t.pos = this.pos, t.posOut = this.posOut, t.finished = this.finished, t.rounds = s, t.suffix = n, t.outputLen = i, t.enableXOF = a, t.destroyed = this.destroyed, t;
|
|
5738
5738
|
}
|
|
5739
5739
|
}
|
|
5740
|
-
const td = ((e, t, r) =>
|
|
5740
|
+
const td = ((e, t, r) => Gf(() => new Ya(t, e, r)))(1, 136, 32);
|
|
5741
5741
|
(() => {
|
|
5742
5742
|
const e = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0, t = typeof module < "u" && Tf.bind(module);
|
|
5743
5743
|
t && !e && t("crypto");
|
|
@@ -5797,7 +5797,7 @@ const bt = te.arrayToEnum(["string", "nan", "number", "integer", "float", "boole
|
|
|
5797
5797
|
default:
|
|
5798
5798
|
return bt.unknown;
|
|
5799
5799
|
}
|
|
5800
|
-
},
|
|
5800
|
+
}, J = te.arrayToEnum(["invalid_type", "invalid_literal", "custom", "invalid_union", "invalid_union_discriminator", "invalid_enum_value", "unrecognized_keys", "invalid_arguments", "invalid_return_type", "invalid_date", "invalid_string", "too_small", "too_big", "invalid_intersection_types", "not_multiple_of", "not_finite"]);
|
|
5801
5801
|
class rr extends Error {
|
|
5802
5802
|
get errors() {
|
|
5803
5803
|
return this.issues;
|
|
@@ -5857,52 +5857,52 @@ rr.create = (e) => new rr(e);
|
|
|
5857
5857
|
const ii = (e, t) => {
|
|
5858
5858
|
let r;
|
|
5859
5859
|
switch (e.code) {
|
|
5860
|
-
case
|
|
5860
|
+
case J.invalid_type:
|
|
5861
5861
|
r = e.received === bt.undefined ? "Required" : `Expected ${e.expected}, received ${e.received}`;
|
|
5862
5862
|
break;
|
|
5863
|
-
case
|
|
5863
|
+
case J.invalid_literal:
|
|
5864
5864
|
r = `Invalid literal value, expected ${JSON.stringify(e.expected, te.jsonStringifyReplacer)}`;
|
|
5865
5865
|
break;
|
|
5866
|
-
case
|
|
5866
|
+
case J.unrecognized_keys:
|
|
5867
5867
|
r = `Unrecognized key(s) in object: ${te.joinValues(e.keys, ", ")}`;
|
|
5868
5868
|
break;
|
|
5869
|
-
case
|
|
5869
|
+
case J.invalid_union:
|
|
5870
5870
|
r = "Invalid input";
|
|
5871
5871
|
break;
|
|
5872
|
-
case
|
|
5872
|
+
case J.invalid_union_discriminator:
|
|
5873
5873
|
r = `Invalid discriminator value. Expected ${te.joinValues(e.options)}`;
|
|
5874
5874
|
break;
|
|
5875
|
-
case
|
|
5875
|
+
case J.invalid_enum_value:
|
|
5876
5876
|
r = `Invalid enum value. Expected ${te.joinValues(e.options)}, received '${e.received}'`;
|
|
5877
5877
|
break;
|
|
5878
|
-
case
|
|
5878
|
+
case J.invalid_arguments:
|
|
5879
5879
|
r = "Invalid function arguments";
|
|
5880
5880
|
break;
|
|
5881
|
-
case
|
|
5881
|
+
case J.invalid_return_type:
|
|
5882
5882
|
r = "Invalid function return type";
|
|
5883
5883
|
break;
|
|
5884
|
-
case
|
|
5884
|
+
case J.invalid_date:
|
|
5885
5885
|
r = "Invalid date";
|
|
5886
5886
|
break;
|
|
5887
|
-
case
|
|
5887
|
+
case J.invalid_string:
|
|
5888
5888
|
typeof e.validation == "object" ? "includes" in e.validation ? (r = `Invalid input: must include "${e.validation.includes}"`, typeof e.validation.position == "number" && (r = `${r} at one or more positions greater than or equal to ${e.validation.position}`)) : "startsWith" in e.validation ? r = `Invalid input: must start with "${e.validation.startsWith}"` : "endsWith" in e.validation ? r = `Invalid input: must end with "${e.validation.endsWith}"` : te.assertNever(e.validation) : r = e.validation !== "regex" ? `Invalid ${e.validation}` : "Invalid";
|
|
5889
5889
|
break;
|
|
5890
|
-
case
|
|
5890
|
+
case J.too_small:
|
|
5891
5891
|
r = e.type === "array" ? `Array must contain ${e.exact ? "exactly" : e.inclusive ? "at least" : "more than"} ${e.minimum} element(s)` : e.type === "string" ? `String must contain ${e.exact ? "exactly" : e.inclusive ? "at least" : "over"} ${e.minimum} character(s)` : e.type === "number" || e.type === "bigint" ? `Number must be ${e.exact ? "exactly equal to " : e.inclusive ? "greater than or equal to " : "greater than "}${e.minimum}` : e.type === "date" ? `Date must be ${e.exact ? "exactly equal to " : e.inclusive ? "greater than or equal to " : "greater than "}${new Date(Number(e.minimum))}` : "Invalid input";
|
|
5892
5892
|
break;
|
|
5893
|
-
case
|
|
5893
|
+
case J.too_big:
|
|
5894
5894
|
r = e.type === "array" ? `Array must contain ${e.exact ? "exactly" : e.inclusive ? "at most" : "less than"} ${e.maximum} element(s)` : e.type === "string" ? `String must contain ${e.exact ? "exactly" : e.inclusive ? "at most" : "under"} ${e.maximum} character(s)` : e.type === "number" ? `Number must be ${e.exact ? "exactly" : e.inclusive ? "less than or equal to" : "less than"} ${e.maximum}` : e.type === "bigint" ? `BigInt must be ${e.exact ? "exactly" : e.inclusive ? "less than or equal to" : "less than"} ${e.maximum}` : e.type === "date" ? `Date must be ${e.exact ? "exactly" : e.inclusive ? "smaller than or equal to" : "smaller than"} ${new Date(Number(e.maximum))}` : "Invalid input";
|
|
5895
5895
|
break;
|
|
5896
|
-
case
|
|
5896
|
+
case J.custom:
|
|
5897
5897
|
r = "Invalid input";
|
|
5898
5898
|
break;
|
|
5899
|
-
case
|
|
5899
|
+
case J.invalid_intersection_types:
|
|
5900
5900
|
r = "Intersection results could not be merged";
|
|
5901
5901
|
break;
|
|
5902
|
-
case
|
|
5902
|
+
case J.not_multiple_of:
|
|
5903
5903
|
r = `Number must be a multiple of ${e.multipleOf}`;
|
|
5904
5904
|
break;
|
|
5905
|
-
case
|
|
5905
|
+
case J.not_finite:
|
|
5906
5906
|
r = "Number must be finite";
|
|
5907
5907
|
break;
|
|
5908
5908
|
default:
|
|
@@ -6047,7 +6047,7 @@ class Ut {
|
|
|
6047
6047
|
refine(t, r) {
|
|
6048
6048
|
const n = (i) => typeof r == "string" || r === void 0 ? { message: r } : typeof r == "function" ? r(i) : r;
|
|
6049
6049
|
return this._refinement((i, s) => {
|
|
6050
|
-
const a = t(i), o = () => s.addIssue({ code:
|
|
6050
|
+
const a = t(i), o = () => s.addIssue({ code: J.custom, ...n(i) });
|
|
6051
6051
|
return typeof Promise < "u" && a instanceof Promise ? a.then((c) => !!c || (o(), !1)) : !!a || (o(), !1);
|
|
6052
6052
|
});
|
|
6053
6053
|
}
|
|
@@ -6092,20 +6092,20 @@ class Ut {
|
|
|
6092
6092
|
return new Hi({ ...zt(this._def), innerType: this, defaultValue: r, typeName: It.ZodDefault });
|
|
6093
6093
|
}
|
|
6094
6094
|
brand() {
|
|
6095
|
-
return new
|
|
6095
|
+
return new Ja({ typeName: It.ZodBranded, type: this, ...zt(this._def) });
|
|
6096
6096
|
}
|
|
6097
6097
|
catch(t) {
|
|
6098
6098
|
const r = typeof t == "function" ? t : () => t;
|
|
6099
|
-
return new
|
|
6099
|
+
return new Di({ ...zt(this._def), innerType: this, catchValue: r, typeName: It.ZodCatch });
|
|
6100
6100
|
}
|
|
6101
6101
|
describe(t) {
|
|
6102
6102
|
return new this.constructor({ ...this._def, description: t });
|
|
6103
6103
|
}
|
|
6104
6104
|
pipe(t) {
|
|
6105
|
-
return
|
|
6105
|
+
return Ji.create(this, t);
|
|
6106
6106
|
}
|
|
6107
6107
|
readonly() {
|
|
6108
|
-
return
|
|
6108
|
+
return Fi.create(this);
|
|
6109
6109
|
}
|
|
6110
6110
|
isOptional() {
|
|
6111
6111
|
return this.safeParse(void 0).success;
|
|
@@ -6114,7 +6114,7 @@ class Ut {
|
|
|
6114
6114
|
return this.safeParse(null).success;
|
|
6115
6115
|
}
|
|
6116
6116
|
}
|
|
6117
|
-
const Z2 = /^c[^\s-]{8,}$/i, V2 = /^[0-9a-z]+$/, K2 = /^[0-9A-HJKMNP-TV-Z]{26}$/i, W2 = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, Y2 = /^[a-z0-9_-]{21}$/i, Q2 = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,
|
|
6117
|
+
const Z2 = /^c[^\s-]{8,}$/i, V2 = /^[0-9a-z]+$/, K2 = /^[0-9A-HJKMNP-TV-Z]{26}$/i, W2 = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, Y2 = /^[a-z0-9_-]{21}$/i, Q2 = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, J2 = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, G2 = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;
|
|
6118
6118
|
let So;
|
|
6119
6119
|
const X2 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, tl = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, el = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, rl = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, nl = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, il = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, i1 = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", sl = new RegExp(`^${i1}$`);
|
|
6120
6120
|
function s1(e) {
|
|
@@ -6150,32 +6150,32 @@ class vr extends Ut {
|
|
|
6150
6150
|
_parse(t) {
|
|
6151
6151
|
if (this._def.coerce && (t.data = String(t.data)), this._getType(t) !== bt.string) {
|
|
6152
6152
|
const i = this._getOrReturnCtx(t);
|
|
6153
|
-
return ft(i, { code:
|
|
6153
|
+
return ft(i, { code: J.invalid_type, expected: bt.string, received: i.parsedType }), Et;
|
|
6154
6154
|
}
|
|
6155
6155
|
const r = new Ve();
|
|
6156
6156
|
let n;
|
|
6157
|
-
for (const i of this._def.checks) if (i.kind === "min") t.data.length < i.value && (n = this._getOrReturnCtx(t, n), ft(n, { code:
|
|
6158
|
-
else if (i.kind === "max") t.data.length > i.value && (n = this._getOrReturnCtx(t, n), ft(n, { code:
|
|
6157
|
+
for (const i of this._def.checks) if (i.kind === "min") t.data.length < i.value && (n = this._getOrReturnCtx(t, n), ft(n, { code: J.too_small, minimum: i.value, type: "string", inclusive: !0, exact: !1, message: i.message }), r.dirty());
|
|
6158
|
+
else if (i.kind === "max") t.data.length > i.value && (n = this._getOrReturnCtx(t, n), ft(n, { code: J.too_big, maximum: i.value, type: "string", inclusive: !0, exact: !1, message: i.message }), r.dirty());
|
|
6159
6159
|
else if (i.kind === "length") {
|
|
6160
6160
|
const s = t.data.length > i.value, a = t.data.length < i.value;
|
|
6161
|
-
(s || a) && (n = this._getOrReturnCtx(t, n), s ? ft(n, { code:
|
|
6162
|
-
} else if (i.kind === "email")
|
|
6163
|
-
else if (i.kind === "emoji") So || (So = new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u")), So.test(t.data) || (n = this._getOrReturnCtx(t, n), ft(n, { validation: "emoji", code:
|
|
6164
|
-
else if (i.kind === "uuid") W2.test(t.data) || (n = this._getOrReturnCtx(t, n), ft(n, { validation: "uuid", code:
|
|
6165
|
-
else if (i.kind === "nanoid") Y2.test(t.data) || (n = this._getOrReturnCtx(t, n), ft(n, { validation: "nanoid", code:
|
|
6166
|
-
else if (i.kind === "cuid") Z2.test(t.data) || (n = this._getOrReturnCtx(t, n), ft(n, { validation: "cuid", code:
|
|
6167
|
-
else if (i.kind === "cuid2") V2.test(t.data) || (n = this._getOrReturnCtx(t, n), ft(n, { validation: "cuid2", code:
|
|
6168
|
-
else if (i.kind === "ulid") K2.test(t.data) || (n = this._getOrReturnCtx(t, n), ft(n, { validation: "ulid", code:
|
|
6161
|
+
(s || a) && (n = this._getOrReturnCtx(t, n), s ? ft(n, { code: J.too_big, maximum: i.value, type: "string", inclusive: !0, exact: !0, message: i.message }) : a && ft(n, { code: J.too_small, minimum: i.value, type: "string", inclusive: !0, exact: !0, message: i.message }), r.dirty());
|
|
6162
|
+
} else if (i.kind === "email") G2.test(t.data) || (n = this._getOrReturnCtx(t, n), ft(n, { validation: "email", code: J.invalid_string, message: i.message }), r.dirty());
|
|
6163
|
+
else if (i.kind === "emoji") So || (So = new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u")), So.test(t.data) || (n = this._getOrReturnCtx(t, n), ft(n, { validation: "emoji", code: J.invalid_string, message: i.message }), r.dirty());
|
|
6164
|
+
else if (i.kind === "uuid") W2.test(t.data) || (n = this._getOrReturnCtx(t, n), ft(n, { validation: "uuid", code: J.invalid_string, message: i.message }), r.dirty());
|
|
6165
|
+
else if (i.kind === "nanoid") Y2.test(t.data) || (n = this._getOrReturnCtx(t, n), ft(n, { validation: "nanoid", code: J.invalid_string, message: i.message }), r.dirty());
|
|
6166
|
+
else if (i.kind === "cuid") Z2.test(t.data) || (n = this._getOrReturnCtx(t, n), ft(n, { validation: "cuid", code: J.invalid_string, message: i.message }), r.dirty());
|
|
6167
|
+
else if (i.kind === "cuid2") V2.test(t.data) || (n = this._getOrReturnCtx(t, n), ft(n, { validation: "cuid2", code: J.invalid_string, message: i.message }), r.dirty());
|
|
6168
|
+
else if (i.kind === "ulid") K2.test(t.data) || (n = this._getOrReturnCtx(t, n), ft(n, { validation: "ulid", code: J.invalid_string, message: i.message }), r.dirty());
|
|
6169
6169
|
else if (i.kind === "url") try {
|
|
6170
6170
|
new URL(t.data);
|
|
6171
6171
|
} catch {
|
|
6172
|
-
n = this._getOrReturnCtx(t, n), ft(n, { validation: "url", code:
|
|
6172
|
+
n = this._getOrReturnCtx(t, n), ft(n, { validation: "url", code: J.invalid_string, message: i.message }), r.dirty();
|
|
6173
6173
|
}
|
|
6174
|
-
else i.kind === "regex" ? (i.regex.lastIndex = 0, i.regex.test(t.data) || (n = this._getOrReturnCtx(t, n), ft(n, { validation: "regex", code:
|
|
6174
|
+
else i.kind === "regex" ? (i.regex.lastIndex = 0, i.regex.test(t.data) || (n = this._getOrReturnCtx(t, n), ft(n, { validation: "regex", code: J.invalid_string, message: i.message }), r.dirty())) : i.kind === "trim" ? t.data = t.data.trim() : i.kind === "includes" ? t.data.includes(i.value, i.position) || (n = this._getOrReturnCtx(t, n), ft(n, { code: J.invalid_string, validation: { includes: i.value, position: i.position }, message: i.message }), r.dirty()) : i.kind === "toLowerCase" ? t.data = t.data.toLowerCase() : i.kind === "toUpperCase" ? t.data = t.data.toUpperCase() : i.kind === "startsWith" ? t.data.startsWith(i.value) || (n = this._getOrReturnCtx(t, n), ft(n, { code: J.invalid_string, validation: { startsWith: i.value }, message: i.message }), r.dirty()) : i.kind === "endsWith" ? t.data.endsWith(i.value) || (n = this._getOrReturnCtx(t, n), ft(n, { code: J.invalid_string, validation: { endsWith: i.value }, message: i.message }), r.dirty()) : i.kind === "datetime" ? o1(i).test(t.data) || (n = this._getOrReturnCtx(t, n), ft(n, { code: J.invalid_string, validation: "datetime", message: i.message }), r.dirty()) : i.kind === "date" ? sl.test(t.data) || (n = this._getOrReturnCtx(t, n), ft(n, { code: J.invalid_string, validation: "date", message: i.message }), r.dirty()) : i.kind === "time" ? ol(i).test(t.data) || (n = this._getOrReturnCtx(t, n), ft(n, { code: J.invalid_string, validation: "time", message: i.message }), r.dirty()) : i.kind === "duration" ? J2.test(t.data) || (n = this._getOrReturnCtx(t, n), ft(n, { validation: "duration", code: J.invalid_string, message: i.message }), r.dirty()) : i.kind === "ip" ? al(t.data, i.version) || (n = this._getOrReturnCtx(t, n), ft(n, { validation: "ip", code: J.invalid_string, message: i.message }), r.dirty()) : i.kind === "jwt" ? cl(t.data, i.alg) || (n = this._getOrReturnCtx(t, n), ft(n, { validation: "jwt", code: J.invalid_string, message: i.message }), r.dirty()) : i.kind === "cidr" ? dl(t.data, i.version) || (n = this._getOrReturnCtx(t, n), ft(n, { validation: "cidr", code: J.invalid_string, message: i.message }), r.dirty()) : i.kind === "base64" ? nl.test(t.data) || (n = this._getOrReturnCtx(t, n), ft(n, { validation: "base64", code: J.invalid_string, message: i.message }), r.dirty()) : i.kind === "base64url" ? il.test(t.data) || (n = this._getOrReturnCtx(t, n), ft(n, { validation: "base64url", code: J.invalid_string, message: i.message }), r.dirty()) : te.assertNever(i);
|
|
6175
6175
|
return { status: r.value, value: t.data };
|
|
6176
6176
|
}
|
|
6177
6177
|
_regex(t, r, n) {
|
|
6178
|
-
return this.refinement((i) => t.test(i), { validation: r, code:
|
|
6178
|
+
return this.refinement((i) => t.test(i), { validation: r, code: J.invalid_string, ...wt.errToObj(n) });
|
|
6179
6179
|
}
|
|
6180
6180
|
_addCheck(t) {
|
|
6181
6181
|
return new vr({ ...this._def, checks: [...this._def.checks, t] });
|
|
@@ -6335,11 +6335,11 @@ class an extends Ut {
|
|
|
6335
6335
|
_parse(t) {
|
|
6336
6336
|
if (this._def.coerce && (t.data = Number(t.data)), this._getType(t) !== bt.number) {
|
|
6337
6337
|
const i = this._getOrReturnCtx(t);
|
|
6338
|
-
return ft(i, { code:
|
|
6338
|
+
return ft(i, { code: J.invalid_type, expected: bt.number, received: i.parsedType }), Et;
|
|
6339
6339
|
}
|
|
6340
6340
|
let r;
|
|
6341
6341
|
const n = new Ve();
|
|
6342
|
-
for (const i of this._def.checks) i.kind === "int" ? te.isInteger(t.data) || (r = this._getOrReturnCtx(t, r), ft(r, { code:
|
|
6342
|
+
for (const i of this._def.checks) i.kind === "int" ? te.isInteger(t.data) || (r = this._getOrReturnCtx(t, r), ft(r, { code: J.invalid_type, expected: "integer", received: "float", message: i.message }), n.dirty()) : i.kind === "min" ? (i.inclusive ? t.data < i.value : t.data <= i.value) && (r = this._getOrReturnCtx(t, r), ft(r, { code: J.too_small, minimum: i.value, type: "number", inclusive: i.inclusive, exact: !1, message: i.message }), n.dirty()) : i.kind === "max" ? (i.inclusive ? t.data > i.value : t.data >= i.value) && (r = this._getOrReturnCtx(t, r), ft(r, { code: J.too_big, maximum: i.value, type: "number", inclusive: i.inclusive, exact: !1, message: i.message }), n.dirty()) : i.kind === "multipleOf" ? fl(t.data, i.value) !== 0 && (r = this._getOrReturnCtx(t, r), ft(r, { code: J.not_multiple_of, multipleOf: i.value, message: i.message }), n.dirty()) : i.kind === "finite" ? Number.isFinite(t.data) || (r = this._getOrReturnCtx(t, r), ft(r, { code: J.not_finite, message: i.message }), n.dirty()) : te.assertNever(i);
|
|
6343
6343
|
return { status: n.value, value: t.data };
|
|
6344
6344
|
}
|
|
6345
6345
|
gte(t, r) {
|
|
@@ -6420,12 +6420,12 @@ class cn extends Ut {
|
|
|
6420
6420
|
if (this._getType(t) !== bt.bigint) return this._getInvalidInput(t);
|
|
6421
6421
|
let r;
|
|
6422
6422
|
const n = new Ve();
|
|
6423
|
-
for (const i of this._def.checks) i.kind === "min" ? (i.inclusive ? t.data < i.value : t.data <= i.value) && (r = this._getOrReturnCtx(t, r), ft(r, { code:
|
|
6423
|
+
for (const i of this._def.checks) i.kind === "min" ? (i.inclusive ? t.data < i.value : t.data <= i.value) && (r = this._getOrReturnCtx(t, r), ft(r, { code: J.too_small, type: "bigint", minimum: i.value, inclusive: i.inclusive, message: i.message }), n.dirty()) : i.kind === "max" ? (i.inclusive ? t.data > i.value : t.data >= i.value) && (r = this._getOrReturnCtx(t, r), ft(r, { code: J.too_big, type: "bigint", maximum: i.value, inclusive: i.inclusive, message: i.message }), n.dirty()) : i.kind === "multipleOf" ? t.data % i.value !== BigInt(0) && (r = this._getOrReturnCtx(t, r), ft(r, { code: J.not_multiple_of, multipleOf: i.value, message: i.message }), n.dirty()) : te.assertNever(i);
|
|
6424
6424
|
return { status: n.value, value: t.data };
|
|
6425
6425
|
}
|
|
6426
6426
|
_getInvalidInput(t) {
|
|
6427
6427
|
const r = this._getOrReturnCtx(t);
|
|
6428
|
-
return ft(r, { code:
|
|
6428
|
+
return ft(r, { code: J.invalid_type, expected: bt.bigint, received: r.parsedType }), Et;
|
|
6429
6429
|
}
|
|
6430
6430
|
gte(t, r) {
|
|
6431
6431
|
return this.setLimit("min", t, !0, wt.toString(r));
|
|
@@ -6476,7 +6476,7 @@ class Bi extends Ut {
|
|
|
6476
6476
|
_parse(t) {
|
|
6477
6477
|
if (this._def.coerce && (t.data = !!t.data), this._getType(t) !== bt.boolean) {
|
|
6478
6478
|
const r = this._getOrReturnCtx(t);
|
|
6479
|
-
return ft(r, { code:
|
|
6479
|
+
return ft(r, { code: J.invalid_type, expected: bt.boolean, received: r.parsedType }), Et;
|
|
6480
6480
|
}
|
|
6481
6481
|
return Ye(t.data);
|
|
6482
6482
|
}
|
|
@@ -6486,13 +6486,13 @@ class In extends Ut {
|
|
|
6486
6486
|
_parse(t) {
|
|
6487
6487
|
if (this._def.coerce && (t.data = new Date(t.data)), this._getType(t) !== bt.date) {
|
|
6488
6488
|
const i = this._getOrReturnCtx(t);
|
|
6489
|
-
return ft(i, { code:
|
|
6489
|
+
return ft(i, { code: J.invalid_type, expected: bt.date, received: i.parsedType }), Et;
|
|
6490
6490
|
}
|
|
6491
6491
|
if (Number.isNaN(t.data.getTime()))
|
|
6492
|
-
return ft(this._getOrReturnCtx(t), { code:
|
|
6492
|
+
return ft(this._getOrReturnCtx(t), { code: J.invalid_date }), Et;
|
|
6493
6493
|
const r = new Ve();
|
|
6494
6494
|
let n;
|
|
6495
|
-
for (const i of this._def.checks) i.kind === "min" ? t.data.getTime() < i.value && (n = this._getOrReturnCtx(t, n), ft(n, { code:
|
|
6495
|
+
for (const i of this._def.checks) i.kind === "min" ? t.data.getTime() < i.value && (n = this._getOrReturnCtx(t, n), ft(n, { code: J.too_small, message: i.message, inclusive: !0, exact: !1, minimum: i.value, type: "date" }), r.dirty()) : i.kind === "max" ? t.data.getTime() > i.value && (n = this._getOrReturnCtx(t, n), ft(n, { code: J.too_big, message: i.message, inclusive: !0, exact: !1, maximum: i.value, type: "date" }), r.dirty()) : te.assertNever(i);
|
|
6496
6496
|
return { status: r.value, value: new Date(t.data.getTime()) };
|
|
6497
6497
|
}
|
|
6498
6498
|
_addCheck(t) {
|
|
@@ -6520,7 +6520,7 @@ class Ts extends Ut {
|
|
|
6520
6520
|
_parse(t) {
|
|
6521
6521
|
if (this._getType(t) !== bt.symbol) {
|
|
6522
6522
|
const r = this._getOrReturnCtx(t);
|
|
6523
|
-
return ft(r, { code:
|
|
6523
|
+
return ft(r, { code: J.invalid_type, expected: bt.symbol, received: r.parsedType }), Et;
|
|
6524
6524
|
}
|
|
6525
6525
|
return Ye(t.data);
|
|
6526
6526
|
}
|
|
@@ -6530,7 +6530,7 @@ class Pi extends Ut {
|
|
|
6530
6530
|
_parse(t) {
|
|
6531
6531
|
if (this._getType(t) !== bt.undefined) {
|
|
6532
6532
|
const r = this._getOrReturnCtx(t);
|
|
6533
|
-
return ft(r, { code:
|
|
6533
|
+
return ft(r, { code: J.invalid_type, expected: bt.undefined, received: r.parsedType }), Et;
|
|
6534
6534
|
}
|
|
6535
6535
|
return Ye(t.data);
|
|
6536
6536
|
}
|
|
@@ -6540,7 +6540,7 @@ class Li extends Ut {
|
|
|
6540
6540
|
_parse(t) {
|
|
6541
6541
|
if (this._getType(t) !== bt.null) {
|
|
6542
6542
|
const r = this._getOrReturnCtx(t);
|
|
6543
|
-
return ft(r, { code:
|
|
6543
|
+
return ft(r, { code: J.invalid_type, expected: bt.null, received: r.parsedType }), Et;
|
|
6544
6544
|
}
|
|
6545
6545
|
return Ye(t.data);
|
|
6546
6546
|
}
|
|
@@ -6567,7 +6567,7 @@ kn.create = (e) => new kn({ typeName: It.ZodUnknown, ...zt(e) });
|
|
|
6567
6567
|
class Kr extends Ut {
|
|
6568
6568
|
_parse(t) {
|
|
6569
6569
|
const r = this._getOrReturnCtx(t);
|
|
6570
|
-
return ft(r, { code:
|
|
6570
|
+
return ft(r, { code: J.invalid_type, expected: bt.never, received: r.parsedType }), Et;
|
|
6571
6571
|
}
|
|
6572
6572
|
}
|
|
6573
6573
|
Kr.create = (e) => new Kr({ typeName: It.ZodNever, ...zt(e) });
|
|
@@ -6575,7 +6575,7 @@ class Rs extends Ut {
|
|
|
6575
6575
|
_parse(t) {
|
|
6576
6576
|
if (this._getType(t) !== bt.undefined) {
|
|
6577
6577
|
const r = this._getOrReturnCtx(t);
|
|
6578
|
-
return ft(r, { code:
|
|
6578
|
+
return ft(r, { code: J.invalid_type, expected: bt.void, received: r.parsedType }), Et;
|
|
6579
6579
|
}
|
|
6580
6580
|
return Ye(t.data);
|
|
6581
6581
|
}
|
|
@@ -6584,12 +6584,12 @@ Rs.create = (e) => new Rs({ typeName: It.ZodVoid, ...zt(e) });
|
|
|
6584
6584
|
class _r extends Ut {
|
|
6585
6585
|
_parse(t) {
|
|
6586
6586
|
const { ctx: r, status: n } = this._processInputParams(t), i = this._def;
|
|
6587
|
-
if (r.parsedType !== bt.array) return ft(r, { code:
|
|
6587
|
+
if (r.parsedType !== bt.array) return ft(r, { code: J.invalid_type, expected: bt.array, received: r.parsedType }), Et;
|
|
6588
6588
|
if (i.exactLength !== null) {
|
|
6589
6589
|
const a = r.data.length > i.exactLength.value, o = r.data.length < i.exactLength.value;
|
|
6590
|
-
(a || o) && (ft(r, { code: a ?
|
|
6590
|
+
(a || o) && (ft(r, { code: a ? J.too_big : J.too_small, minimum: o ? i.exactLength.value : void 0, maximum: a ? i.exactLength.value : void 0, type: "array", inclusive: !0, exact: !0, message: i.exactLength.message }), n.dirty());
|
|
6591
6591
|
}
|
|
6592
|
-
if (i.minLength !== null && r.data.length < i.minLength.value && (ft(r, { code:
|
|
6592
|
+
if (i.minLength !== null && r.data.length < i.minLength.value && (ft(r, { code: J.too_small, minimum: i.minLength.value, type: "array", inclusive: !0, exact: !1, message: i.minLength.message }), n.dirty()), i.maxLength !== null && r.data.length > i.maxLength.value && (ft(r, { code: J.too_big, maximum: i.maxLength.value, type: "array", inclusive: !0, exact: !1, message: i.maxLength.message }), n.dirty()), r.common.async) return Promise.all([...r.data].map((a, o) => i.type._parseAsync(new Pr(r, a, r.path, o)))).then((a) => Ve.mergeArray(n, a));
|
|
6593
6593
|
const s = [...r.data].map((a, o) => i.type._parseSync(new Pr(r, a, r.path, o)));
|
|
6594
6594
|
return Ve.mergeArray(n, s);
|
|
6595
6595
|
}
|
|
@@ -6610,18 +6610,18 @@ class _r extends Ut {
|
|
|
6610
6610
|
}
|
|
6611
6611
|
}
|
|
6612
6612
|
function Un(e) {
|
|
6613
|
-
if (e instanceof
|
|
6613
|
+
if (e instanceof ge) {
|
|
6614
6614
|
const t = {};
|
|
6615
6615
|
for (const r in e.shape) {
|
|
6616
6616
|
const n = e.shape[r];
|
|
6617
6617
|
t[r] = Br.create(Un(n));
|
|
6618
6618
|
}
|
|
6619
|
-
return new
|
|
6619
|
+
return new ge({ ...e._def, shape: () => t });
|
|
6620
6620
|
}
|
|
6621
6621
|
return e instanceof _r ? new _r({ ...e._def, type: Un(e.element) }) : e instanceof Br ? Br.create(Un(e.unwrap())) : e instanceof fn ? fn.create(Un(e.unwrap())) : e instanceof Lr ? Lr.create(e.items.map((t) => Un(t))) : e;
|
|
6622
6622
|
}
|
|
6623
6623
|
_r.create = (e, t) => new _r({ type: e, minLength: null, maxLength: null, exactLength: null, typeName: It.ZodArray, ...zt(t) });
|
|
6624
|
-
class
|
|
6624
|
+
class ge extends Ut {
|
|
6625
6625
|
constructor() {
|
|
6626
6626
|
super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
|
|
6627
6627
|
}
|
|
@@ -6633,7 +6633,7 @@ class be extends Ut {
|
|
|
6633
6633
|
_parse(t) {
|
|
6634
6634
|
if (this._getType(t) !== bt.object) {
|
|
6635
6635
|
const c = this._getOrReturnCtx(t);
|
|
6636
|
-
return ft(c, { code:
|
|
6636
|
+
return ft(c, { code: J.invalid_type, expected: bt.object, received: c.parsedType }), Et;
|
|
6637
6637
|
}
|
|
6638
6638
|
const { status: r, ctx: n } = this._processInputParams(t), { shape: i, keys: s } = this._getCached(), a = [];
|
|
6639
6639
|
if (!(this._def.catchall instanceof Kr && this._def.unknownKeys === "strip")) for (const c in n.data) s.includes(c) || a.push(c);
|
|
@@ -6645,7 +6645,7 @@ class be extends Ut {
|
|
|
6645
6645
|
if (this._def.catchall instanceof Kr) {
|
|
6646
6646
|
const c = this._def.unknownKeys;
|
|
6647
6647
|
if (c === "passthrough") for (const f of a) o.push({ key: { status: "valid", value: f }, value: { status: "valid", value: n.data[f] } });
|
|
6648
|
-
else if (c === "strict") a.length > 0 && (ft(n, { code:
|
|
6648
|
+
else if (c === "strict") a.length > 0 && (ft(n, { code: J.unrecognized_keys, keys: a }), r.dirty());
|
|
6649
6649
|
else if (c !== "strip") throw new Error("Internal ZodObject error: invalid unknownKeys value.");
|
|
6650
6650
|
} else {
|
|
6651
6651
|
const c = this._def.catchall;
|
|
@@ -6667,39 +6667,39 @@ class be extends Ut {
|
|
|
6667
6667
|
return this._def.shape();
|
|
6668
6668
|
}
|
|
6669
6669
|
strict(t) {
|
|
6670
|
-
return wt.errToObj, new
|
|
6670
|
+
return wt.errToObj, new ge({ ...this._def, unknownKeys: "strict", ...t !== void 0 ? { errorMap: (r, n) => {
|
|
6671
6671
|
var s, a;
|
|
6672
6672
|
const i = ((a = (s = this._def).errorMap) == null ? void 0 : a.call(s, r, n).message) ?? n.defaultError;
|
|
6673
6673
|
return r.code === "unrecognized_keys" ? { message: wt.errToObj(t).message ?? i } : { message: i };
|
|
6674
6674
|
} } : {} });
|
|
6675
6675
|
}
|
|
6676
6676
|
strip() {
|
|
6677
|
-
return new
|
|
6677
|
+
return new ge({ ...this._def, unknownKeys: "strip" });
|
|
6678
6678
|
}
|
|
6679
6679
|
passthrough() {
|
|
6680
|
-
return new
|
|
6680
|
+
return new ge({ ...this._def, unknownKeys: "passthrough" });
|
|
6681
6681
|
}
|
|
6682
6682
|
extend(t) {
|
|
6683
|
-
return new
|
|
6683
|
+
return new ge({ ...this._def, shape: () => ({ ...this._def.shape(), ...t }) });
|
|
6684
6684
|
}
|
|
6685
6685
|
merge(t) {
|
|
6686
|
-
return new
|
|
6686
|
+
return new ge({ unknownKeys: t._def.unknownKeys, catchall: t._def.catchall, shape: () => ({ ...this._def.shape(), ...t._def.shape() }), typeName: It.ZodObject });
|
|
6687
6687
|
}
|
|
6688
6688
|
setKey(t, r) {
|
|
6689
6689
|
return this.augment({ [t]: r });
|
|
6690
6690
|
}
|
|
6691
6691
|
catchall(t) {
|
|
6692
|
-
return new
|
|
6692
|
+
return new ge({ ...this._def, catchall: t });
|
|
6693
6693
|
}
|
|
6694
6694
|
pick(t) {
|
|
6695
6695
|
const r = {};
|
|
6696
6696
|
for (const n of te.objectKeys(t)) t[n] && this.shape[n] && (r[n] = this.shape[n]);
|
|
6697
|
-
return new
|
|
6697
|
+
return new ge({ ...this._def, shape: () => r });
|
|
6698
6698
|
}
|
|
6699
6699
|
omit(t) {
|
|
6700
6700
|
const r = {};
|
|
6701
6701
|
for (const n of te.objectKeys(this.shape)) t[n] || (r[n] = this.shape[n]);
|
|
6702
|
-
return new
|
|
6702
|
+
return new ge({ ...this._def, shape: () => r });
|
|
6703
6703
|
}
|
|
6704
6704
|
deepPartial() {
|
|
6705
6705
|
return Un(this);
|
|
@@ -6710,7 +6710,7 @@ class be extends Ut {
|
|
|
6710
6710
|
const i = this.shape[n];
|
|
6711
6711
|
t && !t[n] ? r[n] = i : r[n] = i.optional();
|
|
6712
6712
|
}
|
|
6713
|
-
return new
|
|
6713
|
+
return new ge({ ...this._def, shape: () => r });
|
|
6714
6714
|
}
|
|
6715
6715
|
required(t) {
|
|
6716
6716
|
const r = {};
|
|
@@ -6720,13 +6720,13 @@ class be extends Ut {
|
|
|
6720
6720
|
for (; i instanceof Br; ) i = i._def.innerType;
|
|
6721
6721
|
r[n] = i;
|
|
6722
6722
|
}
|
|
6723
|
-
return new
|
|
6723
|
+
return new ge({ ...this._def, shape: () => r });
|
|
6724
6724
|
}
|
|
6725
6725
|
keyof() {
|
|
6726
6726
|
return a1(te.objectKeys(this.shape));
|
|
6727
6727
|
}
|
|
6728
6728
|
}
|
|
6729
|
-
|
|
6729
|
+
ge.create = (e, t) => new ge({ shape: () => e, unknownKeys: "strip", catchall: Kr.create(), typeName: It.ZodObject, ...zt(t) }), ge.strictCreate = (e, t) => new ge({ shape: () => e, unknownKeys: "strict", catchall: Kr.create(), typeName: It.ZodObject, ...zt(t) }), ge.lazycreate = (e, t) => new ge({ shape: e, unknownKeys: "strip", catchall: Kr.create(), typeName: It.ZodObject, ...zt(t) });
|
|
6730
6730
|
class zi extends Ut {
|
|
6731
6731
|
_parse(t) {
|
|
6732
6732
|
const { ctx: r } = this._processInputParams(t), n = this._def.options;
|
|
@@ -6737,7 +6737,7 @@ class zi extends Ut {
|
|
|
6737
6737
|
for (const a of i) if (a.result.status === "valid") return a.result;
|
|
6738
6738
|
for (const a of i) if (a.result.status === "dirty") return r.common.issues.push(...a.ctx.common.issues), a.result;
|
|
6739
6739
|
const s = i.map((a) => new rr(a.ctx.common.issues));
|
|
6740
|
-
return ft(r, { code:
|
|
6740
|
+
return ft(r, { code: J.invalid_union, unionErrors: s }), Et;
|
|
6741
6741
|
});
|
|
6742
6742
|
{
|
|
6743
6743
|
let i;
|
|
@@ -6749,7 +6749,7 @@ class zi extends Ut {
|
|
|
6749
6749
|
}
|
|
6750
6750
|
if (i) return r.common.issues.push(...i.ctx.common.issues), i.result;
|
|
6751
6751
|
const a = s.map((o) => new rr(o));
|
|
6752
|
-
return ft(r, { code:
|
|
6752
|
+
return ft(r, { code: J.invalid_union, unionErrors: a }), Et;
|
|
6753
6753
|
}
|
|
6754
6754
|
}
|
|
6755
6755
|
get options() {
|
|
@@ -6757,13 +6757,13 @@ class zi extends Ut {
|
|
|
6757
6757
|
}
|
|
6758
6758
|
}
|
|
6759
6759
|
zi.create = (e, t) => new zi({ options: e, typeName: It.ZodUnion, ...zt(t) });
|
|
6760
|
-
const en = (e) => e instanceof $i ? en(e.schema) : e instanceof wr ? en(e.innerType()) : e instanceof qi ? [e.value] : e instanceof dn ? e.options : e instanceof Ui ? te.objectValues(e.enum) : e instanceof Hi ? en(e._def.innerType) : e instanceof Pi ? [void 0] : e instanceof Li ? [null] : e instanceof Br ? [void 0, ...en(e.unwrap())] : e instanceof fn ? [null, ...en(e.unwrap())] : e instanceof
|
|
6761
|
-
class
|
|
6760
|
+
const en = (e) => e instanceof $i ? en(e.schema) : e instanceof wr ? en(e.innerType()) : e instanceof qi ? [e.value] : e instanceof dn ? e.options : e instanceof Ui ? te.objectValues(e.enum) : e instanceof Hi ? en(e._def.innerType) : e instanceof Pi ? [void 0] : e instanceof Li ? [null] : e instanceof Br ? [void 0, ...en(e.unwrap())] : e instanceof fn ? [null, ...en(e.unwrap())] : e instanceof Ja || e instanceof Fi ? en(e.unwrap()) : e instanceof Di ? en(e._def.innerType) : [];
|
|
6761
|
+
class Gs extends Ut {
|
|
6762
6762
|
_parse(t) {
|
|
6763
6763
|
const { ctx: r } = this._processInputParams(t);
|
|
6764
|
-
if (r.parsedType !== bt.object) return ft(r, { code:
|
|
6764
|
+
if (r.parsedType !== bt.object) return ft(r, { code: J.invalid_type, expected: bt.object, received: r.parsedType }), Et;
|
|
6765
6765
|
const n = this.discriminator, i = r.data[n], s = this.optionsMap.get(i);
|
|
6766
|
-
return s ? r.common.async ? s._parseAsync({ data: r.data, path: r.path, parent: r }) : s._parseSync({ data: r.data, path: r.path, parent: r }) : (ft(r, { code:
|
|
6766
|
+
return s ? r.common.async ? s._parseAsync({ data: r.data, path: r.path, parent: r }) : s._parseSync({ data: r.data, path: r.path, parent: r }) : (ft(r, { code: J.invalid_union_discriminator, options: Array.from(this.optionsMap.keys()), path: [n] }), Et);
|
|
6767
6767
|
}
|
|
6768
6768
|
get discriminator() {
|
|
6769
6769
|
return this._def.discriminator;
|
|
@@ -6784,7 +6784,7 @@ class Js extends Ut {
|
|
|
6784
6784
|
i.set(o, s);
|
|
6785
6785
|
}
|
|
6786
6786
|
}
|
|
6787
|
-
return new
|
|
6787
|
+
return new Gs({ typeName: It.ZodDiscriminatedUnion, discriminator: t, options: r, optionsMap: i, ...zt(n) });
|
|
6788
6788
|
}
|
|
6789
6789
|
}
|
|
6790
6790
|
function Sa(e, t) {
|
|
@@ -6816,7 +6816,7 @@ class ji extends Ut {
|
|
|
6816
6816
|
const { status: r, ctx: n } = this._processInputParams(t), i = (s, a) => {
|
|
6817
6817
|
if (_a(s) || _a(a)) return Et;
|
|
6818
6818
|
const o = Sa(s.value, a.value);
|
|
6819
|
-
return o.valid ? ((xa(s) || xa(a)) && r.dirty(), { status: r.value, value: o.data }) : (ft(n, { code:
|
|
6819
|
+
return o.valid ? ((xa(s) || xa(a)) && r.dirty(), { status: r.value, value: o.data }) : (ft(n, { code: J.invalid_intersection_types }), Et);
|
|
6820
6820
|
};
|
|
6821
6821
|
return n.common.async ? Promise.all([this._def.left._parseAsync({ data: n.data, path: n.path, parent: n }), this._def.right._parseAsync({ data: n.data, path: n.path, parent: n })]).then(([s, a]) => i(s, a)) : i(this._def.left._parseSync({ data: n.data, path: n.path, parent: n }), this._def.right._parseSync({ data: n.data, path: n.path, parent: n }));
|
|
6822
6822
|
}
|
|
@@ -6825,9 +6825,9 @@ ji.create = (e, t, r) => new ji({ left: e, right: t, typeName: It.ZodIntersectio
|
|
|
6825
6825
|
class Lr extends Ut {
|
|
6826
6826
|
_parse(t) {
|
|
6827
6827
|
const { status: r, ctx: n } = this._processInputParams(t);
|
|
6828
|
-
if (n.parsedType !== bt.array) return ft(n, { code:
|
|
6829
|
-
if (n.data.length < this._def.items.length) return ft(n, { code:
|
|
6830
|
-
!this._def.rest && n.data.length > this._def.items.length && (ft(n, { code:
|
|
6828
|
+
if (n.parsedType !== bt.array) return ft(n, { code: J.invalid_type, expected: bt.array, received: n.parsedType }), Et;
|
|
6829
|
+
if (n.data.length < this._def.items.length) return ft(n, { code: J.too_small, minimum: this._def.items.length, inclusive: !0, exact: !1, type: "array" }), Et;
|
|
6830
|
+
!this._def.rest && n.data.length > this._def.items.length && (ft(n, { code: J.too_big, maximum: this._def.items.length, inclusive: !0, exact: !1, type: "array" }), r.dirty());
|
|
6831
6831
|
const i = [...n.data].map((s, a) => {
|
|
6832
6832
|
const o = this._def.items[a] || this._def.rest;
|
|
6833
6833
|
return o ? o._parse(new Pr(n, s, n.path, a)) : null;
|
|
@@ -6854,7 +6854,7 @@ class Xs extends Ut {
|
|
|
6854
6854
|
}
|
|
6855
6855
|
_parse(t) {
|
|
6856
6856
|
const { status: r, ctx: n } = this._processInputParams(t);
|
|
6857
|
-
if (n.parsedType !== bt.object) return ft(n, { code:
|
|
6857
|
+
if (n.parsedType !== bt.object) return ft(n, { code: J.invalid_type, expected: bt.object, received: n.parsedType }), Et;
|
|
6858
6858
|
const i = [], s = this._def.keyType, a = this._def.valueType;
|
|
6859
6859
|
for (const o in n.data) i.push({ key: s._parse(new Pr(n, o, n.path, o)), value: a._parse(new Pr(n, n.data[o], n.path, o)), alwaysSet: o in n.data });
|
|
6860
6860
|
return n.common.async ? Ve.mergeObjectAsync(r, i) : Ve.mergeObjectSync(r, i);
|
|
@@ -6875,7 +6875,7 @@ class Ns extends Ut {
|
|
|
6875
6875
|
}
|
|
6876
6876
|
_parse(t) {
|
|
6877
6877
|
const { status: r, ctx: n } = this._processInputParams(t);
|
|
6878
|
-
if (n.parsedType !== bt.map) return ft(n, { code:
|
|
6878
|
+
if (n.parsedType !== bt.map) return ft(n, { code: J.invalid_type, expected: bt.map, received: n.parsedType }), Et;
|
|
6879
6879
|
const i = this._def.keyType, s = this._def.valueType, a = [...n.data.entries()].map(([o, c], f) => ({ key: i._parse(new Pr(n, o, n.path, [f, "key"])), value: s._parse(new Pr(n, c, n.path, [f, "value"])) }));
|
|
6880
6880
|
if (n.common.async) {
|
|
6881
6881
|
const o = /* @__PURE__ */ new Map();
|
|
@@ -6903,9 +6903,9 @@ Ns.create = (e, t, r) => new Ns({ valueType: t, keyType: e, typeName: It.ZodMap,
|
|
|
6903
6903
|
class Tn extends Ut {
|
|
6904
6904
|
_parse(t) {
|
|
6905
6905
|
const { status: r, ctx: n } = this._processInputParams(t);
|
|
6906
|
-
if (n.parsedType !== bt.set) return ft(n, { code:
|
|
6906
|
+
if (n.parsedType !== bt.set) return ft(n, { code: J.invalid_type, expected: bt.set, received: n.parsedType }), Et;
|
|
6907
6907
|
const i = this._def;
|
|
6908
|
-
i.minSize !== null && n.data.size < i.minSize.value && (ft(n, { code:
|
|
6908
|
+
i.minSize !== null && n.data.size < i.minSize.value && (ft(n, { code: J.too_small, minimum: i.minSize.value, type: "set", inclusive: !0, exact: !1, message: i.minSize.message }), r.dirty()), i.maxSize !== null && n.data.size > i.maxSize.value && (ft(n, { code: J.too_big, maximum: i.maxSize.value, type: "set", inclusive: !0, exact: !1, message: i.maxSize.message }), r.dirty());
|
|
6909
6909
|
const s = this._def.valueType;
|
|
6910
6910
|
function a(c) {
|
|
6911
6911
|
const f = /* @__PURE__ */ new Set();
|
|
@@ -6932,18 +6932,18 @@ class Tn extends Ut {
|
|
|
6932
6932
|
}
|
|
6933
6933
|
}
|
|
6934
6934
|
Tn.create = (e, t) => new Tn({ valueType: e, minSize: null, maxSize: null, typeName: It.ZodSet, ...zt(t) });
|
|
6935
|
-
class
|
|
6935
|
+
class Gn extends Ut {
|
|
6936
6936
|
constructor() {
|
|
6937
6937
|
super(...arguments), this.validate = this.implement;
|
|
6938
6938
|
}
|
|
6939
6939
|
_parse(t) {
|
|
6940
6940
|
const { ctx: r } = this._processInputParams(t);
|
|
6941
|
-
if (r.parsedType !== bt.function) return ft(r, { code:
|
|
6941
|
+
if (r.parsedType !== bt.function) return ft(r, { code: J.invalid_type, expected: bt.function, received: r.parsedType }), Et;
|
|
6942
6942
|
function n(o, c) {
|
|
6943
|
-
return Es({ data: o, path: r.path, errorMaps: [r.common.contextualErrorMap, r.schemaErrorMap, Ms(), ii].filter((f) => !!f), issueData: { code:
|
|
6943
|
+
return Es({ data: o, path: r.path, errorMaps: [r.common.contextualErrorMap, r.schemaErrorMap, Ms(), ii].filter((f) => !!f), issueData: { code: J.invalid_arguments, argumentsError: c } });
|
|
6944
6944
|
}
|
|
6945
6945
|
function i(o, c) {
|
|
6946
|
-
return Es({ data: o, path: r.path, errorMaps: [r.common.contextualErrorMap, r.schemaErrorMap, Ms(), ii].filter((f) => !!f), issueData: { code:
|
|
6946
|
+
return Es({ data: o, path: r.path, errorMaps: [r.common.contextualErrorMap, r.schemaErrorMap, Ms(), ii].filter((f) => !!f), issueData: { code: J.invalid_return_type, returnTypeError: c } });
|
|
6947
6947
|
}
|
|
6948
6948
|
const s = { errorMap: r.common.contextualErrorMap }, a = r.data;
|
|
6949
6949
|
if (this._def.returns instanceof oi) {
|
|
@@ -6975,10 +6975,10 @@ class Jn extends Ut {
|
|
|
6975
6975
|
return this._def.returns;
|
|
6976
6976
|
}
|
|
6977
6977
|
args(...t) {
|
|
6978
|
-
return new
|
|
6978
|
+
return new Gn({ ...this._def, args: Lr.create(t).rest(kn.create()) });
|
|
6979
6979
|
}
|
|
6980
6980
|
returns(t) {
|
|
6981
|
-
return new
|
|
6981
|
+
return new Gn({ ...this._def, returns: t });
|
|
6982
6982
|
}
|
|
6983
6983
|
implement(t) {
|
|
6984
6984
|
return this.parse(t);
|
|
@@ -6987,7 +6987,7 @@ class Jn extends Ut {
|
|
|
6987
6987
|
return this.parse(t);
|
|
6988
6988
|
}
|
|
6989
6989
|
static create(t, r, n) {
|
|
6990
|
-
return new
|
|
6990
|
+
return new Gn({ args: t || Lr.create([]).rest(kn.create()), returns: r || kn.create(), typeName: It.ZodFunction, ...zt(n) });
|
|
6991
6991
|
}
|
|
6992
6992
|
}
|
|
6993
6993
|
class $i extends Ut {
|
|
@@ -7004,7 +7004,7 @@ class qi extends Ut {
|
|
|
7004
7004
|
_parse(t) {
|
|
7005
7005
|
if (t.data !== this._def.value) {
|
|
7006
7006
|
const r = this._getOrReturnCtx(t);
|
|
7007
|
-
return ft(r, { received: r.data, code:
|
|
7007
|
+
return ft(r, { received: r.data, code: J.invalid_literal, expected: this._def.value }), Et;
|
|
7008
7008
|
}
|
|
7009
7009
|
return { status: "valid", value: t.data };
|
|
7010
7010
|
}
|
|
@@ -7020,11 +7020,11 @@ class dn extends Ut {
|
|
|
7020
7020
|
_parse(t) {
|
|
7021
7021
|
if (typeof t.data != "string") {
|
|
7022
7022
|
const r = this._getOrReturnCtx(t), n = this._def.values;
|
|
7023
|
-
return ft(r, { expected: te.joinValues(n), received: r.parsedType, code:
|
|
7023
|
+
return ft(r, { expected: te.joinValues(n), received: r.parsedType, code: J.invalid_type }), Et;
|
|
7024
7024
|
}
|
|
7025
7025
|
if (this._cache || (this._cache = new Set(this._def.values)), !this._cache.has(t.data)) {
|
|
7026
7026
|
const r = this._getOrReturnCtx(t), n = this._def.values;
|
|
7027
|
-
return ft(r, { received: r.data, code:
|
|
7027
|
+
return ft(r, { received: r.data, code: J.invalid_enum_value, options: n }), Et;
|
|
7028
7028
|
}
|
|
7029
7029
|
return Ye(t.data);
|
|
7030
7030
|
}
|
|
@@ -7059,11 +7059,11 @@ class Ui extends Ut {
|
|
|
7059
7059
|
const r = te.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(t);
|
|
7060
7060
|
if (n.parsedType !== bt.string && n.parsedType !== bt.number) {
|
|
7061
7061
|
const i = te.objectValues(r);
|
|
7062
|
-
return ft(n, { expected: te.joinValues(i), received: n.parsedType, code:
|
|
7062
|
+
return ft(n, { expected: te.joinValues(i), received: n.parsedType, code: J.invalid_type }), Et;
|
|
7063
7063
|
}
|
|
7064
7064
|
if (this._cache || (this._cache = new Set(te.getValidEnumValues(this._def.values))), !this._cache.has(t.data)) {
|
|
7065
7065
|
const i = te.objectValues(r);
|
|
7066
|
-
return ft(n, { received: n.data, code:
|
|
7066
|
+
return ft(n, { received: n.data, code: J.invalid_enum_value, options: i }), Et;
|
|
7067
7067
|
}
|
|
7068
7068
|
return Ye(t.data);
|
|
7069
7069
|
}
|
|
@@ -7078,7 +7078,7 @@ class oi extends Ut {
|
|
|
7078
7078
|
}
|
|
7079
7079
|
_parse(t) {
|
|
7080
7080
|
const { ctx: r } = this._processInputParams(t);
|
|
7081
|
-
if (r.parsedType !== bt.promise && r.common.async === !1) return ft(r, { code:
|
|
7081
|
+
if (r.parsedType !== bt.promise && r.common.async === !1) return ft(r, { code: J.invalid_type, expected: bt.promise, received: r.parsedType }), Et;
|
|
7082
7082
|
const n = r.parsedType === bt.promise ? r.data : Promise.resolve(r.data);
|
|
7083
7083
|
return Ye(n.then((i) => this._def.type.parseAsync(i, { path: r.path, errorMap: r.common.contextualErrorMap })));
|
|
7084
7084
|
}
|
|
@@ -7166,7 +7166,7 @@ class Hi extends Ut {
|
|
|
7166
7166
|
}
|
|
7167
7167
|
}
|
|
7168
7168
|
Hi.create = (e, t) => new Hi({ innerType: e, typeName: It.ZodDefault, defaultValue: typeof t.default == "function" ? t.default : () => t.default, ...zt(t) });
|
|
7169
|
-
class
|
|
7169
|
+
class Di extends Ut {
|
|
7170
7170
|
_parse(t) {
|
|
7171
7171
|
const { ctx: r } = this._processInputParams(t), n = { ...r, common: { ...r.common, issues: [] } }, i = this._def.innerType._parse({ data: n.data, path: n.path, parent: { ...n } });
|
|
7172
7172
|
return Ci(i) ? i.then((s) => ({ status: "valid", value: s.status === "valid" ? s.value : this._def.catchValue({ get error() {
|
|
@@ -7179,19 +7179,19 @@ class Fi extends Ut {
|
|
|
7179
7179
|
return this._def.innerType;
|
|
7180
7180
|
}
|
|
7181
7181
|
}
|
|
7182
|
-
|
|
7182
|
+
Di.create = (e, t) => new Di({ innerType: e, typeName: It.ZodCatch, catchValue: typeof t.catch == "function" ? t.catch : () => t.catch, ...zt(t) });
|
|
7183
7183
|
class Os extends Ut {
|
|
7184
7184
|
_parse(t) {
|
|
7185
7185
|
if (this._getType(t) !== bt.nan) {
|
|
7186
7186
|
const r = this._getOrReturnCtx(t);
|
|
7187
|
-
return ft(r, { code:
|
|
7187
|
+
return ft(r, { code: J.invalid_type, expected: bt.nan, received: r.parsedType }), Et;
|
|
7188
7188
|
}
|
|
7189
7189
|
return { status: "valid", value: t.data };
|
|
7190
7190
|
}
|
|
7191
7191
|
}
|
|
7192
7192
|
Os.create = (e) => new Os({ typeName: It.ZodNaN, ...zt(e) });
|
|
7193
7193
|
const ul = Symbol("zod_brand");
|
|
7194
|
-
class
|
|
7194
|
+
class Ja extends Ut {
|
|
7195
7195
|
_parse(t) {
|
|
7196
7196
|
const { ctx: r } = this._processInputParams(t), n = r.data;
|
|
7197
7197
|
return this._def.type._parse({ data: n, path: r.path, parent: r });
|
|
@@ -7200,7 +7200,7 @@ class Ga extends Ut {
|
|
|
7200
7200
|
return this._def.type;
|
|
7201
7201
|
}
|
|
7202
7202
|
}
|
|
7203
|
-
class
|
|
7203
|
+
class Ji extends Ut {
|
|
7204
7204
|
_parse(t) {
|
|
7205
7205
|
const { status: r, ctx: n } = this._processInputParams(t);
|
|
7206
7206
|
if (n.common.async)
|
|
@@ -7214,10 +7214,10 @@ class Gi extends Ut {
|
|
|
7214
7214
|
}
|
|
7215
7215
|
}
|
|
7216
7216
|
static create(t, r) {
|
|
7217
|
-
return new
|
|
7217
|
+
return new Ji({ in: t, out: r, typeName: It.ZodPipeline });
|
|
7218
7218
|
}
|
|
7219
7219
|
}
|
|
7220
|
-
class
|
|
7220
|
+
class Fi extends Ut {
|
|
7221
7221
|
_parse(t) {
|
|
7222
7222
|
const r = this._def.innerType._parse(t), n = (i) => (En(i) && (i.value = Object.freeze(i.value)), i);
|
|
7223
7223
|
return Ci(r) ? r.then((i) => n(i)) : n(r);
|
|
@@ -7245,15 +7245,15 @@ function nd(e, t = {}, r) {
|
|
|
7245
7245
|
}
|
|
7246
7246
|
}) : si.create();
|
|
7247
7247
|
}
|
|
7248
|
-
|
|
7249
|
-
const hl = { object:
|
|
7248
|
+
Fi.create = (e, t) => new Fi({ innerType: e, typeName: It.ZodReadonly, ...zt(t) });
|
|
7249
|
+
const hl = { object: ge.lazycreate };
|
|
7250
7250
|
var It;
|
|
7251
7251
|
(function(e) {
|
|
7252
7252
|
e.ZodString = "ZodString", e.ZodNumber = "ZodNumber", e.ZodNaN = "ZodNaN", e.ZodBigInt = "ZodBigInt", e.ZodBoolean = "ZodBoolean", e.ZodDate = "ZodDate", e.ZodSymbol = "ZodSymbol", e.ZodUndefined = "ZodUndefined", e.ZodNull = "ZodNull", e.ZodAny = "ZodAny", e.ZodUnknown = "ZodUnknown", e.ZodNever = "ZodNever", e.ZodVoid = "ZodVoid", e.ZodArray = "ZodArray", e.ZodObject = "ZodObject", e.ZodUnion = "ZodUnion", e.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", e.ZodIntersection = "ZodIntersection", e.ZodTuple = "ZodTuple", e.ZodRecord = "ZodRecord", e.ZodMap = "ZodMap", e.ZodSet = "ZodSet", e.ZodFunction = "ZodFunction", e.ZodLazy = "ZodLazy", e.ZodLiteral = "ZodLiteral", e.ZodEnum = "ZodEnum", e.ZodEffects = "ZodEffects", e.ZodNativeEnum = "ZodNativeEnum", e.ZodOptional = "ZodOptional", e.ZodNullable = "ZodNullable", e.ZodDefault = "ZodDefault", e.ZodCatch = "ZodCatch", e.ZodPromise = "ZodPromise", e.ZodBranded = "ZodBranded", e.ZodPipeline = "ZodPipeline", e.ZodReadonly = "ZodReadonly";
|
|
7253
7253
|
})(It || (It = {}));
|
|
7254
|
-
const id = vr.create, sd = an.create, ll = Os.create, pl = cn.create, od = Bi.create, ml = In.create, bl = Ts.create, gl = Pi.create, yl = Li.create, Aa = si.create, vl = kn.create, wl = Kr.create, _l = Rs.create, c1 = _r.create, ys =
|
|
7254
|
+
const id = vr.create, sd = an.create, ll = Os.create, pl = cn.create, od = Bi.create, ml = In.create, bl = Ts.create, gl = Pi.create, yl = Li.create, Aa = si.create, vl = kn.create, wl = Kr.create, _l = Rs.create, c1 = _r.create, ys = ge.create, xl = ge.strictCreate, d1 = zi.create, Sl = Gs.create, Al = ji.create, f1 = Lr.create, kl = Xs.create, Ml = Ns.create, El = Tn.create, Il = Gn.create, Tl = $i.create, Rl = qi.create, Nl = dn.create, Ol = Ui.create, Cl = oi.create, ad = wr.create, Bl = Br.create, Pl = fn.create, Ll = wr.createWithPreprocess, zl = Ji.create, jl = { string: (e) => vr.create({ ...e, coerce: !0 }), number: (e) => an.create({ ...e, coerce: !0 }), boolean: (e) => Bi.create({ ...e, coerce: !0 }), bigint: (e) => cn.create({ ...e, coerce: !0 }), date: (e) => In.create({ ...e, coerce: !0 }) }, $l = Et, cd = Object.freeze(Object.defineProperty({ __proto__: null, BRAND: ul, DIRTY: Is, EMPTY_PATH: [], INVALID: Et, NEVER: $l, OK: Ye, ParseStatus: Ve, Schema: Ut, ZodAny: si, ZodArray: _r, ZodBigInt: cn, ZodBoolean: Bi, ZodBranded: Ja, ZodCatch: Di, ZodDate: In, ZodDefault: Hi, ZodDiscriminatedUnion: Gs, ZodEffects: wr, ZodEnum: dn, ZodError: rr, get ZodFirstPartyTypeKind() {
|
|
7255
7255
|
return It;
|
|
7256
|
-
}, ZodFunction:
|
|
7256
|
+
}, ZodFunction: Gn, ZodIntersection: ji, ZodIssueCode: J, ZodLazy: $i, ZodLiteral: qi, ZodMap: Ns, ZodNaN: Os, ZodNativeEnum: Ui, ZodNever: Kr, ZodNull: Li, ZodNullable: fn, ZodNumber: an, ZodObject: ge, ZodOptional: Br, ZodParsedType: bt, ZodPipeline: Ji, ZodPromise: oi, ZodReadonly: Fi, ZodRecord: Xs, ZodSchema: Ut, ZodSet: Tn, ZodString: vr, ZodSymbol: Ts, ZodTransformer: wr, ZodTuple: Lr, ZodType: Ut, ZodUndefined: Pi, ZodUnion: zi, ZodUnknown: kn, ZodVoid: Rs, addIssueToContext: ft, any: Aa, array: c1, bigint: pl, boolean: od, coerce: jl, custom: nd, date: ml, datetimeRegex: o1, defaultErrorMap: ii, discriminatedUnion: Sl, effect: ad, enum: Nl, function: Il, getErrorMap: Ms, getParsedType: Ur, instanceof: (e, t = { message: `Input not instance of ${e.name}` }) => nd((r) => r instanceof e, t), intersection: Al, isAborted: _a, isAsync: Ci, isDirty: xa, isValid: En, late: hl, lazy: Tl, literal: Rl, makeIssue: Es, map: Ml, nan: ll, nativeEnum: Ol, never: wl, null: yl, nullable: Pl, number: sd, object: ys, get objectUtil() {
|
|
7257
7257
|
return wa;
|
|
7258
7258
|
}, oboolean: () => od().optional(), onumber: () => sd().optional(), optional: Bl, ostring: () => id().optional(), pipeline: zl, preprocess: Ll, promise: Cl, quotelessJson: (e) => JSON.stringify(e, null, 2).replace(/"([^"]+)":/g, "$1:"), record: kl, set: El, setErrorMap: function(e) {
|
|
7259
7259
|
n1 = e;
|
|
@@ -7311,7 +7311,7 @@ const Ul = ["bool", "int", "uint", "bytes", "string", "address", "tuple"], u1 =
|
|
|
7311
7311
|
w = r;
|
|
7312
7312
|
}
|
|
7313
7313
|
return r;
|
|
7314
|
-
}, h1 = (e) => Bs(e),
|
|
7314
|
+
}, h1 = (e) => Bs(e), Ga = (e, t) => t === 1 ? e : Ga(e[0], t - 1), vs = (e, t, r) => {
|
|
7315
7315
|
const n = [];
|
|
7316
7316
|
for (const [i, s] of e.entries()) {
|
|
7317
7317
|
let a, o, c = [];
|
|
@@ -7320,7 +7320,7 @@ const Ul = ["bool", "int", "uint", "bytes", "string", "address", "tuple"], u1 =
|
|
|
7320
7320
|
if (f !== "tuple" || u) if (f === "tuple" && u) {
|
|
7321
7321
|
const v = [];
|
|
7322
7322
|
for (const S of w) if (p.length > 1) {
|
|
7323
|
-
const E =
|
|
7323
|
+
const E = Ga(S, p.length - 1), _ = [];
|
|
7324
7324
|
for (const k of E) _.push(vs(c, k, r));
|
|
7325
7325
|
v.push(_);
|
|
7326
7326
|
} else v.push(vs(c, S, r));
|
|
@@ -7355,9 +7355,9 @@ function Ps(e) {
|
|
|
7355
7355
|
}
|
|
7356
7356
|
return t;
|
|
7357
7357
|
}
|
|
7358
|
-
const fd = 48,
|
|
7358
|
+
const fd = 48, Dl = 57, ud = 65, Fl = 70, hd = 97, Zl = 102;
|
|
7359
7359
|
function ld(e) {
|
|
7360
|
-
return e >= fd && e <=
|
|
7360
|
+
return e >= fd && e <= Dl ? e - fd : e >= ud && e <= Fl ? e - (ud - 10) : e >= hd && e <= Zl ? e - (hd - 10) : void 0;
|
|
7361
7361
|
}
|
|
7362
7362
|
function Xa(e) {
|
|
7363
7363
|
let t = 0;
|
|
@@ -7379,7 +7379,7 @@ const Vl = Object.freeze(Object.defineProperty({ __proto__: null, abiSchemaToJso
|
|
|
7379
7379
|
if (e >= 65 && e <= 70) return e - 55;
|
|
7380
7380
|
if (e >= 97 && e <= 102) return e - 87;
|
|
7381
7381
|
throw new Error(`Invalid code point: ${e}`);
|
|
7382
|
-
}, ensureIfUint8Array: ro, ethAbiToJsonSchema: h1, fetchArrayElement:
|
|
7382
|
+
}, ensureIfUint8Array: ro, ethAbiToJsonSchema: h1, fetchArrayElement: Ga, hexToNumber: to, hexToUint8Array: Xa, numberToHex: eo, padLeft: ka, parseBaseType: Pn, transformJsonDataToAbiFormat: vs, uint8ArrayToHexString: Ps }, Symbol.toStringTag, { value: "Module" })), Ma = (e) => {
|
|
7383
7383
|
var t, r;
|
|
7384
7384
|
return e instanceof Uint8Array || ((t = e == null ? void 0 : e.constructor) === null || t === void 0 ? void 0 : t.name) === "Uint8Array" || ((r = e == null ? void 0 : e.constructor) === null || r === void 0 ? void 0 : r.name) === "Buffer";
|
|
7385
7385
|
}, l1 = (e, t = { abiType: "bytes" }) => {
|
|
@@ -7402,7 +7402,7 @@ const Vl = Object.freeze(Object.defineProperty({ __proto__: null, abiSchemaToJso
|
|
|
7402
7402
|
let r;
|
|
7403
7403
|
return r = Ma(e) ? Ps(e) : typeof e != "string" || ze(e) || e.toLowerCase().startsWith("0x") ? e : `0x${e}`, !!/^(0x)?[0-9a-f]{40}$/i.test(r) && (!(!/^(0x|0X)?[0-9a-f]{40}$/.test(r) && !/^(0x|0X)?[0-9A-F]{40}$/.test(r)) || !t || ((n) => {
|
|
7404
7404
|
if (!/^(0x)?[0-9a-f]{40}$/i.test(n)) return !1;
|
|
7405
|
-
const i = n.slice(2), s =
|
|
7405
|
+
const i = n.slice(2), s = Jn(i.toLowerCase()), a = Ps(Qa(ro(s))).slice(2);
|
|
7406
7406
|
for (let o = 0; o < 40; o += 1) if (parseInt(a[o], 16) > 7 && i[o].toUpperCase() !== i[o] || parseInt(a[o], 16) <= 7 && i[o].toLowerCase() !== i[o]) return !1;
|
|
7407
7407
|
return !0;
|
|
7408
7408
|
})(r));
|
|
@@ -7506,9 +7506,9 @@ class Kn {
|
|
|
7506
7506
|
let i, s, a, o;
|
|
7507
7507
|
o = r.path.join("/");
|
|
7508
7508
|
const c = String(r.path[r.path.length - 1]), f = r.path.join("/");
|
|
7509
|
-
if (r.code ===
|
|
7510
|
-
else if (r.code ===
|
|
7511
|
-
else if (r.code ===
|
|
7509
|
+
if (r.code === J.too_big) s = "maxItems", o = `${f}/maxItems`, a = { limit: r.maximum }, i = `must NOT have more than ${r.maximum} items`;
|
|
7510
|
+
else if (r.code === J.too_small) s = "minItems", o = `${f}/minItems`, a = { limit: r.minimum }, i = `must NOT have fewer than ${r.minimum} items`;
|
|
7511
|
+
else if (r.code === J.custom) {
|
|
7512
7512
|
const { value: u, format: p } = (n = r.params) !== null && n !== void 0 ? n : {};
|
|
7513
7513
|
i = u === void 0 ? `value at "/${o}" is required` : `value "${typeof u == "object" ? JSON.stringify(u) : u}" at "/${o}" must pass "${p}" validation`, a = { value: u };
|
|
7514
7514
|
}
|
|
@@ -7516,7 +7516,7 @@ class Kn {
|
|
|
7516
7516
|
});
|
|
7517
7517
|
}
|
|
7518
7518
|
}
|
|
7519
|
-
const
|
|
7519
|
+
const Gi = new class {
|
|
7520
7520
|
constructor() {
|
|
7521
7521
|
this._validator = Kn.factory();
|
|
7522
7522
|
}
|
|
@@ -7538,19 +7538,19 @@ function b1(e) {
|
|
|
7538
7538
|
}
|
|
7539
7539
|
BigInt(0), BigInt(1), BigInt(1e3), BigInt(1e3), BigInt(1e3), BigInt(1e3), BigInt(1e6), BigInt(1e6), BigInt(1e6), BigInt(1e6), BigInt(1e9), BigInt(1e9), BigInt(1e9), BigInt(1e9), BigInt(1e9), BigInt(1e12), BigInt(1e12), BigInt(1e12), BigInt(1e15), BigInt(1e15), BigInt(1e15), BigInt("1000000000000000000"), BigInt("1000000000000000000000"), BigInt("1000000000000000000000"), BigInt("1000000000000000000000000"), BigInt("1000000000000000000000000000"), BigInt("1000000000000000000000000000000");
|
|
7540
7540
|
const Zi = (e) => {
|
|
7541
|
-
if (
|
|
7541
|
+
if (Gi.validate(["bytes"], [e]), b1(e)) return e;
|
|
7542
7542
|
if (Array.isArray(e)) return new Uint8Array(e);
|
|
7543
7543
|
if (typeof e == "string") return Xa(e);
|
|
7544
7544
|
throw new va(e);
|
|
7545
7545
|
}, { uint8ArrayToHexString: Kl } = Vl, no = (e) => Kl(Zi(e)), Vi = (e) => typeof e == "string" && e.slice(0, 2).toLowerCase() !== "0x" ? Zi(`0x${e}`) : Zi(e), Wl = (e, t) => {
|
|
7546
|
-
typeof e != "bigint" &&
|
|
7546
|
+
typeof e != "bigint" && Gi.validate(["int"], [e]);
|
|
7547
7547
|
let r = eo(e);
|
|
7548
7548
|
return t && (r.startsWith("-") || r.length % 2 != 1 ? r.length % 2 == 0 && r.startsWith("-") && (r = "-0x0".concat(r.slice(3))) : r = "0x0".concat(r.slice(2))), r;
|
|
7549
7549
|
}, g1 = (e) => {
|
|
7550
|
-
|
|
7550
|
+
Gi.validate(["string"], [e]);
|
|
7551
7551
|
let t = e.replace(/^(?:\u0000)/, "");
|
|
7552
7552
|
return t = t.replace(/(?:\u0000)$/, ""), no(new TextEncoder().encode(t));
|
|
7553
|
-
}, Yl = g1, Ql =
|
|
7553
|
+
}, Yl = g1, Ql = Jn, ec = (e) => {
|
|
7554
7554
|
if (!Ti(e, !1)) throw new Yf(e);
|
|
7555
7555
|
const t = e.toLowerCase().replace(/^0x/i, ""), r = Ps(Qa(ro(Ql(t))));
|
|
7556
7556
|
if (Xe(r) || r === "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470") return "";
|
|
@@ -7654,16 +7654,16 @@ var y1 = { exports: {} };
|
|
|
7654
7654
|
return c ? (f = r ? r + c : c, this._events[f] && a(this, f)) : (this._events = new n(), this._eventsCount = 0), this;
|
|
7655
7655
|
}, o.prototype.off = o.prototype.removeListener, o.prototype.addListener = o.prototype.on, o.prefixed = r, o.EventEmitter = o, e.exports = o;
|
|
7656
7656
|
})(y1);
|
|
7657
|
-
const
|
|
7657
|
+
const Jl = di(y1.exports), Ta = Xe, md = (e, t, r = "0") => typeof e == "string" ? ze(e) ? ka(e, t, r) : e.padStart(t, r) : (Gi.validate(["int"], [e]), ka(e, t, r)), v1 = "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", Gl = (e) => {
|
|
7658
7658
|
let t;
|
|
7659
|
-
t = typeof e == "string" ? e.startsWith("0x") && ze(e) ? Vi(e) :
|
|
7659
|
+
t = typeof e == "string" ? e.startsWith("0x") && ze(e) ? Vi(e) : Jn(e) : e;
|
|
7660
7660
|
const r = ((n) => {
|
|
7661
7661
|
let i;
|
|
7662
|
-
return i = typeof n == "bigint" || typeof n == "number" ?
|
|
7662
|
+
return i = typeof n == "bigint" || typeof n == "number" ? Jn(n.toString()) : Array.isArray(n) ? new Uint8Array(n) : typeof n != "string" || ze(n) ? Zi(n) : Jn(n), no(Qa(ro(i)));
|
|
7663
7663
|
})(t);
|
|
7664
7664
|
return r === v1 ? void 0 : r;
|
|
7665
7665
|
}, rc = (e) => {
|
|
7666
|
-
const t =
|
|
7666
|
+
const t = Gl(e);
|
|
7667
7667
|
return Xe(t) ? v1 : t;
|
|
7668
7668
|
}, Xl = (e) => function(t) {
|
|
7669
7669
|
return Xf(t);
|
|
@@ -7797,7 +7797,7 @@ var vd = function(e, t, r, n) {
|
|
|
7797
7797
|
};
|
|
7798
7798
|
class S1 extends Qs {
|
|
7799
7799
|
constructor() {
|
|
7800
|
-
super(...arguments), this._eventEmitter = new
|
|
7800
|
+
super(...arguments), this._eventEmitter = new Jl(), this._chainId = "", this._accounts = [];
|
|
7801
7801
|
}
|
|
7802
7802
|
_getChainId() {
|
|
7803
7803
|
return vd(this, void 0, void 0, function* () {
|
|
@@ -8081,11 +8081,11 @@ var Ra = { exports: {} };
|
|
|
8081
8081
|
if (u) return this.blob().then(N);
|
|
8082
8082
|
throw new Error("could not read as ArrayBuffer");
|
|
8083
8083
|
}, this.text = function() {
|
|
8084
|
-
var x, O, R, j,
|
|
8084
|
+
var x, O, R, j, F, $ = P(this);
|
|
8085
8085
|
if ($) return $;
|
|
8086
|
-
if (this._bodyBlob) return x = this._bodyBlob, O = new FileReader(), R = I(O), j = /charset=([A-Za-z0-9_-]+)/.exec(x.type),
|
|
8086
|
+
if (this._bodyBlob) return x = this._bodyBlob, O = new FileReader(), R = I(O), j = /charset=([A-Za-z0-9_-]+)/.exec(x.type), F = j ? j[1] : "utf-8", O.readAsText(x, F), R;
|
|
8087
8087
|
if (this._bodyArrayBuffer) return Promise.resolve(function(V) {
|
|
8088
|
-
for (var
|
|
8088
|
+
for (var D = new Uint8Array(V), U = new Array(D.length), G = 0; G < D.length; G++) U[G] = String.fromCharCode(D[G]);
|
|
8089
8089
|
return U.join("");
|
|
8090
8090
|
}(this._bodyArrayBuffer));
|
|
8091
8091
|
if (this._bodyFormData) throw new Error("could not read FormData body as text");
|
|
@@ -8129,15 +8129,15 @@ var Ra = { exports: {} };
|
|
|
8129
8129
|
var d = ["CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT", "TRACE"];
|
|
8130
8130
|
function h(x, O) {
|
|
8131
8131
|
if (!(this instanceof h)) throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');
|
|
8132
|
-
var R, j,
|
|
8132
|
+
var R, j, F = (O = O || {}).body;
|
|
8133
8133
|
if (x instanceof h) {
|
|
8134
8134
|
if (x.bodyUsed) throw new TypeError("Already read");
|
|
8135
|
-
this.url = x.url, this.credentials = x.credentials, O.headers || (this.headers = new A(x.headers)), this.method = x.method, this.mode = x.mode, this.signal = x.signal,
|
|
8135
|
+
this.url = x.url, this.credentials = x.credentials, O.headers || (this.headers = new A(x.headers)), this.method = x.method, this.mode = x.mode, this.signal = x.signal, F || x._bodyInit == null || (F = x._bodyInit, x.bodyUsed = !0);
|
|
8136
8136
|
} else this.url = String(x);
|
|
8137
8137
|
if (this.credentials = O.credentials || this.credentials || "same-origin", !O.headers && this.headers || (this.headers = new A(O.headers)), this.method = (R = O.method || this.method || "GET", j = R.toUpperCase(), d.indexOf(j) > -1 ? j : R), this.mode = O.mode || this.mode || null, this.signal = O.signal || this.signal || function() {
|
|
8138
8138
|
if ("AbortController" in o) return new AbortController().signal;
|
|
8139
|
-
}(), this.referrer = null, (this.method === "GET" || this.method === "HEAD") &&
|
|
8140
|
-
if (this._initBody(
|
|
8139
|
+
}(), this.referrer = null, (this.method === "GET" || this.method === "HEAD") && F) throw new TypeError("Body not allowed for GET or HEAD requests");
|
|
8140
|
+
if (this._initBody(F), !(this.method !== "GET" && this.method !== "HEAD" || O.cache !== "no-store" && O.cache !== "no-cache")) {
|
|
8141
8141
|
var $ = /([?&])_=[^&]*/;
|
|
8142
8142
|
$.test(this.url) ? this.url = this.url.replace($, "$1_=" + (/* @__PURE__ */ new Date()).getTime()) : this.url += (/\?/.test(this.url) ? "&" : "?") + "_=" + (/* @__PURE__ */ new Date()).getTime();
|
|
8143
8143
|
}
|
|
@@ -8146,8 +8146,8 @@ var Ra = { exports: {} };
|
|
|
8146
8146
|
var O = new FormData();
|
|
8147
8147
|
return x.trim().split("&").forEach(function(R) {
|
|
8148
8148
|
if (R) {
|
|
8149
|
-
var j = R.split("="),
|
|
8150
|
-
O.append(decodeURIComponent(
|
|
8149
|
+
var j = R.split("="), F = j.shift().replace(/\+/g, " "), $ = j.join("=").replace(/\+/g, " ");
|
|
8150
|
+
O.append(decodeURIComponent(F), decodeURIComponent($));
|
|
8151
8151
|
}
|
|
8152
8152
|
}), O;
|
|
8153
8153
|
}
|
|
@@ -8180,28 +8180,28 @@ var Ra = { exports: {} };
|
|
|
8180
8180
|
}
|
|
8181
8181
|
function g(x, O) {
|
|
8182
8182
|
return new Promise(function(R, j) {
|
|
8183
|
-
var
|
|
8184
|
-
if (
|
|
8183
|
+
var F = new h(x, O);
|
|
8184
|
+
if (F.signal && F.signal.aborted) return j(new a.DOMException("Aborted", "AbortError"));
|
|
8185
8185
|
var $ = new XMLHttpRequest();
|
|
8186
8186
|
function V() {
|
|
8187
8187
|
$.abort();
|
|
8188
8188
|
}
|
|
8189
8189
|
if ($.onload = function() {
|
|
8190
|
-
var U,
|
|
8190
|
+
var U, G, Nt = { statusText: $.statusText, headers: (U = $.getAllResponseHeaders() || "", G = new A(), U.replace(/\r?\n[\t ]+/g, " ").split("\r").map(function(gt) {
|
|
8191
8191
|
return gt.indexOf(`
|
|
8192
8192
|
`) === 0 ? gt.substr(1, gt.length) : gt;
|
|
8193
8193
|
}).forEach(function(gt) {
|
|
8194
|
-
var
|
|
8194
|
+
var Ft = gt.split(":"), mt = Ft.shift().trim();
|
|
8195
8195
|
if (mt) {
|
|
8196
|
-
var Mt =
|
|
8196
|
+
var Mt = Ft.join(":").trim();
|
|
8197
8197
|
try {
|
|
8198
|
-
|
|
8198
|
+
G.append(mt, Mt);
|
|
8199
8199
|
} catch (Zt) {
|
|
8200
8200
|
console.warn("Response " + Zt.message);
|
|
8201
8201
|
}
|
|
8202
8202
|
}
|
|
8203
|
-
}),
|
|
8204
|
-
|
|
8203
|
+
}), G) };
|
|
8204
|
+
F.url.indexOf("file://") === 0 && ($.status < 200 || $.status > 599) ? Nt.status = 200 : Nt.status = $.status, Nt.url = "responseURL" in $ ? $.responseURL : Nt.headers.get("X-Request-URL");
|
|
8205
8205
|
var dt = "response" in $ ? $.response : $.responseText;
|
|
8206
8206
|
setTimeout(function() {
|
|
8207
8207
|
R(new m(dt, Nt));
|
|
@@ -8218,25 +8218,25 @@ var Ra = { exports: {} };
|
|
|
8218
8218
|
setTimeout(function() {
|
|
8219
8219
|
j(new a.DOMException("Aborted", "AbortError"));
|
|
8220
8220
|
}, 0);
|
|
8221
|
-
}, $.open(
|
|
8221
|
+
}, $.open(F.method, function(U) {
|
|
8222
8222
|
try {
|
|
8223
8223
|
return U === "" && o.location.href ? o.location.href : U;
|
|
8224
8224
|
} catch {
|
|
8225
8225
|
return U;
|
|
8226
8226
|
}
|
|
8227
|
-
}(
|
|
8228
|
-
var
|
|
8227
|
+
}(F.url), !0), F.credentials === "include" ? $.withCredentials = !0 : F.credentials === "omit" && ($.withCredentials = !1), "responseType" in $ && (u ? $.responseType = "blob" : w && ($.responseType = "arraybuffer")), O && typeof O.headers == "object" && !(O.headers instanceof A || o.Headers && O.headers instanceof o.Headers)) {
|
|
8228
|
+
var D = [];
|
|
8229
8229
|
Object.getOwnPropertyNames(O.headers).forEach(function(U) {
|
|
8230
|
-
|
|
8231
|
-
}),
|
|
8232
|
-
|
|
8230
|
+
D.push(E(U)), $.setRequestHeader(U, _(O.headers[U]));
|
|
8231
|
+
}), F.headers.forEach(function(U, G) {
|
|
8232
|
+
D.indexOf(G) === -1 && $.setRequestHeader(G, U);
|
|
8233
8233
|
});
|
|
8234
|
-
} else
|
|
8235
|
-
$.setRequestHeader(
|
|
8234
|
+
} else F.headers.forEach(function(U, G) {
|
|
8235
|
+
$.setRequestHeader(G, U);
|
|
8236
8236
|
});
|
|
8237
|
-
|
|
8238
|
-
$.readyState === 4 &&
|
|
8239
|
-
}), $.send(
|
|
8237
|
+
F.signal && (F.signal.addEventListener("abort", V), $.onreadystatechange = function() {
|
|
8238
|
+
$.readyState === 4 && F.signal.removeEventListener("abort", V);
|
|
8239
|
+
}), $.send(F._bodyInit === void 0 ? null : F._bodyInit);
|
|
8240
8240
|
});
|
|
8241
8241
|
}
|
|
8242
8242
|
g.polyfill = !0, o.fetch || (o.fetch = g, o.Headers = A, o.Request = h, o.Response = m), a.Headers = A, a.Request = h, a.Response = m, a.fetch = g;
|
|
@@ -8374,8 +8374,8 @@ var _d;
|
|
|
8374
8374
|
})(_d || (_d = {}));
|
|
8375
8375
|
class A1 extends Wa {
|
|
8376
8376
|
constructor(t, r) {
|
|
8377
|
-
super(), this.finished = !1, this.destroyed = !1,
|
|
8378
|
-
const n =
|
|
8377
|
+
super(), this.finished = !1, this.destroyed = !1, Jf(t);
|
|
8378
|
+
const n = Js(r);
|
|
8379
8379
|
if (this.iHash = t.create(), typeof this.iHash.update != "function") throw new Error("Expected instance of class which extends utils.Hash");
|
|
8380
8380
|
this.blockLen = this.iHash.blockLen, this.outputLen = this.iHash.outputLen;
|
|
8381
8381
|
const i = this.blockLen, s = new Uint8Array(i);
|
|
@@ -8413,7 +8413,7 @@ class h3 extends Wa {
|
|
|
8413
8413
|
}
|
|
8414
8414
|
update(t) {
|
|
8415
8415
|
Mn(this);
|
|
8416
|
-
const { view: r, buffer: n, blockLen: i } = this, s = (t =
|
|
8416
|
+
const { view: r, buffer: n, blockLen: i } = this, s = (t = Js(t)).length;
|
|
8417
8417
|
for (let a = 0; a < s; ) {
|
|
8418
8418
|
const o = Math.min(i - this.pos, s - a);
|
|
8419
8419
|
if (o === i) {
|
|
@@ -8454,10 +8454,10 @@ class h3 extends Wa {
|
|
|
8454
8454
|
return t.length = i, t.pos = o, t.finished = s, t.destroyed = a, i % r && t.buffer.set(n), t;
|
|
8455
8455
|
}
|
|
8456
8456
|
}
|
|
8457
|
-
const l3 = new Uint32Array([1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298]),
|
|
8457
|
+
const l3 = new Uint32Array([1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298]), Gr = new Uint32Array([1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225]), Xr = new Uint32Array(64);
|
|
8458
8458
|
class p3 extends h3 {
|
|
8459
8459
|
constructor() {
|
|
8460
|
-
super(64, 32, 8, !1), this.A = 0 |
|
|
8460
|
+
super(64, 32, 8, !1), this.A = 0 | Gr[0], this.B = 0 | Gr[1], this.C = 0 | Gr[2], this.D = 0 | Gr[3], this.E = 0 | Gr[4], this.F = 0 | Gr[5], this.G = 0 | Gr[6], this.H = 0 | Gr[7];
|
|
8461
8461
|
}
|
|
8462
8462
|
get() {
|
|
8463
8463
|
const { A: t, B: r, C: n, D: i, E: s, F: a, G: o, H: c } = this;
|
|
@@ -8486,7 +8486,7 @@ class p3 extends h3 {
|
|
|
8486
8486
|
this.set(0, 0, 0, 0, 0, 0, 0, 0), this.buffer.fill(0);
|
|
8487
8487
|
}
|
|
8488
8488
|
}
|
|
8489
|
-
const m3 =
|
|
8489
|
+
const m3 = Gf(() => new p3()), xd = BigInt(0), ws = BigInt(1), b3 = BigInt(2);
|
|
8490
8490
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
8491
8491
|
function Nn(e) {
|
|
8492
8492
|
return e instanceof Uint8Array || e != null && typeof e == "object" && e.constructor.name === "Uint8Array";
|
|
@@ -8625,17 +8625,17 @@ const x3 = Object.freeze(Object.defineProperty({ __proto__: null, abytes: Xi, bi
|
|
|
8625
8625
|
}, utf8ToBytes: function(e) {
|
|
8626
8626
|
if (typeof e != "string") throw new Error("utf8ToBytes expected string, got " + typeof e);
|
|
8627
8627
|
return new Uint8Array(new TextEncoder().encode(e));
|
|
8628
|
-
}, validateObject: Wi }, Symbol.toStringTag, { value: "Module" })), Le = BigInt(0),
|
|
8628
|
+
}, validateObject: Wi }, Symbol.toStringTag, { value: "Module" })), Le = BigInt(0), Ae = BigInt(1), ln = BigInt(2), S3 = BigInt(3), Io = BigInt(4), Td = BigInt(5), Rd = BigInt(8);
|
|
8629
8629
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
8630
|
-
function
|
|
8630
|
+
function Ge(e, t) {
|
|
8631
8631
|
const r = e % t;
|
|
8632
8632
|
return r >= Le ? r : t + r;
|
|
8633
8633
|
}
|
|
8634
8634
|
function A3(e, t, r) {
|
|
8635
8635
|
if (r <= Le || t < Le) throw new Error("Expected power/modulo > 0");
|
|
8636
|
-
if (r ===
|
|
8637
|
-
let n =
|
|
8638
|
-
for (; t > Le; ) t &
|
|
8636
|
+
if (r === Ae) return Le;
|
|
8637
|
+
let n = Ae;
|
|
8638
|
+
for (; t > Le; ) t & Ae && (n = n * e % r), e = e * e % r, t >>= Ae;
|
|
8639
8639
|
return n;
|
|
8640
8640
|
}
|
|
8641
8641
|
function ar(e, t, r) {
|
|
@@ -8645,17 +8645,17 @@ function ar(e, t, r) {
|
|
|
8645
8645
|
}
|
|
8646
8646
|
function Na(e, t) {
|
|
8647
8647
|
if (e === Le || t <= Le) throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);
|
|
8648
|
-
let r =
|
|
8648
|
+
let r = Ge(e, t), n = t, i = Le, s = Ae;
|
|
8649
8649
|
for (; r !== Le; ) {
|
|
8650
8650
|
const a = n % r, o = i - s * (n / r);
|
|
8651
8651
|
n = r, r = a, i = s, s = o;
|
|
8652
8652
|
}
|
|
8653
|
-
if (n !==
|
|
8654
|
-
return
|
|
8653
|
+
if (n !== Ae) throw new Error("invert: does not exist");
|
|
8654
|
+
return Ge(i, t);
|
|
8655
8655
|
}
|
|
8656
8656
|
function k3(e) {
|
|
8657
8657
|
if (e % Io === S3) {
|
|
8658
|
-
const t = (e +
|
|
8658
|
+
const t = (e + Ae) / Io;
|
|
8659
8659
|
return function(r, n) {
|
|
8660
8660
|
const i = r.pow(n, t);
|
|
8661
8661
|
if (!r.eql(r.sqr(i), n)) throw new Error("Cannot find square root");
|
|
@@ -8671,19 +8671,19 @@ function k3(e) {
|
|
|
8671
8671
|
};
|
|
8672
8672
|
}
|
|
8673
8673
|
return function(t) {
|
|
8674
|
-
const r = (t -
|
|
8674
|
+
const r = (t - Ae) / ln;
|
|
8675
8675
|
let n, i, s;
|
|
8676
|
-
for (n = t -
|
|
8677
|
-
for (s = ln; s < t && A3(s, r, t) !== t -
|
|
8676
|
+
for (n = t - Ae, i = 0; n % ln === Le; n /= ln, i++) ;
|
|
8677
|
+
for (s = ln; s < t && A3(s, r, t) !== t - Ae; s++) ;
|
|
8678
8678
|
if (i === 1) {
|
|
8679
|
-
const o = (t +
|
|
8679
|
+
const o = (t + Ae) / Io;
|
|
8680
8680
|
return function(c, f) {
|
|
8681
8681
|
const u = c.pow(f, o);
|
|
8682
8682
|
if (!c.eql(c.sqr(u), f)) throw new Error("Cannot find square root");
|
|
8683
8683
|
return u;
|
|
8684
8684
|
};
|
|
8685
8685
|
}
|
|
8686
|
-
const a = (n +
|
|
8686
|
+
const a = (n + Ae) / ln;
|
|
8687
8687
|
return function(o, c) {
|
|
8688
8688
|
if (o.pow(c, r) === o.neg(o.ONE)) throw new Error("Cannot find square root");
|
|
8689
8689
|
let f = i, u = o.pow(o.mul(o.ONE, s), n), p = o.pow(c, a), w = o.pow(c, n);
|
|
@@ -8691,7 +8691,7 @@ function k3(e) {
|
|
|
8691
8691
|
if (o.eql(w, o.ZERO)) return o.ZERO;
|
|
8692
8692
|
let v = 1;
|
|
8693
8693
|
for (let E = o.sqr(w); v < f && !o.eql(E, o.ONE); v++) E = o.sqr(E);
|
|
8694
|
-
const S = o.pow(u,
|
|
8694
|
+
const S = o.pow(u, Ae << BigInt(f - v - 1));
|
|
8695
8695
|
u = o.sqr(S), p = o.mul(p, S), w = o.mul(w, u), f = v;
|
|
8696
8696
|
}
|
|
8697
8697
|
return p;
|
|
@@ -8746,7 +8746,7 @@ const { bytesToNumberBE: I3, hexToBytes: T3 } = x3, Sn = { Err: class extends Er
|
|
|
8746
8746
|
return 1 & u.length ? `0${u}` : u;
|
|
8747
8747
|
}, n = t(r(e.s)), i = t(r(e.r)), s = n.length / 2, a = i.length / 2, o = r(s), c = r(a);
|
|
8748
8748
|
return `30${r(a + s + 4)}02${c}${i}02${o}${n}`;
|
|
8749
|
-
} },
|
|
8749
|
+
} }, Fr = BigInt(0), fr = BigInt(1);
|
|
8750
8750
|
BigInt(2);
|
|
8751
8751
|
const Od = BigInt(3);
|
|
8752
8752
|
function R3(e) {
|
|
@@ -8772,7 +8772,7 @@ function R3(e) {
|
|
|
8772
8772
|
}
|
|
8773
8773
|
if (!r.eql(r.sqr(t.Gy), s(t.Gx))) throw new Error("bad generator point: equation left != right");
|
|
8774
8774
|
function a(S) {
|
|
8775
|
-
return typeof S == "bigint" &&
|
|
8775
|
+
return typeof S == "bigint" && Fr < S && S < t.n;
|
|
8776
8776
|
}
|
|
8777
8777
|
function o(S) {
|
|
8778
8778
|
if (!a(S)) throw new Error("Expected valid bigint: 0 < bigint < curve.n");
|
|
@@ -8789,7 +8789,7 @@ function R3(e) {
|
|
|
8789
8789
|
} catch {
|
|
8790
8790
|
throw new Error(`private key must be ${_} bytes, hex or bigint, not ${typeof S}`);
|
|
8791
8791
|
}
|
|
8792
|
-
return k && (P =
|
|
8792
|
+
return k && (P = Ge(P, A)), o(P), P;
|
|
8793
8793
|
}
|
|
8794
8794
|
const f = /* @__PURE__ */ new Map();
|
|
8795
8795
|
function u(S) {
|
|
@@ -8881,12 +8881,12 @@ function R3(e) {
|
|
|
8881
8881
|
}
|
|
8882
8882
|
multiplyUnsafe(E) {
|
|
8883
8883
|
const _ = p.ZERO;
|
|
8884
|
-
if (E ===
|
|
8884
|
+
if (E === Fr) return _;
|
|
8885
8885
|
if (o(E), E === fr) return this;
|
|
8886
8886
|
const { endo: k } = t;
|
|
8887
8887
|
if (!k) return v.unsafeLadder(this, E);
|
|
8888
8888
|
let { k1neg: A, k1: P, k2neg: I, k2: N } = k.splitScalar(E), z = _, B = _, d = this;
|
|
8889
|
-
for (; P >
|
|
8889
|
+
for (; P > Fr || N > Fr; ) P & fr && (z = z.add(d)), N & fr && (B = B.add(d)), d = d.double(), P >>= fr, N >>= fr;
|
|
8890
8890
|
return A && (z = z.negate()), I && (B = B.negate()), B = new p(r.mul(B.px, k.beta), B.py, B.pz), z.add(B);
|
|
8891
8891
|
}
|
|
8892
8892
|
multiply(E) {
|
|
@@ -8904,7 +8904,7 @@ function R3(e) {
|
|
|
8904
8904
|
return p.normalizeZ([_, k])[0];
|
|
8905
8905
|
}
|
|
8906
8906
|
multiplyAndAddUnsafe(E, _, k) {
|
|
8907
|
-
const A = p.BASE, P = (N, z) => z !==
|
|
8907
|
+
const A = p.BASE, P = (N, z) => z !== Fr && z !== fr && N.equals(A) ? N.multiply(z) : N.multiplyUnsafe(z), I = P(this, _).add(P(E, k));
|
|
8908
8908
|
return I.is0() ? void 0 : I;
|
|
8909
8909
|
}
|
|
8910
8910
|
toAffine(E) {
|
|
@@ -8959,8 +8959,8 @@ function R3(e) {
|
|
|
8959
8959
|
const g = l * z;
|
|
8960
8960
|
let x = Number(I & h);
|
|
8961
8961
|
I >>= m, x > z && (x -= y, I += To);
|
|
8962
|
-
const O = g, R = g + Math.abs(x) - 1, j = l % 2 != 0,
|
|
8963
|
-
x === 0 ? d = d.add(_(j, P[O])) : B = B.add(_(
|
|
8962
|
+
const O = g, R = g + Math.abs(x) - 1, j = l % 2 != 0, F = x < 0;
|
|
8963
|
+
x === 0 ? d = d.add(_(j, P[O])) : B = B.add(_(F, P[R]));
|
|
8964
8964
|
}
|
|
8965
8965
|
return { p: B, f: d };
|
|
8966
8966
|
}, wNAFCached(A, P, I, N) {
|
|
@@ -8977,7 +8977,7 @@ function N3(e) {
|
|
|
8977
8977
|
return Wi(y, { hash: "hash", hmac: "function", randomBytes: "function" }, { bits2int: "function", bits2int_modN: "function", lowS: "boolean" }), Object.freeze({ lowS: !0, ...y });
|
|
8978
8978
|
}(e), { Fp: r, n } = t, i = r.BYTES + 1, s = 2 * r.BYTES + 1;
|
|
8979
8979
|
function a(h) {
|
|
8980
|
-
return
|
|
8980
|
+
return Ge(h, n);
|
|
8981
8981
|
}
|
|
8982
8982
|
function o(h) {
|
|
8983
8983
|
return Na(h, n);
|
|
@@ -8994,14 +8994,14 @@ function N3(e) {
|
|
|
8994
8994
|
}
|
|
8995
8995
|
{
|
|
8996
8996
|
const x = xn(l);
|
|
8997
|
-
if (!(
|
|
8997
|
+
if (!(Fr < (g = x) && g < r.ORDER)) throw new Error("Point is not on curve");
|
|
8998
8998
|
const O = u(x);
|
|
8999
8999
|
let R;
|
|
9000
9000
|
try {
|
|
9001
9001
|
R = r.sqrt(O);
|
|
9002
9002
|
} catch (j) {
|
|
9003
|
-
const
|
|
9004
|
-
throw new Error("Point is not on curve" +
|
|
9003
|
+
const F = j instanceof Error ? ": " + j.message : "";
|
|
9004
|
+
throw new Error("Point is not on curve" + F);
|
|
9005
9005
|
}
|
|
9006
9006
|
return !(1 & ~m) != ((R & fr) === fr) && (R = r.neg(R)), { x, y: R };
|
|
9007
9007
|
}
|
|
@@ -9035,9 +9035,9 @@ function N3(e) {
|
|
|
9035
9035
|
if (g == null || ![0, 1, 2, 3].includes(g)) throw new Error("recovery id invalid");
|
|
9036
9036
|
const O = g === 2 || g === 3 ? m + t.n : m;
|
|
9037
9037
|
if (O >= r.ORDER) throw new Error("recovery id 2 or 3 invalid");
|
|
9038
|
-
const R = 1 & g ? "03" : "02", j = c.fromHex(R + w(O)),
|
|
9039
|
-
if (!
|
|
9040
|
-
return
|
|
9038
|
+
const R = 1 & g ? "03" : "02", j = c.fromHex(R + w(O)), F = o(O), $ = a(-x * F), V = a(l * F), D = c.BASE.multiplyAndAddUnsafe(j, $, V);
|
|
9039
|
+
if (!D) throw new Error("point at infinify");
|
|
9040
|
+
return D.assertValidity(), D;
|
|
9041
9041
|
}
|
|
9042
9042
|
hasHighS() {
|
|
9043
9043
|
return v(this.s);
|
|
@@ -9069,7 +9069,7 @@ function N3(e) {
|
|
|
9069
9069
|
return function(y, m, l = !1) {
|
|
9070
9070
|
const g = y.length, x = I1(m), O = Nd(m);
|
|
9071
9071
|
if (g < 16 || g < O || g > 1024) throw new Error(`expected ${O}-1024 bytes of input, got ${g}`);
|
|
9072
|
-
const R =
|
|
9072
|
+
const R = Ge(l ? xn(y) : sc(y), m - Ae) + Ae;
|
|
9073
9073
|
return l ? oc(R, x) : Xn(R, x);
|
|
9074
9074
|
}(t.randomBytes(h), t.n);
|
|
9075
9075
|
}, precompute: (h = 8, y = c.BASE) => (y._setWindowSize(h), y.multiply(BigInt(3)), y) };
|
|
@@ -9085,7 +9085,7 @@ function N3(e) {
|
|
|
9085
9085
|
}, I = ac(t.nBitLength);
|
|
9086
9086
|
function N(h) {
|
|
9087
9087
|
if (typeof h != "bigint") throw new Error("bigint expected");
|
|
9088
|
-
if (!(
|
|
9088
|
+
if (!(Fr <= h && h < I)) throw new Error(`bigint expected < 2^${t.nBitLength}`);
|
|
9089
9089
|
return Xn(h, t.nByteLength);
|
|
9090
9090
|
}
|
|
9091
9091
|
function z(h, y, m = B) {
|
|
@@ -9093,23 +9093,23 @@ function N3(e) {
|
|
|
9093
9093
|
const { hash: l, randomBytes: g } = t;
|
|
9094
9094
|
let { lowS: x, prehash: O, extraEntropy: R } = m;
|
|
9095
9095
|
x == null && (x = !0), h = br("msgHash", h), O && (h = br("prehashed msgHash", l(h)));
|
|
9096
|
-
const j = P(h),
|
|
9096
|
+
const j = P(h), F = f(y), $ = [N(F), N(j)];
|
|
9097
9097
|
if (R != null && R !== !1) {
|
|
9098
9098
|
const U = R === !0 ? g(r.BYTES) : R;
|
|
9099
9099
|
$.push(br("extraEntropy", U));
|
|
9100
9100
|
}
|
|
9101
|
-
const V = Ki(...$),
|
|
9101
|
+
const V = Ki(...$), D = j;
|
|
9102
9102
|
return { seed: V, k2sig: function(U) {
|
|
9103
|
-
const
|
|
9104
|
-
if (!p(
|
|
9105
|
-
const Nt = o(
|
|
9106
|
-
if (gt ===
|
|
9107
|
-
const
|
|
9108
|
-
if (
|
|
9109
|
-
let mt = (dt.x === gt ? 0 : 2) | Number(dt.y & fr), Mt =
|
|
9110
|
-
return x && v(
|
|
9103
|
+
const G = A(U);
|
|
9104
|
+
if (!p(G)) return;
|
|
9105
|
+
const Nt = o(G), dt = c.BASE.multiply(G).toAffine(), gt = a(dt.x);
|
|
9106
|
+
if (gt === Fr) return;
|
|
9107
|
+
const Ft = a(Nt * a(D + gt * F));
|
|
9108
|
+
if (Ft === Fr) return;
|
|
9109
|
+
let mt = (dt.x === gt ? 0 : 2) | Number(dt.y & fr), Mt = Ft;
|
|
9110
|
+
return x && v(Ft) && (Mt = function(Zt) {
|
|
9111
9111
|
return v(Zt) ? a(-Zt) : Zt;
|
|
9112
|
-
}(
|
|
9112
|
+
}(Ft), mt ^= 1), new E(gt, Mt, mt);
|
|
9113
9113
|
} };
|
|
9114
9114
|
}
|
|
9115
9115
|
const B = { lowS: t.lowS, prehash: !1 }, d = { lowS: t.lowS, prehash: !1 };
|
|
@@ -9138,8 +9138,8 @@ function N3(e) {
|
|
|
9138
9138
|
else {
|
|
9139
9139
|
if (typeof g != "object" || typeof g.r != "bigint" || typeof g.s != "bigint") throw new Error("PARSE");
|
|
9140
9140
|
{
|
|
9141
|
-
const { r: gt, s:
|
|
9142
|
-
R = new E(gt,
|
|
9141
|
+
const { r: gt, s: Ft } = g;
|
|
9142
|
+
R = new E(gt, Ft);
|
|
9143
9143
|
}
|
|
9144
9144
|
}
|
|
9145
9145
|
j = c.fromHex(m);
|
|
@@ -9149,8 +9149,8 @@ function N3(e) {
|
|
|
9149
9149
|
}
|
|
9150
9150
|
if (x && R.hasHighS()) return !1;
|
|
9151
9151
|
O && (y = t.hash(y));
|
|
9152
|
-
const { r:
|
|
9153
|
-
return !!Nt && a(Nt.x) ===
|
|
9152
|
+
const { r: F, s: $ } = R, V = P(y), D = o($), U = a(V * D), G = a(F * D), Nt = (dt = c.BASE.multiplyAndAddUnsafe(j, U, G)) == null ? void 0 : dt.toAffine();
|
|
9153
|
+
return !!Nt && a(Nt.x) === F;
|
|
9154
9154
|
}, ProjectivePoint: c, Signature: E, utils: _ };
|
|
9155
9155
|
}
|
|
9156
9156
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
@@ -9175,17 +9175,17 @@ const Cd = BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefff
|
|
|
9175
9175
|
if (e <= Le) throw new Error(`Expected Field ORDER > 0, got ${e}`);
|
|
9176
9176
|
const { nBitLength: i, nByteLength: s } = E1(e, t);
|
|
9177
9177
|
if (s > 2048) throw new Error("Field lengths over 2048 bytes are not supported");
|
|
9178
|
-
const a = k3(e), o = Object.freeze({ ORDER: e, BITS: i, BYTES: s, MASK: ac(i), ZERO: Le, ONE:
|
|
9178
|
+
const a = k3(e), o = Object.freeze({ ORDER: e, BITS: i, BYTES: s, MASK: ac(i), ZERO: Le, ONE: Ae, create: (c) => Ge(c, e), isValid: (c) => {
|
|
9179
9179
|
if (typeof c != "bigint") throw new Error("Invalid field element: expected bigint, got " + typeof c);
|
|
9180
9180
|
return Le <= c && c < e;
|
|
9181
|
-
}, is0: (c) => c === Le, isOdd: (c) => (c &
|
|
9181
|
+
}, is0: (c) => c === Le, isOdd: (c) => (c & Ae) === Ae, neg: (c) => Ge(-c, e), eql: (c, f) => c === f, sqr: (c) => Ge(c * c, e), add: (c, f) => Ge(c + f, e), sub: (c, f) => Ge(c - f, e), mul: (c, f) => Ge(c * f, e), pow: (c, f) => function(u, p, w) {
|
|
9182
9182
|
if (w < Le) throw new Error("Expected power > 0");
|
|
9183
9183
|
if (w === Le) return u.ONE;
|
|
9184
|
-
if (w ===
|
|
9184
|
+
if (w === Ae) return p;
|
|
9185
9185
|
let v = u.ONE, S = p;
|
|
9186
|
-
for (; w > Le; ) w &
|
|
9186
|
+
for (; w > Le; ) w & Ae && (v = u.mul(v, S)), S = u.sqr(S), w >>= Ae;
|
|
9187
9187
|
return v;
|
|
9188
|
-
}(o, c, f), div: (c, f) =>
|
|
9188
|
+
}(o, c, f), div: (c, f) => Ge(c * Na(f, e), e), sqrN: (c) => c * c, addN: (c, f) => c + f, subN: (c, f) => c - f, mulN: (c, f) => c * f, inv: (c) => Na(c, e), sqrt: n.sqrt || ((c) => a(o, c)), invertBatch: (c) => function(f, u) {
|
|
9189
9189
|
const p = new Array(u.length), w = u.reduce((S, E, _) => f.is0(E) ? S : (p[_] = S, f.mul(S, E)), f.ONE), v = f.inv(w);
|
|
9190
9190
|
return u.reduceRight((S, E, _) => f.is0(E) ? S : (p[_] = f.mul(S, p[_]), f.mul(S, E)), v), p;
|
|
9191
9191
|
}(o, c), cmov: (c, f, u) => u ? f : c, toBytes: (c) => r ? oc(c, s) : Xn(c, s), fromBytes: (c) => {
|
|
@@ -9202,7 +9202,7 @@ const Cd = BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefff
|
|
|
9202
9202
|
return Object.freeze({ ...r(t), create: r });
|
|
9203
9203
|
}({ a: BigInt(0), b: BigInt(7), Fp: Ca, n: Bd, Gx: BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"), Gy: BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"), h: BigInt(1), lowS: !0, endo: { beta: BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"), splitScalar: (e) => {
|
|
9204
9204
|
const t = Bd, r = BigInt("0x3086d221a7d46bcde86c90e49284eb15"), n = -C3 * BigInt("0xe4437ed6010e88286f547fa90abfe4c3"), i = BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"), s = r, a = BigInt("0x100000000000000000000000000000000"), o = Pd(s * e, t), c = Pd(-n * e, t);
|
|
9205
|
-
let f =
|
|
9205
|
+
let f = Ge(e - o * r - c * i, t), u = Ge(-o * n - c * s, t);
|
|
9206
9206
|
const p = f > a, w = u > a;
|
|
9207
9207
|
if (p && (f = t - f), w && (u = t - u), f > a || u > a) throw new Error("splitScalar: Endomorphism failed, k=" + e);
|
|
9208
9208
|
return { k1neg: p, k1: f, k2neg: w, k2: u };
|
|
@@ -9236,10 +9236,10 @@ function dc(e) {
|
|
|
9236
9236
|
const s = dc(e[i]);
|
|
9237
9237
|
r.push(s), n += s.length;
|
|
9238
9238
|
}
|
|
9239
|
-
return Pa(
|
|
9239
|
+
return Pa(Dd(n, 192), ...r);
|
|
9240
9240
|
}
|
|
9241
9241
|
const t = B1(e);
|
|
9242
|
-
return t.length === 1 && t[0] < 128 ? t : Pa(
|
|
9242
|
+
return t.length === 1 && t[0] < 128 ? t : Pa(Dd(t.length, 128), t);
|
|
9243
9243
|
}
|
|
9244
9244
|
function jn(e, t, r) {
|
|
9245
9245
|
if (r > e.length) throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");
|
|
@@ -9249,7 +9249,7 @@ function Hd(e) {
|
|
|
9249
9249
|
if (e[0] === 0) throw new Error("invalid RLP: extra zeros");
|
|
9250
9250
|
return O1(N1(e));
|
|
9251
9251
|
}
|
|
9252
|
-
function
|
|
9252
|
+
function Dd(e, t) {
|
|
9253
9253
|
if (e < 56) return Uint8Array.from([e + t]);
|
|
9254
9254
|
const r = La(e), n = La(t + 55 + r.length / 2);
|
|
9255
9255
|
return Uint8Array.from(Ls(n + r));
|
|
@@ -9325,12 +9325,12 @@ function La(e) {
|
|
|
9325
9325
|
const t = e.toString(16);
|
|
9326
9326
|
return t.length % 2 ? `0${t}` : t;
|
|
9327
9327
|
}
|
|
9328
|
-
function
|
|
9328
|
+
function Fd(e) {
|
|
9329
9329
|
return e.length >= 2 && e[0] === "0" && e[1] === "x";
|
|
9330
9330
|
}
|
|
9331
9331
|
function B1(e) {
|
|
9332
9332
|
if (e instanceof Uint8Array) return e;
|
|
9333
|
-
if (typeof e == "string") return
|
|
9333
|
+
if (typeof e == "string") return Fd(e) ? Ls((t = typeof (r = e) != "string" ? r : Fd(r) ? r.slice(2) : r).length % 2 ? `0${t}` : t) : C1(e);
|
|
9334
9334
|
var t, r;
|
|
9335
9335
|
if (typeof e == "number" || typeof e == "bigint") return e ? Ls(La(e)) : Uint8Array.from([]);
|
|
9336
9336
|
if (e == null) return Uint8Array.from([]);
|
|
@@ -9446,7 +9446,7 @@ class Pe {
|
|
|
9446
9446
|
}
|
|
9447
9447
|
static fromAddress(t) {
|
|
9448
9448
|
if (!Ti(t)) throw new Yf(t);
|
|
9449
|
-
const r = BigInt(((s) => (
|
|
9449
|
+
const r = BigInt(((s) => (Gi.validate(["hex"], [s]), to(s)))(t)), n = r.toString(36), i = md(n, 15);
|
|
9450
9450
|
return Pe.fromBban(i.toUpperCase());
|
|
9451
9451
|
}
|
|
9452
9452
|
static toIban(t) {
|
|
@@ -9668,7 +9668,7 @@ var H3 = function(e, t, r, n) {
|
|
|
9668
9668
|
c((n = n.apply(e, t || [])).next());
|
|
9669
9669
|
});
|
|
9670
9670
|
};
|
|
9671
|
-
const
|
|
9671
|
+
const Oe = (e) => e !== void 0 && e.trim().length > 0, D3 = [pt.DYMENSION_MAINNET, pt.DYMENSION_TESTNET, pt.KAVA_MAINNET, pt.CRONOS_MAINNET, pt.POLYGON_MAINNET];
|
|
9672
9672
|
class zs extends $1 {
|
|
9673
9673
|
constructor(t = pt.ETH_MAINNET, r = Rr.HTTPS, n = "", i) {
|
|
9674
9674
|
super(t, r, "", n, i);
|
|
@@ -9677,7 +9677,7 @@ class zs extends $1 {
|
|
|
9677
9677
|
if (!zs.networkHostMap[t]) throw new Error("Network info not avalible.");
|
|
9678
9678
|
const s = `${zs.networkHostMap[t]}.publicnode.com`, a = (o = i) !== void 0 && o.trim().length > 0 ? i : s;
|
|
9679
9679
|
var o;
|
|
9680
|
-
return
|
|
9680
|
+
return D3.includes(t) && r === Rr.WebSocket ? `${r}://${a}/websocket` : `${r}://${a}`;
|
|
9681
9681
|
}
|
|
9682
9682
|
}
|
|
9683
9683
|
var Qd;
|
|
@@ -9699,31 +9699,31 @@ zs.networkHostMap = { [pt.POLYGON_AMOY]: "polygon-amoy-bor-rpc", [pt.DYMENSION_M
|
|
|
9699
9699
|
let i = "", s = "";
|
|
9700
9700
|
switch (e) {
|
|
9701
9701
|
case pt.ETH_MAINNET:
|
|
9702
|
-
i =
|
|
9702
|
+
i = Oe(n) ? n : "powerful-holy-bush.quiknode.pro", s = Oe(r) ? r : "3240624a343867035925ff7561eb60dfdba2a668";
|
|
9703
9703
|
break;
|
|
9704
9704
|
case pt.ETH_SEPOLIA:
|
|
9705
|
-
i =
|
|
9705
|
+
i = Oe(n) ? n : "dimensional-fabled-glitter.ethereum-sepolia.quiknode.pro", s = Oe(r) ? r : "382a3b5a4b938f2d6e8686c19af4b22921fde2cd";
|
|
9706
9706
|
break;
|
|
9707
9707
|
case pt.ETH_HOLESKY:
|
|
9708
|
-
i =
|
|
9708
|
+
i = Oe(n) ? n : "yolo-morning-card.ethereum-holesky.quiknode.pro", s = Oe(r) ? r : "481ebe70638c4dcf176af617a16d02ab866b9af9";
|
|
9709
9709
|
break;
|
|
9710
9710
|
case pt.ARBITRUM_MAINNET:
|
|
9711
|
-
i =
|
|
9711
|
+
i = Oe(n) ? n : "autumn-divine-dinghy.arbitrum-mainnet.quiknode.pro", s = Oe(r) ? r : "a5d7bfbf60b5ae9ce3628e53d69ef50d529e9a8c";
|
|
9712
9712
|
break;
|
|
9713
9713
|
case pt.ARBITRUM_SEPOLIA:
|
|
9714
|
-
i =
|
|
9714
|
+
i = Oe(n) ? n : "few-patient-pond.arbitrum-sepolia.quiknode.pro", s = Oe(r) ? r : "3be985450970628c860b959c65cd2642dcafe53c";
|
|
9715
9715
|
break;
|
|
9716
9716
|
case pt.BNB_MAINNET:
|
|
9717
|
-
i =
|
|
9717
|
+
i = Oe(n) ? n : "purple-empty-reel.bsc.quiknode.pro", s = Oe(r) ? r : "ebf6c532961e21f092ff2facce1ec4c89c540158";
|
|
9718
9718
|
break;
|
|
9719
9719
|
case pt.BNB_TESTNET:
|
|
9720
|
-
i =
|
|
9720
|
+
i = Oe(n) ? n : "floral-rough-scion.bsc-testnet.quiknode.pro", s = Oe(r) ? r : "5b297e5acff5f81f4c37ebf6f235f7299b6f9d28";
|
|
9721
9721
|
break;
|
|
9722
9722
|
case pt.POLYGON_MAINNET:
|
|
9723
|
-
i =
|
|
9723
|
+
i = Oe(n) ? n : "small-chaotic-moon.matic.quiknode.pro", s = Oe(r) ? r : "847569f8a017e84d985e10d0f44365d965a951f1";
|
|
9724
9724
|
break;
|
|
9725
9725
|
case pt.POLYGON_AMOY:
|
|
9726
|
-
i =
|
|
9726
|
+
i = Oe(n) ? n : "prettiest-side-shape.matic-amoy.quiknode.pro", s = Oe(r) ? r : "79a9476eea661d4f82de614db1d8a895b14b881c";
|
|
9727
9727
|
break;
|
|
9728
9728
|
default:
|
|
9729
9729
|
throw new Error("Network info not avalible.");
|
|
@@ -9733,7 +9733,7 @@ zs.networkHostMap = { [pt.POLYGON_AMOY]: "polygon-amoy-bor-rpc", [pt.DYMENSION_M
|
|
|
9733
9733
|
}(), function(e) {
|
|
9734
9734
|
e.eip6963announceProvider = "eip6963:announceProvider", e.eip6963requestProvider = "eip6963:requestProvider";
|
|
9735
9735
|
}(Qd || (Qd = {}));
|
|
9736
|
-
class
|
|
9736
|
+
class F3 {
|
|
9737
9737
|
static address(t) {
|
|
9738
9738
|
return ((r) => {
|
|
9739
9739
|
const n = L1(r), i = io.getPublicKey(n, !1), s = rc(i.slice(1)).slice(-40);
|
|
@@ -9874,7 +9874,7 @@ var za = { exports: {} };
|
|
|
9874
9874
|
var L = new Uint8Array(32), b = new Uint8Array(32);
|
|
9875
9875
|
return R(L, T), R(b, C), _(L, 0, b, 0);
|
|
9876
9876
|
}
|
|
9877
|
-
function
|
|
9877
|
+
function F(T) {
|
|
9878
9878
|
var C = new Uint8Array(32);
|
|
9879
9879
|
return R(C, T), 1 & C[0];
|
|
9880
9880
|
}
|
|
@@ -9886,42 +9886,42 @@ var za = { exports: {} };
|
|
|
9886
9886
|
function V(T, C, L) {
|
|
9887
9887
|
for (var b = 0; b < 16; b++) T[b] = C[b] + L[b];
|
|
9888
9888
|
}
|
|
9889
|
-
function
|
|
9889
|
+
function D(T, C, L) {
|
|
9890
9890
|
for (var b = 0; b < 16; b++) T[b] = C[b] - L[b];
|
|
9891
9891
|
}
|
|
9892
9892
|
function U(T, C, L) {
|
|
9893
|
-
var b, M, H = 0, Z = 0, W = 0, q = 0, Y = 0, vt = 0, X = 0, ct = 0, _t = 0, nt = 0, ut = 0, St = 0, ot = 0, ht = 0, At = 0, it = 0, lt = 0, Lt = 0, at = 0, K = 0, Q = 0, st = 0, tt = 0, et = 0, rt = 0, Pt = 0, $t = 0, Bt = 0, Kt = 0, Qt = 0, Xt = 0, kt = L[0], Tt = L[1], Rt = L[2], Ot = L[3], xt = L[4], qt = L[5], Ht = L[6], me = L[7], ue = L[8],
|
|
9894
|
-
H += (b = C[0]) * kt, Z += b * Tt, W += b * Rt, q += b * Ot, Y += b * xt, vt += b * qt, X += b * Ht, ct += b * me, _t += b * ue, nt += b *
|
|
9893
|
+
var b, M, H = 0, Z = 0, W = 0, q = 0, Y = 0, vt = 0, X = 0, ct = 0, _t = 0, nt = 0, ut = 0, St = 0, ot = 0, ht = 0, At = 0, it = 0, lt = 0, Lt = 0, at = 0, K = 0, Q = 0, st = 0, tt = 0, et = 0, rt = 0, Pt = 0, $t = 0, Bt = 0, Kt = 0, Qt = 0, Xt = 0, kt = L[0], Tt = L[1], Rt = L[2], Ot = L[3], xt = L[4], qt = L[5], Ht = L[6], me = L[7], ue = L[8], ye = L[9], ve = L[10], xe = L[11], Ee = L[12], Ue = L[13], He = L[14], De = L[15];
|
|
9894
|
+
H += (b = C[0]) * kt, Z += b * Tt, W += b * Rt, q += b * Ot, Y += b * xt, vt += b * qt, X += b * Ht, ct += b * me, _t += b * ue, nt += b * ye, ut += b * ve, St += b * xe, ot += b * Ee, ht += b * Ue, At += b * He, it += b * De, Z += (b = C[1]) * kt, W += b * Tt, q += b * Rt, Y += b * Ot, vt += b * xt, X += b * qt, ct += b * Ht, _t += b * me, nt += b * ue, ut += b * ye, St += b * ve, ot += b * xe, ht += b * Ee, At += b * Ue, it += b * He, lt += b * De, W += (b = C[2]) * kt, q += b * Tt, Y += b * Rt, vt += b * Ot, X += b * xt, ct += b * qt, _t += b * Ht, nt += b * me, ut += b * ue, St += b * ye, ot += b * ve, ht += b * xe, At += b * Ee, it += b * Ue, lt += b * He, Lt += b * De, q += (b = C[3]) * kt, Y += b * Tt, vt += b * Rt, X += b * Ot, ct += b * xt, _t += b * qt, nt += b * Ht, ut += b * me, St += b * ue, ot += b * ye, ht += b * ve, At += b * xe, it += b * Ee, lt += b * Ue, Lt += b * He, at += b * De, Y += (b = C[4]) * kt, vt += b * Tt, X += b * Rt, ct += b * Ot, _t += b * xt, nt += b * qt, ut += b * Ht, St += b * me, ot += b * ue, ht += b * ye, At += b * ve, it += b * xe, lt += b * Ee, Lt += b * Ue, at += b * He, K += b * De, vt += (b = C[5]) * kt, X += b * Tt, ct += b * Rt, _t += b * Ot, nt += b * xt, ut += b * qt, St += b * Ht, ot += b * me, ht += b * ue, At += b * ye, it += b * ve, lt += b * xe, Lt += b * Ee, at += b * Ue, K += b * He, Q += b * De, X += (b = C[6]) * kt, ct += b * Tt, _t += b * Rt, nt += b * Ot, ut += b * xt, St += b * qt, ot += b * Ht, ht += b * me, At += b * ue, it += b * ye, lt += b * ve, Lt += b * xe, at += b * Ee, K += b * Ue, Q += b * He, st += b * De, ct += (b = C[7]) * kt, _t += b * Tt, nt += b * Rt, ut += b * Ot, St += b * xt, ot += b * qt, ht += b * Ht, At += b * me, it += b * ue, lt += b * ye, Lt += b * ve, at += b * xe, K += b * Ee, Q += b * Ue, st += b * He, tt += b * De, _t += (b = C[8]) * kt, nt += b * Tt, ut += b * Rt, St += b * Ot, ot += b * xt, ht += b * qt, At += b * Ht, it += b * me, lt += b * ue, Lt += b * ye, at += b * ve, K += b * xe, Q += b * Ee, st += b * Ue, tt += b * He, et += b * De, nt += (b = C[9]) * kt, ut += b * Tt, St += b * Rt, ot += b * Ot, ht += b * xt, At += b * qt, it += b * Ht, lt += b * me, Lt += b * ue, at += b * ye, K += b * ve, Q += b * xe, st += b * Ee, tt += b * Ue, et += b * He, rt += b * De, ut += (b = C[10]) * kt, St += b * Tt, ot += b * Rt, ht += b * Ot, At += b * xt, it += b * qt, lt += b * Ht, Lt += b * me, at += b * ue, K += b * ye, Q += b * ve, st += b * xe, tt += b * Ee, et += b * Ue, rt += b * He, Pt += b * De, St += (b = C[11]) * kt, ot += b * Tt, ht += b * Rt, At += b * Ot, it += b * xt, lt += b * qt, Lt += b * Ht, at += b * me, K += b * ue, Q += b * ye, st += b * ve, tt += b * xe, et += b * Ee, rt += b * Ue, Pt += b * He, $t += b * De, ot += (b = C[12]) * kt, ht += b * Tt, At += b * Rt, it += b * Ot, lt += b * xt, Lt += b * qt, at += b * Ht, K += b * me, Q += b * ue, st += b * ye, tt += b * ve, et += b * xe, rt += b * Ee, Pt += b * Ue, $t += b * He, Bt += b * De, ht += (b = C[13]) * kt, At += b * Tt, it += b * Rt, lt += b * Ot, Lt += b * xt, at += b * qt, K += b * Ht, Q += b * me, st += b * ue, tt += b * ye, et += b * ve, rt += b * xe, Pt += b * Ee, $t += b * Ue, Bt += b * He, Kt += b * De, At += (b = C[14]) * kt, it += b * Tt, lt += b * Rt, Lt += b * Ot, at += b * xt, K += b * qt, Q += b * Ht, st += b * me, tt += b * ue, et += b * ye, rt += b * ve, Pt += b * xe, $t += b * Ee, Bt += b * Ue, Kt += b * He, Qt += b * De, it += (b = C[15]) * kt, Z += 38 * (Lt += b * Rt), W += 38 * (at += b * Ot), q += 38 * (K += b * xt), Y += 38 * (Q += b * qt), vt += 38 * (st += b * Ht), X += 38 * (tt += b * me), ct += 38 * (et += b * ue), _t += 38 * (rt += b * ye), nt += 38 * (Pt += b * ve), ut += 38 * ($t += b * xe), St += 38 * (Bt += b * Ee), ot += 38 * (Kt += b * Ue), ht += 38 * (Qt += b * He), At += 38 * (Xt += b * De), H = (b = (H += 38 * (lt += b * Tt)) + (M = 1) + 65535) - 65536 * (M = Math.floor(b / 65536)), Z = (b = Z + M + 65535) - 65536 * (M = Math.floor(b / 65536)), W = (b = W + M + 65535) - 65536 * (M = Math.floor(b / 65536)), q = (b = q + M + 65535) - 65536 * (M = Math.floor(b / 65536)), Y = (b = Y + M + 65535) - 65536 * (M = Math.floor(b / 65536)), vt = (b = vt + M + 65535) - 65536 * (M = Math.floor(b / 65536)), X = (b = X + M + 65535) - 65536 * (M = Math.floor(b / 65536)), ct = (b = ct + M + 65535) - 65536 * (M = Math.floor(b / 65536)), _t = (b = _t + M + 65535) - 65536 * (M = Math.floor(b / 65536)), nt = (b = nt + M + 65535) - 65536 * (M = Math.floor(b / 65536)), ut = (b = ut + M + 65535) - 65536 * (M = Math.floor(b / 65536)), St = (b = St + M + 65535) - 65536 * (M = Math.floor(b / 65536)), ot = (b = ot + M + 65535) - 65536 * (M = Math.floor(b / 65536)), ht = (b = ht + M + 65535) - 65536 * (M = Math.floor(b / 65536)), At = (b = At + M + 65535) - 65536 * (M = Math.floor(b / 65536)), it = (b = it + M + 65535) - 65536 * (M = Math.floor(b / 65536)), H = (b = (H += M - 1 + 37 * (M - 1)) + (M = 1) + 65535) - 65536 * (M = Math.floor(b / 65536)), Z = (b = Z + M + 65535) - 65536 * (M = Math.floor(b / 65536)), W = (b = W + M + 65535) - 65536 * (M = Math.floor(b / 65536)), q = (b = q + M + 65535) - 65536 * (M = Math.floor(b / 65536)), Y = (b = Y + M + 65535) - 65536 * (M = Math.floor(b / 65536)), vt = (b = vt + M + 65535) - 65536 * (M = Math.floor(b / 65536)), X = (b = X + M + 65535) - 65536 * (M = Math.floor(b / 65536)), ct = (b = ct + M + 65535) - 65536 * (M = Math.floor(b / 65536)), _t = (b = _t + M + 65535) - 65536 * (M = Math.floor(b / 65536)), nt = (b = nt + M + 65535) - 65536 * (M = Math.floor(b / 65536)), ut = (b = ut + M + 65535) - 65536 * (M = Math.floor(b / 65536)), St = (b = St + M + 65535) - 65536 * (M = Math.floor(b / 65536)), ot = (b = ot + M + 65535) - 65536 * (M = Math.floor(b / 65536)), ht = (b = ht + M + 65535) - 65536 * (M = Math.floor(b / 65536)), At = (b = At + M + 65535) - 65536 * (M = Math.floor(b / 65536)), it = (b = it + M + 65535) - 65536 * (M = Math.floor(b / 65536)), H += M - 1 + 37 * (M - 1), T[0] = H, T[1] = Z, T[2] = W, T[3] = q, T[4] = Y, T[5] = vt, T[6] = X, T[7] = ct, T[8] = _t, T[9] = nt, T[10] = ut, T[11] = St, T[12] = ot, T[13] = ht, T[14] = At, T[15] = it;
|
|
9895
9895
|
}
|
|
9896
|
-
function
|
|
9896
|
+
function G(T, C) {
|
|
9897
9897
|
U(T, C, C);
|
|
9898
9898
|
}
|
|
9899
9899
|
function Nt(T, C) {
|
|
9900
9900
|
var L, b = t();
|
|
9901
9901
|
for (L = 0; L < 16; L++) b[L] = C[L];
|
|
9902
|
-
for (L = 253; L >= 0; L--)
|
|
9902
|
+
for (L = 253; L >= 0; L--) G(b, b), L !== 2 && L !== 4 && U(b, b, C);
|
|
9903
9903
|
for (L = 0; L < 16; L++) T[L] = b[L];
|
|
9904
9904
|
}
|
|
9905
9905
|
function dt(T, C) {
|
|
9906
9906
|
var L, b = t();
|
|
9907
9907
|
for (L = 0; L < 16; L++) b[L] = C[L];
|
|
9908
|
-
for (L = 250; L >= 0; L--)
|
|
9908
|
+
for (L = 250; L >= 0; L--) G(b, b), L !== 1 && U(b, b, C);
|
|
9909
9909
|
for (L = 0; L < 16; L++) T[L] = b[L];
|
|
9910
9910
|
}
|
|
9911
9911
|
function gt(T, C, L) {
|
|
9912
9912
|
var b, M, H = new Uint8Array(32), Z = new Float64Array(80), W = t(), q = t(), Y = t(), vt = t(), X = t(), ct = t();
|
|
9913
9913
|
for (M = 0; M < 31; M++) H[M] = C[M];
|
|
9914
9914
|
for (H[31] = 127 & C[31] | 64, H[0] &= 248, $(Z, L), M = 0; M < 16; M++) q[M] = Z[M], vt[M] = W[M] = Y[M] = 0;
|
|
9915
|
-
for (W[0] = vt[0] = 1, M = 254; M >= 0; --M) O(W, q, b = H[M >>> 3] >>> (7 & M) & 1), O(Y, vt, b), V(X, W, Y),
|
|
9915
|
+
for (W[0] = vt[0] = 1, M = 254; M >= 0; --M) O(W, q, b = H[M >>> 3] >>> (7 & M) & 1), O(Y, vt, b), V(X, W, Y), D(W, W, Y), V(Y, q, vt), D(q, q, vt), G(vt, X), G(ct, W), U(W, Y, W), U(Y, q, X), V(X, W, Y), D(W, W, Y), G(q, W), D(Y, vt, ct), U(W, Y, o), V(W, W, vt), U(Y, Y, W), U(W, vt, ct), U(vt, q, Z), G(q, X), O(W, q, b), O(Y, vt, b);
|
|
9916
9916
|
for (M = 0; M < 16; M++) Z[M + 16] = W[M], Z[M + 32] = Y[M], Z[M + 48] = q[M], Z[M + 64] = vt[M];
|
|
9917
9917
|
var _t = Z.subarray(32), nt = Z.subarray(16);
|
|
9918
9918
|
return Nt(_t, _t), U(nt, nt, _t), R(T, nt), 0;
|
|
9919
9919
|
}
|
|
9920
|
-
function
|
|
9920
|
+
function Ft(T, C) {
|
|
9921
9921
|
return gt(T, C, i);
|
|
9922
9922
|
}
|
|
9923
9923
|
function mt(T, C) {
|
|
9924
|
-
return r(C, 32),
|
|
9924
|
+
return r(C, 32), Ft(T, C);
|
|
9925
9925
|
}
|
|
9926
9926
|
function Mt(T, C, L) {
|
|
9927
9927
|
var b = new Uint8Array(32);
|
|
@@ -9956,10 +9956,10 @@ var za = { exports: {} };
|
|
|
9956
9956
|
};
|
|
9957
9957
|
var Zt = m, jt = l, oe = [1116352408, 3609767458, 1899447441, 602891725, 3049323471, 3964484399, 3921009573, 2173295548, 961987163, 4081628472, 1508970993, 3053834265, 2453635748, 2937671579, 2870763221, 3664609560, 3624381080, 2734883394, 310598401, 1164996542, 607225278, 1323610764, 1426881987, 3590304994, 1925078388, 4068182383, 2162078206, 991336113, 2614888103, 633803317, 3248222580, 3479774868, 3835390401, 2666613458, 4022224774, 944711139, 264347078, 2341262773, 604807628, 2007800933, 770255983, 1495990901, 1249150122, 1856431235, 1555081692, 3175218132, 1996064986, 2198950837, 2554220882, 3999719339, 2821834349, 766784016, 2952996808, 2566594879, 3210313671, 3203337956, 3336571891, 1034457026, 3584528711, 2466948901, 113926993, 3758326383, 338241895, 168717936, 666307205, 1188179964, 773529912, 1546045734, 1294757372, 1522805485, 1396182291, 2643833823, 1695183700, 2343527390, 1986661051, 1014477480, 2177026350, 1206759142, 2456956037, 344077627, 2730485921, 1290863460, 2820302411, 3158454273, 3259730800, 3505952657, 3345764771, 106217008, 3516065817, 3606008344, 3600352804, 1432725776, 4094571909, 1467031594, 275423344, 851169720, 430227734, 3100823752, 506948616, 1363258195, 659060556, 3750685593, 883997877, 3785050280, 958139571, 3318307427, 1322822218, 3812723403, 1537002063, 2003034995, 1747873779, 3602036899, 1955562222, 1575990012, 2024104815, 1125592928, 2227730452, 2716904306, 2361852424, 442776044, 2428436474, 593698344, 2756734187, 3733110249, 3204031479, 2999351573, 3329325298, 3815920427, 3391569614, 3928383900, 3515267271, 566280711, 3940187606, 3454069534, 4118630271, 4000239992, 116418474, 1914138554, 174292421, 2731055270, 289380356, 3203993006, 460393269, 320620315, 685471733, 587496836, 852142971, 1086792851, 1017036298, 365543100, 1126000580, 2618297676, 1288033470, 3409855158, 1501505948, 4234509866, 1607167915, 987167468, 1816402316, 1246189591];
|
|
9958
9958
|
function Qe(T, C, L, b) {
|
|
9959
|
-
for (var M, H, Z, W, q, Y, vt, X, ct, _t, nt, ut, St, ot, ht, At, it, lt, Lt, at, K, Q, st, tt, et, rt, Pt = new Int32Array(16), $t = new Int32Array(16), Bt = T[0], Kt = T[1], Qt = T[2], Xt = T[3], kt = T[4], Tt = T[5], Rt = T[6], Ot = T[7], xt = C[0], qt = C[1], Ht = C[2], me = C[3], ue = C[4],
|
|
9960
|
-
for (Lt = 0; Lt < 16; Lt++) at = 8 * Lt +
|
|
9961
|
-
for (Lt = 0; Lt < 80; Lt++) if (M = Bt, H = Kt, Z = Qt, W = Xt, q = kt, Y = Tt, vt = Rt, ct = xt, _t = qt, nt = Ht, ut = me, St = ue, ot =
|
|
9962
|
-
st = 65535 & (Q = xt), tt = Q >>> 16, et = 65535 & (K = Bt), rt = K >>> 16, K = T[0], tt += (Q = C[0]) >>> 16, et += 65535 & K, rt += K >>> 16, rt += (et += (tt += (st += 65535 & Q) >>> 16) >>> 16) >>> 16, T[0] = Bt = 65535 & et | rt << 16, C[0] = xt = 65535 & st | tt << 16, st = 65535 & (Q = qt), tt = Q >>> 16, et = 65535 & (K = Kt), rt = K >>> 16, K = T[1], tt += (Q = C[1]) >>> 16, et += 65535 & K, rt += K >>> 16, rt += (et += (tt += (st += 65535 & Q) >>> 16) >>> 16) >>> 16, T[1] = Kt = 65535 & et | rt << 16, C[1] = qt = 65535 & st | tt << 16, st = 65535 & (Q = Ht), tt = Q >>> 16, et = 65535 & (K = Qt), rt = K >>> 16, K = T[2], tt += (Q = C[2]) >>> 16, et += 65535 & K, rt += K >>> 16, rt += (et += (tt += (st += 65535 & Q) >>> 16) >>> 16) >>> 16, T[2] = Qt = 65535 & et | rt << 16, C[2] = Ht = 65535 & st | tt << 16, st = 65535 & (Q = me), tt = Q >>> 16, et = 65535 & (K = Xt), rt = K >>> 16, K = T[3], tt += (Q = C[3]) >>> 16, et += 65535 & K, rt += K >>> 16, rt += (et += (tt += (st += 65535 & Q) >>> 16) >>> 16) >>> 16, T[3] = Xt = 65535 & et | rt << 16, C[3] = me = 65535 & st | tt << 16, st = 65535 & (Q = ue), tt = Q >>> 16, et = 65535 & (K = kt), rt = K >>> 16, K = T[4], tt += (Q = C[4]) >>> 16, et += 65535 & K, rt += K >>> 16, rt += (et += (tt += (st += 65535 & Q) >>> 16) >>> 16) >>> 16, T[4] = kt = 65535 & et | rt << 16, C[4] = ue = 65535 & st | tt << 16, st = 65535 & (Q =
|
|
9959
|
+
for (var M, H, Z, W, q, Y, vt, X, ct, _t, nt, ut, St, ot, ht, At, it, lt, Lt, at, K, Q, st, tt, et, rt, Pt = new Int32Array(16), $t = new Int32Array(16), Bt = T[0], Kt = T[1], Qt = T[2], Xt = T[3], kt = T[4], Tt = T[5], Rt = T[6], Ot = T[7], xt = C[0], qt = C[1], Ht = C[2], me = C[3], ue = C[4], ye = C[5], ve = C[6], xe = C[7], Ee = 0; b >= 128; ) {
|
|
9960
|
+
for (Lt = 0; Lt < 16; Lt++) at = 8 * Lt + Ee, Pt[Lt] = L[at + 0] << 24 | L[at + 1] << 16 | L[at + 2] << 8 | L[at + 3], $t[Lt] = L[at + 4] << 24 | L[at + 5] << 16 | L[at + 6] << 8 | L[at + 7];
|
|
9961
|
+
for (Lt = 0; Lt < 80; Lt++) if (M = Bt, H = Kt, Z = Qt, W = Xt, q = kt, Y = Tt, vt = Rt, ct = xt, _t = qt, nt = Ht, ut = me, St = ue, ot = ye, ht = ve, st = 65535 & (Q = xe), tt = Q >>> 16, et = 65535 & (K = Ot), rt = K >>> 16, st += 65535 & (Q = (ue >>> 14 | kt << 18) ^ (ue >>> 18 | kt << 14) ^ (kt >>> 9 | ue << 23)), tt += Q >>> 16, et += 65535 & (K = (kt >>> 14 | ue << 18) ^ (kt >>> 18 | ue << 14) ^ (ue >>> 9 | kt << 23)), rt += K >>> 16, st += 65535 & (Q = ue & ye ^ ~ue & ve), tt += Q >>> 16, et += 65535 & (K = kt & Tt ^ ~kt & Rt), rt += K >>> 16, st += 65535 & (Q = oe[2 * Lt + 1]), tt += Q >>> 16, et += 65535 & (K = oe[2 * Lt]), rt += K >>> 16, K = Pt[Lt % 16], tt += (Q = $t[Lt % 16]) >>> 16, et += 65535 & K, rt += K >>> 16, et += (tt += (st += 65535 & Q) >>> 16) >>> 16, st = 65535 & (Q = lt = 65535 & st | tt << 16), tt = Q >>> 16, et = 65535 & (K = it = 65535 & et | (rt += et >>> 16) << 16), rt = K >>> 16, st += 65535 & (Q = (xt >>> 28 | Bt << 4) ^ (Bt >>> 2 | xt << 30) ^ (Bt >>> 7 | xt << 25)), tt += Q >>> 16, et += 65535 & (K = (Bt >>> 28 | xt << 4) ^ (xt >>> 2 | Bt << 30) ^ (xt >>> 7 | Bt << 25)), rt += K >>> 16, tt += (Q = xt & qt ^ xt & Ht ^ qt & Ht) >>> 16, et += 65535 & (K = Bt & Kt ^ Bt & Qt ^ Kt & Qt), rt += K >>> 16, X = 65535 & (et += (tt += (st += 65535 & Q) >>> 16) >>> 16) | (rt += et >>> 16) << 16, At = 65535 & st | tt << 16, st = 65535 & (Q = ut), tt = Q >>> 16, et = 65535 & (K = W), rt = K >>> 16, tt += (Q = lt) >>> 16, et += 65535 & (K = it), rt += K >>> 16, Kt = M, Qt = H, Xt = Z, kt = W = 65535 & (et += (tt += (st += 65535 & Q) >>> 16) >>> 16) | (rt += et >>> 16) << 16, Tt = q, Rt = Y, Ot = vt, Bt = X, qt = ct, Ht = _t, me = nt, ue = ut = 65535 & st | tt << 16, ye = St, ve = ot, xe = ht, xt = At, Lt % 16 == 15) for (at = 0; at < 16; at++) K = Pt[at], st = 65535 & (Q = $t[at]), tt = Q >>> 16, et = 65535 & K, rt = K >>> 16, K = Pt[(at + 9) % 16], st += 65535 & (Q = $t[(at + 9) % 16]), tt += Q >>> 16, et += 65535 & K, rt += K >>> 16, it = Pt[(at + 1) % 16], st += 65535 & (Q = ((lt = $t[(at + 1) % 16]) >>> 1 | it << 31) ^ (lt >>> 8 | it << 24) ^ (lt >>> 7 | it << 25)), tt += Q >>> 16, et += 65535 & (K = (it >>> 1 | lt << 31) ^ (it >>> 8 | lt << 24) ^ it >>> 7), rt += K >>> 16, it = Pt[(at + 14) % 16], tt += (Q = ((lt = $t[(at + 14) % 16]) >>> 19 | it << 13) ^ (it >>> 29 | lt << 3) ^ (lt >>> 6 | it << 26)) >>> 16, et += 65535 & (K = (it >>> 19 | lt << 13) ^ (lt >>> 29 | it << 3) ^ it >>> 6), rt += K >>> 16, rt += (et += (tt += (st += 65535 & Q) >>> 16) >>> 16) >>> 16, Pt[at] = 65535 & et | rt << 16, $t[at] = 65535 & st | tt << 16;
|
|
9962
|
+
st = 65535 & (Q = xt), tt = Q >>> 16, et = 65535 & (K = Bt), rt = K >>> 16, K = T[0], tt += (Q = C[0]) >>> 16, et += 65535 & K, rt += K >>> 16, rt += (et += (tt += (st += 65535 & Q) >>> 16) >>> 16) >>> 16, T[0] = Bt = 65535 & et | rt << 16, C[0] = xt = 65535 & st | tt << 16, st = 65535 & (Q = qt), tt = Q >>> 16, et = 65535 & (K = Kt), rt = K >>> 16, K = T[1], tt += (Q = C[1]) >>> 16, et += 65535 & K, rt += K >>> 16, rt += (et += (tt += (st += 65535 & Q) >>> 16) >>> 16) >>> 16, T[1] = Kt = 65535 & et | rt << 16, C[1] = qt = 65535 & st | tt << 16, st = 65535 & (Q = Ht), tt = Q >>> 16, et = 65535 & (K = Qt), rt = K >>> 16, K = T[2], tt += (Q = C[2]) >>> 16, et += 65535 & K, rt += K >>> 16, rt += (et += (tt += (st += 65535 & Q) >>> 16) >>> 16) >>> 16, T[2] = Qt = 65535 & et | rt << 16, C[2] = Ht = 65535 & st | tt << 16, st = 65535 & (Q = me), tt = Q >>> 16, et = 65535 & (K = Xt), rt = K >>> 16, K = T[3], tt += (Q = C[3]) >>> 16, et += 65535 & K, rt += K >>> 16, rt += (et += (tt += (st += 65535 & Q) >>> 16) >>> 16) >>> 16, T[3] = Xt = 65535 & et | rt << 16, C[3] = me = 65535 & st | tt << 16, st = 65535 & (Q = ue), tt = Q >>> 16, et = 65535 & (K = kt), rt = K >>> 16, K = T[4], tt += (Q = C[4]) >>> 16, et += 65535 & K, rt += K >>> 16, rt += (et += (tt += (st += 65535 & Q) >>> 16) >>> 16) >>> 16, T[4] = kt = 65535 & et | rt << 16, C[4] = ue = 65535 & st | tt << 16, st = 65535 & (Q = ye), tt = Q >>> 16, et = 65535 & (K = Tt), rt = K >>> 16, K = T[5], tt += (Q = C[5]) >>> 16, et += 65535 & K, rt += K >>> 16, rt += (et += (tt += (st += 65535 & Q) >>> 16) >>> 16) >>> 16, T[5] = Tt = 65535 & et | rt << 16, C[5] = ye = 65535 & st | tt << 16, st = 65535 & (Q = ve), tt = Q >>> 16, et = 65535 & (K = Rt), rt = K >>> 16, K = T[6], tt += (Q = C[6]) >>> 16, et += 65535 & K, rt += K >>> 16, rt += (et += (tt += (st += 65535 & Q) >>> 16) >>> 16) >>> 16, T[6] = Rt = 65535 & et | rt << 16, C[6] = ve = 65535 & st | tt << 16, st = 65535 & (Q = xe), tt = Q >>> 16, et = 65535 & (K = Ot), rt = K >>> 16, K = T[7], tt += (Q = C[7]) >>> 16, et += 65535 & K, rt += K >>> 16, rt += (et += (tt += (st += 65535 & Q) >>> 16) >>> 16) >>> 16, T[7] = Ot = 65535 & et | rt << 16, C[7] = xe = 65535 & st | tt << 16, Ee += 128, b -= 128;
|
|
9963
9963
|
}
|
|
9964
9964
|
return b;
|
|
9965
9965
|
}
|
|
@@ -9971,7 +9971,7 @@ var za = { exports: {} };
|
|
|
9971
9971
|
}
|
|
9972
9972
|
function ee(T, C) {
|
|
9973
9973
|
var L = t(), b = t(), M = t(), H = t(), Z = t(), W = t(), q = t(), Y = t(), vt = t();
|
|
9974
|
-
|
|
9974
|
+
D(L, T[1], T[0]), D(vt, C[1], C[0]), U(L, L, vt), V(b, T[0], T[1]), V(vt, C[0], C[1]), U(b, b, vt), U(M, T[3], C[3]), U(M, M, f), U(H, T[2], C[2]), V(H, H, H), D(Z, b, L), D(W, H, M), V(q, H, M), V(Y, b, L), U(T[0], Z, W), U(T[1], Y, q), U(T[2], q, W), U(T[3], Z, Y);
|
|
9975
9975
|
}
|
|
9976
9976
|
function zr(T, C, L) {
|
|
9977
9977
|
var b;
|
|
@@ -9979,7 +9979,7 @@ var za = { exports: {} };
|
|
|
9979
9979
|
}
|
|
9980
9980
|
function ae(T, C) {
|
|
9981
9981
|
var L = t(), b = t(), M = t();
|
|
9982
|
-
Nt(M, C[2]), U(L, C[0], M), U(b, C[1], M), R(T, b), T[31] ^=
|
|
9982
|
+
Nt(M, C[2]), U(L, C[0], M), U(b, C[1], M), R(T, b), T[31] ^= F(L) << 7;
|
|
9983
9983
|
}
|
|
9984
9984
|
function Vt(T, C, L) {
|
|
9985
9985
|
var b, M;
|
|
@@ -10027,7 +10027,7 @@ var za = { exports: {} };
|
|
|
10027
10027
|
var M, H = new Uint8Array(32), Z = new Uint8Array(64), W = [t(), t(), t(), t()], q = [t(), t(), t(), t()];
|
|
10028
10028
|
if (L < 64 || function(Y, vt) {
|
|
10029
10029
|
var X = t(), ct = t(), _t = t(), nt = t(), ut = t(), St = t(), ot = t();
|
|
10030
|
-
return g(Y[2], a), $(Y[1], vt),
|
|
10030
|
+
return g(Y[2], a), $(Y[1], vt), G(_t, Y[1]), U(nt, _t, c), D(_t, _t, Y[2]), V(nt, Y[2], nt), G(ut, nt), G(St, ut), U(ot, St, ut), U(X, ot, _t), U(X, X, nt), dt(X, X), U(X, X, _t), U(X, X, nt), U(X, X, nt), U(Y[0], X, nt), G(ct, Y[0]), U(ct, ct, nt), j(ct, _t) && U(Y[0], Y[0], w), G(ct, Y[0]), U(ct, ct, nt), j(ct, _t) ? -1 : (F(Y[0]) === vt[31] >> 7 && D(Y[0], s, Y[0]), U(Y[3], Y[0], Y[1]), 0);
|
|
10031
10031
|
}(q, b)) return -1;
|
|
10032
10032
|
for (M = 0; M < L; M++) T[M] = C[M];
|
|
10033
10033
|
for (M = 0; M < 32; M++) T[M + 32] = b[M];
|
|
@@ -10043,43 +10043,43 @@ var za = { exports: {} };
|
|
|
10043
10043
|
if (T.length !== 32) throw new Error("bad key size");
|
|
10044
10044
|
if (C.length !== 24) throw new Error("bad nonce size");
|
|
10045
10045
|
}
|
|
10046
|
-
function
|
|
10046
|
+
function Me() {
|
|
10047
10047
|
for (var T = 0; T < arguments.length; T++) if (!(arguments[T] instanceof Uint8Array)) throw new TypeError("unexpected type, use Uint8Array");
|
|
10048
10048
|
}
|
|
10049
10049
|
function he(T) {
|
|
10050
10050
|
for (var C = 0; C < T.length; C++) T[C] = 0;
|
|
10051
10051
|
}
|
|
10052
|
-
e.lowlevel = { crypto_core_hsalsa20: A, crypto_stream_xor: B, crypto_stream: z, crypto_stream_salsa20_xor: I, crypto_stream_salsa20: N, crypto_onetimeauth: h, crypto_onetimeauth_verify: y, crypto_verify_16: E, crypto_verify_32: _, crypto_secretbox: m, crypto_secretbox_open: l, crypto_scalarmult: gt, crypto_scalarmult_base:
|
|
10052
|
+
e.lowlevel = { crypto_core_hsalsa20: A, crypto_stream_xor: B, crypto_stream: z, crypto_stream_salsa20_xor: I, crypto_stream_salsa20: N, crypto_onetimeauth: h, crypto_onetimeauth_verify: y, crypto_verify_16: E, crypto_verify_32: _, crypto_secretbox: m, crypto_secretbox_open: l, crypto_scalarmult: gt, crypto_scalarmult_base: Ft, crypto_box_beforenm: Mt, crypto_box_afternm: Zt, crypto_box: function(T, C, L, b, M, H) {
|
|
10053
10053
|
var Z = new Uint8Array(32);
|
|
10054
10054
|
return Mt(Z, M, H), Zt(T, C, L, b, Z);
|
|
10055
10055
|
}, crypto_box_open: function(T, C, L, b, M, H) {
|
|
10056
10056
|
var Z = new Uint8Array(32);
|
|
10057
10057
|
return Mt(Z, M, H), jt(T, C, L, b, Z);
|
|
10058
|
-
}, crypto_box_keypair: mt, crypto_hash: Yt, crypto_sign: de, crypto_sign_keypair: ie, crypto_sign_open: Yr, crypto_secretbox_KEYBYTES: 32, crypto_secretbox_NONCEBYTES: 24, crypto_secretbox_ZEROBYTES: 32, crypto_secretbox_BOXZEROBYTES: fe, crypto_scalarmult_BYTES: 32, crypto_scalarmult_SCALARBYTES: 32, crypto_box_PUBLICKEYBYTES: 32, crypto_box_SECRETKEYBYTES: 32, crypto_box_BEFORENMBYTES: 32, crypto_box_NONCEBYTES: 24, crypto_box_ZEROBYTES: 32, crypto_box_BOXZEROBYTES: 16, crypto_sign_BYTES: re, crypto_sign_PUBLICKEYBYTES: $e, crypto_sign_SECRETKEYBYTES: ne, crypto_sign_SEEDBYTES: 32, crypto_hash_BYTES: 64, gf: t, D: c, L: ce, pack25519: R, unpack25519: $, M: U, A: V, S:
|
|
10058
|
+
}, crypto_box_keypair: mt, crypto_hash: Yt, crypto_sign: de, crypto_sign_keypair: ie, crypto_sign_open: Yr, crypto_secretbox_KEYBYTES: 32, crypto_secretbox_NONCEBYTES: 24, crypto_secretbox_ZEROBYTES: 32, crypto_secretbox_BOXZEROBYTES: fe, crypto_scalarmult_BYTES: 32, crypto_scalarmult_SCALARBYTES: 32, crypto_box_PUBLICKEYBYTES: 32, crypto_box_SECRETKEYBYTES: 32, crypto_box_BEFORENMBYTES: 32, crypto_box_NONCEBYTES: 24, crypto_box_ZEROBYTES: 32, crypto_box_BOXZEROBYTES: 16, crypto_sign_BYTES: re, crypto_sign_PUBLICKEYBYTES: $e, crypto_sign_SECRETKEYBYTES: ne, crypto_sign_SEEDBYTES: 32, crypto_hash_BYTES: 64, gf: t, D: c, L: ce, pack25519: R, unpack25519: $, M: U, A: V, S: G, Z: D, pow2523: dt, add: ee, set25519: g, modL: jr, scalarmult: Vt, scalarbase: Ke }, e.randomBytes = function(T) {
|
|
10059
10059
|
var C = new Uint8Array(T);
|
|
10060
10060
|
return r(C, T), C;
|
|
10061
10061
|
}, e.secretbox = function(T, C, L) {
|
|
10062
|
-
|
|
10062
|
+
Me(T, C, L), pe(L, C);
|
|
10063
10063
|
for (var b = new Uint8Array(32 + T.length), M = new Uint8Array(b.length), H = 0; H < T.length; H++) b[H + 32] = T[H];
|
|
10064
10064
|
return m(M, b, b.length, C, L), M.subarray(fe);
|
|
10065
10065
|
}, e.secretbox.open = function(T, C, L) {
|
|
10066
|
-
|
|
10066
|
+
Me(T, C, L), pe(L, C);
|
|
10067
10067
|
for (var b = new Uint8Array(fe + T.length), M = new Uint8Array(b.length), H = 0; H < T.length; H++) b[H + fe] = T[H];
|
|
10068
10068
|
return b.length < 32 || l(M, b, b.length, C, L) !== 0 ? null : M.subarray(32);
|
|
10069
10069
|
}, e.secretbox.keyLength = 32, e.secretbox.nonceLength = 24, e.secretbox.overheadLength = fe, e.scalarMult = function(T, C) {
|
|
10070
|
-
if (
|
|
10070
|
+
if (Me(T, C), T.length !== 32) throw new Error("bad n size");
|
|
10071
10071
|
if (C.length !== 32) throw new Error("bad p size");
|
|
10072
10072
|
var L = new Uint8Array(32);
|
|
10073
10073
|
return gt(L, T, C), L;
|
|
10074
10074
|
}, e.scalarMult.base = function(T) {
|
|
10075
|
-
if (
|
|
10075
|
+
if (Me(T), T.length !== 32) throw new Error("bad n size");
|
|
10076
10076
|
var C = new Uint8Array(32);
|
|
10077
|
-
return
|
|
10077
|
+
return Ft(C, T), C;
|
|
10078
10078
|
}, e.scalarMult.scalarLength = 32, e.scalarMult.groupElementLength = 32, e.box = function(T, C, L, b) {
|
|
10079
10079
|
var M = e.box.before(L, b);
|
|
10080
10080
|
return e.secretbox(T, C, M);
|
|
10081
10081
|
}, e.box.before = function(T, C) {
|
|
10082
|
-
|
|
10082
|
+
Me(T, C), function(b, M) {
|
|
10083
10083
|
if (b.length !== 32) throw new Error("bad public key size");
|
|
10084
10084
|
if (M.length !== 32) throw new Error("bad secret key size");
|
|
10085
10085
|
}(T, C);
|
|
@@ -10092,15 +10092,15 @@ var za = { exports: {} };
|
|
|
10092
10092
|
var T = new Uint8Array(32), C = new Uint8Array(32);
|
|
10093
10093
|
return mt(T, C), { publicKey: T, secretKey: C };
|
|
10094
10094
|
}, e.box.keyPair.fromSecretKey = function(T) {
|
|
10095
|
-
if (
|
|
10095
|
+
if (Me(T), T.length !== 32) throw new Error("bad secret key size");
|
|
10096
10096
|
var C = new Uint8Array(32);
|
|
10097
|
-
return
|
|
10097
|
+
return Ft(C, T), { publicKey: C, secretKey: new Uint8Array(T) };
|
|
10098
10098
|
}, e.box.publicKeyLength = 32, e.box.secretKeyLength = 32, e.box.sharedKeyLength = 32, e.box.nonceLength = 24, e.box.overheadLength = e.secretbox.overheadLength, e.sign = function(T, C) {
|
|
10099
|
-
if (
|
|
10099
|
+
if (Me(T, C), C.length !== ne) throw new Error("bad secret key size");
|
|
10100
10100
|
var L = new Uint8Array(re + T.length);
|
|
10101
10101
|
return de(L, T, T.length, C), L;
|
|
10102
10102
|
}, e.sign.open = function(T, C) {
|
|
10103
|
-
if (
|
|
10103
|
+
if (Me(T, C), C.length !== $e) throw new Error("bad public key size");
|
|
10104
10104
|
var L = new Uint8Array(T.length), b = Yr(L, T, T.length, C);
|
|
10105
10105
|
if (b < 0) return null;
|
|
10106
10106
|
for (var M = new Uint8Array(b), H = 0; H < M.length; H++) M[H] = L[H];
|
|
@@ -10109,7 +10109,7 @@ var za = { exports: {} };
|
|
|
10109
10109
|
for (var L = e.sign(T, C), b = new Uint8Array(re), M = 0; M < b.length; M++) b[M] = L[M];
|
|
10110
10110
|
return b;
|
|
10111
10111
|
}, e.sign.detached.verify = function(T, C, L) {
|
|
10112
|
-
if (
|
|
10112
|
+
if (Me(T, C, L), C.length !== re) throw new Error("bad signature size");
|
|
10113
10113
|
if (L.length !== $e) throw new Error("bad public key size");
|
|
10114
10114
|
var b, M = new Uint8Array(re + T.length), H = new Uint8Array(re + T.length);
|
|
10115
10115
|
for (b = 0; b < re; b++) M[b] = C[b];
|
|
@@ -10119,19 +10119,19 @@ var za = { exports: {} };
|
|
|
10119
10119
|
var T = new Uint8Array($e), C = new Uint8Array(ne);
|
|
10120
10120
|
return ie(T, C), { publicKey: T, secretKey: C };
|
|
10121
10121
|
}, e.sign.keyPair.fromSecretKey = function(T) {
|
|
10122
|
-
if (
|
|
10122
|
+
if (Me(T), T.length !== ne) throw new Error("bad secret key size");
|
|
10123
10123
|
for (var C = new Uint8Array($e), L = 0; L < C.length; L++) C[L] = T[32 + L];
|
|
10124
10124
|
return { publicKey: C, secretKey: new Uint8Array(T) };
|
|
10125
10125
|
}, e.sign.keyPair.fromSeed = function(T) {
|
|
10126
|
-
if (
|
|
10126
|
+
if (Me(T), T.length !== 32) throw new Error("bad seed size");
|
|
10127
10127
|
for (var C = new Uint8Array($e), L = new Uint8Array(ne), b = 0; b < 32; b++) L[b] = T[b];
|
|
10128
10128
|
return ie(C, L, !0), { publicKey: C, secretKey: L };
|
|
10129
10129
|
}, e.sign.publicKeyLength = $e, e.sign.secretKeyLength = ne, e.sign.seedLength = 32, e.sign.signatureLength = re, e.hash = function(T) {
|
|
10130
|
-
|
|
10130
|
+
Me(T);
|
|
10131
10131
|
var C = new Uint8Array(64);
|
|
10132
10132
|
return Yt(C, T, T.length), C;
|
|
10133
10133
|
}, e.hash.hashLength = 64, e.verify = function(T, C) {
|
|
10134
|
-
return
|
|
10134
|
+
return Me(T, C), T.length !== 0 && C.length !== 0 && T.length === C.length && S(T, 0, C, 0, T.length) === 0;
|
|
10135
10135
|
}, e.setPRNG = function(T) {
|
|
10136
10136
|
r = T;
|
|
10137
10137
|
}, function() {
|
|
@@ -10141,7 +10141,7 @@ var za = { exports: {} };
|
|
|
10141
10141
|
for (b = 0; b < L; b += 65536) T.getRandomValues(M.subarray(b, b + Math.min(L - b, 65536)));
|
|
10142
10142
|
for (b = 0; b < L; b++) C[b] = M[b];
|
|
10143
10143
|
he(M);
|
|
10144
|
-
}) : Tf !== void 0 && (T =
|
|
10144
|
+
}) : Tf !== void 0 && (T = Ds) && T.randomBytes && e.setPRNG(function(C, L) {
|
|
10145
10145
|
var b, M = T.randomBytes(L);
|
|
10146
10146
|
for (b = 0; b < L; b++) C[b] = M[b];
|
|
10147
10147
|
he(M);
|
|
@@ -10181,7 +10181,7 @@ const _i = di(za.exports), We = new class {
|
|
|
10181
10181
|
return We.string(e);
|
|
10182
10182
|
}
|
|
10183
10183
|
crypto(e, t) {
|
|
10184
|
-
return
|
|
10184
|
+
return Se[e](t).toString(Se.enc.Hex);
|
|
10185
10185
|
}
|
|
10186
10186
|
hash(e) {
|
|
10187
10187
|
return this.crypto("SHA256", this.string(e));
|
|
@@ -10234,7 +10234,7 @@ const _i = di(za.exports), We = new class {
|
|
|
10234
10234
|
}
|
|
10235
10235
|
xphereVerify(e, t, r, n, i) {
|
|
10236
10236
|
let s = !1;
|
|
10237
|
-
return i === "xphere" || i === "saseul" ? s = js.signatureValidity(e, t, r) : i !== "v2xphere" && i !== "v3xphere" && i !== "binance" && i !== "ethereum" || (s =
|
|
10237
|
+
return i === "xphere" || i === "saseul" ? s = js.signatureValidity(e, t, r) : i !== "v2xphere" && i !== "v3xphere" && i !== "binance" && i !== "ethereum" || (s = F3.signatureValidity(e, n, r)), s;
|
|
10238
10238
|
}
|
|
10239
10239
|
generateKeys() {
|
|
10240
10240
|
const e = this.ec.genKeyPair();
|
|
@@ -10247,15 +10247,15 @@ const _i = di(za.exports), We = new class {
|
|
|
10247
10247
|
return this.ec.keyFromPublic(r, "hex").verify(e, t);
|
|
10248
10248
|
}
|
|
10249
10249
|
encrypt(e, t) {
|
|
10250
|
-
return
|
|
10250
|
+
return Se.AES.encrypt(e, t).toString();
|
|
10251
10251
|
}
|
|
10252
10252
|
decrypt(e, t) {
|
|
10253
|
-
return
|
|
10253
|
+
return Se.AES.decrypt(e, t).toString(Se.enc.Utf8);
|
|
10254
10254
|
}
|
|
10255
10255
|
generateNonce(e) {
|
|
10256
|
-
return
|
|
10256
|
+
return Se.lib.WordArray.random(e).toString(Se.enc.Hex);
|
|
10257
10257
|
}
|
|
10258
|
-
}(), Z3 = process.env.NEXT_PUBLIC_SOCKET_ENCRYPTED_URL || "
|
|
10258
|
+
}(), Z3 = process.env.NEXT_PUBLIC_SOCKET_ENCRYPTED_URL || "U2FsdGVkX1/AwMMZnNr4G2NTST+dY/+I4t4uQ1N+lRMGO+z74ea5JnDKHURuFYuo", V3 = process.env.NEXT_PUBLIC_SOCKET_KEY || "040b379acb21f6ee7c162051a8cca5eee45ad330362fe721d55d81e8c1a4ed44ce4d4fcf7afe6311056fe4677773bd2cf5df4c6ce13795a69b70ef3762b5445687", q1 = li.decrypt(Z3, V3);
|
|
10259
10259
|
if (!q1) throw new Error("VITE_SOCKET_URL 환경 변수가 설정되지 않았습니다.");
|
|
10260
10260
|
const wn = class wn {
|
|
10261
10261
|
constructor() {
|
|
@@ -10378,25 +10378,25 @@ const yt = new class {
|
|
|
10378
10378
|
};
|
|
10379
10379
|
}, [e, t, r, n]);
|
|
10380
10380
|
}, K3 = li.generateNonce(4), W3 = Date.now();
|
|
10381
|
-
let
|
|
10382
|
-
const
|
|
10381
|
+
let Jd = !1;
|
|
10382
|
+
const be = (e, t = "") => {
|
|
10383
10383
|
if (typeof document > "u") return;
|
|
10384
10384
|
const r = `[dl] +${Date.now() - W3}ms ${e} | vis=${document.visibilityState} focus=${document.hasFocus()} ${t} load=${K3}`;
|
|
10385
10385
|
console.log(r.replace(/\s+/g, " ").trim());
|
|
10386
10386
|
}, pn = (e, t, r) => {
|
|
10387
10387
|
e.addEventListener(t, r);
|
|
10388
10388
|
}, Y3 = () => {
|
|
10389
|
-
if (
|
|
10390
|
-
|
|
10389
|
+
if (Jd || typeof window > "u") return;
|
|
10390
|
+
Jd = !0, be("probes-installed", `navType=${(() => {
|
|
10391
10391
|
try {
|
|
10392
10392
|
const t = performance.getEntriesByType("navigation")[0];
|
|
10393
10393
|
return (t == null ? void 0 : t.type) ?? "unknown";
|
|
10394
10394
|
} catch {
|
|
10395
10395
|
return "unknown";
|
|
10396
10396
|
}
|
|
10397
|
-
})()}`), pn(document, "visibilitychange", () =>
|
|
10397
|
+
})()}`), pn(document, "visibilitychange", () => be("visibilitychange")), pn(window, "pageshow", (t) => be("pageshow", `persisted=${t.persisted}`)), pn(window, "pagehide", (t) => be("pagehide", `persisted=${t.persisted}`)), pn(window, "focus", () => be("focus")), pn(window, "blur", () => be("blur")), pn(document, "freeze", () => be("freeze")), pn(document, "resume", () => be("resume"));
|
|
10398
10398
|
const e = $s.getInstance().socket;
|
|
10399
|
-
e.on("connect", () =>
|
|
10399
|
+
e.on("connect", () => be("socket:connect", `id=${e.id}`)), e.on("disconnect", (t) => be("socket:disconnect", `reason=${t}`)), e.io.on("reconnect_attempt", (t) => be("socket:reconnect_attempt", `n=${t}`)), e.io.on("reconnect", (t) => be("socket:reconnect", `n=${t}`)), e.io.on("reconnect_error", () => be("socket:reconnect_error"));
|
|
10400
10400
|
}, ja = "deeplink:resume:", Oo = (e) => `${ja}${e}`, rn = new class {
|
|
10401
10401
|
register(e, t) {
|
|
10402
10402
|
yt.registerMessage(e, t);
|
|
@@ -10405,7 +10405,7 @@ const Ce = (e, t = "") => {
|
|
|
10405
10405
|
yt.joinRoom(e), yt.resumeRoom(e);
|
|
10406
10406
|
}
|
|
10407
10407
|
snapshotSave(e) {
|
|
10408
|
-
typeof localStorage < "u" && localStorage.setItem(Oo(e.roomId), JSON.stringify(e));
|
|
10408
|
+
typeof localStorage < "u" && (localStorage.setItem(Oo(e.roomId), JSON.stringify(e)), be("snapshot:save", `room=${e.roomId.slice(0, 8)}`));
|
|
10409
10409
|
}
|
|
10410
10410
|
snapshotLoad(e) {
|
|
10411
10411
|
if (typeof localStorage > "u") return null;
|
|
@@ -10418,7 +10418,7 @@ const Ce = (e, t = "") => {
|
|
|
10418
10418
|
}
|
|
10419
10419
|
}
|
|
10420
10420
|
snapshotClear(e) {
|
|
10421
|
-
typeof localStorage < "u" && localStorage.removeItem(Oo(e));
|
|
10421
|
+
typeof localStorage < "u" && (localStorage.removeItem(Oo(e)), be("snapshot:clear", `room=${e.slice(0, 8)}`), console.trace("[dl] snapshot:clear caller"));
|
|
10422
10422
|
}
|
|
10423
10423
|
snapshotClearAll() {
|
|
10424
10424
|
if (typeof localStorage > "u") return;
|
|
@@ -10427,7 +10427,7 @@ const Ce = (e, t = "") => {
|
|
|
10427
10427
|
const r = localStorage.key(t);
|
|
10428
10428
|
r && r.startsWith(ja) && e.push(r);
|
|
10429
10429
|
}
|
|
10430
|
-
e.forEach((t) => localStorage.removeItem(t));
|
|
10430
|
+
e.forEach((t) => localStorage.removeItem(t)), be("snapshot:clearAll", `count=${e.length}`), console.trace("[dl] snapshot:clearAll caller");
|
|
10431
10431
|
}
|
|
10432
10432
|
snapshotLoadAnyPending(e = Date.now(), t = 3e5) {
|
|
10433
10433
|
if (typeof localStorage > "u") return null;
|
|
@@ -10463,13 +10463,15 @@ const Ce = (e, t = "") => {
|
|
|
10463
10463
|
const p = hr(!1), w = hr(0), v = hr(!1);
|
|
10464
10464
|
tr(() => {
|
|
10465
10465
|
if (!o || !e || !pi.isMobile()) return;
|
|
10466
|
-
if (Y3(),
|
|
10466
|
+
if (Y3(), be("resume-hook-mount", `roomId=${e.slice(0, 8)} resumeFromReload=${c} pendingSnap=${rn.snapshotLoadAnyPending() ? "y" : "n"}`), !c && !p.current) {
|
|
10467
10467
|
p.current = !0, rn.snapshotSave(((z, B, d) => ({ roomId: z, type: d, status: "pending", nonce: B, startedAt: Date.now() }))(e, t, r));
|
|
10468
10468
|
const N = { roomId: e, type: r, payload: n, nonce: t, ttl: a };
|
|
10469
10469
|
rn.register(e, N);
|
|
10470
10470
|
}
|
|
10471
10471
|
const S = (N) => {
|
|
10472
|
-
|
|
10472
|
+
const z = N.result;
|
|
10473
|
+
if (be("handleResult", `status=${N.status} hasAddr=${!!(z != null && z.address)} keys=${z ? Object.keys(z).join("|") : "none"}`), v.current) return void be("result:duplicate-ignored");
|
|
10474
|
+
f.current(N) ? (v.current = !0, rn.snapshotClear(e), be("result:delivered")) : be("result:ignored-kept-snapshot");
|
|
10473
10475
|
}, E = /* @__PURE__ */ ((N) => N === "sendTransaction" ? "completeSendTransaction" : N === "payment" ? "transactionInfo" : N === "provide" ? "addressProvide" : "completeMessage")(r);
|
|
10474
10476
|
yt.onMessageReceived(E, (N) => {
|
|
10475
10477
|
S({ status: "SUCCESS", result: N });
|
|
@@ -10479,10 +10481,10 @@ const Ce = (e, t = "") => {
|
|
|
10479
10481
|
const B = z ? "visible" : (d = document.visibilityState, h = document.hasFocus(), d === "visible" || h ? "visible" : d);
|
|
10480
10482
|
var d, h;
|
|
10481
10483
|
const y = rn.snapshotLoad(e), m = ((g, x, O = Date.now(), R = 3e5) => g && g.status === "pending" ? x !== "visible" ? "noop" : O - g.startedAt >= R ? "timeout" : "resume" : "noop")(y, B, Date.now(), a);
|
|
10482
|
-
if (
|
|
10484
|
+
if (be("handleResume", `by=${N} fg=${B} snap=${y ? "y" : "n"} action=${m}`), m === "resume") {
|
|
10483
10485
|
const g = Date.now();
|
|
10484
|
-
if (!z && g - w.current < 1e3) return void
|
|
10485
|
-
w.current = g, (l = u.current) == null || l.call(u), rn.resume(e),
|
|
10486
|
+
if (!z && g - w.current < 1e3) return void be("resume:deduped", `by=${N}`);
|
|
10487
|
+
w.current = g, (l = u.current) == null || l.call(u), rn.resume(e), be("resume:fired", `by=${N} roomId=${e.slice(0, 8)}`);
|
|
10486
10488
|
} else m === "timeout" && S({ status: "TIMEOUT" });
|
|
10487
10489
|
}, k = () => {
|
|
10488
10490
|
document.visibilityState === "visible" && _("visibilitychange");
|
|
@@ -10494,7 +10496,7 @@ const Ce = (e, t = "") => {
|
|
|
10494
10496
|
}, On = "userInfo", ti = "YYYY-MM-DD HH:mm:ss", Q3 = () => {
|
|
10495
10497
|
typeof window < "u" && (localStorage.removeItem(On), rn.snapshotClearAll());
|
|
10496
10498
|
}, s5 = () => {
|
|
10497
|
-
const [e, t] =
|
|
10499
|
+
const [e, t] = Te(!1), [r, n] = Te(void 0), [i, s] = Te(void 0);
|
|
10498
10500
|
return tr(() => {
|
|
10499
10501
|
if (typeof window < "u") {
|
|
10500
10502
|
t(!0);
|
|
@@ -10512,29 +10514,29 @@ const Ce = (e, t = "") => {
|
|
|
10512
10514
|
}, [r]), { userInfo: { address: (r == null ? void 0 : r.address) ?? void 0, network: (r == null ? void 0 : r.network) ?? void 0, nickName: (r == null ? void 0 : r.nickName) ?? void 0, token: (r == null ? void 0 : r.token) ?? void 0, issuedDateTime: (r == null ? void 0 : r.issuedDateTime) ?? void 0, expireDateTime: i }, logout: () => {
|
|
10513
10515
|
Q3(), n(void 0);
|
|
10514
10516
|
}, isWindowLoaded: e };
|
|
10515
|
-
},
|
|
10517
|
+
}, J3 = new class {
|
|
10516
10518
|
base64url(e) {
|
|
10517
|
-
return
|
|
10519
|
+
return Se.enc.Base64.stringify(Se.enc.Utf8.parse(e)).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
10518
10520
|
}
|
|
10519
10521
|
createToken(e, t) {
|
|
10520
10522
|
return `${this.base64url(JSON.stringify({ type: "token", alg: "XPSIG" }))}.${this.base64url(JSON.stringify(e))}.${t}`;
|
|
10521
10523
|
}
|
|
10522
10524
|
verifyToken(e) {
|
|
10523
|
-
const [t, r, n] = e.split("."), i = JSON.parse(
|
|
10525
|
+
const [t, r, n] = e.split("."), i = JSON.parse(Se.enc.Utf8.stringify(Se.enc.Base64.parse(r)));
|
|
10524
10526
|
if (li.xphereVerify(i.message, i.publicKey, n, i.address, i.network)) return i;
|
|
10525
10527
|
throw new Error("Invalid token");
|
|
10526
10528
|
}
|
|
10527
10529
|
getAddress(e) {
|
|
10528
10530
|
return js.address(e);
|
|
10529
10531
|
}
|
|
10530
|
-
}(), uc = { Enc: Ei, Sign: js, Util: We, Validation:
|
|
10532
|
+
}(), uc = { Enc: Ei, Sign: js, Util: We, Validation: J3 }, U1 = (e, t, r, n) => {
|
|
10531
10533
|
if (e.token || !e.signature) return;
|
|
10532
10534
|
const i = `${t}
|
|
10533
10535
|
|
|
10534
10536
|
Nonce: ${r}`;
|
|
10535
10537
|
e.token = uc.Validation.createToken({ message: i }, e.signature), e.issuedDateTime = Yn().format(ti), e.expire = n && n.type !== "NONE" ? { type: n.type, seconds: n.seconds ?? 0 } : { type: "NONE" };
|
|
10536
10538
|
}, so = (e, t) => {
|
|
10537
|
-
const [r] =
|
|
10539
|
+
const [r] = Te(() => {
|
|
10538
10540
|
if (e) {
|
|
10539
10541
|
const s = rn.snapshotLoadAnyPending();
|
|
10540
10542
|
if (s) return { roomId: s.roomId, nonce: s.nonce, qrCode: "", resumeFromReload: !0 };
|
|
@@ -10544,7 +10546,7 @@ Nonce: ${r}`;
|
|
|
10544
10546
|
});
|
|
10545
10547
|
return r;
|
|
10546
10548
|
}, mi = (e, t) => {
|
|
10547
|
-
const [r, n] =
|
|
10549
|
+
const [r, n] = Te(!0);
|
|
10548
10550
|
return tr(() => {
|
|
10549
10551
|
const i = setTimeout(() => {
|
|
10550
10552
|
yt.leaveRoom(e), n(!1);
|
|
@@ -10608,37 +10610,37 @@ function xi(e, t, r) {
|
|
|
10608
10610
|
}
|
|
10609
10611
|
const Ln = new class {
|
|
10610
10612
|
generateLoginQrCode(e, t, r, n, i, s) {
|
|
10611
|
-
const a =
|
|
10613
|
+
const a = Se.lib.WordArray.random(16).toString(Se.enc.Hex);
|
|
10612
10614
|
return { qrCode: xi("login", { roomId: a, dapp: e, url: t, network: r.toString(), icon: n ?? "undefined", method: i }, s), roomId: a };
|
|
10613
10615
|
}
|
|
10614
10616
|
generateProvideQrCode(e, t, r, n, i) {
|
|
10615
|
-
const s =
|
|
10617
|
+
const s = Se.lib.WordArray.random(16).toString(Se.enc.Hex);
|
|
10616
10618
|
return { qrCode: xi("provide", { roomId: s, dapp: e, url: t, network: r.toString(), icon: n ?? "undefined" }, i), roomId: s };
|
|
10617
10619
|
}
|
|
10618
10620
|
generatePaymentQrCode(e, t, r, n, i, s, a) {
|
|
10619
|
-
const o =
|
|
10621
|
+
const o = Se.lib.WordArray.random(16).toString(Se.enc.Hex);
|
|
10620
10622
|
return { qrCode: xi("payment", { roomId: o, dapp: e, address: r, amount: n, description: i ?? "undefined", info: s ?? "undefined", network: t.toString() }, a), roomId: o };
|
|
10621
10623
|
}
|
|
10622
10624
|
generateAirdropQrCode(e, t, r, n) {
|
|
10623
|
-
const i =
|
|
10625
|
+
const i = Se.lib.WordArray.random(16).toString(Se.enc.Hex), s = xi("airdrop", { roomId: i, dapp: e, icon: r ?? "undefined", network: t.toString() }, n);
|
|
10624
10626
|
return yt.joinRoom(i), { qrCode: s, roomId: i };
|
|
10625
10627
|
}
|
|
10626
10628
|
generateSendTransactionQrCode(e, t, r, n, i) {
|
|
10627
|
-
const s =
|
|
10629
|
+
const s = Se.lib.WordArray.random(16).toString(Se.enc.Hex);
|
|
10628
10630
|
return { qrCode: xi("sendTransaction", { roomId: s, dapp: e, url: r, icon: n ?? "undefined", network: t.toString() }, i), roomId: s };
|
|
10629
10631
|
}
|
|
10630
10632
|
}(), rs = "data:image/svg+xml,%3csvg%20width='167'%20height='166'%20viewBox='0%200%20167%20166'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M116.052%20115.296H166.355H166.36V0H51.0675V50.3042H0.759995V165.6H116.052V115.296ZM90.3366%2065.3428L40.21%20115.296H40.4307L40.2551%20115.471H101.014V150.561H15.7981V65.3428H90.3366ZM76.7327%20100.257H151.317V15.0386H66.1006V50.1536L109.424%2050.3042H126.684L126.624%2050.364L126.669%2050.3642L113.846%2063.1431L76.7327%20100.257Z'%20fill='url(%23paint0_linear_2322_66)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_2322_66'%20x1='167.74'%20y1='-2.07'%20x2='-3.37985'%20y2='172.5'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%231349F8'/%3e%3cstop%20offset='1'%20stop-color='%235C13F8'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e", o5 = ({ availableNetworks: e, dapp: t, url: r, sigMessage: n, onReceive: i, validSeconds: s, isShowLogo: a = !1, logoSize: o = 30, expire: c, icon: f, size: u, processingMark: p = { type: "DEFAULT" }, qrDomain: w, ...v }) => {
|
|
10631
|
-
const [S, E] =
|
|
10633
|
+
const [S, E] = Te(!1), _ = pi.isMobile(), { roomId: k, nonce: A, qrCode: P, resumeFromReload: I } = so(_, () => Ln.generateLoginQrCode(t, r, e, f, "login", w));
|
|
10632
10634
|
oo(k);
|
|
10633
10635
|
const N = mi(k, s), { isResuming: z } = (({ roomId: d, nonce: h, qrCode: y, sigMessage: m, expire: l, validSeconds: g, isMobile: x, isValid: O, resumeFromReload: R, onReceive: j }) => {
|
|
10634
|
-
const [
|
|
10635
|
-
if (
|
|
10636
|
-
const U =
|
|
10637
|
-
U != null && U.address && (U1(U, m, h, l), j == null || j({ status: "SUCCESS", result: U }), localStorage.setItem(On, JSON.stringify(U)));
|
|
10636
|
+
const [F, $] = Te(!1), V = Yi((D) => {
|
|
10637
|
+
if (D.status === "TIMEOUT") return j == null || j({ status: "ERROR" }), !0;
|
|
10638
|
+
const U = D.result;
|
|
10639
|
+
return !!(U != null && U.address) && (U1(U, m, h, l), j == null || j({ status: "SUCCESS", result: U }), localStorage.setItem(On, JSON.stringify(U)), !0);
|
|
10638
10640
|
}, [j, m, h, l]);
|
|
10639
10641
|
return es({ roomId: d, nonce: h, type: "login", payload: `${m}
|
|
10640
10642
|
|
|
10641
|
-
Nonce: ${h}`, onResult: V, onResume: () => $(!0), timeoutMs: g ? 1e3 * g : void 0, resumeFromReload: R }), ts({ qrCode: y, isMobile: x, isValid: O, resumeFromReload: R }), { isResuming:
|
|
10643
|
+
Nonce: ${h}`, onResult: V, onResume: () => $(!0), timeoutMs: g ? 1e3 * g : void 0, resumeFromReload: R }), ts({ qrCode: y, isMobile: x, isValid: O, resumeFromReload: R }), { isResuming: F };
|
|
10642
10644
|
})({ roomId: k, nonce: A, qrCode: P, sigMessage: n, expire: c, validSeconds: s, isMobile: _, isValid: N, resumeFromReload: I, onReceive: i }), B = hr(i);
|
|
10643
10645
|
return B.current = i, tr(() => {
|
|
10644
10646
|
if (!_)
|
|
@@ -10651,8 +10653,8 @@ Nonce: ${h}`, onResult: V, onResume: () => $(!0), timeoutMs: g ? 1e3 * g : void
|
|
|
10651
10653
|
(h = B.current) == null || h.call(B, { status: "ACCOUNT" });
|
|
10652
10654
|
const x = `${n}
|
|
10653
10655
|
|
|
10654
|
-
Nonce: ${A}`, O = (c == null ? void 0 : c.type) ?? "NONE", R = (c == null ? void 0 : c.seconds) ?? 0, j = { publicKey: g.publicKey, message: x },
|
|
10655
|
-
(y = B.current) == null || y.call(B, { status: "SUCCESS", result:
|
|
10656
|
+
Nonce: ${A}`, O = (c == null ? void 0 : c.type) ?? "NONE", R = (c == null ? void 0 : c.seconds) ?? 0, j = { publicKey: g.publicKey, message: x }, F = { address: g.address, network: g.network, nickName: g.nickName, token: uc.Validation.createToken(j, g.signature), issuedDateTime: Yn().format(ti), isVerified: g.isVerified, signature: g.signature, expire: O === "NONE" ? { type: O } : { type: O, seconds: R } };
|
|
10657
|
+
(y = B.current) == null || y.call(B, { status: "SUCCESS", result: F }), E(!1), localStorage.setItem(On, JSON.stringify(F));
|
|
10656
10658
|
}
|
|
10657
10659
|
} catch {
|
|
10658
10660
|
(m = B.current) == null || m.call(B, { status: "ERROR" }), E(!1);
|
|
@@ -10680,7 +10682,7 @@ Nonce: ${A}`, O = (c == null ? void 0 : c.type) ?? "NONE", R = (c == null ? void
|
|
|
10680
10682
|
`, Bo = lr.div`
|
|
10681
10683
|
font-size: 12px;
|
|
10682
10684
|
color: #7a7a7a;
|
|
10683
|
-
`,
|
|
10685
|
+
`, Gd = new class {
|
|
10684
10686
|
isTransactionResultType(e) {
|
|
10685
10687
|
return typeof e == "object" && e !== null && typeof e.from == "string" && typeof e.txHash == "string" && typeof e.status == "string";
|
|
10686
10688
|
}
|
|
@@ -10721,23 +10723,23 @@ Nonce: ${A}`, O = (c == null ? void 0 : c.type) ?? "NONE", R = (c == null ? void
|
|
|
10721
10723
|
}
|
|
10722
10724
|
}
|
|
10723
10725
|
}(), a5 = ({ network: e, dapp: t, address: r, amount: n, description: i, info: s, onReceive: a, validSeconds: o, isShowLogo: c = !1, logoSize: f = 30, size: u, processingMark: p = { type: "DEFAULT" }, ...w }) => {
|
|
10724
|
-
const [v, S] =
|
|
10726
|
+
const [v, S] = Te(!1), E = pi.isMobile(), { roomId: _, nonce: k, qrCode: A, resumeFromReload: P } = so(E, () => Ln.generatePaymentQrCode(t, e, r, n, i, s));
|
|
10725
10727
|
oo(_);
|
|
10726
10728
|
const I = mi(_, o), { isResuming: N } = (({ roomId: B, nonce: d, qrCode: h, network: y, address: m, amount: l, validSeconds: g, isMobile: x, isValid: O, resumeFromReload: R, onReceive: j }) => {
|
|
10727
|
-
const [
|
|
10728
|
-
if (
|
|
10729
|
-
const U =
|
|
10730
|
-
U
|
|
10729
|
+
const [F, $] = Te(!1), V = Yi((D) => {
|
|
10730
|
+
if (D.status === "TIMEOUT") return j == null || j({ status: "ERROR" }), !0;
|
|
10731
|
+
const U = D.result;
|
|
10732
|
+
return !(!U || !U.txHash || (j == null || j({ status: "SUCCESS" }), 0));
|
|
10731
10733
|
}, [j]);
|
|
10732
|
-
return es({ roomId: B, nonce: d, type: "payment", payload: JSON.stringify({ network: y, address: m, amount: l }), onResult: V, onResume: () => $(!0), timeoutMs: g ? 1e3 * g : void 0, resumeFromReload: R }), ts({ qrCode: h, isMobile: x, isValid: O, resumeFromReload: R }), { isResuming:
|
|
10734
|
+
return es({ roomId: B, nonce: d, type: "payment", payload: JSON.stringify({ network: y, address: m, amount: l }), onResult: V, onResume: () => $(!0), timeoutMs: g ? 1e3 * g : void 0, resumeFromReload: R }), ts({ qrCode: h, isMobile: x, isValid: O, resumeFromReload: R }), { isResuming: F };
|
|
10733
10735
|
})({ roomId: _, nonce: k, qrCode: A, network: e, address: r, amount: n, validSeconds: o, isMobile: E, isValid: I, resumeFromReload: P, onReceive: a }), z = hr(a);
|
|
10734
10736
|
return z.current = a, tr(() => {
|
|
10735
10737
|
if (!E)
|
|
10736
10738
|
return (async () => {
|
|
10737
10739
|
var B, d, h;
|
|
10738
10740
|
try {
|
|
10739
|
-
const y = await
|
|
10740
|
-
S(!0), (B = z.current) == null || B.call(z, { status: "REQUEST" }), y.isSuccess && (await
|
|
10741
|
+
const y = await Gd.startPayment(_);
|
|
10742
|
+
S(!0), (B = z.current) == null || B.call(z, { status: "REQUEST" }), y.isSuccess && (await Gd.qrPayment(_), (d = z.current) == null || d.call(z, { status: "SUCCESS" }), S(!1));
|
|
10741
10743
|
} catch {
|
|
10742
10744
|
(h = z.current) == null || h.call(z, { status: "ERROR" }), S(!1);
|
|
10743
10745
|
}
|
|
@@ -10764,7 +10766,7 @@ Nonce: ${A}`, O = (c == null ? void 0 : c.type) ?? "NONE", R = (c == null ? void
|
|
|
10764
10766
|
`, Lo = lr.div`
|
|
10765
10767
|
font-size: 12px;
|
|
10766
10768
|
color: #7a7a7a;
|
|
10767
|
-
`,
|
|
10769
|
+
`, G3 = new class {
|
|
10768
10770
|
isAccountType(e) {
|
|
10769
10771
|
return typeof e == "object" && e !== null && typeof e.address == "string" && typeof e.network == "string" && typeof e.nickName == "string";
|
|
10770
10772
|
}
|
|
@@ -10785,22 +10787,20 @@ Nonce: ${A}`, O = (c == null ? void 0 : c.type) ?? "NONE", R = (c == null ? void
|
|
|
10785
10787
|
}
|
|
10786
10788
|
}
|
|
10787
10789
|
}(), c5 = ({ availableNetworks: e, dapp: t, url: r, validSeconds: n, onReceive: i, isShowLogo: s = !1, logoSize: a = 30, icon: o, ...c }) => {
|
|
10788
|
-
const [f, u] =
|
|
10790
|
+
const [f, u] = Te(!1), p = pi.isMobile(), [w] = Te(() => li.generateNonce(16)), [{ qrCode: v, roomId: S }] = Te(() => Ln.generateProvideQrCode(t, r, e, o));
|
|
10789
10791
|
oo(S);
|
|
10790
10792
|
const E = mi(S, n);
|
|
10791
10793
|
(({ roomId: k, onReceive: A }) => {
|
|
10792
10794
|
const P = hr(A);
|
|
10793
10795
|
P.current = A, tr(() => ((async () => {
|
|
10794
10796
|
try {
|
|
10795
|
-
await
|
|
10797
|
+
await G3.qrAddressProvide(k), P.current({ isSuccess: !0 });
|
|
10796
10798
|
} catch {
|
|
10797
10799
|
P.current({ isSuccess: !1 });
|
|
10798
10800
|
}
|
|
10799
10801
|
})(), () => yt.offMessageReceived("addressProvide")), [k]);
|
|
10800
10802
|
})({ roomId: S, onReceive: i });
|
|
10801
|
-
const _ = Yi((k) => {
|
|
10802
|
-
k.status !== "TIMEOUT" ? i({ isSuccess: !0 }) : i({ isSuccess: !1 });
|
|
10803
|
-
}, [i]);
|
|
10803
|
+
const _ = Yi((k) => k.status === "TIMEOUT" ? (i({ isSuccess: !1 }), !0) : (i({ isSuccess: !0 }), !0), [i]);
|
|
10804
10804
|
return es({ roomId: S, nonce: w, type: "provide", payload: { dapp: t, url: r }, onResult: _, onResume: () => u(!0), timeoutMs: n ? 1e3 * n : void 0 }), ts({ qrCode: v, isMobile: p, isValid: E }), E ? p ? Ct.jsx(X3, { children: Ct.jsx(t5, { children: f ? "결과 수신 중..." : "앱으로 이동 중..." }) }) : Ct.jsx(Cn, { value: v, ...s && { imageSettings: { src: rs, width: a, height: a, excavate: !1 } }, ...c }) : Ct.jsx("div", { children: "QR loading error" });
|
|
10805
10805
|
}, X3 = lr.div`
|
|
10806
10806
|
width: 128px;
|
|
@@ -10827,7 +10827,7 @@ Nonce: ${A}`, O = (c == null ? void 0 : c.type) ?? "NONE", R = (c == null ? void
|
|
|
10827
10827
|
});
|
|
10828
10828
|
}
|
|
10829
10829
|
}(), d5 = ({ availableNetworks: e, dapp: t, validSeconds: r, onReceive: n, isShowLogo: i = !1, logoSize: s = 30, icon: a, size: o, processingMark: c = { type: "DEFAULT" }, ...f }) => {
|
|
10830
|
-
const [u, p] =
|
|
10830
|
+
const [u, p] = Te(!1), [w, v] = Te(""), [S, E] = Te(""), _ = () => {
|
|
10831
10831
|
const { qrCode: P, roomId: I } = Ln.generateAirdropQrCode(t, e, a);
|
|
10832
10832
|
v(I), E(P);
|
|
10833
10833
|
};
|
|
@@ -10903,17 +10903,17 @@ Nonce: ${A}`, O = (c == null ? void 0 : c.type) ?? "NONE", R = (c == null ? void
|
|
|
10903
10903
|
}
|
|
10904
10904
|
}
|
|
10905
10905
|
}(), f5 = ({ availableNetworks: e, dapp: t, url: r, onReceive: n, validSeconds: i, isShowLogo: s = !1, logoSize: a = 30, size: o, icon: c, transaction: f, processingMark: u = { type: "DEFAULT" }, qrDomain: p, ...w }) => {
|
|
10906
|
-
const [v, S] =
|
|
10906
|
+
const [v, S] = Te(!1), E = pi.isMobile(), { roomId: _, nonce: k, qrCode: A, resumeFromReload: P } = so(E, () => Ln.generateSendTransactionQrCode(t, e, r, c, p));
|
|
10907
10907
|
oo(_);
|
|
10908
10908
|
const I = mi(_, i), { isResuming: N } = (({ roomId: B, nonce: d, qrCode: h, transaction: y, validSeconds: m, isMobile: l, isValid: g, resumeFromReload: x, onReceive: O }) => {
|
|
10909
|
-
const [R, j] =
|
|
10910
|
-
if ($.status === "TIMEOUT") return
|
|
10909
|
+
const [R, j] = Te(!1), F = Yi(($) => {
|
|
10910
|
+
if ($.status === "TIMEOUT") return O == null || O({ status: "ERROR" }), !0;
|
|
10911
10911
|
const V = $.result;
|
|
10912
|
-
if (!V || !V.txHash) return
|
|
10913
|
-
const
|
|
10914
|
-
O == null || O({ status: "SUCCESS", result:
|
|
10912
|
+
if (!V || !V.txHash) return !1;
|
|
10913
|
+
const D = { txHash: V.txHash, status: V.status, error: V.error };
|
|
10914
|
+
return O == null || O({ status: "SUCCESS", result: D }), !0;
|
|
10915
10915
|
}, [O]);
|
|
10916
|
-
return es({ roomId: B, nonce: d, type: "sendTransaction", payload: JSON.stringify(y), onResult:
|
|
10916
|
+
return es({ roomId: B, nonce: d, type: "sendTransaction", payload: JSON.stringify(y), onResult: F, onResume: () => j(!0), timeoutMs: m ? 1e3 * m : void 0, resumeFromReload: x }), ts({ qrCode: h, isMobile: l, isValid: g, resumeFromReload: x }), { isResuming: R };
|
|
10917
10917
|
})({ roomId: _, nonce: k, qrCode: A, transaction: f, validSeconds: i, isMobile: E, isValid: I, resumeFromReload: P, onReceive: n }), z = hr(n);
|
|
10918
10918
|
return z.current = n, tr(() => {
|
|
10919
10919
|
if (!E)
|
|
@@ -10952,17 +10952,17 @@ Nonce: ${A}`, O = (c == null ? void 0 : c.type) ?? "NONE", R = (c == null ? void
|
|
|
10952
10952
|
font-size: 12px;
|
|
10953
10953
|
color: #7a7a7a;
|
|
10954
10954
|
`, u5 = ({ availableNetworks: e, dapp: t, url: r, sigMessage: n, onReceive: i, validSeconds: s, isShowLogo: a = !1, logoSize: o = 30, expire: c, icon: f, size: u, processingMark: p = { type: "DEFAULT" }, qrDomain: w, ...v }) => {
|
|
10955
|
-
const [S, E] =
|
|
10955
|
+
const [S, E] = Te(!1), _ = pi.isMobile(), { roomId: k, nonce: A, qrCode: P, resumeFromReload: I } = so(_, () => Ln.generateLoginQrCode(t, r, e, f, "signature", w));
|
|
10956
10956
|
tr(() => (yt.joinRoom(k), () => yt.leaveRoom(k)), [k]);
|
|
10957
10957
|
const N = mi(k, s), { isResuming: z } = (({ roomId: d, nonce: h, qrCode: y, sigMessage: m, expire: l, validSeconds: g, isMobile: x, isValid: O, resumeFromReload: R, onReceive: j }) => {
|
|
10958
|
-
const [
|
|
10959
|
-
if (
|
|
10960
|
-
const U =
|
|
10961
|
-
U != null && U.address && (U1(U, m, h, l), j == null || j({ status: "SUCCESS", result: U }), localStorage.setItem(On, JSON.stringify(U)));
|
|
10958
|
+
const [F, $] = Te(!1), V = Yi((D) => {
|
|
10959
|
+
if (D.status === "TIMEOUT") return j == null || j({ status: "ERROR" }), !0;
|
|
10960
|
+
const U = D.result;
|
|
10961
|
+
return !!(U != null && U.address) && (U1(U, m, h, l), j == null || j({ status: "SUCCESS", result: U }), localStorage.setItem(On, JSON.stringify(U)), !0);
|
|
10962
10962
|
}, [j, m, h, l]);
|
|
10963
10963
|
return es({ roomId: d, nonce: h, type: "signature", payload: `${m}
|
|
10964
10964
|
|
|
10965
|
-
Nonce: ${h}`, onResult: V, onResume: () => $(!0), timeoutMs: g ? 1e3 * g : void 0, resumeFromReload: R }), ts({ qrCode: y, isMobile: x, isValid: O, resumeFromReload: R }), { isResuming:
|
|
10965
|
+
Nonce: ${h}`, onResult: V, onResume: () => $(!0), timeoutMs: g ? 1e3 * g : void 0, resumeFromReload: R }), ts({ qrCode: y, isMobile: x, isValid: O, resumeFromReload: R }), { isResuming: F };
|
|
10966
10966
|
})({ roomId: k, nonce: A, qrCode: P, sigMessage: n, expire: c, validSeconds: s, isMobile: _, isValid: N, resumeFromReload: I, onReceive: i }), B = hr(i);
|
|
10967
10967
|
return B.current = i, tr(() => {
|
|
10968
10968
|
if (!_)
|
|
@@ -10975,8 +10975,8 @@ Nonce: ${h}`, onResult: V, onResume: () => $(!0), timeoutMs: g ? 1e3 * g : void
|
|
|
10975
10975
|
(h = B.current) == null || h.call(B, { status: "ACCOUNT" });
|
|
10976
10976
|
const x = `${n}
|
|
10977
10977
|
|
|
10978
|
-
Nonce: ${A}`, O = (c == null ? void 0 : c.type) ?? "NONE", R = (c == null ? void 0 : c.seconds) ?? 0, j = { publicKey: g.publicKey, message: x },
|
|
10979
|
-
(y = B.current) == null || y.call(B, { status: "SUCCESS", result:
|
|
10978
|
+
Nonce: ${A}`, O = (c == null ? void 0 : c.type) ?? "NONE", R = (c == null ? void 0 : c.seconds) ?? 0, j = { publicKey: g.publicKey, message: x }, F = { address: g.address, network: g.network, nickName: g.nickName, token: uc.Validation.createToken(j, g.signature), issuedDateTime: Yn().format(ti), isVerified: g.isVerified, signature: g.signature, expire: O === "NONE" ? { type: O } : { type: O, seconds: R } };
|
|
10979
|
+
(y = B.current) == null || y.call(B, { status: "SUCCESS", result: F }), E(!1), localStorage.setItem(On, JSON.stringify(F));
|
|
10980
10980
|
}
|
|
10981
10981
|
} catch {
|
|
10982
10982
|
(m = B.current) == null || m.call(B, { status: "ERROR" }), E(!1);
|