@edgex-web/components 0.1.0-beta.50 → 0.1.0-beta.52
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-DsdBVVHB.mjs → ccip-ySOiiKhD.mjs} +2 -2
- package/dist/{ccip-DsdBVVHB.mjs.map → ccip-ySOiiKhD.mjs.map} +1 -1
- package/dist/hooks/usePoolBalance.d.ts +1 -0
- package/dist/hooks/usePoolBalance.d.ts.map +1 -1
- package/dist/{index-Cz4ArvXu.mjs → index-VRs3PVMH.mjs} +123 -116
- package/dist/{index-Cz4ArvXu.mjs.map → index-VRs3PVMH.mjs.map} +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +32 -32
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ var Em = Object.defineProperty;
|
|
|
2
2
|
var Sm = (e, t, n) => t in e ? Em(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var kr = (e, t, n) => Sm(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import * as U from "react";
|
|
5
|
-
import Z, { createContext as Fe, useContext as Pe, useMemo as
|
|
5
|
+
import Z, { createContext as Fe, useContext as Pe, useMemo as J, useCallback as ee, forwardRef as cc, createElement as fs, useRef as ce, useEffect as Ae, useState as le, useLayoutEffect as Os, Fragment as ht, isValidElement as Pm, cloneElement as Am, useId as Yn, useReducer as $m, useSyncExternalStore as Tm, useImperativeHandle as Cf } from "react";
|
|
6
6
|
import * as Xr from "react-dom";
|
|
7
7
|
import Bf, { createPortal as Lf, flushSync as Gr } from "react-dom";
|
|
8
8
|
function Rm(e) {
|
|
@@ -931,7 +931,7 @@ const Im = {
|
|
|
931
931
|
config: e,
|
|
932
932
|
children: t
|
|
933
933
|
}) => {
|
|
934
|
-
const n =
|
|
934
|
+
const n = J(() => {
|
|
935
935
|
const r = e.locale || Qi, o = Dm(r) ? r : Qi, s = km(o);
|
|
936
936
|
return {
|
|
937
937
|
...e,
|
|
@@ -7130,7 +7130,7 @@ async function zs(e, t) {
|
|
|
7130
7130
|
});
|
|
7131
7131
|
return H === "0x" ? { data: void 0 } : { data: H };
|
|
7132
7132
|
} catch (R) {
|
|
7133
|
-
const b = P1(R), { offchainLookup: I, offchainLookupSignature: k } = await import("./ccip-
|
|
7133
|
+
const b = P1(R), { offchainLookup: I, offchainLookupSignature: k } = await import("./ccip-ySOiiKhD.mjs");
|
|
7134
7134
|
if (e.ccipRead !== !1 && (b == null ? void 0 : b.slice(0, 10)) === k && B)
|
|
7135
7135
|
return { data: await I(e, { data: b, to: B }) };
|
|
7136
7136
|
throw N && (b == null ? void 0 : b.slice(0, 10)) === "0x101bb98d" ? new oy({ factory: f }) : hp(R, {
|
|
@@ -11793,67 +11793,74 @@ function Iu(e, t, n = []) {
|
|
|
11793
11793
|
if (n && n.length > 0) return n[0];
|
|
11794
11794
|
}
|
|
11795
11795
|
function hx(e = {}) {
|
|
11796
|
-
const { bscRpcUrl: t, arbitrumRpcUrl: n, pollingInterval: r = 12e3 } = e, o =
|
|
11796
|
+
const { bscRpcUrl: t, arbitrumRpcUrl: n, pollingInterval: r = 12e3 } = e, o = J(() => {
|
|
11797
|
+
const u = /testnet|sepolia/i;
|
|
11798
|
+
return u.test(t || "") || u.test(n || "");
|
|
11799
|
+
}, [t, n]), s = J(
|
|
11797
11800
|
() => {
|
|
11798
|
-
var
|
|
11801
|
+
var u, d, f;
|
|
11799
11802
|
return Ca({
|
|
11800
11803
|
chain: Nu,
|
|
11801
11804
|
transport: Sa(
|
|
11802
11805
|
Iu(
|
|
11803
11806
|
t,
|
|
11804
|
-
typeof window < "u" ? (
|
|
11805
|
-
((
|
|
11807
|
+
typeof window < "u" ? (u = window == null ? void 0 : window.ENV) == null ? void 0 : u.CHAIN_RPC_URL_56 : void 0,
|
|
11808
|
+
((f = (d = Nu.rpcUrls) == null ? void 0 : d.default) == null ? void 0 : f.http) || []
|
|
11806
11809
|
)
|
|
11807
11810
|
)
|
|
11808
11811
|
});
|
|
11809
11812
|
},
|
|
11810
11813
|
[t]
|
|
11811
|
-
),
|
|
11814
|
+
), i = J(
|
|
11812
11815
|
() => {
|
|
11813
|
-
var
|
|
11816
|
+
var u, d, f;
|
|
11814
11817
|
return Ca({
|
|
11815
11818
|
chain: Ba,
|
|
11816
11819
|
transport: Sa(
|
|
11817
11820
|
Iu(
|
|
11818
11821
|
n,
|
|
11819
|
-
typeof window < "u" ? (
|
|
11820
|
-
((
|
|
11822
|
+
typeof window < "u" ? (u = window == null ? void 0 : window.ENV) == null ? void 0 : u.CHAIN_RPC_URL_42161 : void 0,
|
|
11823
|
+
((f = (d = Ba.rpcUrls) == null ? void 0 : d.default) == null ? void 0 : f.http) || []
|
|
11821
11824
|
)
|
|
11822
11825
|
)
|
|
11823
11826
|
});
|
|
11824
11827
|
},
|
|
11825
11828
|
[n]
|
|
11826
|
-
), { formatted:
|
|
11827
|
-
client:
|
|
11829
|
+
), { formatted: c = "0" } = as({
|
|
11830
|
+
client: s,
|
|
11828
11831
|
tokenAddress: cx,
|
|
11829
11832
|
holder: fx,
|
|
11830
11833
|
decimals: 18,
|
|
11831
11834
|
// BSC USDT uses 18 decimals
|
|
11832
11835
|
fallbackFormatted: "0",
|
|
11833
11836
|
pollingInterval: r
|
|
11834
|
-
}), { formatted:
|
|
11835
|
-
client:
|
|
11837
|
+
}), { formatted: a = "0" } = as({
|
|
11838
|
+
client: i,
|
|
11836
11839
|
tokenAddress: lx,
|
|
11837
11840
|
holder: dx,
|
|
11838
11841
|
decimals: 6,
|
|
11839
11842
|
fallbackFormatted: "0",
|
|
11840
11843
|
pollingInterval: r
|
|
11841
|
-
}), { formatted:
|
|
11842
|
-
client:
|
|
11844
|
+
}), { formatted: l = "0" } = as({
|
|
11845
|
+
client: i,
|
|
11843
11846
|
tokenAddress: ux,
|
|
11844
11847
|
holder: px,
|
|
11845
11848
|
decimals: 6,
|
|
11846
11849
|
fallbackFormatted: "0",
|
|
11847
11850
|
pollingInterval: r
|
|
11848
11851
|
});
|
|
11849
|
-
return {
|
|
11850
|
-
BNB_USDT_BALANCE:
|
|
11851
|
-
ARB_USDT_BALANCE:
|
|
11852
|
-
ARB_USDC_BALANCE:
|
|
11852
|
+
return o ? {
|
|
11853
|
+
BNB_USDT_BALANCE: "99999",
|
|
11854
|
+
ARB_USDT_BALANCE: "99999",
|
|
11855
|
+
ARB_USDC_BALANCE: "99999"
|
|
11856
|
+
} : {
|
|
11857
|
+
BNB_USDT_BALANCE: c,
|
|
11858
|
+
ARB_USDT_BALANCE: a,
|
|
11859
|
+
ARB_USDC_BALANCE: l
|
|
11853
11860
|
};
|
|
11854
11861
|
}
|
|
11855
|
-
const xA = () => ({ openDeposit:
|
|
11856
|
-
}, []) }), EA = () => ({ openWithdraw:
|
|
11862
|
+
const xA = () => ({ openDeposit: ee((t) => {
|
|
11863
|
+
}, []) }), EA = () => ({ openWithdraw: ee((t) => {
|
|
11857
11864
|
}, []) }), Un = "MPC", Zc = "EVM";
|
|
11858
11865
|
/**
|
|
11859
11866
|
* @license lucide-react v0.540.0 - ISC
|
|
@@ -11986,7 +11993,7 @@ function Px(e) {
|
|
|
11986
11993
|
t.current = e;
|
|
11987
11994
|
}, [
|
|
11988
11995
|
e
|
|
11989
|
-
]),
|
|
11996
|
+
]), ee((...n) => {
|
|
11990
11997
|
const r = t.current;
|
|
11991
11998
|
return r == null ? void 0 : r(...n);
|
|
11992
11999
|
}, []);
|
|
@@ -12065,7 +12072,7 @@ dn(function() {
|
|
|
12065
12072
|
return qs(/Firefox/i);
|
|
12066
12073
|
});
|
|
12067
12074
|
function dh() {
|
|
12068
|
-
let e = ce(/* @__PURE__ */ new Map()), t =
|
|
12075
|
+
let e = ce(/* @__PURE__ */ new Map()), t = ee((o, s, i, c) => {
|
|
12069
12076
|
let a = c != null && c.once ? (...l) => {
|
|
12070
12077
|
e.current.delete(i), i(...l);
|
|
12071
12078
|
} : i;
|
|
@@ -12075,11 +12082,11 @@ function dh() {
|
|
|
12075
12082
|
fn: a,
|
|
12076
12083
|
options: c
|
|
12077
12084
|
}), o.addEventListener(s, a, c);
|
|
12078
|
-
}, []), n =
|
|
12085
|
+
}, []), n = ee((o, s, i, c) => {
|
|
12079
12086
|
var a;
|
|
12080
12087
|
let l = ((a = e.current.get(i)) === null || a === void 0 ? void 0 : a.fn) || i;
|
|
12081
12088
|
o.removeEventListener(s, l, c), e.current.delete(i);
|
|
12082
|
-
}, []), r =
|
|
12089
|
+
}, []), r = ee(() => {
|
|
12083
12090
|
e.current.forEach((o, s) => {
|
|
12084
12091
|
n(o.eventTarget, o.type, s, o.options);
|
|
12085
12092
|
});
|
|
@@ -12123,7 +12130,7 @@ function hh(e) {
|
|
|
12123
12130
|
let n = Px((r) => {
|
|
12124
12131
|
e == null || e(r);
|
|
12125
12132
|
});
|
|
12126
|
-
return
|
|
12133
|
+
return ee((r) => {
|
|
12127
12134
|
if (r.target instanceof HTMLButtonElement || r.target instanceof HTMLInputElement || r.target instanceof HTMLTextAreaElement || r.target instanceof HTMLSelectElement) {
|
|
12128
12135
|
t.current.isFocused = !0;
|
|
12129
12136
|
let o = r.target, s = (i) => {
|
|
@@ -12241,13 +12248,13 @@ function Ux(e, t, n) {
|
|
|
12241
12248
|
}
|
|
12242
12249
|
function zx(e) {
|
|
12243
12250
|
let { isDisabled: t, onFocus: n, onBlur: r, onFocusChange: o } = e;
|
|
12244
|
-
const s =
|
|
12251
|
+
const s = ee((a) => {
|
|
12245
12252
|
if (a.target === a.currentTarget)
|
|
12246
12253
|
return r && r(a), o && o(!1), !0;
|
|
12247
12254
|
}, [
|
|
12248
12255
|
r,
|
|
12249
12256
|
o
|
|
12250
|
-
]), i = hh(s), c =
|
|
12257
|
+
]), i = hh(s), c = ee((a) => {
|
|
12251
12258
|
const l = Tn(a.target), u = l ? La(l) : La();
|
|
12252
12259
|
a.target === a.currentTarget && u === fh(a.nativeEvent) && (n && n(a), o && o(!0), i(a));
|
|
12253
12260
|
}, [
|
|
@@ -12265,14 +12272,14 @@ function zx(e) {
|
|
|
12265
12272
|
function Hx(e) {
|
|
12266
12273
|
let { isDisabled: t, onBlurWithin: n, onFocusWithin: r, onFocusWithinChange: o } = e, s = ce({
|
|
12267
12274
|
isFocusWithin: !1
|
|
12268
|
-
}), { addGlobalListener: i, removeAllGlobalListeners: c } = dh(), a =
|
|
12275
|
+
}), { addGlobalListener: i, removeAllGlobalListeners: c } = dh(), a = ee((d) => {
|
|
12269
12276
|
d.currentTarget.contains(d.target) && s.current.isFocusWithin && !d.currentTarget.contains(d.relatedTarget) && (s.current.isFocusWithin = !1, c(), n && n(d), o && o(!1));
|
|
12270
12277
|
}, [
|
|
12271
12278
|
n,
|
|
12272
12279
|
o,
|
|
12273
12280
|
s,
|
|
12274
12281
|
c
|
|
12275
|
-
]), l = hh(a), u =
|
|
12282
|
+
]), l = hh(a), u = ee((d) => {
|
|
12276
12283
|
if (!d.currentTarget.contains(d.target)) return;
|
|
12277
12284
|
const f = Tn(d.target), p = La(f);
|
|
12278
12285
|
if (!s.current.isFocusWithin && p === fh(d.nativeEvent)) {
|
|
@@ -12334,7 +12341,7 @@ function Vx(e) {
|
|
|
12334
12341
|
target: null
|
|
12335
12342
|
}).current;
|
|
12336
12343
|
Ae(Wx, []);
|
|
12337
|
-
let { addGlobalListener: a, removeAllGlobalListeners: l } = dh(), { hoverProps: u, triggerHoverEnd: d } =
|
|
12344
|
+
let { addGlobalListener: a, removeAllGlobalListeners: l } = dh(), { hoverProps: u, triggerHoverEnd: d } = J(() => {
|
|
12338
12345
|
let f = (m, w) => {
|
|
12339
12346
|
if (c.pointerType = w, o || w === "touch" || c.isHovered || !m.currentTarget.contains(m.target)) return;
|
|
12340
12347
|
c.isHovered = !0;
|
|
@@ -12394,7 +12401,7 @@ function Gx(e = {}) {
|
|
|
12394
12401
|
let { autoFocus: t = !1, isTextInput: n, within: r } = e, o = ce({
|
|
12395
12402
|
isFocused: !1,
|
|
12396
12403
|
isFocusVisible: t || wh()
|
|
12397
|
-
}), [s, i] = le(!1), [c, a] = le(() => o.current.isFocused && o.current.isFocusVisible), l =
|
|
12404
|
+
}), [s, i] = le(!1), [c, a] = le(() => o.current.isFocused && o.current.isFocusVisible), l = ee(() => a(o.current.isFocused && o.current.isFocusVisible), []), u = ee((p) => {
|
|
12398
12405
|
o.current.isFocused = p, i(p), l();
|
|
12399
12406
|
}, [
|
|
12400
12407
|
l
|
|
@@ -12553,7 +12560,7 @@ function bt(e, t, ...n) {
|
|
|
12553
12560
|
var vs = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(vs || {}), wn = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(wn || {});
|
|
12554
12561
|
function ot() {
|
|
12555
12562
|
let e = tE();
|
|
12556
|
-
return
|
|
12563
|
+
return ee((t) => eE({ mergeRefs: e, ...t }), [e]);
|
|
12557
12564
|
}
|
|
12558
12565
|
function eE({ ourProps: e, theirProps: t, slot: n, defaultTag: r, features: o, visible: s = !0, name: i, mergeRefs: c }) {
|
|
12559
12566
|
c = c ?? nE;
|
|
@@ -12599,7 +12606,7 @@ function Xo(e, t = {}, n, r, o) {
|
|
|
12599
12606
|
return fs(s, Object.assign({}, Li(a, ["ref"]), s !== ht && l, s !== ht && d), u);
|
|
12600
12607
|
}
|
|
12601
12608
|
function tE() {
|
|
12602
|
-
let e = ce([]), t =
|
|
12609
|
+
let e = ce([]), t = ee((n) => {
|
|
12603
12610
|
for (let r of e.current) r != null && (typeof r == "function" ? r(n) : r.current = n);
|
|
12604
12611
|
}, []);
|
|
12605
12612
|
return (...n) => {
|
|
@@ -12803,7 +12810,7 @@ let EE = "p";
|
|
|
12803
12810
|
function SE(e, t) {
|
|
12804
12811
|
let n = Yn(), r = Jc(), { id: o = `headlessui-description-${n}`, ...s } = e, i = Ih(), c = wt(t);
|
|
12805
12812
|
ve(() => i.register(o), [o, i.register]);
|
|
12806
|
-
let a = r || !1, l =
|
|
12813
|
+
let a = r || !1, l = J(() => ({ ...i.slot, disabled: a }), [i.slot, a]), u = { ref: c, ...i.props, id: o };
|
|
12807
12814
|
return ot()({ ourProps: u, theirProps: s, slot: l, defaultTag: EE, name: i.name || "Description" });
|
|
12808
12815
|
}
|
|
12809
12816
|
let PE = et(SE);
|
|
@@ -12826,11 +12833,11 @@ function Bh(e) {
|
|
|
12826
12833
|
}
|
|
12827
12834
|
function AE({ inherit: e = !1 } = {}) {
|
|
12828
12835
|
let t = Bh(), [n, r] = le([]), o = e ? [t, ...n].filter(Boolean) : n;
|
|
12829
|
-
return [o.length > 0 ? o.join(" ") : void 0,
|
|
12836
|
+
return [o.length > 0 ? o.join(" ") : void 0, J(() => function(s) {
|
|
12830
12837
|
let i = pe((a) => (r((l) => [...l, a]), () => r((l) => {
|
|
12831
12838
|
let u = l.slice(), d = u.indexOf(a);
|
|
12832
12839
|
return d !== -1 && u.splice(d, 1), u;
|
|
12833
|
-
}))), c =
|
|
12840
|
+
}))), c = J(() => ({ register: i, slot: s.slot, name: s.name, props: s.props, value: s.value }), [i, s.slot, s.name, s.props, s.value]);
|
|
12834
12841
|
return Z.createElement(Ks.Provider, { value: c }, s.children);
|
|
12835
12842
|
}, [r])];
|
|
12836
12843
|
}
|
|
@@ -12851,7 +12858,7 @@ function TE(e, t) {
|
|
|
12851
12858
|
(Rh(y) && (y.type === "file" || y.type === "radio" || y.type === "checkbox") || y.role === "radio" || y.role === "checkbox" || y.role === "switch") && y.click(), y.focus({ preventScroll: !0 });
|
|
12852
12859
|
}
|
|
12853
12860
|
}
|
|
12854
|
-
}), p = i || !1, h =
|
|
12861
|
+
}), p = i || !1, h = J(() => ({ ...o.slot, disabled: p }), [o.slot, p]), m = { ref: d, ...o.props, id: c, htmlFor: a, onClick: f };
|
|
12855
12862
|
return l && ("onClick" in m && (delete m.htmlFor, delete m.onClick), "onClick" in u && delete u.onClick), ot()({ ourProps: m, theirProps: u, slot: h, defaultTag: a ? $E : "div", name: o.name || "Label" });
|
|
12856
12863
|
}
|
|
12857
12864
|
let RE = et(TE), OE = Object.assign(RE, {});
|
|
@@ -12859,7 +12866,7 @@ function NE(e, t) {
|
|
|
12859
12866
|
return e !== null && t !== null && typeof e == "object" && typeof t == "object" && "id" in e && "id" in t ? e.id === t.id : e === t;
|
|
12860
12867
|
}
|
|
12861
12868
|
function IE(e = NE) {
|
|
12862
|
-
return
|
|
12869
|
+
return ee((t, n) => {
|
|
12863
12870
|
if (typeof e == "string") {
|
|
12864
12871
|
let r = e;
|
|
12865
12872
|
return (t == null ? void 0 : t[r]) === (n == null ? void 0 : n[r]);
|
|
@@ -12873,7 +12880,7 @@ function CE(e) {
|
|
|
12873
12880
|
return { width: t, height: n };
|
|
12874
12881
|
}
|
|
12875
12882
|
function BE(e, t = !1) {
|
|
12876
|
-
let [n, r] = $m(() => ({}), {}), o =
|
|
12883
|
+
let [n, r] = $m(() => ({}), {}), o = J(() => CE(e), [e, n]);
|
|
12877
12884
|
return ve(() => {
|
|
12878
12885
|
if (!e) return;
|
|
12879
12886
|
let s = new ResizeObserver(r);
|
|
@@ -13114,7 +13121,7 @@ function WE(e) {
|
|
|
13114
13121
|
return e;
|
|
13115
13122
|
}
|
|
13116
13123
|
function _h(e, t) {
|
|
13117
|
-
let n = Yn(), r = rl.get(t), [o, s] = pt(r,
|
|
13124
|
+
let n = Yn(), r = rl.get(t), [o, s] = pt(r, ee((i) => [r.selectors.isTop(i, n), r.selectors.inStack(i, n)], [r, n]));
|
|
13118
13125
|
return ve(() => {
|
|
13119
13126
|
if (e) return r.actions.push(n), () => r.actions.pop(n);
|
|
13120
13127
|
}, [r, e, n]), e ? s ? o : !0 : !1;
|
|
@@ -13275,7 +13282,7 @@ function r2(e, t, n, r) {
|
|
|
13275
13282
|
}
|
|
13276
13283
|
const Hu = 30;
|
|
13277
13284
|
function o2(e, t, n) {
|
|
13278
|
-
let r = Jn(n), o =
|
|
13285
|
+
let r = Jn(n), o = ee(function(c, a) {
|
|
13279
13286
|
if (c.defaultPrevented) return;
|
|
13280
13287
|
let l = a(c);
|
|
13281
13288
|
if (l === null || !l.getRootNode().contains(l) || !l.isConnected) return;
|
|
@@ -13302,7 +13309,7 @@ function o2(e, t, n) {
|
|
|
13302
13309
|
}, !0), r2(e, "blur", (c) => o(c, () => mE(window.document.activeElement) ? window.document.activeElement : null), !0);
|
|
13303
13310
|
}
|
|
13304
13311
|
function Wa(...e) {
|
|
13305
|
-
return
|
|
13312
|
+
return J(() => Do(...e), [...e]);
|
|
13306
13313
|
}
|
|
13307
13314
|
var s2 = ((e) => (e[e.Ignore = 0] = "Ignore", e[e.Select = 1] = "Select", e[e.Close = 2] = "Close", e))(s2 || {});
|
|
13308
13315
|
const Qo = { Ignore: { kind: 0 }, Select: (e) => ({ kind: 1, target: e }), Close: { kind: 2 } }, i2 = 200, Wu = 5;
|
|
@@ -13330,7 +13337,7 @@ function a2(e, { trigger: t, action: n, close: r, select: o }) {
|
|
|
13330
13337
|
}, { capture: !0 });
|
|
13331
13338
|
}
|
|
13332
13339
|
function c2(e, t) {
|
|
13333
|
-
return
|
|
13340
|
+
return J(() => {
|
|
13334
13341
|
var n;
|
|
13335
13342
|
if (e.type) return e.type;
|
|
13336
13343
|
let r = (n = e.as) != null ? n : "button";
|
|
@@ -13464,7 +13471,7 @@ function b2() {
|
|
|
13464
13471
|
} };
|
|
13465
13472
|
}
|
|
13466
13473
|
function y2(e = 0) {
|
|
13467
|
-
let [t, n] = le(e), r =
|
|
13474
|
+
let [t, n] = le(e), r = ee((a) => n(a), [t]), o = ee((a) => n((l) => l | a), [t]), s = ee((a) => (t & a) === a, [t]), i = ee((a) => n((l) => l & ~a), [n]), c = ee((a) => n((l) => l ^ a), [n]);
|
|
13468
13475
|
return { flags: t, setFlag: r, addFlag: o, hasFlag: s, removeFlag: i, toggleFlag: c };
|
|
13469
13476
|
}
|
|
13470
13477
|
var Gu, qu;
|
|
@@ -15266,7 +15273,7 @@ Mr.displayName = "FloatingContext";
|
|
|
15266
15273
|
let fl = Fe(null);
|
|
15267
15274
|
fl.displayName = "PlacementContext";
|
|
15268
15275
|
function i5(e) {
|
|
15269
|
-
return
|
|
15276
|
+
return J(() => e ? typeof e == "string" ? { to: e } : e : null, [e]);
|
|
15270
15277
|
}
|
|
15271
15278
|
function a5() {
|
|
15272
15279
|
return Pe(Mr).setReference;
|
|
@@ -15276,11 +15283,11 @@ function c5() {
|
|
|
15276
15283
|
}
|
|
15277
15284
|
function l5() {
|
|
15278
15285
|
let { getFloatingProps: e, slot: t } = Pe(Mr);
|
|
15279
|
-
return
|
|
15286
|
+
return ee((...n) => Object.assign({}, e(...n), { "data-anchor": t.anchor }), [e, t]);
|
|
15280
15287
|
}
|
|
15281
15288
|
function u5(e = null) {
|
|
15282
15289
|
e === !1 && (e = null), typeof e == "string" && (e = { to: e });
|
|
15283
|
-
let t = Pe(fl), n =
|
|
15290
|
+
let t = Pe(fl), n = J(() => e, [JSON.stringify(e, (o, s) => {
|
|
15284
15291
|
var i;
|
|
15285
15292
|
return (i = s == null ? void 0 : s.outerHTML) != null ? i : s;
|
|
15286
15293
|
})]);
|
|
@@ -15288,7 +15295,7 @@ function u5(e = null) {
|
|
|
15288
15295
|
t == null || t(n ?? null);
|
|
15289
15296
|
}, [t, n]);
|
|
15290
15297
|
let r = Pe(Mr);
|
|
15291
|
-
return
|
|
15298
|
+
return J(() => [r.setFloating, e ? r.styles : {}], [r.setFloating, e, r.styles]);
|
|
15292
15299
|
}
|
|
15293
15300
|
let uf = 4;
|
|
15294
15301
|
function f5({ children: e, enabled: t = !0 }) {
|
|
@@ -15320,7 +15327,7 @@ function f5({ children: e, enabled: t = !0 }) {
|
|
|
15320
15327
|
Object.assign(S.floating.style, { overflow: "auto", maxWidth: `${N}px`, maxHeight: `min(var(--anchor-max-height, 100vh), ${O}px)` });
|
|
15321
15328
|
} })].filter(Boolean), whileElementsMounted: a0 }), [B = m, L = w] = A.placement.split("-");
|
|
15322
15329
|
m === "selection" && (B = "selection");
|
|
15323
|
-
let D =
|
|
15330
|
+
let D = J(() => ({ anchor: [B, L].filter(Boolean).join(" ") }), [B, L]), F = s5(A, { overflowRef: i, onChange: s }), { getReferenceProps: g, getFloatingProps: v } = r5([F]), P = pe((N) => {
|
|
15324
15331
|
a(N), $.setFloating(N);
|
|
15325
15332
|
});
|
|
15326
15333
|
return U.createElement(fl.Provider, { value: r }, U.createElement(Mr.Provider, { value: { setFloating: P, setReference: $.setReference, styles: y, getReferenceProps: g, getFloatingProps: v, slot: D } }, e));
|
|
@@ -15374,7 +15381,7 @@ function Wi(e, t, n = void 0) {
|
|
|
15374
15381
|
}];
|
|
15375
15382
|
}
|
|
15376
15383
|
return [n, null];
|
|
15377
|
-
}), s =
|
|
15384
|
+
}), s = J(() => o(e, t)[0], [e, t]), [i = s, c] = le();
|
|
15378
15385
|
return ve(() => {
|
|
15379
15386
|
let [a, l] = o(e, t);
|
|
15380
15387
|
if (c(a), !!l) return l(c);
|
|
@@ -15568,7 +15575,7 @@ function x0(e, t) {
|
|
|
15568
15575
|
(w = a.current.shift()) == null || w();
|
|
15569
15576
|
}).then(() => m(h));
|
|
15570
15577
|
});
|
|
15571
|
-
return
|
|
15578
|
+
return J(() => ({ children: r, register: c, unregister: i, onStart: d, onStop: f, wait: l, chains: u }), [c, i, r, d, f, u, l]);
|
|
15572
15579
|
}
|
|
15573
15580
|
let E0 = ht, S0 = vs.RenderStrategy;
|
|
15574
15581
|
function C5(e, t) {
|
|
@@ -15620,7 +15627,7 @@ function B5(e, t) {
|
|
|
15620
15627
|
ve(() => {
|
|
15621
15628
|
p !== !1 && m.current[m.current.length - 1] !== n && (m.current.push(n), h(!1));
|
|
15622
15629
|
}, [m, n]);
|
|
15623
|
-
let w =
|
|
15630
|
+
let w = J(() => ({ show: n, appear: r, initial: p }), [n, r, p]);
|
|
15624
15631
|
ve(() => {
|
|
15625
15632
|
n ? d("visible") : !oi(f) && i.current !== null && d("hidden");
|
|
15626
15633
|
}, [n, f]);
|
|
@@ -15834,7 +15841,7 @@ function gl(e) {
|
|
|
15834
15841
|
return t;
|
|
15835
15842
|
}
|
|
15836
15843
|
function T0({ id: e, __demoMode: t = !1 }) {
|
|
15837
|
-
let n =
|
|
15844
|
+
let n = J(() => ml.new({ id: e, __demoMode: t }), []);
|
|
15838
15845
|
return b0(() => n.dispose()), n;
|
|
15839
15846
|
}
|
|
15840
15847
|
let si = Fe(null);
|
|
@@ -15851,15 +15858,15 @@ let H5 = ht;
|
|
|
15851
15858
|
function W5(e, t) {
|
|
15852
15859
|
let n = Yn(), r = Jc(), { value: o, defaultValue: s, form: i, name: c, onChange: a, by: l, invalid: u = !1, disabled: d = r || !1, horizontal: f = !1, multiple: p = !1, __demoMode: h = !1, ...m } = e;
|
|
15853
15860
|
const w = f ? "horizontal" : "vertical";
|
|
15854
|
-
let $ = wt(t), y = sE(s), [A = p ? [] : void 0, B] = oE(o, a, y), L = T0({ id: n, __demoMode: h }), D = ce({ static: !1, hold: !1 }), F = ce(/* @__PURE__ */ new Map()), g = IE(l), v =
|
|
15861
|
+
let $ = wt(t), y = sE(s), [A = p ? [] : void 0, B] = oE(o, a, y), L = T0({ id: n, __demoMode: h }), D = ce({ static: !1, hold: !1 }), F = ce(/* @__PURE__ */ new Map()), g = IE(l), v = ee((j) => bt(P.mode, { [Dt.Multi]: () => A.some((z) => g(z, j)), [Dt.Single]: () => g(A, j) }), [A]), P = J(() => ({ value: A, disabled: d, invalid: u, mode: p ? Dt.Multi : Dt.Single, orientation: w, onChange: B, compare: g, isSelected: v, optionsPropsRef: D, listRef: F }), [A, d, u, p, w, B, g, v, D, F]);
|
|
15855
15862
|
ve(() => {
|
|
15856
15863
|
L.state.dataRef.current = P;
|
|
15857
15864
|
}, [P]);
|
|
15858
|
-
let N = pt(L, (j) => j.listboxState), O = rl.get(null), S = pt(O,
|
|
15865
|
+
let N = pt(L, (j) => j.listboxState), O = rl.get(null), S = pt(O, ee((j) => O.selectors.isTop(j, n), [O, n])), [E, x] = pt(L, (j) => [j.buttonElement, j.optionsElement]);
|
|
15859
15866
|
o2(S, [E, x], (j, z) => {
|
|
15860
15867
|
L.send({ type: A0.CloseListbox }), zh(z, ol.Loose) || (j.preventDefault(), E == null || E.focus());
|
|
15861
15868
|
});
|
|
15862
|
-
let T =
|
|
15869
|
+
let T = J(() => ({ open: N === Me.Open, disabled: d, invalid: u, value: A }), [N, d, u, A]), [R, b] = AE({ inherit: !0 }), I = { ref: $ }, k = ee(() => {
|
|
15863
15870
|
if (y !== void 0) return B == null ? void 0 : B(y);
|
|
15864
15871
|
}, [B, y]), _ = ot();
|
|
15865
15872
|
return Z.createElement(b, { value: R, props: { htmlFor: E == null ? void 0 : E.id }, slot: { open: N === Me.Open, disabled: d } }, Z.createElement(f5, null, Z.createElement($0.Provider, { value: L }, Z.createElement(si.Provider, { value: P }, Z.createElement(m0, { value: bt(N, { [Me.Open]: Pt.Open, [Me.Closed]: Pt.Closed }) }, c != null && A != null && Z.createElement(fE, { disabled: d, data: { [c]: A }, form: i, onReset: k }), _({ ourProps: I, theirProps: m, slot: T, defaultTag: H5, name: "Listbox" }))))));
|
|
@@ -15867,7 +15874,7 @@ function W5(e, t) {
|
|
|
15867
15874
|
let V5 = "button";
|
|
15868
15875
|
function G5(e, t) {
|
|
15869
15876
|
let n = Yn(), r = Th(), o = jo("Listbox.Button"), s = gl("Listbox.Button"), { id: i = r || `headlessui-listbox-button-${n}`, disabled: c = o.disabled || !1, autoFocus: a = !1, ...l } = e, u = wt(t, a5(), s.actions.setButtonElement), d = c5(), [f, p, h] = pt(s, (b) => [b.listboxState, b.buttonElement, b.optionsElement]), m = f === Me.Open;
|
|
15870
|
-
a2(m, { trigger: p, action:
|
|
15877
|
+
a2(m, { trigger: p, action: ee((b) => {
|
|
15871
15878
|
if (p != null && p.contains(b.target)) return Qo.Ignore;
|
|
15872
15879
|
let I = b.target.closest('[role="option"]:not([data-disabled])');
|
|
15873
15880
|
return pn(I) ? Qo.Select(I) : h != null && h.contains(b.target) ? Qo.Ignore : Qo.Close;
|
|
@@ -15901,7 +15908,7 @@ function G5(e, t) {
|
|
|
15901
15908
|
A.current = b.pointerType, b.pointerType === "mouse" && y(b);
|
|
15902
15909
|
}), L = pe((b) => {
|
|
15903
15910
|
A.current !== "mouse" && y(b);
|
|
15904
|
-
}), D = pe((b) => b.preventDefault()), F = Bh([i]), g = xE(), { isFocusVisible: v, focusProps: P } = Gx({ autoFocus: a }), { isHovered: N, hoverProps: O } = Vx({ isDisabled: c }), { pressed: S, pressProps: E } = Qx({ disabled: c }), x =
|
|
15911
|
+
}), D = pe((b) => b.preventDefault()), F = Bh([i]), g = xE(), { isFocusVisible: v, focusProps: P } = Gx({ autoFocus: a }), { isHovered: N, hoverProps: O } = Vx({ isDisabled: c }), { pressed: S, pressProps: E } = Qx({ disabled: c }), x = J(() => ({ open: f === Me.Open, active: S || f === Me.Open, disabled: c, invalid: o.invalid, value: o.value, hover: N, focus: v, autofocus: a }), [f, o.value, c, N, v, S, o.invalid, a]), T = pt(s, (b) => b.listboxState === Me.Open), R = Eh(d(), { ref: u, id: i, type: c2(e, p), "aria-haspopup": "listbox", "aria-controls": h == null ? void 0 : h.id, "aria-expanded": T, "aria-labelledby": F, "aria-describedby": g, disabled: c || void 0, autoFocus: a, onKeyDown: w, onKeyUp: $, onKeyPress: D, onPointerDown: B, onClick: L }, P, O, E);
|
|
15905
15912
|
return ot()({ ourProps: R, theirProps: l, slot: x, defaultTag: V5, name: "Listbox.Button" });
|
|
15906
15913
|
}
|
|
15907
15914
|
let R0 = Fe(!1), q5 = "div", Z5 = vs.RenderStrategy | vs.Static;
|
|
@@ -15913,7 +15920,7 @@ function K5(e, t) {
|
|
|
15913
15920
|
let F = $ ? !1 : i && h === Me.Open;
|
|
15914
15921
|
g2(F, A);
|
|
15915
15922
|
let g = $ ? !1 : i && h === Me.Open;
|
|
15916
|
-
VE(g, { allowed:
|
|
15923
|
+
VE(g, { allowed: ee(() => [m, w], [m, w]) });
|
|
15917
15924
|
let v = h !== Me.Open, P = D5(v, m) ? !1 : L, N = L && h === Me.Closed, O = h5(N, f.value), S = pe((V) => f.compare(O, V)), E = pt(p, (V) => {
|
|
15918
15925
|
var te;
|
|
15919
15926
|
if (l == null || !((te = l == null ? void 0 : l.to) != null && te.includes("selection"))) return null;
|
|
@@ -15965,7 +15972,7 @@ function K5(e, t) {
|
|
|
15965
15972
|
}), j = pt(p, (V) => {
|
|
15966
15973
|
var te;
|
|
15967
15974
|
return (te = V.buttonElement) == null ? void 0 : te.id;
|
|
15968
|
-
}), z =
|
|
15975
|
+
}), z = J(() => ({ open: h === Me.Open }), [h]), K = Eh(l ? b() : {}, { id: r, ref: I, "aria-activedescendant": pt(p, p.selectors.activeDescendantId), "aria-multiselectable": f.mode === Dt.Multi ? !0 : void 0, "aria-labelledby": j, "aria-orientation": f.orientation, onKeyDown: _, role: "listbox", tabIndex: h === Me.Open ? 0 : void 0, style: { ...a.style, ...R, "--button-width": BE(m, !0).width }, ...Vh(D) }), H = ot(), q = J(() => f.mode === Dt.Multi ? f : { ...f, isSelected: S }, [f, S]);
|
|
15969
15976
|
return Z.createElement(T5, { enabled: s ? e.static || L : !1, ownerDocument: y }, Z.createElement(si.Provider, { value: q }, H({ ourProps: K, theirProps: a, slot: z, defaultTag: q5, features: Z5, visible: P, name: "Listbox.Options" })));
|
|
15970
15977
|
}
|
|
15971
15978
|
let Y5 = "div";
|
|
@@ -15994,12 +16001,12 @@ function X5(e, t) {
|
|
|
15994
16001
|
A.wasMoved(P) && (o || u && l.state.activationTrigger === ls.Pointer || l.actions.goToOption({ focus: Se.Specific, id: r }, ls.Pointer));
|
|
15995
16002
|
}), D = pe((P) => {
|
|
15996
16003
|
A.wasMoved(P) && (o || u && l.state.activationTrigger === ls.Pointer && l.actions.goToOption({ focus: Se.Nothing }));
|
|
15997
|
-
}), F =
|
|
16004
|
+
}), F = J(() => ({ active: u, focus: u, selected: d, disabled: o, selectedOption: d && c }), [u, d, o, c]), g = c ? {} : { id: r, ref: m, role: "option", tabIndex: o === !0 ? void 0 : -1, "aria-disabled": o === !0 ? !0 : void 0, "aria-selected": d, disabled: void 0, onClick: $, onFocus: y, onPointerEnter: B, onMouseEnter: B, onPointerMove: L, onMouseMove: L, onPointerLeave: D, onMouseLeave: D }, v = ot();
|
|
15998
16005
|
return !d && c ? null : v({ ourProps: g, theirProps: i, slot: F, defaultTag: Y5, name: "Listbox.Option" });
|
|
15999
16006
|
}
|
|
16000
16007
|
let Q5 = ht;
|
|
16001
16008
|
function J5(e, t) {
|
|
16002
|
-
let { options: n, placeholder: r, ...o } = e, s = { ref: wt(t) }, i = jo("ListboxSelectedOption"), c =
|
|
16009
|
+
let { options: n, placeholder: r, ...o } = e, s = { ref: wt(t) }, i = jo("ListboxSelectedOption"), c = J(() => ({}), []), a = i.value === void 0 || i.value === null || i.mode === Dt.Multi && Array.isArray(i.value) && i.value.length === 0, l = ot();
|
|
16003
16010
|
return Z.createElement(R0.Provider, { value: !0 }, l({ ourProps: s, theirProps: { ...o, children: Z.createElement(Z.Fragment, null, r && a ? r : n) }, slot: c, defaultTag: Q5, name: "ListboxSelectedOption" }));
|
|
16004
16011
|
}
|
|
16005
16012
|
let eS = et(W5), tS = et(G5), nS = OE, rS = et(K5), oS = et(X5), sS = et(J5), ts = Object.assign(eS, { Button: tS, Label: nS, Options: rS, Option: oS, SelectedOption: sS });
|
|
@@ -16238,10 +16245,10 @@ const cS = {
|
|
|
16238
16245
|
txType: c = "deposit"
|
|
16239
16246
|
// 默认为充值场景
|
|
16240
16247
|
}) => {
|
|
16241
|
-
const a =
|
|
16248
|
+
const a = ee(
|
|
16242
16249
|
(w) => c === "withdraw" ? i === Un ? w.allowAaWithdraw !== !1 : w.allowWithdraw !== !1 : i === Un ? w.allowAaDeposit !== !1 : w.allowDeposit !== !1,
|
|
16243
16250
|
[c, i]
|
|
16244
|
-
), l =
|
|
16251
|
+
), l = J(() => {
|
|
16245
16252
|
const w = /* @__PURE__ */ new Set(), $ = [];
|
|
16246
16253
|
for (const y of t)
|
|
16247
16254
|
if (a(y))
|
|
@@ -16269,7 +16276,7 @@ const cS = {
|
|
|
16269
16276
|
) && y.push(A.chainId);
|
|
16270
16277
|
}
|
|
16271
16278
|
!y.includes(e.chainId) && y[0] !== void 0 && n(y[0]);
|
|
16272
|
-
}, f =
|
|
16279
|
+
}, f = J(() => {
|
|
16273
16280
|
var y, A;
|
|
16274
16281
|
const w = r || ((y = l[0]) == null ? void 0 : y.symbol) || ((A = l[0]) == null ? void 0 : A.token);
|
|
16275
16282
|
if (!w) return [];
|
|
@@ -16291,12 +16298,12 @@ const cS = {
|
|
|
16291
16298
|
});
|
|
16292
16299
|
}
|
|
16293
16300
|
return $;
|
|
16294
|
-
}, [t, r, l, a, c]), p =
|
|
16301
|
+
}, [t, r, l, a, c]), p = J(() => f.find(
|
|
16295
16302
|
(w) => w.chainId === e.chainId
|
|
16296
|
-
) || f[0], [f, e.chainId]), h =
|
|
16303
|
+
) || f[0], [f, e.chainId]), h = J(
|
|
16297
16304
|
() => l,
|
|
16298
16305
|
[l]
|
|
16299
|
-
), m =
|
|
16306
|
+
), m = J(() => {
|
|
16300
16307
|
if (h.length !== 0)
|
|
16301
16308
|
return h.find(
|
|
16302
16309
|
(w) => w.token === r || w.symbol === r
|
|
@@ -18625,7 +18632,7 @@ const yr = ({
|
|
|
18625
18632
|
onCopy: o,
|
|
18626
18633
|
onClose: s
|
|
18627
18634
|
}) => {
|
|
18628
|
-
const { t: i } = An(), c =
|
|
18635
|
+
const { t: i } = An(), c = J(() => NP(e || {}), [e]);
|
|
18629
18636
|
return /* @__PURE__ */ C.jsxs(C.Fragment, { children: [
|
|
18630
18637
|
/* @__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(
|
|
18631
18638
|
V0,
|
|
@@ -18815,18 +18822,18 @@ const yr = ({
|
|
|
18815
18822
|
};
|
|
18816
18823
|
let Xe = null;
|
|
18817
18824
|
const kP = Z.forwardRef((e, t) => {
|
|
18818
|
-
const [n, r] = le(!1), [o, s] = le(!1), [i, c] = le(J0), a =
|
|
18825
|
+
const [n, r] = le(!1), [o, s] = le(!1), [i, c] = le(J0), a = ee((h) => {
|
|
18819
18826
|
c(h), r(!0);
|
|
18820
|
-
}, []), l =
|
|
18827
|
+
}, []), l = ee(
|
|
18821
18828
|
(h) => {
|
|
18822
18829
|
c((m) => ({ ...m, ...h }));
|
|
18823
18830
|
},
|
|
18824
18831
|
[]
|
|
18825
|
-
), u =
|
|
18832
|
+
), u = ee(() => {
|
|
18826
18833
|
r(!1), s(!1), i.onClose && i.onClose();
|
|
18827
|
-
}, [i.onClose]), d =
|
|
18834
|
+
}, [i.onClose]), d = ee((h) => {
|
|
18828
18835
|
s(h);
|
|
18829
|
-
}, []), f =
|
|
18836
|
+
}, []), f = ee(() => n, [n]), p = ee(() => o, [o]);
|
|
18830
18837
|
return Cf(
|
|
18831
18838
|
t,
|
|
18832
18839
|
() => ({
|
|
@@ -18929,7 +18936,7 @@ const DP = (e) => {
|
|
|
18929
18936
|
showLayerZeroTip: c,
|
|
18930
18937
|
minDeposit: a = 10
|
|
18931
18938
|
} = e;
|
|
18932
|
-
return
|
|
18939
|
+
return J(() => {
|
|
18933
18940
|
if (n)
|
|
18934
18941
|
return {
|
|
18935
18942
|
text: t("deposit.switchNetwork"),
|
|
@@ -18981,7 +18988,7 @@ function HP(e) {
|
|
|
18981
18988
|
query: {
|
|
18982
18989
|
enabled: !!(!p && t && r && u && f)
|
|
18983
18990
|
}
|
|
18984
|
-
}), y = $ != null && $.isSuccess ? $.data : void 0, A =
|
|
18991
|
+
}), y = $ != null && $.isSuccess ? $.data : void 0, A = J(() => {
|
|
18985
18992
|
if (p) return !0;
|
|
18986
18993
|
if (!$.isSuccess || y === void 0 || y === 0n) return !1;
|
|
18987
18994
|
try {
|
|
@@ -18993,7 +19000,7 @@ function HP(e) {
|
|
|
18993
19000
|
} catch {
|
|
18994
19001
|
return !1;
|
|
18995
19002
|
}
|
|
18996
|
-
}, [p, $.isSuccess, y, s, d]), B =
|
|
19003
|
+
}, [p, $.isSuccess, y, s, d]), B = ee(async () => {
|
|
18997
19004
|
try {
|
|
18998
19005
|
if (r && n && +n != +r && await h({ chainId: +r }), !m || !w || !u || !f)
|
|
18999
19006
|
return;
|
|
@@ -19057,12 +19064,12 @@ const WP = ({
|
|
|
19057
19064
|
wagmiHooks: o
|
|
19058
19065
|
}) => {
|
|
19059
19066
|
var $;
|
|
19060
|
-
const s =
|
|
19067
|
+
const s = J(
|
|
19061
19068
|
() => r.filter(
|
|
19062
19069
|
(y) => y.tokenAddress && y.tokenAddress !== "0x0000000000000000000000000000000000000000"
|
|
19063
19070
|
),
|
|
19064
19071
|
[r]
|
|
19065
|
-
), [i, c] = le({}), a =
|
|
19072
|
+
), [i, c] = le({}), a = ee(
|
|
19066
19073
|
(y, A) => {
|
|
19067
19074
|
c((B) => ({
|
|
19068
19075
|
...B,
|
|
@@ -19076,7 +19083,7 @@ const WP = ({
|
|
|
19076
19083
|
query: {
|
|
19077
19084
|
enabled: !!e && !!t && !!(o != null && o.useBalance)
|
|
19078
19085
|
}
|
|
19079
|
-
}), [u, d] = le(0), f =
|
|
19086
|
+
}), [u, d] = le(0), f = J(() => s.map(
|
|
19080
19087
|
(y) => Z.createElement(WP, {
|
|
19081
19088
|
key: `${y.tokenAddress}-${u}`,
|
|
19082
19089
|
token: y,
|
|
@@ -19094,7 +19101,7 @@ const WP = ({
|
|
|
19094
19101
|
o,
|
|
19095
19102
|
a,
|
|
19096
19103
|
u
|
|
19097
|
-
]), p =
|
|
19104
|
+
]), p = J(() => {
|
|
19098
19105
|
const y = l != null && l.data ? {
|
|
19099
19106
|
value: l.data.value,
|
|
19100
19107
|
formatted: l.data.formatted,
|
|
@@ -19127,7 +19134,7 @@ const WP = ({
|
|
|
19127
19134
|
baseTokenBalance: y,
|
|
19128
19135
|
combinedData: B
|
|
19129
19136
|
};
|
|
19130
|
-
}, [l, i, s]), h =
|
|
19137
|
+
}, [l, i, s]), h = ee(async () => p, [p]), m = J(() => {
|
|
19131
19138
|
const y = (l == null ? void 0 : l.isLoading) || !1, A = Object.values(i).some(
|
|
19132
19139
|
(B) => {
|
|
19133
19140
|
var L;
|
|
@@ -19135,7 +19142,7 @@ const WP = ({
|
|
|
19135
19142
|
}
|
|
19136
19143
|
);
|
|
19137
19144
|
return y || A;
|
|
19138
|
-
}, [l == null ? void 0 : l.isLoading, i]), w =
|
|
19145
|
+
}, [l == null ? void 0 : l.isLoading, i]), w = ee(() => d((y) => y + 1), []);
|
|
19139
19146
|
return {
|
|
19140
19147
|
multicallRun: h,
|
|
19141
19148
|
multicallRefresh: w,
|
|
@@ -19167,14 +19174,14 @@ const WP = ({
|
|
|
19167
19174
|
contractAddress: (u == null ? void 0 : u.contractAddress) || (t == null ? void 0 : t.contractAddress),
|
|
19168
19175
|
tokens: (t == null ? void 0 : t.tokenList) || [],
|
|
19169
19176
|
wagmiHooks: s
|
|
19170
|
-
}), w =
|
|
19177
|
+
}), w = J(() => {
|
|
19171
19178
|
var _;
|
|
19172
19179
|
if (!u) return "0";
|
|
19173
19180
|
if (!u.tokenAddress || u.tokenAddress.toLowerCase() === "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee")
|
|
19174
19181
|
return h.baseTokenBalance.formatted;
|
|
19175
19182
|
const k = h.combinedData[u.tokenAddress];
|
|
19176
19183
|
return ((_ = k == null ? void 0 : k.balance) == null ? void 0 : _.formatted) || "0";
|
|
19177
|
-
}, [u, h]), $ = "0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9", y = "0xceeed84620e5eb9ab1d6dfc316867d2cda332e41", A =
|
|
19184
|
+
}, [u, h]), $ = "0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9", y = "0xceeed84620e5eb9ab1d6dfc316867d2cda332e41", A = J(
|
|
19178
19185
|
() => {
|
|
19179
19186
|
var k, _;
|
|
19180
19187
|
return Ca({
|
|
@@ -19199,7 +19206,7 @@ const WP = ({
|
|
|
19199
19206
|
tokenInfo: u,
|
|
19200
19207
|
amount: f,
|
|
19201
19208
|
wagmiHooks: s
|
|
19202
|
-
}), P =
|
|
19209
|
+
}), P = ee(async () => {
|
|
19203
19210
|
if (!D)
|
|
19204
19211
|
try {
|
|
19205
19212
|
F(!0), await v();
|
|
@@ -19208,13 +19215,13 @@ const WP = ({
|
|
|
19208
19215
|
} finally {
|
|
19209
19216
|
F(!1);
|
|
19210
19217
|
}
|
|
19211
|
-
}, [D, v]), N =
|
|
19218
|
+
}, [D, v]), N = J(() => +l.chainId != +t.chainId, [l.chainId, t.chainId]), O = ee(async () => {
|
|
19212
19219
|
i && i(d);
|
|
19213
19220
|
}, [i, d]);
|
|
19214
19221
|
Ae(() => {
|
|
19215
19222
|
N && O();
|
|
19216
19223
|
}, [N, O]);
|
|
19217
|
-
const { showLayerZeroTip: S, layerZeroTipKey: E } =
|
|
19224
|
+
const { showLayerZeroTip: S, layerZeroTipKey: E } = J(() => {
|
|
19218
19225
|
const k = +t.chainId == 42161 || +t.chainId == 421614, _ = (n == null ? void 0 : n.toUpperCase()) === "USDT", j = new Ie(f || "0"), z = new Ie("200000");
|
|
19219
19226
|
let K = !1, H;
|
|
19220
19227
|
if (k && _ && f)
|
|
@@ -19233,11 +19240,11 @@ const WP = ({
|
|
|
19233
19240
|
n,
|
|
19234
19241
|
f,
|
|
19235
19242
|
L
|
|
19236
|
-
]), x =
|
|
19243
|
+
]), x = ee(() => MP(
|
|
19237
19244
|
+t.chainId,
|
|
19238
19245
|
w || "0",
|
|
19239
19246
|
n
|
|
19240
|
-
), [w, t == null ? void 0 : t.chainId, n]), T =
|
|
19247
|
+
), [w, t == null ? void 0 : t.chainId, n]), T = J(() => LP(
|
|
19241
19248
|
+t.chainId,
|
|
19242
19249
|
f,
|
|
19243
19250
|
n
|
|
@@ -19255,7 +19262,7 @@ const WP = ({
|
|
|
19255
19262
|
p(z.formattedValue), z.errorType;
|
|
19256
19263
|
else
|
|
19257
19264
|
return z.errorType === "exceed_balance", void 0;
|
|
19258
|
-
}, I =
|
|
19265
|
+
}, I = ee(async () => {
|
|
19259
19266
|
ic(!0);
|
|
19260
19267
|
try {
|
|
19261
19268
|
c && c({
|
|
@@ -19417,12 +19424,12 @@ const WP = ({
|
|
|
19417
19424
|
if (!L || !L.tokenList || L.tokenList.length === 0) return "";
|
|
19418
19425
|
const D = L.tokenList[0];
|
|
19419
19426
|
return (D == null ? void 0 : D.token) || "";
|
|
19420
|
-
}), y =
|
|
19427
|
+
}), y = ee(
|
|
19421
19428
|
(B) => {
|
|
19422
19429
|
h(B), u == null || u(B);
|
|
19423
19430
|
},
|
|
19424
19431
|
[u]
|
|
19425
|
-
), A =
|
|
19432
|
+
), A = ee(
|
|
19426
19433
|
(B) => {
|
|
19427
19434
|
$(B), d == null || d(B);
|
|
19428
19435
|
},
|
|
@@ -19533,14 +19540,14 @@ const WP = ({
|
|
|
19533
19540
|
onAmountChanged: u,
|
|
19534
19541
|
showPoolBalanceInsufficientTip: d = !1
|
|
19535
19542
|
}) => {
|
|
19536
|
-
const { t: f } = An(), p =
|
|
19543
|
+
const { t: f } = An(), p = J(() => {
|
|
19537
19544
|
if (!Ze(r == null ? void 0 : r.chainId)) {
|
|
19538
19545
|
const A = new Ie(e || "0").minus(s || "0").decimalPlaces(2, Ie.ROUND_DOWN);
|
|
19539
19546
|
return A.isNegative() ? "0.00" : A.toString();
|
|
19540
19547
|
}
|
|
19541
19548
|
return e || "0";
|
|
19542
|
-
}, [e, s, r == null ? void 0 : r.chainId]), h =
|
|
19543
|
-
const A = (n == null ? void 0 : n.feeRate)
|
|
19549
|
+
}, [e, s, r == null ? void 0 : r.chainId]), h = J(() => o || "0", [o]), m = J(() => {
|
|
19550
|
+
const A = (n == null ? void 0 : n.feeRate) || (r == null ? void 0 : r.feeRate) || 0;
|
|
19544
19551
|
try {
|
|
19545
19552
|
return new Ie(A || 0).times(100).toString();
|
|
19546
19553
|
} catch {
|
|
@@ -19695,7 +19702,7 @@ const XP = Z.forwardRef((e, t) => {
|
|
|
19695
19702
|
accountId: "",
|
|
19696
19703
|
smartWalletAddress: ""
|
|
19697
19704
|
}
|
|
19698
|
-
}), a =
|
|
19705
|
+
}), a = ee((h) => {
|
|
19699
19706
|
c(
|
|
19700
19707
|
h || {
|
|
19701
19708
|
chains: [],
|
|
@@ -19707,16 +19714,16 @@ const XP = Z.forwardRef((e, t) => {
|
|
|
19707
19714
|
}
|
|
19708
19715
|
}
|
|
19709
19716
|
), r(!0);
|
|
19710
|
-
}, []), l =
|
|
19717
|
+
}, []), l = ee(
|
|
19711
19718
|
(h) => {
|
|
19712
19719
|
c((m) => ({ ...m, ...h }));
|
|
19713
19720
|
},
|
|
19714
19721
|
[]
|
|
19715
|
-
), u =
|
|
19722
|
+
), u = ee(() => {
|
|
19716
19723
|
r(!1), s(!1), i.onClose && i.onClose();
|
|
19717
|
-
}, [i.onClose]), d =
|
|
19724
|
+
}, [i.onClose]), d = ee((h) => {
|
|
19718
19725
|
s(h);
|
|
19719
|
-
}, []), f =
|
|
19726
|
+
}, []), f = ee(() => n, [n]), p = ee(() => o, [o]);
|
|
19720
19727
|
return Cf(
|
|
19721
19728
|
t,
|
|
19722
19729
|
() => ({
|
|
@@ -19848,13 +19855,13 @@ const QP = (e) => {
|
|
|
19848
19855
|
onAmountChanged: w
|
|
19849
19856
|
}) => {
|
|
19850
19857
|
var je;
|
|
19851
|
-
const { t: $ } = An(), y =
|
|
19858
|
+
const { t: $ } = An(), y = J(() => {
|
|
19852
19859
|
const Y = [56, 97], ne = (ye) => n == null ? void 0 : n.find((me) => Number(me == null ? void 0 : me.chainId) === ye), Q = ne(Y[0]) || ne(Y[1]);
|
|
19853
19860
|
return Q == null ? void 0 : Q.rpcUrl;
|
|
19854
|
-
}, [n]), A =
|
|
19861
|
+
}, [n]), A = J(() => {
|
|
19855
19862
|
const Y = [42161, 421614], ne = (ye) => n == null ? void 0 : n.find((me) => Number(me == null ? void 0 : me.chainId) === ye), Q = ne(Y[0]) || ne(Y[1]);
|
|
19856
19863
|
return Q == null ? void 0 : Q.rpcUrl;
|
|
19857
|
-
}, [n]), B =
|
|
19864
|
+
}, [n]), B = J(() => {
|
|
19858
19865
|
var Rn, tt;
|
|
19859
19866
|
const Y = "USDC";
|
|
19860
19867
|
if (!n || n.length === 0) return { chainId: 1, tokenSymbol: "" };
|
|
@@ -19871,12 +19878,12 @@ const QP = (e) => {
|
|
|
19871
19878
|
() => B.chainId
|
|
19872
19879
|
), [P, N] = le(
|
|
19873
19880
|
() => B.tokenSymbol
|
|
19874
|
-
), [O, S] = le(s), [E, x] = le(""), T =
|
|
19881
|
+
), [O, S] = le(s), [E, x] = le(""), T = ee(
|
|
19875
19882
|
(Y) => {
|
|
19876
19883
|
v(Y), h == null || h(Y);
|
|
19877
19884
|
},
|
|
19878
19885
|
[h]
|
|
19879
|
-
), R =
|
|
19886
|
+
), R = ee(
|
|
19880
19887
|
(Y) => {
|
|
19881
19888
|
N(Y), m == null || m(Y);
|
|
19882
19889
|
},
|
|
@@ -19898,7 +19905,7 @@ const QP = (e) => {
|
|
|
19898
19905
|
// 暂时不传入合约地址
|
|
19899
19906
|
tokens: (_ == null ? void 0 : _.tokenList) || [],
|
|
19900
19907
|
wagmiHooks: d
|
|
19901
|
-
}), H =
|
|
19908
|
+
}), H = J(() => {
|
|
19902
19909
|
var ne;
|
|
19903
19910
|
if (!j) return;
|
|
19904
19911
|
if (!j.tokenAddress || j.tokenAddress.toLowerCase() === "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee")
|
|
@@ -19909,7 +19916,7 @@ const QP = (e) => {
|
|
|
19909
19916
|
if (!Y) return "0";
|
|
19910
19917
|
const ne = Y.indexOf(".");
|
|
19911
19918
|
return ne >= 0 ? Y.slice(0, ne) : Y;
|
|
19912
|
-
}, V =
|
|
19919
|
+
}, V = J(() => {
|
|
19913
19920
|
const Y = (P || "").toUpperCase(), ne = Number(g), Q = (ye) => {
|
|
19914
19921
|
const me = q(ye);
|
|
19915
19922
|
try {
|
|
@@ -19931,7 +19938,7 @@ const QP = (e) => {
|
|
|
19931
19938
|
L,
|
|
19932
19939
|
D,
|
|
19933
19940
|
F
|
|
19934
|
-
]), te =
|
|
19941
|
+
]), te = J(() => {
|
|
19935
19942
|
if (Ze(g)) return !1;
|
|
19936
19943
|
try {
|
|
19937
19944
|
const Y = new Ie(O || "0"), ne = new Ie((V || "0").toString());
|
|
@@ -19939,7 +19946,7 @@ const QP = (e) => {
|
|
|
19939
19946
|
} catch {
|
|
19940
19947
|
return !1;
|
|
19941
19948
|
}
|
|
19942
|
-
}, [g, O, V]), oe =
|
|
19949
|
+
}, [g, O, V]), oe = J(() => {
|
|
19943
19950
|
const Y = {}, ne = (P || "").toUpperCase(), Q = (ye) => {
|
|
19944
19951
|
const me = q(ye);
|
|
19945
19952
|
try {
|
|
@@ -19973,7 +19980,7 @@ const QP = (e) => {
|
|
|
19973
19980
|
L,
|
|
19974
19981
|
D,
|
|
19975
19982
|
F
|
|
19976
|
-
]), de =
|
|
19983
|
+
]), de = J(() => {
|
|
19977
19984
|
const Y = new Ie(O || "0"), ne = new Ie(l || "0"), Q = Ze(g);
|
|
19978
19985
|
let ye = !1;
|
|
19979
19986
|
if (!Q)
|
|
@@ -20003,7 +20010,7 @@ const QP = (e) => {
|
|
|
20003
20010
|
E,
|
|
20004
20011
|
l,
|
|
20005
20012
|
V
|
|
20006
|
-
]), Re =
|
|
20013
|
+
]), Re = ee(async () => {
|
|
20007
20014
|
ac(!0);
|
|
20008
20015
|
try {
|
|
20009
20016
|
if (f) {
|
|
@@ -20225,4 +20232,4 @@ export {
|
|
|
20225
20232
|
XP as y,
|
|
20226
20233
|
QP as z
|
|
20227
20234
|
};
|
|
20228
|
-
//# sourceMappingURL=index-
|
|
20235
|
+
//# sourceMappingURL=index-VRs3PVMH.mjs.map
|