@wormhole-foundation/wormhole-connect 3.0.2-beta.0-development → 3.0.2-beta.1-development

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 (290) hide show
  1. package/README.md +1 -1
  2. package/dist/assets/{basic-ChNCp6rI.js → basic-PUjrTVXb.js} +1 -1
  3. package/dist/assets/{evm-DSirgd5b.js → evm-CO5UWnAY.js} +2 -2
  4. package/dist/assets/{index-L-lC4rqb.js → index-1lzfHdT2.js} +1 -1
  5. package/dist/assets/{index-CHfaLf5J.js → index-DBVZDYF7.js} +1 -1
  6. package/dist/assets/index-DKlPX3ZI.js +1 -0
  7. package/dist/assets/{index-BtCrMDAu.js → index-Ddk7n7Ti.js} +1 -1
  8. package/dist/assets/{index-HhyysXFu.js → index-DyUmO4PR.js} +1 -1
  9. package/dist/assets/{index-BiwA3Bbq.js → index-MMzKxP1N.js} +1 -1
  10. package/dist/assets/{secp256k1-Cd7rIav0.js → secp256k1-0LtSM2L1.js} +1 -1
  11. package/dist/assets/{secp256k1-BQBOR8e3.js → secp256k1-DwTU3j1N.js} +1 -1
  12. package/dist/assets/{solana-DcwLWeKT.js → solana-DlGdMBSL.js} +4 -4
  13. package/dist/assets/{w3m-modal-DdptuLHe.js → w3m-modal-DD9Jgepz.js} +1 -1
  14. package/dist/main.js +72 -70
  15. package/dist/src/AppRouter.d.ts.map +1 -1
  16. package/dist/src/config/mainnet/tokens.d.ts.map +1 -1
  17. package/dist/src/config/testnet/tokens.d.ts.map +1 -1
  18. package/dist/src/config/tokens.d.ts +1 -1
  19. package/dist/src/config/tokens.d.ts.map +1 -1
  20. package/dist/src/exports/index.d.ts +2 -2
  21. package/dist/src/exports/index.d.ts.map +1 -1
  22. package/dist/src/hooks/useFetchQuotes.d.ts.map +1 -1
  23. package/dist/src/icons/Chains/PLUME.d.ts.map +1 -1
  24. package/dist/src/icons/PoweredBy.d.ts.map +1 -1
  25. package/dist/src/icons/Routing.d.ts +5 -0
  26. package/dist/src/icons/Routing.d.ts.map +1 -0
  27. package/dist/src/icons/Tokens/PLUME.d.ts.map +1 -1
  28. package/dist/src/store/transferInput.d.ts +1 -1
  29. package/dist/src/store/transferInput.d.ts.map +1 -1
  30. package/dist/src/utils/coingecko.d.ts.map +1 -1
  31. package/dist/src/utils/formatNumber.d.ts +23 -0
  32. package/dist/src/utils/formatNumber.d.ts.map +1 -0
  33. package/dist/src/utils/index.d.ts +3 -1
  34. package/dist/src/utils/index.d.ts.map +1 -1
  35. package/dist/src/utils/routes.d.ts +12 -0
  36. package/dist/src/utils/routes.d.ts.map +1 -0
  37. package/dist/src/views/v2/Bridge/AmountInput/index.d.ts.map +1 -1
  38. package/dist/src/views/v2/Bridge/AssetPicker/TokenItem.d.ts.map +1 -1
  39. package/dist/src/views/v2/Bridge/Routes/SingleRoute.d.ts.map +1 -1
  40. package/dist/src/views/v2/Redeem/TransactionDetails/index.d.ts.map +1 -1
  41. package/dist/src/views/v3/Bridge/AmountInput/index.d.ts.map +1 -1
  42. package/dist/src/views/v3/Bridge/AssetPicker/TokenItem.d.ts.map +1 -1
  43. package/dist/src/views/v3/Bridge/AssetPicker/index.d.ts.map +1 -1
  44. package/dist/src/views/v3/Bridge/GasSlider/index.d.ts.map +1 -1
  45. package/dist/src/views/v3/Bridge/Routes/Eta.d.ts +6 -0
  46. package/dist/src/views/v3/Bridge/Routes/Eta.d.ts.map +1 -0
  47. package/dist/src/views/v3/Bridge/Routes/RouteBadge.d.ts.map +1 -1
  48. package/dist/src/views/v3/Bridge/Routes/RoutesBottomSheet.d.ts +7 -6
  49. package/dist/src/views/v3/Bridge/Routes/RoutesBottomSheet.d.ts.map +1 -1
  50. package/dist/src/views/v3/Bridge/Routes/RoutesLink.d.ts +7 -0
  51. package/dist/src/views/v3/Bridge/Routes/RoutesLink.d.ts.map +1 -0
  52. package/dist/src/views/v3/Bridge/Routes/RoutesList.d.ts +2 -1
  53. package/dist/src/views/v3/Bridge/Routes/RoutesList.d.ts.map +1 -1
  54. package/dist/src/views/v3/Bridge/Routes/RoutesLoader.d.ts +4 -0
  55. package/dist/src/views/v3/Bridge/Routes/RoutesLoader.d.ts.map +1 -0
  56. package/dist/src/views/v3/Bridge/Routes/RoutesModal.d.ts +6 -5
  57. package/dist/src/views/v3/Bridge/Routes/RoutesModal.d.ts.map +1 -1
  58. package/dist/src/views/v3/Bridge/Routes/SingleRoute.d.ts +1 -0
  59. package/dist/src/views/v3/Bridge/Routes/SingleRoute.d.ts.map +1 -1
  60. package/dist/src/views/v3/Bridge/Routes/index.d.ts.map +1 -1
  61. package/dist/src/views/v3/Redeem/TransactionDetails/index.d.ts.map +1 -1
  62. package/lib/account-Br8E7RB6.js +1 -0
  63. package/lib/{account-BTK2b2Fv.mjs → account-CVa_3S2g.mjs} +1 -1
  64. package/lib/{address-8wLqn60W.mjs → address-BApwdEpr.mjs} +96 -96
  65. package/lib/address-BwQqFkyh.js +1 -0
  66. package/lib/address-C2pxq9b2.js +1 -0
  67. package/lib/{address-n0gAFMrZ.mjs → address-f6joE_ig.mjs} +12 -12
  68. package/lib/aptos-CMRGggVs.js +2 -0
  69. package/lib/{aptos-CK-j196x.js → aptos-CTKQNmlP.js} +1 -1
  70. package/lib/{aptos-B-DJQlwt.mjs → aptos-CfFbx7uf.mjs} +9 -9
  71. package/lib/{aptos-Bwcz9wZX.mjs → aptos-fozuppXh.mjs} +3 -3
  72. package/lib/{basic-DHWVLmCq.mjs → basic-BA2aRJJn.mjs} +2 -2
  73. package/lib/{basic-B5ZFelC_.js → basic-DUWaF2I0.js} +1 -1
  74. package/lib/{basic-E2M-9h1u.js → basic-DeiUayOA.js} +1 -1
  75. package/lib/{basic-Pour9Ggp.mjs → basic-DoC8u7J8.mjs} +2 -2
  76. package/lib/{blake2b-C5HyObld.mjs → blake2b-BGxWUAjG.mjs} +23 -23
  77. package/lib/blake2b-Fj1aPKgL.js +1 -0
  78. package/lib/{browser-ponyfill-jK8MKVVg.mjs → browser-ponyfill-D5AN8ZPp.mjs} +1 -1
  79. package/lib/browser-ponyfill-Dn6gsMYK.js +2 -0
  80. package/lib/{chain-Bm6u6eUF.mjs → chain-DAw2I5H8.mjs} +1 -1
  81. package/lib/chain-DnPXlO8g.js +1 -0
  82. package/lib/chunk-KJH4KKG6-BjF7YUcU.js +470 -0
  83. package/lib/{chunk-KJH4KKG6-DJsu-Y-X.mjs → chunk-KJH4KKG6-DmVjhXO7.mjs} +144 -144
  84. package/lib/{constants-Cf2YMjNo.js → constants-BtNs_2F4.js} +1 -1
  85. package/lib/{constants-B7AbX6qr.mjs → constants-Dcc2nVaW.mjs} +3 -3
  86. package/lib/contract-BEHYQLvJ.js +1 -0
  87. package/lib/{contract-llnN6ki0.mjs → contract-BkMAZomO.mjs} +123 -123
  88. package/lib/{core-CF5c7Vev.mjs → core-BHV42Qa0.mjs} +25 -26
  89. package/lib/core-CV23yxnG.js +889 -0
  90. package/lib/create-CHcGblj6.js +1 -0
  91. package/lib/{create-Dm87_0zG.mjs → create-CKLtL7hr.mjs} +1 -1
  92. package/lib/{evm-BYIGg8e4.mjs → evm-Bf7qbM19.mjs} +42 -42
  93. package/lib/{evm-B2hUWkt7.js → evm-ClWkquRx.js} +2 -2
  94. package/lib/{evm-fvvpk-li.mjs → evm-DhMoy8cH.mjs} +6 -6
  95. package/lib/{evm-DFNbMHoa.js → evm-tXmzU9Xp.js} +2 -2
  96. package/lib/executor.js +1 -1
  97. package/lib/executor.mjs +145 -138
  98. package/lib/hosted.js +1 -1
  99. package/lib/hosted.mjs +1 -1
  100. package/lib/{index-Cwo5AKUC.mjs → index-1rCCpdwd.mjs} +5 -5
  101. package/lib/{index-DBCa3k0j.mjs → index-3HvzWPL7.mjs} +9 -9
  102. package/lib/{index-MOwE6ses.mjs → index-B7ztYPhr.mjs} +21 -22
  103. package/lib/index-BM-0SeYB.js +1 -0
  104. package/lib/{index-DiQ8Ytrt.mjs → index-BTnpftLz.mjs} +1 -1
  105. package/lib/{index-BiCMaXJS.js → index-BWQMi6Rj.js} +1 -1
  106. package/lib/index-BbgKw2pu.js +1 -0
  107. package/lib/index-BblcpkoK.js +1 -0
  108. package/lib/index-Bfblsmud.js +1 -0
  109. package/lib/{index-C_0yAOSX.mjs → index-BfkFXEnG.mjs} +25082 -24072
  110. package/lib/{index-fi1sh8vr.mjs → index-BijBPDRn.mjs} +2 -2
  111. package/lib/index-BoquY9R2.js +337 -0
  112. package/lib/index-C2NtsO9Q.js +1 -0
  113. package/lib/{index-CNuk-XLX.mjs → index-C4JmrizV.mjs} +4 -4
  114. package/lib/index-C8TtXpOf.js +1 -0
  115. package/lib/index-CB8kOyIP.js +1 -0
  116. package/lib/index-CInVjUCW.js +1 -0
  117. package/lib/{index-BF11RebI.mjs → index-CLTklDbp.mjs} +1 -1
  118. package/lib/index-CQvgeH_r.js +1 -0
  119. package/lib/{index-DzYjoSJp.mjs → index-CUnOYRFQ.mjs} +23 -24
  120. package/lib/{index-DGh9LzN1.mjs → index-CWe_BTdo.mjs} +31 -31
  121. package/lib/{index-2Bz1Np4K.mjs → index-CZ91lJ9M.mjs} +5 -5
  122. package/lib/{index-Dgy1FO7C.js → index-CgyVnj6U.js} +1 -1
  123. package/lib/{index-BzJcFdt_.mjs → index-Clr2JjoJ.mjs} +44 -44
  124. package/lib/index-CnnCCv6Q.js +1 -0
  125. package/lib/{index-CJnRWlFf.mjs → index-CwxGLNEk.mjs} +48 -49
  126. package/lib/index-D7BLfz05.js +1 -0
  127. package/lib/index-DM7C-wvQ.js +3 -0
  128. package/lib/{index-DhIh3xiW.mjs → index-DNy_sNGr.mjs} +8 -8
  129. package/lib/{index-BZaRg0yd.mjs → index-DVcaDWmz.mjs} +1 -1
  130. package/lib/{index-CsAigASU.mjs → index-DWOP9OBp.mjs} +17 -17
  131. package/lib/{index-CTLz8Fz0.mjs → index-Dda5qc2t.mjs} +13 -14
  132. package/lib/{index-CLBXF_zH.mjs → index-DeaiBvpG.mjs} +16 -16
  133. package/lib/index-HOuGP-7b.js +1 -0
  134. package/lib/{index-Dt2uNp-N.mjs → index-KZve3tYJ.mjs} +4 -4
  135. package/lib/{index-CJDBidKv.mjs → index-SIyXqCAN.mjs} +41 -41
  136. package/lib/index-WhVYPMUr.js +1 -0
  137. package/lib/index-hmjT4xa7.js +1 -0
  138. package/lib/index-ledagFNU.js +1 -0
  139. package/lib/index-pbRVlgcN.js +1 -0
  140. package/lib/{index-BpQXUhR4.mjs → index-qK7AyMAk.mjs} +23 -27
  141. package/lib/index-ttZu99PZ.js +1 -0
  142. package/lib/{index.es-BqRBGIq6.mjs → index.es-BXRQf6Oi.mjs} +25 -26
  143. package/lib/index.es-BjGaOok5.js +11 -0
  144. package/lib/index.es-D6S74vhi.js +27 -0
  145. package/lib/{index.es-DgCZuUzB.mjs → index.es-cOw8juwf.mjs} +741 -737
  146. package/lib/index.js +1 -1
  147. package/lib/index.mjs +17 -16
  148. package/lib/mayan.js +3 -3
  149. package/lib/mayan.mjs +918 -891
  150. package/lib/mint-CL36R6ED.js +1 -0
  151. package/lib/{mint-Dc-VsiAn.mjs → mint-DunEG1jV.mjs} +32 -33
  152. package/lib/ntt.js +1 -1
  153. package/lib/ntt.mjs +2332 -2373
  154. package/lib/platform-7vCWzCny.js +1 -0
  155. package/lib/platform-BKhoO9So.js +1 -0
  156. package/lib/{platform-B95L0Vxv.mjs → platform-BN6LFtXE.mjs} +16 -16
  157. package/lib/{platform-DnP_1wGA.mjs → platform-BYLu9SzP.mjs} +4 -4
  158. package/lib/platform-Bbe26nx7.js +1 -0
  159. package/lib/{platform-DiG7WY9Z.mjs → platform-DCgWqmh1.mjs} +4 -4
  160. package/lib/{provider-jsonrpc-CRABh2gN.mjs → provider-jsonrpc-Bmgnrmpy.mjs} +155 -155
  161. package/lib/provider-jsonrpc-CbtP2Ffg.js +1 -0
  162. package/lib/{secp256k1-zHHDNAlH.mjs → secp256k1-BDQEvyHq.mjs} +1 -1
  163. package/lib/{secp256k1-obBDPYM-.mjs → secp256k1-C77Oh9AA.mjs} +1 -1
  164. package/lib/{secp256k1-2hq3Jk4g.mjs → secp256k1-CCn2vlXj.mjs} +1 -1
  165. package/lib/{secp256k1-B94G4gyy.js → secp256k1-CHAR40au.js} +1 -1
  166. package/lib/{secp256k1-DCcAh19h.js → secp256k1-D-DmPYcJ.js} +1 -1
  167. package/lib/{secp256k1-CjndBUS7.js → secp256k1-DYWDlveU.js} +1 -1
  168. package/lib/{signer-N_ccpPOz.mjs → signer-BIcn81N5.mjs} +18 -18
  169. package/lib/signer-H7atraks.js +1 -0
  170. package/lib/{solana-_Ha4YgiP.mjs → solana-B0QSg7B3.mjs} +30 -30
  171. package/lib/solana-Cs5VyB20.js +900 -0
  172. package/lib/solana-uvHG8JV5.js +1 -0
  173. package/lib/solana-zyfOlbhb.mjs +18 -0
  174. package/lib/{solanaEmbed.esm-DK5RIquB.mjs → solanaEmbed.esm-BqdznDuW.mjs} +623 -622
  175. package/lib/solanaEmbed.esm-D8vtESE6.js +10 -0
  176. package/lib/src/AppRouter.d.ts.map +1 -1
  177. package/lib/src/config/mainnet/tokens.d.ts.map +1 -1
  178. package/lib/src/config/testnet/tokens.d.ts.map +1 -1
  179. package/lib/src/config/tokens.d.ts +1 -1
  180. package/lib/src/config/tokens.d.ts.map +1 -1
  181. package/lib/src/exports/index.d.ts +2 -2
  182. package/lib/src/exports/index.d.ts.map +1 -1
  183. package/lib/src/hooks/useFetchQuotes.d.ts.map +1 -1
  184. package/lib/src/icons/Chains/PLUME.d.ts.map +1 -1
  185. package/lib/src/icons/PoweredBy.d.ts.map +1 -1
  186. package/lib/src/icons/Routing.d.ts +5 -0
  187. package/lib/src/icons/Routing.d.ts.map +1 -0
  188. package/lib/src/icons/Tokens/PLUME.d.ts.map +1 -1
  189. package/lib/src/store/transferInput.d.ts +1 -1
  190. package/lib/src/store/transferInput.d.ts.map +1 -1
  191. package/lib/src/utils/coingecko.d.ts.map +1 -1
  192. package/lib/src/utils/formatNumber.d.ts +23 -0
  193. package/lib/src/utils/formatNumber.d.ts.map +1 -0
  194. package/lib/src/utils/index.d.ts +3 -1
  195. package/lib/src/utils/index.d.ts.map +1 -1
  196. package/lib/src/utils/routes.d.ts +12 -0
  197. package/lib/src/utils/routes.d.ts.map +1 -0
  198. package/lib/src/views/v2/Bridge/AmountInput/index.d.ts.map +1 -1
  199. package/lib/src/views/v2/Bridge/AssetPicker/TokenItem.d.ts.map +1 -1
  200. package/lib/src/views/v2/Bridge/Routes/SingleRoute.d.ts.map +1 -1
  201. package/lib/src/views/v2/Redeem/TransactionDetails/index.d.ts.map +1 -1
  202. package/lib/src/views/v3/Bridge/AmountInput/index.d.ts.map +1 -1
  203. package/lib/src/views/v3/Bridge/AssetPicker/TokenItem.d.ts.map +1 -1
  204. package/lib/src/views/v3/Bridge/AssetPicker/index.d.ts.map +1 -1
  205. package/lib/src/views/v3/Bridge/GasSlider/index.d.ts.map +1 -1
  206. package/lib/src/views/v3/Bridge/Routes/Eta.d.ts +6 -0
  207. package/lib/src/views/v3/Bridge/Routes/Eta.d.ts.map +1 -0
  208. package/lib/src/views/v3/Bridge/Routes/RouteBadge.d.ts.map +1 -1
  209. package/lib/src/views/v3/Bridge/Routes/RoutesBottomSheet.d.ts +7 -6
  210. package/lib/src/views/v3/Bridge/Routes/RoutesBottomSheet.d.ts.map +1 -1
  211. package/lib/src/views/v3/Bridge/Routes/RoutesLink.d.ts +7 -0
  212. package/lib/src/views/v3/Bridge/Routes/RoutesLink.d.ts.map +1 -0
  213. package/lib/src/views/v3/Bridge/Routes/RoutesList.d.ts +2 -1
  214. package/lib/src/views/v3/Bridge/Routes/RoutesList.d.ts.map +1 -1
  215. package/lib/src/views/v3/Bridge/Routes/RoutesLoader.d.ts +4 -0
  216. package/lib/src/views/v3/Bridge/Routes/RoutesLoader.d.ts.map +1 -0
  217. package/lib/src/views/v3/Bridge/Routes/RoutesModal.d.ts +6 -5
  218. package/lib/src/views/v3/Bridge/Routes/RoutesModal.d.ts.map +1 -1
  219. package/lib/src/views/v3/Bridge/Routes/SingleRoute.d.ts +1 -0
  220. package/lib/src/views/v3/Bridge/Routes/SingleRoute.d.ts.map +1 -1
  221. package/lib/src/views/v3/Bridge/Routes/index.d.ts.map +1 -1
  222. package/lib/src/views/v3/Redeem/TransactionDetails/index.d.ts.map +1 -1
  223. package/lib/{sui-CQcQ6w_P.mjs → sui-B38DyOqM.mjs} +44 -44
  224. package/lib/{sui-BplKFZQu.mjs → sui-BpfnZR4f.mjs} +3 -3
  225. package/lib/sui-CT9MWY38.js +1 -0
  226. package/lib/{sui-_hvmCvD8.js → sui-DXQAMRQJ.js} +1 -1
  227. package/lib/{tokens-DNv0ZNvU.js → tokens-CmINcwKk.js} +31 -31
  228. package/lib/{tokens-Dl4YwW18.mjs → tokens-YxAPPVy3.mjs} +1726 -1724
  229. package/lib/transfer-BQ72fByU.js +1 -0
  230. package/lib/transfer-bTW0j9yh.mjs +58 -0
  231. package/lib/units-Ckije3Qv.js +1 -0
  232. package/lib/{units-DPWUSE6J.mjs → units-CtyvuzxQ.mjs} +13 -13
  233. package/lib/unsignedTransaction-C6Qp42VS.js +1 -0
  234. package/lib/{unsignedTransaction-DwcUilyN.mjs → unsignedTransaction-CXB-QCUC.mjs} +18 -18
  235. package/lib/{w3m-modal-BJILsxDp.mjs → w3m-modal-B7LUHLWC.mjs} +2 -2
  236. package/lib/{w3m-modal-D4CpFxO2.mjs → w3m-modal-BOTzBqbc.mjs} +2 -2
  237. package/lib/{w3m-modal-CrfHWSrF.js → w3m-modal-BTb03-7B.js} +1 -1
  238. package/lib/{w3m-modal-CBG2MSPp.js → w3m-modal-xmdf4r6V.js} +1 -1
  239. package/lib/web3-COTIsLs8.js +22 -0
  240. package/lib/{address-B-XN4tFw.mjs → web3-DYVeiqSa.mjs} +6599 -6576
  241. package/package.json +32 -32
  242. package/dist/assets/index-BWPgrXHs.js +0 -1
  243. package/lib/account-cRt2xMoW.js +0 -1
  244. package/lib/address-BGujeWtN.js +0 -22
  245. package/lib/address-C7DIAk4M.js +0 -1
  246. package/lib/address-KNhRm6oe.js +0 -1
  247. package/lib/aptos-f5TqmvqV.js +0 -2
  248. package/lib/blake2b-B-MRXUPb.js +0 -1
  249. package/lib/browser-ponyfill-CE6vRkjp.js +0 -2
  250. package/lib/chain-Hsn22HAP.js +0 -1
  251. package/lib/chunk-KJH4KKG6-CoyI75Ig.js +0 -470
  252. package/lib/contract-D2fTrJgn.js +0 -1
  253. package/lib/core-v0G9f7LX.js +0 -889
  254. package/lib/create-DoZZ7ciL.js +0 -1
  255. package/lib/index-B8-KKWD-.js +0 -1
  256. package/lib/index-BHbvgOMD.js +0 -1
  257. package/lib/index-BHfUgvSV.js +0 -1
  258. package/lib/index-BTKC7Hou.js +0 -1
  259. package/lib/index-BWXglAWd.js +0 -1
  260. package/lib/index-Bpp8C4u8.js +0 -1
  261. package/lib/index-CF2fHBHJ.js +0 -3
  262. package/lib/index-CTPz98nv.js +0 -1
  263. package/lib/index-ClMoiji-.js +0 -1
  264. package/lib/index-ClsVcH6F.js +0 -1
  265. package/lib/index-CqOI6LVu.js +0 -1
  266. package/lib/index-DCz_4mcz.js +0 -1
  267. package/lib/index-DKksdvND.js +0 -335
  268. package/lib/index-DRv3ZpVL.js +0 -1
  269. package/lib/index-DYqo8IhM.js +0 -1
  270. package/lib/index-DZubce9o.js +0 -1
  271. package/lib/index-DprM_IpB.js +0 -1
  272. package/lib/index-DshEQYMA.js +0 -1
  273. package/lib/index-JrM783SN.js +0 -1
  274. package/lib/index.es-C6YhioMN.js +0 -27
  275. package/lib/index.es-D3Xxxr8I.js +0 -11
  276. package/lib/mint-DlXC3sGi.js +0 -1
  277. package/lib/platform-B1XoDKoN.js +0 -1
  278. package/lib/platform-COuZC5Zc.js +0 -1
  279. package/lib/platform-NG3efAb2.js +0 -1
  280. package/lib/provider-jsonrpc-pXNHQF7n.js +0 -1
  281. package/lib/signer-CCa6npZ3.js +0 -1
  282. package/lib/solana-BJ3aReZw.mjs +0 -18
  283. package/lib/solana-BwyVgP30.js +0 -1
  284. package/lib/solana-CanFuMgA.js +0 -900
  285. package/lib/solanaEmbed.esm-C--1F7Lx.js +0 -10
  286. package/lib/sui-Bs83Gy5Z.js +0 -1
  287. package/lib/units-BvcKDiAx.js +0 -1
  288. package/lib/unsignedTransaction-dN_5EJf5.js +0 -1
  289. package/lib/web3-Bu_6UejS.mjs +0 -67
  290. package/lib/web3-Doz_0RHD.js +0 -1
