@blockend/widget 1.0.54 → 1.0.55-beta.1

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.
Files changed (117) hide show
  1. package/dist/{AllRoutes-CZLcXz0H.js → AllRoutes-D6S-NFxZ.js} +9 -9
  2. package/dist/{Box-DeJ0aAds.js → Box-DESo1bHm.js} +6 -6
  3. package/dist/EstGas-Dy3XfCzY.js +1496 -0
  4. package/dist/{Grow-CAO6QGlH.js → Grow-DzEr7XrA.js} +2 -2
  5. package/dist/{InputComp-Dvng88xF.js → InputComp-GcnDqx_s.js} +3 -3
  6. package/dist/{LoadRoute-Cd75OEeT.js → LoadRoute-BmUgvDid.js} +4 -4
  7. package/dist/{QuotesProgress-DLkS2eIB.js → QuotesProgress-E5JnUMS0.js} +1 -1
  8. package/dist/{SwapAsset-CkPNtJ5Z.js → SwapAsset-MBXcdeBf.js} +1 -1
  9. package/dist/{Tooltip-Du4SfKmq.js → Tooltip-DSAJT2x7.js} +3 -3
  10. package/dist/TxnButton-Br8R19rF.js +215 -0
  11. package/dist/{add-Dy-pn86L.js → add-BryKCrpI.js} +1 -1
  12. package/dist/{all-wallets-DA1Z5Cop.js → all-wallets-BMVOK2Ci.js} +1 -1
  13. package/dist/{app-store-x_6nCb7H.js → app-store-3WurbJdI.js} +1 -1
  14. package/dist/{apple-9Ay4GKtb.js → apple-eM872Ubz.js} +1 -1
  15. package/dist/{arrow-bottom-18IDuPdg.js → arrow-bottom-HMc73fJ8.js} +1 -1
  16. package/dist/{arrow-bottom-circle-C-WRrwmS.js → arrow-bottom-circle-B1N_R8Ux.js} +1 -1
  17. package/dist/{arrow-left-DWFV43Cf.js → arrow-left-Q7GAZkD7.js} +1 -1
  18. package/dist/{arrow-right-CDRqwfO1.js → arrow-right-ft3TcIM3.js} +1 -1
  19. package/dist/{arrow-top-DpR9F1Zo.js → arrow-top-C2xmF6tK.js} +1 -1
  20. package/dist/{bank-Crxq2thP.js → bank-Bk-2ZR5E.js} +1 -1
  21. package/dist/{basic-PUh1GfJc.js → basic-CWrKgDAB.js} +3 -3
  22. package/dist/{browser-Dfq6PNhC.js → browser-BFB3TFfv.js} +1 -1
  23. package/dist/{card-B9qMqocN.js → card-DCx59si8.js} +1 -1
  24. package/dist/{ccip-Cf2jO5BW.js → ccip-CXr08uP1.js} +16 -16
  25. package/dist/{checkmark-BpwBRy8u.js → checkmark-BGsuJuhE.js} +1 -1
  26. package/dist/{checkmark-bold-CWJMusMr.js → checkmark-bold-DvjIl-51.js} +1 -1
  27. package/dist/{chevron-bottom-CEM1QdIG.js → chevron-bottom-DAEnG7QP.js} +1 -1
  28. package/dist/{chevron-left-8vrWG4Fd.js → chevron-left-D33h2ppx.js} +1 -1
  29. package/dist/{chevron-right-DUaL3bYu.js → chevron-right-C8Z_feNK.js} +1 -1
  30. package/dist/{chevron-top-4yRnski9.js → chevron-top-DwDMd3p9.js} +1 -1
  31. package/dist/{chrome-store-BrR0Mo1P.js → chrome-store-B7ZDs2Fj.js} +1 -1
  32. package/dist/{clock-CtzcJX1M.js → clock-DnELUxSR.js} +1 -1
  33. package/dist/{close-B8P3E47p.js → close-Dnt29Pss.js} +1 -1
  34. package/dist/{coinPlaceholder-DhDuAiLE.js → coinPlaceholder-C09pzuXv.js} +1 -1
  35. package/dist/{compass-BPPWXJ9J.js → compass-D8ZY16nH.js} +1 -1
  36. package/dist/{copy-CoDhu1Ub.js → copy-DEh4RBKI.js} +1 -1
  37. package/dist/{core-sNzLDgNd.js → core-CgIQaiRa.js} +16 -17
  38. package/dist/{cursor-CtGaAByR.js → cursor-BtzkAOER.js} +1 -1
  39. package/dist/{cursor-transparent-DzDZGaUH.js → cursor-transparent-B0nCflmb.js} +1 -1
  40. package/dist/{desktop-Cj6KJIR5.js → desktop-toTG92uH.js} +1 -1
  41. package/dist/{disconnect-0YabDe1z.js → disconnect-C97lbAtY.js} +1 -1
  42. package/dist/{discord-BliaK0NG.js → discord-BNJ3JePY.js} +1 -1
  43. package/dist/{down-DbUDTC9S.js → down-BFx-Bg5Q.js} +2 -2
  44. package/dist/{etherscan-Bu-d0d8T.js → etherscan-CK87TQMS.js} +1 -1
  45. package/dist/{exclamation-triangle-CkhIEkFa.js → exclamation-triangle-LWnOk0uz.js} +1 -1
  46. package/dist/{extension-2PmFOLpz.js → extension-5eIZU28A.js} +1 -1
  47. package/dist/{external-link-D5PBXR8n.js → external-link-DDlCfigP.js} +1 -1
  48. package/dist/{facebook-DvVHhnfi.js → facebook-1lTMXKeH.js} +1 -1
  49. package/dist/{farcaster-DhlI9PJI.js → farcaster-Di2TUKlZ.js} +1 -1
  50. package/dist/{filters-D4VXGXuc.js → filters-B_THnHaX.js} +1 -1
  51. package/dist/{getChainIds-Dnj79lnq.js → getChainIds-CeLEUxe0.js} +69 -69
  52. package/dist/getCosmosAddress-B8s9Ycj4.js +6075 -0
  53. package/dist/{github-DZzzrfMb.js → github-D5B1FE4K.js} +1 -1
  54. package/dist/{google-BJIEVX0w.js → google-C8_WSUfw.js} +1 -1
  55. package/dist/{hamburger-BtEtsv7a.js → hamburger-BzMrQx9y.js} +5 -5
  56. package/dist/{help-circle-BZN3LxgA.js → help-circle-C-ZOzjAP.js} +1 -1
  57. package/dist/{id-qpbgew6W.js → id-BynpKmej.js} +1 -1
  58. package/dist/{image-BaqsaTku.js → image-BRYUh760.js} +1 -1
  59. package/dist/{index-C4AhSjEZ.js → index-A8ClQmZo.js} +1 -1
  60. package/dist/{index-Bk1RmZa6.js → index-BFUVWgoD.js} +78 -78
  61. package/dist/{index-ZzUKHS4f.js → index-BK0BZT6j.js} +2600 -2622
  62. package/dist/index-C5bv1F_u.js +48843 -0
  63. package/dist/{index-DIhlHD0K.js → index-CN6pVc2G.js} +233 -241
  64. package/dist/index-CZwuzz6v.js +6712 -0
  65. package/dist/{index-B03PUlPY.js → index-DHYWnqST.js} +1 -1
  66. package/dist/{index-bGQWpwjq.js → index-Dnyeih-W.js} +884 -813
  67. package/dist/{index-ZDMBVRLP.js → index-DpHhW0_2.js} +2 -2
  68. package/dist/{index-BQ82b0Bz.js → index-SkYFFVLL.js} +11 -11
  69. package/dist/index-krrwn6Pi.js +206 -0
  70. package/dist/{index.es-eZ31W0zo.js → index.es-DB9y_DEM.js} +1 -1
  71. package/dist/index.es-vIyUKt0W.js +13232 -0
  72. package/dist/index.es.js +1 -1
  73. package/dist/{info-CT1yToBP.js → info-DSQyHS8b.js} +1 -1
  74. package/dist/{info-circle-CMum6ujM.js → info-circle-BfpWcI4c.js} +1 -1
  75. package/dist/{lightbulb-e5tzYo3T.js → lightbulb-DEMYYsZd.js} +1 -1
  76. package/dist/{mail-Cotk1RnP.js → mail-DNZ2to_6.js} +1 -1
  77. package/dist/{mobile-BQMdX8sa.js → mobile-qsyS8oMK.js} +1 -1
  78. package/dist/{more-B7uYy_Eq.js → more-CnBuKwll.js} +1 -1
  79. package/dist/{network-placeholder-CIPNNK4H.js → network-placeholder-DhJITakA.js} +1 -1
  80. package/dist/{nftPlaceholder-D2GoBPY-.js → nftPlaceholder-DD3-Cc9U.js} +1 -1
  81. package/dist/{off-BK14JFh_.js → off-CBApAdDk.js} +1 -1
  82. package/dist/{play-store-DwBENt3_.js → play-store-DDoeRc-b.js} +1 -1
  83. package/dist/{plus-C0y88Ad4.js → plus-C3J-XWCn.js} +1 -1
  84. package/dist/{qr-code-CMdrrElE.js → qr-code-CEoOYtHk.js} +1 -1
  85. package/dist/{recycle-horizontal-BNN5ndLG.js → recycle-horizontal-BHJ_s9Yx.js} +1 -1
  86. package/dist/{refresh-ByH9t7MU.js → refresh-CtzOoHls.js} +1 -1
  87. package/dist/{reown-logo-cDM3ybDW.js → reown-logo-BOj4YDUQ.js} +1 -1
  88. package/dist/{search-vSwnIemK.js → search--Miza3A_.js} +1 -1
  89. package/dist/{send-DxaTA9HH.js → send-Bhl1lz4j.js} +1 -1
  90. package/dist/{swapHorizontal-C3T9QpOz.js → swapHorizontal-CCvKCngz.js} +1 -1
  91. package/dist/{swapHorizontalBold-NoD7qi56.js → swapHorizontalBold-B90V-dXL.js} +1 -1
  92. package/dist/{swapHorizontalMedium-BdCnGCU3.js → swapHorizontalMedium-CYjeHjnI.js} +1 -1
  93. package/dist/{swapHorizontalRoundedBold-DOvYr1PV.js → swapHorizontalRoundedBold-DSMWeXdW.js} +1 -1
  94. package/dist/{swapVertical-B_QsPb4Z.js → swapVertical-DOJUNIvk.js} +1 -1
  95. package/dist/{telegram-Cgehpwsc.js → telegram-CufEY_4d.js} +1 -1
  96. package/dist/{three-dots-XdbxmzC6.js → three-dots-J2ngva7G.js} +1 -1
  97. package/dist/{twitch-BGHF2xBF.js → twitch-B4vTKVf5.js} +1 -1
  98. package/dist/{twitterIcon-DRtvBUSa.js → twitterIcon-DLrxpAGg.js} +1 -1
  99. package/dist/{unsupportedProp-9RcsuuVU.js → unsupportedProp-BLzY2-w_.js} +1 -1
  100. package/dist/{useRegisterError-lBlc4VLM.js → useRegisterError-Cf6oylnR.js} +1 -1
  101. package/dist/{verify-Cha1vhGY.js → verify-CbHqPQKs.js} +1 -1
  102. package/dist/{verify-filled-CpQ_9swy.js → verify-filled-CzKx9Cph.js} +1 -1
  103. package/dist/{w3m-modal-BbwlJ8yr.js → w3m-modal-DhpjK4cG.js} +2 -2
  104. package/dist/{wallet-DhTEGAG5.js → wallet-CvIeO6On.js} +1 -1
  105. package/dist/{wallet-placeholder-CBEwQiaT.js → wallet-placeholder-BqELXTBj.js} +1 -1
  106. package/dist/{walletconnect-MNB_N68_.js → walletconnect-BN4c4XQ5.js} +1 -1
  107. package/dist/{warning-circle-CyvNTyr_.js → warning-circle--dqxXujk.js} +1 -1
  108. package/dist/{x-CLNpY2cT.js → x-CkCp5gtL.js} +1 -1
  109. package/package.json +4 -2
  110. package/dist/EstGas-oDFlpjSW.js +0 -20281
  111. package/dist/TxnButton-B1GkXFSh.js +0 -223
  112. package/dist/getCosmosAddress-D5-u0UJp.js +0 -9566
  113. package/dist/index-Bp8U0z_r.js +0 -206
  114. package/dist/index-DKVwgDNZ.js +0 -29422
  115. package/dist/index-DTish3yr.js +0 -1014
  116. package/dist/index-xuyPmNnz.js +0 -160
  117. package/dist/index.es-CvlSpQGV.js +0 -11678
