0xtrails 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (359) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +42 -0
  3. package/dist/abi.d.ts +37 -0
  4. package/dist/abi.d.ts.map +1 -0
  5. package/dist/abi.js +36 -0
  6. package/dist/apiClient.d.ts +9 -0
  7. package/dist/apiClient.d.ts.map +1 -0
  8. package/dist/apiClient.js +18 -0
  9. package/dist/buffer.d.ts +3 -0
  10. package/dist/buffer.d.ts.map +1 -0
  11. package/dist/buffer.js +8 -0
  12. package/dist/cctp.d.ts +84 -0
  13. package/dist/cctp.d.ts.map +1 -0
  14. package/dist/cctp.js +401 -0
  15. package/dist/chainSwitch.d.ts +7 -0
  16. package/dist/chainSwitch.d.ts.map +1 -0
  17. package/dist/chainSwitch.js +33 -0
  18. package/dist/chains.d.ts +13 -0
  19. package/dist/chains.d.ts.map +1 -0
  20. package/dist/chains.js +95 -0
  21. package/dist/constants.d.ts +11 -0
  22. package/dist/constants.d.ts.map +1 -0
  23. package/dist/constants.js +16 -0
  24. package/dist/encoders.d.ts +7 -0
  25. package/dist/encoders.d.ts.map +1 -0
  26. package/dist/encoders.js +8 -0
  27. package/dist/error.d.ts +2 -0
  28. package/dist/error.d.ts.map +1 -0
  29. package/dist/error.js +12 -0
  30. package/dist/explorer.d.ts +12 -0
  31. package/dist/explorer.d.ts.map +1 -0
  32. package/dist/explorer.js +18 -0
  33. package/dist/gasless.d.ts +116 -0
  34. package/dist/gasless.d.ts.map +1 -0
  35. package/dist/gasless.js +297 -0
  36. package/dist/index.d.ts +13 -0
  37. package/dist/index.d.ts.map +1 -0
  38. package/dist/index.js +9 -0
  39. package/dist/indexerClient.d.ts +9 -0
  40. package/dist/indexerClient.d.ts.map +1 -0
  41. package/dist/indexerClient.js +18 -0
  42. package/dist/intents.d.ts +83 -0
  43. package/dist/intents.d.ts.map +1 -0
  44. package/dist/intents.js +288 -0
  45. package/dist/metaTxnMonitor.d.ts +14 -0
  46. package/dist/metaTxnMonitor.d.ts.map +1 -0
  47. package/dist/metaTxnMonitor.js +121 -0
  48. package/dist/metaTxns.d.ts +6 -0
  49. package/dist/metaTxns.d.ts.map +1 -0
  50. package/dist/metaTxns.js +4 -0
  51. package/dist/paymasterSend.d.ts +90 -0
  52. package/dist/paymasterSend.d.ts.map +1 -0
  53. package/dist/paymasterSend.js +329 -0
  54. package/dist/preconditions.d.ts +11 -0
  55. package/dist/preconditions.d.ts.map +1 -0
  56. package/dist/preconditions.js +29 -0
  57. package/dist/prepareSend.d.ts +102 -0
  58. package/dist/prepareSend.d.ts.map +1 -0
  59. package/dist/prepareSend.js +1080 -0
  60. package/dist/prices.d.ts +18 -0
  61. package/dist/prices.d.ts.map +1 -0
  62. package/dist/prices.js +142 -0
  63. package/dist/queryParams.d.ts +9 -0
  64. package/dist/queryParams.d.ts.map +1 -0
  65. package/dist/queryParams.js +66 -0
  66. package/dist/relaySdk.d.ts +65 -0
  67. package/dist/relaySdk.d.ts.map +1 -0
  68. package/dist/relaySdk.js +314 -0
  69. package/dist/relayer.d.ts +23 -0
  70. package/dist/relayer.d.ts.map +1 -0
  71. package/dist/relayer.js +230 -0
  72. package/dist/sendUserOp.d.ts +140 -0
  73. package/dist/sendUserOp.d.ts.map +1 -0
  74. package/dist/sendUserOp.js +388 -0
  75. package/dist/sequenceWallet.d.ts +79 -0
  76. package/dist/sequenceWallet.d.ts.map +1 -0
  77. package/dist/sequenceWallet.js +374 -0
  78. package/dist/theme.d.ts +3 -0
  79. package/dist/theme.d.ts.map +1 -0
  80. package/dist/theme.js +1 -0
  81. package/dist/toSimpleSmartAccount.d.ts +95 -0
  82. package/dist/toSimpleSmartAccount.d.ts.map +1 -0
  83. package/dist/toSimpleSmartAccount.js +373 -0
  84. package/dist/tokenBalances.d.ts +118 -0
  85. package/dist/tokenBalances.d.ts.map +1 -0
  86. package/dist/tokenBalances.js +492 -0
  87. package/dist/tokens.d.ts +50 -0
  88. package/dist/tokens.d.ts.map +1 -0
  89. package/dist/tokens.js +356 -0
  90. package/dist/trails.d.ts +128 -0
  91. package/dist/trails.d.ts.map +1 -0
  92. package/dist/trails.js +1031 -0
  93. package/dist/umd/trails.min.js +12610 -0
  94. package/dist/umd/trails.min.js.map +1 -0
  95. package/dist/umd.d.ts +24 -0
  96. package/dist/umd.d.ts.map +1 -0
  97. package/dist/utils.d.ts +5 -0
  98. package/dist/utils.d.ts.map +1 -0
  99. package/dist/utils.js +9 -0
  100. package/dist/widget/ConstantsUtil-B-_-u8aQ.js +6 -0
  101. package/dist/widget/add-hVLs3ldJ.js +20 -0
  102. package/dist/widget/all-wallets-Cwxnx4BT.js +11 -0
  103. package/dist/widget/app-store-CAAVQjW0.js +22 -0
  104. package/dist/widget/apple-C3BSbglw.js +23 -0
  105. package/dist/widget/arrow-bottom-circle-BGU9MmsZ.js +16 -0
  106. package/dist/widget/arrow-bottom-hS_SA8Gp.js +13 -0
  107. package/dist/widget/arrow-left-CJZanWz7.js +13 -0
  108. package/dist/widget/arrow-right-C1qL8EMd.js +13 -0
  109. package/dist/widget/arrow-top-CbuCmbQs.js +13 -0
  110. package/dist/widget/bank-CXBEEGbb.js +19 -0
  111. package/dist/widget/bin-Dqzv3zCZ.js +9 -0
  112. package/dist/widget/bitcoin-4y3sovZp.js +18 -0
  113. package/dist/widget/browser-DyOl4_8m.js +1413 -0
  114. package/dist/widget/browser-t7Fh0sEU.js +19 -0
  115. package/dist/widget/card-Bo4CZkTs.js +19 -0
  116. package/dist/widget/ccip-BynehMIN.js +232 -0
  117. package/dist/widget/checkmark-DV6OKvnY.js +16 -0
  118. package/dist/widget/checkmark-bold-CAp1-IQ2.js +13 -0
  119. package/dist/widget/chevron-bottom-BjzsVzk9.js +13 -0
  120. package/dist/widget/chevron-left-CQZBDCiR.js +13 -0
  121. package/dist/widget/chevron-right-Dhg4zeZM.js +13 -0
  122. package/dist/widget/chevron-top-CDQmfJef.js +13 -0
  123. package/dist/widget/chrome-store-BNaC_b6w.js +66 -0
  124. package/dist/widget/circle-BC_GBj91.js +9 -0
  125. package/dist/widget/clock-BmF8-4a0.js +13 -0
  126. package/dist/widget/close-Bf61nZ8o.js +13 -0
  127. package/dist/widget/coinPlaceholder-7cZW2058.js +13 -0
  128. package/dist/widget/compass-CFC3yhnW.js +13 -0
  129. package/dist/widget/components/ChainImage.d.ts +8 -0
  130. package/dist/widget/components/ChainImage.d.ts.map +1 -0
  131. package/dist/widget/components/ChainImage.js +6 -0
  132. package/dist/widget/components/ConnectWallet.d.ts +18 -0
  133. package/dist/widget/components/ConnectWallet.d.ts.map +1 -0
  134. package/dist/widget/components/ConnectWallet.js +66 -0
  135. package/dist/widget/components/DebugScreensDropdown.d.ts +9 -0
  136. package/dist/widget/components/DebugScreensDropdown.d.ts.map +1 -0
  137. package/dist/widget/components/DebugScreensDropdown.js +40 -0
  138. package/dist/widget/components/FeeOptions.d.ts +17 -0
  139. package/dist/widget/components/FeeOptions.d.ts.map +1 -0
  140. package/dist/widget/components/FeeOptions.js +65 -0
  141. package/dist/widget/components/Footer.d.ts +9 -0
  142. package/dist/widget/components/Footer.d.ts.map +1 -0
  143. package/dist/widget/components/Footer.js +13 -0
  144. package/dist/widget/components/GreenCheckAnimation.d.ts +2 -0
  145. package/dist/widget/components/GreenCheckAnimation.d.ts.map +1 -0
  146. package/dist/widget/components/GreenCheckAnimation.js +74 -0
  147. package/dist/widget/components/Modal.d.ts +11 -0
  148. package/dist/widget/components/Modal.d.ts.map +1 -0
  149. package/dist/widget/components/Modal.js +36 -0
  150. package/dist/widget/components/Receipt.d.ts +13 -0
  151. package/dist/widget/components/Receipt.d.ts.map +1 -0
  152. package/dist/widget/components/Receipt.js +36 -0
  153. package/dist/widget/components/SendForm.d.ts +44 -0
  154. package/dist/widget/components/SendForm.d.ts.map +1 -0
  155. package/dist/widget/components/SendForm.js +177 -0
  156. package/dist/widget/components/TokenImage.d.ts +10 -0
  157. package/dist/widget/components/TokenImage.d.ts.map +1 -0
  158. package/dist/widget/components/TokenImage.js +8 -0
  159. package/dist/widget/components/TokenList.d.ts +16 -0
  160. package/dist/widget/components/TokenList.d.ts.map +1 -0
  161. package/dist/widget/components/TokenList.js +39 -0
  162. package/dist/widget/components/TransferPending.d.ts +11 -0
  163. package/dist/widget/components/TransferPending.d.ts.map +1 -0
  164. package/dist/widget/components/TransferPending.js +77 -0
  165. package/dist/widget/components/TransferPendingVertical.d.ts +18 -0
  166. package/dist/widget/components/TransferPendingVertical.d.ts.map +1 -0
  167. package/dist/widget/components/TransferPendingVertical.js +183 -0
  168. package/dist/widget/components/WalletConfirmation.d.ts +18 -0
  169. package/dist/widget/components/WalletConfirmation.d.ts.map +1 -0
  170. package/dist/widget/components/WalletConfirmation.js +22 -0
  171. package/dist/widget/config.d.ts +4 -0
  172. package/dist/widget/config.d.ts.map +1 -0
  173. package/dist/widget/config.js +3 -0
  174. package/dist/widget/copy-e0xXvKN0.js +20 -0
  175. package/dist/widget/cursor-CqM3v0xJ.js +8 -0
  176. package/dist/widget/cursor-transparent-CUQpdsCG.js +17 -0
  177. package/dist/widget/desktop-DUDGIRpM.js +14 -0
  178. package/dist/widget/disconnect-DUFST9QQ.js +13 -0
  179. package/dist/widget/discord-C1cj365Z.js +22 -0
  180. package/dist/widget/email-BHhmb_lX.js +703 -0
  181. package/dist/widget/embedded-wallet-CuuC4eah.js +467 -0
  182. package/dist/widget/ethereum-CfmBVfeB.js +15 -0
  183. package/dist/widget/etherscan-BSiynDhW.js +11 -0
  184. package/dist/widget/exclamation-triangle-DEiFNpHw.js +9 -0
  185. package/dist/widget/extension-mRmfCDxo.js +13 -0
  186. package/dist/widget/external-link-B4xMIVnW.js +13 -0
  187. package/dist/widget/facebook-CBAZStBR.js +31 -0
  188. package/dist/widget/farcaster-LHDEDf5S.js +17 -0
  189. package/dist/widget/filters-CBijuvFv.js +13 -0
  190. package/dist/widget/github-C3ILD420.js +23 -0
  191. package/dist/widget/google-CSj73POX.js +23 -0
  192. package/dist/widget/help-circle-2hdG5IdB.js +17 -0
  193. package/dist/widget/hooks/useAmountUsd.d.ts +13 -0
  194. package/dist/widget/hooks/useAmountUsd.d.ts.map +1 -0
  195. package/dist/widget/hooks/useAmountUsd.js +35 -0
  196. package/dist/widget/hooks/useSendForm.d.ts +125 -0
  197. package/dist/widget/hooks/useSendForm.d.ts.map +1 -0
  198. package/dist/widget/hooks/useSendForm.js +450 -0
  199. package/dist/widget/hooks/useTokenList.d.ts +52 -0
  200. package/dist/widget/hooks/useTokenList.d.ts.map +1 -0
  201. package/dist/widget/hooks/useTokenList.js +252 -0
  202. package/dist/widget/id-ByYSrwsd.js +17 -0
  203. package/dist/widget/if-defined-DRXJEhv7.js +752 -0
  204. package/dist/widget/image-C90L4Rf6.js +9 -0
  205. package/dist/widget/index-B3SlQ9v3.js +46 -0
  206. package/dist/widget/index-B8LPuLXQ.js +78 -0
  207. package/dist/widget/index-BDbworWA.js +171 -0
  208. package/dist/widget/index-BTlDgFSK.js +98 -0
  209. package/dist/widget/index-BUCcjXbd.js +306 -0
  210. package/dist/widget/index-BZ34edi2.js +1055 -0
  211. package/dist/widget/index-BiCU29wK.js +147 -0
  212. package/dist/widget/index-BlmqIKsY.js +266 -0
  213. package/dist/widget/index-BlviH5nG.js +55 -0
  214. package/dist/widget/index-Bwd5X3fS.js +8306 -0
  215. package/dist/widget/index-C5gmknHK.js +78 -0
  216. package/dist/widget/index-CD6dBcRj.js +76 -0
  217. package/dist/widget/index-CDlhy529.js +63 -0
  218. package/dist/widget/index-CHXa5ke-.js +59 -0
  219. package/dist/widget/index-CK94R-H7.js +22498 -0
  220. package/dist/widget/index-CQzo3m3x.js +182 -0
  221. package/dist/widget/index-CRT8cAwG.js +325 -0
  222. package/dist/widget/index-CY7Lt2Yu.js +310 -0
  223. package/dist/widget/index-CiKfAu1E.js +79 -0
  224. package/dist/widget/index-CkCu6rMi.js +258 -0
  225. package/dist/widget/index-CngLTu_R.js +517 -0
  226. package/dist/widget/index-CsMV8-em.js +2577 -0
  227. package/dist/widget/index-Cu2Wva8v.js +200 -0
  228. package/dist/widget/index-DKBxLTEF.js +240 -0
  229. package/dist/widget/index-DQEVT3dx.js +511 -0
  230. package/dist/widget/index-DU2HcCis.js +200 -0
  231. package/dist/widget/index-DutZGWNW.js +321 -0
  232. package/dist/widget/index-O0glArmc.js +182 -0
  233. package/dist/widget/index-O8FmRjKe.js +63719 -0
  234. package/dist/widget/index-RtKXrB6I.js +576 -0
  235. package/dist/widget/index-TIYtS0gE.js +88 -0
  236. package/dist/widget/index-dQNJvWHs.js +66 -0
  237. package/dist/widget/index-wmEwdsq7.js +909 -0
  238. package/dist/widget/index.d.ts +3 -0
  239. package/dist/widget/index.d.ts.map +1 -0
  240. package/dist/widget/index.js +2 -0
  241. package/dist/widget/info-DMPChDjV.js +8 -0
  242. package/dist/widget/info-circle-DAvS_7nY.js +17 -0
  243. package/dist/widget/lightbulb-DnZ9mNEs.js +8 -0
  244. package/dist/widget/lit-html-BRjl1r6K.js +243 -0
  245. package/dist/widget/mail-DpaVSOP8.js +13 -0
  246. package/dist/widget/mobile-CRvdyu7I.js +14 -0
  247. package/dist/widget/more-C5VqW9PR.js +16 -0
  248. package/dist/widget/network-placeholder-CZ0vApma.js +19 -0
  249. package/dist/widget/nftPlaceholder-7jjIK2bT.js +13 -0
  250. package/dist/widget/off-4mHjJLLX.js +9 -0
  251. package/dist/widget/onramp-Bc0ozVsw.js +929 -0
  252. package/dist/widget/play-store-Uocul8nC.js +37 -0
  253. package/dist/widget/plus-DrYF7siO.js +18 -0
  254. package/dist/widget/prepareSend-BQJmzM5B.js +54987 -0
  255. package/dist/widget/qr-code-DcnGMUB3.js +11 -0
  256. package/dist/widget/receive-fvIVd7R_.js +184 -0
  257. package/dist/widget/recycle-horizontal-DrDwXC4D.js +14 -0
  258. package/dist/widget/ref-CXNmEjML.js +41 -0
  259. package/dist/widget/refresh-OK9lIPLS.js +13 -0
  260. package/dist/widget/reown-logo-C-Qn7mS3.js +17 -0
  261. package/dist/widget/search-DZqv1oKg.js +13 -0
  262. package/dist/widget/send-CJlmI-xe.js +1039 -0
  263. package/dist/widget/send-otoEC8uU.js +20 -0
  264. package/dist/widget/socials-BJciurWF.js +599 -0
  265. package/dist/widget/solana-Bv5Hs_0T.js +18 -0
  266. package/dist/widget/swapHorizontal-BzOPGV37.js +13 -0
  267. package/dist/widget/swapHorizontalBold-axyHnSmj.js +13 -0
  268. package/dist/widget/swapHorizontalMedium-C6YOPfPz.js +21 -0
  269. package/dist/widget/swapHorizontalRoundedBold-yVcLbWNT.js +13 -0
  270. package/dist/widget/swapVertical-BDjxt9pE.js +13 -0
  271. package/dist/widget/swaps-DEWNj4kd.js +1637 -0
  272. package/dist/widget/telegram-BQJD7dlP.js +21 -0
  273. package/dist/widget/three-dots-DW9jmSMG.js +10 -0
  274. package/dist/widget/transactions-uCseGQQt.js +38 -0
  275. package/dist/widget/twitch-XugxDfOE.js +23 -0
  276. package/dist/widget/twitterIcon-DQVObQUL.js +11 -0
  277. package/dist/widget/types.d.ts +51 -0
  278. package/dist/widget/types.d.ts.map +1 -0
  279. package/dist/widget/types.js +1 -0
  280. package/dist/widget/verify-DpMYHxLf.js +13 -0
  281. package/dist/widget/verify-filled-KpEL6ZJ_.js +13 -0
  282. package/dist/widget/w3m-modal-C8e-6Kba.js +1047 -0
  283. package/dist/widget/wallet-D8ssEB0o.js +13 -0
  284. package/dist/widget/wallet-placeholder-HtAy21Wc.js +19 -0
  285. package/dist/widget/walletconnect-Bp_4XfrY.js +37 -0
  286. package/dist/widget/warning-circle-FgYS7P7n.js +17 -0
  287. package/dist/widget/widget/index.js +7 -0
  288. package/dist/widget/widget.d.ts +47 -0
  289. package/dist/widget/widget.d.ts.map +1 -0
  290. package/dist/widget/widget.js +932 -0
  291. package/dist/widget/x-DlZBoP9k.js +17 -0
  292. package/dist/widget/x-mark-Ba9pt-_h.js +8 -0
  293. package/package.json +102 -8
  294. package/src/abi.ts +38 -0
  295. package/src/apiClient.ts +32 -0
  296. package/src/buffer.ts +10 -0
  297. package/src/cctp.ts +579 -0
  298. package/src/chainSwitch.ts +55 -0
  299. package/src/chains.ts +124 -0
  300. package/src/constants.ts +26 -0
  301. package/src/encoders.ts +20 -0
  302. package/src/error.ts +15 -0
  303. package/src/explorer.ts +37 -0
  304. package/src/gasless.ts +545 -0
  305. package/src/index.ts +48 -0
  306. package/src/indexerClient.ts +36 -0
  307. package/src/intents.ts +537 -0
  308. package/src/metaTxnMonitor.ts +163 -0
  309. package/src/metaTxns.ts +21 -0
  310. package/src/paymasterSend.ts +503 -0
  311. package/src/preconditions.ts +52 -0
  312. package/src/prepareSend.ts +1849 -0
  313. package/src/prices.ts +186 -0
  314. package/src/queryParams.ts +80 -0
  315. package/src/relaySdk.ts +481 -0
  316. package/src/relayer.ts +255 -0
  317. package/src/sendUserOp.ts +570 -0
  318. package/src/sequenceWallet.ts +579 -0
  319. package/src/theme.ts +2 -0
  320. package/src/toSimpleSmartAccount.ts +567 -0
  321. package/src/tokenBalances.ts +760 -0
  322. package/src/tokens.ts +471 -0
  323. package/src/trails.ts +1591 -0
  324. package/src/types.d.ts +11 -0
  325. package/src/umd.tsx +49 -0
  326. package/src/utils.ts +16 -0
  327. package/src/vite-env.d.ts +4 -0
  328. package/src/widget/assets/MetaMask-icon-fox-with-margins.svg +31 -0
  329. package/src/widget/assets/MetaMask-icon-fox.svg +26 -0
  330. package/src/widget/assets/MetaMask-logo-black.svg +3 -0
  331. package/src/widget/assets/MetaMask-logo-white.svg +16 -0
  332. package/src/widget/assets/Privy_Brandmark_Black.svg +9 -0
  333. package/src/widget/assets/Privy_Brandmark_White.svg +9 -0
  334. package/src/widget/assets/Trails-logo-black.svg +11 -0
  335. package/src/widget/assets/Trails-logo-white.svg +11 -0
  336. package/src/widget/components/ChainImage.tsx +28 -0
  337. package/src/widget/components/ConnectWallet.tsx +206 -0
  338. package/src/widget/components/DebugScreensDropdown.tsx +88 -0
  339. package/src/widget/components/FeeOptions.tsx +199 -0
  340. package/src/widget/components/Footer.tsx +51 -0
  341. package/src/widget/components/GreenCheckAnimation.tsx +119 -0
  342. package/src/widget/components/Modal.tsx +97 -0
  343. package/src/widget/components/Receipt.tsx +237 -0
  344. package/src/widget/components/SendForm.tsx +695 -0
  345. package/src/widget/components/TokenImage.tsx +37 -0
  346. package/src/widget/components/TokenList.tsx +287 -0
  347. package/src/widget/components/TransferPending.tsx +204 -0
  348. package/src/widget/components/TransferPendingVertical.tsx +412 -0
  349. package/src/widget/components/WalletConfirmation.tsx +172 -0
  350. package/src/widget/config.ts +5 -0
  351. package/src/widget/hooks/useAmountUsd.ts +59 -0
  352. package/src/widget/hooks/useSendForm.ts +715 -0
  353. package/src/widget/hooks/useTokenList.ts +397 -0
  354. package/src/widget/index.css +2 -0
  355. package/src/widget/index.tsx +8 -0
  356. package/src/widget/types/svg.d.ts +8 -0
  357. package/src/widget/types.ts +59 -0
  358. package/src/widget/widget.tsx +1438 -0
  359. package/index.js +0 -1
