@edgex-web/components 1.0.0-beta.7 → 1.0.0-beta.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/{ccip-PikfM9kh.mjs → ccip-kT5GriPR.mjs} +2 -2
- package/dist/{ccip-PikfM9kh.mjs.map → ccip-kT5GriPR.mjs.map} +1 -1
- package/dist/components/Deposit/src/components/evm/index.d.ts.map +1 -1
- package/dist/components/Deposit/src/components/mpc/index.d.ts.map +1 -1
- package/dist/{index-BJxeI_Vg.mjs → index-CDqJRxye.mjs} +761 -775
- package/dist/{index-BJxeI_Vg.mjs.map → index-CDqJRxye.mjs.map} +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +9 -9
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ var ib = Object.defineProperty;
|
|
|
2
2
|
var ab = (e, t, n) => t in e ? ib(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var Xr = (e, t, n) => ab(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import * as j from "react";
|
|
5
|
-
import Z, { createContext as He, useContext as Ne, useMemo as J, useCallback as
|
|
5
|
+
import Z, { createContext as He, useContext as Ne, useMemo as J, useCallback as ee, forwardRef as zc, createElement as As, useRef as de, useEffect as Te, useState as ie, useLayoutEffect as Zs, Fragment as Ft, isValidElement as Uc, cloneElement as fd, useId as ur, useSyncExternalStore as cb, useImperativeHandle as dd } from "react";
|
|
6
6
|
import * as po from "react-dom";
|
|
7
7
|
import pd, { flushSync as Ns, createPortal as hd } from "react-dom";
|
|
8
8
|
function lb(e) {
|
|
@@ -89,7 +89,7 @@ function fb() {
|
|
|
89
89
|
function O(L) {
|
|
90
90
|
return L.displayName || "Context";
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function C(L) {
|
|
93
93
|
if (L == null)
|
|
94
94
|
return null;
|
|
95
95
|
if (typeof L.tag == "number" && w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof L == "function")
|
|
@@ -122,11 +122,11 @@ function fb() {
|
|
|
122
122
|
return S(L, L.render, "ForwardRef");
|
|
123
123
|
case f:
|
|
124
124
|
var ue = L.displayName || null;
|
|
125
|
-
return ue !== null ? ue :
|
|
125
|
+
return ue !== null ? ue : C(L.type) || "Memo";
|
|
126
126
|
case p: {
|
|
127
127
|
var Pe = L, Se = Pe._payload, ge = Pe._init;
|
|
128
128
|
try {
|
|
129
|
-
return
|
|
129
|
+
return C(ge(Se));
|
|
130
130
|
} catch {
|
|
131
131
|
return null;
|
|
132
132
|
}
|
|
@@ -134,14 +134,14 @@ function fb() {
|
|
|
134
134
|
}
|
|
135
135
|
return null;
|
|
136
136
|
}
|
|
137
|
-
var D = Object.assign, v = 0, R,
|
|
137
|
+
var D = Object.assign, v = 0, R, I, E, k, F, z, U;
|
|
138
138
|
function H() {
|
|
139
139
|
}
|
|
140
140
|
H.__reactDisabledLog = !0;
|
|
141
|
-
function
|
|
141
|
+
function te() {
|
|
142
142
|
{
|
|
143
143
|
if (v === 0) {
|
|
144
|
-
R = console.log,
|
|
144
|
+
R = console.log, I = console.info, E = console.warn, k = console.error, F = console.group, z = console.groupCollapsed, U = console.groupEnd;
|
|
145
145
|
var L = {
|
|
146
146
|
configurable: !0,
|
|
147
147
|
enumerable: !0,
|
|
@@ -161,7 +161,7 @@ function fb() {
|
|
|
161
161
|
v++;
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function q() {
|
|
165
165
|
{
|
|
166
166
|
if (v--, v === 0) {
|
|
167
167
|
var L = {
|
|
@@ -174,7 +174,7 @@ function fb() {
|
|
|
174
174
|
value: R
|
|
175
175
|
}),
|
|
176
176
|
info: D({}, L, {
|
|
177
|
-
value:
|
|
177
|
+
value: I
|
|
178
178
|
}),
|
|
179
179
|
warn: D({}, L, {
|
|
180
180
|
value: E
|
|
@@ -210,13 +210,13 @@ function fb() {
|
|
|
210
210
|
` + ne + L;
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
|
-
var
|
|
213
|
+
var G = !1, ae;
|
|
214
214
|
{
|
|
215
215
|
var ce = typeof WeakMap == "function" ? WeakMap : Map;
|
|
216
216
|
ae = new ce();
|
|
217
217
|
}
|
|
218
218
|
function K(L, V) {
|
|
219
|
-
if (!L ||
|
|
219
|
+
if (!L || G)
|
|
220
220
|
return "";
|
|
221
221
|
{
|
|
222
222
|
var X = ae.get(L);
|
|
@@ -224,11 +224,11 @@ function fb() {
|
|
|
224
224
|
return X;
|
|
225
225
|
}
|
|
226
226
|
var ue;
|
|
227
|
-
|
|
227
|
+
G = !0;
|
|
228
228
|
var Pe = Error.prepareStackTrace;
|
|
229
229
|
Error.prepareStackTrace = void 0;
|
|
230
230
|
var Se;
|
|
231
|
-
Se = _.current, _.current = null,
|
|
231
|
+
Se = _.current, _.current = null, te();
|
|
232
232
|
try {
|
|
233
233
|
if (V) {
|
|
234
234
|
var ge = function() {
|
|
@@ -281,7 +281,7 @@ function fb() {
|
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
} finally {
|
|
284
|
-
|
|
284
|
+
G = !1, _.current = Se, q(), Error.prepareStackTrace = Pe;
|
|
285
285
|
}
|
|
286
286
|
var yr = L ? L.displayName || L.name : "", qn = yr ? xe(yr) : "";
|
|
287
287
|
return typeof L == "function" && ae.set(L, qn), qn;
|
|
@@ -350,7 +350,7 @@ function fb() {
|
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
352
|
var Ht = Array.isArray;
|
|
353
|
-
function
|
|
353
|
+
function Ie(L) {
|
|
354
354
|
return Ht(L);
|
|
355
355
|
}
|
|
356
356
|
function ze(L) {
|
|
@@ -369,7 +369,7 @@ function fb() {
|
|
|
369
369
|
function Ke(L) {
|
|
370
370
|
return "" + L;
|
|
371
371
|
}
|
|
372
|
-
function
|
|
372
|
+
function It(L) {
|
|
373
373
|
if (Gn(L))
|
|
374
374
|
return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ze(L)), Ke(L);
|
|
375
375
|
}
|
|
@@ -452,7 +452,7 @@ function fb() {
|
|
|
452
452
|
function Zm(L, V, X, ue, Pe) {
|
|
453
453
|
{
|
|
454
454
|
var Se, ge = {}, be = null, Ze = null;
|
|
455
|
-
X !== void 0 && (
|
|
455
|
+
X !== void 0 && (It(X), be = "" + X), Vm(V) && (It(V.key), be = "" + V.key), Wm(V) && (Ze = V.ref, Hm(V, Pe));
|
|
456
456
|
for (Se in V)
|
|
457
457
|
ye.call(V, Se) && !$t.hasOwnProperty(Se) && (ge[Se] = V[Se]);
|
|
458
458
|
if (L && L.defaultProps) {
|
|
@@ -483,7 +483,7 @@ function fb() {
|
|
|
483
483
|
function nu() {
|
|
484
484
|
{
|
|
485
485
|
if (Di.current) {
|
|
486
|
-
var L =
|
|
486
|
+
var L = C(Di.current.type);
|
|
487
487
|
if (L)
|
|
488
488
|
return `
|
|
489
489
|
|
|
@@ -518,14 +518,14 @@ Check the top-level render call using <` + X + ">.");
|
|
|
518
518
|
return;
|
|
519
519
|
ru[X] = !0;
|
|
520
520
|
var ue = "";
|
|
521
|
-
L && L._owner && L._owner !== Di.current && (ue = " It was passed a child from " +
|
|
521
|
+
L && L._owner && L._owner !== Di.current && (ue = " It was passed a child from " + C(L._owner.type) + "."), gr(L), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', X, ue), gr(null);
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
524
|
function su(L, V) {
|
|
525
525
|
{
|
|
526
526
|
if (typeof L != "object")
|
|
527
527
|
return;
|
|
528
|
-
if (
|
|
528
|
+
if (Ie(L))
|
|
529
529
|
for (var X = 0; X < L.length; X++) {
|
|
530
530
|
var ue = L[X];
|
|
531
531
|
Bi(ue) && ou(ue, V);
|
|
@@ -555,11 +555,11 @@ Check the top-level render call using <` + X + ">.");
|
|
|
555
555
|
else
|
|
556
556
|
return;
|
|
557
557
|
if (X) {
|
|
558
|
-
var ue =
|
|
558
|
+
var ue = C(V);
|
|
559
559
|
ke(X, L.props, "prop", ue, L);
|
|
560
560
|
} else if (V.PropTypes !== void 0 && !ki) {
|
|
561
561
|
ki = !0;
|
|
562
|
-
var Pe =
|
|
562
|
+
var Pe = C(V);
|
|
563
563
|
w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", Pe || "Unknown");
|
|
564
564
|
}
|
|
565
565
|
typeof V.getDefaultProps == "function" && !V.getDefaultProps.isReactClassApproved && w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
@@ -587,7 +587,7 @@ Check the top-level render call using <` + X + ">.");
|
|
|
587
587
|
var Ze = Ym();
|
|
588
588
|
Ze ? be += Ze : be += nu();
|
|
589
589
|
var $e;
|
|
590
|
-
L === null ? $e = "null" :
|
|
590
|
+
L === null ? $e = "null" : Ie(L) ? $e = "array" : L !== void 0 && L.$$typeof === t ? ($e = "<" + (C(L.type) || "Unknown") + " />", be = " Did you accidentally export a JSX literal instead of a component?") : $e = typeof L, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", $e, be);
|
|
591
591
|
}
|
|
592
592
|
var Be = Zm(L, V, X, Pe, Se);
|
|
593
593
|
if (Be == null)
|
|
@@ -596,7 +596,7 @@ Check the top-level render call using <` + X + ">.");
|
|
|
596
596
|
var gt = V.children;
|
|
597
597
|
if (gt !== void 0)
|
|
598
598
|
if (ue)
|
|
599
|
-
if (
|
|
599
|
+
if (Ie(gt)) {
|
|
600
600
|
for (var yr = 0; yr < gt.length; yr++)
|
|
601
601
|
su(gt[yr], L);
|
|
602
602
|
Object.freeze && Object.freeze(gt);
|
|
@@ -606,7 +606,7 @@ Check the top-level render call using <` + X + ">.");
|
|
|
606
606
|
su(gt, L);
|
|
607
607
|
}
|
|
608
608
|
if (ye.call(V, "key")) {
|
|
609
|
-
var qn =
|
|
609
|
+
var qn = C(L), Qe = Object.keys(V).filter(function(sb) {
|
|
610
610
|
return sb !== "key";
|
|
611
611
|
}), Mi = Qe.length > 0 ? "{key: someKey, " + Qe.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
612
612
|
if (!iu[qn + Mi]) {
|
|
@@ -1422,7 +1422,7 @@ const db = {
|
|
|
1422
1422
|
"es-LA": "Español (Latinoamérica)",
|
|
1423
1423
|
"fr-FR": "Français",
|
|
1424
1424
|
"it-IT": "Italiano"
|
|
1425
|
-
}, xb = (e) => md.includes(e) ? uu[e] : uu[Na], Eb = (e) => md.includes(e), bd = He(null),
|
|
1425
|
+
}, xb = (e) => md.includes(e) ? uu[e] : uu[Na], Eb = (e) => md.includes(e), bd = He(null), CP = ({
|
|
1426
1426
|
config: e,
|
|
1427
1427
|
children: t
|
|
1428
1428
|
}) => {
|
|
@@ -1455,7 +1455,7 @@ function gd(e) {
|
|
|
1455
1455
|
suffix: ""
|
|
1456
1456
|
}, g = "0123456789abcdefghijklmnopqrstuvwxyz", A = !0;
|
|
1457
1457
|
function w(b, y) {
|
|
1458
|
-
var x, S, O,
|
|
1458
|
+
var x, S, O, C, D, v, R, I, E = this;
|
|
1459
1459
|
if (!(E instanceof w)) return new w(b, y);
|
|
1460
1460
|
if (y == null) {
|
|
1461
1461
|
if (b && b._isBigNumber === !0) {
|
|
@@ -1464,58 +1464,58 @@ function gd(e) {
|
|
|
1464
1464
|
}
|
|
1465
1465
|
if ((v = typeof b == "number") && b * 0 == 0) {
|
|
1466
1466
|
if (E.s = 1 / b < 0 ? (b = -b, -1) : 1, b === ~~b) {
|
|
1467
|
-
for (
|
|
1468
|
-
|
|
1467
|
+
for (C = 0, D = b; D >= 10; D /= 10, C++) ;
|
|
1468
|
+
C > f ? E.c = E.e = null : (E.e = C, E.c = [b]);
|
|
1469
1469
|
return;
|
|
1470
1470
|
}
|
|
1471
|
-
|
|
1471
|
+
I = String(b);
|
|
1472
1472
|
} else {
|
|
1473
|
-
if (!Sb.test(
|
|
1474
|
-
E.s =
|
|
1473
|
+
if (!Sb.test(I = String(b))) return r(E, I, v);
|
|
1474
|
+
E.s = I.charCodeAt(0) == 45 ? (I = I.slice(1), -1) : 1;
|
|
1475
1475
|
}
|
|
1476
|
-
(
|
|
1476
|
+
(C = I.indexOf(".")) > -1 && (I = I.replace(".", "")), (D = I.search(/e/i)) > 0 ? (C < 0 && (C = D), C += +I.slice(D + 1), I = I.substring(0, D)) : C < 0 && (C = I.length);
|
|
1477
1477
|
} else {
|
|
1478
1478
|
if (Ae(y, 2, g.length, "Base"), y == 10 && A)
|
|
1479
1479
|
return E = new w(b), B(E, i + E.e + 1, c);
|
|
1480
|
-
if (
|
|
1481
|
-
if (b * 0 != 0) return r(E,
|
|
1482
|
-
if (E.s = 1 / b < 0 ? (
|
|
1480
|
+
if (I = String(b), v = typeof b == "number") {
|
|
1481
|
+
if (b * 0 != 0) return r(E, I, v, y);
|
|
1482
|
+
if (E.s = 1 / b < 0 ? (I = I.slice(1), -1) : 1, w.DEBUG && I.replace(/^0\.0*|\./, "").length > 15)
|
|
1483
1483
|
throw Error(fu + b);
|
|
1484
1484
|
} else
|
|
1485
|
-
E.s =
|
|
1486
|
-
for (x = g.slice(0, y),
|
|
1487
|
-
if (x.indexOf(S =
|
|
1485
|
+
E.s = I.charCodeAt(0) === 45 ? (I = I.slice(1), -1) : 1;
|
|
1486
|
+
for (x = g.slice(0, y), C = D = 0, R = I.length; D < R; D++)
|
|
1487
|
+
if (x.indexOf(S = I.charAt(D)) < 0) {
|
|
1488
1488
|
if (S == ".") {
|
|
1489
|
-
if (D >
|
|
1490
|
-
|
|
1489
|
+
if (D > C) {
|
|
1490
|
+
C = R;
|
|
1491
1491
|
continue;
|
|
1492
1492
|
}
|
|
1493
|
-
} else if (!O && (
|
|
1494
|
-
O = !0, D = -1,
|
|
1493
|
+
} else if (!O && (I == I.toUpperCase() && (I = I.toLowerCase()) || I == I.toLowerCase() && (I = I.toUpperCase()))) {
|
|
1494
|
+
O = !0, D = -1, C = 0;
|
|
1495
1495
|
continue;
|
|
1496
1496
|
}
|
|
1497
1497
|
return r(E, String(b), v, y);
|
|
1498
1498
|
}
|
|
1499
|
-
v = !1,
|
|
1499
|
+
v = !1, I = n(I, y, 10, E.s), (C = I.indexOf(".")) > -1 ? I = I.replace(".", "") : C = I.length;
|
|
1500
1500
|
}
|
|
1501
|
-
for (D = 0;
|
|
1502
|
-
for (R =
|
|
1503
|
-
if (
|
|
1501
|
+
for (D = 0; I.charCodeAt(D) === 48; D++) ;
|
|
1502
|
+
for (R = I.length; I.charCodeAt(--R) === 48; ) ;
|
|
1503
|
+
if (I = I.slice(D, ++R)) {
|
|
1504
1504
|
if (R -= D, v && w.DEBUG && R > 15 && (b > Fi || b !== xt(b)))
|
|
1505
1505
|
throw Error(fu + E.s * b);
|
|
1506
|
-
if ((
|
|
1506
|
+
if ((C = C - D - 1) > f)
|
|
1507
1507
|
E.c = E.e = null;
|
|
1508
|
-
else if (
|
|
1508
|
+
else if (C < u)
|
|
1509
1509
|
E.c = [E.e = 0];
|
|
1510
1510
|
else {
|
|
1511
|
-
if (E.e =
|
|
1512
|
-
for (D && E.c.push(+
|
|
1513
|
-
E.c.push(+
|
|
1514
|
-
D = fe - (
|
|
1511
|
+
if (E.e = C, E.c = [], D = (C + 1) % fe, C < 0 && (D += fe), D < R) {
|
|
1512
|
+
for (D && E.c.push(+I.slice(0, D)), R -= fe; D < R; )
|
|
1513
|
+
E.c.push(+I.slice(D, D += fe));
|
|
1514
|
+
D = fe - (I = I.slice(D)).length;
|
|
1515
1515
|
} else
|
|
1516
1516
|
D -= R;
|
|
1517
|
-
for (; D--;
|
|
1518
|
-
E.c.push(+
|
|
1517
|
+
for (; D--; I += "0") ;
|
|
1518
|
+
E.c.push(+I);
|
|
1519
1519
|
}
|
|
1520
1520
|
} else
|
|
1521
1521
|
E.c = [E.e = 0];
|
|
@@ -1566,9 +1566,9 @@ function gd(e) {
|
|
|
1566
1566
|
}, w.isBigNumber = function(b) {
|
|
1567
1567
|
if (!b || b._isBigNumber !== !0) return !1;
|
|
1568
1568
|
if (!w.DEBUG) return !0;
|
|
1569
|
-
var y, x, S = b.c, O = b.e,
|
|
1569
|
+
var y, x, S = b.c, O = b.e, C = b.s;
|
|
1570
1570
|
e: if ({}.toString.call(S) == "[object Array]") {
|
|
1571
|
-
if ((
|
|
1571
|
+
if ((C === 1 || C === -1) && O >= -Le && O <= Le && O === xt(O)) {
|
|
1572
1572
|
if (S[0] === 0) {
|
|
1573
1573
|
if (O === 0 && S.length === 1) return !0;
|
|
1574
1574
|
break e;
|
|
@@ -1579,7 +1579,7 @@ function gd(e) {
|
|
|
1579
1579
|
if (x !== 0) return !0;
|
|
1580
1580
|
}
|
|
1581
1581
|
}
|
|
1582
|
-
} else if (S === null && O === null && (
|
|
1582
|
+
} else if (S === null && O === null && (C === null || C === 1 || C === -1))
|
|
1583
1583
|
return !0;
|
|
1584
1584
|
throw Error(et + "Invalid BigNumber: " + b);
|
|
1585
1585
|
}, w.maximum = w.max = function() {
|
|
@@ -1593,91 +1593,91 @@ function gd(e) {
|
|
|
1593
1593
|
return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
|
|
1594
1594
|
};
|
|
1595
1595
|
return function(x) {
|
|
1596
|
-
var S, O,
|
|
1596
|
+
var S, O, C, D, v, R = 0, I = [], E = new w(s);
|
|
1597
1597
|
if (x == null ? x = i : Ae(x, 0, Le), D = Li(x / fe), p)
|
|
1598
1598
|
if (crypto.getRandomValues) {
|
|
1599
1599
|
for (S = crypto.getRandomValues(new Uint32Array(D *= 2)); R < D; )
|
|
1600
|
-
v = S[R] * 131072 + (S[R + 1] >>> 11), v >= 9e15 ? (O = crypto.getRandomValues(new Uint32Array(2)), S[R] = O[0], S[R + 1] = O[1]) : (
|
|
1600
|
+
v = S[R] * 131072 + (S[R + 1] >>> 11), v >= 9e15 ? (O = crypto.getRandomValues(new Uint32Array(2)), S[R] = O[0], S[R + 1] = O[1]) : (I.push(v % 1e14), R += 2);
|
|
1601
1601
|
R = D / 2;
|
|
1602
1602
|
} else if (crypto.randomBytes) {
|
|
1603
1603
|
for (S = crypto.randomBytes(D *= 7); R < D; )
|
|
1604
|
-
v = (S[R] & 31) * 281474976710656 + S[R + 1] * 1099511627776 + S[R + 2] * 4294967296 + S[R + 3] * 16777216 + (S[R + 4] << 16) + (S[R + 5] << 8) + S[R + 6], v >= 9e15 ? crypto.randomBytes(7).copy(S, R) : (
|
|
1604
|
+
v = (S[R] & 31) * 281474976710656 + S[R + 1] * 1099511627776 + S[R + 2] * 4294967296 + S[R + 3] * 16777216 + (S[R + 4] << 16) + (S[R + 5] << 8) + S[R + 6], v >= 9e15 ? crypto.randomBytes(7).copy(S, R) : (I.push(v % 1e14), R += 7);
|
|
1605
1605
|
R = D / 7;
|
|
1606
1606
|
} else
|
|
1607
1607
|
throw p = !1, Error(et + "crypto unavailable");
|
|
1608
1608
|
if (!p)
|
|
1609
1609
|
for (; R < D; )
|
|
1610
|
-
v = y(), v < 9e15 && (
|
|
1611
|
-
for (D =
|
|
1610
|
+
v = y(), v < 9e15 && (I[R++] = v % 1e14);
|
|
1611
|
+
for (D = I[--R], x %= fe, D && x && (v = ji[fe - x], I[R] = xt(D / v) * v); I[R] === 0; I.pop(), R--) ;
|
|
1612
1612
|
if (R < 0)
|
|
1613
|
-
|
|
1613
|
+
I = [C = 0];
|
|
1614
1614
|
else {
|
|
1615
|
-
for (
|
|
1616
|
-
for (R = 1, v =
|
|
1617
|
-
R < fe && (
|
|
1615
|
+
for (C = -1; I[0] === 0; I.splice(0, 1), C -= fe) ;
|
|
1616
|
+
for (R = 1, v = I[0]; v >= 10; v /= 10, R++) ;
|
|
1617
|
+
R < fe && (C -= fe - R);
|
|
1618
1618
|
}
|
|
1619
|
-
return E.e =
|
|
1619
|
+
return E.e = C, E.c = I, E;
|
|
1620
1620
|
};
|
|
1621
1621
|
}(), w.sum = function() {
|
|
1622
1622
|
for (var b = 1, y = arguments, x = new w(y[0]); b < y.length; ) x = x.plus(y[b++]);
|
|
1623
1623
|
return x;
|
|
1624
1624
|
}, n = /* @__PURE__ */ function() {
|
|
1625
1625
|
var b = "0123456789";
|
|
1626
|
-
function y(x, S, O,
|
|
1627
|
-
for (var D, v = [0], R,
|
|
1626
|
+
function y(x, S, O, C) {
|
|
1627
|
+
for (var D, v = [0], R, I = 0, E = x.length; I < E; ) {
|
|
1628
1628
|
for (R = v.length; R--; v[R] *= S) ;
|
|
1629
|
-
for (v[0] +=
|
|
1629
|
+
for (v[0] += C.indexOf(x.charAt(I++)), D = 0; D < v.length; D++)
|
|
1630
1630
|
v[D] > O - 1 && (v[D + 1] == null && (v[D + 1] = 0), v[D + 1] += v[D] / O | 0, v[D] %= O);
|
|
1631
1631
|
}
|
|
1632
1632
|
return v.reverse();
|
|
1633
1633
|
}
|
|
1634
|
-
return function(x, S, O,
|
|
1635
|
-
var v, R,
|
|
1634
|
+
return function(x, S, O, C, D) {
|
|
1635
|
+
var v, R, I, E, k, F, z, U, H = x.indexOf("."), te = i, q = c;
|
|
1636
1636
|
for (H >= 0 && (E = h, h = 0, x = x.replace(".", ""), U = new w(S), F = U.pow(x.length - H), h = E, U.c = y(
|
|
1637
1637
|
cn(yt(F.c), F.e, "0"),
|
|
1638
1638
|
10,
|
|
1639
1639
|
O,
|
|
1640
1640
|
b
|
|
1641
|
-
), U.e = U.c.length), z = y(x, S, O, D ? (v = g, b) : (v = b, g)),
|
|
1641
|
+
), U.e = U.c.length), z = y(x, S, O, D ? (v = g, b) : (v = b, g)), I = E = z.length; z[--E] == 0; z.pop()) ;
|
|
1642
1642
|
if (!z[0]) return v.charAt(0);
|
|
1643
|
-
if (H < 0 ? --
|
|
1644
|
-
x = k ? cn(v.charAt(1), -
|
|
1643
|
+
if (H < 0 ? --I : (F.c = z, F.e = I, F.s = C, F = t(F, U, te, q, O), z = F.c, k = F.r, I = F.e), R = I + te + 1, H = z[R], E = O / 2, k = k || R < 0 || z[R + 1] != null, k = q < 4 ? (H != null || k) && (q == 0 || q == (F.s < 0 ? 3 : 2)) : H > E || H == E && (q == 4 || k || q == 6 && z[R - 1] & 1 || q == (F.s < 0 ? 8 : 7)), R < 1 || !z[0])
|
|
1644
|
+
x = k ? cn(v.charAt(1), -te, v.charAt(0)) : v.charAt(0);
|
|
1645
1645
|
else {
|
|
1646
1646
|
if (z.length = R, k)
|
|
1647
1647
|
for (--O; ++z[--R] > O; )
|
|
1648
|
-
z[R] = 0, R || (++
|
|
1648
|
+
z[R] = 0, R || (++I, z = [1].concat(z));
|
|
1649
1649
|
for (E = z.length; !z[--E]; ) ;
|
|
1650
1650
|
for (H = 0, x = ""; H <= E; x += v.charAt(z[H++])) ;
|
|
1651
|
-
x = cn(x,
|
|
1651
|
+
x = cn(x, I, v.charAt(0));
|
|
1652
1652
|
}
|
|
1653
1653
|
return x;
|
|
1654
1654
|
};
|
|
1655
1655
|
}(), t = /* @__PURE__ */ function() {
|
|
1656
|
-
function b(S, O,
|
|
1657
|
-
var D, v, R,
|
|
1656
|
+
function b(S, O, C) {
|
|
1657
|
+
var D, v, R, I, E = 0, k = S.length, F = O % On, z = O / On | 0;
|
|
1658
1658
|
for (S = S.slice(); k--; )
|
|
1659
|
-
R = S[k] % On,
|
|
1659
|
+
R = S[k] % On, I = S[k] / On | 0, D = z * R + I * F, v = F * R + D % On * On + E, E = (v / C | 0) + (D / On | 0) + z * I, S[k] = v % C;
|
|
1660
1660
|
return E && (S = [E].concat(S)), S;
|
|
1661
1661
|
}
|
|
1662
|
-
function y(S, O,
|
|
1662
|
+
function y(S, O, C, D) {
|
|
1663
1663
|
var v, R;
|
|
1664
|
-
if (
|
|
1665
|
-
R =
|
|
1664
|
+
if (C != D)
|
|
1665
|
+
R = C > D ? 1 : -1;
|
|
1666
1666
|
else
|
|
1667
|
-
for (v = R = 0; v <
|
|
1667
|
+
for (v = R = 0; v < C; v++)
|
|
1668
1668
|
if (S[v] != O[v]) {
|
|
1669
1669
|
R = S[v] > O[v] ? 1 : -1;
|
|
1670
1670
|
break;
|
|
1671
1671
|
}
|
|
1672
1672
|
return R;
|
|
1673
1673
|
}
|
|
1674
|
-
function x(S, O,
|
|
1675
|
-
for (var v = 0;
|
|
1676
|
-
S[
|
|
1674
|
+
function x(S, O, C, D) {
|
|
1675
|
+
for (var v = 0; C--; )
|
|
1676
|
+
S[C] -= v, v = S[C] < O[C] ? 1 : 0, S[C] = v * D + S[C] - O[C];
|
|
1677
1677
|
for (; !S[0] && S.length > 1; S.splice(0, 1)) ;
|
|
1678
1678
|
}
|
|
1679
|
-
return function(S, O,
|
|
1680
|
-
var R,
|
|
1679
|
+
return function(S, O, C, D, v) {
|
|
1680
|
+
var R, I, E, k, F, z, U, H, te, q, _, ne, xe, G, ae, ce, K, Q = S.s == O.s ? 1 : -1, le = S.c, se = O.c;
|
|
1681
1681
|
if (!le || !le[0] || !se || !se[0])
|
|
1682
1682
|
return new w(
|
|
1683
1683
|
// Return NaN if either NaN, or both Infinity or 0.
|
|
@@ -1686,53 +1686,53 @@ function gd(e) {
|
|
|
1686
1686
|
le && le[0] == 0 || !se ? Q * 0 : Q / 0
|
|
1687
1687
|
)
|
|
1688
1688
|
);
|
|
1689
|
-
for (H = new w(Q),
|
|
1690
|
-
if (se[E] > (le[E] || 0) &&
|
|
1691
|
-
|
|
1689
|
+
for (H = new w(Q), te = H.c = [], I = S.e - O.e, Q = C + I + 1, v || (v = Dt, I = Et(S.e / fe) - Et(O.e / fe), Q = Q / fe | 0), E = 0; se[E] == (le[E] || 0); E++) ;
|
|
1690
|
+
if (se[E] > (le[E] || 0) && I--, Q < 0)
|
|
1691
|
+
te.push(1), k = !0;
|
|
1692
1692
|
else {
|
|
1693
|
-
for (
|
|
1693
|
+
for (G = le.length, ce = se.length, E = 0, Q += 2, F = xt(v / (se[0] + 1)), F > 1 && (se = b(se, F, v), le = b(le, F, v), ce = se.length, G = le.length), xe = ce, q = le.slice(0, ce), _ = q.length; _ < ce; q[_++] = 0) ;
|
|
1694
1694
|
K = se.slice(), K = [0].concat(K), ae = se[0], se[1] >= v / 2 && ae++;
|
|
1695
1695
|
do {
|
|
1696
|
-
if (F = 0, R = y(se,
|
|
1697
|
-
if (ne =
|
|
1698
|
-
for (F >= v && (F = v - 1), z = b(se, F, v), U = z.length, _ =
|
|
1696
|
+
if (F = 0, R = y(se, q, ce, _), R < 0) {
|
|
1697
|
+
if (ne = q[0], ce != _ && (ne = ne * v + (q[1] || 0)), F = xt(ne / ae), F > 1)
|
|
1698
|
+
for (F >= v && (F = v - 1), z = b(se, F, v), U = z.length, _ = q.length; y(z, q, U, _) == 1; )
|
|
1699
1699
|
F--, x(z, ce < U ? K : se, U, v), U = z.length, R = 1;
|
|
1700
1700
|
else
|
|
1701
1701
|
F == 0 && (R = F = 1), z = se.slice(), U = z.length;
|
|
1702
|
-
if (U < _ && (z = [0].concat(z)), x(
|
|
1703
|
-
for (; y(se,
|
|
1704
|
-
F++, x(
|
|
1705
|
-
} else R === 0 && (F++,
|
|
1706
|
-
|
|
1707
|
-
} while ((xe++ <
|
|
1708
|
-
k =
|
|
1702
|
+
if (U < _ && (z = [0].concat(z)), x(q, z, _, v), _ = q.length, R == -1)
|
|
1703
|
+
for (; y(se, q, ce, _) < 1; )
|
|
1704
|
+
F++, x(q, ce < _ ? K : se, _, v), _ = q.length;
|
|
1705
|
+
} else R === 0 && (F++, q = [0]);
|
|
1706
|
+
te[E++] = F, q[0] ? q[_++] = le[xe] || 0 : (q = [le[xe]], _ = 1);
|
|
1707
|
+
} while ((xe++ < G || q[0] != null) && Q--);
|
|
1708
|
+
k = q[0] != null, te[0] || te.splice(0, 1);
|
|
1709
1709
|
}
|
|
1710
1710
|
if (v == Dt) {
|
|
1711
|
-
for (E = 1, Q =
|
|
1712
|
-
B(H,
|
|
1711
|
+
for (E = 1, Q = te[0]; Q >= 10; Q /= 10, E++) ;
|
|
1712
|
+
B(H, C + (H.e = E + I * fe - 1) + 1, D, k);
|
|
1713
1713
|
} else
|
|
1714
|
-
H.e =
|
|
1714
|
+
H.e = I, H.r = +k;
|
|
1715
1715
|
return H;
|
|
1716
1716
|
};
|
|
1717
1717
|
}();
|
|
1718
1718
|
function P(b, y, x, S) {
|
|
1719
|
-
var O,
|
|
1719
|
+
var O, C, D, v, R;
|
|
1720
1720
|
if (x == null ? x = c : Ae(x, 0, 8), !b.c) return b.toString();
|
|
1721
1721
|
if (O = b.c[0], D = b.e, y == null)
|
|
1722
1722
|
R = yt(b.c), R = S == 1 || S == 2 && (D <= a || D >= l) ? cs(R, D) : cn(R, D, "0");
|
|
1723
|
-
else if (b = B(new w(b), y, x),
|
|
1723
|
+
else if (b = B(new w(b), y, x), C = b.e, R = yt(b.c), v = R.length, S == 1 || S == 2 && (y <= C || C <= a)) {
|
|
1724
1724
|
for (; v < y; R += "0", v++) ;
|
|
1725
|
-
R = cs(R,
|
|
1726
|
-
} else if (y -= D + (S === 2 &&
|
|
1725
|
+
R = cs(R, C);
|
|
1726
|
+
} else if (y -= D + (S === 2 && C > D), R = cn(R, C, "0"), C + 1 > v) {
|
|
1727
1727
|
if (--y > 0) for (R += "."; y--; R += "0") ;
|
|
1728
|
-
} else if (y +=
|
|
1729
|
-
for (
|
|
1728
|
+
} else if (y += C - v, y > 0)
|
|
1729
|
+
for (C + 1 == v && (R += "."); y--; R += "0") ;
|
|
1730
1730
|
return b.s < 0 && O ? "-" + R : R;
|
|
1731
1731
|
}
|
|
1732
1732
|
function N(b, y) {
|
|
1733
|
-
for (var x, S, O = 1,
|
|
1734
|
-
S = new w(b[O]), (!S.s || (x = Kn(
|
|
1735
|
-
return
|
|
1733
|
+
for (var x, S, O = 1, C = new w(b[0]); O < b.length; O++)
|
|
1734
|
+
S = new w(b[O]), (!S.s || (x = Kn(C, S)) === y || x === 0 && C.s === y) && (C = S);
|
|
1735
|
+
return C;
|
|
1736
1736
|
}
|
|
1737
1737
|
function $(b, y, x) {
|
|
1738
1738
|
for (var S = 1, O = y.length; !y[--O]; y.pop()) ;
|
|
@@ -1741,57 +1741,57 @@ function gd(e) {
|
|
|
1741
1741
|
}
|
|
1742
1742
|
r = /* @__PURE__ */ function() {
|
|
1743
1743
|
var b = /^(-?)0([xbo])(?=\w[\w.]*$)/i, y = /^([^.]+)\.$/, x = /^\.([^.]+)$/, S = /^-?(Infinity|NaN)$/, O = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
|
|
1744
|
-
return function(
|
|
1745
|
-
var
|
|
1744
|
+
return function(C, D, v, R) {
|
|
1745
|
+
var I, E = v ? D : D.replace(O, "");
|
|
1746
1746
|
if (S.test(E))
|
|
1747
|
-
|
|
1747
|
+
C.s = isNaN(E) ? null : E < 0 ? -1 : 1;
|
|
1748
1748
|
else {
|
|
1749
1749
|
if (!v && (E = E.replace(b, function(k, F, z) {
|
|
1750
|
-
return
|
|
1751
|
-
}), R && (
|
|
1752
|
-
return new w(E,
|
|
1750
|
+
return I = (z = z.toLowerCase()) == "x" ? 16 : z == "b" ? 2 : 8, !R || R == I ? F : k;
|
|
1751
|
+
}), R && (I = R, E = E.replace(y, "$1").replace(x, "0.$1")), D != E))
|
|
1752
|
+
return new w(E, I);
|
|
1753
1753
|
if (w.DEBUG)
|
|
1754
1754
|
throw Error(et + "Not a" + (R ? " base " + R : "") + " number: " + D);
|
|
1755
|
-
|
|
1755
|
+
C.s = null;
|
|
1756
1756
|
}
|
|
1757
|
-
|
|
1757
|
+
C.c = C.e = null;
|
|
1758
1758
|
};
|
|
1759
1759
|
}();
|
|
1760
1760
|
function B(b, y, x, S) {
|
|
1761
|
-
var O,
|
|
1761
|
+
var O, C, D, v, R, I, E, k = b.c, F = ji;
|
|
1762
1762
|
if (k) {
|
|
1763
1763
|
e: {
|
|
1764
1764
|
for (O = 1, v = k[0]; v >= 10; v /= 10, O++) ;
|
|
1765
|
-
if (
|
|
1766
|
-
|
|
1767
|
-
else if (
|
|
1765
|
+
if (C = y - O, C < 0)
|
|
1766
|
+
C += fe, D = y, R = k[I = 0], E = xt(R / F[O - D - 1] % 10);
|
|
1767
|
+
else if (I = Li((C + 1) / fe), I >= k.length)
|
|
1768
1768
|
if (S) {
|
|
1769
|
-
for (; k.length <=
|
|
1770
|
-
R = E = 0, O = 1,
|
|
1769
|
+
for (; k.length <= I; k.push(0)) ;
|
|
1770
|
+
R = E = 0, O = 1, C %= fe, D = C - fe + 1;
|
|
1771
1771
|
} else
|
|
1772
1772
|
break e;
|
|
1773
1773
|
else {
|
|
1774
|
-
for (R = v = k[
|
|
1775
|
-
|
|
1774
|
+
for (R = v = k[I], O = 1; v >= 10; v /= 10, O++) ;
|
|
1775
|
+
C %= fe, D = C - fe + O, E = D < 0 ? 0 : xt(R / F[O - D - 1] % 10);
|
|
1776
1776
|
}
|
|
1777
1777
|
if (S = S || y < 0 || // Are there any non-zero digits after the rounding digit?
|
|
1778
1778
|
// The expression n % pows10[d - j - 1] returns all digits of n to the right
|
|
1779
1779
|
// of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
|
|
1780
|
-
k[
|
|
1781
|
-
(
|
|
1780
|
+
k[I + 1] != null || (D < 0 ? R : R % F[O - D - 1]), S = x < 4 ? (E || S) && (x == 0 || x == (b.s < 0 ? 3 : 2)) : E > 5 || E == 5 && (x == 4 || S || x == 6 && // Check whether the digit to the left of the rounding digit is odd.
|
|
1781
|
+
(C > 0 ? D > 0 ? R / F[O - D] : 0 : k[I - 1]) % 10 & 1 || x == (b.s < 0 ? 8 : 7)), y < 1 || !k[0])
|
|
1782
1782
|
return k.length = 0, S ? (y -= b.e + 1, k[0] = F[(fe - y % fe) % fe], b.e = -y || 0) : k[0] = b.e = 0, b;
|
|
1783
|
-
if (
|
|
1783
|
+
if (C == 0 ? (k.length = I, v = 1, I--) : (k.length = I + 1, v = F[fe - C], k[I] = D > 0 ? xt(R / F[O - D] % F[D]) * v : 0), S)
|
|
1784
1784
|
for (; ; )
|
|
1785
|
-
if (
|
|
1786
|
-
for (
|
|
1785
|
+
if (I == 0) {
|
|
1786
|
+
for (C = 1, D = k[0]; D >= 10; D /= 10, C++) ;
|
|
1787
1787
|
for (D = k[0] += v, v = 1; D >= 10; D /= 10, v++) ;
|
|
1788
|
-
|
|
1788
|
+
C != v && (b.e++, k[0] == Dt && (k[0] = 1));
|
|
1789
1789
|
break;
|
|
1790
1790
|
} else {
|
|
1791
|
-
if (k[
|
|
1792
|
-
k[
|
|
1791
|
+
if (k[I] += v, k[I] != Dt) break;
|
|
1792
|
+
k[I--] = 0, v = 1;
|
|
1793
1793
|
}
|
|
1794
|
-
for (
|
|
1794
|
+
for (C = k.length; k[--C] === 0; k.pop()) ;
|
|
1795
1795
|
}
|
|
1796
1796
|
b.e > f ? b.c = b.e = null : b.e < u && (b.c = [b.e = 0]);
|
|
1797
1797
|
}
|
|
@@ -1807,10 +1807,10 @@ function gd(e) {
|
|
|
1807
1807
|
}, o.comparedTo = function(b, y) {
|
|
1808
1808
|
return Kn(this, new w(b, y));
|
|
1809
1809
|
}, o.decimalPlaces = o.dp = function(b, y) {
|
|
1810
|
-
var x, S, O,
|
|
1810
|
+
var x, S, O, C = this;
|
|
1811
1811
|
if (b != null)
|
|
1812
|
-
return Ae(b, 0, Le), y == null ? y = c : Ae(y, 0, 8), B(new w(
|
|
1813
|
-
if (!(x =
|
|
1812
|
+
return Ae(b, 0, Le), y == null ? y = c : Ae(y, 0, 8), B(new w(C), b + C.e + 1, y);
|
|
1813
|
+
if (!(x = C.c)) return null;
|
|
1814
1814
|
if (S = ((O = x.length - 1) - Et(this.e / fe)) * fe, O = x[O]) for (; O % 10 == 0; O /= 10, S--) ;
|
|
1815
1815
|
return S < 0 && (S = 0), S;
|
|
1816
1816
|
}, o.dividedBy = o.div = function(b, y) {
|
|
@@ -1818,7 +1818,7 @@ function gd(e) {
|
|
|
1818
1818
|
}, o.dividedToIntegerBy = o.idiv = function(b, y) {
|
|
1819
1819
|
return t(this, new w(b, y), 0, 1);
|
|
1820
1820
|
}, o.exponentiatedBy = o.pow = function(b, y) {
|
|
1821
|
-
var x, S, O,
|
|
1821
|
+
var x, S, O, C, D, v, R, I, E, k = this;
|
|
1822
1822
|
if (b = new w(b), b.c && !b.isInteger())
|
|
1823
1823
|
throw Error(et + "Exponent not an integer: " + M(b));
|
|
1824
1824
|
if (y != null && (y = new w(y)), v = b.e > 14, !k.c || !k.c[0] || k.c[0] == 1 && !k.e && k.c.length == 1 || !b.c || !b.c[0])
|
|
@@ -1828,26 +1828,26 @@ function gd(e) {
|
|
|
1828
1828
|
S = !R && k.isInteger() && y.isInteger(), S && (k = k.mod(y));
|
|
1829
1829
|
} else {
|
|
1830
1830
|
if (b.e > 9 && (k.e > 0 || k.e < -1 || (k.e == 0 ? k.c[0] > 1 || v && k.c[1] >= 24e7 : k.c[0] < 8e13 || v && k.c[0] <= 9999975e7)))
|
|
1831
|
-
return
|
|
1832
|
-
h && (
|
|
1831
|
+
return C = k.s < 0 && as(b) ? -0 : 0, k.e > -1 && (C = 1 / C), new w(R ? 1 / C : C);
|
|
1832
|
+
h && (C = Li(h / fe + 2));
|
|
1833
1833
|
}
|
|
1834
|
-
for (v ? (x = new w(0.5), R && (b.s = 1),
|
|
1835
|
-
if (
|
|
1834
|
+
for (v ? (x = new w(0.5), R && (b.s = 1), I = as(b)) : (O = Math.abs(+M(b)), I = O % 2), E = new w(s); ; ) {
|
|
1835
|
+
if (I) {
|
|
1836
1836
|
if (E = E.times(k), !E.c) break;
|
|
1837
|
-
|
|
1837
|
+
C ? E.c.length > C && (E.c.length = C) : S && (E = E.mod(y));
|
|
1838
1838
|
}
|
|
1839
1839
|
if (O) {
|
|
1840
1840
|
if (O = xt(O / 2), O === 0) break;
|
|
1841
|
-
|
|
1841
|
+
I = O % 2;
|
|
1842
1842
|
} else if (b = b.times(x), B(b, b.e + 1, 1), b.e > 14)
|
|
1843
|
-
|
|
1843
|
+
I = as(b);
|
|
1844
1844
|
else {
|
|
1845
1845
|
if (O = +M(b), O === 0) break;
|
|
1846
|
-
|
|
1846
|
+
I = O % 2;
|
|
1847
1847
|
}
|
|
1848
|
-
k = k.times(k),
|
|
1848
|
+
k = k.times(k), C ? k.c && k.c.length > C && (k.c.length = C) : S && (k = k.mod(y));
|
|
1849
1849
|
}
|
|
1850
|
-
return S ? E : (R && (E = s.div(E)), y ? E.mod(y) :
|
|
1850
|
+
return S ? E : (R && (E = s.div(E)), y ? E.mod(y) : C ? B(E, h, c, D) : E);
|
|
1851
1851
|
}, o.integerValue = function(b) {
|
|
1852
1852
|
var y = new w(this);
|
|
1853
1853
|
return b == null ? b = c : Ae(b, 0, 8), B(y, y.e + 1, b);
|
|
@@ -1874,12 +1874,12 @@ function gd(e) {
|
|
|
1874
1874
|
}, o.isZero = function() {
|
|
1875
1875
|
return !!this.c && this.c[0] == 0;
|
|
1876
1876
|
}, o.minus = function(b, y) {
|
|
1877
|
-
var x, S, O,
|
|
1877
|
+
var x, S, O, C, D = this, v = D.s;
|
|
1878
1878
|
if (b = new w(b, y), y = b.s, !v || !y) return new w(NaN);
|
|
1879
1879
|
if (v != y)
|
|
1880
1880
|
return b.s = -y, D.plus(b);
|
|
1881
|
-
var R = D.e / fe,
|
|
1882
|
-
if (!R || !
|
|
1881
|
+
var R = D.e / fe, I = b.e / fe, E = D.c, k = b.c;
|
|
1882
|
+
if (!R || !I) {
|
|
1883
1883
|
if (!E || !k) return E ? (b.s = -y, b) : new w(k ? D : NaN);
|
|
1884
1884
|
if (!E[0] || !k[0])
|
|
1885
1885
|
return k[0] ? (b.s = -y, b) : new w(E[0] ? D : (
|
|
@@ -1887,16 +1887,16 @@ function gd(e) {
|
|
|
1887
1887
|
c == 3 ? -0 : 0
|
|
1888
1888
|
));
|
|
1889
1889
|
}
|
|
1890
|
-
if (R = Et(R),
|
|
1891
|
-
for ((
|
|
1890
|
+
if (R = Et(R), I = Et(I), E = E.slice(), v = R - I) {
|
|
1891
|
+
for ((C = v < 0) ? (v = -v, O = E) : (I = R, O = k), O.reverse(), y = v; y--; O.push(0)) ;
|
|
1892
1892
|
O.reverse();
|
|
1893
1893
|
} else
|
|
1894
|
-
for (S = (
|
|
1894
|
+
for (S = (C = (v = E.length) < (y = k.length)) ? v : y, v = y = 0; y < S; y++)
|
|
1895
1895
|
if (E[y] != k[y]) {
|
|
1896
|
-
|
|
1896
|
+
C = E[y] < k[y];
|
|
1897
1897
|
break;
|
|
1898
1898
|
}
|
|
1899
|
-
if (
|
|
1899
|
+
if (C && (O = E, E = k, k = O, b.s = -b.s), y = (S = k.length) - (x = E.length), y > 0) for (; y--; E[x++] = 0) ;
|
|
1900
1900
|
for (y = Dt - 1; S > v; ) {
|
|
1901
1901
|
if (E[--S] < k[S]) {
|
|
1902
1902
|
for (x = S; x && !E[--x]; E[x] = y) ;
|
|
@@ -1904,20 +1904,20 @@ function gd(e) {
|
|
|
1904
1904
|
}
|
|
1905
1905
|
E[S] -= k[S];
|
|
1906
1906
|
}
|
|
1907
|
-
for (; E[0] == 0; E.splice(0, 1), --
|
|
1908
|
-
return E[0] ? $(b, E,
|
|
1907
|
+
for (; E[0] == 0; E.splice(0, 1), --I) ;
|
|
1908
|
+
return E[0] ? $(b, E, I) : (b.s = c == 3 ? -1 : 1, b.c = [b.e = 0], b);
|
|
1909
1909
|
}, o.modulo = o.mod = function(b, y) {
|
|
1910
1910
|
var x, S, O = this;
|
|
1911
1911
|
return b = new w(b, y), !O.c || !b.s || b.c && !b.c[0] ? new w(NaN) : !b.c || O.c && !O.c[0] ? new w(O) : (d == 9 ? (S = b.s, b.s = 1, x = t(O, b, 0, 3), b.s = S, x.s *= S) : x = t(O, b, 0, d), b = O.minus(x.times(b)), !b.c[0] && d == 1 && (b.s = O.s), b);
|
|
1912
1912
|
}, o.multipliedBy = o.times = function(b, y) {
|
|
1913
|
-
var x, S, O,
|
|
1913
|
+
var x, S, O, C, D, v, R, I, E, k, F, z, U, H, te, q = this, _ = q.c, ne = (b = new w(b, y)).c;
|
|
1914
1914
|
if (!_ || !ne || !_[0] || !ne[0])
|
|
1915
|
-
return !
|
|
1916
|
-
for (S = Et(
|
|
1917
|
-
for (H = Dt,
|
|
1918
|
-
for (x = 0, F = ne[O] %
|
|
1919
|
-
|
|
1920
|
-
U[
|
|
1915
|
+
return !q.s || !b.s || _ && !_[0] && !ne || ne && !ne[0] && !_ ? b.c = b.e = b.s = null : (b.s *= q.s, !_ || !ne ? b.c = b.e = null : (b.c = [0], b.e = 0)), b;
|
|
1916
|
+
for (S = Et(q.e / fe) + Et(b.e / fe), b.s *= q.s, R = _.length, k = ne.length, R < k && (U = _, _ = ne, ne = U, O = R, R = k, k = O), O = R + k, U = []; O--; U.push(0)) ;
|
|
1917
|
+
for (H = Dt, te = On, O = k; --O >= 0; ) {
|
|
1918
|
+
for (x = 0, F = ne[O] % te, z = ne[O] / te | 0, D = R, C = O + D; C > O; )
|
|
1919
|
+
I = _[--D] % te, E = _[D] / te | 0, v = z * I + E * F, I = F * I + v % te * te + U[C] + x, x = (I / H | 0) + (v / te | 0) + z * E, U[C--] = I % H;
|
|
1920
|
+
U[C] = x;
|
|
1921
1921
|
}
|
|
1922
1922
|
return x ? ++S : U.splice(0, 1), $(b, U, S);
|
|
1923
1923
|
}, o.negated = function() {
|
|
@@ -1928,45 +1928,45 @@ function gd(e) {
|
|
|
1928
1928
|
if (b = new w(b, y), y = b.s, !O || !y) return new w(NaN);
|
|
1929
1929
|
if (O != y)
|
|
1930
1930
|
return b.s = -y, S.minus(b);
|
|
1931
|
-
var
|
|
1932
|
-
if (!
|
|
1931
|
+
var C = S.e / fe, D = b.e / fe, v = S.c, R = b.c;
|
|
1932
|
+
if (!C || !D) {
|
|
1933
1933
|
if (!v || !R) return new w(O / 0);
|
|
1934
1934
|
if (!v[0] || !R[0]) return R[0] ? b : new w(v[0] ? S : O * 0);
|
|
1935
1935
|
}
|
|
1936
|
-
if (
|
|
1937
|
-
for (O > 0 ? (D =
|
|
1936
|
+
if (C = Et(C), D = Et(D), v = v.slice(), O = C - D) {
|
|
1937
|
+
for (O > 0 ? (D = C, x = R) : (O = -O, x = v), x.reverse(); O--; x.push(0)) ;
|
|
1938
1938
|
x.reverse();
|
|
1939
1939
|
}
|
|
1940
1940
|
for (O = v.length, y = R.length, O - y < 0 && (x = R, R = v, v = x, y = O), O = 0; y; )
|
|
1941
1941
|
O = (v[--y] = v[y] + R[y] + O) / Dt | 0, v[y] = Dt === v[y] ? 0 : v[y] % Dt;
|
|
1942
1942
|
return O && (v = [O].concat(v), ++D), $(b, v, D);
|
|
1943
1943
|
}, o.precision = o.sd = function(b, y) {
|
|
1944
|
-
var x, S, O,
|
|
1944
|
+
var x, S, O, C = this;
|
|
1945
1945
|
if (b != null && b !== !!b)
|
|
1946
|
-
return Ae(b, 1, Le), y == null ? y = c : Ae(y, 0, 8), B(new w(
|
|
1947
|
-
if (!(x =
|
|
1946
|
+
return Ae(b, 1, Le), y == null ? y = c : Ae(y, 0, 8), B(new w(C), b, y);
|
|
1947
|
+
if (!(x = C.c)) return null;
|
|
1948
1948
|
if (O = x.length - 1, S = O * fe + 1, O = x[O]) {
|
|
1949
1949
|
for (; O % 10 == 0; O /= 10, S--) ;
|
|
1950
1950
|
for (O = x[0]; O >= 10; O /= 10, S++) ;
|
|
1951
1951
|
}
|
|
1952
|
-
return b &&
|
|
1952
|
+
return b && C.e + 1 > S && (S = C.e + 1), S;
|
|
1953
1953
|
}, o.shiftedBy = function(b) {
|
|
1954
1954
|
return Ae(b, -Fi, Fi), this.times("1e" + b);
|
|
1955
1955
|
}, o.squareRoot = o.sqrt = function() {
|
|
1956
|
-
var b, y, x, S, O,
|
|
1956
|
+
var b, y, x, S, O, C = this, D = C.c, v = C.s, R = C.e, I = i + 4, E = new w("0.5");
|
|
1957
1957
|
if (v !== 1 || !D || !D[0])
|
|
1958
|
-
return new w(!v || v < 0 && (!D || D[0]) ? NaN : D ?
|
|
1959
|
-
if (v = Math.sqrt(+M(
|
|
1960
|
-
for (R = x.e, v = R +
|
|
1961
|
-
if (O = x, x = E.times(O.plus(t(
|
|
1958
|
+
return new w(!v || v < 0 && (!D || D[0]) ? NaN : D ? C : 1 / 0);
|
|
1959
|
+
if (v = Math.sqrt(+M(C)), v == 0 || v == 1 / 0 ? (y = yt(D), (y.length + R) % 2 == 0 && (y += "0"), v = Math.sqrt(+y), R = Et((R + 1) / 2) - (R < 0 || R % 2), v == 1 / 0 ? y = "5e" + R : (y = v.toExponential(), y = y.slice(0, y.indexOf("e") + 1) + R), x = new w(y)) : x = new w(v + ""), x.c[0]) {
|
|
1960
|
+
for (R = x.e, v = R + I, v < 3 && (v = 0); ; )
|
|
1961
|
+
if (O = x, x = E.times(O.plus(t(C, O, I, 1))), yt(O.c).slice(0, v) === (y = yt(x.c)).slice(0, v))
|
|
1962
1962
|
if (x.e < R && --v, y = y.slice(v - 3, v + 1), y == "9999" || !S && y == "4999") {
|
|
1963
|
-
if (!S && (B(O, O.e + i + 2, 0), O.times(O).eq(
|
|
1963
|
+
if (!S && (B(O, O.e + i + 2, 0), O.times(O).eq(C))) {
|
|
1964
1964
|
x = O;
|
|
1965
1965
|
break;
|
|
1966
1966
|
}
|
|
1967
|
-
|
|
1967
|
+
I += 4, v += 4, S = 1;
|
|
1968
1968
|
} else {
|
|
1969
|
-
(!+y || !+y.slice(1) && y.charAt(0) == "5") && (B(x, x.e + i + 2, 1), b = !x.times(x).eq(
|
|
1969
|
+
(!+y || !+y.slice(1) && y.charAt(0) == "5") && (B(x, x.e + i + 2, 1), b = !x.times(x).eq(C));
|
|
1970
1970
|
break;
|
|
1971
1971
|
}
|
|
1972
1972
|
}
|
|
@@ -1982,10 +1982,10 @@ function gd(e) {
|
|
|
1982
1982
|
else if (typeof x != "object")
|
|
1983
1983
|
throw Error(et + "Argument not an object: " + x);
|
|
1984
1984
|
if (S = O.toFixed(b, y), O.c) {
|
|
1985
|
-
var
|
|
1986
|
-
if (R && (
|
|
1987
|
-
for (
|
|
1988
|
-
R > 0 && (E +=
|
|
1985
|
+
var C, D = S.split("."), v = +x.groupSize, R = +x.secondaryGroupSize, I = x.groupSeparator || "", E = D[0], k = D[1], F = O.s < 0, z = F ? E.slice(1) : E, U = z.length;
|
|
1986
|
+
if (R && (C = v, v = R, R = C, U -= C), v > 0 && U > 0) {
|
|
1987
|
+
for (C = U % v || v, E = z.substr(0, C); C < U; C += v) E += I + z.substr(C, v);
|
|
1988
|
+
R > 0 && (E += I + z.slice(C)), F && (E = "-" + E);
|
|
1989
1989
|
}
|
|
1990
1990
|
S = k ? E + (x.decimalSeparator || "") + ((R = +x.fractionGroupSize) ? k.replace(
|
|
1991
1991
|
new RegExp("\\d{" + R + "}\\B", "g"),
|
|
@@ -1994,15 +1994,15 @@ function gd(e) {
|
|
|
1994
1994
|
}
|
|
1995
1995
|
return (x.prefix || "") + S + (x.suffix || "");
|
|
1996
1996
|
}, o.toFraction = function(b) {
|
|
1997
|
-
var y, x, S, O,
|
|
1997
|
+
var y, x, S, O, C, D, v, R, I, E, k, F, z = this, U = z.c;
|
|
1998
1998
|
if (b != null && (v = new w(b), !v.isInteger() && (v.c || v.s !== 1) || v.lt(s)))
|
|
1999
1999
|
throw Error(et + "Argument " + (v.isInteger() ? "out of range: " : "not an integer: ") + M(v));
|
|
2000
2000
|
if (!U) return new w(z);
|
|
2001
|
-
for (y = new w(s),
|
|
2002
|
-
x = S, S = O,
|
|
2003
|
-
return O = t(b.minus(x), S, 0, 1), R = R.plus(O.times(
|
|
2004
|
-
t(R, x,
|
|
2005
|
-
) < 1 ? [
|
|
2001
|
+
for (y = new w(s), I = x = new w(s), S = R = new w(s), F = yt(U), C = y.e = F.length - z.e - 1, y.c[0] = ji[(D = C % fe) < 0 ? fe + D : D], b = !b || v.comparedTo(y) > 0 ? C > 0 ? y : I : v, D = f, f = 1 / 0, v = new w(F), R.c[0] = 0; E = t(v, y, 0, 1), O = x.plus(E.times(S)), O.comparedTo(b) != 1; )
|
|
2002
|
+
x = S, S = O, I = R.plus(E.times(O = I)), R = O, y = v.minus(E.times(O = y)), v = O;
|
|
2003
|
+
return O = t(b.minus(x), S, 0, 1), R = R.plus(O.times(I)), x = x.plus(O.times(S)), R.s = I.s = z.s, C = C * 2, k = t(I, S, C, c).minus(z).abs().comparedTo(
|
|
2004
|
+
t(R, x, C, c).minus(z).abs()
|
|
2005
|
+
) < 1 ? [I, S] : [R, x], f = D, k;
|
|
2006
2006
|
}, o.toNumber = function() {
|
|
2007
2007
|
return +M(this);
|
|
2008
2008
|
}, o.toPrecision = function(b, y) {
|
|
@@ -2059,7 +2059,7 @@ function cn(e, t, n) {
|
|
|
2059
2059
|
return e;
|
|
2060
2060
|
}
|
|
2061
2061
|
var _e = gd();
|
|
2062
|
-
const
|
|
2062
|
+
const IP = (e, t = 6) => {
|
|
2063
2063
|
try {
|
|
2064
2064
|
const n = new _e(e || "0");
|
|
2065
2065
|
if (n.isNaN())
|
|
@@ -2219,10 +2219,10 @@ function Ob(e) {
|
|
|
2219
2219
|
return Tn(Ed, e);
|
|
2220
2220
|
}
|
|
2221
2221
|
const Pd = /^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;
|
|
2222
|
-
function
|
|
2222
|
+
function Cb(e) {
|
|
2223
2223
|
return Pd.test(e);
|
|
2224
2224
|
}
|
|
2225
|
-
function
|
|
2225
|
+
function Ib(e) {
|
|
2226
2226
|
return Tn(Pd, e);
|
|
2227
2227
|
}
|
|
2228
2228
|
const Sd = /^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;
|
|
@@ -2255,7 +2255,7 @@ const pu = /* @__PURE__ */ new Set([
|
|
|
2255
2255
|
"indexed",
|
|
2256
2256
|
"storage",
|
|
2257
2257
|
"calldata"
|
|
2258
|
-
]), jb = /* @__PURE__ */ new Set(["indexed"]),
|
|
2258
|
+
]), jb = /* @__PURE__ */ new Set(["indexed"]), Ca = /* @__PURE__ */ new Set([
|
|
2259
2259
|
"calldata",
|
|
2260
2260
|
"memory",
|
|
2261
2261
|
"storage"
|
|
@@ -2514,8 +2514,8 @@ const zi = /* @__PURE__ */ new Map([
|
|
|
2514
2514
|
{ type: "uint256", name: "tokenId", indexed: !0 }
|
|
2515
2515
|
]
|
|
2516
2516
|
]);
|
|
2517
|
-
function
|
|
2518
|
-
if (
|
|
2517
|
+
function Ia(e, t = {}) {
|
|
2518
|
+
if (Cb(e))
|
|
2519
2519
|
return e1(e, t);
|
|
2520
2520
|
if (Rb(e))
|
|
2521
2521
|
return t1(e, t);
|
|
@@ -2533,13 +2533,13 @@ function Ca(e, t = {}) {
|
|
|
2533
2533
|
throw new Zb({ signature: e });
|
|
2534
2534
|
}
|
|
2535
2535
|
function e1(e, t = {}) {
|
|
2536
|
-
const n =
|
|
2536
|
+
const n = Ib(e);
|
|
2537
2537
|
if (!n)
|
|
2538
2538
|
throw new _r({ signature: e, type: "function" });
|
|
2539
2539
|
const r = ft(n.parameters), o = [], s = r.length;
|
|
2540
2540
|
for (let c = 0; c < s; c++)
|
|
2541
2541
|
o.push(wn(r[c], {
|
|
2542
|
-
modifiers:
|
|
2542
|
+
modifiers: Ca,
|
|
2543
2543
|
structs: t,
|
|
2544
2544
|
type: "function"
|
|
2545
2545
|
}));
|
|
@@ -2548,7 +2548,7 @@ function e1(e, t = {}) {
|
|
|
2548
2548
|
const c = ft(n.returns), a = c.length;
|
|
2549
2549
|
for (let l = 0; l < a; l++)
|
|
2550
2550
|
i.push(wn(c[l], {
|
|
2551
|
-
modifiers:
|
|
2551
|
+
modifiers: Ca,
|
|
2552
2552
|
structs: t,
|
|
2553
2553
|
type: "function"
|
|
2554
2554
|
}));
|
|
@@ -2639,7 +2639,7 @@ function wn(e, t) {
|
|
|
2639
2639
|
type: t == null ? void 0 : t.type,
|
|
2640
2640
|
modifier: o.modifier
|
|
2641
2641
|
});
|
|
2642
|
-
if (
|
|
2642
|
+
if (Ca.has(o.modifier) && !u1(a, !!o.array))
|
|
2643
2643
|
throw new qb({
|
|
2644
2644
|
param: e,
|
|
2645
2645
|
type: t == null ? void 0 : t.type,
|
|
@@ -2747,20 +2747,20 @@ function Od(e) {
|
|
|
2747
2747
|
const t = _c(e), n = [], r = e.length;
|
|
2748
2748
|
for (let o = 0; o < r; o++) {
|
|
2749
2749
|
const s = e[o];
|
|
2750
|
-
Ys(s) || n.push(
|
|
2750
|
+
Ys(s) || n.push(Ia(s, t));
|
|
2751
2751
|
}
|
|
2752
2752
|
return n;
|
|
2753
2753
|
}
|
|
2754
2754
|
function hu(e) {
|
|
2755
2755
|
let t;
|
|
2756
2756
|
if (typeof e == "string")
|
|
2757
|
-
t =
|
|
2757
|
+
t = Ia(e);
|
|
2758
2758
|
else {
|
|
2759
2759
|
const n = _c(e), r = e.length;
|
|
2760
2760
|
for (let o = 0; o < r; o++) {
|
|
2761
2761
|
const s = e[o];
|
|
2762
2762
|
if (!Ys(s)) {
|
|
2763
|
-
t =
|
|
2763
|
+
t = Ia(s, n);
|
|
2764
2764
|
break;
|
|
2765
2765
|
}
|
|
2766
2766
|
}
|
|
@@ -2811,13 +2811,13 @@ function d1(e, { includeName: t }) {
|
|
|
2811
2811
|
function tn(e, { strict: t = !0 } = {}) {
|
|
2812
2812
|
return !e || typeof e != "string" ? !1 : t ? /^0x[0-9a-fA-F]*$/.test(e) : e.startsWith("0x");
|
|
2813
2813
|
}
|
|
2814
|
-
function
|
|
2814
|
+
function Ce(e) {
|
|
2815
2815
|
return tn(e, { strict: !1 }) ? Math.ceil((e.length - 2) / 2) : e.length;
|
|
2816
2816
|
}
|
|
2817
|
-
const
|
|
2817
|
+
const Cd = "2.42.1";
|
|
2818
2818
|
let eo = {
|
|
2819
2819
|
getDocsUrl: ({ docsBaseUrl: e, docsPath: t = "", docsSlug: n }) => t ? `${e ?? "https://viem.sh"}${t}${n ? `#${n}` : ""}` : void 0,
|
|
2820
|
-
version: `viem@${
|
|
2820
|
+
version: `viem@${Cd}`
|
|
2821
2821
|
}, W = class $a extends Error {
|
|
2822
2822
|
constructor(t, n = {}) {
|
|
2823
2823
|
var c;
|
|
@@ -2863,14 +2863,14 @@ let eo = {
|
|
|
2863
2863
|
configurable: !0,
|
|
2864
2864
|
writable: !0,
|
|
2865
2865
|
value: "BaseError"
|
|
2866
|
-
}), this.details = r, this.docsPath = o, this.metaMessages = n.metaMessages, this.name = n.name ?? this.name, this.shortMessage = t, this.version =
|
|
2866
|
+
}), this.details = r, this.docsPath = o, this.metaMessages = n.metaMessages, this.name = n.name ?? this.name, this.shortMessage = t, this.version = Cd;
|
|
2867
2867
|
}
|
|
2868
2868
|
walk(t) {
|
|
2869
|
-
return
|
|
2869
|
+
return Id(this, t);
|
|
2870
2870
|
}
|
|
2871
2871
|
};
|
|
2872
|
-
function
|
|
2873
|
-
return t != null && t(e) ? e : e && typeof e == "object" && "cause" in e && e.cause !== void 0 ?
|
|
2872
|
+
function Id(e, t) {
|
|
2873
|
+
return t != null && t(e) ? e : e && typeof e == "object" && "cause" in e && e.cause !== void 0 ? Id(e.cause, t) : t ? null : e;
|
|
2874
2874
|
}
|
|
2875
2875
|
class p1 extends W {
|
|
2876
2876
|
constructor({ docsPath: t }) {
|
|
@@ -2942,7 +2942,7 @@ class h1 extends W {
|
|
|
2942
2942
|
}
|
|
2943
2943
|
class m1 extends W {
|
|
2944
2944
|
constructor({ expectedSize: t, value: n }) {
|
|
2945
|
-
super(`Size of bytes "${n}" (bytes${
|
|
2945
|
+
super(`Size of bytes "${n}" (bytes${Ce(n)}) does not match expected size (bytes${t}).`, { name: "AbiEncodingBytesSizeMismatchError" });
|
|
2946
2946
|
}
|
|
2947
2947
|
}
|
|
2948
2948
|
class b1 extends W {
|
|
@@ -3240,7 +3240,7 @@ class O1 extends W {
|
|
|
3240
3240
|
super(`Hex value "${t}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`, { name: "InvalidHexBooleanError" });
|
|
3241
3241
|
}
|
|
3242
3242
|
}
|
|
3243
|
-
let
|
|
3243
|
+
let C1 = class extends W {
|
|
3244
3244
|
constructor({ givenSize: t, maxSize: n }) {
|
|
3245
3245
|
super(`Size cannot exceed ${n} bytes. Given size: ${t} bytes.`, { name: "SizeOverflowError" });
|
|
3246
3246
|
}
|
|
@@ -3252,9 +3252,9 @@ function Qn(e, { dir: t = "left" } = {}) {
|
|
|
3252
3252
|
return n = t === "left" ? n.slice(r) : n.slice(0, n.length - r), typeof e == "string" ? (n.length === 1 && t === "right" && (n = `${n}0`), `0x${n.length % 2 === 1 ? `0${n}` : n}`) : n;
|
|
3253
3253
|
}
|
|
3254
3254
|
function Wt(e, { size: t }) {
|
|
3255
|
-
if (
|
|
3256
|
-
throw new
|
|
3257
|
-
givenSize:
|
|
3255
|
+
if (Ce(e) > t)
|
|
3256
|
+
throw new C1({
|
|
3257
|
+
givenSize: Ce(e),
|
|
3258
3258
|
maxSize: t
|
|
3259
3259
|
});
|
|
3260
3260
|
}
|
|
@@ -3267,7 +3267,7 @@ function nn(e, t = {}) {
|
|
|
3267
3267
|
const o = (e.length - 2) / 2, s = (1n << BigInt(o) * 8n - 1n) - 1n;
|
|
3268
3268
|
return r <= s ? r : r - BigInt(`0x${"f".padStart(o * 2, "f")}`) - 1n;
|
|
3269
3269
|
}
|
|
3270
|
-
function
|
|
3270
|
+
function I1(e, t = {}) {
|
|
3271
3271
|
let n = e;
|
|
3272
3272
|
if (t.size && (Wt(n, { size: t.size }), n = Qn(n)), Qn(n) === "0x00")
|
|
3273
3273
|
return !1;
|
|
@@ -3683,19 +3683,19 @@ function Fr(e, t, n, { strict: r } = {}) {
|
|
|
3683
3683
|
});
|
|
3684
3684
|
}
|
|
3685
3685
|
function Kd(e, t) {
|
|
3686
|
-
if (typeof t == "number" && t > 0 && t >
|
|
3686
|
+
if (typeof t == "number" && t > 0 && t > Ce(e) - 1)
|
|
3687
3687
|
throw new Md({
|
|
3688
3688
|
offset: t,
|
|
3689
3689
|
position: "start",
|
|
3690
|
-
size:
|
|
3690
|
+
size: Ce(e)
|
|
3691
3691
|
});
|
|
3692
3692
|
}
|
|
3693
3693
|
function Zd(e, t, n) {
|
|
3694
|
-
if (typeof t == "number" && typeof n == "number" &&
|
|
3694
|
+
if (typeof t == "number" && typeof n == "number" && Ce(e) !== n - t)
|
|
3695
3695
|
throw new Md({
|
|
3696
3696
|
offset: n,
|
|
3697
3697
|
position: "end",
|
|
3698
|
-
size:
|
|
3698
|
+
size: Ce(e)
|
|
3699
3699
|
});
|
|
3700
3700
|
}
|
|
3701
3701
|
function Yd(e, t, n, { strict: r } = {}) {
|
|
@@ -3760,13 +3760,13 @@ function qc(e) {
|
|
|
3760
3760
|
let t = 0;
|
|
3761
3761
|
for (let s = 0; s < e.length; s++) {
|
|
3762
3762
|
const { dynamic: i, encoded: c } = e[s];
|
|
3763
|
-
i ? t += 32 : t +=
|
|
3763
|
+
i ? t += 32 : t += Ce(c);
|
|
3764
3764
|
}
|
|
3765
3765
|
const n = [], r = [];
|
|
3766
3766
|
let o = 0;
|
|
3767
3767
|
for (let s = 0; s < e.length; s++) {
|
|
3768
3768
|
const { dynamic: i, encoded: c } = e[s];
|
|
3769
|
-
i ? (n.push(oe(t + o, { size: 32 })), r.push(c), o +=
|
|
3769
|
+
i ? (n.push(oe(t + o, { size: 32 })), r.push(c), o += Ce(c)) : n.push(c);
|
|
3770
3770
|
}
|
|
3771
3771
|
return on([...n, ...r]);
|
|
3772
3772
|
}
|
|
@@ -3809,7 +3809,7 @@ function gg(e, { length: t, param: n }) {
|
|
|
3809
3809
|
};
|
|
3810
3810
|
}
|
|
3811
3811
|
function yg(e, { param: t }) {
|
|
3812
|
-
const [, n] = t.type.split("bytes"), r =
|
|
3812
|
+
const [, n] = t.type.split("bytes"), r = Ce(e);
|
|
3813
3813
|
if (!n) {
|
|
3814
3814
|
let o = e;
|
|
3815
3815
|
return r % 32 !== 0 && (o = Bn(o, {
|
|
@@ -3853,7 +3853,7 @@ function wg(e, { signed: t, size: n = 256 }) {
|
|
|
3853
3853
|
};
|
|
3854
3854
|
}
|
|
3855
3855
|
function xg(e) {
|
|
3856
|
-
const t = ho(e), n = Math.ceil(
|
|
3856
|
+
const t = ho(e), n = Math.ceil(Ce(t) / 32), r = [];
|
|
3857
3857
|
for (let o = 0; o < n; o++)
|
|
3858
3858
|
r.push(Bn(Fr(t, o * 32, (o + 1) * 32), {
|
|
3859
3859
|
dir: "right"
|
|
@@ -3861,7 +3861,7 @@ function xg(e) {
|
|
|
3861
3861
|
return {
|
|
3862
3862
|
dynamic: !0,
|
|
3863
3863
|
encoded: on([
|
|
3864
|
-
Bn(oe(
|
|
3864
|
+
Bn(oe(Ce(t), { size: 32 })),
|
|
3865
3865
|
...r
|
|
3866
3866
|
])
|
|
3867
3867
|
};
|
|
@@ -4235,19 +4235,19 @@ function bn(e, t = {}) {
|
|
|
4235
4235
|
const n = Me(e, t);
|
|
4236
4236
|
return xn(n, t);
|
|
4237
4237
|
}
|
|
4238
|
-
function
|
|
4238
|
+
function Cg(e, t = {}) {
|
|
4239
4239
|
let n = e;
|
|
4240
4240
|
return typeof t.size < "u" && (Wt(n, { size: t.size }), n = Qn(n, { dir: "right" })), new TextDecoder().decode(n);
|
|
4241
4241
|
}
|
|
4242
4242
|
function Ko(e, t) {
|
|
4243
4243
|
const n = typeof t == "string" ? rn(t) : t, r = Zc(n);
|
|
4244
|
-
if (
|
|
4244
|
+
if (Ce(n) === 0 && e.length > 0)
|
|
4245
4245
|
throw new Ho();
|
|
4246
|
-
if (
|
|
4246
|
+
if (Ce(t) && Ce(t) < 32)
|
|
4247
4247
|
throw new $d({
|
|
4248
4248
|
data: typeof t == "string" ? t : Me(t),
|
|
4249
4249
|
params: e,
|
|
4250
|
-
size:
|
|
4250
|
+
size: Ce(t)
|
|
4251
4251
|
});
|
|
4252
4252
|
let o = 0;
|
|
4253
4253
|
const s = [];
|
|
@@ -4270,7 +4270,7 @@ function Or(e, t, { staticPosition: n }) {
|
|
|
4270
4270
|
if (t.type === "tuple")
|
|
4271
4271
|
return Mg(e, t, { staticPosition: n });
|
|
4272
4272
|
if (t.type === "address")
|
|
4273
|
-
return
|
|
4273
|
+
return Ig(e);
|
|
4274
4274
|
if (t.type === "bool")
|
|
4275
4275
|
return Dg(e);
|
|
4276
4276
|
if (t.type.startsWith("bytes"))
|
|
@@ -4284,7 +4284,7 @@ function Or(e, t, { staticPosition: n }) {
|
|
|
4284
4284
|
});
|
|
4285
4285
|
}
|
|
4286
4286
|
const Ou = 32, ka = 32;
|
|
4287
|
-
function
|
|
4287
|
+
function Ig(e) {
|
|
4288
4288
|
const t = e.readBytes(32);
|
|
4289
4289
|
return [ti(Me(Yd(t, -20))), 32];
|
|
4290
4290
|
}
|
|
@@ -4377,7 +4377,7 @@ function Lg(e, { staticPosition: t }) {
|
|
|
4377
4377
|
const o = bn(e.readBytes(32));
|
|
4378
4378
|
if (o === 0)
|
|
4379
4379
|
return e.setPosition(t + 32), ["", 32];
|
|
4380
|
-
const s = e.readBytes(o, 32), i =
|
|
4380
|
+
const s = e.readBytes(o, 32), i = Cg(Qn(s));
|
|
4381
4381
|
return e.setPosition(t + 32), [i, 32];
|
|
4382
4382
|
}
|
|
4383
4383
|
function bo(e) {
|
|
@@ -4447,7 +4447,7 @@ class _g extends W {
|
|
|
4447
4447
|
});
|
|
4448
4448
|
}
|
|
4449
4449
|
}
|
|
4450
|
-
function
|
|
4450
|
+
function Cu(e) {
|
|
4451
4451
|
return e.reduce((t, { slot: n, value: r }) => `${t} ${n}: ${r}
|
|
4452
4452
|
`, "");
|
|
4453
4453
|
}
|
|
@@ -4459,8 +4459,8 @@ function Wg(e) {
|
|
|
4459
4459
|
`), r.balance && (o += ` balance: ${r.balance}
|
|
4460
4460
|
`), r.code && (o += ` code: ${r.code}
|
|
4461
4461
|
`), r.state && (o += ` state:
|
|
4462
|
-
`, o +=
|
|
4463
|
-
`, o +=
|
|
4462
|
+
`, o += Cu(r.state)), r.stateDiff && (o += ` stateDiff:
|
|
4463
|
+
`, o += Cu(r.stateDiff)), o;
|
|
4464
4464
|
}, ` State Override:
|
|
4465
4465
|
`).slice(0, -1);
|
|
4466
4466
|
}
|
|
@@ -4818,7 +4818,7 @@ class Qc extends W {
|
|
|
4818
4818
|
}), this.code = n.code, this.data = n.data, this.url = r;
|
|
4819
4819
|
}
|
|
4820
4820
|
}
|
|
4821
|
-
class
|
|
4821
|
+
class Iu extends W {
|
|
4822
4822
|
constructor({ body: t, url: n }) {
|
|
4823
4823
|
super("The request took too long to respond.", {
|
|
4824
4824
|
details: "The request timed out.",
|
|
@@ -5051,16 +5051,16 @@ Object.defineProperty(So, "code", {
|
|
|
5051
5051
|
writable: !0,
|
|
5052
5052
|
value: -32006
|
|
5053
5053
|
});
|
|
5054
|
-
class
|
|
5054
|
+
class Cr extends ht {
|
|
5055
5055
|
constructor(t) {
|
|
5056
5056
|
super(t, {
|
|
5057
|
-
code:
|
|
5057
|
+
code: Cr.code,
|
|
5058
5058
|
name: "UserRejectedRequestError",
|
|
5059
5059
|
shortMessage: "User rejected the request."
|
|
5060
5060
|
});
|
|
5061
5061
|
}
|
|
5062
5062
|
}
|
|
5063
|
-
Object.defineProperty(
|
|
5063
|
+
Object.defineProperty(Cr, "code", {
|
|
5064
5064
|
enumerable: !0,
|
|
5065
5065
|
configurable: !0,
|
|
5066
5066
|
writable: !0,
|
|
@@ -5141,31 +5141,31 @@ Object.defineProperty(Oo, "code", {
|
|
|
5141
5141
|
writable: !0,
|
|
5142
5142
|
value: 4902
|
|
5143
5143
|
});
|
|
5144
|
-
class
|
|
5144
|
+
class Co extends ht {
|
|
5145
5145
|
constructor(t) {
|
|
5146
5146
|
super(t, {
|
|
5147
|
-
code:
|
|
5147
|
+
code: Co.code,
|
|
5148
5148
|
name: "UnsupportedNonOptionalCapabilityError",
|
|
5149
5149
|
shortMessage: "This Wallet does not support a capability that was not marked as optional."
|
|
5150
5150
|
});
|
|
5151
5151
|
}
|
|
5152
5152
|
}
|
|
5153
|
-
Object.defineProperty(
|
|
5153
|
+
Object.defineProperty(Co, "code", {
|
|
5154
5154
|
enumerable: !0,
|
|
5155
5155
|
configurable: !0,
|
|
5156
5156
|
writable: !0,
|
|
5157
5157
|
value: 5700
|
|
5158
5158
|
});
|
|
5159
|
-
class
|
|
5159
|
+
class Io extends ht {
|
|
5160
5160
|
constructor(t) {
|
|
5161
5161
|
super(t, {
|
|
5162
|
-
code:
|
|
5162
|
+
code: Io.code,
|
|
5163
5163
|
name: "UnsupportedChainIdError",
|
|
5164
5164
|
shortMessage: "This Wallet does not support the requested chain ID."
|
|
5165
5165
|
});
|
|
5166
5166
|
}
|
|
5167
5167
|
}
|
|
5168
|
-
Object.defineProperty(
|
|
5168
|
+
Object.defineProperty(Io, "code", {
|
|
5169
5169
|
enumerable: !0,
|
|
5170
5170
|
configurable: !0,
|
|
5171
5171
|
writable: !0,
|
|
@@ -5276,14 +5276,14 @@ function ey(e) {
|
|
|
5276
5276
|
return ti(`0x${t}`);
|
|
5277
5277
|
}
|
|
5278
5278
|
async function ty({ hash: e, signature: t }) {
|
|
5279
|
-
const n = tn(e) ? e : jn(e), { secp256k1: r } = await Promise.resolve().then(() =>
|
|
5279
|
+
const n = tn(e) ? e : jn(e), { secp256k1: r } = await Promise.resolve().then(() => C6);
|
|
5280
5280
|
return `0x${(() => {
|
|
5281
5281
|
if (typeof t == "object" && "r" in t && "s" in t) {
|
|
5282
5282
|
const { r: l, s: u, v: f, yParity: p } = t, d = Number(p ?? f), h = $u(d);
|
|
5283
5283
|
return new r.Signature(nn(l), nn(u)).addRecoveryBit(h);
|
|
5284
5284
|
}
|
|
5285
5285
|
const i = tn(t) ? t : jn(t);
|
|
5286
|
-
if (
|
|
5286
|
+
if (Ce(i) !== 65)
|
|
5287
5287
|
throw new Error("invalid signature length");
|
|
5288
5288
|
const c = xn(`0x${i.slice(130)}`), a = $u(c);
|
|
5289
5289
|
return r.Signature.fromCompact(i.substring(2, 130)).addRecoveryBit(a);
|
|
@@ -5410,7 +5410,7 @@ Object.defineProperty(Pr, "nodeMessage", {
|
|
|
5410
5410
|
writable: !0,
|
|
5411
5411
|
value: /execution reverted/
|
|
5412
5412
|
});
|
|
5413
|
-
class
|
|
5413
|
+
class Cs extends W {
|
|
5414
5414
|
constructor({ cause: t, maxFeePerGas: n } = {}) {
|
|
5415
5415
|
super(`The fee cap (\`maxFeePerGas\`${n ? ` = ${ot(n)} gwei` : ""}) cannot be higher than the maximum allowed value (2^256-1).`, {
|
|
5416
5416
|
cause: t,
|
|
@@ -5418,7 +5418,7 @@ class Is extends W {
|
|
|
5418
5418
|
});
|
|
5419
5419
|
}
|
|
5420
5420
|
}
|
|
5421
|
-
Object.defineProperty(
|
|
5421
|
+
Object.defineProperty(Cs, "nodeMessage", {
|
|
5422
5422
|
enumerable: !0,
|
|
5423
5423
|
configurable: !0,
|
|
5424
5424
|
writable: !0,
|
|
@@ -5544,7 +5544,7 @@ Object.defineProperty(Wa, "nodeMessage", {
|
|
|
5544
5544
|
writable: !0,
|
|
5545
5545
|
value: /transaction type not valid/
|
|
5546
5546
|
});
|
|
5547
|
-
class
|
|
5547
|
+
class Is extends W {
|
|
5548
5548
|
constructor({ cause: t, maxPriorityFeePerGas: n, maxFeePerGas: r } = {}) {
|
|
5549
5549
|
super([
|
|
5550
5550
|
`The provided tip (\`maxPriorityFeePerGas\`${n ? ` = ${ot(n)} gwei` : ""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r ? ` = ${ot(r)} gwei` : ""}).`
|
|
@@ -5555,7 +5555,7 @@ class Cs extends W {
|
|
|
5555
5555
|
});
|
|
5556
5556
|
}
|
|
5557
5557
|
}
|
|
5558
|
-
Object.defineProperty(
|
|
5558
|
+
Object.defineProperty(Is, "nodeMessage", {
|
|
5559
5559
|
enumerable: !0,
|
|
5560
5560
|
configurable: !0,
|
|
5561
5561
|
writable: !0,
|
|
@@ -5577,13 +5577,13 @@ function oi(e, t) {
|
|
|
5577
5577
|
}) : Pr.nodeMessage.test(n) ? new Pr({
|
|
5578
5578
|
cause: e,
|
|
5579
5579
|
message: e.details
|
|
5580
|
-
}) :
|
|
5580
|
+
}) : Cs.nodeMessage.test(n) ? new Cs({
|
|
5581
5581
|
cause: e,
|
|
5582
5582
|
maxFeePerGas: t == null ? void 0 : t.maxFeePerGas
|
|
5583
5583
|
}) : Ma.nodeMessage.test(n) ? new Ma({
|
|
5584
5584
|
cause: e,
|
|
5585
5585
|
maxFeePerGas: t == null ? void 0 : t.maxFeePerGas
|
|
5586
|
-
}) : La.nodeMessage.test(n) ? new La({ cause: e, nonce: t == null ? void 0 : t.nonce }) : Fa.nodeMessage.test(n) ? new Fa({ cause: e, nonce: t == null ? void 0 : t.nonce }) : ja.nodeMessage.test(n) ? new ja({ cause: e, nonce: t == null ? void 0 : t.nonce }) : za.nodeMessage.test(n) ? new za({ cause: e }) : Ua.nodeMessage.test(n) ? new Ua({ cause: e, gas: t == null ? void 0 : t.gas }) : _a.nodeMessage.test(n) ? new _a({ cause: e, gas: t == null ? void 0 : t.gas }) : Wa.nodeMessage.test(n) ? new Wa({ cause: e }) :
|
|
5586
|
+
}) : La.nodeMessage.test(n) ? new La({ cause: e, nonce: t == null ? void 0 : t.nonce }) : Fa.nodeMessage.test(n) ? new Fa({ cause: e, nonce: t == null ? void 0 : t.nonce }) : ja.nodeMessage.test(n) ? new ja({ cause: e, nonce: t == null ? void 0 : t.nonce }) : za.nodeMessage.test(n) ? new za({ cause: e }) : Ua.nodeMessage.test(n) ? new Ua({ cause: e, gas: t == null ? void 0 : t.gas }) : _a.nodeMessage.test(n) ? new _a({ cause: e, gas: t == null ? void 0 : t.gas }) : Wa.nodeMessage.test(n) ? new Wa({ cause: e }) : Is.nodeMessage.test(n) ? new Is({
|
|
5587
5587
|
cause: e,
|
|
5588
5588
|
maxFeePerGas: t == null ? void 0 : t.maxFeePerGas,
|
|
5589
5589
|
maxPriorityFeePerGas: t == null ? void 0 : t.maxPriorityFeePerGas
|
|
@@ -5683,9 +5683,9 @@ function Gr(e) {
|
|
|
5683
5683
|
if (o && !Nt(o))
|
|
5684
5684
|
throw new zn({ address: o });
|
|
5685
5685
|
if (n && n > f0)
|
|
5686
|
-
throw new
|
|
5686
|
+
throw new Cs({ maxFeePerGas: n });
|
|
5687
5687
|
if (r && n && r > n)
|
|
5688
|
-
throw new
|
|
5688
|
+
throw new Is({ maxFeePerGas: n, maxPriorityFeePerGas: r });
|
|
5689
5689
|
}
|
|
5690
5690
|
class d0 extends W {
|
|
5691
5691
|
constructor() {
|
|
@@ -5969,7 +5969,7 @@ class yy extends Vc {
|
|
|
5969
5969
|
return this._cloneInto();
|
|
5970
5970
|
}
|
|
5971
5971
|
}
|
|
5972
|
-
const
|
|
5972
|
+
const Cn = /* @__PURE__ */ Uint32Array.from([
|
|
5973
5973
|
1779033703,
|
|
5974
5974
|
3144134277,
|
|
5975
5975
|
1013904242,
|
|
@@ -6043,10 +6043,10 @@ const In = /* @__PURE__ */ Uint32Array.from([
|
|
|
6043
6043
|
2756734187,
|
|
6044
6044
|
3204031479,
|
|
6045
6045
|
3329325298
|
|
6046
|
-
]),
|
|
6046
|
+
]), In = /* @__PURE__ */ new Uint32Array(64);
|
|
6047
6047
|
class wy extends yy {
|
|
6048
6048
|
constructor(t = 32) {
|
|
6049
|
-
super(64, t, 8, !1), this.A =
|
|
6049
|
+
super(64, t, 8, !1), this.A = Cn[0] | 0, this.B = Cn[1] | 0, this.C = Cn[2] | 0, this.D = Cn[3] | 0, this.E = Cn[4] | 0, this.F = Cn[5] | 0, this.G = Cn[6] | 0, this.H = Cn[7] | 0;
|
|
6050
6050
|
}
|
|
6051
6051
|
get() {
|
|
6052
6052
|
const { A: t, B: n, C: r, D: o, E: s, F: i, G: c, H: a } = this;
|
|
@@ -6058,20 +6058,20 @@ class wy extends yy {
|
|
|
6058
6058
|
}
|
|
6059
6059
|
process(t, n) {
|
|
6060
6060
|
for (let f = 0; f < 16; f++, n += 4)
|
|
6061
|
-
|
|
6061
|
+
In[f] = t.getUint32(n, !1);
|
|
6062
6062
|
for (let f = 16; f < 64; f++) {
|
|
6063
|
-
const p =
|
|
6064
|
-
|
|
6063
|
+
const p = In[f - 15], d = In[f - 2], h = Gt(p, 7) ^ Gt(p, 18) ^ p >>> 3, m = Gt(d, 17) ^ Gt(d, 19) ^ d >>> 10;
|
|
6064
|
+
In[f] = m + In[f - 7] + h + In[f - 16] | 0;
|
|
6065
6065
|
}
|
|
6066
6066
|
let { A: r, B: o, C: s, D: i, E: c, F: a, G: l, H: u } = this;
|
|
6067
6067
|
for (let f = 0; f < 64; f++) {
|
|
6068
|
-
const p = Gt(c, 6) ^ Gt(c, 11) ^ Gt(c, 25), d = u + p + by(c, a, l) + vy[f] +
|
|
6068
|
+
const p = Gt(c, 6) ^ Gt(c, 11) ^ Gt(c, 25), d = u + p + by(c, a, l) + vy[f] + In[f] | 0, m = (Gt(r, 2) ^ Gt(r, 13) ^ Gt(r, 22)) + gy(r, o, s) | 0;
|
|
6069
6069
|
u = l, l = a, a = c, c = i + d | 0, i = s, s = o, o = r, r = d + m | 0;
|
|
6070
6070
|
}
|
|
6071
6071
|
r = r + this.A | 0, o = o + this.B | 0, s = s + this.C | 0, i = i + this.D | 0, c = c + this.E | 0, a = a + this.F | 0, l = l + this.G | 0, u = u + this.H | 0, this.set(r, o, s, i, c, a, l, u);
|
|
6072
6072
|
}
|
|
6073
6073
|
roundClean() {
|
|
6074
|
-
Lr(
|
|
6074
|
+
Lr(In);
|
|
6075
6075
|
}
|
|
6076
6076
|
destroy() {
|
|
6077
6077
|
this.set(0, 0, 0, 0, 0, 0, 0, 0), Lr(this.buffer);
|
|
@@ -6112,7 +6112,7 @@ class Ay extends W {
|
|
|
6112
6112
|
}
|
|
6113
6113
|
}
|
|
6114
6114
|
function Ny(e) {
|
|
6115
|
-
const t = typeof e.data == "string" ? rn(e.data) : e.data, n =
|
|
6115
|
+
const t = typeof e.data == "string" ? rn(e.data) : e.data, n = Ce(t);
|
|
6116
6116
|
if (!n)
|
|
6117
6117
|
throw new Ay();
|
|
6118
6118
|
if (n > Bu)
|
|
@@ -6160,7 +6160,7 @@ function Oy(e) {
|
|
|
6160
6160
|
return typeof e.accessList < "u" ? "eip2930" : "legacy";
|
|
6161
6161
|
throw new Vg({ transaction: e });
|
|
6162
6162
|
}
|
|
6163
|
-
function
|
|
6163
|
+
function Cy(e, { docsPath: t, ...n }) {
|
|
6164
6164
|
const r = (() => {
|
|
6165
6165
|
const o = oi(e, n);
|
|
6166
6166
|
return o instanceof Yo ? e : o;
|
|
@@ -6181,9 +6181,9 @@ async function P0(e, t) {
|
|
|
6181
6181
|
const { account: n = e.account, accessList: r, authorizationList: o, chain: s = e.chain, blobVersionedHashes: i, blobs: c, data: a, gas: l, gasPrice: u, maxFeePerBlobGas: f, maxFeePerGas: p, maxPriorityFeePerGas: d, nonce: h, nonceManager: m, to: g, type: A, value: w, ...P } = t, N = await (async () => {
|
|
6182
6182
|
if (!n || !m || typeof h < "u")
|
|
6183
6183
|
return h;
|
|
6184
|
-
const
|
|
6184
|
+
const C = dt(n), D = s ? s.id : await re(e, sl, "getChainId")({});
|
|
6185
6185
|
return await m.consume({
|
|
6186
|
-
address:
|
|
6186
|
+
address: C.address,
|
|
6187
6187
|
chainId: D,
|
|
6188
6188
|
client: e
|
|
6189
6189
|
});
|
|
@@ -6209,10 +6209,10 @@ async function P0(e, t) {
|
|
|
6209
6209
|
value: w
|
|
6210
6210
|
}, "fillTransaction");
|
|
6211
6211
|
try {
|
|
6212
|
-
const
|
|
6212
|
+
const C = await e.request({
|
|
6213
6213
|
method: "eth_fillTransaction",
|
|
6214
6214
|
params: [M]
|
|
6215
|
-
}), v = (((S = (x = s == null ? void 0 : s.formatters) == null ? void 0 : x.transaction) == null ? void 0 : S.format) || nl)(
|
|
6215
|
+
}), v = (((S = (x = s == null ? void 0 : s.formatters) == null ? void 0 : x.transaction) == null ? void 0 : S.format) || nl)(C.tx);
|
|
6216
6216
|
delete v.blockHash, delete v.blockNumber, delete v.r, delete v.s, delete v.transactionIndex, delete v.v, delete v.yParity, v.data = v.input, v.gas && (v.gas = t.gas ?? v.gas), v.gasPrice && (v.gasPrice = t.gasPrice ?? v.gasPrice), v.maxFeePerBlobGas && (v.maxFeePerBlobGas = t.maxFeePerBlobGas ?? v.maxFeePerBlobGas), v.maxFeePerGas && (v.maxFeePerGas = t.maxFeePerGas ?? v.maxFeePerGas), v.maxPriorityFeePerGas && (v.maxPriorityFeePerGas = t.maxPriorityFeePerGas ?? v.maxPriorityFeePerGas), v.nonce && (v.nonce = t.nonce ?? v.nonce);
|
|
6217
6217
|
const R = await (async () => {
|
|
6218
6218
|
var F, z;
|
|
@@ -6230,20 +6230,20 @@ async function P0(e, t) {
|
|
|
6230
6230
|
throw new d0();
|
|
6231
6231
|
const E = 10 ** (((O = R.toString().split(".")[1]) == null ? void 0 : O.length) ?? 0), k = (F) => F * BigInt(Math.ceil(R * E)) / BigInt(E);
|
|
6232
6232
|
return v.maxFeePerGas && !t.maxFeePerGas && (v.maxFeePerGas = k(v.maxFeePerGas)), v.gasPrice && !t.gasPrice && (v.gasPrice = k(v.gasPrice)), {
|
|
6233
|
-
raw:
|
|
6233
|
+
raw: C.raw,
|
|
6234
6234
|
transaction: {
|
|
6235
6235
|
from: M.from,
|
|
6236
6236
|
...v
|
|
6237
6237
|
}
|
|
6238
6238
|
};
|
|
6239
|
-
} catch (
|
|
6240
|
-
throw
|
|
6239
|
+
} catch (C) {
|
|
6240
|
+
throw Cy(C, {
|
|
6241
6241
|
...t,
|
|
6242
6242
|
chain: e.chain
|
|
6243
6243
|
});
|
|
6244
6244
|
}
|
|
6245
6245
|
}
|
|
6246
|
-
const
|
|
6246
|
+
const Iy = [
|
|
6247
6247
|
"blobVersionedHashes",
|
|
6248
6248
|
"chainId",
|
|
6249
6249
|
"fees",
|
|
@@ -6254,7 +6254,7 @@ const Cy = [
|
|
|
6254
6254
|
async function S0(e, t) {
|
|
6255
6255
|
var N, $, B;
|
|
6256
6256
|
let n = t;
|
|
6257
|
-
const { account: r = e.account, chain: o = e.chain, nonceManager: s, parameters: i =
|
|
6257
|
+
const { account: r = e.account, chain: o = e.chain, nonceManager: s, parameters: i = Iy } = n, c = (() => {
|
|
6258
6258
|
if (typeof (o == null ? void 0 : o.prepareTransactionRequest) == "function")
|
|
6259
6259
|
return {
|
|
6260
6260
|
fn: o.prepareTransactionRequest,
|
|
@@ -6284,7 +6284,7 @@ async function S0(e, t) {
|
|
|
6284
6284
|
phase: "beforeFillTransaction"
|
|
6285
6285
|
}), f ?? (f = n.nonce));
|
|
6286
6286
|
const d = ((i.includes("blobVersionedHashes") || i.includes("sidecars")) && n.kzg && n.blobs || Vi.get(e.uid) === !1 || !["fees", "gas"].some((b) => i.includes(b)) ? !1 : !!(i.includes("chainId") && typeof n.chainId != "number" || i.includes("nonce") && typeof f != "number" || i.includes("fees") && typeof n.gasPrice != "bigint" && (typeof n.maxFeePerGas != "bigint" || typeof n.maxPriorityFeePerGas != "bigint") || i.includes("gas") && typeof n.gas != "bigint")) ? await re(e, P0, "fillTransaction")({ ...n, nonce: f }).then((M) => {
|
|
6287
|
-
const { chainId: b, from: y, gas: x, gasPrice: S, nonce: O, maxFeePerBlobGas:
|
|
6287
|
+
const { chainId: b, from: y, gas: x, gasPrice: S, nonce: O, maxFeePerBlobGas: C, maxFeePerGas: D, maxPriorityFeePerGas: v, type: R, ...I } = M.transaction;
|
|
6288
6288
|
return Vi.set(e.uid, !0), {
|
|
6289
6289
|
...n,
|
|
6290
6290
|
...y ? { from: y } : {},
|
|
@@ -6293,10 +6293,10 @@ async function S0(e, t) {
|
|
|
6293
6293
|
...typeof x < "u" ? { gas: x } : {},
|
|
6294
6294
|
...typeof S < "u" ? { gasPrice: S } : {},
|
|
6295
6295
|
...typeof O < "u" ? { nonce: O } : {},
|
|
6296
|
-
...typeof
|
|
6296
|
+
...typeof C < "u" ? { maxFeePerBlobGas: C } : {},
|
|
6297
6297
|
...typeof D < "u" ? { maxFeePerGas: D } : {},
|
|
6298
6298
|
...typeof v < "u" ? { maxPriorityFeePerGas: v } : {},
|
|
6299
|
-
..."nonceKey" in
|
|
6299
|
+
..."nonceKey" in I && typeof I.nonceKey < "u" ? { nonceKey: I.nonceKey } : {}
|
|
6300
6300
|
};
|
|
6301
6301
|
}).catch((M) => {
|
|
6302
6302
|
var x;
|
|
@@ -6414,9 +6414,9 @@ async function il(e, t) {
|
|
|
6414
6414
|
return A;
|
|
6415
6415
|
const S = (typeof h == "bigint" ? oe(h) : void 0) || m, O = el(b);
|
|
6416
6416
|
Gr(t);
|
|
6417
|
-
const
|
|
6417
|
+
const C = (a = (c = (i = e.chain) == null ? void 0 : i.formatters) == null ? void 0 : c.transactionRequest) == null ? void 0 : a.format, v = (C || Xo)({
|
|
6418
6418
|
// Pick out extra data that might exist on the chain's transaction request type.
|
|
6419
|
-
...si(y, { format:
|
|
6419
|
+
...si(y, { format: C }),
|
|
6420
6420
|
account: o,
|
|
6421
6421
|
accessList: u,
|
|
6422
6422
|
authorizationList: f,
|
|
@@ -6517,7 +6517,7 @@ function $s(e) {
|
|
|
6517
6517
|
abiItem: a,
|
|
6518
6518
|
data: n,
|
|
6519
6519
|
params: h,
|
|
6520
|
-
size:
|
|
6520
|
+
size: Ce(n)
|
|
6521
6521
|
}) : m;
|
|
6522
6522
|
}
|
|
6523
6523
|
else if (s)
|
|
@@ -6790,7 +6790,7 @@ const Gi = (e) => typeof e == "bigint" && ll <= e;
|
|
|
6790
6790
|
function fl(e, t, n) {
|
|
6791
6791
|
return Gi(e) && Gi(t) && Gi(n) && t <= e && e < n;
|
|
6792
6792
|
}
|
|
6793
|
-
function
|
|
6793
|
+
function Ir(e, t, n, r) {
|
|
6794
6794
|
if (!fl(t, n, r))
|
|
6795
6795
|
throw new Error("expected valid " + e + ": " + n + " <= n < " + r + ", got " + t);
|
|
6796
6796
|
}
|
|
@@ -6932,11 +6932,11 @@ class he extends Error {
|
|
|
6932
6932
|
}), this.cause = n.cause, this.details = r, this.docs = i, this.docsPath = o, this.shortMessage = t;
|
|
6933
6933
|
}
|
|
6934
6934
|
walk(t) {
|
|
6935
|
-
return
|
|
6935
|
+
return C0(this, t);
|
|
6936
6936
|
}
|
|
6937
6937
|
}
|
|
6938
|
-
function
|
|
6939
|
-
return t != null && t(e) ? e : e && typeof e == "object" && "cause" in e && e.cause ?
|
|
6938
|
+
function C0(e, t) {
|
|
6939
|
+
return t != null && t(e) ? e : e && typeof e == "object" && "cause" in e && e.cause ? C0(e.cause, t) : t ? null : e;
|
|
6940
6940
|
}
|
|
6941
6941
|
function es(e, t) {
|
|
6942
6942
|
if (Sr(e) > t)
|
|
@@ -6978,7 +6978,7 @@ function Uy(e, t = {}) {
|
|
|
6978
6978
|
}
|
|
6979
6979
|
return o;
|
|
6980
6980
|
}
|
|
6981
|
-
function
|
|
6981
|
+
function I0(e, t = {}) {
|
|
6982
6982
|
const { dir: n = "left" } = t;
|
|
6983
6983
|
let r = e, o = 0;
|
|
6984
6984
|
for (let s = 0; s < r.length - 1 && r[n === "left" ? s : r.length - s - 1].toString() === "0"; s++)
|
|
@@ -7086,10 +7086,10 @@ function ev(e, t = {}) {
|
|
|
7086
7086
|
return typeof n < "u" && (es(r, n), r = tv(r)), Hy.decode(r);
|
|
7087
7087
|
}
|
|
7088
7088
|
function B0(e) {
|
|
7089
|
-
return
|
|
7089
|
+
return I0(e, { dir: "left" });
|
|
7090
7090
|
}
|
|
7091
7091
|
function tv(e) {
|
|
7092
|
-
return
|
|
7092
|
+
return I0(e, { dir: "right" });
|
|
7093
7093
|
}
|
|
7094
7094
|
class nv extends he {
|
|
7095
7095
|
constructor(t) {
|
|
@@ -7927,8 +7927,8 @@ function Z0({ fn: e, id: t, shouldSplitBatch: n, wait: r = 0, sort: o }) {
|
|
|
7927
7927
|
};
|
|
7928
7928
|
}
|
|
7929
7929
|
async function ui(e, t) {
|
|
7930
|
-
var
|
|
7931
|
-
const { account: n = e.account, authorizationList: r, batch: o = !!((
|
|
7930
|
+
var C, D, v, R;
|
|
7931
|
+
const { account: n = e.account, authorizationList: r, batch: o = !!((C = e.batch) != null && C.multicall), blockNumber: s, blockTag: i = e.experimental_blockTag ?? "latest", accessList: c, blobs: a, blockOverrides: l, code: u, data: f, factory: p, factoryData: d, gas: h, gasPrice: m, maxFeePerBlobGas: g, maxFeePerGas: A, maxPriorityFeePerGas: w, nonce: P, to: N, value: $, stateOverride: B, ...M } = t, b = n ? dt(n) : void 0;
|
|
7932
7932
|
if (u && (p || d))
|
|
7933
7933
|
throw new W("Cannot provide both `code` & `factory`/`factoryData` as parameters.");
|
|
7934
7934
|
if (u && N)
|
|
@@ -7972,22 +7972,22 @@ async function ui(e, t) {
|
|
|
7972
7972
|
if (!(_ instanceof G0) && !(_ instanceof qa))
|
|
7973
7973
|
throw _;
|
|
7974
7974
|
}
|
|
7975
|
-
const
|
|
7975
|
+
const te = (() => {
|
|
7976
7976
|
const _ = [
|
|
7977
7977
|
H,
|
|
7978
7978
|
E
|
|
7979
7979
|
];
|
|
7980
7980
|
return F && k ? [..._, F, k] : F ? [..._, F] : k ? [..._, {}, k] : _;
|
|
7981
|
-
})(),
|
|
7981
|
+
})(), q = await e.request({
|
|
7982
7982
|
method: "eth_call",
|
|
7983
|
-
params:
|
|
7983
|
+
params: te
|
|
7984
7984
|
});
|
|
7985
|
-
return
|
|
7986
|
-
} catch (
|
|
7987
|
-
const E = wv(
|
|
7985
|
+
return q === "0x" ? { data: void 0 } : { data: q };
|
|
7986
|
+
} catch (I) {
|
|
7987
|
+
const E = wv(I), { offchainLookup: k, offchainLookupSignature: F } = await import("./ccip-kT5GriPR.mjs");
|
|
7988
7988
|
if (e.ccipRead !== !1 && (E == null ? void 0 : E.slice(0, 10)) === F && N)
|
|
7989
7989
|
return { data: await k(e, { data: E, to: N }) };
|
|
7990
|
-
throw S && (E == null ? void 0 : E.slice(0, 10)) === "0x101bb98d" ? new Yg({ factory: p }) : q0(
|
|
7990
|
+
throw S && (E == null ? void 0 : E.slice(0, 10)) === "0x101bb98d" ? new Yg({ factory: p }) : q0(I, {
|
|
7991
7991
|
...t,
|
|
7992
7992
|
account: b,
|
|
7993
7993
|
chain: e.chain
|
|
@@ -8355,20 +8355,20 @@ function Rv(e, t) {
|
|
|
8355
8355
|
data: y.data,
|
|
8356
8356
|
topics: y.topics,
|
|
8357
8357
|
strict: p
|
|
8358
|
-
}),
|
|
8358
|
+
}), C = En(y, {
|
|
8359
8359
|
args: O,
|
|
8360
8360
|
eventName: S
|
|
8361
8361
|
});
|
|
8362
|
-
N.onLogs([
|
|
8362
|
+
N.onLogs([C]);
|
|
8363
8363
|
} catch (S) {
|
|
8364
|
-
let O,
|
|
8364
|
+
let O, C;
|
|
8365
8365
|
if (S instanceof Os || S instanceof Wc) {
|
|
8366
8366
|
if (p)
|
|
8367
8367
|
return;
|
|
8368
|
-
O = S.abiItem.name,
|
|
8368
|
+
O = S.abiItem.name, C = (x = S.abiItem.inputs) == null ? void 0 : x.some((v) => !("name" in v && v.name));
|
|
8369
8369
|
}
|
|
8370
8370
|
const D = En(y, {
|
|
8371
|
-
args:
|
|
8371
|
+
args: C ? [] : {},
|
|
8372
8372
|
eventName: O
|
|
8373
8373
|
});
|
|
8374
8374
|
N.onLogs([D]);
|
|
@@ -8411,7 +8411,7 @@ function Za(e, { delay: t = 100, retryCount: n = 2, shouldRetry: r = () => !0 }
|
|
|
8411
8411
|
i();
|
|
8412
8412
|
});
|
|
8413
8413
|
}
|
|
8414
|
-
const
|
|
8414
|
+
const Cv = {
|
|
8415
8415
|
"0x0": "reverted",
|
|
8416
8416
|
"0x1": "success"
|
|
8417
8417
|
};
|
|
@@ -8426,7 +8426,7 @@ function X0(e, t) {
|
|
|
8426
8426
|
logs: e.logs ? e.logs.map((r) => En(r)) : null,
|
|
8427
8427
|
to: e.to ? e.to : null,
|
|
8428
8428
|
transactionIndex: e.transactionIndex ? xn(e.transactionIndex) : null,
|
|
8429
|
-
status: e.status ?
|
|
8429
|
+
status: e.status ? Cv[e.status] : null,
|
|
8430
8430
|
type: e.type ? h0[e.type] || e.type : null
|
|
8431
8431
|
};
|
|
8432
8432
|
return e.blobGasPrice && (n.blobGasPrice = BigInt(e.blobGasPrice)), e.blobGasUsed && (n.blobGasUsed = BigInt(e.blobGasUsed)), n;
|
|
@@ -8441,7 +8441,7 @@ function J0(e = 11) {
|
|
|
8441
8441
|
}
|
|
8442
8442
|
return ds.substring(fs, fs++ + e);
|
|
8443
8443
|
}
|
|
8444
|
-
function
|
|
8444
|
+
function Iv(e) {
|
|
8445
8445
|
const { batch: t, chain: n, ccipRead: r, key: o = "base", name: s = "Base Client", type: i = "base" } = e, c = e.experimental_blockTag ?? (typeof (n == null ? void 0 : n.experimental_preconfirmationTime) == "number" ? "pending" : void 0), a = (n == null ? void 0 : n.blockTime) ?? 12e3, l = Math.min(Math.max(Math.floor(a / 2), 500), 4e3), u = e.pollingInterval ?? l, f = e.cacheTime ?? u, p = e.account ? dt(e.account) : void 0, { config: d, request: h, value: m } = e.transport({
|
|
8446
8446
|
account: p,
|
|
8447
8447
|
chain: n,
|
|
@@ -9228,8 +9228,8 @@ function dw(e, t = {}) {
|
|
|
9228
9228
|
throw new jr(d);
|
|
9229
9229
|
case So.code:
|
|
9230
9230
|
throw new So(d);
|
|
9231
|
-
case
|
|
9232
|
-
throw new
|
|
9231
|
+
case Cr.code:
|
|
9232
|
+
throw new Cr(d);
|
|
9233
9233
|
case To.code:
|
|
9234
9234
|
throw new To(d);
|
|
9235
9235
|
case Ao.code:
|
|
@@ -9240,10 +9240,10 @@ function dw(e, t = {}) {
|
|
|
9240
9240
|
throw new Ro(d);
|
|
9241
9241
|
case Oo.code:
|
|
9242
9242
|
throw new Oo(d);
|
|
9243
|
-
case Io.code:
|
|
9244
|
-
throw new Io(d);
|
|
9245
9243
|
case Co.code:
|
|
9246
9244
|
throw new Co(d);
|
|
9245
|
+
case Io.code:
|
|
9246
|
+
throw new Io(d);
|
|
9247
9247
|
case $o.code:
|
|
9248
9248
|
throw new $o(d);
|
|
9249
9249
|
case Do.code:
|
|
@@ -9255,7 +9255,7 @@ function dw(e, t = {}) {
|
|
|
9255
9255
|
case Mo.code:
|
|
9256
9256
|
throw new Mo(d);
|
|
9257
9257
|
case 5e3:
|
|
9258
|
-
throw new
|
|
9258
|
+
throw new Cr(d);
|
|
9259
9259
|
default:
|
|
9260
9260
|
throw p instanceof W ? p : new Jg(d);
|
|
9261
9261
|
}
|
|
@@ -9345,7 +9345,7 @@ function gw(e, t = {}) {
|
|
|
9345
9345
|
}, A = new Request(e, g), w = await (s == null ? void 0 : s(A, g)) ?? { ...g, url: e };
|
|
9346
9346
|
return await o(w.url ?? e, w);
|
|
9347
9347
|
}, {
|
|
9348
|
-
errorInstance: new
|
|
9348
|
+
errorInstance: new Iu({ body: r, url: e }),
|
|
9349
9349
|
timeout: c,
|
|
9350
9350
|
signal: !0
|
|
9351
9351
|
});
|
|
@@ -9373,7 +9373,7 @@ function gw(e, t = {}) {
|
|
|
9373
9373
|
});
|
|
9374
9374
|
return h;
|
|
9375
9375
|
} catch (d) {
|
|
9376
|
-
throw d instanceof io || d instanceof
|
|
9376
|
+
throw d instanceof io || d instanceof Iu ? d : new io({
|
|
9377
9377
|
body: r,
|
|
9378
9378
|
cause: d,
|
|
9379
9379
|
url: e
|
|
@@ -9385,7 +9385,7 @@ function gw(e, t = {}) {
|
|
|
9385
9385
|
const yw = `Ethereum Signed Message:
|
|
9386
9386
|
`;
|
|
9387
9387
|
function vw(e) {
|
|
9388
|
-
const t = typeof e == "string" ? ho(e) : typeof e.raw == "string" ? e.raw : Me(e.raw), n = ho(`${yw}${
|
|
9388
|
+
const t = typeof e == "string" ? ho(e) : typeof e.raw == "string" ? e.raw : Me(e.raw), n = ho(`${yw}${Ce(t)}`);
|
|
9389
9389
|
return on([n, t]);
|
|
9390
9390
|
}
|
|
9391
9391
|
function ip(e, t) {
|
|
@@ -9430,10 +9430,10 @@ function Pw(e) {
|
|
|
9430
9430
|
const d = u.match(hg);
|
|
9431
9431
|
if (d) {
|
|
9432
9432
|
const [m, g] = d;
|
|
9433
|
-
if (g &&
|
|
9433
|
+
if (g && Ce(f) !== Number.parseInt(g, 10))
|
|
9434
9434
|
throw new E1({
|
|
9435
9435
|
expectedSize: Number.parseInt(g, 10),
|
|
9436
|
-
givenSize:
|
|
9436
|
+
givenSize: Ce(f)
|
|
9437
9437
|
});
|
|
9438
9438
|
}
|
|
9439
9439
|
const h = o[u];
|
|
@@ -9565,7 +9565,7 @@ function up({ types: e, name: t, type: n, value: r }) {
|
|
|
9565
9565
|
}
|
|
9566
9566
|
return [{ type: n }, r];
|
|
9567
9567
|
}
|
|
9568
|
-
class
|
|
9568
|
+
class Cw extends Map {
|
|
9569
9569
|
constructor(t) {
|
|
9570
9570
|
super(), Object.defineProperty(this, "maxSize", {
|
|
9571
9571
|
enumerable: !0,
|
|
@@ -9586,9 +9586,9 @@ class Iw extends Map {
|
|
|
9586
9586
|
return this;
|
|
9587
9587
|
}
|
|
9588
9588
|
}
|
|
9589
|
-
const
|
|
9590
|
-
checksum: /* @__PURE__ */ new
|
|
9591
|
-
}, Qi =
|
|
9589
|
+
const Iw = {
|
|
9590
|
+
checksum: /* @__PURE__ */ new Cw(8192)
|
|
9591
|
+
}, Qi = Iw.checksum;
|
|
9592
9592
|
function fp(e, t = {}) {
|
|
9593
9593
|
const { as: n = typeof e == "string" ? "Hex" : "Bytes" } = t, r = Gd(qy(e));
|
|
9594
9594
|
return n === "Bytes" ? r : Ut(r);
|
|
@@ -10885,7 +10885,7 @@ function E6(e) {
|
|
|
10885
10885
|
} catch {
|
|
10886
10886
|
throw new Error("invalid private key, expected hex or " + $ + " bytes, got " + typeof P);
|
|
10887
10887
|
}
|
|
10888
|
-
return B && (b = tt(b, M)),
|
|
10888
|
+
return B && (b = tt(b, M)), Ir("private key", b, je, M), b;
|
|
10889
10889
|
}
|
|
10890
10890
|
function p(P) {
|
|
10891
10891
|
if (!(P instanceof m))
|
|
@@ -11005,8 +11005,8 @@ function E6(e) {
|
|
|
11005
11005
|
// Cost: 8M + 3S + 3*a + 2*b3 + 15add.
|
|
11006
11006
|
double() {
|
|
11007
11007
|
const { a: N, b: $ } = t, B = n.mul($, sa), { px: M, py: b, pz: y } = this;
|
|
11008
|
-
let x = n.ZERO, S = n.ZERO, O = n.ZERO,
|
|
11009
|
-
return R = n.add(R, R), O = n.mul(M, y), O = n.add(O, O), x = n.mul(N, O), S = n.mul(B, v), S = n.add(x, S), x = n.sub(D, S), S = n.add(D, S), S = n.mul(x, S), x = n.mul(R, x), O = n.mul(B, O), v = n.mul(N, v), R = n.sub(
|
|
11008
|
+
let x = n.ZERO, S = n.ZERO, O = n.ZERO, C = n.mul(M, M), D = n.mul(b, b), v = n.mul(y, y), R = n.mul(M, b);
|
|
11009
|
+
return R = n.add(R, R), O = n.mul(M, y), O = n.add(O, O), x = n.mul(N, O), S = n.mul(B, v), S = n.add(x, S), x = n.sub(D, S), S = n.add(D, S), S = n.mul(x, S), x = n.mul(R, x), O = n.mul(B, O), v = n.mul(N, v), R = n.sub(C, v), R = n.mul(N, R), R = n.add(R, O), O = n.add(C, C), C = n.add(O, C), C = n.add(C, v), C = n.mul(C, R), S = n.add(S, C), v = n.mul(b, y), v = n.add(v, v), C = n.mul(v, R), x = n.sub(x, C), O = n.mul(v, D), O = n.add(O, O), O = n.add(O, O), new m(x, S, O);
|
|
11010
11010
|
}
|
|
11011
11011
|
// Renes-Costello-Batina exception-free addition formula.
|
|
11012
11012
|
// There is 30% faster Jacobian formula, but it is not complete.
|
|
@@ -11015,12 +11015,12 @@ function E6(e) {
|
|
|
11015
11015
|
add(N) {
|
|
11016
11016
|
p(N);
|
|
11017
11017
|
const { px: $, py: B, pz: M } = this, { px: b, py: y, pz: x } = N;
|
|
11018
|
-
let S = n.ZERO, O = n.ZERO,
|
|
11018
|
+
let S = n.ZERO, O = n.ZERO, C = n.ZERO;
|
|
11019
11019
|
const D = t.a, v = n.mul(t.b, sa);
|
|
11020
|
-
let R = n.mul($, b),
|
|
11021
|
-
k = n.mul(k, F), F = n.add(R,
|
|
11020
|
+
let R = n.mul($, b), I = n.mul(B, y), E = n.mul(M, x), k = n.add($, B), F = n.add(b, y);
|
|
11021
|
+
k = n.mul(k, F), F = n.add(R, I), k = n.sub(k, F), F = n.add($, M);
|
|
11022
11022
|
let z = n.add(b, x);
|
|
11023
|
-
return F = n.mul(F, z), z = n.add(R, E), F = n.sub(F, z), z = n.add(B, M), S = n.add(y, x), z = n.mul(z, S), S = n.add(
|
|
11023
|
+
return F = n.mul(F, z), z = n.add(R, E), F = n.sub(F, z), z = n.add(B, M), S = n.add(y, x), z = n.mul(z, S), S = n.add(I, E), z = n.sub(z, S), C = n.mul(D, F), S = n.mul(v, E), C = n.add(S, C), S = n.sub(I, C), C = n.add(I, C), O = n.mul(S, C), I = n.add(R, R), I = n.add(I, R), E = n.mul(D, E), F = n.mul(v, F), I = n.add(I, E), E = n.sub(R, E), E = n.mul(D, E), F = n.add(F, E), R = n.mul(I, F), O = n.add(O, R), R = n.mul(z, F), S = n.mul(k, S), S = n.sub(S, R), R = n.mul(k, I), C = n.mul(z, C), C = n.add(C, R), new m(S, O, C);
|
|
11024
11024
|
}
|
|
11025
11025
|
subtract(N) {
|
|
11026
11026
|
return this.add(N.negate());
|
|
@@ -11038,7 +11038,7 @@ function E6(e) {
|
|
|
11038
11038
|
*/
|
|
11039
11039
|
multiplyUnsafe(N) {
|
|
11040
11040
|
const { endo: $, n: B } = t;
|
|
11041
|
-
|
|
11041
|
+
Ir("scalar", N, hn, B);
|
|
11042
11042
|
const M = m.ZERO;
|
|
11043
11043
|
if (N === hn)
|
|
11044
11044
|
return M;
|
|
@@ -11046,10 +11046,10 @@ function E6(e) {
|
|
|
11046
11046
|
return this;
|
|
11047
11047
|
if (!$ || w.hasPrecomputes(this))
|
|
11048
11048
|
return w.wNAFCachedUnsafe(this, N, m.normalizeZ);
|
|
11049
|
-
let { k1neg: b, k1: y, k2neg: x, k2: S } = $.splitScalar(N), O = M,
|
|
11049
|
+
let { k1neg: b, k1: y, k2neg: x, k2: S } = $.splitScalar(N), O = M, C = M, D = this;
|
|
11050
11050
|
for (; y > hn || S > hn; )
|
|
11051
|
-
y & je && (O = O.add(D)), S & je && (
|
|
11052
|
-
return b && (O = O.negate()), x && (
|
|
11051
|
+
y & je && (O = O.add(D)), S & je && (C = C.add(D)), D = D.double(), y >>= je, S >>= je;
|
|
11052
|
+
return b && (O = O.negate()), x && (C = C.negate()), C = new m(n.mul(C.px, $.beta), C.py, C.pz), O.add(C);
|
|
11053
11053
|
}
|
|
11054
11054
|
/**
|
|
11055
11055
|
* Constant time multiplication.
|
|
@@ -11062,12 +11062,12 @@ function E6(e) {
|
|
|
11062
11062
|
*/
|
|
11063
11063
|
multiply(N) {
|
|
11064
11064
|
const { endo: $, n: B } = t;
|
|
11065
|
-
|
|
11065
|
+
Ir("scalar", N, je, B);
|
|
11066
11066
|
let M, b;
|
|
11067
11067
|
if ($) {
|
|
11068
11068
|
const { k1neg: y, k1: x, k2neg: S, k2: O } = $.splitScalar(N);
|
|
11069
|
-
let { p:
|
|
11070
|
-
|
|
11069
|
+
let { p: C, f: D } = this.wNAF(x), { p: v, f: R } = this.wNAF(O);
|
|
11070
|
+
C = w.constTimeNegate(y, C), v = w.constTimeNegate(S, v), v = new m(n.mul(v.px, $.beta), v.py, v.pz), M = C.add(v), b = D.add(R);
|
|
11071
11071
|
} else {
|
|
11072
11072
|
const { p: y, f: x } = this.wNAF(N);
|
|
11073
11073
|
M = y, b = x;
|
|
@@ -11141,13 +11141,13 @@ function S6(e) {
|
|
|
11141
11141
|
}
|
|
11142
11142
|
const { ProjectivePoint: u, normPrivateKeyToScalar: f, weierstrassEquation: p, isWithinCurveOrder: d } = E6({
|
|
11143
11143
|
...t,
|
|
11144
|
-
toBytes(v, R,
|
|
11144
|
+
toBytes(v, R, I) {
|
|
11145
11145
|
const E = R.toAffine(), k = n.toBytes(E.x), F = ks;
|
|
11146
|
-
return Lo("isCompressed",
|
|
11146
|
+
return Lo("isCompressed", I), I ? F(Uint8Array.from([R.hasEvenY() ? 2 : 3]), k) : F(Uint8Array.from([4]), k, n.toBytes(E.y));
|
|
11147
11147
|
},
|
|
11148
11148
|
fromBytes(v) {
|
|
11149
|
-
const R = v.length,
|
|
11150
|
-
if (R === i && (
|
|
11149
|
+
const R = v.length, I = v[0], E = v.subarray(1);
|
|
11150
|
+
if (R === i && (I === 2 || I === 3)) {
|
|
11151
11151
|
const k = tr(E);
|
|
11152
11152
|
if (!fl(k, je, n.ORDER))
|
|
11153
11153
|
throw new Error("Point is not on curve");
|
|
@@ -11155,13 +11155,13 @@ function S6(e) {
|
|
|
11155
11155
|
let z;
|
|
11156
11156
|
try {
|
|
11157
11157
|
z = n.sqrt(F);
|
|
11158
|
-
} catch (
|
|
11159
|
-
const
|
|
11160
|
-
throw new Error("Point is not on curve" +
|
|
11158
|
+
} catch (te) {
|
|
11159
|
+
const q = te instanceof Error ? ": " + te.message : "";
|
|
11160
|
+
throw new Error("Point is not on curve" + q);
|
|
11161
11161
|
}
|
|
11162
11162
|
const U = (z & je) === je;
|
|
11163
|
-
return (
|
|
11164
|
-
} else if (R === c &&
|
|
11163
|
+
return (I & 1) === 1 !== U && (z = n.neg(z)), { x: k, y: z };
|
|
11164
|
+
} else if (R === c && I === 4) {
|
|
11165
11165
|
const k = n.fromBytes(E.subarray(0, n.BYTES)), F = n.fromBytes(E.subarray(n.BYTES, 2 * n.BYTES));
|
|
11166
11166
|
return { x: k, y: F };
|
|
11167
11167
|
} else {
|
|
@@ -11177,21 +11177,21 @@ function S6(e) {
|
|
|
11177
11177
|
function m(v) {
|
|
11178
11178
|
return h(v) ? a(-v) : v;
|
|
11179
11179
|
}
|
|
11180
|
-
const g = (v, R,
|
|
11180
|
+
const g = (v, R, I) => tr(v.slice(R, I));
|
|
11181
11181
|
class A {
|
|
11182
|
-
constructor(R,
|
|
11183
|
-
|
|
11182
|
+
constructor(R, I, E) {
|
|
11183
|
+
Ir("r", R, je, r), Ir("s", I, je, r), this.r = R, this.s = I, E != null && (this.recovery = E), Object.freeze(this);
|
|
11184
11184
|
}
|
|
11185
11185
|
// pair (bytes of r, bytes of s)
|
|
11186
11186
|
static fromCompact(R) {
|
|
11187
|
-
const
|
|
11188
|
-
return R = St("compactSignature", R,
|
|
11187
|
+
const I = o;
|
|
11188
|
+
return R = St("compactSignature", R, I * 2), new A(g(R, 0, I), g(R, I, 2 * I));
|
|
11189
11189
|
}
|
|
11190
11190
|
// DER encoded ECDSA signature
|
|
11191
11191
|
// https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script
|
|
11192
11192
|
static fromDER(R) {
|
|
11193
|
-
const { r:
|
|
11194
|
-
return new A(
|
|
11193
|
+
const { r: I, s: E } = dn.toSig(St("DER", R));
|
|
11194
|
+
return new A(I, E);
|
|
11195
11195
|
}
|
|
11196
11196
|
/**
|
|
11197
11197
|
* @todo remove
|
|
@@ -11203,13 +11203,13 @@ function S6(e) {
|
|
|
11203
11203
|
return new A(this.r, this.s, R);
|
|
11204
11204
|
}
|
|
11205
11205
|
recoverPublicKey(R) {
|
|
11206
|
-
const { r:
|
|
11206
|
+
const { r: I, s: E, recovery: k } = this, F = M(St("msgHash", R));
|
|
11207
11207
|
if (k == null || ![0, 1, 2, 3].includes(k))
|
|
11208
11208
|
throw new Error("recovery id invalid");
|
|
11209
|
-
const z = k === 2 || k === 3 ?
|
|
11209
|
+
const z = k === 2 || k === 3 ? I + t.n : I;
|
|
11210
11210
|
if (z >= n.ORDER)
|
|
11211
11211
|
throw new Error("recovery id 2 or 3 invalid");
|
|
11212
|
-
const U = k & 1 ? "03" : "02", H = u.fromHex(U + oa(z, n.BYTES)),
|
|
11212
|
+
const U = k & 1 ? "03" : "02", H = u.fromHex(U + oa(z, n.BYTES)), te = l(z), q = a(-F * te), _ = a(E * te), ne = u.BASE.multiplyAndAddUnsafe(H, q, _);
|
|
11213
11213
|
if (!ne)
|
|
11214
11214
|
throw new Error("point at infinify");
|
|
11215
11215
|
return ne.assertValidity(), ne;
|
|
@@ -11274,48 +11274,48 @@ function S6(e) {
|
|
|
11274
11274
|
return !1;
|
|
11275
11275
|
if (v instanceof u)
|
|
11276
11276
|
return !0;
|
|
11277
|
-
const
|
|
11277
|
+
const I = St("key", v).length, E = n.BYTES, k = E + 1, F = 2 * E + 1;
|
|
11278
11278
|
if (!(t.allowedPrivateKeyLengths || o === k))
|
|
11279
|
-
return
|
|
11279
|
+
return I === k || I === F;
|
|
11280
11280
|
}
|
|
11281
|
-
function $(v, R,
|
|
11281
|
+
function $(v, R, I = !0) {
|
|
11282
11282
|
if (N(v) === !0)
|
|
11283
11283
|
throw new Error("first arg must be private key");
|
|
11284
11284
|
if (N(R) === !1)
|
|
11285
11285
|
throw new Error("second arg must be public key");
|
|
11286
|
-
return u.fromHex(R).multiply(f(v)).toRawBytes(
|
|
11286
|
+
return u.fromHex(R).multiply(f(v)).toRawBytes(I);
|
|
11287
11287
|
}
|
|
11288
11288
|
const B = t.bits2int || function(v) {
|
|
11289
11289
|
if (v.length > 8192)
|
|
11290
11290
|
throw new Error("input is too large");
|
|
11291
|
-
const R = tr(v),
|
|
11292
|
-
return
|
|
11291
|
+
const R = tr(v), I = v.length * 8 - s;
|
|
11292
|
+
return I > 0 ? R >> BigInt(I) : R;
|
|
11293
11293
|
}, M = t.bits2int_modN || function(v) {
|
|
11294
11294
|
return a(B(v));
|
|
11295
11295
|
}, b = ai(s);
|
|
11296
11296
|
function y(v) {
|
|
11297
|
-
return
|
|
11297
|
+
return Ir("num < 2^" + s, v, hn, b), Qo(v, o);
|
|
11298
11298
|
}
|
|
11299
|
-
function x(v, R,
|
|
11300
|
-
if (["recovered", "canonical"].some((
|
|
11299
|
+
function x(v, R, I = S) {
|
|
11300
|
+
if (["recovered", "canonical"].some((G) => G in I))
|
|
11301
11301
|
throw new Error("sign() legacy options not supported");
|
|
11302
11302
|
const { hash: E, randomBytes: k } = t;
|
|
11303
|
-
let { lowS: F, prehash: z, extraEntropy: U } =
|
|
11304
|
-
F == null && (F = !0), v = St("msgHash", v), of(
|
|
11305
|
-
const H = M(v),
|
|
11303
|
+
let { lowS: F, prehash: z, extraEntropy: U } = I;
|
|
11304
|
+
F == null && (F = !0), v = St("msgHash", v), of(I), z && (v = St("prehashed msgHash", E(v)));
|
|
11305
|
+
const H = M(v), te = f(R), q = [y(te), y(H)];
|
|
11306
11306
|
if (U != null && U !== !1) {
|
|
11307
|
-
const
|
|
11308
|
-
|
|
11307
|
+
const G = U === !0 ? k(n.BYTES) : U;
|
|
11308
|
+
q.push(St("extraEntropy", G));
|
|
11309
11309
|
}
|
|
11310
|
-
const _ = ks(...
|
|
11311
|
-
function xe(
|
|
11312
|
-
const ae = B(
|
|
11310
|
+
const _ = ks(...q), ne = H;
|
|
11311
|
+
function xe(G) {
|
|
11312
|
+
const ae = B(G);
|
|
11313
11313
|
if (!d(ae))
|
|
11314
11314
|
return;
|
|
11315
11315
|
const ce = l(ae), K = u.BASE.multiply(ae).toAffine(), Q = a(K.x);
|
|
11316
11316
|
if (Q === hn)
|
|
11317
11317
|
return;
|
|
11318
|
-
const le = a(ce * a(ne + Q *
|
|
11318
|
+
const le = a(ce * a(ne + Q * te));
|
|
11319
11319
|
if (le === hn)
|
|
11320
11320
|
return;
|
|
11321
11321
|
let se = (K.x === Q ? 0 : 2) | Number(K.y & je), ye = le;
|
|
@@ -11324,49 +11324,49 @@ function S6(e) {
|
|
|
11324
11324
|
return { seed: _, k2sig: xe };
|
|
11325
11325
|
}
|
|
11326
11326
|
const S = { lowS: t.lowS, prehash: !1 }, O = { lowS: t.lowS, prehash: !1 };
|
|
11327
|
-
function
|
|
11328
|
-
const { seed: E, k2sig: k } = x(v, R,
|
|
11327
|
+
function C(v, R, I = S) {
|
|
11328
|
+
const { seed: E, k2sig: k } = x(v, R, I), F = t;
|
|
11329
11329
|
return Ly(F.hash.outputLen, F.nByteLength, F.hmac)(E, k);
|
|
11330
11330
|
}
|
|
11331
11331
|
u.BASE._setWindowSize(8);
|
|
11332
|
-
function D(v, R,
|
|
11332
|
+
function D(v, R, I, E = O) {
|
|
11333
11333
|
var se;
|
|
11334
11334
|
const k = v;
|
|
11335
|
-
R = St("msgHash", R),
|
|
11335
|
+
R = St("msgHash", R), I = St("publicKey", I);
|
|
11336
11336
|
const { lowS: F, prehash: z, format: U } = E;
|
|
11337
11337
|
if (of(E), "strict" in E)
|
|
11338
11338
|
throw new Error("options.strict was renamed to lowS");
|
|
11339
11339
|
if (U !== void 0 && U !== "compact" && U !== "der")
|
|
11340
11340
|
throw new Error("format must be compact or der");
|
|
11341
|
-
const H = typeof k == "string" || Jo(k),
|
|
11342
|
-
if (!H && !
|
|
11341
|
+
const H = typeof k == "string" || Jo(k), te = !H && !U && typeof k == "object" && k !== null && typeof k.r == "bigint" && typeof k.s == "bigint";
|
|
11342
|
+
if (!H && !te)
|
|
11343
11343
|
throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");
|
|
11344
|
-
let
|
|
11344
|
+
let q, _;
|
|
11345
11345
|
try {
|
|
11346
|
-
if (
|
|
11346
|
+
if (te && (q = new A(k.r, k.s)), H) {
|
|
11347
11347
|
try {
|
|
11348
|
-
U !== "compact" && (
|
|
11348
|
+
U !== "compact" && (q = A.fromDER(k));
|
|
11349
11349
|
} catch (ye) {
|
|
11350
11350
|
if (!(ye instanceof dn.Err))
|
|
11351
11351
|
throw ye;
|
|
11352
11352
|
}
|
|
11353
|
-
!
|
|
11353
|
+
!q && U !== "der" && (q = A.fromCompact(k));
|
|
11354
11354
|
}
|
|
11355
|
-
_ = u.fromHex(
|
|
11355
|
+
_ = u.fromHex(I);
|
|
11356
11356
|
} catch {
|
|
11357
11357
|
return !1;
|
|
11358
11358
|
}
|
|
11359
|
-
if (!
|
|
11359
|
+
if (!q || F && q.hasHighS())
|
|
11360
11360
|
return !1;
|
|
11361
11361
|
z && (R = t.hash(R));
|
|
11362
|
-
const { r: ne, s: xe } =
|
|
11362
|
+
const { r: ne, s: xe } = q, G = M(R), ae = l(xe), ce = a(G * ae), K = a(ne * ae), Q = (se = u.BASE.multiplyAndAddUnsafe(_, ce, K)) == null ? void 0 : se.toAffine();
|
|
11363
11363
|
return Q ? a(Q.x) === ne : !1;
|
|
11364
11364
|
}
|
|
11365
11365
|
return {
|
|
11366
11366
|
CURVE: t,
|
|
11367
11367
|
getPublicKey: P,
|
|
11368
11368
|
getSharedSecret: $,
|
|
11369
|
-
sign:
|
|
11369
|
+
sign: C,
|
|
11370
11370
|
verify: D,
|
|
11371
11371
|
ProjectivePoint: u,
|
|
11372
11372
|
Signature: A,
|
|
@@ -11386,14 +11386,14 @@ function A6(e, t) {
|
|
|
11386
11386
|
return { ...n(t), create: n };
|
|
11387
11387
|
}
|
|
11388
11388
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
11389
|
-
const
|
|
11389
|
+
const Cp = BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"), sf = BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"), N6 = BigInt(0), R6 = BigInt(1), oc = BigInt(2), af = (e, t) => (e + t / oc) / t;
|
|
11390
11390
|
function O6(e) {
|
|
11391
|
-
const t =
|
|
11391
|
+
const t = Cp, n = BigInt(3), r = BigInt(6), o = BigInt(11), s = BigInt(22), i = BigInt(23), c = BigInt(44), a = BigInt(88), l = e * e * e % t, u = l * l * e % t, f = vt(u, n, t) * u % t, p = vt(f, n, t) * u % t, d = vt(p, oc, t) * l % t, h = vt(d, o, t) * d % t, m = vt(h, s, t) * h % t, g = vt(m, c, t) * m % t, A = vt(g, a, t) * g % t, w = vt(A, c, t) * m % t, P = vt(w, n, t) * u % t, N = vt(P, i, t) * h % t, $ = vt(N, r, t) * l % t, B = vt($, oc, t);
|
|
11392
11392
|
if (!sc.eql(sc.sqr(B), e))
|
|
11393
11393
|
throw new Error("Cannot find square root");
|
|
11394
11394
|
return B;
|
|
11395
11395
|
}
|
|
11396
|
-
const sc = Sl(
|
|
11396
|
+
const sc = Sl(Cp, void 0, void 0, { sqrt: O6 }), Ip = A6({
|
|
11397
11397
|
a: N6,
|
|
11398
11398
|
b: BigInt(7),
|
|
11399
11399
|
Fp: sc,
|
|
@@ -11415,9 +11415,9 @@ const sc = Sl(Ip, void 0, void 0, { sqrt: O6 }), Cp = A6({
|
|
|
11415
11415
|
return { k1neg: f, k1: l, k2neg: p, k2: u };
|
|
11416
11416
|
}
|
|
11417
11417
|
}
|
|
11418
|
-
}, w0),
|
|
11418
|
+
}, w0), C6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
11419
11419
|
__proto__: null,
|
|
11420
|
-
secp256k1:
|
|
11420
|
+
secp256k1: Ip
|
|
11421
11421
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
11422
11422
|
function $p(e, t = {}) {
|
|
11423
11423
|
const { recovered: n } = t;
|
|
@@ -11434,7 +11434,7 @@ function $p(e, t = {}) {
|
|
|
11434
11434
|
if (typeof e.yParity == "number" && e.yParity !== 0 && e.yParity !== 1)
|
|
11435
11435
|
throw new Al({ value: e.yParity });
|
|
11436
11436
|
}
|
|
11437
|
-
function
|
|
11437
|
+
function I6(e) {
|
|
11438
11438
|
return Dp(Ut(e));
|
|
11439
11439
|
}
|
|
11440
11440
|
function Dp(e) {
|
|
@@ -11463,7 +11463,7 @@ function $6(e) {
|
|
|
11463
11463
|
return D6(e);
|
|
11464
11464
|
}
|
|
11465
11465
|
function D6(e) {
|
|
11466
|
-
const t = typeof e == "string" ? Dp(e) : e instanceof Uint8Array ?
|
|
11466
|
+
const t = typeof e == "string" ? Dp(e) : e instanceof Uint8Array ? I6(e) : typeof e.r == "string" ? B6(e) : e.v ? k6(e) : {
|
|
11467
11467
|
r: e.r,
|
|
11468
11468
|
s: e.s,
|
|
11469
11469
|
...typeof e.yParity < "u" ? { yParity: e.yParity } : {}
|
|
@@ -11793,7 +11793,7 @@ async function e5(e, t) {
|
|
|
11793
11793
|
}
|
|
11794
11794
|
const $ = N.value;
|
|
11795
11795
|
for (let B = 0; B < $.length; B++) {
|
|
11796
|
-
const { returnData: M, success: b } = $[B], { callData: y } = d[P][B], { abi: x, address: S, functionName: O, args:
|
|
11796
|
+
const { returnData: M, success: b } = $[B], { callData: y } = d[P][B], { abi: x, address: S, functionName: O, args: C } = l[A.length];
|
|
11797
11797
|
try {
|
|
11798
11798
|
if (y === "0x")
|
|
11799
11799
|
throw new Ho();
|
|
@@ -11801,7 +11801,7 @@ async function e5(e, t) {
|
|
|
11801
11801
|
throw new ri({ data: M });
|
|
11802
11802
|
const D = pr({
|
|
11803
11803
|
abi: x,
|
|
11804
|
-
args:
|
|
11804
|
+
args: C,
|
|
11805
11805
|
data: M,
|
|
11806
11806
|
functionName: O
|
|
11807
11807
|
});
|
|
@@ -11810,7 +11810,7 @@ async function e5(e, t) {
|
|
|
11810
11810
|
const v = zr(D, {
|
|
11811
11811
|
abi: x,
|
|
11812
11812
|
address: S,
|
|
11813
|
-
args:
|
|
11813
|
+
args: C,
|
|
11814
11814
|
docsPath: "/docs/contract/multicall",
|
|
11815
11815
|
functionName: O
|
|
11816
11816
|
});
|
|
@@ -11860,11 +11860,11 @@ async function ic(e, t) {
|
|
|
11860
11860
|
data: N,
|
|
11861
11861
|
functionName: w
|
|
11862
11862
|
}) : null, y = (() => {
|
|
11863
|
-
var
|
|
11863
|
+
var C;
|
|
11864
11864
|
if (M === "success")
|
|
11865
11865
|
return;
|
|
11866
11866
|
let O;
|
|
11867
|
-
if (((
|
|
11867
|
+
if (((C = h.error) == null ? void 0 : C.data) === "0x" ? O = new Ho() : h.error && (O = new ri(h.error)), !!O)
|
|
11868
11868
|
return zr(O, {
|
|
11869
11869
|
abi: g ?? [],
|
|
11870
11870
|
address: P ?? "0x",
|
|
@@ -12252,12 +12252,12 @@ async function u5(e, t) {
|
|
|
12252
12252
|
],
|
|
12253
12253
|
traceTransfers: c,
|
|
12254
12254
|
validation: a
|
|
12255
|
-
}), d = i ? p[2] : p[0], [h, m, , g, A, w, P, N] = i ? p : [], { calls: $, ...B } = d, M = $.slice(0, -1) ?? [], b = (h == null ? void 0 : h.calls) ?? [], y = (m == null ? void 0 : m.calls) ?? [], x = [...b, ...y].map((E) => E.status === "success" ? nn(E.data) : null), S = (g == null ? void 0 : g.calls) ?? [], O = (A == null ? void 0 : A.calls) ?? [],
|
|
12256
|
-
for (const [E, k] of
|
|
12255
|
+
}), d = i ? p[2] : p[0], [h, m, , g, A, w, P, N] = i ? p : [], { calls: $, ...B } = d, M = $.slice(0, -1) ?? [], b = (h == null ? void 0 : h.calls) ?? [], y = (m == null ? void 0 : m.calls) ?? [], x = [...b, ...y].map((E) => E.status === "success" ? nn(E.data) : null), S = (g == null ? void 0 : g.calls) ?? [], O = (A == null ? void 0 : A.calls) ?? [], C = [...S, ...O].map((E) => E.status === "success" ? nn(E.data) : null), D = ((w == null ? void 0 : w.calls) ?? []).map((E) => E.status === "success" ? E.result : null), v = ((N == null ? void 0 : N.calls) ?? []).map((E) => E.status === "success" ? E.result : null), R = ((P == null ? void 0 : P.calls) ?? []).map((E) => E.status === "success" ? E.result : null), I = [];
|
|
12256
|
+
for (const [E, k] of C.entries()) {
|
|
12257
12257
|
const F = x[E];
|
|
12258
12258
|
if (typeof k != "bigint" || typeof F != "bigint")
|
|
12259
12259
|
continue;
|
|
12260
|
-
const z = D[E - 1], U = v[E - 1], H = R[E - 1],
|
|
12260
|
+
const z = D[E - 1], U = v[E - 1], H = R[E - 1], te = E === 0 ? {
|
|
12261
12261
|
address: c5,
|
|
12262
12262
|
decimals: 18,
|
|
12263
12263
|
symbol: "ETH"
|
|
@@ -12266,8 +12266,8 @@ async function u5(e, t) {
|
|
|
12266
12266
|
decimals: H || z ? Number(z ?? 1) : void 0,
|
|
12267
12267
|
symbol: U ?? void 0
|
|
12268
12268
|
};
|
|
12269
|
-
|
|
12270
|
-
token:
|
|
12269
|
+
I.some((q) => q.token.address === te.address) || I.push({
|
|
12270
|
+
token: te,
|
|
12271
12271
|
value: {
|
|
12272
12272
|
pre: F,
|
|
12273
12273
|
post: k,
|
|
@@ -12276,7 +12276,7 @@ async function u5(e, t) {
|
|
|
12276
12276
|
});
|
|
12277
12277
|
}
|
|
12278
12278
|
return {
|
|
12279
|
-
assetChanges:
|
|
12279
|
+
assetChanges: I,
|
|
12280
12280
|
block: B,
|
|
12281
12281
|
results: M
|
|
12282
12282
|
};
|
|
@@ -12318,7 +12318,7 @@ function m5({ r: e, s: t, to: n = "hex", v: r, yParity: o }) {
|
|
|
12318
12318
|
if (r && (r === 27n || r === 28n || r >= 35n))
|
|
12319
12319
|
return r % 2n === 0n ? 1 : 0;
|
|
12320
12320
|
throw new Error("Invalid `v` or `yParity` value");
|
|
12321
|
-
})(), i = `0x${new
|
|
12321
|
+
})(), i = `0x${new Ip.Signature(nn(e), nn(t)).toCompactHex()}${s === 0 ? "1b" : "1c"}`;
|
|
12322
12322
|
return n === "hex" ? i : rn(i);
|
|
12323
12323
|
}
|
|
12324
12324
|
async function bi(e, t) {
|
|
@@ -12431,7 +12431,7 @@ async function g5(e, t) {
|
|
|
12431
12431
|
}, { data: f } = await re(e, ui, "call")(u).catch((p) => {
|
|
12432
12432
|
throw p instanceof s0 ? new ir() : p;
|
|
12433
12433
|
});
|
|
12434
|
-
if (
|
|
12434
|
+
if (I1(f ?? "0x0"))
|
|
12435
12435
|
return !0;
|
|
12436
12436
|
throw new ir();
|
|
12437
12437
|
}
|
|
@@ -12607,18 +12607,18 @@ async function x5(e, t) {
|
|
|
12607
12607
|
}), {
|
|
12608
12608
|
delay: c,
|
|
12609
12609
|
retryCount: i,
|
|
12610
|
-
shouldRetry: ({ error:
|
|
12610
|
+
shouldRetry: ({ error: C }) => C instanceof p0
|
|
12611
12611
|
});
|
|
12612
12612
|
h = !1;
|
|
12613
|
-
const S = x.transactions.find(({ from:
|
|
12613
|
+
const S = x.transactions.find(({ from: C, nonce: D }) => C === p.from && D === p.nonce);
|
|
12614
12614
|
if (!S || (d = await re(e, xs, "getTransactionReceipt")({
|
|
12615
12615
|
hash: S.hash
|
|
12616
12616
|
}), r > 1 && (!d.blockNumber || b - d.blockNumber + 1n < r)))
|
|
12617
12617
|
return;
|
|
12618
12618
|
let O = "replaced";
|
|
12619
12619
|
S.to === p.to && S.value === p.value && S.input === p.input ? O = "repriced" : S.from === S.to && S.value === 0n && (O = "cancelled"), M(() => {
|
|
12620
|
-
var
|
|
12621
|
-
(
|
|
12620
|
+
var C;
|
|
12621
|
+
(C = $.onReplaced) == null || C.call($, {
|
|
12622
12622
|
reason: O,
|
|
12623
12623
|
replacedTransaction: p,
|
|
12624
12624
|
transaction: S,
|
|
@@ -12823,7 +12823,7 @@ function P5(e, { address: t, args: n, batch: r = !0, event: o, events: s, fromBl
|
|
|
12823
12823
|
if (y instanceof Os || y instanceof Wc) {
|
|
12824
12824
|
if (f)
|
|
12825
12825
|
return;
|
|
12826
|
-
x = y.abiItem.name, S = (b = y.abiItem.inputs) == null ? void 0 : b.some((
|
|
12826
|
+
x = y.abiItem.name, S = (b = y.abiItem.inputs) == null ? void 0 : b.some((C) => !("name" in C && C.name));
|
|
12827
12827
|
}
|
|
12828
12828
|
const O = En(M, {
|
|
12829
12829
|
args: S ? [] : {},
|
|
@@ -12954,7 +12954,7 @@ async function O5(e, t) {
|
|
|
12954
12954
|
...l
|
|
12955
12955
|
});
|
|
12956
12956
|
}
|
|
12957
|
-
async function
|
|
12957
|
+
async function C5(e, { serializedTransaction: t, throwOnReceiptRevert: n, timeout: r }) {
|
|
12958
12958
|
var c, a, l;
|
|
12959
12959
|
const o = await e.request({
|
|
12960
12960
|
method: "eth_sendRawTransactionSync",
|
|
@@ -12964,7 +12964,7 @@ async function I5(e, { serializedTransaction: t, throwOnReceiptRevert: n, timeou
|
|
|
12964
12964
|
throw new Gg({ receipt: i });
|
|
12965
12965
|
return i;
|
|
12966
12966
|
}
|
|
12967
|
-
function
|
|
12967
|
+
function I5(e) {
|
|
12968
12968
|
return {
|
|
12969
12969
|
call: (t) => ui(e, t),
|
|
12970
12970
|
createAccessList: (t) => rp(e, t),
|
|
@@ -13007,7 +13007,7 @@ function C5(e) {
|
|
|
13007
13007
|
prepareTransactionRequest: (t) => S0(e, t),
|
|
13008
13008
|
readContract: (t) => _t(e, t),
|
|
13009
13009
|
sendRawTransaction: (t) => Ov(e, t),
|
|
13010
|
-
sendRawTransactionSync: (t) =>
|
|
13010
|
+
sendRawTransactionSync: (t) => C5(e, t),
|
|
13011
13011
|
simulate: (t) => ic(e, t),
|
|
13012
13012
|
simulateBlocks: (t) => ic(e, t),
|
|
13013
13013
|
simulateCalls: (t) => u5(e, t),
|
|
@@ -13027,12 +13027,12 @@ function C5(e) {
|
|
|
13027
13027
|
}
|
|
13028
13028
|
function $5(e) {
|
|
13029
13029
|
const { key: t = "public", name: n = "Public Client" } = e;
|
|
13030
|
-
return
|
|
13030
|
+
return Iv({
|
|
13031
13031
|
...e,
|
|
13032
13032
|
key: t,
|
|
13033
13033
|
name: n,
|
|
13034
13034
|
type: "publicClient"
|
|
13035
|
-
}).extend(
|
|
13035
|
+
}).extend(I5);
|
|
13036
13036
|
}
|
|
13037
13037
|
function D5({ key: e, methods: t, name: n, request: r, retryCount: o = 3, retryDelay: s = 150, timeout: i, type: c }, a) {
|
|
13038
13038
|
const l = J0();
|
|
@@ -13086,7 +13086,7 @@ function B5(e, t = {}) {
|
|
|
13086
13086
|
fn: (O) => N.request({
|
|
13087
13087
|
body: O
|
|
13088
13088
|
}),
|
|
13089
|
-
sort: (O,
|
|
13089
|
+
sort: (O, C) => O.id - C.id
|
|
13090
13090
|
}), y = async (O) => n ? b(O) : [
|
|
13091
13091
|
await N.request({
|
|
13092
13092
|
body: O
|
|
@@ -13197,8 +13197,8 @@ function L5({
|
|
|
13197
13197
|
s
|
|
13198
13198
|
]), { value: i, formatted: a };
|
|
13199
13199
|
}
|
|
13200
|
-
const qP = () => ({ openDeposit:
|
|
13201
|
-
}, []) }), KP = () => ({ openWithdraw:
|
|
13200
|
+
const qP = () => ({ openDeposit: ee((t) => {
|
|
13201
|
+
}, []) }), KP = () => ({ openWithdraw: ee((t) => {
|
|
13202
13202
|
}, []) }), yn = "MPC", gi = "EVM";
|
|
13203
13203
|
var Ue = /* @__PURE__ */ ((e) => (e.SPOT = "spot", e.PERPETUAL = "perpetual", e.PERPETUALV2 = "perpetual_v2", e))(Ue || {});
|
|
13204
13204
|
const F5 = "spot", j5 = "perpetual";
|
|
@@ -13311,7 +13311,7 @@ function K5(e) {
|
|
|
13311
13311
|
t.current = e;
|
|
13312
13312
|
}, [
|
|
13313
13313
|
e
|
|
13314
|
-
]),
|
|
13314
|
+
]), ee((...n) => {
|
|
13315
13315
|
const r = t.current;
|
|
13316
13316
|
return r == null ? void 0 : r(...n);
|
|
13317
13317
|
}, []);
|
|
@@ -13365,18 +13365,18 @@ function An(e) {
|
|
|
13365
13365
|
let t = null;
|
|
13366
13366
|
return () => (t == null && (t = e()), t);
|
|
13367
13367
|
}
|
|
13368
|
-
const
|
|
13368
|
+
const Cl = An(function() {
|
|
13369
13369
|
return Ol(/^Mac/i);
|
|
13370
13370
|
}), J5 = An(function() {
|
|
13371
13371
|
return Ol(/^iPhone/i);
|
|
13372
13372
|
}), Q5 = An(function() {
|
|
13373
13373
|
return Ol(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
|
|
13374
|
-
|
|
13374
|
+
Cl() && navigator.maxTouchPoints > 1;
|
|
13375
13375
|
}), ex = An(function() {
|
|
13376
13376
|
return J5() || Q5();
|
|
13377
13377
|
});
|
|
13378
13378
|
An(function() {
|
|
13379
|
-
return
|
|
13379
|
+
return Cl() || ex();
|
|
13380
13380
|
});
|
|
13381
13381
|
An(function() {
|
|
13382
13382
|
return yi(/AppleWebKit/i) && !tx();
|
|
@@ -13390,7 +13390,7 @@ An(function() {
|
|
|
13390
13390
|
return yi(/Firefox/i);
|
|
13391
13391
|
});
|
|
13392
13392
|
function Hp() {
|
|
13393
|
-
let e = de(/* @__PURE__ */ new Map()), t =
|
|
13393
|
+
let e = de(/* @__PURE__ */ new Map()), t = ee((o, s, i, c) => {
|
|
13394
13394
|
let a = c != null && c.once ? (...l) => {
|
|
13395
13395
|
e.current.delete(i), i(...l);
|
|
13396
13396
|
} : i;
|
|
@@ -13400,11 +13400,11 @@ function Hp() {
|
|
|
13400
13400
|
fn: a,
|
|
13401
13401
|
options: c
|
|
13402
13402
|
}), o.addEventListener(s, a, c);
|
|
13403
|
-
}, []), n =
|
|
13403
|
+
}, []), n = ee((o, s, i, c) => {
|
|
13404
13404
|
var a;
|
|
13405
13405
|
let l = ((a = e.current.get(i)) === null || a === void 0 ? void 0 : a.fn) || i;
|
|
13406
13406
|
o.removeEventListener(s, l, c), e.current.delete(i);
|
|
13407
|
-
}, []), r =
|
|
13407
|
+
}, []), r = ee(() => {
|
|
13408
13408
|
e.current.forEach((o, s) => {
|
|
13409
13409
|
n(o.eventTarget, o.type, s, o.options);
|
|
13410
13410
|
});
|
|
@@ -13448,7 +13448,7 @@ function qp(e) {
|
|
|
13448
13448
|
let n = K5((r) => {
|
|
13449
13449
|
e == null || e(r);
|
|
13450
13450
|
});
|
|
13451
|
-
return
|
|
13451
|
+
return ee((r) => {
|
|
13452
13452
|
if (r.target instanceof HTMLButtonElement || r.target instanceof HTMLInputElement || r.target instanceof HTMLTextAreaElement || r.target instanceof HTMLSelectElement) {
|
|
13453
13453
|
t.current.isFocused = !0;
|
|
13454
13454
|
let o = r.target, s = (i) => {
|
|
@@ -13488,23 +13488,23 @@ const ix = {
|
|
|
13488
13488
|
Tab: !0,
|
|
13489
13489
|
Escape: !0
|
|
13490
13490
|
};
|
|
13491
|
-
function
|
|
13491
|
+
function Il(e, t) {
|
|
13492
13492
|
for (let n of uc) n(e, t);
|
|
13493
13493
|
}
|
|
13494
13494
|
function ax(e) {
|
|
13495
|
-
return !(e.metaKey || !
|
|
13495
|
+
return !(e.metaKey || !Cl() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
|
|
13496
13496
|
}
|
|
13497
13497
|
function Ls(e) {
|
|
13498
|
-
ar = !0, ax(e) && (rs = "keyboard",
|
|
13498
|
+
ar = !0, ax(e) && (rs = "keyboard", Il("keyboard", e));
|
|
13499
13499
|
}
|
|
13500
13500
|
function Tt(e) {
|
|
13501
|
-
rs = "pointer", (e.type === "mousedown" || e.type === "pointerdown") && (ar = !0,
|
|
13501
|
+
rs = "pointer", (e.type === "mousedown" || e.type === "pointerdown") && (ar = !0, Il("pointer", e));
|
|
13502
13502
|
}
|
|
13503
13503
|
function Kp(e) {
|
|
13504
13504
|
rx(e) && (ar = !0, rs = "virtual");
|
|
13505
13505
|
}
|
|
13506
13506
|
function Zp(e) {
|
|
13507
|
-
e.target === window || e.target === document || sx || !e.isTrusted || (!ar && !fc && (rs = "virtual",
|
|
13507
|
+
e.target === window || e.target === document || sx || !e.isTrusted || (!ar && !fc && (rs = "virtual", Il("virtual", e)), ar = !1, fc = !1);
|
|
13508
13508
|
}
|
|
13509
13509
|
function Yp() {
|
|
13510
13510
|
ar = !1, fc = !0;
|
|
@@ -13566,13 +13566,13 @@ function fx(e, t, n) {
|
|
|
13566
13566
|
}
|
|
13567
13567
|
function dx(e) {
|
|
13568
13568
|
let { isDisabled: t, onFocus: n, onBlur: r, onFocusChange: o } = e;
|
|
13569
|
-
const s =
|
|
13569
|
+
const s = ee((a) => {
|
|
13570
13570
|
if (a.target === a.currentTarget)
|
|
13571
13571
|
return r && r(a), o && o(!1), !0;
|
|
13572
13572
|
}, [
|
|
13573
13573
|
r,
|
|
13574
13574
|
o
|
|
13575
|
-
]), i = qp(s), c =
|
|
13575
|
+
]), i = qp(s), c = ee((a) => {
|
|
13576
13576
|
const l = Hn(a.target), u = l ? lc(l) : lc();
|
|
13577
13577
|
a.target === a.currentTarget && u === Vp(a.nativeEvent) && (n && n(a), o && o(!0), i(a));
|
|
13578
13578
|
}, [
|
|
@@ -13590,14 +13590,14 @@ function dx(e) {
|
|
|
13590
13590
|
function px(e) {
|
|
13591
13591
|
let { isDisabled: t, onBlurWithin: n, onFocusWithin: r, onFocusWithinChange: o } = e, s = de({
|
|
13592
13592
|
isFocusWithin: !1
|
|
13593
|
-
}), { addGlobalListener: i, removeAllGlobalListeners: c } = Hp(), a =
|
|
13593
|
+
}), { addGlobalListener: i, removeAllGlobalListeners: c } = Hp(), a = ee((f) => {
|
|
13594
13594
|
f.currentTarget.contains(f.target) && s.current.isFocusWithin && !f.currentTarget.contains(f.relatedTarget) && (s.current.isFocusWithin = !1, c(), n && n(f), o && o(!1));
|
|
13595
13595
|
}, [
|
|
13596
13596
|
n,
|
|
13597
13597
|
o,
|
|
13598
13598
|
s,
|
|
13599
13599
|
c
|
|
13600
|
-
]), l = qp(a), u =
|
|
13600
|
+
]), l = qp(a), u = ee((f) => {
|
|
13601
13601
|
if (!f.currentTarget.contains(f.target)) return;
|
|
13602
13602
|
const p = Hn(f.target), d = lc(p);
|
|
13603
13603
|
if (!s.current.isFocusWithin && d === Vp(f.nativeEvent)) {
|
|
@@ -13719,7 +13719,7 @@ function bx(e = {}) {
|
|
|
13719
13719
|
let { autoFocus: t = !1, isTextInput: n, within: r } = e, o = de({
|
|
13720
13720
|
isFocused: !1,
|
|
13721
13721
|
isFocusVisible: t || Jp()
|
|
13722
|
-
}), [s, i] = ie(!1), [c, a] = ie(() => o.current.isFocused && o.current.isFocusVisible), l =
|
|
13722
|
+
}), [s, i] = ie(!1), [c, a] = ie(() => o.current.isFocused && o.current.isFocusVisible), l = ee(() => a(o.current.isFocused && o.current.isFocusVisible), []), u = ee((d) => {
|
|
13723
13723
|
o.current.isFocused = d, i(d), l();
|
|
13724
13724
|
}, [
|
|
13725
13725
|
l
|
|
@@ -13892,7 +13892,7 @@ function Rt(e, t, ...n) {
|
|
|
13892
13892
|
var zs = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(zs || {}), Dn = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(Dn || {});
|
|
13893
13893
|
function bt() {
|
|
13894
13894
|
let e = Ax();
|
|
13895
|
-
return
|
|
13895
|
+
return ee((t) => Tx({ mergeRefs: e, ...t }), [e]);
|
|
13896
13896
|
}
|
|
13897
13897
|
function Tx({ ourProps: e, theirProps: t, slot: n, defaultTag: r, features: o, visible: s = !0, name: i, mergeRefs: c }) {
|
|
13898
13898
|
c = c ?? Nx;
|
|
@@ -13938,7 +13938,7 @@ function ms(e, t = {}, n, r, o) {
|
|
|
13938
13938
|
return As(s, Object.assign({}, la(a, ["ref"]), !co(s) && l, !co(s) && f), u);
|
|
13939
13939
|
}
|
|
13940
13940
|
function Ax() {
|
|
13941
|
-
let e = de([]), t =
|
|
13941
|
+
let e = de([]), t = ee((n) => {
|
|
13942
13942
|
for (let r of e.current) r != null && (typeof r == "function" ? r(n) : r.current = n);
|
|
13943
13943
|
}, []);
|
|
13944
13944
|
return (...n) => {
|
|
@@ -14002,11 +14002,11 @@ function co(e) {
|
|
|
14002
14002
|
function Ox(e) {
|
|
14003
14003
|
return co(e.type);
|
|
14004
14004
|
}
|
|
14005
|
-
function
|
|
14005
|
+
function Cx(e, t, n) {
|
|
14006
14006
|
let [r, o] = ie(n), s = e !== void 0, i = de(s), c = de(!1), a = de(!1);
|
|
14007
14007
|
return s && !i.current && !c.current ? (c.current = !0, i.current = s, console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")) : !s && i.current && !a.current && (a.current = !0, i.current = s, console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")), [s ? e : r, ve((l) => (s || Ns(() => o(l)), t == null ? void 0 : t(l)))];
|
|
14008
14008
|
}
|
|
14009
|
-
function
|
|
14009
|
+
function Ix(e) {
|
|
14010
14010
|
let [t] = ie(e);
|
|
14011
14011
|
return t;
|
|
14012
14012
|
}
|
|
@@ -14125,7 +14125,7 @@ let fh = Symbol();
|
|
|
14125
14125
|
function Gx(e, t = !0) {
|
|
14126
14126
|
return Object.assign(e, { [fh]: t });
|
|
14127
14127
|
}
|
|
14128
|
-
function
|
|
14128
|
+
function Ct(...e) {
|
|
14129
14129
|
let t = de(e);
|
|
14130
14130
|
Te(() => {
|
|
14131
14131
|
t.current = e;
|
|
@@ -14151,7 +14151,7 @@ function qx() {
|
|
|
14151
14151
|
}
|
|
14152
14152
|
let Kx = "p";
|
|
14153
14153
|
function Zx(e, t) {
|
|
14154
|
-
let n = ur(), r = $l(), { id: o = `headlessui-description-${n}`, ...s } = e, i = dh(), c =
|
|
14154
|
+
let n = ur(), r = $l(), { id: o = `headlessui-description-${n}`, ...s } = e, i = dh(), c = Ct(t);
|
|
14155
14155
|
De(() => i.register(o), [o, i.register]);
|
|
14156
14156
|
let a = Wn({ ...i.slot, disabled: r || !1 }), l = { ref: c, ...i.props, id: o };
|
|
14157
14157
|
return bt()({ ourProps: l, theirProps: s, slot: a, defaultTag: Kx, name: i.name || "Description" });
|
|
@@ -14187,7 +14187,7 @@ function Xx({ inherit: e = !1 } = {}) {
|
|
|
14187
14187
|
let Jx = "label";
|
|
14188
14188
|
function Qx(e, t) {
|
|
14189
14189
|
var n;
|
|
14190
|
-
let r = ur(), o = ph(), s = ah(), i = $l(), { id: c = `headlessui-label-${r}`, htmlFor: a = s ?? ((n = o.props) == null ? void 0 : n.htmlFor), passive: l = !1, ...u } = e, f =
|
|
14190
|
+
let r = ur(), o = ph(), s = ah(), i = $l(), { id: c = `headlessui-label-${r}`, htmlFor: a = s ?? ((n = o.props) == null ? void 0 : n.htmlFor), passive: l = !1, ...u } = e, f = Ct(t);
|
|
14191
14191
|
De(() => o.register(c), [c, o.register]);
|
|
14192
14192
|
let p = ve((m) => {
|
|
14193
14193
|
let g = m.currentTarget;
|
|
@@ -14209,7 +14209,7 @@ function n2(e, t) {
|
|
|
14209
14209
|
return e !== null && t !== null && typeof e == "object" && typeof t == "object" && "id" in e && "id" in t ? e.id === t.id : e === t;
|
|
14210
14210
|
}
|
|
14211
14211
|
function r2(e = n2) {
|
|
14212
|
-
return
|
|
14212
|
+
return ee((t, n) => {
|
|
14213
14213
|
if (typeof e == "string") {
|
|
14214
14214
|
let r = e;
|
|
14215
14215
|
return (t == null ? void 0 : t[r]) === (n == null ? void 0 : n[r]);
|
|
@@ -14478,7 +14478,7 @@ function b2(e) {
|
|
|
14478
14478
|
return e;
|
|
14479
14479
|
}
|
|
14480
14480
|
function Eh(e, t) {
|
|
14481
|
-
let n = ur(), r = Bl.get(t), [o, s] = nt(r,
|
|
14481
|
+
let n = ur(), r = Bl.get(t), [o, s] = nt(r, ee((i) => [r.selectors.isTop(i, n), r.selectors.inStack(i, n)], [r, n]));
|
|
14482
14482
|
return De(() => {
|
|
14483
14483
|
if (e) return r.actions.push(n), () => r.actions.pop(n);
|
|
14484
14484
|
}, [r, e, n]), e ? s ? o : !0 : !1;
|
|
@@ -14638,8 +14638,8 @@ function O2(e, t, n, r) {
|
|
|
14638
14638
|
}, [e, t, r]);
|
|
14639
14639
|
}
|
|
14640
14640
|
const Ef = 30;
|
|
14641
|
-
function
|
|
14642
|
-
let r = mr(n), o =
|
|
14641
|
+
function C2(e, t, n) {
|
|
14642
|
+
let r = mr(n), o = ee(function(c, a) {
|
|
14643
14643
|
if (c.defaultPrevented) return;
|
|
14644
14644
|
let l = a(c);
|
|
14645
14645
|
if (l === null || !l.getRootNode().contains(l) || !l.isConnected) return;
|
|
@@ -14668,7 +14668,7 @@ function I2(e, t, n) {
|
|
|
14668
14668
|
function vc(...e) {
|
|
14669
14669
|
return J(() => vi(...e), [...e]);
|
|
14670
14670
|
}
|
|
14671
|
-
var
|
|
14671
|
+
var I2 = ((e) => (e[e.Ignore = 0] = "Ignore", e[e.Select = 1] = "Select", e[e.Close = 2] = "Close", e))(I2 || {});
|
|
14672
14672
|
const bs = { Ignore: { kind: 0 }, Select: (e) => ({ kind: 1, target: e }), Close: { kind: 2 } }, $2 = 200, Pf = 5;
|
|
14673
14673
|
function D2(e, { trigger: t, action: n, close: r, select: o }) {
|
|
14674
14674
|
let s = de(null), i = de(null), c = de(null);
|
|
@@ -14833,7 +14833,7 @@ function _2() {
|
|
|
14833
14833
|
} };
|
|
14834
14834
|
}
|
|
14835
14835
|
function W2(e = 0) {
|
|
14836
|
-
let [t, n] = ie(e), r =
|
|
14836
|
+
let [t, n] = ie(e), r = ee((a) => n(a), []), o = ee((a) => n((l) => l | a), []), s = ee((a) => (t & a) === a, [t]), i = ee((a) => n((l) => l & ~a), []), c = ee((a) => n((l) => l ^ a), []);
|
|
14837
14837
|
return { flags: t, setFlag: r, addFlag: o, hasFlag: s, removeFlag: i, toggleFlag: c };
|
|
14838
14838
|
}
|
|
14839
14839
|
var Af, Nf;
|
|
@@ -15048,7 +15048,7 @@ function Vn(e) {
|
|
|
15048
15048
|
function Zr(e) {
|
|
15049
15049
|
return e.split("-")[1];
|
|
15050
15050
|
}
|
|
15051
|
-
function
|
|
15051
|
+
function Ch(e) {
|
|
15052
15052
|
return e === "x" ? "y" : "x";
|
|
15053
15053
|
}
|
|
15054
15054
|
function jl(e) {
|
|
@@ -15059,7 +15059,7 @@ function mn(e) {
|
|
|
15059
15059
|
return aE.has(Vn(e)) ? "y" : "x";
|
|
15060
15060
|
}
|
|
15061
15061
|
function zl(e) {
|
|
15062
|
-
return
|
|
15062
|
+
return Ch(mn(e));
|
|
15063
15063
|
}
|
|
15064
15064
|
function cE(e, t, n) {
|
|
15065
15065
|
n === void 0 && (n = !1);
|
|
@@ -15104,7 +15104,7 @@ function hE(e) {
|
|
|
15104
15104
|
...e
|
|
15105
15105
|
};
|
|
15106
15106
|
}
|
|
15107
|
-
function
|
|
15107
|
+
function Ih(e) {
|
|
15108
15108
|
return typeof e != "number" ? hE(e) : {
|
|
15109
15109
|
top: e,
|
|
15110
15110
|
right: e,
|
|
@@ -15233,7 +15233,7 @@ var mE = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
15233
15233
|
}
|
|
15234
15234
|
}
|
|
15235
15235
|
return s;
|
|
15236
|
-
},
|
|
15236
|
+
}, Cf = function(t) {
|
|
15237
15237
|
var n = t.getBoundingClientRect(), r = n.width, o = n.height;
|
|
15238
15238
|
return r === 0 && o === 0;
|
|
15239
15239
|
}, NE = function(t, n) {
|
|
@@ -15266,7 +15266,7 @@ var mE = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
15266
15266
|
for (var a = t; t; ) {
|
|
15267
15267
|
var l = t.parentElement, u = Ws(t);
|
|
15268
15268
|
if (l && !l.shadowRoot && o(l) === !0)
|
|
15269
|
-
return
|
|
15269
|
+
return Cf(t);
|
|
15270
15270
|
t.assignedSlot ? t = t.assignedSlot : !l && u !== t.ownerDocument ? t = u.host : t = l;
|
|
15271
15271
|
}
|
|
15272
15272
|
t = a;
|
|
@@ -15276,7 +15276,7 @@ var mE = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
15276
15276
|
if (r !== "legacy-full")
|
|
15277
15277
|
return !0;
|
|
15278
15278
|
} else if (r === "non-zero-area")
|
|
15279
|
-
return
|
|
15279
|
+
return Cf(t);
|
|
15280
15280
|
return !1;
|
|
15281
15281
|
}, RE = function(t) {
|
|
15282
15282
|
if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))
|
|
@@ -15298,9 +15298,9 @@ var mE = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
15298
15298
|
// note related to `candidateSelectors`)
|
|
15299
15299
|
_o(n) || wE(n) || NE(n, t) || // For a details element with a summary, the summary element gets the focus
|
|
15300
15300
|
xE(n) || RE(n));
|
|
15301
|
-
},
|
|
15301
|
+
}, If = function(t, n) {
|
|
15302
15302
|
return !(TE(n) || kh(n) < 0 || !OE(t, n));
|
|
15303
|
-
},
|
|
15303
|
+
}, CE = function(t) {
|
|
15304
15304
|
var n = parseInt(t.getAttribute("tabindex"), 10);
|
|
15305
15305
|
return !!(isNaN(n) || n >= 0);
|
|
15306
15306
|
}, Mh = function(t) {
|
|
@@ -15321,11 +15321,11 @@ var mE = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
15321
15321
|
n = n || {};
|
|
15322
15322
|
var r;
|
|
15323
15323
|
return n.getShadowRoot ? r = Tc([t], n.includeContainer, {
|
|
15324
|
-
filter:
|
|
15324
|
+
filter: If.bind(null, n),
|
|
15325
15325
|
flatten: !1,
|
|
15326
15326
|
getShadowRoot: n.getShadowRoot,
|
|
15327
|
-
shadowRootFilter:
|
|
15328
|
-
}) : r = gE(t, n.includeContainer,
|
|
15327
|
+
shadowRootFilter: CE
|
|
15328
|
+
}) : r = gE(t, n.includeContainer, If.bind(null, n)), Mh(r);
|
|
15329
15329
|
};
|
|
15330
15330
|
function $f(e, t, n) {
|
|
15331
15331
|
let {
|
|
@@ -15375,7 +15375,7 @@ function $f(e, t, n) {
|
|
|
15375
15375
|
}
|
|
15376
15376
|
return d;
|
|
15377
15377
|
}
|
|
15378
|
-
const
|
|
15378
|
+
const IE = async (e, t, n) => {
|
|
15379
15379
|
const {
|
|
15380
15380
|
placement: r = "bottom",
|
|
15381
15381
|
strategy: o = "absolute",
|
|
@@ -15452,7 +15452,7 @@ async function Ai(e, t) {
|
|
|
15452
15452
|
elementContext: f = "floating",
|
|
15453
15453
|
altBoundary: p = !1,
|
|
15454
15454
|
padding: d = 0
|
|
15455
|
-
} = br(t, e), h =
|
|
15455
|
+
} = br(t, e), h = Ih(d), g = c[p ? f === "floating" ? "reference" : "floating" : f], A = _s(await s.getClippingRect({
|
|
15456
15456
|
element: (n = await (s.isElement == null ? void 0 : s.isElement(g))) == null || n ? g : g.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(c.floating)),
|
|
15457
15457
|
boundary: l,
|
|
15458
15458
|
rootBoundary: u,
|
|
@@ -15499,20 +15499,20 @@ const $E = (e) => ({
|
|
|
15499
15499
|
} = br(e, t) || {};
|
|
15500
15500
|
if (l == null)
|
|
15501
15501
|
return {};
|
|
15502
|
-
const f =
|
|
15502
|
+
const f = Ih(u), p = {
|
|
15503
15503
|
x: n,
|
|
15504
15504
|
y: r
|
|
15505
15505
|
}, d = zl(o), h = jl(d), m = await i.getDimensions(l), g = d === "y", A = g ? "top" : "left", w = g ? "bottom" : "right", P = g ? "clientHeight" : "clientWidth", N = s.reference[h] + s.reference[d] - p[d] - s.floating[h], $ = p[d] - s.reference[d], B = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l));
|
|
15506
15506
|
let M = B ? B[P] : 0;
|
|
15507
15507
|
(!M || !await (i.isElement == null ? void 0 : i.isElement(B))) && (M = c.floating[P] || s.floating[h]);
|
|
15508
|
-
const b = N / 2 - $ / 2, y = M / 2 - m[h] / 2 - 1, x = Sn(f[A], y), S = Sn(f[w], y), O = x,
|
|
15508
|
+
const b = N / 2 - $ / 2, y = M / 2 - m[h] / 2 - 1, x = Sn(f[A], y), S = Sn(f[w], y), O = x, C = M - m[h] - S, D = M / 2 - m[h] / 2 + b, v = Ec(O, D, C), R = !a.arrow && Zr(o) != null && D !== v && s.reference[h] / 2 - (D < O ? x : S) - m[h] / 2 < 0, I = R ? D < O ? D - O : D - C : 0;
|
|
15509
15509
|
return {
|
|
15510
|
-
[d]: p[d] +
|
|
15510
|
+
[d]: p[d] + I,
|
|
15511
15511
|
data: {
|
|
15512
15512
|
[d]: v,
|
|
15513
|
-
centerOffset: D - v -
|
|
15513
|
+
centerOffset: D - v - I,
|
|
15514
15514
|
...R && {
|
|
15515
|
-
alignmentOffset:
|
|
15515
|
+
alignmentOffset: I
|
|
15516
15516
|
}
|
|
15517
15517
|
},
|
|
15518
15518
|
reset: R
|
|
@@ -15568,12 +15568,12 @@ const $E = (e) => ({
|
|
|
15568
15568
|
placement: v
|
|
15569
15569
|
}
|
|
15570
15570
|
};
|
|
15571
|
-
let R = (O = x.filter((
|
|
15571
|
+
let R = (O = x.filter((I) => I.overflows[0] <= 0).sort((I, E) => I.overflows[1] - E.overflows[1])[0]) == null ? void 0 : O.placement;
|
|
15572
15572
|
if (!R)
|
|
15573
15573
|
switch (d) {
|
|
15574
15574
|
case "bestFit": {
|
|
15575
|
-
var
|
|
15576
|
-
const
|
|
15575
|
+
var C;
|
|
15576
|
+
const I = (C = x.filter((E) => {
|
|
15577
15577
|
if (B) {
|
|
15578
15578
|
const k = mn(E.placement);
|
|
15579
15579
|
return k === w || // Create a bias to the `y` side axis due to horizontal
|
|
@@ -15581,8 +15581,8 @@ const $E = (e) => ({
|
|
|
15581
15581
|
k === "y";
|
|
15582
15582
|
}
|
|
15583
15583
|
return !0;
|
|
15584
|
-
}).map((E) => [E.placement, E.overflows.filter((k) => k > 0).reduce((k, F) => k + F, 0)]).sort((E, k) => E[1] - k[1])[0]) == null ? void 0 :
|
|
15585
|
-
|
|
15584
|
+
}).map((E) => [E.placement, E.overflows.filter((k) => k > 0).reduce((k, F) => k + F, 0)]).sort((E, k) => E[1] - k[1])[0]) == null ? void 0 : C[0];
|
|
15585
|
+
I && (R = I);
|
|
15586
15586
|
break;
|
|
15587
15587
|
}
|
|
15588
15588
|
case "initialPlacement":
|
|
@@ -15677,7 +15677,7 @@ const ME = function(e) {
|
|
|
15677
15677
|
} = br(e, t), l = {
|
|
15678
15678
|
x: n,
|
|
15679
15679
|
y: r
|
|
15680
|
-
}, u = await Ai(t, a), f = mn(Vn(o)), p =
|
|
15680
|
+
}, u = await Ai(t, a), f = mn(Vn(o)), p = Ch(f);
|
|
15681
15681
|
let d = l[p], h = l[f];
|
|
15682
15682
|
if (s) {
|
|
15683
15683
|
const g = p === "y" ? "top" : "left", A = p === "y" ? "bottom" : "right", w = d + u[g], P = d - u[A];
|
|
@@ -15729,8 +15729,8 @@ const ME = function(e) {
|
|
|
15729
15729
|
const w = m - u.top - u.bottom, P = h - u.left - u.right, N = Sn(m - u[g], w), $ = Sn(h - u[A], P), B = !t.middlewareData.shift;
|
|
15730
15730
|
let M = N, b = $;
|
|
15731
15731
|
if ((n = t.middlewareData.shift) != null && n.enabled.x && (b = P), (r = t.middlewareData.shift) != null && r.enabled.y && (M = w), B && !p) {
|
|
15732
|
-
const x = Ge(u.left, 0), S = Ge(u.right, 0), O = Ge(u.top, 0),
|
|
15733
|
-
d ? b = h - 2 * (x !== 0 || S !== 0 ? x + S : Ge(u.left, u.right)) : M = m - 2 * (O !== 0 ||
|
|
15732
|
+
const x = Ge(u.left, 0), S = Ge(u.right, 0), O = Ge(u.top, 0), C = Ge(u.bottom, 0);
|
|
15733
|
+
d ? b = h - 2 * (x !== 0 || S !== 0 ? x + S : Ge(u.left, u.right)) : M = m - 2 * (O !== 0 || C !== 0 ? O + C : Ge(u.top, u.bottom));
|
|
15734
15734
|
}
|
|
15735
15735
|
await a({
|
|
15736
15736
|
...t,
|
|
@@ -16127,7 +16127,7 @@ const ba = Ai, t8 = ME, n8 = LE, r8 = DE, o8 = FE, Mf = $E, s8 = (e, t, n) => {
|
|
|
16127
16127
|
...o.platform,
|
|
16128
16128
|
_c: r
|
|
16129
16129
|
};
|
|
16130
|
-
return
|
|
16130
|
+
return IE(e, t, {
|
|
16131
16131
|
...o,
|
|
16132
16132
|
platform: s
|
|
16133
16133
|
});
|
|
@@ -16204,7 +16204,7 @@ function Gh(e) {
|
|
|
16204
16204
|
E !== B.current && (B.current = E, m(E));
|
|
16205
16205
|
}, []), P = j.useCallback((E) => {
|
|
16206
16206
|
E !== M.current && (M.current = E, A(E));
|
|
16207
|
-
}, []), N = s || h, $ = i || g, B = j.useRef(null), M = j.useRef(null), b = j.useRef(u), y = a != null, x = ga(a), S = ga(o), O = ga(l),
|
|
16207
|
+
}, []), N = s || h, $ = i || g, B = j.useRef(null), M = j.useRef(null), b = j.useRef(u), y = a != null, x = ga(a), S = ga(o), O = ga(l), C = j.useCallback(() => {
|
|
16208
16208
|
if (!B.current || !M.current)
|
|
16209
16209
|
return;
|
|
16210
16210
|
const E = {
|
|
@@ -16238,10 +16238,10 @@ function Gh(e) {
|
|
|
16238
16238
|
}), []), Es(() => {
|
|
16239
16239
|
if (N && (B.current = N), $ && (M.current = $), N && $) {
|
|
16240
16240
|
if (x.current)
|
|
16241
|
-
return x.current(N, $,
|
|
16242
|
-
|
|
16241
|
+
return x.current(N, $, C);
|
|
16242
|
+
C();
|
|
16243
16243
|
}
|
|
16244
|
-
}, [N, $,
|
|
16244
|
+
}, [N, $, C, x, y]);
|
|
16245
16245
|
const v = j.useMemo(() => ({
|
|
16246
16246
|
reference: B,
|
|
16247
16247
|
floating: M,
|
|
@@ -16250,7 +16250,7 @@ function Gh(e) {
|
|
|
16250
16250
|
}), [w, P]), R = j.useMemo(() => ({
|
|
16251
16251
|
reference: N,
|
|
16252
16252
|
floating: $
|
|
16253
|
-
}), [N, $]),
|
|
16253
|
+
}), [N, $]), I = j.useMemo(() => {
|
|
16254
16254
|
const E = {
|
|
16255
16255
|
position: n,
|
|
16256
16256
|
left: 0,
|
|
@@ -16273,11 +16273,11 @@ function Gh(e) {
|
|
|
16273
16273
|
}, [n, c, R.floating, u.x, u.y]);
|
|
16274
16274
|
return j.useMemo(() => ({
|
|
16275
16275
|
...u,
|
|
16276
|
-
update:
|
|
16276
|
+
update: C,
|
|
16277
16277
|
refs: v,
|
|
16278
16278
|
elements: R,
|
|
16279
|
-
floatingStyles:
|
|
16280
|
-
}), [u,
|
|
16279
|
+
floatingStyles: I
|
|
16280
|
+
}), [u, C, v, R, I]);
|
|
16281
16281
|
}
|
|
16282
16282
|
const c8 = (e) => {
|
|
16283
16283
|
function t(n) {
|
|
@@ -16656,10 +16656,10 @@ let Yr = He({ styles: void 0, setReference: () => {
|
|
|
16656
16656
|
Yr.displayName = "FloatingContext";
|
|
16657
16657
|
let Wl = He(null);
|
|
16658
16658
|
Wl.displayName = "PlacementContext";
|
|
16659
|
-
function
|
|
16659
|
+
function C8(e) {
|
|
16660
16660
|
return J(() => e ? typeof e == "string" ? { to: e } : e : null, [e]);
|
|
16661
16661
|
}
|
|
16662
|
-
function
|
|
16662
|
+
function I8() {
|
|
16663
16663
|
return Ne(Yr).setReference;
|
|
16664
16664
|
}
|
|
16665
16665
|
function $8() {
|
|
@@ -16667,7 +16667,7 @@ function $8() {
|
|
|
16667
16667
|
}
|
|
16668
16668
|
function D8() {
|
|
16669
16669
|
let { getFloatingProps: e, slot: t } = Ne(Yr);
|
|
16670
|
-
return
|
|
16670
|
+
return ee((...n) => Object.assign({}, e(...n), { "data-anchor": t.anchor }), [e, t]);
|
|
16671
16671
|
}
|
|
16672
16672
|
function k8(e = null) {
|
|
16673
16673
|
e === !1 && (e = null), typeof e == "string" && (e = { to: e });
|
|
@@ -16690,25 +16690,25 @@ function B8({ children: e, enabled: t = !0 }) {
|
|
|
16690
16690
|
l && s(0);
|
|
16691
16691
|
}, [l]);
|
|
16692
16692
|
let { refs: A, floatingStyles: w, context: P } = A8({ open: l, placement: m === "selection" ? g === "center" ? "bottom" : `bottom-${g}` : g === "center" ? `${m}` : `${m}-${g}`, strategy: "absolute", transform: !1, middleware: [_l({ mainAxis: m === "selection" ? 0 : f, crossAxis: p }), qh({ padding: d }), m !== "selection" && Kh({ padding: d }), m === "selection" && h ? R8({ ...h, padding: d, overflowRef: i, offset: o, minItemsVisible: Wf, referenceOverflowThreshold: d, onFallbackChange(S) {
|
|
16693
|
-
var O,
|
|
16693
|
+
var O, C;
|
|
16694
16694
|
if (!S) return;
|
|
16695
16695
|
let D = P.elements.floating;
|
|
16696
16696
|
if (!D) return;
|
|
16697
|
-
let v = parseFloat(getComputedStyle(D).scrollPaddingBottom) || 0, R = Math.min(Wf, D.childElementCount),
|
|
16698
|
-
for (let k of (
|
|
16697
|
+
let v = parseFloat(getComputedStyle(D).scrollPaddingBottom) || 0, R = Math.min(Wf, D.childElementCount), I = 0, E = 0;
|
|
16698
|
+
for (let k of (C = (O = P.elements.floating) == null ? void 0 : O.childNodes) != null ? C : []) if (Nn(k)) {
|
|
16699
16699
|
let F = k.offsetTop, z = F + k.clientHeight + v, U = D.scrollTop, H = U + D.clientHeight;
|
|
16700
16700
|
if (F >= U && z <= H) R--;
|
|
16701
16701
|
else {
|
|
16702
|
-
E = Math.max(0, Math.min(z, H) - Math.max(F, U)),
|
|
16702
|
+
E = Math.max(0, Math.min(z, H) - Math.max(F, U)), I = k.clientHeight;
|
|
16703
16703
|
break;
|
|
16704
16704
|
}
|
|
16705
16705
|
}
|
|
16706
16706
|
R >= 1 && s((k) => {
|
|
16707
|
-
let F =
|
|
16707
|
+
let F = I * R - E + v;
|
|
16708
16708
|
return k >= F ? k : F;
|
|
16709
16709
|
});
|
|
16710
|
-
} }) : null, l8({ padding: d, apply({ availableWidth: S, availableHeight: O, elements:
|
|
16711
|
-
Object.assign(
|
|
16710
|
+
} }) : null, l8({ padding: d, apply({ availableWidth: S, availableHeight: O, elements: C }) {
|
|
16711
|
+
Object.assign(C.floating.style, { overflow: "auto", maxWidth: `${S}px`, maxHeight: `min(var(--anchor-max-height, 100vh), ${O}px)` });
|
|
16712
16712
|
} })].filter(Boolean), whileElementsMounted: Vh }), [N = m, $ = g] = P.placement.split("-");
|
|
16713
16713
|
m === "selection" && (N = "selection");
|
|
16714
16714
|
let B = J(() => ({ anchor: [N, $].filter(Boolean).join(" ") }), [N, $]), M = O8(P, { overflowRef: i, onChange: s }), { getReferenceProps: b, getFloatingProps: y } = N8([M]), x = ve((S) => {
|
|
@@ -16871,7 +16871,7 @@ function _8(e) {
|
|
|
16871
16871
|
}, [n, o, t]), r;
|
|
16872
16872
|
}
|
|
16873
16873
|
let tm = Ft, W8 = ut(function(e, t) {
|
|
16874
|
-
let { ownerDocument: n = null, ...r } = e, o = de(null), s =
|
|
16874
|
+
let { ownerDocument: n = null, ...r } = e, o = de(null), s = Ct(Gx((p) => {
|
|
16875
16875
|
o.current = p;
|
|
16876
16876
|
}), t), i = vc(o.current), c = n ?? i, a = _8(c), l = Ne(q8), u = hr(), f = bt();
|
|
16877
16877
|
return em(() => {
|
|
@@ -16882,12 +16882,12 @@ let tm = Ft, W8 = ut(function(e, t) {
|
|
|
16882
16882
|
} }, f({ ourProps: { ref: s }, theirProps: r, slot: {}, defaultTag: tm, name: "Portal" })), a) : null;
|
|
16883
16883
|
});
|
|
16884
16884
|
function V8(e, t) {
|
|
16885
|
-
let n =
|
|
16885
|
+
let n = Ct(t), { enabled: r = !0, ownerDocument: o, ...s } = e, i = bt();
|
|
16886
16886
|
return r ? Z.createElement(W8, { ...s, ownerDocument: o, ref: n }) : i({ ourProps: { ref: n }, theirProps: s, slot: {}, defaultTag: tm, name: "Portal" });
|
|
16887
16887
|
}
|
|
16888
16888
|
let H8 = Ft, nm = He(null);
|
|
16889
16889
|
function G8(e, t) {
|
|
16890
|
-
let { target: n, ...r } = e, o = { ref:
|
|
16890
|
+
let { target: n, ...r } = e, o = { ref: Ct(t) }, s = bt();
|
|
16891
16891
|
return Z.createElement(nm.Provider, { value: n }, s({ ourProps: o, theirProps: r, defaultTag: H8, name: "Popover.Group" }));
|
|
16892
16892
|
}
|
|
16893
16893
|
let q8 = He(null), K8 = ut(V8), Z8 = ut(G8), Y8 = Object.assign(K8, { Group: Z8 });
|
|
@@ -16942,8 +16942,8 @@ function n3() {
|
|
|
16942
16942
|
}
|
|
16943
16943
|
let Oi = He(null);
|
|
16944
16944
|
Oi.displayName = "NestingContext";
|
|
16945
|
-
function
|
|
16946
|
-
return "children" in e ?
|
|
16945
|
+
function Ci(e) {
|
|
16946
|
+
return "children" in e ? Ci(e.children) : e.current.filter(({ el: t }) => t.current !== null).filter(({ state: t }) => t === "visible").length > 0;
|
|
16947
16947
|
}
|
|
16948
16948
|
function im(e, t) {
|
|
16949
16949
|
let n = mr(e), r = de([]), o = Q8(), s = hr(), i = ve((d, h = Dn.Hidden) => {
|
|
@@ -16954,7 +16954,7 @@ function im(e, t) {
|
|
|
16954
16954
|
r.current[m].state = "hidden";
|
|
16955
16955
|
} }), s.microTask(() => {
|
|
16956
16956
|
var g;
|
|
16957
|
-
!
|
|
16957
|
+
!Ci(r) && o.current && ((g = n.current) == null || g.call(n));
|
|
16958
16958
|
}));
|
|
16959
16959
|
}), c = ve((d) => {
|
|
16960
16960
|
let h = r.current.find(({ el: m }) => m === d);
|
|
@@ -16976,44 +16976,44 @@ function im(e, t) {
|
|
|
16976
16976
|
let am = Ft, cm = zs.RenderStrategy;
|
|
16977
16977
|
function r3(e, t) {
|
|
16978
16978
|
var n, r;
|
|
16979
|
-
let { transition: o = !0, beforeEnter: s, afterEnter: i, beforeLeave: c, afterLeave: a, enter: l, enterFrom: u, enterTo: f, entered: p, leave: d, leaveFrom: h, leaveTo: m, ...g } = e, [A, w] = ie(null), P = de(null), N = sm(e), $ =
|
|
16980
|
-
De(() =>
|
|
16979
|
+
let { transition: o = !0, beforeEnter: s, afterEnter: i, beforeLeave: c, afterLeave: a, enter: l, enterFrom: u, enterTo: f, entered: p, leave: d, leaveFrom: h, leaveTo: m, ...g } = e, [A, w] = ie(null), P = de(null), N = sm(e), $ = Ct(...N ? [P, t, w] : t === null ? [] : [t]), B = (n = g.unmount) == null || n ? Dn.Unmount : Dn.Hidden, { show: M, appear: b, initial: y } = t3(), [x, S] = ie(M ? "visible" : "hidden"), O = n3(), { register: C, unregister: D } = O;
|
|
16980
|
+
De(() => C(P), [C, P]), De(() => {
|
|
16981
16981
|
if (B === Dn.Hidden && P.current) {
|
|
16982
16982
|
if (M && x !== "visible") {
|
|
16983
16983
|
S("visible");
|
|
16984
16984
|
return;
|
|
16985
16985
|
}
|
|
16986
|
-
return Rt(x, { hidden: () => D(P), visible: () =>
|
|
16986
|
+
return Rt(x, { hidden: () => D(P), visible: () => C(P) });
|
|
16987
16987
|
}
|
|
16988
|
-
}, [x, P,
|
|
16988
|
+
}, [x, P, C, D, M, B]);
|
|
16989
16989
|
let v = om();
|
|
16990
16990
|
De(() => {
|
|
16991
16991
|
if (N && v && x === "visible" && P.current === null) throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
|
|
16992
16992
|
}, [P, x, v, N]);
|
|
16993
|
-
let R = y && !b,
|
|
16993
|
+
let R = y && !b, I = b && M && y, E = de(!1), k = im(() => {
|
|
16994
16994
|
E.current || (S("hidden"), D(P));
|
|
16995
16995
|
}, O), F = ve((ne) => {
|
|
16996
16996
|
E.current = !0;
|
|
16997
16997
|
let xe = ne ? "enter" : "leave";
|
|
16998
|
-
k.onStart(P, xe, (
|
|
16999
|
-
|
|
16998
|
+
k.onStart(P, xe, (G) => {
|
|
16999
|
+
G === "enter" ? s == null || s() : G === "leave" && (c == null || c());
|
|
17000
17000
|
});
|
|
17001
17001
|
}), z = ve((ne) => {
|
|
17002
17002
|
let xe = ne ? "enter" : "leave";
|
|
17003
|
-
E.current = !1, k.onStop(P, xe, (
|
|
17004
|
-
|
|
17005
|
-
}), xe === "leave" && !
|
|
17003
|
+
E.current = !1, k.onStop(P, xe, (G) => {
|
|
17004
|
+
G === "enter" ? i == null || i() : G === "leave" && (a == null || a());
|
|
17005
|
+
}), xe === "leave" && !Ci(k) && (S("hidden"), D(P));
|
|
17006
17006
|
});
|
|
17007
17007
|
Te(() => {
|
|
17008
17008
|
N && o || (F(M), z(M));
|
|
17009
17009
|
}, [M, N, o]);
|
|
17010
|
-
let U = !(!o || !N || !v || R), [, H] = Rh(U, A, M, { start: F, end: z }),
|
|
17011
|
-
x === "visible" && (
|
|
17010
|
+
let U = !(!o || !N || !v || R), [, H] = Rh(U, A, M, { start: F, end: z }), te = $n({ ref: $, className: ((r = hc(g.className, I && l, I && u, H.enter && l, H.enter && H.closed && u, H.enter && !H.closed && f, H.leave && d, H.leave && !H.closed && h, H.leave && H.closed && m, !H.transition && M && p)) == null ? void 0 : r.trim()) || void 0, ...Nh(H) }), q = 0;
|
|
17011
|
+
x === "visible" && (q |= Mt.Open), x === "hidden" && (q |= Mt.Closed), M && x === "hidden" && (q |= Mt.Opening), !M && x === "visible" && (q |= Mt.Closing);
|
|
17012
17012
|
let _ = bt();
|
|
17013
|
-
return Z.createElement(Oi.Provider, { value: k }, Z.createElement(Qh, { value:
|
|
17013
|
+
return Z.createElement(Oi.Provider, { value: k }, Z.createElement(Qh, { value: q }, _({ ourProps: te, theirProps: g, defaultTag: am, features: cm, visible: x === "visible", name: "Transition.Child" })));
|
|
17014
17014
|
}
|
|
17015
17015
|
function o3(e, t) {
|
|
17016
|
-
let { show: n, appear: r = !1, unmount: o = !0, ...s } = e, i = de(null), c = sm(e), a =
|
|
17016
|
+
let { show: n, appear: r = !1, unmount: o = !0, ...s } = e, i = de(null), c = sm(e), a = Ct(...c ? [i, t] : t === null ? [] : [t]);
|
|
17017
17017
|
om();
|
|
17018
17018
|
let l = Hl();
|
|
17019
17019
|
if (n === void 0 && l !== null && (n = (l & Mt.Open) === Mt.Open), n === void 0) throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");
|
|
@@ -17025,7 +17025,7 @@ function o3(e, t) {
|
|
|
17025
17025
|
}, [m, n]);
|
|
17026
17026
|
let g = J(() => ({ show: n, appear: r, initial: d }), [n, r, d]);
|
|
17027
17027
|
De(() => {
|
|
17028
|
-
n ? f("visible") : !
|
|
17028
|
+
n ? f("visible") : !Ci(p) && i.current !== null && f("hidden");
|
|
17029
17029
|
}, [n, p]);
|
|
17030
17030
|
let A = { unmount: o }, w = ve(() => {
|
|
17031
17031
|
var $;
|
|
@@ -17249,10 +17249,10 @@ function dm({ id: e, __demoMode: t = !1 }) {
|
|
|
17249
17249
|
let n = J(() => ql.new({ id: e, __demoMode: t }), []);
|
|
17250
17250
|
return em(() => n.dispose()), n;
|
|
17251
17251
|
}
|
|
17252
|
-
let
|
|
17253
|
-
|
|
17252
|
+
let Ii = He(null);
|
|
17253
|
+
Ii.displayName = "ListboxDataContext";
|
|
17254
17254
|
function ss(e) {
|
|
17255
|
-
let t = Ne(
|
|
17255
|
+
let t = Ne(Ii);
|
|
17256
17256
|
if (t === null) {
|
|
17257
17257
|
let n = new Error(`<${e} /> is missing a parent <Listbox /> component.`);
|
|
17258
17258
|
throw Error.captureStackTrace && Error.captureStackTrace(n, ss), n;
|
|
@@ -17263,23 +17263,23 @@ let d3 = Ft;
|
|
|
17263
17263
|
function p3(e, t) {
|
|
17264
17264
|
let n = ur(), r = $l(), { value: o, defaultValue: s, form: i, name: c, onChange: a, by: l, invalid: u = !1, disabled: f = r || !1, horizontal: p = !1, multiple: d = !1, __demoMode: h = !1, ...m } = e;
|
|
17265
17265
|
const g = p ? "horizontal" : "vertical";
|
|
17266
|
-
let A =
|
|
17266
|
+
let A = Ct(t), w = Ix(s), [P = d ? [] : void 0, N] = Cx(o, a, w), $ = dm({ id: n, __demoMode: h }), B = de({ static: !1, hold: !1 }), M = de(/* @__PURE__ */ new Map()), b = r2(l), y = ee((U) => Rt(x.mode, { [kn.Multi]: () => P.some((H) => b(H, U)), [kn.Single]: () => b(P, U) }), [P]), x = Wn({ value: P, disabled: f, invalid: u, mode: d ? kn.Multi : kn.Single, orientation: g, onChange: N, compare: b, isSelected: y, optionsPropsRef: B, listRef: M });
|
|
17267
17267
|
De(() => {
|
|
17268
17268
|
$.state.dataRef.current = x;
|
|
17269
17269
|
}, [x]);
|
|
17270
|
-
let S = nt($, (U) => U.listboxState), O = Bl.get(null),
|
|
17271
|
-
|
|
17270
|
+
let S = nt($, (U) => U.listboxState), O = Bl.get(null), C = nt(O, ee((U) => O.selectors.isTop(U, n), [O, n])), [D, v] = nt($, (U) => [U.buttonElement, U.optionsElement]);
|
|
17271
|
+
C2(C, [D, v], (U, H) => {
|
|
17272
17272
|
$.send({ type: um.CloseListbox }), Sh(H, Ml.Loose) || (U.preventDefault(), D == null || D.focus());
|
|
17273
17273
|
});
|
|
17274
|
-
let R = Wn({ open: S === qe.Open, disabled: f, invalid: u, value: P }), [
|
|
17274
|
+
let R = Wn({ open: S === qe.Open, disabled: f, invalid: u, value: P }), [I, E] = Xx({ inherit: !0 }), k = { ref: A }, F = ee(() => {
|
|
17275
17275
|
if (w !== void 0) return N == null ? void 0 : N(w);
|
|
17276
17276
|
}, [N, w]), z = bt();
|
|
17277
|
-
return Z.createElement(E, { value:
|
|
17277
|
+
return Z.createElement(E, { value: I, props: { htmlFor: D == null ? void 0 : D.id }, slot: { open: S === qe.Open, disabled: f } }, Z.createElement(B8, null, Z.createElement(fm.Provider, { value: $ }, Z.createElement(Ii.Provider, { value: x }, Z.createElement(Qh, { value: Rt(S, { [qe.Open]: Mt.Open, [qe.Closed]: Mt.Closed }) }, c != null && P != null && Z.createElement(Fx, { disabled: f, data: { [c]: P }, form: i, onReset: F }), z({ ourProps: k, theirProps: m, slot: R, defaultTag: d3, name: "Listbox" }))))));
|
|
17278
17278
|
}
|
|
17279
17279
|
let h3 = "button";
|
|
17280
17280
|
function m3(e, t) {
|
|
17281
|
-
let n = ur(), r = ah(), o = ss("Listbox.Button"), s = Kl("Listbox.Button"), { id: i = r || `headlessui-listbox-button-${n}`, disabled: c = o.disabled || !1, autoFocus: a = !1, ...l } = e, u =
|
|
17282
|
-
D2(m, { trigger: d, action:
|
|
17281
|
+
let n = ur(), r = ah(), o = ss("Listbox.Button"), s = Kl("Listbox.Button"), { id: i = r || `headlessui-listbox-button-${n}`, disabled: c = o.disabled || !1, autoFocus: a = !1, ...l } = e, u = Ct(t, I8(), s.actions.setButtonElement), f = $8(), [p, d, h] = nt(s, (v) => [v.listboxState, v.buttonElement, v.optionsElement]), m = p === qe.Open;
|
|
17282
|
+
D2(m, { trigger: d, action: ee((v) => {
|
|
17283
17283
|
if (d != null && d.contains(v.target)) return bs.Ignore;
|
|
17284
17284
|
let R = v.target.closest('[role="option"]:not([data-disabled])');
|
|
17285
17285
|
return Nn(R) ? bs.Select(R) : h != null && h.contains(v.target) ? bs.Ignore : bs.Close;
|
|
@@ -17306,30 +17306,30 @@ function m3(e, t) {
|
|
|
17306
17306
|
}), w = s2((v) => {
|
|
17307
17307
|
var R;
|
|
17308
17308
|
s.state.listboxState === qe.Open ? (Ns(() => s.actions.closeListbox()), (R = s.state.buttonElement) == null || R.focus({ preventScroll: !0 })) : (v.preventDefault(), s.actions.openListbox({ focus: Oe.Nothing }));
|
|
17309
|
-
}), P = ve((v) => v.preventDefault()), N = hh([i]), $ = qx(), { isFocusVisible: B, focusProps: M } = bx({ autoFocus: a }), { isHovered: b, hoverProps: y } = mx({ isDisabled: c }), { pressed: x, pressProps: S } = Px({ disabled: c }), O = Wn({ open: p === qe.Open, active: x || p === qe.Open, disabled: c, invalid: o.invalid, value: o.value, hover: b, focus: B, autofocus: a }),
|
|
17309
|
+
}), P = ve((v) => v.preventDefault()), N = hh([i]), $ = qx(), { isFocusVisible: B, focusProps: M } = bx({ autoFocus: a }), { isHovered: b, hoverProps: y } = mx({ isDisabled: c }), { pressed: x, pressProps: S } = Px({ disabled: c }), O = Wn({ open: p === qe.Open, active: x || p === qe.Open, disabled: c, invalid: o.invalid, value: o.value, hover: b, focus: B, autofocus: a }), C = nt(s, (v) => v.listboxState === qe.Open), D = nh(f(), { ref: u, id: i, type: k2(e, d), "aria-haspopup": "listbox", "aria-controls": h == null ? void 0 : h.id, "aria-expanded": C, "aria-labelledby": N, "aria-describedby": $, disabled: c || void 0, autoFocus: a, onKeyDown: g, onKeyUp: A, onKeyPress: P }, w, M, y, S);
|
|
17310
17310
|
return bt()({ ourProps: D, theirProps: l, slot: O, defaultTag: h3, name: "Listbox.Button" });
|
|
17311
17311
|
}
|
|
17312
17312
|
let pm = He(!1), b3 = "div", g3 = zs.RenderStrategy | zs.Static;
|
|
17313
17313
|
function y3(e, t) {
|
|
17314
|
-
let n = ur(), { id: r = `headlessui-listbox-options-${n}`, anchor: o, portal: s = !1, modal: i = !0, transition: c = !1, ...a } = e, l =
|
|
17314
|
+
let n = ur(), { id: r = `headlessui-listbox-options-${n}`, anchor: o, portal: s = !1, modal: i = !0, transition: c = !1, ...a } = e, l = C8(o), [u, f] = ie(null);
|
|
17315
17315
|
l && (s = !0);
|
|
17316
17316
|
let p = ss("Listbox.Options"), d = Kl("Listbox.Options"), [h, m, g, A] = nt(d, (_) => [_.listboxState, _.buttonElement, _.optionsElement, _.__demoMode]), w = vc(m), P = vc(g), N = Hl(), [$, B] = Rh(c, u, N !== null ? (N & Mt.Open) === Mt.Open : h === qe.Open);
|
|
17317
17317
|
y2($, m, d.actions.closeListbox);
|
|
17318
17318
|
let M = A ? !1 : i && h === qe.Open;
|
|
17319
17319
|
U2(M, P);
|
|
17320
17320
|
let b = A ? !1 : i && h === qe.Open;
|
|
17321
|
-
g2(b, { allowed:
|
|
17322
|
-
let y = nt(d, d.selectors.didButtonMove) ? !1 : $, x = nt(d, d.selectors.hasFrozenValue) && !e.static, S = Jh(x, p.value), O =
|
|
17321
|
+
g2(b, { allowed: ee(() => [m, g], [m, g]) });
|
|
17322
|
+
let y = nt(d, d.selectors.didButtonMove) ? !1 : $, x = nt(d, d.selectors.hasFrozenValue) && !e.static, S = Jh(x, p.value), O = ee((_) => p.compare(S, _), [p.compare, S]), C = nt(d, (_) => {
|
|
17323
17323
|
var ne;
|
|
17324
17324
|
if (l == null || !((ne = l == null ? void 0 : l.to) != null && ne.includes("selection"))) return null;
|
|
17325
|
-
let xe = _.options.findIndex((
|
|
17325
|
+
let xe = _.options.findIndex((G) => O(G.dataRef.current.value));
|
|
17326
17326
|
return xe === -1 && (xe = 0), xe;
|
|
17327
17327
|
}), D = (() => {
|
|
17328
17328
|
if (l == null) return;
|
|
17329
|
-
if (
|
|
17329
|
+
if (C === null) return { ...l, inner: void 0 };
|
|
17330
17330
|
let _ = Array.from(p.listRef.current.values());
|
|
17331
|
-
return { ...l, inner: { listRef: { current: _ }, index:
|
|
17332
|
-
})(), [v, R] = k8(D),
|
|
17331
|
+
return { ...l, inner: { listRef: { current: _ }, index: C } };
|
|
17332
|
+
})(), [v, R] = k8(D), I = D8(), E = Ct(t, l ? v : null, d.actions.setOptionsElement, f), k = hr();
|
|
17333
17333
|
Te(() => {
|
|
17334
17334
|
let _ = g;
|
|
17335
17335
|
_ && h === qe.Open && (wx(_) || _ == null || _.focus({ preventScroll: !0 }));
|
|
@@ -17365,14 +17365,14 @@ function y3(e, t) {
|
|
|
17365
17365
|
}), z = nt(d, (_) => {
|
|
17366
17366
|
var ne;
|
|
17367
17367
|
return (ne = _.buttonElement) == null ? void 0 : ne.id;
|
|
17368
|
-
}), U = Wn({ open: h === qe.Open }), H = nh(l ?
|
|
17369
|
-
return Z.createElement(Y8, { enabled: s ? e.static || $ : !1, ownerDocument: w }, Z.createElement(
|
|
17368
|
+
}), U = Wn({ open: h === qe.Open }), H = nh(l ? I() : {}, { id: r, ref: E, "aria-activedescendant": nt(d, d.selectors.activeDescendantId), "aria-multiselectable": p.mode === kn.Multi ? !0 : void 0, "aria-labelledby": z, "aria-orientation": p.orientation, onKeyDown: F, role: "listbox", tabIndex: h === qe.Open ? 0 : void 0, style: { ...a.style, ...R, "--button-width": o2($, m, !0).width }, ...Nh(B) }), te = bt(), q = J(() => p.mode === kn.Multi ? p : { ...p, isSelected: O }, [p, O]);
|
|
17369
|
+
return Z.createElement(Y8, { enabled: s ? e.static || $ : !1, ownerDocument: w }, Z.createElement(Ii.Provider, { value: q }, te({ ourProps: H, theirProps: a, slot: U, defaultTag: b3, features: g3, visible: y, name: "Listbox.Options" })));
|
|
17370
17370
|
}
|
|
17371
17371
|
let v3 = "div";
|
|
17372
17372
|
function w3(e, t) {
|
|
17373
17373
|
let n = ur(), { id: r = `headlessui-listbox-option-${n}`, disabled: o = !1, value: s, ...i } = e, c = Ne(pm) === !0, a = ss("Listbox.Option"), l = Kl("Listbox.Option"), u = nt(l, (x) => l.selectors.isActive(x, r)), f = a.isSelected(s), p = de(null), d = c3(p), h = mr({ disabled: o, value: s, domRef: p, get textValue() {
|
|
17374
17374
|
return d();
|
|
17375
|
-
} }), m =
|
|
17375
|
+
} }), m = Ct(t, p, (x) => {
|
|
17376
17376
|
x ? a.listRef.current.set(r, x) : a.listRef.current.delete(r);
|
|
17377
17377
|
}), g = nt(l, (x) => l.selectors.shouldScrollIntoView(x, r));
|
|
17378
17378
|
De(() => {
|
|
@@ -17398,7 +17398,7 @@ function w3(e, t) {
|
|
|
17398
17398
|
}
|
|
17399
17399
|
let x3 = Ft;
|
|
17400
17400
|
function E3(e, t) {
|
|
17401
|
-
let { options: n, placeholder: r, ...o } = e, s = { ref:
|
|
17401
|
+
let { options: n, placeholder: r, ...o } = e, s = { ref: Ct(t) }, i = ss("ListboxSelectedOption"), c = Wn({}), a = i.value === void 0 || i.value === null || i.mode === kn.Multi && Array.isArray(i.value) && i.value.length === 0, l = bt();
|
|
17402
17402
|
return Z.createElement(pm.Provider, { value: !0 }, l({ ourProps: s, theirProps: { ...o, children: Z.createElement(Z.Fragment, null, r && a ? r : n) }, slot: c, defaultTag: x3, name: "ListboxSelectedOption" }));
|
|
17403
17403
|
}
|
|
17404
17404
|
let P3 = ut(p3), S3 = ut(m3), T3 = t2, A3 = ut(y3), N3 = ut(w3), R3 = ut(E3), At = Object.assign(P3, { Button: S3, Label: T3, Options: A3, Option: N3, SelectedOption: R3 });
|
|
@@ -17429,7 +17429,7 @@ const O3 = () => /* @__PURE__ */ T.jsxs(
|
|
|
17429
17429
|
) }) })
|
|
17430
17430
|
]
|
|
17431
17431
|
}
|
|
17432
|
-
),
|
|
17432
|
+
), C3 = () => /* @__PURE__ */ T.jsxs(
|
|
17433
17433
|
"svg",
|
|
17434
17434
|
{
|
|
17435
17435
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -17462,17 +17462,17 @@ const O3 = () => /* @__PURE__ */ T.jsxs(
|
|
|
17462
17462
|
className: n = ""
|
|
17463
17463
|
}) => {
|
|
17464
17464
|
const r = Array.from({ length: t }, (o, s) => s + 1);
|
|
17465
|
-
return /* @__PURE__ */ T.jsx("div", { className: `flex items-center ${n}`, children: r.map((o) => /* @__PURE__ */ T.jsx("div", { className: "flex items-center justify-center", children: o > t - e ? /* @__PURE__ */ T.jsx(O3, {}) : /* @__PURE__ */ T.jsx(
|
|
17465
|
+
return /* @__PURE__ */ T.jsx("div", { className: `flex items-center ${n}`, children: r.map((o) => /* @__PURE__ */ T.jsx("div", { className: "flex items-center justify-center", children: o > t - e ? /* @__PURE__ */ T.jsx(O3, {}) : /* @__PURE__ */ T.jsx(C3, {}) }, o)) });
|
|
17466
17466
|
};
|
|
17467
17467
|
class kt {
|
|
17468
17468
|
}
|
|
17469
17469
|
Xr(kt, "FAST", 3), Xr(kt, "Medium", 2), Xr(kt, "SLOW", 1), Xr(kt, "NONE", 0);
|
|
17470
|
-
const
|
|
17470
|
+
const I3 = {
|
|
17471
17471
|
MAINNET: 1,
|
|
17472
17472
|
// ETH 主网
|
|
17473
17473
|
SEPOLIA: 11155111
|
|
17474
17474
|
// Sepolia 测试网
|
|
17475
|
-
}, $3 = Object.values(
|
|
17475
|
+
}, $3 = Object.values(I3), pn = (e) => {
|
|
17476
17476
|
const t = typeof e == "string" ? parseInt(e, 10) : e;
|
|
17477
17477
|
return $3.includes(
|
|
17478
17478
|
t
|
|
@@ -17752,7 +17752,7 @@ const C3 = {
|
|
|
17752
17752
|
// 默认为充值场景
|
|
17753
17753
|
accountType: c
|
|
17754
17754
|
}) => {
|
|
17755
|
-
const a =
|
|
17755
|
+
const a = ee(
|
|
17756
17756
|
(g) => i === "withdraw" ? s === yn ? g.allowAaWithdraw !== !1 : g.allowWithdraw !== !1 : s === yn ? g.allowAaDeposit !== !1 : g.allowDeposit !== !1,
|
|
17757
17757
|
[i, s]
|
|
17758
17758
|
), l = J(() => {
|
|
@@ -18170,11 +18170,11 @@ Zl(vm, "defaultProps", {
|
|
|
18170
18170
|
onCopy: void 0,
|
|
18171
18171
|
options: void 0
|
|
18172
18172
|
});
|
|
18173
|
-
var e4 = $i,
|
|
18174
|
-
|
|
18175
|
-
var t4 =
|
|
18173
|
+
var e4 = $i, Cc = e4.CopyToClipboard;
|
|
18174
|
+
Cc.CopyToClipboard = Cc;
|
|
18175
|
+
var t4 = Cc;
|
|
18176
18176
|
const n4 = /* @__PURE__ */ lb(t4);
|
|
18177
|
-
var r4 = Object.defineProperty, Gs = Object.getOwnPropertySymbols, wm = Object.prototype.hasOwnProperty, xm = Object.prototype.propertyIsEnumerable, Jf = (e, t, n) => t in e ? r4(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n,
|
|
18177
|
+
var r4 = Object.defineProperty, Gs = Object.getOwnPropertySymbols, wm = Object.prototype.hasOwnProperty, xm = Object.prototype.propertyIsEnumerable, Jf = (e, t, n) => t in e ? r4(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Ic = (e, t) => {
|
|
18178
18178
|
for (var n in t || (t = {}))
|
|
18179
18179
|
wm.call(t, n) && Jf(e, n, t[n]);
|
|
18180
18180
|
if (Gs)
|
|
@@ -18783,7 +18783,7 @@ function c4(e, t, n, r) {
|
|
|
18783
18783
|
function l4(e, t) {
|
|
18784
18784
|
return t != null ? Math.max(Math.floor(t), 0) : e ? s4 : i4;
|
|
18785
18785
|
}
|
|
18786
|
-
function
|
|
18786
|
+
function Cm({
|
|
18787
18787
|
value: e,
|
|
18788
18788
|
level: t,
|
|
18789
18789
|
minVersion: n,
|
|
@@ -18863,7 +18863,7 @@ var u4 = function() {
|
|
|
18863
18863
|
P.current = D, typeof n == "function" ? n(D) : n && (n.current = D);
|
|
18864
18864
|
},
|
|
18865
18865
|
[n]
|
|
18866
|
-
), [B, M] = Z.useState(!1), { margin: b, cells: y, numCells: x, calculatedImageSettings: S } =
|
|
18866
|
+
), [B, M] = Z.useState(!1), { margin: b, cells: y, numCells: x, calculatedImageSettings: S } = Cm({
|
|
18867
18867
|
value: o,
|
|
18868
18868
|
level: i,
|
|
18869
18869
|
minVersion: u,
|
|
@@ -18879,7 +18879,7 @@ var u4 = function() {
|
|
|
18879
18879
|
if (!v)
|
|
18880
18880
|
return;
|
|
18881
18881
|
let R = y;
|
|
18882
|
-
const
|
|
18882
|
+
const I = N.current, E = S != null && I !== null && I.complete && I.naturalHeight !== 0 && I.naturalWidth !== 0;
|
|
18883
18883
|
E && S.excavation != null && (R = Om(
|
|
18884
18884
|
y,
|
|
18885
18885
|
S.excavation
|
|
@@ -18888,11 +18888,11 @@ var u4 = function() {
|
|
|
18888
18888
|
D.height = D.width = s * k;
|
|
18889
18889
|
const F = s / x * k;
|
|
18890
18890
|
v.scale(F, F), v.fillStyle = c, v.fillRect(0, 0, x, x), v.fillStyle = a, u4 ? v.fill(new Path2D(Rm(R, b))) : y.forEach(function(z, U) {
|
|
18891
|
-
z.forEach(function(H,
|
|
18892
|
-
H && v.fillRect(
|
|
18891
|
+
z.forEach(function(H, te) {
|
|
18892
|
+
H && v.fillRect(te + b, U + b, 1, 1);
|
|
18893
18893
|
});
|
|
18894
18894
|
}), S && (v.globalAlpha = S.opacity), E && v.drawImage(
|
|
18895
|
-
|
|
18895
|
+
I,
|
|
18896
18896
|
S.x + b,
|
|
18897
18897
|
S.y + b,
|
|
18898
18898
|
S.w,
|
|
@@ -18902,9 +18902,9 @@ var u4 = function() {
|
|
|
18902
18902
|
}), Z.useEffect(() => {
|
|
18903
18903
|
M(!1);
|
|
18904
18904
|
}, [w]);
|
|
18905
|
-
const O =
|
|
18906
|
-
let
|
|
18907
|
-
return w != null && (
|
|
18905
|
+
const O = Ic({ height: s, width: s }, g);
|
|
18906
|
+
let C = null;
|
|
18907
|
+
return w != null && (C = /* @__PURE__ */ Z.createElement(
|
|
18908
18908
|
"img",
|
|
18909
18909
|
{
|
|
18910
18910
|
src: w,
|
|
@@ -18918,18 +18918,18 @@ var u4 = function() {
|
|
|
18918
18918
|
}
|
|
18919
18919
|
)), /* @__PURE__ */ Z.createElement(Z.Fragment, null, /* @__PURE__ */ Z.createElement(
|
|
18920
18920
|
"canvas",
|
|
18921
|
-
|
|
18921
|
+
Ic({
|
|
18922
18922
|
style: O,
|
|
18923
18923
|
height: s,
|
|
18924
18924
|
width: s,
|
|
18925
18925
|
ref: $,
|
|
18926
18926
|
role: "img"
|
|
18927
18927
|
}, A)
|
|
18928
|
-
),
|
|
18928
|
+
), C);
|
|
18929
18929
|
}
|
|
18930
18930
|
);
|
|
18931
18931
|
f4.displayName = "QRCodeCanvas";
|
|
18932
|
-
var
|
|
18932
|
+
var Im = Z.forwardRef(
|
|
18933
18933
|
function(t, n) {
|
|
18934
18934
|
const r = t, {
|
|
18935
18935
|
value: o,
|
|
@@ -18955,7 +18955,7 @@ var Cm = Z.forwardRef(
|
|
|
18955
18955
|
"title",
|
|
18956
18956
|
"marginSize",
|
|
18957
18957
|
"imageSettings"
|
|
18958
|
-
]), { margin: g, cells: A, numCells: w, calculatedImageSettings: P } =
|
|
18958
|
+
]), { margin: g, cells: A, numCells: w, calculatedImageSettings: P } = Cm({
|
|
18959
18959
|
value: o,
|
|
18960
18960
|
level: i,
|
|
18961
18961
|
minVersion: u,
|
|
@@ -18985,7 +18985,7 @@ var Cm = Z.forwardRef(
|
|
|
18985
18985
|
const B = Rm(N, g);
|
|
18986
18986
|
return /* @__PURE__ */ Z.createElement(
|
|
18987
18987
|
"svg",
|
|
18988
|
-
|
|
18988
|
+
Ic({
|
|
18989
18989
|
height: s,
|
|
18990
18990
|
width: s,
|
|
18991
18991
|
viewBox: `0 0 ${w} ${w}`,
|
|
@@ -19006,7 +19006,7 @@ var Cm = Z.forwardRef(
|
|
|
19006
19006
|
);
|
|
19007
19007
|
}
|
|
19008
19008
|
);
|
|
19009
|
-
|
|
19009
|
+
Im.displayName = "QRCodeSVG";
|
|
19010
19010
|
function d4() {
|
|
19011
19011
|
const e = navigator.userAgentData;
|
|
19012
19012
|
return e != null && e.platform ? e.platform : navigator.platform;
|
|
@@ -19160,14 +19160,14 @@ function ed(e) {
|
|
|
19160
19160
|
delete n.dataset.tabindex, r ? n.setAttribute("tabindex", r) : n.removeAttribute("tabindex");
|
|
19161
19161
|
});
|
|
19162
19162
|
}
|
|
19163
|
-
const O4 = "data-floating-ui-focusable", td = "active", nd = "selected",
|
|
19163
|
+
const O4 = "data-floating-ui-focusable", td = "active", nd = "selected", C4 = {
|
|
19164
19164
|
...j
|
|
19165
19165
|
};
|
|
19166
|
-
let rd = !1,
|
|
19166
|
+
let rd = !1, I4 = 0;
|
|
19167
19167
|
const od = () => (
|
|
19168
19168
|
// Ensure the id is unique with multiple independent versions of Floating UI
|
|
19169
19169
|
// on <React 18
|
|
19170
|
-
"floating-ui-" + Math.random().toString(36).slice(2, 6) +
|
|
19170
|
+
"floating-ui-" + Math.random().toString(36).slice(2, 6) + I4++
|
|
19171
19171
|
);
|
|
19172
19172
|
function $4() {
|
|
19173
19173
|
const [e, t] = j.useState(() => rd ? od() : void 0);
|
|
@@ -19177,7 +19177,7 @@ function $4() {
|
|
|
19177
19177
|
rd = !0;
|
|
19178
19178
|
}, []), e;
|
|
19179
19179
|
}
|
|
19180
|
-
const D4 =
|
|
19180
|
+
const D4 = C4.useId, Yl = D4 || $4;
|
|
19181
19181
|
let kc;
|
|
19182
19182
|
process.env.NODE_ENV !== "production" && (kc = /* @__PURE__ */ new Set());
|
|
19183
19183
|
function k4() {
|
|
@@ -19247,46 +19247,46 @@ function F4(e, t) {
|
|
|
19247
19247
|
move: p = !0
|
|
19248
19248
|
} = t, d = Jl(), h = Xl(), m = ws(l), g = ws(a), A = ws(n), w = ws(f), P = j.useRef(), N = j.useRef(-1), $ = j.useRef(), B = j.useRef(-1), M = j.useRef(!0), b = j.useRef(!1), y = j.useRef(() => {
|
|
19249
19249
|
}), x = j.useRef(!1), S = Zt(() => {
|
|
19250
|
-
var
|
|
19251
|
-
const E = (
|
|
19250
|
+
var I;
|
|
19251
|
+
const E = (I = o.current.openEvent) == null ? void 0 : I.type;
|
|
19252
19252
|
return (E == null ? void 0 : E.includes("mouse")) && E !== "mousedown";
|
|
19253
19253
|
});
|
|
19254
19254
|
j.useEffect(() => {
|
|
19255
19255
|
if (!c) return;
|
|
19256
|
-
function
|
|
19256
|
+
function I(E) {
|
|
19257
19257
|
let {
|
|
19258
19258
|
open: k
|
|
19259
19259
|
} = E;
|
|
19260
19260
|
k || (Pt(N), Pt(B), M.current = !0, x.current = !1);
|
|
19261
19261
|
}
|
|
19262
|
-
return s.on("openchange",
|
|
19263
|
-
s.off("openchange",
|
|
19262
|
+
return s.on("openchange", I), () => {
|
|
19263
|
+
s.off("openchange", I);
|
|
19264
19264
|
};
|
|
19265
19265
|
}, [c, s]), j.useEffect(() => {
|
|
19266
19266
|
if (!c || !m.current || !n) return;
|
|
19267
|
-
function
|
|
19267
|
+
function I(k) {
|
|
19268
19268
|
S() && r(!1, k, "hover");
|
|
19269
19269
|
}
|
|
19270
19270
|
const E = Yt(i.floating).documentElement;
|
|
19271
|
-
return E.addEventListener("mouseleave",
|
|
19272
|
-
E.removeEventListener("mouseleave",
|
|
19271
|
+
return E.addEventListener("mouseleave", I), () => {
|
|
19272
|
+
E.removeEventListener("mouseleave", I);
|
|
19273
19273
|
};
|
|
19274
19274
|
}, [i.floating, n, r, c, m, S]);
|
|
19275
|
-
const O = j.useCallback(function(
|
|
19275
|
+
const O = j.useCallback(function(I, E, k) {
|
|
19276
19276
|
E === void 0 && (E = !0), k === void 0 && (k = "hover");
|
|
19277
19277
|
const F = Ea(g.current, "close", P.current);
|
|
19278
|
-
F && !$.current ? (Pt(N), N.current = window.setTimeout(() => r(!1,
|
|
19279
|
-
}, [g, r]),
|
|
19278
|
+
F && !$.current ? (Pt(N), N.current = window.setTimeout(() => r(!1, I, k), F)) : E && (Pt(N), r(!1, I, k));
|
|
19279
|
+
}, [g, r]), C = Zt(() => {
|
|
19280
19280
|
y.current(), $.current = void 0;
|
|
19281
19281
|
}), D = Zt(() => {
|
|
19282
19282
|
if (b.current) {
|
|
19283
|
-
const
|
|
19284
|
-
|
|
19283
|
+
const I = Yt(i.floating).body;
|
|
19284
|
+
I.style.pointerEvents = "", I.removeAttribute(sd), b.current = !1;
|
|
19285
19285
|
}
|
|
19286
19286
|
}), v = Zt(() => o.current.openEvent ? ["click", "mousedown"].includes(o.current.openEvent.type) : !1);
|
|
19287
19287
|
j.useEffect(() => {
|
|
19288
19288
|
if (!c) return;
|
|
19289
|
-
function
|
|
19289
|
+
function I(U) {
|
|
19290
19290
|
if (Pt(N), M.current = !1, u && !Vo(P.current) || Pa(w.current) > 0 && !Ea(g.current, "open"))
|
|
19291
19291
|
return;
|
|
19292
19292
|
const H = Ea(g.current, "open", P.current);
|
|
@@ -19308,12 +19308,12 @@ function F4(e, t) {
|
|
|
19308
19308
|
x: U.clientX,
|
|
19309
19309
|
y: U.clientY,
|
|
19310
19310
|
onClose() {
|
|
19311
|
-
D(),
|
|
19311
|
+
D(), C(), v() || O(U, !0, "safe-polygon");
|
|
19312
19312
|
}
|
|
19313
19313
|
});
|
|
19314
|
-
const
|
|
19315
|
-
H.addEventListener("mousemove",
|
|
19316
|
-
H.removeEventListener("mousemove",
|
|
19314
|
+
const q = $.current;
|
|
19315
|
+
H.addEventListener("mousemove", q), y.current = () => {
|
|
19316
|
+
H.removeEventListener("mousemove", q);
|
|
19317
19317
|
};
|
|
19318
19318
|
return;
|
|
19319
19319
|
}
|
|
@@ -19326,7 +19326,7 @@ function F4(e, t) {
|
|
|
19326
19326
|
x: U.clientX,
|
|
19327
19327
|
y: U.clientY,
|
|
19328
19328
|
onClose() {
|
|
19329
|
-
D(),
|
|
19329
|
+
D(), C(), v() || O(U);
|
|
19330
19330
|
}
|
|
19331
19331
|
})(U));
|
|
19332
19332
|
}
|
|
@@ -19338,15 +19338,15 @@ function F4(e, t) {
|
|
|
19338
19338
|
}
|
|
19339
19339
|
if (Ee(i.domReference)) {
|
|
19340
19340
|
const U = i.domReference, H = i.floating;
|
|
19341
|
-
return n && U.addEventListener("mouseleave", k), p && U.addEventListener("mousemove",
|
|
19341
|
+
return n && U.addEventListener("mouseleave", k), p && U.addEventListener("mousemove", I, {
|
|
19342
19342
|
once: !0
|
|
19343
|
-
}), U.addEventListener("mouseenter",
|
|
19344
|
-
n && U.removeEventListener("mouseleave", k), p && U.removeEventListener("mousemove",
|
|
19343
|
+
}), U.addEventListener("mouseenter", I), U.addEventListener("mouseleave", E), H && (H.addEventListener("mouseleave", k), H.addEventListener("mouseenter", F), H.addEventListener("mouseleave", z)), () => {
|
|
19344
|
+
n && U.removeEventListener("mouseleave", k), p && U.removeEventListener("mousemove", I), U.removeEventListener("mouseenter", I), U.removeEventListener("mouseleave", E), H && (H.removeEventListener("mouseleave", k), H.removeEventListener("mouseenter", F), H.removeEventListener("mouseleave", z));
|
|
19345
19345
|
};
|
|
19346
19346
|
}
|
|
19347
|
-
}, [i, c, e, u, p, O,
|
|
19348
|
-
var
|
|
19349
|
-
if (c && n && (
|
|
19347
|
+
}, [i, c, e, u, p, O, C, D, r, n, A, d, g, m, o, v, w]), en(() => {
|
|
19348
|
+
var I;
|
|
19349
|
+
if (c && n && (I = m.current) != null && (I = I.__options) != null && I.blockPointerEvents && S()) {
|
|
19350
19350
|
b.current = !0;
|
|
19351
19351
|
const k = i.floating;
|
|
19352
19352
|
if (Ee(i.domReference) && k) {
|
|
@@ -19360,17 +19360,17 @@ function F4(e, t) {
|
|
|
19360
19360
|
}
|
|
19361
19361
|
}
|
|
19362
19362
|
}, [c, n, h, i, d, m, S]), en(() => {
|
|
19363
|
-
n || (P.current = void 0, x.current = !1,
|
|
19364
|
-
}, [n,
|
|
19365
|
-
|
|
19366
|
-
}, [c, i.domReference,
|
|
19363
|
+
n || (P.current = void 0, x.current = !1, C(), D());
|
|
19364
|
+
}, [n, C, D]), j.useEffect(() => () => {
|
|
19365
|
+
C(), Pt(N), Pt(B), D();
|
|
19366
|
+
}, [c, i.domReference, C, D]);
|
|
19367
19367
|
const R = j.useMemo(() => {
|
|
19368
|
-
function
|
|
19368
|
+
function I(E) {
|
|
19369
19369
|
P.current = E.pointerType;
|
|
19370
19370
|
}
|
|
19371
19371
|
return {
|
|
19372
|
-
onPointerDown:
|
|
19373
|
-
onPointerEnter:
|
|
19372
|
+
onPointerDown: I,
|
|
19373
|
+
onPointerEnter: I,
|
|
19374
19374
|
onMouseMove(E) {
|
|
19375
19375
|
const {
|
|
19376
19376
|
nativeEvent: k
|
|
@@ -19605,10 +19605,10 @@ function G4(e, t) {
|
|
|
19605
19605
|
var v;
|
|
19606
19606
|
if (!n || !i || !c || D.key !== "Escape" || M.current)
|
|
19607
19607
|
return;
|
|
19608
|
-
const R = (v = s.current.floatingContext) == null ? void 0 : v.nodeId,
|
|
19609
|
-
if (!P && (D.stopPropagation(),
|
|
19608
|
+
const R = (v = s.current.floatingContext) == null ? void 0 : v.nodeId, I = m ? Ts(m.nodesRef.current, R) : [];
|
|
19609
|
+
if (!P && (D.stopPropagation(), I.length > 0)) {
|
|
19610
19610
|
let E = !0;
|
|
19611
|
-
if (
|
|
19611
|
+
if (I.forEach((k) => {
|
|
19612
19612
|
var F;
|
|
19613
19613
|
if ((F = k.context) != null && F.open && !k.context.dataRef.current.__escapeKeyBubbles) {
|
|
19614
19614
|
E = !1;
|
|
@@ -19621,59 +19621,59 @@ function G4(e, t) {
|
|
|
19621
19621
|
}), y = Zt((D) => {
|
|
19622
19622
|
var v;
|
|
19623
19623
|
const R = () => {
|
|
19624
|
-
var
|
|
19625
|
-
b(D), (
|
|
19624
|
+
var I;
|
|
19625
|
+
b(D), (I = Er(D)) == null || I.removeEventListener("keydown", R);
|
|
19626
19626
|
};
|
|
19627
19627
|
(v = Er(D)) == null || v.addEventListener("keydown", R);
|
|
19628
19628
|
}), x = Zt((D) => {
|
|
19629
19629
|
var v;
|
|
19630
19630
|
const R = s.current.insideReactTree;
|
|
19631
19631
|
s.current.insideReactTree = !1;
|
|
19632
|
-
const
|
|
19633
|
-
if (w.current = !1, l === "click" &&
|
|
19632
|
+
const I = w.current;
|
|
19633
|
+
if (w.current = !1, l === "click" && I || R || typeof A == "function" && !A(D))
|
|
19634
19634
|
return;
|
|
19635
19635
|
const E = Er(D), k = "[" + is("inert") + "]", F = Yt(o.floating).querySelectorAll(k);
|
|
19636
19636
|
let z = Ee(E) ? E : null;
|
|
19637
19637
|
for (; z && !vn(z); ) {
|
|
19638
|
-
const
|
|
19639
|
-
if (vn(
|
|
19638
|
+
const q = Pn(z);
|
|
19639
|
+
if (vn(q) || !Ee(q))
|
|
19640
19640
|
break;
|
|
19641
|
-
z =
|
|
19641
|
+
z = q;
|
|
19642
19642
|
}
|
|
19643
19643
|
if (F.length && Ee(E) && !g4(E) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
|
|
19644
19644
|
!Ur(E, o.floating) && // If the target root element contains none of the markers, then the
|
|
19645
19645
|
// element was injected after the floating element rendered.
|
|
19646
|
-
Array.from(F).every((
|
|
19646
|
+
Array.from(F).every((q) => !Ur(z, q)))
|
|
19647
19647
|
return;
|
|
19648
|
-
if (Je(E) &&
|
|
19649
|
-
const
|
|
19648
|
+
if (Je(E) && C) {
|
|
19649
|
+
const q = vn(E), _ = Ot(E), ne = /auto|scroll/, xe = q || ne.test(_.overflowX), G = q || ne.test(_.overflowY), ae = xe && E.clientWidth > 0 && E.scrollWidth > E.clientWidth, ce = G && E.clientHeight > 0 && E.scrollHeight > E.clientHeight, K = _.direction === "rtl", Q = ce && (K ? D.offsetX <= E.offsetWidth - E.clientWidth : D.offsetX > E.clientWidth), le = ae && D.offsetY > E.clientHeight;
|
|
19650
19650
|
if (Q || le)
|
|
19651
19651
|
return;
|
|
19652
19652
|
}
|
|
19653
|
-
const U = (v = s.current.floatingContext) == null ? void 0 : v.nodeId, H = m && Ts(m.nodesRef.current, U).some((
|
|
19653
|
+
const U = (v = s.current.floatingContext) == null ? void 0 : v.nodeId, H = m && Ts(m.nodesRef.current, U).some((q) => {
|
|
19654
19654
|
var _;
|
|
19655
|
-
return wa(D, (_ =
|
|
19655
|
+
return wa(D, (_ = q.context) == null ? void 0 : _.elements.floating);
|
|
19656
19656
|
});
|
|
19657
19657
|
if (wa(D, o.floating) || wa(D, o.domReference) || H)
|
|
19658
19658
|
return;
|
|
19659
|
-
const
|
|
19660
|
-
if (
|
|
19661
|
-
let
|
|
19662
|
-
if (
|
|
19659
|
+
const te = m ? Ts(m.nodesRef.current, U) : [];
|
|
19660
|
+
if (te.length > 0) {
|
|
19661
|
+
let q = !0;
|
|
19662
|
+
if (te.forEach((_) => {
|
|
19663
19663
|
var ne;
|
|
19664
19664
|
if ((ne = _.context) != null && ne.open && !_.context.dataRef.current.__outsidePressBubbles) {
|
|
19665
|
-
|
|
19665
|
+
q = !1;
|
|
19666
19666
|
return;
|
|
19667
19667
|
}
|
|
19668
|
-
}), !
|
|
19668
|
+
}), !q)
|
|
19669
19669
|
return;
|
|
19670
19670
|
}
|
|
19671
19671
|
r(!1, D, "outside-press");
|
|
19672
19672
|
}), S = Zt((D) => {
|
|
19673
19673
|
var v;
|
|
19674
19674
|
const R = () => {
|
|
19675
|
-
var
|
|
19676
|
-
x(D), (
|
|
19675
|
+
var I;
|
|
19676
|
+
x(D), (I = Er(D)) == null || I.removeEventListener(l, R);
|
|
19677
19677
|
};
|
|
19678
19678
|
(v = Er(D)) == null || v.addEventListener(l, R);
|
|
19679
19679
|
});
|
|
@@ -19688,7 +19688,7 @@ function G4(e, t) {
|
|
|
19688
19688
|
function R() {
|
|
19689
19689
|
window.clearTimeout(D), M.current = !0;
|
|
19690
19690
|
}
|
|
19691
|
-
function
|
|
19691
|
+
function I() {
|
|
19692
19692
|
D = window.setTimeout(
|
|
19693
19693
|
() => {
|
|
19694
19694
|
M.current = !1;
|
|
@@ -19699,7 +19699,7 @@ function G4(e, t) {
|
|
|
19699
19699
|
);
|
|
19700
19700
|
}
|
|
19701
19701
|
const E = Yt(o.floating);
|
|
19702
|
-
c && (E.addEventListener("keydown", $ ? y : b, $), E.addEventListener("compositionstart", R), E.addEventListener("compositionend",
|
|
19702
|
+
c && (E.addEventListener("keydown", $ ? y : b, $), E.addEventListener("compositionstart", R), E.addEventListener("compositionend", I)), A && E.addEventListener(l, B ? S : x, B);
|
|
19703
19703
|
let k = [];
|
|
19704
19704
|
return p && (Ee(o.domReference) && (k = Ln(o.domReference)), Ee(o.floating) && (k = k.concat(Ln(o.floating))), !Ee(o.reference) && o.reference && o.reference.contextElement && (k = k.concat(Ln(o.reference.contextElement)))), k = k.filter((F) => {
|
|
19705
19705
|
var z;
|
|
@@ -19709,7 +19709,7 @@ function G4(e, t) {
|
|
|
19709
19709
|
passive: !0
|
|
19710
19710
|
});
|
|
19711
19711
|
}), () => {
|
|
19712
|
-
c && (E.removeEventListener("keydown", $ ? y : b, $), E.removeEventListener("compositionstart", R), E.removeEventListener("compositionend",
|
|
19712
|
+
c && (E.removeEventListener("keydown", $ ? y : b, $), E.removeEventListener("compositionstart", R), E.removeEventListener("compositionend", I)), A && E.removeEventListener(l, B ? S : x, B), k.forEach((F) => {
|
|
19713
19713
|
F.removeEventListener("scroll", v);
|
|
19714
19714
|
}), window.clearTimeout(D);
|
|
19715
19715
|
};
|
|
@@ -19728,7 +19728,7 @@ function G4(e, t) {
|
|
|
19728
19728
|
}
|
|
19729
19729
|
}
|
|
19730
19730
|
}
|
|
19731
|
-
}), [b, r, u, f]),
|
|
19731
|
+
}), [b, r, u, f]), C = j.useMemo(() => ({
|
|
19732
19732
|
onKeyDown: b,
|
|
19733
19733
|
onMouseDown() {
|
|
19734
19734
|
w.current = !0;
|
|
@@ -19742,8 +19742,8 @@ function G4(e, t) {
|
|
|
19742
19742
|
}), [b, l, s]);
|
|
19743
19743
|
return j.useMemo(() => i ? {
|
|
19744
19744
|
reference: O,
|
|
19745
|
-
floating:
|
|
19746
|
-
} : {}, [i, O,
|
|
19745
|
+
floating: C
|
|
19746
|
+
} : {}, [i, O, C]);
|
|
19747
19747
|
}
|
|
19748
19748
|
function q4(e) {
|
|
19749
19749
|
const {
|
|
@@ -20231,7 +20231,7 @@ const Fn = ({
|
|
|
20231
20231
|
}, [g == null ? void 0 : g.depositFeeRate]);
|
|
20232
20232
|
return /* @__PURE__ */ T.jsxs(T.Fragment, { children: [
|
|
20233
20233
|
/* @__PURE__ */ T.jsx("div", { className: "flex justify-center mt-4 mb-3", children: n && /* @__PURE__ */ T.jsx("div", { className: "bg-white rounded-lg", children: /* @__PURE__ */ T.jsx(
|
|
20234
|
-
|
|
20234
|
+
Im,
|
|
20235
20235
|
{
|
|
20236
20236
|
value: n,
|
|
20237
20237
|
size: 120,
|
|
@@ -20301,13 +20301,7 @@ const Fn = ({
|
|
|
20301
20301
|
/* @__PURE__ */ T.jsx(
|
|
20302
20302
|
Fn,
|
|
20303
20303
|
{
|
|
20304
|
-
content: /* @__PURE__ */ T.
|
|
20305
|
-
/* @__PURE__ */ T.jsx("p", { children: l("deposit.arrivaltimeTooltip1", {
|
|
20306
|
-
v: (e == null ? void 0 : e.blockTime) * e.txConfirm / 60,
|
|
20307
|
-
v1: e == null ? void 0 : e.txConfirm
|
|
20308
|
-
}) }),
|
|
20309
|
-
/* @__PURE__ */ T.jsx("p", { children: l("deposit.arrivaltimeTooltip2") })
|
|
20310
|
-
] }),
|
|
20304
|
+
content: /* @__PURE__ */ T.jsx("div", { className: "grid grow max-w-[300px] min-w-[80px] rounded-2xl flex-col gap-[10px]", children: /* @__PURE__ */ T.jsx("p", { children: l("deposit.arrivaltimeTooltip2") }) }),
|
|
20311
20305
|
placement: "top",
|
|
20312
20306
|
children: /* @__PURE__ */ T.jsx("span", { className: "text-text-primary font-medium text-right border-b-2 border-dashed border-line-divider-primary decoration-dashed", children: l("deposit.arrivalEstimated", {
|
|
20313
20307
|
v: (e == null ? void 0 : e.blockTime) * e.txConfirm / 60
|
|
@@ -20483,18 +20477,18 @@ const Fn = ({
|
|
|
20483
20477
|
};
|
|
20484
20478
|
let it = null;
|
|
20485
20479
|
const sP = Z.forwardRef((e, t) => {
|
|
20486
|
-
const [n, r] = ie(!1), [o, s] = ie(!1), [i, c] = ie(jm), a =
|
|
20480
|
+
const [n, r] = ie(!1), [o, s] = ie(!1), [i, c] = ie(jm), a = ee((h) => {
|
|
20487
20481
|
c(h), r(!0);
|
|
20488
|
-
}, []), l =
|
|
20482
|
+
}, []), l = ee(
|
|
20489
20483
|
(h) => {
|
|
20490
20484
|
c((m) => ({ ...m, ...h }));
|
|
20491
20485
|
},
|
|
20492
20486
|
[]
|
|
20493
|
-
), u =
|
|
20487
|
+
), u = ee(() => {
|
|
20494
20488
|
r(!1), s(!1), i.onClose && i.onClose();
|
|
20495
|
-
}, [i.onClose]), f =
|
|
20489
|
+
}, [i.onClose]), f = ee((h) => {
|
|
20496
20490
|
s(h);
|
|
20497
|
-
}, []), p =
|
|
20491
|
+
}, []), p = ee(() => n, [n]), d = ee(() => o, [o]);
|
|
20498
20492
|
return dd(
|
|
20499
20493
|
t,
|
|
20500
20494
|
() => ({
|
|
@@ -20662,7 +20656,7 @@ function dP(e) {
|
|
|
20662
20656
|
} catch {
|
|
20663
20657
|
return !1;
|
|
20664
20658
|
}
|
|
20665
|
-
}, [d, A.isSuccess, w, s, f]), N =
|
|
20659
|
+
}, [d, A.isSuccess, w, s, f]), N = ee(async () => {
|
|
20666
20660
|
try {
|
|
20667
20661
|
if (r && n && +n != +r && await h({ chainId: +r }), !m || !g || !u || !p)
|
|
20668
20662
|
return;
|
|
@@ -20734,7 +20728,7 @@ const pP = ({
|
|
|
20734
20728
|
const M = B.toLowerCase();
|
|
20735
20729
|
return !(B === P || M === N);
|
|
20736
20730
|
});
|
|
20737
|
-
}, [r]), [c, a] = ie({}), l =
|
|
20731
|
+
}, [r]), [c, a] = ie({}), l = ee(
|
|
20738
20732
|
(P, N) => {
|
|
20739
20733
|
a(($) => ({
|
|
20740
20734
|
...$,
|
|
@@ -20799,7 +20793,7 @@ const pP = ({
|
|
|
20799
20793
|
baseTokenBalance: P,
|
|
20800
20794
|
combinedData: $
|
|
20801
20795
|
};
|
|
20802
|
-
}, [u, c, i]), m =
|
|
20796
|
+
}, [u, c, i]), m = ee(async () => h, [h]), g = J(() => {
|
|
20803
20797
|
const P = (u == null ? void 0 : u.isLoading) || !1, N = Object.values(c).some(
|
|
20804
20798
|
($) => {
|
|
20805
20799
|
var B;
|
|
@@ -20807,7 +20801,7 @@ const pP = ({
|
|
|
20807
20801
|
}
|
|
20808
20802
|
);
|
|
20809
20803
|
return P || N;
|
|
20810
|
-
}, [u == null ? void 0 : u.isLoading, c]), A =
|
|
20804
|
+
}, [u == null ? void 0 : u.isLoading, c]), A = ee(() => p((P) => P + 1), []);
|
|
20811
20805
|
return {
|
|
20812
20806
|
multicallRun: m,
|
|
20813
20807
|
multicallRefresh: A,
|
|
@@ -20875,28 +20869,28 @@ const pP = ({
|
|
|
20875
20869
|
decimals: 6,
|
|
20876
20870
|
fallbackFormatted: x,
|
|
20877
20871
|
pollingInterval: 12e3
|
|
20878
|
-
}), [O,
|
|
20872
|
+
}), [O, C] = ie(!1), { approve: D, onApprove: v } = dP({
|
|
20879
20873
|
account: e,
|
|
20880
20874
|
accountChainId: p.chainId,
|
|
20881
20875
|
targetChainId: +t.chainId,
|
|
20882
20876
|
tokenInfo: d,
|
|
20883
20877
|
amount: g,
|
|
20884
20878
|
wagmiHooks: a
|
|
20885
|
-
}), R =
|
|
20879
|
+
}), R = ee(async () => {
|
|
20886
20880
|
if (!O)
|
|
20887
20881
|
try {
|
|
20888
|
-
|
|
20882
|
+
C(!0), await v();
|
|
20889
20883
|
} catch (K) {
|
|
20890
20884
|
console.error("Approve failed:", K);
|
|
20891
20885
|
} finally {
|
|
20892
|
-
|
|
20886
|
+
C(!1);
|
|
20893
20887
|
}
|
|
20894
|
-
}, [O, v]),
|
|
20888
|
+
}, [O, v]), I = J(() => +p.chainId != +t.chainId, [p.chainId, t.chainId]), E = ee(async () => {
|
|
20895
20889
|
l && l(h);
|
|
20896
20890
|
}, [l, h]);
|
|
20897
20891
|
Te(() => {
|
|
20898
|
-
|
|
20899
|
-
}, [
|
|
20892
|
+
I && E();
|
|
20893
|
+
}, [I, E]);
|
|
20900
20894
|
const { showLayerZeroTip: k, layerZeroTipKey: F } = J(() => {
|
|
20901
20895
|
const K = +t.chainId == 42161 || +t.chainId == 421614, Q = (n == null ? void 0 : n.toUpperCase()) === "USDT", le = new _e(g || "0"), se = new _e("200000");
|
|
20902
20896
|
let ye = !1, Y;
|
|
@@ -20916,7 +20910,7 @@ const pP = ({
|
|
|
20916
20910
|
n,
|
|
20917
20911
|
g,
|
|
20918
20912
|
S
|
|
20919
|
-
]), z =
|
|
20913
|
+
]), z = ee(() => oP(
|
|
20920
20914
|
+t.chainId,
|
|
20921
20915
|
B || "0",
|
|
20922
20916
|
n,
|
|
@@ -20933,16 +20927,16 @@ const pP = ({
|
|
|
20933
20927
|
n
|
|
20934
20928
|
),
|
|
20935
20929
|
[r, t == null ? void 0 : t.chainId, g, n]
|
|
20936
|
-
), H = J(() => "deposit.maxDepositSplitTip", []),
|
|
20930
|
+
), H = J(() => "deposit.maxDepositSplitTip", []), te = J(() => {
|
|
20937
20931
|
const K = Number((t == null ? void 0 : t.blockTime) ?? 0), Q = Number((t == null ? void 0 : t.txConfirm) ?? 0);
|
|
20938
20932
|
return !Number.isFinite(K) || !Number.isFinite(Q) ? 0 : K * Q / 60;
|
|
20939
|
-
}, [t == null ? void 0 : t.blockTime, t == null ? void 0 : t.txConfirm]),
|
|
20933
|
+
}, [t == null ? void 0 : t.blockTime, t == null ? void 0 : t.txConfirm]), _ = m && w === "standard" ? 20 : te, ne = J(() => {
|
|
20940
20934
|
const K = d == null ? void 0 : d.depositFeeRate;
|
|
20941
20935
|
if (K == null) return "";
|
|
20942
20936
|
const Q = String(K).trim();
|
|
20943
20937
|
return Q ? `${Q}%` : "";
|
|
20944
|
-
}, [d == null ? void 0 : d.depositFeeRate]), xe = m && w === "fast" && !!ne,
|
|
20945
|
-
isNetworkMismatch:
|
|
20938
|
+
}, [d == null ? void 0 : d.depositFeeRate]), xe = m && w === "fast" && !!ne, G = fP({
|
|
20939
|
+
isNetworkMismatch: I,
|
|
20946
20940
|
depositAmount: g,
|
|
20947
20941
|
approved: D,
|
|
20948
20942
|
currentTokenBalance: B,
|
|
@@ -20955,7 +20949,7 @@ const pP = ({
|
|
|
20955
20949
|
A(se.formattedValue), se.errorType;
|
|
20956
20950
|
else
|
|
20957
20951
|
return se.errorType === "exceed_balance", void 0;
|
|
20958
|
-
}, ce =
|
|
20952
|
+
}, ce = ee(async () => {
|
|
20959
20953
|
Mc(!0);
|
|
20960
20954
|
try {
|
|
20961
20955
|
u && u({
|
|
@@ -21079,18 +21073,10 @@ const pP = ({
|
|
|
21079
21073
|
/* @__PURE__ */ T.jsxs("div", { className: "border-t border-line-divider-secondary border-dashed py-4", children: [
|
|
21080
21074
|
/* @__PURE__ */ T.jsxs("div", { className: "flex justify-between items-center h-[18px] leading-4", children: [
|
|
21081
21075
|
/* @__PURE__ */ T.jsx("span", { className: "text-sm text-text-tertiary", children: f("deposit.arrivalTime") }),
|
|
21082
|
-
|
|
21083
|
-
v: _
|
|
21084
|
-
}) }) : /* @__PURE__ */ T.jsx(
|
|
21076
|
+
/* @__PURE__ */ T.jsx(
|
|
21085
21077
|
Fn,
|
|
21086
21078
|
{
|
|
21087
|
-
content: /* @__PURE__ */ T.
|
|
21088
|
-
/* @__PURE__ */ T.jsx("p", { children: f("deposit.arrivaltimeTooltip1", {
|
|
21089
|
-
v: ee,
|
|
21090
|
-
v1: t == null ? void 0 : t.txConfirm
|
|
21091
|
-
}) }),
|
|
21092
|
-
/* @__PURE__ */ T.jsx("p", { children: f("deposit.arrivaltimeTooltip2") })
|
|
21093
|
-
] }),
|
|
21079
|
+
content: /* @__PURE__ */ T.jsx("div", { className: "grid grow max-w-[300px] min-w-[80px] rounded-2xl flex-col gap-[10px]", children: /* @__PURE__ */ T.jsx("p", { children: f("deposit.arrivaltimeTooltip2") }) }),
|
|
21094
21080
|
placement: "top",
|
|
21095
21081
|
children: /* @__PURE__ */ T.jsx("span", { className: "text-text-primary font-medium text-right border-b-2 border-dashed border-line-divider-primary decoration-dashed text-sm", children: f("deposit.arrivalEstimated", {
|
|
21096
21082
|
v: _
|
|
@@ -21118,12 +21104,12 @@ const pP = ({
|
|
|
21118
21104
|
/* @__PURE__ */ T.jsxs(
|
|
21119
21105
|
"button",
|
|
21120
21106
|
{
|
|
21121
|
-
className: `w-full h-[38px] text-sm rounded-xl font-medium transition-colors flex items-center justify-center gap-2 ${
|
|
21107
|
+
className: `w-full h-[38px] text-sm rounded-xl font-medium transition-colors flex items-center justify-center gap-2 ${G.disabled || c ? "bg-text-disabled text-text-secondary cursor-not-allowed" : "bg-fill-btn-primary text-text-on-sec-btn"}`,
|
|
21122
21108
|
onClick: ce,
|
|
21123
|
-
disabled:
|
|
21109
|
+
disabled: G.disabled || c,
|
|
21124
21110
|
children: [
|
|
21125
|
-
(c ||
|
|
21126
|
-
|
|
21111
|
+
(c || I) && /* @__PURE__ */ T.jsx(Bc, { size: "xs" }),
|
|
21112
|
+
G.text
|
|
21127
21113
|
]
|
|
21128
21114
|
}
|
|
21129
21115
|
)
|
|
@@ -21144,9 +21130,9 @@ const pP = ({
|
|
|
21144
21130
|
onTokenChange: p
|
|
21145
21131
|
}) => {
|
|
21146
21132
|
const { t: d } = sn(), h = J(
|
|
21147
|
-
() => r.map((
|
|
21148
|
-
...
|
|
21149
|
-
key: Ks(
|
|
21133
|
+
() => r.map((G) => ({
|
|
21134
|
+
...G,
|
|
21135
|
+
key: Ks(G.key)
|
|
21150
21136
|
})),
|
|
21151
21137
|
[r]
|
|
21152
21138
|
), m = J(
|
|
@@ -21154,28 +21140,28 @@ const pP = ({
|
|
|
21154
21140
|
[i]
|
|
21155
21141
|
), g = J(
|
|
21156
21142
|
() => h.some(
|
|
21157
|
-
(
|
|
21143
|
+
(G) => G.key === Ue.PERPETUALV2
|
|
21158
21144
|
),
|
|
21159
21145
|
[h]
|
|
21160
21146
|
), A = J(() => {
|
|
21161
21147
|
var ae;
|
|
21162
21148
|
if (!h || h.length === 0)
|
|
21163
21149
|
return m;
|
|
21164
|
-
const
|
|
21150
|
+
const G = h.find(
|
|
21165
21151
|
(ce) => ce.key === m
|
|
21166
21152
|
);
|
|
21167
|
-
return (
|
|
21168
|
-
}, [h, m]), [w, P] = ie(A), N =
|
|
21169
|
-
(
|
|
21153
|
+
return (G == null ? void 0 : G.key) || ((ae = h[0]) == null ? void 0 : ae.key) || m;
|
|
21154
|
+
}, [h, m]), [w, P] = ie(A), N = ee(
|
|
21155
|
+
(G) => {
|
|
21170
21156
|
var ae;
|
|
21171
|
-
return ((ae = h.find((ce) => ce.key ===
|
|
21157
|
+
return ((ae = h.find((ce) => ce.key === G)) == null ? void 0 : ae.chains) || [];
|
|
21172
21158
|
},
|
|
21173
21159
|
[h]
|
|
21174
21160
|
), $ = N(A), B = () => {
|
|
21175
21161
|
var se;
|
|
21176
21162
|
if (!$ || $.length === 0)
|
|
21177
21163
|
return { chainId: o || 1, token: "" };
|
|
21178
|
-
const
|
|
21164
|
+
const G = o || ((se = $[0]) == null ? void 0 : se.chainId), ae = $.find((ye) => ye.chainId === G) || $[0], ce = (ae == null ? void 0 : ae.tokenList) || [], K = (s || "").toUpperCase();
|
|
21179
21165
|
if (K && ce.length > 0) {
|
|
21180
21166
|
const ye = ce.find(
|
|
21181
21167
|
(Y) => (Y.token || Y.symbol || "").toUpperCase() === K
|
|
@@ -21205,54 +21191,54 @@ const pP = ({
|
|
|
21205
21191
|
}, [{ chainId: M, token: b }] = ie(
|
|
21206
21192
|
() => B()
|
|
21207
21193
|
), [y, x] = ie(M), S = J(
|
|
21208
|
-
() => h.find((
|
|
21194
|
+
() => h.find((G) => G.key === w) || h[0],
|
|
21209
21195
|
[h, w]
|
|
21210
21196
|
), O = J(
|
|
21211
21197
|
() => (S == null ? void 0 : S.chains) || [],
|
|
21212
21198
|
[S]
|
|
21213
|
-
),
|
|
21199
|
+
), C = J(() => {
|
|
21214
21200
|
var Q, le;
|
|
21215
21201
|
if (!S || !Lc(S.account) || !(w === Ue.SPOT || w === Ue.PERPETUALV2)) return !1;
|
|
21216
21202
|
const ce = !!((Q = S.walletOptions) != null && Q.evm), K = !!((le = S.walletOptions) != null && le.mpc);
|
|
21217
21203
|
return ce && K;
|
|
21218
|
-
}, [S, w]), D =
|
|
21219
|
-
var
|
|
21220
|
-
return (
|
|
21204
|
+
}, [S, w]), D = ee(() => {
|
|
21205
|
+
var G, ae;
|
|
21206
|
+
return (G = S == null ? void 0 : S.walletOptions) != null && G.evm ? "evm" : (ae = S == null ? void 0 : S.walletOptions) != null && ae.mpc || S != null && S.account && fo(S.account) ? "mpc" : "evm";
|
|
21221
21207
|
}, [S]), [v, R] = ie(
|
|
21222
|
-
() =>
|
|
21208
|
+
() => C ? null : D()
|
|
21223
21209
|
);
|
|
21224
21210
|
Te(() => {
|
|
21225
|
-
R(
|
|
21226
|
-
}, [w,
|
|
21227
|
-
const
|
|
21211
|
+
R(C ? null : D());
|
|
21212
|
+
}, [w, C, D]);
|
|
21213
|
+
const I = J(() => {
|
|
21228
21214
|
if (!S) return;
|
|
21229
|
-
if (!
|
|
21215
|
+
if (!C)
|
|
21230
21216
|
return S.account;
|
|
21231
21217
|
if (!v) return;
|
|
21232
|
-
const
|
|
21233
|
-
return v === "mpc" ? (
|
|
21234
|
-
}, [S, v,
|
|
21235
|
-
() =>
|
|
21236
|
-
[
|
|
21237
|
-
), k = O.find((
|
|
21238
|
-
(
|
|
21239
|
-
x(
|
|
21218
|
+
const G = S.walletOptions;
|
|
21219
|
+
return v === "mpc" ? (G == null ? void 0 : G.mpc) || S.account : (G == null ? void 0 : G.evm) || S.account;
|
|
21220
|
+
}, [S, v, C]), E = J(
|
|
21221
|
+
() => I && fo(I) ? yn : gi,
|
|
21222
|
+
[I]
|
|
21223
|
+
), k = O.find((G) => G.chainId === y) || O[0], [F, z] = ie(b), U = ee(
|
|
21224
|
+
(G) => {
|
|
21225
|
+
x(G), f == null || f(G);
|
|
21240
21226
|
},
|
|
21241
21227
|
[f]
|
|
21242
|
-
), H =
|
|
21243
|
-
(
|
|
21244
|
-
z(
|
|
21228
|
+
), H = ee(
|
|
21229
|
+
(G) => {
|
|
21230
|
+
z(G), p == null || p(G);
|
|
21245
21231
|
},
|
|
21246
21232
|
[p]
|
|
21247
|
-
),
|
|
21248
|
-
const
|
|
21249
|
-
if (!
|
|
21250
|
-
const ae = (c == null ? void 0 : c[w]) || (w === Ue.PERPETUAL ? c == null ? void 0 : c.perp : void 0), ce = ae == null ? void 0 : ae[
|
|
21233
|
+
), te = J(() => {
|
|
21234
|
+
const G = (F || "").toLowerCase();
|
|
21235
|
+
if (!G) return "0";
|
|
21236
|
+
const ae = (c == null ? void 0 : c[w]) || (w === Ue.PERPETUAL ? c == null ? void 0 : c.perp : void 0), ce = ae == null ? void 0 : ae[G];
|
|
21251
21237
|
return typeof ce == "string" && ce.length > 0 ? ce : "0";
|
|
21252
|
-
}, [c, w, F]), [
|
|
21253
|
-
|
|
21254
|
-
}, xe = (
|
|
21255
|
-
|
|
21238
|
+
}, [c, w, F]), [q, _] = ie(!1), ne = (G) => {
|
|
21239
|
+
G.target === G.currentTarget ? _(!0) : _(!1);
|
|
21240
|
+
}, xe = (G) => {
|
|
21241
|
+
q && G.target === G.currentTarget && n(), _(!1);
|
|
21256
21242
|
};
|
|
21257
21243
|
return e ? pd.createPortal(
|
|
21258
21244
|
/* @__PURE__ */ T.jsx("div", { className: "edgex-components", children: /* @__PURE__ */ T.jsx(
|
|
@@ -21278,8 +21264,8 @@ const pP = ({
|
|
|
21278
21264
|
"div",
|
|
21279
21265
|
{
|
|
21280
21266
|
className: "relative w-[420px] max-h-[85vh] bg-fill-page-secondary overflow-auto rounded-lg p-6 shadow-xl border-2 border-solid border-line-divider-secondary",
|
|
21281
|
-
onClick: (
|
|
21282
|
-
|
|
21267
|
+
onClick: (G) => {
|
|
21268
|
+
G.stopPropagation();
|
|
21283
21269
|
},
|
|
21284
21270
|
children: [
|
|
21285
21271
|
/* @__PURE__ */ T.jsxs("div", { className: "flex items-center justify-between mb-4", children: [
|
|
@@ -21298,13 +21284,13 @@ const pP = ({
|
|
|
21298
21284
|
bm,
|
|
21299
21285
|
{
|
|
21300
21286
|
selectedAccount: w,
|
|
21301
|
-
options: h.map((
|
|
21302
|
-
value:
|
|
21303
|
-
label:
|
|
21287
|
+
options: h.map((G) => ({
|
|
21288
|
+
value: G.key,
|
|
21289
|
+
label: G.key === Ue.SPOT ? d("account.spot") : G.key === Ue.PERPETUAL ? d(g ? "account.perpetual-v1" : "account.perp") : G.key === Ue.PERPETUALV2 ? d("account.perpetual-v2") : G.key
|
|
21304
21290
|
})),
|
|
21305
|
-
onAccountChange: (
|
|
21291
|
+
onAccountChange: (G) => {
|
|
21306
21292
|
var pe, we;
|
|
21307
|
-
const ae =
|
|
21293
|
+
const ae = G || w;
|
|
21308
21294
|
P(ae);
|
|
21309
21295
|
const ce = N(ae);
|
|
21310
21296
|
if (!ce || ce.length === 0) return;
|
|
@@ -21334,7 +21320,7 @@ const pP = ({
|
|
|
21334
21320
|
accountType: w
|
|
21335
21321
|
}
|
|
21336
21322
|
),
|
|
21337
|
-
|
|
21323
|
+
C && !v && /* @__PURE__ */ T.jsxs("div", { className: "mb-4", children: [
|
|
21338
21324
|
/* @__PURE__ */ T.jsx("div", { className: "h-px w-full bg-[#404040] my-4" }),
|
|
21339
21325
|
/* @__PURE__ */ T.jsx(
|
|
21340
21326
|
"button",
|
|
@@ -21372,31 +21358,31 @@ const pP = ({
|
|
|
21372
21358
|
}
|
|
21373
21359
|
)
|
|
21374
21360
|
] }),
|
|
21375
|
-
(!
|
|
21376
|
-
|
|
21361
|
+
(!C || v) && /* @__PURE__ */ T.jsxs(T.Fragment, { children: [
|
|
21362
|
+
I && fo(I) && /* @__PURE__ */ T.jsx(
|
|
21377
21363
|
Q4,
|
|
21378
21364
|
{
|
|
21379
|
-
address:
|
|
21365
|
+
address: I.smartWalletAddress,
|
|
21380
21366
|
currentActiveChain: k,
|
|
21381
21367
|
selectedToken: F,
|
|
21382
21368
|
accountType: w,
|
|
21383
|
-
accountId:
|
|
21369
|
+
accountId: I.accountId,
|
|
21384
21370
|
accountKey: S == null ? void 0 : S.key,
|
|
21385
21371
|
onDeposit: l,
|
|
21386
21372
|
onCopy: u,
|
|
21387
21373
|
onClose: n
|
|
21388
21374
|
}
|
|
21389
21375
|
),
|
|
21390
|
-
|
|
21376
|
+
I && Lc(I) && /* @__PURE__ */ T.jsx(
|
|
21391
21377
|
mP,
|
|
21392
21378
|
{
|
|
21393
|
-
address:
|
|
21379
|
+
address: I.ethAddress,
|
|
21394
21380
|
currentActiveChain: k,
|
|
21395
21381
|
selectedToken: F,
|
|
21396
21382
|
accountType: w,
|
|
21397
|
-
accountId:
|
|
21383
|
+
accountId: I.accountId,
|
|
21398
21384
|
accountKey: S == null ? void 0 : S.key,
|
|
21399
|
-
platformBalance:
|
|
21385
|
+
platformBalance: te,
|
|
21400
21386
|
isLoading: t,
|
|
21401
21387
|
wagmiHooks: a,
|
|
21402
21388
|
onChainChange: U,
|
|
@@ -21611,18 +21597,18 @@ const Fc = {
|
|
|
21611
21597
|
accountChains: [],
|
|
21612
21598
|
defaultAccountType: ""
|
|
21613
21599
|
}, yP = Z.forwardRef((e, t) => {
|
|
21614
|
-
const [n, r] = ie(!1), [o, s] = ie(!1), [i, c] = ie(Fc), a =
|
|
21600
|
+
const [n, r] = ie(!1), [o, s] = ie(!1), [i, c] = ie(Fc), a = ee((h) => {
|
|
21615
21601
|
c(h || Fc), r(!0);
|
|
21616
|
-
}, []), l =
|
|
21602
|
+
}, []), l = ee(
|
|
21617
21603
|
(h) => {
|
|
21618
21604
|
c((m) => ({ ...m, ...h }));
|
|
21619
21605
|
},
|
|
21620
21606
|
[]
|
|
21621
|
-
), u =
|
|
21607
|
+
), u = ee(() => {
|
|
21622
21608
|
r(!1), s(!1), i.onClose && i.onClose();
|
|
21623
|
-
}, [i.onClose]), f =
|
|
21609
|
+
}, [i.onClose]), f = ee((h) => {
|
|
21624
21610
|
s(h);
|
|
21625
|
-
}, []), p =
|
|
21611
|
+
}, []), p = ee(() => n, [n]), d = ee(() => o, [o]);
|
|
21626
21612
|
return dd(
|
|
21627
21613
|
t,
|
|
21628
21614
|
() => ({
|
|
@@ -21779,18 +21765,18 @@ const vP = (e) => {
|
|
|
21779
21765
|
() => (b == null ? void 0 : b.chains) || [],
|
|
21780
21766
|
[b]
|
|
21781
21767
|
), x = J(() => {
|
|
21782
|
-
var Ht,
|
|
21768
|
+
var Ht, Ie;
|
|
21783
21769
|
if (!b || !Lc(b.account) || !($ === Ue.SPOT || $ === Ue.PERPETUALV2)) return !1;
|
|
21784
|
-
const we = !!((Ht = b.walletOptions) != null && Ht.evm), ke = !!((
|
|
21770
|
+
const we = !!((Ht = b.walletOptions) != null && Ht.evm), ke = !!((Ie = b.walletOptions) != null && Ie.mpc);
|
|
21785
21771
|
return we && ke;
|
|
21786
|
-
}, [b, $]), S =
|
|
21772
|
+
}, [b, $]), S = ee(() => {
|
|
21787
21773
|
var Y, pe;
|
|
21788
21774
|
return (Y = b == null ? void 0 : b.walletOptions) != null && Y.evm ? "evm" : (pe = b == null ? void 0 : b.walletOptions) != null && pe.mpc || b != null && b.account && fo(b.account) ? "mpc" : "evm";
|
|
21789
|
-
}, [b]), [O,
|
|
21775
|
+
}, [b]), [O, C] = ie(
|
|
21790
21776
|
() => x ? null : S()
|
|
21791
21777
|
);
|
|
21792
21778
|
Te(() => {
|
|
21793
|
-
|
|
21779
|
+
C(x ? null : S());
|
|
21794
21780
|
}, [$, x, S]);
|
|
21795
21781
|
const D = J(() => {
|
|
21796
21782
|
if (!b) return;
|
|
@@ -21799,11 +21785,11 @@ const vP = (e) => {
|
|
|
21799
21785
|
if (!O) return;
|
|
21800
21786
|
const Y = b.walletOptions;
|
|
21801
21787
|
return O === "mpc" ? (Y == null ? void 0 : Y.mpc) || b.account : (Y == null ? void 0 : Y.evm) || b.account;
|
|
21802
|
-
}, [b, x, O]), v = J(() => D && fo(D) ? "mpc" : "evm", [D]), R = v === "mpc" ? yn : gi,
|
|
21788
|
+
}, [b, x, O]), v = J(() => D && fo(D) ? "mpc" : "evm", [D]), R = v === "mpc" ? yn : gi, I = J(() => {
|
|
21803
21789
|
if (!y || y.length === 0)
|
|
21804
21790
|
return { chainId: 1, tokenSymbol: "" };
|
|
21805
|
-
const Y = (
|
|
21806
|
-
const ze =
|
|
21791
|
+
const Y = (Ie) => {
|
|
21792
|
+
const ze = Ie || [];
|
|
21807
21793
|
if (!ze.length) return "";
|
|
21808
21794
|
const Ke = "USDC".toUpperCase(), Rn = ze.find(
|
|
21809
21795
|
($t) => ($t.token || $t.symbol || "").toUpperCase() === Ke
|
|
@@ -21811,23 +21797,23 @@ const vP = (e) => {
|
|
|
21811
21797
|
return Rn.token || Rn.symbol || "";
|
|
21812
21798
|
};
|
|
21813
21799
|
if (n) {
|
|
21814
|
-
const
|
|
21800
|
+
const Ie = n == null ? void 0 : n.toUpperCase();
|
|
21815
21801
|
for (const ze of y) {
|
|
21816
21802
|
const Gn = ze.tokenList || [];
|
|
21817
21803
|
let Ke;
|
|
21818
|
-
if (
|
|
21819
|
-
(
|
|
21804
|
+
if (Ie && (Ke = Gn.find(
|
|
21805
|
+
(It) => (It.token || It.symbol || "").toUpperCase() === Ie
|
|
21820
21806
|
)), Ke) {
|
|
21821
|
-
const
|
|
21822
|
-
return { chainId: ze.chainId, tokenSymbol:
|
|
21807
|
+
const It = Ke.token || Ke.symbol || n || "";
|
|
21808
|
+
return { chainId: ze.chainId, tokenSymbol: It };
|
|
21823
21809
|
}
|
|
21824
21810
|
}
|
|
21825
21811
|
}
|
|
21826
21812
|
if (t) {
|
|
21827
|
-
const
|
|
21828
|
-
return { chainId:
|
|
21813
|
+
const Ie = y.find((Ke) => Ke.chainId === t) || y[0], ze = Ie.tokenList || [], Gn = Y(ze);
|
|
21814
|
+
return { chainId: Ie.chainId, tokenSymbol: Gn };
|
|
21829
21815
|
}
|
|
21830
|
-
const pe = "USDC", we = (
|
|
21816
|
+
const pe = "USDC", we = (Ie) => Array.isArray(Ie.tokenList) && Ie.tokenList.some(
|
|
21831
21817
|
(ze) => (ze.token || ze.symbol || "").toUpperCase() === pe
|
|
21832
21818
|
), ke = y.find(we) || y[0];
|
|
21833
21819
|
if (!ke)
|
|
@@ -21835,26 +21821,26 @@ const vP = (e) => {
|
|
|
21835
21821
|
const Ht = Y(ke.tokenList);
|
|
21836
21822
|
return { chainId: ke.chainId, tokenSymbol: Ht };
|
|
21837
21823
|
}, [y, t, n]), [E, k] = ie(
|
|
21838
|
-
() =>
|
|
21824
|
+
() => I.chainId
|
|
21839
21825
|
), [F, z] = ie(
|
|
21840
|
-
() =>
|
|
21841
|
-
), [U, H] = ie(r), [
|
|
21826
|
+
() => I.tokenSymbol
|
|
21827
|
+
), [U, H] = ie(r), [te, q] = ie(""), _ = ee(
|
|
21842
21828
|
(Y) => {
|
|
21843
21829
|
k(Y), p == null || p(Y);
|
|
21844
21830
|
},
|
|
21845
21831
|
[p]
|
|
21846
|
-
), ne =
|
|
21832
|
+
), ne = ee(
|
|
21847
21833
|
(Y) => {
|
|
21848
21834
|
z(Y), d == null || d(Y);
|
|
21849
21835
|
},
|
|
21850
21836
|
[d]
|
|
21851
|
-
), xe = Z.useRef(!0),
|
|
21837
|
+
), xe = Z.useRef(!0), G = Z.useRef(F), ae = Z.useRef(E);
|
|
21852
21838
|
Z.useEffect(() => {
|
|
21853
21839
|
if (xe.current) {
|
|
21854
|
-
xe.current = !1,
|
|
21840
|
+
xe.current = !1, G.current = F, ae.current = E;
|
|
21855
21841
|
return;
|
|
21856
21842
|
}
|
|
21857
|
-
(
|
|
21843
|
+
(G.current !== F || ae.current !== E) && (H(""), G.current = F, ae.current = E);
|
|
21858
21844
|
}, [F, E]);
|
|
21859
21845
|
const ce = y && y.length > 0 ? y.find((Y) => Y.chainId === E) || y[0] : null, K = (ye = ce == null ? void 0 : ce.tokenList) == null ? void 0 : ye.find(
|
|
21860
21846
|
(Y) => Y.token === F
|
|
@@ -21869,7 +21855,7 @@ const vP = (e) => {
|
|
|
21869
21855
|
} : !U || Y.isZero() || !we && Y.isLessThan(pe) ? {
|
|
21870
21856
|
text: g("withdraw.confirmWithdraw"),
|
|
21871
21857
|
disabled: !0
|
|
21872
|
-
} : v === "mpc" && (!we || $ === "spot") && !
|
|
21858
|
+
} : v === "mpc" && (!we || $ === "spot") && !te.trim() ? {
|
|
21873
21859
|
text: g("withdraw.invalidReceiverAddress"),
|
|
21874
21860
|
disabled: !0
|
|
21875
21861
|
} : {
|
|
@@ -21881,7 +21867,7 @@ const vP = (e) => {
|
|
|
21881
21867
|
E,
|
|
21882
21868
|
U,
|
|
21883
21869
|
v,
|
|
21884
|
-
|
|
21870
|
+
te,
|
|
21885
21871
|
a,
|
|
21886
21872
|
$,
|
|
21887
21873
|
K
|
|
@@ -21890,7 +21876,7 @@ const vP = (e) => {
|
|
|
21890
21876
|
if (!Y) return i || "0";
|
|
21891
21877
|
const pe = (c == null ? void 0 : c[$]) || ($ === Ue.PERPETUAL ? c == null ? void 0 : c.perp : void 0), we = pe == null ? void 0 : pe[Y];
|
|
21892
21878
|
return typeof we == "string" && we.length > 0 ? we : i || "0";
|
|
21893
|
-
}, [c, $, F, i]), se =
|
|
21879
|
+
}, [c, $, F, i]), se = ee(async () => {
|
|
21894
21880
|
jc(!0);
|
|
21895
21881
|
try {
|
|
21896
21882
|
if (u) {
|
|
@@ -21903,7 +21889,7 @@ const vP = (e) => {
|
|
|
21903
21889
|
accountType: $,
|
|
21904
21890
|
selectedToken: K
|
|
21905
21891
|
};
|
|
21906
|
-
v === "mpc" && (!pn(E) || $ === "spot") && (pe.receiverAddress =
|
|
21892
|
+
v === "mpc" && (!pn(E) || $ === "spot") && (pe.receiverAddress = te), u(pe);
|
|
21907
21893
|
}
|
|
21908
21894
|
} catch {
|
|
21909
21895
|
jc(!1);
|
|
@@ -21916,7 +21902,7 @@ const vP = (e) => {
|
|
|
21916
21902
|
E,
|
|
21917
21903
|
F,
|
|
21918
21904
|
v,
|
|
21919
|
-
|
|
21905
|
+
te
|
|
21920
21906
|
]);
|
|
21921
21907
|
return !y || y.length === 0 ? /* @__PURE__ */ T.jsx("div", { className: "text-center py-8", children: /* @__PURE__ */ T.jsx("p", { className: "text-gray-400", children: "No chains available" }) }) : ce ? /* @__PURE__ */ T.jsxs(T.Fragment, { children: [
|
|
21922
21908
|
/* @__PURE__ */ T.jsx(
|
|
@@ -21928,18 +21914,18 @@ const vP = (e) => {
|
|
|
21928
21914
|
label: Y.key === Ue.SPOT ? g("account.spot") : Y.key === Ue.PERPETUAL ? g(P ? "account.perpetual-v1" : "account.perp") : Y.key === Ue.PERPETUALV2 ? g("account.perpetual-v2") : Y.key
|
|
21929
21915
|
})),
|
|
21930
21916
|
onAccountChange: (Y) => {
|
|
21931
|
-
var
|
|
21917
|
+
var It, Rn;
|
|
21932
21918
|
const pe = Y || $;
|
|
21933
21919
|
B(pe), m == null || m(pe);
|
|
21934
21920
|
const we = M(pe);
|
|
21935
21921
|
if (!we || we.length === 0) return;
|
|
21936
21922
|
const ke = we.find(($t) => $t.chainId === E), Ht = ke ? ke.chainId : we[0].chainId;
|
|
21937
21923
|
k(Ht), p == null || p(Ht);
|
|
21938
|
-
const
|
|
21924
|
+
const Ie = we.find(
|
|
21939
21925
|
($t) => $t.chainId === Ht
|
|
21940
|
-
), ze = (
|
|
21926
|
+
), ze = (Ie == null ? void 0 : Ie.tokenList) || [], Ke = ze.some(
|
|
21941
21927
|
($t) => ($t.symbol || $t.token) === F
|
|
21942
|
-
) ? F : ((
|
|
21928
|
+
) ? F : ((It = ze[0]) == null ? void 0 : It.symbol) || ((Rn = ze[0]) == null ? void 0 : Rn.token) || "";
|
|
21943
21929
|
Ke && (z(Ke), d == null || d(Ke));
|
|
21944
21930
|
},
|
|
21945
21931
|
className: "w-full"
|
|
@@ -21963,7 +21949,7 @@ const vP = (e) => {
|
|
|
21963
21949
|
"button",
|
|
21964
21950
|
{
|
|
21965
21951
|
type: "button",
|
|
21966
|
-
onClick: () =>
|
|
21952
|
+
onClick: () => C("evm"),
|
|
21967
21953
|
className: "w-full text-left rounded-lg px-3 py-[10px] bg-[#303030]",
|
|
21968
21954
|
children: /* @__PURE__ */ T.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
21969
21955
|
/* @__PURE__ */ T.jsxs("div", { className: "flex items-center justify-between gap-3", children: [
|
|
@@ -21983,7 +21969,7 @@ const vP = (e) => {
|
|
|
21983
21969
|
"button",
|
|
21984
21970
|
{
|
|
21985
21971
|
type: "button",
|
|
21986
|
-
onClick: () =>
|
|
21972
|
+
onClick: () => C("mpc"),
|
|
21987
21973
|
className: "w-full text-left rounded-lg px-3 py-[10px] bg-[#303030]",
|
|
21988
21974
|
children: /* @__PURE__ */ T.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
21989
21975
|
/* @__PURE__ */ T.jsxs("div", { className: "flex items-center justify-between gap-3", children: [
|
|
@@ -22013,9 +21999,9 @@ const vP = (e) => {
|
|
|
22013
21999
|
fee: a,
|
|
22014
22000
|
walletType: v,
|
|
22015
22001
|
accountType: $,
|
|
22016
|
-
receiverAddress:
|
|
22002
|
+
receiverAddress: te,
|
|
22017
22003
|
onWithdrawAmountChange: H,
|
|
22018
|
-
onReceiverAddressChange:
|
|
22004
|
+
onReceiverAddressChange: q,
|
|
22019
22005
|
onAmountChanged: h
|
|
22020
22006
|
}
|
|
22021
22007
|
),
|
|
@@ -22135,7 +22121,7 @@ const vP = (e) => {
|
|
|
22135
22121
|
export {
|
|
22136
22122
|
wP as A,
|
|
22137
22123
|
W as B,
|
|
22138
|
-
|
|
22124
|
+
CP as C,
|
|
22139
22125
|
Na as D,
|
|
22140
22126
|
xP as E,
|
|
22141
22127
|
jc as F,
|
|
@@ -22153,7 +22139,7 @@ export {
|
|
|
22153
22139
|
fr as e,
|
|
22154
22140
|
tn as f,
|
|
22155
22141
|
Jc as g,
|
|
22156
|
-
|
|
22142
|
+
IP as h,
|
|
22157
22143
|
ii as i,
|
|
22158
22144
|
qP as j,
|
|
22159
22145
|
KP as k,
|
|
@@ -22173,4 +22159,4 @@ export {
|
|
|
22173
22159
|
yP as y,
|
|
22174
22160
|
vP as z
|
|
22175
22161
|
};
|
|
22176
|
-
//# sourceMappingURL=index-
|
|
22162
|
+
//# sourceMappingURL=index-CDqJRxye.mjs.map
|