@@ -1,8 +1,8 @@
1
1
  import * as D from "react";
2
2
  import kt from "react";
3
- import { p as J, P as i, aE as St, n as Bt, g as Wt, b as Lt, _ as Te, d as z, h as Nt, i as Ht, s as Vt } from "./index-DKVwgDNZ.js";
3
+ import { p as J, P as i, aR as St, o as Bt, g as Wt, b as Lt, _ as Te, d as z, h as Nt, i as Ht, s as Vt } from "./index-C5bv1F_u.js";
4
4
  import { jsx as de } from "react/jsx-runtime";
5
- import { o as et, P as It, b as Se, a as tt, m as Ut, r as mt, h as qt, H as Ee, T as Ft, q as _t, j as Xt, n as zt, t as rt, v as Yt, w as Gt } from "./useRegisterError-lBlc4VLM.js";
5
+ import { o as et, P as It, b as Se, a as tt, m as Ut, r as mt, h as qt, H as Ee, T as Ft, q as _t, j as Xt, n as zt, t as rt, v as Yt, w as Gt } from "./useRegisterError-Cf6oylnR.js";
6
6
  let nt = 0;
7
7
  function Jt(e) {
8
8
  const [t, r] = D.useState(e), n = e || t;
@@ -1,10 +1,10 @@
1
1
  import { jsxs as b, jsx as t, Fragment as k } from "react/jsx-runtime";
2
- import { u as n, S as W } from "./index-DKVwgDNZ.js";
2
+ import { u as n, S as W } from "./index-C5bv1F_u.js";
3
3
  import { useState as S, useRef as x } from "react";
4
- import { u as j, i as I, W as D, F, f as p, c as u, z as R } from "./useRegisterError-lBlc4VLM.js";
4
+ import { u as j, i as I, W as D, F, f as p, c as u, z as R } from "./useRegisterError-Cf6oylnR.js";
5
5
  import { useAccount as T, useBalance as A } from "wagmi";
6
6
  import "@dynamic-labs/sdk-react-core";
7
- import { c as B, r as G } from "./index-DIhlHD0K.js";
7
+ import { c as B, r as G } from "./index-CN6pVc2G.js";
8
8
  function H({ amount: w, setAmount: l, fetchBalance: M, getCoinBalance: h, isBalanceLoading: f }) {
9
9
  var d, o;
10
10
  const s = n((a) => a.configuration), e = n((a) => a.fromCoin), r = n((a) => a.fromChain), { isAnyWalletConnected: g } = j({ chainData: r }), [$, z] = S(40), { address: N } = T(), v = x(), { defaultCoin: y } = I;
@@ -1,13 +1,13 @@
1
1
  import { jsx as e, jsxs as t, Fragment as m } from "react/jsx-runtime";
2
2
  import { t as te } from "./truncate-D9t92mVX.js";
3
- import { u as r, S as o, l as we } from "./index-DKVwgDNZ.js";
3
+ import { u as r, S as o, l as we } from "./index-C5bv1F_u.js";
4
4
  import { useState as ie, useEffect as le } from "react";
5
5
  import { s as a } from "./WidgetForm.module-QHJ0-m5f.js";
6
6
  import { G as ce, C as de, S as me } from "./clockIcon-C2W5xvyt.js";
7
- import { S as re } from "./down-DbUDTC9S.js";
7
+ import { S as re } from "./down-BFx-Bg5Q.js";
8
8
  import { e as se } from "./ethertousd-CC_ezooz.js";
9
- import { O as H } from "./index-C4AhSjEZ.js";
10
- import { F as J, i as ae } from "./useRegisterError-lBlc4VLM.js";
9
+ import { O as H } from "./index-A8ClQmZo.js";
10
+ import { F as J, i as ae } from "./useRegisterError-Cf6oylnR.js";
11
11
  function oe({ fill: n }) {
12
12
  return /* @__PURE__ */ e(
13
13
  "svg",
@@ -1,6 +1,6 @@
1
1
  import { jsxs as o, jsx as a, Fragment as m } from "react/jsx-runtime";
2
2
  import { s as l } from "./WidgetForm.module-QHJ0-m5f.js";
3
- import { u as g } from "./index-DKVwgDNZ.js";
3
+ import { u as g } from "./index-C5bv1F_u.js";
4
4
  function y({ routesData: x, routes: e, quoteTimer: n, amount: c }) {
5
5
  var s, b, d, w;
6
6
  const r = g((i) => i.configuration), t = g((i) => i.gradient);
@@ -1,5 +1,5 @@
1
1
  import { jsxs as s, jsx as t } from "react/jsx-runtime";
2
- import { u as a } from "./index-DKVwgDNZ.js";
2
+ import { u as a } from "./index-C5bv1F_u.js";
3
3
  function w({ fill1: o, fill2: r }) {
4
4
  return /* @__PURE__ */ s(
5
5
  "svg",
@@ -1,8 +1,8 @@
1
- import { b as go, g as To, i as yo, _ as vo, p as B, d as n, e as D, s as Q, f as Ve, h as Po, j as ze, P as e } from "./index-DKVwgDNZ.js";
1
+ import { b as go, g as To, i as yo, _ as vo, p as B, d as n, e as D, s as Q, f as Ve, h as Po, j as ze, P as e } from "./index-C5bv1F_u.js";
2
2
  import * as p from "react";
3
- import { G as Be, b as wo, u as Ro, a as Co, P as He } from "./Grow-CAO6QGlH.js";
3
+ import { G as Be, b as wo, u as Ro, a as Co, P as He } from "./Grow-DzEr7XrA.js";
4
4
  import { jsx as j, jsxs as Se } from "react/jsx-runtime";
5
- import { j as xo, q as I, l as Ue, s as Oo, b as Eo, n as Mo, D as A, E as _o, w as No } from "./useRegisterError-lBlc4VLM.js";
5
+ import { j as xo, q as I, l as Ue, s as Oo, b as Eo, n as Mo, D as A, E as _o, w as No } from "./useRegisterError-Cf6oylnR.js";
6
6
  function Lo(r) {
7
7
  return To("MuiTooltip", r);
8
8
  }
@@ -0,0 +1,215 @@
1
+ import { jsx as B } from "react/jsx-runtime";
2
+ import { useState as A, useEffect as v } from "react";
3
+ import { useDynamicContext as xe, useSwitchNetwork as ve, useIsLoggedIn as ze } from "@dynamic-labs/sdk-react-core";
4
+ import { a as _, u as h, aI as Me, aJ as ue } from "./index-C5bv1F_u.js";
5
+ import { s as G } from "./WidgetForm.module-QHJ0-m5f.js";
6
+ import { useAccount as Oe, useConfig as Re, useSwitchChain as Ve, useBalance as Pe } from "wagmi";
7
+ import { u as ge, d as _e, c as qe, C as ye } from "./useRegisterError-Cf6oylnR.js";
8
+ import { v as Je } from "./validError-CDlJpg_f.js";
9
+ import { u as Qe, g as He, p as Ke } from "./index-CN6pVc2G.js";
10
+ function Ue(n) {
11
+ const { wallet: u, address: l } = _(), [N, f] = A(0);
12
+ async function g() {
13
+ const E = await window.tronWeb.trx.getBalance(l);
14
+ f(E / Math.pow(10, 6));
15
+ }
16
+ return v(() => {
17
+ l && (n == null ? void 0 : n.networkType) === "tron" && g();
18
+ }, [l, n == null ? void 0 : n.networkType]), { tronBal: N };
19
+ }
20
+ function j(n) {
21
+ if (n.key.toLowerCase() === "backpacksol")
22
+ return !0;
23
+ }
24
+ function Xe() {
25
+ const [n, u] = A(0), l = h((g) => g.fromChain), { primaryWallet: N } = xe();
26
+ async function f() {
27
+ let g = await N.getBalance();
28
+ u(Number(g) || 0);
29
+ }
30
+ return v(() => {
31
+ (l.networkType === "btc" || l.networkType === "sui") && f();
32
+ }, [l.networkType, N]), n;
33
+ }
34
+ function ds({ routesData: n, routes: u, amount: l, isAmountTyped: N, handleShowWallet: f, setConnectWalletField: g, handleConfirmClose: E, balanceSol: F, getCoinBalance: Te, handleSuccess: q }) {
35
+ var k, C, ee, se, te, re, ce, ne, ie, de, ae, le, oe;
36
+ const o = h((t) => t.gradient), I = h((t) => t.configuration), e = h((t) => t.fromChain), i = h((t) => t.fromCoin), r = h((t) => t.toChain), w = h((t) => t.toCoin), { isConnected: L, address: J, chain: m } = Oe(), { address: Q, isConnected: Ye } = _(), Ie = Re(), me = ve(), { getBothWalletConnection: he, getConnectWallet: Ne } = ge({
37
+ chainData: e
38
+ }), { connected: H, address: K, disconnect: Ze } = _(), z = h((t) => t.toDisconnect), d = h((t) => t.customWallet), { getWallet: fe } = ge({ chainData: e }), Be = Ne(e, r), [M, Ge] = A("101"), { tronBal: O } = Ue(e), { cosmosBalance: U } = Qe(), X = Xe(), R = ((k = e.chain) == null ? void 0 : k.length) && ((C = r.chain) == null ? void 0 : C.length), V = ((ee = i.address) == null ? void 0 : ee.length) && ((se = w.address) == null ? void 0 : se.length), Se = _e(), Y = Me(), { switchChain: We, switchChainAsync: $e, isPending: Ee } = Ve({
39
+ chainId: Number((e == null ? void 0 : e.chainId) || "0"),
40
+ config: Ie,
41
+ throwForSwitchChainNotSupported: !0,
42
+ onError(t) {
43
+ Je(t.message) && Se({ module: "wallet-error-switch", error: t.message });
44
+ }
45
+ }), y = Pe({
46
+ address: J,
47
+ token: "",
48
+ chainId: Number((e == null ? void 0 : e.chainId) || 0),
49
+ enabled: (e == null ? void 0 : e.networkType) == "evm"
50
+ }), Z = qe(Te || 0, 11), [b, a] = A({
51
+ text: "",
52
+ isGradient: !1,
53
+ color: "bw-bg-border-primary"
54
+ });
55
+ async function Fe() {
56
+ if ((e == null ? void 0 : e.networkType) === "evm" && Number((e == null ? void 0 : e.chainId) || "0") !== (m == null ? void 0 : m.id))
57
+ try {
58
+ await $e({ chainId: Number((e == null ? void 0 : e.chainId) || "0") });
59
+ } catch {
60
+ }
61
+ else if ((e == null ? void 0 : e.networkType) === "sol" && M !== ((e == null ? void 0 : e.chainId) == "eclipse-svm" ? "201" : "101"))
62
+ try {
63
+ let t = await me({ wallet: p, network: e.chainId == "eclipse-svm" ? "201" : "101" });
64
+ W();
65
+ } catch {
66
+ }
67
+ else (e == null ? void 0 : e.networkType) === "sui" ? (Y.emit(ue.TransactionStarted, {
68
+ ...n
69
+ }), S && (q(!1), E())) : (Y.emit(ue.TransactionStarted, {
70
+ ...n
71
+ }), S && (q(!1), E()));
72
+ }
73
+ const { primaryWallet: p } = xe(), P = ze(), S = (e == null ? void 0 : e.networkType) === r.networkType ? !!((re = (te = fe(e)) == null ? void 0 : te.address) != null && re.length) : he(e == null ? void 0 : e.networkType, (d == null ? void 0 : d.length) > 30 ? "customWallet" : r == null ? void 0 : r.networkType), W = async () => {
74
+ if (p)
75
+ try {
76
+ const t = await p.getNetwork();
77
+ Ge(t);
78
+ } catch {
79
+ }
80
+ else
81
+ return;
82
+ };
83
+ v(() => {
84
+ W();
85
+ }, [p]);
86
+ function D(t, x) {
87
+ let T = t / Math.pow(10, x);
88
+ return T < 1e-6 ? T.toFixed(20) : T;
89
+ }
90
+ function Le() {
91
+ var t;
92
+ return Number(((t = y == null ? void 0 : y.data) == null ? void 0 : t.formatted) || 0);
93
+ }
94
+ function je(t) {
95
+ var x;
96
+ return Number(((x = U[Ke(t.address)]) == null ? void 0 : x.amount) || 0) / Math.pow(10, t.decimals);
97
+ }
98
+ function Ae() {
99
+ var we;
100
+ let t = {};
101
+ async function x(s, c) {
102
+ let $ = Object.keys(t);
103
+ t[s == null ? void 0 : s.chainId] ? (t[s == null ? void 0 : s.chainId].amountInToken += c.amountInToken, t[s == null ? void 0 : s.chainId].gas += D(c.amountInToken, s == null ? void 0 : s.decimals)) : t[s == null ? void 0 : s.chainId] = {
104
+ amountInToken: c.amountInToken,
105
+ gas: D(c.amountInToken, s == null ? void 0 : s.decimals),
106
+ token: s,
107
+ nativeBal: (d == null ? void 0 : d.length) > 30 && !z && (s == null ? void 0 : s.chainId) == (r == null ? void 0 : r.chainId) && (r == null ? void 0 : r.chainId) !== (e == null ? void 0 : e.chainId) ? 0 : (s == null ? void 0 : s.networkType) == "sol" ? F : (s == null ? void 0 : s.networkType) == "tron" ? O : (s == null ? void 0 : s.networkType) == "btc" || (s == null ? void 0 : s.networkType) == "sui" ? X : (s == null ? void 0 : s.networkType) == "cosmos" ? je(s) : (s == null ? void 0 : s.networkType) == "tron" ? He(Q) : Le(),
108
+ isFromChain: (e == null ? void 0 : e.chainId) === (s == null ? void 0 : s.chainId.toString()),
109
+ order: (e == null ? void 0 : e.chainId) === (s == null ? void 0 : s.chainId) ? 1 : (r == null ? void 0 : r.chainId) === (s == null ? void 0 : s.chainId) ? 2 : $.length > 2 ? 3 : 2
110
+ };
111
+ }
112
+ (we = n == null ? void 0 : n.fee) == null || we.forEach((s) => {
113
+ const { token: c } = s;
114
+ s.source.toLowerCase() == "from_source_wallet" && x(c, s);
115
+ });
116
+ let T = Z;
117
+ if (Number(l) > Number(T))
118
+ a({
119
+ text: `Insufficient Balance ${i.coin || ""}`,
120
+ isGradient: !1,
121
+ color: "bw-bg-border-primary"
122
+ });
123
+ else if ((y != null && y.isLoading || y.isFetching) && (e == null ? void 0 : e.networkType) === "evm" || (typeof F > "u" || F === null) && (e == null ? void 0 : e.networkType) === "sol" || !O && (e == null ? void 0 : e.networkType) === "tron")
124
+ a({
125
+ text: "Fetching Balance..",
126
+ isGradient: !1,
127
+ color: "bw-bg-border-primary"
128
+ });
129
+ else {
130
+ let s = Object.values(t).sort((c, $) => c.order - $.order);
131
+ s.some((c) => {
132
+ var $, be, pe;
133
+ return c != null && c.isFromChain && Number(l) <= Number(T) && Number(c.nativeBal) - Number(l) < c.gas && (i != null && i.isNative) || Number(l) <= Number(T) && Number(c.nativeBal) < c.gas && !(i != null && i.isNative) && (c != null && c.isFromChain) ? (a({
134
+ text: `Insufficient ${(($ = c == null ? void 0 : c.token) == null ? void 0 : $.symbol) || ""} for gas on ${c.token.blockchain}`,
135
+ isGradient: !1,
136
+ color: "bw-bg-border-primary"
137
+ }), !0) : c.nativeBal < c.gas && !((d == null ? void 0 : d.length) > 30 && ((be = c == null ? void 0 : c.token) == null ? void 0 : be.chainId) == (r == null ? void 0 : r.chainId)) ? (a({
138
+ text: `Insufficient ${((pe = c == null ? void 0 : c.token) == null ? void 0 : pe.symbol) || ""} for gas on ${c.token.blockchain}`,
139
+ isGradient: !1,
140
+ color: "bw-bg-border-primary"
141
+ }), !0) : (a({
142
+ text: "",
143
+ isGradient: !0,
144
+ color: o || G.gradientbutton
145
+ }), !0);
146
+ }), s.length == 0 && (n != null && n.gasless || (n == null ? void 0 : n.provider) == "meson") && a({
147
+ text: "",
148
+ isGradient: !0,
149
+ color: o || G.gradientbutton
150
+ });
151
+ }
152
+ }
153
+ return v(() => {
154
+ var t, x, T;
155
+ !i.coin.length || !(w != null && w.coin.length) ? a({
156
+ text: "Select Token",
157
+ isGradient: !0,
158
+ color: o || G.gradientbutton
159
+ }) : S ? typeof l < "u" && Number(l || 0) <= 0 ? a({
160
+ text: "Enter Amount",
161
+ isGradient: !1,
162
+ color: "bw-bg-border-primary"
163
+ }) : u.isFetching || !N ? a({
164
+ text: "Loading Routes...",
165
+ isGradient: !1,
166
+ color: "bw-bg-border-primary"
167
+ }) : e.chainId === "eclipse-svm" && !j(p) ? a({
168
+ text: `Select ${e.name} wallet`,
169
+ isGradient: !0,
170
+ color: o || G.gradientbutton
171
+ }) : r.chainId === "eclipse-svm" && e.chainId !== "eclipse-svm" && !j(p) && d.length < 30 ? a({
172
+ text: "Enter recipient wallet address",
173
+ isGradient: !0,
174
+ color: o || G.gradientbutton
175
+ }) : (i == null ? void 0 : i.address) == (w == null ? void 0 : w.address) && (e == null ? void 0 : e.chainId) == (r == null ? void 0 : r.chainId) && !(d != null && d.length) || (e == null ? void 0 : e.networkType) == "evm" && J === d && (i == null ? void 0 : i.address) == (w == null ? void 0 : w.address) || (e == null ? void 0 : e.networkType) == "sol" && (p == null ? void 0 : p.address) === d && (i == null ? void 0 : i.address) == (w == null ? void 0 : w.address) ? a({
176
+ text: "From and To asset can not be the same!",
177
+ isGradient: !1,
178
+ color: "bw-bg-border-primary"
179
+ }) : (T = (x = (t = u == null ? void 0 : u.data) == null ? void 0 : t.data) == null ? void 0 : x.quotes) != null && T.length ? u != null && u.error ? a({
180
+ text: "Failed to fetch Quotes",
181
+ isGradient: !1,
182
+ color: "bw-bg-border-primary"
183
+ }) : L && Number((e == null ? void 0 : e.chainId) || "0") !== (m == null ? void 0 : m.id) && (e == null ? void 0 : e.networkType) === "evm" || P && ((e == null ? void 0 : e.chainId) === "eclipse-svm" ? "201" : "101") !== M && (e == null ? void 0 : e.networkType) === "sol" ? a({
184
+ text: `Switch Chain to ${e.chain}`,
185
+ isGradient: !0,
186
+ color: o || G.gradientbutton
187
+ }) : Ae() : a({
188
+ text: "No Routes Found",
189
+ isGradient: !1,
190
+ color: "bw-bg-border-primary"
191
+ }) : a({
192
+ text: "",
193
+ isGradient: !0,
194
+ color: o || G.gradientbutton
195
+ });
196
+ }, [M, p, i, w, l, e, r, (ce = y.data) == null ? void 0 : ce.formatted, n, y.isFetching, y.isLoading, L, Z, S, u.isFetching, m == null ? void 0 : m.id, N, O, F, d, X, U, Q]), `${(ne = e.chain) == null ? void 0 : ne.toLowerCase()}`, `${(ie = e.chain) == null ? void 0 : ie.toLowerCase()}`, /* @__PURE__ */ B(
197
+ "button",
198
+ {
199
+ style: b != null && b.isGradient && R && V ? {
200
+ ...I == null ? void 0 : I.gradientStyle,
201
+ boxShadow: I && I.customTheme && ((ae = (de = I.customTheme) == null ? void 0 : de.shadow) == null ? void 0 : ae.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
202
+ } : {
203
+ boxShadow: I && I.customTheme && ((oe = (le = I.customTheme) == null ? void 0 : le.shadow) == null ? void 0 : oe.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
204
+ },
205
+ className: `bw-w-full bw-rounded-sm bw-h-[52px] ${b != null && b.isGradient ? "bw-p-[3px]" : "bw-p-[1px]"} bw-mt-3 bw-border-0 bw-relative bw-z-0 disabled:bw-opacity-70 ${R && V && b.color} ${b.text.length > 29 ? "bw-text-xl" : "bw-text-2xl"} ${b != null && b.isGradient ? "bw-font-bold bw-text-text-primary" : "bw-font-normal bw-text-text-secondary"}`,
206
+ onClick: () => {
207
+ S || (f(!0), ((e == null ? void 0 : e.networkType) !== "evm" && L || (e == null ? void 0 : e.networkType) !== "sol" && P && p !== null || (e == null ? void 0 : e.networkType) !== "tron" && H && K) && !z ? g("from") : L && (r == null ? void 0 : r.networkType) !== "evm" || P && (r == null ? void 0 : r.networkType) !== "sol" || (r == null ? void 0 : r.networkType) !== "tron" && H && K || z ? g("to") : g("from")), e.chainId === "eclipse-svm" && !j(p) ? (f(!0), g("from")) : r.chainId === "eclipse-svm" && e.chainId !== "eclipse-svm" && !j(p) && d.length < 30 ? (f(!0), g("to")) : Fe();
208
+ },
209
+ children: /* @__PURE__ */ B("div", { className: "bw-rounded-sm bw-bg-background-container bw-flex bw-items-center bw-justify-center b-w-full bw-h-full", children: /* @__PURE__ */ B("p", { className: "bw-relative bw-z-20", children: R && V ? Ee ? /* @__PURE__ */ B("div", { className: "bw-w-[30px] bw-flex bw-text-text-secondary bw-justify-center bw-items-center bw-h-[30px]", children: /* @__PURE__ */ B(ye, { size: 22, thickness: 5, color: "inherit" }) }) : S ? b.text.length ? b.text : "Start Transaction" : `Connect ${Be} Wallet` : /* @__PURE__ */ B("div", { className: "bw-w-[30px] bw-flex bw-text-text-secondary bw-justify-center bw-items-center bw-h-[30px]", children: /* @__PURE__ */ B(ye, { size: 22, thickness: 5, color: "inherit" }) }) }) })
210
+ }
211
+ );
212
+ }
213
+ export {
214
+ ds as default
215
+ };
@@ -1,4 +1,4 @@
1
- import { m as l } from "./core-sNzLDgNd.js";
1
+ import { m as l } from "./core-CgIQaiRa.js";
2
2
  const o = l`<svg
3
3
  width="14"
4
4
  height="14"
@@ -1,4 +1,4 @@
1
- import { m as a } from "./core-sNzLDgNd.js";
1
+ import { m as a } from "./core-CgIQaiRa.js";
2
2
  const o = a`<svg fill="none" viewBox="0 0 24 24">
3
3
  <path
4
4
  style="fill: var(--wui-color-accent-100);"
@@ -1,4 +1,4 @@
1
- import { m as a } from "./core-sNzLDgNd.js";
1
+ import { m as a } from "./core-CgIQaiRa.js";
2
2
  const e = a`
3
3
  <svg width="36" height="36">
4
4
  <path
@@ -1,4 +1,4 @@
1
- import { m as l } from "./core-sNzLDgNd.js";
1
+ import { m as l } from "./core-CgIQaiRa.js";
2
2
  const f = l`<svg fill="none" viewBox="0 0 40 40">
3
3
  <g clip-path="url(#a)">
4
4
  <g clip-path="url(#b)">
@@ -1,4 +1,4 @@
1
- import { m as o } from "./core-sNzLDgNd.js";
1
+ import { m as o } from "./core-CgIQaiRa.js";
2
2
  const e = o`<svg fill="none" viewBox="0 0 14 15">
3
3
  <path
4
4
  fill="currentColor"
@@ -1,4 +1,4 @@
1
- import { m as C } from "./core-sNzLDgNd.js";
1
+ import { m as C } from "./core-CgIQaiRa.js";
2
2
  const e = C`<svg
3
3
  fill="none"
4
4
  viewBox="0 0 21 20"
@@ -1,4 +1,4 @@
1
- import { m as e } from "./core-sNzLDgNd.js";
1
+ import { m as e } from "./core-CgIQaiRa.js";
2
2
  const o = e`<svg fill="none" viewBox="0 0 14 15">
3
3
  <path
4
4
  fill="currentColor"
@@ -1,4 +1,4 @@
1
- import { m as l } from "./core-sNzLDgNd.js";
1
+ import { m as l } from "./core-CgIQaiRa.js";
2
2
  const e = l`<svg fill="none" viewBox="0 0 14 15">
3
3
  <path
4
4
  fill="currentColor"
@@ -1,4 +1,4 @@
1
- import { m as o } from "./core-sNzLDgNd.js";
1
+ import { m as o } from "./core-CgIQaiRa.js";
2
2
  const e = o`<svg fill="none" viewBox="0 0 14 15">
3
3
  <path
4
4
  fill="currentColor"
@@ -1,4 +1,4 @@
1
- import { m as e } from "./core-sNzLDgNd.js";
1
+ import { m as e } from "./core-CgIQaiRa.js";
2
2
  const o = e`<svg
3
3
  xmlns="http://www.w3.org/2000/svg"
4
4
  width="12"
@@ -1,6 +1,6 @@
1
- import { i as D, e as G, r as q, a as A, x as c, C as U, A as M, O as tt, b as z, E as et, R as O, c as Ut, d as K, f as N, S as pe, g as Cn, W as fe, h as Ze, j as vi, T as ti, k as Xt, M as on, l as rn, m as Dt, n as yi, o as $n } from "./core-sNzLDgNd.js";
2
- import { n as u, c as B, o as W, r as E, U as ht, e as Rn, f as En, a as In } from "./index-Bk1RmZa6.js";
3
- import { n as Wn } from "./index-DKVwgDNZ.js";
1
+ import { i as D, e as G, r as q, a as A, x as c, C as U, A as M, O as tt, b as z, E as et, R as O, c as Ut, d as K, f as N, S as pe, g as Cn, W as fe, h as Ze, j as vi, T as ti, k as Xt, M as on, l as rn, m as Dt, n as yi, o as $n } from "./core-CgIQaiRa.js";
2
+ import { n as u, c as B, o as W, r as E, U as ht, e as Rn, f as En, a as In } from "./index-BFUVWgoD.js";
3
+ import { o as Wn } from "./index-C5bv1F_u.js";
4
4
  const Sn = D`
5
5
  :host {
6
6
  position: relative;
@@ -1,4 +1,4 @@
1
- import { m as l } from "./core-sNzLDgNd.js";
1
+ import { m as l } from "./core-CgIQaiRa.js";
2
2
  const a = l`<svg fill="none" viewBox="0 0 20 20">
3
3
  <path
4
4
  fill="currentColor"
@@ -1,4 +1,4 @@
1
- import { m as C } from "./core-sNzLDgNd.js";
1
+ import { m as C } from "./core-CgIQaiRa.js";
2
2
  const l = C`<svg
3
3
  xmlns="http://www.w3.org/2000/svg"
4
4
  width="12"
@@ -1,4 +1,4 @@
1
- import { ad as L, ae as b, af as F, ag as N, ah as P, ai as w, aj as S, ak as E, al as $, am as C, an as I, ao as m, ap as G, aq as R, ar as k, as as y, at as O, au as q, av as T, aw as v, ax as D, ay as A, az as H } from "./index-DKVwgDNZ.js";
1
+ import { al as L, am as b, an as F, ao as N, ap as P, aq as w, ar as S, as as E, at as $, au as C, av as G, aw as m, ax as I, ay as A, az as R, aA as y, aB as O, aC as q, aD as D, aE as T, aF as v, aG as k, aH as H } from "./index-C5bv1F_u.js";
2
2
  const h = "/docs/contract/encodeErrorResult";
3
3
  function x(t) {
4
4
  const { abi: s, errorName: a, args: r } = t;
@@ -21,7 +21,7 @@ function x(t) {
21
21
  return S([n, o]);
22
22
  }
23
23
  const p = "/docs/contract/encodeFunctionResult";
24
- function j(t) {
24
+ function B(t) {
25
25
  const { abi: s, functionName: a, result: r } = t;
26
26
  let e = s[0];
27
27
  if (a) {
@@ -46,15 +46,15 @@ function j(t) {
46
46
  return w(e.outputs, c);
47
47
  }
48
48
  const U = "x-batch-gateway:true";
49
- async function B(t) {
50
- const { data: s, ccipRequest: a } = t, { args: [r] } = I({ abi: m, data: s }), e = [], c = [];
49
+ async function j(t) {
50
+ const { data: s, ccipRequest: a } = t, { args: [r] } = G({ abi: m, data: s }), e = [], c = [];
51
51
  return await Promise.all(r.map(async (n, o) => {
52
52
  try {
53
53
  c[o] = await a(n), e[o] = !1;
54
54
  } catch (u) {
55
55
  e[o] = !0, c[o] = _(u);
56
56
  }
57
- })), j({
57
+ })), B({
58
58
  abi: m,
59
59
  functionName: "query",
60
60
  result: [e, c]
@@ -66,16 +66,16 @@ function _(t) {
66
66
  errorName: "HttpError",
67
67
  args: [t.status, t.shortMessage]
68
68
  }) : x({
69
- abi: [G],
69
+ abi: [I],
70
70
  errorName: "Error",
71
71
  args: ["shortMessage" in t ? t.shortMessage : t.message]
72
72
  });
73
73
  }
74
74
  function z(t, s) {
75
- if (!R(t, { strict: !1 }))
76
- throw new k({ address: t });
77
- if (!R(s, { strict: !1 }))
78
- throw new k({ address: s });
75
+ if (!A(t, { strict: !1 }))
76
+ throw new R({ address: t });
77
+ if (!A(s, { strict: !1 }))
78
+ throw new R({ address: s });
79
79
  return t.toLowerCase() === s.toLowerCase();
80
80
  }
81
81
  class J extends y {
@@ -149,20 +149,20 @@ const Y = "0x556f1830", Q = {
149
149
  ]
150
150
  };
151
151
  async function Z(t, { blockNumber: s, blockTag: a, data: r, to: e }) {
152
- const { args: c } = T({
152
+ const { args: c } = D({
153
153
  data: r,
154
154
  abi: [Q]
155
155
  }), [n, o, u, f, d] = c, { ccipRead: i } = t, g = i && typeof (i == null ? void 0 : i.request) == "function" ? i.request : V;
156
156
  try {
157
157
  if (!z(e, n))
158
158
  throw new K({ sender: n, to: e });
159
- const l = o.includes(U) ? await B({
159
+ const l = o.includes(U) ? await j({
160
160
  data: u,
161
161
  ccipRequest: g
162
- }) : await g({ data: u, sender: n, urls: o }), { data: M } = await v(t, {
162
+ }) : await g({ data: u, sender: n, urls: o }), { data: M } = await T(t, {
163
163
  blockNumber: s,
164
164
  blockTag: a,
165
- data: D([
165
+ data: v([
166
166
  f,
167
167
  w([{ type: "bytes" }, { type: "bytes" }], [l, d])
168
168
  ]),
@@ -193,7 +193,7 @@ async function V({ data: t, sender: s, urls: a }) {
193
193
  });
194
194
  let i;
195
195
  if ((e = d.headers.get("Content-Type")) != null && e.startsWith("application/json") ? i = (await d.json()).data : i = await d.text(), !d.ok) {
196
- r = new A({
196
+ r = new k({
197
197
  body: u,
198
198
  details: i != null && i.error ? q(i.error) : d.statusText,
199
199
  headers: d.headers,
@@ -211,7 +211,7 @@ async function V({ data: t, sender: s, urls: a }) {
211
211
  }
212
212
  return i;
213
213
  } catch (d) {
214
- r = new A({
214
+ r = new k({
215
215
  body: u,
216
216
  details: d.message,
217
217
  url: n
@@ -1,4 +1,4 @@
1
- import { m as e } from "./core-sNzLDgNd.js";
1
+ import { m as e } from "./core-CgIQaiRa.js";
2
2
  const o = e`<svg
3
3
  width="28"
4
4
  height="28"
@@ -1,4 +1,4 @@
1
- import { m as e } from "./core-sNzLDgNd.js";
1
+ import { m as e } from "./core-CgIQaiRa.js";
2
2
  const o = e`<svg fill="none" viewBox="0 0 14 14">
3
3
  <path
4
4
  fill="currentColor"
@@ -1,4 +1,4 @@
1
- import { m as o } from "./core-sNzLDgNd.js";
1
+ import { m as o } from "./core-CgIQaiRa.js";
2
2
  const e = o`<svg fill="none" viewBox="0 0 16 16">
3
3
  <path
4
4
  fill="currentColor"
@@ -1,4 +1,4 @@
1
- import { m as e } from "./core-sNzLDgNd.js";
1
+ import { m as e } from "./core-CgIQaiRa.js";
2
2
  const o = e`<svg fill="none" viewBox="0 0 16 16">
3
3
  <path
4
4
  fill="currentColor"
@@ -1,4 +1,4 @@
1
- import { m as l } from "./core-sNzLDgNd.js";
1
+ import { m as l } from "./core-CgIQaiRa.js";
2
2
  const o = l`<svg fill="none" viewBox="0 0 16 16">
3
3
  <path
4
4
  fill="currentColor"
@@ -1,4 +1,4 @@
1
- import { m as l } from "./core-sNzLDgNd.js";
1
+ import { m as l } from "./core-CgIQaiRa.js";
2
2
  const e = l`<svg fill="none" viewBox="0 0 16 16">
3
3
  <path
4
4
  fill="currentColor"
@@ -1,4 +1,4 @@
1
- import { m as t } from "./core-sNzLDgNd.js";
1
+ import { m as t } from "./core-CgIQaiRa.js";
2
2
  const o = t`<svg width="36" height="36" fill="none">
3
3
  <path
4
4
  fill="#fff"
@@ -1,4 +1,4 @@
1
- import { m as C } from "./core-sNzLDgNd.js";
1
+ import { m as C } from "./core-CgIQaiRa.js";
2
2
  const l = C`<svg width="14" height="14" viewBox="0 0 14 14" fill="none">
3
3
  <path
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import { m as l } from "./core-sNzLDgNd.js";
1
+ import { m as l } from "./core-CgIQaiRa.js";
2
2
  const o = l`<svg fill="none" viewBox="0 0 16 16">
3
3
  <path
4
4
  fill="currentColor"
@@ -1,4 +1,4 @@
1
- import { m as l } from "./core-sNzLDgNd.js";
1
+ import { m as l } from "./core-CgIQaiRa.js";
2
2
  const o = l`<svg fill="none" viewBox="0 0 20 20">
3
3
  <path
4
4
  fill="currentColor"
@@ -1,4 +1,4 @@
1
- import { m as l } from "./core-sNzLDgNd.js";
1
+ import { m as l } from "./core-CgIQaiRa.js";
2
2
  const e = l`<svg fill="none" viewBox="0 0 16 16">
3
3
  <path
4
4
  fill="currentColor"
@@ -1,4 +1,4 @@
1
- import { m as C } from "./core-sNzLDgNd.js";
1
+ import { m as C } from "./core-CgIQaiRa.js";
2
2
  const o = C`<svg
3
3
  xmlns="http://www.w3.org/2000/svg"
4
4
  width="16"