@@ -1,27 +0,0 @@
1
- "use strict";const et=require("./index-DKksdvND.js"),P=require("./address-BGujeWtN.js"),ar=require("./browser-ponyfill-CE6vRkjp.js");var Pe={};/*! *****************************************************************************
2
- Copyright (c) Microsoft Corporation.
3
-
4
- Permission to use, copy, modify, and/or distribute this software for any
5
- purpose with or without fee is hereby granted.
6
-
7
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
- PERFORMANCE OF THIS SOFTWARE.
14
- ***************************************************************************** */var Ot=function(e,t){return Ot=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)n.hasOwnProperty(o)&&(r[o]=n[o])},Ot(e,t)};function mo(e,t){Ot(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Ft=function(){return Ft=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Ft.apply(this,arguments)};function vo(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Eo(e,t,r,n){var o=arguments.length,i=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}function _o(e,t){return function(r,n){t(r,n,e)}}function So(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function Oo(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function l(u){try{s(n.next(u))}catch(f){a(f)}}function c(u){try{s(n.throw(u))}catch(f){a(f)}}function s(u){u.done?i(u.value):o(u.value).then(l,c)}s((n=n.apply(e,t||[])).next())})}function Fo(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(s){return function(u){return c([s,u])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=s[0]&2?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,o=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1],i=s;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(s);break}i[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(u){s=[6,u],o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function Co(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}function Ao(e,t){for(var r in e)r!=="default"&&!t.hasOwnProperty(r)&&(t[r]=e[r])}function Ct(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ln(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(l){a={error:l}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i}function xo(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(ln(arguments[t]));return e}function Bo(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),o=0,t=0;t<r;t++)for(var i=arguments[t],a=0,l=i.length;a<l;a++,o++)n[o]=i[a];return n}function Ie(e){return this instanceof Ie?(this.v=e,this):new Ie(e)}function Io(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),o,i=[];return o={},a("next"),a("throw"),a("return"),o[Symbol.asyncIterator]=function(){return this},o;function a(h){n[h]&&(o[h]=function(b){return new Promise(function(d,g){i.push([h,b,d,g])>1||l(h,b)})})}function l(h,b){try{c(n[h](b))}catch(d){f(i[0][3],d)}}function c(h){h.value instanceof Ie?Promise.resolve(h.value.v).then(s,u):f(i[0][2],h)}function s(h){l("next",h)}function u(h){l("throw",h)}function f(h,b){h(b),i.shift(),i.length&&l(i[0][0],i[0][1])}}function To(e){var t,r;return t={},n("next"),n("throw",function(o){throw o}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(o,i){t[o]=e[o]?function(a){return(r=!r)?{value:Ie(e[o](a)),done:o==="return"}:i?i(a):a}:i}}function Ro(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof Ct=="function"?Ct(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=e[i]&&function(a){return new Promise(function(l,c){a=e[i](a),o(l,c,a.done,a.value)})}}function o(i,a,l,c){Promise.resolve(c).then(function(s){i({value:s,done:l})},a)}}function No(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function Po(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function jo(e){return e&&e.__esModule?e:{default:e}}function Lo(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function Uo(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}const Mo=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return Ft},__asyncDelegator:To,__asyncGenerator:Io,__asyncValues:Ro,__await:Ie,__awaiter:Oo,__classPrivateFieldGet:Lo,__classPrivateFieldSet:Uo,__createBinding:Co,__decorate:Eo,__exportStar:Ao,__extends:mo,__generator:Fo,__importDefault:jo,__importStar:Po,__makeTemplateObject:No,__metadata:So,__param:_o,__read:ln,__rest:vo,__spread:xo,__spreadArrays:Bo,__values:Ct},Symbol.toStringTag,{value:"Module"})),tt=P.getAugmentedNamespace(Mo);var ct={},Ce={},ur;function $o(){if(ur)return Ce;ur=1,Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.delay=void 0;function e(t){return new Promise(r=>{setTimeout(()=>{r(!0)},t)})}return Ce.delay=e,Ce}var fe={},lt={},he={},cr;function zo(){return cr||(cr=1,Object.defineProperty(he,"__esModule",{value:!0}),he.ONE_THOUSAND=he.ONE_HUNDRED=void 0,he.ONE_HUNDRED=100,he.ONE_THOUSAND=1e3),he}var ft={},lr;function Wo(){return lr||(lr=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ONE_YEAR=e.FOUR_WEEKS=e.THREE_WEEKS=e.TWO_WEEKS=e.ONE_WEEK=e.THIRTY_DAYS=e.SEVEN_DAYS=e.FIVE_DAYS=e.THREE_DAYS=e.ONE_DAY=e.TWENTY_FOUR_HOURS=e.TWELVE_HOURS=e.SIX_HOURS=e.THREE_HOURS=e.ONE_HOUR=e.SIXTY_MINUTES=e.THIRTY_MINUTES=e.TEN_MINUTES=e.FIVE_MINUTES=e.ONE_MINUTE=e.SIXTY_SECONDS=e.THIRTY_SECONDS=e.TEN_SECONDS=e.FIVE_SECONDS=e.ONE_SECOND=void 0,e.ONE_SECOND=1,e.FIVE_SECONDS=5,e.TEN_SECONDS=10,e.THIRTY_SECONDS=30,e.SIXTY_SECONDS=60,e.ONE_MINUTE=e.SIXTY_SECONDS,e.FIVE_MINUTES=e.ONE_MINUTE*5,e.TEN_MINUTES=e.ONE_MINUTE*10,e.THIRTY_MINUTES=e.ONE_MINUTE*30,e.SIXTY_MINUTES=e.ONE_MINUTE*60,e.ONE_HOUR=e.SIXTY_MINUTES,e.THREE_HOURS=e.ONE_HOUR*3,e.SIX_HOURS=e.ONE_HOUR*6,e.TWELVE_HOURS=e.ONE_HOUR*12,e.TWENTY_FOUR_HOURS=e.ONE_HOUR*24,e.ONE_DAY=e.TWENTY_FOUR_HOURS,e.THREE_DAYS=e.ONE_DAY*3,e.FIVE_DAYS=e.ONE_DAY*5,e.SEVEN_DAYS=e.ONE_DAY*7,e.THIRTY_DAYS=e.ONE_DAY*30,e.ONE_WEEK=e.SEVEN_DAYS,e.TWO_WEEKS=e.ONE_WEEK*2,e.THREE_WEEKS=e.ONE_WEEK*3,e.FOUR_WEEKS=e.ONE_WEEK*4,e.ONE_YEAR=e.ONE_DAY*365}(ft)),ft}var fr;function fn(){return fr||(fr=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=tt;t.__exportStar(zo(),e),t.__exportStar(Wo(),e)}(lt)),lt}var hr;function ko(){if(hr)return fe;hr=1,Object.defineProperty(fe,"__esModule",{value:!0}),fe.fromMiliseconds=fe.toMiliseconds=void 0;const e=fn();function t(n){return n*e.ONE_THOUSAND}fe.toMiliseconds=t;function r(n){return Math.floor(n/e.ONE_THOUSAND)}return fe.fromMiliseconds=r,fe}var dr;function Ho(){return dr||(dr=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=tt;t.__exportStar($o(),e),t.__exportStar(ko(),e)}(ct)),ct}var De={},br;function Vo(){if(br)return De;br=1,Object.defineProperty(De,"__esModule",{value:!0}),De.Watch=void 0;class e{constructor(){this.timestamps=new Map}start(r){if(this.timestamps.has(r))throw new Error(`Watch already started for label: ${r}`);this.timestamps.set(r,{started:Date.now()})}stop(r){const n=this.get(r);if(typeof n.elapsed<"u")throw new Error(`Watch already stopped for label: ${r}`);const o=Date.now()-n.started;this.timestamps.set(r,{started:n.started,elapsed:o})}get(r){const n=this.timestamps.get(r);if(typeof n>"u")throw new Error(`No timestamp found for label: ${r}`);return n}elapsed(r){const n=this.get(r);return n.elapsed||Date.now()-n.started}}return De.Watch=e,De.default=e,De}var ht={},Ae={},pr;function Ko(){if(pr)return Ae;pr=1,Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.IWatch=void 0;class e{}return Ae.IWatch=e,Ae}var gr;function qo(){return gr||(gr=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),tt.__exportStar(Ko(),e)}(ht)),ht}(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=tt;t.__exportStar(Ho(),e),t.__exportStar(Vo(),e),t.__exportStar(qo(),e),t.__exportStar(fn(),e)})(Pe);class hn{}let Go=class extends hn{constructor(t){super()}};const wr=Pe.FIVE_SECONDS,dn={pulse:"heartbeat_pulse"};let Yo=class bn extends Go{constructor(t){super(t),this.events=new et.eventsExports.EventEmitter,this.interval=wr,this.interval=(t==null?void 0:t.interval)||wr}static async init(t){const r=new bn(t);return await r.init(),r}async init(){await this.initialize()}stop(){clearInterval(this.intervalRef)}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}off(t,r){this.events.off(t,r)}removeListener(t,r){this.events.removeListener(t,r)}async initialize(){this.intervalRef=setInterval(()=>this.pulse(),Pe.toMiliseconds(this.interval))}pulse(){this.events.emit(dn.pulse)}};const Jo=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,Xo=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,Zo=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function Qo(e,t){if(e==="__proto__"||e==="constructor"&&t&&typeof t=="object"&&"prototype"in t){ei(e);return}return t}function ei(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function ze(e,t={}){if(typeof e!="string")return e;if(e[0]==='"'&&e[e.length-1]==='"'&&e.indexOf("\\")===-1)return e.slice(1,-1);const r=e.trim();if(r.length<=9)switch(r.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return Number.NaN;case"infinity":return Number.POSITIVE_INFINITY;case"-infinity":return Number.NEGATIVE_INFINITY}if(!Zo.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(Jo.test(e)||Xo.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,Qo)}return JSON.parse(e)}catch(n){if(t.strict)throw n;return e}}function ti(e){return!e||typeof e.then!="function"?Promise.resolve(e):e}function z(e,...t){try{return ti(e(...t))}catch(r){return Promise.reject(r)}}function ri(e){const t=typeof e;return e===null||t!=="object"&&t!=="function"}function ni(e){const t=Object.getPrototypeOf(e);return!t||t.isPrototypeOf(Object)}function qe(e){if(ri(e))return String(e);if(ni(e)||Array.isArray(e))return JSON.stringify(e);if(typeof e.toJSON=="function")return qe(e.toJSON());throw new Error("[unstorage] Cannot stringify value!")}const At="base64:";function oi(e){return typeof e=="string"?e:At+ai(e)}function ii(e){return typeof e!="string"||!e.startsWith(At)?e:si(e.slice(At.length))}function si(e){return globalThis.Buffer?P.dist.Buffer.from(e,"base64"):Uint8Array.from(globalThis.atob(e),t=>t.codePointAt(0))}function ai(e){return globalThis.Buffer?P.dist.Buffer.from(e).toString("base64"):globalThis.btoa(String.fromCodePoint(...e))}function G(e){var t;return e&&((t=e.split("?")[0])==null?void 0:t.replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""))||""}function ui(...e){return G(e.join(":"))}function We(e){return e=G(e),e?e+":":""}function ci(e,t){if(t===void 0)return!0;let r=0,n=e.indexOf(":");for(;n>-1;)r++,n=e.indexOf(":",n+1);return r<=t}function li(e,t){return t?e.startsWith(t)&&e[e.length-1]!=="$":e[e.length-1]!=="$"}const fi="memory",hi=()=>{const e=new Map;return{name:fi,getInstance:()=>e,hasItem(t){return e.has(t)},getItem(t){return e.get(t)??null},getItemRaw(t){return e.get(t)??null},setItem(t,r){e.set(t,r)},setItemRaw(t,r){e.set(t,r)},removeItem(t){e.delete(t)},getKeys(){return[...e.keys()]},clear(){e.clear()},dispose(){e.clear()}}};function di(e={}){const t={mounts:{"":e.driver||hi()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},r=s=>{for(const u of t.mountpoints)if(s.startsWith(u))return{base:u,relativeKey:s.slice(u.length),driver:t.mounts[u]};return{base:"",relativeKey:s,driver:t.mounts[""]}},n=(s,u)=>t.mountpoints.filter(f=>f.startsWith(s)||u&&s.startsWith(f)).map(f=>({relativeBase:s.length>f.length?s.slice(f.length):void 0,mountpoint:f,driver:t.mounts[f]})),o=(s,u)=>{if(t.watching){u=G(u);for(const f of t.watchListeners)f(s,u)}},i=async()=>{if(!t.watching){t.watching=!0;for(const s in t.mounts)t.unwatch[s]=await Dr(t.mounts[s],o,s)}},a=async()=>{if(t.watching){for(const s in t.unwatch)await t.unwatch[s]();t.unwatch={},t.watching=!1}},l=(s,u,f)=>{const h=new Map,b=d=>{let g=h.get(d.base);return g||(g={driver:d.driver,base:d.base,items:[]},h.set(d.base,g)),g};for(const d of s){const g=typeof d=="string",D=G(g?d:d.key),y=g?void 0:d.value,S=g||!d.options?u:{...u,...d.options},p=r(D);b(p).items.push({key:D,value:y,relativeKey:p.relativeKey,options:S})}return Promise.all([...h.values()].map(d=>f(d))).then(d=>d.flat())},c={hasItem(s,u={}){s=G(s);const{relativeKey:f,driver:h}=r(s);return z(h.hasItem,f,u)},getItem(s,u={}){s=G(s);const{relativeKey:f,driver:h}=r(s);return z(h.getItem,f,u).then(b=>ze(b))},getItems(s,u={}){return l(s,u,f=>f.driver.getItems?z(f.driver.getItems,f.items.map(h=>({key:h.relativeKey,options:h.options})),u).then(h=>h.map(b=>({key:ui(f.base,b.key),value:ze(b.value)}))):Promise.all(f.items.map(h=>z(f.driver.getItem,h.relativeKey,h.options).then(b=>({key:h.key,value:ze(b)})))))},getItemRaw(s,u={}){s=G(s);const{relativeKey:f,driver:h}=r(s);return h.getItemRaw?z(h.getItemRaw,f,u):z(h.getItem,f,u).then(b=>ii(b))},async setItem(s,u,f={}){if(u===void 0)return c.removeItem(s);s=G(s);const{relativeKey:h,driver:b}=r(s);b.setItem&&(await z(b.setItem,h,qe(u),f),b.watch||o("update",s))},async setItems(s,u){await l(s,u,async f=>{if(f.driver.setItems)return z(f.driver.setItems,f.items.map(h=>({key:h.relativeKey,value:qe(h.value),options:h.options})),u);f.driver.setItem&&await Promise.all(f.items.map(h=>z(f.driver.setItem,h.relativeKey,qe(h.value),h.options)))})},async setItemRaw(s,u,f={}){if(u===void 0)return c.removeItem(s,f);s=G(s);const{relativeKey:h,driver:b}=r(s);if(b.setItemRaw)await z(b.setItemRaw,h,u,f);else if(b.setItem)await z(b.setItem,h,oi(u),f);else return;b.watch||o("update",s)},async removeItem(s,u={}){typeof u=="boolean"&&(u={removeMeta:u}),s=G(s);const{relativeKey:f,driver:h}=r(s);h.removeItem&&(await z(h.removeItem,f,u),(u.removeMeta||u.removeMata)&&await z(h.removeItem,f+"$",u),h.watch||o("remove",s))},async getMeta(s,u={}){typeof u=="boolean"&&(u={nativeOnly:u}),s=G(s);const{relativeKey:f,driver:h}=r(s),b=Object.create(null);if(h.getMeta&&Object.assign(b,await z(h.getMeta,f,u)),!u.nativeOnly){const d=await z(h.getItem,f+"$",u).then(g=>ze(g));d&&typeof d=="object"&&(typeof d.atime=="string"&&(d.atime=new Date(d.atime)),typeof d.mtime=="string"&&(d.mtime=new Date(d.mtime)),Object.assign(b,d))}return b},setMeta(s,u,f={}){return this.setItem(s+"$",u,f)},removeMeta(s,u={}){return this.removeItem(s+"$",u)},async getKeys(s,u={}){var D;s=We(s);const f=n(s,!0);let h=[];const b=[];let d=!0;for(const y of f){(D=y.driver.flags)!=null&&D.maxDepth||(d=!1);const S=await z(y.driver.getKeys,y.relativeBase,u);for(const p of S){const m=y.mountpoint+G(p);h.some(F=>m.startsWith(F))||b.push(m)}h=[y.mountpoint,...h.filter(p=>!p.startsWith(y.mountpoint))]}const g=u.maxDepth!==void 0&&!d;return b.filter(y=>(!g||ci(y,u.maxDepth))&&li(y,s))},async clear(s,u={}){s=We(s),await Promise.all(n(s,!1).map(async f=>{if(f.driver.clear)return z(f.driver.clear,f.relativeBase,u);if(f.driver.removeItem){const h=await f.driver.getKeys(f.relativeBase||"",u);return Promise.all(h.map(b=>f.driver.removeItem(b,u)))}}))},async dispose(){await Promise.all(Object.values(t.mounts).map(s=>yr(s)))},async watch(s){return await i(),t.watchListeners.push(s),async()=>{t.watchListeners=t.watchListeners.filter(u=>u!==s),t.watchListeners.length===0&&await a()}},async unwatch(){t.watchListeners=[],await a()},mount(s,u){if(s=We(s),s&&t.mounts[s])throw new Error(`already mounted at ${s}`);return s&&(t.mountpoints.push(s),t.mountpoints.sort((f,h)=>h.length-f.length)),t.mounts[s]=u,t.watching&&Promise.resolve(Dr(u,o,s)).then(f=>{t.unwatch[s]=f}).catch(console.error),c},async unmount(s,u=!0){var f,h;s=We(s),!(!s||!t.mounts[s])&&(t.watching&&s in t.unwatch&&((h=(f=t.unwatch)[s])==null||h.call(f),delete t.unwatch[s]),u&&await yr(t.mounts[s]),t.mountpoints=t.mountpoints.filter(b=>b!==s),delete t.mounts[s])},getMount(s=""){s=G(s)+":";const u=r(s);return{driver:u.driver,base:u.base}},getMounts(s="",u={}){return s=G(s),n(s,u.parents).map(h=>({driver:h.driver,base:h.mountpoint}))},keys:(s,u={})=>c.getKeys(s,u),get:(s,u={})=>c.getItem(s,u),set:(s,u,f={})=>c.setItem(s,u,f),has:(s,u={})=>c.hasItem(s,u),del:(s,u={})=>c.removeItem(s,u),remove:(s,u={})=>c.removeItem(s,u)};return c}function Dr(e,t,r){return e.watch?e.watch((n,o)=>t(n,r+o)):()=>{}}async function yr(e){typeof e.dispose=="function"&&await z(e.dispose)}function be(e){return new Promise((t,r)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>r(e.error)})}function pn(e,t){let r;const n=()=>{if(r)return r;const o=indexedDB.open(e);return o.onupgradeneeded=()=>o.result.createObjectStore(t),r=be(o),r.then(i=>{i.onclose=()=>r=void 0},()=>{}),r};return(o,i)=>n().then(a=>i(a.transaction(t,o).objectStore(t)))}let dt;function je(){return dt||(dt=pn("keyval-store","keyval")),dt}function mr(e,t=je()){return t("readonly",r=>be(r.get(e)))}function bi(e,t,r=je()){return r("readwrite",n=>(n.put(t,e),be(n.transaction)))}function pi(e,t=je()){return t("readwrite",r=>(r.delete(e),be(r.transaction)))}function gi(e=je()){return e("readwrite",t=>(t.clear(),be(t.transaction)))}function wi(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},be(e.transaction)}function Di(e=je()){return e("readonly",t=>{if(t.getAllKeys)return be(t.getAllKeys());const r=[];return wi(t,n=>r.push(n.key)).then(()=>r)})}const yi=e=>JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString()+"n":r),mi=e=>{const t=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,r=e.replace(t,'$1"$2n"$3');return JSON.parse(r,(n,o)=>typeof o=="string"&&o.match(/^\d+n$/)?BigInt(o.substring(0,o.length-1)):o)};function _e(e){if(typeof e!="string")throw new Error(`Cannot safe json parse value of type ${typeof e}`);try{return mi(e)}catch{return e}}function ie(e){return typeof e=="string"?e:yi(e)||""}const vi="idb-keyval";var Ei=(e={})=>{const t=e.base&&e.base.length>0?`${e.base}:`:"",r=o=>t+o;let n;return e.dbName&&e.storeName&&(n=pn(e.dbName,e.storeName)),{name:vi,options:e,async hasItem(o){return!(typeof await mr(r(o),n)>"u")},async getItem(o){return await mr(r(o),n)??null},setItem(o,i){return bi(r(o),i,n)},removeItem(o){return pi(r(o),n)},getKeys(){return Di(n)},clear(){return gi(n)}}};const _i="WALLET_CONNECT_V2_INDEXED_DB",Si="keyvaluestorage";let Oi=class{constructor(){this.indexedDb=di({driver:Ei({dbName:_i,storeName:Si})})}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 r=await this.indexedDb.getItem(t);if(r!==null)return r}async setItem(t,r){await this.indexedDb.setItem(t,ie(r))}async removeItem(t){await this.indexedDb.removeItem(t)}};var bt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof P.dist.global<"u"?P.dist.global:typeof self<"u"?self:{},Ge={exports:{}};(function(){let e;function t(){}e=t,e.prototype.getItem=function(r){return this.hasOwnProperty(r)?String(this[r]):null},e.prototype.setItem=function(r,n){this[r]=String(n)},e.prototype.removeItem=function(r){delete this[r]},e.prototype.clear=function(){const r=this;Object.keys(r).forEach(function(n){r[n]=void 0,delete r[n]})},e.prototype.key=function(r){return r=r||0,Object.keys(this)[r]},e.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof bt<"u"&&bt.localStorage?Ge.exports=bt.localStorage:typeof window<"u"&&window.localStorage?Ge.exports=window.localStorage:Ge.exports=new t})();function Fi(e){var t;return[e[0],_e((t=e[1])!=null?t:"")]}let Ci=class{constructor(){this.localStorage=Ge.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(Fi)}async getItem(t){const r=this.localStorage.getItem(t);if(r!==null)return _e(r)}async setItem(t,r){this.localStorage.setItem(t,ie(r))}async removeItem(t){this.localStorage.removeItem(t)}};const Ai="wc_storage_version",vr=1,xi=async(e,t,r)=>{const n=Ai,o=await t.getItem(n);if(o&&o>=vr){r(t);return}const i=await e.getKeys();if(!i.length){r(t);return}const a=[];for(;i.length;){const l=i.shift();if(!l)continue;const c=l.toLowerCase();if(c.includes("wc@")||c.includes("walletconnect")||c.includes("wc_")||c.includes("wallet_connect")){const s=await e.getItem(l);await t.setItem(l,s),a.push(l)}}await t.setItem(n,vr),r(t),Bi(e,a)},Bi=async(e,t)=>{t.length&&t.forEach(async r=>{await e.removeItem(r)})};let Ii=class{constructor(){this.initialized=!1,this.setInitialized=r=>{this.storage=r,this.initialized=!0};const t=new Ci;this.storage=t;try{const r=new Oi;xi(t,r,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,r){return await this.initialize(),this.storage.setItem(t,r)}async removeItem(t){return await this.initialize(),this.storage.removeItem(t)}async initialize(){this.initialized||await new Promise(t=>{const r=setInterval(()=>{this.initialized&&(clearInterval(r),t())},20)})}};function Ti(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}var Ri=Ni;function Ni(e,t,r){var n=r&&r.stringify||Ti,o=1;if(typeof e=="object"&&e!==null){var i=t.length+o;if(i===1)return e;var a=new Array(i);a[0]=n(e);for(var l=1;l<i;l++)a[l]=n(t[l]);return a.join(" ")}if(typeof e!="string")return e;var c=t.length;if(c===0)return e;for(var s="",u=1-o,f=-1,h=e&&e.length||0,b=0;b<h;){if(e.charCodeAt(b)===37&&b+1<h){switch(f=f>-1?f:0,e.charCodeAt(b+1)){case 100:case 102:if(u>=c||t[u]==null)break;f<b&&(s+=e.slice(f,b)),s+=Number(t[u]),f=b+2,b++;break;case 105:if(u>=c||t[u]==null)break;f<b&&(s+=e.slice(f,b)),s+=Math.floor(Number(t[u])),f=b+2,b++;break;case 79:case 111:case 106:if(u>=c||t[u]===void 0)break;f<b&&(s+=e.slice(f,b));var d=typeof t[u];if(d==="string"){s+="'"+t[u]+"'",f=b+2,b++;break}if(d==="function"){s+=t[u].name||"<anonymous>",f=b+2,b++;break}s+=n(t[u]),f=b+2,b++;break;case 115:if(u>=c)break;f<b&&(s+=e.slice(f,b)),s+=String(t[u]),f=b+2,b++;break;case 37:f<b&&(s+=e.slice(f,b)),s+="%",f=b+2,b++,u--;break}++u}++b}return f===-1?e:(f<h&&(s+=e.slice(f)),s)}const Er=Ri;var Ee=Z;const Te=Hi().console||{},Pi={mapHttpRequest:ke,mapHttpResponse:ke,wrapRequestSerializer:pt,wrapResponseSerializer:pt,wrapErrorSerializer:pt,req:ke,res:ke,err:$i};function ji(e,t){return Array.isArray(e)?e.filter(function(n){return n!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function Z(e){e=e||{},e.browser=e.browser||{};const t=e.browser.transmit;if(t&&typeof t.send!="function")throw Error("pino: transmit option must have a send function");const r=e.browser.write||Te;e.browser.write&&(e.browser.asObject=!0);const n=e.serializers||{},o=ji(e.browser.serialize,n);let i=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(i=!1);const a=["error","fatal","warn","info","debug","trace"];typeof r=="function"&&(r.error=r.fatal=r.warn=r.info=r.debug=r.trace=r),e.enabled===!1&&(e.level="silent");const l=e.level||"info",c=Object.create(r);c.log||(c.log=Re),Object.defineProperty(c,"levelVal",{get:u}),Object.defineProperty(c,"level",{get:f,set:h});const s={transmit:t,serialize:o,asObject:e.browser.asObject,levels:a,timestamp:zi(e)};c.levels=Z.levels,c.level=l,c.setMaxListeners=c.getMaxListeners=c.emit=c.addListener=c.on=c.prependListener=c.once=c.prependOnceListener=c.removeListener=c.removeAllListeners=c.listeners=c.listenerCount=c.eventNames=c.write=c.flush=Re,c.serializers=n,c._serialize=o,c._stdErrSerialize=i,c.child=b,t&&(c._logEvent=xt());function u(){return this.level==="silent"?1/0:this.levels.values[this.level]}function f(){return this._level}function h(d){if(d!=="silent"&&!this.levels.values[d])throw Error("unknown level "+d);this._level=d,ye(s,c,"error","log"),ye(s,c,"fatal","error"),ye(s,c,"warn","error"),ye(s,c,"info","log"),ye(s,c,"debug","log"),ye(s,c,"trace","log")}function b(d,g){if(!d)throw new Error("missing bindings for child Pino");g=g||{},o&&d.serializers&&(g.serializers=d.serializers);const D=g.serializers;if(o&&D){var y=Object.assign({},n,D),S=e.browser.serialize===!0?Object.keys(y):o;delete d.serializers,rt([d],S,y,this._stdErrSerialize)}function p(m){this._childLevel=(m._childLevel|0)+1,this.error=me(m,d,"error"),this.fatal=me(m,d,"fatal"),this.warn=me(m,d,"warn"),this.info=me(m,d,"info"),this.debug=me(m,d,"debug"),this.trace=me(m,d,"trace"),y&&(this.serializers=y,this._serialize=S),t&&(this._logEvent=xt([].concat(m._logEvent.bindings,d)))}return p.prototype=this,new p(this)}return c}Z.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}};Z.stdSerializers=Pi;Z.stdTimeFunctions=Object.assign({},{nullTime:gn,epochTime:wn,unixTime:Wi,isoTime:ki});function ye(e,t,r,n){const o=Object.getPrototypeOf(t);t[r]=t.levelVal>t.levels.values[r]?Re:o[r]?o[r]:Te[r]||Te[n]||Re,Li(e,t,r)}function Li(e,t,r){!e.transmit&&t[r]===Re||(t[r]=function(n){return function(){const i=e.timestamp(),a=new Array(arguments.length),l=Object.getPrototypeOf&&Object.getPrototypeOf(this)===Te?Te:this;for(var c=0;c<a.length;c++)a[c]=arguments[c];if(e.serialize&&!e.asObject&&rt(a,this._serialize,this.serializers,this._stdErrSerialize),e.asObject?n.call(l,Ui(this,r,a,i)):n.apply(l,a),e.transmit){const s=e.transmit.level||t.level,u=Z.levels.values[s],f=Z.levels.values[r];if(f<u)return;Mi(this,{ts:i,methodLevel:r,methodValue:f,transmitValue:Z.levels.values[e.transmit.level||t.level],send:e.transmit.send,val:t.levelVal},a)}}}(t[r]))}function Ui(e,t,r,n){e._serialize&&rt(r,e._serialize,e.serializers,e._stdErrSerialize);const o=r.slice();let i=o[0];const a={};n&&(a.time=n),a.level=Z.levels.values[t];let l=(e._childLevel|0)+1;if(l<1&&(l=1),i!==null&&typeof i=="object"){for(;l--&&typeof o[0]=="object";)Object.assign(a,o.shift());i=o.length?Er(o.shift(),o):void 0}else typeof i=="string"&&(i=Er(o.shift(),o));return i!==void 0&&(a.msg=i),a}function rt(e,t,r,n){for(const o in e)if(n&&e[o]instanceof Error)e[o]=Z.stdSerializers.err(e[o]);else if(typeof e[o]=="object"&&!Array.isArray(e[o]))for(const i in e[o])t&&t.indexOf(i)>-1&&i in r&&(e[o][i]=r[i](e[o][i]))}function me(e,t,r){return function(){const n=new Array(1+arguments.length);n[0]=t;for(var o=1;o<n.length;o++)n[o]=arguments[o-1];return e[r].apply(this,n)}}function Mi(e,t,r){const n=t.send,o=t.ts,i=t.methodLevel,a=t.methodValue,l=t.val,c=e._logEvent.bindings;rt(r,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=o,e._logEvent.messages=r.filter(function(s){return c.indexOf(s)===-1}),e._logEvent.level.label=i,e._logEvent.level.value=a,n(i,e._logEvent,l),e._logEvent=xt(c)}function xt(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function $i(e){const t={type:e.constructor.name,msg:e.message,stack:e.stack};for(const r in e)t[r]===void 0&&(t[r]=e[r]);return t}function zi(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?gn:wn}function ke(){return{}}function pt(e){return e}function Re(){}function gn(){return!1}function wn(){return Date.now()}function Wi(){return Math.round(Date.now()/1e3)}function ki(){return new Date(Date.now()).toISOString()}function Hi(){function e(t){return typeof t<"u"&&t}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return e(self)||e(window)||e(this)||{}}}const Ut=P.getDefaultExportFromCjs(Ee),Vi={level:"info"},Le="custom_context",Mt=1e3*1024;let Ki=class{constructor(t){this.nodeValue=t,this.sizeInBytes=new TextEncoder().encode(this.nodeValue).length,this.next=null}get value(){return this.nodeValue}get size(){return this.sizeInBytes}},_r=class{constructor(t){this.head=null,this.tail=null,this.lengthInNodes=0,this.maxSizeInBytes=t,this.sizeInBytes=0}append(t){const r=new Ki(t);if(r.size>this.maxSizeInBytes)throw new Error(`[LinkedList] Value too big to insert into list: ${t} with size ${r.size}`);for(;this.size+r.size>this.maxSizeInBytes;)this.shift();this.head?(this.tail&&(this.tail.next=r),this.tail=r):(this.head=r,this.tail=r),this.lengthInNodes++,this.sizeInBytes+=r.size}shift(){if(!this.head)return;const t=this.head;this.head=this.head.next,this.head||(this.tail=null),this.lengthInNodes--,this.sizeInBytes-=t.size}toArray(){const t=[];let r=this.head;for(;r!==null;)t.push(r.value),r=r.next;return t}get length(){return this.lengthInNodes}get size(){return this.sizeInBytes}toOrderedArray(){return Array.from(this)}[Symbol.iterator](){let t=this.head;return{next:()=>{if(!t)return{done:!0,value:null};const r=t.value;return t=t.next,{done:!1,value:r}}}}},Dn=class{constructor(t,r=Mt){this.level=t??"error",this.levelValue=Ee.levels.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=r,this.logs=new _r(this.MAX_LOG_SIZE_IN_BYTES)}forwardToConsole(t,r){r===Ee.levels.values.error?console.error(t):r===Ee.levels.values.warn?console.warn(t):r===Ee.levels.values.debug?console.debug(t):r===Ee.levels.values.trace?console.trace(t):console.log(t)}appendToLogs(t){this.logs.append(ie({timestamp:new Date().toISOString(),log:t}));const r=typeof t=="string"?JSON.parse(t).level:t.level;r>=this.levelValue&&this.forwardToConsole(t,r)}getLogs(){return this.logs}clearLogs(){this.logs=new _r(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(t){const r=this.getLogArray();return r.push(ie({extraMetadata:t})),new Blob(r,{type:"application/json"})}};class qi{constructor(t,r=Mt){this.baseChunkLogger=new Dn(t,r)}write(t){this.baseChunkLogger.appendToLogs(t)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(t){return this.baseChunkLogger.logsToBlob(t)}downloadLogsBlobInBrowser(t){const r=URL.createObjectURL(this.logsToBlob(t)),n=document.createElement("a");n.href=r,n.download=`walletconnect-logs-${new Date().toISOString()}.txt`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(r)}}class Gi{constructor(t,r=Mt){this.baseChunkLogger=new Dn(t,r)}write(t){this.baseChunkLogger.appendToLogs(t)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(t){return this.baseChunkLogger.logsToBlob(t)}}var Yi=Object.defineProperty,Ji=Object.defineProperties,Xi=Object.getOwnPropertyDescriptors,Sr=Object.getOwnPropertySymbols,Zi=Object.prototype.hasOwnProperty,Qi=Object.prototype.propertyIsEnumerable,Or=(e,t,r)=>t in e?Yi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Je=(e,t)=>{for(var r in t||(t={}))Zi.call(t,r)&&Or(e,r,t[r]);if(Sr)for(var r of Sr(t))Qi.call(t,r)&&Or(e,r,t[r]);return e},Xe=(e,t)=>Ji(e,Xi(t));function es(e){return Xe(Je({},e),{level:(e==null?void 0:e.level)||Vi.level})}function ts(e,t=Le){return e[t]||""}function rs(e,t,r=Le){return e[r]=t,e}function yn(e,t=Le){let r="";return typeof e.bindings>"u"?r=ts(e,t):r=e.bindings().context||"",r}function ns(e,t,r=Le){const n=yn(e,r);return n.trim()?`${n}/${t}`:t}function os(e,t,r=Le){const n=ns(e,t,r),o=e.child({context:n});return rs(o,n,r)}function is(e){var t,r;const n=new qi((t=e.opts)==null?void 0:t.level,e.maxSizeInBytes);return{logger:Ut(Xe(Je({},e.opts),{level:"trace",browser:Xe(Je({},(r=e.opts)==null?void 0:r.browser),{write:o=>n.write(o)})})),chunkLoggerController:n}}function ss(e){var t;const r=new Gi((t=e.opts)==null?void 0:t.level,e.maxSizeInBytes);return{logger:Ut(Xe(Je({},e.opts),{level:"trace"}),r),chunkLoggerController:r}}function as(e){return typeof e.loggerOverride<"u"&&typeof e.loggerOverride!="string"?{logger:e.loggerOverride,chunkLoggerController:null}:typeof window<"u"?is(e):ss(e)}function us(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function mn(e,...t){if(!us(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function Fr(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function cs(e,t){mn(e);const r=t.outputLen;if(e.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}const ve=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const gt=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);function ls(e){if(typeof e!="string")throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array(new TextEncoder().encode(e))}function vn(e){return typeof e=="string"&&(e=ls(e)),mn(e),e}class fs{clone(){return this._cloneInto()}}function hs(e){const t=n=>e().update(vn(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function En(e=32){if(ve&&typeof ve.getRandomValues=="function")return ve.getRandomValues(new Uint8Array(e));if(ve&&typeof ve.randomBytes=="function")return ve.randomBytes(e);throw new Error("crypto.getRandomValues must be defined")}function ds(e,t,r,n){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,r,n);const o=BigInt(32),i=BigInt(4294967295),a=Number(r>>o&i),l=Number(r&i),c=n?4:0,s=n?0:4;e.setUint32(t+c,a,n),e.setUint32(t+s,l,n)}class bs extends fs{constructor(t,r,n,o){super(),this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=gt(this.buffer)}update(t){Fr(this);const{view:r,buffer:n,blockLen:o}=this;t=vn(t);const i=t.length;for(let a=0;a<i;){const l=Math.min(o-this.pos,i-a);if(l===o){const c=gt(t);for(;o<=i-a;a+=o)this.process(c,a);continue}n.set(t.subarray(a,a+l),this.pos),this.pos+=l,a+=l,this.pos===o&&(this.process(r,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Fr(this),cs(t,this),this.finished=!0;const{buffer:r,view:n,blockLen:o,isLE:i}=this;let{pos:a}=this;r[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>o-a&&(this.process(n,0),a=0);for(let f=a;f<o;f++)r[f]=0;ds(n,o-8,BigInt(this.length*8),i),this.process(n,0);const l=gt(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const s=c/4,u=this.get();if(s>u.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f<s;f++)l.setUint32(4*f,u[f],i)}digest(){const{buffer:t,outputLen:r}=this;this.digestInto(t);const n=t.slice(0,r);return this.destroy(),n}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:r,buffer:n,length:o,finished:i,destroyed:a,pos:l}=this;return t.length=o,t.pos=l,t.finished=i,t.destroyed=a,o%r&&t.buffer.set(n),t}}const He=BigInt(2**32-1),Bt=BigInt(32);function _n(e,t=!1){return t?{h:Number(e&He),l:Number(e>>Bt&He)}:{h:Number(e>>Bt&He)|0,l:Number(e&He)|0}}function ps(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;o<e.length;o++){const{h:i,l:a}=_n(e[o],t);[r[o],n[o]]=[i,a]}return[r,n]}const gs=(e,t)=>BigInt(e>>>0)<<Bt|BigInt(t>>>0),ws=(e,t,r)=>e>>>r,Ds=(e,t,r)=>e<<32-r|t>>>r,ys=(e,t,r)=>e>>>r|t<<32-r,ms=(e,t,r)=>e<<32-r|t>>>r,vs=(e,t,r)=>e<<64-r|t>>>r-32,Es=(e,t,r)=>e>>>r-32|t<<64-r,_s=(e,t)=>t,Ss=(e,t)=>e,Os=(e,t,r)=>e<<r|t>>>32-r,Fs=(e,t,r)=>t<<r|e>>>32-r,Cs=(e,t,r)=>t<<r-32|e>>>64-r,As=(e,t,r)=>e<<r-32|t>>>64-r;function xs(e,t,r,n){const o=(t>>>0)+(n>>>0);return{h:e+r+(o/2**32|0)|0,l:o|0}}const Bs=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),Is=(e,t,r,n)=>t+r+n+(e/2**32|0)|0,Ts=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),Rs=(e,t,r,n,o)=>t+r+n+o+(e/2**32|0)|0,Ns=(e,t,r,n,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(o>>>0),Ps=(e,t,r,n,o,i)=>t+r+n+o+i+(e/2**32|0)|0,O={fromBig:_n,split:ps,toBig:gs,shrSH:ws,shrSL:Ds,rotrSH:ys,rotrSL:ms,rotrBH:vs,rotrBL:Es,rotr32H:_s,rotr32L:Ss,rotlSH:Os,rotlSL:Fs,rotlBH:Cs,rotlBL:As,add:xs,add3L:Bs,add3H:Is,add4L:Ts,add4H:Rs,add5H:Ps,add5L:Ns},[js,Ls]=O.split(["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(e=>BigInt(e))),ae=new Uint32Array(80),ue=new Uint32Array(80);class Us extends bs{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:t,Al:r,Bh:n,Bl:o,Ch:i,Cl:a,Dh:l,Dl:c,Eh:s,El:u,Fh:f,Fl:h,Gh:b,Gl:d,Hh:g,Hl:D}=this;return[t,r,n,o,i,a,l,c,s,u,f,h,b,d,g,D]}set(t,r,n,o,i,a,l,c,s,u,f,h,b,d,g,D){this.Ah=t|0,this.Al=r|0,this.Bh=n|0,this.Bl=o|0,this.Ch=i|0,this.Cl=a|0,this.Dh=l|0,this.Dl=c|0,this.Eh=s|0,this.El=u|0,this.Fh=f|0,this.Fl=h|0,this.Gh=b|0,this.Gl=d|0,this.Hh=g|0,this.Hl=D|0}process(t,r){for(let p=0;p<16;p++,r+=4)ae[p]=t.getUint32(r),ue[p]=t.getUint32(r+=4);for(let p=16;p<80;p++){const m=ae[p-15]|0,F=ue[p-15]|0,T=O.rotrSH(m,F,1)^O.rotrSH(m,F,8)^O.shrSH(m,F,7),B=O.rotrSL(m,F,1)^O.rotrSL(m,F,8)^O.shrSL(m,F,7),C=ae[p-2]|0,j=ue[p-2]|0,ge=O.rotrSH(C,j,19)^O.rotrBH(C,j,61)^O.shrSH(C,j,6),ce=O.rotrSL(C,j,19)^O.rotrBL(C,j,61)^O.shrSL(C,j,6),we=O.add4L(B,ce,ue[p-7],ue[p-16]),Fe=O.add4H(we,T,ge,ae[p-7],ae[p-16]);ae[p]=Fe|0,ue[p]=we|0}let{Ah:n,Al:o,Bh:i,Bl:a,Ch:l,Cl:c,Dh:s,Dl:u,Eh:f,El:h,Fh:b,Fl:d,Gh:g,Gl:D,Hh:y,Hl:S}=this;for(let p=0;p<80;p++){const m=O.rotrSH(f,h,14)^O.rotrSH(f,h,18)^O.rotrBH(f,h,41),F=O.rotrSL(f,h,14)^O.rotrSL(f,h,18)^O.rotrBL(f,h,41),T=f&b^~f&g,B=h&d^~h&D,C=O.add5L(S,F,B,Ls[p],ue[p]),j=O.add5H(C,y,m,T,js[p],ae[p]),ge=C|0,ce=O.rotrSH(n,o,28)^O.rotrBH(n,o,34)^O.rotrBH(n,o,39),we=O.rotrSL(n,o,28)^O.rotrBL(n,o,34)^O.rotrBL(n,o,39),Fe=n&i^n&l^i&l,at=o&a^o&c^a&c;y=g|0,S=D|0,g=b|0,D=d|0,b=f|0,d=h|0,{h:f,l:h}=O.add(s|0,u|0,j|0,ge|0),s=l|0,u=c|0,l=i|0,c=a|0,i=n|0,a=o|0;const E=O.add3L(ge,we,at);n=O.add3H(E,j,ce,Fe),o=E|0}({h:n,l:o}=O.add(this.Ah|0,this.Al|0,n|0,o|0)),{h:i,l:a}=O.add(this.Bh|0,this.Bl|0,i|0,a|0),{h:l,l:c}=O.add(this.Ch|0,this.Cl|0,l|0,c|0),{h:s,l:u}=O.add(this.Dh|0,this.Dl|0,s|0,u|0),{h:f,l:h}=O.add(this.Eh|0,this.El|0,f|0,h|0),{h:b,l:d}=O.add(this.Fh|0,this.Fl|0,b|0,d|0),{h:g,l:D}=O.add(this.Gh|0,this.Gl|0,g|0,D|0),{h:y,l:S}=O.add(this.Hh|0,this.Hl|0,y|0,S|0),this.set(n,o,i,a,l,c,s,u,f,h,b,d,g,D,y,S)}roundClean(){ae.fill(0),ue.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const Ms=hs(()=>new Us);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const $t=BigInt(0),Sn=BigInt(1),$s=BigInt(2);function zt(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Wt(e){if(!zt(e))throw new Error("Uint8Array expected")}function wt(e,t){if(typeof t!="boolean")throw new Error(e+" boolean expected, got "+t)}const zs=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function kt(e){Wt(e);let t="";for(let r=0;r<e.length;r++)t+=zs[e[r]];return t}function On(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?$t:BigInt("0x"+e)}const te={_0:48,_9:57,A:65,F:70,a:97,f:102};function Cr(e){if(e>=te._0&&e<=te._9)return e-te._0;if(e>=te.A&&e<=te.F)return e-(te.A-10);if(e>=te.a&&e<=te.f)return e-(te.a-10)}function Fn(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);const t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(r);for(let o=0,i=0;o<r;o++,i+=2){const a=Cr(e.charCodeAt(i)),l=Cr(e.charCodeAt(i+1));if(a===void 0||l===void 0){const c=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+i)}n[o]=a*16+l}return n}function Ws(e){return On(kt(e))}function Ye(e){return Wt(e),On(kt(Uint8Array.from(e).reverse()))}function Cn(e,t){return Fn(e.toString(16).padStart(t*2,"0"))}function It(e,t){return Cn(e,t).reverse()}function re(e,t,r){let n;if(typeof t=="string")try{n=Fn(t)}catch(i){throw new Error(e+" must be hex string or Uint8Array, cause: "+i)}else if(zt(t))n=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const o=n.length;if(typeof r=="number"&&o!==r)throw new Error(e+" of length "+r+" expected, got "+o);return n}function Ar(...e){let t=0;for(let n=0;n<e.length;n++){const o=e[n];Wt(o),t+=o.length}const r=new Uint8Array(t);for(let n=0,o=0;n<e.length;n++){const i=e[n];r.set(i,o),o+=i.length}return r}const Dt=e=>typeof e=="bigint"&&$t<=e;function ks(e,t,r){return Dt(e)&&Dt(t)&&Dt(r)&&t<=e&&e<r}function xe(e,t,r,n){if(!ks(t,r,n))throw new Error("expected valid "+e+": "+r+" <= n < "+n+", got "+t)}function Hs(e){let t;for(t=0;e>$t;e>>=Sn,t+=1);return t}const Vs=e=>($s<<BigInt(e-1))-Sn,Ks={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||zt(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function Ht(e,t,r={}){const n=(o,i,a)=>{const l=Ks[i];if(typeof l!="function")throw new Error("invalid validator function");const c=e[o];if(!(a&&c===void 0)&&!l(c,e))throw new Error("param "+String(o)+" is invalid. Expected "+i+", got "+c)};for(const[o,i]of Object.entries(t))n(o,i,!1);for(const[o,i]of Object.entries(r))n(o,i,!0);return e}function xr(e){const t=new WeakMap;return(r,...n)=>{const o=t.get(r);if(o!==void 0)return o;const i=e(r,...n);return t.set(r,i),i}}const W=BigInt(0),M=BigInt(1),de=BigInt(2),qs=BigInt(3),Tt=BigInt(4),Br=BigInt(5),Ir=BigInt(8);function $(e,t){const r=e%t;return r>=W?r:t+r}function Gs(e,t,r){if(t<W)throw new Error("invalid exponent, negatives unsupported");if(r<=W)throw new Error("invalid modulus");if(r===M)return W;let n=M;for(;t>W;)t&M&&(n=n*e%r),e=e*e%r,t>>=M;return n}function X(e,t,r){let n=e;for(;t-- >W;)n*=n,n%=r;return n}function Tr(e,t){if(e===W)throw new Error("invert: expected non-zero number");if(t<=W)throw new Error("invert: expected positive modulus, got "+t);let r=$(e,t),n=t,o=W,i=M;for(;r!==W;){const a=n/r,l=n%r,c=o-i*a;n=r,r=l,o=i,i=c}if(n!==M)throw new Error("invert: does not exist");return $(o,t)}function Ys(e){const t=(e-M)/de;let r,n,o;for(r=e-M,n=0;r%de===W;r/=de,n++);for(o=de;o<e&&Gs(o,t,e)!==e-M;o++)if(o>1e3)throw new Error("Cannot find square root: likely non-prime P");if(n===1){const a=(e+M)/Tt;return function(l,c){const s=l.pow(c,a);if(!l.eql(l.sqr(s),c))throw new Error("Cannot find square root");return s}}const i=(r+M)/de;return function(a,l){if(a.pow(l,t)===a.neg(a.ONE))throw new Error("Cannot find square root");let c=n,s=a.pow(a.mul(a.ONE,o),r),u=a.pow(l,i),f=a.pow(l,r);for(;!a.eql(f,a.ONE);){if(a.eql(f,a.ZERO))return a.ZERO;let h=1;for(let d=a.sqr(f);h<c&&!a.eql(d,a.ONE);h++)d=a.sqr(d);const b=a.pow(s,M<<BigInt(c-h-1));s=a.sqr(b),u=a.mul(u,b),f=a.mul(f,s),c=h}return u}}function Js(e){if(e%Tt===qs){const t=(e+M)/Tt;return function(r,n){const o=r.pow(n,t);if(!r.eql(r.sqr(o),n))throw new Error("Cannot find square root");return o}}if(e%Ir===Br){const t=(e-Br)/Ir;return function(r,n){const o=r.mul(n,de),i=r.pow(o,t),a=r.mul(n,i),l=r.mul(r.mul(a,de),i),c=r.mul(a,r.sub(l,r.ONE));if(!r.eql(r.sqr(c),n))throw new Error("Cannot find square root");return c}}return Ys(e)}const Xs=(e,t)=>($(e,t)&M)===M,Zs=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Qs(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=Zs.reduce((n,o)=>(n[o]="function",n),t);return Ht(e,r)}function ea(e,t,r){if(r<W)throw new Error("invalid exponent, negatives unsupported");if(r===W)return e.ONE;if(r===M)return t;let n=e.ONE,o=t;for(;r>W;)r&M&&(n=e.mul(n,o)),o=e.sqr(o),r>>=M;return n}function ta(e,t){const r=new Array(t.length),n=t.reduce((i,a,l)=>e.is0(a)?i:(r[l]=i,e.mul(i,a)),e.ONE),o=e.inv(n);return t.reduceRight((i,a,l)=>e.is0(a)?i:(r[l]=e.mul(i,r[l]),e.mul(i,a)),o),r}function An(e,t){const r=t!==void 0?t:e.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function xn(e,t,r=!1,n={}){if(e<=W)throw new Error("invalid field: expected ORDER > 0, got "+e);const{nBitLength:o,nByteLength:i}=An(e,t);if(i>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let a;const l=Object.freeze({ORDER:e,isLE:r,BITS:o,BYTES:i,MASK:Vs(o),ZERO:W,ONE:M,create:c=>$(c,e),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return W<=c&&c<e},is0:c=>c===W,isOdd:c=>(c&M)===M,neg:c=>$(-c,e),eql:(c,s)=>c===s,sqr:c=>$(c*c,e),add:(c,s)=>$(c+s,e),sub:(c,s)=>$(c-s,e),mul:(c,s)=>$(c*s,e),pow:(c,s)=>ea(l,c,s),div:(c,s)=>$(c*Tr(s,e),e),sqrN:c=>c*c,addN:(c,s)=>c+s,subN:(c,s)=>c-s,mulN:(c,s)=>c*s,inv:c=>Tr(c,e),sqrt:n.sqrt||(c=>(a||(a=Js(e)),a(l,c))),invertBatch:c=>ta(l,c),cmov:(c,s,u)=>u?s:c,toBytes:c=>r?It(c,i):Cn(c,i),fromBytes:c=>{if(c.length!==i)throw new Error("Field.fromBytes: expected "+i+" bytes, got "+c.length);return r?Ye(c):Ws(c)}});return Object.freeze(l)}const Rr=BigInt(0),Ve=BigInt(1);function yt(e,t){const r=t.negate();return e?r:t}function Bn(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function mt(e,t){Bn(e,t);const r=Math.ceil(t/e)+1,n=2**(e-1);return{windows:r,windowSize:n}}function ra(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((r,n)=>{if(!(r instanceof t))throw new Error("invalid point at index "+n)})}function na(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((r,n)=>{if(!t.isValid(r))throw new Error("invalid scalar at index "+n)})}const vt=new WeakMap,In=new WeakMap;function Et(e){return In.get(e)||1}function oa(e,t){return{constTimeNegate:yt,hasPrecomputes(r){return Et(r)!==1},unsafeLadder(r,n,o=e.ZERO){let i=r;for(;n>Rr;)n&Ve&&(o=o.add(i)),i=i.double(),n>>=Ve;return o},precomputeWindow(r,n){const{windows:o,windowSize:i}=mt(n,t),a=[];let l=r,c=l;for(let s=0;s<o;s++){c=l,a.push(c);for(let u=1;u<i;u++)c=c.add(l),a.push(c);l=c.double()}return a},wNAF(r,n,o){const{windows:i,windowSize:a}=mt(r,t);let l=e.ZERO,c=e.BASE;const s=BigInt(2**r-1),u=2**r,f=BigInt(r);for(let h=0;h<i;h++){const b=h*a;let d=Number(o&s);o>>=f,d>a&&(d-=u,o+=Ve);const g=b,D=b+Math.abs(d)-1,y=h%2!==0,S=d<0;d===0?c=c.add(yt(y,n[g])):l=l.add(yt(S,n[D]))}return{p:l,f:c}},wNAFUnsafe(r,n,o,i=e.ZERO){const{windows:a,windowSize:l}=mt(r,t),c=BigInt(2**r-1),s=2**r,u=BigInt(r);for(let f=0;f<a;f++){const h=f*l;if(o===Rr)break;let b=Number(o&c);if(o>>=u,b>l&&(b-=s,o+=Ve),b===0)continue;let d=n[h+Math.abs(b)-1];b<0&&(d=d.negate()),i=i.add(d)}return i},getPrecomputes(r,n,o){let i=vt.get(n);return i||(i=this.precomputeWindow(n,r),r!==1&&vt.set(n,o(i))),i},wNAFCached(r,n,o){const i=Et(r);return this.wNAF(i,this.getPrecomputes(i,r,o),n)},wNAFCachedUnsafe(r,n,o,i){const a=Et(r);return a===1?this.unsafeLadder(r,n,i):this.wNAFUnsafe(a,this.getPrecomputes(a,r,o),n,i)},setWindowSize(r,n){Bn(n,t),In.set(r,n),vt.delete(r)}}}function ia(e,t,r,n){if(ra(r,e),na(n,t),r.length!==n.length)throw new Error("arrays of points and scalars must have equal length");const o=e.ZERO,i=Hs(BigInt(r.length)),a=i>12?i-3:i>4?i-2:i?2:1,l=(1<<a)-1,c=new Array(l+1).fill(o),s=Math.floor((t.BITS-1)/a)*a;let u=o;for(let f=s;f>=0;f-=a){c.fill(o);for(let b=0;b<n.length;b++){const d=n[b],g=Number(d>>BigInt(f)&BigInt(l));c[g]=c[g].add(r[b])}let h=o;for(let b=c.length-1,d=o;b>0;b--)d=d.add(c[b]),h=h.add(d);if(u=u.add(h),f!==0)for(let b=0;b<a;b++)u=u.double()}return u}function sa(e){return Qs(e.Fp),Ht(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...An(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}const J=BigInt(0),q=BigInt(1),Ke=BigInt(2),aa=BigInt(8),ua={zip215:!0};function ca(e){const t=sa(e);return Ht(e,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...t})}function la(e){const t=ca(e),{Fp:r,n,prehash:o,hash:i,randomBytes:a,nByteLength:l,h:c}=t,s=Ke<<BigInt(l*8)-q,u=r.create,f=xn(t.n,t.nBitLength),h=t.uvRatio||((E,w)=>{try{return{isValid:!0,value:r.sqrt(E*r.inv(w))}}catch{return{isValid:!1,value:J}}}),b=t.adjustScalarBytes||(E=>E),d=t.domain||((E,w,v)=>{if(wt("phflag",v),w.length||v)throw new Error("Contexts/pre-hash are not supported");return E});function g(E,w){xe("coordinate "+E,w,J,s)}function D(E){if(!(E instanceof p))throw new Error("ExtendedPoint expected")}const y=xr((E,w)=>{const{ex:v,ey:_,ez:A}=E,x=E.is0();w==null&&(w=x?aa:r.inv(A));const I=u(v*w),L=u(_*w),R=u(A*w);if(x)return{x:J,y:q};if(R!==q)throw new Error("invZ was invalid");return{x:I,y:L}}),S=xr(E=>{const{a:w,d:v}=t;if(E.is0())throw new Error("bad point: ZERO");const{ex:_,ey:A,ez:x,et:I}=E,L=u(_*_),R=u(A*A),U=u(x*x),k=u(U*U),K=u(L*w),Q=u(U*u(K+R)),ee=u(k+u(v*u(L*R)));if(Q!==ee)throw new Error("bad point: equation left != right (1)");const Y=u(_*A),se=u(x*I);if(Y!==se)throw new Error("bad point: equation left != right (2)");return!0});class p{constructor(w,v,_,A){this.ex=w,this.ey=v,this.ez=_,this.et=A,g("x",w),g("y",v),g("z",_),g("t",A),Object.freeze(this)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(w){if(w instanceof p)throw new Error("extended point not allowed");const{x:v,y:_}=w||{};return g("x",v),g("y",_),new p(v,_,q,u(v*_))}static normalizeZ(w){const v=r.invertBatch(w.map(_=>_.ez));return w.map((_,A)=>_.toAffine(v[A])).map(p.fromAffine)}static msm(w,v){return ia(p,f,w,v)}_setWindowSize(w){T.setWindowSize(this,w)}assertValidity(){S(this)}equals(w){D(w);const{ex:v,ey:_,ez:A}=this,{ex:x,ey:I,ez:L}=w,R=u(v*L),U=u(x*A),k=u(_*L),K=u(I*A);return R===U&&k===K}is0(){return this.equals(p.ZERO)}negate(){return new p(u(-this.ex),this.ey,this.ez,u(-this.et))}double(){const{a:w}=t,{ex:v,ey:_,ez:A}=this,x=u(v*v),I=u(_*_),L=u(Ke*u(A*A)),R=u(w*x),U=v+_,k=u(u(U*U)-x-I),K=R+I,Q=K-L,ee=R-I,Y=u(k*Q),se=u(K*ee),le=u(k*ee),$e=u(Q*K);return new p(Y,se,$e,le)}add(w){D(w);const{a:v,d:_}=t,{ex:A,ey:x,ez:I,et:L}=this,{ex:R,ey:U,ez:k,et:K}=w;if(v===BigInt(-1)){const er=u((x-A)*(U+R)),tr=u((x+A)*(U-R)),ut=u(tr-er);if(ut===J)return this.double();const rr=u(I*Ke*K),nr=u(L*Ke*k),or=nr+rr,ir=tr+er,sr=nr-rr,go=u(or*ut),wo=u(ir*sr),Do=u(or*sr),yo=u(ut*ir);return new p(go,wo,yo,Do)}const Q=u(A*R),ee=u(x*U),Y=u(L*_*K),se=u(I*k),le=u((A+x)*(R+U)-Q-ee),$e=se-Y,Zt=se+Y,Qt=u(ee-v*Q),fo=u(le*$e),ho=u(Zt*Qt),bo=u(le*Qt),po=u($e*Zt);return new p(fo,ho,po,bo)}subtract(w){return this.add(w.negate())}wNAF(w){return T.wNAFCached(this,w,p.normalizeZ)}multiply(w){const v=w;xe("scalar",v,q,n);const{p:_,f:A}=this.wNAF(v);return p.normalizeZ([_,A])[0]}multiplyUnsafe(w,v=p.ZERO){const _=w;return xe("scalar",_,J,n),_===J?F:this.is0()||_===q?this:T.wNAFCachedUnsafe(this,_,p.normalizeZ,v)}isSmallOrder(){return this.multiplyUnsafe(c).is0()}isTorsionFree(){return T.unsafeLadder(this,n).is0()}toAffine(w){return y(this,w)}clearCofactor(){const{h:w}=t;return w===q?this:this.multiplyUnsafe(w)}static fromHex(w,v=!1){const{d:_,a:A}=t,x=r.BYTES;w=re("pointHex",w,x),wt("zip215",v);const I=w.slice(),L=w[x-1];I[x-1]=L&-129;const R=Ye(I),U=v?s:r.ORDER;xe("pointHex.y",R,J,U);const k=u(R*R),K=u(k-q),Q=u(_*k-A);let{isValid:ee,value:Y}=h(K,Q);if(!ee)throw new Error("Point.fromHex: invalid y coordinate");const se=(Y&q)===q,le=(L&128)!==0;if(!v&&Y===J&&le)throw new Error("Point.fromHex: x=0 and x_0=1");return le!==se&&(Y=u(-Y)),p.fromAffine({x:Y,y:R})}static fromPrivateKey(w){return j(w).point}toRawBytes(){const{x:w,y:v}=this.toAffine(),_=It(v,r.BYTES);return _[_.length-1]|=w&q?128:0,_}toHex(){return kt(this.toRawBytes())}}p.BASE=new p(t.Gx,t.Gy,q,u(t.Gx*t.Gy)),p.ZERO=new p(J,q,q,J);const{BASE:m,ZERO:F}=p,T=oa(p,l*8);function B(E){return $(E,n)}function C(E){return B(Ye(E))}function j(E){const w=r.BYTES;E=re("private key",E,w);const v=re("hashed private key",i(E),2*w),_=b(v.slice(0,w)),A=v.slice(w,2*w),x=C(_),I=m.multiply(x),L=I.toRawBytes();return{head:_,prefix:A,scalar:x,point:I,pointBytes:L}}function ge(E){return j(E).pointBytes}function ce(E=new Uint8Array,...w){const v=Ar(...w);return C(i(d(v,re("context",E),!!o)))}function we(E,w,v={}){E=re("message",E),o&&(E=o(E));const{prefix:_,scalar:A,pointBytes:x}=j(w),I=ce(v.context,_,E),L=m.multiply(I).toRawBytes(),R=ce(v.context,L,x,E),U=B(I+R*A);xe("signature.s",U,J,n);const k=Ar(L,It(U,r.BYTES));return re("result",k,r.BYTES*2)}const Fe=ua;function at(E,w,v,_=Fe){const{context:A,zip215:x}=_,I=r.BYTES;E=re("signature",E,2*I),w=re("message",w),v=re("publicKey",v,I),x!==void 0&&wt("zip215",x),o&&(w=o(w));const L=Ye(E.slice(I,2*I));let R,U,k;try{R=p.fromHex(v,x),U=p.fromHex(E.slice(0,I),x),k=m.multiplyUnsafe(L)}catch{return!1}if(!x&&R.isSmallOrder())return!1;const K=ce(A,U.toRawBytes(),R.toRawBytes(),w);return U.add(R.multiplyUnsafe(K)).subtract(k).clearCofactor().equals(p.ZERO)}return m._setWindowSize(8),{CURVE:t,getPublicKey:ge,sign:we,verify:at,ExtendedPoint:p,utils:{getExtendedPublicKey:j,randomPrivateKey:()=>a(r.BYTES),precompute(E=8,w=p.BASE){return w._setWindowSize(E),w.multiply(BigInt(3)),w}}}}BigInt(0),BigInt(1);const Vt=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),Nr=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");BigInt(0);const fa=BigInt(1),Pr=BigInt(2);BigInt(3);const ha=BigInt(5),da=BigInt(8);function ba(e){const t=BigInt(10),r=BigInt(20),n=BigInt(40),o=BigInt(80),i=Vt,a=e*e%i*e%i,l=X(a,Pr,i)*a%i,c=X(l,fa,i)*e%i,s=X(c,ha,i)*c%i,u=X(s,t,i)*s%i,f=X(u,r,i)*u%i,h=X(f,n,i)*f%i,b=X(h,o,i)*h%i,d=X(b,o,i)*h%i,g=X(d,t,i)*s%i;return{pow_p_5_8:X(g,Pr,i)*e%i,b2:a}}function pa(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}function ga(e,t){const r=Vt,n=$(t*t*t,r),o=$(n*n*t,r),i=ba(e*o).pow_p_5_8;let a=$(e*n*i,r);const l=$(t*a*a,r),c=a,s=$(a*Nr,r),u=l===e,f=l===$(-e,r),h=l===$(-e*Nr,r);return u&&(a=c),(f||h)&&(a=s),Xs(a,r)&&(a=$(-a,r)),{isValid:u||f,value:a}}const wa=xn(Vt,void 0,!0),Da={a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:wa,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:da,Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:Ms,randomBytes:En,adjustScalarBytes:pa,uvRatio:ga},Tn=la(Da),ya="EdDSA",ma="JWT",Ze=".",nt="base64url",Rn="utf8",Nn="utf8",va=":",Ea="did",_a="key",jr="base58btc",Sa="z",Oa="K36",Fa=32;function Kt(e){return globalThis.Buffer!=null?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function Pn(e=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?Kt(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}function jn(e,t){t||(t=e.reduce((o,i)=>o+i.length,0));const r=Pn(t);let n=0;for(const o of e)r.set(o,n),n+=o.length;return Kt(r)}function Ca(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var o=0;o<e.length;o++){var i=e.charAt(o),a=i.charCodeAt(0);if(r[a]!==255)throw new TypeError(i+" is ambiguous");r[a]=o}var l=e.length,c=e.charAt(0),s=Math.log(l)/Math.log(256),u=Math.log(256)/Math.log(l);function f(d){if(d instanceof Uint8Array||(ArrayBuffer.isView(d)?d=new Uint8Array(d.buffer,d.byteOffset,d.byteLength):Array.isArray(d)&&(d=Uint8Array.from(d))),!(d instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(d.length===0)return"";for(var g=0,D=0,y=0,S=d.length;y!==S&&d[y]===0;)y++,g++;for(var p=(S-y)*u+1>>>0,m=new Uint8Array(p);y!==S;){for(var F=d[y],T=0,B=p-1;(F!==0||T<D)&&B!==-1;B--,T++)F+=256*m[B]>>>0,m[B]=F%l>>>0,F=F/l>>>0;if(F!==0)throw new Error("Non-zero carry");D=T,y++}for(var C=p-D;C!==p&&m[C]===0;)C++;for(var j=c.repeat(g);C<p;++C)j+=e.charAt(m[C]);return j}function h(d){if(typeof d!="string")throw new TypeError("Expected String");if(d.length===0)return new Uint8Array;var g=0;if(d[g]!==" "){for(var D=0,y=0;d[g]===c;)D++,g++;for(var S=(d.length-g)*s+1>>>0,p=new Uint8Array(S);d[g];){var m=r[d.charCodeAt(g)];if(m===255)return;for(var F=0,T=S-1;(m!==0||F<y)&&T!==-1;T--,F++)m+=l*p[T]>>>0,p[T]=m%256>>>0,m=m/256>>>0;if(m!==0)throw new Error("Non-zero carry");y=F,g++}if(d[g]!==" "){for(var B=S-y;B!==S&&p[B]===0;)B++;for(var C=new Uint8Array(D+(S-B)),j=D;B!==S;)C[j++]=p[B++];return C}}}function b(d){var g=h(d);if(g)return g;throw new Error(`Non-${t} character`)}return{encode:f,decodeUnsafe:h,decode:b}}var Aa=Ca,xa=Aa;const Ln=e=>{if(e instanceof Uint8Array&&e.constructor.name==="Uint8Array")return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")},Ba=e=>new TextEncoder().encode(e),Ia=e=>new TextDecoder().decode(e);class Ta{constructor(t,r,n){this.name=t,this.prefix=r,this.baseEncode=n}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class Ra{constructor(t,r,n){if(this.name=t,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}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 Un(this,t)}}class Na{constructor(t){this.decoders=t}or(t){return Un(this,t)}decode(t){const r=t[0],n=this.decoders[r];if(n)return n.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const Un=(e,t)=>new Na({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class Pa{constructor(t,r,n,o){this.name=t,this.prefix=r,this.baseEncode=n,this.baseDecode=o,this.encoder=new Ta(t,r,n),this.decoder=new Ra(t,r,o)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const ot=({name:e,prefix:t,encode:r,decode:n})=>new Pa(e,t,r,n),Ue=({prefix:e,name:t,alphabet:r})=>{const{encode:n,decode:o}=xa(r,t);return ot({prefix:e,name:t,encode:n,decode:i=>Ln(o(i))})},ja=(e,t,r,n)=>{const o={};for(let u=0;u<t.length;++u)o[t[u]]=u;let i=e.length;for(;e[i-1]==="=";)--i;const a=new Uint8Array(i*r/8|0);let l=0,c=0,s=0;for(let u=0;u<i;++u){const f=o[e[u]];if(f===void 0)throw new SyntaxError(`Non-${n} character`);c=c<<r|f,l+=r,l>=8&&(l-=8,a[s++]=255&c>>l)}if(l>=r||255&c<<8-l)throw new SyntaxError("Unexpected end of data");return a},La=(e,t,r)=>{const n=t[t.length-1]==="=",o=(1<<r)-1;let i="",a=0,l=0;for(let c=0;c<e.length;++c)for(l=l<<8|e[c],a+=8;a>r;)a-=r,i+=t[o&l>>a];if(a&&(i+=t[o&l<<r-a]),n)for(;i.length*r&7;)i+="=";return i},H=({name:e,prefix:t,bitsPerChar:r,alphabet:n})=>ot({prefix:t,name:e,encode(o){return La(o,n,r)},decode(o){return ja(o,n,r,e)}}),Ua=ot({prefix:"\0",name:"identity",encode:e=>Ia(e),decode:e=>Ba(e)});var Ma=Object.freeze({__proto__:null,identity:Ua});const $a=H({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var za=Object.freeze({__proto__:null,base2:$a});const Wa=H({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var ka=Object.freeze({__proto__:null,base8:Wa});const Ha=Ue({prefix:"9",name:"base10",alphabet:"0123456789"});var Va=Object.freeze({__proto__:null,base10:Ha});const Ka=H({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),qa=H({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var Ga=Object.freeze({__proto__:null,base16:Ka,base16upper:qa});const Ya=H({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Ja=H({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Xa=H({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Za=H({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Qa=H({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),eu=H({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),tu=H({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),ru=H({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),nu=H({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var ou=Object.freeze({__proto__:null,base32:Ya,base32upper:Ja,base32pad:Xa,base32padupper:Za,base32hex:Qa,base32hexupper:eu,base32hexpad:tu,base32hexpadupper:ru,base32z:nu});const iu=Ue({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),su=Ue({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var au=Object.freeze({__proto__:null,base36:iu,base36upper:su});const uu=Ue({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),cu=Ue({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var lu=Object.freeze({__proto__:null,base58btc:uu,base58flickr:cu});const fu=H({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),hu=H({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),du=H({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),bu=H({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var pu=Object.freeze({__proto__:null,base64:fu,base64pad:hu,base64url:du,base64urlpad:bu});const Mn=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),gu=Mn.reduce((e,t,r)=>(e[r]=t,e),[]),wu=Mn.reduce((e,t,r)=>(e[t.codePointAt(0)]=r,e),[]);function Du(e){return e.reduce((t,r)=>(t+=gu[r],t),"")}function yu(e){const t=[];for(const r of e){const n=wu[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);t.push(n)}return new Uint8Array(t)}const mu=ot({prefix:"🚀",name:"base256emoji",encode:Du,decode:yu});var vu=Object.freeze({__proto__:null,base256emoji:mu}),Eu=$n,Lr=128,_u=-128,Su=Math.pow(2,31);function $n(e,t,r){t=t||[],r=r||0;for(var n=r;e>=Su;)t[r++]=e&255|Lr,e/=128;for(;e&_u;)t[r++]=e&255|Lr,e>>>=7;return t[r]=e|0,$n.bytes=r-n+1,t}var Ou=Rt,Fu=128,Ur=127;function Rt(e,n){var r=0,n=n||0,o=0,i=n,a,l=e.length;do{if(i>=l)throw Rt.bytes=0,new RangeError("Could not decode varint");a=e[i++],r+=o<28?(a&Ur)<<o:(a&Ur)*Math.pow(2,o),o+=7}while(a>=Fu);return Rt.bytes=i-n,r}var Cu=Math.pow(2,7),Au=Math.pow(2,14),xu=Math.pow(2,21),Bu=Math.pow(2,28),Iu=Math.pow(2,35),Tu=Math.pow(2,42),Ru=Math.pow(2,49),Nu=Math.pow(2,56),Pu=Math.pow(2,63),ju=function(e){return e<Cu?1:e<Au?2:e<xu?3:e<Bu?4:e<Iu?5:e<Tu?6:e<Ru?7:e<Nu?8:e<Pu?9:10},Lu={encode:Eu,decode:Ou,encodingLength:ju},zn=Lu;const Mr=(e,t,r=0)=>(zn.encode(e,t,r),t),$r=e=>zn.encodingLength(e),Nt=(e,t)=>{const r=t.byteLength,n=$r(e),o=n+$r(r),i=new Uint8Array(o+r);return Mr(e,i,0),Mr(r,i,n),i.set(t,o),new Uu(e,r,t,i)};class Uu{constructor(t,r,n,o){this.code=t,this.size=r,this.digest=n,this.bytes=o}}const Wn=({name:e,code:t,encode:r})=>new Mu(e,t,r);class Mu{constructor(t,r,n){this.name=t,this.code=r,this.encode=n}digest(t){if(t instanceof Uint8Array){const r=this.encode(t);return r instanceof Uint8Array?Nt(this.code,r):r.then(n=>Nt(this.code,n))}else throw Error("Unknown type, must be binary type")}}const kn=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),$u=Wn({name:"sha2-256",code:18,encode:kn("SHA-256")}),zu=Wn({name:"sha2-512",code:19,encode:kn("SHA-512")});var Wu=Object.freeze({__proto__:null,sha256:$u,sha512:zu});const Hn=0,ku="identity",Vn=Ln,Hu=e=>Nt(Hn,Vn(e)),Vu={code:Hn,name:ku,encode:Vn,digest:Hu};var Ku=Object.freeze({__proto__:null,identity:Vu});new TextEncoder,new TextDecoder;const zr={...Ma,...za,...ka,...Va,...Ga,...ou,...au,...lu,...pu,...vu};({...Wu,...Ku});function Kn(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}const Wr=Kn("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),_t=Kn("ascii","a",e=>{let t="a";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},e=>{e=e.substring(1);const t=Pn(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}),qn={utf8:Wr,"utf-8":Wr,hex:zr.base16,latin1:_t,ascii:_t,binary:_t,...zr};function it(e,t="utf8"){const r=qn[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return(t==="utf8"||t==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8"):r.encoder.encode(e).substring(1)}function Se(e,t="utf8"){const r=qn[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return(t==="utf8"||t==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?Kt(globalThis.Buffer.from(e,"utf-8")):r.decoder.decode(`${r.prefix}${e}`)}function kr(e){return _e(it(Se(e,nt),Rn))}function Qe(e){return it(Se(ie(e),Rn),nt)}function Gn(e){const t=Se(Oa,jr),r=Sa+it(jn([t,e]),jr);return[Ea,_a,r].join(va)}function qu(e){return it(e,nt)}function Gu(e){return Se(e,nt)}function Yu(e){return Se([Qe(e.header),Qe(e.payload)].join(Ze),Nn)}function Ju(e){return[Qe(e.header),Qe(e.payload),qu(e.signature)].join(Ze)}function Xu(e){const t=e.split(Ze),r=kr(t[0]),n=kr(t[1]),o=Gu(t[2]),i=Se(t.slice(0,2).join(Ze),Nn);return{header:r,payload:n,signature:o,data:i}}function Zu(e=En(Fa)){const t=Tn.getPublicKey(e);return{secretKey:jn([e,t]),publicKey:t}}async function Qu(e,t,r,n,o=Pe.fromMiliseconds(Date.now())){const i={alg:ya,typ:ma},a=Gn(n.publicKey),l=o+r,c={iss:a,sub:e,aud:t,iat:o,exp:l},s=Yu({header:i,payload:c}),u=Tn.sign(s,n.secretKey.slice(0,32));return Ju({header:i,payload:c,signature:u})}var Hr=function(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))},ec=function(){function e(t,r,n){this.name=t,this.version=r,this.os=n,this.type="browser"}return e}(),tc=function(){function e(t){this.version=t,this.type="node",this.name="node",this.os=P.dist.process.platform}return e}(),rc=function(){function e(t,r,n,o){this.name=t,this.version=r,this.os=n,this.bot=o,this.type="bot-device"}return e}(),nc=function(){function e(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return e}(),oc=function(){function e(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return e}(),ic=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,sc=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,Vr=3,ac=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",ic]],Kr=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function uc(e){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new oc:typeof navigator<"u"?lc(navigator.userAgent):hc()}function cc(e){return e!==""&&ac.reduce(function(t,r){var n=r[0],o=r[1];if(t)return t;var i=o.exec(e);return!!i&&[n,i]},!1)}function lc(e){var t=cc(e);if(!t)return null;var r=t[0],n=t[1];if(r==="searchbot")return new nc;var o=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);o?o.length<Vr&&(o=Hr(Hr([],o,!0),dc(Vr-o.length),!0)):o=[];var i=o.join("."),a=fc(e),l=sc.exec(e);return l&&l[1]?new rc(r,i,a,l[1]):new ec(r,i,a)}function fc(e){for(var t=0,r=Kr.length;t<r;t++){var n=Kr[t],o=n[0],i=n[1],a=i.exec(e);if(a)return o}return null}function hc(){var e=typeof P.dist.process<"u"&&P.dist.process.version;return e?new tc(P.dist.process.version.slice(1)):null}function dc(e){for(var t=[],r=0;r<e;r++)t.push("0");return t}var N={};Object.defineProperty(N,"__esModule",{value:!0});N.getLocalStorage=N.getLocalStorageOrThrow=N.getCrypto=N.getCryptoOrThrow=exports.getLocation_1=N.getLocation=N.getLocationOrThrow=exports.getNavigator_1=N.getNavigator=N.getNavigatorOrThrow=exports.getDocument_1=N.getDocument=N.getDocumentOrThrow=N.getFromWindowOrThrow=N.getFromWindow=void 0;function pe(e){let t;return typeof window<"u"&&typeof window[e]<"u"&&(t=window[e]),t}N.getFromWindow=pe;function Oe(e){const t=pe(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}N.getFromWindowOrThrow=Oe;function bc(){return Oe("document")}N.getDocumentOrThrow=bc;function pc(){return pe("document")}exports.getDocument_1=N.getDocument=pc;function gc(){return Oe("navigator")}N.getNavigatorOrThrow=gc;function wc(){return pe("navigator")}exports.getNavigator_1=N.getNavigator=wc;function Dc(){return Oe("location")}N.getLocationOrThrow=Dc;function yc(){return pe("location")}exports.getLocation_1=N.getLocation=yc;function mc(){return Oe("crypto")}N.getCryptoOrThrow=mc;function vc(){return pe("crypto")}N.getCrypto=vc;function Ec(){return Oe("localStorage")}N.getLocalStorageOrThrow=Ec;function _c(){return pe("localStorage")}N.getLocalStorage=_c;var qt={};Object.defineProperty(qt,"__esModule",{value:!0});exports.getWindowMetadata_1=qt.getWindowMetadata=void 0;const qr=N;function Sc(){let e,t;try{e=qr.getDocumentOrThrow(),t=qr.getLocationOrThrow()}catch{return null}function r(){const f=e.getElementsByTagName("link"),h=[];for(let b=0;b<f.length;b++){const d=f[b],g=d.getAttribute("rel");if(g&&g.toLowerCase().indexOf("icon")>-1){const D=d.getAttribute("href");if(D)if(D.toLowerCase().indexOf("https:")===-1&&D.toLowerCase().indexOf("http:")===-1&&D.indexOf("//")!==0){let y=t.protocol+"//"+t.host;if(D.indexOf("/")===0)y+=D;else{const S=t.pathname.split("/");S.pop();const p=S.join("/");y+=p+"/"+D}h.push(y)}else if(D.indexOf("//")===0){const y=t.protocol+D;h.push(y)}else h.push(D)}}return h}function n(...f){const h=e.getElementsByTagName("meta");for(let b=0;b<h.length;b++){const d=h[b],g=["itemprop","property","name"].map(D=>d.getAttribute(D)).filter(D=>D?f.includes(D):!1);if(g.length&&g){const D=d.getAttribute("content");if(D)return D}}return""}function o(){let f=n("name","og:site_name","og:title","twitter:title");return f||(f=e.title),f}function i(){return n("description","og:description","twitter:description","keywords")}const a=o(),l=i(),c=t.origin,s=r();return{description:l,url:c,icons:s,name:a}}exports.getWindowMetadata_1=qt.getWindowMetadata=Sc;function Yn(e=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(e):new Uint8Array(e)}function Oc(e,t){t||(t=e.reduce((o,i)=>o+i.length,0));const r=Yn(t);let n=0;for(const o of e)r.set(o,n),n+=o.length;return r}function Fc(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var o=0;o<e.length;o++){var i=e.charAt(o),a=i.charCodeAt(0);if(r[a]!==255)throw new TypeError(i+" is ambiguous");r[a]=o}var l=e.length,c=e.charAt(0),s=Math.log(l)/Math.log(256),u=Math.log(256)/Math.log(l);function f(d){if(d instanceof Uint8Array||(ArrayBuffer.isView(d)?d=new Uint8Array(d.buffer,d.byteOffset,d.byteLength):Array.isArray(d)&&(d=Uint8Array.from(d))),!(d instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(d.length===0)return"";for(var g=0,D=0,y=0,S=d.length;y!==S&&d[y]===0;)y++,g++;for(var p=(S-y)*u+1>>>0,m=new Uint8Array(p);y!==S;){for(var F=d[y],T=0,B=p-1;(F!==0||T<D)&&B!==-1;B--,T++)F+=256*m[B]>>>0,m[B]=F%l>>>0,F=F/l>>>0;if(F!==0)throw new Error("Non-zero carry");D=T,y++}for(var C=p-D;C!==p&&m[C]===0;)C++;for(var j=c.repeat(g);C<p;++C)j+=e.charAt(m[C]);return j}function h(d){if(typeof d!="string")throw new TypeError("Expected String");if(d.length===0)return new Uint8Array;var g=0;if(d[g]!==" "){for(var D=0,y=0;d[g]===c;)D++,g++;for(var S=(d.length-g)*s+1>>>0,p=new Uint8Array(S);d[g];){var m=r[d.charCodeAt(g)];if(m===255)return;for(var F=0,T=S-1;(m!==0||F<y)&&T!==-1;T--,F++)m+=l*p[T]>>>0,p[T]=m%256>>>0,m=m/256>>>0;if(m!==0)throw new Error("Non-zero carry");y=F,g++}if(d[g]!==" "){for(var B=S-y;B!==S&&p[B]===0;)B++;for(var C=new Uint8Array(D+(S-B)),j=D;B!==S;)C[j++]=p[B++];return C}}}function b(d){var g=h(d);if(g)return g;throw new Error(`Non-${t} character`)}return{encode:f,decodeUnsafe:h,decode:b}}var Cc=Fc,Ac=Cc;const xc=e=>{if(e instanceof Uint8Array&&e.constructor.name==="Uint8Array")return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")},Bc=e=>new TextEncoder().encode(e),Ic=e=>new TextDecoder().decode(e);class Tc{constructor(t,r,n){this.name=t,this.prefix=r,this.baseEncode=n}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class Rc{constructor(t,r,n){if(this.name=t,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}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 Jn(this,t)}}class Nc{constructor(t){this.decoders=t}or(t){return Jn(this,t)}decode(t){const r=t[0],n=this.decoders[r];if(n)return n.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const Jn=(e,t)=>new Nc({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class Pc{constructor(t,r,n,o){this.name=t,this.prefix=r,this.baseEncode=n,this.baseDecode=o,this.encoder=new Tc(t,r,n),this.decoder=new Rc(t,r,o)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const st=({name:e,prefix:t,encode:r,decode:n})=>new Pc(e,t,r,n),Me=({prefix:e,name:t,alphabet:r})=>{const{encode:n,decode:o}=Ac(r,t);return st({prefix:e,name:t,encode:n,decode:i=>xc(o(i))})},jc=(e,t,r,n)=>{const o={};for(let u=0;u<t.length;++u)o[t[u]]=u;let i=e.length;for(;e[i-1]==="=";)--i;const a=new Uint8Array(i*r/8|0);let l=0,c=0,s=0;for(let u=0;u<i;++u){const f=o[e[u]];if(f===void 0)throw new SyntaxError(`Non-${n} character`);c=c<<r|f,l+=r,l>=8&&(l-=8,a[s++]=255&c>>l)}if(l>=r||255&c<<8-l)throw new SyntaxError("Unexpected end of data");return a},Lc=(e,t,r)=>{const n=t[t.length-1]==="=",o=(1<<r)-1;let i="",a=0,l=0;for(let c=0;c<e.length;++c)for(l=l<<8|e[c],a+=8;a>r;)a-=r,i+=t[o&l>>a];if(a&&(i+=t[o&l<<r-a]),n)for(;i.length*r&7;)i+="=";return i},V=({name:e,prefix:t,bitsPerChar:r,alphabet:n})=>st({prefix:t,name:e,encode(o){return Lc(o,n,r)},decode(o){return jc(o,n,r,e)}}),Uc=st({prefix:"\0",name:"identity",encode:e=>Ic(e),decode:e=>Bc(e)}),Mc=Object.freeze(Object.defineProperty({__proto__:null,identity:Uc},Symbol.toStringTag,{value:"Module"})),$c=V({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),zc=Object.freeze(Object.defineProperty({__proto__:null,base2:$c},Symbol.toStringTag,{value:"Module"})),Wc=V({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),kc=Object.freeze(Object.defineProperty({__proto__:null,base8:Wc},Symbol.toStringTag,{value:"Module"})),Hc=Me({prefix:"9",name:"base10",alphabet:"0123456789"}),Vc=Object.freeze(Object.defineProperty({__proto__:null,base10:Hc},Symbol.toStringTag,{value:"Module"})),Kc=V({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),qc=V({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),Gc=Object.freeze(Object.defineProperty({__proto__:null,base16:Kc,base16upper:qc},Symbol.toStringTag,{value:"Module"})),Yc=V({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Jc=V({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Xc=V({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Zc=V({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Qc=V({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),el=V({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),tl=V({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),rl=V({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),nl=V({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),ol=Object.freeze(Object.defineProperty({__proto__:null,base32:Yc,base32hex:Qc,base32hexpad:tl,base32hexpadupper:rl,base32hexupper:el,base32pad:Xc,base32padupper:Zc,base32upper:Jc,base32z:nl},Symbol.toStringTag,{value:"Module"})),il=Me({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),sl=Me({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),al=Object.freeze(Object.defineProperty({__proto__:null,base36:il,base36upper:sl},Symbol.toStringTag,{value:"Module"})),ul=Me({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),cl=Me({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),ll=Object.freeze(Object.defineProperty({__proto__:null,base58btc:ul,base58flickr:cl},Symbol.toStringTag,{value:"Module"})),fl=V({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),hl=V({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),dl=V({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),bl=V({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),pl=Object.freeze(Object.defineProperty({__proto__:null,base64:fl,base64pad:hl,base64url:dl,base64urlpad:bl},Symbol.toStringTag,{value:"Module"})),Xn=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),gl=Xn.reduce((e,t,r)=>(e[r]=t,e),[]),wl=Xn.reduce((e,t,r)=>(e[t.codePointAt(0)]=r,e),[]);function Dl(e){return e.reduce((t,r)=>(t+=gl[r],t),"")}function yl(e){const t=[];for(const r of e){const n=wl[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);t.push(n)}return new Uint8Array(t)}const ml=st({prefix:"🚀",name:"base256emoji",encode:Dl,decode:yl}),vl=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:ml},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const Gr={...Mc,...zc,...kc,...Vc,...Gc,...ol,...al,...ll,...pl,...vl};function Zn(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}const Yr=Zn("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),St=Zn("ascii","a",e=>{let t="a";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},e=>{e=e.substring(1);const t=Yn(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}),Qn={utf8:Yr,"utf-8":Yr,hex:Gr.base16,latin1:St,ascii:St,binary:St,...Gr};function El(e,t="utf8"){const r=Qn[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return(t==="utf8"||t==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(e,"utf8"):r.decoder.decode(`${r.prefix}${e}`)}function _l(e,t="utf8"){const r=Qn[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return(t==="utf8"||t==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8"):r.encoder.encode(e).substring(1)}const Sl={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe",batchFetchMessages:"waku_batchFetchMessages"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe",batchFetchMessages:"irn_batchFetchMessages"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe",batchFetchMessages:"iridium_batchFetchMessages"}},Ol="PARSE_ERROR",Fl="INVALID_REQUEST",Cl="METHOD_NOT_FOUND",Al="INVALID_PARAMS",eo="INTERNAL_ERROR",Gt="SERVER_ERROR",xl=[-32700,-32600,-32601,-32602,-32603],Be={[Ol]:{code:-32700,message:"Parse error"},[Fl]:{code:-32600,message:"Invalid Request"},[Cl]:{code:-32601,message:"Method not found"},[Al]:{code:-32602,message:"Invalid params"},[eo]:{code:-32603,message:"Internal error"},[Gt]:{code:-32e3,message:"Server error"}},to=Gt;function Bl(e){return xl.includes(e)}function Jr(e){return Object.keys(Be).includes(e)?Be[e]:Be[to]}function Il(e){const t=Object.values(Be).find(r=>r.code===e);return t||Be[to]}function ro(e,t,r){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${r} RPC url at ${t}`):e}var no={};/*! *****************************************************************************
15
- Copyright (c) Microsoft Corporation.
16
-
17
- Permission to use, copy, modify, and/or distribute this software for any
18
- purpose with or without fee is hereby granted.
19
-
20
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
21
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
22
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
23
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
24
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
25
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
26
- PERFORMANCE OF THIS SOFTWARE.
27
- ***************************************************************************** */var Pt=function(e,t){return Pt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)n.hasOwnProperty(o)&&(r[o]=n[o])},Pt(e,t)};function Tl(e,t){Pt(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var jt=function(){return jt=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},jt.apply(this,arguments)};function Rl(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Nl(e,t,r,n){var o=arguments.length,i=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}function Pl(e,t){return function(r,n){t(r,n,e)}}function jl(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function Ll(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function l(u){try{s(n.next(u))}catch(f){a(f)}}function c(u){try{s(n.throw(u))}catch(f){a(f)}}function s(u){u.done?i(u.value):o(u.value).then(l,c)}s((n=n.apply(e,t||[])).next())})}function Ul(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(s){return function(u){return c([s,u])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=s[0]&2?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,o=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1],i=s;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(s);break}i[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(u){s=[6,u],o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function Ml(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}function $l(e,t){for(var r in e)r!=="default"&&!t.hasOwnProperty(r)&&(t[r]=e[r])}function Lt(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function oo(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(l){a={error:l}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i}function zl(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(oo(arguments[t]));return e}function Wl(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),o=0,t=0;t<r;t++)for(var i=arguments[t],a=0,l=i.length;a<l;a++,o++)n[o]=i[a];return n}function Ne(e){return this instanceof Ne?(this.v=e,this):new Ne(e)}function kl(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),o,i=[];return o={},a("next"),a("throw"),a("return"),o[Symbol.asyncIterator]=function(){return this},o;function a(h){n[h]&&(o[h]=function(b){return new Promise(function(d,g){i.push([h,b,d,g])>1||l(h,b)})})}function l(h,b){try{c(n[h](b))}catch(d){f(i[0][3],d)}}function c(h){h.value instanceof Ne?Promise.resolve(h.value.v).then(s,u):f(i[0][2],h)}function s(h){l("next",h)}function u(h){l("throw",h)}function f(h,b){h(b),i.shift(),i.length&&l(i[0][0],i[0][1])}}function Hl(e){var t,r;return t={},n("next"),n("throw",function(o){throw o}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(o,i){t[o]=e[o]?function(a){return(r=!r)?{value:Ne(e[o](a)),done:o==="return"}:i?i(a):a}:i}}function Vl(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof Lt=="function"?Lt(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=e[i]&&function(a){return new Promise(function(l,c){a=e[i](a),o(l,c,a.done,a.value)})}}function o(i,a,l,c){Promise.resolve(c).then(function(s){i({value:s,done:l})},a)}}function Kl(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function ql(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function Gl(e){return e&&e.__esModule?e:{default:e}}function Yl(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function Jl(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}const Xl=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return jt},__asyncDelegator:Hl,__asyncGenerator:kl,__asyncValues:Vl,__await:Ne,__awaiter:Ll,__classPrivateFieldGet:Yl,__classPrivateFieldSet:Jl,__createBinding:Ml,__decorate:Nl,__exportStar:$l,__extends:Tl,__generator:Ul,__importDefault:Gl,__importStar:ql,__makeTemplateObject:Kl,__metadata:jl,__param:Pl,__read:oo,__rest:Rl,__spread:zl,__spreadArrays:Wl,__values:Lt},Symbol.toStringTag,{value:"Module"})),Zl=P.getAugmentedNamespace(Xl);var ne={},Xr;function Ql(){if(Xr)return ne;Xr=1,Object.defineProperty(ne,"__esModule",{value:!0}),ne.isBrowserCryptoAvailable=ne.getSubtleCrypto=ne.getBrowerCrypto=void 0;function e(){return(P.commonjsGlobal===null||P.commonjsGlobal===void 0?void 0:P.commonjsGlobal.crypto)||(P.commonjsGlobal===null||P.commonjsGlobal===void 0?void 0:P.commonjsGlobal.msCrypto)||{}}ne.getBrowerCrypto=e;function t(){const n=e();return n.subtle||n.webkitSubtle}ne.getSubtleCrypto=t;function r(){return!!e()&&!!t()}return ne.isBrowserCryptoAvailable=r,ne}var oe={},Zr;function ef(){if(Zr)return oe;Zr=1,Object.defineProperty(oe,"__esModule",{value:!0}),oe.isBrowser=oe.isNode=oe.isReactNative=void 0;function e(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}oe.isReactNative=e;function t(){return typeof P.dist.process<"u"&&typeof P.dist.process.versions<"u"&&typeof P.dist.process.versions.node<"u"}oe.isNode=t;function r(){return!e()&&!t()}return oe.isBrowser=r,oe}(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Zl;t.__exportStar(Ql(),e),t.__exportStar(ef(),e)})(no);function Yt(e=3){const t=Date.now()*Math.pow(10,e),r=Math.floor(Math.random()*Math.pow(10,e));return t+r}function io(e=6){return BigInt(Yt(e))}function so(e,t,r){return{id:r||Yt(),jsonrpc:"2.0",method:e,params:t}}function tf(e,t){return{id:e,jsonrpc:"2.0",result:t}}function Jt(e,t,r){return{id:e,jsonrpc:"2.0",error:rf(t)}}function rf(e,t){return typeof e>"u"?Jr(eo):(typeof e=="string"&&(e=Object.assign(Object.assign({},Jr(Gt)),{message:e})),Bl(e.code)&&(e=Il(e.code)),e)}class nf{}class of extends nf{constructor(){super()}}class sf extends of{constructor(t){super()}}const af="^https?:",uf="^wss?:";function cf(e){const t=e.match(new RegExp(/^\w+:/,"gi"));if(!(!t||!t.length))return t[0]}function ao(e,t){const r=cf(e);return typeof r>"u"?!1:new RegExp(t).test(r)}function Qr(e){return ao(e,af)}function en(e){return ao(e,uf)}function lf(e){return new RegExp("wss?://localhost(:d{2,5})?").test(e)}function uo(e){return typeof e=="object"&&"id"in e&&"jsonrpc"in e&&e.jsonrpc==="2.0"}function ff(e){return uo(e)&&"method"in e}function co(e){return uo(e)&&(lo(e)||Xt(e))}function lo(e){return"result"in e}function Xt(e){return"error"in e}class hf extends sf{constructor(t){super(t),this.events=new et.eventsExports.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(t),this.connection.connected&&this.registerEventListeners()}async connect(t=this.connection){await this.open(t)}async disconnect(){await this.close()}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}off(t,r){this.events.off(t,r)}removeListener(t,r){this.events.removeListener(t,r)}async request(t,r){return this.requestStrict(so(t.method,t.params||[],t.id||io().toString()),r)}async requestStrict(t,r){return new Promise(async(n,o)=>{if(!this.connection.connected)try{await this.open()}catch(i){o(i)}this.events.on(`${t.id}`,i=>{Xt(i)?o(i.error):n(i.result)});try{await this.connection.send(t,r)}catch(i){o(i)}})}setConnection(t=this.connection){return t}onPayload(t){this.events.emit("payload",t),co(t)?this.events.emit(`${t.id}`,t):this.events.emit("message",{type:t.method,data:t.params})}onClose(t){t&&t.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${t.code} ${t.reason?`(${t.reason})`:""}`)),this.events.emit("disconnect")}async open(t=this.connection){this.connection===t&&this.connection.connected||(this.connection.connected&&this.close(),typeof t=="string"&&(await this.connection.open(t),t=this.connection),this.connection=this.setConnection(t),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",t=>this.onPayload(t)),this.connection.on("close",t=>this.onClose(t)),this.connection.on("error",t=>this.events.emit("error",t)),this.connection.on("register_error",t=>this.onClose()),this.hasRegisteredEventListeners=!0)}}const df=()=>typeof WebSocket<"u"?WebSocket:typeof P.dist.global<"u"&&typeof P.dist.global.WebSocket<"u"?P.dist.global.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:typeof self<"u"&&typeof self.WebSocket<"u"?self.WebSocket:require("ws"),bf=()=>typeof WebSocket<"u"||typeof P.dist.global<"u"&&typeof P.dist.global.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u",tn=e=>e.split("?")[0],rn=10,pf=df();let gf=class{constructor(t){if(this.url=t,this.events=new et.eventsExports.EventEmitter,this.registering=!1,!en(t))throw new Error(`Provided URL is not compatible with WebSocket connection: ${t}`);this.url=t}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}off(t,r){this.events.off(t,r)}removeListener(t,r){this.events.removeListener(t,r)}async open(t=this.url){await this.register(t)}async close(){return new Promise((t,r)=>{if(typeof this.socket>"u"){r(new Error("Connection already closed"));return}this.socket.onclose=n=>{this.onClose(n),t()},this.socket.close()})}async send(t){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(ie(t))}catch(r){this.onError(t.id,r)}}register(t=this.url){if(!en(t))throw new Error(`Provided URL is not compatible with WebSocket connection: ${t}`);if(this.registering){const r=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=r||this.events.listenerCount("open")>=r)&&this.events.setMaxListeners(r+1),new Promise((n,o)=>{this.events.once("register_error",i=>{this.resetMaxListeners(),o(i)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return o(new Error("WebSocket connection is missing or invalid"));n(this.socket)})})}return this.url=t,this.registering=!0,new Promise((r,n)=>{const o=no.isReactNative()?void 0:{rejectUnauthorized:!lf(t)},i=new pf(t,[],o);bf()?i.onerror=a=>{const l=a;n(this.emitError(l.error))}:i.on("error",a=>{n(this.emitError(a))}),i.onopen=()=>{this.onOpen(i),r(i)}})}onOpen(t){t.onmessage=r=>this.onPayload(r),t.onclose=r=>this.onClose(r),this.socket=t,this.registering=!1,this.events.emit("open")}onClose(t){this.socket=void 0,this.registering=!1,this.events.emit("close",t)}onPayload(t){if(typeof t.data>"u")return;const r=typeof t.data=="string"?_e(t.data):t.data;this.events.emit("payload",r)}onError(t,r){const n=this.parseError(r),o=n.message||n.toString(),i=Jt(t,o);this.events.emit("payload",i)}parseError(t,r=this.url){return ro(t,tn(r),"WS")}resetMaxListeners(){this.events.getMaxListeners()>rn&&this.events.setMaxListeners(rn)}emitError(t){const r=this.parseError(new Error((t==null?void 0:t.message)||`WebSocket connection failed for host: ${tn(this.url)}`));return this.events.emit("register_error",r),r}};var wf=Object.defineProperty,Df=Object.defineProperties,yf=Object.getOwnPropertyDescriptors,nn=Object.getOwnPropertySymbols,mf=Object.prototype.hasOwnProperty,vf=Object.prototype.propertyIsEnumerable,on=(e,t,r)=>t in e?wf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,sn=(e,t)=>{for(var r in t||(t={}))mf.call(t,r)&&on(e,r,t[r]);if(nn)for(var r of nn(t))vf.call(t,r)&&on(e,r,t[r]);return e},an=(e,t)=>Df(e,yf(t));const Ef={Accept:"application/json","Content-Type":"application/json"},_f="POST",un={headers:Ef,method:_f},cn=10;class Sf{constructor(t,r=!1){if(this.url=t,this.disableProviderPing=r,this.events=new et.eventsExports.EventEmitter,this.isAvailable=!1,this.registering=!1,!Qr(t))throw new Error(`Provided URL is not compatible with HTTP connection: ${t}`);this.url=t,this.disableProviderPing=r}get connected(){return this.isAvailable}get connecting(){return this.registering}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}off(t,r){this.events.off(t,r)}removeListener(t,r){this.events.removeListener(t,r)}async open(t=this.url){await this.register(t)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(t){this.isAvailable||await this.register();try{const r=ie(t),n=await(await ar.o(this.url,an(sn({},un),{body:r}))).json();this.onPayload({data:n})}catch(r){this.onError(t.id,r)}}async register(t=this.url){if(!Qr(t))throw new Error(`Provided URL is not compatible with HTTP connection: ${t}`);if(this.registering){const r=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=r||this.events.listenerCount("open")>=r)&&this.events.setMaxListeners(r+1),new Promise((n,o)=>{this.events.once("register_error",i=>{this.resetMaxListeners(),o(i)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return o(new Error("HTTP connection is missing or invalid"));n()})})}this.url=t,this.registering=!0;try{if(!this.disableProviderPing){const r=ie({id:1,jsonrpc:"2.0",method:"test",params:[]});await ar.o(t,an(sn({},un),{body:r}))}this.onOpen()}catch(r){const n=this.parseError(r);throw this.events.emit("register_error",n),this.onClose(),n}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(t){if(typeof t.data>"u")return;const r=typeof t.data=="string"?_e(t.data):t.data;this.events.emit("payload",r)}onError(t,r){const n=this.parseError(r),o=n.message||n.toString(),i=Jt(t,o);this.events.emit("payload",i)}parseError(t,r=this.url){return ro(t,r,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>cn&&this.events.setMaxListeners(cn)}}exports.A=as;exports.C=Sl;exports.E=os;exports.IEvents=hn;exports.Ot=Ut;exports.Po=Zu;exports.Qe=Gn;exports.Qo=Qu;exports.cjs=Pe;exports.concat=Oc;exports.detect=uc;exports.f=gf;exports.f$1=Sf;exports.formatJsonRpcError=Jt;exports.formatJsonRpcRequest=so;exports.formatJsonRpcResult=tf;exports.fromString=El;exports.getBigIntRpcId=io;exports.h=Ii;exports.i=Yo;exports.isJsonRpcError=Xt;exports.isJsonRpcRequest=ff;exports.isJsonRpcResponse=co;exports.isJsonRpcResult=lo;exports.k=es;exports.o=hf;exports.payloadId=Yt;exports.r=dn;exports.safeJsonParse=_e;exports.safeJsonStringify=ie;exports.sn=Xu;exports.toString=_l;exports.y=yn;