@wormhole-foundation/wormhole-connect 3.0.1-beta.0-development → 3.0.1-beta.2-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 (323) hide show
  1. package/dist/assets/{add-Cy39EVaY.js → add-CA46SOZ1.js} +1 -1
  2. package/dist/assets/{all-wallets-BG4OMn19.js → all-wallets-B1qnLkOo.js} +1 -1
  3. package/dist/assets/{app-store-B2VJcnKc.js → app-store-NTpCK9MF.js} +1 -1
  4. package/dist/assets/{apple-6OWWifFn.js → apple-DRVt4JWr.js} +1 -1
  5. package/dist/assets/{aptos-gb8snog6.js → aptos-63ExGocu.js} +1 -1
  6. package/dist/assets/{aptos-BuLH7jck.js → aptos-DkSiRwPH.js} +3 -3
  7. package/dist/assets/{arrow-bottom-YGKzRes5.js → arrow-bottom-CPth9tFV.js} +1 -1
  8. package/dist/assets/{arrow-bottom-circle-BH-P4D_L.js → arrow-bottom-circle-BWo9DWoB.js} +1 -1
  9. package/dist/assets/{arrow-left-DF2t0i5J.js → arrow-left-P6RmBJWT.js} +1 -1
  10. package/dist/assets/{arrow-right-CP40LqnJ.js → arrow-right-BHHiE7kD.js} +1 -1
  11. package/dist/assets/{arrow-top-DnKSFz-5.js → arrow-top-D5GRFsZm.js} +1 -1
  12. package/dist/assets/{bank-BpG6sNAE.js → bank-C2WLfHR8.js} +1 -1
  13. package/dist/assets/{basic-CLnavz_q.js → basic-BCJkH5GS.js} +1 -1
  14. package/dist/assets/{blake2b-B2b685Yu.js → blake2b-Bb1VZYtg.js} +1 -1
  15. package/dist/assets/{browser-BhlgRcS6.js → browser-BPjT1bN5.js} +1 -1
  16. package/dist/assets/{card-BTep0Fm_.js → card-JaBku5Bf.js} +1 -1
  17. package/dist/assets/{ccip-By49zU3M.js → ccip-CTrUg8DF.js} +1 -1
  18. package/dist/assets/{chain-Du7paeNG.js → chain-DF9mIQM9.js} +1 -1
  19. package/dist/assets/{checkmark-UEyfqUU3.js → checkmark-BQL5JCw2.js} +1 -1
  20. package/dist/assets/{checkmark-bold-DMLl2gC5.js → checkmark-bold-DP1vE2RN.js} +1 -1
  21. package/dist/assets/{chevron-bottom-CPv_izmZ.js → chevron-bottom-BV0Au0hP.js} +1 -1
  22. package/dist/assets/{chevron-left-0a7IeWd5.js → chevron-left-C4v6Iui8.js} +1 -1
  23. package/dist/assets/{chevron-right-B-0wsh8g.js → chevron-right-CbVMuuvx.js} +1 -1
  24. package/dist/assets/{chevron-top-BHFncmmu.js → chevron-top-CuIo_USv.js} +1 -1
  25. package/dist/assets/{chrome-store-BIaI9-ba.js → chrome-store-fbydRQd1.js} +1 -1
  26. package/dist/assets/{chunk-KJH4KKG6-Po5MChR6.js → chunk-KJH4KKG6-B7DCZZVY.js} +1 -1
  27. package/dist/assets/{clock-BQdD9J7H.js → clock-D62L3EFP.js} +1 -1
  28. package/dist/assets/{close-Cjok36co.js → close-BLRqO6Zn.js} +1 -1
  29. package/dist/assets/{coinPlaceholder-CneTHrCz.js → coinPlaceholder-0tmFvYYj.js} +1 -1
  30. package/dist/assets/{compass-Dit7B215.js → compass-Ba8-RKca.js} +1 -1
  31. package/dist/assets/{contract-BhySpM-Z.js → contract-bGGxC9_m.js} +1 -1
  32. package/dist/assets/{copy-JvNImG5R.js → copy-CWqrh_sD.js} +1 -1
  33. package/dist/assets/{create-gkOVonha.js → create-CbRd6EbF.js} +1 -1
  34. package/dist/assets/{cursor-CSwolbdC.js → cursor-DFYzmUAe.js} +1 -1
  35. package/dist/assets/{cursor-transparent-DQ2bEHaM.js → cursor-transparent-IY3fA7aT.js} +1 -1
  36. package/dist/assets/{desktop-F3wMUZcL.js → desktop-DLudyYW3.js} +1 -1
  37. package/dist/assets/{disconnect-vvd6SXmG.js → disconnect-gShcPNrf.js} +1 -1
  38. package/dist/assets/{discord-mwjbbdll.js → discord-S8T3fJF7.js} +1 -1
  39. package/dist/assets/{etherscan-ZpIOVA81.js → etherscan-C-ODOYjC.js} +1 -1
  40. package/dist/assets/{evm-fcQsoqVd.js → evm-D65l_VUA.js} +4 -4
  41. package/dist/assets/{evm-CWAxZ2a7.js → evm-DwqzhXfk.js} +3 -3
  42. package/dist/assets/{exclamation-triangle-CrFNsvqc.js → exclamation-triangle-I4hrUAkj.js} +1 -1
  43. package/dist/assets/{extension-C_zCCj6H.js → extension-C2E94rju.js} +1 -1
  44. package/dist/assets/{external-link-B0LEq1D3.js → external-link-BE25aYRx.js} +1 -1
  45. package/dist/assets/{facebook-B_HaXZVY.js → facebook-VHvsuzqv.js} +1 -1
  46. package/dist/assets/{farcaster-C9d4q5--.js → farcaster-sG7oFC35.js} +1 -1
  47. package/dist/assets/{filters-Coi2MlO2.js → filters-D9VcvmFo.js} +1 -1
  48. package/dist/assets/{github-DiDkJ9-4.js → github-BLJyKdzw.js} +1 -1
  49. package/dist/assets/{google-BHKYD7dA.js → google-C4YbBNSv.js} +1 -1
  50. package/dist/assets/{help-circle-lf3f_u3Q.js → help-circle-CMmVaOnp.js} +1 -1
  51. package/dist/assets/{id-BoAkobNw.js → id-g_mC9xVi.js} +1 -1
  52. package/dist/assets/{image-C9_T15rA.js → image-nAeKstDS.js} +1 -1
  53. package/dist/assets/{index-BgLBca6k.js → index-BTkoFKAW.js} +1 -1
  54. package/dist/assets/{index-Bx8vjRmV.js → index-BUtdFAj3.js} +1 -1
  55. package/dist/assets/index-BZFyhaji.js +1 -0
  56. package/dist/assets/{index-BpI-Jtyb.js → index-BqLA4xTj.js} +3 -3
  57. package/dist/assets/{index-BE55BSK7.js → index-C0-WLpMA.js} +1 -1
  58. package/dist/assets/{index-zEIfo2_n.js → index-CCOXtJ1P.js} +1 -1
  59. package/dist/assets/{index--d0JCrsI.js → index-CKPf-3Vo.js} +1 -1
  60. package/dist/assets/{index-DSTd1tRp.js → index-COZ2cSR6.js} +1 -1
  61. package/dist/assets/{index-BedU_k3i.js → index-CVqQ68io.js} +1 -1
  62. package/dist/assets/{index-DZ96gAj4.js → index-CVqXQiSE.js} +1 -1
  63. package/dist/assets/{index-TYicGq2L.js → index-CYFq9U58.js} +1 -1
  64. package/dist/assets/{index-BYTZG2bF.js → index-C_YTupmk.js} +1 -1
  65. package/dist/assets/{index-BJYqkXUw.js → index-Cu0b-jgK.js} +1 -1
  66. package/dist/assets/{index-DB7g9m_R.js → index-DA4wR-ie.js} +1 -1
  67. package/dist/assets/{index-kF0xEQ0E.js → index-DC3x_AFd.js} +1 -1
  68. package/dist/assets/{index-DMWfYwZZ.js → index-DKdokzug.js} +1 -1
  69. package/dist/assets/{index-BZCSByFC.js → index-DusYxt7C.js} +3 -3
  70. package/dist/assets/{index-BjvqCh5g.js → index-DynC8vQ4.js} +1 -1
  71. package/dist/assets/{index-Breet2G4.js → index-GmuqTVr0.js} +1 -1
  72. package/dist/assets/index.es-CWMLsIMc.js +47 -0
  73. package/dist/assets/index.es-g5_0R3zE.js +15 -0
  74. package/dist/assets/{info-C0I2HHbp.js → info-P71aU507.js} +1 -1
  75. package/dist/assets/{info-circle-BJmxBusI.js → info-circle-D8ZhpY4M.js} +1 -1
  76. package/dist/assets/{lightbulb-Chfw09TV.js → lightbulb-CWL8Hapk.js} +1 -1
  77. package/dist/assets/{mail-BGqa051c.js → mail-BKdMRnR2.js} +1 -1
  78. package/dist/assets/{mobile-DkPjbMNa.js → mobile-Bw0EoBkW.js} +1 -1
  79. package/dist/assets/{more-f7FKhsyw.js → more-BSKGQd1b.js} +1 -1
  80. package/dist/assets/{network-placeholder-DyyxIB08.js → network-placeholder-B1xqyidN.js} +1 -1
  81. package/dist/assets/{nftPlaceholder-CfDPimUz.js → nftPlaceholder-CuCsNvkN.js} +1 -1
  82. package/dist/assets/{off-BvnUT7bh.js → off-BX6zoZuA.js} +1 -1
  83. package/dist/assets/{play-store-Dl8Di4Xz.js → play-store-CCveEK_B.js} +1 -1
  84. package/dist/assets/{plus-Dtc5pm0q.js → plus-C02SGp4V.js} +1 -1
  85. package/dist/assets/{provider-jsonrpc-CG-x8-V6.js → provider-jsonrpc-DTnJKzTS.js} +1 -1
  86. package/dist/assets/{qr-code-b5m8lMyQ.js → qr-code-DGe_aS_i.js} +1 -1
  87. package/dist/assets/{recycle-horizontal-DztIZMpd.js → recycle-horizontal-DtRomJbx.js} +1 -1
  88. package/dist/assets/{refresh-Z55s9i8s.js → refresh-DPABcpes.js} +1 -1
  89. package/dist/assets/{reown-logo-BVpI-nfV.js → reown-logo-DG2ULLka.js} +1 -1
  90. package/dist/assets/{search-CjKBf0db.js → search-EURxday_.js} +1 -1
  91. package/dist/assets/{secp256k1-BHTD1Qmp.js → secp256k1-D-G9AbtW.js} +1 -1
  92. package/dist/assets/{secp256k1-CCS9UBYD.js → secp256k1-DfnLU_Rr.js} +1 -1
  93. package/dist/assets/{send-DRsIh8XD.js → send-t6aoH9GB.js} +1 -1
  94. package/dist/assets/signer-7-tpWjBV.js +2 -0
  95. package/dist/assets/{solana-D0M1N7L4.js → solana-C-diloCa.js} +18 -18
  96. package/dist/assets/solana-C6mHMmQi.js +2 -0
  97. package/dist/assets/solanaEmbed.esm-DhAz8SOB.js +10 -0
  98. package/dist/assets/{sui-DXdm7DBB.js → sui-DXg2Lhyt.js} +4 -4
  99. package/dist/assets/{sui-CXoaI0gx.js → sui-Pc10JTxL.js} +2 -2
  100. package/dist/assets/{swapHorizontal-COY_WODc.js → swapHorizontal-Cd2Bq-oX.js} +1 -1
  101. package/dist/assets/{swapHorizontalBold-C0JXN9CW.js → swapHorizontalBold-CK6YXqcD.js} +1 -1
  102. package/dist/assets/{swapHorizontalMedium-DH34hVvb.js → swapHorizontalMedium-BCT4Hlrg.js} +1 -1
  103. package/dist/assets/{swapHorizontalRoundedBold-Cbu2lR_U.js → swapHorizontalRoundedBold-C-NDd7Fq.js} +1 -1
  104. package/dist/assets/{swapVertical-CjpRMkF_.js → swapVertical-BfKszPb9.js} +1 -1
  105. package/dist/assets/{telegram-DxmYoEg_.js → telegram-D5sYoBZp.js} +1 -1
  106. package/dist/assets/{three-dots-GsCsg39y.js → three-dots-qiTqAG0h.js} +1 -1
  107. package/dist/assets/{tokens-DNQKjj3l.js → tokens-BjeNFBPV.js} +2 -2
  108. package/dist/assets/{twitch-LH0w9yHE.js → twitch-1VH6BaUA.js} +1 -1
  109. package/dist/assets/{twitterIcon-Ci6YQIIR.js → twitterIcon-hIEIDwcz.js} +1 -1
  110. package/dist/assets/{verify-CLWJXQKG.js → verify-DxvRt34f.js} +1 -1
  111. package/dist/assets/{verify-filled-Bgbn2dT_.js → verify-filled-RtidYdgS.js} +1 -1
  112. package/dist/assets/{w3m-modal-BR4v9o5N.js → w3m-modal-DI_ypCY0.js} +1 -1
  113. package/dist/assets/{wallet-Dy9a13FP.js → wallet-Cb9kcAk9.js} +1 -1
  114. package/dist/assets/{wallet-placeholder-BlMcAG8z.js → wallet-placeholder-pTFD8Qr_.js} +1 -1
  115. package/dist/assets/{walletconnect-BmSWYy7N.js → walletconnect-DvJIx5jD.js} +1 -1
  116. package/dist/assets/{warning-circle-DUSLmVwm.js → warning-circle-CRzNiBlj.js} +1 -1
  117. package/dist/assets/{x-D-BfG-2C.js → x-Dk-mK5uZ.js} +1 -1
  118. package/dist/main.js +74 -74
  119. package/dist/src/utils/index.d.ts +1 -1
  120. package/dist/src/utils/index.d.ts.map +1 -1
  121. package/dist/src/utils/wallet/solana.d.ts.map +1 -1
  122. package/dist/src/views/v2/Bridge/AmountInput/index.d.ts.map +1 -1
  123. package/dist/src/views/v2/Redeem/TransactionDetails/index.d.ts.map +1 -1
  124. package/dist/src/views/v2/TxHistory/Item/index.d.ts.map +1 -1
  125. package/lib/{add-k3ewuJUG.js → add-DVGSYBJf.js} +1 -1
  126. package/lib/{add-BPFasfGu.mjs → add-DrLWWjDN.mjs} +1 -1
  127. package/lib/{all-wallets-la-1zudw.mjs → all-wallets-CjzZMHCA.mjs} +1 -1
  128. package/lib/{all-wallets-DbhnhSgQ.js → all-wallets-DGVJQYa0.js} +1 -1
  129. package/lib/{app-store-DwyKNjnW.js → app-store-BABxSxrd.js} +1 -1
  130. package/lib/{app-store-doruxuZE.mjs → app-store-kpf503GR.mjs} +1 -1
  131. package/lib/{apple-Ba-W9z_L.mjs → apple-C0AtBJDu.mjs} +1 -1
  132. package/lib/{apple-f5EysyhV.js → apple-C962M6Ax.js} +1 -1
  133. package/lib/{aptos-ChgDZ9Bs.mjs → aptos-XxQj_uxF.mjs} +1 -1
  134. package/lib/{aptos-BYM651I5.js → aptos-uWJCRLoQ.js} +1 -1
  135. package/lib/{arrow-bottom-CyaXCpbT.js → arrow-bottom-CIZJcZfr.js} +1 -1
  136. package/lib/{arrow-bottom-CZPkUc3D.mjs → arrow-bottom-D0wK6uMJ.mjs} +1 -1
  137. package/lib/{arrow-bottom-circle-BOmrxjxV.mjs → arrow-bottom-circle-D5QwftYY.mjs} +1 -1
  138. package/lib/{arrow-bottom-circle-Kla1lJ0S.js → arrow-bottom-circle-iOl-NxXR.js} +1 -1
  139. package/lib/{arrow-left-Dqlhv2Qp.mjs → arrow-left-BL0dHjzy.mjs} +1 -1
  140. package/lib/{arrow-left-DtuOud7o.js → arrow-left-C-RAtnQ2.js} +1 -1
  141. package/lib/{arrow-right-W0IwU-6h.js → arrow-right-COiq03Wj.js} +1 -1
  142. package/lib/{arrow-right-glR4LxQL.mjs → arrow-right-DaZMOW_1.mjs} +1 -1
  143. package/lib/{arrow-top-DDcfmUYc.js → arrow-top-7Srj2XLP.js} +1 -1
  144. package/lib/{arrow-top-ChZhpBX5.mjs → arrow-top-QPVhK81o.mjs} +1 -1
  145. package/lib/{bank-2fSYiPNd.js → bank-Bp2l8LtZ.js} +1 -1
  146. package/lib/{bank-CeAxLFYE.mjs → bank-C5lNHVtL.mjs} +1 -1
  147. package/lib/{basic-DmAZdELt.mjs → basic-C5W71-rE.mjs} +2 -2
  148. package/lib/{basic-DATFcjGI.js → basic-DQ6ISwhI.js} +1 -1
  149. package/lib/{browser-CD59CQ82.mjs → browser-CJhUYmz6.mjs} +1 -1
  150. package/lib/{browser-DrdHogv9.js → browser-DV0hL_fK.js} +1 -1
  151. package/lib/{card-CR5E0M8J.mjs → card-DSeabGLV.mjs} +1 -1
  152. package/lib/{card-DsBOUpCN.js → card-yZLq1X6c.js} +1 -1
  153. package/lib/{ccip-BFa4y-oy.js → ccip-BCsOYNZd.js} +1 -1
  154. package/lib/{ccip-bLQYuHSY.mjs → ccip-CFqlillN.mjs} +1 -1
  155. package/lib/{checkmark-CsX9NZH7.js → checkmark-BW4NeFlB.js} +1 -1
  156. package/lib/{checkmark-CfNjLqyN.mjs → checkmark-DhgNpDof.mjs} +1 -1
  157. package/lib/{checkmark-bold-DY9T5oVa.mjs → checkmark-bold-CxJkyUOt.mjs} +1 -1
  158. package/lib/{checkmark-bold-BJIvwCmJ.js → checkmark-bold-DnEFF9eL.js} +1 -1
  159. package/lib/{chevron-bottom-BYoFClQQ.mjs → chevron-bottom-Pi9qTSKk.mjs} +1 -1
  160. package/lib/{chevron-bottom-Ditoq2xa.js → chevron-bottom-Tb5GYU7P.js} +1 -1
  161. package/lib/{chevron-left-3WnVWUcO.js → chevron-left-BRp6K_BQ.js} +1 -1
  162. package/lib/{chevron-left-CqVSZU9b.mjs → chevron-left-Cl35pkRv.mjs} +1 -1
  163. package/lib/{chevron-right-CJBuSXL6.js → chevron-right-D1Ic6C28.js} +1 -1
  164. package/lib/{chevron-right-X3OiwFgb.mjs → chevron-right-pjH-xKxB.mjs} +1 -1
  165. package/lib/{chevron-top-sE88QRY5.mjs → chevron-top-DSe-dX8z.mjs} +1 -1
  166. package/lib/{chevron-top-evdJz5l1.js → chevron-top-SdyRa8IE.js} +1 -1
  167. package/lib/{chrome-store-BE0d8gm3.js → chrome-store-0qgfQSAS.js} +1 -1
  168. package/lib/{chrome-store-CrGMC4Ms.mjs → chrome-store-ThoUGIhl.mjs} +1 -1
  169. package/lib/{clock-BQOPbXNd.js → clock-2HqPHolX.js} +1 -1
  170. package/lib/{clock-B2hRLLna.mjs → clock-B0sBEXQ5.mjs} +1 -1
  171. package/lib/{close-DwQUJGX9.js → close-BJQf5USo.js} +1 -1
  172. package/lib/{close-BAo2qofr.mjs → close-Bznv5frT.mjs} +1 -1
  173. package/lib/{coinPlaceholder-Cop9iL3O.mjs → coinPlaceholder-1gZoTAqN.mjs} +1 -1
  174. package/lib/{coinPlaceholder-D4XIXbUt.js → coinPlaceholder-CvvSiYI-.js} +1 -1
  175. package/lib/{compass-C1qPsOLt.js → compass-BBMA-82e.js} +1 -1
  176. package/lib/{compass-BirhgtWV.mjs → compass-BE99mJOV.mjs} +1 -1
  177. package/lib/constants-BDS32jve.js +1 -0
  178. package/lib/{constants-D9NeMoZZ.mjs → constants-Bp_337ur.mjs} +1 -1
  179. package/lib/{copy-DTprqw_x.js → copy-B_JboG8P.js} +1 -1
  180. package/lib/{copy-CEI12w7k.mjs → copy-Cwolsgnk.mjs} +1 -1
  181. package/lib/{cursor-BWYqc_Iy.mjs → cursor-0EyS6nH4.mjs} +1 -1
  182. package/lib/{cursor-CJNQd6s1.js → cursor-C2jyr1Tt.js} +1 -1
  183. package/lib/{cursor-transparent-BgDxhGZb.js → cursor-transparent-BaVE19A2.js} +1 -1
  184. package/lib/{cursor-transparent-DyUm_Gyl.mjs → cursor-transparent-ZUI7NwAo.mjs} +1 -1
  185. package/lib/{desktop-Donl6N-w.mjs → desktop-B1U1mc6q.mjs} +1 -1
  186. package/lib/{desktop-Dhc3ut6w.js → desktop-Dmz61Quh.js} +1 -1
  187. package/lib/{disconnect-BOkIc2nC.mjs → disconnect-8HUMogEY.mjs} +1 -1
  188. package/lib/{disconnect-BF1o-_4J.js → disconnect-Bn_0Td6c.js} +1 -1
  189. package/lib/{discord-Cr_4Cd1g.js → discord-4tBuPwio.js} +1 -1
  190. package/lib/{discord-3TAxBxMm.mjs → discord-DNMu-4pj.mjs} +1 -1
  191. package/lib/{etherscan-BdKsG3Bv.js → etherscan-CdfpxSFw.js} +1 -1
  192. package/lib/{etherscan-crtB48km.mjs → etherscan-DTafkFM9.mjs} +1 -1
  193. package/lib/{evm-BW-hVkAs.mjs → evm-B5SS0axR.mjs} +3 -3
  194. package/lib/{evm-BwVzzPhr.js → evm-BZKMUp6E.js} +3 -3
  195. package/lib/{exclamation-triangle-B8ouyGn5.mjs → exclamation-triangle-BLb5RCv9.mjs} +1 -1
  196. package/lib/{exclamation-triangle-CDWJ40KD.js → exclamation-triangle-W8wr4W3B.js} +1 -1
  197. package/lib/{extension-DdSvlDz-.js → extension-B3rp6j3f.js} +1 -1
  198. package/lib/{extension-CKbWDUFI.mjs → extension-DqXaH5V_.mjs} +1 -1
  199. package/lib/{external-link-DJvJgYIh.js → external-link-DWSOPcgR.js} +1 -1
  200. package/lib/{external-link-Ba6hY_g_.mjs → external-link-DupOMQca.mjs} +1 -1
  201. package/lib/{facebook-CFUYIcny.mjs → facebook-C25qgXgI.mjs} +1 -1
  202. package/lib/{facebook-A65A2Gkq.js → facebook-gaoSLwmV.js} +1 -1
  203. package/lib/{farcaster-BVmh2zDV.mjs → farcaster-BKQVbYft.mjs} +1 -1
  204. package/lib/{farcaster-qZSmV22m.js → farcaster-Dw_KFzSe.js} +1 -1
  205. package/lib/{filters-Uk-V5NfL.mjs → filters-BRj-u8fO.mjs} +1 -1
  206. package/lib/{filters-CNDKq3Qc.js → filters-BSv2GVWx.js} +1 -1
  207. package/lib/{github-CKyZTPiz.mjs → github-B8zYv5B1.mjs} +1 -1
  208. package/lib/{github-B34wWZJc.js → github-CVSqx81G.js} +1 -1
  209. package/lib/{google-D5l_b5at.mjs → google-CJy4jhj7.mjs} +1 -1
  210. package/lib/{google-CuY8LtEi.js → google-DWyFM_-_.js} +1 -1
  211. package/lib/{help-circle-B8yY3eo0.js → help-circle-BihX0QHp.js} +1 -1
  212. package/lib/{help-circle-CecVMIZq.mjs → help-circle-D2kyGnMD.mjs} +1 -1
  213. package/lib/hosted.js +1 -1
  214. package/lib/hosted.mjs +1 -1
  215. package/lib/{id-DTrVc-vC.mjs → id-BvDoX2i7.mjs} +1 -1
  216. package/lib/{id-DLcZPuZY.js → id-ZWI-bwNJ.js} +1 -1
  217. package/lib/{image-DTiFTFsi.mjs → image-BeWwKKKj.mjs} +1 -1
  218. package/lib/{image-Cwpi7jk6.js → image-CNQTgOF8.js} +1 -1
  219. package/lib/{index-CXkqbcY-.mjs → index-BXBTU3I5.mjs} +78 -78
  220. package/lib/{index-DoD0YukX.js → index-D2yjOpeA.js} +2 -2
  221. package/lib/{index-C8Ud7j_3.mjs → index-Dpl42t-y.mjs} +19180 -19176
  222. package/lib/index-DwMMfwYI.js +304 -0
  223. package/lib/{index.es-TJGl70mY.js → index.es-BvsB6Z8q.js} +1 -1
  224. package/lib/{index.es-DpOAk4i2.js → index.es-C2112Y2b.js} +1 -1
  225. package/lib/{index.es-CDEST0S7.mjs → index.es-C4KG3MSj.mjs} +1 -1
  226. package/lib/{index.es-BMIY5pYw.mjs → index.es-Cy_oFTNH.mjs} +3 -3
  227. package/lib/index.js +1 -1
  228. package/lib/index.mjs +1 -1
  229. package/lib/{info-DcQS8IpR.js → info-C73QOiqc.js} +1 -1
  230. package/lib/{info-t-enQ6Lr.mjs → info-CjKZyXW_.mjs} +1 -1
  231. package/lib/{info-circle-DT6JQVme.mjs → info-circle-CEpS6rzX.mjs} +1 -1
  232. package/lib/{info-circle-aXtdOOCE.js → info-circle-DE-EmffO.js} +1 -1
  233. package/lib/{lightbulb-CtbmuzLN.mjs → lightbulb-BVq3C-EG.mjs} +1 -1
  234. package/lib/{lightbulb-PXEUZBLD.js → lightbulb-Dm6Hsfd3.js} +1 -1
  235. package/lib/{mail-BeOHsaxl.mjs → mail-CqUQETIH.mjs} +1 -1
  236. package/lib/{mail-D9Wkb_fX.js → mail-GRon9tbg.js} +1 -1
  237. package/lib/{mobile-iCRio9M2.js → mobile-BmGmHmVh.js} +1 -1
  238. package/lib/{mobile-RJYQQ92x.mjs → mobile-CEbEFp0X.mjs} +1 -1
  239. package/lib/{more-CjmHuHR3.js → more-CnS-NcGa.js} +1 -1
  240. package/lib/{more-5fdnBWda.mjs → more-Cs0cmKvd.mjs} +1 -1
  241. package/lib/{network-placeholder-DfXy-pw6.js → network-placeholder-CjPyqfGa.js} +1 -1
  242. package/lib/{network-placeholder-xXksUrh5.mjs → network-placeholder-DYuB36S0.mjs} +1 -1
  243. package/lib/{nftPlaceholder-CsrQCxrs.mjs → nftPlaceholder-COJmgjQo.mjs} +1 -1
  244. package/lib/{nftPlaceholder-sAiBQkMk.js → nftPlaceholder-CoY2NOAz.js} +1 -1
  245. package/lib/{off-BqIL7yPu.js → off-B-WmBPpa.js} +1 -1
  246. package/lib/{off-BwM4HctO.mjs → off-CZo3LYgL.mjs} +1 -1
  247. package/lib/{play-store-CI-BG6p6.js → play-store-Chciiwp3.js} +1 -1
  248. package/lib/{play-store-DxNIHRp-.mjs → play-store-Edmxg3AX.mjs} +1 -1
  249. package/lib/{plus-C6x2EScU.js → plus-C93OSdaz.js} +1 -1
  250. package/lib/{plus-B7obWHt8.mjs → plus-D2jFkgs1.mjs} +1 -1
  251. package/lib/{qr-code-3DFC3Q4R.mjs → qr-code-c2tFySK0.mjs} +1 -1
  252. package/lib/{qr-code-DmjJRj0_.js → qr-code-y78Lk8wE.js} +1 -1
  253. package/lib/{recycle-horizontal-Bdxajrwe.mjs → recycle-horizontal-CWycpdDF.mjs} +1 -1
  254. package/lib/{recycle-horizontal-CG5av2fz.js → recycle-horizontal-PXk9BX3j.js} +1 -1
  255. package/lib/{refresh-Zr5AsEKU.mjs → refresh-C77_db2T.mjs} +1 -1
  256. package/lib/{refresh-Btbt-_sS.js → refresh-mky0B17c.js} +1 -1
  257. package/lib/{reown-logo-CR3PdJr3.mjs → reown-logo-0RkEf9EI.mjs} +1 -1
  258. package/lib/{reown-logo-CfO-XbUR.js → reown-logo-DceXhK36.js} +1 -1
  259. package/lib/{search-CSdDYgkF.mjs → search-BrMSW1-8.mjs} +1 -1
  260. package/lib/{search-CTbUM9lC.js → search-CWru3218.js} +1 -1
  261. package/lib/{secp256k1-BZjEFwP8.js → secp256k1-BU-UfBCB.js} +1 -1
  262. package/lib/{secp256k1-DWHMs4rw.mjs → secp256k1-C4P0dmMC.mjs} +1 -1
  263. package/lib/{secp256k1-DPqpw2CY.mjs → secp256k1-CI3_SM8F.mjs} +1 -1
  264. package/lib/{secp256k1-CnnROfkI.js → secp256k1-Cks0bicH.js} +1 -1
  265. package/lib/{send-B7xqmURU.js → send-CRyBVD1k.js} +1 -1
  266. package/lib/{send-DznbeEhx.mjs → send-DFkvxnIh.mjs} +1 -1
  267. package/lib/{solana-DLlqlTiO.js → solana-BVnMWq13.js} +14 -14
  268. package/lib/{solana-AxtnvbY3.mjs → solana-L02hbBDE.mjs} +387 -373
  269. package/lib/{solanaEmbed.esm-CAxFhfEV.js → solanaEmbed.esm-BG5cgKub.js} +1 -1
  270. package/lib/{solanaEmbed.esm-7UXGCmUk.mjs → solanaEmbed.esm-DSwNdsgx.mjs} +1 -1
  271. package/lib/src/utils/index.d.ts +1 -1
  272. package/lib/src/utils/index.d.ts.map +1 -1
  273. package/lib/src/utils/wallet/solana.d.ts.map +1 -1
  274. package/lib/src/views/v2/Bridge/AmountInput/index.d.ts.map +1 -1
  275. package/lib/src/views/v2/Redeem/TransactionDetails/index.d.ts.map +1 -1
  276. package/lib/src/views/v2/TxHistory/Item/index.d.ts.map +1 -1
  277. package/lib/{sui-hvPfY1xD.mjs → sui-CN1tZAOs.mjs} +1 -1
  278. package/lib/{sui-CBgZojMi.js → sui-Dv1p0XoG.js} +1 -1
  279. package/lib/{swapHorizontal-CD3pRzO9.js → swapHorizontal-BiCkAPre.js} +1 -1
  280. package/lib/{swapHorizontal-D794mX-0.mjs → swapHorizontal-Bo_-2U6j.mjs} +1 -1
  281. package/lib/{swapHorizontalBold-BNqV8D-B.mjs → swapHorizontalBold-BPL2XaSi.mjs} +1 -1
  282. package/lib/{swapHorizontalBold-DmkD9tJg.js → swapHorizontalBold-CWHbSIEu.js} +1 -1
  283. package/lib/{swapHorizontalMedium-mBKWLCjs.mjs → swapHorizontalMedium-CTsDFfzR.mjs} +1 -1
  284. package/lib/{swapHorizontalMedium-BAsprxHr.js → swapHorizontalMedium-D_2Z2Hfq.js} +1 -1
  285. package/lib/{swapHorizontalRoundedBold-TCs9zHMJ.mjs → swapHorizontalRoundedBold-8b5z2YJ_.mjs} +1 -1
  286. package/lib/{swapHorizontalRoundedBold-Bxkjq6qT.js → swapHorizontalRoundedBold-CDKFFagj.js} +1 -1
  287. package/lib/{swapVertical-DhTXBg3D.js → swapVertical-CNBatiM6.js} +1 -1
  288. package/lib/{swapVertical-l8Luks9S.mjs → swapVertical-UTCgpnIJ.mjs} +1 -1
  289. package/lib/{telegram-kWkcmqoP.mjs → telegram-CVvlgH_Z.mjs} +1 -1
  290. package/lib/{telegram-DL0uLP7b.js → telegram-lTj0r5My.js} +1 -1
  291. package/lib/{three-dots-DWHn78kh.js → three-dots-DQLgK82o.js} +1 -1
  292. package/lib/{three-dots-DrLoXyiQ.mjs → three-dots-KK4NyvR7.mjs} +1 -1
  293. package/lib/{tokens-BUz0LqoV.js → tokens-B2pmB4Ph.js} +1 -1
  294. package/lib/{tokens-CVWDocZl.mjs → tokens-BQHmitaT.mjs} +1 -1
  295. package/lib/{twitch-I4SDZ--W.mjs → twitch-CO4nmS5o.mjs} +1 -1
  296. package/lib/{twitch-DhKQH1oi.js → twitch-wV3Yc6kA.js} +1 -1
  297. package/lib/{twitterIcon-b32a7G08.mjs → twitterIcon-BU99IvD2.mjs} +1 -1
  298. package/lib/{twitterIcon-jhkqYcKG.js → twitterIcon-pCNPPny7.js} +1 -1
  299. package/lib/{verify-BHunOaoq.js → verify-B21LHiy7.js} +1 -1
  300. package/lib/{verify-BILic2OM.mjs → verify-Ci9XMhb8.mjs} +1 -1
  301. package/lib/{verify-filled-DaZqbtNa.js → verify-filled-DCMcHuAt.js} +1 -1
  302. package/lib/{verify-filled-DWED2hiA.mjs → verify-filled-LUtqUhbS.mjs} +1 -1
  303. package/lib/{w3m-modal-Cy1spBe9.mjs → w3m-modal-BJkuxcj8.mjs} +2 -2
  304. package/lib/{w3m-modal-FbJz8iZj.js → w3m-modal-DJRTg4Aa.js} +1 -1
  305. package/lib/{wallet-Bt7nP-Xo.js → wallet-BqBebKQF.js} +1 -1
  306. package/lib/{wallet-BcFzu16M.mjs → wallet-USpq1vKL.mjs} +1 -1
  307. package/lib/{wallet-placeholder-DgWC2b6z.mjs → wallet-placeholder-CL_evZUb.mjs} +1 -1
  308. package/lib/{wallet-placeholder-B4QUbZ9F.js → wallet-placeholder-Cf1u-2wB.js} +1 -1
  309. package/lib/{walletconnect-D0jqiSEY.mjs → walletconnect-3g5k3agX.mjs} +1 -1
  310. package/lib/{walletconnect-DJotTW4X.js → walletconnect-Da6ZdP8w.js} +1 -1
  311. package/lib/{warning-circle-Bj9uBvqX.mjs → warning-circle-B3ivLfCN.mjs} +1 -1
  312. package/lib/{warning-circle-B9it-2WD.js → warning-circle-CvTdOy7u.js} +1 -1
  313. package/lib/{x-uoxUEJo2.mjs → x-BOwtJrlH.mjs} +1 -1
  314. package/lib/{x-BLLVBVBO.js → x-DQCRmr2P.js} +1 -1
  315. package/package.json +1 -1
  316. package/dist/assets/index-Z3Xir6L3.js +0 -1
  317. package/dist/assets/index.es-3Tq6bjFW.js +0 -47
  318. package/dist/assets/index.es-CBqWEk7T.js +0 -15
  319. package/dist/assets/signer-BRan8q4C.js +0 -2
  320. package/dist/assets/solana-B3bc0p0T.js +0 -2
  321. package/dist/assets/solanaEmbed.esm-Mnq6o_qa.js +0 -10
  322. package/lib/constants-T5Vq_IiF.js +0 -1
  323. package/lib/index-BLJhpzbW.js +0 -304