@@ -0,0 +1,1055 @@
1
+ import { i as ct, a as lt, r as $t, h as at, $ as j, d as ft, R as Mt, O as Ot, e as St, f as At, W as Ct } from "./index-CK94R-H7.js";
2
+ import { x as $ } from "./lit-html-BRjl1r6K.js";
3
+ import { U as xt, n as O, c as dt, o as vt, r as rt } from "./if-defined-DRXJEhv7.js";
4
+ import { P as pt, Q as ht } from "./prepareSend-BQJmzM5B.js";
5
+ import "./index-CD6dBcRj.js";
6
+ import "./index-BlviH5nG.js";
7
+ import "./index-CDlhy529.js";
8
+ import "./index-B8LPuLXQ.js";
9
+ var bt = { exports: {} };
10
+ (function(t, e) {
11
+ (function(i, o) {
12
+ t.exports = o();
13
+ })(ht, function() {
14
+ var i = 1e3, o = 6e4, u = 36e5, r = "millisecond", c = "second", d = "minute", g = "hour", h = "day", v = "week", x = "month", R = "quarter", T = "year", D = "date", k = "Invalid Date", W = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, Z = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, X = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(p) {
15
+ var a = ["th", "st", "nd", "rd"], n = p % 100;
16
+ return "[" + p + (a[(n - 20) % 10] || a[n] || a[0]) + "]";
17
+ } }, tt = function(p, a, n) {
18
+ var l = String(p);
19
+ return !l || l.length >= a ? p : "" + Array(a + 1 - l.length).join(n) + p;
20
+ }, U = { s: tt, z: function(p) {
21
+ var a = -p.utcOffset(), n = Math.abs(a), l = Math.floor(n / 60), s = n % 60;
22
+ return (a <= 0 ? "+" : "-") + tt(l, 2, "0") + ":" + tt(s, 2, "0");
23
+ }, m: function p(a, n) {
24
+ if (a.date() < n.date()) return -p(n, a);
25
+ var l = 12 * (n.year() - a.year()) + (n.month() - a.month()), s = a.clone().add(l, x), f = n - s < 0, m = a.clone().add(l + (f ? -1 : 1), x);
26
+ return +(-(l + (n - s) / (f ? s - m : m - s)) || 0);
27
+ }, a: function(p) {
28
+ return p < 0 ? Math.ceil(p) || 0 : Math.floor(p);
29
+ }, p: function(p) {
30
+ return { M: x, y: T, w: v, d: h, D, h: g, m: d, s: c, ms: r, Q: R }[p] || String(p || "").toLowerCase().replace(/s$/, "");
31
+ }, u: function(p) {
32
+ return p === void 0;
33
+ } }, A = "en", C = {};
34
+ C[A] = X;
35
+ var G = "$isDayjsObject", H = function(p) {
36
+ return p instanceof ot || !(!p || !p[G]);
37
+ }, nt = function p(a, n, l) {
38
+ var s;
39
+ if (!a) return A;
40
+ if (typeof a == "string") {
41
+ var f = a.toLowerCase();
42
+ C[f] && (s = f), n && (C[f] = n, s = f);
43
+ var m = a.split("-");
44
+ if (!s && m.length > 1) return p(m[0]);
45
+ } else {
46
+ var y = a.name;
47
+ C[y] = a, s = y;
48
+ }
49
+ return !l && s && (A = s), s || !l && A;
50
+ }, _ = function(p, a) {
51
+ if (H(p)) return p.clone();
52
+ var n = typeof a == "object" ? a : {};
53
+ return n.date = p, n.args = arguments, new ot(n);
54
+ }, w = U;
55
+ w.l = nt, w.i = H, w.w = function(p, a) {
56
+ return _(p, { locale: a.$L, utc: a.$u, x: a.$x, $offset: a.$offset });
57
+ };
58
+ var ot = function() {
59
+ function p(n) {
60
+ this.$L = nt(n.locale, null, !0), this.parse(n), this.$x = this.$x || n.x || {}, this[G] = !0;
61
+ }
62
+ var a = p.prototype;
63
+ return a.parse = function(n) {
64
+ this.$d = function(l) {
65
+ var s = l.date, f = l.utc;
66
+ if (s === null) return /* @__PURE__ */ new Date(NaN);
67
+ if (w.u(s)) return /* @__PURE__ */ new Date();
68
+ if (s instanceof Date) return new Date(s);
69
+ if (typeof s == "string" && !/Z$/i.test(s)) {
70
+ var m = s.match(W);
71
+ if (m) {
72
+ var y = m[2] - 1 || 0, b = (m[7] || "0").substring(0, 3);
73
+ return f ? new Date(Date.UTC(m[1], y, m[3] || 1, m[4] || 0, m[5] || 0, m[6] || 0, b)) : new Date(m[1], y, m[3] || 1, m[4] || 0, m[5] || 0, m[6] || 0, b);
74
+ }
75
+ }
76
+ return new Date(s);
77
+ }(n), this.init();
78
+ }, a.init = function() {
79
+ var n = this.$d;
80
+ this.$y = n.getFullYear(), this.$M = n.getMonth(), this.$D = n.getDate(), this.$W = n.getDay(), this.$H = n.getHours(), this.$m = n.getMinutes(), this.$s = n.getSeconds(), this.$ms = n.getMilliseconds();
81
+ }, a.$utils = function() {
82
+ return w;
83
+ }, a.isValid = function() {
84
+ return this.$d.toString() !== k;
85
+ }, a.isSame = function(n, l) {
86
+ var s = _(n);
87
+ return this.startOf(l) <= s && s <= this.endOf(l);
88
+ }, a.isAfter = function(n, l) {
89
+ return _(n) < this.startOf(l);
90
+ }, a.isBefore = function(n, l) {
91
+ return this.endOf(l) < _(n);
92
+ }, a.$g = function(n, l, s) {
93
+ return w.u(n) ? this[l] : this.set(s, n);
94
+ }, a.unix = function() {
95
+ return Math.floor(this.valueOf() / 1e3);
96
+ }, a.valueOf = function() {
97
+ return this.$d.getTime();
98
+ }, a.startOf = function(n, l) {
99
+ var s = this, f = !!w.u(l) || l, m = w.p(n), y = function(z, I) {
100
+ var E = w.w(s.$u ? Date.UTC(s.$y, I, z) : new Date(s.$y, I, z), s);
101
+ return f ? E : E.endOf(h);
102
+ }, b = function(z, I) {
103
+ return w.w(s.toDate()[z].apply(s.toDate("s"), (f ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(I)), s);
104
+ }, M = this.$W, S = this.$M, N = this.$D, q = "set" + (this.$u ? "UTC" : "");
105
+ switch (m) {
106
+ case T:
107
+ return f ? y(1, 0) : y(31, 11);
108
+ case x:
109
+ return f ? y(1, S) : y(0, S + 1);
110
+ case v:
111
+ var V = this.$locale().weekStart || 0, et = (M < V ? M + 7 : M) - V;
112
+ return y(f ? N - et : N + (6 - et), S);
113
+ case h:
114
+ case D:
115
+ return b(q + "Hours", 0);
116
+ case g:
117
+ return b(q + "Minutes", 1);
118
+ case d:
119
+ return b(q + "Seconds", 2);
120
+ case c:
121
+ return b(q + "Milliseconds", 3);
122
+ default:
123
+ return this.clone();
124
+ }
125
+ }, a.endOf = function(n) {
126
+ return this.startOf(n, !1);
127
+ }, a.$set = function(n, l) {
128
+ var s, f = w.p(n), m = "set" + (this.$u ? "UTC" : ""), y = (s = {}, s[h] = m + "Date", s[D] = m + "Date", s[x] = m + "Month", s[T] = m + "FullYear", s[g] = m + "Hours", s[d] = m + "Minutes", s[c] = m + "Seconds", s[r] = m + "Milliseconds", s)[f], b = f === h ? this.$D + (l - this.$W) : l;
129
+ if (f === x || f === T) {
130
+ var M = this.clone().set(D, 1);
131
+ M.$d[y](b), M.init(), this.$d = M.set(D, Math.min(this.$D, M.daysInMonth())).$d;
132
+ } else y && this.$d[y](b);
133
+ return this.init(), this;
134
+ }, a.set = function(n, l) {
135
+ return this.clone().$set(n, l);
136
+ }, a.get = function(n) {
137
+ return this[w.p(n)]();
138
+ }, a.add = function(n, l) {
139
+ var s, f = this;
140
+ n = Number(n);
141
+ var m = w.p(l), y = function(S) {
142
+ var N = _(f);
143
+ return w.w(N.date(N.date() + Math.round(S * n)), f);
144
+ };
145
+ if (m === x) return this.set(x, this.$M + n);
146
+ if (m === T) return this.set(T, this.$y + n);
147
+ if (m === h) return y(1);
148
+ if (m === v) return y(7);
149
+ var b = (s = {}, s[d] = o, s[g] = u, s[c] = i, s)[m] || 1, M = this.$d.getTime() + n * b;
150
+ return w.w(M, this);
151
+ }, a.subtract = function(n, l) {
152
+ return this.add(-1 * n, l);
153
+ }, a.format = function(n) {
154
+ var l = this, s = this.$locale();
155
+ if (!this.isValid()) return s.invalidDate || k;
156
+ var f = n || "YYYY-MM-DDTHH:mm:ssZ", m = w.z(this), y = this.$H, b = this.$m, M = this.$M, S = s.weekdays, N = s.months, q = s.meridiem, V = function(I, E, it, st) {
157
+ return I && (I[E] || I(l, f)) || it[E].slice(0, st);
158
+ }, et = function(I) {
159
+ return w.s(y % 12 || 12, I, "0");
160
+ }, z = q || function(I, E, it) {
161
+ var st = I < 12 ? "AM" : "PM";
162
+ return it ? st.toLowerCase() : st;
163
+ };
164
+ return f.replace(Z, function(I, E) {
165
+ return E || function(it) {
166
+ switch (it) {
167
+ case "YY":
168
+ return String(l.$y).slice(-2);
169
+ case "YYYY":
170
+ return w.s(l.$y, 4, "0");
171
+ case "M":
172
+ return M + 1;
173
+ case "MM":
174
+ return w.s(M + 1, 2, "0");
175
+ case "MMM":
176
+ return V(s.monthsShort, M, N, 3);
177
+ case "MMMM":
178
+ return V(N, M);
179
+ case "D":
180
+ return l.$D;
181
+ case "DD":
182
+ return w.s(l.$D, 2, "0");
183
+ case "d":
184
+ return String(l.$W);
185
+ case "dd":
186
+ return V(s.weekdaysMin, l.$W, S, 2);
187
+ case "ddd":
188
+ return V(s.weekdaysShort, l.$W, S, 3);
189
+ case "dddd":
190
+ return S[l.$W];
191
+ case "H":
192
+ return String(y);
193
+ case "HH":
194
+ return w.s(y, 2, "0");
195
+ case "h":
196
+ return et(1);
197
+ case "hh":
198
+ return et(2);
199
+ case "a":
200
+ return z(y, b, !0);
201
+ case "A":
202
+ return z(y, b, !1);
203
+ case "m":
204
+ return String(b);
205
+ case "mm":
206
+ return w.s(b, 2, "0");
207
+ case "s":
208
+ return String(l.$s);
209
+ case "ss":
210
+ return w.s(l.$s, 2, "0");
211
+ case "SSS":
212
+ return w.s(l.$ms, 3, "0");
213
+ case "Z":
214
+ return m;
215
+ }
216
+ return null;
217
+ }(I) || m.replace(":", "");
218
+ });
219
+ }, a.utcOffset = function() {
220
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
221
+ }, a.diff = function(n, l, s) {
222
+ var f, m = this, y = w.p(l), b = _(n), M = (b.utcOffset() - this.utcOffset()) * o, S = this - b, N = function() {
223
+ return w.m(m, b);
224
+ };
225
+ switch (y) {
226
+ case T:
227
+ f = N() / 12;
228
+ break;
229
+ case x:
230
+ f = N();
231
+ break;
232
+ case R:
233
+ f = N() / 3;
234
+ break;
235
+ case v:
236
+ f = (S - M) / 6048e5;
237
+ break;
238
+ case h:
239
+ f = (S - M) / 864e5;
240
+ break;
241
+ case g:
242
+ f = S / u;
243
+ break;
244
+ case d:
245
+ f = S / o;
246
+ break;
247
+ case c:
248
+ f = S / i;
249
+ break;
250
+ default:
251
+ f = S;
252
+ }
253
+ return s ? f : w.a(f);
254
+ }, a.daysInMonth = function() {
255
+ return this.endOf(x).$D;
256
+ }, a.$locale = function() {
257
+ return C[this.$L];
258
+ }, a.locale = function(n, l) {
259
+ if (!n) return this.$L;
260
+ var s = this.clone(), f = nt(n, l, !0);
261
+ return f && (s.$L = f), s;
262
+ }, a.clone = function() {
263
+ return w.w(this.$d, this);
264
+ }, a.toDate = function() {
265
+ return new Date(this.valueOf());
266
+ }, a.toJSON = function() {
267
+ return this.isValid() ? this.toISOString() : null;
268
+ }, a.toISOString = function() {
269
+ return this.$d.toISOString();
270
+ }, a.toString = function() {
271
+ return this.$d.toUTCString();
272
+ }, p;
273
+ }(), yt = ot.prototype;
274
+ return _.prototype = yt, [["$ms", r], ["$s", c], ["$m", d], ["$H", g], ["$W", h], ["$M", x], ["$y", T], ["$D", D]].forEach(function(p) {
275
+ yt[p[1]] = function(a) {
276
+ return this.$g(a, p[0], p[1]);
277
+ };
278
+ }), _.extend = function(p, a) {
279
+ return p.$i || (p(a, ot, _), p.$i = !0), _;
280
+ }, _.locale = nt, _.isDayjs = H, _.unix = function(p) {
281
+ return _(1e3 * p);
282
+ }, _.en = C[A], _.Ls = C, _.p = {}, _;
283
+ });
284
+ })(bt);
285
+ var It = bt.exports;
286
+ const Q = /* @__PURE__ */ pt(It);
287
+ var Dt = { exports: {} };
288
+ (function(t, e) {
289
+ (function(i, o) {
290
+ t.exports = o();
291
+ })(ht, function() {
292
+ return { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(i) {
293
+ var o = ["th", "st", "nd", "rd"], u = i % 100;
294
+ return "[" + i + (o[(u - 20) % 10] || o[u] || o[0]) + "]";
295
+ } };
296
+ });
297
+ })(Dt);
298
+ var Rt = Dt.exports;
299
+ const Lt = /* @__PURE__ */ pt(Rt);
300
+ var Tt = { exports: {} };
301
+ (function(t, e) {
302
+ (function(i, o) {
303
+ t.exports = o();
304
+ })(ht, function() {
305
+ return function(i, o, u) {
306
+ i = i || {};
307
+ var r = o.prototype, c = { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" };
308
+ function d(h, v, x, R) {
309
+ return r.fromToBase(h, v, x, R);
310
+ }
311
+ u.en.relativeTime = c, r.fromToBase = function(h, v, x, R, T) {
312
+ for (var D, k, W, Z = x.$locale().relativeTime || c, X = i.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], tt = X.length, U = 0; U < tt; U += 1) {
313
+ var A = X[U];
314
+ A.d && (D = R ? u(h).diff(x, A.d, !0) : x.diff(h, A.d, !0));
315
+ var C = (i.rounding || Math.round)(Math.abs(D));
316
+ if (W = D > 0, C <= A.r || !A.r) {
317
+ C <= 1 && U > 0 && (A = X[U - 1]);
318
+ var G = Z[A.l];
319
+ T && (C = T("" + C)), k = typeof G == "string" ? G.replace("%d", C) : G(C, v, A.l, W);
320
+ break;
321
+ }
322
+ }
323
+ if (v) return k;
324
+ var H = W ? Z.future : Z.past;
325
+ return typeof H == "function" ? H(k) : H.replace("%s", k);
326
+ }, r.to = function(h, v) {
327
+ return d(h, v, this, !0);
328
+ }, r.from = function(h, v) {
329
+ return d(h, v, this);
330
+ };
331
+ var g = function(h) {
332
+ return h.$u ? u.utc() : u();
333
+ };
334
+ r.toNow = function(h) {
335
+ return this.to(g(this), h);
336
+ }, r.fromNow = function(h) {
337
+ return this.from(g(this), h);
338
+ };
339
+ };
340
+ });
341
+ })(Tt);
342
+ var Nt = Tt.exports;
343
+ const jt = /* @__PURE__ */ pt(Nt);
344
+ var _t = { exports: {} };
345
+ (function(t, e) {
346
+ (function(i, o) {
347
+ t.exports = o();
348
+ })(ht, function() {
349
+ return function(i, o, u) {
350
+ u.updateLocale = function(r, c) {
351
+ var d = u.Ls[r];
352
+ if (d) return (c ? Object.keys(c) : []).forEach(function(g) {
353
+ d[g] = c[g];
354
+ }), d;
355
+ };
356
+ };
357
+ });
358
+ })(_t);
359
+ var Ft = _t.exports;
360
+ const kt = /* @__PURE__ */ pt(Ft);
361
+ Q.extend(jt);
362
+ Q.extend(kt);
363
+ const Yt = {
364
+ ...Lt,
365
+ name: "en-web3-modal",
366
+ relativeTime: {
367
+ future: "in %s",
368
+ past: "%s ago",
369
+ s: "%d sec",
370
+ m: "1 min",
371
+ mm: "%d min",
372
+ h: "1 hr",
373
+ hh: "%d hrs",
374
+ d: "1 d",
375
+ dd: "%d d",
376
+ M: "1 mo",
377
+ MM: "%d mo",
378
+ y: "1 yr",
379
+ yy: "%d yr"
380
+ }
381
+ }, Bt = [
382
+ "January",
383
+ "February",
384
+ "March",
385
+ "April",
386
+ "May",
387
+ "June",
388
+ "July",
389
+ "August",
390
+ "September",
391
+ "October",
392
+ "November",
393
+ "December"
394
+ ];
395
+ Q.locale("en-web3-modal", Yt);
396
+ const mt = {
397
+ getMonthNameByIndex(t) {
398
+ return Bt[t];
399
+ },
400
+ getYear(t = (/* @__PURE__ */ new Date()).toISOString()) {
401
+ return Q(t).year();
402
+ },
403
+ getRelativeDateFromNow(t) {
404
+ return Q(t).locale("en-web3-modal").fromNow(!0);
405
+ },
406
+ formatDate(t, e = "DD MMM") {
407
+ return Q(t).format(e);
408
+ }
409
+ }, Et = 3, Wt = ["receive", "deposit", "borrow", "claim"], Ut = ["withdraw", "repay", "burn"], K = {
410
+ getTransactionGroupTitle(t, e) {
411
+ const i = mt.getYear(), o = mt.getMonthNameByIndex(e);
412
+ return t === i ? o : `${o} ${t}`;
413
+ },
414
+ getTransactionImages(t) {
415
+ const [e, i] = t, o = !!e && (t == null ? void 0 : t.every((c) => !!c.nft_info)), u = (t == null ? void 0 : t.length) > 1;
416
+ return (t == null ? void 0 : t.length) === 2 && !o ? [this.getTransactionImage(i), this.getTransactionImage(e)] : u ? t.map((c) => this.getTransactionImage(c)) : [this.getTransactionImage(e)];
417
+ },
418
+ getTransactionImage(t) {
419
+ return {
420
+ type: K.getTransactionTransferTokenType(t),
421
+ url: K.getTransactionImageURL(t)
422
+ };
423
+ },
424
+ getTransactionImageURL(t) {
425
+ var u, r, c, d, g;
426
+ let e;
427
+ const i = !!(t != null && t.nft_info), o = !!(t != null && t.fungible_info);
428
+ return t && i ? e = (c = (r = (u = t == null ? void 0 : t.nft_info) == null ? void 0 : u.content) == null ? void 0 : r.preview) == null ? void 0 : c.url : t && o && (e = (g = (d = t == null ? void 0 : t.fungible_info) == null ? void 0 : d.icon) == null ? void 0 : g.url), e;
429
+ },
430
+ getTransactionTransferTokenType(t) {
431
+ if (t != null && t.fungible_info)
432
+ return "FUNGIBLE";
433
+ if (t != null && t.nft_info)
434
+ return "NFT";
435
+ },
436
+ getTransactionDescriptions(t) {
437
+ var x, R, T;
438
+ const e = (x = t == null ? void 0 : t.metadata) == null ? void 0 : x.operationType, i = t == null ? void 0 : t.transfers, o = ((R = t == null ? void 0 : t.transfers) == null ? void 0 : R.length) > 0, u = ((T = t == null ? void 0 : t.transfers) == null ? void 0 : T.length) > 1, r = o && (i == null ? void 0 : i.every((D) => !!(D != null && D.fungible_info))), [c, d] = i;
439
+ let g = this.getTransferDescription(c), h = this.getTransferDescription(d);
440
+ if (!o)
441
+ return (e === "send" || e === "receive") && r ? (g = xt.getTruncateString({
442
+ string: t == null ? void 0 : t.metadata.sentFrom,
443
+ charsStart: 4,
444
+ charsEnd: 6,
445
+ truncate: "middle"
446
+ }), h = xt.getTruncateString({
447
+ string: t == null ? void 0 : t.metadata.sentTo,
448
+ charsStart: 4,
449
+ charsEnd: 6,
450
+ truncate: "middle"
451
+ }), [g, h]) : [t.metadata.status];
452
+ if (u)
453
+ return i.map((D) => this.getTransferDescription(D)).reverse();
454
+ let v = "";
455
+ return Wt.includes(e) ? v = "+" : Ut.includes(e) && (v = "-"), g = v.concat(g), [g];
456
+ },
457
+ getTransferDescription(t) {
458
+ var i;
459
+ let e = "";
460
+ return t && (t != null && t.nft_info ? e = ((i = t == null ? void 0 : t.nft_info) == null ? void 0 : i.name) || "-" : t != null && t.fungible_info && (e = this.getFungibleTransferDescription(t) || "-")), e;
461
+ },
462
+ getFungibleTransferDescription(t) {
463
+ var o;
464
+ return t ? [this.getQuantityFixedValue(t == null ? void 0 : t.quantity.numeric), (o = t == null ? void 0 : t.fungible_info) == null ? void 0 : o.symbol].join(" ").trim() : null;
465
+ },
466
+ getQuantityFixedValue(t) {
467
+ return t ? parseFloat(t).toFixed(Et) : null;
468
+ }
469
+ };
470
+ var gt;
471
+ (function(t) {
472
+ t.approve = "approved", t.bought = "bought", t.borrow = "borrowed", t.burn = "burnt", t.cancel = "canceled", t.claim = "claimed", t.deploy = "deployed", t.deposit = "deposited", t.execute = "executed", t.mint = "minted", t.receive = "received", t.repay = "repaid", t.send = "sent", t.sell = "sold", t.stake = "staked", t.trade = "swapped", t.unstake = "unstaked", t.withdraw = "withdrawn";
473
+ })(gt || (gt = {}));
474
+ const Ht = ct`
475
+ :host > wui-flex {
476
+ display: flex;
477
+ justify-content: center;
478
+ align-items: center;
479
+ position: relative;
480
+ width: 40px;
481
+ height: 40px;
482
+ box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
483
+ background-color: var(--wui-color-gray-glass-005);
484
+ }
485
+
486
+ :host > wui-flex wui-image {
487
+ display: block;
488
+ }
489
+
490
+ :host > wui-flex,
491
+ :host > wui-flex wui-image,
492
+ .swap-images-container,
493
+ .swap-images-container.nft,
494
+ wui-image.nft {
495
+ border-top-left-radius: var(--local-left-border-radius);
496
+ border-top-right-radius: var(--local-right-border-radius);
497
+ border-bottom-left-radius: var(--local-left-border-radius);
498
+ border-bottom-right-radius: var(--local-right-border-radius);
499
+ }
500
+
501
+ wui-icon {
502
+ width: 20px;
503
+ height: 20px;
504
+ }
505
+
506
+ wui-icon-box {
507
+ position: absolute;
508
+ right: 0;
509
+ bottom: 0;
510
+ transform: translate(20%, 20%);
511
+ }
512
+
513
+ .swap-images-container {
514
+ position: relative;
515
+ width: 40px;
516
+ height: 40px;
517
+ overflow: hidden;
518
+ }
519
+
520
+ .swap-images-container wui-image:first-child {
521
+ position: absolute;
522
+ width: 40px;
523
+ height: 40px;
524
+ top: 0;
525
+ left: 0%;
526
+ clip-path: inset(0px calc(50% + 2px) 0px 0%);
527
+ }
528
+
529
+ .swap-images-container wui-image:last-child {
530
+ clip-path: inset(0px 0px 0px calc(50% + 2px));
531
+ }
532
+ `;
533
+ var J = function(t, e, i, o) {
534
+ var u = arguments.length, r = u < 3 ? e : o === null ? o = Object.getOwnPropertyDescriptor(e, i) : o, c;
535
+ if (typeof Reflect == "object" && typeof Reflect.decorate == "function") r = Reflect.decorate(t, e, i, o);
536
+ else for (var d = t.length - 1; d >= 0; d--) (c = t[d]) && (r = (u < 3 ? c(r) : u > 3 ? c(e, i, r) : c(e, i)) || r);
537
+ return u > 3 && r && Object.defineProperty(e, i, r), r;
538
+ };
539
+ let Y = class extends lt {
540
+ constructor() {
541
+ super(...arguments), this.images = [], this.secondImage = {
542
+ type: void 0,
543
+ url: ""
544
+ };
545
+ }
546
+ render() {
547
+ const [e, i] = this.images, o = (e == null ? void 0 : e.type) === "NFT", u = i != null && i.url ? i.type === "NFT" : o, r = o ? "var(--wui-border-radius-xxs)" : "var(--wui-border-radius-s)", c = u ? "var(--wui-border-radius-xxs)" : "var(--wui-border-radius-s)";
548
+ return this.style.cssText = `
549
+ --local-left-border-radius: ${r};
550
+ --local-right-border-radius: ${c};
551
+ `, $`<wui-flex> ${this.templateVisual()} ${this.templateIcon()} </wui-flex>`;
552
+ }
553
+ templateVisual() {
554
+ const [e, i] = this.images, o = e == null ? void 0 : e.type;
555
+ return this.images.length === 2 && (e != null && e.url || i != null && i.url) ? $`<div class="swap-images-container">
556
+ ${e != null && e.url ? $`<wui-image src=${e.url} alt="Transaction image"></wui-image>` : null}
557
+ ${i != null && i.url ? $`<wui-image src=${i.url} alt="Transaction image"></wui-image>` : null}
558
+ </div>` : e != null && e.url ? $`<wui-image src=${e.url} alt="Transaction image"></wui-image>` : o === "NFT" ? $`<wui-icon size="inherit" color="fg-200" name="nftPlaceholder"></wui-icon>` : $`<wui-icon size="inherit" color="fg-200" name="coinPlaceholder"></wui-icon>`;
559
+ }
560
+ templateIcon() {
561
+ let e = "accent-100", i;
562
+ return i = this.getIcon(), this.status && (e = this.getStatusColor()), i ? $`
563
+ <wui-icon-box
564
+ size="xxs"
565
+ iconColor=${e}
566
+ backgroundColor=${e}
567
+ background="opaque"
568
+ icon=${i}
569
+ ?border=${!0}
570
+ borderColor="wui-color-bg-125"
571
+ ></wui-icon-box>
572
+ ` : null;
573
+ }
574
+ getDirectionIcon() {
575
+ switch (this.direction) {
576
+ case "in":
577
+ return "arrowBottom";
578
+ case "out":
579
+ return "arrowTop";
580
+ default:
581
+ return;
582
+ }
583
+ }
584
+ getIcon() {
585
+ return this.onlyDirectionIcon ? this.getDirectionIcon() : this.type === "trade" ? "swapHorizontalBold" : this.type === "approve" ? "checkmark" : this.type === "cancel" ? "close" : this.getDirectionIcon();
586
+ }
587
+ getStatusColor() {
588
+ switch (this.status) {
589
+ case "confirmed":
590
+ return "success-100";
591
+ case "failed":
592
+ return "error-100";
593
+ case "pending":
594
+ return "inverse-100";
595
+ default:
596
+ return "accent-100";
597
+ }
598
+ }
599
+ };
600
+ Y.styles = [Ht];
601
+ J([
602
+ O()
603
+ ], Y.prototype, "type", void 0);
604
+ J([
605
+ O()
606
+ ], Y.prototype, "status", void 0);
607
+ J([
608
+ O()
609
+ ], Y.prototype, "direction", void 0);
610
+ J([
611
+ O({ type: Boolean })
612
+ ], Y.prototype, "onlyDirectionIcon", void 0);
613
+ J([
614
+ O({ type: Array })
615
+ ], Y.prototype, "images", void 0);
616
+ J([
617
+ O({ type: Object })
618
+ ], Y.prototype, "secondImage", void 0);
619
+ Y = J([
620
+ dt("wui-transaction-visual")
621
+ ], Y);
622
+ const Vt = ct`
623
+ :host > wui-flex:first-child {
624
+ align-items: center;
625
+ column-gap: var(--wui-spacing-s);
626
+ padding: 6.5px var(--wui-spacing-xs) 6.5px var(--wui-spacing-xs);
627
+ width: 100%;
628
+ }
629
+
630
+ :host > wui-flex:first-child wui-text:nth-child(1) {
631
+ text-transform: capitalize;
632
+ }
633
+
634
+ wui-transaction-visual {
635
+ width: 40px;
636
+ height: 40px;
637
+ }
638
+
639
+ wui-flex {
640
+ flex: 1;
641
+ }
642
+
643
+ :host wui-flex wui-flex {
644
+ overflow: hidden;
645
+ }
646
+
647
+ :host .description-container wui-text span {
648
+ word-break: break-all;
649
+ }
650
+
651
+ :host .description-container wui-text {
652
+ overflow: hidden;
653
+ }
654
+
655
+ :host .description-separator-icon {
656
+ margin: 0px 6px;
657
+ }
658
+
659
+ :host wui-text > span {
660
+ overflow: hidden;
661
+ display: -webkit-box;
662
+ -webkit-box-orient: vertical;
663
+ -webkit-line-clamp: 1;
664
+ }
665
+ `;
666
+ var F = function(t, e, i, o) {
667
+ var u = arguments.length, r = u < 3 ? e : o === null ? o = Object.getOwnPropertyDescriptor(e, i) : o, c;
668
+ if (typeof Reflect == "object" && typeof Reflect.decorate == "function") r = Reflect.decorate(t, e, i, o);
669
+ else for (var d = t.length - 1; d >= 0; d--) (c = t[d]) && (r = (u < 3 ? c(r) : u > 3 ? c(e, i, r) : c(e, i)) || r);
670
+ return u > 3 && r && Object.defineProperty(e, i, r), r;
671
+ };
672
+ let L = class extends lt {
673
+ constructor() {
674
+ super(...arguments), this.type = "approve", this.onlyDirectionIcon = !1, this.images = [], this.price = [], this.amount = [], this.symbol = [];
675
+ }
676
+ render() {
677
+ return $`
678
+ <wui-flex>
679
+ <wui-transaction-visual
680
+ .status=${this.status}
681
+ direction=${vt(this.direction)}
682
+ type=${this.type}
683
+ onlyDirectionIcon=${vt(this.onlyDirectionIcon)}
684
+ .images=${this.images}
685
+ ></wui-transaction-visual>
686
+ <wui-flex flexDirection="column" gap="3xs">
687
+ <wui-text variant="paragraph-600" color="fg-100">
688
+ ${gt[this.type] || this.type}
689
+ </wui-text>
690
+ <wui-flex class="description-container">
691
+ ${this.templateDescription()} ${this.templateSecondDescription()}
692
+ </wui-flex>
693
+ </wui-flex>
694
+ <wui-text variant="micro-700" color="fg-300"><span>${this.date}</span></wui-text>
695
+ </wui-flex>
696
+ `;
697
+ }
698
+ templateDescription() {
699
+ var i;
700
+ const e = (i = this.descriptions) == null ? void 0 : i[0];
701
+ return e ? $`
702
+ <wui-text variant="small-500" color="fg-200">
703
+ <span>${e}</span>
704
+ </wui-text>
705
+ ` : null;
706
+ }
707
+ templateSecondDescription() {
708
+ var i;
709
+ const e = (i = this.descriptions) == null ? void 0 : i[1];
710
+ return e ? $`
711
+ <wui-icon class="description-separator-icon" size="xxs" name="arrowRight"></wui-icon>
712
+ <wui-text variant="small-400" color="fg-200">
713
+ <span>${e}</span>
714
+ </wui-text>
715
+ ` : null;
716
+ }
717
+ };
718
+ L.styles = [$t, Vt];
719
+ F([
720
+ O()
721
+ ], L.prototype, "type", void 0);
722
+ F([
723
+ O({ type: Array })
724
+ ], L.prototype, "descriptions", void 0);
725
+ F([
726
+ O()
727
+ ], L.prototype, "date", void 0);
728
+ F([
729
+ O({ type: Boolean })
730
+ ], L.prototype, "onlyDirectionIcon", void 0);
731
+ F([
732
+ O()
733
+ ], L.prototype, "status", void 0);
734
+ F([
735
+ O()
736
+ ], L.prototype, "direction", void 0);
737
+ F([
738
+ O({ type: Array })
739
+ ], L.prototype, "images", void 0);
740
+ F([
741
+ O({ type: Array })
742
+ ], L.prototype, "price", void 0);
743
+ F([
744
+ O({ type: Array })
745
+ ], L.prototype, "amount", void 0);
746
+ F([
747
+ O({ type: Array })
748
+ ], L.prototype, "symbol", void 0);
749
+ L = F([
750
+ dt("wui-transaction-list-item")
751
+ ], L);
752
+ const zt = ct`
753
+ :host > wui-flex:first-child {
754
+ column-gap: var(--wui-spacing-s);
755
+ padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs);
756
+ width: 100%;
757
+ }
758
+
759
+ wui-flex {
760
+ display: flex;
761
+ flex: 1;
762
+ }
763
+ `;
764
+ var Jt = function(t, e, i, o) {
765
+ var u = arguments.length, r = u < 3 ? e : o === null ? o = Object.getOwnPropertyDescriptor(e, i) : o, c;
766
+ if (typeof Reflect == "object" && typeof Reflect.decorate == "function") r = Reflect.decorate(t, e, i, o);
767
+ else for (var d = t.length - 1; d >= 0; d--) (c = t[d]) && (r = (u < 3 ? c(r) : u > 3 ? c(e, i, r) : c(e, i)) || r);
768
+ return u > 3 && r && Object.defineProperty(e, i, r), r;
769
+ };
770
+ let wt = class extends lt {
771
+ render() {
772
+ return $`
773
+ <wui-flex alignItems="center">
774
+ <wui-shimmer width="40px" height="40px"></wui-shimmer>
775
+ <wui-flex flexDirection="column" gap="2xs">
776
+ <wui-shimmer width="72px" height="16px" borderRadius="4xs"></wui-shimmer>
777
+ <wui-shimmer width="148px" height="14px" borderRadius="4xs"></wui-shimmer>
778
+ </wui-flex>
779
+ <wui-shimmer width="24px" height="12px" borderRadius="5xs"></wui-shimmer>
780
+ </wui-flex>
781
+ `;
782
+ }
783
+ };
784
+ wt.styles = [$t, zt];
785
+ wt = Jt([
786
+ dt("wui-transaction-list-item-loader")
787
+ ], wt);
788
+ const Pt = ct`
789
+ :host {
790
+ min-height: 100%;
791
+ }
792
+
793
+ .group-container[last-group='true'] {
794
+ padding-bottom: var(--wui-spacing-m);
795
+ }
796
+
797
+ .contentContainer {
798
+ height: 280px;
799
+ }
800
+
801
+ .contentContainer > wui-icon-box {
802
+ width: 40px;
803
+ height: 40px;
804
+ border-radius: var(--wui-border-radius-xxs);
805
+ }
806
+
807
+ .contentContainer > .textContent {
808
+ width: 65%;
809
+ }
810
+
811
+ .emptyContainer {
812
+ height: 100%;
813
+ }
814
+ `;
815
+ var P = function(t, e, i, o) {
816
+ var u = arguments.length, r = u < 3 ? e : o === null ? o = Object.getOwnPropertyDescriptor(e, i) : o, c;
817
+ if (typeof Reflect == "object" && typeof Reflect.decorate == "function") r = Reflect.decorate(t, e, i, o);
818
+ else for (var d = t.length - 1; d >= 0; d--) (c = t[d]) && (r = (u < 3 ? c(r) : u > 3 ? c(e, i, r) : c(e, i)) || r);
819
+ return u > 3 && r && Object.defineProperty(e, i, r), r;
820
+ };
821
+ const ut = "last-transaction", Gt = 7;
822
+ let B = class extends lt {
823
+ constructor() {
824
+ super(), this.unsubscribe = [], this.paginationObserver = void 0, this.page = "activity", this.caipAddress = at.state.activeCaipAddress, this.transactionsByYear = j.state.transactionsByYear, this.loading = j.state.loading, this.empty = j.state.empty, this.next = j.state.next, j.clearCursor(), this.unsubscribe.push(at.subscribeKey("activeCaipAddress", (e) => {
825
+ e && this.caipAddress !== e && (j.resetTransactions(), j.fetchTransactions(e)), this.caipAddress = e;
826
+ }), at.subscribeKey("activeCaipNetwork", () => {
827
+ this.updateTransactionView();
828
+ }), j.subscribe((e) => {
829
+ this.transactionsByYear = e.transactionsByYear, this.loading = e.loading, this.empty = e.empty, this.next = e.next;
830
+ }));
831
+ }
832
+ firstUpdated() {
833
+ this.updateTransactionView(), this.createPaginationObserver();
834
+ }
835
+ updated() {
836
+ this.setPaginationObserver();
837
+ }
838
+ disconnectedCallback() {
839
+ this.unsubscribe.forEach((e) => e());
840
+ }
841
+ render() {
842
+ return $` ${this.empty ? null : this.templateTransactionsByYear()}
843
+ ${this.loading ? this.templateLoading() : null}
844
+ ${!this.loading && this.empty ? this.templateEmpty() : null}`;
845
+ }
846
+ updateTransactionView() {
847
+ j.resetTransactions(), this.caipAddress && j.fetchTransactions(ft.getPlainAddress(this.caipAddress));
848
+ }
849
+ templateTransactionsByYear() {
850
+ return Object.keys(this.transactionsByYear).sort().reverse().map((i) => {
851
+ const o = parseInt(i, 10), u = new Array(12).fill(null).map((r, c) => {
852
+ var h;
853
+ const d = K.getTransactionGroupTitle(o, c), g = (h = this.transactionsByYear[o]) == null ? void 0 : h[c];
854
+ return {
855
+ groupTitle: d,
856
+ transactions: g
857
+ };
858
+ }).filter(({ transactions: r }) => r).reverse();
859
+ return u.map(({ groupTitle: r, transactions: c }, d) => {
860
+ const g = d === u.length - 1;
861
+ return c ? $`
862
+ <wui-flex
863
+ flexDirection="column"
864
+ class="group-container"
865
+ last-group="${g ? "true" : "false"}"
866
+ data-testid="month-indexes"
867
+ >
868
+ <wui-flex
869
+ alignItems="center"
870
+ flexDirection="row"
871
+ .padding=${["xs", "s", "s", "s"]}
872
+ >
873
+ <wui-text variant="paragraph-500" color="fg-200" data-testid="group-title"
874
+ >${r}</wui-text
875
+ >
876
+ </wui-flex>
877
+ <wui-flex flexDirection="column" gap="xs">
878
+ ${this.templateTransactions(c, g)}
879
+ </wui-flex>
880
+ </wui-flex>
881
+ ` : null;
882
+ });
883
+ });
884
+ }
885
+ templateRenderTransaction(e, i) {
886
+ const { date: o, descriptions: u, direction: r, isAllNFT: c, images: d, status: g, transfers: h, type: v } = this.getTransactionListItemProps(e), x = (h == null ? void 0 : h.length) > 1;
887
+ return (h == null ? void 0 : h.length) === 2 && !c ? $`
888
+ <wui-transaction-list-item
889
+ date=${o}
890
+ .direction=${r}
891
+ id=${i && this.next ? ut : ""}
892
+ status=${g}
893
+ type=${v}
894
+ .images=${d}
895
+ .descriptions=${u}
896
+ ></wui-transaction-list-item>
897
+ ` : x ? h.map((T, D) => {
898
+ const k = K.getTransferDescription(T), W = i && D === h.length - 1;
899
+ return $` <wui-transaction-list-item
900
+ date=${o}
901
+ direction=${T.direction}
902
+ id=${W && this.next ? ut : ""}
903
+ status=${g}
904
+ type=${v}
905
+ .onlyDirectionIcon=${!0}
906
+ .images=${[d[D]]}
907
+ .descriptions=${[k]}
908
+ ></wui-transaction-list-item>`;
909
+ }) : $`
910
+ <wui-transaction-list-item
911
+ date=${o}
912
+ .direction=${r}
913
+ id=${i && this.next ? ut : ""}
914
+ status=${g}
915
+ type=${v}
916
+ .images=${d}
917
+ .descriptions=${u}
918
+ ></wui-transaction-list-item>
919
+ `;
920
+ }
921
+ templateTransactions(e, i) {
922
+ return e.map((o, u) => {
923
+ const r = i && u === e.length - 1;
924
+ return $`${this.templateRenderTransaction(o, r)}`;
925
+ });
926
+ }
927
+ emptyStateActivity() {
928
+ return $`<wui-flex
929
+ class="emptyContainer"
930
+ flexGrow="1"
931
+ flexDirection="column"
932
+ justifyContent="center"
933
+ alignItems="center"
934
+ .padding=${["3xl", "xl", "3xl", "xl"]}
935
+ gap="xl"
936
+ data-testid="empty-activity-state"
937
+ >
938
+ <wui-icon-box
939
+ backgroundColor="gray-glass-005"
940
+ background="gray"
941
+ iconColor="fg-200"
942
+ icon="wallet"
943
+ size="lg"
944
+ ?border=${!0}
945
+ borderColor="wui-color-bg-125"
946
+ ></wui-icon-box>
947
+ <wui-flex flexDirection="column" alignItems="center" gap="xs">
948
+ <wui-text align="center" variant="paragraph-500" color="fg-100"
949
+ >No Transactions yet</wui-text
950
+ >
951
+ <wui-text align="center" variant="small-500" color="fg-200"
952
+ >Start trading on dApps <br />
953
+ to grow your wallet!</wui-text
954
+ >
955
+ </wui-flex>
956
+ </wui-flex>`;
957
+ }
958
+ emptyStateAccount() {
959
+ return $`<wui-flex
960
+ class="contentContainer"
961
+ alignItems="center"
962
+ justifyContent="center"
963
+ flexDirection="column"
964
+ gap="l"
965
+ data-testid="empty-account-state"
966
+ >
967
+ <wui-icon-box
968
+ icon="swapHorizontal"
969
+ size="inherit"
970
+ iconColor="fg-200"
971
+ backgroundColor="fg-200"
972
+ iconSize="lg"
973
+ ></wui-icon-box>
974
+ <wui-flex
975
+ class="textContent"
976
+ gap="xs"
977
+ flexDirection="column"
978
+ justifyContent="center"
979
+ flexDirection="column"
980
+ >
981
+ <wui-text variant="paragraph-500" align="center" color="fg-100">No activity yet</wui-text>
982
+ <wui-text variant="small-400" align="center" color="fg-200"
983
+ >Your next transactions will appear here</wui-text
984
+ >
985
+ </wui-flex>
986
+ <wui-link @click=${this.onReceiveClick.bind(this)}>Trade</wui-link>
987
+ </wui-flex>`;
988
+ }
989
+ templateEmpty() {
990
+ return this.page === "account" ? $`${this.emptyStateAccount()}` : $`${this.emptyStateActivity()}`;
991
+ }
992
+ templateLoading() {
993
+ return this.page === "activity" ? Array(Gt).fill($` <wui-transaction-list-item-loader></wui-transaction-list-item-loader> `).map((e) => e) : null;
994
+ }
995
+ onReceiveClick() {
996
+ Mt.push("WalletReceive");
997
+ }
998
+ createPaginationObserver() {
999
+ const { projectId: e } = Ot.state;
1000
+ this.paginationObserver = new IntersectionObserver(([i]) => {
1001
+ i != null && i.isIntersecting && !this.loading && (j.fetchTransactions(ft.getPlainAddress(this.caipAddress)), St.sendEvent({
1002
+ type: "track",
1003
+ event: "LOAD_MORE_TRANSACTIONS",
1004
+ properties: {
1005
+ address: ft.getPlainAddress(this.caipAddress),
1006
+ projectId: e,
1007
+ cursor: this.next,
1008
+ isSmartAccount: At(at.state.activeChain) === Ct.ACCOUNT_TYPES.SMART_ACCOUNT
1009
+ }
1010
+ }));
1011
+ }, {}), this.setPaginationObserver();
1012
+ }
1013
+ setPaginationObserver() {
1014
+ var i, o, u;
1015
+ (i = this.paginationObserver) == null || i.disconnect();
1016
+ const e = (o = this.shadowRoot) == null ? void 0 : o.querySelector(`#${ut}`);
1017
+ e && ((u = this.paginationObserver) == null || u.observe(e));
1018
+ }
1019
+ getTransactionListItemProps(e) {
1020
+ var g, h, v, x, R;
1021
+ const i = mt.formatDate((g = e == null ? void 0 : e.metadata) == null ? void 0 : g.minedAt), o = K.getTransactionDescriptions(e), u = e == null ? void 0 : e.transfers, r = (h = e == null ? void 0 : e.transfers) == null ? void 0 : h[0], c = !!r && ((v = e == null ? void 0 : e.transfers) == null ? void 0 : v.every((T) => !!T.nft_info)), d = K.getTransactionImages(u);
1022
+ return {
1023
+ date: i,
1024
+ direction: r == null ? void 0 : r.direction,
1025
+ descriptions: o,
1026
+ isAllNFT: c,
1027
+ images: d,
1028
+ status: (x = e.metadata) == null ? void 0 : x.status,
1029
+ transfers: u,
1030
+ type: (R = e.metadata) == null ? void 0 : R.operationType
1031
+ };
1032
+ }
1033
+ };
1034
+ B.styles = Pt;
1035
+ P([
1036
+ O()
1037
+ ], B.prototype, "page", void 0);
1038
+ P([
1039
+ rt()
1040
+ ], B.prototype, "caipAddress", void 0);
1041
+ P([
1042
+ rt()
1043
+ ], B.prototype, "transactionsByYear", void 0);
1044
+ P([
1045
+ rt()
1046
+ ], B.prototype, "loading", void 0);
1047
+ P([
1048
+ rt()
1049
+ ], B.prototype, "empty", void 0);
1050
+ P([
1051
+ rt()
1052
+ ], B.prototype, "next", void 0);
1053
+ B = P([
1054
+ dt("w3m-activity-list")
1055
+ ], B);