@dcl/explore-site 0.0.1-24485660213.commit-845d396 → 0.0.1-24506067692.commit-7cbe267

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 (1193) hide show
  1. package/assets/HomePage-DuWKLuFD.js +3 -0
  2. package/assets/{QueryClientProvider-BhyaIKiR.js → QueryClientProvider-S2cSmCUs.js} +2 -2
  3. package/assets/{SensorsRounded-nieimCS8.js → SensorsRounded-TwgeIrvl.js} +1 -1
  4. package/assets/{__federation_expose_App-B0aY7Py4.js → __federation_expose_App-B4QxDAu7.js} +1 -1
  5. package/assets/__federation_fn_import-chtkoWq_.js +1 -0
  6. package/assets/__federation_shared_@dcl/core-web3-CqeOHBSV.js +2 -0
  7. package/assets/__federation_shared_@dcl/{hooks-DYeUnvq5.js → hooks-DWUL36eR.js} +3 -3
  8. package/assets/__federation_shared_@emotion/react-ClHMF0dJ.js +1 -0
  9. package/assets/__federation_shared_@emotion/{styled-nUAfJU1w.js → styled-CutIM4hd.js} +1 -1
  10. package/assets/{__federation_shared_decentraland-ui2-36oVv_RF.js → __federation_shared_decentraland-ui2-OcYWz3BJ.js} +6 -6
  11. package/assets/{__federation_shared_react-redux-vH9OOcWA.js → __federation_shared_react-redux-BsRWKqZd.js} +1 -1
  12. package/assets/{__federation_shared_react-router-dom-C_SAlhzM.js → __federation_shared_react-router-dom-D6fN_MPs.js} +1 -1
  13. package/assets/__federation_shared_viem-CX1dsuPM.js +2 -0
  14. package/assets/__federation_shared_wagmi-V68qkOak.js +17 -0
  15. package/assets/{add-CLk7XVew.js → add-DYSzlqDi.js} +1 -1
  16. package/assets/{all-wallets-IYtg-tji.js → all-wallets-Cz1_BP21.js} +1 -1
  17. package/assets/{app-store-DtfBDopi.js → app-store-DJD6if64.js} +1 -1
  18. package/assets/{apple-m6Hn-bqE.js → apple-ONzgQNZb.js} +1 -1
  19. package/assets/{arrow-bottom-1yzKjtqK.js → arrow-bottom-CS4hUU5K.js} +1 -1
  20. package/assets/{arrow-bottom-circle-Dls6gSE9.js → arrow-bottom-circle-tskAwsAe.js} +1 -1
  21. package/assets/{arrow-left-CNsu18Pl.js → arrow-left-lVGPT4Ol.js} +1 -1
  22. package/assets/{arrow-right-hIOHlL0D.js → arrow-right-DCzkLJ85.js} +1 -1
  23. package/assets/{arrow-top-DUg6_QYs.js → arrow-top-BfoirqVJ.js} +1 -1
  24. package/assets/arweave-CAGvOb64.js +1 -0
  25. package/assets/{auto-track-C6pjzgJ-.js → auto-track-ylAeu8GC.js} +1 -1
  26. package/assets/{bank-DXwLc29q.js → bank-C3Dt70oH.js} +1 -1
  27. package/assets/basic-t1j5X-od.js +2121 -0
  28. package/assets/biconomy-BA_1W9dm.js +1 -0
  29. package/assets/{browser-CCDvSEkj.js → browser-CJ0usHLI.js} +1 -1
  30. package/assets/browser-DEaANxMP.js +8 -0
  31. package/assets/{card-91-oSUdO.js → card-Cz1gdgq-.js} +1 -1
  32. package/assets/ccip-D79frVW8.js +1 -0
  33. package/assets/chains-ByGyKALz.js +1 -0
  34. package/assets/{checkmark-Dktdi58s.js → checkmark-C5jp9GGl.js} +1 -1
  35. package/assets/{checkmark-bold-BYVU6esV.js → checkmark-bold-BTecpTuR.js} +1 -1
  36. package/assets/{chevron-bottom-COQTP5Ac.js → chevron-bottom-BkF7oESa.js} +1 -1
  37. package/assets/{chevron-left-xduigmQe.js → chevron-left-D1L-jaav.js} +1 -1
  38. package/assets/{chevron-right-Da2gsK2R.js → chevron-right-D5rt8sAi.js} +1 -1
  39. package/assets/{chevron-top-CEwq_-CY.js → chevron-top-hc8gcFpH.js} +1 -1
  40. package/assets/{chrome-store-DqiiVTtW.js → chrome-store-ChFX3FT3.js} +1 -1
  41. package/assets/{clock-387PxsmY.js → clock-CzLodk_r.js} +1 -1
  42. package/assets/{close-D0LMm88M.js → close-BuQlpuUL.js} +1 -1
  43. package/assets/{coinPlaceholder-Cdiy7WQ9.js → coinPlaceholder-B2Z6-yue.js} +1 -1
  44. package/assets/common-CntYndrk.js +1 -0
  45. package/assets/{compass-xvmPd5Bk.js → compass-CZUlvUVM.js} +1 -1
  46. package/assets/controller-BtDVd_aq.js +2 -0
  47. package/assets/{copy-tEDMw0ts.js → copy-DJv2Nr5v.js} +1 -1
  48. package/assets/{core-DZHcmbWo.js → core-C4Q-G7Te.js} +18 -18
  49. package/assets/createBundlerClient-Br8fYUWc.js +4 -0
  50. package/assets/createClient-C3MOjVgY.js +1 -0
  51. package/assets/{cursor-BpAKVyKK.js → cursor-K6zf8P8P.js} +1 -1
  52. package/assets/{cursor-transparent-B1Td-8Bz.js → cursor-transparent-BEmzJfXZ.js} +1 -1
  53. package/assets/decimals-BZqhR7BL.js +1 -0
  54. package/assets/decimals-CfK2GdYT.js +1 -0
  55. package/assets/{desktop-S18Xoso6.js → desktop-CR4ncbsC.js} +1 -1
  56. package/assets/detectExtension-DQJnzr-F.js +1 -0
  57. package/assets/{disconnect-C3xgypr6.js → disconnect-Cxy_6Sd8.js} +1 -1
  58. package/assets/{discord-CRIf-UbF.js → discord-CJNZyUSm.js} +1 -1
  59. package/assets/{emotion-react.browser.esm-DjDb7r_w.js → emotion-react.browser.esm-IRopa27p.js} +1 -1
  60. package/assets/{emotion-use-insertion-effect-with-fallbacks.browser.esm-DBmkeYb9.js → emotion-use-insertion-effect-with-fallbacks.browser.esm-Dek7Kpe6.js} +1 -1
  61. package/assets/engine-mOtmwA6L.js +1 -0
  62. package/assets/estimate-l1-fee-k8yGsKsO.js +1 -0
  63. package/assets/eth_estimateGas-CmhCqkRZ.js +1 -0
  64. package/assets/eth_getStorageAt-CGBucoOx.js +1 -0
  65. package/assets/eth_getTransactionCount-y2QsTvLw.js +1 -0
  66. package/assets/ethereum-S-w-_MII.js +1 -0
  67. package/assets/{etherscan-mm8HK-MJ.js → etherscan-b5mqHDR2.js} +1 -1
  68. package/assets/{exclamation-triangle-UYV6Y1Va.js → exclamation-triangle-Bg5fRZpy.js} +1 -1
  69. package/assets/{extension-CTdGtFN8.js → extension-D1_3D1KE.js} +1 -1
  70. package/assets/{external-link-BIdf4QIt.js → external-link-DUCz1m1z.js} +1 -1
  71. package/assets/extractIPFS-BeKSWGjo.js +1 -0
  72. package/assets/{facebook-KLMkQcpc.js → facebook-CvV-xdYv.js} +1 -1
  73. package/assets/{farcaster-k2jIQRW1.js → farcaster-DMlzK8Ar.js} +1 -1
  74. package/assets/fetchTokenMetadata-C4NefnOo.js +2 -0
  75. package/assets/{filters-tFXMsiT4.js → filters-DHyStwez.js} +1 -1
  76. package/assets/get-ecosystem-wallet-info-CbWTwKG3.js +1 -0
  77. package/assets/getBalance-D8M0DbBu.js +1 -0
  78. package/assets/getInstalledModules-BurEvMNK.js +1 -0
  79. package/assets/getNFT-CH18R735.js +1 -0
  80. package/assets/getNFT-DQZppzzw.js +2 -0
  81. package/assets/{github-B8LffamD.js → github-IilSsxgO.js} +1 -1
  82. package/assets/{google-CQkBuKjh.js → google-CCs_wu3I.js} +1 -1
  83. package/assets/{help-circle-BDk2gtpm.js → help-circle-D_kmea0Q.js} +1 -1
  84. package/assets/{hooks.module-Dz_XB4AG.js → hooks.module-Cpp96UEK.js} +1 -1
  85. package/assets/{id-J2WK83st.js → id-CEDDxPyO.js} +1 -1
  86. package/assets/image--EMjkbyZ.js +1 -0
  87. package/assets/image--O11VYbP.js +1 -0
  88. package/assets/image--fcqsYch.js +1 -0
  89. package/assets/image-1-dOu4Yt.js +1 -0
  90. package/assets/image-139plIjh.js +1 -0
  91. package/assets/image-1epPqHV4.js +1 -0
  92. package/assets/image-29vwsAfI.js +1 -0
  93. package/assets/image-2s8lIjLJ.js +1 -0
  94. package/assets/image-2wmDBIB6.js +1 -0
  95. package/assets/image-3-p5LJAk.js +1 -0
  96. package/assets/image-3Q7PfsJG.js +1 -0
  97. package/assets/image-4bx5chOJ.js +1 -0
  98. package/assets/image-5CGX_QL3.js +1 -0
  99. package/assets/image-5QXPaavh.js +1 -0
  100. package/assets/image-5mReG_-1.js +1 -0
  101. package/assets/image-5xiz28Wo.js +1 -0
  102. package/assets/image-6levnvAC.js +1 -0
  103. package/assets/image-6ouyxZRt.js +1 -0
  104. package/assets/image-8DkN4eFx.js +1 -0
  105. package/assets/image-8LnJ1bNt.js +1 -0
  106. package/assets/image-8Zz6I0OH.js +1 -0
  107. package/assets/image-8r04P3UP.js +1 -0
  108. package/assets/image-8u03hBEl.js +1 -0
  109. package/assets/image-8vXf4Xjy.js +1 -0
  110. package/assets/image-9509MPsE.js +1 -0
  111. package/assets/image-9BTuaiXb.js +1 -0
  112. package/assets/image-9Jtg22X3.js +1 -0
  113. package/assets/image-AlOoIjkb.js +1 -0
  114. package/assets/image-Atwyf6cQ.js +1 -0
  115. package/assets/image-B-l20wIO.js +1 -0
  116. package/assets/image-B02ECgsY.js +1 -0
  117. package/assets/image-B14TCFf5.js +1 -0
  118. package/assets/image-B3lDLhwe.js +1 -0
  119. package/assets/image-B3sWXgWp.js +1 -0
  120. package/assets/image-B4MULACL.js +1 -0
  121. package/assets/image-B5M2ftPa.js +1 -0
  122. package/assets/image-B5ZxW0VG.js +1 -0
  123. package/assets/image-B6SAWLjq.js +1 -0
  124. package/assets/image-B6VmDbM6.js +1 -0
  125. package/assets/image-B6ncW7rJ.js +1 -0
  126. package/assets/image-B6woX8-F.js +1 -0
  127. package/assets/image-B7QIFAir.js +1 -0
  128. package/assets/image-B7h27Vsd.js +1 -0
  129. package/assets/image-BAS5CqSz.js +1 -0
  130. package/assets/image-BAl5qyeX.js +1 -0
  131. package/assets/image-BBFbQZtc.js +1 -0
  132. package/assets/image-BBZFtk5k.js +1 -0
  133. package/assets/image-BBez6ov1.js +1 -0
  134. package/assets/image-BBk5bBxJ.js +1 -0
  135. package/assets/image-BCXqBewH.js +1 -0
  136. package/assets/image-BDOqiI6p.js +1 -0
  137. package/assets/image-BFzDP99B.js +1 -0
  138. package/assets/image-BGSprUxs.js +1 -0
  139. package/assets/image-BGZ2pFmO.js +1 -0
  140. package/assets/image-BGxqJH7c.js +1 -0
  141. package/assets/image-BH6pi8gb.js +1 -0
  142. package/assets/image-BHJFFIIN.js +1 -0
  143. package/assets/image-BI-5Z38o.js +1 -0
  144. package/assets/image-BI8lK7Gl.js +1 -0
  145. package/assets/image-BIDqxk8w.js +1 -0
  146. package/assets/image-BIIaxSfC.js +1 -0
  147. package/assets/image-BJAlBW3-.js +1 -0
  148. package/assets/image-BJ_lqI1X.js +1 -0
  149. package/assets/image-BJbq9ykO.js +1 -0
  150. package/assets/image-BKNtkg6s.js +1 -0
  151. package/assets/image-BKSQyIc5.js +1 -0
  152. package/assets/image-BKjOwOZU.js +1 -0
  153. package/assets/image-BMgLTkFN.js +1 -0
  154. package/assets/image-BMh4HSr7.js +1 -0
  155. package/assets/image-BN4ovMrn.js +1 -0
  156. package/assets/image-BNA4BP9T.js +1 -0
  157. package/assets/image-BNvlqRxs.js +1 -0
  158. package/assets/image-BOJcifnx.js +1 -0
  159. package/assets/image-BP17CoHz.js +1 -0
  160. package/assets/image-BP2Ox9Qn.js +1 -0
  161. package/assets/image-BPAkEl8k.js +1 -0
  162. package/assets/image-BPqXYngz.js +1 -0
  163. package/assets/image-BQTKy54v.js +1 -0
  164. package/assets/image-BQUnnXTb.js +1 -0
  165. package/assets/image-BQXnGJhx.js +1 -0
  166. package/assets/image-BQcTbEVl.js +1 -0
  167. package/assets/image-BRPzDWpX.js +1 -0
  168. package/assets/image-BSLjXnNe.js +1 -0
  169. package/assets/image-BTZyVpoA.js +1 -0
  170. package/assets/image-BULUy74S.js +1 -0
  171. package/assets/image-BUsH-M52.js +1 -0
  172. package/assets/image-BVO9IT_6.js +1 -0
  173. package/assets/image-BX4sAPzh.js +1 -0
  174. package/assets/image-BXzPnbc4.js +1 -0
  175. package/assets/image-BYUgGshq.js +1 -0
  176. package/assets/image-B_0Cqkss.js +1 -0
  177. package/assets/image-B_AAvjJY.js +1 -0
  178. package/assets/image-B_ozWfd0.js +1 -0
  179. package/assets/image-BaRuJqy0.js +1 -0
  180. package/assets/image-BanazMP9.js +1 -0
  181. package/assets/image-Bb4ZLG-2.js +1 -0
  182. package/assets/image-BbH7e9pw.js +1 -0
  183. package/assets/image-BbeMBRJP.js +1 -0
  184. package/assets/image-BbwfB3J_.js +1 -0
  185. package/assets/image-BcNLqzB4.js +1 -0
  186. package/assets/image-BcfiUDv-.js +1 -0
  187. package/assets/image-BdJA4XzW.js +1 -0
  188. package/assets/image-BdLvgjKp.js +1 -0
  189. package/assets/image-BdqmMP8T.js +1 -0
  190. package/assets/image-Bdtwdp85.js +1 -0
  191. package/assets/image-BfGkQCHU.js +1 -0
  192. package/assets/image-BfmBx3-B.js +1 -0
  193. package/assets/image-BhECDi_9.js +1 -0
  194. package/assets/image-BhmKXBqm.js +1 -0
  195. package/assets/image-Bi1elmSL.js +1 -0
  196. package/assets/image-BjFjHCOg.js +1 -0
  197. package/assets/image-BjKXKIhU.js +1 -0
  198. package/assets/image-BjTMD2k8.js +1 -0
  199. package/assets/image-BkKo9DtA.js +1 -0
  200. package/assets/image-Bkj-ZRbS.js +1 -0
  201. package/assets/image-Bktw-NJ-.js +1 -0
  202. package/assets/image-BlZLdRma.js +1 -0
  203. package/assets/image-BlogSp8o.js +1 -0
  204. package/assets/image-Bm-o9RF3.js +1 -0
  205. package/assets/image-Bn2sAgXJ.js +1 -0
  206. package/assets/image-BnT6IaIq.js +1 -0
  207. package/assets/image-BnXzDKuV.js +1 -0
  208. package/assets/image-BnYtBA0B.js +1 -0
  209. package/assets/image-Bo8CHmCG.js +1 -0
  210. package/assets/image-BoANtDMS.js +1 -0
  211. package/assets/image-BoS2kgXC.js +1 -0
  212. package/assets/image-BocNs9ze.js +1 -0
  213. package/assets/image-Bq1UxveY.js +1 -0
  214. package/assets/image-BqQffU2u.js +1 -0
  215. package/assets/image-BqmT5urK.js +1 -0
  216. package/assets/image-BqtrMo-7.js +1 -0
  217. package/assets/image-BsQYdoXP.js +1 -0
  218. package/assets/image-BstOz2Sd.js +1 -0
  219. package/assets/image-Bsv1aEQB.js +1 -0
  220. package/assets/image-BszqTwo7.js +1 -0
  221. package/assets/image-BtnrRGhZ.js +1 -0
  222. package/assets/image-BuqgjEJD.js +1 -0
  223. package/assets/image-Bv8VGwx8.js +1 -0
  224. package/assets/image-BvEJhPGs.js +1 -0
  225. package/assets/image-BvJKCSpY.js +1 -0
  226. package/assets/image-BvkSxpXq.js +1 -0
  227. package/assets/image-Bvw8wNRu.js +1 -0
  228. package/assets/image-BwBO8BTi.js +1 -0
  229. package/assets/image-BwjeUYie.js +1 -0
  230. package/assets/image-Bx8ULApC.js +1 -0
  231. package/assets/image-Bx8buncY.js +1 -0
  232. package/assets/image-BxeDPEwg.js +1 -0
  233. package/assets/image-BxfO9qDl.js +1 -0
  234. package/assets/image-ByHnaba8.js +1 -0
  235. package/assets/image-Bz03or90.js +1 -0
  236. package/assets/image-BzGwleUn.js +1 -0
  237. package/assets/image-C1w2WpL5.js +1 -0
  238. package/assets/image-C2QANSRr.js +1 -0
  239. package/assets/image-C2Wl7RAy.js +1 -0
  240. package/assets/image-C3Va51zP.js +1 -0
  241. package/assets/image-C46yxCl4.js +1 -0
  242. package/assets/image-C4ELurjg.js +1 -0
  243. package/assets/image-C4KoLZ1v.js +1 -0
  244. package/assets/image-C4hEqt6v.js +1 -0
  245. package/assets/image-C6EsuPXB.js +1 -0
  246. package/assets/image-C6LRjQzh.js +1 -0
  247. package/assets/image-C6NJnfCW.js +1 -0
  248. package/assets/image-C6QSWUy4.js +1 -0
  249. package/assets/image-C6aZzydG.js +1 -0
  250. package/assets/image-C6ewnpHo.js +1 -0
  251. package/assets/image-C7H4CQ65.js +1 -0
  252. package/assets/image-C7tHBnQp.js +1 -0
  253. package/assets/image-C8_9fy1e.js +1 -0
  254. package/assets/image-CAIffJi4.js +1 -0
  255. package/assets/image-CC2_AL18.js +1 -0
  256. package/assets/image-CCDmsN6r.js +1 -0
  257. package/assets/image-CCgX-pcz.js +1 -0
  258. package/assets/image-CD3he1Tj.js +1 -0
  259. package/assets/image-CE6B5igp.js +1 -0
  260. package/assets/image-CECsJh3H.js +1 -0
  261. package/assets/image-CEuSmI3b.js +1 -0
  262. package/assets/image-CGobRsqC.js +1 -0
  263. package/assets/image-CHotlokX.js +1 -0
  264. package/assets/image-CI3i53ES.js +1 -0
  265. package/assets/image-CIhcwJo_.js +1 -0
  266. package/assets/image-CJb0NNxX.js +1 -0
  267. package/assets/image-CLUlwzEU.js +1 -0
  268. package/assets/image-CMJsc-Ir.js +1 -0
  269. package/assets/image-COKP1J8V.js +1 -0
  270. package/assets/image-COnY36UD.js +1 -0
  271. package/assets/image-COwCE3RO.js +1 -0
  272. package/assets/image-CPMDxql6.js +1 -0
  273. package/assets/image-CPrfOTN2.js +1 -0
  274. package/assets/image-CQKjvlto.js +1 -0
  275. package/assets/image-CQm90J-d.js +1 -0
  276. package/assets/image-CRU88082.js +1 -0
  277. package/assets/image-CRsMfPT0.js +1 -0
  278. package/assets/image-CSAN5rKt.js +1 -0
  279. package/assets/image-CSyxcTwp.js +1 -0
  280. package/assets/image-CTAbQz5j.js +1 -0
  281. package/assets/image-CTBdimeM.js +1 -0
  282. package/assets/image-CTLwieHz.js +1 -0
  283. package/assets/image-CTsHGgDx.js +1 -0
  284. package/assets/image-CUFBkGzy.js +1 -0
  285. package/assets/image-CUPOo6zK.js +1 -0
  286. package/assets/image-CVAbhfmI.js +1 -0
  287. package/assets/image-CVBI4BwD.js +1 -0
  288. package/assets/image-CVPmP4Bl.js +1 -0
  289. package/assets/image-CVrpZdwi.js +1 -0
  290. package/assets/image-CWCOKSln.js +1 -0
  291. package/assets/image-CWG4tRzZ.js +1 -0
  292. package/assets/image-CXpsLPxr.js +1 -0
  293. package/assets/image-CYFfk7g3.js +1 -0
  294. package/assets/image-CZ2qSHpt.js +1 -0
  295. package/assets/image-CZ9z1ucT.js +1 -0
  296. package/assets/image-CZLdphQJ.js +1 -0
  297. package/assets/image-C_JPqQZj.js +1 -0
  298. package/assets/image-C_rXI8lY.js +1 -0
  299. package/assets/image-CaBQfcNB.js +1 -0
  300. package/assets/image-CaHdVXd1.js +1 -0
  301. package/assets/{image-uj79OUC9.js → image-CacISnw5.js} +1 -1
  302. package/assets/image-CaoCxndE.js +1 -0
  303. package/assets/image-CaqftHzf.js +1 -0
  304. package/assets/image-CawBnBIo.js +1 -0
  305. package/assets/image-CbmAI5Wi.js +1 -0
  306. package/assets/image-CbnSXqJS.js +1 -0
  307. package/assets/image-Cc6jyxLi.js +1 -0
  308. package/assets/image-CcKS-8-S.js +1 -0
  309. package/assets/image-CcPbeTXv.js +1 -0
  310. package/assets/image-Ccx8wDSE.js +1 -0
  311. package/assets/image-CdGvq_lV.js +1 -0
  312. package/assets/image-CfglWSsQ.js +1 -0
  313. package/assets/image-CgHABHdL.js +1 -0
  314. package/assets/image-CgzMLfDa.js +1 -0
  315. package/assets/image-ChDeiuh7.js +1 -0
  316. package/assets/image-Chg2WzE1.js +1 -0
  317. package/assets/image-Ci0UFTFy.js +1 -0
  318. package/assets/image-CirJIT7l.js +1 -0
  319. package/assets/image-CisWvLpc.js +1 -0
  320. package/assets/image-Ck2fht2U.js +1 -0
  321. package/assets/image-CkQb0YUH.js +1 -0
  322. package/assets/image-CkSdZpFq.js +1 -0
  323. package/assets/image-CljvD_on.js +1 -0
  324. package/assets/image-ClyvBbEv.js +1 -0
  325. package/assets/image-CmVMIVLM.js +1 -0
  326. package/assets/image-CmWdSXJI.js +1 -0
  327. package/assets/image-CmkiYZaU.js +1 -0
  328. package/assets/image-CmrOpLf4.js +1 -0
  329. package/assets/image-CmzmxiTz.js +1 -0
  330. package/assets/image-CnDG0aor.js +1 -0
  331. package/assets/image-Co9P7WAh.js +1 -0
  332. package/assets/image-Covp72ND.js +1 -0
  333. package/assets/image-CpFHTO_m.js +1 -0
  334. package/assets/image-Cq54pcgl.js +1 -0
  335. package/assets/image-CqLwuE__.js +1 -0
  336. package/assets/image-Crp2YP47.js +1 -0
  337. package/assets/image-CruMo9Ar.js +1 -0
  338. package/assets/image-Cs2bevZt.js +1 -0
  339. package/assets/image-CsH_NRy-.js +1 -0
  340. package/assets/image-CsNgSbbt.js +1 -0
  341. package/assets/image-CsTNl20e.js +1 -0
  342. package/assets/image-CsUCYFyx.js +1 -0
  343. package/assets/image-CsmwtAjX.js +1 -0
  344. package/assets/image-CtZg2vKX.js +1 -0
  345. package/assets/image-CtiFcEL8.js +1 -0
  346. package/assets/image-CwDXHpUj.js +1 -0
  347. package/assets/image-CwaGmiHI.js +1 -0
  348. package/assets/image-Cwg1QVuh.js +1 -0
  349. package/assets/image-CwsKp0mM.js +1 -0
  350. package/assets/image-CxvWjDXv.js +1 -0
  351. package/assets/image-CxyHP7w7.js +1 -0
  352. package/assets/image-Cy0vmJls.js +1 -0
  353. package/assets/image-CyE6Mi3e.js +1 -0
  354. package/assets/image-CyF2UJbG.js +1 -0
  355. package/assets/image-CyLv-qKv.js +1 -0
  356. package/assets/image-CyezMyAx.js +1 -0
  357. package/assets/image-CypdirPa.js +1 -0
  358. package/assets/image-Cyu_SKNX.js +1 -0
  359. package/assets/image-Cyy1KupU.js +1 -0
  360. package/assets/image-CzKmxeZp.js +1 -0
  361. package/assets/image-CzL8n4ZU.js +1 -0
  362. package/assets/image-D13kcv8b.js +1 -0
  363. package/assets/image-D1eN-vq9.js +1 -0
  364. package/assets/image-D1qvgd7h.js +1 -0
  365. package/assets/image-D2051qUc.js +1 -0
  366. package/assets/image-D2QL-j27.js +1 -0
  367. package/assets/image-D3ALeCj7.js +1 -0
  368. package/assets/image-D3VAu6BC.js +1 -0
  369. package/assets/image-D3tLM-DF.js +1 -0
  370. package/assets/image-D3z3GjMO.js +1 -0
  371. package/assets/image-D4-YMi52.js +1 -0
  372. package/assets/image-D4PYvYqY.js +1 -0
  373. package/assets/image-D4nkyGrg.js +1 -0
  374. package/assets/image-D55LvXjp.js +1 -0
  375. package/assets/image-D5wxf47e.js +1 -0
  376. package/assets/image-D6x5dtDG.js +1 -0
  377. package/assets/image-D7P0qSfx.js +1 -0
  378. package/assets/image-D7Sd6W8U.js +1 -0
  379. package/assets/image-D7wXb0Un.js +1 -0
  380. package/assets/image-D8ARN-Gu.js +1 -0
  381. package/assets/image-D8scG8aP.js +1 -0
  382. package/assets/image-D9OC6Qfy.js +1 -0
  383. package/assets/image-D9i7y0RW.js +1 -0
  384. package/assets/image-DA8Sg5HZ.js +1 -0
  385. package/assets/image-DBFrM6tr.js +1 -0
  386. package/assets/image-DBehogZh.js +1 -0
  387. package/assets/image-DC2DOoz2.js +1 -0
  388. package/assets/image-DC9Wj56E.js +1 -0
  389. package/assets/image-DDBzbPSl.js +1 -0
  390. package/assets/image-DDUR5y02.js +1 -0
  391. package/assets/image-DDso8kuB.js +1 -0
  392. package/assets/image-DETlLb_v.js +1 -0
  393. package/assets/image-DFF2Z6Pk.js +1 -0
  394. package/assets/image-DFYGQEwh.js +1 -0
  395. package/assets/image-DFYwzuHA.js +1 -0
  396. package/assets/image-DFf3lDA_.js +1 -0
  397. package/assets/image-DFo7XMVJ.js +1 -0
  398. package/assets/image-DGLcwgsS.js +1 -0
  399. package/assets/image-DGhNZ1rS.js +1 -0
  400. package/assets/image-DH5ootHk.js +1 -0
  401. package/assets/image-DHHZDLK-.js +1 -0
  402. package/assets/image-DHnnMCFG.js +1 -0
  403. package/assets/image-DIDeRhKH.js +1 -0
  404. package/assets/image-DJLc6AlW.js +1 -0
  405. package/assets/image-DJYKaoNi.js +1 -0
  406. package/assets/image-DKBlkqWK.js +1 -0
  407. package/assets/image-DKcWaLtu.js +1 -0
  408. package/assets/image-DLiMUWBI.js +1 -0
  409. package/assets/image-DLtkWmCC.js +1 -0
  410. package/assets/image-DLvMDcgw.js +1 -0
  411. package/assets/image-DLwHWQ4l.js +1 -0
  412. package/assets/image-DMTT8AeN.js +1 -0
  413. package/assets/image-DNtaIeSw.js +1 -0
  414. package/assets/image-DNyYhMNV.js +1 -0
  415. package/assets/image-DOcz3CQ4.js +1 -0
  416. package/assets/image-DOwBqPVS.js +1 -0
  417. package/assets/image-DPzEe6a_.js +1 -0
  418. package/assets/image-DQzzFCs2.js +1 -0
  419. package/assets/image-DRpXk5be.js +1 -0
  420. package/assets/image-DRqNpoe6.js +1 -0
  421. package/assets/image-DSGxNIm1.js +1 -0
  422. package/assets/image-DT5Fvf2s.js +1 -0
  423. package/assets/image-DTa4RXUa.js +1 -0
  424. package/assets/image-DTy0DgOV.js +1 -0
  425. package/assets/image-DUcJQ0b3.js +1 -0
  426. package/assets/image-DUk3AUBd.js +1 -0
  427. package/assets/image-DUs_WIFe.js +1 -0
  428. package/assets/image-DVyDRAAO.js +1 -0
  429. package/assets/image-DWR067hG.js +1 -0
  430. package/assets/image-DZ-B-aVa.js +1 -0
  431. package/assets/image-DZc2BYzk.js +1 -0
  432. package/assets/image-DZpGtN5l.js +1 -0
  433. package/assets/image-DZplWZyD.js +1 -0
  434. package/assets/image-D_0i3ZH4.js +1 -0
  435. package/assets/image-D_cIj1db.js +1 -0
  436. package/assets/image-D_i0o0Nv.js +1 -0
  437. package/assets/image-Da2xkAVi.js +1 -0
  438. package/assets/image-DaaIjpQJ.js +1 -0
  439. package/assets/image-DaxrbegS.js +1 -0
  440. package/assets/image-DbBiNCFK.js +1 -0
  441. package/assets/image-DbpOM2LD.js +1 -0
  442. package/assets/image-Dc5zhKf6.js +1 -0
  443. package/assets/image-DcIu3U38.js +1 -0
  444. package/assets/image-DcM8byf5.js +1 -0
  445. package/assets/image-DcX8AUYd.js +1 -0
  446. package/assets/image-DdicXBNF.js +1 -0
  447. package/assets/image-De2xpum1.js +1 -0
  448. package/assets/image-DecSbpNG.js +1 -0
  449. package/assets/image-DesBMjvP.js +1 -0
  450. package/assets/image-Dfhapk7_.js +1 -0
  451. package/assets/image-DfzpWAED.js +1 -0
  452. package/assets/image-DgU8tR58.js +1 -0
  453. package/assets/image-Dgb3Vdrr.js +1 -0
  454. package/assets/image-DgkgLcDL.js +1 -0
  455. package/assets/image-Dh9w9A8z.js +1 -0
  456. package/assets/image-DhOOZChF.js +1 -0
  457. package/assets/image-DjXN5hvv.js +1 -0
  458. package/assets/image-Dkp4M1ik.js +1 -0
  459. package/assets/image-DmNOl1OW.js +1 -0
  460. package/assets/image-DmhgJWq-.js +1 -0
  461. package/assets/image-Dmp2jTO0.js +1 -0
  462. package/assets/image-Do8rO3zE.js +1 -0
  463. package/assets/image-DooF_Vfs.js +1 -0
  464. package/assets/image-DpGIEKrK.js +1 -0
  465. package/assets/image-DpHbdMp9.js +1 -0
  466. package/assets/image-DpeCw-px.js +1 -0
  467. package/assets/image-Dpgf4dcg.js +1 -0
  468. package/assets/image-DpjDzWCs.js +1 -0
  469. package/assets/image-DqH_Lyo9.js +1 -0
  470. package/assets/image-Dqbrewdt.js +1 -0
  471. package/assets/image-DrH3Wn2w.js +1 -0
  472. package/assets/image-DrHhCSDD.js +1 -0
  473. package/assets/image-DrobCWF2.js +1 -0
  474. package/assets/image-DrraBYJZ.js +1 -0
  475. package/assets/image-Ds78yECl.js +1 -0
  476. package/assets/image-DsOpF0U0.js +1 -0
  477. package/assets/image-Dtc98pdf.js +1 -0
  478. package/assets/image-DuQoo_kR.js +1 -0
  479. package/assets/image-Duck5tqn.js +1 -0
  480. package/assets/image-DvpdMMzF.js +1 -0
  481. package/assets/image-DwUGDFj5.js +1 -0
  482. package/assets/image-Dx4ya6_y.js +1 -0
  483. package/assets/image-DyrMImIL.js +1 -0
  484. package/assets/image-Dz82Zyfj.js +1 -0
  485. package/assets/image-DzJAqGfB.js +1 -0
  486. package/assets/image-DzLDqqsm.js +1 -0
  487. package/assets/image-E3PT44xu.js +1 -0
  488. package/assets/image-EUVXQieb.js +1 -0
  489. package/assets/image-ExeF69qZ.js +1 -0
  490. package/assets/image-EyKsXf_1.js +1 -0
  491. package/assets/image-FnAIuX7S.js +1 -0
  492. package/assets/image-Fq457JJn.js +1 -0
  493. package/assets/image-HcidEyjv.js +1 -0
  494. package/assets/image-IpgDqPq2.js +1 -0
  495. package/assets/image-JIl7mHMQ.js +1 -0
  496. package/assets/image-JyGUnQ_N.js +1 -0
  497. package/assets/image-K1HoU8Qi.js +1 -0
  498. package/assets/image-LfonVSeq.js +1 -0
  499. package/assets/image-M7TV7WaH.js +1 -0
  500. package/assets/image-MGwelZJS.js +1 -0
  501. package/assets/image-MQbcgW7z.js +1 -0
  502. package/assets/image-M_AWRaKs.js +1 -0
  503. package/assets/image-Mf3UQvEC.js +1 -0
  504. package/assets/image-Npe5Xkhl.js +1 -0
  505. package/assets/image-NsVKBwxZ.js +1 -0
  506. package/assets/image-OT0Fb2Nb.js +1 -0
  507. package/assets/image-On2ij4Ix.js +1 -0
  508. package/assets/image-OrIz0o8m.js +1 -0
  509. package/assets/image-PWpnYSKI.js +1 -0
  510. package/assets/image-SJHuomz2.js +1 -0
  511. package/assets/image-Sy6X7CtO.js +1 -0
  512. package/assets/image-T2oAotCg.js +1 -0
  513. package/assets/image-TA_PkYBz.js +1 -0
  514. package/assets/image-TQ3Nh_VF.js +1 -0
  515. package/assets/image-TQLBEOIW.js +1 -0
  516. package/assets/image-UFnS_pK0.js +1 -0
  517. package/assets/image-V4qYiUxw.js +1 -0
  518. package/assets/image-VFWT6oS6.js +1 -0
  519. package/assets/image-VlTaWJmy.js +1 -0
  520. package/assets/image-VxDqDj0T.js +1 -0
  521. package/assets/image-W-Y_Nm-s.js +1 -0
  522. package/assets/image-W5rUOVDT.js +1 -0
  523. package/assets/image-W7SfqKZe.js +1 -0
  524. package/assets/image-WbOd8jAJ.js +1 -0
  525. package/assets/image-Xfz-LkLu.js +1 -0
  526. package/assets/image-YbQrvLSP.js +1 -0
  527. package/assets/image-YhquT9-B.js +1 -0
  528. package/assets/image-YzdSnFCd.js +1 -0
  529. package/assets/image-Z9k3mhsb.js +1 -0
  530. package/assets/image-ZLtraAGN.js +1 -0
  531. package/assets/image-ZVoqlWXW.js +1 -0
  532. package/assets/image-Zh059TUR.js +1 -0
  533. package/assets/image-ZwibGfzR.js +1 -0
  534. package/assets/image-_t2-K1ZP.js +1 -0
  535. package/assets/image-bHJO6btW.js +1 -0
  536. package/assets/image-bHVCC2t9.js +1 -0
  537. package/assets/image-bSOL4gQb.js +1 -0
  538. package/assets/image-bpacFMFT.js +1 -0
  539. package/assets/image-cDoShVvl.js +1 -0
  540. package/assets/image-cwzgrAkh.js +1 -0
  541. package/assets/image-d8n8A6si.js +1 -0
  542. package/assets/image-dO78_uyn.js +1 -0
  543. package/assets/image-ddsU9gPS.js +1 -0
  544. package/assets/image-fjbgiffe.js +1 -0
  545. package/assets/image-gnC_p3Da.js +1 -0
  546. package/assets/image-gxCVLutB.js +1 -0
  547. package/assets/image-hO8Jv2oh.js +1 -0
  548. package/assets/image-iR_slvRo.js +1 -0
  549. package/assets/image-jv6wUF7a.js +1 -0
  550. package/assets/image-kZBIIBVa.js +1 -0
  551. package/assets/image-lBIlUHFP.js +1 -0
  552. package/assets/image-lOdcUtWG.js +1 -0
  553. package/assets/image-lXBTHYnD.js +1 -0
  554. package/assets/image-m7IlStdm.js +1 -0
  555. package/assets/image-mMy4SSmg.js +1 -0
  556. package/assets/image-nW5JvdXC.js +1 -0
  557. package/assets/image-nqueMEws.js +1 -0
  558. package/assets/image-o3pjQDbu.js +1 -0
  559. package/assets/image-oGFA7lCe.js +1 -0
  560. package/assets/image-oKct0i27.js +1 -0
  561. package/assets/image-pEGSGt6h.js +1 -0
  562. package/assets/image-pKZ5ApxC.js +1 -0
  563. package/assets/image-pcyfaNhf.js +1 -0
  564. package/assets/image-q4XfUN6v.js +1 -0
  565. package/assets/image-qLUwfjzV.js +1 -0
  566. package/assets/image-qsAyF5Oj.js +1 -0
  567. package/assets/image-rAE1A9js.js +1 -0
  568. package/assets/image-rdvu9IOp.js +1 -0
  569. package/assets/image-ripXpF5P.js +1 -0
  570. package/assets/image-rvsWf8U_.js +1 -0
  571. package/assets/image-rw28GAIu.js +1 -0
  572. package/assets/image-sDrIF89f.js +1 -0
  573. package/assets/image-sm-_D7TO.js +1 -0
  574. package/assets/image-ss2LFlQu.js +1 -0
  575. package/assets/image-t4jvKgpV.js +1 -0
  576. package/assets/image-tiHbZ1Vk.js +1 -0
  577. package/assets/image-uGs9mRWl.js +1 -0
  578. package/assets/image-uk4MysVY.js +1 -0
  579. package/assets/image-vXNBwFvw.js +1 -0
  580. package/assets/image-vrSaD0K9.js +1 -0
  581. package/assets/image-vuuCn07N.js +1 -0
  582. package/assets/image-wR942Jk6.js +1 -0
  583. package/assets/image-xJO47ptb.js +1 -0
  584. package/assets/image-xMsS8TDb.js +1 -0
  585. package/assets/image-xaEWk6k8.js +1 -0
  586. package/assets/image-y3eCNAT6.js +1 -0
  587. package/assets/image-zsArRLIF.js +1 -0
  588. package/assets/in-app-wallet-calls-ZBHxiKkB.js +1 -0
  589. package/assets/index--YTVamH2.js +1 -0
  590. package/assets/index--rITGawC.js +1 -0
  591. package/assets/index--t3K2suC.js +1 -0
  592. package/assets/index-0qRtNAQn.js +1 -0
  593. package/assets/index-18L0wZ74.js +1 -0
  594. package/assets/index-1CA6ps09.js +1 -0
  595. package/assets/index-2qmxPQhP.js +1 -0
  596. package/assets/index-3DerMn1X.js +1 -0
  597. package/assets/index-3an-fsOm.js +1 -0
  598. package/assets/index-3d3uK5Ax.js +1 -0
  599. package/assets/index-3jJtZlGN.js +1 -0
  600. package/assets/index-4Nmn8ium.js +1 -0
  601. package/assets/index-4WvPsM5O.js +1 -0
  602. package/assets/index-5IpGHzAv.js +1 -0
  603. package/assets/index-5U2ZJeh5.js +1 -0
  604. package/assets/index-7BdGIDy3.js +1 -0
  605. package/assets/index-7C_yDnI4.js +1 -0
  606. package/assets/index-7Xw6Dozy.js +1 -0
  607. package/assets/index-8Ff6vDUD.js +1 -0
  608. package/assets/index-9552Tb-C.js +1 -0
  609. package/assets/index-9Ml23qSY.js +1 -0
  610. package/assets/index-B-BftUxa.js +1 -0
  611. package/assets/index-B-UTLjBc.js +1 -0
  612. package/assets/index-B-kI7R4f.js +1 -0
  613. package/assets/index-B-oXIR8J.js +1 -0
  614. package/assets/index-B05algAv.js +1 -0
  615. package/assets/index-B062fuzr.js +1 -0
  616. package/assets/index-B1-qcL-p.js +1 -0
  617. package/assets/index-B1XrJIPH.js +1 -0
  618. package/assets/index-B21BIk0D.js +1 -0
  619. package/assets/index-B2WV7sR7.js +1 -0
  620. package/assets/index-B3vR_dtk.js +1 -0
  621. package/assets/index-B51294pb.js +1 -0
  622. package/assets/index-B5AZ3O3C.js +1 -0
  623. package/assets/index-B5BAsv-B.js +1 -0
  624. package/assets/index-B6n-vVE0.js +1 -0
  625. package/assets/index-B6yqoFuC.js +1 -0
  626. package/assets/index-B78E3fcT.js +1 -0
  627. package/assets/index-B7GQyWAF.js +1 -0
  628. package/assets/index-B7dAHFam.js +1 -0
  629. package/assets/index-B8BWAl26.js +1 -0
  630. package/assets/index-B8De2hoC.js +1 -0
  631. package/assets/index-B8SH8PS4.js +1 -0
  632. package/assets/index-B94SpzOt.js +1 -0
  633. package/assets/index-BA0Hn6eE.js +1 -0
  634. package/assets/index-BARF52iT.js +1 -0
  635. package/assets/index-BBANTdk4.js +1 -0
  636. package/assets/index-BBDAdmKp.js +1 -0
  637. package/assets/index-BBiL2lyk.js +1 -0
  638. package/assets/index-BBkeSt5m.js +1 -0
  639. package/assets/index-BDifUsn3.js +1 -0
  640. package/assets/index-BEFk-36A.js +1 -0
  641. package/assets/index-BEXV42kp.js +1 -0
  642. package/assets/index-BEx6ckei.js +1 -0
  643. package/assets/index-BFGXqrJS.js +1 -0
  644. package/assets/index-BFJUkm8C.js +1 -0
  645. package/assets/{index-D6O4pjzC.js → index-BFKCpVu3.js} +1 -1
  646. package/assets/index-BFZxo6Jc.js +1 -0
  647. package/assets/index-BG1ZQeCA.js +1 -0
  648. package/assets/index-BGGk2Hck.js +1 -0
  649. package/assets/index-BH1-nK1j.js +1 -0
  650. package/assets/{index-D5kgbiM5.js → index-BH6zTRml.js} +1 -1
  651. package/assets/index-BHZDuU0I.js +1 -0
  652. package/assets/index-BIFgx20V.js +1 -0
  653. package/assets/index-BILUwmJ9.js +1 -0
  654. package/assets/index-BIXqJF5y.js +1 -0
  655. package/assets/index-BIcsFldg.js +1 -0
  656. package/assets/index-BIeLm-x3.js +1 -0
  657. package/assets/index-BJAcAgB9.js +1 -0
  658. package/assets/index-BJBC3bLU.js +1 -0
  659. package/assets/index-BKN05ia6.js +1 -0
  660. package/assets/index-BKkJhanY.js +1 -0
  661. package/assets/index-BKoDPf_i.js +1 -0
  662. package/assets/index-BLMjeGJ-.js +1 -0
  663. package/assets/index-BLO6pY9b.js +1 -0
  664. package/assets/index-BLsnOBhg.js +1 -0
  665. package/assets/index-BM8c6qO-.js +1 -0
  666. package/assets/index-BM9GzZ_o.js +1 -0
  667. package/assets/index-BMPGw_D6.js +1 -0
  668. package/assets/index-BNlDhEDg.js +1 -0
  669. package/assets/index-BP-yDgcx.js +1 -0
  670. package/assets/index-BP76iXI2.js +1 -0
  671. package/assets/index-BPFXH4g9.js +1 -0
  672. package/assets/index-BPgl8Hhp.js +1 -0
  673. package/assets/index-BQWXi0by.js +1 -0
  674. package/assets/index-BQwDdmmS.js +1 -0
  675. package/assets/index-BRIQuVzg.js +1 -0
  676. package/assets/index-BSA2BPZ9.js +1 -0
  677. package/assets/index-BSdPSW5L.js +2 -0
  678. package/assets/index-BTkNDmCP.js +1 -0
  679. package/assets/index-BTqXeJHf.js +1 -0
  680. package/assets/index-BTzbgIH6.js +1 -0
  681. package/assets/index-BVAmxcaa.js +1 -0
  682. package/assets/index-BVQeUBdj.js +1 -0
  683. package/assets/index-BXOfMki0.js +4 -0
  684. package/assets/index-BXY5tnuK.js +1 -0
  685. package/assets/index-BXZiXU-9.js +1 -0
  686. package/assets/index-BXi61TZ5.js +1 -0
  687. package/assets/index-BXnDDK-y.js +1 -0
  688. package/assets/index-BZUSQkq9.js +1 -0
  689. package/assets/index-BZhX-e71.js +1 -0
  690. package/assets/index-BZwq4W5O.js +1 -0
  691. package/assets/index-B_OXuBhF.js +1 -0
  692. package/assets/index-Ba2OoCBH.js +1 -0
  693. package/assets/index-Ba45jQBJ.js +1 -0
  694. package/assets/index-Ba7PpD6d.js +1 -0
  695. package/assets/index-Bap5Lkty.js +1 -0
  696. package/assets/index-Bbv-4GNB.js +1 -0
  697. package/assets/index-Bbznecif.js +1 -0
  698. package/assets/index-Bd7BhrCK.js +1 -0
  699. package/assets/index-BdgyG9Qa.js +1 -0
  700. package/assets/index-BdkJrfxl.js +1 -0
  701. package/assets/index-BfYVYwh5.js +1 -0
  702. package/assets/index-BftqI1FU.js +1 -0
  703. package/assets/index-BgECKCj8.js +1 -0
  704. package/assets/index-BgbYZOnC.js +1 -0
  705. package/assets/index-Bh8eOJMM.js +1 -0
  706. package/assets/index-BiHhxeDt.js +1 -0
  707. package/assets/index-Bk-uZV0j.js +1 -0
  708. package/assets/index-BkM7PWkU.js +1 -0
  709. package/assets/index-Bl6ScMn3.js +1 -0
  710. package/assets/index-BlU4B6pe.js +1 -0
  711. package/assets/{index-DDOU1_kc.js → index-Bm1VTLe0.js} +1 -1
  712. package/assets/index-Bm92iZMY.js +1 -0
  713. package/assets/index-BmKJ1abQ.js +1 -0
  714. package/assets/index-BmXd0pys.js +1 -0
  715. package/assets/index-BmwlJTQ-.js +1 -0
  716. package/assets/index-BnsE1W-S.js +1 -0
  717. package/assets/index-BoC-cn90.js +1 -0
  718. package/assets/index-BoCHG1VO.js +1 -0
  719. package/assets/index-BoJGVmma.js +1 -0
  720. package/assets/index-BogX5ITG.js +1 -0
  721. package/assets/index-Bprjmfje.js +1 -0
  722. package/assets/index-BpspMk9l.js +1 -0
  723. package/assets/index-BqK7Phb6.js +1 -0
  724. package/assets/index-BqLb859N.js +1 -0
  725. package/assets/index-BqxSKkSq.js +1 -0
  726. package/assets/index-BrOCsLbf.js +1 -0
  727. package/assets/index-BrvgJVgh.js +1 -0
  728. package/assets/index-BtBx3hi1.js +1 -0
  729. package/assets/index-BtZsXMJj.js +1 -0
  730. package/assets/index-BtfbjCVr.js +1 -0
  731. package/assets/index-BuSavAVK.js +1 -0
  732. package/assets/index-BuWGQyCe.js +1 -0
  733. package/assets/index-BuhGQjsZ.js +1 -0
  734. package/assets/index-BwCUvEoQ.js +1 -0
  735. package/assets/index-BwL47YsA.js +1 -0
  736. package/assets/index-Bwjy4Jw7.js +1 -0
  737. package/assets/index-Bx9srovK.js +1 -0
  738. package/assets/index-BxqRct_I.js +1 -0
  739. package/assets/index-BxtNhRvf.js +1 -0
  740. package/assets/index-BzNpkHfI.js +1 -0
  741. package/assets/index-BzfyCotn.js +1 -0
  742. package/assets/index-C-A1j44m.js +1 -0
  743. package/assets/index-C-OT0KJG.js +1 -0
  744. package/assets/index-C-b1qpM9.js +1 -0
  745. package/assets/index-C0HCn7GN.js +1 -0
  746. package/assets/index-C0I75rp3.js +1 -0
  747. package/assets/index-C1a5oPtZ.js +1 -0
  748. package/assets/index-C1adBKyv.js +1 -0
  749. package/assets/index-C2CZkwuV.js +1 -0
  750. package/assets/index-C2KnoZm4.js +1 -0
  751. package/assets/index-C5NL4PoV.js +1 -0
  752. package/assets/index-C5X26G0P.js +1 -0
  753. package/assets/index-C5ZfEOey.js +1 -0
  754. package/assets/index-C5gBqe1B.js +1 -0
  755. package/assets/index-C63hJ0G0.js +1 -0
  756. package/assets/index-C6EDKfcJ.js +1 -0
  757. package/assets/index-C6baQHax.js +1 -0
  758. package/assets/index-C6d9DLRH.js +1 -0
  759. package/assets/index-C7HuhgLE.js +1 -0
  760. package/assets/index-C7N44kNF.js +1 -0
  761. package/assets/index-C7WD5W_Z.js +1 -0
  762. package/assets/index-C7njqxXR.js +1 -0
  763. package/assets/index-C8AQSvJD.js +1 -0
  764. package/assets/index-C8VMxu1Z.js +1 -0
  765. package/assets/index-C8mAROh2.js +1 -0
  766. package/assets/index-C91aPf2g.js +1 -0
  767. package/assets/index-C93NlSEw.js +1 -0
  768. package/assets/index-C9taR4Do.js +1 -0
  769. package/assets/index-CAYpPiIA.js +1 -0
  770. package/assets/index-CAfHv9Ye.js +1 -0
  771. package/assets/index-CBVJzm96.js +1 -0
  772. package/assets/index-CB_NguTF.js +1 -0
  773. package/assets/index-CCIAeA2T.js +1 -0
  774. package/assets/index-CD7cY8HX.js +1 -0
  775. package/assets/index-CDqfDzT6.js +1 -0
  776. package/assets/index-CE9n_StB.js +1 -0
  777. package/assets/index-CEpc_g8h.js +1 -0
  778. package/assets/index-CExunyqd.js +1 -0
  779. package/assets/index-CFUSXkKo.js +1 -0
  780. package/assets/index-CGMXxK_x.js +1 -0
  781. package/assets/index-CId5PD0X.js +1 -0
  782. package/assets/index-CJ8I9s4o.js +1 -0
  783. package/assets/index-CJYo3Znz.js +1 -0
  784. package/assets/index-CJt068xh.js +1 -0
  785. package/assets/index-CKXDw-uc.js +1 -0
  786. package/assets/index-CLikIjn_.js +1 -0
  787. package/assets/index-CLtv9-lU.js +1 -0
  788. package/assets/index-CLxj2t1J.js +1 -0
  789. package/assets/index-CMGByxdA.js +1 -0
  790. package/assets/index-CMzQk3O6.js +1 -0
  791. package/assets/index-CN6XdMAo.js +1 -0
  792. package/assets/index-CN99OAiz.js +1 -0
  793. package/assets/index-CNLH4wrU.js +1 -0
  794. package/assets/index-CNkg8_tm.js +1 -0
  795. package/assets/index-CNl69Nv0.js +1 -0
  796. package/assets/index-COFjg0BY.js +1 -0
  797. package/assets/index-COlGaDkw.js +1 -0
  798. package/assets/index-CP3DQPwx.js +1 -0
  799. package/assets/index-CP_9UNXA.js +1 -0
  800. package/assets/index-CQ3aQg5G.js +1 -0
  801. package/assets/index-CQPZVLgk.js +1 -0
  802. package/assets/index-CRRdY0XA.js +1 -0
  803. package/assets/index-CRTSSeuy.js +1 -0
  804. package/assets/index-CTs1t6rA.js +1 -0
  805. package/assets/index-CU6cpe0O.js +1 -0
  806. package/assets/index-CU6dgzkA.js +1 -0
  807. package/assets/index-CUEmD5dS.js +1 -0
  808. package/assets/index-CUJUgO36.js +1 -0
  809. package/assets/index-CW58bOV7.js +1 -0
  810. package/assets/index-CW6lKp1A.js +1 -0
  811. package/assets/index-CW8D5Pv5.js +1 -0
  812. package/assets/index-CWTqaiN6.js +1 -0
  813. package/assets/index-CWdL5XwO.js +1 -0
  814. package/assets/index-CWmGdvBR.js +1 -0
  815. package/assets/index-CXYI0OjH.js +1 -0
  816. package/assets/index-CXgqt45P.js +1 -0
  817. package/assets/index-CZNdz8B6.js +1 -0
  818. package/assets/index-CZfaBXw3.js +1 -0
  819. package/assets/index-CZmLnawh.js +1 -0
  820. package/assets/index-C_5dy4gh.js +1 -0
  821. package/assets/index-C_C9JdoE.js +1 -0
  822. package/assets/index-C_XOoDbk.js +1 -0
  823. package/assets/index-C_fnrq8t.js +1 -0
  824. package/assets/index-C_j5E1ow.js +1 -0
  825. package/assets/index-C_j7AjFr.js +1 -0
  826. package/assets/{index-QHEbtwDk.js → index-C_nL-yLJ.js} +1 -1
  827. package/assets/index-Ca7jbqnT.js +1 -0
  828. package/assets/index-CaZIFXyW.js +1 -0
  829. package/assets/index-CapnWgEl.js +1 -0
  830. package/assets/index-Cb41eDDJ.js +1 -0
  831. package/assets/index-CbEIEIEo.js +1 -0
  832. package/assets/index-CbGJyo5C.js +1 -0
  833. package/assets/index-CbMeskkV.js +1 -0
  834. package/assets/index-Cc4uopde.js +1 -0
  835. package/assets/index-CcNQ53IV.js +1 -0
  836. package/assets/index-CcdGs50g.js +1 -0
  837. package/assets/index-Cd5Dye5X.js +1 -0
  838. package/assets/index-CdMxme0L.js +1 -0
  839. package/assets/index-CdOxXIip.js +1 -0
  840. package/assets/index-CdYRC4Ux.js +1 -0
  841. package/assets/index-CdvxolxE.js +1 -0
  842. package/assets/index-Ce98wt2N.js +1 -0
  843. package/assets/index-CeMOFIJl.js +45 -0
  844. package/assets/index-CecEswCv.js +1 -0
  845. package/assets/index-CfCXSq_b.js +1 -0
  846. package/assets/index-CfO_m3oL.js +1 -0
  847. package/assets/index-Cfzzcvgo.js +1 -0
  848. package/assets/index-Cg1E5HxJ.js +1 -0
  849. package/assets/index-CiwBOkla.js +1 -0
  850. package/assets/index-CjVYDT09.js +1 -0
  851. package/assets/index-CkqupmC6.js +1 -0
  852. package/assets/index-Cl87iGjg.js +1 -0
  853. package/assets/index-CmCRou09.js +1 -0
  854. package/assets/index-ComRbnem.js +1 -0
  855. package/assets/index-Coq7--sH.js +1 -0
  856. package/assets/index-CpJZxSfI.js +1 -0
  857. package/assets/index-CpMkh5pZ.js +1 -0
  858. package/assets/index-CqJjpCD5.js +1 -0
  859. package/assets/index-CqWFxNbG.js +1 -0
  860. package/assets/index-CrBWjlui.js +1 -0
  861. package/assets/index-CrGDBMbK.js +1 -0
  862. package/assets/index-CrU71-54.js +3 -0
  863. package/assets/index-CrUcAJK0.js +1 -0
  864. package/assets/index-Crs9jVrm.js +1 -0
  865. package/assets/index-CsAX4sL-.js +1 -0
  866. package/assets/index-CszQa87W.js +1 -0
  867. package/assets/index-Ct6AYfZ-.js +1 -0
  868. package/assets/index-Cu2rQjR7.js +1 -0
  869. package/assets/index-CuJtvtqs.js +1 -0
  870. package/assets/index-CuQBw1y6.js +1 -0
  871. package/assets/index-CujrNB-Q.js +1 -0
  872. package/assets/index-Cv59xn6_.js +1 -0
  873. package/assets/index-Cw9NGSPc.js +1 -0
  874. package/assets/index-Cws1zSAX.js +1 -0
  875. package/assets/index-Cx8lAzRu.js +1 -0
  876. package/assets/index-CxBkKx5Q.js +1 -0
  877. package/assets/index-CyhgnW_d.js +1 -0
  878. package/assets/index-Czf-i91G.js +1 -0
  879. package/assets/index-D-qw7id5.js +1 -0
  880. package/assets/index-D06ftJGd.js +1 -0
  881. package/assets/index-D09WfuKj.js +1 -0
  882. package/assets/{index-BCaUC5CZ.js → index-D0B01M8T.js} +1 -1
  883. package/assets/index-D0rQT1_1.js +1 -0
  884. package/assets/index-D1G_5OyD.js +1 -0
  885. package/assets/index-D1Wt1Kx7.js +1 -0
  886. package/assets/index-D1j-SvoJ.js +1 -0
  887. package/assets/index-D2-ySoTs.js +1 -0
  888. package/assets/index-D2Z8_AUU.js +1 -0
  889. package/assets/index-D2_d10WC.js +1 -0
  890. package/assets/index-D2hPph8l.js +1 -0
  891. package/assets/index-D2vPh3Mc.js +1 -0
  892. package/assets/index-D30RfPa1.js +1 -0
  893. package/assets/index-D45a0k-1.js +1 -0
  894. package/assets/index-D4Sgj1mL.js +1 -0
  895. package/assets/index-D4VnhuTS.js +1 -0
  896. package/assets/index-D5GVUjIM.js +1 -0
  897. package/assets/index-D6d2Y6jv.js +1 -0
  898. package/assets/index-D6xvjdG0.js +1 -0
  899. package/assets/index-D6zAueb_.js +1 -0
  900. package/assets/index-D7FslwZl.js +1 -0
  901. package/assets/index-D7Gl-ZGb.js +1 -0
  902. package/assets/index-D8dYcFAn.js +1 -0
  903. package/assets/index-D9Jrno_D.js +1 -0
  904. package/assets/index-DACt8hFb.js +1 -0
  905. package/assets/index-DAEFTu29.js +1 -0
  906. package/assets/index-DAYuEFQ-.js +1 -0
  907. package/assets/index-DAlw00ee.js +1 -0
  908. package/assets/index-DBst6Hla.js +1 -0
  909. package/assets/{index-B9CwQqDx.js → index-DCzaGJ0h.js} +3 -3
  910. package/assets/index-DDdoZFD-.js +1 -0
  911. package/assets/index-DDggnqr4.js +1 -0
  912. package/assets/index-DDk7D3eE.js +1 -0
  913. package/assets/index-DDwu-IMz.js +1 -0
  914. package/assets/index-DEMIRENu.js +1 -0
  915. package/assets/index-DEV4egrN.js +1 -0
  916. package/assets/index-DE_8irSD.js +1 -0
  917. package/assets/index-DEzKWTBJ.js +1 -0
  918. package/assets/index-DFSGuScS.js +1 -0
  919. package/assets/index-DFZNHq44.js +1 -0
  920. package/assets/index-DFc7lZHb.js +1 -0
  921. package/assets/index-DFghxfjK.js +1 -0
  922. package/assets/index-DFrKYv4g.js +1 -0
  923. package/assets/index-DFt1vT8N.js +1 -0
  924. package/assets/index-DHDm_YtM.js +1 -0
  925. package/assets/index-DHNwai-Z.js +1 -0
  926. package/assets/index-DICTy0sa.js +1 -0
  927. package/assets/index-DILut-jL.js +1 -0
  928. package/assets/index-DJYG2Vtc.js +1 -0
  929. package/assets/index-DK-e_E51.js +1 -0
  930. package/assets/index-DKbx-y78.js +1 -0
  931. package/assets/index-DKzyJcIY.js +1 -0
  932. package/assets/index-DLGneTkB.js +1 -0
  933. package/assets/index-DLHjxUiX.js +1 -0
  934. package/assets/index-DLMSD3H_.js +1 -0
  935. package/assets/index-DMAP8qTI.js +1 -0
  936. package/assets/index-DMEV07wA.js +1 -0
  937. package/assets/index-DMTU8hfu.js +1 -0
  938. package/assets/index-DMyDV-OH.js +1 -0
  939. package/assets/index-DMyHg26L.js +1 -0
  940. package/assets/index-DNynPGua.js +1 -0
  941. package/assets/index-DP0utIbV.js +1 -0
  942. package/assets/{index-DcV4ewib.js → index-DP4gqdTC.js} +2 -2
  943. package/assets/index-DPCPDLBT.js +1 -0
  944. package/assets/index-DPFoWmV6.js +1 -0
  945. package/assets/index-DPPIbXj8.js +1 -0
  946. package/assets/index-DPXkoJXK.js +1 -0
  947. package/assets/index-DPgWRg9-.js +1 -0
  948. package/assets/index-DPhI9JUn.js +1 -0
  949. package/assets/index-DPic1oJg.js +1 -0
  950. package/assets/index-DQ8_v09O.js +1 -0
  951. package/assets/index-DQa9pNJd.js +1 -0
  952. package/assets/index-DR-ujXcj.js +1 -0
  953. package/assets/index-DRVDpxj6.js +1 -0
  954. package/assets/index-DSL1LhIu.js +1 -0
  955. package/assets/index-DSWhMtMn.js +1 -0
  956. package/assets/index-DSbNI5uF.js +13 -0
  957. package/assets/index-DTPO88lj.js +1 -0
  958. package/assets/index-DTtDhdi2.js +1 -0
  959. package/assets/index-DUBZIaC-.js +1 -0
  960. package/assets/index-DV2Q2KhC.js +1 -0
  961. package/assets/index-DVGcX2HE.js +1 -0
  962. package/assets/index-DYiL0IsZ.js +1 -0
  963. package/assets/index-DZ2hd5eC.js +1 -0
  964. package/assets/index-DZRVQyzq.js +1 -0
  965. package/assets/index-D_7wDcMK.js +1 -0
  966. package/assets/index-D_d6gemZ.js +1 -0
  967. package/assets/index-DaZnaClT.js +1 -0
  968. package/assets/index-DbAxetvE.js +1 -0
  969. package/assets/index-Db_DlPJs.js +1 -0
  970. package/assets/index-DcUozftP.js +1 -0
  971. package/assets/index-DcwbqEHj.js +1 -0
  972. package/assets/index-DcyXtFTG.js +1 -0
  973. package/assets/index-Ddqy22qU.js +1 -0
  974. package/assets/index-De1eZyIJ.js +1 -0
  975. package/assets/index-DeQey0SH.js +1 -0
  976. package/assets/index-DfafaK4Q.js +1 -0
  977. package/assets/index-DgNvhZ_M.js +1 -0
  978. package/assets/index-DhFHq_nZ.js +1 -0
  979. package/assets/index-DhlaSoR4.js +1 -0
  980. package/assets/index-DibwKtF2.js +1 -0
  981. package/assets/index-DjLE3t9q.js +1 -0
  982. package/assets/index-Dk8LF9Yk.js +1 -0
  983. package/assets/index-DkPRLpmE.js +1 -0
  984. package/assets/index-DkcP2fCc.js +1 -0
  985. package/assets/index-DlKNOIdN.js +1 -0
  986. package/assets/index-DlfGjmz4.js +1 -0
  987. package/assets/index-DmLPMpkA.js +1 -0
  988. package/assets/index-Dn2svNQz.js +1 -0
  989. package/assets/index-DnUUaSfF.js +1 -0
  990. package/assets/index-DoKwRUhz.js +1 -0
  991. package/assets/index-DoeeKGAI.js +1 -0
  992. package/assets/index-DpRqa1iX.js +1 -0
  993. package/assets/index-DpoJvg5R.js +1 -0
  994. package/assets/index-DqVvpGRi.js +1 -0
  995. package/assets/index-DqYjD_64.js +1 -0
  996. package/assets/index-Dqyfi4dm.js +1 -0
  997. package/assets/index-Dr-PyceS.js +2 -0
  998. package/assets/index-DrzmRQ9S.js +1 -0
  999. package/assets/index-DsgD7D-8.js +1 -0
  1000. package/assets/index-DszThTMl.js +1 -0
  1001. package/assets/index-Dtavj5eK.js +1 -0
  1002. package/assets/index-DuTQzi4Z.js +1 -0
  1003. package/assets/index-DufOfQ90.js +1 -0
  1004. package/assets/index-DvXpQOkv.js +1 -0
  1005. package/assets/index-Dxm6Y7eO.js +1 -0
  1006. package/assets/index-Dy0yjznp.js +1 -1
  1007. package/assets/index-Dy45c3qF.js +1 -0
  1008. package/assets/index-DyaPXLoO.js +1 -0
  1009. package/assets/index-Dzkop1Gk.js +1 -0
  1010. package/assets/index-Fd858RJQ.js +1 -0
  1011. package/assets/index-G-h-xM0C.js +1 -0
  1012. package/assets/index-HFnaQWCU.js +1 -0
  1013. package/assets/index-HPp1Id1p.js +1 -0
  1014. package/assets/index-He5kaR9n.js +1 -0
  1015. package/assets/index-HnCuhDYJ.js +1 -0
  1016. package/assets/index-HzSvsrak.js +1 -0
  1017. package/assets/index-IBUgXgOa.js +1 -0
  1018. package/assets/index-Ia3LffGn.js +1 -0
  1019. package/assets/index-Im6F3t68.js +1 -0
  1020. package/assets/index-JAAqCLcG.js +1 -0
  1021. package/assets/index-JNZoio_2.js +1 -0
  1022. package/assets/index-Jmrm9oUu.js +1 -0
  1023. package/assets/index-JuvDLDuk.js +1 -0
  1024. package/assets/index-K7y9yqJI.js +1 -0
  1025. package/assets/index-KXLAu1y1.js +1 -0
  1026. package/assets/index-KpPak-wu.js +1 -0
  1027. package/assets/index-Kt6GlPCW.js +1 -0
  1028. package/assets/index-MECmwSvw.js +1 -0
  1029. package/assets/index-NO3dCFlG.js +1 -0
  1030. package/assets/index-PjYIiHEb.js +1 -0
  1031. package/assets/index-Pw2thZ4h.js +1 -0
  1032. package/assets/index-QGSP4PI8.js +1 -0
  1033. package/assets/index-QvBzJwgv.js +1 -0
  1034. package/assets/index-RJhc6LnM.js +1 -0
  1035. package/assets/index-RiIluuCN.js +1 -0
  1036. package/assets/index-RpXAvNRL.js +1 -0
  1037. package/assets/index-S5s6rAc3.js +1 -0
  1038. package/assets/index-SCBLsVUL.js +1 -0
  1039. package/assets/index-SaOy8OjI.js +1 -0
  1040. package/assets/index-VZmM-6RJ.js +1 -0
  1041. package/assets/index-VfkM29PH.js +1 -1
  1042. package/assets/index-WXvxLSve.js +1 -0
  1043. package/assets/index-WsH2ZGfO.js +1 -0
  1044. package/assets/index-WwjGYjHa.js +1 -0
  1045. package/assets/index-Wz7obrZB.js +1 -0
  1046. package/assets/index-XRQW1mUN.js +1 -0
  1047. package/assets/index-YDG1R00C.js +1 -0
  1048. package/assets/index-YcqLCtWD.js +1 -0
  1049. package/assets/index-Yk_iQY25.js +1 -0
  1050. package/assets/index-ZITrt5Fi.js +1 -0
  1051. package/assets/index-_36_A-pH.js +1 -0
  1052. package/assets/index-_a8zNWKv.js +1 -0
  1053. package/assets/index-aoLVKFG1.js +1 -0
  1054. package/assets/index-b5ABnFKj.js +1 -0
  1055. package/assets/index-bQArImNA.js +1 -0
  1056. package/assets/index-bsKYZmcs.js +1 -0
  1057. package/assets/index-bzH6W7xo.js +1 -0
  1058. package/assets/index-cAvSYrmF.js +1 -0
  1059. package/assets/index-cF_6KJvb.js +1 -0
  1060. package/assets/index-cTRIo3rN.js +1 -0
  1061. package/assets/index-caEr82M6.js +1 -0
  1062. package/assets/index-cdlur5jM.js +1 -0
  1063. package/assets/index-e_qeQmc1.js +1 -0
  1064. package/assets/index-eiEAIzdd.js +1 -0
  1065. package/assets/index-eujSyrnd.js +1 -0
  1066. package/assets/index-fiGpKN6W.js +1 -0
  1067. package/assets/index-ficai7Ce.js +1 -0
  1068. package/assets/index-fm1oF4Rd.js +1 -0
  1069. package/assets/index-gQ8zpnGO.js +1 -0
  1070. package/assets/index-hUldZ-v8.js +1 -0
  1071. package/assets/index-iJWzlNVI.js +1 -0
  1072. package/assets/index-j06jujv2.js +1 -0
  1073. package/assets/index-j8mIFeCA.js +1 -0
  1074. package/assets/index-j8xu_BhO.js +1 -0
  1075. package/assets/index-jTpsrMvb.js +1 -0
  1076. package/assets/index-jsmqr-24.js +1 -0
  1077. package/assets/index-kNZGxYSe.js +1 -0
  1078. package/assets/index-l2eJJ7mG.js +1 -0
  1079. package/assets/index-l8DhIVZW.js +1 -0
  1080. package/assets/index-lGNYNhMi.js +1 -0
  1081. package/assets/index-lIOVfT2m.js +1 -0
  1082. package/assets/index-m0YDsCpu.js +1 -0
  1083. package/assets/index-mJTgSazQ.js +1 -0
  1084. package/assets/index-npRlG_V2.js +1 -0
  1085. package/assets/index-oEcArN4B.js +1 -0
  1086. package/assets/index-otRo5H2H.js +1 -0
  1087. package/assets/index-ovz39Egy.js +1 -0
  1088. package/assets/index-p0ATWoVh.js +1 -0
  1089. package/assets/index-pcLdliEp.js +1 -0
  1090. package/assets/index-qLRO6nWB.js +1 -0
  1091. package/assets/index-qNIXx6_B.js +1 -0
  1092. package/assets/index-qmNRbp6W.js +1 -0
  1093. package/assets/index-s6ugJH3L.js +1 -0
  1094. package/assets/index-stFagoJS.js +1 -0
  1095. package/assets/index-szNElS1a.js +1 -0
  1096. package/assets/index-t6B_NULY.js +1 -0
  1097. package/assets/index-tkvX3w1X.js +1 -0
  1098. package/assets/index-uKvrIGe-.js +1 -0
  1099. package/assets/index-uM5GtqSd.js +1 -0
  1100. package/assets/index-wBbkQCZY.js +1 -0
  1101. package/assets/index-wk2CJ7i5.js +1 -0
  1102. package/assets/index-xEbiF_Me.js +1 -0
  1103. package/assets/index-yLatYZZK.js +1 -0
  1104. package/assets/index-yOwMLl2f.js +1 -0
  1105. package/assets/index-yURkkC3L.js +1 -0
  1106. package/assets/index.es-CK2zTp8L.js +2 -0
  1107. package/assets/index.es-CvfHWDxQ.js +1 -0
  1108. package/assets/index.es-f9VeuVCb.js +11 -0
  1109. package/assets/index.es-lnOl8KxA.js +27 -0
  1110. package/assets/{info-DlG8nlHJ.js → info-DZvM_7Tg.js} +1 -1
  1111. package/assets/{info-circle-nOJvVDoQ.js → info-circle-CbTMexJv.js} +1 -1
  1112. package/assets/jsx-runtime-B1l0k91v.js +1 -1
  1113. package/assets/{lightbulb-d7WoN-_f.js → lightbulb-yx2Mb3EV.js} +1 -1
  1114. package/assets/{mail-BiX38EUR.js → mail-Dr3LWsa7.js} +1 -1
  1115. package/assets/{mobile-Dd4yjObG.js → mobile-cqKuurbN.js} +1 -1
  1116. package/assets/{more-MSuARi2_.js → more-B2cKG2Cj.js} +1 -1
  1117. package/assets/{network-placeholder-CA53BZgJ.js → network-placeholder-3q6GFkiF.js} +1 -1
  1118. package/assets/{nftPlaceholder-C8C2MjcU.js → nftPlaceholder-PhYi3Gz0.js} +1 -1
  1119. package/assets/{off-rI9hn05x.js → off-DUI09dYV.js} +1 -1
  1120. package/assets/openzeppelin-BX7BOYoL.js +1 -0
  1121. package/assets/ownerOf-BC019JN1.js +1 -0
  1122. package/assets/parseNft-B8R4kPQV.js +2 -0
  1123. package/assets/passkeys-CTJ4NPfL.js +1 -0
  1124. package/assets/{play-store-Cl7i6QvB.js → play-store-JeT38BY2.js} +1 -1
  1125. package/assets/{plus-DXNu4d9m.js → plus--DWdZlCp.js} +1 -1
  1126. package/assets/preload-helper-B1n3wPb0.js +1 -0
  1127. package/assets/publicKeyToAddress-xfjZbRis.js +1 -0
  1128. package/assets/{qr-code-AZHpyffw.js → qr-code-BJDvJfO3.js} +1 -1
  1129. package/assets/qr-overlay-ClttGQRf.js +76 -0
  1130. package/assets/{recycle-horizontal-B-EVv56M.js → recycle-horizontal-Lkcjnn5n.js} +1 -1
  1131. package/assets/{refresh-CK9su4gs.js → refresh-BT1jR4Dn.js} +1 -1
  1132. package/assets/remoteEntry.js +1 -1
  1133. package/assets/{reown-logo-DrNPGmcL.js → reown-logo-BS-2dm8x.js} +1 -1
  1134. package/assets/resolveImplementation-DhbopK-R.js +1 -0
  1135. package/assets/{search-C0MAQCQX.js → search-BSl5mmgI.js} +1 -1
  1136. package/assets/{send-BeCh-jZD.js → send-CHeQ9oTi.js} +1 -1
  1137. package/assets/send-batch-transaction-D1oj-0uI.js +1 -0
  1138. package/assets/send-eip712-transaction-RoGj1xEp.js +2 -0
  1139. package/assets/send-gasless-transaction-BA1ne_Zw.js +2 -0
  1140. package/assets/serializeTransaction-gwTERWWq.js +1 -0
  1141. package/assets/session-proposal-D3Df17qP.js +1 -0
  1142. package/assets/session-request-FSnknvu5.js +2 -0
  1143. package/assets/sha256-sqP1fEyI.js +1 -0
  1144. package/assets/signing-CJBbgcWH.js +10 -0
  1145. package/assets/sleep-mAKpSMLY.js +1 -0
  1146. package/assets/store-DOLZnwHk.js +1 -0
  1147. package/assets/{swapHorizontal-BrsSL8Ld.js → swapHorizontal-cske8D4e.js} +1 -1
  1148. package/assets/{swapHorizontalBold-DBS1FVZI.js → swapHorizontalBold-b6nHPenD.js} +1 -1
  1149. package/assets/{swapHorizontalMedium-1i9enUmE.js → swapHorizontalMedium-DV93kJ8d.js} +1 -1
  1150. package/assets/{swapHorizontalRoundedBold-BMH9pzxi.js → swapHorizontalRoundedBold-B-tUcUDQ.js} +1 -1
  1151. package/assets/{swapVertical-Dgw1BOWx.js → swapVertical-b60outJ9.js} +1 -1
  1152. package/assets/{telegram-07bF-nB-.js → telegram-DYtfIm5p.js} +1 -1
  1153. package/assets/thirdweb-CHfVLLbM.js +1 -0
  1154. package/assets/thirdweb-CSjGe06A.js +27 -0
  1155. package/assets/{three-dots-D_lkLtfC.js → three-dots-BEq0F5FJ.js} +1 -1
  1156. package/assets/totalSupply-CqPmrflK.js +1 -0
  1157. package/assets/{twitch-CG0BG2ER.js → twitch-VNmCX4fc.js} +1 -1
  1158. package/assets/{twitterIcon-Dq725p1a.js → twitterIcon-DQdyBmm7.js} +1 -1
  1159. package/assets/{uid-CAnWNnor.js → uid-BU7APsHa.js} +3 -3
  1160. package/assets/uint8-array-DZKEMhA1.js +1 -0
  1161. package/assets/utils-Bak7ugvl.js +2 -0
  1162. package/assets/utils-DwnG3yMO.js +1 -0
  1163. package/assets/{verify-DHvvOemC.js → verify-Ch-jj4sL.js} +1 -1
  1164. package/assets/{verify-filled-B2XNpSdi.js → verify-filled-DAsUJrHR.js} +1 -1
  1165. package/assets/{w3m-modal-DWn7s7sC.js → w3m-modal-CwL-F657.js} +1 -1
  1166. package/assets/wait-for-tx-receipt-8QHIPUR1.js +1 -0
  1167. package/assets/{wallet-Dt-34u8V.js → wallet-VPqOEzNs.js} +1 -1
  1168. package/assets/wallet-infos-BHI_w6r-.js +1 -0
  1169. package/assets/{wallet-placeholder-BR8VWAZR.js → wallet-placeholder-x8qRsSsI.js} +1 -1
  1170. package/assets/{walletconnect-1Pf--7yk.js → walletconnect-CQuMWn29.js} +1 -1
  1171. package/assets/wallets-DA1wJowE.js +16 -0
  1172. package/assets/{warning-circle-BuF5lEt2.js → warning-circle-BJ1YmKtQ.js} +1 -1
  1173. package/assets/web-connector-C73Vanyj.js +9 -0
  1174. package/assets/webSocket-G5Mbc2fm.js +3 -0
  1175. package/assets/{x-DiShiu0v.js → x-C855X9Jf.js} +1 -1
  1176. package/assets/zora-sepolia-BfAXe2Yn.js +1 -0
  1177. package/index.html +16 -17
  1178. package/package.json +3 -3
  1179. package/assets/HomePage-DaVJoZZr.js +0 -5
  1180. package/assets/__federation_fn_import-ByLP531e.js +0 -1
  1181. package/assets/__federation_shared_@emotion/react-DXkJ7VYj.js +0 -1
  1182. package/assets/__federation_shared_viem-ByQOwPXq.js +0 -2
  1183. package/assets/__federation_shared_wagmi-BOAmcXMK.js +0 -17
  1184. package/assets/basic-Bh_d1NCq.js +0 -2128
  1185. package/assets/ccip-CXCqTMSW.js +0 -1
  1186. package/assets/createClient-BO3IrJpf.js +0 -1
  1187. package/assets/index-B8mcfIAz.js +0 -1
  1188. package/assets/index-CzkFy2Dd.js +0 -7
  1189. package/assets/index.es-rd6wvRni.js +0 -38
  1190. package/assets/localBatchGatewayRequest-BiFOXYYk.js +0 -1
  1191. package/assets/preload-helper-CsJwBEeH.js +0 -1
  1192. package/assets/secp256k1-BatDCt6g.js +0 -1
  1193. package/assets/webSocket-aolSHvA1.js +0 -3
@@ -0,0 +1,16 @@
1
+ const __vite__fileDeps=["assets/index-DSbNI5uF.js","assets/__federation_fn_import-chtkoWq_.js","assets/createBundlerClient-Br8fYUWc.js","assets/uid-BU7APsHa.js","assets/preload-helper-B1n3wPb0.js","assets/createClient-C3MOjVgY.js","assets/hooks.module-Cpp96UEK.js","assets/index-CdrMQoR6.js","assets/_commonjsHelpers-C4iS2aBk.js","assets/serializeTransaction-gwTERWWq.js","assets/defineChain-7I0Ce1VT.js","assets/index-Dr-PyceS.js","assets/index-nibyPLVP.js","assets/index-CrU71-54.js","assets/web-connector-C73Vanyj.js","assets/utils-DwnG3yMO.js","assets/signing-CJBbgcWH.js","assets/sleep-mAKpSMLY.js","assets/index-BSdPSW5L.js","assets/send-eip712-transaction-RoGj1xEp.js","assets/utils-Bak7ugvl.js","assets/sha256-sqP1fEyI.js","assets/controller-BtDVd_aq.js","assets/qr-overlay-ClttGQRf.js","assets/getBalance-D8M0DbBu.js","assets/decimals-BZqhR7BL.js","assets/session-request-FSnknvu5.js","assets/in-app-wallet-calls-ZBHxiKkB.js","assets/wait-for-tx-receipt-8QHIPUR1.js","assets/send-batch-transaction-D1oj-0uI.js","assets/eth_getTransactionCount-y2QsTvLw.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2
+ import{u as qi,aD as wf,aE as yf,aF as gf,aG as Yl,aH as Ef,g as J,aI as vf,aJ as xr,aK as Jl,a as Ln,h as qe,q as Sa,p as bf,n as Me,l as bi,d as Co,f as $o,aL as Ql,aM as Xl,aN as eu,j as Ie,J as If,b as ko,F as Af,aO as Tf,N as Pf,O as Of,aP as tu,ae as Rf,aQ as Lf,k as ji,a2 as Df,ao as Ks,o as nu,aR as Uo,aS as ru,ac as xf,x as No,an as Ca,y as Vf,aT as Sf,a4 as $a,ah as Cf,B as $f,aU as ka,$ as iu,a1 as kf,aV as wn,C as Uf,t as Nf,v as Bf,aW as Mf,al as qf,aC as jf}from"./signing-CJBbgcWH.js";import{f as zf,k as su,l as Vn,a as Te,j as Bo,w as ou,e as zi,m as Kf,n as Ff,o as Wf,d as Hf,c as qr,p as Gf}from"./utils-DwnG3yMO.js";import{importShared as Mo}from"./__federation_fn_import-chtkoWq_.js";import{_ as a}from"./preload-helper-B1n3wPb0.js";import{c as Zf}from"./store-DOLZnwHk.js";import{p as Yf}from"./publicKeyToAddress-xfjZbRis.js";import{a as au}from"./_commonjsHelpers-C4iS2aBk.js";import{q as Zr,s as qo,b as Ii,I as Xn,d as Ua,g as Jf,e as q,h as Gn,j as cu,C as Qf,l as Xf,m as ep,n as Fs,E as Fe,y as ot,k as jo,A as tp,r as np,B as lu,o as rp,t as ip,u as zo,v as Ko,f as Ai,w as er,a as on,P as Na,Q as sp,x as op,z as bn,c as uu,D as Ut,F as Dt,G as Wt}from"./index.es-lnOl8KxA.js";import{c as ap,g as Ba,s as cp,d as lp,k as up,a as hp}from"./index-nibyPLVP.js";import{e as dp}from"./ethereum-S-w-_MII.js";function fp(n=32){return qi(pp(n))}function pp(n=32){return globalThis.crypto.getRandomValues(new Uint8Array(n))}function _p(n){const t=yf(n);return gf("0x19",Yl(`Ethereum Signed Message:
3
+ `+Ef(t)),t)}function mp(n){return wf(_p(n))}const GT="0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c",wp="0x85e23b94e7F5E9cC1fF78BCe78cfb15B81f0DF00",yp="0x4be0ddfebca9a5a4a617dee4dece99e7c862dceb",Ki="0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",gp="0x0000000071727De22E5E9d8BAf0edAc6f37da032",Ep=50000n,vp=n=>bp(n||Ki)==="v0.7"?yp:wp,hu=n=>{const t=zf().bundler;return t.startsWith("localhost:")?`http://${t}/v2?chain=${n.id}`:`https://${n.id}.${t}/v2`},bp=n=>{const t=J(n);if(t===Ki)return"v0.6";if(t===gp)return"v0.7";throw new Error("Unknown paymaster version")};async function Xe(n){const{client:t,ecosystem:e,walletType:r,walletAddress:i,chainId:s}=n;return vf({client:t,data:{action:"connect",chainId:s,source:"connectWallet",walletAddress:i,walletType:r},ecosystem:e})}function Fo(n){const t=n.domain;return t?.chainId!==void 0&&xr(t.chainId)&&(n.domain={...n.domain,chainId:Jl(n.domain.chainId)}),n}const Ip={"0x0":"reverted","0x1":"success"};function Wo(n){const[t,e]=(()=>{const r=n.status;return r>=100&&r<200?["pending",r]:r>=200&&r<300?["success",r]:r>=300&&r<700?["failure",r]:r==="CONFIRMED"?["success",200]:r==="PENDING"?["pending",100]:[void 0,r]})();return{...n,atomic:n.atomic,chainId:n.chainId?Ln(n.chainId):void 0,receipts:n.receipts?.map(r=>({...r,blockNumber:qe(r.blockNumber),gasUsed:qe(r.gasUsed),status:Ip[r.status]}))??[],status:t,statusCode:e,version:n.version}}function Ho(n,t){const e={};for(const[r,i]of Object.entries(n)){e[Number(r)]={};const s={};for(const[o,c]of Object.entries(i))s[o]=c;e[Number(r)]=s}return typeof t=="number"?{[t]:e[t]}:e}async function Go(n,t){const e=n.calls[0];if(!e)throw new Error("No calls to send");const{calls:r,capabilities:i,version:s="2.0.0",chain:o=e.chain}=n,c=await Promise.all(r.map(async u=>{const{to:h,value:d}=u;if(h===void 0&&u.data===void 0)throw new Error("Cannot send call, `to` or `data` must be provided.");const[f,p,m]=await Promise.all([Sa(h),bf(u),Sa(d)]);return f?{data:p,to:J(f),value:typeof m=="bigint"||typeof m=="number"?Me(m):void 0}:{data:p,to:void 0,value:void 0}}));return{callParams:[{atomicRequired:n.atomicRequired??!1,calls:c,capabilities:i,chainId:Me(o.id),from:J(t.address),version:s}],chain:o}}function Zo(n){return Ap(n).map(t=>{try{const e=new URL(t);return e.hostname.endsWith(".thirdweb.com")&&(e.pathname="",e.search=""),e.toString()}catch{return t}})}function Ap(n,t,e="http"){const r=[];for(const i of n.rpc)e==="http"&&!i.startsWith("http")||e==="ws"&&!i.startsWith("ws")||(i.includes("${THIRDWEB_API_KEY}")?r.push(i.replace("${THIRDWEB_API_KEY}","")):i.includes("${")||r.push(i));if(r.length===0)throw new Error(`No RPC available for chainId "${n.chainId}" with mode ${e}`);return r}function bt(n){return typeof n=="number"?n:bi(n)?Ln(n):typeof n=="bigint"?Number(n):Number.parseInt(n,10)}function Tp(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}function Pp(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function du(){return!Tp()&&!Pp()}const xt="com.coinbase.wallet",zt="org.base.account",fu="io.metamask",Op="me.rainbow",Rp="io.zerion.wallet",Ti={async getItem(n){try{if(typeof window<"u"&&window.localStorage)return localStorage.getItem(n)}catch{}return null},async removeItem(n){typeof window<"u"&&window.localStorage&&localStorage.removeItem(n)},async setItem(n,t){try{typeof window<"u"&&window.localStorage&&localStorage.setItem(n,t)}catch{}}};function Yo(n){return n.startsWith("http://")||n.startsWith("https://")}function pu(n,t){if(!Yo(n))return _u(n,t);let e=n;e.endsWith("/")||(e=`${e}/`);const r=encodeURIComponent(t);return{href:e,redirect:`${e}wc?uri=${r}`}}function _u(n,t){if(Yo(n))return pu(n,t);let e=n;e.includes("://")||(e=n.replaceAll("/","").replaceAll(":",""),e=`${e}://`),e.endsWith("/")||(e=`${e}/`);const r=encodeURIComponent(t);return{href:e,redirect:`${e}wc?uri=${r}`}}function Lp(n,t){return Yo(n)?pu(n,t):_u(n,t)}function Dp(){if(typeof navigator>"u")return!1;const n=su(navigator.userAgent);return n?n.toLowerCase().includes("android"):!1}function xp(){if(typeof navigator>"u")return!1;const n=su(navigator.userAgent);return n?n.toLowerCase().includes("ios")||n.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1:!1}function Vp(){return typeof window>"u"||typeof navigator>"u"?!1:"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}function Sp(){return typeof window>"u"?!1:"orientation"in window||"onorientationchange"in window}function Ma(){return!!(Dp()||xp()||Vp()&&Sp()||typeof window<"u"&&window.innerWidth<640)}function as(n){if(window!==window.top)window.open(n);else if(n.startsWith("http")){const e=document.createElement("a");e.href=n,e.target="_blank",e.rel="noreferrer noopener",e.click()}else window.location.href=n}function tr(n){return typeof n=="string"?n.startsWith("ecosystem."):n.id.startsWith("ecosystem.")}async function mu(n,t){if(tr(n)){const{getEcosystemWalletInfo:e}=await a(async()=>{const{getEcosystemWalletInfo:r}=await import("./get-ecosystem-wallet-info-CbWTwKG3.js");return{getEcosystemWalletInfo:r}},[]);return t?e(n).then(r=>r.image_id):e(n)}switch(n){case"smart":return t?a(()=>import("./image-BnYtBA0B.js"),[]).then(e=>e.default):a(()=>import("./index-BuSavAVK.js"),[]).then(e=>e.wallet);case"inApp":return t?a(()=>import("./image-YhquT9-B.js"),[]).then(e=>e.default):a(()=>import("./index-B6yqoFuC.js"),[]).then(e=>e.wallet);case"walletConnect":return t?a(()=>import("./image-B3sWXgWp.js"),[]).then(e=>e.default):a(()=>import("./index-B21BIk0D.js"),[]).then(e=>e.wallet);case"embedded":return t?a(()=>import("./image-CE6B5igp.js"),[]).then(e=>e.default):a(()=>import("./index-CZfaBXw3.js"),[]).then(e=>e.wallet);case"adapter":return t?a(()=>import("./image-CaoCxndE.js"),[]).then(e=>e.default):a(()=>import("./index-DkPRLpmE.js"),[]).then(e=>e.wallet);case"io.1inch.wallet":return t?a(()=>import("./image-DcM8byf5.js"),[]).then(e=>e.default):a(()=>import("./index-B8SH8PS4.js"),[]).then(e=>e.wallet);case"com.binance.wallet":return t?a(()=>import("./image-B6woX8-F.js"),[]).then(e=>e.default):a(()=>import("./index-D1Wt1Kx7.js"),[]).then(e=>e.wallet);case"com.ledger":return t?a(()=>import("./image-CGobRsqC.js"),[]).then(e=>e.default):a(()=>import("./index-C63hJ0G0.js"),[]).then(e=>e.wallet);case"com.bitpay":return t?a(()=>import("./image-oGFA7lCe.js"),[]).then(e=>e.default):a(()=>import("./index-Bl6ScMn3.js"),[]).then(e=>e.wallet);case"com.bestwallet":return t?a(()=>import("./image-YzdSnFCd.js"),[]).then(e=>e.default):a(()=>import("./index-C_fnrq8t.js"),[]).then(e=>e.wallet);case"io.metamask":return t?a(()=>import("./image-rAE1A9js.js"),[]).then(e=>e.default):a(()=>import("./index-DaZnaClT.js"),[]).then(e=>e.wallet);case"com.trustwallet.app":return t?a(()=>import("./image-DhOOZChF.js"),[]).then(e=>e.default):a(()=>import("./index-9552Tb-C.js"),[]).then(e=>e.wallet);case"com.fireblocks":return t?a(()=>import("./image-C_rXI8lY.js"),[]).then(e=>e.default):a(()=>import("./index-fm1oF4Rd.js"),[]).then(e=>e.wallet);case"com.bitget.web3":return t?a(()=>import("./image-Cyu_SKNX.js"),[]).then(e=>e.default):a(()=>import("./index-7Xw6Dozy.js"),[]).then(e=>e.wallet);case"pro.tokenpocket":return t?a(()=>import("./image--EMjkbyZ.js"),[]).then(e=>e.default):a(()=>import("./index-C6d9DLRH.js"),[]).then(e=>e.wallet);case"com.safepal":return t?a(()=>import("./image-CPrfOTN2.js"),[]).then(e=>e.default):a(()=>import("./index-BKoDPf_i.js"),[]).then(e=>e.wallet);case"org.uniswap":return t?a(()=>import("./image-DzLDqqsm.js"),[]).then(e=>e.default):a(()=>import("./index-j8mIFeCA.js"),[]).then(e=>e.wallet);case"io.zerion.wallet":return t?a(()=>import("./image-CXpsLPxr.js"),[]).then(e=>e.default):a(()=>import("./index-CAYpPiIA.js"),[]).then(e=>e.wallet);case"com.elrond.maiar.wallet":return t?a(()=>import("./image-Zh059TUR.js"),[]).then(e=>e.default):a(()=>import("./index-CN99OAiz.js"),[]).then(e=>e.wallet);case"com.crypto.wallet":return t?a(()=>import("./image-BbeMBRJP.js"),[]).then(e=>e.default):a(()=>import("./index-DoeeKGAI.js"),[]).then(e=>e.wallet);case"com.bitcoin":return t?a(()=>import("./image-CIhcwJo_.js"),[]).then(e=>e.default):a(()=>import("./index-COFjg0BY.js"),[]).then(e=>e.wallet);case"com.bifrostwallet":return t?a(()=>import("./image-BJbq9ykO.js"),[]).then(e=>e.default):a(()=>import("./index-Cw9NGSPc.js"),[]).then(e=>e.wallet);case"jp.co.rakuten-wallet":return t?a(()=>import("./image-CkSdZpFq.js"),[]).then(e=>e.default):a(()=>import("./index-CU6dgzkA.js"),[]).then(e=>e.wallet);case"com.bybit":return t?a(()=>import("./image-CVPmP4Bl.js"),[]).then(e=>e.default):a(()=>import("./index-m0YDsCpu.js"),[]).then(e=>e.wallet);case"com.blockchain.login":return t?a(()=>import("./image-BvEJhPGs.js"),[]).then(e=>e.default):a(()=>import("./index-C8VMxu1Z.js"),[]).then(e=>e.wallet);case"io.trezor":return t?a(()=>import("./image-BQXnGJhx.js"),[]).then(e=>e.default):a(()=>import("./index-CDqfDzT6.js"),[]).then(e=>e.wallet);case"im.token":return t?a(()=>import("./image-ChDeiuh7.js"),[]).then(e=>e.default):a(()=>import("./index-iJWzlNVI.js"),[]).then(e=>e.wallet);case"global.safe":return t?a(()=>import("./image-B6ncW7rJ.js"),[]).then(e=>e.default):a(()=>import("./index-HPp1Id1p.js"),[]).then(e=>e.wallet);case"xyz.ctrl":return t?a(()=>import("./image-DsOpF0U0.js"),[]).then(e=>e.default):a(()=>import("./index-CW6lKp1A.js"),[]).then(e=>e.wallet);case"co.arculus":return t?a(()=>import("./image-CYFfk7g3.js"),[]).then(e=>e.default):a(()=>import("./index-s6ugJH3L.js"),[]).then(e=>e.wallet);case"com.roninchain.wallet":return t?a(()=>import("./image-BMgLTkFN.js"),[]).then(e=>e.default):a(()=>import("./index-caEr82M6.js"),[]).then(e=>e.wallet);case"com.okex.wallet":return t?a(()=>import("./image-Ck2fht2U.js"),[]).then(e=>e.default):a(()=>import("./index-CbEIEIEo.js"),[]).then(e=>e.wallet);case"com.wemixplay":return t?a(()=>import("./image-Dfhapk7_.js"),[]).then(e=>e.default):a(()=>import("./index-C8AQSvJD.js"),[]).then(e=>e.wallet);case"com.tangem":return t?a(()=>import("./image-xMsS8TDb.js"),[]).then(e=>e.default):a(()=>import("./index-CKXDw-uc.js"),[]).then(e=>e.wallet);case"com.exodus":return t?a(()=>import("./image-BULUy74S.js"),[]).then(e=>e.default):a(()=>import("./index-DszThTMl.js"),[]).then(e=>e.wallet);case"com.hashpack.wallet":return t?a(()=>import("./image-BFzDP99B.js"),[]).then(e=>e.default):a(()=>import("./index-wBbkQCZY.js"),[]).then(e=>e.wallet);case"id.co.pintu":return t?a(()=>import("./image-CsH_NRy-.js"),[]).then(e=>e.default):a(()=>import("./index-DHDm_YtM.js"),[]).then(e=>e.wallet);case"network.blackfort":return t?a(()=>import("./image-CTLwieHz.js"),[]).then(e=>e.default):a(()=>import("./index-DZRVQyzq.js"),[]).then(e=>e.wallet);case"com.wigwam.wallet":return t?a(()=>import("./image-xaEWk6k8.js"),[]).then(e=>e.default):a(()=>import("./index-BA0Hn6eE.js"),[]).then(e=>e.wallet);case"app.backpack":return t?a(()=>import("./image-YbQrvLSP.js"),[]).then(e=>e.default):a(()=>import("./index-B8BWAl26.js"),[]).then(e=>e.wallet);case"app.subwallet":return t?a(()=>import("./image-BdqmMP8T.js"),[]).then(e=>e.default):a(()=>import("./index-7C_yDnI4.js"),[]).then(e=>e.wallet);case"cc.avacus":return t?a(()=>import("./image-uGs9mRWl.js"),[]).then(e=>e.default):a(()=>import("./index-BFZxo6Jc.js"),[]).then(e=>e.wallet);case"me.rainbow":return t?a(()=>import("./image-DSGxNIm1.js"),[]).then(e=>e.default):a(()=>import("./index-3d3uK5Ax.js"),[]).then(e=>e.wallet);case"so.onekey.app.wallet":return t?a(()=>import("./image-CwaGmiHI.js"),[]).then(e=>e.default):a(()=>import("./index-CUEmD5dS.js"),[]).then(e=>e.wallet);case"me.haha":return t?a(()=>import("./image-Npe5Xkhl.js"),[]).then(e=>e.default):a(()=>import("./index-B7GQyWAF.js"),[]).then(e=>e.wallet);case"com.bee":return t?a(()=>import("./image-Sy6X7CtO.js"),[]).then(e=>e.default):a(()=>import("./index-CQ3aQg5G.js"),[]).then(e=>e.wallet);case"ag.jup":return t?a(()=>import("./image-BuqgjEJD.js"),[]).then(e=>e.default):a(()=>import("./index-D30RfPa1.js"),[]).then(e=>e.wallet);case"app.keplr":return t?a(()=>import("./image-DpeCw-px.js"),[]).then(e=>e.default):a(()=>import("./index-BnsE1W-S.js"),[]).then(e=>e.wallet);case"org.hot-labs":return t?a(()=>import("./image-DFf3lDA_.js"),[]).then(e=>e.default):a(()=>import("./index-DDwu-IMz.js"),[]).then(e=>e.wallet);case"com.dcentwallet":return t?a(()=>import("./image-CUPOo6zK.js"),[]).then(e=>e.default):a(()=>import("./index-Bm92iZMY.js"),[]).then(e=>e.wallet);case"com.kraken":return t?a(()=>import("./image-BP17CoHz.js"),[]).then(e=>e.default):a(()=>import("./index-BFGXqrJS.js"),[]).then(e=>e.wallet);case"com.kucoin":return t?a(()=>import("./image-JIl7mHMQ.js"),[]).then(e=>e.default):a(()=>import("./index-DRVDpxj6.js"),[]).then(e=>e.wallet);case"io.magiceden.wallet":return t?a(()=>import("./image-B7QIFAir.js"),[]).then(e=>e.default):a(()=>import("./index-DMTU8hfu.js"),[]).then(e=>e.wallet);case"com.tomi":return t?a(()=>import("./image-COwCE3RO.js"),[]).then(e=>e.default):a(()=>import("./index-C7njqxXR.js"),[]).then(e=>e.wallet);case"io.ibvm":return t?a(()=>import("./image-CVBI4BwD.js"),[]).then(e=>e.default):a(()=>import("./index-HzSvsrak.js"),[]).then(e=>e.wallet);case"com.mewwallet":return t?a(()=>import("./image-Dx4ya6_y.js"),[]).then(e=>e.default):a(()=>import("./index-DEzKWTBJ.js"),[]).then(e=>e.wallet);case"com.socios.app":return t?a(()=>import("./image-COKP1J8V.js"),[]).then(e=>e.default):a(()=>import("./index-D06ftJGd.js"),[]).then(e=>e.wallet);case"xyz.argent":return t?a(()=>import("./image-5mReG_-1.js"),[]).then(e=>e.default):a(()=>import("./index-CQPZVLgk.js"),[]).then(e=>e.wallet);case"org.thorwallet":return t?a(()=>import("./image-Dmp2jTO0.js"),[]).then(e=>e.default):a(()=>import("./index-NO3dCFlG.js"),[]).then(e=>e.wallet);case"io.internetmoney":return t?a(()=>import("./image-D4PYvYqY.js"),[]).then(e=>e.default):a(()=>import("./index-BZwq4W5O.js"),[]).then(e=>e.wallet);case"org.mathwallet":return t?a(()=>import("./image-mMy4SSmg.js"),[]).then(e=>e.default):a(()=>import("./index-lGNYNhMi.js"),[]).then(e=>e.wallet);case"io.cypherhq":return t?a(()=>import("./image-B14TCFf5.js"),[]).then(e=>e.default):a(()=>import("./index-yURkkC3L.js"),[]).then(e=>e.wallet);case"io.novawallet":return t?a(()=>import("./image-DDso8kuB.js"),[]).then(e=>e.default):a(()=>import("./index-C91aPf2g.js"),[]).then(e=>e.wallet);case"io.yowallet":return t?a(()=>import("./image-Bx8buncY.js"),[]).then(e=>e.default):a(()=>import("./index-B062fuzr.js"),[]).then(e=>e.wallet);case"com.flowfoundation.wallet":return t?a(()=>import("./image-Da2xkAVi.js"),[]).then(e=>e.default):a(()=>import("./index-CBVJzm96.js"),[]).then(e=>e.wallet);case"app.kabila":return t?a(()=>import("./image-B-l20wIO.js"),[]).then(e=>e.default):a(()=>import("./index-cTRIo3rN.js"),[]).then(e=>e.wallet);case"com.opera":return t?a(()=>import("./image-sDrIF89f.js"),[]).then(e=>e.default):a(()=>import("./index-lIOVfT2m.js"),[]).then(e=>e.wallet);case"com.valoraapp":return t?a(()=>import("./image-5QXPaavh.js"),[]).then(e=>e.default):a(()=>import("./index-C6baQHax.js"),[]).then(e=>e.wallet);case"com.robinhood.wallet":return t?a(()=>import("./image-DBehogZh.js"),[]).then(e=>e.default):a(()=>import("./index-bzH6W7xo.js"),[]).then(e=>e.wallet);case"com.chain":return t?a(()=>import("./image-qsAyF5Oj.js"),[]).then(e=>e.default):a(()=>import("./index-npRlG_V2.js"),[]).then(e=>e.wallet);case"io.huddln":return t?a(()=>import("./image-CQm90J-d.js"),[]).then(e=>e.default):a(()=>import("./index-DILut-jL.js"),[]).then(e=>e.wallet);case"app.core.extension":return t?a(()=>import("./image-De2xpum1.js"),[]).then(e=>e.default):a(()=>import("./index-BtfbjCVr.js"),[]).then(e=>e.wallet);case"world.freedom":return t?a(()=>import("./image-COnY36UD.js"),[]).then(e=>e.default):a(()=>import("./index-BZUSQkq9.js"),[]).then(e=>e.wallet);case"money.unstoppable":return t?a(()=>import("./image-Bvw8wNRu.js"),[]).then(e=>e.default):a(()=>import("./index-CW8D5Pv5.js"),[]).then(e=>e.wallet);case"pk.modular":return t?a(()=>import("./image-CaHdVXd1.js"),[]).then(e=>e.default):a(()=>import("./index-1CA6ps09.js"),[]).then(e=>e.wallet);case"app.wombat":return t?a(()=>import("./image-ExeF69qZ.js"),[]).then(e=>e.default):a(()=>import("./index-D9Jrno_D.js"),[]).then(e=>e.wallet);case"com.klipwallet":return t?a(()=>import("./image-8vXf4Xjy.js"),[]).then(e=>e.default):a(()=>import("./index-CcNQ53IV.js"),[]).then(e=>e.wallet);case"com.gemwallet":return t?a(()=>import("./image-M7TV7WaH.js"),[]).then(e=>e.default):a(()=>import("./index-BtZsXMJj.js"),[]).then(e=>e.wallet);case"com.sabay.wallet":return t?a(()=>import("./image-CsNgSbbt.js"),[]).then(e=>e.default):a(()=>import("./index-BVAmxcaa.js"),[]).then(e=>e.wallet);case"com.zengo":return t?a(()=>import("./image-DNtaIeSw.js"),[]).then(e=>e.default):a(()=>import("./index-DDk7D3eE.js"),[]).then(e=>e.wallet);case"xyz.joeywallet":return t?a(()=>import("./image-CTsHGgDx.js"),[]).then(e=>e.default):a(()=>import("./index-Im6F3t68.js"),[]).then(e=>e.wallet);case"io.tokoin":return t?a(()=>import("./image-DQzzFCs2.js"),[]).then(e=>e.default):a(()=>import("./index-Bwjy4Jw7.js"),[]).then(e=>e.wallet);case"io.alpha-u.wallet.web":return t?a(()=>import("./image-DLiMUWBI.js"),[]).then(e=>e.default):a(()=>import("./index-DFt1vT8N.js"),[]).then(e=>e.wallet);case"network.cvl":return t?a(()=>import("./image-CtZg2vKX.js"),[]).then(e=>e.default):a(()=>import("./index-D2vPh3Mc.js"),[]).then(e=>e.wallet);case"io.leapwallet":return t?a(()=>import("./image-DHnnMCFG.js"),[]).then(e=>e.default):a(()=>import("./index-BdkJrfxl.js"),[]).then(e=>e.wallet);case"io.xenea":return t?a(()=>import("./image-B5ZxW0VG.js"),[]).then(e=>e.default):a(()=>import("./index-C8mAROh2.js"),[]).then(e=>e.wallet);case"com.oasys-wallet":return t?a(()=>import("./image-W7SfqKZe.js"),[]).then(e=>e.default):a(()=>import("./index-gQ8zpnGO.js"),[]).then(e=>e.wallet);case"com.bitso":return t?a(()=>import("./image-LfonVSeq.js"),[]).then(e=>e.default):a(()=>import("./index-YcqLCtWD.js"),[]).then(e=>e.wallet);case"io.enjin":return t?a(()=>import("./image-BnXzDKuV.js"),[]).then(e=>e.default):a(()=>import("./index-Jmrm9oUu.js"),[]).then(e=>e.wallet);case"com.coldwallet":return t?a(()=>import("./image-CVrpZdwi.js"),[]).then(e=>e.default):a(()=>import("./index-CkqupmC6.js"),[]).then(e=>e.wallet);case"org.creditcoin.app":return t?a(()=>import("./image-CzL8n4ZU.js"),[]).then(e=>e.default):a(()=>import("./index-B94SpzOt.js"),[]).then(e=>e.wallet);case"app.everspace":return t?a(()=>import("./image-ripXpF5P.js"),[]).then(e=>e.default):a(()=>import("./index-COlGaDkw.js"),[]).then(e=>e.wallet);case"app.zeal":return t?a(()=>import("./image-hO8Jv2oh.js"),[]).then(e=>e.default):a(()=>import("./index-B6n-vVE0.js"),[]).then(e=>e.wallet);case"app.whitewallet":return t?a(()=>import("./image-D7wXb0Un.js"),[]).then(e=>e.default):a(()=>import("./index-SCBLsVUL.js"),[]).then(e=>e.wallet);case"ai.purewallet":return t?a(()=>import("./image-K1HoU8Qi.js"),[]).then(e=>e.default):a(()=>import("./index-DZ2hd5eC.js"),[]).then(e=>e.wallet);case"com.fastex.wallet":return t?a(()=>import("./image-lBIlUHFP.js"),[]).then(e=>e.default):a(()=>import("./index-CMzQk3O6.js"),[]).then(e=>e.wallet);case"io.kriptomat":return t?a(()=>import("./image-6ouyxZRt.js"),[]).then(e=>e.default):a(()=>import("./index-wk2CJ7i5.js"),[]).then(e=>e.wallet);case"com.ullapay":return t?a(()=>import("./image-Bn2sAgXJ.js"),[]).then(e=>e.default):a(()=>import("./index-D_d6gemZ.js"),[]).then(e=>e.wallet);case"io.atomicwallet":return t?a(()=>import("./image-D55LvXjp.js"),[]).then(e=>e.default):a(()=>import("./index-DEV4egrN.js"),[]).then(e=>e.wallet);case"com.pionewallet":return t?a(()=>import("./image-B_0Cqkss.js"),[]).then(e=>e.default):a(()=>import("./index-BogX5ITG.js"),[]).then(e=>e.wallet);case"io.oxalus":return t?a(()=>import("./image-DTa4RXUa.js"),[]).then(e=>e.default):a(()=>import("./index-CuQBw1y6.js"),[]).then(e=>e.wallet);case"xyz.uniultra.wallet":return t?a(()=>import("./image-BSLjXnNe.js"),[]).then(e=>e.default):a(()=>import("./index-CJYo3Znz.js"),[]).then(e=>e.wallet);case"xyz.frontier.wallet":return t?a(()=>import("./image-Bdtwdp85.js"),[]).then(e=>e.default):a(()=>import("./index--YTVamH2.js"),[]).then(e=>e.wallet);case"com.coolbitx.cwsapp":return t?a(()=>import("./image-DWR067hG.js"),[]).then(e=>e.default):a(()=>import("./index-tkvX3w1X.js"),[]).then(e=>e.wallet);case"org.gooddollar":return t?a(()=>import("./image-y3eCNAT6.js"),[]).then(e=>e.default):a(()=>import("./index-C7N44kNF.js"),[]).then(e=>e.wallet);case"com.cakewallet":return t?a(()=>import("./image-BqQffU2u.js"),[]).then(e=>e.default):a(()=>import("./index-DPCPDLBT.js"),[]).then(e=>e.wallet);case"com.ellipal":return t?a(()=>import("./image-vuuCn07N.js"),[]).then(e=>e.default):a(()=>import("./index-jTpsrMvb.js"),[]).then(e=>e.wallet);case"app.krystal":return t?a(()=>import("./image-C2QANSRr.js"),[]).then(e=>e.default):a(()=>import("./index-B7dAHFam.js"),[]).then(e=>e.wallet);case"com.monarchwallet":return t?a(()=>import("./image-BNA4BP9T.js"),[]).then(e=>e.default):a(()=>import("./index-C7WD5W_Z.js"),[]).then(e=>e.wallet);case"com.burritowallet":return t?a(()=>import("./image-BI-5Z38o.js"),[]).then(e=>e.default):a(()=>import("./index-DpRqa1iX.js"),[]).then(e=>e.wallet);case"co.family.wallet":return t?a(()=>import("./image-CECsJh3H.js"),[]).then(e=>e.default):a(()=>import("./index-DrzmRQ9S.js"),[]).then(e=>e.wallet);case"com.mtpelerin":return t?a(()=>import("./image-BDOqiI6p.js"),[]).then(e=>e.default):a(()=>import("./index-bQArImNA.js"),[]).then(e=>e.wallet);case"app.keyring":return t?a(()=>import("./image-BH6pi8gb.js"),[]).then(e=>e.default):a(()=>import("./index-DLGneTkB.js"),[]).then(e=>e.wallet);case"cc.localtrade.lab":return t?a(()=>import("./image-DRqNpoe6.js"),[]).then(e=>e.default):a(()=>import("./index-D-qw7id5.js"),[]).then(e=>e.wallet);case"tech.okto":return t?a(()=>import("./image-uk4MysVY.js"),[]).then(e=>e.default):a(()=>import("./index-C5ZfEOey.js"),[]).then(e=>e.wallet);case"com.xcapit":return t?a(()=>import("./image-BjFjHCOg.js"),[]).then(e=>e.default):a(()=>import("./index-DbAxetvE.js"),[]).then(e=>e.wallet);case"com.gayawallet":return t?a(()=>import("./image-DC9Wj56E.js"),[]).then(e=>e.default):a(()=>import("./index-D4VnhuTS.js"),[]).then(e=>e.wallet);case"app.nightly":return t?a(()=>import("./image-Bv8VGwx8.js"),[]).then(e=>e.default):a(()=>import("./index-uM5GtqSd.js"),[]).then(e=>e.wallet);case"com.coin98":return t?a(()=>import("./image-Co9P7WAh.js"),[]).then(e=>e.default):a(()=>import("./index-CxBkKx5Q.js"),[]).then(e=>e.wallet);case"xyz.coca":return t?a(()=>import("./image-DaxrbegS.js"),[]).then(e=>e.default):a(()=>import("./index-CAfHv9Ye.js"),[]).then(e=>e.wallet);case"app.linen":return t?a(()=>import("./image-CljvD_on.js"),[]).then(e=>e.default):a(()=>import("./index-DTPO88lj.js"),[]).then(e=>e.wallet);case"dev.auroracloud":return t?a(()=>import("./image-BbwfB3J_.js"),[]).then(e=>e.default):a(()=>import("./index-DqYjD_64.js"),[]).then(e=>e.wallet);case"com.coinomi":return t?a(()=>import("./image-CyezMyAx.js"),[]).then(e=>e.default):a(()=>import("./index-B-oXIR8J.js"),[]).then(e=>e.wallet);case"my.mone":return t?a(()=>import("./image-B7h27Vsd.js"),[]).then(e=>e.default):a(()=>import("./index-3jJtZlGN.js"),[]).then(e=>e.wallet);case"org.alephium":return t?a(()=>import("./image-DDUR5y02.js"),[]).then(e=>e.default):a(()=>import("./index-CRTSSeuy.js"),[]).then(e=>e.wallet);case"com.alicebob":return t?a(()=>import("./image-BKjOwOZU.js"),[]).then(e=>e.default):a(()=>import("./index-DYiL0IsZ.js"),[]).then(e=>e.wallet);case"io.koalawallet":return t?a(()=>import("./image-CTAbQz5j.js"),[]).then(e=>e.default):a(()=>import("./index-DPXkoJXK.js"),[]).then(e=>e.wallet);case"com.veworld":return t?a(()=>import("./image-DKBlkqWK.js"),[]).then(e=>e.default):a(()=>import("./index-DV2Q2KhC.js"),[]).then(e=>e.wallet);case"com.withpaper":return t?a(()=>import("./image-DbBiNCFK.js"),[]).then(e=>e.default):a(()=>import("./index-CExunyqd.js"),[]).then(e=>e.wallet);case"io.noone":return t?a(()=>import("./image-CwDXHpUj.js"),[]).then(e=>e.default):a(()=>import("./index-BEFk-36A.js"),[]).then(e=>e.wallet);case"network.haqq":return t?a(()=>import("./image-BaRuJqy0.js"),[]).then(e=>e.default):a(()=>import("./index--t3K2suC.js"),[]).then(e=>e.wallet);case"io.ricewallet":return t?a(()=>import("./image-CmVMIVLM.js"),[]).then(e=>e.default):a(()=>import("./index-C_j7AjFr.js"),[]).then(e=>e.wallet);case"me.iopay":return t?a(()=>import("./image-CMJsc-Ir.js"),[]).then(e=>e.default):a(()=>import("./index-bsKYZmcs.js"),[]).then(e=>e.wallet);case"app.walletnow":return t?a(()=>import("./image-CmkiYZaU.js"),[]).then(e=>e.default):a(()=>import("./index-C_C9JdoE.js"),[]).then(e=>e.wallet);case"io.okse":return t?a(()=>import("./image-CZ9z1ucT.js"),[]).then(e=>e.default):a(()=>import("./index-_a8zNWKv.js"),[]).then(e=>e.wallet);case"network.over":return t?a(()=>import("./image-Cq54pcgl.js"),[]).then(e=>e.default):a(()=>import("./index-BDifUsn3.js"),[]).then(e=>e.wallet);case"com.aktionariat":return t?a(()=>import("./image-Cc6jyxLi.js"),[]).then(e=>e.default):a(()=>import("./index-Pw2thZ4h.js"),[]).then(e=>e.wallet);case"com.paybolt":return t?a(()=>import("./image-cwzgrAkh.js"),[]).then(e=>e.default):a(()=>import("./index-BxqRct_I.js"),[]).then(e=>e.wallet);case"com.plasma-wallet":return t?a(()=>import("./image-BVO9IT_6.js"),[]).then(e=>e.default):a(()=>import("./index-fiGpKN6W.js"),[]).then(e=>e.wallet);case"org.bytebank":return t?a(()=>import("./image-BP2Ox9Qn.js"),[]).then(e=>e.default):a(()=>import("./index-S5s6rAc3.js"),[]).then(e=>e.wallet);case"io.ethermail":return t?a(()=>import("./image-Duck5tqn.js"),[]).then(e=>e.default):a(()=>import("./index-BoCHG1VO.js"),[]).then(e=>e.wallet);case"com.optowallet":return t?a(()=>import("./image-W-Y_Nm-s.js"),[]).then(e=>e.default):a(()=>import("./index-BP-yDgcx.js"),[]).then(e=>e.wallet);case"finance.openwallet":return t?a(()=>import("./image-M_AWRaKs.js"),[]).then(e=>e.default):a(()=>import("./index-Cv59xn6_.js"),[]).then(e=>e.wallet);case"xyz.sequence":return t?a(()=>import("./image-o3pjQDbu.js"),[]).then(e=>e.default):a(()=>import("./index-D7Gl-ZGb.js"),[]).then(e=>e.wallet);case"com.foxwallet":return t?a(()=>import("./image-DcX8AUYd.js"),[]).then(e=>e.default):a(()=>import("./index-BARF52iT.js"),[]).then(e=>e.wallet);case"app.hbwallet":return t?a(()=>import("./image-BlogSp8o.js"),[]).then(e=>e.default):a(()=>import("./index-CW58bOV7.js"),[]).then(e=>e.wallet);case"it.airgap":return t?a(()=>import("./image-5CGX_QL3.js"),[]).then(e=>e.default):a(()=>import("./index-YDG1R00C.js"),[]).then(e=>e.wallet);case"com.holdstation":return t?a(()=>import("./image-BcNLqzB4.js"),[]).then(e=>e.default):a(()=>import("./index-9Ml23qSY.js"),[]).then(e=>e.wallet);case"io.universaleverything":return t?a(()=>import("./image-D3z3GjMO.js"),[]).then(e=>e.default):a(()=>import("./index-qmNRbp6W.js"),[]).then(e=>e.wallet);case"com.abra":return t?a(()=>import("./image-CCgX-pcz.js"),[]).then(e=>e.default):a(()=>import("./index-_36_A-pH.js"),[]).then(e=>e.wallet);case"org.thepulsewallet":return t?a(()=>import("./image-BxfO9qDl.js"),[]).then(e=>e.default):a(()=>import("./index-DgNvhZ_M.js"),[]).then(e=>e.wallet);case"com.premanft":return t?a(()=>import("./image-pKZ5ApxC.js"),[]).then(e=>e.default):a(()=>import("./index-CbGJyo5C.js"),[]).then(e=>e.wallet);case"xyz.timelesswallet":return t?a(()=>import("./image-DUs_WIFe.js"),[]).then(e=>e.default):a(()=>import("./index-WXvxLSve.js"),[]).then(e=>e.wallet);case"org.bitizen":return t?a(()=>import("./image-TQ3Nh_VF.js"),[]).then(e=>e.default):a(()=>import("./index-Db_DlPJs.js"),[]).then(e=>e.wallet);case"app.ultimate":return t?a(()=>import("./image-ClyvBbEv.js"),[]).then(e=>e.default):a(()=>import("./index-D2Z8_AUU.js"),[]).then(e=>e.wallet);case"io.compasswallet":return t?a(()=>import("./image-D6x5dtDG.js"),[]).then(e=>e.default):a(()=>import("./index-2qmxPQhP.js"),[]).then(e=>e.wallet);case"app.fizzwallet":return t?a(()=>import("./image-E3PT44xu.js"),[]).then(e=>e.default):a(()=>import("./index-DAYuEFQ-.js"),[]).then(e=>e.wallet);case"com.xovawallet":return t?a(()=>import("./image-B02ECgsY.js"),[]).then(e=>e.default):a(()=>import("./index-Bap5Lkty.js"),[]).then(e=>e.wallet);case"app.nicegram":return t?a(()=>import("./image-DH5ootHk.js"),[]).then(e=>e.default):a(()=>import("./index-BEXV42kp.js"),[]).then(e=>e.wallet);case"io.zelcore":return t?a(()=>import("./image-CLUlwzEU.js"),[]).then(e=>e.default):a(()=>import("./index-BLO6pY9b.js"),[]).then(e=>e.wallet);case"app.freighter":return t?a(()=>import("./image-BanazMP9.js"),[]).then(e=>e.default):a(()=>import("./index-CcdGs50g.js"),[]).then(e=>e.wallet);case"app.stickey":return t?a(()=>import("./image-_t2-K1ZP.js"),[]).then(e=>e.default):a(()=>import("./index-Cu2rQjR7.js"),[]).then(e=>e.wallet);case"app.coinstats":return t?a(()=>import("./image-BlZLdRma.js"),[]).then(e=>e.default):a(()=>import("./index-j8xu_BhO.js"),[]).then(e=>e.wallet);case"io.harti":return t?a(()=>import("./image-Xfz-LkLu.js"),[]).then(e=>e.default):a(()=>import("./index-DPhI9JUn.js"),[]).then(e=>e.wallet);case"io.dttd":return t?a(()=>import("./image-pEGSGt6h.js"),[]).then(e=>e.default):a(()=>import("./index-CXYI0OjH.js"),[]).then(e=>e.wallet);case"com.tellaw":return t?a(()=>import("./image-sm-_D7TO.js"),[]).then(e=>e.default):a(()=>import("./index-Ddqy22qU.js"),[]).then(e=>e.wallet);case"io.klever":return t?a(()=>import("./image-BBFbQZtc.js"),[]).then(e=>e.default):a(()=>import("./index-BJAcAgB9.js"),[]).then(e=>e.wallet);case"com.unstoppabledomains":return t?a(()=>import("./image-EUVXQieb.js"),[]).then(e=>e.default):a(()=>import("./index-B1XrJIPH.js"),[]).then(e=>e.wallet);case"is.callback":return t?a(()=>import("./image-Mf3UQvEC.js"),[]).then(e=>e.default):a(()=>import("./index-DTtDhdi2.js"),[]).then(e=>e.wallet);case"ai.pundi":return t?a(()=>import("./image-9BTuaiXb.js"),[]).then(e=>e.default):a(()=>import("./index-Ca7jbqnT.js"),[]).then(e=>e.wallet);case"io.summonersarena":return t?a(()=>import("./image-3-p5LJAk.js"),[]).then(e=>e.default):a(()=>import("./index-ovz39Egy.js"),[]).then(e=>e.wallet);case"io.fizen":return t?a(()=>import("./image-CZLdphQJ.js"),[]).then(e=>e.default):a(()=>import("./index-WwjGYjHa.js"),[]).then(e=>e.wallet);case"fi.pillar":return t?a(()=>import("./image-CVAbhfmI.js"),[]).then(e=>e.default):a(()=>import("./index-BFJUkm8C.js"),[]).then(e=>e.wallet);case"world.ixo":return t?a(()=>import("./image-CsTNl20e.js"),[]).then(e=>e.default):a(()=>import("./index-C-A1j44m.js"),[]).then(e=>e.wallet);case"org.thetatoken":return t?a(()=>import("./image-BstOz2Sd.js"),[]).then(e=>e.default):a(()=>import("./index-BlU4B6pe.js"),[]).then(e=>e.wallet);case"net.gateweb3":return t?a(()=>import("./image-CypdirPa.js"),[]).then(e=>e.default):a(()=>import("./index-BkM7PWkU.js"),[]).then(e=>e.wallet);case"app.ammer":return t?a(()=>import("./image-BfGkQCHU.js"),[]).then(e=>e.default):a(()=>import("./index-C0HCn7GN.js"),[]).then(e=>e.wallet);case"us.binance":return t?a(()=>import("./image-DgkgLcDL.js"),[]).then(e=>e.default):a(()=>import("./index-BuhGQjsZ.js"),[]).then(e=>e.wallet);case"io.yusetoken":return t?a(()=>import("./image-CSAN5rKt.js"),[]).then(e=>e.default):a(()=>import("./index-DQ8_v09O.js"),[]).then(e=>e.wallet);case"co.muza":return t?a(()=>import("./image-CRsMfPT0.js"),[]).then(e=>e.default):a(()=>import("./index-5IpGHzAv.js"),[]).then(e=>e.wallet);case"io.hyperpay":return t?a(()=>import("./image-D8scG8aP.js"),[]).then(e=>e.default):a(()=>import("./index-BXZiXU-9.js"),[]).then(e=>e.wallet);case"io.cosmostation":return t?a(()=>import("./image-BYUgGshq.js"),[]).then(e=>e.default):a(()=>import("./index-RiIluuCN.js"),[]).then(e=>e.wallet);case"app.ryipay":return t?a(()=>import("./image-oKct0i27.js"),[]).then(e=>e.default):a(()=>import("./index-CdvxolxE.js"),[]).then(e=>e.wallet);case"io.wallet3":return t?a(()=>import("./image-DJLc6AlW.js"),[]).then(e=>e.default):a(()=>import("./index-C_5dy4gh.js"),[]).then(e=>e.wallet);case"org.dota168":return t?a(()=>import("./image-D3VAu6BC.js"),[]).then(e=>e.default):a(()=>import("./index-BP76iXI2.js"),[]).then(e=>e.wallet);case"com.bitpie":return t?a(()=>import("./image-BUsH-M52.js"),[]).then(e=>e.default):a(()=>import("./index-BKN05ia6.js"),[]).then(e=>e.wallet);case"com.coininn":return t?a(()=>import("./image-B_AAvjJY.js"),[]).then(e=>e.default):a(()=>import("./index-l2eJJ7mG.js"),[]).then(e=>e.wallet);case"me.easy":return t?a(()=>import("./image-BjKXKIhU.js"),[]).then(e=>e.default):a(()=>import("./index-4WvPsM5O.js"),[]).then(e=>e.wallet);case"io.shido":return t?a(()=>import("./image-BGZ2pFmO.js"),[]).then(e=>e.default):a(()=>import("./index-SaOy8OjI.js"),[]).then(e=>e.wallet);case"com.neonwallet":return t?a(()=>import("./image-D2051qUc.js"),[]).then(e=>e.default):a(()=>import("./index-CUJUgO36.js"),[]).then(e=>e.wallet);case"com.secuxtech":return t?a(()=>import("./image-DHHZDLK-.js"),[]).then(e=>e.default):a(()=>import("./index-D1G_5OyD.js"),[]).then(e=>e.wallet);case"com.unitywallet":return t?a(()=>import("./image-BqmT5urK.js"),[]).then(e=>e.default):a(()=>import("./index-BqxSKkSq.js"),[]).then(e=>e.wallet);case"io.miraiapp":return t?a(()=>import("./image-Bi1elmSL.js"),[]).then(e=>e.default):a(()=>import("./index-D0rQT1_1.js"),[]).then(e=>e.wallet);case"com.beexo":return t?a(()=>import("./image-MGwelZJS.js"),[]).then(e=>e.default):a(()=>import("./index-Bbv-4GNB.js"),[]).then(e=>e.wallet);case"social.halo":return t?a(()=>import("./image-CbnSXqJS.js"),[]).then(e=>e.default):a(()=>import("./index-KpPak-wu.js"),[]).then(e=>e.wallet);case"com.gemspocket":return t?a(()=>import("./image-DpGIEKrK.js"),[]).then(e=>e.default):a(()=>import("./index-RpXAvNRL.js"),[]).then(e=>e.wallet);case"app.status":return t?a(()=>import("./image-9509MPsE.js"),[]).then(e=>e.default):a(()=>import("./index-DLMSD3H_.js"),[]).then(e=>e.wallet);case"com.midoin":return t?a(()=>import("./image-BocNs9ze.js"),[]).then(e=>e.default):a(()=>import("./index-CrBWjlui.js"),[]).then(e=>e.wallet);case"id.competence":return t?a(()=>import("./image-CaqftHzf.js"),[]).then(e=>e.default):a(()=>import("./index-CGMXxK_x.js"),[]).then(e=>e.wallet);case"com.safemoon":return t?a(()=>import("./image-BcfiUDv-.js"),[]).then(e=>e.default):a(()=>import("./index-BgECKCj8.js"),[]).then(e=>e.wallet);case"llc.besc":return t?a(()=>import("./image-DLwHWQ4l.js"),[]).then(e=>e.default):a(()=>import("./index-CbMeskkV.js"),[]).then(e=>e.wallet);case"baby.smart":return t?a(()=>import("./image-VxDqDj0T.js"),[]).then(e=>e.default):a(()=>import("./index-BmKJ1abQ.js"),[]).then(e=>e.wallet);case"app.onto":return t?a(()=>import("./image-BCXqBewH.js"),[]).then(e=>e.default):a(()=>import("./index-BPFXH4g9.js"),[]).then(e=>e.wallet);case"com.ivirse":return t?a(()=>import("./image-8DkN4eFx.js"),[]).then(e=>e.default):a(()=>import("./index-CqWFxNbG.js"),[]).then(e=>e.wallet);case"one.mixin.messenger":return t?a(()=>import("./image-DecSbpNG.js"),[]).then(e=>e.default):a(()=>import("./index-PjYIiHEb.js"),[]).then(e=>e.wallet);case"cash.abpay":return t?a(()=>import("./image-Bb4ZLG-2.js"),[]).then(e=>e.default):a(()=>import("./index-BrvgJVgh.js"),[]).then(e=>e.wallet);case"ch.dssecurity":return t?a(()=>import("./image-ddsU9gPS.js"),[]).then(e=>e.default):a(()=>import("./index-DDdoZFD-.js"),[]).then(e=>e.wallet);case"com.concordium.wallet":return t?a(()=>import("./image-W5rUOVDT.js"),[]).then(e=>e.default):a(()=>import("./index-B5BAsv-B.js"),[]).then(e=>e.wallet);case"io.zkape":return t?a(()=>import("./image-Bm-o9RF3.js"),[]).then(e=>e.default):a(()=>import("./index-yLatYZZK.js"),[]).then(e=>e.wallet);case"com.paliwallet":return t?a(()=>import("./image-DqH_Lyo9.js"),[]).then(e=>e.default):a(()=>import("./index-C93NlSEw.js"),[]).then(e=>e.wallet);case"io.pitaka":return t?a(()=>import("./image-Bo8CHmCG.js"),[]).then(e=>e.default):a(()=>import("./index-DeQey0SH.js"),[]).then(e=>e.wallet);case"com.saitamatoken":return t?a(()=>import("./image-AlOoIjkb.js"),[]).then(e=>e.default):a(()=>import("./index-CNkg8_tm.js"),[]).then(e=>e.wallet);case"org.mugambo":return t?a(()=>import("./image-vXNBwFvw.js"),[]).then(e=>e.default):a(()=>import("./index-CqJjpCD5.js"),[]).then(e=>e.wallet);case"fi.stablez":return t?a(()=>import("./image-CruMo9Ar.js"),[]).then(e=>e.default):a(()=>import("./index-Wz7obrZB.js"),[]).then(e=>e.wallet);case"io.legacynetwork":return t?a(()=>import("./image-Dgb3Vdrr.js"),[]).then(e=>e.default):a(()=>import("./index-DLHjxUiX.js"),[]).then(e=>e.wallet);case"com.meld.app":return t?a(()=>import("./image-DrobCWF2.js"),[]).then(e=>e.default):a(()=>import("./index-BqLb859N.js"),[]).then(e=>e.wallet);case"io.bladewallet":return t?a(()=>import("./image-nqueMEws.js"),[]).then(e=>e.default):a(()=>import("./index-C0I75rp3.js"),[]).then(e=>e.wallet);case"com.authentrend":return t?a(()=>import("./image-CmzmxiTz.js"),[]).then(e=>e.default):a(()=>import("./index-0qRtNAQn.js"),[]).then(e=>e.wallet);case"com.webauth":return t?a(()=>import("./image-EyKsXf_1.js"),[]).then(e=>e.default):a(()=>import("./index-BXnDDK-y.js"),[]).then(e=>e.wallet);case"xyz.tucop":return t?a(()=>import("./image-8r04P3UP.js"),[]).then(e=>e.default):a(()=>import("./index-Bbznecif.js"),[]).then(e=>e.wallet);case"pro.fintoken":return t?a(()=>import("./image-BBez6ov1.js"),[]).then(e=>e.default):a(()=>import("./index-CP3DQPwx.js"),[]).then(e=>e.wallet);case"io.nash":return t?a(()=>import("./image--fcqsYch.js"),[]).then(e=>e.default):a(()=>import("./index-Bx9srovK.js"),[]).then(e=>e.wallet);case"vc.uincubator.api":return t?a(()=>import("./image-CyLv-qKv.js"),[]).then(e=>e.default):a(()=>import("./index-B5AZ3O3C.js"),[]).then(e=>e.wallet);case"io.unagi.unawallet":return t?a(()=>import("./image-C6ewnpHo.js"),[]).then(e=>e.default):a(()=>import("./index-CD7cY8HX.js"),[]).then(e=>e.wallet);case"io.nonbank":return t?a(()=>import("./image-TA_PkYBz.js"),[]).then(e=>e.default):a(()=>import("./index-DSWhMtMn.js"),[]).then(e=>e.wallet);case"io.armana.portal":return t?a(()=>import("./image-CI3i53ES.js"),[]).then(e=>e.default):a(()=>import("./index-DuTQzi4Z.js"),[]).then(e=>e.wallet);case"com.x9wallet":return t?a(()=>import("./image-BnT6IaIq.js"),[]).then(e=>e.default):a(()=>import("./index-K7y9yqJI.js"),[]).then(e=>e.wallet);case"io.kigo":return t?a(()=>import("./image-D9i7y0RW.js"),[]).then(e=>e.default):a(()=>import("./index-BIFgx20V.js"),[]).then(e=>e.wallet);case"com.alphawallet":return t?a(()=>import("./image-xJO47ptb.js"),[]).then(e=>e.default):a(()=>import("./index-B78E3fcT.js"),[]).then(e=>e.wallet);case"com.getcogni":return t?a(()=>import("./image-CwsKp0mM.js"),[]).then(e=>e.default):a(()=>import("./index-BNlDhEDg.js"),[]).then(e=>e.wallet);case"app.sinum":return t?a(()=>import("./image-DTy0DgOV.js"),[]).then(e=>e.default):a(()=>import("./index-D5GVUjIM.js"),[]).then(e=>e.wallet);case"finance.soulswap.app":return t?a(()=>import("./image-BI8lK7Gl.js"),[]).then(e=>e.default):a(()=>import("./index-CB_NguTF.js"),[]).then(e=>e.wallet);case"io.loopring.wallet":return t?a(()=>import("./image-BdLvgjKp.js"),[]).then(e=>e.default):a(()=>import("./index-DpoJvg5R.js"),[]).then(e=>e.wallet);case"com.shapeshift":return t?a(()=>import("./image-T2oAotCg.js"),[]).then(e=>e.default):a(()=>import("./index-CdMxme0L.js"),[]).then(e=>e.wallet);case"io.trinity-tech":return t?a(()=>import("./image-bHVCC2t9.js"),[]).then(e=>e.default):a(()=>import("./index-JNZoio_2.js"),[]).then(e=>e.wallet);case"money.keychain":return t?a(()=>import("./image-CHotlokX.js"),[]).then(e=>e.default):a(()=>import("./index-C2CZkwuV.js"),[]).then(e=>e.wallet);case"com.superhero.cordova":return t?a(()=>import("./image-CsmwtAjX.js"),[]).then(e=>e.default):a(()=>import("./index-C5X26G0P.js"),[]).then(e=>e.wallet);case"com.bettatrade":return t?a(()=>import("./image-B4MULACL.js"),[]).then(e=>e.default):a(()=>import("./index-qNIXx6_B.js"),[]).then(e=>e.wallet);case"online.puzzle":return t?a(()=>import("./image-C4hEqt6v.js"),[]).then(e=>e.default):a(()=>import("./index-D2-ySoTs.js"),[]).then(e=>e.wallet);case"gg.indi":return t?a(()=>import("./image-DdicXBNF.js"),[]).then(e=>e.default):a(()=>import("./index-BTkNDmCP.js"),[]).then(e=>e.wallet);case"io.tradestrike":return t?a(()=>import("./image-Bsv1aEQB.js"),[]).then(e=>e.default):a(()=>import("./index-CLtv9-lU.js"),[]).then(e=>e.wallet);case"xyz.echooo":return t?a(()=>import("./image-C7H4CQ65.js"),[]).then(e=>e.default):a(()=>import("./index-B-UTLjBc.js"),[]).then(e=>e.wallet);case"com.kryptogo":return t?a(()=>import("./image-D3ALeCj7.js"),[]).then(e=>e.default):a(()=>import("./index-BtBx3hi1.js"),[]).then(e=>e.wallet);case"io.trustasset":return t?a(()=>import("./image-BfmBx3-B.js"),[]).then(e=>e.default):a(()=>import("./index-MECmwSvw.js"),[]).then(e=>e.wallet);case"app.utorg":return t?a(()=>import("./image-CyF2UJbG.js"),[]).then(e=>e.default):a(()=>import("./index-DK-e_E51.js"),[]).then(e=>e.wallet);case"app.dfinnwallet":return t?a(()=>import("./image-DGLcwgsS.js"),[]).then(e=>e.default):a(()=>import("./index-DR-ujXcj.js"),[]).then(e=>e.wallet);case"org.rezor":return t?a(()=>import("./image-D_0i3ZH4.js"),[]).then(e=>e.default):a(()=>import("./index-DlKNOIdN.js"),[]).then(e=>e.wallet);case"io.legionnetwork":return t?a(()=>import("./image-BszqTwo7.js"),[]).then(e=>e.default):a(()=>import("./index-DMyHg26L.js"),[]).then(e=>e.wallet);case"cc.maxwallet":return t?a(()=>import("./image-CxvWjDXv.js"),[]).then(e=>e.default):a(()=>import("./index-Dy45c3qF.js"),[]).then(e=>e.wallet);case"com.ripio":return t?a(()=>import("./image-DZpGtN5l.js"),[]).then(e=>e.default):a(()=>import("./index-BoC-cn90.js"),[]).then(e=>e.wallet);case"com.fxwallet":return t?a(()=>import("./image-Bkj-ZRbS.js"),[]).then(e=>e.default):a(()=>import("./index-D8dYcFAn.js"),[]).then(e=>e.wallet);case"inc.tomo":return t?a(()=>import("./image-rw28GAIu.js"),[]).then(e=>e.default):a(()=>import("./index-Bh8eOJMM.js"),[]).then(e=>e.wallet);case"me.komet.app":return t?a(()=>import("./image-29vwsAfI.js"),[]).then(e=>e.default):a(()=>import("./index-CapnWgEl.js"),[]).then(e=>e.wallet);case"io.guardiianwallet":return t?a(()=>import("./image-DIDeRhKH.js"),[]).then(e=>e.default):a(()=>import("./index-CWTqaiN6.js"),[]).then(e=>e.wallet);case"io.hacken.hai":return t?a(()=>import("./image-Fq457JJn.js"),[]).then(e=>e.default):a(()=>import("./index-BH1-nK1j.js"),[]).then(e=>e.wallet);case"com.zypto":return t?a(()=>import("./image-D9OC6Qfy.js"),[]).then(e=>e.default):a(()=>import("./index-5U2ZJeh5.js"),[]).then(e=>e.wallet);case"io.nabox":return t?a(()=>import("./image-CJb0NNxX.js"),[]).then(e=>e.default):a(()=>import("./index-Cl87iGjg.js"),[]).then(e=>e.wallet);case"com.tastycrypto":return t?a(()=>import("./image-IpgDqPq2.js"),[]).then(e=>e.default):a(()=>import("./index-CXgqt45P.js"),[]).then(e=>e.wallet);case"com.ballet":return t?a(()=>import("./image-DNyYhMNV.js"),[]).then(e=>e.default):a(()=>import("./index-DhFHq_nZ.js"),[]).then(e=>e.wallet);case"io.talken":return t?a(()=>import("./image-DjXN5hvv.js"),[]).then(e=>e.default):a(()=>import("./index-CuJtvtqs.js"),[]).then(e=>e.wallet);case"io.wallacy":return t?a(()=>import("./image-CdGvq_lV.js"),[]).then(e=>e.default):a(()=>import("./index-DcUozftP.js"),[]).then(e=>e.wallet);case"network.mrhb":return t?a(()=>import("./image-CaBQfcNB.js"),[]).then(e=>e.default):a(()=>import("./index-BpspMk9l.js"),[]).then(e=>e.wallet);case"io.pockie":return t?a(()=>import("./image-D13kcv8b.js"),[]).then(e=>e.default):a(()=>import("./index-Bd7BhrCK.js"),[]).then(e=>e.wallet);case"me.astrox":return t?a(()=>import("./image-BGSprUxs.js"),[]).then(e=>e.default):a(()=>import("./index-BM9GzZ_o.js"),[]).then(e=>e.wallet);case"com.thirdweb":return t?a(()=>import("./image--O11VYbP.js"),[]).then(e=>e.default):a(()=>import("./index-VZmM-6RJ.js"),[]).then(e=>e.wallet);case"com.poolsmobility.wallet":return t?a(()=>import("./image-CUFBkGzy.js"),[]).then(e=>e.default):a(()=>import("./index-DMyDV-OH.js"),[]).then(e=>e.wallet);case"xyz.roam.wallet":return t?a(()=>import("./image-BBk5bBxJ.js"),[]).then(e=>e.default):a(()=>import("./index-DACt8hFb.js"),[]).then(e=>e.wallet);case"app.gamic":return t?a(()=>import("./image-CbmAI5Wi.js"),[]).then(e=>e.default):a(()=>import("./index-D09WfuKj.js"),[]).then(e=>e.wallet);case"app.m1nty":return t?a(()=>import("./image-8Zz6I0OH.js"),[]).then(e=>e.default):a(()=>import("./index-CU6cpe0O.js"),[]).then(e=>e.wallet);case"network.trustkeys":return t?a(()=>import("./image-BJAlBW3-.js"),[]).then(e=>e.default):a(()=>import("./index-BSA2BPZ9.js"),[]).then(e=>e.wallet);case"com.caesiumlab":return t?a(()=>import("./image-DLtkWmCC.js"),[]).then(e=>e.default):a(()=>import("./index-CZNdz8B6.js"),[]).then(e=>e.wallet);case"app.catecoin":return t?a(()=>import("./image-BIIaxSfC.js"),[]).then(e=>e.default):a(()=>import("./index-DNynPGua.js"),[]).then(e=>e.wallet);case"com.hootark":return t?a(()=>import("./image-BQTKy54v.js"),[]).then(e=>e.default):a(()=>import("./index-DhlaSoR4.js"),[]).then(e=>e.wallet);case"com.crossmint":return t?a(()=>import("./image-DrH3Wn2w.js"),[]).then(e=>e.default):a(()=>import("./index-Czf-i91G.js"),[]).then(e=>e.wallet);case"com.coincircle":return t?a(()=>import("./image-DOcz3CQ4.js"),[]).then(e=>e.default):a(()=>import("./index-Crs9jVrm.js"),[]).then(e=>e.wallet);case"io.bharatbox":return t?a(()=>import("./image-D1eN-vq9.js"),[]).then(e=>e.default):a(()=>import("./index-CdYRC4Ux.js"),[]).then(e=>e.wallet);case"nl.greenhood.wallet":return t?a(()=>import("./image-Cyy1KupU.js"),[]).then(e=>e.default):a(()=>import("./index-BPgl8Hhp.js"),[]).then(e=>e.wallet);case"co.swopme":return t?a(()=>import("./image-B6SAWLjq.js"),[]).then(e=>e.default):a(()=>import("./index-DMAP8qTI.js"),[]).then(e=>e.wallet);case"com.kresus":return t?a(()=>import("./image-DesBMjvP.js"),[]).then(e=>e.default):a(()=>import("./index-oEcArN4B.js"),[]).then(e=>e.wallet);case"com.dolletwallet":return t?a(()=>import("./image-fjbgiffe.js"),[]).then(e=>e.default):a(()=>import("./index-CCIAeA2T.js"),[]).then(e=>e.wallet);case"net.shinobi-wallet":return t?a(()=>import("./image-WbOd8jAJ.js"),[]).then(e=>e.default):a(()=>import("./index-CZmLnawh.js"),[]).then(e=>e.wallet);case"com.azcoiner":return t?a(()=>import("./image-BQcTbEVl.js"),[]).then(e=>e.default):a(()=>import("./index-t6B_NULY.js"),[]).then(e=>e.wallet);case"com.passwallet.app":return t?a(()=>import("./image-DJYKaoNi.js"),[]).then(e=>e.default):a(()=>import("./index-Ct6AYfZ-.js"),[]).then(e=>e.wallet);case"app.qubic.wallet":return t?a(()=>import("./image-BBZFtk5k.js"),[]).then(e=>e.default):a(()=>import("./index-DoKwRUhz.js"),[]).then(e=>e.wallet);case"com.coinex.wallet":return t?a(()=>import("./image-CfglWSsQ.js"),[]).then(e=>e.default):a(()=>import("./index-DMEV07wA.js"),[]).then(e=>e.wallet);case"app.xverse":return t?a(()=>import("./image-DETlLb_v.js"),[]).then(e=>e.default):a(()=>import("./index-DAlw00ee.js"),[]).then(e=>e.wallet);case"com.flash-wallet":return t?a(()=>import("./image-BzGwleUn.js"),[]).then(e=>e.default):a(()=>import("./index-7BdGIDy3.js"),[]).then(e=>e.wallet);case"com.vgxfoundation":return t?a(()=>import("./image-C6NJnfCW.js"),[]).then(e=>e.default):a(()=>import("./index-CsAX4sL-.js"),[]).then(e=>e.wallet);case"org.arianee":return t?a(()=>import("./image-B6VmDbM6.js"),[]).then(e=>e.default):a(()=>import("./index-Cx8lAzRu.js"),[]).then(e=>e.wallet);case"io.myabcwallet":return t?a(()=>import("./image-jv6wUF7a.js"),[]).then(e=>e.default):a(()=>import("./index-3an-fsOm.js"),[]).then(e=>e.wallet);case"io.owallet":return t?a(()=>import("./image-DGhNZ1rS.js"),[]).then(e=>e.default):a(()=>import("./index-D2_d10WC.js"),[]).then(e=>e.wallet);case"io.zelus":return t?a(()=>import("./image-1epPqHV4.js"),[]).then(e=>e.default):a(()=>import("./index-hUldZ-v8.js"),[]).then(e=>e.wallet);case"net.myrenegade":return t?a(()=>import("./image-SJHuomz2.js"),[]).then(e=>e.default):a(()=>import("./index-C5gBqe1B.js"),[]).then(e=>e.wallet);case"io.clingon":return t?a(()=>import("./image-2s8lIjLJ.js"),[]).then(e=>e.default):a(()=>import("./index-Dk8LF9Yk.js"),[]).then(e=>e.wallet);case"com.icewal":return t?a(()=>import("./image-rdvu9IOp.js"),[]).then(e=>e.default):a(()=>import("./index-Cd5Dye5X.js"),[]).then(e=>e.wallet);case"io.streakk":return t?a(()=>import("./image-CcPbeTXv.js"),[]).then(e=>e.default):a(()=>import("./index-CrGDBMbK.js"),[]).then(e=>e.wallet);case"com.dokwallet":return t?a(()=>import("./image-BRPzDWpX.js"),[]).then(e=>e.default):a(()=>import("./index-xEbiF_Me.js"),[]).then(e=>e.wallet);case"finance.porta":return t?a(()=>import("./image-BNvlqRxs.js"),[]).then(e=>e.default):a(()=>import("./index-DSL1LhIu.js"),[]).then(e=>e.wallet);case"io.prettygood.x":return t?a(()=>import("./image-BhmKXBqm.js"),[]).then(e=>e.default):a(()=>import("./index-DfafaK4Q.js"),[]).then(e=>e.wallet);case"io.earthwallet":return t?a(()=>import("./image-BOJcifnx.js"),[]).then(e=>e.default):a(()=>import("./index-BmwlJTQ-.js"),[]).then(e=>e.wallet);case"net.spatium.wallet":return t?a(()=>import("./image-CmrOpLf4.js"),[]).then(e=>e.default):a(()=>import("./index-Fd858RJQ.js"),[]).then(e=>e.wallet);case"live.superex":return t?a(()=>import("./image-ByHnaba8.js"),[]).then(e=>e.default):a(()=>import("./index-DqVvpGRi.js"),[]).then(e=>e.wallet);case"com.adftechnology":return t?a(()=>import("./image-C6LRjQzh.js"),[]).then(e=>e.default):a(()=>import("./index-C-b1qpM9.js"),[]).then(e=>e.wallet);case"com.bscecowallet":return t?a(()=>import("./image-8u03hBEl.js"),[]).then(e=>e.default):a(()=>import("./index-Dn2svNQz.js"),[]).then(e=>e.wallet);case"io.wallypto":return t?a(()=>import("./image-CRU88082.js"),[]).then(e=>e.default):a(()=>import("./index-j06jujv2.js"),[]).then(e=>e.wallet);case"com.reown":return t?a(()=>import("./image-D3tLM-DF.js"),[]).then(e=>e.default):a(()=>import("./index-DibwKtF2.js"),[]).then(e=>e.wallet);case"finance.voltage":return t?a(()=>import("./image-ZVoqlWXW.js"),[]).then(e=>e.default):a(()=>import("./index-XRQW1mUN.js"),[]).then(e=>e.wallet);case"com.walletconnect":return t?a(()=>import("./image-BAS5CqSz.js"),[]).then(e=>e.default):a(()=>import("./index-B-BftUxa.js"),[]).then(e=>e.wallet);case"io.passpay":return t?a(()=>import("./image-Ci0UFTFy.js"),[]).then(e=>e.default):a(()=>import("./index-CP_9UNXA.js"),[]).then(e=>e.wallet);case"technology.obvious":return t?a(()=>import("./image-ZLtraAGN.js"),[]).then(e=>e.default):a(()=>import("./index-BzNpkHfI.js"),[]).then(e=>e.wallet);case"io.plutope":return t?a(()=>import("./image-Bz03or90.js"),[]).then(e=>e.default):a(()=>import("./index-CszQa87W.js"),[]).then(e=>e.wallet);case"io.buzz-up":return t?a(()=>import("./image-BsQYdoXP.js"),[]).then(e=>e.default):a(()=>import("./index-BoJGVmma.js"),[]).then(e=>e.wallet);case"co.xellar":return t?a(()=>import("./image-D2QL-j27.js"),[]).then(e=>e.default):a(()=>import("./index-cdlur5jM.js"),[]).then(e=>e.wallet);case"com.kaxaa":return t?a(()=>import("./image-DPzEe6a_.js"),[]).then(e=>e.default):a(()=>import("./index-DFSGuScS.js"),[]).then(e=>e.wallet);case"org.shefi":return t?a(()=>import("./image-DwUGDFj5.js"),[]).then(e=>e.default):a(()=>import("./index-Dtavj5eK.js"),[]).then(e=>e.wallet);case"xyz.orion":return t?a(()=>import("./image-CCDmsN6r.js"),[]).then(e=>e.default):a(()=>import("./index-Ba2OoCBH.js"),[]).then(e=>e.wallet);case"world.dosi.vault":return t?a(()=>import("./image-Cy0vmJls.js"),[]).then(e=>e.default):a(()=>import("./index-eujSyrnd.js"),[]).then(e=>e.wallet);case"network.gridlock":return t?a(()=>import("./image-CxyHP7w7.js"),[]).then(e=>e.default):a(()=>import("./index-Ce98wt2N.js"),[]).then(e=>e.wallet);case"finance.plena":return t?a(()=>import("./image-Cwg1QVuh.js"),[]).then(e=>e.default):a(()=>import("./index-BG1ZQeCA.js"),[]).then(e=>e.wallet);case"cc.dropp":return t?a(()=>import("./image-CAIffJi4.js"),[]).then(e=>e.default):a(()=>import("./index-HFnaQWCU.js"),[]).then(e=>e.wallet);case"io.scramberry":return t?a(()=>import("./image-D8ARN-Gu.js"),[]).then(e=>e.default):a(()=>import("./index-BIcsFldg.js"),[]).then(e=>e.wallet);case"xyz.bonuz":return t?a(()=>import("./image-HcidEyjv.js"),[]).then(e=>e.default):a(()=>import("./index-BZhX-e71.js"),[]).then(e=>e.wallet);case"com.bmawallet":return t?a(()=>import("./image-kZBIIBVa.js"),[]).then(e=>e.default):a(()=>import("./index-BM8c6qO-.js"),[]).then(e=>e.wallet);case"co.lifedefi":return t?a(()=>import("./image-DRpXk5be.js"),[]).then(e=>e.default):a(()=>import("./index-otRo5H2H.js"),[]).then(e=>e.wallet);case"com.get-verso":return t?a(()=>import("./image-CgzMLfDa.js"),[]).then(e=>e.default):a(()=>import("./index-DAEFTu29.js"),[]).then(e=>e.wallet);case"io.blocto":return t?a(()=>import("./image-FnAIuX7S.js"),[]).then(e=>e.default):a(()=>import("./index-ZITrt5Fi.js"),[]).then(e=>e.wallet);case"com.pandoshi":return t?a(()=>import("./image-PWpnYSKI.js"),[]).then(e=>e.default):a(()=>import("./index-BmXd0pys.js"),[]).then(e=>e.wallet);case"io.getclave":return t?a(()=>import("./image-rvsWf8U_.js"),[]).then(e=>e.default):a(()=>import("./index--rITGawC.js"),[]).then(e=>e.wallet);case"technology.jambo":return t?a(()=>import("./image-Bx8ULApC.js"),[]).then(e=>e.default):a(()=>import("./index-C2KnoZm4.js"),[]).then(e=>e.wallet);case"app.edge":return t?a(()=>import("./image-1-dOu4Yt.js"),[]).then(e=>e.default):a(()=>import("./index-stFagoJS.js"),[]).then(e=>e.wallet);case"io.banksocial":return t?a(()=>import("./image-OrIz0o8m.js"),[]).then(e=>e.default):a(()=>import("./index-Ia3LffGn.js"),[]).then(e=>e.wallet);case"io.konio":return t?a(()=>import("./image-C2Wl7RAy.js"),[]).then(e=>e.default):a(()=>import("./index-B-kI7R4f.js"),[]).then(e=>e.wallet);case"com.qubetics":return t?a(()=>import("./image-DLvMDcgw.js"),[]).then(e=>e.default):a(()=>import("./index-C_j5E1ow.js"),[]).then(e=>e.wallet);case"app.imem":return t?a(()=>import("./image-Atwyf6cQ.js"),[]).then(e=>e.default):a(()=>import("./index-KXLAu1y1.js"),[]).then(e=>e.wallet);case"com.purechain":return t?a(()=>import("./image-DgU8tR58.js"),[]).then(e=>e.default):a(()=>import("./index-G-h-xM0C.js"),[]).then(e=>e.wallet);case"io.ethos":return t?a(()=>import("./image-DmNOl1OW.js"),[]).then(e=>e.default):a(()=>import("./index-DmLPMpkA.js"),[]).then(e=>e.wallet);case"io.didwallet":return t?a(()=>import("./image-CzKmxeZp.js"),[]).then(e=>e.default):a(()=>import("./index-QGSP4PI8.js"),[]).then(e=>e.wallet);case"com.dextrade":return t?a(()=>import("./image-B_ozWfd0.js"),[]).then(e=>e.default):a(()=>import("./index-CdOxXIip.js"),[]).then(e=>e.wallet);case"org.kelp":return t?a(()=>import("./image-CcKS-8-S.js"),[]).then(e=>e.default):a(()=>import("./index-DUBZIaC-.js"),[]).then(e=>e.wallet);case"xyz.nestwallet":return t?a(()=>import("./image-Bq1UxveY.js"),[]).then(e=>e.default):a(()=>import("./index-uKvrIGe-.js"),[]).then(e=>e.wallet);case"com.cryptnox":return t?a(()=>import("./image-UFnS_pK0.js"),[]).then(e=>e.default):a(()=>import("./index-ComRbnem.js"),[]).then(e=>e.wallet);case"land.liker":return t?a(()=>import("./image-C_JPqQZj.js"),[]).then(e=>e.default):a(()=>import("./index-CId5PD0X.js"),[]).then(e=>e.wallet);case"io.hippowallet":return t?a(()=>import("./image-BdJA4XzW.js"),[]).then(e=>e.default):a(()=>import("./index-BTzbgIH6.js"),[]).then(e=>e.wallet);case"io.certhis":return t?a(()=>import("./image-bSOL4gQb.js"),[]).then(e=>e.default):a(()=>import("./index-BxtNhRvf.js"),[]).then(e=>e.wallet);case"io.safecryptowallet":return t?a(()=>import("./image-DFF2Z6Pk.js"),[]).then(e=>e.default):a(()=>import("./index-CWdL5XwO.js"),[]).then(e=>e.wallet);case"com.saify":return t?a(()=>import("./image-DOwBqPVS.js"),[]).then(e=>e.default):a(()=>import("./index-De1eZyIJ.js"),[]).then(e=>e.wallet);case"com.tiduswallet":return t?a(()=>import("./image-DzJAqGfB.js"),[]).then(e=>e.default):a(()=>import("./index-BMPGw_D6.js"),[]).then(e=>e.wallet);case"io.uptn.dapp-web":return t?a(()=>import("./image-C4ELurjg.js"),[]).then(e=>e.default):a(()=>import("./index-jsmqr-24.js"),[]).then(e=>e.wallet);case"com.it.onewallet":return t?a(()=>import("./image-CWCOKSln.js"),[]).then(e=>e.default):a(()=>import("./index-DHNwai-Z.js"),[]).then(e=>e.wallet);case"com.rktechworks":return t?a(()=>import("./image-BhECDi_9.js"),[]).then(e=>e.default):a(()=>import("./index-D6xvjdG0.js"),[]).then(e=>e.wallet);case"com.revelator.wallet":return t?a(()=>import("./image-nW5JvdXC.js"),[]).then(e=>e.default):a(()=>import("./index-CNl69Nv0.js"),[]).then(e=>e.wallet);case"com.sinohope":return t?a(()=>import("./image-D7P0qSfx.js"),[]).then(e=>e.default):a(()=>import("./index-DKzyJcIY.js"),[]).then(e=>e.wallet);case"network.dgg":return t?a(()=>import("./image-DrraBYJZ.js"),[]).then(e=>e.default):a(()=>import("./index-DnUUaSfF.js"),[]).then(e=>e.wallet);case"io.up":return t?a(()=>import("./image-DbpOM2LD.js"),[]).then(e=>e.default):a(()=>import("./index-BuWGQyCe.js"),[]).then(e=>e.wallet);case"com.lif3":return t?a(()=>import("./image-DC2DOoz2.js"),[]).then(e=>e.default):a(()=>import("./index-BKkJhanY.js"),[]).then(e=>e.wallet);case"io.bimwallet":return t?a(()=>import("./image-BKSQyIc5.js"),[]).then(e=>e.default):a(()=>import("./index-3DerMn1X.js"),[]).then(e=>e.wallet);case"pub.dg":return t?a(()=>import("./image-C4KoLZ1v.js"),[]).then(e=>e.default):a(()=>import("./index-D6d2Y6jv.js"),[]).then(e=>e.wallet);case"com.wemix":return t?a(()=>import("./image-CawBnBIo.js"),[]).then(e=>e.default):a(()=>import("./index-18L0wZ74.js"),[]).then(e=>e.wallet);case"com.pierwallet":return t?a(()=>import("./image-DA8Sg5HZ.js"),[]).then(e=>e.default):a(()=>import("./index-mJTgSazQ.js"),[]).then(e=>e.wallet);case"net.stasis":return t?a(()=>import("./image-CyE6Mi3e.js"),[]).then(e=>e.default):a(()=>import("./index-CJ8I9s4o.js"),[]).then(e=>e.wallet);case"com.peakdefi":return t?a(()=>import("./image-DUcJQ0b3.js"),[]).then(e=>e.default):a(()=>import("./index-DEMIRENu.js"),[]).then(e=>e.wallet);case"com.3swallet":return t?a(()=>import("./image-CD3he1Tj.js"),[]).then(e=>e.default):a(()=>import("./index-DVGcX2HE.js"),[]).then(e=>e.wallet);case"com.example.subdomain":return t?a(()=>import("./image-Cs2bevZt.js"),[]).then(e=>e.default):a(()=>import("./index-CJt068xh.js"),[]).then(e=>e.wallet);case"com.reown.appkit-lab":return t?a(()=>import("./image-CnDG0aor.js"),[]).then(e=>e.default):a(()=>import("./index-BzfyCotn.js"),[]).then(e=>e.wallet);case"com.opz":return t?a(()=>import("./image-D1qvgd7h.js"),[]).then(e=>e.default):a(()=>import("./index-CMGByxdA.js"),[]).then(e=>e.wallet);case"ai.spotonchain.platform":return t?a(()=>import("./image-C6QSWUy4.js"),[]).then(e=>e.default):a(()=>import("./index-Ba7PpD6d.js"),[]).then(e=>e.wallet);case"org.dailychain.wallet":return t?a(()=>import("./image-BJ_lqI1X.js"),[]).then(e=>e.default):a(()=>import("./index-DQa9pNJd.js"),[]).then(e=>e.wallet);case"app.omni":return t?a(()=>import("./image-CqLwuE__.js"),[]).then(e=>e.default):a(()=>import("./index-D_7wDcMK.js"),[]).then(e=>e.wallet);case"id.plumaa":return t?a(()=>import("./image-BvJKCSpY.js"),[]).then(e=>e.default):a(()=>import("./index-D45a0k-1.js"),[]).then(e=>e.wallet);case"io.ttmwallet":return t?a(()=>import("./image-Chg2WzE1.js"),[]).then(e=>e.default):a(()=>import("./index-CLikIjn_.js"),[]).then(e=>e.wallet);case"io.kgen":return t?a(()=>import("./image-DFYGQEwh.js"),[]).then(e=>e.default):a(()=>import("./index-BQWXi0by.js"),[]).then(e=>e.wallet);case"com.nufinetes":return t?a(()=>import("./image-CpFHTO_m.js"),[]).then(e=>e.default):a(()=>import("./index-B8De2hoC.js"),[]).then(e=>e.wallet);case"com.squirrelwallet":return t?a(()=>import("./image-bHJO6btW.js"),[]).then(e=>e.default):a(()=>import("./index-DyaPXLoO.js"),[]).then(e=>e.wallet);case"eu.trusteeglobal":return t?a(()=>import("./image-cDoShVvl.js"),[]).then(e=>e.default):a(()=>import("./index-B51294pb.js"),[]).then(e=>e.wallet);case"com.daffione":return t?a(()=>import("./image-Dtc98pdf.js"),[]).then(e=>e.default):a(()=>import("./index-BIXqJF5y.js"),[]).then(e=>e.wallet);case"com.saakuru.app":return t?a(()=>import("./image-TQLBEOIW.js"),[]).then(e=>e.default):a(()=>import("./index-CjVYDT09.js"),[]).then(e=>e.wallet);case"io.r0ar":return t?a(()=>import("./image-4bx5chOJ.js"),[]).then(e=>e.default):a(()=>import("./index-CfCXSq_b.js"),[]).then(e=>e.wallet);case"com.nodle":return t?a(()=>import("./image-tiHbZ1Vk.js"),[]).then(e=>e.default):a(()=>import("./index-BwL47YsA.js"),[]).then(e=>e.wallet);case"app.tofee":return t?a(()=>import("./image-DpHbdMp9.js"),[]).then(e=>e.default):a(()=>import("./index-Bk-uZV0j.js"),[]).then(e=>e.wallet);case"io.pltwallet":return t?a(()=>import("./image-BIDqxk8w.js"),[]).then(e=>e.default):a(()=>import("./index-eiEAIzdd.js"),[]).then(e=>e.wallet);case"org.talkapp":return t?a(()=>import("./image-BkKo9DtA.js"),[]).then(e=>e.default):a(()=>import("./index-BGGk2Hck.js"),[]).then(e=>e.wallet);case"io.ready":return t?a(()=>import("./image-BwjeUYie.js"),[]).then(e=>e.default):a(()=>import("./index-BQwDdmmS.js"),[]).then(e=>e.wallet);case"app.w3wallet":return t?a(()=>import("./image-Covp72ND.js"),[]).then(e=>e.default):a(()=>import("./index-Cb41eDDJ.js"),[]).then(e=>e.wallet);case"pro.ds.app":return t?a(()=>import("./image-Bktw-NJ-.js"),[]).then(e=>e.default):a(()=>import("./index-b5ABnFKj.js"),[]).then(e=>e.wallet);case"com.reown.docs":return t?a(()=>import("./image-V4qYiUxw.js"),[]).then(e=>e.default):a(()=>import("./index-DsgD7D-8.js"),[]).then(e=>e.wallet);case"com.apollox":return t?a(()=>import("./image-ss2LFlQu.js"),[]).then(e=>e.default):a(()=>import("./index-BLMjeGJ-.js"),[]).then(e=>e.wallet);case"com.ipmb":return t?a(()=>import("./image-CirJIT7l.js"),[]).then(e=>e.default):a(()=>import("./index-DP0utIbV.js"),[]).then(e=>e.wallet);case"com.payperless":return t?a(()=>import("./image-q4XfUN6v.js"),[]).then(e=>e.default):a(()=>import("./index-szNElS1a.js"),[]).then(e=>e.wallet);case"com.obliowallet":return t?a(()=>import("./image-BGxqJH7c.js"),[]).then(e=>e.default):a(()=>import("./index-JuvDLDuk.js"),[]).then(e=>e.wallet);case"app.keeper-wallet":return t?a(()=>import("./image-Dpgf4dcg.js"),[]).then(e=>e.default):a(()=>import("./index-DlfGjmz4.js"),[]).then(e=>e.wallet);case"io.paraswap":return t?a(()=>import("./image-CQKjvlto.js"),[]).then(e=>e.default):a(()=>import("./index-DjLE3t9q.js"),[]).then(e=>e.wallet);case"org.ecoinwallet":return t?a(()=>import("./image-C3Va51zP.js"),[]).then(e=>e.default):a(()=>import("./index-DFZNHq44.js"),[]).then(e=>e.wallet);case"fi.dropmate":return t?a(()=>import("./image-5xiz28Wo.js"),[]).then(e=>e.default):a(()=>import("./index-p0ATWoVh.js"),[]).then(e=>e.wallet);case"com.cryptokara":return t?a(()=>import("./image-Dqbrewdt.js"),[]).then(e=>e.default):a(()=>import("./index-Cfzzcvgo.js"),[]).then(e=>e.wallet);case"co.cyber.wallet":return t?a(()=>import("./image-BvkSxpXq.js"),[]).then(e=>e.default):a(()=>import("./index-e_qeQmc1.js"),[]).then(e=>e.wallet);case"com.kriptonio":return t?a(()=>import("./image-D_cIj1db.js"),[]).then(e=>e.default):a(()=>import("./index-Dxm6Y7eO.js"),[]).then(e=>e.wallet);case"digital.minerva":return t?a(()=>import("./image-D5wxf47e.js"),[]).then(e=>e.default):a(()=>import("./index-HnCuhDYJ.js"),[]).then(e=>e.wallet);case"com.mpcvault.broswerplugin":return t?a(()=>import("./image-BN4ovMrn.js"),[]).then(e=>e.default):a(()=>import("./index-BXY5tnuK.js"),[]).then(e=>e.wallet);case"com.liberawallet":return t?a(()=>import("./image-DyrMImIL.js"),[]).then(e=>e.default):a(()=>import("./index-Dqyfi4dm.js"),[]).then(e=>e.wallet);case"io.helixid":return t?a(()=>import("./image-Dkp4M1ik.js"),[]).then(e=>e.default):a(()=>import("./index-RJhc6LnM.js"),[]).then(e=>e.wallet);case"com.broearn":return t?a(()=>import("./image-JyGUnQ_N.js"),[]).then(e=>e.default):a(()=>import("./index-WsH2ZGfO.js"),[]).then(e=>e.wallet);case"io.altme":return t?a(()=>import("./image-MQbcgW7z.js"),[]).then(e=>e.default):a(()=>import("./index-CpMkh5pZ.js"),[]).then(e=>e.wallet);case"app.herewallet":return t?a(()=>import("./image-gnC_p3Da.js"),[]).then(e=>e.default):a(()=>import("./index-CecEswCv.js"),[]).then(e=>e.wallet);case"com.coinsdo":return t?a(()=>import("./image-DrHhCSDD.js"),[]).then(e=>e.default):a(()=>import("./index-DJYG2Vtc.js"),[]).then(e=>e.wallet);case"trade.flooz.wallet":return t?a(()=>import("./image-DaaIjpQJ.js"),[]).then(e=>e.default):a(()=>import("./index-C6EDKfcJ.js"),[]).then(e=>e.wallet);case"com.tapwallet":return t?a(()=>import("./image-BxeDPEwg.js"),[]).then(e=>e.default):a(()=>import("./index-BwCUvEoQ.js"),[]).then(e=>e.wallet);case"fun.tobi":return t?a(()=>import("./image-DmhgJWq-.js"),[]).then(e=>e.default):a(()=>import("./index-C1adBKyv.js"),[]).then(e=>e.wallet);case"com.bitnovo":return t?a(()=>import("./image-BTZyVpoA.js"),[]).then(e=>e.default):a(()=>import("./index-CaZIFXyW.js"),[]).then(e=>e.wallet);case"io.xucre":return t?a(()=>import("./image-DZ-B-aVa.js"),[]).then(e=>e.default):a(()=>import("./index-BBDAdmKp.js"),[]).then(e=>e.wallet);case"app.girin":return t?a(()=>import("./image-CkQb0YUH.js"),[]).then(e=>e.default):a(()=>import("./index-CpJZxSfI.js"),[]).then(e=>e.wallet);case"finance.panaroma":return t?a(()=>import("./image-Z9k3mhsb.js"),[]).then(e=>e.default):a(()=>import("./index-BIeLm-x3.js"),[]).then(e=>e.wallet);case"app.clot":return t?a(()=>import("./image-DZplWZyD.js"),[]).then(e=>e.default):a(()=>import("./index-BVQeUBdj.js"),[]).then(e=>e.wallet);case"io.transi":return t?a(()=>import("./image-Dc5zhKf6.js"),[]).then(e=>e.default):a(()=>import("./index-DDggnqr4.js"),[]).then(e=>e.wallet);case"world.qoin":return t?a(()=>import("./image-BPAkEl8k.js"),[]).then(e=>e.default):a(()=>import("./index-C9taR4Do.js"),[]).then(e=>e.wallet);case"com.greengloryglobal":return t?a(()=>import("./image-lOdcUtWG.js"),[]).then(e=>e.default):a(()=>import("./index-C-OT0KJG.js"),[]).then(e=>e.wallet);case"com.amazewallet":return t?a(()=>import("./image-2wmDBIB6.js"),[]).then(e=>e.default):a(()=>import("./index-DvXpQOkv.js"),[]).then(e=>e.wallet);case"zone.bitverse":return t?a(()=>import("./image-C6aZzydG.js"),[]).then(e=>e.default):a(()=>import("./index-CN6XdMAo.js"),[]).then(e=>e.wallet);case"social.gm2":return t?a(()=>import("./image-BqtrMo-7.js"),[]).then(e=>e.default):a(()=>import("./index-Coq7--sH.js"),[]).then(e=>e.wallet);case"io.ozonewallet":return t?a(()=>import("./image-BtnrRGhZ.js"),[]).then(e=>e.default):a(()=>import("./index-DFc7lZHb.js"),[]).then(e=>e.wallet);case"io.ukiss":return t?a(()=>import("./image-DFYwzuHA.js"),[]).then(e=>e.default):a(()=>import("./index-CE9n_StB.js"),[]).then(e=>e.wallet);case"finance.islamicoin":return t?a(()=>import("./image-CWG4tRzZ.js"),[]).then(e=>e.default):a(()=>import("./index-pcLdliEp.js"),[]).then(e=>e.wallet);case"io.copiosa":return t?a(()=>import("./image-DuQoo_kR.js"),[]).then(e=>e.default):a(()=>import("./index-CWmGdvBR.js"),[]).then(e=>e.wallet);case"world.fncy":return t?a(()=>import("./image-B5M2ftPa.js"),[]).then(e=>e.default):a(()=>import("./index-Ba45jQBJ.js"),[]).then(e=>e.wallet);case"io.moonstake":return t?a(()=>import("./image-zsArRLIF.js"),[]).then(e=>e.default):a(()=>import("./index-C7HuhgLE.js"),[]).then(e=>e.wallet);case"com.trusteeglobal":return t?a(()=>import("./image-iR_slvRo.js"),[]).then(e=>e.default):a(()=>import("./index-CNLH4wrU.js"),[]).then(e=>e.wallet);case"net.spatium":return t?a(()=>import("./image-DBFrM6tr.js"),[]).then(e=>e.default):a(()=>import("./index-BJBC3bLU.js"),[]).then(e=>e.wallet);case"co.filwallet":return t?a(()=>import("./image-Do8rO3zE.js"),[]).then(e=>e.default):a(()=>import("./index-D7FslwZl.js"),[]).then(e=>e.wallet);case"money.snowball":return t?a(()=>import("./image-3Q7PfsJG.js"),[]).then(e=>e.default):a(()=>import("./index-yOwMLl2f.js"),[]).then(e=>e.wallet);case"com.ennowallet":return t?a(()=>import("./image-Ccx8wDSE.js"),[]).then(e=>e.default):a(()=>import("./index-BRIQuVzg.js"),[]).then(e=>e.wallet);case"io.safematrix":return t?a(()=>import("./image-BX4sAPzh.js"),[]).then(e=>e.default):a(()=>import("./index-Yk_iQY25.js"),[]).then(e=>e.wallet);case"pro.assure":return t?a(()=>import("./image-DMTT8AeN.js"),[]).then(e=>e.default):a(()=>import("./index-BfYVYwh5.js"),[]).then(e=>e.wallet);case"com.neftipedia":return t?a(()=>import("./image-vrSaD0K9.js"),[]).then(e=>e.default):a(()=>import("./index-BHZDuU0I.js"),[]).then(e=>e.wallet);case"io.goldbit":return t?a(()=>import("./image-CtiFcEL8.js"),[]).then(e=>e.default):a(()=>import("./index-DFrKYv4g.js"),[]).then(e=>e.wallet);case"com.coingrig":return t?a(()=>import("./image-NsVKBwxZ.js"),[]).then(e=>e.default):a(()=>import("./index-DcyXtFTG.js"),[]).then(e=>e.wallet);case"io.xfun":return t?a(()=>import("./image-CPMDxql6.js"),[]).then(e=>e.default):a(()=>import("./index-B05algAv.js"),[]).then(e=>e.wallet);case"com.antiersolutions":return t?a(()=>import("./image-BMh4HSr7.js"),[]).then(e=>e.default):a(()=>import("./index-DufOfQ90.js"),[]).then(e=>e.wallet);case"com.itoken":return t?a(()=>import("./image-BwBO8BTi.js"),[]).then(e=>e.default):a(()=>import("./index-BftqI1FU.js"),[]).then(e=>e.wallet);case"com.cardstack":return t?a(()=>import("./image-D7Sd6W8U.js"),[]).then(e=>e.default):a(()=>import("./index-BiHhxeDt.js"),[]).then(e=>e.wallet);case"io.slavi":return t?a(()=>import("./image-BQUnnXTb.js"),[]).then(e=>e.default):a(()=>import("./index-Kt6GlPCW.js"),[]).then(e=>e.wallet);case"tech.defiantapp":return t?a(()=>import("./image-D4-YMi52.js"),[]).then(e=>e.default):a(()=>import("./index-DPic1oJg.js"),[]).then(e=>e.wallet);case"com.dexari":return t?a(()=>import("./image-BoANtDMS.js"),[]).then(e=>e.default):a(()=>import("./index-DPFoWmV6.js"),[]).then(e=>e.wallet);case"io.cfcx":return t?a(()=>import("./image-139plIjh.js"),[]).then(e=>e.default):a(()=>import("./index-Cws1zSAX.js"),[]).then(e=>e.wallet);case"com.socjsc":return t?a(()=>import("./image-Crp2YP47.js"),[]).then(e=>e.default):a(()=>import("./index-C_XOoDbk.js"),[]).then(e=>e.wallet);case"com.tokenb":return t?a(()=>import("./image-8LnJ1bNt.js"),[]).then(e=>e.default):a(()=>import("./index-DcwbqEHj.js"),[]).then(e=>e.wallet);case"org.onyx":return t?a(()=>import("./image-DKcWaLtu.js"),[]).then(e=>e.default):a(()=>import("./index-C5NL4PoV.js"),[]).then(e=>e.wallet);case"io.gk8":return t?a(()=>import("./image-ZwibGfzR.js"),[]).then(e=>e.default):a(()=>import("./index-CLxj2t1J.js"),[]).then(e=>e.wallet);case"com.anchorage":return t?a(()=>import("./image-OT0Fb2Nb.js"),[]).then(e=>e.default):a(()=>import("./index-aoLVKFG1.js"),[]).then(e=>e.wallet);case"com.hashport.wallet":return t?a(()=>import("./image-DooF_Vfs.js"),[]).then(e=>e.default):a(()=>import("./index-DICTy0sa.js"),[]).then(e=>e.wallet);case"io.billionwallet":return t?a(()=>import("./image-DDBzbPSl.js"),[]).then(e=>e.default):a(()=>import("./index-CmCRou09.js"),[]).then(e=>e.wallet);case"com.dlicom":return t?a(()=>import("./image-lXBTHYnD.js"),[]).then(e=>e.default):a(()=>import("./index-l8DhIVZW.js"),[]).then(e=>e.wallet);case"com.tychiwallet":return t?a(()=>import("./image-pcyfaNhf.js"),[]).then(e=>e.default):a(()=>import("./index-B3vR_dtk.js"),[]).then(e=>e.wallet);case"at.swe":return t?a(()=>import("./image-C8_9fy1e.js"),[]).then(e=>e.default):a(()=>import("./index-ficai7Ce.js"),[]).then(e=>e.wallet);case"network.wali":return t?a(()=>import("./image-CSyxcTwp.js"),[]).then(e=>e.default):a(()=>import("./index-Dzkop1Gk.js"),[]).then(e=>e.wallet);case"io.diamante":return t?a(()=>import("./image-Dh9w9A8z.js"),[]).then(e=>e.default):a(()=>import("./index-C1a5oPtZ.js"),[]).then(e=>e.wallet);case"ai.interlinklabs":return t?a(()=>import("./image-Dz82Zyfj.js"),[]).then(e=>e.default):a(()=>import("./index-BTqXeJHf.js"),[]).then(e=>e.wallet);case"com.walllet":return t?a(()=>import("./image-VFWT6oS6.js"),[]).then(e=>e.default):a(()=>import("./index-DPgWRg9-.js"),[]).then(e=>e.wallet);case"org.lunascape":return t?a(()=>import("./image-D4nkyGrg.js"),[]).then(e=>e.default):a(()=>import("./index-4Nmn8ium.js"),[]).then(e=>e.wallet);case"com.nvxowallet":return t?a(()=>import("./image-BoS2kgXC.js"),[]).then(e=>e.default):a(()=>import("./index-CRRdY0XA.js"),[]).then(e=>e.wallet);case"today.paywithcrypto.wallet":return t?a(()=>import("./image-CsUCYFyx.js"),[]).then(e=>e.default):a(()=>import("./index-CFUSXkKo.js"),[]).then(e=>e.wallet);case"ai.iluminary":return t?a(()=>import("./image-CEuSmI3b.js"),[]).then(e=>e.default):a(()=>import("./index-D1j-SvoJ.js"),[]).then(e=>e.wallet);case"io.reactwallet":return t?a(()=>import("./image-B3lDLhwe.js"),[]).then(e=>e.default):a(()=>import("./index-CTs1t6rA.js"),[]).then(e=>e.wallet);case"com.rewardywallet":return t?a(()=>import("./image-DVyDRAAO.js"),[]).then(e=>e.default):a(()=>import("./index-cF_6KJvb.js"),[]).then(e=>e.wallet);case"io.walletv":return t?a(()=>import("./image-CTBdimeM.js"),[]).then(e=>e.default):a(()=>import("./index-He5kaR9n.js"),[]).then(e=>e.wallet);case"app.outlawgames":return t?a(()=>import("./image-BPqXYngz.js"),[]).then(e=>e.default):a(()=>import("./index-D2hPph8l.js"),[]).then(e=>e.wallet);case"io.ironwallet":return t?a(()=>import("./image-BKNtkg6s.js"),[]).then(e=>e.default):a(()=>import("./index-B1-qcL-p.js"),[]).then(e=>e.wallet);case"com.mecowallet":return t?a(()=>import("./image-m7IlStdm.js"),[]).then(e=>e.default):a(()=>import("./index-BdgyG9Qa.js"),[]).then(e=>e.wallet);case"com.onlybulls":return t?a(()=>import("./image-qLUwfjzV.js"),[]).then(e=>e.default):a(()=>import("./index-DPPIbXj8.js"),[]).then(e=>e.wallet);case"me.qiewallet":return t?a(()=>import("./image-BHJFFIIN.js"),[]).then(e=>e.default):a(()=>import("./index-D6zAueb_.js"),[]).then(e=>e.wallet);case"fund.lflabs":return t?a(()=>import("./image-dO78_uyn.js"),[]).then(e=>e.default):a(()=>import("./index-BBkeSt5m.js"),[]).then(e=>e.wallet);case"io.walletverse":return t?a(()=>import("./image-DUk3AUBd.js"),[]).then(e=>e.default):a(()=>import("./index-CfO_m3oL.js"),[]).then(e=>e.wallet);case"com.berasig":return t?a(()=>import("./image-CisWvLpc.js"),[]).then(e=>e.default):a(()=>import("./index-Cg1E5HxJ.js"),[]).then(e=>e.wallet);case"app.phantom":return t?a(()=>import("./image-6levnvAC.js"),[]).then(e=>e.default):a(()=>import("./index-IBUgXgOa.js"),[]).then(e=>e.wallet);case"com.coinbase.wallet":return t?a(()=>import("./image-C6EsuPXB.js"),[]).then(e=>e.default):a(()=>import("./index-BILUwmJ9.js"),[]).then(e=>e.wallet);case"io.rabby":return t?a(()=>import("./image-CZ2qSHpt.js"),[]).then(e=>e.default):a(()=>import("./index-Bprjmfje.js"),[]).then(e=>e.wallet);case"com.brave.wallet":return t?a(()=>import("./image-9Jtg22X3.js"),[]).then(e=>e.default):a(()=>import("./index-DKbx-y78.js"),[]).then(e=>e.wallet);case"fi.nu":return t?a(()=>import("./image-BAl5qyeX.js"),[]).then(e=>e.default):a(()=>import("./index-BXi61TZ5.js"),[]).then(e=>e.wallet);case"pro.hinkal.walletconnect":return t?a(()=>import("./image-d8n8A6si.js"),[]).then(e=>e.default):a(()=>import("./index-CujrNB-Q.js"),[]).then(e=>e.wallet);case"com.moongate.one":return t?a(()=>import("./image-DZc2BYzk.js"),[]).then(e=>e.default):a(()=>import("./index-B2WV7sR7.js"),[]).then(e=>e.wallet);case"tech.levain":return t?a(()=>import("./image-DcIu3U38.js"),[]).then(e=>e.default):a(()=>import("./index-CEpc_g8h.js"),[]).then(e=>e.wallet);case"com.enkrypt":return t?a(()=>import("./image-DvpdMMzF.js"),[]).then(e=>e.default):a(()=>import("./index-Cc4uopde.js"),[]).then(e=>e.wallet);case"com.scramble":return t?a(()=>import("./image-DT5Fvf2s.js"),[]).then(e=>e.default):a(()=>import("./index-D4Sgj1mL.js"),[]).then(e=>e.wallet);case"io.finoa":return t?a(()=>import("./image-D_i0o0Nv.js"),[]).then(e=>e.default):a(()=>import("./index-DFghxfjK.js"),[]).then(e=>e.wallet);case"com.blazpay.wallet":return t?a(()=>import("./image-CgHABHdL.js"),[]).then(e=>e.default):a(()=>import("./index-B_OXuBhF.js"),[]).then(e=>e.wallet);case"io.getjoin.prd":return t?a(()=>import("./image-CmWdSXJI.js"),[]).then(e=>e.default):a(()=>import("./index-QvBzJwgv.js"),[]).then(e=>e.wallet);case"xyz.talisman":return t?a(()=>import("./image-VlTaWJmy.js"),[]).then(e=>e.default):a(()=>import("./index-BgbYZOnC.js"),[]).then(e=>e.wallet);case"eu.flashsoft.clear-wallet":return t?a(()=>import("./image-gxCVLutB.js"),[]).then(e=>e.default):a(()=>import("./index-BBiL2lyk.js"),[]).then(e=>e.wallet);case"app.berasig":return t?a(()=>import("./image-BjTMD2k8.js"),[]).then(e=>e.default):a(()=>import("./index-DkcP2fCc.js"),[]).then(e=>e.wallet);case"com.wallet.reown":return t?a(()=>import("./image-CC2_AL18.js"),[]).then(e=>e.default):a(()=>import("./index-BEx6ckei.js"),[]).then(e=>e.wallet);case"io.runonflux.sspwallet":return t?a(()=>import("./image-DfzpWAED.js"),[]).then(e=>e.default):a(()=>import("./index-CrUcAJK0.js"),[]).then(e=>e.wallet);case"com.blanqlabs.wallet":return t?a(()=>import("./image-wR942Jk6.js"),[]).then(e=>e.default):a(()=>import("./index-DBst6Hla.js"),[]).then(e=>e.wallet);case"io.hero.wallet":return t?a(()=>import("./image-BbH7e9pw.js"),[]).then(e=>e.default):a(()=>import("./index-BBANTdk4.js"),[]).then(e=>e.wallet);case"network.verified.custody":return t?a(()=>import("./image-DpjDzWCs.js"),[]).then(e=>e.default):a(()=>import("./index-CyhgnW_d.js"),[]).then(e=>e.wallet);case"console.utila.io":return t?a(()=>import("./image-C7tHBnQp.js"),[]).then(e=>e.default):a(()=>import("./index-BrOCsLbf.js"),[]).then(e=>e.wallet);case"com.micet.wallet":return t?a(()=>import("./image-On2ij4Ix.js"),[]).then(e=>e.default):a(()=>import("./index-JAAqCLcG.js"),[]).then(e=>e.wallet);case"world.dolphinode.chain":return t?a(()=>import("./image-BXzPnbc4.js"),[]).then(e=>e.default):a(()=>import("./index-CiwBOkla.js"),[]).then(e=>e.wallet);case"com.lootrush":return t?a(()=>import("./image-t4jvKgpV.js"),[]).then(e=>e.default):a(()=>import("./index-BLsnOBhg.js"),[]).then(e=>e.wallet);case"xyz.dawnwallet":return t?a(()=>import("./image-bpacFMFT.js"),[]).then(e=>e.default):a(()=>import("./index-BqK7Phb6.js"),[]).then(e=>e.wallet);case"xyz.abs":return t?a(()=>import("./image-DFo7XMVJ.js"),[]).then(e=>e.default):a(()=>import("./index-8Ff6vDUD.js"),[]).then(e=>e.wallet);case"sh.frame":return t?a(()=>import("./image-C1w2WpL5.js"),[]).then(e=>e.default):a(()=>import("./index-cAvSYrmF.js"),[]).then(e=>e.wallet);case"io.useglyph":return t?a(()=>import("./image-C46yxCl4.js"),[]).then(e=>e.default):a(()=>import("./index-DE_8irSD.js"),[]).then(e=>e.wallet);case"org.base.account":return t?a(()=>import("./image-Ds78yECl.js"),[]).then(e=>e.default):a(()=>import("./index-kNZGxYSe.js"),[]).then(e=>e.wallet);default:throw new Error(`Wallet with id ${n} not found`)}}function Cp(){const n=new Map;return{emit(t,e){const r=n.get(t);if(r)for(const i of r)i(e)},subscribe(t,e){return n.has(t)?n.get(t)?.add(e):n.set(t,new Set([e])),()=>{const r=n.get(t);r&&r.delete(e)}}}}function Sn(){return Cp()}function $p(n){const{createOptions:t}=n,e=Sn();let r,i;function s(){r=void 0,i=void 0}let o=async()=>{},c=async h=>{i=h};const l=e.subscribe("chainChanged",h=>{i=h}),u=e.subscribe("disconnect",()=>{s(),l(),u()});return e.subscribe("accountChanged",h=>{r=h}),{autoConnect:async h=>{const{autoConnectBaseAccountSDK:d}=await a(async()=>{const{autoConnectBaseAccountSDK:E}=await Promise.resolve().then(()=>ja);return{autoConnectBaseAccountSDK:E}},void 0),f=await n.providerFactory(),[p,m,w,_]=await d(h,e,f);return r=p,i=m,o=w,c=_,Xe({chainId:i.id,client:h.client,walletAddress:r.address,walletType:zt}),r},connect:async h=>{const{connectBaseAccountSDK:d}=await a(async()=>{const{connectBaseAccountSDK:E}=await Promise.resolve().then(()=>ja);return{connectBaseAccountSDK:E}},void 0),f=await n.providerFactory(),[p,m,w,_]=await d(h,e,f);return r=p,i=m,o=w,c=_,Xe({chainId:i.id,client:h.client,walletAddress:r.address,walletType:zt}),r},disconnect:async()=>{s(),await o()},getAccount:()=>r,getChain(){if(i)return i=Vn(i.id)||i,i},getConfig:()=>t,id:zt,subscribe:e.subscribe,switchChain:async h=>{await c(h)}}}function Pi(){if(!du())return{description:"thirdweb powered dApp",logoUrl:"https://thirdweb.com/favicon.ico",name:"thirdweb powered dApp",url:"https://thirdweb.com"};const{protocol:n,hostname:t,port:e}=window.location;let r=`${n}//${t}`;e&&e!=="80"&&e!=="443"&&(r+=`:${e}`);const i=`${r}/favicon.ico`;return{description:window.document.title||"thirdweb powered dApp",logoUrl:i,name:window.document.title||"thirdweb powered dApp",url:r}}let cs,Yr;async function wu(n){if(cs){if(n&&Yr){const s=Yr.chains?.map(u=>u.id)||[],o=n.chains?.map(u=>u.id)||[],c=s.length===o.length&&s.every((u,h)=>u===o[h]),l=n.appMetadata?.name===Yr.appMetadata?.name;(!c||!l)&&console.warn("[Base Account SDK] Provider already initialized with different options. The Base Account SDK uses a singleton provider - subsequent configurations are ignored. Create only one Base Account wallet instance per application.")}return cs}const{createBaseAccountSDK:t}=await a(async()=>{const{createBaseAccountSDK:s}=await import("./index-DSbNI5uF.js");return{createBaseAccountSDK:s}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])),e=Pi(),i=t({appName:n?.appMetadata?.name||e.name||"thirdweb powered dApp",appLogoUrl:n?.appMetadata?.logoUrl||e.logoUrl||null,appChainIds:n?.chains?.map(s=>s.id)||[]}).getProvider();return cs=i,Yr=n,i}function yu(n){return n.id===zt}function qa({provider:n,address:t,client:e}){const r={address:J(t),async sendTransaction(i){const s=await n.request({method:"eth_sendTransaction",params:[{accessList:i.accessList,data:i.data,from:J(t),gas:i.gas?Me(i.gas):void 0,to:i.to,value:i.value?Me(i.value):void 0}]});return Co({chainId:i.chainId,client:e,contractAddress:i.to??void 0,gasPrice:i.gasPrice,transactionHash:s,walletAddress:J(t),walletType:zt}),{transactionHash:s}},async signMessage({message:i}){if(!r.address)throw new Error("Provider not setup");const s=typeof i=="string"?$o(i):i.raw instanceof Uint8Array?qi(i.raw):i.raw,o=await n.request({method:"personal_sign",params:[s,r.address]});if(!xr(o))throw new Error("Invalid signature returned");return o},async signTypedData(i){if(!r.address)throw new Error("Provider not setup");const{domain:s,message:o,primaryType:c}=Fo(i),l={EIP712Domain:Ql(s),...i.types};Xl({domain:s,message:o,primaryType:c,types:l});const u=eu({domain:s??{},message:o,primaryType:c,types:l}),h=await n.request({method:"eth_signTypedData_v4",params:[r.address,u]});if(!xr(h))throw new Error("Invalid signed payload returned");return h},sendCalls:async i=>{try{const{callParams:s,chain:o}=await Go(i,r),c=await n.request({method:"wallet_sendCalls",params:s});return c&&typeof c=="object"&&"id"in c?{chain:o,client:e,id:c.id}:{chain:o,client:e,id:c}}catch(s){throw/unsupport|not support/i.test(s.message)?new Error(`${zt} errored calling wallet_sendCalls, with error: ${s instanceof Error?s.message:Ie(s)}`):s}},async getCallsStatus(i){try{const s=await n.request({method:"wallet_getCallsStatus",params:[i.id]});return Wo(s)}catch(s){throw/unsupport|not support/i.test(s.message)?new Error(`${zt} does not support wallet_getCallsStatus, reach out to them directly to request EIP-5792 support.`):s}},async getCapabilities(i){const s=i.chainId;try{const o=await n.request({method:"wallet_getCapabilities",params:[J(r.address)]});return Ho(o,s)}catch(o){if(/unsupport|not support|not available/i.test(o.message))return{message:`${zt} does not support wallet_getCapabilities, reach out to them directly to request EIP-5792 support.`};throw o}}};return r}function gu(n,t,e,r,i){const s=qa({address:n,client:i,provider:e});async function o(){e.off("accountsChanged",l),e.off("chainChanged",u),e.off("disconnect",c),await e.disconnect()}async function c(){o(),r.emit("disconnect",void 0)}function l(h){if(h[0]){const d=qa({address:J(h[0]),client:i,provider:e});r.emit("accountChanged",d),r.emit("accountsChanged",h)}else c()}function u(h){const d=Te(bt(h));r.emit("chainChanged",d)}return e.on("accountsChanged",l),e.on("chainChanged",u),e.on("disconnect",c),[s,t,c,h=>Eu(e,h)]}async function kp(n,t,e){const r=await e.request({method:"eth_requestAccounts"});if(!r[0])throw new Error("No accounts found");const i=J(r[0]),s=await e.request({method:"eth_chainId"}),o=bt(s);let c=n.chain&&n.chain.id===o?n.chain:Te(o);return o&&n?.chain&&o!==n?.chain.id&&(await Eu(e,n.chain),c=n.chain),gu(i,c,e,t,n.client)}async function Up(n,t,e){const i=(await e.request({method:"eth_accounts"}))[0];if(!i)throw new Error("No accounts found");const s=await e.request({method:"eth_chainId"}),o=bt(s),c=n.chain&&n.chain.id===o?n.chain:Te(o);return gu(i,c,e,t,n.client)}async function Eu(n,t){const e=await n.request({method:"eth_chainId"});if(Te(bt(e))?.id===t.id)return;const i=Me(t.id);try{await n.request({method:"wallet_switchEthereumChain",params:[{chainId:i}]})}catch(s){const o=await Bo(t);s?.code===4902&&await n.request({method:"wallet_addEthereumChain",params:[{blockExplorerUrls:o.explorers?.map(c=>c.url)||[],chainId:i,chainName:o.name,nativeCurrency:o.nativeCurrency,rpcUrls:Zo(o)}]})}}const ja=Object.freeze(Object.defineProperty({__proto__:null,autoConnectBaseAccountSDK:Up,connectBaseAccountSDK:kp,getBaseAccountWebProvider:wu,isBaseAccountSDKWallet:yu},Symbol.toStringTag,{value:"Module"}));function Np(n){const{createOptions:t}=n,e=Sn();let r,i;function s(){r=void 0,i=void 0}let o=async()=>{},c=async h=>{i=h};const l=e.subscribe("chainChanged",h=>{i=h}),u=e.subscribe("disconnect",()=>{s(),l(),u()});return e.subscribe("accountChanged",h=>{r=h}),{autoConnect:async h=>{const{autoConnectCoinbaseWalletSDK:d}=await a(async()=>{const{autoConnectCoinbaseWalletSDK:E}=await Promise.resolve().then(()=>Ka);return{autoConnectCoinbaseWalletSDK:E}},void 0),f=await n.providerFactory(),[p,m,w,_]=await d(h,e,f);return r=p,i=m,o=w,c=_,Xe({chainId:i.id,client:h.client,walletAddress:r.address,walletType:xt}),r},connect:async h=>{const{connectCoinbaseWalletSDK:d}=await a(async()=>{const{connectCoinbaseWalletSDK:E}=await Promise.resolve().then(()=>Ka);return{connectCoinbaseWalletSDK:E}},void 0),f=await n.providerFactory(),[p,m,w,_]=await d(h,e,f);return r=p,i=m,o=w,c=_,Xe({chainId:i.id,client:h.client,walletAddress:r.address,walletType:xt}),r},disconnect:async()=>{s(),await o()},getAccount:()=>r,getChain(){if(i)return i=Vn(i.id)||i,i},getConfig:()=>t,id:xt,onConnectRequested:async()=>{if(n.onConnectRequested){const h=await n.providerFactory();return n.onConnectRequested?.(h)}},subscribe:e.subscribe,switchChain:async h=>{await c(h)}}}async function vu(n){await n?.communicator?.waitForPopupLoaded?.()}const Bp=Object.freeze(Object.defineProperty({__proto__:null,showCoinbasePopup:vu},Symbol.toStringTag,{value:"Module"}));let ls;async function bu(n){if(!ls){let t=(await a(()=>import("./index-CrU71-54.js"),__vite__mapDeps([13,8,6,7]))).default;typeof t!="function"&&typeof t.default=="function"&&(t=t.default);const r=new t({appChainIds:n?.chains?n.chains.map(i=>i.id):void 0,appLogoUrl:n?.appMetadata?.logoUrl||Pi().logoUrl,appName:n?.appMetadata?.name||Pi().name}).makeWeb3Provider(n?.walletConfig);return ls=r,r}return ls}function za({provider:n,address:t,client:e}){const r={address:J(t),onTransactionRequested:async()=>{window.localStorage&&window.localStorage.getItem("-CBWSDK:SignerConfigurator:SignerType")==="scw"&&await vu(n)},async sendTransaction(i){const s=await n.request({method:"eth_sendTransaction",params:[{accessList:i.accessList,data:i.data,from:J(t),gas:i.gas?Me(i.gas):void 0,to:i.to,value:i.value?Me(i.value):void 0}]});return Co({chainId:i.chainId,client:e,contractAddress:i.to??void 0,gasPrice:i.gasPrice,transactionHash:s,walletAddress:J(t),walletType:xt}),{transactionHash:s}},async signMessage({message:i}){if(!r.address)throw new Error("Provider not setup");const s=typeof i=="string"?$o(i):i.raw instanceof Uint8Array?qi(i.raw):i.raw,o=await n.request({method:"personal_sign",params:[s,r.address]});if(!xr(o))throw new Error("Invalid signature returned");return o},async signTypedData(i){if(!r.address)throw new Error("Provider not setup");const{domain:s,message:o,primaryType:c}=Fo(i),l={EIP712Domain:Ql(s),...i.types};Xl({domain:s,message:o,primaryType:c,types:l});const u=eu({domain:s??{},message:o,primaryType:c,types:l}),h=await n.request({method:"eth_signTypedData_v4",params:[r.address,u]});if(!xr(h))throw new Error("Invalid signed payload returned");return h},sendCalls:async i=>{try{const{callParams:s,chain:o}=await Go(i,r),c=await n.request({method:"wallet_sendCalls",params:s});return c&&typeof c=="object"&&"id"in c?{chain:o,client:e,id:c.id}:{chain:o,client:e,id:c}}catch(s){throw/unsupport|not support/i.test(s.message)?new Error(`${xt} errored calling wallet_sendCalls, with error: ${s instanceof Error?s.message:Ie(s)}`):s}},async getCallsStatus(i){try{const s=await n.request({method:"wallet_getCallsStatus",params:[i.id]});return Wo(s)}catch(s){throw/unsupport|not support/i.test(s.message)?new Error(`${xt} does not support wallet_getCallsStatus, reach out to them directly to request EIP-5792 support.`):s}},async getCallsStatusRaw(i){try{return await n.request({method:"wallet_getCallsStatus",params:[i.id]})}catch(s){throw/unsupport|not support/i.test(s.message)?new Error(`${xt} does not support wallet_getCallsStatus, reach out to them directly to request EIP-5792 support.`):s}},async getCapabilities(i){const s=i.chainId;try{const o=await n.request({method:"wallet_getCapabilities",params:[J(r.address)]});return Ho(o,s)}catch(o){if(/unsupport|not support|not available/i.test(o.message))return{message:`${xt} does not support wallet_getCapabilities, reach out to them directly to request EIP-5792 support.`};throw o}}};return r}function Iu(n,t,e,r,i){const s=za({address:n,client:i,provider:e});async function o(){e.removeListener("accountsChanged",l),e.removeListener("chainChanged",u),e.removeListener("disconnect",c),await e.disconnect()}async function c(){o(),r.emit("disconnect",void 0)}function l(h){if(h[0]){const d=za({address:J(h[0]),client:i,provider:e});r.emit("accountChanged",d),r.emit("accountsChanged",h)}else c()}function u(h){const d=Te(bt(h));r.emit("chainChanged",d)}return e.on("accountsChanged",l),e.on("chainChanged",u),e.on("disconnect",c),[s,t,c,h=>Au(e,h)]}async function Mp(n,t,e){const r=await e.request({method:"eth_requestAccounts"});if(!r[0])throw new Error("No accounts found");const i=J(r[0]),s=await e.request({method:"eth_chainId"}),o=bt(s);let c=n.chain&&n.chain.id===o?n.chain:Te(o);return o&&n?.chain&&o!==n?.chain.id&&(await Au(e,n.chain),c=n.chain),Iu(i,c,e,t,n.client)}async function qp(n,t,e){const i=(await e.request({method:"eth_accounts"}))[0];if(!i)throw new Error("No accounts found");const s=await e.request({method:"eth_chainId"}),o=bt(s),c=n.chain&&n.chain.id===o?n.chain:Te(o);return Iu(i,c,e,t,n.client)}async function Au(n,t){const e=await n.request({method:"eth_chainId"});if(Te(bt(e))?.id===t.id)return;const i=Me(t.id);try{await n.request({method:"wallet_switchEthereumChain",params:[{chainId:i}]})}catch(s){const o=await Bo(t);s?.code===4902&&await n.request({method:"wallet_addEthereumChain",params:[{blockExplorerUrls:o.explorers?.map(c=>c.url)||[],chainId:i,chainName:o.name,nativeCurrency:o.nativeCurrency,rpcUrls:Zo(o)}]})}}const Ka=Object.freeze(Object.defineProperty({__proto__:null,autoConnectCoinbaseWalletSDK:qp,connectCoinbaseWalletSDK:Mp,getCoinbaseWebProvider:bu},Symbol.toStringTag,{value:"Module"}));async function jp(n){return ou(async()=>{const e=await(await fetch(`${zi("inAppWallet")}/api/2024-05-05/ecosystem-wallet`,{headers:{"x-ecosystem-id":n}})).json();if(!e||e.code==="UNAUTHORIZED")throw new Error(e.message||`Could not find ecosystem wallet with id ${n}, please check your ecosystem wallet configuration.`);return e.authOptions?.includes("siwe")&&(e.authOptions=e.authOptions.filter(r=>r!=="siwe"),e.authOptions.push("wallet")),e},{cacheKey:`ecosystem-wallet-options-${n}`,cacheTime:1e3*60*5})}const us=new Map;async function yr(n,t,e){const r=Ie({clientId:n.clientId,ecosystem:e,partialSecretKey:n.secretKey?.slice(0,5)});if(us.has(r))return us.get(r);const i=await t(n);return us.set(r,i),i}function Tu(n){const{createOptions:t,connectorFactory:e,ecosystem:r}=n,i=r?r.id:"inApp",s=Sn();let o=t,c,l,u,h,d=null;const f=async p=>{if(r){const m=await jp(r.id),w=m?.smartAccountOptions;if(w)if(m.smartAccountOptions.executionMode==="EIP7702")o={...o,executionMode:{mode:"EIP7702",sponsorGas:w.sponsorGas}};else{const{defaultChainId:E}=m.smartAccountOptions,v=p?.chain??(E?Te(E):void 0);if(!v)throw new Error("A chain must be provided either via 'chain' in connect options or 'defaultChainId' in ecosystem configuration. Please pass it via connect() or update the ecosystem configuration.");o={...o,smartAccount:{chain:v,factoryAddress:w.accountFactoryAddress,sponsorGas:w.sponsorGas}}}}};return{autoConnect:async p=>{const{autoConnectInAppWallet:m}=await a(async()=>{const{autoConnectInAppWallet:g}=await Promise.resolve().then(()=>js);return{autoConnectInAppWallet:g}},void 0),w=await yr(p.client,e,r);await f();const{account:_,chain:E,adminAccount:v}=await m(p,o,w);h=p.client,c=_,l=v,u=E;try{d=await w.storage.getAuthCookie()}catch(g){console.error("Failed to retrieve auth token:",g),d=null}return Xe({chainId:u.id,client:p.client,ecosystem:r,walletAddress:c.address,walletType:i}),c},connect:async p=>{const{connectInAppWallet:m}=await a(async()=>{const{connectInAppWallet:g}=await Promise.resolve().then(()=>js);return{connectInAppWallet:g}},void 0),w=await yr(p.client,e,r);await f();const{account:_,chain:E,adminAccount:v}=await m(p,o,w);h=p.client,c=_,l=v,u=E;try{d=await w.storage.getAuthCookie()}catch(g){console.error("Failed to retrieve auth token:",g),d=null}return Xe({chainId:u.id,client:p.client,ecosystem:r,walletAddress:c.address,walletType:i}),c},disconnect:async()=>{if(h&&!(await(await yr(h,e,r)).logout()).success)throw new Error("Failed to logout");c=void 0,l=void 0,u=void 0,d=null,s.emit("disconnect",void 0)},getAccount:()=>c,getAdminAccount:()=>l,getAuthToken:()=>d,getChain(){if(u)return u=Vn(u.id)||u,u},getConfig:()=>o,id:i,subscribe:s.subscribe,switchChain:async p=>{if((o?.smartAccount||o?.executionMode?.mode==="EIP4337")&&h&&c){const{autoConnectInAppWallet:m}=await a(async()=>{const{autoConnectInAppWallet:g}=await Promise.resolve().then(()=>js);return{autoConnectInAppWallet:g}},void 0),w=await yr(h,e,r);await f({chain:p});const{account:_,chain:E,adminAccount:v}=await m({chain:p,client:h},o,w);l=v,c=_,u=E}else u=p;s.emit("chainChanged",p)}}}function Pu(...n){const[t,e]=n,r={id:t,partnerId:e?.partnerId};return Tu({connectorFactory:async i=>{const{InAppWebConnector:s}=await a(async()=>{const{InAppWebConnector:o}=await import("./web-connector-C73Vanyj.js");return{InAppWebConnector:o}},__vite__mapDeps([14,4,15,16,1,17]));return new s({client:i,ecosystem:r,storage:e?.storage})},createOptions:{auth:{...e?.auth,options:[]},partnerId:r.partnerId},ecosystem:r})}function Ws(n){return Tu({connectorFactory:async t=>{const{InAppWebConnector:e}=await a(async()=>{const{InAppWebConnector:r}=await import("./web-connector-C73Vanyj.js");return{InAppWebConnector:r}},__vite__mapDeps([14,4,15,16,1,17]));return new e({client:t,passkeyDomain:n?.auth?.passkeyDomain,storage:n?.storage})},createOptions:n})}function Jo(n){const t=Sn();let e,r,i,s;return{autoConnect:async o=>{const{connectSmartAccount:c}=await a(async()=>{const{connectSmartAccount:h}=await import("./index-BSdPSW5L.js");return{connectSmartAccount:h}},__vite__mapDeps([18,4,16,15,1,19,20,21])),[l,u]=await c(o,n);return s=o,e=l,i=u,Xe({chainId:i.id,client:o.client,walletAddress:e.address,walletType:"smart"}),e},connect:async o=>{const{connectSmartAccount:c}=await a(async()=>{const{connectSmartAccount:h}=await import("./index-BSdPSW5L.js");return{connectSmartAccount:h}},__vite__mapDeps([18,4,16,15,1,19,20,21])),[l,u]=await c(o,n);return r=o.personalAccount,s=o,e=l,i=u,Xe({chainId:i.id,client:o.client,walletAddress:e.address,walletType:"smart"}),t.emit("accountChanged",e),e},disconnect:async()=>{if(e){const{disconnectSmartAccount:o}=await a(async()=>{const{disconnectSmartAccount:c}=await import("./index-BSdPSW5L.js");return{disconnectSmartAccount:c}},__vite__mapDeps([18,4,16,15,1,19,20,21]));await o(e)}e=void 0,r=void 0,i=void 0,t.emit("disconnect",void 0)},getAccount:()=>e,getAdminAccount:()=>r,getChain(){if(i)return i=Vn(i.id)||i,i},getConfig:()=>n,id:"smart",subscribe:t.subscribe,switchChain:async o=>{if(!s)throw new Error("Cannot switch chain without a previous connection");if(!await If(o)){const d=ko({address:n.factoryAddress||vp(n.overrides?.entrypointAddress),chain:o,client:s.client});if(!await Af(d))throw new Error(`Factory contract not deployed on chain: ${o.id}`)}const{connectSmartAccount:l}=await a(async()=>{const{connectSmartAccount:d}=await import("./index-BSdPSW5L.js");return{connectSmartAccount:d}},__vite__mapDeps([18,4,16,15,1,19,20,21])),[u,h]=await l({...s,chain:o},{...n,chain:o});e=u,i=h,t.emit("accountChanged",u),t.emit("chainChanged",h)}}}function Et(...n){const[t,e]=n;switch(!0){case t==="smart":return Jo(e);case(t==="embedded"||t==="inApp"):return Ws(e);case tr(t):return Pu(...n);case t===xt:{const r=e;return Np({createOptions:r,onConnectRequested:async i=>{const{showCoinbasePopup:s}=await a(async()=>{const{showCoinbasePopup:o}=await Promise.resolve().then(()=>Bp);return{showCoinbasePopup:o}},void 0);return s(i)},providerFactory:()=>bu(r)})}case t===zt:{const r=e;return $p({createOptions:r,providerFactory:()=>wu(r)})}default:{let c=function(){i=void 0,s=void 0};const r=Sn();let i,s,o,l=async()=>{};const u=r.subscribe("disconnect",()=>{c(),o?.(),u()});r.subscribe("accountChanged",p=>{i=p});let h=async()=>{throw new Error("Not implemented yet")};const d=Ma()?p=>as(p):void 0,f={autoConnect:async p=>{const{injectedProvider:m}=await a(async()=>{const{injectedProvider:w}=await Promise.resolve().then(()=>Wa);return{injectedProvider:w}},void 0);if(t!=="walletConnect"&&m(t)){const{autoConnectEip1193Wallet:w}=await a(async()=>{const{autoConnectEip1193Wallet:I}=await Promise.resolve().then(()=>Ga);return{autoConnectEip1193Wallet:I}},void 0),[_,E,v,g]=await w({chain:p.chain,client:p.client,emitter:r,id:t,provider:Hs(t)});return i=_,s=E,l=v,h=g,o=r.subscribe("chainChanged",I=>{s=I}),Xe({chainId:s.id,client:p.client,walletAddress:i.address,walletType:t}),i}if(p&&"client"in p){const{autoConnectWC:w}=await a(async()=>{const{autoConnectWC:I}=await import("./controller-BtDVd_aq.js");return{autoConnectWC:I}},__vite__mapDeps([22,4,1,16,15])),[_,E,v,g]=await w(p,r,f.id,Ti,d);return i=_,s=E,l=v,h=g,Xe({chainId:s.id,client:p.client,walletAddress:i.address,walletType:t}),i}throw new Error("Failed to auto connect")},connect:async p=>{async function m(E){const{connectWC:v}=await a(async()=>{const{connectWC:I}=await import("./controller-BtDVd_aq.js");return{connectWC:I}},__vite__mapDeps([22,4,1,16,15]));let g;try{const[I,b,D,x]=await v({...E,walletConnect:{...E.walletConnect,onDisplayUri:E.walletConnect?.onDisplayUri||(async S=>{if(typeof window<"u"&&typeof document<"u")if(Ma()){const y=await mu(t),L=y.mobile.native||y.mobile.universal;as(L?Lp(L,S).redirect:S);return}else try{const{createQROverlay:y}=await a(async()=>{const{createQROverlay:L}=await import("./qr-overlay-ClttGQRf.js");return{createQROverlay:L}},__vite__mapDeps([23,4]));g&&g.destroy(),g=y(S,{theme:E.walletConnect?.qrModalOptions?.themeMode??"dark",qrSize:280,showCloseButton:!0,onCancel:()=>{E.walletConnect?.onCancel?.()}})}catch(y){console.error("Failed to create QR overlay:",y)}})}},r,f.id,Ti,d);return g&&(g.destroy(),g=void 0),i=I,s=b,l=D,h=x,Xe({chainId:s.id,client:E.client,walletAddress:i.address,walletType:t}),i}catch(I){throw g&&(g.destroy(),g=void 0),I}}if(t==="walletConnect"){const{client:E,chain:v,...g}=p;return m({chain:v,client:E,walletConnect:{...g}})}const w=p&&"walletConnect"in p,{injectedProvider:_}=await a(async()=>{const{injectedProvider:E}=await Promise.resolve().then(()=>Wa);return{injectedProvider:E}},void 0);if(_(t)&&!w){const{connectEip1193Wallet:E}=await a(async()=>{const{connectEip1193Wallet:D}=await Promise.resolve().then(()=>Ga);return{connectEip1193Wallet:D}},void 0),[v,g,I,b]=await E({chain:p.chain,client:p.client,emitter:r,id:t,provider:Hs(t)});return i=v,s=g,l=I,h=b,o=r.subscribe("chainChanged",D=>{s=D}),Xe({chainId:s.id,client:p.client,walletAddress:i.address,walletType:t}),i}if(p&&"client"in p)return m(p);throw new Error("Failed to connect")},disconnect:async()=>{c(),await l()},getAccount:()=>i,getChain(){if(s)return s=Vn(s.id)||s,s},getConfig:()=>n[1],id:t,subscribe:r.subscribe,switchChain:async p=>{try{await h(p),s=p}catch(m){console.error("Error switching chain",m)}}};return f}}}function zp(){return Et("walletConnect")}const Fa=du()?Zf():void 0;function Qo(n){return Xo().find(e=>e.info.rdns===n)?.provider}function Ou(){return Xo().map(e=>e.info.rdns).map(e=>Et(e))}function Kp(){if(Fa)return Fa}function Xo(){const n=Kp()?.getProviders()||[];for(const t of n)if(t.info.rdns==="io.metamask.mobile"){t.info.rdns=fu;break}return n}const Wa=Object.freeze(Object.defineProperty({__proto__:null,getInstalledWalletProviders:Xo,getInstalledWallets:Ou,injectedProvider:Qo},Symbol.toStringTag,{value:"Module"})),{getTypesForEIP712Domain:Fp,serializeTypedData:Wp,stringify:Hp,validateTypedData:Gp,withTimeout:Zp}=await Mo("viem");function Hs(n){const t=Qo(n);if(!t)throw new Error(`No injected provider found for wallet: "${n}"`);return t}async function Ru({id:n,provider:t,emitter:e,client:r,chain:i}){let s,c=0;for(;!s?.[0]&&c<3;){try{s=await t.request({method:"eth_requestAccounts"})}catch(f){if(console.error(f),Yp(f)?.toLowerCase()?.includes("rejected"))throw f;await new Promise(p=>setTimeout(p,500))}c++}const l=s?.[0];if(!l)throw new Error("Failed to connect to wallet, no accounts available");const u=J(l),h=await t.request({method:"eth_chainId"}).then(bt).catch(f=>{throw new Error("Error reading chainId from provider",f)});let d=i&&i.id===h?i:Te(h);try{i&&typeof i.id<"u"&&i.id!==h&&(await xu(t,i),d=i)}catch{console.warn(`Error switching to chain ${i?.id} - defaulting to wallet chain (${h})`)}return Du({address:u,chain:d,client:r,emitter:e,id:n,provider:t})}async function Lu({id:n,provider:t,emitter:e,client:r,chain:i}){const o=(await t.request({method:"eth_accounts"}))[0];if(!o)throw new Error("Failed to connect to wallet, no accounts available");const c=J(o),l=await t.request({method:"eth_chainId"}).then(bt),u=i&&i.id===l?i:Te(l);return Du({address:c,chain:u,client:r,emitter:e,id:n,provider:t})}function Ha({provider:n,address:t,client:e,id:r}){const i={address:J(t),async sendTransaction(s){const c=[{...s.gasPrice?{gasPrice:Me(s.gasPrice)}:{maxFeePerGas:s.maxFeePerGas?Me(s.maxFeePerGas):void 0,maxPriorityFeePerGas:s.maxPriorityFeePerGas?Me(s.maxPriorityFeePerGas):void 0},from:this.address,gas:s.gas?Me(s.gas):void 0,nonce:s.nonce?Me(s.nonce):void 0,to:s.to?J(s.to):void 0,data:s.data,value:s.value?Me(s.value):void 0,authorizationList:s.authorizationList?Tf(s.authorizationList):void 0,accessList:s.accessList,...s.eip712}];try{const l=await n.request({method:"eth_sendTransaction",params:c});return Co({chainId:s.chainId,client:e,contractAddress:s.to??void 0,gasPrice:s.gasPrice,transactionHash:l,walletAddress:J(t),walletType:r}),{transactionHash:l}}catch(l){throw Pf(l)&&Of({chainId:s.chainId,client:e,contractAddress:s.to||void 0,error:l,transactionValue:s.value,walletAddress:J(t)}),l}},async signMessage({message:s}){if(!i.address)throw new Error("Provider not setup");const o=typeof s=="string"?$o(s):s.raw instanceof Uint8Array?qi(s.raw):s.raw;return await n.request({method:"personal_sign",params:[o,J(i.address)]})},async signAuthorization(s){const o=tu(s);let c;try{c=await n.request({method:"eth_sign",params:[J(i.address),o]})}catch{c=await n.request({method:"secp256k1_sign",params:[o]})}if(!c)throw new Error("Failed to sign authorization");const l=Rf(c);return{...s,...l}},async signTypedData(s){if(!n||!i.address)throw new Error("Provider not setup");const o=Fo(s),{domain:c,message:l,primaryType:u}=o,h={EIP712Domain:Fp({domain:c}),...o.types};Gp({domain:c,message:l,primaryType:u,types:h});const d=Wp({domain:c??{},message:l,primaryType:u,types:h});return await n.request({method:"eth_signTypedData_v4",params:[J(i.address),d]})},async watchAsset(s){return await n.request({method:"wallet_watchAsset",params:s},{retryCount:0})},async sendCalls(s){try{const{callParams:o,chain:c}=await Go(s,i),l=await n.request({method:"wallet_sendCalls",params:o});return l&&typeof l=="object"&&"id"in l?{chain:c,client:e,id:l.id}:{chain:c,client:e,id:l}}catch(o){throw/unsupport|not support/i.test(o.message)?new Error(`${r} errored calling wallet_sendCalls, with error: ${o instanceof Error?o.message:Hp(o)}`):o}},async getCallsStatus(s){try{const o=await n.request({method:"wallet_getCallsStatus",params:[s.id]});return Wo(o)}catch(o){throw/unsupport|not support/i.test(o.message)?new Error(`${r} does not support wallet_getCallsStatus, reach out to them directly to request EIP-5792 support.`):o}},async getCallsStatusRaw(s){try{return await n.request({method:"wallet_getCallsStatus",params:[s.id]})}catch(o){throw/unsupport|not support/i.test(o.message)?new Error(`${r} does not support wallet_getCallsStatus, reach out to them directly to request EIP-5792 support.`):o}},async getCapabilities(s){const o=s.chainId;try{const c=await n.request({method:"wallet_getCapabilities",params:[J(i.address),o?[Me(o)]:void 0]});return Ho(c,o)}catch(c){if(/unsupport|not support|not available/i.test(c.message))return{message:`${r} does not support wallet_getCapabilities, reach out to them directly to request EIP-5792 support.`};throw c}}};return i}async function Du({provider:n,address:t,chain:e,emitter:r,client:i,id:s}){const o=Ha({address:t,client:i,id:s,provider:n});async function c(){n.removeListener("accountsChanged",u),n.removeListener("chainChanged",h),n.removeListener("disconnect",l);try{await Zp(()=>n.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}),{timeout:100})}catch{}}async function l(){c(),r.emit("disconnect",void 0)}function u(d){if(d[0]){const f=Ha({address:J(d[0]),client:i,id:s,provider:n});r.emit("accountChanged",f),r.emit("accountsChanged",d)}else l()}function h(d){const f=Te(bt(d));r.emit("chainChanged",f)}return n.on&&(n.on("accountsChanged",u),n.on("chainChanged",h),n.on("disconnect",l)),[o,e,l,d=>xu(n,d)]}async function xu(n,t){const e=Me(t.id);try{await n.request({method:"wallet_switchEthereumChain",params:[{chainId:e}]})}catch{const r=await Bo(t);await n.request({method:"wallet_addEthereumChain",params:[{blockExplorerUrls:r.explorers?.map(i=>i.url),chainId:e,chainName:r.name,nativeCurrency:r.nativeCurrency,rpcUrls:Zo(r)}]})}}function Yp(n){return n instanceof Error?n.message:typeof n=="string"?n:typeof n=="object"&&n!==null?JSON.stringify(n):String(n)}const Ga=Object.freeze(Object.defineProperty({__proto__:null,autoConnectEip1193Wallet:Lu,connectEip1193Wallet:Ru,getInjectedProvider:Hs},Symbol.toStringTag,{value:"Module"}));function Jp(n){const t=n.walletId??"adapter",e=Sn();let r,i,s;const o=async f=>(s=typeof n.provider=="function"?await n.provider(f):n.provider,s),c=e.subscribe("chainChanged",f=>{i=f});function l(){r=void 0,i=void 0}let u=async()=>{};const h=e.subscribe("disconnect",()=>{l(),c(),h()});e.subscribe("accountChanged",f=>{r=f});let d=async f=>{await s?.request({method:"wallet_switchEthereumChain",params:[{chainId:Lf(f.id)}]})};return{autoConnect:async f=>{const[p,m,w,_]=await Lu({chain:f.chain,client:f.client,emitter:e,id:t,provider:await o({chainId:f.chain?.id})});return r=p,i=m,u=w,d=_,e.emit("onConnect",f),Xe({client:f.client,walletAddress:r.address,walletType:t}),r},connect:async f=>{const[p,m,w,_]=await Ru({chain:f.chain,client:f.client,emitter:e,id:t,provider:await o({chainId:f.chain?.id})});return r=p,i=m,u=w,d=_,e.emit("onConnect",f),Xe({client:f.client,walletAddress:r.address,walletType:t}),r},disconnect:async()=>{l(),await u(),e.emit("disconnect",void 0)},getAccount:()=>r,getChain(){if(i)return i=Vn(i.id)||i,i},getConfig:()=>{},id:t,subscribe:e.subscribe,switchChain:async f=>{await d(f),e.emit("chainChanged",f)}}}function Qp(n){const{chain:t,client:e,wallet:r,connectOverride:i}=n,s=ji({chain:t,client:e});return{on:r.subscribe,removeListener:()=>{},request:async o=>{switch(o.method){case"eth_sendTransaction":{const c=r.getAccount();if(!c)throw new Error("Account not connected");return(await nu({account:c,transaction:Ks({...o.params[0],chain:t,client:e})})).transactionHash}case"eth_estimateGas":{const c=r.getAccount();if(!c)throw new Error("Account not connected");return Df({account:c,transaction:Ks({...o.params[0],chain:t,client:e})})}case"personal_sign":{const c=r.getAccount();if(!c)throw new Error("Account not connected");return c.signMessage({message:{raw:o.params[0]}})}case"eth_signTypedData_v4":{const c=r.getAccount();if(!c)throw new Error("Account not connected");const l=JSON.parse(o.params[1]);return c.signTypedData(l)}case"eth_accounts":{const c=r.getAccount();return c?[c.address]:[]}case"eth_requestAccounts":{const c=r.getAccount();if(c)return[c.address];const l=i?await i(r):await r.connect({client:e}).catch(u=>(console.error("Error connecting wallet",u),null));if(!l)throw new Error("Unable to connect wallet - try passing a connectOverride function");return[l.address]}case"wallet_switchEthereumChain":case"wallet_addEthereumChain":{const l=o.params[0].chainId;if(!l)throw new Error("Chain ID is required");const u=bi(l)?Ln(l):l,h=Te(u);return r.switchChain(h)}case"wallet_getCapabilities":{const c=r.getAccount();if(!c)throw new Error("Account not connected");if(!c.getCapabilities)throw new Error("Wallet does not support EIP-5792");const l=o.params[1];if(l&&Array.isArray(l)){const u=l[0],h=bi(u)?Ln(u):Number(u);return c.getCapabilities(h?{chainId:h}:{})}return c.getCapabilities({})}case"wallet_sendCalls":{const c=r.getAccount();if(!c)throw new Error("Account not connected");if(!c.sendCalls)throw new Error("Wallet does not support EIP-5792");return c.sendCalls({...o.params[0],chain:t})}case"wallet_getCallsStatus":{const c=r.getAccount();if(!c)throw new Error("Account not connected");if(!c.getCallsStatusRaw)throw new Error("Wallet does not support EIP-5792");return await c.getCallsStatusRaw({id:o.params[0],chain:t,client:e})}default:return s(o)}}}}const Xp=Object.freeze(Object.defineProperty({__proto__:null,fromProvider:Jp,toProvider:Qp},Symbol.toStringTag,{value:"Module"}));function e_(n){const t=Sn();let e=n.chain;return{autoConnect:async()=>(t.emit("onConnect",n),n.adaptedAccount),connect:async()=>(t.emit("onConnect",n),n.adaptedAccount),disconnect:async()=>{await n.onDisconnect(),t.emit("disconnect",void 0)},getAccount(){return n.adaptedAccount},getChain(){return e=Vn(e.id)||e,e},getConfig(){return n},id:"adapter",subscribe:t.subscribe,switchChain:async r=>{await n.switchChain(r),e=r,t.emit("chainChanged",r)}}}async function t_(){return(await a(async()=>{const{default:n}=await import("./wallet-infos-BHI_w6r-.js");return{default:n}},[])).default}async function Cn(n,t){return yr(n,async e=>{const{InAppWebConnector:r}=await a(async()=>{const{InAppWebConnector:i}=await import("./web-connector-C73Vanyj.js");return{InAppWebConnector:i}},__vite__mapDeps([14,4,15,16,1,17]));return new r({client:e,ecosystem:t})},t)}async function Vu(n){const{client:t,ecosystem:e}=n,i=await(await Cn(t,e)).getUser();switch(i.status){case"Logged In, Wallet Initialized":return i}}async function n_(n){const t=await Vu(n);if(t&&"email"in t.authDetails)return t.authDetails.email}async function r_(n){const t=await Vu(n);if(t&&"phoneNumber"in t.authDetails)return t.authDetails.phoneNumber}async function i_(n){return(await Cn(n.client,n.ecosystem)).preAuthenticate(n)}async function s_(n){return(await Cn(n.client,n.ecosystem)).authenticate(n)}async function o_(n){const t=await Cn(n.client,n.ecosystem);if(!t.authenticateWithRedirect)throw new Error("authenticateWithRedirect is not supported on this platform");return t.authenticateWithRedirect(n.strategy,n.mode,n.redirectUrl)}async function a_(n){return await(await Cn(n.client,n.ecosystem)).linkProfile(n)}async function c_(n){return await(await Cn(n.client,n.ecosystem)).unlinkProfile(n.profileToUnlink,n.allowAccountDeletion)}async function l_(n){return(await Cn(n.client,n.ecosystem)).getProfiles()}function Za(n){if(!Number.isSafeInteger(n)||n<0)throw new Error("positive integer expected, got "+n)}function u_(n){return n instanceof Uint8Array||ArrayBuffer.isView(n)&&n.constructor.name==="Uint8Array"}function Fi(n,...t){if(!u_(n))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(n.length))throw new Error("Uint8Array expected of length "+t+", got length="+n.length)}function h_(n){if(typeof n!="function"||typeof n.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Za(n.outputLen),Za(n.blockLen)}function Oi(n,t=!0){if(n.destroyed)throw new Error("Hash instance has been destroyed");if(t&&n.finished)throw new Error("Hash#digest() has already been called")}function d_(n,t){Fi(n);const e=t.outputLen;if(n.length<e)throw new Error("digestInto() expects output buffer of length at least "+e)}const Un=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function hs(n){return new DataView(n.buffer,n.byteOffset,n.byteLength)}function Tt(n,t){return n<<32-t|n>>>t}typeof Uint8Array.from([]).toHex=="function"&&Uint8Array.fromHex;function f_(n){if(typeof n!="string")throw new Error("utf8ToBytes expected string, got "+typeof n);return new Uint8Array(new TextEncoder().encode(n))}function ea(n){return typeof n=="string"&&(n=f_(n)),Fi(n),n}function p_(...n){let t=0;for(let r=0;r<n.length;r++){const i=n[r];Fi(i),t+=i.length}const e=new Uint8Array(t);for(let r=0,i=0;r<n.length;r++){const s=n[r];e.set(s,i),i+=s.length}return e}class Su{clone(){return this._cloneInto()}}function __(n){const t=r=>n().update(ea(r)).digest(),e=n();return t.outputLen=e.outputLen,t.blockLen=e.blockLen,t.create=()=>n(),t}function m_(n=32){if(Un&&typeof Un.getRandomValues=="function")return Un.getRandomValues(new Uint8Array(n));if(Un&&typeof Un.randomBytes=="function")return Uint8Array.from(Un.randomBytes(n));throw new Error("crypto.getRandomValues must be defined")}function w_(n,t,e,r){if(typeof n.setBigUint64=="function")return n.setBigUint64(t,e,r);const i=BigInt(32),s=BigInt(4294967295),o=Number(e>>i&s),c=Number(e&s),l=r?4:0,u=r?0:4;n.setUint32(t+l,o,r),n.setUint32(t+u,c,r)}function y_(n,t,e){return n&t^~n&e}function g_(n,t,e){return n&t^n&e^t&e}class E_ extends Su{constructor(t,e,r,i){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=i,this.buffer=new Uint8Array(t),this.view=hs(this.buffer)}update(t){Oi(this);const{view:e,buffer:r,blockLen:i}=this;t=ea(t);const s=t.length;for(let o=0;o<s;){const c=Math.min(i-this.pos,s-o);if(c===i){const l=hs(t);for(;i<=s-o;o+=i)this.process(l,o);continue}r.set(t.subarray(o,o+c),this.pos),this.pos+=c,o+=c,this.pos===i&&(this.process(e,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Oi(this),d_(t,this),this.finished=!0;const{buffer:e,view:r,blockLen:i,isLE:s}=this;let{pos:o}=this;e[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>i-o&&(this.process(r,0),o=0);for(let d=o;d<i;d++)e[d]=0;w_(r,i-8,BigInt(this.length*8),s),this.process(r,0);const c=hs(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=l/4,h=this.get();if(u>h.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<u;d++)c.setUint32(4*d,h[d],s)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const r=t.slice(0,e);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:r,length:i,finished:s,destroyed:o,pos:c}=this;return t.length=i,t.pos=c,t.finished=s,t.destroyed=o,i%e&&t.buffer.set(r),t}}const v_=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Ht=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Gt=new Uint32Array(64);class b_ extends E_{constructor(t=32){super(64,t,8,!1),this.A=Ht[0]|0,this.B=Ht[1]|0,this.C=Ht[2]|0,this.D=Ht[3]|0,this.E=Ht[4]|0,this.F=Ht[5]|0,this.G=Ht[6]|0,this.H=Ht[7]|0}get(){const{A:t,B:e,C:r,D:i,E:s,F:o,G:c,H:l}=this;return[t,e,r,i,s,o,c,l]}set(t,e,r,i,s,o,c,l){this.A=t|0,this.B=e|0,this.C=r|0,this.D=i|0,this.E=s|0,this.F=o|0,this.G=c|0,this.H=l|0}process(t,e){for(let d=0;d<16;d++,e+=4)Gt[d]=t.getUint32(e,!1);for(let d=16;d<64;d++){const f=Gt[d-15],p=Gt[d-2],m=Tt(f,7)^Tt(f,18)^f>>>3,w=Tt(p,17)^Tt(p,19)^p>>>10;Gt[d]=w+Gt[d-7]+m+Gt[d-16]|0}let{A:r,B:i,C:s,D:o,E:c,F:l,G:u,H:h}=this;for(let d=0;d<64;d++){const f=Tt(c,6)^Tt(c,11)^Tt(c,25),p=h+f+y_(c,l,u)+v_[d]+Gt[d]|0,w=(Tt(r,2)^Tt(r,13)^Tt(r,22))+g_(r,i,s)|0;h=u,u=l,l=c,c=o+p|0,o=s,s=i,i=r,r=p+w|0}r=r+this.A|0,i=i+this.B|0,s=s+this.C|0,o=o+this.D|0,c=c+this.E|0,l=l+this.F|0,u=u+this.G|0,h=h+this.H|0,this.set(r,i,s,o,c,l,u,h)}roundClean(){Gt.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const I_=__(()=>new b_);class Cu extends Su{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,h_(t);const r=ea(e);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,s=new Uint8Array(i);s.set(r.length>i?t.create().update(r).digest():r);for(let o=0;o<s.length;o++)s[o]^=54;this.iHash.update(s),this.oHash=t.create();for(let o=0;o<s.length;o++)s[o]^=106;this.oHash.update(s),s.fill(0)}update(t){return Oi(this),this.iHash.update(t),this}digestInto(t){Oi(this),Fi(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:e,iHash:r,finished:i,destroyed:s,blockLen:o,outputLen:c}=this;return t=t,t.finished=i,t.destroyed=s,t.blockLen=o,t.outputLen=c,t.oHash=e._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const $u=(n,t,e)=>new Cu(n,t).update(e).digest();$u.create=(n,t)=>new Cu(n,t);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const ta=BigInt(0),Gs=BigInt(1);function Zn(n){return n instanceof Uint8Array||ArrayBuffer.isView(n)&&n.constructor.name==="Uint8Array"}function na(n){if(!Zn(n))throw new Error("Uint8Array expected")}function Vr(n,t){if(typeof t!="boolean")throw new Error(n+" boolean expected, got "+t)}function Jr(n){const t=n.toString(16);return t.length&1?"0"+t:t}function ku(n){if(typeof n!="string")throw new Error("hex string expected, got "+typeof n);return n===""?ta:BigInt("0x"+n)}const Uu=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",A_=Array.from({length:256},(n,t)=>t.toString(16).padStart(2,"0"));function Sr(n){if(na(n),Uu)return n.toHex();let t="";for(let e=0;e<n.length;e++)t+=A_[n[e]];return t}const $t={_0:48,_9:57,A:65,F:70,a:97,f:102};function Ya(n){if(n>=$t._0&&n<=$t._9)return n-$t._0;if(n>=$t.A&&n<=$t.F)return n-($t.A-10);if(n>=$t.a&&n<=$t.f)return n-($t.a-10)}function Ri(n){if(typeof n!="string")throw new Error("hex string expected, got "+typeof n);if(Uu)return Uint8Array.fromHex(n);const t=n.length,e=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(e);for(let i=0,s=0;i<e;i++,s+=2){const o=Ya(n.charCodeAt(s)),c=Ya(n.charCodeAt(s+1));if(o===void 0||c===void 0){const l=n[s]+n[s+1];throw new Error('hex string expected, got non-hex character "'+l+'" at index '+s)}r[i]=o*16+c}return r}function On(n){return ku(Sr(n))}function Nu(n){return na(n),ku(Sr(Uint8Array.from(n).reverse()))}function Cr(n,t){return Ri(n.toString(16).padStart(t*2,"0"))}function Bu(n,t){return Cr(n,t).reverse()}function gt(n,t,e){let r;if(typeof t=="string")try{r=Ri(t)}catch(s){throw new Error(n+" must be hex string or Uint8Array, cause: "+s)}else if(Zn(t))r=Uint8Array.from(t);else throw new Error(n+" must be hex string or Uint8Array");const i=r.length;if(typeof e=="number"&&i!==e)throw new Error(n+" of length "+e+" expected, got "+i);return r}function Li(...n){let t=0;for(let r=0;r<n.length;r++){const i=n[r];na(i),t+=i.length}const e=new Uint8Array(t);for(let r=0,i=0;r<n.length;r++){const s=n[r];e.set(s,i),i+=s.length}return e}const ds=n=>typeof n=="bigint"&&ta<=n;function ra(n,t,e){return ds(n)&&ds(t)&&ds(e)&&t<=n&&n<e}function Kn(n,t,e,r){if(!ra(t,e,r))throw new Error("expected valid "+n+": "+e+" <= n < "+r+", got "+t)}function T_(n){let t;for(t=0;n>ta;n>>=Gs,t+=1);return t}const Wi=n=>(Gs<<BigInt(n))-Gs,fs=n=>new Uint8Array(n),Ja=n=>Uint8Array.from(n);function P_(n,t,e){if(typeof n!="number"||n<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof e!="function")throw new Error("hmacFn must be a function");let r=fs(n),i=fs(n),s=0;const o=()=>{r.fill(1),i.fill(0),s=0},c=(...d)=>e(i,r,...d),l=(d=fs(0))=>{i=c(Ja([0]),d),r=c(),d.length!==0&&(i=c(Ja([1]),d),r=c())},u=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let d=0;const f=[];for(;d<t;){r=c();const p=r.slice();f.push(p),d+=r.length}return Li(...f)};return(d,f)=>{o(),l(d);let p;for(;!(p=f(u()));)l();return o(),p}}const O_={bigint:n=>typeof n=="bigint",function:n=>typeof n=="function",boolean:n=>typeof n=="boolean",string:n=>typeof n=="string",stringOrUint8Array:n=>typeof n=="string"||Zn(n),isSafeInteger:n=>Number.isSafeInteger(n),array:n=>Array.isArray(n),field:(n,t)=>t.Fp.isValid(n),hash:n=>typeof n=="function"&&Number.isSafeInteger(n.outputLen)};function Hi(n,t,e={}){const r=(i,s,o)=>{const c=O_[s];if(typeof c!="function")throw new Error("invalid validator function");const l=n[i];if(!(o&&l===void 0)&&!c(l,n))throw new Error("param "+String(i)+" is invalid. Expected "+s+", got "+l)};for(const[i,s]of Object.entries(t))r(i,s,!1);for(const[i,s]of Object.entries(e))r(i,s,!0);return n}function Qa(n){const t=new WeakMap;return(e,...r)=>{const i=t.get(e);if(i!==void 0)return i;const s=n(e,...r);return t.set(e,s),s}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ae=BigInt(0),pe=BigInt(1),En=BigInt(2),R_=BigInt(3),Zs=BigInt(4),Xa=BigInt(5),ec=BigInt(8);function Ye(n,t){const e=n%t;return e>=Ae?e:t+e}function L_(n,t,e){if(t<Ae)throw new Error("invalid exponent, negatives unsupported");if(e<=Ae)throw new Error("invalid modulus");if(e===pe)return Ae;let r=pe;for(;t>Ae;)t&pe&&(r=r*n%e),n=n*n%e,t>>=pe;return r}function at(n,t,e){let r=n;for(;t-- >Ae;)r*=r,r%=e;return r}function Ys(n,t){if(n===Ae)throw new Error("invert: expected non-zero number");if(t<=Ae)throw new Error("invert: expected positive modulus, got "+t);let e=Ye(n,t),r=t,i=Ae,s=pe;for(;e!==Ae;){const c=r/e,l=r%e,u=i-s*c;r=e,e=l,i=s,s=u}if(r!==pe)throw new Error("invert: does not exist");return Ye(i,t)}function D_(n){const t=(n-pe)/En;let e,r,i;for(e=n-pe,r=0;e%En===Ae;e/=En,r++);for(i=En;i<n&&L_(i,t,n)!==n-pe;i++)if(i>1e3)throw new Error("Cannot find square root: likely non-prime P");if(r===1){const o=(n+pe)/Zs;return function(l,u){const h=l.pow(u,o);if(!l.eql(l.sqr(h),u))throw new Error("Cannot find square root");return h}}const s=(e+pe)/En;return function(c,l){if(c.pow(l,t)===c.neg(c.ONE))throw new Error("Cannot find square root");let u=r,h=c.pow(c.mul(c.ONE,i),e),d=c.pow(l,s),f=c.pow(l,e);for(;!c.eql(f,c.ONE);){if(c.eql(f,c.ZERO))return c.ZERO;let p=1;for(let w=c.sqr(f);p<u&&!c.eql(w,c.ONE);p++)w=c.sqr(w);const m=c.pow(h,pe<<BigInt(u-p-1));h=c.sqr(m),d=c.mul(d,m),f=c.mul(f,h),u=p}return d}}function x_(n){if(n%Zs===R_){const t=(n+pe)/Zs;return function(r,i){const s=r.pow(i,t);if(!r.eql(r.sqr(s),i))throw new Error("Cannot find square root");return s}}if(n%ec===Xa){const t=(n-Xa)/ec;return function(r,i){const s=r.mul(i,En),o=r.pow(s,t),c=r.mul(i,o),l=r.mul(r.mul(c,En),o),u=r.mul(c,r.sub(l,r.ONE));if(!r.eql(r.sqr(u),i))throw new Error("Cannot find square root");return u}}return D_(n)}const V_=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function S_(n){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},e=V_.reduce((r,i)=>(r[i]="function",r),t);return Hi(n,e)}function C_(n,t,e){if(e<Ae)throw new Error("invalid exponent, negatives unsupported");if(e===Ae)return n.ONE;if(e===pe)return t;let r=n.ONE,i=t;for(;e>Ae;)e&pe&&(r=n.mul(r,i)),i=n.sqr(i),e>>=pe;return r}function $_(n,t){const e=new Array(t.length),r=t.reduce((s,o,c)=>n.is0(o)?s:(e[c]=s,n.mul(s,o)),n.ONE),i=n.inv(r);return t.reduceRight((s,o,c)=>n.is0(o)?s:(e[c]=n.mul(s,e[c]),n.mul(s,o)),i),e}function Mu(n,t){const e=t!==void 0?t:n.toString(2).length,r=Math.ceil(e/8);return{nBitLength:e,nByteLength:r}}function qu(n,t,e=!1,r={}){if(n<=Ae)throw new Error("invalid field: expected ORDER > 0, got "+n);const{nBitLength:i,nByteLength:s}=Mu(n,t);if(s>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let o;const c=Object.freeze({ORDER:n,isLE:e,BITS:i,BYTES:s,MASK:Wi(i),ZERO:Ae,ONE:pe,create:l=>Ye(l,n),isValid:l=>{if(typeof l!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof l);return Ae<=l&&l<n},is0:l=>l===Ae,isOdd:l=>(l&pe)===pe,neg:l=>Ye(-l,n),eql:(l,u)=>l===u,sqr:l=>Ye(l*l,n),add:(l,u)=>Ye(l+u,n),sub:(l,u)=>Ye(l-u,n),mul:(l,u)=>Ye(l*u,n),pow:(l,u)=>C_(c,l,u),div:(l,u)=>Ye(l*Ys(u,n),n),sqrN:l=>l*l,addN:(l,u)=>l+u,subN:(l,u)=>l-u,mulN:(l,u)=>l*u,inv:l=>Ys(l,n),sqrt:r.sqrt||(l=>(o||(o=x_(n)),o(c,l))),invertBatch:l=>$_(c,l),cmov:(l,u,h)=>h?u:l,toBytes:l=>e?Bu(l,s):Cr(l,s),fromBytes:l=>{if(l.length!==s)throw new Error("Field.fromBytes: expected "+s+" bytes, got "+l.length);return e?Nu(l):On(l)}});return Object.freeze(c)}function ju(n){if(typeof n!="bigint")throw new Error("field order must be bigint");const t=n.toString(2).length;return Math.ceil(t/8)}function zu(n){const t=ju(n);return t+Math.ceil(t/2)}function k_(n,t,e=!1){const r=n.length,i=ju(t),s=zu(t);if(r<16||r<s||r>1024)throw new Error("expected "+s+"-1024 bytes of input, got "+r);const o=e?Nu(n):On(n),c=Ye(o,t-pe)+pe;return e?Bu(c,i):Cr(c,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const tc=BigInt(0),Js=BigInt(1);function ps(n,t){const e=t.negate();return n?e:t}function Ku(n,t){if(!Number.isSafeInteger(n)||n<=0||n>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+n)}function _s(n,t){Ku(n,t);const e=Math.ceil(t/n)+1,r=2**(n-1),i=2**n,s=Wi(n),o=BigInt(n);return{windows:e,windowSize:r,mask:s,maxNumber:i,shiftBy:o}}function nc(n,t,e){const{windowSize:r,mask:i,maxNumber:s,shiftBy:o}=e;let c=Number(n&i),l=n>>o;c>r&&(c-=s,l+=Js);const u=t*r,h=u+Math.abs(c)-1,d=c===0,f=c<0,p=t%2!==0;return{nextN:l,offset:h,isZero:d,isNeg:f,isNegF:p,offsetF:u}}function U_(n,t){if(!Array.isArray(n))throw new Error("array expected");n.forEach((e,r)=>{if(!(e instanceof t))throw new Error("invalid point at index "+r)})}function N_(n,t){if(!Array.isArray(n))throw new Error("array of scalars expected");n.forEach((e,r)=>{if(!t.isValid(e))throw new Error("invalid scalar at index "+r)})}const ms=new WeakMap,Fu=new WeakMap;function ws(n){return Fu.get(n)||1}function B_(n,t){return{constTimeNegate:ps,hasPrecomputes(e){return ws(e)!==1},unsafeLadder(e,r,i=n.ZERO){let s=e;for(;r>tc;)r&Js&&(i=i.add(s)),s=s.double(),r>>=Js;return i},precomputeWindow(e,r){const{windows:i,windowSize:s}=_s(r,t),o=[];let c=e,l=c;for(let u=0;u<i;u++){l=c,o.push(l);for(let h=1;h<s;h++)l=l.add(c),o.push(l);c=l.double()}return o},wNAF(e,r,i){let s=n.ZERO,o=n.BASE;const c=_s(e,t);for(let l=0;l<c.windows;l++){const{nextN:u,offset:h,isZero:d,isNeg:f,isNegF:p,offsetF:m}=nc(i,l,c);i=u,d?o=o.add(ps(p,r[m])):s=s.add(ps(f,r[h]))}return{p:s,f:o}},wNAFUnsafe(e,r,i,s=n.ZERO){const o=_s(e,t);for(let c=0;c<o.windows&&i!==tc;c++){const{nextN:l,offset:u,isZero:h,isNeg:d}=nc(i,c,o);if(i=l,!h){const f=r[u];s=s.add(d?f.negate():f)}}return s},getPrecomputes(e,r,i){let s=ms.get(r);return s||(s=this.precomputeWindow(r,e),e!==1&&ms.set(r,i(s))),s},wNAFCached(e,r,i){const s=ws(e);return this.wNAF(s,this.getPrecomputes(s,e,i),r)},wNAFCachedUnsafe(e,r,i,s){const o=ws(e);return o===1?this.unsafeLadder(e,r,s):this.wNAFUnsafe(o,this.getPrecomputes(o,e,i),r,s)},setWindowSize(e,r){Ku(r,t),Fu.set(e,r),ms.delete(e)}}}function M_(n,t,e,r){if(U_(e,n),N_(r,t),e.length!==r.length)throw new Error("arrays of points and scalars must have equal length");const i=n.ZERO,s=T_(BigInt(e.length)),o=s>12?s-3:s>4?s-2:s?2:1,c=Wi(o),l=new Array(Number(c)+1).fill(i),u=Math.floor((t.BITS-1)/o)*o;let h=i;for(let d=u;d>=0;d-=o){l.fill(i);for(let p=0;p<r.length;p++){const m=r[p],w=Number(m>>BigInt(d)&c);l[w]=l[w].add(e[p])}let f=i;for(let p=l.length-1,m=i;p>0;p--)m=m.add(l[p]),f=f.add(m);if(h=h.add(f),d!==0)for(let p=0;p<o;p++)h=h.double()}return h}function Wu(n){return S_(n.Fp),Hi(n,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Mu(n.n,n.nBitLength),...n,p:n.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function rc(n){n.lowS!==void 0&&Vr("lowS",n.lowS),n.prehash!==void 0&&Vr("prehash",n.prehash)}function q_(n){const t=Wu(n);Hi(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:e,Fp:r,a:i}=t;if(e){if(!r.eql(i,r.ZERO))throw new Error("invalid endomorphism, can only be defined for Koblitz curves that have a=0");if(typeof e!="object"||typeof e.beta!="bigint"||typeof e.splitScalar!="function")throw new Error("invalid endomorphism, expected beta: bigint and splitScalar: function")}return Object.freeze({...t})}class j_ extends Error{constructor(t=""){super(t)}}const Mt={Err:j_,_tlv:{encode:(n,t)=>{const{Err:e}=Mt;if(n<0||n>256)throw new e("tlv.encode: wrong tag");if(t.length&1)throw new e("tlv.encode: unpadded data");const r=t.length/2,i=Jr(r);if(i.length/2&128)throw new e("tlv.encode: long form length too big");const s=r>127?Jr(i.length/2|128):"";return Jr(n)+s+i+t},decode(n,t){const{Err:e}=Mt;let r=0;if(n<0||n>256)throw new e("tlv.encode: wrong tag");if(t.length<2||t[r++]!==n)throw new e("tlv.decode: wrong tlv");const i=t[r++],s=!!(i&128);let o=0;if(!s)o=i;else{const l=i&127;if(!l)throw new e("tlv.decode(long): indefinite length not supported");if(l>4)throw new e("tlv.decode(long): byte length is too big");const u=t.subarray(r,r+l);if(u.length!==l)throw new e("tlv.decode: length bytes not complete");if(u[0]===0)throw new e("tlv.decode(long): zero leftmost byte");for(const h of u)o=o<<8|h;if(r+=l,o<128)throw new e("tlv.decode(long): not minimal encoding")}const c=t.subarray(r,r+o);if(c.length!==o)throw new e("tlv.decode: wrong value length");return{v:c,l:t.subarray(r+o)}}},_int:{encode(n){const{Err:t}=Mt;if(n<jt)throw new t("integer: negative integers are not allowed");let e=Jr(n);if(Number.parseInt(e[0],16)&8&&(e="00"+e),e.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return e},decode(n){const{Err:t}=Mt;if(n[0]&128)throw new t("invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return On(n)}},toSig(n){const{Err:t,_int:e,_tlv:r}=Mt,i=gt("signature",n),{v:s,l:o}=r.decode(48,i);if(o.length)throw new t("invalid signature: left bytes after parsing");const{v:c,l}=r.decode(2,s),{v:u,l:h}=r.decode(2,l);if(h.length)throw new t("invalid signature: left bytes after parsing");return{r:e.decode(c),s:e.decode(u)}},hexFromSig(n){const{_tlv:t,_int:e}=Mt,r=t.encode(2,e.encode(n.r)),i=t.encode(2,e.encode(n.s)),s=r+i;return t.encode(48,s)}},jt=BigInt(0),ve=BigInt(1);BigInt(2);const ic=BigInt(3);BigInt(4);function z_(n){const t=q_(n),{Fp:e}=t,r=qu(t.n,t.nBitLength),i=t.toBytes||((w,_,E)=>{const v=_.toAffine();return Li(Uint8Array.from([4]),e.toBytes(v.x),e.toBytes(v.y))}),s=t.fromBytes||(w=>{const _=w.subarray(1),E=e.fromBytes(_.subarray(0,e.BYTES)),v=e.fromBytes(_.subarray(e.BYTES,2*e.BYTES));return{x:E,y:v}});function o(w){const{a:_,b:E}=t,v=e.sqr(w),g=e.mul(v,w);return e.add(e.add(g,e.mul(w,_)),E)}if(!e.eql(e.sqr(t.Gy),o(t.Gx)))throw new Error("bad generator point: equation left != right");function c(w){return ra(w,ve,t.n)}function l(w){const{allowedPrivateKeyLengths:_,nByteLength:E,wrapPrivateKey:v,n:g}=t;if(_&&typeof w!="bigint"){if(Zn(w)&&(w=Sr(w)),typeof w!="string"||!_.includes(w.length))throw new Error("invalid private key");w=w.padStart(E*2,"0")}let I;try{I=typeof w=="bigint"?w:On(gt("private key",w,E))}catch{throw new Error("invalid private key, expected hex or "+E+" bytes, got "+typeof w)}return v&&(I=Ye(I,g)),Kn("private key",I,ve,g),I}function u(w){if(!(w instanceof f))throw new Error("ProjectivePoint expected")}const h=Qa((w,_)=>{const{px:E,py:v,pz:g}=w;if(e.eql(g,e.ONE))return{x:E,y:v};const I=w.is0();_==null&&(_=I?e.ONE:e.inv(g));const b=e.mul(E,_),D=e.mul(v,_),x=e.mul(g,_);if(I)return{x:e.ZERO,y:e.ZERO};if(!e.eql(x,e.ONE))throw new Error("invZ was invalid");return{x:b,y:D}}),d=Qa(w=>{if(w.is0()){if(t.allowInfinityPoint&&!e.is0(w.py))return;throw new Error("bad point: ZERO")}const{x:_,y:E}=w.toAffine();if(!e.isValid(_)||!e.isValid(E))throw new Error("bad point: x or y not FE");const v=e.sqr(E),g=o(_);if(!e.eql(v,g))throw new Error("bad point: equation left != right");if(!w.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class f{constructor(_,E,v){if(_==null||!e.isValid(_))throw new Error("x required");if(E==null||!e.isValid(E))throw new Error("y required");if(v==null||!e.isValid(v))throw new Error("z required");this.px=_,this.py=E,this.pz=v,Object.freeze(this)}static fromAffine(_){const{x:E,y:v}=_||{};if(!_||!e.isValid(E)||!e.isValid(v))throw new Error("invalid affine point");if(_ instanceof f)throw new Error("projective point not allowed");const g=I=>e.eql(I,e.ZERO);return g(E)&&g(v)?f.ZERO:new f(E,v,e.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(_){const E=e.invertBatch(_.map(v=>v.pz));return _.map((v,g)=>v.toAffine(E[g])).map(f.fromAffine)}static fromHex(_){const E=f.fromAffine(s(gt("pointHex",_)));return E.assertValidity(),E}static fromPrivateKey(_){return f.BASE.multiply(l(_))}static msm(_,E){return M_(f,r,_,E)}_setWindowSize(_){m.setWindowSize(this,_)}assertValidity(){d(this)}hasEvenY(){const{y:_}=this.toAffine();if(e.isOdd)return!e.isOdd(_);throw new Error("Field doesn't support isOdd")}equals(_){u(_);const{px:E,py:v,pz:g}=this,{px:I,py:b,pz:D}=_,x=e.eql(e.mul(E,D),e.mul(I,g)),S=e.eql(e.mul(v,D),e.mul(b,g));return x&&S}negate(){return new f(this.px,e.neg(this.py),this.pz)}double(){const{a:_,b:E}=t,v=e.mul(E,ic),{px:g,py:I,pz:b}=this;let D=e.ZERO,x=e.ZERO,S=e.ZERO,y=e.mul(g,g),L=e.mul(I,I),T=e.mul(b,b),O=e.mul(g,I);return O=e.add(O,O),S=e.mul(g,b),S=e.add(S,S),D=e.mul(_,S),x=e.mul(v,T),x=e.add(D,x),D=e.sub(L,x),x=e.add(L,x),x=e.mul(D,x),D=e.mul(O,D),S=e.mul(v,S),T=e.mul(_,T),O=e.sub(y,T),O=e.mul(_,O),O=e.add(O,S),S=e.add(y,y),y=e.add(S,y),y=e.add(y,T),y=e.mul(y,O),x=e.add(x,y),T=e.mul(I,b),T=e.add(T,T),y=e.mul(T,O),D=e.sub(D,y),S=e.mul(T,L),S=e.add(S,S),S=e.add(S,S),new f(D,x,S)}add(_){u(_);const{px:E,py:v,pz:g}=this,{px:I,py:b,pz:D}=_;let x=e.ZERO,S=e.ZERO,y=e.ZERO;const L=t.a,T=e.mul(t.b,ic);let O=e.mul(E,I),C=e.mul(v,b),A=e.mul(g,D),P=e.add(E,v),R=e.add(I,b);P=e.mul(P,R),R=e.add(O,C),P=e.sub(P,R),R=e.add(E,g);let V=e.add(I,D);return R=e.mul(R,V),V=e.add(O,A),R=e.sub(R,V),V=e.add(v,g),x=e.add(b,D),V=e.mul(V,x),x=e.add(C,A),V=e.sub(V,x),y=e.mul(L,R),x=e.mul(T,A),y=e.add(x,y),x=e.sub(C,y),y=e.add(C,y),S=e.mul(x,y),C=e.add(O,O),C=e.add(C,O),A=e.mul(L,A),R=e.mul(T,R),C=e.add(C,A),A=e.sub(O,A),A=e.mul(L,A),R=e.add(R,A),O=e.mul(C,R),S=e.add(S,O),O=e.mul(V,R),x=e.mul(P,x),x=e.sub(x,O),O=e.mul(P,C),y=e.mul(V,y),y=e.add(y,O),new f(x,S,y)}subtract(_){return this.add(_.negate())}is0(){return this.equals(f.ZERO)}wNAF(_){return m.wNAFCached(this,_,f.normalizeZ)}multiplyUnsafe(_){const{endo:E,n:v}=t;Kn("scalar",_,jt,v);const g=f.ZERO;if(_===jt)return g;if(this.is0()||_===ve)return this;if(!E||m.hasPrecomputes(this))return m.wNAFCachedUnsafe(this,_,f.normalizeZ);let{k1neg:I,k1:b,k2neg:D,k2:x}=E.splitScalar(_),S=g,y=g,L=this;for(;b>jt||x>jt;)b&ve&&(S=S.add(L)),x&ve&&(y=y.add(L)),L=L.double(),b>>=ve,x>>=ve;return I&&(S=S.negate()),D&&(y=y.negate()),y=new f(e.mul(y.px,E.beta),y.py,y.pz),S.add(y)}multiply(_){const{endo:E,n:v}=t;Kn("scalar",_,ve,v);let g,I;if(E){const{k1neg:b,k1:D,k2neg:x,k2:S}=E.splitScalar(_);let{p:y,f:L}=this.wNAF(D),{p:T,f:O}=this.wNAF(S);y=m.constTimeNegate(b,y),T=m.constTimeNegate(x,T),T=new f(e.mul(T.px,E.beta),T.py,T.pz),g=y.add(T),I=L.add(O)}else{const{p:b,f:D}=this.wNAF(_);g=b,I=D}return f.normalizeZ([g,I])[0]}multiplyAndAddUnsafe(_,E,v){const g=f.BASE,I=(D,x)=>x===jt||x===ve||!D.equals(g)?D.multiplyUnsafe(x):D.multiply(x),b=I(this,E).add(I(_,v));return b.is0()?void 0:b}toAffine(_){return h(this,_)}isTorsionFree(){const{h:_,isTorsionFree:E}=t;if(_===ve)return!0;if(E)return E(f,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:_,clearCofactor:E}=t;return _===ve?this:E?E(f,this):this.multiplyUnsafe(t.h)}toRawBytes(_=!0){return Vr("isCompressed",_),this.assertValidity(),i(f,this,_)}toHex(_=!0){return Vr("isCompressed",_),Sr(this.toRawBytes(_))}}f.BASE=new f(t.Gx,t.Gy,e.ONE),f.ZERO=new f(e.ZERO,e.ONE,e.ZERO);const p=t.nBitLength,m=B_(f,t.endo?Math.ceil(p/2):p);return{CURVE:t,ProjectivePoint:f,normPrivateKeyToScalar:l,weierstrassEquation:o,isWithinCurveOrder:c}}function K_(n){const t=Wu(n);return Hi(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function F_(n){const t=K_(n),{Fp:e,n:r}=t,i=e.BYTES+1,s=2*e.BYTES+1;function o(A){return Ye(A,r)}function c(A){return Ys(A,r)}const{ProjectivePoint:l,normPrivateKeyToScalar:u,weierstrassEquation:h,isWithinCurveOrder:d}=z_({...t,toBytes(A,P,R){const V=P.toAffine(),k=e.toBytes(V.x),$=Li;return Vr("isCompressed",R),R?$(Uint8Array.from([P.hasEvenY()?2:3]),k):$(Uint8Array.from([4]),k,e.toBytes(V.y))},fromBytes(A){const P=A.length,R=A[0],V=A.subarray(1);if(P===i&&(R===2||R===3)){const k=On(V);if(!ra(k,ve,e.ORDER))throw new Error("Point is not on curve");const $=h(k);let M;try{M=e.sqrt($)}catch(F){const K=F instanceof Error?": "+F.message:"";throw new Error("Point is not on curve"+K)}const N=(M&ve)===ve;return(R&1)===1!==N&&(M=e.neg(M)),{x:k,y:M}}else if(P===s&&R===4){const k=e.fromBytes(V.subarray(0,e.BYTES)),$=e.fromBytes(V.subarray(e.BYTES,2*e.BYTES));return{x:k,y:$}}else{const k=i,$=s;throw new Error("invalid Point, expected length of "+k+", or uncompressed "+$+", got "+P)}}}),f=A=>Sr(Cr(A,t.nByteLength));function p(A){const P=r>>ve;return A>P}function m(A){return p(A)?o(-A):A}const w=(A,P,R)=>On(A.slice(P,R));class _{constructor(P,R,V){Kn("r",P,ve,r),Kn("s",R,ve,r),this.r=P,this.s=R,V!=null&&(this.recovery=V),Object.freeze(this)}static fromCompact(P){const R=t.nByteLength;return P=gt("compactSignature",P,R*2),new _(w(P,0,R),w(P,R,2*R))}static fromDER(P){const{r:R,s:V}=Mt.toSig(gt("DER",P));return new _(R,V)}assertValidity(){}addRecoveryBit(P){return new _(this.r,this.s,P)}recoverPublicKey(P){const{r:R,s:V,recovery:k}=this,$=D(gt("msgHash",P));if(k==null||![0,1,2,3].includes(k))throw new Error("recovery id invalid");const M=k===2||k===3?R+t.n:R;if(M>=e.ORDER)throw new Error("recovery id 2 or 3 invalid");const N=k&1?"03":"02",z=l.fromHex(N+f(M)),F=c(M),K=o(-$*F),W=o(V*F),G=l.BASE.multiplyAndAddUnsafe(z,K,W);if(!G)throw new Error("point at infinify");return G.assertValidity(),G}hasHighS(){return p(this.s)}normalizeS(){return this.hasHighS()?new _(this.r,o(-this.s),this.recovery):this}toDERRawBytes(){return Ri(this.toDERHex())}toDERHex(){return Mt.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Ri(this.toCompactHex())}toCompactHex(){return f(this.r)+f(this.s)}}const E={isValidPrivateKey(A){try{return u(A),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const A=zu(t.n);return k_(t.randomBytes(A),t.n)},precompute(A=8,P=l.BASE){return P._setWindowSize(A),P.multiply(BigInt(3)),P}};function v(A,P=!0){return l.fromPrivateKey(A).toRawBytes(P)}function g(A){const P=Zn(A),R=typeof A=="string",V=(P||R)&&A.length;return P?V===i||V===s:R?V===2*i||V===2*s:A instanceof l}function I(A,P,R=!0){if(g(A))throw new Error("first arg must be private key");if(!g(P))throw new Error("second arg must be public key");return l.fromHex(P).multiply(u(A)).toRawBytes(R)}const b=t.bits2int||function(A){if(A.length>8192)throw new Error("input is too large");const P=On(A),R=A.length*8-t.nBitLength;return R>0?P>>BigInt(R):P},D=t.bits2int_modN||function(A){return o(b(A))},x=Wi(t.nBitLength);function S(A){return Kn("num < 2^"+t.nBitLength,A,jt,x),Cr(A,t.nByteLength)}function y(A,P,R=L){if(["recovered","canonical"].some(re=>re in R))throw new Error("sign() legacy options not supported");const{hash:V,randomBytes:k}=t;let{lowS:$,prehash:M,extraEntropy:N}=R;$==null&&($=!0),A=gt("msgHash",A),rc(R),M&&(A=gt("prehashed msgHash",V(A)));const z=D(A),F=u(P),K=[S(F),S(z)];if(N!=null&&N!==!1){const re=N===!0?k(e.BYTES):N;K.push(gt("extraEntropy",re))}const W=Li(...K),G=z;function he(re){const te=b(re);if(!d(te))return;const Ve=c(te),je=l.BASE.multiply(te).toAffine(),It=o(je.x);if(It===jt)return;const mn=o(Ve*o(G+It*F));if(mn===jt)return;let At=(je.x===It?0:2)|Number(je.y&ve),Gr=mn;return $&&p(mn)&&(Gr=m(mn),At^=1),new _(It,Gr,At)}return{seed:W,k2sig:he}}const L={lowS:t.lowS,prehash:!1},T={lowS:t.lowS,prehash:!1};function O(A,P,R=L){const{seed:V,k2sig:k}=y(A,P,R),$=t;return P_($.hash.outputLen,$.nByteLength,$.hmac)(V,k)}l.BASE._setWindowSize(8);function C(A,P,R,V=T){const k=A;P=gt("msgHash",P),R=gt("publicKey",R);const{lowS:$,prehash:M,format:N}=V;if(rc(V),"strict"in V)throw new Error("options.strict was renamed to lowS");if(N!==void 0&&N!=="compact"&&N!=="der")throw new Error("format must be compact or der");const z=typeof k=="string"||Zn(k),F=!z&&!N&&typeof k=="object"&&k!==null&&typeof k.r=="bigint"&&typeof k.s=="bigint";if(!z&&!F)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let K,W;try{if(F&&(K=new _(k.r,k.s)),z){try{N!=="compact"&&(K=_.fromDER(k))}catch(At){if(!(At instanceof Mt.Err))throw At}!K&&N!=="der"&&(K=_.fromCompact(k))}W=l.fromHex(R)}catch{return!1}if(!K||$&&K.hasHighS())return!1;M&&(P=t.hash(P));const{r:G,s:he}=K,re=D(P),te=c(he),Ve=o(re*te),je=o(G*te),It=l.BASE.multiplyAndAddUnsafe(W,Ve,je)?.toAffine();return It?o(It.x)===G:!1}return{CURVE:t,getPublicKey:v,getSharedSecret:I,sign:O,verify:C,ProjectivePoint:l,Signature:_,utils:E}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function W_(n){return{hash:n,hmac:(t,...e)=>$u(n,t,p_(...e)),randomBytes:m_}}function H_(n,t){const e=r=>F_({...n,...W_(r)});return{...e(t),create:e}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Hu=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),sc=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),G_=BigInt(1),Qs=BigInt(2),oc=(n,t)=>(n+t/Qs)/t;function Z_(n){const t=Hu,e=BigInt(3),r=BigInt(6),i=BigInt(11),s=BigInt(22),o=BigInt(23),c=BigInt(44),l=BigInt(88),u=n*n*n%t,h=u*u*n%t,d=at(h,e,t)*h%t,f=at(d,e,t)*h%t,p=at(f,Qs,t)*u%t,m=at(p,i,t)*p%t,w=at(m,s,t)*m%t,_=at(w,c,t)*w%t,E=at(_,l,t)*_%t,v=at(E,c,t)*w%t,g=at(v,e,t)*h%t,I=at(g,o,t)*m%t,b=at(I,r,t)*u%t,D=at(b,Qs,t);if(!Xs.eql(Xs.sqr(D),n))throw new Error("Cannot find square root");return D}const Xs=qu(Hu,void 0,void 0,{sqrt:Z_}),ia=H_({a:BigInt(0),b:BigInt(7),Fp:Xs,n:sc,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:n=>{const t=sc,e=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-G_*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=e,o=BigInt("0x100000000000000000000000000000000"),c=oc(s*n,t),l=oc(-r*n,t);let u=Ye(n-c*e-l*i,t),h=Ye(-c*r-l*s,t);const d=u>o,f=h>o;if(d&&(u=t-u),f&&(h=t-h),u>o||h>o)throw new Error("splitScalar: Endomorphism failed, k="+n);return{k1neg:d,k1:u,k2neg:f,k2:h}}}},I_);BigInt(0);ia.ProjectivePoint;function Y_(n){if("privateKey"in n){const t=mp(typeof n.message=="object"?n.message.raw:Yl(n.message)),e=Uo({payload:t,privateKey:n.privateKey});return ru(e)}if("account"in n){const{message:t,account:e}=n;return e.signMessage({message:t})}throw new Error("Either privateKey or account is required")}function J_(n){const{privateKey:t,...e}=n;typeof e.domain?.chainId=="string"&&(e.domain.chainId=Jl(e.domain.chainId));const r=xf(e),i=Uo({payload:r,privateKey:t});return ru(i)}function eo(n){const{client:t}=n,e=`0x${n.privateKey.replace(/^0x/,"")}`,r=No(ia.getPublicKey(e.slice(2),!1)),i=Yf(r);return{address:J(i),sendTransaction:async o=>{const c=ji({chain:Te(o.chainId),client:t}),l=Ca({privateKey:e,transaction:o});return{transactionHash:await Vf(c,l)}},signAuthorization:async o=>{const c=Uo({payload:tu(o),privateKey:e});return Sf(o,{signature:c})},signMessage:async({message:o})=>Y_({message:o,privateKey:e}),signTransaction:async o=>Ca({privateKey:e,transaction:o}),signTypedData:async o=>J_({...o,privateKey:e})}}async function Q_(n){const t=No(ia.utils.randomPrivateKey());return eo({client:n.client,privateKey:t})}async function X_(n){const{address:t,client:e,chain:r}=n,i=n.tokenAddress||(r.id===42429?"0x20c0000000000000000000000000000000000000":void 0);if(i&&J(i)!==J($a)){const{getBalance:h}=await a(async()=>{const{getBalance:d}=await import("./getBalance-D8M0DbBu.js");return{getBalance:d}},__vite__mapDeps([24,16,15,1,4,25]));return h({address:t,contract:ko({address:i,chain:r,client:e})})}const s=ji({chain:r,client:e}),[o,c,l,u]=await Promise.all([Kf(r),Ff(r),Wf(r),Cf(s,{address:t})]);return{chainId:r.id,decimals:c,displayValue:$f(u,c),name:l,symbol:o,tokenAddress:i??$a,value:u}}var sa={exports:{}},Fn=typeof Reflect=="object"?Reflect:null,ac=Fn&&typeof Fn.apply=="function"?Fn.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)},ui;Fn&&typeof Fn.ownKeys=="function"?ui=Fn.ownKeys:Object.getOwnPropertySymbols?ui=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:ui=function(t){return Object.getOwnPropertyNames(t)};function em(n){console&&console.warn&&console.warn(n)}var Gu=Number.isNaN||function(t){return t!==t};function se(){se.init.call(this)}sa.exports=se;sa.exports.once=im;se.EventEmitter=se;se.prototype._events=void 0;se.prototype._eventsCount=0;se.prototype._maxListeners=void 0;var cc=10;function Gi(n){if(typeof n!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n)}Object.defineProperty(se,"defaultMaxListeners",{enumerable:!0,get:function(){return cc},set:function(n){if(typeof n!="number"||n<0||Gu(n))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+n+".");cc=n}});se.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};se.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||Gu(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function Zu(n){return n._maxListeners===void 0?se.defaultMaxListeners:n._maxListeners}se.prototype.getMaxListeners=function(){return Zu(this)};se.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var i=t==="error",s=this._events;if(s!==void 0)i=i&&s.error===void 0;else if(!i)return!1;if(i){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var c=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw c.context=o,c}var l=s[t];if(l===void 0)return!1;if(typeof l=="function")ac(l,this,e);else for(var u=l.length,h=eh(l,u),r=0;r<u;++r)ac(h[r],this,e);return!0};function Yu(n,t,e,r){var i,s,o;if(Gi(e),s=n._events,s===void 0?(s=n._events=Object.create(null),n._eventsCount=0):(s.newListener!==void 0&&(n.emit("newListener",t,e.listener?e.listener:e),s=n._events),o=s[t]),o===void 0)o=s[t]=e,++n._eventsCount;else if(typeof o=="function"?o=s[t]=r?[e,o]:[o,e]:r?o.unshift(e):o.push(e),i=Zu(n),i>0&&o.length>i&&!o.warned){o.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=n,c.type=t,c.count=o.length,em(c)}return n}se.prototype.addListener=function(t,e){return Yu(this,t,e,!1)};se.prototype.on=se.prototype.addListener;se.prototype.prependListener=function(t,e){return Yu(this,t,e,!0)};function tm(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Ju(n,t,e){var r={fired:!1,wrapFn:void 0,target:n,type:t,listener:e},i=tm.bind(r);return i.listener=e,r.wrapFn=i,i}se.prototype.once=function(t,e){return Gi(e),this.on(t,Ju(this,t,e)),this};se.prototype.prependOnceListener=function(t,e){return Gi(e),this.prependListener(t,Ju(this,t,e)),this};se.prototype.removeListener=function(t,e){var r,i,s,o,c;if(Gi(e),i=this._events,i===void 0)return this;if(r=i[t],r===void 0)return this;if(r===e||r.listener===e)--this._eventsCount===0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||e));else if(typeof r!="function"){for(s=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){c=r[o].listener,s=o;break}if(s<0)return this;s===0?r.shift():nm(r,s),r.length===1&&(i[t]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",t,c||e)}return this};se.prototype.off=se.prototype.removeListener;se.prototype.removeAllListeners=function(t){var e,r,i;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[t]),this;if(arguments.length===0){var s=Object.keys(r),o;for(i=0;i<s.length;++i)o=s[i],o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(e=r[t],typeof e=="function")this.removeListener(t,e);else if(e!==void 0)for(i=e.length-1;i>=0;i--)this.removeListener(t,e[i]);return this};function Qu(n,t,e){var r=n._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i=="function"?e?[i.listener||i]:[i]:e?rm(i):eh(i,i.length)}se.prototype.listeners=function(t){return Qu(this,t,!0)};se.prototype.rawListeners=function(t){return Qu(this,t,!1)};se.listenerCount=function(n,t){return typeof n.listenerCount=="function"?n.listenerCount(t):Xu.call(n,t)};se.prototype.listenerCount=Xu;function Xu(n){var t=this._events;if(t!==void 0){var e=t[n];if(typeof e=="function")return 1;if(e!==void 0)return e.length}return 0}se.prototype.eventNames=function(){return this._eventsCount>0?ui(this._events):[]};function eh(n,t){for(var e=new Array(t),r=0;r<t;++r)e[r]=n[r];return e}function nm(n,t){for(;t+1<n.length;t++)n[t]=n[t+1];n.pop()}function rm(n){for(var t=new Array(n.length),e=0;e<t.length;++e)t[e]=n[e].listener||n[e];return t}function im(n,t){return new Promise(function(e,r){function i(o){n.removeListener(t,s),r(o)}function s(){typeof n.removeListener=="function"&&n.removeListener("error",i),e([].slice.call(arguments))}th(n,t,s,{once:!0}),t!=="error"&&sm(n,i,{once:!0})})}function sm(n,t,e){typeof n.on=="function"&&th(n,"error",t,e)}function th(n,t,e,r){if(typeof n.on=="function")r.once?n.once(t,e):n.on(t,e);else if(typeof n.addEventListener=="function")n.addEventListener(t,function i(s){r.once&&n.removeEventListener(t,i),e(s)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof n)}var $n=sa.exports;const om=au($n);function am(n){return!n||typeof n.then!="function"?Promise.resolve(n):n}function Ee(n,...t){try{return am(n(...t))}catch(e){return Promise.reject(e)}}function cm(n){const t=typeof n;return n===null||t!=="object"&&t!=="function"}function lm(n){const t=Object.getPrototypeOf(n);return!t||t.isPrototypeOf(Object)}function hi(n){if(cm(n))return String(n);if(lm(n)||Array.isArray(n))return JSON.stringify(n);if(typeof n.toJSON=="function")return hi(n.toJSON());throw new Error("[unstorage] Cannot stringify value!")}const to="base64:";function um(n){return typeof n=="string"?n:to+fm(n)}function hm(n){return typeof n!="string"||!n.startsWith(to)?n:dm(n.slice(to.length))}function dm(n){return globalThis.Buffer?Buffer.from(n,"base64"):Uint8Array.from(globalThis.atob(n),t=>t.codePointAt(0))}function fm(n){return globalThis.Buffer?Buffer.from(n).toString("base64"):globalThis.btoa(String.fromCodePoint(...n))}function He(n){return n&&n.split("?")[0]?.replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,"")||""}function pm(...n){return He(n.join(":"))}function Qr(n){return n=He(n),n?n+":":""}function _m(n,t){if(t===void 0)return!0;let e=0,r=n.indexOf(":");for(;r>-1;)e++,r=n.indexOf(":",r+1);return e<=t}function mm(n,t){return t?n.startsWith(t)&&n[n.length-1]!=="$":n[n.length-1]!=="$"}const wm="memory",ym=()=>{const n=new Map;return{name:wm,getInstance:()=>n,hasItem(t){return n.has(t)},getItem(t){return n.get(t)??null},getItemRaw(t){return n.get(t)??null},setItem(t,e){n.set(t,e)},setItemRaw(t,e){n.set(t,e)},removeItem(t){n.delete(t)},getKeys(){return[...n.keys()]},clear(){n.clear()},dispose(){n.clear()}}};function gm(n={}){const t={mounts:{"":n.driver||ym()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},e=u=>{for(const h of t.mountpoints)if(u.startsWith(h))return{base:h,relativeKey:u.slice(h.length),driver:t.mounts[h]};return{base:"",relativeKey:u,driver:t.mounts[""]}},r=(u,h)=>t.mountpoints.filter(d=>d.startsWith(u)||h&&u.startsWith(d)).map(d=>({relativeBase:u.length>d.length?u.slice(d.length):void 0,mountpoint:d,driver:t.mounts[d]})),i=(u,h)=>{if(t.watching){h=He(h);for(const d of t.watchListeners)d(u,h)}},s=async()=>{if(!t.watching){t.watching=!0;for(const u in t.mounts)t.unwatch[u]=await lc(t.mounts[u],i,u)}},o=async()=>{if(t.watching){for(const u in t.unwatch)await t.unwatch[u]();t.unwatch={},t.watching=!1}},c=(u,h,d)=>{const f=new Map,p=m=>{let w=f.get(m.base);return w||(w={driver:m.driver,base:m.base,items:[]},f.set(m.base,w)),w};for(const m of u){const w=typeof m=="string",_=He(w?m:m.key),E=w?void 0:m.value,v=w||!m.options?h:{...h,...m.options},g=e(_);p(g).items.push({key:_,value:E,relativeKey:g.relativeKey,options:v})}return Promise.all([...f.values()].map(m=>d(m))).then(m=>m.flat())},l={hasItem(u,h={}){u=He(u);const{relativeKey:d,driver:f}=e(u);return Ee(f.hasItem,d,h)},getItem(u,h={}){u=He(u);const{relativeKey:d,driver:f}=e(u);return Ee(f.getItem,d,h).then(p=>Zr(p))},getItems(u,h={}){return c(u,h,d=>d.driver.getItems?Ee(d.driver.getItems,d.items.map(f=>({key:f.relativeKey,options:f.options})),h).then(f=>f.map(p=>({key:pm(d.base,p.key),value:Zr(p.value)}))):Promise.all(d.items.map(f=>Ee(d.driver.getItem,f.relativeKey,f.options).then(p=>({key:f.key,value:Zr(p)})))))},getItemRaw(u,h={}){u=He(u);const{relativeKey:d,driver:f}=e(u);return f.getItemRaw?Ee(f.getItemRaw,d,h):Ee(f.getItem,d,h).then(p=>hm(p))},async setItem(u,h,d={}){if(h===void 0)return l.removeItem(u);u=He(u);const{relativeKey:f,driver:p}=e(u);p.setItem&&(await Ee(p.setItem,f,hi(h),d),p.watch||i("update",u))},async setItems(u,h){await c(u,h,async d=>{if(d.driver.setItems)return Ee(d.driver.setItems,d.items.map(f=>({key:f.relativeKey,value:hi(f.value),options:f.options})),h);d.driver.setItem&&await Promise.all(d.items.map(f=>Ee(d.driver.setItem,f.relativeKey,hi(f.value),f.options)))})},async setItemRaw(u,h,d={}){if(h===void 0)return l.removeItem(u,d);u=He(u);const{relativeKey:f,driver:p}=e(u);if(p.setItemRaw)await Ee(p.setItemRaw,f,h,d);else if(p.setItem)await Ee(p.setItem,f,um(h),d);else return;p.watch||i("update",u)},async removeItem(u,h={}){typeof h=="boolean"&&(h={removeMeta:h}),u=He(u);const{relativeKey:d,driver:f}=e(u);f.removeItem&&(await Ee(f.removeItem,d,h),(h.removeMeta||h.removeMata)&&await Ee(f.removeItem,d+"$",h),f.watch||i("remove",u))},async getMeta(u,h={}){typeof h=="boolean"&&(h={nativeOnly:h}),u=He(u);const{relativeKey:d,driver:f}=e(u),p=Object.create(null);if(f.getMeta&&Object.assign(p,await Ee(f.getMeta,d,h)),!h.nativeOnly){const m=await Ee(f.getItem,d+"$",h).then(w=>Zr(w));m&&typeof m=="object"&&(typeof m.atime=="string"&&(m.atime=new Date(m.atime)),typeof m.mtime=="string"&&(m.mtime=new Date(m.mtime)),Object.assign(p,m))}return p},setMeta(u,h,d={}){return this.setItem(u+"$",h,d)},removeMeta(u,h={}){return this.removeItem(u+"$",h)},async getKeys(u,h={}){u=Qr(u);const d=r(u,!0);let f=[];const p=[];let m=!0;for(const _ of d){_.driver.flags?.maxDepth||(m=!1);const E=await Ee(_.driver.getKeys,_.relativeBase,h);for(const v of E){const g=_.mountpoint+He(v);f.some(I=>g.startsWith(I))||p.push(g)}f=[_.mountpoint,...f.filter(v=>!v.startsWith(_.mountpoint))]}const w=h.maxDepth!==void 0&&!m;return p.filter(_=>(!w||_m(_,h.maxDepth))&&mm(_,u))},async clear(u,h={}){u=Qr(u),await Promise.all(r(u,!1).map(async d=>{if(d.driver.clear)return Ee(d.driver.clear,d.relativeBase,h);if(d.driver.removeItem){const f=await d.driver.getKeys(d.relativeBase||"",h);return Promise.all(f.map(p=>d.driver.removeItem(p,h)))}}))},async dispose(){await Promise.all(Object.values(t.mounts).map(u=>uc(u)))},async watch(u){return await s(),t.watchListeners.push(u),async()=>{t.watchListeners=t.watchListeners.filter(h=>h!==u),t.watchListeners.length===0&&await o()}},async unwatch(){t.watchListeners=[],await o()},mount(u,h){if(u=Qr(u),u&&t.mounts[u])throw new Error(`already mounted at ${u}`);return u&&(t.mountpoints.push(u),t.mountpoints.sort((d,f)=>f.length-d.length)),t.mounts[u]=h,t.watching&&Promise.resolve(lc(h,i,u)).then(d=>{t.unwatch[u]=d}).catch(console.error),l},async unmount(u,h=!0){u=Qr(u),!(!u||!t.mounts[u])&&(t.watching&&u in t.unwatch&&(t.unwatch[u]?.(),delete t.unwatch[u]),h&&await uc(t.mounts[u]),t.mountpoints=t.mountpoints.filter(d=>d!==u),delete t.mounts[u])},getMount(u=""){u=He(u)+":";const h=e(u);return{driver:h.driver,base:h.base}},getMounts(u="",h={}){return u=He(u),r(u,h.parents).map(f=>({driver:f.driver,base:f.mountpoint}))},keys:(u,h={})=>l.getKeys(u,h),get:(u,h={})=>l.getItem(u,h),set:(u,h,d={})=>l.setItem(u,h,d),has:(u,h={})=>l.hasItem(u,h),del:(u,h={})=>l.removeItem(u,h),remove:(u,h={})=>l.removeItem(u,h)};return l}function lc(n,t,e){return n.watch?n.watch((r,i)=>t(r,e+i)):()=>{}}async function uc(n){typeof n.dispose=="function"&&await Ee(n.dispose)}const Em="idb-keyval";var vm=(n={})=>{const t=n.base&&n.base.length>0?`${n.base}:`:"",e=i=>t+i;let r;return n.dbName&&n.storeName&&(r=ap(n.dbName,n.storeName)),{name:Em,options:n,async hasItem(i){return!(typeof await Ba(e(i),r)>"u")},async getItem(i){return await Ba(e(i),r)??null},setItem(i,s){return cp(e(i),s,r)},removeItem(i){return lp(e(i),r)},getKeys(){return up(r)},clear(){return hp(r)}}};const bm="WALLET_CONNECT_V2_INDEXED_DB",Im="keyvaluestorage";class Am{constructor(){this.indexedDb=gm({driver:vm({dbName:bm,storeName:Im})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map(t=>[t.key,t.value])}async getItem(t){const e=await this.indexedDb.getItem(t);if(e!==null)return e}async setItem(t,e){await this.indexedDb.setItem(t,qo(e))}async removeItem(t){await this.indexedDb.removeItem(t)}}var ys=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},di={exports:{}};(function(){let n;function t(){}n=t,n.prototype.getItem=function(e){return this.hasOwnProperty(e)?String(this[e]):null},n.prototype.setItem=function(e,r){this[e]=String(r)},n.prototype.removeItem=function(e){delete this[e]},n.prototype.clear=function(){const e=this;Object.keys(e).forEach(function(r){e[r]=void 0,delete e[r]})},n.prototype.key=function(e){return e=e||0,Object.keys(this)[e]},n.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof ys<"u"&&ys.localStorage?di.exports=ys.localStorage:typeof window<"u"&&window.localStorage?di.exports=window.localStorage:di.exports=new t})();function Tm(n){var t;return[n[0],Ii((t=n[1])!=null?t:"")]}let Pm=class{constructor(){this.localStorage=di.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(Tm)}async getItem(t){const e=this.localStorage.getItem(t);if(e!==null)return Ii(e)}async setItem(t,e){this.localStorage.setItem(t,qo(e))}async removeItem(t){this.localStorage.removeItem(t)}};const Om="wc_storage_version",hc=1,Rm=async(n,t,e)=>{const r=Om,i=await t.getItem(r);if(i&&i>=hc){e(t);return}const s=await n.getKeys();if(!s.length){e(t);return}const o=[];for(;s.length;){const c=s.shift();if(!c)continue;const l=c.toLowerCase();if(l.includes("wc@")||l.includes("walletconnect")||l.includes("wc_")||l.includes("wallet_connect")){const u=await n.getItem(c);await t.setItem(c,u),o.push(c)}}await t.setItem(r,hc),e(t),Lm(n,o)},Lm=async(n,t)=>{t.length&&t.forEach(async e=>{await n.removeItem(e)})};let Dm=class{constructor(){this.initialized=!1,this.setInitialized=e=>{this.storage=e,this.initialized=!0};const t=new Pm;this.storage=t;try{const e=new Am;Rm(t,e,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(t){return await this.initialize(),this.storage.getItem(t)}async setItem(t,e){return await this.initialize(),this.storage.setItem(t,e)}async removeItem(t){return await this.initialize(),this.storage.removeItem(t)}async initialize(){this.initialized||await new Promise(t=>{const e=setInterval(()=>{this.initialized&&(clearInterval(e),t())},20)})}};var nh={exports:{}},Wn=typeof Reflect=="object"?Reflect:null,dc=Wn&&typeof Wn.apply=="function"?Wn.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)},fi;Wn&&typeof Wn.ownKeys=="function"?fi=Wn.ownKeys:Object.getOwnPropertySymbols?fi=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:fi=function(t){return Object.getOwnPropertyNames(t)};function xm(n){console&&console.warn&&console.warn(n)}var rh=Number.isNaN||function(t){return t!==t};function oe(){oe.init.call(this)}nh.exports=oe;nh.exports.once=$m;oe.EventEmitter=oe;oe.prototype._events=void 0;oe.prototype._eventsCount=0;oe.prototype._maxListeners=void 0;var fc=10;function Zi(n){if(typeof n!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n)}Object.defineProperty(oe,"defaultMaxListeners",{enumerable:!0,get:function(){return fc},set:function(n){if(typeof n!="number"||n<0||rh(n))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+n+".");fc=n}});oe.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};oe.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||rh(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function ih(n){return n._maxListeners===void 0?oe.defaultMaxListeners:n._maxListeners}oe.prototype.getMaxListeners=function(){return ih(this)};oe.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var i=t==="error",s=this._events;if(s!==void 0)i=i&&s.error===void 0;else if(!i)return!1;if(i){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var c=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw c.context=o,c}var l=s[t];if(l===void 0)return!1;if(typeof l=="function")dc(l,this,e);else for(var u=l.length,h=lh(l,u),r=0;r<u;++r)dc(h[r],this,e);return!0};function sh(n,t,e,r){var i,s,o;if(Zi(e),s=n._events,s===void 0?(s=n._events=Object.create(null),n._eventsCount=0):(s.newListener!==void 0&&(n.emit("newListener",t,e.listener?e.listener:e),s=n._events),o=s[t]),o===void 0)o=s[t]=e,++n._eventsCount;else if(typeof o=="function"?o=s[t]=r?[e,o]:[o,e]:r?o.unshift(e):o.push(e),i=ih(n),i>0&&o.length>i&&!o.warned){o.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=n,c.type=t,c.count=o.length,xm(c)}return n}oe.prototype.addListener=function(t,e){return sh(this,t,e,!1)};oe.prototype.on=oe.prototype.addListener;oe.prototype.prependListener=function(t,e){return sh(this,t,e,!0)};function Vm(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function oh(n,t,e){var r={fired:!1,wrapFn:void 0,target:n,type:t,listener:e},i=Vm.bind(r);return i.listener=e,r.wrapFn=i,i}oe.prototype.once=function(t,e){return Zi(e),this.on(t,oh(this,t,e)),this};oe.prototype.prependOnceListener=function(t,e){return Zi(e),this.prependListener(t,oh(this,t,e)),this};oe.prototype.removeListener=function(t,e){var r,i,s,o,c;if(Zi(e),i=this._events,i===void 0)return this;if(r=i[t],r===void 0)return this;if(r===e||r.listener===e)--this._eventsCount===0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||e));else if(typeof r!="function"){for(s=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){c=r[o].listener,s=o;break}if(s<0)return this;s===0?r.shift():Sm(r,s),r.length===1&&(i[t]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",t,c||e)}return this};oe.prototype.off=oe.prototype.removeListener;oe.prototype.removeAllListeners=function(t){var e,r,i;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[t]),this;if(arguments.length===0){var s=Object.keys(r),o;for(i=0;i<s.length;++i)o=s[i],o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(e=r[t],typeof e=="function")this.removeListener(t,e);else if(e!==void 0)for(i=e.length-1;i>=0;i--)this.removeListener(t,e[i]);return this};function ah(n,t,e){var r=n._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i=="function"?e?[i.listener||i]:[i]:e?Cm(i):lh(i,i.length)}oe.prototype.listeners=function(t){return ah(this,t,!0)};oe.prototype.rawListeners=function(t){return ah(this,t,!1)};oe.listenerCount=function(n,t){return typeof n.listenerCount=="function"?n.listenerCount(t):ch.call(n,t)};oe.prototype.listenerCount=ch;function ch(n){var t=this._events;if(t!==void 0){var e=t[n];if(typeof e=="function")return 1;if(e!==void 0)return e.length}return 0}oe.prototype.eventNames=function(){return this._eventsCount>0?fi(this._events):[]};function lh(n,t){for(var e=new Array(t),r=0;r<t;++r)e[r]=n[r];return e}function Sm(n,t){for(;t+1<n.length;t++)n[t]=n[t+1];n.pop()}function Cm(n){for(var t=new Array(n.length),e=0;e<t.length;++e)t[e]=n[e].listener||n[e];return t}function $m(n,t){return new Promise(function(e,r){function i(o){n.removeListener(t,s),r(o)}function s(){typeof n.removeListener=="function"&&n.removeListener("error",i),e([].slice.call(arguments))}uh(n,t,s,{once:!0}),t!=="error"&&km(n,i,{once:!0})})}function km(n,t,e){typeof n.on=="function"&&uh(n,"error",t,e)}function uh(n,t,e,r){if(typeof n.on=="function")r.once?n.once(t,e):n.on(t,e);else if(typeof n.addEventListener=="function")n.addEventListener(t,function i(s){r.once&&n.removeEventListener(t,i),e(s)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof n)}var Um=Object.defineProperty,Nm=(n,t,e)=>t in n?Um(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,pc=(n,t,e)=>Nm(n,typeof t!="symbol"?t+"":t,e);class Bm extends Xn{constructor(t){super(),this.opts=t,pc(this,"protocol","wc"),pc(this,"version",2)}}var Mm=Object.defineProperty,qm=(n,t,e)=>t in n?Mm(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,jm=(n,t,e)=>qm(n,t+"",e);class zm extends Xn{constructor(t,e){super(),this.core=t,this.logger=e,jm(this,"records",new Map)}}class Km{constructor(t,e){this.logger=t,this.core=e}}let Fm=class extends Xn{constructor(t,e){super(),this.relayer=t,this.logger=e}},Wm=class extends Xn{constructor(t){super()}},Hm=class{constructor(t,e,r,i){this.core=t,this.logger=e,this.name=r}},Gm=class extends Xn{constructor(t,e){super(),this.relayer=t,this.logger=e}};class Zm extends Xn{constructor(t,e){super(),this.core=t,this.logger=e}}let Ym=class{constructor(t,e,r){this.core=t,this.logger=e,this.store=r}},Jm=class{constructor(t,e){this.projectId=t,this.logger=e}},Qm=class{constructor(t,e,r){this.core=t,this.logger=e,this.telemetryEnabled=r}};var Xm=Object.defineProperty,ew=(n,t,e)=>t in n?Xm(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,_c=(n,t,e)=>ew(n,typeof t!="symbol"?t+"":t,e);let tw=class{constructor(t){this.opts=t,_c(this,"protocol","wc"),_c(this,"version",2)}},nw=class{constructor(t){this.client=t}};function rw(n){if(n.length>=255)throw new TypeError("Alphabet too long");const t=new Uint8Array(256);for(let u=0;u<t.length;u++)t[u]=255;for(let u=0;u<n.length;u++){const h=n.charAt(u),d=h.charCodeAt(0);if(t[d]!==255)throw new TypeError(h+" is ambiguous");t[d]=u}const e=n.length,r=n.charAt(0),i=Math.log(e)/Math.log(256),s=Math.log(256)/Math.log(e);function o(u){if(u instanceof Uint8Array||(ArrayBuffer.isView(u)?u=new Uint8Array(u.buffer,u.byteOffset,u.byteLength):Array.isArray(u)&&(u=Uint8Array.from(u))),!(u instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(u.length===0)return"";let h=0,d=0,f=0;const p=u.length;for(;f!==p&&u[f]===0;)f++,h++;const m=(p-f)*s+1>>>0,w=new Uint8Array(m);for(;f!==p;){let v=u[f],g=0;for(let I=m-1;(v!==0||g<d)&&I!==-1;I--,g++)v+=256*w[I]>>>0,w[I]=v%e>>>0,v=v/e>>>0;if(v!==0)throw new Error("Non-zero carry");d=g,f++}let _=m-d;for(;_!==m&&w[_]===0;)_++;let E=r.repeat(h);for(;_<m;++_)E+=n.charAt(w[_]);return E}function c(u){if(typeof u!="string")throw new TypeError("Expected String");if(u.length===0)return new Uint8Array;let h=0,d=0,f=0;for(;u[h]===r;)d++,h++;const p=(u.length-h)*i+1>>>0,m=new Uint8Array(p);for(;h<u.length;){const v=u.charCodeAt(h);if(v>255)return;let g=t[v];if(g===255)return;let I=0;for(let b=p-1;(g!==0||I<f)&&b!==-1;b--,I++)g+=e*m[b]>>>0,m[b]=g%256>>>0,g=g/256>>>0;if(g!==0)throw new Error("Non-zero carry");f=I,h++}let w=p-f;for(;w!==p&&m[w]===0;)w++;const _=new Uint8Array(d+(p-w));let E=d;for(;w!==p;)_[E++]=m[w++];return _}function l(u){const h=c(u);if(h)return h;throw new Error("Non-base"+e+" character")}return{encode:o,decodeUnsafe:c,decode:l}}var iw="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";const jr=rw(iw);function sw(n){const t=n.length;let e=0,r=0;for(;r<t;){let i=n.charCodeAt(r++);if(i&4294967168)if(!(i&4294965248))e+=2;else{if(i>=55296&&i<=56319&&r<t){const s=n.charCodeAt(r);(s&64512)===56320&&(++r,i=((i&1023)<<10)+(s&1023)+65536)}i&4294901760?e+=4:e+=3}else{e++;continue}}return e}function ow(n,t,e){const r=n.length;let i=e,s=0;for(;s<r;){let o=n.charCodeAt(s++);if(o&4294967168)if(!(o&4294965248))t[i++]=o>>6&31|192;else{if(o>=55296&&o<=56319&&s<r){const c=n.charCodeAt(s);(c&64512)===56320&&(++s,o=((o&1023)<<10)+(c&1023)+65536)}o&4294901760?(t[i++]=o>>18&7|240,t[i++]=o>>12&63|128,t[i++]=o>>6&63|128):(t[i++]=o>>12&15|224,t[i++]=o>>6&63|128)}else{t[i++]=o;continue}t[i++]=o&63|128}}const aw=new TextEncoder,cw=50;function lw(n,t,e){aw.encodeInto(n,t.subarray(e))}function uw(n,t,e){n.length>cw?lw(n,t,e):ow(n,t,e)}const hw=4096;function hh(n,t,e){let r=t;const i=r+e,s=[];let o="";for(;r<i;){const c=n[r++];if(!(c&128))s.push(c);else if((c&224)===192){const l=n[r++]&63;s.push((c&31)<<6|l)}else if((c&240)===224){const l=n[r++]&63,u=n[r++]&63;s.push((c&31)<<12|l<<6|u)}else if((c&248)===240){const l=n[r++]&63,u=n[r++]&63,h=n[r++]&63;let d=(c&7)<<18|l<<12|u<<6|h;d>65535&&(d-=65536,s.push(d>>>10&1023|55296),d=56320|d&1023),s.push(d)}else s.push(c);s.length>=hw&&(o+=String.fromCharCode(...s),s.length=0)}return s.length>0&&(o+=String.fromCharCode(...s)),o}const dw=new TextDecoder,fw=200;function pw(n,t,e){const r=n.subarray(t,t+e);return dw.decode(r)}function _w(n,t,e){return e>fw?pw(n,t,e):hh(n,t,e)}class Xr{constructor(t,e){this.type=t,this.data=e}}class it extends Error{constructor(t){super(t);const e=Object.create(it.prototype);Object.setPrototypeOf(this,e),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:it.name})}}const or=4294967295;function mw(n,t,e){const r=e/4294967296,i=e;n.setUint32(t,r),n.setUint32(t+4,i)}function dh(n,t,e){const r=Math.floor(e/4294967296),i=e;n.setUint32(t,r),n.setUint32(t+4,i)}function fh(n,t){const e=n.getInt32(t),r=n.getUint32(t+4);return e*4294967296+r}function ww(n,t){const e=n.getUint32(t),r=n.getUint32(t+4);return e*4294967296+r}const yw=-1,gw=4294967296-1,Ew=17179869184-1;function vw({sec:n,nsec:t}){if(n>=0&&t>=0&&n<=Ew)if(t===0&&n<=gw){const e=new Uint8Array(4);return new DataView(e.buffer).setUint32(0,n),e}else{const e=n/4294967296,r=n&4294967295,i=new Uint8Array(8),s=new DataView(i.buffer);return s.setUint32(0,t<<2|e&3),s.setUint32(4,r),i}else{const e=new Uint8Array(12),r=new DataView(e.buffer);return r.setUint32(0,t),dh(r,4,n),e}}function bw(n){const t=n.getTime(),e=Math.floor(t/1e3),r=(t-e*1e3)*1e6,i=Math.floor(r/1e9);return{sec:e+i,nsec:r-i*1e9}}function Iw(n){if(n instanceof Date){const t=bw(n);return vw(t)}else return null}function Aw(n){const t=new DataView(n.buffer,n.byteOffset,n.byteLength);switch(n.byteLength){case 4:return{sec:t.getUint32(0),nsec:0};case 8:{const e=t.getUint32(0),r=t.getUint32(4),i=(e&3)*4294967296+r,s=e>>>2;return{sec:i,nsec:s}}case 12:{const e=fh(t,4),r=t.getUint32(0);return{sec:e,nsec:r}}default:throw new it(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${n.length}`)}}function Tw(n){const t=Aw(n);return new Date(t.sec*1e3+t.nsec/1e6)}const Pw={type:yw,encode:Iw,decode:Tw};class Di{constructor(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(Pw)}register({type:t,encode:e,decode:r}){if(t>=0)this.encoders[t]=e,this.decoders[t]=r;else{const i=-1-t;this.builtInEncoders[i]=e,this.builtInDecoders[i]=r}}tryToEncode(t,e){for(let r=0;r<this.builtInEncoders.length;r++){const i=this.builtInEncoders[r];if(i!=null){const s=i(t,e);if(s!=null){const o=-1-r;return new Xr(o,s)}}}for(let r=0;r<this.encoders.length;r++){const i=this.encoders[r];if(i!=null){const s=i(t,e);if(s!=null){const o=r;return new Xr(o,s)}}}return t instanceof Xr?t:null}decode(t,e,r){const i=e<0?this.builtInDecoders[-1-e]:this.decoders[e];return i?i(t,e,r):new Xr(e,t)}}Di.defaultCodec=new Di;function Ow(n){return n instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&n instanceof SharedArrayBuffer}function no(n){return n instanceof Uint8Array?n:ArrayBuffer.isView(n)?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):Ow(n)?new Uint8Array(n):Uint8Array.from(n)}const Rw=100,Lw=2048;class oa{constructor(t){this.entered=!1,this.extensionCodec=t?.extensionCodec??Di.defaultCodec,this.context=t?.context,this.useBigInt64=t?.useBigInt64??!1,this.maxDepth=t?.maxDepth??Rw,this.initialBufferSize=t?.initialBufferSize??Lw,this.sortKeys=t?.sortKeys??!1,this.forceFloat32=t?.forceFloat32??!1,this.ignoreUndefined=t?.ignoreUndefined??!1,this.forceIntegerToFloat=t?.forceIntegerToFloat??!1,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}clone(){return new oa({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,maxDepth:this.maxDepth,initialBufferSize:this.initialBufferSize,sortKeys:this.sortKeys,forceFloat32:this.forceFloat32,ignoreUndefined:this.ignoreUndefined,forceIntegerToFloat:this.forceIntegerToFloat})}reinitializeState(){this.pos=0}encodeSharedRef(t){if(this.entered)return this.clone().encodeSharedRef(t);try{return this.entered=!0,this.reinitializeState(),this.doEncode(t,1),this.bytes.subarray(0,this.pos)}finally{this.entered=!1}}encode(t){if(this.entered)return this.clone().encode(t);try{return this.entered=!0,this.reinitializeState(),this.doEncode(t,1),this.bytes.slice(0,this.pos)}finally{this.entered=!1}}doEncode(t,e){if(e>this.maxDepth)throw new Error(`Too deep objects in depth ${e}`);t==null?this.encodeNil():typeof t=="boolean"?this.encodeBoolean(t):typeof t=="number"?this.forceIntegerToFloat?this.encodeNumberAsFloat(t):this.encodeNumber(t):typeof t=="string"?this.encodeString(t):this.useBigInt64&&typeof t=="bigint"?this.encodeBigInt64(t):this.encodeObject(t,e)}ensureBufferSizeToWrite(t){const e=this.pos+t;this.view.byteLength<e&&this.resizeBuffer(e*2)}resizeBuffer(t){const e=new ArrayBuffer(t),r=new Uint8Array(e),i=new DataView(e);r.set(this.bytes),this.view=i,this.bytes=r}encodeNil(){this.writeU8(192)}encodeBoolean(t){t===!1?this.writeU8(194):this.writeU8(195)}encodeNumber(t){!this.forceIntegerToFloat&&Number.isSafeInteger(t)?t>=0?t<128?this.writeU8(t):t<256?(this.writeU8(204),this.writeU8(t)):t<65536?(this.writeU8(205),this.writeU16(t)):t<4294967296?(this.writeU8(206),this.writeU32(t)):this.useBigInt64?this.encodeNumberAsFloat(t):(this.writeU8(207),this.writeU64(t)):t>=-32?this.writeU8(224|t+32):t>=-128?(this.writeU8(208),this.writeI8(t)):t>=-32768?(this.writeU8(209),this.writeI16(t)):t>=-2147483648?(this.writeU8(210),this.writeI32(t)):this.useBigInt64?this.encodeNumberAsFloat(t):(this.writeU8(211),this.writeI64(t)):this.encodeNumberAsFloat(t)}encodeNumberAsFloat(t){this.forceFloat32?(this.writeU8(202),this.writeF32(t)):(this.writeU8(203),this.writeF64(t))}encodeBigInt64(t){t>=BigInt(0)?(this.writeU8(207),this.writeBigUint64(t)):(this.writeU8(211),this.writeBigInt64(t))}writeStringHeader(t){if(t<32)this.writeU8(160+t);else if(t<256)this.writeU8(217),this.writeU8(t);else if(t<65536)this.writeU8(218),this.writeU16(t);else if(t<4294967296)this.writeU8(219),this.writeU32(t);else throw new Error(`Too long string: ${t} bytes in UTF-8`)}encodeString(t){const r=sw(t);this.ensureBufferSizeToWrite(5+r),this.writeStringHeader(r),uw(t,this.bytes,this.pos),this.pos+=r}encodeObject(t,e){const r=this.extensionCodec.tryToEncode(t,this.context);if(r!=null)this.encodeExtension(r);else if(Array.isArray(t))this.encodeArray(t,e);else if(ArrayBuffer.isView(t))this.encodeBinary(t);else if(typeof t=="object")this.encodeMap(t,e);else throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(t)}`)}encodeBinary(t){const e=t.byteLength;if(e<256)this.writeU8(196),this.writeU8(e);else if(e<65536)this.writeU8(197),this.writeU16(e);else if(e<4294967296)this.writeU8(198),this.writeU32(e);else throw new Error(`Too large binary: ${e}`);const r=no(t);this.writeU8a(r)}encodeArray(t,e){const r=t.length;if(r<16)this.writeU8(144+r);else if(r<65536)this.writeU8(220),this.writeU16(r);else if(r<4294967296)this.writeU8(221),this.writeU32(r);else throw new Error(`Too large array: ${r}`);for(const i of t)this.doEncode(i,e+1)}countWithoutUndefined(t,e){let r=0;for(const i of e)t[i]!==void 0&&r++;return r}encodeMap(t,e){const r=Object.keys(t);this.sortKeys&&r.sort();const i=this.ignoreUndefined?this.countWithoutUndefined(t,r):r.length;if(i<16)this.writeU8(128+i);else if(i<65536)this.writeU8(222),this.writeU16(i);else if(i<4294967296)this.writeU8(223),this.writeU32(i);else throw new Error(`Too large map object: ${i}`);for(const s of r){const o=t[s];this.ignoreUndefined&&o===void 0||(this.encodeString(s),this.doEncode(o,e+1))}}encodeExtension(t){if(typeof t.data=="function"){const r=t.data(this.pos+6),i=r.length;if(i>=4294967296)throw new Error(`Too large extension object: ${i}`);this.writeU8(201),this.writeU32(i),this.writeI8(t.type),this.writeU8a(r);return}const e=t.data.length;if(e===1)this.writeU8(212);else if(e===2)this.writeU8(213);else if(e===4)this.writeU8(214);else if(e===8)this.writeU8(215);else if(e===16)this.writeU8(216);else if(e<256)this.writeU8(199),this.writeU8(e);else if(e<65536)this.writeU8(200),this.writeU16(e);else if(e<4294967296)this.writeU8(201),this.writeU32(e);else throw new Error(`Too large extension object: ${e}`);this.writeI8(t.type),this.writeU8a(t.data)}writeU8(t){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,t),this.pos++}writeU8a(t){const e=t.length;this.ensureBufferSizeToWrite(e),this.bytes.set(t,this.pos),this.pos+=e}writeI8(t){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,t),this.pos++}writeU16(t){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,t),this.pos+=2}writeI16(t){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,t),this.pos+=2}writeU32(t){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,t),this.pos+=4}writeI32(t){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,t),this.pos+=4}writeF32(t){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,t),this.pos+=4}writeF64(t){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,t),this.pos+=8}writeU64(t){this.ensureBufferSizeToWrite(8),mw(this.view,this.pos,t),this.pos+=8}writeI64(t){this.ensureBufferSizeToWrite(8),dh(this.view,this.pos,t),this.pos+=8}writeBigUint64(t){this.ensureBufferSizeToWrite(8),this.view.setBigUint64(this.pos,t),this.pos+=8}writeBigInt64(t){this.ensureBufferSizeToWrite(8),this.view.setBigInt64(this.pos,t),this.pos+=8}}function Dw(n,t){return new oa(t).encodeSharedRef(n)}function gs(n){return`${n<0?"-":""}0x${Math.abs(n).toString(16).padStart(2,"0")}`}const xw=16,Vw=16;class Sw{constructor(t=xw,e=Vw){this.hit=0,this.miss=0,this.maxKeyLength=t,this.maxLengthPerKey=e,this.caches=[];for(let r=0;r<this.maxKeyLength;r++)this.caches.push([])}canBeCached(t){return t>0&&t<=this.maxKeyLength}find(t,e,r){const i=this.caches[r-1];e:for(const s of i){const o=s.bytes;for(let c=0;c<r;c++)if(o[c]!==t[e+c])continue e;return s.str}return null}store(t,e){const r=this.caches[t.length-1],i={bytes:t,str:e};r.length>=this.maxLengthPerKey?r[Math.random()*r.length|0]=i:r.push(i)}decode(t,e,r){const i=this.find(t,e,r);if(i!=null)return this.hit++,i;this.miss++;const s=hh(t,e,r),o=Uint8Array.prototype.slice.call(t,e,e+r);return this.store(o,s),s}}const ro="array",Ir="map_key",ph="map_value",Cw=n=>{if(typeof n=="string"||typeof n=="number")return n;throw new it("The type of key must be string or number but "+typeof n)};class $w{constructor(){this.stack=[],this.stackHeadPosition=-1}get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(t){const e=this.getUninitializedStateFromPool();e.type=ro,e.position=0,e.size=t,e.array=new Array(t)}pushMapState(t){const e=this.getUninitializedStateFromPool();e.type=Ir,e.readCount=0,e.size=t,e.map={}}getUninitializedStateFromPool(){if(this.stackHeadPosition++,this.stackHeadPosition===this.stack.length){const t={type:void 0,size:0,array:void 0,position:0,readCount:0,map:void 0,key:null};this.stack.push(t)}return this.stack[this.stackHeadPosition]}release(t){if(this.stack[this.stackHeadPosition]!==t)throw new Error("Invalid stack state. Released state is not on top of the stack.");if(t.type===ro){const r=t;r.size=0,r.array=void 0,r.position=0,r.type=void 0}if(t.type===Ir||t.type===ph){const r=t;r.size=0,r.map=void 0,r.readCount=0,r.type=void 0}this.stackHeadPosition--}reset(){this.stack.length=0,this.stackHeadPosition=-1}}const ar=-1,aa=new DataView(new ArrayBuffer(0)),kw=new Uint8Array(aa.buffer);try{aa.getInt8(0)}catch(n){if(!(n instanceof RangeError))throw new Error("This module is not supported in the current JavaScript engine because DataView does not throw RangeError on out-of-bounds access")}const mc=new RangeError("Insufficient data"),Uw=new Sw;class ca{constructor(t){this.totalPos=0,this.pos=0,this.view=aa,this.bytes=kw,this.headByte=ar,this.stack=new $w,this.entered=!1,this.extensionCodec=t?.extensionCodec??Di.defaultCodec,this.context=t?.context,this.useBigInt64=t?.useBigInt64??!1,this.rawStrings=t?.rawStrings??!1,this.maxStrLength=t?.maxStrLength??or,this.maxBinLength=t?.maxBinLength??or,this.maxArrayLength=t?.maxArrayLength??or,this.maxMapLength=t?.maxMapLength??or,this.maxExtLength=t?.maxExtLength??or,this.keyDecoder=t?.keyDecoder!==void 0?t.keyDecoder:Uw,this.mapKeyConverter=t?.mapKeyConverter??Cw}clone(){return new ca({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,rawStrings:this.rawStrings,maxStrLength:this.maxStrLength,maxBinLength:this.maxBinLength,maxArrayLength:this.maxArrayLength,maxMapLength:this.maxMapLength,maxExtLength:this.maxExtLength,keyDecoder:this.keyDecoder})}reinitializeState(){this.totalPos=0,this.headByte=ar,this.stack.reset()}setBuffer(t){const e=no(t);this.bytes=e,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.pos=0}appendBuffer(t){if(this.headByte===ar&&!this.hasRemaining(1))this.setBuffer(t);else{const e=this.bytes.subarray(this.pos),r=no(t),i=new Uint8Array(e.length+r.length);i.set(e),i.set(r,e.length),this.setBuffer(i)}}hasRemaining(t){return this.view.byteLength-this.pos>=t}createExtraByteError(t){const{view:e,pos:r}=this;return new RangeError(`Extra ${e.byteLength-r} of ${e.byteLength} byte(s) found at buffer[${t}]`)}decode(t){if(this.entered)return this.clone().decode(t);try{this.entered=!0,this.reinitializeState(),this.setBuffer(t);const e=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return e}finally{this.entered=!1}}*decodeMulti(t){if(this.entered){yield*this.clone().decodeMulti(t);return}try{for(this.entered=!0,this.reinitializeState(),this.setBuffer(t);this.hasRemaining(1);)yield this.doDecodeSync()}finally{this.entered=!1}}async decodeAsync(t){if(this.entered)return this.clone().decodeAsync(t);try{this.entered=!0;let e=!1,r;for await(const c of t){if(e)throw this.entered=!1,this.createExtraByteError(this.totalPos);this.appendBuffer(c);try{r=this.doDecodeSync(),e=!0}catch(l){if(!(l instanceof RangeError))throw l}this.totalPos+=this.pos}if(e){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return r}const{headByte:i,pos:s,totalPos:o}=this;throw new RangeError(`Insufficient data in parsing ${gs(i)} at ${o} (${s} in the current buffer)`)}finally{this.entered=!1}}decodeArrayStream(t){return this.decodeMultiAsync(t,!0)}decodeStream(t){return this.decodeMultiAsync(t,!1)}async*decodeMultiAsync(t,e){if(this.entered){yield*this.clone().decodeMultiAsync(t,e);return}try{this.entered=!0;let r=e,i=-1;for await(const s of t){if(e&&i===0)throw this.createExtraByteError(this.totalPos);this.appendBuffer(s),r&&(i=this.readArraySize(),r=!1,this.complete());try{for(;yield this.doDecodeSync(),--i!==0;);}catch(o){if(!(o instanceof RangeError))throw o}this.totalPos+=this.pos}}finally{this.entered=!1}}doDecodeSync(){e:for(;;){const t=this.readHeadByte();let e;if(t>=224)e=t-256;else if(t<192)if(t<128)e=t;else if(t<144){const i=t-128;if(i!==0){this.pushMapState(i),this.complete();continue e}else e={}}else if(t<160){const i=t-144;if(i!==0){this.pushArrayState(i),this.complete();continue e}else e=[]}else{const i=t-160;e=this.decodeString(i,0)}else if(t===192)e=null;else if(t===194)e=!1;else if(t===195)e=!0;else if(t===202)e=this.readF32();else if(t===203)e=this.readF64();else if(t===204)e=this.readU8();else if(t===205)e=this.readU16();else if(t===206)e=this.readU32();else if(t===207)this.useBigInt64?e=this.readU64AsBigInt():e=this.readU64();else if(t===208)e=this.readI8();else if(t===209)e=this.readI16();else if(t===210)e=this.readI32();else if(t===211)this.useBigInt64?e=this.readI64AsBigInt():e=this.readI64();else if(t===217){const i=this.lookU8();e=this.decodeString(i,1)}else if(t===218){const i=this.lookU16();e=this.decodeString(i,2)}else if(t===219){const i=this.lookU32();e=this.decodeString(i,4)}else if(t===220){const i=this.readU16();if(i!==0){this.pushArrayState(i),this.complete();continue e}else e=[]}else if(t===221){const i=this.readU32();if(i!==0){this.pushArrayState(i),this.complete();continue e}else e=[]}else if(t===222){const i=this.readU16();if(i!==0){this.pushMapState(i),this.complete();continue e}else e={}}else if(t===223){const i=this.readU32();if(i!==0){this.pushMapState(i),this.complete();continue e}else e={}}else if(t===196){const i=this.lookU8();e=this.decodeBinary(i,1)}else if(t===197){const i=this.lookU16();e=this.decodeBinary(i,2)}else if(t===198){const i=this.lookU32();e=this.decodeBinary(i,4)}else if(t===212)e=this.decodeExtension(1,0);else if(t===213)e=this.decodeExtension(2,0);else if(t===214)e=this.decodeExtension(4,0);else if(t===215)e=this.decodeExtension(8,0);else if(t===216)e=this.decodeExtension(16,0);else if(t===199){const i=this.lookU8();e=this.decodeExtension(i,1)}else if(t===200){const i=this.lookU16();e=this.decodeExtension(i,2)}else if(t===201){const i=this.lookU32();e=this.decodeExtension(i,4)}else throw new it(`Unrecognized type byte: ${gs(t)}`);this.complete();const r=this.stack;for(;r.length>0;){const i=r.top();if(i.type===ro)if(i.array[i.position]=e,i.position++,i.position===i.size)e=i.array,r.release(i);else continue e;else if(i.type===Ir){if(e==="__proto__")throw new it("The key __proto__ is not allowed");i.key=this.mapKeyConverter(e),i.type=ph;continue e}else if(i.map[i.key]=e,i.readCount++,i.readCount===i.size)e=i.map,r.release(i);else{i.key=null,i.type=Ir;continue e}}return e}}readHeadByte(){return this.headByte===ar&&(this.headByte=this.readU8()),this.headByte}complete(){this.headByte=ar}readArraySize(){const t=this.readHeadByte();switch(t){case 220:return this.readU16();case 221:return this.readU32();default:{if(t<160)return t-144;throw new it(`Unrecognized array type byte: ${gs(t)}`)}}}pushMapState(t){if(t>this.maxMapLength)throw new it(`Max length exceeded: map length (${t}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(t)}pushArrayState(t){if(t>this.maxArrayLength)throw new it(`Max length exceeded: array length (${t}) > maxArrayLength (${this.maxArrayLength})`);this.stack.pushArrayState(t)}decodeString(t,e){return!this.rawStrings||this.stateIsMapKey()?this.decodeUtf8String(t,e):this.decodeBinary(t,e)}decodeUtf8String(t,e){if(t>this.maxStrLength)throw new it(`Max length exceeded: UTF-8 byte length (${t}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength<this.pos+e+t)throw mc;const r=this.pos+e;let i;return this.stateIsMapKey()&&this.keyDecoder?.canBeCached(t)?i=this.keyDecoder.decode(this.bytes,r,t):i=_w(this.bytes,r,t),this.pos+=e+t,i}stateIsMapKey(){return this.stack.length>0?this.stack.top().type===Ir:!1}decodeBinary(t,e){if(t>this.maxBinLength)throw new it(`Max length exceeded: bin length (${t}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(t+e))throw mc;const r=this.pos+e,i=this.bytes.subarray(r,r+t);return this.pos+=e+t,i}decodeExtension(t,e){if(t>this.maxExtLength)throw new it(`Max length exceeded: ext length (${t}) > maxExtLength (${this.maxExtLength})`);const r=this.view.getInt8(this.pos+e),i=this.decodeBinary(t,e+1);return this.extensionCodec.decode(i,r,this.context)}lookU8(){return this.view.getUint8(this.pos)}lookU16(){return this.view.getUint16(this.pos)}lookU32(){return this.view.getUint32(this.pos)}readU8(){const t=this.view.getUint8(this.pos);return this.pos++,t}readI8(){const t=this.view.getInt8(this.pos);return this.pos++,t}readU16(){const t=this.view.getUint16(this.pos);return this.pos+=2,t}readI16(){const t=this.view.getInt16(this.pos);return this.pos+=2,t}readU32(){const t=this.view.getUint32(this.pos);return this.pos+=4,t}readI32(){const t=this.view.getInt32(this.pos);return this.pos+=4,t}readU64(){const t=ww(this.view,this.pos);return this.pos+=8,t}readI64(){const t=fh(this.view,this.pos);return this.pos+=8,t}readU64AsBigInt(){const t=this.view.getBigUint64(this.pos);return this.pos+=8,t}readI64AsBigInt(){const t=this.view.getBigInt64(this.pos);return this.pos+=8,t}readF32(){const t=this.view.getFloat32(this.pos);return this.pos+=4,t}readF64(){const t=this.view.getFloat64(this.pos);return this.pos+=8,t}}function Nw(n,t){return new ca(t).decode(n)}/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Bw(n){return n instanceof Uint8Array||ArrayBuffer.isView(n)&&n.constructor.name==="Uint8Array"}function _h(n,t){return Array.isArray(t)?t.length===0?!0:n?t.every(e=>typeof e=="string"):t.every(e=>Number.isSafeInteger(e)):!1}function xi(n,t){if(typeof t!="string")throw new Error(`${n}: string expected`);return!0}function la(n){if(!Number.isSafeInteger(n))throw new Error(`invalid integer: ${n}`)}function io(n){if(!Array.isArray(n))throw new Error("array expected")}function Vi(n,t){if(!_h(!0,t))throw new Error(`${n}: array of strings expected`)}function Mw(n,t){if(!_h(!1,t))throw new Error(`${n}: array of numbers expected`)}function qw(...n){const t=s=>s,e=(s,o)=>c=>s(o(c)),r=n.map(s=>s.encode).reduceRight(e,t),i=n.map(s=>s.decode).reduce(e,t);return{encode:r,decode:i}}function jw(n){const t=typeof n=="string"?n.split(""):n,e=t.length;Vi("alphabet",t);const r=new Map(t.map((i,s)=>[i,s]));return{encode:i=>(io(i),i.map(s=>{if(!Number.isSafeInteger(s)||s<0||s>=e)throw new Error(`alphabet.encode: digit index outside alphabet "${s}". Allowed: ${n}`);return t[s]})),decode:i=>(io(i),i.map(s=>{xi("alphabet.decode",s);const o=r.get(s);if(o===void 0)throw new Error(`Unknown letter: "${s}". Allowed: ${n}`);return o}))}}function zw(n=""){return xi("join",n),{encode:t=>(Vi("join.decode",t),t.join(n)),decode:t=>(xi("join.decode",t),t.split(n))}}function Kw(n,t="="){return la(n),xi("padding",t),{encode(e){for(Vi("padding.encode",e);e.length*n%8;)e.push(t);return e},decode(e){Vi("padding.decode",e);let r=e.length;if(r*n%8)throw new Error("padding: invalid, string should have whole number of bytes");for(;r>0&&e[r-1]===t;r--)if((r-1)*n%8===0)throw new Error("padding: invalid, string has too much padding");return e.slice(0,r)}}}const mh=(n,t)=>t===0?n:mh(t,n%t),Si=(n,t)=>n+(t-mh(n,t)),Es=(()=>{let n=[];for(let t=0;t<40;t++)n.push(2**t);return n})();function wc(n,t,e,r){if(io(n),t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(e<=0||e>32)throw new Error(`convertRadix2: wrong to=${e}`);if(Si(t,e)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${e} carryBits=${Si(t,e)}`);let i=0,s=0;const o=Es[t],c=Es[e]-1,l=[];for(const u of n){if(la(u),u>=o)throw new Error(`convertRadix2: invalid data word=${u} from=${t}`);if(i=i<<t|u,s+t>32)throw new Error(`convertRadix2: carry overflow pos=${s} from=${t}`);for(s+=t;s>=e;s-=e)l.push((i>>s-e&c)>>>0);const h=Es[s];if(h===void 0)throw new Error("invalid carry");i&=h-1}if(i=i<<e-s&c,!r&&s>=t)throw new Error("Excess padding");if(!r&&i>0)throw new Error(`Non-zero padding: ${i}`);return r&&s>0&&l.push(i>>>0),l}function Fw(n,t=!1){if(la(n),n<=0||n>32)throw new Error("radix2: bits should be in (0..32]");if(Si(8,n)>32||Si(n,8)>32)throw new Error("radix2: carry overflow");return{encode:e=>{if(!Bw(e))throw new Error("radix2.encode input should be Uint8Array");return wc(Array.from(e),8,n,!t)},decode:e=>(Mw("radix2.decode",e),Uint8Array.from(wc(e,n,8,t)))}}const Ww=qw(Fw(5),jw("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),Kw(5),zw(""));function ua(n){return globalThis.Buffer!=null?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):n}function wh(n=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?ua(globalThis.Buffer.allocUnsafe(n)):new Uint8Array(n)}function Ar(n,t){t||(t=n.reduce((i,s)=>i+s.length,0));const e=wh(t);let r=0;for(const i of n)e.set(i,r),r+=i.length;return ua(e)}function yh(n,t,e,r){return{name:n,prefix:t,encoder:{name:n,prefix:t,encode:e},decoder:{decode:r}}}const yc=yh("utf8","u",n=>"u"+new TextDecoder("utf8").decode(n),n=>new TextEncoder().encode(n.substring(1))),vs=yh("ascii","a",n=>{let t="a";for(let e=0;e<n.length;e++)t+=String.fromCharCode(n[e]);return t},n=>{n=n.substring(1);const t=wh(n.length);for(let e=0;e<n.length;e++)t[e]=n.charCodeAt(e);return t}),gh={utf8:yc,"utf-8":yc,hex:Ua.base16,latin1:vs,ascii:vs,binary:vs,...Ua};function ft(n,t="utf8"){const e=gh[t];if(!e)throw new Error(`Unsupported encoding "${t}"`);return(t==="utf8"||t==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?ua(globalThis.Buffer.from(n,"utf-8")):e.decoder.decode(`${e.prefix}${n}`)}function tt(n,t="utf8"){const e=gh[t];if(!e)throw new Error(`Unsupported encoding "${t}"`);return(t==="utf8"||t==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(n.buffer,n.byteOffset,n.byteLength).toString("utf8"):e.encoder.encode(n).substring(1)}const Hw="Input must be an string, Buffer or Uint8Array";function Gw(n){let t;if(n instanceof Uint8Array)t=n;else if(typeof n=="string")t=new TextEncoder().encode(n);else throw new Error(Hw);return t}function Zw(n){return Array.prototype.map.call(n,function(t){return(t<16?"0":"")+t.toString(16)}).join("")}function ei(n){return(4294967296+n).toString(16).substring(1)}function Yw(n,t,e){let r=`
4
+ `+n+" = ";for(let i=0;i<t.length;i+=2){if(e===32)r+=ei(t[i]).toUpperCase(),r+=" ",r+=ei(t[i+1]).toUpperCase();else if(e===64)r+=ei(t[i+1]).toUpperCase(),r+=ei(t[i]).toUpperCase();else throw new Error("Invalid size "+e);i%6===4?r+=`
5
+ `+new Array(n.length+4).join(" "):i<t.length-2&&(r+=" ")}console.log(r)}function Jw(n,t,e){let r=new Date().getTime();const i=new Uint8Array(t);for(let o=0;o<t;o++)i[o]=o%256;const s=new Date().getTime();console.log("Generated random input in "+(s-r)+"ms"),r=s;for(let o=0;o<e;o++){const c=n(i),l=new Date().getTime(),u=l-r;r=l,console.log("Hashed in "+u+"ms: "+c.substring(0,20)+"..."),console.log(Math.round(t/(1<<20)/(u/1e3)*100)/100+" MB PER SECOND")}}var Eh={normalizeInput:Gw,toHex:Zw,debugPrint:Yw,testSpeed:Jw};const pi=Eh;function ti(n,t,e){const r=n[t]+n[e];let i=n[t+1]+n[e+1];r>=4294967296&&i++,n[t]=r,n[t+1]=i}function gc(n,t,e,r){let i=n[t]+e;e<0&&(i+=4294967296);let s=n[t+1]+r;i>=4294967296&&s++,n[t]=i,n[t+1]=s}function vh(n,t){return n[t]^n[t+1]<<8^n[t+2]<<16^n[t+3]<<24}function Zt(n,t,e,r,i,s){const o=gr[i],c=gr[i+1],l=gr[s],u=gr[s+1];ti(H,n,t),gc(H,n,o,c);let h=H[r]^H[n],d=H[r+1]^H[n+1];H[r]=d,H[r+1]=h,ti(H,e,r),h=H[t]^H[e],d=H[t+1]^H[e+1],H[t]=h>>>24^d<<8,H[t+1]=d>>>24^h<<8,ti(H,n,t),gc(H,n,l,u),h=H[r]^H[n],d=H[r+1]^H[n+1],H[r]=h>>>16^d<<16,H[r+1]=d>>>16^h<<16,ti(H,e,r),h=H[t]^H[e],d=H[t+1]^H[e+1],H[t]=d>>>31^h<<1,H[t+1]=h>>>31^d<<1}const bh=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),Qw=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],Se=new Uint8Array(Qw.map(function(n){return n*2})),H=new Uint32Array(32),gr=new Uint32Array(32);function Ih(n,t){let e=0;for(e=0;e<16;e++)H[e]=n.h[e],H[e+16]=bh[e];for(H[24]=H[24]^n.t,H[25]=H[25]^n.t/4294967296,t&&(H[28]=~H[28],H[29]=~H[29]),e=0;e<32;e++)gr[e]=vh(n.b,4*e);for(e=0;e<12;e++)Zt(0,8,16,24,Se[e*16+0],Se[e*16+1]),Zt(2,10,18,26,Se[e*16+2],Se[e*16+3]),Zt(4,12,20,28,Se[e*16+4],Se[e*16+5]),Zt(6,14,22,30,Se[e*16+6],Se[e*16+7]),Zt(0,10,20,30,Se[e*16+8],Se[e*16+9]),Zt(2,12,22,24,Se[e*16+10],Se[e*16+11]),Zt(4,14,16,26,Se[e*16+12],Se[e*16+13]),Zt(6,8,18,28,Se[e*16+14],Se[e*16+15]);for(e=0;e<16;e++)n.h[e]=n.h[e]^H[e]^H[e+16]}const Yt=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function Ah(n,t,e,r){if(n===0||n>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(t&&t.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(e&&e.length!==16)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(r&&r.length!==16)throw new Error("Illegal personal, expected Uint8Array with length is 16");const i={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:n};Yt.fill(0),Yt[0]=n,t&&(Yt[1]=t.length),Yt[2]=1,Yt[3]=1,e&&Yt.set(e,32),r&&Yt.set(r,48);for(let s=0;s<16;s++)i.h[s]=bh[s]^vh(Yt,s*4);return t&&(ha(i,t),i.c=128),i}function ha(n,t){for(let e=0;e<t.length;e++)n.c===128&&(n.t+=n.c,Ih(n,!1),n.c=0),n.b[n.c++]=t[e]}function Th(n){for(n.t+=n.c;n.c<128;)n.b[n.c++]=0;Ih(n,!0);const t=new Uint8Array(n.outlen);for(let e=0;e<n.outlen;e++)t[e]=n.h[e>>2]>>8*(e&3);return t}function Ph(n,t,e,r,i){e=e||64,n=pi.normalizeInput(n),r&&(r=pi.normalizeInput(r)),i&&(i=pi.normalizeInput(i));const s=Ah(e,t,r,i);return ha(s,n),Th(s)}function Xw(n,t,e,r,i){const s=Ph(n,t,e,r,i);return pi.toHex(s)}var ey={blake2b:Ph,blake2bHex:Xw,blake2bInit:Ah,blake2bUpdate:ha,blake2bFinal:Th};const Oh=Eh;function ty(n,t){return n[t]^n[t+1]<<8^n[t+2]<<16^n[t+3]<<24}function Jt(n,t,e,r,i,s){ee[n]=ee[n]+ee[t]+i,ee[r]=ni(ee[r]^ee[n],16),ee[e]=ee[e]+ee[r],ee[t]=ni(ee[t]^ee[e],12),ee[n]=ee[n]+ee[t]+s,ee[r]=ni(ee[r]^ee[n],8),ee[e]=ee[e]+ee[r],ee[t]=ni(ee[t]^ee[e],7)}function ni(n,t){return n>>>t^n<<32-t}const Rh=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Ce=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),ee=new Uint32Array(16),Pe=new Uint32Array(16);function Lh(n,t){let e=0;for(e=0;e<8;e++)ee[e]=n.h[e],ee[e+8]=Rh[e];for(ee[12]^=n.t,ee[13]^=n.t/4294967296,t&&(ee[14]=~ee[14]),e=0;e<16;e++)Pe[e]=ty(n.b,4*e);for(e=0;e<10;e++)Jt(0,4,8,12,Pe[Ce[e*16+0]],Pe[Ce[e*16+1]]),Jt(1,5,9,13,Pe[Ce[e*16+2]],Pe[Ce[e*16+3]]),Jt(2,6,10,14,Pe[Ce[e*16+4]],Pe[Ce[e*16+5]]),Jt(3,7,11,15,Pe[Ce[e*16+6]],Pe[Ce[e*16+7]]),Jt(0,5,10,15,Pe[Ce[e*16+8]],Pe[Ce[e*16+9]]),Jt(1,6,11,12,Pe[Ce[e*16+10]],Pe[Ce[e*16+11]]),Jt(2,7,8,13,Pe[Ce[e*16+12]],Pe[Ce[e*16+13]]),Jt(3,4,9,14,Pe[Ce[e*16+14]],Pe[Ce[e*16+15]]);for(e=0;e<8;e++)n.h[e]^=ee[e]^ee[e+8]}function Dh(n,t){if(!(n>0&&n<=32))throw new Error("Incorrect output length, should be in [1, 32]");const e=t?t.length:0;if(t&&!(e>0&&e<=32))throw new Error("Incorrect key length, should be in [1, 32]");const r={h:new Uint32Array(Rh),b:new Uint8Array(64),c:0,t:0,outlen:n};return r.h[0]^=16842752^e<<8^n,e>0&&(da(r,t),r.c=64),r}function da(n,t){for(let e=0;e<t.length;e++)n.c===64&&(n.t+=n.c,Lh(n,!1),n.c=0),n.b[n.c++]=t[e]}function xh(n){for(n.t+=n.c;n.c<64;)n.b[n.c++]=0;Lh(n,!0);const t=new Uint8Array(n.outlen);for(let e=0;e<n.outlen;e++)t[e]=n.h[e>>2]>>8*(e&3)&255;return t}function Vh(n,t,e){e=e||32,n=Oh.normalizeInput(n);const r=Dh(e,t);return da(r,n),xh(r)}function ny(n,t,e){const r=Vh(n,t,e);return Oh.toHex(r)}var ry={blake2s:Vh,blake2sHex:ny,blake2sInit:Dh,blake2sUpdate:da,blake2sFinal:xh};const cr=ey,lr=ry;var iy={blake2b:cr.blake2b,blake2bHex:cr.blake2bHex,blake2bInit:cr.blake2bInit,blake2bUpdate:cr.blake2bUpdate,blake2bFinal:cr.blake2bFinal,blake2s:lr.blake2s,blake2sHex:lr.blake2sHex,blake2sInit:lr.blake2sInit,blake2sUpdate:lr.blake2sUpdate,blake2sFinal:lr.blake2sFinal},sy={};const{recoverAddress:oy}=await Mo("viem"),ay=":";function _i(n){const[t,e]=n.split(ay);return{namespace:t,reference:e}}function Sh(n,t){return n.includes(":")?[n]:t.chains||[]}var cy=Object.defineProperty,ly=Object.defineProperties,uy=Object.getOwnPropertyDescriptors,Ec=Object.getOwnPropertySymbols,hy=Object.prototype.hasOwnProperty,dy=Object.prototype.propertyIsEnumerable,so=(n,t,e)=>t in n?cy(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,vc=(n,t)=>{for(var e in t||(t={}))hy.call(t,e)&&so(n,e,t[e]);if(Ec)for(var e of Ec(t))dy.call(t,e)&&so(n,e,t[e]);return n},fy=(n,t)=>ly(n,uy(t)),bc=(n,t,e)=>so(n,typeof t!="symbol"?t+"":t,e);const py="ReactNative",st={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},_y="js";function Ci(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function pn(){return!Gn()&&!!cu()&&navigator.product===py}function my(){return pn()&&typeof global<"u"&&typeof(global==null?void 0:global.Platform)<"u"&&(global==null?void 0:global.Platform.OS)==="android"}function wy(){return pn()&&typeof global<"u"&&typeof(global==null?void 0:global.Platform)<"u"&&(global==null?void 0:global.Platform.OS)==="ios"}function nr(){return!Ci()&&!!cu()&&!!Gn()}function zr(){return pn()?st.reactNative:Ci()?st.node:nr()?st.browser:st.unknown}function Ic(){var n;try{return pn()&&typeof global<"u"&&typeof(global==null?void 0:global.Application)<"u"?(n=global.Application)==null?void 0:n.applicationId:void 0}catch{return}}function yy(n,t){const e=new URLSearchParams(n);for(const r of Object.keys(t).sort())if(t.hasOwnProperty(r)){const i=t[r];i!==void 0&&e.set(r,i)}return e.toString()}function gy(n){var t,e;const r=Ch();try{return n!=null&&n.url&&r.url&&new URL(n.url).host!==new URL(r.url).host&&(console.warn(`The configured WalletConnect 'metadata.url':${n.url} differs from the actual page url:${r.url}. This is probably unintended and can lead to issues.`),n.url=r.url),(t=n?.icons)!=null&&t.length&&n.icons.length>0&&(n.icons=n.icons.filter(i=>i!=="")),fy(vc(vc({},r),n),{url:n?.url||r.url,name:n?.name||r.name,description:n?.description||r.description,icons:(e=n?.icons)!=null&&e.length&&n.icons.length>0?n.icons:r.icons})}catch(i){return console.warn("Error populating app metadata",i),n||r}}function Ch(){return Jf()||{name:"",description:"",url:"",icons:[""]}}function Ey(){if(zr()===st.reactNative&&typeof global<"u"&&typeof(global==null?void 0:global.Platform)<"u"){const{OS:e,Version:r}=global.Platform;return[e,r].join("-")}const n=Xf();if(n===null)return"unknown";const t=n.os?n.os.replace(" ","").toLowerCase():"unknown";return n.type==="browser"?[t,n.name,n.version].join("-"):[t,n.version].join("-")}function vy(){var n;const t=zr();return t===st.browser?[t,((n=ep())==null?void 0:n.host)||"unknown"].join(":"):t}function $h(n,t,e){const r=Ey(),i=vy();return[[n,t].join("-"),[_y,e].join("-"),r,i].join("/")}function by({protocol:n,version:t,relayUrl:e,sdkVersion:r,auth:i,projectId:s,useOnCloseEvent:o,bundleId:c,packageName:l}){const u=e.split("?"),h=$h(n,t,r),d={auth:i,ua:h,projectId:s,useOnCloseEvent:o||void 0,packageName:l||void 0,bundleId:c||void 0},f=yy(u[1]||"",d);return u[0]+"?"+f}function In(n,t){return n.filter(e=>t.includes(e)).length===n.length}function oo(n){return Object.fromEntries(n.entries())}function ao(n){return new Map(Object.entries(n))}function gn(n=q.FIVE_MINUTES,t){const e=q.toMiliseconds(n||q.FIVE_MINUTES);let r,i,s,o;return{resolve:c=>{s&&r&&(clearTimeout(s),r(c),o=Promise.resolve(c))},reject:c=>{s&&i&&(clearTimeout(s),i(c))},done:()=>new Promise((c,l)=>{if(o)return c(o);s=setTimeout(()=>{const u=new Error(t);o=Promise.reject(u),l(u)},e),r=c,i=l})}}function Vt(n,t,e){return new Promise(async(r,i)=>{const s=setTimeout(()=>i(new Error(e)),t);try{const o=await n;r(o)}catch(o){i(o)}clearTimeout(s)})}function kh(n,t){if(typeof t=="string"&&t.startsWith(`${n}:`))return t;if(n.toLowerCase()==="topic"){if(typeof t!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${t}`}else if(n.toLowerCase()==="id"){if(typeof t!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${t}`}throw new Error(`Unknown expirer target type: ${n}`)}function Iy(n){return kh("topic",n)}function Ay(n){return kh("id",n)}function Uh(n){const[t,e]=n.split(":"),r={id:void 0,topic:void 0};if(t==="topic"&&typeof e=="string")r.topic=e;else if(t==="id"&&Number.isInteger(Number(e)))r.id=Number(e);else throw new Error(`Invalid target, expected id:number or topic:string, got ${t}:${e}`);return r}function ye(n,t){return q.fromMiliseconds(Date.now()+q.toMiliseconds(n))}function an(n){return Date.now()>=q.toMiliseconds(n)}function ne(n,t){return`${n}${t?`:${t}`:""}`}function Rn(n=[],t=[]){return[...new Set([...n,...t])]}async function Ty({id:n,topic:t,wcDeepLink:e}){var r;try{if(!e)return;const i=typeof e=="string"?JSON.parse(e):e,s=i?.href;if(typeof s!="string")return;const o=Py(s,n,t),c=zr();if(c===st.browser){if(!((r=Gn())!=null&&r.hasFocus())){console.warn("Document does not have focus, skipping deeplink.");return}Oy(o)}else c===st.reactNative&&typeof(global==null?void 0:global.Linking)<"u"&&await global.Linking.openURL(o)}catch(i){console.error(i)}}function Py(n,t,e){const r=`requestId=${t}&sessionTopic=${e}`;n.endsWith("/")&&(n=n.slice(0,-1));let i=`${n}`;if(n.startsWith("https://t.me")){const s=n.includes("?")?"&startapp=":"?startapp=";i=`${i}${s}${xy(r,!0)}`}else i=`${i}/wc?${r}`;return i}function Oy(n){let t="_self";Dy()?t="_top":(Ly()||n.startsWith("https://")||n.startsWith("http://"))&&(t="_blank"),window.open(n,t,"noreferrer noopener")}async function Ry(n,t){let e="";try{if(nr()&&(e=localStorage.getItem(t),e))return e;e=await n.getItem(t)}catch(r){console.error(r)}return e}function Ac(n,t){if(!n.includes(t))return null;const e=n.split(/([&,?,=])/),r=e.indexOf(t);return e[r+2]}function Tc(){return typeof crypto<"u"&&crypto!=null&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/gu,n=>{const t=Math.random()*16|0;return(n==="x"?t:t&3|8).toString(16)})}function fa(){return typeof process<"u"&&sy.IS_VITEST==="true"}function Ly(){return typeof window<"u"&&(!!window.TelegramWebviewProxy||!!window.Telegram||!!window.TelegramWebviewProxyProto)}function Dy(){try{return window.self!==window.top}catch{return!1}}function xy(n,t=!1){const e=Buffer.from(n).toString("base64");return t?e.replace(/[=]/g,""):e}function Nh(n){return Buffer.from(n,"base64").toString("utf-8")}function Vy(n){return new Promise(t=>setTimeout(t,n))}let Sy=class{constructor({limit:t}){bc(this,"limit"),bc(this,"set"),this.limit=t,this.set=new Set}add(t){if(!this.set.has(t)){if(this.set.size>=this.limit){const e=this.set.values().next().value;e&&this.set.delete(e)}this.set.add(t)}}has(t){return this.set.has(t)}};const ri=BigInt(2**32-1),Pc=BigInt(32);function Bh(n,t=!1){return t?{h:Number(n&ri),l:Number(n>>Pc&ri)}:{h:Number(n>>Pc&ri)|0,l:Number(n&ri)|0}}function Mh(n,t=!1){const e=n.length;let r=new Uint32Array(e),i=new Uint32Array(e);for(let s=0;s<e;s++){const{h:o,l:c}=Bh(n[s],t);[r[s],i[s]]=[o,c]}return[r,i]}const Oc=(n,t,e)=>n>>>e,Rc=(n,t,e)=>n<<32-e|t>>>e,cn=(n,t,e)=>n>>>e|t<<32-e,ln=(n,t,e)=>n<<32-e|t>>>e,Er=(n,t,e)=>n<<64-e|t>>>e-32,vr=(n,t,e)=>n>>>e-32|t<<64-e,Cy=(n,t)=>t,$y=(n,t)=>n,ky=(n,t,e)=>n<<e|t>>>32-e,Uy=(n,t,e)=>t<<e|n>>>32-e,Ny=(n,t,e)=>t<<e-32|n>>>64-e,By=(n,t,e)=>n<<e-32|t>>>64-e;function yt(n,t,e,r){const i=(t>>>0)+(r>>>0);return{h:n+e+(i/2**32|0)|0,l:i|0}}const pa=(n,t,e)=>(n>>>0)+(t>>>0)+(e>>>0),_a=(n,t,e,r)=>t+e+r+(n/2**32|0)|0,My=(n,t,e,r)=>(n>>>0)+(t>>>0)+(e>>>0)+(r>>>0),qy=(n,t,e,r,i)=>t+e+r+i+(n/2**32|0)|0,jy=(n,t,e,r,i)=>(n>>>0)+(t>>>0)+(e>>>0)+(r>>>0)+(i>>>0),zy=(n,t,e,r,i,s)=>t+e+r+i+s+(n/2**32|0)|0,Nn=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;function ma(n){return n instanceof Uint8Array||ArrayBuffer.isView(n)&&n.constructor.name==="Uint8Array"}function Ft(n){if(!Number.isSafeInteger(n)||n<0)throw new Error("positive integer expected, got "+n)}function pt(n,...t){if(!ma(n))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(n.length))throw new Error("Uint8Array expected of length "+t+", got length="+n.length)}function wa(n){if(typeof n!="function"||typeof n.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");Ft(n.outputLen),Ft(n.blockLen)}function fn(n,t=!0){if(n.destroyed)throw new Error("Hash instance has been destroyed");if(t&&n.finished)throw new Error("Hash#digest() has already been called")}function ya(n,t){pt(n);const e=t.outputLen;if(n.length<e)throw new Error("digestInto() expects output buffer of length at least "+e)}function $r(n){return new Uint32Array(n.buffer,n.byteOffset,Math.floor(n.byteLength/4))}function _t(...n){for(let t=0;t<n.length;t++)n[t].fill(0)}function bs(n){return new DataView(n.buffer,n.byteOffset,n.byteLength)}function Pt(n,t){return n<<32-t|n>>>t}const qh=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function jh(n){return n<<24&4278190080|n<<8&16711680|n>>>8&65280|n>>>24&255}const Nt=qh?n=>n:n=>jh(n);function Ky(n){for(let t=0;t<n.length;t++)n[t]=jh(n[t]);return n}const un=qh?n=>n:Ky,zh=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",Fy=Array.from({length:256},(n,t)=>t.toString(16).padStart(2,"0"));function kr(n){if(pt(n),zh)return n.toHex();let t="";for(let e=0;e<n.length;e++)t+=Fy[n[e]];return t}const kt={_0:48,_9:57,A:65,F:70,a:97,f:102};function Lc(n){if(n>=kt._0&&n<=kt._9)return n-kt._0;if(n>=kt.A&&n<=kt.F)return n-(kt.A-10);if(n>=kt.a&&n<=kt.f)return n-(kt.a-10)}function ga(n){if(typeof n!="string")throw new Error("hex string expected, got "+typeof n);if(zh)return Uint8Array.fromHex(n);const t=n.length,e=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(e);for(let i=0,s=0;i<e;i++,s+=2){const o=Lc(n.charCodeAt(s)),c=Lc(n.charCodeAt(s+1));if(o===void 0||c===void 0){const l=n[s]+n[s+1];throw new Error('hex string expected, got non-hex character "'+l+'" at index '+s)}r[i]=o*16+c}return r}function Wy(n){if(typeof n!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(n))}function vt(n){return typeof n=="string"&&(n=Wy(n)),pt(n),n}function An(...n){let t=0;for(let r=0;r<n.length;r++){const i=n[r];pt(i),t+=i.length}const e=new Uint8Array(t);for(let r=0,i=0;r<n.length;r++){const s=n[r];e.set(s,i),i+=s.length}return e}class Yi{}function Kr(n){const t=r=>n().update(vt(r)).digest(),e=n();return t.outputLen=e.outputLen,t.blockLen=e.blockLen,t.create=()=>n(),t}function Hy(n){const t=(r,i)=>n(i).update(vt(r)).digest(),e=n({});return t.outputLen=e.outputLen,t.blockLen=e.blockLen,t.create=r=>n(r),t}function rr(n=32){if(Nn&&typeof Nn.getRandomValues=="function")return Nn.getRandomValues(new Uint8Array(n));if(Nn&&typeof Nn.randomBytes=="function")return Uint8Array.from(Nn.randomBytes(n));throw new Error("crypto.getRandomValues must be defined")}const Gy=BigInt(0),ur=BigInt(1),Zy=BigInt(2),Yy=BigInt(7),Jy=BigInt(256),Qy=BigInt(113),Kh=[],Fh=[],Wh=[];for(let n=0,t=ur,e=1,r=0;n<24;n++){[e,r]=[r,(2*e+3*r)%5],Kh.push(2*(5*r+e)),Fh.push((n+1)*(n+2)/2%64);let i=Gy;for(let s=0;s<7;s++)t=(t<<ur^(t>>Yy)*Qy)%Jy,t&Zy&&(i^=ur<<(ur<<BigInt(s))-ur);Wh.push(i)}const Hh=Mh(Wh,!0),Xy=Hh[0],eg=Hh[1],Dc=(n,t,e)=>e>32?Ny(n,t,e):ky(n,t,e),xc=(n,t,e)=>e>32?By(n,t,e):Uy(n,t,e);function tg(n,t=24){const e=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let o=0;o<10;o++)e[o]=n[o]^n[o+10]^n[o+20]^n[o+30]^n[o+40];for(let o=0;o<10;o+=2){const c=(o+8)%10,l=(o+2)%10,u=e[l],h=e[l+1],d=Dc(u,h,1)^e[c],f=xc(u,h,1)^e[c+1];for(let p=0;p<50;p+=10)n[o+p]^=d,n[o+p+1]^=f}let i=n[2],s=n[3];for(let o=0;o<24;o++){const c=Fh[o],l=Dc(i,s,c),u=xc(i,s,c),h=Kh[o];i=n[h],s=n[h+1],n[h]=l,n[h+1]=u}for(let o=0;o<50;o+=10){for(let c=0;c<10;c++)e[c]=n[o+c];for(let c=0;c<10;c++)n[o+c]^=~e[(c+2)%10]&e[(c+4)%10]}n[0]^=Xy[r],n[1]^=eg[r]}_t(e)}let ng=class Gh extends Yi{constructor(t,e,r,i=!1,s=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=e,this.outputLen=r,this.enableXOF=i,this.rounds=s,Ft(r),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=$r(this.state)}clone(){return this._cloneInto()}keccak(){un(this.state32),tg(this.state32,this.rounds),un(this.state32),this.posOut=0,this.pos=0}update(t){fn(this),t=vt(t),pt(t);const{blockLen:e,state:r}=this,i=t.length;for(let s=0;s<i;){const o=Math.min(e-this.pos,i-s);for(let c=0;c<o;c++)r[this.pos++]^=t[s++];this.pos===e&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:e,pos:r,blockLen:i}=this;t[r]^=e,e&128&&r===i-1&&this.keccak(),t[i-1]^=128,this.keccak()}writeInto(t){fn(this,!1),pt(t),this.finish();const e=this.state,{blockLen:r}=this;for(let i=0,s=t.length;i<s;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,s-i);t.set(e.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return Ft(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(ya(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,_t(this.state)}_cloneInto(t){const{blockLen:e,suffix:r,outputLen:i,rounds:s,enableXOF:o}=this;return t||(t=new Gh(e,r,i,o,s)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=s,t.suffix=r,t.outputLen=i,t.enableXOF=o,t.destroyed=this.destroyed,t}};const rg=(n,t,e)=>Kr(()=>new ng(t,n,e)),ig=rg(1,136,256/8);function sg(n,t,e,r){if(typeof n.setBigUint64=="function")return n.setBigUint64(t,e,r);const i=BigInt(32),s=BigInt(4294967295),o=Number(e>>i&s),c=Number(e&s),l=r?4:0,u=r?0:4;n.setUint32(t+l,o,r),n.setUint32(t+u,c,r)}function og(n,t,e){return n&t^~n&e}function ag(n,t,e){return n&t^n&e^t&e}let Zh=class extends Yi{constructor(t,e,r,i){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=i,this.buffer=new Uint8Array(t),this.view=bs(this.buffer)}update(t){fn(this),t=vt(t),pt(t);const{view:e,buffer:r,blockLen:i}=this,s=t.length;for(let o=0;o<s;){const c=Math.min(i-this.pos,s-o);if(c===i){const l=bs(t);for(;i<=s-o;o+=i)this.process(l,o);continue}r.set(t.subarray(o,o+c),this.pos),this.pos+=c,o+=c,this.pos===i&&(this.process(e,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){fn(this),ya(t,this),this.finished=!0;const{buffer:e,view:r,blockLen:i,isLE:s}=this;let{pos:o}=this;e[o++]=128,_t(this.buffer.subarray(o)),this.padOffset>i-o&&(this.process(r,0),o=0);for(let d=o;d<i;d++)e[d]=0;sg(r,i-8,BigInt(this.length*8),s),this.process(r,0);const c=bs(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=l/4,h=this.get();if(u>h.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<u;d++)c.setUint32(4*d,h[d],s)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const r=t.slice(0,e);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:r,length:i,finished:s,destroyed:o,pos:c}=this;return t.destroyed=o,t.finished=s,t.length=i,t.pos=c,i%e&&t.buffer.set(r),t}clone(){return this._cloneInto()}};const Qt=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),$e=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),ke=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),cg=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Xt=new Uint32Array(64);let lg=class extends Zh{constructor(t=32){super(64,t,8,!1),this.A=Qt[0]|0,this.B=Qt[1]|0,this.C=Qt[2]|0,this.D=Qt[3]|0,this.E=Qt[4]|0,this.F=Qt[5]|0,this.G=Qt[6]|0,this.H=Qt[7]|0}get(){const{A:t,B:e,C:r,D:i,E:s,F:o,G:c,H:l}=this;return[t,e,r,i,s,o,c,l]}set(t,e,r,i,s,o,c,l){this.A=t|0,this.B=e|0,this.C=r|0,this.D=i|0,this.E=s|0,this.F=o|0,this.G=c|0,this.H=l|0}process(t,e){for(let d=0;d<16;d++,e+=4)Xt[d]=t.getUint32(e,!1);for(let d=16;d<64;d++){const f=Xt[d-15],p=Xt[d-2],m=Pt(f,7)^Pt(f,18)^f>>>3,w=Pt(p,17)^Pt(p,19)^p>>>10;Xt[d]=w+Xt[d-7]+m+Xt[d-16]|0}let{A:r,B:i,C:s,D:o,E:c,F:l,G:u,H:h}=this;for(let d=0;d<64;d++){const f=Pt(c,6)^Pt(c,11)^Pt(c,25),p=h+f+og(c,l,u)+cg[d]+Xt[d]|0,m=(Pt(r,2)^Pt(r,13)^Pt(r,22))+ag(r,i,s)|0;h=u,u=l,l=c,c=o+p|0,o=s,s=i,i=r,r=p+m|0}r=r+this.A|0,i=i+this.B|0,s=s+this.C|0,o=o+this.D|0,c=c+this.E|0,l=l+this.F|0,u=u+this.G|0,h=h+this.H|0,this.set(r,i,s,o,c,l,u,h)}roundClean(){_t(Xt)}destroy(){this.set(0,0,0,0,0,0,0,0),_t(this.buffer)}};const Yh=Mh(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(n=>BigInt(n))),ug=Yh[0],hg=Yh[1],en=new Uint32Array(80),tn=new Uint32Array(80);let Ea=class extends Zh{constructor(t=64){super(128,t,16,!1),this.Ah=ke[0]|0,this.Al=ke[1]|0,this.Bh=ke[2]|0,this.Bl=ke[3]|0,this.Ch=ke[4]|0,this.Cl=ke[5]|0,this.Dh=ke[6]|0,this.Dl=ke[7]|0,this.Eh=ke[8]|0,this.El=ke[9]|0,this.Fh=ke[10]|0,this.Fl=ke[11]|0,this.Gh=ke[12]|0,this.Gl=ke[13]|0,this.Hh=ke[14]|0,this.Hl=ke[15]|0}get(){const{Ah:t,Al:e,Bh:r,Bl:i,Ch:s,Cl:o,Dh:c,Dl:l,Eh:u,El:h,Fh:d,Fl:f,Gh:p,Gl:m,Hh:w,Hl:_}=this;return[t,e,r,i,s,o,c,l,u,h,d,f,p,m,w,_]}set(t,e,r,i,s,o,c,l,u,h,d,f,p,m,w,_){this.Ah=t|0,this.Al=e|0,this.Bh=r|0,this.Bl=i|0,this.Ch=s|0,this.Cl=o|0,this.Dh=c|0,this.Dl=l|0,this.Eh=u|0,this.El=h|0,this.Fh=d|0,this.Fl=f|0,this.Gh=p|0,this.Gl=m|0,this.Hh=w|0,this.Hl=_|0}process(t,e){for(let g=0;g<16;g++,e+=4)en[g]=t.getUint32(e),tn[g]=t.getUint32(e+=4);for(let g=16;g<80;g++){const I=en[g-15]|0,b=tn[g-15]|0,D=cn(I,b,1)^cn(I,b,8)^Oc(I,b,7),x=ln(I,b,1)^ln(I,b,8)^Rc(I,b,7),S=en[g-2]|0,y=tn[g-2]|0,L=cn(S,y,19)^Er(S,y,61)^Oc(S,y,6),T=ln(S,y,19)^vr(S,y,61)^Rc(S,y,6),O=My(x,T,tn[g-7],tn[g-16]),C=qy(O,D,L,en[g-7],en[g-16]);en[g]=C|0,tn[g]=O|0}let{Ah:r,Al:i,Bh:s,Bl:o,Ch:c,Cl:l,Dh:u,Dl:h,Eh:d,El:f,Fh:p,Fl:m,Gh:w,Gl:_,Hh:E,Hl:v}=this;for(let g=0;g<80;g++){const I=cn(d,f,14)^cn(d,f,18)^Er(d,f,41),b=ln(d,f,14)^ln(d,f,18)^vr(d,f,41),D=d&p^~d&w,x=f&m^~f&_,S=jy(v,b,x,hg[g],tn[g]),y=zy(S,E,I,D,ug[g],en[g]),L=S|0,T=cn(r,i,28)^Er(r,i,34)^Er(r,i,39),O=ln(r,i,28)^vr(r,i,34)^vr(r,i,39),C=r&s^r&c^s&c,A=i&o^i&l^o&l;E=w|0,v=_|0,w=p|0,_=m|0,p=d|0,m=f|0,{h:d,l:f}=yt(u|0,h|0,y|0,L|0),u=c|0,h=l|0,c=s|0,l=o|0,s=r|0,o=i|0;const P=pa(L,O,A);r=_a(P,y,T,C),i=P|0}({h:r,l:i}=yt(this.Ah|0,this.Al|0,r|0,i|0)),{h:s,l:o}=yt(this.Bh|0,this.Bl|0,s|0,o|0),{h:c,l}=yt(this.Ch|0,this.Cl|0,c|0,l|0),{h:u,l:h}=yt(this.Dh|0,this.Dl|0,u|0,h|0),{h:d,l:f}=yt(this.Eh|0,this.El|0,d|0,f|0),{h:p,l:m}=yt(this.Fh|0,this.Fl|0,p|0,m|0),{h:w,l:_}=yt(this.Gh|0,this.Gl|0,w|0,_|0),{h:E,l:v}=yt(this.Hh|0,this.Hl|0,E|0,v|0),this.set(r,i,s,o,c,l,u,h,d,f,p,m,w,_,E,v)}roundClean(){_t(en,tn)}destroy(){_t(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}},dg=class extends Ea{constructor(){super(48),this.Ah=$e[0]|0,this.Al=$e[1]|0,this.Bh=$e[2]|0,this.Bl=$e[3]|0,this.Ch=$e[4]|0,this.Cl=$e[5]|0,this.Dh=$e[6]|0,this.Dl=$e[7]|0,this.Eh=$e[8]|0,this.El=$e[9]|0,this.Fh=$e[10]|0,this.Fl=$e[11]|0,this.Gh=$e[12]|0,this.Gl=$e[13]|0,this.Hh=$e[14]|0,this.Hl=$e[15]|0}};const Ue=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class fg extends Ea{constructor(){super(32),this.Ah=Ue[0]|0,this.Al=Ue[1]|0,this.Bh=Ue[2]|0,this.Bl=Ue[3]|0,this.Ch=Ue[4]|0,this.Cl=Ue[5]|0,this.Dh=Ue[6]|0,this.Dl=Ue[7]|0,this.Eh=Ue[8]|0,this.El=Ue[9]|0,this.Fh=Ue[10]|0,this.Fl=Ue[11]|0,this.Gh=Ue[12]|0,this.Gl=Ue[13]|0,this.Hh=Ue[14]|0,this.Hl=Ue[15]|0}}const Ji=Kr(()=>new lg),pg=Kr(()=>new Ea),_g=Kr(()=>new dg),mg=Kr(()=>new fg),wg=Uint8Array.from([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9]),we=Uint32Array.from([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),j=new Uint32Array(32);function nn(n,t,e,r,i,s){const o=i[s],c=i[s+1];let l=j[2*n],u=j[2*n+1],h=j[2*t],d=j[2*t+1],f=j[2*e],p=j[2*e+1],m=j[2*r],w=j[2*r+1],_=pa(l,h,o);u=_a(_,u,d,c),l=_|0,{Dh:w,Dl:m}={Dh:w^u,Dl:m^l},{Dh:w,Dl:m}={Dh:Cy(w,m),Dl:$y(w)},{h:p,l:f}=yt(p,f,w,m),{Bh:d,Bl:h}={Bh:d^p,Bl:h^f},{Bh:d,Bl:h}={Bh:cn(d,h,24),Bl:ln(d,h,24)},j[2*n]=l,j[2*n+1]=u,j[2*t]=h,j[2*t+1]=d,j[2*e]=f,j[2*e+1]=p,j[2*r]=m,j[2*r+1]=w}function rn(n,t,e,r,i,s){const o=i[s],c=i[s+1];let l=j[2*n],u=j[2*n+1],h=j[2*t],d=j[2*t+1],f=j[2*e],p=j[2*e+1],m=j[2*r],w=j[2*r+1],_=pa(l,h,o);u=_a(_,u,d,c),l=_|0,{Dh:w,Dl:m}={Dh:w^u,Dl:m^l},{Dh:w,Dl:m}={Dh:cn(w,m,16),Dl:ln(w,m,16)},{h:p,l:f}=yt(p,f,w,m),{Bh:d,Bl:h}={Bh:d^p,Bl:h^f},{Bh:d,Bl:h}={Bh:Er(d,h,63),Bl:vr(d,h,63)},j[2*n]=l,j[2*n+1]=u,j[2*t]=h,j[2*t+1]=d,j[2*e]=f,j[2*e+1]=p,j[2*r]=m,j[2*r+1]=w}function yg(n,t={},e,r,i){if(Ft(e),n<0||n>e)throw new Error("outputLen bigger than keyLen");const{key:s,salt:o,personalization:c}=t;if(s!==void 0&&(s.length<1||s.length>e))throw new Error("key length must be undefined or 1.."+e);if(o!==void 0&&o.length!==r)throw new Error("salt must be undefined or "+r);if(c!==void 0&&c.length!==i)throw new Error("personalization must be undefined or "+i)}class gg extends Yi{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,this.length=0,this.pos=0,Ft(t),Ft(e),this.blockLen=t,this.outputLen=e,this.buffer=new Uint8Array(t),this.buffer32=$r(this.buffer)}update(t){fn(this),t=vt(t),pt(t);const{blockLen:e,buffer:r,buffer32:i}=this,s=t.length,o=t.byteOffset,c=t.buffer;for(let l=0;l<s;){this.pos===e&&(un(i),this.compress(i,0,!1),un(i),this.pos=0);const u=Math.min(e-this.pos,s-l),h=o+l;if(u===e&&!(h%4)&&l+u<s){const d=new Uint32Array(c,h,Math.floor((s-l)/4));un(d);for(let f=0;l+e<s;f+=i.length,l+=e)this.length+=e,this.compress(d,f,!1);un(d);continue}r.set(t.subarray(l,l+u),this.pos),this.pos+=u,this.length+=u,l+=u}return this}digestInto(t){fn(this),ya(t,this);const{pos:e,buffer32:r}=this;this.finished=!0,_t(this.buffer.subarray(e)),un(r),this.compress(r,0,!0),un(r);const i=$r(t);this.get().forEach((s,o)=>i[o]=Nt(s))}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const r=t.slice(0,e);return this.destroy(),r}_cloneInto(t){const{buffer:e,length:r,finished:i,destroyed:s,outputLen:o,pos:c}=this;return t||(t=new this.constructor({dkLen:o})),t.set(...this.get()),t.buffer.set(e),t.destroyed=s,t.finished=i,t.length=r,t.pos=c,t.outputLen=o,t}clone(){return this._cloneInto()}}class Eg extends gg{constructor(t={}){const e=t.dkLen===void 0?64:t.dkLen;super(128,e),this.v0l=we[0]|0,this.v0h=we[1]|0,this.v1l=we[2]|0,this.v1h=we[3]|0,this.v2l=we[4]|0,this.v2h=we[5]|0,this.v3l=we[6]|0,this.v3h=we[7]|0,this.v4l=we[8]|0,this.v4h=we[9]|0,this.v5l=we[10]|0,this.v5h=we[11]|0,this.v6l=we[12]|0,this.v6h=we[13]|0,this.v7l=we[14]|0,this.v7h=we[15]|0,yg(e,t,64,16,16);let{key:r,personalization:i,salt:s}=t,o=0;if(r!==void 0&&(r=vt(r),o=r.length),this.v0l^=this.outputLen|o<<8|65536|1<<24,s!==void 0){s=vt(s);const c=$r(s);this.v4l^=Nt(c[0]),this.v4h^=Nt(c[1]),this.v5l^=Nt(c[2]),this.v5h^=Nt(c[3])}if(i!==void 0){i=vt(i);const c=$r(i);this.v6l^=Nt(c[0]),this.v6h^=Nt(c[1]),this.v7l^=Nt(c[2]),this.v7h^=Nt(c[3])}if(r!==void 0){const c=new Uint8Array(this.blockLen);c.set(r),this.update(c)}}get(){let{v0l:t,v0h:e,v1l:r,v1h:i,v2l:s,v2h:o,v3l:c,v3h:l,v4l:u,v4h:h,v5l:d,v5h:f,v6l:p,v6h:m,v7l:w,v7h:_}=this;return[t,e,r,i,s,o,c,l,u,h,d,f,p,m,w,_]}set(t,e,r,i,s,o,c,l,u,h,d,f,p,m,w,_){this.v0l=t|0,this.v0h=e|0,this.v1l=r|0,this.v1h=i|0,this.v2l=s|0,this.v2h=o|0,this.v3l=c|0,this.v3h=l|0,this.v4l=u|0,this.v4h=h|0,this.v5l=d|0,this.v5h=f|0,this.v6l=p|0,this.v6h=m|0,this.v7l=w|0,this.v7h=_|0}compress(t,e,r){this.get().forEach((l,u)=>j[u]=l),j.set(we,16);let{h:i,l:s}=Bh(BigInt(this.length));j[24]=we[8]^s,j[25]=we[9]^i,r&&(j[28]=~j[28],j[29]=~j[29]);let o=0;const c=wg;for(let l=0;l<12;l++)nn(0,4,8,12,t,e+2*c[o++]),rn(0,4,8,12,t,e+2*c[o++]),nn(1,5,9,13,t,e+2*c[o++]),rn(1,5,9,13,t,e+2*c[o++]),nn(2,6,10,14,t,e+2*c[o++]),rn(2,6,10,14,t,e+2*c[o++]),nn(3,7,11,15,t,e+2*c[o++]),rn(3,7,11,15,t,e+2*c[o++]),nn(0,5,10,15,t,e+2*c[o++]),rn(0,5,10,15,t,e+2*c[o++]),nn(1,6,11,12,t,e+2*c[o++]),rn(1,6,11,12,t,e+2*c[o++]),nn(2,7,8,13,t,e+2*c[o++]),rn(2,7,8,13,t,e+2*c[o++]),nn(3,4,9,14,t,e+2*c[o++]),rn(3,4,9,14,t,e+2*c[o++]);this.v0l^=j[0]^j[16],this.v0h^=j[1]^j[17],this.v1l^=j[2]^j[18],this.v1h^=j[3]^j[19],this.v2l^=j[4]^j[20],this.v2h^=j[5]^j[21],this.v3l^=j[6]^j[22],this.v3h^=j[7]^j[23],this.v4l^=j[8]^j[24],this.v4h^=j[9]^j[25],this.v5l^=j[10]^j[26],this.v5h^=j[11]^j[27],this.v6l^=j[12]^j[28],this.v6h^=j[13]^j[29],this.v7l^=j[14]^j[30],this.v7h^=j[15]^j[31],_t(j)}destroy(){this.destroyed=!0,_t(this.buffer32),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const vg=Hy(n=>new Eg(n)),bg="https://rpc.walletconnect.org/v1";function Jh(n){const t=`Ethereum Signed Message:
6
+ ${n.length}`,e=new TextEncoder().encode(t+n);return"0x"+Buffer.from(ig(e)).toString("hex")}async function Ig(n,t,e,r,i,s){switch(e.t){case"eip191":return await Ag(n,t,e.s);case"eip1271":return await Tg(n,t,e.s,r,i,s);default:throw new Error(`verifySignature failed: Attempted to verify CacaoSignature with unknown type: ${e.t}`)}}async function Ag(n,t,e){return(await oy({hash:Jh(t),signature:e})).toLowerCase()===n.toLowerCase()}async function Tg(n,t,e,r,i,s){const o=_i(r);if(!o.namespace||!o.reference)throw new Error(`isValidEip1271Signature failed: chainId must be in CAIP-2 format, received: ${r}`);try{const c="0x1626ba7e",l="0000000000000000000000000000000000000000000000000000000000000040",u=e.substring(2),h=(u.length/2).toString(16).padStart(64,"0"),d=(t.startsWith("0x")?t:Jh(t)).substring(2),f=c+d+l+h+u,p=await fetch(`${s||bg}/?chainId=${r}&projectId=${i}`,{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({id:Pg(),jsonrpc:"2.0",method:"eth_call",params:[{to:n,data:f},"latest"]})}),{result:m}=await p.json();return m?m.slice(0,c.length).toLowerCase()===c.toLowerCase():!1}catch(c){return console.error("isValidEip1271Signature: ",c),!1}}function Pg(){return Date.now()+Math.floor(Math.random()*1e3)}function Og(n){const t=atob(n),e=new Uint8Array(t.length);for(let o=0;o<t.length;o++)e[o]=t.charCodeAt(o);const r=e[0];if(r===0)throw new Error("No signatures found");const i=1+r*64;if(e.length<i)throw new Error("Transaction data too short for claimed signature count");if(e.length<100)throw new Error("Transaction too short");const s=Buffer.from(n,"base64").slice(1,65);return jr.encode(s)}function Rg(n){const t=new Uint8Array(Buffer.from(n,"base64")),e=Array.from("TransactionData::").map(s=>s.charCodeAt(0)),r=new Uint8Array(e.length+t.length);r.set(e),r.set(t,e.length);const i=vg(r,{dkLen:32});return jr.encode(i)}function Vc(n){const t=new Uint8Array(Ji(Lg(n)));return jr.encode(t)}function Lg(n){if(n instanceof Uint8Array)return n;if(Array.isArray(n))return new Uint8Array(n);if(typeof n=="object"&&n!=null&&n.data)return new Uint8Array(Object.values(n.data));if(typeof n=="object"&&n)return new Uint8Array(Object.values(n));throw new Error("getNearUint8ArrayFromBytes: Unexpected result type from bytes array")}function Sc(n){const t=Buffer.from(n,"base64"),e=Nw(t).txn;if(!e)throw new Error("Invalid signed transaction: missing 'txn' field");const r=Dw(e),i=Buffer.from("TX"),s=Buffer.concat([i,Buffer.from(r)]),o=mg(s);return Ww.encode(o).replace(/=+$/,"")}function Is(n){const t=[];let e=BigInt(n);for(;e>=BigInt(128);)t.push(Number(e&BigInt(127)|BigInt(128))),e>>=BigInt(7);return t.push(Number(e)),Buffer.from(t)}function Dg(n){const t=Buffer.from(n.signed.bodyBytes,"base64"),e=Buffer.from(n.signed.authInfoBytes,"base64"),r=Buffer.from(n.signature.signature,"base64"),i=[];i.push(Buffer.from([10])),i.push(Is(t.length)),i.push(t),i.push(Buffer.from([18])),i.push(Is(e.length)),i.push(e),i.push(Buffer.from([26])),i.push(Is(r.length)),i.push(r);const s=Buffer.concat(i),o=Ji(s);return Buffer.from(o).toString("hex").toUpperCase()}var xg=Object.defineProperty,Vg=Object.defineProperties,Sg=Object.getOwnPropertyDescriptors,Cc=Object.getOwnPropertySymbols,Cg=Object.prototype.hasOwnProperty,$g=Object.prototype.propertyIsEnumerable,$c=(n,t,e)=>t in n?xg(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,kg=(n,t)=>{for(var e in t||(t={}))Cg.call(t,e)&&$c(n,e,t[e]);if(Cc)for(var e of Cc(t))$g.call(t,e)&&$c(n,e,t[e]);return n},Ug=(n,t)=>Vg(n,Sg(t));const Ng="did:pkh:",va=n=>n?.split(":"),Bg=n=>{const t=n&&va(n);if(t)return n.includes(Ng)?t[3]:t[1]},co=n=>{const t=n&&va(n);if(t)return t[2]+":"+t[3]},$i=n=>{const t=n&&va(n);if(t)return t.pop()};async function kc(n){const{cacao:t,projectId:e}=n,{s:r,p:i}=t,s=Qh(i,i.iss),o=$i(i.iss);return await Ig(o,s,r,co(i.iss),e)}const Qh=(n,t)=>{const e=`${n.domain} wants you to sign in with your Ethereum account:`,r=$i(t);if(!n.aud&&!n.uri)throw new Error("Either `aud` or `uri` is required to construct the message");let i=n.statement||void 0;const s=`URI: ${n.aud||n.uri}`,o=`Version: ${n.version}`,c=`Chain ID: ${Bg(t)}`,l=`Nonce: ${n.nonce}`,u=`Issued At: ${n.iat}`,h=n.exp?`Expiration Time: ${n.exp}`:void 0,d=n.nbf?`Not Before: ${n.nbf}`:void 0,f=n.requestId?`Request ID: ${n.requestId}`:void 0,p=n.resources?`Resources:${n.resources.map(w=>`
7
+ - ${w}`).join("")}`:void 0,m=mi(n.resources);if(m){const w=Ur(m);i=Gg(i,w)}return[e,r,"",i,"",s,o,c,l,u,h,d,f,p].filter(w=>w!=null).join(`
8
+ `)};function Mg(n){return Buffer.from(JSON.stringify(n)).toString("base64")}function qg(n){return JSON.parse(Buffer.from(n,"base64").toString("utf-8"))}function Dn(n){if(!n)throw new Error("No recap provided, value is undefined");if(!n.att)throw new Error("No `att` property found");const t=Object.keys(n.att);if(!(t!=null&&t.length))throw new Error("No resources found in `att` property");t.forEach(e=>{const r=n.att[e];if(Array.isArray(r))throw new Error(`Resource must be an object: ${e}`);if(typeof r!="object")throw new Error(`Resource must be an object: ${e}`);if(!Object.keys(r).length)throw new Error(`Resource object is empty: ${e}`);Object.keys(r).forEach(i=>{const s=r[i];if(!Array.isArray(s))throw new Error(`Ability limits ${i} must be an array of objects, found: ${s}`);if(!s.length)throw new Error(`Value of ${i} is empty array, must be an array with objects`);s.forEach(o=>{if(typeof o!="object")throw new Error(`Ability limits (${i}) must be an array of objects, found: ${o}`)})})})}function jg(n,t,e,r={}){return e?.sort((i,s)=>i.localeCompare(s)),{att:{[n]:zg(t,e,r)}}}function zg(n,t,e={}){t=t?.sort((i,s)=>i.localeCompare(s));const r=t.map(i=>({[`${n}/${i}`]:[e]}));return Object.assign({},...r)}function Xh(n){return Dn(n),`urn:recap:${Mg(n).replace(/=/g,"")}`}function Ur(n){const t=qg(n.replace("urn:recap:",""));return Dn(t),t}function Kg(n,t,e){const r=jg(n,t,e);return Xh(r)}function Fg(n){return n&&n.includes("urn:recap:")}function Wg(n,t){const e=Ur(n),r=Ur(t),i=Hg(e,r);return Xh(i)}function Hg(n,t){Dn(n),Dn(t);const e=Object.keys(n.att).concat(Object.keys(t.att)).sort((i,s)=>i.localeCompare(s)),r={att:{}};return e.forEach(i=>{var s,o;Object.keys(((s=n.att)==null?void 0:s[i])||{}).concat(Object.keys(((o=t.att)==null?void 0:o[i])||{})).sort((c,l)=>c.localeCompare(l)).forEach(c=>{var l,u;r.att[i]=Ug(kg({},r.att[i]),{[c]:((l=n.att[i])==null?void 0:l[c])||((u=t.att[i])==null?void 0:u[c])})})}),r}function Gg(n="",t){Dn(t);const e="I further authorize the stated URI to perform the following actions on my behalf: ";if(n.includes(e))return n;const r=[];let i=0;Object.keys(t.att).forEach(c=>{const l=Object.keys(t.att[c]).map(d=>({ability:d.split("/")[0],action:d.split("/")[1]}));l.sort((d,f)=>d.action.localeCompare(f.action));const u={};l.forEach(d=>{u[d.ability]||(u[d.ability]=[]),u[d.ability].push(d.action)});const h=Object.keys(u).map(d=>(i++,`(${i}) '${d}': '${u[d].join("', '")}' for '${c}'.`));r.push(h.join(", ").replace(".,","."))});const s=r.join(" "),o=`${e}${s}`;return`${n?n+" ":""}${o}`}function Uc(n){var t;const e=Ur(n);Dn(e);const r=(t=e.att)==null?void 0:t.eip155;return r?Object.keys(r).map(i=>i.split("/")[1]):[]}function Nc(n){const t=Ur(n);Dn(t);const e=[];return Object.values(t.att).forEach(r=>{Object.values(r).forEach(i=>{var s;(s=i?.[0])!=null&&s.chains&&e.push(i[0].chains)})}),[...new Set(e.flat())]}function mi(n){if(!n)return;const t=n?.[n.length-1];return Fg(t)?t:void 0}/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */function ed(n){return n instanceof Uint8Array||ArrayBuffer.isView(n)&&n.constructor.name==="Uint8Array"}function lo(n){if(typeof n!="boolean")throw new Error(`boolean expected, not ${n}`)}function As(n){if(!Number.isSafeInteger(n)||n<0)throw new Error("positive integer expected, got "+n)}function Je(n,...t){if(!ed(n))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(n.length))throw new Error("Uint8Array expected of length "+t+", got length="+n.length)}function Bc(n,t=!0){if(n.destroyed)throw new Error("Hash instance has been destroyed");if(t&&n.finished)throw new Error("Hash#digest() has already been called")}function Zg(n,t){Je(n);const e=t.outputLen;if(n.length<e)throw new Error("digestInto() expects output buffer of length at least "+e)}function dn(n){return new Uint32Array(n.buffer,n.byteOffset,Math.floor(n.byteLength/4))}function Yn(...n){for(let t=0;t<n.length;t++)n[t].fill(0)}function Yg(n){return new DataView(n.buffer,n.byteOffset,n.byteLength)}const Jg=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Qg(n){if(typeof n!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(n))}function uo(n){if(typeof n=="string")n=Qg(n);else if(ed(n))n=ho(n);else throw new Error("Uint8Array expected, got "+typeof n);return n}function Xg(n,t){if(t==null||typeof t!="object")throw new Error("options must be defined");return Object.assign(n,t)}function e0(n,t){if(n.length!==t.length)return!1;let e=0;for(let r=0;r<n.length;r++)e|=n[r]^t[r];return e===0}const t0=(n,t)=>{function e(r,...i){if(Je(r),!Jg)throw new Error("Non little-endian hardware is not yet supported");if(n.nonceLength!==void 0){const u=i[0];if(!u)throw new Error("nonce / iv required");n.varSizeNonce?Je(u):Je(u,n.nonceLength)}const s=n.tagLength;s&&i[1]!==void 0&&Je(i[1]);const o=t(r,...i),c=(u,h)=>{if(h!==void 0){if(u!==2)throw new Error("cipher output not supported");Je(h)}};let l=!1;return{encrypt(u,h){if(l)throw new Error("cannot encrypt() twice with same key + nonce");return l=!0,Je(u),c(o.encrypt.length,h),o.encrypt(u,h)},decrypt(u,h){if(Je(u),s&&u.length<s)throw new Error("invalid ciphertext length: smaller than tagLength="+s);return c(o.decrypt.length,h),o.decrypt(u,h)}}}return Object.assign(e,n),e};function Mc(n,t,e=!0){if(t===void 0)return new Uint8Array(n);if(t.length!==n)throw new Error("invalid output length, expected "+n+", got: "+t.length);if(e&&!r0(t))throw new Error("invalid output, must be aligned");return t}function qc(n,t,e,r){if(typeof n.setBigUint64=="function")return n.setBigUint64(t,e,r);const i=BigInt(32),s=BigInt(4294967295),o=Number(e>>i&s),c=Number(e&s);n.setUint32(t+4,o,r),n.setUint32(t+0,c,r)}function n0(n,t,e){lo(e);const r=new Uint8Array(16),i=Yg(r);return qc(i,0,BigInt(t),e),qc(i,8,BigInt(n),e),r}function r0(n){return n.byteOffset%4===0}function ho(n){return Uint8Array.from(n)}const td=n=>Uint8Array.from(n.split("").map(t=>t.charCodeAt(0))),i0=td("expand 16-byte k"),s0=td("expand 32-byte k"),o0=dn(i0),a0=dn(s0);function Q(n,t){return n<<t|n>>>32-t}function fo(n){return n.byteOffset%4===0}const ii=64,c0=16,nd=2**32-1,jc=new Uint32Array;function l0(n,t,e,r,i,s,o,c){const l=i.length,u=new Uint8Array(ii),h=dn(u),d=fo(i)&&fo(s),f=d?dn(i):jc,p=d?dn(s):jc;for(let m=0;m<l;o++){if(n(t,e,r,h,o,c),o>=nd)throw new Error("arx: counter overflow");const w=Math.min(ii,l-m);if(d&&w===ii){const _=m/4;if(m%4!==0)throw new Error("arx: invalid block position");for(let E=0,v;E<c0;E++)v=_+E,p[v]=f[v]^h[E];m+=ii;continue}for(let _=0,E;_<w;_++)E=m+_,s[E]=i[E]^u[_];m+=w}}function u0(n,t){const{allowShortKeys:e,extendNonceFn:r,counterLength:i,counterRight:s,rounds:o}=Xg({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if(typeof n!="function")throw new Error("core must be a function");return As(i),As(o),lo(s),lo(e),(c,l,u,h,d=0)=>{Je(c),Je(l),Je(u);const f=u.length;if(h===void 0&&(h=new Uint8Array(f)),Je(h),As(d),d<0||d>=nd)throw new Error("arx: counter overflow");if(h.length<f)throw new Error(`arx: output (${h.length}) is shorter than data (${f})`);const p=[];let m=c.length,w,_;if(m===32)p.push(w=ho(c)),_=a0;else if(m===16&&e)w=new Uint8Array(32),w.set(c),w.set(c,16),_=o0,p.push(w);else throw new Error(`arx: invalid 32-byte key, got length=${m}`);fo(l)||p.push(l=ho(l));const E=dn(w);if(r){if(l.length!==24)throw new Error("arx: extended nonce must be 24 bytes");r(_,E,dn(l.subarray(0,16)),E),l=l.subarray(16)}const v=16-i;if(v!==l.length)throw new Error(`arx: nonce must be ${v} or 16 bytes`);if(v!==12){const I=new Uint8Array(12);I.set(l,s?0:12-l.length),l=I,p.push(l)}const g=dn(l);return l0(n,_,E,g,u,h,d,o),Yn(...p),h}}const Oe=(n,t)=>n[t++]&255|(n[t++]&255)<<8;class h0{constructor(t){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,t=uo(t),Je(t,32);const e=Oe(t,0),r=Oe(t,2),i=Oe(t,4),s=Oe(t,6),o=Oe(t,8),c=Oe(t,10),l=Oe(t,12),u=Oe(t,14);this.r[0]=e&8191,this.r[1]=(e>>>13|r<<3)&8191,this.r[2]=(r>>>10|i<<6)&7939,this.r[3]=(i>>>7|s<<9)&8191,this.r[4]=(s>>>4|o<<12)&255,this.r[5]=o>>>1&8190,this.r[6]=(o>>>14|c<<2)&8191,this.r[7]=(c>>>11|l<<5)&8065,this.r[8]=(l>>>8|u<<8)&8191,this.r[9]=u>>>5&127;for(let h=0;h<8;h++)this.pad[h]=Oe(t,16+2*h)}process(t,e,r=!1){const i=r?0:2048,{h:s,r:o}=this,c=o[0],l=o[1],u=o[2],h=o[3],d=o[4],f=o[5],p=o[6],m=o[7],w=o[8],_=o[9],E=Oe(t,e+0),v=Oe(t,e+2),g=Oe(t,e+4),I=Oe(t,e+6),b=Oe(t,e+8),D=Oe(t,e+10),x=Oe(t,e+12),S=Oe(t,e+14);let y=s[0]+(E&8191),L=s[1]+((E>>>13|v<<3)&8191),T=s[2]+((v>>>10|g<<6)&8191),O=s[3]+((g>>>7|I<<9)&8191),C=s[4]+((I>>>4|b<<12)&8191),A=s[5]+(b>>>1&8191),P=s[6]+((b>>>14|D<<2)&8191),R=s[7]+((D>>>11|x<<5)&8191),V=s[8]+((x>>>8|S<<8)&8191),k=s[9]+(S>>>5|i),$=0,M=$+y*c+L*(5*_)+T*(5*w)+O*(5*m)+C*(5*p);$=M>>>13,M&=8191,M+=A*(5*f)+P*(5*d)+R*(5*h)+V*(5*u)+k*(5*l),$+=M>>>13,M&=8191;let N=$+y*l+L*c+T*(5*_)+O*(5*w)+C*(5*m);$=N>>>13,N&=8191,N+=A*(5*p)+P*(5*f)+R*(5*d)+V*(5*h)+k*(5*u),$+=N>>>13,N&=8191;let z=$+y*u+L*l+T*c+O*(5*_)+C*(5*w);$=z>>>13,z&=8191,z+=A*(5*m)+P*(5*p)+R*(5*f)+V*(5*d)+k*(5*h),$+=z>>>13,z&=8191;let F=$+y*h+L*u+T*l+O*c+C*(5*_);$=F>>>13,F&=8191,F+=A*(5*w)+P*(5*m)+R*(5*p)+V*(5*f)+k*(5*d),$+=F>>>13,F&=8191;let K=$+y*d+L*h+T*u+O*l+C*c;$=K>>>13,K&=8191,K+=A*(5*_)+P*(5*w)+R*(5*m)+V*(5*p)+k*(5*f),$+=K>>>13,K&=8191;let W=$+y*f+L*d+T*h+O*u+C*l;$=W>>>13,W&=8191,W+=A*c+P*(5*_)+R*(5*w)+V*(5*m)+k*(5*p),$+=W>>>13,W&=8191;let G=$+y*p+L*f+T*d+O*h+C*u;$=G>>>13,G&=8191,G+=A*l+P*c+R*(5*_)+V*(5*w)+k*(5*m),$+=G>>>13,G&=8191;let he=$+y*m+L*p+T*f+O*d+C*h;$=he>>>13,he&=8191,he+=A*u+P*l+R*c+V*(5*_)+k*(5*w),$+=he>>>13,he&=8191;let re=$+y*w+L*m+T*p+O*f+C*d;$=re>>>13,re&=8191,re+=A*h+P*u+R*l+V*c+k*(5*_),$+=re>>>13,re&=8191;let te=$+y*_+L*w+T*m+O*p+C*f;$=te>>>13,te&=8191,te+=A*d+P*h+R*u+V*l+k*c,$+=te>>>13,te&=8191,$=($<<2)+$|0,$=$+M|0,M=$&8191,$=$>>>13,N+=$,s[0]=M,s[1]=N,s[2]=z,s[3]=F,s[4]=K,s[5]=W,s[6]=G,s[7]=he,s[8]=re,s[9]=te}finalize(){const{h:t,pad:e}=this,r=new Uint16Array(10);let i=t[1]>>>13;t[1]&=8191;for(let c=2;c<10;c++)t[c]+=i,i=t[c]>>>13,t[c]&=8191;t[0]+=i*5,i=t[0]>>>13,t[0]&=8191,t[1]+=i,i=t[1]>>>13,t[1]&=8191,t[2]+=i,r[0]=t[0]+5,i=r[0]>>>13,r[0]&=8191;for(let c=1;c<10;c++)r[c]=t[c]+i,i=r[c]>>>13,r[c]&=8191;r[9]-=8192;let s=(i^1)-1;for(let c=0;c<10;c++)r[c]&=s;s=~s;for(let c=0;c<10;c++)t[c]=t[c]&s|r[c];t[0]=(t[0]|t[1]<<13)&65535,t[1]=(t[1]>>>3|t[2]<<10)&65535,t[2]=(t[2]>>>6|t[3]<<7)&65535,t[3]=(t[3]>>>9|t[4]<<4)&65535,t[4]=(t[4]>>>12|t[5]<<1|t[6]<<14)&65535,t[5]=(t[6]>>>2|t[7]<<11)&65535,t[6]=(t[7]>>>5|t[8]<<8)&65535,t[7]=(t[8]>>>8|t[9]<<5)&65535;let o=t[0]+e[0];t[0]=o&65535;for(let c=1;c<8;c++)o=(t[c]+e[c]|0)+(o>>>16)|0,t[c]=o&65535;Yn(r)}update(t){Bc(this),t=uo(t),Je(t);const{buffer:e,blockLen:r}=this,i=t.length;for(let s=0;s<i;){const o=Math.min(r-this.pos,i-s);if(o===r){for(;r<=i-s;s+=r)this.process(t,s);continue}e.set(t.subarray(s,s+o),this.pos),this.pos+=o,s+=o,this.pos===r&&(this.process(e,0,!1),this.pos=0)}return this}destroy(){Yn(this.h,this.r,this.buffer,this.pad)}digestInto(t){Bc(this),Zg(t,this),this.finished=!0;const{buffer:e,h:r}=this;let{pos:i}=this;if(i){for(e[i++]=1;i<16;i++)e[i]=0;this.process(e,0,!0)}this.finalize();let s=0;for(let o=0;o<8;o++)t[s++]=r[o]>>>0,t[s++]=r[o]>>>8;return t}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const r=t.slice(0,e);return this.destroy(),r}}function d0(n){const t=(r,i)=>n(i).update(uo(r)).digest(),e=n(new Uint8Array(32));return t.outputLen=e.outputLen,t.blockLen=e.blockLen,t.create=r=>n(r),t}const f0=d0(n=>new h0(n));function p0(n,t,e,r,i,s=20){let o=n[0],c=n[1],l=n[2],u=n[3],h=t[0],d=t[1],f=t[2],p=t[3],m=t[4],w=t[5],_=t[6],E=t[7],v=i,g=e[0],I=e[1],b=e[2],D=o,x=c,S=l,y=u,L=h,T=d,O=f,C=p,A=m,P=w,R=_,V=E,k=v,$=g,M=I,N=b;for(let F=0;F<s;F+=2)D=D+L|0,k=Q(k^D,16),A=A+k|0,L=Q(L^A,12),D=D+L|0,k=Q(k^D,8),A=A+k|0,L=Q(L^A,7),x=x+T|0,$=Q($^x,16),P=P+$|0,T=Q(T^P,12),x=x+T|0,$=Q($^x,8),P=P+$|0,T=Q(T^P,7),S=S+O|0,M=Q(M^S,16),R=R+M|0,O=Q(O^R,12),S=S+O|0,M=Q(M^S,8),R=R+M|0,O=Q(O^R,7),y=y+C|0,N=Q(N^y,16),V=V+N|0,C=Q(C^V,12),y=y+C|0,N=Q(N^y,8),V=V+N|0,C=Q(C^V,7),D=D+T|0,N=Q(N^D,16),R=R+N|0,T=Q(T^R,12),D=D+T|0,N=Q(N^D,8),R=R+N|0,T=Q(T^R,7),x=x+O|0,k=Q(k^x,16),V=V+k|0,O=Q(O^V,12),x=x+O|0,k=Q(k^x,8),V=V+k|0,O=Q(O^V,7),S=S+C|0,$=Q($^S,16),A=A+$|0,C=Q(C^A,12),S=S+C|0,$=Q($^S,8),A=A+$|0,C=Q(C^A,7),y=y+L|0,M=Q(M^y,16),P=P+M|0,L=Q(L^P,12),y=y+L|0,M=Q(M^y,8),P=P+M|0,L=Q(L^P,7);let z=0;r[z++]=o+D|0,r[z++]=c+x|0,r[z++]=l+S|0,r[z++]=u+y|0,r[z++]=h+L|0,r[z++]=d+T|0,r[z++]=f+O|0,r[z++]=p+C|0,r[z++]=m+A|0,r[z++]=w+P|0,r[z++]=_+R|0,r[z++]=E+V|0,r[z++]=v+k|0,r[z++]=g+$|0,r[z++]=I+M|0,r[z++]=b+N|0}const _0=u0(p0,{counterRight:!1,counterLength:4,allowShortKeys:!1}),m0=new Uint8Array(16),zc=(n,t)=>{n.update(t);const e=t.length%16;e&&n.update(m0.subarray(e))},w0=new Uint8Array(32);function Kc(n,t,e,r,i){const s=n(t,e,w0),o=f0.create(s);i&&zc(o,i),zc(o,r);const c=n0(r.length,i?i.length:0,!0);o.update(c);const l=o.digest();return Yn(s,c),l}const y0=n=>(t,e,r)=>({encrypt(i,s){const o=i.length;s=Mc(o+16,s,!1),s.set(i);const c=s.subarray(0,-16);n(t,e,c,c,1);const l=Kc(n,t,e,c,r);return s.set(l,o),Yn(l),s},decrypt(i,s){s=Mc(i.length-16,s,!1);const o=i.subarray(0,-16),c=i.subarray(-16),l=Kc(n,t,e,o,r);if(!e0(c,l))throw new Error("invalid tag");return s.set(i.subarray(0,-16)),n(t,e,s,s,1),Yn(l),s}}),rd=t0({blockSize:64,nonceLength:12,tagLength:16},y0(_0));let id=class extends Yi{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,wa(t);const r=vt(e);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,s=new Uint8Array(i);s.set(r.length>i?t.create().update(r).digest():r);for(let o=0;o<s.length;o++)s[o]^=54;this.iHash.update(s),this.oHash=t.create();for(let o=0;o<s.length;o++)s[o]^=106;this.oHash.update(s),_t(s)}update(t){return fn(this),this.iHash.update(t),this}digestInto(t){fn(this),pt(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:e,iHash:r,finished:i,destroyed:s,blockLen:o,outputLen:c}=this;return t=t,t.finished=i,t.destroyed=s,t.blockLen=o,t.outputLen=c,t.oHash=e._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}};const Qi=(n,t,e)=>new id(n,t).update(e).digest();Qi.create=(n,t)=>new id(n,t);function g0(n,t,e){return wa(n),e===void 0&&(e=new Uint8Array(n.outputLen)),Qi(n,vt(e),vt(t))}const Ts=Uint8Array.from([0]),Fc=Uint8Array.of();function E0(n,t,e,r=32){wa(n),Ft(r);const i=n.outputLen;if(r>255*i)throw new Error("Length should be <= 255*HashLen");const s=Math.ceil(r/i);e===void 0&&(e=Fc);const o=new Uint8Array(s*i),c=Qi.create(n,t),l=c._cloneInto(),u=new Uint8Array(c.outputLen);for(let h=0;h<s;h++)Ts[0]=h+1,l.update(h===0?Fc:u).update(e).update(Ts).digestInto(u),o.set(u,i*h),c._cloneInto(l);return c.destroy(),l.destroy(),_t(u,Ts),o.slice(0,r)}const v0=(n,t,e,r,i)=>E0(n,g0(n,t,e),r,i),Xi=Ji,ba=BigInt(0),po=BigInt(1);function ki(n,t){if(typeof t!="boolean")throw new Error(n+" boolean expected, got "+t)}function si(n){const t=n.toString(16);return t.length&1?"0"+t:t}function sd(n){if(typeof n!="string")throw new Error("hex string expected, got "+typeof n);return n===""?ba:BigInt("0x"+n)}function es(n){return sd(kr(n))}function Ui(n){return pt(n),sd(kr(Uint8Array.from(n).reverse()))}function Ia(n,t){return ga(n.toString(16).padStart(t*2,"0"))}function Aa(n,t){return Ia(n,t).reverse()}function Ze(n,t,e){let r;if(typeof t=="string")try{r=ga(t)}catch(s){throw new Error(n+" must be hex string or Uint8Array, cause: "+s)}else if(ma(t))r=Uint8Array.from(t);else throw new Error(n+" must be hex string or Uint8Array");const i=r.length;if(typeof e=="number"&&i!==e)throw new Error(n+" of length "+e+" expected, got "+i);return r}const Ps=n=>typeof n=="bigint"&&ba<=n;function b0(n,t,e){return Ps(n)&&Ps(t)&&Ps(e)&&t<=n&&n<e}function _o(n,t,e,r){if(!b0(t,e,r))throw new Error("expected valid "+n+": "+e+" <= n < "+r+", got "+t)}function I0(n){let t;for(t=0;n>ba;n>>=po,t+=1);return t}const ts=n=>(po<<BigInt(n))-po;function A0(n,t,e){if(typeof n!="number"||n<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof e!="function")throw new Error("hmacFn must be a function");const r=f=>new Uint8Array(f),i=f=>Uint8Array.of(f);let s=r(n),o=r(n),c=0;const l=()=>{s.fill(1),o.fill(0),c=0},u=(...f)=>e(o,s,...f),h=(f=r(0))=>{o=u(i(0),f),s=u(),f.length!==0&&(o=u(i(1),f),s=u())},d=()=>{if(c++>=1e3)throw new Error("drbg: tried 1000 values");let f=0;const p=[];for(;f<t;){s=u();const m=s.slice();p.push(m),f+=s.length}return An(...p)};return(f,p)=>{l(),h(f);let m;for(;!(m=p(d()));)h();return l(),m}}function ns(n,t,e={}){if(!n||typeof n!="object")throw new Error("expected valid options object");function r(i,s,o){const c=n[i];if(o&&c===void 0)return;const l=typeof c;if(l!==s||c===null)throw new Error(`param "${i}" is invalid: expected ${s}, got ${l}`)}Object.entries(t).forEach(([i,s])=>r(i,s,!1)),Object.entries(e).forEach(([i,s])=>r(i,s,!0))}function Wc(n){const t=new WeakMap;return(e,...r)=>{const i=t.get(e);if(i!==void 0)return i;const s=n(e,...r);return t.set(e,s),s}}const et=BigInt(0),ze=BigInt(1),Tn=BigInt(2),T0=BigInt(3),od=BigInt(4),ad=BigInt(5),cd=BigInt(8);function dt(n,t){const e=n%t;return e>=et?e:t+e}function wt(n,t,e){let r=n;for(;t-- >et;)r*=r,r%=e;return r}function Hc(n,t){if(n===et)throw new Error("invert: expected non-zero number");if(t<=et)throw new Error("invert: expected positive modulus, got "+t);let e=dt(n,t),r=t,i=et,s=ze;for(;e!==et;){const o=r/e,c=r%e,l=i-s*o;r=e,e=c,i=s,s=l}if(r!==ze)throw new Error("invert: does not exist");return dt(i,t)}function ld(n,t){const e=(n.ORDER+ze)/od,r=n.pow(t,e);if(!n.eql(n.sqr(r),t))throw new Error("Cannot find square root");return r}function P0(n,t){const e=(n.ORDER-ad)/cd,r=n.mul(t,Tn),i=n.pow(r,e),s=n.mul(t,i),o=n.mul(n.mul(s,Tn),i),c=n.mul(s,n.sub(o,n.ONE));if(!n.eql(n.sqr(c),t))throw new Error("Cannot find square root");return c}function O0(n){if(n<BigInt(3))throw new Error("sqrt is not defined for small field");let t=n-ze,e=0;for(;t%Tn===et;)t/=Tn,e++;let r=Tn;const i=ir(n);for(;Gc(i,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(e===1)return ld;let s=i.pow(r,t);const o=(t+ze)/Tn;return function(c,l){if(c.is0(l))return l;if(Gc(c,l)!==1)throw new Error("Cannot find square root");let u=e,h=c.mul(c.ONE,s),d=c.pow(l,t),f=c.pow(l,o);for(;!c.eql(d,c.ONE);){if(c.is0(d))return c.ZERO;let p=1,m=c.sqr(d);for(;!c.eql(m,c.ONE);)if(p++,m=c.sqr(m),p===u)throw new Error("Cannot find square root");const w=ze<<BigInt(u-p-1),_=c.pow(h,w);u=p,h=c.sqr(_),d=c.mul(d,h),f=c.mul(f,_)}return f}}function R0(n){return n%od===T0?ld:n%cd===ad?P0:O0(n)}const L0=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function D0(n){const t={ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"},e=L0.reduce((r,i)=>(r[i]="function",r),t);return ns(n,e),n}function x0(n,t,e){if(e<et)throw new Error("invalid exponent, negatives unsupported");if(e===et)return n.ONE;if(e===ze)return t;let r=n.ONE,i=t;for(;e>et;)e&ze&&(r=n.mul(r,i)),i=n.sqr(i),e>>=ze;return r}function ud(n,t,e=!1){const r=new Array(t.length).fill(e?n.ZERO:void 0),i=t.reduce((o,c,l)=>n.is0(c)?o:(r[l]=o,n.mul(o,c)),n.ONE),s=n.inv(i);return t.reduceRight((o,c,l)=>n.is0(c)?o:(r[l]=n.mul(o,r[l]),n.mul(o,c)),s),r}function Gc(n,t){const e=(n.ORDER-ze)/Tn,r=n.pow(t,e),i=n.eql(r,n.ONE),s=n.eql(r,n.ZERO),o=n.eql(r,n.neg(n.ONE));if(!i&&!s&&!o)throw new Error("invalid Legendre symbol result");return i?1:s?0:-1}function V0(n,t){t!==void 0&&Ft(t);const e=t!==void 0?t:n.toString(2).length,r=Math.ceil(e/8);return{nBitLength:e,nByteLength:r}}function ir(n,t,e=!1,r={}){if(n<=et)throw new Error("invalid field: expected ORDER > 0, got "+n);let i,s;if(typeof t=="object"&&t!=null){if(r.sqrt||e)throw new Error("cannot specify opts in two arguments");const h=t;h.BITS&&(i=h.BITS),h.sqrt&&(s=h.sqrt),typeof h.isLE=="boolean"&&(e=h.isLE)}else typeof t=="number"&&(i=t),r.sqrt&&(s=r.sqrt);const{nBitLength:o,nByteLength:c}=V0(n,i);if(c>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let l;const u=Object.freeze({ORDER:n,isLE:e,BITS:o,BYTES:c,MASK:ts(o),ZERO:et,ONE:ze,create:h=>dt(h,n),isValid:h=>{if(typeof h!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof h);return et<=h&&h<n},is0:h=>h===et,isValidNot0:h=>!u.is0(h)&&u.isValid(h),isOdd:h=>(h&ze)===ze,neg:h=>dt(-h,n),eql:(h,d)=>h===d,sqr:h=>dt(h*h,n),add:(h,d)=>dt(h+d,n),sub:(h,d)=>dt(h-d,n),mul:(h,d)=>dt(h*d,n),pow:(h,d)=>x0(u,h,d),div:(h,d)=>dt(h*Hc(d,n),n),sqrN:h=>h*h,addN:(h,d)=>h+d,subN:(h,d)=>h-d,mulN:(h,d)=>h*d,inv:h=>Hc(h,n),sqrt:s||(h=>(l||(l=R0(n)),l(u,h))),toBytes:h=>e?Aa(h,c):Ia(h,c),fromBytes:h=>{if(h.length!==c)throw new Error("Field.fromBytes: expected "+c+" bytes, got "+h.length);return e?Ui(h):es(h)},invertBatch:h=>ud(u,h),cmov:(h,d,f)=>f?d:h});return Object.freeze(u)}function hd(n){if(typeof n!="bigint")throw new Error("field order must be bigint");const t=n.toString(2).length;return Math.ceil(t/8)}function dd(n){const t=hd(n);return t+Math.ceil(t/2)}function S0(n,t,e=!1){const r=n.length,i=hd(t),s=dd(t);if(r<16||r<s||r>1024)throw new Error("expected "+s+"-1024 bytes of input, got "+r);const o=e?Ui(n):es(n),c=dt(o,t-ze)+ze;return e?Aa(c,i):Ia(c,i)}const Jn=BigInt(0),Pn=BigInt(1);function Tr(n,t){const e=t.negate();return n?e:t}function C0(n,t,e){const r=s=>s.pz,i=ud(n.Fp,e.map(r));return e.map((s,o)=>s.toAffine(i[o])).map(n.fromAffine)}function fd(n,t){if(!Number.isSafeInteger(n)||n<=0||n>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+n)}function Os(n,t){fd(n,t);const e=Math.ceil(t/n)+1,r=2**(n-1),i=2**n,s=ts(n),o=BigInt(n);return{windows:e,windowSize:r,mask:s,maxNumber:i,shiftBy:o}}function Zc(n,t,e){const{windowSize:r,mask:i,maxNumber:s,shiftBy:o}=e;let c=Number(n&i),l=n>>o;c>r&&(c-=s,l+=Pn);const u=t*r,h=u+Math.abs(c)-1,d=c===0,f=c<0,p=t%2!==0;return{nextN:l,offset:h,isZero:d,isNeg:f,isNegF:p,offsetF:u}}function $0(n,t){if(!Array.isArray(n))throw new Error("array expected");n.forEach((e,r)=>{if(!(e instanceof t))throw new Error("invalid point at index "+r)})}function k0(n,t){if(!Array.isArray(n))throw new Error("array of scalars expected");n.forEach((e,r)=>{if(!t.isValid(e))throw new Error("invalid scalar at index "+r)})}const Rs=new WeakMap,pd=new WeakMap;function Ls(n){return pd.get(n)||1}function Yc(n){if(n!==Jn)throw new Error("invalid wNAF")}function U0(n,t){return{constTimeNegate:Tr,hasPrecomputes(e){return Ls(e)!==1},unsafeLadder(e,r,i=n.ZERO){let s=e;for(;r>Jn;)r&Pn&&(i=i.add(s)),s=s.double(),r>>=Pn;return i},precomputeWindow(e,r){const{windows:i,windowSize:s}=Os(r,t),o=[];let c=e,l=c;for(let u=0;u<i;u++){l=c,o.push(l);for(let h=1;h<s;h++)l=l.add(c),o.push(l);c=l.double()}return o},wNAF(e,r,i){let s=n.ZERO,o=n.BASE;const c=Os(e,t);for(let l=0;l<c.windows;l++){const{nextN:u,offset:h,isZero:d,isNeg:f,isNegF:p,offsetF:m}=Zc(i,l,c);i=u,d?o=o.add(Tr(p,r[m])):s=s.add(Tr(f,r[h]))}return Yc(i),{p:s,f:o}},wNAFUnsafe(e,r,i,s=n.ZERO){const o=Os(e,t);for(let c=0;c<o.windows&&i!==Jn;c++){const{nextN:l,offset:u,isZero:h,isNeg:d}=Zc(i,c,o);if(i=l,!h){const f=r[u];s=s.add(d?f.negate():f)}}return Yc(i),s},getPrecomputes(e,r,i){let s=Rs.get(r);return s||(s=this.precomputeWindow(r,e),e!==1&&(typeof i=="function"&&(s=i(s)),Rs.set(r,s))),s},wNAFCached(e,r,i){const s=Ls(e);return this.wNAF(s,this.getPrecomputes(s,e,i),r)},wNAFCachedUnsafe(e,r,i,s){const o=Ls(e);return o===1?this.unsafeLadder(e,r,s):this.wNAFUnsafe(o,this.getPrecomputes(o,e,i),r,s)},setWindowSize(e,r){fd(r,t),pd.set(e,r),Rs.delete(e)}}}function N0(n,t,e,r){let i=t,s=n.ZERO,o=n.ZERO;for(;e>Jn||r>Jn;)e&Pn&&(s=s.add(i)),r&Pn&&(o=o.add(i)),i=i.double(),e>>=Pn,r>>=Pn;return{p1:s,p2:o}}function B0(n,t,e,r){$0(e,n),k0(r,t);const i=e.length,s=r.length;if(i!==s)throw new Error("arrays of points and scalars must have equal length");const o=n.ZERO,c=I0(BigInt(i));let l=1;c>12?l=c-3:c>4?l=c-2:c>0&&(l=2);const u=ts(l),h=new Array(Number(u)+1).fill(o),d=Math.floor((t.BITS-1)/l)*l;let f=o;for(let p=d;p>=0;p-=l){h.fill(o);for(let w=0;w<s;w++){const _=r[w],E=Number(_>>BigInt(p)&u);h[E]=h[E].add(e[w])}let m=o;for(let w=h.length-1,_=o;w>0;w--)_=_.add(h[w]),m=m.add(_);if(f=f.add(m),p!==0)for(let w=0;w<l;w++)f=f.double()}return f}function Jc(n,t){if(t){if(t.ORDER!==n)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return D0(t),t}else return ir(n)}function M0(n,t,e={}){if(!t||typeof t!="object")throw new Error(`expected valid ${n} CURVE object`);for(const o of["p","n","h"]){const c=t[o];if(!(typeof c=="bigint"&&c>Jn))throw new Error(`CURVE.${o} must be positive bigint`)}const r=Jc(t.p,e.Fp),i=Jc(t.n,e.Fn),s=["Gx","Gy","a","b"];for(const o of s)if(!r.isValid(t[o]))throw new Error(`CURVE.${o} must be valid field element of CURVE.Fp`);return{Fp:r,Fn:i}}BigInt(0),BigInt(1),BigInt(2),BigInt(8);const hr=BigInt(0),Bn=BigInt(1),oi=BigInt(2);function q0(n){return ns(n,{adjustScalarBytes:"function",powPminus2:"function"}),Object.freeze({...n})}function j0(n){const t=q0(n),{P:e,type:r,adjustScalarBytes:i,powPminus2:s,randomBytes:o}=t,c=r==="x25519";if(!c&&r!=="x448")throw new Error("invalid type");const l=o||rr,u=c?255:448,h=c?32:56,d=BigInt(c?9:5),f=BigInt(c?121665:39081),p=c?oi**BigInt(254):oi**BigInt(447),m=c?BigInt(8)*oi**BigInt(251)-Bn:BigInt(4)*oi**BigInt(445)-Bn,w=p+m+Bn,_=y=>dt(y,e),E=v(d);function v(y){return Aa(_(y),h)}function g(y){const L=Ze("u coordinate",y,h);return c&&(L[31]&=127),_(Ui(L))}function I(y){return Ui(i(Ze("scalar",y,h)))}function b(y,L){const T=S(g(L),I(y));if(T===hr)throw new Error("invalid private or public key received");return v(T)}function D(y){return b(y,E)}function x(y,L,T){const O=_(y*(L-T));return L=_(L-O),T=_(T+O),{x_2:L,x_3:T}}function S(y,L){_o("u",y,hr,e),_o("scalar",L,p,w);const T=L,O=y;let C=Bn,A=hr,P=y,R=Bn,V=hr;for(let $=BigInt(u-1);$>=hr;$--){const M=T>>$&Bn;V^=M,{x_2:C,x_3:P}=x(V,C,P),{x_2:A,x_3:R}=x(V,A,R),V=M;const N=C+A,z=_(N*N),F=C-A,K=_(F*F),W=z-K,G=P+R,he=P-R,re=_(he*N),te=_(G*F),Ve=re+te,je=re-te;P=_(Ve*Ve),R=_(O*_(je*je)),C=_(z*K),A=_(W*(z+_(f*W)))}({x_2:C,x_3:P}=x(V,C,P)),{x_2:A,x_3:R}=x(V,A,R);const k=s(A);return _(C*k)}return{scalarMult:b,scalarMultBase:D,getSharedSecret:(y,L)=>b(y,L),getPublicKey:y=>D(y),utils:{randomPrivateKey:()=>l(h)},GuBytes:E.slice()}}BigInt(0);const z0=BigInt(1),Qc=BigInt(2),K0=BigInt(3),F0=BigInt(5),W0=BigInt(8),_d={p:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:W0,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function H0(n){const t=BigInt(10),e=BigInt(20),r=BigInt(40),i=BigInt(80),s=_d.p,o=n*n%s*n%s,c=wt(o,Qc,s)*o%s,l=wt(c,z0,s)*n%s,u=wt(l,F0,s)*l%s,h=wt(u,t,s)*u%s,d=wt(h,e,s)*h%s,f=wt(d,r,s)*d%s,p=wt(f,i,s)*f%s,m=wt(p,i,s)*f%s,w=wt(m,t,s)*u%s;return{pow_p_5_8:wt(w,Qc,s)*n%s,b2:o}}function G0(n){return n[0]&=248,n[31]&=127,n[31]|=64,n}const mo=(()=>{const n=_d.p;return j0({P:n,type:"x25519",powPminus2:t=>{const{pow_p_5_8:e,b2:r}=H0(t);return dt(wt(e,K0,n)*r,n)},adjustScalarBytes:G0})})();function Xc(n){n.lowS!==void 0&&ki("lowS",n.lowS),n.prehash!==void 0&&ki("prehash",n.prehash)}class Z0 extends Error{constructor(t=""){super(t)}}const qt={Err:Z0,_tlv:{encode:(n,t)=>{const{Err:e}=qt;if(n<0||n>256)throw new e("tlv.encode: wrong tag");if(t.length&1)throw new e("tlv.encode: unpadded data");const r=t.length/2,i=si(r);if(i.length/2&128)throw new e("tlv.encode: long form length too big");const s=r>127?si(i.length/2|128):"";return si(n)+s+i+t},decode(n,t){const{Err:e}=qt;let r=0;if(n<0||n>256)throw new e("tlv.encode: wrong tag");if(t.length<2||t[r++]!==n)throw new e("tlv.decode: wrong tlv");const i=t[r++],s=!!(i&128);let o=0;if(!s)o=i;else{const l=i&127;if(!l)throw new e("tlv.decode(long): indefinite length not supported");if(l>4)throw new e("tlv.decode(long): byte length is too big");const u=t.subarray(r,r+l);if(u.length!==l)throw new e("tlv.decode: length bytes not complete");if(u[0]===0)throw new e("tlv.decode(long): zero leftmost byte");for(const h of u)o=o<<8|h;if(r+=l,o<128)throw new e("tlv.decode(long): not minimal encoding")}const c=t.subarray(r,r+o);if(c.length!==o)throw new e("tlv.decode: wrong value length");return{v:c,l:t.subarray(r+o)}}},_int:{encode(n){const{Err:t}=qt;if(n<Pr)throw new t("integer: negative integers are not allowed");let e=si(n);if(Number.parseInt(e[0],16)&8&&(e="00"+e),e.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return e},decode(n){const{Err:t}=qt;if(n[0]&128)throw new t("invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return es(n)}},toSig(n){const{Err:t,_int:e,_tlv:r}=qt,i=Ze("signature",n),{v:s,l:o}=r.decode(48,i);if(o.length)throw new t("invalid signature: left bytes after parsing");const{v:c,l}=r.decode(2,s),{v:u,l:h}=r.decode(2,l);if(h.length)throw new t("invalid signature: left bytes after parsing");return{r:e.decode(c),s:e.decode(u)}},hexFromSig(n){const{_tlv:t,_int:e}=qt,r=t.encode(2,e.encode(n.r)),i=t.encode(2,e.encode(n.s)),s=r+i;return t.encode(48,s)}},Pr=BigInt(0),Or=BigInt(1),Y0=BigInt(2),ai=BigInt(3),J0=BigInt(4);function Q0(n,t,e){function r(i){const s=n.sqr(i),o=n.mul(s,i);return n.add(n.add(o,n.mul(i,t)),e)}return r}function md(n,t,e){const{BYTES:r}=n;function i(s){let o;if(typeof s=="bigint")o=s;else{let c=Ze("private key",s);if(t){if(!t.includes(c.length*2))throw new Error("invalid private key");const l=new Uint8Array(r);l.set(c,l.length-c.length),c=l}try{o=n.fromBytes(c)}catch{throw new Error(`invalid private key: expected ui8a of size ${r}, got ${typeof s}`)}}if(e&&(o=n.create(o)),!n.isValidNot0(o))throw new Error("invalid private key: out of range [1..N-1]");return o}return i}function X0(n,t={}){const{Fp:e,Fn:r}=M0("weierstrass",n,t),{h:i,n:s}=n;ns(t,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});const{endo:o}=t;if(o&&(!e.is0(n.a)||typeof o.beta!="bigint"||typeof o.splitScalar!="function"))throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function');function c(){if(!e.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}function l(S,y,L){const{x:T,y:O}=y.toAffine(),C=e.toBytes(T);if(ki("isCompressed",L),L){c();const A=!e.isOdd(O);return An(wd(A),C)}else return An(Uint8Array.of(4),C,e.toBytes(O))}function u(S){pt(S);const y=e.BYTES,L=y+1,T=2*y+1,O=S.length,C=S[0],A=S.subarray(1);if(O===L&&(C===2||C===3)){const P=e.fromBytes(A);if(!e.isValid(P))throw new Error("bad point: is not on curve, wrong x");const R=f(P);let V;try{V=e.sqrt(R)}catch($){const M=$ instanceof Error?": "+$.message:"";throw new Error("bad point: is not on curve, sqrt error"+M)}c();const k=e.isOdd(V);return(C&1)===1!==k&&(V=e.neg(V)),{x:P,y:V}}else if(O===T&&C===4){const P=e.fromBytes(A.subarray(y*0,y*1)),R=e.fromBytes(A.subarray(y*1,y*2));if(!p(P,R))throw new Error("bad point: is not on curve");return{x:P,y:R}}else throw new Error(`bad point: got length ${O}, expected compressed=${L} or uncompressed=${T}`)}const h=t.toBytes||l,d=t.fromBytes||u,f=Q0(e,n.a,n.b);function p(S,y){const L=e.sqr(y),T=f(S);return e.eql(L,T)}if(!p(n.Gx,n.Gy))throw new Error("bad curve params: generator point");const m=e.mul(e.pow(n.a,ai),J0),w=e.mul(e.sqr(n.b),BigInt(27));if(e.is0(e.add(m,w)))throw new Error("bad curve params: a or b");function _(S,y,L=!1){if(!e.isValid(y)||L&&e.is0(y))throw new Error(`bad point coordinate ${S}`);return y}function E(S){if(!(S instanceof b))throw new Error("ProjectivePoint expected")}const v=Wc((S,y)=>{const{px:L,py:T,pz:O}=S;if(e.eql(O,e.ONE))return{x:L,y:T};const C=S.is0();y==null&&(y=C?e.ONE:e.inv(O));const A=e.mul(L,y),P=e.mul(T,y),R=e.mul(O,y);if(C)return{x:e.ZERO,y:e.ZERO};if(!e.eql(R,e.ONE))throw new Error("invZ was invalid");return{x:A,y:P}}),g=Wc(S=>{if(S.is0()){if(t.allowInfinityPoint&&!e.is0(S.py))return;throw new Error("bad point: ZERO")}const{x:y,y:L}=S.toAffine();if(!e.isValid(y)||!e.isValid(L))throw new Error("bad point: x or y not field elements");if(!p(y,L))throw new Error("bad point: equation left != right");if(!S.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});function I(S,y,L,T,O){return L=new b(e.mul(L.px,S),L.py,L.pz),y=Tr(T,y),L=Tr(O,L),y.add(L)}class b{constructor(y,L,T){this.px=_("x",y),this.py=_("y",L,!0),this.pz=_("z",T),Object.freeze(this)}static fromAffine(y){const{x:L,y:T}=y||{};if(!y||!e.isValid(L)||!e.isValid(T))throw new Error("invalid affine point");if(y instanceof b)throw new Error("projective point not allowed");return e.is0(L)&&e.is0(T)?b.ZERO:new b(L,T,e.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(y){return C0(b,"pz",y)}static fromBytes(y){return pt(y),b.fromHex(y)}static fromHex(y){const L=b.fromAffine(d(Ze("pointHex",y)));return L.assertValidity(),L}static fromPrivateKey(y){const L=md(r,t.allowedPrivateKeyLengths,t.wrapPrivateKey);return b.BASE.multiply(L(y))}static msm(y,L){return B0(b,r,y,L)}precompute(y=8,L=!0){return x.setWindowSize(this,y),L||this.multiply(ai),this}_setWindowSize(y){this.precompute(y)}assertValidity(){g(this)}hasEvenY(){const{y}=this.toAffine();if(!e.isOdd)throw new Error("Field doesn't support isOdd");return!e.isOdd(y)}equals(y){E(y);const{px:L,py:T,pz:O}=this,{px:C,py:A,pz:P}=y,R=e.eql(e.mul(L,P),e.mul(C,O)),V=e.eql(e.mul(T,P),e.mul(A,O));return R&&V}negate(){return new b(this.px,e.neg(this.py),this.pz)}double(){const{a:y,b:L}=n,T=e.mul(L,ai),{px:O,py:C,pz:A}=this;let P=e.ZERO,R=e.ZERO,V=e.ZERO,k=e.mul(O,O),$=e.mul(C,C),M=e.mul(A,A),N=e.mul(O,C);return N=e.add(N,N),V=e.mul(O,A),V=e.add(V,V),P=e.mul(y,V),R=e.mul(T,M),R=e.add(P,R),P=e.sub($,R),R=e.add($,R),R=e.mul(P,R),P=e.mul(N,P),V=e.mul(T,V),M=e.mul(y,M),N=e.sub(k,M),N=e.mul(y,N),N=e.add(N,V),V=e.add(k,k),k=e.add(V,k),k=e.add(k,M),k=e.mul(k,N),R=e.add(R,k),M=e.mul(C,A),M=e.add(M,M),k=e.mul(M,N),P=e.sub(P,k),V=e.mul(M,$),V=e.add(V,V),V=e.add(V,V),new b(P,R,V)}add(y){E(y);const{px:L,py:T,pz:O}=this,{px:C,py:A,pz:P}=y;let R=e.ZERO,V=e.ZERO,k=e.ZERO;const $=n.a,M=e.mul(n.b,ai);let N=e.mul(L,C),z=e.mul(T,A),F=e.mul(O,P),K=e.add(L,T),W=e.add(C,A);K=e.mul(K,W),W=e.add(N,z),K=e.sub(K,W),W=e.add(L,O);let G=e.add(C,P);return W=e.mul(W,G),G=e.add(N,F),W=e.sub(W,G),G=e.add(T,O),R=e.add(A,P),G=e.mul(G,R),R=e.add(z,F),G=e.sub(G,R),k=e.mul($,W),R=e.mul(M,F),k=e.add(R,k),R=e.sub(z,k),k=e.add(z,k),V=e.mul(R,k),z=e.add(N,N),z=e.add(z,N),F=e.mul($,F),W=e.mul(M,W),z=e.add(z,F),F=e.sub(N,F),F=e.mul($,F),W=e.add(W,F),N=e.mul(z,W),V=e.add(V,N),N=e.mul(G,W),R=e.mul(K,R),R=e.sub(R,N),N=e.mul(K,z),k=e.mul(G,k),k=e.add(k,N),new b(R,V,k)}subtract(y){return this.add(y.negate())}is0(){return this.equals(b.ZERO)}multiply(y){const{endo:L}=t;if(!r.isValidNot0(y))throw new Error("invalid scalar: out of range");let T,O;const C=A=>x.wNAFCached(this,A,b.normalizeZ);if(L){const{k1neg:A,k1:P,k2neg:R,k2:V}=L.splitScalar(y),{p:k,f:$}=C(P),{p:M,f:N}=C(V);O=$.add(N),T=I(L.beta,k,M,A,R)}else{const{p:A,f:P}=C(y);T=A,O=P}return b.normalizeZ([T,O])[0]}multiplyUnsafe(y){const{endo:L}=t,T=this;if(!r.isValid(y))throw new Error("invalid scalar: out of range");if(y===Pr||T.is0())return b.ZERO;if(y===Or)return T;if(x.hasPrecomputes(this))return this.multiply(y);if(L){const{k1neg:O,k1:C,k2neg:A,k2:P}=L.splitScalar(y),{p1:R,p2:V}=N0(b,T,C,P);return I(L.beta,R,V,O,A)}else return x.wNAFCachedUnsafe(T,y)}multiplyAndAddUnsafe(y,L,T){const O=this.multiplyUnsafe(L).add(y.multiplyUnsafe(T));return O.is0()?void 0:O}toAffine(y){return v(this,y)}isTorsionFree(){const{isTorsionFree:y}=t;return i===Or?!0:y?y(b,this):x.wNAFCachedUnsafe(this,s).is0()}clearCofactor(){const{clearCofactor:y}=t;return i===Or?this:y?y(b,this):this.multiplyUnsafe(i)}toBytes(y=!0){return ki("isCompressed",y),this.assertValidity(),h(b,this,y)}toRawBytes(y=!0){return this.toBytes(y)}toHex(y=!0){return kr(this.toBytes(y))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}b.BASE=new b(n.Gx,n.Gy,e.ONE),b.ZERO=new b(e.ZERO,e.ONE,e.ZERO),b.Fp=e,b.Fn=r;const D=r.BITS,x=U0(b,t.endo?Math.ceil(D/2):D);return b}function wd(n){return Uint8Array.of(n?2:3)}function eE(n,t,e={}){ns(t,{hash:"function"},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const r=t.randomBytes||rr,i=t.hmac||((T,...O)=>Qi(t.hash,T,An(...O))),{Fp:s,Fn:o}=n,{ORDER:c,BITS:l}=o;function u(T){const O=c>>Or;return T>O}function h(T){return u(T)?o.neg(T):T}function d(T,O){if(!o.isValidNot0(O))throw new Error(`invalid signature ${T}: out of range 1..CURVE.n`)}class f{constructor(O,C,A){d("r",O),d("s",C),this.r=O,this.s=C,A!=null&&(this.recovery=A),Object.freeze(this)}static fromCompact(O){const C=o.BYTES,A=Ze("compactSignature",O,C*2);return new f(o.fromBytes(A.subarray(0,C)),o.fromBytes(A.subarray(C,C*2)))}static fromDER(O){const{r:C,s:A}=qt.toSig(Ze("DER",O));return new f(C,A)}assertValidity(){}addRecoveryBit(O){return new f(this.r,this.s,O)}recoverPublicKey(O){const C=s.ORDER,{r:A,s:P,recovery:R}=this;if(R==null||![0,1,2,3].includes(R))throw new Error("recovery id invalid");if(c*Y0<C&&R>1)throw new Error("recovery id is ambiguous for h>1 curve");const V=R===2||R===3?A+c:A;if(!s.isValid(V))throw new Error("recovery id 2 or 3 invalid");const k=s.toBytes(V),$=n.fromHex(An(wd((R&1)===0),k)),M=o.inv(V),N=g(Ze("msgHash",O)),z=o.create(-N*M),F=o.create(P*M),K=n.BASE.multiplyUnsafe(z).add($.multiplyUnsafe(F));if(K.is0())throw new Error("point at infinify");return K.assertValidity(),K}hasHighS(){return u(this.s)}normalizeS(){return this.hasHighS()?new f(this.r,o.neg(this.s),this.recovery):this}toBytes(O){if(O==="compact")return An(o.toBytes(this.r),o.toBytes(this.s));if(O==="der")return ga(qt.hexFromSig(this));throw new Error("invalid format")}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return kr(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return kr(this.toBytes("compact"))}}const p=md(o,e.allowedPrivateKeyLengths,e.wrapPrivateKey),m={isValidPrivateKey(T){try{return p(T),!0}catch{return!1}},normPrivateKeyToScalar:p,randomPrivateKey:()=>{const T=c;return S0(r(dd(T)),T)},precompute(T=8,O=n.BASE){return O.precompute(T,!1)}};function w(T,O=!0){return n.fromPrivateKey(T).toBytes(O)}function _(T){if(typeof T=="bigint")return!1;if(T instanceof n)return!0;const O=Ze("key",T).length,C=s.BYTES,A=C+1,P=2*C+1;if(!(e.allowedPrivateKeyLengths||o.BYTES===A))return O===A||O===P}function E(T,O,C=!0){if(_(T)===!0)throw new Error("first arg must be private key");if(_(O)===!1)throw new Error("second arg must be public key");return n.fromHex(O).multiply(p(T)).toBytes(C)}const v=t.bits2int||function(T){if(T.length>8192)throw new Error("input is too large");const O=es(T),C=T.length*8-l;return C>0?O>>BigInt(C):O},g=t.bits2int_modN||function(T){return o.create(v(T))},I=ts(l);function b(T){return _o("num < 2^"+l,T,Pr,I),o.toBytes(T)}function D(T,O,C=x){if(["recovered","canonical"].some(K=>K in C))throw new Error("sign() legacy options not supported");const{hash:A}=t;let{lowS:P,prehash:R,extraEntropy:V}=C;P==null&&(P=!0),T=Ze("msgHash",T),Xc(C),R&&(T=Ze("prehashed msgHash",A(T)));const k=g(T),$=p(O),M=[b($),b(k)];if(V!=null&&V!==!1){const K=V===!0?r(s.BYTES):V;M.push(Ze("extraEntropy",K))}const N=An(...M),z=k;function F(K){const W=v(K);if(!o.isValidNot0(W))return;const G=o.inv(W),he=n.BASE.multiply(W).toAffine(),re=o.create(he.x);if(re===Pr)return;const te=o.create(G*o.create(z+re*$));if(te===Pr)return;let Ve=(he.x===re?0:2)|Number(he.y&Or),je=te;return P&&u(te)&&(je=h(te),Ve^=1),new f(re,je,Ve)}return{seed:N,k2sig:F}}const x={lowS:t.lowS,prehash:!1},S={lowS:t.lowS,prehash:!1};function y(T,O,C=x){const{seed:A,k2sig:P}=D(T,O,C);return A0(t.hash.outputLen,o.BYTES,i)(A,P)}n.BASE.precompute(8);function L(T,O,C,A=S){const P=T;O=Ze("msgHash",O),C=Ze("publicKey",C),Xc(A);const{lowS:R,prehash:V,format:k}=A;if("strict"in A)throw new Error("options.strict was renamed to lowS");if(k!==void 0&&!["compact","der","js"].includes(k))throw new Error('format must be "compact", "der" or "js"');const $=typeof P=="string"||ma(P),M=!$&&!k&&typeof P=="object"&&P!==null&&typeof P.r=="bigint"&&typeof P.s=="bigint";if(!$&&!M)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let N,z;try{if(M)if(k===void 0||k==="js")N=new f(P.r,P.s);else throw new Error("invalid format");if($){try{k!=="compact"&&(N=f.fromDER(P))}catch(Ve){if(!(Ve instanceof qt.Err))throw Ve}!N&&k!=="der"&&(N=f.fromCompact(P))}z=n.fromHex(C)}catch{return!1}if(!N||R&&N.hasHighS())return!1;V&&(O=t.hash(O));const{r:F,s:K}=N,W=g(O),G=o.inv(K),he=o.create(W*G),re=o.create(F*G),te=n.BASE.multiplyUnsafe(he).add(z.multiplyUnsafe(re));return te.is0()?!1:o.create(te.x)===F}return Object.freeze({getPublicKey:w,getSharedSecret:E,sign:y,verify:L,utils:m,Point:n,Signature:f})}function tE(n){const t={a:n.a,b:n.b,p:n.Fp.ORDER,n:n.n,h:n.h,Gx:n.Gx,Gy:n.Gy},e=n.Fp,r=ir(t.n,n.nBitLength),i={Fp:e,Fn:r,allowedPrivateKeyLengths:n.allowedPrivateKeyLengths,allowInfinityPoint:n.allowInfinityPoint,endo:n.endo,wrapPrivateKey:n.wrapPrivateKey,isTorsionFree:n.isTorsionFree,clearCofactor:n.clearCofactor,fromBytes:n.fromBytes,toBytes:n.toBytes};return{CURVE:t,curveOpts:i}}function nE(n){const{CURVE:t,curveOpts:e}=tE(n),r={hash:n.hash,hmac:n.hmac,randomBytes:n.randomBytes,lowS:n.lowS,bits2int:n.bits2int,bits2int_modN:n.bits2int_modN};return{CURVE:t,curveOpts:e,ecdsaOpts:r}}function rE(n,t){return Object.assign({},t,{ProjectivePoint:t.Point,CURVE:n})}function iE(n){const{CURVE:t,curveOpts:e,ecdsaOpts:r}=nE(n),i=X0(t,e),s=eE(i,r,e);return rE(n,s)}function wo(n,t){const e=r=>iE({...n,hash:r});return{...e(t),create:e}}const yd={p:BigInt("0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff"),n:BigInt("0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551"),h:BigInt(1),a:BigInt("0xffffffff00000001000000000000000000000000fffffffffffffffffffffffc"),b:BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b"),Gx:BigInt("0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296"),Gy:BigInt("0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5")},gd={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff"),n:BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973"),h:BigInt(1),a:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000fffffffc"),b:BigInt("0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef"),Gx:BigInt("0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7"),Gy:BigInt("0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f")},Ed={p:BigInt("0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),n:BigInt("0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409"),h:BigInt(1),a:BigInt("0x1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc"),b:BigInt("0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00"),Gx:BigInt("0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66"),Gy:BigInt("0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650")},sE=ir(yd.p),oE=ir(gd.p),aE=ir(Ed.p),cE=wo({...yd,Fp:sE,lowS:!1},Ji);wo({...gd,Fp:oE,lowS:!1},_g),wo({...Ed,Fp:aE,lowS:!1,allowedPrivateKeyLengths:[130,131,132]},pg);const lE=cE,vd="base10",Ke="base16",Qe="base64pad",hn="base64url",Fr="utf8",bd=0,Kt=1,Wr=2,uE=0,el=1,Rr=12,Ta=32;function hE(){const n=mo.utils.randomPrivateKey(),t=mo.getPublicKey(n);return{privateKey:tt(n,Ke),publicKey:tt(t,Ke)}}function yo(){const n=rr(Ta);return tt(n,Ke)}function dE(n,t){const e=mo.getSharedSecret(ft(n,Ke),ft(t,Ke)),r=v0(Xi,e,void 0,void 0,Ta);return tt(r,Ke)}function wi(n){const t=Xi(ft(n,Ke));return tt(t,Ke)}function ht(n){const t=Xi(ft(n,Fr));return tt(t,Ke)}function Id(n){return ft(`${n}`,vd)}function xn(n){return Number(tt(n,vd))}function Ad(n){return n.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Td(n){const t=n.replace(/-/g,"+").replace(/_/g,"/"),e=(4-t.length%4)%4;return t+"=".repeat(e)}function fE(n){const t=Id(typeof n.type<"u"?n.type:bd);if(xn(t)===Kt&&typeof n.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const e=typeof n.senderPublicKey<"u"?ft(n.senderPublicKey,Ke):void 0,r=typeof n.iv<"u"?ft(n.iv,Ke):rr(Rr),i=ft(n.symKey,Ke),s=rd(i,r).encrypt(ft(n.message,Fr)),o=Pd({type:t,sealed:s,iv:r,senderPublicKey:e});return n.encoding===hn?Ad(o):o}function pE(n){const t=ft(n.symKey,Ke),{sealed:e,iv:r}=Nr({encoded:n.encoded,encoding:n.encoding}),i=rd(t,r).decrypt(e);if(i===null)throw new Error("Failed to decrypt");return tt(i,Fr)}function _E(n,t){const e=Id(Wr),r=rr(Rr),i=ft(n,Fr),s=Pd({type:e,sealed:i,iv:r});return t===hn?Ad(s):s}function mE(n,t){const{sealed:e}=Nr({encoded:n,encoding:t});return tt(e,Fr)}function Pd(n){if(xn(n.type)===Wr)return tt(Ar([n.type,n.sealed]),Qe);if(xn(n.type)===Kt){if(typeof n.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return tt(Ar([n.type,n.senderPublicKey,n.iv,n.sealed]),Qe)}return tt(Ar([n.type,n.iv,n.sealed]),Qe)}function Nr(n){const t=(n.encoding||Qe)===hn?Td(n.encoded):n.encoded,e=ft(t,Qe),r=e.slice(uE,el),i=el;if(xn(r)===Kt){const l=i+Ta,u=l+Rr,h=e.slice(i,l),d=e.slice(l,u),f=e.slice(u);return{type:r,sealed:f,iv:d,senderPublicKey:h}}if(xn(r)===Wr){const l=e.slice(i),u=rr(Rr);return{type:r,sealed:l,iv:u}}const s=i+Rr,o=e.slice(i,s),c=e.slice(s);return{type:r,sealed:c,iv:o}}function wE(n,t){const e=Nr({encoded:n,encoding:t?.encoding});return Od({type:xn(e.type),senderPublicKey:typeof e.senderPublicKey<"u"?tt(e.senderPublicKey,Ke):void 0,receiverPublicKey:t?.receiverPublicKey})}function Od(n){const t=n?.type||bd;if(t===Kt){if(typeof n?.senderPublicKey>"u")throw new Error("missing sender public key");if(typeof n?.receiverPublicKey>"u")throw new Error("missing receiver public key")}return{type:t,senderPublicKey:n?.senderPublicKey,receiverPublicKey:n?.receiverPublicKey}}function tl(n){return n.type===Kt&&typeof n.senderPublicKey=="string"&&typeof n.receiverPublicKey=="string"}function nl(n){return n.type===Wr}function yE(n){const t=Buffer.from(n.x,"base64"),e=Buffer.from(n.y,"base64");return Ar([new Uint8Array([4]),t,e])}function gE(n,t){const[e,r,i]=n.split("."),s=Buffer.from(Td(i),"base64");if(s.length!==64)throw new Error("Invalid signature length");const o=s.slice(0,32),c=s.slice(32,64),l=`${e}.${r}`,u=Xi(l),h=yE(t);if(!lE.verify(Ar([o,c]),u,h))throw new Error("Invalid signature");return Fs(n).payload}const EE="irn";function Ni(n){return n?.relay||{protocol:EE}}function zn(n){const t=Qf[n];if(typeof t>"u")throw new Error(`Relay Protocol not supported: ${n}`);return t}function vE(n,t="-"){const e={},r="relay"+t;return Object.keys(n).forEach(i=>{if(i.startsWith(r)){const s=i.replace(r,""),o=n[i];e[s]=o}}),e}function rl(n){if(!n.includes("wc:")){const u=Nh(n);u!=null&&u.includes("wc:")&&(n=u)}n=n.includes("wc://")?n.replace("wc://",""):n,n=n.includes("wc:")?n.replace("wc:",""):n;const t=n.indexOf(":"),e=n.indexOf("?")!==-1?n.indexOf("?"):void 0,r=n.substring(0,t),i=n.substring(t+1,e).split("@"),s=typeof e<"u"?n.substring(e):"",o=new URLSearchParams(s),c={};o.forEach((u,h)=>{c[h]=u});const l=typeof c.methods=="string"?c.methods.split(","):void 0;return{protocol:r,topic:bE(i[0]),version:parseInt(i[1],10),symKey:c.symKey,relay:vE(c),methods:l,expiryTimestamp:c.expiryTimestamp?parseInt(c.expiryTimestamp,10):void 0}}function bE(n){return n.startsWith("//")?n.substring(2):n}function IE(n,t="-"){const e="relay",r={};return Object.keys(n).forEach(i=>{const s=i,o=e+t+s;n[s]&&(r[o]=n[s])}),r}function il(n){const t=new URLSearchParams,e=IE(n.relay);Object.keys(e).sort().forEach(i=>{t.set(i,e[i])}),t.set("symKey",n.symKey),n.expiryTimestamp&&t.set("expiryTimestamp",n.expiryTimestamp.toString()),n.methods&&t.set("methods",n.methods.join(","));const r=t.toString();return`${n.protocol}:${n.topic}@${n.version}?${r}`}function ci(n,t,e){return`${n}?wc_ev=${e}&topic=${t}`}var AE=Object.defineProperty,TE=Object.defineProperties,PE=Object.getOwnPropertyDescriptors,sl=Object.getOwnPropertySymbols,OE=Object.prototype.hasOwnProperty,RE=Object.prototype.propertyIsEnumerable,ol=(n,t,e)=>t in n?AE(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,LE=(n,t)=>{for(var e in t||(t={}))OE.call(t,e)&&ol(n,e,t[e]);if(sl)for(var e of sl(t))RE.call(t,e)&&ol(n,e,t[e]);return n},DE=(n,t)=>TE(n,PE(t));function sr(n){const t=[];return n.forEach(e=>{const[r,i]=e.split(":");t.push(`${r}:${i}`)}),t}function xE(n){const t=[];return Object.values(n).forEach(e=>{t.push(...sr(e.accounts))}),t}function VE(n,t){const e=[];return Object.values(n).forEach(r=>{sr(r.accounts).includes(t)&&e.push(...r.methods)}),e}function SE(n,t){const e=[];return Object.values(n).forEach(r=>{sr(r.accounts).includes(t)&&e.push(...r.events)}),e}function Rd(n){return n.includes(":")}function CE(n){return Rd(n)?n.split(":")[0]:n}function al(n){var t,e,r;const i={};if(!Br(n))return i;for(const[s,o]of Object.entries(n)){const c=Rd(s)?[s]:o.chains,l=o.methods||[],u=o.events||[],h=CE(s);i[h]=DE(LE({},i[h]),{chains:Rn(c,(t=i[h])==null?void 0:t.chains),methods:Rn(l,(e=i[h])==null?void 0:e.methods),events:Rn(u,(r=i[h])==null?void 0:r.events)})}return i}function $E(n){const t={};return n?.forEach(e=>{var r;const[i,s]=e.split(":");t[i]||(t[i]={accounts:[],chains:[],events:[],methods:[]}),t[i].accounts.push(e),(r=t[i].chains)==null||r.push(`${i}:${s}`)}),t}function cl(n,t){t=t.map(r=>r.replace("did:pkh:",""));const e=$E(t);for(const[r,i]of Object.entries(e))i.methods?i.methods=Rn(i.methods,n):i.methods=n,i.events=["chainChanged","accountsChanged"];return e}function kE(n,t){var e,r,i,s,o,c;const l=al(n),u=al(t),h={},d=Object.keys(l).concat(Object.keys(u));for(const f of d)h[f]={chains:Rn((e=l[f])==null?void 0:e.chains,(r=u[f])==null?void 0:r.chains),methods:Rn((i=l[f])==null?void 0:i.methods,(s=u[f])==null?void 0:s.methods),events:Rn((o=l[f])==null?void 0:o.events,(c=u[f])==null?void 0:c.events)};return h}const UE={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},NE={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function B(n,t){const{message:e,code:r}=NE[n];return{message:t?`${e} ${t}`:e,code:r}}function de(n,t){const{message:e,code:r}=UE[n];return{message:t?`${e} ${t}`:e,code:r}}function Qn(n,t){return!!Array.isArray(n)}function Br(n){return Object.getPrototypeOf(n)===Object.prototype&&Object.keys(n).length}function be(n){return typeof n>"u"}function me(n,t){return t&&be(n)?!0:typeof n=="string"&&!!n.trim().length}function Pa(n,t){return typeof n=="number"&&!isNaN(n)}function BE(n,t){const{requiredNamespaces:e}=t,r=Object.keys(n.namespaces),i=Object.keys(e);let s=!0;return In(i,r)?(r.forEach(o=>{const{accounts:c,methods:l,events:u}=n.namespaces[o],h=sr(c),d=e[o];(!In(Sh(o,d),h)||!In(d.methods,l)||!In(d.events,u))&&(s=!1)}),s):!1}function Bi(n){return me(n,!1)&&n.includes(":")?n.split(":").length===2:!1}function ME(n){if(me(n,!1)&&n.includes(":")){const t=n.split(":");if(t.length===3){const e=t[0]+":"+t[1];return!!t[2]&&Bi(e)}}return!1}function qE(n){function t(e){try{return typeof new URL(e)<"u"}catch{return!1}}try{if(me(n,!1)){if(t(n))return!0;const e=Nh(n);return t(e)}}catch{}return!1}function jE(n){var t;return(t=n?.proposer)==null?void 0:t.publicKey}function zE(n){return n?.topic}function KE(n,t){let e=null;return me(n?.publicKey,!1)||(e=B("MISSING_OR_INVALID",`${t} controller public key should be a string`)),e}function ll(n){let t=!0;return Qn(n)?n.length&&(t=n.every(e=>me(e,!1))):t=!1,t}function FE(n,t,e){let r=null;return Qn(t)&&t.length?t.forEach(i=>{r||Bi(i)||(r=de("UNSUPPORTED_CHAINS",`${e}, chain ${i} should be a string and conform to "namespace:chainId" format`))}):Bi(n)||(r=de("UNSUPPORTED_CHAINS",`${e}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),r}function WE(n,t,e){let r=null;return Object.entries(n).forEach(([i,s])=>{if(r)return;const o=FE(i,Sh(i,s),`${t} ${e}`);o&&(r=o)}),r}function HE(n,t){let e=null;return Qn(n)?n.forEach(r=>{e||ME(r)||(e=de("UNSUPPORTED_ACCOUNTS",`${t}, account ${r} should be a string and conform to "namespace:chainId:address" format`))}):e=de("UNSUPPORTED_ACCOUNTS",`${t}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),e}function GE(n,t){let e=null;return Object.values(n).forEach(r=>{if(e)return;const i=HE(r?.accounts,`${t} namespace`);i&&(e=i)}),e}function ZE(n,t){let e=null;return ll(n?.methods)?ll(n?.events)||(e=de("UNSUPPORTED_EVENTS",`${t}, events should be an array of strings or empty array for no events`)):e=de("UNSUPPORTED_METHODS",`${t}, methods should be an array of strings or empty array for no methods`),e}function Ld(n,t){let e=null;return Object.values(n).forEach(r=>{if(e)return;const i=ZE(r,`${t}, namespace`);i&&(e=i)}),e}function YE(n,t,e){let r=null;if(n&&Br(n)){const i=Ld(n,t);i&&(r=i);const s=WE(n,t,e);s&&(r=s)}else r=B("MISSING_OR_INVALID",`${t}, ${e} should be an object with data`);return r}function Ds(n,t){let e=null;if(n&&Br(n)){const r=Ld(n,t);r&&(e=r);const i=GE(n,t);i&&(e=i)}else e=B("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return e}function Dd(n){return me(n.protocol,!0)}function JE(n,t){let e=!1;return n?n&&Qn(n)&&n.length&&n.forEach(r=>{e=Dd(r)}):e=!0,e}function QE(n){return typeof n=="number"}function Ge(n){return typeof n<"u"&&typeof n!==null}function XE(n){return!(!n||typeof n!="object"||!n.code||!Pa(n.code)||!n.message||!me(n.message,!1))}function ev(n){return!(be(n)||!me(n.method,!1))}function tv(n){return!(be(n)||be(n.result)&&be(n.error)||!Pa(n.id)||!me(n.jsonrpc,!1))}function nv(n){return!(be(n)||!me(n.name,!1))}function ul(n,t){return!(!Bi(t)||!xE(n).includes(t))}function rv(n,t,e){return me(e,!1)?VE(n,t).includes(e):!1}function iv(n,t,e){return me(e,!1)?SE(n,t).includes(e):!1}function hl(n,t,e){let r=null;const i=sv(n),s=ov(t),o=Object.keys(i),c=Object.keys(s),l=dl(Object.keys(n)),u=dl(Object.keys(t)),h=l.filter(d=>!u.includes(d));return h.length&&(r=B("NON_CONFORMING_NAMESPACES",`${e} namespaces keys don't satisfy requiredNamespaces.
9
+ Required: ${h.toString()}
10
+ Received: ${Object.keys(t).toString()}`)),In(o,c)||(r=B("NON_CONFORMING_NAMESPACES",`${e} namespaces chains don't satisfy required namespaces.
11
+ Required: ${o.toString()}
12
+ Approved: ${c.toString()}`)),Object.keys(t).forEach(d=>{if(!d.includes(":")||r)return;const f=sr(t[d].accounts);f.includes(d)||(r=B("NON_CONFORMING_NAMESPACES",`${e} namespaces accounts don't satisfy namespace accounts for ${d}
13
+ Required: ${d}
14
+ Approved: ${f.toString()}`))}),o.forEach(d=>{r||(In(i[d].methods,s[d].methods)?In(i[d].events,s[d].events)||(r=B("NON_CONFORMING_NAMESPACES",`${e} namespaces events don't satisfy namespace events for ${d}`)):r=B("NON_CONFORMING_NAMESPACES",`${e} namespaces methods don't satisfy namespace methods for ${d}`))}),r}function sv(n){const t={};return Object.keys(n).forEach(e=>{var r;e.includes(":")?t[e]=n[e]:(r=n[e].chains)==null||r.forEach(i=>{t[i]={methods:n[e].methods,events:n[e].events}})}),t}function dl(n){return[...new Set(n.map(t=>t.includes(":")?t.split(":")[0]:t))]}function ov(n){const t={};return Object.keys(n).forEach(e=>{e.includes(":")?t[e]=n[e]:sr(n[e].accounts)?.forEach(i=>{t[i]={accounts:n[e].accounts.filter(s=>s.includes(`${i}:`)),methods:n[e].methods,events:n[e].events}})}),t}function av(n,t){return Pa(n)&&n<=t.max&&n>=t.min}function fl(){const n=zr();return new Promise(t=>{switch(n){case st.browser:t(cv());break;case st.reactNative:t(lv());break;case st.node:t(uv());break;default:t(!0)}})}function cv(){return nr()&&navigator?.onLine}async function lv(){return pn()&&typeof global<"u"&&global!=null&&global.NetInfo?(await(global==null?void 0:global.NetInfo.fetch()))?.isConnected:!0}function uv(){return!0}function hv(n){switch(zr()){case st.browser:dv(n);break;case st.reactNative:fv(n);break}}function dv(n){!pn()&&nr()&&(window.addEventListener("online",()=>n(!0)),window.addEventListener("offline",()=>n(!1)))}function fv(n){pn()&&typeof global<"u"&&global!=null&&global.NetInfo&&global?.NetInfo.addEventListener(t=>n(t?.isConnected))}function pv(){var n;return nr()&&Gn()?((n=Gn())==null?void 0:n.visibilityState)==="visible":!0}const xs={};class dr{static get(t){return xs[t]}static set(t,e){xs[t]=e}static delete(t){delete xs[t]}}function _v(n){const t=jr.decode(n);if(t.length<33)throw new Error("Too short to contain a public key");return t.slice(1,33)}function mv({publicKey:n,signature:t,payload:e}){var r;const i=go(e.method),s=128|parseInt(((r=e.version)==null?void 0:r.toString())||"4"),o=gv(e.address),c=e.era==="00"?new Uint8Array([0]):go(e.era);if(c.length!==1&&c.length!==2)throw new Error("Invalid era length");const l=parseInt(e.nonce,16),u=new Uint8Array([l&255,l>>8&255]),h=BigInt(`0x${yv(e.tip)}`),d=vv(h),f=new Uint8Array([0,...n,o,...t,...c,...u,...d,...i]),p=Ev(f.length+1);return new Uint8Array([...p,s,...f])}function wv(n){const t=go(n),e=iy.blake2b(t,void 0,32);return"0x"+Buffer.from(e).toString("hex")}function go(n){return new Uint8Array(n.replace(/^0x/,"").match(/.{1,2}/g).map(t=>parseInt(t,16)))}function yv(n){return n.startsWith("0x")?n.slice(2):n}function gv(n){const t=jr.decode(n)[0];return t===42?0:t===60?2:1}function Ev(n){if(n<64)return new Uint8Array([n<<2]);if(n<16384){const t=n<<2|1;return new Uint8Array([t&255,t>>8&255])}else if(n<1<<30){const t=n<<2|2;return new Uint8Array([t&255,t>>8&255,t>>16&255,t>>24&255])}else throw new Error("Compact encoding > 2^30 not supported")}function vv(n){if(n<BigInt(1)<<BigInt(6))return new Uint8Array([Number(n<<BigInt(2))]);if(n<BigInt(1)<<BigInt(14)){const t=n<<BigInt(2)|BigInt(1);return new Uint8Array([Number(t&BigInt(255)),Number(t>>BigInt(8)&BigInt(255))])}else if(n<BigInt(1)<<BigInt(30)){const t=n<<BigInt(2)|BigInt(2);return new Uint8Array([Number(t&BigInt(255)),Number(t>>BigInt(8)&BigInt(255)),Number(t>>BigInt(16)&BigInt(255)),Number(t>>BigInt(24)&BigInt(255))])}else throw new Error("BigInt compact encoding not supported > 2^30")}function bv(n){const t=Uint8Array.from(Buffer.from(n.signature,"hex")),e=_v(n.transaction.address),r=mv({publicKey:e,signature:t,payload:n.transaction}),i=Buffer.from(r).toString("hex");return wv(i)}var Iv={};const xd="wc",Vd=2,Mi="core",Ct=`${xd}@2:${Mi}:`,Av={name:Mi,logger:"error"},Tv={database:":memory:"},Pv="crypto",pl="client_ed25519_seed",Ov=q.ONE_DAY,Rv="keychain",Lv="0.3",Dv="messages",xv="0.3",Vv=q.SIX_HOURS,Sv="publisher",Sd="irn",Cv="error",Cd="wss://relay.walletconnect.org",$v="relayer",fe={message:"relayer_message",message_ack:"relayer_message_ack",connect:"relayer_connect",disconnect:"relayer_disconnect",error:"relayer_error",connection_stalled:"relayer_connection_stalled",transport_closed:"relayer_transport_closed",publish:"relayer_publish"},kv="_subscription",ct={payload:"payload",connect:"connect",disconnect:"disconnect",error:"error"},Uv=.1,Eo="2.21.8",ue={link_mode:"link_mode",relay:"relay"},yi={inbound:"inbound",outbound:"outbound"},Nv="0.3",Bv="WALLETCONNECT_CLIENT_ID",_l="WALLETCONNECT_LINK_MODE_APPS",rt={created:"subscription_created",deleted:"subscription_deleted",expired:"subscription_expired",disabled:"subscription_disabled",sync:"subscription_sync",resubscribed:"subscription_resubscribed"},Mv="subscription",qv="0.3",jv="pairing",zv="0.3",fr={wc_pairingDelete:{req:{ttl:q.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:q.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:q.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:q.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:q.ONE_DAY,prompt:!1,tag:0},res:{ttl:q.ONE_DAY,prompt:!1,tag:0}}},vn={create:"pairing_create",expire:"pairing_expire",delete:"pairing_delete",ping:"pairing_ping"},mt={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},Kv="history",Fv="0.3",Wv="expirer",ut={created:"expirer_created",deleted:"expirer_deleted",expired:"expirer_expired",sync:"expirer_sync"},Hv="0.3",Gv="verify-api",Zv="https://verify.walletconnect.com",$d="https://verify.walletconnect.org",Lr=$d,Yv=`${Lr}/v3`,Jv=[Zv,$d],Qv="echo",Xv="https://echo.walletconnect.com",Lt={pairing_started:"pairing_started",pairing_uri_validation_success:"pairing_uri_validation_success",pairing_uri_not_expired:"pairing_uri_not_expired",store_new_pairing:"store_new_pairing",subscribing_pairing_topic:"subscribing_pairing_topic",subscribe_pairing_topic_success:"subscribe_pairing_topic_success",existing_pairing:"existing_pairing",pairing_not_expired:"pairing_not_expired",emit_inactive_pairing:"emit_inactive_pairing",emit_session_proposal:"emit_session_proposal",subscribing_to_pairing_topic:"subscribing_to_pairing_topic"},Bt={no_wss_connection:"no_wss_connection",no_internet_connection:"no_internet_connection",malformed_pairing_uri:"malformed_pairing_uri",active_pairing_already_exists:"active_pairing_already_exists",subscribe_pairing_topic_failure:"subscribe_pairing_topic_failure",pairing_expired:"pairing_expired",proposal_expired:"proposal_expired",proposal_listener_not_found:"proposal_listener_not_found"},sn={session_approve_started:"session_approve_started",proposal_not_expired:"proposal_not_expired",session_namespaces_validation_success:"session_namespaces_validation_success",create_session_topic:"create_session_topic",subscribing_session_topic:"subscribing_session_topic",subscribe_session_topic_success:"subscribe_session_topic_success",publishing_session_approve:"publishing_session_approve",session_approve_publish_success:"session_approve_publish_success",store_session:"store_session",publishing_session_settle:"publishing_session_settle",session_settle_publish_success:"session_settle_publish_success"},pr={no_internet_connection:"no_internet_connection",no_wss_connection:"no_wss_connection",proposal_expired:"proposal_expired",subscribe_session_topic_failure:"subscribe_session_topic_failure",session_approve_publish_failure:"session_approve_publish_failure",session_settle_publish_failure:"session_settle_publish_failure",session_approve_namespace_validation_failure:"session_approve_namespace_validation_failure",proposal_not_found:"proposal_not_found"},yn={authenticated_session_approve_started:"authenticated_session_approve_started",authenticated_session_not_expired:"authenticated_session_not_expired",chains_caip2_compliant:"chains_caip2_compliant",chains_evm_compliant:"chains_evm_compliant",create_authenticated_session_topic:"create_authenticated_session_topic",cacaos_verified:"cacaos_verified",store_authenticated_session:"store_authenticated_session",subscribing_authenticated_session_topic:"subscribing_authenticated_session_topic",subscribe_authenticated_session_topic_success:"subscribe_authenticated_session_topic_success",publishing_authenticated_session_approve:"publishing_authenticated_session_approve",authenticated_session_approve_publish_success:"authenticated_session_approve_publish_success"},_r={no_internet_connection:"no_internet_connection",no_wss_connection:"no_wss_connection",missing_session_authenticate_request:"missing_session_authenticate_request",session_authenticate_request_expired:"session_authenticate_request_expired",chains_caip2_compliant_failure:"chains_caip2_compliant_failure",chains_evm_compliant_failure:"chains_evm_compliant_failure",invalid_cacao:"invalid_cacao",subscribe_authenticated_session_topic_failure:"subscribe_authenticated_session_topic_failure",authenticated_session_approve_publish_failure:"authenticated_session_approve_publish_failure",authenticated_session_pending_request_not_found:"authenticated_session_pending_request_not_found"},eb=.1,tb="event-client",nb=86400,rb="https://pulse.walletconnect.org/batch";function ib(n,t){if(n.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r<e.length;r++)e[r]=255;for(var i=0;i<n.length;i++){var s=n.charAt(i),o=s.charCodeAt(0);if(e[o]!==255)throw new TypeError(s+" is ambiguous");e[o]=i}var c=n.length,l=n.charAt(0),u=Math.log(c)/Math.log(256),h=Math.log(256)/Math.log(c);function d(m){if(m instanceof Uint8Array||(ArrayBuffer.isView(m)?m=new Uint8Array(m.buffer,m.byteOffset,m.byteLength):Array.isArray(m)&&(m=Uint8Array.from(m))),!(m instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(m.length===0)return"";for(var w=0,_=0,E=0,v=m.length;E!==v&&m[E]===0;)E++,w++;for(var g=(v-E)*h+1>>>0,I=new Uint8Array(g);E!==v;){for(var b=m[E],D=0,x=g-1;(b!==0||D<_)&&x!==-1;x--,D++)b+=256*I[x]>>>0,I[x]=b%c>>>0,b=b/c>>>0;if(b!==0)throw new Error("Non-zero carry");_=D,E++}for(var S=g-_;S!==g&&I[S]===0;)S++;for(var y=l.repeat(w);S<g;++S)y+=n.charAt(I[S]);return y}function f(m){if(typeof m!="string")throw new TypeError("Expected String");if(m.length===0)return new Uint8Array;var w=0;if(m[w]!==" "){for(var _=0,E=0;m[w]===l;)_++,w++;for(var v=(m.length-w)*u+1>>>0,g=new Uint8Array(v);m[w];){var I=e[m.charCodeAt(w)];if(I===255)return;for(var b=0,D=v-1;(I!==0||b<E)&&D!==-1;D--,b++)I+=c*g[D]>>>0,g[D]=I%256>>>0,I=I/256>>>0;if(I!==0)throw new Error("Non-zero carry");E=b,w++}if(m[w]!==" "){for(var x=v-E;x!==v&&g[x]===0;)x++;for(var S=new Uint8Array(_+(v-x)),y=_;x!==v;)S[y++]=g[x++];return S}}}function p(m){var w=f(m);if(w)return w;throw new Error(`Non-${t} character`)}return{encode:d,decodeUnsafe:f,decode:p}}var sb=ib,ob=sb;const kd=n=>{if(n instanceof Uint8Array&&n.constructor.name==="Uint8Array")return n;if(n instanceof ArrayBuffer)return new Uint8Array(n);if(ArrayBuffer.isView(n))return new Uint8Array(n.buffer,n.byteOffset,n.byteLength);throw new Error("Unknown type, must be binary type")},ab=n=>new TextEncoder().encode(n),cb=n=>new TextDecoder().decode(n);class lb{constructor(t,e,r){this.name=t,this.prefix=e,this.baseEncode=r}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class ub{constructor(t,e,r){if(this.name=t,this.prefix=e,e.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=e.codePointAt(0),this.baseDecode=r}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return Ud(this,t)}}class hb{constructor(t){this.decoders=t}or(t){return Ud(this,t)}decode(t){const e=t[0],r=this.decoders[e];if(r)return r.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const Ud=(n,t)=>new hb({...n.decoders||{[n.prefix]:n},...t.decoders||{[t.prefix]:t}});class db{constructor(t,e,r,i){this.name=t,this.prefix=e,this.baseEncode=r,this.baseDecode=i,this.encoder=new lb(t,e,r),this.decoder=new ub(t,e,i)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const rs=({name:n,prefix:t,encode:e,decode:r})=>new db(n,t,e,r),Hr=({prefix:n,name:t,alphabet:e})=>{const{encode:r,decode:i}=ob(e,t);return rs({prefix:n,name:t,encode:r,decode:s=>kd(i(s))})},fb=(n,t,e,r)=>{const i={};for(let h=0;h<t.length;++h)i[t[h]]=h;let s=n.length;for(;n[s-1]==="=";)--s;const o=new Uint8Array(s*e/8|0);let c=0,l=0,u=0;for(let h=0;h<s;++h){const d=i[n[h]];if(d===void 0)throw new SyntaxError(`Non-${r} character`);l=l<<e|d,c+=e,c>=8&&(c-=8,o[u++]=255&l>>c)}if(c>=e||255&l<<8-c)throw new SyntaxError("Unexpected end of data");return o},pb=(n,t,e)=>{const r=t[t.length-1]==="=",i=(1<<e)-1;let s="",o=0,c=0;for(let l=0;l<n.length;++l)for(c=c<<8|n[l],o+=8;o>e;)o-=e,s+=t[i&c>>o];if(o&&(s+=t[i&c<<e-o]),r)for(;s.length*e&7;)s+="=";return s},xe=({name:n,prefix:t,bitsPerChar:e,alphabet:r})=>rs({prefix:t,name:n,encode(i){return pb(i,r,e)},decode(i){return fb(i,r,e,n)}}),_b=rs({prefix:"\0",name:"identity",encode:n=>cb(n),decode:n=>ab(n)});var mb=Object.freeze({__proto__:null,identity:_b});const wb=xe({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var yb=Object.freeze({__proto__:null,base2:wb});const gb=xe({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var Eb=Object.freeze({__proto__:null,base8:gb});const vb=Hr({prefix:"9",name:"base10",alphabet:"0123456789"});var bb=Object.freeze({__proto__:null,base10:vb});const Ib=xe({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Ab=xe({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var Tb=Object.freeze({__proto__:null,base16:Ib,base16upper:Ab});const Pb=xe({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Ob=xe({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Rb=xe({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Lb=xe({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Db=xe({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),xb=xe({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Vb=xe({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Sb=xe({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Cb=xe({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var $b=Object.freeze({__proto__:null,base32:Pb,base32upper:Ob,base32pad:Rb,base32padupper:Lb,base32hex:Db,base32hexupper:xb,base32hexpad:Vb,base32hexpadupper:Sb,base32z:Cb});const kb=Hr({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Ub=Hr({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var Nb=Object.freeze({__proto__:null,base36:kb,base36upper:Ub});const Bb=Hr({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Mb=Hr({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var qb=Object.freeze({__proto__:null,base58btc:Bb,base58flickr:Mb});const jb=xe({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),zb=xe({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Kb=xe({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Fb=xe({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Wb=Object.freeze({__proto__:null,base64:jb,base64pad:zb,base64url:Kb,base64urlpad:Fb});const Nd=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),Hb=Nd.reduce((n,t,e)=>(n[e]=t,n),[]),Gb=Nd.reduce((n,t,e)=>(n[t.codePointAt(0)]=e,n),[]);function Zb(n){return n.reduce((t,e)=>(t+=Hb[e],t),"")}function Yb(n){const t=[];for(const e of n){const r=Gb[e.codePointAt(0)];if(r===void 0)throw new Error(`Non-base256emoji character: ${e}`);t.push(r)}return new Uint8Array(t)}const Jb=rs({prefix:"🚀",name:"base256emoji",encode:Zb,decode:Yb});var Qb=Object.freeze({__proto__:null,base256emoji:Jb}),Xb=Bd,ml=128,eI=127,tI=~eI,nI=Math.pow(2,31);function Bd(n,t,e){t=t||[],e=e||0;for(var r=e;n>=nI;)t[e++]=n&255|ml,n/=128;for(;n&tI;)t[e++]=n&255|ml,n>>>=7;return t[e]=n|0,Bd.bytes=e-r+1,t}var rI=vo,iI=128,wl=127;function vo(n,r){var e=0,r=r||0,i=0,s=r,o,c=n.length;do{if(s>=c)throw vo.bytes=0,new RangeError("Could not decode varint");o=n[s++],e+=i<28?(o&wl)<<i:(o&wl)*Math.pow(2,i),i+=7}while(o>=iI);return vo.bytes=s-r,e}var sI=Math.pow(2,7),oI=Math.pow(2,14),aI=Math.pow(2,21),cI=Math.pow(2,28),lI=Math.pow(2,35),uI=Math.pow(2,42),hI=Math.pow(2,49),dI=Math.pow(2,56),fI=Math.pow(2,63),pI=function(n){return n<sI?1:n<oI?2:n<aI?3:n<cI?4:n<lI?5:n<uI?6:n<hI?7:n<dI?8:n<fI?9:10},_I={encode:Xb,decode:rI,encodingLength:pI},Md=_I;const yl=(n,t,e=0)=>(Md.encode(n,t,e),t),gl=n=>Md.encodingLength(n),bo=(n,t)=>{const e=t.byteLength,r=gl(n),i=r+gl(e),s=new Uint8Array(i+e);return yl(n,s,0),yl(e,s,r),s.set(t,i),new mI(n,e,t,s)};class mI{constructor(t,e,r,i){this.code=t,this.size=e,this.digest=r,this.bytes=i}}const qd=({name:n,code:t,encode:e})=>new wI(n,t,e);class wI{constructor(t,e,r){this.name=t,this.code=e,this.encode=r}digest(t){if(t instanceof Uint8Array){const e=this.encode(t);return e instanceof Uint8Array?bo(this.code,e):e.then(r=>bo(this.code,r))}else throw Error("Unknown type, must be binary type")}}const jd=n=>async t=>new Uint8Array(await crypto.subtle.digest(n,t)),yI=qd({name:"sha2-256",code:18,encode:jd("SHA-256")}),gI=qd({name:"sha2-512",code:19,encode:jd("SHA-512")});var EI=Object.freeze({__proto__:null,sha256:yI,sha512:gI});const zd=0,vI="identity",Kd=kd,bI=n=>bo(zd,Kd(n)),II={code:zd,name:vI,encode:Kd,digest:bI};var AI=Object.freeze({__proto__:null,identity:II});new TextEncoder,new TextDecoder;const El={...mb,...yb,...Eb,...bb,...Tb,...$b,...Nb,...qb,...Wb,...Qb};({...EI,...AI});function Fd(n){return globalThis.Buffer!=null?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):n}function TI(n=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?Fd(globalThis.Buffer.allocUnsafe(n)):new Uint8Array(n)}function Wd(n,t,e,r){return{name:n,prefix:t,encoder:{name:n,prefix:t,encode:e},decoder:{decode:r}}}const vl=Wd("utf8","u",n=>"u"+new TextDecoder("utf8").decode(n),n=>new TextEncoder().encode(n.substring(1))),Vs=Wd("ascii","a",n=>{let t="a";for(let e=0;e<n.length;e++)t+=String.fromCharCode(n[e]);return t},n=>{n=n.substring(1);const t=TI(n.length);for(let e=0;e<n.length;e++)t[e]=n.charCodeAt(e);return t}),PI={utf8:vl,"utf-8":vl,hex:El.base16,latin1:Vs,ascii:Vs,binary:Vs,...El};function OI(n,t="utf8"){const e=PI[t];if(!e)throw new Error(`Unsupported encoding "${t}"`);return(t==="utf8"||t==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?Fd(globalThis.Buffer.from(n,"utf-8")):e.decoder.decode(`${e.prefix}${n}`)}var RI=Object.defineProperty,LI=(n,t,e)=>t in n?RI(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Ot=(n,t,e)=>LI(n,typeof t!="symbol"?t+"":t,e);class DI{constructor(t,e){this.core=t,this.logger=e,Ot(this,"keychain",new Map),Ot(this,"name",Rv),Ot(this,"version",Lv),Ot(this,"initialized",!1),Ot(this,"storagePrefix",Ct),Ot(this,"init",async()=>{if(!this.initialized){const r=await this.getKeyChain();typeof r<"u"&&(this.keychain=r),this.initialized=!0}}),Ot(this,"has",r=>(this.isInitialized(),this.keychain.has(r))),Ot(this,"set",async(r,i)=>{this.isInitialized(),this.keychain.set(r,i),await this.persist()}),Ot(this,"get",r=>{this.isInitialized();const i=this.keychain.get(r);if(typeof i>"u"){const{message:s}=B("NO_MATCHING_KEY",`${this.name}: ${r}`);throw new Error(s)}return i}),Ot(this,"del",async r=>{this.isInitialized(),this.keychain.delete(r),await this.persist()}),this.core=t,this.logger=Fe(e,this.name)}get context(){return ot(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(t){await this.core.storage.setItem(this.storageKey,oo(t))}async getKeyChain(){const t=await this.core.storage.getItem(this.storageKey);return typeof t<"u"?ao(t):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:t}=B("NOT_INITIALIZED",this.name);throw new Error(t)}}}var xI=Object.defineProperty,VI=(n,t,e)=>t in n?xI(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Re=(n,t,e)=>VI(n,typeof t!="symbol"?t+"":t,e);class SI{constructor(t,e,r){this.core=t,this.logger=e,Re(this,"name",Pv),Re(this,"keychain"),Re(this,"randomSessionIdentifier",yo()),Re(this,"initialized",!1),Re(this,"init",async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)}),Re(this,"hasKeys",i=>(this.isInitialized(),this.keychain.has(i))),Re(this,"getClientId",async()=>{this.isInitialized();const i=await this.getClientSeed(),s=Na(i);return sp(s.publicKey)}),Re(this,"generateKeyPair",()=>{this.isInitialized();const i=hE();return this.setPrivateKey(i.publicKey,i.privateKey)}),Re(this,"signJWT",async i=>{this.isInitialized();const s=await this.getClientSeed(),o=Na(s),c=this.randomSessionIdentifier;return await op(c,i,Ov,o)}),Re(this,"generateSharedKey",(i,s,o)=>{this.isInitialized();const c=this.getPrivateKey(i),l=dE(c,s);return this.setSymKey(l,o)}),Re(this,"setSymKey",async(i,s)=>{this.isInitialized();const o=s||wi(i);return await this.keychain.set(o,i),o}),Re(this,"deleteKeyPair",async i=>{this.isInitialized(),await this.keychain.del(i)}),Re(this,"deleteSymKey",async i=>{this.isInitialized(),await this.keychain.del(i)}),Re(this,"encode",async(i,s,o)=>{this.isInitialized();const c=Od(o),l=qo(s);if(nl(c))return _E(l,o?.encoding);if(tl(c)){const f=c.senderPublicKey,p=c.receiverPublicKey;i=await this.generateSharedKey(f,p)}const u=this.getSymKey(i),{type:h,senderPublicKey:d}=c;return fE({type:h,symKey:u,message:l,senderPublicKey:d,encoding:o?.encoding})}),Re(this,"decode",async(i,s,o)=>{this.isInitialized();const c=wE(s,o);if(nl(c)){const l=mE(s,o?.encoding);return Ii(l)}if(tl(c)){const l=c.receiverPublicKey,u=c.senderPublicKey;i=await this.generateSharedKey(l,u)}try{const l=this.getSymKey(i),u=pE({symKey:l,encoded:s,encoding:o?.encoding});return Ii(u)}catch(l){this.logger.error(`Failed to decode message from topic: '${i}', clientId: '${await this.getClientId()}'`),this.logger.error(l)}}),Re(this,"getPayloadType",(i,s=Qe)=>{const o=Nr({encoded:i,encoding:s});return xn(o.type)}),Re(this,"getPayloadSenderPublicKey",(i,s=Qe)=>{const o=Nr({encoded:i,encoding:s});return o.senderPublicKey?tt(o.senderPublicKey,Ke):void 0}),this.core=t,this.logger=Fe(e,this.name),this.keychain=r||new DI(this.core,this.logger)}get context(){return ot(this.logger)}async setPrivateKey(t,e){return await this.keychain.set(t,e),t}getPrivateKey(t){return this.keychain.get(t)}async getClientSeed(){let t="";try{t=this.keychain.get(pl)}catch{t=yo(),await this.keychain.set(pl,t)}return OI(t,"base16")}getSymKey(t){return this.keychain.get(t)}isInitialized(){if(!this.initialized){const{message:t}=B("NOT_INITIALIZED",this.name);throw new Error(t)}}}var CI=Object.defineProperty,$I=Object.defineProperties,kI=Object.getOwnPropertyDescriptors,bl=Object.getOwnPropertySymbols,UI=Object.prototype.hasOwnProperty,NI=Object.prototype.propertyIsEnumerable,Io=(n,t,e)=>t in n?CI(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,BI=(n,t)=>{for(var e in t||(t={}))UI.call(t,e)&&Io(n,e,t[e]);if(bl)for(var e of bl(t))NI.call(t,e)&&Io(n,e,t[e]);return n},MI=(n,t)=>$I(n,kI(t)),nt=(n,t,e)=>Io(n,typeof t!="symbol"?t+"":t,e);class qI extends Km{constructor(t,e){super(t,e),this.logger=t,this.core=e,nt(this,"messages",new Map),nt(this,"messagesWithoutClientAck",new Map),nt(this,"name",Dv),nt(this,"version",xv),nt(this,"initialized",!1),nt(this,"storagePrefix",Ct),nt(this,"init",async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const r=await this.getRelayerMessages();typeof r<"u"&&(this.messages=r);const i=await this.getRelayerMessagesWithoutClientAck();typeof i<"u"&&(this.messagesWithoutClientAck=i),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(r){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(r)}finally{this.initialized=!0}}}),nt(this,"set",async(r,i,s)=>{this.isInitialized();const o=ht(i);let c=this.messages.get(r);if(typeof c>"u"&&(c={}),typeof c[o]<"u")return o;if(c[o]=i,this.messages.set(r,c),s===yi.inbound){const l=this.messagesWithoutClientAck.get(r)||{};this.messagesWithoutClientAck.set(r,MI(BI({},l),{[o]:i}))}return await this.persist(),o}),nt(this,"get",r=>{this.isInitialized();let i=this.messages.get(r);return typeof i>"u"&&(i={}),i}),nt(this,"getWithoutAck",r=>{this.isInitialized();const i={};for(const s of r){const o=this.messagesWithoutClientAck.get(s)||{};i[s]=Object.values(o)}return i}),nt(this,"has",(r,i)=>{this.isInitialized();const s=this.get(r),o=ht(i);return typeof s[o]<"u"}),nt(this,"ack",async(r,i)=>{this.isInitialized();const s=this.messagesWithoutClientAck.get(r);if(typeof s>"u")return;const o=ht(i);delete s[o],Object.keys(s).length===0?this.messagesWithoutClientAck.delete(r):this.messagesWithoutClientAck.set(r,s),await this.persist()}),nt(this,"del",async r=>{this.isInitialized(),this.messages.delete(r),this.messagesWithoutClientAck.delete(r),await this.persist()}),this.logger=Fe(t,this.name),this.core=e}get context(){return ot(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get storageKeyWithoutClientAck(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name+"_withoutClientAck"}async setRelayerMessages(t){await this.core.storage.setItem(this.storageKey,oo(t))}async setRelayerMessagesWithoutClientAck(t){await this.core.storage.setItem(this.storageKeyWithoutClientAck,oo(t))}async getRelayerMessages(){const t=await this.core.storage.getItem(this.storageKey);return typeof t<"u"?ao(t):void 0}async getRelayerMessagesWithoutClientAck(){const t=await this.core.storage.getItem(this.storageKeyWithoutClientAck);return typeof t<"u"?ao(t):void 0}async persist(){await this.setRelayerMessages(this.messages),await this.setRelayerMessagesWithoutClientAck(this.messagesWithoutClientAck)}isInitialized(){if(!this.initialized){const{message:t}=B("NOT_INITIALIZED",this.name);throw new Error(t)}}}var jI=Object.defineProperty,zI=Object.defineProperties,KI=Object.getOwnPropertyDescriptors,Il=Object.getOwnPropertySymbols,FI=Object.prototype.hasOwnProperty,WI=Object.prototype.propertyIsEnumerable,Ao=(n,t,e)=>t in n?jI(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Mn=(n,t)=>{for(var e in t||(t={}))FI.call(t,e)&&Ao(n,e,t[e]);if(Il)for(var e of Il(t))WI.call(t,e)&&Ao(n,e,t[e]);return n},Al=(n,t)=>zI(n,KI(t)),lt=(n,t,e)=>Ao(n,typeof t!="symbol"?t+"":t,e);class HI extends Fm{constructor(t,e){super(t,e),this.relayer=t,this.logger=e,lt(this,"events",new $n.EventEmitter),lt(this,"name",Sv),lt(this,"queue",new Map),lt(this,"publishTimeout",q.toMiliseconds(q.ONE_MINUTE)),lt(this,"initialPublishTimeout",q.toMiliseconds(q.ONE_SECOND*15)),lt(this,"needsTransportRestart",!1),lt(this,"publish",async(r,i,s)=>{var o,c,l,u,h;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:r,message:i,opts:s}});const d=s?.ttl||Vv,f=s?.prompt||!1,p=s?.tag||0,m=s?.id||bn().toString(),w=zn(Ni().protocol),_={id:m,method:s?.publishMethod||w.publish,params:Mn({topic:r,message:i,ttl:d,prompt:f,tag:p,attestation:s?.attestation},s?.tvf&&{tvf:s.tvf})},E=`Failed to publish payload, please try again. id:${m} tag:${p}`;try{be((o=_.params)==null?void 0:o.prompt)&&((c=_.params)==null||delete c.prompt),be((l=_.params)==null?void 0:l.tag)&&((u=_.params)==null||delete u.tag);const v=new Promise(async g=>{const I=({id:D})=>{var x;((x=_.id)==null?void 0:x.toString())===D.toString()&&(this.removeRequestFromQueue(D),this.relayer.events.removeListener(fe.publish,I),g())};this.relayer.events.on(fe.publish,I);const b=Vt(new Promise((D,x)=>{this.rpcPublish(_,s).then(D).catch(S=>{this.logger.warn(S,S?.message),x(S)})}),this.initialPublishTimeout,`Failed initial publish, retrying.... id:${m} tag:${p}`);try{await b,this.events.removeListener(fe.publish,I)}catch(D){this.queue.set(m,{request:_,opts:s,attempt:1}),this.logger.warn(D,D?.message)}});this.logger.trace({type:"method",method:"publish",params:{id:m,topic:r,message:i,opts:s}}),await Vt(v,this.publishTimeout,E)}catch(v){if(this.logger.debug("Failed to Publish Payload"),this.logger.error(v),(h=s?.internal)!=null&&h.throwOnFailedPublish)throw v}finally{this.queue.delete(m)}}),lt(this,"publishCustom",async r=>{var i,s,o,c,l;this.logger.debug("Publishing custom payload"),this.logger.trace({type:"method",method:"publishCustom",params:r});const{payload:u,opts:h={}}=r,{attestation:d,tvf:f,publishMethod:p,prompt:m,tag:w,ttl:_=q.FIVE_MINUTES}=h,E=h.id||bn().toString(),v=zn(Ni().protocol),g=p||v.publish,I={id:E,method:g,params:Mn(Al(Mn({},u),{ttl:_,prompt:m,tag:w,attestation:d}),f)},b=`Failed to publish custom payload, please try again. id:${E} tag:${w}`;try{be((i=I.params)==null?void 0:i.prompt)&&((s=I.params)==null||delete s.prompt),be((o=I.params)==null?void 0:o.tag)&&((c=I.params)==null||delete c.tag);const D=new Promise(async x=>{const S=({id:L})=>{var T;((T=I.id)==null?void 0:T.toString())===L.toString()&&(this.removeRequestFromQueue(L),this.relayer.events.removeListener(fe.publish,S),x())};this.relayer.events.on(fe.publish,S);const y=Vt(new Promise((L,T)=>{this.rpcPublish(I,h).then(L).catch(O=>{this.logger.warn(O,O?.message),T(O)})}),this.initialPublishTimeout,`Failed initial custom payload publish, retrying.... method:${g} id:${E} tag:${w}`);try{await y,this.events.removeListener(fe.publish,S)}catch(L){this.queue.set(E,{request:I,opts:h,attempt:1}),this.logger.warn(L,L?.message)}});this.logger.trace({type:"method",method:"publish",params:{id:E,payload:u,opts:h}}),await Vt(D,this.publishTimeout,b)}catch(D){if(this.logger.debug("Failed to Publish Payload"),this.logger.error(D),(l=h?.internal)!=null&&l.throwOnFailedPublish)throw D}finally{this.queue.delete(E)}}),lt(this,"on",(r,i)=>{this.events.on(r,i)}),lt(this,"once",(r,i)=>{this.events.once(r,i)}),lt(this,"off",(r,i)=>{this.events.off(r,i)}),lt(this,"removeListener",(r,i)=>{this.events.removeListener(r,i)}),this.relayer=t,this.logger=Fe(e,this.name),this.registerEventListeners()}get context(){return ot(this.logger)}async rpcPublish(t,e){this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:t});const r=await this.relayer.request(t);return this.relayer.events.emit(fe.publish,Mn(Mn({},t),e)),this.logger.debug("Successfully Published Payload"),r}removeRequestFromQueue(t){this.queue.delete(t)}checkQueue(){this.queue.forEach(async(t,e)=>{var r;const i=t.attempt+1;this.queue.set(e,Al(Mn({},t),{attempt:i})),this.logger.warn({},`Publisher: queue->publishing: ${t.request.id}, tag: ${(r=t.request.params)==null?void 0:r.tag}, attempt: ${i}`),await this.rpcPublish(t.request,t.opts),this.logger.warn({},`Publisher: queue->published: ${t.request.id}`)})}registerEventListeners(){this.relayer.core.heartbeat.on(er.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(fe.connection_stalled);return}this.checkQueue()}),this.relayer.on(fe.message_ack,t=>{this.removeRequestFromQueue(t.id.toString())})}}var GI=Object.defineProperty,ZI=(n,t,e)=>t in n?GI(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,qn=(n,t,e)=>ZI(n,typeof t!="symbol"?t+"":t,e);class YI{constructor(){qn(this,"map",new Map),qn(this,"set",(t,e)=>{const r=this.get(t);this.exists(t,e)||this.map.set(t,[...r,e])}),qn(this,"get",t=>this.map.get(t)||[]),qn(this,"exists",(t,e)=>this.get(t).includes(e)),qn(this,"delete",(t,e)=>{if(typeof e>"u"){this.map.delete(t);return}if(!this.map.has(t))return;const r=this.get(t);if(!this.exists(t,e))return;const i=r.filter(s=>s!==e);if(!i.length){this.map.delete(t);return}this.map.set(t,i)}),qn(this,"clear",()=>{this.map.clear()})}get topics(){return Array.from(this.map.keys())}}var JI=Object.defineProperty,QI=Object.defineProperties,XI=Object.getOwnPropertyDescriptors,Tl=Object.getOwnPropertySymbols,e1=Object.prototype.hasOwnProperty,t1=Object.prototype.propertyIsEnumerable,To=(n,t,e)=>t in n?JI(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,mr=(n,t)=>{for(var e in t||(t={}))e1.call(t,e)&&To(n,e,t[e]);if(Tl)for(var e of Tl(t))t1.call(t,e)&&To(n,e,t[e]);return n},Ss=(n,t)=>QI(n,XI(t)),ce=(n,t,e)=>To(n,typeof t!="symbol"?t+"":t,e);class n1 extends Gm{constructor(t,e){super(t,e),this.relayer=t,this.logger=e,ce(this,"subscriptions",new Map),ce(this,"topicMap",new YI),ce(this,"events",new $n.EventEmitter),ce(this,"name",Mv),ce(this,"version",qv),ce(this,"pending",new Map),ce(this,"cached",[]),ce(this,"initialized",!1),ce(this,"storagePrefix",Ct),ce(this,"subscribeTimeout",q.toMiliseconds(q.ONE_MINUTE)),ce(this,"initialSubscribeTimeout",q.toMiliseconds(q.ONE_SECOND*15)),ce(this,"clientId"),ce(this,"batchSubscribeTopicsLimit",500),ce(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),await this.restore()),this.initialized=!0}),ce(this,"subscribe",async(r,i)=>{var s;this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:r,opts:i}});try{const o=Ni(i),c={topic:r,relay:o,transportType:i?.transportType};(s=i?.internal)!=null&&s.skipSubscribe||this.pending.set(r,c);const l=await this.rpcSubscribe(r,o,i);return typeof l=="string"&&(this.onSubscribe(l,c),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:r,opts:i}})),l}catch(o){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(o),o}}),ce(this,"unsubscribe",async(r,i)=>{this.isInitialized(),typeof i?.id<"u"?await this.unsubscribeById(r,i.id,i):await this.unsubscribeByTopic(r,i)}),ce(this,"isSubscribed",r=>new Promise(i=>{i(this.topicMap.topics.includes(r))})),ce(this,"isKnownTopic",r=>new Promise(i=>{i(this.topicMap.topics.includes(r)||this.pending.has(r)||this.cached.some(s=>s.topic===r))})),ce(this,"on",(r,i)=>{this.events.on(r,i)}),ce(this,"once",(r,i)=>{this.events.once(r,i)}),ce(this,"off",(r,i)=>{this.events.off(r,i)}),ce(this,"removeListener",(r,i)=>{this.events.removeListener(r,i)}),ce(this,"start",async()=>{await this.onConnect()}),ce(this,"stop",async()=>{await this.onDisconnect()}),ce(this,"restart",async()=>{await this.restore(),await this.onRestart()}),ce(this,"checkPending",async()=>{if(this.pending.size===0&&(!this.initialized||!this.relayer.connected))return;const r=[];this.pending.forEach(i=>{r.push(i)}),await this.batchSubscribe(r)}),ce(this,"registerEventListeners",()=>{this.relayer.core.heartbeat.on(er.pulse,async()=>{await this.checkPending()}),this.events.on(rt.created,async r=>{const i=rt.created;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:r}),await this.persist()}),this.events.on(rt.deleted,async r=>{const i=rt.deleted;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:r}),await this.persist()})}),this.relayer=t,this.logger=Fe(e,this.name),this.clientId=""}get context(){return ot(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}get hasAnyTopics(){return this.topicMap.topics.length>0||this.pending.size>0||this.cached.length>0||this.subscriptions.size>0}hasSubscription(t,e){let r=!1;try{r=this.getSubscription(t).topic===e}catch{}return r}reset(){this.cached=[],this.initialized=!0}onDisable(){this.values.length>0&&(this.cached=this.values),this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(t,e){const r=this.topicMap.get(t);await Promise.all(r.map(async i=>await this.unsubscribeById(t,i,e)))}async unsubscribeById(t,e,r){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:t,id:e,opts:r}});try{const i=Ni(r);await this.restartToComplete({topic:t,id:e,relay:i}),await this.rpcUnsubscribe(t,e,i);const s=de("USER_DISCONNECTED",`${this.name}, ${t}`);await this.onUnsubscribe(t,e,s),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:t,id:e,opts:r}})}catch(i){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(i),i}}async rpcSubscribe(t,e,r){var i,s;const o=await this.getSubscriptionId(t);if((i=r?.internal)!=null&&i.skipSubscribe)return o;(!r||r?.transportType===ue.relay)&&await this.restartToComplete({topic:t,id:t,relay:e});const c={method:zn(e.protocol).subscribe,params:{topic:t}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:c});const l=(s=r?.internal)==null?void 0:s.throwOnFailedPublish;try{if(r?.transportType===ue.link_mode)return setTimeout(()=>{(this.relayer.connected||this.relayer.connecting)&&this.relayer.request(c).catch(d=>this.logger.warn(d))},q.toMiliseconds(q.ONE_SECOND)),o;const u=new Promise(async d=>{const f=p=>{p.topic===t&&(this.events.removeListener(rt.created,f),d(p.id))};this.events.on(rt.created,f);try{const p=await Vt(new Promise((m,w)=>{this.relayer.request(c).catch(_=>{this.logger.warn(_,_?.message),w(_)}).then(m)}),this.initialSubscribeTimeout,`Subscribing to ${t} failed, please try again`);this.events.removeListener(rt.created,f),d(p)}catch{}}),h=await Vt(u,this.subscribeTimeout,`Subscribing to ${t} failed, please try again`);if(!h&&l)throw new Error(`Subscribing to ${t} failed, please try again`);return h?o:null}catch(u){if(this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(fe.connection_stalled),l)throw u}return null}async rpcBatchSubscribe(t){if(!t.length)return;const e=t[0].relay,r={method:zn(e.protocol).batchSubscribe,params:{topics:t.map(i=>i.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r});try{await await Vt(new Promise(i=>{this.relayer.request(r).catch(s=>this.logger.warn(s)).then(i)}),this.subscribeTimeout,"rpcBatchSubscribe failed, please try again")}catch{this.relayer.events.emit(fe.connection_stalled)}}async rpcBatchFetchMessages(t){if(!t.length)return;const e=t[0].relay,r={method:zn(e.protocol).batchFetchMessages,params:{topics:t.map(s=>s.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r});let i;try{i=await await Vt(new Promise((s,o)=>{this.relayer.request(r).catch(c=>{this.logger.warn(c),o(c)}).then(s)}),this.subscribeTimeout,"rpcBatchFetchMessages failed, please try again")}catch{this.relayer.events.emit(fe.connection_stalled)}return i}rpcUnsubscribe(t,e,r){const i={method:zn(r.protocol).unsubscribe,params:{topic:t,id:e}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:i}),this.relayer.request(i)}onSubscribe(t,e){this.setSubscription(t,Ss(mr({},e),{id:t})),this.pending.delete(e.topic)}onBatchSubscribe(t){t.length&&t.forEach(e=>{this.setSubscription(e.id,mr({},e)),this.pending.delete(e.topic)})}async onUnsubscribe(t,e,r){this.events.removeAllListeners(e),this.hasSubscription(e,t)&&this.deleteSubscription(e,r),await this.relayer.messages.del(t)}async setRelayerSubscriptions(t){await this.relayer.core.storage.setItem(this.storageKey,t)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(t,e){this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:t,subscription:e}),this.addSubscription(t,e)}addSubscription(t,e){this.subscriptions.set(t,mr({},e)),this.topicMap.set(e.topic,t),this.events.emit(rt.created,e)}getSubscription(t){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:t});const e=this.subscriptions.get(t);if(!e){const{message:r}=B("NO_MATCHING_KEY",`${this.name}: ${t}`);throw new Error(r)}return e}deleteSubscription(t,e){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:t,reason:e});const r=this.getSubscription(t);this.subscriptions.delete(t),this.topicMap.delete(r.topic,t),this.events.emit(rt.deleted,Ss(mr({},r),{reason:e}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(rt.sync)}async onRestart(){if(this.cached.length){const t=[...this.cached],e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let r=0;r<e;r++){const i=t.splice(0,this.batchSubscribeTopicsLimit);await this.batchSubscribe(i)}}this.events.emit(rt.resubscribed)}async restore(){try{const t=await this.getRelayerSubscriptions();if(typeof t>"u"||!t.length)return;if(this.subscriptions.size&&!t.every(e=>{var r;return e.topic===((r=this.subscriptions.get(e.id))==null?void 0:r.topic)})){const{message:e}=B("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(e)}this.cached=t,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(t){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(t)}}async batchSubscribe(t){t.length&&(await this.rpcBatchSubscribe(t),this.onBatchSubscribe(await Promise.all(t.map(async e=>Ss(mr({},e),{id:await this.getSubscriptionId(e.topic)})))))}async batchFetchMessages(t){if(!t.length)return;this.logger.trace(`Fetching batch messages for ${t.length} subscriptions`);const e=await this.rpcBatchFetchMessages(t);e&&e.messages&&(await Vy(q.toMiliseconds(q.ONE_SECOND)),await this.relayer.handleBatchMessageEvents(e.messages))}async onConnect(){await this.restart(),this.reset()}onDisconnect(){this.onDisable()}isInitialized(){if(!this.initialized){const{message:t}=B("NOT_INITIALIZED",this.name);throw new Error(t)}}async restartToComplete(t){!this.relayer.connected&&!this.relayer.connecting&&(this.cached.push(t),await this.relayer.transportOpen())}async getClientId(){return this.clientId||(this.clientId=await this.relayer.core.crypto.getClientId()),this.clientId}async getSubscriptionId(t){return ht(t+await this.getClientId())}}var r1=Object.defineProperty,Pl=Object.getOwnPropertySymbols,i1=Object.prototype.hasOwnProperty,s1=Object.prototype.propertyIsEnumerable,Po=(n,t,e)=>t in n?r1(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Ol=(n,t)=>{for(var e in t||(t={}))i1.call(t,e)&&Po(n,e,t[e]);if(Pl)for(var e of Pl(t))s1.call(t,e)&&Po(n,e,t[e]);return n},X=(n,t,e)=>Po(n,typeof t!="symbol"?t+"":t,e);class o1 extends Wm{constructor(t){super(t),X(this,"protocol","wc"),X(this,"version",2),X(this,"core"),X(this,"logger"),X(this,"events",new $n.EventEmitter),X(this,"provider"),X(this,"messages"),X(this,"subscriber"),X(this,"publisher"),X(this,"name",$v),X(this,"transportExplicitlyClosed",!1),X(this,"initialized",!1),X(this,"connectionAttemptInProgress",!1),X(this,"relayUrl"),X(this,"projectId"),X(this,"packageName"),X(this,"bundleId"),X(this,"hasExperiencedNetworkDisruption",!1),X(this,"pingTimeout"),X(this,"heartBeatTimeout",q.toMiliseconds(q.THIRTY_SECONDS+q.FIVE_SECONDS)),X(this,"reconnectTimeout"),X(this,"connectPromise"),X(this,"reconnectInProgress",!1),X(this,"requestsInFlight",[]),X(this,"connectTimeout",q.toMiliseconds(q.ONE_SECOND*15)),X(this,"request",async e=>{var r,i;this.logger.debug("Publishing Request Payload");const s=e.id||bn().toString();await this.toEstablishConnection();try{this.logger.trace({id:s,method:e.method,topic:(r=e.params)==null?void 0:r.topic},"relayer.request - publishing...");const o=`${s}:${((i=e.params)==null?void 0:i.tag)||""}`;this.requestsInFlight.push(o);const c=await this.provider.request(e);return this.requestsInFlight=this.requestsInFlight.filter(l=>l!==o),c}catch(o){throw this.logger.debug(`Failed to Publish Request: ${s}`),o}}),X(this,"resetPingTimeout",()=>{Ci()&&(clearTimeout(this.pingTimeout),this.pingTimeout=setTimeout(()=>{var e,r,i,s;try{this.logger.debug({},"pingTimeout: Connection stalled, terminating..."),(s=(i=(r=(e=this.provider)==null?void 0:e.connection)==null?void 0:r.socket)==null?void 0:i.terminate)==null||s.call(i)}catch(o){this.logger.warn(o,o?.message)}},this.heartBeatTimeout))}),X(this,"onPayloadHandler",e=>{this.onProviderPayload(e),this.resetPingTimeout()}),X(this,"onConnectHandler",()=>{this.logger.warn({},"Relayer connected 🛜"),this.startPingTimeout(),this.events.emit(fe.connect)}),X(this,"onDisconnectHandler",()=>{this.logger.warn({},"Relayer disconnected 🛑"),this.requestsInFlight=[],this.onProviderDisconnect()}),X(this,"onProviderErrorHandler",e=>{this.logger.fatal(`Fatal socket error: ${e.message}`),this.events.emit(fe.error,e),this.logger.fatal("Fatal socket error received, closing transport"),this.transportClose()}),X(this,"registerProviderListeners",()=>{this.provider.on(ct.payload,this.onPayloadHandler),this.provider.on(ct.connect,this.onConnectHandler),this.provider.on(ct.disconnect,this.onDisconnectHandler),this.provider.on(ct.error,this.onProviderErrorHandler)}),this.core=t.core,this.logger=typeof t.logger<"u"&&typeof t.logger!="string"?Fe(t.logger,this.name):lu(jo({level:t.logger||Cv})),this.messages=new qI(this.logger,t.core),this.subscriber=new n1(this,this.logger),this.publisher=new HI(this,this.logger),this.projectId=t?.projectId,this.relayUrl=t?.relayUrl||Cd,my()?this.packageName=Ic():wy()&&(this.bundleId=Ic()),this.provider={}}async init(){this.logger.trace("Initialized"),this.registerEventListeners(),await Promise.all([this.messages.init(),this.subscriber.init()]),this.initialized=!0,this.transportOpen().catch(t=>this.logger.warn(t,t?.message))}get context(){return ot(this.logger)}get connected(){var t,e,r;return((r=(e=(t=this.provider)==null?void 0:t.connection)==null?void 0:e.socket)==null?void 0:r.readyState)===1||!1}get connecting(){var t,e,r;return((r=(e=(t=this.provider)==null?void 0:t.connection)==null?void 0:e.socket)==null?void 0:r.readyState)===0||this.connectPromise!==void 0||!1}async publish(t,e,r){this.isInitialized(),await this.publisher.publish(t,e,r),await this.recordMessageEvent({topic:t,message:e,publishedAt:Date.now(),transportType:ue.relay},yi.outbound)}async publishCustom(t){this.isInitialized(),await this.publisher.publishCustom(t)}async subscribe(t,e){var r,i,s;this.isInitialized(),(!(e!=null&&e.transportType)||e?.transportType==="relay")&&await this.toEstablishConnection();const o=typeof((r=e?.internal)==null?void 0:r.throwOnFailedPublish)>"u"?!0:(i=e?.internal)==null?void 0:i.throwOnFailedPublish;let c=((s=this.subscriber.topicMap.get(t))==null?void 0:s[0])||"",l;const u=h=>{h.topic===t&&(this.subscriber.off(rt.created,u),l())};return await Promise.all([new Promise(h=>{l=h,this.subscriber.on(rt.created,u)}),new Promise(async(h,d)=>{c=await this.subscriber.subscribe(t,Ol({internal:{throwOnFailedPublish:o}},e)).catch(f=>{o&&d(f)})||c,h()})]),c}async unsubscribe(t,e){this.isInitialized(),await this.subscriber.unsubscribe(t,e)}on(t,e){this.events.on(t,e)}once(t,e){this.events.once(t,e)}off(t,e){this.events.off(t,e)}removeListener(t,e){this.events.removeListener(t,e)}async transportDisconnect(){this.provider.disconnect&&(this.hasExperiencedNetworkDisruption||this.connected)?await Vt(this.provider.disconnect(),2e3,"provider.disconnect()").catch(()=>this.onProviderDisconnect()):this.onProviderDisconnect()}async transportClose(){this.transportExplicitlyClosed=!0,await this.transportDisconnect()}async transportOpen(t){if(!this.subscriber.hasAnyTopics){this.logger.info("Starting WS connection skipped because the client has no topics to work with.");return}if(this.connectPromise?(this.logger.debug({},"Waiting for existing connection attempt to resolve..."),await this.connectPromise,this.logger.debug({},"Existing connection attempt resolved")):(this.connectPromise=new Promise(async(e,r)=>{await this.connect(t).then(e).catch(r).finally(()=>{this.connectPromise=void 0})}),await this.connectPromise),!this.connected)throw new Error(`Couldn't establish socket connection to the relay server: ${this.relayUrl}`)}async restartTransport(t){this.logger.debug({},"Restarting transport..."),!this.connectionAttemptInProgress&&(this.relayUrl=t||this.relayUrl,await this.confirmOnlineStateOrThrow(),await this.transportClose(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await fl())throw new Error("No internet connection detected. Please restart your network and try again.")}async handleBatchMessageEvents(t){if(t?.length===0){this.logger.trace("Batch message events is empty. Ignoring...");return}const e=t.sort((r,i)=>r.publishedAt-i.publishedAt);this.logger.debug(`Batch of ${e.length} message events sorted`);for(const r of e)try{await this.onMessageEvent(r)}catch(i){this.logger.warn(i,"Error while processing batch message event: "+i?.message)}this.logger.trace(`Batch of ${e.length} message events processed`)}async onLinkMessageEvent(t,e){const{topic:r}=t;if(!e.sessionExists){const i=ye(q.FIVE_MINUTES),s={topic:r,expiry:i,relay:{protocol:"irn"},active:!1};await this.core.pairing.pairings.set(r,s)}this.events.emit(fe.message,t),await this.recordMessageEvent(t,yi.inbound)}async connect(t){await this.confirmOnlineStateOrThrow(),t&&t!==this.relayUrl&&(this.relayUrl=t,await this.transportDisconnect()),this.connectionAttemptInProgress=!0,this.transportExplicitlyClosed=!1;let e=1;for(;e<6;){try{if(this.transportExplicitlyClosed)break;this.logger.debug({},`Connecting to ${this.relayUrl}, attempt: ${e}...`),await this.createProvider(),await new Promise(async(r,i)=>{const s=()=>{i(new Error("Connection interrupted while trying to connect"))};this.provider.once(ct.disconnect,s),await Vt(new Promise((o,c)=>{this.provider.connect().then(o).catch(c)}),this.connectTimeout,`Socket stalled when trying to connect to ${this.relayUrl}`).catch(o=>{i(o)}).finally(()=>{this.provider.off(ct.disconnect,s),clearTimeout(this.reconnectTimeout)}),await new Promise(async(o,c)=>{const l=()=>{i(new Error("Connection interrupted while trying to subscribe"))};this.provider.once(ct.disconnect,l),await this.subscriber.start().then(o).catch(c).finally(()=>{this.provider.off(ct.disconnect,l)})}),this.hasExperiencedNetworkDisruption=!1,r()})}catch(r){await this.subscriber.stop();const i=r;this.logger.warn({},i.message),this.hasExperiencedNetworkDisruption=!0}finally{this.connectionAttemptInProgress=!1}if(this.connected){this.logger.debug({},`Connected to ${this.relayUrl} successfully on attempt: ${e}`);break}await new Promise(r=>setTimeout(r,q.toMiliseconds(e*1))),e++}}startPingTimeout(){var t,e,r,i,s;if(Ci())try{(e=(t=this.provider)==null?void 0:t.connection)!=null&&e.socket&&((s=(i=(r=this.provider)==null?void 0:r.connection)==null?void 0:i.socket)==null||s.on("ping",()=>{this.resetPingTimeout()})),this.resetPingTimeout()}catch(o){this.logger.warn(o,o?.message)}}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const t=await this.core.crypto.signJWT(this.relayUrl);this.provider=new rp(new ip(by({sdkVersion:Eo,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:t,useOnCloseEvent:!0,bundleId:this.bundleId,packageName:this.packageName}))),this.registerProviderListeners()}async recordMessageEvent(t,e){const{topic:r,message:i}=t;await this.messages.set(r,i,e)}async shouldIgnoreMessageEvent(t){const{topic:e,message:r}=t;if(!r||r.length===0)return this.logger.warn(`Ignoring invalid/empty message: ${r}`),!0;if(!await this.subscriber.isKnownTopic(e))return this.logger.warn(`Ignoring message for unknown topic ${e}`),!0;const i=this.messages.has(e,r);return i&&this.logger.warn(`Ignoring duplicate message: ${r}`),i}async onProviderPayload(t){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:t}),zo(t)){if(!t.method.endsWith(kv))return;const e=t.params,{topic:r,message:i,publishedAt:s,attestation:o}=e.data,c={topic:r,message:i,publishedAt:s,transportType:ue.relay,attestation:o};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(Ol({type:"event",event:e.id},c)),this.events.emit(e.id,c),await this.acknowledgePayload(t),await this.onMessageEvent(c)}else Ko(t)&&this.events.emit(fe.message_ack,t)}async onMessageEvent(t){await this.shouldIgnoreMessageEvent(t)||(await this.recordMessageEvent(t,yi.inbound),this.events.emit(fe.message,t))}async acknowledgePayload(t){const e=Ai(t.id,!0);await this.provider.connection.send(e)}unregisterProviderListeners(){this.provider.off(ct.payload,this.onPayloadHandler),this.provider.off(ct.connect,this.onConnectHandler),this.provider.off(ct.disconnect,this.onDisconnectHandler),this.provider.off(ct.error,this.onProviderErrorHandler),clearTimeout(this.pingTimeout)}async registerEventListeners(){let t=await fl();hv(async e=>{t!==e&&(t=e,e?await this.transportOpen().catch(r=>this.logger.error(r,r?.message)):(this.hasExperiencedNetworkDisruption=!0,await this.transportDisconnect(),this.transportExplicitlyClosed=!1))}),this.core.heartbeat.on(er.pulse,async()=>{if(!this.transportExplicitlyClosed&&!this.connected&&pv())try{await this.confirmOnlineStateOrThrow(),await this.transportOpen()}catch(e){this.logger.warn(e,e?.message)}})}async onProviderDisconnect(){clearTimeout(this.pingTimeout),this.events.emit(fe.disconnect),this.connectionAttemptInProgress=!1,!this.reconnectInProgress&&(this.reconnectInProgress=!0,await this.subscriber.stop(),this.subscriber.hasAnyTopics&&(this.transportExplicitlyClosed||(this.reconnectTimeout=setTimeout(async()=>{await this.transportOpen().catch(t=>this.logger.error(t,t?.message)),this.reconnectTimeout=void 0,this.reconnectInProgress=!1},q.toMiliseconds(Uv)))))}isInitialized(){if(!this.initialized){const{message:t}=B("NOT_INITIALIZED",this.name);throw new Error(t)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectPromise){await this.connectPromise;return}await this.connect()}}}function a1(n,t){return n===t||Number.isNaN(n)&&Number.isNaN(t)}function Rl(n){return Object.getOwnPropertySymbols(n).filter(t=>Object.prototype.propertyIsEnumerable.call(n,t))}function Ll(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}const c1="[object RegExp]",l1="[object String]",u1="[object Number]",h1="[object Boolean]",Dl="[object Arguments]",d1="[object Symbol]",f1="[object Date]",p1="[object Map]",_1="[object Set]",m1="[object Array]",w1="[object Function]",y1="[object ArrayBuffer]",Cs="[object Object]",g1="[object Error]",E1="[object DataView]",v1="[object Uint8Array]",b1="[object Uint8ClampedArray]",I1="[object Uint16Array]",A1="[object Uint32Array]",T1="[object BigUint64Array]",P1="[object Int8Array]",O1="[object Int16Array]",R1="[object Int32Array]",L1="[object BigInt64Array]",D1="[object Float32Array]",x1="[object Float64Array]";function V1(){}function xl(n){if(!n||typeof n!="object")return!1;const t=Object.getPrototypeOf(n);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(n)==="[object Object]":!1}function S1(n,t,e){return br(n,t,void 0,void 0,void 0,void 0,e)}function br(n,t,e,r,i,s,o){const c=o(n,t,e,r,i,s);if(c!==void 0)return c;if(typeof n==typeof t)switch(typeof n){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return n===t;case"number":return n===t||Object.is(n,t);case"function":return n===t;case"object":return Dr(n,t,s,o)}return Dr(n,t,s,o)}function Dr(n,t,e,r){if(Object.is(n,t))return!0;let i=Ll(n),s=Ll(t);if(i===Dl&&(i=Cs),s===Dl&&(s=Cs),i!==s)return!1;switch(i){case l1:return n.toString()===t.toString();case u1:{const l=n.valueOf(),u=t.valueOf();return a1(l,u)}case h1:case f1:case d1:return Object.is(n.valueOf(),t.valueOf());case c1:return n.source===t.source&&n.flags===t.flags;case w1:return n===t}e=e??new Map;const o=e.get(n),c=e.get(t);if(o!=null&&c!=null)return o===t;e.set(n,t),e.set(t,n);try{switch(i){case p1:{if(n.size!==t.size)return!1;for(const[l,u]of n.entries())if(!t.has(l)||!br(u,t.get(l),l,n,t,e,r))return!1;return!0}case _1:{if(n.size!==t.size)return!1;const l=Array.from(n.values()),u=Array.from(t.values());for(let h=0;h<l.length;h++){const d=l[h],f=u.findIndex(p=>br(d,p,void 0,n,t,e,r));if(f===-1)return!1;u.splice(f,1)}return!0}case m1:case v1:case b1:case I1:case A1:case T1:case P1:case O1:case R1:case L1:case D1:case x1:{if(typeof Buffer<"u"&&Buffer.isBuffer(n)!==Buffer.isBuffer(t)||n.length!==t.length)return!1;for(let l=0;l<n.length;l++)if(!br(n[l],t[l],l,n,t,e,r))return!1;return!0}case y1:return n.byteLength!==t.byteLength?!1:Dr(new Uint8Array(n),new Uint8Array(t),e,r);case E1:return n.byteLength!==t.byteLength||n.byteOffset!==t.byteOffset?!1:Dr(new Uint8Array(n),new Uint8Array(t),e,r);case g1:return n.name===t.name&&n.message===t.message;case Cs:{if(!(Dr(n.constructor,t.constructor,e,r)||xl(n)&&xl(t)))return!1;const l=[...Object.keys(n),...Rl(n)],u=[...Object.keys(t),...Rl(t)];if(l.length!==u.length)return!1;for(let h=0;h<l.length;h++){const d=l[h],f=n[d];if(!Object.hasOwn(t,d))return!1;const p=t[d];if(!br(f,p,d,n,t,e,r))return!1}return!0}default:return!1}}finally{e.delete(n),e.delete(t)}}function C1(n,t){return S1(n,t,V1)}var $1=Object.defineProperty,Vl=Object.getOwnPropertySymbols,k1=Object.prototype.hasOwnProperty,U1=Object.prototype.propertyIsEnumerable,Oo=(n,t,e)=>t in n?$1(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Sl=(n,t)=>{for(var e in t||(t={}))k1.call(t,e)&&Oo(n,e,t[e]);if(Vl)for(var e of Vl(t))U1.call(t,e)&&Oo(n,e,t[e]);return n},We=(n,t,e)=>Oo(n,typeof t!="symbol"?t+"":t,e);class kn extends Hm{constructor(t,e,r,i=Ct,s=void 0){super(t,e,r,i),this.core=t,this.logger=e,this.name=r,We(this,"map",new Map),We(this,"version",Nv),We(this,"cached",[]),We(this,"initialized",!1),We(this,"getKey"),We(this,"storagePrefix",Ct),We(this,"recentlyDeleted",[]),We(this,"recentlyDeletedLimit",200),We(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(o=>{this.getKey&&o!==null&&!be(o)?this.map.set(this.getKey(o),o):jE(o)?this.map.set(o.id,o):zE(o)&&this.map.set(o.topic,o)}),this.cached=[],this.initialized=!0)}),We(this,"set",async(o,c)=>{this.isInitialized(),this.map.has(o)?await this.update(o,c):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:o,value:c}),this.map.set(o,c),await this.persist())}),We(this,"get",o=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:o}),this.getData(o))),We(this,"getAll",o=>(this.isInitialized(),o?this.values.filter(c=>Object.keys(o).every(l=>C1(c[l],o[l]))):this.values)),We(this,"update",async(o,c)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:o,update:c});const l=Sl(Sl({},this.getData(o)),c);this.map.set(o,l),await this.persist()}),We(this,"delete",async(o,c)=>{this.isInitialized(),this.map.has(o)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:o,reason:c}),this.map.delete(o),this.addToRecentlyDeleted(o),await this.persist())}),this.logger=Fe(e,this.name),this.storagePrefix=i,this.getKey=s}get context(){return ot(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}addToRecentlyDeleted(t){this.recentlyDeleted.push(t),this.recentlyDeleted.length>=this.recentlyDeletedLimit&&this.recentlyDeleted.splice(0,this.recentlyDeletedLimit/2)}async setDataStore(t){await this.core.storage.setItem(this.storageKey,t)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(t){const e=this.map.get(t);if(!e){if(this.recentlyDeleted.includes(t)){const{message:i}=B("MISSING_OR_INVALID",`Record was recently deleted - ${this.name}: ${t}`);throw this.logger.error(i),new Error(i)}const{message:r}=B("NO_MATCHING_KEY",`${this.name}: ${t}`);throw this.logger.error(r),new Error(r)}return e}async persist(){await this.setDataStore(this.values)}async restore(){try{const t=await this.getDataStore();if(typeof t>"u"||!t.length)return;if(this.map.size){const{message:e}=B("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=t,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(t){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(t)}}isInitialized(){if(!this.initialized){const{message:t}=B("NOT_INITIALIZED",this.name);throw new Error(t)}}}var N1=Object.defineProperty,B1=(n,t,e)=>t in n?N1(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Z=(n,t,e)=>B1(n,typeof t!="symbol"?t+"":t,e);class M1{constructor(t,e){this.core=t,this.logger=e,Z(this,"name",jv),Z(this,"version",zv),Z(this,"events",new om),Z(this,"pairings"),Z(this,"initialized",!1),Z(this,"storagePrefix",Ct),Z(this,"ignoredPayloadTypes",[Kt]),Z(this,"registeredMethods",[]),Z(this,"init",async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))}),Z(this,"register",({methods:r})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...r])]}),Z(this,"create",async r=>{this.isInitialized();const i=yo(),s=await this.core.crypto.setSymKey(i),o=ye(q.FIVE_MINUTES),c={protocol:Sd},l={topic:s,expiry:o,relay:c,active:!1,methods:r?.methods},u=il({protocol:this.core.protocol,version:this.core.version,topic:s,symKey:i,relay:c,expiryTimestamp:o,methods:r?.methods});return this.events.emit(vn.create,l),this.core.expirer.set(s,o),await this.pairings.set(s,l),await this.core.relayer.subscribe(s,{transportType:r?.transportType,internal:r?.internal}),{topic:s,uri:u}}),Z(this,"pair",async r=>{this.isInitialized();const i=this.core.eventClient.createEvent({properties:{topic:r?.uri,trace:[Lt.pairing_started]}});this.isValidPair(r,i);const{topic:s,symKey:o,relay:c,expiryTimestamp:l,methods:u}=rl(r.uri);i.props.properties.topic=s,i.addTrace(Lt.pairing_uri_validation_success),i.addTrace(Lt.pairing_uri_not_expired);let h;if(this.pairings.keys.includes(s)){if(h=this.pairings.get(s),i.addTrace(Lt.existing_pairing),h.active)throw i.setError(Bt.active_pairing_already_exists),new Error(`Pairing already exists: ${s}. Please try again with a new connection URI.`);i.addTrace(Lt.pairing_not_expired)}const d=l||ye(q.FIVE_MINUTES),f={topic:s,relay:c,expiry:d,active:!1,methods:u};this.core.expirer.set(s,d),await this.pairings.set(s,f),i.addTrace(Lt.store_new_pairing),r.activatePairing&&await this.activate({topic:s}),this.events.emit(vn.create,f),i.addTrace(Lt.emit_inactive_pairing),this.core.crypto.keychain.has(s)||await this.core.crypto.setSymKey(o,s),i.addTrace(Lt.subscribing_pairing_topic);try{await this.core.relayer.confirmOnlineStateOrThrow()}catch{i.setError(Bt.no_internet_connection)}try{await this.core.relayer.subscribe(s,{relay:c})}catch(p){throw i.setError(Bt.subscribe_pairing_topic_failure),p}return i.addTrace(Lt.subscribe_pairing_topic_success),f}),Z(this,"activate",async({topic:r})=>{this.isInitialized();const i=ye(q.FIVE_MINUTES);this.core.expirer.set(r,i),await this.pairings.update(r,{active:!0,expiry:i})}),Z(this,"ping",async r=>{this.isInitialized(),await this.isValidPing(r),this.logger.warn("ping() is deprecated and will be removed in the next major release.");const{topic:i}=r;if(this.pairings.keys.includes(i)){const s=await this.sendRequest(i,"wc_pairingPing",{}),{done:o,resolve:c,reject:l}=gn();this.events.once(ne("pairing_ping",s),({error:u})=>{u?l(u):c()}),await o()}}),Z(this,"updateExpiry",async({topic:r,expiry:i})=>{this.isInitialized(),await this.pairings.update(r,{expiry:i})}),Z(this,"updateMetadata",async({topic:r,metadata:i})=>{this.isInitialized(),await this.pairings.update(r,{peerMetadata:i})}),Z(this,"getPairings",()=>(this.isInitialized(),this.pairings.values)),Z(this,"disconnect",async r=>{this.isInitialized(),await this.isValidDisconnect(r);const{topic:i}=r;this.pairings.keys.includes(i)&&(await this.sendRequest(i,"wc_pairingDelete",de("USER_DISCONNECTED")),await this.deletePairing(i))}),Z(this,"formatUriFromPairing",r=>{this.isInitialized();const{topic:i,relay:s,expiry:o,methods:c}=r,l=this.core.crypto.keychain.get(i);return il({protocol:this.core.protocol,version:this.core.version,topic:i,symKey:l,relay:s,expiryTimestamp:o,methods:c})}),Z(this,"sendRequest",async(r,i,s)=>{const o=on(i,s),c=await this.core.crypto.encode(r,o),l=fr[i].req;return this.core.history.set(r,o),this.core.relayer.publish(r,c,l),o.id}),Z(this,"sendResult",async(r,i,s)=>{const o=Ai(r,s),c=await this.core.crypto.encode(i,o),l=(await this.core.history.get(i,r)).request.method,u=fr[l].res;await this.core.relayer.publish(i,c,u),await this.core.history.resolve(o)}),Z(this,"sendError",async(r,i,s)=>{const o=uu(r,s),c=await this.core.crypto.encode(i,o),l=(await this.core.history.get(i,r)).request.method,u=fr[l]?fr[l].res:fr.unregistered_method.res;await this.core.relayer.publish(i,c,u),await this.core.history.resolve(o)}),Z(this,"deletePairing",async(r,i)=>{await this.core.relayer.unsubscribe(r),await Promise.all([this.pairings.delete(r,de("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(r),i?Promise.resolve():this.core.expirer.del(r)])}),Z(this,"cleanup",async()=>{const r=this.pairings.getAll().filter(i=>an(i.expiry));await Promise.all(r.map(i=>this.deletePairing(i.topic)))}),Z(this,"onRelayEventRequest",async r=>{const{topic:i,payload:s}=r;switch(s.method){case"wc_pairingPing":return await this.onPairingPingRequest(i,s);case"wc_pairingDelete":return await this.onPairingDeleteRequest(i,s);default:return await this.onUnknownRpcMethodRequest(i,s)}}),Z(this,"onRelayEventResponse",async r=>{const{topic:i,payload:s}=r,o=(await this.core.history.get(i,s.id)).request.method;switch(o){case"wc_pairingPing":return this.onPairingPingResponse(i,s);default:return this.onUnknownRpcMethodResponse(o)}}),Z(this,"onPairingPingRequest",async(r,i)=>{const{id:s}=i;try{this.isValidPing({topic:r}),await this.sendResult(s,r,!0),this.events.emit(vn.ping,{id:s,topic:r})}catch(o){await this.sendError(s,r,o),this.logger.error(o)}}),Z(this,"onPairingPingResponse",(r,i)=>{const{id:s}=i;setTimeout(()=>{Ut(i)?this.events.emit(ne("pairing_ping",s),{}):Dt(i)&&this.events.emit(ne("pairing_ping",s),{error:i.error})},500)}),Z(this,"onPairingDeleteRequest",async(r,i)=>{const{id:s}=i;try{this.isValidDisconnect({topic:r}),await this.deletePairing(r),this.events.emit(vn.delete,{id:s,topic:r})}catch(o){await this.sendError(s,r,o),this.logger.error(o)}}),Z(this,"onUnknownRpcMethodRequest",async(r,i)=>{const{id:s,method:o}=i;try{if(this.registeredMethods.includes(o))return;const c=de("WC_METHOD_UNSUPPORTED",o);await this.sendError(s,r,c),this.logger.error(c)}catch(c){await this.sendError(s,r,c),this.logger.error(c)}}),Z(this,"onUnknownRpcMethodResponse",r=>{this.registeredMethods.includes(r)||this.logger.error(de("WC_METHOD_UNSUPPORTED",r))}),Z(this,"isValidPair",(r,i)=>{var s;if(!Ge(r)){const{message:c}=B("MISSING_OR_INVALID",`pair() params: ${r}`);throw i.setError(Bt.malformed_pairing_uri),new Error(c)}if(!qE(r.uri)){const{message:c}=B("MISSING_OR_INVALID",`pair() uri: ${r.uri}`);throw i.setError(Bt.malformed_pairing_uri),new Error(c)}const o=rl(r?.uri);if(!((s=o?.relay)!=null&&s.protocol)){const{message:c}=B("MISSING_OR_INVALID","pair() uri#relay-protocol");throw i.setError(Bt.malformed_pairing_uri),new Error(c)}if(!(o!=null&&o.symKey)){const{message:c}=B("MISSING_OR_INVALID","pair() uri#symKey");throw i.setError(Bt.malformed_pairing_uri),new Error(c)}if(o!=null&&o.expiryTimestamp&&q.toMiliseconds(o?.expiryTimestamp)<Date.now()){i.setError(Bt.pairing_expired);const{message:c}=B("EXPIRED","pair() URI has expired. Please try again with a new connection URI.");throw new Error(c)}}),Z(this,"isValidPing",async r=>{if(!Ge(r)){const{message:s}=B("MISSING_OR_INVALID",`ping() params: ${r}`);throw new Error(s)}const{topic:i}=r;await this.isValidPairingTopic(i)}),Z(this,"isValidDisconnect",async r=>{if(!Ge(r)){const{message:s}=B("MISSING_OR_INVALID",`disconnect() params: ${r}`);throw new Error(s)}const{topic:i}=r;await this.isValidPairingTopic(i)}),Z(this,"isValidPairingTopic",async r=>{if(!me(r,!1)){const{message:i}=B("MISSING_OR_INVALID",`pairing topic should be a string: ${r}`);throw new Error(i)}if(!this.pairings.keys.includes(r)){const{message:i}=B("NO_MATCHING_KEY",`pairing topic doesn't exist: ${r}`);throw new Error(i)}if(an(this.pairings.get(r).expiry)){await this.deletePairing(r);const{message:i}=B("EXPIRED",`pairing topic: ${r}`);throw new Error(i)}}),this.core=t,this.logger=Fe(e,this.name),this.pairings=new kn(this.core,this.logger,this.name,this.storagePrefix)}get context(){return ot(this.logger)}isInitialized(){if(!this.initialized){const{message:t}=B("NOT_INITIALIZED",this.name);throw new Error(t)}}registerRelayerEvents(){this.core.relayer.on(fe.message,async t=>{const{topic:e,message:r,transportType:i}=t;if(this.pairings.keys.includes(e)&&i!==ue.link_mode&&!this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(r)))try{const s=await this.core.crypto.decode(e,r);zo(s)?(this.core.history.set(e,s),await this.onRelayEventRequest({topic:e,payload:s})):Ko(s)&&(await this.core.history.resolve(s),await this.onRelayEventResponse({topic:e,payload:s}),this.core.history.delete(e,s.id)),await this.core.relayer.messages.ack(e,r)}catch(s){this.logger.error(s)}})}registerExpirerEvents(){this.core.expirer.on(ut.expired,async t=>{const{topic:e}=Uh(t.target);e&&this.pairings.keys.includes(e)&&(await this.deletePairing(e,!0),this.events.emit(vn.expire,{topic:e}))})}}var q1=Object.defineProperty,j1=(n,t,e)=>t in n?q1(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Le=(n,t,e)=>j1(n,typeof t!="symbol"?t+"":t,e);class z1 extends zm{constructor(t,e){super(t,e),this.core=t,this.logger=e,Le(this,"records",new Map),Le(this,"events",new $n.EventEmitter),Le(this,"name",Kv),Le(this,"version",Fv),Le(this,"cached",[]),Le(this,"initialized",!1),Le(this,"storagePrefix",Ct),Le(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(r=>this.records.set(r.id,r)),this.cached=[],this.registerEventListeners(),this.initialized=!0)}),Le(this,"set",(r,i,s)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:r,request:i,chainId:s}),this.records.has(i.id))return;const o={id:i.id,topic:r,request:{method:i.method,params:i.params||null},chainId:s,expiry:ye(q.THIRTY_DAYS)};this.records.set(o.id,o),this.persist(),this.events.emit(mt.created,o)}),Le(this,"resolve",async r=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:r}),!this.records.has(r.id))return;const i=await this.getRecord(r.id);typeof i.response>"u"&&(i.response=Dt(r)?{error:r.error}:{result:r.result},this.records.set(i.id,i),this.persist(),this.events.emit(mt.updated,i))}),Le(this,"get",async(r,i)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:r,id:i}),await this.getRecord(i))),Le(this,"delete",(r,i)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:i}),this.values.forEach(s=>{if(s.topic===r){if(typeof i<"u"&&s.id!==i)return;this.records.delete(s.id),this.events.emit(mt.deleted,s)}}),this.persist()}),Le(this,"exists",async(r,i)=>(this.isInitialized(),this.records.has(i)?(await this.getRecord(i)).topic===r:!1)),Le(this,"on",(r,i)=>{this.events.on(r,i)}),Le(this,"once",(r,i)=>{this.events.once(r,i)}),Le(this,"off",(r,i)=>{this.events.off(r,i)}),Le(this,"removeListener",(r,i)=>{this.events.removeListener(r,i)}),this.logger=Fe(e,this.name)}get context(){return ot(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const t=[];return this.values.forEach(e=>{if(typeof e.response<"u")return;const r={topic:e.topic,request:on(e.request.method,e.request.params,e.id),chainId:e.chainId};return t.push(r)}),t}async setJsonRpcRecords(t){await this.core.storage.setItem(this.storageKey,t)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(t){this.isInitialized();const e=this.records.get(t);if(!e){const{message:r}=B("NO_MATCHING_KEY",`${this.name}: ${t}`);throw new Error(r)}return e}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(mt.sync)}async restore(){try{const t=await this.getJsonRpcRecords();if(typeof t>"u"||!t.length)return;if(this.records.size){const{message:e}=B("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=t,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(t){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(t)}}registerEventListeners(){this.events.on(mt.created,t=>{const e=mt.created;this.logger.info(`Emitting ${e}`),this.logger.debug({type:"event",event:e,record:t})}),this.events.on(mt.updated,t=>{const e=mt.updated;this.logger.info(`Emitting ${e}`),this.logger.debug({type:"event",event:e,record:t})}),this.events.on(mt.deleted,t=>{const e=mt.deleted;this.logger.info(`Emitting ${e}`),this.logger.debug({type:"event",event:e,record:t})}),this.core.heartbeat.on(er.pulse,()=>{this.cleanup()})}cleanup(){try{this.isInitialized();let t=!1;this.records.forEach(e=>{q.toMiliseconds(e.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${e.id}`),this.records.delete(e.id),this.events.emit(mt.deleted,e,!1),t=!0)}),t&&this.persist()}catch(t){this.logger.warn(t)}}isInitialized(){if(!this.initialized){const{message:t}=B("NOT_INITIALIZED",this.name);throw new Error(t)}}}var K1=Object.defineProperty,F1=(n,t,e)=>t in n?K1(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Ne=(n,t,e)=>F1(n,typeof t!="symbol"?t+"":t,e);class W1 extends Zm{constructor(t,e){super(t,e),this.core=t,this.logger=e,Ne(this,"expirations",new Map),Ne(this,"events",new $n.EventEmitter),Ne(this,"name",Wv),Ne(this,"version",Hv),Ne(this,"cached",[]),Ne(this,"initialized",!1),Ne(this,"storagePrefix",Ct),Ne(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(r=>this.expirations.set(r.target,r)),this.cached=[],this.registerEventListeners(),this.initialized=!0)}),Ne(this,"has",r=>{try{const i=this.formatTarget(r);return typeof this.getExpiration(i)<"u"}catch{return!1}}),Ne(this,"set",(r,i)=>{this.isInitialized();const s=this.formatTarget(r),o={target:s,expiry:i};this.expirations.set(s,o),this.checkExpiry(s,o),this.events.emit(ut.created,{target:s,expiration:o})}),Ne(this,"get",r=>{this.isInitialized();const i=this.formatTarget(r);return this.getExpiration(i)}),Ne(this,"del",r=>{if(this.isInitialized(),this.has(r)){const i=this.formatTarget(r),s=this.getExpiration(i);this.expirations.delete(i),this.events.emit(ut.deleted,{target:i,expiration:s})}}),Ne(this,"on",(r,i)=>{this.events.on(r,i)}),Ne(this,"once",(r,i)=>{this.events.once(r,i)}),Ne(this,"off",(r,i)=>{this.events.off(r,i)}),Ne(this,"removeListener",(r,i)=>{this.events.removeListener(r,i)}),this.logger=Fe(e,this.name)}get context(){return ot(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(t){if(typeof t=="string")return Iy(t);if(typeof t=="number")return Ay(t);const{message:e}=B("UNKNOWN_TYPE",`Target type: ${typeof t}`);throw new Error(e)}async setExpirations(t){await this.core.storage.setItem(this.storageKey,t)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(ut.sync)}async restore(){try{const t=await this.getExpirations();if(typeof t>"u"||!t.length)return;if(this.expirations.size){const{message:e}=B("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=t,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(t){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(t)}}getExpiration(t){const e=this.expirations.get(t);if(!e){const{message:r}=B("NO_MATCHING_KEY",`${this.name}: ${t}`);throw this.logger.warn(r),new Error(r)}return e}checkExpiry(t,e){const{expiry:r}=e;q.toMiliseconds(r)-Date.now()<=0&&this.expire(t,e)}expire(t,e){this.expirations.delete(t),this.events.emit(ut.expired,{target:t,expiration:e})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((t,e)=>this.checkExpiry(e,t))}registerEventListeners(){this.core.heartbeat.on(er.pulse,()=>this.checkExpirations()),this.events.on(ut.created,t=>{const e=ut.created;this.logger.info(`Emitting ${e}`),this.logger.debug({type:"event",event:e,data:t}),this.persist()}),this.events.on(ut.expired,t=>{const e=ut.expired;this.logger.info(`Emitting ${e}`),this.logger.debug({type:"event",event:e,data:t}),this.persist()}),this.events.on(ut.deleted,t=>{const e=ut.deleted;this.logger.info(`Emitting ${e}`),this.logger.debug({type:"event",event:e,data:t}),this.persist()})}isInitialized(){if(!this.initialized){const{message:t}=B("NOT_INITIALIZED",this.name);throw new Error(t)}}}var H1=Object.defineProperty,G1=(n,t,e)=>t in n?H1(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,_e=(n,t,e)=>G1(n,typeof t!="symbol"?t+"":t,e);class Z1 extends Ym{constructor(t,e,r){super(t,e,r),this.core=t,this.logger=e,this.store=r,_e(this,"name",Gv),_e(this,"abortController"),_e(this,"isDevEnv"),_e(this,"verifyUrlV3",Yv),_e(this,"storagePrefix",Ct),_e(this,"version",Vd),_e(this,"publicKey"),_e(this,"fetchPromise"),_e(this,"init",async()=>{var i;this.isDevEnv||(this.publicKey=await this.store.getItem(this.storeKey),this.publicKey&&q.toMiliseconds((i=this.publicKey)==null?void 0:i.expiresAt)<Date.now()&&(this.logger.debug("verify v2 public key expired"),await this.removePublicKey()))}),_e(this,"register",async i=>{if(!nr()||this.isDevEnv)return;const s=window.location.origin,{id:o,decryptedId:c}=i,l=`${this.verifyUrlV3}/attestation?projectId=${this.core.projectId}&origin=${s}&id=${o}&decryptedId=${c}`;try{const u=Gn(),h=this.startAbortTimer(q.ONE_SECOND*5),d=await new Promise((f,p)=>{const m=()=>{window.removeEventListener("message",_),u.body.removeChild(w),p("attestation aborted")};this.abortController.signal.addEventListener("abort",m);const w=u.createElement("iframe");w.src=l,w.style.display="none",w.addEventListener("error",m,{signal:this.abortController.signal});const _=E=>{if(E.data&&typeof E.data=="string")try{const v=JSON.parse(E.data);if(v.type==="verify_attestation"){if(Fs(v.attestation).payload.id!==o)return;clearInterval(h),u.body.removeChild(w),this.abortController.signal.removeEventListener("abort",m),window.removeEventListener("message",_),f(v.attestation===null?"":v.attestation)}}catch(v){this.logger.warn(v)}};u.body.appendChild(w),window.addEventListener("message",_,{signal:this.abortController.signal})});return this.logger.debug("jwt attestation",d),d}catch(u){this.logger.warn(u)}return""}),_e(this,"resolve",async i=>{if(this.isDevEnv)return"";const{attestationId:s,hash:o,encryptedId:c}=i;if(s===""){this.logger.debug("resolve: attestationId is empty, skipping");return}if(s){if(Fs(s).payload.id!==c)return;const u=await this.isValidJwtAttestation(s);if(u){if(!u.isVerified){this.logger.warn("resolve: jwt attestation: origin url not verified");return}return u}}if(!o)return;const l=this.getVerifyUrl(i?.verifyUrl);return this.fetchAttestation(o,l)}),_e(this,"fetchAttestation",async(i,s)=>{this.logger.debug(`resolving attestation: ${i} from url: ${s}`);const o=this.startAbortTimer(q.ONE_SECOND*5),c=await fetch(`${s}/attestation/${i}?v2Supported=true`,{signal:this.abortController.signal});return clearTimeout(o),c.status===200?await c.json():void 0}),_e(this,"getVerifyUrl",i=>{let s=i||Lr;return Jv.includes(s)||(this.logger.info(`verify url: ${s}, not included in trusted list, assigning default: ${Lr}`),s=Lr),s}),_e(this,"fetchPublicKey",async()=>{try{this.logger.debug(`fetching public key from: ${this.verifyUrlV3}`);const i=this.startAbortTimer(q.FIVE_SECONDS),s=await fetch(`${this.verifyUrlV3}/public-key`,{signal:this.abortController.signal});return clearTimeout(i),await s.json()}catch(i){this.logger.warn(i)}}),_e(this,"persistPublicKey",async i=>{this.logger.debug("persisting public key to local storage",i),await this.store.setItem(this.storeKey,i),this.publicKey=i}),_e(this,"removePublicKey",async()=>{this.logger.debug("removing verify v2 public key from storage"),await this.store.removeItem(this.storeKey),this.publicKey=void 0}),_e(this,"isValidJwtAttestation",async i=>{const s=await this.getPublicKey();try{if(s)return this.validateAttestation(i,s)}catch(c){this.logger.error(c),this.logger.warn("error validating attestation")}const o=await this.fetchAndPersistPublicKey();try{if(o)return this.validateAttestation(i,o)}catch(c){this.logger.error(c),this.logger.warn("error validating attestation")}}),_e(this,"getPublicKey",async()=>this.publicKey?this.publicKey:await this.fetchAndPersistPublicKey()),_e(this,"fetchAndPersistPublicKey",async()=>{if(this.fetchPromise)return await this.fetchPromise,this.publicKey;this.fetchPromise=new Promise(async s=>{const o=await this.fetchPublicKey();o&&(await this.persistPublicKey(o),s(o))});const i=await this.fetchPromise;return this.fetchPromise=void 0,i}),_e(this,"validateAttestation",(i,s)=>{const o=gE(i,s.publicKey),c={hasExpired:q.toMiliseconds(o.exp)<Date.now(),payload:o};if(c.hasExpired)throw this.logger.warn("resolve: jwt attestation expired"),new Error("JWT attestation expired");return{origin:c.payload.origin,isScam:c.payload.isScam,isVerified:c.payload.isVerified}}),this.logger=Fe(e,this.name),this.abortController=new AbortController,this.isDevEnv=fa(),this.init()}get storeKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//verify:public:key"}get context(){return ot(this.logger)}startAbortTimer(t){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),q.toMiliseconds(t))}}var Y1=Object.defineProperty,J1=(n,t,e)=>t in n?Y1(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Cl=(n,t,e)=>J1(n,typeof t!="symbol"?t+"":t,e);class Q1 extends Jm{constructor(t,e){super(t,e),this.projectId=t,this.logger=e,Cl(this,"context",Qv),Cl(this,"registerDeviceToken",async r=>{const{clientId:i,token:s,notificationType:o,enableEncrypted:c=!1}=r,l=`${Xv}/${this.projectId}/clients`;await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:i,type:o,token:s,always_raw:c})})}),this.logger=Fe(e,this.context)}}var X1=Object.defineProperty,$l=Object.getOwnPropertySymbols,eA=Object.prototype.hasOwnProperty,tA=Object.prototype.propertyIsEnumerable,Ro=(n,t,e)=>t in n?X1(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,wr=(n,t)=>{for(var e in t||(t={}))eA.call(t,e)&&Ro(n,e,t[e]);if($l)for(var e of $l(t))tA.call(t,e)&&Ro(n,e,t[e]);return n},ge=(n,t,e)=>Ro(n,typeof t!="symbol"?t+"":t,e);class nA extends Qm{constructor(t,e,r=!0){super(t,e,r),this.core=t,this.logger=e,ge(this,"context",tb),ge(this,"storagePrefix",Ct),ge(this,"storageVersion",eb),ge(this,"events",new Map),ge(this,"shouldPersist",!1),ge(this,"init",async()=>{if(!fa())try{const i={eventId:Tc(),timestamp:Date.now(),domain:this.getAppDomain(),props:{event:"INIT",type:"",properties:{client_id:await this.core.crypto.getClientId(),user_agent:$h(this.core.relayer.protocol,this.core.relayer.version,Eo)}}};await this.sendEvent([i])}catch(i){this.logger.warn(i)}}),ge(this,"createEvent",i=>{const{event:s="ERROR",type:o="",properties:{topic:c,trace:l}}=i,u=Tc(),h=this.core.projectId||"",d=Date.now(),f=wr({eventId:u,timestamp:d,props:{event:s,type:o,properties:{topic:c,trace:l}},bundleId:h,domain:this.getAppDomain()},this.setMethods(u));return this.telemetryEnabled&&(this.events.set(u,f),this.shouldPersist=!0),f}),ge(this,"getEvent",i=>{const{eventId:s,topic:o}=i;if(s)return this.events.get(s);const c=Array.from(this.events.values()).find(l=>l.props.properties.topic===o);if(c)return wr(wr({},c),this.setMethods(c.eventId))}),ge(this,"deleteEvent",i=>{const{eventId:s}=i;this.events.delete(s),this.shouldPersist=!0}),ge(this,"setEventListeners",()=>{this.core.heartbeat.on(er.pulse,async()=>{this.shouldPersist&&await this.persist(),this.events.forEach(i=>{q.fromMiliseconds(Date.now())-q.fromMiliseconds(i.timestamp)>nb&&(this.events.delete(i.eventId),this.shouldPersist=!0)})})}),ge(this,"setMethods",i=>({addTrace:s=>this.addTrace(i,s),setError:s=>this.setError(i,s)})),ge(this,"addTrace",(i,s)=>{const o=this.events.get(i);o&&(o.props.properties.trace.push(s),this.events.set(i,o),this.shouldPersist=!0)}),ge(this,"setError",(i,s)=>{const o=this.events.get(i);o&&(o.props.type=s,o.timestamp=Date.now(),this.events.set(i,o),this.shouldPersist=!0)}),ge(this,"persist",async()=>{await this.core.storage.setItem(this.storageKey,Array.from(this.events.values())),this.shouldPersist=!1}),ge(this,"restore",async()=>{try{const i=await this.core.storage.getItem(this.storageKey)||[];if(!i.length)return;i.forEach(s=>{this.events.set(s.eventId,wr(wr({},s),this.setMethods(s.eventId)))})}catch(i){this.logger.warn(i)}}),ge(this,"submit",async()=>{if(!this.telemetryEnabled||this.events.size===0)return;const i=[];for(const[s,o]of this.events)o.props.type&&i.push(o);if(i.length!==0)try{if((await this.sendEvent(i)).ok)for(const s of i)this.events.delete(s.eventId),this.shouldPersist=!0}catch(s){this.logger.warn(s)}}),ge(this,"sendEvent",async i=>{const s=this.getAppDomain()?"":"&sp=desktop";return await fetch(`${rb}?projectId=${this.core.projectId}&st=events_sdk&sv=js-${Eo}${s}`,{method:"POST",body:JSON.stringify(i)})}),ge(this,"getAppDomain",()=>Ch().url),this.logger=Fe(e,this.context),this.telemetryEnabled=r,r?this.restore().then(async()=>{await this.submit(),this.setEventListeners()}):this.persist()}get storageKey(){return this.storagePrefix+this.storageVersion+this.core.customStoragePrefix+"//"+this.context}}var rA=Object.defineProperty,kl=Object.getOwnPropertySymbols,iA=Object.prototype.hasOwnProperty,sA=Object.prototype.propertyIsEnumerable,Lo=(n,t,e)=>t in n?rA(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Ul=(n,t)=>{for(var e in t||(t={}))iA.call(t,e)&&Lo(n,e,t[e]);if(kl)for(var e of kl(t))sA.call(t,e)&&Lo(n,e,t[e]);return n},le=(n,t,e)=>Lo(n,typeof t!="symbol"?t+"":t,e);class Oa extends Bm{constructor(t){var e;super(t),le(this,"protocol",xd),le(this,"version",Vd),le(this,"name",Mi),le(this,"relayUrl"),le(this,"projectId"),le(this,"customStoragePrefix"),le(this,"events",new $n.EventEmitter),le(this,"logger"),le(this,"heartbeat"),le(this,"relayer"),le(this,"crypto"),le(this,"storage"),le(this,"history"),le(this,"expirer"),le(this,"pairing"),le(this,"verify"),le(this,"echoClient"),le(this,"linkModeSupportedApps"),le(this,"eventClient"),le(this,"initialized",!1),le(this,"logChunkController"),le(this,"on",(c,l)=>this.events.on(c,l)),le(this,"once",(c,l)=>this.events.once(c,l)),le(this,"off",(c,l)=>this.events.off(c,l)),le(this,"removeListener",(c,l)=>this.events.removeListener(c,l)),le(this,"dispatchEnvelope",({topic:c,message:l,sessionExists:u})=>{if(!c||!l)return;const h={topic:c,message:l,publishedAt:Date.now(),transportType:ue.link_mode};this.relayer.onLinkMessageEvent(h,{sessionExists:u})});const r=this.getGlobalCore(t?.customStoragePrefix);if(r)try{return this.customStoragePrefix=r.customStoragePrefix,this.logger=r.logger,this.heartbeat=r.heartbeat,this.crypto=r.crypto,this.history=r.history,this.expirer=r.expirer,this.storage=r.storage,this.relayer=r.relayer,this.pairing=r.pairing,this.verify=r.verify,this.echoClient=r.echoClient,this.linkModeSupportedApps=r.linkModeSupportedApps,this.eventClient=r.eventClient,this.initialized=r.initialized,this.logChunkController=r.logChunkController,r}catch(c){console.warn("Failed to copy global core",c)}this.projectId=t?.projectId,this.relayUrl=t?.relayUrl||Cd,this.customStoragePrefix=t!=null&&t.customStoragePrefix?`:${t.customStoragePrefix}`:"";const i=jo({level:typeof t?.logger=="string"&&t.logger?t.logger:Av.logger,name:Mi}),{logger:s,chunkLoggerController:o}=tp({opts:i,maxSizeInBytes:t?.maxLogBlobSizeInBytes,loggerOverride:t?.logger});this.logChunkController=o,(e=this.logChunkController)!=null&&e.downloadLogsBlobInBrowser&&(window.downloadLogsBlobInBrowser=async()=>{var c,l;(c=this.logChunkController)!=null&&c.downloadLogsBlobInBrowser&&((l=this.logChunkController)==null||l.downloadLogsBlobInBrowser({clientId:await this.crypto.getClientId()}))}),this.logger=Fe(s,this.name),this.heartbeat=new np,this.crypto=new SI(this,this.logger,t?.keychain),this.history=new z1(this,this.logger),this.expirer=new W1(this,this.logger),this.storage=t!=null&&t.storage?t.storage:new Dm(Ul(Ul({},Tv),t?.storageOptions)),this.relayer=new o1({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new M1(this,this.logger),this.verify=new Z1(this,this.logger,this.storage),this.echoClient=new Q1(this.projectId||"",this.logger),this.linkModeSupportedApps=[],this.eventClient=new nA(this,this.logger,t?.telemetryEnabled),this.setGlobalCore(this)}static async init(t){const e=new Oa(t);await e.initialize();const r=await e.crypto.getClientId();return await e.storage.setItem(Bv,r),e}get context(){return ot(this.logger)}async start(){this.initialized||await this.initialize()}async getLogsBlob(){var t;return(t=this.logChunkController)==null?void 0:t.logsToBlob({clientId:await this.crypto.getClientId()})}async addLinkModeSupportedApp(t){this.linkModeSupportedApps.includes(t)||(this.linkModeSupportedApps.push(t),await this.storage.setItem(_l,this.linkModeSupportedApps))}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.linkModeSupportedApps=await this.storage.getItem(_l)||[],this.initialized=!0,this.logger.info("Core Initialization Success")}catch(t){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,t),this.logger.error(t.message),t}}getGlobalCore(t=""){try{if(this.isGlobalCoreDisabled())return;const e=`_walletConnectCore_${t}`,r=`${e}_count`;return globalThis[r]=(globalThis[r]||0)+1,globalThis[r]>1&&console.warn(`WalletConnect Core is already initialized. This is probably a mistake and can lead to unexpected behavior. Init() was called ${globalThis[r]} times.`),globalThis[e]}catch(e){console.warn("Failed to get global WalletConnect core",e);return}}setGlobalCore(t){var e;try{if(this.isGlobalCoreDisabled())return;const r=`_walletConnectCore_${((e=t.opts)==null?void 0:e.customStoragePrefix)||""}`;globalThis[r]=t}catch(r){console.warn("Failed to set global WalletConnect core",r)}}isGlobalCoreDisabled(){try{return typeof process<"u"&&Iv.DISABLE_GLOBAL_CORE==="true"}catch{return!0}}}const oA=Oa;var Ra={exports:{}},Hn=typeof Reflect=="object"?Reflect:null,Nl=Hn&&typeof Hn.apply=="function"?Hn.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)},gi;Hn&&typeof Hn.ownKeys=="function"?gi=Hn.ownKeys:Object.getOwnPropertySymbols?gi=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:gi=function(t){return Object.getOwnPropertyNames(t)};function aA(n){console&&console.warn&&console.warn(n)}var Hd=Number.isNaN||function(t){return t!==t};function ae(){ae.init.call(this)}Ra.exports=ae;Ra.exports.once=hA;ae.EventEmitter=ae;ae.prototype._events=void 0;ae.prototype._eventsCount=0;ae.prototype._maxListeners=void 0;var Bl=10;function is(n){if(typeof n!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n)}Object.defineProperty(ae,"defaultMaxListeners",{enumerable:!0,get:function(){return Bl},set:function(n){if(typeof n!="number"||n<0||Hd(n))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+n+".");Bl=n}});ae.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};ae.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||Hd(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function Gd(n){return n._maxListeners===void 0?ae.defaultMaxListeners:n._maxListeners}ae.prototype.getMaxListeners=function(){return Gd(this)};ae.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var i=t==="error",s=this._events;if(s!==void 0)i=i&&s.error===void 0;else if(!i)return!1;if(i){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var c=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw c.context=o,c}var l=s[t];if(l===void 0)return!1;if(typeof l=="function")Nl(l,this,e);else for(var u=l.length,h=Xd(l,u),r=0;r<u;++r)Nl(h[r],this,e);return!0};function Zd(n,t,e,r){var i,s,o;if(is(e),s=n._events,s===void 0?(s=n._events=Object.create(null),n._eventsCount=0):(s.newListener!==void 0&&(n.emit("newListener",t,e.listener?e.listener:e),s=n._events),o=s[t]),o===void 0)o=s[t]=e,++n._eventsCount;else if(typeof o=="function"?o=s[t]=r?[e,o]:[o,e]:r?o.unshift(e):o.push(e),i=Gd(n),i>0&&o.length>i&&!o.warned){o.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=n,c.type=t,c.count=o.length,aA(c)}return n}ae.prototype.addListener=function(t,e){return Zd(this,t,e,!1)};ae.prototype.on=ae.prototype.addListener;ae.prototype.prependListener=function(t,e){return Zd(this,t,e,!0)};function cA(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Yd(n,t,e){var r={fired:!1,wrapFn:void 0,target:n,type:t,listener:e},i=cA.bind(r);return i.listener=e,r.wrapFn=i,i}ae.prototype.once=function(t,e){return is(e),this.on(t,Yd(this,t,e)),this};ae.prototype.prependOnceListener=function(t,e){return is(e),this.prependListener(t,Yd(this,t,e)),this};ae.prototype.removeListener=function(t,e){var r,i,s,o,c;if(is(e),i=this._events,i===void 0)return this;if(r=i[t],r===void 0)return this;if(r===e||r.listener===e)--this._eventsCount===0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||e));else if(typeof r!="function"){for(s=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){c=r[o].listener,s=o;break}if(s<0)return this;s===0?r.shift():lA(r,s),r.length===1&&(i[t]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",t,c||e)}return this};ae.prototype.off=ae.prototype.removeListener;ae.prototype.removeAllListeners=function(t){var e,r,i;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[t]),this;if(arguments.length===0){var s=Object.keys(r),o;for(i=0;i<s.length;++i)o=s[i],o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(e=r[t],typeof e=="function")this.removeListener(t,e);else if(e!==void 0)for(i=e.length-1;i>=0;i--)this.removeListener(t,e[i]);return this};function Jd(n,t,e){var r=n._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i=="function"?e?[i.listener||i]:[i]:e?uA(i):Xd(i,i.length)}ae.prototype.listeners=function(t){return Jd(this,t,!0)};ae.prototype.rawListeners=function(t){return Jd(this,t,!1)};ae.listenerCount=function(n,t){return typeof n.listenerCount=="function"?n.listenerCount(t):Qd.call(n,t)};ae.prototype.listenerCount=Qd;function Qd(n){var t=this._events;if(t!==void 0){var e=t[n];if(typeof e=="function")return 1;if(e!==void 0)return e.length}return 0}ae.prototype.eventNames=function(){return this._eventsCount>0?gi(this._events):[]};function Xd(n,t){for(var e=new Array(t),r=0;r<t;++r)e[r]=n[r];return e}function lA(n,t){for(;t+1<n.length;t++)n[t]=n[t+1];n.pop()}function uA(n){for(var t=new Array(n.length),e=0;e<t.length;++e)t[e]=n[e].listener||n[e];return t}function hA(n,t){return new Promise(function(e,r){function i(o){n.removeListener(t,s),r(o)}function s(){typeof n.removeListener=="function"&&n.removeListener("error",i),e([].slice.call(arguments))}ef(n,t,s,{once:!0}),t!=="error"&&dA(n,i,{once:!0})})}function dA(n,t,e){typeof n.on=="function"&&ef(n,"error",t,e)}function ef(n,t,e,r){if(typeof n.on=="function")r.once?n.once(t,e):n.on(t,e);else if(typeof n.addEventListener=="function")n.addEventListener(t,function i(s){r.once&&n.removeEventListener(t,i),e(s)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof n)}var tf=Ra.exports;const fA=au(tf),nf="wc",rf=2,sf="client",La=`${nf}@${rf}:${sf}:`,$s={name:sf,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.org"},Ml="WALLETCONNECT_DEEPLINK_CHOICE",pA="proposal",ql="Proposal expired",_A="session",jn=q.SEVEN_DAYS,mA="engine",De={wc_sessionPropose:{req:{ttl:q.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:q.FIVE_MINUTES,prompt:!1,tag:1101},reject:{ttl:q.FIVE_MINUTES,prompt:!1,tag:1120},autoReject:{ttl:q.FIVE_MINUTES,prompt:!1,tag:1121}},wc_sessionSettle:{req:{ttl:q.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:q.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:q.ONE_DAY,prompt:!1,tag:1104},res:{ttl:q.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:q.ONE_DAY,prompt:!1,tag:1106},res:{ttl:q.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:q.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:q.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:q.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:q.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:q.ONE_DAY,prompt:!1,tag:1112},res:{ttl:q.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:q.ONE_DAY,prompt:!1,tag:1114},res:{ttl:q.ONE_DAY,prompt:!1,tag:1115}},wc_sessionAuthenticate:{req:{ttl:q.ONE_HOUR,prompt:!0,tag:1116},res:{ttl:q.ONE_HOUR,prompt:!1,tag:1117},reject:{ttl:q.FIVE_MINUTES,prompt:!1,tag:1118},autoReject:{ttl:q.FIVE_MINUTES,prompt:!1,tag:1119}}},ks={min:q.FIVE_MINUTES,max:q.SEVEN_DAYS},Rt={idle:"IDLE",active:"ACTIVE"},wA={eth_sendTransaction:{key:""},eth_sendRawTransaction:{key:""},wallet_sendCalls:{key:""},solana_signTransaction:{key:"signature"},solana_signAllTransactions:{key:"transactions"},solana_signAndSendTransaction:{key:"signature"},sui_signAndExecuteTransaction:{key:"digest"},sui_signTransaction:{key:""},hedera_signAndExecuteTransaction:{key:"transactionId"},hedera_executeTransaction:{key:"transactionId"},near_signTransaction:{key:""},near_signTransactions:{key:""},tron_signTransaction:{key:"txID"},xrpl_signTransaction:{key:""},xrpl_signTransactionFor:{key:""},algo_signTxn:{key:""},sendTransfer:{key:"txid"},stacks_stxTransfer:{key:"txId"},polkadot_signTransaction:{key:""},cosmos_signDirect:{key:""}},yA="request",gA=["wc_sessionPropose","wc_sessionRequest","wc_authRequest","wc_sessionAuthenticate"],EA="wc",vA="auth",bA="authKeys",IA="pairingTopics",AA="requests",ss=`${EA}@${1.5}:${vA}:`,Ei=`${ss}:PUB_KEY`;var TA=Object.defineProperty,PA=Object.defineProperties,OA=Object.getOwnPropertyDescriptors,jl=Object.getOwnPropertySymbols,RA=Object.prototype.hasOwnProperty,LA=Object.prototype.propertyIsEnumerable,Do=(n,t,e)=>t in n?TA(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,ie=(n,t)=>{for(var e in t||(t={}))RA.call(t,e)&&Do(n,e,t[e]);if(jl)for(var e of jl(t))LA.call(t,e)&&Do(n,e,t[e]);return n},Be=(n,t)=>PA(n,OA(t)),U=(n,t,e)=>Do(n,typeof t!="symbol"?t+"":t,e);class DA extends nw{constructor(t){super(t),U(this,"name",mA),U(this,"events",new fA),U(this,"initialized",!1),U(this,"requestQueue",{state:Rt.idle,queue:[]}),U(this,"sessionRequestQueue",{state:Rt.idle,queue:[]}),U(this,"emittedSessionRequests",new Sy({limit:500})),U(this,"requestQueueDelay",q.ONE_SECOND),U(this,"expectedPairingMethodMap",new Map),U(this,"recentlyDeletedMap",new Map),U(this,"recentlyDeletedLimit",200),U(this,"relayMessageCache",[]),U(this,"pendingSessions",new Map),U(this,"init",async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),await this.registerLinkModeListeners(),this.client.core.pairing.register({methods:Object.keys(De)}),this.initialized=!0,setTimeout(async()=>{await this.processPendingMessageEvents(),this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},q.toMiliseconds(this.requestQueueDelay)))}),U(this,"connect",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();const r=Be(ie({},e),{requiredNamespaces:e.requiredNamespaces||{},optionalNamespaces:e.optionalNamespaces||{}});await this.isValidConnect(r),r.optionalNamespaces=kE(r.requiredNamespaces,r.optionalNamespaces),r.requiredNamespaces={};const{pairingTopic:i,requiredNamespaces:s,optionalNamespaces:o,sessionProperties:c,scopedProperties:l,relays:u}=r;let h=i,d,f=!1;try{if(h){const D=this.client.core.pairing.pairings.get(h);this.client.logger.warn("connect() with existing pairing topic is deprecated and will be removed in the next major release."),f=D.active}}catch(D){throw this.client.logger.error(`connect() -> pairing.get(${h}) failed`),D}if(!h||!f){const{topic:D,uri:x}=await this.client.core.pairing.create({internal:{skipSubscribe:!0}});h=D,d=x}if(!h){const{message:D}=B("NO_MATCHING_KEY",`connect() pairing topic: ${h}`);throw new Error(D)}const p=await this.client.core.crypto.generateKeyPair(),m=De.wc_sessionPropose.req.ttl||q.FIVE_MINUTES,w=ye(m),_=Be(ie(ie({requiredNamespaces:s,optionalNamespaces:o,relays:u??[{protocol:Sd}],proposer:{publicKey:p,metadata:this.client.metadata},expiryTimestamp:w,pairingTopic:h},c&&{sessionProperties:c}),l&&{scopedProperties:l}),{id:Wt()}),E=ne("session_connect",_.id),{reject:v,resolve:g,done:I}=gn(m,ql),b=({id:D})=>{D===_.id&&(this.client.events.off("proposal_expire",b),this.pendingSessions.delete(_.id),this.events.emit(E,{error:{message:ql,code:0}}))};return this.client.events.on("proposal_expire",b),this.events.once(E,({error:D,session:x})=>{this.client.events.off("proposal_expire",b),D?v(D):x&&g(x)}),await this.sendProposeSession({proposal:_,publishOpts:{internal:{throwOnFailedPublish:!0},tvf:{correlationId:_.id}}}),await this.setProposal(_.id,_),{uri:d,approval:I}}),U(this,"pair",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{return await this.client.core.pairing.pair(e)}catch(r){throw this.client.logger.error("pair() failed"),r}}),U(this,"approve",async e=>{var r,i,s;const o=this.client.core.eventClient.createEvent({properties:{topic:(r=e?.id)==null?void 0:r.toString(),trace:[sn.session_approve_started]}});try{this.isInitialized(),await this.confirmOnlineStateOrThrow()}catch(y){throw o.setError(pr.no_internet_connection),y}try{await this.isValidProposalId(e?.id)}catch(y){throw this.client.logger.error(`approve() -> proposal.get(${e?.id}) failed`),o.setError(pr.proposal_not_found),y}try{await this.isValidApprove(e)}catch(y){throw this.client.logger.error("approve() -> isValidApprove() failed"),o.setError(pr.session_approve_namespace_validation_failure),y}const{id:c,relayProtocol:l,namespaces:u,sessionProperties:h,scopedProperties:d,sessionConfig:f}=e,p=this.client.proposal.get(c);this.client.core.eventClient.deleteEvent({eventId:o.eventId});const{pairingTopic:m,proposer:w,requiredNamespaces:_,optionalNamespaces:E}=p;let v=(i=this.client.core.eventClient)==null?void 0:i.getEvent({topic:m});v||(v=(s=this.client.core.eventClient)==null?void 0:s.createEvent({type:sn.session_approve_started,properties:{topic:m,trace:[sn.session_approve_started,sn.session_namespaces_validation_success]}}));const g=await this.client.core.crypto.generateKeyPair(),I=w.publicKey,b=await this.client.core.crypto.generateSharedKey(g,I),D=ie(ie(ie({relay:{protocol:l??"irn"},namespaces:u,controller:{publicKey:g,metadata:this.client.metadata},expiry:ye(jn)},h&&{sessionProperties:h}),d&&{scopedProperties:d}),f&&{sessionConfig:f}),x=ue.relay;v.addTrace(sn.subscribing_session_topic);try{await this.client.core.relayer.subscribe(b,{transportType:x,internal:{skipSubscribe:!0}})}catch(y){throw v.setError(pr.subscribe_session_topic_failure),y}v.addTrace(sn.subscribe_session_topic_success);const S=Be(ie({},D),{topic:b,requiredNamespaces:_,optionalNamespaces:E,pairingTopic:m,acknowledged:!1,self:D.controller,peer:{publicKey:w.publicKey,metadata:w.metadata},controller:g,transportType:ue.relay});await this.client.session.set(b,S),v.addTrace(sn.store_session);try{await this.sendApproveSession({sessionTopic:b,proposal:p,pairingProposalResponse:{relay:{protocol:l??"irn"},responderPublicKey:g},sessionSettleRequest:D,publishOpts:{internal:{throwOnFailedPublish:!0},tvf:{correlationId:c}}}),v.addTrace(sn.session_approve_publish_success)}catch(y){throw this.client.logger.error(y),this.client.session.delete(b,de("USER_DISCONNECTED")),await this.client.core.relayer.unsubscribe(b),y}return this.client.core.eventClient.deleteEvent({eventId:v.eventId}),await this.client.core.pairing.updateMetadata({topic:m,metadata:w.metadata}),await this.deleteProposal(c),await this.client.core.pairing.activate({topic:m}),await this.setExpiry(b,ye(jn)),{topic:b,acknowledged:()=>Promise.resolve(this.client.session.get(b))}}),U(this,"reject",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidReject(e)}catch(o){throw this.client.logger.error("reject() -> isValidReject() failed"),o}const{id:r,reason:i}=e;let s;try{s=this.client.proposal.get(r).pairingTopic}catch(o){throw this.client.logger.error(`reject() -> proposal.get(${r}) failed`),o}s&&await this.sendError({id:r,topic:s,error:i,rpcOpts:De.wc_sessionPropose.reject}),await this.deleteProposal(r)}),U(this,"update",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidUpdate(e)}catch(d){throw this.client.logger.error("update() -> isValidUpdate() failed"),d}const{topic:r,namespaces:i}=e,{done:s,resolve:o,reject:c}=gn(),l=Wt(),u=bn().toString(),h=this.client.session.get(r).namespaces;return this.events.once(ne("session_update",l),({error:d})=>{d?c(d):o()}),await this.client.session.update(r,{namespaces:i}),await this.sendRequest({topic:r,method:"wc_sessionUpdate",params:{namespaces:i},throwOnFailedPublish:!0,clientRpcId:l,relayRpcId:u}).catch(d=>{this.client.logger.error(d),this.client.session.update(r,{namespaces:h}),c(d)}),{acknowledged:s}}),U(this,"extend",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidExtend(e)}catch(l){throw this.client.logger.error("extend() -> isValidExtend() failed"),l}const{topic:r}=e,i=Wt(),{done:s,resolve:o,reject:c}=gn();return this.events.once(ne("session_extend",i),({error:l})=>{l?c(l):o()}),await this.setExpiry(r,ye(jn)),this.sendRequest({topic:r,method:"wc_sessionExtend",params:{},clientRpcId:i,throwOnFailedPublish:!0}).catch(l=>{c(l)}),{acknowledged:s}}),U(this,"request",async e=>{this.isInitialized();try{await this.isValidRequest(e)}catch(_){throw this.client.logger.error("request() -> isValidRequest() failed"),_}const{chainId:r,request:i,topic:s,expiry:o=De.wc_sessionRequest.req.ttl}=e,c=this.client.session.get(s);c?.transportType===ue.relay&&await this.confirmOnlineStateOrThrow();const l=Wt(),u=bn().toString(),{done:h,resolve:d,reject:f}=gn(o,"Request expired. Please try again.");this.events.once(ne("session_request",l),({error:_,result:E})=>{_?f(_):d(E)});const p="wc_sessionRequest",m=this.getAppLinkIfEnabled(c.peer.metadata,c.transportType);if(m)return await this.sendRequest({clientRpcId:l,relayRpcId:u,topic:s,method:p,params:{request:Be(ie({},i),{expiryTimestamp:ye(o)}),chainId:r},expiry:o,throwOnFailedPublish:!0,appLink:m}).catch(_=>f(_)),this.client.events.emit("session_request_sent",{topic:s,request:i,chainId:r,id:l}),await h();const w={request:Be(ie({},i),{expiryTimestamp:ye(o)}),chainId:r};return await Promise.all([new Promise(async _=>{await this.sendRequest({clientRpcId:l,relayRpcId:u,topic:s,method:p,params:w,expiry:o,throwOnFailedPublish:!0,tvf:this.getTVFParams(l,w)}).catch(E=>f(E)),this.client.events.emit("session_request_sent",{topic:s,request:i,chainId:r,id:l}),_()}),new Promise(async _=>{var E;if(!((E=c.sessionConfig)!=null&&E.disableDeepLink)){const v=await Ry(this.client.core.storage,Ml);await Ty({id:l,topic:s,wcDeepLink:v})}_()}),h()]).then(_=>_[2])}),U(this,"respond",async e=>{this.isInitialized(),await this.isValidRespond(e);const{topic:r,response:i}=e,{id:s}=i,o=this.client.session.get(r);o.transportType===ue.relay&&await this.confirmOnlineStateOrThrow();const c=this.getAppLinkIfEnabled(o.peer.metadata,o.transportType);Ut(i)?await this.sendResult({id:s,topic:r,result:i.result,throwOnFailedPublish:!0,appLink:c}):Dt(i)&&await this.sendError({id:s,topic:r,error:i.error,appLink:c}),this.cleanupAfterResponse(e)}),U(this,"ping",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidPing(e)}catch(i){throw this.client.logger.error("ping() -> isValidPing() failed"),i}const{topic:r}=e;if(this.client.session.keys.includes(r)){const i=Wt(),s=bn().toString(),{done:o,resolve:c,reject:l}=gn();this.events.once(ne("session_ping",i),({error:u})=>{u?l(u):c()}),await Promise.all([this.sendRequest({topic:r,method:"wc_sessionPing",params:{},throwOnFailedPublish:!0,clientRpcId:i,relayRpcId:s}),o()])}else this.client.core.pairing.pairings.keys.includes(r)&&(this.client.logger.warn("ping() on pairing topic is deprecated and will be removed in the next major release."),await this.client.core.pairing.ping({topic:r}))}),U(this,"emit",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow(),await this.isValidEmit(e);const{topic:r,event:i,chainId:s}=e,o=bn().toString(),c=Wt();await this.sendRequest({topic:r,method:"wc_sessionEvent",params:{event:i,chainId:s},throwOnFailedPublish:!0,relayRpcId:o,clientRpcId:c})}),U(this,"disconnect",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow(),await this.isValidDisconnect(e);const{topic:r}=e;if(this.client.session.keys.includes(r))await this.sendRequest({topic:r,method:"wc_sessionDelete",params:de("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession({topic:r,emitEvent:!1});else if(this.client.core.pairing.pairings.keys.includes(r))await this.client.core.pairing.disconnect({topic:r});else{const{message:i}=B("MISMATCHED_TOPIC",`Session or pairing topic not found: ${r}`);throw new Error(i)}}),U(this,"find",e=>(this.isInitialized(),this.client.session.getAll().filter(r=>BE(r,e)))),U(this,"getPendingSessionRequests",()=>this.client.pendingRequest.getAll()),U(this,"authenticate",async(e,r)=>{var i;this.isInitialized(),this.isValidAuthenticate(e);const s=r&&this.client.core.linkModeSupportedApps.includes(r)&&((i=this.client.metadata.redirect)==null?void 0:i.linkMode),o=s?ue.link_mode:ue.relay;o===ue.relay&&await this.confirmOnlineStateOrThrow();const{chains:c,statement:l="",uri:u,domain:h,nonce:d,type:f,exp:p,nbf:m,methods:w=[],expiry:_}=e,E=[...e.resources||[]],{topic:v,uri:g}=await this.client.core.pairing.create({methods:["wc_sessionAuthenticate"],transportType:o});this.client.logger.info({message:"Generated new pairing",pairing:{topic:v,uri:g}});const I=await this.client.core.crypto.generateKeyPair(),b=wi(I);if(await Promise.all([this.client.auth.authKeys.set(Ei,{responseTopic:b,publicKey:I}),this.client.auth.pairingTopics.set(b,{topic:b,pairingTopic:v})]),await this.client.core.relayer.subscribe(b,{transportType:o}),this.client.logger.info(`sending request to new pairing topic: ${v}`),w.length>0){const{namespace:$}=_i(c[0]);let M=Kg($,"request",w);mi(E)&&(M=Wg(M,E.pop())),E.push(M)}const D=_&&_>De.wc_sessionAuthenticate.req.ttl?_:De.wc_sessionAuthenticate.req.ttl,x={authPayload:{type:f??"caip122",chains:c,statement:l,aud:u,domain:h,version:"1",nonce:d,iat:new Date().toISOString(),exp:p,nbf:m,resources:E},requester:{publicKey:I,metadata:this.client.metadata},expiryTimestamp:ye(D)},S={eip155:{chains:c,methods:[...new Set(["personal_sign",...w])],events:["chainChanged","accountsChanged"]}},y={requiredNamespaces:{},optionalNamespaces:S,relays:[{protocol:"irn"}],pairingTopic:v,proposer:{publicKey:I,metadata:this.client.metadata},expiryTimestamp:ye(De.wc_sessionPropose.req.ttl),id:Wt()},{done:L,resolve:T,reject:O}=gn(D,"Request expired"),C=Wt(),A=ne("session_connect",y.id),P=ne("session_request",C),R=async({error:$,session:M})=>{this.events.off(P,V),$?O($):M&&T({session:M})},V=async $=>{var M,N,z;if(await this.deletePendingAuthRequest(C,{message:"fulfilled",code:0}),$.error){const te=de("WC_METHOD_UNSUPPORTED","wc_sessionAuthenticate");return $.error.code===te.code?void 0:(this.events.off(A,R),O($.error.message))}await this.deleteProposal(y.id),this.events.off(A,R);const{cacaos:F,responder:K}=$.result,W=[],G=[];for(const te of F){await kc({cacao:te,projectId:this.client.core.projectId})||(this.client.logger.error(te,"Signature verification failed"),O(de("SESSION_SETTLEMENT_FAILED","Signature verification failed")));const{p:Ve}=te,je=mi(Ve.resources),It=[co(Ve.iss)],mn=$i(Ve.iss);if(je){const At=Uc(je),Gr=Nc(je);W.push(...At),It.push(...Gr)}for(const At of It)G.push(`${At}:${mn}`)}const he=await this.client.core.crypto.generateSharedKey(I,K.publicKey);let re;W.length>0&&(re={topic:he,acknowledged:!0,self:{publicKey:I,metadata:this.client.metadata},peer:K,controller:K.publicKey,expiry:ye(jn),requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:v,namespaces:cl([...new Set(W)],[...new Set(G)]),transportType:o},await this.client.core.relayer.subscribe(he,{transportType:o}),await this.client.session.set(he,re),v&&await this.client.core.pairing.updateMetadata({topic:v,metadata:K.metadata}),re=this.client.session.get(he)),(M=this.client.metadata.redirect)!=null&&M.linkMode&&(N=K.metadata.redirect)!=null&&N.linkMode&&(z=K.metadata.redirect)!=null&&z.universal&&r&&(this.client.core.addLinkModeSupportedApp(K.metadata.redirect.universal),this.client.session.update(he,{transportType:ue.link_mode})),T({auths:F,session:re})};this.events.once(A,R),this.events.once(P,V);let k;try{if(s){const $=on("wc_sessionAuthenticate",x,C);this.client.core.history.set(v,$);const M=await this.client.core.crypto.encode("",$,{type:Wr,encoding:hn});k=ci(r,v,M)}else await Promise.all([this.sendRequest({topic:v,method:"wc_sessionAuthenticate",params:x,expiry:e.expiry,throwOnFailedPublish:!0,clientRpcId:C}),this.sendRequest({topic:v,method:"wc_sessionPropose",params:y,expiry:De.wc_sessionPropose.req.ttl,throwOnFailedPublish:!0,clientRpcId:y.id})])}catch($){throw this.events.off(A,R),this.events.off(P,V),$}return await this.setProposal(y.id,y),await this.setAuthRequest(C,{request:Be(ie({},x),{verifyContext:{}}),pairingTopic:v,transportType:o}),{uri:k??g,response:L}}),U(this,"approveSessionAuthenticate",async e=>{const{id:r,auths:i}=e,s=this.client.core.eventClient.createEvent({properties:{topic:r.toString(),trace:[yn.authenticated_session_approve_started]}});try{this.isInitialized()}catch(_){throw s.setError(_r.no_internet_connection),_}const o=this.getPendingAuthRequest(r);if(!o)throw s.setError(_r.authenticated_session_pending_request_not_found),new Error(`Could not find pending auth request with id ${r}`);const c=o.transportType||ue.relay;c===ue.relay&&await this.confirmOnlineStateOrThrow();const l=o.requester.publicKey,u=await this.client.core.crypto.generateKeyPair(),h=wi(l),d={type:Kt,receiverPublicKey:l,senderPublicKey:u},f=[],p=[];for(const _ of i){if(!await kc({cacao:_,projectId:this.client.core.projectId})){s.setError(_r.invalid_cacao);const b=de("SESSION_SETTLEMENT_FAILED","Signature verification failed");throw await this.sendError({id:r,topic:h,error:b,encodeOpts:d}),new Error(b.message)}s.addTrace(yn.cacaos_verified);const{p:E}=_,v=mi(E.resources),g=[co(E.iss)],I=$i(E.iss);if(v){const b=Uc(v),D=Nc(v);f.push(...b),g.push(...D)}for(const b of g)p.push(`${b}:${I}`)}const m=await this.client.core.crypto.generateSharedKey(u,l);s.addTrace(yn.create_authenticated_session_topic);let w;if(f?.length>0){w={topic:m,acknowledged:!0,self:{publicKey:u,metadata:this.client.metadata},peer:{publicKey:l,metadata:o.requester.metadata},controller:l,expiry:ye(jn),authentication:i,requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:o.pairingTopic,namespaces:cl([...new Set(f)],[...new Set(p)]),transportType:c},s.addTrace(yn.subscribing_authenticated_session_topic);try{await this.client.core.relayer.subscribe(m,{transportType:c})}catch(_){throw s.setError(_r.subscribe_authenticated_session_topic_failure),_}s.addTrace(yn.subscribe_authenticated_session_topic_success),await this.client.session.set(m,w),s.addTrace(yn.store_authenticated_session),await this.client.core.pairing.updateMetadata({topic:o.pairingTopic,metadata:o.requester.metadata})}s.addTrace(yn.publishing_authenticated_session_approve);try{await this.sendResult({topic:h,id:r,result:{cacaos:i,responder:{publicKey:u,metadata:this.client.metadata}},encodeOpts:d,throwOnFailedPublish:!0,appLink:this.getAppLinkIfEnabled(o.requester.metadata,c)})}catch(_){throw s.setError(_r.authenticated_session_approve_publish_failure),_}return await this.client.auth.requests.delete(r,{message:"fulfilled",code:0}),await this.client.core.pairing.activate({topic:o.pairingTopic}),this.client.core.eventClient.deleteEvent({eventId:s.eventId}),{session:w}}),U(this,"rejectSessionAuthenticate",async e=>{this.isInitialized();const{id:r,reason:i}=e,s=this.getPendingAuthRequest(r);if(!s)throw new Error(`Could not find pending auth request with id ${r}`);s.transportType===ue.relay&&await this.confirmOnlineStateOrThrow();const o=s.requester.publicKey,c=await this.client.core.crypto.generateKeyPair(),l=wi(o),u={type:Kt,receiverPublicKey:o,senderPublicKey:c};await this.sendError({id:r,topic:l,error:i,encodeOpts:u,rpcOpts:De.wc_sessionAuthenticate.reject,appLink:this.getAppLinkIfEnabled(s.requester.metadata,s.transportType)}),await this.client.auth.requests.delete(r,{message:"rejected",code:0}),await this.deleteProposal(r)}),U(this,"formatAuthMessage",e=>{this.isInitialized();const{request:r,iss:i}=e;return Qh(r,i)}),U(this,"processRelayMessageCache",()=>{setTimeout(async()=>{if(this.relayMessageCache.length!==0)for(;this.relayMessageCache.length>0;)try{const e=this.relayMessageCache.shift();e&&await this.onRelayMessage(e)}catch(e){this.client.logger.error(e)}},50)}),U(this,"cleanupDuplicatePairings",async e=>{if(e.pairingTopic)try{const r=this.client.core.pairing.pairings.get(e.pairingTopic),i=this.client.core.pairing.pairings.getAll().filter(s=>{var o,c;return((o=s.peerMetadata)==null?void 0:o.url)&&((c=s.peerMetadata)==null?void 0:c.url)===e.peer.metadata.url&&s.topic&&s.topic!==r.topic});if(i.length===0)return;this.client.logger.info(`Cleaning up ${i.length} duplicate pairing(s)`),await Promise.all(i.map(s=>this.client.core.pairing.disconnect({topic:s.topic}))),this.client.logger.info("Duplicate pairings clean up finished")}catch(r){this.client.logger.error(r)}}),U(this,"deleteSession",async e=>{var r;const{topic:i,expirerHasDeleted:s=!1,emitEvent:o=!0,id:c=0}=e,{self:l}=this.client.session.get(i);await this.client.core.relayer.unsubscribe(i),await this.client.session.delete(i,de("USER_DISCONNECTED")),this.addToRecentlyDeleted(i,"session"),this.client.core.crypto.keychain.has(l.publicKey)&&await this.client.core.crypto.deleteKeyPair(l.publicKey),this.client.core.crypto.keychain.has(i)&&await this.client.core.crypto.deleteSymKey(i),s||this.client.core.expirer.del(i),this.client.core.storage.removeItem(Ml).catch(u=>this.client.logger.warn(u)),this.getPendingSessionRequests().forEach(u=>{u.topic===i&&this.deletePendingSessionRequest(u.id,de("USER_DISCONNECTED"))}),i===((r=this.sessionRequestQueue.queue[0])==null?void 0:r.topic)&&(this.sessionRequestQueue.state=Rt.idle),o&&this.client.events.emit("session_delete",{id:c,topic:i})}),U(this,"deleteProposal",async(e,r)=>{if(r)try{const i=this.client.proposal.get(e);this.client.core.eventClient.getEvent({topic:i.pairingTopic})?.setError(pr.proposal_expired)}catch{}await Promise.all([this.client.proposal.delete(e,de("USER_DISCONNECTED")),r?Promise.resolve():this.client.core.expirer.del(e)]),this.addToRecentlyDeleted(e,"proposal")}),U(this,"deletePendingSessionRequest",async(e,r,i=!1)=>{await Promise.all([this.client.pendingRequest.delete(e,r),i?Promise.resolve():this.client.core.expirer.del(e)]),this.addToRecentlyDeleted(e,"request"),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter(s=>s.id!==e),i&&(this.sessionRequestQueue.state=Rt.idle,this.client.events.emit("session_request_expire",{id:e}))}),U(this,"deletePendingAuthRequest",async(e,r,i=!1)=>{await Promise.all([this.client.auth.requests.delete(e,r),i?Promise.resolve():this.client.core.expirer.del(e)])}),U(this,"setExpiry",async(e,r)=>{this.client.session.keys.includes(e)&&(this.client.core.expirer.set(e,r),await this.client.session.update(e,{expiry:r}))}),U(this,"setProposal",async(e,r)=>{this.client.core.expirer.set(e,ye(De.wc_sessionPropose.req.ttl)),await this.client.proposal.set(e,r)}),U(this,"setAuthRequest",async(e,r)=>{const{request:i,pairingTopic:s,transportType:o=ue.relay}=r;this.client.core.expirer.set(e,i.expiryTimestamp),await this.client.auth.requests.set(e,{authPayload:i.authPayload,requester:i.requester,expiryTimestamp:i.expiryTimestamp,id:e,pairingTopic:s,verifyContext:i.verifyContext,transportType:o})}),U(this,"setPendingSessionRequest",async e=>{const{id:r,topic:i,params:s,verifyContext:o}=e,c=s.request.expiryTimestamp||ye(De.wc_sessionRequest.req.ttl);this.client.core.expirer.set(r,c),await this.client.pendingRequest.set(r,{id:r,topic:i,params:s,verifyContext:o})}),U(this,"sendRequest",async e=>{const{topic:r,method:i,params:s,expiry:o,relayRpcId:c,clientRpcId:l,throwOnFailedPublish:u,appLink:h,tvf:d,publishOpts:f={}}=e,p=on(i,s,l);let m;const w=!!h;try{const v=w?hn:Qe;m=await this.client.core.crypto.encode(r,p,{encoding:v})}catch(v){throw await this.cleanup(),this.client.logger.error(`sendRequest() -> core.crypto.encode() for topic ${r} failed`),v}let _;if(gA.includes(i)){const v=ht(JSON.stringify(p)),g=ht(m);_=await this.client.core.verify.register({id:g,decryptedId:v})}const E=ie(ie({},De[i].req),f);if(E.attestation=_,o&&(E.ttl=o),c&&(E.id=c),this.client.core.history.set(r,p),w){const v=ci(h,r,m);await global.Linking.openURL(v,this.client.name)}else E.tvf=Be(ie({},d),{correlationId:p.id}),u?(E.internal=Be(ie({},E.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(r,m,E)):this.client.core.relayer.publish(r,m,E).catch(v=>this.client.logger.error(v));return p.id}),U(this,"sendProposeSession",async e=>{const{proposal:r,publishOpts:i}=e,s=on("wc_sessionPropose",r,r.id);this.client.core.history.set(r.pairingTopic,s);const o=await this.client.core.crypto.encode(r.pairingTopic,s,{encoding:Qe}),c=ht(JSON.stringify(s)),l=ht(o),u=await this.client.core.verify.register({id:l,decryptedId:c});await this.client.core.relayer.publishCustom({payload:{pairingTopic:r.pairingTopic,sessionProposal:o},opts:Be(ie({},i),{publishMethod:"wc_proposeSession",attestation:u})})}),U(this,"sendApproveSession",async e=>{const{sessionTopic:r,pairingProposalResponse:i,proposal:s,sessionSettleRequest:o,publishOpts:c}=e,l=Ai(s.id,i),u=await this.client.core.crypto.encode(s.pairingTopic,l,{encoding:Qe}),h=on("wc_sessionSettle",o,c?.id),d=await this.client.core.crypto.encode(r,h,{encoding:Qe});this.client.core.history.set(r,h),await this.client.core.relayer.publishCustom({payload:{sessionTopic:r,pairingTopic:s.pairingTopic,sessionProposalResponse:u,sessionSettlementRequest:d},opts:Be(ie({},c),{publishMethod:"wc_approveSession"})})}),U(this,"sendResult",async e=>{const{id:r,topic:i,result:s,throwOnFailedPublish:o,encodeOpts:c,appLink:l}=e,u=Ai(r,s);let h;const d=l&&typeof(global==null?void 0:global.Linking)<"u";try{const m=d?hn:Qe;h=await this.client.core.crypto.encode(i,u,Be(ie({},c||{}),{encoding:m}))}catch(m){throw await this.cleanup(),this.client.logger.error(`sendResult() -> core.crypto.encode() for topic ${i} failed`),m}let f,p;try{f=await this.client.core.history.get(i,r);const m=f.request;try{p=this.getTVFParams(r,m.params,s)}catch(w){this.client.logger.warn(`sendResult() -> getTVFParams() failed: ${w?.message}`)}}catch(m){throw this.client.logger.error(`sendResult() -> history.get(${i}, ${r}) failed`),m}if(d){const m=ci(l,i,h);await global.Linking.openURL(m,this.client.name)}else{const m=f.request.method,w=De[m].res;w.tvf=Be(ie({},p),{correlationId:r}),o?(w.internal=Be(ie({},w.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(i,h,w)):this.client.core.relayer.publish(i,h,w).catch(_=>this.client.logger.error(_))}await this.client.core.history.resolve(u)}),U(this,"sendError",async e=>{const{id:r,topic:i,error:s,encodeOpts:o,rpcOpts:c,appLink:l}=e,u=uu(r,s);let h;const d=l&&typeof(global==null?void 0:global.Linking)<"u";try{const p=d?hn:Qe;h=await this.client.core.crypto.encode(i,u,Be(ie({},o||{}),{encoding:p}))}catch(p){throw await this.cleanup(),this.client.logger.error(`sendError() -> core.crypto.encode() for topic ${i} failed`),p}let f;try{f=await this.client.core.history.get(i,r)}catch(p){throw this.client.logger.error(`sendError() -> history.get(${i}, ${r}) failed`),p}if(d){const p=ci(l,i,h);await global.Linking.openURL(p,this.client.name)}else{const p=f.request.method,m=c||De[p].res;this.client.core.relayer.publish(i,h,m)}await this.client.core.history.resolve(u)}),U(this,"cleanup",async()=>{const e=[],r=[];this.client.session.getAll().forEach(i=>{let s=!1;an(i.expiry)&&(s=!0),this.client.core.crypto.keychain.has(i.topic)||(s=!0),s&&e.push(i.topic)}),this.client.proposal.getAll().forEach(i=>{an(i.expiryTimestamp)&&r.push(i.id)}),await Promise.all([...e.map(i=>this.deleteSession({topic:i})),...r.map(i=>this.deleteProposal(i))])}),U(this,"onProviderMessageEvent",async e=>{!this.initialized||this.relayMessageCache.length>0?this.relayMessageCache.push(e):await this.onRelayMessage(e)}),U(this,"onRelayEventRequest",async e=>{this.requestQueue.queue.push(e),await this.processRequestsQueue()}),U(this,"processRequestsQueue",async()=>{if(this.requestQueue.state===Rt.active){this.client.logger.info("Request queue already active, skipping...");return}for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=Rt.active;const e=this.requestQueue.queue.shift();if(e)try{await this.processRequest(e)}catch(r){this.client.logger.warn(r)}}this.requestQueue.state=Rt.idle}),U(this,"processRequest",async e=>{const{topic:r,payload:i,attestation:s,transportType:o,encryptedId:c}=e,l=i.method;if(!this.shouldIgnorePairingRequest({topic:r,requestMethod:l}))switch(l){case"wc_sessionPropose":return await this.onSessionProposeRequest({topic:r,payload:i,attestation:s,encryptedId:c});case"wc_sessionSettle":return await this.onSessionSettleRequest(r,i);case"wc_sessionUpdate":return await this.onSessionUpdateRequest(r,i);case"wc_sessionExtend":return await this.onSessionExtendRequest(r,i);case"wc_sessionPing":return await this.onSessionPingRequest(r,i);case"wc_sessionDelete":return await this.onSessionDeleteRequest(r,i);case"wc_sessionRequest":return await this.onSessionRequest({topic:r,payload:i,attestation:s,encryptedId:c,transportType:o});case"wc_sessionEvent":return await this.onSessionEventRequest(r,i);case"wc_sessionAuthenticate":return await this.onSessionAuthenticateRequest({topic:r,payload:i,attestation:s,encryptedId:c,transportType:o});default:return this.client.logger.info(`Unsupported request method ${l}`)}}),U(this,"onRelayEventResponse",async e=>{const{topic:r,payload:i,transportType:s}=e,o=(await this.client.core.history.get(r,i.id)).request.method;switch(o){case"wc_sessionPropose":return this.onSessionProposeResponse(r,i,s);case"wc_sessionSettle":return this.onSessionSettleResponse(r,i);case"wc_sessionUpdate":return this.onSessionUpdateResponse(r,i);case"wc_sessionExtend":return this.onSessionExtendResponse(r,i);case"wc_sessionPing":return this.onSessionPingResponse(r,i);case"wc_sessionRequest":return this.onSessionRequestResponse(r,i);case"wc_sessionAuthenticate":return this.onSessionAuthenticateResponse(r,i);default:return this.client.logger.info(`Unsupported response method ${o}`)}}),U(this,"onRelayEventUnknownPayload",e=>{const{topic:r}=e,{message:i}=B("MISSING_OR_INVALID",`Decoded payload on topic ${r} is not identifiable as a JSON-RPC request or a response.`);throw new Error(i)}),U(this,"shouldIgnorePairingRequest",e=>{const{topic:r,requestMethod:i}=e,s=this.expectedPairingMethodMap.get(r);return!s||s.includes(i)?!1:!!(s.includes("wc_sessionAuthenticate")&&this.client.events.listenerCount("session_authenticate")>0)}),U(this,"onSessionProposeRequest",async e=>{const{topic:r,payload:i,attestation:s,encryptedId:o}=e,{params:c,id:l}=i;try{const u=this.client.core.eventClient.getEvent({topic:r});this.client.events.listenerCount("session_proposal")===0&&(console.warn("No listener for session_proposal event"),u?.setError(Bt.proposal_listener_not_found)),this.isValidConnect(ie({},i.params));const h=c.expiryTimestamp||ye(De.wc_sessionPropose.req.ttl),d=ie({id:l,pairingTopic:r,expiryTimestamp:h,attestation:s,encryptedId:o},c);await this.setProposal(l,d);const f=await this.getVerifyContext({attestationId:s,hash:ht(JSON.stringify(i)),encryptedId:o,metadata:d.proposer.metadata});u?.addTrace(Lt.emit_session_proposal),this.client.events.emit("session_proposal",{id:l,params:d,verifyContext:f})}catch(u){await this.sendError({id:l,topic:r,error:u,rpcOpts:De.wc_sessionPropose.autoReject}),this.client.logger.error(u)}}),U(this,"onSessionProposeResponse",async(e,r,i)=>{const{id:s}=r;if(Ut(r)){const{result:o}=r;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:o});const c=this.client.proposal.get(s);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:c});const l=c.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:l});const u=o.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:u});const h=await this.client.core.crypto.generateSharedKey(l,u);this.pendingSessions.set(s,{sessionTopic:h,pairingTopic:e,proposalId:s,publicKey:l});const d=await this.client.core.relayer.subscribe(h,{transportType:i});this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:d}),await this.client.core.pairing.activate({topic:e})}else if(Dt(r)){await this.deleteProposal(s);const o=ne("session_connect",s);if(this.events.listenerCount(o)===0)throw new Error(`emitting ${o} without any listeners, 954`);this.events.emit(o,{error:r.error})}}),U(this,"onSessionSettleRequest",async(e,r)=>{const{id:i,params:s}=r;try{this.isValidSessionSettleRequest(s);const{relay:o,controller:c,expiry:l,namespaces:u,sessionProperties:h,scopedProperties:d,sessionConfig:f}=r.params,p=[...this.pendingSessions.values()].find(_=>_.sessionTopic===e);if(!p)return this.client.logger.error(`Pending session not found for topic ${e}`);const m=this.client.proposal.get(p.proposalId),w=Be(ie(ie(ie({topic:e,relay:o,expiry:l,namespaces:u,acknowledged:!0,pairingTopic:p.pairingTopic,requiredNamespaces:m.requiredNamespaces,optionalNamespaces:m.optionalNamespaces,controller:c.publicKey,self:{publicKey:p.publicKey,metadata:this.client.metadata},peer:{publicKey:c.publicKey,metadata:c.metadata}},h&&{sessionProperties:h}),d&&{scopedProperties:d}),f&&{sessionConfig:f}),{transportType:ue.relay});await this.client.session.set(w.topic,w),await this.setExpiry(w.topic,w.expiry),await this.client.core.pairing.updateMetadata({topic:p.pairingTopic,metadata:w.peer.metadata}),this.client.events.emit("session_connect",{session:w}),this.events.emit(ne("session_connect",p.proposalId),{session:w}),this.pendingSessions.delete(p.proposalId),this.deleteProposal(p.proposalId,!1),this.cleanupDuplicatePairings(w),await this.sendResult({id:r.id,topic:e,result:!0})}catch(o){await this.sendError({id:i,topic:e,error:o}),this.client.logger.error(o)}}),U(this,"onSessionSettleResponse",async(e,r)=>{const{id:i}=r;Ut(r)?(await this.client.session.update(e,{acknowledged:!0}),this.events.emit(ne("session_approve",i),{})):Dt(r)&&(await this.client.session.delete(e,de("USER_DISCONNECTED")),this.events.emit(ne("session_approve",i),{error:r.error}))}),U(this,"onSessionUpdateRequest",async(e,r)=>{const{params:i,id:s}=r;try{const o=`${e}_session_update`,c=dr.get(o);if(c&&this.isRequestOutOfSync(c,s)){this.client.logger.warn(`Discarding out of sync request - ${s}`),this.sendError({id:s,topic:e,error:de("INVALID_UPDATE_REQUEST")});return}this.isValidUpdate(ie({topic:e},i));try{dr.set(o,s),await this.client.session.update(e,{namespaces:i.namespaces}),await this.sendResult({id:s,topic:e,result:!0})}catch(l){throw dr.delete(o),l}this.client.events.emit("session_update",{id:s,topic:e,params:i})}catch(o){await this.sendError({id:s,topic:e,error:o}),this.client.logger.error(o)}}),U(this,"isRequestOutOfSync",(e,r)=>r.toString().slice(0,-3)<e.toString().slice(0,-3)),U(this,"onSessionUpdateResponse",(e,r)=>{const{id:i}=r,s=ne("session_update",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);Ut(r)?this.events.emit(ne("session_update",i),{}):Dt(r)&&this.events.emit(ne("session_update",i),{error:r.error})}),U(this,"onSessionExtendRequest",async(e,r)=>{const{id:i}=r;try{this.isValidExtend({topic:e}),await this.setExpiry(e,ye(jn)),await this.sendResult({id:i,topic:e,result:!0}),this.client.events.emit("session_extend",{id:i,topic:e})}catch(s){await this.sendError({id:i,topic:e,error:s}),this.client.logger.error(s)}}),U(this,"onSessionExtendResponse",(e,r)=>{const{id:i}=r,s=ne("session_extend",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);Ut(r)?this.events.emit(ne("session_extend",i),{}):Dt(r)&&this.events.emit(ne("session_extend",i),{error:r.error})}),U(this,"onSessionPingRequest",async(e,r)=>{const{id:i}=r;try{this.isValidPing({topic:e}),await this.sendResult({id:i,topic:e,result:!0,throwOnFailedPublish:!0}),this.client.events.emit("session_ping",{id:i,topic:e})}catch(s){await this.sendError({id:i,topic:e,error:s}),this.client.logger.error(s)}}),U(this,"onSessionPingResponse",(e,r)=>{const{id:i}=r,s=ne("session_ping",i);setTimeout(()=>{if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners 2176`);Ut(r)?this.events.emit(ne("session_ping",i),{}):Dt(r)&&this.events.emit(ne("session_ping",i),{error:r.error})},500)}),U(this,"onSessionDeleteRequest",async(e,r)=>{const{id:i}=r;try{this.isValidDisconnect({topic:e,reason:r.params}),await Promise.all([new Promise(s=>{this.client.core.relayer.once(fe.publish,async()=>{s(await this.deleteSession({topic:e,id:i}))})}),this.sendResult({id:i,topic:e,result:!0}),this.cleanupPendingSentRequestsForTopic({topic:e,error:de("USER_DISCONNECTED")})]).catch(s=>this.client.logger.error(s))}catch(s){this.client.logger.error(s)}}),U(this,"onSessionRequest",async e=>{var r,i,s;const{topic:o,payload:c,attestation:l,encryptedId:u,transportType:h}=e,{id:d,params:f}=c;try{await this.isValidRequest(ie({topic:o},f));const p=this.client.session.get(o),m=await this.getVerifyContext({attestationId:l,hash:ht(JSON.stringify(on("wc_sessionRequest",f,d))),encryptedId:u,metadata:p.peer.metadata,transportType:h}),w={id:d,topic:o,params:f,verifyContext:m};await this.setPendingSessionRequest(w),h===ue.link_mode&&(r=p.peer.metadata.redirect)!=null&&r.universal&&this.client.core.addLinkModeSupportedApp((i=p.peer.metadata.redirect)==null?void 0:i.universal),(s=this.client.signConfig)!=null&&s.disableRequestQueue?this.emitSessionRequest(w):(this.addSessionRequestToSessionRequestQueue(w),this.processSessionRequestQueue())}catch(p){await this.sendError({id:d,topic:o,error:p}),this.client.logger.error(p)}}),U(this,"onSessionRequestResponse",(e,r)=>{const{id:i}=r,s=ne("session_request",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);Ut(r)?this.events.emit(ne("session_request",i),{result:r.result}):Dt(r)&&this.events.emit(ne("session_request",i),{error:r.error})}),U(this,"onSessionEventRequest",async(e,r)=>{const{id:i,params:s}=r;try{const o=`${e}_session_event_${s.event.name}`,c=dr.get(o);if(c&&this.isRequestOutOfSync(c,i)){this.client.logger.info(`Discarding out of sync request - ${i}`);return}this.isValidEmit(ie({topic:e},s)),this.client.events.emit("session_event",{id:i,topic:e,params:s}),dr.set(o,i)}catch(o){await this.sendError({id:i,topic:e,error:o}),this.client.logger.error(o)}}),U(this,"onSessionAuthenticateResponse",(e,r)=>{const{id:i}=r;this.client.logger.trace({type:"method",method:"onSessionAuthenticateResponse",topic:e,payload:r}),Ut(r)?this.events.emit(ne("session_request",i),{result:r.result}):Dt(r)&&this.events.emit(ne("session_request",i),{error:r.error})}),U(this,"onSessionAuthenticateRequest",async e=>{var r;const{topic:i,payload:s,attestation:o,encryptedId:c,transportType:l}=e;try{const{requester:u,authPayload:h,expiryTimestamp:d}=s.params,f=await this.getVerifyContext({attestationId:o,hash:ht(JSON.stringify(s)),encryptedId:c,metadata:u.metadata,transportType:l}),p={requester:u,pairingTopic:i,id:s.id,authPayload:h,verifyContext:f,expiryTimestamp:d};await this.setAuthRequest(s.id,{request:p,pairingTopic:i,transportType:l}),l===ue.link_mode&&(r=u.metadata.redirect)!=null&&r.universal&&this.client.core.addLinkModeSupportedApp(u.metadata.redirect.universal),this.client.events.emit("session_authenticate",{topic:i,params:s.params,id:s.id,verifyContext:f})}catch(u){this.client.logger.error(u);const h=s.params.requester.publicKey,d=await this.client.core.crypto.generateKeyPair(),f=this.getAppLinkIfEnabled(s.params.requester.metadata,l),p={type:Kt,receiverPublicKey:h,senderPublicKey:d};await this.sendError({id:s.id,topic:i,error:u,encodeOpts:p,rpcOpts:De.wc_sessionAuthenticate.autoReject,appLink:f})}}),U(this,"addSessionRequestToSessionRequestQueue",e=>{this.sessionRequestQueue.queue.push(e)}),U(this,"cleanupAfterResponse",e=>{this.deletePendingSessionRequest(e.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=Rt.idle,this.processSessionRequestQueue()},q.toMiliseconds(this.requestQueueDelay))}),U(this,"cleanupPendingSentRequestsForTopic",({topic:e,error:r})=>{const i=this.client.core.history.pending;i.length>0&&i.filter(s=>s.topic===e&&s.request.method==="wc_sessionRequest").forEach(s=>{const o=s.request.id,c=ne("session_request",o);if(this.events.listenerCount(c)===0)throw new Error(`emitting ${c} without any listeners`);this.events.emit(ne("session_request",s.request.id),{error:r})})}),U(this,"processSessionRequestQueue",()=>{if(this.sessionRequestQueue.state===Rt.active){this.client.logger.info("session request queue is already active.");return}const e=this.sessionRequestQueue.queue[0];if(!e){this.client.logger.info("session request queue is empty.");return}try{this.emitSessionRequest(e)}catch(r){this.client.logger.error(r)}}),U(this,"emitSessionRequest",e=>{if(this.emittedSessionRequests.has(e.id)){this.client.logger.warn({id:e.id},`Skipping emitting \`session_request\` event for duplicate request. id: ${e.id}`);return}this.sessionRequestQueue.state=Rt.active,this.emittedSessionRequests.add(e.id),this.client.events.emit("session_request",e)}),U(this,"onPairingCreated",e=>{if(e.methods&&this.expectedPairingMethodMap.set(e.topic,e.methods),e.active)return;const r=this.client.proposal.getAll().find(i=>i.pairingTopic===e.topic);r&&this.onSessionProposeRequest({topic:e.topic,payload:on("wc_sessionPropose",Be(ie({},r),{requiredNamespaces:r.requiredNamespaces,optionalNamespaces:r.optionalNamespaces,relays:r.relays,proposer:r.proposer,sessionProperties:r.sessionProperties,scopedProperties:r.scopedProperties}),r.id),attestation:r.attestation,encryptedId:r.encryptedId})}),U(this,"isValidConnect",async e=>{if(!Ge(e)){const{message:u}=B("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(e)}`);throw new Error(u)}const{pairingTopic:r,requiredNamespaces:i,optionalNamespaces:s,sessionProperties:o,scopedProperties:c,relays:l}=e;if(be(r)||await this.isValidPairingTopic(r),!JE(l)){const{message:u}=B("MISSING_OR_INVALID",`connect() relays: ${l}`);throw new Error(u)}if(!be(i)&&Br(i)!==0){const u="requiredNamespaces are deprecated and are automatically assigned to optionalNamespaces";["fatal","error","silent"].includes(this.client.logger.level)?console.warn(u):this.client.logger.warn(u),this.validateNamespaces(i,"requiredNamespaces")}if(!be(s)&&Br(s)!==0&&this.validateNamespaces(s,"optionalNamespaces"),be(o)||this.validateSessionProps(o,"sessionProperties"),!be(c)){this.validateSessionProps(c,"scopedProperties");const u=Object.keys(i||{}).concat(Object.keys(s||{}));if(!Object.keys(c).every(h=>u.includes(h.split(":")[0])))throw new Error(`Scoped properties must be a subset of required/optional namespaces, received: ${JSON.stringify(c)}, required/optional namespaces: ${JSON.stringify(u)}`)}}),U(this,"validateNamespaces",(e,r)=>{const i=YE(e,"connect()",r);if(i)throw new Error(i.message)}),U(this,"isValidApprove",async e=>{if(!Ge(e))throw new Error(B("MISSING_OR_INVALID",`approve() params: ${e}`).message);const{id:r,namespaces:i,relayProtocol:s,sessionProperties:o,scopedProperties:c}=e;this.checkRecentlyDeleted(r),await this.isValidProposalId(r);const l=this.client.proposal.get(r),u=Ds(i,"approve()");if(u)throw new Error(u.message);const h=hl(l.requiredNamespaces,i,"approve()");if(h)throw new Error(h.message);if(!me(s,!0)){const{message:d}=B("MISSING_OR_INVALID",`approve() relayProtocol: ${s}`);throw new Error(d)}if(be(o)||this.validateSessionProps(o,"sessionProperties"),!be(c)){this.validateSessionProps(c,"scopedProperties");const d=new Set(Object.keys(i));if(!Object.keys(c).every(f=>d.has(f.split(":")[0])))throw new Error(`Scoped properties must be a subset of approved namespaces, received: ${JSON.stringify(c)}, approved namespaces: ${Array.from(d).join(", ")}`)}}),U(this,"isValidReject",async e=>{if(!Ge(e)){const{message:s}=B("MISSING_OR_INVALID",`reject() params: ${e}`);throw new Error(s)}const{id:r,reason:i}=e;if(this.checkRecentlyDeleted(r),await this.isValidProposalId(r),!XE(i)){const{message:s}=B("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(i)}`);throw new Error(s)}}),U(this,"isValidSessionSettleRequest",e=>{if(!Ge(e)){const{message:u}=B("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${e}`);throw new Error(u)}const{relay:r,controller:i,namespaces:s,expiry:o}=e;if(!Dd(r)){const{message:u}=B("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(u)}const c=KE(i,"onSessionSettleRequest()");if(c)throw new Error(c.message);const l=Ds(s,"onSessionSettleRequest()");if(l)throw new Error(l.message);if(an(o)){const{message:u}=B("EXPIRED","onSessionSettleRequest()");throw new Error(u)}}),U(this,"isValidUpdate",async e=>{if(!Ge(e)){const{message:l}=B("MISSING_OR_INVALID",`update() params: ${e}`);throw new Error(l)}const{topic:r,namespaces:i}=e;this.checkRecentlyDeleted(r),await this.isValidSessionTopic(r);const s=this.client.session.get(r),o=Ds(i,"update()");if(o)throw new Error(o.message);const c=hl(s.requiredNamespaces,i,"update()");if(c)throw new Error(c.message)}),U(this,"isValidExtend",async e=>{if(!Ge(e)){const{message:i}=B("MISSING_OR_INVALID",`extend() params: ${e}`);throw new Error(i)}const{topic:r}=e;this.checkRecentlyDeleted(r),await this.isValidSessionTopic(r)}),U(this,"isValidRequest",async e=>{if(!Ge(e)){const{message:l}=B("MISSING_OR_INVALID",`request() params: ${e}`);throw new Error(l)}const{topic:r,request:i,chainId:s,expiry:o}=e;this.checkRecentlyDeleted(r),await this.isValidSessionTopic(r);const{namespaces:c}=this.client.session.get(r);if(!ul(c,s)){const{message:l}=B("MISSING_OR_INVALID",`request() chainId: ${s}`);throw new Error(l)}if(!ev(i)){const{message:l}=B("MISSING_OR_INVALID",`request() ${JSON.stringify(i)}`);throw new Error(l)}if(!rv(c,s,i.method)){const{message:l}=B("MISSING_OR_INVALID",`request() method: ${i.method}`);throw new Error(l)}if(o&&!av(o,ks)){const{message:l}=B("MISSING_OR_INVALID",`request() expiry: ${o}. Expiry must be a number (in seconds) between ${ks.min} and ${ks.max}`);throw new Error(l)}}),U(this,"isValidRespond",async e=>{var r;if(!Ge(e)){const{message:o}=B("MISSING_OR_INVALID",`respond() params: ${e}`);throw new Error(o)}const{topic:i,response:s}=e;try{await this.isValidSessionTopic(i)}catch(o){throw(r=e?.response)!=null&&r.id&&this.cleanupAfterResponse(e),o}if(!tv(s)){const{message:o}=B("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(s)}`);throw new Error(o)}}),U(this,"isValidPing",async e=>{if(!Ge(e)){const{message:i}=B("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(i)}const{topic:r}=e;await this.isValidSessionOrPairingTopic(r)}),U(this,"isValidEmit",async e=>{if(!Ge(e)){const{message:c}=B("MISSING_OR_INVALID",`emit() params: ${e}`);throw new Error(c)}const{topic:r,event:i,chainId:s}=e;await this.isValidSessionTopic(r);const{namespaces:o}=this.client.session.get(r);if(!ul(o,s)){const{message:c}=B("MISSING_OR_INVALID",`emit() chainId: ${s}`);throw new Error(c)}if(!nv(i)){const{message:c}=B("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(c)}if(!iv(o,s,i.name)){const{message:c}=B("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(c)}}),U(this,"isValidDisconnect",async e=>{if(!Ge(e)){const{message:i}=B("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw new Error(i)}const{topic:r}=e;await this.isValidSessionOrPairingTopic(r)}),U(this,"isValidAuthenticate",e=>{const{chains:r,uri:i,domain:s,nonce:o}=e;if(!Array.isArray(r)||r.length===0)throw new Error("chains is required and must be a non-empty array");if(!me(i,!1))throw new Error("uri is required parameter");if(!me(s,!1))throw new Error("domain is required parameter");if(!me(o,!1))throw new Error("nonce is required parameter");if([...new Set(r.map(l=>_i(l).namespace))].length>1)throw new Error("Multi-namespace requests are not supported. Please request single namespace only.");const{namespace:c}=_i(r[0]);if(c!=="eip155")throw new Error("Only eip155 namespace is supported for authenticated sessions. Please use .connect() for non-eip155 chains.")}),U(this,"getVerifyContext",async e=>{const{attestationId:r,hash:i,encryptedId:s,metadata:o,transportType:c}=e,l={verified:{verifyUrl:o.verifyUrl||Lr,validation:"UNKNOWN",origin:o.url||""}};try{if(c===ue.link_mode){const h=this.getAppLinkIfEnabled(o,c);return l.verified.validation=h&&new URL(h).origin===new URL(o.url).origin?"VALID":"INVALID",l}const u=await this.client.core.verify.resolve({attestationId:r,hash:i,encryptedId:s,verifyUrl:o.verifyUrl});u&&(l.verified.origin=u.origin,l.verified.isScam=u.isScam,l.verified.validation=u.origin===new URL(o.url).origin?"VALID":"INVALID")}catch(u){this.client.logger.warn(u)}return this.client.logger.debug(`Verify context: ${JSON.stringify(l)}`),l}),U(this,"validateSessionProps",(e,r)=>{Object.values(e).forEach((i,s)=>{if(i==null){const{message:o}=B("MISSING_OR_INVALID",`${r} must contain an existing value for each key. Received: ${i} for key ${Object.keys(e)[s]}`);throw new Error(o)}})}),U(this,"getPendingAuthRequest",e=>{const r=this.client.auth.requests.get(e);return typeof r=="object"?r:void 0}),U(this,"addToRecentlyDeleted",(e,r)=>{if(this.recentlyDeletedMap.set(e,r),this.recentlyDeletedMap.size>=this.recentlyDeletedLimit){let i=0;const s=this.recentlyDeletedLimit/2;for(const o of this.recentlyDeletedMap.keys()){if(i++>=s)break;this.recentlyDeletedMap.delete(o)}}}),U(this,"checkRecentlyDeleted",e=>{const r=this.recentlyDeletedMap.get(e);if(r){const{message:i}=B("MISSING_OR_INVALID",`Record was recently deleted - ${r}: ${e}`);throw new Error(i)}}),U(this,"isLinkModeEnabled",(e,r)=>{var i,s,o,c,l,u,h,d,f;return!e||r!==ue.link_mode?!1:((s=(i=this.client.metadata)==null?void 0:i.redirect)==null?void 0:s.linkMode)===!0&&((c=(o=this.client.metadata)==null?void 0:o.redirect)==null?void 0:c.universal)!==void 0&&((u=(l=this.client.metadata)==null?void 0:l.redirect)==null?void 0:u.universal)!==""&&((h=e?.redirect)==null?void 0:h.universal)!==void 0&&((d=e?.redirect)==null?void 0:d.universal)!==""&&((f=e?.redirect)==null?void 0:f.linkMode)===!0&&this.client.core.linkModeSupportedApps.includes(e.redirect.universal)&&typeof(global==null?void 0:global.Linking)<"u"}),U(this,"getAppLinkIfEnabled",(e,r)=>{var i;return this.isLinkModeEnabled(e,r)?(i=e?.redirect)==null?void 0:i.universal:void 0}),U(this,"handleLinkModeMessage",({url:e})=>{if(!e||!e.includes("wc_ev")||!e.includes("topic"))return;const r=Ac(e,"topic")||"",i=decodeURIComponent(Ac(e,"wc_ev")||""),s=this.client.session.keys.includes(r);s&&this.client.session.update(r,{transportType:ue.link_mode}),this.client.core.dispatchEnvelope({topic:r,message:i,sessionExists:s})}),U(this,"registerLinkModeListeners",async()=>{var e;if(fa()||pn()&&(e=this.client.metadata.redirect)!=null&&e.linkMode){const r=global==null?void 0:global.Linking;if(typeof r<"u"){r.addEventListener("url",this.handleLinkModeMessage,this.client.name);const i=await r.getInitialURL();i&&setTimeout(()=>{this.handleLinkModeMessage({url:i})},50)}}}),U(this,"getTVFParams",(e,r,i)=>{var s,o,c;if(!((s=r.request)!=null&&s.method))return{};const l={correlationId:e,rpcMethods:[r.request.method],chainId:r.chainId};try{const u=this.extractTxHashesFromResult(r.request,i);l.txHashes=u,l.contractAddresses=this.isValidContractData(r.request.params)?[(c=(o=r.request.params)==null?void 0:o[0])==null?void 0:c.to]:[]}catch(u){this.client.logger.warn("Error getting TVF params",u)}return l}),U(this,"isValidContractData",e=>{var r;if(!e)return!1;try{const i=e?.data||((r=e?.[0])==null?void 0:r.data);if(!i.startsWith("0x"))return!1;const s=i.slice(2);return/^[0-9a-fA-F]*$/.test(s)?s.length%2===0:!1}catch{}return!1}),U(this,"extractTxHashesFromResult",(e,r)=>{var i;try{if(!r)return[];const s=e.method,o=wA[s];if(s==="sui_signTransaction")return[Rg(r.transactionBytes)];if(s==="near_signTransaction")return[Vc(r)];if(s==="near_signTransactions")return r.map(l=>Vc(l));if(s==="xrpl_signTransactionFor"||s==="xrpl_signTransaction")return[(i=r.tx_json)==null?void 0:i.hash];if(s==="polkadot_signTransaction")return[bv({transaction:e.params.transactionPayload,signature:r.signature})];if(s==="algo_signTxn")return Qn(r)?r.map(l=>Sc(l)):[Sc(r)];if(s==="cosmos_signDirect")return[Dg(r)];if(typeof r=="string")return[r];const c=r[o.key];if(Qn(c))return s==="solana_signAllTransactions"?c.map(l=>Og(l)):c;if(typeof c=="string")return[c]}catch(s){this.client.logger.warn("Error extracting tx hashes from result",s)}return[]})}async processPendingMessageEvents(){try{const t=this.client.session.keys,e=this.client.core.relayer.messages.getWithoutAck(t);for(const[r,i]of Object.entries(e))for(const s of i)try{await this.onProviderMessageEvent({topic:r,message:s,publishedAt:Date.now()})}catch{this.client.logger.warn(`Error processing pending message event for topic: ${r}, message: ${s}`)}}catch(t){this.client.logger.warn("processPendingMessageEvents failed",t)}}isInitialized(){if(!this.initialized){const{message:t}=B("NOT_INITIALIZED",this.name);throw new Error(t)}}async confirmOnlineStateOrThrow(){await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(fe.message,t=>{this.onProviderMessageEvent(t)})}async onRelayMessage(t){const{topic:e,message:r,attestation:i,transportType:s}=t,{publicKey:o}=this.client.auth.authKeys.keys.includes(Ei)?this.client.auth.authKeys.get(Ei):{responseTopic:void 0,publicKey:void 0};try{const c=await this.client.core.crypto.decode(e,r,{receiverPublicKey:o,encoding:s===ue.link_mode?hn:Qe});zo(c)?(this.client.core.history.set(e,c),await this.onRelayEventRequest({topic:e,payload:c,attestation:i,transportType:s,encryptedId:ht(r)})):Ko(c)?(await this.client.core.history.resolve(c),await this.onRelayEventResponse({topic:e,payload:c,transportType:s}),this.client.core.history.delete(e,c.id)):await this.onRelayEventUnknownPayload({topic:e,payload:c,transportType:s}),await this.client.core.relayer.messages.ack(e,r)}catch(c){this.client.logger.error(c)}}registerExpirerEvents(){this.client.core.expirer.on(ut.expired,async t=>{const{topic:e,id:r}=Uh(t.target);if(r&&this.client.pendingRequest.keys.includes(r))return await this.deletePendingSessionRequest(r,B("EXPIRED"),!0);if(r&&this.client.auth.requests.keys.includes(r))return await this.deletePendingAuthRequest(r,B("EXPIRED"),!0);e?this.client.session.keys.includes(e)&&(await this.deleteSession({topic:e,expirerHasDeleted:!0}),this.client.events.emit("session_expire",{topic:e})):r&&(await this.deleteProposal(r,!0),this.client.events.emit("proposal_expire",{id:r}))})}registerPairingEvents(){this.client.core.pairing.events.on(vn.create,t=>this.onPairingCreated(t)),this.client.core.pairing.events.on(vn.delete,t=>{this.addToRecentlyDeleted(t.topic,"pairing")})}isValidPairingTopic(t){if(!me(t,!1)){const{message:e}=B("MISSING_OR_INVALID",`pairing topic should be a string: ${t}`);throw new Error(e)}if(!this.client.core.pairing.pairings.keys.includes(t)){const{message:e}=B("NO_MATCHING_KEY",`pairing topic doesn't exist: ${t}`);throw new Error(e)}if(an(this.client.core.pairing.pairings.get(t).expiry)){const{message:e}=B("EXPIRED",`pairing topic: ${t}`);throw new Error(e)}}async isValidSessionTopic(t){if(!me(t,!1)){const{message:e}=B("MISSING_OR_INVALID",`session topic should be a string: ${t}`);throw new Error(e)}if(this.checkRecentlyDeleted(t),!this.client.session.keys.includes(t)){const{message:e}=B("NO_MATCHING_KEY",`session topic doesn't exist: ${t}`);throw new Error(e)}if(an(this.client.session.get(t).expiry)){await this.deleteSession({topic:t});const{message:e}=B("EXPIRED",`session topic: ${t}`);throw new Error(e)}if(!this.client.core.crypto.keychain.has(t)){const{message:e}=B("MISSING_OR_INVALID",`session topic does not exist in keychain: ${t}`);throw await this.deleteSession({topic:t}),new Error(e)}}async isValidSessionOrPairingTopic(t){if(this.checkRecentlyDeleted(t),this.client.session.keys.includes(t))await this.isValidSessionTopic(t);else if(this.client.core.pairing.pairings.keys.includes(t))this.isValidPairingTopic(t);else if(me(t,!1)){const{message:e}=B("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${t}`);throw new Error(e)}else{const{message:e}=B("MISSING_OR_INVALID",`session or pairing topic should be a string: ${t}`);throw new Error(e)}}async isValidProposalId(t){if(!QE(t)){const{message:e}=B("MISSING_OR_INVALID",`proposal id should be a number: ${t}`);throw new Error(e)}if(!this.client.proposal.keys.includes(t)){const{message:e}=B("NO_MATCHING_KEY",`proposal id doesn't exist: ${t}`);throw new Error(e)}if(an(this.client.proposal.get(t).expiryTimestamp)){await this.deleteProposal(t);const{message:e}=B("EXPIRED",`proposal id: ${t}`);throw new Error(e)}}}class xA extends kn{constructor(t,e){super(t,e,pA,La),this.core=t,this.logger=e}}class VA extends kn{constructor(t,e){super(t,e,_A,La),this.core=t,this.logger=e}}class SA extends kn{constructor(t,e){super(t,e,yA,La,r=>r.id),this.core=t,this.logger=e}}class CA extends kn{constructor(t,e){super(t,e,bA,ss,()=>Ei),this.core=t,this.logger=e}}class $A extends kn{constructor(t,e){super(t,e,IA,ss),this.core=t,this.logger=e}}class kA extends kn{constructor(t,e){super(t,e,AA,ss,r=>r.id),this.core=t,this.logger=e}}var UA=Object.defineProperty,NA=(n,t,e)=>t in n?UA(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Us=(n,t,e)=>NA(n,typeof t!="symbol"?t+"":t,e);class BA{constructor(t,e){this.core=t,this.logger=e,Us(this,"authKeys"),Us(this,"pairingTopics"),Us(this,"requests"),this.authKeys=new CA(this.core,this.logger),this.pairingTopics=new $A(this.core,this.logger),this.requests=new kA(this.core,this.logger)}async init(){await this.authKeys.init(),await this.pairingTopics.init(),await this.requests.init()}}var MA=Object.defineProperty,qA=(n,t,e)=>t in n?MA(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Y=(n,t,e)=>qA(n,typeof t!="symbol"?t+"":t,e);class Da extends tw{constructor(t){super(t),Y(this,"protocol",nf),Y(this,"version",rf),Y(this,"name",$s.name),Y(this,"metadata"),Y(this,"core"),Y(this,"logger"),Y(this,"events",new tf.EventEmitter),Y(this,"engine"),Y(this,"session"),Y(this,"proposal"),Y(this,"pendingRequest"),Y(this,"auth"),Y(this,"signConfig"),Y(this,"on",(r,i)=>this.events.on(r,i)),Y(this,"once",(r,i)=>this.events.once(r,i)),Y(this,"off",(r,i)=>this.events.off(r,i)),Y(this,"removeListener",(r,i)=>this.events.removeListener(r,i)),Y(this,"removeAllListeners",r=>this.events.removeAllListeners(r)),Y(this,"connect",async r=>{try{return await this.engine.connect(r)}catch(i){throw this.logger.error(i.message),i}}),Y(this,"pair",async r=>{try{return await this.engine.pair(r)}catch(i){throw this.logger.error(i.message),i}}),Y(this,"approve",async r=>{try{return await this.engine.approve(r)}catch(i){throw this.logger.error(i.message),i}}),Y(this,"reject",async r=>{try{return await this.engine.reject(r)}catch(i){throw this.logger.error(i.message),i}}),Y(this,"update",async r=>{try{return await this.engine.update(r)}catch(i){throw this.logger.error(i.message),i}}),Y(this,"extend",async r=>{try{return await this.engine.extend(r)}catch(i){throw this.logger.error(i.message),i}}),Y(this,"request",async r=>{try{return await this.engine.request(r)}catch(i){throw this.logger.error(i.message),i}}),Y(this,"respond",async r=>{try{return await this.engine.respond(r)}catch(i){throw this.logger.error(i.message),i}}),Y(this,"ping",async r=>{try{return await this.engine.ping(r)}catch(i){throw this.logger.error(i.message),i}}),Y(this,"emit",async r=>{try{return await this.engine.emit(r)}catch(i){throw this.logger.error(i.message),i}}),Y(this,"disconnect",async r=>{try{return await this.engine.disconnect(r)}catch(i){throw this.logger.error(i.message),i}}),Y(this,"find",r=>{try{return this.engine.find(r)}catch(i){throw this.logger.error(i.message),i}}),Y(this,"getPendingSessionRequests",()=>{try{return this.engine.getPendingSessionRequests()}catch(r){throw this.logger.error(r.message),r}}),Y(this,"authenticate",async(r,i)=>{try{return await this.engine.authenticate(r,i)}catch(s){throw this.logger.error(s.message),s}}),Y(this,"formatAuthMessage",r=>{try{return this.engine.formatAuthMessage(r)}catch(i){throw this.logger.error(i.message),i}}),Y(this,"approveSessionAuthenticate",async r=>{try{return await this.engine.approveSessionAuthenticate(r)}catch(i){throw this.logger.error(i.message),i}}),Y(this,"rejectSessionAuthenticate",async r=>{try{return await this.engine.rejectSessionAuthenticate(r)}catch(i){throw this.logger.error(i.message),i}}),this.name=t?.name||$s.name,this.metadata=gy(t?.metadata),this.signConfig=t?.signConfig;const e=typeof t?.logger<"u"&&typeof t?.logger!="string"?t.logger:lu(jo({level:t?.logger||$s.logger}));this.core=t?.core||new oA(t),this.logger=Fe(e,this.name),this.session=new VA(this.core,this.logger),this.proposal=new xA(this.core,this.logger),this.pendingRequest=new SA(this.core,this.logger),this.engine=new DA(this),this.auth=new BA(this.core,this.logger)}static async init(t){const e=new Da(t);return await e.initialize(),e}get context(){return ot(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.auth.init(),await this.engine.init(),this.logger.info("SignClient Initialization Success")}catch(t){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(t.message),t}}}const jA=Da,zA="08c4b07e3ad25f1a27c14a4e8cecb6f0",dP="eip155";async function KA(n){const{account:t,chainId:e,params:[r]}=n;if(!t.sendRawTransaction)throw new Error("The current account does not support sending raw transactions");return(await t.sendRawTransaction({chainId:e,rawTransaction:r})).transactionHash}function os(n,t){if(ka(n.address)!==ka(t))throw new Error(`Failed to validate account address (${n.address}), differs from ${t}`)}function fP(n){const t=n.split(":"),e=Number.parseInt(t[1]??"0");if(t.length!==2||t[0]!=="eip155"||e===0||!e)throw new Error(`Invalid chainId ${n}, should have the format 'eip155:1'`);return e}async function FA(n){const{account:t,chainId:e,thirdwebClient:r,params:[i]}=n;i.from!==void 0&&os(t,i.from);const s=Ks({chain:Te(e),client:r,data:i.data,gas:i.gas?qe(i.gas):void 0,gasPrice:i.gasPrice?qe(i.gasPrice):void 0,to:i.to,value:i.value?qe(i.value):void 0});return(await nu({account:t,transaction:s})).transactionHash}async function zl(n){const{account:t,params:e}=n;return os(t,e[1]),t.signMessage({message:{raw:e[0]}})}async function WA(n){const{account:t,params:[e]}=n;if(!t.signTransaction)throw new Error("The current account does not support signing transactions");return e.from!==void 0&&os(t,e.from),t.signTransaction({data:e.data,gas:e.gas?qe(e.gas):void 0,gasPrice:e.gasPrice?qe(e.gasPrice):void 0,nonce:e.nonce?Ln(e.nonce):void 0,to:e.to,value:e.value?qe(e.value):void 0})}async function Kl(n){const{account:t,params:e}=n;return os(t,e[0]),t.signTypedData(typeof e[1]=="string"?JSON.parse(e[1]):e[1])}async function of(n){const{wallet:t,params:e}=n;return t.getChain()?.id===Ln(e[0].chainId)||await t.switchChain(Hf(Ln(e[0].chainId))),"0x1"}const pP=Object.freeze(Object.defineProperty({__proto__:null,handleSwitchChain:of},Symbol.toStringTag,{value:"Module"})),_P="/sdk/2022-08-12/embedded-wallet",Ns=n=>`thirdwebEwsWalletUserId-${n}`,HA="walletToken",Bs=n=>`${HA}-${n}`,Fl=n=>`passkey-credential-id-${n}`,GA="a",Ms=(n,t)=>`${GA}-${n}-${t}`,Wl=n=>`walletConnectSessions-${n}`,Hl=n=>`thirdweb_guest_session_id_${n}`,Gl=new Map;class xa{constructor({storage:t,clientId:e,ecosystem:r}){Object.defineProperty(this,"key",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"storage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ecosystem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.storage=t,this.key=ZA(e,r?.id),this.ecosystem=r}async getItem(t){return this.storage?this.storage.getItem(t):Gl.get(t)??null}async setItem(t,e){if(this.storage)return this.storage.setItem(t,e);Gl.set(t,e)}async removeItem(t){const e=await this.getItem(t);return this.storage&&e?(this.storage.removeItem(t),!0):!1}async getWalletConnectSessions(){return this.getItem(Wl(this.key))}async saveWalletConnectSessions(t){await this.setItem(Wl(this.key),t)}async savePasskeyCredentialId(t){await this.setItem(Fl(this.key),t)}async getPasskeyCredentialId(){return this.getItem(Fl(this.key))}async saveAuthCookie(t){await this.setItem(Bs(this.key),t)}async getAuthCookie(){return this.getItem(Bs(this.key))}async removeAuthCookie(){return this.removeItem(Bs(this.key))}async saveDeviceShare(t,e){await this.saveWalletUserId(e),await this.setItem(Ms(this.key,e),t)}async getDeviceShare(){const t=await this.getWalletUserId();return t?this.getItem(Ms(this.key,t)):null}async removeDeviceShare(){const t=await this.getWalletUserId();return t?this.removeItem(Ms(this.key,t)):!1}async getWalletUserId(){return this.getItem(Ns(this.key))}async saveWalletUserId(t){await this.setItem(Ns(this.key),t)}async removeWalletUserId(){return this.removeItem(Ns(this.key))}async getGuestSessionId(){return this.getItem(Hl(this.key))}async saveGuestSessionId(t){await this.setItem(Hl(this.key),t)}}const ZA=(n,t)=>`${n}${t?`-${t}`:""}`;let St;async function af(){if(!St)return[];const n=await St.getWalletConnectSessions();return JSON.parse(n??"[]")}function YA(n){St||(St=new xa({clientId:n.clientId,storage:null}))}async function mP(n){if(!St)return;const t=await St.getWalletConnectSessions(),e=JSON.parse(t??"[]");e.push(n),await St.saveWalletConnectSessions(Ie(e))}async function JA(n){if(!St)return;const t=await St.getWalletConnectSessions(),r=JSON.parse(t??"[]").filter(i=>i.topic!==n.topic);await St.saveWalletConnectSessions(Ie(r))}let qs=new WeakMap;const QA={eth_sendRawTransaction:KA,eth_sendTransaction:FA,eth_sign:zl,eth_signTransaction:WA,eth_signTypedData:Kl,eth_signTypedData_v4:Kl,personal_sign:zl,wallet_addEthereumChain:n=>{throw new Error("Unsupported request method: wallet_addEthereumChain")},wallet_switchEthereumChain:of};async function XA(n){const{wallet:t,requestHandlers:e,onConnect:r,onDisconnect:i,client:s}=n,o=n.chains&&n.chains.length>10?(console.warn("WalletConnect: Can specify no more than 10 chains, truncating to the first 10 provided chains..."),n.chains.slice(0,10)):n.chains;if(qs.has(s))return qs.get(s);YA({clientId:n.client.clientId});const c=Pi(),l=await jA.init({metadata:{description:n.appMetadata?.description??c.description,icons:[n.appMetadata?.logoUrl??c.logoUrl],name:n.appMetadata?.name??c.name,url:n.appMetadata?.url??c.url},projectId:n.projectId??zA});l.on("session_proposal",async h=>{const{onSessionProposal:d}=await a(async()=>{const{onSessionProposal:f}=await import("./session-proposal-D3Df17qP.js");return{onSessionProposal:f}},[]);await d({chains:o,event:h,onConnect:r,wallet:t,walletConnectClient:l}).catch(f=>{if(n.onError)n.onError(f);else throw f})}),l.on("session_request",async h=>{const{fulfillRequest:d}=await a(async()=>{const{fulfillRequest:f}=await import("./session-request-FSnknvu5.js");return{fulfillRequest:f}},__vite__mapDeps([26,4]));await d({event:h,handlers:e,thirdwebClient:s,wallet:t,walletConnectClient:l}).catch(f=>{if(n.onError)n.onError(f);else throw f})}),l.on("session_event",async h=>{}),l.on("session_ping",h=>{}),l.on("session_delete",async h=>{await cf({session:{topic:h.topic},walletConnectClient:l}).catch(d=>{if(n.onError)n.onError(d);else throw d})});const u=l.disconnect;return l.disconnect=async h=>{const d=await u(h).catch(()=>{});return i&&nT({onDisconnect:i,topic:h.topic}),d},qs.set(n.client,l),l}function eT(n){const{uri:t,walletConnectClient:e}=n;e.core.pairing.pair({uri:t})}async function tT(){return af()}async function cf(n){JA(n.session);try{await n.walletConnectClient.disconnect({reason:{code:6e3,message:"Disconnected"},topic:n.session.topic})}catch{}}async function nT(n){const{topic:t,onDisconnect:e}=n,r=await af();e(r.find(i=>i.topic===t)??{topic:t})}function rT(n){return[Et("inApp",{executionMode:n?.executionMode}),Et(fu),Et(xt,{appMetadata:n?.appMetadata,chains:n?.chains}),Et(Op),Et("io.rabby"),Et(Rp),Et("com.okex.wallet")]}function iT(n,t){const e=new Set;let r=n();const i=()=>{for(const o of e)o()},s=o=>{r=o,i()};for(const o of t)o.subscribe(()=>{s(n())});return{getValue(){return r},subscribe(o){return e.add(o),()=>{e.delete(o)}}}}function li(n,t,e=!0){e&&n();const r=t.map(i=>i.subscribe(()=>{n()}));return()=>{for(const i of r)i()}}const Mr="tw:connected-wallet-params";async function wP(n,t,e){if(!oT(e))throw new Error("given params are not stringifiable");const r=await n.getItem(Mr);let i;if(r){try{i=JSON.parse(r)}catch{i={}}i[t]=e}else i={[t]:e};n.setItem(Mr,Ie(i))}async function sT(n,t){const e=await n.getItem(Mr);let r;if(e){try{r=JSON.parse(e)}catch{r={}}delete r[t],n.setItem(Mr,Ie(r))}}async function yP(n,t){const e=await n.getItem(Mr);if(!e)return null;try{const r=JSON.parse(e);return r?.[t]?r[t]:null}catch{return null}}function oT(n){try{return Ie(n),!0}catch{return!1}}function aT(n){let t;return()=>(t||(t=n()),t)}function cT(n={}){return iu({filters:n,signature:"event UserOperationRevertReason(bytes32 indexed userOpHash, address indexed sender, uint256 nonce, bytes revertReason)"})}function lT(n={}){return iu({filters:n,signature:"event PostOpRevertReason(bytes32 indexed userOpHash, address indexed sender, uint256 nonce, bytes revertReason)"})}function uT(n){const{receipt:t}=n,e={...t,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,contractAddress:t.contractAddress?t.contractAddress:null,cumulativeGasUsed:t.cumulativeGasUsed?BigInt(t.cumulativeGasUsed):null,effectiveGasPrice:t.effectiveGasPrice?BigInt(t.effectiveGasPrice):null,gasUsed:t.gasUsed?BigInt(t.gasUsed):null,logs:t.logs,status:t.status,to:t.to?t.to:null,transactionHash:t.transactionHash,transactionIndex:t.transactionIndex,type:t.type};return t.blobGasPrice&&(e.blobGasPrice=BigInt(t.blobGasPrice)),t.blobGasUsed&&(e.blobGasUsed=BigInt(t.blobGasUsed)),{...n,actualGasCost:BigInt(n.actualGasCost),actualGasUsed:BigInt(n.actualGasUsed),nonce:BigInt(n.nonce),receipt:e,userOpHash:n.userOpHash}}const gP=()=>{const n=BigInt(Math.floor(Math.random()*4294967296)),t=BigInt(Math.floor(Math.random()*4294967296)),e=BigInt(Math.floor(Math.random()*4294967296)),r=BigInt(Math.floor(Math.random()*4294967296)),i=BigInt(Math.floor(Math.random()*4294967296)),s=BigInt(Math.floor(Math.random()*4294967296));return n<<BigInt(160)|t<<BigInt(128)|e<<BigInt(96)|r<<BigInt(64)|i<<BigInt(32)|s};function lf(n){return Object.fromEntries(Object.entries(n).map(([t,e])=>[t,e==null||bi(e)?e:No(e)]))}const{decodeErrorResult:hT}=await Mo("viem");async function EP(n){return _n({...n,operation:"eth_sendUserOperation",params:[lf(n.userOp),n.options.entrypointAddress??Ki]})}async function vP(n,t){const e=await _n({...n,operation:"eth_estimateUserOperationGas",params:[lf(n.userOp),n.options.entrypointAddress??Ki,t??{}]});return{callGasLimit:qe(e.callGasLimit)+Ep,paymasterPostOpGasLimit:e.paymasterPostOpGasLimit!==void 0?qe(e.paymasterPostOpGasLimit):void 0,paymasterVerificationGasLimit:e.paymasterVerificationGasLimit!==void 0?qe(e.paymasterVerificationGasLimit):void 0,preVerificationGas:qe(e.preVerificationGas),verificationGas:e.verificationGas!==void 0?qe(e.verificationGas):void 0,verificationGasLimit:qe(e.verificationGasLimit)}}async function bP(n){const t=await _n({...n,operation:"thirdweb_getUserOperationGasPrice",params:[]});return{maxFeePerGas:qe(t.maxFeePerGas),maxPriorityFeePerGas:qe(t.maxPriorityFeePerGas)}}async function IP(n){const t=await dT(n);if(t){if(t.success===!1){const r=kf({events:[cT(),lT()],logs:t.logs})[0]?.args?.revertReason;if(!r)throw new Error(`UserOp failed at txHash: ${t.receipt.transactionHash}`);const i=hT({data:r});throw new Error(`UserOp failed with reason: '${i.args.join(",")}' at txHash: ${t.receipt.transactionHash}`)}return t.receipt}}async function dT(n){const t=await _n({operation:"eth_getUserOperationReceipt",options:n,params:[n.userOpHash]});if(t)return uT(t)}async function AP(n){const t=await _n({operation:"zk_paymasterData",options:n.options,params:[n.transaction]});return{paymaster:t.paymaster,paymasterInput:t.paymasterInput}}async function fT(n){const t=await _n({...n,operation:"tw_execute",params:[n.eoaAddress,n.wrappedCalls,n.signature,n.authorization]});if(!t.queueId)throw new Error(`Error executing 7702 transaction: ${Ie(t)}`);return{transactionId:t.queueId}}async function pT(n){return{transactionHash:(await _n({...n,operation:"tw_getTransactionHash",params:[n.transactionId]})).transactionHash}}async function TP(n){return{transactionHash:(await _n({operation:"zk_broadcastTransaction",options:n.options,params:[{...n.transaction,signedTransaction:n.signedTransaction}]})).transactionHash}}async function _n(n){const{options:t,operation:e,params:r}=n,i=t.bundlerUrl??hu(t.chain),o=await qr(t.client)(i,{useAuthToken:!0,body:Ie({id:1,jsonrpc:"2.0",method:e,params:r}),headers:{"Content-Type":"application/json"},method:"POST"}),c=await o.json();if(!o.ok||c.error){let l=c.error||o.statusText;typeof l=="object"&&(l=Ie(l));const u=c.code||"UNKNOWN";throw new Error(`${e} error: ${l}
15
+ Status: ${o.status}
16
+ Code: ${u}`)}return c.result}function xo(n){if(!n)return!1;if(n.id==="smart")return!0;if(n.id==="inApp"||tr(n)){const t=n.getConfig();if(t&&"smartAccount"in t&&t.smartAccount)return!0;if(t?.executionMode){const e=t.executionMode;return e.mode==="EIP4337"||e.mode==="EIP7702"}}return!1}const uf="thirdweb:connected-wallet-ids",vi="thirdweb:active-wallet-id",Vo="thirdweb:active-chain",Zl="thirdweb:last-used-wallet-id";function _T(n){const t=wn(void 0),e=wn(void 0),r=wn(void 0),i=wn("unknown"),s=wn(new Map);li(()=>{Gf([...s.getValue().values()])},[s]),li(()=>{const g=r.getValue();if(!g)return;const I=s.getValue().get(g.id);!I||I===g||r.setValue(I)},[s,r]);const o=wn(new Map),c=wn(!1),l=iT(()=>Array.from(o.getValue().values()),[o]),u=g=>{const I=o.getValue();if(I.has(g.id))return;const b=new Map(I);b.set(g.id,g),o.setValue(b)},h=g=>{const I=o.getValue(),b=new Map(I);b.delete(g.id),o.setValue(b)},d=g=>{sT(n,g.id),h(g),t.getValue()===g&&(n.removeItem(vi),e.setValue(void 0),r.setValue(void 0),t.setValue(void 0),i.setValue("disconnected"))},f=g=>{d(g),g.disconnect()},p=async(g,I)=>{if(!g.getAccount())throw new Error("Cannot set a wallet without an account as active");const D=await(async()=>I?.accountAbstraction&&!xo(g)?await mT(g,I.client,I.accountAbstraction,d):g)();return await n.setItem(vi,g.id),await n.setItem(Zl,g.id),u(g),I?.setWalletAsActive!==!1&&w(D),g.subscribe("accountChanged",async()=>{const x=await p(g,I);I?.onConnect?.(x,l.getValue())}),D},m=async(g,I)=>{const b=await p(g,I);return I?.onConnect?.(b,l.getValue()),b},w=g=>{const I=g.getAccount();if(!I)throw new Error("Cannot set a wallet without an account as active");u(g),t.setValue(g),e.setValue(I),r.setValue(g.getChain()),i.setValue("connected");const b=L=>{e.setValue(L)},D=g.subscribe("accountChanged",b),x=g.subscribe("chainChanged",L=>r.setValue(L)),S=g.subscribe("disconnect",()=>{y()}),y=()=>{d(g),D(),x(),S()}},_=async g=>{w(g),g.id!=="smart"&&(await n.setItem(vi,g.id),await n.setItem(Zl,g.id))};li(()=>{const g=r.getValue();g?n.setItem(Vo,Ie(g)):n.removeItem(Vo)},[r],!1),li(async()=>{const I=l.getValue().map(b=>b?.id).filter(b=>!!b);n.setItem(uf,Ie(Array.from(new Set([...I]))))},[l],!1);const E=async g=>{const I=t.getValue();if(!I)throw new Error("No active wallet found");if(!I.switchChain)throw new Error("Wallet does not support switching chains");if(xo(I)){const b=await Va(n);if(b){const D=l.getValue().find(x=>x.id===b);if(D){await D.switchChain(g),await I.switchChain(g),w(I);return}}await I.switchChain(g),w(I)}else await I.switchChain(g);r.setValue(I.getChain())};function v(g){const I=s.getValue();if(g.every(x=>{const S=I.get(x.id);return Ie(S)===Ie(x)}))return;const D=new Map(I);for(const x of g)D.set(x.id,x);s.setValue(D)}return{activeAccountStore:e,activeWalletChainStore:r,activeWalletConnectionStatusStore:i,activeWalletStore:t,addConnectedWallet:u,connect:m,connectedWallets:l,defineChains:v,disconnectWallet:f,handleConnection:p,isAutoConnecting:c,removeConnectedWallet:h,setActiveWallet:_,switchActiveWalletChain:E}}async function hf(n){try{const t=await n.getItem(uf);return t?JSON.parse(t):[]}catch{return[]}}async function Va(n){try{const t=await n.getItem(vi);if(t)return t}catch{}return null}async function df(n){try{const t=await n.getItem(Vo);if(t)return JSON.parse(t)}catch{}return null}const mT=async(n,t,e,r)=>{const i=n.getAccount();if(!i)throw new Error("Cannot set a wallet without an account as active");const s=Jo(e);await s.connect({chain:e.chain,client:t,personalAccount:i});const o=n.subscribe("disconnect",()=>{c()}),c=()=>{o(),r(s)};return s};function ff(n,t){return new Promise((e,r)=>{const i=setTimeout(()=>{r(new Error(t.message))},t.ms);n.then(s=>{clearTimeout(i),e(s)},s=>{clearTimeout(i),r(s)})})}async function wT({client:n,ecosystem:t,tokenToLink:e,storage:r}){const i=qr(n,t),s=zi("inAppWallet"),o=await r.getAuthCookie();if(!o)throw new Error("Failed to link account, no user logged in");const c={Authorization:`Bearer iaw-auth-token:${o}`,"Content-Type":"application/json"},l=await i(`${s}/api/2024-05-05/account/connect`,{body:Ie({accountAuthTokenToConnect:e}),headers:c,method:"POST"});if(!l.ok){const h=await l.json();throw new Error(h.message||"Failed to link account.")}const{linkedAccounts:u}=await l.json();return u??[]}async function PP({client:n,ecosystem:t,profileToUnlink:e,allowAccountDeletion:r=!1,storage:i}){const s=qr(n,t),o=zi("inAppWallet"),c=await i.getAuthCookie();if(!c)throw new Error("Failed to unlink account, no user logged in");const l={Authorization:`Bearer iaw-auth-token:${c}`,"Content-Type":"application/json"},u=await s(`${o}/api/2024-05-05/account/disconnect`,{body:Ie({allowAccountDeletion:r,details:e.details,type:e.type}),headers:l,method:"POST"});if(!u.ok){const d=await u.json();throw new Error(d.message||"Failed to unlink account.")}const{linkedAccounts:h}=await u.json();return h??[]}async function OP({client:n,ecosystem:t,storage:e}){const r=qr(n,t),i=zi("inAppWallet"),s=await e.getAuthCookie();if(!s)throw new Error("Failed to get linked accounts, no user logged in");const o={Authorization:`Bearer iaw-auth-token:${s}`,"Content-Type":"application/json"},c=await r(`${i}/api/2024-05-05/accounts`,{headers:o,method:"GET"});if(!c.ok){const u=await c.json();throw new Error(u.message||"Failed to get linked accounts.")}const{linkedAccounts:l}=await c.json();return l??[]}const pf=["google","apple","facebook","discord","line","x","tiktok","epic","coinbase","farcaster","telegram","github","twitch","steam"],RP=[...pf,"guest","backend","email","phone","passkey","wallet"],yT="0x3f707e6b",gT=[{type:"tuple[]",name:"calls",components:[{type:"address",name:"target"},{type:"uint256",name:"value"},{type:"bytes",name:"data"}]}],ET=[];function vT(n){const t=aT(async()=>"asyncParams"in n?await n.asyncParams():n);return Uf({contract:n.contract,method:[yT,gT,ET],params:async()=>[(await t()).calls],value:async()=>(await t()).overrides?.value,accessList:async()=>(await t()).overrides?.accessList,gas:async()=>(await t()).overrides?.gas,gasPrice:async()=>(await t()).overrides?.gasPrice,maxFeePerGas:async()=>(await t()).overrides?.maxFeePerGas,maxPriorityFeePerGas:async()=>(await t()).overrides?.maxPriorityFeePerGas,nonce:async()=>(await t()).overrides?.nonce,extraGas:async()=>(await t()).overrides?.extraGas,erc20Value:async()=>(await t()).overrides?.erc20Value,authorizationList:async()=>(await t()).overrides?.authorizationList})}async function bT(n){const{client:t,chain:e,bundlerUrl:r}=n,i=r??hu(e),s=`delegation-contract:${i}`;return ou(async()=>{const c=await qr(t)(i,{useAuthToken:!0,body:Ie({id:1,jsonrpc:"2.0",method:"tw_getDelegationContract",params:[]}),headers:{"Content-Type":"application/json"},method:"POST"});if(!c.ok)throw new Error(`Failed to fetch delegation contract: ${c.status} ${c.statusText}`);const l=await c.json();if(l.error)throw new Error(`Delegation contract RPC error: ${JSON.stringify(l.error)}`);if(!l.result?.delegationContract)throw new Error("Invalid response: missing delegationContract in result");return l.result.delegationContract},{cacheKey:s,cacheTime:24*60*60*1e3})}const IT=n=>{const{client:t,adminAccount:e,sponsorGas:r}=n,i=async o=>{const c=o[0];if(!c)throw new Error("No transactions provided");const l=Te(c.chainId),u=ko({address:e.address,chain:l,client:t,abi:OT});let h=c.authorizationList?.[0];const d=await bT({client:t,chain:l});if(h&&h.address?.toLowerCase()!==d.toLowerCase())throw new Error(`Authorization address does not match expected delegation contract address. Expected ${d} but got ${h.address}`);if(!h&&!await TT(u,d)){let w=c.nonce?BigInt(c.nonce):BigInt(await AT({client:t,address:e.address,chain:l}));w+=r?0n:1n;const _=await e.signAuthorization?.({address:J(d),chainId:c.chainId,nonce:w});if(!_)throw new Error("Failed to sign authorization");h=_}if(r){const m={calls:o.map(v=>({data:v.data??"0x",target:J(v.to??""),value:v.value??0n})),uid:fp()},w=await e.signTypedData({domain:{chainId:c.chainId,name:"MinimalAccount",verifyingContract:u.address,version:"1"},message:m,primaryType:"WrappedCalls",types:{Call:[{name:"target",type:"address"},{name:"value",type:"uint256"},{name:"data",type:"bytes"}],WrappedCalls:[{name:"calls",type:"Call[]"},{name:"uid",type:"bytes32"}]}}),_=await fT({authorization:h,eoaAddress:J(e.address),options:{chain:Te(c.chainId),client:t},signature:w,wrappedCalls:m});return{transactionHash:await PT({options:{chain:Te(c.chainId),client:t},transactionId:_.transactionId})}}const f=vT({calls:o.map(m=>({data:m.data??"0x",target:J(m.to??""),value:m.value??0n})),contract:u,overrides:{authorizationList:h?[h]:void 0,value:o.reduce((m,w)=>m+(w.value??0n),0n)}}),p=await Nf({from:e.address,transaction:f});return e.sendTransaction(p)},s={address:e.address,sendBatchTransaction:async o=>i(o),sendTransaction:async o=>i([o]),signMessage:({message:o,originalMessage:c,chainId:l})=>e.signMessage({chainId:l,message:o,originalMessage:c}),signTypedData:o=>e.signTypedData(o),sendCalls:async o=>{const{inAppWalletSendCalls:c}=await a(async()=>{const{inAppWalletSendCalls:f}=await import("./in-app-wallet-calls-ZBHxiKkB.js");return{inAppWalletSendCalls:f}},__vite__mapDeps([27,28,1,16,15,4,17,29])),l=o.calls[0];if(!l)throw new Error("No calls to send");const u=l.client,h=l.chain||o.chain,d=await c({account:s,calls:o.calls,chain:h});return{chain:h,client:u,id:d}},getCallsStatus:async o=>{const{inAppWalletGetCallsStatus:c}=await a(async()=>{const{inAppWalletGetCallsStatus:l}=await import("./in-app-wallet-calls-ZBHxiKkB.js");return{inAppWalletGetCallsStatus:l}},__vite__mapDeps([27,28,1,16,15,4,17,29]));return c(o)},getCallsStatusRaw:async o=>{const{inAppWalletGetCallsStatusRaw:c}=await a(async()=>{const{inAppWalletGetCallsStatusRaw:l}=await import("./in-app-wallet-calls-ZBHxiKkB.js");return{inAppWalletGetCallsStatusRaw:l}},__vite__mapDeps([27,28,1,16,15,4,17,29]));return c(o)},getCapabilities:async o=>({[o.chainId??1]:{atomic:{status:"supported"},paymasterService:{supported:r??!1}}})};return s};async function AT(n){const{client:t,address:e,chain:r}=n,i=ji({chain:r,client:t});return await a(async()=>{const{eth_getTransactionCount:o}=await import("./eth_getTransactionCount-y2QsTvLw.js");return{eth_getTransactionCount:o}},__vite__mapDeps([30,16,15,1,4])).then(({eth_getTransactionCount:o})=>o(i,{address:J(e),blockTag:"pending"}))}async function TT(n,t){const e=await Bf(n),r=e.length>0&&e.startsWith("0xef0100"),i=`0x${e.slice(8,48)}`;return r&&i.toLowerCase()===t.toLowerCase()}async function PT(n){const t=n.timeoutMs||3e5,e=n.intervalMs||1e3,r=Date.now()+t;for(;Date.now()<r;){const i=await pT({options:n.options,transactionId:n.transactionId});if(i.transactionHash)return i.transactionHash;await new Promise(s=>setTimeout(s,e))}throw new Error(`Timeout waiting for transaction to be mined on chain ${n.options.chain.id} with transactionId: ${n.transactionId}`)}const OT=[{type:"receive",stateMutability:"payable"},{type:"function",name:"createSessionWithSig",inputs:[{name:"sessionSpec",type:"tuple",internalType:"struct SessionLib.SessionSpec",components:[{name:"signer",type:"address",internalType:"address"},{name:"isWildcard",type:"bool",internalType:"bool"},{name:"expiresAt",type:"uint256",internalType:"uint256"},{name:"callPolicies",type:"tuple[]",internalType:"struct SessionLib.CallSpec[]",components:[{name:"target",type:"address",internalType:"address"},{name:"selector",type:"bytes4",internalType:"bytes4"},{name:"maxValuePerUse",type:"uint256",internalType:"uint256"},{name:"valueLimit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]},{name:"constraints",type:"tuple[]",internalType:"struct SessionLib.Constraint[]",components:[{name:"condition",type:"uint8",internalType:"enum SessionLib.Condition"},{name:"index",type:"uint64",internalType:"uint64"},{name:"refValue",type:"bytes32",internalType:"bytes32"},{name:"limit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]}]}]},{name:"transferPolicies",type:"tuple[]",internalType:"struct SessionLib.TransferSpec[]",components:[{name:"target",type:"address",internalType:"address"},{name:"maxValuePerUse",type:"uint256",internalType:"uint256"},{name:"valueLimit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]}]},{name:"uid",type:"bytes32",internalType:"bytes32"}]},{name:"signature",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"eip712Domain",inputs:[],outputs:[{name:"fields",type:"bytes1",internalType:"bytes1"},{name:"name",type:"string",internalType:"string"},{name:"version",type:"string",internalType:"string"},{name:"chainId",type:"uint256",internalType:"uint256"},{name:"verifyingContract",type:"address",internalType:"address"},{name:"salt",type:"bytes32",internalType:"bytes32"},{name:"extensions",type:"uint256[]",internalType:"uint256[]"}],stateMutability:"view"},{type:"function",name:"execute",inputs:[{name:"calls",type:"tuple[]",internalType:"struct Call[]",components:[{name:"target",type:"address",internalType:"address"},{name:"value",type:"uint256",internalType:"uint256"},{name:"data",type:"bytes",internalType:"bytes"}]}],outputs:[],stateMutability:"payable"},{type:"function",name:"executeWithSig",inputs:[{name:"wrappedCalls",type:"tuple",internalType:"struct WrappedCalls",components:[{name:"calls",type:"tuple[]",internalType:"struct Call[]",components:[{name:"target",type:"address",internalType:"address"},{name:"value",type:"uint256",internalType:"uint256"},{name:"data",type:"bytes",internalType:"bytes"}]},{name:"uid",type:"bytes32",internalType:"bytes32"}]},{name:"signature",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"payable"},{type:"function",name:"getCallPoliciesForSigner",inputs:[{name:"signer",type:"address",internalType:"address"}],outputs:[{name:"",type:"tuple[]",internalType:"struct SessionLib.CallSpec[]",components:[{name:"target",type:"address",internalType:"address"},{name:"selector",type:"bytes4",internalType:"bytes4"},{name:"maxValuePerUse",type:"uint256",internalType:"uint256"},{name:"valueLimit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]},{name:"constraints",type:"tuple[]",internalType:"struct SessionLib.Constraint[]",components:[{name:"condition",type:"uint8",internalType:"enum SessionLib.Condition"},{name:"index",type:"uint64",internalType:"uint64"},{name:"refValue",type:"bytes32",internalType:"bytes32"},{name:"limit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]}]}]}],stateMutability:"view"},{type:"function",name:"getSessionExpirationForSigner",inputs:[{name:"signer",type:"address",internalType:"address"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"getSessionStateForSigner",inputs:[{name:"signer",type:"address",internalType:"address"}],outputs:[{name:"",type:"tuple",internalType:"struct SessionLib.SessionState",components:[{name:"transferValue",type:"tuple[]",internalType:"struct SessionLib.LimitState[]",components:[{name:"remaining",type:"uint256",internalType:"uint256"},{name:"target",type:"address",internalType:"address"},{name:"selector",type:"bytes4",internalType:"bytes4"},{name:"index",type:"uint256",internalType:"uint256"}]},{name:"callValue",type:"tuple[]",internalType:"struct SessionLib.LimitState[]",components:[{name:"remaining",type:"uint256",internalType:"uint256"},{name:"target",type:"address",internalType:"address"},{name:"selector",type:"bytes4",internalType:"bytes4"},{name:"index",type:"uint256",internalType:"uint256"}]},{name:"callParams",type:"tuple[]",internalType:"struct SessionLib.LimitState[]",components:[{name:"remaining",type:"uint256",internalType:"uint256"},{name:"target",type:"address",internalType:"address"},{name:"selector",type:"bytes4",internalType:"bytes4"},{name:"index",type:"uint256",internalType:"uint256"}]}]}],stateMutability:"view"},{type:"function",name:"getTransferPoliciesForSigner",inputs:[{name:"signer",type:"address",internalType:"address"}],outputs:[{name:"",type:"tuple[]",internalType:"struct SessionLib.TransferSpec[]",components:[{name:"target",type:"address",internalType:"address"},{name:"maxValuePerUse",type:"uint256",internalType:"uint256"},{name:"valueLimit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]}]}],stateMutability:"view"},{type:"function",name:"isWildcardSigner",inputs:[{name:"signer",type:"address",internalType:"address"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"onERC1155BatchReceived",inputs:[{name:"",type:"address",internalType:"address"},{name:"",type:"address",internalType:"address"},{name:"",type:"uint256[]",internalType:"uint256[]"},{name:"",type:"uint256[]",internalType:"uint256[]"},{name:"",type:"bytes",internalType:"bytes"}],outputs:[{name:"",type:"bytes4",internalType:"bytes4"}],stateMutability:"nonpayable"},{type:"function",name:"onERC1155Received",inputs:[{name:"",type:"address",internalType:"address"},{name:"",type:"address",internalType:"address"},{name:"",type:"uint256",internalType:"uint256"},{name:"",type:"uint256",internalType:"uint256"},{name:"",type:"bytes",internalType:"bytes"}],outputs:[{name:"",type:"bytes4",internalType:"bytes4"}],stateMutability:"nonpayable"},{type:"function",name:"onERC721Received",inputs:[{name:"",type:"address",internalType:"address"},{name:"",type:"address",internalType:"address"},{name:"",type:"uint256",internalType:"uint256"},{name:"",type:"bytes",internalType:"bytes"}],outputs:[{name:"",type:"bytes4",internalType:"bytes4"}],stateMutability:"nonpayable"},{type:"function",name:"supportsInterface",inputs:[{name:"interfaceId",type:"bytes4",internalType:"bytes4"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"event",name:"Executed",inputs:[{name:"to",type:"address",indexed:!0,internalType:"address"},{name:"value",type:"uint256",indexed:!1,internalType:"uint256"},{name:"data",type:"bytes",indexed:!1,internalType:"bytes"}],anonymous:!1},{type:"event",name:"SessionCreated",inputs:[{name:"signer",type:"address",indexed:!0,internalType:"address"},{name:"sessionSpec",type:"tuple",indexed:!1,internalType:"struct SessionLib.SessionSpec",components:[{name:"signer",type:"address",internalType:"address"},{name:"isWildcard",type:"bool",internalType:"bool"},{name:"expiresAt",type:"uint256",internalType:"uint256"},{name:"callPolicies",type:"tuple[]",internalType:"struct SessionLib.CallSpec[]",components:[{name:"target",type:"address",internalType:"address"},{name:"selector",type:"bytes4",internalType:"bytes4"},{name:"maxValuePerUse",type:"uint256",internalType:"uint256"},{name:"valueLimit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]},{name:"constraints",type:"tuple[]",internalType:"struct SessionLib.Constraint[]",components:[{name:"condition",type:"uint8",internalType:"enum SessionLib.Condition"},{name:"index",type:"uint64",internalType:"uint64"},{name:"refValue",type:"bytes32",internalType:"bytes32"},{name:"limit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]}]}]},{name:"transferPolicies",type:"tuple[]",internalType:"struct SessionLib.TransferSpec[]",components:[{name:"target",type:"address",internalType:"address"},{name:"maxValuePerUse",type:"uint256",internalType:"uint256"},{name:"valueLimit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]}]},{name:"uid",type:"bytes32",internalType:"bytes32"}]}],anonymous:!1},{type:"event",name:"ValueReceived",inputs:[{name:"from",type:"address",indexed:!0,internalType:"address"},{name:"value",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"error",name:"AllowanceExceeded",inputs:[{name:"allowanceUsage",type:"uint256",internalType:"uint256"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint64",internalType:"uint64"}]},{type:"error",name:"CallPolicyViolated",inputs:[{name:"target",type:"address",internalType:"address"},{name:"selector",type:"bytes4",internalType:"bytes4"}]},{type:"error",name:"CallReverted",inputs:[]},{type:"error",name:"ConditionFailed",inputs:[{name:"param",type:"bytes32",internalType:"bytes32"},{name:"refValue",type:"bytes32",internalType:"bytes32"},{name:"condition",type:"uint8",internalType:"uint8"}]},{type:"error",name:"InvalidDataLength",inputs:[{name:"actualLength",type:"uint256",internalType:"uint256"},{name:"expectedLength",type:"uint256",internalType:"uint256"}]},{type:"error",name:"InvalidSignature",inputs:[{name:"msgSender",type:"address",internalType:"address"},{name:"thisAddress",type:"address",internalType:"address"}]},{type:"error",name:"LifetimeUsageExceeded",inputs:[{name:"lifetimeUsage",type:"uint256",internalType:"uint256"},{name:"limit",type:"uint256",internalType:"uint256"}]},{type:"error",name:"MaxValueExceeded",inputs:[{name:"value",type:"uint256",internalType:"uint256"},{name:"maxValuePerUse",type:"uint256",internalType:"uint256"}]},{type:"error",name:"NoCallsToExecute",inputs:[]},{type:"error",name:"SessionExpired",inputs:[]},{type:"error",name:"SessionExpiresTooSoon",inputs:[]},{type:"error",name:"SessionZeroSigner",inputs:[]},{type:"error",name:"TransferPolicyViolated",inputs:[{name:"target",type:"address",internalType:"address"}]},{type:"error",name:"UIDAlreadyProcessed",inputs:[]}];function _f(n){return n.id==="inApp"||n.id==="embedded"}async function RT(n,t,e){if(t?.auth?.mode!=="popup"&&t?.auth?.mode!==void 0&&e.authenticateWithRedirect){const s=n.strategy;pf.includes(s)&&await e.authenticateWithRedirect(s,t?.auth?.mode,t?.auth?.redirectUrl)}const i=(await e.connect(n)).user.account;return mf({authAccount:i,client:n.client,createOptions:t,desiredChain:n.chain})}async function LT(n,t,e){n.authResult&&e.loginWithAuthToken&&await e.loginWithAuthToken(n.authResult);const r=await xT(e);if(!r)throw new Error("Failed to authenticate user.");const i=r.account;return mf({authAccount:i,client:n.client,createOptions:t,desiredChain:n.chain})}async function DT(n){const{connectSmartAccount:t}=await a(async()=>{const{connectSmartAccount:e}=await import("./index-BSdPSW5L.js");return{connectSmartAccount:e}},__vite__mapDeps([18,4,16,15,1,19,20,21]));return t({chain:n.chain,client:n.client,personalAccount:n.authAccount},n.smartAccountOptions)}async function xT(n){const t=await n.getUser();switch(t.status){case"Logged In, Wallet Initialized":return t}}async function mf(n){const{createOptions:t,authAccount:e,desiredChain:r,client:i}=n;let s,o;const c=t&&"executionMode"in t?t.executionMode:void 0;if(c&&(c.mode==="EIP4337"?s=c.smartAccount:c.mode==="EIP7702"&&(o=c)),t&&"smartAccount"in t&&t?.smartAccount&&(s=t.smartAccount),s){const[l,u]=await DT({authAccount:e,chain:r,client:i,smartAccountOptions:s});return{account:l,adminAccount:e,chain:u}}if(o){const l=r;if(!l)throw new Error("Chain is required for EIP-7702 execution, pass a chain when connecting the inAppWallet.");return{account:IT({adminAccount:e,client:i,sponsorGas:o.sponsorGas}),adminAccount:e,chain:l}}return{account:e,chain:r||dp}}const js=Object.freeze(Object.defineProperty({__proto__:null,autoConnectInAppWallet:LT,connectInAppWallet:RT,isInAppWallet:_f},Symbol.toStringTag,{value:"Module"}));function VT(n){const t=r=>_f(r)||tr(r),e=xo(n.wallet)&&n.connectedWallets.some(r=>t(r)&&r.getAccount()?.address?.toLowerCase()===n.wallet.getAdminAccount?.()?.address?.toLowerCase());return t(n.wallet)||e}function ST(){if(typeof document>"u")return;const n=new URLSearchParams(window.location.search);let t;const e=window.location.hash||"";let r=e;const i=e.indexOf("?");i!==-1&&(t=new URLSearchParams(e.substring(i)),r=e.substring(0,i));const s=n.get("walletId")??t?.get("walletId")??void 0,o=n.get("authResult")??t?.get("authResult")??void 0,c=n.get("authProvider")??t?.get("authProvider")??void 0,l=n.get("authCookie")??t?.get("authCookie")??void 0,u=n.get("authFlow")??t?.get("authFlow")??void 0;if((l||o)&&s){const h=(()=>{if(o)return n.delete("authResult"),t?.delete("authResult"),JSON.parse(decodeURIComponent(o))})();n.delete("walletId"),n.delete("authProvider"),n.delete("authCookie"),n.delete("authFlow"),t?.delete("walletId"),t?.delete("authProvider"),t?.delete("authCookie"),t?.delete("authFlow");const d=n.toString(),f=d?`?${d}`:"";let p=r;if(t){const m=t.toString();m&&(p=`${r}?${m}`)}return window.history.pushState({},"",`${window.location.pathname}${f}${p}`),{authCookie:l,authFlow:u,authProvider:c,authResult:h,walletId:s}}}let zs;const CT=async n=>{if(zs&&!n.force&&await zs)return!0;const t=$T(n);return zs=t,t},$T=async({storage:n,props:t,createWalletFn:e,manager:r,connectOverride:i,setLastAuthProvider:s})=>{const{wallets:o,onConnect:c}=t,l=t.timeout??15e3;let u=!1;r.isAutoConnecting.setValue(!0);let[h,d]=await Promise.all([hf(n),Va(n)]);const f=ST();if(f?.authFlow==="link"&&f.authResult)return await kT({client:t.client,connectOverride:i,createWalletFn:e,manager:r,onConnect:c,props:t,setLastAuthProvider:s,storage:n,timeout:l,urlToken:f,wallets:o});const p=o.find(b=>b.id===f?.walletId);if(f?.authCookie&&p&&await new xa({clientId:t.client.clientId,ecosystem:tr(p)?{id:p.id,partnerId:p.getConfig()?.partnerId}:void 0,storage:n}).saveAuthCookie(f.authCookie),f?.walletId&&(d=f.walletId,h=h?.includes(f.walletId)?h:[f.walletId,...h||[]]),f?.authProvider&&await s?.(f.authProvider,n),!h)return u;const m=await df(n)||t.chain,w=h.map(b=>{const D=o.find(x=>x.id===b);return D||e(b)}),_=d&&(w.find(b=>b.id===d)||e(d));if(_){r.activeWalletConnectionStatusStore.setValue("connecting"),await ff(So({authResult:f?.authResult,client:t.client,lastConnectedChain:m,wallet:_}),{message:`AutoConnect timeout: ${l}ms limit exceeded.`,ms:l}).catch(b=>{console.warn(b.message),t.onTimeout&&t.onTimeout()});try{await(i?i(_):r.connect(_,{accountAbstraction:t.accountAbstraction,client:t.client}))}catch(b){b instanceof Error&&console.warn("Error auto connecting wallet:",b.message),r.activeWalletConnectionStatusStore.setValue("disconnected")}}else r.activeWalletConnectionStatusStore.setValue("disconnected");const E=w.filter(b=>b.id!==d&&h.includes(b.id));for(const b of E)try{await So({authResult:f?.authResult,client:t.client,lastConnectedChain:m,wallet:b}),r.addConnectedWallet(b)}catch{}_&&VT({connectedWallets:_?[_,...E]:E,wallet:_})&&t.siweAuth?.requiresAuth&&!t.siweAuth?.isLoggedIn&&!t.siweAuth?.isLoggingIn&&await t.siweAuth?.doLogin().catch(b=>{console.warn("Error signing in with SIWE:",b.message)}),r.isAutoConnecting.setValue(!1);const g=r.activeWalletStore.getValue(),I=r.connectedWallets.getValue();if(g){u=!0;try{c?.(g,I)}catch(b){console.error("Error calling onConnect callback:",b)}}else r.activeWalletConnectionStatusStore.setValue("disconnected");return u};async function kT(n){const{client:t,connectOverride:e,createWalletFn:r,manager:i,onConnect:s,props:o,setLastAuthProvider:c,storage:l,timeout:u,urlToken:h,wallets:d}=n,[f,p]=await Promise.all([hf(l),Va(l)]),m=await df(l)||o.chain;if(!p||!f)return console.warn("No stored wallet found for linking flow"),i.isAutoConnecting.setValue(!1),!1;h.authProvider&&await c?.(h.authProvider,l);const w=d.find(I=>I.id===p)||r(p);i.activeWalletConnectionStatusStore.setValue("connecting");try{await ff(So({authResult:void 0,client:t,lastConnectedChain:m,wallet:w}),{message:`AutoConnect timeout: ${u}ms limit exceeded.`,ms:u}),await(e?e(w):i.connect(w,{accountAbstraction:o.accountAbstraction,client:t}))}catch(I){return console.warn("Failed to auto-connect for linking:",I),i.activeWalletConnectionStatusStore.setValue("disconnected"),i.isAutoConnecting.setValue(!1),!1}const _=tr(w)?{id:w.id,partnerId:w.getConfig()?.partnerId}:void 0,E=new xa({clientId:t.clientId,ecosystem:_,storage:l});try{await wT({client:t,ecosystem:_,storage:E,tokenToLink:h.authResult.storedToken.cookieString})}catch(I){console.error("Failed to link profile after redirect:",I)}i.isAutoConnecting.setValue(!1);const v=i.activeWalletStore.getValue(),g=i.connectedWallets.getValue();if(v){try{s?.(v,g)}catch(I){console.error("Error calling onConnect callback:",I)}return!0}return!1}async function So(n){return n.wallet.autoConnect({authResult:n.authResult,chain:n.lastConnectedChain,client:n.client})}async function UT(n){const t=n.wallets||rT(n),e=_T(Ti);return await CT({createWalletFn:Et,manager:e,props:{...n,wallets:t},storage:Ti})}const LP=Object.freeze(Object.defineProperty({__proto__:null,DefaultWalletConnectRequestHandlers:QA,EIP1193:Xp,authenticate:s_,authenticateWithRedirect:o_,autoConnect:UT,createWallet:Et,createWalletAdapter:e_,createWalletConnectClient:XA,createWalletConnectSession:eT,deploySmartAccount:jf,disconnectWalletConnectSession:cf,ecosystemWallet:Pu,embeddedWallet:Ws,generateAccount:Q_,getActiveWalletConnectSessions:tT,getAllWalletsList:t_,getInstalledWallets:Ou,getProfiles:l_,getUser:qf,getUserEmail:n_,getUserPhoneNumber:r_,getWalletBalance:X_,getWalletInfo:mu,inAppWallet:Ws,injectedProvider:Qo,isBaseAccountSDKWallet:yu,linkProfile:a_,preAuthenticate:i_,privateKeyAccount:eo,privateKeyToAccount:eo,randomPrivateKey:Mf,smartWallet:Jo,unlinkProfile:c_,walletConnect:zp},Symbol.toStringTag,{value:"Module"}));export{OP as $,IP as A,bp as B,bP as C,zA as D,Ki as E,_i as F,GT as G,vP as H,gp as I,gP as J,de as K,vp as L,AP as M,dP as N,TP as O,Rd as P,EP as Q,xo as R,RP as S,xa as T,Ti as U,Br as V,_P as W,pf as X,CE as Y,wT as Z,PP as _,yP as a,pP as a0,LP as a1,mu as b,Pi as c,mP as d,cf as e,Lp as f,jp as g,af as h,fP as i,KA as j,FA as k,WA as l,Kl as m,bt as n,zl as o,Fo as p,Qn as q,fp as r,wP as s,Da as t,Rn as u,ye as v,an as w,aT as x,hu as y,lf as z};