@dhedge/trading-widget 2.0.10 → 2.0.11
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/{index-cbfa25b4.js → index-1679af82.js} +112 -105
- package/{index-ef008307.cjs → index-313d3eb2.cjs} +1 -1
- package/index.cjs +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/{pyth-adapter-cddca4d8.js → pyth-adapter-264be31a.js} +1 -1
- package/{pyth-adapter-54f9b595.cjs → pyth-adapter-eb7a4fb1.cjs} +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as we from "react";
|
|
2
|
-
import Le, { useRef as Ot, useCallback as _t, useEffect as
|
|
2
|
+
import Le, { useRef as Ot, useCallback as _t, useEffect as ht, useState as Yt, useMemo as He, useLayoutEffect as cE, createContext as wn, useContext as Jt, forwardRef as p3, Fragment as $l, isValidElement as PO, cloneElement as m3, createElement as h3, useId as tl, useReducer as zh, useSyncExternalStore as v3, createRef as hx, Children as y3 } from "react";
|
|
3
3
|
import { erc20Abi as kp, stringToHex as g3, encodeFunctionData as Rb, formatUnits as eg, formatEther as w3, getAddress as Iw, UserRejectedRequestError as Ec, ResourceUnavailableRpcError as vx, withRetry as b3, withTimeout as T3, SwitchChainError as aA, numberToHex as iA, isHex as yx, hexToString as S3, trim as x3, decodeErrorResult as oA, getAbiItem as lA } from "viem";
|
|
4
4
|
import { useAccount as LO, useConfig as E3, useSwitchChain as C3, useReadContract as ef, useBalance as R3, useWalletClient as D3, usePublicClient as dE, useWriteContract as A3, useEstimateFeesPerGas as O3, useBlockNumber as FO, useReadContracts as nl, useConnect as IO, useWaitForTransactionReceipt as UO, useSendTransaction as k3 } from "wagmi";
|
|
5
5
|
import { useQuery as fE, useQueryClient as $O } from "@tanstack/react-query";
|
|
@@ -21879,7 +21879,7 @@ function kU(t, r, i) {
|
|
|
21879
21879
|
return t = t || (i == null ? void 0 : i.target) instanceof c && !OU.has(i == null || (s = i.target) === null || s === void 0 ? void 0 : s.type) || (i == null ? void 0 : i.target) instanceof f || (i == null ? void 0 : i.target) instanceof p && (i == null ? void 0 : i.target.isContentEditable), !(t && r === "keyboard" && i instanceof y && !RU[i.key]);
|
|
21880
21880
|
}
|
|
21881
21881
|
function _U(t, r, i) {
|
|
21882
|
-
qx(),
|
|
21882
|
+
qx(), ht(() => {
|
|
21883
21883
|
let s = (c, f) => {
|
|
21884
21884
|
kU(!!(i != null && i.isTextInput), c, f) && t(uk());
|
|
21885
21885
|
};
|
|
@@ -21939,7 +21939,7 @@ function Ab(t) {
|
|
|
21939
21939
|
pointerType: "",
|
|
21940
21940
|
target: null
|
|
21941
21941
|
}).current;
|
|
21942
|
-
|
|
21942
|
+
ht(NU, []);
|
|
21943
21943
|
let { hoverProps: g, triggerHoverEnd: T } = He(() => {
|
|
21944
21944
|
let S = (C, P) => {
|
|
21945
21945
|
if (y.pointerType = P, c || P === "touch" || y.isHovered || !C.currentTarget.contains(C.target))
|
|
@@ -21983,7 +21983,7 @@ function Ab(t) {
|
|
|
21983
21983
|
c,
|
|
21984
21984
|
y
|
|
21985
21985
|
]);
|
|
21986
|
-
return
|
|
21986
|
+
return ht(() => {
|
|
21987
21987
|
c && T({
|
|
21988
21988
|
currentTarget: y.target
|
|
21989
21989
|
}, y.pointerType);
|
|
@@ -22100,10 +22100,10 @@ function Ip() {
|
|
|
22100
22100
|
}
|
|
22101
22101
|
function Vh() {
|
|
22102
22102
|
let [t] = Yt(Ip);
|
|
22103
|
-
return
|
|
22103
|
+
return ht(() => () => t.dispose(), [t]), t;
|
|
22104
22104
|
}
|
|
22105
22105
|
let qn = (t, r) => {
|
|
22106
|
-
Op.isServer ?
|
|
22106
|
+
Op.isServer ? ht(t, r) : cE(t, r);
|
|
22107
22107
|
};
|
|
22108
22108
|
function Jo(t) {
|
|
22109
22109
|
let r = Ot(t);
|
|
@@ -22111,7 +22111,7 @@ function Jo(t) {
|
|
|
22111
22111
|
r.current = t;
|
|
22112
22112
|
}, [t]), r;
|
|
22113
22113
|
}
|
|
22114
|
-
let
|
|
22114
|
+
let vt = function(t) {
|
|
22115
22115
|
let r = Jo(t);
|
|
22116
22116
|
return Le.useCallback((...i) => r.current(...i), [r]);
|
|
22117
22117
|
};
|
|
@@ -22123,9 +22123,9 @@ function UU(t, r) {
|
|
|
22123
22123
|
return !(!t || !r || t.right < r.left || t.left > r.right || t.bottom < r.top || t.top > r.bottom);
|
|
22124
22124
|
}
|
|
22125
22125
|
function Ob({ disabled: t = !1 } = {}) {
|
|
22126
|
-
let r = Ot(null), [i, s] = Yt(!1), c = Vh(), f =
|
|
22126
|
+
let r = Ot(null), [i, s] = Yt(!1), c = Vh(), f = vt(() => {
|
|
22127
22127
|
r.current = null, s(!1), c.dispose();
|
|
22128
|
-
}), p =
|
|
22128
|
+
}), p = vt((y) => {
|
|
22129
22129
|
if (c.dispose(), r.current === null) {
|
|
22130
22130
|
r.current = y.currentTarget, s(!0);
|
|
22131
22131
|
{
|
|
@@ -22287,7 +22287,7 @@ function Sx(t, r = []) {
|
|
|
22287
22287
|
}
|
|
22288
22288
|
function jU(t, r, i) {
|
|
22289
22289
|
let [s, c] = Yt(i), f = t !== void 0, p = Ot(f), y = Ot(!1), g = Ot(!1);
|
|
22290
|
-
return f && !p.current && !y.current ? (y.current = !0, p.current = f, console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")) : !f && p.current && !g.current && (g.current = !0, p.current = f, console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")), [f ? t : s,
|
|
22290
|
+
return f && !p.current && !y.current ? (y.current = !0, p.current = f, console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")) : !f && p.current && !g.current && (g.current = !0, p.current = f, console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")), [f ? t : s, vt((T) => (f || c(T), r == null ? void 0 : r(T)))];
|
|
22291
22291
|
}
|
|
22292
22292
|
function zU(t) {
|
|
22293
22293
|
let [r] = Yt(t);
|
|
@@ -22341,13 +22341,13 @@ function YU({ children: t }) {
|
|
|
22341
22341
|
}
|
|
22342
22342
|
function qU({ data: t, form: r, disabled: i, onReset: s, overrides: c }) {
|
|
22343
22343
|
let [f, p] = Yt(null), y = Vh();
|
|
22344
|
-
return
|
|
22344
|
+
return ht(() => {
|
|
22345
22345
|
if (s && f)
|
|
22346
22346
|
return y.addEventListener(f, "reset", s);
|
|
22347
22347
|
}, [f, r, s]), Le.createElement(YU, null, Le.createElement(QU, { setForm: p, formId: r }), fk(t).map(([g, T]) => Le.createElement(Mc, { features: _c.Hidden, ...Qd({ key: g, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: r, disabled: i, name: g, value: T, ...c }) })));
|
|
22348
22348
|
}
|
|
22349
22349
|
function QU({ setForm: t, formId: r }) {
|
|
22350
|
-
return
|
|
22350
|
+
return ht(() => {
|
|
22351
22351
|
if (r) {
|
|
22352
22352
|
let i = document.getElementById(r);
|
|
22353
22353
|
i && t(i);
|
|
@@ -22390,10 +22390,10 @@ function CE(t, r = !0) {
|
|
|
22390
22390
|
}
|
|
22391
22391
|
function _r(...t) {
|
|
22392
22392
|
let r = Ot(t);
|
|
22393
|
-
|
|
22393
|
+
ht(() => {
|
|
22394
22394
|
r.current = t;
|
|
22395
22395
|
}, [t]);
|
|
22396
|
-
let i =
|
|
22396
|
+
let i = vt((s) => {
|
|
22397
22397
|
for (let c of r.current)
|
|
22398
22398
|
c != null && (typeof c == "function" ? c(s) : c.current = s);
|
|
22399
22399
|
});
|
|
@@ -22416,7 +22416,7 @@ function ZU() {
|
|
|
22416
22416
|
function bk() {
|
|
22417
22417
|
let [t, r] = Yt([]);
|
|
22418
22418
|
return [t.length > 0 ? t.join(" ") : void 0, He(() => function(i) {
|
|
22419
|
-
let s =
|
|
22419
|
+
let s = vt((f) => (r((p) => [...p, f]), () => r((p) => {
|
|
22420
22420
|
let y = p.slice(), g = y.indexOf(f);
|
|
22421
22421
|
return g !== -1 && y.splice(g, 1), y;
|
|
22422
22422
|
}))), c = He(() => ({ register: s, slot: i.slot, name: i.name, props: i.props, value: i.value }), [s, i.slot, i.name, i.props, i.value]);
|
|
@@ -22450,7 +22450,7 @@ function Sk(t) {
|
|
|
22450
22450
|
function xk({ inherit: t = !1 } = {}) {
|
|
22451
22451
|
let r = Sk(), [i, s] = Yt([]), c = t ? [r, ...i].filter(Boolean) : i;
|
|
22452
22452
|
return [c.length > 0 ? c.join(" ") : void 0, He(() => function(f) {
|
|
22453
|
-
let p =
|
|
22453
|
+
let p = vt((g) => (s((T) => [...T, g]), () => s((T) => {
|
|
22454
22454
|
let S = T.slice(), R = S.indexOf(g);
|
|
22455
22455
|
return R !== -1 && S.splice(R, 1), S;
|
|
22456
22456
|
}))), y = He(() => ({ register: p, slot: f.slot, name: f.name, props: f.props, value: f.value }), [p, f.slot, f.name, f.props, f.value]);
|
|
@@ -22462,7 +22462,7 @@ function a4(t, r) {
|
|
|
22462
22462
|
var i;
|
|
22463
22463
|
let s = tl(), c = Tk(), f = yk(), p = kb(), { id: y = `headlessui-label-${s}`, htmlFor: g = f ?? ((i = c.props) == null ? void 0 : i.htmlFor), passive: T = !1, ...S } = t, R = _r(r);
|
|
22464
22464
|
qn(() => c.register(y), [y, c.register]);
|
|
22465
|
-
let A =
|
|
22465
|
+
let A = vt((B) => {
|
|
22466
22466
|
let Y = B.currentTarget;
|
|
22467
22467
|
if (Y instanceof HTMLLabelElement && B.preventDefault(), c.props && "onClick" in c.props && typeof c.props.onClick == "function" && c.props.onClick(B), Y instanceof HTMLLabelElement) {
|
|
22468
22468
|
let U = document.getElementById(Y.htmlFor);
|
|
@@ -22548,7 +22548,7 @@ function Ok(t, r, i) {
|
|
|
22548
22548
|
let f = c.getBoundingClientRect();
|
|
22549
22549
|
f.x === 0 && f.y === 0 && f.width === 0 && f.height === 0 && i();
|
|
22550
22550
|
});
|
|
22551
|
-
|
|
22551
|
+
ht(() => {
|
|
22552
22552
|
if (!t)
|
|
22553
22553
|
return;
|
|
22554
22554
|
let c = r === null ? null : r instanceof HTMLElement ? r : r.current;
|
|
@@ -22656,7 +22656,7 @@ function g4() {
|
|
|
22656
22656
|
}
|
|
22657
22657
|
function jy(t, r, i, s) {
|
|
22658
22658
|
let c = Jo(i);
|
|
22659
|
-
|
|
22659
|
+
ht(() => {
|
|
22660
22660
|
if (!t)
|
|
22661
22661
|
return;
|
|
22662
22662
|
function f(p) {
|
|
@@ -22667,7 +22667,7 @@ function jy(t, r, i, s) {
|
|
|
22667
22667
|
}
|
|
22668
22668
|
function Mk(t, r, i, s) {
|
|
22669
22669
|
let c = Jo(i);
|
|
22670
|
-
|
|
22670
|
+
ht(() => {
|
|
22671
22671
|
if (!t)
|
|
22672
22672
|
return;
|
|
22673
22673
|
function f(p) {
|
|
@@ -22719,7 +22719,7 @@ function Wh(...t) {
|
|
|
22719
22719
|
}
|
|
22720
22720
|
function b4(t, r, i, s) {
|
|
22721
22721
|
let c = Jo(i);
|
|
22722
|
-
|
|
22722
|
+
ht(() => {
|
|
22723
22723
|
t = t ?? window;
|
|
22724
22724
|
function f(p) {
|
|
22725
22725
|
c.current(p);
|
|
@@ -23885,7 +23885,7 @@ const Ex = Bb, f$ = Y4, p$ = q4, m$ = W4, h$ = Q4, v$ = (t, r, i) => {
|
|
|
23885
23885
|
platform: f
|
|
23886
23886
|
});
|
|
23887
23887
|
};
|
|
23888
|
-
var Jw = typeof document < "u" ? cE :
|
|
23888
|
+
var Jw = typeof document < "u" ? cE : ht;
|
|
23889
23889
|
function db(t, r) {
|
|
23890
23890
|
if (t === r)
|
|
23891
23891
|
return !0;
|
|
@@ -24056,7 +24056,7 @@ function Gk(t) {
|
|
|
24056
24056
|
return r.current == null ? void 0 : r.current(...s);
|
|
24057
24057
|
}, []);
|
|
24058
24058
|
}
|
|
24059
|
-
var eE = typeof document < "u" ? cE :
|
|
24059
|
+
var eE = typeof document < "u" ? cE : ht;
|
|
24060
24060
|
let UA = !1, x$ = 0;
|
|
24061
24061
|
const $A = () => (
|
|
24062
24062
|
// Ensure the id is unique with multiple independent versions of Floating UI
|
|
@@ -24430,7 +24430,7 @@ function H$({ children: t, enabled: r = !0 }) {
|
|
|
24430
24430
|
Object.assign(V.floating.style, { overflow: "auto", maxWidth: `${W}px`, maxHeight: `min(var(--anchor-max-height, 100vh), ${K}px)` });
|
|
24431
24431
|
} })].filter(Boolean), whileElementsMounted: d$ }), [ne = $, re = B] = Z.placement.split("-");
|
|
24432
24432
|
$ === "selection" && (ne = "selection");
|
|
24433
|
-
let se = He(() => ({ anchor: [ne, re].filter(Boolean).join(" ") }), [ne, re]), ue = U$(Z, { overflowRef: p, onChange: f }), { getReferenceProps: O, getFloatingProps: M } = F$([ue]), F =
|
|
24433
|
+
let se = He(() => ({ anchor: [ne, re].filter(Boolean).join(" ") }), [ne, re]), ue = U$(Z, { overflowRef: p, onChange: f }), { getReferenceProps: O, getFloatingProps: M } = F$([ue]), F = vt((W) => {
|
|
24434
24434
|
g(W), Y.setFloating(W);
|
|
24435
24435
|
});
|
|
24436
24436
|
return we.createElement(kE.Provider, { value: s }, we.createElement(yg.Provider, { value: { setFloating: F, setReference: Y.setReference, styles: U, getReferenceProps: O, getFloatingProps: M, slot: se } }, t));
|
|
@@ -24457,7 +24457,7 @@ function W$(t, r) {
|
|
|
24457
24457
|
return { ...t, gap: f, offset: p, padding: y };
|
|
24458
24458
|
}
|
|
24459
24459
|
function Rx(t, r, i = void 0) {
|
|
24460
|
-
let s = Vh(), c =
|
|
24460
|
+
let s = Vh(), c = vt((g, T) => {
|
|
24461
24461
|
if (g == null)
|
|
24462
24462
|
return [i, null];
|
|
24463
24463
|
if (typeof g == "number")
|
|
@@ -24527,8 +24527,8 @@ function qk({ children: t }) {
|
|
|
24527
24527
|
return Le.createElement(jb.Provider, { value: null }, t);
|
|
24528
24528
|
}
|
|
24529
24529
|
function G$(t) {
|
|
24530
|
-
let r =
|
|
24531
|
-
|
|
24530
|
+
let r = vt(t), i = Ot(!1);
|
|
24531
|
+
ht(() => (i.current = !1, () => {
|
|
24532
24532
|
i.current = !0, xE(() => {
|
|
24533
24533
|
i.current && r();
|
|
24534
24534
|
});
|
|
@@ -24564,9 +24564,9 @@ function X$(t) {
|
|
|
24564
24564
|
let g = s.createElement("div");
|
|
24565
24565
|
return g.setAttribute("id", "headlessui-portal-root"), s.body.appendChild(g);
|
|
24566
24566
|
});
|
|
24567
|
-
return
|
|
24567
|
+
return ht(() => {
|
|
24568
24568
|
c !== null && (s != null && s.body.contains(c) || s == null || s.body.appendChild(c));
|
|
24569
|
-
}, [c, s]),
|
|
24569
|
+
}, [c, s]), ht(() => {
|
|
24570
24570
|
r || i !== null && f(i.current);
|
|
24571
24571
|
}, [i, f, r]), c;
|
|
24572
24572
|
}
|
|
@@ -24598,7 +24598,7 @@ function eB(t, r) {
|
|
|
24598
24598
|
}
|
|
24599
24599
|
let tE = wn(null);
|
|
24600
24600
|
function tB() {
|
|
24601
|
-
let t = Jt(tE), r = Ot([]), i =
|
|
24601
|
+
let t = Jt(tE), r = Ot([]), i = vt((f) => (r.current.push(f), t && t.register(f), () => s(f))), s = vt((f) => {
|
|
24602
24602
|
let p = r.current.indexOf(f);
|
|
24603
24603
|
p !== -1 && r.current.splice(p, 1), t && t.unregister(f);
|
|
24604
24604
|
}), c = He(() => ({ register: i, unregister: s, portals: r }), [i, s, r]);
|
|
@@ -24608,7 +24608,7 @@ function tB() {
|
|
|
24608
24608
|
}
|
|
24609
24609
|
let nB = ar(Z$), rB = ar(eB), aB = Object.assign(nB, { Group: rB });
|
|
24610
24610
|
function iB({ defaultContainers: t = [], portals: r, mainTreeNode: i } = {}) {
|
|
24611
|
-
let s = Wh(i), c =
|
|
24611
|
+
let s = Wh(i), c = vt(() => {
|
|
24612
24612
|
var f, p;
|
|
24613
24613
|
let y = [];
|
|
24614
24614
|
for (let g of t)
|
|
@@ -24620,7 +24620,7 @@ function iB({ defaultContainers: t = [], portals: r, mainTreeNode: i } = {}) {
|
|
|
24620
24620
|
g !== document.body && g !== document.head && g instanceof HTMLElement && g.id !== "headlessui-portal-root" && (i && (g.contains(i) || g.contains((p = i == null ? void 0 : i.getRootNode()) == null ? void 0 : p.host)) || y.some((T) => g.contains(T)) || y.push(g));
|
|
24621
24621
|
return y;
|
|
24622
24622
|
});
|
|
24623
|
-
return { resolveContainers: c, contains:
|
|
24623
|
+
return { resolveContainers: c, contains: vt((f) => c().some((p) => p.contains(f))) };
|
|
24624
24624
|
}
|
|
24625
24625
|
let Kk = wn(null);
|
|
24626
24626
|
function Zk({ children: t, node: r }) {
|
|
@@ -24678,7 +24678,7 @@ function Vb(t) {
|
|
|
24678
24678
|
return "children" in t ? Vb(t.children) : t.current.filter(({ el: r }) => r.current !== null).filter(({ state: r }) => r === "visible").length > 0;
|
|
24679
24679
|
}
|
|
24680
24680
|
function r_(t, r) {
|
|
24681
|
-
let i = Jo(t), s = Ot([]), c = e_(), f = Vh(), p =
|
|
24681
|
+
let i = Jo(t), s = Ot([]), c = e_(), f = Vh(), p = vt((C, P = Kd.Hidden) => {
|
|
24682
24682
|
let $ = s.current.findIndex(({ el: B }) => B === C);
|
|
24683
24683
|
$ !== -1 && (ta(P, { [Kd.Unmount]() {
|
|
24684
24684
|
s.current.splice($, 1);
|
|
@@ -24688,16 +24688,16 @@ function r_(t, r) {
|
|
|
24688
24688
|
var B;
|
|
24689
24689
|
!Vb(s) && c.current && ((B = i.current) == null || B.call(i));
|
|
24690
24690
|
}));
|
|
24691
|
-
}), y =
|
|
24691
|
+
}), y = vt((C) => {
|
|
24692
24692
|
let P = s.current.find(({ el: $ }) => $ === C);
|
|
24693
24693
|
return P ? P.state !== "visible" && (P.state = "visible") : s.current.push({ el: C, state: "visible" }), () => p(C, Kd.Unmount);
|
|
24694
|
-
}), g = Ot([]), T = Ot(Promise.resolve()), S = Ot({ enter: [], leave: [] }), R =
|
|
24694
|
+
}), g = Ot([]), T = Ot(Promise.resolve()), S = Ot({ enter: [], leave: [] }), R = vt((C, P, $) => {
|
|
24695
24695
|
g.current.splice(0), r && (r.chains.current[P] = r.chains.current[P].filter(([B]) => B !== C)), r == null || r.chains.current[P].push([C, new Promise((B) => {
|
|
24696
24696
|
g.current.push(B);
|
|
24697
24697
|
})]), r == null || r.chains.current[P].push([C, new Promise((B) => {
|
|
24698
24698
|
Promise.all(S.current[P].map(([Y, U]) => U)).then(() => B());
|
|
24699
24699
|
})]), P === "enter" ? T.current = T.current.then(() => r == null ? void 0 : r.wait.current).then(() => $(P)) : $(P);
|
|
24700
|
-
}), A =
|
|
24700
|
+
}), A = vt((C, P, $) => {
|
|
24701
24701
|
Promise.all(S.current[P].splice(0).map(([B, Y]) => Y)).then(() => {
|
|
24702
24702
|
var B;
|
|
24703
24703
|
(B = g.current.shift()) == null || B();
|
|
@@ -24725,19 +24725,19 @@ function uB(t, r) {
|
|
|
24725
24725
|
}, [Y, O, V, U]);
|
|
24726
24726
|
let Q = ue && !se, z = se && re && ue, G = Ot(!1), J = r_(() => {
|
|
24727
24727
|
G.current || (M("hidden"), K(Y));
|
|
24728
|
-
}, F), L =
|
|
24728
|
+
}, F), L = vt((Pe) => {
|
|
24729
24729
|
G.current = !0;
|
|
24730
24730
|
let Ye = Pe ? "enter" : "leave";
|
|
24731
24731
|
J.onStart(Y, Ye, (Ge) => {
|
|
24732
24732
|
Ge === "enter" ? f == null || f() : Ge === "leave" && (y == null || y());
|
|
24733
24733
|
});
|
|
24734
|
-
}), H =
|
|
24734
|
+
}), H = vt((Pe) => {
|
|
24735
24735
|
let Ye = Pe ? "enter" : "leave";
|
|
24736
24736
|
G.current = !1, J.onStop(Y, Ye, (Ge) => {
|
|
24737
24737
|
Ge === "enter" ? p == null || p() : Ge === "leave" && (g == null || g());
|
|
24738
24738
|
}), Ye === "leave" && !Vb(J) && (M("hidden"), K(Y));
|
|
24739
24739
|
});
|
|
24740
|
-
|
|
24740
|
+
ht(() => {
|
|
24741
24741
|
U && c || (L(re), H(re));
|
|
24742
24742
|
}, [re, U, c]);
|
|
24743
24743
|
let le = (() => !(!c || !U || !V || Q))(), [, ye] = Ib(le, Y, re, { start: L, end: H }), Ce = Qd({ ref: Z, className: ((s = Xx(B.className, z && T, z && S, ye.enter && T, ye.enter && ye.closed && S, ye.enter && !ye.closed && R, ye.leave && C, ye.leave && !ye.closed && P, ye.leave && ye.closed && $, !ye.transition && re && A)) == null ? void 0 : s.trim()) || void 0, ...Fb(ye) }), Ue = 0;
|
|
@@ -24759,10 +24759,10 @@ function cB(t, r) {
|
|
|
24759
24759
|
Ok(i, p, () => R("hidden")), qn(() => {
|
|
24760
24760
|
i ? R("visible") : !Vb(A) && p.current !== null && R("hidden");
|
|
24761
24761
|
}, [i, A]);
|
|
24762
|
-
let Y = { unmount: c }, U =
|
|
24762
|
+
let Y = { unmount: c }, U = vt(() => {
|
|
24763
24763
|
var ne;
|
|
24764
24764
|
C && P(!1), (ne = t.beforeEnter) == null || ne.call(t);
|
|
24765
|
-
}), Z =
|
|
24765
|
+
}), Z = vt(() => {
|
|
24766
24766
|
var ne;
|
|
24767
24767
|
C && P(!1), (ne = t.beforeLeave) == null || ne.call(t);
|
|
24768
24768
|
});
|
|
@@ -24818,7 +24818,7 @@ let bB = $l;
|
|
|
24818
24818
|
function TB(t, r) {
|
|
24819
24819
|
let { defaultOpen: i = !1, ...s } = t, c = Ot(null), f = _r(r, CE((B) => {
|
|
24820
24820
|
c.current = B;
|
|
24821
|
-
}, t.as === void 0 || t.as === $l)), p = Ot(null), y = Ot(null), g = zh(wB, { disclosureState: i ? 0 : 1, linkedPanel: !1, buttonRef: y, panelRef: p, buttonId: null, panelId: null }), [{ disclosureState: T, buttonId: S }, R] = g, A =
|
|
24821
|
+
}, t.as === void 0 || t.as === $l)), p = Ot(null), y = Ot(null), g = zh(wB, { disclosureState: i ? 0 : 1, linkedPanel: !1, buttonRef: y, panelRef: p, buttonId: null, panelId: null }), [{ disclosureState: T, buttonId: S }, R] = g, A = vt((B) => {
|
|
24822
24822
|
R({ type: 1 });
|
|
24823
24823
|
let Y = Fp(c);
|
|
24824
24824
|
if (!Y || !S)
|
|
@@ -24831,13 +24831,13 @@ function TB(t, r) {
|
|
|
24831
24831
|
let SB = "button";
|
|
24832
24832
|
function xB(t, r) {
|
|
24833
24833
|
let i = tl(), { id: s = `headlessui-disclosure-button-${i}`, disabled: c = !1, autoFocus: f = !1, ...p } = t, [y, g] = PE("Disclosure.Button"), T = gB(), S = T === null ? !1 : T === y.panelId, R = Ot(null), A = _r(R, r, S ? null : y.buttonRef), C = EE();
|
|
24834
|
-
|
|
24834
|
+
ht(() => {
|
|
24835
24835
|
if (!S)
|
|
24836
24836
|
return g({ type: 2, buttonId: s }), () => {
|
|
24837
24837
|
g({ type: 2, buttonId: null });
|
|
24838
24838
|
};
|
|
24839
24839
|
}, [s, g, S]);
|
|
24840
|
-
let P =
|
|
24840
|
+
let P = vt((F) => {
|
|
24841
24841
|
var W;
|
|
24842
24842
|
if (S) {
|
|
24843
24843
|
if (y.disclosureState === 1)
|
|
@@ -24855,13 +24855,13 @@ function xB(t, r) {
|
|
|
24855
24855
|
F.preventDefault(), F.stopPropagation(), g({ type: 0 });
|
|
24856
24856
|
break;
|
|
24857
24857
|
}
|
|
24858
|
-
}), $ =
|
|
24858
|
+
}), $ = vt((F) => {
|
|
24859
24859
|
switch (F.key) {
|
|
24860
24860
|
case rr.Space:
|
|
24861
24861
|
F.preventDefault();
|
|
24862
24862
|
break;
|
|
24863
24863
|
}
|
|
24864
|
-
}), B =
|
|
24864
|
+
}), B = vt((F) => {
|
|
24865
24865
|
var W;
|
|
24866
24866
|
_b(F.currentTarget) || c || (S ? (g({ type: 0 }), (W = y.buttonRef.current) == null || W.focus()) : g({ type: 0 }));
|
|
24867
24867
|
}), { isFocusVisible: Y, focusProps: U } = mg({ autoFocus: f }), { isHovered: Z, hoverProps: ne } = Ab({ isDisabled: c }), { pressed: re, pressProps: se } = Ob({ disabled: c }), ue = He(() => ({ open: y.disclosureState === 0, hover: Z, active: re, disabled: c, focus: Y, autofocus: f }), [y, Z, re, Y, c, f]), O = Lb(t, R), M = nf(S ? { ref: A, type: O, disabled: c || void 0, autoFocus: f, onKeyDown: P, onClick: B } : { ref: A, id: s, type: O, "aria-expanded": y.disclosureState === 0, "aria-controls": y.linkedPanel ? y.panelId : void 0, disabled: c || void 0, autoFocus: f, onKeyDown: P, onKeyUp: $, onClick: B }, U, ne, se);
|
|
@@ -24872,7 +24872,7 @@ function RB(t, r) {
|
|
|
24872
24872
|
let i = tl(), { id: s = `headlessui-disclosure-panel-${i}`, transition: c = !1, ...f } = t, [p, y] = PE("Disclosure.Panel"), { close: g } = l_("Disclosure.Panel"), T = EE(), S = _r(r, p.panelRef, (B) => {
|
|
24873
24873
|
mB(() => y({ type: B ? 4 : 5 }));
|
|
24874
24874
|
});
|
|
24875
|
-
|
|
24875
|
+
ht(() => (y({ type: 3, panelId: s }), () => {
|
|
24876
24876
|
y({ type: 3, panelId: null });
|
|
24877
24877
|
}), [s, y]);
|
|
24878
24878
|
let R = gg(), [A, C] = Ib(c, p.panelRef, R !== null ? (R & ri.Open) === ri.Open : p.disclosureState === 0), P = He(() => ({ open: p.disclosureState === 0, close: g }), [p.disclosureState, g]), $ = { ref: S, id: s, ...Fb(C) };
|
|
@@ -24941,11 +24941,11 @@ function UB(t, r) {
|
|
|
24941
24941
|
return !0;
|
|
24942
24942
|
let L = Pb(), H = L.indexOf(S), le = (H + L.length - 1) % L.length, ye = (H + 1) % L.length, Ce = L[le], Ue = L[ye];
|
|
24943
24943
|
return !A.contains(Ce) && !A.contains(Ue);
|
|
24944
|
-
}, [S, A]), ne = Jo(R), re = Jo(C), se = He(() => ({ buttonId: ne, panelId: re, close: () => Y({ type: 1 }) }), [ne, re, Y]), ue = c_(), O = ue == null ? void 0 : ue.registerPopover, M =
|
|
24944
|
+
}, [S, A]), ne = Jo(R), re = Jo(C), se = He(() => ({ buttonId: ne, panelId: re, close: () => Y({ type: 1 }) }), [ne, re, Y]), ue = c_(), O = ue == null ? void 0 : ue.registerPopover, M = vt(() => {
|
|
24945
24945
|
var L;
|
|
24946
24946
|
return (L = ue == null ? void 0 : ue.isFocusWithinPopoverGroup()) != null ? L : (U == null ? void 0 : U.activeElement) && ((S == null ? void 0 : S.contains(U.activeElement)) || (A == null ? void 0 : A.contains(U.activeElement)));
|
|
24947
24947
|
});
|
|
24948
|
-
|
|
24948
|
+
ht(() => O == null ? void 0 : O(se), [O, se]);
|
|
24949
24949
|
let [F, W] = tB(), K = Jk(S), V = iB({ mainTreeNode: K, portals: F, defaultContainers: [S, A] });
|
|
24950
24950
|
b4(U == null ? void 0 : U.defaultView, "focus", (L) => {
|
|
24951
24951
|
var H, le, ye, Ce, Ue, Pe;
|
|
@@ -24953,7 +24953,7 @@ function UB(t, r) {
|
|
|
24953
24953
|
}, !0), w4(T === 0, V.resolveContainers, (L, H) => {
|
|
24954
24954
|
Y({ type: 1 }), kk(H, RE.Loose) || (L.preventDefault(), S == null || S.focus());
|
|
24955
24955
|
});
|
|
24956
|
-
let Q =
|
|
24956
|
+
let Q = vt((L) => {
|
|
24957
24957
|
Y({ type: 1 });
|
|
24958
24958
|
let H = (() => L ? L instanceof HTMLElement ? L : "current" in L && L.current instanceof HTMLElement ? L.current : S : S)();
|
|
24959
24959
|
H == null || H.focus();
|
|
@@ -24963,7 +24963,7 @@ function UB(t, r) {
|
|
|
24963
24963
|
let $B = "button";
|
|
24964
24964
|
function BB(t, r) {
|
|
24965
24965
|
let i = tl(), { id: s = `headlessui-popover-button-${i}`, disabled: c = !1, autoFocus: f = !1, ...p } = t, [y, g] = Wb("Popover.Button"), { isPortalled: T } = UE("Popover.Button"), S = Ot(null), R = `headlessui-focus-sentinel-${tl()}`, A = c_(), C = A == null ? void 0 : A.closeOthers, P = LB() !== null;
|
|
24966
|
-
|
|
24966
|
+
ht(() => {
|
|
24967
24967
|
if (!P)
|
|
24968
24968
|
return g({ type: 3, buttonId: s }), () => {
|
|
24969
24969
|
g({ type: 3, buttonId: null });
|
|
@@ -24977,7 +24977,7 @@ function BB(t, r) {
|
|
|
24977
24977
|
le !== -1 && y.buttons.current.splice(le, 1);
|
|
24978
24978
|
}
|
|
24979
24979
|
y.buttons.current.length > 1 && console.warn("You are already using a <Popover.Button /> but only 1 <Popover.Button /> is supported."), H && g({ type: 2, button: H });
|
|
24980
|
-
}), Y = _r(S, r), U = Wh(S), Z =
|
|
24980
|
+
}), Y = _r(S, r), U = Wh(S), Z = vt((H) => {
|
|
24981
24981
|
var le, ye, Ce;
|
|
24982
24982
|
if (P) {
|
|
24983
24983
|
if (y.popoverState === 1)
|
|
@@ -25002,14 +25002,14 @@ function BB(t, r) {
|
|
|
25002
25002
|
H.preventDefault(), H.stopPropagation(), g({ type: 1 });
|
|
25003
25003
|
break;
|
|
25004
25004
|
}
|
|
25005
|
-
}), ne =
|
|
25005
|
+
}), ne = vt((H) => {
|
|
25006
25006
|
P || H.key === rr.Space && H.preventDefault();
|
|
25007
|
-
}), re =
|
|
25007
|
+
}), re = vt((H) => {
|
|
25008
25008
|
var le, ye;
|
|
25009
25009
|
_b(H.currentTarget) || c || (P ? (g({ type: 1 }), (le = y.button) == null || le.focus()) : (H.preventDefault(), H.stopPropagation(), y.popoverState === 1 && (C == null || C(y.buttonId)), g({ type: 0 }), (ye = y.button) == null || ye.focus()));
|
|
25010
|
-
}), se =
|
|
25010
|
+
}), se = vt((H) => {
|
|
25011
25011
|
H.preventDefault(), H.stopPropagation();
|
|
25012
|
-
}), { isFocusVisible: ue, focusProps: O } = mg({ autoFocus: f }), { isHovered: M, hoverProps: F } = Ab({ isDisabled: c }), { pressed: W, pressProps: K } = Ob({ disabled: c }), V = y.popoverState === 0, Q = He(() => ({ open: V, active: W || V, disabled: c, hover: M, focus: ue, autofocus: f }), [V, M, ue, W, c, f]), z = Lb(t, S), G = nf(P ? { ref: Y, type: z, onKeyDown: Z, onClick: re, disabled: c || void 0, autoFocus: f } : { ref: B, id: y.buttonId, type: z, "aria-expanded": y.popoverState === 0, "aria-controls": y.panel ? y.panelId : void 0, disabled: c || void 0, autoFocus: f, onKeyDown: Z, onKeyUp: ne, onClick: re, onMouseDown: se }, O, F, K), J = t_(), L =
|
|
25012
|
+
}), { isFocusVisible: ue, focusProps: O } = mg({ autoFocus: f }), { isHovered: M, hoverProps: F } = Ab({ isDisabled: c }), { pressed: W, pressProps: K } = Ob({ disabled: c }), V = y.popoverState === 0, Q = He(() => ({ open: V, active: W || V, disabled: c, hover: M, focus: ue, autofocus: f }), [V, M, ue, W, c, f]), z = Lb(t, S), G = nf(P ? { ref: Y, type: z, onKeyDown: Z, onClick: re, disabled: c || void 0, autoFocus: f } : { ref: B, id: y.buttonId, type: z, "aria-expanded": y.popoverState === 0, "aria-controls": y.panel ? y.panelId : void 0, disabled: c || void 0, autoFocus: f, onKeyDown: Z, onKeyUp: ne, onClick: re, onMouseDown: se }, O, F, K), J = t_(), L = vt(() => {
|
|
25013
25013
|
let H = y.panel;
|
|
25014
25014
|
if (!H)
|
|
25015
25015
|
return;
|
|
@@ -25022,7 +25022,7 @@ function BB(t, r) {
|
|
|
25022
25022
|
}
|
|
25023
25023
|
let jB = "div", zB = Cu.RenderStrategy | Cu.Static;
|
|
25024
25024
|
function d_(t, r) {
|
|
25025
|
-
let i = tl(), { id: s = `headlessui-popover-backdrop-${i}`, transition: c = !1, ...f } = t, [{ popoverState: p }, y] = Wb("Popover.Backdrop"), g = Ot(null), T = _r(r, g), S = gg(), [R, A] = Ib(c, g, S !== null ? (S & ri.Open) === ri.Open : p === 0), C =
|
|
25025
|
+
let i = tl(), { id: s = `headlessui-popover-backdrop-${i}`, transition: c = !1, ...f } = t, [{ popoverState: p }, y] = Wb("Popover.Backdrop"), g = Ot(null), T = _r(r, g), S = gg(), [R, A] = Ib(c, g, S !== null ? (S & ri.Open) === ri.Open : p === 0), C = vt((B) => {
|
|
25026
25026
|
if (_b(B.currentTarget))
|
|
25027
25027
|
return B.preventDefault();
|
|
25028
25028
|
y({ type: 1 });
|
|
@@ -25045,7 +25045,7 @@ function WB(t, r) {
|
|
|
25045
25045
|
});
|
|
25046
25046
|
let W = S.__demoMode ? !1 : y && M;
|
|
25047
25047
|
R4(W, se);
|
|
25048
|
-
let K =
|
|
25048
|
+
let K = vt((L) => {
|
|
25049
25049
|
var H;
|
|
25050
25050
|
switch (L.key) {
|
|
25051
25051
|
case rr.Escape:
|
|
@@ -25055,10 +25055,10 @@ function WB(t, r) {
|
|
|
25055
25055
|
break;
|
|
25056
25056
|
}
|
|
25057
25057
|
});
|
|
25058
|
-
|
|
25058
|
+
ht(() => {
|
|
25059
25059
|
var L;
|
|
25060
25060
|
t.static || S.popoverState === 1 && ((L = t.unmount) == null || L) && R({ type: 4, panel: null });
|
|
25061
|
-
}, [S.popoverState, t.unmount, t.static, R]),
|
|
25061
|
+
}, [S.popoverState, t.unmount, t.static, R]), ht(() => {
|
|
25062
25062
|
if (S.__demoMode || !c || S.popoverState !== 0 || !B.current)
|
|
25063
25063
|
return;
|
|
25064
25064
|
let L = se == null ? void 0 : se.activeElement;
|
|
@@ -25068,7 +25068,7 @@ function WB(t, r) {
|
|
|
25068
25068
|
var H, le, ye, Ce, Ue;
|
|
25069
25069
|
let Pe = L.relatedTarget;
|
|
25070
25070
|
Pe && B.current && ((H = B.current) != null && H.contains(Pe) || (R({ type: 1 }), ((ye = (le = S.beforePanelSentinel.current) == null ? void 0 : le.contains) != null && ye.call(le, Pe) || (Ue = (Ce = S.afterPanelSentinel.current) == null ? void 0 : Ce.contains) != null && Ue.call(Ce, Pe)) && Pe.focus({ preventScroll: !0 })));
|
|
25071
|
-
} : void 0, tabIndex: -1, style: { ...T.style, ...Z, "--button-width": s4(S.button, !0).width }, ...Fb(F) }), z = t_(), G =
|
|
25071
|
+
} : void 0, tabIndex: -1, style: { ...T.style, ...Z, "--button-width": s4(S.button, !0).width }, ...Fb(F) }), z = t_(), G = vt(() => {
|
|
25072
25072
|
let L = B.current;
|
|
25073
25073
|
if (!L)
|
|
25074
25074
|
return;
|
|
@@ -25082,7 +25082,7 @@ function WB(t, r) {
|
|
|
25082
25082
|
} });
|
|
25083
25083
|
}
|
|
25084
25084
|
H();
|
|
25085
|
-
}), J =
|
|
25085
|
+
}), J = vt(() => {
|
|
25086
25086
|
let L = B.current;
|
|
25087
25087
|
if (!L)
|
|
25088
25088
|
return;
|
|
@@ -25109,7 +25109,7 @@ function WB(t, r) {
|
|
|
25109
25109
|
}
|
|
25110
25110
|
let GB = "div";
|
|
25111
25111
|
function YB(t, r) {
|
|
25112
|
-
let i = Ot(null), s = _r(i, r), [c, f] = Yt([]), p =
|
|
25112
|
+
let i = Ot(null), s = _r(i, r), [c, f] = Yt([]), p = vt((P) => {
|
|
25113
25113
|
f(($) => {
|
|
25114
25114
|
let B = $.indexOf(P);
|
|
25115
25115
|
if (B !== -1) {
|
|
@@ -25118,7 +25118,7 @@ function YB(t, r) {
|
|
|
25118
25118
|
}
|
|
25119
25119
|
return $;
|
|
25120
25120
|
});
|
|
25121
|
-
}), y =
|
|
25121
|
+
}), y = vt((P) => (f(($) => [...$, P]), () => p(P))), g = vt(() => {
|
|
25122
25122
|
var P;
|
|
25123
25123
|
let $ = Fp(i);
|
|
25124
25124
|
if (!$)
|
|
@@ -25128,7 +25128,7 @@ function YB(t, r) {
|
|
|
25128
25128
|
var U, Z;
|
|
25129
25129
|
return ((U = $.getElementById(Y.buttonId.current)) == null ? void 0 : U.contains(B)) || ((Z = $.getElementById(Y.panelId.current)) == null ? void 0 : Z.contains(B));
|
|
25130
25130
|
});
|
|
25131
|
-
}), T =
|
|
25131
|
+
}), T = vt((P) => {
|
|
25132
25132
|
for (let $ of c)
|
|
25133
25133
|
$.buttonId.current !== P && $.close();
|
|
25134
25134
|
}), S = He(() => ({ registerPopover: y, unregisterPopover: p, isFocusWithinPopoverGroup: g, closeOthers: T }), [y, p, g, T]), R = He(() => ({}), []), A = t, C = { ref: s };
|
|
@@ -25147,17 +25147,17 @@ function JB(t) {
|
|
|
25147
25147
|
let ej = "button";
|
|
25148
25148
|
function tj(t, r) {
|
|
25149
25149
|
var i;
|
|
25150
|
-
let s = tl(), c = yk(), f = kb(), { id: p = c || `headlessui-switch-${s}`, disabled: y = f || !1, checked: g, defaultChecked: T, onChange: S, name: R, value: A, form: C, autoFocus: P = !1, ...$ } = t, B = Jt(BE), Y = Ot(null), U = _r(Y, r, B === null ? null : B.setSwitch), Z = zU(T), [ne, re] = jU(g, S, Z ?? !1), se = Vh(), [ue, O] = Yt(!1), M =
|
|
25150
|
+
let s = tl(), c = yk(), f = kb(), { id: p = c || `headlessui-switch-${s}`, disabled: y = f || !1, checked: g, defaultChecked: T, onChange: S, name: R, value: A, form: C, autoFocus: P = !1, ...$ } = t, B = Jt(BE), Y = Ot(null), U = _r(Y, r, B === null ? null : B.setSwitch), Z = zU(T), [ne, re] = jU(g, S, Z ?? !1), se = Vh(), [ue, O] = Yt(!1), M = vt(() => {
|
|
25151
25151
|
O(!0), re == null || re(!ne), se.nextFrame(() => {
|
|
25152
25152
|
O(!1);
|
|
25153
25153
|
});
|
|
25154
|
-
}), F =
|
|
25154
|
+
}), F = vt((Pe) => {
|
|
25155
25155
|
if (_b(Pe.currentTarget))
|
|
25156
25156
|
return Pe.preventDefault();
|
|
25157
25157
|
Pe.preventDefault(), M();
|
|
25158
|
-
}), W =
|
|
25158
|
+
}), W = vt((Pe) => {
|
|
25159
25159
|
Pe.key === rr.Space ? (Pe.preventDefault(), M()) : Pe.key === rr.Enter && HU(Pe.currentTarget);
|
|
25160
|
-
}), K =
|
|
25160
|
+
}), K = vt((Pe) => Pe.preventDefault()), V = Sk(), Q = ZU(), { isFocusVisible: z, focusProps: G } = mg({ autoFocus: P }), { isHovered: J, hoverProps: L } = Ab({ isDisabled: y }), { pressed: H, pressProps: le } = Ob({ disabled: y }), ye = He(() => ({ checked: ne, disabled: y, hover: J, focus: z, active: H, autofocus: P, changing: ue }), [ne, J, z, H, y, ue, P]), Ce = nf({ id: p, ref: U, role: "switch", type: Lb(t, Y), tabIndex: t.tabIndex === -1 ? 0 : (i = t.tabIndex) != null ? i : 0, "aria-checked": ne, "aria-labelledby": V, "aria-describedby": Q, disabled: y || void 0, autoFocus: P, onClick: F, onKeyUp: W, onKeyPress: K }, G, L, le), Ue = _t(() => {
|
|
25161
25161
|
if (Z !== void 0)
|
|
25162
25162
|
return re == null ? void 0 : re(Z);
|
|
25163
25163
|
}, [re, Z]);
|
|
@@ -25270,7 +25270,7 @@ function vj(t, r) {
|
|
|
25270
25270
|
let { defaultIndex: i = 0, vertical: s = !1, manual: c = !1, onChange: f, selectedIndex: p = null, ...y } = t;
|
|
25271
25271
|
const g = s ? "vertical" : "horizontal", T = c ? "manual" : "auto";
|
|
25272
25272
|
let S = p !== null, R = Jo({ isControlled: S }), A = _r(r), [C, P] = zh(mj, { info: R, selectedIndex: p ?? i, tabs: [], panels: [] }), $ = He(() => ({ selectedIndex: C.selectedIndex }), [C.selectedIndex]), B = Jo(f || (() => {
|
|
25273
|
-
})), Y = Jo(C.tabs), U = He(() => ({ orientation: g, activation: T, ...C }), [g, T, C]), Z =
|
|
25273
|
+
})), Y = Jo(C.tabs), U = He(() => ({ orientation: g, activation: T, ...C }), [g, T, C]), Z = vt((M) => (P({ type: 1, tab: M }), () => P({ type: 2, tab: M }))), ne = vt((M) => (P({ type: 3, panel: M }), () => P({ type: 4, panel: M }))), re = vt((M) => {
|
|
25274
25274
|
se.current !== M && B.current(M), S || P({ type: 0, index: M });
|
|
25275
25275
|
}), se = Jo(S ? t.selectedIndex : C.selectedIndex), ue = He(() => ({ registerTab: Z, registerPanel: ne, change: re }), []);
|
|
25276
25276
|
qn(() => {
|
|
@@ -25302,7 +25302,7 @@ function bj(t, r) {
|
|
|
25302
25302
|
qn(() => P.registerTab(B), [P, B]);
|
|
25303
25303
|
let U = v_("tabs"), Z = A.indexOf(B);
|
|
25304
25304
|
Z === -1 && (Z = U);
|
|
25305
|
-
let ne = Z === R, re =
|
|
25305
|
+
let ne = Z === R, re = vt((L) => {
|
|
25306
25306
|
var H;
|
|
25307
25307
|
let le = L();
|
|
25308
25308
|
if (le === Zd.Success && S === "auto") {
|
|
@@ -25310,7 +25310,7 @@ function bj(t, r) {
|
|
|
25310
25310
|
Ce !== -1 && P.change(Ce);
|
|
25311
25311
|
}
|
|
25312
25312
|
return le;
|
|
25313
|
-
}), se =
|
|
25313
|
+
}), se = vt((L) => {
|
|
25314
25314
|
let H = A.map((le) => le.current).filter(Boolean);
|
|
25315
25315
|
if (L.key === rr.Space || L.key === rr.Enter) {
|
|
25316
25316
|
L.preventDefault(), L.stopPropagation(), P.change(Z);
|
|
@@ -25330,12 +25330,12 @@ function bj(t, r) {
|
|
|
25330
25330
|
return L.key === rr.ArrowLeft ? Ko(H, Ta.Previous | Ta.WrapAround) : L.key === rr.ArrowRight ? Ko(H, Ta.Next | Ta.WrapAround) : Zd.Error;
|
|
25331
25331
|
} })) === Zd.Success)
|
|
25332
25332
|
return L.preventDefault();
|
|
25333
|
-
}), ue = Ot(!1), O =
|
|
25333
|
+
}), ue = Ot(!1), O = vt(() => {
|
|
25334
25334
|
var L;
|
|
25335
25335
|
ue.current || (ue.current = !0, (L = B.current) == null || L.focus({ preventScroll: !0 }), P.change(Z), xE(() => {
|
|
25336
25336
|
ue.current = !1;
|
|
25337
25337
|
}));
|
|
25338
|
-
}), M =
|
|
25338
|
+
}), M = vt((L) => {
|
|
25339
25339
|
L.preventDefault();
|
|
25340
25340
|
}), { isFocusVisible: F, focusProps: W } = mg({ autoFocus: y }), { isHovered: K, hoverProps: V } = Ab({ isDisabled: p }), { pressed: Q, pressProps: z } = Ob({ disabled: p }), G = He(() => ({ selected: ne, hover: K, active: Q, focus: F, autofocus: y, disabled: p }), [ne, K, F, Q, y, p]), J = nf({ ref: Y, onKeyDown: se, onMouseDown: M, onClick: O, id: f, role: "tab", type: Lb(t, B), "aria-controls": (s = (i = C[Z]) == null ? void 0 : i.current) == null ? void 0 : s.id, "aria-selected": ne, tabIndex: ne ? 0 : -1, disabled: p || void 0, autoFocus: y }, W, V, z);
|
|
25341
25341
|
return ur({ ourProps: J, theirProps: g, slot: G, defaultTag: wj, name: "Tabs.Tab" });
|
|
@@ -31853,7 +31853,7 @@ const pO = {
|
|
|
31853
31853
|
}
|
|
31854
31854
|
}), Uq = () => {
|
|
31855
31855
|
const { account: t } = Ia(), [r, i] = Yt(!1);
|
|
31856
|
-
return
|
|
31856
|
+
return ht(() => {
|
|
31857
31857
|
i(!!t);
|
|
31858
31858
|
}, [t]), r;
|
|
31859
31859
|
}, e9 = (t) => R3({
|
|
@@ -32908,7 +32908,7 @@ const Jb = (t, r) => t / r * 100, Sg = (t, r = St) => new it(t).shiftedBy(-r).to
|
|
|
32908
32908
|
staleTime: 3e4
|
|
32909
32909
|
}
|
|
32910
32910
|
}), lg = (t) => {
|
|
32911
|
-
|
|
32911
|
+
ht(() => {
|
|
32912
32912
|
t && t.forEach(({ error: r, status: i }) => {
|
|
32913
32913
|
i === "failure" && console.warn(r == null ? void 0 : r.message);
|
|
32914
32914
|
});
|
|
@@ -32917,7 +32917,7 @@ const Jb = (t, r) => t / r * 100, Sg = (t, r = St) => new it(t).shiftedBy(-r).to
|
|
|
32917
32917
|
error: t,
|
|
32918
32918
|
status: r
|
|
32919
32919
|
}) => {
|
|
32920
|
-
|
|
32920
|
+
ht(() => {
|
|
32921
32921
|
t && r === "failure" && console.warn(t == null ? void 0 : t.message);
|
|
32922
32922
|
}, [t, r]);
|
|
32923
32923
|
}, EM = ({
|
|
@@ -32955,7 +32955,7 @@ const Jb = (t, r) => t / r * 100, Sg = (t, r = St) => new it(t).shiftedBy(-r).to
|
|
|
32955
32955
|
refetchInterval: eM
|
|
32956
32956
|
}
|
|
32957
32957
|
});
|
|
32958
|
-
|
|
32958
|
+
ht(() => {
|
|
32959
32959
|
r && i.refetchQueries({ queryKey: t, stale: !0 });
|
|
32960
32960
|
}, [r, s]);
|
|
32961
32961
|
}, E9 = [
|
|
@@ -34607,7 +34607,7 @@ const SO = (t) => t ? `https://raw.githubusercontent.com/dhedge/crypto-icons/mai
|
|
|
34607
34607
|
}
|
|
34608
34608
|
}, VV = (t = []) => {
|
|
34609
34609
|
const [r, i] = Yt([]), [s, c] = Yt([]);
|
|
34610
|
-
return
|
|
34610
|
+
return ht(() => {
|
|
34611
34611
|
if (t.every((p) => s.includes(p)))
|
|
34612
34612
|
return;
|
|
34613
34613
|
(async () => {
|
|
@@ -34916,7 +34916,14 @@ const iW = /* @__PURE__ */ we.forwardRef(aW), oW = iW, qM = ({
|
|
|
34916
34916
|
transparent: i = !1,
|
|
34917
34917
|
centered: s = !0,
|
|
34918
34918
|
onClose: c
|
|
34919
|
-
}) =>
|
|
34919
|
+
}) => (ht(() => {
|
|
34920
|
+
const f = (p) => {
|
|
34921
|
+
p.key === "Escape" && (c == null || c());
|
|
34922
|
+
};
|
|
34923
|
+
return window.addEventListener("keydown", f), () => {
|
|
34924
|
+
window.removeEventListener("keydown", f);
|
|
34925
|
+
};
|
|
34926
|
+
}, [c]), /* @__PURE__ */ N.jsx("div", { className: "dtw-absolute dtw-top-0 dtw-inset-0 dtw-rounded-xl dtw-backdrop-blur-md dtw-backdrop-brightness-75 dtw-backdrop-filter dtw-p-4", children: /* @__PURE__ */ N.jsxs(
|
|
34920
34927
|
"div",
|
|
34921
34928
|
{
|
|
34922
34929
|
className: zt(
|
|
@@ -34932,7 +34939,7 @@ const iW = /* @__PURE__ */ we.forwardRef(aW), oW = iW, qM = ({
|
|
|
34932
34939
|
!!c && /* @__PURE__ */ N.jsx("div", { className: "dtw-absolute dtw-top-5 dtw-right-5", children: /* @__PURE__ */ N.jsx(qM, { Icon: oW, onClick: c }) })
|
|
34933
34940
|
]
|
|
34934
34941
|
}
|
|
34935
|
-
) }), sW = ({ children: t }) => /* @__PURE__ */ N.jsx(YE, { className: "dtw-pt-[var(--panel-content-pt)] dtw-pb-[var(--panel-content-pb)] dtw-px-[var(--panel-content-px)] dtw-flex dtw-flex-col dtw-gap-[var(--panel-content-gap,var(--panel-gap))]", children: t }), uW = ({
|
|
34942
|
+
) })), sW = ({ children: t }) => /* @__PURE__ */ N.jsx(YE, { className: "dtw-pt-[var(--panel-content-pt)] dtw-pb-[var(--panel-content-pb)] dtw-px-[var(--panel-content-px)] dtw-flex dtw-flex-col dtw-gap-[var(--panel-content-gap,var(--panel-gap))]", children: t }), uW = ({
|
|
34936
34943
|
className: t,
|
|
34937
34944
|
iconClassName: r,
|
|
34938
34945
|
onClick: i,
|
|
@@ -35056,7 +35063,7 @@ const iW = /* @__PURE__ */ we.forwardRef(aW), oW = iW, qM = ({
|
|
|
35056
35063
|
vertical: c = !1
|
|
35057
35064
|
}) => {
|
|
35058
35065
|
const [f, p] = Yt(t);
|
|
35059
|
-
|
|
35066
|
+
ht(() => {
|
|
35060
35067
|
p(t);
|
|
35061
35068
|
}, [t]);
|
|
35062
35069
|
const y = (g) => {
|
|
@@ -35327,12 +35334,12 @@ const iW = /* @__PURE__ */ we.forwardRef(aW), oW = iW, qM = ({
|
|
|
35327
35334
|
};
|
|
35328
35335
|
}, TW = ({ children: t }) => {
|
|
35329
35336
|
const [r, i] = bW(), [{ isOpen: s }] = Lc(), { standalone: c } = na();
|
|
35330
|
-
return
|
|
35337
|
+
return ht(() => {
|
|
35331
35338
|
c && s && !r.TRADING.isOpen && i({
|
|
35332
35339
|
type: "MERGE_OVERLAY",
|
|
35333
35340
|
payload: { type: Wi.TRADING, isOpen: s }
|
|
35334
35341
|
});
|
|
35335
|
-
}, [s, r.TRADING.isOpen, i, c]),
|
|
35342
|
+
}, [s, r.TRADING.isOpen, i, c]), ht(() => {
|
|
35336
35343
|
c && !s && r.TRADING.isOpen && i({
|
|
35337
35344
|
type: "MERGE_OVERLAY",
|
|
35338
35345
|
payload: { type: Wi.TRADING, isOpen: s }
|
|
@@ -35907,7 +35914,7 @@ const UW = /* @__PURE__ */ we.forwardRef(IW), iN = UW, $W = ({
|
|
|
35907
35914
|
chainId: S,
|
|
35908
35915
|
pollingInterval: 15e3
|
|
35909
35916
|
});
|
|
35910
|
-
|
|
35917
|
+
ht(() => {
|
|
35911
35918
|
if (C) {
|
|
35912
35919
|
T && i({ approvingStatus: "success" });
|
|
35913
35920
|
const $ = C.transactionHash;
|
|
@@ -35928,7 +35935,7 @@ const UW = /* @__PURE__ */ we.forwardRef(IW), iN = UW, $W = ({
|
|
|
35928
35935
|
i,
|
|
35929
35936
|
A,
|
|
35930
35937
|
R
|
|
35931
|
-
]),
|
|
35938
|
+
]), ht(() => {
|
|
35932
35939
|
P && (T && i({ approvingStatus: void 0 }), s({
|
|
35933
35940
|
isOpen: !1,
|
|
35934
35941
|
status: "None",
|
|
@@ -36265,7 +36272,7 @@ const pN = {
|
|
|
36265
36272
|
const { chainId: p, vaultAddress: y, account: g } = f;
|
|
36266
36273
|
if (!g || !t)
|
|
36267
36274
|
return pN;
|
|
36268
|
-
const T = (await import("./pyth-adapter-
|
|
36275
|
+
const T = (await import("./pyth-adapter-264be31a.js")).PythAdapter, S = Rb({
|
|
36269
36276
|
abi: Zb("synthetixV3Core"),
|
|
36270
36277
|
functionName: "getPositionDebt",
|
|
36271
36278
|
args: L7[y.toLowerCase()] ?? []
|
|
@@ -36312,7 +36319,7 @@ const pN = {
|
|
|
36312
36319
|
hash: r,
|
|
36313
36320
|
chainId: t
|
|
36314
36321
|
});
|
|
36315
|
-
return
|
|
36322
|
+
return ht(() => {
|
|
36316
36323
|
if (f) {
|
|
36317
36324
|
const y = f == null ? void 0 : f.transactionHash;
|
|
36318
36325
|
if (y) {
|
|
@@ -36320,7 +36327,7 @@ const pN = {
|
|
|
36320
36327
|
s({ isOpen: !0, status: "Success", link: g });
|
|
36321
36328
|
}
|
|
36322
36329
|
}
|
|
36323
|
-
}, [f, t, s]),
|
|
36330
|
+
}, [f, t, s]), ht(() => {
|
|
36324
36331
|
p && (s({
|
|
36325
36332
|
isOpen: !1,
|
|
36326
36333
|
status: "None",
|
|
@@ -36466,7 +36473,7 @@ function CO(t, r, i) {
|
|
|
36466
36473
|
},
|
|
36467
36474
|
[r, f]
|
|
36468
36475
|
);
|
|
36469
|
-
return
|
|
36476
|
+
return ht(() => {
|
|
36470
36477
|
try {
|
|
36471
36478
|
const y = f == null ? void 0 : f.getItem(r);
|
|
36472
36479
|
y && c(JSON.parse(y));
|
|
@@ -36477,7 +36484,7 @@ function CO(t, r, i) {
|
|
|
36477
36484
|
}
|
|
36478
36485
|
const aG = (t, r) => {
|
|
36479
36486
|
const [i, s] = Yt(t);
|
|
36480
|
-
return
|
|
36487
|
+
return ht(() => {
|
|
36481
36488
|
const c = setTimeout(() => {
|
|
36482
36489
|
s(t);
|
|
36483
36490
|
}, r);
|
|
@@ -36807,7 +36814,7 @@ const aG = (t, r) => {
|
|
|
36807
36814
|
rawTokenAmount: f,
|
|
36808
36815
|
spenderAddress: c
|
|
36809
36816
|
});
|
|
36810
|
-
return
|
|
36817
|
+
return ht(() => {
|
|
36811
36818
|
s(p ? "success" : void 0);
|
|
36812
36819
|
}, [s, p]), { approve: y, canSpend: p };
|
|
36813
36820
|
}, fG = ({
|
|
@@ -36831,7 +36838,7 @@ const aG = (t, r) => {
|
|
|
36831
36838
|
address: t,
|
|
36832
36839
|
chainId: r
|
|
36833
36840
|
}), A = T || R || y;
|
|
36834
|
-
|
|
36841
|
+
ht(() => {
|
|
36835
36842
|
if (!i || A)
|
|
36836
36843
|
return;
|
|
36837
36844
|
const C = S ? new it(S.toString()).shiftedBy(-c.decimals).toFixed(c.decimals) : "";
|
|
@@ -36845,9 +36852,9 @@ const aG = (t, r) => {
|
|
|
36845
36852
|
A,
|
|
36846
36853
|
g
|
|
36847
36854
|
// add debouncedSendTokenValue in order to update receive token value with same quote for the second time
|
|
36848
|
-
]),
|
|
36855
|
+
]), ht(() => {
|
|
36849
36856
|
i && f({ isLoading: A });
|
|
36850
|
-
}, [i, A, f]),
|
|
36857
|
+
}, [i, A, f]), ht(() => {
|
|
36851
36858
|
i && (!s.value || s.value === "0") && (f({ value: "0" }), p({ minSlippage: 0 }));
|
|
36852
36859
|
}, [f, p, s.value, i]);
|
|
36853
36860
|
}, TN = (t = {}) => {
|
|
@@ -36875,7 +36882,7 @@ const aG = (t, r) => {
|
|
|
36875
36882
|
const t = Kb(), [r] = Mr(), [, i] = Fa(), { isDebouncing: s } = r1({
|
|
36876
36883
|
extendedDebounceTime: !0
|
|
36877
36884
|
}), c = a1(), f = TN({ includesEntryFee: !0 });
|
|
36878
|
-
|
|
36885
|
+
ht(() => {
|
|
36879
36886
|
if (!t || r.isLoading || s)
|
|
36880
36887
|
return;
|
|
36881
36888
|
const p = f - c, y = p < 0 ? Math.abs(Number(p.toFixed(2))) : 0;
|
|
@@ -37597,7 +37604,7 @@ const vG = /* @__PURE__ */ Hh(hG), SC = () => {
|
|
|
37597
37604
|
]);
|
|
37598
37605
|
}, yG = () => {
|
|
37599
37606
|
const t = Dt(), [r] = SC(), i = sn()[1], [s] = _s();
|
|
37600
|
-
|
|
37607
|
+
ht(() => {
|
|
37601
37608
|
s === "deposit" && (r != null && r.symbol) && i({
|
|
37602
37609
|
address: r == null ? void 0 : r.address,
|
|
37603
37610
|
symbol: r.symbol,
|
|
@@ -38682,7 +38689,7 @@ const EY = /* @__PURE__ */ Hh(xY), CY = () => {
|
|
|
38682
38689
|
const { address: s, chainId: c } = Dt(), { cooldownActive: f } = Du({ address: s, chainId: c }), [p] = sn(), [y] = Mr(), [{ slippage: g }, T] = Fa(), [{ approvingStatus: S }] = oC(), R = S === "success", A = cC(), { data: C } = FO({
|
|
38683
38690
|
query: { refetchInterval: eM }
|
|
38684
38691
|
}), P = Ot(CY);
|
|
38685
|
-
|
|
38692
|
+
ht(() => {
|
|
38686
38693
|
P.current = EY(
|
|
38687
38694
|
async () => {
|
|
38688
38695
|
if (r.isZero() || !R || f)
|
|
@@ -38704,7 +38711,7 @@ const EY = /* @__PURE__ */ Hh(xY), CY = () => {
|
|
|
38704
38711
|
f,
|
|
38705
38712
|
// added receiveTokenSymbol to update debouncedEstimateSell func on token change
|
|
38706
38713
|
y.symbol
|
|
38707
|
-
]),
|
|
38714
|
+
]), ht(() => {
|
|
38708
38715
|
if (i) {
|
|
38709
38716
|
T({ minSlippage: 0 });
|
|
38710
38717
|
return;
|
|
@@ -38828,7 +38835,7 @@ const EY = /* @__PURE__ */ Hh(xY), CY = () => {
|
|
|
38828
38835
|
chainId: c,
|
|
38829
38836
|
skip: r || f === "0"
|
|
38830
38837
|
});
|
|
38831
|
-
|
|
38838
|
+
ht(() => {
|
|
38832
38839
|
s(y ? "success" : void 0);
|
|
38833
38840
|
}, [s, y]);
|
|
38834
38841
|
const g = wN({
|
|
@@ -38854,7 +38861,7 @@ const EY = /* @__PURE__ */ Hh(xY), CY = () => {
|
|
|
38854
38861
|
address: s.address,
|
|
38855
38862
|
chainId: t.chainId
|
|
38856
38863
|
}) ?? "";
|
|
38857
|
-
|
|
38864
|
+
ht(() => {
|
|
38858
38865
|
if (!r.value || r.value === "0") {
|
|
38859
38866
|
c({ value: "0" });
|
|
38860
38867
|
return;
|
|
@@ -39244,9 +39251,9 @@ const EY = /* @__PURE__ */ Hh(xY), CY = () => {
|
|
|
39244
39251
|
const p = JY[f];
|
|
39245
39252
|
p && s(p);
|
|
39246
39253
|
};
|
|
39247
|
-
return
|
|
39254
|
+
return ht(() => {
|
|
39248
39255
|
i || s("deposit");
|
|
39249
|
-
}, [r.address, i]),
|
|
39256
|
+
}, [r.address, i]), ht(() => {
|
|
39250
39257
|
i && s(t);
|
|
39251
39258
|
}, [r.address, i, t]), {
|
|
39252
39259
|
type: t,
|
|
@@ -39284,9 +39291,9 @@ const EY = /* @__PURE__ */ Hh(xY), CY = () => {
|
|
|
39284
39291
|
NO,
|
|
39285
39292
|
""
|
|
39286
39293
|
), [y, g] = CO("localStorage", nq, ""), T = i[rq];
|
|
39287
|
-
|
|
39294
|
+
ht(() => {
|
|
39288
39295
|
!T || typeof T != "string" || localStorage.getItem(NO) || (s == null || s(), p(T), g(t));
|
|
39289
|
-
}, [t, T, g, p, s]),
|
|
39296
|
+
}, [t, T, g, p, s]), ht(() => {
|
|
39290
39297
|
if (!r || !f || y !== t)
|
|
39291
39298
|
return;
|
|
39292
39299
|
(async () => {
|