@blockend/widget 1.0.61 → 1.0.62

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 (216) hide show
  1. package/dist/{AllRoutes-BqW5S4_J.js → AllRoutes-pT_GYhLz.js} +9 -9
  2. package/dist/{Box-Dw7IJo3D.js → Box-CMXImt80.js} +1 -1
  3. package/dist/{EstGas-C_ldluj6.js → EstGas-BEwQc47B.js} +7 -7
  4. package/dist/{Grow-DjneaPQY.js → Grow-CYJk-72r.js} +2 -2
  5. package/dist/{InputComp-CWH4SAk7.js → InputComp-B0QgFbsj.js} +3 -3
  6. package/dist/{LoadRoute-Cafzlcfy.js → LoadRoute-I--KmXYZ.js} +4 -4
  7. package/dist/{QuotesProgress-Covy7wmW.js → QuotesProgress-Ct53CRUU.js} +1 -1
  8. package/dist/{SwapAsset-BqXVX_DR.js → SwapAsset-X7gAsFxL.js} +1 -1
  9. package/dist/{Tooltip-3YpYU_vO.js → Tooltip-CsxhxDbM.js} +3 -3
  10. package/dist/{TxnButton-CPMFPFA_.js → TxnButton-BZf2lfxu.js} +3 -3
  11. package/dist/{add-CRY8asYF.js → add-fqHpy_n_.js} +1 -1
  12. package/dist/{all-wallets-DOnIRIv0.js → all-wallets-BEiHad26.js} +1 -1
  13. package/dist/{app-store-C0M9hC1B.js → app-store-BUrtll4M.js} +1 -1
  14. package/dist/{apple-Bv7oA5AQ.js → apple-DeP0r4ax.js} +1 -1
  15. package/dist/{arrow-bottom-D4arnome.js → arrow-bottom-DOUsYrpS.js} +1 -1
  16. package/dist/{arrow-bottom-circle-BUny4yP8.js → arrow-bottom-circle-3zt0oM9l.js} +1 -1
  17. package/dist/{arrow-left-DImJbKZs.js → arrow-left-CZi8gizN.js} +1 -1
  18. package/dist/{arrow-right-BvRPNX9F.js → arrow-right-Bp2k-sRU.js} +1 -1
  19. package/dist/{arrow-top-1RWPJImu.js → arrow-top-Bdu-g3eb.js} +1 -1
  20. package/dist/{bank-C0t9JpLj.js → bank-UM_6-xYg.js} +1 -1
  21. package/dist/{basic-VfgwBHn1.js → basic-CfaJcj31.js} +3 -3
  22. package/dist/{browser-0d0uw45D.js → browser-DE4dHUIn.js} +1 -1
  23. package/dist/{card-BBByykfy.js → card-CpV_uFyN.js} +1 -1
  24. package/dist/{ccip-8__szz9Q.js → ccip-CA2a9SDo.js} +1 -1
  25. package/dist/{checkmark-B_osdsm_.js → checkmark-CK8NZa3x.js} +1 -1
  26. package/dist/{checkmark-bold-BEzepFY4.js → checkmark-bold-DgI_WWpK.js} +1 -1
  27. package/dist/{chevron-bottom-Bdaxlaxc.js → chevron-bottom-C_3_Lg-x.js} +1 -1
  28. package/dist/{chevron-left-2aCeqxdm.js → chevron-left-Dn-8RUKj.js} +1 -1
  29. package/dist/{chevron-right-BPgQeMPz.js → chevron-right-BrzGCKbe.js} +1 -1
  30. package/dist/{chevron-top-BskFpgMP.js → chevron-top-DH4uxqMd.js} +1 -1
  31. package/dist/{chrome-store-CxhEG2Jk.js → chrome-store-C6ftVKRM.js} +1 -1
  32. package/dist/{clock-BDgHn083.js → clock-BMAqcMX9.js} +1 -1
  33. package/dist/{close-CQTa1LZg.js → close-B99wQvJ_.js} +1 -1
  34. package/dist/{coinPlaceholder-B-NSV729.js → coinPlaceholder-DmuYNsmb.js} +1 -1
  35. package/dist/{compass-BdJmk2w2.js → compass-C4wdl146.js} +1 -1
  36. package/dist/{copy-Cg4vgr82.js → copy-DMJQyfJj.js} +1 -1
  37. package/dist/{core-BSwMFU2B.js → core-v6ho39ji.js} +3 -3
  38. package/dist/{cursor-BoD_rq0f.js → cursor-C-0knOkC.js} +1 -1
  39. package/dist/{cursor-transparent-Dqs1kXcb.js → cursor-transparent-BLuqOo6k.js} +1 -1
  40. package/dist/{desktop-BOxkTik1.js → desktop-DpJrO84H.js} +1 -1
  41. package/dist/{disconnect-CTxFyZWa.js → disconnect-k6w6zlk-.js} +1 -1
  42. package/dist/{discord-BJRxIhBt.js → discord-DLgkGibC.js} +1 -1
  43. package/dist/{down-372J_rRV.js → down-C4N-wh2D.js} +2 -2
  44. package/dist/{etherscan-CyQf5MH5.js → etherscan-DJTxjIAP.js} +1 -1
  45. package/dist/{exclamation-triangle-DFOXjtuI.js → exclamation-triangle-B1YdY5CX.js} +1 -1
  46. package/dist/{extension-XiWSr1Ku.js → extension-CnhByDAh.js} +1 -1
  47. package/dist/{external-link-CYjbHRDY.js → external-link-CZmI3Q92.js} +1 -1
  48. package/dist/{facebook-DhP37m2R.js → facebook-CRHPGcBq.js} +1 -1
  49. package/dist/{farcaster-C1J2oGt2.js → farcaster-BYs6AvgJ.js} +1 -1
  50. package/dist/{filters-C5jLy9GP.js → filters-BqJFiFCl.js} +1 -1
  51. package/dist/{getChainIds-AaKb_MmO.js → getChainIds-CPQkM2Fw.js} +2 -2
  52. package/dist/{getCosmosAddress-D-F7jz-d.js → getCosmosAddress-CrzIqoe8.js} +2 -2
  53. package/dist/{github-CJ8g1by7.js → github-WI_fsQyX.js} +1 -1
  54. package/dist/{google-DpIVCnNm.js → google-PDPeuX25.js} +1 -1
  55. package/dist/{hamburger-BylLGawu.js → hamburger-JHCSR4wq.js} +5 -5
  56. package/dist/{help-circle-BESCFGIa.js → help-circle-CC1LutMp.js} +1 -1
  57. package/dist/{id-CPX0IEMo.js → id-Dg4qm85K.js} +1 -1
  58. package/dist/{image-DrFHyQOS.js → image-DvH3pCRi.js} +1 -1
  59. package/dist/{index-DoNokw4Q.js → index-4DGqOb0b.js} +1 -1
  60. package/dist/{index-ePnYqYhf.js → index-BAjx9Sij.js} +345 -343
  61. package/dist/{index-H7ThVJwV.js → index-BII8gr4h.js} +4 -4
  62. package/dist/{index-DO14DPs3.js → index-Bl06WOfD.js} +5 -5
  63. package/dist/{index-BOd8pd8c.js → index-BrgwPS_u.js} +11 -11
  64. package/dist/{index-BDezoD7C.js → index-ByNEeX9y.js} +1 -1
  65. package/dist/{index-D0J1OD73.js → index-CBMjkxpP.js} +4 -4
  66. package/dist/{index-DhZwdjPQ.js → index-D8oYLVSL.js} +2 -2
  67. package/dist/{index-DjHDqI7m.js → index-DbOqrlxW.js} +4 -4
  68. package/dist/{index-eatshJSd.js → index-Mqg8CWuX.js} +10 -10
  69. package/dist/{index-BheqnLKf.js → index-qIeZpXcg.js} +78 -78
  70. package/dist/{index.es-gTtSa0r5.js → index.es-DV8y1ve_.js} +2 -2
  71. package/dist/{index.es-B95K0DgG.js → index.es-DkTmjrB8.js} +1 -1
  72. package/dist/index.es.js +1 -1
  73. package/dist/{info-DB9XS3BU.js → info-Cjmzqm5P.js} +1 -1
  74. package/dist/{info-circle-BVB8s9W_.js → info-circle-Dimf4UPG.js} +1 -1
  75. package/dist/{lightbulb-C0eiLvuS.js → lightbulb-BsZjMPbK.js} +1 -1
  76. package/dist/{mail-CYcc9yZZ.js → mail-KNgNgUMG.js} +1 -1
  77. package/dist/{mobile-Cvm9Skqq.js → mobile-hJMru58F.js} +1 -1
  78. package/dist/{more-B-UvO1Yo.js → more-B1Hz9ISJ.js} +1 -1
  79. package/dist/{network-placeholder-C8QNcwPf.js → network-placeholder-Ba37-PVe.js} +1 -1
  80. package/dist/{nftPlaceholder-C_LU9tT5.js → nftPlaceholder-Br6ZCUyX.js} +1 -1
  81. package/dist/{off-BEQbMYBZ.js → off-DZv0f5qk.js} +1 -1
  82. package/dist/{play-store-CEopCauM.js → play-store-PVT99oFp.js} +1 -1
  83. package/dist/{plus-CtEYHV2t.js → plus-0JhMk1yC.js} +1 -1
  84. package/dist/{qr-code-BhmZxeo_.js → qr-code-CYMnN7H6.js} +1 -1
  85. package/dist/{recycle-horizontal-CF9eqICi.js → recycle-horizontal-BODX35XL.js} +1 -1
  86. package/dist/{refresh-Bm3plkBE.js → refresh-KT2nzf4V.js} +1 -1
  87. package/dist/{reown-logo-8S9ZN_-T.js → reown-logo-x-a1ehju.js} +1 -1
  88. package/dist/{search-DNcA47oY.js → search-floOYVWE.js} +1 -1
  89. package/dist/{send-B0S9gHH6.js → send-rBEZNvkT.js} +1 -1
  90. package/dist/{swapHorizontal-BuTPPB8N.js → swapHorizontal-FpW50anF.js} +1 -1
  91. package/dist/{swapHorizontalBold-BnB-fpce.js → swapHorizontalBold-DJo2s6QM.js} +1 -1
  92. package/dist/{swapHorizontalMedium-9QnwwjJD.js → swapHorizontalMedium-AdMIxAQ-.js} +1 -1
  93. package/dist/{swapHorizontalRoundedBold-C83mxp3u.js → swapHorizontalRoundedBold-DB7VaS-l.js} +1 -1
  94. package/dist/{swapVertical-BAz7hmKO.js → swapVertical-CStjk8mq.js} +1 -1
  95. package/dist/{telegram-BMT9bLfw.js → telegram-B7o9hZwP.js} +1 -1
  96. package/dist/{three-dots-DuhUrXKI.js → three-dots-DogTUFsH.js} +1 -1
  97. package/dist/{twitch-ClsoABSi.js → twitch-B_TRhhNU.js} +1 -1
  98. package/dist/{twitterIcon-B9n98fnH.js → twitterIcon-ujuPKvRN.js} +1 -1
  99. package/dist/{unsupportedProp-BXmR-9gT.js → unsupportedProp-BC6azYXA.js} +1 -1
  100. package/dist/{useRegisterError-DVG0sgLq.js → useRegisterError-DMILz6N1.js} +1 -1
  101. package/dist/{verify-BHTa1Niv.js → verify-BRWSwLhn.js} +1 -1
  102. package/dist/{verify-filled-CqobBYuI.js → verify-filled-z7UoRJXn.js} +1 -1
  103. package/dist/{w3m-modal-B7akV0Kp.js → w3m-modal-CuXPdser.js} +2 -2
  104. package/dist/{wallet-ObJy7yZR.js → wallet-BMFvv3DF.js} +1 -1
  105. package/dist/{wallet-placeholder-BxVrKpEz.js → wallet-placeholder-DFg6CZXP.js} +1 -1
  106. package/dist/{walletconnect-CYJbrPQQ.js → walletconnect-WSdSSZfM.js} +1 -1
  107. package/dist/{warning-circle-DOwgDOgL.js → warning-circle-BDW9xnhM.js} +1 -1
  108. package/dist/{x-B03u0kWD.js → x-DUDktTjC.js} +1 -1
  109. package/package.json +1 -1
  110. package/dist/AllRoutes-CIe7ZLbW.js +0 -2209
  111. package/dist/Box-QpYIDD-V.js +0 -54
  112. package/dist/EstGas-Dpwt2-50.js +0 -1574
  113. package/dist/Grow-L7kyPhbh.js +0 -1656
  114. package/dist/InputComp-Dl4M7E5v.js +0 -105
  115. package/dist/LoadRoute-cBSl34Bs.js +0 -125
  116. package/dist/QuotesProgress-CxJUoCPy.js +0 -28
  117. package/dist/SwapAsset-CkRat7Ok.js +0 -51
  118. package/dist/Tooltip-D2kKNQ0U.js +0 -572
  119. package/dist/TxnButton-mfwy-EoQ.js +0 -222
  120. package/dist/add-Dfrw-dUV.js +0 -19
  121. package/dist/all-wallets-Dw10lWJZ.js +0 -10
  122. package/dist/app-store-DJiZFSCr.js +0 -21
  123. package/dist/apple-kMZGS4AC.js +0 -22
  124. package/dist/arrow-bottom-DgmWrLqf.js +0 -12
  125. package/dist/arrow-bottom-circle-C7iPKwzW.js +0 -15
  126. package/dist/arrow-left-Dol642VI.js +0 -12
  127. package/dist/arrow-right-CMwyPVT7.js +0 -12
  128. package/dist/arrow-top-kn9xtx92.js +0 -12
  129. package/dist/bank-DK-FvDfd.js +0 -18
  130. package/dist/basic-Sejv2JvX.js +0 -5783
  131. package/dist/browser-BzT1ACe9.js +0 -18
  132. package/dist/card-DqDM55a-.js +0 -18
  133. package/dist/ccip-BPZSey8I.js +0 -228
  134. package/dist/checkmark-DEKH6rOS.js +0 -15
  135. package/dist/checkmark-bold-Dzv2hN2Q.js +0 -12
  136. package/dist/chevron-bottom-CXdHWe0F.js +0 -12
  137. package/dist/chevron-left-CeuFz3M9.js +0 -12
  138. package/dist/chevron-right-DikqbHjp.js +0 -12
  139. package/dist/chevron-top-CjCScawp.js +0 -12
  140. package/dist/chrome-store-DaP5Y4w2.js +0 -65
  141. package/dist/clock-BzjZWK68.js +0 -12
  142. package/dist/close-Dqncm2nY.js +0 -12
  143. package/dist/coinPlaceholder-BExfa33b.js +0 -12
  144. package/dist/compass-C1H_fht-.js +0 -12
  145. package/dist/copy-DPMVX3yZ.js +0 -19
  146. package/dist/core-BYOwnw_B.js +0 -16521
  147. package/dist/cursor-transparent-IQlZspwQ.js +0 -16
  148. package/dist/cursor-ybJpiPr6.js +0 -7
  149. package/dist/desktop-WMYv3b4Q.js +0 -13
  150. package/dist/disconnect-eMeec26w.js +0 -12
  151. package/dist/discord-CpTo4KnZ.js +0 -21
  152. package/dist/down-hvB7J3FG.js +0 -622
  153. package/dist/etherscan-DQ1h54d3.js +0 -10
  154. package/dist/exclamation-triangle-DzKs0-30.js +0 -8
  155. package/dist/extension-ep1TEUSD.js +0 -12
  156. package/dist/external-link-DRzzevt_.js +0 -12
  157. package/dist/facebook-eXS31CP5.js +0 -30
  158. package/dist/farcaster-f0EPKy4w.js +0 -16
  159. package/dist/filters-RqawLZYy.js +0 -12
  160. package/dist/getChainIds-DXEtLb1g.js +0 -1888
  161. package/dist/getCosmosAddress-X_cfoAnv.js +0 -9517
  162. package/dist/github-d1vUfc1B.js +0 -22
  163. package/dist/google-Dtcfyt4F.js +0 -22
  164. package/dist/hamburger-DezZOKRv.js +0 -3915
  165. package/dist/help-circle-BTpSg7wr.js +0 -16
  166. package/dist/id-CV-pIIiZ.js +0 -16
  167. package/dist/image-n7ODnWNp.js +0 -8
  168. package/dist/index-BYmiFoJh.js +0 -29495
  169. package/dist/index-C7McnY5R.js +0 -18509
  170. package/dist/index-CI-V1HdQ.js +0 -3267
  171. package/dist/index-CSgWo9Cg.js +0 -6713
  172. package/dist/index-CViW2kjE.js +0 -13547
  173. package/dist/index-CoV9zQx1.js +0 -992
  174. package/dist/index-D_8iklL2.js +0 -1483
  175. package/dist/index-GlSAE8hE.js +0 -472
  176. package/dist/index-Pni0gIii.js +0 -206
  177. package/dist/index-TEYMoNwP.js +0 -9
  178. package/dist/index-VS3sEqmI.js +0 -330
  179. package/dist/index.es-BzyBckd_.js +0 -366
  180. package/dist/index.es-CMvE7ghR.js +0 -14904
  181. package/dist/info-DWZmKXfC.js +0 -7
  182. package/dist/info-circle-Bk9rpQzz.js +0 -16
  183. package/dist/lightbulb-CUDopurR.js +0 -7
  184. package/dist/mail-Df9wlUBz.js +0 -12
  185. package/dist/mobile-DcoUJktC.js +0 -13
  186. package/dist/more-DbsAB7Xx.js +0 -15
  187. package/dist/network-placeholder-CnHZLxGT.js +0 -18
  188. package/dist/nftPlaceholder-D7igGAAq.js +0 -12
  189. package/dist/off-Brms9nN7.js +0 -12
  190. package/dist/play-store-z4z-boXn.js +0 -36
  191. package/dist/plus-LkrIZJEQ.js +0 -17
  192. package/dist/qr-code-CZnYaNoE.js +0 -10
  193. package/dist/recycle-horizontal-CeGotUdv.js +0 -13
  194. package/dist/refresh-CKhWU1dQ.js +0 -12
  195. package/dist/reown-logo-CF2Qkyw1.js +0 -16
  196. package/dist/search-DyuAYb_-.js +0 -12
  197. package/dist/send-BbBOjlsM.js +0 -19
  198. package/dist/swapHorizontal-DA7yhPfV.js +0 -12
  199. package/dist/swapHorizontalBold-BujZxwgY.js +0 -12
  200. package/dist/swapHorizontalMedium-hEBn_MJv.js +0 -20
  201. package/dist/swapHorizontalRoundedBold-Cqg1Na-5.js +0 -12
  202. package/dist/swapVertical-D1CdGHJt.js +0 -12
  203. package/dist/telegram-dDQ2sOw5.js +0 -20
  204. package/dist/three-dots-ltDeu1Xu.js +0 -9
  205. package/dist/twitch-sBusnrAt.js +0 -22
  206. package/dist/twitterIcon-BKMgaEZ4.js +0 -10
  207. package/dist/unsupportedProp-P9y3_0om.js +0 -10
  208. package/dist/useRegisterError-DGMdKFc9.js +0 -8918
  209. package/dist/verify-DXzijLDZ.js +0 -12
  210. package/dist/verify-filled-DnKqj8X5.js +0 -12
  211. package/dist/w3m-modal-Cc1j8j_E.js +0 -1471
  212. package/dist/wallet-placeholder-DEsjd5Nv.js +0 -18
  213. package/dist/wallet-zL6TDKIa.js +0 -12
  214. package/dist/walletconnect-CZz6e0wy.js +0 -36
  215. package/dist/warning-circle-DsGlg2MF.js +0 -16
  216. package/dist/x-MwPhq03Y.js +0 -16