@@ -1,10 +0,0 @@
1
- import{j as Vt,b as Ct,r as nr,cj as Nt,h as Sl,f as Me,d as vl,c as ln,P as so}from"../main.js";import{e as Al}from"./index.es-CBqWEk7T.js";import"./index-VWaDGczM.js";import"./index-Czf_KRcW.js";var it={},ht={},As=hn;hn.default=hn;hn.stable=Ts;hn.stableStringify=Ts;var Yn="[...]",Rs="[Circular]",Tt=[],vt=[];function Is(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function hn(e,t,n,r){typeof r>"u"&&(r=Is()),si(e,"",0,[],void 0,0,r);var i;try{vt.length===0?i=JSON.stringify(e,t,n):i=JSON.stringify(e,xs(t),n)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Tt.length!==0;){var o=Tt.pop();o.length===4?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return i}function kt(e,t,n,r){var i=Object.getOwnPropertyDescriptor(r,n);i.get!==void 0?i.configurable?(Object.defineProperty(r,n,{value:e}),Tt.push([r,n,t,i])):vt.push([t,n,e]):(r[n]=e,Tt.push([r,n,t]))}function si(e,t,n,r,i,o,s){o+=1;var a;if(typeof e=="object"&&e!==null){for(a=0;a<r.length;a++)if(r[a]===e){kt(Rs,e,t,i);return}if(typeof s.depthLimit<"u"&&o>s.depthLimit){kt(Yn,e,t,i);return}if(typeof s.edgesLimit<"u"&&n+1>s.edgesLimit){kt(Yn,e,t,i);return}if(r.push(e),Array.isArray(e))for(a=0;a<e.length;a++)si(e[a],a,a,r,e,o,s);else{var f=Object.keys(e);for(a=0;a<f.length;a++){var u=f[a];si(e[u],u,a,r,e,o,s)}}r.pop()}}function Rl(e,t){return e<t?-1:e>t?1:0}function Ts(e,t,n,r){typeof r>"u"&&(r=Is());var i=ai(e,"",0,[],void 0,0,r)||e,o;try{vt.length===0?o=JSON.stringify(i,t,n):o=JSON.stringify(i,xs(t),n)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Tt.length!==0;){var s=Tt.pop();s.length===4?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return o}function ai(e,t,n,r,i,o,s){o+=1;var a;if(typeof e=="object"&&e!==null){for(a=0;a<r.length;a++)if(r[a]===e){kt(Rs,e,t,i);return}try{if(typeof e.toJSON=="function")return}catch{return}if(typeof s.depthLimit<"u"&&o>s.depthLimit){kt(Yn,e,t,i);return}if(typeof s.edgesLimit<"u"&&n+1>s.edgesLimit){kt(Yn,e,t,i);return}if(r.push(e),Array.isArray(e))for(a=0;a<e.length;a++)ai(e[a],a,a,r,e,o,s);else{var f={},u=Object.keys(e).sort(Rl);for(a=0;a<u.length;a++){var g=u[a];ai(e[g],g,a,r,e,o,s),f[g]=e[g]}if(typeof i<"u")Tt.push([i,t,e]),i[t]=f;else return f}r.pop()}}function xs(e){return e=typeof e<"u"?e:function(t,n){return n},function(t,n){if(vt.length>0)for(var r=0;r<vt.length;r++){var i=vt[r];if(i[1]===t&&i[0]===n){n=i[2],vt.splice(r,1);break}}return e.call(this,t,n)}}const Il=Vt(As);Object.defineProperty(ht,"__esModule",{value:!0});ht.EthereumProviderError=ht.EthereumRpcError=void 0;const Tl=As;class Os extends Error{constructor(t,n,r){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!n||typeof n!="string")throw new Error('"message" must be a nonempty string.');super(n),this.code=t,r!==void 0&&(this.data=r)}serialize(){const t={code:this.code,message:this.message};return this.data!==void 0&&(t.data=this.data),this.stack&&(t.stack=this.stack),t}toString(){return Tl.default(this.serialize(),Cl,2)}}ht.EthereumRpcError=Os;class xl extends Os{constructor(t,n,r){if(!Ol(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,n,r)}}ht.EthereumProviderError=xl;function Ol(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}function Cl(e,t){if(t!=="[Circular]")return t}var Ii={},gt={};Object.defineProperty(gt,"__esModule",{value:!0});gt.errorValues=gt.errorCodes=void 0;gt.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}};gt.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=gt,n=ht,r=t.errorCodes.rpc.internal,i="Unspecified error message. This is a bug, please report it.",o={code:r,message:s(r)};e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function s(v,S=i){if(Number.isInteger(v)){const R=v.toString();if(p(t.errorValues,R))return t.errorValues[R].message;if(u(v))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return S}e.getMessageFromCode=s;function a(v){if(!Number.isInteger(v))return!1;const S=v.toString();return!!(t.errorValues[S]||u(v))}e.isValidCode=a;function f(v,{fallbackError:S=o,shouldIncludeStack:R=!1}={}){var h,w;if(!S||!Number.isInteger(S.code)||typeof S.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(v instanceof n.EthereumRpcError)return v.serialize();const y={};if(v&&typeof v=="object"&&!Array.isArray(v)&&p(v,"code")&&a(v.code)){const m=v;y.code=m.code,m.message&&typeof m.message=="string"?(y.message=m.message,p(m,"data")&&(y.data=m.data)):(y.message=s(y.code),y.data={originalError:g(v)})}else{y.code=S.code;const m=(h=v)===null||h===void 0?void 0:h.message;y.message=m&&typeof m=="string"?m:S.message,y.data={originalError:g(v)}}const x=(w=v)===null||w===void 0?void 0:w.stack;return R&&v&&x&&typeof x=="string"&&(y.stack=x),y}e.serializeError=f;function u(v){return v>=-32099&&v<=-32e3}function g(v){return v&&typeof v=="object"&&!Array.isArray(v)?Object.assign({},v):v}function p(v,S){return Object.prototype.hasOwnProperty.call(v,S)}})(Ii);var rr={};Object.defineProperty(rr,"__esModule",{value:!0});rr.ethErrors=void 0;const Ti=ht,Cs=Ii,ve=gt;rr.ethErrors={rpc:{parse:e=>Be(ve.errorCodes.rpc.parse,e),invalidRequest:e=>Be(ve.errorCodes.rpc.invalidRequest,e),invalidParams:e=>Be(ve.errorCodes.rpc.invalidParams,e),methodNotFound:e=>Be(ve.errorCodes.rpc.methodNotFound,e),internal:e=>Be(ve.errorCodes.rpc.internal,e),server:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return Be(t,e)},invalidInput:e=>Be(ve.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>Be(ve.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>Be(ve.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>Be(ve.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>Be(ve.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>Be(ve.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>on(ve.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>on(ve.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>on(ve.errorCodes.provider.unsupportedMethod,e),disconnected:e=>on(ve.errorCodes.provider.disconnected,e),chainDisconnected:e=>on(ve.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:n,data:r}=e;if(!n||typeof n!="string")throw new Error('"message" must be a nonempty string');return new Ti.EthereumProviderError(t,n,r)}}};function Be(e,t){const[n,r]=Ns(t);return new Ti.EthereumRpcError(e,n||Cs.getMessageFromCode(e),r)}function on(e,t){const[n,r]=Ns(t);return new Ti.EthereumProviderError(e,n||Cs.getMessageFromCode(e),r)}function Ns(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:n}=e;if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t||void 0,n]}}return[]}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const t=ht;Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return t.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return t.EthereumProviderError}});const n=Ii;Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return n.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return n.getMessageFromCode}});const r=rr;Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return r.ethErrors}});const i=gt;Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return i.errorCodes}})})(it);function gn(e){"@babel/helpers - typeof";return gn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gn(e)}function Nl(e,t){if(gn(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Pl(e){var t=Nl(e,"string");return gn(t)=="symbol"?t:t+""}function G(e,t,n){return(t=Pl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ao(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function je(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ao(Object(n),!0).forEach(function(r){G(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ao(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Ps={exports:{}},$r={exports:{}};let Ll=class extends Error{constructor(t){if(!Array.isArray(t))throw new TypeError(`Expected input to be an Array, got ${typeof t}`);let n="";for(let r=0;r<t.length;r++)n+=` ${t[r].stack}
2
- `;super(n),this.name="AggregateError",this.errors=t}};var he={AggregateError:Ll,ArrayIsArray(e){return Array.isArray(e)},ArrayPrototypeIncludes(e,t){return e.includes(t)},ArrayPrototypeIndexOf(e,t){return e.indexOf(t)},ArrayPrototypeJoin(e,t){return e.join(t)},ArrayPrototypeMap(e,t){return e.map(t)},ArrayPrototypePop(e,t){return e.pop(t)},ArrayPrototypePush(e,t){return e.push(t)},ArrayPrototypeSlice(e,t,n){return e.slice(t,n)},Error,FunctionPrototypeCall(e,t,...n){return e.call(t,...n)},FunctionPrototypeSymbolHasInstance(e,t){return Function.prototype[Symbol.hasInstance].call(e,t)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(e,t){return Object.defineProperties(e,t)},ObjectDefineProperty(e,t,n){return Object.defineProperty(e,t,n)},ObjectGetOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e,t)},ObjectKeys(e){return Object.keys(e)},ObjectSetPrototypeOf(e,t){return Object.setPrototypeOf(e,t)},Promise,PromisePrototypeCatch(e,t){return e.catch(t)},PromisePrototypeThen(e,t,n){return e.then(t,n)},PromiseReject(e){return Promise.reject(e)},PromiseResolve(e){return Promise.resolve(e)},ReflectApply:Reflect.apply,RegExpPrototypeTest(e,t){return e.test(t)},SafeSet:Set,String,StringPrototypeSlice(e,t,n){return e.slice(t,n)},StringPrototypeToLowerCase(e){return e.toLowerCase()},StringPrototypeToUpperCase(e){return e.toUpperCase()},StringPrototypeTrim(e){return e.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(e,t,n){return e.set(t,n)},Boolean,Uint8Array},Ls={exports:{}},Ms={format(e,...t){return e.replace(/%([sdifj])/g,function(...[n,r]){const i=t.shift();return r==="f"?i.toFixed(6):r==="j"?JSON.stringify(i):r==="s"&&typeof i=="object"?`${i.constructor!==Object?i.constructor.name:""} {}`.trim():i.toString()})},inspect(e){switch(typeof e){case"string":if(e.includes("'"))if(e.includes('"')){if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}else return`"${e}"`;return`'${e}'`;case"number":return isNaN(e)?"NaN":Object.is(e,-0)?String(e):e;case"bigint":return`${String(e)}n`;case"boolean":case"undefined":return String(e);case"object":return"{}"}}};const{format:Ml,inspect:Zn}=Ms,{AggregateError:Bl}=he,$l=globalThis.AggregateError||Bl,Dl=Symbol("kIsNodeError"),jl=["string","function","number","object","Function","Object","boolean","bigint","symbol"],kl=/^([A-Z][a-z0-9]*)+$/,Wl="__node_internal_",ir={};function Rt(e,t){if(!e)throw new ir.ERR_INTERNAL_ASSERTION(t)}function lo(e){let t="",n=e.length;const r=e[0]==="-"?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function Ul(e,t,n){if(typeof t=="function")return Rt(t.length<=n.length,`Code: ${e}; The provided arguments length (${n.length}) does not match the required ones (${t.length}).`),t(...n);const r=(t.match(/%[dfijoOs]/g)||[]).length;return Rt(r===n.length,`Code: ${e}; The provided arguments length (${n.length}) does not match the required ones (${r}).`),n.length===0?t:Ml(t,...n)}function Ee(e,t,n){n||(n=Error);class r extends n{constructor(...o){super(Ul(e,t,o))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(r.prototype,{name:{value:n.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),r.prototype.code=e,r.prototype[Dl]=!0,ir[e]=r}function uo(e){const t=Wl+e.name;return Object.defineProperty(e,"name",{value:t}),e}function Fl(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;const n=new $l([t,e],t.message);return n.code=t.code,n}return e||t}let Hl=class extends Error{constructor(t="The operation was aborted",n=void 0){if(n!==void 0&&typeof n!="object")throw new ir.ERR_INVALID_ARG_TYPE("options","Object",n);super(t,n),this.code="ABORT_ERR",this.name="AbortError"}};Ee("ERR_ASSERTION","%s",Error);Ee("ERR_INVALID_ARG_TYPE",(e,t,n)=>{Rt(typeof e=="string","'name' must be a string"),Array.isArray(t)||(t=[t]);let r="The ";e.endsWith(" argument")?r+=`${e} `:r+=`"${e}" ${e.includes(".")?"property":"argument"} `,r+="must be ";const i=[],o=[],s=[];for(const f of t)Rt(typeof f=="string","All expected entries have to be of type string"),jl.includes(f)?i.push(f.toLowerCase()):kl.test(f)?o.push(f):(Rt(f!=="object",'The value "object" should be written as "Object"'),s.push(f));if(o.length>0){const f=i.indexOf("object");f!==-1&&(i.splice(i,f,1),o.push("Object"))}if(i.length>0){switch(i.length){case 1:r+=`of type ${i[0]}`;break;case 2:r+=`one of type ${i[0]} or ${i[1]}`;break;default:{const f=i.pop();r+=`one of type ${i.join(", ")}, or ${f}`}}(o.length>0||s.length>0)&&(r+=" or ")}if(o.length>0){switch(o.length){case 1:r+=`an instance of ${o[0]}`;break;case 2:r+=`an instance of ${o[0]} or ${o[1]}`;break;default:{const f=o.pop();r+=`an instance of ${o.join(", ")}, or ${f}`}}s.length>0&&(r+=" or ")}switch(s.length){case 0:break;case 1:s[0].toLowerCase()!==s[0]&&(r+="an "),r+=`${s[0]}`;break;case 2:r+=`one of ${s[0]} or ${s[1]}`;break;default:{const f=s.pop();r+=`one of ${s.join(", ")}, or ${f}`}}if(n==null)r+=`. Received ${n}`;else if(typeof n=="function"&&n.name)r+=`. Received function ${n.name}`;else if(typeof n=="object"){var a;if((a=n.constructor)!==null&&a!==void 0&&a.name)r+=`. Received an instance of ${n.constructor.name}`;else{const f=Zn(n,{depth:-1});r+=`. Received ${f}`}}else{let f=Zn(n,{colors:!1});f.length>25&&(f=`${f.slice(0,25)}...`),r+=`. Received type ${typeof n} (${f})`}return r},TypeError);Ee("ERR_INVALID_ARG_VALUE",(e,t,n="is invalid")=>{let r=Zn(t);return r.length>128&&(r=r.slice(0,128)+"..."),`The ${e.includes(".")?"property":"argument"} '${e}' ${n}. Received ${r}`},TypeError);Ee("ERR_INVALID_RETURN_VALUE",(e,t,n)=>{var r;const i=n!=null&&(r=n.constructor)!==null&&r!==void 0&&r.name?`instance of ${n.constructor.name}`:`type ${typeof n}`;return`Expected ${e} to be returned from the "${t}" function but got ${i}.`},TypeError);Ee("ERR_MISSING_ARGS",(...e)=>{Rt(e.length>0,"At least one arg needs to be specified");let t;const n=e.length;switch(e=(Array.isArray(e)?e:[e]).map(r=>`"${r}"`).join(" or "),n){case 1:t+=`The ${e[0]} argument`;break;case 2:t+=`The ${e[0]} and ${e[1]} arguments`;break;default:{const r=e.pop();t+=`The ${e.join(", ")}, and ${r} arguments`}break}return`${t} must be specified`},TypeError);Ee("ERR_OUT_OF_RANGE",(e,t,n)=>{Rt(t,'Missing "range" argument');let r;if(Number.isInteger(n)&&Math.abs(n)>2**32)r=lo(String(n));else if(typeof n=="bigint"){r=String(n);const i=BigInt(2)**BigInt(32);(n>i||n<-i)&&(r=lo(r)),r+="n"}else r=Zn(n);return`The value of "${e}" is out of range. It must be ${t}. Received ${r}`},RangeError);Ee("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error);Ee("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error);Ee("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error);Ee("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error);Ee("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error);Ee("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Ee("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error);Ee("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error);Ee("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error);Ee("ERR_STREAM_WRITE_AFTER_END","write after end",Error);Ee("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError);var Ie={AbortError:Hl,aggregateTwoErrors:uo(Fl),hideStackFrames:uo,codes:ir},sn={exports:{}},fo;function pn(){if(fo)return sn.exports;fo=1;const{AbortController:e,AbortSignal:t}=typeof self<"u"?self:typeof window<"u"?window:void 0;return sn.exports=e,sn.exports.AbortSignal=t,sn.exports.default=e,sn.exports}(function(e){const t=Ct,{format:n,inspect:r}=Ms,{codes:{ERR_INVALID_ARG_TYPE:i}}=Ie,{kResistStopPropagation:o,AggregateError:s,SymbolDispose:a}=he,f=globalThis.AbortSignal||pn().AbortSignal,u=globalThis.AbortController||pn().AbortController,g=Object.getPrototypeOf(async function(){}).constructor,p=globalThis.Blob||t.Blob,v=typeof p<"u"?function(w){return w instanceof p}:function(w){return!1},S=(h,w)=>{if(h!==void 0&&(h===null||typeof h!="object"||!("aborted"in h)))throw new i(w,"AbortSignal",h)},R=(h,w)=>{if(typeof h!="function")throw new i(w,"Function",h)};e.exports={AggregateError:s,kEmptyObject:Object.freeze({}),once(h){let w=!1;return function(...y){w||(w=!0,h.apply(this,y))}},createDeferredPromise:function(){let h,w;return{promise:new Promise((x,m)=>{h=x,w=m}),resolve:h,reject:w}},promisify(h){return new Promise((w,y)=>{h((x,...m)=>x?y(x):w(...m))})},debuglog(){return function(){}},format:n,inspect:r,types:{isAsyncFunction(h){return h instanceof g},isArrayBufferView(h){return ArrayBuffer.isView(h)}},isBlob:v,deprecate(h,w){return h},addAbortListener:nr().addAbortListener||function(w,y){if(w===void 0)throw new i("signal","AbortSignal",w);S(w,"signal"),R(y,"listener");let x;return w.aborted?queueMicrotask(()=>y()):(w.addEventListener("abort",y,{__proto__:null,once:!0,[o]:!0}),x=()=>{w.removeEventListener("abort",y)}),{__proto__:null,[a](){var m;(m=x)===null||m===void 0||m()}}},AbortSignalAny:f.any||function(w){if(w.length===1)return w[0];const y=new u,x=()=>y.abort();return w.forEach(m=>{S(m,"signals"),m.addEventListener("abort",x,{once:!0})}),y.signal.addEventListener("abort",()=>{w.forEach(m=>m.removeEventListener("abort",x))},{once:!0}),y.signal}},e.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")})(Ls);var Ne=Ls.exports,xi={};const{ArrayIsArray:Bs,ArrayPrototypeIncludes:ql,ArrayPrototypeJoin:zl,ArrayPrototypeMap:Gl,NumberIsInteger:Oi,NumberIsNaN:Ch,NumberMAX_SAFE_INTEGER:Vl,NumberMIN_SAFE_INTEGER:Kl,NumberParseInt:Nh,ObjectPrototypeHasOwnProperty:Yl,RegExpPrototypeExec:Ph,String:Zl,StringPrototypeToUpperCase:Lh,StringPrototypeTrim:Mh}=he,{hideStackFrames:ke,codes:{ERR_SOCKET_BAD_PORT:Bh,ERR_INVALID_ARG_TYPE:We,ERR_INVALID_ARG_VALUE:$s,ERR_OUT_OF_RANGE:Ft,ERR_UNKNOWN_SIGNAL:$h}}=Ie,{normalizeEncoding:Dh}=Ne,{isAsyncFunction:Jl,isArrayBufferView:Xl}=Ne.types,Ql=ke((e,t,n=Kl,r=Vl)=>{if(typeof e!="number")throw new We(t,"number",e);if(!Oi(e))throw new Ft(t,"an integer",e);if(e<n||e>r)throw new Ft(t,`>= ${n} && <= ${r}`,e)});ke((e,t,n=-2147483648,r=2147483647)=>{if(typeof e!="number")throw new We(t,"number",e);if(!Oi(e))throw new Ft(t,"an integer",e);if(e<n||e>r)throw new Ft(t,`>= ${n} && <= ${r}`,e)});ke((e,t,n=!1)=>{if(typeof e!="number")throw new We(t,"number",e);if(!Oi(e))throw new Ft(t,"an integer",e);const r=n?1:0,i=4294967295;if(e<r||e>i)throw new Ft(t,`>= ${r} && <= ${i}`,e)});ke((e,t,n)=>{if(!ql(n,e)){const i="must be one of: "+zl(Gl(n,o=>typeof o=="string"?`'${o}'`:Zl(o)),", ");throw new $s(t,e,i)}});function eu(e,t){if(typeof e!="boolean")throw new We(t,"boolean",e)}function Dr(e,t,n){return e==null||!Yl(e,t)?n:e[t]}const tu=ke((e,t,n=null)=>{const r=Dr(n,"allowArray",!1),i=Dr(n,"allowFunction",!1);if(!Dr(n,"nullable",!1)&&e===null||!r&&Bs(e)||typeof e!="object"&&(!i||typeof e!="function"))throw new We(t,"Object",e)});ke((e,t)=>{if(e!=null&&typeof e!="object"&&typeof e!="function")throw new We(t,"a dictionary",e)});ke((e,t,n=0)=>{if(!Bs(e))throw new We(t,"Array",e);if(e.length<n){const r=`must be longer than ${n}`;throw new $s(t,e,r)}});ke((e,t="buffer")=>{if(!Xl(e))throw new We(t,["Buffer","TypedArray","DataView"],e)});const nu=ke((e,t)=>{if(e!==void 0&&(e===null||typeof e!="object"||!("aborted"in e)))throw new We(t,"AbortSignal",e)}),ru=ke((e,t)=>{if(typeof e!="function")throw new We(t,"Function",e)});ke((e,t)=>{if(typeof e!="function"||Jl(e))throw new We(t,"Function",e)});ke((e,t)=>{if(e!==void 0)throw new We(t,"undefined",e)});var yn={validateBoolean:eu,validateFunction:ru,validateInteger:Ql,validateObject:tu,validateAbortSignal:nu},Ci={exports:{}};const{SymbolAsyncIterator:co,SymbolIterator:ho,SymbolFor:Pt}=he,Ds=Pt("nodejs.stream.destroyed"),iu=Pt("nodejs.stream.errored"),go=Pt("nodejs.stream.readable"),po=Pt("nodejs.stream.writable"),ou=Pt("nodejs.stream.disturbed"),su=Pt("nodejs.webstream.isClosedPromise"),au=Pt("nodejs.webstream.controllerErrorFunction");function Ni(e,t=!1){var n;return!!(e&&typeof e.pipe=="function"&&typeof e.on=="function"&&(!t||typeof e.pause=="function"&&typeof e.resume=="function")&&(!e._writableState||((n=e._readableState)===null||n===void 0?void 0:n.readable)!==!1)&&(!e._writableState||e._readableState))}function or(e){var t;return!!(e&&typeof e.write=="function"&&typeof e.on=="function"&&(!e._readableState||((t=e._writableState)===null||t===void 0?void 0:t.writable)!==!1))}function lu(e){return!!(e&&typeof e.pipe=="function"&&e._readableState&&typeof e.on=="function"&&typeof e.write=="function")}function Ze(e){return e&&(e._readableState||e._writableState||typeof e.write=="function"&&typeof e.on=="function"||typeof e.pipe=="function"&&typeof e.on=="function")}function js(e){return!!(e&&!Ze(e)&&typeof e.pipeThrough=="function"&&typeof e.getReader=="function"&&typeof e.cancel=="function")}function ks(e){return!!(e&&!Ze(e)&&typeof e.getWriter=="function"&&typeof e.abort=="function")}function Ws(e){return!!(e&&!Ze(e)&&typeof e.readable=="object"&&typeof e.writable=="object")}function uu(e){return js(e)||ks(e)||Ws(e)}function fu(e,t){return e==null?!1:t===!0?typeof e[co]=="function":t===!1?typeof e[ho]=="function":typeof e[co]=="function"||typeof e[ho]=="function"}function sr(e){if(!Ze(e))return null;const t=e._writableState,n=e._readableState,r=t||n;return!!(e.destroyed||e[Ds]||r!=null&&r.destroyed)}function du(e){if(!or(e))return null;if(e.writableEnded===!0)return!0;const t=e._writableState;return t!=null&&t.errored?!1:typeof(t==null?void 0:t.ended)!="boolean"?null:t.ended}function cu(e,t){if(!or(e))return null;if(e.writableFinished===!0)return!0;const n=e._writableState;return n!=null&&n.errored?!1:typeof(n==null?void 0:n.finished)!="boolean"?null:!!(n.finished||t===!1&&n.ended===!0&&n.length===0)}function Us(e,t){if(!Ni(e))return null;const n=e._readableState;return n!=null&&n.errored?!1:typeof(n==null?void 0:n.endEmitted)!="boolean"?null:!!(n.endEmitted||t===!1&&n.ended===!0&&n.length===0)}function Fs(e){return e&&e[go]!=null?e[go]:typeof(e==null?void 0:e.readable)!="boolean"?null:sr(e)?!1:Ni(e)&&e.readable&&!Us(e)}function Hs(e){return e&&e[po]!=null?e[po]:typeof(e==null?void 0:e.writable)!="boolean"?null:sr(e)?!1:or(e)&&e.writable&&!du(e)}function hu(e,t){return Ze(e)?sr(e)?!0:!((t==null?void 0:t.readable)!==!1&&Fs(e)||(t==null?void 0:t.writable)!==!1&&Hs(e)):null}function gu(e){var t,n;return Ze(e)?e.writableErrored?e.writableErrored:(t=(n=e._writableState)===null||n===void 0?void 0:n.errored)!==null&&t!==void 0?t:null:null}function pu(e){var t,n;return Ze(e)?e.readableErrored?e.readableErrored:(t=(n=e._readableState)===null||n===void 0?void 0:n.errored)!==null&&t!==void 0?t:null:null}function bu(e){if(!Ze(e))return null;if(typeof e.closed=="boolean")return e.closed;const t=e._writableState,n=e._readableState;return typeof(t==null?void 0:t.closed)=="boolean"||typeof(n==null?void 0:n.closed)=="boolean"?(t==null?void 0:t.closed)||(n==null?void 0:n.closed):typeof e._closed=="boolean"&&qs(e)?e._closed:null}function qs(e){return typeof e._closed=="boolean"&&typeof e._defaultKeepAlive=="boolean"&&typeof e._removedConnection=="boolean"&&typeof e._removedContLen=="boolean"}function wu(e){return typeof e._sent100=="boolean"&&qs(e)}function yu(e){var t;return typeof e._consuming=="boolean"&&typeof e._dumped=="boolean"&&((t=e.req)===null||t===void 0?void 0:t.upgradeOrConnect)===void 0}function _u(e){if(!Ze(e))return null;const t=e._writableState,n=e._readableState,r=t||n;return!r&&wu(e)||!!(r&&r.autoDestroy&&r.emitClose&&r.closed===!1)}function mu(e){var t;return!!(e&&((t=e[ou])!==null&&t!==void 0?t:e.readableDidRead||e.readableAborted))}function Eu(e){var t,n,r,i,o,s,a,f,u,g;return!!(e&&((t=(n=(r=(i=(o=(s=e[iu])!==null&&s!==void 0?s:e.readableErrored)!==null&&o!==void 0?o:e.writableErrored)!==null&&i!==void 0?i:(a=e._readableState)===null||a===void 0?void 0:a.errorEmitted)!==null&&r!==void 0?r:(f=e._writableState)===null||f===void 0?void 0:f.errorEmitted)!==null&&n!==void 0?n:(u=e._readableState)===null||u===void 0?void 0:u.errored)!==null&&t!==void 0?t:!((g=e._writableState)===null||g===void 0)&&g.errored))}var at={isDestroyed:sr,kIsDestroyed:Ds,isDisturbed:mu,isErrored:Eu,isReadable:Fs,kIsClosedPromise:su,kControllerErrorFunction:au,isClosed:bu,isDuplexNodeStream:lu,isFinished:hu,isIterable:fu,isReadableNodeStream:Ni,isReadableStream:js,isReadableFinished:Us,isReadableErrored:pu,isNodeStream:Ze,isWebStream:uu,isWritable:Hs,isWritableNodeStream:or,isWritableStream:ks,isWritableFinished:cu,isWritableErrored:gu,isServerRequest:yu,willEmitClose:_u,isTransformStream:Ws};const dt=Nt,{AbortError:zs,codes:Su}=Ie,{ERR_INVALID_ARG_TYPE:vu,ERR_STREAM_PREMATURE_CLOSE:bo}=Su,{kEmptyObject:li,once:ui}=Ne,{validateAbortSignal:Au,validateFunction:Ru,validateObject:Iu,validateBoolean:Tu}=yn,{Promise:xu,PromisePrototypeThen:Ou,SymbolDispose:Gs}=he,{isClosed:Cu,isReadable:wo,isReadableNodeStream:jr,isReadableStream:Nu,isReadableFinished:yo,isReadableErrored:_o,isWritable:mo,isWritableNodeStream:Eo,isWritableStream:Pu,isWritableFinished:So,isWritableErrored:vo,isNodeStream:Lu,willEmitClose:Mu,kIsClosedPromise:Bu}=at;let Wt;function $u(e){return e.setHeader&&typeof e.abort=="function"}const fi=()=>{};function Vs(e,t,n){var r,i;if(arguments.length===2?(n=t,t=li):t==null?t=li:Iu(t,"options"),Ru(n,"callback"),Au(t.signal,"options.signal"),n=ui(n),Nu(e)||Pu(e))return Du(e,t,n);if(!Lu(e))throw new vu("stream",["ReadableStream","WritableStream","Stream"],e);const o=(r=t.readable)!==null&&r!==void 0?r:jr(e),s=(i=t.writable)!==null&&i!==void 0?i:Eo(e),a=e._writableState,f=e._readableState,u=()=>{e.writable||v()};let g=Mu(e)&&jr(e)===o&&Eo(e)===s,p=So(e,!1);const v=()=>{p=!0,e.destroyed&&(g=!1),!(g&&(!e.readable||o))&&(!o||S)&&n.call(e)};let S=yo(e,!1);const R=()=>{S=!0,e.destroyed&&(g=!1),!(g&&(!e.writable||s))&&(!s||p)&&n.call(e)},h=P=>{n.call(e,P)};let w=Cu(e);const y=()=>{w=!0;const P=vo(e)||_o(e);if(P&&typeof P!="boolean")return n.call(e,P);if(o&&!S&&jr(e,!0)&&!yo(e,!1))return n.call(e,new bo);if(s&&!p&&!So(e,!1))return n.call(e,new bo);n.call(e)},x=()=>{w=!0;const P=vo(e)||_o(e);if(P&&typeof P!="boolean")return n.call(e,P);n.call(e)},m=()=>{e.req.on("finish",v)};$u(e)?(e.on("complete",v),g||e.on("abort",y),e.req?m():e.on("request",m)):s&&!a&&(e.on("end",u),e.on("close",u)),!g&&typeof e.aborted=="boolean"&&e.on("aborted",y),e.on("end",R),e.on("finish",v),t.error!==!1&&e.on("error",h),e.on("close",y),w?dt.nextTick(y):a!=null&&a.errorEmitted||f!=null&&f.errorEmitted?g||dt.nextTick(x):(!o&&(!g||wo(e))&&(p||mo(e)===!1)||!s&&(!g||mo(e))&&(S||wo(e)===!1)||f&&e.req&&e.aborted)&&dt.nextTick(x);const j=()=>{n=fi,e.removeListener("aborted",y),e.removeListener("complete",v),e.removeListener("abort",y),e.removeListener("request",m),e.req&&e.req.removeListener("finish",v),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",v),e.removeListener("end",R),e.removeListener("error",h),e.removeListener("close",y)};if(t.signal&&!w){const P=()=>{const B=n;j(),B.call(e,new zs(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)dt.nextTick(P);else{Wt=Wt||Ne.addAbortListener;const B=Wt(t.signal,P),q=n;n=ui((...k)=>{B[Gs](),q.apply(e,k)})}}return j}function Du(e,t,n){let r=!1,i=fi;if(t.signal)if(i=()=>{r=!0,n.call(e,new zs(void 0,{cause:t.signal.reason}))},t.signal.aborted)dt.nextTick(i);else{Wt=Wt||Ne.addAbortListener;const s=Wt(t.signal,i),a=n;n=ui((...f)=>{s[Gs](),a.apply(e,f)})}const o=(...s)=>{r||dt.nextTick(()=>n.apply(e,s))};return Ou(e[Bu].promise,o,o),fi}function ju(e,t){var n;let r=!1;return t===null&&(t=li),(n=t)!==null&&n!==void 0&&n.cleanup&&(Tu(t.cleanup,"cleanup"),r=t.cleanup),new xu((i,o)=>{const s=Vs(e,t,a=>{r&&s(),a?o(a):i()})})}Ci.exports=Vs;Ci.exports.finished=ju;var pt=Ci.exports;const Ke=Nt,{aggregateTwoErrors:ku,codes:{ERR_MULTIPLE_CALLBACK:Wu},AbortError:Uu}=Ie,{Symbol:Ks}=he,{kIsDestroyed:Fu,isDestroyed:Hu,isFinished:qu,isServerRequest:zu}=at,Ys=Ks("kDestroy"),di=Ks("kConstruct");function Zs(e,t,n){e&&(e.stack,t&&!t.errored&&(t.errored=e),n&&!n.errored&&(n.errored=e))}function Gu(e,t){const n=this._readableState,r=this._writableState,i=r||n;return r!=null&&r.destroyed||n!=null&&n.destroyed?(typeof t=="function"&&t(),this):(Zs(e,r,n),r&&(r.destroyed=!0),n&&(n.destroyed=!0),i.constructed?Ao(this,e,t):this.once(Ys,function(o){Ao(this,ku(o,e),t)}),this)}function Ao(e,t,n){let r=!1;function i(o){if(r)return;r=!0;const s=e._readableState,a=e._writableState;Zs(o,a,s),a&&(a.closed=!0),s&&(s.closed=!0),typeof n=="function"&&n(o),o?Ke.nextTick(Vu,e,o):Ke.nextTick(Js,e)}try{e._destroy(t||null,i)}catch(o){i(o)}}function Vu(e,t){ci(e,t),Js(e)}function Js(e){const t=e._readableState,n=e._writableState;n&&(n.closeEmitted=!0),t&&(t.closeEmitted=!0),(n!=null&&n.emitClose||t!=null&&t.emitClose)&&e.emit("close")}function ci(e,t){const n=e._readableState,r=e._writableState;r!=null&&r.errorEmitted||n!=null&&n.errorEmitted||(r&&(r.errorEmitted=!0),n&&(n.errorEmitted=!0),e.emit("error",t))}function Ku(){const e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=e.readable===!1,e.endEmitted=e.readable===!1),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=t.writable===!1,t.ending=t.writable===!1,t.finished=t.writable===!1)}function hi(e,t,n){const r=e._readableState,i=e._writableState;if(i!=null&&i.destroyed||r!=null&&r.destroyed)return this;r!=null&&r.autoDestroy||i!=null&&i.autoDestroy?e.destroy(t):t&&(t.stack,i&&!i.errored&&(i.errored=t),r&&!r.errored&&(r.errored=t),n?Ke.nextTick(ci,e,t):ci(e,t))}function Yu(e,t){if(typeof e._construct!="function")return;const n=e._readableState,r=e._writableState;n&&(n.constructed=!1),r&&(r.constructed=!1),e.once(di,t),!(e.listenerCount(di)>1)&&Ke.nextTick(Zu,e)}function Zu(e){let t=!1;function n(r){if(t){hi(e,r??new Wu);return}t=!0;const i=e._readableState,o=e._writableState,s=o||i;i&&(i.constructed=!0),o&&(o.constructed=!0),s.destroyed?e.emit(Ys,r):r?hi(e,r,!0):Ke.nextTick(Ju,e)}try{e._construct(r=>{Ke.nextTick(n,r)})}catch(r){Ke.nextTick(n,r)}}function Ju(e){e.emit(di)}function Ro(e){return(e==null?void 0:e.setHeader)&&typeof e.abort=="function"}function Xs(e){e.emit("close")}function Xu(e,t){e.emit("error",t),Ke.nextTick(Xs,e)}function Qu(e,t){!e||Hu(e)||(!t&&!qu(e)&&(t=new Uu),zu(e)?(e.socket=null,e.destroy(t)):Ro(e)?e.abort():Ro(e.req)?e.req.abort():typeof e.destroy=="function"?e.destroy(t):typeof e.close=="function"?e.close():t?Ke.nextTick(Xu,e,t):Ke.nextTick(Xs,e),e.destroyed||(e[Fu]=!0))}var Kt={construct:Yu,destroyer:Qu,destroy:Gu,undestroy:Ku,errorOrDestroy:hi};const{ArrayIsArray:ef,ObjectSetPrototypeOf:Qs}=he,{EventEmitter:ar}=nr();function lr(e){ar.call(this,e)}Qs(lr.prototype,ar.prototype);Qs(lr,ar);lr.prototype.pipe=function(e,t){const n=this;function r(g){e.writable&&e.write(g)===!1&&n.pause&&n.pause()}n.on("data",r);function i(){n.readable&&n.resume&&n.resume()}e.on("drain",i),!e._isStdio&&(!t||t.end!==!1)&&(n.on("end",s),n.on("close",a));let o=!1;function s(){o||(o=!0,e.end())}function a(){o||(o=!0,typeof e.destroy=="function"&&e.destroy())}function f(g){u(),ar.listenerCount(this,"error")===0&&this.emit("error",g)}gi(n,"error",f),gi(e,"error",f);function u(){n.removeListener("data",r),e.removeListener("drain",i),n.removeListener("end",s),n.removeListener("close",a),n.removeListener("error",f),e.removeListener("error",f),n.removeListener("end",u),n.removeListener("close",u),e.removeListener("close",u)}return n.on("end",u),n.on("close",u),e.on("close",u),e.emit("pipe",n),e};function gi(e,t,n){if(typeof e.prependListener=="function")return e.prependListener(t,n);!e._events||!e._events[t]?e.on(t,n):ef(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]}var Pi={Stream:lr,prependListener:gi},ea={exports:{}};(function(e){const{SymbolDispose:t}=he,{AbortError:n,codes:r}=Ie,{isNodeStream:i,isWebStream:o,kControllerErrorFunction:s}=at,a=pt,{ERR_INVALID_ARG_TYPE:f}=r;let u;const g=(p,v)=>{if(typeof p!="object"||!("aborted"in p))throw new f(v,"AbortSignal",p)};e.exports.addAbortSignal=function(v,S){if(g(v,"signal"),!i(S)&&!o(S))throw new f("stream",["ReadableStream","WritableStream","Stream"],S);return e.exports.addAbortSignalNoValidate(v,S)},e.exports.addAbortSignalNoValidate=function(p,v){if(typeof p!="object"||!("aborted"in p))return v;const S=i(v)?()=>{v.destroy(new n(void 0,{cause:p.reason}))}:()=>{v[s](new n(void 0,{cause:p.reason}))};if(p.aborted)S();else{u=u||Ne.addAbortListener;const R=u(p,S);a(v,R[t])}return v}})(ea);var ur=ea.exports;const{StringPrototypeSlice:Io,SymbolIterator:tf,TypedArrayPrototypeSet:jn,Uint8Array:nf}=he,{Buffer:kr}=Ct,{inspect:rf}=Ne;var of=class{constructor(){this.head=null,this.tail=null,this.length=0}push(t){const n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}unshift(t){const n={data:t,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}shift(){if(this.length===0)return;const t=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,t}clear(){this.head=this.tail=null,this.length=0}join(t){if(this.length===0)return"";let n=this.head,r=""+n.data;for(;(n=n.next)!==null;)r+=t+n.data;return r}concat(t){if(this.length===0)return kr.alloc(0);const n=kr.allocUnsafe(t>>>0);let r=this.head,i=0;for(;r;)jn(n,r.data,i),i+=r.data.length,r=r.next;return n}consume(t,n){const r=this.head.data;if(t<r.length){const i=r.slice(0,t);return this.head.data=r.slice(t),i}return t===r.length?this.shift():n?this._getString(t):this._getBuffer(t)}first(){return this.head.data}*[tf](){for(let t=this.head;t;t=t.next)yield t.data}_getString(t){let n="",r=this.head,i=0;do{const o=r.data;if(t>o.length)n+=o,t-=o.length;else{t===o.length?(n+=o,++i,r.next?this.head=r.next:this.head=this.tail=null):(n+=Io(o,0,t),this.head=r,r.data=Io(o,t));break}++i}while((r=r.next)!==null);return this.length-=i,n}_getBuffer(t){const n=kr.allocUnsafe(t),r=t;let i=this.head,o=0;do{const s=i.data;if(t>s.length)jn(n,s,r-t),t-=s.length;else{t===s.length?(jn(n,s,r-t),++o,i.next?this.head=i.next:this.head=this.tail=null):(jn(n,new nf(s.buffer,s.byteOffset,t),r-t),this.head=i,i.data=s.slice(t));break}++o}while((i=i.next)!==null);return this.length-=o,n}[Symbol.for("nodejs.util.inspect.custom")](t,n){return rf(this,{...n,depth:0,customInspect:!1})}};const{MathFloor:sf,NumberIsInteger:af}=he,{validateInteger:lf}=yn,{ERR_INVALID_ARG_VALUE:uf}=Ie.codes;let ta=16*1024,na=16;function ff(e,t,n){return e.highWaterMark!=null?e.highWaterMark:t?e[n]:null}function ra(e){return e?na:ta}function df(e,t){lf(t,"value",0),e?na=t:ta=t}function cf(e,t,n,r){const i=ff(t,r,n);if(i!=null){if(!af(i)||i<0){const o=r?`options.${n}`:"options.highWaterMark";throw new uf(o,i)}return sf(i)}return ra(e.objectMode)}var fr={getHighWaterMark:cf,getDefaultHighWaterMark:ra,setDefaultHighWaterMark:df};const To=Nt,{PromisePrototypeThen:hf,SymbolAsyncIterator:xo,SymbolIterator:Oo}=he,{Buffer:gf}=Ct,{ERR_INVALID_ARG_TYPE:pf,ERR_STREAM_NULL_VALUES:bf}=Ie.codes;function wf(e,t,n){let r;if(typeof t=="string"||t instanceof gf)return new e({objectMode:!0,...n,read(){this.push(t),this.push(null)}});let i;if(t&&t[xo])i=!0,r=t[xo]();else if(t&&t[Oo])i=!1,r=t[Oo]();else throw new pf("iterable",["Iterable"],t);const o=new e({objectMode:!0,highWaterMark:1,...n});let s=!1;o._read=function(){s||(s=!0,f())},o._destroy=function(u,g){hf(a(u),()=>To.nextTick(g,u),p=>To.nextTick(g,p||u))};async function a(u){const g=u!=null,p=typeof r.throw=="function";if(g&&p){const{value:v,done:S}=await r.throw(u);if(await v,S)return}if(typeof r.return=="function"){const{value:v}=await r.return();await v}}async function f(){for(;;){try{const{value:u,done:g}=i?await r.next():r.next();if(g)o.push(null);else{const p=u&&typeof u.then=="function"?await u:u;if(p===null)throw s=!1,new bf;if(o.push(p))continue;s=!1}}catch(u){o.destroy(u)}break}}return o}var ia=wf,Wr,Co;function dr(){if(Co)return Wr;Co=1;const e=Nt,{ArrayPrototypeIndexOf:t,NumberIsInteger:n,NumberIsNaN:r,NumberParseInt:i,ObjectDefineProperties:o,ObjectKeys:s,ObjectSetPrototypeOf:a,Promise:f,SafeSet:u,SymbolAsyncDispose:g,SymbolAsyncIterator:p,Symbol:v}=he;Wr=Y,Y.ReadableState=Pe;const{EventEmitter:S}=nr(),{Stream:R,prependListener:h}=Pi,{Buffer:w}=Ct,{addAbortSignal:y}=ur,x=pt;let m=Ne.debuglog("stream",l=>{m=l});const j=of,P=Kt,{getHighWaterMark:B,getDefaultHighWaterMark:q}=fr,{aggregateTwoErrors:k,codes:{ERR_INVALID_ARG_TYPE:X,ERR_METHOD_NOT_IMPLEMENTED:Z,ERR_OUT_OF_RANGE:$,ERR_STREAM_PUSH_AFTER_EOF:D,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:T},AbortError:ee}=Ie,{validateObject:I}=yn,C=v("kPaused"),{StringDecoder:F}=Sl(),K=ia;a(Y.prototype,R.prototype),a(Y,R);const V=()=>{},{errorOrDestroy:Q}=P,J=1,le=2,M=4,ne=8,ge=16,_e=32,be=64,Ae=128,Se=256,Te=512,Ue=1024,Re=2048,_=4096,E=8192,O=16384,W=32768,z=65536,oe=1<<17,fe=1<<18;function re(l){return{enumerable:!1,get(){return(this.state&l)!==0},set(c){c?this.state|=l:this.state&=~l}}}o(Pe.prototype,{objectMode:re(J),ended:re(le),endEmitted:re(M),reading:re(ne),constructed:re(ge),sync:re(_e),needReadable:re(be),emittedReadable:re(Ae),readableListening:re(Se),resumeScheduled:re(Te),errorEmitted:re(Ue),emitClose:re(Re),autoDestroy:re(_),destroyed:re(E),closed:re(O),closeEmitted:re(W),multiAwaitDrain:re(z),readingMore:re(oe),dataEmitted:re(fe)});function Pe(l,c,N){typeof N!="boolean"&&(N=c instanceof ot()),this.state=Re|_|ge|_e,l&&l.objectMode&&(this.state|=J),N&&l&&l.readableObjectMode&&(this.state|=J),this.highWaterMark=l?B(this,l,"readableHighWaterMark",N):q(!1),this.buffer=new j,this.length=0,this.pipes=[],this.flowing=null,this[C]=null,l&&l.emitClose===!1&&(this.state&=-2049),l&&l.autoDestroy===!1&&(this.state&=-4097),this.errored=null,this.defaultEncoding=l&&l.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,l&&l.encoding&&(this.decoder=new F(l.encoding),this.encoding=l.encoding)}function Y(l){if(!(this instanceof Y))return new Y(l);const c=this instanceof ot();this._readableState=new Pe(l,this,c),l&&(typeof l.read=="function"&&(this._read=l.read),typeof l.destroy=="function"&&(this._destroy=l.destroy),typeof l.construct=="function"&&(this._construct=l.construct),l.signal&&!c&&y(l.signal,this)),R.call(this,l),P.construct(this,()=>{this._readableState.needReadable&&wt(this,this._readableState)})}Y.prototype.destroy=P.destroy,Y.prototype._undestroy=P.undestroy,Y.prototype._destroy=function(l,c){c(l)},Y.prototype[S.captureRejectionSymbol]=function(l){this.destroy(l)},Y.prototype[g]=function(){let l;return this.destroyed||(l=this.readableEnded?null:new ee,this.destroy(l)),new f((c,N)=>x(this,L=>L&&L!==l?N(L):c(null)))},Y.prototype.push=function(l,c){return me(this,l,c,!1)},Y.prototype.unshift=function(l,c){return me(this,l,c,!0)};function me(l,c,N,L){m("readableAddChunk",c);const U=l._readableState;let we;if(U.state&J||(typeof c=="string"?(N=N||U.defaultEncoding,U.encoding!==N&&(L&&U.encoding?c=w.from(c,N).toString(U.encoding):(c=w.from(c,N),N=""))):c instanceof w?N="":R._isUint8Array(c)?(c=R._uint8ArrayToBuffer(c),N=""):c!=null&&(we=new X("chunk",["string","Buffer","Uint8Array"],c))),we)Q(l,we);else if(c===null)U.state&=-9,$t(l,U);else if(U.state&J||c&&c.length>0)if(L)if(U.state&M)Q(l,new T);else{if(U.destroyed||U.errored)return!1;Bt(l,U,c,!0)}else if(U.ended)Q(l,new D);else{if(U.destroyed||U.errored)return!1;U.state&=-9,U.decoder&&!N?(c=U.decoder.write(c),U.objectMode||c.length!==0?Bt(l,U,c,!1):wt(l,U)):Bt(l,U,c,!1)}else L||(U.state&=-9,wt(l,U));return!U.ended&&(U.length<U.highWaterMark||U.length===0)}function Bt(l,c,N,L){c.flowing&&c.length===0&&!c.sync&&l.listenerCount("data")>0?(c.state&z?c.awaitDrainWriters.clear():c.awaitDrainWriters=null,c.dataEmitted=!0,l.emit("data",N)):(c.length+=c.objectMode?1:N.length,L?c.buffer.unshift(N):c.buffer.push(N),c.state&be&&bt(l)),wt(l,c)}Y.prototype.isPaused=function(){const l=this._readableState;return l[C]===!0||l.flowing===!1},Y.prototype.setEncoding=function(l){const c=new F(l);this._readableState.decoder=c,this._readableState.encoding=this._readableState.decoder.encoding;const N=this._readableState.buffer;let L="";for(const U of N)L+=c.write(U);return N.clear(),L!==""&&N.push(L),this._readableState.length=L.length,this};const vn=1073741824;function Er(l){if(l>vn)throw new $("size","<= 1GiB",l);return l--,l|=l>>>1,l|=l>>>2,l|=l>>>4,l|=l>>>8,l|=l>>>16,l++,l}function An(l,c){return l<=0||c.length===0&&c.ended?0:c.state&J?1:r(l)?c.flowing&&c.length?c.buffer.first().length:c.length:l<=c.length?l:c.ended?c.length:0}Y.prototype.read=function(l){m("read",l),l===void 0?l=NaN:n(l)||(l=i(l,10));const c=this._readableState,N=l;if(l>c.highWaterMark&&(c.highWaterMark=Er(l)),l!==0&&(c.state&=-129),l===0&&c.needReadable&&((c.highWaterMark!==0?c.length>=c.highWaterMark:c.length>0)||c.ended))return m("read: emitReadable",c.length,c.ended),c.length===0&&c.ended?Xt(this):bt(this),null;if(l=An(l,c),l===0&&c.ended)return c.length===0&&Xt(this),null;let L=(c.state&be)!==0;if(m("need readable",L),(c.length===0||c.length-l<c.highWaterMark)&&(L=!0,m("length less than watermark",L)),c.ended||c.reading||c.destroyed||c.errored||!c.constructed)L=!1,m("reading, ended or constructing",L);else if(L){m("do read"),c.state|=ne|_e,c.length===0&&(c.state|=be);try{this._read(c.highWaterMark)}catch(we){Q(this,we)}c.state&=-33,c.reading||(l=An(N,c))}let U;return l>0?U=lt(l,c):U=null,U===null?(c.needReadable=c.length<=c.highWaterMark,l=0):(c.length-=l,c.multiAwaitDrain?c.awaitDrainWriters.clear():c.awaitDrainWriters=null),c.length===0&&(c.ended||(c.needReadable=!0),N!==l&&c.ended&&Xt(this)),U!==null&&!c.errorEmitted&&!c.closeEmitted&&(c.dataEmitted=!0,this.emit("data",U)),U};function $t(l,c){if(m("onEofChunk"),!c.ended){if(c.decoder){const N=c.decoder.end();N&&N.length&&(c.buffer.push(N),c.length+=c.objectMode?1:N.length)}c.ended=!0,c.sync?bt(l):(c.needReadable=!1,c.emittedReadable=!0,Zt(l))}}function bt(l){const c=l._readableState;m("emitReadable",c.needReadable,c.emittedReadable),c.needReadable=!1,c.emittedReadable||(m("emitReadable",c.flowing),c.emittedReadable=!0,e.nextTick(Zt,l))}function Zt(l){const c=l._readableState;m("emitReadable_",c.destroyed,c.length,c.ended),!c.destroyed&&!c.errored&&(c.length||c.ended)&&(l.emit("readable"),c.emittedReadable=!1),c.needReadable=!c.flowing&&!c.ended&&c.length<=c.highWaterMark,Jt(l)}function wt(l,c){!c.readingMore&&c.constructed&&(c.readingMore=!0,e.nextTick(Rn,l,c))}function Rn(l,c){for(;!c.reading&&!c.ended&&(c.length<c.highWaterMark||c.flowing&&c.length===0);){const N=c.length;if(m("maybeReadMore read 0"),l.read(0),N===c.length)break}c.readingMore=!1}Y.prototype._read=function(l){throw new Z("_read()")},Y.prototype.pipe=function(l,c){const N=this,L=this._readableState;L.pipes.length===1&&(L.multiAwaitDrain||(L.multiAwaitDrain=!0,L.awaitDrainWriters=new u(L.awaitDrainWriters?[L.awaitDrainWriters]:[]))),L.pipes.push(l),m("pipe count=%d opts=%j",L.pipes.length,c);const we=(!c||c.end!==!1)&&l!==e.stdout&&l!==e.stderr?Cn:yt;L.endEmitted?e.nextTick(we):N.once("end",we),l.on("unpipe",xe);function xe(Qe,Fe){m("onunpipe"),Qe===N&&Fe&&Fe.hasUnpiped===!1&&(Fe.hasUnpiped=!0,Rr())}function Cn(){m("onend"),l.end()}let Oe,Nn=!1;function Rr(){m("cleanup"),l.removeListener("close",ze),l.removeListener("finish",tn),Oe&&l.removeListener("drain",Oe),l.removeListener("error",en),l.removeListener("unpipe",xe),N.removeListener("end",Cn),N.removeListener("end",yt),N.removeListener("data",Ln),Nn=!0,Oe&&L.awaitDrainWriters&&(!l._writableState||l._writableState.needDrain)&&Oe()}function Pn(){Nn||(L.pipes.length===1&&L.pipes[0]===l?(m("false write response, pause",0),L.awaitDrainWriters=l,L.multiAwaitDrain=!1):L.pipes.length>1&&L.pipes.includes(l)&&(m("false write response, pause",L.awaitDrainWriters.size),L.awaitDrainWriters.add(l)),N.pause()),Oe||(Oe=Sr(N,l),l.on("drain",Oe))}N.on("data",Ln);function Ln(Qe){m("ondata");const Fe=l.write(Qe);m("dest.write",Fe),Fe===!1&&Pn()}function en(Qe){if(m("onerror",Qe),yt(),l.removeListener("error",en),l.listenerCount("error")===0){const Fe=l._writableState||l._readableState;Fe&&!Fe.errorEmitted?Q(l,Qe):l.emit("error",Qe)}}h(l,"error",en);function ze(){l.removeListener("finish",tn),yt()}l.once("close",ze);function tn(){m("onfinish"),l.removeListener("close",ze),yt()}l.once("finish",tn);function yt(){m("unpipe"),N.unpipe(l)}return l.emit("pipe",N),l.writableNeedDrain===!0?Pn():L.flowing||(m("pipe resume"),N.resume()),l};function Sr(l,c){return function(){const L=l._readableState;L.awaitDrainWriters===c?(m("pipeOnDrain",1),L.awaitDrainWriters=null):L.multiAwaitDrain&&(m("pipeOnDrain",L.awaitDrainWriters.size),L.awaitDrainWriters.delete(c)),(!L.awaitDrainWriters||L.awaitDrainWriters.size===0)&&l.listenerCount("data")&&l.resume()}}Y.prototype.unpipe=function(l){const c=this._readableState,N={hasUnpiped:!1};if(c.pipes.length===0)return this;if(!l){const U=c.pipes;c.pipes=[],this.pause();for(let we=0;we<U.length;we++)U[we].emit("unpipe",this,{hasUnpiped:!1});return this}const L=t(c.pipes,l);return L===-1?this:(c.pipes.splice(L,1),c.pipes.length===0&&this.pause(),l.emit("unpipe",this,N),this)},Y.prototype.on=function(l,c){const N=R.prototype.on.call(this,l,c),L=this._readableState;return l==="data"?(L.readableListening=this.listenerCount("readable")>0,L.flowing!==!1&&this.resume()):l==="readable"&&!L.endEmitted&&!L.readableListening&&(L.readableListening=L.needReadable=!0,L.flowing=!1,L.emittedReadable=!1,m("on readable",L.length,L.reading),L.length?bt(this):L.reading||e.nextTick(Je,this)),N},Y.prototype.addListener=Y.prototype.on,Y.prototype.removeListener=function(l,c){const N=R.prototype.removeListener.call(this,l,c);return l==="readable"&&e.nextTick(In,this),N},Y.prototype.off=Y.prototype.removeListener,Y.prototype.removeAllListeners=function(l){const c=R.prototype.removeAllListeners.apply(this,arguments);return(l==="readable"||l===void 0)&&e.nextTick(In,this),c};function In(l){const c=l._readableState;c.readableListening=l.listenerCount("readable")>0,c.resumeScheduled&&c[C]===!1?c.flowing=!0:l.listenerCount("data")>0?l.resume():c.readableListening||(c.flowing=null)}function Je(l){m("readable nexttick read 0"),l.read(0)}Y.prototype.resume=function(){const l=this._readableState;return l.flowing||(m("resume"),l.flowing=!l.readableListening,Dt(this,l)),l[C]=!1,this};function Dt(l,c){c.resumeScheduled||(c.resumeScheduled=!0,e.nextTick(vr,l,c))}function vr(l,c){m("resume",c.reading),c.reading||l.read(0),c.resumeScheduled=!1,l.emit("resume"),Jt(l),c.flowing&&!c.reading&&l.read(0)}Y.prototype.pause=function(){return m("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(m("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[C]=!0,this};function Jt(l){const c=l._readableState;for(m("flow",c.flowing);c.flowing&&l.read()!==null;);}Y.prototype.wrap=function(l){let c=!1;l.on("data",L=>{!this.push(L)&&l.pause&&(c=!0,l.pause())}),l.on("end",()=>{this.push(null)}),l.on("error",L=>{Q(this,L)}),l.on("close",()=>{this.destroy()}),l.on("destroy",()=>{this.destroy()}),this._read=()=>{c&&l.resume&&(c=!1,l.resume())};const N=s(l);for(let L=1;L<N.length;L++){const U=N[L];this[U]===void 0&&typeof l[U]=="function"&&(this[U]=l[U].bind(l))}return this},Y.prototype[p]=function(){return Tn(this)},Y.prototype.iterator=function(l){return l!==void 0&&I(l,"options"),Tn(this,l)};function Tn(l,c){typeof l.read!="function"&&(l=Y.wrap(l,{objectMode:!0}));const N=xn(l,c);return N.stream=l,N}async function*xn(l,c){let N=V;function L(xe){this===l?(N(),N=V):N=xe}l.on("readable",L);let U;const we=x(l,{writable:!1},xe=>{U=xe?k(U,xe):null,N(),N=V});try{for(;;){const xe=l.destroyed?null:l.read();if(xe!==null)yield xe;else{if(U)throw U;if(U===null)return;await new f(L)}}}catch(xe){throw U=k(U,xe),U}finally{(U||(c==null?void 0:c.destroyOnReturn)!==!1)&&(U===void 0||l._readableState.autoDestroy)?P.destroyer(l,null):(l.off("readable",L),we())}}o(Y.prototype,{readable:{__proto__:null,get(){const l=this._readableState;return!!l&&l.readable!==!1&&!l.destroyed&&!l.errorEmitted&&!l.endEmitted},set(l){this._readableState&&(this._readableState.readable=!!l)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(l){this._readableState&&(this._readableState.flowing=l)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(l){this._readableState&&(this._readableState.destroyed=l)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),o(Pe.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[C]!==!1},set(l){this[C]=!!l}}}),Y._fromList=lt;function lt(l,c){if(c.length===0)return null;let N;return c.objectMode?N=c.buffer.shift():!l||l>=c.length?(c.decoder?N=c.buffer.join(""):c.buffer.length===1?N=c.buffer.first():N=c.buffer.concat(c.length),c.buffer.clear()):N=c.buffer.consume(l,c.decoder),N}function Xt(l){const c=l._readableState;m("endReadable",c.endEmitted),c.endEmitted||(c.ended=!0,e.nextTick(Xe,c,l))}function Xe(l,c){if(m("endReadableNT",l.endEmitted,l.length),!l.errored&&!l.closeEmitted&&!l.endEmitted&&l.length===0){if(l.endEmitted=!0,c.emit("end"),c.writable&&c.allowHalfOpen===!1)e.nextTick(Ar,c);else if(l.autoDestroy){const N=c._writableState;(!N||N.autoDestroy&&(N.finished||N.writable===!1))&&c.destroy()}}}function Ar(l){l.writable&&!l.writableEnded&&!l.destroyed&&l.end()}Y.from=function(l,c){return K(Y,l,c)};let Qt;function On(){return Qt===void 0&&(Qt={}),Qt}return Y.fromWeb=function(l,c){return On().newStreamReadableFromReadableStream(l,c)},Y.toWeb=function(l,c){return On().newReadableStreamFromStreamReadable(l,c)},Y.wrap=function(l,c){var N,L;return new Y({objectMode:(N=(L=l.readableObjectMode)!==null&&L!==void 0?L:l.objectMode)!==null&&N!==void 0?N:!0,...c,destroy(U,we){P.destroyer(l,U),we(U)}}).wrap(l)},Wr}var Ur,No;function Li(){if(No)return Ur;No=1;const e=Nt,{ArrayPrototypeSlice:t,Error:n,FunctionPrototypeSymbolHasInstance:r,ObjectDefineProperty:i,ObjectDefineProperties:o,ObjectSetPrototypeOf:s,StringPrototypeToLowerCase:a,Symbol:f,SymbolHasInstance:u}=he;Ur=I,I.WritableState=T;const{EventEmitter:g}=nr(),p=Pi.Stream,{Buffer:v}=Ct,S=Kt,{addAbortSignal:R}=ur,{getHighWaterMark:h,getDefaultHighWaterMark:w}=fr,{ERR_INVALID_ARG_TYPE:y,ERR_METHOD_NOT_IMPLEMENTED:x,ERR_MULTIPLE_CALLBACK:m,ERR_STREAM_CANNOT_PIPE:j,ERR_STREAM_DESTROYED:P,ERR_STREAM_ALREADY_FINISHED:B,ERR_STREAM_NULL_VALUES:q,ERR_STREAM_WRITE_AFTER_END:k,ERR_UNKNOWN_ENCODING:X}=Ie.codes,{errorOrDestroy:Z}=S;s(I.prototype,p.prototype),s(I,p);function $(){}const D=f("kOnFinished");function T(_,E,O){typeof O!="boolean"&&(O=E instanceof ot()),this.objectMode=!!(_&&_.objectMode),O&&(this.objectMode=this.objectMode||!!(_&&_.writableObjectMode)),this.highWaterMark=_?h(this,_,"writableHighWaterMark",O):w(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const W=!!(_&&_.decodeStrings===!1);this.decodeStrings=!W,this.defaultEncoding=_&&_.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=Q.bind(void 0,E),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,ee(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!_||_.emitClose!==!1,this.autoDestroy=!_||_.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[D]=[]}function ee(_){_.buffered=[],_.bufferedIndex=0,_.allBuffers=!0,_.allNoop=!0}T.prototype.getBuffer=function(){return t(this.buffered,this.bufferedIndex)},i(T.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function I(_){const E=this instanceof ot();if(!E&&!r(I,this))return new I(_);this._writableState=new T(_,this,E),_&&(typeof _.write=="function"&&(this._write=_.write),typeof _.writev=="function"&&(this._writev=_.writev),typeof _.destroy=="function"&&(this._destroy=_.destroy),typeof _.final=="function"&&(this._final=_.final),typeof _.construct=="function"&&(this._construct=_.construct),_.signal&&R(_.signal,this)),p.call(this,_),S.construct(this,()=>{const O=this._writableState;O.writing||ne(this,O),Ae(this,O)})}i(I,u,{__proto__:null,value:function(_){return r(this,_)?!0:this!==I?!1:_&&_._writableState instanceof T}}),I.prototype.pipe=function(){Z(this,new j)};function C(_,E,O,W){const z=_._writableState;if(typeof O=="function")W=O,O=z.defaultEncoding;else{if(!O)O=z.defaultEncoding;else if(O!=="buffer"&&!v.isEncoding(O))throw new X(O);typeof W!="function"&&(W=$)}if(E===null)throw new q;if(!z.objectMode)if(typeof E=="string")z.decodeStrings!==!1&&(E=v.from(E,O),O="buffer");else if(E instanceof v)O="buffer";else if(p._isUint8Array(E))E=p._uint8ArrayToBuffer(E),O="buffer";else throw new y("chunk",["string","Buffer","Uint8Array"],E);let oe;return z.ending?oe=new k:z.destroyed&&(oe=new P("write")),oe?(e.nextTick(W,oe),Z(_,oe,!0),oe):(z.pendingcb++,F(_,z,E,O,W))}I.prototype.write=function(_,E,O){return C(this,_,E,O)===!0},I.prototype.cork=function(){this._writableState.corked++},I.prototype.uncork=function(){const _=this._writableState;_.corked&&(_.corked--,_.writing||ne(this,_))},I.prototype.setDefaultEncoding=function(E){if(typeof E=="string"&&(E=a(E)),!v.isEncoding(E))throw new X(E);return this._writableState.defaultEncoding=E,this};function F(_,E,O,W,z){const oe=E.objectMode?1:O.length;E.length+=oe;const fe=E.length<E.highWaterMark;return fe||(E.needDrain=!0),E.writing||E.corked||E.errored||!E.constructed?(E.buffered.push({chunk:O,encoding:W,callback:z}),E.allBuffers&&W!=="buffer"&&(E.allBuffers=!1),E.allNoop&&z!==$&&(E.allNoop=!1)):(E.writelen=oe,E.writecb=z,E.writing=!0,E.sync=!0,_._write(O,W,E.onwrite),E.sync=!1),fe&&!E.errored&&!E.destroyed}function K(_,E,O,W,z,oe,fe){E.writelen=W,E.writecb=fe,E.writing=!0,E.sync=!0,E.destroyed?E.onwrite(new P("write")):O?_._writev(z,E.onwrite):_._write(z,oe,E.onwrite),E.sync=!1}function V(_,E,O,W){--E.pendingcb,W(O),M(E),Z(_,O)}function Q(_,E){const O=_._writableState,W=O.sync,z=O.writecb;if(typeof z!="function"){Z(_,new m);return}O.writing=!1,O.writecb=null,O.length-=O.writelen,O.writelen=0,E?(E.stack,O.errored||(O.errored=E),_._readableState&&!_._readableState.errored&&(_._readableState.errored=E),W?e.nextTick(V,_,O,E,z):V(_,O,E,z)):(O.buffered.length>O.bufferedIndex&&ne(_,O),W?O.afterWriteTickInfo!==null&&O.afterWriteTickInfo.cb===z?O.afterWriteTickInfo.count++:(O.afterWriteTickInfo={count:1,cb:z,stream:_,state:O},e.nextTick(J,O.afterWriteTickInfo)):le(_,O,1,z))}function J({stream:_,state:E,count:O,cb:W}){return E.afterWriteTickInfo=null,le(_,E,O,W)}function le(_,E,O,W){for(!E.ending&&!_.destroyed&&E.length===0&&E.needDrain&&(E.needDrain=!1,_.emit("drain"));O-- >0;)E.pendingcb--,W();E.destroyed&&M(E),Ae(_,E)}function M(_){if(_.writing)return;for(let z=_.bufferedIndex;z<_.buffered.length;++z){var E;const{chunk:oe,callback:fe}=_.buffered[z],re=_.objectMode?1:oe.length;_.length-=re,fe((E=_.errored)!==null&&E!==void 0?E:new P("write"))}const O=_[D].splice(0);for(let z=0;z<O.length;z++){var W;O[z]((W=_.errored)!==null&&W!==void 0?W:new P("end"))}ee(_)}function ne(_,E){if(E.corked||E.bufferProcessing||E.destroyed||!E.constructed)return;const{buffered:O,bufferedIndex:W,objectMode:z}=E,oe=O.length-W;if(!oe)return;let fe=W;if(E.bufferProcessing=!0,oe>1&&_._writev){E.pendingcb-=oe-1;const re=E.allNoop?$:Y=>{for(let me=fe;me<O.length;++me)O[me].callback(Y)},Pe=E.allNoop&&fe===0?O:t(O,fe);Pe.allBuffers=E.allBuffers,K(_,E,!0,E.length,Pe,"",re),ee(E)}else{do{const{chunk:re,encoding:Pe,callback:Y}=O[fe];O[fe++]=null;const me=z?1:re.length;K(_,E,!1,me,re,Pe,Y)}while(fe<O.length&&!E.writing);fe===O.length?ee(E):fe>256?(O.splice(0,fe),E.bufferedIndex=0):E.bufferedIndex=fe}E.bufferProcessing=!1}I.prototype._write=function(_,E,O){if(this._writev)this._writev([{chunk:_,encoding:E}],O);else throw new x("_write()")},I.prototype._writev=null,I.prototype.end=function(_,E,O){const W=this._writableState;typeof _=="function"?(O=_,_=null,E=null):typeof E=="function"&&(O=E,E=null);let z;if(_!=null){const oe=C(this,_,E);oe instanceof n&&(z=oe)}return W.corked&&(W.corked=1,this.uncork()),z||(!W.errored&&!W.ending?(W.ending=!0,Ae(this,W,!0),W.ended=!0):W.finished?z=new B("end"):W.destroyed&&(z=new P("end"))),typeof O=="function"&&(z||W.finished?e.nextTick(O,z):W[D].push(O)),this};function ge(_){return _.ending&&!_.destroyed&&_.constructed&&_.length===0&&!_.errored&&_.buffered.length===0&&!_.finished&&!_.writing&&!_.errorEmitted&&!_.closeEmitted}function _e(_,E){let O=!1;function W(z){if(O){Z(_,z??m());return}if(O=!0,E.pendingcb--,z){const oe=E[D].splice(0);for(let fe=0;fe<oe.length;fe++)oe[fe](z);Z(_,z,E.sync)}else ge(E)&&(E.prefinished=!0,_.emit("prefinish"),E.pendingcb++,e.nextTick(Se,_,E))}E.sync=!0,E.pendingcb++;try{_._final(W)}catch(z){W(z)}E.sync=!1}function be(_,E){!E.prefinished&&!E.finalCalled&&(typeof _._final=="function"&&!E.destroyed?(E.finalCalled=!0,_e(_,E)):(E.prefinished=!0,_.emit("prefinish")))}function Ae(_,E,O){ge(E)&&(be(_,E),E.pendingcb===0&&(O?(E.pendingcb++,e.nextTick((W,z)=>{ge(z)?Se(W,z):z.pendingcb--},_,E)):ge(E)&&(E.pendingcb++,Se(_,E))))}function Se(_,E){E.pendingcb--,E.finished=!0;const O=E[D].splice(0);for(let W=0;W<O.length;W++)O[W]();if(_.emit("finish"),E.autoDestroy){const W=_._readableState;(!W||W.autoDestroy&&(W.endEmitted||W.readable===!1))&&_.destroy()}}o(I.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(_){this._writableState&&(this._writableState.destroyed=_)}},writable:{__proto__:null,get(){const _=this._writableState;return!!_&&_.writable!==!1&&!_.destroyed&&!_.errored&&!_.ending&&!_.ended},set(_){this._writableState&&(this._writableState.writable=!!_)}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){const _=this._writableState;return _?!_.destroyed&&!_.ending&&_.needDrain:!1}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});const Te=S.destroy;I.prototype.destroy=function(_,E){const O=this._writableState;return!O.destroyed&&(O.bufferedIndex<O.buffered.length||O[D].length)&&e.nextTick(M,O),Te.call(this,_,E),this},I.prototype._undestroy=S.undestroy,I.prototype._destroy=function(_,E){E(_)},I.prototype[g.captureRejectionSymbol]=function(_){this.destroy(_)};let Ue;function Re(){return Ue===void 0&&(Ue={}),Ue}return I.fromWeb=function(_,E){return Re().newStreamWritableFromWritableStream(_,E)},I.toWeb=function(_){return Re().newWritableStreamFromStreamWritable(_)},Ur}var Fr,Po;function yf(){if(Po)return Fr;Po=1;const e=Nt,t=Ct,{isReadable:n,isWritable:r,isIterable:i,isNodeStream:o,isReadableNodeStream:s,isWritableNodeStream:a,isDuplexNodeStream:f,isReadableStream:u,isWritableStream:g}=at,p=pt,{AbortError:v,codes:{ERR_INVALID_ARG_TYPE:S,ERR_INVALID_RETURN_VALUE:R}}=Ie,{destroyer:h}=Kt,w=ot(),y=dr(),x=Li(),{createDeferredPromise:m}=Ne,j=ia,P=globalThis.Blob||t.Blob,B=typeof P<"u"?function(T){return T instanceof P}:function(T){return!1},q=globalThis.AbortController||pn().AbortController,{FunctionPrototypeCall:k}=he;class X extends w{constructor(T){super(T),(T==null?void 0:T.readable)===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),(T==null?void 0:T.writable)===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}Fr=function D(T,ee){if(f(T))return T;if(s(T))return $({readable:T});if(a(T))return $({writable:T});if(o(T))return $({writable:!1,readable:!1});if(u(T))return $({readable:y.fromWeb(T)});if(g(T))return $({writable:x.fromWeb(T)});if(typeof T=="function"){const{value:C,write:F,final:K,destroy:V}=Z(T);if(i(C))return j(X,C,{objectMode:!0,write:F,final:K,destroy:V});const Q=C==null?void 0:C.then;if(typeof Q=="function"){let J;const le=k(Q,C,M=>{if(M!=null)throw new R("nully","body",M)},M=>{h(J,M)});return J=new X({objectMode:!0,readable:!1,write:F,final(M){K(async()=>{try{await le,e.nextTick(M,null)}catch(ne){e.nextTick(M,ne)}})},destroy:V})}throw new R("Iterable, AsyncIterable or AsyncFunction",ee,C)}if(B(T))return D(T.arrayBuffer());if(i(T))return j(X,T,{objectMode:!0,writable:!1});if(u(T==null?void 0:T.readable)&&g(T==null?void 0:T.writable))return X.fromWeb(T);if(typeof(T==null?void 0:T.writable)=="object"||typeof(T==null?void 0:T.readable)=="object"){const C=T!=null&&T.readable?s(T==null?void 0:T.readable)?T==null?void 0:T.readable:D(T.readable):void 0,F=T!=null&&T.writable?a(T==null?void 0:T.writable)?T==null?void 0:T.writable:D(T.writable):void 0;return $({readable:C,writable:F})}const I=T==null?void 0:T.then;if(typeof I=="function"){let C;return k(I,T,F=>{F!=null&&C.push(F),C.push(null)},F=>{h(C,F)}),C=new X({objectMode:!0,writable:!1,read(){}})}throw new S(ee,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],T)};function Z(D){let{promise:T,resolve:ee}=m();const I=new q,C=I.signal;return{value:D(async function*(){for(;;){const K=T;T=null;const{chunk:V,done:Q,cb:J}=await K;if(e.nextTick(J),Q)return;if(C.aborted)throw new v(void 0,{cause:C.reason});({promise:T,resolve:ee}=m()),yield V}}(),{signal:C}),write(K,V,Q){const J=ee;ee=null,J({chunk:K,done:!1,cb:Q})},final(K){const V=ee;ee=null,V({done:!0,cb:K})},destroy(K,V){I.abort(),V(K)}}}function $(D){const T=D.readable&&typeof D.readable.read!="function"?y.wrap(D.readable):D.readable,ee=D.writable;let I=!!n(T),C=!!r(ee),F,K,V,Q,J;function le(M){const ne=Q;Q=null,ne?ne(M):M&&J.destroy(M)}return J=new X({readableObjectMode:!!(T!=null&&T.readableObjectMode),writableObjectMode:!!(ee!=null&&ee.writableObjectMode),readable:I,writable:C}),C&&(p(ee,M=>{C=!1,M&&h(T,M),le(M)}),J._write=function(M,ne,ge){ee.write(M,ne)?ge():F=ge},J._final=function(M){ee.end(),K=M},ee.on("drain",function(){if(F){const M=F;F=null,M()}}),ee.on("finish",function(){if(K){const M=K;K=null,M()}})),I&&(p(T,M=>{I=!1,M&&h(T,M),le(M)}),T.on("readable",function(){if(V){const M=V;V=null,M()}}),T.on("end",function(){J.push(null)}),J._read=function(){for(;;){const M=T.read();if(M===null){V=J._read;return}if(!J.push(M))return}}),J._destroy=function(M,ne){!M&&Q!==null&&(M=new v),V=null,F=null,K=null,Q===null?ne(M):(Q=ne,h(ee,M),h(T,M))},J}return Fr}var Hr,Lo;function ot(){if(Lo)return Hr;Lo=1;const{ObjectDefineProperties:e,ObjectGetOwnPropertyDescriptor:t,ObjectKeys:n,ObjectSetPrototypeOf:r}=he;Hr=s;const i=dr(),o=Li();r(s.prototype,i.prototype),r(s,i);{const g=n(o.prototype);for(let p=0;p<g.length;p++){const v=g[p];s.prototype[v]||(s.prototype[v]=o.prototype[v])}}function s(g){if(!(this instanceof s))return new s(g);i.call(this,g),o.call(this,g),g?(this.allowHalfOpen=g.allowHalfOpen!==!1,g.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),g.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}e(s.prototype,{writable:{__proto__:null,...t(o.prototype,"writable")},writableHighWaterMark:{__proto__:null,...t(o.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...t(o.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...t(o.prototype,"writableBuffer")},writableLength:{__proto__:null,...t(o.prototype,"writableLength")},writableFinished:{__proto__:null,...t(o.prototype,"writableFinished")},writableCorked:{__proto__:null,...t(o.prototype,"writableCorked")},writableEnded:{__proto__:null,...t(o.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...t(o.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(g){this._readableState&&this._writableState&&(this._readableState.destroyed=g,this._writableState.destroyed=g)}}});let a;function f(){return a===void 0&&(a={}),a}s.fromWeb=function(g,p){return f().newStreamDuplexFromReadableWritablePair(g,p)},s.toWeb=function(g){return f().newReadableWritablePairFromDuplex(g)};let u;return s.from=function(g){return u||(u=yf()),u(g,"body")},Hr}const{ObjectSetPrototypeOf:oa,Symbol:_f}=he;var sa=st;const{ERR_METHOD_NOT_IMPLEMENTED:mf}=Ie.codes,Mi=ot(),{getHighWaterMark:Ef}=fr;oa(st.prototype,Mi.prototype);oa(st,Mi);const dn=_f("kCallback");function st(e){if(!(this instanceof st))return new st(e);const t=e?Ef(this,e,"readableHighWaterMark",!0):null;t===0&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),Mi.call(this,e),this._readableState.sync=!1,this[dn]=null,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",Sf)}function pi(e){typeof this._flush=="function"&&!this.destroyed?this._flush((t,n)=>{if(t){e?e(t):this.destroy(t);return}n!=null&&this.push(n),this.push(null),e&&e()}):(this.push(null),e&&e())}function Sf(){this._final!==pi&&pi.call(this)}st.prototype._final=pi;st.prototype._transform=function(e,t,n){throw new mf("_transform()")};st.prototype._write=function(e,t,n){const r=this._readableState,i=this._writableState,o=r.length;this._transform(e,t,(s,a)=>{if(s){n(s);return}a!=null&&this.push(a),i.ended||o===r.length||r.length<r.highWaterMark?n():this[dn]=n})};st.prototype._read=function(){if(this[dn]){const e=this[dn];this[dn]=null,e()}};const{ObjectSetPrototypeOf:aa}=he;var la=Ht;const Bi=sa;aa(Ht.prototype,Bi.prototype);aa(Ht,Bi);function Ht(e){if(!(this instanceof Ht))return new Ht(e);Bi.call(this,e)}Ht.prototype._transform=function(e,t,n){n(null,e)};const un=Nt,{ArrayIsArray:vf,Promise:Af,SymbolAsyncIterator:Rf,SymbolDispose:If}=he,Jn=pt,{once:Tf}=Ne,xf=Kt,Mo=ot(),{aggregateTwoErrors:Of,codes:{ERR_INVALID_ARG_TYPE:bi,ERR_INVALID_RETURN_VALUE:qr,ERR_MISSING_ARGS:Cf,ERR_STREAM_DESTROYED:Nf,ERR_STREAM_PREMATURE_CLOSE:Pf},AbortError:Lf}=Ie,{validateFunction:Mf,validateAbortSignal:Bf}=yn,{isIterable:Et,isReadable:zr,isReadableNodeStream:Gn,isNodeStream:Bo,isTransformStream:jt,isWebStream:$f,isReadableStream:Gr,isReadableFinished:Df}=at,jf=globalThis.AbortController||pn().AbortController;let Vr,Kr,Yr;function $o(e,t,n){let r=!1;e.on("close",()=>{r=!0});const i=Jn(e,{readable:t,writable:n},o=>{r=!o});return{destroy:o=>{r||(r=!0,xf.destroyer(e,o||new Nf("pipe")))},cleanup:i}}function kf(e){return Mf(e[e.length-1],"streams[stream.length - 1]"),e.pop()}function Zr(e){if(Et(e))return e;if(Gn(e))return Wf(e);throw new bi("val",["Readable","Iterable","AsyncIterable"],e)}async function*Wf(e){Kr||(Kr=dr()),yield*Kr.prototype[Rf].call(e)}async function kn(e,t,n,{end:r}){let i,o=null;const s=u=>{if(u&&(i=u),o){const g=o;o=null,g()}},a=()=>new Af((u,g)=>{i?g(i):o=()=>{i?g(i):u()}});t.on("drain",s);const f=Jn(t,{readable:!1},s);try{t.writableNeedDrain&&await a();for await(const u of e)t.write(u)||await a();r&&(t.end(),await a()),n()}catch(u){n(i!==u?Of(i,u):u)}finally{f(),t.off("drain",s)}}async function Jr(e,t,n,{end:r}){jt(t)&&(t=t.writable);const i=t.getWriter();try{for await(const o of e)await i.ready,i.write(o).catch(()=>{});await i.ready,r&&await i.close(),n()}catch(o){try{await i.abort(o),n(o)}catch(s){n(s)}}}function Uf(...e){return ua(e,Tf(kf(e)))}function ua(e,t,n){if(e.length===1&&vf(e[0])&&(e=e[0]),e.length<2)throw new Cf("streams");const r=new jf,i=r.signal,o=n==null?void 0:n.signal,s=[];Bf(o,"options.signal");function a(){R(new Lf)}Yr=Yr||Ne.addAbortListener;let f;o&&(f=Yr(o,a));let u,g;const p=[];let v=0;function S(x){R(x,--v===0)}function R(x,m){var j;if(x&&(!u||u.code==="ERR_STREAM_PREMATURE_CLOSE")&&(u=x),!(!u&&!m)){for(;p.length;)p.shift()(u);(j=f)===null||j===void 0||j[If](),r.abort(),m&&(u||s.forEach(P=>P()),un.nextTick(t,u,g))}}let h;for(let x=0;x<e.length;x++){const m=e[x],j=x<e.length-1,P=x>0,B=j||(n==null?void 0:n.end)!==!1,q=x===e.length-1;if(Bo(m)){let k=function(X){X&&X.name!=="AbortError"&&X.code!=="ERR_STREAM_PREMATURE_CLOSE"&&S(X)};if(B){const{destroy:X,cleanup:Z}=$o(m,j,P);p.push(X),zr(m)&&q&&s.push(Z)}m.on("error",k),zr(m)&&q&&s.push(()=>{m.removeListener("error",k)})}if(x===0)if(typeof m=="function"){if(h=m({signal:i}),!Et(h))throw new qr("Iterable, AsyncIterable or Stream","source",h)}else Et(m)||Gn(m)||jt(m)?h=m:h=Mo.from(m);else if(typeof m=="function"){if(jt(h)){var w;h=Zr((w=h)===null||w===void 0?void 0:w.readable)}else h=Zr(h);if(h=m(h,{signal:i}),j){if(!Et(h,!0))throw new qr("AsyncIterable",`transform[${x-1}]`,h)}else{var y;Vr||(Vr=la);const k=new Vr({objectMode:!0}),X=(y=h)===null||y===void 0?void 0:y.then;if(typeof X=="function")v++,X.call(h,D=>{g=D,D!=null&&k.write(D),B&&k.end(),un.nextTick(S)},D=>{k.destroy(D),un.nextTick(S,D)});else if(Et(h,!0))v++,kn(h,k,S,{end:B});else if(Gr(h)||jt(h)){const D=h.readable||h;v++,kn(D,k,S,{end:B})}else throw new qr("AsyncIterable or Promise","destination",h);h=k;const{destroy:Z,cleanup:$}=$o(h,!1,!0);p.push(Z),q&&s.push($)}}else if(Bo(m)){if(Gn(h)){v+=2;const k=Ff(h,m,S,{end:B});zr(m)&&q&&s.push(k)}else if(jt(h)||Gr(h)){const k=h.readable||h;v++,kn(k,m,S,{end:B})}else if(Et(h))v++,kn(h,m,S,{end:B});else throw new bi("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],h);h=m}else if($f(m)){if(Gn(h))v++,Jr(Zr(h),m,S,{end:B});else if(Gr(h)||Et(h))v++,Jr(h,m,S,{end:B});else if(jt(h))v++,Jr(h.readable,m,S,{end:B});else throw new bi("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],h);h=m}else h=Mo.from(m)}return(i!=null&&i.aborted||o!=null&&o.aborted)&&un.nextTick(a),h}function Ff(e,t,n,{end:r}){let i=!1;if(t.on("close",()=>{i||n(new Pf)}),e.pipe(t,{end:!1}),r){let o=function(){i=!0,t.end()};Df(e)?un.nextTick(o):e.once("end",o)}else n();return Jn(e,{readable:!0,writable:!1},o=>{const s=e._readableState;o&&o.code==="ERR_STREAM_PREMATURE_CLOSE"&&s&&s.ended&&!s.errored&&!s.errorEmitted?e.once("end",n).once("error",n):n(o)}),Jn(t,{readable:!1,writable:!0},n)}var $i={pipelineImpl:ua,pipeline:Uf};const{pipeline:Hf}=$i,Wn=ot(),{destroyer:qf}=Kt,{isNodeStream:Un,isReadable:Do,isWritable:jo,isWebStream:Xr,isTransformStream:mt,isWritableStream:ko,isReadableStream:Wo}=at,{AbortError:zf,codes:{ERR_INVALID_ARG_VALUE:Uo,ERR_MISSING_ARGS:Gf}}=Ie,Vf=pt;var fa=function(...t){if(t.length===0)throw new Gf("streams");if(t.length===1)return Wn.from(t[0]);const n=[...t];if(typeof t[0]=="function"&&(t[0]=Wn.from(t[0])),typeof t[t.length-1]=="function"){const S=t.length-1;t[S]=Wn.from(t[S])}for(let S=0;S<t.length;++S)if(!(!Un(t[S])&&!Xr(t[S]))){if(S<t.length-1&&!(Do(t[S])||Wo(t[S])||mt(t[S])))throw new Uo(`streams[${S}]`,n[S],"must be readable");if(S>0&&!(jo(t[S])||ko(t[S])||mt(t[S])))throw new Uo(`streams[${S}]`,n[S],"must be writable")}let r,i,o,s,a;function f(S){const R=s;s=null,R?R(S):S?a.destroy(S):!v&&!p&&a.destroy()}const u=t[0],g=Hf(t,f),p=!!(jo(u)||ko(u)||mt(u)),v=!!(Do(g)||Wo(g)||mt(g));if(a=new Wn({writableObjectMode:!!(u!=null&&u.writableObjectMode),readableObjectMode:!!(g!=null&&g.readableObjectMode),writable:p,readable:v}),p){if(Un(u))a._write=function(R,h,w){u.write(R,h)?w():r=w},a._final=function(R){u.end(),i=R},u.on("drain",function(){if(r){const R=r;r=null,R()}});else if(Xr(u)){const h=(mt(u)?u.writable:u).getWriter();a._write=async function(w,y,x){try{await h.ready,h.write(w).catch(()=>{}),x()}catch(m){x(m)}},a._final=async function(w){try{await h.ready,h.close().catch(()=>{}),i=w}catch(y){w(y)}}}const S=mt(g)?g.readable:g;Vf(S,()=>{if(i){const R=i;i=null,R()}})}if(v){if(Un(g))g.on("readable",function(){if(o){const S=o;o=null,S()}}),g.on("end",function(){a.push(null)}),a._read=function(){for(;;){const S=g.read();if(S===null){o=a._read;return}if(!a.push(S))return}};else if(Xr(g)){const R=(mt(g)?g.readable:g).getReader();a._read=async function(){for(;;)try{const{value:h,done:w}=await R.read();if(!a.push(h))return;if(w){a.push(null);return}}catch{return}}}}return a._destroy=function(S,R){!S&&s!==null&&(S=new zf),o=null,r=null,i=null,s===null?R(S):(s=R,Un(g)&&qf(g,S))},a};const Kf=globalThis.AbortController||pn().AbortController,{codes:{ERR_INVALID_ARG_VALUE:Yf,ERR_INVALID_ARG_TYPE:_n,ERR_MISSING_ARGS:Zf,ERR_OUT_OF_RANGE:Jf},AbortError:Ye}=Ie,{validateAbortSignal:Lt,validateInteger:Fo,validateObject:Mt}=yn,Xf=he.Symbol("kWeak"),Qf=he.Symbol("kResistStopPropagation"),{finished:ed}=pt,td=fa,{addAbortSignalNoValidate:nd}=ur,{isWritable:rd,isNodeStream:id}=at,{deprecate:od}=Ne,{ArrayPrototypePush:sd,Boolean:ad,MathFloor:Ho,Number:ld,NumberIsNaN:ud,Promise:qo,PromiseReject:zo,PromiseResolve:fd,PromisePrototypeThen:Go,Symbol:da}=he,Xn=da("kEmpty"),Vo=da("kEof");function dd(e,t){if(t!=null&&Mt(t,"options"),(t==null?void 0:t.signal)!=null&&Lt(t.signal,"options.signal"),id(e)&&!rd(e))throw new Yf("stream",e,"must be writable");const n=td(this,e);return t!=null&&t.signal&&nd(t.signal,n),n}function cr(e,t){if(typeof e!="function")throw new _n("fn",["Function","AsyncFunction"],e);t!=null&&Mt(t,"options"),(t==null?void 0:t.signal)!=null&&Lt(t.signal,"options.signal");let n=1;(t==null?void 0:t.concurrency)!=null&&(n=Ho(t.concurrency));let r=n-1;return(t==null?void 0:t.highWaterMark)!=null&&(r=Ho(t.highWaterMark)),Fo(n,"options.concurrency",1),Fo(r,"options.highWaterMark",0),r+=n,(async function*(){const o=Ne.AbortSignalAny([t==null?void 0:t.signal].filter(ad)),s=this,a=[],f={signal:o};let u,g,p=!1,v=0;function S(){p=!0,R()}function R(){v-=1,h()}function h(){g&&!p&&v<n&&a.length<r&&(g(),g=null)}async function w(){try{for await(let y of s){if(p)return;if(o.aborted)throw new Ye;try{if(y=e(y,f),y===Xn)continue;y=fd(y)}catch(x){y=zo(x)}v+=1,Go(y,R,S),a.push(y),u&&(u(),u=null),!p&&(a.length>=r||v>=n)&&await new qo(x=>{g=x})}a.push(Vo)}catch(y){const x=zo(y);Go(x,R,S),a.push(x)}finally{p=!0,u&&(u(),u=null)}}w();try{for(;;){for(;a.length>0;){const y=await a[0];if(y===Vo)return;if(o.aborted)throw new Ye;y!==Xn&&(yield y),a.shift(),h()}await new qo(y=>{u=y})}}finally{p=!0,g&&(g(),g=null)}}).call(this)}function cd(e=void 0){return e!=null&&Mt(e,"options"),(e==null?void 0:e.signal)!=null&&Lt(e.signal,"options.signal"),(async function*(){let n=0;for await(const i of this){var r;if(e!=null&&(r=e.signal)!==null&&r!==void 0&&r.aborted)throw new Ye({cause:e.signal.reason});yield[n++,i]}}).call(this)}async function ca(e,t=void 0){for await(const n of Di.call(this,e,t))return!0;return!1}async function hd(e,t=void 0){if(typeof e!="function")throw new _n("fn",["Function","AsyncFunction"],e);return!await ca.call(this,async(...n)=>!await e(...n),t)}async function gd(e,t){for await(const n of Di.call(this,e,t))return n}async function pd(e,t){if(typeof e!="function")throw new _n("fn",["Function","AsyncFunction"],e);async function n(r,i){return await e(r,i),Xn}for await(const r of cr.call(this,n,t));}function Di(e,t){if(typeof e!="function")throw new _n("fn",["Function","AsyncFunction"],e);async function n(r,i){return await e(r,i)?r:Xn}return cr.call(this,n,t)}class bd extends Zf{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}async function wd(e,t,n){var r;if(typeof e!="function")throw new _n("reducer",["Function","AsyncFunction"],e);n!=null&&Mt(n,"options"),(n==null?void 0:n.signal)!=null&&Lt(n.signal,"options.signal");let i=arguments.length>1;if(n!=null&&(r=n.signal)!==null&&r!==void 0&&r.aborted){const u=new Ye(void 0,{cause:n.signal.reason});throw this.once("error",()=>{}),await ed(this.destroy(u)),u}const o=new Kf,s=o.signal;if(n!=null&&n.signal){const u={once:!0,[Xf]:this,[Qf]:!0};n.signal.addEventListener("abort",()=>o.abort(),u)}let a=!1;try{for await(const u of this){var f;if(a=!0,n!=null&&(f=n.signal)!==null&&f!==void 0&&f.aborted)throw new Ye;i?t=await e(t,u,{signal:s}):(t=u,i=!0)}if(!a&&!i)throw new bd}finally{o.abort()}return t}async function yd(e){e!=null&&Mt(e,"options"),(e==null?void 0:e.signal)!=null&&Lt(e.signal,"options.signal");const t=[];for await(const r of this){var n;if(e!=null&&(n=e.signal)!==null&&n!==void 0&&n.aborted)throw new Ye(void 0,{cause:e.signal.reason});sd(t,r)}return t}function _d(e,t){const n=cr.call(this,e,t);return(async function*(){for await(const i of n)yield*i}).call(this)}function ha(e){if(e=ld(e),ud(e))return 0;if(e<0)throw new Jf("number",">= 0",e);return e}function md(e,t=void 0){return t!=null&&Mt(t,"options"),(t==null?void 0:t.signal)!=null&&Lt(t.signal,"options.signal"),e=ha(e),(async function*(){var r;if(t!=null&&(r=t.signal)!==null&&r!==void 0&&r.aborted)throw new Ye;for await(const o of this){var i;if(t!=null&&(i=t.signal)!==null&&i!==void 0&&i.aborted)throw new Ye;e--<=0&&(yield o)}}).call(this)}function Ed(e,t=void 0){return t!=null&&Mt(t,"options"),(t==null?void 0:t.signal)!=null&&Lt(t.signal,"options.signal"),e=ha(e),(async function*(){var r;if(t!=null&&(r=t.signal)!==null&&r!==void 0&&r.aborted)throw new Ye;for await(const o of this){var i;if(t!=null&&(i=t.signal)!==null&&i!==void 0&&i.aborted)throw new Ye;if(e-- >0&&(yield o),e<=0)return}}).call(this)}xi.streamReturningOperators={asIndexedPairs:od(cd,"readable.asIndexedPairs will be removed in a future version."),drop:md,filter:Di,flatMap:_d,map:cr,take:Ed,compose:dd};xi.promiseReturningOperators={every:hd,forEach:pd,reduce:wd,toArray:yd,some:ca,find:gd};var Qr,Ko;function ga(){if(Ko)return Qr;Ko=1;const{ArrayPrototypePop:e,Promise:t}=he,{isIterable:n,isNodeStream:r,isWebStream:i}=at,{pipelineImpl:o}=$i,{finished:s}=pt;pa();function a(...f){return new t((u,g)=>{let p,v;const S=f[f.length-1];if(S&&typeof S=="object"&&!r(S)&&!n(S)&&!i(S)){const R=e(f);p=R.signal,v=R.end}o(f,(R,h)=>{R?g(R):u(h)},{signal:p,end:v})})}return Qr={finished:s,pipeline:a},Qr}var Yo;function pa(){if(Yo)return $r.exports;Yo=1;const{Buffer:e}=Ct,{ObjectDefineProperty:t,ObjectKeys:n,ReflectApply:r}=he,{promisify:{custom:i}}=Ne,{streamReturningOperators:o,promiseReturningOperators:s}=xi,{codes:{ERR_ILLEGAL_CONSTRUCTOR:a}}=Ie,f=fa,{setDefaultHighWaterMark:u,getDefaultHighWaterMark:g}=fr,{pipeline:p}=$i,{destroyer:v}=Kt,S=pt,R=ga(),h=at,w=$r.exports=Pi.Stream;w.isDestroyed=h.isDestroyed,w.isDisturbed=h.isDisturbed,w.isErrored=h.isErrored,w.isReadable=h.isReadable,w.isWritable=h.isWritable,w.Readable=dr();for(const x of n(o)){let j=function(...P){if(new.target)throw a();return w.Readable.from(r(m,this,P))};const m=o[x];t(j,"name",{__proto__:null,value:m.name}),t(j,"length",{__proto__:null,value:m.length}),t(w.Readable.prototype,x,{__proto__:null,value:j,enumerable:!1,configurable:!0,writable:!0})}for(const x of n(s)){let j=function(...P){if(new.target)throw a();return r(m,this,P)};const m=s[x];t(j,"name",{__proto__:null,value:m.name}),t(j,"length",{__proto__:null,value:m.length}),t(w.Readable.prototype,x,{__proto__:null,value:j,enumerable:!1,configurable:!0,writable:!0})}w.Writable=Li(),w.Duplex=ot(),w.Transform=sa,w.PassThrough=la,w.pipeline=p;const{addAbortSignal:y}=ur;return w.addAbortSignal=y,w.finished=S,w.destroy=v,w.compose=f,w.setDefaultHighWaterMark=u,w.getDefaultHighWaterMark=g,t(w,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return R}}),t(p,i,{__proto__:null,enumerable:!0,get(){return R.pipeline}}),t(S,i,{__proto__:null,enumerable:!0,get(){return R.finished}}),w.Stream=w,w._isUint8Array=function(m){return m instanceof Uint8Array},w._uint8ArrayToBuffer=function(m){return e.from(m.buffer,m.byteOffset,m.byteLength)},$r.exports}(function(e){const t=pa(),n=ga(),r=t.Readable.destroy;e.exports=t.Readable,e.exports._uint8ArrayToBuffer=t._uint8ArrayToBuffer,e.exports._isUint8Array=t._isUint8Array,e.exports.isDisturbed=t.isDisturbed,e.exports.isErrored=t.isErrored,e.exports.isReadable=t.isReadable,e.exports.Readable=t.Readable,e.exports.Writable=t.Writable,e.exports.Duplex=t.Duplex,e.exports.Transform=t.Transform,e.exports.PassThrough=t.PassThrough,e.exports.addAbortSignal=t.addAbortSignal,e.exports.finished=t.finished,e.exports.destroy=t.destroy,e.exports.destroy=r,e.exports.pipeline=t.pipeline,e.exports.compose=t.compose,Object.defineProperty(t,"promises",{configurable:!0,enumerable:!0,get(){return n}}),e.exports.Stream=t.Stream,e.exports.default=e.exports})(Ps);var hr=Ps.exports,ji={exports:{}},Sd=ba;function ba(e,t){if(e&&t)return ba(e)(t);if(typeof e!="function")throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(r){n[r]=e[r]}),n;function n(){for(var r=new Array(arguments.length),i=0;i<r.length;i++)r[i]=arguments[i];var o=e.apply(this,r),s=r[r.length-1];return typeof o=="function"&&o!==s&&Object.keys(s).forEach(function(a){o[a]=s[a]}),o}}var wa=Sd;ji.exports=wa(Vn);ji.exports.strict=wa(ya);Vn.proto=Vn(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return Vn(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return ya(this)},configurable:!0})});function Vn(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function ya(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},n=e.name||"Function wrapped with `once`";return t.onceError=n+" shouldn't be called more than once",t.called=!1,t}var ki=ji.exports;const vd=Vt(ki);var Ad=ki,Rd=function(){},Id=function(e){return e.setHeader&&typeof e.abort=="function"},Td=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3},_a=function(e,t,n){if(typeof t=="function")return _a(e,null,t);t||(t={}),n=Ad(n||Rd);var r=e._writableState,i=e._readableState,o=t.readable||t.readable!==!1&&e.readable,s=t.writable||t.writable!==!1&&e.writable,a=!1,f=function(){e.writable||u()},u=function(){s=!1,o||n.call(e)},g=function(){o=!1,s||n.call(e)},p=function(w){n.call(e,w?new Error("exited with error code: "+w):null)},v=function(w){n.call(e,w)},S=function(){Me.process.nextTick(R)},R=function(){if(!a){if(o&&!(i&&i.ended&&!i.destroyed))return n.call(e,new Error("premature close"));if(s&&!(r&&r.ended&&!r.destroyed))return n.call(e,new Error("premature close"))}},h=function(){e.req.on("finish",u)};return Id(e)?(e.on("complete",u),e.on("abort",S),e.req?h():e.on("request",h)):s&&!r&&(e.on("end",f),e.on("close",f)),Td(e)&&e.on("exit",p),e.on("end",g),e.on("finish",u),t.error!==!1&&e.on("error",v),e.on("close",S),function(){a=!0,e.removeListener("complete",u),e.removeListener("abort",S),e.removeListener("request",h),e.req&&e.req.removeListener("finish",u),e.removeListener("end",f),e.removeListener("close",f),e.removeListener("finish",u),e.removeListener("exit",p),e.removeListener("end",g),e.removeListener("error",v),e.removeListener("close",S)}},ma=_a;const Zo=Vt(ma);var xd=ki,Od=ma,Kn;try{Kn=vl}catch{}var bn=function(){},Cd=/^v?\.0/.test(Me.process.version),gr=function(e){return typeof e=="function"},Nd=function(e){return!Cd||!Kn?!1:(e instanceof(Kn.ReadStream||bn)||e instanceof(Kn.WriteStream||bn))&&gr(e.close)},Pd=function(e){return e.setHeader&&gr(e.abort)},Ld=function(e,t,n,r){r=xd(r);var i=!1;e.on("close",function(){i=!0}),Od(e,{readable:t,writable:n},function(s){if(s)return r(s);i=!0,r()});var o=!1;return function(s){if(!i&&!o){if(o=!0,Nd(e))return e.close(bn);if(Pd(e))return e.abort();if(gr(e.destroy))return e.destroy();r(s||new Error("stream was destroyed"))}}},Jo=function(e){e()},Md=function(e,t){return e.pipe(t)},Bd=function(){var e=Array.prototype.slice.call(arguments),t=gr(e[e.length-1]||bn)&&e.pop()||bn;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var n,r=e.map(function(i,o){var s=o<e.length-1,a=o>0;return Ld(i,s,a,function(f){n||(n=f),f&&r.forEach(Jo),!s&&(r.forEach(Jo),t(n))})});return e.reduce(Md)},$d=Bd;const Xo=Vt($d);function Fn(){}const Qo="SYN",ei="ACK",es="BRK";class ts extends hr.Duplex{constructor(t){let{name:n,target:r,targetWindow:i=window,targetOrigin:o="*"}=t;if(super({objectMode:!0}),G(this,"_init",void 0),G(this,"_haveSyn",void 0),G(this,"_name",void 0),G(this,"_target",void 0),G(this,"_targetWindow",void 0),G(this,"_targetOrigin",void 0),G(this,"_onMessage",void 0),G(this,"_synIntervalId",void 0),!n||!r)throw new Error("Invalid input.");this._init=!1,this._haveSyn=!1,this._name=n,this._target=r,this._targetWindow=i,this._targetOrigin=o,this._onMessage=this.onMessage.bind(this),this._synIntervalId=null,window.addEventListener("message",this._onMessage,!1),this._handShake()}_break(){this.cork(),this._write(es,null,Fn),this._haveSyn=!1,this._init=!1}_handShake(){this._write(Qo,null,Fn),this.cork()}_onData(t){if(!this._init)t===Qo?(this._haveSyn=!0,this._write(ei,null,Fn)):t===ei&&(this._init=!0,this._haveSyn||this._write(ei,null,Fn),this.uncork());else if(t===es)this._break();else try{this.push(t)}catch(n){this.emit("error",n)}}_postMessage(t){const n=this._targetOrigin;this._targetWindow.postMessage({target:this._target,data:t},n)}onMessage(t){const n=t.data;this._targetOrigin!=="*"&&t.origin!==this._targetOrigin||t.source!==this._targetWindow||typeof n!="object"||n.target!==this._name||!n.data||this._onData(n.data)}_read(){}_write(t,n,r){this._postMessage(t),r()}_destroy(){window.removeEventListener("message",this._onMessage,!1)}}const Dd={rpc:{internal:-32603}},ns={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}},rs=Dd.rpc.internal,jd="Unspecified error message. This is a bug, please report it.";function Ea(e){return Number.isInteger(e)}function is(e){return typeof e=="string"&&e.length>0}function os(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function Sa(e){const t=e;return!(!t||!Ea(t.code)||!is(t.message)||t.stack&&!is(t.stack))}function kd(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:jd;if(Ea(e)){const n=e.toString();if(Object.hasOwn(ns,n))return ns[n].message}return t}const Wd={code:rs,message:kd(rs)};function wi(e){try{JSON.parse(JSON.stringify(e,(t,n)=>{if(t==="__proto__"||t==="constructor")throw new Error("Not valid json");if(typeof n=="function"||typeof n=="symbol")throw new Error("Not valid json");return n}),(t,n)=>{if(!(t==="__proto__"||t==="constructor"))return n})}catch{return!1}return!0}function ss(e){return Object.getOwnPropertyNames(e).reduce((t,n)=>{const r=e[n];return wi(r)&&(t[n]=r),t},{})}function Ud(e){return Array.isArray(e)?e.map(t=>wi(t)?t:os(t)?ss(t):null):os(e)?ss(e):wi(e)?e:null}function Fd(e,t){if(e&&typeof e=="object"&&"serialize"in e&&typeof e.serialize=="function")return e.serialize();if(Sa(e))return e;const n=Ud(e);return je(je({},t),{},{data:{cause:n}})}function as(e){let{fallbackError:t=Wd,shouldIncludeStack:n=!0}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Sa(t))throw new Error("Must provide fallback error with integer number code and string message.");const r=Fd(e,t);return n||delete r.stack,r}function ls(e,t,n){try{Reflect.apply(e,t,n)}catch(r){setTimeout(()=>{throw r})}}function Hd(e){const t=e.length,n=new Array(t);for(let r=0;r<t;r+=1)n[r]=e[r];return n}class pr extends Al.EventEmitter{emit(t){let n=t==="error";const r=this._events;if(r!==void 0)n=n&&r.error===void 0;else if(!n)return!1;for(var i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];if(n){let f;if(o.length>0&&([f]=o),f instanceof Error)throw f;const u=new Error(`Unhandled error.${f?` (${f.message})`:""}`);throw u.context=f,u}const a=r[t];if(a===void 0)return!1;if(typeof a=="function")ls(a,this,o);else{const f=a.length,u=Hd(a);for(let g=0;g<f;g+=1)ls(u[g],this,o)}return!0}}class an extends Error{constructor(t){let{code:n,message:r,data:i}=t;if(!Number.isInteger(n))throw new Error("code must be an integer");if(!r||typeof r!="string")throw new Error("message must be string");super(r),G(this,"code",void 0),G(this,"data",void 0),this.code=n,i!==void 0&&(this.data=i)}toString(){return Il({code:this.code,message:this.message,data:this.data,stack:this.stack})}}const yi=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return(r,i)=>{r||i.error?t(r||i.error):!n||Array.isArray(i)?e(i):e(i.result)}};function qd(){const e={};function t(){return!1}const n=new pr;function r(f){const u=e[f.id];if(!u)throw new Error(`StreamMiddleware - Unknown response id "${f.id}"`);delete e[f.id],Object.assign(u.res,f),setTimeout(u.end)}function i(f){n.emit("notification",f)}function o(f,u,g){let p;try{!f.id?i(f):r(f)}catch(v){p=v}g(p)}const s=new hr.Duplex({objectMode:!0,read:t,write:o});return{events:n,middleware:(f,u,g,p)=>{s.push(f),e[f.id]={req:f,res:u,next:g,end:p}},stream:s}}function zd(){return(e,t,n,r)=>{const i=e.id,o=Math.random().toString(36).slice(2);e.id=o,t.id=o,n(s=>{e.id=i,t.id=i,s()})}}class tt extends pr{constructor(){super(),G(this,"_middleware",void 0),this._middleware=[]}static async _runAllMiddleware(t,n,r){const i=[];let o=null,s=!1;for(const a of r)if([o,s]=await tt._runMiddleware(t,n,a,i),s)break;return[o,s,i.reverse()]}static _runMiddleware(t,n,r,i){return new Promise(o=>{const s=f=>{const u=f||n.error;u&&(typeof u=="object"&&Object.keys(u).includes("stack")===!1&&(u.stack="Stack trace is not available."),n.error=as(u,{shouldIncludeStack:!0,fallbackError:{message:(u==null?void 0:u.message)||(u==null?void 0:u.toString()),code:(u==null?void 0:u.code)||-32603,stack:(u==null?void 0:u.stack)||"Stack trace is not available.",data:(u==null?void 0:u.data)||(u==null?void 0:u.message)||(u==null?void 0:u.toString())}})),o([u,!0])},a=f=>{n.error?s(n.error):(f&&(typeof f!="function"&&s(new an({code:-32603,message:"JRPCEngine: 'next' return handlers must be functions"})),i.push(f)),o([null,!1]))};try{r(t,n,a,s)}catch(f){s(f)}})}static async _runReturnHandlers(t){for(const n of t)await new Promise((r,i)=>{n(o=>o?i(o):r())})}static _checkForCompletion(t,n,r){if(!("result"in n)&&!("error"in n))throw new an({code:-32603,message:"Response has no error or result for request"});if(!r)throw new an({code:-32603,message:"Nothing ended request"})}push(t){this._middleware.push(t)}handle(t,n){if(n&&typeof n!="function")throw new Error('"callback" must be a function if provided.');return Array.isArray(t)?n?this._handleBatch(t,n):this._handleBatch(t):n?this._handle(t,n):this._promiseHandle(t)}asMiddleware(){return async(t,n,r,i)=>{try{const[o,s,a]=await tt._runAllMiddleware(t,n,this._middleware);return s?(await tt._runReturnHandlers(a),i(o)):r(async f=>{try{await tt._runReturnHandlers(a)}catch(u){return f(u)}return f()})}catch(o){return i(o)}}}async _handleBatch(t,n){try{const r=await Promise.all(t.map(this._promiseHandle.bind(this)));return n?n(null,r):r}catch(r){if(n)return n(r);throw r}}_promiseHandle(t){return new Promise((n,r)=>{this._handle(t,(i,o)=>{i&&o===void 0?r(i):n(o)}).catch(r)})}async _handle(t,n){if(!t||Array.isArray(t)||typeof t!="object"){const S=new an({code:-32603,message:"request must be plain object"});return n(S,{id:void 0,jsonrpc:"2.0",error:S})}if(typeof t.method!="string"){const S=new an({code:-32603,message:"method must be string"});return n(S,{id:t.id,jsonrpc:"2.0",error:S})}const r=je({},t),i={id:r.id,jsonrpc:r.jsonrpc};let o=null;try{await this._processRequest(r,i)}catch(S){o=S}if(o&&(delete i.result,!i.error)){var s,a,f,u,g,p,v;typeof o=="object"&&Object.keys(o).includes("stack")===!1&&(o.stack="Stack trace is not available."),i.error=as(o,{shouldIncludeStack:!0,fallbackError:{message:((s=o)===null||s===void 0?void 0:s.message)||((a=o)===null||a===void 0?void 0:a.toString()),code:((f=o)===null||f===void 0?void 0:f.code)||-32603,stack:((u=o)===null||u===void 0?void 0:u.stack)||"Stack trace is not available.",data:((g=o)===null||g===void 0?void 0:g.data)||((p=o)===null||p===void 0?void 0:p.message)||((v=o)===null||v===void 0?void 0:v.toString())}})}return n(o,i)}async _processRequest(t,n){const[r,i,o]=await tt._runAllMiddleware(t,n,this._middleware);if(tt._checkForCompletion(t,n,i),await tt._runReturnHandlers(o),r)throw r}}class Gd extends hr.Duplex{constructor(t){let{parent:n,name:r}=t;super({objectMode:!0}),G(this,"_parent",void 0),G(this,"_name",void 0),this._parent=n,this._name=r}_read(){}_write(t,n,r){this._parent.push({name:this._name,data:t}),r()}}const us=Symbol("IGNORE_SUBSTREAM");class Vd extends hr.Duplex{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(je(je({},t),{},{objectMode:!0})),G(this,"_substreams",void 0),G(this,"getStream",void 0),this._substreams={}}createStream(t){if(!t)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[t])throw new Error(`ObjectMultiplex - Substream for name "${t}" already exists`);const n=new Gd({parent:this,name:t});return this._substreams[t]=n,Kd(this,r=>n.destroy(r||void 0)),n}ignoreStream(t){if(!t)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[t])throw new Error(`ObjectMultiplex - Substream for name "${t}" already exists`);this._substreams[t]=us}_read(){}_write(t,n,r){const{name:i,data:o}=t;if(!i)return window.console.warn(`ObjectMultiplex - malformed chunk without name "${t}"`),r();const s=this._substreams[i];return s?(s!==us&&s.push(o),r()):(window.console.warn(`ObjectMultiplex - orphaned data for stream "${i}"`),r())}}function Kd(e,t){const n=vd(t);Zo(e,{readable:!1},n),Zo(e,{writable:!1},n)}var Qn={exports:{}};Qn.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,s=9007199254740991,a="[object Arguments]",f="[object Array]",u="[object AsyncFunction]",g="[object Boolean]",p="[object Date]",v="[object Error]",S="[object Function]",R="[object GeneratorFunction]",h="[object Map]",w="[object Number]",y="[object Null]",x="[object Object]",m="[object Proxy]",j="[object RegExp]",P="[object Set]",B="[object String]",q="[object Undefined]",k="[object WeakMap]",X="[object ArrayBuffer]",Z="[object DataView]",$="[object Float32Array]",D="[object Float64Array]",T="[object Int8Array]",ee="[object Int16Array]",I="[object Int32Array]",C="[object Uint8Array]",F="[object Uint8ClampedArray]",K="[object Uint16Array]",V="[object Uint32Array]",Q=/[\\^$.*+?()[\]{}|]/g,J=/^\[object .+?Constructor\]$/,le=/^(?:0|[1-9]\d*)$/,M={};M[$]=M[D]=M[T]=M[ee]=M[I]=M[C]=M[F]=M[K]=M[V]=!0,M[a]=M[f]=M[X]=M[g]=M[Z]=M[p]=M[v]=M[S]=M[h]=M[w]=M[x]=M[j]=M[P]=M[B]=M[k]=!1;var ne=typeof ln=="object"&&ln&&ln.Object===Object&&ln,ge=typeof self=="object"&&self&&self.Object===Object&&self,_e=ne||ge||Function("return this")(),be=t&&!t.nodeType&&t,Ae=be&&!0&&e&&!e.nodeType&&e,Se=Ae&&Ae.exports===be,Te=Se&&ne.process,Ue=function(){try{var d=Ae&&Ae.require&&Ae.require("util").types;return d||Te&&Te.binding&&Te.binding("util")}catch{}}(),Re=Ue&&Ue.isTypedArray;function _(d,b,A){switch(A.length){case 0:return d.call(b);case 1:return d.call(b,A[0]);case 2:return d.call(b,A[0],A[1]);case 3:return d.call(b,A[0],A[1],A[2])}return d.apply(b,A)}function E(d,b){for(var A=-1,H=Array(d);++A<d;)H[A]=b(A);return H}function O(d){return function(b){return d(b)}}function W(d,b){return d==null?void 0:d[b]}function z(d,b){return function(A){return d(b(A))}}var oe=Array.prototype,fe=Function.prototype,re=Object.prototype,Pe=_e["__core-js_shared__"],Y=fe.toString,me=re.hasOwnProperty,Bt=function(){var d=/[^.]+$/.exec(Pe&&Pe.keys&&Pe.keys.IE_PROTO||"");return d?"Symbol(src)_1."+d:""}(),vn=re.toString,Er=Y.call(Object),An=RegExp("^"+Y.call(me).replace(Q,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$t=Se?_e.Buffer:void 0,bt=_e.Symbol,Zt=_e.Uint8Array;$t&&$t.allocUnsafe;var wt=z(Object.getPrototypeOf,Object),Rn=Object.create,Sr=re.propertyIsEnumerable,In=oe.splice,Je=bt?bt.toStringTag:void 0,Dt=function(){try{var d=xr(Object,"defineProperty");return d({},"",{}),d}catch{}}(),vr=$t?$t.isBuffer:void 0,Jt=Math.max,Tn=Date.now,xn=xr(_e,"Map"),lt=xr(Object,"create"),Xt=function(){function d(){}return function(b){if(!_t(b))return{};if(Rn)return Rn(b);d.prototype=b;var A=new d;return d.prototype=void 0,A}}();function Xe(d){var b=-1,A=d==null?0:d.length;for(this.clear();++b<A;){var H=d[b];this.set(H[0],H[1])}}function Ar(){this.__data__=lt?lt(null):{},this.size=0}function Qt(d){var b=this.has(d)&&delete this.__data__[d];return this.size-=b?1:0,b}function On(d){var b=this.__data__;if(lt){var A=b[d];return A===r?void 0:A}return me.call(b,d)?b[d]:void 0}function l(d){var b=this.__data__;return lt?b[d]!==void 0:me.call(b,d)}function c(d,b){var A=this.__data__;return this.size+=this.has(d)?0:1,A[d]=lt&&b===void 0?r:b,this}Xe.prototype.clear=Ar,Xe.prototype.delete=Qt,Xe.prototype.get=On,Xe.prototype.has=l,Xe.prototype.set=c;function N(d){var b=-1,A=d==null?0:d.length;for(this.clear();++b<A;){var H=d[b];this.set(H[0],H[1])}}function L(){this.__data__=[],this.size=0}function U(d){var b=this.__data__,A=Mn(b,d);if(A<0)return!1;var H=b.length-1;return A==H?b.pop():In.call(b,A,1),--this.size,!0}function we(d){var b=this.__data__,A=Mn(b,d);return A<0?void 0:b[A][1]}function xe(d){return Mn(this.__data__,d)>-1}function Cn(d,b){var A=this.__data__,H=Mn(A,d);return H<0?(++this.size,A.push([d,b])):A[H][1]=b,this}N.prototype.clear=L,N.prototype.delete=U,N.prototype.get=we,N.prototype.has=xe,N.prototype.set=Cn;function Oe(d){var b=-1,A=d==null?0:d.length;for(this.clear();++b<A;){var H=d[b];this.set(H[0],H[1])}}function Nn(){this.size=0,this.__data__={hash:new Xe,map:new(xn||N),string:new Xe}}function Rr(d){var b=$n(this,d).delete(d);return this.size-=b?1:0,b}function Pn(d){return $n(this,d).get(d)}function Ln(d){return $n(this,d).has(d)}function en(d,b){var A=$n(this,d),H=A.size;return A.set(d,b),this.size+=A.size==H?0:1,this}Oe.prototype.clear=Nn,Oe.prototype.delete=Rr,Oe.prototype.get=Pn,Oe.prototype.has=Ln,Oe.prototype.set=en;function ze(d){var b=this.__data__=new N(d);this.size=b.size}function tn(){this.__data__=new N,this.size=0}function yt(d){var b=this.__data__,A=b.delete(d);return this.size=b.size,A}function Qe(d){return this.__data__.get(d)}function Fe(d){return this.__data__.has(d)}function Fa(d,b){var A=this.__data__;if(A instanceof N){var H=A.__data__;if(!xn||H.length<n-1)return H.push([d,b]),this.size=++A.size,this;A=this.__data__=new Oe(H)}return A.set(d,b),this.size=A.size,this}ze.prototype.clear=tn,ze.prototype.delete=yt,ze.prototype.get=Qe,ze.prototype.has=Fe,ze.prototype.set=Fa;function Ha(d,b){var A=Nr(d),H=!A&&Cr(d),te=!A&&!H&&eo(d),se=!A&&!H&&!te&&no(d),de=A||H||te||se,ie=de?E(d.length,String):[],ce=ie.length;for(var He in d)de&&(He=="length"||te&&(He=="offset"||He=="parent")||se&&(He=="buffer"||He=="byteLength"||He=="byteOffset")||Xi(He,ce))||ie.push(He);return ie}function Ir(d,b,A){(A!==void 0&&!Dn(d[b],A)||A===void 0&&!(b in d))&&Tr(d,b,A)}function qa(d,b,A){var H=d[b];(!(me.call(d,b)&&Dn(H,A))||A===void 0&&!(b in d))&&Tr(d,b,A)}function Mn(d,b){for(var A=d.length;A--;)if(Dn(d[A][0],b))return A;return-1}function Tr(d,b,A){b=="__proto__"&&Dt?Dt(d,b,{configurable:!0,enumerable:!0,value:A,writable:!0}):d[b]=A}var za=il();function Bn(d){return d==null?d===void 0?q:y:Je&&Je in Object(d)?ol(d):dl(d)}function Zi(d){return nn(d)&&Bn(d)==a}function Ga(d){if(!_t(d)||ul(d))return!1;var b=Lr(d)?An:J;return b.test(pl(d))}function Va(d){return nn(d)&&to(d.length)&&!!M[Bn(d)]}function Ka(d){if(!_t(d))return fl(d);var b=Qi(d),A=[];for(var H in d)H=="constructor"&&(b||!me.call(d,H))||A.push(H);return A}function Ji(d,b,A,H,te){d!==b&&za(b,function(se,de){if(te||(te=new ze),_t(se))Ya(d,b,de,A,Ji,H,te);else{var ie=H?H(Or(d,de),se,de+"",d,b,te):void 0;ie===void 0&&(ie=se),Ir(d,de,ie)}},ro)}function Ya(d,b,A,H,te,se,de){var ie=Or(d,A),ce=Or(b,A),He=de.get(ce);if(He){Ir(d,A,He);return}var Le=se?se(ie,ce,A+"",d,b,de):void 0,rn=Le===void 0;if(rn){var Mr=Nr(ce),Br=!Mr&&eo(ce),oo=!Mr&&!Br&&no(ce);Le=ce,Mr||Br||oo?Nr(ie)?Le=ie:bl(ie)?Le=tl(ie):Br?(rn=!1,Le=Xa(ce)):oo?(rn=!1,Le=el(ce)):Le=[]:wl(ce)||Cr(ce)?(Le=ie,Cr(ie)?Le=yl(ie):(!_t(ie)||Lr(ie))&&(Le=sl(ce))):rn=!1}rn&&(de.set(ce,Le),te(Le,ce,H,se,de),de.delete(ce)),Ir(d,A,Le)}function Za(d,b){return hl(cl(d,b,io),d+"")}var Ja=Dt?function(d,b){return Dt(d,"toString",{configurable:!0,enumerable:!1,value:ml(b),writable:!0})}:io;function Xa(d,b){return d.slice()}function Qa(d){var b=new d.constructor(d.byteLength);return new Zt(b).set(new Zt(d)),b}function el(d,b){var A=Qa(d.buffer);return new d.constructor(A,d.byteOffset,d.length)}function tl(d,b){var A=-1,H=d.length;for(b||(b=Array(H));++A<H;)b[A]=d[A];return b}function nl(d,b,A,H){var te=!A;A||(A={});for(var se=-1,de=b.length;++se<de;){var ie=b[se],ce=void 0;ce===void 0&&(ce=d[ie]),te?Tr(A,ie,ce):qa(A,ie,ce)}return A}function rl(d){return Za(function(b,A){var H=-1,te=A.length,se=te>1?A[te-1]:void 0,de=te>2?A[2]:void 0;for(se=d.length>3&&typeof se=="function"?(te--,se):void 0,de&&al(A[0],A[1],de)&&(se=te<3?void 0:se,te=1),b=Object(b);++H<te;){var ie=A[H];ie&&d(b,ie,H,se)}return b})}function il(d){return function(b,A,H){for(var te=-1,se=Object(b),de=H(b),ie=de.length;ie--;){var ce=de[++te];if(A(se[ce],ce,se)===!1)break}return b}}function $n(d,b){var A=d.__data__;return ll(b)?A[typeof b=="string"?"string":"hash"]:A.map}function xr(d,b){var A=W(d,b);return Ga(A)?A:void 0}function ol(d){var b=me.call(d,Je),A=d[Je];try{d[Je]=void 0;var H=!0}catch{}var te=vn.call(d);return H&&(b?d[Je]=A:delete d[Je]),te}function sl(d){return typeof d.constructor=="function"&&!Qi(d)?Xt(wt(d)):{}}function Xi(d,b){var A=typeof d;return b=b??s,!!b&&(A=="number"||A!="symbol"&&le.test(d))&&d>-1&&d%1==0&&d<b}function al(d,b,A){if(!_t(A))return!1;var H=typeof b;return(H=="number"?Pr(A)&&Xi(b,A.length):H=="string"&&b in A)?Dn(A[b],d):!1}function ll(d){var b=typeof d;return b=="string"||b=="number"||b=="symbol"||b=="boolean"?d!=="__proto__":d===null}function ul(d){return!!Bt&&Bt in d}function Qi(d){var b=d&&d.constructor,A=typeof b=="function"&&b.prototype||re;return d===A}function fl(d){var b=[];if(d!=null)for(var A in Object(d))b.push(A);return b}function dl(d){return vn.call(d)}function cl(d,b,A){return b=Jt(b===void 0?d.length-1:b,0),function(){for(var H=arguments,te=-1,se=Jt(H.length-b,0),de=Array(se);++te<se;)de[te]=H[b+te];te=-1;for(var ie=Array(b+1);++te<b;)ie[te]=H[te];return ie[b]=A(de),_(d,this,ie)}}function Or(d,b){if(!(b==="constructor"&&typeof d[b]=="function")&&b!="__proto__")return d[b]}var hl=gl(Ja);function gl(d){var b=0,A=0;return function(){var H=Tn(),te=o-(H-A);if(A=H,te>0){if(++b>=i)return arguments[0]}else b=0;return d.apply(void 0,arguments)}}function pl(d){if(d!=null){try{return Y.call(d)}catch{}try{return d+""}catch{}}return""}function Dn(d,b){return d===b||d!==d&&b!==b}var Cr=Zi(function(){return arguments}())?Zi:function(d){return nn(d)&&me.call(d,"callee")&&!Sr.call(d,"callee")},Nr=Array.isArray;function Pr(d){return d!=null&&to(d.length)&&!Lr(d)}function bl(d){return nn(d)&&Pr(d)}var eo=vr||El;function Lr(d){if(!_t(d))return!1;var b=Bn(d);return b==S||b==R||b==u||b==m}function to(d){return typeof d=="number"&&d>-1&&d%1==0&&d<=s}function _t(d){var b=typeof d;return d!=null&&(b=="object"||b=="function")}function nn(d){return d!=null&&typeof d=="object"}function wl(d){if(!nn(d)||Bn(d)!=x)return!1;var b=wt(d);if(b===null)return!0;var A=me.call(b,"constructor")&&b.constructor;return typeof A=="function"&&A instanceof A&&Y.call(A)==Er}var no=Re?O(Re):Va;function yl(d){return nl(d,ro(d))}function ro(d){return Pr(d)?Ha(d):Ka(d)}var _l=rl(function(d,b,A){Ji(d,b,A)});function ml(d){return function(){return d}}function io(d){return d}function El(){return!1}e.exports=_l})(Qn,Qn.exports);Qn.exports;var va={exports:{}};(function(e){(function(t,n){e.exports?e.exports=n():t.log=n()})(ln,function(){var t=function(){},n="undefined",r=typeof window!==n&&typeof window.navigator!==n&&/Trident\/|MSIE /.test(window.navigator.userAgent),i=["trace","debug","info","warn","error"],o={},s=null;function a(h,w){var y=h[w];if(typeof y.bind=="function")return y.bind(h);try{return Function.prototype.bind.call(y,h)}catch{return function(){return Function.prototype.apply.apply(y,[h,arguments])}}}function f(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function u(h){return h==="debug"&&(h="log"),typeof console===n?!1:h==="trace"&&r?f:console[h]!==void 0?a(console,h):console.log!==void 0?a(console,"log"):t}function g(){for(var h=this.getLevel(),w=0;w<i.length;w++){var y=i[w];this[y]=w<h?t:this.methodFactory(y,h,this.name)}if(this.log=this.debug,typeof console===n&&h<this.levels.SILENT)return"No console available for logging"}function p(h){return function(){typeof console!==n&&(g.call(this),this[h].apply(this,arguments))}}function v(h,w,y){return u(h)||p.apply(this,arguments)}function S(h,w){var y=this,x,m,j,P="loglevel";typeof h=="string"?P+=":"+h:typeof h=="symbol"&&(P=void 0);function B($){var D=(i[$]||"silent").toUpperCase();if(!(typeof window===n||!P)){try{window.localStorage[P]=D;return}catch{}try{window.document.cookie=encodeURIComponent(P)+"="+D+";"}catch{}}}function q(){var $;if(!(typeof window===n||!P)){try{$=window.localStorage[P]}catch{}if(typeof $===n)try{var D=window.document.cookie,T=encodeURIComponent(P),ee=D.indexOf(T+"=");ee!==-1&&($=/^([^;]+)/.exec(D.slice(ee+T.length+1))[1])}catch{}return y.levels[$]===void 0&&($=void 0),$}}function k(){if(!(typeof window===n||!P)){try{window.localStorage.removeItem(P)}catch{}try{window.document.cookie=encodeURIComponent(P)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function X($){var D=$;if(typeof D=="string"&&y.levels[D.toUpperCase()]!==void 0&&(D=y.levels[D.toUpperCase()]),typeof D=="number"&&D>=0&&D<=y.levels.SILENT)return D;throw new TypeError("log.setLevel() called with invalid level: "+$)}y.name=h,y.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},y.methodFactory=w||v,y.getLevel=function(){return j??m??x},y.setLevel=function($,D){return j=X($),D!==!1&&B(j),g.call(y)},y.setDefaultLevel=function($){m=X($),q()||y.setLevel($,!1)},y.resetLevel=function(){j=null,k(),g.call(y)},y.enableAll=function($){y.setLevel(y.levels.TRACE,$)},y.disableAll=function($){y.setLevel(y.levels.SILENT,$)},y.rebuild=function(){if(s!==y&&(x=X(s.getLevel())),g.call(y),s===y)for(var $ in o)o[$].rebuild()},x=X(s?s.getLevel():"WARN");var Z=q();Z!=null&&(j=X(Z)),g.call(y)}s=new S,s.getLogger=function(w){if(typeof w!="symbol"&&typeof w!="string"||w==="")throw new TypeError("You must supply a name when creating a logger.");var y=o[w];return y||(y=o[w]=new S(w,s.methodFactory)),y};var R=typeof window!==n?window.log:void 0;return s.noConflict=function(){return typeof window!==n&&window.log===s&&(window.log=R),s},s.getLoggers=function(){return o},s.default=s,s})})(va);var Aa=va.exports;const er=Vt(Aa),Yd=er.getLogger("http-helpers");Yd.setLevel(Aa.levels.INFO);function fs(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function Zd(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function br(e,...t){if(!Zd(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function Jd(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");fs(e.outputLen),fs(e.blockLen)}function tr(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 Xd(e,t){br(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}const ti=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const ni=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),Ge=(e,t)=>e<<32-t|e>>>t;new Uint8Array(new Uint32Array([287454020]).buffer)[0];function Qd(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function Wi(e){return typeof e=="string"&&(e=Qd(e)),br(e),e}function ec(...e){let t=0;for(let r=0;r<e.length;r++){const i=e[r];br(i),t+=i.length}const n=new Uint8Array(t);for(let r=0,i=0;r<e.length;r++){const o=e[r];n.set(o,i),i+=o.length}return n}class Ra{clone(){return this._cloneInto()}}function tc(e){const t=r=>e().update(Wi(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function nc(e=32){if(ti&&typeof ti.getRandomValues=="function")return ti.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}function rc(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const i=BigInt(32),o=BigInt(4294967295),s=Number(n>>i&o),a=Number(n&o),f=r?4:0,u=r?0:4;e.setUint32(t+f,s,r),e.setUint32(t+u,a,r)}const ic=(e,t,n)=>e&t^~e&n,oc=(e,t,n)=>e&t^e&n^t&n;class sc extends Ra{constructor(t,n,r,i){super(),this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=ni(this.buffer)}update(t){tr(this);const{view:n,buffer:r,blockLen:i}=this;t=Wi(t);const o=t.length;for(let s=0;s<o;){const a=Math.min(i-this.pos,o-s);if(a===i){const f=ni(t);for(;i<=o-s;s+=i)this.process(f,s);continue}r.set(t.subarray(s,s+a),this.pos),this.pos+=a,s+=a,this.pos===i&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){tr(this),Xd(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:i,isLE:o}=this;let{pos:s}=this;n[s++]=128,this.buffer.subarray(s).fill(0),this.padOffset>i-s&&(this.process(r,0),s=0);for(let p=s;p<i;p++)n[p]=0;rc(r,i-8,BigInt(this.length*8),o),this.process(r,0);const a=ni(t),f=this.outputLen;if(f%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=f/4,g=this.get();if(u>g.length)throw new Error("_sha2: outputLen bigger than state");for(let p=0;p<u;p++)a.setUint32(4*p,g[p],o)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:i,finished:o,destroyed:s,pos:a}=this;return t.length=i,t.pos=a,t.finished=o,t.destroyed=s,i%n&&t.buffer.set(r),t}}const ac=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),ut=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ft=new Uint32Array(64);class lc extends sc{constructor(){super(64,32,8,!1),this.A=ut[0]|0,this.B=ut[1]|0,this.C=ut[2]|0,this.D=ut[3]|0,this.E=ut[4]|0,this.F=ut[5]|0,this.G=ut[6]|0,this.H=ut[7]|0}get(){const{A:t,B:n,C:r,D:i,E:o,F:s,G:a,H:f}=this;return[t,n,r,i,o,s,a,f]}set(t,n,r,i,o,s,a,f){this.A=t|0,this.B=n|0,this.C=r|0,this.D=i|0,this.E=o|0,this.F=s|0,this.G=a|0,this.H=f|0}process(t,n){for(let p=0;p<16;p++,n+=4)ft[p]=t.getUint32(n,!1);for(let p=16;p<64;p++){const v=ft[p-15],S=ft[p-2],R=Ge(v,7)^Ge(v,18)^v>>>3,h=Ge(S,17)^Ge(S,19)^S>>>10;ft[p]=h+ft[p-7]+R+ft[p-16]|0}let{A:r,B:i,C:o,D:s,E:a,F:f,G:u,H:g}=this;for(let p=0;p<64;p++){const v=Ge(a,6)^Ge(a,11)^Ge(a,25),S=g+v+ic(a,f,u)+ac[p]+ft[p]|0,h=(Ge(r,2)^Ge(r,13)^Ge(r,22))+oc(r,i,o)|0;g=u,u=f,f=a,a=s+S|0,s=o,o=i,i=r,r=S+h|0}r=r+this.A|0,i=i+this.B|0,o=o+this.C|0,s=s+this.D|0,a=a+this.E|0,f=f+this.F|0,u=u+this.G|0,g=g+this.H|0,this.set(r,i,o,s,a,f,u,g)}roundClean(){ft.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const uc=tc(()=>new lc);class Ia extends Ra{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,Jd(t);const r=Wi(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,o=new Uint8Array(i);o.set(r.length>i?t.create().update(r).digest():r);for(let s=0;s<o.length;s++)o[s]^=54;this.iHash.update(o),this.oHash=t.create();for(let s=0;s<o.length;s++)o[s]^=106;this.oHash.update(o),o.fill(0)}update(t){return tr(this),this.iHash.update(t),this}digestInto(t){tr(this),br(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:r,finished:i,destroyed:o,blockLen:s,outputLen:a}=this;return t=t,t.finished=i,t.destroyed=o,t.blockLen=s,t.outputLen=a,t.oHash=n._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const Ta=(e,t,n)=>new Ia(e,t).update(n).digest();Ta.create=(e,t)=>new Ia(e,t);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const xa=BigInt(0),wr=BigInt(1),fc=BigInt(2);function xt(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function mn(e){if(!xt(e))throw new Error("Uint8Array expected")}const dc=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function qt(e){mn(e);let t="";for(let n=0;n<e.length;n++)t+=dc[e[n]];return t}function Oa(e){const t=e.toString(16);return t.length&1?`0${t}`:t}function Ui(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return BigInt(e===""?"0":`0x${e}`)}const et={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function ds(e){if(e>=et._0&&e<=et._9)return e-et._0;if(e>=et._A&&e<=et._F)return e-(et._A-10);if(e>=et._a&&e<=et._f)return e-(et._a-10)}function zt(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let i=0,o=0;i<n;i++,o+=2){const s=ds(e.charCodeAt(o)),a=ds(e.charCodeAt(o+1));if(s===void 0||a===void 0){const f=e[o]+e[o+1];throw new Error('hex string expected, got non-hex character "'+f+'" at index '+o)}r[i]=s*16+a}return r}function It(e){return Ui(qt(e))}function Fi(e){return mn(e),Ui(qt(Uint8Array.from(e).reverse()))}function Gt(e,t){return zt(e.toString(16).padStart(t*2,"0"))}function Hi(e,t){return Gt(e,t).reverse()}function cc(e){return zt(Oa(e))}function qe(e,t,n){let r;if(typeof t=="string")try{r=zt(t)}catch(o){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${o}`)}else if(xt(t))r=Uint8Array.from(t);else throw new Error(`${e} must be hex string or Uint8Array`);const i=r.length;if(typeof n=="number"&&i!==n)throw new Error(`${e} expected ${n} bytes, got ${i}`);return r}function wn(...e){let t=0;for(let r=0;r<e.length;r++){const i=e[r];mn(i),t+=i.length}const n=new Uint8Array(t);for(let r=0,i=0;r<e.length;r++){const o=e[r];n.set(o,i),i+=o.length}return n}function hc(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return n===0}function gc(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function pc(e){let t;for(t=0;e>xa;e>>=wr,t+=1);return t}function bc(e,t){return e>>BigInt(t)&wr}function wc(e,t,n){return e|(n?wr:xa)<<BigInt(t)}const qi=e=>(fc<<BigInt(e-1))-wr,ri=e=>new Uint8Array(e),cs=e=>Uint8Array.from(e);function Ca(e,t,n){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let r=ri(e),i=ri(e),o=0;const s=()=>{r.fill(1),i.fill(0),o=0},a=(...p)=>n(i,r,...p),f=(p=ri())=>{i=a(cs([0]),p),r=a(),p.length!==0&&(i=a(cs([1]),p),r=a())},u=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let p=0;const v=[];for(;p<t;){r=a();const S=r.slice();v.push(S),p+=r.length}return wn(...v)};return(p,v)=>{s(),f(p);let S;for(;!(S=v(u()));)f();return s(),S}}const yc={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"||xt(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 En(e,t,n={}){const r=(i,o,s)=>{const a=yc[o];if(typeof a!="function")throw new Error(`Invalid validator "${o}", expected function`);const f=e[i];if(!(s&&f===void 0)&&!a(f,e))throw new Error(`Invalid param ${String(i)}=${f} (${typeof f}), expected ${o}`)};for(const[i,o]of Object.entries(t))r(i,o,!1);for(const[i,o]of Object.entries(n))r(i,o,!0);return e}const _c=Object.freeze(Object.defineProperty({__proto__:null,abytes:mn,bitGet:bc,bitLen:pc,bitMask:qi,bitSet:wc,bytesToHex:qt,bytesToNumberBE:It,bytesToNumberLE:Fi,concatBytes:wn,createHmacDrbg:Ca,ensureBytes:qe,equalBytes:hc,hexToBytes:zt,hexToNumber:Ui,isBytes:xt,numberToBytesBE:Gt,numberToBytesLE:Hi,numberToHexUnpadded:Oa,numberToVarBytesBE:cc,utf8ToBytes:gc,validateObject:En},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const ye=BigInt(0),pe=BigInt(1),St=BigInt(2),mc=BigInt(3),_i=BigInt(4),hs=BigInt(5),gs=BigInt(8);BigInt(9);BigInt(16);function Ce(e,t){const n=e%t;return n>=ye?n:t+n}function Ec(e,t,n){if(n<=ye||t<ye)throw new Error("Expected power/modulo > 0");if(n===pe)return ye;let r=pe;for(;t>ye;)t&pe&&(r=r*e%n),e=e*e%n,t>>=pe;return r}function $e(e,t,n){let r=e;for(;t-- >ye;)r*=r,r%=n;return r}function mi(e,t){if(e===ye||t<=ye)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=Ce(e,t),r=t,i=ye,o=pe;for(;n!==ye;){const a=r/n,f=r%n,u=i-o*a;r=n,n=f,i=o,o=u}if(r!==pe)throw new Error("invert: does not exist");return Ce(i,t)}function Sc(e){const t=(e-pe)/St;let n,r,i;for(n=e-pe,r=0;n%St===ye;n/=St,r++);for(i=St;i<e&&Ec(i,t,e)!==e-pe;i++);if(r===1){const s=(e+pe)/_i;return function(f,u){const g=f.pow(u,s);if(!f.eql(f.sqr(g),u))throw new Error("Cannot find square root");return g}}const o=(n+pe)/St;return function(a,f){if(a.pow(f,t)===a.neg(a.ONE))throw new Error("Cannot find square root");let u=r,g=a.pow(a.mul(a.ONE,i),n),p=a.pow(f,o),v=a.pow(f,n);for(;!a.eql(v,a.ONE);){if(a.eql(v,a.ZERO))return a.ZERO;let S=1;for(let h=a.sqr(v);S<u&&!a.eql(h,a.ONE);S++)h=a.sqr(h);const R=a.pow(g,pe<<BigInt(u-S-1));g=a.sqr(R),p=a.mul(p,R),v=a.mul(v,g),u=S}return p}}function vc(e){if(e%_i===mc){const t=(e+pe)/_i;return function(r,i){const o=r.pow(i,t);if(!r.eql(r.sqr(o),i))throw new Error("Cannot find square root");return o}}if(e%gs===hs){const t=(e-hs)/gs;return function(r,i){const o=r.mul(i,St),s=r.pow(o,t),a=r.mul(i,s),f=r.mul(r.mul(a,St),s),u=r.mul(a,r.sub(f,r.ONE));if(!r.eql(r.sqr(u),i))throw new Error("Cannot find square root");return u}}return Sc(e)}const Ac=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Rc(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},n=Ac.reduce((r,i)=>(r[i]="function",r),t);return En(e,n)}function Ic(e,t,n){if(n<ye)throw new Error("Expected power > 0");if(n===ye)return e.ONE;if(n===pe)return t;let r=e.ONE,i=t;for(;n>ye;)n&pe&&(r=e.mul(r,i)),i=e.sqr(i),n>>=pe;return r}function Tc(e,t){const n=new Array(t.length),r=t.reduce((o,s,a)=>e.is0(s)?o:(n[a]=o,e.mul(o,s)),e.ONE),i=e.inv(r);return t.reduceRight((o,s,a)=>e.is0(s)?o:(n[a]=e.mul(o,n[a]),e.mul(o,s)),i),n}function Na(e,t){const n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function xc(e,t,n=!1,r={}){if(e<=ye)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:i,nByteLength:o}=Na(e,t);if(o>2048)throw new Error("Field lengths over 2048 bytes are not supported");const s=vc(e),a=Object.freeze({ORDER:e,BITS:i,BYTES:o,MASK:qi(i),ZERO:ye,ONE:pe,create:f=>Ce(f,e),isValid:f=>{if(typeof f!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof f}`);return ye<=f&&f<e},is0:f=>f===ye,isOdd:f=>(f&pe)===pe,neg:f=>Ce(-f,e),eql:(f,u)=>f===u,sqr:f=>Ce(f*f,e),add:(f,u)=>Ce(f+u,e),sub:(f,u)=>Ce(f-u,e),mul:(f,u)=>Ce(f*u,e),pow:(f,u)=>Ic(a,f,u),div:(f,u)=>Ce(f*mi(u,e),e),sqrN:f=>f*f,addN:(f,u)=>f+u,subN:(f,u)=>f-u,mulN:(f,u)=>f*u,inv:f=>mi(f,e),sqrt:r.sqrt||(f=>s(a,f)),invertBatch:f=>Tc(a,f),cmov:(f,u,g)=>g?u:f,toBytes:f=>n?Hi(f,o):Gt(f,o),fromBytes:f=>{if(f.length!==o)throw new Error(`Fp.fromBytes: expected ${o}, got ${f.length}`);return n?Fi(f):It(f)}});return Object.freeze(a)}function Pa(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function La(e){const t=Pa(e);return t+Math.ceil(t/2)}function Oc(e,t,n=!1){const r=e.length,i=Pa(t),o=La(t);if(r<16||r<o||r>1024)throw new Error(`expected ${o}-1024 bytes of input, got ${r}`);const s=n?It(e):Fi(e),a=Ce(s,t-pe)+pe;return n?Hi(a,i):Gt(a,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Cc=BigInt(0),ii=BigInt(1);function Nc(e,t){const n=(i,o)=>{const s=o.negate();return i?s:o},r=i=>{const o=Math.ceil(t/i)+1,s=2**(i-1);return{windows:o,windowSize:s}};return{constTimeNegate:n,unsafeLadder(i,o){let s=e.ZERO,a=i;for(;o>Cc;)o&ii&&(s=s.add(a)),a=a.double(),o>>=ii;return s},precomputeWindow(i,o){const{windows:s,windowSize:a}=r(o),f=[];let u=i,g=u;for(let p=0;p<s;p++){g=u,f.push(g);for(let v=1;v<a;v++)g=g.add(u),f.push(g);u=g.double()}return f},wNAF(i,o,s){const{windows:a,windowSize:f}=r(i);let u=e.ZERO,g=e.BASE;const p=BigInt(2**i-1),v=2**i,S=BigInt(i);for(let R=0;R<a;R++){const h=R*f;let w=Number(s&p);s>>=S,w>f&&(w-=v,s+=ii);const y=h,x=h+Math.abs(w)-1,m=R%2!==0,j=w<0;w===0?g=g.add(n(m,o[y])):u=u.add(n(j,o[x]))}return{p:u,f:g}},wNAFCached(i,o,s,a){const f=i._WINDOW_SIZE||1;let u=o.get(i);return u||(u=this.precomputeWindow(i,f),f!==1&&o.set(i,a(u))),this.wNAF(f,u,s)}}}function Ma(e){return Rc(e.Fp),En(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Na(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Pc(e){const t=Ma(e);En(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:n,Fp:r,a:i}=t;if(n){if(!r.eql(i,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}const{bytesToNumberBE:Lc,hexToBytes:Mc}=_c,At={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(e){const{Err:t}=At;if(e.length<2||e[0]!==2)throw new t("Invalid signature integer tag");const n=e[1],r=e.subarray(2,n+2);if(!n||r.length!==n)throw new t("Invalid signature integer: wrong length");if(r[0]&128)throw new t("Invalid signature integer: negative");if(r[0]===0&&!(r[1]&128))throw new t("Invalid signature integer: unnecessary leading zero");return{d:Lc(r),l:e.subarray(n+2)}},toSig(e){const{Err:t}=At,n=typeof e=="string"?Mc(e):e;mn(n);let r=n.length;if(r<2||n[0]!=48)throw new t("Invalid signature tag");if(n[1]!==r-2)throw new t("Invalid signature: incorrect length");const{d:i,l:o}=At._parseInt(n.subarray(2)),{d:s,l:a}=At._parseInt(o);if(a.length)throw new t("Invalid signature: left bytes after parsing");return{r:i,s}},hexFromSig(e){const t=u=>Number.parseInt(u[0],16)&8?"00"+u:u,n=u=>{const g=u.toString(16);return g.length&1?`0${g}`:g},r=t(n(e.s)),i=t(n(e.r)),o=r.length/2,s=i.length/2,a=n(o),f=n(s);return`30${n(s+o+4)}02${f}${i}02${a}${r}`}},nt=BigInt(0),De=BigInt(1);BigInt(2);const ps=BigInt(3);BigInt(4);function Bc(e){const t=Pc(e),{Fp:n}=t,r=t.toBytes||((R,h,w)=>{const y=h.toAffine();return wn(Uint8Array.from([4]),n.toBytes(y.x),n.toBytes(y.y))}),i=t.fromBytes||(R=>{const h=R.subarray(1),w=n.fromBytes(h.subarray(0,n.BYTES)),y=n.fromBytes(h.subarray(n.BYTES,2*n.BYTES));return{x:w,y}});function o(R){const{a:h,b:w}=t,y=n.sqr(R),x=n.mul(y,R);return n.add(n.add(x,n.mul(R,h)),w)}if(!n.eql(n.sqr(t.Gy),o(t.Gx)))throw new Error("bad generator point: equation left != right");function s(R){return typeof R=="bigint"&&nt<R&&R<t.n}function a(R){if(!s(R))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function f(R){const{allowedPrivateKeyLengths:h,nByteLength:w,wrapPrivateKey:y,n:x}=t;if(h&&typeof R!="bigint"){if(xt(R)&&(R=qt(R)),typeof R!="string"||!h.includes(R.length))throw new Error("Invalid key");R=R.padStart(w*2,"0")}let m;try{m=typeof R=="bigint"?R:It(qe("private key",R,w))}catch{throw new Error(`private key must be ${w} bytes, hex or bigint, not ${typeof R}`)}return y&&(m=Ce(m,x)),a(m),m}const u=new Map;function g(R){if(!(R instanceof p))throw new Error("ProjectivePoint expected")}class p{constructor(h,w,y){if(this.px=h,this.py=w,this.pz=y,h==null||!n.isValid(h))throw new Error("x required");if(w==null||!n.isValid(w))throw new Error("y required");if(y==null||!n.isValid(y))throw new Error("z required")}static fromAffine(h){const{x:w,y}=h||{};if(!h||!n.isValid(w)||!n.isValid(y))throw new Error("invalid affine point");if(h instanceof p)throw new Error("projective point not allowed");const x=m=>n.eql(m,n.ZERO);return x(w)&&x(y)?p.ZERO:new p(w,y,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(h){const w=n.invertBatch(h.map(y=>y.pz));return h.map((y,x)=>y.toAffine(w[x])).map(p.fromAffine)}static fromHex(h){const w=p.fromAffine(i(qe("pointHex",h)));return w.assertValidity(),w}static fromPrivateKey(h){return p.BASE.multiply(f(h))}_setWindowSize(h){this._WINDOW_SIZE=h,u.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!n.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:h,y:w}=this.toAffine();if(!n.isValid(h)||!n.isValid(w))throw new Error("bad point: x or y not FE");const y=n.sqr(w),x=o(h);if(!n.eql(y,x))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:h}=this.toAffine();if(n.isOdd)return!n.isOdd(h);throw new Error("Field doesn't support isOdd")}equals(h){g(h);const{px:w,py:y,pz:x}=this,{px:m,py:j,pz:P}=h,B=n.eql(n.mul(w,P),n.mul(m,x)),q=n.eql(n.mul(y,P),n.mul(j,x));return B&&q}negate(){return new p(this.px,n.neg(this.py),this.pz)}double(){const{a:h,b:w}=t,y=n.mul(w,ps),{px:x,py:m,pz:j}=this;let P=n.ZERO,B=n.ZERO,q=n.ZERO,k=n.mul(x,x),X=n.mul(m,m),Z=n.mul(j,j),$=n.mul(x,m);return $=n.add($,$),q=n.mul(x,j),q=n.add(q,q),P=n.mul(h,q),B=n.mul(y,Z),B=n.add(P,B),P=n.sub(X,B),B=n.add(X,B),B=n.mul(P,B),P=n.mul($,P),q=n.mul(y,q),Z=n.mul(h,Z),$=n.sub(k,Z),$=n.mul(h,$),$=n.add($,q),q=n.add(k,k),k=n.add(q,k),k=n.add(k,Z),k=n.mul(k,$),B=n.add(B,k),Z=n.mul(m,j),Z=n.add(Z,Z),k=n.mul(Z,$),P=n.sub(P,k),q=n.mul(Z,X),q=n.add(q,q),q=n.add(q,q),new p(P,B,q)}add(h){g(h);const{px:w,py:y,pz:x}=this,{px:m,py:j,pz:P}=h;let B=n.ZERO,q=n.ZERO,k=n.ZERO;const X=t.a,Z=n.mul(t.b,ps);let $=n.mul(w,m),D=n.mul(y,j),T=n.mul(x,P),ee=n.add(w,y),I=n.add(m,j);ee=n.mul(ee,I),I=n.add($,D),ee=n.sub(ee,I),I=n.add(w,x);let C=n.add(m,P);return I=n.mul(I,C),C=n.add($,T),I=n.sub(I,C),C=n.add(y,x),B=n.add(j,P),C=n.mul(C,B),B=n.add(D,T),C=n.sub(C,B),k=n.mul(X,I),B=n.mul(Z,T),k=n.add(B,k),B=n.sub(D,k),k=n.add(D,k),q=n.mul(B,k),D=n.add($,$),D=n.add(D,$),T=n.mul(X,T),I=n.mul(Z,I),D=n.add(D,T),T=n.sub($,T),T=n.mul(X,T),I=n.add(I,T),$=n.mul(D,I),q=n.add(q,$),$=n.mul(C,I),B=n.mul(ee,B),B=n.sub(B,$),$=n.mul(ee,D),k=n.mul(C,k),k=n.add(k,$),new p(B,q,k)}subtract(h){return this.add(h.negate())}is0(){return this.equals(p.ZERO)}wNAF(h){return S.wNAFCached(this,u,h,w=>{const y=n.invertBatch(w.map(x=>x.pz));return w.map((x,m)=>x.toAffine(y[m])).map(p.fromAffine)})}multiplyUnsafe(h){const w=p.ZERO;if(h===nt)return w;if(a(h),h===De)return this;const{endo:y}=t;if(!y)return S.unsafeLadder(this,h);let{k1neg:x,k1:m,k2neg:j,k2:P}=y.splitScalar(h),B=w,q=w,k=this;for(;m>nt||P>nt;)m&De&&(B=B.add(k)),P&De&&(q=q.add(k)),k=k.double(),m>>=De,P>>=De;return x&&(B=B.negate()),j&&(q=q.negate()),q=new p(n.mul(q.px,y.beta),q.py,q.pz),B.add(q)}multiply(h){a(h);let w=h,y,x;const{endo:m}=t;if(m){const{k1neg:j,k1:P,k2neg:B,k2:q}=m.splitScalar(w);let{p:k,f:X}=this.wNAF(P),{p:Z,f:$}=this.wNAF(q);k=S.constTimeNegate(j,k),Z=S.constTimeNegate(B,Z),Z=new p(n.mul(Z.px,m.beta),Z.py,Z.pz),y=k.add(Z),x=X.add($)}else{const{p:j,f:P}=this.wNAF(w);y=j,x=P}return p.normalizeZ([y,x])[0]}multiplyAndAddUnsafe(h,w,y){const x=p.BASE,m=(P,B)=>B===nt||B===De||!P.equals(x)?P.multiplyUnsafe(B):P.multiply(B),j=m(this,w).add(m(h,y));return j.is0()?void 0:j}toAffine(h){const{px:w,py:y,pz:x}=this,m=this.is0();h==null&&(h=m?n.ONE:n.inv(x));const j=n.mul(w,h),P=n.mul(y,h),B=n.mul(x,h);if(m)return{x:n.ZERO,y:n.ZERO};if(!n.eql(B,n.ONE))throw new Error("invZ was invalid");return{x:j,y:P}}isTorsionFree(){const{h,isTorsionFree:w}=t;if(h===De)return!0;if(w)return w(p,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h,clearCofactor:w}=t;return h===De?this:w?w(p,this):this.multiplyUnsafe(t.h)}toRawBytes(h=!0){return this.assertValidity(),r(p,this,h)}toHex(h=!0){return qt(this.toRawBytes(h))}}p.BASE=new p(t.Gx,t.Gy,n.ONE),p.ZERO=new p(n.ZERO,n.ONE,n.ZERO);const v=t.nBitLength,S=Nc(p,t.endo?Math.ceil(v/2):v);return{CURVE:t,ProjectivePoint:p,normPrivateKeyToScalar:f,weierstrassEquation:o,isWithinCurveOrder:s}}function $c(e){const t=Ma(e);return En(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function Dc(e){const t=$c(e),{Fp:n,n:r}=t,i=n.BYTES+1,o=2*n.BYTES+1;function s(I){return nt<I&&I<n.ORDER}function a(I){return Ce(I,r)}function f(I){return mi(I,r)}const{ProjectivePoint:u,normPrivateKeyToScalar:g,weierstrassEquation:p,isWithinCurveOrder:v}=Bc({...t,toBytes(I,C,F){const K=C.toAffine(),V=n.toBytes(K.x),Q=wn;return F?Q(Uint8Array.from([C.hasEvenY()?2:3]),V):Q(Uint8Array.from([4]),V,n.toBytes(K.y))},fromBytes(I){const C=I.length,F=I[0],K=I.subarray(1);if(C===i&&(F===2||F===3)){const V=It(K);if(!s(V))throw new Error("Point is not on curve");const Q=p(V);let J;try{J=n.sqrt(Q)}catch(ne){const ge=ne instanceof Error?": "+ne.message:"";throw new Error("Point is not on curve"+ge)}const le=(J&De)===De;return(F&1)===1!==le&&(J=n.neg(J)),{x:V,y:J}}else if(C===o&&F===4){const V=n.fromBytes(K.subarray(0,n.BYTES)),Q=n.fromBytes(K.subarray(n.BYTES,2*n.BYTES));return{x:V,y:Q}}else throw new Error(`Point of length ${C} was invalid. Expected ${i} compressed bytes or ${o} uncompressed bytes`)}}),S=I=>qt(Gt(I,t.nByteLength));function R(I){const C=r>>De;return I>C}function h(I){return R(I)?a(-I):I}const w=(I,C,F)=>It(I.slice(C,F));class y{constructor(C,F,K){this.r=C,this.s=F,this.recovery=K,this.assertValidity()}static fromCompact(C){const F=t.nByteLength;return C=qe("compactSignature",C,F*2),new y(w(C,0,F),w(C,F,2*F))}static fromDER(C){const{r:F,s:K}=At.toSig(qe("DER",C));return new y(F,K)}assertValidity(){if(!v(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!v(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(C){return new y(this.r,this.s,C)}recoverPublicKey(C){const{r:F,s:K,recovery:V}=this,Q=q(qe("msgHash",C));if(V==null||![0,1,2,3].includes(V))throw new Error("recovery id invalid");const J=V===2||V===3?F+t.n:F;if(J>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const le=V&1?"03":"02",M=u.fromHex(le+S(J)),ne=f(J),ge=a(-Q*ne),_e=a(K*ne),be=u.BASE.multiplyAndAddUnsafe(M,ge,_e);if(!be)throw new Error("point at infinify");return be.assertValidity(),be}hasHighS(){return R(this.s)}normalizeS(){return this.hasHighS()?new y(this.r,a(-this.s),this.recovery):this}toDERRawBytes(){return zt(this.toDERHex())}toDERHex(){return At.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return zt(this.toCompactHex())}toCompactHex(){return S(this.r)+S(this.s)}}const x={isValidPrivateKey(I){try{return g(I),!0}catch{return!1}},normPrivateKeyToScalar:g,randomPrivateKey:()=>{const I=La(t.n);return Oc(t.randomBytes(I),t.n)},precompute(I=8,C=u.BASE){return C._setWindowSize(I),C.multiply(BigInt(3)),C}};function m(I,C=!0){return u.fromPrivateKey(I).toRawBytes(C)}function j(I){const C=xt(I),F=typeof I=="string",K=(C||F)&&I.length;return C?K===i||K===o:F?K===2*i||K===2*o:I instanceof u}function P(I,C,F=!0){if(j(I))throw new Error("first arg must be private key");if(!j(C))throw new Error("second arg must be public key");return u.fromHex(C).multiply(g(I)).toRawBytes(F)}const B=t.bits2int||function(I){const C=It(I),F=I.length*8-t.nBitLength;return F>0?C>>BigInt(F):C},q=t.bits2int_modN||function(I){return a(B(I))},k=qi(t.nBitLength);function X(I){if(typeof I!="bigint")throw new Error("bigint expected");if(!(nt<=I&&I<k))throw new Error(`bigint expected < 2^${t.nBitLength}`);return Gt(I,t.nByteLength)}function Z(I,C,F=$){if(["recovered","canonical"].some(Se=>Se in F))throw new Error("sign() legacy options not supported");const{hash:K,randomBytes:V}=t;let{lowS:Q,prehash:J,extraEntropy:le}=F;Q==null&&(Q=!0),I=qe("msgHash",I),J&&(I=qe("prehashed msgHash",K(I)));const M=q(I),ne=g(C),ge=[X(ne),X(M)];if(le!=null&&le!==!1){const Se=le===!0?V(n.BYTES):le;ge.push(qe("extraEntropy",Se))}const _e=wn(...ge),be=M;function Ae(Se){const Te=B(Se);if(!v(Te))return;const Ue=f(Te),Re=u.BASE.multiply(Te).toAffine(),_=a(Re.x);if(_===nt)return;const E=a(Ue*a(be+_*ne));if(E===nt)return;let O=(Re.x===_?0:2)|Number(Re.y&De),W=E;return Q&&R(E)&&(W=h(E),O^=1),new y(_,W,O)}return{seed:_e,k2sig:Ae}}const $={lowS:t.lowS,prehash:!1},D={lowS:t.lowS,prehash:!1};function T(I,C,F=$){const{seed:K,k2sig:V}=Z(I,C,F),Q=t;return Ca(Q.hash.outputLen,Q.nByteLength,Q.hmac)(K,V)}u.BASE._setWindowSize(8);function ee(I,C,F,K=D){var Re;const V=I;if(C=qe("msgHash",C),F=qe("publicKey",F),"strict"in K)throw new Error("options.strict was renamed to lowS");const{lowS:Q,prehash:J}=K;let le,M;try{if(typeof V=="string"||xt(V))try{le=y.fromDER(V)}catch(_){if(!(_ instanceof At.Err))throw _;le=y.fromCompact(V)}else if(typeof V=="object"&&typeof V.r=="bigint"&&typeof V.s=="bigint"){const{r:_,s:E}=V;le=new y(_,E)}else throw new Error("PARSE");M=u.fromHex(F)}catch(_){if(_.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(Q&&le.hasHighS())return!1;J&&(C=t.hash(C));const{r:ne,s:ge}=le,_e=q(C),be=f(ge),Ae=a(_e*be),Se=a(ne*be),Te=(Re=u.BASE.multiplyAndAddUnsafe(M,Ae,Se))==null?void 0:Re.toAffine();return Te?a(Te.x)===ne:!1}return{CURVE:t,getPublicKey:m,getSharedSecret:P,sign:T,verify:ee,ProjectivePoint:u,Signature:y,utils:x}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function jc(e){return{hash:e,hmac:(t,...n)=>Ta(e,t,ec(...n)),randomBytes:nc}}function kc(e,t){const n=r=>Dc({...e,...jc(r)});return Object.freeze({...n(t),create:n})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ba=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),bs=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Wc=BigInt(1),Ei=BigInt(2),ws=(e,t)=>(e+t/Ei)/t;function Uc(e){const t=Ba,n=BigInt(3),r=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),a=BigInt(44),f=BigInt(88),u=e*e*e%t,g=u*u*e%t,p=$e(g,n,t)*g%t,v=$e(p,n,t)*g%t,S=$e(v,Ei,t)*u%t,R=$e(S,i,t)*S%t,h=$e(R,o,t)*R%t,w=$e(h,a,t)*h%t,y=$e(w,f,t)*w%t,x=$e(y,a,t)*h%t,m=$e(x,n,t)*g%t,j=$e(m,s,t)*R%t,P=$e(j,r,t)*u%t,B=$e(P,Ei,t);if(!Si.eql(Si.sqr(B),e))throw new Error("Cannot find square root");return B}const Si=xc(Ba,void 0,void 0,{sqrt:Uc}),zi=kc({a:BigInt(0),b:BigInt(7),Fp:Si,n:bs,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=bs,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-Wc*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=n,s=BigInt("0x100000000000000000000000000000000"),a=ws(o*e,t),f=ws(-r*e,t);let u=Ce(e-a*n-f*i,t),g=Ce(-a*r-f*o,t);const p=u>s,v=g>s;if(p&&(u=t-u),v&&(g=t-g),u>s||g>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:p,k1:u,k2neg:v,k2:g}}}},uc);BigInt(0);zi.ProjectivePoint;function Fc(e){let t=e;if(typeof t!="string")throw new Error(`[padToEven] value must be type 'string', received ${typeof t}`);return t.length%2&&(t=`0${t}`),t}BigInt(0);const vi={},Ai={};for(let e=0;e<16;e++){const t=e,n=e*16,r=e.toString(16).toLowerCase();Ai[r]=t,Ai[r.toUpperCase()]=t,vi[r]=n,vi[r.toUpperCase()]=n}function Hc(e){const t=e.length,n=new Uint8Array(t/2);for(let r=0;r<t;r+=2)n[r/2]=vi[e[r]]+Ai[e[r+1]];return n}Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));for(let e=0;e<=256*256-1;e++)BigInt(e);const yr=e=>{if(typeof e!="string")throw new Error(`hex argument type ${typeof e} must be of type string`);if(!/^0x[0-9a-fA-F]*$/.test(e))throw new Error(`Input must be a 0x-prefixed hexadecimal string, got ${e}`);const t=e.slice(2);return Hc(t.length%2===0?t:Fc(t))},qc=e=>{if(!Number.isSafeInteger(e)||e<0)throw new Error(`Received an invalid integer type: ${e}`);return`0x${e.toString(16)}`},Sn=e=>{const t=qc(e);return yr(t)};BigInt("0xffffffffffffffff");BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935");zi.CURVE.n;zi.CURVE.n/BigInt(2);BigInt("0x10000000000000000000000000000000000000000000000000000000000000000");const zc="0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470";yr(zc);const Gc="0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347";yr(Gc);const Vc="0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421";yr(Vc);Uint8Array.from([128]);BigInt(-1);BigInt(0);BigInt(1);BigInt(2);BigInt(3);BigInt(7);BigInt(8);BigInt(27);BigInt(28);BigInt(31);BigInt(32);BigInt(64);BigInt(128);BigInt(255);BigInt(256);BigInt(96);BigInt(100);BigInt(160);BigInt(224);BigInt(7922816251426434e13);BigInt(1461501637330903e33);BigInt(2695994666715064e52);BigInt(1e9);Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));var ys;(function(e){e.String="string",e.Bytes="view",e.Number="number"})(ys||(ys={}));var _s;(function(e){e.String="string",e.Bytes="view",e.JSON="json"})(_s||(_s={}));var ms;(function(e){e[e.Number=0]="Number",e[e.BigInt=1]="BigInt",e[e.Uint8Array=2]="Uint8Array",e[e.PrefixedHexString=3]="PrefixedHexString"})(ms||(ms={}));var Es;(function(e){e[e.Deposit=0]="Deposit",e[e.Withdrawal=1]="Withdrawal",e[e.Consolidation=2]="Consolidation"})(Es||(Es={}));var Ot;(function(e){e[e.Version=0]="Version",e[e.Balance=1]="Balance",e[e.Nonce=2]="Nonce",e[e.CodeHash=3]="CodeHash",e[e.CodeSize=4]="CodeSize"})(Ot||(Ot={}));Sn(Ot.Version);Sn(Ot.Balance);Sn(Ot.Nonce);Sn(Ot.CodeHash);Sn(Ot.CodeSize);BigInt(256)**BigInt(31);var Kc={exports:{}},Gi={},Vi={};Object.defineProperty(Vi,"__esModule",{value:!0});function Yc(e){var t=4,n=e.length,r=n%t;if(!r)return e;var i=n,o=t-r,s=n+o,a=Me.Buffer.alloc(s);for(a.write(e);o--;)a.write("=",i++);return a.toString()}Vi.default=Yc;Object.defineProperty(Gi,"__esModule",{value:!0});var Zc=Vi;function $a(e,t){return t===void 0&&(t="utf8"),Me.Buffer.isBuffer(e)?Ri(e.toString("base64")):Ri(Me.Buffer.from(e,t).toString("base64"))}function Jc(e,t){return t===void 0&&(t="utf8"),Me.Buffer.from(Ki(e),"base64").toString(t)}function Ki(e){return e=e.toString(),Zc.default(e).replace(/\-/g,"+").replace(/_/g,"/")}function Ri(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function Xc(e){return Me.Buffer.from(Ki(e),"base64")}var Yt=$a;Yt.encode=$a;Yt.decode=Jc;Yt.toBase64=Ki;Yt.fromBase64=Ri;Yt.toBuffer=Xc;Gi.default=Yt;(function(e){e.exports=Gi.default,e.exports.default=e.exports})(Kc);const ue={MAINNET:"mainnet",TESTNET:"testnet",CYAN:"cyan",AQUA:"aqua",CELESTE:"celeste"},ct={SAPPHIRE_DEVNET:"sapphire_devnet",SAPPHIRE_MAINNET:"sapphire_mainnet"};ue.MAINNET+"",ue.TESTNET+"",ue.CYAN+"",ue.AQUA+"",ue.CELESTE+"";ue.AQUA+"",ct.SAPPHIRE_MAINNET,ue.CELESTE+"",ct.SAPPHIRE_MAINNET,ue.CYAN+"",ct.SAPPHIRE_MAINNET,ue.MAINNET+"",ct.SAPPHIRE_MAINNET,ue.TESTNET+"",ct.SAPPHIRE_DEVNET;ue.MAINNET+"",ue.TESTNET+"",ue.CYAN+"",ue.AQUA+"",ue.CELESTE+"";ct.SAPPHIRE_MAINNET+"",ct.SAPPHIRE_DEVNET+"",ue.MAINNET+"",ue.TESTNET+"",ue.CYAN+"",ue.AQUA+"",ue.CELESTE+"";ue.MAINNET+"",ue.TESTNET+"",ue.CYAN+"",ue.AQUA+"",ue.CELESTE+"";function Ss(e){let t=!1,n=0,r;try{r=window[e],t=!0,n=r.length;const i="__storage_test__";return r.setItem(i,i),r.removeItem(i),!0}catch(i){const o=i;return o&&(o.code===22||o.code===1014||o.name==="QuotaExceededError"||o.name==="NS_ERROR_DOM_QUOTA_REACHED")&&t&&n!==0}}class Qc{constructor(){G(this,"store",new Map)}getItem(t){return this.store.get(t)||null}setItem(t,n){this.store.set(t,n)}removeItem(t){this.store.delete(t)}}class eh{constructor(t,n){G(this,"storage",void 0),G(this,"_storeKey",void 0),this.storage=n,this._storeKey=t;try{n.getItem(t)||this.resetStore()}catch{}}static getInstance(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"local";if(!this.instanceMap.has(t)){let r;n==="local"&&Ss("localStorage")?r=window.localStorage:n==="session"&&Ss("sessionStorage")?r=window.sessionStorage:r=new Qc,this.instanceMap.set(t,new this(t,r))}return this.instanceMap.get(t)}toJSON(){return this.storage.getItem(this._storeKey)}resetStore(){const t=this.getStore();return this.storage.removeItem(this._storeKey),t}getStore(){return JSON.parse(this.storage.getItem(this._storeKey)||"{}")}get(t){return JSON.parse(this.storage.getItem(this._storeKey)||"{}")[t]}set(t,n){const r=JSON.parse(this.storage.getItem(this._storeKey)||"{}");r[t]=n,this.storage.setItem(this._storeKey,JSON.stringify(r))}}G(eh,"instanceMap",new Map);je(je({},ct),ue);const Hn={IFRAME_STATUS:"iframe_status",CLOSE_WINDOW:"close_window",USER_LOGGED_IN:"user_logged_in",USER_LOGGED_OUT:"user_logged_out"},rt={LOGOUT:"logout",WALLET_INSTANCE_ID:"wallet_instance_id",USER_INFO:"user_info",SET_PROVIDER:"set_provider",TOPUP:"topup",IFRAME_STATUS:"iframe_status",CLOSED_WINDOW:"closed_window",WINDOW_BLOCKED:"window_blocked",GET_PROVIDER_STATE:"get_provider_state",LOGIN_WITH_PRIVATE_KEY:"login_with_private_key",SHOW_WALLET_CONNECT:"show_wallet_connect",SHOW_CHECKOUT:"show_checkout",SHOW_WALLET_UI:"show_wallet_ui",LOGIN_WITH_SESSION_ID:"login_with_session_id"},th={GET_PROVIDER_STATE:"wallet_get_provider_state"},oi={ACCOUNTS_CHANGED:"wallet_accounts_changed",CHAIN_CHANGED:"wallet_chain_changed",UNLOCK_STATE_CHANGED:"wallet_unlock_state_changed"};function nh(e){return function(n,r,i){i(o=>{r.error&&er.warn(`Error in RPC response:
3
- `,r),!n.isTorusInternal&&(er.info(`RPC (${e.origin}):`,n,"->",r),o())})}}var rh=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(o=Object.keys(t),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!e(t[s],n[s]))return!1}return!0}return t!==t&&n!==n};const ih=Vt(rh);var oh="2.1.0";function Da(e){return e!==null&&typeof e=="object"&&typeof e.pipe=="function"}function sh(e){return Da(e)&&e.writable!==!1&&typeof e._write=="function"&&typeof e._writableState=="object"}function ah(e){return Da(e)&&e.readable!==!1&&typeof e._read=="function"&&typeof e._readableState=="object"}function lh(e){return sh(e)&&ah(e)}var Ve={errors:{disconnected:()=>"Torus: Lost connection to Torus.",permanentlyDisconnected:()=>"Torus: Disconnected from iframe. Page reload required.",unsupportedSync:e=>`Torus: The Torus Ethereum provider does not support synchronous methods like ${e} without a callback parameter.`,invalidDuplexStream:()=>"Must provide a Node.js-style duplex stream.",invalidOptions:e=>`Invalid options. Received: { maxEventListeners: ${e}}`,invalidRequestArgs:()=>"Expected a single, non-array, object argument.",invalidRequestMethod:()=>"'args.method' must be a non-empty string.",invalidRequestParams:()=>"'args.params' must be an object or array if provided.",invalidLoggerObject:()=>"'args.logger' must be an object if provided.",invalidLoggerMethod:e=>`'args.logger' must include required method '${e}'.`},info:{connected:e=>`Torus: Connected to chain with ID "${e}".`}};const uh={PRODUCTION:"production"},fn={BOTTOM_LEFT:"bottom-left",TOP_LEFT:"top-left",BOTTOM_RIGHT:"bottom-right",TOP_RIGHT:"top-right"},fh={en:{embed:{continue:"Continue",actionRequired:"Authorization required",pendingAction:"Click continue to proceed with your request in a popup",cookiesRequired:"Cookies Required",enableCookies:"Please enable cookies in your browser preferences to access Torus",clickHere:"More Info"}},de:{embed:{continue:"Fortsetzen",actionRequired:"Autorisierung erforderlich",pendingAction:"Klicken Sie in einem Popup auf Weiter, um mit Ihrer Anfrage fortzufahren",cookiesRequired:"Cookies benötigt",enableCookies:"Bitte aktivieren Sie Cookies in Ihren Browsereinstellungen, um auf Torus zuzugreifen",clickHere:"Mehr Info"}},ja:{embed:{continue:"継続する",actionRequired:"認証が必要です",pendingAction:"続行をクリックして、ポップアップでリクエストを続行します",cookiesRequired:"必要なクッキー",enableCookies:"Torusにアクセスするには、ブラウザの設定でCookieを有効にしてください。",clickHere:"詳しくは"}},ko:{embed:{continue:"계속하다",actionRequired:"승인 필요",pendingAction:"팝업에서 요청을 진행하려면 계속을 클릭하십시오.",cookiesRequired:"쿠키 필요",enableCookies:"브라우저 환경 설정에서 쿠키를 활성화하여 Torus에 액세스하십시오.",clickHere:"더 많은 정보"}},zh:{embed:{continue:"继续",actionRequired:"需要授权",pendingAction:"单击继续以在弹出窗口中继续您的请求",cookiesRequired:"必填Cookie",enableCookies:"请在您的浏览器首选项中启用cookie以访问Torus。",clickHere:"更多信息"}}};var Yi={translations:fh,localStorageKeyPrefix:"torus-"},ae=er.getLogger("solana-embed");function dh(){return(e,t,n)=>{(typeof e.method!="string"||!e.method)&&(t.error=it.ethErrors.rpc.invalidRequest({message:"The request 'method' must be a non-empty string.",data:e})),n(r=>{const{error:i}=t;return i&&ae.error(`Torus - RPC Error: ${i.message}`,i),r()})}}function ch(e,t,n){let r=`Torus: Lost connection to "${e}".`;t!=null&&t.stack&&(r+=`
4
- ${t.stack}`),ae.warn(r),n&&n.listenerCount("error")>0&&n.emit("error",r)}const qn=()=>Math.random().toString(36).slice(2),ja=async e=>{let t,n;switch(e){case"testing":t="https://solana-testing.tor.us",n="debug";break;case"development":t="http://localhost:8080",n="debug";break;default:t="https://solana.tor.us",n="error";break}return{torusUrl:t,logLevel:n}},hh=()=>{let e=window.navigator.language||"en-US";const t=e.split("-");return e=Object.prototype.hasOwnProperty.call(Yi.translations,t[0])?t[0]:"en",e},gh={height:660,width:375},ph={height:740,width:1315},bh={height:700,width:1200},ka={height:600,width:400};function wh(e){let t;try{t=window[e];const n="__storage_test__";return t.setItem(n,n),t.removeItem(n),!0}catch(n){const r=n;return r&&(r.code===22||r.code===1014||r.name==="QuotaExceededError"||r.name==="NS_ERROR_DOM_QUOTA_REACHED")&&t&&t.length!==0}}function cn(e){let{width:t,height:n}=e;const r=window.screenLeft!==void 0?window.screenLeft:window.screenX,i=window.screenTop!==void 0?window.screenTop:window.screenY,o=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:window.screen.width,s=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:window.screen.height,a=1,f=Math.abs((o-t)/2/a+r),u=Math.abs((s-n)/2/a+i);return`titlebar=0,toolbar=0,status=0,location=0,menubar=0,height=${n/a},width=${t/a},top=${u},left=${f}`}class Wa extends pr{constructor(t,n){let{maxEventListeners:r=100,jsonRpcStreamName:i="provider"}=n;if(super(),G(this,"isTorus",void 0),G(this,"_rpcEngine",void 0),G(this,"jsonRpcConnectionEvents",void 0),G(this,"_state",void 0),!lh(t))throw new Error(Ve.errors.invalidDuplexStream());this.isTorus=!0,this.setMaxListeners(r),this._handleConnect=this._handleConnect.bind(this),this._handleDisconnect=this._handleDisconnect.bind(this),this._handleStreamDisconnect=this._handleStreamDisconnect.bind(this),this._rpcRequest=this._rpcRequest.bind(this),this._initializeState=this._initializeState.bind(this),this.request=this.request.bind(this),this.sendAsync=this.sendAsync.bind(this);const o=new Vd;Xo(t,o,t,this._handleStreamDisconnect.bind(this,"Torus")),o.ignoreStream("phishing");const s=qd();Xo(s.stream,o.createStream(i),s.stream,this._handleStreamDisconnect.bind(this,"Torus RpcProvider"));const a=new tt;a.push(zd()),a.push(dh()),a.push(nh({origin:location.origin})),a.push(s.middleware),this._rpcEngine=a,this.jsonRpcConnectionEvents=s.events}async request(t){if(!t||typeof t!="object"||Array.isArray(t))throw it.ethErrors.rpc.invalidRequest({message:Ve.errors.invalidRequestArgs(),data:t});const{method:n,params:r}=t;if(typeof n!="string"||n.length===0)throw it.ethErrors.rpc.invalidRequest({message:Ve.errors.invalidRequestMethod(),data:t});if(r!==void 0&&!Array.isArray(r)&&(typeof r!="object"||r===null))throw it.ethErrors.rpc.invalidRequest({message:Ve.errors.invalidRequestParams(),data:t});return new Promise((i,o)=>{this._rpcRequest({method:n,params:r},yi(i,o))})}send(t,n){this._rpcRequest(t,n)}sendAsync(t){return new Promise((n,r)=>{this._rpcRequest(t,yi(n,r))})}_handleStreamDisconnect(t,n){ch(t,n,this),this._handleDisconnect(!1,n?n.message:void 0)}}const Ut=e=>{const t=window.document.createElement("template"),n=e.trim();return t.innerHTML=n,t.content.firstChild};function zn(e){return e.version===void 0}class Ua extends pr{constructor(t){let{url:n,target:r,features:i,timeout:o=3e4}=t;super(),G(this,"url",void 0),G(this,"target",void 0),G(this,"features",void 0),G(this,"window",void 0),G(this,"windowTimer",void 0),G(this,"iClosedWindow",void 0),G(this,"timeout",void 0),this.url=n,this.target=r||"_blank",this.features=i||cn(bh),this.window=void 0,this.windowTimer=void 0,this.iClosedWindow=!1,this.timeout=o,this._setupTimer()}_setupTimer(){this.windowTimer=Number(setInterval(()=>{this.window&&this.window.closed&&(clearInterval(this.windowTimer),setTimeout(()=>{this.iClosedWindow||this.emit("close"),this.iClosedWindow=!1,this.window=void 0},this.timeout)),this.window===void 0&&clearInterval(this.windowTimer)},500))}open(){var t;return this.window=window.open(this.url.href,this.target,this.features),(t=this.window)!=null&&t.focus&&this.window.focus(),Promise.resolve()}close(){this.iClosedWindow=!0,this.window&&this.window.close()}redirect(t){t?window.location.replace(this.url.href):window.location.href=this.url.href}}class _r extends Wa{constructor(t,n){let{maxEventListeners:r=100,jsonRpcStreamName:i="provider"}=n;super(t,{maxEventListeners:r,jsonRpcStreamName:i}),G(this,"embedTranslations",void 0),G(this,"torusUrl",void 0),G(this,"dappStorageKey",void 0),G(this,"windowRefs",void 0),G(this,"tryWindowHandle",void 0),G(this,"torusAlertContainer",void 0),G(this,"torusIframe",void 0),this._state=je({},_r._defaultState),this.torusUrl="",this.dappStorageKey="";const o=Yi.translations[hh()];this.embedTranslations=o.embed,this.windowRefs={},this.on("connect",()=>{this._state.isConnected=!0});const s=a=>{const{method:f,params:u}=a;if(f===Hn.IFRAME_STATUS){const{isFullScreen:g,rid:p}=u;this._displayIframe({isFull:g,rid:p})}else if(f==="create_window"){const{windowId:g,url:p}=u;this._createPopupBlockAlert(g,p)}else if(f===Hn.CLOSE_WINDOW)this._handleCloseWindow(u);else if(f===Hn.USER_LOGGED_IN){const{currentLoginProvider:g}=u;this._state.isLoggedIn=!0,this._state.currentLoginProvider=g}else f===Hn.USER_LOGGED_OUT&&(this._state.isLoggedIn=!1,this._state.currentLoginProvider=null,this._displayIframe())};this.jsonRpcConnectionEvents.on("notification",s)}get isLoggedIn(){return this._state.isLoggedIn}get isIFrameFullScreen(){return this._state.isIFrameFullScreen}isConnected(){return this._state.isConnected}async _initializeState(t){try{const{torusUrl:n,dappStorageKey:r,torusAlertContainer:i,torusIframe:o}=t;this.torusUrl=n,this.dappStorageKey=r,this.torusAlertContainer=i,this.torusIframe=o,this.torusIframe.addEventListener("load",()=>{this._state.isIFrameFullScreen||this._displayIframe()});const{currentLoginProvider:s,isLoggedIn:a}=await this.request({method:rt.GET_PROVIDER_STATE,params:[]});this._handleConnect(s,a)}catch(n){ae.error("Torus: Failed to get initial state. Please report this bug.",n)}finally{ae.info("initialized communication state"),this._state.initialized=!0,this.emit("_initialized")}}_handleWindow(t){let{url:n,target:r,features:i}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const o=new URL(n||`${this.torusUrl}/redirect?windowId=${t}`);this.dappStorageKey&&(o.hash?o.hash+=`&dappStorageKey=${this.dappStorageKey}`:o.hash=`#dappStorageKey=${this.dappStorageKey}`);const s=new Ua({url:o,target:r,features:i});if(s.open(),!s.window){this._createPopupBlockAlert(t,o.href);return}this.windowRefs[t]=s,this.request({method:"opened_window",params:{windowId:t}}),s.once("close",()=>{delete this.windowRefs[t],this.request({method:rt.CLOSED_WINDOW,params:{windowId:t}})})}_displayIframe(){let{isFull:t=!1,rid:n=""}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r={};if(t)r.display="block",r.width="100%",r.height="100%",r.top="0px",r.right="0px",r.left="0px",r.bottom="0px";else switch(r.display=this._state.torusWidgetVisibility?"block":"none",r.height="70px",r.width="70px",this._state.buttonPosition){case fn.TOP_LEFT:r.top="0px",r.left="0px",r.right="auto",r.bottom="auto";break;case fn.TOP_RIGHT:r.top="0px",r.right="0px",r.left="auto",r.bottom="auto";break;case fn.BOTTOM_RIGHT:r.bottom="0px",r.right="0px",r.top="auto",r.left="auto";break;case fn.BOTTOM_LEFT:default:r.bottom="0px",r.left="0px",r.top="auto",r.right="auto";break}Object.assign(this.torusIframe.style,r),this._state.isIFrameFullScreen=t,this.request({method:rt.IFRAME_STATUS,params:{isIFrameFullScreen:t,rid:n}})}hideTorusButton(){this._state.torusWidgetVisibility=!1,this._displayIframe()}showTorusButton(){this._state.torusWidgetVisibility=!0,this._displayIframe()}_rpcRequest(t,n){const r=n,i=t;Array.isArray(i)||i.jsonrpc||(i.jsonrpc="2.0"),this.tryWindowHandle(i,r)}_handleConnect(t,n){this._state.isConnected||(this._state.isConnected=!0,this.emit("connect",{currentLoginProvider:t,isLoggedIn:n}),ae.debug(Ve.info.connected(t)))}_handleDisconnect(t,n){if(this._state.isConnected||!this._state.isPermanentlyDisconnected&&!t){this._state.isConnected=!1;let r;t?(r=new it.EthereumRpcError(1013,n||Ve.errors.disconnected()),ae.debug(r)):(r=new it.EthereumRpcError(1011,n||Ve.errors.permanentlyDisconnected()),ae.error(r),this._state.currentLoginProvider=null,this._state.isLoggedIn=!1,this._state.torusWidgetVisibility=!1,this._state.isIFrameFullScreen=!1,this._state.isPermanentlyDisconnected=!0),this.emit("disconnect",r)}}_handleCloseWindow(t){const{windowId:n}=t;this.windowRefs[n]&&(this.windowRefs[n].close(),delete this.windowRefs[n])}async _createPopupBlockAlert(t,n){const r=this.getLogoUrl(),i=Ut(`<div id="torusAlert" class="torus-alert--v2"><div id="torusAlert__logo"><img src="${r}" /></div><div><h1 id="torusAlert__title">${this.embedTranslations.actionRequired}</h1><p id="torusAlert__desc">${this.embedTranslations.pendingAction}</p></div></div>`),o=Ut(`<div><a id="torusAlert__btn">${this.embedTranslations.continue}</a></div>`),s=Ut('<div id="torusAlert__btn-container"></div>');s.appendChild(o),i.appendChild(s);const a=()=>{o.addEventListener("click",()=>{this._handleWindow(t,{url:n,target:"_blank",features:cn(ka)}),i.remove(),this.torusAlertContainer.children.length===0&&(this.torusAlertContainer.style.display="none")})};(()=>{this.torusAlertContainer.appendChild(i)})(),a(),this.torusAlertContainer.style.display="block"}getLogoUrl(){return`${this.torusUrl}/images/torus_icon-blue.svg`}}G(_r,"_defaultState",{buttonPosition:"bottom-left",currentLoginProvider:null,isIFrameFullScreen:!1,hasEmittedConnection:!1,torusWidgetVisibility:!1,initialized:!1,isLoggedIn:!1,isPermanentlyDisconnected:!1,isConnected:!1});class mr extends Wa{constructor(t,n){let{maxEventListeners:r=100,jsonRpcStreamName:i="provider"}=n;super(t,{maxEventListeners:r,jsonRpcStreamName:i}),G(this,"chainId",void 0),G(this,"selectedAddress",void 0),G(this,"tryWindowHandle",void 0),this._state=je({},mr._defaultState),this.selectedAddress=null,this.chainId=null,this._handleAccountsChanged=this._handleAccountsChanged.bind(this),this._handleChainChanged=this._handleChainChanged.bind(this),this._handleUnlockStateChanged=this._handleUnlockStateChanged.bind(this),this.on("connect",()=>{this._state.isConnected=!0});const o=s=>{const{method:a,params:f}=s;a===oi.ACCOUNTS_CHANGED?this._handleAccountsChanged(f):a===oi.UNLOCK_STATE_CHANGED?this._handleUnlockStateChanged(f):a===oi.CHAIN_CHANGED&&this._handleChainChanged(f)};this.jsonRpcConnectionEvents.on("notification",o)}isConnected(){return this._state.isConnected}async _initializeState(){try{const{accounts:t,chainId:n,isUnlocked:r}=await this.request({method:th.GET_PROVIDER_STATE,params:[]});this.emit("connect",{chainId:n}),this._handleChainChanged({chainId:n}),this._handleUnlockStateChanged({accounts:t,isUnlocked:r}),this._handleAccountsChanged(t)}catch(t){ae.error("Torus: Failed to get initial state. Please report this bug.",t)}finally{ae.info("initialized provider state"),this._state.initialized=!0,this.emit("_initialized")}}_rpcRequest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=n;const o=t;if(!Array.isArray(o)){if(o.jsonrpc||(o.jsonrpc="2.0"),o.method==="solana_accounts"||o.method==="solana_requestAccounts")i=(s,a)=>{this._handleAccountsChanged(a.result||[],o.method==="solana_accounts",r),n(s,a)};else if(o.method==="wallet_getProviderState"){this._rpcEngine.handle(t,i);return}}this.tryWindowHandle(o,i)}_handleConnect(t){this._state.isConnected||(this._state.isConnected=!0,this.emit("connect",{chainId:t}),ae.debug(Ve.info.connected(t)))}_handleDisconnect(t,n){if(this._state.isConnected||!this._state.isPermanentlyDisconnected&&!t){this._state.isConnected=!1;let r;t?(r=new it.EthereumRpcError(1013,n||Ve.errors.disconnected()),ae.debug(r)):(r=new it.EthereumRpcError(1011,n||Ve.errors.permanentlyDisconnected()),ae.error(r),this.chainId=null,this._state.accounts=null,this.selectedAddress=null,this._state.isUnlocked=!1,this._state.isPermanentlyDisconnected=!0),this.emit("disconnect",r)}}_handleAccountsChanged(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=t;Array.isArray(i)||(ae.error("Torus: Received non-array accounts parameter. Please report this bug.",i),i=[]);for(const o of t)if(typeof o!="string"){ae.error("Torus: Received non-string account. Please report this bug.",t),i=[];break}ih(this._state.accounts,i)||(n&&Array.isArray(this._state.accounts)&&this._state.accounts.length>0&&!r&&ae.error('Torus: "solana_accounts" unexpectedly updated accounts. Please report this bug.',i),this._state.accounts=i,this.emit("accountsChanged",i)),this.selectedAddress!==i[0]&&(this.selectedAddress=i[0]||null)}_handleChainChanged(){let{chainId:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!t){ae.error("Torus: Received invalid network parameters. Please report this bug.",{chainId:t});return}t==="loading"?this._handleDisconnect(!0):(this._handleConnect(t),t!==this.chainId&&(this.chainId=t,this._state.initialized&&this.emit("chainChanged",this.chainId)))}_handleUnlockStateChanged(){let{accounts:t,isUnlocked:n}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(typeof n!="boolean"){ae.error("Torus: Received invalid isUnlocked parameter. Please report this bug.",{isUnlocked:n});return}n!==this._state.isUnlocked&&(this._state.isUnlocked=n,this._handleAccountsChanged(t||[]))}}G(mr,"_defaultState",{accounts:null,isConnected:!1,isUnlocked:!1,initialized:!1,isPermanentlyDisconnected:!1,hasEmittedConnection:!1});function vs(e){return new Promise((t,n)=>{try{const r=document.createElement("img");r.onload=()=>t(!0),r.onerror=()=>t(!1),r.src=e}catch(r){n(r)}})}const yh=e=>{const{document:t}=e,n=t.querySelector('head > meta[property="og:site_name"]');if(n)return n.content;const r=t.querySelector('head > meta[name="title"]');return r?r.content:t.title&&t.title.length>0?t.title:e.location.hostname};async function _h(e){try{const{document:t}=e;let n=t.querySelector('head > link[rel="shortcut icon"]');return n&&await vs(n.href)||(n=Array.from(t.querySelectorAll('head > link[rel="icon"]')).find(r=>!!r.href),n&&await vs(n.href))?n.href:""}catch{return""}}const mh=async()=>({name:yh(window),icon:await _h(window)}),Eh=["send_transaction","sign_transaction","sign_all_transactions","sign_message","connect"],Sh=[rt.SET_PROVIDER],vh=wh("localStorage");(async function(){try{if(typeof document>"u")return;const t=document.createElement("link"),{torusUrl:n}=await ja("production");t.href=`${n}/frame`,t.crossOrigin="anonymous",t.type="text/html",t.rel="prefetch",t.relList&&t.relList.supports&&t.relList.supports("prefetch")&&document.head.appendChild(t)}catch(t){ae.warn(t)}})();class Wh{constructor(){let{modalZIndex:t=99999}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};G(this,"isInitialized",void 0),G(this,"torusAlert",void 0),G(this,"modalZIndex",void 0),G(this,"alertZIndex",void 0),G(this,"requestedLoginProvider",void 0),G(this,"provider",void 0),G(this,"communicationProvider",void 0),G(this,"dappStorageKey",void 0),G(this,"isTopupHidden",!1),G(this,"torusAlertContainer",void 0),G(this,"torusUrl",void 0),G(this,"torusIframe",void 0),G(this,"styleLink",void 0),this.torusUrl="",this.isInitialized=!1,this.requestedLoginProvider=null,this.modalZIndex=t,this.alertZIndex=t+1e3,this.dappStorageKey=""}get isLoggedIn(){return this.communicationProvider?this.communicationProvider.isLoggedIn:!1}async init(){let{buildEnv:t=uh.PRODUCTION,enableLogging:n=!1,network:r,showTorusButton:i=!1,useLocalStorage:o=!1,buttonPosition:s=fn.BOTTOM_LEFT,apiKey:a="torus-default",extraParams:f={},whiteLabel:u}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(this.isInitialized)throw new Error("Already initialized");const{torusUrl:g,logLevel:p}=await ja(t);ae.enableAll(),ae.info(g,"url loaded"),ae.info(`Solana Embed Version :${oh}`),this.torusUrl=g,ae.setDefaultLevel(p),n?ae.enableAll():ae.disableAll();const v=this.handleDappStorageKey(o),S=new URL(g);S.pathname.endsWith("/")?S.pathname+="frame":S.pathname+="/frame";const R=new URLSearchParams;return v&&R.append("dappStorageKey",v),R.append("origin",window.location.origin),S.hash=R.toString(),this.torusIframe=Ut(`<iframe
5
- id="torusIframe"
6
- class="torusIframe"
7
- src="${S.href}"
8
- style="display: none; position: fixed; top: 0; right: 0; width: 100%;
9
- height: 100%; border: none; border-radius: 0; z-index: ${this.modalZIndex.toString()}"
10
- ></iframe>`),this.torusAlertContainer=Ut(`<div id="torusAlertContainer" style="display:none; z-index: ${this.alertZIndex.toString()}"></div>`),this.styleLink=Ut(`<link href="${g}/css/widget.css" rel="stylesheet" type="text/css">`),new Promise((h,w)=>{try{this.torusIframe.addEventListener("load",async()=>{const y=await mh();this.torusIframe.contentWindow.postMessage({buttonPosition:s,apiKey:a,network:r,dappMetadata:y,extraParams:f,whiteLabel:u},S.origin),await this._setupWeb3({torusUrl:g}),i&&this.showTorusButton(),u!=null&&u.topupHide?this.isTopupHidden=u.topupHide:this.hideTorusButton(),this.isInitialized=!0,window.torus=this,h()}),window.document.head.appendChild(this.styleLink),window.document.body.appendChild(this.torusIframe),window.document.body.appendChild(this.torusAlertContainer)}catch(y){w(y)}})}async login(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.isInitialized)throw new Error("Call init() first");try{this.requestedLoginProvider=t.loginProvider||null,this.requestedLoginProvider||this.communicationProvider._displayIframe({isFull:!0});const n=await new Promise((r,i)=>{this.provider._rpcRequest({method:"solana_requestAccounts",params:[this.requestedLoginProvider,t.login_hint]},yi(r,i))});if(Array.isArray(n)&&n.length>0)return n;throw new Error("Login failed")}catch(n){throw ae.error("login failed",n),n}finally{this.communicationProvider.isIFrameFullScreen&&this.communicationProvider._displayIframe()}}async loginWithPrivateKey(t){if(!this.isInitialized)throw new Error("Call init() first");const{privateKey:n,userInfo:r}=t,{success:i}=await this.communicationProvider.request({method:"login_with_private_key",params:{privateKey:n,userInfo:r}});if(!i)throw new Error("Login Failed")}async logout(){if(!this.communicationProvider.isLoggedIn)throw new Error("Not logged in");await this.communicationProvider.request({method:rt.LOGOUT,params:[]}),this.requestedLoginProvider=null}async cleanUp(){this.communicationProvider.isLoggedIn&&await this.logout(),this.clearInit()}clearInit(){function t(n){return n instanceof Element||n instanceof Document}t(this.styleLink)&&window.document.body.contains(this.styleLink)&&(this.styleLink.remove(),this.styleLink=void 0),t(this.torusIframe)&&window.document.body.contains(this.torusIframe)&&(this.torusIframe.remove(),this.torusIframe=void 0),t(this.torusAlertContainer)&&window.document.body.contains(this.torusAlertContainer)&&(this.torusAlert=void 0,this.torusAlertContainer.remove(),this.torusAlertContainer=void 0),this.isInitialized=!1}hideTorusButton(){this.communicationProvider.hideTorusButton()}showTorusButton(){this.communicationProvider.showTorusButton()}async setProvider(t){await this.communicationProvider.request({method:rt.SET_PROVIDER,params:je({},t)})}async showWallet(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=await this.communicationProvider.request({method:rt.WALLET_INSTANCE_ID,params:[]}),i=t?`/${t}`:"",o=new URL(`${this.torusUrl}/wallet${i}`);o.searchParams.append("instanceId",r),Object.keys(n).forEach(a=>{o.searchParams.append(a,n[a])}),this.dappStorageKey&&(o.hash=`#dappStorageKey=${this.dappStorageKey}`),new Ua({url:o,features:cn(ph)}).open()}async getUserInfo(){return await this.communicationProvider.request({method:rt.USER_INFO,params:[]})}async initiateTopup(t,n){if(!this.isInitialized)throw new Error("Torus is not initialized");const r=qn();return this.communicationProvider._handleWindow(r),await this.communicationProvider.request({method:rt.TOPUP,params:{provider:t,params:n,windowId:r}})}async getAccounts(){return await this.provider.request({method:"getAccounts",params:[]})}async sendTransaction(t){const n=zn(t),r=n?t.serialize({requireAllSignatures:!1}).toString("hex"):Me.Buffer.from(t.serialize()).toString("hex");return await this.provider.request({method:"send_transaction",params:{message:r,isLegacyTransaction:n}})}async signAndSendTransaction(t,n){const r=zn(t),i=r?t.serialize({requireAllSignatures:!1}).toString("hex"):Me.Buffer.from(t.serialize()).toString("hex");return{signature:await this.provider.request({method:"send_transaction",params:{message:i,options:n,isLegacyTransaction:r}})}}async signTransaction(t){const n=zn(t),r=n?t.serializeMessage().toString("hex"):Me.Buffer.from(t.message.serialize()).toString("hex"),i=await this.provider.request({method:"sign_transaction",params:{message:r,messageOnly:!0,isLegacyTransaction:n}}),o=JSON.parse(i),s={publicKey:new so(o.publicKey),signature:Me.Buffer.from(o.signature,"hex")};return t.addSignature(s.publicKey,s.signature),t}async signAllTransactions(t){let n;const r=t.map(s=>(n=zn(s),n?s.serializeMessage().toString("hex"):Me.Buffer.from(s.message.serialize()).toString("hex"))),o=(await this.provider.request({method:"sign_all_transactions",params:{message:r,messageOnly:!0,isLegacyTransaction:n}})).map(s=>{const a=JSON.parse(s);return{publicKey:new so(a.publicKey),signature:Me.Buffer.from(a.signature,"hex")}});return t.forEach((s,a)=>(s.addSignature(o[a].publicKey,o[a].signature),s)),t}async signMessage(t){return await this.provider.request({method:"sign_message",params:{data:t}})}async getGaslessPublicKey(){return await this.provider.request({method:"get_gasless_public_key",params:[]})}handleDappStorageKey(t){const n=`${Yi.localStorageKeyPrefix}${window.location.hostname}`;let r="";if(vh&&t){const i=window.localStorage.getItem(n);if(i)r=i;else{const o=`torus-app-${qn()}`;window.localStorage.setItem(n,o),r=o}}return this.dappStorageKey=r,r}async _setupWeb3(t){ae.info("setupWeb3 running");const n=new ts({name:"embed_torus",target:"iframe_torus",targetWindow:this.torusIframe.contentWindow}),r=new ts({name:"embed_communication",target:"iframe_communication",targetWindow:this.torusIframe.contentWindow}),i=new mr(n,{}),o=new _r(r,{});i.tryWindowHandle=(u,g)=>{const p=u;if(!Array.isArray(p)&&Eh.includes(p.method)){if(!this.communicationProvider.isLoggedIn)throw new Error("User Not Logged In");const v=qn();o._handleWindow(v,{target:"_blank",features:cn(ka)}),p.windowId=v}i._rpcEngine.handle(p,g)},o.tryWindowHandle=(u,g)=>{const p=u;if(!Array.isArray(p)&&Sh.includes(p.method)){const v=qn();o._handleWindow(v,{target:"_blank",features:cn(gh)}),p.params.windowId=v}o._rpcEngine.handle(p,g)};const s=u=>{const g=i[u],p=this;i[u]=function(S,R){const{method:h,params:w=[]}=S;if(h==="solana_requestAccounts"){if(!R)return p.login({loginProvider:w[0]});p.login({loginProvider:w[0]}).then(y=>R(null,y)).catch(y=>R(y))}return g.apply(this,[S,R])}};s("request"),s("sendAsync"),s("send");const a=new Proxy(i,{deleteProperty:()=>!0}),f=new Proxy(o,{deleteProperty:()=>!0});this.provider=a,this.communicationProvider=f,await Promise.all([i._initializeState(),o._initializeState(je(je({},t),{},{dappStorageKey:this.dappStorageKey,torusAlertContainer:this.torusAlertContainer,torusIframe:this.torusIframe}))]),ae.debug("Torus - injected provider")}}export{fn as BUTTON_POSITION,uh as TORUS_BUILD_ENV,mr as TorusInPageProvider,Wh as default};
@@ -1 +0,0 @@
1
- "use strict";const o="https://wormholescan.io/#/",e="3.0.1-beta.0-development",a="177ffec57657fe58a1db5ac8450f10c24fd23dcb",n=["Ethereum","Solana","Arbitrum","Base","Sui","Bsc","Optimism","Unichain","Fantom","Polygon","Avalanche","Celo","Moonbeam","Klaytn","Scroll","Evmos","Mantle","Berachain","Mezo"];exports.CHAIN_ORDER=n;exports.CONNECT_GIT_HASH=a;exports.CONNECT_VERSION=e;exports.WORMSCAN=o;