@dcl/account-site 6.8.0 → 6.9.0
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/assets/Address-BHGD07NO.js +1 -0
- package/assets/Authorization-DmoiysGx.js +1 -0
- package/assets/CoinbaseSDKConnection-C9-JnGls.js +1 -0
- package/assets/{ConstantsUtil-Dl5WOfjM.js → ConstantsUtil-g0AjdkOa.js} +1 -1
- package/assets/{ExchangeController-JD5-aj9j.js → ExchangeController-C-OE-irq.js} +1 -1
- package/assets/{HelpersUtil-BYRqEOLc.js → HelpersUtil-C073QcrZ.js} +1 -1
- package/assets/InAppWalletConnectUI-Bdxz0Bmy.js +1 -0
- package/assets/{NetworkUtil-CORVq-U7.js → NetworkUtil-BooKnyFI.js} +1 -1
- package/assets/{QRCodeRenderer-CAUMCMrQ.js → QRCodeRenderer-C2O8aJw5.js} +1 -1
- package/assets/Solidity-D6b-SCK0.js +1 -0
- package/assets/{SwapController-CENGi_f8.js → SwapController-DITN3ZmR.js} +1 -1
- package/assets/ThirdwebWalletManager-BUJ2S4b0.js +298 -0
- package/assets/TypedData-ByTQ7nLR.js +2 -0
- package/assets/addresses-DVWfx5EX.js +1 -0
- package/assets/arweave-CldmCeKB.js +1 -0
- package/assets/{biconomy-DURQhrK6.js → biconomy-C7JeDEA3.js} +1 -1
- package/assets/biconomy-C9hDxeVn.js +1 -0
- package/assets/{ccip-CzLewx-i.js → ccip-BtKXNXL8.js} +1 -1
- package/assets/{ccip-DGvrteB6.js → ccip-ByfH6Pp1.js} +1 -1
- package/assets/ccip-sd4F7RdI.js +1 -0
- package/assets/{chains-ClhAINLn.js → chains-ClhzAPRM.js} +1 -1
- package/assets/{common-BaZ48mbG.js → common-5Sx2Oaqw.js} +1 -1
- package/assets/common-DAlzQshe.js +1 -0
- package/assets/concat-hex-D_Hd0Y8j.js +1 -0
- package/assets/{controller-CgHGY4fa.js → controller-BKewv9ws.js} +2 -2
- package/assets/controller-CMiTdXrl.js +2 -0
- package/assets/{data-capture-C3H4h0ye.js → data-capture-SGXWH8uV.js} +1 -1
- package/assets/decimals-BkxTCZnw.js +1 -0
- package/assets/{decimals-wNlF21S5.js → decimals-DYCSb7r6.js} +1 -1
- package/assets/decimals-Den2KPun.js +1 -0
- package/assets/{detectExtension-ywrU3B9f.js → detectExtension-BqT-gQP6.js} +1 -1
- package/assets/detectExtension-DRxhZaJ-.js +1 -0
- package/assets/{email-EtC4Qw7k.js → email-D9PJu66O.js} +1 -1
- package/assets/{embedded-wallet-BLxx2nq0.js → embedded-wallet-BNJE9JJY.js} +1 -1
- package/assets/{engine-CbOuNdui.js → engine-BpIYDc2z.js} +1 -1
- package/assets/engine-CmO-qFS1.js +1 -0
- package/assets/estimate-l1-fee-DnqX0KQm.js +2 -0
- package/assets/{estimate-l1-fee-COxQ74Xh.js → estimate-l1-fee-n2GS47w0.js} +1 -1
- package/assets/eth_estimateGas-DVJqp0a0.js +1 -0
- package/assets/eth_estimateGas-ZIidgCSn.js +1 -0
- package/assets/{eth_getStorageAt-CLxjZO4t.js → eth_getStorageAt-DMscVfg3.js} +1 -1
- package/assets/eth_getTransactionCount-CMQovf3i.js +1 -0
- package/assets/{eth_getTransactionCount-BKcuSAaU.js → eth_getTransactionCount-h82D3bxu.js} +1 -1
- package/assets/{ethereum-D98w8ceQ.js → ethereum-Db4wQ8cQ.js} +1 -1
- package/assets/{extractIPFS-Bwmi3T5d.js → extractIPFS-446jiCiR.js} +1 -1
- package/assets/extractIPFS-tOg-rRc-.js +1 -0
- package/assets/{features-BqZGfYIj.js → features-Bya_uQnq.js} +1 -1
- package/assets/{fetchTokenMetadata-BrBgEOsH.js → fetchTokenMetadata-B1jhcJrg.js} +2 -2
- package/assets/fetchTokenMetadata-DXhdZ9jJ.js +2 -0
- package/assets/{fortmatic-Rdz9ucwd.js → fortmatic-DWc9CMNy.js} +1 -1
- package/assets/get-bytecode-FPC_G1PK.js +1 -0
- package/assets/get-ecosystem-wallet-info-BH812YkU.js +1 -0
- package/assets/{get-ecosystem-wallet-info-DfHMq1Kz.js → get-ecosystem-wallet-info-CsVSXoZ9.js} +1 -1
- package/assets/{getBalance-ZH0H3K3Z.js → getBalance-BJu93LMj.js} +2 -2
- package/assets/getBalance-BjubRO2E.js +1 -0
- package/assets/getCurrencyMetadata-B6uMlDub.js +2 -0
- package/assets/{getInstalledModules-DRhOlDcR.js → getInstalledModules-C_LJpz_7.js} +1 -1
- package/assets/getInstalledModules-cmepPgT8.js +1 -0
- package/assets/getNFT-BLT_Nrf_.js +2 -0
- package/assets/{getNFT-GNDwObaN.js → getNFT-Cf6D_49D.js} +1 -1
- package/assets/{getNFT-D6wHZRiB.js → getNFT-ClRsQ9zy.js} +2 -2
- package/assets/getNFT-uyJP8nm4.js +1 -0
- package/assets/{hashTypedData-41394cRH.js → hashTypedData-CLob9Zsk.js} +1 -1
- package/assets/{if-defined-DwiGupeI.js → if-defined-BfXFCfhz.js} +1 -1
- package/assets/in-app-wallet-calls-C0n9HjId.js +1 -0
- package/assets/{in-app-wallet-calls-CPU2uJ6f.js → in-app-wallet-calls-DUqkYMt1.js} +1 -1
- package/assets/index-1chDcRmP.js +2 -0
- package/assets/{index-CawWU9rF.js → index-4aItPLLW.js} +1 -1
- package/assets/{index-BEFVLZMS.js → index-9x3mVUYQ.js} +1 -1
- package/assets/{index-BR8a5etK.js → index-ACY2zvow.js} +1 -1
- package/assets/index-B1VBbtk9.js +1 -0
- package/assets/index-B4kmUY0d.js +2 -0
- package/assets/{index-Fv-acDXO.js → index-B6-Xobl2.js} +79 -78
- package/assets/{index-DIBbErfW.js → index-BGg37GBj.js} +1 -1
- package/assets/{index-C5zfi_7H.js → index-BQsaEzy7.js} +1 -1
- package/assets/{index-BOh2weBI.js → index-BRxU5H7H.js} +1 -1
- package/assets/{index-8zzhpxyI.js → index-BSP467IN.js} +1 -1
- package/assets/{index-DYQDZBEQ.js → index-BXifexJq.js} +1 -1
- package/assets/{index-phZWvHfL.js → index-Bi3OUhfd.js} +1 -1
- package/assets/{index-LZKkcZAZ.js → index-BkdqENWn.js} +1 -1
- package/assets/{index-BUjD0aLT.js → index-Bqkhbf-j.js} +1 -1
- package/assets/{index-CAfWDhIh.js → index-BrNT2tPP.js} +1 -1
- package/assets/index-BuLBr4CJ.js +3 -0
- package/assets/index-CBfD9fG_.js +3 -0
- package/assets/{index-Cm5owbs6.js → index-CCxvZC9z.js} +1 -1
- package/assets/{index-dE7qT1rS.js → index-CCzw3eWF.js} +1 -1
- package/assets/{index-BYXYehKA.js → index-CFnBXD-E.js} +2 -2
- package/assets/{index-Bi4I_eXH.js → index-CFy1Eegq.js} +1 -1
- package/assets/{index-vbDUNbAe.js → index-CGT2TfpK.js} +1 -1
- package/assets/{index-DjP1lSeJ.js → index-CLLWxWw1.js} +1 -1
- package/assets/{index-BjsRGW04.js → index-CMAF5KQo.js} +1 -1
- package/assets/{index-DDz_fX9F.js → index-CRXo5c7W.js} +1 -1
- package/assets/{index-C8LVWiNY.js → index-CXPEr8lr.js} +1 -1
- package/assets/{index-C79cRihP.js → index-C_CWRNXS.js} +1 -1
- package/assets/{index-B2fn3xIB.js → index-Ci26p999.js} +1 -1
- package/assets/{index-BkDiaE7t.js → index-Cja4UOCF.js} +1 -1
- package/assets/{index-C8qQNWbc.js → index-CpXrWP2a.js} +1 -1
- package/assets/{index-CgxIIYSr.js → index-Cv59_Dqg.js} +1 -1
- package/assets/{index-BbTsvCPk.js → index-CwOCLTiY.js} +1 -1
- package/assets/{index-C52TTugH.js → index-CxlJ-ZjW.js} +1 -1
- package/assets/{index-CJe1v77g.js → index-D-By2c9G.js} +1 -1
- package/assets/{index-CSiyIFnr.js → index-D0Jyo-s4.js} +1 -1
- package/assets/{index-mD5QWGsm.css → index-D2E7Umr3.css} +3 -3
- package/assets/{index-DLargbIn.js → index-DAGLKstf.js} +2 -2
- package/assets/{index-CSOxc5sc.js → index-DMZH80fA.js} +4 -4
- package/assets/index-DO01SzHY.js +4 -0
- package/assets/{index-DaWq4Nzj.js → index-DPWaLJzM.js} +1 -1
- package/assets/{index-DL0Eu5uz.js → index-DQt5rtxO.js} +1 -1
- package/assets/{index-jGki-zKe.js → index-DSqN93eC.js} +1 -1
- package/assets/{index-DjWVQGcv.js → index-DcZ1OZua.js} +1 -1
- package/assets/{index-BWZPtavh.js → index-DdD6BFNW.js} +1 -1
- package/assets/{index-8Zxz62OX.js → index-DftmpJ8E.js} +2 -2
- package/assets/{index-ZEPn8qKc.js → index-DuB7aae8.js} +1 -1
- package/assets/{index-rAbloVh4.js → index-TpT45Yhr.js} +4 -4
- package/assets/{index-B8gDkzKR.js → index-yvAPBrdI.js} +1 -1
- package/assets/index.es-BdGfQ9jz.js +29 -0
- package/assets/{index.es-BdRu1h__.js → index.es-CN4hhQIr.js} +1 -1
- package/assets/index.es-Cjo6uLeK.js +1 -0
- package/assets/{index.es-pnQCY6-7.js → index.es-LxVxXtUw.js} +1 -1
- package/assets/is-smart-wallet-kSShE3hl.js +1 -0
- package/assets/{native-CjSUDNml.js → native-CXizm-TO.js} +1 -1
- package/assets/{networks-B6IlNWMm.js → networks-DyswiDcL.js} +1 -1
- package/assets/oauth-CbK0gPlt.js +1 -0
- package/assets/{onramp-BTk7sVPr.js → onramp-phO3GqLV.js} +1 -1
- package/assets/{openzeppelin-BKxO6pj6.js → openzeppelin-CASw4uSB.js} +1 -1
- package/assets/openzeppelin-Dkk77Xr9.js +1 -0
- package/assets/ownerOf-Dn5Rvewb.js +1 -0
- package/assets/{ownerOf-CYvZRT99.js → ownerOf-HLFmP4SY.js} +1 -1
- package/assets/parse-typed-data-BSOEUDy_.js +1 -0
- package/assets/{parseNft-DhQFzpJp.js → parseNft-CwiONVVV.js} +2 -2
- package/assets/{parseSignature-DoNNAGxu.js → parseSignature-BsYIWxqL.js} +13 -13
- package/assets/{parseSignature-BduqmbK2.js → parseSignature-DXMGd6Bf.js} +3 -3
- package/assets/passkeys-tlSlZIRR.js +1 -0
- package/assets/{pay-with-exchange-CgOu6Uya.js → pay-with-exchange-BsYgDiHf.js} +1 -1
- package/assets/{qr-overlay-Bm0XTjkI.js → qr-overlay-B21EcFCK.js} +1 -1
- package/assets/{qr-overlay-DyMiJXUk.js → qr-overlay-CDVJkAma.js} +1 -1
- package/assets/read-contract-D8CQ_i-D.js +1 -0
- package/assets/{receive-r5RgRUWl.js → receive-CVGDvas8.js} +1 -1
- package/assets/{ref-Ki-jDMmv.js → ref-DeR4tBmt.js} +1 -1
- package/assets/resolveImplementation-2abc0dxK.js +1 -0
- package/assets/{resolveImplementation-B8tKI-wG.js → resolveImplementation-Cr9HN7sF.js} +1 -1
- package/assets/{rpc-nyXL61KJ.js → rpc-BuDu_uQE.js} +1 -1
- package/assets/{rpc-rFcFDQyb.js → rpc-DjXtIps7.js} +2 -2
- package/assets/secp256k1-BlHNYIaG.js +1 -0
- package/assets/{secp256k1-CPRDF0BA.js → secp256k1-CJ52XpcF.js} +1 -1
- package/assets/{send-DeIfSZo1.js → send-DP5QRJYD.js} +1 -1
- package/assets/send-batch-transaction-De71luzT.js +1 -0
- package/assets/{send-batch-transaction-CIuDJ271.js → send-batch-transaction-Dx0kM3Nk.js} +1 -1
- package/assets/{send-eip712-transaction-CknhU72d.js → send-eip712-transaction-Dm4F9s4t.js} +2 -2
- package/assets/send-eip712-transaction-q3anVEgs.js +2 -0
- package/assets/send-gasless-transaction-CQa_Dj1Y.js +2 -0
- package/assets/{send-gasless-transaction-yIAhbb7k.js → send-gasless-transaction-mWAyMAXy.js} +2 -2
- package/assets/send-transaction-B0F9brDJ.js +2 -0
- package/assets/{session-proposal-qDW11rpc.js → session-proposal-FRNsvDTi.js} +1 -1
- package/assets/session-proposal-ef7aaaHV.js +1 -0
- package/assets/session-request-Bz2BIU-j.js +2 -0
- package/assets/{session-request-By9y-Ayi.js → session-request-Cwmcu41B.js} +2 -2
- package/assets/sha256-BPZogG9w.js +1 -0
- package/assets/{sha256-_sKanFR7.js → sha256-DViOA4V5.js} +1 -1
- package/assets/{signing-Db0bjZpz.js → signing-D7Nlzpwh.js} +5 -5
- package/assets/signing-DhfHxzxy.js +2 -0
- package/assets/sleep-B_ShGKZF.js +1 -0
- package/assets/{socials-BcoSkWK5.js → socials-BZcwTEhb.js} +1 -1
- package/assets/{swaps-Bj8TNJkd.js → swaps-Cam24Ey2.js} +1 -1
- package/assets/switch-chain-YGyDlbyD.js +1 -0
- package/assets/thirdweb-B7gLwLri.js +27 -0
- package/assets/to-serializable-transaction-DAYFWHyO.js +23 -0
- package/assets/{totalSupply-CcNS_GzH.js → totalSupply-BZIagNGM.js} +1 -1
- package/assets/totalSupply-CWYDbbpl.js +1 -0
- package/assets/{transactionReceipt-CdsZdsdr.js → transactionReceipt-B-BG4ub0.js} +1 -1
- package/assets/{transactions-DuCMsSn_.js → transactions-CSAp5P5s.js} +1 -1
- package/assets/types-DFEAKZ3L.js +4 -0
- package/assets/utils-BtpzmIxp.js +2 -0
- package/assets/{utils-mHMkg6Kp.js → utils-Onbz2awt.js} +1 -1
- package/assets/{verifyHash-CboNxe2B.js → verifyHash-Bx9bP5KA.js} +3 -3
- package/assets/{w3m-modal-Cv35RGiT.js → w3m-modal-C63bxWaq.js} +1 -1
- package/assets/wait-for-tx-receipt-CuLnfaKm.js +1 -0
- package/assets/{wait-for-tx-receipt-Drv8Lr1P.js → wait-for-tx-receipt-DhBzWdPW.js} +1 -1
- package/assets/{wallets-GwhGT1dM.js → wallets-SiIK_4eu.js} +6 -6
- package/assets/{web-connector-bxGgXqpW.js → web-connector-BnZ6I9U8.js} +3 -3
- package/assets/web-connector-DJrJBk0_.js +2 -0
- package/assets/{zora-sepolia-Cm6nfoBw.js → zora-sepolia-5TL5obss.js} +1 -1
- package/index.html +2 -2
- package/package.json +3 -3
- package/assets/CoinbaseSDKConnection-BKJdrNl1.js +0 -1
- package/assets/InAppWalletConnectUI-BCpqJr7x.js +0 -1
- package/assets/ThirdwebWalletManager-C0WgXnZx.js +0 -326
- package/assets/biconomy-dnUC9FHi.js +0 -1
- package/assets/ccip-gHbZ_fY7.js +0 -1
- package/assets/common-DXGQjmn7.js +0 -1
- package/assets/concat-hex-BkDmxQZp.js +0 -1
- package/assets/controller-XOXJb_Xj.js +0 -2
- package/assets/decimals-Bk-qoHwa.js +0 -1
- package/assets/detectExtension-BeXqHbY8.js +0 -1
- package/assets/engine-BZxfKBvb.js +0 -1
- package/assets/estimate-l1-fee-CpxowJdJ.js +0 -2
- package/assets/eth_estimateGas-BI87Z6lb.js +0 -1
- package/assets/eth_estimateGas-D6jt3ABx.js +0 -1
- package/assets/eth_getTransactionCount-DX2PE6Uh.js +0 -1
- package/assets/extractIPFS-LV30uJp-.js +0 -1
- package/assets/fetchTokenMetadata-D7KlTBZU.js +0 -2
- package/assets/get-ecosystem-wallet-info-BpGtHQgI.js +0 -1
- package/assets/getBalance-B2S2mDBX.js +0 -1
- package/assets/getCurrencyMetadata-DO1CX_p4.js +0 -2
- package/assets/getInstalledModules-DQWxNwhQ.js +0 -1
- package/assets/getNFT-BS49C2kr.js +0 -1
- package/assets/getNFT-CW_k-N6S.js +0 -2
- package/assets/in-app-wallet-calls-C-2B-t-w.js +0 -1
- package/assets/index-BDODUKme.js +0 -1
- package/assets/index-BKKV2746.js +0 -3
- package/assets/index-C1yUcBr3.js +0 -2
- package/assets/index-DJX4jI7z.js +0 -2
- package/assets/index-DKiQCady.js +0 -3
- package/assets/index.es-DkH7OFeN.js +0 -29
- package/assets/index.es-anFcjT3-.js +0 -1
- package/assets/openzeppelin-C8E5DMGT.js +0 -1
- package/assets/ownerOf-CLN-nhw1.js +0 -1
- package/assets/resolveImplementation-YurP5AVa.js +0 -1
- package/assets/secp256k1-CLk510R-.js +0 -1
- package/assets/send-batch-transaction-BRauQRcY.js +0 -1
- package/assets/send-eip712-transaction-CJ8IBHyz.js +0 -2
- package/assets/send-gasless-transaction-Ds_GyVDO.js +0 -2
- package/assets/session-proposal-BOjuBppp.js +0 -1
- package/assets/session-request-BltijLOZ.js +0 -2
- package/assets/sha256-uQaZGirP.js +0 -1
- package/assets/signing-GXncBciP.js +0 -2
- package/assets/switch-chain-DXxIqQkk.js +0 -1
- package/assets/thirdweb-COhbCMEp.js +0 -27
- package/assets/totalSupply-ur_EDW6t.js +0 -1
- package/assets/web-connector-B0B4AGqG.js +0 -2
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/get-ecosystem-wallet-info-BH812YkU.js","assets/index-B6-Xobl2.js","assets/index-D2E7Umr3.css","assets/web-connector-DJrJBk0_.js","assets/oauth-CbK0gPlt.js","assets/types-DFEAKZ3L.js","assets/sign-login-payload-BKykauFw.js","assets/eth_sendRawTransaction-DPdnXbFR.js","assets/parse-typed-data-BSOEUDy_.js","assets/sleep-mAKpSMLY.js","assets/common-DAlzQshe.js","assets/index-1chDcRmP.js","assets/parseSignature-BsYIWxqL.js","assets/to-serializable-transaction-DAYFWHyO.js","assets/wait-for-tx-receipt-CuLnfaKm.js","assets/rpc-DjXtIps7.js","assets/sha256-BPZogG9w.js","assets/index-DO01SzHY.js","assets/get-bytecode-FPC_G1PK.js","assets/utils-BtpzmIxp.js","assets/ccip-sd4F7RdI.js","assets/send-transaction-B0F9brDJ.js","assets/is-smart-wallet-kSShE3hl.js","assets/TypedData-ByTQ7nLR.js","assets/Address-BHGD07NO.js","assets/Solidity-D6b-SCK0.js","assets/Authorization-DmoiysGx.js","assets/store-CraP4F4Y.js","assets/addresses-DVWfx5EX.js","assets/read-contract-D8CQ_i-D.js","assets/decimals-BkxTCZnw.js","assets/passkeys-tlSlZIRR.js","assets/webauthn.min-CGpVStYZ.js","assets/arweave-CAGvOb64.js","assets/index.es-BdGfQ9jz.js","assets/totalSupply-CWYDbbpl.js","assets/detectExtension-DRxhZaJ-.js","assets/index-DMZH80fA.js","assets/hooks.module-BNtNDAZY.js","assets/index-Ci26p999.js","assets/index-BuLBr4CJ.js","assets/index-B4kmUY0d.js","assets/send-eip712-transaction-q3anVEgs.js","assets/concat-hex-D_Hd0Y8j.js","assets/controller-CMiTdXrl.js","assets/qr-overlay-CDVJkAma.js","assets/getNFT-BLT_Nrf_.js","assets/fetchTokenMetadata-DXhdZ9jJ.js","assets/getNFT-uyJP8nm4.js","assets/getBalance-BjubRO2E.js","assets/getCurrencyMetadata-B6uMlDub.js","assets/QRCodeRenderer-C2O8aJw5.js","assets/CoinbaseSDKConnection-C9-JnGls.js","assets/InAppWalletConnectUI-Bdxz0Bmy.js","assets/index-B1VBbtk9.js","assets/send-batch-transaction-De71luzT.js","assets/secp256k1-BlHNYIaG.js","assets/session-proposal-ef7aaaHV.js","assets/session-request-Bz2BIU-j.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var r1=e=>{throw TypeError(e)};var zl=(e,n,t)=>n.has(e)||r1("Cannot "+t);var S=(e,n,t)=>(zl(e,n,"read from private field"),t?t.call(e):n.get(e)),se=(e,n,t)=>n.has(e)?r1("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,t),K=(e,n,t,i)=>(zl(e,n,"write to private field"),i?i.call(e,t):n.set(e,t),t),me=(e,n,t)=>(zl(e,n,"access private method"),t);var va=(e,n,t,i)=>({set _(r){K(e,n,r,t)},get _(){return S(e,n,i)}});import{r as y,aC as jg,k as a,_ as u,aD as Lg,s as it,S as Ln,T as En,m as Ot,w as ns,d as Ve,a as Au,b as ur,aE as Eg,aF as Fc,aG as Qc,aH as qn,h as Tg,n as Et,o as vg,aI as Zt,v as hc,f as dh,u as hh,aJ as Hc,aK as Ng,aL as Sg,aM as Ag,V as q5,U as ec,R as fh,af as K5,aN as vt,aO as J5,aP as X5,aQ as e3,aR as t3,aS as n3,aT as i3,aU as r3,aV as o3,aW as s3,aX as a3,aY as Kr,i as c3,aZ as l3,a_ as Dg,a$ as u3,b0 as Zi,b1 as Og,b2 as d3,b3 as h3,b4 as o1,g as f3,p as we,B as Ne,x as so,l as kg,b5 as m3,b6 as s1,b7 as g3}from"./index-B6-Xobl2.js";import{w as Pt,C as Zc,c as y3,g as p3,l as zg}from"./oauth-CbK0gPlt.js";import{c as Tr,s as a1,g as w3,b as _3}from"./send-transaction-B0F9brDJ.js";import{N as ar,s as mh,aG as x3,J as M3,O as I3,aH as b3,ad as C3,f as Pg,a as Rg,g as cn,r as fc,e as Vg,F as j3,b as ei,aQ as gr,d as L3,t as E3,D as cr,E as c1,z as T3}from"./to-serializable-transaction-DAYFWHyO.js";import{b as De,i as Ug,a as Ho,h as v3}from"./is-smart-wallet-kSShE3hl.js";import{k as N3,v as ha,w as Bg,a as S3,o as A3,p as D3}from"./index-DO01SzHY.js";import{w as Gc,b as O3}from"./wait-for-tx-receipt-CuLnfaKm.js";import{e as Wg,v as $g,s as Yg}from"./TypedData-ByTQ7nLR.js";import{i as k3,f as Du,v as z3,B as gh,w as P3,s as l1,j as Fg,g as xe,t as yh,n as R3,o as V3,b as yr,r as U3,a as Qg,k as u1,q as Hg,T as ln,m as mc,U as gc}from"./types-DFEAKZ3L.js";import{p as ph}from"./parse-typed-data-BSOEUDy_.js";import{g as B3,c as W3,d as $3}from"./Authorization-DmoiysGx.js";import{c as Y3}from"./store-CraP4F4Y.js";import{N as Gt,Z as F3,i as Q3}from"./addresses-DVWfx5EX.js";import{readContract as Zg}from"./read-contract-D8CQ_i-D.js";import{e as Gg,g as H3}from"./utils-BtpzmIxp.js";import{a as Z3}from"./decimals-BkxTCZnw.js";import{h as G3}from"./passkeys-tlSlZIRR.js";import{resolveArweaveScheme as q3}from"./arweave-CAGvOb64.js";import{q as K3,s as Ou,I as is,g as J3,d as In,t as qt,e as ee,h as Zo,C as X3,j as qg,k as e_,l as t_,m as Os,n as ku,r as fa,u as n_,v as i_,w as r_,x as o_,y as s_,z as a_,a as $i,A as rs,o as c_,B as l_,D as wh,E as _h,f as yc,P as d1,Q as u_,F as d_,b as h1,G as Or,c as Kg,H as ui,J as Qn,K as Si}from"./index.es-BdGfQ9jz.js";const h_=["top","right","bottom","left"],pr=Math.min,tn=Math.max,pc=Math.round,Na=Math.floor,ti=e=>({x:e,y:e}),f_={left:"right",right:"left",bottom:"top",top:"bottom"},m_={start:"end",end:"start"};function zu(e,n,t){return tn(e,pr(n,t))}function _i(e,n){return typeof e=="function"?e(n):e}function xi(e){return e.split("-")[0]}function os(e){return e.split("-")[1]}function xh(e){return e==="x"?"y":"x"}function Mh(e){return e==="y"?"height":"width"}const g_=new Set(["top","bottom"]);function Kn(e){return g_.has(xi(e))?"y":"x"}function Ih(e){return xh(Kn(e))}function y_(e,n,t){t===void 0&&(t=!1);const i=os(e),r=Ih(e),o=Mh(r);let s=r==="x"?i===(t?"end":"start")?"right":"left":i==="start"?"bottom":"top";return n.reference[o]>n.floating[o]&&(s=wc(s)),[s,wc(s)]}function p_(e){const n=wc(e);return[Pu(e),n,Pu(n)]}function Pu(e){return e.replace(/start|end/g,n=>m_[n])}const f1=["left","right"],m1=["right","left"],w_=["top","bottom"],__=["bottom","top"];function x_(e,n,t){switch(e){case"top":case"bottom":return t?n?m1:f1:n?f1:m1;case"left":case"right":return n?w_:__;default:return[]}}function M_(e,n,t,i){const r=os(e);let o=x_(xi(e),t==="start",i);return r&&(o=o.map(s=>s+"-"+r),n&&(o=o.concat(o.map(Pu)))),o}function wc(e){return e.replace(/left|right|bottom|top/g,n=>f_[n])}function I_(e){return{top:0,right:0,bottom:0,left:0,...e}}function Jg(e){return typeof e!="number"?I_(e):{top:e,right:e,bottom:e,left:e}}function _c(e){const{x:n,y:t,width:i,height:r}=e;return{width:i,height:r,top:t,left:n,right:n+i,bottom:t+r,x:n,y:t}}function g1(e,n,t){let{reference:i,floating:r}=e;const o=Kn(n),s=Ih(n),c=Mh(s),l=xi(n),h=o==="y",d=i.x+i.width/2-r.width/2,f=i.y+i.height/2-r.height/2,m=i[c]/2-r[c]/2;let g;switch(l){case"top":g={x:d,y:i.y-r.height};break;case"bottom":g={x:d,y:i.y+i.height};break;case"right":g={x:i.x+i.width,y:f};break;case"left":g={x:i.x-r.width,y:f};break;default:g={x:i.x,y:i.y}}switch(os(n)){case"start":g[s]-=m*(t&&h?-1:1);break;case"end":g[s]+=m*(t&&h?-1:1);break}return g}const b_=async(e,n,t)=>{const{placement:i="bottom",strategy:r="absolute",middleware:o=[],platform:s}=t,c=o.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(n));let h=await s.getElementRects({reference:e,floating:n,strategy:r}),{x:d,y:f}=g1(h,i,l),m=i,g={},w=0;for(let p=0;p<c.length;p++){const{name:_,fn:x}=c[p],{x:I,y:b,data:j,reset:C}=await x({x:d,y:f,initialPlacement:i,placement:m,strategy:r,middlewareData:g,rects:h,platform:s,elements:{reference:e,floating:n}});d=I??d,f=b??f,g={...g,[_]:{...g[_],...j}},C&&w<=50&&(w++,typeof C=="object"&&(C.placement&&(m=C.placement),C.rects&&(h=C.rects===!0?await s.getElementRects({reference:e,floating:n,strategy:r}):C.rects),{x:d,y:f}=g1(h,m,l)),p=-1)}return{x:d,y:f,placement:m,strategy:r,middlewareData:g}};async function Bs(e,n){var t;n===void 0&&(n={});const{x:i,y:r,platform:o,rects:s,elements:c,strategy:l}=e,{boundary:h="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:g=0}=_i(n,e),w=Jg(g),_=c[m?f==="floating"?"reference":"floating":f],x=_c(await o.getClippingRect({element:(t=await(o.isElement==null?void 0:o.isElement(_)))==null||t?_:_.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:h,rootBoundary:d,strategy:l})),I=f==="floating"?{x:i,y:r,width:s.floating.width,height:s.floating.height}:s.reference,b=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),j=await(o.isElement==null?void 0:o.isElement(b))?await(o.getScale==null?void 0:o.getScale(b))||{x:1,y:1}:{x:1,y:1},C=_c(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:I,offsetParent:b,strategy:l}):I);return{top:(x.top-C.top+w.top)/j.y,bottom:(C.bottom-x.bottom+w.bottom)/j.y,left:(x.left-C.left+w.left)/j.x,right:(C.right-x.right+w.right)/j.x}}const C_=e=>({name:"arrow",options:e,async fn(n){const{x:t,y:i,placement:r,rects:o,platform:s,elements:c,middlewareData:l}=n,{element:h,padding:d=0}=_i(e,n)||{};if(h==null)return{};const f=Jg(d),m={x:t,y:i},g=Ih(r),w=Mh(g),p=await s.getDimensions(h),_=g==="y",x=_?"top":"left",I=_?"bottom":"right",b=_?"clientHeight":"clientWidth",j=o.reference[w]+o.reference[g]-m[g]-o.floating[w],C=m[g]-o.reference[g],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(h));let T=E?E[b]:0;(!T||!await(s.isElement==null?void 0:s.isElement(E)))&&(T=c.floating[b]||o.floating[w]);const O=j/2-C/2,L=T/2-p[w]/2-1,N=pr(f[x],L),v=pr(f[I],L),D=N,z=T-p[w]-v,V=T/2-p[w]/2+O,R=zu(D,V,z),B=!l.arrow&&os(r)!=null&&V!==R&&o.reference[w]/2-(V<D?N:v)-p[w]/2<0,Y=B?V<D?V-D:V-z:0;return{[g]:m[g]+Y,data:{[g]:R,centerOffset:V-R-Y,...B&&{alignmentOffset:Y}},reset:B}}}),j_=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var t,i;const{placement:r,middlewareData:o,rects:s,initialPlacement:c,platform:l,elements:h}=n,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:p=!0,..._}=_i(e,n);if((t=o.arrow)!=null&&t.alignmentOffset)return{};const x=xi(r),I=Kn(c),b=xi(c)===c,j=await(l.isRTL==null?void 0:l.isRTL(h.floating)),C=m||(b||!p?[wc(c)]:p_(c)),E=w!=="none";!m&&E&&C.push(...M_(c,p,w,j));const T=[c,...C],O=await Bs(n,_),L=[];let N=((i=o.flip)==null?void 0:i.overflows)||[];if(d&&L.push(O[x]),f){const V=y_(r,s,j);L.push(O[V[0]],O[V[1]])}if(N=[...N,{placement:r,overflows:L}],!L.every(V=>V<=0)){var v,D;const V=(((v=o.flip)==null?void 0:v.index)||0)+1,R=T[V];if(R&&(!(f==="alignment"?I!==Kn(R):!1)||N.every($=>Kn($.placement)===I?$.overflows[0]>0:!0)))return{data:{index:V,overflows:N},reset:{placement:R}};let B=(D=N.filter(Y=>Y.overflows[0]<=0).sort((Y,$)=>Y.overflows[1]-$.overflows[1])[0])==null?void 0:D.placement;if(!B)switch(g){case"bestFit":{var z;const Y=(z=N.filter($=>{if(E){const W=Kn($.placement);return W===I||W==="y"}return!0}).map($=>[$.placement,$.overflows.filter(W=>W>0).reduce((W,F)=>W+F,0)]).sort(($,W)=>$[1]-W[1])[0])==null?void 0:z[0];Y&&(B=Y);break}case"initialPlacement":B=c;break}if(r!==B)return{reset:{placement:B}}}return{}}}};function y1(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function p1(e){return h_.some(n=>e[n]>=0)}const L_=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:t}=n,{strategy:i="referenceHidden",...r}=_i(e,n);switch(i){case"referenceHidden":{const o=await Bs(n,{...r,elementContext:"reference"}),s=y1(o,t.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:p1(s)}}}case"escaped":{const o=await Bs(n,{...r,altBoundary:!0}),s=y1(o,t.floating);return{data:{escapedOffsets:s,escaped:p1(s)}}}default:return{}}}}},Xg=new Set(["left","top"]);async function E_(e,n){const{placement:t,platform:i,elements:r}=e,o=await(i.isRTL==null?void 0:i.isRTL(r.floating)),s=xi(t),c=os(t),l=Kn(t)==="y",h=Xg.has(s)?-1:1,d=o&&l?-1:1,f=_i(n,e);let{mainAxis:m,crossAxis:g,alignmentAxis:w}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof w=="number"&&(g=c==="end"?w*-1:w),l?{x:g*d,y:m*h}:{x:m*h,y:g*d}}const T_=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var t,i;const{x:r,y:o,placement:s,middlewareData:c}=n,l=await E_(n,e);return s===((t=c.offset)==null?void 0:t.placement)&&(i=c.arrow)!=null&&i.alignmentOffset?{}:{x:r+l.x,y:o+l.y,data:{...l,placement:s}}}}},v_=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:t,y:i,placement:r}=n,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:_=>{let{x,y:I}=_;return{x,y:I}}},...l}=_i(e,n),h={x:t,y:i},d=await Bs(n,l),f=Kn(xi(r)),m=xh(f);let g=h[m],w=h[f];if(o){const _=m==="y"?"top":"left",x=m==="y"?"bottom":"right",I=g+d[_],b=g-d[x];g=zu(I,g,b)}if(s){const _=f==="y"?"top":"left",x=f==="y"?"bottom":"right",I=w+d[_],b=w-d[x];w=zu(I,w,b)}const p=c.fn({...n,[m]:g,[f]:w});return{...p,data:{x:p.x-t,y:p.y-i,enabled:{[m]:o,[f]:s}}}}}},N_=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:t,y:i,placement:r,rects:o,middlewareData:s}=n,{offset:c=0,mainAxis:l=!0,crossAxis:h=!0}=_i(e,n),d={x:t,y:i},f=Kn(r),m=xh(f);let g=d[m],w=d[f];const p=_i(c,n),_=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const b=m==="y"?"height":"width",j=o.reference[m]-o.floating[b]+_.mainAxis,C=o.reference[m]+o.reference[b]-_.mainAxis;g<j?g=j:g>C&&(g=C)}if(h){var x,I;const b=m==="y"?"width":"height",j=Xg.has(xi(r)),C=o.reference[f]-o.floating[b]+(j&&((x=s.offset)==null?void 0:x[f])||0)+(j?0:_.crossAxis),E=o.reference[f]+o.reference[b]+(j?0:((I=s.offset)==null?void 0:I[f])||0)-(j?_.crossAxis:0);w<C?w=C:w>E&&(w=E)}return{[m]:g,[f]:w}}}},S_=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var t,i;const{placement:r,rects:o,platform:s,elements:c}=n,{apply:l=()=>{},...h}=_i(e,n),d=await Bs(n,h),f=xi(r),m=os(r),g=Kn(r)==="y",{width:w,height:p}=o.floating;let _,x;f==="top"||f==="bottom"?(_=f,x=m===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(x=f,_=m==="end"?"top":"bottom");const I=p-d.top-d.bottom,b=w-d.left-d.right,j=pr(p-d[_],I),C=pr(w-d[x],b),E=!n.middlewareData.shift;let T=j,O=C;if((t=n.middlewareData.shift)!=null&&t.enabled.x&&(O=b),(i=n.middlewareData.shift)!=null&&i.enabled.y&&(T=I),E&&!m){const N=tn(d.left,0),v=tn(d.right,0),D=tn(d.top,0),z=tn(d.bottom,0);g?O=w-2*(N!==0||v!==0?N+v:tn(d.left,d.right)):T=p-2*(D!==0||z!==0?D+z:tn(d.top,d.bottom))}await l({...n,availableWidth:O,availableHeight:T});const L=await s.getDimensions(c.floating);return w!==L.width||p!==L.height?{reset:{rects:!0}}:{}}}};function qc(){return typeof window<"u"}function ss(e){return e4(e)?(e.nodeName||"").toLowerCase():"#document"}function sn(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function si(e){var n;return(n=(e4(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function e4(e){return qc()?e instanceof Node||e instanceof sn(e).Node:!1}function zn(e){return qc()?e instanceof Element||e instanceof sn(e).Element:!1}function ri(e){return qc()?e instanceof HTMLElement||e instanceof sn(e).HTMLElement:!1}function w1(e){return!qc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof sn(e).ShadowRoot}const A_=new Set(["inline","contents"]);function ma(e){const{overflow:n,overflowX:t,overflowY:i,display:r}=Pn(e);return/auto|scroll|overlay|hidden|clip/.test(n+i+t)&&!A_.has(r)}const D_=new Set(["table","td","th"]);function O_(e){return D_.has(ss(e))}const k_=[":popover-open",":modal"];function Kc(e){return k_.some(n=>{try{return e.matches(n)}catch{return!1}})}const z_=["transform","translate","scale","rotate","perspective"],P_=["transform","translate","scale","rotate","perspective","filter"],R_=["paint","layout","strict","content"];function bh(e){const n=Ch(),t=zn(e)?Pn(e):e;return z_.some(i=>t[i]?t[i]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!n&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!n&&(t.filter?t.filter!=="none":!1)||P_.some(i=>(t.willChange||"").includes(i))||R_.some(i=>(t.contain||"").includes(i))}function V_(e){let n=wr(e);for(;ri(n)&&!Go(n);){if(bh(n))return n;if(Kc(n))return null;n=wr(n)}return null}function Ch(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const U_=new Set(["html","body","#document"]);function Go(e){return U_.has(ss(e))}function Pn(e){return sn(e).getComputedStyle(e)}function Jc(e){return zn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function wr(e){if(ss(e)==="html")return e;const n=e.assignedSlot||e.parentNode||w1(e)&&e.host||si(e);return w1(n)?n.host:n}function t4(e){const n=wr(e);return Go(n)?e.ownerDocument?e.ownerDocument.body:e.body:ri(n)&&ma(n)?n:t4(n)}function Ws(e,n,t){var i;n===void 0&&(n=[]),t===void 0&&(t=!0);const r=t4(e),o=r===((i=e.ownerDocument)==null?void 0:i.body),s=sn(r);if(o){const c=Ru(s);return n.concat(s,s.visualViewport||[],ma(r)?r:[],c&&t?Ws(c):[])}return n.concat(r,Ws(r,[],t))}function Ru(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function n4(e){const n=Pn(e);let t=parseFloat(n.width)||0,i=parseFloat(n.height)||0;const r=ri(e),o=r?e.offsetWidth:t,s=r?e.offsetHeight:i,c=pc(t)!==o||pc(i)!==s;return c&&(t=o,i=s),{width:t,height:i,$:c}}function jh(e){return zn(e)?e:e.contextElement}function vo(e){const n=jh(e);if(!ri(n))return ti(1);const t=n.getBoundingClientRect(),{width:i,height:r,$:o}=n4(n);let s=(o?pc(t.width):t.width)/i,c=(o?pc(t.height):t.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const B_=ti(0);function i4(e){const n=sn(e);return!Ch()||!n.visualViewport?B_:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function W_(e,n,t){return n===void 0&&(n=!1),!t||n&&t!==sn(e)?!1:n}function Jr(e,n,t,i){n===void 0&&(n=!1),t===void 0&&(t=!1);const r=e.getBoundingClientRect(),o=jh(e);let s=ti(1);n&&(i?zn(i)&&(s=vo(i)):s=vo(e));const c=W_(o,t,i)?i4(o):ti(0);let l=(r.left+c.x)/s.x,h=(r.top+c.y)/s.y,d=r.width/s.x,f=r.height/s.y;if(o){const m=sn(o),g=i&&zn(i)?sn(i):i;let w=m,p=Ru(w);for(;p&&i&&g!==w;){const _=vo(p),x=p.getBoundingClientRect(),I=Pn(p),b=x.left+(p.clientLeft+parseFloat(I.paddingLeft))*_.x,j=x.top+(p.clientTop+parseFloat(I.paddingTop))*_.y;l*=_.x,h*=_.y,d*=_.x,f*=_.y,l+=b,h+=j,w=sn(p),p=Ru(w)}}return _c({width:d,height:f,x:l,y:h})}function Xc(e,n){const t=Jc(e).scrollLeft;return n?n.left+t:Jr(si(e)).left+t}function r4(e,n){const t=e.getBoundingClientRect(),i=t.left+n.scrollLeft-Xc(e,t),r=t.top+n.scrollTop;return{x:i,y:r}}function $_(e){let{elements:n,rect:t,offsetParent:i,strategy:r}=e;const o=r==="fixed",s=si(i),c=n?Kc(n.floating):!1;if(i===s||c&&o)return t;let l={scrollLeft:0,scrollTop:0},h=ti(1);const d=ti(0),f=ri(i);if((f||!f&&!o)&&((ss(i)!=="body"||ma(s))&&(l=Jc(i)),ri(i))){const g=Jr(i);h=vo(i),d.x=g.x+i.clientLeft,d.y=g.y+i.clientTop}const m=s&&!f&&!o?r4(s,l):ti(0);return{width:t.width*h.x,height:t.height*h.y,x:t.x*h.x-l.scrollLeft*h.x+d.x+m.x,y:t.y*h.y-l.scrollTop*h.y+d.y+m.y}}function Y_(e){return Array.from(e.getClientRects())}function F_(e){const n=si(e),t=Jc(e),i=e.ownerDocument.body,r=tn(n.scrollWidth,n.clientWidth,i.scrollWidth,i.clientWidth),o=tn(n.scrollHeight,n.clientHeight,i.scrollHeight,i.clientHeight);let s=-t.scrollLeft+Xc(e);const c=-t.scrollTop;return Pn(i).direction==="rtl"&&(s+=tn(n.clientWidth,i.clientWidth)-r),{width:r,height:o,x:s,y:c}}const _1=25;function Q_(e,n){const t=sn(e),i=si(e),r=t.visualViewport;let o=i.clientWidth,s=i.clientHeight,c=0,l=0;if(r){o=r.width,s=r.height;const d=Ch();(!d||d&&n==="fixed")&&(c=r.offsetLeft,l=r.offsetTop)}const h=Xc(i);if(h<=0){const d=i.ownerDocument,f=d.body,m=getComputedStyle(f),g=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,w=Math.abs(i.clientWidth-f.clientWidth-g);w<=_1&&(o-=w)}else h<=_1&&(o+=h);return{width:o,height:s,x:c,y:l}}const H_=new Set(["absolute","fixed"]);function Z_(e,n){const t=Jr(e,!0,n==="fixed"),i=t.top+e.clientTop,r=t.left+e.clientLeft,o=ri(e)?vo(e):ti(1),s=e.clientWidth*o.x,c=e.clientHeight*o.y,l=r*o.x,h=i*o.y;return{width:s,height:c,x:l,y:h}}function x1(e,n,t){let i;if(n==="viewport")i=Q_(e,t);else if(n==="document")i=F_(si(e));else if(zn(n))i=Z_(n,t);else{const r=i4(e);i={x:n.x-r.x,y:n.y-r.y,width:n.width,height:n.height}}return _c(i)}function o4(e,n){const t=wr(e);return t===n||!zn(t)||Go(t)?!1:Pn(t).position==="fixed"||o4(t,n)}function G_(e,n){const t=n.get(e);if(t)return t;let i=Ws(e,[],!1).filter(c=>zn(c)&&ss(c)!=="body"),r=null;const o=Pn(e).position==="fixed";let s=o?wr(e):e;for(;zn(s)&&!Go(s);){const c=Pn(s),l=bh(s);!l&&c.position==="fixed"&&(r=null),(o?!l&&!r:!l&&c.position==="static"&&!!r&&H_.has(r.position)||ma(s)&&!l&&o4(e,s))?i=i.filter(d=>d!==s):r=c,s=wr(s)}return n.set(e,i),i}function q_(e){let{element:n,boundary:t,rootBoundary:i,strategy:r}=e;const s=[...t==="clippingAncestors"?Kc(n)?[]:G_(n,this._c):[].concat(t),i],c=s[0],l=s.reduce((h,d)=>{const f=x1(n,d,r);return h.top=tn(f.top,h.top),h.right=pr(f.right,h.right),h.bottom=pr(f.bottom,h.bottom),h.left=tn(f.left,h.left),h},x1(n,c,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function K_(e){const{width:n,height:t}=n4(e);return{width:n,height:t}}function J_(e,n,t){const i=ri(n),r=si(n),o=t==="fixed",s=Jr(e,!0,o,n);let c={scrollLeft:0,scrollTop:0};const l=ti(0);function h(){l.x=Xc(r)}if(i||!i&&!o)if((ss(n)!=="body"||ma(r))&&(c=Jc(n)),i){const g=Jr(n,!0,o,n);l.x=g.x+n.clientLeft,l.y=g.y+n.clientTop}else r&&h();o&&!i&&r&&h();const d=r&&!i&&!o?r4(r,c):ti(0),f=s.left+c.scrollLeft-l.x-d.x,m=s.top+c.scrollTop-l.y-d.y;return{x:f,y:m,width:s.width,height:s.height}}function Pl(e){return Pn(e).position==="static"}function M1(e,n){if(!ri(e)||Pn(e).position==="fixed")return null;if(n)return n(e);let t=e.offsetParent;return si(e)===t&&(t=t.ownerDocument.body),t}function s4(e,n){const t=sn(e);if(Kc(e))return t;if(!ri(e)){let r=wr(e);for(;r&&!Go(r);){if(zn(r)&&!Pl(r))return r;r=wr(r)}return t}let i=M1(e,n);for(;i&&O_(i)&&Pl(i);)i=M1(i,n);return i&&Go(i)&&Pl(i)&&!bh(i)?t:i||V_(e)||t}const X_=async function(e){const n=this.getOffsetParent||s4,t=this.getDimensions,i=await t(e.floating);return{reference:J_(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function ex(e){return Pn(e).direction==="rtl"}const tx={convertOffsetParentRelativeRectToViewportRelativeRect:$_,getDocumentElement:si,getClippingRect:q_,getOffsetParent:s4,getElementRects:X_,getClientRects:Y_,getDimensions:K_,getScale:vo,isElement:zn,isRTL:ex};function a4(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function nx(e,n){let t=null,i;const r=si(e);function o(){var c;clearTimeout(i),(c=t)==null||c.disconnect(),t=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),o();const h=e.getBoundingClientRect(),{left:d,top:f,width:m,height:g}=h;if(c||n(),!m||!g)return;const w=Na(f),p=Na(r.clientWidth-(d+m)),_=Na(r.clientHeight-(f+g)),x=Na(d),b={rootMargin:-w+"px "+-p+"px "+-_+"px "+-x+"px",threshold:tn(0,pr(1,l))||1};let j=!0;function C(E){const T=E[0].intersectionRatio;if(T!==l){if(!j)return s();T?s(!1,T):i=setTimeout(()=>{s(!1,1e-7)},1e3)}T===1&&!a4(h,e.getBoundingClientRect())&&s(),j=!1}try{t=new IntersectionObserver(C,{...b,root:r.ownerDocument})}catch{t=new IntersectionObserver(C,b)}t.observe(e)}return s(!0),o}function ix(e,n,t,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,h=jh(e),d=r||o?[...h?Ws(h):[],...Ws(n)]:[];d.forEach(x=>{r&&x.addEventListener("scroll",t,{passive:!0}),o&&x.addEventListener("resize",t)});const f=h&&c?nx(h,t):null;let m=-1,g=null;s&&(g=new ResizeObserver(x=>{let[I]=x;I&&I.target===h&&g&&(g.unobserve(n),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=g)==null||b.observe(n)})),t()}),h&&!l&&g.observe(h),g.observe(n));let w,p=l?Jr(e):null;l&&_();function _(){const x=Jr(e);p&&!a4(p,x)&&t(),p=x,w=requestAnimationFrame(_)}return t(),()=>{var x;d.forEach(I=>{r&&I.removeEventListener("scroll",t),o&&I.removeEventListener("resize",t)}),f==null||f(),(x=g)==null||x.disconnect(),g=null,l&&cancelAnimationFrame(w)}}const rx=T_,ox=v_,sx=j_,ax=S_,cx=L_,I1=C_,lx=N_,ux=(e,n,t)=>{const i=new Map,r={platform:tx,...t},o={...r.platform,_c:i};return b_(e,n,{...r,platform:o})};var dx=typeof document<"u",hx=function(){},tc=dx?y.useLayoutEffect:hx;function xc(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let t,i,r;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(t=e.length,t!==n.length)return!1;for(i=t;i--!==0;)if(!xc(e[i],n[i]))return!1;return!0}if(r=Object.keys(e),t=r.length,t!==Object.keys(n).length)return!1;for(i=t;i--!==0;)if(!{}.hasOwnProperty.call(n,r[i]))return!1;for(i=t;i--!==0;){const o=r[i];if(!(o==="_owner"&&e.$$typeof)&&!xc(e[o],n[o]))return!1}return!0}return e!==e&&n!==n}function c4(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function b1(e,n){const t=c4(e);return Math.round(n*t)/t}function Rl(e){const n=y.useRef(e);return tc(()=>{n.current=e}),n}function fx(e){e===void 0&&(e={});const{placement:n="bottom",strategy:t="absolute",middleware:i=[],platform:r,elements:{reference:o,floating:s}={},transform:c=!0,whileElementsMounted:l,open:h}=e,[d,f]=y.useState({x:0,y:0,strategy:t,placement:n,middlewareData:{},isPositioned:!1}),[m,g]=y.useState(i);xc(m,i)||g(i);const[w,p]=y.useState(null),[_,x]=y.useState(null),I=y.useCallback($=>{$!==E.current&&(E.current=$,p($))},[]),b=y.useCallback($=>{$!==T.current&&(T.current=$,x($))},[]),j=o||w,C=s||_,E=y.useRef(null),T=y.useRef(null),O=y.useRef(d),L=l!=null,N=Rl(l),v=Rl(r),D=Rl(h),z=y.useCallback(()=>{if(!E.current||!T.current)return;const $={placement:n,strategy:t,middleware:m};v.current&&($.platform=v.current),ux(E.current,T.current,$).then(W=>{const F={...W,isPositioned:D.current!==!1};V.current&&!xc(O.current,F)&&(O.current=F,jg.flushSync(()=>{f(F)}))})},[m,n,t,v,D]);tc(()=>{h===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,f($=>({...$,isPositioned:!1})))},[h]);const V=y.useRef(!1);tc(()=>(V.current=!0,()=>{V.current=!1}),[]),tc(()=>{if(j&&(E.current=j),C&&(T.current=C),j&&C){if(N.current)return N.current(j,C,z);z()}},[j,C,z,N,L]);const R=y.useMemo(()=>({reference:E,floating:T,setReference:I,setFloating:b}),[I,b]),B=y.useMemo(()=>({reference:j,floating:C}),[j,C]),Y=y.useMemo(()=>{const $={position:t,left:0,top:0};if(!B.floating)return $;const W=b1(B.floating,d.x),F=b1(B.floating,d.y);return c?{...$,transform:"translate("+W+"px, "+F+"px)",...c4(B.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:W,top:F}},[t,c,B.floating,d.x,d.y]);return y.useMemo(()=>({...d,update:z,refs:R,elements:B,floatingStyles:Y}),[d,z,R,B,Y])}const mx=e=>{function n(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:e,fn(t){const{element:i,padding:r}=typeof e=="function"?e(t):e;return i&&n(i)?i.current!=null?I1({element:i.current,padding:r}).fn(t):{}:i?I1({element:i,padding:r}).fn(t):{}}}},gx=(e,n)=>({...rx(e),options:[e,n]}),yx=(e,n)=>({...ox(e),options:[e,n]}),px=(e,n)=>({...lx(e),options:[e,n]}),wx=(e,n)=>({...sx(e),options:[e,n]}),_x=(e,n)=>({...ax(e),options:[e,n]}),xx=(e,n)=>({...cx(e),options:[e,n]}),Mx=(e,n)=>({...mx(e),options:[e,n]});function Ix(e){if(e.length!==66||e.indexOf("[")!==0||e.indexOf("]")!==65)return null;const n=`0x${e.slice(1,65)}`;return k3(n)?n:null}function bx(e){const n=new Uint8Array(32).fill(0);return e?Ix(e)||ar(z3(e)):Du(n)}function Cx(e,{errorInstance:n=new Error("timed out"),timeout:t,signal:i}){return new Promise((r,o)=>{(async()=>{let s;try{const c=new AbortController;t>0&&(s=setTimeout(()=>{i?c.abort():o(n)},t)),r(await e({signal:(c==null?void 0:c.signal)||null}))}catch(c){(c==null?void 0:c.name)==="AbortError"&&o(n),o(c)}finally{clearTimeout(s)}})()})}class jx extends gh{constructor({domain:n}){super(`Invalid domain "${mh(n)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class Lx extends gh{constructor({primaryType:n,types:t}){super(`Invalid primary type \`${n}\` must be one of \`${JSON.stringify(Object.keys(t))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class Ex extends gh{constructor({type:n}){super(`Struct type "${n}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}function Tx(e){const{domain:n,message:t,primaryType:i,types:r}=e,o=(l,h)=>{const d={...h};for(const f of l){const{name:m,type:g}=f;g==="address"&&(d[m]=d[m].toLowerCase())}return d},s=r.EIP712Domain?n?o(r.EIP712Domain,n):{}:{},c=(()=>{if(i!=="EIP712Domain")return o(r[i],t)})();return mh({domain:s,message:c,primaryType:i,types:r})}function l4(e){const{domain:n,message:t,primaryType:i,types:r}=e,o=(s,c)=>{for(const l of s){const{name:h,type:d}=l,f=c[h],m=d.match(x3);if(m&&(typeof f=="number"||typeof f=="bigint")){const[p,_,x]=m;P3(f,{signed:_==="int",size:Number.parseInt(x,10)/8})}if(d==="address"&&typeof f=="string"&&!M3(f))throw new I3({address:f});const g=d.match(b3);if(g){const[p,_]=g;if(_&&l1(f)!==Number.parseInt(_,10))throw new C3({expectedSize:Number.parseInt(_,10),givenSize:l1(f)})}const w=r[d];w&&(vx(d),o(w,f))}};if(r.EIP712Domain&&n){if(typeof n!="object")throw new jx({domain:n});o(r.EIP712Domain,n)}if(i!=="EIP712Domain")if(r[i])o(r[i],t);else throw new Lx({primaryType:i,types:r})}function Lh({domain:e}){return[typeof(e==null?void 0:e.name)=="string"&&{name:"name",type:"string"},(e==null?void 0:e.version)&&{name:"version",type:"string"},(typeof(e==null?void 0:e.chainId)=="number"||typeof(e==null?void 0:e.chainId)=="bigint")&&{name:"chainId",type:"uint256"},(e==null?void 0:e.verifyingContract)&&{name:"verifyingContract",type:"address"},(e==null?void 0:e.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}function nV({domain:e}){return u4({domain:e,types:{EIP712Domain:Lh({domain:e})}})}function vx(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new Ex({type:e})}function iV(e){const{domain:n={},message:t,primaryType:i}=e,r={EIP712Domain:Lh({domain:n}),...e.types};l4({domain:n,message:t,primaryType:i,types:r});const o=["0x1901"];return n&&o.push(u4({domain:n,types:r})),i!=="EIP712Domain"&&o.push(d4({data:t,primaryType:i,types:r})),ar(Pg(o))}function u4({domain:e,types:n}){return d4({data:e,primaryType:"EIP712Domain",types:n})}function d4({data:e,primaryType:n,types:t}){const i=h4({data:e,primaryType:n,types:t});return ar(i)}function h4({data:e,primaryType:n,types:t}){const i=[{type:"bytes32"}],r=[Nx({primaryType:n,types:t})];for(const o of t[n]){const[s,c]=m4({types:t,name:o.name,type:o.type,value:e[o.name]});i.push(s),r.push(c)}return Rg(i,r)}function Nx({primaryType:e,types:n}){const t=Fg(Sx({primaryType:e,types:n}));return ar(t)}function Sx({primaryType:e,types:n}){let t="";const i=f4({primaryType:e,types:n});i.delete(e);const r=[e,...Array.from(i).sort()];for(const o of r)t+=`${o}(${n[o].map(({name:s,type:c})=>`${c} ${s}`).join(",")})`;return t}function f4({primaryType:e,types:n},t=new Set){const i=e.match(/^\w*/u),r=i==null?void 0:i[0];if(t.has(r)||n[r]===void 0)return t;t.add(r);for(const o of n[r])f4({primaryType:o.type,types:n},t);return t}function m4({types:e,name:n,type:t,value:i}){if(e[t]!==void 0)return[{type:"bytes32"},ar(h4({data:i,primaryType:t,types:e}))];if(t==="bytes")return i=`0x${(i.length%2?"0":"")+i.slice(2)}`,[{type:"bytes32"},ar(i)];if(t==="string")return[{type:"bytes32"},ar(Fg(i))];if(t.lastIndexOf("]")===t.length-1){const r=t.slice(0,t.lastIndexOf("[")),o=i.map(s=>m4({name:n,type:r,types:e,value:s}));return[{type:"bytes32"},ar(Rg(o.map(([s])=>s),o.map(([,s])=>s)))]}return[{type:t},i]}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Eh=BigInt(0),Vu=BigInt(1);function Th(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function vh(e){if(!Th(e))throw new Error("Uint8Array expected")}function rV(e,n){if(typeof n!="boolean")throw new Error(e+" boolean expected, got "+n)}function oV(e){const n=e.toString(16);return n.length&1?"0"+n:n}function Nh(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?Eh:BigInt("0x"+e)}const g4=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",Ax=Array.from({length:256},(e,n)=>n.toString(16).padStart(2,"0"));function y4(e){if(vh(e),g4)return e.toHex();let n="";for(let t=0;t<e.length;t++)n+=Ax[e[t]];return n}const ai={_0:48,_9:57,A:65,F:70,a:97,f:102};function C1(e){if(e>=ai._0&&e<=ai._9)return e-ai._0;if(e>=ai.A&&e<=ai.F)return e-(ai.A-10);if(e>=ai.a&&e<=ai.f)return e-(ai.a-10)}function p4(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(g4)return Uint8Array.fromHex(e);const n=e.length,t=n/2;if(n%2)throw new Error("hex string expected, got unpadded hex of length "+n);const i=new Uint8Array(t);for(let r=0,o=0;r<t;r++,o+=2){const s=C1(e.charCodeAt(o)),c=C1(e.charCodeAt(o+1));if(s===void 0||c===void 0){const l=e[o]+e[o+1];throw new Error('hex string expected, got non-hex character "'+l+'" at index '+o)}i[r]=s*16+c}return i}function sV(e){return Nh(y4(e))}function aV(e){return vh(e),Nh(y4(Uint8Array.from(e).reverse()))}function Dx(e,n){return p4(e.toString(16).padStart(n*2,"0"))}function cV(e,n){return Dx(e,n).reverse()}function lV(e,n,t){let i;if(typeof n=="string")try{i=p4(n)}catch(o){throw new Error(e+" must be hex string or Uint8Array, cause: "+o)}else if(Th(n))i=Uint8Array.from(n);else throw new Error(e+" must be hex string or Uint8Array");const r=i.length;if(typeof t=="number"&&r!==t)throw new Error(e+" of length "+t+" expected, got "+r);return i}function Ox(...e){let n=0;for(let i=0;i<e.length;i++){const r=e[i];vh(r),n+=r.length}const t=new Uint8Array(n);for(let i=0,r=0;i<e.length;i++){const o=e[i];t.set(o,r),r+=o.length}return t}const Vl=e=>typeof e=="bigint"&&Eh<=e;function kx(e,n,t){return Vl(e)&&Vl(n)&&Vl(t)&&n<=e&&e<t}function uV(e,n,t,i){if(!kx(n,t,i))throw new Error("expected valid "+e+": "+t+" <= n < "+i+", got "+n)}function dV(e){let n;for(n=0;e>Eh;e>>=Vu,n+=1);return n}const hV=e=>(Vu<<BigInt(e))-Vu,Ul=e=>new Uint8Array(e),j1=e=>Uint8Array.from(e);function fV(e,n,t){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof n!="number"||n<2)throw new Error("qByteLen must be a number");if(typeof t!="function")throw new Error("hmacFn must be a function");let i=Ul(e),r=Ul(e),o=0;const s=()=>{i.fill(1),r.fill(0),o=0},c=(...f)=>t(r,i,...f),l=(f=Ul(0))=>{r=c(j1([0]),f),i=c(),f.length!==0&&(r=c(j1([1]),f),i=c())},h=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let f=0;const m=[];for(;f<n;){i=c();const g=i.slice();m.push(g),f+=i.length}return Ox(...m)};return(f,m)=>{s(),l(f);let g;for(;!(g=m(h()));)l();return s(),g}}const zx={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"||Th(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,n)=>n.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function mV(e,n,t={}){const i=(r,o,s)=>{const c=zx[o];if(typeof c!="function")throw new Error("invalid validator function");const l=e[r];if(!(s&&l===void 0)&&!c(l,e))throw new Error("param "+String(r)+" is invalid. Expected "+o+", got "+l)};for(const[r,o]of Object.entries(n))i(r,o,!1);for(const[r,o]of Object.entries(t))i(r,o,!0);return e}function gV(e){const n=new WeakMap;return(t,...i)=>{const r=n.get(t);if(r!==void 0)return r;const o=e(t,...i);return n.set(t,o),o}}var ao=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Xr=typeof window>"u"||"Deno"in globalThis;function Lt(){}function Px(e,n){return typeof e=="function"?e(n):e}function Uu(e){return typeof e=="number"&&e>=0&&e!==1/0}function w4(e,n){return Math.max(e+(n||0)-Date.now(),0)}function dr(e,n){return typeof e=="function"?e(n):e}function On(e,n){return typeof e=="function"?e(n):e}function L1(e,n){const{type:t="all",exact:i,fetchStatus:r,predicate:o,queryKey:s,stale:c}=e;if(s){if(i){if(n.queryHash!==Sh(s,n.options))return!1}else if(!$s(n.queryKey,s))return!1}if(t!=="all"){const l=n.isActive();if(t==="active"&&!l||t==="inactive"&&l)return!1}return!(typeof c=="boolean"&&n.isStale()!==c||r&&r!==n.state.fetchStatus||o&&!o(n))}function E1(e,n){const{exact:t,status:i,predicate:r,mutationKey:o}=e;if(o){if(!n.options.mutationKey)return!1;if(t){if(eo(n.options.mutationKey)!==eo(o))return!1}else if(!$s(n.options.mutationKey,o))return!1}return!(i&&n.state.status!==i||r&&!r(n))}function Sh(e,n){return((n==null?void 0:n.queryKeyHashFn)||eo)(e)}function eo(e){return JSON.stringify(e,(n,t)=>Bu(t)?Object.keys(t).sort().reduce((i,r)=>(i[r]=t[r],i),{}):t)}function $s(e,n){return e===n?!0:typeof e!=typeof n?!1:e&&n&&typeof e=="object"&&typeof n=="object"?Object.keys(n).every(t=>$s(e[t],n[t])):!1}function el(e,n){if(e===n)return e;const t=T1(e)&&T1(n);if(t||Bu(e)&&Bu(n)){const i=t?e:Object.keys(e),r=i.length,o=t?n:Object.keys(n),s=o.length,c=t?[]:{},l=new Set(i);let h=0;for(let d=0;d<s;d++){const f=t?d:o[d];(!t&&l.has(f)||t)&&e[f]===void 0&&n[f]===void 0?(c[f]=void 0,h++):(c[f]=el(e[f],n[f]),c[f]===e[f]&&e[f]!==void 0&&h++)}return r===s&&h===r?e:c}return n}function Mc(e,n){if(!n||Object.keys(e).length!==Object.keys(n).length)return!1;for(const t in e)if(e[t]!==n[t])return!1;return!0}function T1(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Bu(e){if(!v1(e))return!1;const n=e.constructor;if(n===void 0)return!0;const t=n.prototype;return!(!v1(t)||!t.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function v1(e){return Object.prototype.toString.call(e)==="[object Object]"}function Rx(e){return new Promise(n=>{setTimeout(n,e)})}function Wu(e,n,t){return typeof t.structuralSharing=="function"?t.structuralSharing(e,n):t.structuralSharing!==!1?el(e,n):n}function Vx(e,n,t=0){const i=[...e,n];return t&&i.length>t?i.slice(1):i}function Ux(e,n,t=0){const i=[n,...e];return t&&i.length>t?i.slice(0,-1):i}var Ah=Symbol();function _4(e,n){return!e.queryFn&&(n!=null&&n.initialPromise)?()=>n.initialPromise:!e.queryFn||e.queryFn===Ah?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function x4(e,n){return typeof e=="function"?e(...n):!!e}var Ur,qi,Ao,mg,Bx=(mg=class extends ao{constructor(){super();se(this,Ur);se(this,qi);se(this,Ao);K(this,Ao,n=>{if(!Xr&&window.addEventListener){const t=()=>n();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){S(this,qi)||this.setEventListener(S(this,Ao))}onUnsubscribe(){var n;this.hasListeners()||((n=S(this,qi))==null||n.call(this),K(this,qi,void 0))}setEventListener(n){var t;K(this,Ao,n),(t=S(this,qi))==null||t.call(this),K(this,qi,n(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(n){S(this,Ur)!==n&&(K(this,Ur,n),this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(t=>{t(n)})}isFocused(){var n;return typeof S(this,Ur)=="boolean"?S(this,Ur):((n=globalThis.document)==null?void 0:n.visibilityState)!=="hidden"}},Ur=new WeakMap,qi=new WeakMap,Ao=new WeakMap,mg),Dh=new Bx,Do,Ki,Oo,gg,Wx=(gg=class extends ao{constructor(){super();se(this,Do,!0);se(this,Ki);se(this,Oo);K(this,Oo,n=>{if(!Xr&&window.addEventListener){const t=()=>n(!0),i=()=>n(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",i)}}})}onSubscribe(){S(this,Ki)||this.setEventListener(S(this,Oo))}onUnsubscribe(){var n;this.hasListeners()||((n=S(this,Ki))==null||n.call(this),K(this,Ki,void 0))}setEventListener(n){var t;K(this,Oo,n),(t=S(this,Ki))==null||t.call(this),K(this,Ki,n(this.setOnline.bind(this)))}setOnline(n){S(this,Do)!==n&&(K(this,Do,n),this.listeners.forEach(i=>{i(n)}))}isOnline(){return S(this,Do)}},Do=new WeakMap,Ki=new WeakMap,Oo=new WeakMap,gg),Ic=new Wx;function $u(){let e,n;const t=new Promise((r,o)=>{e=r,n=o});t.status="pending",t.catch(()=>{});function i(r){Object.assign(t,r),delete t.resolve,delete t.reject}return t.resolve=r=>{i({status:"fulfilled",value:r}),e(r)},t.reject=r=>{i({status:"rejected",reason:r}),n(r)},t}function $x(e){return Math.min(1e3*2**e,3e4)}function M4(e){return(e??"online")==="online"?Ic.isOnline():!0}var I4=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Bl(e){return e instanceof I4}function b4(e){let n=!1,t=0,i=!1,r;const o=$u(),s=p=>{var _;i||(m(new I4(p)),(_=e.abort)==null||_.call(e))},c=()=>{n=!0},l=()=>{n=!1},h=()=>Dh.isFocused()&&(e.networkMode==="always"||Ic.isOnline())&&e.canRun(),d=()=>M4(e.networkMode)&&e.canRun(),f=p=>{var _;i||(i=!0,(_=e.onSuccess)==null||_.call(e,p),r==null||r(),o.resolve(p))},m=p=>{var _;i||(i=!0,(_=e.onError)==null||_.call(e,p),r==null||r(),o.reject(p))},g=()=>new Promise(p=>{var _;r=x=>{(i||h())&&p(x)},(_=e.onPause)==null||_.call(e)}).then(()=>{var p;r=void 0,i||(p=e.onContinue)==null||p.call(e)}),w=()=>{if(i)return;let p;const _=t===0?e.initialPromise:void 0;try{p=_??e.fn()}catch(x){p=Promise.reject(x)}Promise.resolve(p).then(f).catch(x=>{var E;if(i)return;const I=e.retry??(Xr?0:3),b=e.retryDelay??$x,j=typeof b=="function"?b(t,x):b,C=I===!0||typeof I=="number"&&t<I||typeof I=="function"&&I(t,x);if(n||!C){m(x);return}t++,(E=e.onFail)==null||E.call(e,t,x),Rx(j).then(()=>h()?void 0:g()).then(()=>{n?m(x):w()})})};return{promise:o,cancel:s,continue:()=>(r==null||r(),o),cancelRetry:c,continueRetry:l,canStart:d,start:()=>(d()?w():g().then(w),o)}}var Yx=e=>setTimeout(e,0);function Fx(){let e=[],n=0,t=c=>{c()},i=c=>{c()},r=Yx;const o=c=>{n?e.push(c):r(()=>{t(c)})},s=()=>{const c=e;e=[],c.length&&r(()=>{i(()=>{c.forEach(l=>{t(l)})})})};return{batch:c=>{let l;n++;try{l=c()}finally{n--,n||s()}return l},batchCalls:c=>(...l)=>{o(()=>{c(...l)})},schedule:o,setNotifyFunction:c=>{t=c},setBatchNotifyFunction:c=>{i=c},setScheduler:c=>{r=c}}}var Qe=Fx(),Br,yg,C4=(yg=class{constructor(){se(this,Br)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Uu(this.gcTime)&&K(this,Br,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Xr?1/0:5*60*1e3))}clearGcTimeout(){S(this,Br)&&(clearTimeout(S(this,Br)),K(this,Br,void 0))}},Br=new WeakMap,yg),ko,Wr,pn,$r,jt,oa,Yr,An,di,pg,Qx=(pg=class extends C4{constructor(n){super();se(this,An);se(this,ko);se(this,Wr);se(this,pn);se(this,$r);se(this,jt);se(this,oa);se(this,Yr);K(this,Yr,!1),K(this,oa,n.defaultOptions),this.setOptions(n.options),this.observers=[],K(this,$r,n.client),K(this,pn,S(this,$r).getQueryCache()),this.queryKey=n.queryKey,this.queryHash=n.queryHash,K(this,ko,Hx(this.options)),this.state=n.state??S(this,ko),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var n;return(n=S(this,jt))==null?void 0:n.promise}setOptions(n){this.options={...S(this,oa),...n},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&S(this,pn).remove(this)}setData(n,t){const i=Wu(this.state.data,n,this.options);return me(this,An,di).call(this,{data:i,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),i}setState(n,t){me(this,An,di).call(this,{type:"setState",state:n,setStateOptions:t})}cancel(n){var i,r;const t=(i=S(this,jt))==null?void 0:i.promise;return(r=S(this,jt))==null||r.cancel(n),t?t.then(Lt).catch(Lt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(S(this,ko))}isActive(){return this.observers.some(n=>On(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ah||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>dr(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!w4(this.state.dataUpdatedAt,n)}onFocus(){var t;const n=this.observers.find(i=>i.shouldFetchOnWindowFocus());n==null||n.refetch({cancelRefetch:!1}),(t=S(this,jt))==null||t.continue()}onOnline(){var t;const n=this.observers.find(i=>i.shouldFetchOnReconnect());n==null||n.refetch({cancelRefetch:!1}),(t=S(this,jt))==null||t.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),S(this,pn).notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){this.observers.includes(n)&&(this.observers=this.observers.filter(t=>t!==n),this.observers.length||(S(this,jt)&&(S(this,Yr)?S(this,jt).cancel({revert:!0}):S(this,jt).cancelRetry()),this.scheduleGc()),S(this,pn).notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||me(this,An,di).call(this,{type:"invalidate"})}fetch(n,t){var h,d,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(S(this,jt))return S(this,jt).continueRetry(),S(this,jt).promise}if(n&&this.setOptions(n),!this.options.queryFn){const m=this.observers.find(g=>g.options.queryFn);m&&this.setOptions(m.options)}const i=new AbortController,r=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(K(this,Yr,!0),i.signal)})},o=()=>{const m=_4(this.options,t),w=(()=>{const p={client:S(this,$r),queryKey:this.queryKey,meta:this.meta};return r(p),p})();return K(this,Yr,!1),this.options.persister?this.options.persister(m,w,this):m(w)},c=(()=>{const m={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:S(this,$r),state:this.state,fetchFn:o};return r(m),m})();(h=this.options.behavior)==null||h.onFetch(c,this),K(this,Wr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=c.fetchOptions)==null?void 0:d.meta))&&me(this,An,di).call(this,{type:"fetch",meta:(f=c.fetchOptions)==null?void 0:f.meta});const l=m=>{var g,w,p,_;Bl(m)&&m.silent||me(this,An,di).call(this,{type:"error",error:m}),Bl(m)||((w=(g=S(this,pn).config).onError)==null||w.call(g,m,this),(_=(p=S(this,pn).config).onSettled)==null||_.call(p,this.state.data,m,this)),this.scheduleGc()};return K(this,jt,b4({initialPromise:t==null?void 0:t.initialPromise,fn:c.fetchFn,abort:i.abort.bind(i),onSuccess:m=>{var g,w,p,_;if(m===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(m)}catch(x){l(x);return}(w=(g=S(this,pn).config).onSuccess)==null||w.call(g,m,this),(_=(p=S(this,pn).config).onSettled)==null||_.call(p,m,this.state.error,this),this.scheduleGc()},onError:l,onFail:(m,g)=>{me(this,An,di).call(this,{type:"failed",failureCount:m,error:g})},onPause:()=>{me(this,An,di).call(this,{type:"pause"})},onContinue:()=>{me(this,An,di).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0})),S(this,jt).start()}},ko=new WeakMap,Wr=new WeakMap,pn=new WeakMap,$r=new WeakMap,jt=new WeakMap,oa=new WeakMap,Yr=new WeakMap,An=new WeakSet,di=function(n){const t=i=>{switch(n.type){case"failed":return{...i,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...j4(i.data,this.options),fetchMeta:n.meta??null};case"success":return K(this,Wr,void 0),{...i,data:n.data,dataUpdateCount:i.dataUpdateCount+1,dataUpdatedAt:n.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=n.error;return Bl(r)&&r.revert&&S(this,Wr)?{...S(this,Wr),fetchStatus:"idle"}:{...i,error:r,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...n.state}}};this.state=t(this.state),Qe.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),S(this,pn).notify({query:this,type:"updated",action:n})})},pg);function j4(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:M4(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Hx(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,t=n!==void 0,i=t?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:t?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var Hn,wg,Zx=(wg=class extends ao{constructor(n={}){super();se(this,Hn);this.config=n,K(this,Hn,new Map)}build(n,t,i){const r=t.queryKey,o=t.queryHash??Sh(r,t);let s=this.get(o);return s||(s=new Qx({client:n,queryKey:r,queryHash:o,options:n.defaultQueryOptions(t),state:i,defaultOptions:n.getQueryDefaults(r)}),this.add(s)),s}add(n){S(this,Hn).has(n.queryHash)||(S(this,Hn).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const t=S(this,Hn).get(n.queryHash);t&&(n.destroy(),t===n&&S(this,Hn).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){Qe.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return S(this,Hn).get(n)}getAll(){return[...S(this,Hn).values()]}find(n){const t={exact:!0,...n};return this.getAll().find(i=>L1(t,i))}findAll(n={}){const t=this.getAll();return Object.keys(n).length>0?t.filter(i=>L1(n,i)):t}notify(n){Qe.batch(()=>{this.listeners.forEach(t=>{t(n)})})}onFocus(){Qe.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){Qe.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},Hn=new WeakMap,wg),Zn,Nt,Fr,Gn,Ui,_g,Gx=(_g=class extends C4{constructor(n){super();se(this,Gn);se(this,Zn);se(this,Nt);se(this,Fr);this.mutationId=n.mutationId,K(this,Nt,n.mutationCache),K(this,Zn,[]),this.state=n.state||L4(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){S(this,Zn).includes(n)||(S(this,Zn).push(n),this.clearGcTimeout(),S(this,Nt).notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){K(this,Zn,S(this,Zn).filter(t=>t!==n)),this.scheduleGc(),S(this,Nt).notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){S(this,Zn).length||(this.state.status==="pending"?this.scheduleGc():S(this,Nt).remove(this))}continue(){var n;return((n=S(this,Fr))==null?void 0:n.continue())??this.execute(this.state.variables)}async execute(n){var o,s,c,l,h,d,f,m,g,w,p,_,x,I,b,j,C,E,T,O;const t=()=>{me(this,Gn,Ui).call(this,{type:"continue"})};K(this,Fr,b4({fn:()=>this.options.mutationFn?this.options.mutationFn(n):Promise.reject(new Error("No mutationFn found")),onFail:(L,N)=>{me(this,Gn,Ui).call(this,{type:"failed",failureCount:L,error:N})},onPause:()=>{me(this,Gn,Ui).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>S(this,Nt).canRun(this)}));const i=this.state.status==="pending",r=!S(this,Fr).canStart();try{if(i)t();else{me(this,Gn,Ui).call(this,{type:"pending",variables:n,isPaused:r}),await((s=(o=S(this,Nt).config).onMutate)==null?void 0:s.call(o,n,this));const N=await((l=(c=this.options).onMutate)==null?void 0:l.call(c,n));N!==this.state.context&&me(this,Gn,Ui).call(this,{type:"pending",context:N,variables:n,isPaused:r})}const L=await S(this,Fr).start();return await((d=(h=S(this,Nt).config).onSuccess)==null?void 0:d.call(h,L,n,this.state.context,this)),await((m=(f=this.options).onSuccess)==null?void 0:m.call(f,L,n,this.state.context)),await((w=(g=S(this,Nt).config).onSettled)==null?void 0:w.call(g,L,null,this.state.variables,this.state.context,this)),await((_=(p=this.options).onSettled)==null?void 0:_.call(p,L,null,n,this.state.context)),me(this,Gn,Ui).call(this,{type:"success",data:L}),L}catch(L){try{throw await((I=(x=S(this,Nt).config).onError)==null?void 0:I.call(x,L,n,this.state.context,this)),await((j=(b=this.options).onError)==null?void 0:j.call(b,L,n,this.state.context)),await((E=(C=S(this,Nt).config).onSettled)==null?void 0:E.call(C,void 0,L,this.state.variables,this.state.context,this)),await((O=(T=this.options).onSettled)==null?void 0:O.call(T,void 0,L,n,this.state.context)),L}finally{me(this,Gn,Ui).call(this,{type:"error",error:L})}}finally{S(this,Nt).runNext(this)}}},Zn=new WeakMap,Nt=new WeakMap,Fr=new WeakMap,Gn=new WeakSet,Ui=function(n){const t=i=>{switch(n.type){case"failed":return{...i,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...i,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:n.error,failureCount:i.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Qe.batch(()=>{S(this,Zn).forEach(i=>{i.onMutationUpdate(n)}),S(this,Nt).notify({mutation:this,type:"updated",action:n})})},_g);function L4(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var gi,Dn,sa,xg,qx=(xg=class extends ao{constructor(n={}){super();se(this,gi);se(this,Dn);se(this,sa);this.config=n,K(this,gi,new Set),K(this,Dn,new Map),K(this,sa,0)}build(n,t,i){const r=new Gx({mutationCache:this,mutationId:++va(this,sa)._,options:n.defaultMutationOptions(t),state:i});return this.add(r),r}add(n){S(this,gi).add(n);const t=Sa(n);if(typeof t=="string"){const i=S(this,Dn).get(t);i?i.push(n):S(this,Dn).set(t,[n])}this.notify({type:"added",mutation:n})}remove(n){if(S(this,gi).delete(n)){const t=Sa(n);if(typeof t=="string"){const i=S(this,Dn).get(t);if(i)if(i.length>1){const r=i.indexOf(n);r!==-1&&i.splice(r,1)}else i[0]===n&&S(this,Dn).delete(t)}}this.notify({type:"removed",mutation:n})}canRun(n){const t=Sa(n);if(typeof t=="string"){const i=S(this,Dn).get(t),r=i==null?void 0:i.find(o=>o.state.status==="pending");return!r||r===n}else return!0}runNext(n){var i;const t=Sa(n);if(typeof t=="string"){const r=(i=S(this,Dn).get(t))==null?void 0:i.find(o=>o!==n&&o.state.isPaused);return(r==null?void 0:r.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Qe.batch(()=>{S(this,gi).forEach(n=>{this.notify({type:"removed",mutation:n})}),S(this,gi).clear(),S(this,Dn).clear()})}getAll(){return Array.from(S(this,gi))}find(n){const t={exact:!0,...n};return this.getAll().find(i=>E1(t,i))}findAll(n={}){return this.getAll().filter(t=>E1(n,t))}notify(n){Qe.batch(()=>{this.listeners.forEach(t=>{t(n)})})}resumePausedMutations(){const n=this.getAll().filter(t=>t.state.isPaused);return Qe.batch(()=>Promise.all(n.map(t=>t.continue().catch(Lt))))}},gi=new WeakMap,Dn=new WeakMap,sa=new WeakMap,xg);function Sa(e){var n;return(n=e.options.scope)==null?void 0:n.id}function N1(e){return{onFetch:(n,t)=>{var d,f,m,g,w;const i=n.options,r=(m=(f=(d=n.fetchOptions)==null?void 0:d.meta)==null?void 0:f.fetchMore)==null?void 0:m.direction,o=((g=n.state.data)==null?void 0:g.pages)||[],s=((w=n.state.data)==null?void 0:w.pageParams)||[];let c={pages:[],pageParams:[]},l=0;const h=async()=>{let p=!1;const _=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(n.signal.aborted?p=!0:n.signal.addEventListener("abort",()=>{p=!0}),n.signal)})},x=_4(n.options,n.fetchOptions),I=async(b,j,C)=>{if(p)return Promise.reject();if(j==null&&b.pages.length)return Promise.resolve(b);const T=(()=>{const v={client:n.client,queryKey:n.queryKey,pageParam:j,direction:C?"backward":"forward",meta:n.options.meta};return _(v),v})(),O=await x(T),{maxPages:L}=n.options,N=C?Ux:Vx;return{pages:N(b.pages,O,L),pageParams:N(b.pageParams,j,L)}};if(r&&o.length){const b=r==="backward",j=b?Kx:S1,C={pages:o,pageParams:s},E=j(i,C);c=await I(C,E,b)}else{const b=e??o.length;do{const j=l===0?s[0]??i.initialPageParam:S1(i,c);if(l>0&&j==null)break;c=await I(c,j),l++}while(l<b)}return c};n.options.persister?n.fetchFn=()=>{var p,_;return(_=(p=n.options).persister)==null?void 0:_.call(p,h,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},t)}:n.fetchFn=h}}}function S1(e,{pages:n,pageParams:t}){const i=n.length-1;return n.length>0?e.getNextPageParam(n[i],n,t[i],t):void 0}function Kx(e,{pages:n,pageParams:t}){var i;return n.length>0?(i=e.getPreviousPageParam)==null?void 0:i.call(e,n[0],n,t[0],t):void 0}var Ye,Ji,Xi,zo,Po,er,Ro,Vo,Mg,Jx=(Mg=class{constructor(e={}){se(this,Ye);se(this,Ji);se(this,Xi);se(this,zo);se(this,Po);se(this,er);se(this,Ro);se(this,Vo);K(this,Ye,e.queryCache||new Zx),K(this,Ji,e.mutationCache||new qx),K(this,Xi,e.defaultOptions||{}),K(this,zo,new Map),K(this,Po,new Map),K(this,er,0)}mount(){va(this,er)._++,S(this,er)===1&&(K(this,Ro,Dh.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,Ye).onFocus())})),K(this,Vo,Ic.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,Ye).onOnline())})))}unmount(){var e,n;va(this,er)._--,S(this,er)===0&&((e=S(this,Ro))==null||e.call(this),K(this,Ro,void 0),(n=S(this,Vo))==null||n.call(this),K(this,Vo,void 0))}isFetching(e){return S(this,Ye).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return S(this,Ji).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const n=this.defaultQueryOptions({queryKey:e});return(t=S(this,Ye).get(n.queryHash))==null?void 0:t.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),t=S(this,Ye).build(this,n),i=t.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&t.isStaleByTime(dr(n.staleTime,t))&&this.prefetchQuery(n),Promise.resolve(i))}getQueriesData(e){return S(this,Ye).findAll(e).map(({queryKey:n,state:t})=>{const i=t.data;return[n,i]})}setQueryData(e,n,t){const i=this.defaultQueryOptions({queryKey:e}),r=S(this,Ye).get(i.queryHash),o=r==null?void 0:r.state.data,s=Px(n,o);if(s!==void 0)return S(this,Ye).build(this,i).setData(s,{...t,manual:!0})}setQueriesData(e,n,t){return Qe.batch(()=>S(this,Ye).findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,n,t)]))}getQueryState(e){var t;const n=this.defaultQueryOptions({queryKey:e});return(t=S(this,Ye).get(n.queryHash))==null?void 0:t.state}removeQueries(e){const n=S(this,Ye);Qe.batch(()=>{n.findAll(e).forEach(t=>{n.remove(t)})})}resetQueries(e,n){const t=S(this,Ye);return Qe.batch(()=>(t.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},n)))}cancelQueries(e,n={}){const t={revert:!0,...n},i=Qe.batch(()=>S(this,Ye).findAll(e).map(r=>r.cancel(t)));return Promise.all(i).then(Lt).catch(Lt)}invalidateQueries(e,n={}){return Qe.batch(()=>(S(this,Ye).findAll(e).forEach(t=>{t.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},n)))}refetchQueries(e,n={}){const t={...n,cancelRefetch:n.cancelRefetch??!0},i=Qe.batch(()=>S(this,Ye).findAll(e).filter(r=>!r.isDisabled()&&!r.isStatic()).map(r=>{let o=r.fetch(void 0,t);return t.throwOnError||(o=o.catch(Lt)),r.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(i).then(Lt)}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const t=S(this,Ye).build(this,n);return t.isStaleByTime(dr(n.staleTime,t))?t.fetch(n):Promise.resolve(t.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Lt).catch(Lt)}fetchInfiniteQuery(e){return e.behavior=N1(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Lt).catch(Lt)}ensureInfiniteQueryData(e){return e.behavior=N1(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ic.isOnline()?S(this,Ji).resumePausedMutations():Promise.resolve()}getQueryCache(){return S(this,Ye)}getMutationCache(){return S(this,Ji)}getDefaultOptions(){return S(this,Xi)}setDefaultOptions(e){K(this,Xi,e)}setQueryDefaults(e,n){S(this,zo).set(eo(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...S(this,zo).values()],t={};return n.forEach(i=>{$s(e,i.queryKey)&&Object.assign(t,i.defaultOptions)}),t}setMutationDefaults(e,n){S(this,Po).set(eo(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...S(this,Po).values()],t={};return n.forEach(i=>{$s(e,i.mutationKey)&&Object.assign(t,i.defaultOptions)}),t}defaultQueryOptions(e){if(e._defaulted)return e;const n={...S(this,Xi).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=Sh(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===Ah&&(n.enabled=!1),n}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...S(this,Xi).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){S(this,Ye).clear(),S(this,Ji).clear()}},Ye=new WeakMap,Ji=new WeakMap,Xi=new WeakMap,zo=new WeakMap,Po=new WeakMap,er=new WeakMap,Ro=new WeakMap,Vo=new WeakMap,Mg),Bt,be,aa,St,Qr,Uo,tr,nr,ca,Bo,Wo,Hr,Zr,ir,$o,Te,Ns,Yu,Fu,Qu,Hu,Zu,Gu,qu,E4,Ig,Oh=(Ig=class extends ao{constructor(n,t){super();se(this,Te);se(this,Bt);se(this,be);se(this,aa);se(this,St);se(this,Qr);se(this,Uo);se(this,tr);se(this,nr);se(this,ca);se(this,Bo);se(this,Wo);se(this,Hr);se(this,Zr);se(this,ir);se(this,$o,new Set);this.options=t,K(this,Bt,n),K(this,nr,null),K(this,tr,$u()),this.options.experimental_prefetchInRender||S(this,tr).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(S(this,be).addObserver(this),A1(S(this,be),this.options)?me(this,Te,Ns).call(this):this.updateResult(),me(this,Te,Hu).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ku(S(this,be),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ku(S(this,be),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,me(this,Te,Zu).call(this),me(this,Te,Gu).call(this),S(this,be).removeObserver(this)}setOptions(n){const t=this.options,i=S(this,be);if(this.options=S(this,Bt).defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof On(this.options.enabled,S(this,be))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");me(this,Te,qu).call(this),S(this,be).setOptions(this.options),t._defaulted&&!Mc(this.options,t)&&S(this,Bt).getQueryCache().notify({type:"observerOptionsUpdated",query:S(this,be),observer:this});const r=this.hasListeners();r&&D1(S(this,be),i,this.options,t)&&me(this,Te,Ns).call(this),this.updateResult(),r&&(S(this,be)!==i||On(this.options.enabled,S(this,be))!==On(t.enabled,S(this,be))||dr(this.options.staleTime,S(this,be))!==dr(t.staleTime,S(this,be)))&&me(this,Te,Yu).call(this);const o=me(this,Te,Fu).call(this);r&&(S(this,be)!==i||On(this.options.enabled,S(this,be))!==On(t.enabled,S(this,be))||o!==S(this,ir))&&me(this,Te,Qu).call(this,o)}getOptimisticResult(n){const t=S(this,Bt).getQueryCache().build(S(this,Bt),n),i=this.createResult(t,n);return eM(this,i)&&(K(this,St,i),K(this,Uo,this.options),K(this,Qr,S(this,be).state)),i}getCurrentResult(){return S(this,St)}trackResult(n,t){return new Proxy(n,{get:(i,r)=>(this.trackProp(r),t==null||t(r),Reflect.get(i,r))})}trackProp(n){S(this,$o).add(n)}getCurrentQuery(){return S(this,be)}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const t=S(this,Bt).defaultQueryOptions(n),i=S(this,Bt).getQueryCache().build(S(this,Bt),t);return i.fetch().then(()=>this.createResult(i,t))}fetch(n){return me(this,Te,Ns).call(this,{...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),S(this,St)))}createResult(n,t){var L;const i=S(this,be),r=this.options,o=S(this,St),s=S(this,Qr),c=S(this,Uo),h=n!==i?n.state:S(this,aa),{state:d}=n;let f={...d},m=!1,g;if(t._optimisticResults){const N=this.hasListeners(),v=!N&&A1(n,t),D=N&&D1(n,i,t,r);(v||D)&&(f={...f,...j4(d.data,n.options)}),t._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:w,errorUpdatedAt:p,status:_}=f;g=f.data;let x=!1;if(t.placeholderData!==void 0&&g===void 0&&_==="pending"){let N;o!=null&&o.isPlaceholderData&&t.placeholderData===(c==null?void 0:c.placeholderData)?(N=o.data,x=!0):N=typeof t.placeholderData=="function"?t.placeholderData((L=S(this,Wo))==null?void 0:L.state.data,S(this,Wo)):t.placeholderData,N!==void 0&&(_="success",g=Wu(o==null?void 0:o.data,N,t),m=!0)}if(t.select&&g!==void 0&&!x)if(o&&g===(s==null?void 0:s.data)&&t.select===S(this,ca))g=S(this,Bo);else try{K(this,ca,t.select),g=t.select(g),g=Wu(o==null?void 0:o.data,g,t),K(this,Bo,g),K(this,nr,null)}catch(N){K(this,nr,N)}S(this,nr)&&(w=S(this,nr),g=S(this,Bo),p=Date.now(),_="error");const I=f.fetchStatus==="fetching",b=_==="pending",j=_==="error",C=b&&I,E=g!==void 0,O={status:_,fetchStatus:f.fetchStatus,isPending:b,isSuccess:_==="success",isError:j,isInitialLoading:C,isLoading:C,data:g,dataUpdatedAt:f.dataUpdatedAt,error:w,errorUpdatedAt:p,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>h.dataUpdateCount||f.errorUpdateCount>h.errorUpdateCount,isFetching:I,isRefetching:I&&!b,isLoadingError:j&&!E,isPaused:f.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:j&&E,isStale:kh(n,t),refetch:this.refetch,promise:S(this,tr)};if(this.options.experimental_prefetchInRender){const N=z=>{O.status==="error"?z.reject(O.error):O.data!==void 0&&z.resolve(O.data)},v=()=>{const z=K(this,tr,O.promise=$u());N(z)},D=S(this,tr);switch(D.status){case"pending":n.queryHash===i.queryHash&&N(D);break;case"fulfilled":(O.status==="error"||O.data!==D.value)&&v();break;case"rejected":(O.status!=="error"||O.error!==D.reason)&&v();break}}return O}updateResult(){const n=S(this,St),t=this.createResult(S(this,be),this.options);if(K(this,Qr,S(this,be).state),K(this,Uo,this.options),S(this,Qr).data!==void 0&&K(this,Wo,S(this,be)),Mc(t,n))return;K(this,St,t);const i=()=>{if(!n)return!0;const{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!S(this,$o).size)return!0;const s=new Set(o??S(this,$o));return this.options.throwOnError&&s.add("error"),Object.keys(S(this,St)).some(c=>{const l=c;return S(this,St)[l]!==n[l]&&s.has(l)})};me(this,Te,E4).call(this,{listeners:i()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&me(this,Te,Hu).call(this)}},Bt=new WeakMap,be=new WeakMap,aa=new WeakMap,St=new WeakMap,Qr=new WeakMap,Uo=new WeakMap,tr=new WeakMap,nr=new WeakMap,ca=new WeakMap,Bo=new WeakMap,Wo=new WeakMap,Hr=new WeakMap,Zr=new WeakMap,ir=new WeakMap,$o=new WeakMap,Te=new WeakSet,Ns=function(n){me(this,Te,qu).call(this);let t=S(this,be).fetch(this.options,n);return n!=null&&n.throwOnError||(t=t.catch(Lt)),t},Yu=function(){me(this,Te,Zu).call(this);const n=dr(this.options.staleTime,S(this,be));if(Xr||S(this,St).isStale||!Uu(n))return;const i=w4(S(this,St).dataUpdatedAt,n)+1;K(this,Hr,setTimeout(()=>{S(this,St).isStale||this.updateResult()},i))},Fu=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(S(this,be)):this.options.refetchInterval)??!1},Qu=function(n){me(this,Te,Gu).call(this),K(this,ir,n),!(Xr||On(this.options.enabled,S(this,be))===!1||!Uu(S(this,ir))||S(this,ir)===0)&&K(this,Zr,setInterval(()=>{(this.options.refetchIntervalInBackground||Dh.isFocused())&&me(this,Te,Ns).call(this)},S(this,ir)))},Hu=function(){me(this,Te,Yu).call(this),me(this,Te,Qu).call(this,me(this,Te,Fu).call(this))},Zu=function(){S(this,Hr)&&(clearTimeout(S(this,Hr)),K(this,Hr,void 0))},Gu=function(){S(this,Zr)&&(clearInterval(S(this,Zr)),K(this,Zr,void 0))},qu=function(){const n=S(this,Bt).getQueryCache().build(S(this,Bt),this.options);if(n===S(this,be))return;const t=S(this,be);K(this,be,n),K(this,aa,n.state),this.hasListeners()&&(t==null||t.removeObserver(this),n.addObserver(this))},E4=function(n){Qe.batch(()=>{n.listeners&&this.listeners.forEach(t=>{t(S(this,St))}),S(this,Bt).getQueryCache().notify({query:S(this,be),type:"observerResultsUpdated"})})},Ig);function Xx(e,n){return On(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&n.retryOnMount===!1)}function A1(e,n){return Xx(e,n)||e.state.data!==void 0&&Ku(e,n,n.refetchOnMount)}function Ku(e,n,t){if(On(n.enabled,e)!==!1&&dr(n.staleTime,e)!=="static"){const i=typeof t=="function"?t(e):t;return i==="always"||i!==!1&&kh(e,n)}return!1}function D1(e,n,t,i){return(e!==n||On(i.enabled,e)===!1)&&(!t.suspense||e.state.status!=="error")&&kh(e,t)}function kh(e,n){return On(n.enabled,e)!==!1&&e.isStaleByTime(dr(n.staleTime,e))}function eM(e,n){return!Mc(e.getCurrentResult(),n)}function O1(e,n){const t=new Set(n);return e.filter(i=>!t.has(i))}function tM(e,n,t){const i=e.slice(0);return i[n]=t,i}var Yo,wn,Fo,Qo,_n,rr,la,ua,da,gt,Ju,Xu,ed,td,nd,bg,nM=(bg=class extends ao{constructor(n,t,i){super();se(this,gt);se(this,Yo);se(this,wn);se(this,Fo);se(this,Qo);se(this,_n);se(this,rr);se(this,la);se(this,ua);se(this,da,[]);K(this,Yo,n),K(this,Qo,i),K(this,Fo,[]),K(this,_n,[]),K(this,wn,[]),this.setQueries(t)}onSubscribe(){this.listeners.size===1&&S(this,_n).forEach(n=>{n.subscribe(t=>{me(this,gt,td).call(this,n,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,S(this,_n).forEach(n=>{n.destroy()})}setQueries(n,t){K(this,Fo,n),K(this,Qo,t),Qe.batch(()=>{const i=S(this,_n),r=me(this,gt,ed).call(this,S(this,Fo));K(this,da,r),r.forEach(l=>l.observer.setOptions(l.defaultedQueryOptions));const o=r.map(l=>l.observer),s=o.map(l=>l.getCurrentResult()),c=o.some((l,h)=>l!==i[h]);i.length===o.length&&!c||(K(this,_n,o),K(this,wn,s),this.hasListeners()&&(O1(i,o).forEach(l=>{l.destroy()}),O1(o,i).forEach(l=>{l.subscribe(h=>{me(this,gt,td).call(this,l,h)})}),me(this,gt,nd).call(this)))})}getCurrentResult(){return S(this,wn)}getQueries(){return S(this,_n).map(n=>n.getCurrentQuery())}getObservers(){return S(this,_n)}getOptimisticResult(n,t){const i=me(this,gt,ed).call(this,n),r=i.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions));return[r,o=>me(this,gt,Xu).call(this,o??r,t),()=>me(this,gt,Ju).call(this,r,i)]}},Yo=new WeakMap,wn=new WeakMap,Fo=new WeakMap,Qo=new WeakMap,_n=new WeakMap,rr=new WeakMap,la=new WeakMap,ua=new WeakMap,da=new WeakMap,gt=new WeakSet,Ju=function(n,t){return t.map((i,r)=>{const o=n[r];return i.defaultedQueryOptions.notifyOnChangeProps?o:i.observer.trackResult(o,s=>{t.forEach(c=>{c.observer.trackProp(s)})})})},Xu=function(n,t){return t?((!S(this,rr)||S(this,wn)!==S(this,ua)||t!==S(this,la))&&(K(this,la,t),K(this,ua,S(this,wn)),K(this,rr,el(S(this,rr),t(n)))),S(this,rr)):n},ed=function(n){const t=new Map(S(this,_n).map(r=>[r.options.queryHash,r])),i=[];return n.forEach(r=>{const o=S(this,Yo).defaultQueryOptions(r),s=t.get(o.queryHash);s?i.push({defaultedQueryOptions:o,observer:s}):i.push({defaultedQueryOptions:o,observer:new Oh(S(this,Yo),o)})}),i},td=function(n,t){const i=S(this,_n).indexOf(n);i!==-1&&(K(this,wn,tM(S(this,wn),i,t)),me(this,gt,nd).call(this))},nd=function(){var n;if(this.hasListeners()){const t=S(this,rr),i=me(this,gt,Ju).call(this,S(this,wn),S(this,da)),r=me(this,gt,Xu).call(this,i,(n=S(this,Qo))==null?void 0:n.combine);t!==r&&Qe.batch(()=>{this.listeners.forEach(o=>{o(S(this,wn))})})}},bg),or,sr,Wt,yi,wi,nc,id,Cg,iM=(Cg=class extends ao{constructor(t,i){super();se(this,wi);se(this,or);se(this,sr);se(this,Wt);se(this,yi);K(this,or,t),this.setOptions(i),this.bindMethods(),me(this,wi,nc).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const i=this.options;this.options=S(this,or).defaultMutationOptions(t),Mc(this.options,i)||S(this,or).getMutationCache().notify({type:"observerOptionsUpdated",mutation:S(this,Wt),observer:this}),i!=null&&i.mutationKey&&this.options.mutationKey&&eo(i.mutationKey)!==eo(this.options.mutationKey)?this.reset():((r=S(this,Wt))==null?void 0:r.state.status)==="pending"&&S(this,Wt).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=S(this,Wt))==null||t.removeObserver(this)}onMutationUpdate(t){me(this,wi,nc).call(this),me(this,wi,id).call(this,t)}getCurrentResult(){return S(this,sr)}reset(){var t;(t=S(this,Wt))==null||t.removeObserver(this),K(this,Wt,void 0),me(this,wi,nc).call(this),me(this,wi,id).call(this)}mutate(t,i){var r;return K(this,yi,i),(r=S(this,Wt))==null||r.removeObserver(this),K(this,Wt,S(this,or).getMutationCache().build(S(this,or),this.options)),S(this,Wt).addObserver(this),S(this,Wt).execute(t)}},or=new WeakMap,sr=new WeakMap,Wt=new WeakMap,yi=new WeakMap,wi=new WeakSet,nc=function(){var i;const t=((i=S(this,Wt))==null?void 0:i.state)??L4();K(this,sr,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},id=function(t){Qe.batch(()=>{var i,r,o,s,c,l,h,d;if(S(this,yi)&&this.hasListeners()){const f=S(this,sr).variables,m=S(this,sr).context;(t==null?void 0:t.type)==="success"?((r=(i=S(this,yi)).onSuccess)==null||r.call(i,t.data,f,m),(s=(o=S(this,yi)).onSettled)==null||s.call(o,t.data,null,f,m)):(t==null?void 0:t.type)==="error"&&((l=(c=S(this,yi)).onError)==null||l.call(c,t.error,f,m),(d=(h=S(this,yi)).onSettled)==null||d.call(h,void 0,t.error,f,m))}this.listeners.forEach(f=>{f(S(this,sr))})})},Cg),T4=y.createContext(void 0),Ei=e=>{const n=y.useContext(T4);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},rM=({client:e,children:n})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),a.jsx(T4.Provider,{value:e,children:n})),v4=y.createContext(!1),N4=()=>y.useContext(v4);v4.Provider;function oM(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var sM=y.createContext(oM()),S4=()=>y.useContext(sM),A4=(e,n)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(n.isReset()||(e.retryOnMount=!1))},D4=e=>{y.useEffect(()=>{e.clearReset()},[e])},O4=({result:e,errorResetBoundary:n,throwOnError:t,query:i,suspense:r})=>e.isError&&!n.isReset()&&!e.isFetching&&i&&(r&&e.data===void 0||x4(t,[e.error,i])),k4=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),t=e.staleTime;e.staleTime=typeof t=="function"?(...i)=>n(t(...i)):n(t),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},z4=(e,n)=>e.isLoading&&e.isFetching&&!n,rd=(e,n)=>(e==null?void 0:e.suspense)&&n.isPending,bc=(e,n,t)=>n.fetchOptimistic(e).catch(()=>{t.clearReset()});function zh({queries:e,...n},t){const i=Ei(),r=N4(),o=S4(),s=y.useMemo(()=>e.map(p=>{const _=i.defaultQueryOptions(p);return _._optimisticResults=r?"isRestoring":"optimistic",_}),[e,i,r]);s.forEach(p=>{k4(p),A4(p,o)}),D4(o);const[c]=y.useState(()=>new nM(i,s,n)),[l,h,d]=c.getOptimisticResult(s,n.combine),f=!r&&n.subscribed!==!1;y.useSyncExternalStore(y.useCallback(p=>f?c.subscribe(Qe.batchCalls(p)):Lt,[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),y.useEffect(()=>{c.setQueries(s,n)},[s,n,c]);const g=l.some((p,_)=>rd(s[_],p))?l.flatMap((p,_)=>{const x=s[_];if(x){const I=new Oh(i,x);if(rd(x,p))return bc(x,I,o);z4(p,r)&&bc(x,I,o)}return[]}):[];if(g.length>0)throw Promise.all(g);const w=l.find((p,_)=>{const x=s[_];return x&&O4({result:p,errorResetBoundary:o,throwOnError:x.throwOnError,query:i.getQueryCache().get(x.queryHash),suspense:x.suspense})});if(w!=null&&w.error)throw w.error;return h(d())}function aM(e,n,t){var f,m,g,w,p;const i=N4(),r=S4(),o=Ei(),s=o.defaultQueryOptions(e);(m=(f=o.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||m.call(f,s),s._optimisticResults=i?"isRestoring":"optimistic",k4(s),A4(s,r),D4(r);const c=!o.getQueryCache().get(s.queryHash),[l]=y.useState(()=>new n(o,s)),h=l.getOptimisticResult(s),d=!i&&e.subscribed!==!1;if(y.useSyncExternalStore(y.useCallback(_=>{const x=d?l.subscribe(Qe.batchCalls(_)):Lt;return l.updateResult(),x},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),y.useEffect(()=>{l.setOptions(s)},[s,l]),rd(s,h))throw bc(s,l,r);if(O4({result:h,errorResetBoundary:r,throwOnError:s.throwOnError,query:o.getQueryCache().get(s.queryHash),suspense:s.suspense}))throw h.error;if((w=(g=o.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||w.call(g,s,h),s.experimental_prefetchInRender&&!Xr&&z4(h,i)){const _=c?bc(s,l,r):(p=o.getQueryCache().get(s.queryHash))==null?void 0:p.promise;_==null||_.catch(Lt).finally(()=>{l.updateResult()})}return s.notifyOnChangeProps?h:l.trackResult(h)}function pe(e,n){return aM(e,Oh)}function Ys(e,n){const t=Ei(),[i]=y.useState(()=>new iM(t,e));y.useEffect(()=>{i.setOptions(e)},[i,e]);const r=y.useSyncExternalStore(y.useCallback(s=>i.subscribe(Qe.batchCalls(s)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),o=y.useCallback((s,c)=>{i.mutate(s,c).catch(Lt)},[i]);if(r.error&&x4(i.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:o,mutateAsync:r.mutate}}async function ga(e,n){if(De(e)){const{getEcosystemWalletInfo:t}=await u(async()=>{const{getEcosystemWalletInfo:i}=await import("./get-ecosystem-wallet-info-BH812YkU.js");return{getEcosystemWalletInfo:i}},__vite__mapDeps([0,1,2]));return n?t(e).then(i=>i.image_id):t(e)}switch(e){case"smart":return n?u(()=>import("./image-CLYJx-Lt.js"),[]).then(t=>t.default):u(()=>import("./index-DQErdPlT.js"),[]).then(t=>t.wallet);case"inApp":return n?u(()=>import("./image-CJcZQ4qy.js"),[]).then(t=>t.default):u(()=>import("./index-DGJr_A1x.js"),[]).then(t=>t.wallet);case"walletConnect":return n?u(()=>import("./image-B-Dq4f8l.js"),[]).then(t=>t.default):u(()=>import("./index-CCmQEc5F.js"),[]).then(t=>t.wallet);case"embedded":return n?u(()=>import("./image-CSqTAqqQ.js"),[]).then(t=>t.default):u(()=>import("./index-DcfiRGq8.js"),[]).then(t=>t.wallet);case"adapter":return n?u(()=>import("./image-cLgiWKUl.js"),[]).then(t=>t.default):u(()=>import("./index-CDBO4Wxt.js"),[]).then(t=>t.wallet);case"io.1inch.wallet":return n?u(()=>import("./image-v60dFJ72.js"),[]).then(t=>t.default):u(()=>import("./index-YIjtC3K-.js"),[]).then(t=>t.wallet);case"com.binance.wallet":return n?u(()=>import("./image-BtDMB-2P.js"),[]).then(t=>t.default):u(()=>import("./index-DQX7gmmD.js"),[]).then(t=>t.wallet);case"com.ledger":return n?u(()=>import("./image-DXXDq1SV.js"),[]).then(t=>t.default):u(()=>import("./index-DSj56DPA.js"),[]).then(t=>t.wallet);case"com.bitpay":return n?u(()=>import("./image-BS7uclVJ.js"),[]).then(t=>t.default):u(()=>import("./index-B5mnNH8U.js"),[]).then(t=>t.wallet);case"com.bestwallet":return n?u(()=>import("./image-DTjGzWem.js"),[]).then(t=>t.default):u(()=>import("./index-CWLh9ort.js"),[]).then(t=>t.wallet);case"io.metamask":return n?u(()=>import("./image-D9kD-3RI.js"),[]).then(t=>t.default):u(()=>import("./index-7YYggeeW.js"),[]).then(t=>t.wallet);case"com.trustwallet.app":return n?u(()=>import("./image-DcDvrdXW.js"),[]).then(t=>t.default):u(()=>import("./index-DRKmorNl.js"),[]).then(t=>t.wallet);case"com.fireblocks":return n?u(()=>import("./image-B264ar_O.js"),[]).then(t=>t.default):u(()=>import("./index-DKILMXwW.js"),[]).then(t=>t.wallet);case"com.bitget.web3":return n?u(()=>import("./image-Pyla20aw.js"),[]).then(t=>t.default):u(()=>import("./index-mW9xQNOt.js"),[]).then(t=>t.wallet);case"pro.tokenpocket":return n?u(()=>import("./image-Dc4UaoeV.js"),[]).then(t=>t.default):u(()=>import("./index-LzRKH3D3.js"),[]).then(t=>t.wallet);case"com.safepal":return n?u(()=>import("./image-CR2oRmyx.js"),[]).then(t=>t.default):u(()=>import("./index-Byv2UG3B.js"),[]).then(t=>t.wallet);case"org.uniswap":return n?u(()=>import("./image-C4YFvx9h.js"),[]).then(t=>t.default):u(()=>import("./index-Br2X_aBY.js"),[]).then(t=>t.wallet);case"io.zerion.wallet":return n?u(()=>import("./image-BC_7FxFG.js"),[]).then(t=>t.default):u(()=>import("./index-B4NjVdaz.js"),[]).then(t=>t.wallet);case"com.elrond.maiar.wallet":return n?u(()=>import("./image-CcKLaZOY.js"),[]).then(t=>t.default):u(()=>import("./index-BOGFyBZY.js"),[]).then(t=>t.wallet);case"com.crypto.wallet":return n?u(()=>import("./image-D1DsrpO_.js"),[]).then(t=>t.default):u(()=>import("./index-BPIHBKg2.js"),[]).then(t=>t.wallet);case"com.bitcoin":return n?u(()=>import("./image-Bn-Yp1MK.js"),[]).then(t=>t.default):u(()=>import("./index-CrhmmIqA.js"),[]).then(t=>t.wallet);case"com.bifrostwallet":return n?u(()=>import("./image-CwCfHO2C.js"),[]).then(t=>t.default):u(()=>import("./index-D4kRIh3X.js"),[]).then(t=>t.wallet);case"jp.co.rakuten-wallet":return n?u(()=>import("./image-CXmskFGu.js"),[]).then(t=>t.default):u(()=>import("./index-DbOEUjNQ.js"),[]).then(t=>t.wallet);case"com.bybit":return n?u(()=>import("./image-CfdpAcNJ.js"),[]).then(t=>t.default):u(()=>import("./index-Ck1HFtJO.js"),[]).then(t=>t.wallet);case"com.blockchain.login":return n?u(()=>import("./image-gZn57b3d.js"),[]).then(t=>t.default):u(()=>import("./index-Bl90M3Oh.js"),[]).then(t=>t.wallet);case"io.trezor":return n?u(()=>import("./image-BW_e3-dJ.js"),[]).then(t=>t.default):u(()=>import("./index-4l3b14FK.js"),[]).then(t=>t.wallet);case"im.token":return n?u(()=>import("./image-B-Cy6KkY.js"),[]).then(t=>t.default):u(()=>import("./index-C-C8iqy7.js"),[]).then(t=>t.wallet);case"global.safe":return n?u(()=>import("./image-DhRoVn_A.js"),[]).then(t=>t.default):u(()=>import("./index-CYWQaahL.js"),[]).then(t=>t.wallet);case"xyz.ctrl":return n?u(()=>import("./image-CtPX3k8b.js"),[]).then(t=>t.default):u(()=>import("./index-sMQpixIY.js"),[]).then(t=>t.wallet);case"co.arculus":return n?u(()=>import("./image-Ck4D7BzK.js"),[]).then(t=>t.default):u(()=>import("./index-C5pmmrHC.js"),[]).then(t=>t.wallet);case"com.roninchain.wallet":return n?u(()=>import("./image-D5eIt9w3.js"),[]).then(t=>t.default):u(()=>import("./index-DoLyLIiv.js"),[]).then(t=>t.wallet);case"com.okex.wallet":return n?u(()=>import("./image-DdS639hK.js"),[]).then(t=>t.default):u(()=>import("./index-DM2yaKtc.js"),[]).then(t=>t.wallet);case"com.wemixplay":return n?u(()=>import("./image-B7qmT8Ca.js"),[]).then(t=>t.default):u(()=>import("./index-qJF1Ni0x.js"),[]).then(t=>t.wallet);case"com.tangem":return n?u(()=>import("./image-DKASljuV.js"),[]).then(t=>t.default):u(()=>import("./index-DPDDihVu.js"),[]).then(t=>t.wallet);case"com.exodus":return n?u(()=>import("./image-Bgjg8hNQ.js"),[]).then(t=>t.default):u(()=>import("./index-CxpTZ-IG.js"),[]).then(t=>t.wallet);case"com.hashpack.wallet":return n?u(()=>import("./image-5Sau-rLk.js"),[]).then(t=>t.default):u(()=>import("./index-CeRPZA_a.js"),[]).then(t=>t.wallet);case"id.co.pintu":return n?u(()=>import("./image-nuAuj_Jk.js"),[]).then(t=>t.default):u(()=>import("./index-KcbqAAb7.js"),[]).then(t=>t.wallet);case"network.blackfort":return n?u(()=>import("./image-C-_OpeOv.js"),[]).then(t=>t.default):u(()=>import("./index-CzCBPhT0.js"),[]).then(t=>t.wallet);case"com.wigwam.wallet":return n?u(()=>import("./image-Cl79QoOA.js"),[]).then(t=>t.default):u(()=>import("./index-y1BukHtY.js"),[]).then(t=>t.wallet);case"app.backpack":return n?u(()=>import("./image-C3CekdMS.js"),[]).then(t=>t.default):u(()=>import("./index-BqfTsh6E.js"),[]).then(t=>t.wallet);case"app.subwallet":return n?u(()=>import("./image-CsXZJdXn.js"),[]).then(t=>t.default):u(()=>import("./index-CHj5uoB4.js"),[]).then(t=>t.wallet);case"cc.avacus":return n?u(()=>import("./image-Bmkur-sE.js"),[]).then(t=>t.default):u(()=>import("./index-D3CZdDyo.js"),[]).then(t=>t.wallet);case"me.rainbow":return n?u(()=>import("./image-CTIN0s1B.js"),[]).then(t=>t.default):u(()=>import("./index-DuYSq0vM.js"),[]).then(t=>t.wallet);case"so.onekey.app.wallet":return n?u(()=>import("./image-CJ_LMWeW.js"),[]).then(t=>t.default):u(()=>import("./index-LtZ_xWcO.js"),[]).then(t=>t.wallet);case"me.haha":return n?u(()=>import("./image-DBVezoYp.js"),[]).then(t=>t.default):u(()=>import("./index-DYjaueYq.js"),[]).then(t=>t.wallet);case"com.bee":return n?u(()=>import("./image-DRTCa3VU.js"),[]).then(t=>t.default):u(()=>import("./index-COyOD9UG.js"),[]).then(t=>t.wallet);case"ag.jup":return n?u(()=>import("./image-wxMjTeKK.js"),[]).then(t=>t.default):u(()=>import("./index-CLuOEfyi.js"),[]).then(t=>t.wallet);case"app.keplr":return n?u(()=>import("./image-CrDo15dd.js"),[]).then(t=>t.default):u(()=>import("./index-qjmsKc9v.js"),[]).then(t=>t.wallet);case"org.hot-labs":return n?u(()=>import("./image-CnHP8wCa.js"),[]).then(t=>t.default):u(()=>import("./index-BBZBr17n.js"),[]).then(t=>t.wallet);case"com.dcentwallet":return n?u(()=>import("./image-DpuchfOi.js"),[]).then(t=>t.default):u(()=>import("./index-BLXzYE6a.js"),[]).then(t=>t.wallet);case"com.kraken":return n?u(()=>import("./image-B3qkm1hD.js"),[]).then(t=>t.default):u(()=>import("./index-Blhav013.js"),[]).then(t=>t.wallet);case"com.kucoin":return n?u(()=>import("./image-CurSdKvd.js"),[]).then(t=>t.default):u(()=>import("./index-B-g1VAOO.js"),[]).then(t=>t.wallet);case"io.magiceden.wallet":return n?u(()=>import("./image-KuSQ9Dwa.js"),[]).then(t=>t.default):u(()=>import("./index-RoCEXaRu.js"),[]).then(t=>t.wallet);case"com.tomi":return n?u(()=>import("./image-DapXhx3l.js"),[]).then(t=>t.default):u(()=>import("./index-BAmym71D.js"),[]).then(t=>t.wallet);case"io.ibvm":return n?u(()=>import("./image-wCxGp5DI.js"),[]).then(t=>t.default):u(()=>import("./index-9urBw4jN.js"),[]).then(t=>t.wallet);case"com.mewwallet":return n?u(()=>import("./image-VMDTb4vT.js"),[]).then(t=>t.default):u(()=>import("./index-DEKXKw0a.js"),[]).then(t=>t.wallet);case"com.socios.app":return n?u(()=>import("./image-TCU-3JIq.js"),[]).then(t=>t.default):u(()=>import("./index-BXMj9soJ.js"),[]).then(t=>t.wallet);case"xyz.argent":return n?u(()=>import("./image--B48iF6N.js"),[]).then(t=>t.default):u(()=>import("./index-K9_ezyO0.js"),[]).then(t=>t.wallet);case"org.thorwallet":return n?u(()=>import("./image-7gNoXkuv.js"),[]).then(t=>t.default):u(()=>import("./index-C3TfYb1F.js"),[]).then(t=>t.wallet);case"io.internetmoney":return n?u(()=>import("./image-g8OkL-iB.js"),[]).then(t=>t.default):u(()=>import("./index-DMVhtS8w.js"),[]).then(t=>t.wallet);case"org.mathwallet":return n?u(()=>import("./image-D0EvVh0U.js"),[]).then(t=>t.default):u(()=>import("./index-DKe_tqaK.js"),[]).then(t=>t.wallet);case"io.cypherhq":return n?u(()=>import("./image-DpEXid6P.js"),[]).then(t=>t.default):u(()=>import("./index-BhkOXeUI.js"),[]).then(t=>t.wallet);case"io.novawallet":return n?u(()=>import("./image-B3Rrn7dP.js"),[]).then(t=>t.default):u(()=>import("./index-B1UaaLNv.js"),[]).then(t=>t.wallet);case"io.yowallet":return n?u(()=>import("./image-DKGPCmzR.js"),[]).then(t=>t.default):u(()=>import("./index-bb2W2i3i.js"),[]).then(t=>t.wallet);case"com.flowfoundation.wallet":return n?u(()=>import("./image-Co_-a15C.js"),[]).then(t=>t.default):u(()=>import("./index-hEFZFzVq.js"),[]).then(t=>t.wallet);case"app.kabila":return n?u(()=>import("./image-B32QPavX.js"),[]).then(t=>t.default):u(()=>import("./index-Dvtv553D.js"),[]).then(t=>t.wallet);case"com.opera":return n?u(()=>import("./image-qbZML0jD.js"),[]).then(t=>t.default):u(()=>import("./index-CgAK97ik.js"),[]).then(t=>t.wallet);case"com.valoraapp":return n?u(()=>import("./image-CtzrXm6T.js"),[]).then(t=>t.default):u(()=>import("./index-HkGLvX7o.js"),[]).then(t=>t.wallet);case"com.robinhood.wallet":return n?u(()=>import("./image-CAiqBiB7.js"),[]).then(t=>t.default):u(()=>import("./index-CUrSGAWv.js"),[]).then(t=>t.wallet);case"com.chain":return n?u(()=>import("./image-DUF566Oh.js"),[]).then(t=>t.default):u(()=>import("./index-hkKPuWG8.js"),[]).then(t=>t.wallet);case"io.huddln":return n?u(()=>import("./image-Rvq3ddXP.js"),[]).then(t=>t.default):u(()=>import("./index-BbFO227e.js"),[]).then(t=>t.wallet);case"app.core.extension":return n?u(()=>import("./image-egfxQb8o.js"),[]).then(t=>t.default):u(()=>import("./index-LNb19jou.js"),[]).then(t=>t.wallet);case"world.freedom":return n?u(()=>import("./image-tsyLyK5O.js"),[]).then(t=>t.default):u(()=>import("./index-kvEY65i6.js"),[]).then(t=>t.wallet);case"money.unstoppable":return n?u(()=>import("./image-BhyLUXmC.js"),[]).then(t=>t.default):u(()=>import("./index-D5HkZlJ0.js"),[]).then(t=>t.wallet);case"pk.modular":return n?u(()=>import("./image-CdPK8hWD.js"),[]).then(t=>t.default):u(()=>import("./index-B_uKoT3A.js"),[]).then(t=>t.wallet);case"app.wombat":return n?u(()=>import("./image-CKVXVlPY.js"),[]).then(t=>t.default):u(()=>import("./index-Cb3GRnFH.js"),[]).then(t=>t.wallet);case"com.klipwallet":return n?u(()=>import("./image-lj2MXbSM.js"),[]).then(t=>t.default):u(()=>import("./index-ivmWWMeT.js"),[]).then(t=>t.wallet);case"com.gemwallet":return n?u(()=>import("./image-BlhMSU_w.js"),[]).then(t=>t.default):u(()=>import("./index-BbblI1cW.js"),[]).then(t=>t.wallet);case"com.sabay.wallet":return n?u(()=>import("./image-BYiwuy-U.js"),[]).then(t=>t.default):u(()=>import("./index-weHMZi5B.js"),[]).then(t=>t.wallet);case"com.zengo":return n?u(()=>import("./image-C8W_4ZM6.js"),[]).then(t=>t.default):u(()=>import("./index-Dy08-O43.js"),[]).then(t=>t.wallet);case"xyz.joeywallet":return n?u(()=>import("./image-CfkILL-h.js"),[]).then(t=>t.default):u(()=>import("./index-CJWMUHO2.js"),[]).then(t=>t.wallet);case"io.tokoin":return n?u(()=>import("./image-BsZmggWw.js"),[]).then(t=>t.default):u(()=>import("./index--a3iuiww.js"),[]).then(t=>t.wallet);case"io.alpha-u.wallet.web":return n?u(()=>import("./image-DRkgy69L.js"),[]).then(t=>t.default):u(()=>import("./index-DhgLjA_l.js"),[]).then(t=>t.wallet);case"network.cvl":return n?u(()=>import("./image-CBk1BMR-.js"),[]).then(t=>t.default):u(()=>import("./index-E_TvYm_u.js"),[]).then(t=>t.wallet);case"io.leapwallet":return n?u(()=>import("./image-C-h7t_1F.js"),[]).then(t=>t.default):u(()=>import("./index-DgG_G6mi.js"),[]).then(t=>t.wallet);case"io.xenea":return n?u(()=>import("./image-DY9y4Zuj.js"),[]).then(t=>t.default):u(()=>import("./index-CSM6DsXg.js"),[]).then(t=>t.wallet);case"com.oasys-wallet":return n?u(()=>import("./image-0WA94JvO.js"),[]).then(t=>t.default):u(()=>import("./index-ZvCZJ82x.js"),[]).then(t=>t.wallet);case"com.bitso":return n?u(()=>import("./image-CyT4cot7.js"),[]).then(t=>t.default):u(()=>import("./index-D4qmgJzl.js"),[]).then(t=>t.wallet);case"io.enjin":return n?u(()=>import("./image-Dbjepryy.js"),[]).then(t=>t.default):u(()=>import("./index-BYkyq-Fh.js"),[]).then(t=>t.wallet);case"com.coldwallet":return n?u(()=>import("./image-Bg5cmMOq.js"),[]).then(t=>t.default):u(()=>import("./index-CCH4Lm0k.js"),[]).then(t=>t.wallet);case"org.creditcoin.app":return n?u(()=>import("./image-D72C3rOt.js"),[]).then(t=>t.default):u(()=>import("./index-Yhb_AR5X.js"),[]).then(t=>t.wallet);case"app.everspace":return n?u(()=>import("./image-ZX9AyZf9.js"),[]).then(t=>t.default):u(()=>import("./index-BSsQ8WTt.js"),[]).then(t=>t.wallet);case"app.zeal":return n?u(()=>import("./image-CXCMuT4A.js"),[]).then(t=>t.default):u(()=>import("./index-Y-7zWyQJ.js"),[]).then(t=>t.wallet);case"app.whitewallet":return n?u(()=>import("./image-Dblzndv0.js"),[]).then(t=>t.default):u(()=>import("./index-R6JShJLJ.js"),[]).then(t=>t.wallet);case"ai.purewallet":return n?u(()=>import("./image-Dq2YJAiu.js"),[]).then(t=>t.default):u(()=>import("./index-CD-c0Pwx.js"),[]).then(t=>t.wallet);case"com.fastex.wallet":return n?u(()=>import("./image-CsDGOmEX.js"),[]).then(t=>t.default):u(()=>import("./index-B3ylAWHD.js"),[]).then(t=>t.wallet);case"io.kriptomat":return n?u(()=>import("./image-OB6MEQB3.js"),[]).then(t=>t.default):u(()=>import("./index-CN5jCnO7.js"),[]).then(t=>t.wallet);case"com.ullapay":return n?u(()=>import("./image-Bg-Ezchh.js"),[]).then(t=>t.default):u(()=>import("./index-D5XbboPy.js"),[]).then(t=>t.wallet);case"io.atomicwallet":return n?u(()=>import("./image-DmF82yDT.js"),[]).then(t=>t.default):u(()=>import("./index-BVz0emY4.js"),[]).then(t=>t.wallet);case"com.pionewallet":return n?u(()=>import("./image-PmH-IhRa.js"),[]).then(t=>t.default):u(()=>import("./index-DcqBR87a.js"),[]).then(t=>t.wallet);case"io.oxalus":return n?u(()=>import("./image-72qBnfEq.js"),[]).then(t=>t.default):u(()=>import("./index-DA-8j4Lu.js"),[]).then(t=>t.wallet);case"xyz.uniultra.wallet":return n?u(()=>import("./image-PE3NuFOk.js"),[]).then(t=>t.default):u(()=>import("./index-BZprotv2.js"),[]).then(t=>t.wallet);case"xyz.frontier.wallet":return n?u(()=>import("./image-Bj3Vau0H.js"),[]).then(t=>t.default):u(()=>import("./index-CKbNEeVv.js"),[]).then(t=>t.wallet);case"com.coolbitx.cwsapp":return n?u(()=>import("./image-DBfe_vfK.js"),[]).then(t=>t.default):u(()=>import("./index-CS_r9DbU.js"),[]).then(t=>t.wallet);case"org.gooddollar":return n?u(()=>import("./image-BOYYXbZD.js"),[]).then(t=>t.default):u(()=>import("./index-D-0oKenN.js"),[]).then(t=>t.wallet);case"com.cakewallet":return n?u(()=>import("./image-H2IFlJwk.js"),[]).then(t=>t.default):u(()=>import("./index-DrxHpbC_.js"),[]).then(t=>t.wallet);case"com.ellipal":return n?u(()=>import("./image-DnrDonCs.js"),[]).then(t=>t.default):u(()=>import("./index-_4gOTVBT.js"),[]).then(t=>t.wallet);case"app.krystal":return n?u(()=>import("./image-DCd2Ym7s.js"),[]).then(t=>t.default):u(()=>import("./index-CWJEGR1b.js"),[]).then(t=>t.wallet);case"com.monarchwallet":return n?u(()=>import("./image-BzMshtv_.js"),[]).then(t=>t.default):u(()=>import("./index-CNtQA9K3.js"),[]).then(t=>t.wallet);case"com.burritowallet":return n?u(()=>import("./image-CLkcT8o9.js"),[]).then(t=>t.default):u(()=>import("./index-DbF84wMV.js"),[]).then(t=>t.wallet);case"co.family.wallet":return n?u(()=>import("./image-CUg3Cnww.js"),[]).then(t=>t.default):u(()=>import("./index-Tn6RRkjq.js"),[]).then(t=>t.wallet);case"com.mtpelerin":return n?u(()=>import("./image-BX0R5Ldt.js"),[]).then(t=>t.default):u(()=>import("./index-raYbXl7C.js"),[]).then(t=>t.wallet);case"app.keyring":return n?u(()=>import("./image-BJTIIH0l.js"),[]).then(t=>t.default):u(()=>import("./index-DK3fb1zE.js"),[]).then(t=>t.wallet);case"cc.localtrade.lab":return n?u(()=>import("./image-BPSy6QXe.js"),[]).then(t=>t.default):u(()=>import("./index-B5YMdPlv.js"),[]).then(t=>t.wallet);case"tech.okto":return n?u(()=>import("./image-DKIjfVu7.js"),[]).then(t=>t.default):u(()=>import("./index-Lowl7Qx7.js"),[]).then(t=>t.wallet);case"com.xcapit":return n?u(()=>import("./image-DhkFzAlB.js"),[]).then(t=>t.default):u(()=>import("./index-D3V2-WKd.js"),[]).then(t=>t.wallet);case"com.gayawallet":return n?u(()=>import("./image-Bz7vfc72.js"),[]).then(t=>t.default):u(()=>import("./index-D98A1qt-.js"),[]).then(t=>t.wallet);case"app.nightly":return n?u(()=>import("./image-BfqQ3_FM.js"),[]).then(t=>t.default):u(()=>import("./index-CMwU9_9b.js"),[]).then(t=>t.wallet);case"com.coin98":return n?u(()=>import("./image-BbnwlM1P.js"),[]).then(t=>t.default):u(()=>import("./index-KBxYL2Hq.js"),[]).then(t=>t.wallet);case"xyz.coca":return n?u(()=>import("./image-BuK74v8C.js"),[]).then(t=>t.default):u(()=>import("./index-_NpfTDRk.js"),[]).then(t=>t.wallet);case"app.linen":return n?u(()=>import("./image-DrSeWkD2.js"),[]).then(t=>t.default):u(()=>import("./index-CxAdVXlx.js"),[]).then(t=>t.wallet);case"dev.auroracloud":return n?u(()=>import("./image-Q84BS-gC.js"),[]).then(t=>t.default):u(()=>import("./index-DCCkUyPX.js"),[]).then(t=>t.wallet);case"com.coinomi":return n?u(()=>import("./image-B2nNrUDP.js"),[]).then(t=>t.default):u(()=>import("./index-CIEKStke.js"),[]).then(t=>t.wallet);case"my.mone":return n?u(()=>import("./image-B_6frjN-.js"),[]).then(t=>t.default):u(()=>import("./index-CWRHM42y.js"),[]).then(t=>t.wallet);case"org.alephium":return n?u(()=>import("./image-Bw4AoMkM.js"),[]).then(t=>t.default):u(()=>import("./index-CWP7CAYR.js"),[]).then(t=>t.wallet);case"com.alicebob":return n?u(()=>import("./image-7ve6a-pZ.js"),[]).then(t=>t.default):u(()=>import("./index-CWcfCu8_.js"),[]).then(t=>t.wallet);case"io.koalawallet":return n?u(()=>import("./image-D_F9G8qf.js"),[]).then(t=>t.default):u(()=>import("./index-DreOZR2Q.js"),[]).then(t=>t.wallet);case"com.veworld":return n?u(()=>import("./image-CHHWDf3g.js"),[]).then(t=>t.default):u(()=>import("./index-DH7rY4T1.js"),[]).then(t=>t.wallet);case"com.withpaper":return n?u(()=>import("./image-CX5Rh8VB.js"),[]).then(t=>t.default):u(()=>import("./index-B_5Z_DKz.js"),[]).then(t=>t.wallet);case"io.noone":return n?u(()=>import("./image-Bd0hgt6c.js"),[]).then(t=>t.default):u(()=>import("./index-C0S3Jw0J.js"),[]).then(t=>t.wallet);case"network.haqq":return n?u(()=>import("./image-CAFLdE57.js"),[]).then(t=>t.default):u(()=>import("./index-BKOOtGSa.js"),[]).then(t=>t.wallet);case"io.ricewallet":return n?u(()=>import("./image-CViScAsQ.js"),[]).then(t=>t.default):u(()=>import("./index-DX2vH8ZR.js"),[]).then(t=>t.wallet);case"me.iopay":return n?u(()=>import("./image-gPjUdZvh.js"),[]).then(t=>t.default):u(()=>import("./index-_j8eviyU.js"),[]).then(t=>t.wallet);case"app.walletnow":return n?u(()=>import("./image-CQQCUqCR.js"),[]).then(t=>t.default):u(()=>import("./index-DIQXVD2E.js"),[]).then(t=>t.wallet);case"io.okse":return n?u(()=>import("./image-Bve_kItK.js"),[]).then(t=>t.default):u(()=>import("./index-DHjyikOS.js"),[]).then(t=>t.wallet);case"network.over":return n?u(()=>import("./image-1Q7meMlv.js"),[]).then(t=>t.default):u(()=>import("./index-CCoUqMcq.js"),[]).then(t=>t.wallet);case"com.aktionariat":return n?u(()=>import("./image-C19BC9_z.js"),[]).then(t=>t.default):u(()=>import("./index-f3TfD4S5.js"),[]).then(t=>t.wallet);case"com.paybolt":return n?u(()=>import("./image-BVxPoHQF.js"),[]).then(t=>t.default):u(()=>import("./index-DA5yAy1K.js"),[]).then(t=>t.wallet);case"com.plasma-wallet":return n?u(()=>import("./image-BoYSclA6.js"),[]).then(t=>t.default):u(()=>import("./index-JKQyAdFy.js"),[]).then(t=>t.wallet);case"org.bytebank":return n?u(()=>import("./image-vBCicR5m.js"),[]).then(t=>t.default):u(()=>import("./index-Bjaz41sN.js"),[]).then(t=>t.wallet);case"io.ethermail":return n?u(()=>import("./image-Dv-zloMU.js"),[]).then(t=>t.default):u(()=>import("./index-D7fJW09r.js"),[]).then(t=>t.wallet);case"com.optowallet":return n?u(()=>import("./image-sEmhdTY-.js"),[]).then(t=>t.default):u(()=>import("./index-3mfJd8aA.js"),[]).then(t=>t.wallet);case"finance.openwallet":return n?u(()=>import("./image-F3HgBsB-.js"),[]).then(t=>t.default):u(()=>import("./index-skREueKQ.js"),[]).then(t=>t.wallet);case"xyz.sequence":return n?u(()=>import("./image-a7JzCm8c.js"),[]).then(t=>t.default):u(()=>import("./index-BNb0BNpv.js"),[]).then(t=>t.wallet);case"com.foxwallet":return n?u(()=>import("./image-ocD-m7Q3.js"),[]).then(t=>t.default):u(()=>import("./index-CO5X7F-R.js"),[]).then(t=>t.wallet);case"app.hbwallet":return n?u(()=>import("./image-DTvFXF0X.js"),[]).then(t=>t.default):u(()=>import("./index-C9KeS2NO.js"),[]).then(t=>t.wallet);case"it.airgap":return n?u(()=>import("./image-DbxthKzd.js"),[]).then(t=>t.default):u(()=>import("./index-BwPT1xVX.js"),[]).then(t=>t.wallet);case"com.holdstation":return n?u(()=>import("./image-BqmoDhq4.js"),[]).then(t=>t.default):u(()=>import("./index-DJowGey-.js"),[]).then(t=>t.wallet);case"io.universaleverything":return n?u(()=>import("./image-Ln3_5Zss.js"),[]).then(t=>t.default):u(()=>import("./index-BCgIOWHy.js"),[]).then(t=>t.wallet);case"com.abra":return n?u(()=>import("./image-D0XkC_cA.js"),[]).then(t=>t.default):u(()=>import("./index-DXWCd209.js"),[]).then(t=>t.wallet);case"org.thepulsewallet":return n?u(()=>import("./image-_ytDCtdN.js"),[]).then(t=>t.default):u(()=>import("./index-BKhtDnEy.js"),[]).then(t=>t.wallet);case"com.premanft":return n?u(()=>import("./image-Cq9CxI0T.js"),[]).then(t=>t.default):u(()=>import("./index-CqG7x8Pr.js"),[]).then(t=>t.wallet);case"xyz.timelesswallet":return n?u(()=>import("./image-D4n4fDBI.js"),[]).then(t=>t.default):u(()=>import("./index-B79hT9zU.js"),[]).then(t=>t.wallet);case"org.bitizen":return n?u(()=>import("./image-Eet5vkQN.js"),[]).then(t=>t.default):u(()=>import("./index-CAbUuCad.js"),[]).then(t=>t.wallet);case"app.ultimate":return n?u(()=>import("./image-1PFF0msR.js"),[]).then(t=>t.default):u(()=>import("./index-DMa3aE-k.js"),[]).then(t=>t.wallet);case"io.compasswallet":return n?u(()=>import("./image-B7f6OOFe.js"),[]).then(t=>t.default):u(()=>import("./index-DWEPmLGL.js"),[]).then(t=>t.wallet);case"app.fizzwallet":return n?u(()=>import("./image-TqYEE834.js"),[]).then(t=>t.default):u(()=>import("./index-USdA4g97.js"),[]).then(t=>t.wallet);case"com.xovawallet":return n?u(()=>import("./image-ac_iWcfz.js"),[]).then(t=>t.default):u(()=>import("./index-DjdLeYmK.js"),[]).then(t=>t.wallet);case"app.nicegram":return n?u(()=>import("./image-CTjG3MUk.js"),[]).then(t=>t.default):u(()=>import("./index-BCjMsn_g.js"),[]).then(t=>t.wallet);case"io.zelcore":return n?u(()=>import("./image-D6CcyX2K.js"),[]).then(t=>t.default):u(()=>import("./index-zbt41C9e.js"),[]).then(t=>t.wallet);case"app.freighter":return n?u(()=>import("./image-ByILNqlH.js"),[]).then(t=>t.default):u(()=>import("./index-ByCnomey.js"),[]).then(t=>t.wallet);case"app.stickey":return n?u(()=>import("./image-BV0ZeCAx.js"),[]).then(t=>t.default):u(()=>import("./index-BHpZ5apY.js"),[]).then(t=>t.wallet);case"app.coinstats":return n?u(()=>import("./image-1uQAVoCP.js"),[]).then(t=>t.default):u(()=>import("./index-CCHSY1Ig.js"),[]).then(t=>t.wallet);case"io.harti":return n?u(()=>import("./image-BmT8QXyE.js"),[]).then(t=>t.default):u(()=>import("./index-CVzxUbsV.js"),[]).then(t=>t.wallet);case"io.dttd":return n?u(()=>import("./image-BLwps_AU.js"),[]).then(t=>t.default):u(()=>import("./index-BKc1f5vZ.js"),[]).then(t=>t.wallet);case"com.tellaw":return n?u(()=>import("./image-F1X0Jqxn.js"),[]).then(t=>t.default):u(()=>import("./index-whsFZACg.js"),[]).then(t=>t.wallet);case"io.klever":return n?u(()=>import("./image-C-jy5_uw.js"),[]).then(t=>t.default):u(()=>import("./index-DyIhQvc9.js"),[]).then(t=>t.wallet);case"com.unstoppabledomains":return n?u(()=>import("./image-CDQQ8H3a.js"),[]).then(t=>t.default):u(()=>import("./index-CEQTfzyW.js"),[]).then(t=>t.wallet);case"is.callback":return n?u(()=>import("./image-GJh-xUBh.js"),[]).then(t=>t.default):u(()=>import("./index-D06yDGlI.js"),[]).then(t=>t.wallet);case"ai.pundi":return n?u(()=>import("./image-ATPgDDWr.js"),[]).then(t=>t.default):u(()=>import("./index-CIqB4GcC.js"),[]).then(t=>t.wallet);case"io.summonersarena":return n?u(()=>import("./image-B9xCKEQ5.js"),[]).then(t=>t.default):u(()=>import("./index-Dj4HncvX.js"),[]).then(t=>t.wallet);case"io.fizen":return n?u(()=>import("./image-B0gwpZUx.js"),[]).then(t=>t.default):u(()=>import("./index-QNOqUF4K.js"),[]).then(t=>t.wallet);case"fi.pillar":return n?u(()=>import("./image-gTlOw189.js"),[]).then(t=>t.default):u(()=>import("./index-B8F2-SGp.js"),[]).then(t=>t.wallet);case"world.ixo":return n?u(()=>import("./image-BPwT6MdF.js"),[]).then(t=>t.default):u(()=>import("./index-VoB5PA0C.js"),[]).then(t=>t.wallet);case"org.thetatoken":return n?u(()=>import("./image-Dts-dWM_.js"),[]).then(t=>t.default):u(()=>import("./index-C28bWeia.js"),[]).then(t=>t.wallet);case"net.gateweb3":return n?u(()=>import("./image-CGjM8vV0.js"),[]).then(t=>t.default):u(()=>import("./index-CfvJYRh3.js"),[]).then(t=>t.wallet);case"app.ammer":return n?u(()=>import("./image-DCe7pzXg.js"),[]).then(t=>t.default):u(()=>import("./index-C_0gheI4.js"),[]).then(t=>t.wallet);case"us.binance":return n?u(()=>import("./image-DO0rKwK5.js"),[]).then(t=>t.default):u(()=>import("./index-CsOh37JV.js"),[]).then(t=>t.wallet);case"io.yusetoken":return n?u(()=>import("./image-BkXrnCqT.js"),[]).then(t=>t.default):u(()=>import("./index-DSfHTVO4.js"),[]).then(t=>t.wallet);case"co.muza":return n?u(()=>import("./image-Ck3Eh6O7.js"),[]).then(t=>t.default):u(()=>import("./index-BemdfzPz.js"),[]).then(t=>t.wallet);case"io.hyperpay":return n?u(()=>import("./image-BGGL-U5y.js"),[]).then(t=>t.default):u(()=>import("./index-CZ1QIkWn.js"),[]).then(t=>t.wallet);case"io.cosmostation":return n?u(()=>import("./image-CQvGfQex.js"),[]).then(t=>t.default):u(()=>import("./index-DjjVwGb1.js"),[]).then(t=>t.wallet);case"app.ryipay":return n?u(()=>import("./image-BHsLcCY-.js"),[]).then(t=>t.default):u(()=>import("./index-CqsWR9GD.js"),[]).then(t=>t.wallet);case"io.wallet3":return n?u(()=>import("./image-C5BUR1H0.js"),[]).then(t=>t.default):u(()=>import("./index-B1EcH1c7.js"),[]).then(t=>t.wallet);case"org.dota168":return n?u(()=>import("./image-DTI3p9-Y.js"),[]).then(t=>t.default):u(()=>import("./index-DQzq_sef.js"),[]).then(t=>t.wallet);case"com.bitpie":return n?u(()=>import("./image-C_d1pRRI.js"),[]).then(t=>t.default):u(()=>import("./index-B18M8pMG.js"),[]).then(t=>t.wallet);case"com.coininn":return n?u(()=>import("./image-o13bTCjN.js"),[]).then(t=>t.default):u(()=>import("./index-Bh_-A7Ja.js"),[]).then(t=>t.wallet);case"me.easy":return n?u(()=>import("./image-DTBDlZkw.js"),[]).then(t=>t.default):u(()=>import("./index-CCcCf_zM.js"),[]).then(t=>t.wallet);case"io.shido":return n?u(()=>import("./image-BcFBvVbI.js"),[]).then(t=>t.default):u(()=>import("./index-DsAnwcI8.js"),[]).then(t=>t.wallet);case"com.neonwallet":return n?u(()=>import("./image-ioijj4TO.js"),[]).then(t=>t.default):u(()=>import("./index-BzHMIBCY.js"),[]).then(t=>t.wallet);case"com.secuxtech":return n?u(()=>import("./image-u8DQucgw.js"),[]).then(t=>t.default):u(()=>import("./index-X6Icwh-t.js"),[]).then(t=>t.wallet);case"com.unitywallet":return n?u(()=>import("./image-DarW8a9S.js"),[]).then(t=>t.default):u(()=>import("./index-CHtlbymW.js"),[]).then(t=>t.wallet);case"io.miraiapp":return n?u(()=>import("./image-C7KIwDbC.js"),[]).then(t=>t.default):u(()=>import("./index-CJUw-x2B.js"),[]).then(t=>t.wallet);case"com.beexo":return n?u(()=>import("./image-BxnxblQ1.js"),[]).then(t=>t.default):u(()=>import("./index-D3-ragvp.js"),[]).then(t=>t.wallet);case"social.halo":return n?u(()=>import("./image-CyB_F_3i.js"),[]).then(t=>t.default):u(()=>import("./index-BrmfNCsT.js"),[]).then(t=>t.wallet);case"com.gemspocket":return n?u(()=>import("./image-D-u8N4-J.js"),[]).then(t=>t.default):u(()=>import("./index-Cu7IM6b-.js"),[]).then(t=>t.wallet);case"app.status":return n?u(()=>import("./image-BHWhxIRJ.js"),[]).then(t=>t.default):u(()=>import("./index-uBBwnPjF.js"),[]).then(t=>t.wallet);case"com.midoin":return n?u(()=>import("./image-CIV6mRvx.js"),[]).then(t=>t.default):u(()=>import("./index-CocmFQPB.js"),[]).then(t=>t.wallet);case"id.competence":return n?u(()=>import("./image-Bvz63dRa.js"),[]).then(t=>t.default):u(()=>import("./index-BLJlEky2.js"),[]).then(t=>t.wallet);case"com.safemoon":return n?u(()=>import("./image-CAb3G_S1.js"),[]).then(t=>t.default):u(()=>import("./index-DiywNzXF.js"),[]).then(t=>t.wallet);case"llc.besc":return n?u(()=>import("./image-Ceksqz1-.js"),[]).then(t=>t.default):u(()=>import("./index-BxdOFUPP.js"),[]).then(t=>t.wallet);case"baby.smart":return n?u(()=>import("./image-DRIx4y_P.js"),[]).then(t=>t.default):u(()=>import("./index-CNMUmwOO.js"),[]).then(t=>t.wallet);case"app.onto":return n?u(()=>import("./image-Bt794qKF.js"),[]).then(t=>t.default):u(()=>import("./index-BDZlq0qh.js"),[]).then(t=>t.wallet);case"com.ivirse":return n?u(()=>import("./image-UedJVRUu.js"),[]).then(t=>t.default):u(()=>import("./index-BDxaD6BF.js"),[]).then(t=>t.wallet);case"one.mixin.messenger":return n?u(()=>import("./image-D3W98SRi.js"),[]).then(t=>t.default):u(()=>import("./index-D3xs2XN5.js"),[]).then(t=>t.wallet);case"cash.abpay":return n?u(()=>import("./image-BIXNfpi0.js"),[]).then(t=>t.default):u(()=>import("./index-Q0EiqGJA.js"),[]).then(t=>t.wallet);case"ch.dssecurity":return n?u(()=>import("./image-yTAVsfm3.js"),[]).then(t=>t.default):u(()=>import("./index-C_xRuElA.js"),[]).then(t=>t.wallet);case"com.concordium.wallet":return n?u(()=>import("./image-ZwVZp8I-.js"),[]).then(t=>t.default):u(()=>import("./index-DRMQsmmg.js"),[]).then(t=>t.wallet);case"io.zkape":return n?u(()=>import("./image-Y1vaco4M.js"),[]).then(t=>t.default):u(()=>import("./index-DVU2i8-9.js"),[]).then(t=>t.wallet);case"com.paliwallet":return n?u(()=>import("./image-CqwlZgVk.js"),[]).then(t=>t.default):u(()=>import("./index-CMLf1O57.js"),[]).then(t=>t.wallet);case"io.pitaka":return n?u(()=>import("./image-DrYWWKEd.js"),[]).then(t=>t.default):u(()=>import("./index-Cnl_JyCd.js"),[]).then(t=>t.wallet);case"com.saitamatoken":return n?u(()=>import("./image-CAyyni45.js"),[]).then(t=>t.default):u(()=>import("./index-DHDeZN7S.js"),[]).then(t=>t.wallet);case"org.mugambo":return n?u(()=>import("./image-CAO8bP71.js"),[]).then(t=>t.default):u(()=>import("./index-Dhf5ESfd.js"),[]).then(t=>t.wallet);case"fi.stablez":return n?u(()=>import("./image-2gXaVQKJ.js"),[]).then(t=>t.default):u(()=>import("./index-Y-iqvqQm.js"),[]).then(t=>t.wallet);case"io.legacynetwork":return n?u(()=>import("./image-BOsaNxhb.js"),[]).then(t=>t.default):u(()=>import("./index-DQgBEjQv.js"),[]).then(t=>t.wallet);case"com.meld.app":return n?u(()=>import("./image-Bu5z-R3j.js"),[]).then(t=>t.default):u(()=>import("./index-vIU3bmo3.js"),[]).then(t=>t.wallet);case"io.bladewallet":return n?u(()=>import("./image-BriecT_A.js"),[]).then(t=>t.default):u(()=>import("./index-B1lRIgux.js"),[]).then(t=>t.wallet);case"com.authentrend":return n?u(()=>import("./image-Bt0VMJN5.js"),[]).then(t=>t.default):u(()=>import("./index-COjO7y4b.js"),[]).then(t=>t.wallet);case"com.webauth":return n?u(()=>import("./image-DSJKsPTa.js"),[]).then(t=>t.default):u(()=>import("./index-DDY5PRF0.js"),[]).then(t=>t.wallet);case"xyz.tucop":return n?u(()=>import("./image-BB74R1v0.js"),[]).then(t=>t.default):u(()=>import("./index-BEvs-KDU.js"),[]).then(t=>t.wallet);case"pro.fintoken":return n?u(()=>import("./image-DFJ9V7d6.js"),[]).then(t=>t.default):u(()=>import("./index-BUPzw_YU.js"),[]).then(t=>t.wallet);case"io.nash":return n?u(()=>import("./image-VX9kj-L4.js"),[]).then(t=>t.default):u(()=>import("./index-DLIbM3lV.js"),[]).then(t=>t.wallet);case"vc.uincubator.api":return n?u(()=>import("./image-C-l2o06T.js"),[]).then(t=>t.default):u(()=>import("./index-3b4FPnNt.js"),[]).then(t=>t.wallet);case"io.unagi.unawallet":return n?u(()=>import("./image-BbMnRQvP.js"),[]).then(t=>t.default):u(()=>import("./index-CCMe_tjP.js"),[]).then(t=>t.wallet);case"io.nonbank":return n?u(()=>import("./image-Balnt-Cz.js"),[]).then(t=>t.default):u(()=>import("./index-BgNRU-e0.js"),[]).then(t=>t.wallet);case"io.armana.portal":return n?u(()=>import("./image-2TZb5wm0.js"),[]).then(t=>t.default):u(()=>import("./index-bXsRal1P.js"),[]).then(t=>t.wallet);case"com.x9wallet":return n?u(()=>import("./image-B3vFiCTL.js"),[]).then(t=>t.default):u(()=>import("./index-rngE6ltw.js"),[]).then(t=>t.wallet);case"io.kigo":return n?u(()=>import("./image-0Rb-Alqp.js"),[]).then(t=>t.default):u(()=>import("./index-Bp51oEV0.js"),[]).then(t=>t.wallet);case"com.alphawallet":return n?u(()=>import("./image-keSuKx3L.js"),[]).then(t=>t.default):u(()=>import("./index-CNUn3cep.js"),[]).then(t=>t.wallet);case"com.getcogni":return n?u(()=>import("./image-Obx6ILaM.js"),[]).then(t=>t.default):u(()=>import("./index-CVbWxVgo.js"),[]).then(t=>t.wallet);case"app.sinum":return n?u(()=>import("./image-BZqe_XdR.js"),[]).then(t=>t.default):u(()=>import("./index-Cw_t_6u-.js"),[]).then(t=>t.wallet);case"finance.soulswap.app":return n?u(()=>import("./image-BcwKGbKI.js"),[]).then(t=>t.default):u(()=>import("./index-DzZiRHPP.js"),[]).then(t=>t.wallet);case"io.loopring.wallet":return n?u(()=>import("./image-BW8rKOXQ.js"),[]).then(t=>t.default):u(()=>import("./index-BBSqe2Yu.js"),[]).then(t=>t.wallet);case"com.shapeshift":return n?u(()=>import("./image-CkzfH2rK.js"),[]).then(t=>t.default):u(()=>import("./index-iIYRP3A2.js"),[]).then(t=>t.wallet);case"io.trinity-tech":return n?u(()=>import("./image-B9EV7DkB.js"),[]).then(t=>t.default):u(()=>import("./index-DA2atyII.js"),[]).then(t=>t.wallet);case"money.keychain":return n?u(()=>import("./image-D-N6lJzn.js"),[]).then(t=>t.default):u(()=>import("./index-DyKMC2z8.js"),[]).then(t=>t.wallet);case"com.superhero.cordova":return n?u(()=>import("./image-CF0jVIb9.js"),[]).then(t=>t.default):u(()=>import("./index-BGXhyrjQ.js"),[]).then(t=>t.wallet);case"com.bettatrade":return n?u(()=>import("./image-6D1EQPfl.js"),[]).then(t=>t.default):u(()=>import("./index-QgklQrvI.js"),[]).then(t=>t.wallet);case"online.puzzle":return n?u(()=>import("./image-DR_z7tXV.js"),[]).then(t=>t.default):u(()=>import("./index-CUruswiz.js"),[]).then(t=>t.wallet);case"gg.indi":return n?u(()=>import("./image-CzDMlkmp.js"),[]).then(t=>t.default):u(()=>import("./index-B82mCN3i.js"),[]).then(t=>t.wallet);case"io.tradestrike":return n?u(()=>import("./image-S1B0Gp4I.js"),[]).then(t=>t.default):u(()=>import("./index-C9QluAH0.js"),[]).then(t=>t.wallet);case"xyz.echooo":return n?u(()=>import("./image-D-l0_TY5.js"),[]).then(t=>t.default):u(()=>import("./index-DiYqUBGF.js"),[]).then(t=>t.wallet);case"com.kryptogo":return n?u(()=>import("./image-BzcRZ3z_.js"),[]).then(t=>t.default):u(()=>import("./index-Bi3gSOdz.js"),[]).then(t=>t.wallet);case"io.trustasset":return n?u(()=>import("./image-D7kLqgEy.js"),[]).then(t=>t.default):u(()=>import("./index-DDOKzdz4.js"),[]).then(t=>t.wallet);case"app.utorg":return n?u(()=>import("./image-CYPCjBfV.js"),[]).then(t=>t.default):u(()=>import("./index-DFMDLTUW.js"),[]).then(t=>t.wallet);case"app.dfinnwallet":return n?u(()=>import("./image-Brf-M6Eo.js"),[]).then(t=>t.default):u(()=>import("./index-DMB3d6tz.js"),[]).then(t=>t.wallet);case"org.rezor":return n?u(()=>import("./image-DP3-AKgU.js"),[]).then(t=>t.default):u(()=>import("./index-Bd679tWT.js"),[]).then(t=>t.wallet);case"io.legionnetwork":return n?u(()=>import("./image-DhEatMPL.js"),[]).then(t=>t.default):u(()=>import("./index-CmL6gP_y.js"),[]).then(t=>t.wallet);case"cc.maxwallet":return n?u(()=>import("./image-pWd800uA.js"),[]).then(t=>t.default):u(()=>import("./index-BtXf6MK9.js"),[]).then(t=>t.wallet);case"com.ripio":return n?u(()=>import("./image-Ch_ktfcX.js"),[]).then(t=>t.default):u(()=>import("./index-Bj2cV2cj.js"),[]).then(t=>t.wallet);case"com.fxwallet":return n?u(()=>import("./image-BXDrqmSz.js"),[]).then(t=>t.default):u(()=>import("./index-rm_ORFAd.js"),[]).then(t=>t.wallet);case"inc.tomo":return n?u(()=>import("./image-DyAVMMp6.js"),[]).then(t=>t.default):u(()=>import("./index-Cca-XDRc.js"),[]).then(t=>t.wallet);case"me.komet.app":return n?u(()=>import("./image-DzEk34N9.js"),[]).then(t=>t.default):u(()=>import("./index-d1Bi4Y3G.js"),[]).then(t=>t.wallet);case"io.guardiianwallet":return n?u(()=>import("./image-AC1H6ZPE.js"),[]).then(t=>t.default):u(()=>import("./index-BWc71RqF.js"),[]).then(t=>t.wallet);case"io.hacken.hai":return n?u(()=>import("./image-Dnxw18r0.js"),[]).then(t=>t.default):u(()=>import("./index-DrVtwvSv.js"),[]).then(t=>t.wallet);case"com.zypto":return n?u(()=>import("./image-DKzTIzax.js"),[]).then(t=>t.default):u(()=>import("./index-C7MfWFoK.js"),[]).then(t=>t.wallet);case"io.nabox":return n?u(()=>import("./image-DBRyH_Rh.js"),[]).then(t=>t.default):u(()=>import("./index-DNfPkY9K.js"),[]).then(t=>t.wallet);case"com.tastycrypto":return n?u(()=>import("./image-eNFpMOAS.js"),[]).then(t=>t.default):u(()=>import("./index-Dzz3Ux1P.js"),[]).then(t=>t.wallet);case"com.ballet":return n?u(()=>import("./image-BO752L4A.js"),[]).then(t=>t.default):u(()=>import("./index-DmZNtM-R.js"),[]).then(t=>t.wallet);case"io.talken":return n?u(()=>import("./image-DNK-Wi5D.js"),[]).then(t=>t.default):u(()=>import("./index-CjviSBad.js"),[]).then(t=>t.wallet);case"io.wallacy":return n?u(()=>import("./image-BenqI60j.js"),[]).then(t=>t.default):u(()=>import("./index-CZ_a5e1G.js"),[]).then(t=>t.wallet);case"network.mrhb":return n?u(()=>import("./image-CqMUpFKn.js"),[]).then(t=>t.default):u(()=>import("./index-D5OfgCAv.js"),[]).then(t=>t.wallet);case"io.pockie":return n?u(()=>import("./image-DZnDK-Xj.js"),[]).then(t=>t.default):u(()=>import("./index-Bk7uX5j_.js"),[]).then(t=>t.wallet);case"me.astrox":return n?u(()=>import("./image-CBEV_Ymj.js"),[]).then(t=>t.default):u(()=>import("./index-C3gWBSK8.js"),[]).then(t=>t.wallet);case"com.thirdweb":return n?u(()=>import("./image-T5Lr0jNA.js"),[]).then(t=>t.default):u(()=>import("./index-DsKtpcc2.js"),[]).then(t=>t.wallet);case"com.poolsmobility.wallet":return n?u(()=>import("./image-VRkR1FSv.js"),[]).then(t=>t.default):u(()=>import("./index-CPsQ8NHN.js"),[]).then(t=>t.wallet);case"xyz.roam.wallet":return n?u(()=>import("./image-CJoENcT7.js"),[]).then(t=>t.default):u(()=>import("./index-CMXgyf5r.js"),[]).then(t=>t.wallet);case"app.gamic":return n?u(()=>import("./image-JETMQh4S.js"),[]).then(t=>t.default):u(()=>import("./index-DdQ2QlTJ.js"),[]).then(t=>t.wallet);case"app.m1nty":return n?u(()=>import("./image-DueZWGGJ.js"),[]).then(t=>t.default):u(()=>import("./index-DJ38lxUa.js"),[]).then(t=>t.wallet);case"network.trustkeys":return n?u(()=>import("./image-CoVfVQ2N.js"),[]).then(t=>t.default):u(()=>import("./index-D9OjbU6W.js"),[]).then(t=>t.wallet);case"com.caesiumlab":return n?u(()=>import("./image-CqVlNOfi.js"),[]).then(t=>t.default):u(()=>import("./index-N_5htzMA.js"),[]).then(t=>t.wallet);case"app.catecoin":return n?u(()=>import("./image-D8LYDHPh.js"),[]).then(t=>t.default):u(()=>import("./index-fLuuaL2F.js"),[]).then(t=>t.wallet);case"com.hootark":return n?u(()=>import("./image-FsYj6Ipw.js"),[]).then(t=>t.default):u(()=>import("./index-4Gkxn9a_.js"),[]).then(t=>t.wallet);case"com.crossmint":return n?u(()=>import("./image-Csi8zv8i.js"),[]).then(t=>t.default):u(()=>import("./index-DGbXzX8-.js"),[]).then(t=>t.wallet);case"com.coincircle":return n?u(()=>import("./image-CZoAF_IO.js"),[]).then(t=>t.default):u(()=>import("./index-DaqgY28G.js"),[]).then(t=>t.wallet);case"io.bharatbox":return n?u(()=>import("./image-CE5zhWMG.js"),[]).then(t=>t.default):u(()=>import("./index-C1HmbNh1.js"),[]).then(t=>t.wallet);case"nl.greenhood.wallet":return n?u(()=>import("./image-DcHAlJFf.js"),[]).then(t=>t.default):u(()=>import("./index-CI0o0_5P.js"),[]).then(t=>t.wallet);case"co.swopme":return n?u(()=>import("./image-B5zGMb7x.js"),[]).then(t=>t.default):u(()=>import("./index-Kpt7iZg5.js"),[]).then(t=>t.wallet);case"com.kresus":return n?u(()=>import("./image-B9i2YHdN.js"),[]).then(t=>t.default):u(()=>import("./index-DhvSUS0J.js"),[]).then(t=>t.wallet);case"com.dolletwallet":return n?u(()=>import("./image-9mjTTt3Y.js"),[]).then(t=>t.default):u(()=>import("./index-DQv3qKxR.js"),[]).then(t=>t.wallet);case"net.shinobi-wallet":return n?u(()=>import("./image-DU8NyouV.js"),[]).then(t=>t.default):u(()=>import("./index-CpizqJi3.js"),[]).then(t=>t.wallet);case"com.azcoiner":return n?u(()=>import("./image-BPo0OIev.js"),[]).then(t=>t.default):u(()=>import("./index-C01qJiwG.js"),[]).then(t=>t.wallet);case"com.passwallet.app":return n?u(()=>import("./image-A5Pisxzq.js"),[]).then(t=>t.default):u(()=>import("./index-CHGmRGs1.js"),[]).then(t=>t.wallet);case"app.qubic.wallet":return n?u(()=>import("./image-CVijw__b.js"),[]).then(t=>t.default):u(()=>import("./index-cXlHoOhe.js"),[]).then(t=>t.wallet);case"com.coinex.wallet":return n?u(()=>import("./image-B9-WC9qz.js"),[]).then(t=>t.default):u(()=>import("./index-CLmRyFMq.js"),[]).then(t=>t.wallet);case"app.xverse":return n?u(()=>import("./image-D1LhuZVG.js"),[]).then(t=>t.default):u(()=>import("./index-DFgt2jBx.js"),[]).then(t=>t.wallet);case"com.flash-wallet":return n?u(()=>import("./image-BaHqSwQx.js"),[]).then(t=>t.default):u(()=>import("./index-BUFTsMrI.js"),[]).then(t=>t.wallet);case"com.vgxfoundation":return n?u(()=>import("./image-B33xp9CQ.js"),[]).then(t=>t.default):u(()=>import("./index-DwgGCnoU.js"),[]).then(t=>t.wallet);case"org.arianee":return n?u(()=>import("./image-AczLW1TP.js"),[]).then(t=>t.default):u(()=>import("./index-Jtyxv-aY.js"),[]).then(t=>t.wallet);case"io.myabcwallet":return n?u(()=>import("./image-DraNAXbA.js"),[]).then(t=>t.default):u(()=>import("./index-3Cvg-OXh.js"),[]).then(t=>t.wallet);case"io.owallet":return n?u(()=>import("./image-AK02cNa4.js"),[]).then(t=>t.default):u(()=>import("./index-BhCLT0ad.js"),[]).then(t=>t.wallet);case"io.zelus":return n?u(()=>import("./image-BZaRgIwq.js"),[]).then(t=>t.default):u(()=>import("./index-CeX49D2O.js"),[]).then(t=>t.wallet);case"net.myrenegade":return n?u(()=>import("./image-DqZNaegF.js"),[]).then(t=>t.default):u(()=>import("./index-B0wYo_zG.js"),[]).then(t=>t.wallet);case"io.clingon":return n?u(()=>import("./image-DYpL4EaL.js"),[]).then(t=>t.default):u(()=>import("./index-CnESNHyu.js"),[]).then(t=>t.wallet);case"com.icewal":return n?u(()=>import("./image-0QbZculn.js"),[]).then(t=>t.default):u(()=>import("./index-Dyr2ZfAb.js"),[]).then(t=>t.wallet);case"io.streakk":return n?u(()=>import("./image-BylgX2RN.js"),[]).then(t=>t.default):u(()=>import("./index-D5zmTuuZ.js"),[]).then(t=>t.wallet);case"com.dokwallet":return n?u(()=>import("./image-BxZLlxGO.js"),[]).then(t=>t.default):u(()=>import("./index-DWUn3xTJ.js"),[]).then(t=>t.wallet);case"finance.porta":return n?u(()=>import("./image-DS02lLXY.js"),[]).then(t=>t.default):u(()=>import("./index-BZcoU6Z0.js"),[]).then(t=>t.wallet);case"io.prettygood.x":return n?u(()=>import("./image-W4tnKhU5.js"),[]).then(t=>t.default):u(()=>import("./index-IVGt0iH4.js"),[]).then(t=>t.wallet);case"io.earthwallet":return n?u(()=>import("./image-B6eNElEj.js"),[]).then(t=>t.default):u(()=>import("./index-DYoxAMAI.js"),[]).then(t=>t.wallet);case"net.spatium.wallet":return n?u(()=>import("./image-BZAeII_Q.js"),[]).then(t=>t.default):u(()=>import("./index-CRpuavSs.js"),[]).then(t=>t.wallet);case"live.superex":return n?u(()=>import("./image-xqIoPugN.js"),[]).then(t=>t.default):u(()=>import("./index-CDSsehUH.js"),[]).then(t=>t.wallet);case"com.adftechnology":return n?u(()=>import("./image-COolNucr.js"),[]).then(t=>t.default):u(()=>import("./index-Cw_4ZjJn.js"),[]).then(t=>t.wallet);case"com.bscecowallet":return n?u(()=>import("./image-DmVdrg9x.js"),[]).then(t=>t.default):u(()=>import("./index-DphUbohB.js"),[]).then(t=>t.wallet);case"io.wallypto":return n?u(()=>import("./image-Bgyn7Edx.js"),[]).then(t=>t.default):u(()=>import("./index-3Hrik3MN.js"),[]).then(t=>t.wallet);case"com.reown":return n?u(()=>import("./image-BC-ISwXb.js"),[]).then(t=>t.default):u(()=>import("./index-CQYWT8jy.js"),[]).then(t=>t.wallet);case"finance.voltage":return n?u(()=>import("./image-BvknIf7o.js"),[]).then(t=>t.default):u(()=>import("./index-DwI6Aho1.js"),[]).then(t=>t.wallet);case"com.walletconnect":return n?u(()=>import("./image-nGg2NUr5.js"),[]).then(t=>t.default):u(()=>import("./index-wECDJ3NE.js"),[]).then(t=>t.wallet);case"io.passpay":return n?u(()=>import("./image-CG2L-E9e.js"),[]).then(t=>t.default):u(()=>import("./index-BpHRNVJq.js"),[]).then(t=>t.wallet);case"technology.obvious":return n?u(()=>import("./image-BN9yS9ct.js"),[]).then(t=>t.default):u(()=>import("./index-DdpNYj5B.js"),[]).then(t=>t.wallet);case"io.plutope":return n?u(()=>import("./image-bx7t2tFM.js"),[]).then(t=>t.default):u(()=>import("./index-i5HAwWW2.js"),[]).then(t=>t.wallet);case"io.buzz-up":return n?u(()=>import("./image-YrUQjQfX.js"),[]).then(t=>t.default):u(()=>import("./index-DoEa8sok.js"),[]).then(t=>t.wallet);case"co.xellar":return n?u(()=>import("./image-D89rnuSD.js"),[]).then(t=>t.default):u(()=>import("./index-TVPnfEz9.js"),[]).then(t=>t.wallet);case"com.kaxaa":return n?u(()=>import("./image-DJWswcCh.js"),[]).then(t=>t.default):u(()=>import("./index-DxaY4K6c.js"),[]).then(t=>t.wallet);case"org.shefi":return n?u(()=>import("./image-DDvpwoJM.js"),[]).then(t=>t.default):u(()=>import("./index-BF0upGcQ.js"),[]).then(t=>t.wallet);case"xyz.orion":return n?u(()=>import("./image-Cj-WnBuG.js"),[]).then(t=>t.default):u(()=>import("./index-Byy_fx6M.js"),[]).then(t=>t.wallet);case"world.dosi.vault":return n?u(()=>import("./image-CTIpcfmx.js"),[]).then(t=>t.default):u(()=>import("./index-C7Y-Vt-H.js"),[]).then(t=>t.wallet);case"network.gridlock":return n?u(()=>import("./image-DCu5LmP3.js"),[]).then(t=>t.default):u(()=>import("./index-DfOp93tH.js"),[]).then(t=>t.wallet);case"finance.plena":return n?u(()=>import("./image-QiSwBpPD.js"),[]).then(t=>t.default):u(()=>import("./index-DsKyOM-e.js"),[]).then(t=>t.wallet);case"cc.dropp":return n?u(()=>import("./image-Bh9RaAFE.js"),[]).then(t=>t.default):u(()=>import("./index-DwvFwGye.js"),[]).then(t=>t.wallet);case"io.scramberry":return n?u(()=>import("./image-DG2A0pp3.js"),[]).then(t=>t.default):u(()=>import("./index-OxTQHzjd.js"),[]).then(t=>t.wallet);case"xyz.bonuz":return n?u(()=>import("./image-BlxEEUgA.js"),[]).then(t=>t.default):u(()=>import("./index-DW3P0esM.js"),[]).then(t=>t.wallet);case"com.bmawallet":return n?u(()=>import("./image-B29oqZFQ.js"),[]).then(t=>t.default):u(()=>import("./index-DG_CsZ_L.js"),[]).then(t=>t.wallet);case"co.lifedefi":return n?u(()=>import("./image-Cacm9krt.js"),[]).then(t=>t.default):u(()=>import("./index-BV6FLPiR.js"),[]).then(t=>t.wallet);case"com.get-verso":return n?u(()=>import("./image-C1H-7cB7.js"),[]).then(t=>t.default):u(()=>import("./index-DGzea1yQ.js"),[]).then(t=>t.wallet);case"io.blocto":return n?u(()=>import("./image-mtAAp4l3.js"),[]).then(t=>t.default):u(()=>import("./index-Cyniq_vs.js"),[]).then(t=>t.wallet);case"com.pandoshi":return n?u(()=>import("./image-DBTtOr0A.js"),[]).then(t=>t.default):u(()=>import("./index-DhglES_R.js"),[]).then(t=>t.wallet);case"io.getclave":return n?u(()=>import("./image-Cj5FK2LF.js"),[]).then(t=>t.default):u(()=>import("./index-VhOPKpLQ.js"),[]).then(t=>t.wallet);case"technology.jambo":return n?u(()=>import("./image-bGkpV8Yz.js"),[]).then(t=>t.default):u(()=>import("./index-zY1FByDs.js"),[]).then(t=>t.wallet);case"app.edge":return n?u(()=>import("./image-DMShxJ4p.js"),[]).then(t=>t.default):u(()=>import("./index-bnomx8Dl.js"),[]).then(t=>t.wallet);case"io.banksocial":return n?u(()=>import("./image-C4kRcwMC.js"),[]).then(t=>t.default):u(()=>import("./index-Ccilo5se.js"),[]).then(t=>t.wallet);case"io.konio":return n?u(()=>import("./image-BnnBPaYj.js"),[]).then(t=>t.default):u(()=>import("./index-CWMJI89u.js"),[]).then(t=>t.wallet);case"com.qubetics":return n?u(()=>import("./image-BoPDznhr.js"),[]).then(t=>t.default):u(()=>import("./index-FAz89-B7.js"),[]).then(t=>t.wallet);case"app.imem":return n?u(()=>import("./image-DU11lzrk.js"),[]).then(t=>t.default):u(()=>import("./index-qqhEcO_P.js"),[]).then(t=>t.wallet);case"com.purechain":return n?u(()=>import("./image-D9EUqNLw.js"),[]).then(t=>t.default):u(()=>import("./index-y-fv5WSz.js"),[]).then(t=>t.wallet);case"io.ethos":return n?u(()=>import("./image-DEWYzY44.js"),[]).then(t=>t.default):u(()=>import("./index-C_QhTFPr.js"),[]).then(t=>t.wallet);case"io.didwallet":return n?u(()=>import("./image-DD3TEXBm.js"),[]).then(t=>t.default):u(()=>import("./index-Bg6yFg1o.js"),[]).then(t=>t.wallet);case"com.dextrade":return n?u(()=>import("./image-D2pp6L6Y.js"),[]).then(t=>t.default):u(()=>import("./index-CMZLDlaA.js"),[]).then(t=>t.wallet);case"org.kelp":return n?u(()=>import("./image-DW-QsWzn.js"),[]).then(t=>t.default):u(()=>import("./index-DGIafVOM.js"),[]).then(t=>t.wallet);case"xyz.nestwallet":return n?u(()=>import("./image-ClMsEpOA.js"),[]).then(t=>t.default):u(()=>import("./index-DovxLsNV.js"),[]).then(t=>t.wallet);case"com.cryptnox":return n?u(()=>import("./image-D3yhzjwN.js"),[]).then(t=>t.default):u(()=>import("./index-DAvwKHX9.js"),[]).then(t=>t.wallet);case"land.liker":return n?u(()=>import("./image-jU3weE_L.js"),[]).then(t=>t.default):u(()=>import("./index-B5oClu2g.js"),[]).then(t=>t.wallet);case"io.hippowallet":return n?u(()=>import("./image-Ua30yTgk.js"),[]).then(t=>t.default):u(()=>import("./index-N8lMWapZ.js"),[]).then(t=>t.wallet);case"io.certhis":return n?u(()=>import("./image-DdhciWs2.js"),[]).then(t=>t.default):u(()=>import("./index-DhlU5IqG.js"),[]).then(t=>t.wallet);case"io.safecryptowallet":return n?u(()=>import("./image-CggT8fcC.js"),[]).then(t=>t.default):u(()=>import("./index-CeoeXAWS.js"),[]).then(t=>t.wallet);case"com.saify":return n?u(()=>import("./image-D9BJV0RO.js"),[]).then(t=>t.default):u(()=>import("./index-qfQgSHHm.js"),[]).then(t=>t.wallet);case"com.tiduswallet":return n?u(()=>import("./image-B94WiSPl.js"),[]).then(t=>t.default):u(()=>import("./index-5MfyGNXX.js"),[]).then(t=>t.wallet);case"io.uptn.dapp-web":return n?u(()=>import("./image-Bx8CuGbg.js"),[]).then(t=>t.default):u(()=>import("./index-Bf6aVU23.js"),[]).then(t=>t.wallet);case"com.it.onewallet":return n?u(()=>import("./image-DwT8NU8o.js"),[]).then(t=>t.default):u(()=>import("./index-C15ioynp.js"),[]).then(t=>t.wallet);case"com.rktechworks":return n?u(()=>import("./image-B_3kPYuE.js"),[]).then(t=>t.default):u(()=>import("./index-B7yCMw6f.js"),[]).then(t=>t.wallet);case"com.revelator.wallet":return n?u(()=>import("./image-BEDiadVJ.js"),[]).then(t=>t.default):u(()=>import("./index-zdYI4P64.js"),[]).then(t=>t.wallet);case"com.sinohope":return n?u(()=>import("./image-CR0aTzS0.js"),[]).then(t=>t.default):u(()=>import("./index-C9s7a0Ez.js"),[]).then(t=>t.wallet);case"network.dgg":return n?u(()=>import("./image-BI56qXQ0.js"),[]).then(t=>t.default):u(()=>import("./index-D7-VEloj.js"),[]).then(t=>t.wallet);case"io.up":return n?u(()=>import("./image-Dx3svzxu.js"),[]).then(t=>t.default):u(()=>import("./index-BG7XICd4.js"),[]).then(t=>t.wallet);case"com.lif3":return n?u(()=>import("./image-CFT4k-B4.js"),[]).then(t=>t.default):u(()=>import("./index-BmyNUPMf.js"),[]).then(t=>t.wallet);case"io.bimwallet":return n?u(()=>import("./image-BR5h2SHU.js"),[]).then(t=>t.default):u(()=>import("./index-Bk78_cgg.js"),[]).then(t=>t.wallet);case"pub.dg":return n?u(()=>import("./image-C5K8o_QO.js"),[]).then(t=>t.default):u(()=>import("./index-3AGQkopq.js"),[]).then(t=>t.wallet);case"com.wemix":return n?u(()=>import("./image-D7e0j8-5.js"),[]).then(t=>t.default):u(()=>import("./index-BCmub21b.js"),[]).then(t=>t.wallet);case"com.pierwallet":return n?u(()=>import("./image-BgTI1Mr2.js"),[]).then(t=>t.default):u(()=>import("./index-BxoamgAt.js"),[]).then(t=>t.wallet);case"net.stasis":return n?u(()=>import("./image-B0xghz9F.js"),[]).then(t=>t.default):u(()=>import("./index-D-cUTPXD.js"),[]).then(t=>t.wallet);case"com.peakdefi":return n?u(()=>import("./image-B-j6X2ua.js"),[]).then(t=>t.default):u(()=>import("./index-Ds8RjPXm.js"),[]).then(t=>t.wallet);case"com.3swallet":return n?u(()=>import("./image-Dm6aqzLa.js"),[]).then(t=>t.default):u(()=>import("./index-B01hsCSm.js"),[]).then(t=>t.wallet);case"com.example.subdomain":return n?u(()=>import("./image-BrBkAmMh.js"),[]).then(t=>t.default):u(()=>import("./index-Bx-6M_VN.js"),[]).then(t=>t.wallet);case"com.reown.appkit-lab":return n?u(()=>import("./image-Bt_TYk3Z.js"),[]).then(t=>t.default):u(()=>import("./index-BomxN3NM.js"),[]).then(t=>t.wallet);case"com.opz":return n?u(()=>import("./image-Dubw5heQ.js"),[]).then(t=>t.default):u(()=>import("./index-BsYaYokr.js"),[]).then(t=>t.wallet);case"ai.spotonchain.platform":return n?u(()=>import("./image-CmemWtNq.js"),[]).then(t=>t.default):u(()=>import("./index-CCYs1NTS.js"),[]).then(t=>t.wallet);case"org.dailychain.wallet":return n?u(()=>import("./image-HX_Cc3WE.js"),[]).then(t=>t.default):u(()=>import("./index-DOvMMOii.js"),[]).then(t=>t.wallet);case"app.omni":return n?u(()=>import("./image-B3gcDEsF.js"),[]).then(t=>t.default):u(()=>import("./index-CFS3GV0-.js"),[]).then(t=>t.wallet);case"id.plumaa":return n?u(()=>import("./image-D2OcPCwL.js"),[]).then(t=>t.default):u(()=>import("./index-XPcis1Hk.js"),[]).then(t=>t.wallet);case"io.ttmwallet":return n?u(()=>import("./image-LKLppsLU.js"),[]).then(t=>t.default):u(()=>import("./index-CY9mq6Ws.js"),[]).then(t=>t.wallet);case"io.kgen":return n?u(()=>import("./image-C_araf9B.js"),[]).then(t=>t.default):u(()=>import("./index-BlKJ-JBj.js"),[]).then(t=>t.wallet);case"com.nufinetes":return n?u(()=>import("./image-Uvntzjzd.js"),[]).then(t=>t.default):u(()=>import("./index-CM1LA8OI.js"),[]).then(t=>t.wallet);case"com.squirrelwallet":return n?u(()=>import("./image-D4996xLS.js"),[]).then(t=>t.default):u(()=>import("./index-GazkMlKm.js"),[]).then(t=>t.wallet);case"eu.trusteeglobal":return n?u(()=>import("./image-ClaYyDQX.js"),[]).then(t=>t.default):u(()=>import("./index-BbT33_dP.js"),[]).then(t=>t.wallet);case"com.daffione":return n?u(()=>import("./image-C6JZ7WuV.js"),[]).then(t=>t.default):u(()=>import("./index-KxQNzhUS.js"),[]).then(t=>t.wallet);case"com.saakuru.app":return n?u(()=>import("./image-CwFxLfDc.js"),[]).then(t=>t.default):u(()=>import("./index-u12pzcuy.js"),[]).then(t=>t.wallet);case"io.r0ar":return n?u(()=>import("./image-BEeNARTM.js"),[]).then(t=>t.default):u(()=>import("./index-BAFdi-Xy.js"),[]).then(t=>t.wallet);case"com.nodle":return n?u(()=>import("./image-BDK4RXKk.js"),[]).then(t=>t.default):u(()=>import("./index-iN0t9HsN.js"),[]).then(t=>t.wallet);case"app.tofee":return n?u(()=>import("./image-BOnGX8Q5.js"),[]).then(t=>t.default):u(()=>import("./index--Gdut-6F.js"),[]).then(t=>t.wallet);case"io.pltwallet":return n?u(()=>import("./image-C3CgzYTf.js"),[]).then(t=>t.default):u(()=>import("./index-1j0V944m.js"),[]).then(t=>t.wallet);case"org.talkapp":return n?u(()=>import("./image-2_1YP_wN.js"),[]).then(t=>t.default):u(()=>import("./index-BBhuy_-9.js"),[]).then(t=>t.wallet);case"io.ready":return n?u(()=>import("./image-DigckmBu.js"),[]).then(t=>t.default):u(()=>import("./index-BwWQILXK.js"),[]).then(t=>t.wallet);case"app.w3wallet":return n?u(()=>import("./image-BCZn_efw.js"),[]).then(t=>t.default):u(()=>import("./index-D09tH-_p.js"),[]).then(t=>t.wallet);case"pro.ds.app":return n?u(()=>import("./image-IE8YXerr.js"),[]).then(t=>t.default):u(()=>import("./index-mDTTSKTd.js"),[]).then(t=>t.wallet);case"com.reown.docs":return n?u(()=>import("./image-CkIE5GW_.js"),[]).then(t=>t.default):u(()=>import("./index-DkSjxVHF.js"),[]).then(t=>t.wallet);case"com.apollox":return n?u(()=>import("./image-BnILE5Nd.js"),[]).then(t=>t.default):u(()=>import("./index-B9VmLLfu.js"),[]).then(t=>t.wallet);case"com.ipmb":return n?u(()=>import("./image-CI9-uvbv.js"),[]).then(t=>t.default):u(()=>import("./index-BK3hD_Aq.js"),[]).then(t=>t.wallet);case"com.payperless":return n?u(()=>import("./image-Db2mz7AE.js"),[]).then(t=>t.default):u(()=>import("./index-D9LT89OI.js"),[]).then(t=>t.wallet);case"com.obliowallet":return n?u(()=>import("./image-C6e4H5Qk.js"),[]).then(t=>t.default):u(()=>import("./index-CNa4H4iF.js"),[]).then(t=>t.wallet);case"app.keeper-wallet":return n?u(()=>import("./image-ds_DS45D.js"),[]).then(t=>t.default):u(()=>import("./index-OrvSEOrD.js"),[]).then(t=>t.wallet);case"io.paraswap":return n?u(()=>import("./image-DLNyVKh7.js"),[]).then(t=>t.default):u(()=>import("./index-OUxzqq8e.js"),[]).then(t=>t.wallet);case"org.ecoinwallet":return n?u(()=>import("./image-C6_rXHSy.js"),[]).then(t=>t.default):u(()=>import("./index-Bzae-fTw.js"),[]).then(t=>t.wallet);case"fi.dropmate":return n?u(()=>import("./image-CDZQNGIA.js"),[]).then(t=>t.default):u(()=>import("./index-DePwUFvF.js"),[]).then(t=>t.wallet);case"com.cryptokara":return n?u(()=>import("./image-CqvokakT.js"),[]).then(t=>t.default):u(()=>import("./index-CkUX-IzZ.js"),[]).then(t=>t.wallet);case"co.cyber.wallet":return n?u(()=>import("./image-Eq0Swt8O.js"),[]).then(t=>t.default):u(()=>import("./index-DNwbsPLB.js"),[]).then(t=>t.wallet);case"com.kriptonio":return n?u(()=>import("./image-nnLbNJXY.js"),[]).then(t=>t.default):u(()=>import("./index-CT7qvsrD.js"),[]).then(t=>t.wallet);case"digital.minerva":return n?u(()=>import("./image-Bs-ggdFz.js"),[]).then(t=>t.default):u(()=>import("./index-CnPAMI6s.js"),[]).then(t=>t.wallet);case"com.mpcvault.broswerplugin":return n?u(()=>import("./image-C4G5noc2.js"),[]).then(t=>t.default):u(()=>import("./index-CQcA9NQy.js"),[]).then(t=>t.wallet);case"com.liberawallet":return n?u(()=>import("./image-CeeH5SSM.js"),[]).then(t=>t.default):u(()=>import("./index-CJOIpO0D.js"),[]).then(t=>t.wallet);case"io.helixid":return n?u(()=>import("./image-CGnQwBYH.js"),[]).then(t=>t.default):u(()=>import("./index-BiQYxH3k.js"),[]).then(t=>t.wallet);case"com.broearn":return n?u(()=>import("./image-CGMwpiJi.js"),[]).then(t=>t.default):u(()=>import("./index-usaXkbHq.js"),[]).then(t=>t.wallet);case"io.altme":return n?u(()=>import("./image-ponfuhgz.js"),[]).then(t=>t.default):u(()=>import("./index-DkHeUbcp.js"),[]).then(t=>t.wallet);case"app.herewallet":return n?u(()=>import("./image-Cki_h5H8.js"),[]).then(t=>t.default):u(()=>import("./index-BXLtaWeF.js"),[]).then(t=>t.wallet);case"com.coinsdo":return n?u(()=>import("./image-BkQn-eFE.js"),[]).then(t=>t.default):u(()=>import("./index-DiP3XxxX.js"),[]).then(t=>t.wallet);case"trade.flooz.wallet":return n?u(()=>import("./image-B79qVkMd.js"),[]).then(t=>t.default):u(()=>import("./index-CMs5X7O_.js"),[]).then(t=>t.wallet);case"com.tapwallet":return n?u(()=>import("./image-EV0HMtku.js"),[]).then(t=>t.default):u(()=>import("./index-CIXsaBn0.js"),[]).then(t=>t.wallet);case"fun.tobi":return n?u(()=>import("./image-BC0xyU5O.js"),[]).then(t=>t.default):u(()=>import("./index-DatayTYV.js"),[]).then(t=>t.wallet);case"com.bitnovo":return n?u(()=>import("./image-Diy5ggOd.js"),[]).then(t=>t.default):u(()=>import("./index-DZ9mCxwq.js"),[]).then(t=>t.wallet);case"io.xucre":return n?u(()=>import("./image-DdG87PRE.js"),[]).then(t=>t.default):u(()=>import("./index-RftHbEJr.js"),[]).then(t=>t.wallet);case"app.girin":return n?u(()=>import("./image-CPTr6dkg.js"),[]).then(t=>t.default):u(()=>import("./index-DTTPaYVe.js"),[]).then(t=>t.wallet);case"finance.panaroma":return n?u(()=>import("./image-C4MrlFC9.js"),[]).then(t=>t.default):u(()=>import("./index-BuRC3xsC.js"),[]).then(t=>t.wallet);case"app.clot":return n?u(()=>import("./image-9P9l0zV_.js"),[]).then(t=>t.default):u(()=>import("./index-BFO7EK1h.js"),[]).then(t=>t.wallet);case"io.transi":return n?u(()=>import("./image-DW2MUS3y.js"),[]).then(t=>t.default):u(()=>import("./index-5DvAcfYw.js"),[]).then(t=>t.wallet);case"world.qoin":return n?u(()=>import("./image-5AG089cB.js"),[]).then(t=>t.default):u(()=>import("./index-L98tcAPA.js"),[]).then(t=>t.wallet);case"com.greengloryglobal":return n?u(()=>import("./image-Ljm9Bz3n.js"),[]).then(t=>t.default):u(()=>import("./index-cT-bgULX.js"),[]).then(t=>t.wallet);case"com.amazewallet":return n?u(()=>import("./image-C-F3MXbl.js"),[]).then(t=>t.default):u(()=>import("./index-5MqcAe3C.js"),[]).then(t=>t.wallet);case"zone.bitverse":return n?u(()=>import("./image-DGb_hLx6.js"),[]).then(t=>t.default):u(()=>import("./index-B6he1NFn.js"),[]).then(t=>t.wallet);case"social.gm2":return n?u(()=>import("./image-AWdU8VV0.js"),[]).then(t=>t.default):u(()=>import("./index-CvmJGI4m.js"),[]).then(t=>t.wallet);case"io.ozonewallet":return n?u(()=>import("./image-9QI9sTH5.js"),[]).then(t=>t.default):u(()=>import("./index-CtrwXvyj.js"),[]).then(t=>t.wallet);case"io.ukiss":return n?u(()=>import("./image-CbgyrC3w.js"),[]).then(t=>t.default):u(()=>import("./index-DjBbIJjj.js"),[]).then(t=>t.wallet);case"finance.islamicoin":return n?u(()=>import("./image-DOl7zD0B.js"),[]).then(t=>t.default):u(()=>import("./index-Do5UpbR4.js"),[]).then(t=>t.wallet);case"io.copiosa":return n?u(()=>import("./image-D7UG6IdA.js"),[]).then(t=>t.default):u(()=>import("./index-CEiupjfk.js"),[]).then(t=>t.wallet);case"world.fncy":return n?u(()=>import("./image-D8u0coXq.js"),[]).then(t=>t.default):u(()=>import("./index-B8M5fchQ.js"),[]).then(t=>t.wallet);case"io.moonstake":return n?u(()=>import("./image-Di_xLdyX.js"),[]).then(t=>t.default):u(()=>import("./index-7HfmIPvC.js"),[]).then(t=>t.wallet);case"com.trusteeglobal":return n?u(()=>import("./image-DnR4Lmm2.js"),[]).then(t=>t.default):u(()=>import("./index-DBjSfZvB.js"),[]).then(t=>t.wallet);case"net.spatium":return n?u(()=>import("./image-GC2hQOZY.js"),[]).then(t=>t.default):u(()=>import("./index-DoDmQ6s0.js"),[]).then(t=>t.wallet);case"co.filwallet":return n?u(()=>import("./image-BO9Hp1NS.js"),[]).then(t=>t.default):u(()=>import("./index-BjuDWcc8.js"),[]).then(t=>t.wallet);case"money.snowball":return n?u(()=>import("./image-Bq5dNCvj.js"),[]).then(t=>t.default):u(()=>import("./index-DJaj65I0.js"),[]).then(t=>t.wallet);case"com.ennowallet":return n?u(()=>import("./image-CCpZhmeV.js"),[]).then(t=>t.default):u(()=>import("./index-CXMLwLSL.js"),[]).then(t=>t.wallet);case"io.safematrix":return n?u(()=>import("./image-aLir34M2.js"),[]).then(t=>t.default):u(()=>import("./index-DF3I6ohZ.js"),[]).then(t=>t.wallet);case"pro.assure":return n?u(()=>import("./image-BbZlFk1s.js"),[]).then(t=>t.default):u(()=>import("./index-DyMe2909.js"),[]).then(t=>t.wallet);case"com.neftipedia":return n?u(()=>import("./image-DK9H4-Ad.js"),[]).then(t=>t.default):u(()=>import("./index-BeSxOizm.js"),[]).then(t=>t.wallet);case"io.goldbit":return n?u(()=>import("./image-C-1BYDS8.js"),[]).then(t=>t.default):u(()=>import("./index-DatBJWXi.js"),[]).then(t=>t.wallet);case"com.coingrig":return n?u(()=>import("./image-DjUJV6x7.js"),[]).then(t=>t.default):u(()=>import("./index-UbUXcYI1.js"),[]).then(t=>t.wallet);case"io.xfun":return n?u(()=>import("./image-BKzTjD_x.js"),[]).then(t=>t.default):u(()=>import("./index-CupY10KR.js"),[]).then(t=>t.wallet);case"com.antiersolutions":return n?u(()=>import("./image-ubiaz4Ce.js"),[]).then(t=>t.default):u(()=>import("./index-DC6eto0o.js"),[]).then(t=>t.wallet);case"com.itoken":return n?u(()=>import("./image-CFVYHfGR.js"),[]).then(t=>t.default):u(()=>import("./index-ecg_2Bkp.js"),[]).then(t=>t.wallet);case"com.cardstack":return n?u(()=>import("./image-BNMU4MrK.js"),[]).then(t=>t.default):u(()=>import("./index-BNxqavL8.js"),[]).then(t=>t.wallet);case"io.slavi":return n?u(()=>import("./image-BKRBGzRA.js"),[]).then(t=>t.default):u(()=>import("./index-BGdrC_Sh.js"),[]).then(t=>t.wallet);case"tech.defiantapp":return n?u(()=>import("./image-SecrmBNd.js"),[]).then(t=>t.default):u(()=>import("./index-Dkkrt5IR.js"),[]).then(t=>t.wallet);case"com.dexari":return n?u(()=>import("./image-DqECxs5-.js"),[]).then(t=>t.default):u(()=>import("./index-01H7hL5P.js"),[]).then(t=>t.wallet);case"io.cfcx":return n?u(()=>import("./image-BtCfBTZq.js"),[]).then(t=>t.default):u(()=>import("./index-CcMwGV5f.js"),[]).then(t=>t.wallet);case"com.socjsc":return n?u(()=>import("./image-R9RXoc8s.js"),[]).then(t=>t.default):u(()=>import("./index-DbhRZmkB.js"),[]).then(t=>t.wallet);case"com.tokenb":return n?u(()=>import("./image-CVhRaM7j.js"),[]).then(t=>t.default):u(()=>import("./index-CJjptfiA.js"),[]).then(t=>t.wallet);case"org.onyx":return n?u(()=>import("./image-LrnAZqig.js"),[]).then(t=>t.default):u(()=>import("./index-B5qFvytG.js"),[]).then(t=>t.wallet);case"io.gk8":return n?u(()=>import("./image-BFZzUxQN.js"),[]).then(t=>t.default):u(()=>import("./index-BLslmGSA.js"),[]).then(t=>t.wallet);case"com.anchorage":return n?u(()=>import("./image-eXgCeXYC.js"),[]).then(t=>t.default):u(()=>import("./index-bwODdJd_.js"),[]).then(t=>t.wallet);case"com.hashport.wallet":return n?u(()=>import("./image-CrwfI0sg.js"),[]).then(t=>t.default):u(()=>import("./index-60aSyGqb.js"),[]).then(t=>t.wallet);case"io.billionwallet":return n?u(()=>import("./image-BJZxT49R.js"),[]).then(t=>t.default):u(()=>import("./index-DBBjFUrh.js"),[]).then(t=>t.wallet);case"com.dlicom":return n?u(()=>import("./image-DGt7Rmz0.js"),[]).then(t=>t.default):u(()=>import("./index-n485xKg2.js"),[]).then(t=>t.wallet);case"com.tychiwallet":return n?u(()=>import("./image-CWHyXFR4.js"),[]).then(t=>t.default):u(()=>import("./index-ClREn2mR.js"),[]).then(t=>t.wallet);case"at.swe":return n?u(()=>import("./image-AnfmMqaq.js"),[]).then(t=>t.default):u(()=>import("./index-BW67UrrV.js"),[]).then(t=>t.wallet);case"network.wali":return n?u(()=>import("./image-CXq-Cxbd.js"),[]).then(t=>t.default):u(()=>import("./index-BsPtMfti.js"),[]).then(t=>t.wallet);case"io.diamante":return n?u(()=>import("./image-BtTEqc7_.js"),[]).then(t=>t.default):u(()=>import("./index-DntehBUo.js"),[]).then(t=>t.wallet);case"ai.interlinklabs":return n?u(()=>import("./image-mo-MZ3QJ.js"),[]).then(t=>t.default):u(()=>import("./index-BnZ9yt85.js"),[]).then(t=>t.wallet);case"com.walllet":return n?u(()=>import("./image-OZ1AOwbT.js"),[]).then(t=>t.default):u(()=>import("./index-CeIV1F82.js"),[]).then(t=>t.wallet);case"org.lunascape":return n?u(()=>import("./image-ClfNqwc4.js"),[]).then(t=>t.default):u(()=>import("./index-m2MsoiHM.js"),[]).then(t=>t.wallet);case"com.nvxowallet":return n?u(()=>import("./image-CMq0qq2T.js"),[]).then(t=>t.default):u(()=>import("./index-C21V-qUV.js"),[]).then(t=>t.wallet);case"today.paywithcrypto.wallet":return n?u(()=>import("./image-N5WHiU5_.js"),[]).then(t=>t.default):u(()=>import("./index-BYdDyzxC.js"),[]).then(t=>t.wallet);case"ai.iluminary":return n?u(()=>import("./image-CW_1GHb7.js"),[]).then(t=>t.default):u(()=>import("./index-DXyPnzZX.js"),[]).then(t=>t.wallet);case"io.reactwallet":return n?u(()=>import("./image-Bnt5C7zC.js"),[]).then(t=>t.default):u(()=>import("./index-C5LJPbHN.js"),[]).then(t=>t.wallet);case"com.rewardywallet":return n?u(()=>import("./image-S9984bPS.js"),[]).then(t=>t.default):u(()=>import("./index-RjHECb4a.js"),[]).then(t=>t.wallet);case"io.walletv":return n?u(()=>import("./image-B9zDzj_n.js"),[]).then(t=>t.default):u(()=>import("./index-Cr_bAMhu.js"),[]).then(t=>t.wallet);case"app.outlawgames":return n?u(()=>import("./image-qL02cf1Y.js"),[]).then(t=>t.default):u(()=>import("./index-Dq3AkWuf.js"),[]).then(t=>t.wallet);case"io.ironwallet":return n?u(()=>import("./image-Ce4eMMpY.js"),[]).then(t=>t.default):u(()=>import("./index-I2Tu6nVy.js"),[]).then(t=>t.wallet);case"com.mecowallet":return n?u(()=>import("./image-BJ7E9wJj.js"),[]).then(t=>t.default):u(()=>import("./index-BNcgD_Jo.js"),[]).then(t=>t.wallet);case"com.onlybulls":return n?u(()=>import("./image-IV7Ly6tc.js"),[]).then(t=>t.default):u(()=>import("./index-Wki7z4v7.js"),[]).then(t=>t.wallet);case"me.qiewallet":return n?u(()=>import("./image-mUn2Nmwd.js"),[]).then(t=>t.default):u(()=>import("./index-B8FJWq2b.js"),[]).then(t=>t.wallet);case"fund.lflabs":return n?u(()=>import("./image-DmNtyNJi.js"),[]).then(t=>t.default):u(()=>import("./index-Mc-mIuS3.js"),[]).then(t=>t.wallet);case"io.walletverse":return n?u(()=>import("./image-CuH_nXcV.js"),[]).then(t=>t.default):u(()=>import("./index-I0tHaeSb.js"),[]).then(t=>t.wallet);case"com.berasig":return n?u(()=>import("./image-Dg0N1g6c.js"),[]).then(t=>t.default):u(()=>import("./index-B7f-7qNF.js"),[]).then(t=>t.wallet);case"app.phantom":return n?u(()=>import("./image-AMwbpknG.js"),[]).then(t=>t.default):u(()=>import("./index-H3IjI5-5.js"),[]).then(t=>t.wallet);case"com.coinbase.wallet":return n?u(()=>import("./image-WgGILhOH.js"),[]).then(t=>t.default):u(()=>import("./index-BQfRnOEk.js"),[]).then(t=>t.wallet);case"io.rabby":return n?u(()=>import("./image-DO9smEJD.js"),[]).then(t=>t.default):u(()=>import("./index-C3Ud76aq.js"),[]).then(t=>t.wallet);case"com.brave.wallet":return n?u(()=>import("./image-TDSuOHNU.js"),[]).then(t=>t.default):u(()=>import("./index-DP05FHXN.js"),[]).then(t=>t.wallet);case"fi.nu":return n?u(()=>import("./image-ubhPU-df.js"),[]).then(t=>t.default):u(()=>import("./index-DpmgAexj.js"),[]).then(t=>t.wallet);case"pro.hinkal.walletconnect":return n?u(()=>import("./image-WE5WO1oI.js"),[]).then(t=>t.default):u(()=>import("./index-BNz6smeL.js"),[]).then(t=>t.wallet);case"com.moongate.one":return n?u(()=>import("./image-DU5rwGF4.js"),[]).then(t=>t.default):u(()=>import("./index-CYFQ1qjY.js"),[]).then(t=>t.wallet);case"tech.levain":return n?u(()=>import("./image-DNqAGFzc.js"),[]).then(t=>t.default):u(()=>import("./index-ZMR3O7_V.js"),[]).then(t=>t.wallet);case"com.enkrypt":return n?u(()=>import("./image-Bwc5B3nF.js"),[]).then(t=>t.default):u(()=>import("./index-CLDRRTfd.js"),[]).then(t=>t.wallet);case"com.scramble":return n?u(()=>import("./image-BdlxKsqN.js"),[]).then(t=>t.default):u(()=>import("./index-CsrGDi9G.js"),[]).then(t=>t.wallet);case"io.finoa":return n?u(()=>import("./image-BjNYHzYo.js"),[]).then(t=>t.default):u(()=>import("./index-CIJwg7x2.js"),[]).then(t=>t.wallet);case"com.blazpay.wallet":return n?u(()=>import("./image-Ded2cDkb.js"),[]).then(t=>t.default):u(()=>import("./index-B7x0EPkI.js"),[]).then(t=>t.wallet);case"io.getjoin.prd":return n?u(()=>import("./image-Bh9Vac4W.js"),[]).then(t=>t.default):u(()=>import("./index-BGmtW5WT.js"),[]).then(t=>t.wallet);case"xyz.talisman":return n?u(()=>import("./image-DnOc4PLu.js"),[]).then(t=>t.default):u(()=>import("./index-BoWyXM61.js"),[]).then(t=>t.wallet);case"eu.flashsoft.clear-wallet":return n?u(()=>import("./image-RaAvmTda.js"),[]).then(t=>t.default):u(()=>import("./index-CBEChUnX.js"),[]).then(t=>t.wallet);case"app.berasig":return n?u(()=>import("./image-CKgTbGoy.js"),[]).then(t=>t.default):u(()=>import("./index-CJLOVPEY.js"),[]).then(t=>t.wallet);case"com.wallet.reown":return n?u(()=>import("./image-CBv_A54z.js"),[]).then(t=>t.default):u(()=>import("./index-Fk0P5t9a.js"),[]).then(t=>t.wallet);case"io.runonflux.sspwallet":return n?u(()=>import("./image-CMMSxKCI.js"),[]).then(t=>t.default):u(()=>import("./index-BSQg7iBu.js"),[]).then(t=>t.wallet);case"com.blanqlabs.wallet":return n?u(()=>import("./image-BQnyjyHr.js"),[]).then(t=>t.default):u(()=>import("./index-RFNw1zDI.js"),[]).then(t=>t.wallet);case"io.hero.wallet":return n?u(()=>import("./image-BSsXAyde.js"),[]).then(t=>t.default):u(()=>import("./index-zfxUsesj.js"),[]).then(t=>t.wallet);case"network.verified.custody":return n?u(()=>import("./image-WVTBQdo8.js"),[]).then(t=>t.default):u(()=>import("./index-Uztr5Jgj.js"),[]).then(t=>t.wallet);case"console.utila.io":return n?u(()=>import("./image-y8DPTS4d.js"),[]).then(t=>t.default):u(()=>import("./index-jAmOB9mf.js"),[]).then(t=>t.wallet);case"com.micet.wallet":return n?u(()=>import("./image-DIOD3I9G.js"),[]).then(t=>t.default):u(()=>import("./index-BFmXTuTI.js"),[]).then(t=>t.wallet);case"world.dolphinode.chain":return n?u(()=>import("./image-DYjHGArM.js"),[]).then(t=>t.default):u(()=>import("./index-CtkUWqve.js"),[]).then(t=>t.wallet);case"com.lootrush":return n?u(()=>import("./image-CD-9cKzY.js"),[]).then(t=>t.default):u(()=>import("./index-BkT_Phju.js"),[]).then(t=>t.wallet);case"xyz.dawnwallet":return n?u(()=>import("./image-D84iATu3.js"),[]).then(t=>t.default):u(()=>import("./index-CufUEtrW.js"),[]).then(t=>t.wallet);case"xyz.abs":return n?u(()=>import("./image-982I_LqG.js"),[]).then(t=>t.default):u(()=>import("./index-CBtcz4_T.js"),[]).then(t=>t.wallet);case"sh.frame":return n?u(()=>import("./image-QsHphgJe.js"),[]).then(t=>t.default):u(()=>import("./index-D-YZvb-d.js"),[]).then(t=>t.wallet);case"io.useglyph":return n?u(()=>import("./image-BebTTEqp.js"),[]).then(t=>t.default):u(()=>import("./index-6xhBK11g.js"),[]).then(t=>t.wallet);case"org.base.account":return n?u(()=>import("./image-BsBvd3sv.js"),[]).then(t=>t.default):u(()=>import("./index-Bw9O70Te.js"),[]).then(t=>t.wallet);default:throw new Error(`Wallet with id ${e} not found`)}}const P4=y.createContext(void 0);function cM(e){return a.jsx(P4.Provider,{value:e,children:e.children})}function lM(){const e=y.useContext(P4);if(!e)throw new Error("WalletProviderContext not found. Make sure you are using WalletIcon, WalletName, etc. inside a <WalletProvider /> component");return e}const R4="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI3MDUuNiIgaGVpZ2h0PSI3MjAiIHZpZXdCb3g9IjAgMCAxODYuNjkgMTkwLjUiIHhtbG5zOnY9Imh0dHBzOi8vdmVjdGEuaW8vbmFubyI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTE4NC41ODMgNzY1LjE3MSkiPjxwYXRoIGNsaXAtcGF0aD0ibm9uZSIgbWFzaz0ibm9uZSIgZD0iTS0xMDg5LjMzMy02ODcuMjM5djM2Ljg4OGg1MS4yNjJjLTIuMjUxIDExLjg2My05LjAwNiAyMS45MDgtMTkuMTM3IDI4LjY2MmwzMC45MTMgMjMuOTg2YzE4LjAxMS0xNi42MjUgMjguNDAyLTQxLjA0NCAyOC40MDItNzAuMDUyIDAtNi43NTQtLjYwNi0xMy4yNDktMS43MzItMTkuNDgzeiIgZmlsbD0iIzQyODVmNCIvPjxwYXRoIGNsaXAtcGF0aD0ibm9uZSIgbWFzaz0ibm9uZSIgZD0iTS0xMTQyLjcxNC02NTEuNzkxbC02Ljk3MiA1LjMzNy0yNC42NzkgMTkuMjIzaDBjMTUuNjczIDMxLjA4NiA0Ny43OTYgNTIuNTYxIDg1LjAzIDUyLjU2MSAyNS43MTcgMCA0Ny4yNzgtOC40ODYgNjMuMDM4LTIzLjAzM2wtMzAuOTEzLTIzLjk4NmMtOC40ODYgNS43MTUtMTkuMzEgOS4xNzktMzIuMTI1IDkuMTc5LTI0Ljc2NSAwLTQ1LjgwNi0xNi43MTItNTMuMzQtMzkuMjI2eiIgZmlsbD0iIzM0YTg1MyIvPjxwYXRoIGNsaXAtcGF0aD0ibm9uZSIgbWFzaz0ibm9uZSIgZD0iTS0xMTc0LjM2NS03MTIuNjFjLTYuNDk0IDEyLjgxNS0xMC4yMTcgMjcuMjc2LTEwLjIxNyA0Mi42ODlzMy43MjMgMjkuODc0IDEwLjIxNyA0Mi42ODljMCAuMDg2IDMxLjY5My0yNC41OTIgMzEuNjkzLTI0LjU5Mi0xLjkwNS01LjcxNS0zLjAzMS0xMS43NzYtMy4wMzEtMTguMDk4czEuMTI2LTEyLjM4MyAzLjAzMS0xOC4wOTh6IiBmaWxsPSIjZmJiYzA1Ii8+PHBhdGggZD0iTS0xMDg5LjMzMy03MjcuMjQ0YzE0LjAyOCAwIDI2LjQ5NyA0Ljg0OSAzNi40NTUgMTQuMjAxbDI3LjI3Ni0yNy4yNzZjLTE2LjUzOS0xNS40MTMtMzguMDEzLTI0Ljg1Mi02My43MzEtMjQuODUyLTM3LjIzNCAwLTY5LjM1OSAyMS4zODgtODUuMDMyIDUyLjU2MWwzMS42OTIgMjQuNTkyYzcuNTMzLTIyLjUxNCAyOC41NzUtMzkuMjI2IDUzLjM0LTM5LjIyNnoiIGZpbGw9IiNlYTQzMzUiIGNsaXAtcGF0aD0ibm9uZSIgbWFzaz0ibm9uZSIvPjwvZz48L3N2Zz4=",V4="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbmFtZT0iRWJlbmUgMSIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgaWQ9ImZhY2Vib29rLWxvZ28tMjAxOSI+PHBhdGggZmlsbD0iIzE4NzdmMiIgZD0iTTEwMjQsNTEyQzEwMjQsMjI5LjIzMDE2LDc5NC43Njk3OCwwLDUxMiwwUzAsMjI5LjIzMDE2LDAsNTEyYzAsMjU1LjU1NCwxODcuMjMxLDQ2Ny4zNzAxMiw0MzIsNTA1Ljc3Nzc3VjY2MEgzMDJWNTEySDQzMlYzOTkuMkM0MzIsMjcwLjg3OTgyLDUwOC40Mzg1NCwyMDAsNjI1LjM4OTIyLDIwMCw2ODEuNDA3NjUsMjAwLDc0MCwyMTAsNzQwLDIxMFYzMzZINjc1LjQzNzEzQzYxMS44MzUwOCwzMzYsNTkyLDM3NS40NjY2Nyw1OTIsNDE1Ljk1NzI4VjUxMkg3MzRMNzExLjMsNjYwSDU5MnYzNTcuNzc3NzdDODM2Ljc2OSw5NzkuMzcwMTIsMTAyNCw3NjcuNTU0LDEwMjQsNTEyWiI+PC9wYXRoPjxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik03MTEuMyw2NjAsNzM0LDUxMkg1OTJWNDE1Ljk1NzI4QzU5MiwzNzUuNDY2NjcsNjExLjgzNTA4LDMzNiw2NzUuNDM3MTMsMzM2SDc0MFYyMTBzLTU4LjU5MjM1LTEwLTExNC42MTA3OC0xMEM1MDguNDM4NTQsMjAwLDQzMiwyNzAuODc5ODIsNDMyLDM5OS4yVjUxMkgzMDJWNjYwSDQzMnYzNTcuNzc3NzdhNTE3LjM5NjE5LDUxNy4zOTYxOSwwLDAsMCwxNjAsMFY2NjBaIj48L3BhdGg+PC9zdmc+",U4="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMDM4IiBoZWlnaHQ9IjI1MDAiIHZpZXdCb3g9IjAgMCA0OTYuMjU1IDYwOC43MjgiIGlkPSJhcHBsZSI+PHBhdGggZmlsbD0iIzk5OSIgZD0iTTI3My44MSA1Mi45NzNDMzEzLjgwNi4yNTcgMzY5LjQxIDAgMzY5LjQxIDBzOC4yNzEgNDkuNTYyLTMxLjQ2MyA5Ny4zMDZjLTQyLjQyNiA1MC45OC05MC42NDkgNDIuNjM4LTkwLjY0OSA0Mi42MzhzLTkuMDU1LTQwLjA5NCAyNi41MTItODYuOTcxek0yNTIuMzg1IDE3NC42NjJjMjAuNTc2IDAgNTguNzY0LTI4LjI4NCAxMDguNDcxLTI4LjI4NCA4NS41NjIgMCAxMTkuMjIyIDYwLjg4MyAxMTkuMjIyIDYwLjg4M3MtNjUuODMzIDMzLjY1OS02NS44MzMgMTE1LjMzMWMwIDkyLjEzMyA4Mi4wMSAxMjMuODg1IDgyLjAxIDEyMy44ODVzLTU3LjMyOCAxNjEuMzU3LTEzNC43NjIgMTYxLjM1N2MtMzUuNTY1IDAtNjMuMjE1LTIzLjk2Ny0xMDAuNjg4LTIzLjk2Ny0zOC4xODggMC03Ni4wODQgMjQuODYxLTEwMC43NjYgMjQuODYxQzg5LjMzIDYwOC43MyAwIDQ1NS42NjYgMCAzMzIuNjI4YzAtMTIxLjA1MiA3NS42MTItMTg0LjU1NCAxNDYuNTMzLTE4NC41NTQgNDYuMTA1IDAgODEuODgzIDI2LjU4OCAxMDUuODUyIDI2LjU4OHoiPjwvcGF0aD48L3N2Zz4=",B4="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDEwMCAxMDAiIHZpZXdCb3g9IjAgMCAxMDAgMTAwIiBpZD0iZGlzY29yZCI+PHBhdGggZmlsbD0iIzY2NjVkMiIgZD0iTTg1LjIyLDI0Ljk1OGMtMTEuNDU5LTguNTc1LTIyLjQzOC04LjMzNC0yMi40MzgtOC4zMzRsLTEuMTIyLDEuMjgyCgkJCQljMTMuNjIzLDQuMDg3LDE5Ljk1NCwxMC4wOTcsMTkuOTU0LDEwLjA5N2MtMTkuNDkxLTEwLjczMS00NC4zMTctMTAuNjU0LTY0LjU5LDBjMCwwLDYuNTcxLTYuMzMxLDIwLjk5Ni0xMC40MThsLTAuODAxLTAuOTYyCgkJCQljMCwwLTEwLjg5OS0wLjI0LTIyLjQzOCw4LjMzNGMwLDAtMTEuNTQsMjAuNzU1LTExLjU0LDQ2LjMxOWMwLDAsNi43MzIsMTEuNTQsMjQuNDQyLDEyLjEwMWMwLDAsMi45NjUtMy41MjYsNS4zNjktNi41NzEKCQkJCWMtMTAuMTc3LTMuMDQ1LTE0LjAyNC05LjM3Ni0xNC4wMjQtOS4zNzZjNi4zOTQsNC4wMDEsMTIuODU5LDYuNTA1LDIwLjkxNiw4LjA5NGMxMy4xMDgsMi42OTgsMjkuNDEzLTAuMDc2LDQxLjU5MS04LjA5NAoJCQkJYzAsMC00LjAwNyw2LjQ5MS0xNC41MDUsOS40NTZjMi40MDQsMi45NjUsNS4yODksNi40MTEsNS4yODksNi40MTFjMTcuNzEtMC41NjEsMjQuNDQxLTEyLjEwMSwyNC40NDEtMTIuMDIKCQkJCUM5Ni43NTksNDUuNzEzLDg1LjIyLDI0Ljk1OCw4NS4yMiwyNC45NTh6IE0zNS4wNTUsNjMuODI0Yy00LjQ4OCwwLTguMTc0LTMuOTI3LTguMTc0LTguODE1CgkJCQljMC4zMjgtMTEuNzA3LDE2LjEwMi0xMS42NzEsMTYuMzQ4LDBDNDMuMjI5LDU5Ljg5NywzOS42MjIsNjMuODI0LDM1LjA1NSw2My44MjR6IE02NC4zMDQsNjMuODI0CgkJCQljLTQuNDg4LDAtOC4xNzQtMy45MjctOC4xNzQtOC44MTVjMC4zNi0xMS42ODQsMTUuOTM3LTExLjY4OSwxNi4zNDgsMEM3Mi40NzgsNTkuODk3LDY4Ljg3Miw2My44MjQsNjQuMzA0LDYzLjgyNHoiPjwvcGF0aD48L3N2Zz4=",W4="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTU2IiBoZWlnaHQ9IjU1NiIgdmlld0JveD0iMCAwIDU1NiA1NTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8xNDhfNSkiPgo8cGF0aCBkPSJNMjc4IDBDNDMxLjUzMyAwIDU1NiAxMjQuNDY3IDU1NiAyNzhDNTU2IDQzMS41MzMgNDMxLjUzMyA1NTYgMjc4IDU1NkMxMjQuNDY3IDU1NiAwIDQzMS41MzMgMCAyNzhDMCAxMjQuNDY3IDEyNC40NjcgMCAyNzggMFoiIGZpbGw9IiMwMDUyRkYiLz4KPHBhdGggZD0iTTI3OC40ODIgMzc1LjE5QzIyNC40OSAzNzUuMTkgMTgwLjg2MiAzMzEuNDEgMTgwLjg2MiAyNzcuNUMxODAuODYyIDIyMy41OSAyMjQuNjEgMTc5LjgxIDI3OC40ODIgMTc5LjgxQzMyNi44MSAxNzkuODEgMzY2Ljk0MyAyMTUuMDI3IDM3NC42NTYgMjYxLjIxOEg0NzNDNDY0LjY4NCAxNjAuODc1IDM4MC44MDMgODIgMjc4LjM2MiA4MkMxNzAuNDk3IDgyIDgzIDE2OS41NTkgODMgMjc3LjVDODMgMzg1LjQ0MSAxNzAuNDk3IDQ3MyAyNzguMzYyIDQ3M0MzODAuODAzIDQ3MyA0NjQuNjg0IDM5NC4xMjUgNDczIDI5My43ODJIMzc0LjUzNkMzNjYuODIzIDMzOS45NzMgMzI2LjgxIDM3NS4xOSAyNzguNDgyIDM3NS4xOVoiIGZpbGw9IndoaXRlIi8+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDBfMTQ4XzUiPgo8cmVjdCB3aWR0aD0iNTU2IiBoZWlnaHQ9IjU1NiIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K",$4="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMjAiIGhlaWdodD0iMzIwIiB2aWV3Qm94PSIwIDAgMzIwIDMyMCI+PGRlZnM+PHN0eWxlPi5jbHMtMXtmaWxsOiMwNmM3NTU7fS5jbHMtMntmaWxsOiNmZmY7fTwvc3R5bGU+PC9kZWZzPjxnIGlkPSJMYXllcl8yIiBkYXRhLW5hbWU9IkxheWVyIDIiPjxnIGlkPSJMSU5FX0xPR08iIGRhdGEtbmFtZT0iTElORSBMT0dPIj48cmVjdCBjbGFzcz0iY2xzLTEiIHdpZHRoPSIzMjAiIGhlaWdodD0iMzIwIiByeD0iNzIuMTQiLz48cGF0aCBjbGFzcz0iY2xzLTIiIGQ9Ik0yNjYuNjYsMTQ0LjkyYzAtNDcuNzQtNDcuODYtODYuNTgtMTA2LjY5LTg2LjU4UzUzLjI4LDk3LjE4LDUzLjI4LDE0NC45MmMwLDQyLjgsMzgsNzguNjUsODkuMjIsODUuNDIsMy40OC43NSw4LjIxLDIuMjksOS40LDUuMjYsMS4wOCwyLjcuNzEsNi45My4zNSw5LjY1LDAsMC0xLjI1LDcuNTMtMS41Miw5LjEzLS40NywyLjctMi4xNSwxMC41NSw5LjI0LDUuNzZzNjEuNDQtMzYuMTgsODMuODItNjEuOTVoMEMyNTkuMjUsMTgxLjI0LDI2Ni42NiwxNjQsMjY2LjY2LDE0NC45MloiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Ik0yMzEuMTYsMTcyLjQ5aC0zMGEyLDIsMCwwLDEtMi0ydjBoMFYxMjMuOTRoMHYwYTIsMiwwLDAsMSwyLTJoMzBhMiwyLDAsMCwxLDIsMnY3LjU3YTIsMiwwLDAsMS0yLDJIMjEwLjc5djcuODVoMjAuMzdhMiwyLDAsMCwxLDIsMlYxNTFhMiwyLDAsMCwxLTIsMkgyMTAuNzl2Ny44NmgyMC4zN2EyLDIsMCwwLDEsMiwydjcuNTZBMiwyLDAsMCwxLDIzMS4xNiwxNzIuNDlaIi8+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJNMTIwLjI5LDE3Mi40OWEyLDIsMCwwLDAsMi0ydi03LjU2YTIsMiwwLDAsMC0yLTJIOTkuOTJ2LTM3YTIsMiwwLDAsMC0yLTJIOTAuMzJhMiwyLDAsMCwwLTIsMnY0Ni41M2gwdjBhMiwyLDAsMCwwLDIsMmgzMFoiLz48cmVjdCBjbGFzcz0iY2xzLTEiIHg9IjEyOC43MyIgeT0iMTIxLjg1IiB3aWR0aD0iMTEuNjQiIGhlaWdodD0iNTAuNjQiIHJ4PSIyLjA0Ii8+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJNMTg5Ljg0LDEyMS44NWgtNy41NmEyLDIsMCwwLDAtMiwydjI3LjY2bC0yMS4zLTI4Ljc3YTEuMiwxLjIsMCwwLDAtLjE3LS4yMXYwbC0uMTItLjEyLDAsMC0uMTEtLjA5LS4wNiwwLS4xMS0uMDgtLjA2LDAtLjExLS4wNi0uMDcsMC0uMTEsMC0uMDcsMC0uMTIsMC0uMDgsMC0uMTIsMGgtLjA4bC0uMTEsMGgtNy43MWEyLDIsMCwwLDAtMiwydjQ2LjU2YTIsMiwwLDAsMCwyLDJoNy41N2EyLDIsMCwwLDAsMi0yVjE0Mi44MWwyMS4zMywyOC44YTIsMiwwLDAsMCwuNTIuNTJoMGwuMTIuMDguMDYsMCwuMS4wNS4xLDAsLjA3LDAsLjE0LDBoMGEyLjQyLDIuNDIsMCwwLDAsLjU0LjA3aDcuNTJhMiwyLDAsMCwwLDItMlYxMjMuODlBMiwyLDAsMCwwLDE4OS44NCwxMjEuODVaIi8+PC9nPjwvZz48L3N2Zz4=",Y4="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwMCIgaGVpZ2h0PSIxMDAwIiB2aWV3Qm94PSIwIDAgMTAwMCAxMDAwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cmVjdCB3aWR0aD0iMTAwMCIgaGVpZ2h0PSIxMDAwIiByeD0iMjAwIiBmaWxsPSIjODU1RENEIi8+CjxwYXRoIGQ9Ik0yNTcuNzc4IDE1NS41NTZINzQyLjIyMlY4NDQuNDQ0SDY3MS4xMTFWNTI4Ljg4OUg2NzAuNDE0QzY2Mi41NTQgNDQxLjY3NyA1ODkuMjU4IDM3My4zMzMgNTAwIDM3My4zMzNDNDEwLjc0MiAzNzMuMzMzIDMzNy40NDYgNDQxLjY3NyAzMjkuNTg2IDUyOC44ODlIMzI4Ljg4OVY4NDQuNDQ0SDI1Ny43NzhWMTU1LjU1NloiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0xMjguODg5IDI1My4zMzNMMTU3Ljc3OCAzNTEuMTExSDE4Mi4yMjJWNzQ2LjY2N0MxNjkuOTQ5IDc0Ni42NjcgMTYwIDc1Ni42MTYgMTYwIDc2OC44ODlWNzk1LjU1NkgxNTUuNTU2QzE0My4yODMgNzk1LjU1NiAxMzMuMzMzIDgwNS41MDUgMTMzLjMzMyA4MTcuNzc4Vjg0NC40NDRIMzgyLjIyMlY4MTcuNzc4QzM4Mi4yMjIgODA1LjUwNSAzNzIuMjczIDc5NS41NTYgMzYwIDc5NS41NTZIMzU1LjU1NlY3NjguODg5QzM1NS41NTYgNzU2LjYxNiAzNDUuNjA2IDc0Ni42NjcgMzMzLjMzMyA3NDYuNjY3SDMwNi42NjdWMjUzLjMzM0gxMjguODg5WiIgZmlsbD0id2hpdGUiLz4KPHBhdGggZD0iTTY3NS41NTYgNzQ2LjY2N0M2NjMuMjgzIDc0Ni42NjcgNjUzLjMzMyA3NTYuNjE2IDY1My4zMzMgNzY4Ljg4OVY3OTUuNTU2SDY0OC44ODlDNjM2LjYxNiA3OTUuNTU2IDYyNi42NjcgODA1LjUwNSA2MjYuNjY3IDgxNy43NzhWODQ0LjQ0NEg4NzUuNTU2VjgxNy43NzhDODc1LjU1NiA4MDUuNTA1IDg2NS42MDYgNzk1LjU1NiA4NTMuMzMzIDc5NS41NTZIODQ4Ljg4OVY3NjguODg5Qzg0OC44ODkgNzU2LjYxNiA4MzguOTQgNzQ2LjY2NyA4MjYuNjY3IDc0Ni42NjdWMzUxLjExMUg4NTEuMTExTDg4MCAyNTMuMzMzSDcwMi4yMjJWNzQ2LjY2N0g2NzUuNTU2WiIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==",F4="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTAwMHB4IiBoZWlnaHQ9IjEwMDBweCIgdmlld0JveD0iMCAwIDEwMDAgMTAwMCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggNTMuMiAoNzI2NDMpIC0gaHR0cHM6Ly9za2V0Y2hhcHAuY29tIC0tPgogICAgPHRpdGxlPkFydGJvYXJkPC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IHgxPSI1MCUiIHkxPSIwJSIgeDI9IjUwJSIgeTI9Ijk5LjI1ODM0MDQlIiBpZD0ibGluZWFyR3JhZGllbnQtMSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiMyQUFCRUUiIG9mZnNldD0iMCUiPjwvc3RvcD4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzIyOUVEOSIgb2Zmc2V0PSIxMDAlIj48L3N0b3A+CiAgICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KICAgIDxnIGlkPSJBcnRib2FyZCIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGNpcmNsZSBpZD0iT3ZhbCIgZmlsbD0idXJsKCNsaW5lYXJHcmFkaWVudC0xKSIgY3g9IjUwMCIgY3k9IjUwMCIgcj0iNTAwIj48L2NpcmNsZT4KICAgICAgICA8cGF0aCBkPSJNMjI2LjMyODQxOSw0OTQuNzIyMDY5IEMzNzIuMDg4NTczLDQzMS4yMTY2ODUgNDY5LjI4NDgzOSwzODkuMzUwMDQ5IDUxNy45MTcyMTYsMzY5LjEyMjE2MSBDNjU2Ljc3MjUzNSwzMTEuMzY3NDMgNjg1LjYyNTQ4MSwzMDEuMzM0ODE1IDcwNC40MzE0MjcsMzAxLjAwMzUzMiBDNzA4LjU2NzYyMSwzMDAuOTMwNjcgNzE3LjgxNTgzOSwzMDEuOTU1NzQzIDcyMy44MDY0NDYsMzA2LjgxNjcwNyBDNzI4Ljg2NDc5NywzMTAuOTIxMjEgNzMwLjI1NjU1MiwzMTYuNDY1ODEgNzMwLjkyMjU1MSwzMjAuMzU3MzI5IEM3MzEuNTg4NTUxLDMyNC4yNDg4NDggNzMyLjQxNzg3OSwzMzMuMTEzODI4IDczMS43NTg2MjYsMzQwLjA0MDY2NiBDNzI0LjIzNDAwNyw0MTkuMTAyNDg2IDY5MS42NzUxMDQsNjEwLjk2NDY3NCA2NzUuMTEwOTgyLDY5OS41MTUyNjcgQzY2OC4xMDIwOCw3MzYuOTg0MzQyIDY1NC4zMDEzMzYsNzQ5LjU0NzUzMiA2NDAuOTQwNjE4LDc1MC43NzcwMDYgQzYxMS45MDQ2ODQsNzUzLjQ0ODkzOCA1ODkuODU2MTE1LDczMS41ODgwMzUgNTYxLjczMzM5Myw3MTMuMTUzMjM3IEM1MTcuNzI2ODg2LDY4NC4zMDY0MTYgNDkyLjg2NjAwOSw2NjYuMzQ5MTgxIDQ1MC4xNTAwNzQsNjM4LjIwMDAxMyBDNDAwLjc4NDQyLDYwNS42Njg3OCA0MzIuNzg2MTE5LDU4Ny43ODkwNDggNDYwLjkxOTQ2Miw1NTguNTY4NTYzIEM0NjguMjgyMDkxLDU1MC45MjE0MjMgNTk2LjIxNTA4LDQzNC41NTY0NzkgNTk4LjY5MTIyNyw0MjQuMDAwMzU1IEM1OTkuMDAwOTEsNDIyLjY4MDEzNSA1OTkuMjg4MzEyLDQxNy43NTg5ODEgNTk2LjM2NDc0LDQxNS4xNjA0MzEgQzU5My40NDExNjgsNDEyLjU2MTg4MSA1ODkuMTI2MjI5LDQxMy40NTA0ODQgNTg2LjAxMjQ0OCw0MTQuMTU3MTk4IEM1ODEuNTk4NzU4LDQxNS4xNTg5NDMgNTExLjI5Nzc5Myw0NjEuNjI1Mjc0IDM3NS4xMDk1NTMsNTUzLjU1NjE4OSBDMzU1LjE1NDg1OCw1NjcuMjU4NjIzIDMzNy4wODA1MTUsNTczLjkzNDkwOCAzMjAuODg2NTI0LDU3My41ODUwNDYgQzMwMy4wMzM5NDgsNTczLjE5OTM1MSAyNjguNjkyNzU0LDU2My40OTA5MjggMjQzLjE2MzYwNiw1NTUuMTkyNDA4IEMyMTEuODUxMDY3LDU0NS4wMTM5MzYgMTg2Ljk2NDQ4NCw1MzkuNjMyNTA0IDE4OS4xMzE1NDcsNTIyLjM0NjMwOSBDMTkwLjI2MDI4Nyw1MTMuMzQyNTg5IDIwMi42NTkyNDQsNTA0LjEzNDUwOSAyMjYuMzI4NDE5LDQ5NC43MjIwNjkgWiIgaWQ9IlBhdGgtMyIgZmlsbD0iI0ZGRkZGRiI+PC9wYXRoPgogICAgPC9nPgo8L3N2Zz4=",Q4="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMjQwMCAyODAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAyNDAwIDI4MDA7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojRkZGRkZGO30KCS5zdDF7ZmlsbDojOTE0NkZGO30KPC9zdHlsZT4KPHRpdGxlPkFzc2V0IDI8L3RpdGxlPgo8Zz4KCTxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iMjIwMCwxMzAwIDE4MDAsMTcwMCAxNDAwLDE3MDAgMTA1MCwyMDUwIDEwNTAsMTcwMCA2MDAsMTcwMCA2MDAsMjAwIDIyMDAsMjAwIAkiLz4KCTxnPgoJCTxnIGlkPSJMYXllcl8xLTIiPgoJCQk8cGF0aCBjbGFzcz0ic3QxIiBkPSJNNTAwLDBMMCw1MDB2MTgwMGg2MDB2NTAwbDUwMC01MDBoNDAwbDkwMC05MDBWMEg1MDB6IE0yMjAwLDEzMDBsLTQwMCw0MDBoLTQwMGwtMzUwLDM1MHYtMzUwSDYwMFYyMDBoMTYwMAoJCQkJVjEzMDB6Ii8+CgkJCTxyZWN0IHg9IjE3MDAiIHk9IjU1MCIgY2xhc3M9InN0MSIgd2lkdGg9IjIwMCIgaGVpZ2h0PSI2MDAiLz4KCQkJPHJlY3QgeD0iMTE1MCIgeT0iNTUwIiBjbGFzcz0ic3QxIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjYwMCIvPgoJCTwvZz4KCTwvZz4KPC9nPgo8L3N2Zz4K",H4="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgNjUgNjUiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI0IiIHg9Ii41IiB5PSIuNSIvPjxkZWZzPjxsaW5lYXJHcmFkaWVudCBpZD0iQSIgeDI9IjUwJSIgeDE9IjUwJSIgeTI9IjEwMCUiIHkxPSIwJSI+PHN0b3Agc3RvcC1jb2xvcj0iIzExMWQyZSIgb2Zmc2V0PSIwJSIvPjxzdG9wIHN0b3AtY29sb3I9IiMwNTE4MzkiIG9mZnNldD0iMjEuMiUiLz48c3RvcCBzdG9wLWNvbG9yPSIjMGExYjQ4IiBvZmZzZXQ9IjQwLjclIi8+PHN0b3Agc3RvcC1jb2xvcj0iIzEzMmU2MiIgb2Zmc2V0PSI1OC4xJSIvPjxzdG9wIHN0b3AtY29sb3I9IiMxNDRiN2UiIG9mZnNldD0iNzMuOCUiLz48c3RvcCBzdG9wLWNvbG9yPSIjMTM2NDk3IiBvZmZzZXQ9Ijg3LjMlIi8+PHN0b3Agc3RvcC1jb2xvcj0iIzEzODdiOCIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHN5bWJvbCBpZD0iQiI+PGc+PHBhdGggZD0iTTEuMzA1IDQxLjIwMkM1LjI1OSA1NC4zODYgMTcuNDg4IDY0IDMxLjk1OSA2NGMxNy42NzMgMCAzMi0xNC4zMjcgMzItMzJzLTE0LjMyNy0zMi0zMi0zMkMxNS4wMDEgMCAxLjEyNCAxMy4xOTMuMDI4IDI5Ljg3NGMyLjA3NCAzLjQ3NyAyLjg3OSA1LjYyOCAxLjI3NSAxMS4zMjh6IiBmaWxsPSJ1cmwoI0EpIi8+PHBhdGggZD0iTTMwLjMxIDIzLjk4NWwuMDAzLjE1OC03LjgzIDExLjM3NWMtMS4yNjgtLjA1OC0yLjU0LjE2NS0zLjc0OC42NjJhOC4xNCA4LjE0IDAgMCAwLTEuNDk4LjhMLjA0MiAyOS44OTNzLS4zOTggNi41NDYgMS4yNiAxMS40MjRsMTIuMTU2IDUuMDE2Yy42IDIuNzI4IDIuNDggNS4xMiA1LjI0MiA2LjI3YTguODggOC44OCAwIDAgMCAxMS42MDMtNC43ODIgOC44OSA4Ljg5IDAgMCAwIC42ODQtMy42NTZMNDIuMTggMzYuMTZsLjI3NS4wMDVjNi43MDUgMCAxMi4xNTUtNS40NjYgMTIuMTU1LTEyLjE4cy01LjQ0LTEyLjE2LTEyLjE1NS0xMi4xNzRjLTYuNzAyIDAtMTIuMTU1IDUuNDYtMTIuMTU1IDEyLjE3NHptLTEuODggMjMuMDVjLTEuNDU0IDMuNS01LjQ2NiA1LjE0Ny04Ljk1MyAzLjY5NGE2Ljg0IDYuODQgMCAwIDEtMy41MjQtMy4zNjJsMy45NTcgMS42NGE1LjA0IDUuMDQgMCAwIDAgNi41OTEtMi43MTkgNS4wNSA1LjA1IDAgMCAwLTIuNzE1LTYuNjAxbC00LjEtMS42OTVjMS41NzgtLjYgMy4zNzItLjYyIDUuMDUuMDc3IDEuNy43MDMgMyAyLjAyNyAzLjY5NiAzLjcycy42OTIgMy41Ni0uMDEgNS4yNDZNNDIuNDY2IDMyLjFhOC4xMiA4LjEyIDAgMCAxLTguMDk4LTguMTEzIDguMTIgOC4xMiAwIDAgMSA4LjA5OC04LjExMSA4LjEyIDguMTIgMCAwIDEgOC4xIDguMTExIDguMTIgOC4xMiAwIDAgMS04LjEgOC4xMTNtLTYuMDY4LTguMTI2YTYuMDkgNi4wOSAwIDAgMSA2LjA4LTYuMDk1YzMuMzU1IDAgNi4wODQgMi43MyA2LjA4NCA2LjA5NWE2LjA5IDYuMDkgMCAwIDEtNi4wODQgNi4wOTMgNi4wOSA2LjA5IDAgMCAxLTYuMDgxLTYuMDkzeiIvPjwvZz48L3N5bWJvbD48L3N2Zz4=",Z4="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTA2IiBoZWlnaHQ9IjEwNiIgdmlld0JveD0iMCAwIDEwNiAxMDYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxjaXJjbGUgY3g9IjUzIiBjeT0iNTMiIHI9IjUzIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTUyLjg1NCA0QzI1LjgzOSA0IDQgMjYgNCA1My4yMTdDNCA3NC45NzMgMTcuOTkzIDkzLjM4OSAzNy40MDUgOTkuOTA3QzM5LjgzMiAxMDAuMzk3IDQwLjcyMSA5OC44NDggNDAuNzIxIDk3LjU0NUM0MC43MjEgOTYuNDA0IDQwLjY0MSA5Mi40OTMgNDAuNjQxIDg4LjQxOEMyNy4wNTEgOTEuMzUyIDI0LjIyMSA4Mi41NTEgMjQuMjIxIDgyLjU1MUMyMi4wMzcgNzYuODQ3IDE4LjgwMSA3NS4zODEgMTguODAxIDc1LjM4MUMxNC4zNTMgNzIuMzY2IDE5LjEyNSA3Mi4zNjYgMTkuMTI1IDcyLjM2NkMyNC4wNTkgNzIuNjkyIDI2LjY0OCA3Ny40MTggMjYuNjQ4IDc3LjQxOEMzMS4wMTUgODQuOTE0IDM4LjA1MiA4Mi43OTYgNDAuODgzIDgxLjQ5MkM0MS4yODcgNzguMzE0IDQyLjU4MiA3Ni4xMTQgNDMuOTU3IDc0Ljg5MkMzMy4xMTggNzMuNzUxIDIxLjcxNCA2OS41MTQgMjEuNzE0IDUwLjYwOUMyMS43MTQgNDUuMjMxIDIzLjY1NCA0MC44MzEgMjYuNzI4IDM3LjQwOUMyNi4yNDMgMzYuMTg3IDI0LjU0NCAzMS4xMzQgMjcuMjE0IDI0LjM3MUMyNy4yMTQgMjQuMzcxIDMxLjMzOSAyMy4wNjcgNDAuNjQgMjkuNDIzQzQ0LjYyMjEgMjguMzQ1NyA0OC43Mjg4IDI3Ljc5NzYgNTIuODU0IDI3Ljc5M0M1Ni45NzkgMjcuNzkzIDYxLjE4NCAyOC4zNjQgNjUuMDY3IDI5LjQyM0M3NC4zNjkgMjMuMDY3IDc4LjQ5NCAyNC4zNzEgNzguNDk0IDI0LjM3MUM4MS4xNjQgMzEuMTM0IDc5LjQ2NCAzNi4xODcgNzguOTc5IDM3LjQwOUM4Mi4xMzQgNDAuODMxIDgzLjk5NCA0NS4yMzEgODMuOTk0IDUwLjYwOUM4My45OTQgNjkuNTE0IDcyLjU5IDczLjY2OSA2MS42NyA3NC44OTJDNjMuNDUgNzYuNDQgNjQuOTg2IDc5LjM3MyA2NC45ODYgODQuMDE4QzY0Ljk4NiA5MC42MTggNjQuOTA2IDk1LjkxNSA2NC45MDYgOTcuNTQ0QzY0LjkwNiA5OC44NDggNjUuNzk2IDEwMC4zOTcgNjguMjIyIDk5LjkwOEM4Ny42MzQgOTMuMzg4IDEwMS42MjcgNzQuOTczIDEwMS42MjcgNTMuMjE3QzEwMS43MDcgMjYgNzkuNzg4IDQgNTIuODU0IDRaIiBmaWxsPSIjMjQyOTJGIi8+Cjwvc3ZnPgo=",G4="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIwIiBoZWlnaHQ9IjMyMCIgdmlld0JveD0iMCAwIDMyMCAzMjAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIzMjAiIGhlaWdodD0iMzIwIiByeD0iMjQiIGZpbGw9ImJsYWNrIi8+CjxwYXRoIGQ9Ik0xNzcuMzE1IDE0NS4zMzVMMjQ1LjA2OCA2N0gyMjkuMDEzTDE3MC4xODIgMTM1LjAxN0wxMjMuMTk1IDY3SDY5TDE0MC4wNTUgMTY5Ljg1NEw2OSAyNTJIODUuMDU2M0wxNDcuMTgzIDE4MC4xNzJMMTk2LjgwNSAyNTJIMjUxTDE3Ny4zMTEgMTQ1LjMzNUgxNzcuMzE1Wk0xNTUuMzIzIDE3MC43NkwxNDguMTI0IDE2MC41MThMOTAuODQxNyA3OS4wMjJIMTE1LjUwM0wxNjEuNzMxIDE0NC43OTJMMTY4LjkzIDE1NS4wMzRMMjI5LjAyIDI0MC41MjVIMjA0LjM1OUwxNTUuMzIzIDE3MC43NjRWMTcwLjc2WiIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==",q4="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMjAwIDEyMDAiIHhtbDpzcGFjZT0icHJlc2VydmUiPgogIDxwYXRoIGQ9Ik02MzYgMTIwMWMtMjMuMDIgMC00Ni4wNDIgMC02OS42OTctLjQwOC05Ljc5NC0xLjEzNS0xOC45OTYtMS41MTgtMjguMTAxLTIuNjY1LTE2LjQyNC0yLjA2Ny0zMi45Ni0zLjc3NS00OS4xNC03LjEyNi0yMS42OTYtNC40OTQtNDMuMjM2LTkuOTA3LTY0LjU4OS0xNS44NDItMjQuMjYtNi43NDMtNDcuNjQ1LTE2LjAyLTcwLjU3Ny0yNi40OC0yNi4yMjYtMTEuOTYzLTUxLjkxMy0yNC45NjQtNzUuNzk4LTQxLjA5OC0xOC43NDYtMTIuNjYzLTM3LjA1Ny0yNi4wNC01NC44OTktMzkuOTQ4LTEzLjU1LTEwLjU2My0yNi43MjktMjEuNzkxLTM4Ljg2Ni0zMy45My0xNi4xOS0xNi4xOS0zMS42NTgtMzMuMTYyLTQ2LjU4Mi01MC41MzItMTAuOTY1LTEyLjc2Mi0yMS4yMS0yNi4yNjUtMzAuNTk3LTQwLjIzLTExLjM3OS0xNi45MjUtMjIuMTc4LTM0LjMyMS0zMi4wMS01Mi4xODUtMTAuMTM2LTE4LjQyLTE5LjYyOC0zNy4yOTUtMjcuOTE3LTU2LjYwOC0xMC43NDEtMjUuMDI1LTE5LjkzMS01MC43MjQtMjYuMjE0LTc3LjMwNy00LjU5Mi0xOS40MjctOS4yOTgtMzguODYzLTEyLjgxMy01OC40OTktMi42NjYtMTQuODkyLTMuNS0zMC4xMS01LjI3Mi00NS4xNjdDMi44MDQgNjUxLjkyMiAxLjY2NiA2NTAuOTg5IDEgNjUwYzAtLjQ0NCAwLS44ODkuMzk5LTEuODIuMTMzLTMuNzE4LS4xMzMtNi45NS0uMzk5LTEwLjE4IDAtMjQuMzU0IDAtNDguNzA4LjM5OS03My42ODUuMTMzLTMuODUzLS4xMzMtNy4wODQtLjM5OS0xMC4zMTUgMC0uNDQ0IDAtLjg4OS4zOTEtMS43OS43OTUtMS4xMzggMS40ODUtMS43ODkgMS41Ni0yLjUwMy43NC03LjE1NiAxLjI0Ni0xNC4zMzggMi4wOC0yMS40ODIgMS4yMjgtMTAuNSAyLjAyOS0yMS4xMDcgNC4xNjMtMzEuNDMgMy44MS0xOC40MjYgOC4zMDMtMzYuNzE3IDEyLjgyNy01NC45ODYgNy44ODUtMzEuODQgMTkuNDA0LTYyLjQ2NyAzMy4yMTMtOTIuMTExIDE1LjM3NS0zMy4wMDcgMzMuMzUzLTY0LjU4NCA1NC41MjMtOTQuMzg1IDE2LjM2NC0yMy4wMzYgMzQuMTc3LTQ0LjggNTMuMjE3LTY1LjU2NSA5LjczNS0xMC42MTcgMjAuNTg5LTIwLjIxMyAzMS4wMS0zMC4xOTUgMTcuMjMtMTYuNTA2IDM1Ljg4Mi0zMS4yNSA1NS4xNDItNDUuMzMgMjEuODk3LTE2LjAwOSA0NC42NDctMzAuNjc4IDY4LjczLTQzLjAxIDIwLjgyOC0xMC42NjggNDIuMTE4LTIwLjY2NSA2My45LTI5LjE3NyAyMS43NDUtOC40OTggNDQuMTcxLTE1LjQyNiA2Ni42MzYtMjEuODYzIDIzLjkyMS02Ljg1NCA0OC4zNTQtMTEuNzI4IDczLjE5LTE0LjE4IDEzLjgyNC0xLjM2NSAyNy42NTgtMi42NSA0MS40ODItNC4wMjQgMS0uMSAxLjk1OC0uNjM2IDIuOTM2LS45NjkgMjMuMDIgMCA0Ni4wNDIgMCA2OS42OTcuNDA4IDkuNzk3IDEuMTM1IDE5LjAwMyAxLjUxMyAyOC4xMTEgMi42NjYgMTYuMjY0IDIuMDYgMzIuNjM0IDMuNzg5IDQ4LjY1NyA3LjExMyAyMS44NiA0LjUzNiA0My41NzYgOS45MzYgNjUuMSAxNS44ODMgMjQuMjggNi43MSA0Ny42NDEgMTYuMDY5IDcwLjYwNyAyNi40NzQgMjUuOTc2IDExLjc3IDUxLjA4MiAyNS4xMTggNzUuMTUgNDAuMzYgMzIuMDkgMjAuMzI0IDYxLjk2NyA0My42MjYgODkuNTUgNjkuNjk4IDEzLjY5NSAxMi45NDUgMjYuNjIgMjYuNzk2IDM5LjAwNCA0MS4wMTIgMTIuNDkgMTQuMzM5IDI0LjAyNyAyOS41MjMgMzUuNzE1IDQ0LjU0NCAxNi4xNzQgMjAuNzg3IDI5LjczNCA0My4zMjQgNDIuMTc3IDY2LjQ0MiAxOS41ODkgMzYuMzk3IDM1LjU1NCA3NC40MTggNDcuMDc2IDExNC4xNTMgNC43NDEgMTYuMzUyIDguNTM4IDMzLjAxIDEyLjAzOSA0OS42OCAyLjkyNSAxMy45MyA1LjE2NCAyOC4wMzMgNy4wMjQgNDIuMTUgMS44MTUgMTMuNzY4IDIuNzUgMjcuNjUyIDQuMTI0IDQxLjQ4LjEgMS4wMDEuNjM2IDEuOTYuOTY5IDIuOTM3IDAgMjMuMDIgMCA0Ni4wNDItLjQwOCA2OS42OTctMS4xMzUgOS43OTctMS41MTMgMTkuMDAzLTIuNjY2IDI4LjExMS0yLjA2IDE2LjI2NC0zLjgxNyAzMi42MjYtNy4xMDcgNDguNjU5LTQuNDU4IDIxLjcyMS05LjYxMyA0My4zNDctMTUuNjE2IDY0LjY5MS03LjE2MyAyNS40NzItMTYuODc1IDUwLjExLTI4IDc0LjEyNy0xMS45NzggMjUuODU4LTI1LjQ3MyA1MC45MjYtNDAuOTE4IDc0Ljg5M2E1OTguNSA1OTguNSAwIDAgMS02Ny44OSA4Ni42OWMtMTIuOTMzIDEzLjcwNS0yNi43OTIgMjYuNjI0LTQxLjAwOCAzOS4wMDctMTQuMzQgMTIuNDkxLTI5LjUyMyAyNC4wMjgtNDQuNTQ1IDM1LjcxNi0yMC43ODYgMTYuMTc0LTQzLjMyMyAyOS43MzQtNjYuNDQyIDQyLjE3Ny0zNi4zOTcgMTkuNTg5LTc0LjQxOCAzNS41NTQtMTE0LjE1MyA0Ny4wNzYtMTYuMzUyIDQuNzQxLTMzLjAxIDguNTM4LTQ5LjY4IDEyLjAzOS0xMy45MyAyLjkyNS0yOC4wMzQgNS4xNjQtNDIuMTUgNy4wMjUtMTMuNzY4IDEuODE0LTI3LjY1MiAyLjc0OC00MS40OCA0LjEyMy0xLjAwMS4xLTEuOTYuNjM2LTIuOTM3Ljk2OW0xNzkuOTM0LTg1NS45NDhzLS4wMjQuMDg3LjA0LS42NDNjLTEuMjg4LTEuNjctMi42My0zLjMtMy44NTgtNS4wMTQtOS42ODgtMTMuNTE5LTE3Ljk2NS0yNy44Mi0yNC4xMTQtNDMuMzE3LTYuMzMzLTE1Ljk2LTEwLjY0OC0zMi4zOTctMTIuMDA0LTQ5LjU1Ni0uNTA0LTYuMzY3LTEtMTIuNzMzLTEuNTItMTkuMzczLTExLjc1IDAtMjMuNTIgMC0zNS40MzYtLjE4NSAwIDAtLjE4Ni0uMTQ2LS40NjMtLjg4NmwtMy40OTItMzIuODU2SDYwMHY2LjA4NWMwIDE3Ny4wNzktLjAxNyAzNTQuMTU3LjAyOSA1MzEuMjM2LjAwNCAxNS42MDItMy44OTMgMzAuMzE0LTEwLjQ3NiA0NC4xODQtMTEuNjY4IDI0LjU4LTI5LjkxIDQyLjgwNS01NC43NTMgNTQuMzMzLTIzLjU4NiAxMC45NDUtNDcuOTU4IDEzLjY1NC03My4xMzIgNy4xMTMtOC4wNC0yLjA4OS0xNS43ODgtNS4zMDYtMjQuMjY1LTguMjUzLS44LS42OTUtMS42LTEuMzktMi40MjItMi43OS0yNi4xNy00MC43MDctMjguNTk2LTgzLjExMS0yLjI0OC0xMjMuNDc3IDMwLjA1OS00Ni4wNTEgNzQuMjQ5LTYxLjIwOCAxMjcuODktNDcuODc4VjUxNS4zMDdjLTEzLjA1LS4zOTMtMjUuNzQyLS43NzYtMzguNTgtMS4zNDMgMCAwLS4xODctLjE0NS0uMDU4LTEuMDVWNDgxLjQ5Yy0xMS4zODYtLjUwNC0yMi41My0xLjYyMy0zMy42MzYtMS4zMzMtMTQuNDUuMzc2LTI5LjAzOC44NDUtNDMuMjY0IDMuMTQ3LTE3LjE4NiAyLjc4MS0zMy44ODcgNy44NzgtNTAuMTQyIDE0LjU0LTI3LjY5NCAxMS4zNS01Mi42MzkgMjYuODM3LTc0LjQzNCA0Ny4yNzctNy40ODUgNy4wMi0xNC40NzUgMTQuNjA0LTIxLjMwOSAyMi4yNzItMTEuMDY0IDEyLjQxNS0yMC4yMzcgMjYuMTg3LTI4LjI0MiA0MC43NjQtMTEuMzYgMjAuNjg1LTE5Ljk3IDQyLjQ4MS0yNC42NzggNjUuNTU1LTIuNzY1IDEzLjU0OC0zLjgyNyAyNy40NjktNS4xNzMgNDEuMjY5LS42MjcgNi40MzItLjQ0IDEyLjk5Ny0uMDM1IDE5LjQ2NS43NiAxMi4xMTUgMS4wMjkgMjQuMzY3IDMuMTQyIDM2LjI3IDQuODYyIDI3LjM3OCAxMy45ODMgNTMuMzc0IDI3LjggNzcuNjU4IDE0LjY0IDI1LjczIDMzLjAyNCA0OC4zNDMgNTUuNTI1IDY3LjU2MyAzLjkwMSAzLjMzMiA4LjMzMSA2LjA0NiAxMi40ODkgOS4wMzQgMCAwLS4wMTMtLjAyNy4wNC41Ni41OS40OSAxLjE3OC45ODEgMi4wNTggMi4xMTEgMi4yOSAxLjg0MiA0LjU4MSAzLjY4MyA3LjA5MiA2LjA4LjY0Mi40IDEuMjg0Ljc5OCAxLjg0MyAxLjIzIDAgMCAuMDEyLS4wODguMDcuNjAxIDEyLjc3NCAxMC41MjEgMjUuMDEgMjEuNzk0IDM4LjQ0MyAzMS4zOSAyMS4wOCAxNS4wNTYgNDQuNjMgMjUuNDM1IDY5LjUzIDMyLjYxIDE4LjQzIDUuMzEyIDM3LjMxMiA4LjM2MyA1Ni40MTUgOS4zMiAxOC40NzEuOTI3IDM2Ljg2Ny0uNTY4IDU1LjE0NS0zLjc5NSAyNy4wMS00Ljc3IDUyLjQ0OS0xMy43MDcgNzYuNDA0LTI3LjA1OSAyNi4xMDMtMTQuNTQ4IDQ4LjgyNS0zMy4xMjYgNjguMjk3LTU1LjgwNyAxMi44MjktMTQuOTQ0IDI0LjIxLTMwLjkxMyAzMi41MjUtNDguNzAyIDYuNTgtMTQuMDggMTIuMDEyLTI4Ljc2MiAxNy4wMy00My40OTEgNi45MDctMjAuMjY1IDkuODA1LTQxLjQ4IDkuOTAzLTYyLjczMS40MTctOTAuMTQzLjE3Ny0xODAuMjg4LjE3Ny0yNzAuNDMzdi02Ljc0NGM1Ni42NSAzOC45MiAxMTguMDM4IDU4Ljk2NiAxODUuNzQzIDU4Ljk4NXYtMTM0LjUyYy04LjU4Ni0uODc2LTE2LjkwNC0xLjY3Ni0yNS4yMDktMi41OTUtNC41MjQtLjUtOS4wMjUtMS4yMDMtMTQuMDgtMi4wMjUtLjIwNi0uMzE3LS40MTMtLjYzNS0uMjI2LTEuNzE5di0yNy43NDVjLTcuODE4LS44Mi0xNS43ODgtMS42Ni0yMy43NTktMi40ODktMTMuOTE4LTEuNDQ2LTI3LjQ0LTQuNzU4LTQwLjMwNi0xMC4xMDUtMTEuMDE3LTQuNTc4LTIxLjYwNS0xMC4xOS0zMi40NjYtMTUuNDc0IDAgMC0uMjM0LS4yLS42NjQtLjgyM2EyMSAyMSAwIDAgMS0yLjY4LS43MzJjLTEuMTczLTEuMjg4LTIuMzQ2LTIuNTc3LTMuNTMtNC40ODctLjY1OS0uNDM1LTEuMzE4LS44Ny0xLjg4OS0xLjMzIiBzdHlsZT0iLS1kYXJrcmVhZGVyLWlubGluZS1maWxsOnZhcigtLWRhcmtyZWFkZXItYmFja2dyb3VuZC0wMDAwMDAsICMwMDAwMDApOy0tZGFya3JlYWRlci1pbmxpbmUtc3Ryb2tlOm5vbmU7dmlzaWJpbGl0eTp2aXNpYmxlO29wYWNpdHk6MSIgZGF0YS1pbmRleD0iMCIvPgogIDxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik0xIDU1NC40NTRjLjI2NiAyLjc3Ny41MzIgNi4wMDguMzk5IDkuMzkyQzEgNTYwLjk3IDEgNTU3Ljk0IDEgNTU0LjQ1NCIgc3R5bGU9Ii0tZGFya3JlYWRlci1pbmxpbmUtZmlsbDp2YXIoLS1kYXJrcmVhZGVyLXRleHQtZmZmZmZmLCAjZThlNmUzKTstLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZTpub25lO3Zpc2liaWxpdHk6dmlzaWJsZSIgZGF0YS1pbmRleD0iNSIvPgogIDxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik0xIDYzOC40NTRjLjI2NiAyLjc3Ny41MzIgNi4wMDguMzk5IDkuMzkyQzEgNjQ0Ljk3IDEgNjQxLjk0IDEgNjM4LjQ1NCIgc3R5bGU9Ii0tZGFya3JlYWRlci1pbmxpbmUtZmlsbDp2YXIoLS1kYXJrcmVhZGVyLXRleHQtZmZmZmZmLCAjZThlNmUzKTstLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZTpub25lO3Zpc2liaWxpdHk6dmlzaWJsZSIgZGF0YS1pbmRleD0iNiIvPgogIDxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik04MjQuNDYzIDM1Mi4yMjJzLjIzNC4yLjA1NC42MjljNC44OTggNS4zNjIgOS44NTcgMTAuNDI1IDE1LjA3NSAxNS4yMDYgMTUuMjUgMTMuOTcxIDMyLjY5NCAyNC41NTYgNTEuOTIzIDMxLjk2NCA5LjUxNCAzLjY2NiAxOS41MyA2LjAyOSAyOS4zMTkgOC45OC4yMDcuMzE5LjQxNC42MzcuODkzIDEuNTE3LjI3MiAzNS4xMzUuMjcyIDY5LjcwOC4yNzIgMTA0LjU3OS0zMy44NjYtLjA1Ni02Ni4yMDMtNS4wODctOTcuNzc1LTE1LjEyNC0zMS41MTYtMTAuMDItNjAuNzIyLTI0Ljc0NS04OC4yMjQtNDMuOTcyIDAgMS41NDYuMDAzIDIuMzY1IDAgMy4xODQtLjMzMyA5NC4yMzUtLjU3NiAxODguNDctMS4xMzEgMjgyLjcwMy0uMDYgMTAuMTIxLTEuMjA0IDIwLjM3My0zLjEyOCAzMC4zMTctMy41NTMgMTguMzU1LTkuMDQ5IDM2LjE1LTE2LjQ2IDUzLjQ0Mi0xMS4xMzkgMjUuOTkxLTI2LjI5IDQ5LjI4OS00NS41MTMgNjkuODAxLTkuMzMgOS45NTYtMTkuNTczIDE5LjMxLTMwLjUxOCAyNy40MzQtMTIuODk5IDkuNTc1LTI2LjU4OCAxOC4yOS00MC42OTQgMjUuOTg0YTE5MC4zIDE5MC4zIDAgMCAxLTU1LjMxIDE5LjgzOGMtMTUuODY4IDMuMDQxLTMyLjA0OCA0LjY4LTQ4LjE2NCA2LjExOC03LjgzNy42OTgtMTUuODk5LS4wMDgtMjMuNzYtLjkyNi0xMy45MzQtMS42MjctMjcuOTY3LTMuMTAyLTQxLjY0NC02LjA4NS0yMi42OS00Ljk0OC00NC4wNzEtMTMuNjQyLTY0LjExMi0yNS41My00LjY1OS0yLjc2My05LjY1My00Ljk2LTE0LjQ5My03LjQxOCAwIDAtLjAxMi4wODcuMjE0LS4yNjctLjYxMy0uNzEyLTEuNDUtMS4wNzEtMi4yOS0xLjQzLTIuMjktMS44NDItNC41OC0zLjY4My02Ljk2NS02LjIxLS43MzQtMS4xMjktMS4zNzYtMS41Ny0yLjAxNy0yLjAxMyAwIDAgLjAxMy4wMjcuMjAzLS4zMDYtLjk1NS0xLjkzOS0xLjk4Mi0zLjY0NC0zLjI2Mi01LjEzMi0xNC44NTEtMTcuMjc1LTI2LjU3Ni0zNi40NjgtMzUuOTQ0LTU3LjIyLTExLjc2NS0yNi4wNjYtMTkuMDc1LTUzLjM5NS0yMC42OC04MS43ODgtMS4wNS0xOC41OTQtLjAwOS0zNy40NzggMi4wMS01Ni4wMjQgMS45MzgtMTcuODE4IDcuMTE4LTM1LjEzMSAxMy42LTUxLjk4NSAxMS4yMDUtMjkuMTI2IDI3LjI3Ni01NS4yODUgNDguNDQtNzguMDY0IDEwLjA4NC0xMC44NTQgMjEuMzI1LTIwLjgxMiAzMi45NjgtMzAuMDAzIDE5LjUwNy0xNS4zOTkgNDEuMjMzLTI3LjA3MiA2NC42OTUtMzUuNTU0IDI1LjgyOC05LjMzNyA1Mi40MDMtMTQuMzAyIDc5LjgxMS0xNS4wNDggMCAwIC4xODYuMTQ1LjE3OS42OS0uMDA3IDM1LjQ1OS0uMDA3IDcwLjM3NC0uMDA3IDEwNS4yMjctOS4xNzQtMS42NDMtMTcuNzQ2LTMuODQ2LTI2LjQ0Mi00LjU4LTEzLjY3Ni0xLjE1NC0yNy4xNy43MjMtNDAuMzIgNC44NTUtMjcuODg4IDguNzY0LTQ5LjQwMSAyNS44My02NC4xMDYgNTAuODgtMTIuNzg5IDIxLjc4Ni0xNy42MzcgNDUuNDY5LTE0LjI3NyA3MC44MTUgMi4wNyAxNS42MTggNy4wMDggMzAuMDc2IDE1LjE4OSA0My4zOTQgMTAuNjYgMTcuMzUzIDI0Ljc1IDMxLjIzNiA0Mi45MyA0MC43MzQuOC42OTYgMS42IDEuMzkxIDIuNzEyIDIuNTU0IDcuNDU1IDEwLjUyMiAxNi4zMzYgMTguODE3IDI2LjUzNSAyNS42MzcgMjUuNDA2IDE2Ljk4OSA1My4zMjIgMjMuNTA5IDgzLjM5NiAxNy43OTMgMzAuNDQtNS43ODUgNTQuNDk3LTIyLjE4NyA3Mi4xOTMtNDcuNTE2IDExLjI3NS0xNi4xMzkgMTguODUxLTM0LjMyOCAxOC45MzgtNTMuOTgyLjcyOC0xNjQuMTg0Ljg5My0zMjguMzcgMS4yMi00OTIuNTU2LjAzLTE1LjE1OC4wMDQtMzAuMzE3LjAwNC00NS40NzZWMjI3YzIuNSAwIDQuNDU5LjAwMyA2LjQxNyAwbDkyLjQ0LS4xODJzLjE4NS4xNDYuMTc4LjYzOGMtLjAxMS45OS0uMTE4IDEuNTE1LS4wMDYgMS45ODYgNC41MjMgMTkuMDI3IDEwLjY0MiAzNy4zOCAyMC4zMzQgNTQuNTY3IDExLjg2OCAyMS4wNDggMjcuMzMgMzguOTA3IDQ1LjY3NiA1NC4zODUgMy4yMjUgMi43MiA3LjIyNyA0LjUyIDEwLjg3IDYuNzQ1IDAgMCAuMDI1LS4wODctLjIyOC4yMzYuNTQ5Ljc1OCAxLjM1MSAxLjE5MyAyLjE1MyAxLjYyOGEyMTMgMjEzIDAgMCAwIDQuMDUgNC4zNTdjMS4yMTUuNjE1IDEuODk3LjczOSAyLjU3OS44NjIiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLWZpbGw6dmFyKC0tZGFya3JlYWRlci1iYWNrZ3JvdW5kLWZmZmZmZiwgIzE4MWExYik7LS1kYXJrcmVhZGVyLWlubGluZS1zdHJva2U6bm9uZTtvcGFjaXR5OjEiIGRhdGEtaW5kZXg9IjciLz4KICA8cGF0aCBmaWxsPSIjRkUyQzU1IiBkPSJNMzUxLjEwMiA5MzUuMjA3YzQuODEgMi4xMTMgOS44MDUgNC4zMSAxNC40NjQgNy4wNzQgMjAuMDQgMTEuODg4IDQxLjQyMyAyMC41ODIgNjQuMTEyIDI1LjUzIDEzLjY3NyAyLjk4MyAyNy43MSA0LjQ1OCA0MS42NDUgNi4wODUgNy44Ni45MTggMTUuOTIyIDEuNjI0IDIzLjc1OS45MjYgMTYuMTE2LTEuNDM3IDMyLjI5Ni0zLjA3NyA0OC4xNjQtNi4xMThhMTkwLjMgMTkwLjMgMCAwIDAgNTUuMzEtMTkuODM4YzE0LjEwNi03LjY5NSAyNy43OTUtMTYuNDA5IDQwLjY5NC0yNS45ODQgMTAuOTQ1LTguMTI1IDIxLjE4Ny0xNy40NzggMzAuNTE4LTI3LjQzNCAxOS4yMjMtMjAuNTEyIDM0LjM3NC00My44MSA0NS41MTMtNjkuOCA3LjQxMS0xNy4yOTQgMTIuOTA3LTM1LjA4OCAxNi40Ni01My40NDMgMS45MjQtOS45NDQgMy4wNjgtMjAuMTk2IDMuMTI4LTMwLjMxNy41NTUtOTQuMjMzLjc5OC0xODguNDY4IDEuMTMtMjgyLjcwMy4wMDQtLjgyLjAwMS0xLjYzOC4wMDEtMy4xODQgMjcuNTAyIDE5LjIyNyA1Ni43MDggMzMuOTUzIDg4LjIyNCA0My45NzIgMzEuNTcyIDEwLjAzNyA2My45MSAxNS4wNjggOTcuNzc1IDE1LjEyNGwtLjAwMS0xMDQuNDc0YzQuNTEuMTU0IDkuMDEyLjg1NyAxMy41MzYgMS4zNTcgOC4zMDUuOTE5IDE2LjYyMyAxLjcxOSAyNS4yMDkgMi41OTZ2MTM0LjUxOWMtNjcuNzA1LS4wMi0xMjkuMDkzLTIwLjA2Ni0xODUuNzQzLTU4Ljk4NXY2Ljc0NGMwIDkwLjE0NS4yNCAxODAuMjktLjE3NyAyNzAuNDMzLS4wOTggMjEuMjUxLTIuOTk2IDQyLjQ2Ni05LjkwMiA2Mi43My01LjAyIDE0LjczLTEwLjQ1IDI5LjQxMi0xNy4wMzEgNDMuNDkyLTguMzE0IDE3Ljc4OS0xOS42OTYgMzMuNzU4LTMyLjUyNSA0OC43MDItMTkuNDcyIDIyLjY4LTQyLjE5NCA0MS4yNTktNjguMjk3IDU1LjgwNy0yMy45NTUgMTMuMzUyLTQ5LjM5NSAyMi4yOS03Ni40MDQgMjcuMDU5LTE4LjI3OCAzLjIyNy0zNi42NzQgNC43MjItNTUuMTQ1IDMuNzk2LTE5LjEwMy0uOTU4LTM3Ljk4NC00LjAwOS01Ni40MTUtOS4zMi0yNC45LTcuMTc2LTQ4LjQ1LTE3LjU1NS02OS41My0zMi42MTEtMTMuNDM0LTkuNTk2LTI1LjY3LTIwLjg2OS0zOC40NzItMzEuNzM1IiBzdHlsZT0iLS1kYXJrcmVhZGVyLWlubGluZS1maWxsOnZhcigtLWRhcmtyZWFkZXItYmFja2dyb3VuZC1mZTJjNTUsICNiMTAxMjMpOy0tZGFya3JlYWRlci1pbmxpbmUtc3Ryb2tlOm5vbmU7dmlzaWJpbGl0eTp2aXNpYmxlO29wYWNpdHk6MSIgZGF0YS1pbmRleD0iOCIvPgogIDxwYXRoIGZpbGw9IiMyNUY0RUUiIGQ9Ik03MzguNzE4IDIyNi40NDhjLTMwLjY3NS40MzEtNjEuNDg4LjQ5Mi05Mi4zMDEuNTUxLTEuOTU4LjAwNC0zLjkxNi4wMDEtNi40MTcuMDAxdjUuMjg4YzAgMTUuMTU5LjAyNiAzMC4zMTgtLjAwNCA0NS40NzYtLjMyNyAxNjQuMTg2LS40OTIgMzI4LjM3Mi0xLjIyIDQ5Mi41NTYtLjA4NyAxOS42NTQtNy42NjMgMzcuODQzLTE4LjkzOCA1My45ODItMTcuNjk2IDI1LjMyOS00MS43NTMgNDEuNzMtNzIuMTkzIDQ3LjUxNi0zMC4wNzQgNS43MTYtNTcuOTktLjgwNC04My4zOTYtMTcuNzkzLTEwLjE5OS02LjgyLTE5LjA4LTE1LjExNS0yNi4yMzctMjUuNTE0IDcuODY4IDIuMzU2IDE1LjYxNiA1LjU3MyAyMy42NTYgNy42NjIgMjUuMTc0IDYuNTQxIDQ5LjU0NiAzLjgzMiA3My4xMzItNy4xMTMgMjQuODQzLTExLjUyOCA0My4wODUtMjkuNzUzIDU0Ljc1My01NC4zMzMgNi41ODMtMTMuODcgMTAuNDgtMjguNTgyIDEwLjQ3Ni00NC4xODQtLjA0Ni0xNzcuMDc5LS4wMjktMzU0LjE1Ny0uMDI5LTUzMS4yMzZ2LTYuMDg1aDEzNS4wODdjMS4xODIgMTEuMTE1IDIuMzM3IDIxLjk4NSAzLjYzIDMzLjIyNiIgc3R5bGU9Ii0tZGFya3JlYWRlci1pbmxpbmUtZmlsbDp2YXIoLS1kYXJrcmVhZGVyLWJhY2tncm91bmQtMjVmNGVlLCAjMDliM2IwKTstLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZTpub25lO29wYWNpdHk6MSIgZGF0YS1pbmRleD0iOSIvPgogIDxwYXRoIGZpbGw9IiMyNUY0RUUiIGQ9Ik01MjEuOTIgNTEzLjM2N2MtMjcuNDcyIDEuMTk4LTU0LjA0NyA2LjE2My03OS44NzUgMTUuNS0yMy40NjIgOC40ODItNDUuMTg4IDIwLjE1NS02NC42OTUgMzUuNTU0LTExLjY0MyA5LjE5MS0yMi44ODQgMTkuMTQ5LTMyLjk2OSAzMC4wMDMtMjEuMTYzIDIyLjc3OS0zNy4yMzQgNDguOTM4LTQ4LjQzOCA3OC4wNjQtNi40ODMgMTYuODU0LTExLjY2MyAzNC4xNjctMTMuNjAyIDUxLjk4NS0yLjAxOCAxOC41NDYtMy4wNTkgMzcuNDMtMi4wMDggNTYuMDI0IDEuNjA0IDI4LjM5MyA4LjkxNCA1NS43MjIgMjAuNjggODEuNzg4IDkuMzY3IDIwLjc1MiAyMS4wOTIgMzkuOTQ1IDM1Ljk0MyA1Ny4yMiAxLjI4IDEuNDg4IDIuMzA3IDMuMTkzIDMuMjc2IDUuMTM3LTQuMzYyLTIuNjYtOC43OTItNS4zNzQtMTIuNjkzLTguNzA2LTIyLjUwMS0xOS4yMi00MC44ODUtNDEuODMyLTU1LjUyNS02Ny41NjMtMTMuODE3LTI0LjI4NC0yMi45MzgtNTAuMjgtMjcuOC03Ny42NTgtMi4xMTMtMTEuOTAzLTIuMzgyLTI0LjE1NS0zLjE0Mi0zNi4yNy0uNDA2LTYuNDY4LS41OTItMTMuMDMzLjAzNS0xOS40NjUgMS4zNDYtMTMuOCAyLjQwOC0yNy43MjEgNS4xNzMtNDEuMjY5IDQuNzA5LTIzLjA3NCAxMy4zMTktNDQuODcgMjQuNjc4LTY1LjU1NSA4LjAwNS0xNC41NzcgMTcuMTc4LTI4LjM1IDI4LjI0Mi00MC43NjQgNi44MzQtNy42NjggMTMuODI0LTE1LjI1MyAyMS4zMDktMjIuMjcyIDIxLjc5NS0yMC40NCA0Ni43NC0zNS45MjcgNzQuNDM0LTQ3LjI3NyAxNi4yNTUtNi42NjIgMzIuOTU2LTExLjc1OSA1MC4xNDItMTQuNTQgMTQuMjI2LTIuMzAyIDI4LjgxMy0yLjc3IDQzLjI2NC0zLjE0NyAxMS4xMDctLjI5IDIyLjI1LjgyOSAzMy42MzYgMS4zMzMgMCAxMS4xNDUgMCAyMS4yODUtLjA2NCAzMS44NzgiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLWZpbGw6dmFyKC0tZGFya3JlYWRlci1iYWNrZ3JvdW5kLTI1ZjRlZSwgIzA5YjNiMCk7LS1kYXJrcmVhZGVyLWlubGluZS1zdHJva2U6dmFyKC0tZGFya3JlYWRlci10ZXh0LTBkOTlmZiwgIzIzYTNmZik7b3BhY2l0eToxIiBkYXRhLWluZGV4PSIxMCIvPgogIDxwYXRoIGZpbGw9IiNGRTJDNTUiIGQ9Ik00MzQuOTkyIDgyNS40ODJjLTE4LjE3LTkuMTQ2LTMyLjI2LTIzLjAyOS00Mi45Mi00MC4zODItOC4xOC0xMy4zMTgtMTMuMTItMjcuNzc2LTE1LjE5LTQzLjM5NC0zLjM1OS0yNS4zNDYgMS40OS00OS4wMjkgMTQuMjc4LTcwLjgxNSAxNC43MDUtMjUuMDUgMzYuMjE4LTQyLjExNiA2NC4xMDYtNTAuODggMTMuMTUtNC4xMzIgMjYuNjQ0LTYuMDA5IDQwLjMyLTQuODU1IDguNjk2LjczNCAxNy4yNjggMi45MzcgMjYuNDQyIDQuNTggMC0zNC44NTMgMC02OS43NjguMDgtMTA1LjEzNSAxMi43NzMtLjA3IDI1LjQ2Ni4zMTMgMzguNTE0LjcwNnYxMzguNDY4Yy01My42NC0xMy4zMy05Ny44MyAxLjgyNy0xMjcuODkgNDcuODc4LTI2LjM0NyA0MC4zNjYtMjMuOTIxIDgyLjc3IDIuMjYgMTIzLjgyOSIgc3R5bGU9Ii0tZGFya3JlYWRlci1pbmxpbmUtZmlsbDp2YXIoLS1kYXJrcmVhZGVyLWJhY2tncm91bmQtZmUyYzU1LCAjYjEwMTIzKTstLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZTpub25lO29wYWNpdHk6MSIgZGF0YS1pbmRleD0iMTEiLz4KICA8cGF0aCBmaWxsPSIjRkUyQzU1IiBkPSJNODE1Ljk0MiAzNDQuNzc0Yy0zLjY3Ni0xLjg2LTcuNjc4LTMuNjYtMTAuOTAzLTYuMzgtMTguMzQ1LTE1LjQ3OC0zMy44MDgtMzMuMzM3LTQ1LjY3Ni01NC4zODUtOS42OTItMTcuMTg3LTE1LjgxMS0zNS41NC0yMC4zMzQtNTQuNTY3LS4xMTItLjQ3MS0uMDA1LS45OTUuMDgtMS44OTQgMTEuODQ5LS4zOTkgMjMuNjE4LS4zOTkgMzUuMzY5LS4zOTkuNTIgNi42NCAxLjAxNiAxMy4wMDYgMS41MiAxOS4zNzMgMS4zNTYgMTcuMTYgNS42NyAzMy41OTUgMTIuMDA0IDQ5LjU1NiA2LjE1IDE1LjQ5OCAxNC40MjYgMjkuNzk4IDI0LjExNCA0My4zMTcgMS4yMjcgMS43MTMgMi41NyAzLjM0NCAzLjgyNiA1LjM3OSIgc3R5bGU9Ii0tZGFya3JlYWRlci1pbmxpbmUtZmlsbDp2YXIoLS1kYXJrcmVhZGVyLWJhY2tncm91bmQtZmUyYzU1LCAjYjEwMTIzKTstLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZTpub25lIiBkYXRhLWluZGV4PSIxMiIvPgogIDxwYXRoIGZpbGw9IiMyNUY0RUUiIGQ9Ik05MjEuMDMgNDA4LjYxOWMtOS45ODUtMi41Ny0yMC00LjkzMi0yOS41MTUtOC41OTgtMTkuMjMtNy40MDgtMzYuNjczLTE3Ljk5My01MS45MjMtMzEuOTY0LTUuMjE4LTQuNzgtMTAuMTc3LTkuODQ0LTE1LjAzMy0xNS4xNDEgMTEgNC43OTIgMjEuNTg3IDEwLjQwMyAzMi42MDQgMTQuOTgxIDEyLjg2NyA1LjM0NyAyNi4zODggOC42NiA0MC4zMDYgMTAuMTA1IDcuOTcxLjgyOCAxNS45NCAxLjY3IDIzLjc1OSAyLjQ5IDAgOS4wODYgMCAxOC40MTUtLjE5NyAyOC4xMjciIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLWZpbGw6dmFyKC0tZGFya3JlYWRlci10ZXh0LTI1ZjRlZSwgIzM2ZjVlZik7LS1kYXJrcmVhZGVyLWlubGluZS1zdHJva2U6dmFyKC0tZGFya3JlYWRlci10ZXh0LTBkOTlmZiwgIzIzYTNmZik7b3BhY2l0eToxIiBkYXRhLWluZGV4PSIxMyIvPgogIDxwYXRoIGZpbGw9IiNGRTJDNTUiIGQ9Ik04MTcuODI5IDM0Ni42OTJhMy41IDMuNSAwIDAgMS0yLjE5Mi0xLjMwNWMuODY4LjEyNCAxLjUyNy41NTkgMi4xOTIgMS4zMDUiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLWZpbGw6dmFyKC0tZGFya3JlYWRlci10ZXh0LWZlMmM1NSwgI2ZlMzk1Zik7LS1kYXJrcmVhZGVyLWlubGluZS1zdHJva2U6bm9uZSIgZGF0YS1pbmRleD0iMTQiLz4KICA8cGF0aCBmaWxsPSIjMjVGNEVFIiBkPSJNMzQwLjA0MiA5MjUuMjM3Yy42MTQuMTQ4IDEuMjU2LjU5IDEuODQ1IDEuMzk5LS42NC0uMTI1LTEuMjMtLjYxNS0xLjg0NS0xLjQiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLWZpbGw6dmFyKC0tZGFya3JlYWRlci10ZXh0LTI1ZjRlZSwgIzM2ZjVlZik7LS1kYXJrcmVhZGVyLWlubGluZS1zdHJva2U6bm9uZTt2aXNpYmlsaXR5OnZpc2libGUiIGRhdGEtaW5kZXg9IjE1Ii8+CiAgPHBhdGggZmlsbD0iI0ZFMkM1NSIgZD0iTTM0OS4xMDggOTMzLjQ0M2EzLjY2IDMuNjYgMCAwIDEgMi4yMiAxLjEzOGMtLjgyNi0uMDYyLTEuNDY4LS40Ni0yLjIyLTEuMTM4IiBzdHlsZT0iLS1kYXJrcmVhZGVyLWlubGluZS1maWxsOnZhcigtLWRhcmtyZWFkZXItdGV4dC1mZTJjNTUsICNmZTM5NWYpOy0tZGFya3JlYWRlci1pbmxpbmUtc3Ryb2tlOm5vbmU7dmlzaWJpbGl0eTp2aXNpYmxlIiBkYXRhLWluZGV4PSIxNiIvPgogIDxwYXRoIGZpbGw9IiMyNUY0RUUiIGQ9Ik04MjQuMjQ4IDM1MS45MTFjLS40NjcuMTg4LTEuMTUuMDY0LTIuMDQtLjQwMi40Ny0uMTk4IDEuMTQ3LS4wNTMgMi4wNC40MDIiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLWZpbGw6dmFyKC0tZGFya3JlYWRlci10ZXh0LTI1ZjRlZSwgIzM2ZjVlZik7LS1kYXJrcmVhZGVyLWlubGluZS1zdHJva2U6bm9uZSIgZGF0YS1pbmRleD0iMTciLz4KPC9zdmc+Cg==",K4="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IS0tIFVwbG9hZGVkIHRvOiBTVkcgUmVwbywgd3d3LnN2Z3JlcG8uY29tLCBHZW5lcmF0b3I6IFNWRyBSZXBvIE1peGVyIFRvb2xzIC0tPgo8c3ZnIHdpZHRoPSI4MDBweCIgaGVpZ2h0PSI4MDBweCIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgPGNpcmNsZSBjeD0iNTEyIiBjeT0iNTEyIiByPSI1MTIiIHN0eWxlPSJmaWxsOiMzMTMxMzEiLz4KICAgPHBhdGggZD0iTTMzMS40IDI3NmMtMjkuMyAwLTQwLjEgMTAuOC00MC4xIDQwLjF2MzUzLjRjMCAzLjMuMSA2LjQuNCA5LjIuNyA2LjQuOCAxMi43IDYuOCAxOS43LjYuOCA2LjYgNS4yIDYuNiA1LjIgMy4yIDEuNiA1LjUgMi43IDkuMiA0LjNsMTc3LjggNzQuNWM5LjIgNC4yIDEzLjEgNS45IDE5LjggNS43aC4xYzYuOC4yIDEwLjYtMS41IDE5LjgtNS43bDE3Ny44LTc0LjVjMy43LTEuNSA1LjktMi42IDkuMi00LjMgMCAwIDYuMS00LjUgNi42LTUuMiA2LTcgNi0xMy4yIDYuOC0xOS43LjMtMi44LjQtNS45LjQtOS4yVjMxNmMwLTI5LjMtMTAuOC00MC00MC4xLTQwSDMzMS40em0yODUgNjYuM2gxNC41YzI0LjIgMCAzNiAxMS44IDM2IDM2LjJ2NDAuMWgtMjkuM3YtMzguNWMwLTcuOC0zLjYtMTEuNS0xMS4yLTExLjVoLTVjLTcuOCAwLTExLjUgMy42LTExLjUgMTEuNXYxMjRjMCA3LjggMy42IDExLjQgMTEuNSAxMS40aDUuNWM3LjUgMCAxMS4xLTMuNiAxMS4xLTExLjR2LTQ0LjRoMjkuNHY0NS43YzAgMjQuNC0xMiAzNi40LTM2LjMgMzYuNGgtMTQuOGMtMjQuMyAwLTM2LjMtMTIuMS0zNi4zLTM2LjRWMzc4LjhjLjEtMjQuNCAxMi4xLTM2LjUgMzYuNC0zNi41em0tMjYwIDEuNmg2Ni40djI3LjJoLTM2LjZ2NTUuNmgzNS4ydjI3LjJoLTM1LjJ2NTkuMmgzNy4xdjI3LjJoLTY2LjlWMzQzLjl6bTgxLjQgMGg0Ni45YzI0LjMgMCAzNi4zIDEyLjEgMzYuMyAzNi41djUyLjJjMCAyNC40LTEyIDM2LjUtMzYuMyAzNi41aC0xNi45djcxLjJoLTI5LjlsLS4xLTE5Ni40em05Ni42IDBoMjkuOHYxOTYuNGgtMjkuOFYzNDMuOXptLTY2LjggMjYuNXY3Mi4zSDQ4MGM3LjUgMCAxMS4xLTMuNiAxMS4xLTExLjV2LTQ5LjNjMC03LjktMy42LTExLjUtMTEuMS0xMS41aC0xMi40ek0zODUuNCA1ODdoNC40bDEgLjFoMS42bC44LjNoLjhsLjguMi44LjIuNy4xLjcuMi43LjEuOC4zLjYuMS42LjMuOC4yLjYuMy44LjMuNy4zLjYuNC44LjMuNi40LjguNC42LjQuNy40LjYuNS42LjQuNi41LjcuNS42LjYuNi41LS41LjYtLjYuNi0uNS42LS42LjYtLjUuNi0uNS42LS42LjYtLjUuNi0uNS42LS42LjYtLjUuNi0uNi42LS41LjYtLjUuNi0uNi42LS41LjctLjYuNi0uNS42LS42LS41LS42LS42LS42LS40LS43LS41LS42LS40LS43LS40LS42LS40LS43LS40LS42LS4zLS42LS4zLS42LS4yLS43LS4zLS44LS4yLS42LS4yLS44LS4yLS44LS4yLS44LS4xaC0uOWwtMS0uMmgtMS42bC0uOC4xaC0uOGwtLjguMi0uNy4yLS43LjItLjguMi0uNi4zLS44LjMtLjYuNC0uNi40LS42LjQtLjYuNS0uNi41LS42LjUtLjUuNi0uNi42LS40LjYtLjQuNi0uNS42LS4zLjctLjQuNi0uNC43LS4yLjctLjMuNy0uMi44LS4xLjgtLjIuNy0uMi45di44bC0uMS44djEuOWwuMS44LjEuNy4xLjguMi44LjIuNi4xLjguMi42LjMuNi4zLjguNC44LjMuNi40LjYuNS43LjUuNi40LjYuNi42LjUuNi42LjUuNi41LjYuNS43LjQuNi40LjcuMy44LjMuNi4zLjguMi44LjMuOC4xLjguMi44LjEgMSAuMWgyLjZsMS0uMWguOGwuOC0uMy44LS4xLjgtLjMuNy0uMS43LS4zLjYtLjMuOC0uMy41LS4zLjYtLjR2LTcuNGgtMTEuOHYtMTEuOWgyNi42djI2LjZsLS42LjUtLjYuNS0uNi40LS42LjUtLjYuNC0uNi41LS42LjQtLjcuNC0uOC40LS43LjQtLjYuNC0uOC4zLS42LjQtLjguMy0uOC4zLS44LjMtLjcuMy0uNy4yLS43LjMtLjguMi0uNy4yLS44LjMtLjcuMS0uOC4yLS44LjItLjguMS0uOC4xLS44LjEtLjguMS0xIC4xLS44LjEtLjkuMWgtNC4ybC0uNy42aC0uOGwtLjgtLjFoLS44bC0uOC0uMy0uOC0uMS0uOC0uMi0uOC0uMS0uNi0uMy0uOC0uMS0uOC0uMy0uNy0uMy0uNy0uMi0uOC0uMy0uNy0uMy0uOC0uMy0uNi0uMy0uOC0uNC0uNi0uNC0uOC0uNC0uNi0uNC0uNi0uNC0uNi0uNS0uNi0uNS0uNy0uNS0uNS0uNS0uNi0uNS0uNi0uNi0uNi0uNS0uNi0uNi0uNy0uNi0uNi0uNi0uNS0uNi0uNS0uNi0uNC0uNi0uNS0uNi0uNC0uNi0uNC0uNi0uNC0uNy0uNC0uNi0uMy0uNy0uMy0uNy0uMy0uNy0uMy0uNy0uMi0uNi0uMy0uNy0uMi0uNy0uMi0uNy0uMi0uOC0uMi0uNy0uMi0uOC0uMS0uNy0uMi0uOC0uMS0uNy0uMS0uOC0uMS0uOC0uMS0uOHYtNC40bC4yLS44di0uOWwuMi0uOHYtLjhsLjMtLjguMy0uOC4xLS44LjItLjcuMy0uOC4yLS43LjMtLjguMy0uNy4zLS43LjMtLjcuMy0uNy40LS43LjQtLjYuNC0uNi40LS42LjQtLjYuNS0uNy41LS42LjUtLjYuNi0uNi41LS42LjUtLjYuNi0uNi41LS42LjYtLjUuNi0uNi42LS41LjYtLjUuNi0uNC42LS41LjYtLjQuNy0uNC43LS40LjgtLjQuNi0uNC44LS4zLjctLjMuOC0uNC42LS4yLjgtLjMuNy0uMy43LS4yLjctLjIuOC0uMi43LS4yLjgtLjJoLjhsLjgtLjJoLjhsLjgtLjJoLjhsMS4zLTF6bTI1NS44LjJoNC40bDEgLjJoMS42bC44LjJoMWwuOC4zLjcuMS44LjIuOC4xLjcuMi44LjIuOC4zLjYuMS44LjMuOC4zLjYuMy44LjMuOC4zLjcuNC42LjMuOC40LjcuNC42LjQuNy41LjYuNC42LjUuNi41LjYuNS0uNS42LS40LjctLjUuNi0uNS42LS41LjctLjQuNi0uNS42LS41LjctLjQuNi0uNS42LS41LjYtLjUuNy0uNC43LS41LjYtLjYuNi0uNC42LS41LjctLjYtLjUtLjctLjQtLjYtLjQtLjYtLjUtLjctLjMtLjYtLjQtLjgtLjMtLjYtLjMtLjgtLjMtLjYtLjMtLjYtLjItLjctLjMtLjgtLjItLjgtLjMtLjgtLjItLjktLjItLjgtLjEtLjgtLjItLjgtLjEtLjgtLjEtLjctLjFoLTEuOGwtLjkuMS0uOC4yLS44LjEtLjYuMy0uNi4zLS43LjYtLjUuNy0uMy43djJsLjQuOS4zLjUuNi42LjguNC42LjQuOC4zLjguMyAxIC4zLjYuMi42LjIuOC4yLjYuMi44LjIuOS4yLjkuMi45LjMuOS4xLjguMy45LjIuOC4yLjguMi44LjIuOC4zLjguMi43LjIuOC4zLjguMy44LjQuOC4zLjguNC44LjQuNi40LjYuNC43LjUuNi40LjcuNi42LjYuNi42LjYuNi40LjYuNi44LjQuNi4zLjguNC42LjIuOC4zLjYuMS44LjIuOC4xLjguMS44LjEuOHYybC0uMS45LS4xLjgtLjEuOS0uMi44LS4yLjgtLjIuOC0uMi44LS4zLjctLjMuNi0uMy43LS40LjYtLjUuNi0uNC42LS40LjctLjYuNi0uNS42LS42LjUtLjYuNi0uNi41LS42LjUtLjYuNC0uNy41LS44LjQtLjYuMy0uOC40LS44LjMtLjguMy0uOC4zLS44LjItLjYuMi0uOC4yLS44LjItLjYuMS0uOC4yaC0uM2wtLjguMWgtLjhsLS44LjJoLTZsLS44LS4xLS44LS4xLS45LS4xLS44LS4yLS44LS4xLS44LS4xLS44LS4yLS45LS4yLS44LS4yLS44LS4yLS44LS4yLS44LS4yLS44LS4zLS44LS4zLS43LS4yLS44LS4yLS44LS4zLS42LS4zLS44LS4zLS42LS40LS44LS4zLS43LS40LS42LS40LS44LS40LS42LS40LS43LS40LS42LS41LS42LS41LS42LS41LS42LS41LS42LS41LS42LS42LjUtLjYuNi0uNi41LS42LjYtLjYuNS0uNi41LS42LjYtLjYuNS0uNi42LS42LjUtLjYuNi0uNi41LS42LjUtLjYuNi0uNi41LS42LjYtLjYuNi0uNi42LjUuOC41LjYuNS44LjUuNi40LjcuNS42LjQuNy4zLjYuNC43LjMuOC4zLjYuMy44LjIuNi4zLjguMi44LjMuOC4zLjguMS44LjIuOC4xaC45bC44LjNoNC40bC44LS4yLjgtLjIuNi0uMS42LS4yLjYtLjMuNy0uNS40LS42LjQtLjYuMi0uOHYtMS45bC0uMy0uOC0uNS0uNi0uNS0uNS0uNy0uNS0uNi0uMy0uOC0uMy0uOC0uMy0xLS40LS42LS4xLS42LS4yLS44LS4yLS42LS4yLS44LS4zLS44LS4xLS45LS4zLS44LS4xLS45LS4zLS44LS4xLS44LS4zLS44LS4xLS44LS4zLS44LS4yLS44LS4yLS43LS4zLS43LS4yLS43LS4zLS44LS4zLS45LS4zLS44LS4zLS44LS4zLS44LS40LS44LS40LS42LS40LS44LS40LS42LS41LS43LS40LS41LS41LS42LS42LS42LS42LS41LS42LS41LS42LS40LS42LS40LS42LS40LS43LS4zLS42LS4zLS42LS4yLS43LS4yLS42LS4yLS44LS4xLS43di0uOGwtLjItLjh2LTMuNWwuMS0uOC4xLS44LjEtLjYuMi0uOC4yLS42LjItLjguMy0uNi4zLS44LjMtLjYuNC0uOC40LS42LjYtLjYuNC0uNi42LS42LjYtLjYuNS0uNi43LS42LjUtLjQuNy0uNS42LS41LjYtLjQuOC0uNC42LS4zLjgtLjQuNi0uMy44LS4zLjgtLjMuOC0uMi42LS4yLjgtLjEuNi0uMi44LS4xLjgtLjIuOC0uMS44LS4xLjgtLjEuNi0uMXptLTE5Ny4xLjZoMTUuMWwuMy43LjMuNy4zLjcuMi44LjMuNy4zLjcuMy43LjMuNy4yLjcuNC44LjMuNy4zLjcuMi43LjMuNy40LjcuMy44LjMuNy4yLjcuMy43LjQuNy4yLjcuMy44LjIuOC4zLjYuNC44LjMuNi4zLjguMy44LjIuNi40LjguMy42LjMuOC4yLjYuMy44LjQuOC4zLjcuMi43LjIuNy4zLjcuNC43LjMuOC4zLjcuMi43LjMuNy4zLjcuMy43LjMuOC4zLjcuMy43LjQuNy4zLjcuMy43LjIuOC4zLjcuNC43LjMuNy4yLjcuMy43LjMuOC40LjguMi42LjMuOC4yLjYuMy44LjQuOC4zLjYuMi44LjMuNi4yLjguNC42LjMuOC4yLjguMy42LjMuOC40LjYuMy44LjIuOC4zLjYuMy44LjQuNkg0NjZsLS40LS43LS4yLS43LS4zLS43LS4zLS44LS4yLS43LS4zLS43LS4zLS43LS4zLS43LS4zLS43LS4zLS43LS4yLS43LS4zLS44LS4zLS43LS4zLS43LS4zLS43aC0yMy4ybC0uMy44LS4yLjYtLjMuOC0uNC44LS4yLjYtLjMuOC0uMy42LS4yLjgtLjMuNi0uMy44LS4zLjYtLjMuOC0uMy44LS4zLjYtLjIuOGgtMTYuNWwuMy0uOC4zLS43LjMtLjcuMy0uOC4yLS43LjQtLjcuMy0uNy4zLS43LjItLjcuMy0uOC40LS43LjMtLjcuMy0uNy4yLS43LjMtLjcuNC0uOC4zLS43LjMtLjcuMy0uNy4zLS43LjMtLjcuMy0uOC4zLS44LjMtLjYuMy0uOC40LS42LjMtLjguMi0uOC4yLS42LjMtLjguNC0uNi4zLS44LjMtLjYuMi0uOC4zLS44LjQtLjYuMi0uOC4zLS42LjMtLjguMy0uOC40LS42LjMtLjguMi0uNi4zLS44LjMtLjYuNC0uOC4zLS44LjMtLjcuMi0uNy4zLS43LjQtLjcuMy0uNy4yLS44LjMtLjcuMy0uNy40LS43LjMtLjcuMi0uNy4zLS44LjMtLjguMy0uNi4zLS44LjItLjYuMy0uOC4zLS44LjQtLjYuMy0uOC4zLS42LjItLjguMy0uNi40LS44LjMtLjguMy0uNi4zLS44LjMtLjYuNC0uOC4yLS44LjItLjYuMy0uOCAyLjgtLjZ6bTQ2LjguNGgxNi41bC41LjYuNC43LjUuNi40LjcuNC42LjQuNy40LjYuNS43LjQuNi40LjYuNC43LjQuNi42LjcuMy42LjQuNy41LjYuNS42LjMuNy41LjYuNC43LjMuNi42LjcuNC42LjQuNy40LjYuNC42LjUuNy40LjYuNC43LjQuNi40LjcuNS42LjQuNy40LjYuNS0uNi4zLS44LjUtLjYuNS0uOC40LS42LjMtLjguNi0uNi40LS44LjMtLjYuNS0uNi41LS44LjQtLjYuNC0uOC40LS42LjUtLjguNC0uNi40LS44LjQtLjYuNC0uNi41LS44LjQtLjYuNC0uOC41LS42LjQtLjguNC0uNi41LS42LjQtLjguNS0uNi40LS44LjQtLjYuNC0uOC41LS42LjQtLjguNC0uNkg1NTN2NTkuNWgtMTUuN3YtMzVsLS40LjYtLjUuOC0uNC42LS41LjYtLjQuOC0uNS42LS40LjYtLjUuOC0uNC42LS40LjYtLjYuNi0uNC44LS41LjYtLjQuNi0uNC44LS41LjYtLjQuNi0uNS44LS40LjYtLjUuNi0uNC44LS40LjYtLjUuNi0uNC44LS41LjYtLjUuNi0uNC42LS40LjgtLjUuNi0uNS42LS4zLjgtLjYuNi0uNC42LS41LjgtLjQuNmgtLjNsLS41LS43LS40LS42LS41LS43LS40LS42LS41LS43LS40LS42LS41LS43LS40LS42LS41LS43LS40LS42LS42LS43LS4zLS42LS41LS43LS41LS42LS40LS43LS41LS42LS40LS44LS41LS42LS40LS43LS41LS42LS40LS43LS41LS42LS40LS43LS41LS42LS40LS43LS41LS42LS40LS43LS41LS42LS40LS43LS41LS42LS40LS43LS42LS42LS4zLS43LS41LS42djM1LjFINDkxdi01OC45bC0uMS0uMnptNzQgMGg0Ni45djEzLjRoLTMxLjR2OS41aDI4LjJ2MTIuN2gtMjguMlY2MzRoMzEuOHYxMy41SDU2NXYtNTguOWwtLjEtLjR6bS0xMTMuNSAxOC4yLS4zLjgtLjMuNi0uMy44LS4zLjgtLjIuNy0uMy43LS4zLjgtLjMuOC0uMi42LS4zLjgtLjMuNi0uMy44LS4zLjgtLjMuNi0uMi44LS4zLjYtLjMuOC0uNiAxLjItLjIuNi0uMy44LS4zLjgtLjIuNi0uMy44aDEzLjdsLS4zLS44LS4zLS43LS4zLS44LS4zLS43LS4yLS43LS4zLS43LS4zLS44LS4zLS43LS4zLS43LS4zLS43LS4yLS43LS4zLS44LS4zLS43LS4zLS43LS4zLS43LS4yLS43LS4zLS44LS4zLS44LS4zLS42LS4zLS44LS4zLS44LS4yLS43LS44LTEuMXptLTI0LjUgMTExLjRoMTcxbC04Ny4zIDI4LjgtODMuNy0yOC44eiIgc3R5bGU9ImZpbGw6I2ZmZiIvPgo8L3N2Zz4=",uM="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEzLjMzMzUgMi42NjY1SDIuNjY2ODNDMS45MzA0NSAyLjY2NjUgMS4zMzM1IDMuMjYzNDYgMS4zMzM1IDMuOTk5ODRWMTEuOTk5OEMxLjMzMzUgMTIuNzM2MiAxLjkzMDQ1IDEzLjMzMzIgMi42NjY4MyAxMy4zMzMySDEzLjMzMzVDMTQuMDY5OSAxMy4zMzMyIDE0LjY2NjggMTIuNzM2MiAxNC42NjY4IDExLjk5OThWMy45OTk4NEMxNC42NjY4IDMuMjYzNDYgMTQuMDY5OSAyLjY2NjUgMTMuMzMzNSAyLjY2NjVaIiBzdHJva2U9IiMzMzg1RkYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8cGF0aCBkPSJNMTQuNjY2OCA0LjY2NjVMOC42ODY4MyA4LjQ2NjVDOC40ODEwMSA4LjU5NTQ1IDguMjQzMDQgOC42NjM4NCA4LjAwMDE2IDguNjYzODRDNy43NTcyOCA4LjY2Mzg0IDcuNTE5MzEgOC41OTU0NSA3LjMxMzUgOC40NjY1TDEuMzMzNSA0LjY2NjUiIHN0cm9rZT0iIzMzODVGRiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=",dM="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzU2MzlfNjMyKSI+CjxwYXRoIGQ9Ik0xNC42NjY5IDExLjI4MDJWMTMuMjgwMkMxNC42Njc3IDEzLjQ2NTkgMTQuNjI5NyAxMy42NDk3IDE0LjU1NTMgMTMuODE5OEMxNC40ODA5IDEzLjk4OTkgMTQuMzcxOCAxNC4xNDI2IDE0LjIzNSAxNC4yNjgxQzE0LjA5ODIgMTQuMzkzNyAxMy45MzY3IDE0LjQ4OTIgMTMuNzYwOCAxNC41NDg3QzEzLjU4NDkgMTQuNjA4MiAxMy4zOTg1IDE0LjYzMDMgMTMuMjEzNiAxNC42MTM2QzExLjE2MjIgMTQuMzkwNyA5LjE5MTYxIDEzLjY4OTcgNy40NjAyOCAxMi41NjY5QzUuODQ5NSAxMS41NDMzIDQuNDgzODQgMTAuMTc3NyAzLjQ2MDI4IDguNTY2ODlDMi4zMzM2IDYuODI3NyAxLjYzMjQ0IDQuODQ3NTYgMS40MTM2MSAyLjc4Njg5QzEuMzk2OTUgMi42MDI1NCAxLjQxODg2IDIuNDE2NzMgMS40Nzc5NSAyLjI0MTMxQzEuNTM3MDMgMi4wNjU4OSAxLjYzMTk5IDEuOTA0NjkgMS43NTY3OSAxLjc2Nzk3QzEuODgxNTkgMS42MzEyNiAyLjAzMzQ4IDEuNTIyMDMgMi4yMDI4MSAxLjQ0NzI0QzIuMzcyMTMgMS4zNzI0NSAyLjU1NTE3IDEuMzMzNzQgMi43NDAyOCAxLjMzMzU2SDQuNzQwMjhDNS4wNjM4MiAxLjMzMDM4IDUuMzc3NDggMS40NDQ5NSA1LjYyMjc5IDEuNjU1OTJDNS44NjgxIDEuODY2ODkgNi4wMjgzMyAyLjE1OTg2IDYuMDczNjEgMi40ODAyM0M2LjE1ODAzIDMuMTIwMjcgNi4zMTQ1OCAzLjc0ODcxIDYuNTQwMjggNC4zNTM1NkM2LjYyOTk4IDQuNTkyMTggNi42NDkzOSA0Ljg1MTUgNi41OTYyMiA1LjEwMDgxQzYuNTQzMDUgNS4zNTAxMiA2LjQxOTUyIDUuNTc4OTcgNi4yNDAyOCA1Ljc2MDIzTDUuMzkzNjEgNi42MDY4OUM2LjM0MjY1IDguMjc1OTIgNy43MjQ1OCA5LjY1Nzg2IDkuMzkzNjEgMTAuNjA2OUwxMC4yNDAzIDkuNzYwMjNDMTAuNDIxNSA5LjU4MDk5IDEwLjY1MDQgOS40NTc0NiAxMC44OTk3IDkuNDA0MjlDMTEuMTQ5IDkuMzUxMTIgMTEuNDA4MyA5LjM3MDUzIDExLjY0NjkgOS40NjAyM0MxMi4yNTE4IDkuNjg1OTMgMTIuODgwMiA5Ljg0MjQ4IDEzLjUyMDMgOS45MjY4OUMxMy44NDQxIDkuOTcyNTggMTQuMTM5OSAxMC4xMzU3IDE0LjM1MTMgMTAuMzg1MkMxNC41NjI3IDEwLjYzNDggMTQuNjc1MSAxMC45NTMzIDE0LjY2NjkgMTEuMjgwMloiIHN0cm9rZT0iIzMzODVGRiIgc3Ryb2tlLXdpZHRoPSIxLjMzMzMzIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF81NjM5XzYzMiI+CjxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K",J4="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzQwNDhfNDIzMSkiPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuNTg0IDQuODU1NjZDNy43MTA2OSA0Ljc4MjUyIDcuODU0MzkgNC43NDQwMiA4LjAwMDY3IDQuNzQ0MDJDOC4xNDY5NSA0Ljc0NDAyIDguMjkwNjUgNC43ODI1MiA4LjQxNzM0IDQuODU1NjZMMTAuNTE1MyA2LjA2NjY2QzEwLjY0MiA2LjEzOTggMTAuNzQ3MiA2LjI0NSAxMC44MjA0IDYuMzcxNjhDMTAuODkzNSA2LjQ5ODM1IDEwLjkzMiA2LjY0MjA1IDEwLjkzMiA2Ljc4ODMzVjkuMjExQzEwLjkzMiA5LjM1NzI3IDEwLjg5MzUgOS41MDA5NyAxMC44MjA0IDkuNjI3NjVDMTAuNzQ3MiA5Ljc1NDMzIDEwLjY0MiA5Ljg1OTUzIDEwLjUxNTMgOS45MzI2Nkw4LjQxNzM0IDExLjE0NEM4LjI5MDY1IDExLjIxNzEgOC4xNDY5NSAxMS4yNTU2IDguMDAwNjcgMTEuMjU1NkM3Ljg1NDM5IDExLjI1NTYgNy43MTA2OSAxMS4yMTcxIDcuNTg0IDExLjE0NEw1LjQ4NiA5LjkzMjY2QzUuMzU5MzIgOS44NTk1MyA1LjI1NDEzIDkuNzU0MzMgNS4xODA5OSA5LjYyNzY1QzUuMTA3ODUgOS41MDA5NyA1LjA2OTM0IDkuMzU3MjcgNS4wNjkzNCA5LjIxMVY2Ljc4ODY2QzUuMDY5MjggNi42NDIzMyA1LjEwNzc2IDYuNDk4NTYgNS4xODA5IDYuMzcxODJDNS4yNTQwNSA2LjI0NTA4IDUuMzU5MjcgNi4xMzk4MyA1LjQ4NiA2LjA2NjY2TDcuNTg0IDQuODU1NjZaTTguMDg0IDUuNDMzQzguMDU4NjcgNS40MTgzNyA4LjAyOTkzIDUuNDEwNjcgOC4wMDA2NyA1LjQxMDY3QzcuOTcxNDEgNS40MTA2NyA3Ljk0MjY3IDUuNDE4MzcgNy45MTczNCA1LjQzM0w1LjgxOTM0IDYuNjQ0MzNDNS43OTQgNi42NTg5NiA1Ljc3Mjk2IDYuNjggNS43NTgzMyA2LjcwNTMzQzUuNzQzNyA2LjczMDY3IDUuNzM2IDYuNzU5NDEgNS43MzYgNi43ODg2NlY5LjIxMTMzQzUuNzM2IDkuMjQwNTkgNS43NDM3IDkuMjY5MzMgNS43NTgzMyA5LjI5NDY2QzUuNzcyOTYgOS4zMiA1Ljc5NCA5LjM0MTA0IDUuODE5MzQgOS4zNTU2Nkw3LjkxNzM0IDEwLjU2NjdDNy45NDI2NyAxMC41ODEzIDcuOTcxNDEgMTAuNTg5IDguMDAwNjcgMTAuNTg5QzguMDI5OTMgMTAuNTg5IDguMDU4NjcgMTAuNTgxMyA4LjA4NCAxMC41NjY3TDEwLjE4MiA5LjM1NTMzQzEwLjIwNzMgOS4zNDA3IDEwLjIyODQgOS4zMTk2NiAxMC4yNDMgOS4yOTQzM0MxMC4yNTc2IDkuMjY4OTkgMTAuMjY1MyA5LjI0MDI1IDEwLjI2NTMgOS4yMTFWNi43ODg2NkMxMC4yNjUzIDYuNzU5NDEgMTAuMjU3NiA2LjczMDY3IDEwLjI0MyA2LjcwNTMzQzEwLjIyODQgNi42OCAxMC4yMDczIDYuNjU4OTYgMTAuMTgyIDYuNjQ0MzNMOC4wODQgNS40MzNaIiBmaWxsPSIjNUM1QzVDIi8+CjwvZz4KPGNpcmNsZSBjeD0iOCIgY3k9IjgiIHI9IjcuNjkyMzEiIHN0cm9rZT0iIzVDNUM1QyIgc3Ryb2tlLXdpZHRoPSIwLjYxNTM4NSIvPgo8Y2lyY2xlIGN4PSI3Ljk5OTU1IiBjeT0iOC4wMDAwNCIgcj0iNS44NDYxNSIgc3Ryb2tlPSIjNUM1QzVDIiBzdHJva2Utd2lkdGg9IjAuNjE1Mzg1Ii8+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzQwNDhfNDIzMSI+CjxyZWN0IHdpZHRoPSI4IiBoZWlnaHQ9IjgiIGZpbGw9IndoaXRlIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg0IDQpIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==",hM="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE5IDIxVjE5QzE5IDE3LjkzOTEgMTguNTc4NiAxNi45MjE3IDE3LjgyODQgMTYuMTcxNkMxNy4wNzgzIDE1LjQyMTQgMTYuMDYwOSAxNSAxNSAxNUg5QzcuOTM5MTMgMTUgNi45MjE3MiAxNS40MjE0IDYuMTcxNTcgMTYuMTcxNkM1LjQyMTQzIDE2LjkyMTcgNSAxNy45MzkxIDUgMTlWMjEiIHN0cm9rZT0iIzMzODVGRiIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTEyIDExQzE0LjIwOTEgMTEgMTYgOS4yMDkxNCAxNiA3QzE2IDQuNzkwODYgMTQuMjA5MSAzIDEyIDNDOS43OTA4NiAzIDggNC43OTA4NiA4IDdDOCA5LjIwOTE0IDkuNzkwODYgMTEgMTIgMTFaIiBzdHJva2U9IiMzMzg1RkYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=",X4="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyLjY2NjcgNC42NjY2N1YyLjY2NjY3QzEyLjY2NjcgMi40ODk4NiAxMi41OTY0IDIuMzIwMjkgMTIuNDcxNCAyLjE5NTI2QzEyLjM0NjQgMi4wNzAyNCAxMi4xNzY4IDIgMTIgMkgzLjMzMzMzQzIuOTc5NzEgMiAyLjY0MDU3IDIuMTQwNDggMi4zOTA1MiAyLjM5MDUyQzIuMTQwNDggMi42NDA1NyAyIDIuOTc5NzEgMiAzLjMzMzMzQzIgMy42ODY5NiAyLjE0MDQ4IDQuMDI2MDkgMi4zOTA1MiA0LjI3NjE0QzIuNjQwNTcgNC41MjYxOSAyLjk3OTcxIDQuNjY2NjcgMy4zMzMzMyA0LjY2NjY3SDEzLjMzMzNDMTMuNTEwMSA0LjY2NjY3IDEzLjY3OTcgNC43MzY5IDEzLjgwNDcgNC44NjE5M0MxMy45Mjk4IDQuOTg2OTUgMTQgNS4xNTY1MiAxNCA1LjMzMzMzVjhNMTQgOEgxMkMxMS42NDY0IDggMTEuMzA3MiA4LjE0MDQ4IDExLjA1NzIgOC4zOTA1MkMxMC44MDcxIDguNjQwNTcgMTAuNjY2NyA4Ljk3OTcxIDEwLjY2NjcgOS4zMzMzM0MxMC42NjY3IDkuNjg2OTYgMTAuODA3MSAxMC4wMjYxIDExLjA1NzIgMTAuMjc2MUMxMS4zMDcyIDEwLjUyNjIgMTEuNjQ2NCAxMC42NjY3IDEyIDEwLjY2NjdIMTRDMTQuMTc2OCAxMC42NjY3IDE0LjM0NjQgMTAuNTk2NCAxNC40NzE0IDEwLjQ3MTRDMTQuNTk2NCAxMC4zNDY0IDE0LjY2NjcgMTAuMTc2OCAxNC42NjY3IDEwVjguNjY2NjdDMTQuNjY2NyA4LjQ4OTg2IDE0LjU5NjQgOC4zMjAyOSAxNC40NzE0IDguMTk1MjZDMTQuMzQ2NCA4LjA3MDI0IDE0LjE3NjggOCAxNCA4WiIgc3Ryb2tlPSIjMzM4NUZGIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTIgMy4zMzM1VjEyLjY2NjhDMiAxMy4wMjA1IDIuMTQwNDggMTMuMzU5NiAyLjM5MDUyIDEzLjYwOTZDMi42NDA1NyAxMy44NTk3IDIuOTc5NzEgMTQuMDAwMiAzLjMzMzMzIDE0LjAwMDJIMTMuMzMzM0MxMy41MTAxIDE0LjAwMDIgMTMuNjc5NyAxMy45Mjk5IDEzLjgwNDcgMTMuODA0OUMxMy45Mjk4IDEzLjY3OTkgMTQgMTMuNTEwMyAxNCAxMy4zMzM1VjEwLjY2NjgiIHN0cm9rZT0iIzMzODVGRiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=",fM="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzU2MzlfMzIpIj4KPHBhdGggZD0iTTcuOTk5NTkgNi42NjY1QzcuNjQ1OTYgNi42NjY1IDcuMzA2ODMgNi44MDY5OCA3LjA1Njc4IDcuMDU3MDNDNi44MDY3MyA3LjMwNzA4IDYuNjY2MjUgNy42NDYyMiA2LjY2NjI1IDcuOTk5ODRDNi42NjYyNSA4LjY3OTg0IDYuNTk5NTkgOS42NzMxNyA2LjQ5MjkyIDEwLjY2NjUiIHN0cm9rZT0iIzMzODVGRiIgc3Ryb2tlLXdpZHRoPSIxLjI1NDkiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8cGF0aCBkPSJNOS4zMzI5MyA4Ljc0NjU4QzkuMzMyOTMgMTAuMzMzMiA5LjMzMjkzIDEyLjk5OTkgOC42NjYyNiAxNC42NjY2IiBzdHJva2U9IiMzMzg1RkYiIHN0cm9rZS13aWR0aD0iMS4yNTQ5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTExLjUyNzMgMTQuMDEzM0MxMS42MDczIDEzLjYxMzMgMTEuODE0IDEyLjQ4IDExLjg2MDcgMTIiIHN0cm9rZT0iIzMzODVGRiIgc3Ryb2tlLXdpZHRoPSIxLjI1NDkiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8cGF0aCBkPSJNMS4zMzM5OCA4LjAwMDE2QzEuMzMzOTggNi42MDA5NSAxLjc3NDIzIDUuMjM3MiAyLjU5MjM3IDQuMTAyMDlDMy40MTA1MSAyLjk2Njk5IDQuNTY1MDUgMi4xMTgwOCA1Ljg5MjQ3IDEuNjc1NjFDNy4yMTk4OCAxLjIzMzE0IDguNjUyODYgMS4yMTk1NCA5Ljk4ODQ0IDEuNjM2NzRDMTEuMzI0IDIuMDUzOTQgMTIuNDk0NSAyLjg4MDc5IDEzLjMzNCA0LjAwMDE2IiBzdHJva2U9IiMzMzg1RkYiIHN0cm9rZS13aWR0aD0iMS4yNTQ5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTEuMzMzOTggMTAuNjY2NUgxLjMzOTE0IiBzdHJva2U9IiMzMzg1RkYiIHN0cm9rZS13aWR0aD0iMS4yNTQ5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTE0LjUzMjcgMTAuNjY2NUMxNC42NjYgOS4zMzMxNyAxNC42MiA3LjA5NzE3IDE0LjUzMjcgNi42NjY1IiBzdHJva2U9IiMzMzg1RkYiIHN0cm9rZS13aWR0aD0iMS4yNTQ5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTMuMzMzOTggMTIuOTk5OEMzLjY2NzMyIDExLjk5OTggNC4wMDA2NSA5Ljk5OTg0IDQuMDAwNjUgNy45OTk4NEMzLjk5OTk4IDcuNTQ1NzUgNC4wNzY2MyA3LjA5NDg2IDQuMjI3MzIgNi42NjY1IiBzdHJva2U9IiMzMzg1RkYiIHN0cm9rZS13aWR0aD0iMS4yNTQ5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTUuNzY3MDkgMTQuNjY2OEM1LjkwNzA5IDE0LjIyNjggNi4wNjcwOSAxMy43ODY4IDYuMTQ3MDkgMTMuMzMzNSIgc3Ryb2tlPSIjMzM4NUZGIiBzdHJva2Utd2lkdGg9IjEuMjU0OSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik02IDQuNTMzNDZDNi42MDgyNyA0LjE4MjI4IDcuMjk4MjggMy45OTc0NSA4LjAwMDY0IDMuOTk3NTZDOC43MDMwMSAzLjk5NzY3IDkuMzkyOTYgNC4xODI3MiAxMC4wMDExIDQuNTM0MUMxMC42MDkzIDQuODg1NDggMTEuMTE0MiA1LjM5MDc5IDExLjQ2NTEgNS45OTkyM0MxMS44MTYgNi42MDc2NiAxMi4wMDA1IDcuMjk3NzYgMTIgOC4wMDAxMlY5LjMzMzQ2IiBzdHJva2U9IiMzMzg1RkYiIHN0cm9rZS13aWR0aD0iMS4yNTQ5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF81NjM5XzMyIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=",kr={apple:U4,coinbase:W4,discord:B4,facebook:V4,farcaster:Y4,github:Z4,google:R4,line:$4,steam:H4,telegram:F4,twitch:Q4,x:G4,tiktok:q4,epic:K4};function e2(e){switch(e){case"google":return R4;case"coinbase":return W4;case"apple":return U4;case"facebook":return V4;case"phone":return dM;case"email":return uM;case"passkey":return fM;case"discord":return B4;case"line":return $4;case"x":return G4;case"tiktok":return q4;case"epic":return K4;case"farcaster":return Y4;case"telegram":return F4;case"twitch":return Q4;case"github":return Z4;case"steam":return H4;case"guest":return hM;default:return X4}}function mM(e){const{id:n}=lM();return pe({queryFn:async()=>gM({id:n}),queryKey:["walletIcon",n],...e.queryOptions})}async function gM(e){var i;const{getInstalledWalletProviders:n}=await u(async()=>{const{getInstalledWalletProviders:r}=await Promise.resolve().then(()=>Lc);return{getInstalledWalletProviders:r}},void 0),t=(i=n().find(r=>r.info.rdns===e.id))==null?void 0:i.info.icon;return t||ga(e.id,!0)}function od(e){return Lg({connectorFactory:async n=>{var i;const{InAppWebConnector:t}=await u(async()=>{const{InAppWebConnector:r}=await import("./web-connector-DJrJBk0_.js");return{InAppWebConnector:r}},__vite__mapDeps([3,1,2,4,5,6,7,8,9]));return new t({client:n,passkeyDomain:(i=e==null?void 0:e.auth)==null?void 0:i.passkeyDomain,storage:e==null?void 0:e.storage})},createOptions:e})}class at extends Error{constructor(n){super(n.message),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"correlationId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"statusCode",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=n.code,this.correlationId=n.correlationId,this.statusCode=n.statusCode}toString(){return it({code:this.code,correlationId:this.correlationId,message:this.message,statusCode:this.statusCode})}}async function yM(e){const{originChainId:n,originTokenAddress:t,destinationChainId:i,destinationTokenAddress:r,sender:o,receiver:s,client:c,amount:l,purchaseData:h,maxSteps:d,paymentLinkId:f,slippageToleranceBps:m}=e,g=En(c),w=new URL(`${Ln("bridge")}/v1/buy/prepare`),p=await g(w.toString(),{body:it({amount:l.toString(),buyAmountWei:l.toString(),destinationChainId:i.toString(),destinationTokenAddress:r,maxSteps:d,originChainId:n.toString(),originTokenAddress:t,paymentLinkId:f,purchaseData:h,receiver:s,sender:o,slippageToleranceBps:m}),headers:{"Content-Type":"application/json"},method:"POST"});if(!p.ok){const x=await p.json();throw new at({code:x.code||"UNKNOWN_ERROR",correlationId:x.correlationId||void 0,message:x.message||p.statusText,statusCode:p.status})}const{data:_}=await p.json();return{blockNumber:_.blockNumber?BigInt(_.blockNumber):void 0,destinationAmount:BigInt(_.destinationAmount),estimatedExecutionTimeMs:_.estimatedExecutionTimeMs,intent:{amount:l,destinationChainId:i,destinationTokenAddress:r,originChainId:n,originTokenAddress:t,receiver:s,sender:o},originAmount:BigInt(_.originAmount),steps:_.steps.map(x=>({...x,transactions:x.transactions.map(I=>({...I,chain:Ot(I.chainId),client:c,value:I.value?BigInt(I.value):void 0}))})),timestamp:_.timestamp}}async function pM(e){const{client:n}=e;return ns(async()=>{const t=En(n),i=new URL(`${Ln("bridge")}/v1/chains`);e.testnet&&i.searchParams.set("testnet",e.testnet.toString()),"type"in e&&e.type?i.searchParams.set("type",e.type):"originChainId"in e&&e.originChainId?i.searchParams.set("originChainId",e.originChainId.toString()):"destinationChainId"in e&&e.destinationChainId&&i.searchParams.set("destinationChainId",e.destinationChainId.toString());const r=await t(i.toString());if(!r.ok){const s=await r.json();throw new at({code:s.code||"UNKNOWN_ERROR",correlationId:s.correlationId||void 0,message:s.message||r.statusText,statusCode:r.status})}const{data:o}=await r.json();return o},{cacheKey:`bridge-chains-${JSON.stringify(e)}`,cacheTime:1e3*60*60*1})}async function wM(e){const{id:n,client:t}=e,i=En(t),r=new URL(`${Ln("bridge")}/v1/onramp/status`);r.searchParams.set("id",n);const o=await i(r.toString());if(!o.ok){const c=await o.json();throw new at({code:c.code||"UNKNOWN_ERROR",correlationId:c.correlationId||void 0,message:c.message||o.statusText,statusCode:o.status})}const{data:s}=await o.json();return s}async function Ph(e){const{client:n,onramp:t,chainId:i,tokenAddress:r,receiver:o,amount:s,purchaseData:c,sender:l,onrampTokenAddress:h,onrampChainId:d,currency:f,maxSteps:m,excludeChainIds:g,paymentLinkId:w,country:p}=e,_=En(n),x=`${Ln("bridge")}/v1/onramp/prepare`,I={chainId:Number(i),onramp:t,receiver:o,tokenAddress:r};s!==void 0&&(I.amount=s.toString()),c!==void 0&&(I.purchaseData=c),l!==void 0&&(I.sender=l),h!==void 0&&(I.onrampTokenAddress=h),d!==void 0&&(I.onrampChainId=Number(d)),f!==void 0&&(I.currency=f),m!==void 0&&(I.maxSteps=m),g!==void 0&&(I.excludeChainIds=Array.isArray(g)?g.join(","):g),w!==void 0&&(I.paymentLinkId=w),p!==void 0&&(I.country=p);const b=await _(x,{body:it(I),headers:{"Content-Type":"application/json"},method:"POST"});if(!b.ok){const T=await b.json();throw new at({code:T.code||"UNKNOWN_ERROR",correlationId:T.correlationId||void 0,message:T.message||b.statusText,statusCode:b.status})}const{data:j}=await b.json(),C=j.steps.map(T=>({...T,destinationAmount:BigInt(T.destinationAmount),originAmount:BigInt(T.originAmount),transactions:T.transactions.map(O=>({...O,chain:Ot(O.chainId),client:n,value:O.value?BigInt(O.value):void 0}))})),E={...j.intent,amount:j.intent.amount?j.intent.amount:void 0};return{...j,destinationAmount:BigInt(j.destinationAmount),intent:E,steps:C}}const pV=Object.freeze(Object.defineProperty({__proto__:null,prepare:Ph,status:wM},Symbol.toStringTag,{value:"Module"}));async function _M(e){const{originChainId:n,originTokenAddress:t,destinationChainId:i,destinationTokenAddress:r,amount:o,sender:s,receiver:c,client:l,purchaseData:h,maxSteps:d,paymentLinkId:f,slippageToleranceBps:m}=e,g=En(l),w=new URL(`${Ln("bridge")}/v1/sell/prepare`),p=await g(w.toString(),{body:it({amount:o.toString(),destinationChainId:i.toString(),destinationTokenAddress:r,maxSteps:d,originChainId:n.toString(),originTokenAddress:t,paymentLinkId:f,purchaseData:h,receiver:c,sellAmountWei:o.toString(),sender:s,slippageToleranceBps:m}),headers:{"Content-Type":"application/json"},method:"POST"});if(!p.ok){const x=await p.json();throw new at({code:x.code||"UNKNOWN_ERROR",correlationId:x.correlationId||void 0,message:x.message||p.statusText,statusCode:p.status})}const{data:_}=await p.json();return{blockNumber:_.blockNumber?BigInt(_.blockNumber):void 0,destinationAmount:BigInt(_.destinationAmount),estimatedExecutionTimeMs:_.estimatedExecutionTimeMs,expiration:_.expiration,intent:{amount:o,destinationChainId:i,destinationTokenAddress:r,originChainId:n,originTokenAddress:t,purchaseData:h,receiver:c,sender:s},originAmount:BigInt(_.originAmount),steps:_.steps.map(x=>({...x,transactions:x.transactions.map(I=>({...I,chain:Ot(I.chainId),client:l,value:I.value?BigInt(I.value):void 0}))})),timestamp:_.timestamp}}async function t2(e){const{client:n,chainId:t,tokenAddress:i,symbol:r,name:o,limit:s,offset:c,includePrices:l,sortBy:h,query:d}=e,f=En(n),m=new URL(`${Ln("bridge")}/v1/tokens`);t!=null&&m.searchParams.set("chainId",t.toString()),i&&m.searchParams.set("tokenAddress",i),r&&m.searchParams.set("symbol",r),o&&m.searchParams.set("name",o),s!==void 0&&m.searchParams.set("limit",s.toString()),c!=null&&m.searchParams.set("offset",c.toString()),l!==void 0&&m.searchParams.set("includePrices",l.toString()),h!==void 0&&m.searchParams.set("sortBy",h),d!==void 0&&m.searchParams.set("query",d);const g=await f(m.toString());if(!g.ok){const p=await g.json();throw new at({code:p.code||"UNKNOWN_ERROR",correlationId:p.correlationId||void 0,message:p.message||g.statusText,statusCode:g.status})}const{data:w}=await g.json();return w}async function xM(e){const{client:n,chainId:t,tokenAddress:i}=e,r=En(n),o=`${Ln("bridge")}/v1/tokens`,c=await r(o,{body:JSON.stringify({chainId:t,tokenAddress:i}),headers:{"Content-Type":"application/json"},method:"POST"});if(!c.ok){const h=await c.json();throw new at({code:h.code||"UNKNOWN_ERROR",correlationId:h.correlationId||void 0,message:h.message||c.statusText,statusCode:c.status})}const{data:l}=await c.json();return l}async function MM(e){const{chainId:n,tokenAddress:t,sender:i,receiver:r,client:o,amount:s,purchaseData:c,feePayer:l,paymentLinkId:h}=e,d=En(o),f=new URL(`${Ln("bridge")}/v1/transfer/prepare`),m=await d(f.toString(),{body:it({amount:s.toString(),chainId:n.toString(),feePayer:l,paymentLinkId:h,purchaseData:c,receiver:r,sender:i,tokenAddress:t,transferAmountWei:s.toString()}),headers:{"Content-Type":"application/json"},method:"POST"});if(!m.ok){const w=await m.json();throw new at({code:w.code||"UNKNOWN_ERROR",correlationId:w.correlationId||void 0,message:w.message||m.statusText,statusCode:m.status})}const{data:g}=await m.json();return{blockNumber:g.blockNumber?BigInt(g.blockNumber):void 0,destinationAmount:BigInt(g.destinationAmount),estimatedExecutionTimeMs:g.estimatedExecutionTimeMs,intent:{amount:s,chainId:n,feePayer:l,receiver:r,sender:i,tokenAddress:t},originAmount:BigInt(g.originAmount),steps:g.steps.map(w=>({...w,transactions:w.transactions.map(p=>({...p,chain:Ot(p.chainId),client:o,value:p.value?BigInt(p.value):void 0}))})),timestamp:g.timestamp}}async function IM(e){var w;const[{getV1Nfts:n},{getThirdwebDomains:t},{getClientFetch:i},{assertInsightEnabled:r},{stringify:o}]=await Promise.all([u(()=>import("./thirdweb-DZ2vK6IO.js"),[]),u(()=>import("./index-B6-Xobl2.js").then(p=>p.b8),__vite__mapDeps([1,2])),u(()=>import("./index-B6-Xobl2.js").then(p=>p.b9),__vite__mapDeps([1,2])),u(()=>import("./common-DAlzQshe.js"),__vite__mapDeps([10,1,2])),u(()=>import("./index-1chDcRmP.js"),__vite__mapDeps([11,12,5,1,2,13,14,9,15,16,17,18,19,20,4,21,22,23,24,25,8,26,27,28,29,30,31,32,33,34]))]),{client:s,chains:c,ownerAddress:l,contractAddresses:h,queryOptions:d}=e;await r(c);const f={chain:c.map(p=>p.id),limit:50,owner_address:[l],contract_address:h||void 0},m=await n({baseUrl:`https://${t().insight}`,fetch:i(s),query:{...f,...d}});if(m.error)throw new Error(`${m.response.status} ${m.response.statusText} - ${m.error?o(m.error):"Unknown error"}`);return(await n2(((w=m.data)==null?void 0:w.data)??[],s,l)).map(p=>({...p,quantityOwned:p.quantityOwned??1n}))}async function wV(e){var p;const[{getV1NftsByContractAddressByTokenId:n},{getThirdwebDomains:t},{getClientFetch:i},{assertInsightEnabled:r},{stringify:o}]=await Promise.all([u(()=>import("./thirdweb-DZ2vK6IO.js"),[]),u(()=>import("./index-B6-Xobl2.js").then(_=>_.b8),__vite__mapDeps([1,2])),u(()=>import("./index-B6-Xobl2.js").then(_=>_.b9),__vite__mapDeps([1,2])),u(()=>import("./common-DAlzQshe.js"),__vite__mapDeps([10,1,2])),u(()=>import("./index-B6-Xobl2.js").then(_=>_.bb),__vite__mapDeps([1,2]))]),{client:s,chain:c,contractAddress:l,tokenId:h,includeOwners:d=!0,queryOptions:f}=e;await r([c]);const m={chain_id:[c.id],include_owners:d===!0?"true":"false"},g=await n({baseUrl:`https://${t().insight}`,fetch:i(s),path:{contract_address:l,token_id:h.toString()},query:{...m,...f}});if(g.error)throw new Error(`${g.response.status} ${g.response.statusText} - ${g.error?o(g.error):"Unknown error"}`);const w=await n2(((p=g.data)==null?void 0:p.data)??[],s);return w==null?void 0:w[0]}async function n2(e,n,t){const[{parseNFT:i},{totalSupply:r}]=await Promise.all([u(()=>Promise.resolve().then(()=>eI),void 0),u(()=>import("./totalSupply-CWYDbbpl.js"),__vite__mapDeps([35,29,1,2,5,19,13,36]))]);return await Promise.all(e.map(async o=>{var j;let s;const{contract:c,extra_metadata:l,collection:h,metadata_url:d,chain_id:f,token_id:m,status:g,balance:w,token_type:p,..._}=o;let x=_,I=t?[xe(t)]:void 0;if("owner_addresses"in _){const{owner_addresses:C,...E}=_;x=E,I=I??(C==null?void 0:C.map(T=>xe(T)))}const b=i2({attributes:((j=o.extra_metadata)==null?void 0:j.attributes)??void 0,image:o.image_url,uri:o.metadata_url??"",...x});if((c==null?void 0:c.type)==="erc1155"){const C=await r({contract:cn({address:c.address,chain:Ve(c.chain_id),client:n}),id:BigInt(m)}).catch(()=>0n);s=i(b,{chainId:(c==null?void 0:c.chain_id)??0,owner:I==null?void 0:I[0],supply:C,tokenAddress:(c==null?void 0:c.address)??"",tokenId:BigInt(m),tokenUri:sd(d)??"",type:"ERC1155"})}else s=i(b,{chainId:(c==null?void 0:c.chain_id)??0,owner:I==null?void 0:I[0],tokenAddress:(c==null?void 0:c.address)??"",tokenId:BigInt(m),tokenUri:sd(d)??"",type:"ERC721"});return{...s,...(c==null?void 0:c.type)==="erc1155"?{quantityOwned:w?BigInt(w):void 0}:{}}}))}function i2(e){if(typeof e!="object"||e===null)return e;for(const n in e)typeof e[n]=="string"?e[n]=sd(e[n]):i2(e[n]);return e}function sd(e){if(!e||typeof e!="string")return e;try{const n=new URL(e);if(n.host.endsWith(".ipfscdn.io")){const t=n.pathname.split("/"),i=t.findIndex(o=>o==="ipfs");if(i===-1)return e;const r=t.slice(i+1).join("/");return r?`ipfs://${r}`:e}}catch{return e}return e}async function bM(e){var g;const[{getV1Tokens:n},{getThirdwebDomains:t},{getClientFetch:i},{assertInsightEnabled:r},{stringify:o}]=await Promise.all([u(()=>import("./thirdweb-DZ2vK6IO.js"),[]),u(()=>import("./index-B6-Xobl2.js").then(w=>w.b8),__vite__mapDeps([1,2])),u(()=>import("./index-B6-Xobl2.js").then(w=>w.b9),__vite__mapDeps([1,2])),u(()=>import("./common-DAlzQshe.js"),__vite__mapDeps([10,1,2])),u(()=>import("./index-B6-Xobl2.js").then(w=>w.bb),__vite__mapDeps([1,2]))]),{client:s,chains:c,ownerAddress:l,tokenAddresses:h,queryOptions:d}=e;await r(c);const f={chain_id:c.length>0?c.map(w=>w.id):[1],include_native:"true",include_spam:"false",limit:50,metadata:"true",owner_address:[l],token_address:h||void 0,sort_by:"balance",sort_order:"desc"},m=await n({baseUrl:`https://${t().insight}`,fetch:i(s),query:{...f,...d}});if(m.error)throw new Error(`${m.response.status} ${m.response.statusText} - ${m.error?o(m.error):"Unknown error"}`);return CM(((g=m.data)==null?void 0:g.data)??[])}async function CM(e){const{toTokens:n}=await u(async()=>{const{toTokens:t}=await import("./to-serializable-transaction-DAYFWHyO.js").then(i=>i.aR);return{toTokens:t}},__vite__mapDeps([13,1,2,5]));return e.map(t=>{const i=t.decimals??18,r=BigInt(t.balance);return{chainId:t.chain_id,decimals:i,displayValue:n(r,i),name:t.name??"",symbol:t.symbol??"",tokenAddress:t.token_address,value:r}})}async function r2(e,n){const t=await e({method:"eth_getBalance",params:[n.address,n.blockTag||"latest"]});return Au(t)}function jM(e){return typeof e=="object"&&e!==null}function Cc(e,n=[]){return jM(e)&&n.every(t=>t in e)}function LM(e){return Cc(e,["__contract"])&&Cc(e.__contract,["address","chain"])&&typeof e.__contract.address=="string"}function EM(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}function TM(){return typeof ur<"u"&&typeof ur.versions<"u"&&typeof ur.versions.node<"u"}function o2(){return!EM()&&!TM()}const rn="com.coinbase.wallet",lr="org.base.account",Rh="io.metamask",s2="me.rainbow",a2="io.zerion.wallet",vM=["inApp","embedded","smart","xyz.abs"];function Vh(e){return e.startsWith("http://")||e.startsWith("https://")}function c2(e,n){if(!Vh(e))return l2(e,n);let t=e;t.endsWith("/")||(t=`${t}/`);const i=encodeURIComponent(n);return{href:t,redirect:`${t}wc?uri=${i}`}}function l2(e,n){if(Vh(e))return c2(e,n);let t=e;t.includes("://")||(t=e.replaceAll("/","").replaceAll(":",""),t=`${t}://`),t.endsWith("/")||(t=`${t}/`);const i=encodeURIComponent(n);return{href:t,redirect:`${t}wc?uri=${i}`}}function u2(e,n){return Vh(e)?c2(e,n):l2(e,n)}function NM(e,n){return`${e.endsWith("/")?e:`${e}/`}tx/${n}`}function SM(e,n){return`${e.endsWith("/")?e:`${e}/`}address/${n}`}function AM(){if(typeof navigator>"u")return!1;const e=Eg(navigator.userAgent);return e?e.toLowerCase().includes("android"):!1}function DM(){if(typeof navigator>"u")return!1;const e=Eg(navigator.userAgent);return e?e.toLowerCase().includes("ios")||e.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1:!1}function OM(){return typeof window>"u"||typeof navigator>"u"?!1:"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}function kM(){return typeof window>"u"?!1:"orientation"in window||"onorientationchange"in window}function Mi(){return!!(AM()||DM()||OM()&&kM()||typeof window<"u"&&window.innerWidth<640)}function hr(e){if(window!==window.top)window.open(e);else if(e.startsWith("http")){const t=document.createElement("a");t.href=e,t.target="_blank",t.rel="noreferrer noopener",t.click()}else window.location.href=e}function zM(e){const{createOptions:n}=e,t=Fc();let i,r;function o(){i=void 0,r=void 0}let s=async()=>{},c=async d=>{r=d};const l=t.subscribe("chainChanged",d=>{r=d}),h=t.subscribe("disconnect",()=>{o(),l(),h()});return t.subscribe("accountChanged",d=>{i=d}),{autoConnect:async d=>{const{autoConnectBaseAccountSDK:f}=await u(async()=>{const{autoConnectBaseAccountSDK:x}=await Promise.resolve().then(()=>z1);return{autoConnectBaseAccountSDK:x}},void 0),m=await e.providerFactory(),[g,w,p,_]=await f(d,t,m);return i=g,r=w,s=p,c=_,qn({chainId:r.id,client:d.client,walletAddress:i.address,walletType:lr}),i},connect:async d=>{const{connectBaseAccountSDK:f}=await u(async()=>{const{connectBaseAccountSDK:x}=await Promise.resolve().then(()=>z1);return{connectBaseAccountSDK:x}},void 0),m=await e.providerFactory(),[g,w,p,_]=await f(d,t,m);return i=g,r=w,s=p,c=_,qn({chainId:r.id,client:d.client,walletAddress:i.address,walletType:lr}),i},disconnect:async()=>{o(),await s()},getAccount:()=>i,getChain(){if(r)return r=Qc(r.id)||r,r},getConfig:()=>n,id:lr,subscribe:t.subscribe,switchChain:async d=>{await c(d)}}}async function PM({wallet:e,client:n,id:t}){const i=e.getAccount();if(!i)throw new Error(`Failed to get call status, no account found for wallet ${e.id}`);const r=e.getChain();if(!r)throw new Error(`Failed to get call status, no chain found for wallet ${e.id}`);if(i.getCallsStatus)return i.getCallsStatus({id:t,chain:r,client:n});throw new Error(`Failed to get call status, wallet ${e.id} does not support EIP-5792`)}const RM={"0x0":"reverted","0x1":"success"};function Uh(e){var i;const[n,t]=(()=>{const r=e.status;return r>=100&&r<200?["pending",r]:r>=200&&r<300?["success",r]:r>=300&&r<700?["failure",r]:r==="CONFIRMED"?["success",200]:r==="PENDING"?["pending",100]:[void 0,r]})();return{...e,atomic:e.atomic,chainId:e.chainId?Tg(e.chainId):void 0,receipts:((i=e.receipts)==null?void 0:i.map(r=>({...r,blockNumber:Au(r.blockNumber),gasUsed:Au(r.gasUsed),status:RM[r.status]})))??[],status:n,statusCode:t,version:e.version}}function Bh(e,n){const t={};for(const[i,r]of Object.entries(e)){t[Number(i)]={};const o={};for(const[s,c]of Object.entries(r))o[s]=c;t[Number(i)]=o}return typeof n=="number"?{[n]:t[n]}:t}async function VM(e){var s;const{wallet:n,chain:t}=e,i=n.getAccount();if(!i)throw new Error(`Cannot send calls, no account connected for wallet: ${n.id}`);const r=e.calls[0];if(!r)throw new Error("No calls to send");const o=r.chain||t;if(((s=n.getChain())==null?void 0:s.id)!==o.id&&await n.switchChain(o),i.sendCalls){const{wallet:c,...l}=e;return{...await i.sendCalls(l),wallet:n}}throw new Error(`Cannot send calls, wallet ${n.id} does not support EIP-5792`)}async function tl(e,n){const t=e.calls[0];if(!t)throw new Error("No calls to send");const{calls:i,capabilities:r,version:o="2.0.0",chain:s=t.chain}=e,c=await Promise.all(i.map(async h=>{const{to:d,value:f}=h;if(d===void 0&&h.data===void 0)throw new Error("Cannot send call, `to` or `data` must be provided.");const[m,g,w]=await Promise.all([fc(d),Vg(h),fc(f)]);return m?{data:g,to:xe(m),value:typeof w=="bigint"||typeof w=="number"?Et(w):void 0}:{data:g,to:void 0,value:void 0}}));return{callParams:[{atomicRequired:e.atomicRequired??!1,calls:c,capabilities:r,chainId:Et(s.id),from:xe(n.address),version:o}],chain:s}}const UM=Object.freeze(Object.defineProperty({__proto__:null,sendCalls:VM,toProviderCallParams:tl},Symbol.toStringTag,{value:"Module"}));function Wh(e){return BM(e).map(n=>{try{const t=new URL(n);return t.hostname.endsWith(".thirdweb.com")&&(t.pathname="",t.search=""),t.toString()}catch{return n}})}function BM(e,n,t="http"){const i=[];for(const r of e.rpc)t==="http"&&!r.startsWith("http")||t==="ws"&&!r.startsWith("ws")||(r.includes("${THIRDWEB_API_KEY}")?i.push(r.replace("${THIRDWEB_API_KEY}","")):r.includes("${")||i.push(r));if(i.length===0)throw new Error(`No RPC available for chainId "${e.chainId}" with mode ${t}`);return i}function jc(){if(!o2())return{description:"thirdweb powered dApp",logoUrl:"https://thirdweb.com/favicon.ico",name:"thirdweb powered dApp",url:"https://thirdweb.com"};const{protocol:e,hostname:n,port:t}=window.location;let i=`${e}//${n}`;t&&t!=="80"&&t!=="443"&&(i+=`:${t}`);const r=`${i}/favicon.ico`;return{description:window.document.title||"thirdweb powered dApp",logoUrl:r,name:window.document.title||"thirdweb powered dApp",url:i}}function Rn(e){return typeof e=="number"?e:vg(e)?Tg(e):typeof e=="bigint"?Number(e):Number.parseInt(e,10)}let Wl,Aa;async function d2(e){var o,s,c,l,h,d,f;if(Wl){if(e&&Aa){const m=((o=Aa.chains)==null?void 0:o.map(_=>_.id))||[],g=((s=e.chains)==null?void 0:s.map(_=>_.id))||[],w=m.length===g.length&&m.every((_,x)=>_===g[x]),p=((c=e.appMetadata)==null?void 0:c.name)===((l=Aa.appMetadata)==null?void 0:l.name);(!w||!p)&&console.warn("[Base Account SDK] Provider already initialized with different options. The Base Account SDK uses a singleton provider - subsequent configurations are ignored. Create only one Base Account wallet instance per application.")}return Wl}const{createBaseAccountSDK:n}=await u(async()=>{const{createBaseAccountSDK:m}=await import("./index-DMZH80fA.js");return{createBaseAccountSDK:m}},__vite__mapDeps([37,38,1,2,39,5,13,14,9,16,12,15,17,18,19,34,4,21,22,23,24,25,8,26,27,28,29,30,31,32,33])),t=jc(),r=n({appName:((h=e==null?void 0:e.appMetadata)==null?void 0:h.name)||t.name||"thirdweb powered dApp",appLogoUrl:((d=e==null?void 0:e.appMetadata)==null?void 0:d.logoUrl)||t.logoUrl||null,appChainIds:((f=e==null?void 0:e.chains)==null?void 0:f.map(m=>m.id))||[]}).getProvider();return Wl=r,Aa=e,r}function k1({provider:e,address:n,client:t}){const i={address:xe(n),async sendTransaction(r){const o=await e.request({method:"eth_sendTransaction",params:[{accessList:r.accessList,data:r.data,from:xe(n),gas:r.gas?Et(r.gas):void 0,to:r.to,value:r.value?Et(r.value):void 0}]});return yh({chainId:r.chainId,client:t,contractAddress:r.to??void 0,gasPrice:r.gasPrice,transactionHash:o,walletAddress:xe(n),walletType:lr}),{transactionHash:o}},async signMessage({message:r}){if(!i.address)throw new Error("Provider not setup");const o=typeof r=="string"?dh(r):r.raw instanceof Uint8Array?hh(r.raw):r.raw,s=await e.request({method:"personal_sign",params:[o,i.address]});if(!hc(s))throw new Error("Invalid signature returned");return s},async signTypedData(r){if(!i.address)throw new Error("Provider not setup");const{domain:o,message:s,primaryType:c}=ph(r),l={EIP712Domain:Wg(o),...r.types};$g({domain:o,message:s,primaryType:c,types:l});const h=Yg({domain:o??{},message:s,primaryType:c,types:l}),d=await e.request({method:"eth_signTypedData_v4",params:[i.address,h]});if(!hc(d))throw new Error("Invalid signed payload returned");return d},sendCalls:async r=>{try{const{callParams:o,chain:s}=await tl(r,i),c=await e.request({method:"wallet_sendCalls",params:o});return c&&typeof c=="object"&&"id"in c?{chain:s,client:t,id:c.id}:{chain:s,client:t,id:c}}catch(o){throw/unsupport|not support/i.test(o.message)?new Error(`${lr} errored calling wallet_sendCalls, with error: ${o instanceof Error?o.message:it(o)}`):o}},async getCallsStatus(r){try{const o=await e.request({method:"wallet_getCallsStatus",params:[r.id]});return Uh(o)}catch(o){throw/unsupport|not support/i.test(o.message)?new Error(`${lr} does not support wallet_getCallsStatus, reach out to them directly to request EIP-5792 support.`):o}},async getCapabilities(r){const o=r.chainId;try{const s=await e.request({method:"wallet_getCapabilities",params:[xe(i.address)]});return Bh(s,o)}catch(s){if(/unsupport|not support|not available/i.test(s.message))return{message:`${lr} does not support wallet_getCapabilities, reach out to them directly to request EIP-5792 support.`};throw s}}};return i}function h2(e,n,t,i,r){const o=k1({address:e,client:r,provider:t});async function s(){t.off("accountsChanged",l),t.off("chainChanged",h),t.off("disconnect",c),await t.disconnect()}async function c(){s(),i.emit("disconnect",void 0)}function l(d){if(d[0]){const f=k1({address:xe(d[0]),client:r,provider:t});i.emit("accountChanged",f),i.emit("accountsChanged",d)}else c()}function h(d){const f=Ve(Rn(d));i.emit("chainChanged",f)}return t.on("accountsChanged",l),t.on("chainChanged",h),t.on("disconnect",c),[o,n,c,d=>f2(t,d)]}async function WM(e,n,t){const i=await t.request({method:"eth_requestAccounts"});if(!i[0])throw new Error("No accounts found");const r=xe(i[0]),o=await t.request({method:"eth_chainId"}),s=Rn(o);let c=e.chain&&e.chain.id===s?e.chain:Ve(s);return s&&(e!=null&&e.chain)&&s!==(e==null?void 0:e.chain.id)&&(await f2(t,e.chain),c=e.chain),h2(r,c,t,n,e.client)}async function $M(e,n,t){const r=(await t.request({method:"eth_accounts"}))[0];if(!r)throw new Error("No accounts found");const o=await t.request({method:"eth_chainId"}),s=Rn(o),c=e.chain&&e.chain.id===s?e.chain:Ve(s);return h2(r,c,t,n,e.client)}async function f2(e,n){var o;const t=await e.request({method:"eth_chainId"}),i=Ve(Rn(t));if((i==null?void 0:i.id)===n.id)return;const r=Et(n.id);try{await e.request({method:"wallet_switchEthereumChain",params:[{chainId:r}]})}catch(s){const c=await Zt(n);(s==null?void 0:s.code)===4902&&await e.request({method:"wallet_addEthereumChain",params:[{blockExplorerUrls:((o=c.explorers)==null?void 0:o.map(l=>l.url))||[],chainId:r,chainName:c.name,nativeCurrency:c.nativeCurrency,rpcUrls:Wh(c)}]})}}const z1=Object.freeze(Object.defineProperty({__proto__:null,autoConnectBaseAccountSDK:$M,connectBaseAccountSDK:WM,getBaseAccountWebProvider:d2},Symbol.toStringTag,{value:"Module"}));function YM(e){const{createOptions:n}=e,t=Fc();let i,r;function o(){i=void 0,r=void 0}let s=async()=>{},c=async d=>{r=d};const l=t.subscribe("chainChanged",d=>{r=d}),h=t.subscribe("disconnect",()=>{o(),l(),h()});return t.subscribe("accountChanged",d=>{i=d}),{autoConnect:async d=>{const{autoConnectCoinbaseWalletSDK:f}=await u(async()=>{const{autoConnectCoinbaseWalletSDK:x}=await Promise.resolve().then(()=>ad);return{autoConnectCoinbaseWalletSDK:x}},void 0),m=await e.providerFactory(),[g,w,p,_]=await f(d,t,m);return i=g,r=w,s=p,c=_,qn({chainId:r.id,client:d.client,walletAddress:i.address,walletType:rn}),i},connect:async d=>{const{connectCoinbaseWalletSDK:f}=await u(async()=>{const{connectCoinbaseWalletSDK:x}=await Promise.resolve().then(()=>ad);return{connectCoinbaseWalletSDK:x}},void 0),m=await e.providerFactory(),[g,w,p,_]=await f(d,t,m);return i=g,r=w,s=p,c=_,qn({chainId:r.id,client:d.client,walletAddress:i.address,walletType:rn}),i},disconnect:async()=>{o(),await s()},getAccount:()=>i,getChain(){if(r)return r=Qc(r.id)||r,r},getConfig:()=>n,id:rn,onConnectRequested:async()=>{var d;if(e.onConnectRequested){const f=await e.providerFactory();return(d=e.onConnectRequested)==null?void 0:d.call(e,f)}},subscribe:t.subscribe,switchChain:async d=>{await c(d)}}}async function m2(e){var n,t;await((t=(n=e==null?void 0:e.communicator)==null?void 0:n.waitForPopupLoaded)==null?void 0:t.call(n))}const FM=Object.freeze(Object.defineProperty({__proto__:null,showCoinbasePopup:m2},Symbol.toStringTag,{value:"Module"}));let $l;async function g2(e){var n,t;if(!$l){let i=(await u(()=>import("./index-BuLBr4CJ.js"),__vite__mapDeps([40,1,2,5,38,39]))).default;typeof i!="function"&&typeof i.default=="function"&&(i=i.default);const o=new i({appChainIds:e!=null&&e.chains?e.chains.map(s=>s.id):void 0,appLogoUrl:((n=e==null?void 0:e.appMetadata)==null?void 0:n.logoUrl)||jc().logoUrl,appName:((t=e==null?void 0:e.appMetadata)==null?void 0:t.name)||jc().name}).makeWeb3Provider(e==null?void 0:e.walletConfig);return $l=o,o}return $l}function P1({provider:e,address:n,client:t}){const i={address:xe(n),onTransactionRequested:async()=>{window.localStorage&&window.localStorage.getItem("-CBWSDK:SignerConfigurator:SignerType")==="scw"&&await m2(e)},async sendTransaction(r){const o=await e.request({method:"eth_sendTransaction",params:[{accessList:r.accessList,data:r.data,from:xe(n),gas:r.gas?Et(r.gas):void 0,to:r.to,value:r.value?Et(r.value):void 0}]});return yh({chainId:r.chainId,client:t,contractAddress:r.to??void 0,gasPrice:r.gasPrice,transactionHash:o,walletAddress:xe(n),walletType:rn}),{transactionHash:o}},async signMessage({message:r}){if(!i.address)throw new Error("Provider not setup");const o=typeof r=="string"?dh(r):r.raw instanceof Uint8Array?hh(r.raw):r.raw,s=await e.request({method:"personal_sign",params:[o,i.address]});if(!hc(s))throw new Error("Invalid signature returned");return s},async signTypedData(r){if(!i.address)throw new Error("Provider not setup");const{domain:o,message:s,primaryType:c}=ph(r),l={EIP712Domain:Wg(o),...r.types};$g({domain:o,message:s,primaryType:c,types:l});const h=Yg({domain:o??{},message:s,primaryType:c,types:l}),d=await e.request({method:"eth_signTypedData_v4",params:[i.address,h]});if(!hc(d))throw new Error("Invalid signed payload returned");return d},sendCalls:async r=>{try{const{callParams:o,chain:s}=await tl(r,i),c=await e.request({method:"wallet_sendCalls",params:o});return c&&typeof c=="object"&&"id"in c?{chain:s,client:t,id:c.id}:{chain:s,client:t,id:c}}catch(o){throw/unsupport|not support/i.test(o.message)?new Error(`${rn} errored calling wallet_sendCalls, with error: ${o instanceof Error?o.message:it(o)}`):o}},async getCallsStatus(r){try{const o=await e.request({method:"wallet_getCallsStatus",params:[r.id]});return Uh(o)}catch(o){throw/unsupport|not support/i.test(o.message)?new Error(`${rn} does not support wallet_getCallsStatus, reach out to them directly to request EIP-5792 support.`):o}},async getCallsStatusRaw(r){try{return await e.request({method:"wallet_getCallsStatus",params:[r.id]})}catch(o){throw/unsupport|not support/i.test(o.message)?new Error(`${rn} does not support wallet_getCallsStatus, reach out to them directly to request EIP-5792 support.`):o}},async getCapabilities(r){const o=r.chainId;try{const s=await e.request({method:"wallet_getCapabilities",params:[xe(i.address)]});return Bh(s,o)}catch(s){if(/unsupport|not support|not available/i.test(s.message))return{message:`${rn} does not support wallet_getCapabilities, reach out to them directly to request EIP-5792 support.`};throw s}}};return i}function y2(e,n,t,i,r){const o=P1({address:e,client:r,provider:t});async function s(){t.removeListener("accountsChanged",l),t.removeListener("chainChanged",h),t.removeListener("disconnect",c),await t.disconnect()}async function c(){s(),i.emit("disconnect",void 0)}function l(d){if(d[0]){const f=P1({address:xe(d[0]),client:r,provider:t});i.emit("accountChanged",f),i.emit("accountsChanged",d)}else c()}function h(d){const f=Ve(Rn(d));i.emit("chainChanged",f)}return t.on("accountsChanged",l),t.on("chainChanged",h),t.on("disconnect",c),[o,n,c,d=>p2(t,d)]}async function QM(e,n,t){const i=await t.request({method:"eth_requestAccounts"});if(!i[0])throw new Error("No accounts found");const r=xe(i[0]),o=await t.request({method:"eth_chainId"}),s=Rn(o);let c=e.chain&&e.chain.id===s?e.chain:Ve(s);return s&&(e!=null&&e.chain)&&s!==(e==null?void 0:e.chain.id)&&(await p2(t,e.chain),c=e.chain),y2(r,c,t,n,e.client)}async function HM(e,n,t){const r=(await t.request({method:"eth_accounts"}))[0];if(!r)throw new Error("No accounts found");const o=await t.request({method:"eth_chainId"}),s=Rn(o),c=e.chain&&e.chain.id===s?e.chain:Ve(s);return y2(r,c,t,n,e.client)}async function p2(e,n){var o;const t=await e.request({method:"eth_chainId"}),i=Ve(Rn(t));if((i==null?void 0:i.id)===n.id)return;const r=Et(n.id);try{await e.request({method:"wallet_switchEthereumChain",params:[{chainId:r}]})}catch(s){const c=await Zt(n);(s==null?void 0:s.code)===4902&&await e.request({method:"wallet_addEthereumChain",params:[{blockExplorerUrls:((o=c.explorers)==null?void 0:o.map(l=>l.url))||[],chainId:r,chainName:c.name,nativeCurrency:c.nativeCurrency,rpcUrls:Wh(c)}]})}}const ad=Object.freeze(Object.defineProperty({__proto__:null,autoConnectCoinbaseWalletSDK:HM,connectCoinbaseWalletSDK:QM,getCoinbaseWebProvider:g2},Symbol.toStringTag,{value:"Module"}));function ZM(...e){const[n,t]=e,i={id:n,partnerId:t==null?void 0:t.partnerId};return Lg({connectorFactory:async r=>{const{InAppWebConnector:o}=await u(async()=>{const{InAppWebConnector:s}=await import("./web-connector-DJrJBk0_.js");return{InAppWebConnector:s}},__vite__mapDeps([3,1,2,4,5,6,7,8,9]));return new o({client:r,ecosystem:i,storage:t==null?void 0:t.storage})},createOptions:{auth:{...t==null?void 0:t.auth,options:[]},partnerId:i.partnerId},ecosystem:i})}function cd(e){const n=$h(e);if(!n)throw new Error(`No injected provider found for wallet: "${e}"`);return n}async function GM({id:e,provider:n,emitter:t,client:i,chain:r}){var m,g;let o,c=0;for(;!(o!=null&&o[0])&&c<3;){try{o=await n.request({method:"eth_requestAccounts"})}catch(w){if(console.error(w),(g=(m=KM(w))==null?void 0:m.toLowerCase())!=null&&g.includes("rejected"))throw w;await new Promise(p=>setTimeout(p,500))}c++}const l=o==null?void 0:o[0];if(!l)throw new Error("Failed to connect to wallet, no accounts available");const h=xe(l),d=await n.request({method:"eth_chainId"}).then(Rn).catch(w=>{throw new Error("Error reading chainId from provider",w)});let f=r&&r.id===d?r:Ve(d);try{r&&typeof r.id<"u"&&r.id!==d&&(await _2(n,r),f=r)}catch{console.warn(`Error switching to chain ${r==null?void 0:r.id} - defaulting to wallet chain (${d})`)}return w2({address:h,chain:f,client:i,emitter:t,id:e,provider:n})}async function qM({id:e,provider:n,emitter:t,client:i,chain:r}){const s=(await n.request({method:"eth_accounts"}))[0];if(!s)throw new Error("Failed to connect to wallet, no accounts available");const c=xe(s),l=await n.request({method:"eth_chainId"}).then(Rn),h=r&&r.id===l?r:Ve(l);return w2({address:c,chain:h,client:i,emitter:t,id:e,provider:n})}function R1({provider:e,address:n,client:t,id:i}){const r={address:xe(n),async sendTransaction(o){const c=[{...o.gasPrice?{gasPrice:Et(o.gasPrice)}:{maxFeePerGas:o.maxFeePerGas?Et(o.maxFeePerGas):void 0,maxPriorityFeePerGas:o.maxPriorityFeePerGas?Et(o.maxPriorityFeePerGas):void 0},from:this.address,gas:o.gas?Et(o.gas):void 0,nonce:o.nonce?Et(o.nonce):void 0,to:o.to?xe(o.to):void 0,data:o.data,value:o.value?Et(o.value):void 0,authorizationList:o.authorizationList?$3(o.authorizationList):void 0,accessList:o.accessList,...o.eip712}];try{const l=await e.request({method:"eth_sendTransaction",params:c});return yh({chainId:o.chainId,client:t,contractAddress:o.to??void 0,gasPrice:o.gasPrice,transactionHash:l,walletAddress:xe(n),walletType:i}),{transactionHash:l}}catch(l){throw R3(l)&&V3({chainId:o.chainId,client:t,contractAddress:o.to||void 0,error:l,transactionValue:o.value,walletAddress:xe(n)}),l}},async signMessage({message:o}){if(!r.address)throw new Error("Provider not setup");const s=typeof o=="string"?dh(o):o.raw instanceof Uint8Array?hh(o.raw):o.raw;return await e.request({method:"personal_sign",params:[s,xe(r.address)]})},async signAuthorization(o){const s=B3(o);let c;try{c=await e.request({method:"eth_sign",params:[xe(r.address),s]})}catch{c=await e.request({method:"secp256k1_sign",params:[s]})}if(!c)throw new Error("Failed to sign authorization");const l=W3(c);return{...o,...l}},async signTypedData(o){if(!e||!r.address)throw new Error("Provider not setup");const s=ph(o),{domain:c,message:l,primaryType:h}=s,d={EIP712Domain:Lh({domain:c}),...s.types};l4({domain:c,message:l,primaryType:h,types:d});const f=Tx({domain:c??{},message:l,primaryType:h,types:d});return await e.request({method:"eth_signTypedData_v4",params:[xe(r.address),f]})},async watchAsset(o){return await e.request({method:"wallet_watchAsset",params:o},{retryCount:0})},async sendCalls(o){try{const{callParams:s,chain:c}=await tl(o,r),l=await e.request({method:"wallet_sendCalls",params:s});return l&&typeof l=="object"&&"id"in l?{chain:c,client:t,id:l.id}:{chain:c,client:t,id:l}}catch(s){throw/unsupport|not support/i.test(s.message)?new Error(`${i} errored calling wallet_sendCalls, with error: ${s instanceof Error?s.message:mh(s)}`):s}},async getCallsStatus(o){try{const s=await e.request({method:"wallet_getCallsStatus",params:[o.id]});return Uh(s)}catch(s){throw/unsupport|not support/i.test(s.message)?new Error(`${i} does not support wallet_getCallsStatus, reach out to them directly to request EIP-5792 support.`):s}},async getCallsStatusRaw(o){try{return await e.request({method:"wallet_getCallsStatus",params:[o.id]})}catch(s){throw/unsupport|not support/i.test(s.message)?new Error(`${i} does not support wallet_getCallsStatus, reach out to them directly to request EIP-5792 support.`):s}},async getCapabilities(o){const s=o.chainId;try{const c=await e.request({method:"wallet_getCapabilities",params:[xe(r.address),s?[Et(s)]:void 0]});return Bh(c,s)}catch(c){if(/unsupport|not support|not available/i.test(c.message))return{message:`${i} does not support wallet_getCapabilities, reach out to them directly to request EIP-5792 support.`};throw c}}};return r}async function w2({provider:e,address:n,chain:t,emitter:i,client:r,id:o}){const s=R1({address:n,client:r,id:o,provider:e});async function c(){e.removeListener("accountsChanged",h),e.removeListener("chainChanged",d),e.removeListener("disconnect",l);try{await Cx(()=>e.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}),{timeout:100})}catch{}}async function l(){c(),i.emit("disconnect",void 0)}function h(f){if(f[0]){const m=R1({address:xe(f[0]),client:r,id:o,provider:e});i.emit("accountChanged",m),i.emit("accountsChanged",f)}else l()}function d(f){const m=Ve(Rn(f));i.emit("chainChanged",m)}return e.on&&(e.on("accountsChanged",h),e.on("chainChanged",d),e.on("disconnect",l)),[s,t,l,f=>_2(e,f)]}async function _2(e,n){var i;const t=Et(n.id);try{await e.request({method:"wallet_switchEthereumChain",params:[{chainId:t}]})}catch{const r=await Zt(n);await e.request({method:"wallet_addEthereumChain",params:[{blockExplorerUrls:(i=r.explorers)==null?void 0:i.map(o=>o.url),chainId:t,chainName:r.name,nativeCurrency:r.nativeCurrency,rpcUrls:Wh(r)}]})}}function KM(e){return e instanceof Error?e.message:typeof e=="string"?e:typeof e=="object"&&e!==null?JSON.stringify(e):String(e)}const V1=Object.freeze(Object.defineProperty({__proto__:null,autoConnectEip1193Wallet:qM,connectEip1193Wallet:GM,getInjectedProvider:cd},Symbol.toStringTag,{value:"Module"}));function x2(e){const n=Fc();let t,i,r,o;return{autoConnect:async s=>{const{connectSmartAccount:c}=await u(async()=>{const{connectSmartAccount:d}=await import("./index-B4kmUY0d.js").then(f=>f.i);return{connectSmartAccount:d}},__vite__mapDeps([41,1,2,5,13,29,19,17,18,28,22,42,7,43,16,21,8,25])),[l,h]=await c(s,e);return o=s,t=l,r=h,qn({chainId:r.id,client:s.client,walletAddress:t.address,walletType:"smart"}),t},connect:async s=>{const{connectSmartAccount:c}=await u(async()=>{const{connectSmartAccount:d}=await import("./index-B4kmUY0d.js").then(f=>f.i);return{connectSmartAccount:d}},__vite__mapDeps([41,1,2,5,13,29,19,17,18,28,22,42,7,43,16,21,8,25])),[l,h]=await c(s,e);return i=s.personalAccount,o=s,t=l,r=h,qn({chainId:r.id,client:s.client,walletAddress:t.address,walletType:"smart"}),n.emit("accountChanged",t),t},disconnect:async()=>{if(t){const{disconnectSmartAccount:s}=await u(async()=>{const{disconnectSmartAccount:c}=await import("./index-B4kmUY0d.js").then(l=>l.i);return{disconnectSmartAccount:c}},__vite__mapDeps([41,1,2,5,13,29,19,17,18,28,22,42,7,43,16,21,8,25]));await s(t)}t=void 0,i=void 0,r=void 0,n.emit("disconnect",void 0)},getAccount:()=>t,getAdminAccount:()=>i,getChain(){if(r)return r=Qc(r.id)||r,r},getConfig:()=>e,id:"smart",subscribe:n.subscribe,switchChain:async s=>{var f;if(!o)throw new Error("Cannot switch chain without a previous connection");if(!await j3(s)){const m=cn({address:e.factoryAddress||N3((f=e.overrides)==null?void 0:f.entrypointAddress),chain:s,client:o.client});if(!await Ug(m))throw new Error(`Factory contract not deployed on chain: ${s.id}`)}const{connectSmartAccount:l}=await u(async()=>{const{connectSmartAccount:m}=await import("./index-B4kmUY0d.js").then(g=>g.i);return{connectSmartAccount:m}},__vite__mapDeps([41,1,2,5,13,29,19,17,18,28,22,42,7,43,16,21,8,25])),[h,d]=await l({...o,chain:s},{...e,chain:s});t=h,r=d,n.emit("accountChanged",h),n.emit("chainChanged",d)}}}function Tt(...e){const[n,t]=e;switch(!0){case n==="smart":return x2(t);case(n==="embedded"||n==="inApp"):return od(t);case De(n):return ZM(...e);case n===rn:{const i=t;return YM({createOptions:i,onConnectRequested:async r=>{const{showCoinbasePopup:o}=await u(async()=>{const{showCoinbasePopup:s}=await Promise.resolve().then(()=>FM);return{showCoinbasePopup:s}},void 0);return o(r)},providerFactory:()=>g2(i)})}case n===lr:{const i=t;return zM({createOptions:i,providerFactory:()=>d2(i)})}default:{let c=function(){r=void 0,o=void 0};const i=Fc();let r,o,s,l=async()=>{};const h=i.subscribe("disconnect",()=>{c(),s==null||s(),h()});i.subscribe("accountChanged",g=>{r=g});let d=async()=>{throw new Error("Not implemented yet")};const f=Mi()?g=>hr(g):void 0,m={autoConnect:async g=>{const{injectedProvider:w}=await u(async()=>{const{injectedProvider:p}=await Promise.resolve().then(()=>Lc);return{injectedProvider:p}},void 0);if(n!=="walletConnect"&&w(n)){const{autoConnectEip1193Wallet:p}=await u(async()=>{const{autoConnectEip1193Wallet:j}=await Promise.resolve().then(()=>V1);return{autoConnectEip1193Wallet:j}},void 0),[_,x,I,b]=await p({chain:g.chain,client:g.client,emitter:i,id:n,provider:cd(n)});return r=_,o=x,l=I,d=b,s=i.subscribe("chainChanged",j=>{o=j}),qn({chainId:o.id,client:g.client,walletAddress:r.address,walletType:n}),r}if(g&&"client"in g){const{autoConnectWC:p}=await u(async()=>{const{autoConnectWC:j}=await import("./controller-CMiTdXrl.js");return{autoConnectWC:j}},__vite__mapDeps([44,1,2,5,8,15,13,4,21,22,18,17,19,14,9,23,24,25,26,27,28,29,30,31,32,33,34])),[_,x,I,b]=await p(g,i,m.id,Pt,f);return r=_,o=x,l=I,d=b,qn({chainId:o.id,client:g.client,walletAddress:r.address,walletType:n}),r}throw new Error("Failed to auto connect")},connect:async g=>{async function w(x){var j;const{connectWC:I}=await u(async()=>{const{connectWC:C}=await import("./controller-CMiTdXrl.js");return{connectWC:C}},__vite__mapDeps([44,1,2,5,8,15,13,4,21,22,18,17,19,14,9,23,24,25,26,27,28,29,30,31,32,33,34]));let b;try{const[C,E,T,O]=await I({...x,walletConnect:{...x.walletConnect,onDisplayUri:((j=x.walletConnect)==null?void 0:j.onDisplayUri)||(async L=>{var N,v;if(typeof window<"u"&&typeof document<"u")if(Mi()){const D=await ga(n),z=D.mobile.native||D.mobile.universal;hr(z?u2(z,L).redirect:L);return}else try{const{createQROverlay:D}=await u(async()=>{const{createQROverlay:z}=await import("./qr-overlay-CDVJkAma.js");return{createQROverlay:z}},__vite__mapDeps([45,1,2]));b&&b.destroy(),b=D(L,{theme:((v=(N=x.walletConnect)==null?void 0:N.qrModalOptions)==null?void 0:v.themeMode)??"dark",qrSize:280,showCloseButton:!0,onCancel:()=>{var z,V;(V=(z=x.walletConnect)==null?void 0:z.onCancel)==null||V.call(z)}})}catch(D){console.error("Failed to create QR overlay:",D)}})}},i,m.id,Pt,f);return b&&(b.destroy(),b=void 0),r=C,o=E,l=T,d=O,qn({chainId:o.id,client:x.client,walletAddress:r.address,walletType:n}),r}catch(C){throw b&&(b.destroy(),b=void 0),C}}if(n==="walletConnect"){const{client:x,chain:I,...b}=g;return w({chain:I,client:x,walletConnect:{...b}})}const p=g&&"walletConnect"in g,{injectedProvider:_}=await u(async()=>{const{injectedProvider:x}=await Promise.resolve().then(()=>Lc);return{injectedProvider:x}},void 0);if(_(n)&&!p){const{connectEip1193Wallet:x}=await u(async()=>{const{connectEip1193Wallet:E}=await Promise.resolve().then(()=>V1);return{connectEip1193Wallet:E}},void 0),[I,b,j,C]=await x({chain:g.chain,client:g.client,emitter:i,id:n,provider:cd(n)});return r=I,o=b,l=j,d=C,s=i.subscribe("chainChanged",E=>{o=E}),qn({chainId:o.id,client:g.client,walletAddress:r.address,walletType:n}),r}if(g&&"client"in g)return w(g);throw new Error("Failed to connect")},disconnect:async()=>{c(),await l()},getAccount:()=>r,getChain(){if(o)return o=Qc(o.id)||o,o},getConfig:()=>e[1],id:n,subscribe:i.subscribe,switchChain:async g=>{try{await d(g),o=g}catch(w){console.error("Error switching chain",w)}}};return m}}}const U1=o2()?Y3():void 0;function $h(e){const n=Ii().find(t=>t.info.rdns===e);return n==null?void 0:n.provider}function JM(){if(U1)return U1}function Ii(){var n;const e=((n=JM())==null?void 0:n.getProviders())||[];for(const t of e)if(t.info.rdns==="io.metamask.mobile"){t.info.rdns=Rh;break}return e}const Lc=Object.freeze(Object.defineProperty({__proto__:null,getInstalledWalletProviders:Ii,injectedProvider:$h},Symbol.toStringTag,{value:"Module"}));function XM(e,n){switch(n.type){case"ERC721":return{chainId:n.chainId,id:n.tokenId,metadata:e,owner:(n==null?void 0:n.owner)??null,tokenAddress:n.tokenAddress,tokenURI:n.tokenUri,type:n.type};case"ERC1155":return{chainId:n.chainId,id:n.tokenId,metadata:e,owner:(n==null?void 0:n.owner)??null,supply:n.supply,tokenAddress:n.tokenAddress,tokenURI:n.tokenUri,type:n.type};default:throw new Error("Invalid NFT type")}}async function M2(e){let n=e.uri;n.startsWith("did:nft:")&&(n=n.replace("did:nft:","").replace(/_/g,"/"));const[t="",i="",r=""]=n.split("/"),[o,s]=t.split(":"),[c,l]=i.split(":");if(!o||o.toLowerCase()!=="eip155")throw new Error(`Invalid EIP namespace, expected EIP155, got: "${o}"`);if(!s)throw new Error("Chain ID not found");if(!l||!yr(l))throw new Error("Contract address not found");if(!r)throw new Error("Token ID not found");const h=Ve(Number(s)),d=cn({address:l,chain:h,client:e.client});switch(c){case"erc721":{const{getNFT:f}=await u(async()=>{const{getNFT:g}=await import("./getNFT-BLT_Nrf_.js");return{getNFT:g}},__vite__mapDeps([46,1,2,47,31,32,4,5,29,19,13,21,22,18,17,14,9,23,24,25,8,26,27,28,30,33,34]));return(await f({contract:d,tokenId:BigInt(r)})).metadata.image??null}case"erc1155":{const{getNFT:f}=await u(async()=>{const{getNFT:g}=await import("./getNFT-uyJP8nm4.js");return{getNFT:g}},__vite__mapDeps([48,47,1,2,31,32,4,5,35,29,19,13,36,21,22,18,17,14,9,23,24,25,8,26,27,28,30,33,34]));return(await f({contract:d,tokenId:BigInt(r)})).metadata.image??null}default:throw new Error(`Invalid ERC namespace, expected ERC721 or ERC1155, got: "${c}"`)}}const eI=Object.freeze(Object.defineProperty({__proto__:null,parseNFT:XM,parseNftUri:M2},Symbol.toStringTag,{value:"Module"})),I2=y.createContext(void 0);function Yh(e){if(!e.address)throw new Error("AccountProvider: No address passed. Ensure an address is always provided to the AccountProvider");return a.jsx(I2.Provider,{value:e,children:e.children})}function ya(){const e=y.useContext(I2);if(!e)throw new Error("AccountProviderContext not found. Make sure you are using AccountName, AccountAvatar, etc. inside an <AccountProvider /> component");return e}const ld={type:"dark",colors:{accentButtonBg:"hsl(221 83% 54%)",accentButtonText:"hsl(0 0% 100%)",accentText:"hsl(209.61deg 100% 65.31%)",borderColor:"hsl(0 0% 15%)",connectedButtonBg:"hsl(0 0% 3.92%)",connectedButtonBgHover:"hsl(0 0% 11%)",danger:"hsl(360 72% 55%)",inputAutofillBg:"hsl(0 0% 11%)",modalBg:"hsl(0 0% 3.92%)",primaryButtonBg:"hsl(0 0% 100%)",primaryButtonText:"hsl(0 0% 0%)",primaryText:"hsl(0 0% 98%)",scrollbarBg:"hsl(0 0% 11%)",secondaryButtonBg:"hsl(0 0% 9%)",modalOverlayBg:"rgba(0, 0, 0, 0.7)",secondaryButtonHoverBg:"hsl(0 0% 9%/80%)",secondaryButtonText:"hsl(0 0% 98%)",secondaryIconColor:"hsl(0 0% 63%)",secondaryIconHoverBg:"hsl(0 0% 11%)",secondaryIconHoverColor:"hsl(0 0% 98%)",secondaryText:"hsl(0 0% 63%)",selectedTextBg:"hsl(0 0% 100%)",selectedTextColor:"hsl(0 0% 0%)",separatorLine:"hsl(0 0% 15%)",skeletonBg:"hsl(0 0% 12%)",success:"hsl(142 75% 50%)",tertiaryBg:"hsl(0 0% 11%/50%)",tooltipBg:"hsl(0 0% 11%)",tooltipText:"hsl(0 0% 98%)"},fontFamily:"inherit"},tI={type:"light",colors:{accentButtonBg:"hsl(221 83% 54%)",accentButtonText:"hsl(0 0% 100%)",accentText:"hsl(211.23deg 100% 44.47%)",borderColor:"hsl(0 0% 85%)",connectedButtonBg:"hsl(0 0% 100%)",connectedButtonBgHover:"hsl(0 0% 93%)",danger:"hsl(360 72% 60%)",inputAutofillBg:"hsl(0 0% 93%)",modalBg:"hsl(0 0% 100%)",primaryButtonBg:"hsl(0 0% 4%)",primaryButtonText:"hsl(0 0% 100%)",primaryText:"hsl(0 0% 4%)",scrollbarBg:"hsl(0 0% 93%)",secondaryButtonBg:"hsl(0 0% 93%)",modalOverlayBg:"rgba(0, 0, 0, 0.7)",secondaryButtonHoverBg:"hsl(0 0% 93%/80%)",secondaryButtonText:"hsl(0 0% 4%)",secondaryIconColor:"hsl(0 0% 40%)",secondaryIconHoverBg:"hsl(0 0% 93%)",secondaryIconHoverColor:"hsl(0 0% 4%)",secondaryText:"hsl(0 0% 40%)",selectedTextBg:"hsl(0 0% 4%)",selectedTextColor:"hsl(0 0% 100%)",separatorLine:"hsl(0 0% 85%)",skeletonBg:"hsl(0 0% 85%)",success:"hsl(142.09 70.56% 35.29%)",tertiaryBg:"hsl(0 0% 93%/70%)",tooltipBg:"hsl(0 0% 100%)",tooltipText:"hsl(0 0% 4%)"},fontFamily:"inherit"},ie={"3xl":"48px",lg:"20px",md:"16px",sm:"14px",xl:"24px",xs:"12px",xxl:"32px"},P={"3xl":"64px","3xs":"4px","4xs":"2px",lg:"24px",md:"16px","md+":"20px",sm:"12px",xl:"32px",xs:"8px",xxl:"48px",xxs:"6px"},G={lg:"12px",md:"8px",sm:"6px",xl:"20px",full:"9999px"},A={"3xl":"96","4xl":"128",lg:"32",md:"24","sm+":"20",sm:"16",xl:"48",xs:"12",xxl:"64"},Fh={mobile:"@media (max-width: 640px)"},b2={lg:"0 10px 15px -3px rgb(0 0 0 / 0.07), 0 4px 6px -4px rgb(0 0 0 / 0.1)",sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)"};function Qh(e,n,t){const i=!!t,r=Ei(),o=pe({enabled:i&&!!(n!=null&&n.address),gcTime:0,placeholderData:!1,queryFn:()=>!t||!(n!=null&&n.address)?!1:t.isLoggedIn(n.address),queryKey:["siwe_auth","isLoggedIn",n==null?void 0:n.address],refetchOnWindowFocus:!1}),s=Ys({mutationFn:async()=>{if(!t)throw new Error("No auth options provided");if(!e)throw new Error("No active wallet");const l=e.getChain();if(!l)throw new Error("No active chain");if(!n)throw new Error("No active account");const[h,{signLoginPayload:d}]=await Promise.all([t.getLoginPayload({address:n.address,chainId:l.id}),u(()=>import("./sign-login-payload-BKykauFw.js"),[])]);h.chain_id&&Number(h.chain_id)!==l.id&&await e.switchChain(Ve(Number(h.chain_id)));const f=await d({account:n,payload:h});return await t.doLogin(f)},mutationKey:["siwe_auth","login",n==null?void 0:n.address],onSuccess:()=>r.invalidateQueries({queryKey:["siwe_auth","isLoggedIn"]})}),c=Ys({mutationFn:async()=>{if(!t)throw new Error("No auth options provided");return await t.doLogout()},mutationKey:["siwe_auth","logout",n==null?void 0:n.address],onSuccess:()=>r.invalidateQueries({queryKey:["siwe_auth","isLoggedIn"]})});return{doLogin:s.mutateAsync,doLogout:c.mutateAsync,isLoading:o.isFetching,isLoggedIn:o.data,isLoggingIn:s.isPending,isLoggingOut:c.isPending,isPending:o.isPending,requiresAuth:i}}const Yl=new Map;function C2(e){if(Yl.has(e))return Yl.get(e);const n=U3();return Yl.set(e,n),n}function nI(e){var n;return pe({enabled:!!(e!=null&&e.transactionHash)&&(((n=e==null?void 0:e.queryOptions)==null?void 0:n.enabled)??!0),queryFn:async()=>{if(!(e!=null&&e.transactionHash))throw new Error("No transaction hash or user op hash provided");return Gc(e)},queryKey:["waitForReceipt",(e==null?void 0:e.chain.id)||-1,e==null?void 0:e.transactionHash],retry:!1})}let iI=class{constructor(n){Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"next",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.value=n}};class rI{constructor(){Object.defineProperty(this,"head",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tail",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.clear(),this.size=0}enqueue(n){const t=new iI(n);this.head?(this.tail&&(this.tail.next=t),this.tail=t):(this.head=t,this.tail=t),this.size++}dequeue(){var t;const n=this.head;if(n)return this.head=(t=this.head)==null?void 0:t.next,this.size--,n.value}clear(){this.head=void 0,this.tail=void 0,this.size=0}*[Symbol.iterator](){let n=this.head;for(;n;)yield n.value,n=n.next}}const oI={bind(e,n,t){return e.bind(t)}};function sI(e){if(!((Number.isInteger(e)||e===Number.POSITIVE_INFINITY)&&e>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");const n=new rI;let t=0;const i=()=>{if(t--,n.size>0){const c=n.dequeue();c&&c()}},r=async(c,l,h)=>{t++;const d=(async()=>c(...h))();l(d);try{await d}catch{}i()},o=(c,l,h)=>{n.enqueue(oI.bind(r.bind(void 0,c,l,h))),(async()=>{if(await Promise.resolve(),t<e&&n.size>0){const d=n.dequeue();d&&d()}})()},s=(c,...l)=>new Promise(h=>{o(c,h,l)});return Object.defineProperties(s,{activeCount:{get:()=>t},clearQueue:{value(){n.clear()}},pendingCount:{get:()=>n.size}}),s}function j2(e){var i;const n=!!e&&!e.name,t=pe({queryFn:async()=>{if(!e)throw new Error("chain is required");return Hc(await Zt(e))},...as(e),enabled:n,retry:!1});return{isLoading:n&&t.isLoading,name:(e==null?void 0:e.name)??((i=t.data)==null?void 0:i.name)}}function Hh(e){var i,r,o,s;const n=!!e&&!((i=e.icon)!=null&&i.url),t=pe({queryFn:async()=>{if(!e)throw new Error("chain is required");return Hc(await Zt(e))},...as(e),enabled:n,retry:!1});return{isLoading:n&&t.isLoading,url:((r=e==null?void 0:e.icon)==null?void 0:r.url)??((s=(o=t.data)==null?void 0:o.icon)==null?void 0:s.url)}}function aI(e){var i,r;const n=!!e&&"testnet"in e&&!((i=e.faucets)!=null&&i.length)&&e.id!==1337,t=pe({queryFn:async()=>{if(!e)throw new Error("chain is required");return Zt(e)},...as(e),enabled:n});return{faucets:(e==null?void 0:e.faucets)??((r=t.data)==null?void 0:r.faucets)??[],isLoading:n&&t.isLoading}}function L2(e){var r,o;const n=!!e&&!((r=e.blockExplorers)!=null&&r.length),t=pe({queryFn:async()=>{if(!e)throw new Error("chain is required");return Zt(e)},...as(e),enabled:n}),i=t.data?Hc(t.data):void 0;return{explorers:e!=null&&e.blockExplorers&&((o=e==null?void 0:e.blockExplorers)==null?void 0:o.length)>0?e==null?void 0:e.blockExplorers:(i==null?void 0:i.blockExplorers)??[],isLoading:n&&t.isLoading}}function as(e){return{enabled:!!e,queryKey:["chain",e==null?void 0:e.id],staleTime:1e3*60*60}}function nl(e){return pe({...as(e),queryFn:async()=>{if(!e)throw new Error("chainId is required");return Zt(e)}})}function E2(e,n){const t=y.useMemo(()=>{const i=sI(n);return e.map(r=>({...as(r),queryFn:()=>i(()=>Zt(r))}))},[e,n]);return zh({queries:t})}function T2(e,n){e.invalidateQueries({queryKey:n?["walletBalance",n]:["walletBalance"]}),e.invalidateQueries({queryKey:n?["internal_account_balance",n]:["internal_account_balance"]}),e.invalidateQueries({queryKey:n?["nfts",n]:["nfts"]}),e.invalidateQueries({queryKey:n?["tokens",n]:["tokens"]})}async function Zh(e){const{address:n,client:t,chain:i}=e,r=e.tokenAddress||(i.id===42429?"0x20c0000000000000000000000000000000000000":void 0);if(r&&xe(r)!==xe(Gt)){const{getBalance:d}=await u(async()=>{const{getBalance:f}=await import("./getBalance-BjubRO2E.js");return{getBalance:f}},__vite__mapDeps([49,13,1,2,5,29,19,50,28,30]));return d({address:n,contract:cn({address:r,chain:i,client:t})})}const o=Qg({chain:i,client:t}),[s,c,l,h]=await Promise.all([Ng(i),Sg(i),Ag(i),r2(o,{address:n})]);return{chainId:i.id,decimals:c,displayValue:ei(h,c),name:l,symbol:s,tokenAddress:r??Gt,value:h}}function il(e,n){const{chain:t,address:i,tokenAddress:r,client:o}=e;return pe({...n,enabled:((n==null?void 0:n.enabled)===void 0||n.enabled)&&!!t&&!!o&&!!i,queryFn:async()=>{if(!t)throw new Error("chain is required");if(!o)throw new Error("client is required");if(!i)throw new Error("address is required");return Zh({address:i,chain:t,client:o,tokenAddress:r})},queryKey:["walletBalance",(t==null?void 0:t.id)||-1,i||"0x0",{tokenAddress:r}]})}const v2=y.createContext(void 0);function Gh(){const e=un("useConnectionManager");if(!e)throw new Error("useConnectionManager must be used within a <ThirdwebProvider> Provider");return e}function un(e){const n=y.useContext(v2);if(!n)throw new Error(`${e} must be used within <ThirdwebProvider>`);return n}function yt(){const n=un("useActiveAccount").activeAccountStore;return y.useSyncExternalStore(n.subscribe,n.getValue,n.getValue)}function ut(){const n=un("useActiveWallet").activeWalletStore;return y.useSyncExternalStore(n.subscribe,n.getValue,n.getValue)}function lt(){const n=un("useActiveWalletChain").activeWalletChainStore;return y.useSyncExternalStore(n.subscribe,n.getValue,n.getValue)}function cI(){const n=un("useActiveWalletConnectionStatus").activeWalletConnectionStatusStore;return y.useSyncExternalStore(n.subscribe,n.getValue,n.getValue)}function lI(){return un("useAddConnectedWallet").addConnectedWallet}function co(){const n=un("useConnectedWallets").connectedWallets;return y.useSyncExternalStore(n.subscribe,n.getValue,n.getValue)}function rl(){var i;const e=ut(),n=co(),t=(i=e==null?void 0:e.getAdminAccount)==null?void 0:i.call(e);return t?n.find(r=>{var o,s,c;return((s=(o=r.getAccount())==null?void 0:o.address)==null?void 0:s.toLowerCase())===((c=t==null?void 0:t.address)==null?void 0:c.toLowerCase())}):e}function uI(){return un("useSetActiveWalletConnectionStatus").activeWalletConnectionStatusStore.setValue}function N2(e){const n=un("useConnect"),{connect:t}=n,i=uI(),[r,o]=y.useState(!1),[s,c]=y.useState(null),l=y.useCallback(async d=>{if(c(null),i("connecting"),typeof d!="function"){const f=await t(d,e);return i("connected"),f}o(!0);try{const f=await d(),m=await t(f,e);return i("connected"),m}catch(f){console.error(f),c(f),i("disconnected")}finally{o(!1)}return null},[t,e,i]),h=y.useCallback(()=>{o(!1),i("disconnected")},[i]);return{connect:l,error:s,isConnecting:r,cancelConnection:h}}function ol(){return{disconnect:un("useDisconnect").disconnectWallet}}const dI=100,Da=new Map;function hI(e){const{id:n,chain:t,wallet:i,client:r}=e,s=`${t.id}:calls_${n}`,c=e.maxBlocksWaitTime??dI;if(Da.has(s))return Da.get(s);const l=new Promise((h,d)=>{let f=-1;const m=O3({chain:t,client:r,onNewBlockNumber:async()=>{if(f++,f>=c){m(),d(new Error(`Bundle not confirmed after ${c} blocks`));return}try{const g=await PM({client:r,id:n,wallet:i});if(g.status==="success"||g.status==="failure"){m(),h(g);return}}catch(g){console.error("waitForCallsReceipt error",g)}}})}).finally(()=>{Da.delete(s)});return Da.set(s,l),l}function S2(){return un("useSetActiveWallet").setActiveWallet}function A2(){return un("useSwitchActiveWalletChain").switchActiveWalletChain}async function qh(e){const{address:n,client:t}=e,r=await En(t)(`${Ln("social")}/v1/profiles/${n}`);if(!r.ok){const o=await r.text().catch(()=>"Unknown error");throw new Error(`Failed to fetch profile: ${r.status} ${r.statusText} - ${o}`)}return(await r.json()).data}function fI(e){const{client:n,address:t}=e;return pe({enabled:!!t,queryFn:async()=>{if(!t)throw new Error("Address is required, should not have reached this point.");return await qh({address:t,client:n})},queryKey:["social-profiles",t],retry:!1})}const Ai="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTAwIiBoZWlnaHQ9IjI1MDAiIHZpZXdCb3g9IjAgMCAzMiAzMiI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIGN4PSIxNiIgY3k9IjE2IiByPSIxNiIgZmlsbD0iIzYyN0VFQSIvPjxnIGZpbGw9IiNGRkYiIGZpbGwtcnVsZT0ibm9uemVybyI+PHBhdGggZmlsbC1vcGFjaXR5PSIuNjAyIiBkPSJNMTYuNDk4IDR2OC44N2w3LjQ5NyAzLjM1eiIvPjxwYXRoIGQ9Ik0xNi40OTggNEw5IDE2LjIybDcuNDk4LTMuMzV6Ii8+PHBhdGggZmlsbC1vcGFjaXR5PSIuNjAyIiBkPSJNMTYuNDk4IDIxLjk2OHY2LjAyN0wyNCAxNy42MTZ6Ii8+PHBhdGggZD0iTTE2LjQ5OCAyNy45OTV2LTYuMDI4TDkgMTcuNjE2eiIvPjxwYXRoIGZpbGwtb3BhY2l0eT0iLjIiIGQ9Ik0xNi40OTggMjAuNTczbDcuNDk3LTQuMzUzLTcuNDk3LTMuMzQ4eiIvPjxwYXRoIGZpbGwtb3BhY2l0eT0iLjYwMiIgZD0iTTkgMTYuMjJsNy40OTggNC4zNTN2LTcuNzAxeiIvPjwvZz48L2c+PC9zdmc+",Oa="data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMzkuNDMgMjk1LjI3Ij48dGl0bGU+dGV0aGVyLXVzZHQtbG9nbzwvdGl0bGU+PHBhdGggZD0iTTYyLjE1LDEuNDVsLTYxLjg5LDEzMGEyLjUyLDIuNTIsMCwwLDAsLjU0LDIuOTRMMTY3Ljk1LDI5NC41NmEyLjU1LDIuNTUsMCwwLDAsMy41MywwTDMzOC42MywxMzQuNGEyLjUyLDIuNTIsMCwwLDAsLjU0LTIuOTRsLTYxLjg5LTEzMEEyLjUsMi41LDAsMCwwLDI3NSwwSDY0LjQ1YTIuNSwyLjUsMCwwLDAtMi4zLDEuNDVoMFoiIHN0eWxlPSJmaWxsOiM1MGFmOTU7ZmlsbC1ydWxlOmV2ZW5vZGQiLz48cGF0aCBkPSJNMTkxLjE5LDE0NC44djBjLTEuMi4wOS03LjQsMC40Ni0yMS4yMywwLjQ2LTExLDAtMTguODEtLjMzLTIxLjU1LTAuNDZ2MGMtNDIuNTEtMS44Ny03NC4yNC05LjI3LTc0LjI0LTE4LjEzczMxLjczLTE2LjI1LDc0LjI0LTE4LjE1djI4LjkxYzIuNzgsMC4yLDEwLjc0LjY3LDIxLjc0LDAuNjcsMTMuMiwwLDE5LjgxLS41NSwyMS0wLjY2di0yOC45YzQyLjQyLDEuODksNzQuMDgsOS4yOSw3NC4wOCwxOC4xM3MtMzEuNjUsMTYuMjQtNzQuMDgsMTguMTJoMFptMC0zOS4yNVY3OS42OGg1OS4yVjQwLjIzSDg5LjIxVjc5LjY4SDE0OC40djI1Ljg2Yy00OC4xMSwyLjIxLTg0LjI5LDExLjc0LTg0LjI5LDIzLjE2czM2LjE4LDIwLjk0LDg0LjI5LDIzLjE2djgyLjloNDIuNzhWMTUxLjgzYzQ4LTIuMjEsODQuMTItMTEuNzMsODQuMTItMjMuMTRzLTM2LjA5LTIwLjkzLTg0LjEyLTIzLjE1aDBabTAsMGgwWiIgc3R5bGU9ImZpbGw6I2ZmZjtmaWxsLXJ1bGU6ZXZlbm9kZCIvPjwvc3ZnPg==",fn="data:image/svg+xml;base64,PHN2ZyBkYXRhLW5hbWU9Ijg2OTc3Njg0LTEyZGItNDg1MC04ZjMwLTIzM2E3YzI2N2QxMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMjAwMCAyMDAwIj4KICA8cGF0aCBkPSJNMTAwMCAyMDAwYzU1NC4xNyAwIDEwMDAtNDQ1LjgzIDEwMDAtMTAwMFMxNTU0LjE3IDAgMTAwMCAwIDAgNDQ1LjgzIDAgMTAwMHM0NDUuODMgMTAwMCAxMDAwIDEwMDB6IiBmaWxsPSIjMjc3NWNhIi8+CiAgPHBhdGggZD0iTTEyNzUgMTE1OC4zM2MwLTE0NS44My04Ny41LTE5NS44My0yNjIuNS0yMTYuNjYtMTI1LTE2LjY3LTE1MC01MC0xNTAtMTA4LjM0czQxLjY3LTk1LjgzIDEyNS05NS44M2M3NSAwIDExNi42NyAyNSAxMzcuNSA4Ny41IDQuMTcgMTIuNSAxNi42NyAyMC44MyAyOS4xNyAyMC44M2g2Ni42NmMxNi42NyAwIDI5LjE3LTEyLjUgMjkuMTctMjkuMTZ2LTQuMTdjLTE2LjY3LTkxLjY3LTkxLjY3LTE2Mi41LTE4Ny41LTE3MC44M3YtMTAwYzAtMTYuNjctMTIuNS0yOS4xNy0zMy4zMy0zMy4zNGgtNjIuNWMtMTYuNjcgMC0yOS4xNyAxMi41LTMzLjM0IDMzLjM0djk1LjgzYy0xMjUgMTYuNjctMjA0LjE2IDEwMC0yMDQuMTYgMjA0LjE3IDAgMTM3LjUgODMuMzMgMTkxLjY2IDI1OC4zMyAyMTIuNSAxMTYuNjcgMjAuODMgMTU0LjE3IDQ1LjgzIDE1NC4xNyAxMTIuNXMtNTguMzQgMTEyLjUtMTM3LjUgMTEyLjVjLTEwOC4zNCAwLTE0NS44NC00NS44NC0xNTguMzQtMTA4LjM0LTQuMTYtMTYuNjYtMTYuNjYtMjUtMjkuMTYtMjVoLTcwLjg0Yy0xNi42NiAwLTI5LjE2IDEyLjUtMjkuMTYgMjkuMTd2NC4xN2MxNi42NiAxMDQuMTYgODMuMzMgMTc5LjE2IDIyMC44MyAyMDB2MTAwYzAgMTYuNjYgMTIuNSAyOS4xNiAzMy4zMyAzMy4zM2g2Mi41YzE2LjY3IDAgMjkuMTctMTIuNSAzMy4zNC0zMy4zM3YtMTAwYzEyNS0yMC44NCAyMDguMzMtMTA4LjM0IDIwOC4zMy0yMjAuODR6IiBmaWxsPSIjZmZmIi8+CiAgPHBhdGggZD0iTTc4Ny41IDE1OTUuODNjLTMyNS0xMTYuNjYtNDkxLjY3LTQ3OS4xNi0zNzAuODMtODAwIDYyLjUtMTc1IDIwMC0zMDguMzMgMzcwLjgzLTM3MC44MyAxNi42Ny04LjMzIDI1LTIwLjgzIDI1LTQxLjY3VjMyNWMwLTE2LjY3LTguMzMtMjkuMTctMjUtMzMuMzMtNC4xNyAwLTEyLjUgMC0xNi42NyA0LjE2LTM5NS44MyAxMjUtNjEyLjUgNTQ1Ljg0LTQ4Ny41IDk0MS42NyA3NSAyMzMuMzMgMjU0LjE3IDQxMi41IDQ4Ny41IDQ4Ny41IDE2LjY3IDguMzMgMzMuMzQgMCAzNy41LTE2LjY3IDQuMTctNC4xNiA0LjE3LTguMzMgNC4xNy0xNi42NnYtNTguMzRjMC0xMi41LTEyLjUtMjkuMTYtMjUtMzcuNXpNMTIyOS4xNyAyOTUuODNjLTE2LjY3LTguMzMtMzMuMzQgMC0zNy41IDE2LjY3LTQuMTcgNC4xNy00LjE3IDguMzMtNC4xNyAxNi42N3Y1OC4zM2MwIDE2LjY3IDEyLjUgMzMuMzMgMjUgNDEuNjcgMzI1IDExNi42NiA0OTEuNjcgNDc5LjE2IDM3MC44MyA4MDAtNjIuNSAxNzUtMjAwIDMwOC4zMy0zNzAuODMgMzcwLjgzLTE2LjY3IDguMzMtMjUgMjAuODMtMjUgNDEuNjdWMTcwMGMwIDE2LjY3IDguMzMgMjkuMTcgMjUgMzMuMzMgNC4xNyAwIDEyLjUgMCAxNi42Ny00LjE2IDM5NS44My0xMjUgNjEyLjUtNTQ1Ljg0IDQ4Ny41LTk0MS42Ny03NS0yMzcuNS0yNTguMzQtNDE2LjY3LTQ4Ny41LTQ5MS42N3oiIGZpbGw9IiNmZmYiLz4KPC9zdmc+Cg==",ka="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDkuMjYgMTA5LjI2Ij48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6IzVhNTU2NDt9LmNscy0ye2ZpbGw6I2YwOTI0Mjt9LmNscy0ze2ZpbGw6IzI4MjEzODt9PC9zdHlsZT48L2RlZnM+PHRpdGxlPndyYXBwZWQtYml0Y29pbi13YnRjPC90aXRsZT48ZyBpZD0iTGF5ZXJfMiIgZGF0YS1uYW1lPSJMYXllciAyIj48ZyBpZD0iTGF5ZXJfMS0yIiBkYXRhLW5hbWU9IkxheWVyIDEiPjxnIGlkPSJQYWdlLTEiPjxnIGlkPSJ3YnRjX2NvbG91ciIgZGF0YS1uYW1lPSJ3YnRjIGNvbG91ciI+PHBhdGggaWQ9IlNoYXBlIiBjbGFzcz0iY2xzLTEiIGQ9Ik04OS4wOSwyMi45M2wtMywzYTQyLjQ3LDQyLjQ3LDAsMCwxLDAsNTcuMzJsMywzYTQ2Ljc2LDQ2Ljc2LDAsMCwwLDAtNjMuMzlaIi8+PHBhdGggaWQ9IlNoYXBlLTIiIGRhdGEtbmFtZT0iU2hhcGUiIGNsYXNzPSJjbHMtMSIgZD0iTTI2LDIzLjE5YTQyLjQ3LDQyLjQ3LDAsMCwxLDU3LjMyLDBsMy0zYTQ2Ljc2LDQ2Ljc2LDAsMCwwLTYzLjM5LDBaIi8+PHBhdGggaWQ9IlNoYXBlLTMiIGRhdGEtbmFtZT0iU2hhcGUiIGNsYXNzPSJjbHMtMSIgZD0iTTIzLjE5LDgzLjI4YTQyLjQ3LDQyLjQ3LDAsMCwxLDAtNTcuMjlsLTMtM2E0Ni43Niw0Ni43NiwwLDAsMCwwLDYzLjM5WiIvPjxwYXRoIGlkPSJTaGFwZS00IiBkYXRhLW5hbWU9IlNoYXBlIiBjbGFzcz0iY2xzLTEiIGQ9Ik04My4yOCw4Ni4wNWE0Mi40Nyw0Mi40NywwLDAsMS01Ny4zMiwwbC0zLDNhNDYuNzYsNDYuNzYsMCwwLDAsNjMuMzksMFoiLz48cGF0aCBpZD0iU2hhcGUtNSIgZGF0YS1uYW1lPSJTaGFwZSIgY2xhc3M9ImNscy0yIiBkPSJNNzMuNTcsNDQuNjJjLS42LTYuMjYtNi04LjM2LTEyLjgzLTlWMjdINTUuNDZ2OC40NmMtMS4zOSwwLTIuODEsMC00LjIyLDBWMjdINDZ2OC42OEgzNS4yOXY1LjY1czMuOS0uMDcsMy44NCwwYTIuNzMsMi43MywwLDAsMSwzLDIuMzJWNjcuNDFhMS44NSwxLjg1LDAsMCwxLS42NCwxLjI5LDEuODMsMS44MywwLDAsMS0xLjM2LjQ2Yy4wNy4wNi0zLjg0LDAtMy44NCwwbC0xLDYuMzFINDUuOXY4LjgyaDUuMjhWNzUuNkg1NS40djguNjVoNS4yOVY3NS41M2M4LjkyLS41NCwxNS4xNC0yLjc0LDE1LjkyLTExLjA5LjYzLTYuNzItMi41My05LjcyLTcuNTgtMTAuOTNDNzIuMSw1Miw3NCw0OS4yLDczLjU3LDQ0LjYyWk02Ni4xNyw2My40YzAsNi41Ni0xMS4yNCw1LjgxLTE0LjgyLDUuODFWNTcuNTdDNTQuOTMsNTcuNTgsNjYuMTcsNTYuNTUsNjYuMTcsNjMuNFpNNjMuNzIsNDdjMCw2LTkuMzgsNS4yNy0xMi4zNiw1LjI3VjQxLjY5QzU0LjM0LDQxLjY5LDYzLjcyLDQwLjc1LDYzLjcyLDQ3WiIvPjxwYXRoIGlkPSJTaGFwZS02IiBkYXRhLW5hbWU9IlNoYXBlIiBjbGFzcz0iY2xzLTMiIGQ9Ik01NC42MiwxMDkuMjZhNTQuNjMsNTQuNjMsMCwxLDEsNTQuNjQtNTQuNjRBNTQuNjMsNTQuNjMsMCwwLDEsNTQuNjIsMTA5LjI2Wm0wLTEwNUE1MC4zNCw1MC4zNCwwLDEsMCwxMDUsNTQuNjIsNTAuMzQsNTAuMzQsMCwwLDAsNTQuNjIsNC4yNloiLz48L2c+PC9nPjwvZz48L2c+PC9zdmc+",Fl="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAyNCIgaGVpZ2h0PSIxMDI0IiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8Y2lyY2xlIGN4PSI1MTIiIGN5PSI1MTIiIHI9IjUxMiIgZmlsbD0iIzgyNDdFNSIvPgo8cGF0aCBkPSJNNjgxLjQ2OSA0MDIuNDU2QzY2OS4xODkgMzk1LjMxMiA2NTMuMjI0IDM5NS4zMTIgNjM5LjcxNiA0MDIuNDU2TDU0My45MjggNDU3LjIyOEw0NzguODQyIDQ5Mi45NDlMMzgzLjA1NSA1NDcuNzIxQzM3MC43NzQgNTU0Ljg2NSAzNTQuODEgNTU0Ljg2NSAzNDEuMzAxIDU0Ny43MjFMMjY1LjE2MiA1MDQuODU2QzI1Mi44ODIgNDk3LjcxMiAyNDQuMjg2IDQ4NC42MTQgMjQ0LjI4NiA0NzAuMzI1VjM4NS43ODZDMjQ0LjI4NiAzNzEuNDk4IDI1MS42NTQgMzU4LjQgMjY1LjE2MiAzNTEuMjU2TDM0MC4wNzMgMzA5LjU4MUMzNTIuMzUzIDMwMi40MzcgMzY4LjMxOCAzMDIuNDM3IDM4MS44MjcgMzA5LjU4MUw0NTYuNzM3IDM1MS4yNTZDNDY5LjAxOCAzNTguNCA0NzcuNjE0IDM3MS40OTggNDc3LjYxNCAzODUuNzg2VjQ0MC41NThMNTQyLjcgNDAzLjY0NlYzNDguODc0QzU0Mi43IDMzNC41ODYgNTM1LjMzMiAzMjEuNDg4IDUyMS44MjQgMzE0LjM0NEwzODMuMDU1IDIzNS43NThDMzcwLjc3NCAyMjguNjE0IDM1NC44MSAyMjguNjE0IDM0MS4zMDEgMjM1Ljc1OEwyMDAuMDc2IDMxNC4zNDRDMTg2LjU2NyAzMjEuNDg4IDE3OS4xOTkgMzM0LjU4NiAxNzkuMTk5IDM0OC44NzRWNTA3LjIzN0MxNzkuMTk5IDUyMS41MjUgMTg2LjU2NyA1MzQuNjIzIDIwMC4wNzYgNTQxLjc2N0wzNDEuMzAxIDYyMC4zNTNDMzUzLjU4MiA2MjcuNDk4IDM2OS41NDYgNjI3LjQ5OCAzODMuMDU1IDYyMC4zNTNMNDc4Ljg0MiA1NjYuNzcyTDU0My45MjggNTI5Ljg2TDYzOS43MTYgNDc2LjI3OUM2NTEuOTk2IDQ2OS4xMzUgNjY3Ljk2MSA0NjkuMTM1IDY4MS40NjkgNDc2LjI3OUw3NTYuMzggNTE3Ljk1M0M3NjguNjYgNTI1LjA5OCA3NzcuMjU3IDUzOC4xOTUgNzc3LjI1NyA1NTIuNDg0VjYzNy4wMjNDNzc3LjI1NyA2NTEuMzEyIDc2OS44ODggNjY0LjQwOSA3NTYuMzggNjcxLjU1M0w2ODEuNDY5IDcxNC40MTlDNjY5LjE4OSA3MjEuNTYzIDY1My4yMjQgNzIxLjU2MyA2MzkuNzE2IDcxNC40MTlMNTY0LjgwNSA2NzIuNzQ0QzU1Mi41MjUgNjY1LjYgNTQzLjkyOCA2NTIuNTAyIDU0My45MjggNjM4LjIxNFY1ODMuNDQyTDQ3OC44NDIgNjIwLjM1M1Y2NzUuMTI1QzQ3OC44NDIgNjg5LjQxNCA0ODYuMjEgNzAyLjUxMiA0OTkuNzE5IDcwOS42NTZMNjQwLjk0NCA3ODguMjQyQzY1My4yMjQgNzk1LjM4NiA2NjkuMTg5IDc5NS4zODYgNjgyLjY5NyA3ODguMjQyTDgyMy45MjIgNzA5LjY1NkM4MzYuMjAzIDcwMi41MTIgODQ0Ljc5OSA2ODkuNDE0IDg0NC43OTkgNjc1LjEyNVY1MTYuNzYzQzg0NC43OTkgNTAyLjQ3NCA4MzcuNDMxIDQ4OS4zNzcgODIzLjkyMiA0ODIuMjMyTDY4MS40NjkgNDAyLjQ1NloiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPgo=",B1="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiI+PGcgZmlsbD0ibm9uZSI+PGNpcmNsZSBjeD0iMTYiIGN5PSIxNiIgcj0iMTYiIGZpbGw9IiNGM0JBMkYiLz48cGF0aCBmaWxsPSIjRkZGIiBkPSJNMTIuMTE2IDE0LjQwNEwxNiAxMC41MmwzLjg4NiAzLjg4NiAyLjI2LTIuMjZMMTYgNmwtNi4xNDQgNi4xNDQgMi4yNiAyLjI2ek02IDE2bDIuMjYtMi4yNkwxMC41MiAxNmwtMi4yNiAyLjI2TDYgMTZ6bTYuMTE2IDEuNTk2TDE2IDIxLjQ4bDMuODg2LTMuODg2IDIuMjYgMi4yNTlMMTYgMjZsLTYuMTQ0LTYuMTQ0LS4wMDMtLjAwMyAyLjI2My0yLjI1N3pNMjEuNDggMTZsMi4yNi0yLjI2TDI2IDE2bC0yLjI2IDIuMjZMMjEuNDggMTZ6bS0zLjE4OC0uMDAyaC4wMDJ2LjAwMkwxNiAxOC4yOTRsLTIuMjkxLTIuMjktLjAwNC0uMDA0LjAwNC0uMDAzLjQwMS0uNDAyLjE5NS0uMTk1TDE2IDEzLjcwNmwyLjI5MyAyLjI5M3oiLz48L2c+PC9zdmc+",W1="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMzYuNDEgMzM3LjQyIj48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6I2YwYjkwYjtzdHJva2U6I2YwYjkwYjt9PC9zdHlsZT48L2RlZnM+PHRpdGxlPkFzc2V0IDE8L3RpdGxlPjxnIGlkPSJMYXllcl8yIiBkYXRhLW5hbWU9IkxheWVyIDIiPjxnIGlkPSJMYXllcl8xLTIiIGRhdGEtbmFtZT0iTGF5ZXIgMSI+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJNMTY4LjIuNzFsNDEuNSw0Mi41TDEwNS4yLDE0Ny43MWwtNDEuNS00MS41WiIvPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTIzMS4yLDYzLjcxbDQxLjUsNDIuNUwxMDUuMiwyNzMuNzFsLTQxLjUtNDEuNVoiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Ik00Mi4yLDEyNi43MWw0MS41LDQyLjUtNDEuNSw0MS41TC43LDE2OS4yMVoiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Ik0yOTQuMiwxMjYuNzFsNDEuNSw0Mi41TDE2OC4yLDMzNi43MWwtNDEuNS00MS41WiIvPjwvZz48L2c+PC9zdmc+",$1="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMzIgMzIiPjxkZWZzPjxzdHlsZT4uY2xzLTF7ZmlsbDojZmZmO2ZpbGwtcnVsZTpldmVub2RkO30uY2xzLTJ7ZmlsbDojMTNiNWVjO30uY2xzLTN7bWFzazp1cmwoI21hc2spO308L3N0eWxlPjxtYXNrIGlkPSJtYXNrIiB4PSIxMCIgeT0iNiIgd2lkdGg9IjkzLjEiIGhlaWdodD0iMjAiIG1hc2tVbml0cz0idXNlclNwYWNlT25Vc2UiPjxnIGlkPSJhIj48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Ik0xMCw2aDkzLjFWMjZIMTBaIi8+PC9nPjwvbWFzaz48L2RlZnM+PHRpdGxlPmZhPC90aXRsZT48ZyBpZD0iTGF5ZXJfMiIgZGF0YS1uYW1lPSJMYXllciAyIj48ZyBpZD0iTGF5ZXJfMS0yIiBkYXRhLW5hbWU9IkxheWVyIDEiPjxjaXJjbGUgY2xhc3M9ImNscy0yIiBjeD0iMTYiIGN5PSIxNiIgcj0iMTYiLz48ZyBjbGFzcz0iY2xzLTMiPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTE3LjIsMTIuOWwzLjYtMi4xVjE1Wm0zLjYsOUwxNiwyNC43bC00LjgtMi44VjE3TDE2LDE5LjgsMjAuOCwxN1pNMTEuMiwxMC44bDMuNiwyLjFMMTEuMiwxNVptNS40LDMuMUwyMC4yLDE2bC0zLjYsMi4xWm0tMS4yLDQuMkwxMS44LDE2bDMuNi0yLjFabTQuOC04LjNMMTYsMTIuMiwxMS44LDkuOCwxNiw3LjNaTTEwLDkuNFYyMi41bDYsMy40LDYtMy40VjkuNEwxNiw2WiIvPjwvZz48L2c+PC9nPjwvc3ZnPg==",mI={1:[{address:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",icon:Ai,name:"Wrapped Ether",symbol:"WETH"},{address:"0xdAC17F958D2ee523a2206206994597C13D831ec7",icon:Oa,name:"Tether USD",symbol:"USDT"},{address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",icon:fn,name:"USD Coin",symbol:"USDC"},{address:"0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",icon:ka,name:"Wrapped Bitcoin",symbol:"WBTC"},{address:"0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0",icon:Fl,name:"Polygon",symbol:"WMATIC"}],10:[{address:"0x4200000000000000000000000000000000000006",icon:Ai,name:"Wrapped Ether",symbol:"WETH"},{address:"0x0b2c639c533813f4aa9d7837caf62653d097ff85",icon:fn,name:"USD Coin",symbol:"USDC"}],56:[{address:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",icon:B1,name:"Wrapped Binance Chain Token",symbol:"WBNB"},{address:"0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56",icon:W1,name:"Binance USD",symbol:"BUSD"}],97:[{address:"0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd",icon:B1,name:"Wrapped Binance Chain Testnet Token",symbol:"WBNB"},{address:"0xed24fc36d5ee211ea25a80239fb8c4cfd80f12ee",icon:W1,name:"Binance USD",symbol:"BUSD"}],137:[{address:"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",icon:fn,name:"USD Coin",symbol:"USDC"},{address:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",icon:Fl,name:"Wrapped Matic",symbol:"WMATIC"},{address:"0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619",icon:Ai,name:"Wrapped Ether",symbol:"WETH"},{address:"0xc2132D05D31c914a87C6611C10748AEb04B58e8F",icon:Oa,name:"Tether USD",symbol:"USDT"},{address:"0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6",icon:ka,name:"Wrapped BTC",symbol:"WBTC"}],250:[{address:"0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83",icon:$1,name:"Wrapped Fantom",symbol:"WFTM"},{address:"0x74b23882a30290451A17c44f4F05243b6b58C76d",icon:Ai,name:"Wrapped Ether",symbol:"WETH"},{address:"0x04068DA6C83AFCFA0e13ba15A6696662335D5B75",icon:fn,name:"USD Coin",symbol:"USDC"},{address:"0x321162Cd933E2Be498Cd2267a90534A804051b11",icon:ka,name:"Wrapped Bitcoin",symbol:"WBTC"}],420:[{address:"0x4200000000000000000000000000000000000006",icon:Ai,name:"Wrapped Ether",symbol:"WETH"}],4002:[{address:"0xf1277d1Ed8AD466beddF92ef448A132661956621",icon:$1,name:"Wrapped Fantom",symbol:"WFTM"}],8453:[{address:"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",icon:fn,name:"USD Coin",symbol:"USDC"}],42161:[{address:"0x82af49447d8a07e3bd95bd0d56f35241523fbab1",icon:Ai,name:"Wrapped Ether",symbol:"WETH"},{address:"0xaf88d065e77c8cC2239327C5EDb3A432268e5831",icon:fn,name:"USD Coin",symbol:"USDC"}],43113:[{address:"0xd00ae08403B9bbb9124bB305C09058E32C39A48c",icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUwMyIgaGVpZ2h0PSIxNTA0IiB2aWV3Qm94PSIwIDAgMTUwMyAxNTA0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cmVjdCB4PSIyODciIHk9IjI1OCIgd2lkdGg9IjkyOCIgaGVpZ2h0PSI4NDQiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMTUwMi41IDc1MkMxNTAyLjUgMTE2Ni43NyAxMTY2LjI3IDE1MDMgNzUxLjUgMTUwM0MzMzYuNzM0IDE1MDMgMC41IDExNjYuNzcgMC41IDc1MkMwLjUgMzM3LjIzNCAzMzYuNzM0IDEgNzUxLjUgMUMxMTY2LjI3IDEgMTUwMi41IDMzNy4yMzQgMTUwMi41IDc1MlpNNTM4LjY4OCAxMDUwLjg2SDM5Mi45NEMzNjIuMzE0IDEwNTAuODYgMzQ3LjE4NiAxMDUwLjg2IDMzNy45NjIgMTA0NC45NkMzMjcuOTk5IDEwMzguNSAzMjEuOTExIDEwMjcuOCAzMjEuMTczIDEwMTUuOTlDMzIwLjYxOSAxMDA1LjExIDMyOC4xODQgOTkxLjgyMiAzNDMuMzEyIDk2NS4yNTVMNzAzLjE4MiAzMzAuOTM1QzcxOC40OTUgMzAzLjk5OSA3MjYuMjQzIDI5MC41MzEgNzM2LjAyMSAyODUuNTVDNzQ2LjUzNyAyODAuMiA3NTkuMDgzIDI4MC4yIDc2OS41OTkgMjg1LjU1Qzc3OS4zNzcgMjkwLjUzMSA3ODcuMTI2IDMwMy45OTkgODAyLjQzOCAzMzAuOTM1TDg3Ni40MiA0NjAuMDc5TDg3Ni43OTcgNDYwLjczOEM4OTMuMzM2IDQ4OS42MzUgOTAxLjcyMyA1MDQuMjg5IDkwNS4zODUgNTE5LjY2OUM5MDkuNDQzIDUzNi40NTggOTA5LjQ0MyA1NTQuMTY5IDkwNS4zODUgNTcwLjk1OEM5MDEuNjk1IDU4Ni40NTUgODkzLjM5MyA2MDEuMjE1IDg3Ni42MDQgNjMwLjU0OUw2ODcuNTczIDk2NC43MDJMNjg3LjA4NCA5NjUuNTU4QzY3MC40MzYgOTk0LjY5MyA2NjEuOTk5IDEwMDkuNDYgNjUwLjMwNiAxMDIwLjZDNjM3LjU3NiAxMDMyLjc4IDYyMi4yNjMgMTA0MS42MyA2MDUuNDc0IDEwNDYuNjJDNTkwLjE2MSAxMDUwLjg2IDU3My4wMDQgMTA1MC44NiA1MzguNjg4IDEwNTAuODZaTTkwNi43NSAxMDUwLjg2SDExMTUuNTlDMTE0Ni40IDEwNTAuODYgMTE2MS45IDEwNTAuODYgMTE3MS4xMyAxMDQ0Ljc4QzExODEuMDkgMTAzOC4zMiAxMTg3LjM2IDEwMjcuNDMgMTE4Ny45MiAxMDE1LjYzQzExODguNDUgMTAwNS4xIDExODEuMDUgOTkyLjMzIDExNjYuNTUgOTY3LjMwN0MxMTY2LjA1IDk2Ni40NTUgMTE2NS41NSA5NjUuNTg4IDExNjUuMDQgOTY0LjcwNkwxMDYwLjQzIDc4NS43NUwxMDU5LjI0IDc4My43MzVDMTA0NC41NCA3NTguODc3IDEwMzcuMTIgNzQ2LjMyNCAxMDI3LjU5IDc0MS40NzJDMTAxNy4wOCA3MzYuMTIxIDEwMDQuNzEgNzM2LjEyMSA5OTQuMTk5IDc0MS40NzJDOTg0LjYwNSA3NDYuNDUzIDk3Ni44NTcgNzU5LjU1MiA5NjEuNTQ0IDc4NS45MzRMODU3LjMwNiA5NjQuODkxTDg1Ni45NDkgOTY1LjUwN0M4NDEuNjkgOTkxLjg0NyA4MzQuMDY0IDEwMDUuMDEgODM0LjYxNCAxMDE1LjgxQzgzNS4zNTIgMTAyNy42MiA4NDEuNDQgMTAzOC41IDg1MS40MDIgMTA0NC45NkM4NjAuNDQzIDEwNTAuODYgODc1Ljk0IDEwNTAuODYgOTA2Ljc1IDEwNTAuODZaIiBmaWxsPSIjRTg0MTQyIi8+Cjwvc3ZnPgo=",name:"Wrapped AVAX",symbol:"WAVAX"},{address:"0x5425890298aed601595a70AB815c96711a31Bc65",icon:fn,name:"USD Coin",symbol:"USDC"}],43114:[{address:"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUwMyIgaGVpZ2h0PSIxNTA0IiB2aWV3Qm94PSIwIDAgMTUwMyAxNTA0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cmVjdCB4PSIyODciIHk9IjI1OCIgd2lkdGg9IjkyOCIgaGVpZ2h0PSI4NDQiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMTUwMi41IDc1MkMxNTAyLjUgMTE2Ni43NyAxMTY2LjI3IDE1MDMgNzUxLjUgMTUwM0MzMzYuNzM0IDE1MDMgMC41IDExNjYuNzcgMC41IDc1MkMwLjUgMzM3LjIzNCAzMzYuNzM0IDEgNzUxLjUgMUMxMTY2LjI3IDEgMTUwMi41IDMzNy4yMzQgMTUwMi41IDc1MlpNNTM4LjY4OCAxMDUwLjg2SDM5Mi45NEMzNjIuMzE0IDEwNTAuODYgMzQ3LjE4NiAxMDUwLjg2IDMzNy45NjIgMTA0NC45NkMzMjcuOTk5IDEwMzguNSAzMjEuOTExIDEwMjcuOCAzMjEuMTczIDEwMTUuOTlDMzIwLjYxOSAxMDA1LjExIDMyOC4xODQgOTkxLjgyMiAzNDMuMzEyIDk2NS4yNTVMNzAzLjE4MiAzMzAuOTM1QzcxOC40OTUgMzAzLjk5OSA3MjYuMjQzIDI5MC41MzEgNzM2LjAyMSAyODUuNTVDNzQ2LjUzNyAyODAuMiA3NTkuMDgzIDI4MC4yIDc2OS41OTkgMjg1LjU1Qzc3OS4zNzcgMjkwLjUzMSA3ODcuMTI2IDMwMy45OTkgODAyLjQzOCAzMzAuOTM1TDg3Ni40MiA0NjAuMDc5TDg3Ni43OTcgNDYwLjczOEM4OTMuMzM2IDQ4OS42MzUgOTAxLjcyMyA1MDQuMjg5IDkwNS4zODUgNTE5LjY2OUM5MDkuNDQzIDUzNi40NTggOTA5LjQ0MyA1NTQuMTY5IDkwNS4zODUgNTcwLjk1OEM5MDEuNjk1IDU4Ni40NTUgODkzLjM5MyA2MDEuMjE1IDg3Ni42MDQgNjMwLjU0OUw2ODcuNTczIDk2NC43MDJMNjg3LjA4NCA5NjUuNTU4QzY3MC40MzYgOTk0LjY5MyA2NjEuOTk5IDEwMDkuNDYgNjUwLjMwNiAxMDIwLjZDNjM3LjU3NiAxMDMyLjc4IDYyMi4yNjMgMTA0MS42MyA2MDUuNDc0IDEwNDYuNjJDNTkwLjE2MSAxMDUwLjg2IDU3My4wMDQgMTA1MC44NiA1MzguNjg4IDEwNTAuODZaTTkwNi43NSAxMDUwLjg2SDExMTUuNTlDMTE0Ni40IDEwNTAuODYgMTE2MS45IDEwNTAuODYgMTE3MS4xMyAxMDQ0Ljc4QzExODEuMDkgMTAzOC4zMiAxMTg3LjM2IDEwMjcuNDMgMTE4Ny45MiAxMDE1LjYzQzExODguNDUgMTAwNS4xIDExODEuMDUgOTkyLjMzIDExNjYuNTUgOTY3LjMwN0MxMTY2LjA1IDk2Ni40NTUgMTE2NS41NSA5NjUuNTg4IDExNjUuMDQgOTY0LjcwNkwxMDYwLjQzIDc4NS43NUwxMDU5LjI0IDc4My43MzVDMTA0NC41NCA3NTguODc3IDEwMzcuMTIgNzQ2LjMyNCAxMDI3LjU5IDc0MS40NzJDMTAxNy4wOCA3MzYuMTIxIDEwMDQuNzEgNzM2LjEyMSA5OTQuMTk5IDc0MS40NzJDOTg0LjYwNSA3NDYuNDUzIDk3Ni44NTcgNzU5LjU1MiA5NjEuNTQ0IDc4NS45MzRMODU3LjMwNiA5NjQuODkxTDg1Ni45NDkgOTY1LjUwN0M4NDEuNjkgOTkxLjg0NyA4MzQuMDY0IDEwMDUuMDEgODM0LjYxNCAxMDE1LjgxQzgzNS4zNTIgMTAyNy42MiA4NDEuNDQgMTAzOC41IDg1MS40MDIgMTA0NC45NkM4NjAuNDQzIDEwNTAuODYgODc1Ljk0IDEwNTAuODYgOTA2Ljc1IDEwNTAuODZaIiBmaWxsPSIjRTg0MTQyIi8+Cjwvc3ZnPgo=",name:"Wrapped AVAX",symbol:"WAVAX"},{address:"0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB",icon:Ai,name:"Wrapped Ether",symbol:"WETH"},{address:"0x9702230a8ea53601f5cd2dc00fdbc13d4df4a8c7",icon:Oa,name:"Tether USD",symbol:"USDT"},{address:"0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",icon:fn,name:"USD Coin",symbol:"USDC"},{address:"0x50b7545627a5162F82A992c33b87aDc75187B218",icon:ka,name:"Wrapped BTC",symbol:"WBTC"}],80001:[{address:"0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889",icon:Fl,name:"Wrapped Matic",symbol:"WMATIC"},{address:"0xa6fa4fb5f76172d178d61b04b0ecd319c5d1c0aa",icon:Ai,name:"Wrapped Ether",symbol:"WETH"},{address:"0x0FA8781a83E46826621b3BC094Ea2A0212e71B23",icon:fn,name:"USD Coin",symbol:"USDC"},{address:"0x3813e82e6f7098b9583FC0F33a962D02018B6803",icon:Oa,name:"Tether USD",symbol:"USDT"}],84532:[{address:"0x036CbD53842c5426634e7929541eC2318f3dCF7e",icon:fn,name:"USD Coin",symbol:"USDC"}],421614:[{address:"0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d",icon:fn,name:"USD Coin",symbol:"USDC"}],11155111:[{address:"0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",icon:fn,name:"USD Coin",symbol:"USDC"}]},Fs=mI;async function D2(e){let n=e.uri;if(/eip155:/i.test(e.uri)&&(n=await M2(e)),!n)return null;const t=gr({client:e.client,uri:n});return await gI({client:e.client,uri:t})?t:null}async function gI(e){try{const n=await En(e.client)(e.uri,{method:"HEAD"});if(n.status===200){const t=n.headers.get("content-type");return!!(t!=null&&t.startsWith("image/"))}return!1}catch(n){return typeof n=="object"&&typeof n.response<"u"||!Object.hasOwn(globalThis,"Image")?!1:new Promise(t=>{const i=new Image;i.onload=()=>{t(!0)},i.onerror=()=>{t(!1)},i.src=e.uri})}}function yI(e){if(e.length!==66||e.indexOf("[")!==0||e.indexOf("]")!==65)return null;const n=`0x${e.slice(1,65)}`;return vg(n)?n:null}function O2(e){let n=new Uint8Array(32).fill(0);if(!e)return Du(n);const t=e.split(".");for(let i=t.length-1;i>=0;i-=1){const r=t[i],o=yI(r),s=o?q5(o):u1(ec(r),"bytes");n=u1(Pg([n,s]),"bytes")}return Du(n)}function pI(e){return`[${e.slice(2)}]`}function Kh(e){const n=e.replace(/^\.|\.$/gm,"");if(n.length===0)return new Uint8Array(1);const t=new Uint8Array(ec(n).byteLength+2);let i=0;const r=n.split(".");for(let o=0;o<r.length;o++){const s=r[o];let c=ec(s);c.byteLength>255&&(c=ec(pI(bx(s)))),t[i]=c.length,t.set(c,i+1),i+=c.length+1}return t.byteLength!==i+1?t.slice(0,i+1):t}const wI="0x59d1d43c",_I=[{name:"name",type:"bytes32"},{name:"key",type:"string"}],xI=[{type:"string"}];function MI(e){return Gg(_I,[e.name,e.key])}function II(e){return wI+MI(e).slice(2)}function bI(e){return L3(xI,e)[0]}const CI="0x9061b923",jI=[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],LI=[{type:"bytes"},{type:"address"}];async function k2(e){return Zg({contract:e.contract,method:[CI,jI,LI],params:[e.name,e.data]})}const Jh="0xce01f8eee7E479C928F8919abD53E553a36CeF67";async function EI(e){const{client:n,name:t,key:i,resolverAddress:r,resolverChain:o}=e;return ns(async()=>{const s=cn({address:r||Jh,chain:o||ha,client:n}),c=II({key:i,name:O2(t)}),l=await k2({contract:s,data:c,name:fh(Kh(t))});if(l[0]==="0x")return null;const h=bI(l[0]);return h===""?null:h},{cacheKey:`ens:text:${t}:${i}`,cacheTime:60*1e3})}async function TI(e){const{client:n,name:t,resolverAddress:i,resolverChain:r}=e;return ns(async()=>{const o=await EI({client:n,key:"avatar",name:t,resolverAddress:i,resolverChain:r});if(!o)return null;try{return D2({client:n,uri:o})}catch(s){return console.error("Error parsing avatar record",s),null}},{cacheKey:`ens:avatar:${t}`,cacheTime:60*1e3})}const vI="0xec11c823",NI=[{name:"reverseName",type:"bytes"}],SI=[{type:"string"},{type:"address"},{type:"address"},{type:"address"}];async function AI(e){return Zg({contract:e.contract,method:[vI,NI,SI],params:[e.reverseName]})}async function Xh(e){const{client:n,address:t,resolverAddress:i,resolverChain:r}=e;return ns(async()=>{const o=cn({address:i||Jh,chain:r||ha,client:n}),s=fh(Kh(`${t.toLowerCase().substring(2)}.addr.reverse`)),[c,l]=await AI({contract:o,reverseName:s}).catch(h=>{if("data"in h&&h.data==="0x7199966d")return[null,t];throw h});return t.toLowerCase()!==l.toLowerCase()?null:c},{cacheKey:`ens:name:${(r==null?void 0:r.id)||1}:${t}`,cacheTime:60*1e3})}function z2(e){const{client:n,address:t}=e;return pe({enabled:!!t,queryFn:()=>Xh({address:t||"",client:n,resolverChain:ha}),queryKey:["ens-name",t]})}function cs(e){return pe({enabled:!!e,queryFn:()=>{if(!e)throw new Error("Wallet id is required");return ga(e,!1)},queryKey:["wallet-info",e],refetchOnMount:!1,refetchOnWindowFocus:!1,retry:!1})}function DI(e){return pe({enabled:!!e,queryFn:async()=>{var i;if(!e)throw new Error("Wallet id is required");const{getInstalledWalletProviders:n}=await u(async()=>{const{getInstalledWalletProviders:r}=await Promise.resolve().then(()=>Lc);return{getInstalledWalletProviders:r}},void 0),t=(i=n().find(r=>r.info.rdns===e))==null?void 0:i.info.icon;return t||ga(e,!0)},queryKey:["wallet-image",e],refetchOnMount:!1,refetchOnWindowFocus:!1,retry:!1})}async function an(e){const n={action:e.event,amountWei:e.amountWei,chainId:e.chainId,clientId:e.client.clientId,dstChainId:e.toChainId,dstTokenAddress:e.toToken,errorCode:e.error,source:"pay",tokenAddress:e.fromToken,walletAddress:e.walletAddress,walletType:e.walletType};return K5({client:e.client,data:n,ecosystem:e.ecosystem})}async function OI(e){const{account:n,client:t,chain:i,tokenAddress:r}=e;if(r){const{getBalance:d}=await u(async()=>{const{getBalance:f}=await import("./getBalance-BjubRO2E.js");return{getBalance:f}},__vite__mapDeps([49,13,1,2,5,29,19,50,28,30]));return d({address:n.address,contract:cn({address:r,chain:i,client:t})})}const o=Qg({chain:i,client:t}),[s,c,l,h]=await Promise.all([Ng(i),Sg(i),Ag(i),r2(o,{address:n.address})]);return{decimals:c,displayValue:ei(h,c),name:l,symbol:s,value:h}}const P2=y.createContext(()=>{}),R2=y.createContext(ld);function e0(e){const{theme:n,children:t}=e,i=V2(n);return a.jsx(R2.Provider,{value:i,children:t})}function V2(e){if(!e||!kI(e))return ld;let n;return typeof e=="string"?n=e==="light"?tI:ld:n=e,n}function kI(e){return e==="dark"||e==="light"||typeof e=="object"&&e!==null&&"colors"in e}function X(){return y.useContext(R2)}class zI{async open(n){window.open(n,"_blank","noopener,noreferrer")}}const Y1=new zI;function U2(...e){return e.filter(n=>typeof n=="string").join(" ")}const PI=vt`
|
|
3
|
+
from {
|
|
4
|
+
opacity: 0;
|
|
5
|
+
transform: translateY(20%) scale(0.8) ;
|
|
6
|
+
}
|
|
7
|
+
to {
|
|
8
|
+
opacity: 1;
|
|
9
|
+
transform: translateY(0);
|
|
10
|
+
}
|
|
11
|
+
`,RI=vt`
|
|
12
|
+
from {
|
|
13
|
+
opacity: 0;
|
|
14
|
+
transform: translateY(-20%) scale(0.8) ;
|
|
15
|
+
}
|
|
16
|
+
to {
|
|
17
|
+
opacity: 1;
|
|
18
|
+
transform: translateY(0);
|
|
19
|
+
}
|
|
20
|
+
`,lo=vt`
|
|
21
|
+
from {
|
|
22
|
+
opacity: 0;
|
|
23
|
+
}
|
|
24
|
+
to {
|
|
25
|
+
opacity: 1;
|
|
26
|
+
}
|
|
27
|
+
`;var VI=e3,UI=function(n){return n!=="theme"},F1=function(n){return typeof n=="string"&&n.charCodeAt(0)>96?VI:UI},Q1=function(n,t,i){var r;if(t){var o=t.shouldForwardProp;r=n.__emotion_forwardProp&&o?function(s){return n.__emotion_forwardProp(s)&&o(s)}:o}return typeof r!="function"&&i&&(r=n.__emotion_forwardProp),r},BI=function(n){var t=n.cache,i=n.serialized,r=n.isStringTag;return r3(t,i,r),o3(function(){return s3(t,i,r)}),null},WI=function e(n,t){var i=n.__emotion_real===n,r=i&&n.__emotion_base||n,o,s;t!==void 0&&(o=t.label,s=t.target);var c=Q1(n,t,i),l=c||F1(r),h=!l("as");return function(){var d=arguments,f=i&&n.__emotion_styles!==void 0?n.__emotion_styles.slice(0):[];if(o!==void 0&&f.push("label:"+o+";"),d[0]==null||d[0].raw===void 0)f.push.apply(f,d);else{var m=d[0];f.push(m[0]);for(var g=d.length,w=1;w<g;w++)f.push(d[w],m[w])}var p=J5(function(_,x,I){var b=h&&_.as||r,j="",C=[],E=_;if(_.theme==null){E={};for(var T in _)E[T]=_[T];E.theme=y.useContext(t3)}typeof _.className=="string"?j=n3(x.registered,C,_.className):_.className!=null&&(j=_.className+" ");var O=i3(f.concat(C),x.registered,E);j+=x.key+"-"+O.name,s!==void 0&&(j+=" "+s);var L=h&&c===void 0?F1(b):l,N={};for(var v in _)h&&v==="as"||L(v)&&(N[v]=_[v]);return N.className=j,I&&(N.ref=I),y.createElement(y.Fragment,null,y.createElement(BI,{cache:x,serialized:O,isStringTag:typeof b=="string"}),y.createElement(b,N))});return p.displayName=o!==void 0?o:"Styled("+(typeof r=="string"?r:r.displayName||r.name||"Component")+")",p.defaultProps=n.defaultProps,p.__emotion_real=p,p.__emotion_base=r,p.__emotion_styles=f,p.__emotion_forwardProp=c,Object.defineProperty(p,"toString",{value:function(){return"."+s}}),p.withComponent=function(_,x){var I=e(_,X5({},t,x,{shouldForwardProp:Q1(p,x,!0)}));return I.apply(void 0,f)},p}},$I=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],ze=WI.bind(null);$I.forEach(function(e){ze[e]=ze(e)});const Se=ze.div,YI=ze.svg,FI=ze.span,QI=ze.a,Ti=ze.button,HI=ze.label,ZI=ze.input,GI=ze.h2,qI=ze.p,B2=ze.ul,KI=ze.select,JI=ze.option;function We(e,n){if(e==null)return{};var t={},i=Object.keys(e),r,o;for(o=0;o<i.length;o++)r=i[o],!(n.indexOf(r)>=0)&&(t[r]=e[r]);return t}var XI=["color"],eb=y.forwardRef(function(e,n){var t=e.color,i=t===void 0?"currentColor":t,r=We(e,XI);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:n}),y.createElement("path",{d:"M7.5 2C7.77614 2 8 2.22386 8 2.5L8 11.2929L11.1464 8.14645C11.3417 7.95118 11.6583 7.95118 11.8536 8.14645C12.0488 8.34171 12.0488 8.65829 11.8536 8.85355L7.85355 12.8536C7.75979 12.9473 7.63261 13 7.5 13C7.36739 13 7.24021 12.9473 7.14645 12.8536L3.14645 8.85355C2.95118 8.65829 2.95118 8.34171 3.14645 8.14645C3.34171 7.95118 3.65829 7.95118 3.85355 8.14645L7 11.2929L7 2.5C7 2.22386 7.22386 2 7.5 2Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),tb=["color"],nb=y.forwardRef(function(e,n){var t=e.color,i=t===void 0?"currentColor":t,r=We(e,tb);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:n}),y.createElement("path",{d:"M8.14645 3.14645C8.34171 2.95118 8.65829 2.95118 8.85355 3.14645L12.8536 7.14645C13.0488 7.34171 13.0488 7.65829 12.8536 7.85355L8.85355 11.8536C8.65829 12.0488 8.34171 12.0488 8.14645 11.8536C7.95118 11.6583 7.95118 11.3417 8.14645 11.1464L11.2929 8H2.5C2.22386 8 2 7.77614 2 7.5C2 7.22386 2.22386 7 2.5 7H11.2929L8.14645 3.85355C7.95118 3.65829 7.95118 3.34171 8.14645 3.14645Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),ib=["color"],ls=y.forwardRef(function(e,n){var t=e.color,i=t===void 0?"currentColor":t,r=We(e,ib);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:n}),y.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),rb=["color"],ob=y.forwardRef(function(e,n){var t=e.color,i=t===void 0?"currentColor":t,r=We(e,rb);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:n}),y.createElement("path",{d:"M7.49991 0.877045C3.84222 0.877045 0.877075 3.84219 0.877075 7.49988C0.877075 11.1575 3.84222 14.1227 7.49991 14.1227C11.1576 14.1227 14.1227 11.1575 14.1227 7.49988C14.1227 3.84219 11.1576 0.877045 7.49991 0.877045ZM1.82708 7.49988C1.82708 4.36686 4.36689 1.82704 7.49991 1.82704C10.6329 1.82704 13.1727 4.36686 13.1727 7.49988C13.1727 10.6329 10.6329 13.1727 7.49991 13.1727C4.36689 13.1727 1.82708 10.6329 1.82708 7.49988ZM10.1589 5.53774C10.3178 5.31191 10.2636 5.00001 10.0378 4.84109C9.81194 4.68217 9.50004 4.73642 9.34112 4.96225L6.51977 8.97154L5.35681 7.78706C5.16334 7.59002 4.84677 7.58711 4.64973 7.78058C4.45268 7.97404 4.44978 8.29061 4.64325 8.48765L6.22658 10.1003C6.33054 10.2062 6.47617 10.2604 6.62407 10.2483C6.77197 10.2363 6.90686 10.1591 6.99226 10.0377L10.1589 5.53774Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),sb=["color"],sl=y.forwardRef(function(e,n){var t=e.color,i=t===void 0?"currentColor":t,r=We(e,sb);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:n}),y.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),ab=["color"],W2=y.forwardRef(function(e,n){var t=e.color,i=t===void 0?"currentColor":t,r=We(e,ab);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:n}),y.createElement("path",{d:"M8.84182 3.13514C9.04327 3.32401 9.05348 3.64042 8.86462 3.84188L5.43521 7.49991L8.86462 11.1579C9.05348 11.3594 9.04327 11.6758 8.84182 11.8647C8.64036 12.0535 8.32394 12.0433 8.13508 11.8419L4.38508 7.84188C4.20477 7.64955 4.20477 7.35027 4.38508 7.15794L8.13508 3.15794C8.32394 2.95648 8.64036 2.94628 8.84182 3.13514Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),cb=["color"],lb=y.forwardRef(function(e,n){var t=e.color,i=t===void 0?"currentColor":t,r=We(e,cb);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:n}),y.createElement("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),ub=["color"],db=y.forwardRef(function(e,n){var t=e.color,i=t===void 0?"currentColor":t,r=We(e,ub);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:n}),y.createElement("path",{d:"M7.50009 0.877014C3.84241 0.877014 0.877258 3.84216 0.877258 7.49984C0.877258 11.1575 3.8424 14.1227 7.50009 14.1227C11.1578 14.1227 14.1229 11.1575 14.1229 7.49984C14.1229 3.84216 11.1577 0.877014 7.50009 0.877014ZM1.82726 7.49984C1.82726 4.36683 4.36708 1.82701 7.50009 1.82701C10.6331 1.82701 13.1729 4.36683 13.1729 7.49984C13.1729 10.6328 10.6331 13.1727 7.50009 13.1727C4.36708 13.1727 1.82726 10.6328 1.82726 7.49984ZM8 4.50001C8 4.22387 7.77614 4.00001 7.5 4.00001C7.22386 4.00001 7 4.22387 7 4.50001V7.50001C7 7.63262 7.05268 7.7598 7.14645 7.85357L9.14645 9.85357C9.34171 10.0488 9.65829 10.0488 9.85355 9.85357C10.0488 9.65831 10.0488 9.34172 9.85355 9.14646L8 7.29291V4.50001Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),hb=["color"],$2=y.forwardRef(function(e,n){var t=e.color,i=t===void 0?"currentColor":t,r=We(e,hb);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:n}),y.createElement("path",{d:"M1 9.50006C1 10.3285 1.67157 11.0001 2.5 11.0001H4L4 10.0001H2.5C2.22386 10.0001 2 9.7762 2 9.50006L2 2.50006C2 2.22392 2.22386 2.00006 2.5 2.00006L9.5 2.00006C9.77614 2.00006 10 2.22392 10 2.50006V4.00002H5.5C4.67158 4.00002 4 4.67159 4 5.50002V12.5C4 13.3284 4.67158 14 5.5 14H12.5C13.3284 14 14 13.3284 14 12.5V5.50002C14 4.67159 13.3284 4.00002 12.5 4.00002H11V2.50006C11 1.67163 10.3284 1.00006 9.5 1.00006H2.5C1.67157 1.00006 1 1.67163 1 2.50006V9.50006ZM5 5.50002C5 5.22388 5.22386 5.00002 5.5 5.00002H12.5C12.7761 5.00002 13 5.22388 13 5.50002V12.5C13 12.7762 12.7761 13 12.5 13H5.5C5.22386 13 5 12.7762 5 12.5V5.50002Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),fb=["color"],mb=y.forwardRef(function(e,n){var t=e.color,i=t===void 0?"currentColor":t,r=We(e,fb);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:n}),y.createElement("path",{d:"M12.8536 2.85355C13.0488 2.65829 13.0488 2.34171 12.8536 2.14645C12.6583 1.95118 12.3417 1.95118 12.1464 2.14645L7.5 6.79289L2.85355 2.14645C2.65829 1.95118 2.34171 1.95118 2.14645 2.14645C1.95118 2.34171 1.95118 2.65829 2.14645 2.85355L6.79289 7.5L2.14645 12.1464C1.95118 12.3417 1.95118 12.6583 2.14645 12.8536C2.34171 13.0488 2.65829 13.0488 2.85355 12.8536L7.5 8.20711L12.1464 12.8536C12.3417 13.0488 12.6583 13.0488 12.8536 12.8536C13.0488 12.6583 13.0488 12.3417 12.8536 12.1464L8.20711 7.5L12.8536 2.85355Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),gb=["color"],Y2=y.forwardRef(function(e,n){var t=e.color,i=t===void 0?"currentColor":t,r=We(e,gb);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:n}),y.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),yb=["color"],Cr=y.forwardRef(function(e,n){var t=e.color,i=t===void 0?"currentColor":t,r=We(e,yb);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:n}),y.createElement("path",{d:"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704ZM9.85358 5.14644C10.0488 5.3417 10.0488 5.65829 9.85358 5.85355L8.20713 7.49999L9.85358 9.14644C10.0488 9.3417 10.0488 9.65829 9.85358 9.85355C9.65832 10.0488 9.34173 10.0488 9.14647 9.85355L7.50002 8.2071L5.85358 9.85355C5.65832 10.0488 5.34173 10.0488 5.14647 9.85355C4.95121 9.65829 4.95121 9.3417 5.14647 9.14644L6.79292 7.49999L5.14647 5.85355C4.95121 5.65829 4.95121 5.3417 5.14647 5.14644C5.34173 4.95118 5.65832 4.95118 5.85358 5.14644L7.50002 6.79289L9.14647 5.14644C9.34173 4.95118 9.65832 4.95118 9.85358 5.14644Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),pb=["color"],wb=y.forwardRef(function(e,n){var t=e.color,i=t===void 0?"currentColor":t,r=We(e,pb);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:n}),y.createElement("path",{d:"M3 1C2.44771 1 2 1.44772 2 2V13C2 13.5523 2.44772 14 3 14H10.5C10.7761 14 11 13.7761 11 13.5C11 13.2239 10.7761 13 10.5 13H3V2L10.5 2C10.7761 2 11 1.77614 11 1.5C11 1.22386 10.7761 1 10.5 1H3ZM12.6036 4.89645C12.4083 4.70118 12.0917 4.70118 11.8964 4.89645C11.7012 5.09171 11.7012 5.40829 11.8964 5.60355L13.2929 7H6.5C6.22386 7 6 7.22386 6 7.5C6 7.77614 6.22386 8 6.5 8H13.2929L11.8964 9.39645C11.7012 9.59171 11.7012 9.90829 11.8964 10.1036C12.0917 10.2988 12.4083 10.2988 12.6036 10.1036L14.8536 7.85355C15.0488 7.65829 15.0488 7.34171 14.8536 7.14645L12.6036 4.89645Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),_b=["color"],F2=y.forwardRef(function(e,n){var t=e.color,i=t===void 0?"currentColor":t,r=We(e,_b);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:n}),y.createElement("path",{d:"M3 2C2.44772 2 2 2.44772 2 3V12C2 12.5523 2.44772 13 3 13H12C12.5523 13 13 12.5523 13 12V8.5C13 8.22386 12.7761 8 12.5 8C12.2239 8 12 8.22386 12 8.5V12H3V3L6.5 3C6.77614 3 7 2.77614 7 2.5C7 2.22386 6.77614 2 6.5 2H3ZM12.8536 2.14645C12.9015 2.19439 12.9377 2.24964 12.9621 2.30861C12.9861 2.36669 12.9996 2.4303 13 2.497L13 2.5V2.50049V5.5C13 5.77614 12.7761 6 12.5 6C12.2239 6 12 5.77614 12 5.5V3.70711L6.85355 8.85355C6.65829 9.04882 6.34171 9.04882 6.14645 8.85355C5.95118 8.65829 5.95118 8.34171 6.14645 8.14645L11.2929 3H9.5C9.22386 3 9 2.77614 9 2.5C9 2.22386 9.22386 2 9.5 2H12.4999H12.5C12.5678 2 12.6324 2.01349 12.6914 2.03794C12.7504 2.06234 12.8056 2.09851 12.8536 2.14645Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),xb=["color"],t0=y.forwardRef(function(e,n){var t=e.color,i=t===void 0?"currentColor":t,r=We(e,xb);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:n}),y.createElement("path",{d:"M10 6.5C10 8.433 8.433 10 6.5 10C4.567 10 3 8.433 3 6.5C3 4.567 4.567 3 6.5 3C8.433 3 10 4.567 10 6.5ZM9.30884 10.0159C8.53901 10.6318 7.56251 11 6.5 11C4.01472 11 2 8.98528 2 6.5C2 4.01472 4.01472 2 6.5 2C8.98528 2 11 4.01472 11 6.5C11 7.56251 10.6318 8.53901 10.0159 9.30884L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L9.30884 10.0159Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),Mb=["color"],Ib=y.forwardRef(function(e,n){var t=e.color,i=t===void 0?"currentColor":t,r=We(e,Mb);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:n}),y.createElement("path",{d:"M2.25 7.5C2.25 7.22386 2.47386 7 2.75 7H12.25C12.5261 7 12.75 7.22386 12.75 7.5C12.75 7.77614 12.5261 8 12.25 8H2.75C2.47386 8 2.25 7.77614 2.25 7.5Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),bb=["color"],Cb=y.forwardRef(function(e,n){var t=e.color,i=t===void 0?"currentColor":t,r=We(e,bb);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:n}),y.createElement("path",{d:"M1.20308 1.04312C1.00481 0.954998 0.772341 1.0048 0.627577 1.16641C0.482813 1.32802 0.458794 1.56455 0.568117 1.75196L3.92115 7.50002L0.568117 13.2481C0.458794 13.4355 0.482813 13.672 0.627577 13.8336C0.772341 13.9952 1.00481 14.045 1.20308 13.9569L14.7031 7.95693C14.8836 7.87668 15 7.69762 15 7.50002C15 7.30243 14.8836 7.12337 14.7031 7.04312L1.20308 1.04312ZM4.84553 7.10002L2.21234 2.586L13.2689 7.50002L2.21234 12.414L4.84552 7.90002H9C9.22092 7.90002 9.4 7.72094 9.4 7.50002C9.4 7.27911 9.22092 7.10002 9 7.10002H4.84553Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),jb=["color"],Lb=y.forwardRef(function(e,n){var t=e.color,i=t===void 0?"currentColor":t,r=We(e,jb);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:n}),y.createElement("path",{d:"M13.5 13.95C13.7485 13.95 13.95 13.7485 13.95 13.5C13.95 13.2514 13.7485 13.05 13.5 13.05L1.49995 13.05C1.25142 13.05 1.04995 13.2514 1.04995 13.5C1.04995 13.7485 1.25142 13.95 1.49995 13.95L13.5 13.95ZM11.0681 7.5683C11.2439 7.39257 11.2439 7.10764 11.0681 6.93191C10.8924 6.75617 10.6075 6.75617 10.4317 6.93191L7.94993 9.41371L7.94993 1.49998C7.94993 1.25146 7.74846 1.04998 7.49993 1.04998C7.2514 1.04998 7.04993 1.25146 7.04993 1.49998L7.04993 9.41371L4.56813 6.93191C4.39239 6.75617 4.10746 6.75617 3.93173 6.93191C3.75599 7.10764 3.75599 7.39257 3.93173 7.5683L7.18173 10.8183C7.35746 10.994 7.64239 10.994 7.81812 10.8183L11.0681 7.5683Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),Eb=["color"],al=y.forwardRef(function(e,n){var t=e.color,i=t===void 0?"currentColor":t,r=We(e,Eb);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:n}),y.createElement("path",{d:"M8 2.75C8 2.47386 7.77614 2.25 7.5 2.25C7.22386 2.25 7 2.47386 7 2.75V7H2.75C2.47386 7 2.25 7.22386 2.25 7.5C2.25 7.77614 2.47386 8 2.75 8H7V12.25C7 12.5261 7.22386 12.75 7.5 12.75C7.77614 12.75 8 12.5261 8 12.25V8H12.25C12.5261 8 12.75 7.77614 12.75 7.5C12.75 7.22386 12.5261 7 12.25 7H8V2.75Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),Tb=["color"],vb=y.forwardRef(function(e,n){var t=e.color,i=t===void 0?"currentColor":t,r=We(e,Tb);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:n}),y.createElement("path",{d:"M7.49985 0.877045C3.84216 0.877045 0.877014 3.84219 0.877014 7.49988C0.877014 11.1575 3.84216 14.1227 7.49985 14.1227C11.1575 14.1227 14.1227 11.1575 14.1227 7.49988C14.1227 3.84219 11.1575 0.877045 7.49985 0.877045ZM1.82701 7.49988C1.82701 4.36686 4.36683 1.82704 7.49985 1.82704C10.6328 1.82704 13.1727 4.36686 13.1727 7.49988C13.1727 10.6329 10.6328 13.1727 7.49985 13.1727C4.36683 13.1727 1.82701 10.6329 1.82701 7.49988ZM7.49999 9.49999C8.60456 9.49999 9.49999 8.60456 9.49999 7.49999C9.49999 6.39542 8.60456 5.49999 7.49999 5.49999C6.39542 5.49999 5.49999 6.39542 5.49999 7.49999C5.49999 8.60456 6.39542 9.49999 7.49999 9.49999Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),Nb=["color"],pa=y.forwardRef(function(e,n){var t=e.color,i=t===void 0?"currentColor":t,r=We(e,Nb);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:n}),y.createElement("path",{d:"M1.84998 7.49998C1.84998 4.66458 4.05979 1.84998 7.49998 1.84998C10.2783 1.84998 11.6515 3.9064 12.2367 5H10.5C10.2239 5 10 5.22386 10 5.5C10 5.77614 10.2239 6 10.5 6H13.5C13.7761 6 14 5.77614 14 5.5V2.5C14 2.22386 13.7761 2 13.5 2C13.2239 2 13 2.22386 13 2.5V4.31318C12.2955 3.07126 10.6659 0.849976 7.49998 0.849976C3.43716 0.849976 0.849976 4.18537 0.849976 7.49998C0.849976 10.8146 3.43716 14.15 7.49998 14.15C9.44382 14.15 11.0622 13.3808 12.2145 12.2084C12.8315 11.5806 13.3133 10.839 13.6418 10.0407C13.7469 9.78536 13.6251 9.49315 13.3698 9.38806C13.1144 9.28296 12.8222 9.40478 12.7171 9.66014C12.4363 10.3425 12.0251 10.9745 11.5013 11.5074C10.5295 12.4963 9.16504 13.15 7.49998 13.15C4.05979 13.15 1.84998 10.3354 1.84998 7.49998Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),Sb=["color"],Ab=y.forwardRef(function(e,n){var t=e.color,i=t===void 0?"currentColor":t,r=We(e,Sb);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:n}),y.createElement("path",{d:"M12.3536 1.14645C12.1583 0.951184 11.8417 0.951184 11.6464 1.14645C11.4512 1.34171 11.4512 1.65829 11.6464 1.85355L12.7929 3H12C10.7037 3 9.71111 3.58423 8.87248 4.38931C8.20065 5.03427 7.59349 5.85684 6.99461 6.6682C6.86287 6.84668 6.73154 7.02462 6.6 7.2C5.10874 9.18835 3.49037 11 0.5 11C0.223858 11 0 11.2239 0 11.5C0 11.7761 0.223858 12 0.5 12C4.00963 12 5.89126 9.81165 7.4 7.8C7.54367 7.60845 7.6832 7.41962 7.81996 7.23454L7.82005 7.23443L7.82006 7.23441C8.41674 6.42695 8.96069 5.69085 9.56502 5.11069C10.2889 4.41577 11.0463 4 12 4H12.7929L11.6464 5.14645C11.4512 5.34171 11.4512 5.65829 11.6464 5.85355C11.8417 6.04882 12.1583 6.04882 12.3536 5.85355L14.3536 3.85355C14.5488 3.65829 14.5488 3.34171 14.3536 3.14645L12.3536 1.14645ZM0.5 3C3.35278 3 5.12992 4.44588 6.50548 6.06746L6.3762 6.24266C6.2483 6.4161 6.12293 6.58609 6 6.75C5.96397 6.79804 5.92798 6.84581 5.892 6.89331C4.57348 5.29306 3.02637 4 0.5 4C0.223858 4 0 3.77614 0 3.5C0 3.22386 0.223858 3 0.5 3ZM8.87248 10.6107C8.37284 10.131 7.90897 9.55314 7.45767 8.95468C7.64688 8.71693 7.82704 8.48061 8 8.25L8.08987 8.12987C8.58412 8.79402 9.05288 9.39766 9.56502 9.88931C10.2889 10.5842 11.0463 11 12 11H12.7929L11.6464 9.85355C11.4512 9.65829 11.4512 9.34171 11.6464 9.14645C11.8417 8.95118 12.1583 8.95118 12.3536 9.14645L14.3536 11.1464C14.5488 11.3417 14.5488 11.6583 14.3536 11.8536L12.3536 13.8536C12.1583 14.0488 11.8417 14.0488 11.6464 13.8536C11.4512 13.6583 11.4512 13.3417 11.6464 13.1464L12.7929 12H12C10.7037 12 9.71111 11.4158 8.87248 10.6107Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}),Db=["color"],Ob=y.forwardRef(function(e,n){var t=e.color,i=t===void 0?"currentColor":t,r=We(e,Db);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:n}),y.createElement("path",{d:"M2.5 4C2.22386 4 2 4.22386 2 4.5C2 4.77614 2.22386 5 2.5 5H12.5C12.7761 5 13 4.77614 13 4.5C13 4.22386 12.7761 4 12.5 4H2.5ZM2 7.5C2 7.22386 2.22386 7 2.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H2.5C2.22386 8 2 7.77614 2 7.5ZM2 10.5C2 10.2239 2.22386 10 2.5 10H12.5C12.7761 10 13 10.2239 13 10.5C13 10.7761 12.7761 11 12.5 11H2.5C2.22386 11 2 10.7761 2 10.5Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))});const ae=Ti(e=>{const n=X();return e.unstyled?{}:{all:"unset","[&:active]:not([disabled])":{transform:"translateY(1px)"},"&[data-disabled='true']":{"&:hover":{borderColor:"transparent"},background:n.colors.tertiaryBg,borderColor:"transparent",boxShadow:"none",color:n.colors.secondaryText},"&[disabled]":{cursor:"not-allowed"},alignItems:"center",background:(()=>{if(e.bg)return n.colors[e.bg];switch(e.variant){case"primary":return n.colors.primaryButtonBg;case"accent":return n.colors.accentButtonBg;case"secondary":return n.colors.secondaryButtonBg;default:return"none"}})(),borderRadius:G.md,boxSizing:"border-box",color:(()=>{switch(e.variant){case"primary":return n.colors.primaryButtonText;case"accent":return n.colors.accentButtonText;case"secondary":return n.colors.secondaryButtonText;case"ghost":case"ghost-solid":case"outline":return n.colors.secondaryButtonText;case"link":return n.colors.accentText;default:return n.colors.primaryButtonText}})(),cursor:"pointer",display:"inline-flex",flexShrink:0,fontSize:ie.sm,fontWeight:500,gap:e.gap&&P[e.gap]||0,justifyContent:"center",lineHeight:"normal",maxWidth:"100%",padding:`${ie.sm} ${ie.sm}`,textAlign:"center",transition:"border 200ms ease",WebkitTapHighlightColor:"transparent",width:e.fullWidth?"100%":void 0,"&:hover":{background:e.hoverBg?n.colors[e.hoverBg]:void 0},...e.variant==="outline"?{"&:hover":{borderColor:n.colors.accentText},'&[aria-selected="true"]':{borderColor:n.colors.accentText},border:`1px solid ${n.colors.borderColor}`}:e.variant==="ghost"?{"&:hover":{borderColor:n.colors.accentText},border:"1px solid transparent"}:e.variant==="ghost-solid"?{"&:hover":{background:n.colors[e.hoverBg||"tertiaryBg"]},border:"1px solid transparent"}:e.variant==="accent"?{"&:hover":{opacity:.8}}:e.variant==="secondary"?{"&:hover":{background:n.colors[e.hoverBg||"secondaryButtonHoverBg"]}}:e.variant==="link"?{"&:hover":{color:n.colors.primaryText},padding:0}:{}}}),Q2=ae.withComponent("a"),bi=Ti(e=>{const n=X();return{all:"unset","&:hover":{background:n.colors.secondaryIconHoverBg,color:n.colors.secondaryIconHoverColor},"&[disabled]":{cursor:"not-allowed"},alignItems:"center",borderRadius:G.sm,color:n.colors.secondaryIconColor,cursor:"pointer",display:"inline-flex",justifyContent:"center",padding:"2px",transition:"background 200ms ease, color 200ms ease",WebkitTapHighlightColor:"transparent"}}),cl=GI(e=>({color:X().colors.primaryText,fontSize:ie.lg,fontWeight:500,lineHeight:1.3,margin:0,letterSpacing:"-0.025em",textAlign:"left"})),kb=e=>a.jsx(bi,{className:"tw-back-button",onClick:e.onClick,style:{transform:"translateX(-25%)",...e.style},type:"button",children:a.jsx(W2,{height:A.md,width:A.md})}),H2=Se(e=>({borderTop:`1px solid ${X().colors.separatorLine}`,display:"flex",flexDirection:"column",gap:P.md,padding:P.lg})),wa={"&::-webkit-scrollbar":{display:"none",width:0},scrollbarWidth:"none"};function _e(e){const{onBack:n,title:t}=e;return a.jsxs("div",{className:U2("tw-header",e.className),style:{alignItems:"center",display:"flex",justifyContent:e.leftAligned?"flex-start":"center",position:"relative"},children:[n&&a.jsx(kb,{onClick:n,style:{left:0,position:"absolute",top:0}}),a.jsx(M,{center:"both",flex:"row",gap:"xs",children:typeof t=="string"?a.jsx(cl,{children:t}):t})]})}const Re=Se(e=>{const n=X();return{borderTop:`1px ${e.dashed?"dashed":"solid"} ${n.colors.separatorLine}`}});function M(e){const n={};return e.relative&&(n.position="relative"),e.fullHeight&&(n.height="100%"),e.expand&&(n.flex="1 1 0%"),e.flex&&(n.display="flex",n.flexDirection=e.flex,e.flex==="row"&&(n.flexWrap="wrap"),e.gap&&(n.gap=P[e.gap]),e.center&&(e.center==="both"&&(n.justifyContent="center",n.alignItems="center"),(e.center==="x"&&e.flex==="row"||e.center==="y"&&e.flex==="column")&&(n.justifyContent="center"),(e.center==="x"&&e.flex==="column"||e.center==="y"&&e.flex==="row")&&(n.alignItems="center"))),e.p&&(n.padding=P[e.p]),e.px&&(n.paddingLeft=P[e.px],n.paddingRight=P[e.px]),e.py&&(n.paddingTop=P[e.py],n.paddingBottom=P[e.py]),e.pb&&(n.paddingBottom=P[e.pb]),e.pt&&(n.paddingTop=P[e.pt]),e.debug&&(n.outline="1px solid red",n.outlineOffset="-1px"),a.jsx(zb,{bg:e.bg,borderColor:e.borderColor,color:e.color,"data-animate":e.animate,"data-scrolly":e.scrollY,className:e.className,style:{...n,...e.style},children:e.children})}const zb=Se(e=>{const n=X();return{"&[data-animate='fadein']":{animation:`${lo} 350ms ease forwards`,opacity:0},"&[data-animate='floatdown']":{animation:`${RI} 350ms ease forwards`,opacity:0},"&[data-animate='floatup']":{animation:`${PI} 350ms ease forwards`,opacity:0},"&[data-scrolly='true']":{overflowY:"auto",...wa},background:e.bg?n.colors[e.bg]:void 0,borderColor:e.borderColor?n.colors[e.borderColor]:void 0,color:e.color?n.colors[e.color]:"inherit"}}),ke=e=>{const n=X();return a.jsxs(Vb,{style:{height:`${A[e.size]}px`,width:`${A[e.size]}px`,...e.style},viewBox:"0 0 50 50",className:"tw-spinner",children:[a.jsx("circle",{cx:"25",cy:"25",fill:"none",r:"20",style:{strokeLinecap:"round",animation:"tw-spinner-circle-dash 1.5s ease-in-out infinite"},stroke:e.color?n.colors[e.color]:"currentColor",strokeWidth:Number(A[e.size])>64?"2":"4"}),a.jsx("style",{children:Pb})]})},Pb=`
|
|
28
|
+
@keyframes tw-spinner-circle-dash {
|
|
29
|
+
0% {
|
|
30
|
+
stroke-dasharray: 1, 150;
|
|
31
|
+
stroke-dashoffset: 0;
|
|
32
|
+
}
|
|
33
|
+
50% {
|
|
34
|
+
stroke-dasharray: 90, 150;
|
|
35
|
+
stroke-dashoffset: -35;
|
|
36
|
+
}
|
|
37
|
+
100% {
|
|
38
|
+
stroke-dasharray: 90, 150;
|
|
39
|
+
stroke-dashoffset: -124;
|
|
40
|
+
}
|
|
41
|
+
`,Rb=vt`
|
|
42
|
+
100% {
|
|
43
|
+
transform: rotate(360deg);
|
|
44
|
+
}
|
|
45
|
+
`,Vb=YI({animation:`${Rb} 2s linear infinite`,height:"1em",width:"1em"});function ct(e){return a.jsx(M,{center:"both",flex:"row",fullHeight:!0,style:{minHeight:e.height||"350px"},children:a.jsx(ke,{color:"secondaryText",size:"xl"})})}async function _a(e,n,t){return ns(async()=>{const r=(await t2({chainId:t,client:e,tokenAddress:n}))[0];return r||await xM({chainId:t,client:e,tokenAddress:n}).catch(()=>{throw new Error("Token not supported")})},{cacheKey:`get-token-price-${n}-${t}`,cacheTime:1e3*60})}const n0=e=>{const n=y.useId(),t=y.useId();return a.jsxs("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 109 109",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:[a.jsxs("g",{clipPath:`url(#${t})`,children:[a.jsx("path",{d:"M54.5 109C84.5995 109 109 84.5995 109 54.5C109 24.4005 84.5995 0 54.5 0C24.4005 0 0 24.4005 0 54.5C0 84.5995 24.4005 109 54.5 109Z",fill:"#4BABFF"}),a.jsx("path",{d:"M55 96C77.6437 96 96 77.6437 96 55C96 32.3563 77.6437 14 55 14C32.3563 14 14 32.3563 14 55C14 77.6437 32.3563 96 55 96Z",fill:"#1C85FF"}),a.jsx("path",{d:"M73.2352 69.389C73.7459 69.8997 74.0329 70.5924 74.0329 71.3147C74.0329 72.037 73.7459 72.7298 73.2352 73.2405C72.7244 73.7513 72.0317 74.0382 71.3094 74.0382C70.5871 74.0382 69.8944 73.7513 69.3836 73.2405L54.9992 58.8515L40.6102 73.236C40.0994 73.7467 39.4067 74.0337 38.6844 74.0337C37.9621 74.0337 37.2694 73.7467 36.7586 73.236C36.2479 72.7252 35.9609 72.0325 35.9609 71.3102C35.9609 70.5879 36.2479 69.8952 36.7586 69.3844L51.1476 55L36.7632 40.611C36.2524 40.1002 35.9655 39.4075 35.9655 38.6852C35.9655 37.9629 36.2524 37.2702 36.7632 36.7594C37.2739 36.2487 37.9666 35.9617 38.6889 35.9617C39.4112 35.9617 40.104 36.2487 40.6147 36.7594L54.9992 51.1484L69.3881 36.7572C69.8989 36.2464 70.5916 35.9595 71.3139 35.9595C72.0362 35.9595 72.729 36.2464 73.2397 36.7572C73.7505 37.2679 74.0374 37.9606 74.0374 38.6829C74.0374 39.4052 73.7505 40.098 73.2397 40.6087L58.8507 55L73.2352 69.389Z",fill:`url(#${n})`})]}),a.jsxs("defs",{children:[a.jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:n,x1:"54.9992",x2:"54.9992",y1:"35.9595",y2:"74.0382",children:[a.jsx("stop",{stopColor:"white"}),a.jsx("stop",{offset:"1",stopColor:"#90CBFF"})]}),a.jsx("clipPath",{id:t,children:a.jsx("rect",{fill:"white",height:"109",width:"109"})})]})]})};async function Ub(e){switch(e){case"es_ES":return(await u(async()=>{const{default:n}=await import("./es-VJyYb90S.js");return{default:n}},[])).default;case"ja_JP":return(await u(async()=>{const{default:n}=await import("./ja-DJMSrON6.js");return{default:n}},[])).default;case"tl_PH":return(await u(async()=>{const{default:n}=await import("./tl-CRo3FF6E.js");return{default:n}},[])).default;case"vi_VN":return(await u(async()=>{const{default:n}=await import("./vi-UZskHqr3.js");return{default:n}},[])).default;case"de_DE":return(await u(async()=>{const{default:n}=await import("./de-CGYpD2SG.js");return{default:n}},[])).default;case"ko_KR":return(await u(async()=>{const{default:n}=await import("./kr-5lmSzexK.js");return{default:n}},[])).default;case"fr_FR":return(await u(async()=>{const{default:n}=await import("./fr-Dw9xCc6Y.js");return{default:n}},[])).default;case"ru_RU":return(await u(async()=>{const{default:n}=await import("./ru-BiwauFaO.js");return{default:n}},[])).default;case"pt_BR":return(await u(async()=>{const{default:n}=await import("./br-B9BLCi07.js");return{default:n}},[])).default;case"zh_CN":return(await u(async()=>{const{default:n}=await import("./zh-uWVXxi-t.js");return{default:n}},[])).default;default:return(await u(async()=>{const{default:n}=await Promise.resolve().then(()=>UC);return{default:n}},void 0)).default}}function Bb(e){return pe({queryFn:async()=>Ub(e),queryKey:["connect-locale",e],refetchOnMount:!1,refetchOnWindowFocus:!1})}function ll(e){return[Tt("inApp",{executionMode:e==null?void 0:e.executionMode}),Tt(Rh),Tt(rn,{appMetadata:e==null?void 0:e.appMetadata,chains:e==null?void 0:e.chains}),Tt(s2),Tt("io.rabby"),Tt(a2),Tt("com.okex.wallet")]}function Wb(e){return[Tt(Rh),Tt(rn,{appMetadata:e==null?void 0:e.appMetadata,chains:e==null?void 0:e.chains}),Tt(s2),Tt("io.rabby"),Tt(a2),Tt("com.okex.wallet")]}const Z2=y.createContext(!1),G2=y.createContext(()=>{}),q2=y.createContext({}),K2=y.createContext(()=>{}),J2=e=>{const[n,t]=y.useState(e.isOpen),[i,r]=y.useState({});return a.jsx(Z2.Provider,{value:n,children:a.jsx(G2.Provider,{value:t,children:a.jsx(q2.Provider,{value:i,children:a.jsx(K2.Provider,{value:r,children:a.jsx(e0,{theme:e.theme,children:e.children})})})})})},$b=()=>y.useContext(Z2),X2=()=>{const e=y.useContext(G2);if(e===void 0)throw new Error("useSetWalletModalOpen must be used within a ThirdwebProvider");return e};function uo(){return y.useContext(K2)}function Yb(){return y.useContext(q2)}const At={getStarted:"getStarted",main:"main",showAll:"showAll",signIn:"signIn"},ey="400px",ty=730,ny=`${ty}px`,Fb=ty+40,iy="570px",i0="660px",ud=250;function Ec(e){setTimeout(e,ud+200)}function Qb(){return typeof window<"u"?window.innerWidth>=Fb:!1}function Hb({wallets:e}){zh({queries:e.filter(n=>n.id===rn||n.id==="inApp"||De(n.id)).map(n=>({queryFn:async()=>{switch(!0){case rn===n.id:{const{getCoinbaseWebProvider:t}=await u(async()=>{const{getCoinbaseWebProvider:i}=await Promise.resolve().then(()=>ad);return{getCoinbaseWebProvider:i}},void 0);return await t(n.getConfig()),!0}default:return!1}},queryKey:["preload-wallet",n.id]}))})}function ry(e,n){return new Promise((t,i)=>{const r=setTimeout(()=>{i(new Error(n.message))},n.ms);e.then(o=>{clearTimeout(r),t(o)},o=>{clearTimeout(r),i(o)})})}function Zb(e){const n=i=>Bg(i)||De(i),t=Ho(e.wallet)&&e.connectedWallets.some(i=>{var r,o,s,c,l,h;return n(i)&&((o=(r=i.getAccount())==null?void 0:r.address)==null?void 0:o.toLowerCase())===((h=(l=(c=(s=e.wallet).getAdminAccount)==null?void 0:c.call(s))==null?void 0:l.address)==null?void 0:h.toLowerCase())});return n(e.wallet)||t}function Gb(){if(typeof document>"u")return;const e=window.location.search,n=new URLSearchParams(e),t=n.get("authResult"),i=n.get("walletId"),r=n.get("authProvider"),o=n.get("authCookie"),s=n.get("authFlow");if((o||t)&&i){const c=(()=>{if(t)return n.delete("authResult"),JSON.parse(decodeURIComponent(t))})();return n.delete("walletId"),n.delete("authProvider"),n.delete("authCookie"),n.delete("authFlow"),window.history.pushState({},"",`${window.location.pathname}?${n.toString()}`),{authCookie:o,authFlow:s,authProvider:r,authResult:c,walletId:i}}}function qb(e,n){const t=new Set;let i=e();const r=()=>{for(const s of t)s()},o=s=>{i=s,r()};for(const s of n)s.subscribe(()=>{o(e())});return{getValue(){return i},subscribe(s){return t.add(s),()=>{t.delete(s)}}}}function za(e,n,t=!0){t&&e();const i=n.map(r=>r.subscribe(()=>{e()}));return()=>{for(const r of i)r()}}const Qs="tw:connected-wallet-params";async function xV(e,n,t){if(!Jb(t))throw new Error("given params are not stringifiable");const i=await e.getItem(Qs);let r;if(i){try{r=JSON.parse(i)}catch{r={}}r[n]=t}else r={[n]:t};e.setItem(Qs,it(r))}async function Kb(e,n){const t=await e.getItem(Qs);let i;if(t){try{i=JSON.parse(t)}catch{i={}}delete i[n],e.setItem(Qs,it(i))}}async function MV(e,n){const t=await e.getItem(Qs);if(!t)return null;try{const i=JSON.parse(t);return i!=null&&i[n]?i[n]:null}catch{return null}}function Jb(e){try{return it(e),!0}catch{return!1}}const oy="thirdweb:connected-wallet-ids",ic="thirdweb:active-wallet-id",dd="thirdweb:active-chain",hd="thirdweb:last-used-wallet-id";function Xb(e){const n=Tr(void 0),t=Tr(void 0),i=Tr(void 0),r=Tr("unknown"),o=Tr(new Map);za(()=>{a3([...o.getValue().values()])},[o]),za(()=>{const b=i.getValue();if(!b)return;const j=o.getValue().get(b.id);!j||j===b||i.setValue(j)},[o,i]);const s=Tr(new Map),c=Tr(!1),l=qb(()=>Array.from(s.getValue().values()),[s]),h=b=>{const j=s.getValue();if(j.has(b.id))return;const C=new Map(j);C.set(b.id,b),s.setValue(C)},d=b=>{const j=s.getValue(),C=new Map(j);C.delete(b.id),s.setValue(C)},f=b=>{Kb(e,b.id),d(b),n.getValue()===b&&(e.removeItem(ic),t.setValue(void 0),i.setValue(void 0),n.setValue(void 0),r.setValue("disconnected"))},m=b=>{f(b),b.disconnect()},g=async(b,j)=>{if(!b.getAccount())throw new Error("Cannot set a wallet without an account as active");const E=await(async()=>j!=null&&j.accountAbstraction&&!Ho(b)?await e6(b,j.client,j.accountAbstraction,f):b)();return await e.setItem(ic,b.id),await e.setItem(hd,b.id),h(b),(j==null?void 0:j.setWalletAsActive)!==!1&&p(E),b.subscribe("accountChanged",async()=>{var O;const T=await g(b,j);(O=j==null?void 0:j.onConnect)==null||O.call(j,T,l.getValue())}),E},w=async(b,j)=>{var E;const C=await g(b,j);return(E=j==null?void 0:j.onConnect)==null||E.call(j,C,l.getValue()),C},p=b=>{const j=b.getAccount();if(!j)throw new Error("Cannot set a wallet without an account as active");h(b),n.setValue(b),t.setValue(j),i.setValue(b.getChain()),r.setValue("connected");const C=N=>{t.setValue(N)},E=b.subscribe("accountChanged",C),T=b.subscribe("chainChanged",N=>i.setValue(N)),O=b.subscribe("disconnect",()=>{L()}),L=()=>{f(b),E(),T(),O()}},_=async b=>{p(b),b.id!=="smart"&&(await e.setItem(ic,b.id),await e.setItem(hd,b.id))};za(()=>{const b=i.getValue();b?e.setItem(dd,it(b)):e.removeItem(dd)},[i],!1),za(async()=>{const j=l.getValue().map(C=>C==null?void 0:C.id).filter(C=>!!C);e.setItem(oy,it(Array.from(new Set([...j]))))},[l],!1);const x=async b=>{const j=n.getValue();if(!j)throw new Error("No active wallet found");if(!j.switchChain)throw new Error("Wallet does not support switching chains");if(Ho(j)){const C=await r0(e);if(C){const E=l.getValue().find(T=>T.id===C);if(E){await E.switchChain(b),await j.switchChain(b),p(j);return}}await j.switchChain(b),p(j)}else await j.switchChain(b);i.setValue(j.getChain())};function I(b){const j=o.getValue();if(b.every(T=>{const O=j.get(T.id);return it(O)===it(T)}))return;const E=new Map(j);for(const T of b)E.set(T.id,T);o.setValue(E)}return{activeAccountStore:t,activeWalletChainStore:i,activeWalletConnectionStatusStore:r,activeWalletStore:n,addConnectedWallet:h,connect:w,connectedWallets:l,defineChains:I,disconnectWallet:m,handleConnection:g,isAutoConnecting:c,removeConnectedWallet:d,setActiveWallet:_,switchActiveWalletChain:x}}async function sy(e){try{const n=await e.getItem(oy);return n?JSON.parse(n):[]}catch{return[]}}async function r0(e){try{const n=await e.getItem(ic);if(n)return n}catch{}return null}async function ay(e){try{const n=await e.getItem(dd);if(n)return JSON.parse(n)}catch{}return null}const e6=async(e,n,t,i)=>{const r=e.getAccount();if(!r)throw new Error("Cannot set a wallet without an account as active");const o=x2(t);await o.connect({chain:t.chain,client:n,personalAccount:r});const s=e.subscribe("disconnect",()=>{c()}),c=()=>{s(),i(o)};return o};let Ql;const t6=async e=>{if(Ql&&!e.force&&await Ql)return!0;const n=n6(e);return Ql=n,n},n6=async({storage:e,props:n,createWalletFn:t,manager:i,connectOverride:r,setLastAuthProvider:o})=>{var C,E,T,O,L;const{wallets:s,onConnect:c}=n,l=n.timeout??15e3;let h=!1;i.isAutoConnecting.setValue(!0);let[d,f]=await Promise.all([sy(e),r0(e)]);const m=Gb();if((m==null?void 0:m.authFlow)==="link"&&m.authResult)return await i6({client:n.client,connectOverride:r,createWalletFn:t,manager:i,onConnect:c,props:n,setLastAuthProvider:o,storage:e,timeout:l,urlToken:m,wallets:s});const g=s.find(N=>N.id===(m==null?void 0:m.walletId));if(m!=null&&m.authCookie&&g&&await new Zc({clientId:n.client.clientId,ecosystem:De(g)?{id:g.id,partnerId:(C=g.getConfig())==null?void 0:C.partnerId}:void 0,storage:e}).saveAuthCookie(m.authCookie),m!=null&&m.walletId&&(f=m.walletId,d=d!=null&&d.includes(m.walletId)?d:[m.walletId,...d||[]]),m!=null&&m.authProvider&&await(o==null?void 0:o(m.authProvider,e)),!d)return h;const w=await ay(e)||n.chain,p=d.map(N=>{const v=s.find(D=>D.id===N);return v||t(N)}),_=f&&(p.find(N=>N.id===f)||t(f));if(_){i.activeWalletConnectionStatusStore.setValue("connecting"),await ry(fd({authResult:m==null?void 0:m.authResult,client:n.client,lastConnectedChain:w,wallet:_}),{message:`AutoConnect timeout: ${l}ms limit exceeded.`,ms:l}).catch(N=>{console.warn(N.message),n.onTimeout&&n.onTimeout()});try{await(r?r(_):i.connect(_,{accountAbstraction:n.accountAbstraction,client:n.client}))}catch(N){N instanceof Error&&console.warn("Error auto connecting wallet:",N.message),i.activeWalletConnectionStatusStore.setValue("disconnected")}}else i.activeWalletConnectionStatusStore.setValue("disconnected");const x=p.filter(N=>N.id!==f&&d.includes(N.id));for(const N of x)try{await fd({authResult:m==null?void 0:m.authResult,client:n.client,lastConnectedChain:w,wallet:N}),i.addConnectedWallet(N)}catch{}_&&Zb({connectedWallets:_?[_,...x]:x,wallet:_})&&((E=n.siweAuth)!=null&&E.requiresAuth)&&!((T=n.siweAuth)!=null&&T.isLoggedIn)&&!((O=n.siweAuth)!=null&&O.isLoggingIn)&&await((L=n.siweAuth)==null?void 0:L.doLogin().catch(N=>{console.warn("Error signing in with SIWE:",N.message)})),i.isAutoConnecting.setValue(!1);const b=i.activeWalletStore.getValue(),j=i.connectedWallets.getValue();if(b){h=!0;try{c==null||c(b,j)}catch(N){console.error("Error calling onConnect callback:",N)}}else i.activeWalletConnectionStatusStore.setValue("disconnected");return h};async function i6(e){var j;const{client:n,connectOverride:t,createWalletFn:i,manager:r,onConnect:o,props:s,setLastAuthProvider:c,storage:l,timeout:h,urlToken:d,wallets:f}=e,[m,g]=await Promise.all([sy(l),r0(l)]),w=await ay(l)||s.chain;if(!g||!m)return console.warn("No stored wallet found for linking flow"),r.isAutoConnecting.setValue(!1),!1;d.authProvider&&await(c==null?void 0:c(d.authProvider,l));const p=f.find(C=>C.id===g)||i(g);r.activeWalletConnectionStatusStore.setValue("connecting");try{await ry(fd({authResult:void 0,client:n,lastConnectedChain:w,wallet:p}),{message:`AutoConnect timeout: ${h}ms limit exceeded.`,ms:h}),await(t?t(p):r.connect(p,{accountAbstraction:s.accountAbstraction,client:n}))}catch(C){return console.warn("Failed to auto-connect for linking:",C),r.activeWalletConnectionStatusStore.setValue("disconnected"),r.isAutoConnecting.setValue(!1),!1}const _=De(p)?{id:p.id,partnerId:(j=p.getConfig())==null?void 0:j.partnerId}:void 0,x=new Zc({clientId:n.clientId,ecosystem:_,storage:l});try{await y3({client:n,ecosystem:_,storage:x,tokenToLink:d.authResult.storedToken.cookieString})}catch(C){console.error("Failed to link profile after redirect:",C)}r.isAutoConnecting.setValue(!1);const I=r.activeWalletStore.getValue(),b=r.connectedWallets.getValue();if(I){try{o==null||o(I,b)}catch(C){console.error("Error calling onConnect callback:",C)}return!0}return!1}async function fd(e){return e.wallet.autoConnect({authResult:e.authResult,chain:e.lastConnectedChain,client:e.client})}const o0="lastAuthProvider";async function Ci(e,n){await n.setItem(o0,e)}async function cy(e){return await e.getItem(o0)}function r6(e,n,t){const i=un("useAutoConnect"),{connect:r}=N2({accountAbstraction:n.accountAbstraction,client:n.client});return pe({queryFn:()=>t6({connectOverride:r,createWalletFn:t,manager:i,props:n,setLastAuthProvider:Ci,storage:e}),queryKey:["autoConnect",n.client.clientId],refetchOnMount:!1,refetchOnWindowFocus:!1})}function o6(e){const n=e.wallets||ll(e);return r6(Pt,{...e,wallets:n},Tt)}function ly(e){return o6(e),null}function uy(e){const{height:n,elementRef:t}=s6();return a.jsx("div",{style:{boxSizing:"border-box",height:n?`${n}px`:"auto",overflow:"hidden",transition:"height 210ms ease"},children:a.jsx("div",{ref:t,style:{maxHeight:e.maxHeight},children:e.children})})}function s6(){const e=y.useRef(null),[n,t]=y.useState();return y.useEffect(()=>{const i=e.current;if(!i)return;const r=new ResizeObserver(()=>{t(i.scrollHeight)});return r.observe(i),()=>{r.disconnect()}},[]),{elementRef:e,height:n}}const dy=e=>new Promise(n=>setTimeout(n,e)),U=({y:e})=>a.jsx("div",{style:{height:P[e],flexShrink:0}}),k=FI(e=>({color:X().colors[e.color||"secondaryText"],display:e.inline?"inline":"block",fontSize:ie[e.size||"md"],fontWeight:e.weight||400,lineHeight:e.multiline?1.5:"normal",margin:0,maxWidth:"100%",overflow:"hidden",textAlign:e.center?"center":"left",textOverflow:"ellipsis",textWrap:e.balance?"balance":"inherit",letterSpacing:e.trackingTight?"-0.025em":void 0})),_r=QI(e=>{const n=X();return{all:"unset","&:hover":{color:n.colors[e.hoverColor||"primaryText"],textDecoration:"none"},color:n.colors[e.color||"accentText"],cursor:"pointer",display:e.inline?"inline":"block",fontSize:ie[e.size||"md"],fontWeight:e.weight||500,lineHeight:"normal",textAlign:e.center?"center":"left",textDecoration:"none",transition:"color 0.2s ease"}}),ul=e=>a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e.size,height:e.size,viewBox:"0 0 24 24",role:"presentation",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-mail-icon lucide-mail",style:{color:e.color},children:[a.jsx("path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7"}),a.jsx("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2"})]}),ho=e=>a.jsxs("svg",{"aria-hidden":"true",fill:"none",height:e.size,viewBox:"0 0 36 36",width:e.size,children:[a.jsx("path",{d:"M18.0001 15C17.2045 15 16.4414 15.3161 15.8788 15.8787C15.3162 16.4413 15.0001 17.2044 15.0001 18C15.0001 19.53 14.8501 21.765 14.6101 24",stroke:e.color??"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3"}),a.jsx("path",{d:"M21.0002 19.6801C21.0002 23.2501 21.0002 29.2501 19.5002 33.0001",stroke:e.color??"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3"}),a.jsx("path",{d:"M25.9348 31.53C26.1148 30.63 26.5798 28.08 26.6848 27",stroke:e.color??"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3"}),a.jsx("path",{d:"M2.99976 18C2.99976 14.8518 3.99032 11.7833 5.83112 9.22935C7.67193 6.67536 10.2697 4.76531 13.2563 3.76975C16.243 2.77419 19.4672 2.74359 22.4723 3.6823C25.4773 4.621 28.1108 6.48141 29.9998 9",stroke:e.color??"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3"}),a.jsx("path",{d:"M2.99976 24H3.01628",stroke:e.color??"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3"}),a.jsx("path",{d:"M32.7 24C33 21 32.8965 15.969 32.7 15",stroke:e.color??"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3"}),a.jsx("path",{d:"M7.49976 29.25C8.24976 27 8.99976 22.5 8.99976 18C8.99824 16.9783 9.17071 15.9638 9.50976 15",stroke:e.color??"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3"}),a.jsx("path",{d:"M12.9751 33C13.2901 32.01 13.6501 31.02 13.8301 30",stroke:e.color??"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3"}),a.jsx("path",{d:"M13.5 10.2C14.8686 9.40988 16.4211 8.99401 18.0014 8.99426C19.5818 8.99452 21.1342 9.41088 22.5025 10.2015C23.8708 10.9921 25.0069 12.129 25.7964 13.498C26.5859 14.867 27.001 16.4197 27 18V21",stroke:e.color??"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3"})]}),s0=e=>a.jsxs("svg",{fill:"none",height:e.size,role:"presentation",stroke:e.color??"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"}),a.jsx("circle",{cx:"12",cy:"7",r:"4"})]}),to=e=>a.jsxs("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 24 24",width:e.size,xmlns:"http://www.w3.org/2000/svg",style:e.style,children:[a.jsx("path",{d:"M19 7V4C19 3.73478 18.8946 3.48043 18.7071 3.29289C18.5196 3.10536 18.2652 3 18 3H5C4.46957 3 3.96086 3.21071 3.58579 3.58579C3.21071 3.96086 3 4.46957 3 5C3 5.53043 3.21071 6.03914 3.58579 6.41421C3.96086 6.78929 4.46957 7 5 7H20C20.2652 7 20.5196 7.10536 20.7071 7.29289C20.8946 7.48043 21 7.73478 21 8V12M21 12H18C17.4696 12 16.9609 12.2107 16.5858 12.5858C16.2107 12.9609 16 13.4696 16 14C16 14.5304 16.2107 15.0391 16.5858 15.4142C16.9609 15.7893 17.4696 16 18 16H21C21.2652 16 21.5196 15.8946 21.7071 15.7071C21.8946 15.5196 22 15.2652 22 15V13C22 12.7348 21.8946 12.4804 21.7071 12.2929C21.5196 12.1054 21.2652 12 21 12Z",stroke:e.color??"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),a.jsx("path",{d:"M3 5V19C3 19.5304 3.21071 20.0391 3.58579 20.4142C3.96086 20.7893 4.46957 21 5 21H20C20.2652 21 20.5196 20.8946 20.7071 20.7071C20.8946 20.5196 21 20.2652 21 20V16",stroke:e.color??"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})]}),dl=e=>{const n=y.useId();return a.jsxs("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 16 16",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("g",{clipPath:`url(#${n})`,children:a.jsx("path",{d:"M14.6669 11.2802V13.2802C14.6677 13.4659 14.6297 13.6497 14.5553 13.8198C14.4809 13.9899 14.3718 14.1426 14.235 14.2681C14.0982 14.3937 13.9367 14.4892 13.7608 14.5487C13.5849 14.6082 13.3985 14.6303 13.2136 14.6136C11.1622 14.3907 9.19161 13.6897 7.46028 12.5669C5.8495 11.5433 4.48384 10.1777 3.46028 8.56689C2.3336 6.8277 1.63244 4.84756 1.41361 2.78689C1.39695 2.60254 1.41886 2.41673 1.47795 2.24131C1.53703 2.06589 1.63199 1.90469 1.75679 1.76797C1.88159 1.63126 2.03348 1.52203 2.20281 1.44724C2.37213 1.37245 2.55517 1.33374 2.74028 1.33356H4.74028C5.06382 1.33038 5.37748 1.44495 5.62279 1.65592C5.8681 1.86689 6.02833 2.15986 6.07361 2.48023C6.15803 3.12027 6.31458 3.74871 6.54028 4.35356C6.62998 4.59218 6.64939 4.8515 6.59622 5.10081C6.54305 5.35012 6.41952 5.57897 6.24028 5.76023L5.39361 6.60689C6.34265 8.27592 7.72458 9.65786 9.39361 10.6069L10.2403 9.76023C10.4215 9.58099 10.6504 9.45746 10.8997 9.40429C11.149 9.35112 11.4083 9.37053 11.6469 9.46023C12.2518 9.68593 12.8802 9.84248 13.5203 9.92689C13.8441 9.97258 14.1399 10.1357 14.3513 10.3852C14.5627 10.6348 14.6751 10.9533 14.6669 11.2802Z",stroke:e.color??"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.33333"})}),a.jsx("defs",{children:a.jsx("clipPath",{id:n,children:a.jsx("rect",{fill:"white",height:"16",width:"16"})})})]})},ge=e=>a.jsx(c6,{className:e.className||"",color:e.color,style:{height:e.height,width:e.width||"auto",...e.style}}),a6=vt`
|
|
46
|
+
0% {
|
|
47
|
+
opacity: 0.5;
|
|
48
|
+
}
|
|
49
|
+
100% {
|
|
50
|
+
opacity: 1;
|
|
51
|
+
}
|
|
52
|
+
`,c6=Se(e=>{const n=X();return{animation:`${a6} 500ms ease-in-out infinite alternate`,backgroundColor:n.colors[e.color||"skeletonBg"],backgroundSize:"200% 200%",borderRadius:G.sm}}),He=e=>{const[n,t]=y.useState("pending"),i=y.useRef(null),r=e.src,o=`${e.width}px`,s=`${e.height||e.width}px`,l=(()=>{if(r!==void 0)try{return gr({client:e.client,uri:r})}catch{return e.src}})(),h=l===void 0?"pending":l===""?"fallback":n,d=h==="loaded";return y.useEffect(()=>{const f=i.current;if(f)if(f.complete)t("loaded");else{let m=function(){t("loaded")};return f.addEventListener("load",m),()=>{f.removeEventListener("load",m)}}},[]),a.jsxs("div",{style:{alignItems:"center",display:"inline-flex",flexShrink:0,justifyItems:"center",position:"relative"},children:[h==="pending"&&a.jsx(ge,{height:s,width:o,color:e.skeletonColor,style:e.style}),h==="fallback"&&(e.fallback||a.jsx(M,{bg:"tertiaryBg",borderColor:"borderColor",style:{height:s,width:o,borderRadius:G.md,borderWidth:"1px",borderStyle:"solid",...e.style},children:a.jsx("div",{})})),a.jsx("img",{alt:e.alt||"",className:e.className,decoding:"async",draggable:!1,height:e.height,loading:e.loading,onError:f=>{e.fallbackImage&&f.currentTarget.src!==e.fallbackImage?f.currentTarget.src=e.fallbackImage:t("fallback")},onLoad:()=>{t("loaded")},src:l||void 0,style:{height:d?e.height?`${e.height}px`:void 0:0,objectFit:"contain",opacity:d?1:0,transition:"opacity 0.4s ease",userSelect:"none",visibility:d?"visible":"hidden",width:d?e.width?`${e.width}px`:void 0:0,...e.style},width:e.width},l)]})};function Vn(e){const n=X(),[t,i]=y.useState(void 0),r=ut();return y.useEffect(()=>{async function o(){var h;const s=Pt,c=e.id;let l;if(c==="inApp"&&r&&(r.id==="inApp"||r.id==="smart")){const d=await cy(s);l=d?{authProvider:d,uri:e2(d)}:{authProvider:"wallet",uri:""}}else{const d=(h=Ii().find(f=>f.info.rdns===c))==null?void 0:h.info.icon;d?l={uri:d}:l={uri:await ga(c,!0)}}i(l)}o()},[e.id,r]),(t==null?void 0:t.authProvider)==="email"?a.jsx(ul,{color:n.colors.accentText,size:e.size}):(t==null?void 0:t.authProvider)==="phone"?a.jsx(dl,{color:n.colors.accentText,size:e.size}):(t==null?void 0:t.authProvider)==="passkey"?a.jsx(ho,{color:n.colors.accentText,size:e.size}):(t==null?void 0:t.authProvider)==="wallet"?a.jsx(to,{color:n.colors.accentText,size:e.size}):(t==null?void 0:t.authProvider)==="guest"?a.jsx(s0,{color:n.colors.accentText,size:e.size}):t!=null&&t.uri?a.jsx(He,{client:e.client,height:e.size,loading:"eager",src:t.uri,style:{borderRadius:G.md,...e.style},width:e.size}):a.jsx(l6,{client:e.client,id:e.id,size:e.size})}function l6(e){const n=DI(e.id);return n.isFetched&&!n.data?a.jsx(He,{client:e.client,height:e.size,src:X4,width:e.size}):a.jsx(to,{size:e.size})}function hl(e){const{termsOfServiceUrl:n,privacyPolicyUrl:t,locale:i,requireApproval:r}=e;if(!n&&!t&&!r)return null;const o=n&&t;return a.jsx(M,{center:"x",flex:"row",children:a.jsxs(k,{balance:!0,center:!0,inline:!0,multiline:!0,size:"xs",style:{maxWidth:"250px"},children:[r&&a.jsx("input",{checked:e.isApproved,disabled:!r,onChange:e.onApprove,style:{marginRight:P["3xs"],transform:"translateY(3px)"},type:"checkbox"}),i.prefix," ",n&&a.jsxs(_r,{href:n,inline:!0,size:"xs",style:{whiteSpace:"nowrap"},target:"_blank",children:[" ",i.termsOfService," "]}),o&&`${i.and} `,t&&a.jsx(_r,{href:t,inline:!0,size:"xs",target:"_blank",children:i.privacyPolicy}),!t&&!n&&a.jsx(k,{inline:!0,size:"xs",children:"Terms of Service and Privacy Policy"})]})})}function fl(e){return a.jsx(m6,{"data-error":e.error,children:a.jsx("div",{"data-container":!0,style:{alignItems:"center",display:"flex",justifyContent:"center",position:"relative"},children:a.jsxs("div",{"data-img-container":!0,children:[!e.hideSpinner&&a.jsx("svg",{role:"presentation",style:{display:e.error?"none":"block"},viewBox:"0 0 110 110",children:a.jsx("rect",{fill:"none",height:"106",rx:20,strokeDasharray:"132 261",strokeDashoffset:-388,strokeLinecap:"round",strokeWidth:4,width:"106",x:"2",y:"2"})}),a.jsx(u6,{children:a.jsx(Vn,{client:e.client,id:e.id,size:"68"})})]})})})}const u6=Se(()=>{const e=X();return{alignItems:"center",background:e.colors.tertiaryBg,border:`1px solid ${e.colors.borderColor}`,borderRadius:"13px",display:"flex",justifyContent:"center",padding:P.xs}}),d6=vt`
|
|
53
|
+
from {
|
|
54
|
+
stroke-dashoffset: 0px;
|
|
55
|
+
}
|
|
56
|
+
`,h6=vt`
|
|
57
|
+
0% {
|
|
58
|
+
transform: translateX(0);
|
|
59
|
+
}
|
|
60
|
+
25% {
|
|
61
|
+
transform: translateX(-5px);
|
|
62
|
+
}
|
|
63
|
+
50% {
|
|
64
|
+
transform: translateX(5px);
|
|
65
|
+
}
|
|
66
|
+
75% {
|
|
67
|
+
transform: translateX(-5px);
|
|
68
|
+
}
|
|
69
|
+
100% {
|
|
70
|
+
transform: translateX(0);
|
|
71
|
+
}
|
|
72
|
+
`,f6=vt`
|
|
73
|
+
0% {
|
|
74
|
+
transform: scale(0.95);
|
|
75
|
+
}
|
|
76
|
+
100% {
|
|
77
|
+
opacity: 0;
|
|
78
|
+
transform: scale(1.3);
|
|
79
|
+
}
|
|
80
|
+
`,m6=Se(e=>{const n=X();return{"[data-img-container]":{alignItems:"center",display:"flex",justifyContent:"center",position:"relative"},"&[data-error='true'] [data-container]":{animation:`${h6} 0.25s linear`},"&[data-error='true'] [data-img-container]::before":{animation:`${f6} 1.5s ease infinite`,background:n.colors.danger,borderRadius:"20px",content:'""',inset:0,position:"absolute",zIndex:-1},borderRadius:G.xl,display:"flex",img:{zIndex:100},justifyContent:"center",position:"relative",rect:{animation:`${d6} 1.2s linear infinite`,stroke:n.colors.accentText},svg:{animation:`${lo} 400ms ease`,height:"calc(100% + 16px)",left:"-8px",position:"absolute",top:"-8px",width:"calc(100% + 16px)"}}}),hy=e=>{const{onDone:n,modalSize:t,onClose:i,termsOfServiceUrl:r,privacyPolicyUrl:o,connectLocale:s}=e,c=ut(),l=rl(),h=yt(),d=Qh(c,h,e.auth),[f,m]=y.useState(void 0),[g,w]=y.useState(f?"failed":"idle"),{disconnect:p}=ol(),_=s.signatureScreen,x=y.useCallback(async()=>{try{m(void 0),w("signing"),await d.doLogin(),n==null||n()}catch(b){await dy(1e3),m(b.message),w("failed")}},[n,d]);if(!c||d.isPending)return a.jsx(ct,{"data-testid":"loading-screen"});if(H1(c.id)||c.id==="smart"&&l&&H1(l.id))return a.jsx(g6,{connectLocale:s,error:f,signIn:x,status:g,wallet:c});const I=()=>{x()};return a.jsxs(M,{animate:"fadein",flex:"column",fullHeight:!0,children:[a.jsx(M,{p:"lg",style:{paddingBottom:0},children:a.jsx(_e,{title:_.instructionScreen.title})}),a.jsx(M,{center:"y",expand:!0,flex:"column",px:t==="compact"?"lg":"xxl",style:{paddingBottom:P.xl,paddingTop:0},children:g==="idle"?a.jsxs(a.Fragment,{children:[a.jsx(M,{animate:"fadein",center:"x",flex:"row",py:"3xl",children:a.jsx(p6,{children:a.jsx(Vn,{client:e.client,id:c.id,size:"80"})})}),a.jsx(k,{balance:!0,center:!0,multiline:!0,children:_.instructionScreen.instruction}),a.jsx(U,{y:"lg"}),a.jsx(ae,{"data-testid":"sign-in-button",fullWidth:!0,onClick:x,style:{alignItems:"center",padding:P.md},variant:"accent",children:s.signatureScreen.instructionScreen.signInButton}),a.jsx(U,{y:"sm"}),a.jsx(ae,{"data-testid":"disconnect-button",fullWidth:!0,onClick:()=>{i==null||i(),p(c)},style:{alignItems:"center",padding:P.md},variant:"secondary",children:s.signatureScreen.instructionScreen.disconnectWallet})]}):a.jsxs(a.Fragment,{children:[a.jsx(M,{py:"3xl",children:a.jsx(fl,{client:e.client,error:g==="failed",id:c.id})}),a.jsxs(M,{animate:"fadein",flex:"column",gap:"md",children:[a.jsxs(k,{center:!0,color:"primaryText",size:"lg",className:"tw-screen-title",children:[g==="failed"?f||_.signingScreen.failedToSignIn:_.signingScreen.inProgress," "]}),g==="signing"&&a.jsx(k,{balance:!0,center:!0,multiline:!0,className:"tw-screen-description",children:s.signatureScreen.signingScreen.prompt}),g==="failed"&&a.jsxs(M,{children:[a.jsx(U,{y:"sm"}),a.jsxs(ae,{fullWidth:!0,onClick:I,style:{alignItems:"center",gap:P.xs,padding:P.md},variant:"accent",children:[a.jsx(pa,{height:A.sm,width:A.sm}),_.signingScreen.tryAgain]}),a.jsx(U,{y:"sm"}),a.jsx(ae,{fullWidth:!0,onClick:()=>{p(c)},style:{alignItems:"center",padding:P.md},variant:"secondary",children:_.instructionScreen.disconnectWallet})]})]},g)]})}),(r||o)&&a.jsx(M,{animate:"fadein",p:"md",children:a.jsx(hl,{locale:s.agreement,privacyPolicyUrl:o,termsOfServiceUrl:r})})]})};function H1(e){return e==="inApp"||e==="embedded"||e.startsWith("ecosystem")}function g6({signIn:e,error:n,status:t,connectLocale:i,wallet:r}){const o=i.signatureScreen,s=y.useRef(!1),{disconnect:c}=ol();return y.useEffect(()=>{s.current||(s.current=!0,e())},[e]),a.jsxs(M,{animate:"fadein",flex:"column",fullHeight:!0,p:"lg",children:[a.jsx(_e,{title:o.signingScreen.title}),a.jsxs(M,{center:"both",expand:!0,flex:"row",style:{minHeight:"250px"},children:[t==="signing"&&a.jsx(ke,{color:"accentText",size:"xl"}),t==="failed"&&a.jsxs(M,{children:[a.jsx(U,{y:"lg"}),a.jsx(k,{center:!0,color:"danger",size:"lg",children:n||o.signingScreen.failedToSignIn}),a.jsx(U,{y:"lg"}),a.jsxs(ae,{fullWidth:!0,onClick:()=>{e()},style:{alignItems:"center",gap:P.xs,padding:P.md},variant:"accent",children:[a.jsx(pa,{height:A.sm,width:A.sm}),o.signingScreen.tryAgain]}),a.jsx(U,{y:"sm"}),a.jsx(ae,{"data-testid":"disconnect-button",fullWidth:!0,onClick:()=>{c(r)},style:{alignItems:"center",padding:P.md},variant:"secondary",children:o.instructionScreen.disconnectWallet})]})]})]})}const y6=vt`
|
|
81
|
+
0% {
|
|
82
|
+
transform: scale(0.9);
|
|
83
|
+
}
|
|
84
|
+
100% {
|
|
85
|
+
opacity: 0;
|
|
86
|
+
transform: scale(1.4);
|
|
87
|
+
}
|
|
88
|
+
`,p6=Se(e=>{const n=X();return{"&::before":{animation:`${y6} 2s cubic-bezier(0.175, 0.885, 0.32, 1.1) infinite`,background:n.colors.accentText,borderRadius:G.xl,bottom:0,content:'""',display:"block",left:0,position:"absolute",right:0,top:0,zIndex:-1},position:"relative"}}),w6=e=>a.jsx("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 129 131",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M59.7178 0C62.7511 0 65.788 0 68.8212 0C71.4429 0.423181 74.1011 0.679982 76.6755 1.29848C103.785 7.78725 120.277 24.7723 126.755 51.5485C127.428 54.3335 127.712 57.2089 128.175 60.0446V69.8103C127.803 72.1722 127.472 74.5449 127.057 76.8995C122.582 102.298 103.177 122.722 77.9136 128.56C74.8003 129.28 71.6104 129.67 68.457 130.213H59.3537C57.3838 129.913 55.4065 129.663 53.4475 129.305C27.0442 124.491 6.91125 104.974 1.44197 78.8526C0.841148 75.9808 0.473373 73.0656 0 70.1684C0 66.9132 0 63.6579 0 60.4027C0.371416 58.0408 0.706418 55.6718 1.11425 53.3135C5.52026 28.0493 24.9905 7.50151 50.0902 1.70719C53.2618 0.97657 56.5062 0.560624 59.7178 0ZM96.8813 10.3119C96.8959 10.2865 96.9104 10.2576 96.9286 10.2323C96.8886 10.2504 96.8522 10.2648 96.8121 10.2829C96.8085 10.2287 96.8048 10.178 96.8012 10.1238C96.8303 10.1853 96.8558 10.2504 96.8849 10.3119H96.8813ZM25.1762 115.709C25.2089 115.716 25.2454 115.72 25.2781 115.727C25.249 115.749 25.2235 115.771 25.1944 115.792C25.2053 115.767 25.2162 115.742 25.2271 115.716C25.1252 115.525 25.0196 115.333 24.9176 115.141C22.7328 113.087 21.127 110.421 18.3305 109.014C18.2977 109.032 18.2613 109.05 18.2285 109.065C18.2758 109.058 18.3232 109.054 18.3705 109.047C18.4397 109.365 18.3997 109.795 18.5926 109.984C20.3587 111.687 22.1502 113.362 23.9745 115.004C24.1675 115.177 24.5972 115.083 24.9176 115.116C25.0014 115.311 25.0851 115.51 25.1725 115.706L25.1762 115.709ZM27.594 12.4567L27.2262 12.9197C27.1898 13.1439 27.1571 13.3682 27.1206 13.5924C26.8038 13.5924 26.4871 13.596 26.1703 13.5996C26.0683 13.813 25.9663 14.0264 25.8607 14.2362L25.7661 14.2652L25.8243 14.1856C25.9336 13.9686 26.0428 13.7479 26.1557 13.5309C26.4688 13.5418 26.7856 13.5526 27.0988 13.5671C27.1243 13.332 27.1498 13.0969 27.1753 12.8618C27.2954 12.7352 27.412 12.6122 27.5321 12.4856C27.543 12.511 27.554 12.5399 27.5649 12.5652C27.5758 12.529 27.5831 12.4893 27.594 12.4531V12.4567ZM106.589 111.926C106.738 111.868 106.891 111.806 107.041 111.749C107.616 111.354 108.286 111.043 108.756 110.548C110.281 108.924 111.771 107.26 113.205 105.553C113.919 104.703 114.483 103.726 115.113 102.808C113.981 103.448 112.849 104.084 111.716 104.725C111.669 104.753 111.632 104.811 111.6 104.862C110.088 107.166 108.577 109.474 107.07 111.778L106.556 111.958L106.625 112.06L106.589 111.926ZM79.6906 2.95141C79.6906 2.92971 79.6906 2.90801 79.6906 2.88631C79.6724 2.89716 79.6505 2.91163 79.6323 2.92248C79.8253 2.9478 80.0146 2.97311 80.2076 2.99843C80.0328 2.98397 79.8617 2.96588 79.6869 2.95141H79.6906ZM95.1662 8.90488C95.1116 8.90488 95.0533 8.89764 94.9987 8.90849C94.9732 8.91211 94.955 8.94828 94.9368 8.96998C95.0242 8.93381 95.1116 8.89764 95.199 8.86147C95.301 9.07125 95.3956 9.28827 95.5194 9.49082C95.5376 9.51975 95.6796 9.47273 95.7634 9.45827C95.5668 9.2738 95.3665 9.08934 95.1699 8.90126L95.1662 8.90488ZM86.7729 124.603C85.8772 124.921 84.9778 125.229 84.0893 125.565C83.94 125.623 83.8417 125.811 83.7215 125.941C83.8562 125.988 84.031 126.111 84.1184 126.068C85.0069 125.605 85.8808 125.117 86.7584 124.636C86.8021 124.621 86.8494 124.592 86.8895 124.596C86.9259 124.6 86.9623 124.643 86.9951 124.665C86.9186 124.643 86.8458 124.621 86.7693 124.603H86.7729ZM82.2431 4.35478L82.2941 4.31138V4.32223C82.5672 4.5935 82.793 5.00583 83.1207 5.11072C85.8189 5.99325 88.5317 6.82153 91.2445 7.6498C91.4193 7.70406 91.6341 7.64257 91.8271 7.63172C91.6596 7.46896 91.514 7.25917 91.3173 7.14705C88.4844 5.599 85.4912 4.56456 82.2395 4.35116L82.2431 4.35478ZM29.9609 10.9991C30.2995 11.0135 30.6928 11.1438 30.9732 11.0208C33.8389 9.75847 36.6937 8.46361 39.5376 7.15428C39.9054 6.98429 40.2331 6.70217 40.5244 6.41643C40.7319 6.21388 40.8412 5.91729 40.9941 5.66049C40.6664 5.68943 40.2913 5.62432 40.0219 5.76177C36.6573 7.49066 33.3109 9.2521 29.9609 11.0027C29.9864 11.0461 30.0119 11.0895 30.041 11.1293C30.0701 11.1655 30.1102 11.1944 30.1466 11.2233L29.9609 10.9991ZM8.93219 95.5918C8.89213 95.628 8.84844 95.6677 8.80838 95.7039C8.85208 95.6641 8.89942 95.6243 8.94311 95.5845C8.99773 96.0801 8.91398 96.6443 9.12882 97.0566C11.7397 102.034 14.7984 106.641 19.9509 109.43C19.9436 109.437 19.9363 109.445 19.9327 109.455C19.7579 108.913 19.6413 108.345 19.401 107.828C18.4943 105.875 17.6204 103.903 16.5899 102.015C16.1347 101.18 15.4283 100.417 14.6746 99.82C12.8102 98.3479 10.8512 96.9915 8.93219 95.5918ZM23.0533 112.295C23.097 112.248 23.1407 112.201 23.1844 112.15C23.1443 112.19 23.1006 112.23 23.0606 112.269C23.279 112.472 23.5449 112.646 23.7087 112.888C27.1206 117.861 32.1275 120.35 37.7861 121.818C38.1648 121.916 38.5763 121.887 38.9732 121.919C38.813 121.608 38.6709 121.283 38.4925 120.983C37.7861 119.789 37.1525 118.541 36.3259 117.434C35.8344 116.776 35.1206 116.125 34.3669 115.843C31.1917 114.657 27.9691 113.597 24.7501 112.53C24.2149 112.353 23.6177 112.367 23.0496 112.291L23.0533 112.295ZM69.8298 86.3252C73.0378 86.3252 75.4666 86.2927 77.8917 86.3397C78.9514 86.3614 79.4029 86.025 79.4284 84.9074C79.5049 81.4134 79.6432 77.9195 79.818 74.4291C79.8763 73.25 79.4757 72.9353 78.2777 72.8919C71.4903 72.6605 64.7065 72.353 57.9227 71.9986C56.8048 71.9407 56.2804 72.1107 56.204 73.3477C55.9855 76.8344 55.7015 80.3211 55.341 83.797C55.2135 85.0267 55.665 85.3595 56.8048 85.4282C61.4074 85.7067 66.0028 86.0539 69.8262 86.3216L69.8298 86.3252ZM69.9245 72.2192C72.2076 72.2192 74.9969 72.1505 77.7789 72.2481C79.2937 72.3024 79.9527 71.9371 79.869 70.2697C79.7015 66.9638 79.6796 63.6507 79.7088 60.3412C79.7197 58.8836 79.2536 58.4315 77.7315 58.3881C71.6177 58.2217 65.5076 57.9251 59.4011 57.5779C58.1994 57.5092 57.828 57.8274 57.7224 58.9776C57.3838 62.6307 56.9832 66.2838 56.528 69.9261C56.3897 71.0401 56.8776 71.2571 57.8171 71.3222C61.6842 71.5862 65.5513 71.8937 69.9281 72.2228L69.9245 72.2192ZM55.3956 74.3749C55.4247 74.0892 55.432 73.5394 55.5412 73.0149C55.7415 72.0564 55.2936 71.7852 54.4088 71.6333C47.8471 70.5048 41.2927 69.3401 34.742 68.1429C33.9481 67.9982 33.4748 68.0019 33.3655 68.9459C32.9249 72.6496 32.4115 76.3461 32.0401 80.0571C32 80.473 32.6118 81.2905 33.0269 81.3664C39.7488 82.6396 46.4852 83.8151 53.2181 85.0267C54.2267 85.2076 54.6091 84.8531 54.671 83.8115C54.853 80.7479 55.1334 77.688 55.3956 74.3749ZM54.143 71.2065C55.4757 71.3511 55.7634 70.7073 55.8726 69.5788C56.2222 65.9294 56.6264 62.2835 57.0888 58.6449C57.2272 57.5489 56.7429 57.3645 55.8253 57.2089C49.8644 56.1926 43.9108 55.1437 37.9718 54.0297C37.0178 53.8488 36.6464 54.0731 36.4461 54.9484C35.6122 58.5798 34.7638 62.2075 33.9008 65.8317C33.6823 66.754 33.8753 67.2966 34.9131 67.4955C41.3255 68.7144 47.7342 69.9659 54.1466 71.2101L54.143 71.2065ZM68.519 99.3606C71.5449 99.3606 73.97 99.3172 76.3915 99.3787C77.564 99.4077 78.1612 99.0894 78.2595 97.8198C78.5035 94.702 78.8203 91.5879 79.1808 88.4809C79.3119 87.3524 78.9514 87.0558 77.8262 87.0161C70.8093 86.7629 63.7925 86.4554 56.7793 86.0901C55.6286 86.0286 55.1334 86.2565 55.0897 87.4646C54.9805 90.5896 54.813 93.7146 54.5981 96.836C54.518 97.9753 54.8676 98.4094 56.0656 98.4781C60.417 98.7277 64.7611 99.0857 68.5153 99.3606H68.519ZM80.5244 79.623H80.4261C80.3278 81.3664 80.2659 83.1134 80.1202 84.8531C80.0365 85.8442 80.3023 86.318 81.3947 86.2095C87.7816 85.5621 94.1721 84.9616 100.555 84.2636C101.007 84.2129 101.728 83.4968 101.739 83.0772C101.826 79.3482 101.779 75.6155 101.772 71.8864C101.772 71.1486 101.488 70.852 100.654 70.9388C94.3287 71.5935 88.0001 72.2083 81.6678 72.8015C80.8339 72.8811 80.4989 73.1849 80.5171 74.0277C80.5572 75.894 80.5281 77.7603 80.5281 79.6267L80.5244 79.623ZM80.3788 65.1156C80.437 65.1156 80.4953 65.1156 80.5536 65.1156C80.5536 66.9819 80.5936 68.8518 80.5353 70.7182C80.5062 71.6911 80.7393 72.2011 81.8389 72.089C88.0474 71.4633 94.2559 70.852 100.468 70.2624C101.418 70.172 101.699 69.7271 101.579 68.8374C101.058 65.0794 100.559 61.3178 100.057 57.5598C99.9473 56.7424 99.5795 56.5217 98.7056 56.6158C93.0433 57.2234 87.3738 57.7768 81.7006 58.2868C80.7138 58.3772 80.3096 58.6557 80.3533 59.6938C80.4297 61.4986 80.3751 63.3071 80.3751 65.1119L80.3788 65.1156ZM54.1393 91.8881C54.1393 91.8881 54.1466 91.8881 54.1503 91.8881C54.2413 90.2677 54.2959 88.6401 54.4416 87.0233C54.518 86.1805 54.2304 85.8767 53.3892 85.7357C46.6527 84.5819 39.9199 83.4027 33.198 82.173C32.1675 81.9849 31.7342 82.173 31.7379 83.2581C31.7451 86.5639 31.6687 89.8734 31.7379 93.1793C31.7488 93.6386 32.3496 94.4054 32.7829 94.485C39.3774 95.7365 45.99 96.8939 52.599 98.0802C53.5385 98.2502 53.9026 97.8777 53.9136 96.93C53.9391 95.2482 54.0592 93.5663 54.1393 91.8844V91.8881ZM70.1758 44.2893C66.5199 44.018 63.8508 43.8878 61.2035 43.5912C60.0929 43.4682 59.7106 43.7395 59.5831 44.8391C59.1717 48.3656 58.7019 51.8884 58.1594 55.3969C57.9773 56.5724 58.4033 56.8653 59.4702 56.9087C65.6423 57.1619 71.8144 57.4404 77.9864 57.7406C79.2063 57.8021 79.5631 57.3211 79.4612 56.1492C79.1516 52.6118 78.8822 49.0709 78.6819 45.5263C78.62 44.4412 78.1102 44.264 77.1817 44.2784C74.5162 44.3182 71.8508 44.2929 70.1758 44.2929V44.2893ZM82.6983 99.3715C87.9782 98.7168 93.2582 98.0513 98.5417 97.4147C99.4084 97.3098 100.006 97.0747 100.14 96.0728C100.585 92.7995 101.091 89.5334 101.579 86.2637C101.728 85.2655 101.458 84.9182 100.319 85.0412C94.0665 85.714 87.8107 86.3397 81.544 86.8678C80.2695 86.9763 79.9163 87.4428 79.8471 88.593C79.7088 90.8717 79.5085 93.1504 79.2427 95.4182C78.7912 99.2919 78.762 99.2883 82.6983 99.3715ZM58.9495 44.0035C58.9714 43.4682 58.9714 43.4755 57.6423 43.2368C52.6427 42.3398 47.6396 41.4681 42.6509 40.5168C41.6823 40.3324 41.2308 40.553 40.9213 41.4789C39.7633 44.9584 38.5617 48.4234 37.3309 51.8776C37.0105 52.7782 37.1999 53.2159 38.1539 53.3822C44.1694 54.4311 50.1776 55.5162 56.204 56.5109C56.5499 56.5688 57.3146 56.019 57.3692 55.6754C57.9372 51.9318 58.4033 48.1739 58.9532 44.0035H58.9495ZM83.798 57.7225C88.5499 57.1619 93.3019 56.6122 98.0538 56.0371C98.8767 55.9358 99.8308 55.9539 99.4484 54.5903C98.4289 50.9372 97.4603 47.2696 96.488 43.6057C96.2732 42.7919 95.8071 42.6472 95.0097 42.734C90.2541 43.2476 85.4948 43.7504 80.7283 44.1518C79.6177 44.2459 79.2572 44.5497 79.3738 45.6637C79.6651 48.4777 79.8981 51.2989 80.0693 54.1237C80.2841 57.6647 80.2477 57.6683 83.798 57.7189V57.7225ZM32.6154 68.0344C32.437 67.9259 31.9673 67.5244 31.4283 67.3255C26.538 65.546 21.6222 63.8279 16.7392 62.0231C15.8835 61.7084 15.421 61.571 15.2535 62.6669C14.711 66.2404 14.092 69.7995 13.5895 73.3766C13.5239 73.8396 13.8443 74.7004 14.1939 74.8306C19.5175 76.8344 24.8667 78.7622 30.2376 80.643C30.467 80.7226 31.188 80.2162 31.2244 79.9233C31.7124 76.1617 32.1202 72.3856 32.6154 68.0308V68.0344ZM32.6919 66.8951C32.8485 66.5189 33.0851 66.1174 33.1907 65.687C34.0574 62.0629 34.8439 58.417 35.7797 54.8073C36.0565 53.7403 35.6705 53.5052 34.7893 53.1978C30.2813 51.6389 25.777 50.0547 21.3164 48.3692C20.3223 47.993 19.9181 48.116 19.594 49.0781C18.4324 52.554 17.249 56.0262 16.0364 59.4876C15.6759 60.5148 16.0328 61.0465 17.005 61.3901C21.9026 63.1226 26.7893 64.8768 31.6832 66.6202C31.909 66.6998 32.1493 66.7468 32.6955 66.8915L32.6919 66.8951ZM67.1207 110.645C69.8116 110.645 72.2404 110.598 74.6619 110.667C75.7324 110.696 76.1767 110.298 76.3405 109.282C76.7738 106.605 77.2363 103.936 77.7679 101.278C77.9828 100.207 77.5203 100.098 76.6282 100.062C69.7242 99.7874 62.8239 99.4836 55.9236 99.1364C54.9259 99.0857 54.5035 99.2774 54.5071 100.359C54.5144 102.949 54.467 105.538 54.3287 108.124C54.2595 109.383 54.7292 109.817 55.9527 109.886C59.7652 110.099 63.574 110.396 67.1207 110.642V110.645ZM53.615 104.106C53.6769 104.106 53.7351 104.106 53.797 104.106C53.797 102.844 53.7351 101.578 53.8153 100.319C53.8772 99.3642 53.6113 98.9483 52.5918 98.7783C46.0264 97.6679 39.472 96.5141 32.9249 95.306C31.8871 95.1143 31.7706 95.4471 31.8835 96.2935C32.2658 99.093 32.6518 101.892 32.9759 104.699C33.0924 105.712 33.6059 106.15 34.5672 106.32C40.4698 107.358 46.3651 108.407 52.2604 109.488C53.3637 109.691 53.655 109.257 53.6223 108.258C53.5786 106.877 53.6113 105.491 53.6113 104.106H53.615ZM30.9586 87.8552C30.9805 87.8552 31.0059 87.8552 31.0278 87.8552C31.0278 86.2927 30.9513 84.7229 31.0533 83.164C31.1225 82.0717 30.7583 81.6304 29.6951 81.2688C24.6627 79.5543 19.6596 77.7495 14.6746 75.9085C13.7351 75.5612 13.3309 75.5793 13.3673 76.6716C13.4766 80.0354 13.5166 83.4027 13.7169 86.7629C13.7497 87.3199 14.3359 88.1337 14.8566 88.329C19.8307 90.2026 24.8448 91.964 29.8444 93.7761C30.7474 94.1052 31.0096 93.8267 30.9768 92.908C30.9186 91.2262 30.9622 89.5407 30.9622 87.8552H30.9586ZM40.6009 40.2564C40.1785 40.0719 39.7524 39.8622 39.3118 39.703C35.554 38.343 31.7706 37.0518 28.0492 35.5978C27.0587 35.2108 26.6436 35.417 26.2103 36.2308C24.477 39.4752 22.7547 42.7268 20.9595 45.935C20.3769 46.9803 20.701 47.4396 21.7023 47.7941C26.152 49.3674 30.6054 50.9372 35.0369 52.5684C36.0783 52.9518 36.3915 52.5467 36.6901 51.6497C37.848 48.1594 39.0715 44.6944 40.2695 41.2185C40.3496 40.9906 40.4261 40.7628 40.6045 40.26L40.6009 40.2564ZM117.997 64.3632C117.018 60.4172 116.082 56.5688 115.062 52.742C115.004 52.5214 114.236 52.2791 113.897 52.3767C109.786 53.5776 105.69 54.8218 101.611 56.1275C101.233 56.2505 100.734 56.9124 100.774 57.2704C101.225 61.1478 101.753 65.0179 102.332 68.8772C102.383 69.2063 103.039 69.7633 103.257 69.6982C107.882 68.331 112.488 66.9023 117.083 65.4302C117.422 65.3217 117.63 64.8045 117.994 64.3632H117.997ZM81.0087 110.443C81.016 110.501 81.0269 110.555 81.0342 110.613C85.666 110.034 90.3014 109.484 94.9222 108.848C95.4903 108.768 96.3205 108.367 96.4807 107.918C97.5513 104.978 98.4762 101.983 99.4339 99.0025C99.6523 98.3262 99.4776 98.0296 98.651 98.1164C92.3187 98.7602 85.9828 99.3425 79.6541 100.015C79.2463 100.059 78.6601 100.641 78.5654 101.061C78.1539 102.88 77.8808 104.732 77.5859 106.576C77.3783 107.86 77.2181 109.155 77.036 110.443H81.0051H81.0087ZM102.518 77.131C102.518 77.131 102.529 77.131 102.533 77.131C102.533 78.9973 102.54 80.86 102.529 82.7264C102.525 83.3485 102.423 84.0827 103.414 83.7789C108.148 82.3249 112.878 80.8528 117.582 79.3156C117.946 79.1962 118.354 78.5126 118.351 78.0967C118.311 74.4291 118.172 70.7652 118.081 67.0976C118.059 66.2259 117.852 66.0053 116.89 66.3164C112.524 67.7306 108.133 69.0797 103.72 70.3456C102.682 70.6422 102.402 71.022 102.485 72.0745C102.616 73.7492 102.522 75.4419 102.522 77.1237L102.518 77.131ZM70.8895 43.5767C73.1871 43.5767 75.1243 43.537 77.0579 43.5912C78.1102 43.6201 78.4634 43.2512 78.3105 42.2168C77.8226 38.9471 77.3565 35.6774 76.9414 32.3968C76.8285 31.4962 76.4607 31.2069 75.554 31.1815C71.4429 31.0658 67.3319 30.9103 63.2245 30.6933C62.2559 30.6426 61.7861 30.8849 61.6368 31.8651C61.1562 35.0119 60.661 38.1586 60.0893 41.2945C59.8671 42.5134 60.3187 42.8968 61.4657 42.9583C64.7283 43.1391 67.9837 43.3814 70.8858 43.5731L70.8895 43.5767ZM58.3596 42.857C58.7056 42.3723 59.2372 41.9491 59.3319 41.4428C59.9181 38.2454 60.3587 35.0191 60.9559 31.8217C61.1489 30.7873 60.9122 30.4871 59.8781 30.3207C56.051 29.7058 52.2349 29.0078 48.4297 28.2771C47.5048 28.0999 46.9659 28.2771 46.5617 29.1524C45.1489 32.216 43.696 35.2614 42.2212 38.2996C41.7879 39.1894 41.7916 39.6958 42.9532 39.9092C47.9563 40.8351 52.9486 41.8153 58.356 42.857H58.3596ZM101.029 55.8743C105.457 54.3841 109.691 52.9808 113.894 51.4906C114.156 51.3965 114.414 50.5466 114.276 50.2102C112.779 46.6041 111.224 43.0197 109.611 39.4643C109.484 39.1858 108.745 38.9362 108.395 39.0375C104.863 40.0647 101.342 41.1462 97.8426 42.2819C97.5295 42.3832 97.118 43.027 97.1872 43.3091C98.1375 47.096 99.1535 50.8649 100.191 54.6301C100.29 54.9918 100.628 55.2884 101.025 55.8671L101.029 55.8743ZM82.5089 43.5731C86.4816 43.0993 90.4507 42.6183 94.4234 42.1625C95.4648 42.0432 95.9746 41.7611 95.4502 40.5783C94.0374 37.3846 92.7484 34.1329 91.2918 30.9573C91.0843 30.5016 90.1922 30.0603 89.6532 30.1001C86.0301 30.3713 82.4179 30.8235 78.7948 31.1056C77.6951 31.1888 77.4985 31.5432 77.666 32.5451C78.0993 35.1602 78.4379 37.7897 78.8094 40.4119C79.1055 42.5098 80.3375 43.5635 82.5053 43.5731H82.5089ZM118.245 81.8981C117.735 81.3881 119.017 79.8762 117.357 80.3283C112.692 81.6015 108.082 83.0772 103.479 84.5529C103.006 84.7048 102.442 85.345 102.361 85.8297C101.812 89.1537 101.397 92.4993 100.89 95.8305C100.745 96.7818 101.04 97.0675 101.946 96.7854C106.276 95.4399 110.624 94.1486 114.91 92.6838C115.583 92.4523 116.268 91.4866 116.446 90.7451C117.153 87.8226 117.662 84.8531 118.245 81.8981ZM32.1857 105.224C31.7925 101.784 31.4866 98.7313 31.0533 95.6967C30.9914 95.2699 30.3906 94.749 29.9281 94.579C24.9868 92.7778 20.0128 91.0706 15.0751 89.2622C14.0519 88.886 13.8844 89.1247 14.1102 90.0507C14.8494 93.0853 15.574 96.1271 16.3569 99.1545C16.4661 99.5704 16.8157 100.106 17.1834 100.243C21.9317 102.034 26.7019 103.77 31.4793 105.48C31.716 105.564 32.0911 105.26 32.1821 105.224H32.1857ZM65.8244 119.662C67.8854 119.662 69.9464 119.626 72.0037 119.681C72.9832 119.706 73.6023 119.449 73.8717 118.433C74.3815 116.516 74.9313 114.606 75.5358 112.714C75.8599 111.691 75.6341 111.376 74.5126 111.34C68.2786 111.134 62.0447 110.902 55.8143 110.551C54.4743 110.475 54.2704 110.924 54.3432 112.038C54.4634 113.839 54.5435 115.644 54.5472 117.449C54.5472 118.512 54.955 118.928 56.0292 118.99C59.2955 119.171 62.5544 119.435 65.8244 119.666V119.662ZM40.7174 39.2871C40.914 39.023 41.2672 38.6794 41.4639 38.2671C42.9495 35.171 44.3769 32.0496 45.8881 28.968C46.3068 28.1144 46.2558 27.778 45.2727 27.4525C42.3451 26.4831 39.4757 25.351 36.5481 24.3817C36.0783 24.2262 35.1971 24.3926 34.9131 24.7362C32.579 27.5755 30.3505 30.5052 28.0601 33.3842C27.361 34.2632 27.5977 34.737 28.5772 35.0842C32.3387 36.4116 36.0965 37.7571 39.858 39.0954C40.0292 39.1569 40.2112 39.1749 40.7137 39.2871H40.7174ZM53.757 114.577C53.6732 113.26 54.0774 111.492 53.3783 110.75C52.6209 109.947 50.833 110.103 49.493 109.839C49.3146 109.803 49.1361 109.781 48.9577 109.745C44.3259 108.877 39.6796 108.067 35.066 107.112C33.5658 106.801 33.391 107.199 33.828 108.468C34.4943 110.399 35.1243 112.342 35.7215 114.291C36.0201 115.271 36.6282 115.738 37.6368 115.923C41.6787 116.657 45.6987 117.532 49.7552 118.194C53.8881 118.867 53.9026 118.784 53.757 114.573V114.577ZM10.4215 40.8894C10.163 41.3017 9.90442 41.6128 9.75513 41.9672C8.40055 45.1863 7.09696 48.4234 5.71325 51.6316C5.2508 52.7023 5.49113 53.5305 6.34684 54.1816C8.84116 56.0732 11.3755 57.9215 13.888 59.7878C14.8603 60.5076 15.1297 60.0446 15.4392 59.0825C16.5644 55.5886 17.7369 52.1018 19.026 48.6658C19.4047 47.6566 19.0587 47.3709 18.3123 46.8537C15.8908 45.1682 13.5494 43.3634 11.1825 41.5983C10.9458 41.4211 10.7492 41.1968 10.4215 40.8894ZM97.2272 41.9564C100.996 40.6977 104.605 39.5041 108.188 38.2454C108.37 38.1803 108.534 37.3882 108.373 37.1458C106.229 33.8725 104.047 30.6245 101.804 27.4199C101.604 27.1306 100.861 26.9859 100.468 27.1016C97.8572 27.8503 95.2755 28.7112 92.6719 29.4816C91.9618 29.6914 91.6487 29.8433 92.0128 30.6824C93.4803 34.0425 94.8603 37.4424 96.3023 40.817C96.4589 41.1823 96.8157 41.4645 97.2272 41.96V41.9564ZM14.5872 61.3503C14.4961 61.2635 14.1102 60.8331 13.655 60.4931C11.0879 58.5942 8.4661 56.7604 5.94265 54.8001C5.22531 54.2394 4.90852 53.9718 4.71917 55.0677C4.11106 58.5653 3.46655 62.0592 2.93491 65.5677C2.85116 66.1247 3.10242 66.9927 3.51753 67.3255C6.24124 69.5065 9.04507 71.5899 11.8416 73.6804C12.4752 74.1543 12.7519 73.883 12.8575 73.1343C13.3855 69.3763 13.9536 65.6255 14.5872 61.3431V61.3503ZM26.1703 34.8817C25.868 34.661 25.584 34.4621 25.3073 34.2523C23.2353 32.7006 21.1197 31.2069 19.1206 29.5684C18.4288 29.0005 18.1411 29.1488 17.7369 29.7348C15.5885 32.8598 13.4511 35.9957 11.2808 39.1026C10.7346 39.8839 10.9641 40.477 11.6013 40.9653C13.8953 42.7195 16.2185 44.434 18.5198 46.1773C19.4447 46.8754 19.878 46.5933 20.3842 45.595C22.0446 42.3217 23.8289 39.1135 25.5694 35.8799C25.7406 35.5616 25.9372 35.2614 26.1666 34.878L26.1703 34.8817ZM77.6332 119.492C79.7488 119.308 81.8644 119.156 83.9764 118.935C91.5431 118.147 91.7106 118.02 95.0643 111.21C95.1189 111.101 95.1844 110.996 95.2208 110.884C95.3483 110.494 95.4648 110.099 95.585 109.709C95.1699 109.705 94.7511 109.662 94.3396 109.705C89.6387 110.182 84.9414 110.732 80.2331 111.137C76.6865 111.445 76.6828 111.362 75.7106 114.859C75.5649 115.38 75.4193 115.904 75.2627 116.422C74.6194 118.541 75.4096 119.565 77.6332 119.492ZM97.7625 108.812C102.398 107.17 106.669 105.665 110.926 104.131C111.17 104.045 111.396 103.733 111.509 103.477C112.834 100.446 114.141 97.4039 115.427 94.3584C115.529 94.1161 115.448 93.8014 115.452 93.5193C115.172 93.5772 114.884 93.6169 114.611 93.6965C110.267 94.995 105.919 96.279 101.59 97.6281C101.102 97.78 100.493 98.2177 100.341 98.6626C99.3246 101.621 98.4143 104.616 97.4967 107.607C97.4275 107.828 97.5986 108.121 97.7625 108.819V108.812ZM70.5399 30.5052C72.3205 30.5052 73.8353 30.4726 75.3501 30.516C76.3587 30.545 76.6173 30.1326 76.4061 29.2067C75.7834 26.447 75.2445 23.6692 74.5454 20.9312C74.4361 20.4971 73.6933 19.9618 73.2053 19.9257C70.5508 19.7195 67.8817 19.6869 65.2235 19.5206C64.3788 19.4663 64.0219 19.7448 63.869 20.5405C63.3592 23.199 62.8348 25.8574 62.2668 28.505C62.0228 29.6335 62.4379 30.0024 63.5485 30.0494C65.9664 30.1543 68.3842 30.3605 70.5363 30.5052H70.5399ZM60.4862 29.9011C60.8103 29.525 61.371 29.1633 61.4766 28.7003C62.1029 25.937 62.5981 23.1483 63.1917 20.3814C63.3665 19.5712 63.0897 19.3252 62.3287 19.2023C59.8162 18.7936 57.3219 18.28 54.8057 17.911C54.3323 17.8423 53.564 18.0846 53.32 18.4463C51.5176 21.0867 49.828 23.7994 48.0729 26.4723C47.534 27.2933 47.9636 27.4923 48.681 27.6297C52.4898 28.3567 56.295 29.0946 60.4862 29.9011ZM80.2841 30.3677C80.2877 30.4075 80.295 30.4473 80.2987 30.4835C83.2955 30.1182 86.2923 29.7348 89.2928 29.3984C90.2286 29.2935 90.4361 28.9607 89.93 28.1469C88.2186 25.3908 86.5727 22.5913 84.7848 19.8859C84.4898 19.4374 83.5904 19.148 82.9932 19.1806C80.7648 19.3035 78.5472 19.6508 76.3187 19.7846C75.2736 19.8461 75.1498 20.215 75.3647 21.112C75.9109 23.3871 76.366 25.6838 76.8831 27.9661C77.5167 30.762 76.7993 30.4509 79.9236 30.3822C80.0438 30.3822 80.1639 30.3713 80.2841 30.3677ZM12.5553 81.0915C12.5954 81.0915 12.6318 81.0915 12.6718 81.0915C12.6718 79.4639 12.6136 77.8363 12.6937 76.2123C12.741 75.2972 12.3805 74.8668 11.6377 74.364C8.98681 72.5809 6.42331 70.6712 3.8234 68.8084C3.53938 68.6059 3.25171 68.4033 2.96404 68.2008C2.86209 68.5914 2.65453 68.9857 2.67638 69.3691C2.85845 72.6749 3.05508 75.9772 3.31361 79.2794C3.35367 79.775 3.6122 80.4007 3.98362 80.7009C6.61266 82.8023 9.29268 84.8495 11.9763 86.8822C12.6172 87.3669 12.9413 87.1571 12.8794 86.3216C12.7447 84.5782 12.6573 82.8349 12.5517 81.0915H12.5553ZM28.7774 19.0395C28.457 19.2529 28.1293 19.4121 27.878 19.6508C25.1216 22.2622 22.3796 24.8953 19.6231 27.5031C18.9859 28.1035 19.0332 28.6642 19.6814 29.1488C21.6987 30.6679 23.716 32.1907 25.8025 33.6157C26.0829 33.8074 26.9604 33.6049 27.208 33.3011C29.5931 30.3496 31.8835 27.3259 34.2504 24.3564C34.7711 23.7053 34.6728 23.4594 34.0064 23C32.4188 21.9113 30.9222 20.6961 29.3892 19.5278C29.2035 19.3867 29.0287 19.2348 28.7811 19.0359L28.7774 19.0395ZM126.128 57.5272C125.076 53.9971 123.962 50.25 122.808 46.5173C122.786 46.4414 122.159 46.4016 121.977 46.5426C120.098 48.0364 118.223 49.5411 116.421 51.1217C116.071 51.4291 115.783 52.1308 115.874 52.5648C116.65 56.2758 117.502 59.9687 118.402 63.6543C118.471 63.9328 119.203 64.3488 119.381 64.2547C121.799 62.9454 123.995 61.354 125.499 58.9921C125.717 58.6485 125.83 58.2362 126.132 57.5309L126.128 57.5272ZM122.083 44.745C122.028 44.5388 122.017 44.4086 121.963 44.3074C120.091 40.8062 118.223 37.305 116.311 33.8255C116.253 33.7206 115.634 33.7604 115.43 33.9232C113.835 35.1963 112.259 36.4912 110.737 37.8475C110.449 38.1043 110.194 38.759 110.321 39.0664C111.825 42.6761 113.391 46.2605 115.001 49.8232C115.139 50.127 115.929 50.4959 116.057 50.3947C117.965 48.8575 119.822 47.2552 121.661 45.6312C121.905 45.4178 121.966 45.0018 122.087 44.745H122.083ZM17.4238 101.245C17.4529 101.668 17.3874 101.994 17.5075 102.225C18.8038 104.735 20.1002 107.246 21.4657 109.72C21.706 110.157 22.1939 110.573 22.6637 110.75C26.4434 112.193 30.2449 113.586 34.0465 114.964C34.3487 115.073 34.731 114.968 35.077 114.964C34.9932 114.624 34.924 114.277 34.8221 113.94C34.203 111.929 33.4966 109.944 32.9795 107.907C32.721 106.895 32.2404 106.475 31.2499 106.146C27.0041 104.743 22.8057 103.213 18.589 101.722C18.305 101.621 18.0282 101.491 17.4238 101.241V101.245ZM45.7096 14.9271C45.6878 14.9379 45.4402 14.9922 45.2763 15.1405C42.4288 17.6542 39.5849 20.1716 36.7593 22.7035C36.0492 23.34 36.6464 23.6294 37.1707 23.8175C40.0692 24.8628 42.9641 25.9081 45.8881 26.8738C46.2522 26.9931 46.9987 26.7653 47.2026 26.4578C49.0051 23.756 50.7383 21.0035 52.4534 18.2402C52.5918 18.0159 52.5153 17.3613 52.3842 17.3142C50.2395 16.504 48.0692 15.7553 45.7133 14.9271H45.7096ZM119.254 73.0873C119.214 73.0873 119.177 73.0909 119.137 73.0945C119.137 74.5376 119.174 75.9844 119.123 77.4276C119.093 78.3354 119.447 78.5995 120.135 78.0352C122.079 76.4402 124.024 74.8306 125.848 73.1017C126.354 72.6243 126.671 71.6984 126.664 70.9822C126.635 67.557 126.467 64.1317 126.329 60.7065C126.318 60.4461 126.132 60.1893 126.03 59.9325C125.808 60.1025 125.579 60.2689 125.36 60.4461C123.481 61.9435 121.653 63.5133 119.698 64.9058C118.951 65.4375 118.653 65.8896 118.747 66.7902C118.973 68.8844 119.09 70.9858 119.254 73.0873ZM91.0807 29.3948C94.5945 28.241 97.2891 27.3765 99.9582 26.4289C100.118 26.371 100.235 25.474 100.049 25.2787C97.4603 22.5949 94.8312 19.9474 92.1548 17.3504C91.8599 17.0647 91.1608 16.9706 90.7311 17.0828C89.158 17.4915 87.6287 18.0666 86.0592 18.5006C85.229 18.7285 85.1489 19.0106 85.5932 19.7231C87.3446 22.5262 89.0561 25.3547 90.742 28.194C90.9823 28.6027 91.0115 29.1344 91.0843 29.3948H91.0807ZM115.401 32.5053C115.139 32.093 114.931 31.6626 114.629 31.3081C112.452 28.7401 110.216 26.2191 108.086 23.6113C107.103 22.4105 106.487 22.4503 105.548 23.6836C104.914 24.5155 103.942 25.1376 103.024 25.6983C102.219 26.1902 102.092 26.5121 102.667 27.3367C104.801 30.3894 106.869 33.4891 108.898 36.6142C109.378 37.3556 109.775 37.7282 110.554 37.0844C111.938 35.9378 113.333 34.8021 114.684 33.6193C114.986 33.3553 115.139 32.9249 115.401 32.5089V32.5053ZM63.7197 125.876C64.5317 125.876 65.5003 125.869 66.4689 125.876C70.8021 125.916 70.762 125.902 72.5317 121.858C73.0633 120.639 72.8558 120.364 71.5267 120.339C67.2845 120.266 63.046 120.093 58.8075 119.905C54.0155 119.691 54.5472 118.44 55.1807 123.967C55.29 124.932 55.7306 125.316 56.6628 125.374C58.9605 125.515 61.2581 125.695 63.716 125.873L63.7197 125.876ZM110.263 105.679C109.87 105.679 109.575 105.614 109.32 105.69C105.438 106.819 101.56 107.944 97.6969 109.134C97.1981 109.289 96.6665 109.723 96.397 110.172C95.1444 112.291 93.9719 114.458 92.7848 116.617C92.6501 116.863 92.5882 117.149 92.4935 117.416C92.7848 117.416 93.0943 117.492 93.3601 117.409C96.6373 116.375 99.9145 115.337 103.174 114.248C103.661 114.085 104.157 113.723 104.477 113.322C106.269 111.061 108.006 108.757 109.761 106.464C109.906 106.276 110.023 106.063 110.267 105.679H110.263ZM37.3018 116.834C37.2909 116.935 37.1307 117.301 37.2508 117.492C38.2085 119.019 39.1807 120.541 40.2331 122.003C40.5207 122.4 41.0742 122.748 41.5622 122.842C45.5385 123.609 49.5258 124.328 53.5203 124.99C53.8007 125.037 54.4671 124.498 54.4561 124.256C54.3979 122.939 54.2486 121.616 53.9755 120.324C53.8954 119.945 53.3528 119.449 52.9559 119.384C47.8908 118.519 42.8111 117.72 37.3018 116.834ZM3.87074 82.8421C4.34411 84.5348 4.95221 86.3108 5.32363 88.1337C6.3869 93.3601 10.0319 96.3622 14.3905 98.7855C14.6746 98.9411 15.0278 98.97 15.3519 99.0568C15.3227 98.7711 15.3191 98.4781 15.2572 98.1996C14.5981 95.2626 13.9536 92.3257 13.2399 89.4032C13.1124 88.8824 12.7847 88.2892 12.3623 87.9818C9.78062 86.0974 7.14794 84.2817 4.52982 82.4515C4.36232 82.3321 4.14384 82.2851 3.9472 82.2055C3.929 82.3755 3.90715 82.5455 3.87074 82.8493V82.8421ZM44.7301 14.5147C44.6209 14.3267 44.5881 14.2001 44.508 14.135C43.361 13.256 42.2285 12.3554 41.0342 11.5416C40.8412 11.4078 40.3278 11.585 40.0474 11.755C36.752 13.7696 33.4748 15.8168 30.1903 17.8495C29.4839 18.2872 29.4729 18.7646 30.1138 19.2384C31.6104 20.3488 33.0888 21.4954 34.6582 22.4973C34.975 22.6998 35.8052 22.5045 36.1475 22.2043C38.8348 19.8714 41.4602 17.4698 44.1038 15.0862C44.3187 14.8945 44.5262 14.6956 44.7228 14.5111L44.7301 14.5147ZM75.1935 125.71C77.6551 125.406 80.2477 125.164 82.8075 124.733C83.7689 124.571 84.7848 124.129 85.5495 123.533C86.8239 122.538 87.9382 121.33 89.0816 120.176C89.3911 119.861 89.5622 119.413 89.7989 119.022C89.3255 119.033 88.8522 119.011 88.3824 119.055C84.4134 119.431 80.448 119.966 76.468 120.147C74.5563 120.234 73.442 120.755 72.9286 122.614C72.6337 123.681 72.0802 124.679 71.6396 125.71H75.1899H75.1935ZM126.474 75.4925C126.314 74.9464 126.223 74.6389 126.132 74.3315C125.903 74.5051 125.677 74.6823 125.448 74.8559C123.678 76.1978 121.897 77.5252 120.149 78.8924C119.712 79.236 119.133 79.6701 119.046 80.1439C118.394 83.6198 117.848 87.1173 117.273 90.6077C117.182 91.1538 117.164 91.6783 117.954 91.1972C120.557 89.6166 123.201 87.9384 124.177 84.9218C125.189 81.7968 125.753 78.5271 126.474 75.4961V75.4925ZM95.4248 13.7552C94.6783 14.4207 94.0338 15.1513 93.2436 15.6577C92.3442 16.2328 92.4716 16.58 93.1598 17.2347C95.3009 19.2746 97.4311 21.329 99.4594 23.4775C101.844 26.0057 102.026 26.06 104.619 23.633C104.881 23.3871 105.111 23.1013 105.369 22.8481C106.09 22.1464 106.036 21.5424 105.216 20.9348C102.212 18.7031 99.2263 16.4498 96.2295 14.2109C95.9928 14.0337 95.7124 13.9179 95.4248 13.7552ZM69.9099 19.1625C70.9696 19.1625 71.9382 19.1299 72.9068 19.1733C73.8426 19.2131 74.0865 18.8514 73.7989 17.9906C73.2126 16.2219 72.6992 14.4279 72.0693 12.6773C71.8653 12.1095 71.4393 11.245 71.0242 11.1872C69.4876 10.981 67.9108 11.0352 66.3487 11.0606C66.2176 11.0606 66.0501 11.5561 65.9773 11.8382C65.4821 13.7588 65.0196 15.6866 64.5135 17.6072C64.2841 18.4789 64.5972 18.8044 65.4712 18.8478C66.9823 18.9201 68.4898 19.0612 69.9099 19.1661V19.1625ZM62.7584 18.6633C63.0497 18.327 63.6032 17.9436 63.7816 17.4336C64.1967 16.2472 64.4261 14.9958 64.7392 13.7733C65.4639 10.9593 65.4712 10.9267 62.5508 10.3625C61.7898 10.2142 60.65 10.0406 60.2349 10.4421C58.3778 12.2397 56.7138 14.2398 54.9878 16.1677C54.467 16.75 54.6309 17.1298 55.3701 17.2708C57.686 17.7157 60.0055 18.1461 62.762 18.6633H62.7584ZM76.4134 19.1444C78.3906 18.9238 80.3678 18.6706 82.3487 18.4934C83.5431 18.3885 83.503 17.9544 82.8403 17.1949C81.6569 15.8349 80.3715 14.54 79.3483 13.0716C77.8444 10.9123 75.9254 10.3914 73.453 10.9267C72.5535 11.1221 72.3678 11.3137 72.681 12.1782C73.351 14.0373 73.9955 15.9145 74.4762 17.8315C74.7638 18.9853 75.3574 19.2891 76.4134 19.1408V19.1444ZM17.1725 23.7741C17.4311 24.8266 17.584 25.5861 17.8061 26.3276C18.1375 27.4308 18.5307 27.6297 19.4629 26.6604C21.5931 24.4432 23.7633 22.2441 26.1084 20.262C27.5467 19.0431 28.7192 18.034 27.4556 16.0772C27.3646 15.9362 27.35 15.7264 27.361 15.5492C27.4338 14.3447 27.0223 14.1567 26.1011 14.9271C23.5521 17.0538 20.9413 19.1082 18.4798 21.329C17.7952 21.9475 17.5476 23.0398 17.1725 23.7741ZM8.80838 35.2072C9.11425 36.2597 9.35458 37.2435 9.69323 38.1948C10.0027 39.0628 10.3414 39.193 10.9386 38.2779C12.6718 35.6087 14.3942 32.9177 16.3387 30.4039C17.4165 29.0114 18.2103 27.8684 17.005 26.1938C16.7174 25.7923 16.7647 25.1557 16.6482 24.6313C16.5863 24.3528 16.5025 24.0779 16.4261 23.7994C16.153 23.9766 15.7997 24.096 15.6177 24.3419C13.6441 26.9895 11.6377 29.619 9.77698 32.3426C9.23078 33.1419 9.12154 34.2306 8.80474 35.2072H8.80838ZM56.2877 8.43468C56.102 8.50701 55.8617 8.56488 55.6578 8.68786C52.8467 10.3553 50.0428 12.0263 47.239 13.7045C46.427 14.1928 46.802 14.5256 47.4284 14.7498C49.1361 15.3683 50.8403 16.0121 52.5772 16.5294C52.985 16.6523 53.7024 16.4751 53.9864 16.1677C55.7597 14.2688 57.4602 12.3048 59.1498 10.3336C59.2991 10.1563 59.3027 9.56316 59.219 9.52699C58.2759 9.12913 57.3 8.79999 56.2841 8.43829L56.2877 8.43468ZM84.8394 18.1714C86.5727 17.6434 88.1312 17.1659 89.6897 16.6885C90.5927 16.4136 90.7784 16.0447 89.8972 15.4479C87.4502 13.7877 84.9814 12.1565 82.5927 10.4168C81.3801 9.53422 80.2841 9.51975 78.9259 10.0623C77.9791 10.4421 77.9391 10.6048 78.5945 11.321C80.3824 13.2777 82.0902 15.3068 83.8453 17.2925C84.1366 17.6217 84.508 17.8857 84.8358 18.1714H84.8394ZM27.838 14.7064C28.1584 15.7662 28.3041 16.4787 28.6063 17.1153C28.701 17.3179 29.3273 17.5132 29.5166 17.3974C32.9723 15.3068 36.4133 13.1909 39.818 11.028C41.016 10.2648 39.5995 9.30997 39.8726 8.44914C39.4356 8.40212 38.9113 8.17787 38.5763 8.34064C35.4702 9.81272 32.3678 11.292 29.3382 12.9088C28.6609 13.2705 28.2713 14.1639 27.8343 14.71L27.838 14.7064ZM3.23714 47.9894C3.53573 48.9913 3.81976 50.0293 4.16568 51.0493C4.24579 51.2844 4.5371 51.4508 4.73009 51.6461C4.88303 51.411 5.07602 51.1904 5.17797 50.9336C6.20483 48.4234 7.09332 45.8518 8.26947 43.4176C9.22714 41.4355 10.3013 39.6054 8.65181 37.5003C8.44789 37.2399 8.47338 36.8095 8.3605 36.4659C8.28039 36.2163 8.1493 35.9848 8.04006 35.7425C7.858 35.9631 7.61038 36.1548 7.50843 36.4044C6.32135 39.3015 5.13064 42.1951 3.99818 45.1139C3.65226 46.0037 3.49932 46.9658 3.2335 47.9894H3.23714ZM122.837 89.1862C122.775 88.9837 122.727 88.8426 122.684 88.6979C122.534 88.7847 122.378 88.8607 122.24 88.9583C120.608 90.0941 118.977 91.2298 117.36 92.3836C117.076 92.5861 116.741 92.8248 116.617 93.125C115.368 96.185 114.159 99.263 112.947 102.337C112.885 102.493 112.892 102.674 112.87 102.844C113.074 102.818 113.307 102.844 113.478 102.753C113.854 102.558 114.192 102.305 114.549 102.081C117.404 100.283 118.82 97.3894 120.291 94.5573C121.205 92.7959 121.992 90.973 122.837 89.1826V89.1862ZM53.5421 6.52494C52.8102 6.72749 52.3915 6.81068 51.9946 6.95535C49.1034 8.01873 46.2012 9.05317 43.3391 10.1853C41.5476 10.8942 41.5585 11.1221 43.077 12.3012C45.3564 14.0698 45.3273 14.0301 47.7197 12.4893C49.7479 11.1835 51.8526 9.99719 53.9136 8.73488C54.3432 8.47084 54.7147 8.11277 55.1152 7.79448C54.5362 7.3279 53.9573 6.8577 53.5385 6.5177L53.5421 6.52494ZM102.107 115.854C101.364 115.951 101.098 115.959 100.85 116.027C98.0538 116.787 95.2536 117.532 92.4753 118.349C91.8781 118.527 91.27 118.888 90.8258 119.326C89.5804 120.549 88.4152 121.847 87.2281 123.127C87.0315 123.341 86.8749 123.59 86.7001 123.826C86.9769 123.811 87.2645 123.833 87.534 123.782C92.8576 122.744 97.3219 120.096 101.265 116.49C101.397 116.367 101.553 116.273 102.11 115.861L102.107 115.854ZM83.0806 7.8415C82.7238 8.14532 82.3305 8.47808 81.9336 8.81445C82.1885 9.09657 82.3997 9.43657 82.7056 9.64635C85.1344 11.3174 87.6141 12.9233 90.0174 14.6305C91.7907 15.8928 92.184 15.8964 93.7716 14.352C94.5108 13.6358 94.6273 13.1186 93.564 12.6303C90.3924 11.1618 87.239 9.66443 84.0747 8.18511C83.8053 8.05851 83.5103 7.98618 83.0806 7.83788V7.8415ZM95.5449 12.0118C95.8144 12.4856 95.971 13.1041 96.3715 13.408C99.4302 15.7481 102.536 18.0304 105.639 20.3163C105.85 20.4718 106.152 20.5007 106.411 20.5912C106.48 20.3091 106.691 19.9618 106.596 19.7557C106.039 18.544 105.704 16.9996 104.75 16.2472C102.351 14.3556 99.6596 12.8256 97.0816 11.1618C96.204 10.594 95.443 10.301 95.5486 12.0154L95.5449 12.0118ZM116.148 30.0639C115.947 29.2899 115.966 28.4363 115.554 27.9263C113.063 24.8411 110.482 21.8318 107.911 18.8116C107.82 18.7068 107.463 18.667 107.368 18.7502C107.103 18.9889 107.452 21.9584 107.732 22.2767C110.125 24.9966 112.51 27.7201 114.906 30.4401C115.135 30.7005 115.416 30.9211 115.674 31.1598C115.834 30.7909 115.995 30.4256 116.151 30.0639H116.148ZM62.4525 126.603C62.4525 126.567 62.4525 126.531 62.4525 126.495C60.7593 126.383 59.0661 126.238 57.3728 126.173C56.8376 126.151 56.2914 126.336 55.7524 126.426C56.0583 127.124 56.3023 127.858 56.7028 128.499C56.8339 128.708 57.3728 128.712 57.7297 128.73C60.3915 128.86 63.0606 129.117 65.7151 129.012C66.793 128.969 67.8562 128.162 68.8831 127.623C69.1161 127.5 69.1708 127.052 69.3055 126.752C69.0215 126.701 68.7374 126.611 68.4498 126.611C66.4507 126.6 64.4516 126.603 62.4525 126.603ZM0.666364 60.938C0.972236 62.1678 1.20892 63.2167 1.51115 64.2439C1.58034 64.4754 1.88257 64.6417 2.07556 64.837C2.14474 64.6092 2.23214 64.3849 2.27583 64.1535C2.77834 61.3756 3.0041 58.5147 3.85253 55.8454C4.51889 53.7584 4.02731 52.138 3.1097 50.4272C3.00774 50.2355 2.82567 50.0872 2.68002 49.9208C2.59627 50.1415 2.47246 50.3549 2.43241 50.5864C1.82795 54.0731 1.23805 57.5634 0.662723 60.938H0.666364ZM40.5826 8.26468C40.7793 9.6572 40.8812 10.4529 42.3159 9.8706C45.5676 8.55404 48.8849 7.40385 52.1584 6.14154C52.5044 6.00772 52.7301 5.57369 53.0105 5.2771C52.6355 5.09263 52.2131 4.68754 51.8963 4.75988C48.4734 5.5339 45.0578 6.34409 41.6678 7.24471C41.1762 7.37492 40.823 8.02596 40.5826 8.26468ZM54.2522 128.354C55.0752 128.484 55.5485 128.408 55.2281 127.352C54.9441 126.415 54.6236 125.858 53.4693 125.703C50.1776 125.261 46.9113 124.618 43.6341 124.071C43.2044 123.999 42.7602 124.032 42.3196 124.014C42.6473 124.346 42.9495 124.715 43.31 125.008C46.4925 127.627 50.5162 127.536 54.2522 128.35V128.354ZM122.928 41.8804C122.666 40.9906 122.516 40.0213 122.108 39.1713C120.885 36.6214 119.589 34.104 118.252 31.6083C117.928 31.0043 117.338 30.5413 116.872 30.0097C116.778 30.9428 116.661 31.8724 116.61 32.8055C116.599 33.0008 116.861 33.2034 116.978 33.4132C118.591 36.3067 120.197 39.2039 121.813 42.0938C122.006 42.4374 122.265 42.7412 122.491 43.0668C122.622 42.7051 122.753 42.347 122.924 41.8768L122.928 41.8804ZM95.0934 11.8961C95.1553 11.6899 95.2172 11.4837 95.2828 11.2776C94.7074 10.6555 94.2486 9.75124 93.5349 9.4655C90.5709 8.28276 87.534 7.27364 84.508 6.24643C84.1803 6.13431 83.7543 6.32239 83.3719 6.36941C83.6086 6.71302 83.7689 7.21215 84.0966 7.3713C87.4102 8.96998 90.742 10.5216 94.092 12.0444C94.3506 12.1601 94.7584 11.9539 95.0934 11.8961ZM71.0096 128.915C75.463 128.549 78.6091 127.808 81.1835 126.401C81.4348 126.263 81.6496 126.064 81.879 125.894C81.5695 125.855 81.2527 125.757 80.9468 125.779C77.8699 126.021 74.7893 126.26 71.716 126.56C71.2281 126.607 70.6892 126.857 70.3214 127.178C69.8444 127.594 69.5167 128.177 69.1234 128.687L71.006 128.915H71.0096ZM69.3565 10.3733C71.1698 10.4059 71.2281 10.3155 70.4452 8.62999C70.2449 8.19596 70.0483 7.75831 69.808 7.3496C69.3637 6.59366 68.8904 5.85581 68.4279 5.11072C68.0456 5.93176 67.5941 6.7311 67.2955 7.5847C66.3342 10.3155 66.356 10.3227 69.3565 10.3733ZM52.6318 2.81759C50.4725 3.17566 48.4188 3.39268 46.4343 3.88458C45.0615 4.22457 43.7761 4.92264 42.4689 5.50496C42.2613 5.599 42.1557 5.92453 42.0064 6.14154C42.2358 6.13431 42.4725 6.15963 42.6946 6.11261C45.9937 5.38199 49.2927 4.6586 52.5845 3.8882C52.9377 3.80501 53.229 3.4614 53.5494 3.24077C53.2254 3.09247 52.9049 2.94418 52.6318 2.81759ZM64.9286 10.1274C65.2782 9.80187 65.8025 9.52699 65.9846 9.10381C66.4361 8.0549 66.7383 6.9445 67.077 5.85219C67.1425 5.64602 67.0952 5.40731 67.0988 5.17944C66.8804 5.23731 66.6255 5.23731 66.4507 5.35667C65.5585 5.97878 64.6555 6.59366 63.8144 7.28088C63.0861 7.87767 62.4306 8.5685 61.7461 9.21593C62.711 9.49082 63.676 9.7657 64.925 10.1202L64.9286 10.1274ZM73.0815 10.5867C73.1799 10.4819 73.2818 10.377 73.3801 10.2721C73.6787 10.2504 73.9882 10.2612 74.2795 10.1997C74.7274 10.1057 75.1644 9.96464 75.605 9.84166C75.3246 9.4872 75.0988 9.06764 74.7529 8.79637C73.4784 7.7981 72.1712 6.83961 70.8567 5.88836C70.5799 5.68943 70.2377 5.5773 69.9281 5.42539C70.0228 5.79794 70.0702 6.18856 70.2231 6.53579C70.6091 7.41109 70.955 8.32255 71.4866 9.10742C71.8835 9.69337 72.5426 10.1021 73.0852 10.5904L73.0815 10.5867ZM126.824 54.6662C125.972 51.4074 125.072 47.9351 124.144 44.4665C124.042 44.0867 123.78 43.7467 123.59 43.3887C123.416 43.8263 123.201 44.2567 123.081 44.7088C123.026 44.915 123.139 45.1718 123.204 45.3961C124.162 48.6079 125.12 51.8197 126.092 55.0279C126.154 55.2305 126.358 55.3933 126.493 55.5705C126.565 55.3679 126.638 55.1654 126.82 54.6662H126.824ZM64.6446 5.11072C62.4889 5.92091 60.2386 6.75642 58.0028 7.6281C57.8972 7.66789 57.8863 8.23574 57.9008 8.23936C58.8621 8.43829 60.0565 9.04594 60.752 8.68786C62.2704 7.91022 63.5412 6.64791 64.9031 5.57007C65.0087 5.48688 65.0342 5.30603 65.0961 5.17221C64.9832 5.15774 64.8703 5.13965 64.6482 5.11072H64.6446ZM1.90442 71.749C1.94447 71.749 1.98088 71.749 2.02094 71.749C2.02094 70.4252 2.08648 69.0978 1.99545 67.7776C1.94811 67.094 1.65316 66.4177 1.42012 65.7558C1.35093 65.5604 1.11789 65.423 0.961312 65.2602C0.881203 65.4555 0.717342 65.6545 0.735549 65.8389C1.0305 69.3148 1.33637 72.7907 1.67137 76.2593C1.69322 76.5016 1.94811 76.7223 2.09012 76.9538C2.12654 76.7223 2.19936 76.4836 2.18844 76.2557C2.10469 74.7547 1.99909 73.25 1.90078 71.749H1.90442ZM77.3674 9.71869C77.7352 9.63911 77.9828 9.61741 78.2049 9.53061C78.6382 9.36061 79.0606 9.15806 79.4866 8.96636C79.1225 8.70233 78.7912 8.36957 78.387 8.18872C76.5736 7.38215 74.7384 6.61536 72.9068 5.84496C72.6992 5.75815 72.4625 5.73645 72.2404 5.68581C72.3424 5.85942 72.4006 6.08729 72.5463 6.20303C73.8644 7.25194 75.1899 8.29 76.5299 9.30636C76.7993 9.5089 77.1453 9.61379 77.3674 9.71869ZM42.6218 125.355C42.163 125.005 41.9372 124.889 41.7843 124.712C39.7379 122.31 36.5116 122.578 33.9663 121.312C33.879 121.268 33.7479 121.323 33.635 121.33C33.7151 121.456 33.7661 121.652 33.8826 121.706C36.4971 122.932 39.1152 124.144 41.737 125.345C41.8826 125.413 42.0902 125.352 42.6218 125.352V125.355ZM62.0046 4.78881C59.9108 5.19391 57.726 5.60624 55.5485 6.05112C55.3082 6.09814 55.1079 6.32962 54.8894 6.4743C55.046 6.6443 55.1662 6.89025 55.3628 6.96982C55.7852 7.14705 56.3132 7.45087 56.6737 7.33151C58.549 6.69855 60.3879 5.94985 62.2304 5.23008C62.3833 5.16859 62.4925 4.99859 62.62 4.88285C62.4489 4.85753 62.2777 4.83222 62.0046 4.79243V4.78881ZM75.3319 5.50135C75.026 5.55198 74.9131 5.57007 74.7966 5.59177C74.8986 5.7039 74.9787 5.86304 75.1061 5.92091C76.8503 6.72749 78.5872 7.55215 80.3606 8.29C80.6701 8.42021 81.1653 8.23936 81.5185 8.0766C81.635 8.02235 81.6314 7.35321 81.5695 7.33513C79.443 6.68047 77.3055 6.0692 75.3319 5.50135ZM54.4743 5.47603C56.5936 5.06732 58.4871 4.70562 60.3842 4.3367C60.4971 4.315 60.5991 4.25351 60.7083 4.2101C60.5881 4.15223 60.4643 4.03649 60.3478 4.04011C58.4179 4.145 56.488 4.23904 54.5654 4.40542C54.3178 4.42712 54.0993 4.81775 53.8699 5.03838C54.1211 5.21923 54.3687 5.40007 54.478 5.47603H54.4743ZM77.0287 4.76711C76.854 4.80328 76.5918 4.85392 76.3333 4.90817C76.5991 5.03838 76.854 5.21561 77.138 5.29518C78.5363 5.69666 79.9345 6.09452 81.3474 6.44175C81.686 6.52494 82.0756 6.40196 82.4434 6.37664C82.1667 6.10176 81.9263 5.65326 81.6023 5.58454C80.1239 5.26263 78.62 5.042 77.0324 4.77073L77.0287 4.76711ZM69.4293 1.27316C68.4789 1.19359 67.8271 1.10316 67.1717 1.09955C66.9459 1.09955 66.7201 1.30933 66.4907 1.42507C67.0697 1.89889 67.6487 2.3727 68.224 2.85014C68.5408 2.43781 68.854 2.02548 69.4256 1.27316H69.4293ZM77.2581 3.55544C77.2545 3.58799 77.2509 3.62055 77.2472 3.6531C76.8867 3.6531 76.5226 3.64225 76.1621 3.65671C75.9254 3.66756 75.6887 3.72182 75.452 3.75437C75.6705 3.82309 75.8817 3.92075 76.1038 3.9533C77.3565 4.13777 78.6091 4.31499 79.8653 4.47052C80.0583 4.49584 80.2659 4.39818 80.4662 4.3584C80.2914 4.21372 80.1312 3.98224 79.9345 3.94607C79.0497 3.78331 78.1539 3.67842 77.2618 3.55182L77.2581 3.55544ZM72.7575 1.71804C72.0073 1.59145 71.4794 1.38167 71.006 1.46124C70.5362 1.54081 70.1066 1.89889 69.6878 2.17739C69.5859 2.24611 69.6041 2.48845 69.564 2.64759C70.0192 2.59695 70.4743 2.57525 70.9222 2.48845C71.3337 2.40887 71.7379 2.27866 72.1384 2.14122C72.2768 2.0942 72.3897 1.97123 72.7575 1.71081V1.71804ZM55.5631 3.55906C57.067 3.45778 58.3269 3.37821 59.5904 3.28055C59.7579 3.26609 59.9181 3.16843 60.082 3.10694C59.9327 3.04907 59.7798 2.94418 59.6305 2.94056C58.3669 2.89716 57.1034 2.84291 55.8398 2.86822C55.5376 2.87546 55.239 3.17205 54.9368 3.33481C55.2172 3.43608 55.4975 3.53736 55.5667 3.56267L55.5631 3.55906ZM63.5267 1.05976C63.29 1.12486 63.0169 1.20082 62.7474 1.27678C62.9841 1.43592 63.2026 1.63485 63.4575 1.74698C63.7889 1.89165 64.1421 2.00739 64.4953 2.06165C64.965 2.13399 65.4457 2.13399 65.919 2.16654C65.4966 1.84825 65.1034 1.46847 64.6373 1.22614C64.3351 1.07061 63.9309 1.1104 63.5267 1.05614V1.05976ZM59.9036 1.57336C59.889 1.61677 59.8781 1.65655 59.8635 1.69996C59.7433 1.69272 59.6195 1.65655 59.5067 1.68187C59.1644 1.75421 58.8294 1.85187 58.4871 1.93867C58.793 2.0291 59.0952 2.13399 59.4047 2.20633C59.5758 2.24611 59.7615 2.23164 59.94 2.2425C60.7629 2.2859 61.5859 2.3293 62.4052 2.3727C61.5713 2.10867 60.7338 1.84102 59.8999 1.57698L59.9036 1.57336ZM54.3214 2.25696C54.7183 2.10867 55.2354 1.91335 55.7561 1.72166C55.5594 1.66017 55.3519 1.51911 55.1698 1.54805C54.4161 1.65655 53.6696 1.8157 52.9195 1.95676C53.3237 2.04356 53.7279 2.13037 54.3214 2.26058V2.25696ZM75.2008 2.97311C75.452 2.92248 75.9946 2.81397 76.5372 2.70546C75.9291 2.60419 75.3246 2.48121 74.7165 2.40887C74.4871 2.37994 74.2395 2.43419 74.0137 2.4993C73.8062 2.55717 73.6168 2.67291 73.4165 2.76333C73.6095 2.83205 73.7989 2.94056 73.9992 2.96588C74.2905 3.00205 74.5927 2.97311 75.2008 2.97311ZM127.064 58.5436C127.017 58.4496 126.966 58.3555 126.919 58.2579C126.875 58.3447 126.78 58.4459 126.795 58.5219C126.82 58.6413 126.919 58.7425 126.984 58.851C127.01 58.7498 127.035 58.6485 127.064 58.5436Z",fill:"currentColor"})}),_6=e=>{const n=y.useId();return a.jsxs("svg",{fill:"none",height:e.height,role:"presentation",viewBox:"0 0 74 11",width:e.height*74/11,xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("path",{clipRule:"evenodd",d:"M34.1489 0.373291C33.5297 0.373291 33.022 0.874761 33.022 1.51414C33.022 2.14097 33.5297 2.64244 34.1489 2.64244C34.7681 2.64244 35.2758 2.14097 35.2758 1.51414C35.2758 0.874761 34.7681 0.373291 34.1489 0.373291ZM35.1396 3.21913H33.1706V9.97644H35.1396V3.21913ZM21.6787 0.624035H23.5982V3.21914H25.0718V5.02444H23.5982V7.40642C23.5982 7.75745 23.8706 8.03326 24.205 8.03326H25.0594V9.95138H24.205C22.818 9.95138 21.6787 8.81054 21.6787 7.39389V5.0119H20.7871V3.20661H21.6787V0.624035ZM29.7652 3.0687C28.8736 3.0687 28.1677 3.44481 27.8953 4.03403V0.624035H25.9263V9.96392H27.8953V6.17782C27.8953 5.388 28.403 4.83639 29.1213 4.83639C29.8519 4.83639 30.2605 5.31278 30.2605 6.11514V9.97646H32.2295V5.8644C32.2295 4.10925 31.3379 3.0687 29.7652 3.0687ZM37.9507 3.2066V4.13432C38.2479 3.45734 38.9661 3.0687 39.8701 3.05616C40.0063 3.05616 40.1797 3.0687 40.3902 3.09377V4.97429C40.1921 4.93668 39.9692 4.9116 39.7339 4.9116C38.607 4.9116 37.9507 5.55098 37.9507 6.66675V9.96392H35.9817V3.2066H37.9507ZM45.9257 4.09672C45.7275 3.50749 44.9474 3.09378 43.9443 3.09378C43.0032 3.09378 42.2106 3.43227 41.5791 4.10926C40.9599 4.7737 40.6379 5.61367 40.6379 6.59154C40.6379 7.5694 40.9599 8.39683 41.5791 9.08635C42.2106 9.7508 43.0032 10.0893 43.9443 10.0893C44.9474 10.0893 45.7275 9.67558 45.9257 9.08635V9.97646H47.8946V0.624035H45.9257V4.09672ZM45.5294 7.79506C45.195 8.12102 44.7864 8.27146 44.3034 8.27146C43.8329 8.27146 43.4242 8.10848 43.1022 7.79506C42.7679 7.45657 42.6069 7.0554 42.6069 6.59154C42.6069 6.12767 42.7679 5.7265 43.1022 5.40054C43.4366 5.06205 43.8329 4.89907 44.3034 4.89907C44.7988 4.89907 45.2074 5.06205 45.5294 5.40054C45.8761 5.7265 46.0495 6.12767 46.0495 6.59154C46.0495 7.0554 45.8761 7.45657 45.5294 7.79506ZM53.5787 3.2442L55.3619 6.45361L56.5631 3.21913H58.4949L55.7458 10.3651L53.5787 6.47868L51.4115 10.3651L48.6748 3.21913H50.6066L51.7954 6.45361L53.5787 3.2442ZM61.7394 3.05616C60.7239 3.05616 59.8694 3.38212 59.2007 4.03403C58.5444 4.6734 58.2101 5.5259 58.2101 6.57899V6.64167C58.2101 7.69476 58.5444 8.54726 59.2007 9.18664C59.8818 9.81347 60.7487 10.1394 61.8384 10.1394C62.8539 10.1394 63.6836 9.93884 64.3151 9.52513V7.78252C63.6959 8.22131 62.9034 8.43443 61.9499 8.43443C60.9097 8.43443 60.2286 7.92042 60.1914 7.11807H65.0829C65.1077 6.91748 65.12 6.69182 65.12 6.46616C65.12 5.50083 64.7981 4.69848 64.1789 4.04657C63.5597 3.38212 62.73 3.05616 61.7394 3.05616ZM60.1914 5.82679C60.2038 5.51337 60.3648 5.25009 60.662 5.03697C60.9716 4.82385 61.3183 4.71101 61.7394 4.71101C62.5195 4.71101 63.1263 5.22502 63.1263 5.82679H60.1914ZM69.8135 3.09378C70.7546 3.09378 71.5472 3.43227 72.1663 4.10925C72.7979 4.78624 73.1199 5.60113 73.1199 6.579C73.1199 7.55686 72.7979 8.38429 72.1663 9.07381C71.5472 9.73826 70.7546 10.0768 69.8135 10.0768C68.8104 10.0768 68.0302 9.66304 67.8321 9.07381V9.96392H65.8631V0.624035H67.8321V4.09672C68.0302 3.50749 68.8104 3.09378 69.8135 3.09378ZM69.4543 8.27146C69.9249 8.27146 70.3212 8.12102 70.6555 7.79506C70.9899 7.45657 71.1509 7.05539 71.1509 6.59153C71.1509 6.12767 70.9899 5.7265 70.6555 5.40054C70.3336 5.06205 69.9249 4.89907 69.4543 4.89907C68.9714 4.89907 68.5627 5.06205 68.216 5.40054C67.8816 5.7265 67.7083 6.12767 67.7083 6.59153C67.7083 7.05539 67.8816 7.45657 68.216 7.79506C68.5503 8.10848 68.959 8.27146 69.4543 8.27146Z",fill:"currentColor",fillRule:"evenodd"}),a.jsx("g",{clipPath:`url(#${n})`,children:a.jsx("path",{clipRule:"evenodd",d:"M0.045011 0.900694C-0.126602 0.467742 0.193222 0 0.661257 0H3.56697C3.83999 0 4.08181 0.162357 4.18322 0.413623L6.49609 6.18115C6.55849 6.33578 6.55849 6.50973 6.49609 6.66822L5.04128 10.2903C4.81896 10.8431 4.03111 10.8431 3.80879 10.2903L0.045011 0.900694ZM5.65759 0.881366C5.50158 0.45228 5.8214 0 6.28164 0H8.81292C9.09374 0 9.34336 0.173954 9.43697 0.432951L11.5392 6.20048C11.5899 6.34351 11.5899 6.502 11.5392 6.6489L10.2755 10.1164C10.0649 10.6962 9.23805 10.6962 9.02744 10.1164L5.65759 0.881366ZM11.3404 0C10.8724 0 10.5525 0.467742 10.7241 0.900694L14.4879 10.2903C14.7102 10.8431 15.4981 10.8431 15.7204 10.2903L17.1752 6.66822C17.2376 6.50973 17.2376 6.33578 17.1752 6.18115L14.8623 0.413623C14.7609 0.162357 14.5191 0 14.2461 0H11.3404Z",fill:"currentColor",fillRule:"evenodd"})}),a.jsx("defs",{children:a.jsx("clipPath",{id:n,children:a.jsx("rect",{fill:"white",height:"10.7049",width:"17.219"})})})]})};function ml(e){const n=e.link||"https://playground.thirdweb.com/connect/sign-in/button?utm_source=cw_text";return a.jsx(_r,{color:"secondaryText",hoverColor:"primaryText",href:n,target:"_blank",children:a.jsxs(M,{center:"both",flex:"row",style:{color:"currentColor",gap:4},children:[a.jsx(k,{size:"xs",style:{color:"currentColor"},weight:600,children:"Powered by"}),a.jsx(_6,{height:11})]})})}function x6(e){const n=e.welcomeScreen;if(n&&typeof n=="function")return a.jsx(n,{});const t=(typeof n=="object"?n==null?void 0:n.title:void 0)||e.connectLocale.welcomeScreen.defaultTitle,i=(typeof n=="object"?n==null?void 0:n.subtitle:void 0)||e.connectLocale.welcomeScreen.defaultSubtitle,r=typeof n=="object"?n==null?void 0:n.img:void 0,o=e.meta.termsOfServiceUrl||e.meta.privacyPolicyUrl;return a.jsxs(M,{animate:"fadein",flex:"column",fullHeight:!0,children:[a.jsxs(M,{center:"both",expand:!0,flex:"column",p:"lg",style:{minHeight:"300px"},children:[a.jsx(M,{center:"x",flex:"row",children:r?a.jsx(He,{client:e.client,height:r.height?String(r.height):void 0,src:r.src,width:r.width?String(r.width):void 0}):a.jsx(I6,{children:a.jsx(w6,{size:"150"})})}),a.jsx(U,{y:"xxl"}),a.jsx(k,{center:!0,color:"primaryText",multiline:!0,weight:600,children:t}),a.jsx(U,{y:"md"}),a.jsx(k,{color:"secondaryText",multiline:!0,style:{textAlign:"center"},children:i}),a.jsx(U,{y:"lg"}),a.jsx(_r,{center:!0,href:"https://blog.thirdweb.com/web3-wallet/",target:"_blank",children:e.connectLocale.newToWallets})]}),a.jsx(M,{flex:"column",gap:"lg",py:"lg",children:a.jsxs("div",{children:[o&&a.jsx(hl,{locale:e.connectLocale.agreement,privacyPolicyUrl:e.meta.privacyPolicyUrl,termsOfServiceUrl:e.meta.termsOfServiceUrl}),e.meta.showThirdwebBranding!==!1&&a.jsx(M,{style:{paddingTop:P.xl},children:a.jsx(ml,{})})]})})]})}const M6=vt`
|
|
89
|
+
from {
|
|
90
|
+
transform: translateY(4px);
|
|
91
|
+
}
|
|
92
|
+
to {
|
|
93
|
+
transform: translateY(-4px);
|
|
94
|
+
}
|
|
95
|
+
`,I6=Se(()=>{const e=X();return{animation:`${M6} 2s ease infinite alternate`,color:e.colors.accentText,filter:`drop-shadow(0px 6px 10px ${e.colors.accentText})`}});function gl(){try{if(typeof window<"u"&&window.localStorage)return window.localStorage.getItem(hd)}catch{}return null}function b6(){try{if(typeof window<"u"&&window.localStorage)return window.localStorage.getItem(o0)}catch{}return null}function a0(e,n){const t=Ii(),i=gl();return e.sort((r,o)=>{const s=t.find(l=>l.info.rdns===r.id),c=t.find(l=>l.info.rdns===o.id);return s&&!c?-1:!s&&c?1:0}).sort((r,o)=>{const s=n==null?void 0:n.find(l=>l.id===r.id),c=n==null?void 0:n.find(l=>l.id===o.id);return s&&!c?-1:!s&&c?1:0}).sort((r,o)=>r.id===i?-1:o.id===i?1:0).sort((r,o)=>{const s=r.id==="inApp"||r.id==="embedded",c=o.id==="inApp"||o.id==="embedded";return s&&!c?-1:!s&&c?1:0})}const c0=y.createContext(void 0);function l0(e){let n=At.main;const t=e.wallets.find(c=>c.id==="embedded"||c.id==="inApp");e.wallets.length===1&&e.wallets[0]?n=e.wallets[0]:e.size==="wide"&&!e.welcomeScreen&&t&&(n=t);const[i,r]=y.useState(n),o=y.useRef(n),s=yt();return y.useEffect(()=>{n!==o.current&&(o.current=n,r(n))},[n]),y.useEffect(()=>{!s&&i===At.signIn&&r(At.main)},[s,i]),{initialScreen:n,screen:i,setScreen:r}}function u0(){const e=y.useContext(c0);if(!e)throw new Error("useScreenContext must be used within a <ScreenSetupContext.Provider />");return e}function C6(e){return a.jsx(M,{bg:"modalBg",color:"secondaryText",borderColor:"borderColor",flex:"row",center:"y",style:{borderRadius:G.full,padding:`${P["3xs"]} ${P.xs}`,borderWidth:"1px",borderStyle:"solid"},children:a.jsx(k,{style:{fontSize:10,whiteSpace:"nowrap"},children:e.text})})}function d0(){return a.jsx("div",{style:{position:"absolute",top:-10,right:-10,zIndex:1,pointerEvents:"none",cursor:"default"},children:a.jsx(C6,{text:"Last used"})})}const j6=12;function Nr(e){return a.jsxs(ae,{disabled:e.disabled,className:e.className,fullWidth:!0,onClick:()=>{e.onClick()},style:{display:"flex",justifyContent:"flex-start",padding:P.sm,position:"relative"},variant:"outline",children:[e.lastUsedBadge&&a.jsx(d0,{}),a.jsxs(M,{center:"y",color:"accentText",flex:"row",gap:"sm",children:[a.jsx(e.icon,{size:A.md}),a.jsx(k,{color:"primaryText",children:e.title})]})]})}const fy=e=>a.jsx(L6,{style:{paddingBlock:e.py?P[e.py]:0},children:a.jsxs("span",{children:[" ",e.text]})}),L6=Se(()=>{const e=X();return{"&::before, &::after":{borderBottom:`1px solid ${e.colors.separatorLine}`,content:'""',flex:1},alignItems:"center",color:e.colors.secondaryText,display:"flex",fontSize:ie.sm,span:{margin:"0 16px"}}}),Hl=HI(e=>({color:X().colors[e.color||"primaryText"],display:"block",fontSize:ie.sm,fontWeight:500})),xr=ZI(e=>{const n=X();return{"&:-webkit-autofill":{boxShadow:`0 0 0px 1000px ${n.colors.inputAutofillBg} inset !important`,transition:"background-color 5000s ease-in-out 0s",WebkitBoxShadow:`0 0 0px 1000px ${n.colors.inputAutofillBg} inset !important`,WebkitTextFillColor:n.colors.primaryText},"&:-webkit-autofill:focus":{boxShadow:`0 0 0px 1000px ${n.colors.inputAutofillBg} inset, 0 0 0 2px ${e.variant==="outline"?n.colors.accentText:"transparent"} !important`,WebkitBoxShadow:`0 0 0px 1000px ${n.colors.inputAutofillBg} inset, 0 0 0 2px ${e.variant==="outline"?n.colors.accentText:"transparent"} !important`},"&::placeholder":{color:n.colors.secondaryText},"&:focus":{boxShadow:`0 0 0 2px ${n.colors.accentText}`},"&:not([type='password'])":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},"&[data-error='true']":{boxShadow:`0 0 0 2px ${n.colors.danger} !important`},"&[data-focus='false']:focus":{boxShadow:"none"},"&[data-placeholder='true']":{color:n.colors.secondaryText},"&[disabled]":{cursor:"not-allowed"},"&[type='number']":{appearance:"none",MozAppearance:"textfield"},"&[type='number']::-webkit-outer-spin-button, &[type='number']::-webkit-inner-spin-button":{margin:0,WebkitAppearance:"none"},appearance:"none",background:e.bg?n.colors[e.bg]:"transparent",border:"none",borderRadius:G.md,boxShadow:`0 0 0 1.5px ${e.variant==="outline"?n.colors.borderColor:"transparent"}`,boxSizing:"border-box",color:n.colors.primaryText,display:"block",fontFamily:"inherit",fontSize:ie.sm,outline:"none",padding:e.sm?P.sm:ie.sm,WebkitAppearance:"none",width:"100%",[Fh.mobile]:{fontSize:ie.md}}}),E6=Se(()=>{const e=X();return{"&:focus-within":{boxShadow:`0 0 0px 1px ${e.colors.accentText}`},"&[data-error='true']":{boxShadow:`0 0 0px 1px ${e.colors.danger}`},borderRadius:G.md,boxShadow:`0 0 0px 1px ${e.colors.borderColor}`,display:"flex","input:focus":{boxShadow:"none"}}}),md=[{countryIsoCode:"AD",countryName:"Andorra",phoneNumberCode:"376"},{countryIsoCode:"AE",countryName:"United Arab Emirates",phoneNumberCode:"971"},{countryIsoCode:"AF",countryName:"Afghanistan",phoneNumberCode:"93"},{countryIsoCode:"AG",countryName:"Antigua and Barbuda",phoneNumberCode:"1268"},{countryIsoCode:"AI",countryName:"Anguilla",phoneNumberCode:"1264"},{countryIsoCode:"AL",countryName:"Albania",phoneNumberCode:"355"},{countryIsoCode:"AM",countryName:"Armenia",phoneNumberCode:"374"},{countryIsoCode:"AN",countryName:"Netherlands Antilles",phoneNumberCode:"599"},{countryIsoCode:"AO",countryName:"Angola",phoneNumberCode:"244"},{countryIsoCode:"AQ",countryName:"Antarctica",phoneNumberCode:"672"},{countryIsoCode:"AR",countryName:"Argentina",phoneNumberCode:"54"},{countryIsoCode:"AS",countryName:"American Samoa",phoneNumberCode:"1684"},{countryIsoCode:"AT",countryName:"Austria",phoneNumberCode:"43"},{countryIsoCode:"AU",countryName:"Australia",phoneNumberCode:"61"},{countryIsoCode:"AW",countryName:"Aruba",phoneNumberCode:"297"},{countryIsoCode:"AX",countryName:"Aland Islands",phoneNumberCode:"35818"},{countryIsoCode:"AZ",countryName:"Azerbaijan",phoneNumberCode:"994"},{countryIsoCode:"BA",countryName:"Bosnia and Herzegovina",phoneNumberCode:"387"},{countryIsoCode:"BB",countryName:"Barbados",phoneNumberCode:"1246"},{countryIsoCode:"BD",countryName:"Bangladesh",phoneNumberCode:"880"},{countryIsoCode:"BE",countryName:"Belgium",phoneNumberCode:"32"},{countryIsoCode:"BF",countryName:"Burkina Faso",phoneNumberCode:"226"},{countryIsoCode:"BG",countryName:"Bulgaria",phoneNumberCode:"359"},{countryIsoCode:"BH",countryName:"Bahrain",phoneNumberCode:"973"},{countryIsoCode:"BI",countryName:"Burundi",phoneNumberCode:"257"},{countryIsoCode:"BJ",countryName:"Benin",phoneNumberCode:"229"},{countryIsoCode:"BL",countryName:"Saint Barthelemy",phoneNumberCode:"590"},{countryIsoCode:"BM",countryName:"Bermuda",phoneNumberCode:"1441"},{countryIsoCode:"BN",countryName:"Brunei Darussalam",phoneNumberCode:"673"},{countryIsoCode:"BO",countryName:"Bolivia",phoneNumberCode:"591"},{countryIsoCode:"BR",countryName:"Brazil",phoneNumberCode:"55"},{countryIsoCode:"BS",countryName:"Bahamas",phoneNumberCode:"1242"},{countryIsoCode:"BT",countryName:"Bhutan",phoneNumberCode:"975"},{countryIsoCode:"BV",countryName:"Bouvet Island",phoneNumberCode:"47"},{countryIsoCode:"BW",countryName:"Botswana",phoneNumberCode:"267"},{countryIsoCode:"BY",countryName:"Belarus",phoneNumberCode:"375"},{countryIsoCode:"BZ",countryName:"Belize",phoneNumberCode:"501"},{countryIsoCode:"CA",countryName:"Canada",phoneNumberCode:"1"},{countryIsoCode:"CC",countryName:"Cocos (Keeling) Islands",phoneNumberCode:"672"},{countryIsoCode:"CF",countryName:"Central African Republic",phoneNumberCode:"236"},{countryIsoCode:"CG",countryName:"Congo",phoneNumberCode:"242"},{countryIsoCode:"CH",countryName:"Switzerland",phoneNumberCode:"41"},{countryIsoCode:"CI",countryName:"Cote d`Ivoire",phoneNumberCode:"225"},{countryIsoCode:"CK",countryName:"Cook Islands",phoneNumberCode:"682"},{countryIsoCode:"CL",countryName:"Chile",phoneNumberCode:"56"},{countryIsoCode:"CM",countryName:"Cameroon",phoneNumberCode:"237"},{countryIsoCode:"CN",countryName:"China",phoneNumberCode:"86"},{countryIsoCode:"CO",countryName:"Colombia",phoneNumberCode:"57"},{countryIsoCode:"CR",countryName:"Costa Rica",phoneNumberCode:"506"},{countryIsoCode:"CU",countryName:"Cuba",phoneNumberCode:"53"},{countryIsoCode:"CV",countryName:"Cape Verde",phoneNumberCode:"238"},{countryIsoCode:"CW",countryName:"Curacao",phoneNumberCode:"5999"},{countryIsoCode:"CX",countryName:"Christmas Island",phoneNumberCode:"6189164"},{countryIsoCode:"CY",countryName:"Cyprus",phoneNumberCode:"357"},{countryIsoCode:"CZ",countryName:"Czechia",phoneNumberCode:"420"},{countryIsoCode:"DE",countryName:"Germany",phoneNumberCode:"49"},{countryIsoCode:"DJ",countryName:"Djibouti",phoneNumberCode:"253"},{countryIsoCode:"DK",countryName:"Denmark",phoneNumberCode:"45"},{countryIsoCode:"DM",countryName:"Dominica",phoneNumberCode:"1767"},{countryIsoCode:"DO",countryName:"Dominican Republic",phoneNumberCode:"1809"},{countryIsoCode:"DZ",countryName:"Algeria",phoneNumberCode:"213"},{countryIsoCode:"EC",countryName:"Ecuador",phoneNumberCode:"593"},{countryIsoCode:"EE",countryName:"Estonia",phoneNumberCode:"372"},{countryIsoCode:"EG",countryName:"Egypt",phoneNumberCode:"20"},{countryIsoCode:"EH",countryName:"Western Sahara",phoneNumberCode:"212"},{countryIsoCode:"ER",countryName:"Eritrea",phoneNumberCode:"291"},{countryIsoCode:"ES",countryName:"Spain",phoneNumberCode:"34"},{countryIsoCode:"ET",countryName:"Ethiopia",phoneNumberCode:"251"},{countryIsoCode:"FI",countryName:"Finland",phoneNumberCode:"358"},{countryIsoCode:"FJ",countryName:"Fiji",phoneNumberCode:"679"},{countryIsoCode:"FO",countryName:"Faroe Islands",phoneNumberCode:"298"},{countryIsoCode:"FR",countryName:"France",phoneNumberCode:"33"},{countryIsoCode:"GA",countryName:"Gabon",phoneNumberCode:"241"},{countryIsoCode:"GB",countryName:"United Kingdom",phoneNumberCode:"44"},{countryIsoCode:"GD",countryName:"Grenada",phoneNumberCode:"1473"},{countryIsoCode:"GE",countryName:"Georgia",phoneNumberCode:"995"},{countryIsoCode:"GF",countryName:"French Guiana",phoneNumberCode:"594"},{countryIsoCode:"GG",countryName:"Guernsey",phoneNumberCode:"441481"},{countryIsoCode:"GH",countryName:"Ghana",phoneNumberCode:"233"},{countryIsoCode:"GI",countryName:"Gibraltar",phoneNumberCode:"350"},{countryIsoCode:"GL",countryName:"Greenland",phoneNumberCode:"299"},{countryIsoCode:"GM",countryName:"Gambia",phoneNumberCode:"220"},{countryIsoCode:"GN",countryName:"Guinea",phoneNumberCode:"224"},{countryIsoCode:"GP",countryName:"Guadeloupe",phoneNumberCode:"590"},{countryIsoCode:"GQ",countryName:"Equatorial Guinea",phoneNumberCode:"240"},{countryIsoCode:"GR",countryName:"Greece",phoneNumberCode:"30"},{countryIsoCode:"GT",countryName:"Guatemala",phoneNumberCode:"502"},{countryIsoCode:"GU",countryName:"Guam",phoneNumberCode:"1671"},{countryIsoCode:"GW",countryName:"Guinea-Bissau",phoneNumberCode:"245"},{countryIsoCode:"GY",countryName:"Guyana",phoneNumberCode:"592"},{countryIsoCode:"HN",countryName:"Honduras",phoneNumberCode:"504"},{countryIsoCode:"HR",countryName:"Croatia",phoneNumberCode:"385"},{countryIsoCode:"HT",countryName:"Haiti",phoneNumberCode:"509"},{countryIsoCode:"HU",countryName:"Hungary",phoneNumberCode:"36"},{countryIsoCode:"ID",countryName:"Indonesia",phoneNumberCode:"62"},{countryIsoCode:"IE",countryName:"Ireland",phoneNumberCode:"353"},{countryIsoCode:"IL",countryName:"Israel",phoneNumberCode:"972"},{countryIsoCode:"IM",countryName:"Isle Of Man",phoneNumberCode:"441624"},{countryIsoCode:"IN",countryName:"India",phoneNumberCode:"91"},{countryIsoCode:"IO",countryName:"British Indian Ocean Territory",phoneNumberCode:"246"},{countryIsoCode:"IQ",countryName:"Iraq",phoneNumberCode:"964"},{countryIsoCode:"IR",countryName:"Iran (Islamic Republic of)",phoneNumberCode:"98"},{countryIsoCode:"IS",countryName:"Iceland",phoneNumberCode:"354"},{countryIsoCode:"IT",countryName:"Italy",phoneNumberCode:"39"},{countryIsoCode:"JE",countryName:"Jersey",phoneNumberCode:"441534"},{countryIsoCode:"JM",countryName:"Jamaica",phoneNumberCode:"1876"},{countryIsoCode:"JO",countryName:"Jordan",phoneNumberCode:"962"},{countryIsoCode:"JP",countryName:"Japan",phoneNumberCode:"81"},{countryIsoCode:"KE",countryName:"Kenya",phoneNumberCode:"254"},{countryIsoCode:"KG",countryName:"Kyrgyzstan",phoneNumberCode:"996"},{countryIsoCode:"KH",countryName:"Cambodia",phoneNumberCode:"855"},{countryIsoCode:"KI",countryName:"Kiribati",phoneNumberCode:"686"},{countryIsoCode:"KM",countryName:"Comoros",phoneNumberCode:"269"},{countryIsoCode:"KN",countryName:"Saint Kitts and Nevis",phoneNumberCode:"1869"},{countryIsoCode:"KR",countryName:"Republic of Korea",phoneNumberCode:"82"},{countryIsoCode:"KW",countryName:"Kuwait",phoneNumberCode:"965"},{countryIsoCode:"KY",countryName:"Cayman Islands",phoneNumberCode:"1345"},{countryIsoCode:"KZ",countryName:"Kazakhstan",phoneNumberCode:"7"},{countryIsoCode:"LB",countryName:"Lebanon",phoneNumberCode:"961"},{countryIsoCode:"LC",countryName:"Saint Lucia",phoneNumberCode:"1758"},{countryIsoCode:"LI",countryName:"Liechtenstein",phoneNumberCode:"423"},{countryIsoCode:"LK",countryName:"Sri Lanka",phoneNumberCode:"94"},{countryIsoCode:"LR",countryName:"Liberia",phoneNumberCode:"231"},{countryIsoCode:"LS",countryName:"Lesotho",phoneNumberCode:"266"},{countryIsoCode:"LT",countryName:"Lithuania",phoneNumberCode:"370"},{countryIsoCode:"LU",countryName:"Luxembourg",phoneNumberCode:"352"},{countryIsoCode:"LV",countryName:"Latvia",phoneNumberCode:"371"},{countryIsoCode:"LY",countryName:"Libyan Arab Jamahiriya",phoneNumberCode:"218"},{countryIsoCode:"MA",countryName:"Morocco",phoneNumberCode:"212"},{countryIsoCode:"MC",countryName:"Monaco",phoneNumberCode:"377"},{countryIsoCode:"MD",countryName:"Moldova (Republic of)",phoneNumberCode:"373"},{countryIsoCode:"ME",countryName:"Montenegro",phoneNumberCode:"382"},{countryIsoCode:"MF",countryName:"Saint Martin French",phoneNumberCode:"590"},{countryIsoCode:"MG",countryName:"Madagascar",phoneNumberCode:"261"},{countryIsoCode:"MH",countryName:"Marshall Islands",phoneNumberCode:"692"},{countryIsoCode:"ML",countryName:"Mali",phoneNumberCode:"223"},{countryIsoCode:"MM",countryName:"Myanmar",phoneNumberCode:"95"},{countryIsoCode:"MN",countryName:"Mongolia",phoneNumberCode:"976"},{countryIsoCode:"MP",countryName:"Northern Mariana Islands",phoneNumberCode:"1670"},{countryIsoCode:"MQ",countryName:"Martinique",phoneNumberCode:"596"},{countryIsoCode:"MR",countryName:"Mauritania",phoneNumberCode:"222"},{countryIsoCode:"MS",countryName:"Montserrat",phoneNumberCode:"1664"},{countryIsoCode:"MT",countryName:"Malta",phoneNumberCode:"356"},{countryIsoCode:"MU",countryName:"Mauritius",phoneNumberCode:"230"},{countryIsoCode:"MV",countryName:"Maldives",phoneNumberCode:"960"},{countryIsoCode:"MW",countryName:"Malawi",phoneNumberCode:"265"},{countryIsoCode:"MX",countryName:"Mexico",phoneNumberCode:"52"},{countryIsoCode:"MY",countryName:"Malaysia",phoneNumberCode:"60"},{countryIsoCode:"MZ",countryName:"Mozambique",phoneNumberCode:"258"},{countryIsoCode:"NA",countryName:"Namibia",phoneNumberCode:"264"},{countryIsoCode:"NC",countryName:"New Caledonia",phoneNumberCode:"687"},{countryIsoCode:"NE",countryName:"Niger",phoneNumberCode:"227"},{countryIsoCode:"NF",countryName:"Norfolk Island",phoneNumberCode:"672"},{countryIsoCode:"NG",countryName:"Nigeria",phoneNumberCode:"234"},{countryIsoCode:"NI",countryName:"Nicaragua",phoneNumberCode:"505"},{countryIsoCode:"NL",countryName:"Netherlands",phoneNumberCode:"31"},{countryIsoCode:"NO",countryName:"Norway",phoneNumberCode:"47"},{countryIsoCode:"NP",countryName:"Nepal",phoneNumberCode:"977"},{countryIsoCode:"NR",countryName:"Nauru",phoneNumberCode:"674"},{countryIsoCode:"NU",countryName:"Niue",phoneNumberCode:"683"},{countryIsoCode:"NZ",countryName:"New Zealand",phoneNumberCode:"64"},{countryIsoCode:"OM",countryName:"Oman",phoneNumberCode:"968"},{countryIsoCode:"PA",countryName:"Panama",phoneNumberCode:"507"},{countryIsoCode:"PE",countryName:"Peru",phoneNumberCode:"51"},{countryIsoCode:"PF",countryName:"French Polynesia",phoneNumberCode:"689"},{countryIsoCode:"PG",countryName:"Papua New Guinea",phoneNumberCode:"675"},{countryIsoCode:"PH",countryName:"Philippines",phoneNumberCode:"63"},{countryIsoCode:"PK",countryName:"Pakistan",phoneNumberCode:"92"},{countryIsoCode:"PL",countryName:"Poland",phoneNumberCode:"48"},{countryIsoCode:"PM",countryName:"Saint Pierre and Miquelon",phoneNumberCode:"508"},{countryIsoCode:"PN",countryName:"Pitcairn",phoneNumberCode:"64"},{countryIsoCode:"PR",countryName:"Puerto Rico",phoneNumberCode:"1787"},{countryIsoCode:"PT",countryName:"Portugal",phoneNumberCode:"351"},{countryIsoCode:"PW",countryName:"Palau",phoneNumberCode:"680"},{countryIsoCode:"PY",countryName:"Paraguay",phoneNumberCode:"595"},{countryIsoCode:"QA",countryName:"Qatar",phoneNumberCode:"974"},{countryIsoCode:"RE",countryName:"Reunion",phoneNumberCode:"262"},{countryIsoCode:"RO",countryName:"Romania",phoneNumberCode:"40"},{countryIsoCode:"RS",countryName:"Serbia",phoneNumberCode:"381"},{countryIsoCode:"RU",countryName:"Russian Federation",phoneNumberCode:"7"},{countryIsoCode:"RW",countryName:"Rwanda",phoneNumberCode:"250"},{countryIsoCode:"SA",countryName:"Saudi Arabia",phoneNumberCode:"966"},{countryIsoCode:"SB",countryName:"Solomon Islands",phoneNumberCode:"677"},{countryIsoCode:"SC",countryName:"Seychelles",phoneNumberCode:"248"},{countryIsoCode:"SD",countryName:"Sudan",phoneNumberCode:"249"},{countryIsoCode:"SE",countryName:"Sweden",phoneNumberCode:"46"},{countryIsoCode:"SG",countryName:"Singapore",phoneNumberCode:"65"},{countryIsoCode:"SH",countryName:"Saint Helena",phoneNumberCode:"290"},{countryIsoCode:"SI",countryName:"Slovenia",phoneNumberCode:"386"},{countryIsoCode:"SK",countryName:"Slovakia",phoneNumberCode:"421"},{countryIsoCode:"SL",countryName:"Sierra Leone",phoneNumberCode:"232"},{countryIsoCode:"SM",countryName:"San Marino",phoneNumberCode:"378"},{countryIsoCode:"SN",countryName:"Senegal",phoneNumberCode:"221"},{countryIsoCode:"SO",countryName:"Somalia",phoneNumberCode:"252"},{countryIsoCode:"SR",countryName:"Suriname",phoneNumberCode:"597"},{countryIsoCode:"SS",countryName:"South Sudan",phoneNumberCode:"211"},{countryIsoCode:"ST",countryName:"Sao Tome and Principe",phoneNumberCode:"239"},{countryIsoCode:"SV",countryName:"El Salvador",phoneNumberCode:"503"},{countryIsoCode:"SX",countryName:"Sint Maarten Dutch",phoneNumberCode:"1721"},{countryIsoCode:"SY",countryName:"Syrian Arab Republic",phoneNumberCode:"963"},{countryIsoCode:"SZ",countryName:"Swaziland",phoneNumberCode:"268"},{countryIsoCode:"TC",countryName:"Turks and Caicos Islands",phoneNumberCode:"1649"},{countryIsoCode:"TD",countryName:"Chad",phoneNumberCode:"235"},{countryIsoCode:"TF",countryName:"French Southern Territories",phoneNumberCode:"1"},{countryIsoCode:"TG",countryName:"Togo",phoneNumberCode:"228"},{countryIsoCode:"TH",countryName:"Thailand",phoneNumberCode:"66"},{countryIsoCode:"TJ",countryName:"Tajikistan",phoneNumberCode:"992"},{countryIsoCode:"TK",countryName:"Tokelau",phoneNumberCode:"690"},{countryIsoCode:"TL",countryName:"Timor-Leste (East Timor)",phoneNumberCode:"670"},{countryIsoCode:"TM",countryName:"Turkmenistan",phoneNumberCode:"993"},{countryIsoCode:"TN",countryName:"Tunisia",phoneNumberCode:"216"},{countryIsoCode:"TO",countryName:"Tonga",phoneNumberCode:"676"},{countryIsoCode:"TR",countryName:"Turkey",phoneNumberCode:"90"},{countryIsoCode:"TT",countryName:"Trinidad and Tobago",phoneNumberCode:"1868"},{countryIsoCode:"TV",countryName:"Tuvalu",phoneNumberCode:"688"},{countryIsoCode:"TW",countryName:"Taiwan (Province of China)",phoneNumberCode:"886"},{countryIsoCode:"TZ",countryName:"Tanzania (United Republic of)",phoneNumberCode:"255"},{countryIsoCode:"UA",countryName:"Ukraine",phoneNumberCode:"380"},{countryIsoCode:"UG",countryName:"Uganda",phoneNumberCode:"256"},{countryIsoCode:"US",countryName:"United States",phoneNumberCode:"1"},{countryIsoCode:"UY",countryName:"Uruguay",phoneNumberCode:"598"},{countryIsoCode:"UZ",countryName:"Uzbekistan",phoneNumberCode:"998"},{countryIsoCode:"VE",countryName:"Venezuela",phoneNumberCode:"58"},{countryIsoCode:"VG",countryName:"Virgin Islands British",phoneNumberCode:"1284"},{countryIsoCode:"VI",countryName:"Virgin Islands US",phoneNumberCode:"1340"},{countryIsoCode:"VN",countryName:"Vietnam",phoneNumberCode:"84"},{countryIsoCode:"VU",countryName:"Vanuatu",phoneNumberCode:"678"},{countryIsoCode:"WF",countryName:"Wallis and Futuna Islands",phoneNumberCode:"681"},{countryIsoCode:"WS",countryName:"Samoa",phoneNumberCode:"685"},{countryIsoCode:"XK",countryName:"Kosovo",phoneNumberCode:"383"},{countryIsoCode:"YE",countryName:"Yemen",phoneNumberCode:"967"},{countryIsoCode:"YT",countryName:"Mayotte",phoneNumberCode:"262269"},{countryIsoCode:"YU",countryName:"Yugoslavia",phoneNumberCode:"38"},{countryIsoCode:"ZA",countryName:"South Africa",phoneNumberCode:"27"},{countryIsoCode:"ZM",countryName:"Zambia",phoneNumberCode:"260"},{countryIsoCode:"ZW",countryName:"Zimbabwe",phoneNumberCode:"263"}];function gd(e){const n=md.find(t=>t.countryIsoCode===e);return n?`${n.countryIsoCode} +${n.phoneNumberCode}`:"US +1"}function T6({countryCode:e,setCountryCode:n,allowedCountryCodes:t}){const i=y.useRef(null),r=t&&t.length>0?md.filter(o=>t.includes(o.countryIsoCode)):md??[{countryIsoCode:"US",countryName:"United States",phoneNumberCode:1}];return a.jsxs(v6,{name:"countries",onChange:o=>{n(o.target.value)},ref:i,style:{padding:`${P.sm} ${P.md}`},value:e,children:[a.jsx(Z1,{style:{display:"none"},value:e,children:e}),r.map(o=>a.jsxs(Z1,{value:gd(o.countryIsoCode),children:[o.countryName," +",o.phoneNumberCode]},o.countryIsoCode))]})}const Z1=JI(()=>{const e=X();return{"&:hover":{background:e.colors.tertiaryBg},background:e.colors.modalBg,color:e.colors.primaryText,transition:"background 0.3s ease"}}),v6=KI(e=>{const n=X();return{"&::placeholder":{color:n.colors.secondaryText},"&[disabled]":{cursor:"not-allowed"},appearance:"none",background:"transparent",border:"none",borderRadius:G.lg,boxSizing:"border-box",color:n.colors.primaryText,cursor:"pointer",display:"block",maxWidth:"90px",minWidth:"0px",outline:"none",overflow:"hidden",padding:P.sm,textOverflow:"ellipsis",WebkitAppearance:"none",whiteSpace:"nowrap"}});function yd(e){const[n,t]=y.useState(e.defaultSmsCountryCode?gd(e.defaultSmsCountryCode):e.allowedSmsCountryCodes&&e.allowedSmsCountryCodes.length>0&&e.allowedSmsCountryCodes[0]?gd(e.allowedSmsCountryCodes[0]):"US +1"),[i,r]=y.useState(""),[o,s]=y.useState(),[c,l]=y.useState(!1),h=()=>{l(!0),!(!i||o)&&e.onSelect(e.format==="phone"?`+${n.split("+")[1]}${i}`:i)},d=c&&!!o||!i&&!!e.emptyErrorMessage&&c;return a.jsxs("div",{style:{width:"100%"},children:[a.jsxs(E6,{className:e.className,"data-error":d,style:{display:"flex",flexDirection:"row",position:"relative"},children:[e.lastUsedBadge&&a.jsx(d0,{}),e.format==="phone"&&a.jsx(T6,{allowedCountryCodes:e.allowedSmsCountryCodes,countryCode:n,setCountryCode:t}),a.jsx(xr,{disabled:e.disabled,name:e.name,onChange:f=>{r(f.target.value),e.errorMessage?s(e.errorMessage(f.target.value)):s(void 0)},onKeyDown:f=>{f.key==="Enter"&&h()},placeholder:e.placeholder,style:{flexGrow:1,padding:`${P.sm} ${e.format==="phone"?0:P.sm}`},tabIndex:-1,type:e.type,value:i,variant:"transparent"}),a.jsx(bi,{disabled:e.disabled,onClick:h,style:{borderRadius:`0 ${G.md} ${G.md} 0`,padding:P.sm},children:a.jsx(nb,{height:A.md,width:A.md})})]}),c&&o&&a.jsxs(a.Fragment,{children:[a.jsx(U,{y:"xs"}),a.jsx(k,{color:"danger",size:"sm",children:o})]}),!(c&&o)&&!i&&e.emptyErrorMessage&&c&&a.jsxs(a.Fragment,{children:[a.jsx(U,{y:"xs"}),a.jsx(k,{color:"danger",size:"sm",children:e.emptyErrorMessage})]})]})}function N6(e){return/^\S+@\S+\.\S+$/.test(e.replace(/\+/g,""))}function S6(e){switch(e){case"google":return"Sign In - Google Accounts";default:return`Sign In - ${e.slice(0,1).toUpperCase()}${e.slice(1)}`}}function A6(e){switch(e){case"facebook":return{height:555,width:715};default:return{height:500,width:350}}}function D6(e,n,t){switch(e){case"apple":case"facebook":case"google":case"farcaster":case"telegram":case"github":case"twitch":case"steam":case"line":case"x":case"tiktok":case"epic":case"guest":case"coinbase":case"discord":return p3({authOption:e,client:n,ecosystem:t});default:throw new Error(`Unsupported auth option: ${e}`)}}function my({authOption:e,themeObj:n,client:t,ecosystem:i}){const{height:r,width:o}=A6(e),s=(window.innerHeight-r)/2,c=(window.innerWidth-o)/2,l=window.open(D6(e,t,i),void 0,`width=${o}, height=${r}, top=${s}, left=${c}`);if(l){const h=S6(e);l.document.title=h,l.document.body.innerHTML=O6,l.document.body.style.background=n.colors.modalBg,l.document.body.style.color=n.colors.accentText}return l&&window.addEventListener("beforeunload",()=>{l==null||l.close()}),l}const O6=`
|
|
96
|
+
<svg class="loader" viewBox="0 0 50 50">
|
|
97
|
+
<circle
|
|
98
|
+
cx="25"
|
|
99
|
+
cy="25"
|
|
100
|
+
r="20"
|
|
101
|
+
fill="none"
|
|
102
|
+
stroke="currentColor"
|
|
103
|
+
stroke-width="4"
|
|
104
|
+
/>
|
|
105
|
+
</svg>
|
|
106
|
+
|
|
107
|
+
<style>
|
|
108
|
+
body,
|
|
109
|
+
html {
|
|
110
|
+
height: 100%;
|
|
111
|
+
margin: 0;
|
|
112
|
+
padding: 0;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
body {
|
|
116
|
+
display: flex;
|
|
117
|
+
justify-content: center;
|
|
118
|
+
align-items: center;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.loader {
|
|
122
|
+
width: 50px;
|
|
123
|
+
height: 50px;
|
|
124
|
+
animation: spin 2s linear infinite;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.loader circle {
|
|
128
|
+
animation: loading 1.5s linear infinite;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@keyframes loading {
|
|
132
|
+
0% {
|
|
133
|
+
stroke-dasharray: 1, 150;
|
|
134
|
+
stroke-dashoffset: 0;
|
|
135
|
+
}
|
|
136
|
+
50% {
|
|
137
|
+
stroke-dasharray: 90, 150;
|
|
138
|
+
stroke-dashoffset: -35;
|
|
139
|
+
}
|
|
140
|
+
100% {
|
|
141
|
+
stroke-dasharray: 90, 150;
|
|
142
|
+
stroke-dashoffset: -124;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
@keyframes spin {
|
|
147
|
+
100% {
|
|
148
|
+
transform: rotate(360deg);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
</style>
|
|
152
|
+
`,pd=["email","phone","google","apple","facebook","passkey"],gy=e=>{var F,Q,Z,ne,ce,q,le;const n=e.locale,{wallet:t}=e,i=uo(),r=X(),o=y.useMemo(()=>b6(),[]),s=y.useMemo(()=>gl(),[]),c=y.useMemo(()=>{var re,oe;return e.wallet.id==="inApp"?(oe=(re=e.wallet.getConfig())==null?void 0:re.metadata)==null?void 0:oe.image:void 0},[e.wallet]),l={apple:n.signInWithApple,coinbase:"Coinbase",discord:n.signInWithDiscord,facebook:n.signInWithFacebook,farcaster:"Farcaster",github:"GitHub",google:n.signInWithGoogle,line:"LINE",steam:"Steam",telegram:"Telegram",twitch:"Twitch",x:"X",tiktok:"TikTok",epic:"Epic"},{data:h,isLoading:d}=pe({enabled:De(t),queryFn:async()=>{if(De(t)){const re=await c3(t.id);return(re==null?void 0:re.authOptions)??null}return null},queryKey:["auth-options",t.id],retry:!1}),f=De(t)?h??pd:((Q=(F=t.getConfig())==null?void 0:F.auth)==null?void 0:Q.options)??pd,m=y.useMemo(()=>!o||t.id!==s?f:[...f].sort((re,oe)=>o===re?-1:o===oe?1:0),[f,o,t.id,s]),g=m.indexOf("email"),w=g!==-1,p=m.indexOf("phone"),_=p!==-1,x=m.filter(re=>Hg.includes(re)),I=y.useMemo(()=>{switch(x.length){case 7:return 4;case 6:return 4;default:return 5}},[x.length]),b=y.useMemo(()=>Array.from({length:Math.ceil(x.length/I)},(re,oe)=>x.slice(oe*I,(oe+1)*I)),[x,I]),[j,C]=y.useState(null),E=y.useMemo(()=>j||(w&&_?g<p?"email":"phone":w?"email":_?"phone":"none"),[w,_,g,p,j]);if(De(t)&&d)return a.jsx(ct,{});const T=m.includes("passkey"),O=m.includes("guest"),L=m.includes("wallet"),N=E==="email"?n.emailPlaceholder:n.phonePlaceholder,v=E==="email"?n.emailRequired:n.phoneRequired;let D="text";E==="email"?D="email":E==="phone"&&(D="tel");const z=x.length>0,V=De(t)?{id:t.id,partnerId:(Z=t.getConfig())==null?void 0:Z.partnerId}:void 0,R=async()=>{const re={chain:e.chain,client:e.client,ecosystem:V,strategy:"guest"},oe=(async()=>{const ue=await t.connect(re);return Ci("guest",Pt),ue})();i({guestLogin:{connectionPromise:oe}}),e.select()},B=async re=>{var Ce,Ue;const oe=t.getConfig(),ue=((Ce=oe==null?void 0:oe.auth)==null?void 0:Ce.mode)??"popup";if(oe&&"auth"in oe&&ue!=="popup"&&!e.isLinking)return zg({authOption:re,client:e.client,ecosystem:V,mode:ue,redirectUrl:(Ue=oe==null?void 0:oe.auth)==null?void 0:Ue.redirectUrl});try{const Ge=my({authOption:re,client:e.client,ecosystem:V,themeObj:r});if(!Ge)throw new Error("Failed to open login window");const rt={chain:e.chain,client:e.client,closeOpenedWindow:fe=>{fe.close()},ecosystem:V,openedWindow:Ge,strategy:re},de=(()=>{if(e.isLinking){if(t.id!=="inApp"&&!De(t))throw new Error("Only in-app wallets support multi-auth");return Kr(rt)}const fe=t.connect(rt);return Ci(re,Pt),fe})();i({socialLogin:{connectionPromise:de,type:re}}),e.select()}catch(Ge){console.error(`Error signing in with ${re}`,Ge)}};function Y(){i({passkeyLogin:!0}),e.select()}function $(){i({walletLogin:{linking:e.isLinking||!1}}),e.select()}const W=x.length>2;return a.jsxs(M,{flex:"column",gap:"md",style:{position:"relative"},children:[c&&a.jsxs(a.Fragment,{children:[a.jsx(He,{alt:c.alt,client:e.client,height:`${c.height}`,src:c.src,style:{margin:"auto"},width:`${c.width}`}),a.jsx(U,{y:"xxs"})]}),z&&a.jsx(M,{flex:"column",gap:x.length>4?"xs":"sm",children:b.map(re=>a.jsx(k6,{children:re.map(oe=>{const ue=!W||x.length>4?A.md:A.lg;return a.jsxs(z6,{className:"tw-social-button","aria-label":`Login with ${oe}`,"data-variant":W?"icon":"full",disabled:e.disabled,onClick:()=>{B(oe)},style:{flexGrow:x.length<7?1:0,position:"relative"},variant:"outline",children:[s===t.id&&o===oe&&a.jsx(d0,{}),a.jsx(He,{client:e.client,height:ue,src:kr[oe],width:ue}),!W&&`${x.length===1?"Continue with ":""}${l[oe]}`]},oe)})},re[0]))}),e.size==="wide"&&z&&(w||_)&&a.jsx(fy,{text:n.or}),w&&(E==="email"?a.jsx(yd,{className:"tw-input-container tw-input-container__email",lastUsedBadge:s===t.id&&o==="email",disabled:e.disabled,emptyErrorMessage:v,errorMessage:re=>{if(!N6(re.toLowerCase()))return n.invalidEmail},name:"email",onSelect:re=>{i({emailLogin:re}),e.select()},placeholder:N,submitButtonText:n.submitEmail,type:D}):a.jsx(Nr,{lastUsedBadge:s===t.id&&o==="email",className:"tw-select-button tw-select-button__email",client:e.client,disabled:e.disabled,icon:ul,onClick:()=>{C("email")},title:n.emailPlaceholder})),_&&(E==="phone"?a.jsx(yd,{className:"tw-input-container tw-input-container__phone",allowedSmsCountryCodes:(ce=(ne=t.getConfig())==null?void 0:ne.auth)==null?void 0:ce.allowedSmsCountryCodes,defaultSmsCountryCode:(le=(q=t.getConfig())==null?void 0:q.auth)==null?void 0:le.defaultSmsCountryCode,lastUsedBadge:s===t.id&&o==="phone",disabled:e.disabled,emptyErrorMessage:v,errorMessage:re=>{const oe=re.replace(/[-() ]/g,"");if(!/^[0-9]+$/.test(oe)&&_)return n.invalidPhone},format:"phone",name:"phone",onSelect:re=>{i({phoneLogin:re.replace(/[-() ]/g,"")}),e.select()},placeholder:N,submitButtonText:n.submitEmail,type:D}):a.jsx(Nr,{lastUsedBadge:s===t.id&&o==="phone",className:"tw-select-button tw-select-button__phone",client:e.client,disabled:e.disabled,icon:dl,onClick:()=>{C("phone")},title:n.phonePlaceholder})),T&&a.jsx(Nr,{lastUsedBadge:s===t.id&&o==="passkey",className:"tw-select-button tw-select-button__passkey",client:e.client,disabled:e.disabled,icon:ho,onClick:()=>{Y()},title:n.passkey}),L&&!e.isLinking&&a.jsx(Nr,{lastUsedBadge:s===t.id&&o==="wallet",className:"tw-select-button tw-select-button__link-wallet",client:e.client,icon:to,onClick:()=>{$()},title:n.signInWithWallet}),O&&a.jsx(Nr,{lastUsedBadge:s===t.id&&o==="guest",className:"tw-select-button tw-select-button__guest",client:e.client,disabled:e.disabled,icon:s0,onClick:()=>{R()},title:n.loginAsGuest}),e.isLinking&&a.jsx(Nr,{lastUsedBadge:!1,className:"tw-select-button tw-select-button__link-wallet",client:e.client,icon:to,onClick:()=>{$()},title:n.linkWallet})]})},k6=e=>a.jsx(M,{center:"x",flex:"row",gap:e.children.length>4?"xs":"sm",style:{display:"flex",justifyContent:"center","& > *":{flexBasis:`${100/e.children.length}%`,maxWidth:`${100/e.children.length}%`}},children:e.children}),z6=ze(ae)({"&[data-variant='full']":{"&:active":{boxShadow:"none"},display:"flex",fontSize:ie.md,fontWeight:500,gap:P.sm,justifyContent:"flex-start",padding:P.md,transition:"background-color 0.2s ease"},"&[data-variant='icon']":{padding:P.sm}});function P6(e){var f,m;const n=(((m=(f=e.wallet.getConfig())==null?void 0:f.auth)==null?void 0:m.options)||pd).slice().sort((g,w)=>g in kr&&!(w in kr)?-1:!(g in kr)&&w in kr?1:0),t=X(),i=n[0],r=n[1],o=n[2],s=n[3],c="4px",l="6px",h="20",d="12";return i&&r?a.jsxs("div",{style:{width:`${A.xl}px`,height:`${A.xl}px`,position:"relative",gap:P["3xs"],border:`1px solid ${t.colors.borderColor}`,borderRadius:G.md,backgroundColor:t.colors.tertiaryBg},children:[a.jsx("div",{style:{position:"absolute",top:c,left:c,display:"flex"},children:a.jsx(ps,{authOption:i,client:e.client,size:h})}),a.jsx("div",{style:{position:"absolute",bottom:c,right:c,display:"flex"},children:a.jsx(ps,{authOption:r,client:e.client,size:h})}),a.jsxs("div",{children:[o&&a.jsx("div",{style:{position:"absolute",top:l,right:l,display:"flex"},children:a.jsx(ps,{authOption:o,client:e.client,size:d})}),s&&a.jsx("div",{style:{position:"absolute",bottom:l,left:l,display:"flex"},children:a.jsx(ps,{authOption:s,client:e.client,size:d})})]})]}):i?a.jsx("div",{style:{width:`${A.xl}px`,height:`${A.xl}px`,display:"flex",justifyContent:"center",alignItems:"center",border:`1px solid ${t.colors.borderColor}`,borderRadius:G.md,backgroundColor:t.colors.tertiaryBg},children:a.jsx(ps,{authOption:i,client:e.client,size:A.lg},i)}):null}function ps(e){const n=X();if(e.authOption in kr){const t=kr[e.authOption];return a.jsx(He,{src:t,width:e.size,height:e.size,client:e.client})}return e.authOption==="phone"?a.jsx(dl,{size:e.size,color:n.colors.secondaryText}):e.authOption==="email"?a.jsx(ul,{size:e.size,color:n.colors.secondaryText}):e.authOption==="passkey"?a.jsx(ho,{size:e.size,color:n.colors.secondaryText}):e.authOption==="guest"?a.jsx(s0,{size:e.size,color:n.colors.secondaryText}):null}function h0(e){var f,m,g,w,p,_;const{selectWallet:n,wallet:t}=e,i=t.id,r=(f=e.recommendedWallets)==null?void 0:f.find(x=>x.id===i),o=cs(i),s=((m=Ii().find(x=>x.info.rdns===i))==null?void 0:m.info.name)||((g=o.data)==null?void 0:g.name),c=Ii().find(x=>x.info.rdns===i),l=t&&i==="inApp"?(w=t.getConfig())==null?void 0:w.metadata:void 0;let h=(l==null?void 0:l.name)||s;const d=l==null?void 0:l.icon;if(t.id==="inApp"){const x=t.getConfig();if(((p=x==null?void 0:x.auth)==null?void 0:p.options.length)===1){const I=(_=x.auth)==null?void 0:_.options[0];I&&(h=R6({text:I}))}}return a.jsxs(f0,{className:e.className,"data-active":e.isActive,onClick:n,type:"button",children:[d?a.jsx(He,{alt:"",client:e.client,height:`${A.xl}`,src:d,width:`${A.xl}`}):t.id==="inApp"?a.jsx(P6,{client:e.client,wallet:t}):a.jsx(Vn,{client:e.client,id:i,size:A.xl}),a.jsxs(M,{expand:!0,flex:"column",gap:"xxs",children:[h?a.jsx(k,{color:"primaryText",weight:500,children:h}):a.jsx(ge,{height:ie.md,width:"100px"}),e.badge?a.jsx(k,{size:"sm",children:e.badge}):r?a.jsx(k,{size:"sm",children:e.connectLocale.recommended}):c?a.jsx(k,{size:"sm",children:e.connectLocale.installed}):null]})]})}const f0=Ti(e=>{const n=X();return{all:"unset","&:hover":{backgroundColor:n.colors.tertiaryBg,transform:"scale(1.01)"},'&[data-active="true"]':{backgroundColor:n.colors.tertiaryBg},alignItems:"center",borderRadius:G.md,boxSizing:"border-box",color:n.colors.secondaryText,cursor:"pointer",display:"flex",flexDirection:"row",gap:P.sm,padding:`${P.xs} ${P.xs}`,transition:"background-color 200ms ease, transform 200ms ease",width:"100%"}});function R6(e){return e.text.charAt(0).toUpperCase()+e.text.slice(1)}async function V6(e){switch(e){case"es_ES":return(await u(async()=>{const{default:n}=await import("./es-D1JvwHmW.js");return{default:n}},[])).default;case"ja_JP":return(await u(async()=>{const{default:n}=await import("./ja-qsQcCBfK.js");return{default:n}},[])).default;case"tl_PH":return(await u(async()=>{const{default:n}=await import("./tl-LjGyFSL6.js");return{default:n}},[])).default;case"vi_VN":return(await u(async()=>{const{default:n}=await import("./vi-BmXdTnDJ.js");return{default:n}},[])).default;case"de_DE":return(await u(async()=>{const{default:n}=await import("./de-HLnDQwsk.js");return{default:n}},[])).default;case"ko_KR":return(await u(async()=>{const{default:n}=await import("./kr-CBFJeZbH.js");return{default:n}},[])).default;case"fr_FR":return(await u(async()=>{const{default:n}=await import("./fr-DQrXBak2.js");return{default:n}},[])).default;case"ru_RU":return(await u(async()=>{const{default:n}=await import("./ru-BDcqn2vv.js");return{default:n}},[])).default;case"pt_BR":return(await u(async()=>{const{default:n}=await import("./br-Bh5kquYi.js");return{default:n}},[])).default;case"zh_CN":return(await u(async()=>{const{default:n}=await import("./zh-8Oiy2Jay.js");return{default:n}},[])).default;default:return(await u(async()=>{const{default:n}=await import("./en-lXclJmNl.js");return{default:n}},[])).default}}function yy(e){const[n,t]=y.useState(void 0);return y.useEffect(()=>{V6(e).then(i=>{t(i)})},[e]),n}function U6(e){const{screen:n}=u0(),t=uo(),i=yy(e.connectLocale.id);return e.size==="wide"||n!==At.main&&e.size==="compact"?a.jsx(h0,{badge:void 0,client:e.client,connectLocale:e.connectLocale,isActive:n===e.wallet,recommendedWallets:e.recommendedWallets,selectWallet:()=>{t({}),e.select()},wallet:e.wallet}):i?a.jsx(gy,{chain:e.chain,client:e.client,disabled:e.disabled,done:e.done,goBack:e.goBack,locale:i,select:e.select,size:e.size,wallet:e.wallet}):a.jsx(ct,{height:"195px"})}async function B6(e){switch(e){case"es_ES":return(await u(async()=>{const{default:n}=await import("./es-BoeWNXZK.js");return{default:n}},[])).default;case"ja_JP":return(await u(async()=>{const{default:n}=await import("./ja-B_14a7-i.js");return{default:n}},[])).default;case"tl_PH":return(await u(async()=>{const{default:n}=await import("./tl-DgU76fWy.js");return{default:n}},[])).default;case"vi_VN":return(await u(async()=>{const{default:n}=await import("./vi-CeeFZUD3.js");return{default:n}},[])).default;case"de_DE":return(await u(async()=>{const{default:n}=await import("./de-DxwDt0Si.js");return{default:n}},[])).default;case"ko_KR":return(await u(async()=>{const{default:n}=await import("./kr-C28WMrvF.js");return{default:n}},[])).default;case"fr_FR":return(await u(async()=>{const{default:n}=await import("./fr-Cl9YKZtN.js");return{default:n}},[])).default;case"ru_RU":return(await u(async()=>{const{default:n}=await import("./ru-CRpUAoj9.js");return{default:n}},[])).default;case"pt_BR":return(await u(async()=>{const{default:n}=await import("./br-Bzf0kdCg.js");return{default:n}},[])).default;case"zh_CN":return(await u(async()=>{const{default:n}=await import("./zh-DNrmKyYe.js");return{default:n}},[])).default;default:return(await u(async()=>{const{default:n}=await import("./en-wiTKdR4T.js");return{default:n}},[])).default}}async function W6(e){switch(e){case"es_ES":return(await u(async()=>{const{default:n}=await import("./es-Dar-xg4p.js");return{default:n}},[])).default;case"ja_JP":return(await u(async()=>{const{default:n}=await import("./ja-DI56VDCk.js");return{default:n}},[])).default;case"tl_PH":return(await u(async()=>{const{default:n}=await import("./tl-DNpoqKxi.js");return{default:n}},[])).default;case"vi_VN":return(await u(async()=>{const{default:n}=await import("./vi-rl4iq8bS.js");return{default:n}},[])).default;case"de_DE":return(await u(async()=>{const{default:n}=await import("./de-BIWVAXLP.js");return{default:n}},[])).default;case"ko_KR":return(await u(async()=>{const{default:n}=await import("./kr-BP_x8d-4.js");return{default:n}},[])).default;case"fr_FR":return(await u(async()=>{const{default:n}=await import("./fr-Biip2F0B.js");return{default:n}},[])).default;case"ru_RU":return(await u(async()=>{const{default:n}=await import("./ru-ov3iIk3P.js");return{default:n}},[])).default;case"pt_BR":return(await u(async()=>{const{default:n}=await import("./br-OOdQ3ULT.js");return{default:n}},[])).default;case"zh_CN":return(await u(async()=>{const{default:n}=await import("./zh-DrVkc5qI.js");return{default:n}},[])).default;default:return(await u(async()=>{const{default:n}=await import("./en-C9j038gl.js");return{default:n}},[])).default}}const G1=e=>a.jsx("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 23 28",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M22.4181 21.6041C22.008 22.5506 21.5224 23.422 20.9599 24.223C20.1931 25.3151 19.5652 26.0711 19.0814 26.4908C18.3313 27.1799 17.5277 27.5327 16.6671 27.5528C16.0493 27.5528 15.3043 27.3772 14.437 27.021C13.5669 26.6664 12.7673 26.4908 12.0362 26.4908C11.2694 26.4908 10.447 26.6664 9.56734 27.021C8.68636 27.3772 7.97665 27.5628 7.43403 27.5812C6.60879 27.6164 5.78624 27.2534 4.96519 26.4908C4.44116 26.0343 3.78569 25.2516 3.00047 24.1428C2.15799 22.9587 1.46536 21.5857 0.92274 20.0203C0.341611 18.3295 0.050293 16.6922 0.050293 15.1071C0.050293 13.2914 0.44307 11.7253 1.2298 10.413C1.84809 9.35886 2.67065 8.52734 3.70014 7.91691C4.72963 7.30648 5.84199 6.99541 7.03991 6.97551C7.69538 6.97551 8.55493 7.17804 9.6231 7.57607C10.6882 7.97544 11.3722 8.17797 11.672 8.17797C11.8962 8.17797 12.656 7.94116 13.944 7.46904C15.162 7.0312 16.19 6.84991 17.0321 6.92133C19.3141 7.10529 21.0285 8.00387 22.1687 9.62276C20.1278 10.858 19.1182 12.5881 19.1383 14.8076C19.1567 16.5363 19.7846 17.9749 21.0185 19.1172C21.5777 19.6473 22.2022 20.0571 22.897 20.3481C22.7463 20.7846 22.5872 21.2027 22.4181 21.6041ZM17.1845 1.03178C17.1845 2.38678 16.6889 3.65194 15.7011 4.82296C14.509 6.21507 13.0672 7.0195 11.5036 6.89256C11.4837 6.73 11.4721 6.55892 11.4721 6.37913C11.4721 5.07833 12.039 3.68622 13.0457 2.54798C13.5484 1.97167 14.1876 1.49247 14.9628 1.11021C15.7363 0.733653 16.4679 0.525407 17.156 0.489746C17.1761 0.670889 17.1845 0.85206 17.1845 1.03178Z",fill:"#959CA0"})}),$6=e=>a.jsx("svg",{height:e.size,role:"presentation",viewBox:"0 0 190.5 190.5",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:a.jsxs("g",{transform:"translate(90.669 -507.469)",children:[a.jsx("path",{clipPath:"none",d:"M4.583 650.342c26.304 0 47.627-21.324 47.627-47.628s-21.323-47.628-47.627-47.628-47.627 21.324-47.627 47.628 21.323 47.628 47.627 47.628z",fill:"#fff",mask:"none"}),a.jsx("path",{clipPath:"none",d:"M-36.664 626.539l-41.24-71.43c-8.362 14.479-12.765 30.904-12.765 47.625s4.401 33.146 12.762 47.625 20.387 26.503 34.868 34.86 30.908 12.755 47.628 12.75l41.24-71.43v-.011c-4.177 7.244-10.188 13.26-17.428 17.443a47.62 47.62 0 0 1-47.632.007 47.62 47.62 0 0 1-17.433-17.437z",fill:"#229342",mask:"none"}),a.jsx("path",{clipPath:"none",d:"M45.826 626.536l-41.239 71.43c16.72.003 33.146-4.398 47.626-12.757s26.504-20.384 34.863-34.865a95.24 95.24 0 0 0 12.755-47.627c-.003-16.72-4.408-33.145-12.772-47.623H4.58l-.01.007a47.62 47.62 0 0 1 23.819 6.372c7.243 4.179 13.257 10.19 17.439 17.431a47.62 47.62 0 0 1-.001 47.633z",fill:"#fbc116",mask:"none"}),a.jsx("path",{clipPath:"none",d:"M4.583 640.43c20.824 0 37.705-16.881 37.705-37.706s-16.881-37.705-37.705-37.705-37.705 16.881-37.705 37.705 16.881 37.706 37.705 37.706z",fill:"#1a73e8",mask:"none"}),a.jsx("path",{clipPath:"none",d:"M4.583 555.097h82.479c-8.358-14.481-20.381-26.507-34.861-34.868a95.23 95.23 0 0 0-47.625-12.76c-16.72.001-33.145 4.404-47.623 12.767a95.23 95.23 0 0 0-34.856 34.872l41.24 71.43.011.006a47.62 47.62 0 0 1-.015-47.633c4.179-7.242 10.193-13.256 17.434-17.436s15.456-6.381 23.818-6.379z",fill:"#e33b2e",mask:"none"})]})}),q1=e=>a.jsxs("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 23 26",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("path",{d:"M10.5832 12.0978L0.0976562 23.2275C0.0980507 23.2298 0.0988382 23.2317 0.0992076 23.2341C0.420793 24.4427 1.52467 25.3326 2.83473 25.3326C3.35844 25.3326 3.85012 25.191 4.27179 24.9424L4.30528 24.9228L16.1087 18.1117L10.5838 12.0977",fill:"#EB3131"}),a.jsx("path",{d:"M21.1922 10.2046L21.1821 10.1977L16.0862 7.2435L10.345 12.3523L16.1061 18.1127L21.1752 15.1879C22.0639 14.7081 22.6672 13.7712 22.6672 12.6908C22.6672 11.6182 22.072 10.6859 21.1922 10.2046Z",fill:"#F6B60B"}),a.jsx("path",{d:"M0.0961678 2.10416C0.0331317 2.33661 0 2.58009 0 2.83292V22.5002C0 22.7526 0.0327407 22.9969 0.0965672 23.2285L10.9441 12.3832L0.0965672 2.10444",fill:"#5778C5"}),a.jsx("path",{d:"M10.6603 12.6667L16.088 7.24061L4.29785 0.404818C3.8693 0.148138 3.36912 0 2.83391 0C1.52384 0 0.418474 0.891502 0.0968301 2.10147C0.0964356 2.10265 0.0964355 2.10347 0.0964355 2.1045L10.6603 12.6669",fill:"#3BAD49"})]}),Y6=y.lazy(()=>u(()=>import("./QRCodeRenderer-C2O8aJw5.js"),__vite__mapDeps([51,1,2]))),m0=e=>{const n=e.size||310,t=a.jsxs(Z6,{style:{height:`${n}px`,width:`${n}px`},children:[a.jsx("span",{"data-v1":!0}),a.jsx("span",{"data-v2":!0}),a.jsx("span",{"data-v3":!0}),a.jsx("div",{})]});return a.jsxs("div",{style:{display:"flex",justifyContent:"center",position:"relative"},children:[e.qrCodeUri?a.jsx(y.Suspense,{fallback:t,children:a.jsx(Q6,{children:a.jsx(Y6,{clearSize:e.QRIcon?70:void 0,ecl:"M",size:n+20,uri:e.qrCodeUri})})}):t,e.QRIcon&&a.jsx(F6,{children:e.QRIcon})]})},F6=Se({alignContent:"center",display:"flex",justifyContent:"center",left:"50%",position:"absolute",top:"50%",transform:"translate(-50%, -50%)",zIndex:1e3}),Q6=Se(()=>{const e=X();return{"--ck-body-background":e.colors.modalBg,"--ck-qr-background":e.colors.modalBg,"--ck-qr-dot-color":e.colors.primaryText,animation:`${lo} 600ms ease`}}),H6=vt`
|
|
153
|
+
0%{ background-position: 100% 0; }
|
|
154
|
+
100%{ background-position: -100% 0; }
|
|
155
|
+
`,Z6=Se(e=>{const n=X();return{"--bg":n.colors.modalBg,"--color":n.colors.skeletonBg,"&::after":{animation:`${H6} 1000ms linear infinite both`,background:"linear-gradient(90deg, transparent 50%, var(--color), transparent)",backgroundSize:"200% 100%",content:'""',inset:0,position:"absolute",transform:"scale(1.5) rotate(45deg)",zIndex:100},"&:before":{background:"repeat",backgroundImage:"radial-gradient(var(--color) 41%, transparent 41%)",backgroundSize:"1.888% 1.888%",content:'""',inset:0,position:"absolute",zIndex:3},"> div":{background:"var(--bg)",borderRadius:"5px",boxShadow:"0 0 0 7px var(--bg)",height:"28%",position:"relative",width:"28%",zIndex:4},"> span":{"&:before":{borderRadius:"3px",boxShadow:"0 0 0 4px var(--bg)",content:'""',inset:"9px",position:"absolute"},"&[data-v1]":{left:0,top:0},"&[data-v2]":{right:0,top:0},"&[data-v3]":{bottom:0,left:0},background:"var(--color)",borderRadius:"12px",boxShadow:"0 0 0 4px var(--bg)",height:"13.25%",position:"absolute",width:"13.25%",zIndex:4},alignItems:"center",borderRadius:G.md,display:"flex",justifyContent:"center",overflow:"hidden",position:"relative"}}),K1=({wallet:e,walletInfo:n,header:t,footer:i,onBack:r,locale:o,client:s})=>{const[c,l]=y.useState("base"),h=c==="android-scan"||c==="ios-scan",d=r?()=>{c==="base"?r():l("base")}:void 0;return a.jsx(M,{animate:"fadein",flex:"column",fullHeight:!0,children:a.jsxs(M,{expand:!0,flex:"column",p:"lg",children:[c==="android-scan"&&n.app.android&&a.jsx(J1,{client:s,locale:{scanToDownload:o.getStartedScreen.instruction},onBack:d,platform:"Google Play",platformIcon:a.jsx(q1,{size:A.md}),url:n.app.android,walletId:e.id,walletName:n.name}),c==="ios-scan"&&n.app.ios&&a.jsx(J1,{client:s,locale:{scanToDownload:o.getStartedScreen.instruction},onBack:d,platform:"App Store",platformIcon:a.jsx(G1,{size:A.md}),url:n.app.ios,walletId:e.id,walletName:n.name}),c==="base"&&a.jsxs(M,{expand:!0,flex:"column",children:[t||a.jsx(_e,{onBack:d,title:n.name}),a.jsx(U,{y:"xl"}),a.jsx(M,{animate:"fadein",center:"y",expand:!0,flex:"column",style:{minHeight:"250px"},children:a.jsxs(M,{flex:"column",gap:"xs",children:[n.app.chrome&&a.jsxs(Zl,{onClick:()=>{hr(n.app.chrome||"")},children:[a.jsx($6,{size:A.lg}),a.jsx("span",{children:o.download.chrome})]}),n.app.android&&a.jsxs(Zl,{as:"button",onClick:()=>{Mi()?hr(n.app.android||""):l("android-scan")},children:[a.jsx(q1,{size:A.lg}),a.jsx("span",{children:o.download.android})]}),n.app.ios&&a.jsxs(Zl,{as:"button",onClick:()=>{Mi()?hr(n.app.ios||""):l("ios-scan")},children:[a.jsx(G1,{size:A.lg}),a.jsx("span",{children:o.download.iOS})]})]})})]}),!h&&i]})})},J1=e=>a.jsxs(M,{animate:"fadein",expand:!0,children:[a.jsx(_e,{onBack:e.onBack,title:e.walletName}),a.jsx(U,{y:"xl"}),a.jsxs(M,{center:"both",expand:!0,flex:"column",style:{textAlign:"center"},children:[a.jsx(m0,{QRIcon:a.jsx(Vn,{client:e.client,id:e.walletId,size:A.xxl}),qrCodeUri:e.url}),a.jsx(U,{y:"xl"}),a.jsx(k,{balance:!0,center:!0,multiline:!0,children:e.locale.scanToDownload}),a.jsx(U,{y:"xs"})]})]}),Zl=Ti(e=>{const n=X();return{all:"unset","&:hover":{background:n.colors.secondaryButtonHoverBg,color:n.colors.primaryText,textDecoration:"none"},alignItems:"center",background:n.colors.secondaryButtonBg,borderRadius:G.sm,boxSizing:"border-box",color:n.colors.secondaryButtonText,cursor:"pointer",display:"flex",fontWeight:500,gap:P.md,padding:`${P.sm} ${P.md}`,textDecoration:"none",transition:"100ms ease",width:"100%"}});function G6(e){return new Promise(n=>{setTimeout(n,e)})}const g0=e=>{const{locale:n}=e;return a.jsxs(M,{animate:"fadein",flex:"column",fullHeight:!0,className:"tw-connecting-wallet-screen",children:[a.jsx(M,{p:"lg",style:{paddingBottom:0},children:a.jsx(_e,{onBack:e.onBack,title:e.walletName})}),a.jsxs(M,{center:"y",expand:!0,flex:"column",px:e.size==="compact"?"lg":"xxl",relative:!0,style:{paddingTop:0},children:[a.jsx(M,{py:"3xl",children:a.jsx(fl,{client:e.client,error:e.errorConnecting,id:e.walletId})}),a.jsxs(M,{animate:"fadein",style:{animationDuration:"200ms"},children:[a.jsx(k,{center:!0,color:"primaryText",size:"lg",weight:500,className:"tw-screen-title","data-status":e.errorConnecting?"failed":"in-progress",children:e.errorConnecting?n.failed:n.inProgress}),a.jsx(U,{y:"md"}),e.errorConnecting?a.jsx(M,{animate:"fadein",center:"x",flex:"row",children:a.jsxs(ae,{className:"tw-retry-button",fullWidth:!0,onClick:e.onRetry,style:{alignItems:"center",gap:P.xs},variant:"accent",children:[a.jsx(pa,{height:A.sm,width:A.sm}),n.tryAgain]})}):a.jsx(k,{balance:!0,center:!0,multiline:!0,className:"tw-screen-description",children:n.instruction})]})]}),e.onGetStarted?a.jsxs(a.Fragment,{children:[a.jsx(U,{y:"xl"}),a.jsx(Re,{}),a.jsx(M,{center:"x",flex:"row",p:"lg",children:a.jsx(ae,{onClick:e.onGetStarted,variant:"link",className:"tw-get-started-button",children:n.getStartedLink})})]}):a.jsx(U,{y:e.size==="compact"?"lg":"xxl"})]})},py=e=>{const{connectModalSize:n,client:t}=e,[i,r]=y.useState(!1);return a.jsxs(M,{animate:"fadein",flex:"column",fullHeight:!0,className:"tw-qr-scan-screen",children:[a.jsx(M,{p:"lg",children:a.jsx(_e,{onBack:e.onBack,title:e.walletName})}),a.jsx(U,{y:"sm"}),a.jsxs(M,{center:"both",expand:!0,flex:"column",px:"lg",children:[!e.error&&a.jsxs("div",{style:{textAlign:"center"},children:[a.jsx(m0,{QRIcon:a.jsx(Vn,{client:t,id:e.walletId,size:A.xxl}),qrCodeUri:e.qrCodeUri}),a.jsx(U,{y:"xs"}),a.jsxs(ae,{className:"tw-copy-link-button",disabled:e.qrCodeUri===void 0,onClick:()=>{navigator.clipboard.writeText(e.qrCodeUri).then(()=>{r(!0),setTimeout(()=>r(!1),3e3)}).catch(o=>{console.error("Failed to copy link to clipboard",o)})},style:{cursor:e.qrCodeUri===void 0?"default":"pointer",fontSize:"12px",opacity:e.qrCodeUri===void 0?.5:1},variant:"link",children:[i?a.jsx(ls,{height:14,width:14}):a.jsx($2,{height:14,width:14}),a.jsx("span",{style:{padding:"0 4px"},children:"Copy Link"})]}),a.jsx(U,{y:"lg"}),a.jsx(k,{balance:!0,center:!0,multiline:!0,className:"tw-screen-description",style:{paddingInline:P.lg},children:e.qrScanInstruction})]}),e.error&&a.jsxs(M,{animate:"fadein",style:{width:"100%"},children:[a.jsx(U,{y:"xxl"}),a.jsx(M,{center:"x",flex:"row",children:a.jsx(n0,{size:A["3xl"]})}),a.jsx(U,{y:"lg"}),a.jsx(k,{center:!0,color:"primaryText",size:"lg",className:"tw-screen-title","data-status":"failed",children:"Connection Failed"}),a.jsx(U,{y:"3xl"}),a.jsx(ae,{fullWidth:!0,onClick:e.onRetry,variant:"accent",className:"tw-retry-button",children:"Try again"})]})]}),a.jsx(U,{y:"lg"}),e.onGetStarted&&a.jsx(H2,{style:{border:n==="compact"?void 0:"none"},children:a.jsx(ae,{onClick:e.onGetStarted,className:"tw-get-started-button",style:{fontSize:ie.sm,textAlign:"center"},variant:"link",children:e.getStartedLink})})]})},q6=e=>{const{onBack:n,onGetStarted:t,wallet:i,walletInfo:r,locale:o,done:s}=e,[c,l]=y.useState(),[h,d]=y.useState(!1),f=y.useCallback(()=>{var g;d(!1),i.connect({chain:e.chain,client:e.client,walletConnect:{onDisplayUri(w){try{if(Mi()){const p=r.mobile.native||r.mobile.universal;hr(p?u2(p,w).redirect:w)}else l(w)}catch(p){console.error(p),d(!0)}},optionalChains:e.chains,projectId:(g=e.walletConnect)==null?void 0:g.projectId,showQrModal:!1}}).then(()=>{s()}).catch(w=>{d(!0),console.error(w)})},[e.walletConnect,r.mobile.native,r.mobile.universal,i,e.chain,e.client,e.chains,s]),m=y.useRef(!1);return y.useEffect(()=>{m.current||(m.current=!0,f())},[f]),Mi()?a.jsx(g0,{client:e.client,errorConnecting:h,locale:{failed:o.connectionScreen.failed,getStartedLink:o.getStartedLink,inProgress:o.connectionScreen.inProgress,instruction:o.connectionScreen.instruction,tryAgain:o.connectionScreen.retry},onBack:n,onGetStarted:t,onRetry:f,size:e.size,walletId:i.id,walletName:r.name}):a.jsx(py,{client:e.client,connectModalSize:e.size,error:h,getStartedLink:o.getStartedLink,onBack:n,onGetStarted:t,onRetry:f,qrCodeUri:c,qrScanInstruction:o.scanScreen.instruction,walletId:i.id,walletName:r.name})},K6=e=>{const{onBack:n,wallet:t,walletInfo:i,locale:r,done:o,setModalVisibility:s}=e,[c,l]=y.useState(),[h,d]=y.useState(!1),f=y.useCallback(()=>{var g,w;if(d(!1),Mi()){let p=!1;G6(2e3).then(()=>{p||s(!1)}),t.connect({chain:e.chain,client:e.client,optionalChains:e.chains,projectId:(g=e.walletConnect)==null?void 0:g.projectId,showQrModal:!0}).then(()=>{p=!0,s(!0),o()}).catch(_=>{p=!0,s(!0),d(!0),console.error(_)})}else t.connect({chain:e.chain,client:e.client,onDisplayUri(p){l(p)},optionalChains:e.chains,projectId:(w=e.walletConnect)==null?void 0:w.projectId,showQrModal:!1}).then(()=>{o()}).catch(p=>{d(!0),console.error(p)})},[e.walletConnect,t,e.chain,e.client,e.chains,o,s]),m=y.useRef(!1);return y.useEffect(()=>{m.current||(m.current=!0,f())},[f]),Mi()?a.jsx(g0,{client:e.client,errorConnecting:h,locale:{failed:r.connectionScreen.failed,getStartedLink:r.getStartedLink,inProgress:r.connectionScreen.inProgress,instruction:r.connectionScreen.instruction,tryAgain:r.connectionScreen.retry},onBack:n,onRetry:f,size:e.size,walletId:t.id,walletName:i.name}):a.jsx(py,{client:e.client,connectModalSize:e.size,error:h,getStartedLink:r.getStartedLink,onBack:n,onRetry:f,qrCodeUri:c,qrScanInstruction:r.scanScreen.instruction,walletId:t.id,walletName:i.name})},J6=e=>{let n=window.location.toString();e.wallet.id==="io.metamask"?n=n.replace("https://",""):n=encodeURIComponent(n);const t=`${e.deepLinkPrefix}${n}?ref=${n}`;return a.jsxs(M,{animate:"fadein",children:[a.jsx(M,{p:"lg",children:a.jsx(_e,{onBack:e.onBack,title:e.walletInfo.name})}),a.jsx(M,{animate:"fadein",center:"x",flex:"row",py:"3xl",children:a.jsx(e8,{children:a.jsx(Vn,{client:e.client,id:e.wallet.id,size:"80"})})}),a.jsx(M,{p:"lg",children:a.jsxs(Q2,{fullWidth:!0,gap:"xs",href:t,variant:"accent",children:["Continue in ",e.walletInfo.name,a.jsx(F2,{height:A.sm,width:A.sm})]})})]})},X6=vt`
|
|
156
|
+
0% {
|
|
157
|
+
transform: scale(0.9);
|
|
158
|
+
}
|
|
159
|
+
100% {
|
|
160
|
+
opacity: 0;
|
|
161
|
+
transform: scale(1.4);
|
|
162
|
+
}
|
|
163
|
+
`,e8=Se(e=>{const n=X();return{"&::before":{animation:`${X6} 2s cubic-bezier(0.175, 0.885, 0.32, 1.1) infinite`,background:n.colors.accentText,borderRadius:G.xl,bottom:0,content:'""',display:"block",left:0,position:"absolute",right:0,top:0,zIndex:-1},position:"relative"}}),X1=e=>{const{wallet:n,done:t}=e,[i,r]=y.useState(!1),o=e.locale,s=y.useCallback(async()=>{try{c.current=!0,r(!1),await dy(1e3),await n.connect({chain:e.chain,client:e.client}),t()}catch(l){r(!0),console.error(l)}},[e.client,e.chain,t,n]),c=y.useRef(!1);return y.useEffect(()=>{c.current||s()},[s]),a.jsx(g0,{client:e.client,errorConnecting:i,locale:{failed:o.connectionScreen.failed,getStartedLink:o.getStartedLink,inProgress:o.connectionScreen.inProgress,instruction:o.connectionScreen.instruction,tryAgain:o.connectionScreen.retry},onBack:e.onBack,onGetStarted:e.onGetStarted,onRetry:()=>{s()},size:e.size,walletId:e.wallet.id,walletName:e.walletName})},t8=y.lazy(()=>u(()=>import("./CoinbaseSDKConnection-C9-JnGls.js"),__vite__mapDeps([52,1,2,4,5,21,13,22,18,17,19,14,9,23,24,25,8,26,27,28,29,30,31,32,33,34]))),n8=y.lazy(()=>u(()=>import("./InAppWalletConnectUI-Bdxz0Bmy.js"),__vite__mapDeps([53,1,2,4,5,21,13,22,18,17,19,14,9,23,24,25,8,26,27,28,29,30,31,32,33,34]))),i8=y.lazy(()=>u(()=>Promise.resolve().then(()=>iE),void 0));function wy(e){var f,m,g;const[n,t]=y.useState("main"),{wallet:i}=e,r=cs(e.wallet.id),o=e.connectLocale.id,s=pe({queryFn:async()=>W6(o),queryKey:["injectedWalletLocale",o,(f=r.data)==null?void 0:f.name],refetchOnMount:!1,refetchOnWindowFocus:!1});if(r.isLoading||!s.data)return a.jsx(ct,{});const c=s.data;if(!r.data){const w=Ii().find(p=>p.info.rdns===i.id);return w?a.jsx(X1,{chain:e.chain,client:e.client,done:e.done,locale:c(w.info.name),onBack:e.onBack,size:e.size,wallet:e.wallet,walletName:w.info.name}):a.jsxs(M,{animate:"fadein",flex:"column",fullHeight:!0,children:[a.jsx(M,{p:"lg",children:a.jsx(_e,{onBack:e.onBack,title:"Not Supported"})}),a.jsxs(M,{center:"both",expand:!0,flex:"column",p:"lg",style:{minHeight:"300px"},children:[a.jsx(n0,{size:A["3xl"]}),a.jsx(U,{y:"lg"}),a.jsx(k,{center:!0,color:"primaryText",children:"Wallet is not supported"}),a.jsx(U,{y:"xxl"})]})]})}const l=c(r.data.name),h=Ii().find(w=>w.info.rdns===r.data.rdns);if(n==="get-started")return a.jsx(K1,{client:e.client,locale:l,onBack:()=>{t("main")},wallet:e.wallet,walletInfo:r.data});const d=r.data.deepLink&&!h&&Mi()&&(((m=i.getConfig())==null?void 0:m.preferDeepLink)||i.id==="app.phantom");return(g=r.data.deepLink)!=null&&g.mobile&&d?a.jsx(J6,{client:e.client,deepLinkPrefix:r.data.deepLink.mobile,locale:l,onBack:e.onBack,onGetStarted:()=>{t("get-started")},wallet:e.wallet,walletInfo:r.data}):r.data.rdns&&h?a.jsx(X1,{chain:e.chain,client:e.client,done:e.done,locale:l,onBack:e.onBack,onGetStarted:()=>{t("get-started")},size:e.size,wallet:e.wallet,walletName:r.data.name}):r.data.mobile.native||r.data.mobile.universal?a.jsx(q6,{chain:e.chain,chains:e.chains,client:e.client,done:e.done,locale:l,onBack:e.onBack,onGetStarted:()=>{t("get-started")},size:e.size,wallet:e.wallet,walletConnect:e.walletConnect,walletInfo:r.data}):e.wallet.id==="walletConnect"?a.jsx(K6,{chain:e.chain,chains:e.chains,client:e.client,done:e.done,locale:l,onBack:e.onBack,setModalVisibility:e.setModalVisibility,size:e.size,wallet:e.wallet,walletConnect:e.walletConnect,walletInfo:r.data}):e.wallet.id==="inApp"||e.wallet.id==="embedded"?a.jsx(y.Suspense,{fallback:a.jsx(ct,{}),children:a.jsx(n8,{chain:e.chain,client:e.client,connectLocale:e.connectLocale,done:e.done,goBack:e.onBack,meta:e.meta,size:e.size,wallet:e.wallet,walletConnect:e.walletConnect})}):De(e.wallet.id)?a.jsx(y.Suspense,{fallback:a.jsx(ct,{}),children:a.jsx(i8,{chain:e.chain,client:e.client,connectLocale:e.connectLocale,done:e.done,goBack:e.onBack,meta:e.meta,size:e.size,wallet:e.wallet,walletConnect:e.walletConnect})}):e.wallet.id?a.jsx(y.Suspense,{fallback:a.jsx(ct,{}),children:a.jsx(t8,{chain:e.chain,client:e.client,done:e.done,locale:l,onBack:e.onBack,onGetStarted:()=>{t("get-started")},size:e.size,wallet:e.wallet,walletInfo:r.data})}):a.jsx(K1,{client:e.client,locale:l,onBack:e.onBack,wallet:e.wallet,walletInfo:r.data})}function _y(e){const n=cs(e.personalWallet.id),[t,i]=y.useState(!1);return n.data?t?a.jsx(r8,{accountAbstraction:e.accountAbstraction,client:e.client,done:e.done,localeId:e.connectLocale.id,onBack:e.onBack,personalWallet:e.personalWallet,personalWalletInfo:n.data,size:e.size}):a.jsx(wy,{chain:e.chain,chains:e.chains,client:e.client,connectLocale:e.connectLocale,done:()=>{i(!0)},meta:e.meta,onBack:e.onBack,setModalVisibility:e.setModalVisibility,size:e.size,wallet:e.personalWallet,walletConnect:e.walletConnect}):a.jsx(ct,{})}function r8(e){const n=pe({queryFn:()=>B6(e.localeId),queryKey:["getSmartWalletLocale",e.localeId]}),{personalWallet:t}=e,{done:i}=e,[r,o]=y.useState("idle"),s=Gh(),c=y.useCallback(async()=>{if(!t)throw new Error("No personal wallet");o("connecting");try{const h=await s.handleConnection(t,{accountAbstraction:e.accountAbstraction,client:e.client});i(h),o("idle")}catch(h){console.error(h),o("connect-error")}},[i,t,e.client,e.accountAbstraction,s]),l=y.useRef(!1);return y.useEffect(()=>{l.current||(c(),l.current=!0)},[c]),n.data?r==="connect-error"?a.jsx(M,{animate:"fadein",center:"both",flex:"column",fullHeight:!0,p:"lg",style:{minHeight:"300px"},children:a.jsx(k,{color:"danger",children:n.data.failedToConnect})}):a.jsxs(M,{center:"both",flex:"column",fullHeight:!0,style:{minHeight:"300px"},children:[a.jsx(k,{center:!0,color:"primaryText",multiline:!0,children:n.data.connecting}),a.jsx(U,{y:"lg"}),a.jsx(ke,{color:"accentText",size:"lg"})]}):a.jsx(ct,{})}const ef="inApp";function xy(e){const[n,t]=y.useState(null);return e.accountAbstraction?n?a.jsx(_y,{accountAbstraction:e.accountAbstraction,chain:e.chain,chains:e.chains,client:e.client,connectLocale:e.connectLocale,done:e.done,meta:e.meta,onBack:e.goBack,personalWallet:n,setModalVisibility:e.setModalVisibility,size:e.size,walletConnect:e.walletConnect}):a.jsx(tf,{...e,done:i=>{t(i)}}):a.jsx(tf,{...e})}const tf=e=>{const{walletIdsToHide:n}=e,t=e.size==="compact",[i,r]=y.useState(!1),[o,s]=y.useState(!1),c=o8(),l=y.useMemo(()=>gl(),[]),h=e.wallets;let d=[...h];for(const L of c)h.find(N=>N.id===L.id)||d.push(L);n&&(d=d.filter(L=>!(n!=null&&n.includes(L.id))));const f=!1,m=d,g=m.filter(L=>L.id===ef),w=a0(m.filter(L=>L.id!==ef),e.recommendedWallets),p=f,_=y.useRef(!1);y.useEffect(()=>{setTimeout(()=>{_.current=!0},1e3)},[]);const x=e.modalHeader?a.jsx(_e,{onBack:e.modalHeader.onBack,title:e.modalHeader.title}):a.jsxs(M,{center:"y",flex:"row",gap:"xs",className:"tw-header",children:[e.meta.titleIconUrl?a.jsx(He,{client:e.client,height:A.md,src:e.meta.titleIconUrl,width:A.md}):null,a.jsxs(cl,{children:[" ",e.title," "]})]}),I=async L=>{e.selectWallet(L)},b=a.jsx(Nr,{className:"tw-select-connect-a-wallet-button",lastUsedBadge:!!l&&l!=="inApp"&&!l.startsWith("ecosystem."),client:e.client,disabled:e.meta.requireApproval&&!o,icon:to,onClick:()=>{r(!0)},title:e.connectLocale.connectAWallet}),j=a.jsxs(M,{className:"tw-get-started-container",flex:"row",style:{justifyContent:"space-between"},children:[a.jsx(k,{color:"secondaryText",size:"sm",weight:500,children:e.connectLocale.newToWallets}),a.jsx(_r,{href:"https://blog.thirdweb.com/web3-wallet/",size:"sm",target:"_blank",weight:500,children:e.connectLocale.getStarted})]}),C=e.meta.requireApproval||e.meta.termsOfServiceUrl||e.meta.privacyPolicyUrl?a.jsx(hl,{isApproved:o,locale:e.connectLocale.agreement,onApprove:()=>s(!o),privacyPolicyUrl:e.meta.privacyPolicyUrl,requireApproval:e.meta.requireApproval,termsOfServiceUrl:e.meta.termsOfServiceUrl}):void 0;let E,T;t?g.length===0?(E=a.jsx(ws,{chain:e.chain,client:e.client,connectLocale:e.connectLocale,diableSelectionDataReset:e.disableSelectionDataReset,disabled:e.meta.requireApproval&&!o,done:e.done,goBack:e.goBack,onShowAll:e.onShowAll,recommendedWallets:e.recommendedWallets,selectWallet:I,showAllWallets:e.showAllWallets,size:e.size,wallets:m}),T=a.jsxs(a.Fragment,{children:[a.jsx(Re,{}),a.jsxs(M,{flex:"column",gap:"md",px:"lg",py:"md+",children:[j,p]}),a.jsx(Re,{}),C&&a.jsx(M,{px:"md",style:{paddingBottom:P.md,paddingTop:P.md},children:C})]})):i?(E=a.jsx(ws,{chain:e.chain,client:e.client,connectLocale:e.connectLocale,diableSelectionDataReset:e.disableSelectionDataReset,disabled:e.meta.requireApproval&&!o,done:e.done,goBack:e.goBack,onShowAll:e.onShowAll,recommendedWallets:e.recommendedWallets,selectWallet:I,showAllWallets:e.showAllWallets,size:e.size,wallets:w}),T=a.jsx(H2,{children:j})):(E=a.jsxs(M,{px:"xs",children:[a.jsx(ws,{chain:e.chain,client:e.client,connectLocale:e.connectLocale,diableSelectionDataReset:e.disableSelectionDataReset,disabled:e.meta.requireApproval&&!o,done:e.done,goBack:e.goBack,recommendedWallets:e.recommendedWallets,selectWallet:I,showAllWallets:e.showAllWallets,size:e.size,wallets:g}),w.length>0&&a.jsxs(a.Fragment,{children:[a.jsx(fy,{text:e.connectLocale.or}),a.jsx(U,{y:"lg"})]})]}),w.length===0?T=C||p?a.jsxs(a.Fragment,{children:[a.jsx(U,{y:"md"}),a.jsx(Re,{}),p,C&&a.jsxs(M,{p:"md",children:[" ",C," "]})]}):a.jsx(U,{y:"sm"}):w.length>1?T=a.jsxs(M,{flex:"column",gap:"sm",style:{position:"relative"},children:[a.jsx(u8,{}),a.jsxs(M,{flex:"column",gap:"md",px:"lg",children:[b,p]}),C?a.jsxs(M,{p:"md",children:[" ",C," "]}):a.jsx(U,{y:"xxs"})]}):T=a.jsxs(a.Fragment,{children:[a.jsx(M,{px:"lg",children:a.jsx(ws,{chain:e.chain,client:e.client,connectLocale:e.connectLocale,diableSelectionDataReset:e.disableSelectionDataReset,disabled:e.meta.requireApproval&&!o,done:e.done,goBack:e.goBack,onShowAll:e.onShowAll,recommendedWallets:e.recommendedWallets,selectWallet:I,showAllWallets:e.showAllWallets,size:e.size,wallets:w})}),p,C?a.jsxs(a.Fragment,{children:[a.jsx(Re,{}),a.jsxs(M,{p:"md",children:[" ",C," "]})]}):p]})):E=a.jsx(ws,{chain:e.chain,client:e.client,connectLocale:e.connectLocale,diableSelectionDataReset:e.disableSelectionDataReset,disabled:e.meta.requireApproval&&!o,done:e.done,goBack:e.goBack,onShowAll:e.onShowAll,recommendedWallets:e.recommendedWallets,selectWallet:I,showAllWallets:e.showAllWallets,size:e.size,wallets:m});const O=!e.hideHeader||e.modalHeader;return a.jsxs(M,{animate:"fadein",className:"tw-wallet-selection",flex:"column",fullHeight:!0,scrollY:!0,style:{maxHeight:e.size==="compact"?i0:void 0},children:[O&&a.jsx(M,{px:"lg",pt:"lg",pb:"xs",children:i?a.jsx(_e,{onBack:()=>{r(!1)},title:x}):x}),a.jsxs(M,{expand:!0,scrollY:!0,style:O?{paddingTop:"2px"}:{paddingTop:P.md},children:[!O&&i&&a.jsx(M,{px:"md",children:a.jsx(M,{center:"y",flex:"row",style:{padding:P.sm,paddingTop:0},children:a.jsxs(bi,{onClick:()=>{r(!1)},style:{gap:P.xxs,paddingBlock:P.xxs,paddingRight:P.xs,transform:`translateX(-${P.xs})`},children:[a.jsx(W2,{height:A.sm,width:A.sm}),e.connectLocale.goBackButton]})})}),E]}),T,t&&e.meta.showThirdwebBranding!==!1&&a.jsx(M,{py:"md",children:a.jsx(ml,{})})]})};let Gl=[];function o8(){return Gl.length===0&&(Gl=Ii().map(t=>t.info.rdns).map(t=>Tt(t))),Gl}const ws=e=>{const n=a0(e.wallets,e.recommendedWallets),{screen:t}=u0(),i=uo(),r=y.useMemo(()=>gl(),[]);return a.jsxs(l8,{style:{maxHeight:"370px",minHeight:"100%",paddingTop:e.size==="wide"?0:j6},children:[n.map(o=>{const s=t?typeof t=="object"&&t.id===o.id:!1;return a.jsx("li",{children:o.id==="inApp"&&e.size==="compact"?a.jsx(U6,{chain:e.chain,client:e.client,connectLocale:e.connectLocale,disabled:e.disabled,done:()=>e.done(o),goBack:e.goBack,recommendedWallets:e.recommendedWallets,select:()=>e.selectWallet(o),size:e.size,wallet:o}):a.jsx(h0,{className:"tw-wallet-select-wallet-button",badge:r===o.id?"Last used":void 0,client:e.client,connectLocale:e.connectLocale,isActive:s,recommendedWallets:e.recommendedWallets,selectWallet:()=>{e.diableSelectionDataReset||i({}),e.selectWallet(o)},wallet:o})},o.id)}),e.onShowAll&&e.showAllWallets!==!1&&a.jsx(a8,{className:"tw-show-all-wallets-button",children:a.jsxs(f0,{onClick:e.onShowAll,children:[a.jsxs(c8,{children:[a.jsx("div",{"data-dot":!0}),a.jsx("div",{"data-dot":!0}),a.jsx("div",{"data-dot":!0}),a.jsx("div",{"data-dot":!0})]}),a.jsxs(M,{flex:"row",gap:"xs",children:[a.jsx(k,{color:"primaryText",children:"All Wallets"}),a.jsx(s8,{children:" 500+ "})]})]})})]})},s8=Se(()=>{const e=X();return{backgroundColor:e.colors.secondaryButtonBg,borderRadius:G.sm,color:e.colors.secondaryText,fontSize:ie.xs,paddingBlock:"3px",paddingInline:P.xxs}}),a8=Se(()=>({"&:hover [data-dot]":{background:X().colors.primaryText}})),c8=Se(()=>{const e=X();return{"& div":{background:e.colors.secondaryText,borderRadius:"50%",height:"10px",transition:"background 200ms ease",width:"10px"},alignItems:"center",backgroundColor:e.colors.tertiaryBg,border:`1px solid ${e.colors.borderColor}`,borderRadius:G.md,display:"grid",gap:P["4xs"],gridTemplateColumns:"1fr 1fr",height:`${A.xl}px`,justifyItems:"center",padding:P.xs,width:`${A.xl}px`}}),l8=B2({all:"unset",boxSizing:"border-box",display:"flex",flex:1,flexDirection:"column",gap:"2px",listStyleType:"none",overflowY:"auto",...wa,margin:"-2px",marginBottom:0,paddingInline:P.md,paddingBottom:P.lg}),u8=Se(e=>{const n=X();return n.colors.modalBg,{background:`linear-gradient(to bottom, transparent 0%, ${n.colors.modalBg} 80%)`,height:P.lg,left:0,pointerEvents:"none",position:"absolute",top:`-${P.lg}`,width:"100%"}});function d8(e){return a.jsxs("div",{style:{display:"grid",gridTemplateColumns:"300px 1fr",height:"100%"},children:[a.jsxs(f8,{children:[" ",e.left," "]}),a.jsx(M,{flex:"column",relative:!0,scrollY:!0,children:e.right})]})}function h8(e){return a.jsx(M,{flex:"column",relative:!0,scrollY:!0,style:{maxHeight:i0},children:e.children})}const f8=Se(e=>{const n=X();return{display:"flex",flexDirection:"column",overflowY:"auto",...wa,borderRight:`1px solid ${n.colors.separatorLine}`,position:"relative"}}),m8=y.lazy(()=>u(()=>Promise.resolve().then(()=>jL),void 0)),My=e=>{const{setModalVisibility:n,onClose:t,shouldSetActive:i}=e,{screen:r,setScreen:o,initialScreen:s}=e.screenSetup,c=S2(),l=uo(),h=ut(),d=yt(),f=Qh(h,d,e.auth),m=f.requiresAuth&&!f.isLoggedIn,g=Gh(),w=y.useCallback(E=>{i?c(E):g.addConnectedWallet(E),e.onConnect&&e.onConnect(E,g.connectedWallets.getValue()),Ec(()=>{l({}),n(!0)}),m?o(At.signIn):(o(s),t==null||t())},[n,t,e.onConnect,c,m,o,l,i,s,g]),p=y.useCallback(()=>{l({}),o(s)},[o,s,l]),_=a.jsx(xy,{accountAbstraction:e.accountAbstraction,chain:e.chain,chains:e.chains,client:e.client,connectLocale:e.connectLocale,done:w,goBack:e.wallets.length>1?p:void 0,hideHeader:e.hideHeader,meta:e.meta,modalHeader:e.modalHeader,onShowAll:()=>{o(At.showAll)},recommendedWallets:e.recommendedWallets,selectWallet:E=>{E.onConnectRequested?E.onConnectRequested().then(()=>o(E)).catch(console.error):o(E)},setModalVisibility:n,showAllWallets:e.showAllWallets,size:e.size,title:e.meta.title||e.connectLocale.defaultModalTitle,walletConnect:e.walletConnect,walletIdsToHide:e.walletIdsToHide,wallets:e.wallets}),x=a.jsx(y.Suspense,{fallback:a.jsx(ct,{}),children:a.jsx(m8,{client:e.client,connectLocale:e.connectLocale,onBack:p,onSelect:o,recommendedWallets:e.recommendedWallets,walletIdsToHide:e.walletIdsToHide,size:e.size})}),I=a.jsx(x6,{client:e.client,connectLocale:e.connectLocale,meta:e.meta,welcomeScreen:e.welcomeScreen}),b=e.wallets.length>1?p:void 0,j=E=>e.accountAbstraction?a.jsx(_y,{accountAbstraction:e.accountAbstraction,chain:e.chain,chains:e.chains,client:e.client,connectLocale:e.connectLocale,done:T=>{w(T)},meta:e.meta,onBack:b,personalWallet:E,setModalVisibility:e.setModalVisibility,size:e.size,walletConnect:e.walletConnect},E.id):a.jsx(wy,{chain:e.chain,chains:e.chains,client:e.client,connectLocale:e.connectLocale,done:()=>{w(E)},meta:e.meta,onBack:b,setModalVisibility:e.setModalVisibility,size:e.size,wallet:E,walletConnect:e.walletConnect},E.id),C=a.jsx(hy,{auth:e.auth,client:e.client,connectLocale:e.connectLocale,modalSize:e.size,onClose:t,onDone:t,privacyPolicyUrl:e.meta.privacyPolicyUrl,termsOfServiceUrl:e.meta.termsOfServiceUrl});return a.jsx(c0.Provider,{value:e.screenSetup,children:e.size==="wide"?a.jsx(d8,{left:_,right:a.jsxs(a.Fragment,{children:[r===At.signIn&&C,r===At.main&&I,r===At.getStarted&&I,r===At.showAll&&x,typeof r!="string"&&j(r)]})}):a.jsxs(h8,{children:[r===At.signIn&&C,r===At.main&&_,r===At.getStarted&&I,r===At.showAll&&x,typeof r!="string"&&j(r)]})})},g8=Se(e=>{const{modalSize:n}=e,t=X();return{"& *":{boxSizing:"border-box"},"& *::selection":{backgroundColor:t.colors.selectedTextBg,color:t.colors.selectedTextColor},background:t.colors.modalBg,border:`1px solid ${t.colors.borderColor}`,borderRadius:G.xl,boxSizing:"border-box",color:t.colors.primaryText,fontFamily:t.fontFamily,height:n==="compact"?"auto":iy,lineHeight:"normal",overflow:"hidden",position:"relative",maxWidth:"100%",width:n==="compact"?ey:ny}});function y8(e){return e==="INTERNAL_SERVER_ERROR"||e==="UNKNOWN_ERROR"}function p8(e){const{error:n}=e;if(!n)return{errorCode:null,isClientError:!1,isRetryable:!1,isServerError:!1,mappedError:null,statusCode:null,userMessage:""};let t;n instanceof at?t=n:t=new at({code:"UNKNOWN_ERROR",message:n.message||"An unknown error occurred",statusCode:500});const i=t.statusCode||null,r=i!==null&&i>=400&&i<500,o=i!==null&&i>=500,s=w8(t);return{errorCode:t.code,isClientError:r,isRetryable:y8(t.code),isServerError:o,mappedError:t,statusCode:i,userMessage:s}}function w8(e){switch(e.code){case"INVALID_INPUT":return"Invalid input provided. Please check your parameters and try again.";case"ROUTE_NOT_FOUND":return"No route found for this transaction. Please try a different token pair or amount.";case"AMOUNT_TOO_LOW":return"The amount is too low for this transaction. Please increase the amount.";case"AMOUNT_TOO_HIGH":return"The amount is too high for this transaction. Please decrease the amount.";case"INTERNAL_SERVER_ERROR":return"A temporary error occurred. Please try again in a moment.";default:return e.message||"An unexpected error occurred. Please try again."}}function _8({error:e,onRetry:n,onCancel:t,client:i}){const r=X(),{userMessage:o}=p8({error:e}),s=y.useRef(!1);return y.useEffect(()=>{s.current||(s.current=!0,an({client:i,error:e.message,event:"ub:ui:error"}))},[i,e.message]),a.jsx(M,{flex:"column",fullHeight:!0,gap:"md",p:"md",children:a.jsxs(M,{flex:"row",gap:"md",style:{alignItems:"flex-start"},children:[a.jsx(M,{center:"both",style:{backgroundColor:r.colors.tertiaryBg,borderRadius:"50%",flexShrink:0,height:"24px",width:"24px"},children:a.jsx(Cr,{color:r.colors.danger,height:A.md,width:A.md})}),a.jsxs(M,{flex:"column",fullHeight:!0,gap:"sm",style:{flex:1},children:[a.jsx(k,{color:"primaryText",size:"lg",children:"Error"}),a.jsx(M,{flex:"column",gap:"sm",style:{minHeight:"100px"},children:a.jsx(M,{flex:"column",gap:"sm",style:{flex:1},children:a.jsx(k,{color:"secondaryText",size:"sm",children:o})})}),a.jsxs(M,{flex:"row",gap:"sm",style:{justifyContent:"flex-end"},children:[a.jsx(ae,{onClick:n,variant:"primary",children:"Try Again"}),t&&a.jsx(ae,{onClick:t,variant:"secondary",children:"Cancel"})]})]})]})})}function xa(e,n){if(e===0)return 0;const t=10**n,i=1/10**n,r=e<i?"ceil":"round";return Math[r]((e+Number.EPSILON)*t)/t}function Hs(e,n=!0,t=5){return xa(Number(e.displayValue),t)+(n?` ${e.symbol}`:"")}function Dt(e,n,t=5){return xa(Number.parseFloat(ei(e,n)),t).toString()}function Gr(e,n){return x8(n,"en-US",e)}function x8(e,n,t){return e<0?new Intl.NumberFormat(n,{style:"currency",currency:t,maximumFractionDigits:6,minimumFractionDigits:0}).format(e):new Intl.NumberFormat(n,{style:"currency",currency:t,maximumFractionDigits:2,minimumFractionDigits:0,notation:"compact"}).format(e)}function M8(e){var c;let n=e;"source_metadata"in e&&(n=e.source_metadata);const t=n.settings.compilationTarget,i=Object.keys(t),r=t[i[0]],o={author:n.output.devdoc.author,details:n.output.devdoc.detail,notice:n.output.userdoc.notice,title:n.output.devdoc.title},s=[...new Set(Object.entries(n.sources).map(([,l])=>l.license))];return{abi:((c=n==null?void 0:n.output)==null?void 0:c.abi)||[],info:o,isPartialAbi:n.isPartialAbi,licenses:s,metadata:n,name:r,zk_version:e.zk_version}}async function I8(e){const{address:n,chain:t}=e,i=await fetch(`https://contract.thirdweb.com/metadata/${t.id}/${n}`,{headers:{"Content-Type":"application/json"},method:"GET"});if(!i.ok){const o=await i.json();throw new Error(o.message||o.error||"Failed to get compiler metadata")}const r=await i.json();return M8(r)}function b8({transaction:e,client:n,wallet:t}){const i=nl(e.chain),r=v3(t);return pe({enabled:!!e.to&&!!i.data,queryFn:async()=>{var j,C;const o=cn({address:e.to,chain:e.chain,client:n}),[s,c,l,h]=await Promise.all([I8(o).catch(()=>null),fc(e.value),fc(e.erc20Value),Vg(e).catch(()=>"0x")]),[d,f]=await Promise.all([_a(n,(l==null?void 0:l.tokenAddress)||Gt,e.chain.id),r?0n:H3(e).catch(()=>null)]);let m={description:void 0,functionName:"Contract Call",selector:"0x"};if(s!=null&&s.abi&&h.length>=10)try{const E=h.slice(0,10),T=s.abi,N=(Array.isArray(T)?T:[]).filter(v=>v&&typeof v=="object"&&"type"in v&&v.type==="function").map(v=>v).find(v=>E3(v)===E);N&&(m={description:void 0,functionName:N.name,selector:E})}catch{}const w=await(async()=>d?d.decimals:l?Z3({contract:cn({address:l.tokenAddress,chain:e.chain,client:n})}):18)(),p=l?l.amountWei:c||0n,_=((C=(j=i.data)==null?void 0:j.nativeCurrency)==null?void 0:C.symbol)||"ETH",x=(d==null?void 0:d.symbol)||_,I=l&&l.tokenAddress.toLowerCase()!==Gt?l.amountWei:(c||0n)+(f||0n),b=ei(I,w);return{contractMetadata:s,costWei:p,functionInfo:m,gasCostDisplay:f?`${Dt(f,18)} ${_}`:null,gasCostWei:f,tokenInfo:d,totalCost:b,totalCostWei:I,txCostDisplay:`${Dt(p,w)} ${x}`}},queryKey:["transaction-details",it(e),r]})}const C8=e=>{const n=y.useId();return a.jsxs("svg",{"aria-hidden":"true",height:e.size,viewBox:"0 0 512 512",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("mask",{id:n,children:a.jsx("circle",{cx:"256",cy:"256",fill:"#fff",r:"256"})}),a.jsxs("g",{mask:`url(#${n})`,children:[a.jsx("path",{d:"M0 0v512h144l112-64 112 64h144V0H368L256 64 144 0Z",fill:"#d80027"}),a.jsx("path",{d:"M144 0h224v512H144Z",fill:"#eee"}),a.jsx("path",{d:"m301 289 44-22-22-11v-22l-45 22 23-44h-23l-22-34-22 33h-23l23 45-45-22v22l-22 11 45 22-12 23h45v33h22v-33h45z",fill:"#d80027"})]})]})},j8=e=>{const n=y.useId();return a.jsxs("svg",{"aria-hidden":"true",height:e.size,viewBox:"0 0 512 512",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("mask",{id:n,children:a.jsx("circle",{cx:"256",cy:"256",fill:"#fff",r:"256"})}),a.jsxs("g",{mask:`url(#${n})`,children:[a.jsx("path",{d:"M0 0h512v512H0z",fill:"#0052b4"}),a.jsx("path",{d:"m256 100.2 8.3 25.5H291l-21.7 15.7 8.3 25.6-21.7-15.8-21.7 15.8 8.3-25.6-21.7-15.7h26.8zm-110.2 45.6 24 12.2 18.9-19-4.2 26.5 23.9 12.2-26.5 4.2-4.2 26.5-12.2-24-26.5 4.3 19-19zM100.2 256l25.5-8.3V221l15.7 21.7 25.6-8.3-15.8 21.7 15.8 21.7-25.6-8.3-15.7 21.7v-26.8zm45.6 110.2 12.2-24-19-18.9 26.5 4.2 12.2-23.9 4.2 26.5 26.5 4.2-24 12.2 4.3 26.5-19-19zM256 411.8l-8.3-25.5H221l21.7-15.7-8.3-25.6 21.7 15.8 21.7-15.8-8.3 25.6 21.7 15.7h-26.8zm110.2-45.6-24-12.2-18.9 19 4.2-26.5-23.9-12.2 26.5-4.2 4.2-26.5 12.2 24 26.5-4.3-19 19zM411.8 256l-25.5 8.3V291l-15.7-21.7-25.6 8.3 15.8-21.7-15.8-21.7 25.6 8.3 15.7-21.7v26.8zm-45.6-110.2-12.2 24 19 18.9-26.5-4.2-12.2 23.9-4.2-26.5-26.5-4.2 24-12.2-4.3-26.5 19 19z",fill:"#ffda44"})]})]})},L8=e=>a.jsxs("svg",{"aria-hidden":"true",height:e.size,version:"1.1",viewBox:"0 0 512 512",width:e.size,x:"0px",xmlns:"http://www.w3.org/2000/svg",y:"0px",children:[a.jsx("circle",{cx:"256",cy:"256",fill:"#F0F0F0",r:"256"}),a.jsxs("g",{children:[a.jsx("path",{d:"M52.92,100.142c-20.109,26.163-35.272,56.318-44.101,89.077h133.178L52.92,100.142z",fill:"#0052B4"}),a.jsx("path",{d:"M503.181,189.219c-8.829-32.758-23.993-62.913-44.101-89.076l-89.075,89.076H503.181z",fill:"#0052B4"}),a.jsx("path",{d:"M8.819,322.784c8.83,32.758,23.993,62.913,44.101,89.075l89.074-89.075L8.819,322.784L8.819,322.784 z",fill:"#0052B4"}),a.jsx("path",{d:"M411.858,52.921c-26.163-20.109-56.317-35.272-89.076-44.102v133.177L411.858,52.921z",fill:"#0052B4"}),a.jsx("path",{d:"M100.142,459.079c26.163,20.109,56.318,35.272,89.076,44.102V370.005L100.142,459.079z",fill:"#0052B4"}),a.jsx("path",{d:"M189.217,8.819c-32.758,8.83-62.913,23.993-89.075,44.101l89.075,89.075V8.819z",fill:"#0052B4"}),a.jsx("path",{d:"M322.783,503.181c32.758-8.83,62.913-23.993,89.075-44.101l-89.075-89.075V503.181z",fill:"#0052B4"}),a.jsx("path",{d:"M370.005,322.784l89.075,89.076c20.108-26.162,35.272-56.318,44.101-89.076H370.005z",fill:"#0052B4"})]}),a.jsxs("g",{children:[a.jsx("path",{d:"M509.833,222.609h-220.44h-0.001V2.167C278.461,0.744,267.317,0,256,0 c-11.319,0-22.461,0.744-33.391,2.167v220.44v0.001H2.167C0.744,233.539,0,244.683,0,256c0,11.319,0.744,22.461,2.167,33.391 h220.44h0.001v220.442C233.539,511.256,244.681,512,256,512c11.317,0,22.461-0.743,33.391-2.167v-220.44v-0.001h220.442 C511.256,278.461,512,267.319,512,256C512,244.683,511.256,233.539,509.833,222.609z",fill:"#D80027"}),a.jsx("path",{d:"M322.783,322.784L322.783,322.784L437.019,437.02c5.254-5.252,10.266-10.743,15.048-16.435 l-97.802-97.802h-31.482V322.784z",fill:"#D80027"}),a.jsx("path",{d:"M189.217,322.784h-0.002L74.98,437.019c5.252,5.254,10.743,10.266,16.435,15.048l97.802-97.804 V322.784z",fill:"#D80027"}),a.jsx("path",{d:"M189.217,189.219v-0.002L74.981,74.98c-5.254,5.252-10.266,10.743-15.048,16.435l97.803,97.803 H189.217z",fill:"#D80027"}),a.jsx("path",{d:"M322.783,189.219L322.783,189.219L437.02,74.981c-5.252-5.254-10.743-10.266-16.435-15.047 l-97.802,97.803V189.219z",fill:"#D80027"})]})]}),E8=e=>a.jsx("svg",{height:e.size,role:"presentation",viewBox:"0 0 32 32",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:a.jsxs("g",{fill:"none",fillRule:"evenodd",children:[a.jsx("circle",{cx:"16",cy:"16",fill:"#a81b1b",r:"16"}),a.jsx("path",{d:"M17.548 18.711v1.878h5.063v2.288h-5.063V25.5h-3.096v-2.623H9.389v-2.288h5.063v-1.878H9.389v-2.288h4.171L7.5 7.5h3.752l4.8 7.534L20.853 7.5H24.5l-6.086 8.923h4.197v2.288z",fill:"#ffffff"})]})}),T8=e=>a.jsxs("svg",{"aria-hidden":"true",height:e.size,version:"1.1",viewBox:"0 0 512 512",width:e.size,x:"0px",xmlns:"http://www.w3.org/2000/svg",y:"0px",children:[a.jsx("circle",{cx:"256",cy:"256",fill:"#F0F0F0",r:"256"}),a.jsxs("g",{children:[a.jsx("path",{d:"M244.87,256H512c0-23.106-3.08-45.49-8.819-66.783H244.87V256z",fill:"#D80027"}),a.jsx("path",{d:"M244.87,122.435h229.556c-15.671-25.572-35.708-48.175-59.07-66.783H244.87V122.435z",fill:"#D80027"}),a.jsx("path",{d:"M256,512c60.249,0,115.626-20.824,159.356-55.652H96.644C140.374,491.176,195.751,512,256,512z",fill:"#D80027"}),a.jsx("path",{d:"M37.574,389.565h436.852c12.581-20.529,22.338-42.969,28.755-66.783H8.819 C15.236,346.596,24.993,369.036,37.574,389.565z",fill:"#D80027"})]}),a.jsx("path",{d:"M118.584,39.978h23.329l-21.7,15.765l8.289,25.509l-21.699-15.765L85.104,81.252l7.16-22.037 C73.158,75.13,56.412,93.776,42.612,114.552h7.475l-13.813,10.035c-2.152,3.59-4.216,7.237-6.194,10.938l6.596,20.301l-12.306-8.941 c-3.059,6.481-5.857,13.108-8.372,19.873l7.267,22.368h26.822l-21.7,15.765l8.289,25.509l-21.699-15.765l-12.998,9.444 C0.678,234.537,0,245.189,0,256h256c0-141.384,0-158.052,0-256C205.428,0,158.285,14.67,118.584,39.978z M128.502,230.4 l-21.699-15.765L85.104,230.4l8.289-25.509l-21.7-15.765h26.822l8.288-25.509l8.288,25.509h26.822l-21.7,15.765L128.502,230.4z M120.213,130.317l8.289,25.509l-21.699-15.765l-21.699,15.765l8.289-25.509l-21.7-15.765h26.822l8.288-25.509l8.288,25.509h26.822 L120.213,130.317z M220.328,230.4l-21.699-15.765L176.93,230.4l8.289-25.509l-21.7-15.765h26.822l8.288-25.509l8.288,25.509h26.822 l-21.7,15.765L220.328,230.4z M212.039,130.317l8.289,25.509l-21.699-15.765l-21.699,15.765l8.289-25.509l-21.7-15.765h26.822 l8.288-25.509l8.288,25.509h26.822L212.039,130.317z M212.039,55.743l8.289,25.509l-21.699-15.765L176.93,81.252l8.289-25.509 l-21.7-15.765h26.822l8.288-25.509l8.288,25.509h26.822L212.039,55.743z",fill:"#0052B4"})]}),v8={countryCode:"US",icon:T8,name:"US Dollar",shorthand:"USD",symbol:"$"},N8=[v8,{countryCode:"CA",icon:C8,name:"Canadian Dollar",shorthand:"CAD",symbol:"$"},{countryCode:"GB",icon:L8,name:"British Pound",shorthand:"GBP",symbol:"£"},{countryCode:"EU",icon:j8,name:"Euro",shorthand:"EUR",symbol:"€"},{countryCode:"JP",icon:E8,name:"Japanese Yen",shorthand:"JPY",symbol:"¥"},{countryCode:"AU",name:"Australian Dollar",shorthand:"AUD",symbol:"$"},{countryCode:"NZ",name:"New Zealand Dollar",shorthand:"NZD",symbol:"$"}];function S8(e){return N8.find(n=>n.shorthand.toLowerCase()===e.toLowerCase())??{countryCode:"US",icon:O8,name:e,shorthand:e,symbol:"$"}}function A8(e,n){return e.icon?a.jsx(e.icon,{size:A[n]}):a.jsx("img",{alt:e.shorthand,height:A[n],src:`https://flagsapi.com/${e.countryCode.toUpperCase()}/flat/64.png`,width:A[n]})}function D8(e){return A8(S8(e.currency),e.size)}const O8=e=>a.jsx(vb,{height:e.size,width:e.size});async function Iy(e){const{client:n,fromTokenAddress:t,chain:i,fromAmount:r,to:o}=e;if(Number(r)===0)return{result:0};if(i.testnet===!0)throw new Error(`Cannot fetch price for a testnet (chainId: ${i.id})`);if(!yr(t))throw new Error("Invalid fromTokenAddress. Expected a valid EVM contract address");const s=await _a(n,t,i.id),c=(s==null?void 0:s.prices[o])||0;if(!s||c===0)throw new Error(`Error: Failed to fetch price for token ${t} on chainId: ${i.id}`);return{result:c*r}}function yl(e,n){const[t,i]=y.useState(e);return y.useEffect(()=>{let r=!1;const o=setTimeout(()=>{r||i(e)},n);return()=>{r=!0,clearTimeout(o)}},[e,n]),t}const Tc={nativeToken:!0};function fr(e){var n;return e&&("nativeToken"in e||((n=e.address)==null?void 0:n.toLowerCase())===Gt.toLowerCase()||(e==null?void 0:e.address)===F3)||!1}function nf(e){return fr(e)?Gt:xe(e.address)}function by(e){var i;const n=yl(e.tokenAmount,500),t=pe({queryFn:()=>Iy({chain:e.chain,client:e.client,fromAmount:Number(n),fromTokenAddress:nf(e.token),to:e.currency||"USD"}),queryKey:["cryptoToFiat",e.chain.id,nf(e.token),n,e.currency]});return t.isLoading?a.jsx(ge,{height:ie.lg,width:"50px"}):(i=t.data)!=null&&i.result?a.jsx(k,{...e,trackingTight:!0,children:Gr(e.currency||"USD",t.data.result)}):null}function k8(){const e=X();return a.jsx(M,{center:"both",flex:"row",style:{marginBottom:"-12px",marginTop:"-12px",position:"relative",width:"100%",zIndex:1e3},children:a.jsx(M,{center:"both",color:"secondaryText",flex:"row",style:{backgroundColor:e.colors.modalBg,border:`1px solid ${e.colors.borderColor}`,borderRadius:G.full,padding:"6px"},children:a.jsx(sl,{height:A["sm+"],width:A["sm+"]})})})}function Cy(e){const n=co(),t=n.length>0&&n.some(i=>i.id==="inApp"||De(i));return pe({enabled:t,queryFn:async()=>{var o;const i=n.find(s=>De(s)),r=i?{id:i.id,partnerId:(o=i.getConfig())==null?void 0:o.partnerId}:void 0;return l3({client:e.client,ecosystem:r})},queryKey:["profiles",n.map(i=>{var r;return`${i.id}-${(r=i.getAccount())==null?void 0:r.address}`})]})}function wd(e){var f,m,g,w;const{client:n,address:t}=e,i=co(),r=Cy({client:n}),o=i.find(p=>{var _,x;return((x=(_=p.getAccount())==null?void 0:_.address)==null?void 0:x.toLowerCase())===t.toLowerCase()}),s=o&&(o.id==="inApp"||De(o)||Ho(o))?(m=(f=r.data)==null?void 0:f.find(p=>!!p.details.email))==null?void 0:m.details.email:void 0,c=cs(o==null?void 0:o.id),l=z2({address:t,client:n}),h=t?l.data||ln(t):"",d=A[e.iconSize||"md"];return a.jsx(M,{flex:"row",style:{justifyContent:"space-between"},children:a.jsxs(M,{center:"y",color:"secondaryText",flex:"row",gap:"sm",children:[o?a.jsx(Vn,{client:e.client,id:o.id,size:d}):a.jsx(M,{borderColor:"borderColor",bg:"modalBg",flex:"row",center:"both",style:{borderStyle:"solid",borderWidth:"1px",borderRadius:G.full,width:`${d}px`,height:`${d}px`,position:"relative"},children:a.jsx(to,{style:{position:"absolute",inset:"25%"}})}),a.jsxs(M,{flex:"column",gap:"3xs",children:[e.label?a.jsx(k,{color:"secondaryText",size:"xs",children:e.label}):null,a.jsx(k,{color:"primaryText",size:e.textSize||"xs",children:h||ln(e.address)}),r.isLoading?a.jsx(ge,{height:ie.sm,width:"100px"}):s||(g=c==null?void 0:c.data)!=null&&g.name?a.jsx(k,{color:"secondaryText",size:"xs",children:s||((w=c==null?void 0:c.data)==null?void 0:w.name)}):null]})]})})}const jy=e=>{const{name:n}=j2(e.chain);return n?a.jsx(k,{color:e.color,size:e.size,style:e.style,children:e.short?_d(n):n}):a.jsx(ge,{height:ie[e.size],width:"50px"})};function _d(e){const n=e.split(" "),t=new Set(["mainnet","testnet","chain"]);return n.filter(i=>!t.has(i.toLowerCase())).join(" ")}const Mr="data:image/svg+xml;charset=UTF-8,%3csvg width='15' height='14' viewBox='0 0 15 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M7 8.04238e-07C5.1435 8.04238e-07 3.36301 0.737501 2.05025 2.05025C0.7375 3.36301 0 5.1435 0 7C0 7.225 -1.52737e-07 7.445 0.0349998 7.665C0.16385 9.0151 0.68213 10.2988 1.52686 11.3598C2.37158 12.4209 3.50637 13.2137 4.79326 13.642C6.0801 14.0702 7.4637 14.1153 8.7758 13.7719C10.0879 13.4285 11.2719 12.7113 12.184 11.7075C13.0961 10.7038 13.6969 9.4567 13.9135 8.1178C14.1301 6.7789 13.9531 5.406 13.4039 4.16587C12.8548 2.92574 11.9573 1.87184 10.8204 1.13228C9.6835 0.392721 8.3563 -0.000649196 7 8.04238e-07ZM7 1C8.581 1.00137 10.0975 1.62668 11.22 2.74V3.24C9.2438 2.55991 7.0956 2.56872 5.125 3.265C4.96758 3.1116 4.76997 3.00586 4.555 2.96H4.43C4.37 2.75 4.315 2.54 4.27 2.325C4.225 2.11 4.2 1.92 4.175 1.715C5.043 1.24658 6.0137 1.00091 7 1ZM5.5 3.935C7.3158 3.32693 9.2838 3.34984 11.085 4C10.8414 5.2703 10.3094 6.4677 9.53 7.5C9.312 7.4077 9.0707 7.3855 8.8395 7.4366C8.6083 7.4877 8.3988 7.6094 8.24 7.785C8.065 7.685 7.89 7.585 7.74 7.47C6.7307 6.7966 5.8877 5.9023 5.275 4.855C5.374 4.73221 5.4461 4.58996 5.4866 4.43749C5.5271 4.28502 5.5351 4.12575 5.51 3.97L5.5 3.935ZM3.5 2.135C3.5 2.24 3.53 2.35 3.55 2.455C3.595 2.675 3.655 2.89 3.715 3.105C3.52353 3.21838 3.36943 3.38531 3.2717 3.58522C3.17397 3.78513 3.13688 4.00927 3.165 4.23C2.37575 4.7454 1.67078 5.3795 1.075 6.11C1.19455 5.3189 1.47112 4.55966 1.88843 3.87701C2.30575 3.19437 2.85539 2.60208 3.505 2.135H3.5ZM3.5 9.99C3.30481 10.0555 3.13037 10.1714 2.9943 10.3259C2.85822 10.4804 2.76533 10.6681 2.725 10.87H2.405C1.59754 9.9069 1.1146 8.7136 1.025 7.46L1.08 7.365C1.70611 6.3942 2.52463 5.562 3.485 4.92C3.62899 5.0704 3.81094 5.179 4.01162 5.2345C4.2123 5.2899 4.42423 5.2901 4.625 5.235C5.2938 6.3652 6.208 7.3306 7.3 8.06C7.505 8.195 7.715 8.32 7.925 8.44C7.9082 8.6312 7.9391 8.8237 8.015 9C7.1 9.7266 6.0445 10.256 4.915 10.555C4.78401 10.3103 4.57028 10.1201 4.31199 10.0184C4.05369 9.9167 3.76766 9.9102 3.505 10L3.5 9.99ZM7 12.99C5.9831 12.9903 4.98307 12.7304 4.095 12.235L4.235 12.205C4.43397 12.1397 4.61176 12.0222 4.74984 11.8648C4.88792 11.7074 4.98122 11.5158 5.02 11.31C6.2985 10.984 7.4921 10.3872 8.52 9.56C8.7642 9.7027 9.0525 9.75 9.3295 9.6927C9.6064 9.6355 9.8524 9.4778 10.02 9.25C10.7254 9.4334 11.4511 9.5275 12.18 9.53H12.445C11.9626 10.5673 11.1938 11.4451 10.2291 12.0599C9.2643 12.6747 8.144 13.0009 7 13V12.99ZM10.255 8.54C10.2545 8.3304 10.1975 8.1249 10.09 7.945C10.9221 6.8581 11.5012 5.5991 11.785 4.26C12.035 4.37667 12.2817 4.50667 12.525 4.65C13.0749 5.9495 13.1493 7.4012 12.735 8.75C11.9049 8.8142 11.0698 8.7484 10.26 8.555L10.255 8.54Z' fill='%23646D7A'/%3e%3c/svg%3e";function Ly({token:e,client:n,size:t,style:i}){const r=X(),o=Ve(e.chainId);return a.jsxs(M,{center:"y",flex:"row",gap:"sm",style:{flexWrap:"nowrap",...i},children:[a.jsxs(M,{style:{height:A[t],position:"relative",width:A[t]},children:[a.jsx(z8,{client:n,size:t,token:e}),o.id!==1&&a.jsx(M,{style:{background:r.colors.borderColor,border:`1.5px solid ${r.colors.modalBg}`,borderRadius:"50%",bottom:"-2px",height:t==="lg"||t==="xl"?A.sm:A.xs,position:"absolute",right:"-2px",width:t==="lg"||t==="xl"?A.sm:A.xs},children:a.jsx(P8,{chain:o,client:n,size:t==="xl"||t==="lg"?"sm":"xs"})})]}),a.jsxs(M,{flex:"column",gap:"4xs",style:{minWidth:0},children:[a.jsx(k,{color:"primaryText",size:t==="xl"?"lg":"sm",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},weight:500,trackingTight:!0,children:e.name}),a.jsx(jy,{chain:o,client:n,short:!0,size:t==="xl"?"sm":"xs"})]})]})}function z8(e){var o;const n=Ve(e.token.chainId),t=nl(n).data,i=X(),r=y.useMemo(()=>{var s;return fr(e.token)||e.token.address===Gt?(t==null?void 0:t.nativeCurrency.symbol)==="ETH"?"ipfs://QmcxZHpyJa8T4i63xqjPYrZ6tKrt55tZJpbXcjSDKuKaf9/ethereum/512.png":(s=t==null?void 0:t.icon)==null?void 0:s.url:e.token.iconUri},[e.token,(o=t==null?void 0:t.icon)==null?void 0:o.url,t==null?void 0:t.nativeCurrency.symbol]);return r?a.jsx(He,{client:e.client,fallbackImage:J4,height:A[e.size],src:r,style:{borderRadius:"50%"},width:A[e.size]}):a.jsx(M,{style:{alignItems:"center",backgroundColor:i.colors.secondaryButtonBg,border:`1px solid ${i.colors.borderColor}`,borderRadius:"50%",display:"flex",height:`${A[e.size]}px`,justifyContent:"center",padding:P.xs,width:`${A[e.size]}px`},children:a.jsx(k,{color:"secondaryText",size:e.size==="xl"?"sm":"xs",style:{fontWeight:600},children:e.token.symbol.slice(0,1)})})}const P8=e=>{const{url:n}=Hh(e.chain);return a.jsx(M,{style:{alignItems:"center",display:"flex",flexShrink:0,position:"relative"},children:a.jsx(He,{client:e.client,fallbackImage:Mr,height:A[e.size],src:R8({chainIconUrl:n,client:e.client}),width:A[e.size]})})},R8=e=>{const n=e.chainIconUrl;if(!n)return Mr;try{return gr({client:e.client,uri:n})}catch{return Mr}};function rf({client:e,token:n,amount:t,onClick:i,style:r,currency:o}){const s=Ve(n.chainId);return a.jsxs(V8,{onClick:()=>i(n),style:{display:"flex",justifyContent:"space-between",padding:`${P.md} ${P.md}`,...r},variant:"secondary",children:[a.jsx(Ly,{client:e,size:"lg",style:{flex:1,maxWidth:"50%"},token:n}),a.jsx(M,{center:"y",color:"secondaryText",flex:"row",gap:"4xs",style:{flex:"1",flexWrap:"nowrap",justifyContent:"flex-end",maxWidth:"50%",minWidth:0},children:a.jsxs(M,{color:"secondaryText",flex:"column",gap:"3xs",style:{alignItems:"flex-end",minWidth:0,overflow:"hidden"},children:[a.jsx(k,{color:"primaryText",size:"sm",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:`${Number(t).toLocaleString(void 0,{maximumFractionDigits:6,minimumFractionDigits:0})} ${n.symbol}`}),a.jsx(by,{currency:o,chain:s,client:e,color:"secondaryText",size:"sm",token:n,tokenAmount:t})]})})]})}const V8=ze(ae)(e=>({"&:hover":{background:X().colors.secondaryButtonBg},background:"transparent",flexDirection:"row",flexWrap:"nowrap",gap:P.sm,justifyContent:"space-between",padding:P.sm,paddingRight:P.xs,transition:"background 200ms ease, transform 150ms ease",...e.style}));function U8(e){var r;const n=X(),t=e.sender||(e.paymentMethod.type==="wallet"?(r=e.paymentMethod.payerWallet.getAccount())==null?void 0:r.address:void 0),i=e.receiver.toLowerCase()!==(t==null?void 0:t.toLowerCase());return a.jsxs(M,{children:[a.jsxs(M,{bg:"tertiaryBg",flex:"column",style:{border:`1px solid ${n.colors.borderColor}`,borderRadius:G.xl},children:[t&&a.jsx(M,{flex:"row",gap:"sm",px:"md",py:"md",style:{borderBottom:`1px dashed ${n.colors.borderColor}`},children:a.jsx(wd,{address:t,client:e.client,iconSize:"lg",textSize:"sm"})}),e.paymentMethod.type==="wallet"&&a.jsx(rf,{currency:e.currency,amount:e.fromAmount,client:e.client,onClick:()=>{},style:{background:"transparent",border:"none",borderRadius:0},token:e.paymentMethod.originToken}),e.paymentMethod.type==="fiat"&&a.jsxs(M,{center:"y",flex:"row",gap:"sm",px:"md",py:"md",style:{justifyContent:"space-between"},children:[a.jsxs(M,{center:"y",flex:"row",gap:"sm",children:[D8({currency:e.paymentMethod.currency,size:"lg"}),a.jsxs(M,{center:"y",flex:"column",gap:"3xs",children:[a.jsx(k,{color:"primaryText",size:"sm",weight:500,children:e.paymentMethod.currency}),a.jsx(k,{color:"secondaryText",size:"xs",children:e.paymentMethod.onramp.charAt(0).toUpperCase()+e.paymentMethod.onramp.slice(1)})]})]}),a.jsx(k,{color:"primaryText",size:"sm",children:e.fromAmount})]})]}),a.jsx(k8,{}),a.jsxs(M,{bg:"tertiaryBg",flex:"column",style:{border:`1px solid ${n.colors.borderColor}`,borderRadius:G.xl},children:[i&&a.jsx(M,{flex:"row",gap:"sm",px:"md",py:"md",style:{borderBottom:`1px dashed ${n.colors.borderColor}`},children:a.jsx(wd,{address:e.receiver,client:e.client,iconSize:"lg",textSize:"sm"})}),e.modeInfo.mode==="direct_payment"&&a.jsxs(M,{center:"y",flex:"row",gap:"sm",p:"md",style:{justifyContent:"space-between"},children:[a.jsxs(M,{center:"y",flex:"column",gap:"3xs",style:{flex:1},children:[a.jsx(k,{color:"primaryText",size:"sm",weight:500,children:e.metadata.title||"Payment"}),e.metadata.description&&a.jsx(k,{color:"secondaryText",size:"xs",children:e.metadata.description})]}),a.jsxs(M,{center:"y",flex:"column",gap:"3xs",style:{alignItems:"flex-end"},children:[a.jsx(by,{currency:e.currency,chain:Ot(e.toToken.chainId),client:e.client,color:"primaryText",size:"sm",token:e.toToken,tokenAmount:e.modeInfo.paymentInfo.amount}),a.jsxs(k,{color:"secondaryText",size:"xs",children:[e.modeInfo.paymentInfo.amount," ",e.toToken.symbol]})]})]}),e.modeInfo.mode==="fund_wallet"&&a.jsx(rf,{currency:e.currency,amount:e.toAmount,client:e.client,onClick:()=>{},style:{background:"transparent",border:"none",borderRadius:0},token:e.toToken}),e.modeInfo.mode==="transaction"&&a.jsx(B8,{client:e.client,paymentMethod:e.paymentMethod,transaction:e.modeInfo.transaction,metadata:e.metadata})]})]})}const B8=e=>{const n=X(),t=b8({client:e.client,transaction:e.transaction,wallet:e.paymentMethod.payerWallet});return t.data?a.jsxs(M,{center:"y",flex:"row",gap:"sm",p:"md",style:{justifyContent:"space-between"},children:[a.jsxs(M,{center:"y",flex:"column",gap:"3xs",style:{flex:1},children:[a.jsx(k,{color:"primaryText",size:"sm",weight:500,children:e.metadata.title||"Transaction"}),e.metadata.description&&a.jsx(k,{color:"secondaryText",size:"xs",children:e.metadata.description})]}),a.jsx(M,{center:"y",flex:"column",gap:"3xs",style:{alignItems:"flex-end"},children:a.jsx(k,{color:"secondaryText",size:"xs",style:{backgroundColor:n.colors.secondaryButtonBg,borderRadius:P.sm,fontFamily:"monospace",padding:`${P.xs} ${P.sm}`,textAlign:"right"},children:t.data.functionInfo.functionName})})]}):a.jsxs(M,{center:"y",flex:"row",gap:"sm",p:"md",style:{justifyContent:"space-between"},children:[a.jsxs(M,{center:"y",flex:"column",gap:"3xs",style:{flex:1},children:[a.jsx("div",{style:{backgroundColor:n.colors.skeletonBg,borderRadius:P.xs,height:"16px",width:"120px"}}),e.metadata.description&&a.jsx("div",{style:{backgroundColor:n.colors.skeletonBg,borderRadius:P.xs,height:"12px",width:"80px"}})]}),a.jsx(M,{center:"y",flex:"column",gap:"3xs",style:{alignItems:"flex-end"},children:a.jsx("div",{style:{backgroundColor:n.colors.skeletonBg,borderRadius:P.sm,height:"24px",width:"100px"}})})]})};function W8({metadata:e,confirmButtonLabel:n,client:t,paymentMethod:i,preparedQuote:r,onConfirm:o,onBack:s,onError:c,currency:l,modeInfo:h}){var _,x;const d=X(),f=()=>{try{o()}catch(I){c(I)}},m=E2(r.steps.flatMap(I=>[Ot(I.originToken.chainId),Ot(I.destinationToken.chainId)]),10),g=y.useMemo(()=>m.map(I=>I.data),[m]).filter(I=>!!I),p=(()=>{var I,b,j,C,E,T;switch(r.type){case"transfer":{const O=i.type==="wallet"?i.originToken:void 0;return O?{destinationAmount:Dt(r.destinationAmount,O.decimals),destinationToken:O,estimatedTime:r.estimatedExecutionTimeMs,originAmount:Dt(r.originAmount,O.decimals),originToken:O}:(c(new Error("Invalid payment method")),{destinationAmount:"0",destinationToken:void 0,estimatedTime:0,originAmount:"0",originToken:void 0})}case"buy":{const O=i.type==="wallet"?i:void 0;return O?{destinationAmount:Dt(r.destinationAmount,((b=(I=r.steps[r.steps.length-1])==null?void 0:I.destinationToken)==null?void 0:b.decimals)??18),destinationToken:(j=r.steps[r.steps.length-1])==null?void 0:j.destinationToken,estimatedTime:r.estimatedExecutionTimeMs,originAmount:Dt(r.originAmount,O.originToken.decimals),originToken:i.type==="wallet"?i.originToken:void 0}:(c(new Error("Invalid payment method")),{destinationAmount:"0",destinationToken:void 0,estimatedTime:0,originAmount:"0",originToken:void 0})}case"sell":{const O=i.type==="wallet"?i:void 0;return O?{destinationAmount:Dt(r.destinationAmount,((E=(C=r.steps[r.steps.length-1])==null?void 0:C.destinationToken)==null?void 0:E.decimals)??18),destinationToken:(T=r.steps[r.steps.length-1])==null?void 0:T.destinationToken,estimatedTime:r.estimatedExecutionTimeMs,originAmount:Dt(r.originAmount,O.originToken.decimals),originToken:i.type==="wallet"?i.originToken:void 0}:(c(new Error("Invalid payment method")),{destinationAmount:"0",destinationToken:void 0,estimatedTime:0,originAmount:"0",originToken:void 0})}case"onramp":{const O=i.type==="fiat"?i:void 0;return O?{destinationAmount:Dt(r.destinationAmount,r.destinationToken.decimals),destinationToken:r.destinationToken,estimatedTime:void 0,originAmount:Gr(O.currency,Number(r.currencyAmount)),originToken:void 0}:(c(new Error("Invalid payment method")),{destinationAmount:"0",destinationToken:void 0,estimatedTime:0,originAmount:"0",originToken:void 0})}default:throw new Error(`Unsupported bridge prepare type: ${r.type}`)}})();return a.jsxs(M,{flex:"column",fullHeight:!0,px:"md",pb:"md",pt:"md+",children:[a.jsx(_e,{onBack:s,title:e.title||"Payment Details"}),a.jsx(U,{y:"lg"}),a.jsxs(M,{flex:"column",children:[a.jsxs(M,{flex:"column",children:[p.destinationToken&&a.jsx(U8,{currency:l,metadata:e,modeInfo:h,client:t,fromAmount:p.originAmount,paymentMethod:i,receiver:r.intent.receiver,sender:r.intent.sender||((x=(_=i.payerWallet)==null?void 0:_.getAccount())==null?void 0:x.address),toAmount:p.destinationAmount,toToken:p.destinationToken}),a.jsx(U,{y:"md"}),a.jsxs(M,{flex:"row",gap:"sm",children:[a.jsxs(M,{flex:"row",gap:"xs",style:{flex:1,justifyContent:"center"},children:[a.jsx(k,{color:"secondaryText",size:"sm",children:"Estimated Time"}),a.jsx(k,{color:"primaryText",size:"sm",children:p.estimatedTime?`~${Math.ceil(p.estimatedTime/6e4)} min`:"~2 min"})]}),r.steps.length>1?a.jsxs(M,{flex:"row",gap:"xs",style:{flex:1,justifyContent:"center"},children:[a.jsx(k,{color:"secondaryText",size:"sm",children:"Route Length"}),a.jsxs(k,{color:"primaryText",size:"sm",children:[r.steps.length," step",r.steps.length!==1?"s":""]})]}):null]})]}),r.steps.length>1&&a.jsxs(M,{flex:"column",children:[a.jsx(U,{y:"sm"}),a.jsx(M,{flex:"column",gap:"md+",style:{backgroundColor:d.colors.tertiaryBg,border:`1px solid ${d.colors.borderColor}`,borderRadius:G.xl,padding:`${P.md} ${P.md}`},children:r.steps.map((I,b)=>{var j,C,E;return a.jsx(M,{flex:"column",gap:"sm",children:a.jsxs(M,{flex:"row",gap:"sm",style:{alignItems:"center"},children:[a.jsx(M,{center:"both",flex:"row",style:{backgroundColor:d.colors.modalBg,border:`1px solid ${d.colors.borderColor}`,borderRadius:G.full,color:d.colors.secondaryText,flexShrink:0,fontWeight:"bold",height:`${A.lg}px`,width:`${A.lg}px`},children:a.jsx(k,{color:"secondaryText",size:"sm",children:b+1})}),a.jsx(M,{center:"y",flex:"row",gap:"sm",style:{flex:1},children:a.jsxs(M,{flex:"column",gap:"3xs",style:{flex:1},children:[a.jsx(k,{color:"primaryText",size:"sm",weight:500,children:I.destinationToken.chainId!==I.originToken.chainId?a.jsxs(a.Fragment,{children:["Bridge"," ",I.originToken.symbol===I.destinationToken.symbol?I.originToken.symbol:`${I.originToken.symbol} to ${I.destinationToken.symbol}`]}):a.jsxs(a.Fragment,{children:["Swap ",I.originToken.symbol," to"," ",I.destinationToken.symbol]})}),a.jsx(k,{color:"secondaryText",size:"xs",children:I.originToken.chainId!==I.destinationToken.chainId?a.jsxs(a.Fragment,{children:[(j=g.find(T=>T.chainId===I.originToken.chainId))==null?void 0:j.name," ","to"," ",(C=g.find(T=>T.chainId===I.destinationToken.chainId))==null?void 0:C.name]}):(E=g.find(T=>T.chainId===I.originToken.chainId))==null?void 0:E.name})]})})]})},`step-${b}-${I.originToken.address}-${I.destinationToken.address}`)})})]}),a.jsx(U,{y:"md"}),a.jsx(M,{flex:"column",gap:"sm",children:a.jsx(ae,{fullWidth:!0,onClick:f,variant:"primary",style:{borderRadius:G.full},children:n||"Confirm Payment"})})]})]})}function $8(e){var h;const{destinationToken:n,destinationAmount:t,client:i,payerWallet:r,supportedTokens:o}=e,s=ut(),c=r||s,l=pe({enabled:!!c,queryFn:async()=>{var j;const d=c==null?void 0:c.getAccount();if(!c||!d)throw new Error("No wallet connected");const f=new URL(`${Ln("bridge")}/v1/buy/quote/${d.address}`);f.searchParams.set("destinationChainId",n.chainId.toString()),f.searchParams.set("destinationTokenAddress",n.address),f.searchParams.set("amount",cr(t,n.decimals).toString()),f.searchParams.set("includeQuotes","false");const g=await En(i)(f.toString());if(!g.ok){const C=await g.json();throw new at({code:C.code||"UNKNOWN_ERROR",correlationId:C.correlationId||void 0,message:C.message||g.statusText,statusCode:g.status})}const{data:w}=await g.json(),_=w.map(C=>({balance:BigInt(C.balance),originToken:C.token,payerWallet:c,type:"wallet",quote:C.quote})).filter(C=>!!C.originToken.prices.USD).sort((C,E)=>Number.parseFloat(ei(E.balance,E.originToken.decimals))*(E.originToken.prices.USD||1)-Number.parseFloat(ei(C.balance,C.originToken.decimals))*(C.originToken.prices.USD||1)),x=o?Object.keys(o).flatMap(C=>{var E;return((E=o[Number(C)])==null?void 0:E.map(T=>({chainId:Number(C),address:T.address})))??[]}):[],I=o?_.filter(C=>x.find(E=>E.chainId===C.originToken.chainId&&E.address.toLowerCase()===C.originToken.address.toLowerCase())):_,b=(((j=n.prices)==null?void 0:j.USD)??0)*Number(t);return I.map(C=>{var O;const T=(((O=C.originToken.prices)==null?void 0:O.USD)??0)*Number(ei(C.balance,C.originToken.decimals))>=b;return{...C,action:"buy",hasEnoughBalance:T}})},queryKey:["payment-methods",n.chainId,n.address,t,(h=r==null?void 0:r.getAccount())==null?void 0:h.address,o],refetchOnWindowFocus:!1,staleTime:5*60*1e3});return{data:l.data||[],error:l.error,isError:l.isError,isLoading:l.isLoading,isSuccess:l.isSuccess,refetch:l.refetch}}function Ey(e){const n=lt(),t=co(),i=e.wallets||ll({appMetadata:e.appMetadata,chains:e.chains}).filter(o=>o.id!=="inApp"),r=l0({size:"compact",wallets:i,welcomeScreen:void 0});return a.jsx(My,{accountAbstraction:e.accountAbstraction,auth:void 0,chain:e.chain||n,chains:e.chains,client:e.client,connectLocale:e.connectLocale,hideHeader:e.isEmbed,isOpen:!0,meta:{showThirdwebBranding:!1},modalHeader:{onBack:e.onBack,title:"Connect"},onClose:()=>{},onConnect:o=>{e.onSelect(o)},recommendedWallets:e.recommendedWallets,screenSetup:r,setModalVisibility:()=>{},shouldSetActive:!1,showAllWallets:e.showAllWallets,size:"compact",walletConnect:e.walletConnect,walletIdsToHide:t.map(o=>o.id),wallets:i,welcomeScreen:void 0})}function Y8(e,n){return zh({queries:["coinbase","stripe","transak"].map(r=>({...n,enabled:!!e,queryFn:async()=>{if(!e)throw new Error("No params provided");const o=await _a(e.client,e.tokenAddress,e.chainId),s=cr(e.amount,o.decimals);return Ph({amount:s,chainId:e.chainId,client:e.client,currency:e.currency||"USD",onramp:r,receiver:e.receiver,tokenAddress:e.tokenAddress,country:e.country})},queryKey:["onramp-prepare",r,e],retry:!1}))})}const F8=[{description:"Fast and secure payments",iconUri:"https://i.ibb.co/LDJ3Rk2t/Frame-5.png",id:"coinbase",name:"Coinbase"},{description:"Trusted payment processing",iconUri:"https://i.ibb.co/CpgQC2Lf/images-3.png",id:"stripe",name:"Stripe"},{description:"Global payment solution",iconUri:"https://i.ibb.co/Xx2r882p/Transak-official-symbol-1.png",id:"transak",name:"Transak"}];function Q8({onProviderSelected:e,client:n,toChainId:t,toTokenAddress:i,toAddress:r,toAmount:o,currency:s,country:c}){const l=Y8({amount:o||"0",chainId:t,client:n,currency:s||"USD",receiver:mc(r),tokenAddress:mc(i),country:c}),h=y.useMemo(()=>l.map(f=>f.data).filter(f=>!!f),[l]),d=l.some(f=>f.isLoading);return l.every(f=>f.isError)?a.jsx(M,{center:"both",flex:"column",style:{minHeight:"200px",flexGrow:1},children:a.jsx(k,{color:"secondaryText",size:"sm",children:"No quotes available"})}):a.jsx(M,{flex:"column",gap:"xs",style:{flexGrow:1},children:d?a.jsxs(M,{center:"both",flex:"column",style:{flexGrow:1,paddingBottom:P.lg},px:"md",children:[a.jsx(ke,{color:"secondaryText",size:"xl"}),a.jsx(U,{y:"lg"}),a.jsx(k,{center:!0,color:"primaryText",size:"lg",weight:600,trackingTight:!0,children:"Searching Providers"}),a.jsx(U,{y:"xs"}),a.jsx(k,{center:!0,color:"secondaryText",size:"sm",multiline:!0,style:{textWrap:"pretty"},children:"Searching for the best providers for this payment"})]}):h.sort((f,m)=>f.currencyAmount-m.currencyAmount).map(f=>{const m=F8.find(g=>g.id===f.intent.onramp);return m?a.jsx(ae,{fullWidth:!0,onClick:()=>e(m.id),style:{borderRadius:G.lg,textAlign:"left",padding:`${P.md}`},variant:"secondary",children:a.jsxs(M,{flex:"row",gap:"sm",style:{alignItems:"center",width:"100%"},children:[a.jsx(He,{alt:m.name,client:n,height:A.lg,src:m.iconUri,width:A.lg,style:{borderRadius:G.full}}),a.jsx(M,{flex:"column",gap:"3xs",style:{flex:1},children:a.jsx(k,{color:"primaryText",size:"md",weight:500,children:m.name})}),a.jsxs(M,{flex:"column",gap:"3xs",style:{alignItems:"flex-end"},children:[a.jsx(k,{color:"primaryText",size:"sm",style:{fontWeight:500},children:Gr(s||"USD",f.currencyAmount)}),a.jsxs(k,{color:"secondaryText",size:"xs",children:[xa(Number(ei(f.destinationAmount,f.destinationToken.decimals)),4)," ",f.destinationToken.symbol]})]})]})},m.id):null})})}function H8({paymentMethod:e,client:n,onPaymentMethodSelected:t,currency:i}){const r=X(),o=e.hasEnoughBalance,s=e.originToken.prices[i||"USD"];return a.jsx(ae,{disabled:!o,fullWidth:!0,onClick:()=>t(e),style:{backgroundColor:r.colors.tertiaryBg,borderRadius:G.lg,padding:`${P.md} ${P.md}`,textAlign:"left"},variant:"secondary",children:a.jsxs(M,{flex:"row",gap:"md",style:{alignItems:"center",width:"100%"},children:[a.jsx(Ly,{client:n,size:"lg",style:{maxWidth:"50%"},token:e.originToken}),a.jsxs(M,{flex:"column",gap:"3xs",style:{alignItems:"flex-end",flex:1},children:[s&&a.jsx(k,{color:"primaryText",size:"sm",style:{fontWeight:500,textWrap:"nowrap"},children:Gr(i||"USD",Number(Dt(e.balance,e.originToken.decimals))*s)}),a.jsx(M,{flex:"row",gap:"3xs",children:a.jsxs(k,{color:o?"success":"danger",size:"xs",children:[Dt(e.balance,e.originToken.decimals)," ",e.originToken.symbol]})})]})]})},`${e.originToken.address}-${e.originToken.chainId}`)}function Z8({paymentMethods:e,paymentMethodsLoading:n,client:t,onPaymentMethodSelected:i,onBack:r,destinationToken:o,destinationAmount:s,feePayer:c,currency:l}){const h=X();return n?a.jsx(M,{flex:"column",gap:"xs",pb:"lg",style:{maxHeight:"400px",overflowY:"auto",scrollbarWidth:"none"},children:new Array(10).fill(0).map((d,f)=>a.jsx(M,{style:{backgroundColor:h.colors.tertiaryBg,borderRadius:G.lg,padding:`${P.md} ${P.md}`},children:a.jsxs(M,{flex:"row",gap:"md",style:{alignItems:"center",width:"100%"},children:[a.jsxs(M,{center:"y",flex:"row",gap:"sm",style:{maxWidth:"50%"},children:[a.jsx("div",{style:{backgroundColor:h.colors.skeletonBg,borderRadius:"50%",height:"32px",width:"32px"}}),a.jsxs(M,{flex:"column",gap:"3xs",children:[a.jsx(ge,{height:"14px",width:"60px"}),a.jsx(ge,{height:"12px",width:"40px"})]})]}),a.jsxs(M,{flex:"column",gap:"3xs",style:{alignItems:"flex-end",flex:1},children:[a.jsx(ge,{height:"16px",width:"80px"}),a.jsxs(M,{flex:"row",gap:"3xs",children:[a.jsx(ge,{height:"12px",width:"50px"}),a.jsx(ge,{height:"12px",width:"40px"})]})]})]})},f))}):e.length===0?a.jsxs(M,{center:"both",flex:"column",style:{minHeight:"250px"},children:[a.jsx(k,{center:!0,color:"primaryText",size:"md",children:"No available tokens found for this wallet"}),a.jsx(U,{y:"sm"}),a.jsx(k,{center:!0,color:"secondaryText",size:"sm",children:"Try connecting a different wallet or pay with card"}),a.jsx(U,{y:"lg"}),a.jsx(ae,{onClick:r,variant:"primary",children:"Select another payment method"})]}):a.jsx(M,{flex:"column",gap:"xs",pb:"lg",style:{maxHeight:"400px",overflowY:"auto",scrollbarWidth:"none"},children:e.filter(d=>d.type==="wallet").map(d=>a.jsx(H8,{client:t,destinationAmount:s,destinationToken:o,feePayer:c,onPaymentMethodSelected:i,paymentMethod:d,currency:l},`${d.originToken.address}-${d.originToken.chainId}`))})}const G8=e=>a.jsxs("svg",{fill:"none",height:e.size,role:"presentation",stroke:e.color??"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1",viewBox:"0 0 24 24",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("rect",{height:"14",rx:"2",width:"20",x:"2",y:"5"}),a.jsx("line",{x1:"2",x2:"22",y1:"10",y2:"10"})]});function q8({connectedWallets:e,client:n,onWalletSelected:t,onFiatSelected:i,onConnectWallet:r,paymentMethods:o=["crypto","card"]}){const s=X();return a.jsxs(M,{flex:"column",gap:"xs",children:[o.includes("crypto")&&a.jsxs(a.Fragment,{children:[e.length>0&&a.jsx(M,{flex:"column",gap:"sm",children:e.map(c=>{const l=c.getAccount();return l!=null&&l.address?a.jsx(ae,{fullWidth:!0,onClick:()=>t(c),style:{borderRadius:G.md,justifyContent:"space-between",padding:`${P.md} ${P.md}`},variant:"secondary",children:a.jsx(wd,{address:l==null?void 0:l.address,client:n,iconSize:"lg",textSize:"sm"})},`${c.id}-${l.address}`):null})}),a.jsx(ae,{fullWidth:!0,onClick:r,style:{borderRadius:G.md,height:"auto",padding:`${P.md} ${P.md}`,textAlign:"left"},variant:"secondary",children:a.jsxs(M,{flex:"row",gap:"md",style:{alignItems:"center",width:"100%"},children:[a.jsx(M,{style:{alignItems:"center",border:`1px dashed ${s.colors.secondaryText}`,borderRadius:G.full,display:"flex",height:`${A.lg}px`,justifyContent:"center",width:`${A.lg}px`},children:a.jsx(al,{color:s.colors.secondaryText,height:A["sm+"],width:A["sm+"]})}),a.jsxs(M,{flex:"column",gap:"3xs",style:{flex:1},children:[a.jsx(k,{color:"primaryText",size:"sm",children:"Connect a Wallet"}),a.jsx(k,{color:"secondaryText",size:"xs",children:"Pay with any web3 wallet"})]})]})})]}),o.includes("card")&&a.jsx(ae,{fullWidth:!0,onClick:i,style:{borderRadius:G.md,height:"auto",padding:`${P.md} ${P.md}`,textAlign:"left"},variant:"secondary",children:a.jsxs(M,{flex:"row",gap:"md",style:{alignItems:"center",width:"100%"},children:[a.jsx(G8,{color:s.colors.secondaryText,size:A.lg}),a.jsxs(M,{flex:"column",gap:"3xs",style:{flex:1},children:[a.jsx(k,{color:"primaryText",size:"sm",children:"Pay with Card"}),a.jsx(k,{color:"secondaryText",size:"xs",children:"Onramp and pay in one step"})]})]})})]})}function K8({destinationToken:e,client:n,destinationAmount:t,receiverAddress:i,onPaymentMethodSelected:r,onError:o,onBack:s,connectOptions:c,connectLocale:l,paymentMethods:h,supportedTokens:d,feePayer:f,currency:m,country:g}){var R,B;const w=co(),p=ut(),_=h.length===1&&h[0]==="card"?{type:"fiatProviderSelection"}:{type:"walletSelection"},[x,I]=y.useState(_),b=x.type==="tokenSelection"?x.selectedWallet:p,{data:j,isLoading:C,error:E}=$8({client:n,destinationAmount:t,destinationToken:e,payerWallet:b,supportedTokens:d});y.useEffect(()=>{E&&o(E)},[E,o]);const T=Y=>{try{r(Y)}catch($){o($)}},O=Y=>{an({client:n,event:"ub:ui:token_selection"}),I({selectedWallet:Y,type:"tokenSelection"})},L=async()=>{I({type:"walletConnection"})},N=()=>{an({client:n,event:"ub:ui:fiat_provider_selection"}),I({type:"fiatProviderSelection"})},v=()=>{I({type:"walletSelection"})},D=Y=>{var F;if(!(i||((F=b==null?void 0:b.getAccount())==null?void 0:F.address))){o(new Error("No recipient address available for fiat payment"));return}T({currency:m||"USD",onramp:Y,payerWallet:b,type:"fiat"})},z=()=>{switch(x.type){case"walletSelection":return"Choose Payment Method";case"tokenSelection":return"Select Token";case"fiatProviderSelection":return"Select Payment Provider";case"walletConnection":return"Connect Wallet"}},V=()=>{if(h.length===1&&h[0]==="card")return s;switch(x.type){case"walletSelection":return s;case"tokenSelection":case"fiatProviderSelection":case"walletConnection":return v}};if(x.type==="walletConnection"){const Y=e?Ot(e.chainId):void 0,$=Y?[Y,...(c==null?void 0:c.chains)||[]]:c==null?void 0:c.chains;return a.jsx(Ey,{accountAbstraction:c==null?void 0:c.accountAbstraction,appMetadata:c==null?void 0:c.appMetadata,chain:Y||(c==null?void 0:c.chain),chains:$,client:n,connectLocale:l,hiddenWallets:[],isEmbed:!1,onBack:v,onSelect:O,recommendedWallets:c==null?void 0:c.recommendedWallets,showAllWallets:(c==null?void 0:c.showAllWallets)===void 0?!0:c==null?void 0:c.showAllWallets,walletConnect:c==null?void 0:c.walletConnect,wallets:(R=c==null?void 0:c.wallets)==null?void 0:R.filter(W=>W.id!=="inApp")})}return a.jsxs(M,{flex:"column",px:"md",pt:"md+",children:[a.jsx(_e,{onBack:V(),title:z()}),a.jsx(U,{y:"lg"}),a.jsxs(M,{flex:"column",style:{minHeight:"300px"},children:[x.type==="walletSelection"&&a.jsx(q8,{client:n,connectedWallets:w,onConnectWallet:L,onFiatSelected:N,onWalletSelected:O,paymentMethods:h}),x.type==="tokenSelection"&&a.jsx(Z8,{client:n,destinationAmount:cr(t,e.decimals),destinationToken:e,feePayer:f,onBack:v,onPaymentMethodSelected:T,paymentMethods:j,paymentMethodsLoading:C,currency:m}),x.type==="fiatProviderSelection"&&a.jsx(Q8,{country:g,client:n,onProviderSelected:D,toAddress:i||((B=b==null?void 0:b.getAccount())==null?void 0:B.address)||"",toAmount:t,toChainId:e.chainId,toTokenAddress:e.address,currency:m})]})]})}function Ty(e){const[n,t]=y.useState(!1),i=y.useCallback(async()=>{await navigator.clipboard.writeText(e),t(!0)},[e]);return y.useEffect(()=>{let r=null;return n&&(r=window.setTimeout(()=>{t(!1)},1500)),()=>{r&&window.clearTimeout(r)}},[n]),{hasCopied:n,onCopy:i}}function Qt(e,n,{checkForDefaultPrevented:t=!0}={}){return function(r){if(e==null||e(r),t===!1||!r.defaultPrevented)return n==null?void 0:n(r)}}function of(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function vy(...e){return n=>{let t=!1;const i=e.map(r=>{const o=of(r,n);return!t&&typeof o=="function"&&(t=!0),o});if(t)return()=>{for(let r=0;r<i.length;r++){const o=i[r];typeof o=="function"?o():of(e[r],null)}}}}function Un(...e){return y.useCallback(vy(...e),e)}function J8(e,n){const t=y.createContext(n),i=o=>{const{children:s,...c}=o,l=y.useMemo(()=>c,Object.values(c));return a.jsx(t.Provider,{value:l,children:s})};i.displayName=e+"Provider";function r(o){const s=y.useContext(t);if(s)return s;if(n!==void 0)return n;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[i,r]}function y0(e,n=[]){let t=[];function i(o,s){const c=y.createContext(s),l=t.length;t=[...t,s];const h=f=>{var x;const{scope:m,children:g,...w}=f,p=((x=m==null?void 0:m[e])==null?void 0:x[l])||c,_=y.useMemo(()=>w,Object.values(w));return a.jsx(p.Provider,{value:_,children:g})};h.displayName=o+"Provider";function d(f,m){var p;const g=((p=m==null?void 0:m[e])==null?void 0:p[l])||c,w=y.useContext(g);if(w)return w;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[h,d]}const r=()=>{const o=t.map(s=>y.createContext(s));return function(c){const l=(c==null?void 0:c[e])||o;return y.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return r.scopeName=e,[i,X8(r,...n)]}function X8(...e){const n=e[0];if(e.length===1)return n;const t=()=>{const i=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(o){const s=i.reduce((c,{useScope:l,scopeName:h})=>{const f=l(o)[`__scope${h}`];return{...c,...f}},{});return y.useMemo(()=>({[`__scope${n.scopeName}`]:s}),[s])}};return t.scopeName=n.scopeName,t}function Ny(e){const n=e9(e),t=y.forwardRef((i,r)=>{const{children:o,...s}=i,c=y.Children.toArray(o),l=c.find(n9);if(l){const h=l.props.children,d=c.map(f=>f===l?y.Children.count(h)>1?y.Children.only(null):y.isValidElement(h)?h.props.children:null:f);return a.jsx(n,{...s,ref:r,children:y.isValidElement(h)?y.cloneElement(h,void 0,d):null})}return a.jsx(n,{...s,ref:r,children:o})});return t.displayName=`${e}.Slot`,t}function e9(e){const n=y.forwardRef((t,i)=>{const{children:r,...o}=t;if(y.isValidElement(r)){const s=r9(r),c=i9(o,r.props);return r.type!==y.Fragment&&(c.ref=i?vy(i,s):s),y.cloneElement(r,c)}return y.Children.count(r)>1?y.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var Sy=Symbol("radix.slottable");function t9(e){const n=({children:t})=>a.jsx(a.Fragment,{children:t});return n.displayName=`${e}.Slottable`,n.__radixId=Sy,n}function n9(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Sy}function i9(e,n){const t={...n};for(const i in n){const r=e[i],o=n[i];/^on[A-Z]/.test(i)?r&&o?t[i]=(...c)=>{const l=o(...c);return r(...c),l}:r&&(t[i]=r):i==="style"?t[i]={...r,...o}:i==="className"&&(t[i]=[r,o].filter(Boolean).join(" "))}return{...e,...t}}function r9(e){var i,r;let n=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,t=n&&"isReactWarning"in n&&n.isReactWarning;return t?e.ref:(n=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,t=n&&"isReactWarning"in n&&n.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}var o9=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Kt=o9.reduce((e,n)=>{const t=Ny(`Primitive.${n}`),i=y.forwardRef((r,o)=>{const{asChild:s,...c}=r,l=s?t:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(l,{...c,ref:o})});return i.displayName=`Primitive.${n}`,{...e,[n]:i}},{});function s9(e,n){e&&jg.flushSync(()=>e.dispatchEvent(n))}function qo(e){const n=y.useRef(e);return y.useEffect(()=>{n.current=e}),y.useMemo(()=>(...t)=>{var i;return(i=n.current)==null?void 0:i.call(n,...t)},[])}function a9(e,n=globalThis==null?void 0:globalThis.document){const t=qo(e);y.useEffect(()=>{const i=r=>{r.key==="Escape"&&t(r)};return n.addEventListener("keydown",i,{capture:!0}),()=>n.removeEventListener("keydown",i,{capture:!0})},[t,n])}var c9="DismissableLayer",xd="dismissableLayer.update",l9="dismissableLayer.pointerDownOutside",u9="dismissableLayer.focusOutside",sf,Ay=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),p0=y.forwardRef((e,n)=>{const{disableOutsidePointerEvents:t=!1,onEscapeKeyDown:i,onPointerDownOutside:r,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,h=y.useContext(Ay),[d,f]=y.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=y.useState({}),w=Un(n,T=>f(T)),p=Array.from(h.layers),[_]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),x=p.indexOf(_),I=d?p.indexOf(d):-1,b=h.layersWithOutsidePointerEventsDisabled.size>0,j=I>=x,C=f9(T=>{const O=T.target,L=[...h.branches].some(N=>N.contains(O));!j||L||(r==null||r(T),s==null||s(T),T.defaultPrevented||c==null||c())},m),E=m9(T=>{const O=T.target;[...h.branches].some(N=>N.contains(O))||(o==null||o(T),s==null||s(T),T.defaultPrevented||c==null||c())},m);return a9(T=>{I===h.layers.size-1&&(i==null||i(T),!T.defaultPrevented&&c&&(T.preventDefault(),c()))},m),y.useEffect(()=>{if(d)return t&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(sf=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(d)),h.layers.add(d),af(),()=>{t&&h.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=sf)}},[d,m,t,h]),y.useEffect(()=>()=>{d&&(h.layers.delete(d),h.layersWithOutsidePointerEventsDisabled.delete(d),af())},[d,h]),y.useEffect(()=>{const T=()=>g({});return document.addEventListener(xd,T),()=>document.removeEventListener(xd,T)},[]),a.jsx(Kt.div,{...l,ref:w,style:{pointerEvents:b?j?"auto":"none":void 0,...e.style},onFocusCapture:Qt(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Qt(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Qt(e.onPointerDownCapture,C.onPointerDownCapture)})});p0.displayName=c9;var d9="DismissableLayerBranch",h9=y.forwardRef((e,n)=>{const t=y.useContext(Ay),i=y.useRef(null),r=Un(n,i);return y.useEffect(()=>{const o=i.current;if(o)return t.branches.add(o),()=>{t.branches.delete(o)}},[t.branches]),a.jsx(Kt.div,{...e,ref:r})});h9.displayName=d9;function f9(e,n=globalThis==null?void 0:globalThis.document){const t=qo(e),i=y.useRef(!1),r=y.useRef(()=>{});return y.useEffect(()=>{const o=c=>{if(c.target&&!i.current){let l=function(){Dy(l9,t,h,{discrete:!0})};const h={originalEvent:c};c.pointerType==="touch"?(n.removeEventListener("click",r.current),r.current=l,n.addEventListener("click",r.current,{once:!0})):l()}else n.removeEventListener("click",r.current);i.current=!1},s=window.setTimeout(()=>{n.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),n.removeEventListener("pointerdown",o),n.removeEventListener("click",r.current)}},[n,t]),{onPointerDownCapture:()=>i.current=!0}}function m9(e,n=globalThis==null?void 0:globalThis.document){const t=qo(e),i=y.useRef(!1);return y.useEffect(()=>{const r=o=>{o.target&&!i.current&&Dy(u9,t,{originalEvent:o},{discrete:!1})};return n.addEventListener("focusin",r),()=>n.removeEventListener("focusin",r)},[n,t]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function af(){const e=new CustomEvent(xd);document.dispatchEvent(e)}function Dy(e,n,t,{discrete:i}){const r=t.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:t});n&&r.addEventListener(e,n,{once:!0}),i?s9(r,o):r.dispatchEvent(o)}var Ir=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},g9=Dg[" useId ".trim().toString()]||(()=>{}),y9=0;function rc(e){const[n,t]=y.useState(g9());return Ir(()=>{t(i=>i??String(y9++))},[e]),e||(n?`radix-${n}`:"")}var p9="Arrow",Oy=y.forwardRef((e,n)=>{const{children:t,width:i=10,height:r=5,...o}=e;return a.jsx(Kt.svg,{...o,ref:n,width:i,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?t:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});Oy.displayName=p9;var w9=Oy;function _9(e){const[n,t]=y.useState(void 0);return Ir(()=>{if(e){t({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const o=r[0];let s,c;if("borderBoxSize"in o){const l=o.borderBoxSize,h=Array.isArray(l)?l[0]:l;s=h.inlineSize,c=h.blockSize}else s=e.offsetWidth,c=e.offsetHeight;t({width:s,height:c})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else t(void 0)},[e]),n}var w0="Popper",[ky,zy]=y0(w0),[x9,Py]=ky(w0),Ry=e=>{const{__scopePopper:n,children:t}=e,[i,r]=y.useState(null);return a.jsx(x9,{scope:n,anchor:i,onAnchorChange:r,children:t})};Ry.displayName=w0;var Vy="PopperAnchor",Uy=y.forwardRef((e,n)=>{const{__scopePopper:t,virtualRef:i,...r}=e,o=Py(Vy,t),s=y.useRef(null),c=Un(n,s);return y.useEffect(()=>{o.onAnchorChange((i==null?void 0:i.current)||s.current)}),i?null:a.jsx(Kt.div,{...r,ref:c})});Uy.displayName=Vy;var _0="PopperContent",[M9,I9]=ky(_0),By=y.forwardRef((e,n)=>{var re,oe,ue,Ce,Ue,Ge;const{__scopePopper:t,side:i="bottom",sideOffset:r=0,align:o="center",alignOffset:s=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:h=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:w,...p}=e,_=Py(_0,t),[x,I]=y.useState(null),b=Un(n,rt=>I(rt)),[j,C]=y.useState(null),E=_9(j),T=(E==null?void 0:E.width)??0,O=(E==null?void 0:E.height)??0,L=i+(o!=="center"?"-"+o:""),N=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},v=Array.isArray(h)?h:[h],D=v.length>0,z={padding:N,boundary:v.filter(C9),altBoundary:D},{refs:V,floatingStyles:R,placement:B,isPositioned:Y,middlewareData:$}=fx({strategy:"fixed",placement:L,whileElementsMounted:(...rt)=>ix(...rt,{animationFrame:g==="always"}),elements:{reference:_.anchor},middleware:[gx({mainAxis:r+O,alignmentAxis:s}),l&&yx({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?px():void 0,...z}),l&&wx({...z}),_x({...z,apply:({elements:rt,rects:de,availableWidth:fe,availableHeight:Be})=>{const{width:qe,height:Ke}=de.reference,he=rt.floating.style;he.setProperty("--radix-popper-available-width",`${fe}px`),he.setProperty("--radix-popper-available-height",`${Be}px`),he.setProperty("--radix-popper-anchor-width",`${qe}px`),he.setProperty("--radix-popper-anchor-height",`${Ke}px`)}}),j&&Mx({element:j,padding:c}),j9({arrowWidth:T,arrowHeight:O}),m&&xx({strategy:"referenceHidden",...z})]}),[W,F]=Yy(B),Q=qo(w);Ir(()=>{Y&&(Q==null||Q())},[Y,Q]);const Z=(re=$.arrow)==null?void 0:re.x,ne=(oe=$.arrow)==null?void 0:oe.y,ce=((ue=$.arrow)==null?void 0:ue.centerOffset)!==0,[q,le]=y.useState();return Ir(()=>{x&&le(window.getComputedStyle(x).zIndex)},[x]),a.jsx("div",{ref:V.setFloating,"data-radix-popper-content-wrapper":"",style:{...R,transform:Y?R.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:q,"--radix-popper-transform-origin":[(Ce=$.transformOrigin)==null?void 0:Ce.x,(Ue=$.transformOrigin)==null?void 0:Ue.y].join(" "),...((Ge=$.hide)==null?void 0:Ge.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(M9,{scope:t,placedSide:W,onArrowChange:C,arrowX:Z,arrowY:ne,shouldHideArrow:ce,children:a.jsx(Kt.div,{"data-side":W,"data-align":F,...p,ref:b,style:{...p.style,animation:Y?void 0:"none"}})})})});By.displayName=_0;var Wy="PopperArrow",b9={top:"bottom",right:"left",bottom:"top",left:"right"},$y=y.forwardRef(function(n,t){const{__scopePopper:i,...r}=n,o=I9(Wy,i),s=b9[o.placedSide];return a.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:a.jsx(w9,{...r,ref:t,style:{...r.style,display:"block"}})})});$y.displayName=Wy;function C9(e){return e!==null}var j9=e=>({name:"transformOrigin",options:e,fn(n){var _,x,I;const{placement:t,rects:i,middlewareData:r}=n,s=((_=r.arrow)==null?void 0:_.centerOffset)!==0,c=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[h,d]=Yy(t),f={start:"0%",center:"50%",end:"100%"}[d],m=(((x=r.arrow)==null?void 0:x.x)??0)+c/2,g=(((I=r.arrow)==null?void 0:I.y)??0)+l/2;let w="",p="";return h==="bottom"?(w=s?f:`${m}px`,p=`${-l}px`):h==="top"?(w=s?f:`${m}px`,p=`${i.floating.height+l}px`):h==="right"?(w=`${-l}px`,p=s?f:`${g}px`):h==="left"&&(w=`${i.floating.width+l}px`,p=s?f:`${g}px`),{data:{x:w,y:p}}}});function Yy(e){const[n,t="center"]=e.split("-");return[n,t]}var L9=Ry,E9=Uy,T9=By,v9=$y,N9="Portal",x0=y.forwardRef((e,n)=>{var c;const{container:t,...i}=e,[r,o]=y.useState(!1);Ir(()=>o(!0),[]);const s=t||r&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return s?u3.createPortal(a.jsx(Kt.div,{...i,ref:n}),s):null});x0.displayName=N9;function S9(e,n){return y.useReducer((t,i)=>n[t][i]??t,e)}var us=e=>{const{present:n,children:t}=e,i=A9(n),r=typeof t=="function"?t({present:i.isPresent}):y.Children.only(t),o=Un(i.ref,D9(r));return typeof t=="function"||i.isPresent?y.cloneElement(r,{ref:o}):null};us.displayName="Presence";function A9(e){const[n,t]=y.useState(),i=y.useRef(null),r=y.useRef(e),o=y.useRef("none"),s=e?"mounted":"unmounted",[c,l]=S9(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const h=Pa(i.current);o.current=c==="mounted"?h:"none"},[c]),Ir(()=>{const h=i.current,d=r.current;if(d!==e){const m=o.current,g=Pa(h);e?l("MOUNT"):g==="none"||(h==null?void 0:h.display)==="none"?l("UNMOUNT"):l(d&&m!==g?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),Ir(()=>{if(n){let h;const d=n.ownerDocument.defaultView??window,f=g=>{const p=Pa(i.current).includes(g.animationName);if(g.target===n&&p&&(l("ANIMATION_END"),!r.current)){const _=n.style.animationFillMode;n.style.animationFillMode="forwards",h=d.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=_)})}},m=g=>{g.target===n&&(o.current=Pa(i.current))};return n.addEventListener("animationstart",m),n.addEventListener("animationcancel",f),n.addEventListener("animationend",f),()=>{d.clearTimeout(h),n.removeEventListener("animationstart",m),n.removeEventListener("animationcancel",f),n.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[n,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:y.useCallback(h=>{i.current=h?getComputedStyle(h):null,t(h)},[])}}function Pa(e){return(e==null?void 0:e.animationName)||"none"}function D9(e){var i,r;let n=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,t=n&&"isReactWarning"in n&&n.isReactWarning;return t?e.ref:(n=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,t=n&&"isReactWarning"in n&&n.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}var O9=Dg[" useInsertionEffect ".trim().toString()]||Ir;function Fy({prop:e,defaultProp:n,onChange:t=()=>{},caller:i}){const[r,o,s]=k9({defaultProp:n,onChange:t}),c=e!==void 0,l=c?e:r;{const d=y.useRef(e!==void 0);y.useEffect(()=>{const f=d.current;f!==c&&console.warn(`${i} is changing from ${f?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=c},[c,i])}const h=y.useCallback(d=>{var f;if(c){const m=z9(d)?d(e):d;m!==e&&((f=s.current)==null||f.call(s,m))}else o(d)},[c,e,o,s]);return[l,h]}function k9({defaultProp:e,onChange:n}){const[t,i]=y.useState(e),r=y.useRef(t),o=y.useRef(n);return O9(()=>{o.current=n},[n]),y.useEffect(()=>{var s;r.current!==t&&((s=o.current)==null||s.call(o,t),r.current=t)},[t,r]),[t,i,o]}function z9(e){return typeof e=="function"}var P9=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),R9="VisuallyHidden",Qy=y.forwardRef((e,n)=>a.jsx(Kt.span,{...e,ref:n,style:{...P9,...e.style}}));Qy.displayName=R9;var V9=Qy,[pl]=y0("Tooltip",[zy]),wl=zy(),Hy="TooltipProvider",U9=700,Md="tooltip.open",[B9,M0]=pl(Hy),Zy=e=>{const{__scopeTooltip:n,delayDuration:t=U9,skipDelayDuration:i=300,disableHoverableContent:r=!1,children:o}=e,s=y.useRef(!0),c=y.useRef(!1),l=y.useRef(0);return y.useEffect(()=>{const h=l.current;return()=>window.clearTimeout(h)},[]),a.jsx(B9,{scope:n,isOpenDelayedRef:s,delayDuration:t,onOpen:y.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:y.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,i)},[i]),isPointerInTransitRef:c,onPointerInTransitChange:y.useCallback(h=>{c.current=h},[]),disableHoverableContent:r,children:o})};Zy.displayName=Hy;var Zs="Tooltip",[W9,Ma]=pl(Zs),Gy=e=>{const{__scopeTooltip:n,children:t,open:i,defaultOpen:r,onOpenChange:o,disableHoverableContent:s,delayDuration:c}=e,l=M0(Zs,e.__scopeTooltip),h=wl(n),[d,f]=y.useState(null),m=rc(),g=y.useRef(0),w=s??l.disableHoverableContent,p=c??l.delayDuration,_=y.useRef(!1),[x,I]=Fy({prop:i,defaultProp:r??!1,onChange:T=>{T?(l.onOpen(),document.dispatchEvent(new CustomEvent(Md))):l.onClose(),o==null||o(T)},caller:Zs}),b=y.useMemo(()=>x?_.current?"delayed-open":"instant-open":"closed",[x]),j=y.useCallback(()=>{window.clearTimeout(g.current),g.current=0,_.current=!1,I(!0)},[I]),C=y.useCallback(()=>{window.clearTimeout(g.current),g.current=0,I(!1)},[I]),E=y.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{_.current=!0,I(!0),g.current=0},p)},[p,I]);return y.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),a.jsx(L9,{...h,children:a.jsx(W9,{scope:n,contentId:m,open:x,stateAttribute:b,trigger:d,onTriggerChange:f,onTriggerEnter:y.useCallback(()=>{l.isOpenDelayedRef.current?E():j()},[l.isOpenDelayedRef,E,j]),onTriggerLeave:y.useCallback(()=>{w?C():(window.clearTimeout(g.current),g.current=0)},[C,w]),onOpen:j,onClose:C,disableHoverableContent:w,children:t})})};Gy.displayName=Zs;var Id="TooltipTrigger",qy=y.forwardRef((e,n)=>{const{__scopeTooltip:t,...i}=e,r=Ma(Id,t),o=M0(Id,t),s=wl(t),c=y.useRef(null),l=Un(n,c,r.onTriggerChange),h=y.useRef(!1),d=y.useRef(!1),f=y.useCallback(()=>h.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),a.jsx(E9,{asChild:!0,...s,children:a.jsx(Kt.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...i,ref:l,onPointerMove:Qt(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!o.isPointerInTransitRef.current&&(r.onTriggerEnter(),d.current=!0)}),onPointerLeave:Qt(e.onPointerLeave,()=>{r.onTriggerLeave(),d.current=!1}),onPointerDown:Qt(e.onPointerDown,()=>{r.open&&r.onClose(),h.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Qt(e.onFocus,()=>{h.current||r.onOpen()}),onBlur:Qt(e.onBlur,r.onClose),onClick:Qt(e.onClick,r.onClose)})})});qy.displayName=Id;var I0="TooltipPortal",[$9,Y9]=pl(I0,{forceMount:void 0}),Ky=e=>{const{__scopeTooltip:n,forceMount:t,children:i,container:r}=e,o=Ma(I0,n);return a.jsx($9,{scope:n,forceMount:t,children:a.jsx(us,{present:t||o.open,children:a.jsx(x0,{asChild:!0,container:r,children:i})})})};Ky.displayName=I0;var Ko="TooltipContent",Jy=y.forwardRef((e,n)=>{const t=Y9(Ko,e.__scopeTooltip),{forceMount:i=t.forceMount,side:r="top",...o}=e,s=Ma(Ko,e.__scopeTooltip);return a.jsx(us,{present:i||s.open,children:s.disableHoverableContent?a.jsx(Xy,{side:r,...o,ref:n}):a.jsx(F9,{side:r,...o,ref:n})})}),F9=y.forwardRef((e,n)=>{const t=Ma(Ko,e.__scopeTooltip),i=M0(Ko,e.__scopeTooltip),r=y.useRef(null),o=Un(n,r),[s,c]=y.useState(null),{trigger:l,onClose:h}=t,d=r.current,{onPointerInTransitChange:f}=i,m=y.useCallback(()=>{c(null),f(!1)},[f]),g=y.useCallback((w,p)=>{const _=w.currentTarget,x={x:w.clientX,y:w.clientY},I=G9(x,_.getBoundingClientRect()),b=q9(x,I),j=K9(p.getBoundingClientRect()),C=X9([...b,...j]);c(C),f(!0)},[f]);return y.useEffect(()=>()=>m(),[m]),y.useEffect(()=>{if(l&&d){const w=_=>g(_,d),p=_=>g(_,l);return l.addEventListener("pointerleave",w),d.addEventListener("pointerleave",p),()=>{l.removeEventListener("pointerleave",w),d.removeEventListener("pointerleave",p)}}},[l,d,g,m]),y.useEffect(()=>{if(s){const w=p=>{const _=p.target,x={x:p.clientX,y:p.clientY},I=(l==null?void 0:l.contains(_))||(d==null?void 0:d.contains(_)),b=!J9(x,s);I?m():b&&(m(),h())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,d,s,h,m]),a.jsx(Xy,{...e,ref:o})}),[Q9,H9]=pl(Zs,{isInside:!1}),Z9=t9("TooltipContent"),Xy=y.forwardRef((e,n)=>{const{__scopeTooltip:t,children:i,"aria-label":r,onEscapeKeyDown:o,onPointerDownOutside:s,...c}=e,l=Ma(Ko,t),h=wl(t),{onClose:d}=l;return y.useEffect(()=>(document.addEventListener(Md,d),()=>document.removeEventListener(Md,d)),[d]),y.useEffect(()=>{if(l.trigger){const f=m=>{const g=m.target;g!=null&&g.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),a.jsx(p0,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:a.jsxs(T9,{"data-state":l.stateAttribute,...h,...c,ref:n,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[a.jsx(Z9,{children:i}),a.jsx(Q9,{scope:t,isInside:!0,children:a.jsx(V9,{id:l.contentId,role:"tooltip",children:r||i})})]})})});Jy.displayName=Ko;var ep="TooltipArrow",tp=y.forwardRef((e,n)=>{const{__scopeTooltip:t,...i}=e,r=wl(t);return H9(ep,t).isInside?null:a.jsx(v9,{...r,...i,ref:n})});tp.displayName=ep;function G9(e,n){const t=Math.abs(n.top-e.y),i=Math.abs(n.bottom-e.y),r=Math.abs(n.right-e.x),o=Math.abs(n.left-e.x);switch(Math.min(t,i,r,o)){case o:return"left";case r:return"right";case t:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function q9(e,n,t=5){const i=[];switch(n){case"top":i.push({x:e.x-t,y:e.y+t},{x:e.x+t,y:e.y+t});break;case"bottom":i.push({x:e.x-t,y:e.y-t},{x:e.x+t,y:e.y-t});break;case"left":i.push({x:e.x+t,y:e.y-t},{x:e.x+t,y:e.y+t});break;case"right":i.push({x:e.x-t,y:e.y-t},{x:e.x-t,y:e.y+t});break}return i}function K9(e){const{top:n,right:t,bottom:i,left:r}=e;return[{x:r,y:n},{x:t,y:n},{x:t,y:i},{x:r,y:i}]}function J9(e,n){const{x:t,y:i}=e;let r=!1;for(let o=0,s=n.length-1;o<n.length;s=o++){const c=n[o],l=n[s],h=c.x,d=c.y,f=l.x,m=l.y;d>i!=m>i&&t<(f-h)*(i-d)/(m-d)+h&&(r=!r)}return r}function X9(e){const n=e.slice();return n.sort((t,i)=>t.x<i.x?-1:t.x>i.x?1:t.y<i.y?-1:t.y>i.y?1:0),e7(n)}function e7(e){if(e.length<=1)return e.slice();const n=[];for(let i=0;i<e.length;i++){const r=e[i];for(;n.length>=2;){const o=n[n.length-1],s=n[n.length-2];if((o.x-s.x)*(r.y-s.y)>=(o.y-s.y)*(r.x-s.x))n.pop();else break}n.push(r)}n.pop();const t=[];for(let i=e.length-1;i>=0;i--){const r=e[i];for(;t.length>=2;){const o=t[t.length-1],s=t[t.length-2];if((o.x-s.x)*(r.y-s.y)>=(o.y-s.y)*(r.x-s.x))t.pop();else break}t.push(r)}return t.pop(),n.length===1&&t.length===1&&n[0].x===t[0].x&&n[0].y===t[0].y?n:n.concat(t)}var t7=Zy,n7=Gy,i7=qy,r7=Ky,o7=Jy,s7=tp;const vc=e=>a.jsx(t7,{delayDuration:200,children:a.jsxs(n7,{children:[a.jsx(i7,{asChild:!0,children:e.children}),a.jsx(r7,{children:a.jsxs(c7,{align:e.align||"center",side:e.side||"top",sideOffset:e.sideOffset||6,children:[e.tip,a.jsx(l7,{})]})})]})}),a7=vt`
|
|
164
|
+
from {
|
|
165
|
+
opacity: 0;
|
|
166
|
+
transform: translateY(2px);
|
|
167
|
+
}
|
|
168
|
+
to {
|
|
169
|
+
opacity: 1;
|
|
170
|
+
transform: translateY(0);
|
|
171
|
+
}
|
|
172
|
+
`,c7=ze(o7)(e=>{const n=X();return{animation:`${a7} 200ms cubic-bezier(0.16, 1, 0.3, 1)`,background:n.colors.tooltipBg,borderRadius:G.sm,boxShadow:b2.sm,color:n.colors.tooltipText,fontSize:ie.sm,lineHeight:1.5,maxWidth:"300px",padding:`${P.xs} ${P.sm}`,userSelect:"none",willChange:"transform, opacity",zIndex:999999999999999}}),l7=ze(s7)(()=>({fill:X().colors.tooltipBg})),Jo=e=>{const{hasCopied:n,onCopy:t}=Ty(e.text),i=e.hasCopied||n;return a.jsx(ae,{onClick:t,variant:"ghost-solid",style:{alignItems:"center",display:"flex",padding:2,justifyContent:"center",borderRadius:G.sm},children:a.jsx(vc,{align:e.align,side:e.side,tip:e.tip,children:a.jsx("div",{children:a.jsx(M,{center:"both",color:i?"success":"secondaryText",flex:"row",children:i?a.jsx(ls,{className:"tw-check-icon",width:e.iconSize||16,height:e.iconSize||16}):a.jsx($2,{className:"tw-copy-icon",width:e.iconSize||16,height:e.iconSize||16})})})})})};function u7(e,n){var t;return e.type==="onramp"?e.id:(t=n.transactions[n.transactions.length-1])==null?void 0:t.transactionHash}function d7(e,n){return pe({enabled:!0,queryFn:async()=>{if(e.type==="onramp"&&n.type==="onramp")return{amountPaid:`${n.currencyAmount} ${n.currency}`,amountReceived:`${Dt(n.destinationAmount,n.destinationToken.decimals)} ${n.destinationToken.symbol}`,chain:await Zt(Ot(n.destinationToken.chainId)),destinationToken:n.destinationToken,id:n.id,label:"Onramp Payment",type:"paymentId"};if((e.type==="buy"||e.type==="sell"||e.type==="transfer")&&e.transactions.length>0){const i=e.transactions[e.transactions.length-1];if(i){const[r,o]=await Promise.all([Zt(Ve(e.destinationToken.chainId)),Zt(Ve(e.originToken.chainId))]);return{amountPaid:`${Dt(e.originAmount,e.originToken.decimals)} ${e.originToken.symbol}`,amountReceived:`${Dt(e.destinationAmount,e.destinationToken.decimals)} ${e.destinationToken.symbol}`,chain:r,destinationChain:r,destinationToken:e.destinationToken,id:i.transactionHash,label:"Transaction",originChain:o,originToken:e.originToken,type:"transactionHash"}}}return null},queryKey:["transaction-info",e.type,u7(n,e)],staleTime:5*60*1e3})}function h7({status:e,preparedQuote:n}){const t=X(),{data:i,isPending:r}=d7(e,n);return r?a.jsx(ge,{height:"200px",style:{borderRadius:G.lg}}):i?a.jsxs(M,{flex:"column",gap:"sm",style:{backgroundColor:t.colors.tertiaryBg,border:`1px solid ${t.colors.borderColor}`,borderRadius:G.lg,padding:P.md},children:[a.jsxs(M,{flex:"row",gap:"sm",py:"4xs",style:{alignItems:"center",justifyContent:"space-between"},children:[a.jsx(k,{color:"primaryText",size:"sm",weight:500,children:i.label}),a.jsx(M,{style:{backgroundColor:t.colors.modalBg,borderRadius:G.full,border:`1px solid ${t.colors.borderColor}`,padding:`${P["3xs"]} ${P.xs}`},children:a.jsx(k,{style:{color:t.colors.success,fontSize:10,letterSpacing:"0.025em"},children:"COMPLETED"})})]}),a.jsx(Re,{}),i.amountPaid&&a.jsxs(M,{center:"y",flex:"row",style:{justifyContent:"space-between"},children:[a.jsx(k,{color:"secondaryText",size:"sm",children:"Amount Paid"}),a.jsx(k,{color:"primaryText",size:"sm",children:i.amountPaid})]}),i.amountReceived&&a.jsxs(M,{center:"y",flex:"row",style:{justifyContent:"space-between"},children:[a.jsx(k,{color:"secondaryText",size:"sm",children:"Amount Received"}),a.jsx(k,{color:"primaryText",size:"sm",children:i.amountReceived})]}),i.originChain&&a.jsxs(M,{center:"y",flex:"row",style:{justifyContent:"space-between"},children:[a.jsx(k,{color:"secondaryText",size:"sm",children:"Origin Chain"}),a.jsx(k,{color:"primaryText",size:"sm",children:_d(i.originChain.name)})]}),a.jsxs(M,{center:"y",flex:"row",style:{justifyContent:"space-between"},children:[a.jsx(k,{color:"secondaryText",size:"sm",children:"Destination Chain"}),a.jsx(k,{color:"primaryText",size:"sm",children:_d(i.chain.name)})]}),i.type==="paymentId"&&a.jsxs(M,{center:"y",flex:"row",style:{justifyContent:"space-between"},children:[a.jsx(k,{color:"secondaryText",size:"sm",children:"Payment ID"}),a.jsxs(M,{flex:"row",gap:"3xs",center:"y",children:[a.jsx(Jo,{text:i.id,iconSize:12,tip:"Copy Payment ID"}),a.jsx(k,{color:"primaryText",weight:400,size:"sm",children:gc(i.id)})]})]}),e.transactions.map(o=>{const s=`https://thirdweb.com/${o.chainId}/tx/${o.transactionHash}`;return a.jsxs(M,{center:"y",flex:"row",style:{justifyContent:"space-between"},children:[a.jsx(k,{color:"secondaryText",size:"sm",children:"Transaction Hash"}),a.jsxs(M,{flex:"row",gap:"3xs",center:"y",children:[a.jsx(Jo,{text:o.transactionHash,iconSize:12,tip:"Copy Transaction Hash"}),a.jsx(_r,{href:s,target:"_blank",rel:"noreferrer",color:"primaryText",hoverColor:"accentText",weight:400,size:"sm",children:gc(o.transactionHash)})]})]},o.transactionHash)})]},i.id):null}function f7({preparedQuote:e,completedStatuses:n,onBack:t,windowAdapter:i}){return a.jsxs(M,{flex:"column",fullHeight:!0,px:"md",children:[a.jsx(U,{y:"md+"}),a.jsx(_e,{onBack:t,title:"Payment Receipt"}),a.jsx(U,{y:"md+"}),a.jsx(M,{flex:"column",gap:"lg",scrollY:!0,style:{maxHeight:"500px",minHeight:"400px"},children:a.jsx(M,{flex:"column",gap:"sm",children:n.map((r,o)=>a.jsx(h7,{preparedQuote:e,status:r,windowAdapter:i},`${r.type}-${o}`))})}),a.jsx(U,{y:"md+"})]})}function m7({preparedQuote:e,completedStatuses:n,onDone:t,windowAdapter:i,client:r,hasPaymentId:o=!1,showContinueWithTx:s,type:c}){const l=X(),[h,d]=y.useState("success"),f=Ei(),m=y.useRef(!1);if(y.useEffect(()=>{m.current||(m.current=!0,(e.type==="buy"||e.type==="sell")&&an({chainId:e.intent.originChainId,client:r,event:"ub:ui:success_screen",fromToken:e.intent.originTokenAddress,toChainId:e.intent.destinationChainId,toToken:e.intent.destinationTokenAddress,walletAddress:e.intent.sender}),e.type==="transfer"&&an({chainId:e.intent.chainId,client:r,event:"ub:ui:success_screen",fromToken:e.intent.tokenAddress,toChainId:e.intent.chainId,toToken:e.intent.tokenAddress,walletAddress:e.intent.sender}),f.invalidateQueries({queryKey:["bridge/v1/wallets"]}),f.invalidateQueries({queryKey:["walletBalance"]}),f.invalidateQueries({queryKey:["payment-methods"]}))},[r,e,f]),h==="detail")return a.jsx(f7,{completedStatuses:n,onBack:()=>d("success"),preparedQuote:e,windowAdapter:i});const g=c==="swap-success"?"Swap Successful":"Payment Successful",w=c==="swap-success"?"Your token swap has been completed successfully.":"Your payment has been completed successfully.";return a.jsxs(M,{flex:"column",fullHeight:!0,px:"md",pb:"md",pt:"md+",children:[a.jsx(U,{y:"3xl"}),a.jsxs(M,{center:"x",flex:"column",gap:"md",children:[a.jsx(M,{center:"both",flex:"row",style:{animation:"successBounce 0.6s ease-out",border:`2px solid ${l.colors.success}`,borderRadius:"50%",height:"64px",marginBottom:"16px",width:"64px"},children:a.jsx(ls,{color:l.colors.success,height:A.xl,style:{animation:"checkAppear 0.3s ease-out 0.3s both"},width:A.xl})}),a.jsxs("div",{children:[a.jsx(k,{center:!0,color:"primaryText",size:"xl",weight:600,trackingTight:!0,style:{marginBottom:P.xxs},children:g}),a.jsx(k,{center:!0,color:"secondaryText",size:"sm",children:o?"You can now close this page and return to the application.":s?"Click continue to execute your transaction.":w})]})]}),a.jsx(U,{y:"3xl"}),a.jsxs(M,{flex:"column",gap:"sm",style:{width:"100%"},children:[a.jsx(ae,{fullWidth:!0,onClick:()=>d("detail"),variant:"secondary",children:"View Transaction Receipt"}),!o&&a.jsx(ae,{fullWidth:!0,onClick:t,variant:"accent",children:s?"Continue":"Done"})]}),a.jsx("style",{children:`
|
|
173
|
+
@keyframes successBounce {
|
|
174
|
+
0% {
|
|
175
|
+
transform: scale(0.3);
|
|
176
|
+
opacity: 0;
|
|
177
|
+
}
|
|
178
|
+
50% {
|
|
179
|
+
transform: scale(1.05);
|
|
180
|
+
}
|
|
181
|
+
70% {
|
|
182
|
+
transform: scale(0.9);
|
|
183
|
+
}
|
|
184
|
+
100% {
|
|
185
|
+
transform: scale(1);
|
|
186
|
+
opacity: 1;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
@keyframes checkAppear {
|
|
191
|
+
0% {
|
|
192
|
+
transform: scale(0);
|
|
193
|
+
opacity: 0;
|
|
194
|
+
}
|
|
195
|
+
100% {
|
|
196
|
+
transform: scale(1);
|
|
197
|
+
opacity: 1;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
`})]})}function g7(e){const{enabled:n=!0,type:t,...i}=e;return pe({enabled:n&&!!i.client,gcTime:5*60*1e3,queryFn:async()=>{switch(t){case"buy":return{type:"buy",...await yM(i)};case"sell":return{type:"sell",...await _M(i)};case"transfer":return{type:"transfer",...await MM(i)};case"onramp":return{type:"onramp",...await Ph(i)};default:throw new Error(`Unsupported bridge prepare type: ${t}`)}},queryKey:["bridge-prepare",t,it(i)],retry:(r,o)=>{if(o instanceof at){const s=o;if(s.statusCode&&s.statusCode>=400&&s.statusCode<500)return!1}return r<2},retryDelay:r=>Math.min(1e3*2**r,1e4),staleTime:2*60*1e3})}function y7({destinationToken:e,paymentMethod:n,amount:t,sender:i,receiver:r,client:o,onQuoteReceived:s,onError:c,purchaseData:l,paymentLinkId:h,feePayer:d,mode:f}){const m=p7({amount:t,client:o,destinationToken:e,feePayer:d,paymentLinkId:h,paymentMethod:n,purchaseData:l,receiver:r,sender:i}),g=g7(m);return y.useEffect(()=>{g.data&&s(g.data,m)},[g.data,s,m]),y.useEffect(()=>{g.error&&c(g.error)},[g.error,c]),a.jsxs(M,{center:"both",flex:"column",fullHeight:!0,p:"lg",style:{minHeight:"350px"},children:[a.jsx(ke,{color:"secondaryText",size:"xl"}),a.jsx(U,{y:"md"}),a.jsx(k,{center:!0,color:"primaryText",size:"lg",style:{fontWeight:600},children:"Finding the best route"}),a.jsx(U,{y:"sm"}),a.jsx(k,{center:!0,color:"secondaryText",size:"sm",children:"We're searching for the most efficient path for this payment."})]})}function p7(e){var c,l;const{paymentMethod:n,amount:t,destinationToken:i,receiver:r,client:o,sender:s}=e;switch(n.type){case"fiat":return{amount:cr(t,i.decimals),chainId:i.chainId,client:o,currency:n.currency,enabled:!!(i&&t&&o),onramp:n.onramp||"coinbase",paymentLinkId:e.paymentLinkId,purchaseData:e.purchaseData,receiver:r,sender:s,tokenAddress:i.address,type:"onramp"};case"wallet":return n.originToken.chainId===i.chainId&&n.originToken.address.toLowerCase()===i.address.toLowerCase()?{amount:cr(t,i.decimals),chainId:i.chainId,client:o,enabled:!!(i&&t&&o),feePayer:e.feePayer||"sender",paymentLinkId:e.paymentLinkId,purchaseData:e.purchaseData,receiver:r,sender:s||((c=n.payerWallet.getAccount())==null?void 0:c.address)||r,tokenAddress:i.address,type:"transfer"}:{amount:n.action==="buy"?cr(t,i.decimals):cr(t,n.originToken.decimals),client:o,destinationChainId:i.chainId,destinationTokenAddress:i.address,enabled:!!(i&&t&&o),originChainId:n.originToken.chainId,originTokenAddress:n.originToken.address,paymentLinkId:e.paymentLinkId,purchaseData:e.purchaseData,receiver:r,sender:s||((l=n.payerWallet.getAccount())==null?void 0:l.address)||r,type:n.action}}}function w7(e){const n=[];return e.forEach((t,i)=>{var r;(r=t.transactions)==null||r.forEach((o,s)=>{n.push({...o,_index:n.length,_stepIndex:i})})}),n}function _7(e){const{wallet:n,windowAdapter:t,client:i,autoStart:r=!1,onComplete:o,preparedQuote:s}=e,c=y.useMemo(()=>s!=null&&s.steps?w7(s.steps):[],[s==null?void 0:s.steps]),[l,h]=y.useState(void 0),[d,f]=y.useState("idle"),[m,g]=y.useState(void 0),[w,p]=y.useState(new Set),[_,x]=y.useState((s==null?void 0:s.type)==="onramp"?"pending":void 0),I=y.useRef(null),b=y.useMemo(()=>{if(typeof(s==null?void 0:s.steps)>"u"||l===void 0)return;const R=c[l];return R?s.steps[R._stepIndex]:void 0},[l,c,s==null?void 0:s.steps]),j=y.useMemo(()=>{if(typeof(s==null?void 0:s.type)>"u")return 0;const R=c.length+(s.type==="onramp"?1:0);if(R===0)return 0;const B=w.size+(_==="completed"?1:0);return Math.round(B/R*100)},[w.size,c.length,s==null?void 0:s.type,_]),C=y.useCallback(async(R,B)=>{for(;!B.aborted;){if((await R()).completed)return;await new Promise(W=>{const F=setTimeout(W,2e3);B.addEventListener("abort",()=>clearTimeout(F),{once:!0})})}throw new Error("Polling aborted")},[]),E=y.useCallback(async(R,B,Y,$)=>{if(typeof(s==null?void 0:s.type)>"u")throw new Error("No quote generated. This is unexpected.");const{prepareTransaction:W}=await u(async()=>{const{prepareTransaction:q}=await import("./index-DO01SzHY.js").then(le=>le.x);return{prepareTransaction:q}},__vite__mapDeps([17,1,2,5,18,13,19])),{sendTransaction:F}=await u(async()=>{const{sendTransaction:q}=await import("./send-transaction-B0F9brDJ.js").then(le=>le.d);return{sendTransaction:q}},__vite__mapDeps([21,1,2,13,5])),Q=W({chain:R.chain,client:R.client,data:R.data,to:R.to,value:R.value,extraGas:50000n}),Z=await F({account:B,transaction:Q}),ne=Z.transactionHash;if(R.action==="approval"||R.action==="fee"){await Gc(Z),await new Promise(q=>setTimeout(q,2e3));return}const{status:ce}=await u(async()=>{const{status:q}=await import("./index-B1VBbtk9.js").then(le=>le.S);return{status:q}},__vite__mapDeps([54,1,2]));await C(async()=>{const q=await ce({chainId:R.chainId,client:R.client,transactionHash:ne});if(q.status==="COMPLETED"){const le={type:s.type,...q};return Y.push(le),{completed:!0}}if(q.status==="FAILED")throw new Error("Payment failed");return{completed:!1}},$)},[C,s==null?void 0:s.type]),T=y.useCallback(async(R,B,Y,$)=>{if(typeof(s==null?void 0:s.type)>"u")throw new Error("No quote generated. This is unexpected.");if(!B.sendBatchTransaction)throw new Error("Account does not support batch transactions");const{prepareTransaction:W}=await u(async()=>{const{prepareTransaction:q}=await import("./index-DO01SzHY.js").then(le=>le.x);return{prepareTransaction:q}},__vite__mapDeps([17,1,2,5,18,13,19])),{sendBatchTransaction:F}=await u(async()=>{const{sendBatchTransaction:q}=await import("./send-batch-transaction-De71luzT.js");return{sendBatchTransaction:q}},__vite__mapDeps([55,13,1,2,5])),Q=await Promise.all(R.map(async q=>W({chain:q.chain,client:q.client,data:q.data,to:q.to,value:q.value,extraGas:50000n}))),Z=await F({account:B,transactions:Q});if(R.length===0)throw new Error("No transactions to batch");const ne=R[0];if(!ne)throw new Error("Invalid batch transaction");const{status:ce}=await u(async()=>{const{status:q}=await import("./index-B1VBbtk9.js").then(le=>le.S);return{status:q}},__vite__mapDeps([54,1,2]));await C(async()=>{const q=await ce({chainId:ne.chainId,client:ne.client,transactionHash:Z.transactionHash});if(q.status==="COMPLETED"){const le={type:s.type,...q};return Y.push(le),{completed:!0}}if(q.status==="FAILED")throw new Error("Payment failed");return{completed:!1}},$)},[C,s==null?void 0:s.type]),O=y.useCallback(async(R,B,Y,$,W)=>{var oe;if(typeof(s==null?void 0:s.type)>"u")throw new Error("No quote generated. This is unexpected.");if(!Y.sendCalls)throw new Error("Account does not support eip5792 send calls");const{prepareTransaction:F}=await u(async()=>{const{prepareTransaction:ue}=await import("./index-DO01SzHY.js").then(Ce=>Ce.x);return{prepareTransaction:ue}},__vite__mapDeps([17,1,2,5,18,13,19])),{sendCalls:Q}=await u(async()=>{const{sendCalls:ue}=await Promise.resolve().then(()=>UM);return{sendCalls:ue}},void 0);if(R.length===0)throw new Error("No transactions to batch");const Z=R[0];if(!Z)throw new Error("Invalid batch transaction");const ne=await Promise.all(R.map(async ue=>F({chain:ue.chain,client:ue.client,data:ue.data,to:ue.to,value:ue.value,extraGas:50000n}))),ce=await Q({wallet:B,calls:ne}),q=await hI(ce);if(q.status==="failure")throw new at({code:"UNKNOWN_ERROR",message:"Transaction failed. Please try a different payment token or amount.",statusCode:500});const le=(oe=q.receipts)==null?void 0:oe[q.receipts.length-1];if(!le)throw new Error("No receipts found");const{status:re}=await u(async()=>{const{status:ue}=await import("./index-B1VBbtk9.js").then(Ce=>Ce.S);return{status:ue}},__vite__mapDeps([54,1,2]));await C(async()=>{const ue=await re({chainId:Z.chainId,client:Z.client,transactionHash:le.transactionHash});if(ue.status==="COMPLETED"){const Ce={type:s.type,...ue};return $.push(Ce),{completed:!0}}if(ue.status==="FAILED")throw new Error("Payment failed");return{completed:!1}},W)},[C,s==null?void 0:s.type]),L=y.useCallback(async(R,B,Y)=>{x("executing"),t.open(R.link);const{Onramp:$}=await u(async()=>{const{Onramp:W}=await import("./index-B1VBbtk9.js").then(F=>F.i);return{Onramp:W}},__vite__mapDeps([54,1,2]));await C(async()=>{const W=await $.status({client:i,id:R.id}),F=W.status;if(F==="COMPLETED"){await new Promise(Z=>setTimeout(Z,2e3)),x("completed");const Q={type:"onramp",...W};return B.push(Q),{completed:!0}}else F==="FAILED"&&x("failed");return{completed:!1}},Y)},[C,i,t]),N=y.useCallback(async()=>{var Y,$,W,F,Q,Z,ne,ce,q,le,re,oe,ue,Ce,Ue,Ge,rt,de,fe,Be,qe,Ke;if(typeof(s==null?void 0:s.type)>"u")throw new Error("No quote generated. This is unexpected.");if(d!=="idle")return;an({client:i,event:"ub:ui:execution:start",toChainId:(Y=s.steps[s.steps.length-1])==null?void 0:Y.destinationToken.chainId,toToken:($=s.steps[s.steps.length-1])==null?void 0:$.destinationToken.address,fromToken:(W=s.steps[0])==null?void 0:W.originToken.address,chainId:(F=s.steps[0])==null?void 0:F.destinationToken.chainId,amountWei:(Z=(Q=s.steps[0])==null?void 0:Q.originAmount)==null?void 0:Z.toString(),walletAddress:(ne=n==null?void 0:n.getAccount())==null?void 0:ne.address,walletType:n==null?void 0:n.id}),f("executing"),g(void 0);const R=[],B=new AbortController;I.current=B;try{if(c.length>0&&!n)throw new at({code:"INVALID_INPUT",message:"No wallet provided to execute transactions",statusCode:400});if(s.type==="onramp"&&_==="pending"&&await L(s,R,B.signal),c.length>0){if(!n)throw new at({code:"INVALID_INPUT",message:"No wallet provided to execute transactions",statusCode:400});const he=n.getAccount();if(!he)throw new at({code:"INVALID_INPUT",message:"Wallet not connected",statusCode:400});const ot=l??0;for(let wt=ot;wt<c.length&&!B.signal.aborted;wt++){const $e=c[wt];if(!$e)continue;if(h(wt),!s.steps[$e._stepIndex])throw new Error(`Invalid step index: ${$e._stepIndex}`);$e.chainId!==((ce=n.getChain())==null?void 0:ce.id)&&await n.switchChain(Ve($e.chainId));const dn=await x7(he,$e.chainId)&&wt<c.length-1,Tn=he.sendBatchTransaction!==void 0&&wt<c.length-1;if(Tn||dn){const _t=[$e];let hn=wt+1;for(;hn<c.length;){const Ni=c[hn];if(!Ni||Ni.chainId!==$e.chainId)break;_t.push(Ni),hn++}if(_t.length>1){if(Tn)await T(_t,he,R,B.signal);else if(dn)await O(_t,n,he,R,B.signal);else throw new Error("No supported execution mode found");for(const Ni of _t)p(Ta=>new Set(Ta).add(Ni._index));wt=hn-1;continue}}await E($e,he,R,B.signal),p(_t=>new Set(_t).add($e._index))}}B.signal.aborted||(h(void 0),o&&o(R),an({client:i,event:"ub:ui:execution:success",toChainId:(q=s.steps[s.steps.length-1])==null?void 0:q.destinationToken.chainId,toToken:(le=s.steps[s.steps.length-1])==null?void 0:le.destinationToken.address,fromToken:(re=s.steps[0])==null?void 0:re.originToken.address,chainId:(oe=s.steps[0])==null?void 0:oe.destinationToken.chainId,amountWei:(Ce=(ue=s.steps[0])==null?void 0:ue.originAmount)==null?void 0:Ce.toString(),walletAddress:(Ue=n==null?void 0:n.getAccount())==null?void 0:Ue.address,walletType:n==null?void 0:n.id}))}catch(he){console.error("Error executing payment",he),an({client:i,error:he instanceof Error?he.message:it(he),event:"ub:ui:execution:error",toChainId:(Ge=s.steps[s.steps.length-1])==null?void 0:Ge.destinationToken.chainId,toToken:(rt=s.steps[s.steps.length-1])==null?void 0:rt.destinationToken.address,fromToken:(de=s.steps[0])==null?void 0:de.originToken.address,chainId:(fe=s.steps[0])==null?void 0:fe.destinationToken.chainId,amountWei:(qe=(Be=s.steps[0])==null?void 0:Be.originAmount)==null?void 0:qe.toString(),walletAddress:(Ke=n==null?void 0:n.getAccount())==null?void 0:Ke.address,walletType:n==null?void 0:n.id}),he instanceof at?g(he):g(new at({code:"UNKNOWN_ERROR",message:(he==null?void 0:he.message)||"An unknown error occurred",statusCode:500}))}finally{f("idle"),I.current=null}},[d,n,l,c,E,T,O,_,L,o,s,i]),v=y.useCallback(()=>{d==="idle"&&N()},[N,d]),D=y.useCallback(()=>{I.current&&I.current.abort(),f("idle"),_==="executing"&&x("pending")},[_]),z=y.useCallback(()=>{m&&(g(void 0),N())},[m,N]),V=y.useRef(!1);return y.useEffect(()=>{r&&d==="idle"&&l===void 0&&!V.current&&(V.current=!0,f("auto-starting"),setTimeout(()=>{v()},500))},[r,d,l,v]),y.useEffect(()=>()=>{I.current&&I.current.abort()},[]),{cancel:D,currentStep:b,currentTxIndex:l,error:m,executionState:d,onrampStatus:_,progress:j,retry:z,start:v,steps:s==null?void 0:s.steps}}const ql=new Map;async function x7(e,n){var o;const t=`${e.address}_${n}`,i=ql.get(t);if(i!==void 0)return i;const r=e.getCapabilities;if(!r)return ql.set(t,!1),!1;try{const c=(o=(await Promise.race([r({chainId:n}),new Promise((h,d)=>setTimeout(()=>d(new Error("Timeout")),5e3))]))[n])==null?void 0:o.atomic,l=(c==null?void 0:c.status)==="supported"||(c==null?void 0:c.status)==="ready";return ql.set(t,l),l}catch{return!1}}function M7({title:e,request:n,wallet:t,client:i,windowAdapter:r,onComplete:o,onCancel:s,onBack:c,autoStart:l,preparedQuote:h}){const d=X(),{currentStep:f,progress:m,executionState:g,onrampStatus:w,steps:p,error:_,start:x,cancel:I,retry:b}=_7({autoStart:l,client:i,onComplete:D=>{o(D)},wallet:t,preparedQuote:h,windowAdapter:r}),j=()=>{I(),s&&s()},C=()=>{b()},E=D=>{if(!f||!p)return D===0&&_?"failed":"pending";const z=p.findIndex(V=>V===f);return D<z?"completed":D===z&&g==="executing"?"executing":D===z&&_?"failed":D===z&&g==="idle"&&m===100?"completed":"pending"},T=D=>{switch(D){case"completed":return a.jsx(ls,{color:d.colors.accentButtonText,height:A.sm,width:A.sm});case"executing":return a.jsx(ke,{color:"accentButtonText",size:"sm"});case"failed":return a.jsx(mb,{color:"white",height:A.sm,width:A.sm});default:return a.jsx(db,{color:d.colors.primaryText,height:A.sm,width:A.sm})}},O=D=>{switch(D){case"completed":return d.colors.tertiaryBg;case"executing":return d.colors.tertiaryBg;case"failed":return d.colors.tertiaryBg;default:return d.colors.tertiaryBg}},L=D=>{switch(D){case"completed":return d.colors.success;case"executing":return d.colors.accentButtonBg;case"failed":return d.colors.danger;default:return d.colors.borderColor}},N=D=>{const{originToken:z,destinationToken:V}=D;return z.chainId!==V.chainId?a.jsxs(M,{flex:"row",gap:"3xs",children:[a.jsxs(k,{color:"primaryText",size:"sm",children:["Bridge ",z.symbol," to"," "]}),a.jsx(jy,{chain:I7(n),client:i,color:"primaryText",short:!0,size:"sm"})]}):z.symbol!==V.symbol?a.jsxs(k,{color:"primaryText",size:"sm",children:["Swap ",z.symbol," to ",V.symbol]}):a.jsx(k,{color:"primaryText",size:"sm",children:"Process transaction"})},v=D=>{switch(D){case"executing":return"Processing...";case"completed":return"Completed";case"pending":return"Waiting...";case"failed":return"Failed";default:return"Unknown"}};return a.jsxs(M,{flex:"column",fullHeight:!0,px:"md",pb:"md",pt:"md+",children:[a.jsx(_e,{onBack:c,title:e||"Processing Payment"}),a.jsx(U,{y:"xl"}),a.jsxs(M,{flex:"column",children:[a.jsxs(M,{flex:"column",gap:"sm",children:[a.jsxs(M,{center:"y",flex:"row",children:[a.jsx(k,{color:"secondaryText",size:"sm",style:{flex:1},children:"Progress"}),a.jsxs(k,{color:"primaryText",size:"sm",children:[m,"%"]})]}),a.jsx(M,{style:{backgroundColor:d.colors.tertiaryBg,border:`1px solid ${d.colors.borderColor}`,borderRadius:"4px",height:"8px",overflow:"hidden",width:"100%"},children:a.jsx(M,{style:{backgroundColor:_?d.colors.danger:d.colors.accentButtonBg,height:"100%",transition:"width 0.3s ease",width:`${m}%`},children:a.jsx(k,{})})})]}),a.jsx(U,{y:"lg"}),a.jsxs(M,{flex:"column",gap:"sm",children:[n.type==="onramp"&&w?a.jsxs(M,{flex:"row",gap:"md",style:{alignItems:"center",backgroundColor:O(w),border:`1px solid ${d.colors.borderColor}`,borderRadius:G.md,padding:`${P.sm} ${P.md}`},children:[a.jsx(M,{center:"both",flex:"row",style:{backgroundColor:L(w),borderRadius:"50%",color:d.colors.primaryButtonText,flexShrink:0,height:`${A.lg}px`,width:`${A.lg}px`},children:T(w)}),a.jsxs(M,{flex:"column",gap:"3xs",style:{flex:1},children:[a.jsx(k,{color:"primaryText",size:"sm",children:n.onramp.slice(0,1).toUpperCase()+n.onramp.slice(1)}),a.jsx(k,{color:"secondaryText",size:"xs",children:v(w)})]})]}):null,p==null?void 0:p.map((D,z)=>{const V=E(z);return a.jsxs(M,{flex:"row",gap:"md",style:{alignItems:"center",backgroundColor:O(V),border:`1px solid ${d.colors.borderColor}`,borderRadius:G.md,padding:`${P.sm} ${P.md}`},children:[a.jsx(M,{center:"both",flex:"row",style:{backgroundColor:L(V),borderRadius:"50%",color:d.colors.primaryButtonText,flexShrink:0,height:`${A.lg}px`,width:`${A.lg}px`},children:T(V)}),a.jsxs(M,{flex:"column",gap:"3xs",style:{flex:1},children:[N(D),a.jsx(k,{color:"secondaryText",size:"xs",children:v(V)})]})]},`${D.originToken.chainId}-${D.destinationToken.chainId}-${z}`)})]}),a.jsx(U,{y:"md"}),a.jsx(k,{center:!0,color:_?"danger":"secondaryText",size:"xs",multiline:!0,children:_?_.message||"An error occurred. Please try again.":a.jsxs(a.Fragment,{children:["Keep this window open until all",a.jsx("br",{})," transactions are complete."]})}),a.jsx(U,{y:"lg"}),_?a.jsx(M,{flex:"row",gap:"md",children:a.jsx(ae,{fullWidth:!0,onClick:C,variant:"primary",children:"Retry"})}):g==="idle"&&m===0?a.jsx(ae,{fullWidth:!0,onClick:x,variant:"accent",children:"Start Transaction"}):g==="executing"||g==="auto-starting"?a.jsx(ae,{fullWidth:!0,onClick:j,variant:"secondary",children:"Cancel Transaction"}):null]})]})}function I7(e){switch(e.type){case"onramp":return Ot(e.chainId);case"buy":case"sell":return Ot(e.destinationChainId);case"transfer":return Ot(e.chainId);default:throw new Error("Invalid quote type")}}var Kl="focusScope.autoFocusOnMount",Jl="focusScope.autoFocusOnUnmount",cf={bubbles:!1,cancelable:!0},b7="FocusScope",b0=y.forwardRef((e,n)=>{const{loop:t=!1,trapped:i=!1,onMountAutoFocus:r,onUnmountAutoFocus:o,...s}=e,[c,l]=y.useState(null),h=qo(r),d=qo(o),f=y.useRef(null),m=Un(n,p=>l(p)),g=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(i){let p=function(b){if(g.paused||!c)return;const j=b.target;c.contains(j)?f.current=j:Bi(f.current,{select:!0})},_=function(b){if(g.paused||!c)return;const j=b.relatedTarget;j!==null&&(c.contains(j)||Bi(f.current,{select:!0}))},x=function(b){if(document.activeElement===document.body)for(const C of b)C.removedNodes.length>0&&Bi(c)};document.addEventListener("focusin",p),document.addEventListener("focusout",_);const I=new MutationObserver(x);return c&&I.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",_),I.disconnect()}}},[i,c,g.paused]),y.useEffect(()=>{if(c){uf.add(g);const p=document.activeElement;if(!c.contains(p)){const x=new CustomEvent(Kl,cf);c.addEventListener(Kl,h),c.dispatchEvent(x),x.defaultPrevented||(C7(v7(np(c)),{select:!0}),document.activeElement===p&&Bi(c))}return()=>{c.removeEventListener(Kl,h),setTimeout(()=>{const x=new CustomEvent(Jl,cf);c.addEventListener(Jl,d),c.dispatchEvent(x),x.defaultPrevented||Bi(p??document.body,{select:!0}),c.removeEventListener(Jl,d),uf.remove(g)},0)}}},[c,h,d,g]);const w=y.useCallback(p=>{if(!t&&!i||g.paused)return;const _=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,x=document.activeElement;if(_&&x){const I=p.currentTarget,[b,j]=j7(I);b&&j?!p.shiftKey&&x===j?(p.preventDefault(),t&&Bi(b,{select:!0})):p.shiftKey&&x===b&&(p.preventDefault(),t&&Bi(j,{select:!0})):x===I&&p.preventDefault()}},[t,i,g.paused]);return a.jsx(Kt.div,{tabIndex:-1,...s,ref:m,onKeyDown:w})});b0.displayName=b7;function C7(e,{select:n=!1}={}){const t=document.activeElement;for(const i of e)if(Bi(i,{select:n}),document.activeElement!==t)return}function j7(e){const n=np(e),t=lf(n,e),i=lf(n.reverse(),e);return[t,i]}function np(e){const n=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const r=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||r?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)n.push(t.currentNode);return n}function lf(e,n){for(const t of e)if(!L7(t,{upTo:n}))return t}function L7(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function E7(e){return e instanceof HTMLInputElement&&"select"in e}function Bi(e,{select:n=!1}={}){if(e&&e.focus){const t=document.activeElement;e.focus({preventScroll:!0}),e!==t&&E7(e)&&n&&e.select()}}var uf=T7();function T7(){let e=[];return{add(n){const t=e[0];n!==t&&(t==null||t.pause()),e=df(e,n),e.unshift(n)},remove(n){var t;e=df(e,n),(t=e[0])==null||t.resume()}}}function df(e,n){const t=[...e],i=t.indexOf(n);return i!==-1&&t.splice(i,1),t}function v7(e){return e.filter(n=>n.tagName!=="A")}var Xl=0;function N7(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??hf()),document.body.insertAdjacentElement("beforeend",e[1]??hf()),Xl++,()=>{Xl===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Xl--}},[])}function hf(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var oc="right-scroll-bar-position",sc="width-before-scroll-bar",S7="with-scroll-bars-hidden",A7="--removed-body-scroll-bar-size";function eu(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function D7(e,n){var t=y.useState(function(){return{value:e,callback:n,facade:{get current(){return t.value},set current(i){var r=t.value;r!==i&&(t.value=i,t.callback(i,r))}}}})[0];return t.callback=n,t.facade}var O7=typeof window<"u"?y.useLayoutEffect:y.useEffect,ff=new WeakMap;function k7(e,n){var t=D7(null,function(i){return e.forEach(function(r){return eu(r,i)})});return O7(function(){var i=ff.get(t);if(i){var r=new Set(i),o=new Set(e),s=t.current;r.forEach(function(c){o.has(c)||eu(c,null)}),o.forEach(function(c){r.has(c)||eu(c,s)})}ff.set(t,e)},[e]),t}function z7(e){return e}function P7(e,n){n===void 0&&(n=z7);var t=[],i=!1,r={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:e},useMedium:function(o){var s=n(o,i);return t.push(s),function(){t=t.filter(function(c){return c!==s})}},assignSyncMedium:function(o){for(i=!0;t.length;){var s=t;t=[],s.forEach(o)}t={push:function(c){return o(c)},filter:function(){return t}}},assignMedium:function(o){i=!0;var s=[];if(t.length){var c=t;t=[],c.forEach(o),s=t}var l=function(){var d=s;s=[],d.forEach(o)},h=function(){return Promise.resolve().then(l)};h(),t={push:function(d){s.push(d),h()},filter:function(d){return s=s.filter(d),t}}}};return r}function R7(e){e===void 0&&(e={});var n=P7(null);return n.options=Zi({async:!0,ssr:!1},e),n}var ip=function(e){var n=e.sideCar,t=Og(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=n.read();if(!i)throw new Error("Sidecar medium not found");return y.createElement(i,Zi({},t))};ip.isSideCarExport=!0;function V7(e,n){return e.useMedium(n),ip}var rp=R7(),tu=function(){},_l=y.forwardRef(function(e,n){var t=y.useRef(null),i=y.useState({onScrollCapture:tu,onWheelCapture:tu,onTouchMoveCapture:tu}),r=i[0],o=i[1],s=e.forwardProps,c=e.children,l=e.className,h=e.removeScrollBar,d=e.enabled,f=e.shards,m=e.sideCar,g=e.noRelative,w=e.noIsolation,p=e.inert,_=e.allowPinchZoom,x=e.as,I=x===void 0?"div":x,b=e.gapMode,j=Og(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=m,E=k7([t,n]),T=Zi(Zi({},j),r);return y.createElement(y.Fragment,null,d&&y.createElement(C,{sideCar:rp,removeScrollBar:h,shards:f,noRelative:g,noIsolation:w,inert:p,setCallbacks:o,allowPinchZoom:!!_,lockRef:t,gapMode:b}),s?y.cloneElement(y.Children.only(c),Zi(Zi({},T),{ref:E})):y.createElement(I,Zi({},T,{className:l,ref:E}),c))});_l.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};_l.classNames={fullWidth:sc,zeroRight:oc};var U7=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function B7(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=U7();return n&&e.setAttribute("nonce",n),e}function W7(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function $7(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var Y7=function(){var e=0,n=null;return{add:function(t){e==0&&(n=B7())&&(W7(n,t),$7(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},F7=function(){var e=Y7();return function(n,t){y.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&t])}},op=function(){var e=F7(),n=function(t){var i=t.styles,r=t.dynamic;return e(i,r),null};return n},Q7={left:0,top:0,right:0,gap:0},nu=function(e){return parseInt(e||"",10)||0},H7=function(e){var n=window.getComputedStyle(document.body),t=n[e==="padding"?"paddingLeft":"marginLeft"],i=n[e==="padding"?"paddingTop":"marginTop"],r=n[e==="padding"?"paddingRight":"marginRight"];return[nu(t),nu(i),nu(r)]},Z7=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Q7;var n=H7(e),t=document.documentElement.clientWidth,i=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,i-t+n[2]-n[0])}},G7=op(),No="data-scroll-locked",q7=function(e,n,t,i){var r=e.left,o=e.top,s=e.right,c=e.gap;return t===void 0&&(t="margin"),`
|
|
201
|
+
.`.concat(S7,` {
|
|
202
|
+
overflow: hidden `).concat(i,`;
|
|
203
|
+
padding-right: `).concat(c,"px ").concat(i,`;
|
|
204
|
+
}
|
|
205
|
+
body[`).concat(No,`] {
|
|
206
|
+
overflow: hidden `).concat(i,`;
|
|
207
|
+
overscroll-behavior: contain;
|
|
208
|
+
`).concat([n&&"position: relative ".concat(i,";"),t==="margin"&&`
|
|
209
|
+
padding-left: `.concat(r,`px;
|
|
210
|
+
padding-top: `).concat(o,`px;
|
|
211
|
+
padding-right: `).concat(s,`px;
|
|
212
|
+
margin-left:0;
|
|
213
|
+
margin-top:0;
|
|
214
|
+
margin-right: `).concat(c,"px ").concat(i,`;
|
|
215
|
+
`),t==="padding"&&"padding-right: ".concat(c,"px ").concat(i,";")].filter(Boolean).join(""),`
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.`).concat(oc,` {
|
|
219
|
+
right: `).concat(c,"px ").concat(i,`;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.`).concat(sc,` {
|
|
223
|
+
margin-right: `).concat(c,"px ").concat(i,`;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.`).concat(oc," .").concat(oc,` {
|
|
227
|
+
right: 0 `).concat(i,`;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.`).concat(sc," .").concat(sc,` {
|
|
231
|
+
margin-right: 0 `).concat(i,`;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
body[`).concat(No,`] {
|
|
235
|
+
`).concat(A7,": ").concat(c,`px;
|
|
236
|
+
}
|
|
237
|
+
`)},mf=function(){var e=parseInt(document.body.getAttribute(No)||"0",10);return isFinite(e)?e:0},K7=function(){y.useEffect(function(){return document.body.setAttribute(No,(mf()+1).toString()),function(){var e=mf()-1;e<=0?document.body.removeAttribute(No):document.body.setAttribute(No,e.toString())}},[])},J7=function(e){var n=e.noRelative,t=e.noImportant,i=e.gapMode,r=i===void 0?"margin":i;K7();var o=y.useMemo(function(){return Z7(r)},[r]);return y.createElement(G7,{styles:q7(o,!n,r,t?"":"!important")})},bd=!1;if(typeof window<"u")try{var Ra=Object.defineProperty({},"passive",{get:function(){return bd=!0,!0}});window.addEventListener("test",Ra,Ra),window.removeEventListener("test",Ra,Ra)}catch{bd=!1}var go=bd?{passive:!1}:!1,X7=function(e){return e.tagName==="TEXTAREA"},sp=function(e,n){if(!(e instanceof Element))return!1;var t=window.getComputedStyle(e);return t[n]!=="hidden"&&!(t.overflowY===t.overflowX&&!X7(e)&&t[n]==="visible")},eC=function(e){return sp(e,"overflowY")},tC=function(e){return sp(e,"overflowX")},gf=function(e,n){var t=n.ownerDocument,i=n;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var r=ap(e,i);if(r){var o=cp(e,i),s=o[1],c=o[2];if(s>c)return!0}i=i.parentNode}while(i&&i!==t.body);return!1},nC=function(e){var n=e.scrollTop,t=e.scrollHeight,i=e.clientHeight;return[n,t,i]},iC=function(e){var n=e.scrollLeft,t=e.scrollWidth,i=e.clientWidth;return[n,t,i]},ap=function(e,n){return e==="v"?eC(n):tC(n)},cp=function(e,n){return e==="v"?nC(n):iC(n)},rC=function(e,n){return e==="h"&&n==="rtl"?-1:1},oC=function(e,n,t,i,r){var o=rC(e,window.getComputedStyle(n).direction),s=o*i,c=t.target,l=n.contains(c),h=!1,d=s>0,f=0,m=0;do{if(!c)break;var g=cp(e,c),w=g[0],p=g[1],_=g[2],x=p-_-o*w;(w||x)&&ap(e,c)&&(f+=x,m+=w);var I=c.parentNode;c=I&&I.nodeType===Node.DOCUMENT_FRAGMENT_NODE?I.host:I}while(!l&&c!==document.body||l&&(n.contains(c)||n===c));return(d&&Math.abs(f)<1||!d&&Math.abs(m)<1)&&(h=!0),h},Va=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},yf=function(e){return[e.deltaX,e.deltaY]},pf=function(e){return e&&"current"in e?e.current:e},sC=function(e,n){return e[0]===n[0]&&e[1]===n[1]},aC=function(e){return`
|
|
238
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
239
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
240
|
+
`)},cC=0,yo=[];function lC(e){var n=y.useRef([]),t=y.useRef([0,0]),i=y.useRef(),r=y.useState(cC++)[0],o=y.useState(op)[0],s=y.useRef(e);y.useEffect(function(){s.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var p=d3([e.lockRef.current],(e.shards||[]).map(pf),!0).filter(Boolean);return p.forEach(function(_){return _.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),p.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var c=y.useCallback(function(p,_){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!s.current.allowPinchZoom;var x=Va(p),I=t.current,b="deltaX"in p?p.deltaX:I[0]-x[0],j="deltaY"in p?p.deltaY:I[1]-x[1],C,E=p.target,T=Math.abs(b)>Math.abs(j)?"h":"v";if("touches"in p&&T==="h"&&E.type==="range")return!1;var O=window.getSelection(),L=O&&O.anchorNode,N=L?L===E||L.contains(E):!1;if(N)return!1;var v=gf(T,E);if(!v)return!0;if(v?C=T:(C=T==="v"?"h":"v",v=gf(T,E)),!v)return!1;if(!i.current&&"changedTouches"in p&&(b||j)&&(i.current=C),!C)return!0;var D=i.current||C;return oC(D,_,p,D==="h"?b:j)},[]),l=y.useCallback(function(p){var _=p;if(!(!yo.length||yo[yo.length-1]!==o)){var x="deltaY"in _?yf(_):Va(_),I=n.current.filter(function(C){return C.name===_.type&&(C.target===_.target||_.target===C.shadowParent)&&sC(C.delta,x)})[0];if(I&&I.should){_.cancelable&&_.preventDefault();return}if(!I){var b=(s.current.shards||[]).map(pf).filter(Boolean).filter(function(C){return C.contains(_.target)}),j=b.length>0?c(_,b[0]):!s.current.noIsolation;j&&_.cancelable&&_.preventDefault()}}},[]),h=y.useCallback(function(p,_,x,I){var b={name:p,delta:_,target:x,should:I,shadowParent:uC(x)};n.current.push(b),setTimeout(function(){n.current=n.current.filter(function(j){return j!==b})},1)},[]),d=y.useCallback(function(p){t.current=Va(p),i.current=void 0},[]),f=y.useCallback(function(p){h(p.type,yf(p),p.target,c(p,e.lockRef.current))},[]),m=y.useCallback(function(p){h(p.type,Va(p),p.target,c(p,e.lockRef.current))},[]);y.useEffect(function(){return yo.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",l,go),document.addEventListener("touchmove",l,go),document.addEventListener("touchstart",d,go),function(){yo=yo.filter(function(p){return p!==o}),document.removeEventListener("wheel",l,go),document.removeEventListener("touchmove",l,go),document.removeEventListener("touchstart",d,go)}},[]);var g=e.removeScrollBar,w=e.inert;return y.createElement(y.Fragment,null,w?y.createElement(o,{styles:aC(r)}):null,g?y.createElement(J7,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function uC(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const dC=V7(rp,lC);var lp=y.forwardRef(function(e,n){return y.createElement(_l,Zi({},e,{ref:n,sideCar:dC}))});lp.classNames=_l.classNames;var hC=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},po=new WeakMap,Ua=new WeakMap,Ba={},iu=0,up=function(e){return e&&(e.host||up(e.parentNode))},fC=function(e,n){return n.map(function(t){if(e.contains(t))return t;var i=up(t);return i&&e.contains(i)?i:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(t){return!!t})},mC=function(e,n,t,i){var r=fC(n,Array.isArray(e)?e:[e]);Ba[t]||(Ba[t]=new WeakMap);var o=Ba[t],s=[],c=new Set,l=new Set(r),h=function(f){!f||c.has(f)||(c.add(f),h(f.parentNode))};r.forEach(h);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(m){if(c.has(m))d(m);else try{var g=m.getAttribute(i),w=g!==null&&g!=="false",p=(po.get(m)||0)+1,_=(o.get(m)||0)+1;po.set(m,p),o.set(m,_),s.push(m),p===1&&w&&Ua.set(m,!0),_===1&&m.setAttribute(t,"true"),w||m.setAttribute(i,"true")}catch(x){console.error("aria-hidden: cannot operate on ",m,x)}})};return d(n),c.clear(),iu++,function(){s.forEach(function(f){var m=po.get(f)-1,g=o.get(f)-1;po.set(f,m),o.set(f,g),m||(Ua.has(f)||f.removeAttribute(i),Ua.delete(f)),g||f.removeAttribute(t)}),iu--,iu||(po=new WeakMap,po=new WeakMap,Ua=new WeakMap,Ba={})}},gC=function(e,n,t){t===void 0&&(t="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),r=hC(e);return r?(i.push.apply(i,Array.from(r.querySelectorAll("[aria-live], script"))),mC(i,r,t,"aria-hidden")):function(){return null}},xl="Dialog",[dp]=y0(xl),[yC,Bn]=dp(xl),hp=e=>{const{__scopeDialog:n,children:t,open:i,defaultOpen:r,onOpenChange:o,modal:s=!0}=e,c=y.useRef(null),l=y.useRef(null),[h,d]=Fy({prop:i,defaultProp:r??!1,onChange:o,caller:xl});return a.jsx(yC,{scope:n,triggerRef:c,contentRef:l,contentId:rc(),titleId:rc(),descriptionId:rc(),open:h,onOpenChange:d,onOpenToggle:y.useCallback(()=>d(f=>!f),[d]),modal:s,children:t})};hp.displayName=xl;var fp="DialogTrigger",mp=y.forwardRef((e,n)=>{const{__scopeDialog:t,...i}=e,r=Bn(fp,t),o=Un(n,r.triggerRef);return a.jsx(Kt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":L0(r.open),...i,ref:o,onClick:Qt(e.onClick,r.onOpenToggle)})});mp.displayName=fp;var C0="DialogPortal",[pC,gp]=dp(C0,{forceMount:void 0}),yp=e=>{const{__scopeDialog:n,forceMount:t,children:i,container:r}=e,o=Bn(C0,n);return a.jsx(pC,{scope:n,forceMount:t,children:y.Children.map(i,s=>a.jsx(us,{present:t||o.open,children:a.jsx(x0,{asChild:!0,container:r,children:s})}))})};yp.displayName=C0;var Nc="DialogOverlay",pp=y.forwardRef((e,n)=>{const t=gp(Nc,e.__scopeDialog),{forceMount:i=t.forceMount,...r}=e,o=Bn(Nc,e.__scopeDialog);return o.modal?a.jsx(us,{present:i||o.open,children:a.jsx(_C,{...r,ref:n})}):null});pp.displayName=Nc;var wC=Ny("DialogOverlay.RemoveScroll"),_C=y.forwardRef((e,n)=>{const{__scopeDialog:t,...i}=e,r=Bn(Nc,t);return a.jsx(lp,{as:wC,allowPinchZoom:!0,shards:[r.contentRef],children:a.jsx(Kt.div,{"data-state":L0(r.open),...i,ref:n,style:{pointerEvents:"auto",...i.style}})})}),no="DialogContent",wp=y.forwardRef((e,n)=>{const t=gp(no,e.__scopeDialog),{forceMount:i=t.forceMount,...r}=e,o=Bn(no,e.__scopeDialog);return a.jsx(us,{present:i||o.open,children:o.modal?a.jsx(xC,{...r,ref:n}):a.jsx(MC,{...r,ref:n})})});wp.displayName=no;var xC=y.forwardRef((e,n)=>{const t=Bn(no,e.__scopeDialog),i=y.useRef(null),r=Un(n,t.contentRef,i);return y.useEffect(()=>{const o=i.current;if(o)return gC(o)},[]),a.jsx(_p,{...e,ref:r,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Qt(e.onCloseAutoFocus,o=>{var s;o.preventDefault(),(s=t.triggerRef.current)==null||s.focus()}),onPointerDownOutside:Qt(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,c=s.button===0&&s.ctrlKey===!0;(s.button===2||c)&&o.preventDefault()}),onFocusOutside:Qt(e.onFocusOutside,o=>o.preventDefault())})}),MC=y.forwardRef((e,n)=>{const t=Bn(no,e.__scopeDialog),i=y.useRef(!1),r=y.useRef(!1);return a.jsx(_p,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s,c;(s=e.onCloseAutoFocus)==null||s.call(e,o),o.defaultPrevented||(i.current||(c=t.triggerRef.current)==null||c.focus(),o.preventDefault()),i.current=!1,r.current=!1},onInteractOutside:o=>{var l,h;(l=e.onInteractOutside)==null||l.call(e,o),o.defaultPrevented||(i.current=!0,o.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const s=o.target;((h=t.triggerRef.current)==null?void 0:h.contains(s))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&r.current&&o.preventDefault()}})}),_p=y.forwardRef((e,n)=>{const{__scopeDialog:t,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:o,...s}=e,c=Bn(no,t),l=y.useRef(null),h=Un(n,l);return N7(),a.jsxs(a.Fragment,{children:[a.jsx(b0,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:o,children:a.jsx(p0,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":L0(c.open),...s,ref:h,onDismiss:()=>c.onOpenChange(!1)})}),a.jsxs(a.Fragment,{children:[a.jsx(bC,{titleId:c.titleId}),a.jsx(jC,{contentRef:l,descriptionId:c.descriptionId})]})]})}),j0="DialogTitle",xp=y.forwardRef((e,n)=>{const{__scopeDialog:t,...i}=e,r=Bn(j0,t);return a.jsx(Kt.h2,{id:r.titleId,...i,ref:n})});xp.displayName=j0;var Mp="DialogDescription",IC=y.forwardRef((e,n)=>{const{__scopeDialog:t,...i}=e,r=Bn(Mp,t);return a.jsx(Kt.p,{id:r.descriptionId,...i,ref:n})});IC.displayName=Mp;var Ip="DialogClose",bp=y.forwardRef((e,n)=>{const{__scopeDialog:t,...i}=e,r=Bn(Ip,t);return a.jsx(Kt.button,{type:"button",...i,ref:n,onClick:Qt(e.onClick,()=>r.onOpenChange(!1))})});bp.displayName=Ip;function L0(e){return e?"open":"closed"}var Cp="DialogTitleWarning",[IV,jp]=J8(Cp,{contentName:no,titleName:j0,docsSlug:"dialog"}),bC=({titleId:e})=>{const n=jp(Cp),t=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
|
|
241
|
+
|
|
242
|
+
If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
243
|
+
|
|
244
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(t))},[t,e]),null},CC="DialogDescriptionWarning",jC=({contentRef:e,descriptionId:n})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${jp(CC).contentName}}.`;return y.useEffect(()=>{var o;const r=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");n&&r&&(document.getElementById(n)||console.warn(i))},[i,e,n]),null},LC=hp,EC=mp,TC=yp,vC=pp,NC=wp,SC=xp,AC=bp;const DC=Se(e=>{const n=X();return{animation:`${lo} 400ms cubic-bezier(0.16, 1, 0.3, 1)`,backdropFilter:"blur(10px)",backgroundColor:n.colors.modalOverlayBg,inset:0,position:"fixed",zIndex:9999}}),Ml=e=>{const[n,t]=y.useState(e.open),i=y.useRef(null),r=y.useRef(null);return y.useEffect(()=>{var o;if(e.open)t(e.open);else if(i.current){const s={duration:ud,easing:"ease",fill:"forwards"};i.current.animate([{opacity:0}],{...s}).onfinish=()=>{t(!1)},(o=r.current)==null||o.animate([{opacity:0}],{...s,duration:ud+100})}else t(e.open)},[e.open]),a.jsxs(LC,{onOpenChange:e.setOpen,open:n,children:[e.trigger&&a.jsx(EC,{asChild:!0,children:e.trigger}),a.jsxs(TC,{children:[!e.hide&&a.jsx(vC,{asChild:!0,children:a.jsx(DC,{ref:r})}),a.jsx(b0,{trapped:!e.hide,children:a.jsx(NC,{"aria-describedby":void 0,asChild:!0,children:a.jsxs(zC,{className:U2("tw-modal",e.className),ref:i,style:e.hide?{height:0,opacity:0,overflow:"hidden",width:0}:{height:e.size==="compact"?"auto":iy,maxWidth:e.size==="compact"?ey:ny},children:[a.jsx(SC,{style:{borderWidth:0,clip:"rect(0, 0, 0, 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},children:e.title}),e.size==="compact"?a.jsx(uy,{maxHeight:i0,children:e.children}):e.children,!e.hideCloseIcon&&a.jsx("div",{style:{position:"absolute",right:P.lg,top:P.lg,transform:"translateX(6px)",...e.crossContainerStyles},children:a.jsx(AC,{asChild:!0,children:a.jsx(bi,{"aria-label":"Close",autoFocus:e.autoFocusCrossIcon===void 0?!0:e.autoFocusCrossIcon,type:"button",children:a.jsx(Y2,{height:A.md,style:{color:"inherit"},width:A.md})})})})]})})})]})]})},OC=vt`
|
|
245
|
+
from {
|
|
246
|
+
opacity: 0;
|
|
247
|
+
transform: translate(-50%, -48%) scale(0.96);
|
|
248
|
+
}
|
|
249
|
+
to {
|
|
250
|
+
opacity: 1;
|
|
251
|
+
transform: translate(-50%, -50%) scale(1);
|
|
252
|
+
}
|
|
253
|
+
`,kC=vt`
|
|
254
|
+
from {
|
|
255
|
+
opacity: 0;
|
|
256
|
+
transform: translate(0, 50%);
|
|
257
|
+
}
|
|
258
|
+
to {
|
|
259
|
+
opacity: 1;
|
|
260
|
+
transform: translate(0, 0);
|
|
261
|
+
}
|
|
262
|
+
`,zC=Se(e=>{const n=X();return{"--bg":n.colors.modalBg,"& *":{boxSizing:"border-box"},animation:`${OC} 300ms ease`,background:n.colors.modalBg,border:`1px solid ${n.colors.borderColor}`,borderRadius:G.xl,boxShadow:b2.lg,boxSizing:"border-box",color:n.colors.primaryText,fontFamily:n.fontFamily,left:"50%",lineHeight:"normal",outline:"none",overflow:"hidden",position:"fixed",top:"50%",transform:"translate(-50%, -50%)",width:"calc(100vw - 40px)",zIndex:1e4,[Fh.mobile]:{animation:`${kC} 0.35s cubic-bezier(0.15, 1.15, 0.6, 1)`,borderBottomLeftRadius:0,borderBottomRightRadius:0,bottom:0,left:0,maxWidth:"none !important",right:0,top:"auto",transform:"none",width:"100vw"},"& *::selection":{backgroundColor:n.colors.selectedTextBg,color:n.colors.selectedTextColor},...wa}}),PC={USD:"$",EUR:"€",GBP:"£",JPY:"¥",KRW:"₩",CNY:"¥",INR:"₹",NOK:"kr",SEK:"kr",CHF:"CHF",AUD:"$",CAD:"$",NZD:"$",MXN:"$",BRL:"R$",CLP:"$",CZK:"Kč",DKK:"kr",HKD:"$",HUF:"Ft",IDR:"Rp",ILS:"₪",ISK:"kr"};function Cd(e){return PC[e]||"$"}function RC(e){return e===0?"0.00":e<1e3?e.toString():e<1e4?e.toLocaleString("en-US"):e<1e6?ru(e,1e3,"k"):e<1e9?ru(e,1e6,"M"):ru(e,1e9,"B")}function ru(e,n,t){const i=e/n;return Number.isInteger(i)?Math.floor(i)+t:i.toFixed(1).replace(/\.0$/,"")+t}const wf=[["#fca5a5","#b91c1c"],["#fdba74","#c2410c"],["#fcd34d","#b45309"],["#fde047","#a16207"],["#a3e635","#4d7c0f"],["#86efac","#15803d"],["#67e8f9","#0e7490"],["#7dd3fc","#0369a1"],["#93c5fd","#1d4ed8"],["#a5b4fc","#4338ca"],["#c4b5fd","#6d28d9"],["#d8b4fe","#7e22ce"],["#f0abfc","#a21caf"],["#f9a8d4","#be185d"],["#fda4af","#be123c"]];async function VC(e){const{chain:n,client:t,address:i,tokenAddress:r,showBalanceInFiat:o}=e;if(!n)throw new Error("chain is required");if(r&&(r==null?void 0:r.toLowerCase())===Gt.toLowerCase())throw new Error(`Invalid tokenAddress - cannot be ${Gt}`);if(!yr(i))throw new Error("Invalid wallet address. Expected an EVM address");if(r&&!yr(r))throw new Error("Invalid tokenAddress. Expected an EVM contract address");const s=await Zh({address:i,chain:n,client:t,tokenAddress:r}).catch(()=>{});if(!s)throw new Error(`Failed to retrieve ${r?`token: ${r}`:"native token"} balance for address: ${i} on chainId:${n.id}`);if(o){const c=await Iy({chain:n,client:t,fromAmount:Number(s.displayValue),fromTokenAddress:r||Gt,to:o}).catch(()=>{});if(c===void 0)throw new Error(`Failed to resolve fiat value for ${r?`token: ${r}`:"native token"} on chainId: ${n.id}`);return{balance:c==null?void 0:c.result,symbol:Cd(o)}}return{balance:Number(s.displayValue),symbol:s.symbol}}function Sc(e){return`${xa(e.balance,e.decimals)} ${e.symbol}`}function E0(e){const n=xa(e.balance,e.decimals),t=RC(n);return`${e.symbol}${t}`}const T0={agreement:{and:"&",prefix:"By connecting, you agree to the",privacyPolicy:"Privacy Policy",termsOfService:"Terms of Service"},backupWallet:"Backup Wallet",buy:"Buy",confirmInWallet:"Confirm in wallet",connectAWallet:"Connect a Wallet",connectedToSmartWallet:"Smart Account",connecting:"Connecting",continueAsGuest:"Continue as guest",copyAddress:"Copy Address",currentNetwork:"Current network",defaultButtonTitle:"Connect",defaultModalTitle:"Sign in",disconnectWallet:"Disconnect Wallet",getStarted:"Get started",goBackButton:"Back",guest:"Guest",guestWalletWarning:"This is a temporary guest wallet. Backup wallet if you don't want to lose access to it",id:"en_US",installed:"Installed",manageWallet:{connectAnApp:"Connect an App",exportPrivateKey:"Export Private Key",linkedProfiles:"Linked Profiles",linkProfile:"Link a Profile",title:"Manage Wallet"},networkSelector:{addCustomNetwork:"Add Custom Network",allNetworks:"All",categoryLabel:{others:"All Networks",popular:"Popular",recentlyUsed:"Recently Used"},failedToSwitch:"Failed to switch network",inputPlaceholder:"Search Network or Chain ID",loading:"Loading",mainnets:"Mainnets",testnets:"Testnets",title:"Select Network"},newToWallets:"New to wallets?",or:"OR",passkeys:{linkPasskey:"Link a Passkey",title:"Passkeys"},payTransactions:"Fiat Transactions",personalWallet:"Personal Wallet",receive:"Receive",receiveFundsScreen:{instruction:"Copy the address to send funds to this wallet",title:"Receive Funds"},recommended:"Recommended",requestTestnetFunds:"Request Testnet Funds",send:"Send",sendFundsScreen:{amount:"Amount",insufficientFunds:"Insufficient Funds",invalidAddress:"Invalid Address",noTokensFound:"No Tokens Found",searchToken:"Search or Paste token address",selectTokenTitle:"Select a Token",sending:"Sending",sendTo:"Send to",submitButton:"Send",successMessage:"Transaction Successful",title:"Send Funds",token:"Token",transactionFailed:"Transaction Failed",transactionRejected:"Transaction Rejected"},signatureScreen:{instructionScreen:{disconnectWallet:"Disconnect Wallet",instruction:"Please sign the message request in your wallet to continue",signInButton:"Sign in",title:"Sign in"},signingScreen:{approveTransactionInSafe:"Approve transaction in Safe",failedToSignIn:"Failed to Sign in",inProgress:"Awaiting Confirmation",prompt:"Signing the signature request in your wallet",promptForSafe:"Sign signature request in your wallet & approve transaction in Safe",title:"Signing In",tryAgain:"Try Again"}},signIn:"Sign in",smartWallet:"Smart Wallet",switchAccount:"Switch Account",switchingNetwork:"Switching Network",switchNetwork:"Switch Network",switchTo:"Switch to",transactions:"Transactions",viewAllTransactions:"View All Transactions",viewFunds:{title:"View Funds",viewAssets:"View Assets",viewNFTs:"View NFTs",viewTokens:"View Tokens"},walletTransactions:"Wallet Transactions",welcomeScreen:{defaultSubtitle:"Connect a wallet to get started",defaultTitle:"Your gateway to the decentralized world"}},UC=Object.freeze(Object.defineProperty({__proto__:null,default:T0},Symbol.toStringTag,{value:"Module"})),Lp=e=>a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 18 18",width:e.size,height:e.size,style:{color:e.color},role:"presentation",children:a.jsx("path",{fill:"currentColor",d:"M15.6 4.6H1.85v-.55l12.1-.968v.968h1.65V2.4c0-1.21-.98-2.059-2.177-1.888L2.378 2.089C1.18 2.26.2 3.39.2 4.6v11a2.2 2.2 0 002.2 2.2h13.2a2.2 2.2 0 002.2-2.2V6.8a2.2 2.2 0 00-2.2-2.2zm-1.65 7.707a1.65 1.65 0 01-.63-3.176 1.65 1.65 0 11.63 3.176z"})}),ou=640;function Ep(){const[e,n]=y.useState(void 0);return y.useEffect(()=>{const t=window.matchMedia(`(max-width: ${ou-1}px)`),i=()=>{n(window.innerWidth<ou)};return t.addEventListener("change",i),n(window.innerWidth<ou),()=>t.removeEventListener("change",i)},[]),!!e}function v0({socialType:e,resolverAddress:n,resolverChain:t,loadingComponent:i,fallbackComponent:r,queryOptions:o,...s}){const{address:c,client:l}=ya(),h=pe({queryFn:async()=>{var p;const[d,f]=await Promise.all([qh({address:c,client:l}),Xh({address:c||"",client:l,resolverAddress:n,resolverChain:t})]),m=(p=d==null?void 0:d.filter(_=>_.avatar&&(e?_.type===e:!0))[0])==null?void 0:p.avatar,[g,w]=await Promise.all([m?D2({client:l,uri:m}):void 0,f?TI({client:l,name:f}):void 0]);if(!g&&!w)throw new Error("Failed to resolve social + ens avatar");if(g)return g;if(w)return w;throw new Error("Failed to resolve social + ens avatar")},queryKey:["account-avatar",c,{socialType:e},{resolverAddress:n,resolverChain:t}],retry:!1,...o});return h.isLoading?i||null:h.data?a.jsx("img",{src:h.data,...s,alt:s.alt}):r||null}function Tp(e){const n=y.useId(),t=y.useMemo(()=>wf[Number(Nh(e.address.slice(2,4)))%wf.length],[e.address]);return a.jsx("div",{className:e.className,id:n,style:{...e.style,backgroundImage:`radial-gradient(ellipse at left bottom, ${t[0]}, ${t[1]})`,...e.size?{height:`${e.size}px`,width:`${e.size}px`}:void 0}})}function Gs(e){const{address:n}=ya();return a.jsx(Tp,{...e,address:n})}function N0({resolverAddress:e,resolverChain:n,socialType:t,formatFn:i,queryOptions:r,loadingComponent:o,fallbackComponent:s,...c}){const{address:l,client:h}=ya(),d=pe({queryFn:async()=>{var w;const[f,m]=await Promise.all([qh({address:l,client:h}),Xh({address:l,client:h,resolverAddress:e,resolverChain:n})]),g=((w=f==null?void 0:f.filter(p=>p.name&&(t?p.type===t:!0))[0])==null?void 0:w.name)||m;if(!g)throw new Error("Failed to resolve account name");return i?i(g):g},queryKey:["account-name",l,{socialType:t},{resolverAddress:e,resolverChain:n}],retry:!1,...r});return d.isLoading?o||null:d.data?a.jsx("span",{...c,children:d.data}):s||null}function BC({loadingComponent:e,fallbackComponent:n,queryOptions:t,...i}){const r=mM({queryOptions:t});return r.isLoading?e||null:r.data?a.jsx("img",{src:r.data,...i,alt:i.alt}):n||null}function WC(e){const n=e.activeWalletInfo.activeWallet,t=e.activeWalletInfo.activeAccount,i=a.jsx(Gs,{style:{width:`${A.xs}px`,height:`${A.xs}px`,borderRadius:G.full}}),r=a.jsx(BC,{style:{width:`${A.xs}px`,height:`${A.xs}px`},fallbackComponent:i,loadingComponent:i});return a.jsx($C,{variant:"ghost-solid",style:{paddingInline:P.xxs,paddingBlock:"2px"},onClick:e.onClick,children:a.jsx(Yh,{address:t.address,client:e.client,children:a.jsx(cM,{id:n.id,children:a.jsxs(M,{flex:"row",gap:"xxs",center:"y",children:[a.jsx(v0,{style:{width:`${A.xs}px`,height:`${A.xs}px`,borderRadius:G.full,objectFit:"cover"},fallbackComponent:r,loadingComponent:r}),a.jsx("span",{style:{fontSize:ie.xs,letterSpacing:"0.025em"},children:a.jsx(N0,{fallbackComponent:a.jsx("span",{children:ln(t.address)}),loadingComponent:a.jsx("span",{children:ln(t.address)})})})]})})})})}const $C=ze(ae)(()=>{const e=X();return{color:e.colors.secondaryText,transition:"color 200ms ease","&:hover":{color:e.colors.primaryText}}});function _f(e){const n=t=>{let i=t;i=i.replace(",","."),i.startsWith(".")&&(i=`0${i}`);const r=Number(i);Number.isNaN(r)||(i.length>1&&i.startsWith("0")&&!i.startsWith("0.")?e.setValue(i.slice(1)):e.setValue(i))};return a.jsx(xr,{...e,inputMode:"decimal",onChange:t=>{n(t.target.value)},onClick:t=>{e.value===""&&t.currentTarget.setSelectionRange(t.currentTarget.value.length,t.currentTarget.value.length)},pattern:"^[0-9]*[.,]?[0-9]*$",placeholder:"0.0",type:"text",variant:"transparent"})}function S0(e){return e.replace("Mainnet","")}const YC=new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:5,minimumFractionDigits:2});function FC(e){var t,i,r,o,s,c,l;const n=X();return a.jsxs(ae,{variant:"ghost-solid",hoverBg:e.disabled?void 0:"secondaryButtonBg",fullWidth:!0,onClick:e.onSelectToken,gap:"sm",disabled:e.disabled,style:{borderBottom:`1px dashed ${n.colors.borderColor}`,justifyContent:"space-between",paddingInline:P.md,paddingBlock:P.md,borderRadius:0,background:e.disabled?"transparent":void 0,cursor:e.disabled?"default":"pointer",opacity:1},children:[a.jsxs(M,{gap:"sm",flex:"row",center:"y",children:[a.jsxs(M,{relative:!0,color:"secondaryText",children:[e.selectedToken&&!e.selectedToken.isError?a.jsx(He,{src:((t=e.selectedToken)==null?void 0:t.data)===void 0?void 0:e.selectedToken.data.iconUri||"",client:e.client,width:"40",height:"40",fallback:a.jsx(M,{style:{background:`linear-gradient(45deg, white, ${n.colors.accentText})`,borderRadius:G.full,width:"40px",height:"40px"}}),style:{objectFit:"cover",borderRadius:G.full}},(r=(i=e.selectedToken)==null?void 0:i.data)==null?void 0:r.iconUri):a.jsx(M,{style:{border:`1px solid ${n.colors.borderColor}`,background:`linear-gradient(45deg, white, ${n.colors.accentText})`,borderRadius:G.full,width:"40px",height:"40px"}}),e.chain&&a.jsx(M,{bg:"modalBg",style:{padding:"2px",position:"absolute",bottom:-2,right:-2,display:"flex",borderRadius:G.full},children:a.jsx(He,{src:((o=e.chain)==null?void 0:o.icon)||"",client:e.client,width:A.sm,height:A.sm,style:{borderRadius:G.full},fallback:a.jsx(M,{style:{background:`linear-gradient(45deg, white, ${n.colors.accentText})`,borderRadius:G.full,width:`${A.sm}px`,height:`${A.sm}px`}})})})]}),e.selectedToken&&!e.selectedToken.isError?a.jsxs(M,{flex:"column",style:{gap:"3px"},children:[(s=e.selectedToken)!=null&&s.isFetching?a.jsx(ge,{width:"60px",height:ie.md}):a.jsx(k,{size:"md",color:"primaryText",weight:500,style:{whiteSpace:"nowrap",maxWidth:"200px"},children:(l=(c=e.selectedToken)==null?void 0:c.data)==null?void 0:l.symbol}),e.chain?a.jsx(k,{size:"xs",color:"secondaryText",style:{whiteSpace:"nowrap"},children:S0(e.chain.name)}):a.jsx(ge,{width:"140px",height:ie.sm})]}):a.jsxs(M,{flex:"column",style:{gap:"3px"},children:[a.jsx(k,{size:"md",color:"primaryText",weight:500,children:"Select Token"}),a.jsx(k,{size:"xs",color:"secondaryText",children:"Required"})]})]}),!e.disabled&&a.jsx(M,{color:"secondaryText",flex:"row",center:"both",borderColor:"borderColor",style:{borderRadius:G.full,borderWidth:1,borderStyle:"solid",padding:P.xs},children:a.jsx(sl,{width:A.sm,height:A.sm})})]})}function QC(e){return il({address:e.walletAddress,chain:e.chainId?Ot(e.chainId):void 0,client:e.client,tokenAddress:e.tokenAddress?xe(e.tokenAddress)===xe(Gt)?void 0:xe(e.tokenAddress):void 0})}function HC(e){return pe({enabled:!!e.chainId,queryFn:async()=>{if(!e.chainId)throw new Error("Chain ID is required");const n=e.tokenAddress||Gt,t=await _a(e.client,n,e.chainId).catch(i=>{i.message.includes("not supported")||Promise.reject(i)});return t?{token:t,type:"success"}:{type:"unsupported_token"}},queryKey:["bridge.getToken",e],refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1})}function ZC(e){const n=X();return a.jsxs(M,{flex:"column",children:[e.image&&a.jsx("div",{className:"tw-header-image",style:{aspectRatio:"16/9",backgroundColor:n.colors.tertiaryBg,backgroundImage:`url(${GC(e.client,e.image)})`,backgroundPosition:"center",backgroundSize:"cover",borderRadius:`${G.md} ${G.md} 0 0`,marginBottom:P.xxs,overflow:"hidden",width:"100%"}}),a.jsxs(M,{flex:"column",px:"md",children:[a.jsx(U,{y:"md"}),(e.title||e.description)&&a.jsxs(a.Fragment,{children:[e.title&&a.jsx(k,{color:"primaryText",size:"lg",weight:500,trackingTight:!0,children:e.title}),e.description&&a.jsxs(a.Fragment,{children:[a.jsx(U,{y:"xxs"}),a.jsx(k,{color:"secondaryText",size:"sm",multiline:!0,children:e.description})]}),a.jsx(U,{y:"md"})]}),e.children]})]})}function GC(e,n){return n.startsWith("ipfs://")?gr({client:e,uri:n}):n}function qC(e){const n=yt(),t=ut(),i=lt();return y.useMemo(()=>{const r=t,o=i,s=n;return r&&o&&s?{activeChain:o,activeWallet:r,activeAccount:s}:void 0},[n,t,i,e])}function KC(e){return pe({queryKey:["token-price",e.token],enabled:!!e.token,queryFn:()=>{if(!e.token)throw new Error("Token is required");return _a(e.client,e.token.tokenAddress,e.token.chainId)},refetchOnMount:!1,retry:!1,refetchOnWindowFocus:!1})}const Il=e=>a.jsxs("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 24 24",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("path",{d:"M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),a.jsx("path",{d:"M18.0901 10.37C19.0354 10.7224 19.8766 11.3075 20.5358 12.0712C21.1951 12.8349 21.6512 13.7524 21.8618 14.7391C22.0725 15.7257 22.031 16.7495 21.7411 17.7158C21.4513 18.6822 20.9224 19.5598 20.2035 20.2676C19.4846 20.9754 18.5988 21.4905 17.6281 21.7652C16.6573 22.04 15.633 22.0655 14.6498 21.8395C13.6666 21.6134 12.7562 21.1431 12.0029 20.472C11.2496 19.8009 10.6777 18.9507 10.3401 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),a.jsx("path",{d:"M7 6H8V10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),a.jsx("path",{d:"M16.7101 13.88L17.4101 14.59L14.5901 17.41",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})]}),JC=e=>a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",role:"presentation",width:e.size,style:{color:e.color},height:e.size,children:[a.jsx("circle",{cx:"12",cy:"12",r:"10"}),a.jsx("path",{d:"M12 16v-4"}),a.jsx("path",{d:"M12 8h.01"})]});function vp(e){return a.jsxs("div",{style:{position:"relative"},children:[a.jsx(M,{color:"secondaryText",children:a.jsx(t0,{width:A.md,height:A.md,style:{position:"absolute",left:P.sm,top:"50%",borderRadius:G.lg,transform:"translateY(-50%)"}})}),a.jsx(xr,{variant:"outline",placeholder:e.placeholder,value:e.value,sm:!0,style:{paddingLeft:"44px"},onChange:n=>e.onChange(n.target.value),autoFocus:e.autoFocus})]})}function XC(e){return a.jsxs(ae,{variant:"outline",bg:"tertiaryBg",fullWidth:!0,style:{justifyContent:"flex-start",fontWeight:500,fontSize:ie.md,padding:`${P.sm} ${P.sm}`,borderRadius:G.lg,minHeight:"48px"},gap:"sm",onClick:e.onClick,children:[a.jsx(He,{src:e.selectedChain.icon,client:e.client,width:A.lg,height:A.lg}),a.jsxs("span",{children:[" ",S0(e.selectedChain.name)," "]}),a.jsx(sl,{width:A.sm,height:A.sm,style:{marginLeft:"auto"}})]})}function Np(e){return pe({queryKey:["bridge-chains",e],queryFn:async()=>[...await pM(e)].sort((i,r)=>{var c,l;const o=(c=i.name[0])==null?void 0:c.match(/^\d/),s=(l=r.name[0])==null?void 0:l.match(/^\d/);return o&&!s?1:!o&&s?-1:i.name.localeCompare(r.name)}),refetchOnMount:!1,refetchOnWindowFocus:!1})}function ej({chainId:e,client:n}){var i;const t=Np({client:n});return{data:(i=t.data)==null?void 0:i.find(r=>r.chainId===e),isPending:t.isPending}}function Sp(e){return Np({client:e.client,...e.type==="buy"?e.sellChainId?{originChainId:e.sellChainId}:{type:"destination"}:e.buyChainId?{destinationChainId:e.buyChainId}:{type:"origin"}})}function xf(e){const n=Sp({client:e.client,type:e.type,buyChainId:e.selections.buyChainId,sellChainId:e.selections.sellChainId});return a.jsx(tj,{...e,isPending:n.isPending,onSelectChain:e.onSelectChain,chains:n.data??[]})}function tj(e){const[n,t]=y.useState(""),[i]=y.useState(e.selectedChain),o=y.useMemo(()=>i?[i,...e.chains.filter(s=>s.chainId!==i.chainId)]:e.chains,[e.chains,i]).filter(s=>s.name.toLowerCase().includes(n.toLowerCase()));return a.jsxs(M,{fullHeight:!0,flex:"column",children:[e.isMobile&&a.jsxs(a.Fragment,{children:[a.jsx(M,{px:"md",py:"md+",children:a.jsx(_e,{onBack:e.onBack,title:"Select Chain"})}),a.jsx(Re,{})]}),a.jsx(U,{y:"md"}),a.jsx(M,{px:"md",style:{paddingBottom:0},children:a.jsx(vp,{value:n,onChange:t,placeholder:"Search Chain"})}),a.jsx(U,{y:"sm"}),a.jsxs(M,{expand:!0,px:"md",gap:e.isMobile?void 0:"xxs",flex:"column",style:{maxHeight:e.isMobile?"400px":"none",overflowY:"auto",scrollbarWidth:"none",paddingBottom:P.md},children:[o.map(s=>{var c;return a.jsx(ij,{chain:s,client:e.client,onClick:()=>e.onSelectChain(s),isSelected:s.chainId===((c=e.selectedChain)==null?void 0:c.chainId),isMobile:e.isMobile},s.chainId)}),e.isPending&&new Array(20).fill(0).map(()=>a.jsx(nj,{isMobile:e.isMobile})),o.length===0&&!e.isPending&&a.jsx("div",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:a.jsxs(k,{color:"secondaryText",size:"md",center:!0,multiline:!0,children:['No chains found for "',n,'"']})})]})]})}function nj(e){const n=e.isMobile?A.lg:A.md;return a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:P.sm,padding:e.isMobile?`${P.sm} ${P.sm}`:`${P.xs} ${P.xs}`},children:[a.jsx(ge,{height:`${n}px`,width:`${n}px`}),a.jsx(ge,{height:e.isMobile?ie.md:ie.sm,width:"160px"})]})}function ij(e){const n=X(),t=e.isMobile?A.lg:A.md;return a.jsxs(ae,{variant:e.isSelected?"secondary":"ghost-solid",fullWidth:!0,style:{justifyContent:"flex-start",fontWeight:500,fontSize:e.isMobile?ie.md:ie.sm,border:"1px solid transparent",padding:e.isMobile?void 0:`${P.xs} ${P.xs}`},onClick:e.onClick,gap:"sm",children:[a.jsx(He,{src:e.chain.icon||"",client:e.client,width:t,height:t,style:{borderRadius:G.full},fallback:a.jsx(M,{color:"secondaryText",children:a.jsx(M,{style:{background:`linear-gradient(45deg, white, ${n.colors.accentText})`,borderRadius:G.full,width:`${t}px`,height:`${t}px`}})})}),S0(e.chain.name)]})}function rj(e){return pe({queryKey:["tokens",e],enabled:!!e.chainId,retry:!1,queryFn:()=>{if(!e.chainId)throw new Error("Chain ID is required");const n=e.search?yr(e.search):!1;return t2({chainId:e.chainId,client:e.client,offset:e.offset,limit:e.limit,includePrices:!1,query:e.search&&!n?e.search:void 0,tokenAddress:e.search&&n?e.search:void 0})}})}function oj(e){return pe({queryKey:["bridge/v1/wallets",e],enabled:!!e.chainId&&!!e.walletAddress,queryFn:async()=>{if(!e.chainId||!e.walletAddress)throw new Error("invalid options");const t=Ln("bridge").includes("thirdweb-dev"),i=new URL(`https://api.${t?"thirdweb-dev":"thirdweb"}.com/v1/wallets/${e.walletAddress}/tokens`);i.searchParams.set("chainId",e.chainId.toString()),i.searchParams.set("limit",e.limit.toString()),i.searchParams.set("page",e.page.toString()),i.searchParams.set("metadata","true"),i.searchParams.set("resolveMetadataLinks","true"),i.searchParams.set("includeSpam","false"),i.searchParams.set("includeNative","true"),i.searchParams.set("sortBy","usd_value"),i.searchParams.set("sortOrder","desc"),i.searchParams.set("includeWithoutPrice","false");const o=await En(e.client)(i.toString());if(!o.ok)throw new Error(`Failed to fetch token balances: ${o.statusText}`);return(await o.json()).result},refetchOnMount:"always"})}function su(e,n){if(n)return e.find(t=>t.chainId===n)}const au=100;function sj(e){var p,_,x,I,b;const n=Sp({client:e.client,type:e.type,buyChainId:e.selections.buyChainId,sellChainId:e.selections.sellChainId}),[t,i]=y.useState(""),r=yl(t,500),[o,s]=y.useState(au),c=y.useCallback(j=>{i(j),s(au)},[]),[l,h]=y.useState(void 0),d=l||(n.data?su(n.data,(p=e.selectedToken)==null?void 0:p.chainId)||su(n.data,(_=e.activeWalletInfo)==null?void 0:_.activeChain.id)||su(n.data,1):void 0),f=rj({client:e.client,chainId:d==null?void 0:d.chainId,search:r,limit:o,offset:0}),m=oj({client:e.client,chainId:d==null?void 0:d.chainId,limit:o,page:1,walletAddress:(x=e.activeWalletInfo)==null?void 0:x.activeAccount.address}),g=y.useMemo(()=>{var j,C;return(C=(j=m.data)==null?void 0:j.tokens)==null?void 0:C.filter(E=>E.symbol.toLowerCase().includes(r.toLowerCase())||E.name.toLowerCase().includes(r.toLowerCase())||E.token_address.toLowerCase().includes(r.toLowerCase()))},[(I=m.data)==null?void 0:I.tokens,r]),w=f.isFetching||m.isFetching;return a.jsx(aj,{...e,ownedTokens:g||[],allTokens:f.data||[],isFetching:w,selectedChain:d,setSelectedChain:h,search:t,setSearch:c,selectedToken:e.selectedToken,setSelectedToken:e.setSelectedToken,showMore:((b=f.data)==null?void 0:b.length)===o?()=>{s(o+au)}:void 0})}function aj(e){var c,l;const n=Ep(),[t,i]=y.useState("select-token"),r=y.useMemo(()=>e.ownedTokens.sort((h,d)=>h.icon_uri&&!d.icon_uri?-1:!h.icon_uri&&d.icon_uri?1:0),[e.ownedTokens]),o=y.useMemo(()=>{const h=new Set(r.map(d=>`${d.token_address}-${d.chain_id}`.toLowerCase()));return e.allTokens.filter(d=>!h.has(`${d.address}-${d.chainId}`.toLowerCase()))},[e.allTokens,r]),s=y.useMemo(()=>o.sort((h,d)=>h.iconUri&&!d.iconUri?-1:!h.iconUri&&d.iconUri?1:0),[o]);return n?t==="select-token"?a.jsx(If,{onSelectToken:h=>{e.setSelectedToken(h),e.onClose()},selectedToken:e.selectedToken,isFetching:e.isFetching,ownedTokens:e.ownedTokens,otherTokens:s,showMore:e.showMore,selectedChain:e.selectedChain,isMobile:!0,onSelectChain:()=>i("select-chain"),client:e.client,search:e.search,setSearch:e.setSearch,currency:e.currency},(l=e.selectedChain)==null?void 0:l.chainId):t==="select-chain"?a.jsx(xf,{isMobile:!0,onBack:()=>i("select-token"),client:e.client,onSelectChain:h=>{e.setSelectedChain(h),i("select-token")},selectedChain:e.selectedChain,type:e.type,selections:e.selections}):null:a.jsxs(M,{style:{display:"grid",gridTemplateColumns:"300px 1fr",height:"100%"},children:[a.jsx(uj,{children:a.jsx(xf,{type:e.type,selections:e.selections,onBack:()=>i("select-token"),client:e.client,isMobile:!1,onSelectChain:h=>{e.setSelectedChain(h),i("select-token")},selectedChain:e.selectedChain})}),a.jsx(M,{flex:"column",relative:!0,scrollY:!0,children:a.jsx(If,{onSelectToken:h=>{e.setSelectedToken(h),e.onClose()},isMobile:!1,selectedToken:e.selectedToken,isFetching:e.isFetching,ownedTokens:e.ownedTokens,otherTokens:s,showMore:e.showMore,selectedChain:e.selectedChain,onSelectChain:()=>i("select-chain"),client:e.client,search:e.search,setSearch:e.setSearch,currency:e.currency},(c=e.selectedChain)==null?void 0:c.chainId)})]})}function cj(){return a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:P.sm,padding:`${P.xs} ${P.xs}`,height:"70px"},children:[a.jsx(ge,{height:`${A.lg}px`,width:`${A.lg}px`}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[a.jsx(ge,{height:ie.sm,width:"100px"}),a.jsx(ge,{height:ie.md,width:"200px"})]})]})}function Mf(e){const n=X(),t="balance"in e.token?ei(BigInt(e.token.balance),e.token.decimals):void 0,i="balance"in e.token?e.token.price_data.price_usd*Number(t):void 0,r="balance"in e.token?e.token.token_address:e.token.address,o="balance"in e.token?e.token.chain_id:e.token.chainId;return a.jsxs(ae,{variant:e.isSelected?"secondary":"ghost-solid",fullWidth:!0,style:{justifyContent:"flex-start",fontWeight:500,fontSize:ie.md,border:"1px solid transparent",padding:`${P.xs} ${P.xs}`,textAlign:"left",lineHeight:"1.5",borderRadius:G.lg},gap:"sm",onClick:async()=>{e.onSelect({tokenAddress:r,chainId:o})},children:[a.jsx(He,{src:("balance"in e.token?e.token.icon_uri:e.token.iconUri)||"",client:e.client,width:A.lg,height:A.lg,style:{flexShrink:0,borderRadius:G.full},fallback:a.jsx(M,{color:"secondaryText",children:a.jsx(M,{style:{background:`linear-gradient(45deg, white, ${n.colors.accentText})`,borderRadius:G.full,width:`${A.lg}px`,height:`${A.lg}px`}})})}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:P["3xs"],flex:1},children:[a.jsxs(M,{flex:"row",style:{justifyContent:"space-between",width:"100%"},children:[a.jsx(k,{size:"md",color:"primaryText",weight:500,style:{maxWidth:"200px",whiteSpace:"nowrap"},children:e.token.symbol}),"balance"in e.token&&a.jsx(k,{size:"md",color:"primaryText",children:YC.format(Number(ei(BigInt(e.token.balance),e.token.decimals)))})]}),a.jsxs(M,{flex:"row",style:{justifyContent:"space-between",width:"100%"},children:[a.jsx(k,{size:"xs",color:"secondaryText",style:{whiteSpace:"nowrap",maxWidth:"200px"},children:e.token.name}),i&&a.jsx(M,{flex:"row",children:a.jsxs(k,{size:"xs",color:"secondaryText",weight:400,children:["$",i.toFixed(2)]})})]})]}),a.jsx(bi,{onClick:s=>{s.stopPropagation(),s.preventDefault(),e.onInfoClick(r,o)},style:{padding:P.xxs,borderRadius:G.full},children:a.jsx(JC,{size:A.sm})})]})}function lj(e){const n=X(),t=KC({token:{tokenAddress:e.tokenAddress,chainId:e.chainId},client:e.client}),i=t.data,r=Q3(e.tokenAddress),o=r?`https://thirdweb.com/${e.chainId}`:`https://thirdweb.com/${e.chainId}/${e.tokenAddress}`;return a.jsxs(M,{flex:"column",expand:!0,style:{minHeight:"450px"},animate:"fadein",children:[a.jsx(M,{px:"md",py:"md+",children:a.jsx(_e,{onBack:e.onBack,title:"Token Details"})}),a.jsx(Re,{dashed:!0}),t.isPending?a.jsx(M,{flex:"column",center:"both",expand:!0,children:a.jsx(ke,{size:"lg",color:"secondaryText"})}):i?a.jsxs(M,{flex:"column",gap:"md",px:"md",py:"lg",children:[a.jsxs(M,{flex:"row",style:{justifyContent:"space-between",alignItems:"center"},children:[a.jsx(k,{size:"sm",color:"secondaryText",children:"Name"}),a.jsxs(M,{flex:"row",gap:"xxs",center:"y",children:[a.jsx(He,{src:i.iconUri||"",client:e.client,width:A.sm,height:A.sm,style:{borderRadius:G.full},fallback:a.jsx(M,{style:{background:`linear-gradient(45deg, white, ${n.colors.accentText})`,borderRadius:G.full,width:`${A.sm}px`,height:`${A.sm}px`}})}),a.jsx(k,{size:"sm",color:"primaryText",weight:500,style:{maxWidth:"200px",whiteSpace:"nowrap"},children:i.name})]})]}),a.jsx(Wa,{label:"Symbol",value:i.symbol}),"prices"in i&&a.jsx(Wa,{label:"Price",value:i.prices[e.currency]?Gr(e.currency,i.prices[e.currency]):"N/A"}),!!i.marketCapUsd&&a.jsx(Wa,{label:"Market Cap",value:Gr(e.currency,i.marketCapUsd)}),!!i.volume24hUsd&&a.jsx(Wa,{label:"Volume (24h)",value:Gr(e.currency,i.volume24hUsd)}),a.jsxs(M,{flex:"row",style:{justifyContent:"space-between",alignItems:"center"},children:[a.jsx(k,{size:"sm",color:"secondaryText",children:"Contract Address"}),a.jsxs(M,{flex:"row",gap:"3xs",center:"y",children:[!r&&a.jsx(Jo,{text:e.tokenAddress,iconSize:13,tip:"Copy Address"}),a.jsx(_r,{href:o,target:"_blank",rel:"noreferrer",color:"accentText",hoverColor:"primaryText",weight:500,size:"sm",children:r?"Native Currency":ln(e.tokenAddress)})]})]})]}):a.jsx(M,{flex:"column",center:"both",expand:!0,children:a.jsx(k,{size:"sm",color:"secondaryText",children:"Token not found"})})]})}function Wa(e){return a.jsxs(M,{flex:"row",style:{justifyContent:"space-between",alignItems:"center"},children:[a.jsx(k,{size:"sm",color:"secondaryText",children:e.label}),a.jsx(k,{size:"sm",color:"primaryText",weight:500,style:{maxWidth:"200px",whiteSpace:"nowrap"},children:e.value})]})}function If(e){const[n,t]=y.useState(null),i=!e.isFetching&&e.otherTokens.length===0&&e.ownedTokens.length===0;return n?a.jsx(lj,{tokenAddress:n.tokenAddress,chainId:n.chainId,client:e.client,onBack:()=>t(null),currency:e.currency}):a.jsxs(M,{fullHeight:!0,flex:"column",children:[a.jsxs(M,{px:"md",pt:"md+",children:[a.jsx(k,{size:"lg",weight:600,color:"primaryText",trackingTight:!0,children:"Select Token"}),a.jsx(U,{y:"3xs"}),a.jsx(k,{size:"sm",color:"secondaryText",multiline:!0,style:{textWrap:"pretty"},children:"Select a token from the list or use the search"})]}),!e.selectedChain&&a.jsx(M,{flex:"column",center:"both",expand:!0,style:{minHeight:"300px"},children:a.jsx(ke,{color:"secondaryText",size:"lg"})}),e.selectedChain&&a.jsxs(a.Fragment,{children:[e.isMobile?a.jsx(M,{p:"md",children:a.jsx(XC,{onClick:e.onSelectChain,selectedChain:e.selectedChain,client:e.client})}):a.jsx(U,{y:"md"}),a.jsx(M,{px:"md",children:a.jsx(vp,{value:e.search,onChange:e.setSearch,placeholder:"Search by token or address",autoFocus:!e.isMobile})}),a.jsx(U,{y:"xs"}),a.jsxs(M,{pb:"md",px:"md",expand:!0,gap:"xxs",flex:"column",style:{minHeight:"300px",maxHeight:e.isMobile?"450px":"none",overflowY:"auto",scrollbarWidth:"none",paddingBottom:P.md},children:[e.isFetching&&new Array(20).fill(0).map((r,o)=>a.jsx(cj,{},o)),!e.isFetching&&e.ownedTokens.length>0&&a.jsxs(M,{px:"xs",py:"xs",flex:"row",gap:"xs",center:"y",color:"secondaryText",children:[a.jsx(Lp,{size:"14"}),a.jsx(k,{size:"sm",color:"secondaryText",style:{overflow:"unset"},children:"Your Tokens"})]}),!e.isFetching&&e.ownedTokens.map(r=>a.jsx(Mf,{token:r,client:e.client,onSelect:e.onSelectToken,onInfoClick:(o,s)=>t({tokenAddress:o,chainId:s}),isSelected:!!e.selectedToken&&e.selectedToken.tokenAddress.toLowerCase()===r.token_address.toLowerCase()&&r.chain_id===e.selectedToken.chainId},r.token_address)),!e.isFetching&&e.ownedTokens.length>0&&a.jsxs(M,{px:"xs",py:"xs",flex:"row",gap:"xs",center:"y",color:"secondaryText",style:{marginTop:P.sm},children:[a.jsx(Il,{size:"14"}),a.jsx(k,{size:"sm",color:"secondaryText",style:{overflow:"unset"},children:"Other Tokens"})]}),!e.isFetching&&e.otherTokens.map(r=>a.jsx(Mf,{token:r,client:e.client,onSelect:e.onSelectToken,onInfoClick:(o,s)=>t({tokenAddress:o,chainId:s}),isSelected:!!e.selectedToken&&e.selectedToken.tokenAddress.toLowerCase()===r.address.toLowerCase()&&r.chainId===e.selectedToken.chainId},r.address)),e.showMore&&a.jsxs(ae,{variant:"outline",fullWidth:!0,style:{borderRadius:G.full},gap:"xs",onClick:()=>{var r;(r=e.showMore)==null||r.call(e)},children:[a.jsx(al,{width:A.sm,height:A.sm}),"Load More"]}),i&&a.jsx("div",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:a.jsx(k,{size:"sm",color:"secondaryText",children:"No Tokens Found"})})]})]})]})}const uj=Se(e=>{const n=X();return{display:"flex",flexDirection:"column",overflowY:"auto",...wa,borderRight:`1px solid ${n.colors.separatorLine}`,position:"relative"}});function dj(e){var p,_,x,I,b,j,C,E,T,O,L,N,v,D,z,V;const n=X(),t=qC(),i=e.receiverAddress??((p=t==null?void 0:t.activeAccount)==null?void 0:p.address),[r,o]=y.useState(!1),[s,c]=y.useState(!1),l=e.receiverAddress&&yr(e.receiverAddress)&&((_=t==null?void 0:t.activeAccount)!=null&&_.address?mc(e.receiverAddress)!==mc((x=t==null?void 0:t.activeAccount)==null?void 0:x.address):!0),h=HC({tokenAddress:(I=e.selectedToken)==null?void 0:I.tokenAddress,chainId:(b=e.selectedToken)==null?void 0:b.chainId,client:e.client}),d=((j=h.data)==null?void 0:j.type)==="success"?h.data.token:void 0,f=QC({chainId:(C=e.selectedToken)==null?void 0:C.chainId,tokenAddress:(E=e.selectedToken)==null?void 0:E.tokenAddress,client:e.client,walletAddress:(T=t==null?void 0:t.activeAccount)==null?void 0:T.address}),m=l?"Pay":"Buy",g=Ep(),w=!e.receiverAddress&&!t;return a.jsxs(ZC,{client:e.client,title:e.metadata.title,description:e.metadata.description,image:e.metadata.image,children:[r&&a.jsx(Y5,{client:e.client,locale:T0,detailsModal:{hideBuyFunds:!0},theme:e.theme,closeModal:()=>{o(!1)},onDisconnect:()=>{var R;(R=e.onDisconnect)==null||R.call(e)},chains:[],connectOptions:e.connectOptions}),a.jsx(Ml,{hide:!1,className:"tw-modal__buy-widget",size:g?"compact":"wide",title:"Select Token",open:s,crossContainerStyles:{right:P.md,top:P["md+"],transform:"none"},setOpen:R=>c(R),autoFocusCrossIcon:!1,children:a.jsx(sj,{type:"buy",currency:e.currency,selections:{buyChainId:(O=e.selectedToken)==null?void 0:O.chainId,sellChainId:void 0},activeWalletInfo:t,onClose:()=>c(!1),client:e.client,selectedToken:e.selectedToken,setSelectedToken:R=>{e.setSelectedToken(R),c(!1)}})}),a.jsxs(M,{flex:"column",children:[a.jsx(hj,{title:m,presetOptions:e.presetOptions,amountSelection:e.amountSelection,setAmount:e.setAmountSelection,activeWalletInfo:t,selectedToken:e.selectedToken?{data:((L=h.data)==null?void 0:L.type)==="success"?h.data.token:void 0,isFetching:h.isFetching,isError:h.isError||((N=h.data)==null?void 0:N.type)==="unsupported_token"}:void 0,balance:{data:f.data,isFetching:f.isFetching},client:e.client,isConnected:!!t,onSelectToken:()=>{c(!0)},onWalletClick:()=>{o(!0)},currency:e.currency,amountEditable:e.amountEditable,tokenEditable:e.tokenEditable}),i&&l&&a.jsxs(a.Fragment,{children:[a.jsx(mj,{}),a.jsx(fj,{address:i,client:e.client})]})]}),a.jsx(U,{y:"md"}),(h.isError||((v=h.data)==null?void 0:v.type)==="unsupported_token")&&a.jsx("div",{style:{border:`1px solid ${n.colors.borderColor}`,borderRadius:G.full,padding:P.xs,marginBottom:P.md},children:a.jsx(k,{size:"sm",color:"danger",center:!0,children:"Failed to fetch token details"})}),w?a.jsx(F5,{client:e.client,connectButton:{label:e.buttonLabel||m,style:{width:"100%",borderRadius:G.full}},theme:n,...e.connectOptions,autoConnect:!1,wallets:((D=e.connectOptions)==null?void 0:D.wallets)||Wb({appMetadata:(z=e.connectOptions)==null?void 0:z.appMetadata,chains:(V=e.connectOptions)==null?void 0:V.chains})}):a.jsx(ae,{disabled:!i,fullWidth:!0,onClick:()=>{if(!i||!d)return;const R=d.prices[e.currency],{tokenValue:B}=Ap(e.amountSelection,R);B&&e.onContinue(String(B),d,xe(i))},style:{fontSize:ie.md,borderRadius:G.full},variant:"primary",children:e.buttonLabel||m}),e.showThirdwebBranding?a.jsxs("div",{children:[a.jsx(U,{y:"md"}),a.jsx(ml,{link:"https://playground.thirdweb.com/payments/fund-wallet"})]}):a.jsx(U,{y:"xxs"}),a.jsx(U,{y:"md"})]})}function Ap(e,n){const t=e.type==="usd"?e.value:n?n*Number(e.value):void 0,i=e.type==="token"?e.value:n?Number(e.value)/n:void 0;return{fiatValue:t,tokenValue:i}}function hj(e){var c,l,h,d,f;const n=X(),i=ej({chainId:(l=(c=e.selectedToken)==null?void 0:c.data)==null?void 0:l.chainId,client:e.client}).data,r=(d=(h=e.selectedToken)==null?void 0:h.data)==null?void 0:d.prices[e.currency],{fiatValue:o,tokenValue:s}=Ap(e.amountSelection,r);return a.jsxs(Dp,{header:a.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[a.jsx(M,{flex:"row",center:"y",gap:"3xs",color:"secondaryText",children:a.jsx(k,{size:"xs",color:"primaryText",style:{letterSpacing:"0.07em",textTransform:"uppercase"},children:e.title})}),e.activeWalletInfo&&a.jsx(WC,{activeWalletInfo:e.activeWalletInfo,client:e.client,onClick:e.onWalletClick})]}),children:[a.jsx(FC,{selectedToken:e.selectedToken,client:e.client,onSelectToken:e.onSelectToken,chain:i,disabled:e.tokenEditable===!1}),a.jsxs(M,{px:"md",py:"md",children:[a.jsx(_f,{value:s?String(s):"",setValue:m=>{e.setAmount({type:"token",value:m})},disabled:e.amountEditable===!1,style:{border:"none",boxShadow:"none",fontSize:ie.xl,fontWeight:500,paddingInline:0,paddingBlock:0,letterSpacing:"-0.025em"}}),a.jsx(U,{y:"xs"}),a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"2px"},children:[a.jsx(k,{size:"md",color:"secondaryText",style:{flexShrink:0},children:Cd(e.currency)}),(f=e.selectedToken)!=null&&f.isFetching?a.jsx(ge,{width:"120px",height:"20px",style:{transform:"translateX(4px)"}}):a.jsx(_f,{value:String(o||0),setValue:m=>{e.setAmount({type:"usd",value:m})},disabled:e.amountEditable===!1,style:{border:"none",boxShadow:"none",fontSize:ie.md,fontWeight:400,color:n.colors.secondaryText,paddingInline:0,height:"20px",paddingBlock:0}})]}),e.amountEditable&&a.jsxs(a.Fragment,{children:[a.jsx(U,{y:"md"}),a.jsx(M,{flex:"row",gap:"xxs",children:e.presetOptions.map(m=>{var g;return a.jsxs(ae,{disabled:!((g=e.selectedToken)!=null&&g.data)||e.amountEditable===!1,onClick:()=>e.setAmount({type:"usd",value:String(m)}),style:{backgroundColor:"transparent",color:n.colors.secondaryText,fontSize:ie.xs,fontWeight:400,borderRadius:G.full,gap:"0.5px",padding:`${P.xxs} ${P.sm}`},variant:"outline",children:[a.jsx("span",{children:Cd(e.currency)}),a.jsx("span",{children:m})]},m)})})]})]}),e.isConnected&&e.selectedToken&&a.jsx(M,{px:"md",py:"md",style:{borderTop:`1px dashed ${n.colors.borderColor}`,justifyContent:"start"},children:a.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:"3px"},children:[a.jsx(k,{size:"xs",color:"secondaryText",children:"Current Balance"}),e.balance.data===void 0?a.jsx(ge,{height:ie.xs,width:"100px"}):a.jsxs(k,{size:"xs",color:"primaryText",children:[Dt(e.balance.data.value,e.balance.data.decimals,5)," ",e.balance.data.symbol]})]})})]})}function fj(e){const n=z2({address:e.address,client:e.client});return a.jsx(Dp,{header:a.jsx(k,{size:"xs",color:"primaryText",style:{letterSpacing:"0.07em",textTransform:"uppercase"},children:"To"}),children:a.jsxs(M,{px:"md",py:"md",flex:"row",center:"y",gap:"xs",color:"secondaryText",children:[a.jsx(Lp,{size:A.xs,color:"secondaryText"}),a.jsx(k,{size:"sm",color:"primaryText",children:n.data||ln(e.address)}),a.jsx(Jo,{text:e.address,tip:"Copy address",iconSize:14})]})})}function Dp(e){const n=X();return a.jsxs(M,{style:{borderRadius:G.xl,borderWidth:1,borderStyle:"solid",position:"relative",overflow:"hidden"},borderColor:"borderColor",children:[a.jsx(M,{bg:"tertiaryBg",style:{position:"absolute",inset:0,opacity:.5,zIndex:0}}),a.jsx(M,{style:{position:"relative",zIndex:1},children:a.jsx(M,{px:"md",py:"sm",relative:!0,children:e.header})}),a.jsx(M,{bg:"tertiaryBg",style:{position:"relative",overflow:"hidden",borderRadius:G.xl,borderTop:`1px solid ${n.colors.borderColor}`},children:e.children})]})}function mj(){return a.jsx("div",{style:{display:"flex",justifyContent:"center",marginBlock:"-13px",zIndex:2,position:"relative"},children:a.jsx(M,{p:"xs",center:"both",flex:"row",color:"primaryText",bg:"modalBg",borderColor:"borderColor",style:{borderRadius:G.full,borderWidth:1,borderStyle:"solid"},children:a.jsx(eb,{width:A["sm+"],height:A["sm+"]})})})}function gj(e){var i,r,o,s,c,l,h,d,f;const n=y.useRef(!1);y.useEffect(()=>{var m;n.current||(n.current=!0,an({client:e.client,event:"ub:ui:buy_widget:render",toChainId:(m=e.chain)==null?void 0:m.id,toToken:e.tokenAddress}))},[e.client,(i=e.chain)==null?void 0:i.id,e.tokenAddress]);const t=y.useMemo(()=>{var m;return e.showThirdwebBranding===!1?{...e.connectOptions,connectModal:{...(m=e.connectOptions)==null?void 0:m.connectModal,showThirdwebBranding:!1}}:e.connectOptions},[e.connectOptions,e.showThirdwebBranding]);return a.jsxs(pj,{theme:e.theme,className:e.className,style:e.style,children:[((r=e.connectOptions)==null?void 0:r.autoConnect)!==!1&&a.jsx(ly,{client:e.client,wallets:(o=e.connectOptions)==null?void 0:o.wallets,timeout:typeof((s=e.connectOptions)==null?void 0:s.autoConnect)=="object"?(l=(c=e.connectOptions)==null?void 0:c.autoConnect)==null?void 0:l.timeout:void 0,appMetadata:(h=e.connectOptions)==null?void 0:h.appMetadata,accountAbstraction:(d=e.connectOptions)==null?void 0:d.accountAbstraction,chain:(f=e.connectOptions)==null?void 0:f.chain}),a.jsx(yj,{...e,theme:e.theme||"dark",currency:e.currency||"USD",paymentMethods:e.paymentMethods||["crypto","card"],presetOptions:e.presetOptions||[5,10,20],connectOptions:t,showThirdwebBranding:e.showThirdwebBranding===void 0?!0:e.showThirdwebBranding})]})}function yj(e){const[n,t]=y.useState({id:"1:buy-ui"}),i=y.useCallback((f,m)=>{var g,w;console.error(f),(m==null?void 0:m.type)==="buy"||(m==null?void 0:m.type)==="onramp"?(g=e.onError)==null||g.call(e,f,m):(w=e.onError)==null||w.call(e,f,void 0),t({id:"error",preparedQuote:m,error:f})},[e.onError]),r=y.useCallback(f=>{var m,g;(f==null?void 0:f.type)==="buy"||(f==null?void 0:f.type)==="onramp"?(m=e.onCancel)==null||m.call(e,f):(g=e.onCancel)==null||g.call(e,void 0)},[e.onCancel]),[o,s]=y.useState({type:"token",value:e.amount??""}),[c,l]=y.useState(()=>{var f;if((f=e.chain)!=null&&f.id)return{chainId:e.chain.id,tokenAddress:e.tokenAddress||Gt}}),h=e.amountEditable===void 0?!0:e.amountEditable,d=e.tokenEditable===void 0?!0:e.tokenEditable;return n.id==="1:buy-ui"?a.jsx(dj,{theme:e.theme,onDisconnect:e.onDisconnect,client:e.client,connectOptions:e.connectOptions,onContinue:(f,m,g)=>{an({client:e.client,event:"payment_selection",toChainId:m.chainId,toToken:m.address}),t({id:"2:methodSelection",destinationAmount:f,destinationToken:m,receiverAddress:g})},presetOptions:e.presetOptions,receiverAddress:e.receiverAddress,showThirdwebBranding:e.showThirdwebBranding,metadata:{title:e.title,description:e.description,image:e.image},buttonLabel:e.buttonLabel,currency:e.currency,selectedToken:c,setSelectedToken:l,amountSelection:o,setAmountSelection:s,amountEditable:h,tokenEditable:d}):n.id==="2:methodSelection"?a.jsx(K8,{client:e.client,connectLocale:T0,connectOptions:e.connectOptions,paymentMethods:e.paymentMethods,currency:e.currency,supportedTokens:e.supportedTokens,country:e.country,destinationToken:n.destinationToken,destinationAmount:n.destinationAmount,receiverAddress:n.receiverAddress,feePayer:void 0,onBack:()=>{t({id:"1:buy-ui"})},onError:f=>{i(f,void 0)},onPaymentMethodSelected:f=>{an({chainId:f.type==="wallet"?f.originToken.chainId:void 0,client:e.client,event:"ub:ui:loading_quote:fund_wallet",fromToken:f.type==="wallet"?f.originToken.address:void 0,toChainId:n.destinationToken.chainId,toToken:n.destinationToken.address}),t({...n,id:"3:load-quote",paymentMethod:f})}}):n.id==="3:load-quote"?a.jsx(y7,{paymentLinkId:e.paymentLinkId,purchaseData:e.purchaseData,client:e.client,sender:void 0,mode:"fund_wallet",feePayer:void 0,amount:n.destinationAmount,destinationToken:n.destinationToken,onBack:()=>{t({...n,id:"2:methodSelection"})},onError:f=>{i(f,void 0)},onQuoteReceived:(f,m)=>{var g,w,p;an({chainId:f.type==="transfer"||f.type==="onramp"?f.intent.chainId:f.intent.originChainId,client:e.client,event:"payment_details",fromToken:f.type==="transfer"||f.type==="onramp"?f.intent.tokenAddress:f.intent.originTokenAddress,toChainId:f.type==="transfer"||f.type==="onramp"?f.intent.chainId:f.intent.destinationChainId,toToken:f.type==="transfer"||f.type==="onramp"?f.intent.tokenAddress:f.intent.destinationTokenAddress,walletAddress:(w=(g=n.paymentMethod.payerWallet)==null?void 0:g.getAccount())==null?void 0:w.address,walletType:(p=n.paymentMethod.payerWallet)==null?void 0:p.id}),t({...n,id:"4:preview",preparedQuote:f,request:m})},paymentMethod:n.paymentMethod,receiver:n.receiverAddress}):n.id==="4:preview"?a.jsx(W8,{client:e.client,currency:e.currency,metadata:{title:e.title,description:e.description},confirmButtonLabel:void 0,onBack:()=>{t({...n,id:"2:methodSelection"})},onConfirm:()=>{t({...n,id:"5:execute"})},onError:f=>{i(f,n.preparedQuote)},paymentMethod:n.paymentMethod,preparedQuote:n.preparedQuote,modeInfo:{mode:"fund_wallet"}}):n.id==="5:execute"?a.jsx(M7,{client:e.client,title:void 0,preparedQuote:n.preparedQuote,autoStart:!0,onBack:()=>{t({...n,id:"4:preview"})},onCancel:()=>{r(n.preparedQuote)},onComplete:f=>{var m;(n.preparedQuote.type==="buy"||n.preparedQuote.type==="onramp")&&((m=e.onSuccess)==null||m.call(e,{quote:n.preparedQuote,statuses:f})),t({id:"6:success",preparedQuote:n.preparedQuote,completedStatuses:f})},request:n.request,wallet:n.paymentMethod.payerWallet,windowAdapter:Y1}):n.id==="6:success"?a.jsx(m7,{type:"payment-success",client:e.client,hasPaymentId:!!e.paymentLinkId,completedStatuses:n.completedStatuses,onDone:()=>{t({id:"1:buy-ui"})},preparedQuote:n.preparedQuote,showContinueWithTx:!1,windowAdapter:Y1}):n.id==="error"?a.jsx(_8,{client:e.client,error:n.error,onCancel:()=>{t({id:"1:buy-ui"}),r(n.preparedQuote)},onRetry:()=>{t({id:"1:buy-ui"})}}):null}function pj(e){return a.jsx(e0,{theme:e.theme||"dark",children:a.jsx(g8,{className:e.className,modalSize:"compact",style:e.style,children:a.jsx(uy,{children:e.children})})})}const A0=Se({backgroundColor:"#00d395",borderRadius:"50%",bottom:0,boxShadow:"0 0 0 2px var(--bg)",height:"28%",position:"absolute",right:0,width:"28%"}),wj=e=>{const n=X();return a.jsx("div",{style:{alignItems:"center",border:`1px solid ${n.colors.borderColor}`,borderRadius:"100%",display:"flex",flexShrink:0,justifyItems:"center",overflow:"hidden",padding:e.padding??"6px",position:"relative",...e.style},children:e.children})};function Ac({formatFn:e,...n}){const{address:t}=ya(),i=e?e(t):t;return a.jsx("span",{...n,children:i})}function So({chain:e,tokenAddress:n,loadingComponent:t,fallbackComponent:i,queryOptions:r,formatFn:o,showBalanceInFiat:s,...c}){const{address:l,client:h}=ya(),d=lt(),f=e||d,m=pe({queryFn:async()=>VC({address:xe(l),chain:f,client:h,showBalanceInFiat:s,tokenAddress:n?xe(n):void 0}),queryKey:["internal_account_balance",(f==null?void 0:f.id)||-1,l,{tokenAddress:n},s],retry:!1,...r});return m.isLoading?t||null:m.data?o?a.jsx("span",{...c,children:o(m.data)}):s?a.jsx("span",{...c,children:E0({...m.data,decimals:0})}):a.jsx("span",{...c,children:Sc({...m.data,decimals:m.data.balance<1?3:2})}):i||null}const Op=y.createContext(void 0);function kp(e){return a.jsx(Op.Provider,{value:e,children:e.children})}function zp(){const e=y.useContext(Op);if(!e)throw new Error("ChainProviderContext not found. Make sure you are using ChainName, ChainIcon, etc. inside a <ChainProvider /> component");return e}function Pp({iconResolver:e,loadingComponent:n,fallbackComponent:t,queryOptions:i,client:r,...o}){const{chain:s}=zp(),c=pe({queryFn:async()=>_j({chain:s,client:r,iconResolver:e}),queryKey:xj({chainId:s.id,iconResolver:e}),...i});return c.isLoading?n||null:c.data?a.jsx("img",{src:c.data,...o,alt:o.alt}):t||null}async function _j(e){var o;const{chain:n,client:t,iconResolver:i}=e;if(typeof i=="string")return i;if(typeof i=="function")return i();if((o=n.icon)!=null&&o.url)return gr({client:t,uri:n.icon.url});const r=await Zt(n).then(s=>{var c;return(c=s.icon)==null?void 0:c.url}).catch(()=>{});if(!r)throw new Error("Failed to resolve icon for chain");return gr({client:t,uri:r})}function xj(e){const{chainId:n,iconResolver:t}=e;return["_internal_chain_icon_",n,{resolver:typeof t=="string"?t:typeof t=="function"?C2(t):void 0}]}function jd({nameResolver:e,formatFn:n,loadingComponent:t,fallbackComponent:i,queryOptions:r,...o}){const{chain:s}=zp(),c=pe({queryFn:async()=>Mj({chain:s,nameResolver:e}),queryKey:Ij({chainId:s.id,nameResolver:e}),...r});if(c.isLoading)return t||null;if(!c.data)return i||null;const l=n?n(c.data):c.data;return a.jsx("span",{...o,children:l})}async function Mj(e){const{nameResolver:n,chain:t}=e;return typeof n=="string"?n:typeof n=="function"?n():t.name?t.name:Zt(t).then(i=>i.name)}function Ij(e){return typeof e.nameResolver=="function"?["_internal_chain_name_",e.chainId,{resolver:C2(e.nameResolver)}]:["_internal_chain_name_",e.chainId]}const bj=({size:e})=>a.jsxs("svg",{fill:"none",height:e,role:"presentation",viewBox:"0 0 16 16",width:e,xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("path",{d:"M14.001 8.00048C14.001 9.18726 13.649 10.3474 12.9897 11.3342C12.3304 12.3209 11.3932 13.09 10.2968 13.5442C9.20032 13.9984 7.99382 14.1172 6.82984 13.8857C5.66587 13.6541 4.59668 13.0826 3.7575 12.2435C2.91832 11.4043 2.34683 10.3351 2.1153 9.17111C1.88377 8.00713 2.0026 6.80064 2.45676 5.70419C2.91092 4.60775 3.68002 3.6706 4.66679 3.01126C5.65357 2.35192 6.8137 2 8.00048 2",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.2001"}),a.jsx("path",{d:"M14.0005 2L8 8.00048",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.2001"}),a.jsx("path",{d:"M10.3984 2H13.9987V5.60029",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.2001"})]}),bn=Ti(e=>{const n=X();return{all:"unset","&:hover":{backgroundColor:n.colors.tertiaryBg,svg:{color:n.colors.accentText}},"&[data-variant='danger']:hover svg":{color:`${n.colors.danger}!important`},"&[data-variant='primary']:hover svg":{color:`${n.colors.primaryText}!important`},"&[disabled]":{cursor:"not-allowed"},alignItems:"center",backgroundColor:"transparent",borderRadius:G.md,boxSizing:"border-box",color:n.colors.secondaryText,cursor:"pointer",display:"flex",fontSize:ie.md,fontWeight:500,gap:P.sm,lineHeight:1.3,padding:`${P.sm} ${P.sm}`,svg:{color:n.colors.secondaryText,transition:"color 200ms ease"},transition:"background-color 200ms ease, transform 200ms ease",WebkitTapHighlightColor:"transparent",width:"100%"}}),Cj=bn.withComponent("a");function ji(e){return Array.isArray?Array.isArray(e):Up(e)==="[object Array]"}function jj(e){if(typeof e=="string")return e;let n=e+"";return n=="0"&&1/e==-1/0?"-0":n}function Lj(e){return e==null?"":jj(e)}function Jn(e){return typeof e=="string"}function Rp(e){return typeof e=="number"}function Ej(e){return e===!0||e===!1||Tj(e)&&Up(e)=="[object Boolean]"}function Vp(e){return typeof e=="object"}function Tj(e){return Vp(e)&&e!==null}function nn(e){return e!=null}function cu(e){return!e.trim().length}function Up(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const vj="Incorrect 'index' type",Nj=e=>`Invalid value for key ${e}`,Sj=e=>`Pattern length exceeds max of ${e}.`,Aj=e=>`Missing ${e} property in key`,Dj=e=>`Property 'weight' in key '${e}' must be a positive integer`,bf=Object.prototype.hasOwnProperty;class Oj{constructor(n){this._keys=[],this._keyMap={};let t=0;n.forEach(i=>{let r=Bp(i);this._keys.push(r),this._keyMap[r.id]=r,t+=r.weight}),this._keys.forEach(i=>{i.weight/=t})}get(n){return this._keyMap[n]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Bp(e){let n=null,t=null,i=null,r=1,o=null;if(Jn(e)||ji(e))i=e,n=Cf(e),t=Ld(e);else{if(!bf.call(e,"name"))throw new Error(Aj("name"));const s=e.name;if(i=s,bf.call(e,"weight")&&(r=e.weight,r<=0))throw new Error(Dj(s));n=Cf(s),t=Ld(s),o=e.getFn}return{path:n,id:t,weight:r,src:i,getFn:o}}function Cf(e){return ji(e)?e:e.split(".")}function Ld(e){return ji(e)?e.join("."):e}function kj(e,n){let t=[],i=!1;const r=(o,s,c)=>{if(nn(o))if(!s[c])t.push(o);else{let l=s[c];const h=o[l];if(!nn(h))return;if(c===s.length-1&&(Jn(h)||Rp(h)||Ej(h)))t.push(Lj(h));else if(ji(h)){i=!0;for(let d=0,f=h.length;d<f;d+=1)r(h[d],s,c+1)}else s.length&&r(h,s,c+1)}};return r(e,Jn(n)?n.split("."):n,0),i?t:t[0]}const zj={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},Pj={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,n)=>e.score===n.score?e.idx<n.idx?-1:1:e.score<n.score?-1:1},Rj={location:0,threshold:.6,distance:100},Vj={useExtendedSearch:!1,getFn:kj,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var ye={...Pj,...zj,...Rj,...Vj};const Uj=/[^ ]+/g;function Bj(e=1,n=3){const t=new Map,i=Math.pow(10,n);return{get(r){const o=r.match(Uj).length;if(t.has(o))return t.get(o);const s=1/Math.pow(o,.5*e),c=parseFloat(Math.round(s*i)/i);return t.set(o,c),c},clear(){t.clear()}}}class D0{constructor({getFn:n=ye.getFn,fieldNormWeight:t=ye.fieldNormWeight}={}){this.norm=Bj(t,3),this.getFn=n,this.isCreated=!1,this.setIndexRecords()}setSources(n=[]){this.docs=n}setIndexRecords(n=[]){this.records=n}setKeys(n=[]){this.keys=n,this._keysMap={},n.forEach((t,i)=>{this._keysMap[t.id]=i})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Jn(this.docs[0])?this.docs.forEach((n,t)=>{this._addString(n,t)}):this.docs.forEach((n,t)=>{this._addObject(n,t)}),this.norm.clear())}add(n){const t=this.size();Jn(n)?this._addString(n,t):this._addObject(n,t)}removeAt(n){this.records.splice(n,1);for(let t=n,i=this.size();t<i;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(n,t){return n[this._keysMap[t]]}size(){return this.records.length}_addString(n,t){if(!nn(n)||cu(n))return;let i={v:n,i:t,n:this.norm.get(n)};this.records.push(i)}_addObject(n,t){let i={i:t,$:{}};this.keys.forEach((r,o)=>{let s=r.getFn?r.getFn(n):this.getFn(n,r.path);if(nn(s)){if(ji(s)){let c=[];const l=[{nestedArrIndex:-1,value:s}];for(;l.length;){const{nestedArrIndex:h,value:d}=l.pop();if(nn(d))if(Jn(d)&&!cu(d)){let f={v:d,i:h,n:this.norm.get(d)};c.push(f)}else ji(d)&&d.forEach((f,m)=>{l.push({nestedArrIndex:m,value:f})})}i.$[o]=c}else if(Jn(s)&&!cu(s)){let c={v:s,n:this.norm.get(s)};i.$[o]=c}}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function Wp(e,n,{getFn:t=ye.getFn,fieldNormWeight:i=ye.fieldNormWeight}={}){const r=new D0({getFn:t,fieldNormWeight:i});return r.setKeys(e.map(Bp)),r.setSources(n),r.create(),r}function Wj(e,{getFn:n=ye.getFn,fieldNormWeight:t=ye.fieldNormWeight}={}){const{keys:i,records:r}=e,o=new D0({getFn:n,fieldNormWeight:t});return o.setKeys(i),o.setIndexRecords(r),o}function $a(e,{errors:n=0,currentLocation:t=0,expectedLocation:i=0,distance:r=ye.distance,ignoreLocation:o=ye.ignoreLocation}={}){const s=n/e.length;if(o)return s;const c=Math.abs(i-t);return r?s+c/r:c?1:s}function $j(e=[],n=ye.minMatchCharLength){let t=[],i=-1,r=-1,o=0;for(let s=e.length;o<s;o+=1){let c=e[o];c&&i===-1?i=o:!c&&i!==-1&&(r=o-1,r-i+1>=n&&t.push([i,r]),i=-1)}return e[o-1]&&o-i>=n&&t.push([i,o-1]),t}const Ar=32;function Yj(e,n,t,{location:i=ye.location,distance:r=ye.distance,threshold:o=ye.threshold,findAllMatches:s=ye.findAllMatches,minMatchCharLength:c=ye.minMatchCharLength,includeMatches:l=ye.includeMatches,ignoreLocation:h=ye.ignoreLocation}={}){if(n.length>Ar)throw new Error(Sj(Ar));const d=n.length,f=e.length,m=Math.max(0,Math.min(i,f));let g=o,w=m;const p=c>1||l,_=p?Array(f):[];let x;for(;(x=e.indexOf(n,w))>-1;){let T=$a(n,{currentLocation:x,expectedLocation:m,distance:r,ignoreLocation:h});if(g=Math.min(T,g),w=x+d,p){let O=0;for(;O<d;)_[x+O]=1,O+=1}}w=-1;let I=[],b=1,j=d+f;const C=1<<d-1;for(let T=0;T<d;T+=1){let O=0,L=j;for(;O<L;)$a(n,{errors:T,currentLocation:m+L,expectedLocation:m,distance:r,ignoreLocation:h})<=g?O=L:j=L,L=Math.floor((j-O)/2+O);j=L;let N=Math.max(1,m-L+1),v=s?f:Math.min(m+L,f)+d,D=Array(v+2);D[v+1]=(1<<T)-1;for(let V=v;V>=N;V-=1){let R=V-1,B=t[e.charAt(R)];if(p&&(_[R]=+!!B),D[V]=(D[V+1]<<1|1)&B,T&&(D[V]|=(I[V+1]|I[V])<<1|1|I[V+1]),D[V]&C&&(b=$a(n,{errors:T,currentLocation:R,expectedLocation:m,distance:r,ignoreLocation:h}),b<=g)){if(g=b,w=R,w<=m)break;N=Math.max(1,2*m-w)}}if($a(n,{errors:T+1,currentLocation:m,expectedLocation:m,distance:r,ignoreLocation:h})>g)break;I=D}const E={isMatch:w>=0,score:Math.max(.001,b)};if(p){const T=$j(_,c);T.length?l&&(E.indices=T):E.isMatch=!1}return E}function Fj(e){let n={};for(let t=0,i=e.length;t<i;t+=1){const r=e.charAt(t);n[r]=(n[r]||0)|1<<i-t-1}return n}const Dc=String.prototype.normalize?e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,""):e=>e;class $p{constructor(n,{location:t=ye.location,threshold:i=ye.threshold,distance:r=ye.distance,includeMatches:o=ye.includeMatches,findAllMatches:s=ye.findAllMatches,minMatchCharLength:c=ye.minMatchCharLength,isCaseSensitive:l=ye.isCaseSensitive,ignoreDiacritics:h=ye.ignoreDiacritics,ignoreLocation:d=ye.ignoreLocation}={}){if(this.options={location:t,threshold:i,distance:r,includeMatches:o,findAllMatches:s,minMatchCharLength:c,isCaseSensitive:l,ignoreDiacritics:h,ignoreLocation:d},n=l?n:n.toLowerCase(),n=h?Dc(n):n,this.pattern=n,this.chunks=[],!this.pattern.length)return;const f=(g,w)=>{this.chunks.push({pattern:g,alphabet:Fj(g),startIndex:w})},m=this.pattern.length;if(m>Ar){let g=0;const w=m%Ar,p=m-w;for(;g<p;)f(this.pattern.substr(g,Ar),g),g+=Ar;if(w){const _=m-Ar;f(this.pattern.substr(_),_)}}else f(this.pattern,0)}searchIn(n){const{isCaseSensitive:t,ignoreDiacritics:i,includeMatches:r}=this.options;if(n=t?n:n.toLowerCase(),n=i?Dc(n):n,this.pattern===n){let p={isMatch:!0,score:0};return r&&(p.indices=[[0,n.length-1]]),p}const{location:o,distance:s,threshold:c,findAllMatches:l,minMatchCharLength:h,ignoreLocation:d}=this.options;let f=[],m=0,g=!1;this.chunks.forEach(({pattern:p,alphabet:_,startIndex:x})=>{const{isMatch:I,score:b,indices:j}=Yj(n,p,_,{location:o+x,distance:s,threshold:c,findAllMatches:l,minMatchCharLength:h,includeMatches:r,ignoreLocation:d});I&&(g=!0),m+=b,I&&j&&(f=[...f,...j])});let w={isMatch:g,score:g?m/this.chunks.length:1};return g&&r&&(w.indices=f),w}}class jr{constructor(n){this.pattern=n}static isMultiMatch(n){return jf(n,this.multiRegex)}static isSingleMatch(n){return jf(n,this.singleRegex)}search(){}}function jf(e,n){const t=e.match(n);return t?t[1]:null}class Qj extends jr{constructor(n){super(n)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(n){const t=n===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class Hj extends jr{constructor(n){super(n)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(n){const i=n.indexOf(this.pattern)===-1;return{isMatch:i,score:i?0:1,indices:[0,n.length-1]}}}class Zj extends jr{constructor(n){super(n)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(n){const t=n.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class Gj extends jr{constructor(n){super(n)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(n){const t=!n.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,n.length-1]}}}class qj extends jr{constructor(n){super(n)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(n){const t=n.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[n.length-this.pattern.length,n.length-1]}}}class Kj extends jr{constructor(n){super(n)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(n){const t=!n.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,n.length-1]}}}class Yp extends jr{constructor(n,{location:t=ye.location,threshold:i=ye.threshold,distance:r=ye.distance,includeMatches:o=ye.includeMatches,findAllMatches:s=ye.findAllMatches,minMatchCharLength:c=ye.minMatchCharLength,isCaseSensitive:l=ye.isCaseSensitive,ignoreDiacritics:h=ye.ignoreDiacritics,ignoreLocation:d=ye.ignoreLocation}={}){super(n),this._bitapSearch=new $p(n,{location:t,threshold:i,distance:r,includeMatches:o,findAllMatches:s,minMatchCharLength:c,isCaseSensitive:l,ignoreDiacritics:h,ignoreLocation:d})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(n){return this._bitapSearch.searchIn(n)}}class Fp extends jr{constructor(n){super(n)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(n){let t=0,i;const r=[],o=this.pattern.length;for(;(i=n.indexOf(this.pattern,t))>-1;)t=i+o,r.push([i,t-1]);const s=!!r.length;return{isMatch:s,score:s?0:1,indices:r}}}const Ed=[Qj,Fp,Zj,Gj,Kj,qj,Hj,Yp],Lf=Ed.length,Jj=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Xj="|";function eL(e,n={}){return e.split(Xj).map(t=>{let i=t.trim().split(Jj).filter(o=>o&&!!o.trim()),r=[];for(let o=0,s=i.length;o<s;o+=1){const c=i[o];let l=!1,h=-1;for(;!l&&++h<Lf;){const d=Ed[h];let f=d.isMultiMatch(c);f&&(r.push(new d(f,n)),l=!0)}if(!l)for(h=-1;++h<Lf;){const d=Ed[h];let f=d.isSingleMatch(c);if(f){r.push(new d(f,n));break}}}return r})}const tL=new Set([Yp.type,Fp.type]);class nL{constructor(n,{isCaseSensitive:t=ye.isCaseSensitive,ignoreDiacritics:i=ye.ignoreDiacritics,includeMatches:r=ye.includeMatches,minMatchCharLength:o=ye.minMatchCharLength,ignoreLocation:s=ye.ignoreLocation,findAllMatches:c=ye.findAllMatches,location:l=ye.location,threshold:h=ye.threshold,distance:d=ye.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:i,includeMatches:r,minMatchCharLength:o,findAllMatches:c,ignoreLocation:s,location:l,threshold:h,distance:d},n=t?n:n.toLowerCase(),n=i?Dc(n):n,this.pattern=n,this.query=eL(this.pattern,this.options)}static condition(n,t){return t.useExtendedSearch}searchIn(n){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:i,isCaseSensitive:r,ignoreDiacritics:o}=this.options;n=r?n:n.toLowerCase(),n=o?Dc(n):n;let s=0,c=[],l=0;for(let h=0,d=t.length;h<d;h+=1){const f=t[h];c.length=0,s=0;for(let m=0,g=f.length;m<g;m+=1){const w=f[m],{isMatch:p,indices:_,score:x}=w.search(n);if(p){if(s+=1,l+=x,i){const I=w.constructor.type;tL.has(I)?c=[...c,..._]:c.push(_)}}else{l=0,s=0,c.length=0;break}}if(s){let m={isMatch:!0,score:l/s};return i&&(m.indices=c),m}}return{isMatch:!1,score:1}}}const Td=[];function iL(...e){Td.push(...e)}function vd(e,n){for(let t=0,i=Td.length;t<i;t+=1){let r=Td[t];if(r.condition(e,n))return new r(e,n)}return new $p(e,n)}const Oc={AND:"$and",OR:"$or"},Nd={PATH:"$path",PATTERN:"$val"},Sd=e=>!!(e[Oc.AND]||e[Oc.OR]),rL=e=>!!e[Nd.PATH],oL=e=>!ji(e)&&Vp(e)&&!Sd(e),Ef=e=>({[Oc.AND]:Object.keys(e).map(n=>({[n]:e[n]}))});function Qp(e,n,{auto:t=!0}={}){const i=r=>{let o=Object.keys(r);const s=rL(r);if(!s&&o.length>1&&!Sd(r))return i(Ef(r));if(oL(r)){const l=s?r[Nd.PATH]:o[0],h=s?r[Nd.PATTERN]:r[l];if(!Jn(h))throw new Error(Nj(l));const d={keyId:Ld(l),pattern:h};return t&&(d.searcher=vd(h,n)),d}let c={children:[],operator:o[0]};return o.forEach(l=>{const h=r[l];ji(h)&&h.forEach(d=>{c.children.push(i(d))})}),c};return Sd(e)||(e=Ef(e)),i(e)}function sL(e,{ignoreFieldNorm:n=ye.ignoreFieldNorm}){e.forEach(t=>{let i=1;t.matches.forEach(({key:r,norm:o,score:s})=>{const c=r?r.weight:null;i*=Math.pow(s===0&&c?Number.EPSILON:s,(c||1)*(n?1:o))}),t.score=i})}function aL(e,n){const t=e.matches;n.matches=[],nn(t)&&t.forEach(i=>{if(!nn(i.indices)||!i.indices.length)return;const{indices:r,value:o}=i;let s={indices:r,value:o};i.key&&(s.key=i.key.src),i.idx>-1&&(s.refIndex=i.idx),n.matches.push(s)})}function cL(e,n){n.score=e.score}function lL(e,n,{includeMatches:t=ye.includeMatches,includeScore:i=ye.includeScore}={}){const r=[];return t&&r.push(aL),i&&r.push(cL),e.map(o=>{const{idx:s}=o,c={item:n[s],refIndex:s};return r.length&&r.forEach(l=>{l(o,c)}),c})}class fo{constructor(n,t={},i){this.options={...ye,...t},this.options.useExtendedSearch,this._keyStore=new Oj(this.options.keys),this.setCollection(n,i)}setCollection(n,t){if(this._docs=n,t&&!(t instanceof D0))throw new Error(vj);this._myIndex=t||Wp(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(n){nn(n)&&(this._docs.push(n),this._myIndex.add(n))}remove(n=()=>!1){const t=[];for(let i=0,r=this._docs.length;i<r;i+=1){const o=this._docs[i];n(o,i)&&(this.removeAt(i),i-=1,r-=1,t.push(o))}return t}removeAt(n){this._docs.splice(n,1),this._myIndex.removeAt(n)}getIndex(){return this._myIndex}search(n,{limit:t=-1}={}){const{includeMatches:i,includeScore:r,shouldSort:o,sortFn:s,ignoreFieldNorm:c}=this.options;let l=Jn(n)?Jn(this._docs[0])?this._searchStringList(n):this._searchObjectList(n):this._searchLogical(n);return sL(l,{ignoreFieldNorm:c}),o&&l.sort(s),Rp(t)&&t>-1&&(l=l.slice(0,t)),lL(l,this._docs,{includeMatches:i,includeScore:r})}_searchStringList(n){const t=vd(n,this.options),{records:i}=this._myIndex,r=[];return i.forEach(({v:o,i:s,n:c})=>{if(!nn(o))return;const{isMatch:l,score:h,indices:d}=t.searchIn(o);l&&r.push({item:o,idx:s,matches:[{score:h,value:o,norm:c,indices:d}]})}),r}_searchLogical(n){const t=Qp(n,this.options),i=(c,l,h)=>{if(!c.children){const{keyId:f,searcher:m}=c,g=this._findMatches({key:this._keyStore.get(f),value:this._myIndex.getValueForItemAtKeyId(l,f),searcher:m});return g&&g.length?[{idx:h,item:l,matches:g}]:[]}const d=[];for(let f=0,m=c.children.length;f<m;f+=1){const g=c.children[f],w=i(g,l,h);if(w.length)d.push(...w);else if(c.operator===Oc.AND)return[]}return d},r=this._myIndex.records,o={},s=[];return r.forEach(({$:c,i:l})=>{if(nn(c)){let h=i(t,c,l);h.length&&(o[l]||(o[l]={idx:l,item:c,matches:[]},s.push(o[l])),h.forEach(({matches:d})=>{o[l].matches.push(...d)}))}}),s}_searchObjectList(n){const t=vd(n,this.options),{keys:i,records:r}=this._myIndex,o=[];return r.forEach(({$:s,i:c})=>{if(!nn(s))return;let l=[];i.forEach((h,d)=>{l.push(...this._findMatches({key:h,value:s[d],searcher:t}))}),l.length&&o.push({idx:c,item:s,matches:l})}),o}_findMatches({key:n,value:t,searcher:i}){if(!nn(t))return[];let r=[];if(ji(t))t.forEach(({v:o,i:s,n:c})=>{if(!nn(o))return;const{isMatch:l,score:h,indices:d}=i.searchIn(o);l&&r.push({score:h,key:n,value:o,idx:s,norm:c,indices:d})});else{const{v:o,n:s}=t,{isMatch:c,score:l,indices:h}=i.searchIn(o);c&&r.push({score:l,key:n,value:o,norm:s,indices:h})}return r}}fo.version="7.1.0";fo.createIndex=Wp;fo.parseIndex=Wj;fo.config=ye;fo.parseQuery=Qp;iL(nL);function Hp(e,n){const[t,i]=y.useState(e),r=y.useCallback(o=>{if(!o)return;new IntersectionObserver(c=>{var l;(l=c[0])!=null&&l.isIntersecting&&i(h=>h+n)},{threshold:1}).observe(o)},[n]);return{itemsToShow:t,lastItemRef:r}}function Zp(e){var T,O,L,N;const n=e.connectLocale.networkSelector,[t,i]=y.useState(""),[r,o]=y.useState("all"),s=yl(t,300),{onSwitch:c,onCustomClick:l}=e.networkSelector||{},h=n.categoryLabel.others,d=n.categoryLabel.popular,f=n.categoryLabel.recentlyUsed,{chainSections:m,allChains:g,allChainsToSectionMap:w}=y.useMemo(()=>{var B,Y,$,W;const v=[],D=[],z=new Map;function V(F,Q){z.set(F.id,Q),D.push(F)}if((B=e.networkSelector)!=null&&B.sections)for(const F of e.networkSelector.sections){const Q=F.chains.filter(Z=>!z.has(Z.id));if(Q.length>0){v.push({chains:Q,label:F.label});for(const Z of Q)V(Z,F.label)}}else{const F=new Map(e.chains.map(Q=>[Q.id,Q]));if((Y=e.networkSelector)!=null&&Y.recentChainIds&&(($=e.networkSelector)==null?void 0:$.recentChainIds.length)>0){const Q=e.networkSelector.recentChainIds.map(Z=>F.get(Z)).filter(Z=>Z!==void 0);v.push({chains:Q,label:f});for(const Z of Q)V(Z,f)}if((W=e.networkSelector)!=null&&W.popularChainIds&&e.networkSelector.popularChainIds.length>0){const Z=e.networkSelector.popularChainIds.map(ne=>F.get(ne)).filter(ne=>ne!==void 0).filter(ne=>!z.has(ne.id));if(Z.length>0){v.push({chains:Z,label:d});for(const ne of Z)V(ne,d)}}}const R=e.chains.filter(F=>!z.has(F.id));if(R.length>0){v.push({chains:R,label:h});for(const F of R)V(F,h)}return{allChains:D,allChainsToSectionMap:z,chainSections:v}},[(T=e.networkSelector)==null?void 0:T.sections,(O=e.networkSelector)==null?void 0:O.recentChainIds,(L=e.networkSelector)==null?void 0:L.popularChainIds,e.chains,f,d,h]),p=g.every(v=>!!v.name),_=E2(p?[]:g,10),x=p?!1:_.some(v=>v.isLoading),I=p?g:x?[]:_.filter(v=>!!v.data).map(v=>Hc(v.data)),b=y.useMemo(()=>new fo(I,{keys:[{name:"name",weight:1},{name:"chainId",weight:1}],threshold:.4}),[I]),j=y.useMemo(()=>{if(s==="")return;const v=[],D=b.search(s).map(z=>z.item);for(const z of D){const V=w.get(z.id);if(!V)return;const R=v.find(B=>B.label===V);R?R.chains.push(z):v.push({chains:[z],label:V})}return v},[s,b,w])||m,C=y.useMemo(()=>r==="all"?j:j.map(v=>({chains:v.chains.filter(D=>r==="mainnet"&&!D.testnet||r==="testnet"&&D.testnet),label:v.label})),[j,r]),E=y.useCallback(v=>{c&&c(v),e.closeModal()},[c,e]);return a.jsxs(M,{className:e.className,children:[a.jsx(M,{p:"lg",children:e.onBack?a.jsx(_e,{onBack:e.onBack,title:n.title}):a.jsx(cl,{children:n.title})}),e.showTabs!==!1&&a.jsxs(a.Fragment,{children:[a.jsx(M,{px:"lg",children:a.jsxs(M,{flex:"row",gap:"xxs",children:[a.jsx(lu,{"data-active":r==="all",onClick:()=>o("all"),children:n.allNetworks}),a.jsx(lu,{"data-active":r==="mainnet",onClick:()=>o("mainnet"),children:n.mainnets}),a.jsx(lu,{"data-active":r==="testnet",onClick:()=>o("testnet"),children:n.testnets})]})}),a.jsx(U,{y:"lg"})]}),e.showTabs===!1&&a.jsx(U,{y:"xxs"}),a.jsx(M,{px:"lg",children:a.jsxs("div",{style:{alignItems:"center",display:"flex",position:"relative"},children:[a.jsx(gL,{height:A.md,width:A.md}),a.jsx(xr,{disabled:x,onChange:v=>{i(v.target.value)},placeholder:x?"Loading chains...":n.inputPlaceholder,style:{padding:`${P.sm} ${P.md} ${P.sm} ${P.xxl}`},tabIndex:-1,value:t,variant:"outline"}),(s!==t||x)&&a.jsx("div",{style:{position:"absolute",right:P.md},children:a.jsx(ke,{color:"accentText",size:"md"})})]})}),a.jsx(U,{y:"lg"}),a.jsx(M,{px:"md",children:a.jsx(uL,{chainSections:C,client:e.client,close:e.closeModal,connectLocale:e.connectLocale,onSwitch:E,renderChain:(N=e.networkSelector)==null?void 0:N.renderChain})}),l&&a.jsxs(a.Fragment,{children:[a.jsx(Re,{}),a.jsx(M,{p:"lg",children:a.jsx(ae,{fullWidth:!0,onClick:()=>{l(),e.closeModal()},style:{boxShadow:"none",display:"flex",fontSize:ie.sm},variant:"link",children:n.addCustomNetwork})})]})]})}const uL=e=>{const{chainSections:n}=e,t=n.every(i=>i.chains.length===0);return a.jsx(M,{animate:"fadein",scrollY:!0,style:{height:"330px",paddingBottom:P.lg},children:t?a.jsxs(M,{center:"both",color:"secondaryText",flex:"column",gap:"md",children:[a.jsx(U,{y:"xl"}),a.jsx(Cr,{height:A.xl,width:A.xl}),a.jsx(k,{children:" No Results "})]}):n.map((i,r)=>i.chains.length===0?null:a.jsxs(y.Fragment,{children:[r!==0&&a.jsx(U,{y:"lg"}),a.jsx(hL,{children:i.label}),a.jsx(U,{y:"xs"}),a.jsx(dL,{chains:i.chains,client:e.client,close:e.close,connectLocale:e.connectLocale,onSwitch:e.onSwitch,renderChain:e.renderChain})]},i.label))})},dL=y.memo(function(n){const{itemsToShow:t,lastItemRef:i}=Hp(10,10),r=A2(),o=lt(),[s,c]=y.useState(-1),[l,h]=y.useState(-1),d=n.close;y.useEffect(()=>{s!==-1&&(o==null?void 0:o.id)===s&&d&&d()},[s,d,o==null?void 0:o.id]);const f=async w=>{h(-1),c(w.id);try{await r(w),n.onSwitch(w)}catch(p){h(w.id),console.error(p)}finally{c(-1)}},m=n.renderChain,g=n.chains.slice(0,t);return a.jsx(fL,{children:g.map((w,p)=>{if(!w)return null;const _=s===w.id,x=l===w.id,I=p===g.length-1;return a.jsx("li",{ref:I?i:void 0,children:m?a.jsx(m,{chain:w,close:n.close,switchChain:()=>{f(w)},switchFailed:l===w.id,switching:s===w.id}):a.jsx(Gp,{chain:w,client:n.client,confirming:_,connectLocale:n.connectLocale,onClick:()=>f(w),switchingFailed:x})},w.id)})})}),Gp=y.memo(function(n){const t=n.connectLocale,{chain:i,confirming:r,switchingFailed:o}=n,s=lt();return a.jsx(kp,{chain:i,children:a.jsxs(mL,{"data-active":(s==null?void 0:s.id)===i.id,onClick:n.onClick,children:[a.jsxs(M,{style:{alignItems:"center",display:"flex",flexShrink:0,position:"relative"},children:[a.jsx(Pp,{client:n.client,fallbackComponent:a.jsx("img",{alt:"",src:Mr,style:{height:`${A.lg}px`,width:`${A.lg}px`}}),loading:"lazy",loadingComponent:a.jsx(ge,{height:`${A.lg}px`,width:`${A.lg}px`}),style:{height:`${A.lg}px`,width:`${A.lg}px`}}),(s==null?void 0:s.id)===i.id&&a.jsx(A0,{className:"tw-chain-active-dot-button-network-selector"})]}),r||o?a.jsxs(M,{flex:"column",gap:"3xs",style:{alignItems:"flex-start",width:"100%"},children:[a.jsx(jd,{loadingComponent:a.jsx(ge,{height:"20px",width:"150px"})}),a.jsxs(M,{animate:"fadein",center:"y",flex:"row",gap:"xxs",children:[r&&a.jsxs(a.Fragment,{children:[a.jsx(k,{color:"accentText",size:"xs",children:t.switchingNetwork}),a.jsx(ke,{color:"accentText",size:"xs"})]}),o&&a.jsx(M,{animate:"fadein",children:a.jsx(k,{color:"danger",size:"xs",children:t.networkSelector.failedToSwitch})})]})]}):a.jsx(jd,{className:"tw-chain-icon-none-confirming",loadingComponent:a.jsx(ge,{height:"20px",width:"150px"})})]})})}),lu=ze.button(e=>{const n=X();return{all:"unset","&[data-active='true']":{background:n.colors.secondaryButtonBg,color:n.colors.primaryText},borderRadius:G.lg,color:n.colors.secondaryText,cursor:"pointer",fontSize:ie.sm,fontWeight:500,padding:`${P.sm} ${P.sm}`,transition:"background 0.2s ease, color 0.2s ease",WebkitTapHighlightColor:"transparent"}}),hL=qI(()=>({color:X().colors.secondaryText,display:"block",fontSize:ie.sm,margin:0,padding:`0 ${P.xs}`})),fL=B2({boxSizing:"border-box",display:"flex",flexDirection:"column",gap:P.xs,listStyle:"none",margin:0,padding:0}),mL=Ti(e=>{const n=X();return{"&:hover":{background:n.colors.secondaryButtonBg},all:"unset",alignItems:"center",borderRadius:G.md,boxSizing:"border-box",color:n.colors.primaryText,cursor:"pointer",display:"flex",fontSize:ie.md,fontWeight:500,gap:P.md,padding:`${P.xs} ${P.sm}`,transition:"background 0.2s ease",width:"100%",[Fh.mobile]:{fontSize:ie.sm}}}),gL=ze(t0)(e=>({color:X().colors.secondaryText,left:P.sm,position:"absolute"}));function yL(e){var s;const[n,t]=y.useState("wallets"),i=co(),r=S2(),o=!e.showAllWallets&&((s=e.wallets)==null?void 0:s.every(c=>i.includes(c)));return n==="connect"?a.jsx(Ey,{...e,isEmbed:!1,onSelect:c=>{r(c),e.onBack()}}):a.jsxs(M,{children:[a.jsx(M,{p:"lg",children:a.jsx(_e,{onBack:e.onBack,title:"Wallets"})}),a.jsx(Re,{}),a.jsx(U,{y:"md"}),a.jsx(M,{px:"md",style:{minHeight:"150px"},children:a.jsx(M,{flex:"column",gap:"xs",children:i.filter(c=>{var l;return!((l=e.hiddenWallets)!=null&&l.includes(c.id))}).map(c=>a.jsx(pL,{chain:e.activeChain,client:e.client,onClick:()=>{r(c),e.onBack()},wallet:c},c.id))})}),a.jsx(U,{y:"xxl"}),a.jsx(M,{p:"lg",children:!o&&a.jsxs(ae,{fullWidth:!0,gap:"xs",onClick:()=>{t("connect")},variant:"accent",children:[a.jsx(al,{height:A.sm,width:A.sm}),"Connect Wallet"]})})]})}function pL(e){var c;const n=X(),t=ut(),{disconnect:i}=ol(),r=e.wallet.id,o=(c=e.wallet.getAccount())==null?void 0:c.address,s=il({address:o,chain:e.chain,client:e.client});return a.jsxs("div",{style:{position:"relative"},children:[a.jsx(f0,{onClick:e.onClick,style:{justifyContent:"space-between"},children:a.jsxs(M,{center:"y",flex:"row",gap:"md",children:[a.jsx(Vn,{client:e.client,id:r,size:A.lg}),a.jsxs(M,{flex:"column",gap:"4xs",children:[a.jsx(k,{color:"primaryText",children:ln(o||"")}),s.data?a.jsx(k,{color:"secondaryText",size:"xs",weight:400,children:Hs(s.data)}):a.jsx(ge,{height:ie.sm,width:"100px"})]})]})}),a.jsx("div",{style:{position:"absolute",right:P.xxs,top:"50%",transform:"translateY(-50%)",zIndex:1},children:(t==null?void 0:t.id)===e.wallet.id?a.jsx(vc,{tip:"Active Wallet",children:a.jsx(bi,{children:a.jsx(ls,{height:A.md,width:A.md})})}):a.jsx(vc,{tip:"Disconnect",children:a.jsx(bi,{onClick:()=>{i(e.wallet)},children:a.jsx(Ib,{height:A.md,style:{color:n.colors.secondaryText},width:A.md})})})})]})}function wL(){const e=co(),n=Ei();return Ys({mutationFn:async({client:t,profileToUnlink:i,allowAccountDeletion:r=!1})=>{var c;const o=e.find(l=>De(l)),s=o?{id:o.id,partnerId:(c=o.getConfig())==null?void 0:c.partnerId}:void 0;await h3({allowAccountDeletion:r,client:t,ecosystem:s,profileToUnlink:i})},onSuccess:()=>{n.invalidateQueries({queryKey:["profiles"]})}})}const _L=e=>a.jsx("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 24 24",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M12 15.5H7.5C6.10444 15.5 5.40665 15.5 4.83886 15.6722C3.56045 16.06 2.56004 17.0605 2.17224 18.3389C2 18.9067 2 19.6044 2 21M19 21V15M16 18H22M14.5 7.5C14.5 9.98528 12.4853 12 10 12C7.51472 12 5.5 9.98528 5.5 7.5C5.5 5.01472 7.51472 3 10 3C12.4853 3 14.5 5.01472 14.5 7.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})});function xL(e){switch(!0){case(e.type==="email"&&e.details.email!==void 0):return e.details.email;case(e.type==="google"&&e.details.email!==void 0):return e.details.email;case(e.type==="phone"&&e.details.phone!==void 0):return e.details.phone;case e.details.address!==void 0:return ln(e.details.address,6);case(e.type==="cognito"&&e.details.email!==void 0):return e.details.email;case e.type.toLowerCase()==="custom_auth_endpoint":return"Custom Profile";default:return e.type.slice(0,1).toUpperCase()+e.type.slice(1)}}function ML(e){const{data:n,isLoading:t}=Cy({client:e.client});return t?a.jsx(ct,{}):a.jsxs(M,{style:{minHeight:"300px"},children:[a.jsx(M,{p:"lg",children:a.jsx(_e,{onBack:e.onBack,title:e.locale.manageWallet.linkedProfiles})}),a.jsx(Re,{}),a.jsxs(M,{scrollY:!0,style:{height:"300px"},children:[a.jsx(U,{y:"md"}),a.jsxs(M,{px:"sm",children:[a.jsxs(bn,{onClick:()=>{e.setScreen("link-profile")},style:{fontSize:ie.sm},children:[a.jsx(_L,{size:A.lg}),a.jsx(k,{color:"primaryText",children:e.locale.manageWallet.linkProfile})]}),a.jsx(U,{y:"xs"}),n==null?void 0:n.filter(i=>i.type.toLowerCase()!=="guest"&&i.type.toLowerCase()!=="custom_jwt"&&i.type.toLowerCase()!=="custom_auth_endpoint").map(i=>a.jsx(IL,{client:e.client,enableUnlinking:n.length>1,profile:i},`${JSON.stringify(i)}`))]}),a.jsx(U,{y:"md"})]})]})}function IL({profile:e,enableUnlinking:n,client:t}){var s,c,l;const{data:i}=fI({address:e.details.address,client:t}),{mutate:r,isPending:o}=wL();return a.jsxs(bn,{as:"div",disabled:!0,style:{cursor:"default",fontSize:ie.sm},children:[i!=null&&i.some(h=>h.avatar)?a.jsx(He,{client:t,height:A.lg,loading:"eager",src:(s=i==null?void 0:i.find(h=>h.avatar))==null?void 0:s.avatar,style:{borderRadius:"100%"},width:A.lg}):e.details.address!==void 0?a.jsx(M,{style:{borderRadius:"100%",height:"32px",overflow:"hidden",width:"32px"},children:a.jsx(Tp,{address:e.details.address,size:32})}):e.type==="passkey"?a.jsx(ho,{size:A.lg}):e.type==="email"?a.jsx(ul,{size:A.lg}):e.type==="phone"?a.jsx(dl,{size:A.lg}):a.jsx(He,{client:t,height:A.lg,loading:"eager",src:e2(e.type),width:A.lg}),a.jsxs("div",{style:{alignItems:"center",display:"flex",flexDirection:"row",flexGrow:1,justifyContent:"space-between"},children:[a.jsx(k,{color:"primaryText",children:((c=i==null?void 0:i.find(h=>h.avatar))==null?void 0:c.name)||xL(e)}),a.jsxs("div",{style:{alignItems:"center",display:"flex",flexDirection:"row",gap:"8px"},children:[((l=i==null?void 0:i.find(h=>h.avatar))==null?void 0:l.name)&&e.details.address&&a.jsx(k,{color:"secondaryText",size:"sm",children:ln(e.details.address,4)}),n&&a.jsx(bi,{"aria-label":"Unlink",autoFocus:!0,disabled:o,onClick:()=>r({client:t,profileToUnlink:e}),style:{pointerEvents:"auto"},type:"button",children:a.jsx(Y2,{height:A.md,style:{color:"inherit"},width:A.md})})]})]})]})}const bL=[{id:"io.1inch.wallet",name:"1inch Wallet",hasMobileSupport:!0},{id:"com.binance.wallet",name:"Binance Wallet",hasMobileSupport:!0},{id:"com.ledger",name:"Ledger Live",hasMobileSupport:!0},{id:"com.bitpay",name:"BitPay Wallet",hasMobileSupport:!0},{id:"com.bestwallet",name:"Best Wallet",hasMobileSupport:!0},{id:"io.metamask",name:"MetaMask",hasMobileSupport:!0},{id:"com.trustwallet.app",name:"Trust Wallet",hasMobileSupport:!0},{id:"com.fireblocks",name:"Fireblocks",hasMobileSupport:!0},{id:"com.bitget.web3",name:"Bitget Wallet",hasMobileSupport:!0},{id:"pro.tokenpocket",name:"TokenPocket",hasMobileSupport:!0},{id:"com.safepal",name:"SafePal",hasMobileSupport:!0},{id:"org.uniswap",name:"Uniswap Wallet",hasMobileSupport:!0},{id:"io.zerion.wallet",name:"Zerion",hasMobileSupport:!0},{id:"com.elrond.maiar.wallet",name:"xPortal",hasMobileSupport:!0},{id:"com.crypto.wallet",name:"Crypto.com Onchain",hasMobileSupport:!0},{id:"com.bitcoin",name:"Bitcoin.com Wallet",hasMobileSupport:!0},{id:"com.bifrostwallet",name:"Bifrost Wallet",hasMobileSupport:!0},{id:"jp.co.rakuten-wallet",name:"Rakuten Wallet",hasMobileSupport:!0},{id:"com.bybit",name:"Bybit Wallet",hasMobileSupport:!0},{id:"com.blockchain.login",name:"Blockchain.com",hasMobileSupport:!0},{id:"io.trezor",name:"Trezor Suite",hasMobileSupport:!0},{id:"im.token",name:"imToken",hasMobileSupport:!0},{id:"global.safe",name:"Safe",hasMobileSupport:!0},{id:"xyz.ctrl",name:"Ctrl Wallet",hasMobileSupport:!0},{id:"co.arculus",name:"Arculus Wallet",hasMobileSupport:!0},{id:"com.roninchain.wallet",name:"Ronin Wallet",hasMobileSupport:!0},{id:"com.okex.wallet",name:"OKX Wallet",hasMobileSupport:!0},{id:"com.wemixplay",name:"WEMIX Play",hasMobileSupport:!0},{id:"com.tangem",name:"Tangem Wallet",hasMobileSupport:!0},{id:"com.exodus",name:"Exodus",hasMobileSupport:!0},{id:"com.hashpack.wallet",name:"HashPack",hasMobileSupport:!0},{id:"id.co.pintu",name:"Pintu",hasMobileSupport:!0},{id:"network.blackfort",name:"BlackFort Wallet",hasMobileSupport:!0},{id:"com.wigwam.wallet",name:"Wigwam",hasMobileSupport:!0},{id:"app.backpack",name:"Backpack",hasMobileSupport:!0},{id:"app.subwallet",name:"SubWallet",hasMobileSupport:!0},{id:"cc.avacus",name:"Avacus",hasMobileSupport:!0},{id:"me.rainbow",name:"Rainbow",hasMobileSupport:!0},{id:"so.onekey.app.wallet",name:"OneKey",hasMobileSupport:!0},{id:"me.haha",name:"HaHa",hasMobileSupport:!0},{id:"com.bee",name:"BeeWallet",hasMobileSupport:!0},{id:"ag.jup",name:"Jupiter",hasMobileSupport:!0},{id:"app.keplr",name:"Keplr",hasMobileSupport:!0},{id:"org.hot-labs",name:"HOT Wallet",hasMobileSupport:!0},{id:"com.dcentwallet",name:"D'CENT Wallet",hasMobileSupport:!0},{id:"com.kraken",name:"Kraken Wallet ",hasMobileSupport:!0},{id:"com.kucoin",name:"KuCoin Web3 Wallet",hasMobileSupport:!0},{id:"io.magiceden.wallet",name:"Magic Eden",hasMobileSupport:!0},{id:"com.tomi",name:"tomi Wallet",hasMobileSupport:!0},{id:"io.ibvm",name:"IBVM Wallet",hasMobileSupport:!0},{id:"com.mewwallet",name:"MEW wallet",hasMobileSupport:!0},{id:"com.socios.app",name:"Socios.com - Wallet & Tokens",hasMobileSupport:!0},{id:"xyz.argent",name:"Argent",hasMobileSupport:!0},{id:"org.thorwallet",name:"THORWallet",hasMobileSupport:!0},{id:"io.internetmoney",name:"Internet Money",hasMobileSupport:!0},{id:"org.mathwallet",name:"MathWallet",hasMobileSupport:!0},{id:"io.cypherhq",name:"Cypher Wallet",hasMobileSupport:!0},{id:"io.novawallet",name:"Nova Wallet",hasMobileSupport:!0},{id:"io.yowallet",name:"YoWallet",hasMobileSupport:!0},{id:"com.flowfoundation.wallet",name:"Flow Wallet",hasMobileSupport:!0},{id:"app.kabila",name:"Kabila Wallet",hasMobileSupport:!0},{id:"com.opera",name:"Opera Crypto Browser",hasMobileSupport:!0},{id:"com.valoraapp",name:"Valora",hasMobileSupport:!0},{id:"com.robinhood.wallet",name:"Robinhood Wallet",hasMobileSupport:!0},{id:"com.chain",name:"Chain",hasMobileSupport:!0},{id:"io.huddln",name:"Huddln",hasMobileSupport:!0},{id:"app.core.extension",name:"Core",hasMobileSupport:!0},{id:"world.freedom",name:"Freedom World",hasMobileSupport:!0},{id:"money.unstoppable",name:"Unstoppable Wallet",hasMobileSupport:!0},{id:"pk.modular",name:"Modular Wallet Prod",hasMobileSupport:!0},{id:"app.wombat",name:"Wombat",hasMobileSupport:!0},{id:"com.klipwallet",name:"klip",hasMobileSupport:!0},{id:"com.gemwallet",name:"Gem Wallet",hasMobileSupport:!0},{id:"com.sabay.wallet",name:"Sabay Wallet App",hasMobileSupport:!0},{id:"com.zengo",name:"Zengo Wallet",hasMobileSupport:!0},{id:"xyz.joeywallet",name:"Joey Wallet",hasMobileSupport:!0},{id:"io.tokoin",name:"Tokoin | My-T Wallet",hasMobileSupport:!0},{id:"io.alpha-u.wallet.web",name:"αU wallet",hasMobileSupport:!0},{id:"network.cvl",name:"CVL Wallet",hasMobileSupport:!0},{id:"io.leapwallet",name:"Leap",hasMobileSupport:!0},{id:"io.xenea",name:"XENEA Wallet",hasMobileSupport:!0},{id:"com.oasys-wallet",name:"Oasys Passport",hasMobileSupport:!0},{id:"com.bitso",name:"Bitso Web3 Wallet",hasMobileSupport:!0},{id:"io.enjin",name:"Enjin Wallet",hasMobileSupport:!0},{id:"com.coldwallet",name:"Cold Wallet",hasMobileSupport:!0},{id:"org.creditcoin.app",name:"Credit Wallet",hasMobileSupport:!0},{id:"app.everspace",name:"Everspace",hasMobileSupport:!0},{id:"app.zeal",name:"Zeal",hasMobileSupport:!0},{id:"app.whitewallet",name:"Whitewallet",hasMobileSupport:!0},{id:"ai.purewallet",name:"PureWallet app",hasMobileSupport:!0},{id:"com.fastex.wallet",name:"Yo Wallet",hasMobileSupport:!0},{id:"io.kriptomat",name:"Kriptomat",hasMobileSupport:!0},{id:"com.ullapay",name:"WOW EARN",hasMobileSupport:!0},{id:"io.atomicwallet",name:"Atomic Wallet",hasMobileSupport:!0},{id:"com.pionewallet",name:"PioneWallet",hasMobileSupport:!0},{id:"io.oxalus",name:"Oxalus Wallet",hasMobileSupport:!0},{id:"xyz.uniultra.wallet",name:"U2U Wallet",hasMobileSupport:!0},{id:"xyz.frontier.wallet",name:"Frontier",hasMobileSupport:!0},{id:"com.coolbitx.cwsapp",name:"CoolWallet",hasMobileSupport:!0},{id:"org.gooddollar",name:"GoodDollar",hasMobileSupport:!0},{id:"com.cakewallet",name:"Cake Wallet",hasMobileSupport:!0},{id:"com.ellipal",name:"ELLIPAL",hasMobileSupport:!0},{id:"app.krystal",name:"Krystal",hasMobileSupport:!0},{id:"com.monarchwallet",name:"Monarch Wallet",hasMobileSupport:!0},{id:"com.burritowallet",name:"Burrito",hasMobileSupport:!0},{id:"co.family.wallet",name:"Family",hasMobileSupport:!0},{id:"com.mtpelerin",name:"Bridge Wallet",hasMobileSupport:!0},{id:"app.keyring",name:"KEYRING PRO",hasMobileSupport:!0},{id:"cc.localtrade.lab",name:"LocalTrade Wallet",hasMobileSupport:!0},{id:"tech.okto",name:"Okto",hasMobileSupport:!0},{id:"com.xcapit",name:"Xcapit",hasMobileSupport:!0},{id:"com.gayawallet",name:"Gaya Wallet",hasMobileSupport:!0},{id:"app.nightly",name:"Nightly",hasMobileSupport:!0},{id:"com.coin98",name:"Coin98 Super Wallet",hasMobileSupport:!0},{id:"xyz.coca",name:"COCA Wallet",hasMobileSupport:!0},{id:"app.linen",name:"Linen",hasMobileSupport:!0},{id:"dev.auroracloud",name:"Aurora Pass",hasMobileSupport:!0},{id:"com.coinomi",name:"Coinomi",hasMobileSupport:!0},{id:"my.mone",name:"mOne superapp",hasMobileSupport:!0},{id:"org.alephium",name:"Alephium Wallet",hasMobileSupport:!0},{id:"com.alicebob",name:"Alicebob Wallet",hasMobileSupport:!0},{id:"io.koalawallet",name:"Koala Wallet",hasMobileSupport:!0},{id:"com.veworld",name:"VeWorld Mobile",hasMobileSupport:!0},{id:"com.withpaper",name:"Paper",hasMobileSupport:!0},{id:"io.noone",name:"Noone Wallet",hasMobileSupport:!0},{id:"network.haqq",name:"HAQQ Wallet",hasMobileSupport:!0},{id:"io.ricewallet",name:"RiceWallet",hasMobileSupport:!0},{id:"me.iopay",name:"ioPay",hasMobileSupport:!0},{id:"app.walletnow",name:"NOW Wallet",hasMobileSupport:!0},{id:"io.okse",name:"Okse Wallet",hasMobileSupport:!0},{id:"network.over",name:"OverFlex",hasMobileSupport:!0},{id:"com.aktionariat",name:"Aktionariat",hasMobileSupport:!0},{id:"com.paybolt",name:"PayBolt",hasMobileSupport:!0},{id:"com.plasma-wallet",name:"Plasma Wallet",hasMobileSupport:!0},{id:"org.bytebank",name:"ByteBank",hasMobileSupport:!0},{id:"io.ethermail",name:"EtherMail",hasMobileSupport:!0},{id:"com.optowallet",name:"Opto Wallet",hasMobileSupport:!0},{id:"finance.openwallet",name:"Open Wallet",hasMobileSupport:!0},{id:"xyz.sequence",name:"Sequence Wallet",hasMobileSupport:!0},{id:"com.foxwallet",name:"FoxWallet",hasMobileSupport:!0},{id:"app.hbwallet",name:"HB WALLET",hasMobileSupport:!0},{id:"it.airgap",name:"AirGap Wallet",hasMobileSupport:!0},{id:"com.holdstation",name:"Holdstation Wallet",hasMobileSupport:!0},{id:"io.universaleverything",name:"UniversalProfiles",hasMobileSupport:!0},{id:"com.abra",name:"Abra Wallet",hasMobileSupport:!0},{id:"org.thepulsewallet",name:"The Pulse Wallet",hasMobileSupport:!0},{id:"com.premanft",name:"PREMA Wallet",hasMobileSupport:!0},{id:"xyz.timelesswallet",name:"Timeless Wallet",hasMobileSupport:!0},{id:"org.bitizen",name:"Bitizen",hasMobileSupport:!0},{id:"app.ultimate",name:"Ultimate",hasMobileSupport:!0},{id:"io.compasswallet",name:"Compass Wallet",hasMobileSupport:!0},{id:"app.fizzwallet",name:"Fizz",hasMobileSupport:!0},{id:"com.xovawallet",name:"Xova",hasMobileSupport:!0},{id:"app.nicegram",name:"Nicegram Wallet",hasMobileSupport:!0},{id:"io.zelcore",name:"Zelcore",hasMobileSupport:!0},{id:"app.freighter",name:"Freighter",hasMobileSupport:!0},{id:"app.stickey",name:"Stickey Wallet",hasMobileSupport:!0},{id:"app.coinstats",name:"CoinStats",hasMobileSupport:!0},{id:"io.harti",name:"HARTi Wallet",hasMobileSupport:!0},{id:"io.dttd",name:"DTTD",hasMobileSupport:!0},{id:"com.tellaw",name:"Tellaw Wallet",hasMobileSupport:!0},{id:"io.klever",name:"Klever Wallet",hasMobileSupport:!0},{id:"com.unstoppabledomains",name:"Unstoppable Domains",hasMobileSupport:!0},{id:"is.callback",name:"Callback",hasMobileSupport:!0},{id:"ai.pundi",name:"Pundi Wallet",hasMobileSupport:!0},{id:"io.summonersarena",name:"SA ASSISTANT",hasMobileSupport:!0},{id:"io.fizen",name:"Fizen Wallet",hasMobileSupport:!0},{id:"fi.pillar",name:"Pillar",hasMobileSupport:!0},{id:"world.ixo",name:"Impact Wallet",hasMobileSupport:!0},{id:"org.thetatoken",name:"Theta Wallet",hasMobileSupport:!0},{id:"net.gateweb3",name:"GateWallet",hasMobileSupport:!0},{id:"app.ammer",name:"Ammer Wallet",hasMobileSupport:!0},{id:"us.binance",name:"Binance.US",hasMobileSupport:!0},{id:"io.yusetoken",name:"Yuse Wallet",hasMobileSupport:!0},{id:"co.muza",name:"MUZA",hasMobileSupport:!0},{id:"io.hyperpay",name:"HyperPay",hasMobileSupport:!0},{id:"io.cosmostation",name:"Cosmostation",hasMobileSupport:!0},{id:"app.ryipay",name:"RYIPAY",hasMobileSupport:!0},{id:"io.wallet3",name:"Wallet 3",hasMobileSupport:!0},{id:"org.dota168",name:"MetaWallet",hasMobileSupport:!0},{id:"com.bitpie",name:"Bitpie",hasMobileSupport:!0},{id:"com.coininn",name:"Coininn Wallet",hasMobileSupport:!0},{id:"me.easy",name:"EASY",hasMobileSupport:!0},{id:"io.shido",name:"Shido App",hasMobileSupport:!0},{id:"com.neonwallet",name:"Neon Wallet",hasMobileSupport:!0},{id:"com.secuxtech",name:"SecuX",hasMobileSupport:!0},{id:"com.unitywallet",name:"Unity Wallet",hasMobileSupport:!0},{id:"io.miraiapp",name:"Mirai App",hasMobileSupport:!0},{id:"com.beexo",name:"Beexo",hasMobileSupport:!0},{id:"social.halo",name:"Halo Wallet",hasMobileSupport:!0},{id:"com.gemspocket",name:"Gems Pocket",hasMobileSupport:!0},{id:"app.status",name:"Status",hasMobileSupport:!0},{id:"com.midoin",name:"midoin",hasMobileSupport:!0},{id:"id.competence",name:"Competence.id",hasMobileSupport:!0},{id:"com.safemoon",name:"SafeMoon",hasMobileSupport:!0},{id:"llc.besc",name:"BeanBag",hasMobileSupport:!0},{id:"baby.smart",name:"Smart.Baby",hasMobileSupport:!0},{id:"app.onto",name:"ONTO",hasMobileSupport:!0},{id:"com.ivirse",name:"IApp",hasMobileSupport:!0},{id:"one.mixin.messenger",name:"Mixin Messenger",hasMobileSupport:!0},{id:"cash.abpay",name:"AB Pay",hasMobileSupport:!0},{id:"ch.dssecurity",name:"DS Security SA",hasMobileSupport:!0},{id:"com.concordium.wallet",name:"Concordium",hasMobileSupport:!0},{id:"io.zkape",name:"Ape Wallet",hasMobileSupport:!0},{id:"com.paliwallet",name:"Pali Wallet",hasMobileSupport:!0},{id:"io.pitaka",name:"Pitaka",hasMobileSupport:!0},{id:"com.saitamatoken",name:"SaitaPro",hasMobileSupport:!0},{id:"org.mugambo",name:"rss wallet",hasMobileSupport:!0},{id:"fi.stablez",name:"Stablez",hasMobileSupport:!0},{id:"io.legacynetwork",name:"Legacy Wallet",hasMobileSupport:!0},{id:"com.meld.app",name:"MELDapp",hasMobileSupport:!0},{id:"io.bladewallet",name:"Blade Wallet",hasMobileSupport:!0},{id:"com.authentrend",name:"AT.Wallet",hasMobileSupport:!0},{id:"com.webauth",name:"WebAuth",hasMobileSupport:!0},{id:"xyz.tucop",name:"TuCOP Wallet",hasMobileSupport:!0},{id:"pro.fintoken",name:"FINTOKEN",hasMobileSupport:!0},{id:"io.nash",name:"Nash",hasMobileSupport:!0},{id:"vc.uincubator.api",name:"UIIC",hasMobileSupport:!0},{id:"io.unagi.unawallet",name:"una Wallet",hasMobileSupport:!0},{id:"io.nonbank",name:"NonBank",hasMobileSupport:!0},{id:"io.armana.portal",name:"Armana Portal",hasMobileSupport:!0},{id:"com.x9wallet",name:"X9Wallet",hasMobileSupport:!0},{id:"io.kigo",name:"Kigo",hasMobileSupport:!0},{id:"com.alphawallet",name:"AlphaWallet",hasMobileSupport:!0},{id:"com.getcogni",name:"Cogni ",hasMobileSupport:!0},{id:"app.sinum",name:"Sinum",hasMobileSupport:!0},{id:"finance.soulswap.app",name:"SoulSwap",hasMobileSupport:!0},{id:"io.loopring.wallet",name:"Loopring",hasMobileSupport:!0},{id:"com.shapeshift",name:"ShapeShift",hasMobileSupport:!0},{id:"io.trinity-tech",name:"Essentials",hasMobileSupport:!0},{id:"money.keychain",name:"Keychain",hasMobileSupport:!0},{id:"com.superhero.cordova",name:"Superhero Wallet",hasMobileSupport:!0},{id:"com.bettatrade",name:"Bettatrade",hasMobileSupport:!0},{id:"online.puzzle",name:"Puzzle Wallet",hasMobileSupport:!0},{id:"gg.indi",name:"IndiGG",hasMobileSupport:!0},{id:"io.tradestrike",name:"StrikeX Wallet",hasMobileSupport:!0},{id:"xyz.echooo",name:"Echooo Wallet",hasMobileSupport:!0},{id:"com.kryptogo",name:"KryptoGO Wallet",hasMobileSupport:!0},{id:"io.trustasset",name:"Trust Asset Wallet",hasMobileSupport:!0},{id:"app.utorg",name:"UTORG",hasMobileSupport:!0},{id:"app.dfinnwallet",name:"Dfinn Wallet",hasMobileSupport:!0},{id:"org.rezor",name:"Rezor",hasMobileSupport:!0},{id:"io.legionnetwork",name:"LegionNetwork",hasMobileSupport:!0},{id:"cc.maxwallet",name:"MaxWallet",hasMobileSupport:!0},{id:"com.ripio",name:"Ripio Portal",hasMobileSupport:!0},{id:"com.fxwallet",name:"FxWallet",hasMobileSupport:!0},{id:"inc.tomo",name:"Tomo Wallet",hasMobileSupport:!0},{id:"me.komet.app",name:"Komet",hasMobileSupport:!0},{id:"io.guardiianwallet",name:"GUARDIIAN Wallet",hasMobileSupport:!0},{id:"io.hacken.hai",name:"hAI by Hacken",hasMobileSupport:!0},{id:"com.zypto",name:"Zypto",hasMobileSupport:!0},{id:"io.nabox",name:"Nabox",hasMobileSupport:!0},{id:"com.tastycrypto",name:"tastycrypto",hasMobileSupport:!0},{id:"com.ballet",name:"Ballet Crypto",hasMobileSupport:!0},{id:"io.talken",name:"Talken Wallet",hasMobileSupport:!0},{id:"io.wallacy",name:"Wallacy",hasMobileSupport:!0},{id:"network.mrhb",name:"Sahal Wallet",hasMobileSupport:!0},{id:"io.pockie",name:"pockie",hasMobileSupport:!0},{id:"me.astrox",name:"Me Wallet",hasMobileSupport:!0},{id:"com.thirdweb",name:"thirdweb",hasMobileSupport:!0},{id:"com.poolsmobility.wallet",name:"poolswallet",hasMobileSupport:!0},{id:"xyz.roam.wallet",name:"Roam",hasMobileSupport:!0},{id:"app.gamic",name:"Gamic",hasMobileSupport:!0},{id:"app.m1nty",name:"M1NTY",hasMobileSupport:!0},{id:"network.trustkeys",name:"TrustKeys Web3 SocialFi",hasMobileSupport:!0},{id:"com.caesiumlab",name:"Caesium",hasMobileSupport:!0},{id:"app.catecoin",name:"Catecoin Wallet",hasMobileSupport:!0},{id:"com.hootark",name:"HootArk",hasMobileSupport:!0},{id:"com.crossmint",name:"Crossmint",hasMobileSupport:!0},{id:"com.coincircle",name:"CoinCircle",hasMobileSupport:!0},{id:"io.bharatbox",name:"BharatBox App",hasMobileSupport:!0},{id:"nl.greenhood.wallet",name:"Greenhood",hasMobileSupport:!0},{id:"co.swopme",name:"SWOP",hasMobileSupport:!0},{id:"com.kresus",name:"Kresus SuperApp",hasMobileSupport:!0},{id:"com.dolletwallet",name:"Dollet",hasMobileSupport:!0},{id:"net.shinobi-wallet",name:"Shinobi-Wallet",hasMobileSupport:!0},{id:"com.azcoiner",name:"AZCoiner",hasMobileSupport:!0},{id:"com.passwallet.app",name:"Pass App",hasMobileSupport:!0},{id:"app.qubic.wallet",name:"Qubic Wallet",hasMobileSupport:!0},{id:"com.coinex.wallet",name:"CoinEx Wallet",hasMobileSupport:!0},{id:"app.xverse",name:"Xverse Wallet",hasMobileSupport:!0},{id:"com.flash-wallet",name:"Flash Wallet",hasMobileSupport:!0},{id:"com.vgxfoundation",name:"VGX Wallet",hasMobileSupport:!0},{id:"org.arianee",name:"Arianee Wallet",hasMobileSupport:!0},{id:"io.myabcwallet",name:"ABC Wallet",hasMobileSupport:!0},{id:"io.owallet",name:"OWallet",hasMobileSupport:!0},{id:"io.zelus",name:"Zelus Wallet",hasMobileSupport:!0},{id:"net.myrenegade",name:"Renegade",hasMobileSupport:!0},{id:"io.clingon",name:"Cling Wallet",hasMobileSupport:!0},{id:"com.icewal",name:"icewal",hasMobileSupport:!0},{id:"io.streakk",name:"Streakk Wallet",hasMobileSupport:!0},{id:"com.dokwallet",name:"Dokwallet",hasMobileSupport:!0},{id:"finance.porta",name:"PortaWallet",hasMobileSupport:!0},{id:"io.prettygood.x",name:"PrettyGood Keyboard",hasMobileSupport:!0},{id:"io.earthwallet",name:"Earth Wallet",hasMobileSupport:!0},{id:"net.spatium.wallet",name:"Spatium",hasMobileSupport:!0},{id:"live.superex",name:"SuperWallet",hasMobileSupport:!0},{id:"com.adftechnology",name:"ADF Wallet",hasMobileSupport:!0},{id:"com.bscecowallet",name:"BSC Wallet",hasMobileSupport:!0},{id:"io.wallypto",name:"Wallypto",hasMobileSupport:!0},{id:"com.reown",name:"React Native Sample Wallet",hasMobileSupport:!0},{id:"finance.voltage",name:"Volt Wallet",hasMobileSupport:!0},{id:"com.walletconnect",name:"Swift Sample Wallet",hasMobileSupport:!0},{id:"io.passpay",name:"PassPay Wallet",hasMobileSupport:!0},{id:"technology.obvious",name:"Obvious",hasMobileSupport:!0},{id:"io.plutope",name:"Plutope",hasMobileSupport:!0},{id:"io.buzz-up",name:"BUZZUP",hasMobileSupport:!0},{id:"co.xellar",name:"Xellar",hasMobileSupport:!0},{id:"com.kaxaa",name:"KAXAA Wallet",hasMobileSupport:!0},{id:"org.shefi",name:"SheFi",hasMobileSupport:!0},{id:"xyz.orion",name:"Orion",hasMobileSupport:!0},{id:"world.dosi.vault",name:"DOSI Vault",hasMobileSupport:!0},{id:"network.gridlock",name:"Gridlock Wallet",hasMobileSupport:!0},{id:"finance.plena",name:"Plena-App",hasMobileSupport:!0},{id:"cc.dropp",name:"Dropp",hasMobileSupport:!0},{id:"io.scramberry",name:"ScramberryWallet",hasMobileSupport:!0},{id:"xyz.bonuz",name:"Bonuz Social Smart Wallet",hasMobileSupport:!0},{id:"com.bmawallet",name:"BMA Wallet",hasMobileSupport:!0},{id:"co.lifedefi",name:"Life DeFi",hasMobileSupport:!0},{id:"com.get-verso",name:"Verso",hasMobileSupport:!0},{id:"io.blocto",name:"Blocto",hasMobileSupport:!0},{id:"com.pandoshi",name:"Pandoshi Wallet",hasMobileSupport:!0},{id:"io.getclave",name:"Clave",hasMobileSupport:!0},{id:"technology.jambo",name:"Jambo",hasMobileSupport:!0},{id:"app.edge",name:"Edge",hasMobileSupport:!0},{id:"io.banksocial",name:"BankSocial ",hasMobileSupport:!0},{id:"io.konio",name:"Konio",hasMobileSupport:!0},{id:"com.qubetics",name:"QubeticsWallet",hasMobileSupport:!0},{id:"app.imem",name:"iMe Messenger & Crypto Wallet ",hasMobileSupport:!0},{id:"com.purechain",name:"PureWallet",hasMobileSupport:!0},{id:"io.ethos",name:"Ethos Self-Custody Vault",hasMobileSupport:!0},{id:"io.didwallet",name:"DIDWallet",hasMobileSupport:!0},{id:"com.dextrade",name:"DexTrade",hasMobileSupport:!0},{id:"org.kelp",name:"Kelp",hasMobileSupport:!0},{id:"xyz.nestwallet",name:"Nest Wallet",hasMobileSupport:!0},{id:"com.cryptnox",name:"Cryptnox Wallet",hasMobileSupport:!0},{id:"land.liker",name:"LikerLand App",hasMobileSupport:!0},{id:"io.hippowallet",name:"Hippo Wallet",hasMobileSupport:!0},{id:"io.certhis",name:"Certhis",hasMobileSupport:!0},{id:"io.safecryptowallet",name:"SafeWallet",hasMobileSupport:!0},{id:"com.saify",name:"Saify",hasMobileSupport:!0},{id:"com.tiduswallet",name:"Tidus Wallet ",hasMobileSupport:!0},{id:"io.uptn.dapp-web",name:"UPTN",hasMobileSupport:!0},{id:"com.it.onewallet",name:"onewallet",hasMobileSupport:!0},{id:"com.rktechworks",name:"ID Pocket",hasMobileSupport:!0},{id:"com.revelator.wallet",name:"Revelator Wallet",hasMobileSupport:!0},{id:"com.sinohope",name:"Sinohope",hasMobileSupport:!0},{id:"network.dgg",name:"DGG Wallet",hasMobileSupport:!0},{id:"io.up",name:"UP.io",hasMobileSupport:!0},{id:"com.lif3",name:"Lif3 Wallet",hasMobileSupport:!0},{id:"io.bimwallet",name:"BIM Wallet",hasMobileSupport:!0},{id:"pub.dg",name:"DGPub App",hasMobileSupport:!0},{id:"com.wemix",name:"WemixWallet",hasMobileSupport:!0},{id:"com.pierwallet",name:"pier",hasMobileSupport:!0},{id:"net.stasis",name:"Stasis Wallet",hasMobileSupport:!0},{id:"com.peakdefi",name:"PEAKDEFI",hasMobileSupport:!0},{id:"com.3swallet",name:"3S Wallet",hasMobileSupport:!0},{id:"com.example.subdomain",name:"Key3",hasMobileSupport:!0},{id:"com.reown.appkit-lab",name:"Flutter Sample Wallet",hasMobileSupport:!0},{id:"com.opz",name:"OPZ Wallet",hasMobileSupport:!0},{id:"ai.spotonchain.platform",name:"Spot On Chain App",hasMobileSupport:!0},{id:"org.dailychain.wallet",name:"Daily Wallet",hasMobileSupport:!0},{id:"app.omni",name:"Omni",hasMobileSupport:!0},{id:"id.plumaa",name:"Plumaa ID",hasMobileSupport:!0},{id:"io.ttmwallet",name:"MDAO Wallet",hasMobileSupport:!0},{id:"io.kgen",name:"KGeN Wallet",hasMobileSupport:!0},{id:"com.nufinetes",name:"Nufinetes",hasMobileSupport:!0},{id:"com.squirrelwallet",name:"Squirrel Wallet",hasMobileSupport:!0},{id:"eu.trusteeglobal",name:"Trustee Wallet",hasMobileSupport:!0},{id:"com.daffione",name:"DaffiOne",hasMobileSupport:!0},{id:"com.saakuru.app",name:"Saakuru All-in-One crypto App",hasMobileSupport:!0},{id:"io.r0ar",name:"R0AR Mobile Wallet",hasMobileSupport:!0},{id:"com.nodle",name:"Nodle",hasMobileSupport:!0},{id:"app.tofee",name:"Tofee Wallet Official",hasMobileSupport:!0},{id:"io.pltwallet",name:"PLTwallet",hasMobileSupport:!0},{id:"org.talkapp",name:"T+ Wallet ",hasMobileSupport:!0},{id:"io.ready",name:"Ready",hasMobileSupport:!0},{id:"app.w3wallet",name:"W3 Wallet",hasMobileSupport:!0},{id:"pro.ds.app",name:"Digital Shield",hasMobileSupport:!0},{id:"com.reown.docs",name:"Kotlin Sample Wallet",hasMobileSupport:!0},{id:"com.apollox",name:"ApolloX",hasMobileSupport:!0},{id:"com.ipmb",name:"IPMB Wallet",hasMobileSupport:!0},{id:"com.payperless",name:"Payperless",hasMobileSupport:!0},{id:"com.obliowallet",name:"Oblio Wallet",hasMobileSupport:!0},{id:"app.keeper-wallet",name:"Keeper",hasMobileSupport:!0},{id:"io.paraswap",name:"ParaSwap Wallet",hasMobileSupport:!0},{id:"org.ecoinwallet",name:"ECOIN Wallet",hasMobileSupport:!0},{id:"fi.dropmate",name:"Dropmate",hasMobileSupport:!0},{id:"com.cryptokara",name:"Cryptokara",hasMobileSupport:!0},{id:"co.cyber.wallet",name:"CyberWallet",hasMobileSupport:!0},{id:"com.kriptonio",name:"Kriptonio",hasMobileSupport:!0},{id:"digital.minerva",name:"Minerva Wallet",hasMobileSupport:!0},{id:"com.mpcvault.broswerplugin",name:"MPCVault | Team crypto wallet",hasMobileSupport:!0},{id:"com.liberawallet",name:"Libera",hasMobileSupport:!0},{id:"io.helixid",name:"helix id",hasMobileSupport:!0},{id:"com.broearn",name:"Broearn Wallet",hasMobileSupport:!0},{id:"io.altme",name:"Altme",hasMobileSupport:!0},{id:"app.herewallet",name:"HERE Wallet",hasMobileSupport:!0},{id:"com.coinsdo",name:"CoinWallet",hasMobileSupport:!0},{id:"trade.flooz.wallet",name:"Flooz",hasMobileSupport:!0},{id:"com.tapwallet",name:"TAP WALLET",hasMobileSupport:!0},{id:"fun.tobi",name:"Tobi",hasMobileSupport:!0},{id:"com.bitnovo",name:"Bitnovo Wallet",hasMobileSupport:!0},{id:"io.xucre",name:"Xucre",hasMobileSupport:!0},{id:"app.girin",name:"Girin Wallet",hasMobileSupport:!0},{id:"finance.panaroma",name:"Panaroma Wallet",hasMobileSupport:!0},{id:"app.clot",name:"Clot",hasMobileSupport:!0},{id:"io.transi",name:"Transi",hasMobileSupport:!0},{id:"world.qoin",name:"Qoin Wallet",hasMobileSupport:!0},{id:"com.greengloryglobal",name:"Blockaura",hasMobileSupport:!0},{id:"com.amazewallet",name:"AmazeWallet",hasMobileSupport:!0},{id:"zone.bitverse",name:"Bitverse",hasMobileSupport:!0},{id:"social.gm2",name:"GM² Social",hasMobileSupport:!0},{id:"io.ozonewallet",name:"OzoneWallet",hasMobileSupport:!0},{id:"io.ukiss",name:"UKISS Hub",hasMobileSupport:!0},{id:"finance.islamicoin",name:"ISLAMIwallet",hasMobileSupport:!0},{id:"io.copiosa",name:"Copiosa",hasMobileSupport:!0},{id:"world.fncy",name:"Fncy Mobile Wallet",hasMobileSupport:!0},{id:"io.moonstake",name:"MOONSTAKE",hasMobileSupport:!0},{id:"com.trusteeglobal",name:"Trustee Wallet",hasMobileSupport:!0},{id:"net.spatium",name:"Spatium",hasMobileSupport:!0},{id:"co.filwallet",name:"FILWallet",hasMobileSupport:!0},{id:"money.snowball",name:"Snowball",hasMobileSupport:!0},{id:"com.ennowallet",name:"Enno Wallet",hasMobileSupport:!0},{id:"io.safematrix",name:"Safematrix",hasMobileSupport:!0},{id:"pro.assure",name:"Assure",hasMobileSupport:!0},{id:"com.neftipedia",name:"NeftiWallet",hasMobileSupport:!0},{id:"io.goldbit",name:"GoldBit",hasMobileSupport:!0},{id:"com.coingrig",name:"Coingrig",hasMobileSupport:!0},{id:"io.xfun",name:"XFUN Wallet",hasMobileSupport:!0},{id:"com.antiersolutions",name:"Ancrypto Wallet",hasMobileSupport:!0},{id:"com.itoken",name:"iToken Wallet",hasMobileSupport:!0},{id:"com.cardstack",name:"Card Wallet",hasMobileSupport:!0},{id:"io.slavi",name:"Slavi Wallet",hasMobileSupport:!0},{id:"tech.defiantapp",name:"Defiant",hasMobileSupport:!0},{id:"com.dexari",name:"Dexari",hasMobileSupport:!0},{id:"io.cfcx",name:"CFCX",hasMobileSupport:!0},{id:"com.socjsc",name:"SOC Wallet",hasMobileSupport:!0},{id:"com.tokenb",name:"TokenB",hasMobileSupport:!0},{id:"org.onyx",name:"Onyx Wallet",hasMobileSupport:!0},{id:"io.gk8",name:"GK8",hasMobileSupport:!0},{id:"com.anchorage",name:"Anchorage Digital ",hasMobileSupport:!0},{id:"com.hashport.wallet",name:"HashPort Wallet",hasMobileSupport:!0},{id:"io.billionwallet",name:"Billion Wallet",hasMobileSupport:!0},{id:"com.dlicom",name:"DLICOM",hasMobileSupport:!0},{id:"com.tychiwallet",name:"Tychi Wallet",hasMobileSupport:!0},{id:"at.swe",name:"Sweat Wallet",hasMobileSupport:!0},{id:"network.wali",name:"Wali Wallet",hasMobileSupport:!0},{id:"io.diamante",name:"DIAM Wallet",hasMobileSupport:!0},{id:"ai.interlinklabs",name:"ITLX Wallet",hasMobileSupport:!0},{id:"com.walllet",name:"walllet.com",hasMobileSupport:!0},{id:"org.lunascape",name:"Lunascape Browser",hasMobileSupport:!0},{id:"com.nvxowallet",name:"NVXO Wallet",hasMobileSupport:!0},{id:"today.paywithcrypto.wallet",name:"PWC Super App",hasMobileSupport:!0},{id:"ai.iluminary",name:"iLuminaryAi Wallet",hasMobileSupport:!0},{id:"io.reactwallet",name:"React Wallet",hasMobileSupport:!0},{id:"com.rewardywallet",name:"Rewardy Wallet",hasMobileSupport:!0},{id:"io.walletv",name:"Wallet V",hasMobileSupport:!0},{id:"app.outlawgames",name:"Outlaw Wallet",hasMobileSupport:!0},{id:"io.ironwallet",name:"IronWallet",hasMobileSupport:!0},{id:"com.mecowallet",name:"MeCo Wallet",hasMobileSupport:!0},{id:"com.onlybulls",name:"OnlyBulls Wallet",hasMobileSupport:!0},{id:"me.qiewallet",name:"QIE Wallet",hasMobileSupport:!0},{id:"fund.lflabs",name:"LF Wallet App",hasMobileSupport:!0},{id:"io.walletverse",name:"Walletverse",hasMobileSupport:!0},{id:"com.berasig",name:"BeraSig",hasMobileSupport:!0},{id:"app.phantom",name:"Phantom",hasMobileSupport:!1},{id:"com.coinbase.wallet",name:"Base (formerly Coinbase Wallet)",hasMobileSupport:!1},{id:"io.rabby",name:"Rabby",hasMobileSupport:!1},{id:"com.brave.wallet",name:"Brave Wallet",hasMobileSupport:!1},{id:"fi.nu",name:"NUFI",hasMobileSupport:!1},{id:"pro.hinkal.walletconnect",name:"Hinkal Wallet",hasMobileSupport:!1},{id:"com.moongate.one",name:"MG",hasMobileSupport:!1},{id:"tech.levain",name:"Levain",hasMobileSupport:!1},{id:"com.enkrypt",name:"Enkrypt",hasMobileSupport:!1},{id:"com.scramble",name:"Scramble",hasMobileSupport:!1},{id:"io.finoa",name:"FinoaConnect",hasMobileSupport:!1},{id:"com.blazpay.wallet",name:"Blazpay",hasMobileSupport:!1},{id:"io.getjoin.prd",name:"JOIN MOBILE APP",hasMobileSupport:!1},{id:"xyz.talisman",name:"Talisman Wallet",hasMobileSupport:!1},{id:"eu.flashsoft.clear-wallet",name:"clear-wallet",hasMobileSupport:!1},{id:"app.berasig",name:"BeraSig",hasMobileSupport:!1},{id:"com.wallet.reown",name:"Leather",hasMobileSupport:!1},{id:"io.runonflux.sspwallet",name:"SSP",hasMobileSupport:!1},{id:"com.blanqlabs.wallet",name:"Blanq",hasMobileSupport:!1},{id:"io.hero.wallet",name:"Hero Wallet",hasMobileSupport:!1},{id:"network.verified.custody",name:"Verified Wallet",hasMobileSupport:!1},{id:"console.utila.io",name:"Utila",hasMobileSupport:!1},{id:"com.micet.wallet",name:"Micet",hasMobileSupport:!1},{id:"world.dolphinode.chain",name:"NodeVault",hasMobileSupport:!1},{id:"com.lootrush",name:"LootRush",hasMobileSupport:!1},{id:"xyz.dawnwallet",name:"Dawn Wallet",hasMobileSupport:!1},{id:"xyz.abs",name:"Abstract Global Wallet",hasMobileSupport:!1},{id:"sh.frame",name:"Frame Wallet",hasMobileSupport:!1},{id:"io.useglyph",name:"Glyph Wallet",hasMobileSupport:!1},{id:"org.base.account",name:"Base Account",hasMobileSupport:!1},{id:"smart",name:"Smart Wallet",hasMobileSupport:!0},{id:"inApp",name:"In-App Wallet",hasMobileSupport:!0},{id:"embedded",name:"In-App Wallet",hasMobileSupport:!0},{id:"walletConnect",name:"WalletConnect",hasMobileSupport:!1}];function qp(e){const{itemsToShow:n,lastItemRef:t}=Hp(10,10),i=uo(),r=y.useMemo(()=>bL.filter(m=>!vM.includes(m.id)).filter(m=>{var g;return!((g=e.walletIdsToHide)!=null&&g.includes(m.id))}),[e.walletIdsToHide]),o=y.useMemo(()=>new fo(r,{keys:[{name:"name",weight:1}],threshold:.4}),[r]),s=y.useRef(null),[c,l]=y.useState(""),h=yl(c,300),d=h?o.search(h).map(m=>m.item):r,f=y.useMemo(()=>a0(d.slice(0,n)),[d,n]);return a.jsxs(M,{animate:"fadein",flex:"column",fullHeight:!0,className:"tw-all-wallets-screen",children:[a.jsx(M,{p:"lg",children:a.jsx(_e,{onBack:e.onBack,title:"Select Wallet"})}),a.jsx(U,{y:"xs"}),a.jsx(M,{px:"lg",children:a.jsxs("div",{style:{alignItems:"center",display:"flex",position:"relative"},children:[a.jsx(CL,{height:A.md,width:A.md}),a.jsx(xr,{onChange:m=>{var g,w;(w=(g=s.current)==null?void 0:g.parentElement)==null||w.scroll({top:0}),l(m.target.value)},placeholder:"Search Wallet",style:{padding:`${P.sm} ${P.sm} ${P.sm} ${P.xxl}`},tabIndex:-1,value:c,variant:"outline"}),h!==c&&a.jsx("div",{style:{position:"absolute",right:P.md},children:a.jsx(ke,{color:"accentText",size:"md"})})]})}),f.length>0&&a.jsxs(a.Fragment,{children:[a.jsx(U,{y:"md"}),a.jsxs(M,{animate:"fadein",expand:!0,scrollY:!0,children:[a.jsx("div",{ref:s,style:{maxHeight:e.size==="compact"?"400px":void 0,paddingInline:P.md},children:f.map((m,g)=>{const w=g===f.length-1,p=Tt(m.id);return a.jsx("li",{ref:w?t:void 0,style:{listStyle:"none"},children:a.jsx(h0,{className:"tw-select-wallet-button",badge:void 0,client:e.client,connectLocale:e.connectLocale,isActive:!1,recommendedWallets:e.recommendedWallets,selectWallet:()=>{e.onSelect(p),e.disableSelectionDataReset||i({})},wallet:p})},m.id)})}),a.jsx(U,{y:"xl"})]})]}),f.length===0&&a.jsxs(M,{animate:"fadein",center:"both",color:"secondaryText",expand:!0,flex:"column",gap:"md",style:{minHeight:"250px"},children:[a.jsx(Cr,{height:A.xl,width:A.xl}),a.jsx(k,{children:" No Results "})]})]})}const CL=ze(t0)(e=>({color:X().colors.secondaryText,left:P.sm,position:"absolute"})),jL=Object.freeze(Object.defineProperty({__proto__:null,default:qp},Symbol.toStringTag,{value:"Module"}));function O0(e){return a.jsxs(M,{animate:"fadein",children:[a.jsx(U,{y:"xxl"}),a.jsx(M,{center:"x",flex:"row",children:a.jsx(n0,{size:A["3xl"]})}),a.jsx(U,{y:"lg"}),a.jsx(k,{center:!0,color:"primaryText",size:"md",children:e.title}),a.jsx(U,{y:"xl"}),a.jsx(U,{y:"xxl"}),a.jsx(ae,{fullWidth:!0,onClick:e.onTryAgain,variant:"accent",children:"Try Again"})]})}function k0(e){return a.jsxs(M,{animate:"fadein",children:[a.jsx(U,{y:"xxl"}),a.jsxs(M,{center:"x",flex:"row",style:{position:"relative"},children:[a.jsx(ke,{color:"accentText",size:"4xl"}),a.jsx(M,{color:"accentText",style:{left:"50%",position:"absolute",top:"50%",transform:"translate(-50%, -50%)"},children:e.icon})]}),a.jsx(U,{y:"xl"}),a.jsx(k,{center:!0,color:"primaryText",size:"lg",children:e.title}),a.jsx(U,{y:"md"}),a.jsx(k,{center:!0,multiline:!0,children:e.subtitle}),a.jsx(U,{y:"xxl"}),a.jsx(U,{y:"xxl"})]})}function LL(e){var w;const{wallet:n,done:t}=e,i=lI(),r=y.useRef(void 0),[o,s]=y.useState("selecting"),[c,l]=y.useState(),[h,d]=y.useState(!1),f=De(n)?{id:n.id,partnerId:(w=n.getConfig())==null?void 0:w.partnerId}:void 0,m=()=>{s("selecting"),r.current=void 0,e.onBack()};async function g(p){s("loading"),l(void 0),r.current=p;try{e.isLinking?await Kr({chain:e.chain||n.getChain()||Ot(1),client:e.client,ecosystem:f,strategy:"wallet",wallet:p}):await n.connect({chain:e.chain||p.getChain()||Ot(1),client:e.client,strategy:"wallet",wallet:p}),i(p),t()}catch(_){l(_ instanceof Error?_.message:"Unknown error"),s("error")}}return r.current?a.jsxs(M,{animate:"fadein",flex:"column",fullHeight:!0,children:[a.jsx(M,{p:"lg",children:a.jsx(_e,{onBack:m,title:e.isLinking?e.inAppLocale.linkWallet:e.inAppLocale.signInWithWallet})}),a.jsx(M,{center:"y",expand:!0,flex:"column",px:e.size==="wide"?"xxl":"lg",children:a.jsx("div",{children:o==="error"?a.jsxs(a.Fragment,{children:[a.jsx(O0,{onTryAgain:()=>{if(!r.current)throw new Error("Failed to connect to unknown wallet");g(r.current)},title:c||"Failed to Login"}),a.jsx(U,{y:"lg"})]}):a.jsx(k0,{icon:a.jsx(Vn,{client:e.client,id:r.current.id??"",size:A.xl}),subtitle:"A pop-up prompt will appear to sign-in and verify your wallet",title:"Sign in with your wallet"})})})]}):h?a.jsx(y.Suspense,{fallback:a.jsx(ct,{}),children:a.jsx(qp,{client:e.client,connectLocale:e.locale,disableSelectionDataReset:!0,onBack:()=>d(!1),onSelect:async p=>{g(p),d(!1)},recommendedWallets:void 0,size:e.size})}):a.jsx(xy,{chain:n.getChain(),chains:[],client:e.client,connectLocale:e.locale,disableSelectionDataReset:!0,done:()=>{},goBack:m,hideHeader:!1,meta:e.meta||{},modalHeader:{onBack:m,title:e.isLinking?e.inAppLocale.linkWallet:e.inAppLocale.signInWithWallet},onShowAll:()=>{d(!0)},recommendedWallets:void 0,selectWallet:async p=>{g(p)},setModalVisibility:()=>{},showAllWallets:!0,size:e.size,title:e.locale.connectAWallet,walletConnect:e.walletConnect,walletIdsToHide:["inApp"],wallets:ll()})}function EL(e){var m;const n=e.locale,t=n.socialLoginScreen,[i,r]=y.useState(void 0),{done:o,wallet:s}=e,[c,l]=y.useState("connecting"),h=async()=>{var w,p;const g={client:e.client,ecosystem:De(s)?{id:s.id,partnerId:(w=s.getConfig())==null?void 0:w.partnerId}:void 0,strategy:"guest"};try{await s.connect(g),await Ci("guest",Pt),l("connected"),o()}catch(_){l("error"),_ instanceof Error&&((p=_==null?void 0:_.message)!=null&&p.includes("PAYMENT_METHOD_REQUIRED"))&&r(n.maxAccountsExceeded),console.error("Error generating guest account",_)}},d=(m=e.state)==null?void 0:m.guestLogin,f=y.useRef(!1);return y.useEffect(()=>{f.current||d&&(f.current=!0,l("connecting"),d.connectionPromise.then(()=>{o(),l("connected")}).catch(g=>{r(g.message),l("error")}))},[o,d]),a.jsx(M,{animate:"fadein",flex:"column",fullHeight:!0,className:"tw-guest-login-screen",children:a.jsxs(M,{expand:!0,flex:"column",p:"lg",style:{paddingBottom:0},children:[e.goBack&&a.jsx(_e,{onBack:e.goBack,title:t.title}),e.size==="compact"?a.jsx(U,{y:"xl"}):null,a.jsxs(M,{center:"both",expand:!0,flex:"column",style:{minHeight:"250px",textAlign:"center"},children:[c!=="error"&&a.jsxs(M,{animate:"fadein",children:[a.jsx(k,{center:!0,color:"primaryText",multiline:!0,style:{maxWidth:"250px"},children:"Generating your guest account"}),a.jsx(U,{y:"xl"}),a.jsx(M,{center:"x",flex:"row",children:a.jsx(ke,{color:"accentText",size:"lg"})}),a.jsx(U,{y:"xxl"})]}),c==="error"&&a.jsxs(M,{animate:"fadein",children:[i?a.jsx(k,{center:!0,color:"danger",children:i}):a.jsx(k,{color:"danger",children:t.failed}),a.jsx(U,{y:"lg"}),a.jsx(ae,{onClick:h,variant:"primary",children:t.retry}),a.jsx(U,{y:"xxl"})]})]})]})})}const uu=Se({animation:`${lo} 0.15s ease-in`});var TL=Object.defineProperty,vL=Object.defineProperties,NL=Object.getOwnPropertyDescriptors,kc=Object.getOwnPropertySymbols,Kp=Object.prototype.hasOwnProperty,Jp=Object.prototype.propertyIsEnumerable,Tf=(e,n,t)=>n in e?TL(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,SL=(e,n)=>{for(var t in n||(n={}))Kp.call(n,t)&&Tf(e,t,n[t]);if(kc)for(var t of kc(n))Jp.call(n,t)&&Tf(e,t,n[t]);return e},AL=(e,n)=>vL(e,NL(n)),DL=(e,n)=>{var t={};for(var i in e)Kp.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&kc)for(var i of kc(e))n.indexOf(i)<0&&Jp.call(e,i)&&(t[i]=e[i]);return t};function OL(e){let n=setTimeout(e,0),t=setTimeout(e,10),i=setTimeout(e,50);return[n,t,i]}function kL(e){let n=y.useRef();return y.useEffect(()=>{n.current=e}),n.current}var zL=18,Xp=40,PL=`${Xp}px`,RL=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function VL({containerRef:e,inputRef:n,pushPasswordManagerStrategy:t,isFocused:i}){let[r,o]=y.useState(!1),[s,c]=y.useState(!1),[l,h]=y.useState(!1),d=y.useMemo(()=>t==="none"?!1:(t==="increase-width"||t==="experimental-no-flickering")&&r&&s,[r,s,t]),f=y.useCallback(()=>{let m=e.current,g=n.current;if(!m||!g||l||t==="none")return;let w=m,p=w.getBoundingClientRect().left+w.offsetWidth,_=w.getBoundingClientRect().top+w.offsetHeight/2,x=p-zL,I=_;document.querySelectorAll(RL).length===0&&document.elementFromPoint(x,I)===m||(o(!0),h(!0))},[e,n,l,t]);return y.useEffect(()=>{let m=e.current;if(!m||t==="none")return;function g(){let p=window.innerWidth-m.getBoundingClientRect().right;c(p>=Xp)}g();let w=setInterval(g,1e3);return()=>{clearInterval(w)}},[e,t]),y.useEffect(()=>{let m=i||document.activeElement===n.current;if(t==="none"||!m)return;let g=setTimeout(f,0),w=setTimeout(f,2e3),p=setTimeout(f,5e3),_=setTimeout(()=>{h(!0)},6e3);return()=>{clearTimeout(g),clearTimeout(w),clearTimeout(p),clearTimeout(_)}},[n,i,t,f]),{hasPWMBadge:r,willPushPWMBadge:d,PWM_BADGE_SPACE_WIDTH:PL}}var UL=y.createContext({}),ew=y.forwardRef((e,n)=>{var t=e,{value:i,onChange:r,maxLength:o,textAlign:s="left",pattern:c,placeholder:l,inputMode:h="numeric",onComplete:d,pushPasswordManagerStrategy:f="increase-width",pasteTransformer:m,containerClassName:g,noScriptCSSFallback:w=BL,render:p,children:_}=t,x=DL(t,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),I,b,j,C,E;let[T,O]=y.useState(typeof x.defaultValue=="string"?x.defaultValue:""),L=i??T,N=kL(L),v=y.useCallback(de=>{r==null||r(de),O(de)},[r]),D=y.useMemo(()=>c?typeof c=="string"?new RegExp(c):c:null,[c]),z=y.useRef(null),V=y.useRef(null),R=y.useRef({value:L,onChange:v,isIOS:typeof window<"u"&&((b=(I=window==null?void 0:window.CSS)==null?void 0:I.supports)==null?void 0:b.call(I,"-webkit-touch-callout","none"))}),B=y.useRef({prev:[(j=z.current)==null?void 0:j.selectionStart,(C=z.current)==null?void 0:C.selectionEnd,(E=z.current)==null?void 0:E.selectionDirection]});y.useImperativeHandle(n,()=>z.current,[]),y.useEffect(()=>{let de=z.current,fe=V.current;if(!de||!fe)return;R.current.value!==de.value&&R.current.onChange(de.value),B.current.prev=[de.selectionStart,de.selectionEnd,de.selectionDirection];function Be(){if(document.activeElement!==de){Z(null),ce(null);return}let he=de.selectionStart,ot=de.selectionEnd,wt=de.selectionDirection,$e=de.maxLength,vi=de.value,dn=B.current.prev,Tn=-1,_t=-1,hn;if(vi.length!==0&&he!==null&&ot!==null){let H5=he===ot,Z5=he===vi.length&&vi.length<$e;if(H5&&!Z5){let Er=he;if(Er===0)Tn=0,_t=1,hn="forward";else if(Er===$e)Tn=Er-1,_t=Er,hn="backward";else if($e>1&&vi.length>1){let kl=0;if(dn[0]!==null&&dn[1]!==null){hn=Er<dn[1]?"backward":"forward";let G5=dn[0]===dn[1]&&dn[0]<$e;hn==="backward"&&!G5&&(kl=-1)}Tn=kl+Er,_t=kl+Er+1}}Tn!==-1&&_t!==-1&&Tn!==_t&&z.current.setSelectionRange(Tn,_t,hn)}let Ni=Tn!==-1?Tn:he,Ta=_t!==-1?_t:ot,Q5=hn??wt;Z(Ni),ce(Ta),B.current.prev=[Ni,Ta,Q5]}if(document.addEventListener("selectionchange",Be,{capture:!0}),Be(),document.activeElement===de&&F(!0),!document.getElementById("input-otp-style")){let he=document.createElement("style");if(he.id="input-otp-style",document.head.appendChild(he),he.sheet){let ot="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";_s(he.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),_s(he.sheet,`[data-input-otp]:autofill { ${ot} }`),_s(he.sheet,`[data-input-otp]:-webkit-autofill { ${ot} }`),_s(he.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),_s(he.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let qe=()=>{fe&&fe.style.setProperty("--root-height",`${de.clientHeight}px`)};qe();let Ke=new ResizeObserver(qe);return Ke.observe(de),()=>{document.removeEventListener("selectionchange",Be,{capture:!0}),Ke.disconnect()}},[]);let[Y,$]=y.useState(!1),[W,F]=y.useState(!1),[Q,Z]=y.useState(null),[ne,ce]=y.useState(null);y.useEffect(()=>{OL(()=>{var de,fe,Be,qe;(de=z.current)==null||de.dispatchEvent(new Event("input"));let Ke=(fe=z.current)==null?void 0:fe.selectionStart,he=(Be=z.current)==null?void 0:Be.selectionEnd,ot=(qe=z.current)==null?void 0:qe.selectionDirection;Ke!==null&&he!==null&&(Z(Ke),ce(he),B.current.prev=[Ke,he,ot])})},[L,W]),y.useEffect(()=>{N!==void 0&&L!==N&&N.length<o&&L.length===o&&(d==null||d(L))},[o,d,N,L]);let q=VL({containerRef:V,inputRef:z,pushPasswordManagerStrategy:f,isFocused:W}),le=y.useCallback(de=>{let fe=de.currentTarget.value.slice(0,o);if(fe.length>0&&D&&!D.test(fe)){de.preventDefault();return}typeof N=="string"&&fe.length<N.length&&document.dispatchEvent(new Event("selectionchange")),v(fe)},[o,v,N,D]),re=y.useCallback(()=>{var de;if(z.current){let fe=Math.min(z.current.value.length,o-1),Be=z.current.value.length;(de=z.current)==null||de.setSelectionRange(fe,Be),Z(fe),ce(Be)}F(!0)},[o]),oe=y.useCallback(de=>{var fe,Be;let qe=z.current;if(!m&&(!R.current.isIOS||!de.clipboardData||!qe))return;let Ke=de.clipboardData.getData("text/plain"),he=m?m(Ke):Ke;de.preventDefault();let ot=(fe=z.current)==null?void 0:fe.selectionStart,wt=(Be=z.current)==null?void 0:Be.selectionEnd,$e=(ot!==wt?L.slice(0,ot)+he+L.slice(wt):L.slice(0,ot)+he+L.slice(ot)).slice(0,o);if($e.length>0&&D&&!D.test($e))return;qe.value=$e,v($e);let vi=Math.min($e.length,o-1),dn=$e.length;qe.setSelectionRange(vi,dn),Z(vi),ce(dn)},[o,v,D,L]),ue=y.useMemo(()=>({position:"relative",cursor:x.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[x.disabled]),Ce=y.useMemo(()=>({position:"absolute",inset:0,width:q.willPushPWMBadge?`calc(100% + ${q.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:q.willPushPWMBadge?`inset(0 ${q.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:s,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[q.PWM_BADGE_SPACE_WIDTH,q.willPushPWMBadge,s]),Ue=y.useMemo(()=>y.createElement("input",AL(SL({autoComplete:x.autoComplete||"one-time-code"},x),{"data-input-otp":!0,"data-input-otp-placeholder-shown":L.length===0||void 0,"data-input-otp-mss":Q,"data-input-otp-mse":ne,inputMode:h,pattern:D==null?void 0:D.source,"aria-placeholder":l,style:Ce,maxLength:o,value:L,ref:z,onPaste:de=>{var fe;oe(de),(fe=x.onPaste)==null||fe.call(x,de)},onChange:le,onMouseOver:de=>{var fe;$(!0),(fe=x.onMouseOver)==null||fe.call(x,de)},onMouseLeave:de=>{var fe;$(!1),(fe=x.onMouseLeave)==null||fe.call(x,de)},onFocus:de=>{var fe;re(),(fe=x.onFocus)==null||fe.call(x,de)},onBlur:de=>{var fe;F(!1),(fe=x.onBlur)==null||fe.call(x,de)}})),[le,re,oe,h,Ce,o,ne,Q,x,D==null?void 0:D.source,L]),Ge=y.useMemo(()=>({slots:Array.from({length:o}).map((de,fe)=>{var Be;let qe=W&&Q!==null&&ne!==null&&(Q===ne&&fe===Q||fe>=Q&&fe<ne),Ke=L[fe]!==void 0?L[fe]:null,he=L[0]!==void 0?null:(Be=l==null?void 0:l[fe])!=null?Be:null;return{char:Ke,placeholderChar:he,isActive:qe,hasFakeCaret:qe&&Ke===null}}),isFocused:W,isHovering:!x.disabled&&Y}),[W,Y,o,ne,Q,x.disabled,L]),rt=y.useMemo(()=>p?p(Ge):y.createElement(UL.Provider,{value:Ge},_),[_,Ge,p]);return y.createElement(y.Fragment,null,w!==null&&y.createElement("noscript",null,y.createElement("style",null,w)),y.createElement("div",{ref:V,"data-input-otp-container":!0,style:ue,className:g},rt,y.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},Ue)))});ew.displayName="Input";function _s(e,n){try{e.insertRule(n)}catch{console.error("input-otp could not insert CSS rule:",n)}}var BL=`
|
|
263
|
+
[data-input-otp] {
|
|
264
|
+
--nojs-bg: white !important;
|
|
265
|
+
--nojs-fg: black !important;
|
|
266
|
+
|
|
267
|
+
background-color: var(--nojs-bg) !important;
|
|
268
|
+
color: var(--nojs-fg) !important;
|
|
269
|
+
caret-color: var(--nojs-fg) !important;
|
|
270
|
+
letter-spacing: .25em !important;
|
|
271
|
+
text-align: center !important;
|
|
272
|
+
border: 1px solid var(--nojs-fg) !important;
|
|
273
|
+
border-radius: 4px !important;
|
|
274
|
+
width: 100% !important;
|
|
275
|
+
}
|
|
276
|
+
@media (prefers-color-scheme: dark) {
|
|
277
|
+
[data-input-otp] {
|
|
278
|
+
--nojs-bg: black !important;
|
|
279
|
+
--nojs-fg: white !important;
|
|
280
|
+
}
|
|
281
|
+
}`;function WL(e){return a.jsx($L,{className:"tw-otp-input-container",children:a.jsx(ew,{maxLength:6,onChange:n=>{e.setValue(n)},onComplete:()=>{e.onEnter()},render:({slots:n})=>a.jsx(M,{center:"both",flex:"row",gap:"xs",children:n.map((t,i)=>a.jsx(YL,{...t,isInvalid:e.isInvalid},i))}),value:e.value})})}const $L=Se({"& input":{maxWidth:"100%"}});function YL(e){return a.jsxs(HL,{"data-active":e.isActive,"data-error":e.isInvalid,children:[e.char!==null&&a.jsx("div",{children:e.char}),e.hasFakeCaret&&a.jsx(QL,{})]})}const FL=vt`
|
|
282
|
+
0%, 100% {
|
|
283
|
+
opacity: 0;
|
|
284
|
+
},
|
|
285
|
+
50% {
|
|
286
|
+
opacity: 1;
|
|
287
|
+
}
|
|
288
|
+
`,QL=Se(e=>({"&::before":{backgroundColor:X().colors.primaryText,content:"''",display:"block",height:"1em",width:"1.5px"},alignItems:"center",animation:`${FL} 1s infinite`,display:"flex",inset:0,justifyContent:"center",pointerEvents:"none",position:"absolute"})),HL=Se(e=>{const n=X();return{"&[data-active='true']":{borderColor:n.colors.accentText},"&[data-error='true']":{borderColor:n.colors.danger},alignItems:"center",border:`2px solid ${n.colors.borderColor}`,borderRadius:G.lg,boxSizing:"border-box",color:n.colors.primaryText,display:"flex",fontSize:ie.md,height:"40px",justifyContent:"center",padding:P.xs,position:"relative",textAlign:"center",transition:"color 200ms ease",width:"40px"}});function ZL(e){var O;const{wallet:n,done:t,goBack:i,userInfo:r}=e,o=e.size==="wide",s=e.locale,[c,l]=y.useState(""),[h,d]=y.useState("idle"),[f,m]=y.useState(),[g,w]=y.useState({type:"sending"}),[p,_]=y.useState(0),x=De(n)?{id:n.id,partnerId:(O=n.getConfig())==null?void 0:O.partnerId}:void 0,[I]=y.useState("base"),b=y.useCallback(async()=>{l(""),d("idle"),w({type:"sending"});try{if("email"in r)await o1({client:e.client,ecosystem:x,email:r.email,strategy:"email"}),w({type:"sent"}),_(60);else if("phone"in r)await o1({client:e.client,ecosystem:x,phoneNumber:r.phone,strategy:"phone"}),w({type:"sent"}),_(60);else throw new Error("Invalid userInfo")}catch(L){console.error(L),d("idle"),w({type:"error",message:L instanceof Error?L.message:void 0})}},[e.client,r,x]);async function j(L){if("email"in r)await n.connect({chain:e.chain,client:e.client,email:r.email,strategy:"email",verificationCode:L}),await Ci("email",Pt);else if("phone"in r)await n.connect({chain:e.chain,client:e.client,phoneNumber:r.phone,strategy:"phone",verificationCode:L}),await Ci("phone",Pt);else throw new Error("Invalid userInfo")}async function C(L){"email"in r?await Kr({client:e.client,ecosystem:x,email:r.email,strategy:"email",verificationCode:L}):"phone"in r&&await Kr({client:e.client,ecosystem:x,phoneNumber:r.phone,strategy:"phone",verificationCode:L})}const E=async L=>{var N;if(L.length===6){d("verifying");try{e.isLinking?await C(L):await j(L),t(),d("valid")}catch(v){v instanceof Error&&((N=v==null?void 0:v.message)!=null&&N.includes("PAYMENT_METHOD_REQUIRED"))?d("payment_required"):v instanceof Error&&(v.message.toLowerCase().includes("link")||v.message.toLowerCase().includes("profile"))?(d("linking_error"),m(v.message)):d("invalid"),console.error("Authentication Error",v)}}},T=y.useRef(!1);return y.useEffect(()=>{T.current||(T.current=!0,b())},[b]),y.useEffect(()=>{if(p<=0)return;const L=setInterval(()=>{_(N=>N<=1?(clearInterval(L),0):N-1)},1e3);return()=>clearInterval(L)},[p]),I==="base"?a.jsxs(M,{animate:"fadein",flex:"column",fullHeight:!0,className:"tw-otp-login-screen",children:[a.jsx(M,{p:"lg",children:a.jsx(_e,{onBack:i,title:s.signIn})}),a.jsx(M,{center:"y",expand:!0,flex:"column",children:a.jsxs("form",{onSubmit:L=>{L.preventDefault()},children:[a.jsxs(M,{center:"x",flex:"column",px:"lg",children:[!o&&a.jsx(U,{y:"xl"}),a.jsx(k,{className:"tw-screen-title",children:s.emailLoginScreen.enterCodeSendTo}),a.jsx(U,{y:"sm"}),a.jsx(k,{color:"primaryText",children:"email"in r?r.email:r.phone}),a.jsx(U,{y:"xl"})]}),a.jsx(WL,{digits:6,isInvalid:h==="invalid",onEnter:()=>{E(c)},setValue:L=>{l(L),d("idle")},value:c}),h==="invalid"&&a.jsxs(uu,{children:[a.jsx(U,{y:"md"}),a.jsx(k,{center:!0,color:"danger",size:"sm",className:"tw-invalid-code-text",children:s.emailLoginScreen.invalidCode})]}),h==="linking_error"&&a.jsxs(uu,{children:[a.jsx(U,{y:"md"}),a.jsx(k,{center:!0,color:"danger",size:"sm",className:"tw-screen-error",children:f||"Failed to verify code"})]}),h==="payment_required"&&a.jsxs(uu,{children:[a.jsx(U,{y:"md"}),a.jsx(k,{center:!0,color:"danger",size:"sm",className:"tw-screen-error",children:s.maxAccountsExceeded})]}),a.jsx(U,{y:"xl"}),a.jsx(M,{px:o?"xxl":"lg",children:h==="verifying"?a.jsx(M,{animate:"fadein",center:"x",flex:"row",children:a.jsx(ke,{color:"accentText",size:"lg"})}):a.jsx(M,{animate:"fadein",children:a.jsx(ae,{onClick:()=>E(c),style:{width:"100%"},type:"submit",variant:"accent",className:"tw-verify-button",children:s.emailLoginScreen.verify})},"btn-container")}),a.jsx(U,{y:"xl"}),!o&&a.jsx(Re,{}),a.jsxs(M,{gap:"sm",p:o?void 0:"lg",flex:"column",children:[g.type==="error"&&a.jsx(k,{center:!0,color:"danger",size:"sm",className:"tw-screen-error",children:g.message||s.emailLoginScreen.failedToSendCode}),g.type==="sending"&&a.jsxs(M,{center:"both",flex:"row",gap:"xs",style:{textAlign:"center"},children:[a.jsx(k,{size:"sm",children:s.emailLoginScreen.sendingCode}),a.jsx(ke,{color:"secondaryText",size:"xs"})]}),g.type!=="sending"&&a.jsx(GL,{onClick:p===0?b:void 0,style:{cursor:p>0?"default":"pointer",opacity:p>0?.5:1},className:"tw-resend-button",type:"button",children:p>0?`Resend code in ${p} seconds`:s.emailLoginScreen.resendCode})]})]})})]}):null}const GL=Ti(e=>{const n=X();return{all:"unset","&:hover":{color:n.colors.primaryText},color:n.colors.accentText,cursor:"pointer",fontSize:ie.sm,fontWeight:500,textAlign:"center",width:"100%"}});function qL(e){const{wallet:n,done:t,client:i,chain:r,size:o,locale:s}=e,[c,l]=y.useState("loading"),h=y.useRef(!1);return y.useEffect(()=>{h.current||(h.current=!0,G3(i,De(n.id)?n.id:void 0).then(d=>{l(d?"login":"select")}).catch(()=>{l("select")}))},[i,n.id]),a.jsxs(M,{animate:"fadein",flex:"column",fullHeight:!0,children:[a.jsx(M,{p:"lg",children:a.jsx(_e,{onBack:e.onBack,title:e.isLinking?s.passkeys.linkPasskey:s.passkeys.title})}),a.jsx(M,{center:"y",expand:!0,flex:"column",px:o==="wide"?"xxl":"lg",children:a.jsxs("div",{children:[c==="loading"&&a.jsxs(a.Fragment,{children:[a.jsx(ct,{}),a.jsx(U,{y:"xxl"})]}),c==="select"&&a.jsx(XL,{onSignin:()=>{l("login")},onSignup:()=>{l("signup")}}),c==="login"&&a.jsx(KL,{chain:r,client:i,done:t,isLinking:e.isLinking,onCreate:()=>{l("signup")},wallet:n}),c==="signup"&&a.jsx(JL,{chain:r,client:i,done:t,isLinking:e.isLinking,wallet:n})]})})]})}function KL(e){const{wallet:n,done:t,client:i,chain:r}=e,[o,s]=y.useState("loading"),[c,l]=y.useState();async function h(){s("loading");try{e.isLinking?await Kr({client:i,strategy:"passkey",type:"sign-in"}).catch(f=>{throw l(f.message),f}):(await n.connect({chain:r,client:i,strategy:"passkey",type:"sign-in"}),await Ci("passkey",Pt)),t()}catch(f){console.error("Failed to login with passkey",f),s("error")}}const d=y.useRef(!1);return y.useEffect(()=>{d.current||(d.current=!0,h())}),o==="loading"?a.jsx(k0,{icon:a.jsx(ho,{size:A.xxl}),subtitle:"A pop-up prompt will appear to sign-in and verify your passkey",title:"Requesting Passkey"}):o==="error"?a.jsxs(a.Fragment,{children:[a.jsx(O0,{onTryAgain:h,title:c||"Failed to Login"}),a.jsx(U,{y:"sm"}),a.jsx(ae,{fullWidth:!0,onClick:e.onCreate,variant:"outline",children:"Create a new Passkey"}),a.jsx(U,{y:"lg"})]}):null}function JL(e){var m;const{wallet:n,done:t,client:i,chain:r}=e,[o,s]=y.useState(),[c,l]=y.useState("loading"),h=De(n)?{id:n.id,partnerId:(m=n.getConfig())==null?void 0:m.partnerId}:void 0;async function d(){l("loading");try{e.isLinking?await Kr({client:i,ecosystem:h,strategy:"passkey",type:"sign-up"}):(await n.connect({chain:r,client:i,strategy:"passkey",type:"sign-up"}),await Ci("passkey",Pt)),t()}catch(g){console.error(g),g instanceof Error&&s(`Error creating passkey: ${g.message}`),l("error")}}const f=y.useRef(!1);return y.useEffect(()=>{f.current||(f.current=!0,d())}),c==="loading"?a.jsx(k0,{icon:a.jsx(ho,{size:A.xxl}),subtitle:"A pop-up prompt will appear to sign-in and verify your passkey",title:"Creating Passkey"}):c==="error"?a.jsxs(a.Fragment,{children:[a.jsx(O0,{onTryAgain:d,title:o||"Failed to create passkey"}),a.jsx(U,{y:"lg"})]}):null}function XL(e){return a.jsxs(M,{children:[a.jsx(U,{y:"xxl"}),a.jsx(M,{center:"x",color:"accentText",flex:"row",children:a.jsx(ho,{size:A["4xl"]})}),a.jsx(U,{y:"xl"}),a.jsx(U,{y:"xxl"}),a.jsx(ae,{fullWidth:!0,onClick:e.onSignup,variant:"accent",children:"Create a Passkey"}),a.jsx(U,{y:"sm"}),a.jsx(ae,{fullWidth:!0,onClick:e.onSignin,variant:"outline",children:"I have a Passkey"}),a.jsx(U,{y:"lg"})]})}function eE(e){var w,p;const n=e.locale,t=n.socialLoginScreen,i=X(),r=De(e.wallet)?{id:e.wallet.id,partnerId:(w=e.wallet.getConfig())==null?void 0:w.partnerId}:void 0,[o,s]=y.useState(void 0),{done:c,wallet:l}=e,[h,d]=y.useState("connecting"),f=async()=>{var I,b,j,C;const _=l.getConfig(),x=_&&"auth"in _?((I=_==null?void 0:_.auth)==null?void 0:I.mode)??"popup":"popup";if(_&&"auth"in _&&x!=="popup"&&!e.isLinking)return zg({authOption:e.socialAuth,client:e.client,ecosystem:r,mode:(b=_==null?void 0:_.auth)==null?void 0:b.mode,redirectUrl:(j=_==null?void 0:_.auth)==null?void 0:j.redirectUrl});try{const E=my({authOption:e.socialAuth,client:e.client,ecosystem:r,themeObj:i});if(!E)throw new Error(`Failed to open ${e.socialAuth} login window`);d("connecting"),e.isLinking?await Kr({client:e.client,closeOpenedWindow:T=>{T.close()},ecosystem:r,openedWindow:E,strategy:e.socialAuth}).catch(T=>{throw s(T.message),T}):await l.connect({chain:e.chain,client:e.client,closeOpenedWindow:T=>{T.close()},openedWindow:E,strategy:e.socialAuth}),await Ci(e.socialAuth,Pt),d("connected"),c()}catch(E){d("error"),E instanceof Error&&((C=E==null?void 0:E.message)!=null&&C.includes("PAYMENT_METHOD_REQUIRED"))&&s(n.maxAccountsExceeded),console.error(`Error signing in with ${e.socialAuth}`,E)}},m=(p=e.state)==null?void 0:p.socialLogin,g=y.useRef(!1);return y.useEffect(()=>{g.current||m&&(g.current=!0,d("connecting"),m.connectionPromise.then(()=>{c(),d("connected")}).catch(_=>{s(_.message),d("error")}))},[c,m]),a.jsx(M,{animate:"fadein",flex:"column",fullHeight:!0,className:"tw-social-login-screen",children:a.jsxs(M,{expand:!0,flex:"column",p:"lg",style:{paddingBottom:0},children:[e.goBack&&a.jsx(_e,{onBack:e.goBack,title:e.isLinking?e.connectLocale.manageWallet.linkProfile:t.title}),e.size==="compact"?a.jsx(U,{y:"xl"}):null,a.jsxs(M,{center:"both",expand:!0,flex:"column",style:{minHeight:"250px",textAlign:"center"},children:[h!=="error"&&a.jsxs(M,{animate:"fadein",children:[a.jsx(k,{center:!0,color:"primaryText",multiline:!0,style:{maxWidth:"250px"},children:t.instruction}),a.jsx(U,{y:"xl"}),a.jsx(M,{center:"x",flex:"row",children:a.jsx(ke,{color:"accentText",size:"lg"})}),a.jsx(U,{y:"xxl"})]}),h==="error"&&a.jsxs(M,{animate:"fadein",children:[o?a.jsx(k,{center:!0,color:"danger",children:o}):a.jsx(k,{color:"danger",children:t.failed}),a.jsx(U,{y:"lg"}),a.jsx(ae,{onClick:f,variant:"primary",children:t.retry}),a.jsx(U,{y:"xxl"})]})]})]})})}function tE(e){var t,i,r;const n=cs(e.wallet.id);return a.jsx(_e,{leftAligned:!0,onBack:e.onBack,title:n.isLoading?a.jsx(ge,{height:"24px",width:"200px"}):a.jsxs(a.Fragment,{children:[(t=n.data)!=null&&t.image_id?a.jsx(He,{client:e.client,height:A.md,src:(i=n.data)==null?void 0:i.image_id,style:{borderRadius:G.sm},width:A.md}):null,a.jsx(cl,{children:(r=n.data)==null?void 0:r.name})]})})}function nE(e){const n=e.size==="compact",{initialScreen:t,screen:i}=u0(),[r,o]=y.useState(!1),s=i===e.wallet&&t===e.wallet?void 0:e.goBack;return a.jsxs(M,{animate:"fadein",flex:"column",fullHeight:!0,p:"lg",style:{minHeight:"250px"},children:[e.isLinking?a.jsx(_e,{onBack:s,title:e.connectLocale.manageWallet.linkProfile}):a.jsx(tE,{client:e.client,onBack:n?s:void 0,wallet:e.wallet}),a.jsx(U,{y:"lg"}),a.jsx(M,{center:"y",expand:!0,flex:"column",p:n?void 0:"lg",children:a.jsx(gy,{disabled:e.meta.requireApproval&&!r,...e})}),n&&(e.meta.showThirdwebBranding!==!1||e.meta.termsOfServiceUrl||e.meta.privacyPolicyUrl)&&a.jsx(U,{y:"xl"}),a.jsxs(M,{flex:"column",gap:"lg",children:[a.jsx(hl,{isApproved:r,locale:e.connectLocale.agreement,onApprove:()=>{o(!r)},privacyPolicyUrl:e.meta.privacyPolicyUrl,requireApproval:e.meta.requireApproval,termsOfServiceUrl:e.meta.termsOfServiceUrl}),e.meta.showThirdwebBranding!==!1&&a.jsx(ml,{})]})]})}function tw(e){const n=Yb(),t=uo(),i=n,r=e.connectLocale.id,o=yy(r);if(!o)return a.jsx(ct,{});const s=()=>{var h;e.size==="compact"&&((h=e.goBack)==null||h.call(e)),t({})},c=()=>{e.done(),t({})},l=i!=null&&i.emailLogin?{email:i.emailLogin}:i!=null&&i.phoneLogin?{phone:i.phoneLogin}:void 0;return l?a.jsx(ZL,{chain:e.chain,client:e.client,done:c,goBack:s,isLinking:e.isLinking,locale:o,size:e.size,userInfo:l,wallet:e.wallet}):i!=null&&i.passkeyLogin?a.jsx(qL,{chain:e.chain,client:e.client,done:c,isLinking:e.isLinking,locale:e.connectLocale,onBack:s,size:e.size,wallet:e.wallet}):i!=null&&i.socialLogin?a.jsx(eE,{chain:e.chain,client:e.client,connectLocale:e.connectLocale,done:c,goBack:s,isLinking:e.isLinking,locale:o,size:e.size,socialAuth:i.socialLogin.type,state:i,wallet:e.wallet}):i!=null&&i.walletLogin?a.jsx(LL,{chain:e.chain,client:e.client,done:c,inAppLocale:o,isLinking:i.walletLogin.linking,locale:e.connectLocale,meta:e.meta,onBack:s||(()=>t({})),size:e.size,wallet:e.wallet,walletConnect:e.walletConnect}):i!=null&&i.guestLogin?a.jsx(EL,{client:e.client,connectLocale:e.connectLocale,done:c,goBack:s,locale:o,size:e.size,state:i,wallet:e.wallet}):a.jsx(nE,{chain:e.chain,client:e.client,connectLocale:e.connectLocale,done:c,goBack:e.goBack,isLinking:e.isLinking,locale:o,meta:e.meta,select:()=>{},size:e.size,wallet:e.wallet})}const iE=Object.freeze(Object.defineProperty({__proto__:null,default:tw},Symbol.toStringTag,{value:"Module"})),rE=y.lazy(()=>u(()=>import("./InAppWalletConnectUI-Bdxz0Bmy.js"),__vite__mapDeps([53,1,2,4,5,21,13,22,18,17,19,14,9,23,24,25,8,26,27,28,29,30,31,32,33,34])));function oE(e){const n=rl(),t=ut(),i=lt(),r=Ei(),o=n||t;return o?o.id==="inApp"?a.jsx(y.Suspense,{fallback:a.jsx(ct,{}),children:a.jsx(rE,{chain:i,client:e.client,connectLocale:e.locale,done:()=>{setTimeout(()=>{r.invalidateQueries({queryKey:["profiles"]})},500),e.onBack()},goBack:e.onBack,isLinking:!0,meta:{showThirdwebBranding:!1,title:e.locale.manageWallet.linkProfile},size:"compact",wallet:o,walletConnect:e.walletConnect})}):De(o)?a.jsx(y.Suspense,{fallback:a.jsx(ct,{}),children:a.jsx(tw,{chain:i,client:e.client,connectLocale:e.locale,done:()=>{setTimeout(()=>{r.invalidateQueries({queryKey:["profiles"]})},500),e.onBack()},goBack:e.onBack,isLinking:!0,meta:{showThirdwebBranding:!1,title:e.locale.manageWallet.linkProfile},size:"compact",wallet:o,walletConnect:e.walletConnect})}):a.jsxs(M,{style:{minHeight:"300px"},children:[a.jsx(M,{p:"lg",children:a.jsx(_e,{onBack:e.onBack,title:e.locale.manageWallet.linkProfile})}),a.jsx(Re,{}),a.jsxs(M,{center:"both",color:"secondaryText",flex:"column",gap:"md",px:"xl",style:{flex:"1",minHeight:"250px"},children:[a.jsx(Cr,{height:A.xl,width:A.xl}),a.jsx(k,{center:!0,children:"This wallet does not support account linking"})]})]}):a.jsx(ct,{})}const sE=e=>a.jsxs("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 24 24",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("path",{d:"M2 5.99999L2 2.99999C2 2.39999 2.4 1.99999 3 1.99999H7L7 4.99999H10V7.99999H12L13.4 9.39999C14.7898 8.91585 16.3028 8.9177 17.6915 9.40524C19.0801 9.89278 20.2622 10.8372 21.0444 12.0839C21.8265 13.3306 22.1624 14.8058 21.9971 16.2683C21.8318 17.7307 21.1751 19.0937 20.1344 20.1344C19.0937 21.1751 17.7307 21.8318 16.2683 21.9971C14.8058 22.1624 13.3306 21.8265 12.0839 21.0444C10.8372 20.2622 9.89279 19.0801 9.40525 17.6915C8.91771 16.3028 8.91585 14.7898 9.4 13.4L2 5.99999Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),a.jsx("path",{d:"M15.5 15C15.7761 15 16 15.2239 16 15.5C16 15.7761 15.7761 16 15.5 16C15.2239 16 15 15.7761 15 15.5C15 15.2239 15.2239 15 15.5 15Z",fill:"currentColor",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})]}),aE=e=>a.jsx("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 24 24",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M22 21V19C22 17.1362 20.7252 15.5701 19 15.126M15.5 3.29076C16.9659 3.88415 18 5.32131 18 7C18 8.67869 16.9659 10.1159 15.5 10.7092M17 21C17 19.1362 17 18.2044 16.6955 17.4693C16.2895 16.4892 15.5108 15.7105 14.5307 15.3045C13.7956 15 12.8638 15 11 15H8C6.13623 15 5.20435 15 4.46927 15.3045C3.48915 15.7105 2.71046 16.4892 2.30448 17.4693C2 18.2044 2 19.1362 2 21M13.5 7C13.5 9.20914 11.7091 11 9.5 11C7.29086 11 5.5 9.20914 5.5 7C5.5 4.79086 7.29086 3 9.5 3C11.7091 3 13.5 4.79086 13.5 7Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})}),cE=e=>a.jsx("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 24 24",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M4.91334 7.73539C8.82714 4.0882 15.1729 4.0882 19.0867 7.73539L19.5577 8.17432C19.7534 8.35664 19.7534 8.65232 19.5577 8.83464L17.9464 10.3362C17.8485 10.4274 17.6899 10.4274 17.5921 10.3362L16.9439 9.73217C14.2134 7.18782 9.7866 7.18782 7.05614 9.73217L6.36193 10.379C6.26407 10.4702 6.10547 10.4702 6.0076 10.379L4.39629 8.87747C4.20056 8.69515 4.20056 8.39947 4.39629 8.21715L4.91334 7.73539ZM22.4191 10.8407L23.8532 12.1771C24.0489 12.3594 24.0489 12.6551 23.8532 12.8374L17.3867 18.8632C17.1911 19.0456 16.8738 19.0456 16.6781 18.8632L12.0886 14.5865C12.0397 14.5409 11.9604 14.5409 11.9115 14.5865L7.32202 18.8632C7.12638 19.0456 6.8091 19.0456 6.61337 18.8632L0.146771 12.8373C-0.0489237 12.655 -0.0489237 12.3593 0.146771 12.177L1.58087 10.8406C1.77657 10.6582 2.09384 10.6582 2.28954 10.8406L6.87907 15.1173C6.928 15.163 7.0073 15.163 7.05623 15.1173L11.6456 10.8406C11.8412 10.6582 12.1585 10.6582 12.3542 10.8406L16.9438 15.1173C16.9927 15.163 17.072 15.163 17.1209 15.1173L21.7105 10.8407C21.9061 10.6583 22.2234 10.6583 22.4191 10.8407Z",fill:"currentColor"})});function lE(e){var r,o;const n=rl(),t=ut(),i=n||t;return a.jsxs(M,{style:{minHeight:"300px"},children:[a.jsx(M,{p:"lg",children:a.jsx(_e,{onBack:e.onBack,title:e.locale.manageWallet.title})}),a.jsx(Re,{}),a.jsxs(M,{px:"sm",scrollY:!0,style:{maxHeight:"500px"},children:[a.jsx(U,{y:"md"}),a.jsxs(M,{style:{height:"250px",position:"relative"},children:[a.jsx(uE,{closeModal:e.closeModal,connectLocale:e.locale}),typeof i<"u"&&((r=e.manageWallet)==null?void 0:r.allowLinkingProfiles)!==!1&&a.jsxs(bn,{onClick:()=>{e.setScreen("linked-profiles")},style:{fontSize:ie.sm},children:[a.jsx(aE,{size:A.md}),a.jsx(k,{color:"primaryText",children:e.locale.manageWallet.linkedProfiles})]}),a.jsxs(bn,{onClick:()=>{e.setScreen("wallet-connect-receiver")},style:{fontSize:ie.sm},children:[a.jsx(cE,{size:A.md}),a.jsx(k,{color:"primaryText",children:e.locale.manageWallet.connectAnApp})]}),i&&Bg(i)&&!((o=i.getConfig())!=null&&o.hidePrivateKeyExport)&&a.jsxs(bn,{onClick:()=>{e.setScreen("private-key")},style:{fontSize:ie.sm},children:[a.jsx(sE,{size:A.md}),a.jsx(k,{color:"primaryText",children:e.locale.manageWallet.exportPrivateKey})]})]}),a.jsx(U,{y:"lg"})]})]})}function uE(e){const n=ut(),t=e.connectLocale;if((n==null?void 0:n.id)!=="io.metamask")return null;const i=$h("io.metamask");return i?a.jsxs(bn,{onClick:async()=>{await i.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}),e.closeModal()},type:"button",children:[a.jsx(Ab,{height:A.md,width:A.md}),a.jsx(k,{color:"primaryText",children:t.switchAccount})]}):null}function dE(e){var o;const[n,t]=y.useState(!0),i=Ln("inAppWallet");if(y.useEffect(()=>{const s=async c=>{var l,h;if(typeof c.data=="object"&&"eventType"in c.data&&c.origin===i&&c.data.eventType==="exportPrivateKeyIframeLoaded"){const d=document.getElementById(`export-wallet-${(l=e.wallet)==null?void 0:l.id}`);if(!(d instanceof HTMLIFrameElement)||!e.wallet)return;const f=new Zc({clientId:e.client.clientId,ecosystem:De(e.wallet)?{id:e.wallet.id,partnerId:(h=e.wallet.getConfig())==null?void 0:h.partnerId}:void 0,storage:Pt});d!=null&&d.contentWindow&&d.contentWindow.postMessage({authToken:await f.getAuthCookie(),eventType:"initExportPrivateKey"},c.origin)}};return window.addEventListener("message",s),()=>{window.removeEventListener("message",s)}},[e.wallet,e.client.clientId,i]),!e.wallet)throw new Error("[PrivateKey] No wallet found");const r=De(e.wallet)?{id:e.wallet.id,partnerId:(o=e.wallet.getConfig())==null?void 0:o.partnerId}:void 0;return a.jsxs(M,{style:{minHeight:"300px"},children:[a.jsx(M,{p:"lg",children:a.jsx(_e,{onBack:e.onBack,title:e.connectLocale.manageWallet.exportPrivateKey})}),a.jsx(Re,{}),a.jsxs(M,{px:"sm",scrollY:!0,style:{maxHeight:"500px"},children:[a.jsx(U,{y:"md"}),a.jsxs(M,{style:{height:"250px",position:"relative"},children:[n?a.jsx(M,{center:"both",flex:"column",style:{height:"100%",position:"absolute",width:"100%"},children:a.jsx(ke,{color:"primaryButtonBg",size:"lg"})}):null,a.jsx(M,{style:{height:"100%",position:"absolute",width:"100%",zIndex:11},children:a.jsx("iframe",{allow:"clipboard-read; clipboard-write",id:`export-wallet-${e.wallet.id}`,onLoad:()=>{t(!1)},src:`${i}/sdk/2022-08-12/embedded-wallet/export-private-key?clientId=${e.client.clientId}&theme=${typeof e.theme=="string"?e.theme:e.theme.type}${r?`&ecosystemId=${r.id}`:""}${r!=null&&r.partnerId?`&partnerId=${r.partnerId}`:""}`,style:{height:"250px",visibility:n?"hidden":"unset",width:"100%"},title:"Export In-App Wallet"})})]}),a.jsx(U,{y:"lg"})]})]})}function hE(e,n=!0){return`${e.substring(0,n?4:6)}...${e.substring(e.length-(n?3:4))}`}function fE(e){const n=yt(),t=n==null?void 0:n.address,{hasCopied:i,onCopy:r}=Ty(t||""),{connectLocale:o,client:s}=e,c=o.receiveFundsScreen;return a.jsxs(M,{p:"lg",className:"tw-receive-funds-screen",children:[a.jsx(_e,{onBack:e.onBack,title:c.title}),a.jsx(U,{y:"xl"}),a.jsx(M,{center:"x",flex:"row",children:a.jsx(m0,{QRIcon:e.walletId&&a.jsx(Vn,{client:s,id:e.walletId,size:A.xxl}),qrCodeUri:t,size:350})}),a.jsx(U,{y:"xl"}),a.jsxs(mE,{onClick:r,className:"tw-copy-address-button",children:[a.jsx(k,{color:"primaryText",size:"md",children:hE(t||"",!1)}),a.jsx(Jo,{hasCopied:i,text:t||"",tip:"Copy address"})]}),a.jsx(U,{y:"lg"}),a.jsx(k,{balance:!0,center:!0,size:"sm",className:"receive_fund_screen_instruction",multiline:!0,children:c.instruction})]})}const mE=Ti(e=>{const n=X();return{all:"unset","&:hover":{borderColor:n.colors.accentText},border:`1px solid ${n.colors.borderColor}`,borderRadius:G.md,boxSizing:"border-box",cursor:"pointer",display:"flex",justifyContent:"space-between",padding:P.md,transition:"border-color 200ms ease",width:"100%"}}),gE="0x3b3b57de",yE=[{name:"name",type:"bytes32"}];function pE(e){return Gg(yE,[e.name])}function wE(e){return gE+pE(e).slice(2)}async function _E(e){const{client:n,name:t,resolverAddress:i,resolverChain:r}=e;return yr(t)?xe(t):ns(async()=>{const o=cn({address:i||Jh,chain:r||ha,client:n}),s=wE({name:O2(t)}),c=await k2({contract:o,data:s,name:fh(Kh(t))});return xe(`0x${c[0].slice(-40)}`)},{cacheKey:`ens:addr:${(r==null?void 0:r.id)||1}:${t}`,cacheTime:60*1e3})}const xE="0xa9059cbb",ME=[{name:"to",type:"address"},{name:"value",type:"uint256"}],IE=[{type:"bool"}];function bE(e){const n=A3(async()=>"asyncParams"in e?await e.asyncParams():e);return S3({accessList:async()=>{var t;return(t=(await n()).overrides)==null?void 0:t.accessList},authorizationList:async()=>{var t;return(t=(await n()).overrides)==null?void 0:t.authorizationList},contract:e.contract,erc20Value:async()=>{var t;return(t=(await n()).overrides)==null?void 0:t.erc20Value},extraGas:async()=>{var t;return(t=(await n()).overrides)==null?void 0:t.extraGas},gas:async()=>{var t;return(t=(await n()).overrides)==null?void 0:t.gas},gasPrice:async()=>{var t;return(t=(await n()).overrides)==null?void 0:t.gasPrice},maxFeePerGas:async()=>{var t;return(t=(await n()).overrides)==null?void 0:t.maxFeePerGas},maxPriorityFeePerGas:async()=>{var t;return(t=(await n()).overrides)==null?void 0:t.maxPriorityFeePerGas},method:[xE,ME,IE],nonce:async()=>{var t;return(t=(await n()).overrides)==null?void 0:t.nonce},params:async()=>{const t=await n();return[t.to,t.value]},value:async()=>{var t;return(t=(await n()).overrides)==null?void 0:t.value}})}function CE(e){return bE({asyncParams:async()=>{let n;if("amount"in e){const{decimals:t}=await u(async()=>{const{decimals:r}=await import("./decimals-BkxTCZnw.js").then(o=>o.b);return{decimals:r}},__vite__mapDeps([30,1,2,29,5,19,13])),i=await t(e).catch(()=>18);n=cr(e.amount.toString(),i)}else n=e.amountWei;return{overrides:{erc20Value:{amountWei:n,tokenAddress:e.contract.address},...e.overrides},to:e.to,value:n}},contract:e.contract})}function jE(e){const n=e.split("."),t=n[n.length-1];return n.length<2||!t||/\s/.test(t)||/^\d+$/.test(t)?!1:n.every(i=>!(i.length<1||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(i)||/[\uff01-\uff5e]/.test(i)))}function LE(e){const n=ut(),t=Ei();return Ys({async mutationFn(i){const{tokenAddress:r,receiverAddress:o,amount:s}=i,c=n==null?void 0:n.getChain(),l=n==null?void 0:n.getAccount();if(!c)throw new Error("No active chain");if(!l)throw new Error("No active account");if(!o||!jE(o)&&!yr(o))throw new Error("Invalid receiver address");if(!s||Number.isNaN(Number(s))||Number(s)<0)throw new Error("Invalid amount");let h=o;try{h=await _E({client:e,name:o})}catch{throw new Error("Failed to resolve address")}if(r){const d=cn({address:r,chain:c,client:e}),f=CE({amount:s,contract:d,to:h});return await a1({account:l,transaction:f})}else{const d=D3({chain:c,client:e,to:h,value:c1(s)}),f=await T3({account:l,transaction:d}),m=await Zh({address:l.address,chain:c,client:e});if(c1(s)+f>m.value)throw new Error("Insufficient balance for transfer amount and gas");return await a1({account:l,transaction:d})}},onSettled:async(i,r)=>{r||(i!=null&&i.transactionHash&&await Gc({chain:i.chain,client:e,maxBlocksWaitTime:1e4,transactionHash:i.transactionHash}),T2(t))}})}function z0(e){var i;const n=nl(e.chain).data,t=y.useMemo(()=>{var r;return fr(e.token)||e.token.address===Gt?(n==null?void 0:n.nativeCurrency.symbol)==="ETH"?"ipfs://QmcxZHpyJa8T4i63xqjPYrZ6tKrt55tZJpbXcjSDKuKaf9/ethereum/512.png":(r=n==null?void 0:n.icon)==null?void 0:r.url:e.token.icon},[e.token,(i=n==null?void 0:n.icon)==null?void 0:i.url,n==null?void 0:n.nativeCurrency.symbol]);return t?a.jsx(He,{client:e.client,fallbackImage:J4,height:A[e.size],src:t,width:A[e.size]}):a.jsx(M,{center:"both",color:"secondaryText",style:{height:A[e.size],width:A[e.size]},children:a.jsx(Il,{size:A[e.size]})})}function nw(e){const{chain:n,tokenAddress:t,client:i}=e;return pe({enabled:!!n&&!!i,queryFn:async()=>{if(t){const{getCurrencyMetadata:f}=await u(async()=>{const{getCurrencyMetadata:g}=await import("./getCurrencyMetadata-B6uMlDub.js");return{getCurrencyMetadata:g}},__vite__mapDeps([50,1,2,28,29,5,19,13,30]));return await f({contract:cn({address:t,chain:n,client:i})})}const{getChainDecimals:r,getChainNativeCurrencyName:o,getChainSymbol:s}=await u(async()=>{const{getChainDecimals:f,getChainNativeCurrencyName:m,getChainSymbol:g}=await import("./index-B6-Xobl2.js").then(w=>w.ba);return{getChainDecimals:f,getChainNativeCurrencyName:m,getChainSymbol:g}},__vite__mapDeps([1,2])),[c,l,h]=await Promise.all([s(n),r(n),o(n)]);return{decimals:l,name:h,symbol:c}},queryKey:["tokenInfo",(n==null?void 0:n.id)||-1,{tokenAddress:t}]})}const iw=e=>a.jsxs(M,{style:{alignItems:"center",display:"flex",flexShrink:0,position:"relative"},children:[a.jsx(He,{client:e.client,fallbackImage:Mr,height:e.size,src:EE(e),width:e.size}),e.active&&a.jsx(A0,{className:"tw-chain-active-dot-legacy-chain-icon"})]}),EE=e=>{const n=e.chainIconUrl;if(!n)return Mr;try{return gr({client:e.client,uri:n})}catch{return Mr}};function TE(e){const[n,t]=y.useState("base"),[i,r]=y.useState(""),o=e.chain,s=j2(o),c=Hh(o),l=nw({chain:o,client:e.client,tokenAddress:i}),h=e.connectLocale.sendFundsScreen;let d=e.tokenList;l.data&&i&&(d=[{...l.data,address:i},...d]);const f=i?d.filter(g=>{const w=i.toLowerCase();return g.name.toLowerCase().includes(w)||g.symbol.toLowerCase().includes(w)||g.address.includes(i)}):d,{chainSelection:m}=e;return n==="select-chain"&&m?a.jsx(Zp,{className:"tw-send-funds-screen tw-send-funds-screen__select-chain",chains:m.chains,client:e.client,closeModal:()=>t("base"),connectLocale:e.connectLocale,networkSelector:{renderChain(g){return a.jsx(Gp,{chain:g.chain,client:e.client,confirming:!1,connectLocale:e.connectLocale,onClick:()=>{m.select(g.chain),t("base")},switchingFailed:!1})}},onBack:()=>t("base"),showTabs:!1}):a.jsxs(M,{className:"tw-send-funds-screen tw-send-funds-screen__select-token",animate:"fadein",style:{minHeight:"300px"},children:[a.jsx(M,{p:"lg",children:a.jsx(_e,{onBack:e.onBack,title:e.modalTitle||h.selectTokenTitle})}),a.jsx(Re,{}),a.jsxs(M,{scrollY:!0,style:{maxHeight:"450px"},children:[a.jsx(U,{y:"md"}),e.chainSelection&&a.jsxs(M,{px:"lg",children:[a.jsx(k,{size:"sm",children:"Select Network"}),a.jsx(U,{y:"xxs"}),a.jsxs(rw,{fullWidth:!0,onClick:()=>{t("select-chain")},variant:"secondary",children:[a.jsx(iw,{chainIconUrl:c.url,client:e.client,size:A.lg}),s.name?a.jsx(k,{color:"primaryText",size:"sm",children:s.name}):a.jsx(ge,{height:ie.md}),a.jsx(sl,{height:A.sm,style:{marginLeft:"auto"},width:A.sm})]}),a.jsx(U,{y:"xl"}),a.jsx(k,{size:"sm",children:"Select Token"})]}),a.jsxs(M,{px:"lg",children:[a.jsx(U,{y:"xs"}),a.jsx(xr,{onChange:g=>{r(g.target.value)},placeholder:h.searchToken,value:i,variant:"outline"})]}),a.jsx(U,{y:"md"}),(f.length>0||!i)&&a.jsxs(M,{flex:"column",gap:"xs",px:"lg",scrollY:!0,style:{paddingBottom:P.lg,paddingTop:0},children:[!i&&a.jsx(vf,{chain:e.chain,client:e.client,onClick:()=>{e.onTokenSelect(Tc)},token:Tc}),f.map(g=>a.jsx(vf,{chain:e.chain,client:e.client,onClick:()=>e.onTokenSelect(g),token:g},g.address))]}),f.length===0&&l.isLoading&&i&&a.jsx(M,{animate:"fadein",center:"both",color:"secondaryText",flex:"column",gap:"md",p:"lg",style:{minHeight:"200px",paddingTop:0},children:a.jsx(ke,{color:"accentText",size:"lg"})}),f.length===0&&!l.isLoading&&i&&a.jsxs(M,{animate:"fadein",center:"both",color:"secondaryText",flex:"column",gap:"md",p:"lg",style:{minHeight:"200px",paddingTop:0},children:[a.jsx(Cr,{height:A.lg,width:A.lg}),h.noTokensFound]}),a.jsx(U,{y:"md"})]})]})}function vf(e){var r;const n=yt(),t=nw({chain:e.chain,client:e.client,tokenAddress:fr(e.token)?void 0:e.token.address}),i=fr(e.token)?(r=t.data)==null?void 0:r.name:e.token.name;return a.jsxs(rw,{fullWidth:!0,onClick:e.onClick,variant:"secondary",children:[a.jsx(z0,{chain:e.chain,client:e.client,size:"lg",token:e.token}),a.jsxs(M,{flex:"column",gap:"4xs",children:[i?a.jsx(k,{color:"primaryText",size:"sm",children:i}):a.jsx(ge,{height:ie.md,width:"150px"}),n&&a.jsx(vE,{account:n,chain:e.chain,client:e.client,tokenAddress:fr(e.token)?void 0:e.token.address})]})]})}function vE(e){const n=pe({queryFn:async()=>OI({account:e.account,chain:e.chain,client:e.client,tokenAddress:e.tokenAddress}),queryKey:["tokenBalance",e]});return n.data?a.jsxs(k,{size:"xs",children:[" ",Hs(n.data)]}):a.jsx(ge,{height:ie.xs,width:"100px"})}const rw=ze(ae)(()=>{const e=X();return{"&:hover":{background:e.colors.secondaryButtonBg,transform:"scale(1.01)"},background:e.colors.tertiaryBg,gap:P.sm,justifyContent:"flex-start",padding:P.sm,transition:"background 200ms ease, transform 150ms ease"}});function NE(e){const[n,t]=y.useState("base"),i=lt(),r=i==null?void 0:i.id,{connectLocale:o,client:s}=e;let c=Tc;const l=e.supportedTokens||Fs;if(r&&l[r]&&l[r]!==Fs[r]){const x=l[r],I=x==null?void 0:x[0];I&&(c=I)}const[h,d]=y.useState(c),[f,m]=y.useState(""),[g,w]=y.useState("0"),p=lt(),_=(p!=null&&p.id?l[p.id]:void 0)||[];return n==="tokenSelector"&&p?a.jsx(TE,{chain:p,client:s,connectLocale:o,onBack:()=>{t("base")},onTokenSelect:x=>{d(x),t("base")},tokenList:_}):a.jsx(SE,{amount:g,client:s,connectLocale:o,onBack:e.onBack,onTokenSelect:()=>{t("tokenSelector")},receiverAddress:f,setAmount:w,setReceiverAddress:m,token:h})}function SE(e){var I,b;const n=e.connectLocale.sendFundsScreen,t=e.token&&"address"in e.token?e.token.address:void 0,i=lt(),r=yt(),o=lt(),s=il({address:r==null?void 0:r.address,chain:i,client:e.client,tokenAddress:t}),{receiverAddress:c,setReceiverAddress:l,amount:h,setAmount:d}=e,f=LE(e.client);function m(j){var E;const C=((E=j==null?void 0:j.data)==null?void 0:E.message)||(j==null?void 0:j.message);return C?C.includes("user rejected")||C.includes("user closed modal")||C.includes("user denied")?n.transactionRejected:C.includes("insufficient funds")?n.insufficientFunds:C:n.transactionFailed}const g=y.useId(),w=y.useId(),p=y.useId();if(!o)return null;if(f.isError)return a.jsxs(M,{animate:"fadein",p:"lg",className:"tw-send-funds-screen tw-send-funds-screen__error",children:[a.jsx(_e,{onBack:()=>{f.reset()},title:n.title}),a.jsx(U,{y:"xl"}),a.jsxs(M,{animate:"fadein",center:"both",color:"danger",flex:"column",gap:"lg",style:{minHeight:"200px"},children:[a.jsx(Cr,{height:A.xl,width:A.xl}),a.jsx(k,{center:!0,color:"danger",multiline:!0,children:m(f.error)})]})]});if(f.isSuccess)return a.jsxs(M,{animate:"fadein",p:"lg",className:"tw-send-funds-screen tw-send-funds-screen__success",children:[a.jsx(_e,{onBack:()=>{f.reset()},title:n.title}),a.jsxs(M,{animate:"fadein",center:"both",color:"success",flex:"column",gap:"lg",style:{minHeight:"250px"},children:[a.jsx(ob,{height:A.xl,width:A.xl}),a.jsxs(k,{color:"success",children:[" ",n.successMessage," "]})]})]});const _=(e.token&&"name"in e.token?e.token.name:void 0)||((I=s==null?void 0:s.data)==null?void 0:I.name),x=(e.token&&"symbol"in e.token?e.token.symbol:void 0)||((b=s==null?void 0:s.data)==null?void 0:b.symbol);return a.jsxs(M,{animate:"fadein",p:"lg",className:"tw-send-funds-screen tw-send-funds-screen__form",children:[a.jsx(_e,{onBack:e.onBack,title:n.title}),a.jsx(U,{y:"xl"}),a.jsxs("form",{onSubmit:j=>{j.preventDefault()},children:[a.jsx(Hl,{color:"secondaryText",htmlFor:g,children:n.token}),a.jsx(U,{y:"sm"}),a.jsxs(ae,{className:"tw-select-token-button",fullWidth:!0,id:g,onClick:e.onTokenSelect,style:{gap:P.sm,justifyContent:"flex-start",padding:P.sm},variant:"outline",children:[a.jsx(z0,{chain:o,client:e.client,size:"lg",token:e.token}),a.jsxs(M,{flex:"column",gap:"xs",children:[_?a.jsx(k,{color:"primaryText",size:"sm",children:_}):a.jsx(ge,{height:ie.xs,width:"150px"}),s.data?a.jsx(k,{size:"xs",children:Hs(s.data)}):a.jsx(ge,{height:ie.xs,width:"100px"})]})]}),a.jsx(U,{y:"lg"}),a.jsx(Hl,{color:"secondaryText",htmlFor:w,children:n.sendTo}),a.jsx(U,{y:"sm"}),a.jsx(xr,{className:"tw-address-input",id:w,onChange:j=>{l(j.target.value)},placeholder:"0x... or ENS name",required:!0,value:c,variant:"outline"}),a.jsx(U,{y:"lg"}),a.jsx(Hl,{color:"secondaryText",htmlFor:p,children:n.amount}),a.jsx(U,{y:"sm"}),a.jsxs(M,{relative:!0,children:[a.jsx(xr,{className:"tw-amount-input",id:p,onChange:j=>{d(j.target.value)},required:!0,type:"number",value:h,variant:"outline"}),a.jsx(AE,{children:a.jsxs(k,{size:"xs",children:[" ",x," "]})})]}),a.jsx(U,{y:"xxl"}),a.jsxs(ae,{className:"tw-send-funds-button",fullWidth:!0,onClick:async()=>{!c||!h||await f.mutateAsync({amount:h,receiverAddress:c,tokenAddress:t})},style:{alignItems:"center",gap:P.sm,padding:P.md},type:"submit",variant:"accent",children:[f.isPending&&a.jsx(ke,{color:"accentButtonText",size:"sm"}),f.isPending?n.sending:n.submitButton]})]})]})}const AE=Se({position:"absolute",right:P.sm,top:"50%",transform:"translateY(-50%)"});function DE({selected:e,onSelect:n,options:t,children:i}){const r=X();return a.jsxs("div",{children:[a.jsx(M,{bg:"secondaryButtonBg",center:"y",flex:"row",p:"xxs",style:{borderRadius:G.lg,width:"100%"},children:t.map(o=>a.jsx(ae,{onClick:()=>n(o.value),style:{alignItems:"center",backgroundColor:o.value===e?r.colors.modalBg:"transparent",borderRadius:G.md,display:"flex",flex:1,justifyContent:"center",paddingBlock:P.sm,position:"relative"},type:"button",variant:"accent",children:a.jsx(k,{color:o.value===e?"primaryText":"secondaryText",size:"sm",style:{textAlign:"center"},children:o.label})},o.value))}),a.jsx(U,{y:"sm"}),i]})}const OE=e=>a.jsxs("svg",{fill:"none",height:e.size,role:"presentation",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("rect",{height:"18",rx:"2",ry:"2",width:"18",x:"3",y:"3"}),a.jsx("circle",{cx:"9",cy:"9",r:"2"}),a.jsx("path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"})]}),kE=e=>a.jsxs("svg",{height:"16",role:"presentation",viewBox:"0 0 32 32",width:"16",...e,children:[a.jsx("circle",{cx:"9",cy:"28.5",fill:"currentColor",r:"1.5"}),a.jsx("path",{d:"M10 25H8v-4h2a2 2 0 0 0 0-4H8a2.002 2.002 0 0 0-2 2v.5H4V19a4.005 4.005 0 0 1 4-4h2a4 4 0 0 1 0 8Z",fill:"currentColor"}),a.jsx("path",{d:"m27.7 9.3l-7-7A.908.908 0 0 0 20 2H10a2.006 2.006 0 0 0-2 2v8h2V4h8v6a2.006 2.006 0 0 0 2 2h6v16H14v2h12a2.006 2.006 0 0 0 2-2V10a.91.91 0 0 0-.3-.7ZM20 10V4.4l5.6 5.6Z",fill:"currentColor"})]}),zE=e=>a.jsxs("svg",{height:"16",role:"presentation",viewBox:"0 0 32 32",width:"16",...e,children:[a.jsx("path",{d:"M29 31a.999.999 0 0 1-.625-.22L23.65 27H20a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1h3.65l4.726-3.78A1 1 0 0 1 30 17v13a1 1 0 0 1-1 1Zm-8-6h3a1 1 0 0 1 .625.22L28 27.92v-8.84l-3.376 2.7A1 1 0 0 1 24 22h-3Z",fill:"currentColor"}),a.jsx("path",{d:"M16 28H8V4h8v6a2.006 2.006 0 0 0 2 2h6v3h2v-5a.91.91 0 0 0-.3-.7l-7-7A.909.909 0 0 0 18 2H8a2.006 2.006 0 0 0-2 2v24a2.006 2.006 0 0 0 2 2h8Zm2-23.6l5.6 5.6H18Z",fill:"currentColor"})]}),PE=e=>a.jsx("svg",{height:"16",role:"presentation",viewBox:"0 0 32 32",width:"16",...e,children:a.jsx("path",{d:"M12 6h-2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2zm10 0h-2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2z",fill:"currentColor"})}),RE=e=>a.jsx("svg",{height:"16",role:"presentation",viewBox:"0 0 32 32",width:"16",...e,children:a.jsx("path",{d:"M7 28a1 1 0 0 1-1-1V5a1 1 0 0 1 1.482-.876l20 11a1 1 0 0 1 0 1.752l-20 11A1 1 0 0 1 7 28Z",fill:"currentColor"})}),wo="audio/mpeg",Ya="audio/midi",Fa="audio/ogg",du="image/jpeg",VE={"*3gpp":"audio/3gpp","*jpm":"video/jpm","*mp3":"audio/mp3","*wav":"audio/wave","*x3db":"model/x3d+binary","*x3dv":"model/x3d+vrml","3g2":"video/3gpp2","3gp":"video/3gpp","3gpp":"video/3gpp","3mf":"model/3mf",adp:"audio/adpcm",amr:"audio/amr",apng:"image/apng",au:"audio/basic",avif:"image/avif",bmp:"image/bmp",cgm:"image/cgm",drle:"image/dicom-rle",emf:"image/emf",exr:"image/aces",fits:"image/fits",g3:"image/g3fax",gif:"image/gif",glb:"model/gltf-binary",gltf:"model/gltf+json",h261:"video/h261",h263:"video/h263",h264:"video/h264",heic:"image/heic",heics:"image/heic-sequence",heif:"image/heif",heifs:"image/heif-sequence",hej2:"image/hej2k",hsj2:"image/hsj2",htm:"text/html",html:"text/html",ief:"image/ief",iges:"model/iges",igs:"model/iges",jhc:"image/jphc",jls:"image/jls",jp2:"image/jp2",jpe:du,jpeg:du,jpf:"image/jpx",jpg:du,jpg2:"image/jp2",jpgm:"video/jpm",jpgv:"video/jpeg",jph:"image/jph",jpm:"image/jpm",jpx:"image/jpx",jxr:"image/jxr",jxra:"image/jxra",jxrs:"image/jxrs",jxs:"image/jxs",jxsc:"image/jxsc",jxsi:"image/jxsi",jxss:"image/jxss",kar:Ya,ktx:"image/ktx",ktx2:"image/ktx2",m1v:"video/mpeg",m2a:wo,m2v:"video/mpeg",m3a:wo,m4a:"audio/mp4",m4s:"video/iso.segment",mesh:"model/mesh",mid:Ya,midi:Ya,mj2:"video/mj2",mjp2:"video/mj2",mkv:"video/x-matroska",mov:"video/quicktime",mp2:wo,mp2a:wo,mp3:wo,mp4:"video/mp4",mp4a:"audio/mp4",mp4v:"video/mp4",mpe:"video/mpeg",mpeg:"video/mpeg",mpg:"video/mpeg",mpg4:"video/mp4",mpga:wo,msh:"model/mesh",mtl:"model/mtl",mxmf:"audio/mobile-xmf",obj:"model/obj",oga:Fa,ogg:Fa,ogv:"video/ogg",opus:Fa,png:"image/png",qt:"video/quicktime",rmi:Ya,s3m:"audio/s3m",sgi:"image/sgi",shtml:"text/html",sil:"audio/silk",silo:"model/mesh",snd:"audio/basic",spx:Fa,stl:"model/stl",svg:"image/svg+xml",svgz:"image/svg+xml",t38:"image/t38",tfx:"image/tiff-fx",tif:"image/tiff",tiff:"image/tiff",ts:"video/mp2t",vrml:"model/vrml",wav:"audio/wav",weba:"audio/webm",webm:"video/webm",webp:"image/webp",wmf:"image/wmf",wrl:"model/vrml",x3d:"model/x3d+xml",x3db:"model/x3d+fastinfoset",x3dbz:"model/x3d+binary",x3dv:"model/x3d-vrml",x3dvz:"model/x3d+vrml",x3dz:"model/x3d+xml",xm:"audio/xm"};function UE(e){const n=e.replace(/^.*[/\\]/,"").toLowerCase(),t=n.replace(/^.*\./,"").toLowerCase(),i=n.length<e.length;return(t.length<n.length-1||!i)&&VE[t]||null}async function BE(e){if(!e)return;const n=UE(e);if(n)return n;const t=e.startsWith("blob:")?await fetch(e):await fetch(e,{method:"HEAD"});if(t.ok&&t.headers.has("content-type"))return t.headers.get("content-type")||void 0}function Nf(e,n,t,i){const r=y.useMemo(()=>{if(!n)return"";if(n.startsWith("ar://"))return q3({gatewayUrl:i,uri:n});if(i)return n.replace("ipfs://",i);try{return gr({client:e,uri:n})}catch{return n.replace("ipfs://","https://ipfs.io/ipfs/")}},[n,i,e]),o=pe({enabled:!!r&&!t,initialData:t,queryFn:()=>BE(r),queryKey:["mime-type",r]});return{isFetched:o.isFetched||!!t,mediaInfo:{mimeType:o.data||"image/",url:r}}}const WE=y.forwardRef(function({src:n,poster:t,alt:i,gatewayUrl:r,requireInteraction:o=!1,width:s="300px",height:c="300px",style:l,mimeType:h,client:d,controls:f,className:m},g){var I,b;const w={objectFit:"contain",...l},{mediaInfo:p,isFetched:_}=Nf(d,n??void 0,h,r),{mediaInfo:x}=Nf(d,t??void 0,void 0,r);if(!_||!n)return a.jsx("div",{className:m,style:l});{if(p.mimeType.startsWith("text/html"))return a.jsx(FE,{alt:i,className:m,poster:x.url,ref:g,requireInteraction:o,src:p.url,style:w});if(p.mimeType.startsWith("model")&&(console.error("Encountered an unsupported media type. 3D model support was removed in v5.92.0. To add a 3D model to your app, use @google/model-viewer and use the ModelViewer component."),(I=x.mimeType)!=null&&I.startsWith("image/")))return a.jsx(Sf,{alt:i,className:m,height:c,ref:g,src:x.url,style:w,width:s});if(p.mimeType.startsWith("video"))return a.jsx($E,{className:m,controls:f,poster:(b=x.mimeType)!=null&&b.startsWith("image/")?x.url:void 0,ref:g,requireInteraction:o,src:p.url,style:w});if(p.mimeType.startsWith("audio"))return a.jsx(YE,{alt:i,className:m,controls:f,height:c,poster:x.url,ref:g,src:p.url,style:w,width:s});if(p.mimeType.startsWith("image/"))return a.jsx(Sf,{alt:i,className:m,height:c,ref:g,src:p.url,style:w,width:s})}return a.jsx(bl,{alt:i,className:m,ref:g,src:p.url,style:w})}),P0=({onClick:e,isPlaying:n})=>{const[t,i]=y.useState(!1),r=()=>i(!0),o=()=>i(!1),s=()=>i(!1),c=()=>i(!0);return a.jsx("button",{onClick:e,onMouseDown:s,onMouseEnter:r,onMouseLeave:o,onMouseUp:c,style:{backgroundColor:"#fff",border:"1px solid rgb(229, 232, 235)",borderRadius:"50%",bottom:0,color:"rgb(138, 147, 155)",cursor:"pointer",display:"grid",height:"32px",padding:0,placeItems:"center",position:"absolute",right:0,transform:"translate(-25%, -25%)",width:"32px",zIndex:3,...t?{boxShadow:"rgb(4 17 29 / 25%) 0px 0px 8px 0px",color:"rgb(53, 56, 64)"}:{}},type:"button",children:n?a.jsx(PE,{}):a.jsx(RE,{})})},Sf=y.forwardRef(function(n,t){const{style:i,src:r,alt:o,className:s,height:c,width:l}=n,[h,d]=y.useState(!1);return h?a.jsx(bl,{alt:o,className:s,ref:t,src:r,style:i}):a.jsx("img",{alt:o,className:s,height:c,onError:()=>{d(!0)},ref:t,src:r??void 0,style:i,width:l})}),$E=y.forwardRef(function({src:n,alt:t,poster:i,requireInteraction:r,style:o,width:s,height:c,controls:l,className:h},d){const f=y.useRef(null),[m,g]=y.useState(!r),[w,p]=y.useState(!0),[_,x]=y.useState(!1);return y.useEffect(()=>{if(f.current)if(m)try{f.current.play()}catch(I){console.error("Error playing video",I)}else try{f.current.pause(),f.current.currentTime=0}catch(I){console.error("Error pausing video",I)}},[m]),_?a.jsx(bl,{alt:t,className:h,ref:d,src:n,style:o}):a.jsxs("div",{className:h,style:{position:"relative",...o},children:[a.jsx("video",{controls:l,controlsList:"nodownload",height:c,loop:!0,muted:w,onCanPlay:()=>{var I;m&&((I=f.current)==null||I.play())},onError:()=>{x(!0)},playsInline:!0,poster:i??void 0,preload:i?"metadata":"auto",ref:ow([f,d]),src:n??void 0,style:{height:"100%",objectFit:"contain",opacity:i?m?1:0:1,transition:"opacity .5s",width:"100%",zIndex:1},width:s}),i&&a.jsx("img",{alt:t,src:i,style:{bottom:0,height:"100%",left:0,objectFit:"contain",opacity:m?0:1,pointerEvents:"none",position:"absolute",right:0,top:0,transition:"opacity .5s",width:"100%",zIndex:2}}),a.jsx(P0,{isPlaying:m,onClick:()=>{g(I=>!I),p(!1)}})]})}),YE=y.forwardRef(function({src:n,alt:t,poster:i,style:r,height:o,width:s,className:c,controls:l},h){const d=y.useRef(null),[f,m]=y.useState(!1),[g,w]=y.useState(!0),[p,_]=y.useState(!1);return y.useEffect(()=>{d.current&&(f?d.current.play():(d.current.pause(),d.current.currentTime=0))},[f]),p?a.jsx(bl,{alt:t,className:c,ref:h,src:n,style:r}):a.jsxs("div",{className:c,style:{position:"relative",...r},children:[i?a.jsx("img",{alt:t,height:o,src:i,style:{height:"100%",objectFit:"contain",pointerEvents:"none",width:"100%"},width:s}):a.jsx("div",{style:{backgroundColor:"#fff",color:"rgb(138, 147, 155)",display:"grid",height:"100%",placeItems:"center",pointerEvents:"none",width:"100%"},children:a.jsx(zE,{style:{height:"64px",width:"64px"}})}),a.jsx(P0,{isPlaying:f,onClick:()=>{m(x=>!x),w(!1)}}),a.jsx("audio",{controls:l,controlsList:"nodownload",loop:!0,muted:g,onError:()=>{_(!0)},playsInline:!0,preload:"none",ref:ow([d,h]),src:n??void 0,style:{opacity:0,pointerEvents:"none",position:"absolute",visibility:"hidden",zIndex:-1}})]})}),FE=y.forwardRef(function({src:n,alt:t,poster:i,requireInteraction:r,style:o,...s},c){const[l,h]=y.useState(!r);return a.jsxs("div",{style:{position:"relative",...o},...s,children:[a.jsx("iframe",{allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",ref:c,sandbox:"allow-scripts",src:l?n??void 0:void 0,style:{border:"none",height:"100%",objectFit:"contain",opacity:i?l?1:0:1,transition:"opacity .5s",width:"100%",zIndex:1},title:t||"thirdweb iframe player"}),i&&a.jsx("img",{alt:t,src:i,style:{bottom:0,height:"100%",left:0,objectFit:"contain",opacity:l?0:1,pointerEvents:"none",position:"absolute",right:0,top:0,transition:"opacity .5s",width:"100%",zIndex:2}}),a.jsx(P0,{isPlaying:l,onClick:()=>{h(d=>!d)}})]})}),bl=y.forwardRef(function({src:n,alt:t,style:i,className:r},o){return a.jsx("div",{className:r,style:{position:"relative",...i},children:a.jsx("div",{style:{backgroundColor:"#fff",color:"rgb(138, 147, 155)",display:"grid",height:"100%",placeItems:"center",width:"100%"},children:a.jsxs("div",{style:{alignItems:"center",display:"flex",flexDirection:"column",flexWrap:"nowrap",gap:"8px"},children:[a.jsx(kE,{style:{aspectRatio:"1",maxWidth:"128px",minWidth:"48px",width:"50%"}}),a.jsx("a",{href:n??void 0,ref:o,rel:"noopener noreferrer",style:{color:"rgb(138, 147, 155)",textDecoration:"underline"},target:"_blank",children:t||"File"})]})})})});function ow(e){return n=>{for(const t of e)typeof t=="function"?t(n):t!=null&&(t.current=n)}}function QE(e){return a.jsxs(M,{style:{minHeight:"300px"},children:[a.jsx(M,{p:"lg",children:a.jsx(_e,{onBack:e.onBack,title:e.connectLocale.viewFunds.viewNFTs})}),a.jsx(Re,{}),a.jsxs(M,{px:"sm",scrollY:!0,style:{maxHeight:"500px"},children:[a.jsx(U,{y:"md"}),a.jsx(sw,{...e})]})]})}function sw(e){var o;const n=yt(),t=lt(),i=pe({enabled:!!t&&!!n,queryFn:async()=>{var c,l;if(!n)throw new Error("No active account");if(!t)throw new Error("No active chain");return(await IM({chains:[t],client:e.client,ownerAddress:n.address,contractAddresses:(l=(c=e.supportedNFTs)==null?void 0:c[t.id])==null?void 0:l.map(h=>h.toLowerCase())})).filter(h=>!!h.metadata.name&&!!h.metadata.image).map(h=>({address:h.tokenAddress,chain:Ve(h.chainId),...h}))},queryKey:["nfts",t==null?void 0:t.id,n==null?void 0:n.address,e.supportedNFTs]});if(!(t!=null&&t.id)||!(n!=null&&n.address))return null;const r=i.data;return a.jsxs(a.Fragment,{children:[i.error?a.jsx(M,{center:"both",py:"lg",children:a.jsx(k,{center:!0,color:"secondaryText",size:"sm",children:"Error loading NFTs"})}):((o=i.data)==null?void 0:o.length)===0&&!i.isLoading?a.jsx(M,{center:"both",py:"lg",children:a.jsx(k,{center:!0,color:"secondaryText",size:"sm",children:"No NFTs found on this chain"})}):a.jsx(M,{style:{display:"grid",gap:"12px",gridTemplateColumns:"1fr 1fr"},children:i.isLoading||!r?a.jsxs(a.Fragment,{children:[a.jsx(ge,{height:"150px",width:"150px"}),a.jsx(ge,{height:"150px",width:"150px"}),a.jsx(ge,{height:"150px",width:"150px"})]}):r.map(s=>a.jsx(HE,{...s,chain:s.chain,client:e.client,theme:e.theme},`${s.chain.id}:${s.address}:${s.id}`))}),a.jsx(U,{y:"lg"})]})}function HE(e){var r;const n=typeof e.theme=="string"?e.theme:e.theme.type,t=typeof e.theme=="string"?void 0:e.theme,i=a.jsxs("div",{style:{alignItems:"center",display:"flex",flexDirection:"column",gap:"4px",width:"150px"},children:[a.jsxs("div",{style:{alignItems:"center",background:n==="light"?"rgba(0, 0, 0, 0.10)":"rgba(0, 0, 0, 0.20)",borderRadius:"8px",display:"flex",flexShrink:0,height:"150px",overflow:"hidden",position:"relative",width:"150px"},children:[e.metadata.image&&a.jsx(WE,{client:e.client,src:e.metadata.image,style:{height:"100%",width:"100%"}}),e.quantityOwned>1&&a.jsx("div",{style:{alignItems:"center",background:((r=t==null?void 0:t.colors)==null?void 0:r.modalBg)??(n==="light"?"white":"black"),borderRadius:"100%",bottom:"4px",display:"flex",fontSize:"10px",height:"20px",justifyContent:"center",padding:"4px 4px",position:"absolute",right:"4px",width:"20px"},children:e.quantityOwned.toString()}),e.chain.icon&&a.jsx("img",{alt:e.chain.name,src:e.chain.icon.url,style:{bottom:"4px",height:"20px",left:"4px",position:"absolute",width:"20px"}})]}),a.jsx(k,{color:"primaryText",size:"xs",style:{fontWeight:600,maxLines:2,textAlign:"center"},children:e.metadata.name})]});return e.chain.name?a.jsx("a",{href:`https://thirdweb.com/${e.chain.id}/${e.address}/nfts/${e.id}`,rel:"noreferrer",target:"_blank",children:i}):i}function ZE(e){return a.jsxs(M,{style:{minHeight:"300px"},children:[a.jsx(M,{p:"lg",children:a.jsx(_e,{onBack:e.onBack,title:e.connectLocale.viewFunds.viewTokens})}),a.jsx(Re,{}),a.jsxs(M,{px:"sm",scrollY:!0,style:{maxHeight:"500px"},children:[a.jsx(U,{y:"md"}),a.jsx(aw,{...e}),a.jsx(U,{y:"lg"})]})]})}function aw(e){var s;const n=yt(),t=lt(),i=e.supportedTokens||Fs,r=(t!=null&&t.id?i[t.id]:void 0)||[],o=pe({enabled:!!t&&!!n&&(!e.supportedTokens||!e.supportedTokens[t.id]),queryFn:async()=>{if(!t)throw new Error("No active chain");if(!n)throw new Error("No account");return(await bM({chains:[t],client:e.client,ownerAddress:n.address})).filter(l=>{var h;return!((h=Fs[t.id])!=null&&h.some(d=>d.address.toLowerCase()===l.tokenAddress.toLowerCase()))})},queryKey:["tokens",t==null?void 0:t.id,n==null?void 0:n.address]});return!t||!n?null:a.jsxs(a.Fragment,{children:[a.jsx(hu,{chain:t,client:e.client,token:Tc}),r.map(c=>a.jsx(hu,{chain:t,client:e.client,token:c},c.address)),o.isLoading&&a.jsxs(M,{flex:"column",gap:"sm",p:"sm",children:[a.jsx(ge,{height:ie.md,width:"100%"}),a.jsx(ge,{height:ie.md,width:"100%"})]}),(s=o.data)==null?void 0:s.map(c=>a.jsx(hu,{balanceData:c,chain:t,client:e.client,token:{address:c.tokenAddress,name:c.name??"",symbol:c.symbol??""}},c.tokenAddress))]})}function hu(e){var r;const n=yt(),t=il({address:n==null?void 0:n.address,chain:e.chain,client:e.client,tokenAddress:fr(e.token)?void 0:e.token.address},{enabled:e.balanceData===void 0}),i=fr(e.token)?(r=t.data)==null?void 0:r.name:e.token.name;return a.jsxs(M,{flex:"row",gap:"sm",p:"sm",children:[a.jsx(z0,{chain:e.chain,client:e.client,size:"lg",token:e.token}),a.jsxs(M,{flex:"column",gap:"xxs",children:[i?a.jsx(k,{color:"primaryText",size:"sm",children:i}):a.jsx(ge,{height:ie.md,width:"150px"}),e.balanceData?a.jsxs(k,{size:"xs",children:[" ",Hs(e.balanceData)]}):t.data?a.jsxs(k,{size:"xs",children:[" ",Hs(t.data)]}):a.jsx(ge,{height:ie.xs,width:"100px"})]})]})}const Af={label:a.jsxs("span",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[a.jsx(Il,{size:A.sm})," Tokens"]}),value:"Tokens"},Df={label:a.jsxs("span",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[a.jsx(OE,{size:A.sm})," NFTs"]}),value:"NFTs"};function GE(e){var o;const{connectLocale:n}=e,t=y.useMemo(()=>{if(!e.assetTabs)return[Af,Df];if(!e.assetTabs.length)return[];const s=[];for(const c of e.assetTabs)c==="token"?s.push(Af):c==="nft"&&s.push(Df);return s},[e.assetTabs]),[i,r]=y.useState(((o=t[0])==null?void 0:o.value)||"Tokens");return a.jsxs(M,{animate:"fadein",style:{minHeight:"300px"},children:[a.jsx(M,{p:"lg",children:a.jsx(_e,{onBack:e.onBack,title:n.viewFunds.viewAssets})}),a.jsx(Re,{}),a.jsxs(M,{px:"lg",scrollY:!0,style:{minHeight:"330px"},children:[a.jsx(U,{y:"md"}),a.jsx(DE,{onSelect:r,options:t,selected:i,children:a.jsxs(M,{scrollY:!0,style:{maxHeight:"300px"},children:[i==="Tokens"&&a.jsx(aw,{client:e.client,connectLocale:n,supportedTokens:e.supportedTokens}),i==="NFTs"&&a.jsx(sw,{client:e.client,connectLocale:n,supportedNFTs:e.supportedNFTs,theme:e.theme})]})}),a.jsx(U,{y:"lg"})]})]})}const Of=K3;var Eo=ni;const qs=oT().console||{},qE={mapHttpRequest:Qa,mapHttpResponse:Qa,wrapRequestSerializer:fu,wrapResponseSerializer:fu,wrapErrorSerializer:fu,req:Qa,res:Qa,err:tT};function KE(e,n){return Array.isArray(e)?e.filter(function(i){return i!=="!stdSerializers.err"}):e===!0?Object.keys(n):!1}function ni(e){e=e||{},e.browser=e.browser||{};const n=e.browser.transmit;if(n&&typeof n.send!="function")throw Error("pino: transmit option must have a send function");const t=e.browser.write||qs;e.browser.write&&(e.browser.asObject=!0);const i=e.serializers||{},r=KE(e.browser.serialize,i);let o=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(o=!1);const s=["error","fatal","warn","info","debug","trace"];typeof t=="function"&&(t.error=t.fatal=t.warn=t.info=t.debug=t.trace=t),e.enabled===!1&&(e.level="silent");const c=e.level||"info",l=Object.create(t);l.log||(l.log=Ks),Object.defineProperty(l,"levelVal",{get:d}),Object.defineProperty(l,"level",{get:f,set:m});const h={transmit:n,serialize:r,asObject:e.browser.asObject,levels:s,timestamp:nT(e)};l.levels=ni.levels,l.level=c,l.setMaxListeners=l.getMaxListeners=l.emit=l.addListener=l.on=l.prependListener=l.once=l.prependOnceListener=l.removeListener=l.removeAllListeners=l.listeners=l.listenerCount=l.eventNames=l.write=l.flush=Ks,l.serializers=i,l._serialize=r,l._stdErrSerialize=o,l.child=g,n&&(l._logEvent=Ad());function d(){return this.level==="silent"?1/0:this.levels.values[this.level]}function f(){return this._level}function m(w){if(w!=="silent"&&!this.levels.values[w])throw Error("unknown level "+w);this._level=w,_o(h,l,"error","log"),_o(h,l,"fatal","error"),_o(h,l,"warn","error"),_o(h,l,"info","log"),_o(h,l,"debug","log"),_o(h,l,"trace","log")}function g(w,p){if(!w)throw new Error("missing bindings for child Pino");p=p||{},r&&w.serializers&&(p.serializers=w.serializers);const _=p.serializers;if(r&&_){var x=Object.assign({},i,_),I=e.browser.serialize===!0?Object.keys(x):r;delete w.serializers,Cl([w],I,x,this._stdErrSerialize)}function b(j){this._childLevel=(j._childLevel|0)+1,this.error=xo(j,w,"error"),this.fatal=xo(j,w,"fatal"),this.warn=xo(j,w,"warn"),this.info=xo(j,w,"info"),this.debug=xo(j,w,"debug"),this.trace=xo(j,w,"trace"),x&&(this.serializers=x,this._serialize=I),n&&(this._logEvent=Ad([].concat(j._logEvent.bindings,w)))}return b.prototype=this,new b(this)}return l}ni.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}};ni.stdSerializers=qE;ni.stdTimeFunctions=Object.assign({},{nullTime:cw,epochTime:lw,unixTime:iT,isoTime:rT});function _o(e,n,t,i){const r=Object.getPrototypeOf(n);n[t]=n.levelVal>n.levels.values[t]?Ks:r[t]?r[t]:qs[t]||qs[i]||Ks,JE(e,n,t)}function JE(e,n,t){!e.transmit&&n[t]===Ks||(n[t]=function(i){return function(){const o=e.timestamp(),s=new Array(arguments.length),c=Object.getPrototypeOf&&Object.getPrototypeOf(this)===qs?qs:this;for(var l=0;l<s.length;l++)s[l]=arguments[l];if(e.serialize&&!e.asObject&&Cl(s,this._serialize,this.serializers,this._stdErrSerialize),e.asObject?i.call(c,XE(this,t,s,o)):i.apply(c,s),e.transmit){const h=e.transmit.level||n.level,d=ni.levels.values[h],f=ni.levels.values[t];if(f<d)return;eT(this,{ts:o,methodLevel:t,methodValue:f,transmitValue:ni.levels.values[e.transmit.level||n.level],send:e.transmit.send,val:n.levelVal},s)}}}(n[t]))}function XE(e,n,t,i){e._serialize&&Cl(t,e._serialize,e.serializers,e._stdErrSerialize);const r=t.slice();let o=r[0];const s={};i&&(s.time=i),s.level=ni.levels.values[n];let c=(e._childLevel|0)+1;if(c<1&&(c=1),o!==null&&typeof o=="object"){for(;c--&&typeof r[0]=="object";)Object.assign(s,r.shift());o=r.length?Of(r.shift(),r):void 0}else typeof o=="string"&&(o=Of(r.shift(),r));return o!==void 0&&(s.msg=o),s}function Cl(e,n,t,i){for(const r in e)if(i&&e[r]instanceof Error)e[r]=ni.stdSerializers.err(e[r]);else if(typeof e[r]=="object"&&!Array.isArray(e[r]))for(const o in e[r])n&&n.indexOf(o)>-1&&o in t&&(e[r][o]=t[o](e[r][o]))}function xo(e,n,t){return function(){const i=new Array(1+arguments.length);i[0]=n;for(var r=1;r<i.length;r++)i[r]=arguments[r-1];return e[t].apply(this,i)}}function eT(e,n,t){const i=n.send,r=n.ts,o=n.methodLevel,s=n.methodValue,c=n.val,l=e._logEvent.bindings;Cl(t,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=r,e._logEvent.messages=t.filter(function(h){return l.indexOf(h)===-1}),e._logEvent.level.label=o,e._logEvent.level.value=s,i(o,e._logEvent,c),e._logEvent=Ad(l)}function Ad(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function tT(e){const n={type:e.constructor.name,msg:e.message,stack:e.stack};for(const t in e)n[t]===void 0&&(n[t]=e[t]);return n}function nT(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?cw:lw}function Qa(){return{}}function fu(e){return e}function Ks(){}function cw(){return!1}function lw(){return Date.now()}function iT(){return Math.round(Date.now()/1e3)}function rT(){return new Date(Date.now()).toISOString()}function oT(){function e(n){return typeof n<"u"&&n}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return e(self)||e(window)||e(this)||{}}}const jl=f3(Eo),sT={level:"info"},Ia="custom_context",R0=1e3*1024;let aT=class{constructor(n){this.nodeValue=n,this.sizeInBytes=new TextEncoder().encode(this.nodeValue).length,this.next=null}get value(){return this.nodeValue}get size(){return this.sizeInBytes}},kf=class{constructor(n){this.head=null,this.tail=null,this.lengthInNodes=0,this.maxSizeInBytes=n,this.sizeInBytes=0}append(n){const t=new aT(n);if(t.size>this.maxSizeInBytes)throw new Error(`[LinkedList] Value too big to insert into list: ${n} with size ${t.size}`);for(;this.size+t.size>this.maxSizeInBytes;)this.shift();this.head?(this.tail&&(this.tail.next=t),this.tail=t):(this.head=t,this.tail=t),this.lengthInNodes++,this.sizeInBytes+=t.size}shift(){if(!this.head)return;const n=this.head;this.head=this.head.next,this.head||(this.tail=null),this.lengthInNodes--,this.sizeInBytes-=n.size}toArray(){const n=[];let t=this.head;for(;t!==null;)n.push(t.value),t=t.next;return n}get length(){return this.lengthInNodes}get size(){return this.sizeInBytes}toOrderedArray(){return Array.from(this)}[Symbol.iterator](){let n=this.head;return{next:()=>{if(!n)return{done:!0,value:null};const t=n.value;return n=n.next,{done:!1,value:t}}}}};class uw{constructor(n,t=R0){this.level=n??"error",this.levelValue=Eo.levels.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=t,this.logs=new kf(this.MAX_LOG_SIZE_IN_BYTES)}forwardToConsole(n,t){t===Eo.levels.values.error?console.error(n):t===Eo.levels.values.warn?console.warn(n):t===Eo.levels.values.debug?console.debug(n):t===Eo.levels.values.trace?console.trace(n):console.log(n)}appendToLogs(n){this.logs.append(Ou({timestamp:new Date().toISOString(),log:n}));const t=typeof n=="string"?JSON.parse(n).level:n.level;t>=this.levelValue&&this.forwardToConsole(n,t)}getLogs(){return this.logs}clearLogs(){this.logs=new kf(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(n){const t=this.getLogArray();return t.push(Ou({extraMetadata:n})),new Blob(t,{type:"application/json"})}}let cT=class{constructor(n,t=R0){this.baseChunkLogger=new uw(n,t)}write(n){this.baseChunkLogger.appendToLogs(n)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(n){return this.baseChunkLogger.logsToBlob(n)}downloadLogsBlobInBrowser(n){const t=URL.createObjectURL(this.logsToBlob(n)),i=document.createElement("a");i.href=t,i.download=`walletconnect-logs-${new Date().toISOString()}.txt`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(t)}},lT=class{constructor(n,t=R0){this.baseChunkLogger=new uw(n,t)}write(n){this.baseChunkLogger.appendToLogs(n)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(n){return this.baseChunkLogger.logsToBlob(n)}};var uT=Object.defineProperty,dT=Object.defineProperties,hT=Object.getOwnPropertyDescriptors,zf=Object.getOwnPropertySymbols,fT=Object.prototype.hasOwnProperty,mT=Object.prototype.propertyIsEnumerable,Pf=(e,n,t)=>n in e?uT(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,zc=(e,n)=>{for(var t in n||(n={}))fT.call(n,t)&&Pf(e,t,n[t]);if(zf)for(var t of zf(n))mT.call(n,t)&&Pf(e,t,n[t]);return e},Pc=(e,n)=>dT(e,hT(n));function V0(e){return Pc(zc({},e),{level:(e==null?void 0:e.level)||sT.level})}function gT(e,n=Ia){return e[n]||""}function yT(e,n,t=Ia){return e[t]=n,e}function Jt(e,n=Ia){let t="";return typeof e.bindings>"u"?t=gT(e,n):t=e.bindings().context||"",t}function pT(e,n,t=Ia){const i=Jt(e,t);return i.trim()?`${i}/${n}`:n}function Rt(e,n,t=Ia){const i=pT(e,n,t),r=e.child({context:i});return yT(r,i,t)}function wT(e){var n,t;const i=new cT((n=e.opts)==null?void 0:n.level,e.maxSizeInBytes);return{logger:jl(Pc(zc({},e.opts),{level:"trace",browser:Pc(zc({},(t=e.opts)==null?void 0:t.browser),{write:r=>i.write(r)})})),chunkLoggerController:i}}function _T(e){var n;const t=new lT((n=e.opts)==null?void 0:n.level,e.maxSizeInBytes);return{logger:jl(Pc(zc({},e.opts),{level:"trace"}),t),chunkLoggerController:t}}function xT(e){return typeof e.loggerOverride<"u"&&typeof e.loggerOverride!="string"?{logger:e.loggerOverride,chunkLoggerController:null}:typeof window<"u"?wT(e):_T(e)}var MT=Object.defineProperty,IT=(e,n,t)=>n in e?MT(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Rf=(e,n,t)=>IT(e,typeof n!="symbol"?n+"":n,t);class bT extends is{constructor(n){super(),this.opts=n,Rf(this,"protocol","wc"),Rf(this,"version",2)}}var CT=Object.defineProperty,jT=(e,n,t)=>n in e?CT(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,LT=(e,n,t)=>jT(e,n+"",t);class ET extends is{constructor(n,t){super(),this.core=n,this.logger=t,LT(this,"records",new Map)}}class TT{constructor(n,t){this.logger=n,this.core=t}}class vT extends is{constructor(n,t){super(),this.relayer=n,this.logger=t}}let NT=class extends is{constructor(n){super()}},ST=class{constructor(n,t,i,r){this.core=n,this.logger=t,this.name=i}},AT=class extends is{constructor(n,t){super(),this.relayer=n,this.logger=t}};class DT extends is{constructor(n,t){super(),this.core=n,this.logger=t}}let OT=class{constructor(n,t,i){this.core=n,this.logger=t,this.store=i}},kT=class{constructor(n,t){this.projectId=n,this.logger=t}},zT=class{constructor(n,t,i){this.core=n,this.logger=t,this.telemetryEnabled=i}};var PT=Object.defineProperty,RT=(e,n,t)=>n in e?PT(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Vf=(e,n,t)=>RT(e,typeof n!="symbol"?n+"":n,t);let VT=class{constructor(n){this.opts=n,Vf(this,"protocol","wc"),Vf(this,"version",2)}},UT=class{constructor(n){this.client=n}};function Js(e,{strict:n=!0}={}){return!e||typeof e!="string"?!1:n?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function Dd(e){return Js(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const dw="2.31.0";let xs={getDocsUrl:({docsBaseUrl:e,docsPath:n="",docsSlug:t})=>n?`${e??"https://viem.sh"}${n}${t?`#${t}`:""}`:void 0,version:`viem@${dw}`};class io extends Error{constructor(n,t={}){var c;const i=(()=>{var l;return t.cause instanceof io?t.cause.details:(l=t.cause)!=null&&l.message?t.cause.message:t.details})(),r=t.cause instanceof io&&t.cause.docsPath||t.docsPath,o=(c=xs.getDocsUrl)==null?void 0:c.call(xs,{...t,docsPath:r}),s=[n||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...o?[`Docs: ${o}`]:[],...i?[`Details: ${i}`]:[],...xs.version?[`Version: ${xs.version}`]:[]].join(`
|
|
289
|
+
`);super(s,t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=i,this.docsPath=r,this.metaMessages=t.metaMessages,this.name=t.name??this.name,this.shortMessage=n,this.version=dw}walk(n){return hw(this,n)}}function hw(e,n){return n!=null&&n(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?hw(e.cause,n):n?null:e}class fw extends io{constructor({size:n,targetSize:t,type:i}){super(`${i.charAt(0).toUpperCase()}${i.slice(1).toLowerCase()} size (${n}) exceeds padding size (${t}).`,{name:"SizeExceedsPaddingSizeError"})}}function ds(e,{dir:n,size:t=32}={}){return typeof e=="string"?BT(e,{dir:n,size:t}):WT(e,{dir:n,size:t})}function BT(e,{dir:n,size:t=32}={}){if(t===null)return e;const i=e.replace("0x","");if(i.length>t*2)throw new fw({size:Math.ceil(i.length/2),targetSize:t,type:"hex"});return`0x${i[n==="right"?"padEnd":"padStart"](t*2,"0")}`}function WT(e,{dir:n,size:t=32}={}){if(t===null)return e;if(e.length>t)throw new fw({size:e.length,targetSize:t,type:"bytes"});const i=new Uint8Array(t);for(let r=0;r<t;r++){const o=n==="right";i[o?r:t-r-1]=e[o?r:e.length-r-1]}return i}class $T extends io{constructor({max:n,min:t,signed:i,size:r,value:o}){super(`Number "${o}" is not in safe ${r?`${r*8}-bit ${i?"signed":"unsigned"} `:""}integer range ${n?`(${t} to ${n})`:`(above ${t})`}`,{name:"IntegerOutOfRangeError"})}}class YT extends io{constructor({givenSize:n,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${n} bytes.`,{name:"SizeOverflowError"})}}function hs(e,{size:n}){if(Dd(e)>n)throw new YT({givenSize:Dd(e),maxSize:n})}function Od(e,n={}){const{signed:t}=n;n.size&&hs(e,{size:n.size});const i=BigInt(e);if(!t)return i;const r=(e.length-2)/2,o=(1n<<BigInt(r)*8n-1n)-1n;return i<=o?i:i-BigInt(`0x${"f".padStart(r*2,"f")}`)-1n}function FT(e,n={}){return Number(Od(e,n))}const QT=Array.from({length:256},(e,n)=>n.toString(16).padStart(2,"0"));function kd(e,n={}){return typeof e=="number"||typeof e=="bigint"?gw(e,n):typeof e=="string"?GT(e,n):typeof e=="boolean"?HT(e,n):mw(e,n)}function HT(e,n={}){const t=`0x${Number(e)}`;return typeof n.size=="number"?(hs(t,{size:n.size}),ds(t,{size:n.size})):t}function mw(e,n={}){let t="";for(let r=0;r<e.length;r++)t+=QT[e[r]];const i=`0x${t}`;return typeof n.size=="number"?(hs(i,{size:n.size}),ds(i,{dir:"right",size:n.size})):i}function gw(e,n={}){const{signed:t,size:i}=n,r=BigInt(e);let o;i?t?o=(1n<<BigInt(i)*8n-1n)-1n:o=2n**(BigInt(i)*8n)-1n:typeof e=="number"&&(o=BigInt(Number.MAX_SAFE_INTEGER));const s=typeof o=="bigint"&&t?-o-1n:0;if(o&&r>o||r<s){const l=typeof e=="bigint"?"n":"";throw new $T({max:o?`${o}${l}`:void 0,min:`${s}${l}`,signed:t,size:i,value:`${e}${l}`})}const c=`0x${(t&&r<0?(1n<<BigInt(i*8))+BigInt(r):r).toString(16)}`;return i?ds(c,{size:i}):c}const ZT=new TextEncoder;function GT(e,n={}){const t=ZT.encode(e);return mw(t,n)}const qT=new TextEncoder;function KT(e,n={}){return typeof e=="number"||typeof e=="bigint"?XT(e,n):typeof e=="boolean"?JT(e,n):Js(e)?yw(e,n):pw(e,n)}function JT(e,n={}){const t=new Uint8Array(1);return t[0]=Number(e),typeof n.size=="number"?(hs(t,{size:n.size}),ds(t,{size:n.size})):t}const ci={zero:48,nine:57,A:65,F:70,a:97,f:102};function Uf(e){if(e>=ci.zero&&e<=ci.nine)return e-ci.zero;if(e>=ci.A&&e<=ci.F)return e-(ci.A-10);if(e>=ci.a&&e<=ci.f)return e-(ci.a-10)}function yw(e,n={}){let t=e;n.size&&(hs(t,{size:n.size}),t=ds(t,{dir:"right",size:n.size}));let i=t.slice(2);i.length%2&&(i=`0${i}`);const r=i.length/2,o=new Uint8Array(r);for(let s=0,c=0;s<r;s++){const l=Uf(i.charCodeAt(c++)),h=Uf(i.charCodeAt(c++));if(l===void 0||h===void 0)throw new io(`Invalid byte sequence ("${i[c-2]}${i[c-1]}" in "${i}").`);o[s]=l*16+h}return o}function XT(e,n){const t=gw(e,n);return yw(t)}function pw(e,n={}){const t=qT.encode(e);return typeof n.size=="number"?(hs(t,{size:n.size}),ds(t,{dir:"right",size:n.size})):t}const Ha=BigInt(2**32-1),Bf=BigInt(32);function ev(e,n=!1){return n?{h:Number(e&Ha),l:Number(e>>Bf&Ha)}:{h:Number(e>>Bf&Ha)|0,l:Number(e&Ha)|0}}function tv(e,n=!1){const t=e.length;let i=new Uint32Array(t),r=new Uint32Array(t);for(let o=0;o<t;o++){const{h:s,l:c}=ev(e[o],n);[i[o],r[o]]=[s,c]}return[i,r]}const nv=(e,n,t)=>e<<t|n>>>32-t,iv=(e,n,t)=>n<<t|e>>>32-t,rv=(e,n,t)=>n<<t-32|e>>>64-t,ov=(e,n,t)=>e<<t-32|n>>>64-t,Mo=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function sv(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Rc(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Xs(e,...n){if(!sv(e))throw new Error("Uint8Array expected");if(n.length>0&&!n.includes(e.length))throw new Error("Uint8Array expected of length "+n+", got length="+e.length)}function kV(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");Rc(e.outputLen),Rc(e.blockLen)}function Wf(e,n=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(n&&e.finished)throw new Error("Hash#digest() has already been called")}function av(e,n){Xs(e);const t=n.outputLen;if(e.length<t)throw new Error("digestInto() expects output buffer of length at least "+t)}function cv(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function ww(...e){for(let n=0;n<e.length;n++)e[n].fill(0)}function zV(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function PV(e,n){return e<<32-n|e>>>n}const lv=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function uv(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function dv(e){for(let n=0;n<e.length;n++)e[n]=uv(e[n]);return e}const $f=lv?e=>e:dv;function hv(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function _w(e){return typeof e=="string"&&(e=hv(e)),Xs(e),e}function RV(...e){let n=0;for(let i=0;i<e.length;i++){const r=e[i];Xs(r),n+=r.length}const t=new Uint8Array(n);for(let i=0,r=0;i<e.length;i++){const o=e[i];t.set(o,r),r+=o.length}return t}class fv{}function mv(e){const n=i=>e().update(_w(i)).digest(),t=e();return n.outputLen=t.outputLen,n.blockLen=t.blockLen,n.create=()=>e(),n}function VV(e=32){if(Mo&&typeof Mo.getRandomValues=="function")return Mo.getRandomValues(new Uint8Array(e));if(Mo&&typeof Mo.randomBytes=="function")return Uint8Array.from(Mo.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}const gv=BigInt(0),Ms=BigInt(1),yv=BigInt(2),pv=BigInt(7),wv=BigInt(256),_v=BigInt(113),xw=[],Mw=[],Iw=[];for(let e=0,n=Ms,t=1,i=0;e<24;e++){[t,i]=[i,(2*t+3*i)%5],xw.push(2*(5*i+t)),Mw.push((e+1)*(e+2)/2%64);let r=gv;for(let o=0;o<7;o++)n=(n<<Ms^(n>>pv)*_v)%wv,n&yv&&(r^=Ms<<(Ms<<BigInt(o))-Ms);Iw.push(r)}const bw=tv(Iw,!0),xv=bw[0],Mv=bw[1],Yf=(e,n,t)=>t>32?rv(e,n,t):nv(e,n,t),Ff=(e,n,t)=>t>32?ov(e,n,t):iv(e,n,t);function Iv(e,n=24){const t=new Uint32Array(10);for(let i=24-n;i<24;i++){for(let s=0;s<10;s++)t[s]=e[s]^e[s+10]^e[s+20]^e[s+30]^e[s+40];for(let s=0;s<10;s+=2){const c=(s+8)%10,l=(s+2)%10,h=t[l],d=t[l+1],f=Yf(h,d,1)^t[c],m=Ff(h,d,1)^t[c+1];for(let g=0;g<50;g+=10)e[s+g]^=f,e[s+g+1]^=m}let r=e[2],o=e[3];for(let s=0;s<24;s++){const c=Mw[s],l=Yf(r,o,c),h=Ff(r,o,c),d=xw[s];r=e[d],o=e[d+1],e[d]=l,e[d+1]=h}for(let s=0;s<50;s+=10){for(let c=0;c<10;c++)t[c]=e[s+c];for(let c=0;c<10;c++)e[s+c]^=~t[(c+2)%10]&t[(c+4)%10]}e[0]^=xv[i],e[1]^=Mv[i]}ww(t)}class U0 extends fv{constructor(n,t,i,r=!1,o=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=n,this.suffix=t,this.outputLen=i,this.enableXOF=r,this.rounds=o,Rc(i),!(0<n&&n<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=cv(this.state)}clone(){return this._cloneInto()}keccak(){$f(this.state32),Iv(this.state32,this.rounds),$f(this.state32),this.posOut=0,this.pos=0}update(n){Wf(this),n=_w(n),Xs(n);const{blockLen:t,state:i}=this,r=n.length;for(let o=0;o<r;){const s=Math.min(t-this.pos,r-o);for(let c=0;c<s;c++)i[this.pos++]^=n[o++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:n,suffix:t,pos:i,blockLen:r}=this;n[i]^=t,t&128&&i===r-1&&this.keccak(),n[r-1]^=128,this.keccak()}writeInto(n){Wf(this,!1),Xs(n),this.finish();const t=this.state,{blockLen:i}=this;for(let r=0,o=n.length;r<o;){this.posOut>=i&&this.keccak();const s=Math.min(i-this.posOut,o-r);n.set(t.subarray(this.posOut,this.posOut+s),r),this.posOut+=s,r+=s}return n}xofInto(n){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(n)}xof(n){return Rc(n),this.xofInto(new Uint8Array(n))}digestInto(n){if(av(n,this),this.finished)throw new Error("digest() was already called");return this.writeInto(n),this.destroy(),n}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,ww(this.state)}_cloneInto(n){const{blockLen:t,suffix:i,outputLen:r,rounds:o,enableXOF:s}=this;return n||(n=new U0(t,i,r,s,o)),n.state32.set(this.state32),n.pos=this.pos,n.posOut=this.posOut,n.finished=this.finished,n.rounds=o,n.suffix=i,n.outputLen=r,n.enableXOF=s,n.destroyed=this.destroyed,n}}const bv=(e,n,t)=>mv(()=>new U0(n,e,t)),Cv=bv(1,136,256/8);function Cw(e,n){const t=n||"hex",i=Cv(Js(e,{strict:!1})?KT(e):e);return t==="bytes"?i:kd(i)}class jv extends Map{constructor(n){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=n}get(n){const t=super.get(n);return super.has(n)&&t!==void 0&&(this.delete(n),super.set(n,t)),t}set(n,t){if(super.set(n,t),this.maxSize&&this.size>this.maxSize){const i=this.keys().next().value;i&&this.delete(i)}return this}}const mu=new jv(8192);function Lv(e,n){if(mu.has(`${e}.${n}`))return mu.get(`${e}.${n}`);const t=e.substring(2).toLowerCase(),i=Cw(pw(t),"bytes"),r=t.split("");for(let s=0;s<40;s+=2)i[s>>1]>>4>=8&&r[s]&&(r[s]=r[s].toUpperCase()),(i[s>>1]&15)>=8&&r[s+1]&&(r[s+1]=r[s+1].toUpperCase());const o=`0x${r.join("")}`;return mu.set(`${e}.${n}`,o),o}function Ev(e){const n=Cw(`0x${e.substring(4)}`).substring(26);return Lv(`0x${n}`)}async function Tv({hash:e,signature:n}){const t=Js(e)?e:kd(e),{secp256k1:i}=await u(async()=>{const{secp256k1:s}=await import("./secp256k1-BlHNYIaG.js");return{secp256k1:s}},__vite__mapDeps([56,1,2,4,5,21,13,22,18,17,19,14,9,23,24,25,8,26,27,28,29,30,31,32,33,34]));return`0x${(()=>{if(typeof n=="object"&&"r"in n&&"s"in n){const{r:h,s:d,v:f,yParity:m}=n,g=Number(m??f),w=Qf(g);return new i.Signature(Od(h),Od(d)).addRecoveryBit(w)}const s=Js(n)?n:kd(n);if(Dd(s)!==65)throw new Error("invalid signature length");const c=FT(`0x${s.slice(130)}`),l=Qf(c);return i.Signature.fromCompact(s.substring(2,130)).addRecoveryBit(l)})().recoverPublicKey(t.substring(2)).toHex(!1)}`}function Qf(e){if(e===0||e===1)return e;if(e===27)return 0;if(e===28)return 1;throw new Error("Invalid yParityOrV value")}async function vv({hash:e,signature:n}){return Ev(await Tv({hash:e,signature:n}))}var Nv={};const Sv=":";function ac(e){const[n,t]=e.split(Sv);return{namespace:n,reference:t}}function jw(e,n){return e.includes(":")?[e]:n.chains||[]}var Av=Object.defineProperty,Dv=Object.defineProperties,Ov=Object.getOwnPropertyDescriptors,Hf=Object.getOwnPropertySymbols,kv=Object.prototype.hasOwnProperty,zv=Object.prototype.propertyIsEnumerable,zd=(e,n,t)=>n in e?Av(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Zf=(e,n)=>{for(var t in n||(n={}))kv.call(n,t)&&zd(e,t,n[t]);if(Hf)for(var t of Hf(n))zv.call(n,t)&&zd(e,t,n[t]);return e},Pv=(e,n)=>Dv(e,Ov(n)),Gf=(e,n,t)=>zd(e,typeof n!="symbol"?n+"":n,t);const Rv="ReactNative",on={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},Vv="js";function Vc(){return typeof ur<"u"&&typeof ur.versions<"u"&&typeof ur.versions.node<"u"}function Lr(){return!Zo()&&!!qg()&&navigator.product===Rv}function Uv(){return Lr()&&typeof we<"u"&&typeof(we==null?void 0:we.Platform)<"u"&&(we==null?void 0:we.Platform.OS)==="android"}function Bv(){return Lr()&&typeof we<"u"&&typeof(we==null?void 0:we.Platform)<"u"&&(we==null?void 0:we.Platform.OS)==="ios"}function fs(){return!Vc()&&!!qg()&&!!Zo()}function ba(){return Lr()?on.reactNative:Vc()?on.node:fs()?on.browser:on.unknown}function qf(){var e;try{return Lr()&&typeof we<"u"&&typeof(we==null?void 0:we.Application)<"u"?(e=we.Application)==null?void 0:e.applicationId:void 0}catch{return}}function Wv(e,n){const t=new URLSearchParams(e);for(const i of Object.keys(n).sort())if(n.hasOwnProperty(i)){const r=n[i];r!==void 0&&t.set(i,r)}return t.toString()}function $v(e){var n,t;const i=Lw();try{return e!=null&&e.url&&i.url&&new URL(e.url).host!==new URL(i.url).host&&(console.warn(`The configured WalletConnect 'metadata.url':${e.url} differs from the actual page url:${i.url}. This is probably unintended and can lead to issues.`),e.url=i.url),(n=e==null?void 0:e.icons)!=null&&n.length&&e.icons.length>0&&(e.icons=e.icons.filter(r=>r!=="")),Pv(Zf(Zf({},i),e),{url:(e==null?void 0:e.url)||i.url,name:(e==null?void 0:e.name)||i.name,description:(e==null?void 0:e.description)||i.description,icons:(t=e==null?void 0:e.icons)!=null&&t.length&&e.icons.length>0?e.icons:i.icons})}catch(r){return console.warn("Error populating app metadata",r),e||i}}function Lw(){return J3()||{name:"",description:"",url:"",icons:[""]}}function Yv(){if(ba()===on.reactNative&&typeof we<"u"&&typeof(we==null?void 0:we.Platform)<"u"){const{OS:t,Version:i}=we.Platform;return[t,i].join("-")}const e=e_();if(e===null)return"unknown";const n=e.os?e.os.replace(" ","").toLowerCase():"unknown";return e.type==="browser"?[n,e.name,e.version].join("-"):[n,e.version].join("-")}function Fv(){var e;const n=ba();return n===on.browser?[n,((e=t_())==null?void 0:e.host)||"unknown"].join(":"):n}function Ew(e,n,t){const i=Yv(),r=Fv();return[[e,n].join("-"),[Vv,t].join("-"),i,r].join("/")}function Qv({protocol:e,version:n,relayUrl:t,sdkVersion:i,auth:r,projectId:o,useOnCloseEvent:s,bundleId:c,packageName:l}){const h=t.split("?"),d=Ew(e,n,i),f={auth:r,ua:d,projectId:o,useOnCloseEvent:s,packageName:l||void 0,bundleId:c||void 0},m=Wv(h[1]||"",f);return h[0]+"?"+m}function zr(e,n){return e.filter(t=>n.includes(t)).length===e.length}function Pd(e){return Object.fromEntries(e.entries())}function Rd(e){return new Map(Object.entries(e))}function Sr(e=ee.FIVE_MINUTES,n){const t=ee.toMiliseconds(e||ee.FIVE_MINUTES);let i,r,o,s;return{resolve:c=>{o&&i&&(clearTimeout(o),i(c),s=Promise.resolve(c))},reject:c=>{o&&r&&(clearTimeout(o),r(c))},done:()=>new Promise((c,l)=>{if(s)return c(s);o=setTimeout(()=>{const h=new Error(n);s=Promise.reject(h),l(h)},t),i=c,r=l})}}function Xn(e,n,t){return new Promise(async(i,r)=>{const o=setTimeout(()=>r(new Error(t)),n);try{const s=await e;i(s)}catch(s){r(s)}clearTimeout(o)})}function Tw(e,n){if(typeof n=="string"&&n.startsWith(`${e}:`))return n;if(e.toLowerCase()==="topic"){if(typeof n!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${n}`}else if(e.toLowerCase()==="id"){if(typeof n!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${n}`}throw new Error(`Unknown expirer target type: ${e}`)}function Hv(e){return Tw("topic",e)}function Zv(e){return Tw("id",e)}function vw(e){const[n,t]=e.split(":"),i={id:void 0,topic:void 0};if(n==="topic"&&typeof t=="string")i.topic=t;else if(n==="id"&&Number.isInteger(Number(t)))i.id=Number(t);else throw new Error(`Invalid target, expected id:number or topic:string, got ${n}:${t}`);return i}function tt(e,n){return ee.fromMiliseconds(Date.now()+ee.toMiliseconds(e))}function Yi(e){return Date.now()>=ee.toMiliseconds(e)}function Ee(e,n){return`${e}${n?`:${n}`:""}`}function qr(e=[],n=[]){return[...new Set([...e,...n])]}async function Gv({id:e,topic:n,wcDeepLink:t}){var i;try{if(!t)return;const r=typeof t=="string"?JSON.parse(t):t,o=r==null?void 0:r.href;if(typeof o!="string")return;const s=qv(o,e,n),c=ba();if(c===on.browser){if(!((i=Zo())!=null&&i.hasFocus())){console.warn("Document does not have focus, skipping deeplink.");return}Kv(s)}else c===on.reactNative&&typeof(we==null?void 0:we.Linking)<"u"&&await we.Linking.openURL(s)}catch(r){console.error(r)}}function qv(e,n,t){const i=`requestId=${n}&sessionTopic=${t}`;e.endsWith("/")&&(e=e.slice(0,-1));let r=`${e}`;if(e.startsWith("https://t.me")){const o=e.includes("?")?"&startapp=":"?startapp=";r=`${r}${o}${tN(i,!0)}`}else r=`${r}/wc?${i}`;return r}function Kv(e){let n="_self";eN()?n="_top":(Xv()||e.startsWith("https://")||e.startsWith("http://"))&&(n="_blank"),window.open(e,n,"noreferrer noopener")}async function Jv(e,n){let t="";try{if(fs()&&(t=localStorage.getItem(n),t))return t;t=await e.getItem(n)}catch(i){console.error(i)}return t}function Kf(e,n){if(!e.includes(n))return null;const t=e.split(/([&,?,=])/),i=t.indexOf(n);return t[i+2]}function Jf(){return typeof crypto<"u"&&crypto!=null&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/gu,e=>{const n=Math.random()*16|0;return(e==="x"?n:n&3|8).toString(16)})}function B0(){return typeof ur<"u"&&Nv.IS_VITEST==="true"}function Xv(){return typeof window<"u"&&(!!window.TelegramWebviewProxy||!!window.Telegram||!!window.TelegramWebviewProxyProto)}function eN(){try{return window.self!==window.top}catch{return!1}}function tN(e,n=!1){const t=Ne.from(e).toString("base64");return n?t.replace(/[=]/g,""):t}function Nw(e){return Ne.from(e,"base64").toString("utf-8")}function nN(e){return new Promise(n=>setTimeout(n,e))}let iN=class{constructor({limit:n}){Gf(this,"limit"),Gf(this,"set"),this.limit=n,this.set=new Set}add(n){if(!this.set.has(n)){if(this.set.size>=this.limit){const t=this.set.values().next().value;t&&this.set.delete(t)}this.set.add(n)}}has(n){return this.set.has(n)}};const Za=BigInt(2**32-1),Xf=BigInt(32);function Sw(e,n=!1){return n?{h:Number(e&Za),l:Number(e>>Xf&Za)}:{h:Number(e>>Xf&Za)|0,l:Number(e&Za)|0}}function Aw(e,n=!1){const t=e.length;let i=new Uint32Array(t),r=new Uint32Array(t);for(let o=0;o<t;o++){const{h:s,l:c}=Sw(e[o],n);[i[o],r[o]]=[s,c]}return[i,r]}const em=(e,n,t)=>e>>>t,tm=(e,n,t)=>e<<32-t|n>>>t,Fi=(e,n,t)=>e>>>t|n<<32-t,Qi=(e,n,t)=>e<<32-t|n>>>t,Ss=(e,n,t)=>e<<64-t|n>>>t-32,As=(e,n,t)=>e>>>t-32|n<<64-t,rN=(e,n)=>n,oN=(e,n)=>e,sN=(e,n,t)=>e<<t|n>>>32-t,aN=(e,n,t)=>n<<t|e>>>32-t,cN=(e,n,t)=>n<<t-32|e>>>64-t,lN=(e,n,t)=>e<<t-32|n>>>64-t;function Sn(e,n,t,i){const r=(n>>>0)+(i>>>0);return{h:e+t+(r/2**32|0)|0,l:r|0}}const W0=(e,n,t)=>(e>>>0)+(n>>>0)+(t>>>0),$0=(e,n,t,i)=>n+t+i+(e/2**32|0)|0,uN=(e,n,t,i)=>(e>>>0)+(n>>>0)+(t>>>0)+(i>>>0),dN=(e,n,t,i,r)=>n+t+i+r+(e/2**32|0)|0,hN=(e,n,t,i,r)=>(e>>>0)+(n>>>0)+(t>>>0)+(i>>>0)+(r>>>0),fN=(e,n,t,i,r,o)=>n+t+i+r+o+(e/2**32|0)|0,Io=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;function Y0(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Li(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Cn(e,...n){if(!Y0(e))throw new Error("Uint8Array expected");if(n.length>0&&!n.includes(e.length))throw new Error("Uint8Array expected of length "+n+", got length="+e.length)}function F0(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");Li(e.outputLen),Li(e.blockLen)}function br(e,n=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(n&&e.finished)throw new Error("Hash#digest() has already been called")}function Q0(e,n){Cn(e);const t=n.outputLen;if(e.length<t)throw new Error("digestInto() expects output buffer of length at least "+t)}function ea(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function jn(...e){for(let n=0;n<e.length;n++)e[n].fill(0)}function gu(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Wn(e,n){return e<<32-n|e>>>n}const Dw=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Ow(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}const hi=Dw?e=>e:e=>Ow(e);function mN(e){for(let n=0;n<e.length;n++)e[n]=Ow(e[n]);return e}const Hi=Dw?e=>e:mN,kw=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",gN=Array.from({length:256},(e,n)=>n.toString(16).padStart(2,"0"));function ta(e){if(Cn(e),kw)return e.toHex();let n="";for(let t=0;t<e.length;t++)n+=gN[e[t]];return n}const li={_0:48,_9:57,A:65,F:70,a:97,f:102};function nm(e){if(e>=li._0&&e<=li._9)return e-li._0;if(e>=li.A&&e<=li.F)return e-(li.A-10);if(e>=li.a&&e<=li.f)return e-(li.a-10)}function H0(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(kw)return Uint8Array.fromHex(e);const n=e.length,t=n/2;if(n%2)throw new Error("hex string expected, got unpadded hex of length "+n);const i=new Uint8Array(t);for(let r=0,o=0;r<t;r++,o+=2){const s=nm(e.charCodeAt(o)),c=nm(e.charCodeAt(o+1));if(s===void 0||c===void 0){const l=e[o]+e[o+1];throw new Error('hex string expected, got non-hex character "'+l+'" at index '+o)}i[r]=s*16+c}return i}function yN(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function kn(e){return typeof e=="string"&&(e=yN(e)),Cn(e),e}function Pr(...e){let n=0;for(let i=0;i<e.length;i++){const r=e[i];Cn(r),n+=r.length}const t=new Uint8Array(n);for(let i=0,r=0;i<e.length;i++){const o=e[i];t.set(o,r),r+=o.length}return t}class Ll{}function Ca(e){const n=i=>e().update(kn(i)).digest(),t=e();return n.outputLen=t.outputLen,n.blockLen=t.blockLen,n.create=()=>e(),n}function pN(e){const n=(i,r)=>e(r).update(kn(i)).digest(),t=e({});return n.outputLen=t.outputLen,n.blockLen=t.blockLen,n.create=i=>e(i),n}function ms(e=32){if(Io&&typeof Io.getRandomValues=="function")return Io.getRandomValues(new Uint8Array(e));if(Io&&typeof Io.randomBytes=="function")return Uint8Array.from(Io.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}const wN=BigInt(0),Is=BigInt(1),_N=BigInt(2),xN=BigInt(7),MN=BigInt(256),IN=BigInt(113),zw=[],Pw=[],Rw=[];for(let e=0,n=Is,t=1,i=0;e<24;e++){[t,i]=[i,(2*t+3*i)%5],zw.push(2*(5*i+t)),Pw.push((e+1)*(e+2)/2%64);let r=wN;for(let o=0;o<7;o++)n=(n<<Is^(n>>xN)*IN)%MN,n&_N&&(r^=Is<<(Is<<BigInt(o))-Is);Rw.push(r)}const Vw=Aw(Rw,!0),bN=Vw[0],CN=Vw[1],im=(e,n,t)=>t>32?cN(e,n,t):sN(e,n,t),rm=(e,n,t)=>t>32?lN(e,n,t):aN(e,n,t);function jN(e,n=24){const t=new Uint32Array(10);for(let i=24-n;i<24;i++){for(let s=0;s<10;s++)t[s]=e[s]^e[s+10]^e[s+20]^e[s+30]^e[s+40];for(let s=0;s<10;s+=2){const c=(s+8)%10,l=(s+2)%10,h=t[l],d=t[l+1],f=im(h,d,1)^t[c],m=rm(h,d,1)^t[c+1];for(let g=0;g<50;g+=10)e[s+g]^=f,e[s+g+1]^=m}let r=e[2],o=e[3];for(let s=0;s<24;s++){const c=Pw[s],l=im(r,o,c),h=rm(r,o,c),d=zw[s];r=e[d],o=e[d+1],e[d]=l,e[d+1]=h}for(let s=0;s<50;s+=10){for(let c=0;c<10;c++)t[c]=e[s+c];for(let c=0;c<10;c++)e[s+c]^=~t[(c+2)%10]&t[(c+4)%10]}e[0]^=bN[i],e[1]^=CN[i]}jn(t)}let LN=class Uw extends Ll{constructor(n,t,i,r=!1,o=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=n,this.suffix=t,this.outputLen=i,this.enableXOF=r,this.rounds=o,Li(i),!(0<n&&n<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=ea(this.state)}clone(){return this._cloneInto()}keccak(){Hi(this.state32),jN(this.state32,this.rounds),Hi(this.state32),this.posOut=0,this.pos=0}update(n){br(this),n=kn(n),Cn(n);const{blockLen:t,state:i}=this,r=n.length;for(let o=0;o<r;){const s=Math.min(t-this.pos,r-o);for(let c=0;c<s;c++)i[this.pos++]^=n[o++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:n,suffix:t,pos:i,blockLen:r}=this;n[i]^=t,t&128&&i===r-1&&this.keccak(),n[r-1]^=128,this.keccak()}writeInto(n){br(this,!1),Cn(n),this.finish();const t=this.state,{blockLen:i}=this;for(let r=0,o=n.length;r<o;){this.posOut>=i&&this.keccak();const s=Math.min(i-this.posOut,o-r);n.set(t.subarray(this.posOut,this.posOut+s),r),this.posOut+=s,r+=s}return n}xofInto(n){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(n)}xof(n){return Li(n),this.xofInto(new Uint8Array(n))}digestInto(n){if(Q0(n,this),this.finished)throw new Error("digest() was already called");return this.writeInto(n),this.destroy(),n}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,jn(this.state)}_cloneInto(n){const{blockLen:t,suffix:i,outputLen:r,rounds:o,enableXOF:s}=this;return n||(n=new Uw(t,i,r,s,o)),n.state32.set(this.state32),n.pos=this.pos,n.posOut=this.posOut,n.finished=this.finished,n.rounds=o,n.suffix=i,n.outputLen=r,n.enableXOF=s,n.destroyed=this.destroyed,n}};const EN=(e,n,t)=>Ca(()=>new LN(n,e,t)),TN=EN(1,136,256/8);function vN(e,n,t,i){if(typeof e.setBigUint64=="function")return e.setBigUint64(n,t,i);const r=BigInt(32),o=BigInt(4294967295),s=Number(t>>r&o),c=Number(t&o),l=i?4:0,h=i?0:4;e.setUint32(n+l,s,i),e.setUint32(n+h,c,i)}function NN(e,n,t){return e&n^~e&t}function SN(e,n,t){return e&n^e&t^n&t}let Bw=class extends Ll{constructor(n,t,i,r){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=n,this.outputLen=t,this.padOffset=i,this.isLE=r,this.buffer=new Uint8Array(n),this.view=gu(this.buffer)}update(n){br(this),n=kn(n),Cn(n);const{view:t,buffer:i,blockLen:r}=this,o=n.length;for(let s=0;s<o;){const c=Math.min(r-this.pos,o-s);if(c===r){const l=gu(n);for(;r<=o-s;s+=r)this.process(l,s);continue}i.set(n.subarray(s,s+c),this.pos),this.pos+=c,s+=c,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=n.length,this.roundClean(),this}digestInto(n){br(this),Q0(n,this),this.finished=!0;const{buffer:t,view:i,blockLen:r,isLE:o}=this;let{pos:s}=this;t[s++]=128,jn(this.buffer.subarray(s)),this.padOffset>r-s&&(this.process(i,0),s=0);for(let f=s;f<r;f++)t[f]=0;vN(i,r-8,BigInt(this.length*8),o),this.process(i,0);const c=gu(n),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const h=l/4,d=this.get();if(h>d.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f<h;f++)c.setUint32(4*f,d[f],o)}digest(){const{buffer:n,outputLen:t}=this;this.digestInto(n);const i=n.slice(0,t);return this.destroy(),i}_cloneInto(n){n||(n=new this.constructor),n.set(...this.get());const{blockLen:t,buffer:i,length:r,finished:o,destroyed:s,pos:c}=this;return n.destroyed=s,n.finished=o,n.length=r,n.pos=c,r%t&&n.buffer.set(i),n}clone(){return this._cloneInto()}};const Di=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),xt=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),Mt=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),AN=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Oi=new Uint32Array(64);let DN=class extends Bw{constructor(n=32){super(64,n,8,!1),this.A=Di[0]|0,this.B=Di[1]|0,this.C=Di[2]|0,this.D=Di[3]|0,this.E=Di[4]|0,this.F=Di[5]|0,this.G=Di[6]|0,this.H=Di[7]|0}get(){const{A:n,B:t,C:i,D:r,E:o,F:s,G:c,H:l}=this;return[n,t,i,r,o,s,c,l]}set(n,t,i,r,o,s,c,l){this.A=n|0,this.B=t|0,this.C=i|0,this.D=r|0,this.E=o|0,this.F=s|0,this.G=c|0,this.H=l|0}process(n,t){for(let f=0;f<16;f++,t+=4)Oi[f]=n.getUint32(t,!1);for(let f=16;f<64;f++){const m=Oi[f-15],g=Oi[f-2],w=Wn(m,7)^Wn(m,18)^m>>>3,p=Wn(g,17)^Wn(g,19)^g>>>10;Oi[f]=p+Oi[f-7]+w+Oi[f-16]|0}let{A:i,B:r,C:o,D:s,E:c,F:l,G:h,H:d}=this;for(let f=0;f<64;f++){const m=Wn(c,6)^Wn(c,11)^Wn(c,25),g=d+m+NN(c,l,h)+AN[f]+Oi[f]|0,w=(Wn(i,2)^Wn(i,13)^Wn(i,22))+SN(i,r,o)|0;d=h,h=l,l=c,c=s+g|0,s=o,o=r,r=i,i=g+w|0}i=i+this.A|0,r=r+this.B|0,o=o+this.C|0,s=s+this.D|0,c=c+this.E|0,l=l+this.F|0,h=h+this.G|0,d=d+this.H|0,this.set(i,r,o,s,c,l,h,d)}roundClean(){jn(Oi)}destroy(){this.set(0,0,0,0,0,0,0,0),jn(this.buffer)}};const Ww=Aw(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),ON=Ww[0],kN=Ww[1],ki=new Uint32Array(80),zi=new Uint32Array(80);let Z0=class extends Bw{constructor(n=64){super(128,n,16,!1),this.Ah=Mt[0]|0,this.Al=Mt[1]|0,this.Bh=Mt[2]|0,this.Bl=Mt[3]|0,this.Ch=Mt[4]|0,this.Cl=Mt[5]|0,this.Dh=Mt[6]|0,this.Dl=Mt[7]|0,this.Eh=Mt[8]|0,this.El=Mt[9]|0,this.Fh=Mt[10]|0,this.Fl=Mt[11]|0,this.Gh=Mt[12]|0,this.Gl=Mt[13]|0,this.Hh=Mt[14]|0,this.Hl=Mt[15]|0}get(){const{Ah:n,Al:t,Bh:i,Bl:r,Ch:o,Cl:s,Dh:c,Dl:l,Eh:h,El:d,Fh:f,Fl:m,Gh:g,Gl:w,Hh:p,Hl:_}=this;return[n,t,i,r,o,s,c,l,h,d,f,m,g,w,p,_]}set(n,t,i,r,o,s,c,l,h,d,f,m,g,w,p,_){this.Ah=n|0,this.Al=t|0,this.Bh=i|0,this.Bl=r|0,this.Ch=o|0,this.Cl=s|0,this.Dh=c|0,this.Dl=l|0,this.Eh=h|0,this.El=d|0,this.Fh=f|0,this.Fl=m|0,this.Gh=g|0,this.Gl=w|0,this.Hh=p|0,this.Hl=_|0}process(n,t){for(let b=0;b<16;b++,t+=4)ki[b]=n.getUint32(t),zi[b]=n.getUint32(t+=4);for(let b=16;b<80;b++){const j=ki[b-15]|0,C=zi[b-15]|0,E=Fi(j,C,1)^Fi(j,C,8)^em(j,C,7),T=Qi(j,C,1)^Qi(j,C,8)^tm(j,C,7),O=ki[b-2]|0,L=zi[b-2]|0,N=Fi(O,L,19)^Ss(O,L,61)^em(O,L,6),v=Qi(O,L,19)^As(O,L,61)^tm(O,L,6),D=uN(T,v,zi[b-7],zi[b-16]),z=dN(D,E,N,ki[b-7],ki[b-16]);ki[b]=z|0,zi[b]=D|0}let{Ah:i,Al:r,Bh:o,Bl:s,Ch:c,Cl:l,Dh:h,Dl:d,Eh:f,El:m,Fh:g,Fl:w,Gh:p,Gl:_,Hh:x,Hl:I}=this;for(let b=0;b<80;b++){const j=Fi(f,m,14)^Fi(f,m,18)^Ss(f,m,41),C=Qi(f,m,14)^Qi(f,m,18)^As(f,m,41),E=f&g^~f&p,T=m&w^~m&_,O=hN(I,C,T,kN[b],zi[b]),L=fN(O,x,j,E,ON[b],ki[b]),N=O|0,v=Fi(i,r,28)^Ss(i,r,34)^Ss(i,r,39),D=Qi(i,r,28)^As(i,r,34)^As(i,r,39),z=i&o^i&c^o&c,V=r&s^r&l^s&l;x=p|0,I=_|0,p=g|0,_=w|0,g=f|0,w=m|0,{h:f,l:m}=Sn(h|0,d|0,L|0,N|0),h=c|0,d=l|0,c=o|0,l=s|0,o=i|0,s=r|0;const R=W0(N,D,V);i=$0(R,L,v,z),r=R|0}({h:i,l:r}=Sn(this.Ah|0,this.Al|0,i|0,r|0)),{h:o,l:s}=Sn(this.Bh|0,this.Bl|0,o|0,s|0),{h:c,l}=Sn(this.Ch|0,this.Cl|0,c|0,l|0),{h,l:d}=Sn(this.Dh|0,this.Dl|0,h|0,d|0),{h:f,l:m}=Sn(this.Eh|0,this.El|0,f|0,m|0),{h:g,l:w}=Sn(this.Fh|0,this.Fl|0,g|0,w|0),{h:p,l:_}=Sn(this.Gh|0,this.Gl|0,p|0,_|0),{h:x,l:I}=Sn(this.Hh|0,this.Hl|0,x|0,I|0),this.set(i,r,o,s,c,l,h,d,f,m,g,w,p,_,x,I)}roundClean(){jn(ki,zi)}destroy(){jn(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}},zN=class extends Z0{constructor(){super(48),this.Ah=xt[0]|0,this.Al=xt[1]|0,this.Bh=xt[2]|0,this.Bl=xt[3]|0,this.Ch=xt[4]|0,this.Cl=xt[5]|0,this.Dh=xt[6]|0,this.Dl=xt[7]|0,this.Eh=xt[8]|0,this.El=xt[9]|0,this.Fh=xt[10]|0,this.Fl=xt[11]|0,this.Gh=xt[12]|0,this.Gl=xt[13]|0,this.Hh=xt[14]|0,this.Hl=xt[15]|0}};const It=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class PN extends Z0{constructor(){super(32),this.Ah=It[0]|0,this.Al=It[1]|0,this.Bh=It[2]|0,this.Bl=It[3]|0,this.Ch=It[4]|0,this.Cl=It[5]|0,this.Dh=It[6]|0,this.Dl=It[7]|0,this.Eh=It[8]|0,this.El=It[9]|0,this.Fh=It[10]|0,this.Fl=It[11]|0,this.Gh=It[12]|0,this.Gl=It[13]|0,this.Hh=It[14]|0,this.Hl=It[15]|0}}const El=Ca(()=>new DN),RN=Ca(()=>new Z0),VN=Ca(()=>new zN),UN=Ca(()=>new PN),BN=Uint8Array.from([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9]),et=Uint32Array.from([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),te=new Uint32Array(32);function Pi(e,n,t,i,r,o){const s=r[o],c=r[o+1];let l=te[2*e],h=te[2*e+1],d=te[2*n],f=te[2*n+1],m=te[2*t],g=te[2*t+1],w=te[2*i],p=te[2*i+1],_=W0(l,d,s);h=$0(_,h,f,c),l=_|0,{Dh:p,Dl:w}={Dh:p^h,Dl:w^l},{Dh:p,Dl:w}={Dh:rN(p,w),Dl:oN(p)},{h:g,l:m}=Sn(g,m,p,w),{Bh:f,Bl:d}={Bh:f^g,Bl:d^m},{Bh:f,Bl:d}={Bh:Fi(f,d,24),Bl:Qi(f,d,24)},te[2*e]=l,te[2*e+1]=h,te[2*n]=d,te[2*n+1]=f,te[2*t]=m,te[2*t+1]=g,te[2*i]=w,te[2*i+1]=p}function Ri(e,n,t,i,r,o){const s=r[o],c=r[o+1];let l=te[2*e],h=te[2*e+1],d=te[2*n],f=te[2*n+1],m=te[2*t],g=te[2*t+1],w=te[2*i],p=te[2*i+1],_=W0(l,d,s);h=$0(_,h,f,c),l=_|0,{Dh:p,Dl:w}={Dh:p^h,Dl:w^l},{Dh:p,Dl:w}={Dh:Fi(p,w,16),Dl:Qi(p,w,16)},{h:g,l:m}=Sn(g,m,p,w),{Bh:f,Bl:d}={Bh:f^g,Bl:d^m},{Bh:f,Bl:d}={Bh:Ss(f,d,63),Bl:As(f,d,63)},te[2*e]=l,te[2*e+1]=h,te[2*n]=d,te[2*n+1]=f,te[2*t]=m,te[2*t+1]=g,te[2*i]=w,te[2*i+1]=p}function WN(e,n={},t,i,r){if(Li(t),e<0||e>t)throw new Error("outputLen bigger than keyLen");const{key:o,salt:s,personalization:c}=n;if(o!==void 0&&(o.length<1||o.length>t))throw new Error("key length must be undefined or 1.."+t);if(s!==void 0&&s.length!==i)throw new Error("salt must be undefined or "+i);if(c!==void 0&&c.length!==r)throw new Error("personalization must be undefined or "+r)}class $N extends Ll{constructor(n,t){super(),this.finished=!1,this.destroyed=!1,this.length=0,this.pos=0,Li(n),Li(t),this.blockLen=n,this.outputLen=t,this.buffer=new Uint8Array(n),this.buffer32=ea(this.buffer)}update(n){br(this),n=kn(n),Cn(n);const{blockLen:t,buffer:i,buffer32:r}=this,o=n.length,s=n.byteOffset,c=n.buffer;for(let l=0;l<o;){this.pos===t&&(Hi(r),this.compress(r,0,!1),Hi(r),this.pos=0);const h=Math.min(t-this.pos,o-l),d=s+l;if(h===t&&!(d%4)&&l+h<o){const f=new Uint32Array(c,d,Math.floor((o-l)/4));Hi(f);for(let m=0;l+t<o;m+=r.length,l+=t)this.length+=t,this.compress(f,m,!1);Hi(f);continue}i.set(n.subarray(l,l+h),this.pos),this.pos+=h,this.length+=h,l+=h}return this}digestInto(n){br(this),Q0(n,this);const{pos:t,buffer32:i}=this;this.finished=!0,jn(this.buffer.subarray(t)),Hi(i),this.compress(i,0,!0),Hi(i);const r=ea(n);this.get().forEach((o,s)=>r[s]=hi(o))}digest(){const{buffer:n,outputLen:t}=this;this.digestInto(n);const i=n.slice(0,t);return this.destroy(),i}_cloneInto(n){const{buffer:t,length:i,finished:r,destroyed:o,outputLen:s,pos:c}=this;return n||(n=new this.constructor({dkLen:s})),n.set(...this.get()),n.buffer.set(t),n.destroyed=o,n.finished=r,n.length=i,n.pos=c,n.outputLen=s,n}clone(){return this._cloneInto()}}class YN extends $N{constructor(n={}){const t=n.dkLen===void 0?64:n.dkLen;super(128,t),this.v0l=et[0]|0,this.v0h=et[1]|0,this.v1l=et[2]|0,this.v1h=et[3]|0,this.v2l=et[4]|0,this.v2h=et[5]|0,this.v3l=et[6]|0,this.v3h=et[7]|0,this.v4l=et[8]|0,this.v4h=et[9]|0,this.v5l=et[10]|0,this.v5h=et[11]|0,this.v6l=et[12]|0,this.v6h=et[13]|0,this.v7l=et[14]|0,this.v7h=et[15]|0,WN(t,n,64,16,16);let{key:i,personalization:r,salt:o}=n,s=0;if(i!==void 0&&(i=kn(i),s=i.length),this.v0l^=this.outputLen|s<<8|65536|1<<24,o!==void 0){o=kn(o);const c=ea(o);this.v4l^=hi(c[0]),this.v4h^=hi(c[1]),this.v5l^=hi(c[2]),this.v5h^=hi(c[3])}if(r!==void 0){r=kn(r);const c=ea(r);this.v6l^=hi(c[0]),this.v6h^=hi(c[1]),this.v7l^=hi(c[2]),this.v7h^=hi(c[3])}if(i!==void 0){const c=new Uint8Array(this.blockLen);c.set(i),this.update(c)}}get(){let{v0l:n,v0h:t,v1l:i,v1h:r,v2l:o,v2h:s,v3l:c,v3h:l,v4l:h,v4h:d,v5l:f,v5h:m,v6l:g,v6h:w,v7l:p,v7h:_}=this;return[n,t,i,r,o,s,c,l,h,d,f,m,g,w,p,_]}set(n,t,i,r,o,s,c,l,h,d,f,m,g,w,p,_){this.v0l=n|0,this.v0h=t|0,this.v1l=i|0,this.v1h=r|0,this.v2l=o|0,this.v2h=s|0,this.v3l=c|0,this.v3h=l|0,this.v4l=h|0,this.v4h=d|0,this.v5l=f|0,this.v5h=m|0,this.v6l=g|0,this.v6h=w|0,this.v7l=p|0,this.v7h=_|0}compress(n,t,i){this.get().forEach((l,h)=>te[h]=l),te.set(et,16);let{h:r,l:o}=Sw(BigInt(this.length));te[24]=et[8]^o,te[25]=et[9]^r,i&&(te[28]=~te[28],te[29]=~te[29]);let s=0;const c=BN;for(let l=0;l<12;l++)Pi(0,4,8,12,n,t+2*c[s++]),Ri(0,4,8,12,n,t+2*c[s++]),Pi(1,5,9,13,n,t+2*c[s++]),Ri(1,5,9,13,n,t+2*c[s++]),Pi(2,6,10,14,n,t+2*c[s++]),Ri(2,6,10,14,n,t+2*c[s++]),Pi(3,7,11,15,n,t+2*c[s++]),Ri(3,7,11,15,n,t+2*c[s++]),Pi(0,5,10,15,n,t+2*c[s++]),Ri(0,5,10,15,n,t+2*c[s++]),Pi(1,6,11,12,n,t+2*c[s++]),Ri(1,6,11,12,n,t+2*c[s++]),Pi(2,7,8,13,n,t+2*c[s++]),Ri(2,7,8,13,n,t+2*c[s++]),Pi(3,4,9,14,n,t+2*c[s++]),Ri(3,4,9,14,n,t+2*c[s++]);this.v0l^=te[0]^te[16],this.v0h^=te[1]^te[17],this.v1l^=te[2]^te[18],this.v1h^=te[3]^te[19],this.v2l^=te[4]^te[20],this.v2h^=te[5]^te[21],this.v3l^=te[6]^te[22],this.v3h^=te[7]^te[23],this.v4l^=te[8]^te[24],this.v4h^=te[9]^te[25],this.v5l^=te[10]^te[26],this.v5h^=te[11]^te[27],this.v6l^=te[12]^te[28],this.v6h^=te[13]^te[29],this.v7l^=te[14]^te[30],this.v7h^=te[15]^te[31],jn(te)}destroy(){this.destroyed=!0,jn(this.buffer32),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const FN=pN(e=>new YN(e)),QN="https://rpc.walletconnect.org/v1";function $w(e){const n=`Ethereum Signed Message:
|
|
290
|
+
${e.length}`,t=new TextEncoder().encode(n+e);return"0x"+Ne.from(TN(t)).toString("hex")}async function HN(e,n,t,i,r,o){switch(t.t){case"eip191":return await ZN(e,n,t.s);case"eip1271":return await GN(e,n,t.s,i,r,o);default:throw new Error(`verifySignature failed: Attempted to verify CacaoSignature with unknown type: ${t.t}`)}}async function ZN(e,n,t){return(await vv({hash:$w(n),signature:t})).toLowerCase()===e.toLowerCase()}async function GN(e,n,t,i,r,o){const s=ac(i);if(!s.namespace||!s.reference)throw new Error(`isValidEip1271Signature failed: chainId must be in CAIP-2 format, received: ${i}`);try{const c="0x1626ba7e",l="0000000000000000000000000000000000000000000000000000000000000040",h=t.substring(2),d=(h.length/2).toString(16).padStart(64,"0"),f=(n.startsWith("0x")?n:$w(n)).substring(2),m=c+f+l+d+h,g=await fetch(`${o||QN}/?chainId=${i}&projectId=${r}`,{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({id:qN(),jsonrpc:"2.0",method:"eth_call",params:[{to:e,data:m},"latest"]})}),{result:w}=await g.json();return w?w.slice(0,c.length).toLowerCase()===c.toLowerCase():!1}catch(c){return console.error("isValidEip1271Signature: ",c),!1}}function qN(){return Date.now()+Math.floor(Math.random()*1e3)}function KN(e){const n=atob(e),t=new Uint8Array(n.length);for(let s=0;s<n.length;s++)t[s]=n.charCodeAt(s);const i=t[0];if(i===0)throw new Error("No signatures found");const r=1+i*64;if(t.length<r)throw new Error("Transaction data too short for claimed signature count");if(t.length<100)throw new Error("Transaction too short");const o=Ne.from(e,"base64").slice(1,65);return fa.encode(o)}function JN(e){const n=new Uint8Array(Ne.from(e,"base64")),t=Array.from("TransactionData::").map(o=>o.charCodeAt(0)),i=new Uint8Array(t.length+n.length);i.set(t),i.set(n,t.length);const r=FN(i,{dkLen:32});return fa.encode(r)}function om(e){const n=new Uint8Array(El(XN(e)));return fa.encode(n)}function XN(e){if(e instanceof Uint8Array)return e;if(Array.isArray(e))return new Uint8Array(e);if(typeof e=="object"&&e!=null&&e.data)return new Uint8Array(Object.values(e.data));if(typeof e=="object"&&e)return new Uint8Array(Object.values(e));throw new Error("getNearUint8ArrayFromBytes: Unexpected result type from bytes array")}function sm(e){const n=Ne.from(e,"base64"),t=n_(n).txn;if(!t)throw new Error("Invalid signed transaction: missing 'txn' field");const i=i_(t),r=Ne.from("TX"),o=Ne.concat([r,Ne.from(i)]),s=UN(o);return r_.encode(s).replace(/=+$/,"")}function yu(e){const n=[];let t=BigInt(e);for(;t>=BigInt(128);)n.push(Number(t&BigInt(127)|BigInt(128))),t>>=BigInt(7);return n.push(Number(t)),Ne.from(n)}function eS(e){const n=Ne.from(e.signed.bodyBytes,"base64"),t=Ne.from(e.signed.authInfoBytes,"base64"),i=Ne.from(e.signature.signature,"base64"),r=[];r.push(Ne.from([10])),r.push(yu(n.length)),r.push(n),r.push(Ne.from([18])),r.push(yu(t.length)),r.push(t),r.push(Ne.from([26])),r.push(yu(i.length)),r.push(i);const o=Ne.concat(r),s=El(o);return Ne.from(s).toString("hex").toUpperCase()}var tS=Object.defineProperty,nS=Object.defineProperties,iS=Object.getOwnPropertyDescriptors,am=Object.getOwnPropertySymbols,rS=Object.prototype.hasOwnProperty,oS=Object.prototype.propertyIsEnumerable,cm=(e,n,t)=>n in e?tS(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,sS=(e,n)=>{for(var t in n||(n={}))rS.call(n,t)&&cm(e,t,n[t]);if(am)for(var t of am(n))oS.call(n,t)&&cm(e,t,n[t]);return e},aS=(e,n)=>nS(e,iS(n));const cS="did:pkh:",G0=e=>e==null?void 0:e.split(":"),lS=e=>{const n=e&&G0(e);if(n)return e.includes(cS)?n[3]:n[1]},Vd=e=>{const n=e&&G0(e);if(n)return n[2]+":"+n[3]},Uc=e=>{const n=e&&G0(e);if(n)return n.pop()};async function lm(e){const{cacao:n,projectId:t}=e,{s:i,p:r}=n,o=Yw(r,r.iss),s=Uc(r.iss);return await HN(s,o,i,Vd(r.iss),t)}const Yw=(e,n)=>{const t=`${e.domain} wants you to sign in with your Ethereum account:`,i=Uc(n);if(!e.aud&&!e.uri)throw new Error("Either `aud` or `uri` is required to construct the message");let r=e.statement||void 0;const o=`URI: ${e.aud||e.uri}`,s=`Version: ${e.version}`,c=`Chain ID: ${lS(n)}`,l=`Nonce: ${e.nonce}`,h=`Issued At: ${e.iat}`,d=e.exp?`Expiration Time: ${e.exp}`:void 0,f=e.nbf?`Not Before: ${e.nbf}`:void 0,m=e.requestId?`Request ID: ${e.requestId}`:void 0,g=e.resources?`Resources:${e.resources.map(p=>`
|
|
291
|
+
- ${p}`).join("")}`:void 0,w=cc(e.resources);if(w){const p=na(w);r=wS(r,p)}return[t,i,"",r,"",o,s,c,l,h,d,f,m,g].filter(p=>p!=null).join(`
|
|
292
|
+
`)};function uS(e){return Ne.from(JSON.stringify(e)).toString("base64")}function dS(e){return JSON.parse(Ne.from(e,"base64").toString("utf-8"))}function ro(e){if(!e)throw new Error("No recap provided, value is undefined");if(!e.att)throw new Error("No `att` property found");const n=Object.keys(e.att);if(!(n!=null&&n.length))throw new Error("No resources found in `att` property");n.forEach(t=>{const i=e.att[t];if(Array.isArray(i))throw new Error(`Resource must be an object: ${t}`);if(typeof i!="object")throw new Error(`Resource must be an object: ${t}`);if(!Object.keys(i).length)throw new Error(`Resource object is empty: ${t}`);Object.keys(i).forEach(r=>{const o=i[r];if(!Array.isArray(o))throw new Error(`Ability limits ${r} must be an array of objects, found: ${o}`);if(!o.length)throw new Error(`Value of ${r} is empty array, must be an array with objects`);o.forEach(s=>{if(typeof s!="object")throw new Error(`Ability limits (${r}) must be an array of objects, found: ${s}`)})})})}function hS(e,n,t,i={}){return t==null||t.sort((r,o)=>r.localeCompare(o)),{att:{[e]:fS(n,t,i)}}}function fS(e,n,t={}){n=n==null?void 0:n.sort((r,o)=>r.localeCompare(o));const i=n.map(r=>({[`${e}/${r}`]:[t]}));return Object.assign({},...i)}function Fw(e){return ro(e),`urn:recap:${uS(e).replace(/=/g,"")}`}function na(e){const n=dS(e.replace("urn:recap:",""));return ro(n),n}function mS(e,n,t){const i=hS(e,n,t);return Fw(i)}function gS(e){return e&&e.includes("urn:recap:")}function yS(e,n){const t=na(e),i=na(n),r=pS(t,i);return Fw(r)}function pS(e,n){ro(e),ro(n);const t=Object.keys(e.att).concat(Object.keys(n.att)).sort((r,o)=>r.localeCompare(o)),i={att:{}};return t.forEach(r=>{var o,s;Object.keys(((o=e.att)==null?void 0:o[r])||{}).concat(Object.keys(((s=n.att)==null?void 0:s[r])||{})).sort((c,l)=>c.localeCompare(l)).forEach(c=>{var l,h;i.att[r]=aS(sS({},i.att[r]),{[c]:((l=e.att[r])==null?void 0:l[c])||((h=n.att[r])==null?void 0:h[c])})})}),i}function wS(e="",n){ro(n);const t="I further authorize the stated URI to perform the following actions on my behalf: ";if(e.includes(t))return e;const i=[];let r=0;Object.keys(n.att).forEach(c=>{const l=Object.keys(n.att[c]).map(f=>({ability:f.split("/")[0],action:f.split("/")[1]}));l.sort((f,m)=>f.action.localeCompare(m.action));const h={};l.forEach(f=>{h[f.ability]||(h[f.ability]=[]),h[f.ability].push(f.action)});const d=Object.keys(h).map(f=>(r++,`(${r}) '${f}': '${h[f].join("', '")}' for '${c}'.`));i.push(d.join(", ").replace(".,","."))});const o=i.join(" "),s=`${t}${o}`;return`${e?e+" ":""}${s}`}function um(e){var n;const t=na(e);ro(t);const i=(n=t.att)==null?void 0:n.eip155;return i?Object.keys(i).map(r=>r.split("/")[1]):[]}function dm(e){const n=na(e);ro(n);const t=[];return Object.values(n.att).forEach(i=>{Object.values(i).forEach(r=>{var o;(o=r==null?void 0:r[0])!=null&&o.chains&&t.push(r[0].chains)})}),[...new Set(t.flat())]}function cc(e){if(!e)return;const n=e==null?void 0:e[e.length-1];return gS(n)?n:void 0}/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */function Qw(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Ud(e){if(typeof e!="boolean")throw new Error(`boolean expected, not ${e}`)}function pu(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Yt(e,...n){if(!Qw(e))throw new Error("Uint8Array expected");if(n.length>0&&!n.includes(e.length))throw new Error("Uint8Array expected of length "+n+", got length="+e.length)}function hm(e,n=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(n&&e.finished)throw new Error("Hash#digest() has already been called")}function _S(e,n){Yt(e);const t=n.outputLen;if(e.length<t)throw new Error("digestInto() expects output buffer of length at least "+t)}function mr(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Xo(...e){for(let n=0;n<e.length;n++)e[n].fill(0)}function xS(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}const MS=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function IS(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Bd(e){if(typeof e=="string")e=IS(e);else if(Qw(e))e=Wd(e);else throw new Error("Uint8Array expected, got "+typeof e);return e}function bS(e,n){if(n==null||typeof n!="object")throw new Error("options must be defined");return Object.assign(e,n)}function CS(e,n){if(e.length!==n.length)return!1;let t=0;for(let i=0;i<e.length;i++)t|=e[i]^n[i];return t===0}const jS=(e,n)=>{function t(i,...r){if(Yt(i),!MS)throw new Error("Non little-endian hardware is not yet supported");if(e.nonceLength!==void 0){const h=r[0];if(!h)throw new Error("nonce / iv required");e.varSizeNonce?Yt(h):Yt(h,e.nonceLength)}const o=e.tagLength;o&&r[1]!==void 0&&Yt(r[1]);const s=n(i,...r),c=(h,d)=>{if(d!==void 0){if(h!==2)throw new Error("cipher output not supported");Yt(d)}};let l=!1;return{encrypt(h,d){if(l)throw new Error("cannot encrypt() twice with same key + nonce");return l=!0,Yt(h),c(s.encrypt.length,d),s.encrypt(h,d)},decrypt(h,d){if(Yt(h),o&&h.length<o)throw new Error("invalid ciphertext length: smaller than tagLength="+o);return c(s.decrypt.length,d),s.decrypt(h,d)}}}return Object.assign(t,e),t};function fm(e,n,t=!0){if(n===void 0)return new Uint8Array(e);if(n.length!==e)throw new Error("invalid output length, expected "+e+", got: "+n.length);if(t&&!ES(n))throw new Error("invalid output, must be aligned");return n}function mm(e,n,t,i){if(typeof e.setBigUint64=="function")return e.setBigUint64(n,t,i);const r=BigInt(32),o=BigInt(4294967295),s=Number(t>>r&o),c=Number(t&o);e.setUint32(n+4,s,i),e.setUint32(n+0,c,i)}function LS(e,n,t){Ud(t);const i=new Uint8Array(16),r=xS(i);return mm(r,0,BigInt(n),t),mm(r,8,BigInt(e),t),i}function ES(e){return e.byteOffset%4===0}function Wd(e){return Uint8Array.from(e)}const Hw=e=>Uint8Array.from(e.split("").map(n=>n.charCodeAt(0))),TS=Hw("expand 16-byte k"),vS=Hw("expand 32-byte k"),NS=mr(TS),SS=mr(vS);function je(e,n){return e<<n|e>>>32-n}function $d(e){return e.byteOffset%4===0}const Ga=64,AS=16,Zw=2**32-1,gm=new Uint32Array;function DS(e,n,t,i,r,o,s,c){const l=r.length,h=new Uint8Array(Ga),d=mr(h),f=$d(r)&&$d(o),m=f?mr(r):gm,g=f?mr(o):gm;for(let w=0;w<l;s++){if(e(n,t,i,d,s,c),s>=Zw)throw new Error("arx: counter overflow");const p=Math.min(Ga,l-w);if(f&&p===Ga){const _=w/4;if(w%4!==0)throw new Error("arx: invalid block position");for(let x=0,I;x<AS;x++)I=_+x,g[I]=m[I]^d[x];w+=Ga;continue}for(let _=0,x;_<p;_++)x=w+_,o[x]=r[x]^h[_];w+=p}}function OS(e,n){const{allowShortKeys:t,extendNonceFn:i,counterLength:r,counterRight:o,rounds:s}=bS({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},n);if(typeof e!="function")throw new Error("core must be a function");return pu(r),pu(s),Ud(o),Ud(t),(c,l,h,d,f=0)=>{Yt(c),Yt(l),Yt(h);const m=h.length;if(d===void 0&&(d=new Uint8Array(m)),Yt(d),pu(f),f<0||f>=Zw)throw new Error("arx: counter overflow");if(d.length<m)throw new Error(`arx: output (${d.length}) is shorter than data (${m})`);const g=[];let w=c.length,p,_;if(w===32)g.push(p=Wd(c)),_=SS;else if(w===16&&t)p=new Uint8Array(32),p.set(c),p.set(c,16),_=NS,g.push(p);else throw new Error(`arx: invalid 32-byte key, got length=${w}`);$d(l)||g.push(l=Wd(l));const x=mr(p);if(i){if(l.length!==24)throw new Error("arx: extended nonce must be 24 bytes");i(_,x,mr(l.subarray(0,16)),x),l=l.subarray(16)}const I=16-r;if(I!==l.length)throw new Error(`arx: nonce must be ${I} or 16 bytes`);if(I!==12){const j=new Uint8Array(12);j.set(l,o?0:12-l.length),l=j,g.push(l)}const b=mr(l);return DS(e,_,x,b,h,d,f,s),Xo(...g),d}}const dt=(e,n)=>e[n++]&255|(e[n++]&255)<<8;class kS{constructor(n){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,n=Bd(n),Yt(n,32);const t=dt(n,0),i=dt(n,2),r=dt(n,4),o=dt(n,6),s=dt(n,8),c=dt(n,10),l=dt(n,12),h=dt(n,14);this.r[0]=t&8191,this.r[1]=(t>>>13|i<<3)&8191,this.r[2]=(i>>>10|r<<6)&7939,this.r[3]=(r>>>7|o<<9)&8191,this.r[4]=(o>>>4|s<<12)&255,this.r[5]=s>>>1&8190,this.r[6]=(s>>>14|c<<2)&8191,this.r[7]=(c>>>11|l<<5)&8065,this.r[8]=(l>>>8|h<<8)&8191,this.r[9]=h>>>5&127;for(let d=0;d<8;d++)this.pad[d]=dt(n,16+2*d)}process(n,t,i=!1){const r=i?0:2048,{h:o,r:s}=this,c=s[0],l=s[1],h=s[2],d=s[3],f=s[4],m=s[5],g=s[6],w=s[7],p=s[8],_=s[9],x=dt(n,t+0),I=dt(n,t+2),b=dt(n,t+4),j=dt(n,t+6),C=dt(n,t+8),E=dt(n,t+10),T=dt(n,t+12),O=dt(n,t+14);let L=o[0]+(x&8191),N=o[1]+((x>>>13|I<<3)&8191),v=o[2]+((I>>>10|b<<6)&8191),D=o[3]+((b>>>7|j<<9)&8191),z=o[4]+((j>>>4|C<<12)&8191),V=o[5]+(C>>>1&8191),R=o[6]+((C>>>14|E<<2)&8191),B=o[7]+((E>>>11|T<<5)&8191),Y=o[8]+((T>>>8|O<<8)&8191),$=o[9]+(O>>>5|r),W=0,F=W+L*c+N*(5*_)+v*(5*p)+D*(5*w)+z*(5*g);W=F>>>13,F&=8191,F+=V*(5*m)+R*(5*f)+B*(5*d)+Y*(5*h)+$*(5*l),W+=F>>>13,F&=8191;let Q=W+L*l+N*c+v*(5*_)+D*(5*p)+z*(5*w);W=Q>>>13,Q&=8191,Q+=V*(5*g)+R*(5*m)+B*(5*f)+Y*(5*d)+$*(5*h),W+=Q>>>13,Q&=8191;let Z=W+L*h+N*l+v*c+D*(5*_)+z*(5*p);W=Z>>>13,Z&=8191,Z+=V*(5*w)+R*(5*g)+B*(5*m)+Y*(5*f)+$*(5*d),W+=Z>>>13,Z&=8191;let ne=W+L*d+N*h+v*l+D*c+z*(5*_);W=ne>>>13,ne&=8191,ne+=V*(5*p)+R*(5*w)+B*(5*g)+Y*(5*m)+$*(5*f),W+=ne>>>13,ne&=8191;let ce=W+L*f+N*d+v*h+D*l+z*c;W=ce>>>13,ce&=8191,ce+=V*(5*_)+R*(5*p)+B*(5*w)+Y*(5*g)+$*(5*m),W+=ce>>>13,ce&=8191;let q=W+L*m+N*f+v*d+D*h+z*l;W=q>>>13,q&=8191,q+=V*c+R*(5*_)+B*(5*p)+Y*(5*w)+$*(5*g),W+=q>>>13,q&=8191;let le=W+L*g+N*m+v*f+D*d+z*h;W=le>>>13,le&=8191,le+=V*l+R*c+B*(5*_)+Y*(5*p)+$*(5*w),W+=le>>>13,le&=8191;let re=W+L*w+N*g+v*m+D*f+z*d;W=re>>>13,re&=8191,re+=V*h+R*l+B*c+Y*(5*_)+$*(5*p),W+=re>>>13,re&=8191;let oe=W+L*p+N*w+v*g+D*m+z*f;W=oe>>>13,oe&=8191,oe+=V*d+R*h+B*l+Y*c+$*(5*_),W+=oe>>>13,oe&=8191;let ue=W+L*_+N*p+v*w+D*g+z*m;W=ue>>>13,ue&=8191,ue+=V*f+R*d+B*h+Y*l+$*c,W+=ue>>>13,ue&=8191,W=(W<<2)+W|0,W=W+F|0,F=W&8191,W=W>>>13,Q+=W,o[0]=F,o[1]=Q,o[2]=Z,o[3]=ne,o[4]=ce,o[5]=q,o[6]=le,o[7]=re,o[8]=oe,o[9]=ue}finalize(){const{h:n,pad:t}=this,i=new Uint16Array(10);let r=n[1]>>>13;n[1]&=8191;for(let c=2;c<10;c++)n[c]+=r,r=n[c]>>>13,n[c]&=8191;n[0]+=r*5,r=n[0]>>>13,n[0]&=8191,n[1]+=r,r=n[1]>>>13,n[1]&=8191,n[2]+=r,i[0]=n[0]+5,r=i[0]>>>13,i[0]&=8191;for(let c=1;c<10;c++)i[c]=n[c]+r,r=i[c]>>>13,i[c]&=8191;i[9]-=8192;let o=(r^1)-1;for(let c=0;c<10;c++)i[c]&=o;o=~o;for(let c=0;c<10;c++)n[c]=n[c]&o|i[c];n[0]=(n[0]|n[1]<<13)&65535,n[1]=(n[1]>>>3|n[2]<<10)&65535,n[2]=(n[2]>>>6|n[3]<<7)&65535,n[3]=(n[3]>>>9|n[4]<<4)&65535,n[4]=(n[4]>>>12|n[5]<<1|n[6]<<14)&65535,n[5]=(n[6]>>>2|n[7]<<11)&65535,n[6]=(n[7]>>>5|n[8]<<8)&65535,n[7]=(n[8]>>>8|n[9]<<5)&65535;let s=n[0]+t[0];n[0]=s&65535;for(let c=1;c<8;c++)s=(n[c]+t[c]|0)+(s>>>16)|0,n[c]=s&65535;Xo(i)}update(n){hm(this),n=Bd(n),Yt(n);const{buffer:t,blockLen:i}=this,r=n.length;for(let o=0;o<r;){const s=Math.min(i-this.pos,r-o);if(s===i){for(;i<=r-o;o+=i)this.process(n,o);continue}t.set(n.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===i&&(this.process(t,0,!1),this.pos=0)}return this}destroy(){Xo(this.h,this.r,this.buffer,this.pad)}digestInto(n){hm(this),_S(n,this),this.finished=!0;const{buffer:t,h:i}=this;let{pos:r}=this;if(r){for(t[r++]=1;r<16;r++)t[r]=0;this.process(t,0,!0)}this.finalize();let o=0;for(let s=0;s<8;s++)n[o++]=i[s]>>>0,n[o++]=i[s]>>>8;return n}digest(){const{buffer:n,outputLen:t}=this;this.digestInto(n);const i=n.slice(0,t);return this.destroy(),i}}function zS(e){const n=(i,r)=>e(r).update(Bd(i)).digest(),t=e(new Uint8Array(32));return n.outputLen=t.outputLen,n.blockLen=t.blockLen,n.create=i=>e(i),n}const PS=zS(e=>new kS(e));function RS(e,n,t,i,r,o=20){let s=e[0],c=e[1],l=e[2],h=e[3],d=n[0],f=n[1],m=n[2],g=n[3],w=n[4],p=n[5],_=n[6],x=n[7],I=r,b=t[0],j=t[1],C=t[2],E=s,T=c,O=l,L=h,N=d,v=f,D=m,z=g,V=w,R=p,B=_,Y=x,$=I,W=b,F=j,Q=C;for(let ne=0;ne<o;ne+=2)E=E+N|0,$=je($^E,16),V=V+$|0,N=je(N^V,12),E=E+N|0,$=je($^E,8),V=V+$|0,N=je(N^V,7),T=T+v|0,W=je(W^T,16),R=R+W|0,v=je(v^R,12),T=T+v|0,W=je(W^T,8),R=R+W|0,v=je(v^R,7),O=O+D|0,F=je(F^O,16),B=B+F|0,D=je(D^B,12),O=O+D|0,F=je(F^O,8),B=B+F|0,D=je(D^B,7),L=L+z|0,Q=je(Q^L,16),Y=Y+Q|0,z=je(z^Y,12),L=L+z|0,Q=je(Q^L,8),Y=Y+Q|0,z=je(z^Y,7),E=E+v|0,Q=je(Q^E,16),B=B+Q|0,v=je(v^B,12),E=E+v|0,Q=je(Q^E,8),B=B+Q|0,v=je(v^B,7),T=T+D|0,$=je($^T,16),Y=Y+$|0,D=je(D^Y,12),T=T+D|0,$=je($^T,8),Y=Y+$|0,D=je(D^Y,7),O=O+z|0,W=je(W^O,16),V=V+W|0,z=je(z^V,12),O=O+z|0,W=je(W^O,8),V=V+W|0,z=je(z^V,7),L=L+N|0,F=je(F^L,16),R=R+F|0,N=je(N^R,12),L=L+N|0,F=je(F^L,8),R=R+F|0,N=je(N^R,7);let Z=0;i[Z++]=s+E|0,i[Z++]=c+T|0,i[Z++]=l+O|0,i[Z++]=h+L|0,i[Z++]=d+N|0,i[Z++]=f+v|0,i[Z++]=m+D|0,i[Z++]=g+z|0,i[Z++]=w+V|0,i[Z++]=p+R|0,i[Z++]=_+B|0,i[Z++]=x+Y|0,i[Z++]=I+$|0,i[Z++]=b+W|0,i[Z++]=j+F|0,i[Z++]=C+Q|0}const VS=OS(RS,{counterRight:!1,counterLength:4,allowShortKeys:!1}),US=new Uint8Array(16),ym=(e,n)=>{e.update(n);const t=n.length%16;t&&e.update(US.subarray(t))},BS=new Uint8Array(32);function pm(e,n,t,i,r){const o=e(n,t,BS),s=PS.create(o);r&&ym(s,r),ym(s,i);const c=LS(i.length,r?r.length:0,!0);s.update(c);const l=s.digest();return Xo(o,c),l}const WS=e=>(n,t,i)=>({encrypt(r,o){const s=r.length;o=fm(s+16,o,!1),o.set(r);const c=o.subarray(0,-16);e(n,t,c,c,1);const l=pm(e,n,t,c,i);return o.set(l,s),Xo(l),o},decrypt(r,o){o=fm(r.length-16,o,!1);const s=r.subarray(0,-16),c=r.subarray(-16),l=pm(e,n,t,s,i);if(!CS(c,l))throw new Error("invalid tag");return o.set(r.subarray(0,-16)),e(n,t,o,o,1),Xo(l),o}}),Gw=jS({blockSize:64,nonceLength:12,tagLength:16},WS(VS));let qw=class extends Ll{constructor(n,t){super(),this.finished=!1,this.destroyed=!1,F0(n);const i=kn(t);if(this.iHash=n.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 r=this.blockLen,o=new Uint8Array(r);o.set(i.length>r?n.create().update(i).digest():i);for(let s=0;s<o.length;s++)o[s]^=54;this.iHash.update(o),this.oHash=n.create();for(let s=0;s<o.length;s++)o[s]^=106;this.oHash.update(o),jn(o)}update(n){return br(this),this.iHash.update(n),this}digestInto(n){br(this),Cn(n,this.outputLen),this.finished=!0,this.iHash.digestInto(n),this.oHash.update(n),this.oHash.digestInto(n),this.destroy()}digest(){const n=new Uint8Array(this.oHash.outputLen);return this.digestInto(n),n}_cloneInto(n){n||(n=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:i,finished:r,destroyed:o,blockLen:s,outputLen:c}=this;return n=n,n.finished=r,n.destroyed=o,n.blockLen=s,n.outputLen=c,n.oHash=t._cloneInto(n.oHash),n.iHash=i._cloneInto(n.iHash),n}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}};const Tl=(e,n,t)=>new qw(e,n).update(t).digest();Tl.create=(e,n)=>new qw(e,n);function $S(e,n,t){return F0(e),t===void 0&&(t=new Uint8Array(e.outputLen)),Tl(e,kn(t),kn(n))}const wu=Uint8Array.from([0]),wm=Uint8Array.of();function YS(e,n,t,i=32){F0(e),Li(i);const r=e.outputLen;if(i>255*r)throw new Error("Length should be <= 255*HashLen");const o=Math.ceil(i/r);t===void 0&&(t=wm);const s=new Uint8Array(o*r),c=Tl.create(e,n),l=c._cloneInto(),h=new Uint8Array(c.outputLen);for(let d=0;d<o;d++)wu[0]=d+1,l.update(d===0?wm:h).update(t).update(wu).digestInto(h),s.set(h,r*d),c._cloneInto(l);return c.destroy(),l.destroy(),jn(h,wu),s.slice(0,i)}const FS=(e,n,t,i,r)=>YS(e,$S(e,n,t),i,r),vl=El,q0=BigInt(0),Yd=BigInt(1);function Bc(e,n){if(typeof n!="boolean")throw new Error(e+" boolean expected, got "+n)}function qa(e){const n=e.toString(16);return n.length&1?"0"+n:n}function Kw(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?q0:BigInt("0x"+e)}function Nl(e){return Kw(ta(e))}function Wc(e){return Cn(e),Kw(ta(Uint8Array.from(e).reverse()))}function K0(e,n){return H0(e.toString(16).padStart(n*2,"0"))}function J0(e,n){return K0(e,n).reverse()}function $t(e,n,t){let i;if(typeof n=="string")try{i=H0(n)}catch(o){throw new Error(e+" must be hex string or Uint8Array, cause: "+o)}else if(Y0(n))i=Uint8Array.from(n);else throw new Error(e+" must be hex string or Uint8Array");const r=i.length;if(typeof t=="number"&&r!==t)throw new Error(e+" of length "+t+" expected, got "+r);return i}const _u=e=>typeof e=="bigint"&&q0<=e;function QS(e,n,t){return _u(e)&&_u(n)&&_u(t)&&n<=e&&e<t}function Fd(e,n,t,i){if(!QS(n,t,i))throw new Error("expected valid "+e+": "+t+" <= n < "+i+", got "+n)}function HS(e){let n;for(n=0;e>q0;e>>=Yd,n+=1);return n}const Sl=e=>(Yd<<BigInt(e))-Yd;function ZS(e,n,t){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof n!="number"||n<2)throw new Error("qByteLen must be a number");if(typeof t!="function")throw new Error("hmacFn must be a function");const i=m=>new Uint8Array(m),r=m=>Uint8Array.of(m);let o=i(e),s=i(e),c=0;const l=()=>{o.fill(1),s.fill(0),c=0},h=(...m)=>t(s,o,...m),d=(m=i(0))=>{s=h(r(0),m),o=h(),m.length!==0&&(s=h(r(1),m),o=h())},f=()=>{if(c++>=1e3)throw new Error("drbg: tried 1000 values");let m=0;const g=[];for(;m<n;){o=h();const w=o.slice();g.push(w),m+=o.length}return Pr(...g)};return(m,g)=>{l(),d(m);let w;for(;!(w=g(f()));)d();return l(),w}}function Al(e,n,t={}){if(!e||typeof e!="object")throw new Error("expected valid options object");function i(r,o,s){const c=e[r];if(s&&c===void 0)return;const l=typeof c;if(l!==o||c===null)throw new Error(`param "${r}" is invalid: expected ${o}, got ${l}`)}Object.entries(n).forEach(([r,o])=>i(r,o,!1)),Object.entries(t).forEach(([r,o])=>i(r,o,!0))}function _m(e){const n=new WeakMap;return(t,...i)=>{const r=n.get(t);if(r!==void 0)return r;const o=e(t,...i);return n.set(t,o),o}}const Ht=BigInt(0),kt=BigInt(1),Rr=BigInt(2),GS=BigInt(3),Jw=BigInt(4),Xw=BigInt(5),e5=BigInt(8);function Mn(e,n){const t=e%n;return t>=Ht?t:n+t}function Nn(e,n,t){let i=e;for(;n-- >Ht;)i*=i,i%=t;return i}function xm(e,n){if(e===Ht)throw new Error("invert: expected non-zero number");if(n<=Ht)throw new Error("invert: expected positive modulus, got "+n);let t=Mn(e,n),i=n,r=Ht,o=kt;for(;t!==Ht;){const s=i/t,c=i%t,l=r-o*s;i=t,t=c,r=o,o=l}if(i!==kt)throw new Error("invert: does not exist");return Mn(r,n)}function t5(e,n){const t=(e.ORDER+kt)/Jw,i=e.pow(n,t);if(!e.eql(e.sqr(i),n))throw new Error("Cannot find square root");return i}function qS(e,n){const t=(e.ORDER-Xw)/e5,i=e.mul(n,Rr),r=e.pow(i,t),o=e.mul(n,r),s=e.mul(e.mul(o,Rr),r),c=e.mul(o,e.sub(s,e.ONE));if(!e.eql(e.sqr(c),n))throw new Error("Cannot find square root");return c}function KS(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let n=e-kt,t=0;for(;n%Rr===Ht;)n/=Rr,t++;let i=Rr;const r=gs(e);for(;Mm(r,i)===1;)if(i++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(t===1)return t5;let o=r.pow(i,n);const s=(n+kt)/Rr;return function(c,l){if(c.is0(l))return l;if(Mm(c,l)!==1)throw new Error("Cannot find square root");let h=t,d=c.mul(c.ONE,o),f=c.pow(l,n),m=c.pow(l,s);for(;!c.eql(f,c.ONE);){if(c.is0(f))return c.ZERO;let g=1,w=c.sqr(f);for(;!c.eql(w,c.ONE);)if(g++,w=c.sqr(w),g===h)throw new Error("Cannot find square root");const p=kt<<BigInt(h-g-1),_=c.pow(d,p);h=g,d=c.sqr(_),f=c.mul(f,d),m=c.mul(m,_)}return m}}function JS(e){return e%Jw===GS?t5:e%e5===Xw?qS:KS(e)}const XS=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function eA(e){const n={ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"},t=XS.reduce((i,r)=>(i[r]="function",i),n);return Al(e,t),e}function tA(e,n,t){if(t<Ht)throw new Error("invalid exponent, negatives unsupported");if(t===Ht)return e.ONE;if(t===kt)return n;let i=e.ONE,r=n;for(;t>Ht;)t&kt&&(i=e.mul(i,r)),r=e.sqr(r),t>>=kt;return i}function n5(e,n,t=!1){const i=new Array(n.length).fill(t?e.ZERO:void 0),r=n.reduce((s,c,l)=>e.is0(c)?s:(i[l]=s,e.mul(s,c)),e.ONE),o=e.inv(r);return n.reduceRight((s,c,l)=>e.is0(c)?s:(i[l]=e.mul(s,i[l]),e.mul(s,c)),o),i}function Mm(e,n){const t=(e.ORDER-kt)/Rr,i=e.pow(n,t),r=e.eql(i,e.ONE),o=e.eql(i,e.ZERO),s=e.eql(i,e.neg(e.ONE));if(!r&&!o&&!s)throw new Error("invalid Legendre symbol result");return r?1:o?0:-1}function nA(e,n){n!==void 0&&Li(n);const t=n!==void 0?n:e.toString(2).length,i=Math.ceil(t/8);return{nBitLength:t,nByteLength:i}}function gs(e,n,t=!1,i={}){if(e<=Ht)throw new Error("invalid field: expected ORDER > 0, got "+e);let r,o;if(typeof n=="object"&&n!=null){if(i.sqrt||t)throw new Error("cannot specify opts in two arguments");const d=n;d.BITS&&(r=d.BITS),d.sqrt&&(o=d.sqrt),typeof d.isLE=="boolean"&&(t=d.isLE)}else typeof n=="number"&&(r=n),i.sqrt&&(o=i.sqrt);const{nBitLength:s,nByteLength:c}=nA(e,r);if(c>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let l;const h=Object.freeze({ORDER:e,isLE:t,BITS:s,BYTES:c,MASK:Sl(s),ZERO:Ht,ONE:kt,create:d=>Mn(d,e),isValid:d=>{if(typeof d!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof d);return Ht<=d&&d<e},is0:d=>d===Ht,isValidNot0:d=>!h.is0(d)&&h.isValid(d),isOdd:d=>(d&kt)===kt,neg:d=>Mn(-d,e),eql:(d,f)=>d===f,sqr:d=>Mn(d*d,e),add:(d,f)=>Mn(d+f,e),sub:(d,f)=>Mn(d-f,e),mul:(d,f)=>Mn(d*f,e),pow:(d,f)=>tA(h,d,f),div:(d,f)=>Mn(d*xm(f,e),e),sqrN:d=>d*d,addN:(d,f)=>d+f,subN:(d,f)=>d-f,mulN:(d,f)=>d*f,inv:d=>xm(d,e),sqrt:o||(d=>(l||(l=JS(e)),l(h,d))),toBytes:d=>t?J0(d,c):K0(d,c),fromBytes:d=>{if(d.length!==c)throw new Error("Field.fromBytes: expected "+c+" bytes, got "+d.length);return t?Wc(d):Nl(d)},invertBatch:d=>n5(h,d),cmov:(d,f,m)=>m?f:d});return Object.freeze(h)}function i5(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const n=e.toString(2).length;return Math.ceil(n/8)}function r5(e){const n=i5(e);return n+Math.ceil(n/2)}function iA(e,n,t=!1){const i=e.length,r=i5(n),o=r5(n);if(i<16||i<o||i>1024)throw new Error("expected "+o+"-1024 bytes of input, got "+i);const s=t?Wc(e):Nl(e),c=Mn(s,n-kt)+kt;return t?J0(c,r):K0(c,r)}const es=BigInt(0),Vr=BigInt(1);function ks(e,n){const t=n.negate();return e?t:n}function rA(e,n,t){const i=o=>o.pz,r=n5(e.Fp,t.map(i));return t.map((o,s)=>o.toAffine(r[s])).map(e.fromAffine)}function o5(e,n){if(!Number.isSafeInteger(e)||e<=0||e>n)throw new Error("invalid window size, expected [1.."+n+"], got W="+e)}function xu(e,n){o5(e,n);const t=Math.ceil(n/e)+1,i=2**(e-1),r=2**e,o=Sl(e),s=BigInt(e);return{windows:t,windowSize:i,mask:o,maxNumber:r,shiftBy:s}}function Im(e,n,t){const{windowSize:i,mask:r,maxNumber:o,shiftBy:s}=t;let c=Number(e&r),l=e>>s;c>i&&(c-=o,l+=Vr);const h=n*i,d=h+Math.abs(c)-1,f=c===0,m=c<0,g=n%2!==0;return{nextN:l,offset:d,isZero:f,isNeg:m,isNegF:g,offsetF:h}}function oA(e,n){if(!Array.isArray(e))throw new Error("array expected");e.forEach((t,i)=>{if(!(t instanceof n))throw new Error("invalid point at index "+i)})}function sA(e,n){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((t,i)=>{if(!n.isValid(t))throw new Error("invalid scalar at index "+i)})}const Mu=new WeakMap,s5=new WeakMap;function Iu(e){return s5.get(e)||1}function bm(e){if(e!==es)throw new Error("invalid wNAF")}function aA(e,n){return{constTimeNegate:ks,hasPrecomputes(t){return Iu(t)!==1},unsafeLadder(t,i,r=e.ZERO){let o=t;for(;i>es;)i&Vr&&(r=r.add(o)),o=o.double(),i>>=Vr;return r},precomputeWindow(t,i){const{windows:r,windowSize:o}=xu(i,n),s=[];let c=t,l=c;for(let h=0;h<r;h++){l=c,s.push(l);for(let d=1;d<o;d++)l=l.add(c),s.push(l);c=l.double()}return s},wNAF(t,i,r){let o=e.ZERO,s=e.BASE;const c=xu(t,n);for(let l=0;l<c.windows;l++){const{nextN:h,offset:d,isZero:f,isNeg:m,isNegF:g,offsetF:w}=Im(r,l,c);r=h,f?s=s.add(ks(g,i[w])):o=o.add(ks(m,i[d]))}return bm(r),{p:o,f:s}},wNAFUnsafe(t,i,r,o=e.ZERO){const s=xu(t,n);for(let c=0;c<s.windows&&r!==es;c++){const{nextN:l,offset:h,isZero:d,isNeg:f}=Im(r,c,s);if(r=l,!d){const m=i[h];o=o.add(f?m.negate():m)}}return bm(r),o},getPrecomputes(t,i,r){let o=Mu.get(i);return o||(o=this.precomputeWindow(i,t),t!==1&&(typeof r=="function"&&(o=r(o)),Mu.set(i,o))),o},wNAFCached(t,i,r){const o=Iu(t);return this.wNAF(o,this.getPrecomputes(o,t,r),i)},wNAFCachedUnsafe(t,i,r,o){const s=Iu(t);return s===1?this.unsafeLadder(t,i,o):this.wNAFUnsafe(s,this.getPrecomputes(s,t,r),i,o)},setWindowSize(t,i){o5(i,n),s5.set(t,i),Mu.delete(t)}}}function cA(e,n,t,i){let r=n,o=e.ZERO,s=e.ZERO;for(;t>es||i>es;)t&Vr&&(o=o.add(r)),i&Vr&&(s=s.add(r)),r=r.double(),t>>=Vr,i>>=Vr;return{p1:o,p2:s}}function lA(e,n,t,i){oA(t,e),sA(i,n);const r=t.length,o=i.length;if(r!==o)throw new Error("arrays of points and scalars must have equal length");const s=e.ZERO,c=HS(BigInt(r));let l=1;c>12?l=c-3:c>4?l=c-2:c>0&&(l=2);const h=Sl(l),d=new Array(Number(h)+1).fill(s),f=Math.floor((n.BITS-1)/l)*l;let m=s;for(let g=f;g>=0;g-=l){d.fill(s);for(let p=0;p<o;p++){const _=i[p],x=Number(_>>BigInt(g)&h);d[x]=d[x].add(t[p])}let w=s;for(let p=d.length-1,_=s;p>0;p--)_=_.add(d[p]),w=w.add(_);if(m=m.add(w),g!==0)for(let p=0;p<l;p++)m=m.double()}return m}function Cm(e,n){if(n){if(n.ORDER!==e)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return eA(n),n}else return gs(e)}function uA(e,n,t={}){if(!n||typeof n!="object")throw new Error(`expected valid ${e} CURVE object`);for(const s of["p","n","h"]){const c=n[s];if(!(typeof c=="bigint"&&c>es))throw new Error(`CURVE.${s} must be positive bigint`)}const i=Cm(n.p,t.Fp),r=Cm(n.n,t.Fn),o=["Gx","Gy","a","b"];for(const s of o)if(!i.isValid(n[s]))throw new Error(`CURVE.${s} must be valid field element of CURVE.Fp`);return{Fp:i,Fn:r}}BigInt(0),BigInt(1),BigInt(2),BigInt(8);const bs=BigInt(0),bo=BigInt(1),Ka=BigInt(2);function dA(e){return Al(e,{adjustScalarBytes:"function",powPminus2:"function"}),Object.freeze({...e})}function hA(e){const n=dA(e),{P:t,type:i,adjustScalarBytes:r,powPminus2:o,randomBytes:s}=n,c=i==="x25519";if(!c&&i!=="x448")throw new Error("invalid type");const l=s||ms,h=c?255:448,d=c?32:56,f=BigInt(c?9:5),m=BigInt(c?121665:39081),g=c?Ka**BigInt(254):Ka**BigInt(447),w=c?BigInt(8)*Ka**BigInt(251)-bo:BigInt(4)*Ka**BigInt(445)-bo,p=g+w+bo,_=L=>Mn(L,t),x=I(f);function I(L){return J0(_(L),d)}function b(L){const N=$t("u coordinate",L,d);return c&&(N[31]&=127),_(Wc(N))}function j(L){return Wc(r($t("scalar",L,d)))}function C(L,N){const v=O(b(N),j(L));if(v===bs)throw new Error("invalid private or public key received");return I(v)}function E(L){return C(L,x)}function T(L,N,v){const D=_(L*(N-v));return N=_(N-D),v=_(v+D),{x_2:N,x_3:v}}function O(L,N){Fd("u",L,bs,t),Fd("scalar",N,g,p);const v=N,D=L;let z=bo,V=bs,R=L,B=bo,Y=bs;for(let W=BigInt(h-1);W>=bs;W--){const F=v>>W&bo;Y^=F,{x_2:z,x_3:R}=T(Y,z,R),{x_2:V,x_3:B}=T(Y,V,B),Y=F;const Q=z+V,Z=_(Q*Q),ne=z-V,ce=_(ne*ne),q=Z-ce,le=R+B,re=R-B,oe=_(re*Q),ue=_(le*ne),Ce=oe+ue,Ue=oe-ue;R=_(Ce*Ce),B=_(D*_(Ue*Ue)),z=_(Z*ce),V=_(q*(Z+_(m*q)))}({x_2:z,x_3:R}=T(Y,z,R)),{x_2:V,x_3:B}=T(Y,V,B);const $=o(V);return _(z*$)}return{scalarMult:C,scalarMultBase:E,getSharedSecret:(L,N)=>C(L,N),getPublicKey:L=>E(L),utils:{randomPrivateKey:()=>l(d)},GuBytes:x.slice()}}BigInt(0);const fA=BigInt(1),jm=BigInt(2),mA=BigInt(3),gA=BigInt(5);BigInt(8);const a5={p:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function yA(e){const n=BigInt(10),t=BigInt(20),i=BigInt(40),r=BigInt(80),o=a5.p,s=e*e%o*e%o,c=Nn(s,jm,o)*s%o,l=Nn(c,fA,o)*e%o,h=Nn(l,gA,o)*l%o,d=Nn(h,n,o)*h%o,f=Nn(d,t,o)*d%o,m=Nn(f,i,o)*f%o,g=Nn(m,r,o)*m%o,w=Nn(g,r,o)*m%o,p=Nn(w,n,o)*h%o;return{pow_p_5_8:Nn(p,jm,o)*e%o,b2:s}}function pA(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const Qd=(()=>{const e=a5.p;return hA({P:e,type:"x25519",powPminus2:n=>{const{pow_p_5_8:t,b2:i}=yA(n);return Mn(Nn(t,mA,e)*i,e)},adjustScalarBytes:pA})})();function Lm(e){e.lowS!==void 0&&Bc("lowS",e.lowS),e.prehash!==void 0&&Bc("prehash",e.prehash)}class wA extends Error{constructor(n=""){super(n)}}const mi={Err:wA,_tlv:{encode:(e,n)=>{const{Err:t}=mi;if(e<0||e>256)throw new t("tlv.encode: wrong tag");if(n.length&1)throw new t("tlv.encode: unpadded data");const i=n.length/2,r=qa(i);if(r.length/2&128)throw new t("tlv.encode: long form length too big");const o=i>127?qa(r.length/2|128):"";return qa(e)+o+r+n},decode(e,n){const{Err:t}=mi;let i=0;if(e<0||e>256)throw new t("tlv.encode: wrong tag");if(n.length<2||n[i++]!==e)throw new t("tlv.decode: wrong tlv");const r=n[i++],o=!!(r&128);let s=0;if(!o)s=r;else{const l=r&127;if(!l)throw new t("tlv.decode(long): indefinite length not supported");if(l>4)throw new t("tlv.decode(long): byte length is too big");const h=n.subarray(i,i+l);if(h.length!==l)throw new t("tlv.decode: length bytes not complete");if(h[0]===0)throw new t("tlv.decode(long): zero leftmost byte");for(const d of h)s=s<<8|d;if(i+=l,s<128)throw new t("tlv.decode(long): not minimal encoding")}const c=n.subarray(i,i+s);if(c.length!==s)throw new t("tlv.decode: wrong value length");return{v:c,l:n.subarray(i+s)}}},_int:{encode(e){const{Err:n}=mi;if(e<zs)throw new n("integer: negative integers are not allowed");let t=qa(e);if(Number.parseInt(t[0],16)&8&&(t="00"+t),t.length&1)throw new n("unexpected DER parsing assertion: unpadded hex");return t},decode(e){const{Err:n}=mi;if(e[0]&128)throw new n("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new n("invalid signature integer: unnecessary leading zero");return Nl(e)}},toSig(e){const{Err:n,_int:t,_tlv:i}=mi,r=$t("signature",e),{v:o,l:s}=i.decode(48,r);if(s.length)throw new n("invalid signature: left bytes after parsing");const{v:c,l}=i.decode(2,o),{v:h,l:d}=i.decode(2,l);if(d.length)throw new n("invalid signature: left bytes after parsing");return{r:t.decode(c),s:t.decode(h)}},hexFromSig(e){const{_tlv:n,_int:t}=mi,i=n.encode(2,t.encode(e.r)),r=n.encode(2,t.encode(e.s)),o=i+r;return n.encode(48,o)}},zs=BigInt(0),Ps=BigInt(1),_A=BigInt(2),Ja=BigInt(3),xA=BigInt(4);function MA(e,n,t){function i(r){const o=e.sqr(r),s=e.mul(o,r);return e.add(e.add(s,e.mul(r,n)),t)}return i}function c5(e,n,t){const{BYTES:i}=e;function r(o){let s;if(typeof o=="bigint")s=o;else{let c=$t("private key",o);if(n){if(!n.includes(c.length*2))throw new Error("invalid private key");const l=new Uint8Array(i);l.set(c,l.length-c.length),c=l}try{s=e.fromBytes(c)}catch{throw new Error(`invalid private key: expected ui8a of size ${i}, got ${typeof o}`)}}if(t&&(s=e.create(s)),!e.isValidNot0(s))throw new Error("invalid private key: out of range [1..N-1]");return s}return r}function IA(e,n={}){const{Fp:t,Fn:i}=uA("weierstrass",e,n),{h:r,n:o}=e;Al(n,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});const{endo:s}=n;if(s&&(!t.is0(e.a)||typeof s.beta!="bigint"||typeof s.splitScalar!="function"))throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function');function c(){if(!t.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}function l(O,L,N){const{x:v,y:D}=L.toAffine(),z=t.toBytes(v);if(Bc("isCompressed",N),N){c();const V=!t.isOdd(D);return Pr(l5(V),z)}else return Pr(Uint8Array.of(4),z,t.toBytes(D))}function h(O){Cn(O);const L=t.BYTES,N=L+1,v=2*L+1,D=O.length,z=O[0],V=O.subarray(1);if(D===N&&(z===2||z===3)){const R=t.fromBytes(V);if(!t.isValid(R))throw new Error("bad point: is not on curve, wrong x");const B=m(R);let Y;try{Y=t.sqrt(B)}catch(W){const F=W instanceof Error?": "+W.message:"";throw new Error("bad point: is not on curve, sqrt error"+F)}c();const $=t.isOdd(Y);return(z&1)===1!==$&&(Y=t.neg(Y)),{x:R,y:Y}}else if(D===v&&z===4){const R=t.fromBytes(V.subarray(L*0,L*1)),B=t.fromBytes(V.subarray(L*1,L*2));if(!g(R,B))throw new Error("bad point: is not on curve");return{x:R,y:B}}else throw new Error(`bad point: got length ${D}, expected compressed=${N} or uncompressed=${v}`)}const d=n.toBytes||l,f=n.fromBytes||h,m=MA(t,e.a,e.b);function g(O,L){const N=t.sqr(L),v=m(O);return t.eql(N,v)}if(!g(e.Gx,e.Gy))throw new Error("bad curve params: generator point");const w=t.mul(t.pow(e.a,Ja),xA),p=t.mul(t.sqr(e.b),BigInt(27));if(t.is0(t.add(w,p)))throw new Error("bad curve params: a or b");function _(O,L,N=!1){if(!t.isValid(L)||N&&t.is0(L))throw new Error(`bad point coordinate ${O}`);return L}function x(O){if(!(O instanceof C))throw new Error("ProjectivePoint expected")}const I=_m((O,L)=>{const{px:N,py:v,pz:D}=O;if(t.eql(D,t.ONE))return{x:N,y:v};const z=O.is0();L==null&&(L=z?t.ONE:t.inv(D));const V=t.mul(N,L),R=t.mul(v,L),B=t.mul(D,L);if(z)return{x:t.ZERO,y:t.ZERO};if(!t.eql(B,t.ONE))throw new Error("invZ was invalid");return{x:V,y:R}}),b=_m(O=>{if(O.is0()){if(n.allowInfinityPoint&&!t.is0(O.py))return;throw new Error("bad point: ZERO")}const{x:L,y:N}=O.toAffine();if(!t.isValid(L)||!t.isValid(N))throw new Error("bad point: x or y not field elements");if(!g(L,N))throw new Error("bad point: equation left != right");if(!O.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});function j(O,L,N,v,D){return N=new C(t.mul(N.px,O),N.py,N.pz),L=ks(v,L),N=ks(D,N),L.add(N)}class C{constructor(L,N,v){this.px=_("x",L),this.py=_("y",N,!0),this.pz=_("z",v),Object.freeze(this)}static fromAffine(L){const{x:N,y:v}=L||{};if(!L||!t.isValid(N)||!t.isValid(v))throw new Error("invalid affine point");if(L instanceof C)throw new Error("projective point not allowed");return t.is0(N)&&t.is0(v)?C.ZERO:new C(N,v,t.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(L){return rA(C,"pz",L)}static fromBytes(L){return Cn(L),C.fromHex(L)}static fromHex(L){const N=C.fromAffine(f($t("pointHex",L)));return N.assertValidity(),N}static fromPrivateKey(L){const N=c5(i,n.allowedPrivateKeyLengths,n.wrapPrivateKey);return C.BASE.multiply(N(L))}static msm(L,N){return lA(C,i,L,N)}precompute(L=8,N=!0){return T.setWindowSize(this,L),N||this.multiply(Ja),this}_setWindowSize(L){this.precompute(L)}assertValidity(){b(this)}hasEvenY(){const{y:L}=this.toAffine();if(!t.isOdd)throw new Error("Field doesn't support isOdd");return!t.isOdd(L)}equals(L){x(L);const{px:N,py:v,pz:D}=this,{px:z,py:V,pz:R}=L,B=t.eql(t.mul(N,R),t.mul(z,D)),Y=t.eql(t.mul(v,R),t.mul(V,D));return B&&Y}negate(){return new C(this.px,t.neg(this.py),this.pz)}double(){const{a:L,b:N}=e,v=t.mul(N,Ja),{px:D,py:z,pz:V}=this;let R=t.ZERO,B=t.ZERO,Y=t.ZERO,$=t.mul(D,D),W=t.mul(z,z),F=t.mul(V,V),Q=t.mul(D,z);return Q=t.add(Q,Q),Y=t.mul(D,V),Y=t.add(Y,Y),R=t.mul(L,Y),B=t.mul(v,F),B=t.add(R,B),R=t.sub(W,B),B=t.add(W,B),B=t.mul(R,B),R=t.mul(Q,R),Y=t.mul(v,Y),F=t.mul(L,F),Q=t.sub($,F),Q=t.mul(L,Q),Q=t.add(Q,Y),Y=t.add($,$),$=t.add(Y,$),$=t.add($,F),$=t.mul($,Q),B=t.add(B,$),F=t.mul(z,V),F=t.add(F,F),$=t.mul(F,Q),R=t.sub(R,$),Y=t.mul(F,W),Y=t.add(Y,Y),Y=t.add(Y,Y),new C(R,B,Y)}add(L){x(L);const{px:N,py:v,pz:D}=this,{px:z,py:V,pz:R}=L;let B=t.ZERO,Y=t.ZERO,$=t.ZERO;const W=e.a,F=t.mul(e.b,Ja);let Q=t.mul(N,z),Z=t.mul(v,V),ne=t.mul(D,R),ce=t.add(N,v),q=t.add(z,V);ce=t.mul(ce,q),q=t.add(Q,Z),ce=t.sub(ce,q),q=t.add(N,D);let le=t.add(z,R);return q=t.mul(q,le),le=t.add(Q,ne),q=t.sub(q,le),le=t.add(v,D),B=t.add(V,R),le=t.mul(le,B),B=t.add(Z,ne),le=t.sub(le,B),$=t.mul(W,q),B=t.mul(F,ne),$=t.add(B,$),B=t.sub(Z,$),$=t.add(Z,$),Y=t.mul(B,$),Z=t.add(Q,Q),Z=t.add(Z,Q),ne=t.mul(W,ne),q=t.mul(F,q),Z=t.add(Z,ne),ne=t.sub(Q,ne),ne=t.mul(W,ne),q=t.add(q,ne),Q=t.mul(Z,q),Y=t.add(Y,Q),Q=t.mul(le,q),B=t.mul(ce,B),B=t.sub(B,Q),Q=t.mul(ce,Z),$=t.mul(le,$),$=t.add($,Q),new C(B,Y,$)}subtract(L){return this.add(L.negate())}is0(){return this.equals(C.ZERO)}multiply(L){const{endo:N}=n;if(!i.isValidNot0(L))throw new Error("invalid scalar: out of range");let v,D;const z=V=>T.wNAFCached(this,V,C.normalizeZ);if(N){const{k1neg:V,k1:R,k2neg:B,k2:Y}=N.splitScalar(L),{p:$,f:W}=z(R),{p:F,f:Q}=z(Y);D=W.add(Q),v=j(N.beta,$,F,V,B)}else{const{p:V,f:R}=z(L);v=V,D=R}return C.normalizeZ([v,D])[0]}multiplyUnsafe(L){const{endo:N}=n,v=this;if(!i.isValid(L))throw new Error("invalid scalar: out of range");if(L===zs||v.is0())return C.ZERO;if(L===Ps)return v;if(T.hasPrecomputes(this))return this.multiply(L);if(N){const{k1neg:D,k1:z,k2neg:V,k2:R}=N.splitScalar(L),{p1:B,p2:Y}=cA(C,v,z,R);return j(N.beta,B,Y,D,V)}else return T.wNAFCachedUnsafe(v,L)}multiplyAndAddUnsafe(L,N,v){const D=this.multiplyUnsafe(N).add(L.multiplyUnsafe(v));return D.is0()?void 0:D}toAffine(L){return I(this,L)}isTorsionFree(){const{isTorsionFree:L}=n;return r===Ps?!0:L?L(C,this):T.wNAFCachedUnsafe(this,o).is0()}clearCofactor(){const{clearCofactor:L}=n;return r===Ps?this:L?L(C,this):this.multiplyUnsafe(r)}toBytes(L=!0){return Bc("isCompressed",L),this.assertValidity(),d(C,this,L)}toRawBytes(L=!0){return this.toBytes(L)}toHex(L=!0){return ta(this.toBytes(L))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}C.BASE=new C(e.Gx,e.Gy,t.ONE),C.ZERO=new C(t.ZERO,t.ONE,t.ZERO),C.Fp=t,C.Fn=i;const E=i.BITS,T=aA(C,n.endo?Math.ceil(E/2):E);return C}function l5(e){return Uint8Array.of(e?2:3)}function bA(e,n,t={}){Al(n,{hash:"function"},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const i=n.randomBytes||ms,r=n.hmac||((v,...D)=>Tl(n.hash,v,Pr(...D))),{Fp:o,Fn:s}=e,{ORDER:c,BITS:l}=s;function h(v){const D=c>>Ps;return v>D}function d(v){return h(v)?s.neg(v):v}function f(v,D){if(!s.isValidNot0(D))throw new Error(`invalid signature ${v}: out of range 1..CURVE.n`)}class m{constructor(D,z,V){f("r",D),f("s",z),this.r=D,this.s=z,V!=null&&(this.recovery=V),Object.freeze(this)}static fromCompact(D){const z=s.BYTES,V=$t("compactSignature",D,z*2);return new m(s.fromBytes(V.subarray(0,z)),s.fromBytes(V.subarray(z,z*2)))}static fromDER(D){const{r:z,s:V}=mi.toSig($t("DER",D));return new m(z,V)}assertValidity(){}addRecoveryBit(D){return new m(this.r,this.s,D)}recoverPublicKey(D){const z=o.ORDER,{r:V,s:R,recovery:B}=this;if(B==null||![0,1,2,3].includes(B))throw new Error("recovery id invalid");if(c*_A<z&&B>1)throw new Error("recovery id is ambiguous for h>1 curve");const Y=B===2||B===3?V+c:V;if(!o.isValid(Y))throw new Error("recovery id 2 or 3 invalid");const $=o.toBytes(Y),W=e.fromHex(Pr(l5((B&1)===0),$)),F=s.inv(Y),Q=b($t("msgHash",D)),Z=s.create(-Q*F),ne=s.create(R*F),ce=e.BASE.multiplyUnsafe(Z).add(W.multiplyUnsafe(ne));if(ce.is0())throw new Error("point at infinify");return ce.assertValidity(),ce}hasHighS(){return h(this.s)}normalizeS(){return this.hasHighS()?new m(this.r,s.neg(this.s),this.recovery):this}toBytes(D){if(D==="compact")return Pr(s.toBytes(this.r),s.toBytes(this.s));if(D==="der")return H0(mi.hexFromSig(this));throw new Error("invalid format")}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return ta(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return ta(this.toBytes("compact"))}}const g=c5(s,t.allowedPrivateKeyLengths,t.wrapPrivateKey),w={isValidPrivateKey(v){try{return g(v),!0}catch{return!1}},normPrivateKeyToScalar:g,randomPrivateKey:()=>{const v=c;return iA(i(r5(v)),v)},precompute(v=8,D=e.BASE){return D.precompute(v,!1)}};function p(v,D=!0){return e.fromPrivateKey(v).toBytes(D)}function _(v){if(typeof v=="bigint")return!1;if(v instanceof e)return!0;const D=$t("key",v).length,z=o.BYTES,V=z+1,R=2*z+1;if(!(t.allowedPrivateKeyLengths||s.BYTES===V))return D===V||D===R}function x(v,D,z=!0){if(_(v)===!0)throw new Error("first arg must be private key");if(_(D)===!1)throw new Error("second arg must be public key");return e.fromHex(D).multiply(g(v)).toBytes(z)}const I=n.bits2int||function(v){if(v.length>8192)throw new Error("input is too large");const D=Nl(v),z=v.length*8-l;return z>0?D>>BigInt(z):D},b=n.bits2int_modN||function(v){return s.create(I(v))},j=Sl(l);function C(v){return Fd("num < 2^"+l,v,zs,j),s.toBytes(v)}function E(v,D,z=T){if(["recovered","canonical"].some(ce=>ce in z))throw new Error("sign() legacy options not supported");const{hash:V}=n;let{lowS:R,prehash:B,extraEntropy:Y}=z;R==null&&(R=!0),v=$t("msgHash",v),Lm(z),B&&(v=$t("prehashed msgHash",V(v)));const $=b(v),W=g(D),F=[C(W),C($)];if(Y!=null&&Y!==!1){const ce=Y===!0?i(o.BYTES):Y;F.push($t("extraEntropy",ce))}const Q=Pr(...F),Z=$;function ne(ce){const q=I(ce);if(!s.isValidNot0(q))return;const le=s.inv(q),re=e.BASE.multiply(q).toAffine(),oe=s.create(re.x);if(oe===zs)return;const ue=s.create(le*s.create(Z+oe*W));if(ue===zs)return;let Ce=(re.x===oe?0:2)|Number(re.y&Ps),Ue=ue;return R&&h(ue)&&(Ue=d(ue),Ce^=1),new m(oe,Ue,Ce)}return{seed:Q,k2sig:ne}}const T={lowS:n.lowS,prehash:!1},O={lowS:n.lowS,prehash:!1};function L(v,D,z=T){const{seed:V,k2sig:R}=E(v,D,z);return ZS(n.hash.outputLen,s.BYTES,r)(V,R)}e.BASE.precompute(8);function N(v,D,z,V=O){const R=v;D=$t("msgHash",D),z=$t("publicKey",z),Lm(V);const{lowS:B,prehash:Y,format:$}=V;if("strict"in V)throw new Error("options.strict was renamed to lowS");if($!==void 0&&!["compact","der","js"].includes($))throw new Error('format must be "compact", "der" or "js"');const W=typeof R=="string"||Y0(R),F=!W&&!$&&typeof R=="object"&&R!==null&&typeof R.r=="bigint"&&typeof R.s=="bigint";if(!W&&!F)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let Q,Z;try{if(F)if($===void 0||$==="js")Q=new m(R.r,R.s);else throw new Error("invalid format");if(W){try{$!=="compact"&&(Q=m.fromDER(R))}catch(Ce){if(!(Ce instanceof mi.Err))throw Ce}!Q&&$!=="der"&&(Q=m.fromCompact(R))}Z=e.fromHex(z)}catch{return!1}if(!Q||B&&Q.hasHighS())return!1;Y&&(D=n.hash(D));const{r:ne,s:ce}=Q,q=b(D),le=s.inv(ce),re=s.create(q*le),oe=s.create(ne*le),ue=e.BASE.multiplyUnsafe(re).add(Z.multiplyUnsafe(oe));return ue.is0()?!1:s.create(ue.x)===ne}return Object.freeze({getPublicKey:p,getSharedSecret:x,sign:L,verify:N,utils:w,Point:e,Signature:m})}function CA(e){const n={a:e.a,b:e.b,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},t=e.Fp,i=gs(n.n,e.nBitLength),r={Fp:t,Fn:i,allowedPrivateKeyLengths:e.allowedPrivateKeyLengths,allowInfinityPoint:e.allowInfinityPoint,endo:e.endo,wrapPrivateKey:e.wrapPrivateKey,isTorsionFree:e.isTorsionFree,clearCofactor:e.clearCofactor,fromBytes:e.fromBytes,toBytes:e.toBytes};return{CURVE:n,curveOpts:r}}function jA(e){const{CURVE:n,curveOpts:t}=CA(e),i={hash:e.hash,hmac:e.hmac,randomBytes:e.randomBytes,lowS:e.lowS,bits2int:e.bits2int,bits2int_modN:e.bits2int_modN};return{CURVE:n,curveOpts:t,ecdsaOpts:i}}function LA(e,n){return Object.assign({},n,{ProjectivePoint:n.Point,CURVE:e})}function EA(e){const{CURVE:n,curveOpts:t,ecdsaOpts:i}=jA(e),r=IA(n,t),o=bA(r,i,t);return LA(e,o)}function Hd(e,n){const t=i=>EA({...e,hash:i});return{...t(n),create:t}}const u5={p:BigInt("0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff"),n:BigInt("0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551"),h:BigInt(1),a:BigInt("0xffffffff00000001000000000000000000000000fffffffffffffffffffffffc"),b:BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b"),Gx:BigInt("0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296"),Gy:BigInt("0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5")},d5={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff"),n:BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973"),h:BigInt(1),a:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000fffffffc"),b:BigInt("0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef"),Gx:BigInt("0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7"),Gy:BigInt("0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f")},h5={p:BigInt("0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),n:BigInt("0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409"),h:BigInt(1),a:BigInt("0x1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc"),b:BigInt("0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00"),Gx:BigInt("0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66"),Gy:BigInt("0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650")},TA=gs(u5.p),vA=gs(d5.p),NA=gs(h5.p),SA=Hd({...u5,Fp:TA,lowS:!1},El);Hd({...d5,Fp:vA,lowS:!1},VN),Hd({...h5,Fp:NA,lowS:!1,allowedPrivateKeyLengths:[130,131,132]},RN);const AA=SA,f5="base10",zt="base16",Ft="base64pad",Gi="base64url",ja="utf8",m5=0,pi=1,La=2,DA=0,Em=1,Rs=12,X0=32;function OA(){const e=Qd.utils.randomPrivateKey(),n=Qd.getPublicKey(e);return{privateKey:qt(e,zt),publicKey:qt(n,zt)}}function Zd(){const e=ms(X0);return qt(e,zt)}function kA(e,n){const t=Qd.getSharedSecret(In(e,zt),In(n,zt)),i=FS(vl,t,void 0,void 0,X0);return qt(i,zt)}function lc(e){const n=vl(In(e,zt));return qt(n,zt)}function xn(e){const n=vl(In(e,ja));return qt(n,zt)}function g5(e){return In(`${e}`,f5)}function oo(e){return Number(qt(e,f5))}function y5(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function p5(e){const n=e.replace(/-/g,"+").replace(/_/g,"/"),t=(4-n.length%4)%4;return n+"=".repeat(t)}function zA(e){const n=g5(typeof e.type<"u"?e.type:m5);if(oo(n)===pi&&typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const t=typeof e.senderPublicKey<"u"?In(e.senderPublicKey,zt):void 0,i=typeof e.iv<"u"?In(e.iv,zt):ms(Rs),r=In(e.symKey,zt),o=Gw(r,i).encrypt(In(e.message,ja)),s=w5({type:n,sealed:o,iv:i,senderPublicKey:t});return e.encoding===Gi?y5(s):s}function PA(e){const n=In(e.symKey,zt),{sealed:t,iv:i}=ia({encoded:e.encoded,encoding:e.encoding}),r=Gw(n,i).decrypt(t);if(r===null)throw new Error("Failed to decrypt");return qt(r,ja)}function RA(e,n){const t=g5(La),i=ms(Rs),r=In(e,ja),o=w5({type:t,sealed:r,iv:i});return n===Gi?y5(o):o}function VA(e,n){const{sealed:t}=ia({encoded:e,encoding:n});return qt(t,ja)}function w5(e){if(oo(e.type)===La)return qt(Os([e.type,e.sealed]),Ft);if(oo(e.type)===pi){if(typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return qt(Os([e.type,e.senderPublicKey,e.iv,e.sealed]),Ft)}return qt(Os([e.type,e.iv,e.sealed]),Ft)}function ia(e){const n=(e.encoding||Ft)===Gi?p5(e.encoded):e.encoded,t=In(n,Ft),i=t.slice(DA,Em),r=Em;if(oo(i)===pi){const l=r+X0,h=l+Rs,d=t.slice(r,l),f=t.slice(l,h),m=t.slice(h);return{type:i,sealed:m,iv:f,senderPublicKey:d}}if(oo(i)===La){const l=t.slice(r),h=ms(Rs);return{type:i,sealed:l,iv:h}}const o=r+Rs,s=t.slice(r,o),c=t.slice(o);return{type:i,sealed:c,iv:s}}function UA(e,n){const t=ia({encoded:e,encoding:n==null?void 0:n.encoding});return _5({type:oo(t.type),senderPublicKey:typeof t.senderPublicKey<"u"?qt(t.senderPublicKey,zt):void 0,receiverPublicKey:n==null?void 0:n.receiverPublicKey})}function _5(e){const n=(e==null?void 0:e.type)||m5;if(n===pi){if(typeof(e==null?void 0:e.senderPublicKey)>"u")throw new Error("missing sender public key");if(typeof(e==null?void 0:e.receiverPublicKey)>"u")throw new Error("missing receiver public key")}return{type:n,senderPublicKey:e==null?void 0:e.senderPublicKey,receiverPublicKey:e==null?void 0:e.receiverPublicKey}}function Tm(e){return e.type===pi&&typeof e.senderPublicKey=="string"&&typeof e.receiverPublicKey=="string"}function vm(e){return e.type===La}function BA(e){const n=Ne.from(e.x,"base64"),t=Ne.from(e.y,"base64");return Os([new Uint8Array([4]),n,t])}function WA(e,n){const[t,i,r]=e.split("."),o=Ne.from(p5(r),"base64");if(o.length!==64)throw new Error("Invalid signature length");const s=o.slice(0,32),c=o.slice(32,64),l=`${t}.${i}`,h=vl(l),d=BA(n);if(!AA.verify(Os([s,c]),h,d))throw new Error("Invalid signature");return ku(e).payload}const $A="irn";function $c(e){return(e==null?void 0:e.relay)||{protocol:$A}}function To(e){const n=X3[e];if(typeof n>"u")throw new Error(`Relay Protocol not supported: ${e}`);return n}function YA(e,n="-"){const t={},i="relay"+n;return Object.keys(e).forEach(r=>{if(r.startsWith(i)){const o=r.replace(i,""),s=e[r];t[o]=s}}),t}function Nm(e){if(!e.includes("wc:")){const h=Nw(e);h!=null&&h.includes("wc:")&&(e=h)}e=e.includes("wc://")?e.replace("wc://",""):e,e=e.includes("wc:")?e.replace("wc:",""):e;const n=e.indexOf(":"),t=e.indexOf("?")!==-1?e.indexOf("?"):void 0,i=e.substring(0,n),r=e.substring(n+1,t).split("@"),o=typeof t<"u"?e.substring(t):"",s=new URLSearchParams(o),c={};s.forEach((h,d)=>{c[d]=h});const l=typeof c.methods=="string"?c.methods.split(","):void 0;return{protocol:i,topic:FA(r[0]),version:parseInt(r[1],10),symKey:c.symKey,relay:YA(c),methods:l,expiryTimestamp:c.expiryTimestamp?parseInt(c.expiryTimestamp,10):void 0}}function FA(e){return e.startsWith("//")?e.substring(2):e}function QA(e,n="-"){const t="relay",i={};return Object.keys(e).forEach(r=>{const o=r,s=t+n+o;e[o]&&(i[s]=e[o])}),i}function Sm(e){const n=new URLSearchParams,t=QA(e.relay);Object.keys(t).sort().forEach(r=>{n.set(r,t[r])}),n.set("symKey",e.symKey),e.expiryTimestamp&&n.set("expiryTimestamp",e.expiryTimestamp.toString()),e.methods&&n.set("methods",e.methods.join(","));const i=n.toString();return`${e.protocol}:${e.topic}@${e.version}?${i}`}function Xa(e,n,t){return`${e}?wc_ev=${t}&topic=${n}`}var HA=Object.defineProperty,ZA=Object.defineProperties,GA=Object.getOwnPropertyDescriptors,Am=Object.getOwnPropertySymbols,qA=Object.prototype.hasOwnProperty,KA=Object.prototype.propertyIsEnumerable,Dm=(e,n,t)=>n in e?HA(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,JA=(e,n)=>{for(var t in n||(n={}))qA.call(n,t)&&Dm(e,t,n[t]);if(Am)for(var t of Am(n))KA.call(n,t)&&Dm(e,t,n[t]);return e},XA=(e,n)=>ZA(e,GA(n));function ys(e){const n=[];return e.forEach(t=>{const[i,r]=t.split(":");n.push(`${i}:${r}`)}),n}function eD(e){const n=[];return Object.values(e).forEach(t=>{n.push(...ys(t.accounts))}),n}function tD(e,n){const t=[];return Object.values(e).forEach(i=>{ys(i.accounts).includes(n)&&t.push(...i.methods)}),t}function nD(e,n){const t=[];return Object.values(e).forEach(i=>{ys(i.accounts).includes(n)&&t.push(...i.events)}),t}function x5(e){return e.includes(":")}function iD(e){return x5(e)?e.split(":")[0]:e}function Om(e){var n,t,i;const r={};if(!ra(e))return r;for(const[o,s]of Object.entries(e)){const c=x5(o)?[o]:s.chains,l=s.methods||[],h=s.events||[],d=iD(o);r[d]=XA(JA({},r[d]),{chains:qr(c,(n=r[d])==null?void 0:n.chains),methods:qr(l,(t=r[d])==null?void 0:t.methods),events:qr(h,(i=r[d])==null?void 0:i.events)})}return r}function rD(e){const n={};return e==null||e.forEach(t=>{var i;const[r,o]=t.split(":");n[r]||(n[r]={accounts:[],chains:[],events:[],methods:[]}),n[r].accounts.push(t),(i=n[r].chains)==null||i.push(`${r}:${o}`)}),n}function km(e,n){n=n.map(i=>i.replace("did:pkh:",""));const t=rD(n);for(const[i,r]of Object.entries(t))r.methods?r.methods=qr(r.methods,e):r.methods=e,r.events=["chainChanged","accountsChanged"];return t}function oD(e,n){var t,i,r,o,s,c;const l=Om(e),h=Om(n),d={},f=Object.keys(l).concat(Object.keys(h));for(const m of f)d[m]={chains:qr((t=l[m])==null?void 0:t.chains,(i=h[m])==null?void 0:i.chains),methods:qr((r=l[m])==null?void 0:r.methods,(o=h[m])==null?void 0:o.methods),events:qr((s=l[m])==null?void 0:s.events,(c=h[m])==null?void 0:c.events)};return d}const sD={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},aD={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function J(e,n){const{message:t,code:i}=aD[e];return{message:n?`${t} ${n}`:t,code:i}}function Fe(e,n){const{message:t,code:i}=sD[e];return{message:n?`${t} ${n}`:t,code:i}}function ts(e,n){return!!Array.isArray(e)}function ra(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function nt(e){return typeof e>"u"}function Xe(e,n){return n&&nt(e)?!0:typeof e=="string"&&!!e.trim().length}function e1(e,n){return n&&nt(e)?!0:typeof e=="number"&&!isNaN(e)}function cD(e,n){const{requiredNamespaces:t}=n,i=Object.keys(e.namespaces),r=Object.keys(t);let o=!0;return zr(r,i)?(i.forEach(s=>{const{accounts:c,methods:l,events:h}=e.namespaces[s],d=ys(c),f=t[s];(!zr(jw(s,f),d)||!zr(f.methods,l)||!zr(f.events,h))&&(o=!1)}),o):!1}function Yc(e){return Xe(e,!1)&&e.includes(":")?e.split(":").length===2:!1}function lD(e){if(Xe(e,!1)&&e.includes(":")){const n=e.split(":");if(n.length===3){const t=n[0]+":"+n[1];return!!n[2]&&Yc(t)}}return!1}function uD(e){function n(t){try{return typeof new URL(t)<"u"}catch{return!1}}try{if(Xe(e,!1)){if(n(e))return!0;const t=Nw(e);return n(t)}}catch{}return!1}function dD(e){var n;return(n=e==null?void 0:e.proposer)==null?void 0:n.publicKey}function hD(e){return e==null?void 0:e.topic}function fD(e,n){let t=null;return Xe(e==null?void 0:e.publicKey,!1)||(t=J("MISSING_OR_INVALID",`${n} controller public key should be a string`)),t}function zm(e){let n=!0;return ts(e)?e.length&&(n=e.every(t=>Xe(t,!1))):n=!1,n}function mD(e,n,t){let i=null;return ts(n)&&n.length?n.forEach(r=>{i||Yc(r)||(i=Fe("UNSUPPORTED_CHAINS",`${t}, chain ${r} should be a string and conform to "namespace:chainId" format`))}):Yc(e)||(i=Fe("UNSUPPORTED_CHAINS",`${t}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),i}function gD(e,n,t){let i=null;return Object.entries(e).forEach(([r,o])=>{if(i)return;const s=mD(r,jw(r,o),`${n} ${t}`);s&&(i=s)}),i}function yD(e,n){let t=null;return ts(e)?e.forEach(i=>{t||lD(i)||(t=Fe("UNSUPPORTED_ACCOUNTS",`${n}, account ${i} should be a string and conform to "namespace:chainId:address" format`))}):t=Fe("UNSUPPORTED_ACCOUNTS",`${n}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),t}function pD(e,n){let t=null;return Object.values(e).forEach(i=>{if(t)return;const r=yD(i==null?void 0:i.accounts,`${n} namespace`);r&&(t=r)}),t}function wD(e,n){let t=null;return zm(e==null?void 0:e.methods)?zm(e==null?void 0:e.events)||(t=Fe("UNSUPPORTED_EVENTS",`${n}, events should be an array of strings or empty array for no events`)):t=Fe("UNSUPPORTED_METHODS",`${n}, methods should be an array of strings or empty array for no methods`),t}function M5(e,n){let t=null;return Object.values(e).forEach(i=>{if(t)return;const r=wD(i,`${n}, namespace`);r&&(t=r)}),t}function _D(e,n,t){let i=null;if(e&&ra(e)){const r=M5(e,n);r&&(i=r);const o=gD(e,n,t);o&&(i=o)}else i=J("MISSING_OR_INVALID",`${n}, ${t} should be an object with data`);return i}function bu(e,n){let t=null;if(e&&ra(e)){const i=M5(e,n);i&&(t=i);const r=pD(e,n);r&&(t=r)}else t=J("MISSING_OR_INVALID",`${n}, namespaces should be an object with data`);return t}function I5(e){return Xe(e.protocol,!0)}function xD(e,n){let t=!1;return e?e&&ts(e)&&e.length&&e.forEach(i=>{t=I5(i)}):t=!0,t}function MD(e){return typeof e=="number"}function Ut(e){return typeof e<"u"&&typeof e!==null}function ID(e){return!(!e||typeof e!="object"||!e.code||!e1(e.code,!1)||!e.message||!Xe(e.message,!1))}function bD(e){return!(nt(e)||!Xe(e.method,!1))}function CD(e){return!(nt(e)||nt(e.result)&&nt(e.error)||!e1(e.id,!1)||!Xe(e.jsonrpc,!1))}function jD(e){return!(nt(e)||!Xe(e.name,!1))}function Pm(e,n){return!(!Yc(n)||!eD(e).includes(n))}function LD(e,n,t){return Xe(t,!1)?tD(e,n).includes(t):!1}function ED(e,n,t){return Xe(t,!1)?nD(e,n).includes(t):!1}function Rm(e,n,t){let i=null;const r=TD(e),o=vD(n),s=Object.keys(r),c=Object.keys(o),l=Vm(Object.keys(e)),h=Vm(Object.keys(n)),d=l.filter(f=>!h.includes(f));return d.length&&(i=J("NON_CONFORMING_NAMESPACES",`${t} namespaces keys don't satisfy requiredNamespaces.
|
|
293
|
+
Required: ${d.toString()}
|
|
294
|
+
Received: ${Object.keys(n).toString()}`)),zr(s,c)||(i=J("NON_CONFORMING_NAMESPACES",`${t} namespaces chains don't satisfy required namespaces.
|
|
295
|
+
Required: ${s.toString()}
|
|
296
|
+
Approved: ${c.toString()}`)),Object.keys(n).forEach(f=>{if(!f.includes(":")||i)return;const m=ys(n[f].accounts);m.includes(f)||(i=J("NON_CONFORMING_NAMESPACES",`${t} namespaces accounts don't satisfy namespace accounts for ${f}
|
|
297
|
+
Required: ${f}
|
|
298
|
+
Approved: ${m.toString()}`))}),s.forEach(f=>{i||(zr(r[f].methods,o[f].methods)?zr(r[f].events,o[f].events)||(i=J("NON_CONFORMING_NAMESPACES",`${t} namespaces events don't satisfy namespace events for ${f}`)):i=J("NON_CONFORMING_NAMESPACES",`${t} namespaces methods don't satisfy namespace methods for ${f}`))}),i}function TD(e){const n={};return Object.keys(e).forEach(t=>{var i;t.includes(":")?n[t]=e[t]:(i=e[t].chains)==null||i.forEach(r=>{n[r]={methods:e[t].methods,events:e[t].events}})}),n}function Vm(e){return[...new Set(e.map(n=>n.includes(":")?n.split(":")[0]:n))]}function vD(e){const n={};return Object.keys(e).forEach(t=>{if(t.includes(":"))n[t]=e[t];else{const i=ys(e[t].accounts);i==null||i.forEach(r=>{n[r]={accounts:e[t].accounts.filter(o=>o.includes(`${r}:`)),methods:e[t].methods,events:e[t].events}})}}),n}function ND(e,n){return e1(e,!1)&&e<=n.max&&e>=n.min}function Um(){const e=ba();return new Promise(n=>{switch(e){case on.browser:n(SD());break;case on.reactNative:n(AD());break;case on.node:n(DD());break;default:n(!0)}})}function SD(){return fs()&&(navigator==null?void 0:navigator.onLine)}async function AD(){if(Lr()&&typeof we<"u"&&we!=null&&we.NetInfo){const e=await(we==null?void 0:we.NetInfo.fetch());return e==null?void 0:e.isConnected}return!0}function DD(){return!0}function OD(e){switch(ba()){case on.browser:kD(e);break;case on.reactNative:zD(e);break}}function kD(e){!Lr()&&fs()&&(window.addEventListener("online",()=>e(!0)),window.addEventListener("offline",()=>e(!1)))}function zD(e){var n;Lr()&&typeof we<"u"&&we!=null&&we.NetInfo&&((n=we)==null||n.NetInfo.addEventListener(t=>e(t==null?void 0:t.isConnected)))}function PD(){var e;return fs()&&Zo()?((e=Zo())==null?void 0:e.visibilityState)==="visible":!0}const Cu={};class Cs{static get(n){return Cu[n]}static set(n,t){Cu[n]=t}static delete(n){delete Cu[n]}}function RD(e){const n=fa.decode(e);if(n.length<33)throw new Error("Too short to contain a public key");return n.slice(1,33)}function VD({publicKey:e,signature:n,payload:t}){var i;const r=Gd(t.method),o=128|parseInt(((i=t.version)==null?void 0:i.toString())||"4"),s=WD(t.address),c=t.era==="00"?new Uint8Array([0]):Gd(t.era);if(c.length!==1&&c.length!==2)throw new Error("Invalid era length");const l=parseInt(t.nonce,16),h=new Uint8Array([l&255,l>>8&255]),d=BigInt(`0x${BD(t.tip)}`),f=YD(d),m=new Uint8Array([0,...e,s,...n,...c,...h,...f,...r]),g=$D(m.length+1);return new Uint8Array([...g,o,...m])}function UD(e){const n=Gd(e),t=o_.blake2b(n,void 0,32);return"0x"+Ne.from(t).toString("hex")}function Gd(e){return new Uint8Array(e.replace(/^0x/,"").match(/.{1,2}/g).map(n=>parseInt(n,16)))}function BD(e){return e.startsWith("0x")?e.slice(2):e}function WD(e){const n=fa.decode(e)[0];return n===42?0:n===60?2:1}function $D(e){if(e<64)return new Uint8Array([e<<2]);if(e<16384){const n=e<<2|1;return new Uint8Array([n&255,n>>8&255])}else if(e<1<<30){const n=e<<2|2;return new Uint8Array([n&255,n>>8&255,n>>16&255,n>>24&255])}else throw new Error("Compact encoding > 2^30 not supported")}function YD(e){if(e<BigInt(1)<<BigInt(6))return new Uint8Array([Number(e<<BigInt(2))]);if(e<BigInt(1)<<BigInt(14)){const n=e<<BigInt(2)|BigInt(1);return new Uint8Array([Number(n&BigInt(255)),Number(n>>BigInt(8)&BigInt(255))])}else if(e<BigInt(1)<<BigInt(30)){const n=e<<BigInt(2)|BigInt(2);return new Uint8Array([Number(n&BigInt(255)),Number(n>>BigInt(8)&BigInt(255)),Number(n>>BigInt(16)&BigInt(255)),Number(n>>BigInt(24)&BigInt(255))])}else throw new Error("BigInt compact encoding not supported > 2^30")}function FD(e){const n=Uint8Array.from(Ne.from(e.signature,"hex")),t=RD(e.transaction.address),i=VD({publicKey:t,signature:n,payload:e.transaction}),r=Ne.from(i).toString("hex");return UD(r)}var QD={};const b5="wc",C5=2,qd="core",oi=`${b5}@2:${qd}:`,HD={logger:"error"},ZD={database:":memory:"},GD="crypto",Bm="client_ed25519_seed",qD=ee.ONE_DAY,KD="keychain",JD="0.3",XD="messages",eO="0.3",tO=ee.SIX_HOURS,nO="publisher",j5="irn",iO="error",L5="wss://relay.walletconnect.org",rO="relayer",Ze={message:"relayer_message",message_ack:"relayer_message_ack",connect:"relayer_connect",disconnect:"relayer_disconnect",error:"relayer_error",connection_stalled:"relayer_connection_stalled",transport_closed:"relayer_transport_closed",publish:"relayer_publish"},oO="_subscription",mn={payload:"payload",connect:"connect",disconnect:"disconnect",error:"error"},sO=.1,Kd="2.21.8",Pe={link_mode:"link_mode",relay:"relay"},uc={inbound:"inbound",outbound:"outbound"},aO="0.3",cO="WALLETCONNECT_CLIENT_ID",Wm="WALLETCONNECT_LINK_MODE_APPS",en={created:"subscription_created",deleted:"subscription_deleted",expired:"subscription_expired",disabled:"subscription_disabled",sync:"subscription_sync",resubscribed:"subscription_resubscribed"},lO="subscription",uO="0.3",dO="pairing",hO="0.3",js={wc_pairingDelete:{req:{ttl:ee.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:ee.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:ee.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:ee.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:ee.ONE_DAY,prompt:!1,tag:0},res:{ttl:ee.ONE_DAY,prompt:!1,tag:0}}},Dr={create:"pairing_create",expire:"pairing_expire",delete:"pairing_delete",ping:"pairing_ping"},vn={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},fO="history",mO="0.3",gO="expirer",yn={created:"expirer_created",deleted:"expirer_deleted",expired:"expirer_expired",sync:"expirer_sync"},yO="0.3",pO="verify-api",wO="https://verify.walletconnect.com",E5="https://verify.walletconnect.org",Vs=E5,_O=`${Vs}/v3`,xO=[wO,E5],MO="echo",IO="https://echo.walletconnect.com",Fn={pairing_started:"pairing_started",pairing_uri_validation_success:"pairing_uri_validation_success",pairing_uri_not_expired:"pairing_uri_not_expired",store_new_pairing:"store_new_pairing",subscribing_pairing_topic:"subscribing_pairing_topic",subscribe_pairing_topic_success:"subscribe_pairing_topic_success",existing_pairing:"existing_pairing",pairing_not_expired:"pairing_not_expired",emit_inactive_pairing:"emit_inactive_pairing",emit_session_proposal:"emit_session_proposal",subscribing_to_pairing_topic:"subscribing_to_pairing_topic"},fi={no_wss_connection:"no_wss_connection",no_internet_connection:"no_internet_connection",malformed_pairing_uri:"malformed_pairing_uri",active_pairing_already_exists:"active_pairing_already_exists",subscribe_pairing_topic_failure:"subscribe_pairing_topic_failure",pairing_expired:"pairing_expired",proposal_expired:"proposal_expired",proposal_listener_not_found:"proposal_listener_not_found"},Vi={session_approve_started:"session_approve_started",proposal_not_expired:"proposal_not_expired",session_namespaces_validation_success:"session_namespaces_validation_success",create_session_topic:"create_session_topic",subscribing_session_topic:"subscribing_session_topic",subscribe_session_topic_success:"subscribe_session_topic_success",publishing_session_approve:"publishing_session_approve",session_approve_publish_success:"session_approve_publish_success",store_session:"store_session",publishing_session_settle:"publishing_session_settle",session_settle_publish_success:"session_settle_publish_success"},Ls={no_internet_connection:"no_internet_connection",no_wss_connection:"no_wss_connection",proposal_expired:"proposal_expired",subscribe_session_topic_failure:"subscribe_session_topic_failure",session_approve_publish_failure:"session_approve_publish_failure",session_settle_publish_failure:"session_settle_publish_failure",session_approve_namespace_validation_failure:"session_approve_namespace_validation_failure",proposal_not_found:"proposal_not_found"},vr={authenticated_session_approve_started:"authenticated_session_approve_started",create_authenticated_session_topic:"create_authenticated_session_topic",cacaos_verified:"cacaos_verified",store_authenticated_session:"store_authenticated_session",subscribing_authenticated_session_topic:"subscribing_authenticated_session_topic",subscribe_authenticated_session_topic_success:"subscribe_authenticated_session_topic_success",publishing_authenticated_session_approve:"publishing_authenticated_session_approve"},Es={no_internet_connection:"no_internet_connection",invalid_cacao:"invalid_cacao",subscribe_authenticated_session_topic_failure:"subscribe_authenticated_session_topic_failure",authenticated_session_approve_publish_failure:"authenticated_session_approve_publish_failure",authenticated_session_pending_request_not_found:"authenticated_session_pending_request_not_found"},bO=.1,CO="event-client",jO=86400,LO="https://pulse.walletconnect.org/batch";function EO(e,n){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),i=0;i<t.length;i++)t[i]=255;for(var r=0;r<e.length;r++){var o=e.charAt(r),s=o.charCodeAt(0);if(t[s]!==255)throw new TypeError(o+" is ambiguous");t[s]=r}var c=e.length,l=e.charAt(0),h=Math.log(c)/Math.log(256),d=Math.log(256)/Math.log(c);function f(w){if(w instanceof Uint8Array||(ArrayBuffer.isView(w)?w=new Uint8Array(w.buffer,w.byteOffset,w.byteLength):Array.isArray(w)&&(w=Uint8Array.from(w))),!(w instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(w.length===0)return"";for(var p=0,_=0,x=0,I=w.length;x!==I&&w[x]===0;)x++,p++;for(var b=(I-x)*d+1>>>0,j=new Uint8Array(b);x!==I;){for(var C=w[x],E=0,T=b-1;(C!==0||E<_)&&T!==-1;T--,E++)C+=256*j[T]>>>0,j[T]=C%c>>>0,C=C/c>>>0;if(C!==0)throw new Error("Non-zero carry");_=E,x++}for(var O=b-_;O!==b&&j[O]===0;)O++;for(var L=l.repeat(p);O<b;++O)L+=e.charAt(j[O]);return L}function m(w){if(typeof w!="string")throw new TypeError("Expected String");if(w.length===0)return new Uint8Array;var p=0;if(w[p]!==" "){for(var _=0,x=0;w[p]===l;)_++,p++;for(var I=(w.length-p)*h+1>>>0,b=new Uint8Array(I);w[p];){var j=t[w.charCodeAt(p)];if(j===255)return;for(var C=0,E=I-1;(j!==0||C<x)&&E!==-1;E--,C++)j+=c*b[E]>>>0,b[E]=j%256>>>0,j=j/256>>>0;if(j!==0)throw new Error("Non-zero carry");x=C,p++}if(w[p]!==" "){for(var T=I-x;T!==I&&b[T]===0;)T++;for(var O=new Uint8Array(_+(I-T)),L=_;T!==I;)O[L++]=b[T++];return O}}}function g(w){var p=m(w);if(p)return p;throw new Error(`Non-${n} character`)}return{encode:f,decodeUnsafe:m,decode:g}}var TO=EO,vO=TO;const T5=e=>{if(e instanceof Uint8Array&&e.constructor.name==="Uint8Array")return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")},NO=e=>new TextEncoder().encode(e),SO=e=>new TextDecoder().decode(e);class AO{constructor(n,t,i){this.name=n,this.prefix=t,this.baseEncode=i}encode(n){if(n instanceof Uint8Array)return`${this.prefix}${this.baseEncode(n)}`;throw Error("Unknown type, must be binary type")}}class DO{constructor(n,t,i){if(this.name=n,this.prefix=t,t.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=i}decode(n){if(typeof n=="string"){if(n.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(n)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(n.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(n){return v5(this,n)}}class OO{constructor(n){this.decoders=n}or(n){return v5(this,n)}decode(n){const t=n[0],i=this.decoders[t];if(i)return i.decode(n);throw RangeError(`Unable to decode multibase string ${JSON.stringify(n)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const v5=(e,n)=>new OO({...e.decoders||{[e.prefix]:e},...n.decoders||{[n.prefix]:n}});class kO{constructor(n,t,i,r){this.name=n,this.prefix=t,this.baseEncode=i,this.baseDecode=r,this.encoder=new AO(n,t,i),this.decoder=new DO(n,t,r)}encode(n){return this.encoder.encode(n)}decode(n){return this.decoder.decode(n)}}const Dl=({name:e,prefix:n,encode:t,decode:i})=>new kO(e,n,t,i),Ea=({prefix:e,name:n,alphabet:t})=>{const{encode:i,decode:r}=vO(t,n);return Dl({prefix:e,name:n,encode:i,decode:o=>T5(r(o))})},zO=(e,n,t,i)=>{const r={};for(let d=0;d<n.length;++d)r[n[d]]=d;let o=e.length;for(;e[o-1]==="=";)--o;const s=new Uint8Array(o*t/8|0);let c=0,l=0,h=0;for(let d=0;d<o;++d){const f=r[e[d]];if(f===void 0)throw new SyntaxError(`Non-${i} character`);l=l<<t|f,c+=t,c>=8&&(c-=8,s[h++]=255&l>>c)}if(c>=t||255&l<<8-c)throw new SyntaxError("Unexpected end of data");return s},PO=(e,n,t)=>{const i=n[n.length-1]==="=",r=(1<<t)-1;let o="",s=0,c=0;for(let l=0;l<e.length;++l)for(c=c<<8|e[l],s+=8;s>t;)s-=t,o+=n[r&c>>s];if(s&&(o+=n[r&c<<t-s]),i)for(;o.length*t&7;)o+="=";return o},pt=({name:e,prefix:n,bitsPerChar:t,alphabet:i})=>Dl({prefix:n,name:e,encode(r){return PO(r,i,t)},decode(r){return zO(r,i,t,e)}}),RO=Dl({prefix:"\0",name:"identity",encode:e=>SO(e),decode:e=>NO(e)});var VO=Object.freeze({__proto__:null,identity:RO});const UO=pt({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var BO=Object.freeze({__proto__:null,base2:UO});const WO=pt({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var $O=Object.freeze({__proto__:null,base8:WO});const YO=Ea({prefix:"9",name:"base10",alphabet:"0123456789"});var FO=Object.freeze({__proto__:null,base10:YO});const QO=pt({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),HO=pt({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var ZO=Object.freeze({__proto__:null,base16:QO,base16upper:HO});const GO=pt({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),qO=pt({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),KO=pt({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),JO=pt({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),XO=pt({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),ek=pt({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),tk=pt({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),nk=pt({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),ik=pt({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var rk=Object.freeze({__proto__:null,base32:GO,base32upper:qO,base32pad:KO,base32padupper:JO,base32hex:XO,base32hexupper:ek,base32hexpad:tk,base32hexpadupper:nk,base32z:ik});const ok=Ea({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),sk=Ea({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var ak=Object.freeze({__proto__:null,base36:ok,base36upper:sk});const ck=Ea({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),lk=Ea({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var uk=Object.freeze({__proto__:null,base58btc:ck,base58flickr:lk});const dk=pt({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),hk=pt({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),fk=pt({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),mk=pt({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var gk=Object.freeze({__proto__:null,base64:dk,base64pad:hk,base64url:fk,base64urlpad:mk});const N5=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),yk=N5.reduce((e,n,t)=>(e[t]=n,e),[]),pk=N5.reduce((e,n,t)=>(e[n.codePointAt(0)]=t,e),[]);function wk(e){return e.reduce((n,t)=>(n+=yk[t],n),"")}function _k(e){const n=[];for(const t of e){const i=pk[t.codePointAt(0)];if(i===void 0)throw new Error(`Non-base256emoji character: ${t}`);n.push(i)}return new Uint8Array(n)}const xk=Dl({prefix:"🚀",name:"base256emoji",encode:wk,decode:_k});var Mk=Object.freeze({__proto__:null,base256emoji:xk}),Ik=S5,$m=128,bk=-128,Ck=Math.pow(2,31);function S5(e,n,t){n=n||[],t=t||0;for(var i=t;e>=Ck;)n[t++]=e&255|$m,e/=128;for(;e&bk;)n[t++]=e&255|$m,e>>>=7;return n[t]=e|0,S5.bytes=t-i+1,n}var jk=Jd,Lk=128,Ym=127;function Jd(e,i){var t=0,i=i||0,r=0,o=i,s,c=e.length;do{if(o>=c)throw Jd.bytes=0,new RangeError("Could not decode varint");s=e[o++],t+=r<28?(s&Ym)<<r:(s&Ym)*Math.pow(2,r),r+=7}while(s>=Lk);return Jd.bytes=o-i,t}var Ek=Math.pow(2,7),Tk=Math.pow(2,14),vk=Math.pow(2,21),Nk=Math.pow(2,28),Sk=Math.pow(2,35),Ak=Math.pow(2,42),Dk=Math.pow(2,49),Ok=Math.pow(2,56),kk=Math.pow(2,63),zk=function(e){return e<Ek?1:e<Tk?2:e<vk?3:e<Nk?4:e<Sk?5:e<Ak?6:e<Dk?7:e<Ok?8:e<kk?9:10},Pk={encode:Ik,decode:jk,encodingLength:zk},A5=Pk;const Fm=(e,n,t=0)=>(A5.encode(e,n,t),n),Qm=e=>A5.encodingLength(e),Xd=(e,n)=>{const t=n.byteLength,i=Qm(e),r=i+Qm(t),o=new Uint8Array(r+t);return Fm(e,o,0),Fm(t,o,i),o.set(n,r),new Rk(e,t,n,o)};class Rk{constructor(n,t,i,r){this.code=n,this.size=t,this.digest=i,this.bytes=r}}const D5=({name:e,code:n,encode:t})=>new Vk(e,n,t);class Vk{constructor(n,t,i){this.name=n,this.code=t,this.encode=i}digest(n){if(n instanceof Uint8Array){const t=this.encode(n);return t instanceof Uint8Array?Xd(this.code,t):t.then(i=>Xd(this.code,i))}else throw Error("Unknown type, must be binary type")}}const O5=e=>async n=>new Uint8Array(await crypto.subtle.digest(e,n)),Uk=D5({name:"sha2-256",code:18,encode:O5("SHA-256")}),Bk=D5({name:"sha2-512",code:19,encode:O5("SHA-512")});var Wk=Object.freeze({__proto__:null,sha256:Uk,sha512:Bk});const k5=0,$k="identity",z5=T5,Yk=e=>Xd(k5,z5(e)),Fk={code:k5,name:$k,encode:z5,digest:Yk};var Qk=Object.freeze({__proto__:null,identity:Fk});new TextEncoder,new TextDecoder;const Hm={...VO,...BO,...$O,...FO,...ZO,...rk,...ak,...uk,...gk,...Mk};({...Wk,...Qk});function P5(e){return globalThis.Buffer!=null?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function Hk(e=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?P5(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}function R5(e,n,t,i){return{name:e,prefix:n,encoder:{name:e,prefix:n,encode:t},decoder:{decode:i}}}const Zm=R5("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),ju=R5("ascii","a",e=>{let n="a";for(let t=0;t<e.length;t++)n+=String.fromCharCode(e[t]);return n},e=>{e=e.substring(1);const n=Hk(e.length);for(let t=0;t<e.length;t++)n[t]=e.charCodeAt(t);return n}),Zk={utf8:Zm,"utf-8":Zm,hex:Hm.base16,latin1:ju,ascii:ju,binary:ju,...Hm};function Gk(e,n="utf8"){const t=Zk[n];if(!t)throw new Error(`Unsupported encoding "${n}"`);return(n==="utf8"||n==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?P5(globalThis.Buffer.from(e,"utf-8")):t.decoder.decode(`${t.prefix}${e}`)}var qk=Object.defineProperty,Kk=(e,n,t)=>n in e?qk(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,$n=(e,n,t)=>Kk(e,typeof n!="symbol"?n+"":n,t);class Jk{constructor(n,t){this.core=n,this.logger=t,$n(this,"keychain",new Map),$n(this,"name",KD),$n(this,"version",JD),$n(this,"initialized",!1),$n(this,"storagePrefix",oi),$n(this,"init",async()=>{if(!this.initialized){const i=await this.getKeyChain();typeof i<"u"&&(this.keychain=i),this.initialized=!0}}),$n(this,"has",i=>(this.isInitialized(),this.keychain.has(i))),$n(this,"set",async(i,r)=>{this.isInitialized(),this.keychain.set(i,r),await this.persist()}),$n(this,"get",i=>{this.isInitialized();const r=this.keychain.get(i);if(typeof r>"u"){const{message:o}=J("NO_MATCHING_KEY",`${this.name}: ${i}`);throw new Error(o)}return r}),$n(this,"del",async i=>{this.isInitialized(),this.keychain.delete(i),await this.persist()}),this.core=n,this.logger=Rt(t,this.name)}get context(){return Jt(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(n){await this.core.storage.setItem(this.storageKey,Pd(n))}async getKeyChain(){const n=await this.core.storage.getItem(this.storageKey);return typeof n<"u"?Rd(n):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:n}=J("NOT_INITIALIZED",this.name);throw new Error(n)}}}var Xk=Object.defineProperty,ez=(e,n,t)=>n in e?Xk(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,ht=(e,n,t)=>ez(e,typeof n!="symbol"?n+"":n,t);class tz{constructor(n,t,i){this.core=n,this.logger=t,ht(this,"name",GD),ht(this,"keychain"),ht(this,"randomSessionIdentifier",Zd()),ht(this,"initialized",!1),ht(this,"init",async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)}),ht(this,"hasKeys",r=>(this.isInitialized(),this.keychain.has(r))),ht(this,"getClientId",async()=>{this.isInitialized();const r=await this.getClientSeed(),o=d1(r);return u_(o.publicKey)}),ht(this,"generateKeyPair",()=>{this.isInitialized();const r=OA();return this.setPrivateKey(r.publicKey,r.privateKey)}),ht(this,"signJWT",async r=>{this.isInitialized();const o=await this.getClientSeed(),s=d1(o),c=this.randomSessionIdentifier;return await d_(c,r,qD,s)}),ht(this,"generateSharedKey",(r,o,s)=>{this.isInitialized();const c=this.getPrivateKey(r),l=kA(c,o);return this.setSymKey(l,s)}),ht(this,"setSymKey",async(r,o)=>{this.isInitialized();const s=o||lc(r);return await this.keychain.set(s,r),s}),ht(this,"deleteKeyPair",async r=>{this.isInitialized(),await this.keychain.del(r)}),ht(this,"deleteSymKey",async r=>{this.isInitialized(),await this.keychain.del(r)}),ht(this,"encode",async(r,o,s)=>{this.isInitialized();const c=_5(s),l=Ou(o);if(vm(c))return RA(l,s==null?void 0:s.encoding);if(Tm(c)){const m=c.senderPublicKey,g=c.receiverPublicKey;r=await this.generateSharedKey(m,g)}const h=this.getSymKey(r),{type:d,senderPublicKey:f}=c;return zA({type:d,symKey:h,message:l,senderPublicKey:f,encoding:s==null?void 0:s.encoding})}),ht(this,"decode",async(r,o,s)=>{this.isInitialized();const c=UA(o,s);if(vm(c)){const l=VA(o,s==null?void 0:s.encoding);return h1(l)}if(Tm(c)){const l=c.receiverPublicKey,h=c.senderPublicKey;r=await this.generateSharedKey(l,h)}try{const l=this.getSymKey(r),h=PA({symKey:l,encoded:o,encoding:s==null?void 0:s.encoding});return h1(h)}catch(l){this.logger.error(`Failed to decode message from topic: '${r}', clientId: '${await this.getClientId()}'`),this.logger.error(l)}}),ht(this,"getPayloadType",(r,o=Ft)=>{const s=ia({encoded:r,encoding:o});return oo(s.type)}),ht(this,"getPayloadSenderPublicKey",(r,o=Ft)=>{const s=ia({encoded:r,encoding:o});return s.senderPublicKey?qt(s.senderPublicKey,zt):void 0}),this.core=n,this.logger=Rt(t,this.name),this.keychain=i||new Jk(this.core,this.logger)}get context(){return Jt(this.logger)}async setPrivateKey(n,t){return await this.keychain.set(n,t),n}getPrivateKey(n){return this.keychain.get(n)}async getClientSeed(){let n="";try{n=this.keychain.get(Bm)}catch{n=Zd(),await this.keychain.set(Bm,n)}return Gk(n,"base16")}getSymKey(n){return this.keychain.get(n)}isInitialized(){if(!this.initialized){const{message:n}=J("NOT_INITIALIZED",this.name);throw new Error(n)}}}var nz=Object.defineProperty,iz=Object.defineProperties,rz=Object.getOwnPropertyDescriptors,Gm=Object.getOwnPropertySymbols,oz=Object.prototype.hasOwnProperty,sz=Object.prototype.propertyIsEnumerable,eh=(e,n,t)=>n in e?nz(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,az=(e,n)=>{for(var t in n||(n={}))oz.call(n,t)&&eh(e,t,n[t]);if(Gm)for(var t of Gm(n))sz.call(n,t)&&eh(e,t,n[t]);return e},cz=(e,n)=>iz(e,rz(n)),Xt=(e,n,t)=>eh(e,typeof n!="symbol"?n+"":n,t);class lz extends TT{constructor(n,t){super(n,t),this.logger=n,this.core=t,Xt(this,"messages",new Map),Xt(this,"messagesWithoutClientAck",new Map),Xt(this,"name",XD),Xt(this,"version",eO),Xt(this,"initialized",!1),Xt(this,"storagePrefix",oi),Xt(this,"init",async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const i=await this.getRelayerMessages();typeof i<"u"&&(this.messages=i);const r=await this.getRelayerMessagesWithoutClientAck();typeof r<"u"&&(this.messagesWithoutClientAck=r),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(i){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(i)}finally{this.initialized=!0}}}),Xt(this,"set",async(i,r,o)=>{this.isInitialized();const s=xn(r);let c=this.messages.get(i);if(typeof c>"u"&&(c={}),typeof c[s]<"u")return s;if(c[s]=r,this.messages.set(i,c),o===uc.inbound){const l=this.messagesWithoutClientAck.get(i)||{};this.messagesWithoutClientAck.set(i,cz(az({},l),{[s]:r}))}return await this.persist(),s}),Xt(this,"get",i=>{this.isInitialized();let r=this.messages.get(i);return typeof r>"u"&&(r={}),r}),Xt(this,"getWithoutAck",i=>{this.isInitialized();const r={};for(const o of i){const s=this.messagesWithoutClientAck.get(o)||{};r[o]=Object.values(s)}return r}),Xt(this,"has",(i,r)=>{this.isInitialized();const o=this.get(i),s=xn(r);return typeof o[s]<"u"}),Xt(this,"ack",async(i,r)=>{this.isInitialized();const o=this.messagesWithoutClientAck.get(i);if(typeof o>"u")return;const s=xn(r);delete o[s],Object.keys(o).length===0?this.messagesWithoutClientAck.delete(i):this.messagesWithoutClientAck.set(i,o),await this.persist()}),Xt(this,"del",async i=>{this.isInitialized(),this.messages.delete(i),this.messagesWithoutClientAck.delete(i),await this.persist()}),this.logger=Rt(n,this.name),this.core=t}get context(){return Jt(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get storageKeyWithoutClientAck(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name+"_withoutClientAck"}async setRelayerMessages(n){await this.core.storage.setItem(this.storageKey,Pd(n))}async setRelayerMessagesWithoutClientAck(n){await this.core.storage.setItem(this.storageKeyWithoutClientAck,Pd(n))}async getRelayerMessages(){const n=await this.core.storage.getItem(this.storageKey);return typeof n<"u"?Rd(n):void 0}async getRelayerMessagesWithoutClientAck(){const n=await this.core.storage.getItem(this.storageKeyWithoutClientAck);return typeof n<"u"?Rd(n):void 0}async persist(){await this.setRelayerMessages(this.messages),await this.setRelayerMessagesWithoutClientAck(this.messagesWithoutClientAck)}isInitialized(){if(!this.initialized){const{message:n}=J("NOT_INITIALIZED",this.name);throw new Error(n)}}}var uz=Object.defineProperty,dz=Object.defineProperties,hz=Object.getOwnPropertyDescriptors,qm=Object.getOwnPropertySymbols,fz=Object.prototype.hasOwnProperty,mz=Object.prototype.propertyIsEnumerable,th=(e,n,t)=>n in e?uz(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Co=(e,n)=>{for(var t in n||(n={}))fz.call(n,t)&&th(e,t,n[t]);if(qm)for(var t of qm(n))mz.call(n,t)&&th(e,t,n[t]);return e},Km=(e,n)=>dz(e,hz(n)),gn=(e,n,t)=>th(e,typeof n!="symbol"?n+"":n,t);class gz extends vT{constructor(n,t){super(n,t),this.relayer=n,this.logger=t,gn(this,"events",new so.EventEmitter),gn(this,"name",nO),gn(this,"queue",new Map),gn(this,"publishTimeout",ee.toMiliseconds(ee.ONE_MINUTE)),gn(this,"initialPublishTimeout",ee.toMiliseconds(ee.ONE_SECOND*15)),gn(this,"needsTransportRestart",!1),gn(this,"publish",async(i,r,o)=>{var s,c,l,h,d;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:i,message:r,opts:o}});const f=(o==null?void 0:o.ttl)||tO,m=(o==null?void 0:o.prompt)||!1,g=(o==null?void 0:o.tag)||0,w=(o==null?void 0:o.id)||Or().toString(),p=To($c().protocol),_={id:w,method:(o==null?void 0:o.publishMethod)||p.publish,params:Co({topic:i,message:r,ttl:f,prompt:m,tag:g,attestation:o==null?void 0:o.attestation},(o==null?void 0:o.tvf)&&{tvf:o.tvf})},x=`Failed to publish payload, please try again. id:${w} tag:${g}`;try{nt((s=_.params)==null?void 0:s.prompt)&&((c=_.params)==null||delete c.prompt),nt((l=_.params)==null?void 0:l.tag)&&((h=_.params)==null||delete h.tag);const I=new Promise(async b=>{const j=({id:E})=>{var T;((T=_.id)==null?void 0:T.toString())===E.toString()&&(this.removeRequestFromQueue(E),this.relayer.events.removeListener(Ze.publish,j),b())};this.relayer.events.on(Ze.publish,j);const C=Xn(new Promise((E,T)=>{this.rpcPublish(_,o).then(E).catch(O=>{this.logger.warn(O,O==null?void 0:O.message),T(O)})}),this.initialPublishTimeout,`Failed initial publish, retrying.... id:${w} tag:${g}`);try{await C,this.events.removeListener(Ze.publish,j)}catch(E){this.queue.set(w,{request:_,opts:o,attempt:1}),this.logger.warn(E,E==null?void 0:E.message)}});this.logger.trace({type:"method",method:"publish",params:{id:w,topic:i,message:r,opts:o}}),await Xn(I,this.publishTimeout,x)}catch(I){if(this.logger.debug("Failed to Publish Payload"),this.logger.error(I),(d=o==null?void 0:o.internal)!=null&&d.throwOnFailedPublish)throw I}finally{this.queue.delete(w)}}),gn(this,"publishCustom",async i=>{var r,o,s,c,l;this.logger.debug("Publishing custom payload"),this.logger.trace({type:"method",method:"publishCustom",params:i});const{payload:h,opts:d={}}=i,{attestation:f,tvf:m,publishMethod:g,prompt:w,tag:p,ttl:_=ee.FIVE_MINUTES}=d,x=d.id||Or().toString(),I=To($c().protocol),b=g||I.publish,j={id:x,method:b,params:Co(Km(Co({},h),{ttl:_,prompt:w,tag:p,attestation:f}),m)},C=`Failed to publish custom payload, please try again. id:${x} tag:${p}`;try{nt((r=j.params)==null?void 0:r.prompt)&&((o=j.params)==null||delete o.prompt),nt((s=j.params)==null?void 0:s.tag)&&((c=j.params)==null||delete c.tag);const E=new Promise(async T=>{const O=({id:N})=>{var v;((v=j.id)==null?void 0:v.toString())===N.toString()&&(this.removeRequestFromQueue(N),this.relayer.events.removeListener(Ze.publish,O),T())};this.relayer.events.on(Ze.publish,O);const L=Xn(new Promise((N,v)=>{this.rpcPublish(j,d).then(N).catch(D=>{this.logger.warn(D,D==null?void 0:D.message),v(D)})}),this.initialPublishTimeout,`Failed initial custom payload publish, retrying.... method:${b} id:${x} tag:${p}`);try{await L,this.events.removeListener(Ze.publish,O)}catch(N){this.queue.set(x,{request:j,opts:d,attempt:1}),this.logger.warn(N,N==null?void 0:N.message)}});this.logger.trace({type:"method",method:"publish",params:{id:x,payload:h,opts:d}}),await Xn(E,this.publishTimeout,C)}catch(E){if(this.logger.debug("Failed to Publish Payload"),this.logger.error(E),(l=d==null?void 0:d.internal)!=null&&l.throwOnFailedPublish)throw E}finally{this.queue.delete(x)}}),gn(this,"on",(i,r)=>{this.events.on(i,r)}),gn(this,"once",(i,r)=>{this.events.once(i,r)}),gn(this,"off",(i,r)=>{this.events.off(i,r)}),gn(this,"removeListener",(i,r)=>{this.events.removeListener(i,r)}),this.relayer=n,this.logger=Rt(t,this.name),this.registerEventListeners()}get context(){return Jt(this.logger)}async rpcPublish(n,t){this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:n});const i=await this.relayer.request(n);return this.relayer.events.emit(Ze.publish,Co(Co({},n),t)),this.logger.debug("Successfully Published Payload"),i}removeRequestFromQueue(n){this.queue.delete(n)}checkQueue(){this.queue.forEach(async(n,t)=>{var i;const r=n.attempt+1;this.queue.set(t,Km(Co({},n),{attempt:r})),this.logger.warn({},`Publisher: queue->publishing: ${n.request.id}, tag: ${(i=n.request.params)==null?void 0:i.tag}, attempt: ${r}`),await this.rpcPublish(n.request,n.opts),this.logger.warn({},`Publisher: queue->published: ${n.request.id}`)})}registerEventListeners(){this.relayer.core.heartbeat.on(rs.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(Ze.connection_stalled);return}this.checkQueue()}),this.relayer.on(Ze.message_ack,n=>{this.removeRequestFromQueue(n.id.toString())})}}var yz=Object.defineProperty,pz=(e,n,t)=>n in e?yz(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,jo=(e,n,t)=>pz(e,typeof n!="symbol"?n+"":n,t);class wz{constructor(){jo(this,"map",new Map),jo(this,"set",(n,t)=>{const i=this.get(n);this.exists(n,t)||this.map.set(n,[...i,t])}),jo(this,"get",n=>this.map.get(n)||[]),jo(this,"exists",(n,t)=>this.get(n).includes(t)),jo(this,"delete",(n,t)=>{if(typeof t>"u"){this.map.delete(n);return}if(!this.map.has(n))return;const i=this.get(n);if(!this.exists(n,t))return;const r=i.filter(o=>o!==t);if(!r.length){this.map.delete(n);return}this.map.set(n,r)}),jo(this,"clear",()=>{this.map.clear()})}get topics(){return Array.from(this.map.keys())}}var _z=Object.defineProperty,xz=Object.defineProperties,Mz=Object.getOwnPropertyDescriptors,Jm=Object.getOwnPropertySymbols,Iz=Object.prototype.hasOwnProperty,bz=Object.prototype.propertyIsEnumerable,nh=(e,n,t)=>n in e?_z(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Ts=(e,n)=>{for(var t in n||(n={}))Iz.call(n,t)&&nh(e,t,n[t]);if(Jm)for(var t of Jm(n))bz.call(n,t)&&nh(e,t,n[t]);return e},Lu=(e,n)=>xz(e,Mz(n)),Ae=(e,n,t)=>nh(e,typeof n!="symbol"?n+"":n,t);class Cz extends AT{constructor(n,t){super(n,t),this.relayer=n,this.logger=t,Ae(this,"subscriptions",new Map),Ae(this,"topicMap",new wz),Ae(this,"events",new so.EventEmitter),Ae(this,"name",lO),Ae(this,"version",uO),Ae(this,"pending",new Map),Ae(this,"cached",[]),Ae(this,"initialized",!1),Ae(this,"storagePrefix",oi),Ae(this,"subscribeTimeout",ee.toMiliseconds(ee.ONE_MINUTE)),Ae(this,"initialSubscribeTimeout",ee.toMiliseconds(ee.ONE_SECOND*15)),Ae(this,"clientId"),Ae(this,"batchSubscribeTopicsLimit",500),Ae(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),await this.restore()),this.initialized=!0}),Ae(this,"subscribe",async(i,r)=>{var o;this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:i,opts:r}});try{const s=$c(r),c={topic:i,relay:s,transportType:r==null?void 0:r.transportType};(o=r==null?void 0:r.internal)!=null&&o.skipSubscribe||this.pending.set(i,c);const l=await this.rpcSubscribe(i,s,r);return typeof l=="string"&&(this.onSubscribe(l,c),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:i,opts:r}})),l}catch(s){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(s),s}}),Ae(this,"unsubscribe",async(i,r)=>{this.isInitialized(),typeof(r==null?void 0:r.id)<"u"?await this.unsubscribeById(i,r.id,r):await this.unsubscribeByTopic(i,r)}),Ae(this,"isSubscribed",i=>new Promise(r=>{r(this.topicMap.topics.includes(i))})),Ae(this,"isKnownTopic",i=>new Promise(r=>{r(this.topicMap.topics.includes(i)||this.pending.has(i)||this.cached.some(o=>o.topic===i))})),Ae(this,"on",(i,r)=>{this.events.on(i,r)}),Ae(this,"once",(i,r)=>{this.events.once(i,r)}),Ae(this,"off",(i,r)=>{this.events.off(i,r)}),Ae(this,"removeListener",(i,r)=>{this.events.removeListener(i,r)}),Ae(this,"start",async()=>{await this.onConnect()}),Ae(this,"stop",async()=>{await this.onDisconnect()}),Ae(this,"restart",async()=>{await this.restore(),await this.onRestart()}),Ae(this,"checkPending",async()=>{if(this.pending.size===0&&(!this.initialized||!this.relayer.connected))return;const i=[];this.pending.forEach(r=>{i.push(r)}),await this.batchSubscribe(i)}),Ae(this,"registerEventListeners",()=>{this.relayer.core.heartbeat.on(rs.pulse,async()=>{await this.checkPending()}),this.events.on(en.created,async i=>{const r=en.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:i}),await this.persist()}),this.events.on(en.deleted,async i=>{const r=en.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:i}),await this.persist()})}),this.relayer=n,this.logger=Rt(t,this.name),this.clientId=""}get context(){return Jt(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}get hasAnyTopics(){return this.topicMap.topics.length>0||this.pending.size>0||this.cached.length>0||this.subscriptions.size>0}hasSubscription(n,t){let i=!1;try{i=this.getSubscription(n).topic===t}catch{}return i}reset(){this.cached=[],this.initialized=!0}onDisable(){this.values.length>0&&(this.cached=this.values),this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(n,t){const i=this.topicMap.get(n);await Promise.all(i.map(async r=>await this.unsubscribeById(n,r,t)))}async unsubscribeById(n,t,i){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:n,id:t,opts:i}});try{const r=$c(i);await this.restartToComplete({topic:n,id:t,relay:r}),await this.rpcUnsubscribe(n,t,r);const o=Fe("USER_DISCONNECTED",`${this.name}, ${n}`);await this.onUnsubscribe(n,t,o),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:n,id:t,opts:i}})}catch(r){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(r),r}}async rpcSubscribe(n,t,i){var r,o;const s=await this.getSubscriptionId(n);if((r=i==null?void 0:i.internal)!=null&&r.skipSubscribe)return s;(!i||(i==null?void 0:i.transportType)===Pe.relay)&&await this.restartToComplete({topic:n,id:n,relay:t});const c={method:To(t.protocol).subscribe,params:{topic:n}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:c});const l=(o=i==null?void 0:i.internal)==null?void 0:o.throwOnFailedPublish;try{if((i==null?void 0:i.transportType)===Pe.link_mode)return setTimeout(()=>{(this.relayer.connected||this.relayer.connecting)&&this.relayer.request(c).catch(f=>this.logger.warn(f))},ee.toMiliseconds(ee.ONE_SECOND)),s;const h=new Promise(async f=>{const m=g=>{g.topic===n&&(this.events.removeListener(en.created,m),f(g.id))};this.events.on(en.created,m);try{const g=await Xn(new Promise((w,p)=>{this.relayer.request(c).catch(_=>{this.logger.warn(_,_==null?void 0:_.message),p(_)}).then(w)}),this.initialSubscribeTimeout,`Subscribing to ${n} failed, please try again`);this.events.removeListener(en.created,m),f(g)}catch{}}),d=await Xn(h,this.subscribeTimeout,`Subscribing to ${n} failed, please try again`);if(!d&&l)throw new Error(`Subscribing to ${n} failed, please try again`);return d?s:null}catch(h){if(this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(Ze.connection_stalled),l)throw h}return null}async rpcBatchSubscribe(n){if(!n.length)return;const t=n[0].relay,i={method:To(t.protocol).batchSubscribe,params:{topics:n.map(r=>r.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:i});try{await await Xn(new Promise(r=>{this.relayer.request(i).catch(o=>this.logger.warn(o)).then(r)}),this.subscribeTimeout,"rpcBatchSubscribe failed, please try again")}catch{this.relayer.events.emit(Ze.connection_stalled)}}async rpcBatchFetchMessages(n){if(!n.length)return;const t=n[0].relay,i={method:To(t.protocol).batchFetchMessages,params:{topics:n.map(o=>o.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:i});let r;try{r=await await Xn(new Promise((o,s)=>{this.relayer.request(i).catch(c=>{this.logger.warn(c),s(c)}).then(o)}),this.subscribeTimeout,"rpcBatchFetchMessages failed, please try again")}catch{this.relayer.events.emit(Ze.connection_stalled)}return r}rpcUnsubscribe(n,t,i){const r={method:To(i.protocol).unsubscribe,params:{topic:n,id:t}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r}),this.relayer.request(r)}onSubscribe(n,t){this.setSubscription(n,Lu(Ts({},t),{id:n})),this.pending.delete(t.topic)}onBatchSubscribe(n){n.length&&n.forEach(t=>{this.setSubscription(t.id,Ts({},t)),this.pending.delete(t.topic)})}async onUnsubscribe(n,t,i){this.events.removeAllListeners(t),this.hasSubscription(t,n)&&this.deleteSubscription(t,i),await this.relayer.messages.del(n)}async setRelayerSubscriptions(n){await this.relayer.core.storage.setItem(this.storageKey,n)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(n,t){this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:n,subscription:t}),this.addSubscription(n,t)}addSubscription(n,t){this.subscriptions.set(n,Ts({},t)),this.topicMap.set(t.topic,n),this.events.emit(en.created,t)}getSubscription(n){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:n});const t=this.subscriptions.get(n);if(!t){const{message:i}=J("NO_MATCHING_KEY",`${this.name}: ${n}`);throw new Error(i)}return t}deleteSubscription(n,t){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:n,reason:t});const i=this.getSubscription(n);this.subscriptions.delete(n),this.topicMap.delete(i.topic,n),this.events.emit(en.deleted,Lu(Ts({},i),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(en.sync)}async onRestart(){if(this.cached.length){const n=[...this.cached],t=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let i=0;i<t;i++){const r=n.splice(0,this.batchSubscribeTopicsLimit);await this.batchSubscribe(r)}}this.events.emit(en.resubscribed)}async restore(){try{const n=await this.getRelayerSubscriptions();if(typeof n>"u"||!n.length)return;if(this.subscriptions.size&&!n.every(t=>{var i;return t.topic===((i=this.subscriptions.get(t.id))==null?void 0:i.topic)})){const{message:t}=J("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(t)}this.cached=n,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(n){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(n)}}async batchSubscribe(n){n.length&&(await this.rpcBatchSubscribe(n),this.onBatchSubscribe(await Promise.all(n.map(async t=>Lu(Ts({},t),{id:await this.getSubscriptionId(t.topic)})))))}async batchFetchMessages(n){if(!n.length)return;this.logger.trace(`Fetching batch messages for ${n.length} subscriptions`);const t=await this.rpcBatchFetchMessages(n);t&&t.messages&&(await nN(ee.toMiliseconds(ee.ONE_SECOND)),await this.relayer.handleBatchMessageEvents(t.messages))}async onConnect(){await this.restart(),this.reset()}onDisconnect(){this.onDisable()}isInitialized(){if(!this.initialized){const{message:n}=J("NOT_INITIALIZED",this.name);throw new Error(n)}}async restartToComplete(n){!this.relayer.connected&&!this.relayer.connecting&&(this.cached.push(n),await this.relayer.transportOpen())}async getClientId(){return this.clientId||(this.clientId=await this.relayer.core.crypto.getClientId()),this.clientId}async getSubscriptionId(n){return xn(n+await this.getClientId())}}var jz=Object.defineProperty,Xm=Object.getOwnPropertySymbols,Lz=Object.prototype.hasOwnProperty,Ez=Object.prototype.propertyIsEnumerable,ih=(e,n,t)=>n in e?jz(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,eg=(e,n)=>{for(var t in n||(n={}))Lz.call(n,t)&&ih(e,t,n[t]);if(Xm)for(var t of Xm(n))Ez.call(n,t)&&ih(e,t,n[t]);return e},Le=(e,n,t)=>ih(e,typeof n!="symbol"?n+"":n,t);class Tz extends NT{constructor(n){super(n),Le(this,"protocol","wc"),Le(this,"version",2),Le(this,"core"),Le(this,"logger"),Le(this,"events",new so.EventEmitter),Le(this,"provider"),Le(this,"messages"),Le(this,"subscriber"),Le(this,"publisher"),Le(this,"name",rO),Le(this,"transportExplicitlyClosed",!1),Le(this,"initialized",!1),Le(this,"connectionAttemptInProgress",!1),Le(this,"relayUrl"),Le(this,"projectId"),Le(this,"packageName"),Le(this,"bundleId"),Le(this,"hasExperiencedNetworkDisruption",!1),Le(this,"pingTimeout"),Le(this,"heartBeatTimeout",ee.toMiliseconds(ee.THIRTY_SECONDS+ee.FIVE_SECONDS)),Le(this,"reconnectTimeout"),Le(this,"connectPromise"),Le(this,"reconnectInProgress",!1),Le(this,"requestsInFlight",[]),Le(this,"connectTimeout",ee.toMiliseconds(ee.ONE_SECOND*15)),Le(this,"request",async t=>{var i,r;this.logger.debug("Publishing Request Payload");const o=t.id||Or().toString();await this.toEstablishConnection();try{this.logger.trace({id:o,method:t.method,topic:(i=t.params)==null?void 0:i.topic},"relayer.request - publishing...");const s=`${o}:${((r=t.params)==null?void 0:r.tag)||""}`;this.requestsInFlight.push(s);const c=await this.provider.request(t);return this.requestsInFlight=this.requestsInFlight.filter(l=>l!==s),c}catch(s){throw this.logger.debug(`Failed to Publish Request: ${o}`),s}}),Le(this,"resetPingTimeout",()=>{Vc()&&(clearTimeout(this.pingTimeout),this.pingTimeout=setTimeout(()=>{var t,i,r,o;try{this.logger.debug({},"pingTimeout: Connection stalled, terminating..."),(o=(r=(i=(t=this.provider)==null?void 0:t.connection)==null?void 0:i.socket)==null?void 0:r.terminate)==null||o.call(r)}catch(s){this.logger.warn(s,s==null?void 0:s.message)}},this.heartBeatTimeout))}),Le(this,"onPayloadHandler",t=>{this.onProviderPayload(t),this.resetPingTimeout()}),Le(this,"onConnectHandler",()=>{this.logger.warn({},"Relayer connected 🛜"),this.startPingTimeout(),this.events.emit(Ze.connect)}),Le(this,"onDisconnectHandler",()=>{this.logger.warn({},"Relayer disconnected 🛑"),this.requestsInFlight=[],this.onProviderDisconnect()}),Le(this,"onProviderErrorHandler",t=>{this.logger.fatal(`Fatal socket error: ${t.message}`),this.events.emit(Ze.error,t),this.logger.fatal("Fatal socket error received, closing transport"),this.transportClose()}),Le(this,"registerProviderListeners",()=>{this.provider.on(mn.payload,this.onPayloadHandler),this.provider.on(mn.connect,this.onConnectHandler),this.provider.on(mn.disconnect,this.onDisconnectHandler),this.provider.on(mn.error,this.onProviderErrorHandler)}),this.core=n.core,this.logger=typeof n.logger<"u"&&typeof n.logger!="string"?Rt(n.logger,this.name):jl(V0({level:n.logger||iO})),this.messages=new lz(this.logger,n.core),this.subscriber=new Cz(this,this.logger),this.publisher=new gz(this,this.logger),this.projectId=n==null?void 0:n.projectId,this.relayUrl=(n==null?void 0:n.relayUrl)||L5,Uv()?this.packageName=qf():Bv()&&(this.bundleId=qf()),this.provider={}}async init(){this.logger.trace("Initialized"),this.registerEventListeners(),await Promise.all([this.messages.init(),this.subscriber.init()]),this.initialized=!0,this.transportOpen().catch(n=>this.logger.warn(n,n==null?void 0:n.message))}get context(){return Jt(this.logger)}get connected(){var n,t,i;return((i=(t=(n=this.provider)==null?void 0:n.connection)==null?void 0:t.socket)==null?void 0:i.readyState)===1||!1}get connecting(){var n,t,i;return((i=(t=(n=this.provider)==null?void 0:n.connection)==null?void 0:t.socket)==null?void 0:i.readyState)===0||this.connectPromise!==void 0||!1}async publish(n,t,i){this.isInitialized(),await this.publisher.publish(n,t,i),await this.recordMessageEvent({topic:n,message:t,publishedAt:Date.now(),transportType:Pe.relay},uc.outbound)}async publishCustom(n){this.isInitialized(),await this.publisher.publishCustom(n)}async subscribe(n,t){var i,r,o;this.isInitialized(),(!(t!=null&&t.transportType)||(t==null?void 0:t.transportType)==="relay")&&await this.toEstablishConnection();const s=typeof((i=t==null?void 0:t.internal)==null?void 0:i.throwOnFailedPublish)>"u"?!0:(r=t==null?void 0:t.internal)==null?void 0:r.throwOnFailedPublish;let c=((o=this.subscriber.topicMap.get(n))==null?void 0:o[0])||"",l;const h=d=>{d.topic===n&&(this.subscriber.off(en.created,h),l())};return await Promise.all([new Promise(d=>{l=d,this.subscriber.on(en.created,h)}),new Promise(async(d,f)=>{c=await this.subscriber.subscribe(n,eg({internal:{throwOnFailedPublish:s}},t)).catch(m=>{s&&f(m)})||c,d()})]),c}async unsubscribe(n,t){this.isInitialized(),await this.subscriber.unsubscribe(n,t)}on(n,t){this.events.on(n,t)}once(n,t){this.events.once(n,t)}off(n,t){this.events.off(n,t)}removeListener(n,t){this.events.removeListener(n,t)}async transportDisconnect(){this.provider.disconnect&&(this.hasExperiencedNetworkDisruption||this.connected)?await Xn(this.provider.disconnect(),2e3,"provider.disconnect()").catch(()=>this.onProviderDisconnect()):this.onProviderDisconnect()}async transportClose(){this.transportExplicitlyClosed=!0,await this.transportDisconnect()}async transportOpen(n){if(!this.subscriber.hasAnyTopics){this.logger.info("Starting WS connection skipped because the client has no topics to work with.");return}if(this.connectPromise?(this.logger.debug({},"Waiting for existing connection attempt to resolve..."),await this.connectPromise,this.logger.debug({},"Existing connection attempt resolved")):(this.connectPromise=new Promise(async(t,i)=>{await this.connect(n).then(t).catch(i).finally(()=>{this.connectPromise=void 0})}),await this.connectPromise),!this.connected)throw new Error(`Couldn't establish socket connection to the relay server: ${this.relayUrl}`)}async restartTransport(n){this.logger.debug({},"Restarting transport..."),!this.connectionAttemptInProgress&&(this.relayUrl=n||this.relayUrl,await this.confirmOnlineStateOrThrow(),await this.transportClose(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await Um())throw new Error("No internet connection detected. Please restart your network and try again.")}async handleBatchMessageEvents(n){if((n==null?void 0:n.length)===0){this.logger.trace("Batch message events is empty. Ignoring...");return}const t=n.sort((i,r)=>i.publishedAt-r.publishedAt);this.logger.debug(`Batch of ${t.length} message events sorted`);for(const i of t)try{await this.onMessageEvent(i)}catch(r){this.logger.warn(r,"Error while processing batch message event: "+(r==null?void 0:r.message))}this.logger.trace(`Batch of ${t.length} message events processed`)}async onLinkMessageEvent(n,t){const{topic:i}=n;if(!t.sessionExists){const r=tt(ee.FIVE_MINUTES),o={topic:i,expiry:r,relay:{protocol:"irn"},active:!1};await this.core.pairing.pairings.set(i,o)}this.events.emit(Ze.message,n),await this.recordMessageEvent(n,uc.inbound)}async connect(n){await this.confirmOnlineStateOrThrow(),n&&n!==this.relayUrl&&(this.relayUrl=n,await this.transportDisconnect()),this.connectionAttemptInProgress=!0,this.transportExplicitlyClosed=!1;let t=1;for(;t<6;){try{if(this.transportExplicitlyClosed)break;this.logger.debug({},`Connecting to ${this.relayUrl}, attempt: ${t}...`),await this.createProvider(),await new Promise(async(i,r)=>{const o=()=>{r(new Error("Connection interrupted while trying to connect"))};this.provider.once(mn.disconnect,o),await Xn(new Promise((s,c)=>{this.provider.connect().then(s).catch(c)}),this.connectTimeout,`Socket stalled when trying to connect to ${this.relayUrl}`).catch(s=>{r(s)}).finally(()=>{this.provider.off(mn.disconnect,o),clearTimeout(this.reconnectTimeout)}),await new Promise(async(s,c)=>{const l=()=>{r(new Error("Connection interrupted while trying to subscribe"))};this.provider.once(mn.disconnect,l),await this.subscriber.start().then(s).catch(c).finally(()=>{this.provider.off(mn.disconnect,l)})}),this.hasExperiencedNetworkDisruption=!1,i()})}catch(i){await this.subscriber.stop();const r=i;this.logger.warn({},r.message),this.hasExperiencedNetworkDisruption=!0}finally{this.connectionAttemptInProgress=!1}if(this.connected){this.logger.debug({},`Connected to ${this.relayUrl} successfully on attempt: ${t}`);break}await new Promise(i=>setTimeout(i,ee.toMiliseconds(t*1))),t++}}startPingTimeout(){var n,t,i,r,o;if(Vc())try{(t=(n=this.provider)==null?void 0:n.connection)!=null&&t.socket&&((o=(r=(i=this.provider)==null?void 0:i.connection)==null?void 0:r.socket)==null||o.on("ping",()=>{this.resetPingTimeout()})),this.resetPingTimeout()}catch(s){this.logger.warn(s,s==null?void 0:s.message)}}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const n=await this.core.crypto.signJWT(this.relayUrl);this.provider=new c_(new l_(Qv({sdkVersion:Kd,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:n,useOnCloseEvent:!0,bundleId:this.bundleId,packageName:this.packageName}))),this.registerProviderListeners()}async recordMessageEvent(n,t){const{topic:i,message:r}=n;await this.messages.set(i,r,t)}async shouldIgnoreMessageEvent(n){const{topic:t,message:i}=n;if(!i||i.length===0)return this.logger.warn(`Ignoring invalid/empty message: ${i}`),!0;if(!await this.subscriber.isKnownTopic(t))return this.logger.warn(`Ignoring message for unknown topic ${t}`),!0;const r=this.messages.has(t,i);return r&&this.logger.warn(`Ignoring duplicate message: ${i}`),r}async onProviderPayload(n){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:n}),wh(n)){if(!n.method.endsWith(oO))return;const t=n.params,{topic:i,message:r,publishedAt:o,attestation:s}=t.data,c={topic:i,message:r,publishedAt:o,transportType:Pe.relay,attestation:s};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(eg({type:"event",event:t.id},c)),this.events.emit(t.id,c),await this.acknowledgePayload(n),await this.onMessageEvent(c)}else _h(n)&&this.events.emit(Ze.message_ack,n)}async onMessageEvent(n){await this.shouldIgnoreMessageEvent(n)||(await this.recordMessageEvent(n,uc.inbound),this.events.emit(Ze.message,n))}async acknowledgePayload(n){const t=yc(n.id,!0);await this.provider.connection.send(t)}unregisterProviderListeners(){this.provider.off(mn.payload,this.onPayloadHandler),this.provider.off(mn.connect,this.onConnectHandler),this.provider.off(mn.disconnect,this.onDisconnectHandler),this.provider.off(mn.error,this.onProviderErrorHandler),clearTimeout(this.pingTimeout)}async registerEventListeners(){let n=await Um();OD(async t=>{n!==t&&(n=t,t?await this.transportOpen().catch(i=>this.logger.error(i,i==null?void 0:i.message)):(this.hasExperiencedNetworkDisruption=!0,await this.transportDisconnect(),this.transportExplicitlyClosed=!1))}),this.core.heartbeat.on(rs.pulse,async()=>{if(!this.transportExplicitlyClosed&&!this.connected&&PD())try{await this.confirmOnlineStateOrThrow(),await this.transportOpen()}catch(t){this.logger.warn(t,t==null?void 0:t.message)}})}async onProviderDisconnect(){clearTimeout(this.pingTimeout),this.events.emit(Ze.disconnect),this.connectionAttemptInProgress=!1,!this.reconnectInProgress&&(this.reconnectInProgress=!0,await this.subscriber.stop(),this.subscriber.hasAnyTopics&&(this.transportExplicitlyClosed||(this.reconnectTimeout=setTimeout(async()=>{await this.transportOpen().catch(n=>this.logger.error(n,n==null?void 0:n.message)),this.reconnectTimeout=void 0,this.reconnectInProgress=!1},ee.toMiliseconds(sO)))))}isInitialized(){if(!this.initialized){const{message:n}=J("NOT_INITIALIZED",this.name);throw new Error(n)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectPromise){await this.connectPromise;return}await this.connect()}}}function vz(e,n){return e===n||Number.isNaN(e)&&Number.isNaN(n)}function tg(e){return Object.getOwnPropertySymbols(e).filter(n=>Object.prototype.propertyIsEnumerable.call(e,n))}function ng(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const Nz="[object RegExp]",Sz="[object String]",Az="[object Number]",Dz="[object Boolean]",ig="[object Arguments]",Oz="[object Symbol]",kz="[object Date]",zz="[object Map]",Pz="[object Set]",Rz="[object Array]",Vz="[object Function]",Uz="[object ArrayBuffer]",Eu="[object Object]",Bz="[object Error]",Wz="[object DataView]",$z="[object Uint8Array]",Yz="[object Uint8ClampedArray]",Fz="[object Uint16Array]",Qz="[object Uint32Array]",Hz="[object BigUint64Array]",Zz="[object Int8Array]",Gz="[object Int16Array]",qz="[object Int32Array]",Kz="[object BigInt64Array]",Jz="[object Float32Array]",Xz="[object Float64Array]";function eP(){}function rg(e){if(!e||typeof e!="object")return!1;const n=Object.getPrototypeOf(e);return n===null||n===Object.prototype||Object.getPrototypeOf(n)===null?Object.prototype.toString.call(e)==="[object Object]":!1}function tP(e,n,t){return Ds(e,n,void 0,void 0,void 0,void 0,t)}function Ds(e,n,t,i,r,o,s){const c=s(e,n,t,i,r,o);if(c!==void 0)return c;if(typeof e==typeof n)switch(typeof e){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return e===n;case"number":return e===n||Object.is(e,n);case"function":return e===n;case"object":return Us(e,n,o,s)}return Us(e,n,o,s)}function Us(e,n,t,i){if(Object.is(e,n))return!0;let r=ng(e),o=ng(n);if(r===ig&&(r=Eu),o===ig&&(o=Eu),r!==o)return!1;switch(r){case Sz:return e.toString()===n.toString();case Az:{const l=e.valueOf(),h=n.valueOf();return vz(l,h)}case Dz:case kz:case Oz:return Object.is(e.valueOf(),n.valueOf());case Nz:return e.source===n.source&&e.flags===n.flags;case Vz:return e===n}t=t??new Map;const s=t.get(e),c=t.get(n);if(s!=null&&c!=null)return s===n;t.set(e,n),t.set(n,e);try{switch(r){case zz:{if(e.size!==n.size)return!1;for(const[l,h]of e.entries())if(!n.has(l)||!Ds(h,n.get(l),l,e,n,t,i))return!1;return!0}case Pz:{if(e.size!==n.size)return!1;const l=Array.from(e.values()),h=Array.from(n.values());for(let d=0;d<l.length;d++){const f=l[d],m=h.findIndex(g=>Ds(f,g,void 0,e,n,t,i));if(m===-1)return!1;h.splice(m,1)}return!0}case Rz:case $z:case Yz:case Fz:case Qz:case Hz:case Zz:case Gz:case qz:case Kz:case Jz:case Xz:{if(typeof Ne<"u"&&Ne.isBuffer(e)!==Ne.isBuffer(n)||e.length!==n.length)return!1;for(let l=0;l<e.length;l++)if(!Ds(e[l],n[l],l,e,n,t,i))return!1;return!0}case Uz:return e.byteLength!==n.byteLength?!1:Us(new Uint8Array(e),new Uint8Array(n),t,i);case Wz:return e.byteLength!==n.byteLength||e.byteOffset!==n.byteOffset?!1:Us(new Uint8Array(e),new Uint8Array(n),t,i);case Bz:return e.name===n.name&&e.message===n.message;case Eu:{if(!(Us(e.constructor,n.constructor,t,i)||rg(e)&&rg(n)))return!1;const l=[...Object.keys(e),...tg(e)],h=[...Object.keys(n),...tg(n)];if(l.length!==h.length)return!1;for(let d=0;d<l.length;d++){const f=l[d],m=e[f];if(!Object.hasOwn(n,f))return!1;const g=n[f];if(!Ds(m,g,f,e,n,t,i))return!1}return!0}default:return!1}}finally{t.delete(e),t.delete(n)}}function nP(e,n){return tP(e,n,eP)}var iP=Object.defineProperty,og=Object.getOwnPropertySymbols,rP=Object.prototype.hasOwnProperty,oP=Object.prototype.propertyIsEnumerable,rh=(e,n,t)=>n in e?iP(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,sg=(e,n)=>{for(var t in n||(n={}))rP.call(n,t)&&rh(e,t,n[t]);if(og)for(var t of og(n))oP.call(n,t)&&rh(e,t,n[t]);return e},Vt=(e,n,t)=>rh(e,typeof n!="symbol"?n+"":n,t);class mo extends ST{constructor(n,t,i,r=oi,o=void 0){super(n,t,i,r),this.core=n,this.logger=t,this.name=i,Vt(this,"map",new Map),Vt(this,"version",aO),Vt(this,"cached",[]),Vt(this,"initialized",!1),Vt(this,"getKey"),Vt(this,"storagePrefix",oi),Vt(this,"recentlyDeleted",[]),Vt(this,"recentlyDeletedLimit",200),Vt(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(s=>{this.getKey&&s!==null&&!nt(s)?this.map.set(this.getKey(s),s):dD(s)?this.map.set(s.id,s):hD(s)&&this.map.set(s.topic,s)}),this.cached=[],this.initialized=!0)}),Vt(this,"set",async(s,c)=>{this.isInitialized(),this.map.has(s)?await this.update(s,c):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:s,value:c}),this.map.set(s,c),await this.persist())}),Vt(this,"get",s=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:s}),this.getData(s))),Vt(this,"getAll",s=>(this.isInitialized(),s?this.values.filter(c=>Object.keys(s).every(l=>nP(c[l],s[l]))):this.values)),Vt(this,"update",async(s,c)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:s,update:c});const l=sg(sg({},this.getData(s)),c);this.map.set(s,l),await this.persist()}),Vt(this,"delete",async(s,c)=>{this.isInitialized(),this.map.has(s)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:s,reason:c}),this.map.delete(s),this.addToRecentlyDeleted(s),await this.persist())}),this.logger=Rt(t,this.name),this.storagePrefix=r,this.getKey=o}get context(){return Jt(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}addToRecentlyDeleted(n){this.recentlyDeleted.push(n),this.recentlyDeleted.length>=this.recentlyDeletedLimit&&this.recentlyDeleted.splice(0,this.recentlyDeletedLimit/2)}async setDataStore(n){await this.core.storage.setItem(this.storageKey,n)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(n){const t=this.map.get(n);if(!t){if(this.recentlyDeleted.includes(n)){const{message:r}=J("MISSING_OR_INVALID",`Record was recently deleted - ${this.name}: ${n}`);throw this.logger.error(r),new Error(r)}const{message:i}=J("NO_MATCHING_KEY",`${this.name}: ${n}`);throw this.logger.error(i),new Error(i)}return t}async persist(){await this.setDataStore(this.values)}async restore(){try{const n=await this.getDataStore();if(typeof n>"u"||!n.length)return;if(this.map.size){const{message:t}=J("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),new Error(t)}this.cached=n,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(n){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(n)}}isInitialized(){if(!this.initialized){const{message:n}=J("NOT_INITIALIZED",this.name);throw new Error(n)}}}var sP=Object.defineProperty,aP=(e,n,t)=>n in e?sP(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Me=(e,n,t)=>aP(e,typeof n!="symbol"?n+"":n,t);class cP{constructor(n,t){this.core=n,this.logger=t,Me(this,"name",dO),Me(this,"version",hO),Me(this,"events",new kg),Me(this,"pairings"),Me(this,"initialized",!1),Me(this,"storagePrefix",oi),Me(this,"ignoredPayloadTypes",[pi]),Me(this,"registeredMethods",[]),Me(this,"init",async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))}),Me(this,"register",({methods:i})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...i])]}),Me(this,"create",async i=>{this.isInitialized();const r=Zd(),o=await this.core.crypto.setSymKey(r),s=tt(ee.FIVE_MINUTES),c={protocol:j5},l={topic:o,expiry:s,relay:c,active:!1,methods:i==null?void 0:i.methods},h=Sm({protocol:this.core.protocol,version:this.core.version,topic:o,symKey:r,relay:c,expiryTimestamp:s,methods:i==null?void 0:i.methods});return this.events.emit(Dr.create,l),this.core.expirer.set(o,s),await this.pairings.set(o,l),await this.core.relayer.subscribe(o,{transportType:i==null?void 0:i.transportType,internal:i==null?void 0:i.internal}),{topic:o,uri:h}}),Me(this,"pair",async i=>{this.isInitialized();const r=this.core.eventClient.createEvent({properties:{topic:i==null?void 0:i.uri,trace:[Fn.pairing_started]}});this.isValidPair(i,r);const{topic:o,symKey:s,relay:c,expiryTimestamp:l,methods:h}=Nm(i.uri);r.props.properties.topic=o,r.addTrace(Fn.pairing_uri_validation_success),r.addTrace(Fn.pairing_uri_not_expired);let d;if(this.pairings.keys.includes(o)){if(d=this.pairings.get(o),r.addTrace(Fn.existing_pairing),d.active)throw r.setError(fi.active_pairing_already_exists),new Error(`Pairing already exists: ${o}. Please try again with a new connection URI.`);r.addTrace(Fn.pairing_not_expired)}const f=l||tt(ee.FIVE_MINUTES),m={topic:o,relay:c,expiry:f,active:!1,methods:h};this.core.expirer.set(o,f),await this.pairings.set(o,m),r.addTrace(Fn.store_new_pairing),i.activatePairing&&await this.activate({topic:o}),this.events.emit(Dr.create,m),r.addTrace(Fn.emit_inactive_pairing),this.core.crypto.keychain.has(o)||await this.core.crypto.setSymKey(s,o),r.addTrace(Fn.subscribing_pairing_topic);try{await this.core.relayer.confirmOnlineStateOrThrow()}catch{r.setError(fi.no_internet_connection)}try{await this.core.relayer.subscribe(o,{relay:c})}catch(g){throw r.setError(fi.subscribe_pairing_topic_failure),g}return r.addTrace(Fn.subscribe_pairing_topic_success),m}),Me(this,"activate",async({topic:i})=>{this.isInitialized();const r=tt(ee.FIVE_MINUTES);this.core.expirer.set(i,r),await this.pairings.update(i,{active:!0,expiry:r})}),Me(this,"ping",async i=>{this.isInitialized(),await this.isValidPing(i),this.logger.warn("ping() is deprecated and will be removed in the next major release.");const{topic:r}=i;if(this.pairings.keys.includes(r)){const o=await this.sendRequest(r,"wc_pairingPing",{}),{done:s,resolve:c,reject:l}=Sr();this.events.once(Ee("pairing_ping",o),({error:h})=>{h?l(h):c()}),await s()}}),Me(this,"updateExpiry",async({topic:i,expiry:r})=>{this.isInitialized(),await this.pairings.update(i,{expiry:r})}),Me(this,"updateMetadata",async({topic:i,metadata:r})=>{this.isInitialized(),await this.pairings.update(i,{peerMetadata:r})}),Me(this,"getPairings",()=>(this.isInitialized(),this.pairings.values)),Me(this,"disconnect",async i=>{this.isInitialized(),await this.isValidDisconnect(i);const{topic:r}=i;this.pairings.keys.includes(r)&&(await this.sendRequest(r,"wc_pairingDelete",Fe("USER_DISCONNECTED")),await this.deletePairing(r))}),Me(this,"formatUriFromPairing",i=>{this.isInitialized();const{topic:r,relay:o,expiry:s,methods:c}=i,l=this.core.crypto.keychain.get(r);return Sm({protocol:this.core.protocol,version:this.core.version,topic:r,symKey:l,relay:o,expiryTimestamp:s,methods:c})}),Me(this,"sendRequest",async(i,r,o)=>{const s=$i(r,o),c=await this.core.crypto.encode(i,s),l=js[r].req;return this.core.history.set(i,s),this.core.relayer.publish(i,c,l),s.id}),Me(this,"sendResult",async(i,r,o)=>{const s=yc(i,o),c=await this.core.crypto.encode(r,s),l=(await this.core.history.get(r,i)).request.method,h=js[l].res;await this.core.relayer.publish(r,c,h),await this.core.history.resolve(s)}),Me(this,"sendError",async(i,r,o)=>{const s=Kg(i,o),c=await this.core.crypto.encode(r,s),l=(await this.core.history.get(r,i)).request.method,h=js[l]?js[l].res:js.unregistered_method.res;await this.core.relayer.publish(r,c,h),await this.core.history.resolve(s)}),Me(this,"deletePairing",async(i,r)=>{await this.core.relayer.unsubscribe(i),await Promise.all([this.pairings.delete(i,Fe("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(i),r?Promise.resolve():this.core.expirer.del(i)])}),Me(this,"cleanup",async()=>{const i=this.pairings.getAll().filter(r=>Yi(r.expiry));await Promise.all(i.map(r=>this.deletePairing(r.topic)))}),Me(this,"onRelayEventRequest",async i=>{const{topic:r,payload:o}=i;switch(o.method){case"wc_pairingPing":return await this.onPairingPingRequest(r,o);case"wc_pairingDelete":return await this.onPairingDeleteRequest(r,o);default:return await this.onUnknownRpcMethodRequest(r,o)}}),Me(this,"onRelayEventResponse",async i=>{const{topic:r,payload:o}=i,s=(await this.core.history.get(r,o.id)).request.method;switch(s){case"wc_pairingPing":return this.onPairingPingResponse(r,o);default:return this.onUnknownRpcMethodResponse(s)}}),Me(this,"onPairingPingRequest",async(i,r)=>{const{id:o}=r;try{this.isValidPing({topic:i}),await this.sendResult(o,i,!0),this.events.emit(Dr.ping,{id:o,topic:i})}catch(s){await this.sendError(o,i,s),this.logger.error(s)}}),Me(this,"onPairingPingResponse",(i,r)=>{const{id:o}=r;setTimeout(()=>{ui(r)?this.events.emit(Ee("pairing_ping",o),{}):Qn(r)&&this.events.emit(Ee("pairing_ping",o),{error:r.error})},500)}),Me(this,"onPairingDeleteRequest",async(i,r)=>{const{id:o}=r;try{this.isValidDisconnect({topic:i}),await this.deletePairing(i),this.events.emit(Dr.delete,{id:o,topic:i})}catch(s){await this.sendError(o,i,s),this.logger.error(s)}}),Me(this,"onUnknownRpcMethodRequest",async(i,r)=>{const{id:o,method:s}=r;try{if(this.registeredMethods.includes(s))return;const c=Fe("WC_METHOD_UNSUPPORTED",s);await this.sendError(o,i,c),this.logger.error(c)}catch(c){await this.sendError(o,i,c),this.logger.error(c)}}),Me(this,"onUnknownRpcMethodResponse",i=>{this.registeredMethods.includes(i)||this.logger.error(Fe("WC_METHOD_UNSUPPORTED",i))}),Me(this,"isValidPair",(i,r)=>{var o;if(!Ut(i)){const{message:c}=J("MISSING_OR_INVALID",`pair() params: ${i}`);throw r.setError(fi.malformed_pairing_uri),new Error(c)}if(!uD(i.uri)){const{message:c}=J("MISSING_OR_INVALID",`pair() uri: ${i.uri}`);throw r.setError(fi.malformed_pairing_uri),new Error(c)}const s=Nm(i==null?void 0:i.uri);if(!((o=s==null?void 0:s.relay)!=null&&o.protocol)){const{message:c}=J("MISSING_OR_INVALID","pair() uri#relay-protocol");throw r.setError(fi.malformed_pairing_uri),new Error(c)}if(!(s!=null&&s.symKey)){const{message:c}=J("MISSING_OR_INVALID","pair() uri#symKey");throw r.setError(fi.malformed_pairing_uri),new Error(c)}if(s!=null&&s.expiryTimestamp&&ee.toMiliseconds(s==null?void 0:s.expiryTimestamp)<Date.now()){r.setError(fi.pairing_expired);const{message:c}=J("EXPIRED","pair() URI has expired. Please try again with a new connection URI.");throw new Error(c)}}),Me(this,"isValidPing",async i=>{if(!Ut(i)){const{message:o}=J("MISSING_OR_INVALID",`ping() params: ${i}`);throw new Error(o)}const{topic:r}=i;await this.isValidPairingTopic(r)}),Me(this,"isValidDisconnect",async i=>{if(!Ut(i)){const{message:o}=J("MISSING_OR_INVALID",`disconnect() params: ${i}`);throw new Error(o)}const{topic:r}=i;await this.isValidPairingTopic(r)}),Me(this,"isValidPairingTopic",async i=>{if(!Xe(i,!1)){const{message:r}=J("MISSING_OR_INVALID",`pairing topic should be a string: ${i}`);throw new Error(r)}if(!this.pairings.keys.includes(i)){const{message:r}=J("NO_MATCHING_KEY",`pairing topic doesn't exist: ${i}`);throw new Error(r)}if(Yi(this.pairings.get(i).expiry)){await this.deletePairing(i);const{message:r}=J("EXPIRED",`pairing topic: ${i}`);throw new Error(r)}}),this.core=n,this.logger=Rt(t,this.name),this.pairings=new mo(this.core,this.logger,this.name,this.storagePrefix)}get context(){return Jt(this.logger)}isInitialized(){if(!this.initialized){const{message:n}=J("NOT_INITIALIZED",this.name);throw new Error(n)}}registerRelayerEvents(){this.core.relayer.on(Ze.message,async n=>{const{topic:t,message:i,transportType:r}=n;if(this.pairings.keys.includes(t)&&r!==Pe.link_mode&&!this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(i)))try{const o=await this.core.crypto.decode(t,i);wh(o)?(this.core.history.set(t,o),await this.onRelayEventRequest({topic:t,payload:o})):_h(o)&&(await this.core.history.resolve(o),await this.onRelayEventResponse({topic:t,payload:o}),this.core.history.delete(t,o.id)),await this.core.relayer.messages.ack(t,i)}catch(o){this.logger.error(o)}})}registerExpirerEvents(){this.core.expirer.on(yn.expired,async n=>{const{topic:t}=vw(n.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit(Dr.expire,{topic:t}))})}}var lP=Object.defineProperty,uP=(e,n,t)=>n in e?lP(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,ft=(e,n,t)=>uP(e,typeof n!="symbol"?n+"":n,t);class dP extends ET{constructor(n,t){super(n,t),this.core=n,this.logger=t,ft(this,"records",new Map),ft(this,"events",new so.EventEmitter),ft(this,"name",fO),ft(this,"version",mO),ft(this,"cached",[]),ft(this,"initialized",!1),ft(this,"storagePrefix",oi),ft(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(i=>this.records.set(i.id,i)),this.cached=[],this.registerEventListeners(),this.initialized=!0)}),ft(this,"set",(i,r,o)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:i,request:r,chainId:o}),this.records.has(r.id))return;const s={id:r.id,topic:i,request:{method:r.method,params:r.params||null},chainId:o,expiry:tt(ee.THIRTY_DAYS)};this.records.set(s.id,s),this.persist(),this.events.emit(vn.created,s)}),ft(this,"resolve",async i=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:i}),!this.records.has(i.id))return;const r=await this.getRecord(i.id);typeof r.response>"u"&&(r.response=Qn(i)?{error:i.error}:{result:i.result},this.records.set(r.id,r),this.persist(),this.events.emit(vn.updated,r))}),ft(this,"get",async(i,r)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:i,id:r}),await this.getRecord(r))),ft(this,"delete",(i,r)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:r}),this.values.forEach(o=>{if(o.topic===i){if(typeof r<"u"&&o.id!==r)return;this.records.delete(o.id),this.events.emit(vn.deleted,o)}}),this.persist()}),ft(this,"exists",async(i,r)=>(this.isInitialized(),this.records.has(r)?(await this.getRecord(r)).topic===i:!1)),ft(this,"on",(i,r)=>{this.events.on(i,r)}),ft(this,"once",(i,r)=>{this.events.once(i,r)}),ft(this,"off",(i,r)=>{this.events.off(i,r)}),ft(this,"removeListener",(i,r)=>{this.events.removeListener(i,r)}),this.logger=Rt(t,this.name)}get context(){return Jt(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const n=[];return this.values.forEach(t=>{if(typeof t.response<"u")return;const i={topic:t.topic,request:$i(t.request.method,t.request.params,t.id),chainId:t.chainId};return n.push(i)}),n}async setJsonRpcRecords(n){await this.core.storage.setItem(this.storageKey,n)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(n){this.isInitialized();const t=this.records.get(n);if(!t){const{message:i}=J("NO_MATCHING_KEY",`${this.name}: ${n}`);throw new Error(i)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(vn.sync)}async restore(){try{const n=await this.getJsonRpcRecords();if(typeof n>"u"||!n.length)return;if(this.records.size){const{message:t}=J("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),new Error(t)}this.cached=n,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(n){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(n)}}registerEventListeners(){this.events.on(vn.created,n=>{const t=vn.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:n})}),this.events.on(vn.updated,n=>{const t=vn.updated;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:n})}),this.events.on(vn.deleted,n=>{const t=vn.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:n})}),this.core.heartbeat.on(rs.pulse,()=>{this.cleanup()})}cleanup(){try{this.isInitialized();let n=!1;this.records.forEach(t=>{ee.toMiliseconds(t.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${t.id}`),this.records.delete(t.id),this.events.emit(vn.deleted,t,!1),n=!0)}),n&&this.persist()}catch(n){this.logger.warn(n)}}isInitialized(){if(!this.initialized){const{message:n}=J("NOT_INITIALIZED",this.name);throw new Error(n)}}}var hP=Object.defineProperty,fP=(e,n,t)=>n in e?hP(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,bt=(e,n,t)=>fP(e,typeof n!="symbol"?n+"":n,t);class mP extends DT{constructor(n,t){super(n,t),this.core=n,this.logger=t,bt(this,"expirations",new Map),bt(this,"events",new so.EventEmitter),bt(this,"name",gO),bt(this,"version",yO),bt(this,"cached",[]),bt(this,"initialized",!1),bt(this,"storagePrefix",oi),bt(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(i=>this.expirations.set(i.target,i)),this.cached=[],this.registerEventListeners(),this.initialized=!0)}),bt(this,"has",i=>{try{const r=this.formatTarget(i);return typeof this.getExpiration(r)<"u"}catch{return!1}}),bt(this,"set",(i,r)=>{this.isInitialized();const o=this.formatTarget(i),s={target:o,expiry:r};this.expirations.set(o,s),this.checkExpiry(o,s),this.events.emit(yn.created,{target:o,expiration:s})}),bt(this,"get",i=>{this.isInitialized();const r=this.formatTarget(i);return this.getExpiration(r)}),bt(this,"del",i=>{if(this.isInitialized(),this.has(i)){const r=this.formatTarget(i),o=this.getExpiration(r);this.expirations.delete(r),this.events.emit(yn.deleted,{target:r,expiration:o})}}),bt(this,"on",(i,r)=>{this.events.on(i,r)}),bt(this,"once",(i,r)=>{this.events.once(i,r)}),bt(this,"off",(i,r)=>{this.events.off(i,r)}),bt(this,"removeListener",(i,r)=>{this.events.removeListener(i,r)}),this.logger=Rt(t,this.name)}get context(){return Jt(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(n){if(typeof n=="string")return Hv(n);if(typeof n=="number")return Zv(n);const{message:t}=J("UNKNOWN_TYPE",`Target type: ${typeof n}`);throw new Error(t)}async setExpirations(n){await this.core.storage.setItem(this.storageKey,n)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(yn.sync)}async restore(){try{const n=await this.getExpirations();if(typeof n>"u"||!n.length)return;if(this.expirations.size){const{message:t}=J("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),new Error(t)}this.cached=n,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(n){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(n)}}getExpiration(n){const t=this.expirations.get(n);if(!t){const{message:i}=J("NO_MATCHING_KEY",`${this.name}: ${n}`);throw this.logger.warn(i),new Error(i)}return t}checkExpiry(n,t){const{expiry:i}=t;ee.toMiliseconds(i)-Date.now()<=0&&this.expire(n,t)}expire(n,t){this.expirations.delete(n),this.events.emit(yn.expired,{target:n,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((n,t)=>this.checkExpiry(t,n))}registerEventListeners(){this.core.heartbeat.on(rs.pulse,()=>this.checkExpirations()),this.events.on(yn.created,n=>{const t=yn.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:n}),this.persist()}),this.events.on(yn.expired,n=>{const t=yn.expired;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:n}),this.persist()}),this.events.on(yn.deleted,n=>{const t=yn.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:n}),this.persist()})}isInitialized(){if(!this.initialized){const{message:n}=J("NOT_INITIALIZED",this.name);throw new Error(n)}}}var gP=Object.defineProperty,yP=(e,n,t)=>n in e?gP(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Je=(e,n,t)=>yP(e,typeof n!="symbol"?n+"":n,t);class pP extends OT{constructor(n,t,i){super(n,t,i),this.core=n,this.logger=t,this.store=i,Je(this,"name",pO),Je(this,"abortController"),Je(this,"isDevEnv"),Je(this,"verifyUrlV3",_O),Je(this,"storagePrefix",oi),Je(this,"version",C5),Je(this,"publicKey"),Je(this,"fetchPromise"),Je(this,"init",async()=>{var r;this.isDevEnv||(this.publicKey=await this.store.getItem(this.storeKey),this.publicKey&&ee.toMiliseconds((r=this.publicKey)==null?void 0:r.expiresAt)<Date.now()&&(this.logger.debug("verify v2 public key expired"),await this.removePublicKey()))}),Je(this,"register",async r=>{if(!fs()||this.isDevEnv)return;const o=window.location.origin,{id:s,decryptedId:c}=r,l=`${this.verifyUrlV3}/attestation?projectId=${this.core.projectId}&origin=${o}&id=${s}&decryptedId=${c}`;try{const h=Zo(),d=this.startAbortTimer(ee.ONE_SECOND*5),f=await new Promise((m,g)=>{const w=()=>{window.removeEventListener("message",_),h.body.removeChild(p),g("attestation aborted")};this.abortController.signal.addEventListener("abort",w);const p=h.createElement("iframe");p.src=l,p.style.display="none",p.addEventListener("error",w,{signal:this.abortController.signal});const _=x=>{if(x.data&&typeof x.data=="string")try{const I=JSON.parse(x.data);if(I.type==="verify_attestation"){if(ku(I.attestation).payload.id!==s)return;clearInterval(d),h.body.removeChild(p),this.abortController.signal.removeEventListener("abort",w),window.removeEventListener("message",_),m(I.attestation===null?"":I.attestation)}}catch(I){this.logger.warn(I)}};h.body.appendChild(p),window.addEventListener("message",_,{signal:this.abortController.signal})});return this.logger.debug("jwt attestation",f),f}catch(h){this.logger.warn(h)}return""}),Je(this,"resolve",async r=>{if(this.isDevEnv)return"";const{attestationId:o,hash:s,encryptedId:c}=r;if(o===""){this.logger.debug("resolve: attestationId is empty, skipping");return}if(o){if(ku(o).payload.id!==c)return;const h=await this.isValidJwtAttestation(o);if(h){if(!h.isVerified){this.logger.warn("resolve: jwt attestation: origin url not verified");return}return h}}if(!s)return;const l=this.getVerifyUrl(r==null?void 0:r.verifyUrl);return this.fetchAttestation(s,l)}),Je(this,"fetchAttestation",async(r,o)=>{this.logger.debug(`resolving attestation: ${r} from url: ${o}`);const s=this.startAbortTimer(ee.ONE_SECOND*5),c=await fetch(`${o}/attestation/${r}?v2Supported=true`,{signal:this.abortController.signal});return clearTimeout(s),c.status===200?await c.json():void 0}),Je(this,"getVerifyUrl",r=>{let o=r||Vs;return xO.includes(o)||(this.logger.info(`verify url: ${o}, not included in trusted list, assigning default: ${Vs}`),o=Vs),o}),Je(this,"fetchPublicKey",async()=>{try{this.logger.debug(`fetching public key from: ${this.verifyUrlV3}`);const r=this.startAbortTimer(ee.FIVE_SECONDS),o=await fetch(`${this.verifyUrlV3}/public-key`,{signal:this.abortController.signal});return clearTimeout(r),await o.json()}catch(r){this.logger.warn(r)}}),Je(this,"persistPublicKey",async r=>{this.logger.debug("persisting public key to local storage",r),await this.store.setItem(this.storeKey,r),this.publicKey=r}),Je(this,"removePublicKey",async()=>{this.logger.debug("removing verify v2 public key from storage"),await this.store.removeItem(this.storeKey),this.publicKey=void 0}),Je(this,"isValidJwtAttestation",async r=>{const o=await this.getPublicKey();try{if(o)return this.validateAttestation(r,o)}catch(c){this.logger.error(c),this.logger.warn("error validating attestation")}const s=await this.fetchAndPersistPublicKey();try{if(s)return this.validateAttestation(r,s)}catch(c){this.logger.error(c),this.logger.warn("error validating attestation")}}),Je(this,"getPublicKey",async()=>this.publicKey?this.publicKey:await this.fetchAndPersistPublicKey()),Je(this,"fetchAndPersistPublicKey",async()=>{if(this.fetchPromise)return await this.fetchPromise,this.publicKey;this.fetchPromise=new Promise(async o=>{const s=await this.fetchPublicKey();s&&(await this.persistPublicKey(s),o(s))});const r=await this.fetchPromise;return this.fetchPromise=void 0,r}),Je(this,"validateAttestation",(r,o)=>{const s=WA(r,o.publicKey),c={hasExpired:ee.toMiliseconds(s.exp)<Date.now(),payload:s};if(c.hasExpired)throw this.logger.warn("resolve: jwt attestation expired"),new Error("JWT attestation expired");return{origin:c.payload.origin,isScam:c.payload.isScam,isVerified:c.payload.isVerified}}),this.logger=Rt(t,this.name),this.abortController=new AbortController,this.isDevEnv=B0(),this.init()}get storeKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//verify:public:key"}get context(){return Jt(this.logger)}startAbortTimer(n){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),ee.toMiliseconds(n))}}var wP=Object.defineProperty,_P=(e,n,t)=>n in e?wP(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,ag=(e,n,t)=>_P(e,typeof n!="symbol"?n+"":n,t);class xP extends kT{constructor(n,t){super(n,t),this.projectId=n,this.logger=t,ag(this,"context",MO),ag(this,"registerDeviceToken",async i=>{const{clientId:r,token:o,notificationType:s,enableEncrypted:c=!1}=i,l=`${IO}/${this.projectId}/clients`;await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:r,type:s,token:o,always_raw:c})})}),this.logger=Rt(t,this.context)}}var MP=Object.defineProperty,cg=Object.getOwnPropertySymbols,IP=Object.prototype.hasOwnProperty,bP=Object.prototype.propertyIsEnumerable,oh=(e,n,t)=>n in e?MP(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,vs=(e,n)=>{for(var t in n||(n={}))IP.call(n,t)&&oh(e,t,n[t]);if(cg)for(var t of cg(n))bP.call(n,t)&&oh(e,t,n[t]);return e},st=(e,n,t)=>oh(e,typeof n!="symbol"?n+"":n,t);class CP extends zT{constructor(n,t,i=!0){super(n,t,i),this.core=n,this.logger=t,st(this,"context",CO),st(this,"storagePrefix",oi),st(this,"storageVersion",bO),st(this,"events",new Map),st(this,"shouldPersist",!1),st(this,"init",async()=>{if(!B0())try{const r={eventId:Jf(),timestamp:Date.now(),domain:this.getAppDomain(),props:{event:"INIT",type:"",properties:{client_id:await this.core.crypto.getClientId(),user_agent:Ew(this.core.relayer.protocol,this.core.relayer.version,Kd)}}};await this.sendEvent([r])}catch(r){this.logger.warn(r)}}),st(this,"createEvent",r=>{const{event:o="ERROR",type:s="",properties:{topic:c,trace:l}}=r,h=Jf(),d=this.core.projectId||"",f=Date.now(),m=vs({eventId:h,timestamp:f,props:{event:o,type:s,properties:{topic:c,trace:l}},bundleId:d,domain:this.getAppDomain()},this.setMethods(h));return this.telemetryEnabled&&(this.events.set(h,m),this.shouldPersist=!0),m}),st(this,"getEvent",r=>{const{eventId:o,topic:s}=r;if(o)return this.events.get(o);const c=Array.from(this.events.values()).find(l=>l.props.properties.topic===s);if(c)return vs(vs({},c),this.setMethods(c.eventId))}),st(this,"deleteEvent",r=>{const{eventId:o}=r;this.events.delete(o),this.shouldPersist=!0}),st(this,"setEventListeners",()=>{this.core.heartbeat.on(rs.pulse,async()=>{this.shouldPersist&&await this.persist(),this.events.forEach(r=>{ee.fromMiliseconds(Date.now())-ee.fromMiliseconds(r.timestamp)>jO&&(this.events.delete(r.eventId),this.shouldPersist=!0)})})}),st(this,"setMethods",r=>({addTrace:o=>this.addTrace(r,o),setError:o=>this.setError(r,o)})),st(this,"addTrace",(r,o)=>{const s=this.events.get(r);s&&(s.props.properties.trace.push(o),this.events.set(r,s),this.shouldPersist=!0)}),st(this,"setError",(r,o)=>{const s=this.events.get(r);s&&(s.props.type=o,s.timestamp=Date.now(),this.events.set(r,s),this.shouldPersist=!0)}),st(this,"persist",async()=>{await this.core.storage.setItem(this.storageKey,Array.from(this.events.values())),this.shouldPersist=!1}),st(this,"restore",async()=>{try{const r=await this.core.storage.getItem(this.storageKey)||[];if(!r.length)return;r.forEach(o=>{this.events.set(o.eventId,vs(vs({},o),this.setMethods(o.eventId)))})}catch(r){this.logger.warn(r)}}),st(this,"submit",async()=>{if(!this.telemetryEnabled||this.events.size===0)return;const r=[];for(const[o,s]of this.events)s.props.type&&r.push(s);if(r.length!==0)try{if((await this.sendEvent(r)).ok)for(const o of r)this.events.delete(o.eventId),this.shouldPersist=!0}catch(o){this.logger.warn(o)}}),st(this,"sendEvent",async r=>{const o=this.getAppDomain()?"":"&sp=desktop";return await fetch(`${LO}?projectId=${this.core.projectId}&st=events_sdk&sv=js-${Kd}${o}`,{method:"POST",body:JSON.stringify(r)})}),st(this,"getAppDomain",()=>Lw().url),this.logger=Rt(t,this.context),this.telemetryEnabled=i,i?this.restore().then(async()=>{await this.submit(),this.setEventListeners()}):this.persist()}get storageKey(){return this.storagePrefix+this.storageVersion+this.core.customStoragePrefix+"//"+this.context}}var jP=Object.defineProperty,lg=Object.getOwnPropertySymbols,LP=Object.prototype.hasOwnProperty,EP=Object.prototype.propertyIsEnumerable,sh=(e,n,t)=>n in e?jP(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,ug=(e,n)=>{for(var t in n||(n={}))LP.call(n,t)&&sh(e,t,n[t]);if(lg)for(var t of lg(n))EP.call(n,t)&&sh(e,t,n[t]);return e},Oe=(e,n,t)=>sh(e,typeof n!="symbol"?n+"":n,t);class t1 extends bT{constructor(n){var t;super(n),Oe(this,"protocol",b5),Oe(this,"version",C5),Oe(this,"name",qd),Oe(this,"relayUrl"),Oe(this,"projectId"),Oe(this,"customStoragePrefix"),Oe(this,"events",new so.EventEmitter),Oe(this,"logger"),Oe(this,"heartbeat"),Oe(this,"relayer"),Oe(this,"crypto"),Oe(this,"storage"),Oe(this,"history"),Oe(this,"expirer"),Oe(this,"pairing"),Oe(this,"verify"),Oe(this,"echoClient"),Oe(this,"linkModeSupportedApps"),Oe(this,"eventClient"),Oe(this,"initialized",!1),Oe(this,"logChunkController"),Oe(this,"on",(c,l)=>this.events.on(c,l)),Oe(this,"once",(c,l)=>this.events.once(c,l)),Oe(this,"off",(c,l)=>this.events.off(c,l)),Oe(this,"removeListener",(c,l)=>this.events.removeListener(c,l)),Oe(this,"dispatchEnvelope",({topic:c,message:l,sessionExists:h})=>{if(!c||!l)return;const d={topic:c,message:l,publishedAt:Date.now(),transportType:Pe.link_mode};this.relayer.onLinkMessageEvent(d,{sessionExists:h})});const i=this.getGlobalCore(n==null?void 0:n.customStoragePrefix);if(i)try{return this.customStoragePrefix=i.customStoragePrefix,this.logger=i.logger,this.heartbeat=i.heartbeat,this.crypto=i.crypto,this.history=i.history,this.expirer=i.expirer,this.storage=i.storage,this.relayer=i.relayer,this.pairing=i.pairing,this.verify=i.verify,this.echoClient=i.echoClient,this.linkModeSupportedApps=i.linkModeSupportedApps,this.eventClient=i.eventClient,this.initialized=i.initialized,this.logChunkController=i.logChunkController,i}catch(c){console.warn("Failed to copy global core",c)}this.projectId=n==null?void 0:n.projectId,this.relayUrl=(n==null?void 0:n.relayUrl)||L5,this.customStoragePrefix=n!=null&&n.customStoragePrefix?`:${n.customStoragePrefix}`:"";const r=V0({level:typeof(n==null?void 0:n.logger)=="string"&&n.logger?n.logger:HD.logger,name:qd}),{logger:o,chunkLoggerController:s}=xT({opts:r,maxSizeInBytes:n==null?void 0:n.maxLogBlobSizeInBytes,loggerOverride:n==null?void 0:n.logger});this.logChunkController=s,(t=this.logChunkController)!=null&&t.downloadLogsBlobInBrowser&&(window.downloadLogsBlobInBrowser=async()=>{var c,l;(c=this.logChunkController)!=null&&c.downloadLogsBlobInBrowser&&((l=this.logChunkController)==null||l.downloadLogsBlobInBrowser({clientId:await this.crypto.getClientId()}))}),this.logger=Rt(o,this.name),this.heartbeat=new s_,this.crypto=new tz(this,this.logger,n==null?void 0:n.keychain),this.history=new dP(this,this.logger),this.expirer=new mP(this,this.logger),this.storage=n!=null&&n.storage?n.storage:new a_(ug(ug({},ZD),n==null?void 0:n.storageOptions)),this.relayer=new Tz({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new cP(this,this.logger),this.verify=new pP(this,this.logger,this.storage),this.echoClient=new xP(this.projectId||"",this.logger),this.linkModeSupportedApps=[],this.eventClient=new CP(this,this.logger,n==null?void 0:n.telemetryEnabled),this.setGlobalCore(this)}static async init(n){const t=new t1(n);await t.initialize();const i=await t.crypto.getClientId();return await t.storage.setItem(cO,i),t}get context(){return Jt(this.logger)}async start(){this.initialized||await this.initialize()}async getLogsBlob(){var n;return(n=this.logChunkController)==null?void 0:n.logsToBlob({clientId:await this.crypto.getClientId()})}async addLinkModeSupportedApp(n){this.linkModeSupportedApps.includes(n)||(this.linkModeSupportedApps.push(n),await this.storage.setItem(Wm,this.linkModeSupportedApps))}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.linkModeSupportedApps=await this.storage.getItem(Wm)||[],this.initialized=!0,this.logger.info("Core Initialization Success")}catch(n){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,n),this.logger.error(n.message),n}}getGlobalCore(n=""){try{if(this.isGlobalCoreDisabled())return;const t=`_walletConnectCore_${n}`,i=`${t}_count`;return globalThis[i]=(globalThis[i]||0)+1,globalThis[i]>1&&console.warn(`WalletConnect Core is already initialized. This is probably a mistake and can lead to unexpected behavior. Init() was called ${globalThis[i]} times.`),globalThis[t]}catch(t){console.warn("Failed to get global WalletConnect core",t);return}}setGlobalCore(n){var t;try{if(this.isGlobalCoreDisabled())return;const i=`_walletConnectCore_${((t=n.opts)==null?void 0:t.customStoragePrefix)||""}`;globalThis[i]=n}catch(i){console.warn("Failed to set global WalletConnect core",i)}}isGlobalCoreDisabled(){try{return typeof ur<"u"&&QD.DISABLE_GLOBAL_CORE==="true"}catch{return!0}}}const TP=t1,V5="wc",U5=2,B5="client",n1=`${V5}@${U5}:${B5}:`,Tu={name:B5,logger:"error"},dg="WALLETCONNECT_DEEPLINK_CHOICE",vP="proposal",hg="Proposal expired",NP="session",Lo=ee.SEVEN_DAYS,SP="engine",mt={wc_sessionPropose:{req:{ttl:ee.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:ee.FIVE_MINUTES,prompt:!1,tag:1101},reject:{ttl:ee.FIVE_MINUTES,prompt:!1,tag:1120},autoReject:{ttl:ee.FIVE_MINUTES,prompt:!1,tag:1121}},wc_sessionSettle:{req:{ttl:ee.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:ee.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:ee.ONE_DAY,prompt:!1,tag:1104},res:{ttl:ee.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:ee.ONE_DAY,prompt:!1,tag:1106},res:{ttl:ee.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:ee.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:ee.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:ee.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:ee.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:ee.ONE_DAY,prompt:!1,tag:1112},res:{ttl:ee.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:ee.ONE_DAY,prompt:!1,tag:1114},res:{ttl:ee.ONE_DAY,prompt:!1,tag:1115}},wc_sessionAuthenticate:{req:{ttl:ee.ONE_HOUR,prompt:!0,tag:1116},res:{ttl:ee.ONE_HOUR,prompt:!1,tag:1117},reject:{ttl:ee.FIVE_MINUTES,prompt:!1,tag:1118},autoReject:{ttl:ee.FIVE_MINUTES,prompt:!1,tag:1119}}},vu={min:ee.FIVE_MINUTES,max:ee.SEVEN_DAYS},Yn={idle:"IDLE",active:"ACTIVE"},AP={eth_sendTransaction:{key:""},eth_sendRawTransaction:{key:""},wallet_sendCalls:{key:""},solana_signTransaction:{key:"signature"},solana_signAllTransactions:{key:"transactions"},solana_signAndSendTransaction:{key:"signature"},sui_signAndExecuteTransaction:{key:"digest"},sui_signTransaction:{key:""},hedera_signAndExecuteTransaction:{key:"transactionId"},hedera_executeTransaction:{key:"transactionId"},near_signTransaction:{key:""},near_signTransactions:{key:""},tron_signTransaction:{key:"txID"},xrpl_signTransaction:{key:""},xrpl_signTransactionFor:{key:""},algo_signTxn:{key:""},sendTransfer:{key:"txid"},stacks_stxTransfer:{key:"txId"},polkadot_signTransaction:{key:""},cosmos_signDirect:{key:""}},DP="request",OP=["wc_sessionPropose","wc_sessionRequest","wc_authRequest","wc_sessionAuthenticate"],kP="wc",zP="auth",PP="authKeys",RP="pairingTopics",VP="requests",Ol=`${kP}@${1.5}:${zP}:`,dc=`${Ol}:PUB_KEY`;var UP=Object.defineProperty,BP=Object.defineProperties,WP=Object.getOwnPropertyDescriptors,fg=Object.getOwnPropertySymbols,$P=Object.prototype.hasOwnProperty,YP=Object.prototype.propertyIsEnumerable,ah=(e,n,t)=>n in e?UP(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,ve=(e,n)=>{for(var t in n||(n={}))$P.call(n,t)&&ah(e,t,n[t]);if(fg)for(var t of fg(n))YP.call(n,t)&&ah(e,t,n[t]);return e},Ct=(e,n)=>BP(e,WP(n)),H=(e,n,t)=>ah(e,typeof n!="symbol"?n+"":n,t);class FP extends UT{constructor(n){super(n),H(this,"name",SP),H(this,"events",new kg),H(this,"initialized",!1),H(this,"requestQueue",{state:Yn.idle,queue:[]}),H(this,"sessionRequestQueue",{state:Yn.idle,queue:[]}),H(this,"emittedSessionRequests",new iN({limit:500})),H(this,"requestQueueDelay",ee.ONE_SECOND),H(this,"expectedPairingMethodMap",new Map),H(this,"recentlyDeletedMap",new Map),H(this,"recentlyDeletedLimit",200),H(this,"relayMessageCache",[]),H(this,"pendingSessions",new Map),H(this,"init",async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),await this.registerLinkModeListeners(),this.client.core.pairing.register({methods:Object.keys(mt)}),this.initialized=!0,setTimeout(async()=>{await this.processPendingMessageEvents(),this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},ee.toMiliseconds(this.requestQueueDelay)))}),H(this,"connect",async t=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();const i=Ct(ve({},t),{requiredNamespaces:t.requiredNamespaces||{},optionalNamespaces:t.optionalNamespaces||{}});await this.isValidConnect(i),i.optionalNamespaces=oD(i.requiredNamespaces,i.optionalNamespaces),i.requiredNamespaces={};const{pairingTopic:r,requiredNamespaces:o,optionalNamespaces:s,sessionProperties:c,scopedProperties:l,relays:h}=i;let d=r,f,m=!1;try{if(d){const E=this.client.core.pairing.pairings.get(d);this.client.logger.warn("connect() with existing pairing topic is deprecated and will be removed in the next major release."),m=E.active}}catch(E){throw this.client.logger.error(`connect() -> pairing.get(${d}) failed`),E}if(!d||!m){const{topic:E,uri:T}=await this.client.core.pairing.create({internal:{skipSubscribe:!0}});d=E,f=T}if(!d){const{message:E}=J("NO_MATCHING_KEY",`connect() pairing topic: ${d}`);throw new Error(E)}const g=await this.client.core.crypto.generateKeyPair(),w=mt.wc_sessionPropose.req.ttl||ee.FIVE_MINUTES,p=tt(w),_=Ct(ve(ve({requiredNamespaces:o,optionalNamespaces:s,relays:h??[{protocol:j5}],proposer:{publicKey:g,metadata:this.client.metadata},expiryTimestamp:p,pairingTopic:d},c&&{sessionProperties:c}),l&&{scopedProperties:l}),{id:Si()}),x=Ee("session_connect",_.id),{reject:I,resolve:b,done:j}=Sr(w,hg),C=({id:E})=>{E===_.id&&(this.client.events.off("proposal_expire",C),this.pendingSessions.delete(_.id),this.events.emit(x,{error:{message:hg,code:0}}))};return this.client.events.on("proposal_expire",C),this.events.once(x,({error:E,session:T})=>{this.client.events.off("proposal_expire",C),E?I(E):T&&b(T)}),await this.sendProposeSession({proposal:_,publishOpts:{internal:{throwOnFailedPublish:!0},tvf:{correlationId:_.id}}}),await this.setProposal(_.id,_),{uri:f,approval:j}}),H(this,"pair",async t=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{return await this.client.core.pairing.pair(t)}catch(i){throw this.client.logger.error("pair() failed"),i}}),H(this,"approve",async t=>{var i,r,o;const s=this.client.core.eventClient.createEvent({properties:{topic:(i=t==null?void 0:t.id)==null?void 0:i.toString(),trace:[Vi.session_approve_started]}});try{this.isInitialized(),await this.confirmOnlineStateOrThrow()}catch(L){throw s.setError(Ls.no_internet_connection),L}try{await this.isValidProposalId(t==null?void 0:t.id)}catch(L){throw this.client.logger.error(`approve() -> proposal.get(${t==null?void 0:t.id}) failed`),s.setError(Ls.proposal_not_found),L}try{await this.isValidApprove(t)}catch(L){throw this.client.logger.error("approve() -> isValidApprove() failed"),s.setError(Ls.session_approve_namespace_validation_failure),L}const{id:c,relayProtocol:l,namespaces:h,sessionProperties:d,scopedProperties:f,sessionConfig:m}=t,g=this.client.proposal.get(c);this.client.core.eventClient.deleteEvent({eventId:s.eventId});const{pairingTopic:w,proposer:p,requiredNamespaces:_,optionalNamespaces:x}=g;let I=(r=this.client.core.eventClient)==null?void 0:r.getEvent({topic:w});I||(I=(o=this.client.core.eventClient)==null?void 0:o.createEvent({type:Vi.session_approve_started,properties:{topic:w,trace:[Vi.session_approve_started,Vi.session_namespaces_validation_success]}}));const b=await this.client.core.crypto.generateKeyPair(),j=p.publicKey,C=await this.client.core.crypto.generateSharedKey(b,j),E=ve(ve(ve({relay:{protocol:l??"irn"},namespaces:h,controller:{publicKey:b,metadata:this.client.metadata},expiry:tt(Lo)},d&&{sessionProperties:d}),f&&{scopedProperties:f}),m&&{sessionConfig:m}),T=Pe.relay;I.addTrace(Vi.subscribing_session_topic);try{await this.client.core.relayer.subscribe(C,{transportType:T,internal:{skipSubscribe:!0}})}catch(L){throw I.setError(Ls.subscribe_session_topic_failure),L}I.addTrace(Vi.subscribe_session_topic_success);const O=Ct(ve({},E),{topic:C,requiredNamespaces:_,optionalNamespaces:x,pairingTopic:w,acknowledged:!1,self:E.controller,peer:{publicKey:p.publicKey,metadata:p.metadata},controller:b,transportType:Pe.relay});await this.client.session.set(C,O),I.addTrace(Vi.store_session);try{await this.sendApproveSession({sessionTopic:C,proposal:g,pairingProposalResponse:{relay:{protocol:l??"irn"},responderPublicKey:b},sessionSettleRequest:E,publishOpts:{internal:{throwOnFailedPublish:!0},tvf:{correlationId:c}}}),I.addTrace(Vi.session_approve_publish_success)}catch(L){throw this.client.logger.error(L),this.client.session.delete(C,Fe("USER_DISCONNECTED")),await this.client.core.relayer.unsubscribe(C),L}return this.client.core.eventClient.deleteEvent({eventId:I.eventId}),await this.client.core.pairing.updateMetadata({topic:w,metadata:p.metadata}),await this.deleteProposal(c),await this.client.core.pairing.activate({topic:w}),await this.setExpiry(C,tt(Lo)),{topic:C,acknowledged:()=>Promise.resolve(this.client.session.get(C))}}),H(this,"reject",async t=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidReject(t)}catch(s){throw this.client.logger.error("reject() -> isValidReject() failed"),s}const{id:i,reason:r}=t;let o;try{o=this.client.proposal.get(i).pairingTopic}catch(s){throw this.client.logger.error(`reject() -> proposal.get(${i}) failed`),s}o&&await this.sendError({id:i,topic:o,error:r,rpcOpts:mt.wc_sessionPropose.reject}),await this.deleteProposal(i)}),H(this,"update",async t=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidUpdate(t)}catch(f){throw this.client.logger.error("update() -> isValidUpdate() failed"),f}const{topic:i,namespaces:r}=t,{done:o,resolve:s,reject:c}=Sr(),l=Si(),h=Or().toString(),d=this.client.session.get(i).namespaces;return this.events.once(Ee("session_update",l),({error:f})=>{f?c(f):s()}),await this.client.session.update(i,{namespaces:r}),await this.sendRequest({topic:i,method:"wc_sessionUpdate",params:{namespaces:r},throwOnFailedPublish:!0,clientRpcId:l,relayRpcId:h}).catch(f=>{this.client.logger.error(f),this.client.session.update(i,{namespaces:d}),c(f)}),{acknowledged:o}}),H(this,"extend",async t=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidExtend(t)}catch(l){throw this.client.logger.error("extend() -> isValidExtend() failed"),l}const{topic:i}=t,r=Si(),{done:o,resolve:s,reject:c}=Sr();return this.events.once(Ee("session_extend",r),({error:l})=>{l?c(l):s()}),await this.setExpiry(i,tt(Lo)),this.sendRequest({topic:i,method:"wc_sessionExtend",params:{},clientRpcId:r,throwOnFailedPublish:!0}).catch(l=>{c(l)}),{acknowledged:o}}),H(this,"request",async t=>{this.isInitialized();try{await this.isValidRequest(t)}catch(_){throw this.client.logger.error("request() -> isValidRequest() failed"),_}const{chainId:i,request:r,topic:o,expiry:s=mt.wc_sessionRequest.req.ttl}=t,c=this.client.session.get(o);(c==null?void 0:c.transportType)===Pe.relay&&await this.confirmOnlineStateOrThrow();const l=Si(),h=Or().toString(),{done:d,resolve:f,reject:m}=Sr(s,"Request expired. Please try again.");this.events.once(Ee("session_request",l),({error:_,result:x})=>{_?m(_):f(x)});const g="wc_sessionRequest",w=this.getAppLinkIfEnabled(c.peer.metadata,c.transportType);if(w)return await this.sendRequest({clientRpcId:l,relayRpcId:h,topic:o,method:g,params:{request:Ct(ve({},r),{expiryTimestamp:tt(s)}),chainId:i},expiry:s,throwOnFailedPublish:!0,appLink:w}).catch(_=>m(_)),this.client.events.emit("session_request_sent",{topic:o,request:r,chainId:i,id:l}),await d();const p={request:Ct(ve({},r),{expiryTimestamp:tt(s)}),chainId:i};return await Promise.all([new Promise(async _=>{await this.sendRequest({clientRpcId:l,relayRpcId:h,topic:o,method:g,params:p,expiry:s,throwOnFailedPublish:!0,tvf:this.getTVFParams(l,p)}).catch(x=>m(x)),this.client.events.emit("session_request_sent",{topic:o,request:r,chainId:i,id:l}),_()}),new Promise(async _=>{var x;if(!((x=c.sessionConfig)!=null&&x.disableDeepLink)){const I=await Jv(this.client.core.storage,dg);await Gv({id:l,topic:o,wcDeepLink:I})}_()}),d()]).then(_=>_[2])}),H(this,"respond",async t=>{this.isInitialized(),await this.isValidRespond(t);const{topic:i,response:r}=t,{id:o}=r,s=this.client.session.get(i);s.transportType===Pe.relay&&await this.confirmOnlineStateOrThrow();const c=this.getAppLinkIfEnabled(s.peer.metadata,s.transportType);ui(r)?await this.sendResult({id:o,topic:i,result:r.result,throwOnFailedPublish:!0,appLink:c}):Qn(r)&&await this.sendError({id:o,topic:i,error:r.error,appLink:c}),this.cleanupAfterResponse(t)}),H(this,"ping",async t=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidPing(t)}catch(r){throw this.client.logger.error("ping() -> isValidPing() failed"),r}const{topic:i}=t;if(this.client.session.keys.includes(i)){const r=Si(),o=Or().toString(),{done:s,resolve:c,reject:l}=Sr();this.events.once(Ee("session_ping",r),({error:h})=>{h?l(h):c()}),await Promise.all([this.sendRequest({topic:i,method:"wc_sessionPing",params:{},throwOnFailedPublish:!0,clientRpcId:r,relayRpcId:o}),s()])}else this.client.core.pairing.pairings.keys.includes(i)&&(this.client.logger.warn("ping() on pairing topic is deprecated and will be removed in the next major release."),await this.client.core.pairing.ping({topic:i}))}),H(this,"emit",async t=>{this.isInitialized(),await this.confirmOnlineStateOrThrow(),await this.isValidEmit(t);const{topic:i,event:r,chainId:o}=t,s=Or().toString(),c=Si();await this.sendRequest({topic:i,method:"wc_sessionEvent",params:{event:r,chainId:o},throwOnFailedPublish:!0,relayRpcId:s,clientRpcId:c})}),H(this,"disconnect",async t=>{this.isInitialized(),await this.confirmOnlineStateOrThrow(),await this.isValidDisconnect(t);const{topic:i}=t;if(this.client.session.keys.includes(i))await this.sendRequest({topic:i,method:"wc_sessionDelete",params:Fe("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession({topic:i,emitEvent:!1});else if(this.client.core.pairing.pairings.keys.includes(i))await this.client.core.pairing.disconnect({topic:i});else{const{message:r}=J("MISMATCHED_TOPIC",`Session or pairing topic not found: ${i}`);throw new Error(r)}}),H(this,"find",t=>(this.isInitialized(),this.client.session.getAll().filter(i=>cD(i,t)))),H(this,"getPendingSessionRequests",()=>this.client.pendingRequest.getAll()),H(this,"authenticate",async(t,i)=>{var r;this.isInitialized(),this.isValidAuthenticate(t);const o=i&&this.client.core.linkModeSupportedApps.includes(i)&&((r=this.client.metadata.redirect)==null?void 0:r.linkMode),s=o?Pe.link_mode:Pe.relay;s===Pe.relay&&await this.confirmOnlineStateOrThrow();const{chains:c,statement:l="",uri:h,domain:d,nonce:f,type:m,exp:g,nbf:w,methods:p=[],expiry:_}=t,x=[...t.resources||[]],{topic:I,uri:b}=await this.client.core.pairing.create({methods:["wc_sessionAuthenticate"],transportType:s});this.client.logger.info({message:"Generated new pairing",pairing:{topic:I,uri:b}});const j=await this.client.core.crypto.generateKeyPair(),C=lc(j);if(await Promise.all([this.client.auth.authKeys.set(dc,{responseTopic:C,publicKey:j}),this.client.auth.pairingTopics.set(C,{topic:C,pairingTopic:I})]),await this.client.core.relayer.subscribe(C,{transportType:s}),this.client.logger.info(`sending request to new pairing topic: ${I}`),p.length>0){const{namespace:W}=ac(c[0]);let F=mS(W,"request",p);cc(x)&&(F=yS(F,x.pop())),x.push(F)}const E=_&&_>mt.wc_sessionAuthenticate.req.ttl?_:mt.wc_sessionAuthenticate.req.ttl,T={authPayload:{type:m??"caip122",chains:c,statement:l,aud:h,domain:d,version:"1",nonce:f,iat:new Date().toISOString(),exp:g,nbf:w,resources:x},requester:{publicKey:j,metadata:this.client.metadata},expiryTimestamp:tt(E)},O={eip155:{chains:c,methods:[...new Set(["personal_sign",...p])],events:["chainChanged","accountsChanged"]}},L={requiredNamespaces:{},optionalNamespaces:O,relays:[{protocol:"irn"}],pairingTopic:I,proposer:{publicKey:j,metadata:this.client.metadata},expiryTimestamp:tt(mt.wc_sessionPropose.req.ttl),id:Si()},{done:N,resolve:v,reject:D}=Sr(E,"Request expired"),z=Si(),V=Ee("session_connect",L.id),R=Ee("session_request",z),B=async({error:W,session:F})=>{this.events.off(R,Y),W?D(W):F&&v({session:F})},Y=async W=>{var F,Q,Z;if(await this.deletePendingAuthRequest(z,{message:"fulfilled",code:0}),W.error){const ue=Fe("WC_METHOD_UNSUPPORTED","wc_sessionAuthenticate");return W.error.code===ue.code?void 0:(this.events.off(V,B),D(W.error.message))}await this.deleteProposal(L.id),this.events.off(V,B);const{cacaos:ne,responder:ce}=W.result,q=[],le=[];for(const ue of ne){await lm({cacao:ue,projectId:this.client.core.projectId})||(this.client.logger.error(ue,"Signature verification failed"),D(Fe("SESSION_SETTLEMENT_FAILED","Signature verification failed")));const{p:Ce}=ue,Ue=cc(Ce.resources),Ge=[Vd(Ce.iss)],rt=Uc(Ce.iss);if(Ue){const de=um(Ue),fe=dm(Ue);q.push(...de),Ge.push(...fe)}for(const de of Ge)le.push(`${de}:${rt}`)}const re=await this.client.core.crypto.generateSharedKey(j,ce.publicKey);let oe;q.length>0&&(oe={topic:re,acknowledged:!0,self:{publicKey:j,metadata:this.client.metadata},peer:ce,controller:ce.publicKey,expiry:tt(Lo),requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:I,namespaces:km([...new Set(q)],[...new Set(le)]),transportType:s},await this.client.core.relayer.subscribe(re,{transportType:s}),await this.client.session.set(re,oe),I&&await this.client.core.pairing.updateMetadata({topic:I,metadata:ce.metadata}),oe=this.client.session.get(re)),(F=this.client.metadata.redirect)!=null&&F.linkMode&&(Q=ce.metadata.redirect)!=null&&Q.linkMode&&(Z=ce.metadata.redirect)!=null&&Z.universal&&i&&(this.client.core.addLinkModeSupportedApp(ce.metadata.redirect.universal),this.client.session.update(re,{transportType:Pe.link_mode})),v({auths:ne,session:oe})};this.events.once(V,B),this.events.once(R,Y);let $;try{if(o){const W=$i("wc_sessionAuthenticate",T,z);this.client.core.history.set(I,W);const F=await this.client.core.crypto.encode("",W,{type:La,encoding:Gi});$=Xa(i,I,F)}else await Promise.all([this.sendRequest({topic:I,method:"wc_sessionAuthenticate",params:T,expiry:t.expiry,throwOnFailedPublish:!0,clientRpcId:z}),this.sendRequest({topic:I,method:"wc_sessionPropose",params:L,expiry:mt.wc_sessionPropose.req.ttl,throwOnFailedPublish:!0,clientRpcId:L.id})])}catch(W){throw this.events.off(V,B),this.events.off(R,Y),W}return await this.setProposal(L.id,L),await this.setAuthRequest(z,{request:Ct(ve({},T),{verifyContext:{}}),pairingTopic:I,transportType:s}),{uri:$??b,response:N}}),H(this,"approveSessionAuthenticate",async t=>{const{id:i,auths:r}=t,o=this.client.core.eventClient.createEvent({properties:{topic:i.toString(),trace:[vr.authenticated_session_approve_started]}});try{this.isInitialized()}catch(_){throw o.setError(Es.no_internet_connection),_}const s=this.getPendingAuthRequest(i);if(!s)throw o.setError(Es.authenticated_session_pending_request_not_found),new Error(`Could not find pending auth request with id ${i}`);const c=s.transportType||Pe.relay;c===Pe.relay&&await this.confirmOnlineStateOrThrow();const l=s.requester.publicKey,h=await this.client.core.crypto.generateKeyPair(),d=lc(l),f={type:pi,receiverPublicKey:l,senderPublicKey:h},m=[],g=[];for(const _ of r){if(!await lm({cacao:_,projectId:this.client.core.projectId})){o.setError(Es.invalid_cacao);const C=Fe("SESSION_SETTLEMENT_FAILED","Signature verification failed");throw await this.sendError({id:i,topic:d,error:C,encodeOpts:f}),new Error(C.message)}o.addTrace(vr.cacaos_verified);const{p:x}=_,I=cc(x.resources),b=[Vd(x.iss)],j=Uc(x.iss);if(I){const C=um(I),E=dm(I);m.push(...C),b.push(...E)}for(const C of b)g.push(`${C}:${j}`)}const w=await this.client.core.crypto.generateSharedKey(h,l);o.addTrace(vr.create_authenticated_session_topic);let p;if((m==null?void 0:m.length)>0){p={topic:w,acknowledged:!0,self:{publicKey:h,metadata:this.client.metadata},peer:{publicKey:l,metadata:s.requester.metadata},controller:l,expiry:tt(Lo),authentication:r,requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:s.pairingTopic,namespaces:km([...new Set(m)],[...new Set(g)]),transportType:c},o.addTrace(vr.subscribing_authenticated_session_topic);try{await this.client.core.relayer.subscribe(w,{transportType:c})}catch(_){throw o.setError(Es.subscribe_authenticated_session_topic_failure),_}o.addTrace(vr.subscribe_authenticated_session_topic_success),await this.client.session.set(w,p),o.addTrace(vr.store_authenticated_session),await this.client.core.pairing.updateMetadata({topic:s.pairingTopic,metadata:s.requester.metadata})}o.addTrace(vr.publishing_authenticated_session_approve);try{await this.sendResult({topic:d,id:i,result:{cacaos:r,responder:{publicKey:h,metadata:this.client.metadata}},encodeOpts:f,throwOnFailedPublish:!0,appLink:this.getAppLinkIfEnabled(s.requester.metadata,c)})}catch(_){throw o.setError(Es.authenticated_session_approve_publish_failure),_}return await this.client.auth.requests.delete(i,{message:"fulfilled",code:0}),await this.client.core.pairing.activate({topic:s.pairingTopic}),this.client.core.eventClient.deleteEvent({eventId:o.eventId}),{session:p}}),H(this,"rejectSessionAuthenticate",async t=>{this.isInitialized();const{id:i,reason:r}=t,o=this.getPendingAuthRequest(i);if(!o)throw new Error(`Could not find pending auth request with id ${i}`);o.transportType===Pe.relay&&await this.confirmOnlineStateOrThrow();const s=o.requester.publicKey,c=await this.client.core.crypto.generateKeyPair(),l=lc(s),h={type:pi,receiverPublicKey:s,senderPublicKey:c};await this.sendError({id:i,topic:l,error:r,encodeOpts:h,rpcOpts:mt.wc_sessionAuthenticate.reject,appLink:this.getAppLinkIfEnabled(o.requester.metadata,o.transportType)}),await this.client.auth.requests.delete(i,{message:"rejected",code:0}),await this.deleteProposal(i)}),H(this,"formatAuthMessage",t=>{this.isInitialized();const{request:i,iss:r}=t;return Yw(i,r)}),H(this,"processRelayMessageCache",()=>{setTimeout(async()=>{if(this.relayMessageCache.length!==0)for(;this.relayMessageCache.length>0;)try{const t=this.relayMessageCache.shift();t&&await this.onRelayMessage(t)}catch(t){this.client.logger.error(t)}},50)}),H(this,"cleanupDuplicatePairings",async t=>{if(t.pairingTopic)try{const i=this.client.core.pairing.pairings.get(t.pairingTopic),r=this.client.core.pairing.pairings.getAll().filter(o=>{var s,c;return((s=o.peerMetadata)==null?void 0:s.url)&&((c=o.peerMetadata)==null?void 0:c.url)===t.peer.metadata.url&&o.topic&&o.topic!==i.topic});if(r.length===0)return;this.client.logger.info(`Cleaning up ${r.length} duplicate pairing(s)`),await Promise.all(r.map(o=>this.client.core.pairing.disconnect({topic:o.topic}))),this.client.logger.info("Duplicate pairings clean up finished")}catch(i){this.client.logger.error(i)}}),H(this,"deleteSession",async t=>{var i;const{topic:r,expirerHasDeleted:o=!1,emitEvent:s=!0,id:c=0}=t,{self:l}=this.client.session.get(r);await this.client.core.relayer.unsubscribe(r),await this.client.session.delete(r,Fe("USER_DISCONNECTED")),this.addToRecentlyDeleted(r,"session"),this.client.core.crypto.keychain.has(l.publicKey)&&await this.client.core.crypto.deleteKeyPair(l.publicKey),this.client.core.crypto.keychain.has(r)&&await this.client.core.crypto.deleteSymKey(r),o||this.client.core.expirer.del(r),this.client.core.storage.removeItem(dg).catch(h=>this.client.logger.warn(h)),this.getPendingSessionRequests().forEach(h=>{h.topic===r&&this.deletePendingSessionRequest(h.id,Fe("USER_DISCONNECTED"))}),r===((i=this.sessionRequestQueue.queue[0])==null?void 0:i.topic)&&(this.sessionRequestQueue.state=Yn.idle),s&&this.client.events.emit("session_delete",{id:c,topic:r})}),H(this,"deleteProposal",async(t,i)=>{if(i)try{const r=this.client.proposal.get(t),o=this.client.core.eventClient.getEvent({topic:r.pairingTopic});o==null||o.setError(Ls.proposal_expired)}catch{}await Promise.all([this.client.proposal.delete(t,Fe("USER_DISCONNECTED")),i?Promise.resolve():this.client.core.expirer.del(t)]),this.addToRecentlyDeleted(t,"proposal")}),H(this,"deletePendingSessionRequest",async(t,i,r=!1)=>{await Promise.all([this.client.pendingRequest.delete(t,i),r?Promise.resolve():this.client.core.expirer.del(t)]),this.addToRecentlyDeleted(t,"request"),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter(o=>o.id!==t),r&&(this.sessionRequestQueue.state=Yn.idle,this.client.events.emit("session_request_expire",{id:t}))}),H(this,"deletePendingAuthRequest",async(t,i,r=!1)=>{await Promise.all([this.client.auth.requests.delete(t,i),r?Promise.resolve():this.client.core.expirer.del(t)])}),H(this,"setExpiry",async(t,i)=>{this.client.session.keys.includes(t)&&(this.client.core.expirer.set(t,i),await this.client.session.update(t,{expiry:i}))}),H(this,"setProposal",async(t,i)=>{this.client.core.expirer.set(t,tt(mt.wc_sessionPropose.req.ttl)),await this.client.proposal.set(t,i)}),H(this,"setAuthRequest",async(t,i)=>{const{request:r,pairingTopic:o,transportType:s=Pe.relay}=i;this.client.core.expirer.set(t,r.expiryTimestamp),await this.client.auth.requests.set(t,{authPayload:r.authPayload,requester:r.requester,expiryTimestamp:r.expiryTimestamp,id:t,pairingTopic:o,verifyContext:r.verifyContext,transportType:s})}),H(this,"setPendingSessionRequest",async t=>{const{id:i,topic:r,params:o,verifyContext:s}=t,c=o.request.expiryTimestamp||tt(mt.wc_sessionRequest.req.ttl);this.client.core.expirer.set(i,c),await this.client.pendingRequest.set(i,{id:i,topic:r,params:o,verifyContext:s})}),H(this,"sendRequest",async t=>{const{topic:i,method:r,params:o,expiry:s,relayRpcId:c,clientRpcId:l,throwOnFailedPublish:h,appLink:d,tvf:f,publishOpts:m={}}=t,g=$i(r,o,l);let w;const p=!!d;try{const I=p?Gi:Ft;w=await this.client.core.crypto.encode(i,g,{encoding:I})}catch(I){throw await this.cleanup(),this.client.logger.error(`sendRequest() -> core.crypto.encode() for topic ${i} failed`),I}let _;if(OP.includes(r)){const I=xn(JSON.stringify(g)),b=xn(w);_=await this.client.core.verify.register({id:b,decryptedId:I})}const x=ve(ve({},mt[r].req),m);if(x.attestation=_,s&&(x.ttl=s),c&&(x.id=c),this.client.core.history.set(i,g),p){const I=Xa(d,i,w);await we.Linking.openURL(I,this.client.name)}else x.tvf=Ct(ve({},f),{correlationId:g.id}),h?(x.internal=Ct(ve({},x.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(i,w,x)):this.client.core.relayer.publish(i,w,x).catch(I=>this.client.logger.error(I));return g.id}),H(this,"sendProposeSession",async t=>{const{proposal:i,publishOpts:r}=t,o=$i("wc_sessionPropose",i,i.id);this.client.core.history.set(i.pairingTopic,o);const s=await this.client.core.crypto.encode(i.pairingTopic,o,{encoding:Ft}),c=xn(JSON.stringify(o)),l=xn(s),h=await this.client.core.verify.register({id:l,decryptedId:c});await this.client.core.relayer.publishCustom({payload:{pairingTopic:i.pairingTopic,sessionProposal:s},opts:Ct(ve({},r),{publishMethod:"wc_proposeSession",attestation:h})})}),H(this,"sendApproveSession",async t=>{const{sessionTopic:i,pairingProposalResponse:r,proposal:o,sessionSettleRequest:s,publishOpts:c}=t,l=yc(o.id,r),h=await this.client.core.crypto.encode(o.pairingTopic,l,{encoding:Ft}),d=$i("wc_sessionSettle",s,c==null?void 0:c.id),f=await this.client.core.crypto.encode(i,d,{encoding:Ft});this.client.core.history.set(i,d),await this.client.core.relayer.publishCustom({payload:{sessionTopic:i,pairingTopic:o.pairingTopic,sessionProposalResponse:h,sessionSettlementRequest:f},opts:Ct(ve({},c),{publishMethod:"wc_approveSession"})})}),H(this,"sendResult",async t=>{const{id:i,topic:r,result:o,throwOnFailedPublish:s,encodeOpts:c,appLink:l}=t,h=yc(i,o);let d;const f=l&&typeof(we==null?void 0:we.Linking)<"u";try{const w=f?Gi:Ft;d=await this.client.core.crypto.encode(r,h,Ct(ve({},c||{}),{encoding:w}))}catch(w){throw await this.cleanup(),this.client.logger.error(`sendResult() -> core.crypto.encode() for topic ${r} failed`),w}let m,g;try{m=await this.client.core.history.get(r,i);const w=m.request;try{g=this.getTVFParams(i,w.params,o)}catch(p){this.client.logger.warn(`sendResult() -> getTVFParams() failed: ${p==null?void 0:p.message}`)}}catch(w){throw this.client.logger.error(`sendResult() -> history.get(${r}, ${i}) failed`),w}if(f){const w=Xa(l,r,d);await we.Linking.openURL(w,this.client.name)}else{const w=m.request.method,p=mt[w].res;p.tvf=Ct(ve({},g),{correlationId:i}),s?(p.internal=Ct(ve({},p.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(r,d,p)):this.client.core.relayer.publish(r,d,p).catch(_=>this.client.logger.error(_))}await this.client.core.history.resolve(h)}),H(this,"sendError",async t=>{const{id:i,topic:r,error:o,encodeOpts:s,rpcOpts:c,appLink:l}=t,h=Kg(i,o);let d;const f=l&&typeof(we==null?void 0:we.Linking)<"u";try{const g=f?Gi:Ft;d=await this.client.core.crypto.encode(r,h,Ct(ve({},s||{}),{encoding:g}))}catch(g){throw await this.cleanup(),this.client.logger.error(`sendError() -> core.crypto.encode() for topic ${r} failed`),g}let m;try{m=await this.client.core.history.get(r,i)}catch(g){throw this.client.logger.error(`sendError() -> history.get(${r}, ${i}) failed`),g}if(f){const g=Xa(l,r,d);await we.Linking.openURL(g,this.client.name)}else{const g=m.request.method,w=c||mt[g].res;this.client.core.relayer.publish(r,d,w)}await this.client.core.history.resolve(h)}),H(this,"cleanup",async()=>{const t=[],i=[];this.client.session.getAll().forEach(r=>{let o=!1;Yi(r.expiry)&&(o=!0),this.client.core.crypto.keychain.has(r.topic)||(o=!0),o&&t.push(r.topic)}),this.client.proposal.getAll().forEach(r=>{Yi(r.expiryTimestamp)&&i.push(r.id)}),await Promise.all([...t.map(r=>this.deleteSession({topic:r})),...i.map(r=>this.deleteProposal(r))])}),H(this,"onProviderMessageEvent",async t=>{!this.initialized||this.relayMessageCache.length>0?this.relayMessageCache.push(t):await this.onRelayMessage(t)}),H(this,"onRelayEventRequest",async t=>{this.requestQueue.queue.push(t),await this.processRequestsQueue()}),H(this,"processRequestsQueue",async()=>{if(this.requestQueue.state===Yn.active){this.client.logger.info("Request queue already active, skipping...");return}for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=Yn.active;const t=this.requestQueue.queue.shift();if(t)try{await this.processRequest(t)}catch(i){this.client.logger.warn(i)}}this.requestQueue.state=Yn.idle}),H(this,"processRequest",async t=>{const{topic:i,payload:r,attestation:o,transportType:s,encryptedId:c}=t,l=r.method;if(!this.shouldIgnorePairingRequest({topic:i,requestMethod:l}))switch(l){case"wc_sessionPropose":return await this.onSessionProposeRequest({topic:i,payload:r,attestation:o,encryptedId:c});case"wc_sessionSettle":return await this.onSessionSettleRequest(i,r);case"wc_sessionUpdate":return await this.onSessionUpdateRequest(i,r);case"wc_sessionExtend":return await this.onSessionExtendRequest(i,r);case"wc_sessionPing":return await this.onSessionPingRequest(i,r);case"wc_sessionDelete":return await this.onSessionDeleteRequest(i,r);case"wc_sessionRequest":return await this.onSessionRequest({topic:i,payload:r,attestation:o,encryptedId:c,transportType:s});case"wc_sessionEvent":return await this.onSessionEventRequest(i,r);case"wc_sessionAuthenticate":return await this.onSessionAuthenticateRequest({topic:i,payload:r,attestation:o,encryptedId:c,transportType:s});default:return this.client.logger.info(`Unsupported request method ${l}`)}}),H(this,"onRelayEventResponse",async t=>{const{topic:i,payload:r,transportType:o}=t,s=(await this.client.core.history.get(i,r.id)).request.method;switch(s){case"wc_sessionPropose":return this.onSessionProposeResponse(i,r,o);case"wc_sessionSettle":return this.onSessionSettleResponse(i,r);case"wc_sessionUpdate":return this.onSessionUpdateResponse(i,r);case"wc_sessionExtend":return this.onSessionExtendResponse(i,r);case"wc_sessionPing":return this.onSessionPingResponse(i,r);case"wc_sessionRequest":return this.onSessionRequestResponse(i,r);case"wc_sessionAuthenticate":return this.onSessionAuthenticateResponse(i,r);default:return this.client.logger.info(`Unsupported response method ${s}`)}}),H(this,"onRelayEventUnknownPayload",t=>{const{topic:i}=t,{message:r}=J("MISSING_OR_INVALID",`Decoded payload on topic ${i} is not identifiable as a JSON-RPC request or a response.`);throw new Error(r)}),H(this,"shouldIgnorePairingRequest",t=>{const{topic:i,requestMethod:r}=t,o=this.expectedPairingMethodMap.get(i);return!o||o.includes(r)?!1:!!(o.includes("wc_sessionAuthenticate")&&this.client.events.listenerCount("session_authenticate")>0)}),H(this,"onSessionProposeRequest",async t=>{const{topic:i,payload:r,attestation:o,encryptedId:s}=t,{params:c,id:l}=r;try{const h=this.client.core.eventClient.getEvent({topic:i});this.client.events.listenerCount("session_proposal")===0&&(console.warn("No listener for session_proposal event"),h==null||h.setError(fi.proposal_listener_not_found)),this.isValidConnect(ve({},r.params));const d=c.expiryTimestamp||tt(mt.wc_sessionPropose.req.ttl),f=ve({id:l,pairingTopic:i,expiryTimestamp:d,attestation:o,encryptedId:s},c);await this.setProposal(l,f);const m=await this.getVerifyContext({attestationId:o,hash:xn(JSON.stringify(r)),encryptedId:s,metadata:f.proposer.metadata});h==null||h.addTrace(Fn.emit_session_proposal),this.client.events.emit("session_proposal",{id:l,params:f,verifyContext:m})}catch(h){await this.sendError({id:l,topic:i,error:h,rpcOpts:mt.wc_sessionPropose.autoReject}),this.client.logger.error(h)}}),H(this,"onSessionProposeResponse",async(t,i,r)=>{const{id:o}=i;if(ui(i)){const{result:s}=i;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:s});const c=this.client.proposal.get(o);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:c});const l=c.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:l});const h=s.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:h});const d=await this.client.core.crypto.generateSharedKey(l,h);this.pendingSessions.set(o,{sessionTopic:d,pairingTopic:t,proposalId:o,publicKey:l});const f=await this.client.core.relayer.subscribe(d,{transportType:r});this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:f}),await this.client.core.pairing.activate({topic:t})}else if(Qn(i)){await this.deleteProposal(o);const s=Ee("session_connect",o);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners, 954`);this.events.emit(s,{error:i.error})}}),H(this,"onSessionSettleRequest",async(t,i)=>{const{id:r,params:o}=i;try{this.isValidSessionSettleRequest(o);const{relay:s,controller:c,expiry:l,namespaces:h,sessionProperties:d,scopedProperties:f,sessionConfig:m}=i.params,g=[...this.pendingSessions.values()].find(_=>_.sessionTopic===t);if(!g)return this.client.logger.error(`Pending session not found for topic ${t}`);const w=this.client.proposal.get(g.proposalId),p=Ct(ve(ve(ve({topic:t,relay:s,expiry:l,namespaces:h,acknowledged:!0,pairingTopic:g.pairingTopic,requiredNamespaces:w.requiredNamespaces,optionalNamespaces:w.optionalNamespaces,controller:c.publicKey,self:{publicKey:g.publicKey,metadata:this.client.metadata},peer:{publicKey:c.publicKey,metadata:c.metadata}},d&&{sessionProperties:d}),f&&{scopedProperties:f}),m&&{sessionConfig:m}),{transportType:Pe.relay});await this.client.session.set(p.topic,p),await this.setExpiry(p.topic,p.expiry),await this.client.core.pairing.updateMetadata({topic:g.pairingTopic,metadata:p.peer.metadata}),this.client.events.emit("session_connect",{session:p}),this.events.emit(Ee("session_connect",g.proposalId),{session:p}),this.pendingSessions.delete(g.proposalId),this.deleteProposal(g.proposalId,!1),this.cleanupDuplicatePairings(p),await this.sendResult({id:i.id,topic:t,result:!0})}catch(s){await this.sendError({id:r,topic:t,error:s}),this.client.logger.error(s)}}),H(this,"onSessionSettleResponse",async(t,i)=>{const{id:r}=i;ui(i)?(await this.client.session.update(t,{acknowledged:!0}),this.events.emit(Ee("session_approve",r),{})):Qn(i)&&(await this.client.session.delete(t,Fe("USER_DISCONNECTED")),this.events.emit(Ee("session_approve",r),{error:i.error}))}),H(this,"onSessionUpdateRequest",async(t,i)=>{const{params:r,id:o}=i;try{const s=`${t}_session_update`,c=Cs.get(s);if(c&&this.isRequestOutOfSync(c,o)){this.client.logger.warn(`Discarding out of sync request - ${o}`),this.sendError({id:o,topic:t,error:Fe("INVALID_UPDATE_REQUEST")});return}this.isValidUpdate(ve({topic:t},r));try{Cs.set(s,o),await this.client.session.update(t,{namespaces:r.namespaces}),await this.sendResult({id:o,topic:t,result:!0})}catch(l){throw Cs.delete(s),l}this.client.events.emit("session_update",{id:o,topic:t,params:r})}catch(s){await this.sendError({id:o,topic:t,error:s}),this.client.logger.error(s)}}),H(this,"isRequestOutOfSync",(t,i)=>i.toString().slice(0,-3)<t.toString().slice(0,-3)),H(this,"onSessionUpdateResponse",(t,i)=>{const{id:r}=i,o=Ee("session_update",r);if(this.events.listenerCount(o)===0)throw new Error(`emitting ${o} without any listeners`);ui(i)?this.events.emit(Ee("session_update",r),{}):Qn(i)&&this.events.emit(Ee("session_update",r),{error:i.error})}),H(this,"onSessionExtendRequest",async(t,i)=>{const{id:r}=i;try{this.isValidExtend({topic:t}),await this.setExpiry(t,tt(Lo)),await this.sendResult({id:r,topic:t,result:!0}),this.client.events.emit("session_extend",{id:r,topic:t})}catch(o){await this.sendError({id:r,topic:t,error:o}),this.client.logger.error(o)}}),H(this,"onSessionExtendResponse",(t,i)=>{const{id:r}=i,o=Ee("session_extend",r);if(this.events.listenerCount(o)===0)throw new Error(`emitting ${o} without any listeners`);ui(i)?this.events.emit(Ee("session_extend",r),{}):Qn(i)&&this.events.emit(Ee("session_extend",r),{error:i.error})}),H(this,"onSessionPingRequest",async(t,i)=>{const{id:r}=i;try{this.isValidPing({topic:t}),await this.sendResult({id:r,topic:t,result:!0,throwOnFailedPublish:!0}),this.client.events.emit("session_ping",{id:r,topic:t})}catch(o){await this.sendError({id:r,topic:t,error:o}),this.client.logger.error(o)}}),H(this,"onSessionPingResponse",(t,i)=>{const{id:r}=i,o=Ee("session_ping",r);setTimeout(()=>{if(this.events.listenerCount(o)===0)throw new Error(`emitting ${o} without any listeners 2176`);ui(i)?this.events.emit(Ee("session_ping",r),{}):Qn(i)&&this.events.emit(Ee("session_ping",r),{error:i.error})},500)}),H(this,"onSessionDeleteRequest",async(t,i)=>{const{id:r}=i;try{this.isValidDisconnect({topic:t,reason:i.params}),await Promise.all([new Promise(o=>{this.client.core.relayer.once(Ze.publish,async()=>{o(await this.deleteSession({topic:t,id:r}))})}),this.sendResult({id:r,topic:t,result:!0}),this.cleanupPendingSentRequestsForTopic({topic:t,error:Fe("USER_DISCONNECTED")})]).catch(o=>this.client.logger.error(o))}catch(o){this.client.logger.error(o)}}),H(this,"onSessionRequest",async t=>{var i,r,o;const{topic:s,payload:c,attestation:l,encryptedId:h,transportType:d}=t,{id:f,params:m}=c;try{await this.isValidRequest(ve({topic:s},m));const g=this.client.session.get(s),w=await this.getVerifyContext({attestationId:l,hash:xn(JSON.stringify($i("wc_sessionRequest",m,f))),encryptedId:h,metadata:g.peer.metadata,transportType:d}),p={id:f,topic:s,params:m,verifyContext:w};await this.setPendingSessionRequest(p),d===Pe.link_mode&&(i=g.peer.metadata.redirect)!=null&&i.universal&&this.client.core.addLinkModeSupportedApp((r=g.peer.metadata.redirect)==null?void 0:r.universal),(o=this.client.signConfig)!=null&&o.disableRequestQueue?this.emitSessionRequest(p):(this.addSessionRequestToSessionRequestQueue(p),this.processSessionRequestQueue())}catch(g){await this.sendError({id:f,topic:s,error:g}),this.client.logger.error(g)}}),H(this,"onSessionRequestResponse",(t,i)=>{const{id:r}=i,o=Ee("session_request",r);if(this.events.listenerCount(o)===0)throw new Error(`emitting ${o} without any listeners`);ui(i)?this.events.emit(Ee("session_request",r),{result:i.result}):Qn(i)&&this.events.emit(Ee("session_request",r),{error:i.error})}),H(this,"onSessionEventRequest",async(t,i)=>{const{id:r,params:o}=i;try{const s=`${t}_session_event_${o.event.name}`,c=Cs.get(s);if(c&&this.isRequestOutOfSync(c,r)){this.client.logger.info(`Discarding out of sync request - ${r}`);return}this.isValidEmit(ve({topic:t},o)),this.client.events.emit("session_event",{id:r,topic:t,params:o}),Cs.set(s,r)}catch(s){await this.sendError({id:r,topic:t,error:s}),this.client.logger.error(s)}}),H(this,"onSessionAuthenticateResponse",(t,i)=>{const{id:r}=i;this.client.logger.trace({type:"method",method:"onSessionAuthenticateResponse",topic:t,payload:i}),ui(i)?this.events.emit(Ee("session_request",r),{result:i.result}):Qn(i)&&this.events.emit(Ee("session_request",r),{error:i.error})}),H(this,"onSessionAuthenticateRequest",async t=>{var i;const{topic:r,payload:o,attestation:s,encryptedId:c,transportType:l}=t;try{const{requester:h,authPayload:d,expiryTimestamp:f}=o.params,m=await this.getVerifyContext({attestationId:s,hash:xn(JSON.stringify(o)),encryptedId:c,metadata:h.metadata,transportType:l}),g={requester:h,pairingTopic:r,id:o.id,authPayload:d,verifyContext:m,expiryTimestamp:f};await this.setAuthRequest(o.id,{request:g,pairingTopic:r,transportType:l}),l===Pe.link_mode&&(i=h.metadata.redirect)!=null&&i.universal&&this.client.core.addLinkModeSupportedApp(h.metadata.redirect.universal),this.client.events.emit("session_authenticate",{topic:r,params:o.params,id:o.id,verifyContext:m})}catch(h){this.client.logger.error(h);const d=o.params.requester.publicKey,f=await this.client.core.crypto.generateKeyPair(),m=this.getAppLinkIfEnabled(o.params.requester.metadata,l),g={type:pi,receiverPublicKey:d,senderPublicKey:f};await this.sendError({id:o.id,topic:r,error:h,encodeOpts:g,rpcOpts:mt.wc_sessionAuthenticate.autoReject,appLink:m})}}),H(this,"addSessionRequestToSessionRequestQueue",t=>{this.sessionRequestQueue.queue.push(t)}),H(this,"cleanupAfterResponse",t=>{this.deletePendingSessionRequest(t.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=Yn.idle,this.processSessionRequestQueue()},ee.toMiliseconds(this.requestQueueDelay))}),H(this,"cleanupPendingSentRequestsForTopic",({topic:t,error:i})=>{const r=this.client.core.history.pending;r.length>0&&r.filter(o=>o.topic===t&&o.request.method==="wc_sessionRequest").forEach(o=>{const s=o.request.id,c=Ee("session_request",s);if(this.events.listenerCount(c)===0)throw new Error(`emitting ${c} without any listeners`);this.events.emit(Ee("session_request",o.request.id),{error:i})})}),H(this,"processSessionRequestQueue",()=>{if(this.sessionRequestQueue.state===Yn.active){this.client.logger.info("session request queue is already active.");return}const t=this.sessionRequestQueue.queue[0];if(!t){this.client.logger.info("session request queue is empty.");return}try{this.emitSessionRequest(t)}catch(i){this.client.logger.error(i)}}),H(this,"emitSessionRequest",t=>{if(this.emittedSessionRequests.has(t.id)){this.client.logger.warn({id:t.id},`Skipping emitting \`session_request\` event for duplicate request. id: ${t.id}`);return}this.sessionRequestQueue.state=Yn.active,this.emittedSessionRequests.add(t.id),this.client.events.emit("session_request",t)}),H(this,"onPairingCreated",t=>{if(t.methods&&this.expectedPairingMethodMap.set(t.topic,t.methods),t.active)return;const i=this.client.proposal.getAll().find(r=>r.pairingTopic===t.topic);i&&this.onSessionProposeRequest({topic:t.topic,payload:$i("wc_sessionPropose",Ct(ve({},i),{requiredNamespaces:i.requiredNamespaces,optionalNamespaces:i.optionalNamespaces,relays:i.relays,proposer:i.proposer,sessionProperties:i.sessionProperties,scopedProperties:i.scopedProperties}),i.id),attestation:i.attestation,encryptedId:i.encryptedId})}),H(this,"isValidConnect",async t=>{if(!Ut(t)){const{message:h}=J("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(t)}`);throw new Error(h)}const{pairingTopic:i,requiredNamespaces:r,optionalNamespaces:o,sessionProperties:s,scopedProperties:c,relays:l}=t;if(nt(i)||await this.isValidPairingTopic(i),!xD(l)){const{message:h}=J("MISSING_OR_INVALID",`connect() relays: ${l}`);throw new Error(h)}if(!nt(r)&&ra(r)!==0){const h="requiredNamespaces are deprecated and are automatically assigned to optionalNamespaces";["fatal","error","silent"].includes(this.client.logger.level)?console.warn(h):this.client.logger.warn(h),this.validateNamespaces(r,"requiredNamespaces")}if(!nt(o)&&ra(o)!==0&&this.validateNamespaces(o,"optionalNamespaces"),nt(s)||this.validateSessionProps(s,"sessionProperties"),!nt(c)){this.validateSessionProps(c,"scopedProperties");const h=Object.keys(r||{}).concat(Object.keys(o||{}));if(!Object.keys(c).every(d=>h.includes(d.split(":")[0])))throw new Error(`Scoped properties must be a subset of required/optional namespaces, received: ${JSON.stringify(c)}, required/optional namespaces: ${JSON.stringify(h)}`)}}),H(this,"validateNamespaces",(t,i)=>{const r=_D(t,"connect()",i);if(r)throw new Error(r.message)}),H(this,"isValidApprove",async t=>{if(!Ut(t))throw new Error(J("MISSING_OR_INVALID",`approve() params: ${t}`).message);const{id:i,namespaces:r,relayProtocol:o,sessionProperties:s,scopedProperties:c}=t;this.checkRecentlyDeleted(i),await this.isValidProposalId(i);const l=this.client.proposal.get(i),h=bu(r,"approve()");if(h)throw new Error(h.message);const d=Rm(l.requiredNamespaces,r,"approve()");if(d)throw new Error(d.message);if(!Xe(o,!0)){const{message:f}=J("MISSING_OR_INVALID",`approve() relayProtocol: ${o}`);throw new Error(f)}if(nt(s)||this.validateSessionProps(s,"sessionProperties"),!nt(c)){this.validateSessionProps(c,"scopedProperties");const f=new Set(Object.keys(r));if(!Object.keys(c).every(m=>f.has(m.split(":")[0])))throw new Error(`Scoped properties must be a subset of approved namespaces, received: ${JSON.stringify(c)}, approved namespaces: ${Array.from(f).join(", ")}`)}}),H(this,"isValidReject",async t=>{if(!Ut(t)){const{message:o}=J("MISSING_OR_INVALID",`reject() params: ${t}`);throw new Error(o)}const{id:i,reason:r}=t;if(this.checkRecentlyDeleted(i),await this.isValidProposalId(i),!ID(r)){const{message:o}=J("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(r)}`);throw new Error(o)}}),H(this,"isValidSessionSettleRequest",t=>{if(!Ut(t)){const{message:h}=J("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${t}`);throw new Error(h)}const{relay:i,controller:r,namespaces:o,expiry:s}=t;if(!I5(i)){const{message:h}=J("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(h)}const c=fD(r,"onSessionSettleRequest()");if(c)throw new Error(c.message);const l=bu(o,"onSessionSettleRequest()");if(l)throw new Error(l.message);if(Yi(s)){const{message:h}=J("EXPIRED","onSessionSettleRequest()");throw new Error(h)}}),H(this,"isValidUpdate",async t=>{if(!Ut(t)){const{message:l}=J("MISSING_OR_INVALID",`update() params: ${t}`);throw new Error(l)}const{topic:i,namespaces:r}=t;this.checkRecentlyDeleted(i),await this.isValidSessionTopic(i);const o=this.client.session.get(i),s=bu(r,"update()");if(s)throw new Error(s.message);const c=Rm(o.requiredNamespaces,r,"update()");if(c)throw new Error(c.message)}),H(this,"isValidExtend",async t=>{if(!Ut(t)){const{message:r}=J("MISSING_OR_INVALID",`extend() params: ${t}`);throw new Error(r)}const{topic:i}=t;this.checkRecentlyDeleted(i),await this.isValidSessionTopic(i)}),H(this,"isValidRequest",async t=>{if(!Ut(t)){const{message:l}=J("MISSING_OR_INVALID",`request() params: ${t}`);throw new Error(l)}const{topic:i,request:r,chainId:o,expiry:s}=t;this.checkRecentlyDeleted(i),await this.isValidSessionTopic(i);const{namespaces:c}=this.client.session.get(i);if(!Pm(c,o)){const{message:l}=J("MISSING_OR_INVALID",`request() chainId: ${o}`);throw new Error(l)}if(!bD(r)){const{message:l}=J("MISSING_OR_INVALID",`request() ${JSON.stringify(r)}`);throw new Error(l)}if(!LD(c,o,r.method)){const{message:l}=J("MISSING_OR_INVALID",`request() method: ${r.method}`);throw new Error(l)}if(s&&!ND(s,vu)){const{message:l}=J("MISSING_OR_INVALID",`request() expiry: ${s}. Expiry must be a number (in seconds) between ${vu.min} and ${vu.max}`);throw new Error(l)}}),H(this,"isValidRespond",async t=>{var i;if(!Ut(t)){const{message:s}=J("MISSING_OR_INVALID",`respond() params: ${t}`);throw new Error(s)}const{topic:r,response:o}=t;try{await this.isValidSessionTopic(r)}catch(s){throw(i=t==null?void 0:t.response)!=null&&i.id&&this.cleanupAfterResponse(t),s}if(!CD(o)){const{message:s}=J("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(o)}`);throw new Error(s)}}),H(this,"isValidPing",async t=>{if(!Ut(t)){const{message:r}=J("MISSING_OR_INVALID",`ping() params: ${t}`);throw new Error(r)}const{topic:i}=t;await this.isValidSessionOrPairingTopic(i)}),H(this,"isValidEmit",async t=>{if(!Ut(t)){const{message:c}=J("MISSING_OR_INVALID",`emit() params: ${t}`);throw new Error(c)}const{topic:i,event:r,chainId:o}=t;await this.isValidSessionTopic(i);const{namespaces:s}=this.client.session.get(i);if(!Pm(s,o)){const{message:c}=J("MISSING_OR_INVALID",`emit() chainId: ${o}`);throw new Error(c)}if(!jD(r)){const{message:c}=J("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(r)}`);throw new Error(c)}if(!ED(s,o,r.name)){const{message:c}=J("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(r)}`);throw new Error(c)}}),H(this,"isValidDisconnect",async t=>{if(!Ut(t)){const{message:r}=J("MISSING_OR_INVALID",`disconnect() params: ${t}`);throw new Error(r)}const{topic:i}=t;await this.isValidSessionOrPairingTopic(i)}),H(this,"isValidAuthenticate",t=>{const{chains:i,uri:r,domain:o,nonce:s}=t;if(!Array.isArray(i)||i.length===0)throw new Error("chains is required and must be a non-empty array");if(!Xe(r,!1))throw new Error("uri is required parameter");if(!Xe(o,!1))throw new Error("domain is required parameter");if(!Xe(s,!1))throw new Error("nonce is required parameter");if([...new Set(i.map(l=>ac(l).namespace))].length>1)throw new Error("Multi-namespace requests are not supported. Please request single namespace only.");const{namespace:c}=ac(i[0]);if(c!=="eip155")throw new Error("Only eip155 namespace is supported for authenticated sessions. Please use .connect() for non-eip155 chains.")}),H(this,"getVerifyContext",async t=>{const{attestationId:i,hash:r,encryptedId:o,metadata:s,transportType:c}=t,l={verified:{verifyUrl:s.verifyUrl||Vs,validation:"UNKNOWN",origin:s.url||""}};try{if(c===Pe.link_mode){const d=this.getAppLinkIfEnabled(s,c);return l.verified.validation=d&&new URL(d).origin===new URL(s.url).origin?"VALID":"INVALID",l}const h=await this.client.core.verify.resolve({attestationId:i,hash:r,encryptedId:o,verifyUrl:s.verifyUrl});h&&(l.verified.origin=h.origin,l.verified.isScam=h.isScam,l.verified.validation=h.origin===new URL(s.url).origin?"VALID":"INVALID")}catch(h){this.client.logger.warn(h)}return this.client.logger.debug(`Verify context: ${JSON.stringify(l)}`),l}),H(this,"validateSessionProps",(t,i)=>{Object.values(t).forEach((r,o)=>{if(r==null){const{message:s}=J("MISSING_OR_INVALID",`${i} must contain an existing value for each key. Received: ${r} for key ${Object.keys(t)[o]}`);throw new Error(s)}})}),H(this,"getPendingAuthRequest",t=>{const i=this.client.auth.requests.get(t);return typeof i=="object"?i:void 0}),H(this,"addToRecentlyDeleted",(t,i)=>{if(this.recentlyDeletedMap.set(t,i),this.recentlyDeletedMap.size>=this.recentlyDeletedLimit){let r=0;const o=this.recentlyDeletedLimit/2;for(const s of this.recentlyDeletedMap.keys()){if(r++>=o)break;this.recentlyDeletedMap.delete(s)}}}),H(this,"checkRecentlyDeleted",t=>{const i=this.recentlyDeletedMap.get(t);if(i){const{message:r}=J("MISSING_OR_INVALID",`Record was recently deleted - ${i}: ${t}`);throw new Error(r)}}),H(this,"isLinkModeEnabled",(t,i)=>{var r,o,s,c,l,h,d,f,m;return!t||i!==Pe.link_mode?!1:((o=(r=this.client.metadata)==null?void 0:r.redirect)==null?void 0:o.linkMode)===!0&&((c=(s=this.client.metadata)==null?void 0:s.redirect)==null?void 0:c.universal)!==void 0&&((h=(l=this.client.metadata)==null?void 0:l.redirect)==null?void 0:h.universal)!==""&&((d=t==null?void 0:t.redirect)==null?void 0:d.universal)!==void 0&&((f=t==null?void 0:t.redirect)==null?void 0:f.universal)!==""&&((m=t==null?void 0:t.redirect)==null?void 0:m.linkMode)===!0&&this.client.core.linkModeSupportedApps.includes(t.redirect.universal)&&typeof(we==null?void 0:we.Linking)<"u"}),H(this,"getAppLinkIfEnabled",(t,i)=>{var r;return this.isLinkModeEnabled(t,i)?(r=t==null?void 0:t.redirect)==null?void 0:r.universal:void 0}),H(this,"handleLinkModeMessage",({url:t})=>{if(!t||!t.includes("wc_ev")||!t.includes("topic"))return;const i=Kf(t,"topic")||"",r=decodeURIComponent(Kf(t,"wc_ev")||""),o=this.client.session.keys.includes(i);o&&this.client.session.update(i,{transportType:Pe.link_mode}),this.client.core.dispatchEnvelope({topic:i,message:r,sessionExists:o})}),H(this,"registerLinkModeListeners",async()=>{var t;if(B0()||Lr()&&(t=this.client.metadata.redirect)!=null&&t.linkMode){const i=we==null?void 0:we.Linking;if(typeof i<"u"){i.addEventListener("url",this.handleLinkModeMessage,this.client.name);const r=await i.getInitialURL();r&&setTimeout(()=>{this.handleLinkModeMessage({url:r})},50)}}}),H(this,"getTVFParams",(t,i,r)=>{var o,s,c;if(!((o=i.request)!=null&&o.method))return{};const l={correlationId:t,rpcMethods:[i.request.method],chainId:i.chainId};try{const h=this.extractTxHashesFromResult(i.request,r);l.txHashes=h,l.contractAddresses=this.isValidContractData(i.request.params)?[(c=(s=i.request.params)==null?void 0:s[0])==null?void 0:c.to]:[]}catch(h){this.client.logger.warn("Error getting TVF params",h)}return l}),H(this,"isValidContractData",t=>{var i;if(!t)return!1;try{const r=(t==null?void 0:t.data)||((i=t==null?void 0:t[0])==null?void 0:i.data);if(!r.startsWith("0x"))return!1;const o=r.slice(2);return/^[0-9a-fA-F]*$/.test(o)?o.length%2===0:!1}catch{}return!1}),H(this,"extractTxHashesFromResult",(t,i)=>{var r;try{if(!i)return[];const o=t.method,s=AP[o];if(o==="sui_signTransaction")return[JN(i.transactionBytes)];if(o==="near_signTransaction")return[om(i)];if(o==="near_signTransactions")return i.map(l=>om(l));if(o==="xrpl_signTransactionFor"||o==="xrpl_signTransaction")return[(r=i.tx_json)==null?void 0:r.hash];if(o==="polkadot_signTransaction")return[FD({transaction:t.params.transactionPayload,signature:i.signature})];if(o==="algo_signTxn")return ts(i)?i.map(l=>sm(l)):[sm(i)];if(o==="cosmos_signDirect")return[eS(i)];if(typeof i=="string")return[i];const c=i[s.key];if(ts(c))return o==="solana_signAllTransactions"?c.map(l=>KN(l)):c;if(typeof c=="string")return[c]}catch(o){this.client.logger.warn("Error extracting tx hashes from result",o)}return[]})}async processPendingMessageEvents(){try{const n=this.client.session.keys,t=this.client.core.relayer.messages.getWithoutAck(n);for(const[i,r]of Object.entries(t))for(const o of r)try{await this.onProviderMessageEvent({topic:i,message:o,publishedAt:Date.now()})}catch{this.client.logger.warn(`Error processing pending message event for topic: ${i}, message: ${o}`)}}catch(n){this.client.logger.warn("processPendingMessageEvents failed",n)}}isInitialized(){if(!this.initialized){const{message:n}=J("NOT_INITIALIZED",this.name);throw new Error(n)}}async confirmOnlineStateOrThrow(){await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(Ze.message,n=>{this.onProviderMessageEvent(n)})}async onRelayMessage(n){const{topic:t,message:i,attestation:r,transportType:o}=n,{publicKey:s}=this.client.auth.authKeys.keys.includes(dc)?this.client.auth.authKeys.get(dc):{publicKey:void 0};try{const c=await this.client.core.crypto.decode(t,i,{receiverPublicKey:s,encoding:o===Pe.link_mode?Gi:Ft});wh(c)?(this.client.core.history.set(t,c),await this.onRelayEventRequest({topic:t,payload:c,attestation:r,transportType:o,encryptedId:xn(i)})):_h(c)?(await this.client.core.history.resolve(c),await this.onRelayEventResponse({topic:t,payload:c,transportType:o}),this.client.core.history.delete(t,c.id)):await this.onRelayEventUnknownPayload({topic:t,payload:c,transportType:o}),await this.client.core.relayer.messages.ack(t,i)}catch(c){this.client.logger.error(c)}}registerExpirerEvents(){this.client.core.expirer.on(yn.expired,async n=>{const{topic:t,id:i}=vw(n.target);if(i&&this.client.pendingRequest.keys.includes(i))return await this.deletePendingSessionRequest(i,J("EXPIRED"),!0);if(i&&this.client.auth.requests.keys.includes(i))return await this.deletePendingAuthRequest(i,J("EXPIRED"),!0);t?this.client.session.keys.includes(t)&&(await this.deleteSession({topic:t,expirerHasDeleted:!0}),this.client.events.emit("session_expire",{topic:t})):i&&(await this.deleteProposal(i,!0),this.client.events.emit("proposal_expire",{id:i}))})}registerPairingEvents(){this.client.core.pairing.events.on(Dr.create,n=>this.onPairingCreated(n)),this.client.core.pairing.events.on(Dr.delete,n=>{this.addToRecentlyDeleted(n.topic,"pairing")})}isValidPairingTopic(n){if(!Xe(n,!1)){const{message:t}=J("MISSING_OR_INVALID",`pairing topic should be a string: ${n}`);throw new Error(t)}if(!this.client.core.pairing.pairings.keys.includes(n)){const{message:t}=J("NO_MATCHING_KEY",`pairing topic doesn't exist: ${n}`);throw new Error(t)}if(Yi(this.client.core.pairing.pairings.get(n).expiry)){const{message:t}=J("EXPIRED",`pairing topic: ${n}`);throw new Error(t)}}async isValidSessionTopic(n){if(!Xe(n,!1)){const{message:t}=J("MISSING_OR_INVALID",`session topic should be a string: ${n}`);throw new Error(t)}if(this.checkRecentlyDeleted(n),!this.client.session.keys.includes(n)){const{message:t}=J("NO_MATCHING_KEY",`session topic doesn't exist: ${n}`);throw new Error(t)}if(Yi(this.client.session.get(n).expiry)){await this.deleteSession({topic:n});const{message:t}=J("EXPIRED",`session topic: ${n}`);throw new Error(t)}if(!this.client.core.crypto.keychain.has(n)){const{message:t}=J("MISSING_OR_INVALID",`session topic does not exist in keychain: ${n}`);throw await this.deleteSession({topic:n}),new Error(t)}}async isValidSessionOrPairingTopic(n){if(this.checkRecentlyDeleted(n),this.client.session.keys.includes(n))await this.isValidSessionTopic(n);else if(this.client.core.pairing.pairings.keys.includes(n))this.isValidPairingTopic(n);else if(Xe(n,!1)){const{message:t}=J("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${n}`);throw new Error(t)}else{const{message:t}=J("MISSING_OR_INVALID",`session or pairing topic should be a string: ${n}`);throw new Error(t)}}async isValidProposalId(n){if(!MD(n)){const{message:t}=J("MISSING_OR_INVALID",`proposal id should be a number: ${n}`);throw new Error(t)}if(!this.client.proposal.keys.includes(n)){const{message:t}=J("NO_MATCHING_KEY",`proposal id doesn't exist: ${n}`);throw new Error(t)}if(Yi(this.client.proposal.get(n).expiryTimestamp)){await this.deleteProposal(n);const{message:t}=J("EXPIRED",`proposal id: ${n}`);throw new Error(t)}}}class QP extends mo{constructor(n,t){super(n,t,vP,n1),this.core=n,this.logger=t}}class HP extends mo{constructor(n,t){super(n,t,NP,n1),this.core=n,this.logger=t}}class ZP extends mo{constructor(n,t){super(n,t,DP,n1,i=>i.id),this.core=n,this.logger=t}}class GP extends mo{constructor(n,t){super(n,t,PP,Ol,()=>dc),this.core=n,this.logger=t}}class qP extends mo{constructor(n,t){super(n,t,RP,Ol),this.core=n,this.logger=t}}class KP extends mo{constructor(n,t){super(n,t,VP,Ol,i=>i.id),this.core=n,this.logger=t}}var JP=Object.defineProperty,XP=(e,n,t)=>n in e?JP(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Nu=(e,n,t)=>XP(e,typeof n!="symbol"?n+"":n,t);class eR{constructor(n,t){this.core=n,this.logger=t,Nu(this,"authKeys"),Nu(this,"pairingTopics"),Nu(this,"requests"),this.authKeys=new GP(this.core,this.logger),this.pairingTopics=new qP(this.core,this.logger),this.requests=new KP(this.core,this.logger)}async init(){await this.authKeys.init(),await this.pairingTopics.init(),await this.requests.init()}}var tR=Object.defineProperty,nR=(e,n,t)=>n in e?tR(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Ie=(e,n,t)=>nR(e,typeof n!="symbol"?n+"":n,t);class i1 extends VT{constructor(n){super(n),Ie(this,"protocol",V5),Ie(this,"version",U5),Ie(this,"name",Tu.name),Ie(this,"metadata"),Ie(this,"core"),Ie(this,"logger"),Ie(this,"events",new so.EventEmitter),Ie(this,"engine"),Ie(this,"session"),Ie(this,"proposal"),Ie(this,"pendingRequest"),Ie(this,"auth"),Ie(this,"signConfig"),Ie(this,"on",(i,r)=>this.events.on(i,r)),Ie(this,"once",(i,r)=>this.events.once(i,r)),Ie(this,"off",(i,r)=>this.events.off(i,r)),Ie(this,"removeListener",(i,r)=>this.events.removeListener(i,r)),Ie(this,"removeAllListeners",i=>this.events.removeAllListeners(i)),Ie(this,"connect",async i=>{try{return await this.engine.connect(i)}catch(r){throw this.logger.error(r.message),r}}),Ie(this,"pair",async i=>{try{return await this.engine.pair(i)}catch(r){throw this.logger.error(r.message),r}}),Ie(this,"approve",async i=>{try{return await this.engine.approve(i)}catch(r){throw this.logger.error(r.message),r}}),Ie(this,"reject",async i=>{try{return await this.engine.reject(i)}catch(r){throw this.logger.error(r.message),r}}),Ie(this,"update",async i=>{try{return await this.engine.update(i)}catch(r){throw this.logger.error(r.message),r}}),Ie(this,"extend",async i=>{try{return await this.engine.extend(i)}catch(r){throw this.logger.error(r.message),r}}),Ie(this,"request",async i=>{try{return await this.engine.request(i)}catch(r){throw this.logger.error(r.message),r}}),Ie(this,"respond",async i=>{try{return await this.engine.respond(i)}catch(r){throw this.logger.error(r.message),r}}),Ie(this,"ping",async i=>{try{return await this.engine.ping(i)}catch(r){throw this.logger.error(r.message),r}}),Ie(this,"emit",async i=>{try{return await this.engine.emit(i)}catch(r){throw this.logger.error(r.message),r}}),Ie(this,"disconnect",async i=>{try{return await this.engine.disconnect(i)}catch(r){throw this.logger.error(r.message),r}}),Ie(this,"find",i=>{try{return this.engine.find(i)}catch(r){throw this.logger.error(r.message),r}}),Ie(this,"getPendingSessionRequests",()=>{try{return this.engine.getPendingSessionRequests()}catch(i){throw this.logger.error(i.message),i}}),Ie(this,"authenticate",async(i,r)=>{try{return await this.engine.authenticate(i,r)}catch(o){throw this.logger.error(o.message),o}}),Ie(this,"formatAuthMessage",i=>{try{return this.engine.formatAuthMessage(i)}catch(r){throw this.logger.error(r.message),r}}),Ie(this,"approveSessionAuthenticate",async i=>{try{return await this.engine.approveSessionAuthenticate(i)}catch(r){throw this.logger.error(r.message),r}}),Ie(this,"rejectSessionAuthenticate",async i=>{try{return await this.engine.rejectSessionAuthenticate(i)}catch(r){throw this.logger.error(r.message),r}}),this.name=(n==null?void 0:n.name)||Tu.name,this.metadata=$v(n==null?void 0:n.metadata),this.signConfig=n==null?void 0:n.signConfig;const t=typeof(n==null?void 0:n.logger)<"u"&&typeof(n==null?void 0:n.logger)!="string"?n.logger:jl(V0({level:(n==null?void 0:n.logger)||Tu.logger}));this.core=(n==null?void 0:n.core)||new TP(n),this.logger=Rt(t,this.name),this.session=new HP(this.core,this.logger),this.proposal=new QP(this.core,this.logger),this.pendingRequest=new ZP(this.core,this.logger),this.engine=new FP(this),this.auth=new eR(this.core,this.logger)}static async init(n){const t=new i1(n);return await t.initialize(),t}get context(){return Jt(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.auth.init(),await this.engine.init(),this.logger.info("SignClient Initialization Success")}catch(n){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(n.message),n}}}const iR=i1,rR="08c4b07e3ad25f1a27c14a4e8cecb6f0",QV="eip155";let ii;async function W5(){if(!ii)return[];const e=await ii.getWalletConnectSessions();return JSON.parse(e??"[]")}function oR(e){ii||(ii=new Zc({clientId:e.clientId,storage:null}))}async function HV(e){if(!ii)return;const n=await ii.getWalletConnectSessions(),t=JSON.parse(n??"[]");t.push(e),await ii.saveWalletConnectSessions(it(t))}async function sR(e){if(!ii)return;const n=await ii.getWalletConnectSessions(),i=JSON.parse(n??"[]").filter(r=>r.topic!==e.topic);await ii.saveWalletConnectSessions(it(i))}let Su=new WeakMap;async function aR(e){var d,f,m,g;const{wallet:n,requestHandlers:t,onConnect:i,onDisconnect:r,client:o}=e,s=e.chains&&e.chains.length>10?(console.warn("WalletConnect: Can specify no more than 10 chains, truncating to the first 10 provided chains..."),e.chains.slice(0,10)):e.chains;if(Su.has(o))return Su.get(o);oR({clientId:e.client.clientId});const c=jc(),l=await iR.init({metadata:{description:((d=e.appMetadata)==null?void 0:d.description)??c.description,icons:[((f=e.appMetadata)==null?void 0:f.logoUrl)??c.logoUrl],name:((m=e.appMetadata)==null?void 0:m.name)??c.name,url:((g=e.appMetadata)==null?void 0:g.url)??c.url},projectId:e.projectId??rR});l.on("session_proposal",async w=>{const{onSessionProposal:p}=await u(async()=>{const{onSessionProposal:_}=await import("./session-proposal-ef7aaaHV.js");return{onSessionProposal:_}},__vite__mapDeps([57,1,2,4,5,21,13,22,18,17,19,14,9,23,24,25,8,26,27,28,29,30,31,32,33,34]));await p({chains:s,event:w,onConnect:i,wallet:n,walletConnectClient:l}).catch(_=>{if(e.onError)e.onError(_);else throw _})}),l.on("session_request",async w=>{const{fulfillRequest:p}=await u(async()=>{const{fulfillRequest:_}=await import("./session-request-Bz2BIU-j.js");return{fulfillRequest:_}},__vite__mapDeps([58,1,2,21,13,5,17,18,19]));await p({event:w,handlers:t,thirdwebClient:o,wallet:n,walletConnectClient:l}).catch(_=>{if(e.onError)e.onError(_);else throw _})}),l.on("session_event",async w=>{}),l.on("session_ping",w=>{}),l.on("session_delete",async w=>{await $5({session:{topic:w.topic},walletConnectClient:l}).catch(p=>{if(e.onError)e.onError(p);else throw p})});const h=l.disconnect;return l.disconnect=async w=>{const p=await h(w).catch(()=>{});return r&&uR({onDisconnect:r,topic:w.topic}),p},Su.set(e.client,l),l}function cR(e){const{uri:n,walletConnectClient:t}=e;t.core.pairing.pair({uri:n})}async function lR(){return W5()}async function $5(e){sR(e.session);try{await e.walletConnectClient.disconnect({reason:{code:6e3,message:"Disconnected"},topic:e.session.topic})}catch{}}async function uR(e){const{topic:n,onDisconnect:t}=e,i=await W5();t(i.find(r=>r.topic===n)??{topic:n})}function dR(e){return a.jsxs(M,{style:{minHeight:"300px"},children:[a.jsx(M,{p:"lg",children:a.jsx(_e,{onBack:e.onBack,title:"Connect an App"})}),a.jsx(Re,{}),a.jsx(M,{px:"lg",scrollY:!0,style:{maxHeight:"500px"},children:a.jsxs(M,{py:"lg",style:{position:"relative"},children:[a.jsx(M,{py:"md",children:a.jsx(fl,{client:e.client,error:!!e.error,hideSpinner:!0,id:"walletConnect"})}),a.jsx(M,{animate:"fadein",style:{animationDuration:"200ms"},children:e.error?a.jsxs(a.Fragment,{children:[a.jsx(k,{balance:!0,center:!0,multiline:!0,size:"sm",children:e.error}),a.jsx(U,{y:"md"}),a.jsx(M,{animate:"fadein",center:"x",flex:"row",children:a.jsxs(ae,{fullWidth:!0,onClick:()=>e.disconnect(),style:{alignItems:"center",gap:P.xs},variant:"accent",children:[a.jsx(pa,{height:A.sm,width:A.sm}),"Retry"]})})]}):a.jsxs(a.Fragment,{children:[a.jsxs(k,{balance:!0,center:!0,multiline:!0,size:"md",children:["Connected to ",e.session.origin??"another app."]}),a.jsx(U,{y:"xl"}),a.jsx(ae,{fullWidth:!0,onClick:()=>{e.disconnect()},variant:"accent",children:"Disconnect"})]})})]})})]})}function hR(e){const n=ut(),[t,i]=y.useState(!1),[r,o]=y.useState(!1),s=Ei(),{data:c}=pe({enabled:!!n,queryFn:async()=>{if(n)try{return await aR({chains:e.chains,client:e.client,onConnect:()=>{i(!1),s.invalidateQueries({queryKey:["walletConnectSession"]})},onDisconnect:()=>{i(!1),s.invalidateQueries({queryKey:["walletConnectSession"]})},onError:m=>{o(m.message),i(!1)},wallet:n})}catch{o("Failed to establish WalletConnect connection");return}},queryKey:["walletConnectClient"],retry:!1}),{data:l,refetch:h}=pe({enabled:!!c,queryFn:async()=>c&&(await lR())[0]||null,queryKey:["walletConnectSession"]}),{mutateAsync:d}=Ys({mutationFn:async()=>{if(!c||!l)throw new Error("No session");await $5({session:l,walletConnectClient:c})},onError:f=>{console.error(f),o(f.message)},onSuccess:()=>{o(!1),s.invalidateQueries({queryKey:["walletConnectSession"]}),h()}});return l?a.jsx(dR,{disconnect:d,error:r,...e,session:l}):a.jsxs(M,{style:{minHeight:"300px"},children:[a.jsx(M,{p:"lg",children:a.jsx(_e,{onBack:e.onBack,title:"Connect an App"})}),a.jsx(Re,{}),a.jsx(M,{px:"lg",scrollY:!0,style:{maxHeight:"500px"},children:a.jsxs(M,{py:"sm",style:{position:"relative"},children:[a.jsx(M,{py:"md",children:a.jsx(fl,{client:e.client,error:!!r,hideSpinner:!t,id:"walletConnect"})}),a.jsx(M,{animate:"fadein",style:{animationDuration:"200ms"},children:r?a.jsxs(a.Fragment,{children:[a.jsx(k,{balance:!0,center:!0,multiline:!0,size:"sm",children:r}),a.jsx(U,{y:"md"}),a.jsx(M,{animate:"fadein",center:"x",flex:"row",children:a.jsxs(ae,{fullWidth:!0,onClick:()=>o(!1),style:{alignItems:"center",gap:P.xs},variant:"accent",children:[a.jsx(pa,{height:A.sm,width:A.sm}),"Retry"]})})]}):a.jsxs(a.Fragment,{children:[a.jsx(k,{balance:!0,center:!0,multiline:!0,size:"sm",children:"Copy your connection URI from the external app."}),a.jsx(U,{y:"xl"}),a.jsx(yd,{lastUsedBadge:!1,disabled:t||!!r||!c,emptyErrorMessage:"Please enter a valid URI",name:"wcUri",onSelect:async f=>{if(i(!0),!c)o("No WalletConnect client found");else try{cR({uri:f,walletConnectClient:c})}catch{o("Error creating WalletConnect session")}},placeholder:"WalletConnect URI",submitButtonText:"Connect",type:"text"})]})})]})}),a.jsxs(M,{children:[a.jsx(U,{y:"lg"}),a.jsx(Re,{}),a.jsx(M,{center:"x",flex:"row",p:"lg",children:a.jsx("a",{href:"https://blog.thirdweb.com/p/a62c0ef4-1d8f-424d-95b9-a006e5239849/",children:a.jsx(ae,{onClick:()=>{},variant:"link",children:"Where do I find the URI?"})})})]})]})}function fR(e){const n=lt(),t=L2(n),i=w3(e.address),r=y.useSyncExternalStore(i.subscribe,i.getValue),o=pe({enabled:!!n,queryFn:()=>_3({chain:n||ha,client:e.client,walletAddress:e.address}),queryKey:["transactions",e.address,n]}),s=[...[...r].reverse(),...o.data||[]];return a.jsx(M,{flex:"column",fullHeight:!0,scrollY:!0,style:{maxHeight:"370px",minHeight:"250px",paddingBottom:P.lg},children:a.jsxs(M,{expand:!0,flex:"column",gap:"xs",children:[o.isLoading&&a.jsxs(M,{center:"both",color:"secondaryText",flex:"column",gap:"md",style:{flex:"1",minHeight:"250px"},children:[a.jsx(ke,{color:"secondaryText",size:"md"}),a.jsx(k,{children:"Loading recent transactions..."})]}),!o.isLoading&&s.length===0?a.jsxs(M,{center:"both",color:"secondaryText",flex:"column",gap:"md",style:{flex:"1",minHeight:"250px"},children:[a.jsx(Cr,{height:A.xl,width:A.xl}),a.jsx(k,{children:"No Transactions"})]}):a.jsx(M,{animate:"fadein",flex:"column",gap:"xs",style:{minHeight:"250px"},children:s.map(c=>{var l;return a.jsx(mR,{client:e.client,explorerUrl:(l=t.explorers[0])==null?void 0:l.url,tx:c},c.transactionHash)})})]})})}function mR(e){const{data:n,isLoading:t,error:i}=nI({chain:Ve(e.tx.chainId),client:e.client,queryOptions:{enabled:e.tx.receipt===void 0},transactionHash:e.tx.transactionHash}),r=Hh(Ve(e.tx.chainId)),o=e.tx.receipt??n,s=e.tx.decoded,c=a.jsxs(gR,{fullWidth:!0,style:{paddingBlock:P.sm},variant:"secondary",children:[a.jsxs(M,{center:"y",flex:"row",gap:"md",style:{flex:1},children:[a.jsx(iw,{chainIconUrl:r.url,client:e.client,size:A.lg}),a.jsxs("div",{style:{display:"flex",flex:1,flexDirection:"column",justifyContent:"center"},children:[a.jsx(M,{center:"y",flex:"row",gap:"xs",style:{justifyContent:"space-between"},children:a.jsx(k,{color:"primaryText",size:"sm",children:s?s.name:"Transaction Sent"})}),a.jsx(U,{y:"xxs"}),a.jsx(M,{center:"y",flex:"row",gap:"xxs",style:{justifyContent:"space-between"},children:a.jsx(k,{color:"secondaryText",size:"xs",children:o!=null&&o.to?gc(o==null?void 0:o.to,4):gc(e.tx.transactionHash,4)})})]})]}),a.jsxs(M,{center:"y",flex:"row",gap:"xxs",children:[t&&a.jsx(ke,{color:"primaryText",size:"sm"}),!t&&o&&o.status==="success"&&a.jsx(k,{color:"success",size:"md",children:a.jsx(ls,{height:A.md,width:A.md})}),(i||!t&&o&&o.status!=="success")&&a.jsx(k,{color:"danger",size:"md",children:a.jsx(Cr,{height:A.md,width:A.md})})]})]});return e.explorerUrl?a.jsx("a",{href:NM(e.explorerUrl,e.tx.transactionHash),rel:"noreferrer",target:"_blank",children:c}):c}const gR=ze(ae)(()=>{const e=X();return{"&:hover":{background:e.colors.secondaryButtonBg},background:e.colors.tertiaryBg,height:"62px"}});function yR(e){var s;const n=lt(),t=ut(),i=yt(),r=L2(n),o=n&&i&&t?{account:i}:void 0;return o?a.jsxs(M,{animate:"fadein",children:[a.jsx(M,{p:"lg",children:a.jsx(_e,{onBack:e.onBack,title:e.locale.transactions})}),a.jsx(Re,{}),a.jsxs(M,{px:"lg",scrollY:!0,style:{minHeight:"330px"},children:[a.jsx(U,{y:"md"}),a.jsx(fR,{address:o.account.address,client:e.client,locale:e.locale})]}),a.jsx(Re,{}),a.jsx(M,{p:"lg",children:a.jsxs(Q2,{as:"a",fullWidth:!0,gap:"xs",href:SM(((s=r.explorers[0])==null?void 0:s.url)??"",(i==null?void 0:i.address)??""),style:{color:"inherit",textDecoration:"none"},target:"_blank",variant:"outline",children:["View on Explorer",a.jsx(F2,{height:A.sm,width:A.sm})]})})]}):a.jsx(ct,{})}const Wi="tw-connected-wallet",pR=1337,wR=e=>{var d,f,m,g,w,p,_,x,I,b,j;const{connectLocale:n,client:t}=e,i=y.useContext(P2),r=lt();function o(){i(null)}function s(){var C,E,T;i(a.jsx(Y5,{assetTabs:(C=e.detailsModal)==null?void 0:C.assetTabs,chains:e.chains,client:t,closeModal:o,connectOptions:e.connectOptions,detailsModal:e.detailsModal,displayBalanceToken:(E=e.detailsButton)==null?void 0:E.displayBalanceToken,locale:n,onDisconnect:e.onDisconnect,supportedNFTs:e.supportedNFTs,supportedTokens:e.supportedTokens,theme:e.theme,showBalanceInFiat:(T=e.detailsButton)==null?void 0:T.showBalanceInFiat}))}const c=e.chain&&r&&r.id!==e.chain.id;if((d=e.detailsButton)!=null&&d.render)return a.jsx("div",{onClick:s,children:a.jsx(e.detailsButton.render,{})});if(e.chain&&c)return a.jsx(LR,{className:(f=e.switchButton)==null?void 0:f.className,connectLocale:n,style:(m=e.switchButton)==null?void 0:m.style,switchNetworkBtnTitle:(g=e.switchButton)==null?void 0:g.label,targetChain:e.chain});const l=`${Wi} ${((w=e.detailsButton)==null?void 0:w.className)||""}`,h=(_=(p=e.detailsButton)==null?void 0:p.displayBalanceToken)==null?void 0:_[Number(r==null?void 0:r.id)];return a.jsxs(IR,{className:l,"data-test":"connected-wallet-details",onClick:s,style:(x=e.detailsButton)==null?void 0:x.style,type:"button",children:[a.jsx(M,{style:{borderRadius:"100%",height:"35px",overflow:"hidden",width:"35px"},children:(I=e.detailsButton)!=null&&I.connectedAccountAvatarUrl?a.jsx("img",{alt:"",src:e.detailsButton.connectedAccountAvatarUrl,style:{height:"100%",objectFit:"cover",width:"100%"}}):a.jsx(v0,{className:`${Wi}__account_avatar`,fallbackComponent:a.jsx(Gs,{className:`${Wi}__account_avatar`,size:35}),loadingComponent:a.jsx(Gs,{className:`${Wi}__account_avatar`,size:35}),queryOptions:{refetchOnMount:!1,refetchOnWindowFocus:!1},style:{height:"100%",objectFit:"cover",width:"100%"}})}),a.jsxs(M,{flex:"column",gap:"4xs",style:{borderRadius:`0 ${G.md} ${G.md} 0`,textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[(b=e.detailsButton)!=null&&b.connectedAccountName?a.jsx(k,{className:`${Wi}__address`,color:"primaryText",size:"xs",weight:500,children:e.detailsButton.connectedAccountName}):a.jsx(k,{className:`${Wi}__address`,color:"primaryText",size:"xs",weight:500,children:a.jsx(N0,{fallbackComponent:a.jsx(Ac,{formatFn:ln}),loadingComponent:a.jsx(Ac,{formatFn:ln})})}),a.jsx(k,{className:`${Wi}__balance`,color:"secondaryText",size:"xs",style:{alignItems:"center",display:"flex",gap:"2px"},weight:400,children:(j=e.detailsButton)!=null&&j.showBalanceInFiat?a.jsxs(a.Fragment,{children:[a.jsx(So,{chain:r,fallbackComponent:a.jsx(ge,{height:ie.xs,width:"50px"}),loadingComponent:a.jsx(ge,{height:ie.xs,width:"50px"}),tokenAddress:h}),a.jsx(So,{chain:r,formatFn:_R,loadingComponent:a.jsx(ge,{height:ie.xs,width:"20px"}),showBalanceInFiat:"USD",tokenAddress:h})]}):a.jsx(So,{chain:r,fallbackComponent:a.jsx(ge,{height:ie.xs,width:"70px"}),formatFn:xR,loadingComponent:a.jsx(ge,{height:ie.xs,width:"70px"}),tokenAddress:h})})]})]})};function _R(e){return` (${E0({...e,decimals:0})})`}function xR(e){return`${Sc({...e,decimals:e.balance<1?5:4})}`}function Y5(e){var O,L,N,v,D,z,V,R,B,Y,$,W,F,Q,Z,ne,ce,q,le,re,oe,ue,Ce,Ue,Ge,rt,de,fe,Be,qe,Ke;const[n,t]=y.useState("main"),{disconnect:i}=ol(),[r,o]=y.useState(!0),{client:s,locale:c}=e,l=lt(),h=yt(),d=V2(e.theme),f=ut(),m=aI(l),g=nl(l),w=!(f!=null&&f.switchChain),p=l0({size:"compact",wallets:f?[f]:[],welcomeScreen:void 0}),_=y.useCallback(()=>{o(!1),Ec(()=>{e.closeModal()})},[e.closeModal]);function x(he){o(!1),e.closeModal(),e.onDisconnect(he)}y.useEffect(()=>{h||_()},[h,_]);const{hideSendFunds:I,hideReceiveFunds:b,hideBuyFunds:j}=e.detailsModal||{},C=I&&b&&j,E=a.jsxs(M,{style:{height:`${A.xl}px`,position:"relative",width:`${A.xl}px`},children:[a.jsx(M,{style:{borderRadius:"100%",height:"100%",overflow:"hidden",width:"100%"},children:(O=e.detailsModal)!=null&&O.connectedAccountAvatarUrl?a.jsx("img",{alt:"",src:e.detailsModal.connectedAccountAvatarUrl,style:{height:"100%",objectFit:"cover",width:"100%"}}):h&&a.jsx(v0,{fallbackComponent:a.jsx(Gs,{size:Number(A.xxl)}),loadingComponent:a.jsx(Gs,{size:Number(A.xxl)}),style:{height:"100%",objectFit:"cover",width:"100%"}})}),(L=e.detailsModal)!=null&&L.hideSwitchWallet?null:a.jsx(M,{style:{bottom:-2,position:"absolute",right:-2},children:a.jsx(wj,{padding:"4px",style:{background:d.colors.modalBg},children:f&&a.jsx(Vn,{client:s,id:f.id,size:"12",style:{borderRadius:0}})})})]});let T=a.jsxs("div",{className:`${Wi}__default_modal_screen`,children:[a.jsx(U,{y:"xs"}),a.jsxs(M,{center:"y",flex:"row",gap:"sm",px:"lg",style:{paddingBottom:C?P.md:P.lg,paddingTop:P.lg},children:[(N=e.detailsModal)!=null&&N.hideSwitchWallet?E:a.jsx(vc,{tip:"Switch wallet",children:a.jsx("div",{onClick:()=>{t("wallet-manager")},onKeyDown:he=>{he.key==="w"&&t("wallet-manager")},style:{cursor:"pointer"},children:E})}),a.jsxs(M,{flex:"column",gap:"3xs",children:[a.jsxs("div",{style:{alignItems:"center",display:"flex",gap:P.xxs},children:[(v=e.detailsModal)!=null&&v.connectedAccountName?a.jsx(k,{color:"primaryText",size:"md",weight:500,children:e.detailsModal.connectedAccountName}):a.jsx(k,{color:"primaryText",size:"md",weight:500,children:a.jsx(N0,{fallbackComponent:a.jsx(Ac,{formatFn:ln}),loadingComponent:a.jsx(Ac,{formatFn:ln})})}),a.jsx(bi,{children:a.jsx(Jo,{text:(h==null?void 0:h.address)||"",tip:c.copyAddress})})]}),a.jsx(jR,{client:s,locale:c})]})]}),!C&&a.jsxs(a.Fragment,{children:[a.jsx(M,{px:"lg",children:a.jsxs(M,{className:"tw-highlight-buttons",style:{display:"flex",gap:P.xs},children:[!I&&a.jsxs(ae,{className:"tw-highlight-button__send",onClick:()=>{t("send")},style:{alignItems:"center",display:"flex",flex:1,fontSize:ie.sm,gap:P.xs,padding:P.sm},variant:"outline",children:[a.jsx(M,{center:"both",color:"secondaryText",flex:"row",children:a.jsx(Cb,{height:A.sm,style:{transform:"translateY(-10%) rotate(-45deg) "},width:A.sm})}),c.send]}),!b&&a.jsxs(ae,{className:"tw-highlight-button__receive",onClick:()=>{t("receive")},style:{alignItems:"center",display:"flex",flex:1,fontSize:ie.sm,gap:P.xs,padding:P.sm},variant:"outline",children:[a.jsx(M,{center:"both",color:"secondaryText",flex:"row",children:a.jsx(Lb,{height:A.sm,width:A.sm})}),c.receive]}),!j&&g.data&&!g.data.testnet&&a.jsxs(ae,{className:"tw-highlight-button__buy",onClick:()=>{an({client:s,event:"details_modal_buy_click",walletAddress:h==null?void 0:h.address,walletType:f==null?void 0:f.id}),t("buy")},style:{alignItems:"center",display:"flex",flex:1,fontSize:ie.sm,gap:P.xs,padding:P.sm},variant:"outline",children:[a.jsx(M,{center:"both",color:"secondaryText",flex:"row",children:a.jsx(al,{height:A.sm,width:A.sm})}),c.buy]})]})}),a.jsx(U,{y:"md"})]}),a.jsxs(M,{px:"md",children:[a.jsxs(M,{flex:"column",style:{gap:"1px"},children:[a.jsx(MR,{client:e.client,disableSwitchChain:w,displayBalanceToken:e.displayBalanceToken,setScreen:()=>t("network-switcher"),showBalanceInFiat:(D=e.detailsModal)==null?void 0:D.showBalanceInFiat}),a.jsxs(bn,{className:"tw-view-transactions-button",onClick:()=>{t("transactions")},style:{fontSize:ie.sm},children:[a.jsx(Ob,{height:A.md,width:A.md}),a.jsx(M,{center:"y",flex:"row",gap:"xs",children:a.jsx(k,{color:"primaryText",children:c.transactions})})]}),(e.assetTabs===void 0||e.assetTabs.length>0)&&a.jsxs(bn,{className:"tw-view-assets-button",onClick:()=>{t("view-assets")},style:{fontSize:ie.sm},children:[a.jsx(Il,{size:A.md}),a.jsx(k,{color:"primaryText",children:c.viewFunds.viewAssets})]}),a.jsxs(bn,{className:"tw-manage-wallet-button",onClick:()=>{t("manage-wallet")},style:{fontSize:ie.sm},children:[a.jsx(to,{size:A.md}),a.jsx(k,{color:"primaryText",children:e.locale.manageWallet.title})]}),(((z=e.detailsModal)==null?void 0:z.showTestnetFaucet)??!1)&&(m.faucets.length>0||(l==null?void 0:l.id)===pR)&&a.jsxs(Cj,{className:"tw-request-testnet-funds-button",as:"a",href:m.faucets?m.faucets[0]:"#",style:{color:"inherit",textDecoration:"none"},target:"_blank",children:[a.jsx(M,{center:"both",color:"secondaryText",flex:"row",children:a.jsx(bj,{size:A.md})}),c.requestTestnetFunds]}),((V=e.detailsModal)==null?void 0:V.footer)&&a.jsx(e.detailsModal.footer,{close:_})]}),a.jsx(U,{y:"md"})]}),((R=e.detailsModal)==null?void 0:R.hideDisconnect)!==!0&&a.jsxs(M,{children:[a.jsx(Re,{}),a.jsx(U,{y:"sm"}),a.jsx(M,{px:"md",children:a.jsxs(bn,{className:"tw-disconnect-wallet-button","data-variant":"danger",onClick:()=>{f&&h&&(i(f),x({account:h,wallet:f}))},type:"button",children:[a.jsx(wb,{height:A.md,width:A.md}),a.jsx(k,{color:"primaryText",children:c.disconnectWallet})]})}),a.jsx(U,{y:"sm"})]})]});if(n==="transactions"&&(T=a.jsx(yR,{client:s,closeModal:_,locale:c,onBack:()=>t("main"),setScreen:t,title:c.buy})),n==="wallet-manager"&&h&&l&&f&&(T=a.jsx(yL,{accountAbstraction:(B=e.connectOptions)==null?void 0:B.accountAbstraction,activeAccount:h,activeChain:l,activeWallet:f,appMetadata:(Y=e.connectOptions)==null?void 0:Y.appMetadata,chain:($=e.connectOptions)==null?void 0:$.chain,chains:(W=e.connectOptions)==null?void 0:W.chains,client:s,connectLocale:c,hiddenWallets:(F=e.connectOptions)==null?void 0:F.hiddenWallets,onBack:()=>t("main"),recommendedWallets:(Q=e.connectOptions)==null?void 0:Q.recommendedWallets,showAllWallets:!!((Z=e.connectOptions)!=null&&Z.showAllWallets),walletConnect:(ne=e.connectOptions)==null?void 0:ne.walletConnect,wallets:(ce=e.connectOptions)==null?void 0:ce.wallets})),n==="network-switcher")T=a.jsx(Zp,{chains:l&&e.chains.find(he=>he.id===l.id)===void 0?[l,...e.chains]:e.chains,client:s,closeModal:_,connectLocale:c,networkSelector:(q=e.detailsModal)==null?void 0:q.networkSelector,onBack:()=>{t("main")}});else if(n==="view-assets")T=a.jsx(GE,{assetTabs:(le=e.detailsModal)==null?void 0:le.assetTabs,client:s,connectLocale:c,onBack:()=>{t("main")},setScreen:t,supportedNFTs:e.supportedNFTs,supportedTokens:e.supportedTokens,theme:e.theme});else if(n==="view-nfts")T=a.jsx(QE,{client:s,connectLocale:c,onBack:()=>{t("main")},supportedNFTs:e.supportedNFTs,theme:e.theme});else if(n==="view-tokens")T=a.jsx(ZE,{client:s,connectLocale:c,onBack:()=>{t("main")},supportedTokens:e.supportedTokens});else if(n==="private-key")T=a.jsx(dE,{client:s,connectLocale:c,onBack:()=>{t("manage-wallet")},theme:e.theme,wallet:f});else if(n==="manage-wallet")T=a.jsx(lE,{client:s,closeModal:_,locale:c,onBack:()=>{t("main")},manageWallet:(re=e.detailsModal)==null?void 0:re.manageWallet,setScreen:t});else if(n==="wallet-connect-receiver")T=a.jsx(hR,{chains:e.chains,client:s,onBack:()=>{t("manage-wallet")}});else if(n==="linked-profiles")T=a.jsx(ML,{client:s,locale:c,onBack:()=>t("manage-wallet"),setScreen:t});else if(n==="link-profile")T=a.jsx(oE,{client:s,locale:c,onBack:()=>{t("linked-profiles")},walletConnect:(oe=e.connectOptions)==null?void 0:oe.walletConnect});else if(n==="send")T=a.jsx(NE,{client:s,connectLocale:c,onBack:()=>{t("main")},supportedTokens:e.supportedTokens});else if(n==="receive")T=a.jsx(fE,{client:s,connectLocale:c,onBack:()=>{t("main")},walletId:f==null?void 0:f.id});else if(n==="buy"){const he=((Ge=(Ue=(Ce=(ue=e.detailsModal)==null?void 0:ue.payOptions)==null?void 0:Ce.prefillBuy)==null?void 0:Ue.chain)==null?void 0:Ge.id)||(l==null?void 0:l.id)||((rt=e.chains[0])==null?void 0:rt.id)||1;T=a.jsx(gj,{amount:((Be=(fe=(de=e.detailsModal)==null?void 0:de.payOptions)==null?void 0:fe.prefillBuy)==null?void 0:Be.amount)||"0.01",chain:Ve(he),client:s,hiddenWallets:(qe=e.detailsModal)==null?void 0:qe.hiddenWallets,connectOptions:e.connectOptions,onCancel:()=>t("main"),onSuccess:()=>t("main"),supportedTokens:e.supportedTokens,theme:e.theme,style:{border:"none",borderRadius:G.lg},tokenAddress:(Ke=e.displayBalanceToken)==null?void 0:Ke[Number(he)]})}return a.jsx(e0,{theme:e.theme,children:a.jsx(J2,{isOpen:!1,theme:e.theme,children:a.jsx(c0.Provider,{value:p,children:a.jsx(Ml,{className:"tw-modal__wallet-details",title:"Manage Wallet",open:r,crossContainerStyles:{display:n==="buy"?"none":"block"},setOpen:he=>{var ot,wt;he||(_(),(ot=e.detailsModal)!=null&&ot.onClose&&((wt=e.detailsModal)==null||wt.onClose(n)))},size:"compact",children:(h==null?void 0:h.address)&&a.jsx(Yh,{address:h.address,client:s,children:T})})})})})}function MR(e){var s,c,l;const{disableSwitchChain:n,setScreen:t,showBalanceInFiat:i,client:r}=e,o=lt();return o?a.jsxs(bn,{className:"tw-internal-network-switcher-button tw-switch-network-button","data-variant":"primary",disabled:n,onClick:()=>{t("network-switcher")},type:"button",children:[a.jsxs(kp,{chain:o,children:[a.jsx("div",{style:{alignItems:"center",display:"flex",position:"relative"},children:a.jsxs(M,{style:{alignItems:"center",display:"flex",flexShrink:0,position:"relative"},children:[a.jsx(Pp,{client:r,fallbackComponent:a.jsx("img",{alt:"",src:Mr,style:{height:`${A.md}px`,width:`${A.md}px`}}),loadingComponent:a.jsx(ge,{height:`${A.md}px`,width:`${A.md}px`}),style:{height:`${A.md}px`,width:`${A.md}px`}}),a.jsx(A0,{className:"tw-chain-active-dot-details-button"})]})}),a.jsxs(k,{color:"primaryText",multiline:!0,size:"md",children:[a.jsx(jd,{fallbackComponent:a.jsxs("span",{children:["Unknown chain #",o==null?void 0:o.id]}),loadingComponent:a.jsx(ge,{height:"16px",width:"150px"})}),a.jsx(k,{color:"secondaryText",size:"xs",children:i?a.jsxs(a.Fragment,{children:[a.jsx(So,{chain:o,fallbackComponent:a.jsx(ge,{height:"1em",width:"70px"}),formatFn:h=>Sc({...h,decimals:7}),loadingComponent:a.jsx(ge,{height:"1em",width:"70px"}),tokenAddress:(s=e.displayBalanceToken)==null?void 0:s[Number(o==null?void 0:o.id)]})," ",a.jsx(So,{chain:o,formatFn:h=>` (${E0({...h,decimals:3})})`,loadingComponent:a.jsx(ge,{height:"1em",width:"30px"}),showBalanceInFiat:"USD",tokenAddress:(c=e.displayBalanceToken)==null?void 0:c[Number(o==null?void 0:o.id)]})]}):a.jsx(So,{chain:o,fallbackComponent:a.jsx(ge,{height:"1em",width:"100px"}),formatFn:h=>Sc({...h,decimals:7}),loadingComponent:a.jsx(ge,{height:"1em",width:"100px"}),tokenAddress:(l=e.displayBalanceToken)==null?void 0:l[Number(o==null?void 0:o.id)]})})]})]}),a.jsx(bR,{height:A.sm,style:{flexShrink:0,marginLeft:"auto"},width:A.sm})]}):null}const IR=Ti(e=>{const n=X();return{all:"unset","&:hover":{background:n.colors.connectedButtonBgHover,transition:"background 250ms ease"},alignItems:"center",animation:`${lo} 300ms ease`,background:n.colors.connectedButtonBg,border:`1px solid ${n.colors.borderColor}`,borderRadius:G.md,boxSizing:"border-box",cursor:"pointer",display:"inline-flex",gap:P.xs,height:"50px",lineHeight:"normal",minWidth:"165px",overflow:"hidden",padding:P.xs,WebkitTapHighlightColor:"transparent"}}),bR=ze(lb)(()=>({color:X().colors.secondaryText}));function CR(e){const n=yt(),t=ut(),i=Ho(t),r=lt(),{client:o,connectLocale:s}=e,[c,l]=y.useState(!1);y.useEffect(()=>{if(n&&i&&n.address&&r){const d=cn({address:n.address,chain:r,client:o});Ug(d).then(f=>{l(f)})}else l(!1)},[n,r,o,i]);const h=a.jsx(M,{center:"y",flex:"row",gap:"3xs",children:a.jsx(k,{color:"secondaryText",size:"xs",weight:400,children:s.connectedToSmartWallet})});return r&&n&&i?a.jsx(a.Fragment,{children:c?a.jsx(_r,{color:"secondaryText",hoverColor:"primaryText",href:`https://thirdweb.com/${r.id}/${n.address}/account`,size:"sm",target:"_blank",children:h}):a.jsxs(k,{size:"sm",children:[" ",h]})}):null}function jR(e){const{client:n,locale:t}=e,i=yt(),r=ut(),o=rl(),{data:s}=cs(r==null?void 0:r.id),c=Ho(r),{data:l}=pe({enabled:!!(r!=null&&r.id)&&!!s,queryFn:async()=>{const d=await cy(Pt);return d==="guest"?"Guest":d&&((r==null?void 0:r.id)==="inApp"||(r==null?void 0:r.id)==="smart")&&Hg.includes(d)?d.slice(0,1).toUpperCase()+d.slice(1):s==null?void 0:s.name},queryKey:["wallet-name",{walletAddress:i==null?void 0:i.address,walletId:r==null?void 0:r.id}]}),h=pe({enabled:!!o,queryFn:async()=>{var _;if(!(o&&(o.id==="inApp"||o.id.startsWith("ecosystem."))))return null;let f;if(De(o)){const x=o,I=(_=x.getConfig())==null?void 0:_.partnerId;f={id:x.id,partnerId:I}}const{getUserEmail:m,getUserPhoneNumber:g}=await u(async()=>{const{getUserEmail:x,getUserPhoneNumber:I}=await import("./index-B6-Xobl2.js").then(b=>b.bc);return{getUserEmail:x,getUserPhoneNumber:I}},__vite__mapDeps([1,2])),[w,p]=await Promise.all([m({client:n,ecosystem:f}),g({client:n,ecosystem:f})]);return w||p||null},queryKey:["in-app-wallet-user",n,i==null?void 0:i.address]});return!h.data&&c?a.jsx(CR,{client:n,connectLocale:t}):h.data||l?a.jsx(k,{size:"xs",weight:400,children:h.data||l}):a.jsx(ge,{className:"InAppWalletUserInfo__skeleton",height:"10px",width:"50px"})}function LR(e){const n=A2(),[t,i]=y.useState(!1),r=e.connectLocale,o=e.switchNetworkBtnTitle??r.switchNetwork;return a.jsx(ae,{"aria-label":t?r.switchingNetwork:void 0,className:`tw-connect-wallet--switch-network ${e.className||""}`,"data-is-loading":t,"data-test":"switch-network-button",disabled:t,onClick:async()=>{i(!0);try{await n(e.targetChain)}catch(s){console.error(s)}i(!1)},style:{minWidth:"140px",...e.style},type:"button",variant:"primary",children:t?a.jsx(ke,{color:"primaryButtonText",size:"sm"}):o})}const ER=e=>a.jsx("svg",{fill:"none",height:e.size,role:"presentation",viewBox:"0 0 16 21",width:e.size,xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M2 21C1.45 21 0.979333 20.8043 0.588 20.413C0.196 20.021 0 19.55 0 19V9C0 8.45 0.196 7.979 0.588 7.587C0.979333 7.19567 1.45 7 2 7H3V5C3 3.61667 3.48767 2.43733 4.463 1.462C5.43767 0.487333 6.61667 0 8 0C9.38333 0 10.5627 0.487333 11.538 1.462C12.5127 2.43733 13 3.61667 13 5V7H14C14.55 7 15.021 7.19567 15.413 7.587C15.8043 7.979 16 8.45 16 9V19C16 19.55 15.8043 20.021 15.413 20.413C15.021 20.8043 14.55 21 14 21H2ZM8 16C8.55 16 9.021 15.8043 9.413 15.413C9.80433 15.021 10 14.55 10 14C10 13.45 9.80433 12.979 9.413 12.587C9.021 12.1957 8.55 12 8 12C7.45 12 6.97933 12.1957 6.588 12.587C6.196 12.979 6 13.45 6 14C6 14.55 6.196 15.021 6.588 15.413C6.97933 15.8043 7.45 16 8 16ZM5 7H11V5C11 4.16667 10.7083 3.45833 10.125 2.875C9.54167 2.29167 8.83333 2 8 2C7.16667 2 6.45833 2.29167 5.875 2.875C5.29167 3.45833 5 4.16667 5 5V7Z",fill:"currentColor"})}),TR=e=>{const n=l0({size:e.size,wallets:e.wallets,welcomeScreen:e.welcomeScreen}),t=uo(),{screen:i,setScreen:r,initialScreen:o}=n,s=$b(),c=X2(),[l,h]=y.useState(!1),d=y.useCallback(()=>{var g;(g=e.onClose)==null||g.call(e),c(!1),Ec(()=>{r(o),t({})})},[o,c,r,t,e.onClose]),f=yt();y.useEffect(()=>{s||Ec(()=>{h(!1)})},[s]);const m=y.useCallback(g=>h(!g),[]);return y.useEffect(()=>{s&&i===At.signIn&&!f&&(r(o),c(!1))},[o,s,i,c,r,f]),a.jsx(Ml,{className:"tw-modal__connect-wallet",title:"Connect Wallet",hide:l,open:s,setOpen:g=>{l||g||d()},size:e.size,children:a.jsx(My,{accountAbstraction:e.accountAbstraction,auth:e.auth,chain:e.chain,chains:e.chains,client:e.client,connectLocale:e.connectLocale,hideHeader:!1,isOpen:s,meta:e.meta,modalHeader:void 0,onClose:d,onConnect:e.onConnect,recommendedWallets:e.recommendedWallets,screenSetup:n,setModalVisibility:m,shouldSetActive:e.shouldSetActive,showAllWallets:e.showAllWallets,size:e.size,walletConnect:e.walletConnect,walletIdsToHide:e.hiddenWallets,wallets:e.wallets,welcomeScreen:e.welcomeScreen})})},ch="tw-connect-wallet";function F5(e){var f,m,g,w,p,_,x,I,b,j,C,E,T,O;const n=y.useMemo(()=>e.wallets||ll({appMetadata:e.appMetadata,chains:e.chains,executionMode:e.accountAbstraction?{mode:"EIP4337",smartAccount:e.accountAbstraction}:void 0}),[e.wallets,e.appMetadata,e.chains,e.accountAbstraction]),t=Bb(e.locale||"en_US"),i=Gh(),r=yt(),o=ut(),s=Qh(o,r,e.auth),c=e.hiddenWallets||((f=e.detailsModal)==null?void 0:f.hiddenWallets);Hb({wallets:n}),y.useEffect(()=>{e.chain&&i.defineChains([e.chain])},[e.chain,i]),y.useEffect(()=>{e.chains&&i.defineChains(e.chains)},[e.chains,i]);const l=y.useMemo(()=>{var L;return!Qb()||n.length===1?"compact":((L=e.connectModal)==null?void 0:L.size)||"compact"},[n.length,(m=e.connectModal)==null?void 0:m.size]),h=((g=e.accountAbstraction)==null?void 0:g.chain)||e.chain||((w=e.chains)==null?void 0:w[0]),d=e.autoConnect!==!1&&a.jsx(ly,{accountAbstraction:e.accountAbstraction,appMetadata:e.appMetadata,chain:h,client:e.client,onConnect:e.onConnect,siweAuth:s,timeout:typeof e.autoConnect=="boolean"||(p=e.autoConnect)==null?void 0:p.timeout,wallets:n});if(!t.data){const L=`${((_=e.connectButton)==null?void 0:_.className)||""} ${ch}`;return a.jsxs(lh,{className:L,disabled:!0,style:{height:"50px",minWidth:"165px",...(x=e.connectButton)==null?void 0:x.style},type:"button",variant:"primary",children:[d,a.jsx(ke,{color:"primaryButtonText",size:"sm"})]})}return a.jsxs(J2,{isOpen:!1,theme:e.theme,children:[a.jsx(vR,{...e,connectLocale:t.data,siweAuth:s}),a.jsx(TR,{accountAbstraction:e.accountAbstraction,auth:e.auth,chain:h,chains:e.chains,client:e.client,connectLocale:t.data,hiddenWallets:c,localeId:e.locale||"en_US",meta:{privacyPolicyUrl:(I=e.connectModal)==null?void 0:I.privacyPolicyUrl,requireApproval:(b=e.connectModal)==null?void 0:b.requireApproval,showThirdwebBranding:(j=e.connectModal)==null?void 0:j.showThirdwebBranding,termsOfServiceUrl:(C=e.connectModal)==null?void 0:C.termsOfServiceUrl,title:(E=e.connectModal)==null?void 0:E.title,titleIconUrl:(T=e.connectModal)==null?void 0:T.titleIcon},onConnect:e.onConnect,recommendedWallets:e.recommendedWallets,shouldSetActive:!0,showAllWallets:e.showAllWallets,size:l,walletConnect:e.walletConnect,wallets:n,welcomeScreen:(O=e.connectModal)==null?void 0:O.welcomeScreen}),d]})}function vR(e){var g,w,p,_,x,I,b,j,C,E,T;const n=e.siweAuth,t=yt(),[i,r]=y.useState(!1),o=e.hiddenWallets||((g=e.detailsModal)==null?void 0:g.hiddenWallets);y.useEffect(()=>{t||r(!1)},[t]);const s=e.theme||"dark",c=cI(),l=e.connectLocale,h=c==="connecting",d=((w=e.connectButton)==null?void 0:w.label)||l.defaultButtonTitle,f=X2(),m=y.useMemo(()=>{if(!e.supportedTokens)return;const O={...Fs};for(const L in e.supportedTokens){const N=Number(L),v=e.supportedTokens[N];v&&(O[N]=v)}return O},[e.supportedTokens]);if(!t){const O=`${((p=e.connectButton)==null?void 0:p.className)||""} ${ch}`;return a.jsx(lh,{"aria-label":c==="connecting"?l.connecting:typeof d=="string"?d:l.defaultButtonTitle,className:O,"data-is-loading":h,"data-test":"connect-wallet-button","data-theme":s,disabled:h,onClick:()=>{f(!0)},style:{fontSize:"16px",height:"50px",minWidth:"165px",...(_=e.connectButton)==null?void 0:_.style},type:"button",variant:"primary",children:h?a.jsx(ke,{color:"primaryButtonText",size:"sm"}):d})}if(n.requiresAuth){if(n.isPending||n.isLoggingIn||n.isLoggingOut){const O=`${((x=e.connectButton)==null?void 0:x.className)||""} ${ch}`;return a.jsx(lh,{className:O,disabled:!0,style:{height:"50px",minWidth:"165px",...(I=e.connectButton)==null?void 0:I.style},type:"button",variant:"primary",children:a.jsx(ke,{color:"primaryButtonText",size:"sm"})})}if(!n.isLoggedIn)return a.jsxs(a.Fragment,{children:[a.jsx(ae,{className:(b=e.signInButton)==null?void 0:b.className,onClick:()=>{r(!0)},style:{minHeight:"50px",minWidth:"165px",...(j=e.signInButton)==null?void 0:j.style},type:"button",variant:"primary",children:n.isLoggingIn?a.jsx(ke,{color:"primaryButtonText",size:"sm"}):a.jsxs(M,{center:"y",flex:"row",gap:"sm",children:[a.jsx(ER,{size:A.sm}),a.jsxs("span",{children:[" ",((C=e.signInButton)==null?void 0:C.label)||l.signIn," "]})]})}),a.jsx(Ml,{className:"tw-modal__sign-in",title:"Sign in",open:i,setOpen:r,size:"compact",children:a.jsx(hy,{auth:e.auth,client:e.client,connectLocale:l,modalSize:"compact",onDone:()=>r(!1),privacyPolicyUrl:(E=e.connectModal)==null?void 0:E.privacyPolicyUrl,termsOfServiceUrl:(T=e.connectModal)==null?void 0:T.termsOfServiceUrl})})]})}return a.jsx(Yh,{address:t.address,client:e.client,children:a.jsx(wR,{chain:e.chain,chains:(e==null?void 0:e.chains)||[],client:e.client,connectLocale:l,connectOptions:{accountAbstraction:e.accountAbstraction,appMetadata:e.appMetadata,chain:e.chain,chains:e.chains,connectModal:e.connectModal,hiddenWallets:o,recommendedWallets:e.recommendedWallets,showAllWallets:e.showAllWallets,walletConnect:e.walletConnect,wallets:e.wallets},detailsButton:e.detailsButton,detailsModal:{...e.detailsModal,hiddenWallets:o},onDisconnect:O=>{var L;n.requiresAuth&&n.doLogout(),(L=e.onDisconnect)==null||L.call(e,O)},supportedNFTs:e.supportedNFTs,supportedTokens:m,switchButton:e.switchButton,theme:s})})}const lh=ze(ae)({animation:`${lo} 300ms ease`});function uh(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;let t,i;if(Array.isArray(e)&&Array.isArray(n)){if(t=e.length,t!==n.length)return!1;for(i=t;i--!==0;)if(!uh(e[i],n[i]))return!1;return!0}if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();const r=Object.keys(e);if(t=r.length,t!==Object.keys(n).length)return!1;for(i=t;i--!==0;)if(!Object.hasOwn(n,r[i]))return!1;for(i=t;i--!==0;){const o=r[i];if(o&&!uh(e[o],n[o]))return!1}return!0}return e!==e&&n!==n}function NR(e,n){return uh(e,n)?e:el(e,n)}function SR(e){const[n,t]=y.useState(null),[i]=y.useState(()=>new Jx({defaultOptions:{mutations:{onSettled:(r,o,s)=>{LM(s)&&Cc(r,["transactionHash"])&&Cc(s,["client","chain"])&&Gc({chain:s.chain,client:s.client,transactionHash:r.transactionHash}).catch(c=>{console.error("[Transaction Error]",c)}).then(()=>{var c,l,h;return Promise.all([i.invalidateQueries({queryKey:["readContract",((c=s.__contract)==null?void 0:c.chain.id)||s.chain.id,((l=s.__contract)==null?void 0:l.address)||s.to]}),T2(i,((h=s.__contract)==null?void 0:h.chain.id)||s.chain.id)])})}},queries:{staleTime:60*1e3,structuralSharing:NR}}}));return a.jsx(v2.Provider,{value:e.manager,children:a.jsxs(rM,{client:i,children:[a.jsx(P2.Provider,{value:t,children:e.children}),n]})})}function AR(e){const n=y.useMemo(()=>e.connectionManager||Xb(Pt),[e.connectionManager]);return a.jsx(SR,{manager:n,children:e.children})}const DR=m3("div")({marginTop:"20px"}),OR=()=>{const{connect:e}=N2(),[n,t]=y.useState(!1),[i,r]=y.useState(!0);return y.useEffect(()=>{e(async()=>{const o=od();return await o.autoConnect({client:s1}),o}).then(o=>{o&&t(!0)}).catch(()=>{}).finally(()=>{r(!1)})},[e]),i?a.jsx(g3,{animation:"wave",width:"100%",height:50}):n?a.jsx(F5,{client:s1,wallets:[od()],theme:"dark",connectModal:{size:"compact"},detailsButton:{style:{width:"100%"}}}):null},kR=()=>a.jsx(DR,{children:a.jsx(AR,{children:a.jsx(OR,{})})}),ZV=Object.freeze(Object.defineProperty({__proto__:null,default:kR},Symbol.toStringTag,{value:"Module"}));export{av as $,yy as A,jl as B,g0 as C,rR as D,qL as E,ac as F,eE as G,EL as H,He as I,wV as J,Fe as K,ct as L,_e as M,QV as N,ZL as O,x5 as P,XM as Q,fv as R,U as S,hl as T,zV as U,ra as V,LL as W,Wf as X,iD as Y,_w as Z,Xs as _,ga as a,ww as a0,mv as a1,PV as a2,kV as a3,Rc as a4,VV as a5,RV as a6,Cx as a7,iV as a8,jx as a9,pM as aA,pV as aB,t2 as aC,ZV as aD,Lx as aa,Ex as ab,bx as ac,u4 as ad,d4 as ae,nV as af,cV as ag,Dx as ah,hV as ai,aV as aj,sV as ak,mV as al,dV as am,Ox as an,uV as ao,lV as ap,y4 as aq,p4 as ar,Th as as,fV as at,gV as au,rV as av,kx as aw,oV as ax,Ix as ay,at as az,jc as b,Lh as c,Tx as d,HV as e,u2 as f,MV as g,$5 as h,W5 as i,i1 as j,V0 as k,qr as l,ts as m,Rn as n,Yi as o,tt as p,M as q,A as r,xV as s,cl as t,u0 as u,l4 as v,gy as w,ml as x,Yb as y,uo as z};
|