@velora-dex/widget 0.7.0 → 0.7.2
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/components/ui/tooltip.js +1 -1
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/components/widget/AppHeader/AppHeader.d.ts.map +1 -1
- package/dist/components/widget/AppHeader/AppHeader.js +45 -41
- package/dist/components/widget/AppHeader/AppHeader.js.map +1 -1
- package/dist/components/widget/AppHeader/TradeModeSwitcher.d.ts +3 -1
- package/dist/components/widget/AppHeader/TradeModeSwitcher.d.ts.map +1 -1
- package/dist/components/widget/AppHeader/TradeModeSwitcher.js +69 -34
- package/dist/components/widget/AppHeader/TradeModeSwitcher.js.map +1 -1
- package/dist/components/widget/SwapRate/SwapRate.d.ts +2 -1
- package/dist/components/widget/SwapRate/SwapRate.d.ts.map +1 -1
- package/dist/components/widget/SwapRate/SwapRate.js +25 -37
- package/dist/components/widget/SwapRate/SwapRate.js.map +1 -1
- package/dist/components/widget/SwapRate/SwapRateWithTooltip.d.ts +3 -0
- package/dist/components/widget/SwapRate/SwapRateWithTooltip.d.ts.map +1 -0
- package/dist/components/widget/SwapRate/SwapRateWithTooltip.js +42 -0
- package/dist/components/widget/SwapRate/SwapRateWithTooltip.js.map +1 -0
- package/dist/components/widget/SwapRate/utils.d.ts +3 -0
- package/dist/components/widget/SwapRate/utils.d.ts.map +1 -0
- package/dist/components/widget/SwapRate/utils.js +26 -0
- package/dist/components/widget/SwapRate/utils.js.map +1 -0
- package/dist/components/widget/SwapRateWithPriceImpactRow/SwapRateWithPriceImpactRow.d.ts.map +1 -1
- package/dist/components/widget/SwapRateWithPriceImpactRow/SwapRateWithPriceImpactRow.js +20 -27
- package/dist/components/widget/SwapRateWithPriceImpactRow/SwapRateWithPriceImpactRow.js.map +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +134 -131
- package/dist/core/index.js.map +1 -1
- package/dist/core/logger.d.ts +2 -2
- package/dist/core/logger.d.ts.map +1 -1
- package/dist/core/logger.js +8 -2
- package/dist/core/logger.js.map +1 -1
- package/dist/core/screen/hooks/useRunOnMount.d.ts +10 -0
- package/dist/core/screen/hooks/useRunOnMount.d.ts.map +1 -1
- package/dist/core/screen/hooks/useRunOnMount.js +6 -1
- package/dist/core/screen/hooks/useRunOnMount.js.map +1 -1
- package/dist/core/state/configActionsAtom.d.ts.map +1 -1
- package/dist/core/state/configActionsAtom.js +8 -8
- package/dist/core/state/configActionsAtom.js.map +1 -1
- package/dist/core/state/configAtom.d.ts +4 -2
- package/dist/core/state/configAtom.d.ts.map +1 -1
- package/dist/core/state/configAtom.js +7 -4
- package/dist/core/state/configAtom.js.map +1 -1
- package/dist/core/state/validatedReferrerConfigAtom.d.ts +3 -0
- package/dist/core/state/validatedReferrerConfigAtom.d.ts.map +1 -0
- package/dist/core/state/validatedReferrerConfigAtom.js +12 -0
- package/dist/core/state/validatedReferrerConfigAtom.js.map +1 -0
- package/dist/core/types.d.ts +6 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/hooks/swap/tradeFlow/useDeltaFlow.d.ts.map +1 -1
- package/dist/hooks/swap/tradeFlow/useDeltaFlow.js +203 -201
- package/dist/hooks/swap/tradeFlow/useDeltaFlow.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/useLimitOrderFlow.d.ts.map +1 -1
- package/dist/hooks/swap/tradeFlow/useLimitOrderFlow.js +85 -82
- package/dist/hooks/swap/tradeFlow/useLimitOrderFlow.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/useMarketFlow.d.ts.map +1 -1
- package/dist/hooks/swap/tradeFlow/useMarketFlow.js +156 -154
- package/dist/hooks/swap/tradeFlow/useMarketFlow.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/useTwapFlow.d.ts.map +1 -1
- package/dist/hooks/swap/tradeFlow/useTwapFlow.js +230 -228
- package/dist/hooks/swap/tradeFlow/useTwapFlow.js.map +1 -1
- package/dist/hooks/useReferrer.d.ts +2 -0
- package/dist/hooks/useReferrer.d.ts.map +1 -0
- package/dist/hooks/useReferrer.js +8 -0
- package/dist/hooks/useReferrer.js.map +1 -0
- package/dist/lib/utils/logger.d.ts +7 -4
- package/dist/lib/utils/logger.d.ts.map +1 -1
- package/dist/lib/utils/logger.js +70 -33
- package/dist/lib/utils/logger.js.map +1 -1
- package/dist/lib/web3/privy/config.js +1 -1
- package/dist/lib/web3/privy/config.js.map +1 -1
- package/dist/lib/web3/wagmi/config.js +1 -1
- package/dist/lib/web3/wagmi/config.js.map +1 -1
- package/dist/lib/web3/wagmi/isInsideSafeIframe.js +11 -11
- package/dist/lib/web3/wagmi/isInsideSafeIframe.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/tokens/utils/transferAmountsFromReceipt.js +14 -14
- package/dist/tokens/utils/transferAmountsFromReceipt.js.map +1 -1
- package/dist/transactions/queries/ensureTxReceipt.js +8 -8
- package/dist/transactions/queries/ensureTxReceipt.js.map +1 -1
- package/package.json +7 -7
package/dist/components/widget/SwapRateWithPriceImpactRow/SwapRateWithPriceImpactRow.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwapRateWithPriceImpactRow.d.ts","sourceRoot":"","sources":["../../../../src/components/widget/SwapRateWithPriceImpactRow/SwapRateWithPriceImpactRow.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"SwapRateWithPriceImpactRow.d.ts","sourceRoot":"","sources":["../../../../src/components/widget/SwapRateWithPriceImpactRow/SwapRateWithPriceImpactRow.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGvD,eAAO,MAAM,0BAA0B,GAAI,uCAGxC;IACD,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,aAAa,EAAE,aAAa,CAAC;CAC9B,4CAwCA,CAAC"}
|
|
@@ -1,48 +1,41 @@
|
|
|
1
1
|
import { cn as e } from "../../../lib/utils/index.js";
|
|
2
2
|
import { Skeleton as t } from "../../ui/skeleton.js";
|
|
3
3
|
import { Tooltip as n, TooltipContent as r, TooltipTrigger as i } from "../../ui/tooltip.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { ForwardRef as a } from "../../../assets/price-impact.js";
|
|
5
|
+
import { SwapRateWithTooltip as o } from "../SwapRate/SwapRateWithTooltip.js";
|
|
6
6
|
import { c as s } from "react-compiler-runtime";
|
|
7
7
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/widget/SwapRateWithPriceImpactRow/SwapRateWithPriceImpactRow.tsx
|
|
9
9
|
var u = (u) => {
|
|
10
|
-
let d = s(
|
|
11
|
-
d[0] === p ? b = d[1] : (b = /* @__PURE__ */ c(
|
|
12
|
-
asChild: !0,
|
|
13
|
-
children: /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(a, { ...p }) })
|
|
14
|
-
}), d[0] = p, d[1] = b);
|
|
10
|
+
let d = s(19), { priceImpactDetail: f, swapRateProps: p } = u, { isHighImpact: m, isMediumImpact: h, isUnavailable: g, value: _, isLoading: v, classes: y } = f, b;
|
|
11
|
+
d[0] === p ? b = d[1] : (b = /* @__PURE__ */ c(o, { ...p }), d[0] = p, d[1] = b);
|
|
15
12
|
let x;
|
|
16
|
-
d[2]
|
|
17
|
-
let S;
|
|
18
|
-
d[3] === b ? S = d[4] : (S = /* @__PURE__ */ l(n, { children: [b, x] }), d[3] = b, d[4] = S);
|
|
19
|
-
let C;
|
|
20
|
-
d[5] !== m || d[6] !== h || d[7] !== g ? (C = !m && /* @__PURE__ */ c(o, { className: e("size-[16px]", {
|
|
13
|
+
d[2] !== m || d[3] !== h || d[4] !== g ? (x = !m && /* @__PURE__ */ c(a, { className: e("size-[16px]", {
|
|
21
14
|
"text-secondary-orange-peel-1 dark:text-secondary-orange-peel-1": h,
|
|
22
15
|
"text-secondary-radical-red-2 dark:text-secondary-radical-red-2": g
|
|
23
|
-
}) }), d[
|
|
24
|
-
let
|
|
25
|
-
d[
|
|
16
|
+
}) }), d[2] = m, d[3] = h, d[4] = g, d[5] = x) : x = d[5];
|
|
17
|
+
let S;
|
|
18
|
+
d[6] !== y?.value || d[7] !== v || d[8] !== _ ? (S = v ? /* @__PURE__ */ c(t, { className: "bg-contrast-6 dark:bg-contrast-5 min-w-[42px] h-[12px]" }) : /* @__PURE__ */ c("div", {
|
|
26
19
|
className: e(y?.value, "text-nowrap"),
|
|
27
20
|
children: _ ?? "-"
|
|
28
|
-
}), d[
|
|
29
|
-
let
|
|
30
|
-
d[
|
|
21
|
+
}), d[6] = y?.value, d[7] = v, d[8] = _, d[9] = S) : S = d[9];
|
|
22
|
+
let C;
|
|
23
|
+
d[10] !== x || d[11] !== S ? (C = /* @__PURE__ */ c(i, {
|
|
31
24
|
asChild: !0,
|
|
32
25
|
children: /* @__PURE__ */ l("div", {
|
|
33
26
|
className: "flex items-center gap-1",
|
|
34
|
-
children: [
|
|
27
|
+
children: [x, S]
|
|
35
28
|
})
|
|
36
|
-
}), d[
|
|
29
|
+
}), d[10] = x, d[11] = S, d[12] = C) : C = d[12];
|
|
30
|
+
let w;
|
|
31
|
+
d[13] === Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ c(r, { children: "Price Impact" }), d[13] = w) : w = d[13];
|
|
32
|
+
let T;
|
|
33
|
+
d[14] === C ? T = d[15] : (T = /* @__PURE__ */ l(n, { children: [C, w] }), d[14] = C, d[15] = T);
|
|
37
34
|
let E;
|
|
38
|
-
d[16]
|
|
39
|
-
let D;
|
|
40
|
-
d[17] === T ? D = d[18] : (D = /* @__PURE__ */ l(n, { children: [T, E] }), d[17] = T, d[18] = D);
|
|
41
|
-
let O;
|
|
42
|
-
return d[19] !== S || d[20] !== D ? (O = /* @__PURE__ */ l("div", {
|
|
35
|
+
return d[16] !== b || d[17] !== T ? (E = /* @__PURE__ */ l("div", {
|
|
43
36
|
className: "flex items-center justify-between",
|
|
44
|
-
children: [
|
|
45
|
-
}), d[
|
|
37
|
+
children: [b, T]
|
|
38
|
+
}), d[16] = b, d[17] = T, d[18] = E) : E = d[18], E;
|
|
46
39
|
};
|
|
47
40
|
//#endregion
|
|
48
41
|
export { u as SwapRateWithPriceImpactRow };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwapRateWithPriceImpactRow.js","names":["Tooltip","TooltipContent","TooltipTrigger","ReactComponent","PriceImpactSVG","cn","Skeleton","PriceImpactDetail","
|
|
1
|
+
{"version":3,"file":"SwapRateWithPriceImpactRow.js","names":["Tooltip","TooltipContent","TooltipTrigger","ReactComponent","PriceImpactSVG","cn","Skeleton","PriceImpactDetail","SwapRateProps","SwapRateWithTooltip","SwapRateWithPriceImpactRow","t0","$","_c","priceImpactDetail","swapRateProps","isHighImpact","isMediumImpact","isUnavailable","value","priceImpactValue","isLoading","classes","t1","t2","t3","t4","t5","Symbol","for","t6","t7"],"sources":["../../../../src/components/widget/SwapRateWithPriceImpactRow/SwapRateWithPriceImpactRow.tsx"],"sourcesContent":["import {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { ReactComponent as PriceImpactSVG } from \"@/assets/price-impact.svg\";\nimport { cn } from \"@/lib/utils\";\nimport { Skeleton } from \"@/components/ui/skeleton\";\nimport type { PriceImpactDetail } from \"@/core/swapDetails/types\";\nimport type { SwapRateProps } from \"../SwapRate/types\";\nimport { SwapRateWithTooltip } from \"../SwapRate/SwapRateWithTooltip\";\n\nexport const SwapRateWithPriceImpactRow = ({\n priceImpactDetail,\n swapRateProps,\n}: {\n priceImpactDetail: PriceImpactDetail;\n swapRateProps: SwapRateProps;\n}) => {\n const {\n isHighImpact,\n isMediumImpact,\n isUnavailable,\n value: priceImpactValue,\n isLoading,\n classes,\n } = priceImpactDetail;\n\n return (\n <div className=\"flex items-center justify-between\">\n <SwapRateWithTooltip {...swapRateProps} />\n\n <Tooltip>\n <TooltipTrigger asChild>\n <div className=\"flex items-center gap-1\">\n {!isHighImpact && (\n <PriceImpactSVG\n className={cn(\"size-[16px]\", {\n \"text-secondary-orange-peel-1 dark:text-secondary-orange-peel-1\":\n isMediumImpact,\n \"text-secondary-radical-red-2 dark:text-secondary-radical-red-2\":\n isUnavailable,\n })}\n />\n )}\n {isLoading ? (\n <Skeleton className=\"bg-contrast-6 dark:bg-contrast-5 min-w-[42px] h-[12px]\" />\n ) : (\n <div className={cn(classes?.value, \"text-nowrap\")}>\n {priceImpactValue ?? \"-\"}\n </div>\n )}\n </div>\n </TooltipTrigger>\n <TooltipContent>Price Impact</TooltipContent>\n </Tooltip>\n </div>\n );\n};\n"],"mappings":";;;;;;;;AAYA,IAAaU,KAA6BC,MAAA;CAAA,IAAAC,IAAAC,EAAA,GAAA,EAAC,EAAAC,sBAAAC,qBAAAJ,GAOzC,EAAAK,iBAAAC,mBAAAC,kBAAAC,OAAAC,GAAAC,cAAAC,eAOIR,GAAkBS;AAAA,CAAAX,EAAA,OAAAG,IAIwBQ,IAAAX,EAAA,MAA1CW,IAAA,kBAAC,GAAD,EAAoB,GAAKR,GAAiB,CAAA,EAAAH,EAAA,KAAAG,GAAAH,EAAA,KAAAW;CAAA,IAAAC;AAAA,CAAAZ,EAAA,OAAAI,KAAAJ,EAAA,OAAAK,KAAAL,EAAA,OAAAM,KAKnCM,IAAA,CAACR,KACA,kBAAC,GAAD,EACa,WAAAX,EAAG,eAAe;EAAA,kEAEzBY;EAAc,kEAEdC;EACH,CAAA,EAEJ,CAAA,EAAAN,EAAA,KAAAI,GAAAJ,EAAA,KAAAK,GAAAL,EAAA,KAAAM,GAAAN,EAAA,KAAAY,KAAAA,IAAAZ,EAAA;CAAA,IAAAa;AAAA,CAAAb,EAAA,OAAAU,GAAAH,SAAAP,EAAA,OAAAS,KAAAT,EAAA,OAAAQ,KACAK,IAAAJ,IACC,kBAAC,GAAD,EAAoB,WAAA,0DAKrB,CAAA,GAHC,kBAAA,OAAA;EAAgB,WAAAhB,EAAGiB,GAAOH,OAAS,cAAa;YAC7CC,KAAA;EAEJ,CAAA,EAAAR,EAAA,KAAAU,GAAAH,OAAAP,EAAA,KAAAS,GAAAT,EAAA,KAAAQ,GAAAR,EAAA,KAAAa,KAAAA,IAAAb,EAAA;CAAA,IAAAc;AAAA,CAAAd,EAAA,QAAAY,KAAAZ,EAAA,QAAAa,KAlBLC,IAAA,kBAAC,GAAD;EAAgB,SAAA;YACd,kBAAA,OAAA;GAAe,WAAA;aAAf,CACGF,GAUAC,EAQL;;EAAiB,CAAA,EAAAb,EAAA,MAAAY,GAAAZ,EAAA,MAAAa,GAAAb,EAAA,MAAAc,KAAAA,IAAAd,EAAA;CAAA,IAAAe;AAAA,CAAAf,EAAA,QAAAgB,OAAAC,IAAA,4BAAA,IACjBF,IAAA,kBAAC,GAAD,EAAA,UAAgB,gBAA6B,CAAA,EAAAf,EAAA,MAAAe,KAAAA,IAAAf,EAAA;CAAA,IAAAkB;AAAA,CAAAlB,EAAA,QAAAc,IACrCI,IAAAlB,EAAA,OAvBVkB,IAAA,kBAAC,GAAD,EAAA,UAAA,CACEJ,GAqBAC,EACQ,EAAA,CAAA,EAAAf,EAAA,MAAAc,GAAAd,EAAA,MAAAkB;CAAA,IAAAC;AACN,QADMnB,EAAA,QAAAW,KAAAX,EAAA,QAAAkB,KA1BZC,IAAA,kBAAA,OAAA;EAAe,WAAA;YAAf,CACER,GAEAO,EAwBI;KAAAlB,EAAA,MAAAW,GAAAX,EAAA,MAAAkB,GAAAlB,EAAA,MAAAmB,KAAAA,IAAAnB,EAAA,KA3BNmB"}
|
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.tsx"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAiB7B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.tsx"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAiB7B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AA8a3C,eAAO,MAAM,MAAM,GAAI,iDAMpB,WAAW,4CAcb,CAAC"}
|
package/dist/core/index.js
CHANGED
|
@@ -25,33 +25,33 @@ import { runSubscriptions as E } from "./subscriptions.js";
|
|
|
25
25
|
import { PrivyIframeDependency as oe } from "../components/web3/ConnectWallets/privy/iframe.js";
|
|
26
26
|
import { SwapModeSwitcherExpandable as D } from "../components/widget/SwapModeSwitcher/SwapModeSwitcherExpandable.js";
|
|
27
27
|
import { useTokenInputsFromPrice as O } from "../hooks/swap/prices/useTokenInputsFromPrice.js";
|
|
28
|
-
import { SwapDetailsExpandable as
|
|
29
|
-
import { ReceiverAddress as
|
|
30
|
-
import { externalProviderAtom as
|
|
31
|
-
import { AppHeader as
|
|
32
|
-
import { setSubConfigAtom as
|
|
33
|
-
import { PoweredBy as
|
|
34
|
-
import { useUnsupportedLimitChain as
|
|
35
|
-
import { useUnsupportedOtcChain as
|
|
36
|
-
import { useLimitTokenFromInputProps as
|
|
37
|
-
import { useLimitTokenToInputProps as
|
|
38
|
-
import { useTwapButtonExtraProps as
|
|
39
|
-
import { Toaster as
|
|
40
|
-
import { AutoconnectExternalProvider as
|
|
41
|
-
import { SwapTradeFlowScreenButton as
|
|
42
|
-
import { ConnectWalletDrawerButton as
|
|
43
|
-
import { PriceInput as
|
|
44
|
-
import { OrderExpiryInput as
|
|
45
|
-
import { InWidgetDrawerOverlay as
|
|
46
|
-
import { LimitOrderButton as
|
|
47
|
-
import { LimitOrderDetails as
|
|
48
|
-
import { useOtcTokenFromInputProps as
|
|
49
|
-
import { useOtcTokenToInputProps as
|
|
50
|
-
import { useLimitPriceInputProps as
|
|
51
|
-
import { useOtcPriceInputProps as
|
|
52
|
-
import { OtcOrderButton as
|
|
53
|
-
import { OtcOrderDetails as
|
|
54
|
-
import { SwapWidgetWarning as
|
|
28
|
+
import { SwapDetailsExpandable as k } from "../components/widget/Details/SwapDetailsExpandable.js";
|
|
29
|
+
import { ReceiverAddress as A } from "../components/widget/ReceiverAddress/ReceiverAddress.js";
|
|
30
|
+
import { externalProviderAtom as se } from "./state/externalProviderAtom.js";
|
|
31
|
+
import { AppHeader as j } from "../components/widget/AppHeader/AppHeader.js";
|
|
32
|
+
import { setSubConfigAtom as ce, setWidgetConfigAtom as le } from "./state/configActionsAtom.js";
|
|
33
|
+
import { PoweredBy as M } from "../components/widget/PoweredBy/PoweredBy.js";
|
|
34
|
+
import { useUnsupportedLimitChain as N } from "./limit/useLimitNotSupported.js";
|
|
35
|
+
import { useUnsupportedOtcChain as P } from "./otc/useOtcNotSupported.js";
|
|
36
|
+
import { useLimitTokenFromInputProps as F } from "./limit/useLimitTokenFromInputProps.js";
|
|
37
|
+
import { useLimitTokenToInputProps as I } from "./limit/useLimitTokenToInputProps.js";
|
|
38
|
+
import { useTwapButtonExtraProps as ue, useWidgetButtonExtraProps as de } from "./button/hooks/useWidgetButtonExtraProps.js";
|
|
39
|
+
import { Toaster as fe } from "./Toaster.js";
|
|
40
|
+
import { AutoconnectExternalProvider as pe } from "../components/web3/ConnectExternalProvider/AutoconnectExternal.js";
|
|
41
|
+
import { SwapTradeFlowScreenButton as L, TwapTradeFlowScreenButton as R } from "./TradeFlowScreenButton.js";
|
|
42
|
+
import { ConnectWalletDrawerButton as z } from "./ConnectWalletDrawerButton.js";
|
|
43
|
+
import { PriceInput as B } from "../components/widget/LimitPriceInput/index.js";
|
|
44
|
+
import { OrderExpiryInput as V } from "../components/widget/OrderExpiryInput/index.js";
|
|
45
|
+
import { InWidgetDrawerOverlay as me } from "../components/widget/Drawer/Overlay.js";
|
|
46
|
+
import { LimitOrderButton as H } from "./LimitOrderButton.js";
|
|
47
|
+
import { LimitOrderDetails as U } from "./LimitOrderDetails.js";
|
|
48
|
+
import { useOtcTokenFromInputProps as W } from "./otc/useOtcTokenFromInputProps.js";
|
|
49
|
+
import { useOtcTokenToInputProps as G } from "./otc/useOtcTokenToInputProps.js";
|
|
50
|
+
import { useLimitPriceInputProps as he } from "./limit/useLimitPriceInputProps.js";
|
|
51
|
+
import { useOtcPriceInputProps as K } from "./otc/useOtcPriceInputProps.js";
|
|
52
|
+
import { OtcOrderButton as q } from "./OtcOrderButton.js";
|
|
53
|
+
import { OtcOrderDetails as J } from "./OtcOrderDetails.js";
|
|
54
|
+
import { SwapWidgetWarning as ge, TwapWarnings as Y, WidgetWarning as X } from "./Warnings.js";
|
|
55
55
|
import { useLimitTokenSwitcherProps as _e } from "./limit/useLimitTokenSwitcherProps.js";
|
|
56
56
|
import { useOtcTokenSwitcherProps as ve } from "./otc/useOtcTokenSwitcherProps.js";
|
|
57
57
|
import { useTwapTokenFromInputProps as ye } from "./twap/useTwapTokenFromInputProps.js";
|
|
@@ -85,24 +85,24 @@ var He = () => {
|
|
|
85
85
|
/* @__PURE__ */ Q(ut, {}),
|
|
86
86
|
/* @__PURE__ */ Q(ot, {}),
|
|
87
87
|
/* @__PURE__ */ Q(gt, {}),
|
|
88
|
+
/* @__PURE__ */ Q(X, {}),
|
|
88
89
|
/* @__PURE__ */ Q(ge, {}),
|
|
89
|
-
/* @__PURE__ */ Q(he, {}),
|
|
90
90
|
/* @__PURE__ */ Q(mt, {}),
|
|
91
91
|
/* @__PURE__ */ Q(ht, {}),
|
|
92
92
|
/* @__PURE__ */ Q(bt, {})
|
|
93
93
|
] }), e[0] = t) : t = e[0], t;
|
|
94
94
|
}, Ue = () => {
|
|
95
|
-
let e = Z(8), t =
|
|
95
|
+
let e = Z(8), t = he(), n = N(), i;
|
|
96
96
|
e[0] === n ? i = e[1] : (i = r("flex gap-4 items-stretch py-2", { "pointer-events-none": n }), e[0] = n, e[1] = i);
|
|
97
97
|
let a;
|
|
98
98
|
e[2] === t ? a = e[3] : (a = /* @__PURE__ */ Q("div", {
|
|
99
99
|
className: "flex-1",
|
|
100
|
-
children: /* @__PURE__ */ Q(
|
|
100
|
+
children: /* @__PURE__ */ Q(B, { ...t })
|
|
101
101
|
}), e[2] = t, e[3] = a);
|
|
102
102
|
let o;
|
|
103
103
|
e[4] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ Q("div", {
|
|
104
104
|
className: "flex-1",
|
|
105
|
-
children: /* @__PURE__ */ Q(
|
|
105
|
+
children: /* @__PURE__ */ Q(V, { type: "limit" })
|
|
106
106
|
}), e[4] = o) : o = e[4];
|
|
107
107
|
let s;
|
|
108
108
|
return e[5] !== i || e[6] !== a ? (s = /* @__PURE__ */ $("div", {
|
|
@@ -110,17 +110,17 @@ var He = () => {
|
|
|
110
110
|
children: [a, o]
|
|
111
111
|
}), e[5] = i, e[6] = a, e[7] = s) : s = e[7], s;
|
|
112
112
|
}, We = () => {
|
|
113
|
-
let e = Z(8), t =
|
|
113
|
+
let e = Z(8), t = K(), n = P(), i;
|
|
114
114
|
e[0] === n ? i = e[1] : (i = r("flex gap-4 items-stretch py-2", { "pointer-events-none": n }), e[0] = n, e[1] = i);
|
|
115
115
|
let a;
|
|
116
116
|
e[2] === t ? a = e[3] : (a = /* @__PURE__ */ Q("div", {
|
|
117
117
|
className: "flex-1",
|
|
118
|
-
children: /* @__PURE__ */ Q(
|
|
118
|
+
children: /* @__PURE__ */ Q(B, { ...t })
|
|
119
119
|
}), e[2] = t, e[3] = a);
|
|
120
120
|
let o;
|
|
121
121
|
e[4] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ Q("div", {
|
|
122
122
|
className: "flex-1",
|
|
123
|
-
children: /* @__PURE__ */ Q(
|
|
123
|
+
children: /* @__PURE__ */ Q(V, { type: "otc" })
|
|
124
124
|
}), e[4] = o) : o = e[4];
|
|
125
125
|
let s;
|
|
126
126
|
return e[5] !== i || e[6] !== a ? (s = /* @__PURE__ */ $("div", {
|
|
@@ -135,9 +135,9 @@ var He = () => {
|
|
|
135
135
|
/* @__PURE__ */ Q(st, {}),
|
|
136
136
|
/* @__PURE__ */ Q(Ue, {}),
|
|
137
137
|
/* @__PURE__ */ Q(vt, {}),
|
|
138
|
-
/* @__PURE__ */ Q(
|
|
139
|
-
/* @__PURE__ */ Q(
|
|
140
|
-
/* @__PURE__ */ Q(
|
|
138
|
+
/* @__PURE__ */ Q(X, {}),
|
|
139
|
+
/* @__PURE__ */ Q(H, {}),
|
|
140
|
+
/* @__PURE__ */ Q(U, {})
|
|
141
141
|
] }), e[0] = t) : t = e[0], t;
|
|
142
142
|
}, Ke = () => {
|
|
143
143
|
let e = Z(1), t;
|
|
@@ -147,9 +147,9 @@ var He = () => {
|
|
|
147
147
|
/* @__PURE__ */ Q(ct, {}),
|
|
148
148
|
/* @__PURE__ */ Q(We, {}),
|
|
149
149
|
/* @__PURE__ */ Q(_t, {}),
|
|
150
|
-
/* @__PURE__ */ Q(
|
|
151
|
-
/* @__PURE__ */ Q(
|
|
152
|
-
/* @__PURE__ */ Q(
|
|
150
|
+
/* @__PURE__ */ Q(X, {}),
|
|
151
|
+
/* @__PURE__ */ Q(q, {}),
|
|
152
|
+
/* @__PURE__ */ Q(J, {})
|
|
153
153
|
] }), e[0] = t) : t = e[0], t;
|
|
154
154
|
}, qe = () => {
|
|
155
155
|
let e = Z(1), t;
|
|
@@ -187,13 +187,13 @@ function Je() {
|
|
|
187
187
|
tokenFrom: i.token,
|
|
188
188
|
tokenTo: o.token
|
|
189
189
|
}, e[13] = i.token, e[14] = o.token, e[15] = l) : l = e[15];
|
|
190
|
-
let u =
|
|
190
|
+
let u = ue(l);
|
|
191
191
|
if (!t) {
|
|
192
192
|
let t;
|
|
193
|
-
return e[16] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ Q(
|
|
193
|
+
return e[16] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ Q(z, {}), e[16] = t) : t = e[16], t;
|
|
194
194
|
}
|
|
195
195
|
let d;
|
|
196
|
-
return e[17] !== u.className || e[18] !== u.disabled || e[19] !== u.labelOverride || e[20] !== c || e[21] !== n.price ? (d = /* @__PURE__ */ Q(
|
|
196
|
+
return e[17] !== u.className || e[18] !== u.disabled || e[19] !== u.labelOverride || e[20] !== c || e[21] !== n.price ? (d = /* @__PURE__ */ Q(R, {
|
|
197
197
|
orderProps: c,
|
|
198
198
|
twapPrice: n.price,
|
|
199
199
|
disabled: u.disabled,
|
|
@@ -212,7 +212,7 @@ var Ye = {
|
|
|
212
212
|
/* @__PURE__ */ Q(pt, {}),
|
|
213
213
|
/* @__PURE__ */ Q(lt, {}),
|
|
214
214
|
/* @__PURE__ */ Q(qe, {}),
|
|
215
|
-
/* @__PURE__ */ Q(
|
|
215
|
+
/* @__PURE__ */ Q(Y, {}),
|
|
216
216
|
/* @__PURE__ */ Q(Te, {}),
|
|
217
217
|
/* @__PURE__ */ Q(Je, {})
|
|
218
218
|
] }), e[0] = t) : t = e[0], t;
|
|
@@ -225,63 +225,64 @@ var Ye = {
|
|
|
225
225
|
e[0] === r ? i = e[1] : (i = r ? /* @__PURE__ */ Q(Ae, { children: r }) : /* @__PURE__ */ $(ke, { children: [
|
|
226
226
|
/* @__PURE__ */ Q(tt, {}),
|
|
227
227
|
/* @__PURE__ */ Q(Xe, {}),
|
|
228
|
-
/* @__PURE__ */ Q(
|
|
228
|
+
/* @__PURE__ */ Q(M, {})
|
|
229
229
|
] }), e[0] = r, e[1] = i);
|
|
230
230
|
let a;
|
|
231
|
-
e[2] === n ? a = e[3] : (a = !n.includes("snackbars") && /* @__PURE__ */ Q(
|
|
231
|
+
e[2] === n ? a = e[3] : (a = !n.includes("snackbars") && /* @__PURE__ */ Q(fe, {}), e[2] = n, e[3] = a);
|
|
232
232
|
let o;
|
|
233
233
|
return e[4] !== i || e[5] !== a ? (o = /* @__PURE__ */ $(et, { children: [i, a] }), e[4] = i, e[5] = a, e[6] = o) : o = e[6], o;
|
|
234
234
|
}, Qe = (t) => {
|
|
235
|
-
let r = Z(
|
|
235
|
+
let r = Z(89), { config: i, apiConfig: s, provider: c, events: u, input: d } = t, f = Ie(), p = n(le), te = n(ce), h = n(l), g;
|
|
236
236
|
r[0] === i ? g = r[1] : (g = i || {}, r[0] = i, r[1] = g);
|
|
237
|
-
let _, v, y, b, x, S, C, w;
|
|
238
|
-
r[2] === g ? (_ = r[3], v = r[4], y = r[5], b = r[6], x = r[7], S = r[8], C = r[9], w = r[10]) : ({srcChains:
|
|
239
|
-
let
|
|
240
|
-
r[
|
|
237
|
+
let _, v, y, b, x, S, C, w, T;
|
|
238
|
+
r[2] === g ? (_ = r[3], v = r[4], y = r[5], b = r[6], x = r[7], S = r[8], C = r[9], w = r[10], T = r[11]) : ({srcChains: C, destChains: v, tokenLists: w, tradeModes: T, excludeUI: b, devURLs: y, partnerConfig: x, referrerConfig: S, ..._} = g, r[2] = g, r[3] = _, r[4] = v, r[5] = y, r[6] = b, r[7] = x, r[8] = S, r[9] = C, r[10] = w, r[11] = T);
|
|
239
|
+
let E;
|
|
240
|
+
r[12] === _ ? E = r[13] : (E = [le, {
|
|
241
241
|
...o,
|
|
242
242
|
..._
|
|
243
|
-
}], r[
|
|
244
|
-
let
|
|
245
|
-
r[
|
|
243
|
+
}], r[12] = _, r[13] = E);
|
|
244
|
+
let D;
|
|
245
|
+
r[14] !== v || r[15] !== y || r[16] !== b || r[17] !== x || r[18] !== S || r[19] !== C || r[20] !== w || r[21] !== T ? (D = [ce, {
|
|
246
246
|
...a,
|
|
247
|
-
srcChains:
|
|
247
|
+
srcChains: C,
|
|
248
248
|
destChains: v,
|
|
249
|
-
tokenLists:
|
|
250
|
-
tradeModes:
|
|
249
|
+
tokenLists: w,
|
|
250
|
+
tradeModes: T,
|
|
251
251
|
excludeUI: b,
|
|
252
252
|
devURLs: y,
|
|
253
|
-
partnerConfig: x
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
r[21] === s ? D = r[22] : (D = s || {}, r[21] = s, r[22] = D);
|
|
253
|
+
partnerConfig: x,
|
|
254
|
+
referrerConfig: S
|
|
255
|
+
}], r[14] = v, r[15] = y, r[16] = b, r[17] = x, r[18] = S, r[19] = C, r[20] = w, r[21] = T, r[22] = D) : D = r[22];
|
|
257
256
|
let O;
|
|
258
|
-
r[23] ===
|
|
259
|
-
let
|
|
260
|
-
r[25] ===
|
|
261
|
-
let A;
|
|
262
|
-
r[27] ===
|
|
263
|
-
let j;
|
|
264
|
-
r[29] === A ? j = r[30] : (j = [ee, A], r[29] = A, r[30] = j);
|
|
257
|
+
r[23] === s ? O = r[24] : (O = s || {}, r[23] = s, r[24] = O);
|
|
258
|
+
let k;
|
|
259
|
+
r[25] === O ? k = r[26] : (k = [l, O], r[25] = O, r[26] = k);
|
|
260
|
+
let A = c || null, j;
|
|
261
|
+
r[27] === A ? j = r[28] : (j = [se, A], r[27] = A, r[28] = j);
|
|
265
262
|
let M;
|
|
266
|
-
r[
|
|
263
|
+
r[29] === u ? M = r[30] : (M = u || {}, r[29] = u, r[30] = M);
|
|
267
264
|
let N;
|
|
268
|
-
r[
|
|
265
|
+
r[31] === M ? N = r[32] : (N = [ee, M], r[31] = M, r[32] = N);
|
|
269
266
|
let P;
|
|
270
|
-
r[
|
|
267
|
+
r[33] === d ? P = r[34] : (P = d || {}, r[33] = d, r[34] = P);
|
|
271
268
|
let F;
|
|
272
|
-
r[
|
|
273
|
-
|
|
269
|
+
r[35] === P ? F = r[36] : (F = [re, P], r[35] = P, r[36] = F);
|
|
270
|
+
let I;
|
|
271
|
+
r[37] === f ? I = r[38] : (I = [Be, f], r[37] = f, r[38] = I);
|
|
272
|
+
let ue;
|
|
273
|
+
r[39] !== F || r[40] !== I || r[41] !== E || r[42] !== D || r[43] !== k || r[44] !== j || r[45] !== N ? (ue = [
|
|
274
274
|
E,
|
|
275
|
-
|
|
275
|
+
D,
|
|
276
276
|
k,
|
|
277
277
|
j,
|
|
278
278
|
N,
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
279
|
+
F,
|
|
280
|
+
I
|
|
281
|
+
], r[39] = F, r[40] = I, r[41] = E, r[42] = D, r[43] = k, r[44] = j, r[45] = N, r[46] = ue) : ue = r[46];
|
|
282
|
+
let de;
|
|
283
|
+
r[47] === Symbol.for("react.memo_cache_sentinel") ? (de = { store: e }, r[47] = de) : de = r[47], Re(ue, de), m(u), ie(d);
|
|
284
|
+
let fe, L;
|
|
285
|
+
r[48] !== _.debug || r[49] !== _.enableCrossChain || r[50] !== _.enableDegenMode || r[51] !== _.enableDelta || r[52] !== _.privyAppId || r[53] !== _.privyClientId || r[54] !== _.theme || r[55] !== _.widgetMode || r[56] !== p ? (fe = () => {
|
|
285
286
|
p({
|
|
286
287
|
theme: _.theme,
|
|
287
288
|
enableDelta: _.enableDelta,
|
|
@@ -292,7 +293,7 @@ var Ye = {
|
|
|
292
293
|
widgetMode: _.widgetMode,
|
|
293
294
|
enableDegenMode: _.enableDegenMode
|
|
294
295
|
});
|
|
295
|
-
},
|
|
296
|
+
}, L = [
|
|
296
297
|
_.theme,
|
|
297
298
|
_.enableDelta,
|
|
298
299
|
_.enableCrossChain,
|
|
@@ -302,58 +303,60 @@ var Ye = {
|
|
|
302
303
|
_.widgetMode,
|
|
303
304
|
_.enableDegenMode,
|
|
304
305
|
p
|
|
305
|
-
], r[
|
|
306
|
-
let
|
|
307
|
-
r[
|
|
306
|
+
], r[48] = _.debug, r[49] = _.enableCrossChain, r[50] = _.enableDegenMode, r[51] = _.enableDelta, r[52] = _.privyAppId, r[53] = _.privyClientId, r[54] = _.theme, r[55] = _.widgetMode, r[56] = p, r[57] = fe, r[58] = L) : (fe = r[57], L = r[58]), Pe(fe, L);
|
|
307
|
+
let R, z;
|
|
308
|
+
r[59] !== v || r[60] !== y || r[61] !== b || r[62] !== x || r[63] !== S || r[64] !== te || r[65] !== C || r[66] !== w || r[67] !== T ? (R = () => {
|
|
308
309
|
te({
|
|
309
|
-
srcChains:
|
|
310
|
+
srcChains: C,
|
|
310
311
|
destChains: v,
|
|
311
|
-
tokenLists:
|
|
312
|
-
tradeModes:
|
|
312
|
+
tokenLists: w,
|
|
313
|
+
tradeModes: T,
|
|
313
314
|
excludeUI: b,
|
|
314
315
|
devURLs: y,
|
|
315
|
-
partnerConfig: x
|
|
316
|
+
partnerConfig: x,
|
|
317
|
+
referrerConfig: S
|
|
316
318
|
});
|
|
317
|
-
},
|
|
318
|
-
S,
|
|
319
|
-
v,
|
|
319
|
+
}, z = [
|
|
320
320
|
C,
|
|
321
|
-
|
|
321
|
+
v,
|
|
322
322
|
w,
|
|
323
|
+
te,
|
|
324
|
+
T,
|
|
323
325
|
b,
|
|
324
326
|
y,
|
|
325
|
-
x
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
327
|
+
x,
|
|
328
|
+
S
|
|
329
|
+
], r[59] = v, r[60] = y, r[61] = b, r[62] = x, r[63] = S, r[64] = te, r[65] = C, r[66] = w, r[67] = T, r[68] = R, r[69] = z) : (R = r[68], z = r[69]), Pe(R, z);
|
|
330
|
+
let B;
|
|
331
|
+
r[70] !== s?.apiKey || r[71] !== s?.headers || r[72] !== h ? (B = () => {
|
|
329
332
|
h({
|
|
330
333
|
apiKey: s?.apiKey,
|
|
331
334
|
headers: s?.headers
|
|
332
335
|
});
|
|
333
|
-
}, r[
|
|
334
|
-
let
|
|
335
|
-
r[
|
|
336
|
-
|
|
337
|
-
|
|
336
|
+
}, r[70] = s?.apiKey, r[71] = s?.headers, r[72] = h, r[73] = B) : B = r[73];
|
|
337
|
+
let V = s?.apiKey, me = s?.headers, H;
|
|
338
|
+
r[74] !== h || r[75] !== V || r[76] !== me ? (H = [
|
|
339
|
+
V,
|
|
340
|
+
me,
|
|
338
341
|
h
|
|
339
|
-
], r[
|
|
340
|
-
let
|
|
341
|
-
r[
|
|
342
|
-
|
|
343
|
-
},
|
|
344
|
-
let
|
|
345
|
-
r[
|
|
342
|
+
], r[74] = h, r[75] = V, r[76] = me, r[77] = H) : H = r[77], Pe(B, H);
|
|
343
|
+
let U = n(se), W, G;
|
|
344
|
+
r[78] !== c || r[79] !== U ? (W = () => {
|
|
345
|
+
U(c || null);
|
|
346
|
+
}, G = [c, U], r[78] = c, r[79] = U, r[80] = W, r[81] = G) : (W = r[80], G = r[81]), Pe(W, G);
|
|
347
|
+
let he = De(_?.widgetMode !== "dapp"), K, q, J, ge, Y;
|
|
348
|
+
r[82] === Symbol.for("react.memo_cache_sentinel") ? (K = /* @__PURE__ */ Q(pe, {}), q = /* @__PURE__ */ Q(oe, {}), J = /* @__PURE__ */ Q(ae, {}), ge = /* @__PURE__ */ Q(Ze, {}), Y = !1, r[82] = K, r[83] = q, r[84] = J, r[85] = ge, r[86] = Y) : (K = r[82], q = r[83], J = r[84], ge = r[85], Y = r[86]);
|
|
346
349
|
let X;
|
|
347
|
-
return r[
|
|
348
|
-
reconnectOnMount:
|
|
350
|
+
return r[87] === he ? X = r[88] : (X = /* @__PURE__ */ $(ne, {
|
|
351
|
+
reconnectOnMount: he,
|
|
349
352
|
children: [
|
|
353
|
+
K,
|
|
354
|
+
q,
|
|
350
355
|
J,
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
me,
|
|
354
|
-
he
|
|
356
|
+
ge,
|
|
357
|
+
Y
|
|
355
358
|
]
|
|
356
|
-
}), r[
|
|
359
|
+
}), r[87] = he, r[88] = X), X;
|
|
357
360
|
}, $e = (e) => {
|
|
358
361
|
let t = Z(6), { config: n, apiConfig: r, provider: i, events: a, input: o } = e, s;
|
|
359
362
|
return t[0] !== r || t[1] !== n || t[2] !== a || t[3] !== o || t[4] !== i ? (s = /* @__PURE__ */ Q(y, { children: /* @__PURE__ */ Q(b, { children: /* @__PURE__ */ Q(Qe, {
|
|
@@ -370,9 +373,9 @@ function et(e) {
|
|
|
370
373
|
let s = c(), { isDrawerFullCover: l, isDrawerOpen: u } = T(o), d = u && !l, f = s.theme === "dark", p;
|
|
371
374
|
t[0] === f ? p = t[1] : (p = r("velora-widget", { dark: f }), t[0] = f, t[1] = p);
|
|
372
375
|
let m;
|
|
373
|
-
t[2] === d ? m = t[3] : (m = /* @__PURE__ */ Q(
|
|
376
|
+
t[2] === d ? m = t[3] : (m = /* @__PURE__ */ Q(me, { open: d }), t[2] = d, t[3] = m);
|
|
374
377
|
let ee;
|
|
375
|
-
t[4] === Symbol.for("react.memo_cache_sentinel") ? (ee = r("overflow-hidden bottom-0 left-0 right-0 absolute transition-transform duration-500 z-11 pointer-events-none
|
|
378
|
+
t[4] === Symbol.for("react.memo_cache_sentinel") ? (ee = r("overflow-hidden bottom-0 left-0 right-0 absolute transition-transform duration-500 z-11 pointer-events-none *:pointer-events-auto", h), t[4] = ee) : ee = t[4];
|
|
376
379
|
let _;
|
|
377
380
|
t[5] === a ? _ = t[6] : (_ = /* @__PURE__ */ Q("div", {
|
|
378
381
|
className: ee,
|
|
@@ -392,7 +395,7 @@ function et(e) {
|
|
|
392
395
|
}
|
|
393
396
|
function tt() {
|
|
394
397
|
let e = Z(1), t;
|
|
395
|
-
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ Q(
|
|
398
|
+
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ Q(j, { classes: { root: "mb-4" } }), e[0] = t) : t = e[0], t;
|
|
396
399
|
}
|
|
397
400
|
function nt() {
|
|
398
401
|
let e = Z(7), t = O(), n;
|
|
@@ -406,11 +409,11 @@ function nt() {
|
|
|
406
409
|
return e[5] === r ? i = e[6] : (i = /* @__PURE__ */ Q(_, { ...r }), e[5] = r, e[6] = i), i;
|
|
407
410
|
}
|
|
408
411
|
function rt() {
|
|
409
|
-
let e = Z(2), t =
|
|
412
|
+
let e = Z(2), t = F(), n;
|
|
410
413
|
return e[0] === t ? n = e[1] : (n = /* @__PURE__ */ Q(_, { ...t }), e[0] = t, e[1] = n), n;
|
|
411
414
|
}
|
|
412
415
|
function it() {
|
|
413
|
-
let e = Z(2), t =
|
|
416
|
+
let e = Z(2), t = W(), n;
|
|
414
417
|
return e[0] === t ? n = e[1] : (n = /* @__PURE__ */ Q(_, { ...t }), e[0] = t, e[1] = n), n;
|
|
415
418
|
}
|
|
416
419
|
function at() {
|
|
@@ -435,11 +438,11 @@ function ot() {
|
|
|
435
438
|
return e[6] === r ? i = e[7] : (i = /* @__PURE__ */ Q(_, { ...r }), e[6] = r, e[7] = i), i;
|
|
436
439
|
}
|
|
437
440
|
function st() {
|
|
438
|
-
let e = Z(2), t =
|
|
441
|
+
let e = Z(2), t = I(), n;
|
|
439
442
|
return e[0] === t ? n = e[1] : (n = /* @__PURE__ */ Q(_, { ...t }), e[0] = t, e[1] = n), n;
|
|
440
443
|
}
|
|
441
444
|
function ct() {
|
|
442
|
-
let e = Z(2), t =
|
|
445
|
+
let e = Z(2), t = G(), n;
|
|
443
446
|
return e[0] === t ? n = e[1] : (n = /* @__PURE__ */ Q(_, { ...t }), e[0] = t, e[1] = n), n;
|
|
444
447
|
}
|
|
445
448
|
function lt() {
|
|
@@ -497,7 +500,7 @@ function mt() {
|
|
|
497
500
|
tokenFrom: r.token,
|
|
498
501
|
tokenTo: a.token
|
|
499
502
|
}, e[17] = r.token, e[18] = a.token, e[19] = c) : c = e[19];
|
|
500
|
-
let l =
|
|
503
|
+
let l = de(c), u = t.priceMode === "market" ? t.price : void 0, d = t.priceMode === "delta" ? t.price : void 0, f;
|
|
501
504
|
return e[20] !== l.className || e[21] !== l.disabled || e[22] !== l.labelOverride || e[23] !== s || e[24] !== t.priceMode || e[25] !== u || e[26] !== d ? (f = /* @__PURE__ */ Q(xt, {
|
|
502
505
|
orderProps: s,
|
|
503
506
|
marketPrice: u,
|
|
@@ -525,35 +528,35 @@ function ht() {
|
|
|
525
528
|
priceError: t.error
|
|
526
529
|
}, e[5] = t.error, e[6] = t.isLoading, e[7] = t.price, e[8] = t.priceMode, e[9] = t.tokenToAmount, e[10] = i) : i = e[10];
|
|
527
530
|
let a = S(i), o = Number(r.amount) > 0 && a.token, s;
|
|
528
|
-
return e[11] === o ? s = e[12] : (s = o ? /* @__PURE__ */ Q(
|
|
531
|
+
return e[11] === o ? s = e[12] : (s = o ? /* @__PURE__ */ Q(k, {}) : null, e[11] = o, e[12] = s), s;
|
|
529
532
|
}
|
|
530
533
|
function gt() {
|
|
531
534
|
let e = Z(3), { isConnected: t } = ze(), n = t, r = d(), i;
|
|
532
|
-
return e[0] !== n || e[1] !== r ? (i = n ? /* @__PURE__ */ Q(
|
|
535
|
+
return e[0] !== n || e[1] !== r ? (i = n ? /* @__PURE__ */ Q(A, {
|
|
533
536
|
classes: { root: "mt-2" },
|
|
534
537
|
type: "swap",
|
|
535
538
|
...r
|
|
536
539
|
}) : null, e[0] = n, e[1] = r, e[2] = i) : i = e[2], i;
|
|
537
540
|
}
|
|
538
541
|
function _t() {
|
|
539
|
-
let e = Z(7), t =
|
|
542
|
+
let e = Z(7), t = P(), n = p(), i;
|
|
540
543
|
e[0] === t ? i = e[1] : (i = r("mt-2", { "pointer-events-none": t }), e[0] = t, e[1] = i);
|
|
541
544
|
let a;
|
|
542
545
|
e[2] === i ? a = e[3] : (a = { root: i }, e[2] = i, e[3] = a);
|
|
543
546
|
let o;
|
|
544
|
-
return e[4] !== n || e[5] !== a ? (o = /* @__PURE__ */ Q(
|
|
547
|
+
return e[4] !== n || e[5] !== a ? (o = /* @__PURE__ */ Q(A, {
|
|
545
548
|
classes: a,
|
|
546
549
|
type: "otc",
|
|
547
550
|
...n
|
|
548
551
|
}), e[4] = n, e[5] = a, e[6] = o) : o = e[6], o;
|
|
549
552
|
}
|
|
550
553
|
function vt() {
|
|
551
|
-
let e = Z(7), t =
|
|
554
|
+
let e = Z(7), t = N(), n = f(), i;
|
|
552
555
|
e[0] === t ? i = e[1] : (i = r("mt-2", { "pointer-events-none": t }), e[0] = t, e[1] = i);
|
|
553
556
|
let a;
|
|
554
557
|
e[2] === i ? a = e[3] : (a = { root: i }, e[2] = i, e[3] = a);
|
|
555
558
|
let o;
|
|
556
|
-
return e[4] !== n || e[5] !== a ? (o = /* @__PURE__ */ Q(
|
|
559
|
+
return e[4] !== n || e[5] !== a ? (o = /* @__PURE__ */ Q(A, {
|
|
557
560
|
classes: a,
|
|
558
561
|
type: "limit",
|
|
559
562
|
...n
|
|
@@ -588,7 +591,7 @@ function xt(e) {
|
|
|
588
591
|
let { isConnected: l } = ze();
|
|
589
592
|
if (!l) {
|
|
590
593
|
let e;
|
|
591
|
-
return t[8] !== n || t[9] !== i ? (e = /* @__PURE__ */ Q(
|
|
594
|
+
return t[8] !== n || t[9] !== i ? (e = /* @__PURE__ */ Q(z, {
|
|
592
595
|
drawerContainer: i,
|
|
593
596
|
...n
|
|
594
597
|
}), t[8] = n, t[9] = i, t[10] = e) : e = t[10], e;
|
|
@@ -602,7 +605,7 @@ function xt(e) {
|
|
|
602
605
|
priceMode: c
|
|
603
606
|
}, t[11] = r, t[12] = o, t[13] = c, t[14] = u) : u = t[14];
|
|
604
607
|
let d = u, f;
|
|
605
|
-
return t[15] !== n || t[16] !== a || t[17] !== s || t[18] !== d ? (f = /* @__PURE__ */ Q(
|
|
608
|
+
return t[15] !== n || t[16] !== a || t[17] !== s || t[18] !== d ? (f = /* @__PURE__ */ Q(L, {
|
|
606
609
|
orderProps: s,
|
|
607
610
|
labelOverride: a,
|
|
608
611
|
...d,
|