@edgex-web/components 0.2.0-beta.19 → 0.2.0-beta.20
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-Cny8eIAP.mjs → ccip-JQR0a-Lg.mjs} +2 -2
- package/dist/{ccip-Cny8eIAP.mjs.map → ccip-JQR0a-Lg.mjs.map} +1 -1
- package/dist/components/Deposit/src/components/mpc/index.d.ts.map +1 -1
- package/dist/components/shared/components/selector/Asset.d.ts.map +1 -1
- package/dist/components/shared/components/selector/index.d.ts.map +1 -1
- package/dist/components/shared/components/selector/types/index.d.ts +3 -0
- package/dist/components/shared/components/selector/types/index.d.ts.map +1 -1
- package/dist/hooks/useTranslation.d.ts +4 -0
- package/dist/hooks/useTranslation.d.ts.map +1 -1
- package/dist/{index-BBxsNXOK.mjs → index-CF2ZlxOy.mjs} +747 -718
- package/dist/index-CF2ZlxOy.mjs.map +1 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +38 -38
- package/dist/index.umd.js.map +1 -1
- package/dist/locales/en-US.d.ts +2 -0
- package/dist/locales/en-US.d.ts.map +1 -1
- package/dist/locales/ja-JP.d.ts +2 -0
- package/dist/locales/ja-JP.d.ts.map +1 -1
- package/dist/locales/ru-RU.d.ts +2 -0
- package/dist/locales/ru-RU.d.ts.map +1 -1
- package/dist/locales/zh-CN.d.ts +2 -0
- package/dist/locales/zh-CN.d.ts.map +1 -1
- package/dist/locales/zh-TW.d.ts +2 -0
- package/dist/locales/zh-TW.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/index-BBxsNXOK.mjs.map +0 -1
|
@@ -2,7 +2,7 @@ var t1 = Object.defineProperty;
|
|
|
2
2
|
var n1 = (e, t, n) => t in e ? t1(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var _r = (e, t, n) => n1(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import * as U from "react";
|
|
5
|
-
import Z, { createContext as De, useContext as Ee, useMemo as te, useCallback as X, forwardRef as
|
|
5
|
+
import Z, { createContext as De, useContext as Ee, useMemo as te, useCallback as X, forwardRef as Ac, createElement as ms, useRef as ce, useEffect as Pe, useState as oe, useLayoutEffect as ks, Fragment as Nt, isValidElement as Rc, cloneElement as rd, useId as Qn, useSyncExternalStore as r1, useImperativeHandle as od } from "react";
|
|
6
6
|
import * as eo from "react-dom";
|
|
7
7
|
import sd, { flushSync as bs, createPortal as id } from "react-dom";
|
|
8
8
|
function o1(e) {
|
|
@@ -86,7 +86,7 @@ function i1() {
|
|
|
86
86
|
var ge = G.displayName || G.name || "";
|
|
87
87
|
return ge !== "" ? Y + "(" + ge + ")" : Y;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function A(k) {
|
|
90
90
|
return k.displayName || "Context";
|
|
91
91
|
}
|
|
92
92
|
function O(k) {
|
|
@@ -114,10 +114,10 @@ function i1() {
|
|
|
114
114
|
switch (k.$$typeof) {
|
|
115
115
|
case c:
|
|
116
116
|
var G = k;
|
|
117
|
-
return
|
|
117
|
+
return A(G) + ".Consumer";
|
|
118
118
|
case i:
|
|
119
119
|
var Y = k;
|
|
120
|
-
return
|
|
120
|
+
return A(Y._context) + ".Provider";
|
|
121
121
|
case a:
|
|
122
122
|
return N(k, k.render, "ForwardRef");
|
|
123
123
|
case f:
|
|
@@ -134,14 +134,14 @@ function i1() {
|
|
|
134
134
|
}
|
|
135
135
|
return null;
|
|
136
136
|
}
|
|
137
|
-
var I = Object.assign, y = 0,
|
|
137
|
+
var I = Object.assign, y = 0, T, $, P, M, D, _, j;
|
|
138
138
|
function H() {
|
|
139
139
|
}
|
|
140
140
|
H.__reactDisabledLog = !0;
|
|
141
141
|
function K() {
|
|
142
142
|
{
|
|
143
143
|
if (y === 0) {
|
|
144
|
-
|
|
144
|
+
T = console.log, $ = console.info, P = console.warn, M = console.error, D = console.group, _ = console.groupCollapsed, j = console.groupEnd;
|
|
145
145
|
var k = {
|
|
146
146
|
configurable: !0,
|
|
147
147
|
enumerable: !0,
|
|
@@ -171,7 +171,7 @@ function i1() {
|
|
|
171
171
|
};
|
|
172
172
|
Object.defineProperties(console, {
|
|
173
173
|
log: I({}, k, {
|
|
174
|
-
value:
|
|
174
|
+
value: T
|
|
175
175
|
}),
|
|
176
176
|
info: I({}, k, {
|
|
177
177
|
value: $
|
|
@@ -283,8 +283,8 @@ function i1() {
|
|
|
283
283
|
} finally {
|
|
284
284
|
ie = !1, z.current = we, V(), Error.prepareStackTrace = ge;
|
|
285
285
|
}
|
|
286
|
-
var ir = k ? k.displayName || k.name : "",
|
|
287
|
-
return typeof k == "function" && ye.set(k,
|
|
286
|
+
var ir = k ? k.displayName || k.name : "", Fn = ir ? ee(ir) : "";
|
|
287
|
+
return typeof k == "function" && ye.set(k, Fn), Fn;
|
|
288
288
|
}
|
|
289
289
|
function ae(k, G, Y) {
|
|
290
290
|
return he(k, !1);
|
|
@@ -322,7 +322,7 @@ function i1() {
|
|
|
322
322
|
}
|
|
323
323
|
return "";
|
|
324
324
|
}
|
|
325
|
-
var
|
|
325
|
+
var Ae = Object.prototype.hasOwnProperty, gn = {}, ut = S.ReactDebugCurrentFrame;
|
|
326
326
|
function Yo(k) {
|
|
327
327
|
if (k) {
|
|
328
328
|
var G = k._owner, Y = ne(k.type, k._source, G ? G.type : null);
|
|
@@ -332,7 +332,7 @@ function i1() {
|
|
|
332
332
|
}
|
|
333
333
|
function Bm(k, G, Y, re, ge) {
|
|
334
334
|
{
|
|
335
|
-
var we = Function.call.bind(
|
|
335
|
+
var we = Function.call.bind(Ae);
|
|
336
336
|
for (var de in k)
|
|
337
337
|
if (we(k, de)) {
|
|
338
338
|
var fe = void 0;
|
|
@@ -380,7 +380,7 @@ function i1() {
|
|
|
380
380
|
__source: !0
|
|
381
381
|
}, Wu, Vu;
|
|
382
382
|
function Dm(k) {
|
|
383
|
-
if (
|
|
383
|
+
if (Ae.call(k, "ref")) {
|
|
384
384
|
var G = Object.getOwnPropertyDescriptor(k, "ref").get;
|
|
385
385
|
if (G && G.isReactWarning)
|
|
386
386
|
return !1;
|
|
@@ -388,7 +388,7 @@ function i1() {
|
|
|
388
388
|
return k.ref !== void 0;
|
|
389
389
|
}
|
|
390
390
|
function jm(k) {
|
|
391
|
-
if (
|
|
391
|
+
if (Ae.call(k, "key")) {
|
|
392
392
|
var G = Object.getOwnPropertyDescriptor(k, "key").get;
|
|
393
393
|
if (G && G.isReactWarning)
|
|
394
394
|
return !1;
|
|
@@ -454,7 +454,7 @@ function i1() {
|
|
|
454
454
|
var we, de = {}, fe = null, Ue = null;
|
|
455
455
|
Y !== void 0 && (zu(Y), fe = "" + Y), jm(G) && (zu(G.key), fe = "" + G.key), Dm(G) && (Ue = G.ref, _m(G, ge));
|
|
456
456
|
for (we in G)
|
|
457
|
-
|
|
457
|
+
Ae.call(G, we) && !km.hasOwnProperty(we) && (de[we] = G[we]);
|
|
458
458
|
if (k && k.defaultProps) {
|
|
459
459
|
var Re = k.defaultProps;
|
|
460
460
|
for (we in Re)
|
|
@@ -605,18 +605,18 @@ Check the top-level render call using <` + Y + ">.");
|
|
|
605
605
|
else
|
|
606
606
|
Ku(lt, k);
|
|
607
607
|
}
|
|
608
|
-
if (
|
|
609
|
-
var
|
|
608
|
+
if (Ae.call(G, "key")) {
|
|
609
|
+
var Fn = O(k), Ve = Object.keys(G).filter(function(e1) {
|
|
610
610
|
return e1 !== "key";
|
|
611
611
|
}), Si = Ve.length > 0 ? "{key: someKey, " + Ve.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
612
|
-
if (!Xu[
|
|
612
|
+
if (!Xu[Fn + Si]) {
|
|
613
613
|
var Jm = Ve.length > 0 ? "{" + Ve.join(": ..., ") + ": ...}" : "{}";
|
|
614
614
|
x(`A props object containing a "key" prop is being spread into JSX:
|
|
615
615
|
let props = %s;
|
|
616
616
|
<%s {...props} />
|
|
617
617
|
React keys must be passed directly to JSX without using spread:
|
|
618
618
|
let props = %s;
|
|
619
|
-
<%s key={someKey} {...props} />`, Si,
|
|
619
|
+
<%s key={someKey} {...props} />`, Si, Fn, Jm, Fn), Xu[Fn + Si] = !0;
|
|
620
620
|
}
|
|
621
621
|
}
|
|
622
622
|
return k === r ? Zm(Oe) : qm(Oe), Oe;
|
|
@@ -670,7 +670,9 @@ const a1 = {
|
|
|
670
670
|
layerZeroDepositTip: "系统会根据充值资金实际情况,将您的充值通过LayerZero完成。",
|
|
671
671
|
layerZeroDepositTipExceedPool: "由于充值资金大于资金池,将通过LayerZero完成您的充值。",
|
|
672
672
|
layerZeroDepositTipGte200k: "由于充值资金大于等于200,000 USDT,将通过LayerZero完成您的充值。",
|
|
673
|
-
layerZeroDepositButton: "使用LayerZero充值"
|
|
673
|
+
layerZeroDepositButton: "使用LayerZero充值",
|
|
674
|
+
defaultSpotNotice: "默认充值至现货账户",
|
|
675
|
+
defaultSpotToPerpNotice: "仅支持发送 {{coin}} ({{v}}) 资产到此地址。默认充值至现货账户。若需充入合约账户,请从现货账户划转至合约账户。"
|
|
674
676
|
},
|
|
675
677
|
withdraw: {
|
|
676
678
|
noticeDesc: "普通提现是一个两步过程。 此步骤将发起您的提现请求,并将在 Layer2 进行处理。 一旦资金准备就绪(可能需要最多 4 小时),您将收到一条将资金提现到钱包的通知。受链同步等情况影响下,时长可能到 48 小时。您需要自行承担交易 gas 费用。",
|
|
@@ -738,7 +740,9 @@ const a1 = {
|
|
|
738
740
|
layerZeroDepositTip: "The system will complete your deposit via LayerZero based on the actual deposit conditions.",
|
|
739
741
|
layerZeroDepositTipExceedPool: "Since the deposit amount exceeds the pool, your deposit will be completed via LayerZero.",
|
|
740
742
|
layerZeroDepositTipGte200k: "Since the deposit amount is greater than or equal to 200,000 USDT, your deposit will be completed via LayerZero.",
|
|
741
|
-
layerZeroDepositButton: "Deposit with LayerZero"
|
|
743
|
+
layerZeroDepositButton: "Deposit with LayerZero",
|
|
744
|
+
defaultSpotNotice: "Default deposits go to the spot account.",
|
|
745
|
+
defaultSpotToPerpNotice: "Only {{coin}} ({{v}}) is supported for deposits to this address. Default deposits go to the spot account. To fund the futures account, transfer from the spot account to the futures account."
|
|
742
746
|
},
|
|
743
747
|
withdraw: {
|
|
744
748
|
noticeDesc: "Normal withdrawals are a two-step process. The current step initiates your withdrawal request and will be processed on Layer 2. Once your funds are ready (can take up to 4 hours), you will receive a notification to withdraw funds to your wallet. Due to chain synchronization and other factors, the duration may take up to 48 hours. You are responsible for any transaction gas fees.",
|
|
@@ -806,7 +810,9 @@ const a1 = {
|
|
|
806
810
|
layerZeroDepositTip: "システムは入金資金の実際の状況に基づき、LayerZeroを通じて入金を完了します。",
|
|
807
811
|
layerZeroDepositTipExceedPool: "入金額がプールを超えているため、LayerZero を通じて入金が完了します。",
|
|
808
812
|
layerZeroDepositTipGte200k: "入金額が 200,000 USDT 以上のため、LayerZero を通じて入金が完了します。",
|
|
809
|
-
layerZeroDepositButton: "LayerZeroで入金"
|
|
813
|
+
layerZeroDepositButton: "LayerZeroで入金",
|
|
814
|
+
defaultSpotNotice: "デフォルトでは現物口座に入金されます",
|
|
815
|
+
defaultSpotToPerpNotice: "このアドレスは {{coin}} ({{v}}) 専用です。 デフォルトでは現物口座に入金されます。先物口座に入金する場合は、現物口座から先物口座へ振替してください。"
|
|
810
816
|
},
|
|
811
817
|
withdraw: {
|
|
812
818
|
noticeDesc: "通常出金は2ステップで行われます。このステップで出金リクエストを送信し、Layer2で処理されます。資金の準備が完了すると(最大4時間かかる場合があります)、出金の通知が届きます。チェーンの同期などの影響により、所要時間は最長で48時間かかる場合があります。ガス代はユーザー負担です。",
|
|
@@ -876,7 +882,9 @@ const a1 = {
|
|
|
876
882
|
layerZeroDepositTip: "Система завершит ваше пополнение через LayerZero в зависимости от фактических условий депозита.",
|
|
877
883
|
layerZeroDepositTipExceedPool: "Поскольку сумма пополнения превышает пул, ваше пополнение будет выполнено через LayerZero.",
|
|
878
884
|
layerZeroDepositTipGte200k: "Поскольку сумма пополнения больше либо равна 200,000 USDT, ваше пополнение будет выполнено через LayerZero.",
|
|
879
|
-
layerZeroDepositButton: "Пополнение через LayerZero"
|
|
885
|
+
layerZeroDepositButton: "Пополнение через LayerZero",
|
|
886
|
+
defaultSpotNotice: "По умолчанию — на спотовый счёт",
|
|
887
|
+
defaultSpotToPerpNotice: "На этот адрес можно внести только {{coin}} ({{v}}). Пополнение по умолчанию зачисляется на спотовый счёт. Чтобы пополнить фьючерсный счёт, переведите средства со спотового на фьючерсный."
|
|
880
888
|
},
|
|
881
889
|
withdraw: {
|
|
882
890
|
noticeDesc: "Вывод средств происходит в два этапа: сначала подаётся заявка на вывод (обрабатывается на Layer 2), затем - перевод на кошелёк после подготовки средств (до 14 часов). Из-за синхронизации цепочки и других факторов процесс может занять до 48 часов. За gas-комиссии отвечает пользователь.",
|
|
@@ -944,7 +952,9 @@ const a1 = {
|
|
|
944
952
|
layerZeroDepositTip: "系統會根據充值資金的實際情況,通過 LayerZero 完成您的充值。",
|
|
945
953
|
layerZeroDepositTipExceedPool: "由於充值資金大於資金池,將透過 LayerZero 完成您的充值。",
|
|
946
954
|
layerZeroDepositTipGte200k: "由於充值資金大於等於 200,000 USDT,將透過 LayerZero 完成您的充值。",
|
|
947
|
-
layerZeroDepositButton: "使用LayerZero充值"
|
|
955
|
+
layerZeroDepositButton: "使用LayerZero充值",
|
|
956
|
+
defaultSpotNotice: "預設充值至現貨帳戶",
|
|
957
|
+
defaultSpotToPerpNotice: "僅支援發送 {{coin}} ({{v}}) 資產到此位址。預設充值至現貨帳戶。若需充入合約帳戶,請自現貨帳戶劃轉至合約帳戶。"
|
|
948
958
|
},
|
|
949
959
|
withdraw: {
|
|
950
960
|
noticeDesc: "普通提現是一個兩步過程。此步驟將發起您的提現請求,並將在 Layer2 進行處理。一旦資金準備就緒(可能需要最多 4 小時),您將收到一條將資金提現到錢包的通知。受鏈同步等情況影響下,時長可能需要長達 48 小時。您需要自行承擔交易 gas 費用。",
|
|
@@ -1013,7 +1023,7 @@ const a1 = {
|
|
|
1013
1023
|
throw new Error("useComponentConfig must be used within ComponentProvider");
|
|
1014
1024
|
return e;
|
|
1015
1025
|
};
|
|
1016
|
-
var m1 = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, $i = Math.ceil, ht = Math.floor, Ge = "[BigNumber Error] ", nl = Ge + "Number primitive has more than 15 significant digits: ", St = 1e14, se = 14,
|
|
1026
|
+
var m1 = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, $i = Math.ceil, ht = Math.floor, Ge = "[BigNumber Error] ", nl = Ge + "Number primitive has more than 15 significant digits: ", St = 1e14, se = 14, Ti = 9007199254740991, Ai = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], yn = 1e7, Ce = 1e9;
|
|
1017
1027
|
function ud(e) {
|
|
1018
1028
|
var t, n, r, o = x.prototype = { constructor: x, toString: null, valueOf: null }, s = new x(1), i = 20, c = 4, a = -7, u = 21, l = -1e7, f = 1e7, p = !1, d = 1, h = 0, m = {
|
|
1019
1029
|
prefix: "",
|
|
@@ -1027,7 +1037,7 @@ function ud(e) {
|
|
|
1027
1037
|
suffix: ""
|
|
1028
1038
|
}, w = "0123456789abcdefghijklmnopqrstuvwxyz", S = !0;
|
|
1029
1039
|
function x(b, g) {
|
|
1030
|
-
var v, N,
|
|
1040
|
+
var v, N, A, O, I, y, T, $, P = this;
|
|
1031
1041
|
if (!(P instanceof x)) return new x(b, g);
|
|
1032
1042
|
if (g == null) {
|
|
1033
1043
|
if (b && b._isBigNumber === !0) {
|
|
@@ -1055,15 +1065,15 @@ function ud(e) {
|
|
|
1055
1065
|
throw Error(nl + b);
|
|
1056
1066
|
} else
|
|
1057
1067
|
P.s = $.charCodeAt(0) === 45 ? ($ = $.slice(1), -1) : 1;
|
|
1058
|
-
for (v = w.slice(0, g), O = I = 0,
|
|
1068
|
+
for (v = w.slice(0, g), O = I = 0, T = $.length; I < T; I++)
|
|
1059
1069
|
if (v.indexOf(N = $.charAt(I)) < 0) {
|
|
1060
1070
|
if (N == ".") {
|
|
1061
1071
|
if (I > O) {
|
|
1062
|
-
O =
|
|
1072
|
+
O = T;
|
|
1063
1073
|
continue;
|
|
1064
1074
|
}
|
|
1065
|
-
} else if (!
|
|
1066
|
-
|
|
1075
|
+
} else if (!A && ($ == $.toUpperCase() && ($ = $.toLowerCase()) || $ == $.toLowerCase() && ($ = $.toUpperCase()))) {
|
|
1076
|
+
A = !0, I = -1, O = 0;
|
|
1067
1077
|
continue;
|
|
1068
1078
|
}
|
|
1069
1079
|
return r(P, String(b), y, g);
|
|
@@ -1071,21 +1081,21 @@ function ud(e) {
|
|
|
1071
1081
|
y = !1, $ = n($, g, 10, P.s), (O = $.indexOf(".")) > -1 ? $ = $.replace(".", "") : O = $.length;
|
|
1072
1082
|
}
|
|
1073
1083
|
for (I = 0; $.charCodeAt(I) === 48; I++) ;
|
|
1074
|
-
for (
|
|
1075
|
-
if ($ = $.slice(I, ++
|
|
1076
|
-
if (
|
|
1084
|
+
for (T = $.length; $.charCodeAt(--T) === 48; ) ;
|
|
1085
|
+
if ($ = $.slice(I, ++T)) {
|
|
1086
|
+
if (T -= I, y && x.DEBUG && T > 15 && (b > Ti || b !== ht(b)))
|
|
1077
1087
|
throw Error(nl + P.s * b);
|
|
1078
1088
|
if ((O = O - I - 1) > f)
|
|
1079
1089
|
P.c = P.e = null;
|
|
1080
1090
|
else if (O < l)
|
|
1081
1091
|
P.c = [P.e = 0];
|
|
1082
1092
|
else {
|
|
1083
|
-
if (P.e = O, P.c = [], I = (O + 1) % se, O < 0 && (I += se), I <
|
|
1084
|
-
for (I && P.c.push(+$.slice(0, I)),
|
|
1093
|
+
if (P.e = O, P.c = [], I = (O + 1) % se, O < 0 && (I += se), I < T) {
|
|
1094
|
+
for (I && P.c.push(+$.slice(0, I)), T -= se; I < T; )
|
|
1085
1095
|
P.c.push(+$.slice(I, I += se));
|
|
1086
1096
|
I = se - ($ = $.slice(I)).length;
|
|
1087
1097
|
} else
|
|
1088
|
-
I -=
|
|
1098
|
+
I -= T;
|
|
1089
1099
|
for (; I--; $ += "0") ;
|
|
1090
1100
|
P.c.push(+$);
|
|
1091
1101
|
}
|
|
@@ -1138,20 +1148,20 @@ function ud(e) {
|
|
|
1138
1148
|
}, x.isBigNumber = function(b) {
|
|
1139
1149
|
if (!b || b._isBigNumber !== !0) return !1;
|
|
1140
1150
|
if (!x.DEBUG) return !0;
|
|
1141
|
-
var g, v, N = b.c,
|
|
1151
|
+
var g, v, N = b.c, A = b.e, O = b.s;
|
|
1142
1152
|
e: if ({}.toString.call(N) == "[object Array]") {
|
|
1143
|
-
if ((O === 1 || O === -1) &&
|
|
1153
|
+
if ((O === 1 || O === -1) && A >= -Ce && A <= Ce && A === ht(A)) {
|
|
1144
1154
|
if (N[0] === 0) {
|
|
1145
|
-
if (
|
|
1155
|
+
if (A === 0 && N.length === 1) return !0;
|
|
1146
1156
|
break e;
|
|
1147
1157
|
}
|
|
1148
|
-
if (g = (
|
|
1158
|
+
if (g = (A + 1) % se, g < 1 && (g += se), String(N[0]).length == g) {
|
|
1149
1159
|
for (g = 0; g < N.length; g++)
|
|
1150
1160
|
if (v = N[g], v < 0 || v >= St || v !== ht(v)) break e;
|
|
1151
1161
|
if (v !== 0) return !0;
|
|
1152
1162
|
}
|
|
1153
1163
|
}
|
|
1154
|
-
} else if (N === null &&
|
|
1164
|
+
} else if (N === null && A === null && (O === null || O === 1 || O === -1))
|
|
1155
1165
|
return !0;
|
|
1156
1166
|
throw Error(Ge + "Invalid BigNumber: " + b);
|
|
1157
1167
|
}, x.maximum = x.max = function() {
|
|
@@ -1165,28 +1175,28 @@ function ud(e) {
|
|
|
1165
1175
|
return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
|
|
1166
1176
|
};
|
|
1167
1177
|
return function(v) {
|
|
1168
|
-
var N,
|
|
1178
|
+
var N, A, O, I, y, T = 0, $ = [], P = new x(s);
|
|
1169
1179
|
if (v == null ? v = i : xe(v, 0, Ce), I = $i(v / se), p)
|
|
1170
1180
|
if (crypto.getRandomValues) {
|
|
1171
|
-
for (N = crypto.getRandomValues(new Uint32Array(I *= 2));
|
|
1172
|
-
y = N[
|
|
1173
|
-
|
|
1181
|
+
for (N = crypto.getRandomValues(new Uint32Array(I *= 2)); T < I; )
|
|
1182
|
+
y = N[T] * 131072 + (N[T + 1] >>> 11), y >= 9e15 ? (A = crypto.getRandomValues(new Uint32Array(2)), N[T] = A[0], N[T + 1] = A[1]) : ($.push(y % 1e14), T += 2);
|
|
1183
|
+
T = I / 2;
|
|
1174
1184
|
} else if (crypto.randomBytes) {
|
|
1175
|
-
for (N = crypto.randomBytes(I *= 7);
|
|
1176
|
-
y = (N[
|
|
1177
|
-
|
|
1185
|
+
for (N = crypto.randomBytes(I *= 7); T < I; )
|
|
1186
|
+
y = (N[T] & 31) * 281474976710656 + N[T + 1] * 1099511627776 + N[T + 2] * 4294967296 + N[T + 3] * 16777216 + (N[T + 4] << 16) + (N[T + 5] << 8) + N[T + 6], y >= 9e15 ? crypto.randomBytes(7).copy(N, T) : ($.push(y % 1e14), T += 7);
|
|
1187
|
+
T = I / 7;
|
|
1178
1188
|
} else
|
|
1179
1189
|
throw p = !1, Error(Ge + "crypto unavailable");
|
|
1180
1190
|
if (!p)
|
|
1181
|
-
for (;
|
|
1182
|
-
y = g(), y < 9e15 && ($[
|
|
1183
|
-
for (I = $[--
|
|
1184
|
-
if (
|
|
1191
|
+
for (; T < I; )
|
|
1192
|
+
y = g(), y < 9e15 && ($[T++] = y % 1e14);
|
|
1193
|
+
for (I = $[--T], v %= se, I && v && (y = Ai[se - v], $[T] = ht(I / y) * y); $[T] === 0; $.pop(), T--) ;
|
|
1194
|
+
if (T < 0)
|
|
1185
1195
|
$ = [O = 0];
|
|
1186
1196
|
else {
|
|
1187
1197
|
for (O = -1; $[0] === 0; $.splice(0, 1), O -= se) ;
|
|
1188
|
-
for (
|
|
1189
|
-
|
|
1198
|
+
for (T = 1, y = $[0]; y >= 10; y /= 10, T++) ;
|
|
1199
|
+
T < se && (O -= se - T);
|
|
1190
1200
|
}
|
|
1191
1201
|
return P.e = O, P.c = $, P;
|
|
1192
1202
|
};
|
|
@@ -1195,29 +1205,29 @@ function ud(e) {
|
|
|
1195
1205
|
return v;
|
|
1196
1206
|
}, n = /* @__PURE__ */ function() {
|
|
1197
1207
|
var b = "0123456789";
|
|
1198
|
-
function g(v, N,
|
|
1199
|
-
for (var I, y = [0],
|
|
1200
|
-
for (
|
|
1208
|
+
function g(v, N, A, O) {
|
|
1209
|
+
for (var I, y = [0], T, $ = 0, P = v.length; $ < P; ) {
|
|
1210
|
+
for (T = y.length; T--; y[T] *= N) ;
|
|
1201
1211
|
for (y[0] += O.indexOf(v.charAt($++)), I = 0; I < y.length; I++)
|
|
1202
|
-
y[I] >
|
|
1212
|
+
y[I] > A - 1 && (y[I + 1] == null && (y[I + 1] = 0), y[I + 1] += y[I] / A | 0, y[I] %= A);
|
|
1203
1213
|
}
|
|
1204
1214
|
return y.reverse();
|
|
1205
1215
|
}
|
|
1206
|
-
return function(v, N,
|
|
1207
|
-
var y,
|
|
1216
|
+
return function(v, N, A, O, I) {
|
|
1217
|
+
var y, T, $, P, M, D, _, j, H = v.indexOf("."), K = i, V = c;
|
|
1208
1218
|
for (H >= 0 && (P = h, h = 0, v = v.replace(".", ""), j = new x(N), D = j.pow(v.length - H), h = P, j.c = g(
|
|
1209
1219
|
Xt(ft(D.c), D.e, "0"),
|
|
1210
1220
|
10,
|
|
1211
|
-
|
|
1221
|
+
A,
|
|
1212
1222
|
b
|
|
1213
|
-
), j.e = j.c.length), _ = g(v, N,
|
|
1223
|
+
), j.e = j.c.length), _ = g(v, N, A, I ? (y = w, b) : (y = b, w)), $ = P = _.length; _[--P] == 0; _.pop()) ;
|
|
1214
1224
|
if (!_[0]) return y.charAt(0);
|
|
1215
|
-
if (H < 0 ? --$ : (D.c = _, D.e = $, D.s = O, D = t(D, j, K, V,
|
|
1225
|
+
if (H < 0 ? --$ : (D.c = _, D.e = $, D.s = O, D = t(D, j, K, V, A), _ = D.c, M = D.r, $ = D.e), T = $ + K + 1, H = _[T], P = A / 2, M = M || T < 0 || _[T + 1] != null, M = V < 4 ? (H != null || M) && (V == 0 || V == (D.s < 0 ? 3 : 2)) : H > P || H == P && (V == 4 || M || V == 6 && _[T - 1] & 1 || V == (D.s < 0 ? 8 : 7)), T < 1 || !_[0])
|
|
1216
1226
|
v = M ? Xt(y.charAt(1), -K, y.charAt(0)) : y.charAt(0);
|
|
1217
1227
|
else {
|
|
1218
|
-
if (_.length =
|
|
1219
|
-
for (--
|
|
1220
|
-
_[
|
|
1228
|
+
if (_.length = T, M)
|
|
1229
|
+
for (--A; ++_[--T] > A; )
|
|
1230
|
+
_[T] = 0, T || (++$, _ = [1].concat(_));
|
|
1221
1231
|
for (P = _.length; !_[--P]; ) ;
|
|
1222
1232
|
for (H = 0, v = ""; H <= P; v += y.charAt(_[H++])) ;
|
|
1223
1233
|
v = Xt(v, $, y.charAt(0));
|
|
@@ -1225,56 +1235,56 @@ function ud(e) {
|
|
|
1225
1235
|
return v;
|
|
1226
1236
|
};
|
|
1227
1237
|
}(), t = /* @__PURE__ */ function() {
|
|
1228
|
-
function b(N,
|
|
1229
|
-
var I, y,
|
|
1238
|
+
function b(N, A, O) {
|
|
1239
|
+
var I, y, T, $, P = 0, M = N.length, D = A % yn, _ = A / yn | 0;
|
|
1230
1240
|
for (N = N.slice(); M--; )
|
|
1231
|
-
|
|
1241
|
+
T = N[M] % yn, $ = N[M] / yn | 0, I = _ * T + $ * D, y = D * T + I % yn * yn + P, P = (y / O | 0) + (I / yn | 0) + _ * $, N[M] = y % O;
|
|
1232
1242
|
return P && (N = [P].concat(N)), N;
|
|
1233
1243
|
}
|
|
1234
|
-
function g(N,
|
|
1235
|
-
var y,
|
|
1244
|
+
function g(N, A, O, I) {
|
|
1245
|
+
var y, T;
|
|
1236
1246
|
if (O != I)
|
|
1237
|
-
|
|
1247
|
+
T = O > I ? 1 : -1;
|
|
1238
1248
|
else
|
|
1239
|
-
for (y =
|
|
1240
|
-
if (N[y] !=
|
|
1241
|
-
|
|
1249
|
+
for (y = T = 0; y < O; y++)
|
|
1250
|
+
if (N[y] != A[y]) {
|
|
1251
|
+
T = N[y] > A[y] ? 1 : -1;
|
|
1242
1252
|
break;
|
|
1243
1253
|
}
|
|
1244
|
-
return
|
|
1254
|
+
return T;
|
|
1245
1255
|
}
|
|
1246
|
-
function v(N,
|
|
1256
|
+
function v(N, A, O, I) {
|
|
1247
1257
|
for (var y = 0; O--; )
|
|
1248
|
-
N[O] -= y, y = N[O] <
|
|
1258
|
+
N[O] -= y, y = N[O] < A[O] ? 1 : 0, N[O] = y * I + N[O] - A[O];
|
|
1249
1259
|
for (; !N[0] && N.length > 1; N.splice(0, 1)) ;
|
|
1250
1260
|
}
|
|
1251
|
-
return function(N,
|
|
1252
|
-
var
|
|
1261
|
+
return function(N, A, O, I, y) {
|
|
1262
|
+
var T, $, P, M, D, _, j, H, K, V, z, q, ee, ie, ye, ve, he, ae = N.s == A.s ? 1 : -1, me = N.c, ne = A.c;
|
|
1253
1263
|
if (!me || !me[0] || !ne || !ne[0])
|
|
1254
1264
|
return new x(
|
|
1255
1265
|
// Return NaN if either NaN, or both Infinity or 0.
|
|
1256
|
-
!N.s || !
|
|
1266
|
+
!N.s || !A.s || (me ? ne && me[0] == ne[0] : !ne) ? NaN : (
|
|
1257
1267
|
// Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.
|
|
1258
1268
|
me && me[0] == 0 || !ne ? ae * 0 : ae / 0
|
|
1259
1269
|
)
|
|
1260
1270
|
);
|
|
1261
|
-
for (H = new x(ae), K = H.c = [], $ = N.e -
|
|
1271
|
+
for (H = new x(ae), K = H.c = [], $ = N.e - A.e, ae = O + $ + 1, y || (y = St, $ = mt(N.e / se) - mt(A.e / se), ae = ae / se | 0), P = 0; ne[P] == (me[P] || 0); P++) ;
|
|
1262
1272
|
if (ne[P] > (me[P] || 0) && $--, ae < 0)
|
|
1263
1273
|
K.push(1), M = !0;
|
|
1264
1274
|
else {
|
|
1265
1275
|
for (ie = me.length, ve = ne.length, P = 0, ae += 2, D = ht(y / (ne[0] + 1)), D > 1 && (ne = b(ne, D, y), me = b(me, D, y), ve = ne.length, ie = me.length), ee = ve, V = me.slice(0, ve), z = V.length; z < ve; V[z++] = 0) ;
|
|
1266
1276
|
he = ne.slice(), he = [0].concat(he), ye = ne[0], ne[1] >= y / 2 && ye++;
|
|
1267
1277
|
do {
|
|
1268
|
-
if (D = 0,
|
|
1278
|
+
if (D = 0, T = g(ne, V, ve, z), T < 0) {
|
|
1269
1279
|
if (q = V[0], ve != z && (q = q * y + (V[1] || 0)), D = ht(q / ye), D > 1)
|
|
1270
1280
|
for (D >= y && (D = y - 1), _ = b(ne, D, y), j = _.length, z = V.length; g(_, V, j, z) == 1; )
|
|
1271
|
-
D--, v(_, ve < j ? he : ne, j, y), j = _.length,
|
|
1281
|
+
D--, v(_, ve < j ? he : ne, j, y), j = _.length, T = 1;
|
|
1272
1282
|
else
|
|
1273
|
-
D == 0 && (
|
|
1274
|
-
if (j < z && (_ = [0].concat(_)), v(V, _, z, y), z = V.length,
|
|
1283
|
+
D == 0 && (T = D = 1), _ = ne.slice(), j = _.length;
|
|
1284
|
+
if (j < z && (_ = [0].concat(_)), v(V, _, z, y), z = V.length, T == -1)
|
|
1275
1285
|
for (; g(ne, V, ve, z) < 1; )
|
|
1276
1286
|
D++, v(V, ve < z ? he : ne, z, y), z = V.length;
|
|
1277
|
-
} else
|
|
1287
|
+
} else T === 0 && (D++, V = [0]);
|
|
1278
1288
|
K[P++] = D, V[0] ? V[z++] = me[ee] || 0 : (V = [me[ee]], z = 1);
|
|
1279
1289
|
} while ((ee++ < ie || V[0] != null) && ae--);
|
|
1280
1290
|
M = V[0] != null, K[0] || K.splice(0, 1);
|
|
@@ -1288,71 +1298,71 @@ function ud(e) {
|
|
|
1288
1298
|
};
|
|
1289
1299
|
}();
|
|
1290
1300
|
function E(b, g, v, N) {
|
|
1291
|
-
var
|
|
1301
|
+
var A, O, I, y, T;
|
|
1292
1302
|
if (v == null ? v = c : xe(v, 0, 8), !b.c) return b.toString();
|
|
1293
|
-
if (
|
|
1294
|
-
|
|
1295
|
-
else if (b = F(new x(b), g, v), O = b.e,
|
|
1296
|
-
for (; y < g;
|
|
1297
|
-
|
|
1298
|
-
} else if (g -= I + (N === 2 && O > I),
|
|
1299
|
-
if (--g > 0) for (
|
|
1303
|
+
if (A = b.c[0], I = b.e, g == null)
|
|
1304
|
+
T = ft(b.c), T = N == 1 || N == 2 && (I <= a || I >= u) ? Xo(T, I) : Xt(T, I, "0");
|
|
1305
|
+
else if (b = F(new x(b), g, v), O = b.e, T = ft(b.c), y = T.length, N == 1 || N == 2 && (g <= O || O <= a)) {
|
|
1306
|
+
for (; y < g; T += "0", y++) ;
|
|
1307
|
+
T = Xo(T, O);
|
|
1308
|
+
} else if (g -= I + (N === 2 && O > I), T = Xt(T, O, "0"), O + 1 > y) {
|
|
1309
|
+
if (--g > 0) for (T += "."; g--; T += "0") ;
|
|
1300
1310
|
} else if (g += O - y, g > 0)
|
|
1301
|
-
for (O + 1 == y && (
|
|
1302
|
-
return b.s < 0 &&
|
|
1311
|
+
for (O + 1 == y && (T += "."); g--; T += "0") ;
|
|
1312
|
+
return b.s < 0 && A ? "-" + T : T;
|
|
1303
1313
|
}
|
|
1304
1314
|
function R(b, g) {
|
|
1305
|
-
for (var v, N,
|
|
1306
|
-
N = new x(b[
|
|
1315
|
+
for (var v, N, A = 1, O = new x(b[0]); A < b.length; A++)
|
|
1316
|
+
N = new x(b[A]), (!N.s || (v = Ln(O, N)) === g || v === 0 && O.s === g) && (O = N);
|
|
1307
1317
|
return O;
|
|
1308
1318
|
}
|
|
1309
1319
|
function B(b, g, v) {
|
|
1310
|
-
for (var N = 1,
|
|
1311
|
-
for (
|
|
1320
|
+
for (var N = 1, A = g.length; !g[--A]; g.pop()) ;
|
|
1321
|
+
for (A = g[0]; A >= 10; A /= 10, N++) ;
|
|
1312
1322
|
return (v = N + v * se - 1) > f ? b.c = b.e = null : v < l ? b.c = [b.e = 0] : (b.e = v, b.c = g), b;
|
|
1313
1323
|
}
|
|
1314
1324
|
r = /* @__PURE__ */ function() {
|
|
1315
|
-
var b = /^(-?)0([xbo])(?=\w[\w.]*$)/i, g = /^([^.]+)\.$/, v = /^\.([^.]+)$/, N = /^-?(Infinity|NaN)$/,
|
|
1316
|
-
return function(O, I, y,
|
|
1317
|
-
var $, P = y ? I : I.replace(
|
|
1325
|
+
var b = /^(-?)0([xbo])(?=\w[\w.]*$)/i, g = /^([^.]+)\.$/, v = /^\.([^.]+)$/, N = /^-?(Infinity|NaN)$/, A = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
|
|
1326
|
+
return function(O, I, y, T) {
|
|
1327
|
+
var $, P = y ? I : I.replace(A, "");
|
|
1318
1328
|
if (N.test(P))
|
|
1319
1329
|
O.s = isNaN(P) ? null : P < 0 ? -1 : 1;
|
|
1320
1330
|
else {
|
|
1321
1331
|
if (!y && (P = P.replace(b, function(M, D, _) {
|
|
1322
|
-
return $ = (_ = _.toLowerCase()) == "x" ? 16 : _ == "b" ? 2 : 8, !
|
|
1323
|
-
}),
|
|
1332
|
+
return $ = (_ = _.toLowerCase()) == "x" ? 16 : _ == "b" ? 2 : 8, !T || T == $ ? D : M;
|
|
1333
|
+
}), T && ($ = T, P = P.replace(g, "$1").replace(v, "0.$1")), I != P))
|
|
1324
1334
|
return new x(P, $);
|
|
1325
1335
|
if (x.DEBUG)
|
|
1326
|
-
throw Error(Ge + "Not a" + (
|
|
1336
|
+
throw Error(Ge + "Not a" + (T ? " base " + T : "") + " number: " + I);
|
|
1327
1337
|
O.s = null;
|
|
1328
1338
|
}
|
|
1329
1339
|
O.c = O.e = null;
|
|
1330
1340
|
};
|
|
1331
1341
|
}();
|
|
1332
1342
|
function F(b, g, v, N) {
|
|
1333
|
-
var
|
|
1343
|
+
var A, O, I, y, T, $, P, M = b.c, D = Ai;
|
|
1334
1344
|
if (M) {
|
|
1335
1345
|
e: {
|
|
1336
|
-
for (
|
|
1337
|
-
if (O = g -
|
|
1338
|
-
O += se, I = g,
|
|
1346
|
+
for (A = 1, y = M[0]; y >= 10; y /= 10, A++) ;
|
|
1347
|
+
if (O = g - A, O < 0)
|
|
1348
|
+
O += se, I = g, T = M[$ = 0], P = ht(T / D[A - I - 1] % 10);
|
|
1339
1349
|
else if ($ = $i((O + 1) / se), $ >= M.length)
|
|
1340
1350
|
if (N) {
|
|
1341
1351
|
for (; M.length <= $; M.push(0)) ;
|
|
1342
|
-
|
|
1352
|
+
T = P = 0, A = 1, O %= se, I = O - se + 1;
|
|
1343
1353
|
} else
|
|
1344
1354
|
break e;
|
|
1345
1355
|
else {
|
|
1346
|
-
for (
|
|
1347
|
-
O %= se, I = O - se +
|
|
1356
|
+
for (T = y = M[$], A = 1; y >= 10; y /= 10, A++) ;
|
|
1357
|
+
O %= se, I = O - se + A, P = I < 0 ? 0 : ht(T / D[A - I - 1] % 10);
|
|
1348
1358
|
}
|
|
1349
1359
|
if (N = N || g < 0 || // Are there any non-zero digits after the rounding digit?
|
|
1350
1360
|
// The expression n % pows10[d - j - 1] returns all digits of n to the right
|
|
1351
1361
|
// of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
|
|
1352
|
-
M[$ + 1] != null || (I < 0 ?
|
|
1353
|
-
(O > 0 ? I > 0 ?
|
|
1362
|
+
M[$ + 1] != null || (I < 0 ? T : T % D[A - I - 1]), N = v < 4 ? (P || N) && (v == 0 || v == (b.s < 0 ? 3 : 2)) : P > 5 || P == 5 && (v == 4 || N || v == 6 && // Check whether the digit to the left of the rounding digit is odd.
|
|
1363
|
+
(O > 0 ? I > 0 ? T / D[A - I] : 0 : M[$ - 1]) % 10 & 1 || v == (b.s < 0 ? 8 : 7)), g < 1 || !M[0])
|
|
1354
1364
|
return M.length = 0, N ? (g -= b.e + 1, M[0] = D[(se - g % se) % se], b.e = -g || 0) : M[0] = b.e = 0, b;
|
|
1355
|
-
if (O == 0 ? (M.length = $, y = 1, $--) : (M.length = $ + 1, y = D[se - O], M[$] = I > 0 ? ht(
|
|
1365
|
+
if (O == 0 ? (M.length = $, y = 1, $--) : (M.length = $ + 1, y = D[se - O], M[$] = I > 0 ? ht(T / D[A - I] % D[I]) * y : 0), N)
|
|
1356
1366
|
for (; ; )
|
|
1357
1367
|
if ($ == 0) {
|
|
1358
1368
|
for (O = 1, I = M[0]; I >= 10; I /= 10, O++) ;
|
|
@@ -1377,66 +1387,66 @@ function ud(e) {
|
|
|
1377
1387
|
var b = new x(this);
|
|
1378
1388
|
return b.s < 0 && (b.s = 1), b;
|
|
1379
1389
|
}, o.comparedTo = function(b, g) {
|
|
1380
|
-
return
|
|
1390
|
+
return Ln(this, new x(b, g));
|
|
1381
1391
|
}, o.decimalPlaces = o.dp = function(b, g) {
|
|
1382
|
-
var v, N,
|
|
1392
|
+
var v, N, A, O = this;
|
|
1383
1393
|
if (b != null)
|
|
1384
1394
|
return xe(b, 0, Ce), g == null ? g = c : xe(g, 0, 8), F(new x(O), b + O.e + 1, g);
|
|
1385
1395
|
if (!(v = O.c)) return null;
|
|
1386
|
-
if (N = ((
|
|
1396
|
+
if (N = ((A = v.length - 1) - mt(this.e / se)) * se, A = v[A]) for (; A % 10 == 0; A /= 10, N--) ;
|
|
1387
1397
|
return N < 0 && (N = 0), N;
|
|
1388
1398
|
}, o.dividedBy = o.div = function(b, g) {
|
|
1389
1399
|
return t(this, new x(b, g), i, c);
|
|
1390
1400
|
}, o.dividedToIntegerBy = o.idiv = function(b, g) {
|
|
1391
1401
|
return t(this, new x(b, g), 0, 1);
|
|
1392
1402
|
}, o.exponentiatedBy = o.pow = function(b, g) {
|
|
1393
|
-
var v, N,
|
|
1403
|
+
var v, N, A, O, I, y, T, $, P, M = this;
|
|
1394
1404
|
if (b = new x(b), b.c && !b.isInteger())
|
|
1395
1405
|
throw Error(Ge + "Exponent not an integer: " + L(b));
|
|
1396
1406
|
if (g != null && (g = new x(g)), y = b.e > 14, !M.c || !M.c[0] || M.c[0] == 1 && !M.e && M.c.length == 1 || !b.c || !b.c[0])
|
|
1397
1407
|
return P = new x(Math.pow(+L(M), y ? b.s * (2 - Ko(b)) : +L(b))), g ? P.mod(g) : P;
|
|
1398
|
-
if (
|
|
1408
|
+
if (T = b.s < 0, g) {
|
|
1399
1409
|
if (g.c ? !g.c[0] : !g.s) return new x(NaN);
|
|
1400
|
-
N = !
|
|
1410
|
+
N = !T && M.isInteger() && g.isInteger(), N && (M = M.mod(g));
|
|
1401
1411
|
} else {
|
|
1402
1412
|
if (b.e > 9 && (M.e > 0 || M.e < -1 || (M.e == 0 ? M.c[0] > 1 || y && M.c[1] >= 24e7 : M.c[0] < 8e13 || y && M.c[0] <= 9999975e7)))
|
|
1403
|
-
return O = M.s < 0 && Ko(b) ? -0 : 0, M.e > -1 && (O = 1 / O), new x(
|
|
1413
|
+
return O = M.s < 0 && Ko(b) ? -0 : 0, M.e > -1 && (O = 1 / O), new x(T ? 1 / O : O);
|
|
1404
1414
|
h && (O = $i(h / se + 2));
|
|
1405
1415
|
}
|
|
1406
|
-
for (y ? (v = new x(0.5),
|
|
1416
|
+
for (y ? (v = new x(0.5), T && (b.s = 1), $ = Ko(b)) : (A = Math.abs(+L(b)), $ = A % 2), P = new x(s); ; ) {
|
|
1407
1417
|
if ($) {
|
|
1408
1418
|
if (P = P.times(M), !P.c) break;
|
|
1409
1419
|
O ? P.c.length > O && (P.c.length = O) : N && (P = P.mod(g));
|
|
1410
1420
|
}
|
|
1411
|
-
if (
|
|
1412
|
-
if (
|
|
1413
|
-
$ =
|
|
1421
|
+
if (A) {
|
|
1422
|
+
if (A = ht(A / 2), A === 0) break;
|
|
1423
|
+
$ = A % 2;
|
|
1414
1424
|
} else if (b = b.times(v), F(b, b.e + 1, 1), b.e > 14)
|
|
1415
1425
|
$ = Ko(b);
|
|
1416
1426
|
else {
|
|
1417
|
-
if (
|
|
1418
|
-
$ =
|
|
1427
|
+
if (A = +L(b), A === 0) break;
|
|
1428
|
+
$ = A % 2;
|
|
1419
1429
|
}
|
|
1420
1430
|
M = M.times(M), O ? M.c && M.c.length > O && (M.c.length = O) : N && (M = M.mod(g));
|
|
1421
1431
|
}
|
|
1422
|
-
return N ? P : (
|
|
1432
|
+
return N ? P : (T && (P = s.div(P)), g ? P.mod(g) : O ? F(P, h, c, I) : P);
|
|
1423
1433
|
}, o.integerValue = function(b) {
|
|
1424
1434
|
var g = new x(this);
|
|
1425
1435
|
return b == null ? b = c : xe(b, 0, 8), F(g, g.e + 1, b);
|
|
1426
1436
|
}, o.isEqualTo = o.eq = function(b, g) {
|
|
1427
|
-
return
|
|
1437
|
+
return Ln(this, new x(b, g)) === 0;
|
|
1428
1438
|
}, o.isFinite = function() {
|
|
1429
1439
|
return !!this.c;
|
|
1430
1440
|
}, o.isGreaterThan = o.gt = function(b, g) {
|
|
1431
|
-
return
|
|
1441
|
+
return Ln(this, new x(b, g)) > 0;
|
|
1432
1442
|
}, o.isGreaterThanOrEqualTo = o.gte = function(b, g) {
|
|
1433
|
-
return (g =
|
|
1443
|
+
return (g = Ln(this, new x(b, g))) === 1 || g === 0;
|
|
1434
1444
|
}, o.isInteger = function() {
|
|
1435
1445
|
return !!this.c && mt(this.e / se) > this.c.length - 2;
|
|
1436
1446
|
}, o.isLessThan = o.lt = function(b, g) {
|
|
1437
|
-
return
|
|
1447
|
+
return Ln(this, new x(b, g)) < 0;
|
|
1438
1448
|
}, o.isLessThanOrEqualTo = o.lte = function(b, g) {
|
|
1439
|
-
return (g =
|
|
1449
|
+
return (g = Ln(this, new x(b, g))) === -1 || g === 0;
|
|
1440
1450
|
}, o.isNaN = function() {
|
|
1441
1451
|
return !this.s;
|
|
1442
1452
|
}, o.isNegative = function() {
|
|
@@ -1446,12 +1456,12 @@ function ud(e) {
|
|
|
1446
1456
|
}, o.isZero = function() {
|
|
1447
1457
|
return !!this.c && this.c[0] == 0;
|
|
1448
1458
|
}, o.minus = function(b, g) {
|
|
1449
|
-
var v, N,
|
|
1459
|
+
var v, N, A, O, I = this, y = I.s;
|
|
1450
1460
|
if (b = new x(b, g), g = b.s, !y || !g) return new x(NaN);
|
|
1451
1461
|
if (y != g)
|
|
1452
1462
|
return b.s = -g, I.plus(b);
|
|
1453
|
-
var
|
|
1454
|
-
if (!
|
|
1463
|
+
var T = I.e / se, $ = b.e / se, P = I.c, M = b.c;
|
|
1464
|
+
if (!T || !$) {
|
|
1455
1465
|
if (!P || !M) return P ? (b.s = -g, b) : new x(M ? I : NaN);
|
|
1456
1466
|
if (!P[0] || !M[0])
|
|
1457
1467
|
return M[0] ? (b.s = -g, b) : new x(P[0] ? I : (
|
|
@@ -1459,16 +1469,16 @@ function ud(e) {
|
|
|
1459
1469
|
c == 3 ? -0 : 0
|
|
1460
1470
|
));
|
|
1461
1471
|
}
|
|
1462
|
-
if (
|
|
1463
|
-
for ((O = y < 0) ? (y = -y,
|
|
1464
|
-
|
|
1472
|
+
if (T = mt(T), $ = mt($), P = P.slice(), y = T - $) {
|
|
1473
|
+
for ((O = y < 0) ? (y = -y, A = P) : ($ = T, A = M), A.reverse(), g = y; g--; A.push(0)) ;
|
|
1474
|
+
A.reverse();
|
|
1465
1475
|
} else
|
|
1466
1476
|
for (N = (O = (y = P.length) < (g = M.length)) ? y : g, y = g = 0; g < N; g++)
|
|
1467
1477
|
if (P[g] != M[g]) {
|
|
1468
1478
|
O = P[g] < M[g];
|
|
1469
1479
|
break;
|
|
1470
1480
|
}
|
|
1471
|
-
if (O && (
|
|
1481
|
+
if (O && (A = P, P = M, M = A, b.s = -b.s), g = (N = M.length) - (v = P.length), g > 0) for (; g--; P[v++] = 0) ;
|
|
1472
1482
|
for (g = St - 1; N > y; ) {
|
|
1473
1483
|
if (P[--N] < M[N]) {
|
|
1474
1484
|
for (v = N; v && !P[--v]; P[v] = g) ;
|
|
@@ -1479,15 +1489,15 @@ function ud(e) {
|
|
|
1479
1489
|
for (; P[0] == 0; P.splice(0, 1), --$) ;
|
|
1480
1490
|
return P[0] ? B(b, P, $) : (b.s = c == 3 ? -1 : 1, b.c = [b.e = 0], b);
|
|
1481
1491
|
}, o.modulo = o.mod = function(b, g) {
|
|
1482
|
-
var v, N,
|
|
1483
|
-
return b = new x(b, g), !
|
|
1492
|
+
var v, N, A = this;
|
|
1493
|
+
return b = new x(b, g), !A.c || !b.s || b.c && !b.c[0] ? new x(NaN) : !b.c || A.c && !A.c[0] ? new x(A) : (d == 9 ? (N = b.s, b.s = 1, v = t(A, b, 0, 3), b.s = N, v.s *= N) : v = t(A, b, 0, d), b = A.minus(v.times(b)), !b.c[0] && d == 1 && (b.s = A.s), b);
|
|
1484
1494
|
}, o.multipliedBy = o.times = function(b, g) {
|
|
1485
|
-
var v, N,
|
|
1495
|
+
var v, N, A, O, I, y, T, $, P, M, D, _, j, H, K, V = this, z = V.c, q = (b = new x(b, g)).c;
|
|
1486
1496
|
if (!z || !q || !z[0] || !q[0])
|
|
1487
1497
|
return !V.s || !b.s || z && !z[0] && !q || q && !q[0] && !z ? b.c = b.e = b.s = null : (b.s *= V.s, !z || !q ? b.c = b.e = null : (b.c = [0], b.e = 0)), b;
|
|
1488
|
-
for (N = mt(V.e / se) + mt(b.e / se), b.s *= V.s,
|
|
1489
|
-
for (H = St, K = yn,
|
|
1490
|
-
for (v = 0, D = q[
|
|
1498
|
+
for (N = mt(V.e / se) + mt(b.e / se), b.s *= V.s, T = z.length, M = q.length, T < M && (j = z, z = q, q = j, A = T, T = M, M = A), A = T + M, j = []; A--; j.push(0)) ;
|
|
1499
|
+
for (H = St, K = yn, A = M; --A >= 0; ) {
|
|
1500
|
+
for (v = 0, D = q[A] % K, _ = q[A] / K | 0, I = T, O = A + I; O > A; )
|
|
1491
1501
|
$ = z[--I] % K, P = z[I] / K | 0, y = _ * $ + P * D, $ = D * $ + y % K * K + j[O] + v, v = ($ / H | 0) + (y / K | 0) + _ * P, j[O--] = $ % H;
|
|
1492
1502
|
j[O] = v;
|
|
1493
1503
|
}
|
|
@@ -1496,44 +1506,44 @@ function ud(e) {
|
|
|
1496
1506
|
var b = new x(this);
|
|
1497
1507
|
return b.s = -b.s || null, b;
|
|
1498
1508
|
}, o.plus = function(b, g) {
|
|
1499
|
-
var v, N = this,
|
|
1500
|
-
if (b = new x(b, g), g = b.s, !
|
|
1501
|
-
if (
|
|
1509
|
+
var v, N = this, A = N.s;
|
|
1510
|
+
if (b = new x(b, g), g = b.s, !A || !g) return new x(NaN);
|
|
1511
|
+
if (A != g)
|
|
1502
1512
|
return b.s = -g, N.minus(b);
|
|
1503
|
-
var O = N.e / se, I = b.e / se, y = N.c,
|
|
1513
|
+
var O = N.e / se, I = b.e / se, y = N.c, T = b.c;
|
|
1504
1514
|
if (!O || !I) {
|
|
1505
|
-
if (!y || !
|
|
1506
|
-
if (!y[0] || !
|
|
1515
|
+
if (!y || !T) return new x(A / 0);
|
|
1516
|
+
if (!y[0] || !T[0]) return T[0] ? b : new x(y[0] ? N : A * 0);
|
|
1507
1517
|
}
|
|
1508
|
-
if (O = mt(O), I = mt(I), y = y.slice(),
|
|
1509
|
-
for (
|
|
1518
|
+
if (O = mt(O), I = mt(I), y = y.slice(), A = O - I) {
|
|
1519
|
+
for (A > 0 ? (I = O, v = T) : (A = -A, v = y), v.reverse(); A--; v.push(0)) ;
|
|
1510
1520
|
v.reverse();
|
|
1511
1521
|
}
|
|
1512
|
-
for (
|
|
1513
|
-
|
|
1514
|
-
return
|
|
1522
|
+
for (A = y.length, g = T.length, A - g < 0 && (v = T, T = y, y = v, g = A), A = 0; g; )
|
|
1523
|
+
A = (y[--g] = y[g] + T[g] + A) / St | 0, y[g] = St === y[g] ? 0 : y[g] % St;
|
|
1524
|
+
return A && (y = [A].concat(y), ++I), B(b, y, I);
|
|
1515
1525
|
}, o.precision = o.sd = function(b, g) {
|
|
1516
|
-
var v, N,
|
|
1526
|
+
var v, N, A, O = this;
|
|
1517
1527
|
if (b != null && b !== !!b)
|
|
1518
1528
|
return xe(b, 1, Ce), g == null ? g = c : xe(g, 0, 8), F(new x(O), b, g);
|
|
1519
1529
|
if (!(v = O.c)) return null;
|
|
1520
|
-
if (
|
|
1521
|
-
for (;
|
|
1522
|
-
for (
|
|
1530
|
+
if (A = v.length - 1, N = A * se + 1, A = v[A]) {
|
|
1531
|
+
for (; A % 10 == 0; A /= 10, N--) ;
|
|
1532
|
+
for (A = v[0]; A >= 10; A /= 10, N++) ;
|
|
1523
1533
|
}
|
|
1524
1534
|
return b && O.e + 1 > N && (N = O.e + 1), N;
|
|
1525
1535
|
}, o.shiftedBy = function(b) {
|
|
1526
|
-
return xe(b, -
|
|
1536
|
+
return xe(b, -Ti, Ti), this.times("1e" + b);
|
|
1527
1537
|
}, o.squareRoot = o.sqrt = function() {
|
|
1528
|
-
var b, g, v, N,
|
|
1538
|
+
var b, g, v, N, A, O = this, I = O.c, y = O.s, T = O.e, $ = i + 4, P = new x("0.5");
|
|
1529
1539
|
if (y !== 1 || !I || !I[0])
|
|
1530
1540
|
return new x(!y || y < 0 && (!I || I[0]) ? NaN : I ? O : 1 / 0);
|
|
1531
|
-
if (y = Math.sqrt(+L(O)), y == 0 || y == 1 / 0 ? (g = ft(I), (g.length +
|
|
1532
|
-
for (
|
|
1533
|
-
if (
|
|
1534
|
-
if (v.e <
|
|
1535
|
-
if (!N && (F(
|
|
1536
|
-
v =
|
|
1541
|
+
if (y = Math.sqrt(+L(O)), y == 0 || y == 1 / 0 ? (g = ft(I), (g.length + T) % 2 == 0 && (g += "0"), y = Math.sqrt(+g), T = mt((T + 1) / 2) - (T < 0 || T % 2), y == 1 / 0 ? g = "5e" + T : (g = y.toExponential(), g = g.slice(0, g.indexOf("e") + 1) + T), v = new x(g)) : v = new x(y + ""), v.c[0]) {
|
|
1542
|
+
for (T = v.e, y = T + $, y < 3 && (y = 0); ; )
|
|
1543
|
+
if (A = v, v = P.times(A.plus(t(O, A, $, 1))), ft(A.c).slice(0, y) === (g = ft(v.c)).slice(0, y))
|
|
1544
|
+
if (v.e < T && --y, g = g.slice(y - 3, y + 1), g == "9999" || !N && g == "4999") {
|
|
1545
|
+
if (!N && (F(A, A.e + i + 2, 0), A.times(A).eq(O))) {
|
|
1546
|
+
v = A;
|
|
1537
1547
|
break;
|
|
1538
1548
|
}
|
|
1539
1549
|
$ += 4, y += 4, N = 1;
|
|
@@ -1548,40 +1558,40 @@ function ud(e) {
|
|
|
1548
1558
|
}, o.toFixed = function(b, g) {
|
|
1549
1559
|
return b != null && (xe(b, 0, Ce), b = b + this.e + 1), E(this, b, g);
|
|
1550
1560
|
}, o.toFormat = function(b, g, v) {
|
|
1551
|
-
var N,
|
|
1561
|
+
var N, A = this;
|
|
1552
1562
|
if (v == null)
|
|
1553
1563
|
b != null && g && typeof g == "object" ? (v = g, g = null) : b && typeof b == "object" ? (v = b, b = g = null) : v = m;
|
|
1554
1564
|
else if (typeof v != "object")
|
|
1555
1565
|
throw Error(Ge + "Argument not an object: " + v);
|
|
1556
|
-
if (N =
|
|
1557
|
-
var O, I = N.split("."), y = +v.groupSize,
|
|
1558
|
-
if (
|
|
1566
|
+
if (N = A.toFixed(b, g), A.c) {
|
|
1567
|
+
var O, I = N.split("."), y = +v.groupSize, T = +v.secondaryGroupSize, $ = v.groupSeparator || "", P = I[0], M = I[1], D = A.s < 0, _ = D ? P.slice(1) : P, j = _.length;
|
|
1568
|
+
if (T && (O = y, y = T, T = O, j -= O), y > 0 && j > 0) {
|
|
1559
1569
|
for (O = j % y || y, P = _.substr(0, O); O < j; O += y) P += $ + _.substr(O, y);
|
|
1560
|
-
|
|
1570
|
+
T > 0 && (P += $ + _.slice(O)), D && (P = "-" + P);
|
|
1561
1571
|
}
|
|
1562
|
-
N = M ? P + (v.decimalSeparator || "") + ((
|
|
1563
|
-
new RegExp("\\d{" +
|
|
1572
|
+
N = M ? P + (v.decimalSeparator || "") + ((T = +v.fractionGroupSize) ? M.replace(
|
|
1573
|
+
new RegExp("\\d{" + T + "}\\B", "g"),
|
|
1564
1574
|
"$&" + (v.fractionGroupSeparator || "")
|
|
1565
1575
|
) : M) : P;
|
|
1566
1576
|
}
|
|
1567
1577
|
return (v.prefix || "") + N + (v.suffix || "");
|
|
1568
1578
|
}, o.toFraction = function(b) {
|
|
1569
|
-
var g, v, N,
|
|
1579
|
+
var g, v, N, A, O, I, y, T, $, P, M, D, _ = this, j = _.c;
|
|
1570
1580
|
if (b != null && (y = new x(b), !y.isInteger() && (y.c || y.s !== 1) || y.lt(s)))
|
|
1571
1581
|
throw Error(Ge + "Argument " + (y.isInteger() ? "out of range: " : "not an integer: ") + L(y));
|
|
1572
1582
|
if (!j) return new x(_);
|
|
1573
|
-
for (g = new x(s), $ = v = new x(s), N =
|
|
1574
|
-
v = N, N =
|
|
1575
|
-
return
|
|
1576
|
-
t(
|
|
1577
|
-
) < 1 ? [$, N] : [
|
|
1583
|
+
for (g = new x(s), $ = v = new x(s), N = T = new x(s), D = ft(j), O = g.e = D.length - _.e - 1, g.c[0] = Ai[(I = O % se) < 0 ? se + I : I], b = !b || y.comparedTo(g) > 0 ? O > 0 ? g : $ : y, I = f, f = 1 / 0, y = new x(D), T.c[0] = 0; P = t(y, g, 0, 1), A = v.plus(P.times(N)), A.comparedTo(b) != 1; )
|
|
1584
|
+
v = N, N = A, $ = T.plus(P.times(A = $)), T = A, g = y.minus(P.times(A = g)), y = A;
|
|
1585
|
+
return A = t(b.minus(v), N, 0, 1), T = T.plus(A.times($)), v = v.plus(A.times(N)), T.s = $.s = _.s, O = O * 2, M = t($, N, O, c).minus(_).abs().comparedTo(
|
|
1586
|
+
t(T, v, O, c).minus(_).abs()
|
|
1587
|
+
) < 1 ? [$, N] : [T, v], f = I, M;
|
|
1578
1588
|
}, o.toNumber = function() {
|
|
1579
1589
|
return +L(this);
|
|
1580
1590
|
}, o.toPrecision = function(b, g) {
|
|
1581
1591
|
return b != null && xe(b, 1, Ce), E(this, b, g, 2);
|
|
1582
1592
|
}, o.toString = function(b) {
|
|
1583
|
-
var g, v = this, N = v.s,
|
|
1584
|
-
return
|
|
1593
|
+
var g, v = this, N = v.s, A = v.e;
|
|
1594
|
+
return A === null ? N ? (g = "Infinity", N < 0 && (g = "-" + g)) : g = "NaN" : (b == null ? g = A <= a || A >= u ? Xo(ft(v.c), A) : Xt(ft(v.c), A, "0") : b === 10 && S ? (v = F(new x(v), i + A + 1, c), g = Xt(ft(v.c), v.e, "0")) : (xe(b, 2, w.length, "Base"), g = n(Xt(ft(v.c), A, "0"), 10, b, N, !0)), N < 0 && v.c[0] && (g = "-" + g)), g;
|
|
1585
1595
|
}, o.valueOf = o.toJSON = function() {
|
|
1586
1596
|
return L(this);
|
|
1587
1597
|
}, o._isBigNumber = !0, o[Symbol.toStringTag] = "BigNumber", o[Symbol.for("nodejs.util.inspect.custom")] = o.valueOf, e != null && x.set(e), x;
|
|
@@ -1598,7 +1608,7 @@ function ft(e) {
|
|
|
1598
1608
|
for (o = s.length; s.charCodeAt(--o) === 48; ) ;
|
|
1599
1609
|
return s.slice(0, o + 1 || 1);
|
|
1600
1610
|
}
|
|
1601
|
-
function
|
|
1611
|
+
function Ln(e, t) {
|
|
1602
1612
|
var n, r, o = e.c, s = t.c, i = e.s, c = t.s, a = e.e, u = t.e;
|
|
1603
1613
|
if (!i || !c) return null;
|
|
1604
1614
|
if (n = o && !o[0], r = s && !s[0], n || r) return n ? r ? 0 : -c : i;
|
|
@@ -1812,10 +1822,10 @@ function $1(e) {
|
|
|
1812
1822
|
return hn(gd, e);
|
|
1813
1823
|
}
|
|
1814
1824
|
const yd = /^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;
|
|
1815
|
-
function
|
|
1825
|
+
function T1(e) {
|
|
1816
1826
|
return yd.test(e);
|
|
1817
1827
|
}
|
|
1818
|
-
function
|
|
1828
|
+
function A1(e) {
|
|
1819
1829
|
return hn(yd, e);
|
|
1820
1830
|
}
|
|
1821
1831
|
const R1 = /^receive\(\) external payable$/;
|
|
@@ -2095,7 +2105,7 @@ function wa(e, t = {}) {
|
|
|
2095
2105
|
return q1(e, t);
|
|
2096
2106
|
if (S1(e))
|
|
2097
2107
|
return Z1(e, t);
|
|
2098
|
-
if (
|
|
2108
|
+
if (T1(e))
|
|
2099
2109
|
return Y1(e);
|
|
2100
2110
|
if (N1(e))
|
|
2101
2111
|
return {
|
|
@@ -2169,7 +2179,7 @@ function Z1(e, t = {}) {
|
|
|
2169
2179
|
};
|
|
2170
2180
|
}
|
|
2171
2181
|
function Y1(e) {
|
|
2172
|
-
const t =
|
|
2182
|
+
const t = A1(e);
|
|
2173
2183
|
if (!t)
|
|
2174
2184
|
throw new Ir({ signature: e, type: "fallback" });
|
|
2175
2185
|
return {
|
|
@@ -2383,7 +2393,7 @@ function rb(e, { includeName: t }) {
|
|
|
2383
2393
|
function Vt(e, { strict: t = !0 } = {}) {
|
|
2384
2394
|
return !e || typeof e != "string" ? !1 : t ? /^0x[0-9a-fA-F]*$/.test(e) : e.startsWith("0x");
|
|
2385
2395
|
}
|
|
2386
|
-
function
|
|
2396
|
+
function Te(e) {
|
|
2387
2397
|
return Vt(e, { strict: !1 }) ? Math.ceil((e.length - 2) / 2) : e.length;
|
|
2388
2398
|
}
|
|
2389
2399
|
const Ed = "2.42.1";
|
|
@@ -2514,7 +2524,7 @@ class sb extends W {
|
|
|
2514
2524
|
}
|
|
2515
2525
|
class ib extends W {
|
|
2516
2526
|
constructor({ expectedSize: t, value: n }) {
|
|
2517
|
-
super(`Size of bytes "${n}" (bytes${
|
|
2527
|
+
super(`Size of bytes "${n}" (bytes${Te(n)}) does not match expected size (bytes${t}).`, { name: "AbiEncodingBytesSizeMismatchError" });
|
|
2518
2528
|
}
|
|
2519
2529
|
}
|
|
2520
2530
|
class ab extends W {
|
|
@@ -2615,7 +2625,7 @@ class Sr extends W {
|
|
|
2615
2625
|
});
|
|
2616
2626
|
}
|
|
2617
2627
|
}
|
|
2618
|
-
class
|
|
2628
|
+
class Td extends W {
|
|
2619
2629
|
constructor(t, { docsPath: n }) {
|
|
2620
2630
|
super([
|
|
2621
2631
|
`Function "${t}" does not contain any \`outputs\` on ABI.`,
|
|
@@ -2727,7 +2737,7 @@ class mb extends W {
|
|
|
2727
2737
|
`), { docsPath: n, name: "InvalidAbiDecodingType" });
|
|
2728
2738
|
}
|
|
2729
2739
|
}
|
|
2730
|
-
let
|
|
2740
|
+
let Ad = class extends W {
|
|
2731
2741
|
constructor(t) {
|
|
2732
2742
|
super([`Value "${t}" is not a valid array.`].join(`
|
|
2733
2743
|
`), {
|
|
@@ -2817,16 +2827,16 @@ let xb = class extends W {
|
|
|
2817
2827
|
super(`Size cannot exceed ${n} bytes. Given size: ${t} bytes.`, { name: "SizeOverflowError" });
|
|
2818
2828
|
}
|
|
2819
2829
|
};
|
|
2820
|
-
function
|
|
2830
|
+
function Un(e, { dir: t = "left" } = {}) {
|
|
2821
2831
|
let n = typeof e == "string" ? e.replace("0x", "") : e, r = 0;
|
|
2822
2832
|
for (let o = 0; o < n.length - 1 && n[t === "left" ? o : n.length - o - 1].toString() === "0"; o++)
|
|
2823
2833
|
r++;
|
|
2824
2834
|
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;
|
|
2825
2835
|
}
|
|
2826
2836
|
function Mt(e, { size: t }) {
|
|
2827
|
-
if (
|
|
2837
|
+
if (Te(e) > t)
|
|
2828
2838
|
throw new xb({
|
|
2829
|
-
givenSize:
|
|
2839
|
+
givenSize: Te(e),
|
|
2830
2840
|
maxSize: t
|
|
2831
2841
|
});
|
|
2832
2842
|
}
|
|
@@ -2841,9 +2851,9 @@ function Gt(e, t = {}) {
|
|
|
2841
2851
|
}
|
|
2842
2852
|
function Eb(e, t = {}) {
|
|
2843
2853
|
let n = e;
|
|
2844
|
-
if (t.size && (Mt(n, { size: t.size }), n =
|
|
2854
|
+
if (t.size && (Mt(n, { size: t.size }), n = Un(n)), Un(n) === "0x00")
|
|
2845
2855
|
return !1;
|
|
2846
|
-
if (
|
|
2856
|
+
if (Un(n) === "0x01")
|
|
2847
2857
|
return !0;
|
|
2848
2858
|
throw new vb(n);
|
|
2849
2859
|
}
|
|
@@ -2851,7 +2861,7 @@ function ln(e, t = {}) {
|
|
|
2851
2861
|
return Number(Gt(e, t));
|
|
2852
2862
|
}
|
|
2853
2863
|
const Pb = /* @__PURE__ */ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
|
|
2854
|
-
function
|
|
2864
|
+
function Rn(e, t = {}) {
|
|
2855
2865
|
return typeof e == "number" || typeof e == "bigint" ? J(e, t) : typeof e == "string" ? to(e, t) : typeof e == "boolean" ? Id(e, t) : Ie(e, t);
|
|
2856
2866
|
}
|
|
2857
2867
|
function Id(e, t = {}) {
|
|
@@ -2890,9 +2900,9 @@ function to(e, t = {}) {
|
|
|
2890
2900
|
}
|
|
2891
2901
|
const $b = /* @__PURE__ */ new TextEncoder();
|
|
2892
2902
|
function Br(e, t = {}) {
|
|
2893
|
-
return typeof e == "number" || typeof e == "bigint" ?
|
|
2903
|
+
return typeof e == "number" || typeof e == "bigint" ? Ab(e, t) : typeof e == "boolean" ? Tb(e, t) : Vt(e) ? qt(e, t) : zn(e, t);
|
|
2894
2904
|
}
|
|
2895
|
-
function
|
|
2905
|
+
function Tb(e, t = {}) {
|
|
2896
2906
|
const n = new Uint8Array(1);
|
|
2897
2907
|
return n[0] = Number(e), typeof t.size == "number" ? (Mt(n, { size: t.size }), Cr(n, { size: t.size })) : n;
|
|
2898
2908
|
}
|
|
@@ -2926,11 +2936,11 @@ function qt(e, t = {}) {
|
|
|
2926
2936
|
}
|
|
2927
2937
|
return s;
|
|
2928
2938
|
}
|
|
2929
|
-
function
|
|
2939
|
+
function Ab(e, t) {
|
|
2930
2940
|
const n = J(e, t);
|
|
2931
2941
|
return qt(n);
|
|
2932
2942
|
}
|
|
2933
|
-
function
|
|
2943
|
+
function zn(e, t = {}) {
|
|
2934
2944
|
const n = $b.encode(e);
|
|
2935
2945
|
return typeof t.size == "number" ? (Mt(n, { size: t.size }), Cr(n, { dir: "right", size: t.size })) : n;
|
|
2936
2946
|
}
|
|
@@ -2982,7 +2992,7 @@ function Cd(e, t) {
|
|
|
2982
2992
|
function Lb(e) {
|
|
2983
2993
|
return new Uint32Array(e.buffer, e.byteOffset, Math.floor(e.byteLength / 4));
|
|
2984
2994
|
}
|
|
2985
|
-
function
|
|
2995
|
+
function Tr(...e) {
|
|
2986
2996
|
for (let t = 0; t < e.length; t++)
|
|
2987
2997
|
e[t].fill(0);
|
|
2988
2998
|
}
|
|
@@ -3068,7 +3078,7 @@ function Kb(e, t = 24) {
|
|
|
3068
3078
|
}
|
|
3069
3079
|
e[0] ^= Zb[r], e[1] ^= Yb[r];
|
|
3070
3080
|
}
|
|
3071
|
-
|
|
3081
|
+
Tr(n);
|
|
3072
3082
|
}
|
|
3073
3083
|
class Cc extends Ic {
|
|
3074
3084
|
// NOTE: we accept arguments in bytes instead of bits here.
|
|
@@ -3128,7 +3138,7 @@ class Cc extends Ic {
|
|
|
3128
3138
|
return this.digestInto(new Uint8Array(this.outputLen));
|
|
3129
3139
|
}
|
|
3130
3140
|
destroy() {
|
|
3131
|
-
this.destroyed = !0,
|
|
3141
|
+
this.destroyed = !0, Tr(this.state);
|
|
3132
3142
|
}
|
|
3133
3143
|
_cloneInto(t) {
|
|
3134
3144
|
const { blockLen: n, suffix: r, outputLen: o, rounds: s, enableXOF: i } = this;
|
|
@@ -3138,7 +3148,7 @@ class Cc extends Ic {
|
|
|
3138
3148
|
const Xb = (e, t, n) => Bd(() => new Cc(t, e, n)), Dd = Xb(1, 136, 256 / 8);
|
|
3139
3149
|
function Le(e, t) {
|
|
3140
3150
|
const n = t || "hex", r = Dd(Vt(e, { strict: !1 }) ? Br(e) : e);
|
|
3141
|
-
return n === "bytes" ? r :
|
|
3151
|
+
return n === "bytes" ? r : Rn(r);
|
|
3142
3152
|
}
|
|
3143
3153
|
const Qb = (e) => Le(Br(e));
|
|
3144
3154
|
function Jb(e) {
|
|
@@ -3177,7 +3187,7 @@ function jd(e) {
|
|
|
3177
3187
|
return Jb(tg(e));
|
|
3178
3188
|
}
|
|
3179
3189
|
const Us = jd;
|
|
3180
|
-
let
|
|
3190
|
+
let Nn = class extends W {
|
|
3181
3191
|
constructor({ address: t }) {
|
|
3182
3192
|
super(`Address "${t}" is invalid.`, {
|
|
3183
3193
|
metaMessages: [
|
|
@@ -3212,7 +3222,7 @@ const Oi = /* @__PURE__ */ new zs(8192);
|
|
|
3212
3222
|
function Hs(e, t) {
|
|
3213
3223
|
if (Oi.has(`${e}.${t}`))
|
|
3214
3224
|
return Oi.get(`${e}.${t}`);
|
|
3215
|
-
const n = e.substring(2).toLowerCase(), r = Le(
|
|
3225
|
+
const n = e.substring(2).toLowerCase(), r = Le(zn(n), "bytes"), o = n.split("");
|
|
3216
3226
|
for (let i = 0; i < 40; i += 2)
|
|
3217
3227
|
r[i >> 1] >> 4 >= 8 && o[i] && (o[i] = o[i].toUpperCase()), (r[i >> 1] & 15) >= 8 && o[i + 1] && (o[i + 1] = o[i + 1].toUpperCase());
|
|
3218
3228
|
const s = `0x${o.join("")}`;
|
|
@@ -3220,7 +3230,7 @@ function Hs(e, t) {
|
|
|
3220
3230
|
}
|
|
3221
3231
|
function $n(e, t) {
|
|
3222
3232
|
if (!vt(e, { strict: !1 }))
|
|
3223
|
-
throw new
|
|
3233
|
+
throw new Nn({ address: e });
|
|
3224
3234
|
return Hs(e, t);
|
|
3225
3235
|
}
|
|
3226
3236
|
const ng = /^0x[a-fA-F0-9]{40}$/, Ii = /* @__PURE__ */ new zs(8192);
|
|
@@ -3247,7 +3257,7 @@ function rg(e) {
|
|
|
3247
3257
|
function Mr(e) {
|
|
3248
3258
|
return `0x${e.reduce((t, n) => t + n.replace("0x", ""), "")}`;
|
|
3249
3259
|
}
|
|
3250
|
-
function
|
|
3260
|
+
function Ar(e, t, n, { strict: r } = {}) {
|
|
3251
3261
|
return Vt(e, { strict: !1 }) ? og(e, t, n, {
|
|
3252
3262
|
strict: r
|
|
3253
3263
|
}) : zd(e, t, n, {
|
|
@@ -3255,19 +3265,19 @@ function Tr(e, t, n, { strict: r } = {}) {
|
|
|
3255
3265
|
});
|
|
3256
3266
|
}
|
|
3257
3267
|
function _d(e, t) {
|
|
3258
|
-
if (typeof t == "number" && t > 0 && t >
|
|
3268
|
+
if (typeof t == "number" && t > 0 && t > Te(e) - 1)
|
|
3259
3269
|
throw new Rd({
|
|
3260
3270
|
offset: t,
|
|
3261
3271
|
position: "start",
|
|
3262
|
-
size:
|
|
3272
|
+
size: Te(e)
|
|
3263
3273
|
});
|
|
3264
3274
|
}
|
|
3265
3275
|
function Ud(e, t, n) {
|
|
3266
|
-
if (typeof t == "number" && typeof n == "number" &&
|
|
3276
|
+
if (typeof t == "number" && typeof n == "number" && Te(e) !== n - t)
|
|
3267
3277
|
throw new Rd({
|
|
3268
3278
|
offset: n,
|
|
3269
3279
|
position: "end",
|
|
3270
|
-
size:
|
|
3280
|
+
size: Te(e)
|
|
3271
3281
|
});
|
|
3272
3282
|
}
|
|
3273
3283
|
function zd(e, t, n, { strict: r } = {}) {
|
|
@@ -3332,25 +3342,25 @@ function Mc(e) {
|
|
|
3332
3342
|
let t = 0;
|
|
3333
3343
|
for (let s = 0; s < e.length; s++) {
|
|
3334
3344
|
const { dynamic: i, encoded: c } = e[s];
|
|
3335
|
-
i ? t += 32 : t +=
|
|
3345
|
+
i ? t += 32 : t += Te(c);
|
|
3336
3346
|
}
|
|
3337
3347
|
const n = [], r = [];
|
|
3338
3348
|
let o = 0;
|
|
3339
3349
|
for (let s = 0; s < e.length; s++) {
|
|
3340
3350
|
const { dynamic: i, encoded: c } = e[s];
|
|
3341
|
-
i ? (n.push(J(t + o, { size: 32 })), r.push(c), o +=
|
|
3351
|
+
i ? (n.push(J(t + o, { size: 32 })), r.push(c), o += Te(c)) : n.push(c);
|
|
3342
3352
|
}
|
|
3343
3353
|
return Zt([...n, ...r]);
|
|
3344
3354
|
}
|
|
3345
3355
|
function ag(e) {
|
|
3346
3356
|
if (!vt(e))
|
|
3347
|
-
throw new
|
|
3357
|
+
throw new Nn({ address: e });
|
|
3348
3358
|
return { dynamic: !1, encoded: Sn(e.toLowerCase()) };
|
|
3349
3359
|
}
|
|
3350
3360
|
function cg(e, { length: t, param: n }) {
|
|
3351
3361
|
const r = t === null;
|
|
3352
3362
|
if (!Array.isArray(e))
|
|
3353
|
-
throw new
|
|
3363
|
+
throw new Ad(e);
|
|
3354
3364
|
if (!r && e.length !== t)
|
|
3355
3365
|
throw new sb({
|
|
3356
3366
|
expectedLength: t,
|
|
@@ -3381,7 +3391,7 @@ function cg(e, { length: t, param: n }) {
|
|
|
3381
3391
|
};
|
|
3382
3392
|
}
|
|
3383
3393
|
function ug(e, { param: t }) {
|
|
3384
|
-
const [, n] = t.type.split("bytes"), r =
|
|
3394
|
+
const [, n] = t.type.split("bytes"), r = Te(e);
|
|
3385
3395
|
if (!n) {
|
|
3386
3396
|
let o = e;
|
|
3387
3397
|
return r % 32 !== 0 && (o = Sn(o, {
|
|
@@ -3425,15 +3435,15 @@ function fg(e, { signed: t, size: n = 256 }) {
|
|
|
3425
3435
|
};
|
|
3426
3436
|
}
|
|
3427
3437
|
function dg(e) {
|
|
3428
|
-
const t = to(e), n = Math.ceil(
|
|
3438
|
+
const t = to(e), n = Math.ceil(Te(t) / 32), r = [];
|
|
3429
3439
|
for (let o = 0; o < n; o++)
|
|
3430
|
-
r.push(Sn(
|
|
3440
|
+
r.push(Sn(Ar(t, o * 32, (o + 1) * 32), {
|
|
3431
3441
|
dir: "right"
|
|
3432
3442
|
}));
|
|
3433
3443
|
return {
|
|
3434
3444
|
dynamic: !0,
|
|
3435
3445
|
encoded: Zt([
|
|
3436
|
-
Sn(J(
|
|
3446
|
+
Sn(J(Te(t), { size: 32 })),
|
|
3437
3447
|
...r
|
|
3438
3448
|
])
|
|
3439
3449
|
};
|
|
@@ -3460,7 +3470,7 @@ function Fc(e) {
|
|
|
3460
3470
|
[t[2] ? Number(t[2]) : null, t[1]]
|
|
3461
3471
|
) : void 0;
|
|
3462
3472
|
}
|
|
3463
|
-
const Mo = (e) =>
|
|
3473
|
+
const Mo = (e) => Ar(jd(e), 0, 4);
|
|
3464
3474
|
function er(e) {
|
|
3465
3475
|
const { abi: t, args: n = [], name: r } = e, o = Vt(r, { strict: !1 }), s = t.filter((c) => o ? c.type === "function" ? Mo(c) === r : c.type === "event" ? Us(c) === r : !1 : "name" in c && c.name === r);
|
|
3466
3476
|
if (s.length === 0)
|
|
@@ -3798,7 +3808,7 @@ function wg(e, t = {}) {
|
|
|
3798
3808
|
}
|
|
3799
3809
|
function vg(e, t = {}) {
|
|
3800
3810
|
let n = e;
|
|
3801
|
-
if (typeof t.size < "u" && (Mt(n, { size: t.size }), n =
|
|
3811
|
+
if (typeof t.size < "u" && (Mt(n, { size: t.size }), n = Un(n)), n.length > 1 || n[0] > 1)
|
|
3802
3812
|
throw new wb(n);
|
|
3803
3813
|
return !!n[0];
|
|
3804
3814
|
}
|
|
@@ -3809,17 +3819,17 @@ function sn(e, t = {}) {
|
|
|
3809
3819
|
}
|
|
3810
3820
|
function xg(e, t = {}) {
|
|
3811
3821
|
let n = e;
|
|
3812
|
-
return typeof t.size < "u" && (Mt(n, { size: t.size }), n =
|
|
3822
|
+
return typeof t.size < "u" && (Mt(n, { size: t.size }), n = Un(n, { dir: "right" })), new TextDecoder().decode(n);
|
|
3813
3823
|
}
|
|
3814
3824
|
function Lo(e, t) {
|
|
3815
3825
|
const n = typeof t == "string" ? qt(t) : t, r = Lc(n);
|
|
3816
|
-
if (
|
|
3826
|
+
if (Te(n) === 0 && e.length > 0)
|
|
3817
3827
|
throw new Bo();
|
|
3818
|
-
if (
|
|
3828
|
+
if (Te(t) && Te(t) < 32)
|
|
3819
3829
|
throw new Sd({
|
|
3820
3830
|
data: typeof t == "string" ? t : Ie(t),
|
|
3821
3831
|
params: e,
|
|
3822
|
-
size:
|
|
3832
|
+
size: Te(t)
|
|
3823
3833
|
});
|
|
3824
3834
|
let o = 0;
|
|
3825
3835
|
const s = [];
|
|
@@ -3840,7 +3850,7 @@ function gr(e, t, { staticPosition: n }) {
|
|
|
3840
3850
|
return Pg(e, { ...t, type: s }, { length: o, staticPosition: n });
|
|
3841
3851
|
}
|
|
3842
3852
|
if (t.type === "tuple")
|
|
3843
|
-
return
|
|
3853
|
+
return Ag(e, t, { staticPosition: n });
|
|
3844
3854
|
if (t.type === "address")
|
|
3845
3855
|
return Eg(e);
|
|
3846
3856
|
if (t.type === "bool")
|
|
@@ -3848,7 +3858,7 @@ function gr(e, t, { staticPosition: n }) {
|
|
|
3848
3858
|
if (t.type.startsWith("bytes"))
|
|
3849
3859
|
return $g(e, t, { staticPosition: n });
|
|
3850
3860
|
if (t.type.startsWith("uint") || t.type.startsWith("int"))
|
|
3851
|
-
return
|
|
3861
|
+
return Tg(e, t);
|
|
3852
3862
|
if (t.type === "string")
|
|
3853
3863
|
return Rg(e, { staticPosition: n });
|
|
3854
3864
|
throw new mb(t.type, {
|
|
@@ -3913,14 +3923,14 @@ function $g(e, t, { staticPosition: n }) {
|
|
|
3913
3923
|
}
|
|
3914
3924
|
return [Ie(e.readBytes(Number.parseInt(o, 10), 32)), 32];
|
|
3915
3925
|
}
|
|
3916
|
-
function
|
|
3926
|
+
function Tg(e, t) {
|
|
3917
3927
|
const n = t.type.startsWith("int"), r = Number.parseInt(t.type.split("int")[1] || "256", 10), o = e.readBytes(32);
|
|
3918
3928
|
return [
|
|
3919
3929
|
r > 48 ? wg(o, { signed: n }) : sn(o, { signed: n }),
|
|
3920
3930
|
32
|
|
3921
3931
|
];
|
|
3922
3932
|
}
|
|
3923
|
-
function
|
|
3933
|
+
function Ag(e, t, { staticPosition: n }) {
|
|
3924
3934
|
const r = t.components.length === 0 || t.components.some(({ name: i }) => !i), o = r ? [] : {};
|
|
3925
3935
|
let s = 0;
|
|
3926
3936
|
if (ro(t)) {
|
|
@@ -3949,7 +3959,7 @@ function Rg(e, { staticPosition: t }) {
|
|
|
3949
3959
|
const o = sn(e.readBytes(32));
|
|
3950
3960
|
if (o === 0)
|
|
3951
3961
|
return e.setPosition(t + 32), ["", 32];
|
|
3952
|
-
const s = e.readBytes(o, 32), i = xg(
|
|
3962
|
+
const s = e.readBytes(o, 32), i = xg(Un(s));
|
|
3953
3963
|
return e.setPosition(t + 32), [i, 32];
|
|
3954
3964
|
}
|
|
3955
3965
|
function ro(e) {
|
|
@@ -3963,7 +3973,7 @@ function ro(e) {
|
|
|
3963
3973
|
return !!(n && ro({ ...e, type: n[1] }));
|
|
3964
3974
|
}
|
|
3965
3975
|
function Ng(e) {
|
|
3966
|
-
const { abi: t, data: n } = e, r =
|
|
3976
|
+
const { abi: t, data: n } = e, r = Ar(n, 0, 4);
|
|
3967
3977
|
if (r === "0x")
|
|
3968
3978
|
throw new Bo();
|
|
3969
3979
|
const s = [...t || [], Gd, bg].find((i) => i.type === "error" && r === Mo(Ot(i)));
|
|
@@ -3973,7 +3983,7 @@ function Ng(e) {
|
|
|
3973
3983
|
});
|
|
3974
3984
|
return {
|
|
3975
3985
|
abiItem: s,
|
|
3976
|
-
args: "inputs" in s && s.inputs && s.inputs.length > 0 ? Lo(s.inputs,
|
|
3986
|
+
args: "inputs" in s && s.inputs && s.inputs.length > 0 ? Lo(s.inputs, Ar(n, 4)) : void 0,
|
|
3977
3987
|
errorName: s.name
|
|
3978
3988
|
};
|
|
3979
3989
|
}
|
|
@@ -4509,10 +4519,10 @@ Object.defineProperty(Vn, "code", {
|
|
|
4509
4519
|
writable: !0,
|
|
4510
4520
|
value: -32603
|
|
4511
4521
|
});
|
|
4512
|
-
class
|
|
4522
|
+
class On extends tt {
|
|
4513
4523
|
constructor(t) {
|
|
4514
4524
|
super(t, {
|
|
4515
|
-
code:
|
|
4525
|
+
code: On.code,
|
|
4516
4526
|
name: "InvalidInputRpcError",
|
|
4517
4527
|
shortMessage: [
|
|
4518
4528
|
"Missing or invalid parameters.",
|
|
@@ -4522,7 +4532,7 @@ class Nn extends tt {
|
|
|
4522
4532
|
});
|
|
4523
4533
|
}
|
|
4524
4534
|
}
|
|
4525
|
-
Object.defineProperty(
|
|
4535
|
+
Object.defineProperty(On, "code", {
|
|
4526
4536
|
enumerable: !0,
|
|
4527
4537
|
configurable: !0,
|
|
4528
4538
|
writable: !0,
|
|
@@ -4578,16 +4588,16 @@ Object.defineProperty(lo, "code", {
|
|
|
4578
4588
|
writable: !0,
|
|
4579
4589
|
value: -32003
|
|
4580
4590
|
});
|
|
4581
|
-
class
|
|
4591
|
+
class kn extends tt {
|
|
4582
4592
|
constructor(t, { method: n } = {}) {
|
|
4583
4593
|
super(t, {
|
|
4584
|
-
code:
|
|
4594
|
+
code: kn.code,
|
|
4585
4595
|
name: "MethodNotSupportedRpcError",
|
|
4586
4596
|
shortMessage: `Method${n ? ` "${n}"` : ""} is not supported.`
|
|
4587
4597
|
});
|
|
4588
4598
|
}
|
|
4589
4599
|
}
|
|
4590
|
-
Object.defineProperty(
|
|
4600
|
+
Object.defineProperty(kn, "code", {
|
|
4591
4601
|
enumerable: !0,
|
|
4592
4602
|
configurable: !0,
|
|
4593
4603
|
writable: !0,
|
|
@@ -4828,7 +4838,7 @@ class Hg extends tt {
|
|
|
4828
4838
|
}
|
|
4829
4839
|
const Wg = 3;
|
|
4830
4840
|
function Nr(e, { abi: t, address: n, args: r, docsPath: o, functionName: s, sender: i }) {
|
|
4831
|
-
const c = e instanceof Vs ? e : e instanceof W ? e.walk((h) => "data" in h) || e.walk() : {}, { code: a, data: u, details: l, message: f, shortMessage: p } = c, d = e instanceof Bo ? new _g({ functionName: s }) : [Wg, Vn.code].includes(a) && (u || l || f || p) || a ===
|
|
4841
|
+
const c = e instanceof Vs ? e : e instanceof W ? e.walk((h) => "data" in h) || e.walk() : {}, { code: a, data: u, details: l, message: f, shortMessage: p } = c, d = e instanceof Bo ? new _g({ functionName: s }) : [Wg, Vn.code].includes(a) && (u || l || f || p) || a === On.code && l === "execution reverted" && u ? new Pa({
|
|
4832
4842
|
abi: t,
|
|
4833
4843
|
data: typeof u == "object" ? u.data : u,
|
|
4834
4844
|
functionName: s,
|
|
@@ -4848,14 +4858,14 @@ function Vg(e) {
|
|
|
4848
4858
|
return Hs(`0x${t}`);
|
|
4849
4859
|
}
|
|
4850
4860
|
async function Gg({ hash: e, signature: t }) {
|
|
4851
|
-
const n = Vt(e) ? e :
|
|
4861
|
+
const n = Vt(e) ? e : Rn(e), { secp256k1: r } = await Promise.resolve().then(() => x6);
|
|
4852
4862
|
return `0x${(() => {
|
|
4853
4863
|
if (typeof t == "object" && "r" in t && "s" in t) {
|
|
4854
4864
|
const { r: u, s: l, v: f, yParity: p } = t, d = Number(p ?? f), h = Pl(d);
|
|
4855
4865
|
return new r.Signature(Gt(u), Gt(l)).addRecoveryBit(h);
|
|
4856
4866
|
}
|
|
4857
|
-
const i = Vt(t) ? t :
|
|
4858
|
-
if (
|
|
4867
|
+
const i = Vt(t) ? t : Rn(t);
|
|
4868
|
+
if (Te(i) !== 65)
|
|
4859
4869
|
throw new Error("invalid signature length");
|
|
4860
4870
|
const c = ln(`0x${i.slice(130)}`), a = Pl(c);
|
|
4861
4871
|
return r.Signature.fromCompact(i.substring(2, 130)).addRecoveryBit(a);
|
|
@@ -5021,7 +5031,7 @@ Object.defineProperty($a, "nodeMessage", {
|
|
|
5021
5031
|
writable: !0,
|
|
5022
5032
|
value: /nonce too high/
|
|
5023
5033
|
});
|
|
5024
|
-
class
|
|
5034
|
+
class Ta extends W {
|
|
5025
5035
|
constructor({ cause: t, nonce: n } = {}) {
|
|
5026
5036
|
super([
|
|
5027
5037
|
`Nonce provided for the transaction ${n ? `(${n}) ` : ""}is lower than the current nonce of the account.`,
|
|
@@ -5030,18 +5040,18 @@ class Aa extends W {
|
|
|
5030
5040
|
`), { cause: t, name: "NonceTooLowError" });
|
|
5031
5041
|
}
|
|
5032
5042
|
}
|
|
5033
|
-
Object.defineProperty(
|
|
5043
|
+
Object.defineProperty(Ta, "nodeMessage", {
|
|
5034
5044
|
enumerable: !0,
|
|
5035
5045
|
configurable: !0,
|
|
5036
5046
|
writable: !0,
|
|
5037
5047
|
value: /nonce too low|transaction already imported|already known/
|
|
5038
5048
|
});
|
|
5039
|
-
class
|
|
5049
|
+
class Aa extends W {
|
|
5040
5050
|
constructor({ cause: t, nonce: n } = {}) {
|
|
5041
5051
|
super(`Nonce provided for the transaction ${n ? `(${n}) ` : ""}exceeds the maximum allowed nonce.`, { cause: t, name: "NonceMaxValueError" });
|
|
5042
5052
|
}
|
|
5043
5053
|
}
|
|
5044
|
-
Object.defineProperty(
|
|
5054
|
+
Object.defineProperty(Aa, "nodeMessage", {
|
|
5045
5055
|
enumerable: !0,
|
|
5046
5056
|
configurable: !0,
|
|
5047
5057
|
writable: !0,
|
|
@@ -5155,7 +5165,7 @@ function Gs(e, t) {
|
|
|
5155
5165
|
}) : Sa.nodeMessage.test(n) ? new Sa({
|
|
5156
5166
|
cause: e,
|
|
5157
5167
|
maxFeePerGas: t == null ? void 0 : t.maxFeePerGas
|
|
5158
|
-
}) : $a.nodeMessage.test(n) ? new $a({ cause: e, nonce: t == null ? void 0 : t.nonce }) :
|
|
5168
|
+
}) : $a.nodeMessage.test(n) ? new $a({ cause: e, nonce: t == null ? void 0 : t.nonce }) : Ta.nodeMessage.test(n) ? new Ta({ cause: e, nonce: t == null ? void 0 : t.nonce }) : Aa.nodeMessage.test(n) ? new Aa({ cause: e, nonce: t == null ? void 0 : t.nonce }) : Ra.nodeMessage.test(n) ? new Ra({ cause: e }) : Na.nodeMessage.test(n) ? new Na({ cause: e, gas: t == null ? void 0 : t.gas }) : Oa.nodeMessage.test(n) ? new Oa({ cause: e, gas: t == null ? void 0 : t.gas }) : Ia.nodeMessage.test(n) ? new Ia({ cause: e }) : vs.nodeMessage.test(n) ? new vs({
|
|
5159
5169
|
cause: e,
|
|
5160
5170
|
maxFeePerGas: t == null ? void 0 : t.maxFeePerGas,
|
|
5161
5171
|
maxPriorityFeePerGas: t == null ? void 0 : t.maxPriorityFeePerGas
|
|
@@ -5240,7 +5250,7 @@ function Uc(e) {
|
|
|
5240
5250
|
const t = {};
|
|
5241
5251
|
for (const { address: n, ...r } of e) {
|
|
5242
5252
|
if (!vt(n, { strict: !1 }))
|
|
5243
|
-
throw new
|
|
5253
|
+
throw new Nn({ address: n });
|
|
5244
5254
|
if (t[n])
|
|
5245
5255
|
throw new Cg({ address: n });
|
|
5246
5256
|
t[n] = ty(r);
|
|
@@ -5251,9 +5261,9 @@ const r0 = 2n ** 256n - 1n;
|
|
|
5251
5261
|
function Fr(e) {
|
|
5252
5262
|
const { account: t, maxFeePerGas: n, maxPriorityFeePerGas: r, to: o } = e, s = t ? ot(t) : void 0;
|
|
5253
5263
|
if (s && !vt(s.address))
|
|
5254
|
-
throw new
|
|
5264
|
+
throw new Nn({ address: s.address });
|
|
5255
5265
|
if (o && !vt(o))
|
|
5256
|
-
throw new
|
|
5266
|
+
throw new Nn({ address: o });
|
|
5257
5267
|
if (n && n > r0)
|
|
5258
5268
|
throw new ws({ maxFeePerGas: n });
|
|
5259
5269
|
if (r && n && r > n)
|
|
@@ -5353,7 +5363,7 @@ function a0(e, t) {
|
|
|
5353
5363
|
totalDifficulty: e.totalDifficulty ? BigInt(e.totalDifficulty) : null
|
|
5354
5364
|
};
|
|
5355
5365
|
}
|
|
5356
|
-
async function
|
|
5366
|
+
async function Tt(e, { blockHash: t, blockNumber: n, blockTag: r = e.experimental_blockTag ?? "latest", includeTransactions: o } = {}) {
|
|
5357
5367
|
var u, l, f;
|
|
5358
5368
|
const s = o ?? !1, i = n !== void 0 ? J(n) : void 0;
|
|
5359
5369
|
let c = null;
|
|
@@ -5382,7 +5392,7 @@ async function c0(e, t) {
|
|
|
5382
5392
|
try {
|
|
5383
5393
|
const c = ((s = r == null ? void 0 : r.fees) == null ? void 0 : s.maxPriorityFeePerGas) ?? ((i = r == null ? void 0 : r.fees) == null ? void 0 : i.defaultPriorityFee);
|
|
5384
5394
|
if (typeof c == "function") {
|
|
5385
|
-
const u = n || await Q(e,
|
|
5395
|
+
const u = n || await Q(e, Tt, "getBlock")({}), l = await c({
|
|
5386
5396
|
block: u,
|
|
5387
5397
|
client: e,
|
|
5388
5398
|
request: o
|
|
@@ -5399,7 +5409,7 @@ async function c0(e, t) {
|
|
|
5399
5409
|
return Gt(a);
|
|
5400
5410
|
} catch {
|
|
5401
5411
|
const [c, a] = await Promise.all([
|
|
5402
|
-
n ? Promise.resolve(n) : Q(e,
|
|
5412
|
+
n ? Promise.resolve(n) : Q(e, Tt, "getBlock")({}),
|
|
5403
5413
|
Q(e, Wc, "getGasPrice")({})
|
|
5404
5414
|
]);
|
|
5405
5415
|
if (typeof c.baseFeePerGas != "bigint")
|
|
@@ -5423,7 +5433,7 @@ async function Ca(e, t) {
|
|
|
5423
5433
|
})();
|
|
5424
5434
|
if (i < 1)
|
|
5425
5435
|
throw new o0();
|
|
5426
|
-
const a = 10 ** (((p = i.toString().split(".")[1]) == null ? void 0 : p.length) ?? 0), u = (h) => h * BigInt(Math.ceil(i * a)) / BigInt(a), l = n || await Q(e,
|
|
5436
|
+
const a = 10 ** (((p = i.toString().split(".")[1]) == null ? void 0 : p.length) ?? 0), u = (h) => h * BigInt(Math.ceil(i * a)) / BigInt(a), l = n || await Q(e, Tt, "getBlock")({});
|
|
5427
5437
|
if (typeof ((d = r == null ? void 0 : r.fees) == null ? void 0 : d.estimateFeesPerGas) == "function") {
|
|
5428
5438
|
const h = await r.fees.estimateFeesPerGas({
|
|
5429
5439
|
block: n,
|
|
@@ -5513,7 +5523,7 @@ class uy extends Ic {
|
|
|
5513
5523
|
$r(this), Cd(t, this), this.finished = !0;
|
|
5514
5524
|
const { buffer: n, view: r, blockLen: o, isLE: s } = this;
|
|
5515
5525
|
let { pos: i } = this;
|
|
5516
|
-
n[i++] = 128,
|
|
5526
|
+
n[i++] = 128, Tr(this.buffer.subarray(i)), this.padOffset > o - i && (this.process(r, 0), i = 0);
|
|
5517
5527
|
for (let f = i; f < o; f++)
|
|
5518
5528
|
n[f] = 0;
|
|
5519
5529
|
iy(r, o - 8, BigInt(this.length * 8), s), this.process(r, 0);
|
|
@@ -5643,10 +5653,10 @@ class fy extends uy {
|
|
|
5643
5653
|
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, u = u + this.G | 0, l = l + this.H | 0, this.set(r, o, s, i, c, a, u, l);
|
|
5644
5654
|
}
|
|
5645
5655
|
roundClean() {
|
|
5646
|
-
|
|
5656
|
+
Tr(vn);
|
|
5647
5657
|
}
|
|
5648
5658
|
destroy() {
|
|
5649
|
-
this.set(0, 0, 0, 0, 0, 0, 0, 0),
|
|
5659
|
+
this.set(0, 0, 0, 0, 0, 0, 0, 0), Tr(this.buffer);
|
|
5650
5660
|
}
|
|
5651
5661
|
}
|
|
5652
5662
|
const d0 = /* @__PURE__ */ Bd(() => new fy()), dy = d0;
|
|
@@ -5667,7 +5677,7 @@ function my(e) {
|
|
|
5667
5677
|
}));
|
|
5668
5678
|
return o;
|
|
5669
5679
|
}
|
|
5670
|
-
const $l = 6, p0 = 32, Vc = 4096, h0 = p0 * Vc,
|
|
5680
|
+
const $l = 6, p0 = 32, Vc = 4096, h0 = p0 * Vc, Tl = h0 * $l - // terminator byte (0x80).
|
|
5671
5681
|
1 - // zero byte (0x00) appended to each field element.
|
|
5672
5682
|
1 * Vc * $l;
|
|
5673
5683
|
class by extends W {
|
|
@@ -5684,12 +5694,12 @@ class gy extends W {
|
|
|
5684
5694
|
}
|
|
5685
5695
|
}
|
|
5686
5696
|
function yy(e) {
|
|
5687
|
-
const t = typeof e.data == "string" ? qt(e.data) : e.data, n =
|
|
5697
|
+
const t = typeof e.data == "string" ? qt(e.data) : e.data, n = Te(t);
|
|
5688
5698
|
if (!n)
|
|
5689
5699
|
throw new gy();
|
|
5690
|
-
if (n >
|
|
5700
|
+
if (n > Tl)
|
|
5691
5701
|
throw new by({
|
|
5692
|
-
maxSize:
|
|
5702
|
+
maxSize: Tl,
|
|
5693
5703
|
size: n
|
|
5694
5704
|
});
|
|
5695
5705
|
const r = [];
|
|
@@ -5749,7 +5759,7 @@ async function Gc(e) {
|
|
|
5749
5759
|
return ln(t);
|
|
5750
5760
|
}
|
|
5751
5761
|
async function m0(e, t) {
|
|
5752
|
-
var b, g, v, N,
|
|
5762
|
+
var b, g, v, N, A;
|
|
5753
5763
|
const { account: n = e.account, accessList: r, authorizationList: o, chain: s = e.chain, blobVersionedHashes: i, blobs: c, data: a, gas: u, gasPrice: l, maxFeePerBlobGas: f, maxFeePerGas: p, maxPriorityFeePerGas: d, nonce: h, nonceManager: m, to: w, type: S, value: x, ...E } = t, R = await (async () => {
|
|
5754
5764
|
if (!n || !m || typeof h < "u")
|
|
5755
5765
|
return h;
|
|
@@ -5786,10 +5796,10 @@ async function m0(e, t) {
|
|
|
5786
5796
|
params: [L]
|
|
5787
5797
|
}), y = (((N = (v = s == null ? void 0 : s.formatters) == null ? void 0 : v.transaction) == null ? void 0 : N.format) || Hc)(O.tx);
|
|
5788
5798
|
delete y.blockHash, delete y.blockNumber, delete y.r, delete y.s, delete y.transactionIndex, delete y.v, delete y.yParity, y.data = y.input, y.gas && (y.gas = t.gas ?? y.gas), y.gasPrice && (y.gasPrice = t.gasPrice ?? y.gasPrice), y.maxFeePerBlobGas && (y.maxFeePerBlobGas = t.maxFeePerBlobGas ?? y.maxFeePerBlobGas), y.maxFeePerGas && (y.maxFeePerGas = t.maxFeePerGas ?? y.maxFeePerGas), y.maxPriorityFeePerGas && (y.maxPriorityFeePerGas = t.maxPriorityFeePerGas ?? y.maxPriorityFeePerGas), y.nonce && (y.nonce = t.nonce ?? y.nonce);
|
|
5789
|
-
const
|
|
5799
|
+
const T = await (async () => {
|
|
5790
5800
|
var D, _;
|
|
5791
5801
|
if (typeof ((D = s == null ? void 0 : s.fees) == null ? void 0 : D.baseFeeMultiplier) == "function") {
|
|
5792
|
-
const j = await Q(e,
|
|
5802
|
+
const j = await Q(e, Tt, "getBlock")({});
|
|
5793
5803
|
return s.fees.baseFeeMultiplier({
|
|
5794
5804
|
block: j,
|
|
5795
5805
|
client: e,
|
|
@@ -5798,9 +5808,9 @@ async function m0(e, t) {
|
|
|
5798
5808
|
}
|
|
5799
5809
|
return ((_ = s == null ? void 0 : s.fees) == null ? void 0 : _.baseFeeMultiplier) ?? 1.2;
|
|
5800
5810
|
})();
|
|
5801
|
-
if (
|
|
5811
|
+
if (T < 1)
|
|
5802
5812
|
throw new o0();
|
|
5803
|
-
const P = 10 ** (((
|
|
5813
|
+
const P = 10 ** (((A = T.toString().split(".")[1]) == null ? void 0 : A.length) ?? 0), M = (D) => D * BigInt(Math.ceil(T * P)) / BigInt(P);
|
|
5804
5814
|
return y.maxFeePerGas && !t.maxFeePerGas && (y.maxFeePerGas = M(y.maxFeePerGas)), y.gasPrice && !t.gasPrice && (y.gasPrice = M(y.gasPrice)), {
|
|
5805
5815
|
raw: O.raw,
|
|
5806
5816
|
transaction: {
|
|
@@ -5822,7 +5832,7 @@ const Ey = [
|
|
|
5822
5832
|
"gas",
|
|
5823
5833
|
"nonce",
|
|
5824
5834
|
"type"
|
|
5825
|
-
],
|
|
5835
|
+
], Al = /* @__PURE__ */ new Map(), Ci = /* @__PURE__ */ new zs(128);
|
|
5826
5836
|
async function b0(e, t) {
|
|
5827
5837
|
var R, B, F;
|
|
5828
5838
|
let n = t;
|
|
@@ -5856,15 +5866,15 @@ async function b0(e, t) {
|
|
|
5856
5866
|
phase: "beforeFillTransaction"
|
|
5857
5867
|
}), f ?? (f = n.nonce));
|
|
5858
5868
|
const d = ((i.includes("blobVersionedHashes") || i.includes("sidecars")) && n.kzg && n.blobs || Ci.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 Q(e, m0, "fillTransaction")({ ...n, nonce: f }).then((L) => {
|
|
5859
|
-
const { chainId: b, from: g, gas: v, gasPrice: N, nonce:
|
|
5869
|
+
const { chainId: b, from: g, gas: v, gasPrice: N, nonce: A, maxFeePerBlobGas: O, maxFeePerGas: I, maxPriorityFeePerGas: y, type: T, ...$ } = L.transaction;
|
|
5860
5870
|
return Ci.set(e.uid, !0), {
|
|
5861
5871
|
...n,
|
|
5862
5872
|
...g ? { from: g } : {},
|
|
5863
|
-
...
|
|
5873
|
+
...T ? { type: T } : {},
|
|
5864
5874
|
...typeof b < "u" ? { chainId: b } : {},
|
|
5865
5875
|
...typeof v < "u" ? { gas: v } : {},
|
|
5866
5876
|
...typeof N < "u" ? { gasPrice: N } : {},
|
|
5867
|
-
...typeof
|
|
5877
|
+
...typeof A < "u" ? { nonce: A } : {},
|
|
5868
5878
|
...typeof O < "u" ? { maxFeePerBlobGas: O } : {},
|
|
5869
5879
|
...typeof I < "u" ? { maxFeePerGas: I } : {},
|
|
5870
5880
|
...typeof y < "u" ? { maxPriorityFeePerGas: y } : {},
|
|
@@ -5874,8 +5884,8 @@ async function b0(e, t) {
|
|
|
5874
5884
|
var v;
|
|
5875
5885
|
const b = L;
|
|
5876
5886
|
return ((v = b.walk) == null ? void 0 : v.call(b, (N) => {
|
|
5877
|
-
const
|
|
5878
|
-
return
|
|
5887
|
+
const A = N;
|
|
5888
|
+
return A.name === "MethodNotFoundRpcError" || A.name === "MethodNotSupportedRpcError";
|
|
5879
5889
|
})) && Ci.set(e.uid, !1), n;
|
|
5880
5890
|
}) : n;
|
|
5881
5891
|
f ?? (f = d.nonce), n = {
|
|
@@ -5889,7 +5899,7 @@ async function b0(e, t) {
|
|
|
5889
5899
|
}));
|
|
5890
5900
|
let x;
|
|
5891
5901
|
async function E() {
|
|
5892
|
-
return x || (x = await Q(e,
|
|
5902
|
+
return x || (x = await Q(e, Tt, "getBlock")({ blockTag: "latest" }), x);
|
|
5893
5903
|
}
|
|
5894
5904
|
if (i.includes("nonce") && typeof f > "u" && l && !s && (n.nonce = await Q(e, u0, "getTransactionCount")({
|
|
5895
5905
|
address: l.address,
|
|
@@ -5917,10 +5927,10 @@ async function b0(e, t) {
|
|
|
5917
5927
|
try {
|
|
5918
5928
|
n.type = vy(n);
|
|
5919
5929
|
} catch {
|
|
5920
|
-
let L =
|
|
5930
|
+
let L = Al.get(e.uid);
|
|
5921
5931
|
if (typeof L > "u") {
|
|
5922
5932
|
const b = await E();
|
|
5923
|
-
L = typeof (b == null ? void 0 : b.baseFeePerGas) == "bigint",
|
|
5933
|
+
L = typeof (b == null ? void 0 : b.baseFeePerGas) == "bigint", Al.set(e.uid, L);
|
|
5924
5934
|
}
|
|
5925
5935
|
n.type = L ? "eip1559" : "legacy";
|
|
5926
5936
|
}
|
|
@@ -5984,7 +5994,7 @@ async function qc(e, t) {
|
|
|
5984
5994
|
}) : t;
|
|
5985
5995
|
if (S && t.gas !== S)
|
|
5986
5996
|
return S;
|
|
5987
|
-
const N = (typeof h == "bigint" ? J(h) : void 0) || m,
|
|
5997
|
+
const N = (typeof h == "bigint" ? J(h) : void 0) || m, A = Uc(b);
|
|
5988
5998
|
Fr(t);
|
|
5989
5999
|
const O = (a = (c = (i = e.chain) == null ? void 0 : i.formatters) == null ? void 0 : c.transactionRequest) == null ? void 0 : a.format, y = (O || jo)({
|
|
5990
6000
|
// Pick out extra data that might exist on the chain's transaction request type.
|
|
@@ -6005,10 +6015,10 @@ async function qc(e, t) {
|
|
|
6005
6015
|
}, "estimateGas");
|
|
6006
6016
|
return BigInt(await e.request({
|
|
6007
6017
|
method: "eth_estimateGas",
|
|
6008
|
-
params:
|
|
6018
|
+
params: A ? [
|
|
6009
6019
|
y,
|
|
6010
6020
|
N ?? e.experimental_blockTag ?? "latest",
|
|
6011
|
-
|
|
6021
|
+
A
|
|
6012
6022
|
] : N ? [y, N] : [y]
|
|
6013
6023
|
}));
|
|
6014
6024
|
} catch (u) {
|
|
@@ -6045,9 +6055,9 @@ async function Py(e, t) {
|
|
|
6045
6055
|
}
|
|
6046
6056
|
function Zs(e, t) {
|
|
6047
6057
|
if (!vt(e, { strict: !1 }))
|
|
6048
|
-
throw new
|
|
6058
|
+
throw new Nn({ address: e });
|
|
6049
6059
|
if (!vt(t, { strict: !1 }))
|
|
6050
|
-
throw new
|
|
6060
|
+
throw new Nn({ address: t });
|
|
6051
6061
|
return e.toLowerCase() === t.toLowerCase();
|
|
6052
6062
|
}
|
|
6053
6063
|
const Rl = "/docs/contract/decodeEventLog";
|
|
@@ -6089,7 +6099,7 @@ function xs(e) {
|
|
|
6089
6099
|
abiItem: a,
|
|
6090
6100
|
data: n,
|
|
6091
6101
|
params: h,
|
|
6092
|
-
size:
|
|
6102
|
+
size: Te(n)
|
|
6093
6103
|
}) : m;
|
|
6094
6104
|
}
|
|
6095
6105
|
else if (s)
|
|
@@ -6247,7 +6257,7 @@ function tr(e) {
|
|
|
6247
6257
|
if (s.type !== "function")
|
|
6248
6258
|
throw new Sr(void 0, { docsPath: Bi });
|
|
6249
6259
|
if (!s.outputs)
|
|
6250
|
-
throw new
|
|
6260
|
+
throw new Td(s.name, { docsPath: Bi });
|
|
6251
6261
|
const i = Lo(s.outputs, o);
|
|
6252
6262
|
if (i && i.length > 1)
|
|
6253
6263
|
return i;
|
|
@@ -6279,13 +6289,13 @@ function y0(e) {
|
|
|
6279
6289
|
const w0 = (
|
|
6280
6290
|
// @ts-ignore
|
|
6281
6291
|
typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function"
|
|
6282
|
-
),
|
|
6283
|
-
function
|
|
6292
|
+
), Ty = /* @__PURE__ */ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
|
|
6293
|
+
function To(e) {
|
|
6284
6294
|
if (Xc(e), w0)
|
|
6285
6295
|
return e.toHex();
|
|
6286
6296
|
let t = "";
|
|
6287
6297
|
for (let n = 0; n < e.length; n++)
|
|
6288
|
-
t +=
|
|
6298
|
+
t += Ty[e[n]];
|
|
6289
6299
|
return t;
|
|
6290
6300
|
}
|
|
6291
6301
|
const Jt = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
|
|
@@ -6316,11 +6326,11 @@ function Es(e) {
|
|
|
6316
6326
|
}
|
|
6317
6327
|
return r;
|
|
6318
6328
|
}
|
|
6319
|
-
function
|
|
6320
|
-
return y0(
|
|
6329
|
+
function Hn(e) {
|
|
6330
|
+
return y0(To(e));
|
|
6321
6331
|
}
|
|
6322
6332
|
function v0(e) {
|
|
6323
|
-
return Xc(e), y0(
|
|
6333
|
+
return Xc(e), y0(To(Uint8Array.from(e).reverse()));
|
|
6324
6334
|
}
|
|
6325
6335
|
function Uo(e, t) {
|
|
6326
6336
|
return Es(e.toString(16).padStart(t * 2, "0"));
|
|
@@ -6366,7 +6376,7 @@ function wr(e, t, n, r) {
|
|
|
6366
6376
|
if (!Qc(t, n, r))
|
|
6367
6377
|
throw new Error("expected valid " + e + ": " + n + " <= n < " + r + ", got " + t);
|
|
6368
6378
|
}
|
|
6369
|
-
function
|
|
6379
|
+
function Ay(e) {
|
|
6370
6380
|
let t;
|
|
6371
6381
|
for (t = 0; e > Kc; e >>= Ba, t += 1)
|
|
6372
6382
|
;
|
|
@@ -6599,12 +6609,12 @@ function $0(e, t, n) {
|
|
|
6599
6609
|
}
|
|
6600
6610
|
const Ly = /* @__PURE__ */ new TextDecoder(), ky = /* @__PURE__ */ new TextEncoder();
|
|
6601
6611
|
function Dy(e) {
|
|
6602
|
-
return e instanceof Uint8Array ? e : typeof e == "string" ?
|
|
6612
|
+
return e instanceof Uint8Array ? e : typeof e == "string" ? T0(e) : jy(e);
|
|
6603
6613
|
}
|
|
6604
6614
|
function jy(e) {
|
|
6605
6615
|
return e instanceof Uint8Array ? e : new Uint8Array(e);
|
|
6606
6616
|
}
|
|
6607
|
-
function
|
|
6617
|
+
function T0(e, t = {}) {
|
|
6608
6618
|
const { size: n } = t;
|
|
6609
6619
|
let r = e;
|
|
6610
6620
|
n && (Xs(e, n), r = qn(e, n));
|
|
@@ -6642,7 +6652,7 @@ function Hy(e, t = {}) {
|
|
|
6642
6652
|
function Wy(e, t = {}) {
|
|
6643
6653
|
const { size: n } = t;
|
|
6644
6654
|
let r = e;
|
|
6645
|
-
if (typeof n < "u" && (zo(r, n), r =
|
|
6655
|
+
if (typeof n < "u" && (zo(r, n), r = A0(r)), r.length > 1 || r[0] > 1)
|
|
6646
6656
|
throw new qy(r);
|
|
6647
6657
|
return !!r[0];
|
|
6648
6658
|
}
|
|
@@ -6657,7 +6667,7 @@ function Vy(e, t = {}) {
|
|
|
6657
6667
|
let r = e;
|
|
6658
6668
|
return typeof n < "u" && (zo(r, n), r = Gy(r)), Ly.decode(r);
|
|
6659
6669
|
}
|
|
6660
|
-
function
|
|
6670
|
+
function A0(e) {
|
|
6661
6671
|
return P0(e, { dir: "left" });
|
|
6662
6672
|
}
|
|
6663
6673
|
function Gy(e) {
|
|
@@ -7499,13 +7509,13 @@ function U0({ fn: e, id: t, shouldSplitBatch: n, wait: r = 0, sort: o }) {
|
|
|
7499
7509
|
};
|
|
7500
7510
|
}
|
|
7501
7511
|
async function Qs(e, t) {
|
|
7502
|
-
var O, I, y,
|
|
7512
|
+
var O, I, y, T;
|
|
7503
7513
|
const { account: n = e.account, authorizationList: r, batch: o = !!((O = e.batch) != null && O.multicall), blockNumber: s, blockTag: i = e.experimental_blockTag ?? "latest", accessList: c, blobs: a, blockOverrides: u, code: l, data: f, factory: p, factoryData: d, gas: h, gasPrice: m, maxFeePerBlobGas: w, maxFeePerGas: S, maxPriorityFeePerGas: x, nonce: E, to: R, value: B, stateOverride: F, ...L } = t, b = n ? ot(n) : void 0;
|
|
7504
7514
|
if (l && (p || d))
|
|
7505
7515
|
throw new W("Cannot provide both `code` & `factory`/`factoryData` as parameters.");
|
|
7506
7516
|
if (l && R)
|
|
7507
7517
|
throw new W("Cannot provide both `code` & `to` as parameters.");
|
|
7508
|
-
const g = l && f, v = p && d && R && f, N = g || v,
|
|
7518
|
+
const g = l && f, v = p && d && R && f, N = g || v, A = g ? z0({
|
|
7509
7519
|
code: l,
|
|
7510
7520
|
data: f
|
|
7511
7521
|
}) : v ? lw({
|
|
@@ -7516,14 +7526,14 @@ async function Qs(e, t) {
|
|
|
7516
7526
|
}) : f;
|
|
7517
7527
|
try {
|
|
7518
7528
|
Fr(t);
|
|
7519
|
-
const P = (typeof s == "bigint" ? J(s) : void 0) || i, M = u ? B0(u) : void 0, D = Uc(F), _ = (
|
|
7529
|
+
const P = (typeof s == "bigint" ? J(s) : void 0) || i, M = u ? B0(u) : void 0, D = Uc(F), _ = (T = (y = (I = e.chain) == null ? void 0 : I.formatters) == null ? void 0 : y.transactionRequest) == null ? void 0 : T.format, H = (_ || jo)({
|
|
7520
7530
|
// Pick out extra data that might exist on the chain's transaction request type.
|
|
7521
7531
|
...qs(L, { format: _ }),
|
|
7522
7532
|
accessList: c,
|
|
7523
7533
|
account: b,
|
|
7524
7534
|
authorizationList: r,
|
|
7525
7535
|
blobs: a,
|
|
7526
|
-
data:
|
|
7536
|
+
data: A,
|
|
7527
7537
|
gas: h,
|
|
7528
7538
|
gasPrice: m,
|
|
7529
7539
|
maxFeePerBlobGas: w,
|
|
@@ -7556,7 +7566,7 @@ async function Qs(e, t) {
|
|
|
7556
7566
|
});
|
|
7557
7567
|
return V === "0x" ? { data: void 0 } : { data: V };
|
|
7558
7568
|
} catch ($) {
|
|
7559
|
-
const P = fw($), { offchainLookup: M, offchainLookupSignature: D } = await import("./ccip-
|
|
7569
|
+
const P = fw($), { offchainLookup: M, offchainLookupSignature: D } = await import("./ccip-JQR0a-Lg.mjs");
|
|
7560
7570
|
if (e.ccipRead !== !1 && (P == null ? void 0 : P.slice(0, 10)) === D && R)
|
|
7561
7571
|
return { data: await M(e, { data: P, to: R }) };
|
|
7562
7572
|
throw N && (P == null ? void 0 : P.slice(0, 10)) === "0x101bb98d" ? new Ug({ factory: p }) : j0($, {
|
|
@@ -7716,7 +7726,7 @@ async function dw(e, t) {
|
|
|
7716
7726
|
}
|
|
7717
7727
|
const Di = /* @__PURE__ */ new Map(), Dl = /* @__PURE__ */ new Map();
|
|
7718
7728
|
let pw = 0;
|
|
7719
|
-
function
|
|
7729
|
+
function In(e, t, n) {
|
|
7720
7730
|
const r = ++pw, o = () => Di.get(e) || [], s = () => {
|
|
7721
7731
|
const l = o();
|
|
7722
7732
|
Di.set(e, l.filter((f) => f.id !== r));
|
|
@@ -7835,7 +7845,7 @@ function ww(e, t) {
|
|
|
7835
7845
|
w,
|
|
7836
7846
|
c
|
|
7837
7847
|
]);
|
|
7838
|
-
return
|
|
7848
|
+
return In(S, { onLogs: u, onError: a }, (x) => {
|
|
7839
7849
|
let E;
|
|
7840
7850
|
c !== void 0 && (E = c - 1n);
|
|
7841
7851
|
let R, B = !1;
|
|
@@ -7880,7 +7890,7 @@ function ww(e, t) {
|
|
|
7880
7890
|
for (const g of b)
|
|
7881
7891
|
x.onLogs([g]);
|
|
7882
7892
|
} catch (b) {
|
|
7883
|
-
R && b instanceof
|
|
7893
|
+
R && b instanceof On && (B = !1), (L = x.onError) == null || L.call(x, b);
|
|
7884
7894
|
}
|
|
7885
7895
|
}, {
|
|
7886
7896
|
emitOnBegin: !0,
|
|
@@ -7902,7 +7912,7 @@ function ww(e, t) {
|
|
|
7902
7912
|
w
|
|
7903
7913
|
]);
|
|
7904
7914
|
let x = !0, E = () => x = !1;
|
|
7905
|
-
return
|
|
7915
|
+
return In(S, { onLogs: u, onError: a }, (R) => ((async () => {
|
|
7906
7916
|
try {
|
|
7907
7917
|
const B = (() => {
|
|
7908
7918
|
if (e.transport.type === "fallback") {
|
|
@@ -7922,26 +7932,26 @@ function ww(e, t) {
|
|
|
7922
7932
|
return;
|
|
7923
7933
|
const g = b.result;
|
|
7924
7934
|
try {
|
|
7925
|
-
const { eventName: N, args:
|
|
7935
|
+
const { eventName: N, args: A } = xs({
|
|
7926
7936
|
abi: n,
|
|
7927
7937
|
data: g.data,
|
|
7928
7938
|
topics: g.topics,
|
|
7929
7939
|
strict: p
|
|
7930
7940
|
}), O = fn(g, {
|
|
7931
|
-
args:
|
|
7941
|
+
args: A,
|
|
7932
7942
|
eventName: N
|
|
7933
7943
|
});
|
|
7934
7944
|
R.onLogs([O]);
|
|
7935
7945
|
} catch (N) {
|
|
7936
|
-
let
|
|
7946
|
+
let A, O;
|
|
7937
7947
|
if (N instanceof ys || N instanceof Oc) {
|
|
7938
7948
|
if (p)
|
|
7939
7949
|
return;
|
|
7940
|
-
|
|
7950
|
+
A = N.abiItem.name, O = (v = N.abiItem.inputs) == null ? void 0 : v.some((y) => !("name" in y && y.name));
|
|
7941
7951
|
}
|
|
7942
7952
|
const I = fn(g, {
|
|
7943
7953
|
args: O ? [] : {},
|
|
7944
|
-
eventName:
|
|
7954
|
+
eventName: A
|
|
7945
7955
|
});
|
|
7946
7956
|
R.onLogs([I]);
|
|
7947
7957
|
}
|
|
@@ -8052,14 +8062,14 @@ function nu(e) {
|
|
|
8052
8062
|
return t instanceof Pa ? ((n = t.data) == null ? void 0 : n.errorName) === "HttpError" || ((r = t.data) == null ? void 0 : r.errorName) === "ResolverError" || ((o = t.data) == null ? void 0 : o.errorName) === "ResolverNotContract" || ((s = t.data) == null ? void 0 : s.errorName) === "ResolverNotFound" || ((i = t.data) == null ? void 0 : i.errorName) === "ReverseAddressMismatch" || ((c = t.data) == null ? void 0 : c.errorName) === "UnsupportedResolverProfile" : !1;
|
|
8053
8063
|
}
|
|
8054
8064
|
function Pw(e) {
|
|
8055
|
-
const { abi: t, data: n } = e, r =
|
|
8065
|
+
const { abi: t, data: n } = e, r = Ar(n, 0, 4), o = t.find((s) => s.type === "function" && r === Mo(Ot(s)));
|
|
8056
8066
|
if (!o)
|
|
8057
8067
|
throw new fb(r, {
|
|
8058
8068
|
docsPath: "/docs/contract/decodeFunctionData"
|
|
8059
8069
|
});
|
|
8060
8070
|
return {
|
|
8061
8071
|
functionName: o.name,
|
|
8062
|
-
args: "inputs" in o && o.inputs && o.inputs.length > 0 ? Lo(o.inputs,
|
|
8072
|
+
args: "inputs" in o && o.inputs && o.inputs.length > 0 ? Lo(o.inputs, Ar(n, 4)) : void 0
|
|
8063
8073
|
};
|
|
8064
8074
|
}
|
|
8065
8075
|
const ji = "/docs/contract/encodeErrorResult";
|
|
@@ -8096,7 +8106,7 @@ function Sw(e) {
|
|
|
8096
8106
|
if (o.type !== "function")
|
|
8097
8107
|
throw new Sr(void 0, { docsPath: _i });
|
|
8098
8108
|
if (!o.outputs)
|
|
8099
|
-
throw new
|
|
8109
|
+
throw new Td(o.name, { docsPath: _i });
|
|
8100
8110
|
const s = (() => {
|
|
8101
8111
|
if (o.outputs.length === 0)
|
|
8102
8112
|
return [];
|
|
@@ -8104,7 +8114,7 @@ function Sw(e) {
|
|
|
8104
8114
|
return [r];
|
|
8105
8115
|
if (Array.isArray(r))
|
|
8106
8116
|
return r;
|
|
8107
|
-
throw new
|
|
8117
|
+
throw new Ad(r);
|
|
8108
8118
|
})();
|
|
8109
8119
|
return Jn(o.outputs, s);
|
|
8110
8120
|
}
|
|
@@ -8115,7 +8125,7 @@ async function $w(e) {
|
|
|
8115
8125
|
try {
|
|
8116
8126
|
s[c] = i.urls.includes(ti) ? await $w({ data: i.data, ccipRequest: n }) : await n(i), o[c] = !1;
|
|
8117
8127
|
} catch (a) {
|
|
8118
|
-
o[c] = !0, s[c] =
|
|
8128
|
+
o[c] = !0, s[c] = Tw(a);
|
|
8119
8129
|
}
|
|
8120
8130
|
})), Sw({
|
|
8121
8131
|
abi: Ma,
|
|
@@ -8123,7 +8133,7 @@ async function $w(e) {
|
|
|
8123
8133
|
result: [o, s]
|
|
8124
8134
|
});
|
|
8125
8135
|
}
|
|
8126
|
-
function
|
|
8136
|
+
function Tw(e) {
|
|
8127
8137
|
return e.name === "HttpRequestError" && e.status ? jl({
|
|
8128
8138
|
abi: Ma,
|
|
8129
8139
|
errorName: "HttpError",
|
|
@@ -8146,28 +8156,28 @@ function ja(e) {
|
|
|
8146
8156
|
return Ie(t);
|
|
8147
8157
|
const n = e.split(".");
|
|
8148
8158
|
for (let r = n.length - 1; r >= 0; r -= 1) {
|
|
8149
|
-
const o = V0(n[r]), s = o ? Br(o) : Le(
|
|
8159
|
+
const o = V0(n[r]), s = o ? Br(o) : Le(zn(n[r]), "bytes");
|
|
8150
8160
|
t = Le(Zt([t, s]), "bytes");
|
|
8151
8161
|
}
|
|
8152
8162
|
return Ie(t);
|
|
8153
8163
|
}
|
|
8154
|
-
function
|
|
8164
|
+
function Aw(e) {
|
|
8155
8165
|
return `[${e.slice(2)}]`;
|
|
8156
8166
|
}
|
|
8157
8167
|
function Rw(e) {
|
|
8158
8168
|
const t = new Uint8Array(32).fill(0);
|
|
8159
|
-
return e ? V0(e) || Le(
|
|
8169
|
+
return e ? V0(e) || Le(zn(e)) : Ie(t);
|
|
8160
8170
|
}
|
|
8161
8171
|
function ru(e) {
|
|
8162
8172
|
const t = e.replace(/^\.|\.$/gm, "");
|
|
8163
8173
|
if (t.length === 0)
|
|
8164
8174
|
return new Uint8Array(1);
|
|
8165
|
-
const n = new Uint8Array(
|
|
8175
|
+
const n = new Uint8Array(zn(t).byteLength + 2);
|
|
8166
8176
|
let r = 0;
|
|
8167
8177
|
const o = t.split(".");
|
|
8168
8178
|
for (let s = 0; s < o.length; s++) {
|
|
8169
|
-
let i =
|
|
8170
|
-
i.byteLength > 255 && (i =
|
|
8179
|
+
let i = zn(o[s]);
|
|
8180
|
+
i.byteLength > 255 && (i = zn(Aw(Rw(o[s])))), n[r] = i.length, n.set(i, r + 1), r += i.length + 1;
|
|
8171
8181
|
}
|
|
8172
8182
|
return n.byteLength !== r + 1 ? n.slice(0, r + 1) : n;
|
|
8173
8183
|
}
|
|
@@ -8196,7 +8206,7 @@ async function Nw(e, t) {
|
|
|
8196
8206
|
abi: F0,
|
|
8197
8207
|
functionName: "resolveWithGateways",
|
|
8198
8208
|
args: [
|
|
8199
|
-
|
|
8209
|
+
Rn(ru(s)),
|
|
8200
8210
|
p,
|
|
8201
8211
|
i ?? [ti]
|
|
8202
8212
|
],
|
|
@@ -8211,7 +8221,7 @@ async function Nw(e, t) {
|
|
|
8211
8221
|
functionName: "addr",
|
|
8212
8222
|
data: m[0]
|
|
8213
8223
|
});
|
|
8214
|
-
return w === "0x" ||
|
|
8224
|
+
return w === "0x" || Un(w) === "0x00" ? null : w;
|
|
8215
8225
|
} catch (p) {
|
|
8216
8226
|
if (c)
|
|
8217
8227
|
throw p;
|
|
@@ -8420,7 +8430,7 @@ async function Z0(e, t) {
|
|
|
8420
8430
|
address: u,
|
|
8421
8431
|
abi: F0,
|
|
8422
8432
|
args: [
|
|
8423
|
-
|
|
8433
|
+
Rn(ru(s)),
|
|
8424
8434
|
Ft({
|
|
8425
8435
|
abi: Fl,
|
|
8426
8436
|
functionName: "text",
|
|
@@ -8529,7 +8539,7 @@ async function Ww(e, t) {
|
|
|
8529
8539
|
}
|
|
8530
8540
|
],
|
|
8531
8541
|
functionName: "findResolver",
|
|
8532
|
-
args: [
|
|
8542
|
+
args: [Rn(ru(o))],
|
|
8533
8543
|
blockNumber: n,
|
|
8534
8544
|
blockTag: r
|
|
8535
8545
|
});
|
|
@@ -8760,11 +8770,11 @@ function rv(e, t = {}) {
|
|
|
8760
8770
|
...r
|
|
8761
8771
|
}, { method: u } = n;
|
|
8762
8772
|
if ((f = s == null ? void 0 : s.exclude) != null && f.includes(u))
|
|
8763
|
-
throw new
|
|
8773
|
+
throw new kn(new Error("method not supported"), {
|
|
8764
8774
|
method: u
|
|
8765
8775
|
});
|
|
8766
8776
|
if (s != null && s.include && !s.include.includes(u))
|
|
8767
|
-
throw new
|
|
8777
|
+
throw new kn(new Error("method not supported"), {
|
|
8768
8778
|
method: u
|
|
8769
8779
|
});
|
|
8770
8780
|
const l = o ? to(`${a}.${ke(n)}`) : void 0;
|
|
@@ -8784,16 +8794,16 @@ function rv(e, t = {}) {
|
|
|
8784
8794
|
throw new ao(d);
|
|
8785
8795
|
case Vn.code:
|
|
8786
8796
|
throw new Vn(d);
|
|
8787
|
-
case
|
|
8788
|
-
throw new
|
|
8797
|
+
case On.code:
|
|
8798
|
+
throw new On(d);
|
|
8789
8799
|
case co.code:
|
|
8790
8800
|
throw new co(d);
|
|
8791
8801
|
case uo.code:
|
|
8792
8802
|
throw new uo(d);
|
|
8793
8803
|
case lo.code:
|
|
8794
8804
|
throw new lo(d);
|
|
8795
|
-
case
|
|
8796
|
-
throw new
|
|
8805
|
+
case kn.code:
|
|
8806
|
+
throw new kn(d, {
|
|
8797
8807
|
method: n.method
|
|
8798
8808
|
});
|
|
8799
8809
|
case Rr.code:
|
|
@@ -8957,7 +8967,7 @@ function cv(e, t = {}) {
|
|
|
8957
8967
|
const uv = `Ethereum Signed Message:
|
|
8958
8968
|
`;
|
|
8959
8969
|
function lv(e) {
|
|
8960
|
-
const t = typeof e == "string" ? to(e) : typeof e.raw == "string" ? e.raw : Ie(e.raw), n = to(`${uv}${
|
|
8970
|
+
const t = typeof e == "string" ? to(e) : typeof e.raw == "string" ? e.raw : Ie(e.raw), n = to(`${uv}${Te(t)}`);
|
|
8961
8971
|
return Zt([n, t]);
|
|
8962
8972
|
}
|
|
8963
8973
|
function Q0(e, t) {
|
|
@@ -8998,14 +9008,14 @@ function hv(e) {
|
|
|
8998
9008
|
});
|
|
8999
9009
|
}
|
|
9000
9010
|
if (l === "address" && typeof f == "string" && !vt(f))
|
|
9001
|
-
throw new
|
|
9011
|
+
throw new Nn({ address: f });
|
|
9002
9012
|
const d = l.match(sg);
|
|
9003
9013
|
if (d) {
|
|
9004
9014
|
const [m, w] = d;
|
|
9005
|
-
if (w &&
|
|
9015
|
+
if (w && Te(f) !== Number.parseInt(w, 10))
|
|
9006
9016
|
throw new pb({
|
|
9007
9017
|
expectedSize: Number.parseInt(w, 10),
|
|
9008
|
-
givenSize:
|
|
9018
|
+
givenSize: Te(f)
|
|
9009
9019
|
});
|
|
9010
9020
|
}
|
|
9011
9021
|
const h = o[l];
|
|
@@ -9092,7 +9102,7 @@ function ep({ data: e, primaryType: t, types: n }) {
|
|
|
9092
9102
|
return Jn(r, o);
|
|
9093
9103
|
}
|
|
9094
9104
|
function wv({ primaryType: e, types: t }) {
|
|
9095
|
-
const n =
|
|
9105
|
+
const n = Rn(vv({ primaryType: e, types: t }));
|
|
9096
9106
|
return Le(n);
|
|
9097
9107
|
}
|
|
9098
9108
|
function vv({ primaryType: e, types: t }) {
|
|
@@ -9122,7 +9132,7 @@ function np({ types: e, name: t, type: n, value: r }) {
|
|
|
9122
9132
|
if (n === "bytes")
|
|
9123
9133
|
return [{ type: "bytes32" }, Le(r)];
|
|
9124
9134
|
if (n === "string")
|
|
9125
|
-
return [{ type: "bytes32" }, Le(
|
|
9135
|
+
return [{ type: "bytes32" }, Le(Rn(r))];
|
|
9126
9136
|
if (n.lastIndexOf("]") === n.length - 1) {
|
|
9127
9137
|
const o = n.slice(0, n.lastIndexOf("[")), s = r.map((i) => np({
|
|
9128
9138
|
name: t,
|
|
@@ -9233,7 +9243,7 @@ class $v extends ue {
|
|
|
9233
9243
|
});
|
|
9234
9244
|
}
|
|
9235
9245
|
}
|
|
9236
|
-
const
|
|
9246
|
+
const Tv = /^(.*)\[([0-9]*)\]$/, Av = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/, sp = /^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/, Hl = 2n ** 256n - 1n;
|
|
9237
9247
|
function xr(e, t, n) {
|
|
9238
9248
|
const { checksumAddress: r, staticPosition: o } = n, s = cu(t.type);
|
|
9239
9249
|
if (s) {
|
|
@@ -9267,7 +9277,7 @@ function Nv(e, t, n) {
|
|
|
9267
9277
|
if (!o) {
|
|
9268
9278
|
const a = an(e.readBytes(za)), u = s + a, l = u + Wl;
|
|
9269
9279
|
e.setPosition(u);
|
|
9270
|
-
const f = an(e.readBytes(Wl)), p =
|
|
9280
|
+
const f = an(e.readBytes(Wl)), p = Ao(t);
|
|
9271
9281
|
let d = 0;
|
|
9272
9282
|
const h = [];
|
|
9273
9283
|
for (let m = 0; m < f; ++m) {
|
|
@@ -9280,7 +9290,7 @@ function Nv(e, t, n) {
|
|
|
9280
9290
|
}
|
|
9281
9291
|
return e.setPosition(s + 32), [h, 32];
|
|
9282
9292
|
}
|
|
9283
|
-
if (
|
|
9293
|
+
if (Ao(t)) {
|
|
9284
9294
|
const a = an(e.readBytes(za)), u = s + a, l = [];
|
|
9285
9295
|
for (let f = 0; f < o; ++f) {
|
|
9286
9296
|
e.setPosition(u + f * 32);
|
|
@@ -9329,7 +9339,7 @@ function Cv(e, t) {
|
|
|
9329
9339
|
function Bv(e, t, n) {
|
|
9330
9340
|
const { checksumAddress: r, staticPosition: o } = n, s = t.components.length === 0 || t.components.some(({ name: a }) => !a), i = s ? [] : {};
|
|
9331
9341
|
let c = 0;
|
|
9332
|
-
if (
|
|
9342
|
+
if (Ao(t)) {
|
|
9333
9343
|
const a = an(e.readBytes(za)), u = o + a;
|
|
9334
9344
|
for (let l = 0; l < t.components.length; ++l) {
|
|
9335
9345
|
const f = t.components[l];
|
|
@@ -9357,7 +9367,7 @@ function Mv(e, { staticPosition: t }) {
|
|
|
9357
9367
|
const o = an(e.readBytes(32));
|
|
9358
9368
|
if (o === 0)
|
|
9359
9369
|
return e.setPosition(t + 32), ["", 32];
|
|
9360
|
-
const s = e.readBytes(o, 32), i = Vy(
|
|
9370
|
+
const s = e.readBytes(o, 32), i = Vy(A0(s));
|
|
9361
9371
|
return e.setPosition(t + 32), [i, 32];
|
|
9362
9372
|
}
|
|
9363
9373
|
function Fv({ checksumAddress: e, parameters: t, values: n }) {
|
|
@@ -9539,15 +9549,15 @@ function cu(e) {
|
|
|
9539
9549
|
[t[2] ? Number(t[2]) : null, t[1]]
|
|
9540
9550
|
) : void 0;
|
|
9541
9551
|
}
|
|
9542
|
-
function
|
|
9552
|
+
function Ao(e) {
|
|
9543
9553
|
var r;
|
|
9544
9554
|
const { type: t } = e;
|
|
9545
9555
|
if (t === "string" || t === "bytes" || t.endsWith("[]"))
|
|
9546
9556
|
return !0;
|
|
9547
9557
|
if (t === "tuple")
|
|
9548
|
-
return (r = e.components) == null ? void 0 : r.some(
|
|
9558
|
+
return (r = e.components) == null ? void 0 : r.some(Ao);
|
|
9549
9559
|
const n = cu(e.type);
|
|
9550
|
-
return !!(n &&
|
|
9560
|
+
return !!(n && Ao({
|
|
9551
9561
|
...e,
|
|
9552
9562
|
type: n[1]
|
|
9553
9563
|
}));
|
|
@@ -9709,7 +9719,7 @@ class Gv extends ue {
|
|
|
9709
9719
|
}
|
|
9710
9720
|
}
|
|
9711
9721
|
function qv(e, t, n = {}) {
|
|
9712
|
-
const { as: r = "Array", checksumAddress: o = !1 } = n, s = typeof t == "string" ?
|
|
9722
|
+
const { as: r = "Array", checksumAddress: o = !1 } = n, s = typeof t == "string" ? T0(t) : t, i = Wv(s);
|
|
9713
9723
|
if (dr(s) === 0 && e.length > 0)
|
|
9714
9724
|
throw new Yv();
|
|
9715
9725
|
if (dr(s) && dr(s) < 32)
|
|
@@ -9778,7 +9788,7 @@ function Ha(e, t) {
|
|
|
9778
9788
|
signed: u === "int"
|
|
9779
9789
|
});
|
|
9780
9790
|
}
|
|
9781
|
-
const i = n.match(
|
|
9791
|
+
const i = n.match(Av);
|
|
9782
9792
|
if (i) {
|
|
9783
9793
|
const [a, u] = i;
|
|
9784
9794
|
if (Number.parseInt(u, 10) !== (r.length - 2) / 2)
|
|
@@ -9788,7 +9798,7 @@ function Ha(e, t) {
|
|
|
9788
9798
|
});
|
|
9789
9799
|
return qn(r, o ? 32 : 0);
|
|
9790
9800
|
}
|
|
9791
|
-
const c = n.match(
|
|
9801
|
+
const c = n.match(Tv);
|
|
9792
9802
|
if (c && Array.isArray(r)) {
|
|
9793
9803
|
const [a, u] = c, l = [];
|
|
9794
9804
|
for (let f = 0; f < r.length; f++)
|
|
@@ -9896,7 +9906,7 @@ class up extends Ic {
|
|
|
9896
9906
|
this.iHash.update(s), this.oHash = t.create();
|
|
9897
9907
|
for (let i = 0; i < s.length; i++)
|
|
9898
9908
|
s[i] ^= 106;
|
|
9899
|
-
this.oHash.update(s),
|
|
9909
|
+
this.oHash.update(s), Tr(s);
|
|
9900
9910
|
}
|
|
9901
9911
|
update(t) {
|
|
9902
9912
|
return $r(this), this.iHash.update(t), this;
|
|
@@ -9923,7 +9933,7 @@ class up extends Ic {
|
|
|
9923
9933
|
const lp = (e, t, n) => new up(e, t).update(n).digest();
|
|
9924
9934
|
lp.create = (e, t) => new up(e, t);
|
|
9925
9935
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
9926
|
-
const Ye = BigInt(0), He = BigInt(1),
|
|
9936
|
+
const Ye = BigInt(0), He = BigInt(1), Dn = /* @__PURE__ */ BigInt(2), Qv = /* @__PURE__ */ BigInt(3), fp = /* @__PURE__ */ BigInt(4), dp = /* @__PURE__ */ BigInt(5), pp = /* @__PURE__ */ BigInt(8);
|
|
9927
9937
|
function qe(e, t) {
|
|
9928
9938
|
const n = e % t;
|
|
9929
9939
|
return n >= Ye ? n : t + n;
|
|
@@ -9955,7 +9965,7 @@ function hp(e, t) {
|
|
|
9955
9965
|
return r;
|
|
9956
9966
|
}
|
|
9957
9967
|
function Jv(e, t) {
|
|
9958
|
-
const n = (e.ORDER - dp) / pp, r = e.mul(t,
|
|
9968
|
+
const n = (e.ORDER - dp) / pp, r = e.mul(t, Dn), o = e.pow(r, n), s = e.mul(t, o), i = e.mul(e.mul(s, Dn), o), c = e.mul(s, e.sub(i, e.ONE));
|
|
9959
9969
|
if (!e.eql(e.sqr(c), t))
|
|
9960
9970
|
throw new Error("Cannot find square root");
|
|
9961
9971
|
return c;
|
|
@@ -9964,9 +9974,9 @@ function e6(e) {
|
|
|
9964
9974
|
if (e < BigInt(3))
|
|
9965
9975
|
throw new Error("sqrt is not defined for small field");
|
|
9966
9976
|
let t = e - He, n = 0;
|
|
9967
|
-
for (; t %
|
|
9968
|
-
t /=
|
|
9969
|
-
let r =
|
|
9977
|
+
for (; t % Dn === Ye; )
|
|
9978
|
+
t /= Dn, n++;
|
|
9979
|
+
let r = Dn;
|
|
9970
9980
|
const o = fu(e);
|
|
9971
9981
|
for (; Gl(o, r) === 1; )
|
|
9972
9982
|
if (r++ > 1e3)
|
|
@@ -9974,7 +9984,7 @@ function e6(e) {
|
|
|
9974
9984
|
if (n === 1)
|
|
9975
9985
|
return hp;
|
|
9976
9986
|
let s = o.pow(r, t);
|
|
9977
|
-
const i = (t + He) /
|
|
9987
|
+
const i = (t + He) / Dn;
|
|
9978
9988
|
return function(a, u) {
|
|
9979
9989
|
if (a.is0(u))
|
|
9980
9990
|
return u;
|
|
@@ -10042,7 +10052,7 @@ function mp(e, t, n = !1) {
|
|
|
10042
10052
|
return t.reduceRight((i, c, a) => e.is0(c) ? i : (r[a] = e.mul(i, r[a]), e.mul(i, c)), s), r;
|
|
10043
10053
|
}
|
|
10044
10054
|
function Gl(e, t) {
|
|
10045
|
-
const n = (e.ORDER - He) /
|
|
10055
|
+
const n = (e.ORDER - He) / Dn, r = e.pow(t, n), o = e.eql(r, e.ONE), s = e.eql(r, e.ZERO), i = e.eql(r, e.neg(e.ONE));
|
|
10046
10056
|
if (!o && !s && !i)
|
|
10047
10057
|
throw new Error("invalid Legendre symbol result");
|
|
10048
10058
|
return o ? 1 : s ? 0 : -1;
|
|
@@ -10094,7 +10104,7 @@ function fu(e, t, n = !1, r = {}) {
|
|
|
10094
10104
|
fromBytes: (a) => {
|
|
10095
10105
|
if (a.length !== s)
|
|
10096
10106
|
throw new Error("Field.fromBytes: expected " + s + " bytes, got " + a.length);
|
|
10097
|
-
return n ? v0(a) :
|
|
10107
|
+
return n ? v0(a) : Hn(a);
|
|
10098
10108
|
},
|
|
10099
10109
|
// TODO: we don't need it here, move out to separate fn
|
|
10100
10110
|
invertBatch: (a) => mp(c, a),
|
|
@@ -10118,7 +10128,7 @@ function s6(e, t, n = !1) {
|
|
|
10118
10128
|
const r = e.length, o = gp(t), s = yp(t);
|
|
10119
10129
|
if (r < 16 || r < s || r > 1024)
|
|
10120
10130
|
throw new Error("expected " + s + "-1024 bytes of input, got " + r);
|
|
10121
|
-
const i = n ? v0(e) :
|
|
10131
|
+
const i = n ? v0(e) : Hn(e), c = qe(i, t - He) + He;
|
|
10122
10132
|
return n ? x0(c, o) : Uo(c, o);
|
|
10123
10133
|
}
|
|
10124
10134
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
@@ -10259,7 +10269,7 @@ function u6(e, t, n, r) {
|
|
|
10259
10269
|
const o = n.length, s = r.length;
|
|
10260
10270
|
if (o !== s)
|
|
10261
10271
|
throw new Error("arrays of points and scalars must have equal length");
|
|
10262
|
-
const i = e.ZERO, c =
|
|
10272
|
+
const i = e.ZERO, c = Ay(BigInt(o));
|
|
10263
10273
|
let a = 1;
|
|
10264
10274
|
c > 12 ? a = c - 3 : c > 4 ? a = c - 2 : c > 0 && (a = 2);
|
|
10265
10275
|
const u = Ys(a), l = new Array(Number(u) + 1).fill(i), f = Math.floor((t.BITS - 1) / a) * a;
|
|
@@ -10397,7 +10407,7 @@ const tn = {
|
|
|
10397
10407
|
throw new t("invalid signature integer: negative");
|
|
10398
10408
|
if (e[0] === 0 && !(e[1] & 128))
|
|
10399
10409
|
throw new t("invalid signature integer: unnecessary leading zero");
|
|
10400
|
-
return
|
|
10410
|
+
return Hn(e);
|
|
10401
10411
|
}
|
|
10402
10412
|
},
|
|
10403
10413
|
toSig(e) {
|
|
@@ -10415,7 +10425,7 @@ const tn = {
|
|
|
10415
10425
|
}
|
|
10416
10426
|
};
|
|
10417
10427
|
function Gi(e, t) {
|
|
10418
|
-
return
|
|
10428
|
+
return To(Uo(e, t));
|
|
10419
10429
|
}
|
|
10420
10430
|
const rn = BigInt(0), Me = BigInt(1);
|
|
10421
10431
|
BigInt(2);
|
|
@@ -10447,13 +10457,13 @@ function p6(e) {
|
|
|
10447
10457
|
function f(E) {
|
|
10448
10458
|
const { allowedPrivateKeyLengths: R, nByteLength: B, wrapPrivateKey: F, n: L } = t;
|
|
10449
10459
|
if (R && typeof E != "bigint") {
|
|
10450
|
-
if (_o(E) && (E =
|
|
10460
|
+
if (_o(E) && (E = To(E)), typeof E != "string" || !R.includes(E.length))
|
|
10451
10461
|
throw new Error("invalid private key");
|
|
10452
10462
|
E = E.padStart(B * 2, "0");
|
|
10453
10463
|
}
|
|
10454
10464
|
let b;
|
|
10455
10465
|
try {
|
|
10456
|
-
b = typeof E == "bigint" ? E :
|
|
10466
|
+
b = typeof E == "bigint" ? E : Hn(gt("private key", E, B));
|
|
10457
10467
|
} catch {
|
|
10458
10468
|
throw new Error("invalid private key, expected hex or " + B + " bytes, got " + typeof E);
|
|
10459
10469
|
}
|
|
@@ -10562,8 +10572,8 @@ function p6(e) {
|
|
|
10562
10572
|
*/
|
|
10563
10573
|
equals(R) {
|
|
10564
10574
|
p(R);
|
|
10565
|
-
const { px: B, py: F, pz: L } = this, { px: b, py: g, pz: v } = R, N = n.eql(n.mul(B, v), n.mul(b, L)),
|
|
10566
|
-
return N &&
|
|
10575
|
+
const { px: B, py: F, pz: L } = this, { px: b, py: g, pz: v } = R, N = n.eql(n.mul(B, v), n.mul(b, L)), A = n.eql(n.mul(F, v), n.mul(g, L));
|
|
10576
|
+
return N && A;
|
|
10567
10577
|
}
|
|
10568
10578
|
/**
|
|
10569
10579
|
* Flips point to one corresponding to (x, -y) in Affine coordinates.
|
|
@@ -10577,8 +10587,8 @@ function p6(e) {
|
|
|
10577
10587
|
// Cost: 8M + 3S + 3*a + 2*b3 + 15add.
|
|
10578
10588
|
double() {
|
|
10579
10589
|
const { a: R, b: B } = t, F = n.mul(B, qi), { px: L, py: b, pz: g } = this;
|
|
10580
|
-
let v = n.ZERO, N = n.ZERO,
|
|
10581
|
-
return
|
|
10590
|
+
let v = n.ZERO, N = n.ZERO, A = n.ZERO, O = n.mul(L, L), I = n.mul(b, b), y = n.mul(g, g), T = n.mul(L, b);
|
|
10591
|
+
return T = n.add(T, T), A = n.mul(L, g), A = n.add(A, A), v = n.mul(R, A), N = n.mul(F, y), N = n.add(v, N), v = n.sub(I, N), N = n.add(I, N), N = n.mul(v, N), v = n.mul(T, v), A = n.mul(F, A), y = n.mul(R, y), T = n.sub(O, y), T = n.mul(R, T), T = n.add(T, A), A = n.add(O, O), O = n.add(A, O), O = n.add(O, y), O = n.mul(O, T), N = n.add(N, O), y = n.mul(b, g), y = n.add(y, y), O = n.mul(y, T), v = n.sub(v, O), A = n.mul(y, I), A = n.add(A, A), A = n.add(A, A), new m(v, N, A);
|
|
10582
10592
|
}
|
|
10583
10593
|
// Renes-Costello-Batina exception-free addition formula.
|
|
10584
10594
|
// There is 30% faster Jacobian formula, but it is not complete.
|
|
@@ -10587,12 +10597,12 @@ function p6(e) {
|
|
|
10587
10597
|
add(R) {
|
|
10588
10598
|
p(R);
|
|
10589
10599
|
const { px: B, py: F, pz: L } = this, { px: b, py: g, pz: v } = R;
|
|
10590
|
-
let N = n.ZERO,
|
|
10600
|
+
let N = n.ZERO, A = n.ZERO, O = n.ZERO;
|
|
10591
10601
|
const I = t.a, y = n.mul(t.b, qi);
|
|
10592
|
-
let
|
|
10593
|
-
M = n.mul(M, D), D = n.add(
|
|
10602
|
+
let T = n.mul(B, b), $ = n.mul(F, g), P = n.mul(L, v), M = n.add(B, F), D = n.add(b, g);
|
|
10603
|
+
M = n.mul(M, D), D = n.add(T, $), M = n.sub(M, D), D = n.add(B, L);
|
|
10594
10604
|
let _ = n.add(b, v);
|
|
10595
|
-
return D = n.mul(D, _), _ = n.add(
|
|
10605
|
+
return D = n.mul(D, _), _ = n.add(T, P), D = n.sub(D, _), _ = n.add(F, L), N = n.add(g, v), _ = n.mul(_, N), N = n.add($, P), _ = n.sub(_, N), O = n.mul(I, D), N = n.mul(y, P), O = n.add(N, O), N = n.sub($, O), O = n.add($, O), A = n.mul(N, O), $ = n.add(T, T), $ = n.add($, T), P = n.mul(I, P), D = n.mul(y, D), $ = n.add($, P), P = n.sub(T, P), P = n.mul(I, P), D = n.add(D, P), T = n.mul($, D), A = n.add(A, T), T = n.mul(_, D), N = n.mul(M, N), N = n.sub(N, T), T = n.mul(M, $), O = n.mul(_, O), O = n.add(O, T), new m(N, A, O);
|
|
10596
10606
|
}
|
|
10597
10607
|
subtract(R) {
|
|
10598
10608
|
return this.add(R.negate());
|
|
@@ -10618,10 +10628,10 @@ function p6(e) {
|
|
|
10618
10628
|
return this;
|
|
10619
10629
|
if (!B || x.hasPrecomputes(this))
|
|
10620
10630
|
return x.wNAFCachedUnsafe(this, R, m.normalizeZ);
|
|
10621
|
-
let { k1neg: b, k1: g, k2neg: v, k2: N } = B.splitScalar(R),
|
|
10631
|
+
let { k1neg: b, k1: g, k2neg: v, k2: N } = B.splitScalar(R), A = L, O = L, I = this;
|
|
10622
10632
|
for (; g > rn || N > rn; )
|
|
10623
|
-
g & Me && (
|
|
10624
|
-
return b && (
|
|
10633
|
+
g & Me && (A = A.add(I)), N & Me && (O = O.add(I)), I = I.double(), g >>= Me, N >>= Me;
|
|
10634
|
+
return b && (A = A.negate()), v && (O = O.negate()), O = new m(n.mul(O.px, B.beta), O.py, O.pz), A.add(O);
|
|
10625
10635
|
}
|
|
10626
10636
|
/**
|
|
10627
10637
|
* Constant time multiplication.
|
|
@@ -10637,9 +10647,9 @@ function p6(e) {
|
|
|
10637
10647
|
wr("scalar", R, Me, F);
|
|
10638
10648
|
let L, b;
|
|
10639
10649
|
if (B) {
|
|
10640
|
-
const { k1neg: g, k1: v, k2neg: N, k2:
|
|
10641
|
-
let { p: O, f: I } = this.wNAF(v), { p: y, f:
|
|
10642
|
-
O = x.constTimeNegate(g, O), y = x.constTimeNegate(N, y), y = new m(n.mul(y.px, B.beta), y.py, y.pz), L = O.add(y), b = I.add(
|
|
10650
|
+
const { k1neg: g, k1: v, k2neg: N, k2: A } = B.splitScalar(R);
|
|
10651
|
+
let { p: O, f: I } = this.wNAF(v), { p: y, f: T } = this.wNAF(A);
|
|
10652
|
+
O = x.constTimeNegate(g, O), y = x.constTimeNegate(N, y), y = new m(n.mul(y.px, B.beta), y.py, y.pz), L = O.add(y), b = I.add(T);
|
|
10643
10653
|
} else {
|
|
10644
10654
|
const { p: g, f: v } = this.wNAF(R);
|
|
10645
10655
|
L = g, b = v;
|
|
@@ -10678,7 +10688,7 @@ function p6(e) {
|
|
|
10678
10688
|
return $o("isCompressed", R), this.assertValidity(), o(m, this, R);
|
|
10679
10689
|
}
|
|
10680
10690
|
toHex(R = !0) {
|
|
10681
|
-
return $o("isCompressed", R),
|
|
10691
|
+
return $o("isCompressed", R), To(this.toRawBytes(R));
|
|
10682
10692
|
}
|
|
10683
10693
|
}
|
|
10684
10694
|
m.BASE = new m(t.Gx, t.Gy, n.ONE), m.ZERO = new m(n.ZERO, n.ONE, n.ZERO);
|
|
@@ -10713,14 +10723,14 @@ function m6(e) {
|
|
|
10713
10723
|
}
|
|
10714
10724
|
const { ProjectivePoint: l, normPrivateKeyToScalar: f, weierstrassEquation: p, isWithinCurveOrder: d } = p6({
|
|
10715
10725
|
...t,
|
|
10716
|
-
toBytes(y,
|
|
10717
|
-
const P =
|
|
10718
|
-
return $o("isCompressed", $), $ ? D(Uint8Array.from([
|
|
10726
|
+
toBytes(y, T, $) {
|
|
10727
|
+
const P = T.toAffine(), M = n.toBytes(P.x), D = Ps;
|
|
10728
|
+
return $o("isCompressed", $), $ ? D(Uint8Array.from([T.hasEvenY() ? 2 : 3]), M) : D(Uint8Array.from([4]), M, n.toBytes(P.y));
|
|
10719
10729
|
},
|
|
10720
10730
|
fromBytes(y) {
|
|
10721
|
-
const
|
|
10722
|
-
if (
|
|
10723
|
-
const M =
|
|
10731
|
+
const T = y.length, $ = y[0], P = y.subarray(1);
|
|
10732
|
+
if (T === i && ($ === 2 || $ === 3)) {
|
|
10733
|
+
const M = Hn(P);
|
|
10724
10734
|
if (!Qc(M, Me, n.ORDER))
|
|
10725
10735
|
throw new Error("Point is not on curve");
|
|
10726
10736
|
const D = p(M);
|
|
@@ -10733,36 +10743,36 @@ function m6(e) {
|
|
|
10733
10743
|
}
|
|
10734
10744
|
const j = (_ & Me) === Me;
|
|
10735
10745
|
return ($ & 1) === 1 !== j && (_ = n.neg(_)), { x: M, y: _ };
|
|
10736
|
-
} else if (
|
|
10746
|
+
} else if (T === c && $ === 4) {
|
|
10737
10747
|
const M = n.fromBytes(P.subarray(0, n.BYTES)), D = n.fromBytes(P.subarray(n.BYTES, 2 * n.BYTES));
|
|
10738
10748
|
return { x: M, y: D };
|
|
10739
10749
|
} else {
|
|
10740
10750
|
const M = i, D = c;
|
|
10741
|
-
throw new Error("invalid Point, expected length of " + M + ", or uncompressed " + D + ", got " +
|
|
10751
|
+
throw new Error("invalid Point, expected length of " + M + ", or uncompressed " + D + ", got " + T);
|
|
10742
10752
|
}
|
|
10743
10753
|
}
|
|
10744
10754
|
});
|
|
10745
10755
|
function h(y) {
|
|
10746
|
-
const
|
|
10747
|
-
return y >
|
|
10756
|
+
const T = r >> Me;
|
|
10757
|
+
return y > T;
|
|
10748
10758
|
}
|
|
10749
10759
|
function m(y) {
|
|
10750
10760
|
return h(y) ? a(-y) : y;
|
|
10751
10761
|
}
|
|
10752
|
-
const w = (y,
|
|
10762
|
+
const w = (y, T, $) => Hn(y.slice(T, $));
|
|
10753
10763
|
class S {
|
|
10754
|
-
constructor(
|
|
10755
|
-
wr("r",
|
|
10764
|
+
constructor(T, $, P) {
|
|
10765
|
+
wr("r", T, Me, r), wr("s", $, Me, r), this.r = T, this.s = $, P != null && (this.recovery = P), Object.freeze(this);
|
|
10756
10766
|
}
|
|
10757
10767
|
// pair (bytes of r, bytes of s)
|
|
10758
|
-
static fromCompact(
|
|
10768
|
+
static fromCompact(T) {
|
|
10759
10769
|
const $ = o;
|
|
10760
|
-
return
|
|
10770
|
+
return T = gt("compactSignature", T, $ * 2), new S(w(T, 0, $), w(T, $, 2 * $));
|
|
10761
10771
|
}
|
|
10762
10772
|
// DER encoded ECDSA signature
|
|
10763
10773
|
// https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script
|
|
10764
|
-
static fromDER(
|
|
10765
|
-
const { r: $, s: P } = tn.toSig(gt("DER",
|
|
10774
|
+
static fromDER(T) {
|
|
10775
|
+
const { r: $, s: P } = tn.toSig(gt("DER", T));
|
|
10766
10776
|
return new S($, P);
|
|
10767
10777
|
}
|
|
10768
10778
|
/**
|
|
@@ -10771,11 +10781,11 @@ function m6(e) {
|
|
|
10771
10781
|
*/
|
|
10772
10782
|
assertValidity() {
|
|
10773
10783
|
}
|
|
10774
|
-
addRecoveryBit(
|
|
10775
|
-
return new S(this.r, this.s,
|
|
10784
|
+
addRecoveryBit(T) {
|
|
10785
|
+
return new S(this.r, this.s, T);
|
|
10776
10786
|
}
|
|
10777
|
-
recoverPublicKey(
|
|
10778
|
-
const { r: $, s: P, recovery: M } = this, D = L(gt("msgHash",
|
|
10787
|
+
recoverPublicKey(T) {
|
|
10788
|
+
const { r: $, s: P, recovery: M } = this, D = L(gt("msgHash", T));
|
|
10779
10789
|
if (M == null || ![0, 1, 2, 3].includes(M))
|
|
10780
10790
|
throw new Error("recovery id invalid");
|
|
10781
10791
|
const _ = M === 2 || M === 3 ? $ + t.n : $;
|
|
@@ -10805,8 +10815,8 @@ function m6(e) {
|
|
|
10805
10815
|
return Es(this.toCompactHex());
|
|
10806
10816
|
}
|
|
10807
10817
|
toCompactHex() {
|
|
10808
|
-
const
|
|
10809
|
-
return Gi(this.r,
|
|
10818
|
+
const T = o;
|
|
10819
|
+
return Gi(this.r, T) + Gi(this.s, T);
|
|
10810
10820
|
}
|
|
10811
10821
|
}
|
|
10812
10822
|
const x = {
|
|
@@ -10834,12 +10844,12 @@ function m6(e) {
|
|
|
10834
10844
|
* const fast = utils.precompute(8, ProjectivePoint.fromHex(someonesPubKey));
|
|
10835
10845
|
* fast.multiply(privKey); // much faster ECDH now
|
|
10836
10846
|
*/
|
|
10837
|
-
precompute(y = 8,
|
|
10838
|
-
return
|
|
10847
|
+
precompute(y = 8, T = l.BASE) {
|
|
10848
|
+
return T._setWindowSize(y), T.multiply(BigInt(3)), T;
|
|
10839
10849
|
}
|
|
10840
10850
|
};
|
|
10841
|
-
function E(y,
|
|
10842
|
-
return l.fromPrivateKey(y).toRawBytes(
|
|
10851
|
+
function E(y, T = !0) {
|
|
10852
|
+
return l.fromPrivateKey(y).toRawBytes(T);
|
|
10843
10853
|
}
|
|
10844
10854
|
function R(y) {
|
|
10845
10855
|
if (typeof y == "bigint")
|
|
@@ -10850,31 +10860,31 @@ function m6(e) {
|
|
|
10850
10860
|
if (!(t.allowedPrivateKeyLengths || o === M))
|
|
10851
10861
|
return $ === M || $ === D;
|
|
10852
10862
|
}
|
|
10853
|
-
function B(y,
|
|
10863
|
+
function B(y, T, $ = !0) {
|
|
10854
10864
|
if (R(y) === !0)
|
|
10855
10865
|
throw new Error("first arg must be private key");
|
|
10856
|
-
if (R(
|
|
10866
|
+
if (R(T) === !1)
|
|
10857
10867
|
throw new Error("second arg must be public key");
|
|
10858
|
-
return l.fromHex(
|
|
10868
|
+
return l.fromHex(T).multiply(f(y)).toRawBytes($);
|
|
10859
10869
|
}
|
|
10860
10870
|
const F = t.bits2int || function(y) {
|
|
10861
10871
|
if (y.length > 8192)
|
|
10862
10872
|
throw new Error("input is too large");
|
|
10863
|
-
const
|
|
10864
|
-
return $ > 0 ?
|
|
10873
|
+
const T = Hn(y), $ = y.length * 8 - s;
|
|
10874
|
+
return $ > 0 ? T >> BigInt($) : T;
|
|
10865
10875
|
}, L = t.bits2int_modN || function(y) {
|
|
10866
10876
|
return a(F(y));
|
|
10867
10877
|
}, b = Ys(s);
|
|
10868
10878
|
function g(y) {
|
|
10869
10879
|
return wr("num < 2^" + s, y, rn, b), Uo(y, o);
|
|
10870
10880
|
}
|
|
10871
|
-
function v(y,
|
|
10881
|
+
function v(y, T, $ = N) {
|
|
10872
10882
|
if (["recovered", "canonical"].some((ie) => ie in $))
|
|
10873
10883
|
throw new Error("sign() legacy options not supported");
|
|
10874
10884
|
const { hash: P, randomBytes: M } = t;
|
|
10875
10885
|
let { lowS: D, prehash: _, extraEntropy: j } = $;
|
|
10876
10886
|
D == null && (D = !0), y = gt("msgHash", y), Yl($), _ && (y = gt("prehashed msgHash", P(y)));
|
|
10877
|
-
const H = L(y), K = f(
|
|
10887
|
+
const H = L(y), K = f(T), V = [g(K), g(H)];
|
|
10878
10888
|
if (j != null && j !== !1) {
|
|
10879
10889
|
const ie = j === !0 ? M(n.BYTES) : j;
|
|
10880
10890
|
V.push(gt("extraEntropy", ie));
|
|
@@ -10890,21 +10900,21 @@ function m6(e) {
|
|
|
10890
10900
|
const me = a(ve * a(q + ae * K));
|
|
10891
10901
|
if (me === rn)
|
|
10892
10902
|
return;
|
|
10893
|
-
let ne = (he.x === ae ? 0 : 2) | Number(he.y & Me),
|
|
10894
|
-
return D && h(me) && (
|
|
10903
|
+
let ne = (he.x === ae ? 0 : 2) | Number(he.y & Me), Ae = me;
|
|
10904
|
+
return D && h(me) && (Ae = m(me), ne ^= 1), new S(ae, Ae, ne);
|
|
10895
10905
|
}
|
|
10896
10906
|
return { seed: z, k2sig: ee };
|
|
10897
10907
|
}
|
|
10898
|
-
const N = { lowS: t.lowS, prehash: !1 },
|
|
10899
|
-
function O(y,
|
|
10900
|
-
const { seed: P, k2sig: M } = v(y,
|
|
10908
|
+
const N = { lowS: t.lowS, prehash: !1 }, A = { lowS: t.lowS, prehash: !1 };
|
|
10909
|
+
function O(y, T, $ = N) {
|
|
10910
|
+
const { seed: P, k2sig: M } = v(y, T, $), D = t;
|
|
10901
10911
|
return Ry(D.hash.outputLen, D.nByteLength, D.hmac)(P, M);
|
|
10902
10912
|
}
|
|
10903
10913
|
l.BASE._setWindowSize(8);
|
|
10904
|
-
function I(y,
|
|
10914
|
+
function I(y, T, $, P = A) {
|
|
10905
10915
|
var ne;
|
|
10906
10916
|
const M = y;
|
|
10907
|
-
|
|
10917
|
+
T = gt("msgHash", T), $ = gt("publicKey", $);
|
|
10908
10918
|
const { lowS: D, prehash: _, format: j } = P;
|
|
10909
10919
|
if (Yl(P), "strict" in P)
|
|
10910
10920
|
throw new Error("options.strict was renamed to lowS");
|
|
@@ -10918,9 +10928,9 @@ function m6(e) {
|
|
|
10918
10928
|
if (K && (V = new S(M.r, M.s)), H) {
|
|
10919
10929
|
try {
|
|
10920
10930
|
j !== "compact" && (V = S.fromDER(M));
|
|
10921
|
-
} catch (
|
|
10922
|
-
if (!(
|
|
10923
|
-
throw
|
|
10931
|
+
} catch (Ae) {
|
|
10932
|
+
if (!(Ae instanceof tn.Err))
|
|
10933
|
+
throw Ae;
|
|
10924
10934
|
}
|
|
10925
10935
|
!V && j !== "der" && (V = S.fromCompact(M));
|
|
10926
10936
|
}
|
|
@@ -10930,8 +10940,8 @@ function m6(e) {
|
|
|
10930
10940
|
}
|
|
10931
10941
|
if (!V || D && V.hasHighS())
|
|
10932
10942
|
return !1;
|
|
10933
|
-
_ && (
|
|
10934
|
-
const { r: q, s: ee } = V, ie = L(
|
|
10943
|
+
_ && (T = t.hash(T));
|
|
10944
|
+
const { r: q, s: ee } = V, ie = L(T), ye = u(ee), ve = a(ie * ye), he = a(q * ye), ae = (ne = l.BASE.multiplyAndAddUnsafe(z, ve, he)) == null ? void 0 : ne.toAffine();
|
|
10935
10945
|
return ae ? a(ae.x) === q : !1;
|
|
10936
10946
|
}
|
|
10937
10947
|
return {
|
|
@@ -11011,7 +11021,7 @@ function E6(e) {
|
|
|
11011
11021
|
}
|
|
11012
11022
|
function $p(e) {
|
|
11013
11023
|
if (e.length !== 130 && e.length !== 132)
|
|
11014
|
-
throw new
|
|
11024
|
+
throw new A6({ signature: e });
|
|
11015
11025
|
const t = BigInt(Ut(e, 0, 32)), n = BigInt(Ut(e, 32, 64)), r = (() => {
|
|
11016
11026
|
const o = +`0x${e.slice(130)}`;
|
|
11017
11027
|
if (!Number.isNaN(o))
|
|
@@ -11035,7 +11045,7 @@ function P6(e) {
|
|
|
11035
11045
|
return S6(e);
|
|
11036
11046
|
}
|
|
11037
11047
|
function S6(e) {
|
|
11038
|
-
const t = typeof e == "string" ? $p(e) : e instanceof Uint8Array ? E6(e) : typeof e.r == "string" ?
|
|
11048
|
+
const t = typeof e == "string" ? $p(e) : e instanceof Uint8Array ? E6(e) : typeof e.r == "string" ? T6(e) : e.v ? $6(e) : {
|
|
11039
11049
|
r: e.r,
|
|
11040
11050
|
s: e.s,
|
|
11041
11051
|
...typeof e.yParity < "u" ? { yParity: e.yParity } : {}
|
|
@@ -11049,7 +11059,7 @@ function $6(e) {
|
|
|
11049
11059
|
yParity: du(e.v)
|
|
11050
11060
|
};
|
|
11051
11061
|
}
|
|
11052
|
-
function
|
|
11062
|
+
function T6(e) {
|
|
11053
11063
|
const t = (() => {
|
|
11054
11064
|
const n = e.v ? Number(e.v) : void 0;
|
|
11055
11065
|
let r = e.yParity ? Number(e.yParity) : void 0;
|
|
@@ -11072,7 +11082,7 @@ function du(e) {
|
|
|
11072
11082
|
return e % 2 === 0 ? 1 : 0;
|
|
11073
11083
|
throw new O6({ value: e });
|
|
11074
11084
|
}
|
|
11075
|
-
class
|
|
11085
|
+
class A6 extends ue {
|
|
11076
11086
|
constructor({ signature: t }) {
|
|
11077
11087
|
super(`Value \`${t}\` is an invalid signature size.`, {
|
|
11078
11088
|
metaMessages: [
|
|
@@ -11150,7 +11160,7 @@ function C6(e) {
|
|
|
11150
11160
|
};
|
|
11151
11161
|
}
|
|
11152
11162
|
const B6 = "0x8010801080108010801080108010801080108010801080108010801080108010", M6 = ip("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");
|
|
11153
|
-
function
|
|
11163
|
+
function Tp(e) {
|
|
11154
11164
|
if (typeof e == "string") {
|
|
11155
11165
|
if (Ut(e, -32) !== B6)
|
|
11156
11166
|
throw new k6(e);
|
|
@@ -11158,7 +11168,7 @@ function Ap(e) {
|
|
|
11158
11168
|
Sp(e.authorization);
|
|
11159
11169
|
}
|
|
11160
11170
|
function F6(e) {
|
|
11161
|
-
|
|
11171
|
+
Tp(e);
|
|
11162
11172
|
const t = O0(Ut(e, -64, -32)), n = Ut(e, -t - 64, -64), r = Ut(e, 0, -t - 64), [o, s, i] = qv(M6, n);
|
|
11163
11173
|
return {
|
|
11164
11174
|
authorization: I6({
|
|
@@ -11175,7 +11185,7 @@ function F6(e) {
|
|
|
11175
11185
|
}
|
|
11176
11186
|
function L6(e) {
|
|
11177
11187
|
try {
|
|
11178
|
-
return
|
|
11188
|
+
return Tp(e), !0;
|
|
11179
11189
|
} catch {
|
|
11180
11190
|
return !1;
|
|
11181
11191
|
}
|
|
@@ -11365,7 +11375,7 @@ async function V6(e, t) {
|
|
|
11365
11375
|
}
|
|
11366
11376
|
const B = R.value;
|
|
11367
11377
|
for (let F = 0; F < B.length; F++) {
|
|
11368
|
-
const { returnData: L, success: b } = B[F], { callData: g } = d[E][F], { abi: v, address: N, functionName:
|
|
11378
|
+
const { returnData: L, success: b } = B[F], { callData: g } = d[E][F], { abi: v, address: N, functionName: A, args: O } = u[S.length];
|
|
11369
11379
|
try {
|
|
11370
11380
|
if (g === "0x")
|
|
11371
11381
|
throw new Bo();
|
|
@@ -11375,7 +11385,7 @@ async function V6(e, t) {
|
|
|
11375
11385
|
abi: v,
|
|
11376
11386
|
args: O,
|
|
11377
11387
|
data: L,
|
|
11378
|
-
functionName:
|
|
11388
|
+
functionName: A
|
|
11379
11389
|
});
|
|
11380
11390
|
S.push(o ? { result: I, status: "success" } : I);
|
|
11381
11391
|
} catch (I) {
|
|
@@ -11384,7 +11394,7 @@ async function V6(e, t) {
|
|
|
11384
11394
|
address: N,
|
|
11385
11395
|
args: O,
|
|
11386
11396
|
docsPath: "/docs/contract/multicall",
|
|
11387
|
-
functionName:
|
|
11397
|
+
functionName: A
|
|
11388
11398
|
});
|
|
11389
11399
|
if (!o)
|
|
11390
11400
|
throw y;
|
|
@@ -11427,7 +11437,7 @@ async function Za(e, t) {
|
|
|
11427
11437
|
...a0(p),
|
|
11428
11438
|
calls: p.calls.map((h, m) => {
|
|
11429
11439
|
var v, N;
|
|
11430
|
-
const { abi: w, args: S, functionName: x, to: E } = o[d].calls[m], R = ((v = h.error) == null ? void 0 : v.data) ?? h.returnData, B = BigInt(h.gasUsed), F = (N = h.logs) == null ? void 0 : N.map((
|
|
11440
|
+
const { abi: w, args: S, functionName: x, to: E } = o[d].calls[m], R = ((v = h.error) == null ? void 0 : v.data) ?? h.returnData, B = BigInt(h.gasUsed), F = (N = h.logs) == null ? void 0 : N.map((A) => fn(A)), L = h.status === "0x1" ? "success" : "failure", b = w && L === "success" && R !== "0x" ? tr({
|
|
11431
11441
|
abi: w,
|
|
11432
11442
|
data: R,
|
|
11433
11443
|
functionName: x
|
|
@@ -11435,9 +11445,9 @@ async function Za(e, t) {
|
|
|
11435
11445
|
var O;
|
|
11436
11446
|
if (L === "success")
|
|
11437
11447
|
return;
|
|
11438
|
-
let
|
|
11439
|
-
if (((O = h.error) == null ? void 0 : O.data) === "0x" ?
|
|
11440
|
-
return Nr(
|
|
11448
|
+
let A;
|
|
11449
|
+
if (((O = h.error) == null ? void 0 : O.data) === "0x" ? A = new Bo() : h.error && (A = new Vs(h.error)), !!A)
|
|
11450
|
+
return Nr(A, {
|
|
11441
11451
|
abi: w ?? [],
|
|
11442
11452
|
address: E ?? "0x",
|
|
11443
11453
|
args: S,
|
|
@@ -11506,11 +11516,11 @@ function Ka(e, t) {
|
|
|
11506
11516
|
})) : !1;
|
|
11507
11517
|
}
|
|
11508
11518
|
}
|
|
11509
|
-
function
|
|
11519
|
+
function Ap(e, t, n) {
|
|
11510
11520
|
for (const r in e) {
|
|
11511
11521
|
const o = e[r], s = t[r];
|
|
11512
11522
|
if (o.type === "tuple" && s.type === "tuple" && "components" in o && "components" in s)
|
|
11513
|
-
return
|
|
11523
|
+
return Ap(o.components, s.components, n[r]);
|
|
11514
11524
|
const i = [o.type, s.type];
|
|
11515
11525
|
if (i.includes("address") && i.includes("bytes20") ? !0 : i.includes("address") && i.includes("string") ? Ua(n[r], {
|
|
11516
11526
|
strict: !1
|
|
@@ -11555,7 +11565,7 @@ function ri(e, t, n) {
|
|
|
11555
11565
|
return d ? Ka(f, d) : !1;
|
|
11556
11566
|
})) {
|
|
11557
11567
|
if (c && "inputs" in c && c.inputs) {
|
|
11558
|
-
const f =
|
|
11568
|
+
const f = Ap(u.inputs, c.inputs, r);
|
|
11559
11569
|
if (f)
|
|
11560
11570
|
throw new q6({
|
|
11561
11571
|
abiItem: u,
|
|
@@ -11824,12 +11834,12 @@ async function t5(e, t) {
|
|
|
11824
11834
|
],
|
|
11825
11835
|
traceTransfers: c,
|
|
11826
11836
|
validation: a
|
|
11827
|
-
}), d = i ? p[2] : p[0], [h, m, , w, S, x, E, R] = i ? p : [], { calls: B, ...F } = d, L = B.slice(0, -1) ?? [], b = (h == null ? void 0 : h.calls) ?? [], g = (m == null ? void 0 : m.calls) ?? [], v = [...b, ...g].map((P) => P.status === "success" ? Gt(P.data) : null), N = (w == null ? void 0 : w.calls) ?? [],
|
|
11837
|
+
}), d = i ? p[2] : p[0], [h, m, , w, S, x, E, R] = i ? p : [], { calls: B, ...F } = d, L = B.slice(0, -1) ?? [], b = (h == null ? void 0 : h.calls) ?? [], g = (m == null ? void 0 : m.calls) ?? [], v = [...b, ...g].map((P) => P.status === "success" ? Gt(P.data) : null), N = (w == null ? void 0 : w.calls) ?? [], A = (S == null ? void 0 : S.calls) ?? [], O = [...N, ...A].map((P) => P.status === "success" ? Gt(P.data) : null), I = ((x == null ? void 0 : x.calls) ?? []).map((P) => P.status === "success" ? P.result : null), y = ((R == null ? void 0 : R.calls) ?? []).map((P) => P.status === "success" ? P.result : null), T = ((E == null ? void 0 : E.calls) ?? []).map((P) => P.status === "success" ? P.result : null), $ = [];
|
|
11828
11838
|
for (const [P, M] of O.entries()) {
|
|
11829
11839
|
const D = v[P];
|
|
11830
11840
|
if (typeof M != "bigint" || typeof D != "bigint")
|
|
11831
11841
|
continue;
|
|
11832
|
-
const _ = I[P - 1], j = y[P - 1], H =
|
|
11842
|
+
const _ = I[P - 1], j = y[P - 1], H = T[P - 1], K = P === 0 ? {
|
|
11833
11843
|
address: J6,
|
|
11834
11844
|
decimals: 18,
|
|
11835
11845
|
symbol: "ETH"
|
|
@@ -12057,7 +12067,7 @@ function Ip(e, { emitOnBegin: t = !1, emitMissed: n = !1, onBlockNumber: r, onEr
|
|
|
12057
12067
|
n,
|
|
12058
12068
|
i
|
|
12059
12069
|
]);
|
|
12060
|
-
return
|
|
12070
|
+
return In(f, { onBlockNumber: r, onError: o }, (p) => Ho(async () => {
|
|
12061
12071
|
var d;
|
|
12062
12072
|
try {
|
|
12063
12073
|
const h = await Q(e, Wo, "getBlockNumber")({ cacheTime: 0 });
|
|
@@ -12083,7 +12093,7 @@ function Ip(e, { emitOnBegin: t = !1, emitMissed: n = !1, onBlockNumber: r, onEr
|
|
|
12083
12093
|
t,
|
|
12084
12094
|
n
|
|
12085
12095
|
]);
|
|
12086
|
-
return
|
|
12096
|
+
return In(f, { onBlockNumber: r, onError: o }, (p) => {
|
|
12087
12097
|
let d = !0, h = () => d = !1;
|
|
12088
12098
|
return (async () => {
|
|
12089
12099
|
try {
|
|
@@ -12133,7 +12143,7 @@ async function d5(e, t) {
|
|
|
12133
12143
|
const { promise: S, resolve: x, reject: E } = _0(), R = a ? setTimeout(() => {
|
|
12134
12144
|
w == null || w(), m == null || m(), E(new Dg({ hash: o }));
|
|
12135
12145
|
}, a) : void 0;
|
|
12136
|
-
return m =
|
|
12146
|
+
return m = In(u, { onReplaced: s, resolve: x, reject: E }, async (B) => {
|
|
12137
12147
|
if (d = await Q(e, ls, "getTransactionReceipt")({ hash: o }).catch(() => {
|
|
12138
12148
|
}), d && r <= 1) {
|
|
12139
12149
|
clearTimeout(R), B.resolve(d), m == null || m();
|
|
@@ -12173,7 +12183,7 @@ async function d5(e, t) {
|
|
|
12173
12183
|
}
|
|
12174
12184
|
try {
|
|
12175
12185
|
p = f, h = !0;
|
|
12176
|
-
const v = await ka(() => Q(e,
|
|
12186
|
+
const v = await ka(() => Q(e, Tt, "getBlock")({
|
|
12177
12187
|
blockNumber: b,
|
|
12178
12188
|
includeTransactions: !0
|
|
12179
12189
|
}), {
|
|
@@ -12187,11 +12197,11 @@ async function d5(e, t) {
|
|
|
12187
12197
|
hash: N.hash
|
|
12188
12198
|
}), r > 1 && (!d.blockNumber || b - d.blockNumber + 1n < r)))
|
|
12189
12199
|
return;
|
|
12190
|
-
let
|
|
12191
|
-
N.to === p.to && N.value === p.value && N.input === p.input ?
|
|
12200
|
+
let A = "replaced";
|
|
12201
|
+
N.to === p.to && N.value === p.value && N.input === p.input ? A = "repriced" : N.from === N.to && N.value === 0n && (A = "cancelled"), L(() => {
|
|
12192
12202
|
var O;
|
|
12193
12203
|
(O = B.onReplaced) == null || O.call(B, {
|
|
12194
|
-
reason:
|
|
12204
|
+
reason: A,
|
|
12195
12205
|
replacedTransaction: p,
|
|
12196
12206
|
transaction: N,
|
|
12197
12207
|
transactionReceipt: d
|
|
@@ -12220,10 +12230,10 @@ function p5(e, { blockTag: t = e.experimental_blockTag ?? "latest", emitMissed:
|
|
|
12220
12230
|
l,
|
|
12221
12231
|
a
|
|
12222
12232
|
]);
|
|
12223
|
-
return
|
|
12233
|
+
return In(h, { onBlock: o, onError: s }, (m) => Ho(async () => {
|
|
12224
12234
|
var w;
|
|
12225
12235
|
try {
|
|
12226
|
-
const S = await Q(e,
|
|
12236
|
+
const S = await Q(e, Tt, "getBlock")({
|
|
12227
12237
|
blockTag: t,
|
|
12228
12238
|
includeTransactions: l
|
|
12229
12239
|
});
|
|
@@ -12232,7 +12242,7 @@ function p5(e, { blockTag: t = e.experimental_blockTag ?? "latest", emitMissed:
|
|
|
12232
12242
|
return;
|
|
12233
12243
|
if (S.number - f.number > 1 && n)
|
|
12234
12244
|
for (let x = (f == null ? void 0 : f.number) + 1n; x < S.number; x++) {
|
|
12235
|
-
const E = await Q(e,
|
|
12245
|
+
const E = await Q(e, Tt, "getBlock")({
|
|
12236
12246
|
blockNumber: x,
|
|
12237
12247
|
includeTransactions: l
|
|
12238
12248
|
});
|
|
@@ -12255,7 +12265,7 @@ function p5(e, { blockTag: t = e.experimental_blockTag ?? "latest", emitMissed:
|
|
|
12255
12265
|
let h = !0, m = !0, w = () => h = !1;
|
|
12256
12266
|
return (async () => {
|
|
12257
12267
|
try {
|
|
12258
|
-
r && Q(e,
|
|
12268
|
+
r && Q(e, Tt, "getBlock")({
|
|
12259
12269
|
blockTag: t,
|
|
12260
12270
|
includeTransactions: l
|
|
12261
12271
|
}).then((E) => {
|
|
@@ -12273,7 +12283,7 @@ function p5(e, { blockTag: t = e.experimental_blockTag ?? "latest", emitMissed:
|
|
|
12273
12283
|
var B;
|
|
12274
12284
|
if (!h)
|
|
12275
12285
|
return;
|
|
12276
|
-
const R = await Q(e,
|
|
12286
|
+
const R = await Q(e, Tt, "getBlock")({
|
|
12277
12287
|
blockNumber: (B = E.result) == null ? void 0 : B.number,
|
|
12278
12288
|
includeTransactions: l
|
|
12279
12289
|
}).catch(() => {
|
|
@@ -12304,7 +12314,7 @@ function h5(e, { address: t, args: n, batch: r = !0, event: o, events: s, fromBl
|
|
|
12304
12314
|
l,
|
|
12305
12315
|
i
|
|
12306
12316
|
]);
|
|
12307
|
-
return
|
|
12317
|
+
return In(w, { onLogs: a, onError: c }, (S) => {
|
|
12308
12318
|
let x;
|
|
12309
12319
|
i !== void 0 && (x = i - 1n);
|
|
12310
12320
|
let E, R = !1;
|
|
@@ -12348,7 +12358,7 @@ function h5(e, { address: t, args: n, batch: r = !0, event: o, events: s, fromBl
|
|
|
12348
12358
|
for (const b of L)
|
|
12349
12359
|
S.onLogs([b]);
|
|
12350
12360
|
} catch (L) {
|
|
12351
|
-
E && L instanceof
|
|
12361
|
+
E && L instanceof On && (R = !1), (F = S.onError) == null || F.call(S, L);
|
|
12352
12362
|
}
|
|
12353
12363
|
}, {
|
|
12354
12364
|
emitOnBegin: !0,
|
|
@@ -12397,11 +12407,11 @@ function h5(e, { address: t, args: n, batch: r = !0, event: o, events: s, fromBl
|
|
|
12397
12407
|
return;
|
|
12398
12408
|
v = g.abiItem.name, N = (b = g.abiItem.inputs) == null ? void 0 : b.some((O) => !("name" in O && O.name));
|
|
12399
12409
|
}
|
|
12400
|
-
const
|
|
12410
|
+
const A = fn(L, {
|
|
12401
12411
|
args: N ? [] : {},
|
|
12402
12412
|
eventName: v
|
|
12403
12413
|
});
|
|
12404
|
-
a([
|
|
12414
|
+
a([A]);
|
|
12405
12415
|
}
|
|
12406
12416
|
},
|
|
12407
12417
|
onError(F) {
|
|
@@ -12423,7 +12433,7 @@ function m5(e, { batch: t = !0, onError: n, onTransactions: r, poll: o, pollingI
|
|
|
12423
12433
|
t,
|
|
12424
12434
|
s
|
|
12425
12435
|
]);
|
|
12426
|
-
return
|
|
12436
|
+
return In(u, { onTransactions: r, onError: n }, (l) => {
|
|
12427
12437
|
let f;
|
|
12428
12438
|
const p = Ho(async () => {
|
|
12429
12439
|
var d;
|
|
@@ -12548,7 +12558,7 @@ function E5(e) {
|
|
|
12548
12558
|
estimateGas: (t) => qc(e, t),
|
|
12549
12559
|
getBalance: (t) => Gw(e, t),
|
|
12550
12560
|
getBlobBaseFee: () => qw(e),
|
|
12551
|
-
getBlock: (t) =>
|
|
12561
|
+
getBlock: (t) => Tt(e, t),
|
|
12552
12562
|
getBlockNumber: (t) => Wo(e, t),
|
|
12553
12563
|
getBlockTransactionCount: (t) => Zw(e, t),
|
|
12554
12564
|
getBytecode: (t) => _a(e, t),
|
|
@@ -12631,7 +12641,7 @@ class $5 extends W {
|
|
|
12631
12641
|
});
|
|
12632
12642
|
}
|
|
12633
12643
|
}
|
|
12634
|
-
function
|
|
12644
|
+
function T5(e, t = {}) {
|
|
12635
12645
|
const { batch: n, fetchFn: r, fetchOptions: o, key: s = "http", methods: i, name: c = "HTTP JSON-RPC", onFetchRequest: a, onFetchResponse: u, retryDelay: l, raw: f } = t;
|
|
12636
12646
|
return ({ chain: p, retryCount: d, timeout: h }) => {
|
|
12637
12647
|
const { batchSize: m = 1e3, wait: w = 0 } = typeof n == "object" ? n : {}, S = t.retryCount ?? d, x = h ?? t.timeout ?? 1e4, E = e || (p == null ? void 0 : p.rpcUrls.default.http[0]);
|
|
@@ -12652,16 +12662,16 @@ function A5(e, t = {}) {
|
|
|
12652
12662
|
const L = { method: B, params: F }, { schedule: b } = U0({
|
|
12653
12663
|
id: E,
|
|
12654
12664
|
wait: w,
|
|
12655
|
-
shouldSplitBatch(
|
|
12656
|
-
return
|
|
12665
|
+
shouldSplitBatch(A) {
|
|
12666
|
+
return A.length > m;
|
|
12657
12667
|
},
|
|
12658
|
-
fn: (
|
|
12659
|
-
body:
|
|
12668
|
+
fn: (A) => R.request({
|
|
12669
|
+
body: A
|
|
12660
12670
|
}),
|
|
12661
|
-
sort: (
|
|
12662
|
-
}), g = async (
|
|
12671
|
+
sort: (A, O) => A.id - O.id
|
|
12672
|
+
}), g = async (A) => n ? b(A) : [
|
|
12663
12673
|
await R.request({
|
|
12664
|
-
body:
|
|
12674
|
+
body: A
|
|
12665
12675
|
})
|
|
12666
12676
|
], [{ error: v, result: N }] = await g(L);
|
|
12667
12677
|
if (f)
|
|
@@ -12684,7 +12694,7 @@ function A5(e, t = {}) {
|
|
|
12684
12694
|
});
|
|
12685
12695
|
};
|
|
12686
12696
|
}
|
|
12687
|
-
const
|
|
12697
|
+
const A5 = /* @__PURE__ */ sv({
|
|
12688
12698
|
id: 42161,
|
|
12689
12699
|
name: "Arbitrum One",
|
|
12690
12700
|
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
@@ -12771,7 +12781,7 @@ function R5({
|
|
|
12771
12781
|
}
|
|
12772
12782
|
const _P = () => ({ openDeposit: X((t) => {
|
|
12773
12783
|
}, []) }), UP = () => ({ openWithdraw: X((t) => {
|
|
12774
|
-
}, []) }),
|
|
12784
|
+
}, []) }), Tn = "MPC", mu = "EVM", N5 = "spot", Jl = "perpetual";
|
|
12775
12785
|
/**
|
|
12776
12786
|
* @license lucide-react v0.540.0 - ISC
|
|
12777
12787
|
*
|
|
@@ -12812,7 +12822,7 @@ var B5 = {
|
|
|
12812
12822
|
* This source code is licensed under the ISC license.
|
|
12813
12823
|
* See the LICENSE file in the root directory of this source tree.
|
|
12814
12824
|
*/
|
|
12815
|
-
const M5 =
|
|
12825
|
+
const M5 = Ac(
|
|
12816
12826
|
({
|
|
12817
12827
|
color: e = "currentColor",
|
|
12818
12828
|
size: t = 24,
|
|
@@ -12848,7 +12858,7 @@ const M5 = Tc(
|
|
|
12848
12858
|
* See the LICENSE file in the root directory of this source tree.
|
|
12849
12859
|
*/
|
|
12850
12860
|
const F5 = (e, t) => {
|
|
12851
|
-
const n =
|
|
12861
|
+
const n = Ac(
|
|
12852
12862
|
({ className: r, ...o }, s) => ms(M5, {
|
|
12853
12863
|
ref: s,
|
|
12854
12864
|
iconNode: t,
|
|
@@ -12886,10 +12896,10 @@ function D5(e) {
|
|
|
12886
12896
|
return r == null ? void 0 : r(...n);
|
|
12887
12897
|
}, []);
|
|
12888
12898
|
}
|
|
12889
|
-
const
|
|
12899
|
+
const Mn = (e) => {
|
|
12890
12900
|
var t;
|
|
12891
12901
|
return (t = e == null ? void 0 : e.ownerDocument) !== null && t !== void 0 ? t : document;
|
|
12892
|
-
},
|
|
12902
|
+
}, jn = (e) => e && "window" in e && e.window === e ? e : Mn(e).defaultView || window;
|
|
12893
12903
|
function j5(e) {
|
|
12894
12904
|
return e !== null && typeof e == "object" && "nodeType" in e && typeof e.nodeType == "number";
|
|
12895
12905
|
}
|
|
@@ -13064,7 +13074,7 @@ function wu(e, t) {
|
|
|
13064
13074
|
function X5(e) {
|
|
13065
13075
|
return !(e.metaKey || !yu() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
|
|
13066
13076
|
}
|
|
13067
|
-
function
|
|
13077
|
+
function Ts(e) {
|
|
13068
13078
|
Yn = !0, X5(e) && (Vo = "keyboard", wu("keyboard", e));
|
|
13069
13079
|
}
|
|
13070
13080
|
function yt(e) {
|
|
@@ -13080,12 +13090,12 @@ function zp() {
|
|
|
13080
13090
|
Yn = !1, Ja = !0;
|
|
13081
13091
|
}
|
|
13082
13092
|
function ec(e) {
|
|
13083
|
-
if (typeof window > "u" || typeof document > "u" || Kr.get(
|
|
13084
|
-
const t =
|
|
13093
|
+
if (typeof window > "u" || typeof document > "u" || Kr.get(jn(e))) return;
|
|
13094
|
+
const t = jn(e), n = Mn(e);
|
|
13085
13095
|
let r = t.HTMLElement.prototype.focus;
|
|
13086
13096
|
t.HTMLElement.prototype.focus = function() {
|
|
13087
13097
|
Yn = !0, r.apply(this, arguments);
|
|
13088
|
-
}, n.addEventListener("keydown",
|
|
13098
|
+
}, n.addEventListener("keydown", Ts, !0), n.addEventListener("keyup", Ts, !0), n.addEventListener("click", _p, !0), t.addEventListener("focus", Up, !0), t.addEventListener("blur", zp, !1), typeof PointerEvent < "u" ? (n.addEventListener("pointerdown", yt, !0), n.addEventListener("pointermove", yt, !0), n.addEventListener("pointerup", yt, !0)) : process.env.NODE_ENV === "test" && (n.addEventListener("mousedown", yt, !0), n.addEventListener("mousemove", yt, !0), n.addEventListener("mouseup", yt, !0)), t.addEventListener("beforeunload", () => {
|
|
13089
13099
|
Hp(e);
|
|
13090
13100
|
}, {
|
|
13091
13101
|
once: !0
|
|
@@ -13094,11 +13104,11 @@ function ec(e) {
|
|
|
13094
13104
|
});
|
|
13095
13105
|
}
|
|
13096
13106
|
const Hp = (e, t) => {
|
|
13097
|
-
const n =
|
|
13098
|
-
t && r.removeEventListener("DOMContentLoaded", t), Kr.has(n) && (n.HTMLElement.prototype.focus = Kr.get(n).focus, r.removeEventListener("keydown",
|
|
13107
|
+
const n = jn(e), r = Mn(e);
|
|
13108
|
+
t && r.removeEventListener("DOMContentLoaded", t), Kr.has(n) && (n.HTMLElement.prototype.focus = Kr.get(n).focus, r.removeEventListener("keydown", Ts, !0), r.removeEventListener("keyup", Ts, !0), r.removeEventListener("click", _p, !0), n.removeEventListener("focus", Up, !0), n.removeEventListener("blur", zp, !1), typeof PointerEvent < "u" ? (r.removeEventListener("pointerdown", yt, !0), r.removeEventListener("pointermove", yt, !0), r.removeEventListener("pointerup", yt, !0)) : process.env.NODE_ENV === "test" && (r.removeEventListener("mousedown", yt, !0), r.removeEventListener("mousemove", yt, !0), r.removeEventListener("mouseup", yt, !0)), Kr.delete(n));
|
|
13099
13109
|
};
|
|
13100
13110
|
function Q5(e) {
|
|
13101
|
-
const t =
|
|
13111
|
+
const t = Mn(e);
|
|
13102
13112
|
let n;
|
|
13103
13113
|
return t.readyState !== "loading" ? ec(e) : (n = () => {
|
|
13104
13114
|
ec(e);
|
|
@@ -13120,8 +13130,8 @@ const J5 = /* @__PURE__ */ new Set([
|
|
|
13120
13130
|
"reset"
|
|
13121
13131
|
]);
|
|
13122
13132
|
function ex(e, t, n) {
|
|
13123
|
-
let r =
|
|
13124
|
-
const o = typeof window < "u" ?
|
|
13133
|
+
let r = Mn(n == null ? void 0 : n.target);
|
|
13134
|
+
const o = typeof window < "u" ? jn(n == null ? void 0 : n.target).HTMLInputElement : HTMLInputElement, s = typeof window < "u" ? jn(n == null ? void 0 : n.target).HTMLTextAreaElement : HTMLTextAreaElement, i = typeof window < "u" ? jn(n == null ? void 0 : n.target).HTMLElement : HTMLElement, c = typeof window < "u" ? jn(n == null ? void 0 : n.target).KeyboardEvent : KeyboardEvent;
|
|
13125
13135
|
return e = e || r.activeElement instanceof o && !J5.has(r.activeElement.type) || r.activeElement instanceof s || r.activeElement instanceof i && r.activeElement.isContentEditable, !(e && t === "keyboard" && n instanceof c && !K5[n.key]);
|
|
13126
13136
|
}
|
|
13127
13137
|
function tx(e, t, n) {
|
|
@@ -13143,7 +13153,7 @@ function nx(e) {
|
|
|
13143
13153
|
r,
|
|
13144
13154
|
o
|
|
13145
13155
|
]), i = jp(s), c = X((a) => {
|
|
13146
|
-
const u =
|
|
13156
|
+
const u = Mn(a.target), l = u ? Xa(u) : Xa();
|
|
13147
13157
|
a.target === a.currentTarget && l === Lp(a.nativeEvent) && (n && n(a), o && o(!0), i(a));
|
|
13148
13158
|
}, [
|
|
13149
13159
|
o,
|
|
@@ -13169,7 +13179,7 @@ function rx(e) {
|
|
|
13169
13179
|
c
|
|
13170
13180
|
]), u = jp(a), l = X((f) => {
|
|
13171
13181
|
if (!f.currentTarget.contains(f.target)) return;
|
|
13172
|
-
const p =
|
|
13182
|
+
const p = Mn(f.target), d = Xa(p);
|
|
13173
13183
|
if (!s.current.isFocusWithin && d === Lp(f.nativeEvent)) {
|
|
13174
13184
|
r && r(f), o && o(!0), s.current.isFocusWithin = !0, u(f);
|
|
13175
13185
|
let h = f.currentTarget;
|
|
@@ -13206,10 +13216,10 @@ function rx(e) {
|
|
|
13206
13216
|
}
|
|
13207
13217
|
};
|
|
13208
13218
|
}
|
|
13209
|
-
let
|
|
13219
|
+
let As = !1, rs = 0;
|
|
13210
13220
|
function tc() {
|
|
13211
|
-
|
|
13212
|
-
|
|
13221
|
+
As = !0, setTimeout(() => {
|
|
13222
|
+
As = !1;
|
|
13213
13223
|
}, 50);
|
|
13214
13224
|
}
|
|
13215
13225
|
function tf(e) {
|
|
@@ -13234,7 +13244,7 @@ function sx(e) {
|
|
|
13234
13244
|
if (c.pointerType = w, o || w === "touch" || c.isHovered || !m.currentTarget.contains(m.target)) return;
|
|
13235
13245
|
c.isHovered = !0;
|
|
13236
13246
|
let S = m.currentTarget;
|
|
13237
|
-
c.target = S, a(
|
|
13247
|
+
c.target = S, a(Mn(m.target), "pointerover", (x) => {
|
|
13238
13248
|
c.isHovered && c.target && !Fp(c.target, x.target) && d(x, x.pointerType);
|
|
13239
13249
|
}, {
|
|
13240
13250
|
capture: !0
|
|
@@ -13252,13 +13262,13 @@ function sx(e) {
|
|
|
13252
13262
|
}), n && n(!1), i(!1));
|
|
13253
13263
|
}, h = {};
|
|
13254
13264
|
return typeof PointerEvent < "u" ? (h.onPointerEnter = (m) => {
|
|
13255
|
-
|
|
13265
|
+
As && m.pointerType === "mouse" || p(m, m.pointerType);
|
|
13256
13266
|
}, h.onPointerLeave = (m) => {
|
|
13257
13267
|
!o && m.currentTarget.contains(m.target) && d(m, m.pointerType);
|
|
13258
13268
|
}) : process.env.NODE_ENV === "test" && (h.onTouchStart = () => {
|
|
13259
13269
|
c.ignoreEmulatedMouseEvents = !0;
|
|
13260
13270
|
}, h.onMouseEnter = (m) => {
|
|
13261
|
-
!c.ignoreEmulatedMouseEvents && !
|
|
13271
|
+
!c.ignoreEmulatedMouseEvents && !As && p(m, "mouse"), c.ignoreEmulatedMouseEvents = !1;
|
|
13262
13272
|
}, h.onMouseLeave = (m) => {
|
|
13263
13273
|
!o && m.currentTarget.contains(m.target) && d(m, "mouse");
|
|
13264
13274
|
}), {
|
|
@@ -13441,7 +13451,7 @@ function px({ disabled: e = !1 } = {}) {
|
|
|
13441
13451
|
});
|
|
13442
13452
|
return { pressed: n, pressProps: e ? {} : { onPointerDown: i, onPointerUp: s, onClick: s } };
|
|
13443
13453
|
}
|
|
13444
|
-
function
|
|
13454
|
+
function Cn(e) {
|
|
13445
13455
|
return te(() => e, Object.values(e));
|
|
13446
13456
|
}
|
|
13447
13457
|
let hx = De(void 0);
|
|
@@ -13551,7 +13561,7 @@ function Zp(...e) {
|
|
|
13551
13561
|
}
|
|
13552
13562
|
function nt(e) {
|
|
13553
13563
|
var t;
|
|
13554
|
-
return Object.assign(
|
|
13564
|
+
return Object.assign(Ac(e), { displayName: (t = e.displayName) != null ? t : e.name });
|
|
13555
13565
|
}
|
|
13556
13566
|
function xn(e) {
|
|
13557
13567
|
let t = Object.assign({}, e);
|
|
@@ -13614,9 +13624,9 @@ function $x(e, t) {
|
|
|
13614
13624
|
let { features: r = 1, ...o } = e, s = { ref: t, "aria-hidden": (r & 2) === 2 ? !0 : (n = o["aria-hidden"]) != null ? n : void 0, hidden: (r & 4) === 4 ? !0 : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(r & 4) === 4 && (r & 2) !== 2 && { display: "none" } } };
|
|
13615
13625
|
return ct()({ ourProps: s, theirProps: o, slot: {}, defaultTag: Sx, name: "Hidden" });
|
|
13616
13626
|
}
|
|
13617
|
-
let Qp = nt($x),
|
|
13618
|
-
function
|
|
13619
|
-
let t = Ee(
|
|
13627
|
+
let Qp = nt($x), Tx = De(null);
|
|
13628
|
+
function Ax({ children: e }) {
|
|
13629
|
+
let t = Ee(Tx);
|
|
13620
13630
|
if (!t) return Z.createElement(Z.Fragment, null, e);
|
|
13621
13631
|
let { target: n } = t;
|
|
13622
13632
|
return n ? id(Z.createElement(Z.Fragment, null, e), n) : null;
|
|
@@ -13625,7 +13635,7 @@ function Rx({ data: e, form: t, disabled: n, onReset: r, overrides: o }) {
|
|
|
13625
13635
|
let [s, i] = oe(null), c = nr();
|
|
13626
13636
|
return Pe(() => {
|
|
13627
13637
|
if (r && s) return c.addEventListener(s, "reset", r);
|
|
13628
|
-
}, [s, t, r]), Z.createElement(
|
|
13638
|
+
}, [s, t, r]), Z.createElement(Ax, null, Z.createElement(Nx, { setForm: i, formId: t }), Yp(e).map(([a, u]) => Z.createElement(Qp, { features: xu.Hidden, ...xn({ key: a, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: t, disabled: n, name: a, value: u, ...o }) })));
|
|
13629
13639
|
}
|
|
13630
13640
|
function Nx({ setForm: e, formId: t }) {
|
|
13631
13641
|
return Pe(() => {
|
|
@@ -13723,7 +13733,7 @@ let Dx = "p";
|
|
|
13723
13733
|
function jx(e, t) {
|
|
13724
13734
|
let n = Qn(), r = vu(), { id: o = `headlessui-description-${n}`, ...s } = e, i = oh(), c = Pt(t);
|
|
13725
13735
|
Ne(() => i.register(o), [o, i.register]);
|
|
13726
|
-
let a =
|
|
13736
|
+
let a = Cn({ ...i.slot, disabled: r || !1 }), u = { ref: c, ...i.props, id: o };
|
|
13727
13737
|
return ct()({ ourProps: u, theirProps: s, slot: a, defaultTag: Dx, name: i.name || "Description" });
|
|
13728
13738
|
}
|
|
13729
13739
|
let _x = nt(jx);
|
|
@@ -13771,7 +13781,7 @@ function Hx(e, t) {
|
|
|
13771
13781
|
(th(S) && (S.type === "file" || S.type === "radio" || S.type === "checkbox") || S.role === "radio" || S.role === "checkbox" || S.role === "switch") && S.click(), S.focus({ preventScroll: !0 });
|
|
13772
13782
|
}
|
|
13773
13783
|
}
|
|
13774
|
-
}), d =
|
|
13784
|
+
}), d = Cn({ ...o.slot, disabled: i || !1 }), h = { ref: f, ...o.props, id: c, htmlFor: a, onClick: p };
|
|
13775
13785
|
return u && ("onClick" in h && (delete h.htmlFor, delete h.onClick), "onClick" in l && delete l.onClick), ct()({ ourProps: h, theirProps: l, slot: d, defaultTag: a ? zx : "div", name: o.name || "Label" });
|
|
13776
13786
|
}
|
|
13777
13787
|
let Wx = nt(Hx), Vx = Object.assign(Wx, {});
|
|
@@ -14274,7 +14284,7 @@ function S2(e, t) {
|
|
|
14274
14284
|
function $2(e) {
|
|
14275
14285
|
return r1(e.subscribe, e.getSnapshot, e.getSnapshot);
|
|
14276
14286
|
}
|
|
14277
|
-
function
|
|
14287
|
+
function T2(e, t) {
|
|
14278
14288
|
let n = e(), r = /* @__PURE__ */ new Set();
|
|
14279
14289
|
return { getSnapshot() {
|
|
14280
14290
|
return n;
|
|
@@ -14285,7 +14295,7 @@ function A2(e, t) {
|
|
|
14285
14295
|
i && (n = i, r.forEach((c) => c()));
|
|
14286
14296
|
} };
|
|
14287
14297
|
}
|
|
14288
|
-
function
|
|
14298
|
+
function A2() {
|
|
14289
14299
|
let e;
|
|
14290
14300
|
return { before({ doc: t }) {
|
|
14291
14301
|
var n;
|
|
@@ -14352,7 +14362,7 @@ function bf(e) {
|
|
|
14352
14362
|
for (let n of e) Object.assign(t, n(t));
|
|
14353
14363
|
return t;
|
|
14354
14364
|
}
|
|
14355
|
-
let
|
|
14365
|
+
let _n = T2(() => /* @__PURE__ */ new Map(), { PUSH(e, t) {
|
|
14356
14366
|
var n;
|
|
14357
14367
|
let r = (n = this.get(e)) != null ? n : { doc: e, count: 0, d: at(), meta: /* @__PURE__ */ new Set(), computedMeta: {} };
|
|
14358
14368
|
return r.count++, r.meta.add(t), r.computedMeta = bf(r.meta), this.set(e, r), this;
|
|
@@ -14362,25 +14372,25 @@ let jn = A2(() => /* @__PURE__ */ new Map(), { PUSH(e, t) {
|
|
|
14362
14372
|
}, SCROLL_PREVENT(e) {
|
|
14363
14373
|
let t = { doc: e.doc, d: e.d, meta() {
|
|
14364
14374
|
return e.computedMeta;
|
|
14365
|
-
} }, n = [R2(),
|
|
14375
|
+
} }, n = [R2(), A2(), N2()];
|
|
14366
14376
|
n.forEach(({ before: r }) => r == null ? void 0 : r(t)), n.forEach(({ after: r }) => r == null ? void 0 : r(t));
|
|
14367
14377
|
}, SCROLL_ALLOW({ d: e }) {
|
|
14368
14378
|
e.dispose();
|
|
14369
14379
|
}, TEARDOWN({ doc: e }) {
|
|
14370
14380
|
this.delete(e);
|
|
14371
14381
|
} });
|
|
14372
|
-
|
|
14373
|
-
let e =
|
|
14382
|
+
_n.subscribe(() => {
|
|
14383
|
+
let e = _n.getSnapshot(), t = /* @__PURE__ */ new Map();
|
|
14374
14384
|
for (let [n] of e) t.set(n, n.documentElement.style.overflow);
|
|
14375
14385
|
for (let n of e.values()) {
|
|
14376
14386
|
let r = t.get(n.doc) === "hidden", o = n.count !== 0;
|
|
14377
|
-
(o && !r || !o && r) &&
|
|
14387
|
+
(o && !r || !o && r) && _n.dispatch(n.count > 0 ? "SCROLL_PREVENT" : "SCROLL_ALLOW", n), n.count === 0 && _n.dispatch("TEARDOWN", n);
|
|
14378
14388
|
}
|
|
14379
14389
|
});
|
|
14380
14390
|
function O2(e, t, n = () => ({ containers: [] })) {
|
|
14381
|
-
let r = $2(
|
|
14391
|
+
let r = $2(_n), o = t ? r.get(t) : void 0, s = o ? o.count > 0 : !1;
|
|
14382
14392
|
return Ne(() => {
|
|
14383
|
-
if (!(!t || !e)) return
|
|
14393
|
+
if (!(!t || !e)) return _n.dispatch("PUSH", t, n), () => _n.dispatch("POP", t, n);
|
|
14384
14394
|
}, [e, t]), s;
|
|
14385
14395
|
}
|
|
14386
14396
|
function I2(e, t, n = () => [document.body]) {
|
|
@@ -14521,14 +14531,14 @@ function li(e) {
|
|
|
14521
14531
|
});
|
|
14522
14532
|
}
|
|
14523
14533
|
const H2 = ["transform", "translate", "scale", "rotate", "perspective"], W2 = ["transform", "translate", "scale", "rotate", "perspective", "filter"], V2 = ["paint", "layout", "strict", "content"];
|
|
14524
|
-
function
|
|
14534
|
+
function Tu(e) {
|
|
14525
14535
|
const t = fi(), n = be(e) ? Et(e) : e;
|
|
14526
14536
|
return H2.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || W2.some((r) => (n.willChange || "").includes(r)) || V2.some((r) => (n.contain || "").includes(r));
|
|
14527
14537
|
}
|
|
14528
14538
|
function G2(e) {
|
|
14529
14539
|
let t = dn(e);
|
|
14530
14540
|
for (; We(t) && !cn(t); ) {
|
|
14531
|
-
if (
|
|
14541
|
+
if (Tu(t))
|
|
14532
14542
|
return t;
|
|
14533
14543
|
if (li(t))
|
|
14534
14544
|
return null;
|
|
@@ -14612,7 +14622,7 @@ function lc(e, t, n) {
|
|
|
14612
14622
|
function or(e, t) {
|
|
14613
14623
|
return typeof e == "function" ? e(t) : e;
|
|
14614
14624
|
}
|
|
14615
|
-
function
|
|
14625
|
+
function Bn(e) {
|
|
14616
14626
|
return e.split("-")[0];
|
|
14617
14627
|
}
|
|
14618
14628
|
function Dr(e) {
|
|
@@ -14621,19 +14631,19 @@ function Dr(e) {
|
|
|
14621
14631
|
function Eh(e) {
|
|
14622
14632
|
return e === "x" ? "y" : "x";
|
|
14623
14633
|
}
|
|
14624
|
-
function
|
|
14634
|
+
function Au(e) {
|
|
14625
14635
|
return e === "y" ? "height" : "width";
|
|
14626
14636
|
}
|
|
14627
14637
|
const X2 = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
14628
14638
|
function on(e) {
|
|
14629
|
-
return X2.has(
|
|
14639
|
+
return X2.has(Bn(e)) ? "y" : "x";
|
|
14630
14640
|
}
|
|
14631
14641
|
function Ru(e) {
|
|
14632
14642
|
return Eh(on(e));
|
|
14633
14643
|
}
|
|
14634
14644
|
function Q2(e, t, n) {
|
|
14635
14645
|
n === void 0 && (n = !1);
|
|
14636
|
-
const r = Dr(e), o = Ru(e), s =
|
|
14646
|
+
const r = Dr(e), o = Ru(e), s = Au(o);
|
|
14637
14647
|
let i = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
14638
14648
|
return t.reference[s] > t.floating[s] && (i = Os(i)), [i, Os(i)];
|
|
14639
14649
|
}
|
|
@@ -14659,7 +14669,7 @@ function nE(e, t, n) {
|
|
|
14659
14669
|
}
|
|
14660
14670
|
function rE(e, t, n, r) {
|
|
14661
14671
|
const o = Dr(e);
|
|
14662
|
-
let s = nE(
|
|
14672
|
+
let s = nE(Bn(e), n === "start", r);
|
|
14663
14673
|
return o && (s = s.map((i) => i + "-" + o), t && (s = s.concat(s.map(fc)))), s;
|
|
14664
14674
|
}
|
|
14665
14675
|
function Os(e) {
|
|
@@ -14751,19 +14761,19 @@ var sE = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
14751
14761
|
return o;
|
|
14752
14762
|
}, $h = function(t) {
|
|
14753
14763
|
return !isNaN(parseInt(t.getAttribute("tabindex"), 10));
|
|
14754
|
-
},
|
|
14764
|
+
}, Th = function(t) {
|
|
14755
14765
|
if (!t)
|
|
14756
14766
|
throw new Error("No node provided");
|
|
14757
14767
|
return t.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName) || iE(t)) && !$h(t) ? 0 : t.tabIndex;
|
|
14758
14768
|
}, cE = function(t, n) {
|
|
14759
|
-
var r =
|
|
14769
|
+
var r = Th(t);
|
|
14760
14770
|
return r < 0 && n && !$h(t) ? 0 : r;
|
|
14761
14771
|
}, uE = function(t, n) {
|
|
14762
14772
|
return t.tabIndex === n.tabIndex ? t.documentOrder - n.documentOrder : t.tabIndex - n.tabIndex;
|
|
14763
|
-
},
|
|
14773
|
+
}, Ah = function(t) {
|
|
14764
14774
|
return t.tagName === "INPUT";
|
|
14765
14775
|
}, lE = function(t) {
|
|
14766
|
-
return
|
|
14776
|
+
return Ah(t) && t.type === "hidden";
|
|
14767
14777
|
}, fE = function(t) {
|
|
14768
14778
|
var n = t.tagName === "DETAILS" && Array.prototype.slice.apply(t.children).some(function(r) {
|
|
14769
14779
|
return r.tagName === "SUMMARY";
|
|
@@ -14790,7 +14800,7 @@ var sE = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
14790
14800
|
var s = dE(o, t.form);
|
|
14791
14801
|
return !s || s === t;
|
|
14792
14802
|
}, hE = function(t) {
|
|
14793
|
-
return
|
|
14803
|
+
return Ah(t) && t.type === "radio";
|
|
14794
14804
|
}, mE = function(t) {
|
|
14795
14805
|
return hE(t) && !pE(t);
|
|
14796
14806
|
}, bE = function(t) {
|
|
@@ -14869,7 +14879,7 @@ var sE = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
14869
14879
|
Oo(n) || lE(n) || gE(n, t) || // For a details element with a summary, the summary element gets the focus
|
|
14870
14880
|
fE(n) || yE(n));
|
|
14871
14881
|
}, Pf = function(t, n) {
|
|
14872
|
-
return !(mE(n) ||
|
|
14882
|
+
return !(mE(n) || Th(n) < 0 || !wE(t, n));
|
|
14873
14883
|
}, vE = function(t) {
|
|
14874
14884
|
var n = parseInt(t.getAttribute("tabindex"), 10);
|
|
14875
14885
|
return !!(isNaN(n) || n >= 0);
|
|
@@ -14902,7 +14912,7 @@ function Sf(e, t, n) {
|
|
|
14902
14912
|
reference: r,
|
|
14903
14913
|
floating: o
|
|
14904
14914
|
} = e;
|
|
14905
|
-
const s = on(t), i = Ru(t), c =
|
|
14915
|
+
const s = on(t), i = Ru(t), c = Au(i), a = Bn(t), u = s === "y", l = r.x + r.width / 2 - o.width / 2, f = r.y + r.height / 2 - o.height / 2, p = r[c] / 2 - o[c] / 2;
|
|
14906
14916
|
let d;
|
|
14907
14917
|
switch (a) {
|
|
14908
14918
|
case "top":
|
|
@@ -15072,20 +15082,20 @@ const EE = (e) => ({
|
|
|
15072
15082
|
const f = Ph(l), p = {
|
|
15073
15083
|
x: n,
|
|
15074
15084
|
y: r
|
|
15075
|
-
}, d = Ru(o), h =
|
|
15085
|
+
}, d = Ru(o), h = Au(d), m = await i.getDimensions(u), w = d === "y", S = w ? "top" : "left", x = w ? "bottom" : "right", E = w ? "clientHeight" : "clientWidth", R = s.reference[h] + s.reference[d] - p[d] - s.floating[h], B = p[d] - s.reference[d], F = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(u));
|
|
15076
15086
|
let L = F ? F[E] : 0;
|
|
15077
15087
|
(!L || !await (i.isElement == null ? void 0 : i.isElement(F))) && (L = c.floating[E] || s.floating[h]);
|
|
15078
|
-
const b = R / 2 - B / 2, g = L / 2 - m[h] / 2 - 1, v = pn(f[S], g), N = pn(f[x], g),
|
|
15088
|
+
const b = R / 2 - B / 2, g = L / 2 - m[h] / 2 - 1, v = pn(f[S], g), N = pn(f[x], g), A = v, O = L - m[h] - N, I = L / 2 - m[h] / 2 + b, y = lc(A, I, O), T = !a.arrow && Dr(o) != null && I !== y && s.reference[h] / 2 - (I < A ? v : N) - m[h] / 2 < 0, $ = T ? I < A ? I - A : I - O : 0;
|
|
15079
15089
|
return {
|
|
15080
15090
|
[d]: p[d] + $,
|
|
15081
15091
|
data: {
|
|
15082
15092
|
[d]: y,
|
|
15083
15093
|
centerOffset: I - y - $,
|
|
15084
|
-
...
|
|
15094
|
+
...T && {
|
|
15085
15095
|
alignmentOffset: $
|
|
15086
15096
|
}
|
|
15087
15097
|
},
|
|
15088
|
-
reset:
|
|
15098
|
+
reset: T
|
|
15089
15099
|
};
|
|
15090
15100
|
}
|
|
15091
15101
|
}), PE = function(e) {
|
|
@@ -15112,7 +15122,7 @@ const EE = (e) => ({
|
|
|
15112
15122
|
} = or(e, t);
|
|
15113
15123
|
if ((n = s.arrow) != null && n.alignmentOffset)
|
|
15114
15124
|
return {};
|
|
15115
|
-
const S =
|
|
15125
|
+
const S = Bn(o), x = on(c), E = Bn(c) === c, R = await (a.isRTL == null ? void 0 : a.isRTL(u.floating)), B = p || (E || !m ? [Os(c)] : J2(c)), F = h !== "none";
|
|
15116
15126
|
!p && F && B.push(...rE(c, m, h, R));
|
|
15117
15127
|
const L = [c, ...B], b = await pi(t, w), g = [];
|
|
15118
15128
|
let v = ((r = s.flip) == null ? void 0 : r.overflows) || [];
|
|
@@ -15124,7 +15134,7 @@ const EE = (e) => ({
|
|
|
15124
15134
|
placement: o,
|
|
15125
15135
|
overflows: g
|
|
15126
15136
|
}], !g.every((I) => I <= 0)) {
|
|
15127
|
-
var N,
|
|
15137
|
+
var N, A;
|
|
15128
15138
|
const I = (((N = s.flip) == null ? void 0 : N.index) || 0) + 1, y = L[I];
|
|
15129
15139
|
if (y && (!(f === "alignment" ? x !== on(y) : !1) || // We leave the current main axis only if every placement on that axis
|
|
15130
15140
|
// overflows the main axis.
|
|
@@ -15138,8 +15148,8 @@ const EE = (e) => ({
|
|
|
15138
15148
|
placement: y
|
|
15139
15149
|
}
|
|
15140
15150
|
};
|
|
15141
|
-
let
|
|
15142
|
-
if (!
|
|
15151
|
+
let T = (A = v.filter(($) => $.overflows[0] <= 0).sort(($, P) => $.overflows[1] - P.overflows[1])[0]) == null ? void 0 : A.placement;
|
|
15152
|
+
if (!T)
|
|
15143
15153
|
switch (d) {
|
|
15144
15154
|
case "bestFit": {
|
|
15145
15155
|
var O;
|
|
@@ -15152,17 +15162,17 @@ const EE = (e) => ({
|
|
|
15152
15162
|
}
|
|
15153
15163
|
return !0;
|
|
15154
15164
|
}).map((P) => [P.placement, P.overflows.filter((M) => M > 0).reduce((M, D) => M + D, 0)]).sort((P, M) => P[1] - M[1])[0]) == null ? void 0 : O[0];
|
|
15155
|
-
$ && (
|
|
15165
|
+
$ && (T = $);
|
|
15156
15166
|
break;
|
|
15157
15167
|
}
|
|
15158
15168
|
case "initialPlacement":
|
|
15159
|
-
|
|
15169
|
+
T = c;
|
|
15160
15170
|
break;
|
|
15161
15171
|
}
|
|
15162
|
-
if (o !==
|
|
15172
|
+
if (o !== T)
|
|
15163
15173
|
return {
|
|
15164
15174
|
reset: {
|
|
15165
|
-
placement:
|
|
15175
|
+
placement: T
|
|
15166
15176
|
}
|
|
15167
15177
|
};
|
|
15168
15178
|
}
|
|
@@ -15175,7 +15185,7 @@ async function $E(e, t) {
|
|
|
15175
15185
|
placement: n,
|
|
15176
15186
|
platform: r,
|
|
15177
15187
|
elements: o
|
|
15178
|
-
} = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i =
|
|
15188
|
+
} = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = Bn(n), c = Dr(n), a = on(n) === "y", u = SE.has(i) ? -1 : 1, l = s && a ? -1 : 1, f = or(t, e);
|
|
15179
15189
|
let {
|
|
15180
15190
|
mainAxis: p,
|
|
15181
15191
|
crossAxis: d,
|
|
@@ -15197,7 +15207,7 @@ async function $E(e, t) {
|
|
|
15197
15207
|
y: d * l
|
|
15198
15208
|
};
|
|
15199
15209
|
}
|
|
15200
|
-
const
|
|
15210
|
+
const TE = function(e) {
|
|
15201
15211
|
return e === void 0 && (e = 0), {
|
|
15202
15212
|
name: "offset",
|
|
15203
15213
|
options: e,
|
|
@@ -15219,7 +15229,7 @@ const AE = function(e) {
|
|
|
15219
15229
|
};
|
|
15220
15230
|
}
|
|
15221
15231
|
};
|
|
15222
|
-
},
|
|
15232
|
+
}, AE = function(e) {
|
|
15223
15233
|
return e === void 0 && (e = {}), {
|
|
15224
15234
|
name: "shift",
|
|
15225
15235
|
options: e,
|
|
@@ -15247,7 +15257,7 @@ const AE = function(e) {
|
|
|
15247
15257
|
} = or(e, t), u = {
|
|
15248
15258
|
x: n,
|
|
15249
15259
|
y: r
|
|
15250
|
-
}, l = await pi(t, a), f = on(
|
|
15260
|
+
}, l = await pi(t, a), f = on(Bn(o)), p = Eh(f);
|
|
15251
15261
|
let d = u[p], h = u[f];
|
|
15252
15262
|
if (s) {
|
|
15253
15263
|
const w = p === "y" ? "top" : "left", S = p === "y" ? "bottom" : "right", x = d + l[w], E = d - l[S];
|
|
@@ -15290,7 +15300,7 @@ const AE = function(e) {
|
|
|
15290
15300
|
apply: a = () => {
|
|
15291
15301
|
},
|
|
15292
15302
|
...u
|
|
15293
|
-
} = or(e, t), l = await pi(t, u), f =
|
|
15303
|
+
} = or(e, t), l = await pi(t, u), f = Bn(o), p = Dr(o), d = on(o) === "y", {
|
|
15294
15304
|
width: h,
|
|
15295
15305
|
height: m
|
|
15296
15306
|
} = s.floating;
|
|
@@ -15299,8 +15309,8 @@ const AE = function(e) {
|
|
|
15299
15309
|
const x = m - l.top - l.bottom, E = h - l.left - l.right, R = pn(m - l[w], x), B = pn(h - l[S], E), F = !t.middlewareData.shift;
|
|
15300
15310
|
let L = R, b = B;
|
|
15301
15311
|
if ((n = t.middlewareData.shift) != null && n.enabled.x && (b = E), (r = t.middlewareData.shift) != null && r.enabled.y && (L = x), F && !p) {
|
|
15302
|
-
const v = je(l.left, 0), N = je(l.right, 0),
|
|
15303
|
-
d ? b = h - 2 * (v !== 0 || N !== 0 ? v + N : je(l.left, l.right)) : L = m - 2 * (
|
|
15312
|
+
const v = je(l.left, 0), N = je(l.right, 0), A = je(l.top, 0), O = je(l.bottom, 0);
|
|
15313
|
+
d ? b = h - 2 * (v !== 0 || N !== 0 ? v + N : je(l.left, l.right)) : L = m - 2 * (A !== 0 || O !== 0 ? A + O : je(l.top, l.bottom));
|
|
15304
15314
|
}
|
|
15305
15315
|
await a({
|
|
15306
15316
|
...t,
|
|
@@ -15460,7 +15470,7 @@ function LE(e, t) {
|
|
|
15460
15470
|
y: u
|
|
15461
15471
|
};
|
|
15462
15472
|
}
|
|
15463
|
-
function
|
|
15473
|
+
function Tf(e, t, n) {
|
|
15464
15474
|
let r;
|
|
15465
15475
|
if (t === "viewport")
|
|
15466
15476
|
r = ME(e, n);
|
|
@@ -15491,7 +15501,7 @@ function kE(e, t) {
|
|
|
15491
15501
|
const s = Et(e).position === "fixed";
|
|
15492
15502
|
let i = s ? dn(e) : e;
|
|
15493
15503
|
for (; be(i) && !cn(i); ) {
|
|
15494
|
-
const c = Et(i), a =
|
|
15504
|
+
const c = Et(i), a = Tu(i);
|
|
15495
15505
|
!a && c.position === "fixed" && (o = null), (s ? !a && !o : !a && c.position === "static" && !!o && FE.has(o.position) || Go(i) && !a && Bh(e, i)) ? r = r.filter((l) => l !== i) : o = c, i = dn(i);
|
|
15496
15506
|
}
|
|
15497
15507
|
return t.set(e, r), r;
|
|
@@ -15504,9 +15514,9 @@ function DE(e) {
|
|
|
15504
15514
|
strategy: o
|
|
15505
15515
|
} = e;
|
|
15506
15516
|
const i = [...n === "clippingAncestors" ? li(t) ? [] : kE(t, this._c) : [].concat(n), r], c = i[0], a = i.reduce((u, l) => {
|
|
15507
|
-
const f =
|
|
15517
|
+
const f = Tf(t, l, o);
|
|
15508
15518
|
return u.top = je(f.top, u.top), u.right = pn(f.right, u.right), u.bottom = pn(f.bottom, u.bottom), u.left = je(f.left, u.left), u;
|
|
15509
|
-
},
|
|
15519
|
+
}, Tf(t, c, o));
|
|
15510
15520
|
return {
|
|
15511
15521
|
width: a.right - a.left,
|
|
15512
15522
|
height: a.bottom - a.top,
|
|
@@ -15551,7 +15561,7 @@ function _E(e, t, n) {
|
|
|
15551
15561
|
function ra(e) {
|
|
15552
15562
|
return Et(e).position === "static";
|
|
15553
15563
|
}
|
|
15554
|
-
function
|
|
15564
|
+
function Af(e, t) {
|
|
15555
15565
|
if (!We(e) || Et(e).position === "fixed")
|
|
15556
15566
|
return null;
|
|
15557
15567
|
if (t)
|
|
@@ -15572,10 +15582,10 @@ function Mh(e, t) {
|
|
|
15572
15582
|
}
|
|
15573
15583
|
return n;
|
|
15574
15584
|
}
|
|
15575
|
-
let r =
|
|
15585
|
+
let r = Af(e, t);
|
|
15576
15586
|
for (; r && U2(r) && ra(r); )
|
|
15577
|
-
r =
|
|
15578
|
-
return r && cn(r) && ra(r) && !
|
|
15587
|
+
r = Af(r, t);
|
|
15588
|
+
return r && cn(r) && ra(r) && !Tu(r) ? n : r || G2(e) || n;
|
|
15579
15589
|
}
|
|
15580
15590
|
const UE = async function(e) {
|
|
15581
15591
|
const t = this.getOffsetParent || Mh, n = this.getDimensions, r = await n(e.floating);
|
|
@@ -15689,7 +15699,7 @@ function Lh(e, t, n, r) {
|
|
|
15689
15699
|
}), f == null || f(), (S = d) == null || S.disconnect(), d = null, a && cancelAnimationFrame(h);
|
|
15690
15700
|
};
|
|
15691
15701
|
}
|
|
15692
|
-
const oa = pi, VE =
|
|
15702
|
+
const oa = pi, VE = TE, GE = AE, qE = PE, ZE = RE, Rf = EE, YE = (e, t, n) => {
|
|
15693
15703
|
const r = /* @__PURE__ */ new Map(), o = {
|
|
15694
15704
|
platform: HE,
|
|
15695
15705
|
...n
|
|
@@ -15774,7 +15784,7 @@ function Dh(e) {
|
|
|
15774
15784
|
P !== F.current && (F.current = P, m(P));
|
|
15775
15785
|
}, []), E = U.useCallback((P) => {
|
|
15776
15786
|
P !== L.current && (L.current = P, S(P));
|
|
15777
|
-
}, []), R = s || h, B = i || w, F = U.useRef(null), L = U.useRef(null), b = U.useRef(l), g = a != null, v = sa(a), N = sa(o),
|
|
15787
|
+
}, []), R = s || h, B = i || w, F = U.useRef(null), L = U.useRef(null), b = U.useRef(l), g = a != null, v = sa(a), N = sa(o), A = sa(u), O = U.useCallback(() => {
|
|
15778
15788
|
if (!F.current || !L.current)
|
|
15779
15789
|
return;
|
|
15780
15790
|
const P = {
|
|
@@ -15789,13 +15799,13 @@ function Dh(e) {
|
|
|
15789
15799
|
// but still mounted (such as when transitioning out). To ensure
|
|
15790
15800
|
// `isPositioned` will be `false` initially on the next open, avoid
|
|
15791
15801
|
// setting it to `true` when `open === false` (must be specified).
|
|
15792
|
-
isPositioned:
|
|
15802
|
+
isPositioned: A.current !== !1
|
|
15793
15803
|
};
|
|
15794
15804
|
I.current && !Bs(b.current, D) && (b.current = D, eo.flushSync(() => {
|
|
15795
15805
|
f(D);
|
|
15796
15806
|
}));
|
|
15797
15807
|
});
|
|
15798
|
-
}, [p, t, n, N,
|
|
15808
|
+
}, [p, t, n, N, A]);
|
|
15799
15809
|
fs(() => {
|
|
15800
15810
|
u === !1 && b.current.isPositioned && (b.current.isPositioned = !1, f((P) => ({
|
|
15801
15811
|
...P,
|
|
@@ -15817,7 +15827,7 @@ function Dh(e) {
|
|
|
15817
15827
|
floating: L,
|
|
15818
15828
|
setReference: x,
|
|
15819
15829
|
setFloating: E
|
|
15820
|
-
}), [x, E]),
|
|
15830
|
+
}), [x, E]), T = U.useMemo(() => ({
|
|
15821
15831
|
reference: R,
|
|
15822
15832
|
floating: B
|
|
15823
15833
|
}), [R, B]), $ = U.useMemo(() => {
|
|
@@ -15826,13 +15836,13 @@ function Dh(e) {
|
|
|
15826
15836
|
left: 0,
|
|
15827
15837
|
top: 0
|
|
15828
15838
|
};
|
|
15829
|
-
if (!
|
|
15839
|
+
if (!T.floating)
|
|
15830
15840
|
return P;
|
|
15831
|
-
const M = Nf(
|
|
15841
|
+
const M = Nf(T.floating, l.x), D = Nf(T.floating, l.y);
|
|
15832
15842
|
return c ? {
|
|
15833
15843
|
...P,
|
|
15834
15844
|
transform: "translate(" + M + "px, " + D + "px)",
|
|
15835
|
-
...kh(
|
|
15845
|
+
...kh(T.floating) >= 1.5 && {
|
|
15836
15846
|
willChange: "transform"
|
|
15837
15847
|
}
|
|
15838
15848
|
} : {
|
|
@@ -15840,14 +15850,14 @@ function Dh(e) {
|
|
|
15840
15850
|
left: M,
|
|
15841
15851
|
top: D
|
|
15842
15852
|
};
|
|
15843
|
-
}, [n, c,
|
|
15853
|
+
}, [n, c, T.floating, l.x, l.y]);
|
|
15844
15854
|
return U.useMemo(() => ({
|
|
15845
15855
|
...l,
|
|
15846
15856
|
update: O,
|
|
15847
15857
|
refs: y,
|
|
15848
|
-
elements:
|
|
15858
|
+
elements: T,
|
|
15849
15859
|
floatingStyles: $
|
|
15850
|
-
}), [l, O, y,
|
|
15860
|
+
}), [l, O, y, T, $]);
|
|
15851
15861
|
}
|
|
15852
15862
|
const QE = (e) => {
|
|
15853
15863
|
function t(n) {
|
|
@@ -16254,31 +16264,31 @@ function S8(e = null) {
|
|
|
16254
16264
|
let Ff = 4;
|
|
16255
16265
|
function $8({ children: e, enabled: t = !0 }) {
|
|
16256
16266
|
let [n, r] = oe(null), [o, s] = oe(0), i = ce(null), [c, a] = oe(null);
|
|
16257
|
-
|
|
16258
|
-
let u = t && n !== null && c !== null, { to: l = "bottom", gap: f = 0, offset: p = 0, padding: d = 0, inner: h } =
|
|
16267
|
+
T8(c);
|
|
16268
|
+
let u = t && n !== null && c !== null, { to: l = "bottom", gap: f = 0, offset: p = 0, padding: d = 0, inner: h } = A8(n, c), [m, w = "center"] = l.split(" ");
|
|
16259
16269
|
Ne(() => {
|
|
16260
16270
|
u && s(0);
|
|
16261
16271
|
}, [u]);
|
|
16262
16272
|
let { refs: S, floatingStyles: x, context: E } = b8({ open: u, placement: m === "selection" ? w === "center" ? "bottom" : `bottom-${w}` : w === "center" ? `${m}` : `${m}-${w}`, strategy: "absolute", transform: !1, middleware: [Ou({ mainAxis: m === "selection" ? 0 : f, crossAxis: p }), jh({ padding: d }), m !== "selection" && _h({ padding: d }), m === "selection" && h ? y8({ ...h, padding: d, overflowRef: i, offset: o, minItemsVisible: Ff, referenceOverflowThreshold: d, onFallbackChange(N) {
|
|
16263
|
-
var
|
|
16273
|
+
var A, O;
|
|
16264
16274
|
if (!N) return;
|
|
16265
16275
|
let I = E.elements.floating;
|
|
16266
16276
|
if (!I) return;
|
|
16267
|
-
let y = parseFloat(getComputedStyle(I).scrollPaddingBottom) || 0,
|
|
16268
|
-
for (let M of (O = (
|
|
16277
|
+
let y = parseFloat(getComputedStyle(I).scrollPaddingBottom) || 0, T = Math.min(Ff, I.childElementCount), $ = 0, P = 0;
|
|
16278
|
+
for (let M of (O = (A = E.elements.floating) == null ? void 0 : A.childNodes) != null ? O : []) if (bn(M)) {
|
|
16269
16279
|
let D = M.offsetTop, _ = D + M.clientHeight + y, j = I.scrollTop, H = j + I.clientHeight;
|
|
16270
|
-
if (D >= j && _ <= H)
|
|
16280
|
+
if (D >= j && _ <= H) T--;
|
|
16271
16281
|
else {
|
|
16272
16282
|
P = Math.max(0, Math.min(_, H) - Math.max(D, j)), $ = M.clientHeight;
|
|
16273
16283
|
break;
|
|
16274
16284
|
}
|
|
16275
16285
|
}
|
|
16276
|
-
|
|
16277
|
-
let D = $ *
|
|
16286
|
+
T >= 1 && s((M) => {
|
|
16287
|
+
let D = $ * T - P + y;
|
|
16278
16288
|
return M >= D ? M : D;
|
|
16279
16289
|
});
|
|
16280
|
-
} }) : null, JE({ padding: d, apply({ availableWidth: N, availableHeight:
|
|
16281
|
-
Object.assign(O.floating.style, { overflow: "auto", maxWidth: `${N}px`, maxHeight: `min(var(--anchor-max-height, 100vh), ${
|
|
16290
|
+
} }) : null, JE({ padding: d, apply({ availableWidth: N, availableHeight: A, elements: O }) {
|
|
16291
|
+
Object.assign(O.floating.style, { overflow: "auto", maxWidth: `${N}px`, maxHeight: `min(var(--anchor-max-height, 100vh), ${A}px)` });
|
|
16282
16292
|
} })].filter(Boolean), whileElementsMounted: Lh }), [R = m, B = w] = E.placement.split("-");
|
|
16283
16293
|
m === "selection" && (R = "selection");
|
|
16284
16294
|
let F = te(() => ({ anchor: [R, B].filter(Boolean).join(" ") }), [R, B]), L = w8(E, { overflowRef: i, onChange: s }), { getReferenceProps: b, getFloatingProps: g } = g8([L]), v = pe((N) => {
|
|
@@ -16286,7 +16296,7 @@ function $8({ children: e, enabled: t = !0 }) {
|
|
|
16286
16296
|
});
|
|
16287
16297
|
return U.createElement(Iu.Provider, { value: r }, U.createElement(jr.Provider, { value: { setFloating: v, setReference: S.setReference, styles: x, getReferenceProps: b, getFloatingProps: g, slot: F } }, e));
|
|
16288
16298
|
}
|
|
16289
|
-
function
|
|
16299
|
+
function T8(e) {
|
|
16290
16300
|
Ne(() => {
|
|
16291
16301
|
if (!e) return;
|
|
16292
16302
|
let t = new MutationObserver(() => {
|
|
@@ -16300,7 +16310,7 @@ function A8(e) {
|
|
|
16300
16310
|
};
|
|
16301
16311
|
}, [e]);
|
|
16302
16312
|
}
|
|
16303
|
-
function
|
|
16313
|
+
function A8(e, t) {
|
|
16304
16314
|
var n, r, o;
|
|
16305
16315
|
let s = aa((n = e == null ? void 0 : e.gap) != null ? n : "var(--anchor-gap, 0)", t), i = aa((r = e == null ? void 0 : e.offset) != null ? r : "var(--anchor-offset, 0)", t), c = aa((o = e == null ? void 0 : e.padding) != null ? o : "var(--anchor-padding, 0)", t);
|
|
16306
16316
|
return { ...e, gap: s, offset: i, padding: c };
|
|
@@ -16368,7 +16378,7 @@ function Wh(e, t) {
|
|
|
16368
16378
|
}
|
|
16369
16379
|
let Cu = De(null);
|
|
16370
16380
|
Cu.displayName = "OpenClosedContext";
|
|
16371
|
-
var
|
|
16381
|
+
var At = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing = 4] = "Closing", e[e.Opening = 8] = "Opening", e))(At || {});
|
|
16372
16382
|
function Bu() {
|
|
16373
16383
|
return Ee(Cu);
|
|
16374
16384
|
}
|
|
@@ -16546,7 +16556,7 @@ function Qh(e, t) {
|
|
|
16546
16556
|
let Jh = Nt, em = Ns.RenderStrategy;
|
|
16547
16557
|
function q8(e, t) {
|
|
16548
16558
|
var n, r;
|
|
16549
|
-
let { transition: o = !0, beforeEnter: s, afterEnter: i, beforeLeave: c, afterLeave: a, enter: u, enterFrom: l, enterTo: f, entered: p, leave: d, leaveFrom: h, leaveTo: m, ...w } = e, [S, x] = oe(null), E = ce(null), R = Xh(e), B = Pt(...R ? [E, t, x] : t === null ? [] : [t]), F = (n = w.unmount) == null || n ? En.Unmount : En.Hidden, { show: L, appear: b, initial: g } = V8(), [v, N] = oe(L ? "visible" : "hidden"),
|
|
16559
|
+
let { transition: o = !0, beforeEnter: s, afterEnter: i, beforeLeave: c, afterLeave: a, enter: u, enterFrom: l, enterTo: f, entered: p, leave: d, leaveFrom: h, leaveTo: m, ...w } = e, [S, x] = oe(null), E = ce(null), R = Xh(e), B = Pt(...R ? [E, t, x] : t === null ? [] : [t]), F = (n = w.unmount) == null || n ? En.Unmount : En.Hidden, { show: L, appear: b, initial: g } = V8(), [v, N] = oe(L ? "visible" : "hidden"), A = G8(), { register: O, unregister: I } = A;
|
|
16550
16560
|
Ne(() => O(E), [O, E]), Ne(() => {
|
|
16551
16561
|
if (F === En.Hidden && E.current) {
|
|
16552
16562
|
if (L && v !== "visible") {
|
|
@@ -16560,9 +16570,9 @@ function q8(e, t) {
|
|
|
16560
16570
|
Ne(() => {
|
|
16561
16571
|
if (R && y && v === "visible" && E.current === null) throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
|
|
16562
16572
|
}, [E, v, y, R]);
|
|
16563
|
-
let
|
|
16573
|
+
let T = g && !b, $ = b && L && g, P = ce(!1), M = Qh(() => {
|
|
16564
16574
|
P.current || (N("hidden"), I(E));
|
|
16565
|
-
},
|
|
16575
|
+
}, A), D = pe((q) => {
|
|
16566
16576
|
P.current = !0;
|
|
16567
16577
|
let ee = q ? "enter" : "leave";
|
|
16568
16578
|
M.onStart(E, ee, (ie) => {
|
|
@@ -16577,8 +16587,8 @@ function q8(e, t) {
|
|
|
16577
16587
|
Pe(() => {
|
|
16578
16588
|
R && o || (D(L), _(L));
|
|
16579
16589
|
}, [L, R, o]);
|
|
16580
|
-
let j = !(!o || !R || !y ||
|
|
16581
|
-
v === "visible" && (V |=
|
|
16590
|
+
let j = !(!o || !R || !y || T), [, H] = vh(j, S, L, { start: D, end: _ }), K = xn({ ref: B, className: ((r = nc(w.className, $ && u, $ && l, H.enter && u, H.enter && H.closed && l, H.enter && !H.closed && f, H.leave && d, H.leave && !H.closed && h, H.leave && H.closed && m, !H.transition && L && p)) == null ? void 0 : r.trim()) || void 0, ...wh(H) }), V = 0;
|
|
16591
|
+
v === "visible" && (V |= At.Open), v === "hidden" && (V |= At.Closed), L && v === "hidden" && (V |= At.Opening), !L && v === "visible" && (V |= At.Closing);
|
|
16582
16592
|
let z = ct();
|
|
16583
16593
|
return Z.createElement(bi.Provider, { value: M }, Z.createElement(Vh, { value: V }, z({ ourProps: K, theirProps: w, defaultTag: Jh, features: em, visible: v === "visible", name: "Transition.Child" })));
|
|
16584
16594
|
}
|
|
@@ -16586,7 +16596,7 @@ function Z8(e, t) {
|
|
|
16586
16596
|
let { show: n, appear: r = !1, unmount: o = !0, ...s } = e, i = ce(null), c = Xh(e), a = Pt(...c ? [i, t] : t === null ? [] : [t]);
|
|
16587
16597
|
Kh();
|
|
16588
16598
|
let u = Bu();
|
|
16589
|
-
if (n === void 0 && u !== null && (n = (u &
|
|
16599
|
+
if (n === void 0 && u !== null && (n = (u & At.Open) === At.Open), n === void 0) throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");
|
|
16590
16600
|
let [l, f] = oe(n ? "visible" : "hidden"), p = Qh(() => {
|
|
16591
16601
|
n || f("hidden");
|
|
16592
16602
|
}), [d, h] = oe(!0), m = ce([n]);
|
|
@@ -16833,26 +16843,26 @@ let n3 = Nt;
|
|
|
16833
16843
|
function r3(e, t) {
|
|
16834
16844
|
let n = Qn(), r = vu(), { value: o, defaultValue: s, form: i, name: c, onChange: a, by: u, invalid: l = !1, disabled: f = r || !1, horizontal: p = !1, multiple: d = !1, __demoMode: h = !1, ...m } = e;
|
|
16835
16845
|
const w = p ? "horizontal" : "vertical";
|
|
16836
|
-
let S = Pt(t), x = xx(s), [E = d ? [] : void 0, R] = vx(o, a, x), B = om({ id: n, __demoMode: h }), F = ce({ static: !1, hold: !1 }), L = ce(/* @__PURE__ */ new Map()), b = qx(u), g = X((j) => xt(v.mode, { [Pn.Multi]: () => E.some((H) => b(H, j)), [Pn.Single]: () => b(E, j) }), [E]), v =
|
|
16846
|
+
let S = Pt(t), x = xx(s), [E = d ? [] : void 0, R] = vx(o, a, x), B = om({ id: n, __demoMode: h }), F = ce({ static: !1, hold: !1 }), L = ce(/* @__PURE__ */ new Map()), b = qx(u), g = X((j) => xt(v.mode, { [Pn.Multi]: () => E.some((H) => b(H, j)), [Pn.Single]: () => b(E, j) }), [E]), v = Cn({ value: E, disabled: f, invalid: l, mode: d ? Pn.Multi : Pn.Single, orientation: w, onChange: R, compare: b, isSelected: g, optionsPropsRef: F, listRef: L });
|
|
16837
16847
|
Ne(() => {
|
|
16838
16848
|
B.state.dataRef.current = v;
|
|
16839
16849
|
}, [v]);
|
|
16840
|
-
let N = Ze(B, (j) => j.listboxState),
|
|
16850
|
+
let N = Ze(B, (j) => j.listboxState), A = Pu.get(null), O = Ze(A, X((j) => A.selectors.isTop(j, n), [A, n])), [I, y] = Ze(B, (j) => [j.buttonElement, j.optionsElement]);
|
|
16841
16851
|
v2(O, [I, y], (j, H) => {
|
|
16842
16852
|
B.send({ type: nm.CloseListbox }), bh(H, Su.Loose) || (j.preventDefault(), I == null || I.focus());
|
|
16843
16853
|
});
|
|
16844
|
-
let
|
|
16854
|
+
let T = Cn({ open: N === _e.Open, disabled: f, invalid: l, value: E }), [$, P] = Ux({ inherit: !0 }), M = { ref: S }, D = X(() => {
|
|
16845
16855
|
if (x !== void 0) return R == null ? void 0 : R(x);
|
|
16846
16856
|
}, [R, x]), _ = ct();
|
|
16847
|
-
return Z.createElement(P, { value: $, props: { htmlFor: I == null ? void 0 : I.id }, slot: { open: N === _e.Open, disabled: f } }, Z.createElement($8, null, Z.createElement(rm.Provider, { value: B }, Z.createElement(yi.Provider, { value: v }, Z.createElement(Vh, { value: xt(N, { [_e.Open]:
|
|
16857
|
+
return Z.createElement(P, { value: $, props: { htmlFor: I == null ? void 0 : I.id }, slot: { open: N === _e.Open, disabled: f } }, Z.createElement($8, null, Z.createElement(rm.Provider, { value: B }, Z.createElement(yi.Provider, { value: v }, Z.createElement(Vh, { value: xt(N, { [_e.Open]: At.Open, [_e.Closed]: At.Closed }) }, c != null && E != null && Z.createElement(Rx, { disabled: f, data: { [c]: E }, form: i, onReset: D }), _({ ourProps: M, theirProps: m, slot: T, defaultTag: n3, name: "Listbox" }))))));
|
|
16848
16858
|
}
|
|
16849
16859
|
let o3 = "button";
|
|
16850
16860
|
function s3(e, t) {
|
|
16851
16861
|
let n = Qn(), r = Jp(), o = qo("Listbox.Button"), s = Lu("Listbox.Button"), { id: i = r || `headlessui-listbox-button-${n}`, disabled: c = o.disabled || !1, autoFocus: a = !1, ...u } = e, l = Pt(t, x8(), s.actions.setButtonElement), f = E8(), [p, d, h] = Ze(s, (y) => [y.listboxState, y.buttonElement, y.optionsElement]), m = p === _e.Open;
|
|
16852
16862
|
P2(m, { trigger: d, action: X((y) => {
|
|
16853
16863
|
if (d != null && d.contains(y.target)) return ss.Ignore;
|
|
16854
|
-
let
|
|
16855
|
-
return bn(
|
|
16864
|
+
let T = y.target.closest('[role="option"]:not([data-disabled])');
|
|
16865
|
+
return bn(T) ? ss.Select(T) : h != null && h.contains(y.target) ? ss.Ignore : ss.Close;
|
|
16856
16866
|
}, [d, h]), close: s.actions.closeListbox, select: s.actions.selectActiveOption });
|
|
16857
16867
|
let w = pe((y) => {
|
|
16858
16868
|
switch (y.key) {
|
|
@@ -16874,32 +16884,32 @@ function s3(e, t) {
|
|
|
16874
16884
|
break;
|
|
16875
16885
|
}
|
|
16876
16886
|
}), x = Yx((y) => {
|
|
16877
|
-
var
|
|
16878
|
-
s.state.listboxState === _e.Open ? (bs(() => s.actions.closeListbox()), (
|
|
16879
|
-
}), E = pe((y) => y.preventDefault()), R = ih([i]), B = kx(), { isFocusVisible: F, focusProps: L } = ix({ autoFocus: a }), { isHovered: b, hoverProps: g } = sx({ isDisabled: c }), { pressed: v, pressProps: N } = px({ disabled: c }),
|
|
16880
|
-
return ct()({ ourProps: I, theirProps: u, slot:
|
|
16887
|
+
var T;
|
|
16888
|
+
s.state.listboxState === _e.Open ? (bs(() => s.actions.closeListbox()), (T = s.state.buttonElement) == null || T.focus({ preventScroll: !0 })) : (y.preventDefault(), s.actions.openListbox({ focus: $e.Nothing }));
|
|
16889
|
+
}), E = pe((y) => y.preventDefault()), R = ih([i]), B = kx(), { isFocusVisible: F, focusProps: L } = ix({ autoFocus: a }), { isHovered: b, hoverProps: g } = sx({ isDisabled: c }), { pressed: v, pressProps: N } = px({ disabled: c }), A = Cn({ open: p === _e.Open, active: v || p === _e.Open, disabled: c, invalid: o.invalid, value: o.value, hover: b, focus: F, autofocus: a }), O = Ze(s, (y) => y.listboxState === _e.Open), I = Zp(f(), { ref: l, id: i, type: S2(e, d), "aria-haspopup": "listbox", "aria-controls": h == null ? void 0 : h.id, "aria-expanded": O, "aria-labelledby": R, "aria-describedby": B, disabled: c || void 0, autoFocus: a, onKeyDown: w, onKeyUp: S, onKeyPress: E }, x, L, g, N);
|
|
16890
|
+
return ct()({ ourProps: I, theirProps: u, slot: A, defaultTag: o3, name: "Listbox.Button" });
|
|
16881
16891
|
}
|
|
16882
16892
|
let sm = De(!1), i3 = "div", a3 = Ns.RenderStrategy | Ns.Static;
|
|
16883
16893
|
function c3(e, t) {
|
|
16884
16894
|
let n = Qn(), { id: r = `headlessui-listbox-options-${n}`, anchor: o, portal: s = !1, modal: i = !0, transition: c = !1, ...a } = e, u = v8(o), [l, f] = oe(null);
|
|
16885
16895
|
u && (s = !0);
|
|
16886
|
-
let p = qo("Listbox.Options"), d = Lu("Listbox.Options"), [h, m, w, S] = Ze(d, (z) => [z.listboxState, z.buttonElement, z.optionsElement, z.__demoMode]), x = ac(m), E = ac(w), R = Bu(), [B, F] = vh(c, l, R !== null ? (R &
|
|
16896
|
+
let p = qo("Listbox.Options"), d = Lu("Listbox.Options"), [h, m, w, S] = Ze(d, (z) => [z.listboxState, z.buttonElement, z.optionsElement, z.__demoMode]), x = ac(m), E = ac(w), R = Bu(), [B, F] = vh(c, l, R !== null ? (R & At.Open) === At.Open : h === _e.Open);
|
|
16887
16897
|
c2(B, m, d.actions.closeListbox);
|
|
16888
16898
|
let L = S ? !1 : i && h === _e.Open;
|
|
16889
16899
|
I2(L, E);
|
|
16890
16900
|
let b = S ? !1 : i && h === _e.Open;
|
|
16891
16901
|
a2(b, { allowed: X(() => [m, w], [m, w]) });
|
|
16892
|
-
let g = Ze(d, d.selectors.didButtonMove) ? !1 : B, v = Ze(d, d.selectors.hasFrozenValue) && !e.static, N = Wh(v, p.value),
|
|
16902
|
+
let g = Ze(d, d.selectors.didButtonMove) ? !1 : B, v = Ze(d, d.selectors.hasFrozenValue) && !e.static, N = Wh(v, p.value), A = X((z) => p.compare(N, z), [p.compare, N]), O = Ze(d, (z) => {
|
|
16893
16903
|
var q;
|
|
16894
16904
|
if (u == null || !((q = u == null ? void 0 : u.to) != null && q.includes("selection"))) return null;
|
|
16895
|
-
let ee = z.options.findIndex((ie) =>
|
|
16905
|
+
let ee = z.options.findIndex((ie) => A(ie.dataRef.current.value));
|
|
16896
16906
|
return ee === -1 && (ee = 0), ee;
|
|
16897
16907
|
}), I = (() => {
|
|
16898
16908
|
if (u == null) return;
|
|
16899
16909
|
if (O === null) return { ...u, inner: void 0 };
|
|
16900
16910
|
let z = Array.from(p.listRef.current.values());
|
|
16901
16911
|
return { ...u, inner: { listRef: { current: z }, index: O } };
|
|
16902
|
-
})(), [y,
|
|
16912
|
+
})(), [y, T] = S8(I), $ = P8(), P = Pt(t, u ? y : null, d.actions.setOptionsElement, f), M = nr();
|
|
16903
16913
|
Pe(() => {
|
|
16904
16914
|
let z = w;
|
|
16905
16915
|
z && h === _e.Open && (lx(z) || z == null || z.focus({ preventScroll: !0 }));
|
|
@@ -16935,7 +16945,7 @@ function c3(e, t) {
|
|
|
16935
16945
|
}), _ = Ze(d, (z) => {
|
|
16936
16946
|
var q;
|
|
16937
16947
|
return (q = z.buttonElement) == null ? void 0 : q.id;
|
|
16938
|
-
}), j =
|
|
16948
|
+
}), j = Cn({ open: h === _e.Open }), H = Zp(u ? $() : {}, { id: r, ref: P, "aria-activedescendant": Ze(d, d.selectors.activeDescendantId), "aria-multiselectable": p.mode === Pn.Multi ? !0 : void 0, "aria-labelledby": _, "aria-orientation": p.orientation, onKeyDown: D, role: "listbox", tabIndex: h === _e.Open ? 0 : void 0, style: { ...a.style, ...T, "--button-width": Zx(B, m, !0).width }, ...wh(F) }), K = ct(), V = te(() => p.mode === Pn.Multi ? p : { ...p, isSelected: A }, [p, A]);
|
|
16939
16949
|
return Z.createElement(_8, { enabled: s ? e.static || B : !1, ownerDocument: x }, Z.createElement(yi.Provider, { value: V }, K({ ourProps: H, theirProps: a, slot: j, defaultTag: i3, features: a3, visible: g, name: "Listbox.Options" })));
|
|
16940
16950
|
}
|
|
16941
16951
|
let u3 = "div";
|
|
@@ -16963,12 +16973,12 @@ function l3(e, t) {
|
|
|
16963
16973
|
E.wasMoved(v) && (o || l && u.state.activationTrigger === ps.Pointer || u.actions.goToOption({ focus: $e.Specific, id: r }, ps.Pointer));
|
|
16964
16974
|
}), F = pe((v) => {
|
|
16965
16975
|
E.wasMoved(v) && (o || l && u.state.activationTrigger === ps.Pointer && u.actions.goToOption({ focus: $e.Nothing }));
|
|
16966
|
-
}), L =
|
|
16976
|
+
}), L = Cn({ active: l, focus: l, selected: f, disabled: o, selectedOption: f && c }), b = c ? {} : { id: r, ref: m, role: "option", tabIndex: o === !0 ? void 0 : -1, "aria-disabled": o === !0 ? !0 : void 0, "aria-selected": f, disabled: void 0, onClick: S, onFocus: x, onPointerEnter: R, onMouseEnter: R, onPointerMove: B, onMouseMove: B, onPointerLeave: F, onMouseLeave: F }, g = ct();
|
|
16967
16977
|
return !f && c ? null : g({ ourProps: b, theirProps: i, slot: L, defaultTag: u3, name: "Listbox.Option" });
|
|
16968
16978
|
}
|
|
16969
16979
|
let f3 = Nt;
|
|
16970
16980
|
function d3(e, t) {
|
|
16971
|
-
let { options: n, placeholder: r, ...o } = e, s = { ref: Pt(t) }, i = qo("ListboxSelectedOption"), c =
|
|
16981
|
+
let { options: n, placeholder: r, ...o } = e, s = { ref: Pt(t) }, i = qo("ListboxSelectedOption"), c = Cn({}), a = i.value === void 0 || i.value === null || i.mode === Pn.Multi && Array.isArray(i.value) && i.value.length === 0, u = ct();
|
|
16972
16982
|
return Z.createElement(sm.Provider, { value: !0 }, u({ ourProps: s, theirProps: { ...o, children: Z.createElement(Z.Fragment, null, r && a ? r : n) }, slot: c, defaultTag: f3, name: "ListboxSelectedOption" }));
|
|
16973
16983
|
}
|
|
16974
16984
|
let p3 = nt(r3), h3 = nt(s3), m3 = Vx, b3 = nt(c3), g3 = nt(l3), y3 = nt(d3), wt = Object.assign(p3, { Button: h3, Label: m3, Options: b3, Option: g3, SelectedOption: y3 });
|
|
@@ -17190,16 +17200,18 @@ const x3 = {
|
|
|
17190
17200
|
selectedToken: t,
|
|
17191
17201
|
onTokenChange: n,
|
|
17192
17202
|
disabled: r = !1,
|
|
17193
|
-
className: o = ""
|
|
17203
|
+
className: o = "",
|
|
17204
|
+
walletType: s,
|
|
17205
|
+
accountType: i
|
|
17194
17206
|
}) => {
|
|
17195
|
-
const { t:
|
|
17207
|
+
const { t: c } = Yt(), a = (u) => u.token || u.symbol;
|
|
17196
17208
|
return /* @__PURE__ */ C.jsx("div", { className: `relative ${o}`, children: /* @__PURE__ */ C.jsx(
|
|
17197
17209
|
wt,
|
|
17198
17210
|
{
|
|
17199
17211
|
value: t,
|
|
17200
17212
|
onChange: n,
|
|
17201
17213
|
disabled: r,
|
|
17202
|
-
children: ({ open:
|
|
17214
|
+
children: ({ open: u }) => /* @__PURE__ */ C.jsxs(C.Fragment, { children: [
|
|
17203
17215
|
/* @__PURE__ */ C.jsxs(
|
|
17204
17216
|
wt.Button,
|
|
17205
17217
|
{
|
|
@@ -17208,24 +17220,24 @@ const x3 = {
|
|
|
17208
17220
|
items-center justify-between flex px-3 rounded-lg
|
|
17209
17221
|
focus:outline-none
|
|
17210
17222
|
${r ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:bg-fill-btn-secondary-hover"}
|
|
17211
|
-
${
|
|
17223
|
+
${u ? "ring-1 ring-white" : ""}
|
|
17212
17224
|
`,
|
|
17213
17225
|
children: [
|
|
17214
|
-
/* @__PURE__ */ C.jsx("span", { className: "text-sm leading-[18px] font-medium", children:
|
|
17226
|
+
/* @__PURE__ */ C.jsx("span", { className: "text-sm leading-[18px] font-medium", children: c("deposit.asset") }),
|
|
17215
17227
|
/* @__PURE__ */ C.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
17216
17228
|
/* @__PURE__ */ C.jsx(
|
|
17217
17229
|
"img",
|
|
17218
17230
|
{
|
|
17219
17231
|
src: t.iconUrl,
|
|
17220
|
-
alt:
|
|
17232
|
+
alt: a(t),
|
|
17221
17233
|
className: "w-4 h-4 rounded-full"
|
|
17222
17234
|
}
|
|
17223
17235
|
),
|
|
17224
|
-
/* @__PURE__ */ C.jsx("span", { className: "text-sm text-white ml-1", children:
|
|
17236
|
+
/* @__PURE__ */ C.jsx("span", { className: "text-sm text-white ml-1", children: a(t) }),
|
|
17225
17237
|
/* @__PURE__ */ C.jsxs(
|
|
17226
17238
|
"svg",
|
|
17227
17239
|
{
|
|
17228
|
-
className: `w-3 h-3 ml-2 transition-transform duration-200 ${
|
|
17240
|
+
className: `w-3 h-3 ml-2 transition-transform duration-200 ${u ? "rotate-180" : ""}`,
|
|
17229
17241
|
xmlns: "http://www.w3.org/2000/svg",
|
|
17230
17242
|
width: "10",
|
|
17231
17243
|
height: "11",
|
|
@@ -17273,30 +17285,33 @@ const x3 = {
|
|
|
17273
17285
|
bg-fill-input-primary border border-line-divider-secondary shadow-lg
|
|
17274
17286
|
focus:outline-none
|
|
17275
17287
|
`,
|
|
17276
|
-
children: e.map((
|
|
17288
|
+
children: e.map((l) => /* @__PURE__ */ C.jsx(
|
|
17277
17289
|
wt.Option,
|
|
17278
17290
|
{
|
|
17279
|
-
value:
|
|
17280
|
-
className: ({ active:
|
|
17281
|
-
children: ({ selected:
|
|
17291
|
+
value: l,
|
|
17292
|
+
className: ({ active: f, selected: p }) => `relative cursor-pointer select-none py-3 px-3 ${p ? "bg-fill-btn-secondary" : f ? "bg-fill-input-secondary" : ""}`,
|
|
17293
|
+
children: ({ selected: f, active: p }) => /* @__PURE__ */ C.jsxs("div", { className: "flex items-center space-x-3", children: [
|
|
17282
17294
|
/* @__PURE__ */ C.jsx(
|
|
17283
17295
|
"img",
|
|
17284
17296
|
{
|
|
17285
|
-
src:
|
|
17286
|
-
alt:
|
|
17297
|
+
src: l.iconUrl,
|
|
17298
|
+
alt: a(l),
|
|
17287
17299
|
className: "w-5 h-5 rounded-full"
|
|
17288
17300
|
}
|
|
17289
17301
|
),
|
|
17290
|
-
/* @__PURE__ */ C.
|
|
17291
|
-
|
|
17292
|
-
|
|
17293
|
-
|
|
17294
|
-
|
|
17295
|
-
|
|
17296
|
-
|
|
17302
|
+
/* @__PURE__ */ C.jsxs("div", { className: "flex flex-col", children: [
|
|
17303
|
+
/* @__PURE__ */ C.jsx(
|
|
17304
|
+
"span",
|
|
17305
|
+
{
|
|
17306
|
+
className: `text-sm font-medium ${f || p ? "text-text-primary" : "text-text-tertiary"}`,
|
|
17307
|
+
children: a(l)
|
|
17308
|
+
}
|
|
17309
|
+
),
|
|
17310
|
+
s === Tn && i === "perpetual" && l.token === "USDC" && /* @__PURE__ */ C.jsx("p", { className: "mt-2 text-xs text-text-tertiary whitespace-pre-line", children: c("deposit.defaultSpotNotice") })
|
|
17311
|
+
] })
|
|
17297
17312
|
] })
|
|
17298
17313
|
},
|
|
17299
|
-
|
|
17314
|
+
a(l)
|
|
17300
17315
|
))
|
|
17301
17316
|
}
|
|
17302
17317
|
)
|
|
@@ -17311,14 +17326,14 @@ const x3 = {
|
|
|
17311
17326
|
onChainChange: n,
|
|
17312
17327
|
curSelectToken: r,
|
|
17313
17328
|
onTokenChange: o,
|
|
17314
|
-
walletType: s =
|
|
17329
|
+
walletType: s = Tn,
|
|
17315
17330
|
// 默认为 MPC 钱包
|
|
17316
17331
|
txType: i = "deposit",
|
|
17317
17332
|
// 默认为充值场景
|
|
17318
17333
|
accountType: c
|
|
17319
17334
|
}) => {
|
|
17320
17335
|
const a = X(
|
|
17321
|
-
(w) => i === "withdraw" ? s ===
|
|
17336
|
+
(w) => i === "withdraw" ? s === Tn ? w.allowAaWithdraw !== !1 : w.allowWithdraw !== !1 : s === Tn ? w.allowAaDeposit !== !1 : w.allowDeposit !== !1,
|
|
17322
17337
|
[i, s]
|
|
17323
17338
|
), u = te(() => {
|
|
17324
17339
|
const w = /* @__PURE__ */ new Set(), S = [];
|
|
@@ -17400,7 +17415,9 @@ const x3 = {
|
|
|
17400
17415
|
{
|
|
17401
17416
|
tokens: h,
|
|
17402
17417
|
selectedToken: m,
|
|
17403
|
-
onTokenChange: f
|
|
17418
|
+
onTokenChange: f,
|
|
17419
|
+
walletType: s,
|
|
17420
|
+
accountType: c
|
|
17404
17421
|
}
|
|
17405
17422
|
),
|
|
17406
17423
|
/* @__PURE__ */ C.jsx(
|
|
@@ -17417,7 +17434,7 @@ const x3 = {
|
|
|
17417
17434
|
}
|
|
17418
17435
|
)
|
|
17419
17436
|
] });
|
|
17420
|
-
},
|
|
17437
|
+
}, T3 = ({ options: e }) => /* @__PURE__ */ C.jsx(C.Fragment, { children: e.map((t) => /* @__PURE__ */ C.jsx(
|
|
17421
17438
|
wt.Option,
|
|
17422
17439
|
{
|
|
17423
17440
|
value: t.value,
|
|
@@ -17515,14 +17532,14 @@ const x3 = {
|
|
|
17515
17532
|
bg-fill-input-primary border border-line-divider-secondary shadow-lg
|
|
17516
17533
|
focus:outline-none
|
|
17517
17534
|
`,
|
|
17518
|
-
children: /* @__PURE__ */ C.jsx(
|
|
17535
|
+
children: /* @__PURE__ */ C.jsx(T3, { options: s })
|
|
17519
17536
|
}
|
|
17520
17537
|
)
|
|
17521
17538
|
}
|
|
17522
17539
|
)
|
|
17523
17540
|
] }) }) });
|
|
17524
17541
|
};
|
|
17525
|
-
var wi = {},
|
|
17542
|
+
var wi = {}, A3 = function() {
|
|
17526
17543
|
var e = document.getSelection();
|
|
17527
17544
|
if (!e.rangeCount)
|
|
17528
17545
|
return function() {
|
|
@@ -17543,7 +17560,7 @@ var wi = {}, T3 = function() {
|
|
|
17543
17560
|
e.addRange(o);
|
|
17544
17561
|
}), t && t.focus();
|
|
17545
17562
|
};
|
|
17546
|
-
}, R3 =
|
|
17563
|
+
}, R3 = A3, Uf = {
|
|
17547
17564
|
"text/plain": "Text",
|
|
17548
17565
|
"text/html": "Url",
|
|
17549
17566
|
default: "Text"
|
|
@@ -18440,16 +18457,16 @@ var e4 = function() {
|
|
|
18440
18457
|
const I = E.current, y = I.getContext("2d");
|
|
18441
18458
|
if (!y)
|
|
18442
18459
|
return;
|
|
18443
|
-
let
|
|
18460
|
+
let T = g;
|
|
18444
18461
|
const $ = R.current, P = N != null && $ !== null && $.complete && $.naturalHeight !== 0 && $.naturalWidth !== 0;
|
|
18445
|
-
P && N.excavation != null && (
|
|
18462
|
+
P && N.excavation != null && (T = xm(
|
|
18446
18463
|
g,
|
|
18447
18464
|
N.excavation
|
|
18448
18465
|
));
|
|
18449
18466
|
const M = window.devicePixelRatio || 1;
|
|
18450
18467
|
I.height = I.width = s * M;
|
|
18451
18468
|
const D = s / v * M;
|
|
18452
|
-
y.scale(D, D), y.fillStyle = c, y.fillRect(0, 0, v, v), y.fillStyle = a, e4 ? y.fill(new Path2D(vm(
|
|
18469
|
+
y.scale(D, D), y.fillStyle = c, y.fillRect(0, 0, v, v), y.fillStyle = a, e4 ? y.fill(new Path2D(vm(T, b))) : g.forEach(function(_, j) {
|
|
18453
18470
|
_.forEach(function(H, K) {
|
|
18454
18471
|
H && y.fillRect(K + b, j + b, 1, 1);
|
|
18455
18472
|
});
|
|
@@ -18464,7 +18481,7 @@ var e4 = function() {
|
|
|
18464
18481
|
}), Z.useEffect(() => {
|
|
18465
18482
|
L(!1);
|
|
18466
18483
|
}, [x]);
|
|
18467
|
-
const
|
|
18484
|
+
const A = wc({ height: s, width: s }, w);
|
|
18468
18485
|
let O = null;
|
|
18469
18486
|
return x != null && (O = /* @__PURE__ */ Z.createElement(
|
|
18470
18487
|
"img",
|
|
@@ -18481,7 +18498,7 @@ var e4 = function() {
|
|
|
18481
18498
|
)), /* @__PURE__ */ Z.createElement(Z.Fragment, null, /* @__PURE__ */ Z.createElement(
|
|
18482
18499
|
"canvas",
|
|
18483
18500
|
wc({
|
|
18484
|
-
style:
|
|
18501
|
+
style: A,
|
|
18485
18502
|
height: s,
|
|
18486
18503
|
width: s,
|
|
18487
18504
|
ref: B,
|
|
@@ -18686,7 +18703,7 @@ function jt(e) {
|
|
|
18686
18703
|
return t.current == null ? void 0 : t.current(...r);
|
|
18687
18704
|
}, []);
|
|
18688
18705
|
}
|
|
18689
|
-
const
|
|
18706
|
+
const Tm = () => ({
|
|
18690
18707
|
getShadowRoot: !0,
|
|
18691
18708
|
displayCheck: (
|
|
18692
18709
|
// JSDOM does not support the `tabbable` library. To solve this we can
|
|
@@ -18695,24 +18712,24 @@ const Am = () => ({
|
|
|
18695
18712
|
typeof ResizeObserver == "function" && ResizeObserver.toString().includes("[native code]") ? "full" : "none"
|
|
18696
18713
|
)
|
|
18697
18714
|
});
|
|
18698
|
-
function
|
|
18699
|
-
const n = Nh(e,
|
|
18715
|
+
function Am(e, t) {
|
|
18716
|
+
const n = Nh(e, Tm()), r = n.length;
|
|
18700
18717
|
if (r === 0) return;
|
|
18701
18718
|
const o = xc(_t(e)), s = n.indexOf(o), i = s === -1 ? t === 1 ? 0 : r - 1 : s + t;
|
|
18702
18719
|
return n[i];
|
|
18703
18720
|
}
|
|
18704
18721
|
function b4(e) {
|
|
18705
|
-
return
|
|
18722
|
+
return Am(_t(e).body, 1) || e;
|
|
18706
18723
|
}
|
|
18707
18724
|
function g4(e) {
|
|
18708
|
-
return
|
|
18725
|
+
return Am(_t(e).body, -1) || e;
|
|
18709
18726
|
}
|
|
18710
18727
|
function ua(e, t) {
|
|
18711
18728
|
const n = t || e.currentTarget, r = e.relatedTarget;
|
|
18712
18729
|
return !r || !Or(n, r);
|
|
18713
18730
|
}
|
|
18714
18731
|
function y4(e) {
|
|
18715
|
-
Nh(e,
|
|
18732
|
+
Nh(e, Tm()).forEach((n) => {
|
|
18716
18733
|
n.dataset.tabindex = n.getAttribute("tabindex") || "", n.setAttribute("tabindex", "-1");
|
|
18717
18734
|
});
|
|
18718
18735
|
}
|
|
@@ -18767,10 +18784,10 @@ function $4() {
|
|
|
18767
18784
|
}
|
|
18768
18785
|
};
|
|
18769
18786
|
}
|
|
18770
|
-
const
|
|
18787
|
+
const T4 = /* @__PURE__ */ U.createContext(null), A4 = /* @__PURE__ */ U.createContext(null), ju = () => {
|
|
18771
18788
|
var e;
|
|
18772
|
-
return ((e = U.useContext(
|
|
18773
|
-
}, _u = () => U.useContext(
|
|
18789
|
+
return ((e = U.useContext(T4)) == null ? void 0 : e.id) || null;
|
|
18790
|
+
}, _u = () => U.useContext(A4);
|
|
18774
18791
|
function Zo(e) {
|
|
18775
18792
|
return "data-floating-ui-" + e;
|
|
18776
18793
|
}
|
|
@@ -18834,7 +18851,7 @@ function R4(e, t) {
|
|
|
18834
18851
|
P.removeEventListener("mouseleave", $);
|
|
18835
18852
|
};
|
|
18836
18853
|
}, [i.floating, n, r, c, m, N]);
|
|
18837
|
-
const
|
|
18854
|
+
const A = U.useCallback(function($, P, M) {
|
|
18838
18855
|
P === void 0 && (P = !0), M === void 0 && (M = "hover");
|
|
18839
18856
|
const D = la(w.current, "close", E.current);
|
|
18840
18857
|
D && !B.current ? (bt(R), R.current = window.setTimeout(() => r(!1, $, M), D)) : P && (bt(R), r(!1, $, M));
|
|
@@ -18870,7 +18887,7 @@ function R4(e, t) {
|
|
|
18870
18887
|
x: j.clientX,
|
|
18871
18888
|
y: j.clientY,
|
|
18872
18889
|
onClose() {
|
|
18873
|
-
I(), O(), y() ||
|
|
18890
|
+
I(), O(), y() || A(j, !0, "safe-polygon");
|
|
18874
18891
|
}
|
|
18875
18892
|
});
|
|
18876
18893
|
const V = B.current;
|
|
@@ -18879,7 +18896,7 @@ function R4(e, t) {
|
|
|
18879
18896
|
};
|
|
18880
18897
|
return;
|
|
18881
18898
|
}
|
|
18882
|
-
(E.current === "touch" ? !Or(i.floating, j.relatedTarget) : !0) &&
|
|
18899
|
+
(E.current === "touch" ? !Or(i.floating, j.relatedTarget) : !0) && A(j);
|
|
18883
18900
|
}
|
|
18884
18901
|
function M(j) {
|
|
18885
18902
|
y() || o.current.floatingContext && (m.current == null || m.current({
|
|
@@ -18888,7 +18905,7 @@ function R4(e, t) {
|
|
|
18888
18905
|
x: j.clientX,
|
|
18889
18906
|
y: j.clientY,
|
|
18890
18907
|
onClose() {
|
|
18891
|
-
I(), O(), y() ||
|
|
18908
|
+
I(), O(), y() || A(j);
|
|
18892
18909
|
}
|
|
18893
18910
|
})(j));
|
|
18894
18911
|
}
|
|
@@ -18896,7 +18913,7 @@ function R4(e, t) {
|
|
|
18896
18913
|
bt(R);
|
|
18897
18914
|
}
|
|
18898
18915
|
function _(j) {
|
|
18899
|
-
y() ||
|
|
18916
|
+
y() || A(j, !1);
|
|
18900
18917
|
}
|
|
18901
18918
|
if (be(i.domReference)) {
|
|
18902
18919
|
const j = i.domReference, H = i.floating;
|
|
@@ -18906,7 +18923,7 @@ function R4(e, t) {
|
|
|
18906
18923
|
n && j.removeEventListener("mouseleave", M), p && j.removeEventListener("mousemove", $), j.removeEventListener("mouseenter", $), j.removeEventListener("mouseleave", P), H && (H.removeEventListener("mouseleave", M), H.removeEventListener("mouseenter", D), H.removeEventListener("mouseleave", _));
|
|
18907
18924
|
};
|
|
18908
18925
|
}
|
|
18909
|
-
}, [i, c, e, l, p,
|
|
18926
|
+
}, [i, c, e, l, p, A, O, I, r, n, S, d, w, m, o, y, x]), Wt(() => {
|
|
18910
18927
|
var $;
|
|
18911
18928
|
if (c && n && ($ = m.current) != null && ($ = $.__options) != null && $.blockPointerEvents && N()) {
|
|
18912
18929
|
b.current = !0;
|
|
@@ -18926,7 +18943,7 @@ function R4(e, t) {
|
|
|
18926
18943
|
}, [n, O, I]), U.useEffect(() => () => {
|
|
18927
18944
|
O(), bt(R), bt(F), I();
|
|
18928
18945
|
}, [c, i.domReference, O, I]);
|
|
18929
|
-
const
|
|
18946
|
+
const T = U.useMemo(() => {
|
|
18930
18947
|
function $(P) {
|
|
18931
18948
|
E.current = P.pointerType;
|
|
18932
18949
|
}
|
|
@@ -18945,8 +18962,8 @@ function R4(e, t) {
|
|
|
18945
18962
|
};
|
|
18946
18963
|
}, [l, r, n, S, x]);
|
|
18947
18964
|
return U.useMemo(() => c ? {
|
|
18948
|
-
reference:
|
|
18949
|
-
} : {}, [c,
|
|
18965
|
+
reference: T
|
|
18966
|
+
} : {}, [c, T]);
|
|
18950
18967
|
}
|
|
18951
18968
|
const Rm = {
|
|
18952
18969
|
border: 0,
|
|
@@ -19167,7 +19184,7 @@ function L4(e, t) {
|
|
|
19167
19184
|
var y;
|
|
19168
19185
|
if (!n || !i || !c || I.key !== "Escape" || L.current)
|
|
19169
19186
|
return;
|
|
19170
|
-
const
|
|
19187
|
+
const T = (y = s.current.floatingContext) == null ? void 0 : y.nodeId, $ = m ? hs(m.nodesRef.current, T) : [];
|
|
19171
19188
|
if (!E && (I.stopPropagation(), $.length > 0)) {
|
|
19172
19189
|
let P = !0;
|
|
19173
19190
|
if ($.forEach((M) => {
|
|
@@ -19182,17 +19199,17 @@ function L4(e, t) {
|
|
|
19182
19199
|
r(!1, l4(I) ? I.nativeEvent : I, "escape-key");
|
|
19183
19200
|
}), g = jt((I) => {
|
|
19184
19201
|
var y;
|
|
19185
|
-
const
|
|
19202
|
+
const T = () => {
|
|
19186
19203
|
var $;
|
|
19187
|
-
b(I), ($ = lr(I)) == null || $.removeEventListener("keydown",
|
|
19204
|
+
b(I), ($ = lr(I)) == null || $.removeEventListener("keydown", T);
|
|
19188
19205
|
};
|
|
19189
|
-
(y = lr(I)) == null || y.addEventListener("keydown",
|
|
19206
|
+
(y = lr(I)) == null || y.addEventListener("keydown", T);
|
|
19190
19207
|
}), v = jt((I) => {
|
|
19191
19208
|
var y;
|
|
19192
|
-
const
|
|
19209
|
+
const T = s.current.insideReactTree;
|
|
19193
19210
|
s.current.insideReactTree = !1;
|
|
19194
19211
|
const $ = x.current;
|
|
19195
|
-
if (x.current = !1, u === "click" && $ ||
|
|
19212
|
+
if (x.current = !1, u === "click" && $ || T || typeof S == "function" && !S(I))
|
|
19196
19213
|
return;
|
|
19197
19214
|
const P = lr(I), M = "[" + Zo("inert") + "]", D = _t(o.floating).querySelectorAll(M);
|
|
19198
19215
|
let _ = be(P) ? P : null;
|
|
@@ -19233,11 +19250,11 @@ function L4(e, t) {
|
|
|
19233
19250
|
r(!1, I, "outside-press");
|
|
19234
19251
|
}), N = jt((I) => {
|
|
19235
19252
|
var y;
|
|
19236
|
-
const
|
|
19253
|
+
const T = () => {
|
|
19237
19254
|
var $;
|
|
19238
|
-
v(I), ($ = lr(I)) == null || $.removeEventListener(u,
|
|
19255
|
+
v(I), ($ = lr(I)) == null || $.removeEventListener(u, T);
|
|
19239
19256
|
};
|
|
19240
|
-
(y = lr(I)) == null || y.addEventListener(u,
|
|
19257
|
+
(y = lr(I)) == null || y.addEventListener(u, T);
|
|
19241
19258
|
});
|
|
19242
19259
|
U.useEffect(() => {
|
|
19243
19260
|
if (!n || !i)
|
|
@@ -19247,7 +19264,7 @@ function L4(e, t) {
|
|
|
19247
19264
|
function y(D) {
|
|
19248
19265
|
r(!1, D, "ancestor-scroll");
|
|
19249
19266
|
}
|
|
19250
|
-
function
|
|
19267
|
+
function T() {
|
|
19251
19268
|
window.clearTimeout(I), L.current = !0;
|
|
19252
19269
|
}
|
|
19253
19270
|
function $() {
|
|
@@ -19261,7 +19278,7 @@ function L4(e, t) {
|
|
|
19261
19278
|
);
|
|
19262
19279
|
}
|
|
19263
19280
|
const P = _t(o.floating);
|
|
19264
|
-
c && (P.addEventListener("keydown", B ? g : b, B), P.addEventListener("compositionstart",
|
|
19281
|
+
c && (P.addEventListener("keydown", B ? g : b, B), P.addEventListener("compositionstart", T), P.addEventListener("compositionend", $)), S && P.addEventListener(u, F ? N : v, F);
|
|
19265
19282
|
let M = [];
|
|
19266
19283
|
return p && (be(o.domReference) && (M = An(o.domReference)), be(o.floating) && (M = M.concat(An(o.floating))), !be(o.reference) && o.reference && o.reference.contextElement && (M = M.concat(An(o.reference.contextElement)))), M = M.filter((D) => {
|
|
19267
19284
|
var _;
|
|
@@ -19271,14 +19288,14 @@ function L4(e, t) {
|
|
|
19271
19288
|
passive: !0
|
|
19272
19289
|
});
|
|
19273
19290
|
}), () => {
|
|
19274
|
-
c && (P.removeEventListener("keydown", B ? g : b, B), P.removeEventListener("compositionstart",
|
|
19291
|
+
c && (P.removeEventListener("keydown", B ? g : b, B), P.removeEventListener("compositionstart", T), P.removeEventListener("compositionend", $)), S && P.removeEventListener(u, F ? N : v, F), M.forEach((D) => {
|
|
19275
19292
|
D.removeEventListener("scroll", y);
|
|
19276
19293
|
}), window.clearTimeout(I);
|
|
19277
19294
|
};
|
|
19278
19295
|
}, [s, o, c, S, u, n, r, p, i, E, R, b, B, g, v, F, N]), U.useEffect(() => {
|
|
19279
19296
|
s.current.insideReactTree = !1;
|
|
19280
19297
|
}, [s, S, u]);
|
|
19281
|
-
const
|
|
19298
|
+
const A = U.useMemo(() => ({
|
|
19282
19299
|
onKeyDown: b,
|
|
19283
19300
|
...l && {
|
|
19284
19301
|
[M4[f]]: (I) => {
|
|
@@ -19303,9 +19320,9 @@ function L4(e, t) {
|
|
|
19303
19320
|
}
|
|
19304
19321
|
}), [b, u, s]);
|
|
19305
19322
|
return U.useMemo(() => i ? {
|
|
19306
|
-
reference:
|
|
19323
|
+
reference: A,
|
|
19307
19324
|
floating: O
|
|
19308
|
-
} : {}, [i,
|
|
19325
|
+
} : {}, [i, A, O]);
|
|
19309
19326
|
}
|
|
19310
19327
|
function k4(e) {
|
|
19311
19328
|
const {
|
|
@@ -19754,17 +19771,36 @@ const Pr = ({
|
|
|
19754
19771
|
}) => {
|
|
19755
19772
|
const { t: c } = Yt(), a = r === N5, u = te(() => {
|
|
19756
19773
|
if (!e) return !1;
|
|
19757
|
-
const
|
|
19758
|
-
return !Number.isNaN(
|
|
19774
|
+
const h = Number(e.chainId);
|
|
19775
|
+
return !Number.isNaN(h) && (h === 42161 || h === 421614);
|
|
19759
19776
|
}, [e]), l = a, f = te(
|
|
19760
19777
|
() => {
|
|
19761
|
-
var
|
|
19762
|
-
return (
|
|
19763
|
-
(
|
|
19778
|
+
var h;
|
|
19779
|
+
return (h = e == null ? void 0 : e.tokenList) == null ? void 0 : h.find(
|
|
19780
|
+
(m) => m.token === t || m.symbol === t
|
|
19764
19781
|
);
|
|
19765
19782
|
},
|
|
19766
19783
|
[e, t]
|
|
19767
|
-
), p = (
|
|
19784
|
+
), p = te(() => {
|
|
19785
|
+
const h = (t || "").toUpperCase();
|
|
19786
|
+
if (!l && h === "USDC")
|
|
19787
|
+
return c("deposit.defaultSpotToPerpNotice", {
|
|
19788
|
+
coin: t,
|
|
19789
|
+
v: e == null ? void 0 : e.chain
|
|
19790
|
+
});
|
|
19791
|
+
const S = c(l ? "deposit.crossChainDepositFeeTip" : "deposit.depositAllTip", {
|
|
19792
|
+
coin: t,
|
|
19793
|
+
v: e == null ? void 0 : e.chain
|
|
19794
|
+
});
|
|
19795
|
+
return l && (!u || h === "USDC") ? String(S).split(`
|
|
19796
|
+
`)[0] : S;
|
|
19797
|
+
}, [
|
|
19798
|
+
c,
|
|
19799
|
+
t,
|
|
19800
|
+
e == null ? void 0 : e.chain,
|
|
19801
|
+
l,
|
|
19802
|
+
u
|
|
19803
|
+
]), d = (f == null ? void 0 : f.minDepositSize) || "10";
|
|
19768
19804
|
return /* @__PURE__ */ C.jsxs(C.Fragment, { children: [
|
|
19769
19805
|
/* @__PURE__ */ C.jsx("div", { className: "flex justify-center mt-4 mb-3", children: n && /* @__PURE__ */ C.jsx("div", { className: "bg-white rounded-lg", children: /* @__PURE__ */ C.jsx(
|
|
19770
19806
|
Pm,
|
|
@@ -19824,14 +19860,7 @@ const Pr = ({
|
|
|
19824
19860
|
/* @__PURE__ */ C.jsxs("div", { className: "border-b border-dashed border-line-divider-secondary pb-4", children: [
|
|
19825
19861
|
/* @__PURE__ */ C.jsxs("div", { className: "flex items-start", children: [
|
|
19826
19862
|
/* @__PURE__ */ C.jsx("div", { className: "w-5", children: /* @__PURE__ */ C.jsx("img", { src: Jr, className: "w-4 h-4", alt: "Warning" }) }),
|
|
19827
|
-
/* @__PURE__ */ C.jsx("div", { className: "flex-1", children: /* @__PURE__ */ C.jsx("p", { className: "text-xs text-functional-orange-1", children:
|
|
19828
|
-
const h = c(l ? "deposit.crossChainDepositFeeTip" : "deposit.depositAllTip", {
|
|
19829
|
-
coin: t,
|
|
19830
|
-
v: e == null ? void 0 : e.chain
|
|
19831
|
-
});
|
|
19832
|
-
return l && !u ? String(h).split(`
|
|
19833
|
-
`)[0] : h;
|
|
19834
|
-
})() }) })
|
|
19863
|
+
/* @__PURE__ */ C.jsx("div", { className: "flex-1", children: /* @__PURE__ */ C.jsx("p", { className: "text-xs text-functional-orange-1", children: p }) })
|
|
19835
19864
|
] }),
|
|
19836
19865
|
r === Jl && /* @__PURE__ */ C.jsxs(C.Fragment, { children: [
|
|
19837
19866
|
/* @__PURE__ */ C.jsx("div", { className: "my-2 ml-5 h-[1px] border-b border-dashed border-line-divider-secondary" }),
|
|
@@ -19861,7 +19890,7 @@ const Pr = ({
|
|
|
19861
19890
|
/* @__PURE__ */ C.jsxs("div", { className: "flex justify-between items-center h-[18px] mt-1", children: [
|
|
19862
19891
|
/* @__PURE__ */ C.jsx("span", { className: "text-text-tertiary", children: c("deposit.minDeposit") }),
|
|
19863
19892
|
/* @__PURE__ */ C.jsxs("span", { className: "text-text-primary font-medium text-right", children: [
|
|
19864
|
-
|
|
19893
|
+
d,
|
|
19865
19894
|
" ",
|
|
19866
19895
|
t
|
|
19867
19896
|
] })
|
|
@@ -20387,8 +20416,8 @@ const rP = ({
|
|
|
20387
20416
|
() => {
|
|
20388
20417
|
var j, H;
|
|
20389
20418
|
return P5({
|
|
20390
|
-
chain:
|
|
20391
|
-
transport:
|
|
20419
|
+
chain: A5,
|
|
20420
|
+
transport: T5(
|
|
20392
20421
|
t.rpcUrl || ((j = window == null ? void 0 : window.ENV) == null ? void 0 : j.CHAIN_RPC_URL_42161) || ((H = window == null ? void 0 : window.ENV) == null ? void 0 : H.CHAIN_RPC_URL_421614)
|
|
20393
20422
|
)
|
|
20394
20423
|
});
|
|
@@ -20417,12 +20446,12 @@ const rP = ({
|
|
|
20417
20446
|
} finally {
|
|
20418
20447
|
b(!1);
|
|
20419
20448
|
}
|
|
20420
|
-
}, [L, v]),
|
|
20449
|
+
}, [L, v]), A = te(() => +l.chainId != +t.chainId, [l.chainId, t.chainId]), O = X(async () => {
|
|
20421
20450
|
c && c(p);
|
|
20422
20451
|
}, [c, p]);
|
|
20423
20452
|
Pe(() => {
|
|
20424
|
-
|
|
20425
|
-
}, [
|
|
20453
|
+
A && O();
|
|
20454
|
+
}, [A, O]);
|
|
20426
20455
|
const { showLayerZeroTip: I, layerZeroTipKey: y } = te(() => {
|
|
20427
20456
|
const j = +t.chainId == 42161 || +t.chainId == 421614, H = (n == null ? void 0 : n.toUpperCase()) === "USDT", K = new Fe(d || "0"), V = new Fe("200000");
|
|
20428
20457
|
let z = !1, q;
|
|
@@ -20442,7 +20471,7 @@ const rP = ({
|
|
|
20442
20471
|
n,
|
|
20443
20472
|
d,
|
|
20444
20473
|
F
|
|
20445
|
-
]),
|
|
20474
|
+
]), T = X(() => Z4(
|
|
20446
20475
|
+t.chainId,
|
|
20447
20476
|
S || "0",
|
|
20448
20477
|
n,
|
|
@@ -20458,7 +20487,7 @@ const rP = ({
|
|
|
20458
20487
|
() => "deposit.maxDepositSplitTip",
|
|
20459
20488
|
[]
|
|
20460
20489
|
), M = tP({
|
|
20461
|
-
isNetworkMismatch:
|
|
20490
|
+
isNetworkMismatch: A,
|
|
20462
20491
|
depositAmount: d,
|
|
20463
20492
|
approved: g,
|
|
20464
20493
|
currentTokenBalance: S,
|
|
@@ -20466,7 +20495,7 @@ const rP = ({
|
|
|
20466
20495
|
showLayerZeroTip: I,
|
|
20467
20496
|
minDeposit: f != null && f.minDepositSize ? parseFloat(f.minDepositSize) : 10
|
|
20468
20497
|
}), D = (j) => {
|
|
20469
|
-
const H = j.target.value, K =
|
|
20498
|
+
const H = j.target.value, K = T(), V = Ls(H, K);
|
|
20470
20499
|
if (V.isValid)
|
|
20471
20500
|
h(V.formattedValue), V.errorType;
|
|
20472
20501
|
else
|
|
@@ -20511,7 +20540,7 @@ const rP = ({
|
|
|
20511
20540
|
"button",
|
|
20512
20541
|
{
|
|
20513
20542
|
onClick: () => {
|
|
20514
|
-
const j =
|
|
20543
|
+
const j = T();
|
|
20515
20544
|
h(j);
|
|
20516
20545
|
},
|
|
20517
20546
|
className: "text-theme-normal text-xs font-medium cursor-pointer hover:opacity-80 transition-opacity h-full flex items-center",
|
|
@@ -20606,13 +20635,13 @@ const rP = ({
|
|
|
20606
20635
|
onClick: _,
|
|
20607
20636
|
disabled: M.disabled || s,
|
|
20608
20637
|
children: [
|
|
20609
|
-
(s ||
|
|
20638
|
+
(s || A) && /* @__PURE__ */ C.jsx(Pc, { size: "xs" }),
|
|
20610
20639
|
M.text
|
|
20611
20640
|
]
|
|
20612
20641
|
}
|
|
20613
20642
|
)
|
|
20614
20643
|
] });
|
|
20615
|
-
}, Cm = (e) => e.toLocaleUpperCase() ===
|
|
20644
|
+
}, Cm = (e) => e.toLocaleUpperCase() === Tn ? Tn : mu, $c = (e) => Cm(e.wallet) === Tn, iP = (e) => Cm(e.wallet) === mu, aP = ({
|
|
20616
20645
|
isOpen: e,
|
|
20617
20646
|
isLoading: t = !1,
|
|
20618
20647
|
onClose: n,
|
|
@@ -20663,14 +20692,14 @@ const rP = ({
|
|
|
20663
20692
|
g($), h == null || h($);
|
|
20664
20693
|
},
|
|
20665
20694
|
[h]
|
|
20666
|
-
),
|
|
20695
|
+
), A = te(() => {
|
|
20667
20696
|
const $ = (b || "").toLowerCase();
|
|
20668
20697
|
if (!$) return "0";
|
|
20669
20698
|
const P = w === "spot" ? u == null ? void 0 : u.spot : u == null ? void 0 : u.perpetual, M = P == null ? void 0 : P[$];
|
|
20670
20699
|
return typeof M == "string" && M.length > 0 ? M : "0";
|
|
20671
20700
|
}, [u, w, b]), [O, I] = oe(!1), y = ($) => {
|
|
20672
20701
|
$.target === $.currentTarget ? I(!0) : I(!1);
|
|
20673
|
-
},
|
|
20702
|
+
}, T = ($) => {
|
|
20674
20703
|
O && $.target === $.currentTarget && n(), I(!1);
|
|
20675
20704
|
};
|
|
20676
20705
|
return e ? sd.createPortal(
|
|
@@ -20691,7 +20720,7 @@ const rP = ({
|
|
|
20691
20720
|
WebkitBackdropFilter: "blur(10px)"
|
|
20692
20721
|
},
|
|
20693
20722
|
onMouseDown: y,
|
|
20694
|
-
onMouseUp:
|
|
20723
|
+
onMouseUp: T,
|
|
20695
20724
|
"aria-hidden": "true",
|
|
20696
20725
|
children: /* @__PURE__ */ C.jsxs(
|
|
20697
20726
|
"div",
|
|
@@ -20745,7 +20774,7 @@ const rP = ({
|
|
|
20745
20774
|
onChainChange: v,
|
|
20746
20775
|
curSelectToken: b,
|
|
20747
20776
|
onTokenChange: N,
|
|
20748
|
-
walletType: $c(r) ?
|
|
20777
|
+
walletType: $c(r) ? Tn : mu,
|
|
20749
20778
|
accountType: w
|
|
20750
20779
|
}
|
|
20751
20780
|
),
|
|
@@ -20768,7 +20797,7 @@ const rP = ({
|
|
|
20768
20797
|
currentActiveChain: L,
|
|
20769
20798
|
selectedToken: b,
|
|
20770
20799
|
accountType: w,
|
|
20771
|
-
platformBalance:
|
|
20800
|
+
platformBalance: A,
|
|
20772
20801
|
isLoading: t,
|
|
20773
20802
|
wagmiHooks: l,
|
|
20774
20803
|
onChainChange: v,
|
|
@@ -21114,7 +21143,7 @@ const dP = (e) => {
|
|
|
21114
21143
|
return;
|
|
21115
21144
|
}
|
|
21116
21145
|
Je.updateWithdrawOptions(e);
|
|
21117
|
-
},
|
|
21146
|
+
}, Tc = (e) => {
|
|
21118
21147
|
if (!Je) {
|
|
21119
21148
|
console.error(
|
|
21120
21149
|
"WithdrawManager not initialized. Make sure to render <WithdrawManager /> in your app."
|
|
@@ -21126,7 +21155,7 @@ const dP = (e) => {
|
|
|
21126
21155
|
openWithdraw: dP,
|
|
21127
21156
|
closeWithdraw: pP,
|
|
21128
21157
|
updateWithdrawOptions: hP,
|
|
21129
|
-
setWithdrawLoading:
|
|
21158
|
+
setWithdrawLoading: Tc,
|
|
21130
21159
|
isOpen: mP,
|
|
21131
21160
|
isLoading: bP
|
|
21132
21161
|
}), gP = ({
|
|
@@ -21178,10 +21207,10 @@ const dP = (e) => {
|
|
|
21178
21207
|
const me = ae.tokenList || [];
|
|
21179
21208
|
let ne;
|
|
21180
21209
|
if (he && (ne = me.find(
|
|
21181
|
-
(
|
|
21210
|
+
(Ae) => (Ae.token || Ae.symbol || "").toUpperCase() === he
|
|
21182
21211
|
)), ne) {
|
|
21183
|
-
const
|
|
21184
|
-
return { chainId: ae.chainId, tokenSymbol:
|
|
21212
|
+
const Ae = ne.token || ne.symbol || o || "";
|
|
21213
|
+
return { chainId: ae.chainId, tokenSymbol: Ae };
|
|
21185
21214
|
}
|
|
21186
21215
|
}
|
|
21187
21216
|
}
|
|
@@ -21200,7 +21229,7 @@ const dP = (e) => {
|
|
|
21200
21229
|
() => L.chainId
|
|
21201
21230
|
), [v, N] = oe(
|
|
21202
21231
|
() => L.tokenSymbol
|
|
21203
|
-
), [
|
|
21232
|
+
), [A, O] = oe(s), [I, y] = oe(""), T = X(
|
|
21204
21233
|
(q) => {
|
|
21205
21234
|
g(q), h == null || h(q);
|
|
21206
21235
|
},
|
|
@@ -21221,14 +21250,14 @@ const dP = (e) => {
|
|
|
21221
21250
|
const _ = F && F.length > 0 ? F.find((q) => q.chainId === b) || F[0] : null, j = (z = _ == null ? void 0 : _.tokenList) == null ? void 0 : z.find(
|
|
21222
21251
|
(q) => q.token === v
|
|
21223
21252
|
), H = te(() => {
|
|
21224
|
-
const q = new Fe(
|
|
21253
|
+
const q = new Fe(A || "0"), ee = new Fe(l || "0"), ie = nn(b);
|
|
21225
21254
|
return j != null && j.minWithdrawSize && q.lt(j.minWithdrawSize) ? {
|
|
21226
21255
|
text: x("withdraw.minWithdrawParsed", {
|
|
21227
21256
|
amount: j.minWithdrawSize,
|
|
21228
21257
|
token: j.symbol || j.token
|
|
21229
21258
|
}),
|
|
21230
21259
|
disabled: !0
|
|
21231
|
-
} : !
|
|
21260
|
+
} : !A || q.isZero() || !ie && q.isLessThan(ee) ? {
|
|
21232
21261
|
text: x("withdraw.confirmWithdraw"),
|
|
21233
21262
|
disabled: !0
|
|
21234
21263
|
} : e === "mpc" && (!ie || E === "spot") && !I.trim() ? {
|
|
@@ -21241,7 +21270,7 @@ const dP = (e) => {
|
|
|
21241
21270
|
}, [
|
|
21242
21271
|
x,
|
|
21243
21272
|
b,
|
|
21244
|
-
|
|
21273
|
+
A,
|
|
21245
21274
|
e,
|
|
21246
21275
|
I,
|
|
21247
21276
|
l,
|
|
@@ -21253,11 +21282,11 @@ const dP = (e) => {
|
|
|
21253
21282
|
const ee = E === "spot" ? u == null ? void 0 : u.spot : u == null ? void 0 : u.perpetual, ie = ee == null ? void 0 : ee[q];
|
|
21254
21283
|
return typeof ie == "string" && ie.length > 0 ? ie : a || "0";
|
|
21255
21284
|
}, [u, E, v, a]), V = X(async () => {
|
|
21256
|
-
|
|
21285
|
+
Tc(!0);
|
|
21257
21286
|
try {
|
|
21258
21287
|
if (p) {
|
|
21259
21288
|
const ee = {
|
|
21260
|
-
amount: new Fe(
|
|
21289
|
+
amount: new Fe(A || "0").toString(),
|
|
21261
21290
|
chainId: b,
|
|
21262
21291
|
tokenAddress: (j == null ? void 0 : j.tokenAddress) || "",
|
|
21263
21292
|
coinId: (j == null ? void 0 : j.coinId) || "",
|
|
@@ -21268,13 +21297,13 @@ const dP = (e) => {
|
|
|
21268
21297
|
e === "mpc" && (!nn(b) || E === "spot") && (ee.receiverAddress = I), p(ee);
|
|
21269
21298
|
}
|
|
21270
21299
|
} catch {
|
|
21271
|
-
|
|
21300
|
+
Tc(!1);
|
|
21272
21301
|
}
|
|
21273
21302
|
}, [
|
|
21274
21303
|
p,
|
|
21275
21304
|
E,
|
|
21276
21305
|
j,
|
|
21277
|
-
|
|
21306
|
+
A,
|
|
21278
21307
|
b,
|
|
21279
21308
|
v,
|
|
21280
21309
|
e,
|
|
@@ -21286,7 +21315,7 @@ const dP = (e) => {
|
|
|
21286
21315
|
{
|
|
21287
21316
|
selectedAccount: E,
|
|
21288
21317
|
onAccountChange: (q) => {
|
|
21289
|
-
var
|
|
21318
|
+
var Ae, gn;
|
|
21290
21319
|
const ee = q || "perpetual";
|
|
21291
21320
|
R(ee), S == null || S(ee);
|
|
21292
21321
|
const ie = B(ee);
|
|
@@ -21297,7 +21326,7 @@ const dP = (e) => {
|
|
|
21297
21326
|
(ut) => ut.chainId === ve
|
|
21298
21327
|
), ae = (he == null ? void 0 : he.tokenList) || [], ne = ae.some(
|
|
21299
21328
|
(ut) => (ut.symbol || ut.token) === v
|
|
21300
|
-
) ? v : ((
|
|
21329
|
+
) ? v : ((Ae = ae[0]) == null ? void 0 : Ae.symbol) || ((gn = ae[0]) == null ? void 0 : gn.token) || "";
|
|
21301
21330
|
ne && (N(ne), m == null || m(ne));
|
|
21302
21331
|
},
|
|
21303
21332
|
className: "w-full"
|
|
@@ -21308,7 +21337,7 @@ const dP = (e) => {
|
|
|
21308
21337
|
{
|
|
21309
21338
|
currentActiveChain: _,
|
|
21310
21339
|
chainList: F,
|
|
21311
|
-
onChainChange:
|
|
21340
|
+
onChainChange: T,
|
|
21312
21341
|
curSelectToken: v,
|
|
21313
21342
|
onTokenChange: $,
|
|
21314
21343
|
walletType: "EVM",
|
|
@@ -21318,7 +21347,7 @@ const dP = (e) => {
|
|
|
21318
21347
|
/* @__PURE__ */ C.jsx(
|
|
21319
21348
|
uP,
|
|
21320
21349
|
{
|
|
21321
|
-
withdrawAmount:
|
|
21350
|
+
withdrawAmount: A,
|
|
21322
21351
|
curSelectToken: v,
|
|
21323
21352
|
tokenInfo: j,
|
|
21324
21353
|
curSelectTokenData: {
|
|
@@ -21460,7 +21489,7 @@ export {
|
|
|
21460
21489
|
PP as C,
|
|
21461
21490
|
ma as D,
|
|
21462
21491
|
hP as E,
|
|
21463
|
-
|
|
21492
|
+
Tc as F,
|
|
21464
21493
|
bP as G,
|
|
21465
21494
|
Yr as H,
|
|
21466
21495
|
ZP as I,
|
|
@@ -21495,4 +21524,4 @@ export {
|
|
|
21495
21524
|
fP as y,
|
|
21496
21525
|
dP as z
|
|
21497
21526
|
};
|
|
21498
|
-
//# sourceMappingURL=index-
|
|
21527
|
+
//# sourceMappingURL=index-CF2ZlxOy.mjs.map
|