@wormhole-foundation/wormhole-connect 3.0.1-beta.2-development → 3.0.1-beta.4-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.
- package/dist/assets/{add-CA46SOZ1.js → add-Xg1xhVFF.js} +1 -1
- package/dist/assets/{all-wallets-B1qnLkOo.js → all-wallets-BoxRqCuD.js} +1 -1
- package/dist/assets/{app-store-NTpCK9MF.js → app-store-DWw_7TVB.js} +1 -1
- package/dist/assets/{apple-DRVt4JWr.js → apple-C3S_oS38.js} +1 -1
- package/dist/assets/{aptos-DkSiRwPH.js → aptos-BuLH7jck.js} +3 -3
- package/dist/assets/{aptos-63ExGocu.js → aptos-gb8snog6.js} +1 -1
- package/dist/assets/{arrow-bottom-CPth9tFV.js → arrow-bottom-TxaXdcXE.js} +1 -1
- package/dist/assets/{arrow-bottom-circle-BWo9DWoB.js → arrow-bottom-circle-zT0TMjGz.js} +1 -1
- package/dist/assets/{arrow-left-P6RmBJWT.js → arrow-left-DEymMKEb.js} +1 -1
- package/dist/assets/{arrow-right-BHHiE7kD.js → arrow-right-CrQ93Gth.js} +1 -1
- package/dist/assets/{arrow-top-D5GRFsZm.js → arrow-top-DO6PV0os.js} +1 -1
- package/dist/assets/{bank-C2WLfHR8.js → bank-D6rx1mBK.js} +1 -1
- package/dist/assets/{basic-BCJkH5GS.js → basic-C5fzEsEe.js} +1 -1
- package/dist/assets/{blake2b-Bb1VZYtg.js → blake2b-B2b685Yu.js} +1 -1
- package/dist/assets/{browser-BPjT1bN5.js → browser-Co04W0I6.js} +1 -1
- package/dist/assets/{card-JaBku5Bf.js → card-B2Z4mK1Z.js} +1 -1
- package/dist/assets/{ccip-CTrUg8DF.js → ccip-By49zU3M.js} +1 -1
- package/dist/assets/{chain-DF9mIQM9.js → chain-Du7paeNG.js} +1 -1
- package/dist/assets/{checkmark-BQL5JCw2.js → checkmark-C8HU5fja.js} +1 -1
- package/dist/assets/{checkmark-bold-DP1vE2RN.js → checkmark-bold-DIs1ZMqP.js} +1 -1
- package/dist/assets/{chevron-bottom-BV0Au0hP.js → chevron-bottom-BFsapVx9.js} +1 -1
- package/dist/assets/{chevron-left-C4v6Iui8.js → chevron-left-Fkdkr5ZY.js} +1 -1
- package/dist/assets/{chevron-right-CbVMuuvx.js → chevron-right-BfpUZvuC.js} +1 -1
- package/dist/assets/{chevron-top-CuIo_USv.js → chevron-top-CgQu63-4.js} +1 -1
- package/dist/assets/{chrome-store-fbydRQd1.js → chrome-store-GIO26gYx.js} +1 -1
- package/dist/assets/{chunk-KJH4KKG6-B7DCZZVY.js → chunk-KJH4KKG6-Po5MChR6.js} +1 -1
- package/dist/assets/{clock-D62L3EFP.js → clock-BDzvQcXR.js} +1 -1
- package/dist/assets/{close-BLRqO6Zn.js → close-JWa5ANIE.js} +1 -1
- package/dist/assets/{coinPlaceholder-0tmFvYYj.js → coinPlaceholder-a0UGO8gJ.js} +1 -1
- package/dist/assets/{compass-Ba8-RKca.js → compass-CEQdAwHs.js} +1 -1
- package/dist/assets/{contract-bGGxC9_m.js → contract-BhySpM-Z.js} +1 -1
- package/dist/assets/{copy-CWqrh_sD.js → copy-S_d5_yPl.js} +1 -1
- package/dist/assets/{create-CbRd6EbF.js → create-gkOVonha.js} +1 -1
- package/dist/assets/{cursor-DFYzmUAe.js → cursor-BhEbcCXK.js} +1 -1
- package/dist/assets/{cursor-transparent-IY3fA7aT.js → cursor-transparent-BcLVDVWp.js} +1 -1
- package/dist/assets/{desktop-DLudyYW3.js → desktop-DqSryZUj.js} +1 -1
- package/dist/assets/{disconnect-gShcPNrf.js → disconnect-YOsS0M4y.js} +1 -1
- package/dist/assets/{discord-S8T3fJF7.js → discord-CqeqTfSo.js} +1 -1
- package/dist/assets/{etherscan-C-ODOYjC.js → etherscan-DlH7X_ye.js} +1 -1
- package/dist/assets/{evm-DwqzhXfk.js → evm-CWAxZ2a7.js} +3 -3
- package/dist/assets/{evm-D65l_VUA.js → evm-fcQsoqVd.js} +4 -4
- package/dist/assets/{exclamation-triangle-I4hrUAkj.js → exclamation-triangle-B7tI_-cI.js} +1 -1
- package/dist/assets/{extension-C2E94rju.js → extension-DyHQJuRO.js} +1 -1
- package/dist/assets/{external-link-BE25aYRx.js → external-link-ChiVtGCq.js} +1 -1
- package/dist/assets/{facebook-VHvsuzqv.js → facebook-BIe7nERx.js} +1 -1
- package/dist/assets/{farcaster-sG7oFC35.js → farcaster-BTyklWGz.js} +1 -1
- package/dist/assets/{filters-D9VcvmFo.js → filters-De_gO5iz.js} +1 -1
- package/dist/assets/{github-BLJyKdzw.js → github-DQfZjMbN.js} +1 -1
- package/dist/assets/{google-C4YbBNSv.js → google-Gguig8Cy.js} +1 -1
- package/dist/assets/{help-circle-CMmVaOnp.js → help-circle-DHeCCsr1.js} +1 -1
- package/dist/assets/{id-g_mC9xVi.js → id-DjntBhAt.js} +1 -1
- package/dist/assets/{image-nAeKstDS.js → image-2J0s_97c.js} +1 -1
- package/dist/assets/{index-CKPf-3Vo.js → index--d0JCrsI.js} +1 -1
- package/dist/assets/{index-C0-WLpMA.js → index-BE55BSK7.js} +1 -1
- package/dist/assets/{index-Cu0b-jgK.js → index-BJYqkXUw.js} +1 -1
- package/dist/assets/{index-C_YTupmk.js → index-BYTZG2bF.js} +1 -1
- package/dist/assets/{index-CVqQ68io.js → index-BedU_k3i.js} +1 -1
- package/dist/assets/{index-BTkoFKAW.js → index-BgLBca6k.js} +1 -1
- package/dist/assets/{index-DynC8vQ4.js → index-BjvqCh5g.js} +1 -1
- package/dist/assets/{index-BqLA4xTj.js → index-BpI-Jtyb.js} +3 -3
- package/dist/assets/{index-GmuqTVr0.js → index-Breet2G4.js} +1 -1
- package/dist/assets/{index-BUtdFAj3.js → index-Bx8vjRmV.js} +1 -1
- package/dist/assets/{index-DusYxt7C.js → index-CfdmPAak.js} +3 -3
- package/dist/assets/{index-DA4wR-ie.js → index-DB7g9m_R.js} +1 -1
- package/dist/assets/{index-DKdokzug.js → index-DMWfYwZZ.js} +1 -1
- package/dist/assets/{index-COZ2cSR6.js → index-DSTd1tRp.js} +1 -1
- package/dist/assets/{index-CVqXQiSE.js → index-DZ96gAj4.js} +1 -1
- package/dist/assets/{index-CYFq9U58.js → index-TYicGq2L.js} +1 -1
- package/dist/assets/index-Z3Xir6L3.js +1 -0
- package/dist/assets/{index-DC3x_AFd.js → index-kF0xEQ0E.js} +1 -1
- package/dist/assets/{index-CCOXtJ1P.js → index-zEIfo2_n.js} +1 -1
- package/dist/assets/index.es-3Tq6bjFW.js +47 -0
- package/dist/assets/index.es-CBqWEk7T.js +15 -0
- package/dist/assets/{info-P71aU507.js → info-D4MdYH3E.js} +1 -1
- package/dist/assets/{info-circle-D8ZhpY4M.js → info-circle-2o2Bq9RM.js} +1 -1
- package/dist/assets/{lightbulb-CWL8Hapk.js → lightbulb-G1HZSu_o.js} +1 -1
- package/dist/assets/{mail-BKdMRnR2.js → mail-CYPzgN-C.js} +1 -1
- package/dist/assets/{mobile-Bw0EoBkW.js → mobile-G3tO8xk-.js} +1 -1
- package/dist/assets/{more-BSKGQd1b.js → more-nk1W6LmK.js} +1 -1
- package/dist/assets/{network-placeholder-B1xqyidN.js → network-placeholder-DakjB3wH.js} +1 -1
- package/dist/assets/{nftPlaceholder-CuCsNvkN.js → nftPlaceholder-JMholGYC.js} +1 -1
- package/dist/assets/{off-BX6zoZuA.js → off-SNO-Bsmr.js} +1 -1
- package/dist/assets/{play-store-CCveEK_B.js → play-store-BpxDB0NB.js} +1 -1
- package/dist/assets/{plus-C02SGp4V.js → plus-oY5qI4Lq.js} +1 -1
- package/dist/assets/{provider-jsonrpc-DTnJKzTS.js → provider-jsonrpc-CG-x8-V6.js} +1 -1
- package/dist/assets/{qr-code-DGe_aS_i.js → qr-code-jee4rxaz.js} +1 -1
- package/dist/assets/{recycle-horizontal-DtRomJbx.js → recycle-horizontal-BEF6XBYh.js} +1 -1
- package/dist/assets/{refresh-DPABcpes.js → refresh-aEpBxujB.js} +1 -1
- package/dist/assets/{reown-logo-DG2ULLka.js → reown-logo-CEo-n5QW.js} +1 -1
- package/dist/assets/{search-EURxday_.js → search-CrfJGGMS.js} +1 -1
- package/dist/assets/{secp256k1-D-G9AbtW.js → secp256k1-CBh6eQLF.js} +1 -1
- package/dist/assets/{secp256k1-DfnLU_Rr.js → secp256k1-OI4v3wvK.js} +1 -1
- package/dist/assets/{send-t6aoH9GB.js → send-ChU6l1_w.js} +1 -1
- package/dist/assets/signer-BRan8q4C.js +2 -0
- package/dist/assets/solana-B3bc0p0T.js +2 -0
- package/dist/assets/{solana-C-diloCa.js → solana-CxgaSoPj.js} +9 -9
- package/dist/assets/solanaEmbed.esm-Mnq6o_qa.js +10 -0
- package/dist/assets/{sui-Pc10JTxL.js → sui-CXoaI0gx.js} +2 -2
- package/dist/assets/{sui-DXg2Lhyt.js → sui-DXdm7DBB.js} +4 -4
- package/dist/assets/{swapHorizontal-Cd2Bq-oX.js → swapHorizontal-De2aXFHG.js} +1 -1
- package/dist/assets/{swapHorizontalBold-CK6YXqcD.js → swapHorizontalBold-CtwNUoVl.js} +1 -1
- package/dist/assets/{swapHorizontalMedium-BCT4Hlrg.js → swapHorizontalMedium-BsH9NNRL.js} +1 -1
- package/dist/assets/{swapHorizontalRoundedBold-C-NDd7Fq.js → swapHorizontalRoundedBold-ClK2_MrS.js} +1 -1
- package/dist/assets/{swapVertical-BfKszPb9.js → swapVertical-BVWoUs-p.js} +1 -1
- package/dist/assets/{telegram-D5sYoBZp.js → telegram-BgYefK90.js} +1 -1
- package/dist/assets/{three-dots-qiTqAG0h.js → three-dots-D6JqA1P-.js} +1 -1
- package/dist/assets/{tokens-BjeNFBPV.js → tokens-BwBlXmY1.js} +12 -12
- package/dist/assets/{twitch-1VH6BaUA.js → twitch-DSLx5P08.js} +1 -1
- package/dist/assets/{twitterIcon-hIEIDwcz.js → twitterIcon-DIhMC7Ie.js} +1 -1
- package/dist/assets/{verify-DxvRt34f.js → verify-Dh3yUwPE.js} +1 -1
- package/dist/assets/{verify-filled-RtidYdgS.js → verify-filled-mA5B8sgV.js} +1 -1
- package/dist/assets/{w3m-modal-DI_ypCY0.js → w3m-modal-DpvEw1mA.js} +1 -1
- package/dist/assets/{wallet-Cb9kcAk9.js → wallet-Bz3DYndO.js} +1 -1
- package/dist/assets/{wallet-placeholder-pTFD8Qr_.js → wallet-placeholder-BYYYxJZ1.js} +1 -1
- package/dist/assets/{walletconnect-DvJIx5jD.js → walletconnect-NKbhveni.js} +1 -1
- package/dist/assets/{warning-circle-CRzNiBlj.js → warning-circle-Dh13B0js.js} +1 -1
- package/dist/assets/{x-Dk-mK5uZ.js → x-B2DeHGEp.js} +1 -1
- package/dist/main.js +75 -75
- package/dist/src/config/index.d.ts.map +1 -1
- package/dist/src/config/tokens.d.ts +2 -2
- package/dist/src/config/tokens.d.ts.map +1 -1
- package/dist/src/config/types.d.ts +2 -0
- package/dist/src/config/types.d.ts.map +1 -1
- package/dist/src/utils/inProgressTxCache.d.ts.map +1 -1
- package/lib/{add-DrLWWjDN.mjs → add-CChCYI2G.mjs} +1 -1
- package/lib/{add-DVGSYBJf.js → add-CDVX1evr.js} +1 -1
- package/lib/{all-wallets-CjzZMHCA.mjs → all-wallets-D2JZa1Jx.mjs} +1 -1
- package/lib/{all-wallets-DGVJQYa0.js → all-wallets-Wql6lmNE.js} +1 -1
- package/lib/{app-store-BABxSxrd.js → app-store-1dBCl4tM.js} +1 -1
- package/lib/{app-store-kpf503GR.mjs → app-store-CLDcpqR0.mjs} +1 -1
- package/lib/{apple-C962M6Ax.js → apple-BHKwlbOf.js} +1 -1
- package/lib/{apple-C0AtBJDu.mjs → apple-DIxTUQFy.mjs} +1 -1
- package/lib/{aptos-uWJCRLoQ.js → aptos-BL0wRMvV.js} +1 -1
- package/lib/{aptos-XxQj_uxF.mjs → aptos-TAzFliq5.mjs} +1 -1
- package/lib/{arrow-bottom-D0wK6uMJ.mjs → arrow-bottom-BI4NLoaY.mjs} +1 -1
- package/lib/{arrow-bottom-circle-iOl-NxXR.js → arrow-bottom-circle-CAq7o5Oy.js} +1 -1
- package/lib/{arrow-bottom-circle-D5QwftYY.mjs → arrow-bottom-circle-HmnccP7v.mjs} +1 -1
- package/lib/{arrow-bottom-CIZJcZfr.js → arrow-bottom-lsBwXKtD.js} +1 -1
- package/lib/{arrow-left-BL0dHjzy.mjs → arrow-left-7ur69wUu.mjs} +1 -1
- package/lib/{arrow-left-C-RAtnQ2.js → arrow-left-BsQ-5Ptc.js} +1 -1
- package/lib/{arrow-right-COiq03Wj.js → arrow-right-D992kYZk.js} +1 -1
- package/lib/{arrow-right-DaZMOW_1.mjs → arrow-right-lENdnq4k.mjs} +1 -1
- package/lib/{arrow-top-7Srj2XLP.js → arrow-top-BO-2RkYj.js} +1 -1
- package/lib/{arrow-top-QPVhK81o.mjs → arrow-top-mSzeb_YL.mjs} +1 -1
- package/lib/{bank-C5lNHVtL.mjs → bank-CoEWKxhi.mjs} +1 -1
- package/lib/{bank-Bp2l8LtZ.js → bank-Hw0j97F3.js} +1 -1
- package/lib/{basic-C5W71-rE.mjs → basic-BaSePtpQ.mjs} +2 -2
- package/lib/{basic-DQ6ISwhI.js → basic-C2cAlU_P.js} +1 -1
- package/lib/{browser-DV0hL_fK.js → browser-BlvoS4as.js} +1 -1
- package/lib/{browser-CJhUYmz6.mjs → browser-rF5Wrb7Q.mjs} +1 -1
- package/lib/{card-yZLq1X6c.js → card-BMnXbbhN.js} +1 -1
- package/lib/{card-DSeabGLV.mjs → card-D_WE8NXm.mjs} +1 -1
- package/lib/{ccip-BCsOYNZd.js → ccip--ZxEFQf_.js} +1 -1
- package/lib/{ccip-CFqlillN.mjs → ccip-CqL9Anaf.mjs} +1 -1
- package/lib/{checkmark-BW4NeFlB.js → checkmark-CesSNUet.js} +1 -1
- package/lib/{checkmark-DhgNpDof.mjs → checkmark-OMVwQQ5U.mjs} +1 -1
- package/lib/{checkmark-bold-DnEFF9eL.js → checkmark-bold-BD-XO987.js} +1 -1
- package/lib/{checkmark-bold-CxJkyUOt.mjs → checkmark-bold-CD7QLi07.mjs} +1 -1
- package/lib/{chevron-bottom-Pi9qTSKk.mjs → chevron-bottom-BwVLFe30.mjs} +1 -1
- package/lib/{chevron-bottom-Tb5GYU7P.js → chevron-bottom-IMKe9YXA.js} +1 -1
- package/lib/{chevron-left-BRp6K_BQ.js → chevron-left-D9qVH2_2.js} +1 -1
- package/lib/{chevron-left-Cl35pkRv.mjs → chevron-left-Lf-ywM2h.mjs} +1 -1
- package/lib/{chevron-right-D1Ic6C28.js → chevron-right-WKiLOYc0.js} +1 -1
- package/lib/{chevron-right-pjH-xKxB.mjs → chevron-right-gRQ8_S61.mjs} +1 -1
- package/lib/{chevron-top-SdyRa8IE.js → chevron-top-Bxo7EgbN.js} +1 -1
- package/lib/{chevron-top-DSe-dX8z.mjs → chevron-top-DslLIugK.mjs} +1 -1
- package/lib/{chrome-store-0qgfQSAS.js → chrome-store-7358vPCZ.js} +1 -1
- package/lib/{chrome-store-ThoUGIhl.mjs → chrome-store-B7rWxuFe.mjs} +1 -1
- package/lib/{clock-B0sBEXQ5.mjs → clock-BGtDjqYb.mjs} +1 -1
- package/lib/{clock-2HqPHolX.js → clock-Ry96ruDh.js} +1 -1
- package/lib/{close-Bznv5frT.mjs → close-Bj7xcq2I.mjs} +1 -1
- package/lib/{close-BJQf5USo.js → close-C6sBVa0R.js} +1 -1
- package/lib/{coinPlaceholder-CvvSiYI-.js → coinPlaceholder-9HCA6YJ_.js} +1 -1
- package/lib/{coinPlaceholder-1gZoTAqN.mjs → coinPlaceholder-CUWHPX6Q.mjs} +1 -1
- package/lib/{compass-BE99mJOV.mjs → compass-B6RLv5bP.mjs} +1 -1
- package/lib/{compass-BBMA-82e.js → compass-CccZJ5Hi.js} +1 -1
- package/lib/{constants-Bp_337ur.mjs → constants-I50X20ow.mjs} +1 -1
- package/lib/{constants-BDS32jve.js → constants-o93Ip-ZI.js} +1 -1
- package/lib/{copy-B_JboG8P.js → copy-CQDBtuRc.js} +1 -1
- package/lib/{copy-Cwolsgnk.mjs → copy-ucy3iRHw.mjs} +1 -1
- package/lib/{cursor-C2jyr1Tt.js → cursor-CSvFFh4Q.js} +1 -1
- package/lib/{cursor-0EyS6nH4.mjs → cursor-CzBbQiJe.mjs} +1 -1
- package/lib/{cursor-transparent-ZUI7NwAo.mjs → cursor-transparent-BVPzLo6n.mjs} +1 -1
- package/lib/{cursor-transparent-BaVE19A2.js → cursor-transparent-OMlVLjL8.js} +1 -1
- package/lib/{desktop-Dmz61Quh.js → desktop-CPDPdHBV.js} +1 -1
- package/lib/{desktop-B1U1mc6q.mjs → desktop-shQ2mQoL.mjs} +1 -1
- package/lib/{disconnect-8HUMogEY.mjs → disconnect-BKVkn-S7.mjs} +1 -1
- package/lib/{disconnect-Bn_0Td6c.js → disconnect-DGSddjKW.js} +1 -1
- package/lib/{discord-4tBuPwio.js → discord-748YGKmQ.js} +1 -1
- package/lib/{discord-DNMu-4pj.mjs → discord-CU-xUnfX.mjs} +1 -1
- package/lib/{etherscan-DTafkFM9.mjs → etherscan-6_ieSOxb.mjs} +1 -1
- package/lib/{etherscan-CdfpxSFw.js → etherscan-Ccpuewtf.js} +1 -1
- package/lib/{evm-B5SS0axR.mjs → evm-DfM6aIHd.mjs} +3 -3
- package/lib/{evm-BZKMUp6E.js → evm-DoAUqshZ.js} +3 -3
- package/lib/{exclamation-triangle-BLb5RCv9.mjs → exclamation-triangle-B1yodgmL.mjs} +1 -1
- package/lib/{exclamation-triangle-W8wr4W3B.js → exclamation-triangle-BcTwNgcS.js} +1 -1
- package/lib/{extension-B3rp6j3f.js → extension-BwMlRm6l.js} +1 -1
- package/lib/{extension-DqXaH5V_.mjs → extension-CpR0U7JU.mjs} +1 -1
- package/lib/{external-link-DWSOPcgR.js → external-link-CSvt1sJd.js} +1 -1
- package/lib/{external-link-DupOMQca.mjs → external-link-D5LlQVjF.mjs} +1 -1
- package/lib/{facebook-C25qgXgI.mjs → facebook-Ch2fWEDP.mjs} +1 -1
- package/lib/{facebook-gaoSLwmV.js → facebook-DKN-SwlC.js} +1 -1
- package/lib/{farcaster-BKQVbYft.mjs → farcaster-CuhYu7xL.mjs} +1 -1
- package/lib/{farcaster-Dw_KFzSe.js → farcaster-Eo6frWYn.js} +1 -1
- package/lib/{filters-BSv2GVWx.js → filters-D8RfIYLp.js} +1 -1
- package/lib/{filters-BRj-u8fO.mjs → filters-hN9hAmqt.mjs} +1 -1
- package/lib/{github-CVSqx81G.js → github-Bj11sR8O.js} +1 -1
- package/lib/{github-B8zYv5B1.mjs → github-CBnfKu_p.mjs} +1 -1
- package/lib/{google-CJy4jhj7.mjs → google-DkNw7izD.mjs} +1 -1
- package/lib/{google-DWyFM_-_.js → google-ocyOtxA8.js} +1 -1
- package/lib/{help-circle-D2kyGnMD.mjs → help-circle-BYF3SQ07.mjs} +1 -1
- package/lib/{help-circle-BihX0QHp.js → help-circle-DIUT7rfs.js} +1 -1
- package/lib/hosted.js +1 -1
- package/lib/hosted.mjs +1 -1
- package/lib/{id-BvDoX2i7.mjs → id-C70TM1mY.mjs} +1 -1
- package/lib/{id-ZWI-bwNJ.js → id-CFPGVN7x.js} +1 -1
- package/lib/{image-CNQTgOF8.js → image-Csb5_nLh.js} +1 -1
- package/lib/{image-BeWwKKKj.mjs → image-N27_sf6L.mjs} +1 -1
- package/lib/{index-BXBTU3I5.mjs → index-BJokM0dj.mjs} +78 -78
- package/lib/{index-Dpl42t-y.mjs → index-BQI4s97M.mjs} +19199 -19189
- package/lib/index-CtU_yCFR.js +304 -0
- package/lib/{index-D2yjOpeA.js → index-DPTquT8S.js} +2 -2
- package/lib/{index.es-BvsB6Z8q.js → index.es-B-_H_cmu.js} +1 -1
- package/lib/{index.es-C4KG3MSj.mjs → index.es-DJiOqF7x.mjs} +1 -1
- package/lib/{index.es-C2112Y2b.js → index.es-WjSz4osV.js} +1 -1
- package/lib/{index.es-Cy_oFTNH.mjs → index.es-s7TRhhGL.mjs} +3 -3
- package/lib/index.js +1 -1
- package/lib/index.mjs +1 -1
- package/lib/{info-CjKZyXW_.mjs → info-AQVHCGaq.mjs} +1 -1
- package/lib/{info-C73QOiqc.js → info-CxmLliqa.js} +1 -1
- package/lib/{info-circle-DE-EmffO.js → info-circle-D2JXCfNS.js} +1 -1
- package/lib/{info-circle-CEpS6rzX.mjs → info-circle-y2TMBRYb.mjs} +1 -1
- package/lib/{lightbulb-BVq3C-EG.mjs → lightbulb-BKSrtaqH.mjs} +1 -1
- package/lib/{lightbulb-Dm6Hsfd3.js → lightbulb-BbhqbK_X.js} +1 -1
- package/lib/{mail-CqUQETIH.mjs → mail-BBgJ1r1U.mjs} +1 -1
- package/lib/{mail-GRon9tbg.js → mail-CoY6lTNd.js} +1 -1
- package/lib/{mobile-BmGmHmVh.js → mobile-Bctu3ihf.js} +1 -1
- package/lib/{mobile-CEbEFp0X.mjs → mobile-DNfcwXIc.mjs} +1 -1
- package/lib/{more-CnS-NcGa.js → more--vfXH0mk.js} +1 -1
- package/lib/{more-Cs0cmKvd.mjs → more-CH7etA30.mjs} +1 -1
- package/lib/{network-placeholder-CjPyqfGa.js → network-placeholder-6HdYNIFM.js} +1 -1
- package/lib/{network-placeholder-DYuB36S0.mjs → network-placeholder-ChGkSHiE.mjs} +1 -1
- package/lib/{nftPlaceholder-COJmgjQo.mjs → nftPlaceholder-BEC17VTi.mjs} +1 -1
- package/lib/{nftPlaceholder-CoY2NOAz.js → nftPlaceholder-CFV32cdU.js} +1 -1
- package/lib/{off-CZo3LYgL.mjs → off-ClkoZEBq.mjs} +1 -1
- package/lib/{off-B-WmBPpa.js → off-lYX-5yS0.js} +1 -1
- package/lib/{play-store-Chciiwp3.js → play-store-BG47IOEu.js} +1 -1
- package/lib/{play-store-Edmxg3AX.mjs → play-store-CkhMEAU7.mjs} +1 -1
- package/lib/{plus-D2jFkgs1.mjs → plus-BtTwbs2C.mjs} +1 -1
- package/lib/{plus-C93OSdaz.js → plus-DrlcozYb.js} +1 -1
- package/lib/{qr-code-c2tFySK0.mjs → qr-code-DYJJwRSj.mjs} +1 -1
- package/lib/{qr-code-y78Lk8wE.js → qr-code-v9_pM0Zk.js} +1 -1
- package/lib/{recycle-horizontal-PXk9BX3j.js → recycle-horizontal-BvzP-O-1.js} +1 -1
- package/lib/{recycle-horizontal-CWycpdDF.mjs → recycle-horizontal-EBM2ypKZ.mjs} +1 -1
- package/lib/{refresh-C77_db2T.mjs → refresh-BAhwdZGm.mjs} +1 -1
- package/lib/{refresh-mky0B17c.js → refresh-TpfixFZn.js} +1 -1
- package/lib/{reown-logo-0RkEf9EI.mjs → reown-logo-B0Su0Ter.mjs} +1 -1
- package/lib/{reown-logo-DceXhK36.js → reown-logo-DU1oKeQq.js} +1 -1
- package/lib/{search-BrMSW1-8.mjs → search-BPQ2hivJ.mjs} +1 -1
- package/lib/{search-CWru3218.js → search-Dmv7gbQ1.js} +1 -1
- package/lib/{secp256k1-C4P0dmMC.mjs → secp256k1-BZs3Z9mj.mjs} +1 -1
- package/lib/{secp256k1-BU-UfBCB.js → secp256k1-BjuZX5cP.js} +1 -1
- package/lib/{secp256k1-Cks0bicH.js → secp256k1-CLJ0hFH7.js} +1 -1
- package/lib/{secp256k1-CI3_SM8F.mjs → secp256k1-CtFVBB1y.mjs} +1 -1
- package/lib/{send-CRyBVD1k.js → send-BD36uDqC.js} +1 -1
- package/lib/{send-DFkvxnIh.mjs → send-BtmBm7An.mjs} +1 -1
- package/lib/{solana-BVnMWq13.js → solana-BCCsr1Cx.js} +4 -4
- package/lib/{solana-L02hbBDE.mjs → solana-CJwReM-9.mjs} +6 -6
- package/lib/{solanaEmbed.esm-DSwNdsgx.mjs → solanaEmbed.esm-DUeK0Aox.mjs} +1 -1
- package/lib/{solanaEmbed.esm-BG5cgKub.js → solanaEmbed.esm-TlHPGYbs.js} +1 -1
- package/lib/src/config/index.d.ts.map +1 -1
- package/lib/src/config/tokens.d.ts +2 -2
- package/lib/src/config/tokens.d.ts.map +1 -1
- package/lib/src/config/types.d.ts +2 -0
- package/lib/src/config/types.d.ts.map +1 -1
- package/lib/src/utils/inProgressTxCache.d.ts.map +1 -1
- package/lib/{sui-Dv1p0XoG.js → sui-CfpeqXfu.js} +1 -1
- package/lib/{sui-CN1tZAOs.mjs → sui-DCDjGAGw.mjs} +1 -1
- package/lib/{swapHorizontal-Bo_-2U6j.mjs → swapHorizontal-BrAMZxpk.mjs} +1 -1
- package/lib/{swapHorizontal-BiCkAPre.js → swapHorizontal-zZA0Pi1S.js} +1 -1
- package/lib/{swapHorizontalBold-BPL2XaSi.mjs → swapHorizontalBold-BcMCprxV.mjs} +1 -1
- package/lib/{swapHorizontalBold-CWHbSIEu.js → swapHorizontalBold-DiN_RSP7.js} +1 -1
- package/lib/{swapHorizontalMedium-CTsDFfzR.mjs → swapHorizontalMedium-BJ2Ste5L.mjs} +1 -1
- package/lib/{swapHorizontalMedium-D_2Z2Hfq.js → swapHorizontalMedium-CoOVPZkR.js} +1 -1
- package/lib/{swapHorizontalRoundedBold-8b5z2YJ_.mjs → swapHorizontalRoundedBold-Cjf3Fskk.mjs} +1 -1
- package/lib/{swapHorizontalRoundedBold-CDKFFagj.js → swapHorizontalRoundedBold-DxwvY3dz.js} +1 -1
- package/lib/{swapVertical-CNBatiM6.js → swapVertical-Bq0Lj7Jp.js} +1 -1
- package/lib/{swapVertical-UTCgpnIJ.mjs → swapVertical-p6z9y9EP.mjs} +1 -1
- package/lib/{telegram-lTj0r5My.js → telegram-dLc4G7r4.js} +1 -1
- package/lib/{telegram-CVvlgH_Z.mjs → telegram-ejEcBbcF.mjs} +1 -1
- package/lib/{three-dots-KK4NyvR7.mjs → three-dots-DaVRiDOk.mjs} +1 -1
- package/lib/{three-dots-DQLgK82o.js → three-dots-d_UVr-9U.js} +1 -1
- package/lib/{tokens-B2pmB4Ph.js → tokens-BWrHpkNL.js} +1 -1
- package/lib/{tokens-BQHmitaT.mjs → tokens-BnimC1zF.mjs} +1 -1
- package/lib/{twitch-CO4nmS5o.mjs → twitch-BHisrkgo.mjs} +1 -1
- package/lib/{twitch-wV3Yc6kA.js → twitch-C8keHWlC.js} +1 -1
- package/lib/{twitterIcon-pCNPPny7.js → twitterIcon-BQcavToi.js} +1 -1
- package/lib/{twitterIcon-BU99IvD2.mjs → twitterIcon-D3iLXIw6.mjs} +1 -1
- package/lib/{verify-Ci9XMhb8.mjs → verify-BWBTB_1a.mjs} +1 -1
- package/lib/{verify-B21LHiy7.js → verify-CXgbYH0A.js} +1 -1
- package/lib/{verify-filled-LUtqUhbS.mjs → verify-filled-D-Ce24N1.mjs} +1 -1
- package/lib/{verify-filled-DCMcHuAt.js → verify-filled-EtgRJyXw.js} +1 -1
- package/lib/{w3m-modal-DJRTg4Aa.js → w3m-modal-BRD-3_ln.js} +1 -1
- package/lib/{w3m-modal-BJkuxcj8.mjs → w3m-modal-jJj4CHrQ.mjs} +2 -2
- package/lib/{wallet-BqBebKQF.js → wallet-D5GlthNd.js} +1 -1
- package/lib/{wallet-USpq1vKL.mjs → wallet-D9nn7VuJ.mjs} +1 -1
- package/lib/{wallet-placeholder-CL_evZUb.mjs → wallet-placeholder-Bdm8Ey5Z.mjs} +1 -1
- package/lib/{wallet-placeholder-Cf1u-2wB.js → wallet-placeholder-CHDzAL0k.js} +1 -1
- package/lib/{walletconnect-Da6ZdP8w.js → walletconnect-CAKGYqr_.js} +1 -1
- package/lib/{walletconnect-3g5k3agX.mjs → walletconnect-DbTFPVUf.mjs} +1 -1
- package/lib/{warning-circle-B3ivLfCN.mjs → warning-circle-BNb3asEb.mjs} +1 -1
- package/lib/{warning-circle-CvTdOy7u.js → warning-circle-CQo0cKjW.js} +1 -1
- package/lib/{x-BOwtJrlH.mjs → x-35IydjAH.mjs} +1 -1
- package/lib/{x-DQCRmr2P.js → x-BeRG8E5j.js} +1 -1
- package/package.json +1 -1
- package/dist/assets/index-BZFyhaji.js +0 -1
- package/dist/assets/index.es-CWMLsIMc.js +0 -47
- package/dist/assets/index.es-g5_0R3zE.js +0 -15
- package/dist/assets/signer-7-tpWjBV.js +0 -2
- package/dist/assets/solana-C6mHMmQi.js +0 -2
- package/dist/assets/solanaEmbed.esm-DhAz8SOB.js +0 -10
- package/lib/index-DwMMfwYI.js +0 -304
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import{j as Vt,b as Ct,d as yn,ck as Nt,h as Sl,f as Me,r as vl,c as ln,P as so}from"../main.js";import"./index-VWaDGczM.js";var it={},ht={},As=hn;hn.default=hn;hn.stable=Ts;hn.stableStringify=Ts;var Zn="[...]",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(Zn,e,t,i);return}if(typeof s.edgesLimit<"u"&&n+1>s.edgesLimit){kt(Zn,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 Al(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(Zn,e,t,i);return}if(typeof s.edgesLimit<"u"&&n+1>s.edgesLimit){kt(Zn,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(Al);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 Rl=Vt(As);Object.defineProperty(ht,"__esModule",{value:!0});ht.EthereumProviderError=ht.EthereumRpcError=void 0;const Il=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 Il.default(this.serialize(),Ol,2)}}ht.EthereumRpcError=Os;class Tl extends Os{constructor(t,n,r){if(!xl(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,n,r)}}ht.EthereumProviderError=Tl;function xl(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}function Ol(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 Cl(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 Nl(e){var t=Cl(e,"string");return gn(t)=="symbol"?t:t+""}function G(e,t,n){return(t=Nl(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 Pl=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:Pl,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:Ll,inspect:Jn}=Ms,{AggregateError:Ml}=he,Bl=globalThis.AggregateError||Ml,$l=Symbol("kIsNodeError"),Dl=["string","function","number","object","Function","Object","boolean","bigint","symbol"],jl=/^([A-Z][a-z0-9]*)+$/,kl="__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 Wl(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:Ll(t,...n)}function Ee(e,t,n){n||(n=Error);class r extends n{constructor(...o){super(Wl(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[$l]=!0,ir[e]=r}function uo(e){const t=kl+e.name;return Object.defineProperty(e,"name",{value:t}),e}function Ul(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;const n=new Bl([t,e],t.message);return n.code=t.code,n}return e||t}let Fl=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"),Dl.includes(f)?i.push(f.toLowerCase()):jl.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=Jn(n,{depth:-1});r+=`. Received ${f}`}}else{let f=Jn(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=Jn(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=Jn(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:Fl,aggregateTwoErrors:uo(Ul),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:yn.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:Hl,ArrayPrototypeJoin:ql,ArrayPrototypeMap:zl,NumberIsInteger:Oi,NumberIsNaN:Th,NumberMAX_SAFE_INTEGER:Gl,NumberMIN_SAFE_INTEGER:Vl,NumberParseInt:xh,ObjectPrototypeHasOwnProperty:Kl,RegExpPrototypeExec:Oh,String:Yl,StringPrototypeToUpperCase:Ch,StringPrototypeTrim:Nh}=he,{hideStackFrames:ke,codes:{ERR_SOCKET_BAD_PORT:Ph,ERR_INVALID_ARG_TYPE:We,ERR_INVALID_ARG_VALUE:$s,ERR_OUT_OF_RANGE:Ft,ERR_UNKNOWN_SIGNAL:Lh}}=Ie,{normalizeEncoding:Mh}=Ne,{isAsyncFunction:Zl,isArrayBufferView:Jl}=Ne.types,Xl=ke((e,t,n=Vl,r=Gl)=>{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(!Hl(n,e)){const i="must be one of: "+ql(zl(n,o=>typeof o=="string"?`'${o}'`:Yl(o)),", ");throw new $s(t,e,i)}});function Ql(e,t){if(typeof e!="boolean")throw new We(t,"boolean",e)}function Dr(e,t,n){return e==null||!Kl(e,t)?n:e[t]}const eu=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(!Jl(e))throw new We(t,["Buffer","TypedArray","DataView"],e)});const tu=ke((e,t)=>{if(e!==void 0&&(e===null||typeof e!="object"||!("aborted"in e)))throw new We(t,"AbortSignal",e)}),nu=ke((e,t)=>{if(typeof e!="function")throw new We(t,"Function",e)});ke((e,t)=>{if(typeof e!="function"||Zl(e))throw new We(t,"Function",e)});ke((e,t)=>{if(e!==void 0)throw new We(t,"undefined",e)});var _n={validateBoolean:Ql,validateFunction:nu,validateInteger:Xl,validateObject:eu,validateAbortSignal:tu},Ci={exports:{}};const{SymbolAsyncIterator:co,SymbolIterator:ho,SymbolFor:Pt}=he,Ds=Pt("nodejs.stream.destroyed"),ru=Pt("nodejs.stream.errored"),go=Pt("nodejs.stream.readable"),po=Pt("nodejs.stream.writable"),iu=Pt("nodejs.stream.disturbed"),ou=Pt("nodejs.webstream.isClosedPromise"),su=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 au(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 lu(e){return js(e)||ks(e)||Ws(e)}function uu(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 fu(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 du(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&&!fu(e)}function cu(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 hu(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 gu(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 pu(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 bu(e){return typeof e._sent100=="boolean"&&qs(e)}function wu(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 yu(e){if(!Ze(e))return null;const t=e._writableState,n=e._readableState,r=t||n;return!r&&bu(e)||!!(r&&r.autoDestroy&&r.emitClose&&r.closed===!1)}function _u(e){var t;return!!(e&&((t=e[iu])!==null&&t!==void 0?t:e.readableDidRead||e.readableAborted))}function mu(e){var t,n,r,i,o,s,a,f,u,g;return!!(e&&((t=(n=(r=(i=(o=(s=e[ru])!==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:_u,isErrored:mu,isReadable:Fs,kIsClosedPromise:ou,kControllerErrorFunction:su,isClosed:pu,isDuplexNodeStream:au,isFinished:cu,isIterable:uu,isReadableNodeStream:Ni,isReadableStream:js,isReadableFinished:Us,isReadableErrored:gu,isNodeStream:Ze,isWebStream:lu,isWritable:Hs,isWritableNodeStream:or,isWritableStream:ks,isWritableFinished:du,isWritableErrored:hu,isServerRequest:wu,willEmitClose:yu,isTransformStream:Ws};const dt=Nt,{AbortError:zs,codes:Eu}=Ie,{ERR_INVALID_ARG_TYPE:Su,ERR_STREAM_PREMATURE_CLOSE:bo}=Eu,{kEmptyObject:li,once:ui}=Ne,{validateAbortSignal:vu,validateFunction:Au,validateObject:Ru,validateBoolean:Iu}=_n,{Promise:Tu,PromisePrototypeThen:xu,SymbolDispose:Gs}=he,{isClosed:Ou,isReadable:wo,isReadableNodeStream:jr,isReadableStream:Cu,isReadableFinished:yo,isReadableErrored:_o,isWritable:mo,isWritableNodeStream:Eo,isWritableStream:Nu,isWritableFinished:So,isWritableErrored:vo,isNodeStream:Pu,willEmitClose:Lu,kIsClosedPromise:Mu}=at;let Wt;function Bu(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:Ru(t,"options"),Au(n,"callback"),vu(t.signal,"options.signal"),n=ui(n),Cu(e)||Nu(e))return $u(e,t,n);if(!Pu(e))throw new Su("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=Lu(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=Ou(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)};Bu(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 $u(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 xu(e[Mu].promise,o,o),fi}function Du(e,t){var n;let r=!1;return t===null&&(t=li),(n=t)!==null&&n!==void 0&&n.cleanup&&(Iu(t.cleanup,"cleanup"),r=t.cleanup),new Tu((i,o)=>{const s=Vs(e,t,a=>{r&&s(),a?o(a):i()})})}Ci.exports=Vs;Ci.exports.finished=Du;var pt=Ci.exports;const Ke=Nt,{aggregateTwoErrors:ju,codes:{ERR_MULTIPLE_CALLBACK:ku},AbortError:Wu}=Ie,{Symbol:Ks}=he,{kIsDestroyed:Uu,isDestroyed:Fu,isFinished:Hu,isServerRequest:qu}=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 zu(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,ju(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(Gu,e,o):Ke.nextTick(Js,e)}try{e._destroy(t||null,i)}catch(o){i(o)}}function Gu(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 Vu(){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 Ku(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(Yu,e)}function Yu(e){let t=!1;function n(r){if(t){hi(e,r??new ku);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(Zu,e)}try{e._construct(r=>{Ke.nextTick(n,r)})}catch(r){Ke.nextTick(n,r)}}function Zu(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 Ju(e,t){e.emit("error",t),Ke.nextTick(Xs,e)}function Xu(e,t){!e||Fu(e)||(!t&&!Hu(e)&&(t=new Wu),qu(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(Ju,e,t):Ke.nextTick(Xs,e),e.destroyed||(e[Uu]=!0))}var Kt={construct:Ku,destroyer:Xu,destroy:zu,undestroy:Vu,errorOrDestroy:hi};const{ArrayIsArray:Qu,ObjectSetPrototypeOf:Qs}=he,{EventEmitter:ar}=yn;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):Qu(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:ef,TypedArrayPrototypeSet:kn,Uint8Array:tf}=he,{Buffer:kr}=Ct,{inspect:nf}=Ne;var rf=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;)kn(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}*[ef](){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)kn(n,s,r-t),t-=s.length;else{t===s.length?(kn(n,s,r-t),++o,i.next?this.head=i.next:this.head=this.tail=null):(kn(n,new tf(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 nf(this,{...n,depth:0,customInspect:!1})}};const{MathFloor:of,NumberIsInteger:sf}=he,{validateInteger:af}=_n,{ERR_INVALID_ARG_VALUE:lf}=Ie.codes;let ta=16*1024,na=16;function uf(e,t,n){return e.highWaterMark!=null?e.highWaterMark:t?e[n]:null}function ra(e){return e?na:ta}function ff(e,t){af(t,"value",0),e?na=t:ta=t}function df(e,t,n,r){const i=uf(t,r,n);if(i!=null){if(!sf(i)||i<0){const o=r?`options.${n}`:"options.highWaterMark";throw new lf(o,i)}return of(i)}return ra(e.objectMode)}var fr={getHighWaterMark:df,getDefaultHighWaterMark:ra,setDefaultHighWaterMark:ff};const To=Nt,{PromisePrototypeThen:cf,SymbolAsyncIterator:xo,SymbolIterator:Oo}=he,{Buffer:hf}=Ct,{ERR_INVALID_ARG_TYPE:gf,ERR_STREAM_NULL_VALUES:pf}=Ie.codes;function bf(e,t,n){let r;if(typeof t=="string"||t instanceof hf)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 gf("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){cf(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 pf;if(o.push(p))continue;s=!1}}catch(u){o.destroy(u)}break}}return o}var ia=bf,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}=yn,{Stream:R,prependListener:h}=Pi,{Buffer:w}=Ct,{addAbortSignal:y}=ur,x=pt;let m=Ne.debuglog("stream",l=>{m=l});const j=rf,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}=_n,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 An=1073741824;function Er(l){if(l>An)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 Rn(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=Rn(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=Rn(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(In,l,c))}function In(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?Nn: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 Nn(){m("onend"),l.end()}let Oe,Pn=!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",Nn),N.removeListener("end",yt),N.removeListener("data",Mn),Pn=!0,Oe&&L.awaitDrainWriters&&(!l._writableState||l._writableState.needDrain)&&Oe()}function Ln(){Pn||(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",Mn);function Mn(Qe){m("ondata");const Fe=l.write(Qe);m("dest.write",Fe),Fe===!1&&Ln()}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?Ln():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(Tn,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(Tn,this),c};function Tn(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 xn(this)},Y.prototype.iterator=function(l){return l!==void 0&&I(l,"options"),xn(this,l)};function xn(l,c){typeof l.read!="function"&&(l=Y.wrap(l,{objectMode:!0}));const N=On(l,c);return N.stream=l,N}async function*On(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 Cn(){return Qt===void 0&&(Qt={}),Qt}return Y.fromWeb=function(l,c){return Cn().newStreamReadableFromReadableStream(l,c)},Y.toWeb=function(l,c){return Cn().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}=yn,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 wf(){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=wf()),u(g,"body")},Hr}const{ObjectSetPrototypeOf:oa,Symbol:yf}=he;var sa=st;const{ERR_METHOD_NOT_IMPLEMENTED:_f}=Ie.codes,Mi=ot(),{getHighWaterMark:mf}=fr;oa(st.prototype,Mi.prototype);oa(st,Mi);const dn=yf("kCallback");function st(e){if(!(this instanceof st))return new st(e);const t=e?mf(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",Ef)}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 Ef(){this._final!==pi&&pi.call(this)}st.prototype._final=pi;st.prototype._transform=function(e,t,n){throw new _f("_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:Sf,Promise:vf,SymbolAsyncIterator:Af,SymbolDispose:Rf}=he,Xn=pt,{once:If}=Ne,Tf=Kt,Mo=ot(),{aggregateTwoErrors:xf,codes:{ERR_INVALID_ARG_TYPE:bi,ERR_INVALID_RETURN_VALUE:qr,ERR_MISSING_ARGS:Of,ERR_STREAM_DESTROYED:Cf,ERR_STREAM_PREMATURE_CLOSE:Nf},AbortError:Pf}=Ie,{validateFunction:Lf,validateAbortSignal:Mf}=_n,{isIterable:Et,isReadable:zr,isReadableNodeStream:Vn,isNodeStream:Bo,isTransformStream:jt,isWebStream:Bf,isReadableStream:Gr,isReadableFinished:$f}=at,Df=globalThis.AbortController||pn().AbortController;let Vr,Kr,Yr;function $o(e,t,n){let r=!1;e.on("close",()=>{r=!0});const i=Xn(e,{readable:t,writable:n},o=>{r=!o});return{destroy:o=>{r||(r=!0,Tf.destroyer(e,o||new Cf("pipe")))},cleanup:i}}function jf(e){return Lf(e[e.length-1],"streams[stream.length - 1]"),e.pop()}function Zr(e){if(Et(e))return e;if(Vn(e))return kf(e);throw new bi("val",["Readable","Iterable","AsyncIterable"],e)}async function*kf(e){Kr||(Kr=dr()),yield*Kr.prototype[Af].call(e)}async function Wn(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 vf((u,g)=>{i?g(i):o=()=>{i?g(i):u()}});t.on("drain",s);const f=Xn(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?xf(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 Wf(...e){return ua(e,If(jf(e)))}function ua(e,t,n){if(e.length===1&&Sf(e[0])&&(e=e[0]),e.length<2)throw new Of("streams");const r=new Df,i=r.signal,o=n==null?void 0:n.signal,s=[];Mf(o,"options.signal");function a(){R(new Pf)}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[Rf](),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)||Vn(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++,Wn(h,k,S,{end:B});else if(Gr(h)||jt(h)){const D=h.readable||h;v++,Wn(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(Vn(h)){v+=2;const k=Uf(h,m,S,{end:B});zr(m)&&q&&s.push(k)}else if(jt(h)||Gr(h)){const k=h.readable||h;v++,Wn(k,m,S,{end:B})}else if(Et(h))v++,Wn(h,m,S,{end:B});else throw new bi("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],h);h=m}else if(Bf(m)){if(Vn(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 Uf(e,t,n,{end:r}){let i=!1;if(t.on("close",()=>{i||n(new Nf)}),e.pipe(t,{end:!1}),r){let o=function(){i=!0,t.end()};$f(e)?un.nextTick(o):e.once("end",o)}else n();return Xn(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)}),Xn(t,{readable:!1,writable:!0},n)}var $i={pipelineImpl:ua,pipeline:Wf};const{pipeline:Ff}=$i,Un=ot(),{destroyer:Hf}=Kt,{isNodeStream:Fn,isReadable:Do,isWritable:jo,isWebStream:Xr,isTransformStream:mt,isWritableStream:ko,isReadableStream:Wo}=at,{AbortError:qf,codes:{ERR_INVALID_ARG_VALUE:Uo,ERR_MISSING_ARGS:zf}}=Ie,Gf=pt;var fa=function(...t){if(t.length===0)throw new zf("streams");if(t.length===1)return Un.from(t[0]);const n=[...t];if(typeof t[0]=="function"&&(t[0]=Un.from(t[0])),typeof t[t.length-1]=="function"){const S=t.length-1;t[S]=Un.from(t[S])}for(let S=0;S<t.length;++S)if(!(!Fn(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=Ff(t,f),p=!!(jo(u)||ko(u)||mt(u)),v=!!(Do(g)||Wo(g)||mt(g));if(a=new Un({writableObjectMode:!!(u!=null&&u.writableObjectMode),readableObjectMode:!!(g!=null&&g.readableObjectMode),writable:p,readable:v}),p){if(Fn(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;Gf(S,()=>{if(i){const R=i;i=null,R()}})}if(v){if(Fn(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 qf),o=null,r=null,i=null,s===null?R(S):(s=R,Fn(g)&&Hf(g,S))},a};const Vf=globalThis.AbortController||pn().AbortController,{codes:{ERR_INVALID_ARG_VALUE:Kf,ERR_INVALID_ARG_TYPE:mn,ERR_MISSING_ARGS:Yf,ERR_OUT_OF_RANGE:Zf},AbortError:Ye}=Ie,{validateAbortSignal:Lt,validateInteger:Fo,validateObject:Mt}=_n,Jf=he.Symbol("kWeak"),Xf=he.Symbol("kResistStopPropagation"),{finished:Qf}=pt,ed=fa,{addAbortSignalNoValidate:td}=ur,{isWritable:nd,isNodeStream:rd}=at,{deprecate:id}=Ne,{ArrayPrototypePush:od,Boolean:sd,MathFloor:Ho,Number:ad,NumberIsNaN:ld,Promise:qo,PromiseReject:zo,PromiseResolve:ud,PromisePrototypeThen:Go,Symbol:da}=he,Qn=da("kEmpty"),Vo=da("kEof");function fd(e,t){if(t!=null&&Mt(t,"options"),(t==null?void 0:t.signal)!=null&&Lt(t.signal,"options.signal"),rd(e)&&!nd(e))throw new Kf("stream",e,"must be writable");const n=ed(this,e);return t!=null&&t.signal&&td(t.signal,n),n}function cr(e,t){if(typeof e!="function")throw new mn("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(sd)),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===Qn)continue;y=ud(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!==Qn&&(yield y),a.shift(),h()}await new qo(y=>{u=y})}}finally{p=!0,g&&(g(),g=null)}}).call(this)}function dd(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 cd(e,t=void 0){if(typeof e!="function")throw new mn("fn",["Function","AsyncFunction"],e);return!await ca.call(this,async(...n)=>!await e(...n),t)}async function hd(e,t){for await(const n of Di.call(this,e,t))return n}async function gd(e,t){if(typeof e!="function")throw new mn("fn",["Function","AsyncFunction"],e);async function n(r,i){return await e(r,i),Qn}for await(const r of cr.call(this,n,t));}function Di(e,t){if(typeof e!="function")throw new mn("fn",["Function","AsyncFunction"],e);async function n(r,i){return await e(r,i)?r:Qn}return cr.call(this,n,t)}class pd extends Yf{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}async function bd(e,t,n){var r;if(typeof e!="function")throw new mn("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 Qf(this.destroy(u)),u}const o=new Vf,s=o.signal;if(n!=null&&n.signal){const u={once:!0,[Jf]:this,[Xf]:!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 pd}finally{o.abort()}return t}async function wd(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});od(t,r)}return t}function yd(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=ad(e),ld(e))return 0;if(e<0)throw new Zf("number",">= 0",e);return e}function _d(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 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;if(e-- >0&&(yield o),e<=0)return}}).call(this)}xi.streamReturningOperators={asIndexedPairs:id(dd,"readable.asIndexedPairs will be removed in a future version."),drop:_d,filter:Di,flatMap:yd,map:cr,take:md,compose:fd};xi.promiseReturningOperators={every:cd,forEach:gd,reduce:bd,toArray:wd,some:ca,find:hd};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:{}},Ed=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=Ed;ji.exports=wa(Kn);ji.exports.strict=wa(ya);Kn.proto=Kn(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return Kn(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return ya(this)},configurable:!0})});function Kn(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 Sd=Vt(ki);var vd=ki,Ad=function(){},Rd=function(e){return e.setHeader&&typeof e.abort=="function"},Id=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=vd(n||Ad);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 Rd(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)),Id(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 Td=ki,xd=ma,Yn;try{Yn=vl}catch{}var bn=function(){},Od=/^v?\.0/.test(Me.process.version),gr=function(e){return typeof e=="function"},Cd=function(e){return!Od||!Yn?!1:(e instanceof(Yn.ReadStream||bn)||e instanceof(Yn.WriteStream||bn))&&gr(e.close)},Nd=function(e){return e.setHeader&&gr(e.abort)},Pd=function(e,t,n,r){r=Td(r);var i=!1;e.on("close",function(){i=!0}),xd(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,Cd(e))return e.close(bn);if(Nd(e))return e.abort();if(gr(e.destroy))return e.destroy();r(s||new Error("stream was destroyed"))}}},Jo=function(e){e()},Ld=function(e,t){return e.pipe(t)},Md=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 Pd(i,s,a,function(f){n||(n=f),f&&r.forEach(Jo),!s&&(r.forEach(Jo),t(n))})});return e.reduce(Ld)},Bd=Md;const Xo=Vt(Bd);function Hn(){}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,Hn),this._haveSyn=!1,this._init=!1}_handShake(){this._write(Qo,null,Hn),this.cork()}_onData(t){if(!this._init)t===Qo?(this._haveSyn=!0,this._write(ei,null,Hn)):t===ei&&(this._init=!0,this._haveSyn||this._write(ei,null,Hn),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 $d={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=$d.rpc.internal,Dd="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 jd(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Dd;if(Ea(e)){const n=e.toString();if(Object.hasOwn(ns,n))return ns[n].message}return t}const kd={code:rs,message:jd(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 Wd(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 Ud(e,t){if(e&&typeof e=="object"&&"serialize"in e&&typeof e.serialize=="function")return e.serialize();if(Sa(e))return e;const n=Wd(e);return je(je({},t),{},{data:{cause:n}})}function as(e){let{fallbackError:t=kd,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=Ud(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 Fd(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 yn.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=Fd(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 Rl({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 Hd(){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 qd(){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 zd 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 Gd 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 zd({parent:this,name:t});return this._substreams[t]=n,Vd(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 Vd(e,t){const n=Sd(t);Zo(e,{readable:!1},n),Zo(e,{writable:!1},n)}var er={exports:{}};er.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:""}(),An=re.toString,Er=Y.call(Object),Rn=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),In=Object.create,Sr=re.propertyIsEnumerable,Tn=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,xn=Date.now,On=xr(_e,"Map"),lt=xr(Object,"create"),Xt=function(){function d(){}return function(b){if(!_t(b))return{};if(In)return In(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 Cn(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=Cn,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=Bn(b,d);if(A<0)return!1;var H=b.length-1;return A==H?b.pop():Tn.call(b,A,1),--this.size,!0}function we(d){var b=this.__data__,A=Bn(b,d);return A<0?void 0:b[A][1]}function xe(d){return Bn(this.__data__,d)>-1}function Nn(d,b){var A=this.__data__,H=Bn(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=Nn;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 Pn(){this.size=0,this.__data__={hash:new Xe,map:new(On||N),string:new Xe}}function Rr(d){var b=Dn(this,d).delete(d);return this.size-=b?1:0,b}function Ln(d){return Dn(this,d).get(d)}function Mn(d){return Dn(this,d).has(d)}function en(d,b){var A=Dn(this,d),H=A.size;return A.set(d,b),this.size+=A.size==H?0:1,this}Oe.prototype.clear=Pn,Oe.prototype.delete=Rr,Oe.prototype.get=Ln,Oe.prototype.has=Mn,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(!On||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&&!jn(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)&&jn(H,A))||A===void 0&&!(b in d))&&Tr(d,b,A)}function Bn(d,b){for(var A=d.length;A--;)if(jn(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 $n(d){return d==null?d===void 0?q:y:Je&&Je in Object(d)?ol(d):dl(d)}function Zi(d){return nn(d)&&$n(d)==a}function Ga(d){if(!_t(d)||ul(d))return!1;var b=Lr(d)?Rn:J;return b.test(pl(d))}function Va(d){return nn(d)&&to(d.length)&&!!M[$n(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 Dn(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=An.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)?jn(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 An.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=xn(),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 jn(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=$n(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)||$n(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})(er,er.exports);er.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 tr=Vt(Aa),Kd=tr.getLogger("http-helpers");Kd.setLevel(Aa.levels.INFO);function fs(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function Yd(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function br(e,...t){if(!Yd(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 Zd(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 nr(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 Jd(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 Xd(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=Xd(e)),br(e),e}function Qd(...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 ec(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 tc(e=32){if(ti&&typeof ti.getRandomValues=="function")return ti.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}function nc(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 rc=(e,t,n)=>e&t^~e&n,ic=(e,t,n)=>e&t^e&n^t&n;class oc 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){nr(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){nr(this),Jd(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;nc(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 sc=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 ac extends oc{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+rc(a,f,u)+sc[p]+ft[p]|0,h=(Ge(r,2)^Ge(r,13)^Ge(r,22))+ic(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 lc=ec(()=>new ac);class Ia extends Ra{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,Zd(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 nr(this),this.iHash.update(t),this}digestInto(t){nr(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),uc=BigInt(2);function xt(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function En(e){if(!xt(e))throw new Error("Uint8Array expected")}const fc=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function qt(e){En(e);let t="";for(let n=0;n<e.length;n++)t+=fc[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 En(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 dc(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];En(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 cc(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 hc(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function gc(e){let t;for(t=0;e>xa;e>>=wr,t+=1);return t}function pc(e,t){return e>>BigInt(t)&wr}function bc(e,t,n){return e|(n?wr:xa)<<BigInt(t)}const qi=e=>(uc<<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 wc={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 Sn(e,t,n={}){const r=(i,o,s)=>{const a=wc[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 yc=Object.freeze(Object.defineProperty({__proto__:null,abytes:En,bitGet:pc,bitLen:gc,bitMask:qi,bitSet:bc,bytesToHex:qt,bytesToNumberBE:It,bytesToNumberLE:Fi,concatBytes:wn,createHmacDrbg:Ca,ensureBytes:qe,equalBytes:cc,hexToBytes:zt,hexToNumber:Ui,isBytes:xt,numberToBytesBE:Gt,numberToBytesLE:Hi,numberToHexUnpadded:Oa,numberToVarBytesBE:dc,utf8ToBytes:hc,validateObject:Sn},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const ye=BigInt(0),pe=BigInt(1),St=BigInt(2),_c=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 mc(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 Ec(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&&mc(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 Sc(e){if(e%_i===_c){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 Ec(e)}const vc=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Ac(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},n=vc.reduce((r,i)=>(r[i]="function",r),t);return Sn(e,n)}function Rc(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 Ic(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 Tc(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=Sc(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)=>Rc(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=>Ic(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 xc(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 Oc=BigInt(0),ii=BigInt(1);function Cc(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>Oc;)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 Ac(e.Fp),Sn(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 Nc(e){const t=Ma(e);Sn(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:Pc,hexToBytes:Lc}=yc,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:Pc(r),l:e.subarray(n+2)}},toSig(e){const{Err:t}=At,n=typeof e=="string"?Lc(e):e;En(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 Mc(e){const t=Nc(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=Cc(p,t.endo?Math.ceil(v/2):v);return{CURVE:t,ProjectivePoint:p,normPrivateKeyToScalar:f,weierstrassEquation:o,isWithinCurveOrder:s}}function Bc(e){const t=Ma(e);return Sn(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function $c(e){const t=Bc(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}=Mc({...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 xc(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 Dc(e){return{hash:e,hmac:(t,...n)=>Ta(e,t,Qd(...n)),randomBytes:tc}}function jc(e,t){const n=r=>$c({...e,...Dc(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"),kc=BigInt(1),Ei=BigInt(2),ws=(e,t)=>(e+t/Ei)/t;function Wc(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=Tc(Ba,void 0,void 0,{sqrt:Wc}),zi=jc({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=-kc*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}}}},lc);BigInt(0);zi.ProjectivePoint;function Uc(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 Fc(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 Fc(t.length%2===0?t:Uc(t))},Hc=e=>{if(!Number.isSafeInteger(e)||e<0)throw new Error(`Received an invalid integer type: ${e}`);return`0x${e.toString(16)}`},vn=e=>{const t=Hc(e);return yr(t)};BigInt("0xffffffffffffffff");BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935");zi.CURVE.n;zi.CURVE.n/BigInt(2);BigInt("0x10000000000000000000000000000000000000000000000000000000000000000");const qc="0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470";yr(qc);const zc="0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347";yr(zc);const Gc="0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421";yr(Gc);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={}));vn(Ot.Version);vn(Ot.Balance);vn(Ot.Nonce);vn(Ot.CodeHash);vn(Ot.CodeSize);BigInt(256)**BigInt(31);var Vc={exports:{}},Gi={},Vi={};Object.defineProperty(Vi,"__esModule",{value:!0});function Kc(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=Kc;Object.defineProperty(Gi,"__esModule",{value:!0});var Yc=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 Zc(e,t){return t===void 0&&(t="utf8"),Me.Buffer.from(Ki(e),"base64").toString(t)}function Ki(e){return e=e.toString(),Yc.default(e).replace(/\-/g,"+").replace(/_/g,"/")}function Ri(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function Jc(e){return Me.Buffer.from(Ki(e),"base64")}var Yt=$a;Yt.encode=$a;Yt.decode=Zc;Yt.toBase64=Ki;Yt.fromBase64=Ri;Yt.toBuffer=Jc;Gi.default=Yt;(function(e){e.exports=Gi.default,e.exports.default=e.exports})(Vc);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 Xc{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 Qc{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 Xc,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(Qc,"instanceMap",new Map);je(je({},ct),ue);const qn={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"},eh={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 th(e){return function(n,r,i){i(o=>{r.error&&tr.warn(`Error in RPC response:
|
|
3
|
-
`,r),!n.isTorusInternal&&(tr.info(`RPC (${e.origin}):`,n,"->",r),o())})}}var nh=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 rh=Vt(nh);var ih="2.1.0";function Da(e){return e!==null&&typeof e=="object"&&typeof e.pipe=="function"}function oh(e){return Da(e)&&e.writable!==!1&&typeof e._write=="function"&&typeof e._writableState=="object"}function sh(e){return Da(e)&&e.readable!==!1&&typeof e._read=="function"&&typeof e._readableState=="object"}function ah(e){return oh(e)&&sh(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 lh={PRODUCTION:"production"},fn={BOTTOM_LEFT:"bottom-left",TOP_LEFT:"top-left",BOTTOM_RIGHT:"bottom-right",TOP_RIGHT:"top-right"},uh={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:uh,localStorageKeyPrefix:"torus-"},ae=tr.getLogger("solana-embed");function fh(){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 dh(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 zn=()=>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}},ch=()=>{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},hh={height:660,width:375},gh={height:740,width:1315},ph={height:700,width:1200},ka={height:600,width:400};function bh(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),!ah(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 Gd;Xo(t,o,t,this._handleStreamDisconnect.bind(this,"Torus")),o.ignoreStream("phishing");const s=Hd();Xo(s.stream,o.createStream(i),s.stream,this._handleStreamDisconnect.bind(this,"Torus RpcProvider"));const a=new tt;a.push(qd()),a.push(fh()),a.push(th({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){dh(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 Gn(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(ph),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[ch()];this.embedTranslations=o.embed,this.windowRefs={},this.on("connect",()=>{this._state.isConnected=!0});const s=a=>{const{method:f,params:u}=a;if(f===qn.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===qn.CLOSE_WINDOW)this._handleCloseWindow(u);else if(f===qn.USER_LOGGED_IN){const{currentLoginProvider:g}=u;this._state.isLoggedIn=!0,this._state.currentLoginProvider=g}else f===qn.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:eh.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}rh(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 wh=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 yh(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 _h=async()=>({name:wh(window),icon:await yh(window)}),mh=["send_transaction","sign_transaction","sign_all_transactions","sign_message","connect"],Eh=[rt.SET_PROVIDER],Sh=bh("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 Dh{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=lh.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 :${ih}`),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 _h();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(gh)}).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=zn();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=Gn(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=Gn(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=Gn(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=Gn(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(Sh&&t){const i=window.localStorage.getItem(n);if(i)r=i;else{const o=`torus-app-${zn()}`;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)&&mh.includes(p.method)){if(!this.communicationProvider.isLoggedIn)throw new Error("User Not Logged In");const v=zn();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)&&Eh.includes(p.method)){const v=zn();o._handleWindow(v,{target:"_blank",features:cn(hh)}),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,lh as TORUS_BUILD_ENV,mr as TorusInPageProvider,Dh as default};
|