@@ -1,2209 +0,0 @@
1
- import { jsxs as l, jsx as e, Fragment as ne } from "react/jsx-runtime";
2
- import * as v from "react";
3
- import De, { useState as J, useEffect as Fe } from "react";
4
- import { S as Pe, a as _e } from "./sortDown-CjBaDQTU.js";
5
- import { t as B } from "./truncate-D9t92mVX.js";
6
- import { a as kt, m as Ne, j as Ut, l as Ue, o as Rt, r as Dt, i as Ce, c as ue, f as ve } from "./useRegisterError-DVG0sgLq.js";
7
- import { b as Te, g as Ie, i as Ae, _ as pe, d as k, e as oe, s as ce, f as at, h as Ee, p as Z, P as r, w as Ft, u as se } from "./index-D0J1OD73.js";
8
- import { S as We, C as je, G as Ve } from "./clockIcon-C2W5xvyt.js";
9
- import { T as Pt } from "./Tooltip-3YpYU_vO.js";
10
- import { O as we } from "./index-BDezoD7C.js";
11
- import { B as _t } from "./Box-QpYIDD-V.js";
12
- import { c as ct, d as it, r as At } from "./index-DoNokw4Q.js";
13
- import { b as dt } from "./Grow-DjneaPQY.js";
14
- import { B as bt, o as ut } from "./getChainIds-AaKb_MmO.js";
15
- import { u as Wt } from "./unsupportedProp-P9y3_0om.js";
16
- let be;
17
- function wt() {
18
- if (be)
19
- return be;
20
- const o = document.createElement("div"), n = document.createElement("div");
21
- return n.style.width = "10px", n.style.height = "1px", o.appendChild(n), o.dir = "rtl", o.style.fontSize = "14px", o.style.width = "4px", o.style.height = "1px", o.style.position = "absolute", o.style.top = "-1000px", o.style.overflow = "scroll", document.body.appendChild(o), be = "reverse", o.scrollLeft > 0 ? be = "default" : (o.scrollLeft = 1, o.scrollLeft === 0 && (be = "negative")), document.body.removeChild(o), be;
22
- }
23
- function jt(o, n) {
24
- const s = o.scrollLeft;
25
- if (n !== "rtl")
26
- return s;
27
- switch (wt()) {
28
- case "negative":
29
- return o.scrollWidth - o.clientWidth + s;
30
- case "reverse":
31
- return o.scrollWidth - o.clientWidth - s;
32
- default:
33
- return s;
34
- }
35
- }
36
- function Vt(o) {
37
- return Ie("MuiTab", o);
38
- }
39
- const le = Te("MuiTab", ["root", "labelIcon", "textColorInherit", "textColorPrimary", "textColorSecondary", "selected", "disabled", "fullWidth", "wrapped", "iconWrapper"]), zt = ["className", "disabled", "disableFocusRipple", "fullWidth", "icon", "iconPosition", "indicator", "label", "onChange", "onClick", "onFocus", "selected", "selectionFollowsFocus", "textColor", "value", "wrapped"], Ht = (o) => {
40
- const {
41
- classes: n,
42
- textColor: s,
43
- fullWidth: i,
44
- wrapped: b,
45
- icon: a,
46
- label: c,
47
- selected: w,
48
- disabled: h
49
- } = o, O = {
50
- root: ["root", a && c && "labelIcon", `textColor${at(s)}`, i && "fullWidth", b && "wrapped", w && "selected", h && "disabled"],
51
- iconWrapper: ["iconWrapper"]
52
- };
53
- return Ee(O, Vt, n);
54
- }, Gt = ce(bt, {
55
- name: "MuiTab",
56
- slot: "Root",
57
- overridesResolver: (o, n) => {
58
- const {
59
- ownerState: s
60
- } = o;
61
- return [n.root, s.label && s.icon && n.labelIcon, n[`textColor${at(s.textColor)}`], s.fullWidth && n.fullWidth, s.wrapped && n.wrapped, {
62
- [`& .${le.iconWrapper}`]: n.iconWrapper
63
- }];
64
- }
65
- })(({
66
- theme: o,
67
- ownerState: n
68
- }) => k({}, o.typography.button, {
69
- maxWidth: 360,
70
- minWidth: 90,
71
- position: "relative",
72
- minHeight: 48,
73
- flexShrink: 0,
74
- padding: "12px 16px",
75
- overflow: "hidden",
76
- whiteSpace: "normal",
77
- textAlign: "center"
78
- }, n.label && {
79
- flexDirection: n.iconPosition === "top" || n.iconPosition === "bottom" ? "column" : "row"
80
- }, {
81
- lineHeight: 1.25
82
- }, n.icon && n.label && {
83
- minHeight: 72,
84
- paddingTop: 9,
85
- paddingBottom: 9,
86
- [`& > .${le.iconWrapper}`]: k({}, n.iconPosition === "top" && {
87
- marginBottom: 6
88
- }, n.iconPosition === "bottom" && {
89
- marginTop: 6
90
- }, n.iconPosition === "start" && {
91
- marginRight: o.spacing(1)
92
- }, n.iconPosition === "end" && {
93
- marginLeft: o.spacing(1)
94
- })
95
- }, n.textColor === "inherit" && {
96
- color: "inherit",
97
- opacity: 0.6,
98
- // same opacity as theme.palette.text.secondary
99
- [`&.${le.selected}`]: {
100
- opacity: 1
101
- },
102
- [`&.${le.disabled}`]: {
103
- opacity: (o.vars || o).palette.action.disabledOpacity
104
- }
105
- }, n.textColor === "primary" && {
106
- color: (o.vars || o).palette.text.secondary,
107
- [`&.${le.selected}`]: {
108
- color: (o.vars || o).palette.primary.main
109
- },
110
- [`&.${le.disabled}`]: {
111
- color: (o.vars || o).palette.text.disabled
112
- }
113
- }, n.textColor === "secondary" && {
114
- color: (o.vars || o).palette.text.secondary,
115
- [`&.${le.selected}`]: {
116
- color: (o.vars || o).palette.secondary.main
117
- },
118
- [`&.${le.disabled}`]: {
119
- color: (o.vars || o).palette.text.disabled
120
- }
121
- }, n.fullWidth && {
122
- flexShrink: 1,
123
- flexGrow: 1,
124
- flexBasis: 0,
125
- maxWidth: "none"
126
- }, n.wrapped && {
127
- fontSize: o.typography.pxToRem(12)
128
- })), ye = /* @__PURE__ */ v.forwardRef(function(n, s) {
129
- const i = Ae({
130
- props: n,
131
- name: "MuiTab"
132
- }), {
133
- className: b,
134
- disabled: a = !1,
135
- disableFocusRipple: c = !1,
136
- // eslint-disable-next-line react/prop-types
137
- fullWidth: w,
138
- icon: h,
139
- iconPosition: O = "top",
140
- // eslint-disable-next-line react/prop-types
141
- indicator: $,
142
- label: F,
143
- onChange: I,
144
- onClick: P,
145
- onFocus: U,
146
- // eslint-disable-next-line react/prop-types
147
- selected: _,
148
- // eslint-disable-next-line react/prop-types
149
- selectionFollowsFocus: p,
150
- // eslint-disable-next-line react/prop-types
151
- textColor: L = "inherit",
152
- value: t,
153
- wrapped: x = !1
154
- } = i, y = pe(i, zt), g = k({}, i, {
155
- disabled: a,
156
- disableFocusRipple: c,
157
- selected: _,
158
- icon: !!h,
159
- iconPosition: O,
160
- label: !!F,
161
- fullWidth: w,
162
- textColor: L,
163
- wrapped: x
164
- }), S = Ht(g), T = h && F && /* @__PURE__ */ v.isValidElement(h) ? /* @__PURE__ */ v.cloneElement(h, {
165
- className: oe(S.iconWrapper, h.props.className)
166
- }) : h, R = (m) => {
167
- !_ && I && I(m, t), P && P(m);
168
- }, f = (m) => {
169
- p && !_ && I && I(m, t), U && U(m);
170
- };
171
- return /* @__PURE__ */ l(Gt, k({
172
- focusRipple: !c,
173
- className: oe(S.root, b),
174
- ref: s,
175
- role: "tab",
176
- "aria-selected": _,
177
- disabled: a,
178
- onClick: R,
179
- onFocus: f,
180
- ownerState: g,
181
- tabIndex: _ ? 0 : -1
182
- }, y, {
183
- children: [O === "top" || O === "start" ? /* @__PURE__ */ l(v.Fragment, {
184
- children: [T, F]
185
- }) : /* @__PURE__ */ l(v.Fragment, {
186
- children: [F, T]
187
- }), $]
188
- }));
189
- });
190
- Z.env.NODE_ENV !== "production" && (ye.propTypes = {
191
- // ┌────────────────────────────── Warning ──────────────────────────────┐
192
- // │ These PropTypes are generated from the TypeScript type definitions. │
193
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
194
- // └─────────────────────────────────────────────────────────────────────┘
195
- /**
196
- * This prop isn't supported.
197
- * Use the `component` prop if you need to change the children structure.
198
- */
199
- children: Wt,
200
- /**
201
- * Override or extend the styles applied to the component.
202
- */
203
- classes: r.object,
204
- /**
205
- * @ignore
206
- */
207
- className: r.string,
208
- /**
209
- * If `true`, the component is disabled.
210
- * @default false
211
- */
212
- disabled: r.bool,
213
- /**
214
- * If `true`, the keyboard focus ripple is disabled.
215
- * @default false
216
- */
217
- disableFocusRipple: r.bool,
218
- /**
219
- * If `true`, the ripple effect is disabled.
220
- *
221
- * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
222
- * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
223
- * @default false
224
- */
225
- disableRipple: r.bool,
226
- /**
227
- * The icon to display.
228
- */
229
- icon: r.oneOfType([r.element, r.string]),
230
- /**
231
- * The position of the icon relative to the label.
232
- * @default 'top'
233
- */
234
- iconPosition: r.oneOf(["bottom", "end", "start", "top"]),
235
- /**
236
- * The label element.
237
- */
238
- label: r.node,
239
- /**
240
- * @ignore
241
- */
242
- onChange: r.func,
243
- /**
244
- * @ignore
245
- */
246
- onClick: r.func,
247
- /**
248
- * @ignore
249
- */
250
- onFocus: r.func,
251
- /**
252
- * The system prop that allows defining system overrides as well as additional CSS styles.
253
- */
254
- sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object]),
255
- /**
256
- * You can provide your own value. Otherwise, we fallback to the child position index.
257
- */
258
- value: r.any,
259
- /**
260
- * Tab labels appear in a single row.
261
- * They can use a second line if needed.
262
- * @default false
263
- */
264
- wrapped: r.bool
265
- });
266
- const Xt = ct(/* @__PURE__ */ e("path", {
267
- d: "M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"
268
- }), "KeyboardArrowLeft"), qt = ct(/* @__PURE__ */ e("path", {
269
- d: "M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"
270
- }), "KeyboardArrowRight");
271
- function Yt(o) {
272
- return (1 + Math.sin(Math.PI * o - Math.PI / 2)) / 2;
273
- }
274
- function Kt(o, n, s, i = {}, b = () => {
275
- }) {
276
- const {
277
- ease: a = Yt,
278
- duration: c = 300
279
- // standard
280
- } = i;
281
- let w = null;
282
- const h = n[o];
283
- let O = !1;
284
- const $ = () => {
285
- O = !0;
286
- }, F = (I) => {
287
- if (O) {
288
- b(new Error("Animation cancelled"));
289
- return;
290
- }
291
- w === null && (w = I);
292
- const P = Math.min(1, (I - w) / c);
293
- if (n[o] = a(P) * (s - h) + h, P >= 1) {
294
- requestAnimationFrame(() => {
295
- b(null);
296
- });
297
- return;
298
- }
299
- requestAnimationFrame(F);
300
- };
301
- return h === s ? (b(new Error("Element already at target position")), $) : (requestAnimationFrame(F), $);
302
- }
303
- const Zt = ["onChange"], Jt = {
304
- width: 99,
305
- height: 99,
306
- position: "absolute",
307
- top: -9999,
308
- overflow: "scroll"
309
- };
310
- function pt(o) {
311
- const {
312
- onChange: n
313
- } = o, s = pe(o, Zt), i = v.useRef(), b = v.useRef(null), a = () => {
314
- i.current = b.current.offsetHeight - b.current.clientHeight;
315
- };
316
- return kt(() => {
317
- const c = it(() => {
318
- const h = i.current;
319
- a(), h !== i.current && n(i.current);
320
- }), w = ut(b.current);
321
- return w.addEventListener("resize", c), () => {
322
- c.clear(), w.removeEventListener("resize", c);
323
- };
324
- }, [n]), v.useEffect(() => {
325
- a(), n(i.current);
326
- }, [n]), /* @__PURE__ */ e("div", k({
327
- style: Jt
328
- }, s, {
329
- ref: b
330
- }));
331
- }
332
- Z.env.NODE_ENV !== "production" && (pt.propTypes = {
333
- onChange: r.func.isRequired
334
- });
335
- function Qt(o) {
336
- return Ie("MuiTabScrollButton", o);
337
- }
338
- const eo = Te("MuiTabScrollButton", ["root", "vertical", "horizontal", "disabled"]), to = ["className", "slots", "slotProps", "direction", "orientation", "disabled"], oo = (o) => {
339
- const {
340
- classes: n,
341
- orientation: s,
342
- disabled: i
343
- } = o;
344
- return Ee({
345
- root: ["root", s, i && "disabled"]
346
- }, Qt, n);
347
- }, no = ce(bt, {
348
- name: "MuiTabScrollButton",
349
- slot: "Root",
350
- overridesResolver: (o, n) => {
351
- const {
352
- ownerState: s
353
- } = o;
354
- return [n.root, s.orientation && n[s.orientation]];
355
- }
356
- })(({
357
- ownerState: o
358
- }) => k({
359
- width: 40,
360
- flexShrink: 0,
361
- opacity: 0.8,
362
- [`&.${eo.disabled}`]: {
363
- opacity: 0
364
- }
365
- }, o.orientation === "vertical" && {
366
- width: "100%",
367
- height: 40,
368
- "& svg": {
369
- transform: `rotate(${o.isRtl ? -90 : 90}deg)`
370
- }
371
- })), ft = /* @__PURE__ */ v.forwardRef(function(n, s) {
372
- var i, b;
373
- const a = Ae({
374
- props: n,
375
- name: "MuiTabScrollButton"
376
- }), {
377
- className: c,
378
- slots: w = {},
379
- slotProps: h = {},
380
- direction: O
381
- } = a, $ = pe(a, to), F = dt(), I = k({
382
- isRtl: F
383
- }, a), P = oo(I), U = (i = w.StartScrollButtonIcon) != null ? i : Xt, _ = (b = w.EndScrollButtonIcon) != null ? b : qt, p = Ne({
384
- elementType: U,
385
- externalSlotProps: h.startScrollButtonIcon,
386
- additionalProps: {
387
- fontSize: "small"
388
- },
389
- ownerState: I
390
- }), L = Ne({
391
- elementType: _,
392
- externalSlotProps: h.endScrollButtonIcon,
393
- additionalProps: {
394
- fontSize: "small"
395
- },
396
- ownerState: I
397
- });
398
- return /* @__PURE__ */ e(no, k({
399
- component: "div",
400
- className: oe(P.root, c),
401
- ref: s,
402
- role: null,
403
- ownerState: I,
404
- tabIndex: null
405
- }, $, {
406
- children: O === "left" ? /* @__PURE__ */ e(U, k({}, p)) : /* @__PURE__ */ e(_, k({}, L))
407
- }));
408
- });
409
- Z.env.NODE_ENV !== "production" && (ft.propTypes = {
410
- // ┌────────────────────────────── Warning ──────────────────────────────┐
411
- // │ These PropTypes are generated from the TypeScript type definitions. │
412
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
413
- // └─────────────────────────────────────────────────────────────────────┘
414
- /**
415
- * The content of the component.
416
- */
417
- children: r.node,
418
- /**
419
- * Override or extend the styles applied to the component.
420
- */
421
- classes: r.object,
422
- /**
423
- * @ignore
424
- */
425
- className: r.string,
426
- /**
427
- * The direction the button should indicate.
428
- */
429
- direction: r.oneOf(["left", "right"]).isRequired,
430
- /**
431
- * If `true`, the component is disabled.
432
- * @default false
433
- */
434
- disabled: r.bool,
435
- /**
436
- * The component orientation (layout flow direction).
437
- */
438
- orientation: r.oneOf(["horizontal", "vertical"]).isRequired,
439
- /**
440
- * The extra props for the slot components.
441
- * You can override the existing props or add new ones.
442
- * @default {}
443
- */
444
- slotProps: r.shape({
445
- endScrollButtonIcon: r.oneOfType([r.func, r.object]),
446
- startScrollButtonIcon: r.oneOfType([r.func, r.object])
447
- }),
448
- /**
449
- * The components used for each slot inside.
450
- * @default {}
451
- */
452
- slots: r.shape({
453
- EndScrollButtonIcon: r.elementType,
454
- StartScrollButtonIcon: r.elementType
455
- }),
456
- /**
457
- * The system prop that allows defining system overrides as well as additional CSS styles.
458
- */
459
- sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object])
460
- });
461
- function ro(o) {
462
- return Ie("MuiTabs", o);
463
- }
464
- const Re = Te("MuiTabs", ["root", "vertical", "flexContainer", "flexContainerVertical", "centered", "scroller", "fixed", "scrollableX", "scrollableY", "hideScrollbar", "scrollButtons", "scrollButtonsHideMobile", "indicator"]), lo = ["aria-label", "aria-labelledby", "action", "centered", "children", "className", "component", "allowScrollButtonsMobile", "indicatorColor", "onChange", "orientation", "ScrollButtonComponent", "scrollButtons", "selectionFollowsFocus", "slots", "slotProps", "TabIndicatorProps", "TabScrollButtonProps", "textColor", "value", "variant", "visibleScrollbar"], nt = (o, n) => o === n ? o.firstChild : n && n.nextElementSibling ? n.nextElementSibling : o.firstChild, rt = (o, n) => o === n ? o.lastChild : n && n.previousElementSibling ? n.previousElementSibling : o.lastChild, ge = (o, n, s) => {
465
- let i = !1, b = s(o, n);
466
- for (; b; ) {
467
- if (b === o.firstChild) {
468
- if (i)
469
- return;
470
- i = !0;
471
- }
472
- const a = b.disabled || b.getAttribute("aria-disabled") === "true";
473
- if (!b.hasAttribute("tabindex") || a)
474
- b = s(o, b);
475
- else {
476
- b.focus();
477
- return;
478
- }
479
- }
480
- }, so = (o) => {
481
- const {
482
- vertical: n,
483
- fixed: s,
484
- hideScrollbar: i,
485
- scrollableX: b,
486
- scrollableY: a,
487
- centered: c,
488
- scrollButtonsHideMobile: w,
489
- classes: h
490
- } = o;
491
- return Ee({
492
- root: ["root", n && "vertical"],
493
- scroller: ["scroller", s && "fixed", i && "hideScrollbar", b && "scrollableX", a && "scrollableY"],
494
- flexContainer: ["flexContainer", n && "flexContainerVertical", c && "centered"],
495
- indicator: ["indicator"],
496
- scrollButtons: ["scrollButtons", w && "scrollButtonsHideMobile"],
497
- scrollableX: [b && "scrollableX"],
498
- hideScrollbar: [i && "hideScrollbar"]
499
- }, ro, h);
500
- }, ao = ce("div", {
501
- name: "MuiTabs",
502
- slot: "Root",
503
- overridesResolver: (o, n) => {
504
- const {
505
- ownerState: s
506
- } = o;
507
- return [{
508
- [`& .${Re.scrollButtons}`]: n.scrollButtons
509
- }, {
510
- [`& .${Re.scrollButtons}`]: s.scrollButtonsHideMobile && n.scrollButtonsHideMobile
511
- }, n.root, s.vertical && n.vertical];
512
- }
513
- })(({
514
- ownerState: o,
515
- theme: n
516
- }) => k({
517
- overflow: "hidden",
518
- minHeight: 48,
519
- // Add iOS momentum scrolling for iOS < 13.0
520
- WebkitOverflowScrolling: "touch",
521
- display: "flex"
522
- }, o.vertical && {
523
- flexDirection: "column"
524
- }, o.scrollButtonsHideMobile && {
525
- [`& .${Re.scrollButtons}`]: {
526
- [n.breakpoints.down("sm")]: {
527
- display: "none"
528
- }
529
- }
530
- })), co = ce("div", {
531
- name: "MuiTabs",
532
- slot: "Scroller",
533
- overridesResolver: (o, n) => {
534
- const {
535
- ownerState: s
536
- } = o;
537
- return [n.scroller, s.fixed && n.fixed, s.hideScrollbar && n.hideScrollbar, s.scrollableX && n.scrollableX, s.scrollableY && n.scrollableY];
538
- }
539
- })(({
540
- ownerState: o
541
- }) => k({
542
- position: "relative",
543
- display: "inline-block",
544
- flex: "1 1 auto",
545
- whiteSpace: "nowrap"
546
- }, o.fixed && {
547
- overflowX: "hidden",
548
- width: "100%"
549
- }, o.hideScrollbar && {
550
- // Hide dimensionless scrollbar on macOS
551
- scrollbarWidth: "none",
552
- // Firefox
553
- "&::-webkit-scrollbar": {
554
- display: "none"
555
- // Safari + Chrome
556
- }
557
- }, o.scrollableX && {
558
- overflowX: "auto",
559
- overflowY: "hidden"
560
- }, o.scrollableY && {
561
- overflowY: "auto",
562
- overflowX: "hidden"
563
- })), io = ce("div", {
564
- name: "MuiTabs",
565
- slot: "FlexContainer",
566
- overridesResolver: (o, n) => {
567
- const {
568
- ownerState: s
569
- } = o;
570
- return [n.flexContainer, s.vertical && n.flexContainerVertical, s.centered && n.centered];
571
- }
572
- })(({
573
- ownerState: o
574
- }) => k({
575
- display: "flex"
576
- }, o.vertical && {
577
- flexDirection: "column"
578
- }, o.centered && {
579
- justifyContent: "center"
580
- })), bo = ce("span", {
581
- name: "MuiTabs",
582
- slot: "Indicator",
583
- overridesResolver: (o, n) => n.indicator
584
- })(({
585
- ownerState: o,
586
- theme: n
587
- }) => k({
588
- position: "absolute",
589
- height: 2,
590
- bottom: 0,
591
- width: "100%",
592
- transition: n.transitions.create()
593
- }, o.indicatorColor === "primary" && {
594
- backgroundColor: (n.vars || n).palette.primary.main
595
- }, o.indicatorColor === "secondary" && {
596
- backgroundColor: (n.vars || n).palette.secondary.main
597
- }, o.vertical && {
598
- height: "100%",
599
- width: 2,
600
- right: 0
601
- })), uo = ce(pt)({
602
- overflowX: "auto",
603
- overflowY: "hidden",
604
- // Hide dimensionless scrollbar on macOS
605
- scrollbarWidth: "none",
606
- // Firefox
607
- "&::-webkit-scrollbar": {
608
- display: "none"
609
- // Safari + Chrome
610
- }
611
- }), lt = {};
612
- let st = !1;
613
- const xt = /* @__PURE__ */ v.forwardRef(function(n, s) {
614
- const i = Ae({
615
- props: n,
616
- name: "MuiTabs"
617
- }), b = Ut(), a = dt(), {
618
- "aria-label": c,
619
- "aria-labelledby": w,
620
- action: h,
621
- centered: O = !1,
622
- children: $,
623
- className: F,
624
- component: I = "div",
625
- allowScrollButtonsMobile: P = !1,
626
- indicatorColor: U = "primary",
627
- onChange: _,
628
- orientation: p = "horizontal",
629
- ScrollButtonComponent: L = ft,
630
- scrollButtons: t = "auto",
631
- selectionFollowsFocus: x,
632
- slots: y = {},
633
- slotProps: g = {},
634
- TabIndicatorProps: S = {},
635
- TabScrollButtonProps: T = {},
636
- textColor: R = "primary",
637
- value: f,
638
- variant: m = "standard",
639
- visibleScrollbar: W = !1
640
- } = i, G = pe(i, lo), D = m === "scrollable", E = p === "vertical", z = E ? "scrollTop" : "scrollLeft", X = E ? "top" : "left", q = E ? "bottom" : "right", Q = E ? "clientHeight" : "clientWidth", H = E ? "height" : "width", j = k({}, i, {
641
- component: I,
642
- allowScrollButtonsMobile: P,
643
- indicatorColor: U,
644
- orientation: p,
645
- vertical: E,
646
- scrollButtons: t,
647
- textColor: R,
648
- variant: m,
649
- visibleScrollbar: W,
650
- fixed: !D,
651
- hideScrollbar: D && !W,
652
- scrollableX: D && !E,
653
- scrollableY: D && E,
654
- centered: O && !D,
655
- scrollButtonsHideMobile: !P
656
- }), M = so(j), Y = Ne({
657
- elementType: y.StartScrollButtonIcon,
658
- externalSlotProps: g.startScrollButtonIcon,
659
- ownerState: j
660
- }), K = Ne({
661
- elementType: y.EndScrollButtonIcon,
662
- externalSlotProps: g.endScrollButtonIcon,
663
- ownerState: j
664
- });
665
- Z.env.NODE_ENV;
666
- const [He, St] = v.useState(!1), [ie, Ge] = v.useState(lt), [Xe, Nt] = v.useState(!1), [qe, Ct] = v.useState(!1), [Ye, Tt] = v.useState(!1), [Ke, It] = v.useState({
667
- overflow: "hidden",
668
- scrollbarWidth: 0
669
- }), Ze = /* @__PURE__ */ new Map(), te = v.useRef(null), de = v.useRef(null), Je = () => {
670
- const d = te.current;
671
- let u;
672
- if (d) {
673
- const C = d.getBoundingClientRect();
674
- u = {
675
- clientWidth: d.clientWidth,
676
- scrollLeft: d.scrollLeft,
677
- scrollTop: d.scrollTop,
678
- scrollLeftNormalized: jt(d, a ? "rtl" : "ltr"),
679
- scrollWidth: d.scrollWidth,
680
- top: C.top,
681
- bottom: C.bottom,
682
- left: C.left,
683
- right: C.right
684
- };
685
- }
686
- let N;
687
- if (d && f !== !1) {
688
- const C = de.current.children;
689
- if (C.length > 0) {
690
- const A = C[Ze.get(f)];
691
- Z.env.NODE_ENV, N = A ? A.getBoundingClientRect() : null, Z.env.NODE_ENV !== "production" && Z.env.NODE_ENV !== "test" && !st && N && N.width === 0 && N.height === 0 && // if the whole Tabs component is hidden, don't warn
692
- u.clientWidth !== 0 && (u = null, st = !0);
693
- }
694
- }
695
- return {
696
- tabsMeta: u,
697
- tabMeta: N
698
- };
699
- }, fe = Ue(() => {
700
- const {
701
- tabsMeta: d,
702
- tabMeta: u
703
- } = Je();
704
- let N = 0, C;
705
- if (E)
706
- C = "top", u && d && (N = u.top - d.top + d.scrollTop);
707
- else if (C = a ? "right" : "left", u && d) {
708
- const V = a ? d.scrollLeftNormalized + d.clientWidth - d.scrollWidth : d.scrollLeft;
709
- N = (a ? -1 : 1) * (u[C] - d[C] + V);
710
- }
711
- const A = {
712
- [C]: N,
713
- // May be wrong until the font is loaded.
714
- [H]: u ? u[H] : 0
715
- };
716
- if (isNaN(ie[C]) || isNaN(ie[H]))
717
- Ge(A);
718
- else {
719
- const V = Math.abs(ie[C] - A[C]), ee = Math.abs(ie[H] - A[H]);
720
- (V >= 1 || ee >= 1) && Ge(A);
721
- }
722
- }), Me = (d, {
723
- animation: u = !0
724
- } = {}) => {
725
- u ? Kt(z, te.current, d, {
726
- duration: b.transitions.duration.standard
727
- }) : te.current[z] = d;
728
- }, Qe = (d) => {
729
- let u = te.current[z];
730
- E ? u += d : (u += d * (a ? -1 : 1), u *= a && wt() === "reverse" ? -1 : 1), Me(u);
731
- }, et = () => {
732
- const d = te.current[Q];
733
- let u = 0;
734
- const N = Array.from(de.current.children);
735
- for (let C = 0; C < N.length; C += 1) {
736
- const A = N[C];
737
- if (u + A[Q] > d) {
738
- C === 0 && (u = d);
739
- break;
740
- }
741
- u += A[Q];
742
- }
743
- return u;
744
- }, Et = () => {
745
- Qe(-1 * et());
746
- }, Ot = () => {
747
- Qe(et());
748
- }, Bt = v.useCallback((d) => {
749
- It({
750
- overflow: null,
751
- scrollbarWidth: d
752
- });
753
- }, []), Lt = () => {
754
- const d = {};
755
- d.scrollbarSizeListener = D ? /* @__PURE__ */ e(uo, {
756
- onChange: Bt,
757
- className: oe(M.scrollableX, M.hideScrollbar)
758
- }) : null;
759
- const N = D && (t === "auto" && (Xe || qe) || t === !0);
760
- return d.scrollButtonStart = N ? /* @__PURE__ */ e(L, k({
761
- slots: {
762
- StartScrollButtonIcon: y.StartScrollButtonIcon
763
- },
764
- slotProps: {
765
- startScrollButtonIcon: Y
766
- },
767
- orientation: p,
768
- direction: a ? "right" : "left",
769
- onClick: Et,
770
- disabled: !Xe
771
- }, T, {
772
- className: oe(M.scrollButtons, T.className)
773
- })) : null, d.scrollButtonEnd = N ? /* @__PURE__ */ e(L, k({
774
- slots: {
775
- EndScrollButtonIcon: y.EndScrollButtonIcon
776
- },
777
- slotProps: {
778
- endScrollButtonIcon: K
779
- },
780
- orientation: p,
781
- direction: a ? "left" : "right",
782
- onClick: Ot,
783
- disabled: !qe
784
- }, T, {
785
- className: oe(M.scrollButtons, T.className)
786
- })) : null, d;
787
- }, tt = Ue((d) => {
788
- const {
789
- tabsMeta: u,
790
- tabMeta: N
791
- } = Je();
792
- if (!(!N || !u)) {
793
- if (N[X] < u[X]) {
794
- const C = u[z] + (N[X] - u[X]);
795
- Me(C, {
796
- animation: d
797
- });
798
- } else if (N[q] > u[q]) {
799
- const C = u[z] + (N[q] - u[q]);
800
- Me(C, {
801
- animation: d
802
- });
803
- }
804
- }
805
- }), he = Ue(() => {
806
- D && t !== !1 && Tt(!Ye);
807
- });
808
- v.useEffect(() => {
809
- const d = it(() => {
810
- te.current && fe();
811
- });
812
- let u;
813
- const N = (V) => {
814
- V.forEach((ee) => {
815
- ee.removedNodes.forEach((xe) => {
816
- var re;
817
- (re = u) == null || re.unobserve(xe);
818
- }), ee.addedNodes.forEach((xe) => {
819
- var re;
820
- (re = u) == null || re.observe(xe);
821
- });
822
- }), d(), he();
823
- }, C = ut(te.current);
824
- C.addEventListener("resize", d);
825
- let A;
826
- return typeof ResizeObserver < "u" && (u = new ResizeObserver(d), Array.from(de.current.children).forEach((V) => {
827
- u.observe(V);
828
- })), typeof MutationObserver < "u" && (A = new MutationObserver(N), A.observe(de.current, {
829
- childList: !0
830
- })), () => {
831
- var V, ee;
832
- d.clear(), C.removeEventListener("resize", d), (V = A) == null || V.disconnect(), (ee = u) == null || ee.disconnect();
833
- };
834
- }, [fe, he]), v.useEffect(() => {
835
- const d = Array.from(de.current.children), u = d.length;
836
- if (typeof IntersectionObserver < "u" && u > 0 && D && t !== !1) {
837
- const N = d[0], C = d[u - 1], A = {
838
- root: te.current,
839
- threshold: 0.99
840
- }, V = (ke) => {
841
- Nt(!ke[0].isIntersecting);
842
- }, ee = new IntersectionObserver(V, A);
843
- ee.observe(N);
844
- const xe = (ke) => {
845
- Ct(!ke[0].isIntersecting);
846
- }, re = new IntersectionObserver(xe, A);
847
- return re.observe(C), () => {
848
- ee.disconnect(), re.disconnect();
849
- };
850
- }
851
- }, [D, t, Ye, $ == null ? void 0 : $.length]), v.useEffect(() => {
852
- St(!0);
853
- }, []), v.useEffect(() => {
854
- fe();
855
- }), v.useEffect(() => {
856
- tt(lt !== ie);
857
- }, [tt, ie]), v.useImperativeHandle(h, () => ({
858
- updateIndicator: fe,
859
- updateScrollButtons: he
860
- }), [fe, he]);
861
- const ot = /* @__PURE__ */ e(bo, k({}, S, {
862
- className: oe(M.indicator, S.className),
863
- ownerState: j,
864
- style: k({}, ie, S.style)
865
- }));
866
- let me = 0;
867
- const Mt = v.Children.map($, (d) => {
868
- if (!/* @__PURE__ */ v.isValidElement(d))
869
- return null;
870
- Z.env.NODE_ENV !== "production" && At.isFragment(d);
871
- const u = d.props.value === void 0 ? me : d.props.value;
872
- Ze.set(u, me);
873
- const N = u === f;
874
- return me += 1, /* @__PURE__ */ v.cloneElement(d, k({
875
- fullWidth: m === "fullWidth",
876
- indicator: N && !He && ot,
877
- selected: N,
878
- selectionFollowsFocus: x,
879
- onChange: _,
880
- textColor: R,
881
- value: u
882
- }, me === 1 && f === !1 && !d.props.tabIndex ? {
883
- tabIndex: 0
884
- } : {}));
885
- }), $t = (d) => {
886
- const u = de.current, N = Rt(u).activeElement;
887
- if (N.getAttribute("role") !== "tab")
888
- return;
889
- let A = p === "horizontal" ? "ArrowLeft" : "ArrowUp", V = p === "horizontal" ? "ArrowRight" : "ArrowDown";
890
- switch (p === "horizontal" && a && (A = "ArrowRight", V = "ArrowLeft"), d.key) {
891
- case A:
892
- d.preventDefault(), ge(u, N, rt);
893
- break;
894
- case V:
895
- d.preventDefault(), ge(u, N, nt);
896
- break;
897
- case "Home":
898
- d.preventDefault(), ge(u, null, nt);
899
- break;
900
- case "End":
901
- d.preventDefault(), ge(u, null, rt);
902
- break;
903
- }
904
- }, $e = Lt();
905
- return /* @__PURE__ */ l(ao, k({
906
- className: oe(M.root, F),
907
- ownerState: j,
908
- ref: s,
909
- as: I
910
- }, G, {
911
- children: [$e.scrollButtonStart, $e.scrollbarSizeListener, /* @__PURE__ */ l(co, {
912
- className: M.scroller,
913
- ownerState: j,
914
- style: {
915
- overflow: Ke.overflow,
916
- [E ? `margin${a ? "Left" : "Right"}` : "marginBottom"]: W ? void 0 : -Ke.scrollbarWidth
917
- },
918
- ref: te,
919
- children: [/* @__PURE__ */ e(io, {
920
- "aria-label": c,
921
- "aria-labelledby": w,
922
- "aria-orientation": p === "vertical" ? "vertical" : null,
923
- className: M.flexContainer,
924
- ownerState: j,
925
- onKeyDown: $t,
926
- ref: de,
927
- role: "tablist",
928
- children: Mt
929
- }), He && ot]
930
- }), $e.scrollButtonEnd]
931
- }));
932
- });
933
- Z.env.NODE_ENV !== "production" && (xt.propTypes = {
934
- // ┌────────────────────────────── Warning ──────────────────────────────┐
935
- // │ These PropTypes are generated from the TypeScript type definitions. │
936
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
937
- // └─────────────────────────────────────────────────────────────────────┘
938
- /**
939
- * Callback fired when the component mounts.
940
- * This is useful when you want to trigger an action programmatically.
941
- * It supports two actions: `updateIndicator()` and `updateScrollButtons()`
942
- *
943
- * @param {object} actions This object contains all possible actions
944
- * that can be triggered programmatically.
945
- */
946
- action: Dt,
947
- /**
948
- * If `true`, the scroll buttons aren't forced hidden on mobile.
949
- * By default the scroll buttons are hidden on mobile and takes precedence over `scrollButtons`.
950
- * @default false
951
- */
952
- allowScrollButtonsMobile: r.bool,
953
- /**
954
- * The label for the Tabs as a string.
955
- */
956
- "aria-label": r.string,
957
- /**
958
- * An id or list of ids separated by a space that label the Tabs.
959
- */
960
- "aria-labelledby": r.string,
961
- /**
962
- * If `true`, the tabs are centered.
963
- * This prop is intended for large views.
964
- * @default false
965
- */
966
- centered: r.bool,
967
- /**
968
- * The content of the component.
969
- */
970
- children: r.node,
971
- /**
972
- * Override or extend the styles applied to the component.
973
- */
974
- classes: r.object,
975
- /**
976
- * @ignore
977
- */
978
- className: r.string,
979
- /**
980
- * The component used for the root node.
981
- * Either a string to use a HTML element or a component.
982
- */
983
- component: r.elementType,
984
- /**
985
- * Determines the color of the indicator.
986
- * @default 'primary'
987
- */
988
- indicatorColor: r.oneOfType([r.oneOf(["primary", "secondary"]), r.string]),
989
- /**
990
- * Callback fired when the value changes.
991
- *
992
- * @param {React.SyntheticEvent} event The event source of the callback. **Warning**: This is a generic event not a change event.
993
- * @param {any} value We default to the index of the child (number)
994
- */
995
- onChange: r.func,
996
- /**
997
- * The component orientation (layout flow direction).
998
- * @default 'horizontal'
999
- */
1000
- orientation: r.oneOf(["horizontal", "vertical"]),
1001
- /**
1002
- * The component used to render the scroll buttons.
1003
- * @default TabScrollButton
1004
- */
1005
- ScrollButtonComponent: r.elementType,
1006
- /**
1007
- * Determine behavior of scroll buttons when tabs are set to scroll:
1008
- *
1009
- * - `auto` will only present them when not all the items are visible.
1010
- * - `true` will always present them.
1011
- * - `false` will never present them.
1012
- *
1013
- * By default the scroll buttons are hidden on mobile.
1014
- * This behavior can be disabled with `allowScrollButtonsMobile`.
1015
- * @default 'auto'
1016
- */
1017
- scrollButtons: r.oneOf(["auto", !1, !0]),
1018
- /**
1019
- * If `true` the selected tab changes on focus. Otherwise it only
1020
- * changes on activation.
1021
- */
1022
- selectionFollowsFocus: r.bool,
1023
- /**
1024
- * The extra props for the slot components.
1025
- * You can override the existing props or add new ones.
1026
- * @default {}
1027
- */
1028
- slotProps: r.shape({
1029
- endScrollButtonIcon: r.oneOfType([r.func, r.object]),
1030
- startScrollButtonIcon: r.oneOfType([r.func, r.object])
1031
- }),
1032
- /**
1033
- * The components used for each slot inside.
1034
- * @default {}
1035
- */
1036
- slots: r.shape({
1037
- EndScrollButtonIcon: r.elementType,
1038
- StartScrollButtonIcon: r.elementType
1039
- }),
1040
- /**
1041
- * The system prop that allows defining system overrides as well as additional CSS styles.
1042
- */
1043
- sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object]),
1044
- /**
1045
- * Props applied to the tab indicator element.
1046
- * @default {}
1047
- */
1048
- TabIndicatorProps: r.object,
1049
- /**
1050
- * Props applied to the [`TabScrollButton`](/material-ui/api/tab-scroll-button/) element.
1051
- * @default {}
1052
- */
1053
- TabScrollButtonProps: r.object,
1054
- /**
1055
- * Determines the color of the `Tab`.
1056
- * @default 'primary'
1057
- */
1058
- textColor: r.oneOf(["inherit", "primary", "secondary"]),
1059
- /**
1060
- * The value of the currently selected `Tab`.
1061
- * If you don't want any selected `Tab`, you can set this prop to `false`.
1062
- */
1063
- value: r.any,
1064
- /**
1065
- * Determines additional display behavior of the tabs:
1066
- *
1067
- * - `scrollable` will invoke scrolling properties and allow for horizontally
1068
- * scrolling (or swiping) of the tab bar.
1069
- * - `fullWidth` will make the tabs grow to use all the available space,
1070
- * which should be used for small views, like on mobile.
1071
- * - `standard` will render the default state.
1072
- * @default 'standard'
1073
- */
1074
- variant: r.oneOf(["fullWidth", "scrollable", "standard"]),
1075
- /**
1076
- * If `true`, the scrollbar is visible. It can be useful when displaying
1077
- * a long vertical list of tabs.
1078
- * @default false
1079
- */
1080
- visibleScrollbar: r.bool
1081
- });
1082
- const ze = /* @__PURE__ */ v.createContext(null);
1083
- Z.env.NODE_ENV !== "production" && (ze.displayName = "TabContext");
1084
- function wo() {
1085
- const [o, n] = v.useState(null);
1086
- return v.useEffect(() => {
1087
- n(`mui-p-${Math.round(Math.random() * 1e5)}`);
1088
- }, []), o;
1089
- }
1090
- function ht(o) {
1091
- const {
1092
- children: n,
1093
- value: s
1094
- } = o, i = wo(), b = v.useMemo(() => ({
1095
- idPrefix: i,
1096
- value: s
1097
- }), [i, s]);
1098
- return /* @__PURE__ */ e(ze.Provider, {
1099
- value: b,
1100
- children: n
1101
- });
1102
- }
1103
- Z.env.NODE_ENV !== "production" && (ht.propTypes = {
1104
- // ┌────────────────────────────── Warning ──────────────────────────────┐
1105
- // │ These PropTypes are generated from the TypeScript type definitions. │
1106
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1107
- // └─────────────────────────────────────────────────────────────────────┘
1108
- /**
1109
- * The content of the component.
1110
- */
1111
- children: r.node,
1112
- /**
1113
- * The value of the currently selected `Tab`.
1114
- */
1115
- value: r.oneOfType([r.number, r.string]).isRequired
1116
- });
1117
- function mt() {
1118
- return v.useContext(ze);
1119
- }
1120
- function gt(o, n) {
1121
- const {
1122
- idPrefix: s
1123
- } = o;
1124
- return s === null ? null : `${o.idPrefix}-P-${n}`;
1125
- }
1126
- function vt(o, n) {
1127
- const {
1128
- idPrefix: s
1129
- } = o;
1130
- return s === null ? null : `${o.idPrefix}-T-${n}`;
1131
- }
1132
- const po = ["children"], yt = /* @__PURE__ */ v.forwardRef(function(n, s) {
1133
- const {
1134
- children: i
1135
- } = n, b = pe(n, po), a = mt();
1136
- if (a === null)
1137
- throw new TypeError("No TabContext provided");
1138
- const c = v.Children.map(i, (w) => /* @__PURE__ */ v.isValidElement(w) ? /* @__PURE__ */ v.cloneElement(w, {
1139
- // SOMEDAY: `Tabs` will set those themselves
1140
- "aria-controls": gt(a, w.props.value),
1141
- id: vt(a, w.props.value)
1142
- }) : null);
1143
- return /* @__PURE__ */ e(xt, k({}, b, {
1144
- ref: s,
1145
- value: a.value,
1146
- children: c
1147
- }));
1148
- });
1149
- Z.env.NODE_ENV !== "production" && (yt.propTypes = {
1150
- // ┌────────────────────────────── Warning ──────────────────────────────┐
1151
- // │ These PropTypes are generated from the TypeScript type definitions. │
1152
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1153
- // └─────────────────────────────────────────────────────────────────────┘
1154
- /**
1155
- * A list of `<Tab />` elements.
1156
- */
1157
- children: r.node
1158
- });
1159
- function fo(o) {
1160
- return Ie("MuiTabPanel", o);
1161
- }
1162
- Te("MuiTabPanel", ["root"]);
1163
- const xo = ["children", "className", "value"], ho = (o) => {
1164
- const {
1165
- classes: n
1166
- } = o;
1167
- return Ee({
1168
- root: ["root"]
1169
- }, fo, n);
1170
- }, mo = ce("div", {
1171
- name: "MuiTabPanel",
1172
- slot: "Root",
1173
- overridesResolver: (o, n) => n.root
1174
- })(({
1175
- theme: o
1176
- }) => ({
1177
- padding: o.spacing(3)
1178
- })), Se = /* @__PURE__ */ v.forwardRef(function(n, s) {
1179
- const i = Ft({
1180
- props: n,
1181
- name: "MuiTabPanel"
1182
- }), {
1183
- children: b,
1184
- className: a,
1185
- value: c
1186
- } = i, w = pe(i, xo), h = k({}, i), O = ho(h), $ = mt();
1187
- if ($ === null)
1188
- throw new TypeError("No TabContext provided");
1189
- const F = gt($, c), I = vt($, c);
1190
- return /* @__PURE__ */ e(mo, k({
1191
- "aria-labelledby": I,
1192
- className: oe(O.root, a),
1193
- hidden: c !== $.value,
1194
- id: F,
1195
- ref: s,
1196
- role: "tabpanel",
1197
- ownerState: h
1198
- }, w, {
1199
- children: c === $.value && b
1200
- }));
1201
- });
1202
- Z.env.NODE_ENV !== "production" && (Se.propTypes = {
1203
- // ┌────────────────────────────── Warning ──────────────────────────────┐
1204
- // │ These PropTypes are generated from the TypeScript type definitions. │
1205
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1206
- // └─────────────────────────────────────────────────────────────────────┘
1207
- /**
1208
- * The content of the component.
1209
- */
1210
- children: r.node,
1211
- /**
1212
- * Override or extend the styles applied to the component.
1213
- */
1214
- classes: r.object,
1215
- /**
1216
- * @ignore
1217
- */
1218
- className: r.string,
1219
- /**
1220
- * The system prop that allows defining system overrides as well as additional CSS styles.
1221
- */
1222
- sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object]),
1223
- /**
1224
- * The `value` of the corresponding `Tab`. Must use the index of the `Tab` when
1225
- * no `value` was passed to `Tab`.
1226
- */
1227
- value: r.string.isRequired
1228
- });
1229
- function ae({ name: o, children: n }) {
1230
- return /* @__PURE__ */ e(
1231
- Pt,
1232
- {
1233
- componentsProps: {
1234
- tooltip: {
1235
- sx: {
1236
- bgcolor: "var(--tw-background-container)",
1237
- "& .MuiTooltip-arrow": {
1238
- color: "var(--tw-bg-container)"
1239
- },
1240
- border: "1px solid var(--tw-border-primary)",
1241
- color: "var(--tw-text-primary)",
1242
- boxShadow: "0px 0px 6.1px 0px #0000001A"
1243
- }
1244
- }
1245
- },
1246
- slotProps: {
1247
- popper: {
1248
- modifiers: [
1249
- {
1250
- name: "offset",
1251
- options: {
1252
- offset: [0, -14]
1253
- }
1254
- }
1255
- ]
1256
- }
1257
- },
1258
- className: "bw-text-text-button",
1259
- title: o,
1260
- placement: "top",
1261
- children: n
1262
- }
1263
- );
1264
- }
1265
- function Oe({ fill: o, spinnerColor: n, stopColor: s }) {
1266
- return /* @__PURE__ */ l(
1267
- "svg",
1268
- {
1269
- width: "100%",
1270
- height: "100%",
1271
- viewBox: "0 0 16 16",
1272
- fill: "none",
1273
- xmlns: "http://www.w3.org/2000/svg",
1274
- children: [
1275
- /* @__PURE__ */ e(
1276
- "rect",
1277
- {
1278
- x: "0.820312",
1279
- y: "1.4248",
1280
- width: "14",
1281
- height: "14",
1282
- rx: "7",
1283
- fill: o,
1284
- stroke: "url(#paint0_linear_739_20205)"
1285
- }
1286
- ),
1287
- /* @__PURE__ */ e(
1288
- "path",
1289
- {
1290
- d: "M7.34417 5.19093C7.49384 4.73028 8.14555 4.73028 8.29522 5.19093L8.53764 5.937C8.73845 6.55504 9.31438 6.97348 9.96422 6.97348H10.7487C11.233 6.97348 11.4344 7.59329 11.0426 7.87799L10.4079 8.33908C9.8822 8.72105 9.66222 9.3981 9.86303 10.0161L10.1054 10.7622C10.2551 11.2229 9.72788 11.6059 9.33602 11.3212L8.70137 10.8601C8.17564 10.4782 7.46375 10.4782 6.93802 10.8601L6.30337 11.3212C5.91152 11.6059 5.38428 11.2229 5.53395 10.7622L5.77637 10.0161C5.97718 9.3981 5.75719 8.72105 5.23146 8.33908L4.59681 7.87799C4.20496 7.59329 4.40635 6.97348 4.89071 6.97348H5.67517C6.32501 6.97348 6.90094 6.55504 7.10176 5.937L7.34417 5.19093Z",
1291
- stroke: "black"
1292
- }
1293
- ),
1294
- /* @__PURE__ */ e(
1295
- "path",
1296
- {
1297
- d: "M7.34417 5.19093C7.49384 4.73028 8.14555 4.73028 8.29522 5.19093L8.53764 5.937C8.73845 6.55504 9.31438 6.97348 9.96422 6.97348H10.7487C11.233 6.97348 11.4344 7.59329 11.0426 7.87799L10.4079 8.33908C9.8822 8.72105 9.66222 9.3981 9.86303 10.0161L10.1054 10.7622C10.2551 11.2229 9.72788 11.6059 9.33602 11.3212L8.70137 10.8601C8.17564 10.4782 7.46375 10.4782 6.93802 10.8601L6.30337 11.3212C5.91152 11.6059 5.38428 11.2229 5.53395 10.7622L5.77637 10.0161C5.97718 9.3981 5.75719 8.72105 5.23146 8.33908L4.59681 7.87799C4.20496 7.59329 4.40635 6.97348 4.89071 6.97348H5.67517C6.32501 6.97348 6.90094 6.55504 7.10176 5.937L7.34417 5.19093Z",
1298
- stroke: "url(#paint1_linear_739_20205)"
1299
- }
1300
- ),
1301
- /* @__PURE__ */ e(
1302
- "path",
1303
- {
1304
- d: "M7.34417 5.19093C7.49384 4.73028 8.14555 4.73028 8.29522 5.19093L8.53764 5.937C8.73845 6.55504 9.31438 6.97348 9.96422 6.97348H10.7487C11.233 6.97348 11.4344 7.59329 11.0426 7.87799L10.4079 8.33908C9.8822 8.72105 9.66222 9.3981 9.86303 10.0161L10.1054 10.7622C10.2551 11.2229 9.72788 11.6059 9.33602 11.3212L8.70137 10.8601C8.17564 10.4782 7.46375 10.4782 6.93802 10.8601L6.30337 11.3212C5.91152 11.6059 5.38428 11.2229 5.53395 10.7622L5.77637 10.0161C5.97718 9.3981 5.75719 8.72105 5.23146 8.33908L4.59681 7.87799C4.20496 7.59329 4.40635 6.97348 4.89071 6.97348H5.67517C6.32501 6.97348 6.90094 6.55504 7.10176 5.937L7.34417 5.19093Z",
1305
- stroke: "black",
1306
- "stroke-opacity": "0.2"
1307
- }
1308
- ),
1309
- /* @__PURE__ */ l("defs", { children: [
1310
- /* @__PURE__ */ l(
1311
- "linearGradient",
1312
- {
1313
- id: "paint0_linear_739_20205",
1314
- x1: "18.1645",
1315
- y1: "6.26376",
1316
- x2: "-8.973",
1317
- y2: "6.2369",
1318
- gradientUnits: "userSpaceOnUse",
1319
- children: [
1320
- /* @__PURE__ */ e("stop", { "stop-color": n || "#2CFFE4" }),
1321
- /* @__PURE__ */ e("stop", { offset: "1", "stop-color": s || "#A45EFF" })
1322
- ]
1323
- }
1324
- ),
1325
- /* @__PURE__ */ l(
1326
- "linearGradient",
1327
- {
1328
- id: "paint1_linear_739_20205",
1329
- x1: "10.9776",
1330
- y1: "10.0041",
1331
- x2: "1.99984",
1332
- y2: "2.87371",
1333
- gradientUnits: "userSpaceOnUse",
1334
- children: [
1335
- /* @__PURE__ */ e("stop", { "stop-color": n || "#2CFFE4" }),
1336
- /* @__PURE__ */ e("stop", { offset: "1", "stop-color": s || "#A45EFF" })
1337
- ]
1338
- }
1339
- )
1340
- ] })
1341
- ]
1342
- }
1343
- );
1344
- }
1345
- function Be({ fill: o }) {
1346
- return /* @__PURE__ */ l(
1347
- "svg",
1348
- {
1349
- width: "100%",
1350
- height: "100%",
1351
- viewBox: "0 0 16 16",
1352
- fill: "none",
1353
- xmlns: "http://www.w3.org/2000/svg",
1354
- children: [
1355
- /* @__PURE__ */ e(
1356
- "rect",
1357
- {
1358
- x: "0.839844",
1359
- y: "0.938477",
1360
- width: "14",
1361
- height: "14",
1362
- rx: "7",
1363
- fill: o
1364
- }
1365
- ),
1366
- /* @__PURE__ */ e(
1367
- "rect",
1368
- {
1369
- x: "0.839844",
1370
- y: "0.938477",
1371
- width: "14",
1372
- height: "14",
1373
- rx: "7",
1374
- fill: o
1375
- }
1376
- ),
1377
- /* @__PURE__ */ e(
1378
- "rect",
1379
- {
1380
- x: "0.839844",
1381
- y: "0.938477",
1382
- width: "14",
1383
- height: "14",
1384
- rx: "7",
1385
- stroke: "#69AEF2"
1386
- }
1387
- ),
1388
- /* @__PURE__ */ e(
1389
- "path",
1390
- {
1391
- "fill-rule": "evenodd",
1392
- "clip-rule": "evenodd",
1393
- d: "M10.7198 5.55386C10.7352 5.56138 10.7489 5.57121 10.762 5.58393C10.7654 5.5874 10.7682 5.59087 10.7711 5.59434C10.9357 5.72676 11.1002 5.87653 11.2198 6.05696C11.3519 6.25646 11.4253 6.48719 11.3809 6.76072C11.3621 6.87522 11.3194 6.97526 11.2545 7.06373C11.2078 7.12677 11.1509 7.18228 11.0837 7.23085C11.0803 7.31933 11.0791 7.40607 11.0791 7.49223C11.0797 7.60269 11.0831 7.71661 11.0894 7.83342C11.1036 8.10752 11.1441 8.38393 11.1845 8.65804C11.2278 8.95296 11.271 9.24556 11.2824 9.55031C11.2978 9.94065 11.2522 10.2616 11.1253 10.4883C10.9841 10.7416 10.7546 10.8769 10.4164 10.8647C10.0126 10.8572 9.76438 10.6271 9.6522 10.202C9.55427 9.8302 9.56907 9.29934 9.6801 8.63144C9.67669 8.10231 9.60893 7.70157 9.47455 7.43152C9.38686 7.25514 9.26785 7.13833 9.11753 7.08282V10.5478C9.1665 10.5715 9.21091 10.6039 9.24849 10.6427C9.33504 10.7306 9.38914 10.8526 9.38914 10.9867V11.3326C9.38914 11.4199 9.3191 11.491 9.23312 11.491H5.23414C5.14816 11.491 5.07812 11.4199 5.07812 11.3326V10.9867C5.07812 10.8526 5.13222 10.7312 5.21877 10.6427C5.24553 10.6155 5.27571 10.5912 5.30817 10.571V5.2254C5.30817 4.99409 5.40098 4.78417 5.55074 4.63209C5.70049 4.48 5.90719 4.38574 6.13495 4.38574H8.28619C8.51452 4.38574 8.72236 4.48058 8.87268 4.63324C9.023 4.78591 9.11639 4.99698 9.11639 5.22945V6.75378C9.39312 6.81507 9.60437 6.99492 9.75128 7.28984C9.90901 7.60615 9.98759 8.05952 9.98986 8.64647C9.98986 8.65572 9.9893 8.66498 9.98759 8.67365H9.98816C9.88282 9.30224 9.86573 9.79261 9.95228 10.1205C10.0246 10.3963 10.1772 10.5455 10.4215 10.549H10.4243C10.6327 10.5559 10.7711 10.4784 10.8525 10.3321C10.9488 10.1598 10.9823 9.89554 10.9693 9.56246C10.9584 9.28026 10.9157 8.99286 10.8736 8.70372C10.8326 8.42499 10.7916 8.14395 10.7762 7.84903C10.77 7.7328 10.7665 7.61425 10.766 7.49166C10.7654 7.39451 10.7671 7.29851 10.7711 7.20425C10.4801 6.94519 10.303 6.68612 10.2484 6.42821C10.1966 6.1836 10.2512 5.94882 10.4192 5.72445C10.2911 5.63539 10.1607 5.56253 10.0286 5.50413C9.84808 5.42432 9.84694 5.41738 9.6579 5.38616C9.57306 5.37228 9.51554 5.29074 9.52921 5.20458C9.54288 5.11842 9.62316 5.06001 9.70801 5.07389C9.9221 5.10916 9.94773 5.12304 10.1533 5.21383C10.3486 5.30057 10.5371 5.41218 10.7198 5.55386ZM10.668 5.91817C10.5593 6.06621 10.5228 6.21425 10.5547 6.36344C10.5929 6.54386 10.7255 6.73585 10.9465 6.93883C10.9687 6.91859 10.9886 6.89719 11.0051 6.87464C11.0399 6.8278 11.0632 6.77286 11.0729 6.71041C11.1025 6.52767 11.0518 6.37096 10.9607 6.23333C10.8855 6.11941 10.7808 6.01416 10.668 5.91817ZM6.32286 5.1109H8.13472C8.22868 5.1109 8.31409 5.14964 8.37615 5.21268C8.38014 5.2173 8.38469 5.22135 8.38868 5.22655C8.44334 5.28843 8.47694 5.36997 8.47694 5.45786V6.63176C8.47694 6.72718 8.43879 6.8145 8.37672 6.87695C8.31523 6.9394 8.22982 6.97873 8.13529 6.97873H6.32286C6.22947 6.97873 6.14463 6.9394 6.082 6.87695L6.08143 6.87753C6.01993 6.81507 5.98121 6.72776 5.98121 6.63234V5.45729C5.98121 5.36187 6.01936 5.27513 6.08143 5.2121C6.08598 5.20805 6.08997 5.20342 6.09509 5.19995C6.15602 5.14444 6.23574 5.1109 6.32286 5.1109ZM8.9746 10.8324C8.97005 10.8329 8.96606 10.8329 8.96151 10.8329H5.49152C5.47216 10.8416 5.45451 10.8537 5.4397 10.8688C5.40952 10.8994 5.39073 10.9416 5.39073 10.9885V11.1758H9.0771V10.9885C9.0771 10.9422 9.05831 10.9 9.02813 10.8688C9.01276 10.8532 8.99453 10.841 8.9746 10.8324Z",
1394
- fill: "#69AEF2"
1395
- }
1396
- )
1397
- ]
1398
- }
1399
- );
1400
- }
1401
- function Le({ fill: o }) {
1402
- return /* @__PURE__ */ l(
1403
- "svg",
1404
- {
1405
- width: "100%",
1406
- height: "100%",
1407
- viewBox: "0 0 16 16",
1408
- fill: "none",
1409
- xmlns: "http://www.w3.org/2000/svg",
1410
- children: [
1411
- /* @__PURE__ */ e(
1412
- "rect",
1413
- {
1414
- x: "1.16797",
1415
- y: "0.666992",
1416
- width: "14",
1417
- height: "14",
1418
- rx: "7",
1419
- fill: o
1420
- }
1421
- ),
1422
- /* @__PURE__ */ e(
1423
- "rect",
1424
- {
1425
- x: "1.16797",
1426
- y: "0.666992",
1427
- width: "14",
1428
- height: "14",
1429
- rx: "7",
1430
- fill: o
1431
- }
1432
- ),
1433
- /* @__PURE__ */ e(
1434
- "rect",
1435
- {
1436
- x: "1.16797",
1437
- y: "0.666992",
1438
- width: "14",
1439
- height: "14",
1440
- rx: "7",
1441
- stroke: "#FFC700"
1442
- }
1443
- ),
1444
- /* @__PURE__ */ e(
1445
- "path",
1446
- {
1447
- d: "M4.61719 8.06204L10.1435 3.3252L7.77508 6.48309H12.1172L4.61719 12.0094L8.16982 8.06204H4.61719Z",
1448
- fill: "#FFC700"
1449
- }
1450
- )
1451
- ]
1452
- }
1453
- );
1454
- }
1455
- function go({ gasImg: o, item: n, fromChain: s }) {
1456
- const [i, b] = J({});
1457
- return Fe(() => {
1458
- var c;
1459
- let a = { amountInUSD: 0 };
1460
- (c = n == null ? void 0 : n.fee) == null || c.forEach((w) => {
1461
- w.source == "FROM_SOURCE_WALLET" && (a.amountInUSD += Number(w.amountInUSD));
1462
- }), b(a);
1463
- }, [n]), /* @__PURE__ */ l("div", { className: "bw-flex bw-text-sm bw-items-center bw-gap-x-1", children: [
1464
- /* @__PURE__ */ e(Ve, { fill: "var(--tw-text-secondary)" }),
1465
- /* @__PURE__ */ l("p", { children: [
1466
- "$",
1467
- ue((i == null ? void 0 : i.amountInUSD) || 0, 6) || 0
1468
- ] })
1469
- ] });
1470
- }
1471
- function vo({ routes: o, handleShowAllRoutes: n, handleRoutesData: s, convertVal: i, fromChain: b, toChain: a, sort: c }) {
1472
- var _, p, L;
1473
- const w = se((t) => t.configuration), { gasnew: h, defaultCoin: O } = Ce, [$, F] = J({}), [I, P] = J({});
1474
- function U(t, x, y) {
1475
- var W;
1476
- B((t == null ? void 0 : t.minOutputAmountDisplay) * ((W = t == null ? void 0 : t.to) == null ? void 0 : W.lastPrice) || 0, 4);
1477
- let S = t.outputAmountDisplay * (i || 0) || 0, T = (x[x.length - 1].outputAmountDisplay || "") * i, R = (x[0].outputAmountDisplay || "") * i, f = c == "asc" ? T : R, m = c == "asc" ? R : T;
1478
- return y == 0 && c !== "asc" || y == x.length - 1 && c == "asc" ? {
1479
- val: /* @__PURE__ */ l("p", { className: "bw-text-[10px] bw-text-text-secondary bw-font-normal", children: [
1480
- /* @__PURE__ */ e("span", { className: "bw-text-text-greentext", children: `+$${ue(ve(f - m), 12)}` }),
1481
- " Higher Output"
1482
- ] }),
1483
- isMax: !0
1484
- } : y == x.length - 1 && c !== "asc" || y === 0 && c == "asc" ? {
1485
- val: /* @__PURE__ */ l("p", { className: "bw-text-[10px] bw-text-text-secondary bw-font-normal", children: [
1486
- /* @__PURE__ */ e("span", { className: `${f - m === 0 ? "bw-text-text-greentext" : "bw-bg-background-container"}`, children: `-$${ue(ve(f - m), 12)}` }),
1487
- " ",
1488
- f - m === 0 ? "Higher Output" : "Less Output"
1489
- ] }),
1490
- isMax: f - m === 0
1491
- } : {
1492
- val: /* @__PURE__ */ l("p", { className: "bw-text-[10px] bw-text-text-secondary bw-font-normal", children: [
1493
- /* @__PURE__ */ e("span", { className: `${f - S === 0 ? "bw-text-text-greentext" : "bw-bg-background-container"}`, children: `-$${ue(ve(f - S), 12)}` }),
1494
- " ",
1495
- f - S === 0 ? "Higher Output" : "Less Output"
1496
- ] }),
1497
- isMax: f - S === 0
1498
- };
1499
- }
1500
- return /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: "bw-h-[410px] bw-pt-2 bw-overflow-y-auto", children: (L = (p = (_ = o.data) == null ? void 0 : _.data) == null ? void 0 : p.quotes) == null ? void 0 : L.sort((t, x) => {
1501
- let y = Number(t.outputAmountDisplay || 0), g = Number(x.outputAmountDisplay || 0);
1502
- return c === "asc" ? y - g : g - y;
1503
- }).map((t, x, y) => {
1504
- var R, f, m, W, G, D, E, z, X, q, Q, H, j;
1505
- const g = U(t, y, x);
1506
- let S = (t == null ? void 0 : t.outputAmountDisplay) || "", T = (f = (R = t == null ? void 0 : t.providerDetails) == null ? void 0 : R.logoUrl) != null && f.length ? (m = t == null ? void 0 : t.providerDetails) == null ? void 0 : m.logoUrl : O;
1507
- return /* @__PURE__ */ e(
1508
- "div",
1509
- {
1510
- onClick: () => {
1511
- s(t), n();
1512
- },
1513
- className: "bw-mb-4",
1514
- children: /* @__PURE__ */ l(
1515
- "div",
1516
- {
1517
- style: {
1518
- boxShadow: w && w.customTheme && ((G = (W = w.customTheme) == null ? void 0 : W.shadow) == null ? void 0 : G.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
1519
- },
1520
- className: " bw-w-[93%] bw-mt-3 bw-cursor-pointer bw-ml-auto bw-mr-2 bw-flex bw-mb-8 bw-items-center bw-px-2 bw-relative bw-rounded-lg bw-pt-3 bw-pb-3 bw-border bw-border-border-primary",
1521
- children: [
1522
- /* @__PURE__ */ l("div", { className: "bw-absolute bw-flex bw-items-center bw-gap-x-1 bw-bottom-[-10%] bw-self-center bw-right-[47%]", children: [
1523
- (D = t.tags) != null && D.includes("BEST_OUTPUT") ? /* @__PURE__ */ e(ae, { name: "Max Output", children: /* @__PURE__ */ e("div", { className: "bw-w-[20px] bw-h-[20px]", children: /* @__PURE__ */ e(Oe, { fill: "var(--tw-background-container)" }) }) }) : /* @__PURE__ */ e(ne, {}),
1524
- (E = t.tags) != null && E.includes("CHEAP") ? /* @__PURE__ */ e(ae, { name: "Lowest Gas", children: /* @__PURE__ */ e("div", { className: "bw-w-[20px] bw-h-[20px]", children: /* @__PURE__ */ e(Be, { fill: "var(--tw-background-container)" }) }) }) : /* @__PURE__ */ e(ne, {}),
1525
- (z = t.tags) != null && z.includes("FAST") ? /* @__PURE__ */ e("div", { className: "bw-w-[20px] bw-h-[20px]", children: /* @__PURE__ */ e(Le, { fill: "var(--tw-background-container)" }) }) : /* @__PURE__ */ e(ne, {})
1526
- ] }),
1527
- /* @__PURE__ */ e("div", { className: "bw-w-[35px] bw-h-[35px] bw-absolute bw-z-50 bw-left-[-5%] bw-top-[-16%]", children: /* @__PURE__ */ e("img", { src: T, className: "bw-rounded-lg ", width: 35, height: 35 }) }),
1528
- /* @__PURE__ */ l("div", { className: "bw-absolute bw-text-[10px] bw-text-text-primary bw-font-normal bw-left-5 bw-top-1", children: [
1529
- /* @__PURE__ */ e("span", { className: `${g.color}`, children: g == null ? void 0 : g.val }),
1530
- " "
1531
- ] }),
1532
- /* @__PURE__ */ e("div", { className: "bw-flex bw-w-full bw-mt-4 bw-justify-between bw-items-center", children: /* @__PURE__ */ l("div", { children: [
1533
- /* @__PURE__ */ e("p", { className: "bw-text-xs bw-font-semibold bw-text-text-primary", children: ((X = t == null ? void 0 : t.providerDetails) == null ? void 0 : X.name) || "" }),
1534
- /* @__PURE__ */ l("p", { className: "bw-text-xs bw-font-normal bw-my-1 bw-text-text-secondary", children: [
1535
- "via",
1536
- " ",
1537
- ((q = t == null ? void 0 : t.protocolsUsed) == null ? void 0 : q.length) > 2 ? (t == null ? void 0 : t.protocolsUsed.slice(0, 2).map((M, Y, K) => Y == K.length - 1 ? M : `${M + " >> "}`)) + `+${((Q = t == null ? void 0 : t.protocolsUsed) == null ? void 0 : Q.length) - 2}` : t == null ? void 0 : t.protocolsUsed.map((M, Y, K) => Y == K.length - 1 ? M : `${M + " >> "}`),
1538
- " "
1539
- ] }),
1540
- /* @__PURE__ */ l("div", { className: "bw-flex bw-items-center bw-gap-x-1", children: [
1541
- /* @__PURE__ */ l("div", { className: "bw-flex bw-items-center bw-gap-x-1", children: [
1542
- /* @__PURE__ */ e(We, { fill: "var(--tw-text-secondary)" }),
1543
- /* @__PURE__ */ l("p", { className: "bw-text-xs bw-font-normal bw-text-text-secondary", children: [
1544
- t.steps.length,
1545
- " Step"
1546
- ] })
1547
- ] }),
1548
- /* @__PURE__ */ l("div", { className: "bw-text-xs bw-font-normal bw-text-text-secondary", children: [
1549
- " Slippage ",
1550
- t.slippage / 100,
1551
- "%"
1552
- ] })
1553
- ] })
1554
- ] }) }),
1555
- /* @__PURE__ */ l("div", { className: "bw-flex bw-flex-col bw-justify-between bw-w-full bw-items-end", children: [
1556
- /* @__PURE__ */ l("div", { className: "bw-flex bw-items-center bw-gap-x-2", children: [
1557
- /* @__PURE__ */ l("div", { className: ` bw-relative bw-rounded-[50%] bw-w-[21px] bw-h-[21px] bw-border bw-border-border-primary ${(H = t.to) != null && H.image ? "bw-bg-background-secondary" : ""}`, children: [
1558
- (j = t.to) != null && j.image ? /* @__PURE__ */ e("img", { src: t.to.image, width: 20, height: 20, alt: "img", className: "bw-rounded-[50%] bw-max-w-[20px] bw-max-h-[20px] bw-object-contain" }) : /* @__PURE__ */ e("img", { src: O, width: 20, height: 20, alt: "img", className: "bw-rounded-[50%]" }),
1559
- /* @__PURE__ */ l("div", { className: `bw-bg-background-secondary bw-absolute bw-bottom-[-30%] bw-right-[-15%] bw-rounded-[50%] bw-w-[12px] bw-h-[12px] bw-border bw-border-border-primary ${a != null && a.image ? "bw-bg-background-secondary" : ""}`, children: [
1560
- " ",
1561
- a != null && a.image ? /* @__PURE__ */ e("img", { src: a.image, width: 11, height: 11, className: "bw-rounded-[50%]", alt: "img" }) : /* @__PURE__ */ e("img", { src: O, width: 11, height: 11, className: "bw-rounded-[50%]", alt: "img" })
1562
- ] })
1563
- ] }),
1564
- /* @__PURE__ */ e("p", { className: "bw-text-lg bw-break-words bw-font-medium bw-text-text-primary", children: /* @__PURE__ */ e(we, { value: S, decimal: 12 }) })
1565
- ] }),
1566
- /* @__PURE__ */ e("div", { className: "bw-flex bw-text-xs bw-font-normal bw-mb-2 bw-items-center bw-gap-x-1", children: /* @__PURE__ */ l("p", { className: "bw-text-text-secondary", children: [
1567
- "$",
1568
- /* @__PURE__ */ e(we, { value: (t.outputAmountDisplay * i).toString() || "", decimal: 10 })
1569
- ] }) }),
1570
- /* @__PURE__ */ l("div", { className: "bw-text-sm bw-flex bw-items-center bw-gap-x-2 bw-font-medium bw-text-text-secondary", children: [
1571
- /* @__PURE__ */ l("div", { className: "bw-flex bw-text-sm bw-items-center bw-gap-x-1", children: [
1572
- /* @__PURE__ */ e(je, { fill: "var(--tw-text-secondary)" }),
1573
- /* @__PURE__ */ l("p", { children: [
1574
- " ",
1575
- t.estimatedTimeInSeconds >= 90 ? `${Math.round(B((t.estimatedTimeInSeconds || 60) / 60, 2) || 0)}min` : `${(t == null ? void 0 : t.estimatedTimeInSeconds) || 60} secs`
1576
- ] })
1577
- ] }),
1578
- /* @__PURE__ */ e(go, { item: t, gasImg: h, fromChain: b })
1579
- ] })
1580
- ] })
1581
- ]
1582
- }
1583
- )
1584
- },
1585
- x
1586
- );
1587
- }) }) });
1588
- }
1589
- function yo({ gasImg: o, item: n, fromChain: s }) {
1590
- const [i, b] = J({});
1591
- return Fe(() => {
1592
- var c;
1593
- let a = { amountInUSD: 0 };
1594
- (c = n == null ? void 0 : n.fee) == null || c.forEach((w) => {
1595
- w.source == "FROM_SOURCE_WALLET" && (a.amountInUSD += Number(w.amountInUSD));
1596
- }), b(a);
1597
- }, [n]), /* @__PURE__ */ l("div", { className: "bw-flex bw-text-sm bw-items-center bw-gap-x-1", children: [
1598
- /* @__PURE__ */ e(Ve, { fill: "var(--tw-text-secondary)" }),
1599
- /* @__PURE__ */ l("p", { children: [
1600
- "$",
1601
- ue((i == null ? void 0 : i.amountInUSD) || 0, 6) || 0
1602
- ] })
1603
- ] });
1604
- }
1605
- function So({ routes: o, handleShowAllRoutes: n, handleRoutesData: s, convertVal: i, fromChain: b, sort: a, toChain: c }) {
1606
- var _, p, L;
1607
- const { gasnew: w, defaultCoin: h } = Ce, [O, $] = J({}), [F, I] = J({}), P = se((t) => t.configuration);
1608
- function U(t, x, y) {
1609
- var W, G, D;
1610
- let g = { amountInUSD: 0 };
1611
- (W = t == null ? void 0 : t.fee) == null || W.forEach((E) => {
1612
- E.source == "FROM_SOURCE_WALLET" && (g.amountInUSD += Number(E.amountInUSD));
1613
- });
1614
- let S = g.amountInUSD, T = { amountInUSD: 0 };
1615
- (G = x[0].fee) == null || G.forEach((E) => {
1616
- E.source == "FROM_SOURCE_WALLET" && (T.amountInUSD += Number(E.amountInUSD));
1617
- });
1618
- let R = { amountInUSD: 0 };
1619
- (D = x[x.length - 1].fee) == null || D.forEach((E) => {
1620
- E.source == "FROM_SOURCE_WALLET" && (R.amountInUSD += Number(E.amountInUSD));
1621
- });
1622
- let f = a === "desc" ? R.amountInUSD : T.amountInUSD, m = a === "desc" ? T.amountInUSD : R.amountInUSD;
1623
- return y == 0 && a !== "desc" || y == x.length - 1 && a == "desc" ? {
1624
- val: /* @__PURE__ */ l("p", { className: "bw-text-[10px] bw-text-text-secondary bw-font-normal", children: [
1625
- /* @__PURE__ */ e("span", { className: "bw-text-text-greentext", children: `$${B(m - f, 4)}` }),
1626
- " Cheaper"
1627
- ] }),
1628
- isMax: !0
1629
- } : y === 0 && a !== "desc" ? {
1630
- val: /* @__PURE__ */ l("p", { className: "bw-text-[10px] bw-text-text-secondary bw-font-normal", children: [
1631
- /* @__PURE__ */ e("span", { className: `${B(f - m, 4) === 0 ? "bw-text-text-greentext" : "bw-bg-background-container"}`, children: `$${B(f - m, 4)}` }),
1632
- " ",
1633
- B(f - m, 4) === 0 ? "Cheaper" : "Higher"
1634
- ] }),
1635
- isMax: B(f - m, 4) === 0
1636
- } : y == x.length - 1 && a == "desc" ? {
1637
- val: /* @__PURE__ */ l("p", { className: "bw-text-[10px] bw-text-text-secondary bw-font-normal", children: [
1638
- /* @__PURE__ */ e("span", { className: `${B(m - f, 4) === 0 ? "bw-text-text-greentext" : "bw-bg-background-container"}`, children: `$${B(m - f, 4)}` }),
1639
- " ",
1640
- B(m - f, 4) ? "Cheaper" : "Higher"
1641
- ] }),
1642
- isMax: B(m - f, 4) === 0
1643
- } : {
1644
- val: /* @__PURE__ */ l("p", { className: "bw-text-[10px] bw-text-text-secondary bw-font-normal", children: [
1645
- /* @__PURE__ */ e("span", { className: `${B(S - f, 4) === 0 ? "bw-text-text-greentext" : "bw-bg-background-container"}`, children: `$${B(S - f, 4)}` }),
1646
- " ",
1647
- B(S - f, 4) ? "Cheaper" : "Higher"
1648
- ] }),
1649
- isMax: B(S - f, 4) === 0
1650
- };
1651
- }
1652
- return /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: "bw-h-[410px] bw-pt-2 bw-overflow-y-auto", children: (L = (p = (_ = o == null ? void 0 : o.data) == null ? void 0 : _.data) == null ? void 0 : p.quotes) == null ? void 0 : L.sort((t, x) => {
1653
- var R, f;
1654
- let y = { amountInUSD: 0 };
1655
- (R = t == null ? void 0 : t.fee) == null || R.forEach((m) => {
1656
- m.source == "FROM_SOURCE_WALLET" && (y.amountInUSD += Number(m.amountInUSD));
1657
- });
1658
- let g = { amountInUSD: 0 };
1659
- (f = x == null ? void 0 : x.fee) == null || f.forEach((m) => {
1660
- m.source == "FROM_SOURCE_WALLET" && (g.amountInUSD += Number(m.amountInUSD));
1661
- });
1662
- let S = y.amountInUSD, T = g.amountInUSD;
1663
- return a === "asc" || a === "none" ? S - T : T - S;
1664
- }).map((t, x, y) => {
1665
- var R, f, m, W, G, D, E, z, X, q, Q, H, j;
1666
- const g = U(t, y, x);
1667
- let S = (t == null ? void 0 : t.outputAmountDisplay) || "", T = (f = (R = t == null ? void 0 : t.providerDetails) == null ? void 0 : R.logoUrl) != null && f.length ? (m = t == null ? void 0 : t.providerDetails) == null ? void 0 : m.logoUrl : h;
1668
- return /* @__PURE__ */ e(
1669
- "div",
1670
- {
1671
- onClick: () => {
1672
- s(t), n();
1673
- },
1674
- className: "bw-mb-4",
1675
- children: /* @__PURE__ */ l(
1676
- "div",
1677
- {
1678
- style: {
1679
- boxShadow: P && P.customTheme && ((G = (W = P.customTheme) == null ? void 0 : W.shadow) == null ? void 0 : G.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
1680
- },
1681
- className: " bw-w-[93%] bw-mt-3 bw-cursor-pointer bw-ml-auto bw-mr-2 bw-flex bw-mb-8 bw-items-center bw-px-2 bw-relative bw-rounded-lg bw-pt-3 bw-pb-3 bw-border bw-border-border-primary",
1682
- children: [
1683
- /* @__PURE__ */ l("div", { className: "bw-absolute bw-flex bw-items-center bw-gap-x-1 bw-bottom-[-10%] bw-self-center bw-right-[47%]", children: [
1684
- (D = t.tags) != null && D.includes("CHEAP") ? /* @__PURE__ */ e(ae, { name: "Lowest Gas", children: /* @__PURE__ */ e("div", { className: "bw-w-[20px] bw-h-[20px]", children: /* @__PURE__ */ e(Be, { fill: "var(--tw-background-container)" }) }) }) : /* @__PURE__ */ e(ne, {}),
1685
- (E = t.tags) != null && E.includes("BEST_OUTPUT") ? /* @__PURE__ */ e(ae, { name: "Max Output", children: /* @__PURE__ */ e("div", { className: "bw-w-[20px] bw-h-[20px]", children: /* @__PURE__ */ e(Oe, { fill: "var(--tw-background-container)" }) }) }) : /* @__PURE__ */ e(ne, {}),
1686
- (z = t.tags) != null && z.includes("FAST") ? /* @__PURE__ */ e(ae, { name: "Fastest", children: /* @__PURE__ */ e("div", { className: "bw-w-[20px] bw-h-[20px]", children: /* @__PURE__ */ e(Le, { fill: "var(--tw-background-container)" }) }) }) : /* @__PURE__ */ e(ne, {})
1687
- ] }),
1688
- /* @__PURE__ */ e("div", { className: "bw-w-[35px] bw-h-[35px] bw-absolute bw-z-50 bw-left-[-5%] bw-top-[-16%]", children: /* @__PURE__ */ e("img", { src: T, className: "bw-rounded-lg ", width: 35, height: 35 }) }),
1689
- /* @__PURE__ */ l("div", { className: "bw-absolute bw-text-[10px] bw-text-text-primary bw-font-normal bw-left-5 bw-top-1", children: [
1690
- /* @__PURE__ */ e("span", { className: `${g.color}`, children: g == null ? void 0 : g.val }),
1691
- " "
1692
- ] }),
1693
- /* @__PURE__ */ e("div", { className: "bw-flex bw-w-full bw-mt-4 bw-justify-between bw-items-center", children: /* @__PURE__ */ l("div", { children: [
1694
- /* @__PURE__ */ e("p", { className: "bw-text-xs bw-font-semibold bw-text-text-primary", children: ((X = t == null ? void 0 : t.providerDetails) == null ? void 0 : X.name) || "" }),
1695
- /* @__PURE__ */ l("p", { className: "bw-text-xs bw-font-normal bw-my-1 bw-text-text-secondary", children: [
1696
- "via",
1697
- " ",
1698
- ((q = t == null ? void 0 : t.protocolsUsed) == null ? void 0 : q.length) > 2 ? (t == null ? void 0 : t.protocolsUsed.slice(0, 2).map((M, Y, K) => Y == K.length - 1 ? M : `${M + " >> "}`)) + `+${((Q = t == null ? void 0 : t.protocolsUsed) == null ? void 0 : Q.length) - 2}` : t == null ? void 0 : t.protocolsUsed.map((M, Y, K) => Y == K.length - 1 ? M : `${M + " >> "}`),
1699
- " "
1700
- ] }),
1701
- /* @__PURE__ */ l("div", { className: "bw-flex bw-items-center bw-gap-x-1", children: [
1702
- /* @__PURE__ */ l("div", { className: "bw-flex bw-items-center bw-gap-x-1", children: [
1703
- /* @__PURE__ */ e(We, { fill: "var(--tw-text-secondary)" }),
1704
- /* @__PURE__ */ l("p", { className: "bw-text-xs bw-font-normal bw-text-text-secondary", children: [
1705
- t.steps.length,
1706
- " Step"
1707
- ] })
1708
- ] }),
1709
- /* @__PURE__ */ l("div", { className: "bw-text-xs bw-font-normal bw-text-text-secondary", children: [
1710
- " Slippage ",
1711
- t.slippage / 100,
1712
- "%"
1713
- ] })
1714
- ] })
1715
- ] }) }),
1716
- /* @__PURE__ */ l("div", { className: "bw-flex bw-flex-col bw-justify-between bw-w-full bw-items-end", children: [
1717
- /* @__PURE__ */ l("div", { className: "bw-flex bw-items-center bw-gap-x-2", children: [
1718
- /* @__PURE__ */ l("div", { className: ` bw-relative bw-rounded-[50%] bw-w-[21px] bw-h-[21px] bw-border bw-border-border-primary ${(H = t.to) != null && H.image ? "bw-bg-background-secondary" : ""}`, children: [
1719
- (j = t.to) != null && j.image ? /* @__PURE__ */ e("img", { src: t.to.image, width: 20, height: 20, alt: "img", className: "bw-rounded-[50%] bw-max-w-[20px] bw-max-h-[20px] bw-object-contain" }) : /* @__PURE__ */ e("img", { src: h, width: 20, height: 20, alt: "img", className: "bw-rounded-[50%]" }),
1720
- /* @__PURE__ */ l("div", { className: ` bw-absolute bw-bottom-[-30%] bw-right-[-15%] bw-rounded-[50%] bw-w-[12px] bw-h-[12px] bw-border bw-border-border-primary ${c != null && c.image ? "bw-bg-background-secondary" : ""}`, children: [
1721
- " ",
1722
- c != null && c.image ? /* @__PURE__ */ e("img", { src: c.image, width: 11, height: 11, className: "bw-rounded-[50%]", alt: "img" }) : /* @__PURE__ */ e("img", { src: h, width: 11, height: 11, className: "bw-rounded-[50%]", alt: "img" })
1723
- ] })
1724
- ] }),
1725
- /* @__PURE__ */ e("p", { className: "bw-text-lg bw-break-words bw-font-medium bw-text-text-primary", children: /* @__PURE__ */ e(we, { value: S, decimal: 12 }) })
1726
- ] }),
1727
- /* @__PURE__ */ e("div", { className: "bw-flex bw-text-xs bw-font-normal bw-mb-2 bw-items-center bw-gap-x-1", children: /* @__PURE__ */ l("p", { className: "bw-text-text-secondary", children: [
1728
- "$",
1729
- /* @__PURE__ */ e(we, { value: ((t.outputAmountDisplay || "") * i).toString() || "", decimal: 10 })
1730
- ] }) }),
1731
- /* @__PURE__ */ l("div", { className: "bw-text-sm bw-flex bw-items-center bw-gap-x-2 bw-font-medium bw-text-text-secondary", children: [
1732
- /* @__PURE__ */ l("div", { className: "bw-flex bw-text-sm bw-items-center bw-gap-x-1", children: [
1733
- /* @__PURE__ */ e(je, { fill: "var(--tw-text-secondary)" }),
1734
- /* @__PURE__ */ l("p", { children: [
1735
- " ",
1736
- t.estimatedTimeInSeconds >= 90 ? `${Math.round(B((t.estimatedTimeInSeconds || 60) / 60, 2) || 0)}min` : `${(t == null ? void 0 : t.estimatedTimeInSeconds) || 60} secs`
1737
- ] })
1738
- ] }),
1739
- /* @__PURE__ */ e(yo, { item: t, gasImg: w, fromChain: b })
1740
- ] })
1741
- ] })
1742
- ]
1743
- }
1744
- )
1745
- },
1746
- x
1747
- );
1748
- }) }) });
1749
- }
1750
- function No({ gasImg: o, item: n, fromChain: s }) {
1751
- const [i, b] = J({});
1752
- return Fe(() => {
1753
- var c;
1754
- let a = { amountInUSD: 0 };
1755
- (c = n == null ? void 0 : n.fee) == null || c.forEach((w) => {
1756
- w.source == "FROM_SOURCE_WALLET" && (a.amountInUSD += Number(w.amountInUSD));
1757
- }), b(a);
1758
- }, [n]), /* @__PURE__ */ l("div", { className: "bw-flex bw-text-sm bw-items-center bw-gap-x-1", children: [
1759
- /* @__PURE__ */ e(Ve, { fill: "var(--tw-text-secondary)" }),
1760
- /* @__PURE__ */ l("p", { children: [
1761
- "$",
1762
- ue((i == null ? void 0 : i.amountInUSD) || 0, 6) || 0
1763
- ] })
1764
- ] });
1765
- }
1766
- function Co({ routes: o, handleShowAllRoutes: n, handleRoutesData: s, convertVal: i, fromChain: b, sort: a, toChain: c }) {
1767
- var _, p, L;
1768
- const { gasnew: w, defaultCoin: h } = Ce, [O, $] = J({}), [F, I] = J({}), P = se((t) => t.configuration);
1769
- function U(t, x, y) {
1770
- let g = B((t.estimatedTimeInSeconds || 60) / 60, 2) || 0, S = a == "asc" ? B((x[x.length - 1].estimatedTimeInSeconds || 60) / 60, 2) || 0 : B((x[0].estimatedTimeInSeconds || 60) / 60, 2) || 0, T = a == "asc" ? B((x[0].estimatedTimeInSeconds || 60) / 60, 2) || 0 : B((x[x.length - 1].estimatedTimeInSeconds || 60) / 60, 2) || 0;
1771
- return y == 0 && a !== "asc" || y == x.length - 1 && a == "asc" ? {
1772
- val: /* @__PURE__ */ l("p", { className: "bw-text-[10px] bw-text-text-secondary bw-font-normal", children: [
1773
- /* @__PURE__ */ e("span", { className: "bw-text-text-greentext", children: `+${B(T - S || 0, 2)} Mins` }),
1774
- " Faster"
1775
- ] }),
1776
- isMax: !0
1777
- } : y == x.length - 1 && a !== "asc" || y === 0 && a == "asc" ? {
1778
- val: /* @__PURE__ */ l("p", { className: "bw-text-[10px] bw-text-text-secondary bw-font-normal", children: [
1779
- /* @__PURE__ */ e("span", { className: `${S - T === 0 ? "bw-text-text-greentext" : "bw-bg-background-container"}`, children: `${B(T - S, 2)} Mins` }),
1780
- " ",
1781
- S - T === 0 ? "Faster" : "Slower"
1782
- ] }),
1783
- isMax: S - T === 0
1784
- } : {
1785
- val: /* @__PURE__ */ l("p", { className: "bw-text-[10px] bw-text-text-secondary bw-font-normal", children: [
1786
- /* @__PURE__ */ e("span", { className: `${S - g === 0 ? "bw-text-text-greentext" : "bw-bg-background-container"}`, children: `${B(g - S, 2)} Mins` }),
1787
- " ",
1788
- S - g === 0 ? "Faster" : "Slower"
1789
- ] }),
1790
- isMax: S - g === 0
1791
- };
1792
- }
1793
- return /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: "bw-h-[410px] bw-pt-2 bw-overflow-y-auto", children: (L = (p = (_ = o.data) == null ? void 0 : _.data) == null ? void 0 : p.quotes) == null ? void 0 : L.sort((t, x) => {
1794
- let y = B((t.estimatedTimeInSeconds || 60) / 60, 2) || 0, g = B((x.estimatedTimeInSeconds || 60) / 60, 2) || 0;
1795
- return a === "asc" ? g - y : y - g;
1796
- }).map((t, x, y) => {
1797
- var R, f, m, W, G, D, E, z, X, q, Q, H, j;
1798
- const g = U(t, y, x);
1799
- let S = (t == null ? void 0 : t.outputAmountDisplay) || "", T = (f = (R = t == null ? void 0 : t.providerDetails) == null ? void 0 : R.logoUrl) != null && f.length ? (m = t == null ? void 0 : t.providerDetails) == null ? void 0 : m.logoUrl : h;
1800
- return /* @__PURE__ */ e(
1801
- "div",
1802
- {
1803
- onClick: () => {
1804
- s(t), n();
1805
- },
1806
- className: "bw-mb-4",
1807
- children: /* @__PURE__ */ l(
1808
- "div",
1809
- {
1810
- style: {
1811
- boxShadow: P && P.customTheme && ((G = (W = P.customTheme) == null ? void 0 : W.shadow) == null ? void 0 : G.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
1812
- },
1813
- className: " bw-w-[93%] bw-mt-3 bw-cursor-pointer bw-ml-auto bw-mr-2 bw-flex bw-mb-8 bw-items-center bw-px-2 bw-relative bw-rounded-lg bw-pt-3 bw-pb-3 bw-border bw-border-border-primary",
1814
- children: [
1815
- /* @__PURE__ */ l("div", { className: "bw-absolute bw-flex bw-items-center bw-gap-x-1 bw-bottom-[-10%] bw-self-center bw-right-[47%]", children: [
1816
- (D = t.tags) != null && D.includes("FAST") ? /* @__PURE__ */ e(ae, { name: "Fastest", children: /* @__PURE__ */ e("div", { className: "bw-w-[20px] bw-h-[20px]", children: /* @__PURE__ */ e(Le, { fill: "var(--tw-background-container)" }) }) }) : /* @__PURE__ */ e(ne, {}),
1817
- (E = t.tags) != null && E.includes("CHEAP") ? /* @__PURE__ */ e(ae, { name: "Lowest Gas", children: /* @__PURE__ */ e("div", { className: "bw-w-[20px] bw-h-[20px]", children: /* @__PURE__ */ e(Be, { fill: "var(--tw-background-container)" }) }) }) : /* @__PURE__ */ e(ne, {}),
1818
- (z = t.tags) != null && z.includes("BEST_OUTPUT") ? /* @__PURE__ */ e(ae, { name: "Max Output", children: /* @__PURE__ */ e("div", { className: "bw-w-[20px] bw-h-[20px]", children: /* @__PURE__ */ e(Oe, { fill: "var(--tw-background-container)" }) }) }) : /* @__PURE__ */ e(ne, {})
1819
- ] }),
1820
- /* @__PURE__ */ e("div", { className: "bw-w-[35px] bw-h-[35px] bw-absolute bw-z-50 bw-left-[-5%] bw-top-[-16%]", children: /* @__PURE__ */ e("img", { src: T, className: "bw-rounded-lg ", width: 35, height: 35 }) }),
1821
- /* @__PURE__ */ l("div", { className: "bw-absolute bw-text-[10px] bw-text-text-primary bw-font-normal bw-left-5 bw-top-1", children: [
1822
- /* @__PURE__ */ e("span", { className: `${g.color}`, children: g == null ? void 0 : g.val }),
1823
- " "
1824
- ] }),
1825
- /* @__PURE__ */ e("div", { className: "bw-flex bw-w-full bw-mt-4 bw-justify-between bw-items-center", children: /* @__PURE__ */ l("div", { children: [
1826
- /* @__PURE__ */ e("p", { className: "bw-text-xs bw-font-semibold bw-text-text-primary", children: ((X = t == null ? void 0 : t.providerDetails) == null ? void 0 : X.name) || "" }),
1827
- /* @__PURE__ */ l("p", { className: "bw-text-xs bw-font-normal bw-my-1 bw-text-text-secondary", children: [
1828
- "via",
1829
- " ",
1830
- ((q = t == null ? void 0 : t.protocolsUsed) == null ? void 0 : q.length) > 2 ? (t == null ? void 0 : t.protocolsUsed.slice(0, 2).map((M, Y, K) => Y == K.length - 1 ? M : `${M + " >> "}`)) + `+${((Q = t == null ? void 0 : t.protocolsUsed) == null ? void 0 : Q.length) - 2}` : t == null ? void 0 : t.protocolsUsed.map((M, Y, K) => Y == K.length - 1 ? M : `${M + " >> "}`),
1831
- " "
1832
- ] }),
1833
- /* @__PURE__ */ l("div", { className: "bw-flex bw-items-center bw-gap-x-1", children: [
1834
- /* @__PURE__ */ l("div", { className: "bw-flex bw-items-center bw-gap-x-1", children: [
1835
- /* @__PURE__ */ e(We, { fill: "var(--tw-text-secondary)" }),
1836
- /* @__PURE__ */ l("p", { className: "bw-text-xs bw-font-normal bw-text-text-secondary", children: [
1837
- t.steps.length,
1838
- " Step"
1839
- ] })
1840
- ] }),
1841
- /* @__PURE__ */ l("div", { className: "bw-text-xs bw-font-normal bw-text-text-secondary", children: [
1842
- " Slippage ",
1843
- t.slippage / 100,
1844
- "%"
1845
- ] })
1846
- ] })
1847
- ] }) }),
1848
- /* @__PURE__ */ l("div", { className: "bw-flex bw-flex-col bw-justify-between bw-w-full bw-items-end", children: [
1849
- /* @__PURE__ */ l("div", { className: "bw-flex bw-items-center bw-gap-x-2", children: [
1850
- /* @__PURE__ */ l("div", { className: ` bw-relative bw-rounded-[50%] bw-w-[21px] bw-h-[21px] bw-border bw-border-border-primary ${(H = t == null ? void 0 : t.to) != null && H.image ? "bw-bg-background-secondary" : ""}`, children: [
1851
- (j = t.to) != null && j.image ? /* @__PURE__ */ e("img", { src: t.to.image, width: 20, height: 20, alt: "img", className: "bw-rounded-[50%] bw-max-w-[20px] bw-max-h-[20px] bw-object-contain" }) : /* @__PURE__ */ e("img", { src: h, width: 20, height: 20, alt: "img", className: "bw-rounded-[50%]" }),
1852
- /* @__PURE__ */ l("div", { className: ` bw-absolute bw-bottom-[-30%] bw-right-[-15%] bw-rounded-[50%] bw-w-[12px] bw-h-[12px] bw-border bw-border-border-primary ${c != null && c.image ? "bw-bg-background-secondary" : ""}`, children: [
1853
- " ",
1854
- c != null && c.image ? /* @__PURE__ */ e("img", { src: c.image, width: 11, height: 11, className: "bw-rounded-[50%]", alt: "img" }) : /* @__PURE__ */ e("img", { src: h, width: 11, height: 11, className: "bw-rounded-[50%]", alt: "img" })
1855
- ] })
1856
- ] }),
1857
- /* @__PURE__ */ e("p", { className: "bw-text-lg bw-break-words bw-font-medium bw-text-text-primary", children: /* @__PURE__ */ e(we, { value: S, decimal: 12 }) })
1858
- ] }),
1859
- /* @__PURE__ */ e("div", { className: "bw-flex bw-text-xs bw-font-normal bw-mb-2 bw-items-center bw-gap-x-1", children: /* @__PURE__ */ l("p", { className: "bw-text-text-secondary", children: [
1860
- "$",
1861
- /* @__PURE__ */ e(we, { value: ((t.outputAmountDisplay || "") * i).toString() || "", decimal: 10 })
1862
- ] }) }),
1863
- /* @__PURE__ */ l("div", { className: "bw-text-sm bw-flex bw-items-center bw-gap-x-2 bw-font-medium bw-text-text-secondary", children: [
1864
- /* @__PURE__ */ l("div", { className: "bw-flex bw-text-sm bw-items-center bw-gap-x-1", children: [
1865
- /* @__PURE__ */ e(je, { fill: "var(--tw-text-secondary)" }),
1866
- /* @__PURE__ */ e("p", { children: t.estimatedTimeInSeconds >= 90 ? `${Math.round(B((t.estimatedTimeInSeconds || 60) / 60, 2)) || 0}min` : `${(t == null ? void 0 : t.estimatedTimeInSeconds) || 60} secs` })
1867
- ] }),
1868
- /* @__PURE__ */ e(No, { item: t, gasImg: w, fromChain: b })
1869
- ] })
1870
- ] })
1871
- ]
1872
- }
1873
- )
1874
- },
1875
- x
1876
- );
1877
- }) }) });
1878
- }
1879
- const To = De.memo(function({ maxOpSort: o, value: n }) {
1880
- var i, b;
1881
- const s = se((a) => a.configuration);
1882
- return /* @__PURE__ */ l("div", { className: "bw-flex bw-items-center bw-gap-x-2", children: [
1883
- /* @__PURE__ */ e("div", { className: "bw-w-[16px] bw-h-[16px]", children: /* @__PURE__ */ e(
1884
- Oe,
1885
- {
1886
- fill: "var(--tw-background-container)",
1887
- spinnerColor: (i = s == null ? void 0 : s.gradientStyle) == null ? void 0 : i.spinnerColor,
1888
- stopColor: (b = s == null ? void 0 : s.gradientStyle) == null ? void 0 : b.stopColor
1889
- }
1890
- ) }),
1891
- /* @__PURE__ */ e(
1892
- "span",
1893
- {
1894
- className: `bw-text-xs ${n == 1 ? "bw-text-text-primary bw-font-medium" : "bw-text-text-secondary bw-font-medium"}`,
1895
- children: "Max Output"
1896
- }
1897
- ),
1898
- /* @__PURE__ */ l("div", { className: "bw-flex bw-gap-y-[2px] bw-items-center bw-flex-col bw-justify-center", children: [
1899
- /* @__PURE__ */ e(
1900
- Pe,
1901
- {
1902
- isSelected: o == "asc",
1903
- fill: "var(--tw-text-primary)"
1904
- }
1905
- ),
1906
- /* @__PURE__ */ e(
1907
- _e,
1908
- {
1909
- fill: "var(--tw-text-primary)",
1910
- isSelected: o == "desc"
1911
- }
1912
- )
1913
- ] })
1914
- ] });
1915
- }), Io = De.memo(function({ lowestGasSort: o, value: n }) {
1916
- return /* @__PURE__ */ l("div", { className: "bw-flex bw-items-center bw-gap-x-2", children: [
1917
- /* @__PURE__ */ e("div", { className: "bw-w-[16px] bw-h-[16px]", children: /* @__PURE__ */ e(Be, { fill: "var(--tw-background-container)" }) }),
1918
- /* @__PURE__ */ e(
1919
- "span",
1920
- {
1921
- className: `bw-text-xs ${n == 2 ? "bw-text-text-primary bw-font-medium" : "bw-text-text-secondary bw-font-medium"}`,
1922
- children: "Lowest Gas"
1923
- }
1924
- ),
1925
- /* @__PURE__ */ l("div", { className: "bw-flex bw-gap-y-[2px] bw-items-center bw-flex-col bw-justify-center", children: [
1926
- /* @__PURE__ */ e(
1927
- Pe,
1928
- {
1929
- fill: "var(--tw-text-primary)",
1930
- isSelected: o === "asc"
1931
- }
1932
- ),
1933
- /* @__PURE__ */ e(
1934
- _e,
1935
- {
1936
- fill: "var(--tw-text-primary)",
1937
- isSelected: o === "desc"
1938
- }
1939
- )
1940
- ] })
1941
- ] });
1942
- }), Eo = De.memo(function({ fastestSort: o, value: n }) {
1943
- return /* @__PURE__ */ l("div", { className: "bw-flex bw-items-center bw-gap-x-2", children: [
1944
- /* @__PURE__ */ e("div", { className: "bw-w-[16px] bw-h-[16px]", children: /* @__PURE__ */ e(Le, { fill: "var(--tw-background-container)" }) }),
1945
- /* @__PURE__ */ e(
1946
- "span",
1947
- {
1948
- className: `bw-text-xs ${n == 3 ? "bw-text-text-primary bw-font-medium" : "bw-text-text-secondary bw-font-medium"}`,
1949
- children: "Fastest"
1950
- }
1951
- ),
1952
- /* @__PURE__ */ l("div", { className: "bw-flex bw-gap-y-[2px] bw-items-center bw-flex-col bw-justify-center", children: [
1953
- /* @__PURE__ */ e(
1954
- Pe,
1955
- {
1956
- fill: "var(--tw-text-primary)",
1957
- isSelected: o === "asc"
1958
- }
1959
- ),
1960
- /* @__PURE__ */ e(
1961
- _e,
1962
- {
1963
- fill: "var(--tw-text-primary)",
1964
- isSelected: o === "desc"
1965
- }
1966
- )
1967
- ] })
1968
- ] });
1969
- });
1970
- function Oo({
1971
- routes: o,
1972
- handleShowAllRoutes: n,
1973
- handleRoutesData: s,
1974
- convertVal: i,
1975
- fromChain: b,
1976
- toChain: a
1977
- }) {
1978
- const [c, w] = J("1"), [h, O] = J("none"), [$, F] = J("none"), [I, P] = J("none"), U = se((p) => p.configuration);
1979
- function _(p, L) {
1980
- w(L);
1981
- }
1982
- return /* @__PURE__ */ l(ht, { value: c, children: [
1983
- /* @__PURE__ */ e(
1984
- _t,
1985
- {
1986
- sx: (p) => ({
1987
- borderBottom: 1,
1988
- borderColor: "var(--tw-border-primary)",
1989
- width: "max-content",
1990
- [p.breakpoints.down("sm")]: { width: "100%", overflowX: "auto" },
1991
- marginX: "auto"
1992
- }),
1993
- children: /* @__PURE__ */ l(
1994
- yt,
1995
- {
1996
- TabIndicatorProps: {
1997
- style: { background: "var(--tw-text-secondary)" }
1998
- },
1999
- sx: (p) => ({
2000
- width: "max-content",
2001
- [p.breakpoints.down("sm")]: {
2002
- width: "100%",
2003
- overflowX: "auto"
2004
- }
2005
- }),
2006
- onChange: _,
2007
- "aria-label": "lab API tabs example",
2008
- children: [
2009
- /* @__PURE__ */ e(
2010
- ye,
2011
- {
2012
- onClick: () => {
2013
- if (c == "1")
2014
- O((p) => p == "none" ? "asc" : p === "asc" ? "desc" : "none");
2015
- else return !0;
2016
- },
2017
- disableRipple: !0,
2018
- sx: (p) => {
2019
- var L;
2020
- return {
2021
- textTransform: "none",
2022
- paddingBottom: "0px",
2023
- fontFamily: ((L = U == null ? void 0 : U.customTheme) == null ? void 0 : L.fontFamily) || "lato",
2024
- width: "120px",
2025
- paddingX: "5px",
2026
- [p.breakpoints.down("sm")]: {
2027
- minWidth: "33%",
2028
- paddingX: "auto"
2029
- }
2030
- };
2031
- },
2032
- label: /* @__PURE__ */ e(To, { maxOpSort: h, value: c }),
2033
- value: "1"
2034
- }
2035
- ),
2036
- /* @__PURE__ */ e(
2037
- ye,
2038
- {
2039
- onClick: () => {
2040
- if (c == "2")
2041
- F((p) => p == "none" ? "asc" : p === "asc" ? "desc" : "none");
2042
- else return !0;
2043
- },
2044
- disableRipple: !0,
2045
- sx: (p) => {
2046
- var L;
2047
- return {
2048
- textTransform: "none",
2049
- paddingBottom: "0px",
2050
- fontFamily: ((L = U == null ? void 0 : U.customTheme) == null ? void 0 : L.fontFamily) || "lato",
2051
- width: "120px",
2052
- paddingX: "5px",
2053
- paddingLeft: "10px",
2054
- [p.breakpoints.down("sm")]: {
2055
- minWidth: "33%",
2056
- paddingX: "auto",
2057
- paddingLeft: "auto"
2058
- }
2059
- };
2060
- },
2061
- label: /* @__PURE__ */ e(Io, { lowestGasSort: $, value: c }),
2062
- value: "2"
2063
- }
2064
- ),
2065
- /* @__PURE__ */ e(
2066
- ye,
2067
- {
2068
- onClick: () => {
2069
- if (c == "3")
2070
- P((p) => p == "none" ? "asc" : p === "asc" ? "desc" : "none");
2071
- else return !0;
2072
- },
2073
- disableRipple: !0,
2074
- sx: (p) => {
2075
- var L;
2076
- return {
2077
- textTransform: "none",
2078
- paddingBottom: "0px",
2079
- fontFamily: ((L = U == null ? void 0 : U.customTheme) == null ? void 0 : L.fontFamily) || "lato",
2080
- width: "110px",
2081
- paddingX: "5px",
2082
- [p.breakpoints.down("sm")]: {
2083
- minWidth: "33%",
2084
- paddingX: "auto"
2085
- }
2086
- };
2087
- },
2088
- label: /* @__PURE__ */ e(Eo, { fastestSort: I, value: c }),
2089
- value: "3"
2090
- }
2091
- )
2092
- ]
2093
- }
2094
- )
2095
- }
2096
- ),
2097
- /* @__PURE__ */ e(
2098
- Se,
2099
- {
2100
- sx: { paddingLeft: "0px", paddingRight: "0px", paddingTop: "10px" },
2101
- value: "1",
2102
- children: /* @__PURE__ */ e(
2103
- vo,
2104
- {
2105
- routes: o,
2106
- handleRoutesData: s,
2107
- handleShowAllRoutes: n,
2108
- convertVal: i,
2109
- fromChain: b,
2110
- sort: h,
2111
- toChain: a
2112
- }
2113
- )
2114
- }
2115
- ),
2116
- /* @__PURE__ */ e(
2117
- Se,
2118
- {
2119
- sx: { paddingLeft: "0px", paddingRight: "0px", paddingTop: "10px" },
2120
- value: "2",
2121
- children: /* @__PURE__ */ e(
2122
- So,
2123
- {
2124
- routes: o,
2125
- handleRoutesData: s,
2126
- handleShowAllRoutes: n,
2127
- convertVal: i,
2128
- fromChain: b,
2129
- sort: $,
2130
- toChain: a
2131
- }
2132
- )
2133
- }
2134
- ),
2135
- /* @__PURE__ */ e(
2136
- Se,
2137
- {
2138
- sx: { paddingLeft: "0px", paddingRight: "0px", paddingTop: "10px" },
2139
- value: "3",
2140
- children: /* @__PURE__ */ e(
2141
- Co,
2142
- {
2143
- routes: o,
2144
- handleRoutesData: s,
2145
- handleShowAllRoutes: n,
2146
- convertVal: i,
2147
- fromChain: b,
2148
- sort: I,
2149
- toChain: a
2150
- }
2151
- )
2152
- }
2153
- )
2154
- ] });
2155
- }
2156
- function Bo({ fill1: o, fill2: n }) {
2157
- return /* @__PURE__ */ l("svg", { width: "25", height: "25", viewBox: "0 0 25 25", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
2158
- /* @__PURE__ */ e("circle", { cx: "12.4758", cy: "12.4774", r: "11.9774", transform: "rotate(90 12.4758 12.4774)", stroke: o }),
2159
- /* @__PURE__ */ e("path", { d: "M14.4375 6.27832L8.45786 12.258L14.4122 18.2121", stroke: n, "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })
2160
- ] });
2161
- }
2162
- function zo({ routes: o, handleShowAllRoutes: n, handleRoutesData: s, convertVal: i, amount: b }) {
2163
- var O, $, F;
2164
- const a = se((I) => I.fromChain), c = se((I) => I.fromCoin), w = se((I) => I.toChain), { defaultCoin: h } = Ce;
2165
- return /* @__PURE__ */ l("div", { children: [
2166
- /* @__PURE__ */ l("div", { className: "bw-flex bw-w-full bw-relative bw-justify-between bw-mb-2", children: [
2167
- /* @__PURE__ */ l("div", { className: "bw-flex bw-items-start bw-gap-x-3", children: [
2168
- /* @__PURE__ */ e(
2169
- "button",
2170
- {
2171
- onClick: () => {
2172
- n();
2173
- },
2174
- className: "bw-mt-1",
2175
- children: /* @__PURE__ */ e(Bo, { fill1: "var(--tw-background-secondary)", fill2: "var(--tw-text-secondary)" })
2176
- }
2177
- ),
2178
- /* @__PURE__ */ l("div", { className: "bw-text-lg bw-font-normal bw-text-text-secondary", children: [
2179
- /* @__PURE__ */ l("div", { className: "", children: [
2180
- /* @__PURE__ */ e("span", { className: "", children: ((F = ($ = (O = o.data) == null ? void 0 : O.data) == null ? void 0 : $.quotes) == null ? void 0 : F.length) || 0 }),
2181
- " Routes For"
2182
- ] }),
2183
- " ",
2184
- /* @__PURE__ */ e("p", { className: "bw-text-xs bw-font-bold bw-mt-2", children: `${c == null ? void 0 : c.coin} on ${a == null ? void 0 : a.chain}` })
2185
- ] })
2186
- ] }),
2187
- /* @__PURE__ */ l("div", { className: " bw-flex bw-items-center bw-gap-x-2", children: [
2188
- /* @__PURE__ */ l("div", { children: [
2189
- /* @__PURE__ */ e("p", { className: "bw-text-2xl bw-font-bold bw-mb-2 bw-leading-none bw-text-right bw-text-text-primary", children: b }),
2190
- /* @__PURE__ */ l("p", { className: "bw-text-sm bw-font-bold bw-text-right bw-text-text-secondary", children: [
2191
- "$",
2192
- ve(b * (c == null ? void 0 : c.lastPrice) || 0, 10)
2193
- ] })
2194
- ] }),
2195
- /* @__PURE__ */ l("div", { className: " bw-bg-background-secondary bw-flex bw-justify-center bw-items-center bw-mb-2 bw-relative bw-rounded-[50%] bw-w-[35px] bw-h-[35px] bw-border bw-border-border-primary", children: [
2196
- c != null && c.image ? /* @__PURE__ */ e("img", { src: c.image, width: 34, height: 34, alt: "img", className: "bw-rounded-[50%] bw-max-w-[34px] bw-max-h-[34px] bw-object-contain bw-min-w-[34px] bw-h-[34px]" }) : /* @__PURE__ */ e("img", { src: h, width: 34, height: 34, alt: "img", className: "bw-rounded-[50%] bw-min-w-[34px] bw-h-[34px]" }),
2197
- /* @__PURE__ */ l("div", { className: "bw-bg-background-secondary bw-absolute bw-bottom-[-30%] bw-right-4 bw-rounded-[50%] bw-w-[19px] bw-h-[19px] bw-border bw-border-border-primary", children: [
2198
- " ",
2199
- c != null && c.image ? /* @__PURE__ */ e("img", { src: a.image, width: 18, height: 18, className: "bw-rounded-[50%]", alt: "img" }) : /* @__PURE__ */ e("img", { src: h, width: 18, height: 18, className: "bw-rounded-[50%]", alt: "img" })
2200
- ] })
2201
- ] })
2202
- ] })
2203
- ] }),
2204
- /* @__PURE__ */ e(Oo, { routes: o, handleShowAllRoutes: n, handleRoutesData: s, convertVal: i, fromChain: a, toChain: w })
2205
- ] });
2206
- }
2207
- export {
2208
- zo as default
2209
- };