@dcl/shop 0.1.0-29588647657.commit-2cc8158 → 0.1.0-29734911263.commit-97d18ef
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/{AnimatedBackground-urlvv1u-.js → AnimatedBackground-Dc0wzLz1.js} +1 -1
- package/assets/Assets-DPWTLJJO.js +1 -0
- package/assets/Cart-BBaYBkcV.css +1 -0
- package/assets/Cart-C5IFRFSf.js +1 -0
- package/assets/{CircularProgress-CPG7ZOfs.js → CircularProgress-BDWVwtML.js} +4 -4
- package/assets/Collection-M5DaYZlo.js +1 -0
- package/assets/CollectionCarousel-FF2VKnCi.css +1 -0
- package/assets/CollectionCarousel-_a53Z75p.js +1 -0
- package/assets/{ConstantsUtil-CCJ0yRd8.js → ConstantsUtil-BbIzv5xN.js} +1 -1
- package/assets/ContentClient-BiP6T0o-.js +1 -0
- package/assets/Creator-CTzdaC_3.js +1 -0
- package/assets/{CssVarsProvider-CNdYCyi9.js → CssVarsProvider-CwWOpnL3.js} +3 -3
- package/assets/DeploymentBuilder-DUGl9QwQ.js +3 -0
- package/assets/{ExchangeController-BnfYxF48.js → ExchangeController-nU1L87yP.js} +1 -1
- package/assets/GetCredits-BpLPWa0W.js +1 -0
- package/assets/{HelpersUtil-C5w2ExFs.js → HelpersUtil-CvduV3iF.js} +1 -1
- package/assets/ImportListings-BNQe3kWr.js +1 -0
- package/assets/{ItemDetail-BMi8a81V.css → ItemDetail-Bu2_xAf0.css} +1 -1
- package/assets/ItemDetail-Cei4y0nZ.js +2 -0
- package/assets/MarketCheckout-Do7I_hLx.js +1 -0
- package/assets/MyAssets-Bxikz0O1.js +1 -0
- package/assets/MyFavorites-dmVn-jNs.js +1 -0
- package/assets/MyPurchases-62SCltGJ.js +1 -0
- package/assets/{NetworkUtil-Yv-DdqEo.js → NetworkUtil-CLSFaUe_.js} +1 -1
- package/assets/NotFound-CaztEVTk.js +1 -0
- package/assets/StoreSettings-DjI99hf0.js +1 -0
- package/assets/Success-KQj99-pf.js +1 -0
- package/assets/{SwapController-CUPcRb3X.js → SwapController-rop7Cy13.js} +1 -1
- package/assets/TradeService-D1JN9Ta2.js +1 -0
- package/assets/W3MFrameProviderSingleton-igVJGnIP.js +24 -0
- package/assets/{WebCryptoP256-CmfR3sjC.js → WebCryptoP256-DhJgbrxa.js} +1 -1
- package/assets/{basic-CrYMfATs.js → basic-ClmBw3no.js} +1 -1
- package/assets/biconomy-Bh94ZwGM.js +1 -0
- package/assets/{buy-gasless-uH5qu5A8.js → buy-gasless-COqF6TfJ.js} +1 -1
- package/assets/buy-qpkIddNt.js +1 -0
- package/assets/cart-checkout-0Ra3OSr3.js +1 -0
- package/assets/{categories-Dqa3M8i7.js → categories-Chd4fnsf.js} +1 -1
- package/assets/ccip-C1vfcfuy.js +1 -0
- package/assets/ccip-DLAoDUFz.js +1 -0
- package/assets/{chains-sL9nr1ux.js → chains-DxiOcj_1.js} +1 -1
- package/assets/collection-s3UDaDJs.js +1 -0
- package/assets/{common-Dyx8k-hp.js → common-B-aETE4R.js} +1 -1
- package/assets/controller-BTZuhR9-.js +2 -0
- package/assets/{core-pBN9FKMw.js → core-C_85sR5Z.js} +8 -8
- package/assets/{custom-CEHsyFlW.js → custom-H6a3SIvl.js} +1 -1
- package/assets/{data-capture-BSdkL8U7.js → data-capture-BVpYsiYY.js} +1 -1
- package/assets/dcl-schemas-BICTSpB5.js +13 -0
- package/assets/decimals-CpjItqe-.js +1 -0
- package/assets/{decimals-BA-bLcGh.js → decimals-DhBB7VPD.js} +1 -1
- package/assets/{detectExtension-G5UH8a-M.js → detectExtension-DPopT1Kb.js} +1 -1
- package/assets/{email-BMkLtjTu.js → email-CCv85Jjp.js} +7 -7
- package/assets/{embedded-wallet-CMLY6maG.js → embedded-wallet-C9sVH0T_.js} +1 -1
- package/assets/emotion-styled.browser.esm-7U6PLHlL.js +1 -0
- package/assets/engine-DPnRS4Vr.js +1 -0
- package/assets/estimate-l1-fee-0Ox9h9v8.js +1 -0
- package/assets/eth_estimateGas-B9zdAB24.js +1 -0
- package/assets/{eth_getStorageAt-DEYLIJ2f.js → eth_getStorageAt-Bp0VdFG_.js} +1 -1
- package/assets/eth_getTransactionCount-D3ux_Uy2.js +1 -0
- package/assets/{ethereum-gQdvRN4F.js → ethereum-7lBI8s3D.js} +1 -1
- package/assets/{ethers-DArfy-QF.js → ethers-w2AslR0v.js} +4 -4
- package/assets/extractIPFS-DnEM7HGg.js +1 -0
- package/assets/features-C3BsUywQ.js +5 -0
- package/assets/fetchTokenMetadata-r_xnkq91.js +2 -0
- package/assets/get-ecosystem-wallet-info-rMoPuP61.js +1 -0
- package/assets/getBalance-DxuNPttj.js +2 -0
- package/assets/getInstalledModules-BNrMQMSM.js +1 -0
- package/assets/getNFT-BlFsKfLP.js +2 -0
- package/assets/getNFT-CU0p112E.js +1 -0
- package/assets/{getOverlayAlpha-CPeU_wtJ.js → getOverlayAlpha-B57gNsKL.js} +1 -1
- package/assets/{hashTypedData-BiAfRLxc.js → hashTypedData-C1FGwn-3.js} +1 -1
- package/assets/{hashTypedData-_My6_zHk.js → hashTypedData-DiQfP4ez.js} +1 -1
- package/assets/{import-BM47oMM1.js → import-DU_OhvUC.js} +1 -1
- package/assets/in-app-wallet-calls-BREibEL9.js +1 -0
- package/assets/index-6A6nGPwX.js +1 -0
- package/assets/{index-gt71uI0K.js → index-6Kyym41O.js} +1 -1
- package/assets/{index-DMU6YRL7.js → index-6Yrg17AO.js} +1 -1
- package/assets/{index-BNhDGSX8.js → index-B1DKag9y.js} +1 -1
- package/assets/{index-C-uQhIOu.js → index-B29hZWU0.js} +7 -7
- package/assets/{index-CFasXWsQ.js → index-B6hUxDdz.js} +2 -2
- package/assets/index-B7Kupr-o.js +1 -0
- package/assets/index-B857ik7x.js +74 -0
- package/assets/index-BABdIN2I.js +2 -0
- package/assets/{index-XztZBEgs.js → index-BBeG1LQT.js} +3 -3
- package/assets/{index-CRWbHzp3.js → index-BFflIlJl.js} +1 -1
- package/assets/{index-DUwiQnps.js → index-BHgXtxHt.js} +1 -1
- package/assets/index-BKCbqIDV.js +2 -0
- package/assets/{index-CSy-_M5R.js → index-BLfwzasm.js} +1 -1
- package/assets/{index-BY2ihj74.js → index-BQUzfdXy.js} +2 -2
- package/assets/{index-Dy65iyWb.js → index-BToZY4wT.js} +1 -1
- package/assets/{index-7a1mhp_I.js → index-BdSETUQy.js} +1 -1
- package/assets/{index-DMWWvHVt.js → index-BhQRaolS.js} +1 -1
- package/assets/index-BmdMMxfk.js +5 -0
- package/assets/{index-xVgoxgG9.js → index-BtMWp3zQ.js} +3 -3
- package/assets/{index-D8bR8hF2.js → index-Bu7y6WnQ.js} +1 -1
- package/assets/{index-0YKOyKsz.js → index-BvkmByTC.js} +1 -1
- package/assets/index-BxVm-10z.js +2 -0
- package/assets/index-C3UC6Rs5.js +1 -0
- package/assets/{index-D8XdtECa.js → index-C3Zl4Bwc.js} +1 -1
- package/assets/{index-Bs2u8R9P.js → index-C4CMYXNA.js} +2 -2
- package/assets/{index-BQzrms9Y.js → index-C4TyPwon.js} +1 -1
- package/assets/{index-57pYnjcK.js → index-CBQ1afGx.js} +1 -1
- package/assets/{index-BvrUtN1i.js → index-CEy7C-8g.js} +1 -1
- package/assets/{index-CWkyddUj.js → index-CFOnfjiX.js} +2 -2
- package/assets/index-CNSWvtL0.js +38 -0
- package/assets/{index-fGWdBWqW.js → index-CNkjr1DA.js} +1 -1
- package/assets/{index-COmrTRgF.js → index-CONsWgTr.js} +1 -1
- package/assets/{index-DqO1kUFU.js → index-CPGmwqDl.js} +1 -1
- package/assets/{index-fJZF9Wlt.js → index-CPJOSm7j.js} +2 -2
- package/assets/{index-DhmytMhG.js → index-C_M9XsGM.js} +1 -1
- package/assets/index-CkdLU61h.js +1 -0
- package/assets/{index-CGf6vfVT.js → index-Clrgbbm8.js} +1 -1
- package/assets/index-CuqC8d2-.js +2 -0
- package/assets/{index-oExJUWSQ.js → index-CvEf0SP-.js} +1 -1
- package/assets/index-CvvKgwgx.js +3 -0
- package/assets/{index-Bi6W-t7S.js → index-D4Qahz_H.js} +1 -1
- package/assets/{index-B4HZUf7-.js → index-D4gUO6YF.js} +1 -1
- package/assets/index-DAGAMRoL.js +2 -0
- package/assets/{index-X5dRqFqG.js → index-DUvTWkbt.js} +1 -1
- package/assets/{index-Dih2AmlD.js → index-DVRw_gw9.js} +1 -1
- package/assets/{index-DWVC6kWx.js → index-DWwpSRi-.js} +1 -1
- package/assets/{index-COd6Hpl3.js → index-DYCwB2y3.js} +2 -2
- package/assets/{index-C1L7bhks.js → index-D_bGCuiT.js} +1 -1
- package/assets/{index-BseAK0jv.js → index-DaX1PcgD.js} +1 -1
- package/assets/{index-C6Uar8kN.js → index-Dbqfw_1n.js} +1 -1
- package/assets/{index-Ncc_A7mr.js → index-DfD3kcZV.js} +3 -3
- package/assets/{index-C-GvP7Ri.js → index-DxzGOm1i.js} +1 -1
- package/assets/{index-BE03Fup7.js → index-GCfy9KhE.js} +2 -2
- package/assets/{index-1w11c9kT.js → index-GPWVD-So.js} +1 -1
- package/assets/{index-Bwj5NrhW.js → index-HDuUFApJ.js} +1 -1
- package/assets/index-HN6Rk25C.js +1 -0
- package/assets/index-YhrkEkkQ.js +1 -0
- package/assets/{index-2lgRM28O.js → index-h7-uke9P.js} +1 -1
- package/assets/{index-BAYW-Y7J.css → index-jbcqNek9.css} +1 -1
- package/assets/{index-BvJT7BsV.js → index-kSkl-zIU.js} +1 -1
- package/assets/{index-pOWOYTZf.js → index-l4HYDe7V.js} +1 -1
- package/assets/{index-BhW68dt9.js → index-r1XpXEwi.js} +1 -1
- package/assets/{index.es-CAdXWwOm.js → index.es-BWh_1tnr.js} +4 -4
- package/assets/{index.es-CiB5ifZN.js → index.es-DtmgeITt.js} +1 -1
- package/assets/index.es-SxKlpBqs.js +1 -0
- package/assets/intl-CBcMB1D2.js +22 -0
- package/assets/{localBatchGatewayRequest--Sv8eIOm.js → localBatchGatewayRequest-Bisheu8W.js} +1 -1
- package/assets/{mana-rate-DgCtJ5pM.js → mana-rate-CPIzN4Vi.js} +1 -1
- package/assets/{native-DBJATukw.js → native-BHXbWt16.js} +1 -1
- package/assets/networks-2BN2k4cV.js +1 -0
- package/assets/{onramp-CBfgz1Ty.js → onramp-ezPwBLqh.js} +1 -1
- package/assets/openzeppelin-DKT-fJnL.js +1 -0
- package/assets/ownerOf-6bPfyUUB.js +1 -0
- package/assets/parseNft-C64AqdIb.js +2 -0
- package/assets/{parseSignature-CjbZVQR3.js → parseSignature-7t7DXXbe.js} +1 -1
- package/assets/{parseSignature-DEAl-96W.js → parseSignature-C5pd7yT7.js} +3 -3
- package/assets/{pay-with-exchange-CRwxKD_d.js → pay-with-exchange-Brk67N1Q.js} +1 -1
- package/assets/{payments-CFEkq9jj.js → payments-D1TsNJWo.js} +1 -1
- package/assets/{qr-overlay-CS6qAFtp.js → qr-overlay-CLl0wVbt.js} +6 -6
- package/assets/{receive-D_7ieG-4.js → receive-Bt81cJu3.js} +1 -1
- package/assets/resolveImplementation-D-DhhnNB.js +1 -0
- package/assets/{rpc-Cd5PGlK-.js → rpc-Bhmgfz1e.js} +1 -1
- package/assets/{secp256k1-D_53A2qu.js → secp256k1-B6MVDYDd.js} +1 -1
- package/assets/secp256k1-CdH-AER_.js +1 -0
- package/assets/secp256k1-DcIYGay5.js +1 -0
- package/assets/{send--YozeJBn.js → send-Dzpx6XEO.js} +1 -1
- package/assets/{send-batch-transaction-DiGyQeR5.js → send-batch-transaction-twz9plvu.js} +1 -1
- package/assets/{send-eip712-transaction-Dqu8RfN0.js → send-eip712-transaction-DuYMjY_7.js} +2 -2
- package/assets/send-gasless-transaction-RKoViIvt.js +2 -0
- package/assets/{sendRawTransaction-rRmixG-d.js → sendRawTransaction-B5C16ilB.js} +3 -3
- package/assets/sentry-BPJvc5GU.js +33 -0
- package/assets/{serializeTransaction-CzGG2kBz.js → serializeTransaction-COuCzUc4.js} +1 -1
- package/assets/session-proposal-DKbxmMJ5.js +1 -0
- package/assets/session-request-DuILxTGu.js +2 -0
- package/assets/{sha256-Bt6mLy1E.js → sha256-Bj4vNOnb.js} +1 -1
- package/assets/{signing-BwuIt3X5.js → signing-DW4tyFl0.js} +5 -5
- package/assets/{socials-BStKssws.js → socials-CBCHs9Sz.js} +1 -1
- package/assets/{swaps-Bid0ju8o.js → swaps-21QHpuMJ.js} +1 -1
- package/assets/{thirdweb-BMJ7fr_N.js → thirdweb-C69j7iTG.js} +3 -3
- package/assets/totalSupply-BjrHK1ZH.js +1 -0
- package/assets/trade-encoding-BtlpyT8N.js +1 -0
- package/assets/{transactionReceipt-C1w204dJ.js → transactionReceipt-CK-ZZNkd.js} +1 -1
- package/assets/transactions-DYJvsdj0.js +16 -0
- package/assets/{useInfiniteGrid-BAS-zEte.js → useInfiniteGrid-Bso7ZIlQ.js} +1 -1
- package/assets/useStore-BomIn5qc.js +2 -0
- package/assets/useTheme-gY3T76jp.js +1 -0
- package/assets/useTheme-qyEpY8zT.js +1 -0
- package/assets/{utils-BDQ8DS2k.js → utils-CsEYBURh.js} +1 -1
- package/assets/{verifyHash-yypMHIUe.js → verifyHash-DpeDDe0l.js} +1 -1
- package/assets/{w3m-modal-D4BKzcIi.js → w3m-modal-B5GRQ8Bk.js} +1 -1
- package/assets/{w3m-modal-Cf0rHk1f.js → w3m-modal-BHGgG_1M.js} +17 -17
- package/assets/{wait-for-tx-receipt-Dq_saZBt.js → wait-for-tx-receipt-D9A_u2fN.js} +1 -1
- package/assets/wallet-kind-B9P1TeIH.js +1 -0
- package/assets/{wallets-DthYtMmh.js → wallets-DvzXHK5n.js} +6 -6
- package/assets/web-connector-B4y564hP.js +9 -0
- package/assets/{writeContract-CYBPanmL.js → writeContract-ChFbWN7V.js} +1 -1
- package/assets/{zora-sepolia-B35hC1NB.js → zora-sepolia-CKeXJ6uD.js} +1 -1
- package/assets/{zoraTestnet-CupsSsoK.js → zoraTestnet-B1VFNgcm.js} +1 -1
- package/index.html +11 -8
- package/package.json +2 -2
- package/assets/Assets-Bgol1TFW.js +0 -1
- package/assets/Cart-BLK0NtgY.js +0 -1
- package/assets/Cart-C612IvK3.css +0 -1
- package/assets/Collection-oY08s2SC.js +0 -1
- package/assets/ContentClient-CcNIfFcB.js +0 -1
- package/assets/Creator-Geua9taX.js +0 -1
- package/assets/DeploymentBuilder-DOqh7sYP.js +0 -3
- package/assets/GetCredits-COdRHzqV.js +0 -1
- package/assets/ImportListings-B-zcLoS1.js +0 -1
- package/assets/ItemDetail-BEVnVvI_.js +0 -2
- package/assets/MarketCheckout-k3hh1fMb.js +0 -1
- package/assets/MyAssets-CtamOoiB.js +0 -1
- package/assets/MyFavorites-DB_RHGeZ.js +0 -1
- package/assets/MyPurchases-DLo5AL4P.js +0 -1
- package/assets/NotFound-CALTSbn3.js +0 -1
- package/assets/StoreSettings-IyPLWce9.js +0 -1
- package/assets/Success-CPrrgz5q.js +0 -1
- package/assets/TradeService-DE_CcjPe.js +0 -1
- package/assets/W3MFrameProviderSingleton-KZXDtdeN.js +0 -24
- package/assets/biconomy-CHSrNezt.js +0 -1
- package/assets/buy-C_OnDZx3.js +0 -1
- package/assets/cart-checkout-DJSPllz1.js +0 -1
- package/assets/ccip-CYomOMLt.js +0 -1
- package/assets/ccip-h7KPERy4.js +0 -1
- package/assets/collection-DOsbvafd.js +0 -1
- package/assets/controller-KHxYFosg.js +0 -2
- package/assets/decimals-CwI_mnkm.js +0 -1
- package/assets/emotion-styled.browser.esm-Bcg9MXM8.js +0 -1
- package/assets/engine-ZKKEGTTG.js +0 -1
- package/assets/estimate-l1-fee-XHZSoWjk.js +0 -1
- package/assets/eth_estimateGas-Bq7UQHDY.js +0 -1
- package/assets/eth_getTransactionCount-sK45qAke.js +0 -1
- package/assets/extractIPFS-BTNSHVMw.js +0 -1
- package/assets/features-jLiVGuCn.js +0 -5
- package/assets/fetchTokenMetadata-CLRXW5Ae.js +0 -2
- package/assets/get-ecosystem-wallet-info-HaXmkjKB.js +0 -1
- package/assets/getBalance-D85PcSgJ.js +0 -2
- package/assets/getInstalledModules-BbkWCUI_.js +0 -1
- package/assets/getNFT-Ba-KxS5w.js +0 -1
- package/assets/getNFT-CpSdZEPv.js +0 -2
- package/assets/in-app-wallet-calls-DB4mrEuh.js +0 -1
- package/assets/index-B1e1ZADY.js +0 -1
- package/assets/index-B9Xqc0Hi.js +0 -2
- package/assets/index-BS31iF_T.js +0 -2
- package/assets/index-BUYyFeCt.js +0 -2
- package/assets/index-C0OEAd0W.js +0 -1
- package/assets/index-C8L1dg3z.js +0 -1
- package/assets/index-CYWpV70P.js +0 -103
- package/assets/index-Ct5KJb97.js +0 -1
- package/assets/index-DMLSNnyb.js +0 -1
- package/assets/index-DPAyBtUP.js +0 -1
- package/assets/index-DYJHRYX4.js +0 -2
- package/assets/index-Df8J_8ta.js +0 -74
- package/assets/index-T4DqOE4M.js +0 -3
- package/assets/index-eL578oJV.js +0 -5
- package/assets/index-wsdLqN_j.js +0 -2
- package/assets/index.es-CsD1tXVc.js +0 -1
- package/assets/network-DRGleXEI.js +0 -1
- package/assets/networks-BqVCrj8Y.js +0 -1
- package/assets/openzeppelin-D2z1DmVV.js +0 -1
- package/assets/ownerOf-DFlcEy6_.js +0 -1
- package/assets/parseNft-msnZvn_A.js +0 -2
- package/assets/resolveImplementation-BxK03jeA.js +0 -1
- package/assets/secp256k1-BDhwR6SH.js +0 -1
- package/assets/secp256k1-D5XG5Cq2.js +0 -1
- package/assets/send-gasless-transaction-B5uz3mX0.js +0 -2
- package/assets/session-proposal-CCHvDJo0.js +0 -1
- package/assets/session-request-BkhA5-RY.js +0 -2
- package/assets/totalSupply--8jNML7t.js +0 -1
- package/assets/trade-encoding-Drnx1u3j.js +0 -1
- package/assets/transactions-KwvVTP9x.js +0 -16
- package/assets/useStore-D0Fp5fnX.js +0 -2
- package/assets/useTheme-CBsdNYl2.js +0 -1
- package/assets/useTheme-DU7pyJai.js +0 -1
- package/assets/wallet-kind-D_7fqJZh.js +0 -1
- package/assets/web-connector-Cahc_-N0.js +0 -9
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{bV as rt,bW as wt,bX as xt,K as Wt,bY as nt,bZ as st,b_ as it,L as Ht,b$ as Ft,c0 as Pt,c1 as x,c2 as Yt,c3 as H,c4 as w,c5 as l,c6 as b,c7 as p,c8 as vt,c9 as qt,ca as It,cb as m,cc as $t,cd as Gt,ce as ot,cf as g,cg as Zt,ch as Xt,ci as Jt,cj as Qt,ck as Kt,cl as B,cm as At,cn as te,co as S,cp as F,cq as O,cr as ee,cs as V,bU as re,ct as ne,aQ as k,b8 as se,aI as U,az as Y,b9 as R,bi as Et,aq as ie,aK as oe,aX as at,am as ae,cu as ce,ay as ue,aA as fe,C as de,x as le}from"./sendRawTransaction-rRmixG-d.js";import{a7 as ct,a9 as he,ac as ye,$ as pe,af as ut,ad as me,ay as Bt,a1 as ft,a8 as be}from"./NetworkUtil-Yv-DdqEo.js";import{s as ge}from"./secp256k1-D_53A2qu.js";function Vr(t){const e={formatters:void 0,fees:void 0,serializers:void 0,...t};function n(r){return s=>{const i=typeof s=="function"?s(r):s,o={...r,...i};return Object.assign(o,{extend:n(o)})}}return Object.assign(e,{extend:n(e)})}function kr(){return{}}function dt(t){let e;if(typeof t=="string")e=rt(t);else{const n=wt(t),r=t.length;for(let s=0;s<r;s++){const i=t[s];if(!xt(i)){e=rt(i,n);break}}}if(!e)throw new Wt({signature:t});return e}function lt(t){const e=[];if(typeof t=="string"){const n=nt(t),r=n.length;for(let s=0;s<r;s++)e.push(st(n[s],{modifiers:it}))}else{const n=wt(t),r=t.length;for(let s=0;s<r;s++){const i=t[s];if(xt(i))continue;const o=nt(i),a=o.length;for(let u=0;u<a;u++)e.push(st(o[u],{modifiers:it,structs:n}))}}if(e.length===0)throw new Ht({params:t});return e}function q(t,e={}){const{as:n=typeof t=="string"?"Hex":"Bytes"}=e,r=Ft(Pt(t));return n==="Bytes"?r:x(r)}function Ur(t,e={}){const{as:n=typeof t=="string"?"Hex":"Bytes"}=e,r=Yt(Pt(t));return n==="Bytes"?r:x(r)}function Tr(t){return H(t)&&w(t)===32}const we={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new ve({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(t){if(t<0||t>this.bytes.length-1)throw new Pe({length:this.bytes.length,position:t})},decrementPosition(t){if(t<0)throw new ht({offset:t});const e=this.position-t;this.assertPosition(e),this.position=e},getReadCount(t){return this.positionReadCount.get(t||this.position)||0},incrementPosition(t){if(t<0)throw new ht({offset:t});const e=this.position+t;this.assertPosition(e),this.position=e},inspectByte(t){const e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectBytes(t,e){const n=e??this.position;return this.assertPosition(n+t-1),this.bytes.subarray(n,n+t)},inspectUint8(t){const e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectUint16(t){const e=t??this.position;return this.assertPosition(e+1),this.dataView.getUint16(e)},inspectUint24(t){const e=t??this.position;return this.assertPosition(e+2),(this.dataView.getUint16(e)<<8)+this.dataView.getUint8(e+2)},inspectUint32(t){const e=t??this.position;return this.assertPosition(e+3),this.dataView.getUint32(e)},pushByte(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushBytes(t){this.assertPosition(this.position+t.length-1),this.bytes.set(t,this.position),this.position+=t.length},pushUint8(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushUint16(t){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,t),this.position+=2},pushUint24(t){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,t>>8),this.dataView.setUint8(this.position+2,t&255),this.position+=3},pushUint32(t){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,t),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const t=this.inspectByte();return this.position++,t},readBytes(t,e){this.assertReadLimit(),this._touch();const n=this.inspectBytes(t);return this.position+=e??t,n},readUint8(){this.assertReadLimit(),this._touch();const t=this.inspectUint8();return this.position+=1,t},readUint16(){this.assertReadLimit(),this._touch();const t=this.inspectUint16();return this.position+=2,t},readUint24(){this.assertReadLimit(),this._touch();const t=this.inspectUint24();return this.position+=3,t},readUint32(){this.assertReadLimit(),this._touch();const t=this.inspectUint32();return this.position+=4,t},get remaining(){return this.bytes.length-this.position},setPosition(t){const e=this.position;return this.assertPosition(t),this.position=t,()=>this.position=e},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const t=this.getReadCount();this.positionReadCount.set(this.position,t+1),t>0&&this.recursiveReadCount++}};function xe(t,{recursiveReadLimit:e=8192}={}){const n=Object.create(we);return n.bytes=t,n.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=e,n}class ht extends l{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}class Pe extends l{constructor({length:e,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.PositionOutOfBoundsError"})}}class ve extends l{constructor({count:e,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.RecursiveReadLimitExceededError"})}}class Ie extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){const n=super.get(e);return super.has(e)&&n!==void 0&&(this.delete(e),super.set(e,n)),n}set(e,n){if(super.set(e,n),this.maxSize&&this.size>this.maxSize){const r=this.keys().next().value;r&&this.delete(r)}return this}}const $e={checksum:new Ie(8192)},N=$e.checksum;function St(t,e={}){const{compressed:n}=e,{prefix:r,x:s,y:i}=t;if(n===!1||typeof s=="bigint"&&typeof i=="bigint"){if(r!==4)throw new yt({prefix:r,cause:new Se});return}if(n===!0||typeof s=="bigint"&&typeof i>"u"){if(r!==3&&r!==2)throw new yt({prefix:r,cause:new Be});return}throw new Ee({publicKey:t})}function _r(t){const e=(()=>{if(H(t))return zt(t);if(qt(t))return Ae(t);const{prefix:n,x:r,y:s}=t;return typeof r=="bigint"&&typeof s=="bigint"?{prefix:n??4,x:r,y:s}:{prefix:n,x:r}})();return St(e),e}function Ae(t){return zt(x(t))}function zt(t){if(t.length!==132&&t.length!==130&&t.length!==68)throw new ze({publicKey:t});if(t.length===130){const r=BigInt(m(t,0,32)),s=BigInt(m(t,32,64));return{prefix:4,x:r,y:s}}if(t.length===132){const r=Number(m(t,0,1)),s=BigInt(m(t,1,33)),i=BigInt(m(t,33,65));return{prefix:r,x:s,y:i}}const e=Number(m(t,0,1)),n=BigInt(m(t,1,33));return{prefix:e,x:n}}function Mr(t,e={}){return vt(Ct(t,e))}function Ct(t,e={}){St(t);const{prefix:n,x:r,y:s}=t,{includePrefix:i=!0}=e;return b(i?p(n,{size:1}):"0x",p(r,{size:32}),typeof s=="bigint"?p(s,{size:32}):"0x")}class Ee extends l{constructor({publicKey:e}){super(`Value \`${It(e)}\` is not a valid public key.`,{metaMessages:["Public key must contain:","- an `x` and `prefix` value (compressed)","- an `x`, `y`, and `prefix` value (uncompressed)"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidError"})}}class yt extends l{constructor({prefix:e,cause:n}){super(`Prefix "${e}" is invalid.`,{cause:n}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidPrefixError"})}}class Be extends l{constructor(){super("Prefix must be 2 or 3 for compressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidCompressedPrefixError"})}}class Se extends l{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidUncompressedPrefixError"})}}let ze=class extends l{constructor({publicKey:e}){super(`Value \`${e}\` is an invalid public key size.`,{metaMessages:["Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",`Received ${w($t(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidSerializedSizeError"})}};const Ce=/^0x[a-fA-F0-9]{40}$/;function v(t,e={}){const{strict:n=!0}=e;if(!Ce.test(t))throw new pt({address:t,cause:new Re});if(n){if(t.toLowerCase()===t)return;if(G(t)!==t)throw new pt({address:t,cause:new Le})}}function G(t){if(N.has(t))return N.get(t);v(t,{strict:!1});const e=t.substring(2).toLowerCase(),n=q(Gt(e),{as:"Bytes"}),r=e.split("");for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&r[i]&&(r[i]=r[i].toUpperCase()),(n[i>>1]&15)>=8&&r[i+1]&&(r[i+1]=r[i+1].toUpperCase());const s=`0x${r.join("")}`;return N.set(t,s),s}function Oe(t,e={}){const{checksum:n=!1}=e;return v(t),n?G(t):t}function Wr(t,e={}){const n=q(`0x${Ct(t).slice(4)}`).substring(26);return Oe(`0x${n}`,e)}function Hr(t,e){return v(t,{strict:!1}),v(e,{strict:!1}),t.toLowerCase()===e.toLowerCase()}function T(t,e={}){const{strict:n=!0}=e??{};try{return v(t,{strict:n}),!0}catch{return!1}}class pt extends l{constructor({address:e,cause:n}){super(`Address "${e}" is invalid.`,{cause:n}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}class Re extends l{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}class Le extends l{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}const Ne=/^(.*)\[([0-9]*)\]$/,je=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Ot=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,mt=2n**256n-1n;function Z(t,e={}){const{recovered:n}=e;if(typeof t.r>"u")throw new j({signature:t});if(typeof t.s>"u")throw new j({signature:t});if(n&&typeof t.yParity>"u")throw new j({signature:t});if(t.r<0n||t.r>mt)throw new We({value:t.r});if(t.s<0n||t.s>mt)throw new He({value:t.s});if(typeof t.yParity=="number"&&t.yParity!==0&&t.yParity!==1)throw new L({value:t.yParity})}function Ve(t){return Rt(x(t))}function Rt(t){if(t.length!==130&&t.length!==132)throw new De({signature:t});const e=BigInt(m(t,0,32)),n=BigInt(m(t,32,64)),r=(()=>{const s=+`0x${t.slice(130)}`;if(!Number.isNaN(s))try{return X(s)}catch{throw new L({value:s})}})();return typeof r>"u"?{r:e,s:n}:{r:e,s:n,yParity:r}}function ke(t){if(!(typeof t.r>"u")&&!(typeof t.s>"u"))return Lt(t)}function Lt(t){const e=typeof t=="string"?Rt(t):t instanceof Uint8Array?Ve(t):typeof t.r=="string"?Te(t):t.v?Ue(t):{r:t.r,s:t.s,...typeof t.yParity<"u"?{yParity:t.yParity}:{}};return Z(e),e}function Ue(t){return{r:t.r,s:t.s,yParity:X(t.v)}}function Te(t){const e=(()=>{const n=t.v?Number(t.v):void 0;let r=t.yParity?Number(t.yParity):void 0;if(typeof n=="number"&&typeof r!="number"&&(r=X(n)),typeof r!="number")throw new L({value:t.yParity});return r})();return{r:BigInt(t.r),s:BigInt(t.s),yParity:e}}function Fr(t){const[e,n,r]=t;return Lt({r:n==="0x"?0n:BigInt(n),s:r==="0x"?0n:BigInt(r),yParity:e==="0x"?0:Number(e)})}function Yr(t){Z(t);const e=t.r,n=t.s;return b(p(e,{size:32}),p(n,{size:32}),typeof t.yParity=="number"?p(Me(t.yParity),{size:1}):"0x")}function _e(t){const{r:e,s:n,yParity:r}=t;return{r:p(e,{size:32}),s:p(n,{size:32}),yParity:r===0?"0x0":"0x1"}}function qr(t){const{r:e,s:n,yParity:r}=t;return[r?"0x01":"0x",e===0n?"0x":ot(p(e)),n===0n?"0x":ot(p(n))]}function X(t){if(t===0||t===27)return 0;if(t===1||t===28)return 1;if(t>=35)return t%2===0?1:0;throw new Fe({value:t})}function Me(t){if(t===0)return 27;if(t===1)return 28;throw new L({value:t})}class De extends l{constructor({signature:e}){super(`Value \`${e}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${w($t(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}class j extends l{constructor({signature:e}){super(`Signature \`${It(e)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}class We extends l{constructor({value:e}){super(`Value \`${e}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}class He extends l{constructor({value:e}){super(`Value \`${e}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}class L extends l{constructor({value:e}){super(`Value \`${e}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}class Fe extends l{constructor({value:e}){super(`Value \`${e}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}function E(t,e,n){const{checksumAddress:r,staticPosition:s}=n,i=K(e.type);if(i){const[o,a]=i;return qe(t,{...e,type:a},{checksumAddress:r,length:o,staticPosition:s})}if(e.type==="tuple")return Je(t,e,{checksumAddress:r,staticPosition:s});if(e.type==="address")return Ye(t,{checksum:r});if(e.type==="bool")return Ge(t);if(e.type.startsWith("bytes"))return Ze(t,e,{staticPosition:s});if(e.type.startsWith("uint")||e.type.startsWith("int"))return Xe(t,e);if(e.type==="string")return Qe(t,{staticPosition:s});throw new tt(e.type)}const bt=32,_=32;function Ye(t,e={}){const{checksum:n=!1}=e,r=t.readBytes(32);return[(i=>n?G(i):i)(x(Zt(r,-20))),32]}function qe(t,e,n){const{checksumAddress:r,length:s,staticPosition:i}=n;if(!s){const u=g(t.readBytes(_)),c=i+u,f=c+bt;t.setPosition(c);const d=g(t.readBytes(bt)),y=z(e);let h=0;const $=[];for(let P=0;P<d;++P){t.setPosition(f+(y?P*32:h));const[C,Dt]=E(t,e,{checksumAddress:r,staticPosition:f});h+=Dt,$.push(C)}return t.setPosition(i+32),[$,32]}if(z(e)){const u=g(t.readBytes(_)),c=i+u,f=[];for(let d=0;d<s;++d){t.setPosition(c+d*32);const[y]=E(t,e,{checksumAddress:r,staticPosition:c});f.push(y)}return t.setPosition(i+32),[f,32]}let o=0;const a=[];for(let u=0;u<s;++u){const[c,f]=E(t,e,{checksumAddress:r,staticPosition:i+o});o+=f,a.push(c)}return[a,o]}function Ge(t){return[Xt(t.readBytes(32),{size:32}),32]}function Ze(t,e,{staticPosition:n}){const[r,s]=e.type.split("bytes");if(!s){const o=g(t.readBytes(32));t.setPosition(n+o);const a=g(t.readBytes(32));if(a===0)return t.setPosition(n+32),["0x",32];const u=t.readBytes(a);return t.setPosition(n+32),[x(u),32]}return[x(t.readBytes(Number.parseInt(s,10),32)),32]}function Xe(t,e){const n=e.type.startsWith("int"),r=Number.parseInt(e.type.split("int")[1]||"256",10),s=t.readBytes(32);return[r>48?Jt(s,{signed:n}):g(s,{signed:n}),32]}function Je(t,e,n){const{checksumAddress:r,staticPosition:s}=n,i=e.components.length===0||e.components.some(({name:u})=>!u),o=i?[]:{};let a=0;if(z(e)){const u=g(t.readBytes(_)),c=s+u;for(let f=0;f<e.components.length;++f){const d=e.components[f];t.setPosition(c+a);const[y,h]=E(t,d,{checksumAddress:r,staticPosition:c});a+=h,o[i?f:d==null?void 0:d.name]=y}return t.setPosition(s+32),[o,32]}for(let u=0;u<e.components.length;++u){const c=e.components[u],[f,d]=E(t,c,{checksumAddress:r,staticPosition:s});o[i?u:c==null?void 0:c.name]=f,a+=d}return[o,a]}function Qe(t,{staticPosition:e}){const n=g(t.readBytes(32)),r=e+n;t.setPosition(r);const s=g(t.readBytes(32));if(s===0)return t.setPosition(e+32),["",32];const i=t.readBytes(s,32),o=Qt(Kt(i));return t.setPosition(e+32),[o,32]}function Ke({checksumAddress:t,parameters:e,values:n}){const r=[];for(let s=0;s<e.length;s++)r.push(J({checksumAddress:t,parameter:e[s],value:n[s]}));return r}function J({checksumAddress:t=!1,parameter:e,value:n}){const r=e,s=K(r.type);if(s){const[i,o]=s;return er(n,{checksumAddress:t,length:i,parameter:{...r,type:o}})}if(r.type==="tuple")return or(n,{checksumAddress:t,parameter:r});if(r.type==="address")return tr(n,{checksum:t});if(r.type==="bool")return nr(n);if(r.type.startsWith("uint")||r.type.startsWith("int")){const i=r.type.startsWith("int"),[,,o="256"]=Ot.exec(r.type)??[];return sr(n,{signed:i,size:Number(o)})}if(r.type.startsWith("bytes"))return rr(n,{type:r.type});if(r.type==="string")return ir(n);throw new tt(r.type)}function Q(t){let e=0;for(let i=0;i<t.length;i++){const{dynamic:o,encoded:a}=t[i];o?e+=32:e+=w(a)}const n=[],r=[];let s=0;for(let i=0;i<t.length;i++){const{dynamic:o,encoded:a}=t[i];o?(n.push(p(e+s,{size:32})),r.push(a),s+=w(a)):n.push(a)}return b(...n,...r)}function tr(t,e){const{checksum:n=!1}=e;return v(t,{strict:n}),{dynamic:!1,encoded:B(t.toLowerCase())}}function er(t,e){const{checksumAddress:n,length:r,parameter:s}=e,i=r===null;if(!Array.isArray(t))throw new lr(t);if(!i&&t.length!==r)throw new dr({expectedLength:r,givenLength:t.length,type:`${s.type}[${r}]`});let o=!1;const a=[];for(let u=0;u<t.length;u++){const c=J({checksumAddress:n,parameter:s,value:t[u]});c.dynamic&&(o=!0),a.push(c)}if(i||o){const u=Q(a);if(i){const c=p(a.length,{size:32});return{dynamic:!0,encoded:a.length>0?b(c,u):c}}if(o)return{dynamic:!0,encoded:u}}return{dynamic:!1,encoded:b(...a.map(({encoded:u})=>u))}}function rr(t,{type:e}){const[,n]=e.split("bytes"),r=w(t);if(!n){let s=t;return r%32!==0&&(s=S(s,Math.ceil((t.length-2)/2/32)*32)),{dynamic:!0,encoded:b(B(p(r,{size:32})),s)}}if(r!==Number.parseInt(n,10))throw new jt({expectedSize:Number.parseInt(n,10),value:t});return{dynamic:!1,encoded:S(t)}}function nr(t){if(typeof t!="boolean")throw new l(`Invalid boolean value: "${t}" (type: ${typeof t}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:B(At(t))}}function sr(t,{signed:e,size:n}){if(typeof n=="number"){const r=2n**(BigInt(n)-(e?1n:0n))-1n,s=e?-r-1n:0n;if(t>r||t<s)throw new te({max:r.toString(),min:s.toString(),signed:e,size:n/8,value:t.toString()})}return{dynamic:!1,encoded:p(t,{size:32,signed:e})}}function ir(t){const e=F(t),n=Math.ceil(w(e)/32),r=[];for(let s=0;s<n;s++)r.push(S(m(e,s*32,(s+1)*32)));return{dynamic:!0,encoded:b(S(p(w(e),{size:32})),...r)}}function or(t,e){const{checksumAddress:n,parameter:r}=e;let s=!1;const i=[];for(let o=0;o<r.components.length;o++){const a=r.components[o],u=Array.isArray(t)?o:a.name,c=J({checksumAddress:n,parameter:a,value:t[u]});i.push(c),c.dynamic&&(s=!0)}return{dynamic:s,encoded:s?Q(i):b(...i.map(({encoded:o})=>o))}}function K(t){const e=t.match(/^(.*)\[(\d+)?\]$/);return e?[e[2]?Number(e[2]):null,e[1]]:void 0}function z(t){var r;const{type:e}=t;if(e==="string"||e==="bytes"||e.endsWith("[]"))return!0;if(e==="tuple")return(r=t.components)==null?void 0:r.some(z);const n=K(t.type);return!!(n&&z({...t,type:n[1]}))}function ar(t,e,n={}){const{as:r="Array",checksumAddress:s=!1}=n,i=typeof e=="string"?vt(e):e,o=xe(i);if(O(i)===0&&t.length>0)throw new fr;if(O(i)&&O(i)<32)throw new ur({data:typeof e=="string"?e:x(e),parameters:t,size:O(i)});let a=0;const u=r==="Array"?[]:{};for(let c=0;c<t.length;++c){const f=t[c];o.setPosition(a);const[d,y]=E(o,f,{checksumAddress:s,staticPosition:0});a+=y,r==="Array"?u.push(d):u[f.name??c]=d}return u}function cr(t,e,n){const{checksumAddress:r=!1}={};if(t.length!==e.length)throw new Vt({expectedLength:t.length,givenLength:e.length});const s=Ke({checksumAddress:r,parameters:t,values:e}),i=Q(s);return i.length===0?"0x":i}function M(t,e){if(t.length!==e.length)throw new Vt({expectedLength:t.length,givenLength:e.length});const n=[];for(let r=0;r<t.length;r++){const s=t[r],i=e[r];n.push(M.encode(s,i))}return b(...n)}(function(t){function e(n,r,s=!1){if(n==="address"){const u=r;return v(u),B(u.toLowerCase(),s?32:0)}if(n==="string")return F(r);if(n==="bytes")return r;if(n==="bool")return B(At(r),s?32:1);const i=n.match(Ot);if(i){const[u,c,f="256"]=i,d=Number.parseInt(f,10)/8;return p(r,{size:s?32:d,signed:c==="int"})}const o=n.match(je);if(o){const[u,c]=o;if(Number.parseInt(c,10)!==(r.length-2)/2)throw new jt({expectedSize:Number.parseInt(c,10),value:r});return S(r,s?32:0)}const a=n.match(Ne);if(a&&Array.isArray(r)){const[u,c]=a,f=[];for(let d=0;d<r.length;d++)f.push(e(c,r[d],!0));return f.length===0?"0x":b(...f)}throw new tt(n)}t.encode=e})(M||(M={}));function Nt(t){return Array.isArray(t)&&typeof t[0]=="string"||typeof t=="string"?lt(t):t}class ur extends l{constructor({data:e,parameters:n,size:r}){super(`Data size of ${r} bytes is too small for given parameters.`,{metaMessages:[`Params: (${ee(n)})`,`Data: ${e} (${r} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.DataSizeTooSmallError"})}}class fr extends l{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ZeroDataError"})}}class dr extends l{constructor({expectedLength:e,givenLength:n,type:r}){super(`Array length mismatch for type \`${r}\`. Expected: \`${e}\`. Given: \`${n}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLengthMismatchError"})}}class jt extends l{constructor({expectedSize:e,value:n}){super(`Size of bytes "${n}" (bytes${w(n)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}class Vt extends l{constructor({expectedLength:e,givenLength:n}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${e}`,`Given length (values): ${n}`].join(`
|
|
1
|
+
import{bV as rt,bW as wt,bX as xt,K as Wt,bY as nt,bZ as st,b_ as it,L as Ht,b$ as Ft,c0 as Pt,c1 as x,c2 as Yt,c3 as H,c4 as w,c5 as l,c6 as b,c7 as p,c8 as vt,c9 as qt,ca as It,cb as m,cc as $t,cd as Gt,ce as ot,cf as g,cg as Zt,ch as Xt,ci as Jt,cj as Qt,ck as Kt,cl as B,cm as At,cn as te,co as S,cp as F,cq as O,cr as ee,cs as V,bU as re,ct as ne,aQ as k,b8 as se,aI as U,az as Y,b9 as R,bi as Et,aq as ie,aK as oe,aX as at,am as ae,cu as ce,ay as ue,aA as fe,C as de,x as le}from"./sendRawTransaction-B5C16ilB.js";import{a7 as ct,a9 as he,ac as ye,$ as pe,af as ut,ad as me,ay as Bt,a1 as ft,a8 as be}from"./NetworkUtil-CLSFaUe_.js";import{s as ge}from"./secp256k1-B6MVDYDd.js";function Vr(t){const e={formatters:void 0,fees:void 0,serializers:void 0,...t};function n(r){return s=>{const i=typeof s=="function"?s(r):s,o={...r,...i};return Object.assign(o,{extend:n(o)})}}return Object.assign(e,{extend:n(e)})}function kr(){return{}}function dt(t){let e;if(typeof t=="string")e=rt(t);else{const n=wt(t),r=t.length;for(let s=0;s<r;s++){const i=t[s];if(!xt(i)){e=rt(i,n);break}}}if(!e)throw new Wt({signature:t});return e}function lt(t){const e=[];if(typeof t=="string"){const n=nt(t),r=n.length;for(let s=0;s<r;s++)e.push(st(n[s],{modifiers:it}))}else{const n=wt(t),r=t.length;for(let s=0;s<r;s++){const i=t[s];if(xt(i))continue;const o=nt(i),a=o.length;for(let u=0;u<a;u++)e.push(st(o[u],{modifiers:it,structs:n}))}}if(e.length===0)throw new Ht({params:t});return e}function q(t,e={}){const{as:n=typeof t=="string"?"Hex":"Bytes"}=e,r=Ft(Pt(t));return n==="Bytes"?r:x(r)}function Ur(t,e={}){const{as:n=typeof t=="string"?"Hex":"Bytes"}=e,r=Yt(Pt(t));return n==="Bytes"?r:x(r)}function Tr(t){return H(t)&&w(t)===32}const we={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new ve({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(t){if(t<0||t>this.bytes.length-1)throw new Pe({length:this.bytes.length,position:t})},decrementPosition(t){if(t<0)throw new ht({offset:t});const e=this.position-t;this.assertPosition(e),this.position=e},getReadCount(t){return this.positionReadCount.get(t||this.position)||0},incrementPosition(t){if(t<0)throw new ht({offset:t});const e=this.position+t;this.assertPosition(e),this.position=e},inspectByte(t){const e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectBytes(t,e){const n=e??this.position;return this.assertPosition(n+t-1),this.bytes.subarray(n,n+t)},inspectUint8(t){const e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectUint16(t){const e=t??this.position;return this.assertPosition(e+1),this.dataView.getUint16(e)},inspectUint24(t){const e=t??this.position;return this.assertPosition(e+2),(this.dataView.getUint16(e)<<8)+this.dataView.getUint8(e+2)},inspectUint32(t){const e=t??this.position;return this.assertPosition(e+3),this.dataView.getUint32(e)},pushByte(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushBytes(t){this.assertPosition(this.position+t.length-1),this.bytes.set(t,this.position),this.position+=t.length},pushUint8(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushUint16(t){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,t),this.position+=2},pushUint24(t){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,t>>8),this.dataView.setUint8(this.position+2,t&255),this.position+=3},pushUint32(t){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,t),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const t=this.inspectByte();return this.position++,t},readBytes(t,e){this.assertReadLimit(),this._touch();const n=this.inspectBytes(t);return this.position+=e??t,n},readUint8(){this.assertReadLimit(),this._touch();const t=this.inspectUint8();return this.position+=1,t},readUint16(){this.assertReadLimit(),this._touch();const t=this.inspectUint16();return this.position+=2,t},readUint24(){this.assertReadLimit(),this._touch();const t=this.inspectUint24();return this.position+=3,t},readUint32(){this.assertReadLimit(),this._touch();const t=this.inspectUint32();return this.position+=4,t},get remaining(){return this.bytes.length-this.position},setPosition(t){const e=this.position;return this.assertPosition(t),this.position=t,()=>this.position=e},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const t=this.getReadCount();this.positionReadCount.set(this.position,t+1),t>0&&this.recursiveReadCount++}};function xe(t,{recursiveReadLimit:e=8192}={}){const n=Object.create(we);return n.bytes=t,n.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=e,n}class ht extends l{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}class Pe extends l{constructor({length:e,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.PositionOutOfBoundsError"})}}class ve extends l{constructor({count:e,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.RecursiveReadLimitExceededError"})}}class Ie extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){const n=super.get(e);return super.has(e)&&n!==void 0&&(this.delete(e),super.set(e,n)),n}set(e,n){if(super.set(e,n),this.maxSize&&this.size>this.maxSize){const r=this.keys().next().value;r&&this.delete(r)}return this}}const $e={checksum:new Ie(8192)},N=$e.checksum;function St(t,e={}){const{compressed:n}=e,{prefix:r,x:s,y:i}=t;if(n===!1||typeof s=="bigint"&&typeof i=="bigint"){if(r!==4)throw new yt({prefix:r,cause:new Se});return}if(n===!0||typeof s=="bigint"&&typeof i>"u"){if(r!==3&&r!==2)throw new yt({prefix:r,cause:new Be});return}throw new Ee({publicKey:t})}function _r(t){const e=(()=>{if(H(t))return zt(t);if(qt(t))return Ae(t);const{prefix:n,x:r,y:s}=t;return typeof r=="bigint"&&typeof s=="bigint"?{prefix:n??4,x:r,y:s}:{prefix:n,x:r}})();return St(e),e}function Ae(t){return zt(x(t))}function zt(t){if(t.length!==132&&t.length!==130&&t.length!==68)throw new ze({publicKey:t});if(t.length===130){const r=BigInt(m(t,0,32)),s=BigInt(m(t,32,64));return{prefix:4,x:r,y:s}}if(t.length===132){const r=Number(m(t,0,1)),s=BigInt(m(t,1,33)),i=BigInt(m(t,33,65));return{prefix:r,x:s,y:i}}const e=Number(m(t,0,1)),n=BigInt(m(t,1,33));return{prefix:e,x:n}}function Mr(t,e={}){return vt(Ct(t,e))}function Ct(t,e={}){St(t);const{prefix:n,x:r,y:s}=t,{includePrefix:i=!0}=e;return b(i?p(n,{size:1}):"0x",p(r,{size:32}),typeof s=="bigint"?p(s,{size:32}):"0x")}class Ee extends l{constructor({publicKey:e}){super(`Value \`${It(e)}\` is not a valid public key.`,{metaMessages:["Public key must contain:","- an `x` and `prefix` value (compressed)","- an `x`, `y`, and `prefix` value (uncompressed)"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidError"})}}class yt extends l{constructor({prefix:e,cause:n}){super(`Prefix "${e}" is invalid.`,{cause:n}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidPrefixError"})}}class Be extends l{constructor(){super("Prefix must be 2 or 3 for compressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidCompressedPrefixError"})}}class Se extends l{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidUncompressedPrefixError"})}}let ze=class extends l{constructor({publicKey:e}){super(`Value \`${e}\` is an invalid public key size.`,{metaMessages:["Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",`Received ${w($t(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidSerializedSizeError"})}};const Ce=/^0x[a-fA-F0-9]{40}$/;function v(t,e={}){const{strict:n=!0}=e;if(!Ce.test(t))throw new pt({address:t,cause:new Re});if(n){if(t.toLowerCase()===t)return;if(G(t)!==t)throw new pt({address:t,cause:new Le})}}function G(t){if(N.has(t))return N.get(t);v(t,{strict:!1});const e=t.substring(2).toLowerCase(),n=q(Gt(e),{as:"Bytes"}),r=e.split("");for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&r[i]&&(r[i]=r[i].toUpperCase()),(n[i>>1]&15)>=8&&r[i+1]&&(r[i+1]=r[i+1].toUpperCase());const s=`0x${r.join("")}`;return N.set(t,s),s}function Oe(t,e={}){const{checksum:n=!1}=e;return v(t),n?G(t):t}function Wr(t,e={}){const n=q(`0x${Ct(t).slice(4)}`).substring(26);return Oe(`0x${n}`,e)}function Hr(t,e){return v(t,{strict:!1}),v(e,{strict:!1}),t.toLowerCase()===e.toLowerCase()}function T(t,e={}){const{strict:n=!0}=e??{};try{return v(t,{strict:n}),!0}catch{return!1}}class pt extends l{constructor({address:e,cause:n}){super(`Address "${e}" is invalid.`,{cause:n}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}class Re extends l{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}class Le extends l{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}const Ne=/^(.*)\[([0-9]*)\]$/,je=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Ot=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,mt=2n**256n-1n;function Z(t,e={}){const{recovered:n}=e;if(typeof t.r>"u")throw new j({signature:t});if(typeof t.s>"u")throw new j({signature:t});if(n&&typeof t.yParity>"u")throw new j({signature:t});if(t.r<0n||t.r>mt)throw new We({value:t.r});if(t.s<0n||t.s>mt)throw new He({value:t.s});if(typeof t.yParity=="number"&&t.yParity!==0&&t.yParity!==1)throw new L({value:t.yParity})}function Ve(t){return Rt(x(t))}function Rt(t){if(t.length!==130&&t.length!==132)throw new De({signature:t});const e=BigInt(m(t,0,32)),n=BigInt(m(t,32,64)),r=(()=>{const s=+`0x${t.slice(130)}`;if(!Number.isNaN(s))try{return X(s)}catch{throw new L({value:s})}})();return typeof r>"u"?{r:e,s:n}:{r:e,s:n,yParity:r}}function ke(t){if(!(typeof t.r>"u")&&!(typeof t.s>"u"))return Lt(t)}function Lt(t){const e=typeof t=="string"?Rt(t):t instanceof Uint8Array?Ve(t):typeof t.r=="string"?Te(t):t.v?Ue(t):{r:t.r,s:t.s,...typeof t.yParity<"u"?{yParity:t.yParity}:{}};return Z(e),e}function Ue(t){return{r:t.r,s:t.s,yParity:X(t.v)}}function Te(t){const e=(()=>{const n=t.v?Number(t.v):void 0;let r=t.yParity?Number(t.yParity):void 0;if(typeof n=="number"&&typeof r!="number"&&(r=X(n)),typeof r!="number")throw new L({value:t.yParity});return r})();return{r:BigInt(t.r),s:BigInt(t.s),yParity:e}}function Fr(t){const[e,n,r]=t;return Lt({r:n==="0x"?0n:BigInt(n),s:r==="0x"?0n:BigInt(r),yParity:e==="0x"?0:Number(e)})}function Yr(t){Z(t);const e=t.r,n=t.s;return b(p(e,{size:32}),p(n,{size:32}),typeof t.yParity=="number"?p(Me(t.yParity),{size:1}):"0x")}function _e(t){const{r:e,s:n,yParity:r}=t;return{r:p(e,{size:32}),s:p(n,{size:32}),yParity:r===0?"0x0":"0x1"}}function qr(t){const{r:e,s:n,yParity:r}=t;return[r?"0x01":"0x",e===0n?"0x":ot(p(e)),n===0n?"0x":ot(p(n))]}function X(t){if(t===0||t===27)return 0;if(t===1||t===28)return 1;if(t>=35)return t%2===0?1:0;throw new Fe({value:t})}function Me(t){if(t===0)return 27;if(t===1)return 28;throw new L({value:t})}class De extends l{constructor({signature:e}){super(`Value \`${e}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${w($t(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}class j extends l{constructor({signature:e}){super(`Signature \`${It(e)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}class We extends l{constructor({value:e}){super(`Value \`${e}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}class He extends l{constructor({value:e}){super(`Value \`${e}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}class L extends l{constructor({value:e}){super(`Value \`${e}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}class Fe extends l{constructor({value:e}){super(`Value \`${e}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}function E(t,e,n){const{checksumAddress:r,staticPosition:s}=n,i=K(e.type);if(i){const[o,a]=i;return qe(t,{...e,type:a},{checksumAddress:r,length:o,staticPosition:s})}if(e.type==="tuple")return Je(t,e,{checksumAddress:r,staticPosition:s});if(e.type==="address")return Ye(t,{checksum:r});if(e.type==="bool")return Ge(t);if(e.type.startsWith("bytes"))return Ze(t,e,{staticPosition:s});if(e.type.startsWith("uint")||e.type.startsWith("int"))return Xe(t,e);if(e.type==="string")return Qe(t,{staticPosition:s});throw new tt(e.type)}const bt=32,_=32;function Ye(t,e={}){const{checksum:n=!1}=e,r=t.readBytes(32);return[(i=>n?G(i):i)(x(Zt(r,-20))),32]}function qe(t,e,n){const{checksumAddress:r,length:s,staticPosition:i}=n;if(!s){const u=g(t.readBytes(_)),c=i+u,f=c+bt;t.setPosition(c);const d=g(t.readBytes(bt)),y=z(e);let h=0;const $=[];for(let P=0;P<d;++P){t.setPosition(f+(y?P*32:h));const[C,Dt]=E(t,e,{checksumAddress:r,staticPosition:f});h+=Dt,$.push(C)}return t.setPosition(i+32),[$,32]}if(z(e)){const u=g(t.readBytes(_)),c=i+u,f=[];for(let d=0;d<s;++d){t.setPosition(c+d*32);const[y]=E(t,e,{checksumAddress:r,staticPosition:c});f.push(y)}return t.setPosition(i+32),[f,32]}let o=0;const a=[];for(let u=0;u<s;++u){const[c,f]=E(t,e,{checksumAddress:r,staticPosition:i+o});o+=f,a.push(c)}return[a,o]}function Ge(t){return[Xt(t.readBytes(32),{size:32}),32]}function Ze(t,e,{staticPosition:n}){const[r,s]=e.type.split("bytes");if(!s){const o=g(t.readBytes(32));t.setPosition(n+o);const a=g(t.readBytes(32));if(a===0)return t.setPosition(n+32),["0x",32];const u=t.readBytes(a);return t.setPosition(n+32),[x(u),32]}return[x(t.readBytes(Number.parseInt(s,10),32)),32]}function Xe(t,e){const n=e.type.startsWith("int"),r=Number.parseInt(e.type.split("int")[1]||"256",10),s=t.readBytes(32);return[r>48?Jt(s,{signed:n}):g(s,{signed:n}),32]}function Je(t,e,n){const{checksumAddress:r,staticPosition:s}=n,i=e.components.length===0||e.components.some(({name:u})=>!u),o=i?[]:{};let a=0;if(z(e)){const u=g(t.readBytes(_)),c=s+u;for(let f=0;f<e.components.length;++f){const d=e.components[f];t.setPosition(c+a);const[y,h]=E(t,d,{checksumAddress:r,staticPosition:c});a+=h,o[i?f:d==null?void 0:d.name]=y}return t.setPosition(s+32),[o,32]}for(let u=0;u<e.components.length;++u){const c=e.components[u],[f,d]=E(t,c,{checksumAddress:r,staticPosition:s});o[i?u:c==null?void 0:c.name]=f,a+=d}return[o,a]}function Qe(t,{staticPosition:e}){const n=g(t.readBytes(32)),r=e+n;t.setPosition(r);const s=g(t.readBytes(32));if(s===0)return t.setPosition(e+32),["",32];const i=t.readBytes(s,32),o=Qt(Kt(i));return t.setPosition(e+32),[o,32]}function Ke({checksumAddress:t,parameters:e,values:n}){const r=[];for(let s=0;s<e.length;s++)r.push(J({checksumAddress:t,parameter:e[s],value:n[s]}));return r}function J({checksumAddress:t=!1,parameter:e,value:n}){const r=e,s=K(r.type);if(s){const[i,o]=s;return er(n,{checksumAddress:t,length:i,parameter:{...r,type:o}})}if(r.type==="tuple")return or(n,{checksumAddress:t,parameter:r});if(r.type==="address")return tr(n,{checksum:t});if(r.type==="bool")return nr(n);if(r.type.startsWith("uint")||r.type.startsWith("int")){const i=r.type.startsWith("int"),[,,o="256"]=Ot.exec(r.type)??[];return sr(n,{signed:i,size:Number(o)})}if(r.type.startsWith("bytes"))return rr(n,{type:r.type});if(r.type==="string")return ir(n);throw new tt(r.type)}function Q(t){let e=0;for(let i=0;i<t.length;i++){const{dynamic:o,encoded:a}=t[i];o?e+=32:e+=w(a)}const n=[],r=[];let s=0;for(let i=0;i<t.length;i++){const{dynamic:o,encoded:a}=t[i];o?(n.push(p(e+s,{size:32})),r.push(a),s+=w(a)):n.push(a)}return b(...n,...r)}function tr(t,e){const{checksum:n=!1}=e;return v(t,{strict:n}),{dynamic:!1,encoded:B(t.toLowerCase())}}function er(t,e){const{checksumAddress:n,length:r,parameter:s}=e,i=r===null;if(!Array.isArray(t))throw new lr(t);if(!i&&t.length!==r)throw new dr({expectedLength:r,givenLength:t.length,type:`${s.type}[${r}]`});let o=!1;const a=[];for(let u=0;u<t.length;u++){const c=J({checksumAddress:n,parameter:s,value:t[u]});c.dynamic&&(o=!0),a.push(c)}if(i||o){const u=Q(a);if(i){const c=p(a.length,{size:32});return{dynamic:!0,encoded:a.length>0?b(c,u):c}}if(o)return{dynamic:!0,encoded:u}}return{dynamic:!1,encoded:b(...a.map(({encoded:u})=>u))}}function rr(t,{type:e}){const[,n]=e.split("bytes"),r=w(t);if(!n){let s=t;return r%32!==0&&(s=S(s,Math.ceil((t.length-2)/2/32)*32)),{dynamic:!0,encoded:b(B(p(r,{size:32})),s)}}if(r!==Number.parseInt(n,10))throw new jt({expectedSize:Number.parseInt(n,10),value:t});return{dynamic:!1,encoded:S(t)}}function nr(t){if(typeof t!="boolean")throw new l(`Invalid boolean value: "${t}" (type: ${typeof t}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:B(At(t))}}function sr(t,{signed:e,size:n}){if(typeof n=="number"){const r=2n**(BigInt(n)-(e?1n:0n))-1n,s=e?-r-1n:0n;if(t>r||t<s)throw new te({max:r.toString(),min:s.toString(),signed:e,size:n/8,value:t.toString()})}return{dynamic:!1,encoded:p(t,{size:32,signed:e})}}function ir(t){const e=F(t),n=Math.ceil(w(e)/32),r=[];for(let s=0;s<n;s++)r.push(S(m(e,s*32,(s+1)*32)));return{dynamic:!0,encoded:b(S(p(w(e),{size:32})),...r)}}function or(t,e){const{checksumAddress:n,parameter:r}=e;let s=!1;const i=[];for(let o=0;o<r.components.length;o++){const a=r.components[o],u=Array.isArray(t)?o:a.name,c=J({checksumAddress:n,parameter:a,value:t[u]});i.push(c),c.dynamic&&(s=!0)}return{dynamic:s,encoded:s?Q(i):b(...i.map(({encoded:o})=>o))}}function K(t){const e=t.match(/^(.*)\[(\d+)?\]$/);return e?[e[2]?Number(e[2]):null,e[1]]:void 0}function z(t){var r;const{type:e}=t;if(e==="string"||e==="bytes"||e.endsWith("[]"))return!0;if(e==="tuple")return(r=t.components)==null?void 0:r.some(z);const n=K(t.type);return!!(n&&z({...t,type:n[1]}))}function ar(t,e,n={}){const{as:r="Array",checksumAddress:s=!1}=n,i=typeof e=="string"?vt(e):e,o=xe(i);if(O(i)===0&&t.length>0)throw new fr;if(O(i)&&O(i)<32)throw new ur({data:typeof e=="string"?e:x(e),parameters:t,size:O(i)});let a=0;const u=r==="Array"?[]:{};for(let c=0;c<t.length;++c){const f=t[c];o.setPosition(a);const[d,y]=E(o,f,{checksumAddress:s,staticPosition:0});a+=y,r==="Array"?u.push(d):u[f.name??c]=d}return u}function cr(t,e,n){const{checksumAddress:r=!1}={};if(t.length!==e.length)throw new Vt({expectedLength:t.length,givenLength:e.length});const s=Ke({checksumAddress:r,parameters:t,values:e}),i=Q(s);return i.length===0?"0x":i}function M(t,e){if(t.length!==e.length)throw new Vt({expectedLength:t.length,givenLength:e.length});const n=[];for(let r=0;r<t.length;r++){const s=t[r],i=e[r];n.push(M.encode(s,i))}return b(...n)}(function(t){function e(n,r,s=!1){if(n==="address"){const u=r;return v(u),B(u.toLowerCase(),s?32:0)}if(n==="string")return F(r);if(n==="bytes")return r;if(n==="bool")return B(At(r),s?32:1);const i=n.match(Ot);if(i){const[u,c,f="256"]=i,d=Number.parseInt(f,10)/8;return p(r,{size:s?32:d,signed:c==="int"})}const o=n.match(je);if(o){const[u,c]=o;if(Number.parseInt(c,10)!==(r.length-2)/2)throw new jt({expectedSize:Number.parseInt(c,10),value:r});return S(r,s?32:0)}const a=n.match(Ne);if(a&&Array.isArray(r)){const[u,c]=a,f=[];for(let d=0;d<r.length;d++)f.push(e(c,r[d],!0));return f.length===0?"0x":b(...f)}throw new tt(n)}t.encode=e})(M||(M={}));function Nt(t){return Array.isArray(t)&&typeof t[0]=="string"||typeof t=="string"?lt(t):t}class ur extends l{constructor({data:e,parameters:n,size:r}){super(`Data size of ${r} bytes is too small for given parameters.`,{metaMessages:[`Params: (${ee(n)})`,`Data: ${e} (${r} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.DataSizeTooSmallError"})}}class fr extends l{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ZeroDataError"})}}class dr extends l{constructor({expectedLength:e,givenLength:n,type:r}){super(`Array length mismatch for type \`${r}\`. Expected: \`${e}\`. Given: \`${n}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLengthMismatchError"})}}class jt extends l{constructor({expectedSize:e,value:n}){super(`Size of bytes "${n}" (bytes${w(n)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}class Vt extends l{constructor({expectedLength:e,givenLength:n}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${e}`,`Given length (values): ${n}`].join(`
|
|
2
2
|
`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}class lr extends l{constructor(e){super(`Value \`${e}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}}class tt extends l{constructor(e){super(`Type \`${e}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}function D(t){let e=!0,n="",r=0,s="",i=!1;for(let o=0;o<t.length;o++){const a=t[o];if(["(",")",","].includes(a)&&(e=!0),a==="("&&r++,a===")"&&r--,!!e){if(r===0){if(a===" "&&["event","function","error",""].includes(s))s="";else if(s+=a,a===")"){i=!0;break}continue}if(a===" "){t[o-1]!==","&&n!==","&&n!==",("&&(n="",e=!1);continue}s+=a,n+=a}}if(!i)throw new l("Unable to normalize signature.");return s}function W(t,e){const n=typeof t,r=e.type;switch(r){case"address":return T(t,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return r==="tuple"&&"components"in e?Object.values(e.components).every((s,i)=>W(Object.values(t)[i],s)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(r)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?n==="string"||t instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)?Array.isArray(t)&&t.every(s=>W(s,{...e,type:r.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function kt(t,e,n){for(const r in t){const s=t[r],i=e[r];if(s.type==="tuple"&&i.type==="tuple"&&"components"in s&&"components"in i)return kt(s.components,i.components,n[r]);const o=[s.type,i.type];if(o.includes("address")&&o.includes("bytes20")?!0:o.includes("address")&&o.includes("string")?T(n[r],{strict:!1}):o.includes("address")&&o.includes("bytes")?T(n[r],{strict:!1}):!1)return o}}function Gr(t,e={}){const{prepare:n=!0}=e,r=Array.isArray(t)||typeof t=="string"?dt(t):t;return{...r,...n?{hash:A(r)}:{}}}function et(t,e,n){const{args:r=[],prepare:s=!0}=n??{},i=H(e,{strict:!1}),o=t.filter(c=>i?c.type==="function"||c.type==="error"?hr(c)===m(e,0,4):c.type==="event"?A(c)===e:!1:"name"in c&&c.name===e);if(o.length===0)throw new gt({name:e});if(o.length===1)return{...o[0],...s?{hash:A(o[0])}:{}};let a;for(const c of o){if(!("inputs"in c))continue;if(!r||r.length===0){if(!c.inputs||c.inputs.length===0)return{...c,...s?{hash:A(c)}:{}};continue}if(!c.inputs||c.inputs.length===0||c.inputs.length!==r.length)continue;if(r.every((d,y)=>{const h="inputs"in c&&c.inputs[y];return h?W(d,h):!1})){if(a&&"inputs"in a&&a.inputs){const d=kt(c.inputs,a.inputs,r);if(d)throw new pr({abiItem:c,type:d[0]},{abiItem:a,type:d[1]})}a=c}}const u=(()=>{if(a)return a;const[c,...f]=o;return{...c,overloads:f}})();if(!u)throw new gt({name:e});return{...u,...s?{hash:A(u)}:{}}}function hr(...t){const e=(()=>{if(Array.isArray(t[0])){const[n,r]=t;return et(n,r)}return t[0]})();return m(A(e),0,4)}function yr(...t){const e=(()=>{if(Array.isArray(t[0])){const[r,s]=t;return et(r,s)}return t[0]})(),n=typeof e=="string"?e:V(e);return D(n)}function A(...t){const e=(()=>{if(Array.isArray(t[0])){const[n,r]=t;return et(n,r)}return t[0]})();return typeof e!="string"&&"hash"in e&&e.hash?e.hash:q(F(yr(e)))}class pr extends l{constructor(e,n){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${e.type}\` in \`${D(V(e.abiItem))}\`, and`,`\`${n.type}\` in \`${D(V(n.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.AmbiguityError"})}}class gt extends l{constructor({name:e,data:n,type:r="item"}){const s=e?` with name "${e}"`:n?` with data "${n}"`:"";super(`ABI ${r}${s} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}function mr(t,e={}){return typeof t.chainId=="string"?Ut(t):{...t,...e.signature}}function Ut(t){const{address:e,chainId:n,nonce:r}=t,s=ke(t);return{address:e,chainId:Number(n),nonce:BigInt(r),...s}}function Zr(t){return t.map(Ut)}function br(t){const{address:e,chainId:n,nonce:r,...s}=t;return{address:e,chainId:p(n),nonce:p(r),..._e(s)}}function Xr(t){return t.map(br)}async function gr(t,{address:e,blockHash:n,blockNumber:r,blockTag:s="latest",requireCanonical:i}){const o=re({blockHash:n,blockNumber:r,blockTag:s,requireCanonical:i}),a=await t.request({method:"eth_getCode",params:[e,o]},{dedupe:typeof r=="bigint"||n!==void 0});if(a!=="0x")return a}const Tt="0x6492649264926492649264926492649264926492649264926492649264926492";function wr(t){if(m(t,-32)!==Tt)throw new vr(t)}function xr(t){const{data:e,signature:n,to:r}=t;return b(cr(Nt("address, bytes, bytes"),[r,e,n]),Tt)}function Pr(t){try{return wr(t),!0}catch{return!1}}let vr=class extends l{constructor(e){super(`Value \`${e}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc6492.InvalidWrappedSignatureError"})}};const Ir="0x8010801080108010801080108010801080108010801080108010801080108010",$r=Nt("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function _t(t){if(typeof t=="string"){if(m(t,-32)!==Ir)throw new Br(t)}else Z(t.authorization)}function Ar(t){_t(t);const e=ne(m(t,-64,-32)),n=m(t,-e-64,-64),r=m(t,0,-e-64),[s,i,o]=ar($r,n);return{authorization:mr({address:s.delegation,chainId:Number(s.chainId),nonce:s.nonce,yParity:s.yParity,r:s.r,s:s.s}),signature:r,...o&&o!=="0x"?{data:o,to:i}:{}}}function Er(t){try{return _t(t),!0}catch{return!1}}class Br extends l{constructor(e){super(`Value \`${e}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc8010.InvalidWrappedSignatureError"})}}async function Sr({address:t,authorization:e,signature:n}){return k(U(t),await se({authorization:e,signature:n}))}function zr({r:t,s:e,to:n="hex",v:r,yParity:s}){const i=(()=>{if(s===0||s===1)return s;if(r&&(r===27n||r===28n||r>=35n))return r%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),o=`0x${new ge.Signature(ct(t),ct(e)).toCompactHex()}${i===0?"1b":"1c"}`;return n==="hex"?o:he(o)}async function Mt(t,e){const{abi:n,address:r,args:s,functionName:i,...o}=e,a=Y({abi:n,args:s,functionName:i});try{const{data:u}=await R(t,Et,"call")({...o,data:a,to:r});return ie({abi:n,args:s,functionName:i,data:u||"0x"})}catch(u){throw oe(u,{abi:n,address:r,args:s,docsPath:"/docs/contract/readContract",functionName:i})}}async function Qr(t,e){var c,f,d,y;const{address:n,chain:r=t.chain,hash:s,erc6492VerifierAddress:i=e.universalSignatureVerifierAddress??((f=(c=r==null?void 0:r.contracts)==null?void 0:c.erc6492Verifier)==null?void 0:f.address),multicallAddress:o=e.multicallAddress??((y=(d=r==null?void 0:r.contracts)==null?void 0:d.multicall3)==null?void 0:y.address),mode:a="auto"}=e;if(r!=null&&r.verifyHash)return await r.verifyHash(t,e);const u=(()=>{const h=e.signature;return ye(h)?h:typeof h=="object"&&"r"in h&&"s"in h?zr(h):pe(h)})();try{if(a==="eoa")try{if(k(U(n),await at({hash:s,signature:u})))return!0}catch{}return Er(u)?await Cr(t,{...e,multicallAddress:o,signature:u}):await Or(t,{...e,verifierAddress:i,signature:u})}catch(h){if(a!=="eoa")try{if(k(U(n),await at({hash:s,signature:u})))return!0}catch{}if(h instanceof I)return!1;throw h}}async function Cr(t,e){var C;const{address:n,blockNumber:r,blockTag:s,hash:i,multicallAddress:o}=e,{authorization:a,data:u,signature:c,to:f}=Ar(e.signature);if(await gr(t,{address:n,blockNumber:r,blockTag:s})===ae(["0xef0100",a.address]))return await Rr(t,{address:n,blockNumber:r,blockTag:s,hash:i,signature:c});const y={address:a.address,chainId:Number(a.chainId),nonce:Number(a.nonce),r:ut(a.r,{size:32}),s:ut(a.s,{size:32}),yParity:a.yParity};if(!await Sr({address:n,authorization:y}))throw new I;const $=await R(t,Mt,"readContract")({...o?{address:o}:{code:ce},authorizationList:[y],abi:me,blockNumber:r,blockTag:"pending",functionName:"aggregate3",args:[[...u?[{allowFailure:!0,target:f??n,callData:u}]:[],{allowFailure:!0,target:n,callData:Y({abi:Bt,functionName:"isValidSignature",args:[i,c]})}]]}),P=(C=$[$.length-1])==null?void 0:C.returnData;if(P!=null&&P.startsWith("0x1626ba7e"))return!0;throw new I}async function Or(t,e){const{address:n,factory:r,factoryData:s,hash:i,signature:o,verifierAddress:a,...u}=e,c=await(async()=>!r&&!s||Pr(o)?o:xr({data:s,signature:o,to:r}))(),f=a?{to:a,data:Y({abi:ft,functionName:"isValidSig",args:[n,i,c]}),...u}:{data:ue({abi:ft,args:[n,i,c],bytecode:fe}),...u},{data:d}=await R(t,Et,"call")(f).catch(y=>{throw y instanceof de?new I:y});if(be(d??"0x0"))return!0;throw new I}async function Rr(t,e){const{address:n,blockNumber:r,blockTag:s,hash:i,signature:o}=e;if((await R(t,Mt,"readContract")({address:n,abi:Bt,args:[i,o],blockNumber:r,blockTag:s,functionName:"isValidSignature"}).catch(u=>{throw u instanceof le?new I:u})).startsWith("0x1626ba7e"))return!0;throw new I}class I extends Error{}export{_e as A,G as B,v as C,ke as D,Zr as E,Me as F,Xr as G,Tr as H,Lt as I,qr as J,Fr as K,zt as L,gt as N,lt as a,cr as b,et as c,Vr as d,kr as e,Gr as f,gr as g,hr as h,xe as i,Hr as j,Mr as k,_r as l,Wr as m,Ur as n,q as o,dt as p,Oe as q,Mt as r,zr as s,Ct as t,T as u,Qr as v,Rt as w,Z as x,Te as y,Yr as z};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as g,b as d,a as he}from"./lit-element-B3y9oplH.js";import{n as l,o as $,r as u}from"./class-map-CxwNmq0D.js";import{d as v,r as V,e as me,v as B,i as fe}from"./index-
|
|
1
|
+
import{i as g,b as d,a as he}from"./lit-element-B3y9oplH.js";import{n as l,o as $,r as u}from"./class-map-CxwNmq0D.js";import{d as v,r as V,e as me,v as B,i as fe}from"./index-B29hZWU0.js";import{c as f,U as le}from"./index-l4HYDe7V.js";import{M as k,Z as ce,R as c,k as we,A as H,C as w,q as U,L as be,E as K,O as A,o as M,S as E,z,T as ge,_ as ye}from"./W3MFrameProviderSingleton-igVJGnIP.js";import{P as D}from"./index-DaX1PcgD.js";import"./index-BFflIlJl.js";import{H as oe}from"./HelpersUtil-CvduV3iF.js";import{C as F}from"./ConstantsUtil-BbIzv5xN.js";import"./index-BToZY4wT.js";import"./index-BvkmByTC.js";import"./index-DWwpSRi-.js";import"./index-r1XpXEwi.js";import{S as ve}from"./SwapController-rop7Cy13.js";import"./index-C_M9XsGM.js";import"./index-CNSWvtL0.js";import"./react-yytiy0wi.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-BPJvc5GU.js";import"./ethers-w2AslR0v.js";import"./intl-CBcMB1D2.js";import"./index-DAGAMRoL.js";import"./events-DQ172AOg.js";import"./index-BLfwzasm.js";import"./index-Dbqfw_1n.js";import"./index-nibyPLVP.js";import"./index-C4TyPwon.js";import"./index.es-DtmgeITt.js";import"./browser-ponyfill-Cl4XgbUp.js";import"./browser-ponyfill-jziBOMa-.js";import"./NetworkUtil-CLSFaUe_.js";import"./index-CPGmwqDl.js";import"./index-BdSETUQy.js";import"./index-D4Qahz_H.js";import"./index-D_bGCuiT.js";import"./index-BHgXtxHt.js";import"./MathUtil-BGCe3rZ3.js";import"./index-D4gUO6YF.js";import"./index-DxzGOm1i.js";const de={isUnsupportedChainView(){return c.state.view==="UnsupportedChain"||c.state.view==="SwitchNetwork"&&c.state.history.includes("UnsupportedChain")},async safeClose(){if(this.isUnsupportedChainView()){k.shake();return}if(await ce.isSIWXCloseDisabled()){k.shake();return}(c.state.view==="DataCapture"||c.state.view==="DataCaptureOtpConfirm")&&we.disconnect(),k.close()}},xe=v`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
border-radius: clamp(0px, ${({borderRadius:e})=>e[8]}, 44px);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as v,i as f,b as a}from"./lit-element-B3y9oplH.js";import{n as w,r as d,o as q}from"./class-map-CxwNmq0D.js";import{w as ve,s as fe,a as ge,p as be,M as g,S as se,R as l,r as P,A as K,e as ce,c as le,C as m,b as Y,d as ye,f as S,E as ie,O as E,g as F,h as oe,i as T,j as H,T as xe,k as Ce,l as ke,m as Se}from"./core-
|
|
1
|
+
import{a as v,i as f,b as a}from"./lit-element-B3y9oplH.js";import{n as w,r as d,o as q}from"./class-map-CxwNmq0D.js";import{w as ve,s as fe,a as ge,p as be,M as g,S as se,R as l,r as P,A as K,e as ce,c as le,C as m,b as Y,d as ye,f as S,E as ie,O as E,g as F,h as oe,i as T,j as H,T as xe,k as Ce,l as ke,m as Se}from"./core-C_85sR5Z.js";import{c as u,U as We}from"./index-BhQRaolS.js";import"./index-CNSWvtL0.js";import"./react-yytiy0wi.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-BPJvc5GU.js";import"./ethers-w2AslR0v.js";import"./intl-CBcMB1D2.js";import"./index-DAGAMRoL.js";import"./events-DQ172AOg.js";import"./index-BLfwzasm.js";import"./index-Dbqfw_1n.js";import"./index.es-BWh_1tnr.js";import"./index-nibyPLVP.js";import"./index-CJdot1dH.js";import"./index.es-DtmgeITt.js";import"./browser-ponyfill-Cl4XgbUp.js";import"./browser-ponyfill-jziBOMa-.js";import"./NetworkUtil-CLSFaUe_.js";import"./W3MFrameProviderSingleton-igVJGnIP.js";import"./async-directive-BRxn_Py3.js";const p=be({message:"",open:!1,triggerRect:{width:0,height:0,top:0,left:0},variant:"shade"}),Re={state:p,subscribe(n){return ge(p,()=>n(p))},subscribeKey(n,e){return fe(p,n,e)},showTooltip({message:n,triggerRect:e,variant:t}){p.open=!0,p.message=n,p.triggerRect=e,p.variant=t},hide(){p.open=!1,p.message="",p.triggerRect={width:0,height:0,top:0,left:0}}},O=ve(Re),de={isUnsupportedChainView(){return l.state.view==="UnsupportedChain"||l.state.view==="SwitchNetwork"&&l.state.history.includes("UnsupportedChain")},async safeClose(){if(this.isUnsupportedChainView()){g.shake();return}if(await se.isSIWXCloseDisabled()){g.shake();return}g.close()}},$e=v`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
border-radius: clamp(0px, var(--wui-border-radius-l), 44px);
|
|
@@ -12,7 +12,7 @@ import{a as v,i as f,b as a}from"./lit-element-B3y9oplH.js";import{n as w,r as d
|
|
|
12
12
|
0 0 0 1px var(--wui-color-gray-glass-005),
|
|
13
13
|
0px 4px 12px 4px var(--w3m-card-embedded-shadow-color);
|
|
14
14
|
}
|
|
15
|
-
`;var Ae=function(
|
|
15
|
+
`;var Ae=function(n,e,t,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,t):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,e,t,o);else for(var c=n.length-1;c>=0;c--)(s=n[c])&&(i=(r<3?s(i):r>3?s(e,t,i):s(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i};let J=class extends f{render(){return a`<slot></slot>`}};J.styles=[P,$e];J=Ae([u("wui-card")],J);const Te=v`
|
|
16
16
|
:host {
|
|
17
17
|
display: flex;
|
|
18
18
|
align-items: center;
|
|
@@ -44,7 +44,7 @@ import{a as v,i as f,b as a}from"./lit-element-B3y9oplH.js";import{n as w,r as d
|
|
|
44
44
|
border-radius: var(--wui-border-radius-3xs);
|
|
45
45
|
background-color: var(--local-icon-bg-value);
|
|
46
46
|
}
|
|
47
|
-
`;var _=function(
|
|
47
|
+
`;var _=function(n,e,t,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,t):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,e,t,o);else for(var c=n.length-1;c>=0;c--)(s=n[c])&&(i=(r<3?s(i):r>3?s(e,t,i):s(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i};let W=class extends f{constructor(){super(...arguments),this.message="",this.backgroundColor="accent-100",this.iconColor="accent-100",this.icon="info"}render(){return this.style.cssText=`
|
|
48
48
|
--local-icon-bg-value: var(--wui-color-${this.backgroundColor});
|
|
49
49
|
`,a`
|
|
50
50
|
<wui-flex flexDirection="row" justifyContent="space-between" alignItems="center">
|
|
@@ -79,7 +79,7 @@ import{a as v,i as f,b as a}from"./lit-element-B3y9oplH.js";import{n as w,r as d
|
|
|
79
79
|
opacity: 0;
|
|
80
80
|
pointer-events: none;
|
|
81
81
|
}
|
|
82
|
-
`;var we=function(
|
|
82
|
+
`;var we=function(n,e,t,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,t):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,e,t,o);else for(var c=n.length-1;c>=0;c--)(s=n[c])&&(i=(r<3?s(i):r>3?s(e,t,i):s(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i};const Ne={info:{backgroundColor:"fg-350",iconColor:"fg-325",icon:"info"},success:{backgroundColor:"success-glass-reown-020",iconColor:"success-125",icon:"checkmark"},warning:{backgroundColor:"warning-glass-reown-020",iconColor:"warning-100",icon:"warningCircle"},error:{backgroundColor:"error-glass-reown-020",iconColor:"error-125",icon:"exclamationTriangle"}};let M=class extends f{constructor(){super(),this.unsubscribe=[],this.open=K.state.open,this.onOpen(!0),this.unsubscribe.push(K.subscribeKey("open",e=>{this.open=e,this.onOpen(!1)}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const{message:e,variant:t}=K.state,o=Ne[t];return a`
|
|
83
83
|
<wui-alertbar
|
|
84
84
|
message=${e}
|
|
85
85
|
backgroundColor=${o==null?void 0:o.backgroundColor}
|
|
@@ -110,7 +110,7 @@ import{a as v,i as f,b as a}from"./lit-element-B3y9oplH.js";import{n as w,r as d
|
|
|
110
110
|
button:disabled {
|
|
111
111
|
background-color: transparent;
|
|
112
112
|
}
|
|
113
|
-
`;var B=function(
|
|
113
|
+
`;var B=function(n,e,t,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,t):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,e,t,o);else for(var c=n.length-1;c>=0;c--)(s=n[c])&&(i=(r<3?s(i):r>3?s(e,t,i):s(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i};let R=class extends f{constructor(){super(...arguments),this.size="md",this.disabled=!1,this.icon="copy",this.iconColor="inherit"}render(){const e=this.size==="lg"?"--wui-border-radius-xs":"--wui-border-radius-xxs",t=this.size==="lg"?"--wui-spacing-1xs":"--wui-spacing-2xs";return this.style.cssText=`
|
|
114
114
|
--local-border-radius: var(${e});
|
|
115
115
|
--local-padding: var(${t});
|
|
116
116
|
`,a`
|
|
@@ -146,7 +146,7 @@ import{a as v,i as f,b as a}from"./lit-element-B3y9oplH.js";import{n as w,r as d
|
|
|
146
146
|
button:active {
|
|
147
147
|
background-color: var(--wui-color-gray-glass-005);
|
|
148
148
|
}
|
|
149
|
-
`;var ue=function(
|
|
149
|
+
`;var ue=function(n,e,t,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,t):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,e,t,o);else for(var c=n.length-1;c>=0;c--)(s=n[c])&&(i=(r<3?s(i):r>3?s(e,t,i):s(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i};let V=class extends f{constructor(){super(...arguments),this.imageSrc=""}render(){return a`<button>
|
|
150
150
|
${this.imageTemplate()}
|
|
151
151
|
<wui-icon size="xs" color="fg-200" name="chevronBottom"></wui-icon>
|
|
152
152
|
</button>`}imageTemplate(){return this.imageSrc?a`<wui-image src=${this.imageSrc} alt="select visual"></wui-image>`:a`<wui-icon-box
|
|
@@ -231,11 +231,11 @@ import{a as v,i as f,b as a}from"./lit-element-B3y9oplH.js";import{n as w,r as d
|
|
|
231
231
|
opacity: 1;
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
|
-
`;var y=function(
|
|
234
|
+
`;var y=function(n,e,t,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,t):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,e,t,o);else for(var c=n.length-1;c>=0;c--)(s=n[c])&&(i=(r<3?s(i):r>3?s(e,t,i):s(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i};const _e=["SmartSessionList"];function G(){var s,c,N,k,j,L,U;const n=(c=(s=l.state.data)==null?void 0:s.connector)==null?void 0:c.name,e=(k=(N=l.state.data)==null?void 0:N.wallet)==null?void 0:k.name,t=(L=(j=l.state.data)==null?void 0:j.network)==null?void 0:L.name,o=e??n,r=F.getConnectors();return{Connect:`Connect ${r.length===1&&((U=r[0])==null?void 0:U.id)==="w3m-email"?"Email":""} Wallet`,Create:"Create Wallet",ChooseAccountName:void 0,Account:void 0,AccountSettings:void 0,AllWallets:"All Wallets",ApproveTransaction:"Approve Transaction",BuyInProgress:"Buy",ConnectingExternal:o??"Connect Wallet",ConnectingWalletConnect:o??"WalletConnect",ConnectingWalletConnectBasic:"WalletConnect",ConnectingSiwe:"Sign In",Convert:"Convert",ConvertSelectToken:"Select token",ConvertPreview:"Preview convert",Downloads:o?`Get ${o}`:"Downloads",EmailLogin:"Email Login",EmailVerifyOtp:"Confirm Email",EmailVerifyDevice:"Register Device",GetWallet:"Get a wallet",Networks:"Choose Network",OnRampProviders:"Choose Provider",OnRampActivity:"Activity",OnRampTokenSelect:"Select Token",OnRampFiatSelect:"Select Currency",Pay:"How you pay",Profile:void 0,SwitchNetwork:t??"Switch Network",SwitchAddress:"Switch Address",Transactions:"Activity",UnsupportedChain:"Switch Network",UpgradeEmailWallet:"Upgrade your Wallet",UpdateEmailWallet:"Edit Email",UpdateEmailPrimaryOtp:"Confirm Current Email",UpdateEmailSecondaryOtp:"Confirm New Email",WhatIsABuy:"What is Buy?",RegisterAccountName:"Choose name",RegisterAccountNameSuccess:"",WalletReceive:"Receive",WalletCompatibleNetworks:"Compatible Networks",Swap:"Swap",SwapSelectToken:"Select token",SwapPreview:"Preview swap",WalletSend:"Send",WalletSendPreview:"Review send",WalletSendSelectToken:"Select Token",WhatIsANetwork:"What is a network?",WhatIsAWallet:"What is a wallet?",ConnectWallets:"Connect wallet",ConnectSocials:"All socials",ConnectingSocial:oe.state.socialProvider?oe.state.socialProvider:"Connect Social",ConnectingMultiChain:"Select chain",ConnectingFarcaster:"Farcaster",SwitchActiveChain:"Switch chain",SmartSessionCreated:void 0,SmartSessionList:"Smart Sessions",SIWXSignMessage:"Sign In",PayLoading:"Payment in progress"}}let h=class extends f{constructor(){super(),this.unsubscribe=[],this.heading=G()[l.state.view],this.network=m.state.activeCaipNetwork,this.networkImage=Y.getNetworkImage(this.network),this.showBack=!1,this.prevHistoryLength=1,this.view=l.state.view,this.viewDirection="",this.headerText=G()[l.state.view],this.unsubscribe.push(ye.subscribeNetworkImages(()=>{this.networkImage=Y.getNetworkImage(this.network)}),l.subscribeKey("view",e=>{setTimeout(()=>{this.view=e,this.headerText=G()[e]},S.ANIMATION_DURATIONS.HeaderText),this.onViewChange(),this.onHistoryChange()}),m.subscribeKey("activeCaipNetwork",e=>{this.network=e,this.networkImage=Y.getNetworkImage(this.network)}))}disconnectCallback(){this.unsubscribe.forEach(e=>e())}render(){return a`
|
|
235
235
|
<wui-flex .padding=${this.getPadding()} justifyContent="space-between" alignItems="center">
|
|
236
236
|
${this.leftHeaderTemplate()} ${this.titleTemplate()} ${this.rightHeaderTemplate()}
|
|
237
237
|
</wui-flex>
|
|
238
|
-
`}onWalletHelp(){ie.sendEvent({type:"track",event:"CLICK_WALLET_HELP"}),l.push("WhatIsAWallet")}async onClose(){await de.safeClose()}rightHeaderTemplate(){var t,o,
|
|
238
|
+
`}onWalletHelp(){ie.sendEvent({type:"track",event:"CLICK_WALLET_HELP"}),l.push("WhatIsAWallet")}async onClose(){await de.safeClose()}rightHeaderTemplate(){var t,o,r;const e=(r=(o=(t=E)==null?void 0:t.state)==null?void 0:o.features)==null?void 0:r.smartSessions;return l.state.view!=="Account"||!e?this.closeButtonTemplate():a`<wui-flex>
|
|
239
239
|
<wui-icon-link
|
|
240
240
|
icon="clock"
|
|
241
241
|
@click=${()=>l.push("SmartSessionList")}
|
|
@@ -260,7 +260,7 @@ import{a as v,i as f,b as a}from"./lit-element-B3y9oplH.js";import{n as w,r as d
|
|
|
260
260
|
>
|
|
261
261
|
${e?a`<wui-tag variant="main">Beta</wui-tag>`:null}
|
|
262
262
|
</wui-flex>
|
|
263
|
-
`}leftHeaderTemplate(){var k;const{view:e}=l.state,t=e==="Connect",o=E.state.enableEmbedded,
|
|
263
|
+
`}leftHeaderTemplate(){var k;const{view:e}=l.state,t=e==="Connect",o=E.state.enableEmbedded,r=e==="ApproveTransaction",i=e==="ConnectingSiwe",s=e==="Account",c=E.state.enableNetworkSwitch,N=r||i||t&&o;return s&&c?a`<wui-select
|
|
264
264
|
id="dynamic"
|
|
265
265
|
data-testid="w3m-account-select-network"
|
|
266
266
|
active-network=${q((k=this.network)==null?void 0:k.name)}
|
|
@@ -276,7 +276,7 @@ import{a as v,i as f,b as a}from"./lit-element-B3y9oplH.js";import{n as w,r as d
|
|
|
276
276
|
id="dynamic"
|
|
277
277
|
icon="helpCircle"
|
|
278
278
|
@click=${this.onWalletHelp.bind(this)}
|
|
279
|
-
></wui-icon-link>`}onNetworks(){this.isAllowedNetworkSwitch()&&(ie.sendEvent({type:"track",event:"CLICK_NETWORKS"}),l.push("Networks"))}isAllowedNetworkSwitch(){const e=m.getAllRequestedCaipNetworks(),t=e?e.length>1:!1,o=e==null?void 0:e.find(({id:
|
|
279
|
+
></wui-icon-link>`}onNetworks(){this.isAllowedNetworkSwitch()&&(ie.sendEvent({type:"track",event:"CLICK_NETWORKS"}),l.push("Networks"))}isAllowedNetworkSwitch(){const e=m.getAllRequestedCaipNetworks(),t=e?e.length>1:!1,o=e==null?void 0:e.find(({id:r})=>{var i;return r===((i=this.network)==null?void 0:i.id)});return t||!o}getPadding(){return this.heading?["l","2l","l","2l"]:["0","2l","0","2l"]}onViewChange(){const{history:e}=l.state;let t=S.VIEW_DIRECTION.Next;e.length<this.prevHistoryLength&&(t=S.VIEW_DIRECTION.Prev),this.prevHistoryLength=e.length,this.viewDirection=t}async onHistoryChange(){var o;const{history:e}=l.state,t=(o=this.shadowRoot)==null?void 0:o.querySelector("#dynamic");e.length>1&&!this.showBack&&t?(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.showBack=!0,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"})):e.length<=1&&this.showBack&&t&&(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.showBack=!1,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}onGoBack(){l.goBack()}};h.styles=Pe;y([d()],h.prototype,"heading",void 0);y([d()],h.prototype,"network",void 0);y([d()],h.prototype,"networkImage",void 0);y([d()],h.prototype,"showBack",void 0);y([d()],h.prototype,"prevHistoryLength",void 0);y([d()],h.prototype,"view",void 0);y([d()],h.prototype,"viewDirection",void 0);y([d()],h.prototype,"headerText",void 0);h=y([u("w3m-header")],h);const Be=v`
|
|
280
280
|
:host {
|
|
281
281
|
display: flex;
|
|
282
282
|
column-gap: var(--wui-spacing-s);
|
|
@@ -296,7 +296,7 @@ import{a as v,i as f,b as a}from"./lit-element-B3y9oplH.js";import{n as w,r as d
|
|
|
296
296
|
:host wui-loading-spinner {
|
|
297
297
|
margin-left: var(--wui-spacing-3xs);
|
|
298
298
|
}
|
|
299
|
-
`;var A=function(
|
|
299
|
+
`;var A=function(n,e,t,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,t):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,e,t,o);else for(var c=n.length-1;c>=0;c--)(s=n[c])&&(i=(r<3?s(i):r>3?s(e,t,i):s(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i};let b=class extends f{constructor(){super(...arguments),this.backgroundColor="accent-100",this.iconColor="accent-100",this.icon="checkmark",this.message="",this.loading=!1,this.iconType="default"}render(){return a`
|
|
300
300
|
${this.templateIcon()}
|
|
301
301
|
<wui-text variant="paragraph-500" color="fg-100" data-testid="wui-snackbar-message"
|
|
302
302
|
>${this.message}</wui-text
|
|
@@ -318,10 +318,10 @@ import{a as v,i as f,b as a}from"./lit-element-B3y9oplH.js";import{n as w,r as d
|
|
|
318
318
|
left: 50%;
|
|
319
319
|
width: max-content;
|
|
320
320
|
}
|
|
321
|
-
`;var pe=function(
|
|
321
|
+
`;var pe=function(n,e,t,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,t):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,e,t,o);else for(var c=n.length-1;c>=0;c--)(s=n[c])&&(i=(r<3?s(i):r>3?s(e,t,i):s(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i};const je={loading:void 0,success:{backgroundColor:"success-100",iconColor:"success-100",icon:"checkmark"},error:{backgroundColor:"error-100",iconColor:"error-100",icon:"close"}};let X=class extends f{constructor(){super(),this.unsubscribe=[],this.timeout=void 0,this.open=T.state.open,this.unsubscribe.push(T.subscribeKey("open",e=>{this.open=e,this.onOpen()}))}disconnectedCallback(){clearTimeout(this.timeout),this.unsubscribe.forEach(e=>e())}render(){const{message:e,variant:t,svg:o}=T.state,r=je[t],{icon:i,iconColor:s}=o??r??{};return a`
|
|
322
322
|
<wui-snackbar
|
|
323
323
|
message=${e}
|
|
324
|
-
backgroundColor=${
|
|
324
|
+
backgroundColor=${r==null?void 0:r.backgroundColor}
|
|
325
325
|
iconColor=${s}
|
|
326
326
|
icon=${i}
|
|
327
327
|
.loading=${t==="loading"}
|
|
@@ -390,7 +390,7 @@ import{a as v,i as f,b as a}from"./lit-element-B3y9oplH.js";import{n as w,r as d
|
|
|
390
390
|
right: 0%;
|
|
391
391
|
transform: translate(65%, -50%) rotate(270deg);
|
|
392
392
|
}
|
|
393
|
-
`;var D=function(
|
|
393
|
+
`;var D=function(n,e,t,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,t):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,e,t,o);else for(var c=n.length-1;c>=0;c--)(s=n[c])&&(i=(r<3?s(i):r>3?s(e,t,i):s(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i};let $=class extends f{constructor(){super(),this.unsubscribe=[],this.open=O.state.open,this.message=O.state.message,this.triggerRect=O.state.triggerRect,this.variant=O.state.variant,this.unsubscribe.push(O.subscribe(e=>{this.open=e.open,this.message=e.message,this.triggerRect=e.triggerRect,this.variant=e.variant}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){this.dataset.variant=this.variant;const e=this.triggerRect.top,t=this.triggerRect.left;return this.style.cssText=`
|
|
394
394
|
--w3m-tooltip-top: ${e}px;
|
|
395
395
|
--w3m-tooltip-left: ${t}px;
|
|
396
396
|
--w3m-tooltip-parent-width: ${this.triggerRect.width/2}px;
|
|
@@ -468,7 +468,7 @@ import{a as v,i as f,b as a}from"./lit-element-B3y9oplH.js";import{n as w,r as d
|
|
|
468
468
|
opacity: 1;
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
|
-
`;var Q=function(
|
|
471
|
+
`;var Q=function(n,e,t,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,t):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,e,t,o);else for(var c=n.length-1;c>=0;c--)(s=n[c])&&(i=(r<3?s(i):r>3?s(e,t,i):s(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i};let I=class extends f{constructor(){super(),this.resizeObserver=void 0,this.prevHeight="0px",this.prevHistoryLength=1,this.unsubscribe=[],this.view=l.state.view,this.viewDirection="",this.unsubscribe.push(l.subscribeKey("view",e=>this.onViewChange(e)))}firstUpdated(){var e;this.resizeObserver=new ResizeObserver(([t])=>{const o=`${t==null?void 0:t.contentRect.height}px`;this.prevHeight!=="0px"&&(this.style.setProperty("--prev-height",this.prevHeight),this.style.setProperty("--new-height",o),this.style.animation="w3m-view-height 150ms forwards ease",this.style.height="auto"),setTimeout(()=>{this.prevHeight=o,this.style.animation="unset"},S.ANIMATION_DURATIONS.ModalHeight)}),(e=this.resizeObserver)==null||e.observe(this.getWrapper())}disconnectedCallback(){var e;(e=this.resizeObserver)==null||e.unobserve(this.getWrapper()),this.unsubscribe.forEach(t=>t())}render(){return a`<div class="w3m-router-container" view-direction="${this.viewDirection}">
|
|
472
472
|
${this.viewTemplate()}
|
|
473
473
|
</div>`}viewTemplate(){switch(this.view){case"AccountSettings":return a`<w3m-account-settings-view></w3m-account-settings-view>`;case"Account":return a`<w3m-account-view></w3m-account-view>`;case"AllWallets":return a`<w3m-all-wallets-view></w3m-all-wallets-view>`;case"ApproveTransaction":return a`<w3m-approve-transaction-view></w3m-approve-transaction-view>`;case"BuyInProgress":return a`<w3m-buy-in-progress-view></w3m-buy-in-progress-view>`;case"ChooseAccountName":return a`<w3m-choose-account-name-view></w3m-choose-account-name-view>`;case"Connect":return a`<w3m-connect-view></w3m-connect-view>`;case"Create":return a`<w3m-connect-view walletGuide="explore"></w3m-connect-view>`;case"ConnectingWalletConnect":return a`<w3m-connecting-wc-view></w3m-connecting-wc-view>`;case"ConnectingWalletConnectBasic":return a`<w3m-connecting-wc-basic-view></w3m-connecting-wc-basic-view>`;case"ConnectingExternal":return a`<w3m-connecting-external-view></w3m-connecting-external-view>`;case"ConnectingSiwe":return a`<w3m-connecting-siwe-view></w3m-connecting-siwe-view>`;case"ConnectWallets":return a`<w3m-connect-wallets-view></w3m-connect-wallets-view>`;case"ConnectSocials":return a`<w3m-connect-socials-view></w3m-connect-socials-view>`;case"ConnectingSocial":return a`<w3m-connecting-social-view></w3m-connecting-social-view>`;case"Downloads":return a`<w3m-downloads-view></w3m-downloads-view>`;case"EmailLogin":return a`<w3m-email-login-view></w3m-email-login-view>`;case"EmailVerifyOtp":return a`<w3m-email-verify-otp-view></w3m-email-verify-otp-view>`;case"EmailVerifyDevice":return a`<w3m-email-verify-device-view></w3m-email-verify-device-view>`;case"GetWallet":return a`<w3m-get-wallet-view></w3m-get-wallet-view>`;case"Networks":return a`<w3m-networks-view></w3m-networks-view>`;case"SwitchNetwork":return a`<w3m-network-switch-view></w3m-network-switch-view>`;case"Profile":return a`<w3m-profile-view></w3m-profile-view>`;case"SwitchAddress":return a`<w3m-switch-address-view></w3m-switch-address-view>`;case"Transactions":return a`<w3m-transactions-view></w3m-transactions-view>`;case"OnRampProviders":return a`<w3m-onramp-providers-view></w3m-onramp-providers-view>`;case"OnRampActivity":return a`<w3m-onramp-activity-view></w3m-onramp-activity-view>`;case"OnRampTokenSelect":return a`<w3m-onramp-token-select-view></w3m-onramp-token-select-view>`;case"OnRampFiatSelect":return a`<w3m-onramp-fiat-select-view></w3m-onramp-fiat-select-view>`;case"UpgradeEmailWallet":return a`<w3m-upgrade-wallet-view></w3m-upgrade-wallet-view>`;case"UpdateEmailWallet":return a`<w3m-update-email-wallet-view></w3m-update-email-wallet-view>`;case"UpdateEmailPrimaryOtp":return a`<w3m-update-email-primary-otp-view></w3m-update-email-primary-otp-view>`;case"UpdateEmailSecondaryOtp":return a`<w3m-update-email-secondary-otp-view></w3m-update-email-secondary-otp-view>`;case"UnsupportedChain":return a`<w3m-unsupported-chain-view></w3m-unsupported-chain-view>`;case"Swap":return a`<w3m-swap-view></w3m-swap-view>`;case"SwapSelectToken":return a`<w3m-swap-select-token-view></w3m-swap-select-token-view>`;case"SwapPreview":return a`<w3m-swap-preview-view></w3m-swap-preview-view>`;case"WalletSend":return a`<w3m-wallet-send-view></w3m-wallet-send-view>`;case"WalletSendSelectToken":return a`<w3m-wallet-send-select-token-view></w3m-wallet-send-select-token-view>`;case"WalletSendPreview":return a`<w3m-wallet-send-preview-view></w3m-wallet-send-preview-view>`;case"WhatIsABuy":return a`<w3m-what-is-a-buy-view></w3m-what-is-a-buy-view>`;case"WalletReceive":return a`<w3m-wallet-receive-view></w3m-wallet-receive-view>`;case"WalletCompatibleNetworks":return a`<w3m-wallet-compatible-networks-view></w3m-wallet-compatible-networks-view>`;case"WhatIsAWallet":return a`<w3m-what-is-a-wallet-view></w3m-what-is-a-wallet-view>`;case"ConnectingMultiChain":return a`<w3m-connecting-multi-chain-view></w3m-connecting-multi-chain-view>`;case"WhatIsANetwork":return a`<w3m-what-is-a-network-view></w3m-what-is-a-network-view>`;case"ConnectingFarcaster":return a`<w3m-connecting-farcaster-view></w3m-connecting-farcaster-view>`;case"SwitchActiveChain":return a`<w3m-switch-active-chain-view></w3m-switch-active-chain-view>`;case"RegisterAccountName":return a`<w3m-register-account-name-view></w3m-register-account-name-view>`;case"RegisterAccountNameSuccess":return a`<w3m-register-account-name-success-view></w3m-register-account-name-success-view>`;case"SmartSessionCreated":return a`<w3m-smart-session-created-view></w3m-smart-session-created-view>`;case"SmartSessionList":return a`<w3m-smart-session-list-view></w3m-smart-session-list-view>`;case"SIWXSignMessage":return a`<w3m-siwx-sign-message-view></w3m-siwx-sign-message-view>`;case"Pay":return a`<w3m-pay-view></w3m-pay-view>`;case"PayLoading":return a`<w3m-pay-loading-view></w3m-pay-loading-view>`;default:return a`<w3m-connect-view></w3m-connect-view>`}}onViewChange(e){O.hide();let t=S.VIEW_DIRECTION.Next;const{history:o}=l.state;o.length<this.prevHistoryLength&&(t=S.VIEW_DIRECTION.Prev),this.prevHistoryLength=o.length,this.viewDirection=t,setTimeout(()=>{this.view=e},S.ANIMATION_DURATIONS.ViewTransition)}getWrapper(){var e;return(e=this.shadowRoot)==null?void 0:e.querySelector("div")}};I.styles=Ue;Q([d()],I.prototype,"view",void 0);Q([d()],I.prototype,"viewDirection",void 0);I=Q([u("w3m-router")],I);const ze=v`
|
|
474
474
|
:host {
|
|
@@ -610,7 +610,7 @@ import{a as v,i as f,b as a}from"./lit-element-B3y9oplH.js";import{n as w,r as d
|
|
|
610
610
|
height: var(--new-height);
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
|
-
`;var C=function(
|
|
613
|
+
`;var C=function(n,e,t,o){var r=arguments.length,i=r<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,t):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,e,t,o);else for(var c=n.length-1;c>=0;c--)(s=n[c])&&(i=(r<3?s(i):r>3?s(e,t,i):s(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i};const ae="scroll-lock";class x extends f{constructor(){super(),this.unsubscribe=[],this.abortController=void 0,this.hasPrefetched=!1,this.enableEmbedded=E.state.enableEmbedded,this.open=g.state.open,this.caipAddress=m.state.activeCaipAddress,this.caipNetwork=m.state.activeCaipNetwork,this.shake=g.state.shake,this.filterByNamespace=F.state.filterByNamespace,this.initializeTheming(),H.prefetchAnalyticsConfig(),this.unsubscribe.push(g.subscribeKey("open",e=>e?this.onOpen():this.onClose()),g.subscribeKey("shake",e=>this.shake=e),m.subscribeKey("activeCaipNetwork",e=>this.onNewNetwork(e)),m.subscribeKey("activeCaipAddress",e=>this.onNewAddress(e)),E.subscribeKey("enableEmbedded",e=>this.enableEmbedded=e),F.subscribeKey("filterByNamespace",e=>{var t;this.filterByNamespace!==e&&!((t=m.getAccountData(e))!=null&&t.caipAddress)&&(H.fetchRecommendedWallets(),this.filterByNamespace=e)}))}firstUpdated(){if(this.caipAddress){if(this.enableEmbedded){g.close(),this.prefetch();return}this.onNewAddress(this.caipAddress)}this.open&&this.onOpen(),this.enableEmbedded&&this.prefetch()}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),this.onRemoveKeyboardListener()}render(){return this.style.cssText=`
|
|
614
614
|
--local-border-bottom-mobile-radius: ${this.enableEmbedded?"clamp(0px, var(--wui-border-radius-l), 44px)":"0px"};
|
|
615
615
|
`,this.enableEmbedded?a`${this.contentTemplate()}
|
|
616
616
|
<w3m-tooltip></w3m-tooltip> `:this.open?a`
|
|
@@ -639,4 +639,4 @@ import{a as v,i as f,b as a}from"./lit-element-B3y9oplH.js";import{n as w,r as d
|
|
|
639
639
|
w3m-modal {
|
|
640
640
|
pointer-events: auto;
|
|
641
641
|
}
|
|
642
|
-
`,document.head.appendChild(e)}onScrollUnlock(){const e=document.head.querySelector(`style[data-w3m="${ae}"]`);e&&e.remove()}onAddKeyboardListener(){var t;this.abortController=new AbortController;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("wui-card");e==null||e.focus(),window.addEventListener("keydown",o=>{if(o.key==="Escape")this.handleClose();else if(o.key==="Tab"){const{tagName:
|
|
642
|
+
`,document.head.appendChild(e)}onScrollUnlock(){const e=document.head.querySelector(`style[data-w3m="${ae}"]`);e&&e.remove()}onAddKeyboardListener(){var t;this.abortController=new AbortController;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("wui-card");e==null||e.focus(),window.addEventListener("keydown",o=>{if(o.key==="Escape")this.handleClose();else if(o.key==="Tab"){const{tagName:r}=o.target;r&&!r.includes("W3M-")&&!r.includes("WUI-")&&(e==null||e.focus())}},this.abortController)}onRemoveKeyboardListener(){var e;(e=this.abortController)==null||e.abort(),this.abortController=void 0}async onNewAddress(e){const t=m.state.isSwitchingNamespace,o=ke.getPlainAddress(e);!o&&!t?g.close():t&&o&&l.goBack(),await se.initializeIfEnabled(),this.caipAddress=e,m.setIsSwitchingNamespace(!1)}onNewNetwork(e){var Z,ee,te;const t=this.caipNetwork,o=(Z=t==null?void 0:t.caipNetworkId)==null?void 0:Z.toString(),r=t==null?void 0:t.chainNamespace,i=(ee=e==null?void 0:e.caipNetworkId)==null?void 0:ee.toString(),s=e==null?void 0:e.chainNamespace,c=o!==i,k=c&&!(r!==s),j=(t==null?void 0:t.name)===Se.UNSUPPORTED_NETWORK_NAME,L=l.state.view==="ConnectingExternal",U=!((te=m.getAccountData(e==null?void 0:e.chainNamespace))!=null&&te.caipAddress),me=l.state.view==="UnsupportedChain",he=g.state.open;let z=!1;he&&!L&&(U?c&&(z=!0):(me||k&&!j)&&(z=!0)),z&&l.state.view!=="SIWXSignMessage"&&l.goBack(),this.caipNetwork=e}prefetch(){this.hasPrefetched||(H.prefetch(),H.fetchWalletsByPage({page:1}),this.hasPrefetched=!0)}}x.styles=ze;C([w({type:Boolean})],x.prototype,"enableEmbedded",void 0);C([d()],x.prototype,"open",void 0);C([d()],x.prototype,"caipAddress",void 0);C([d()],x.prototype,"caipNetwork",void 0);C([d()],x.prototype,"shake",void 0);C([d()],x.prototype,"filterByNamespace",void 0);let re=class extends x{};re=C([u("w3m-modal")],re);let ne=class extends x{};ne=C([u("appkit-modal")],ne);export{ne as AppKitModal,re as W3mModal,x as W3mModalBase};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as B}from"./transactionReceipt-
|
|
1
|
+
import{f as B}from"./transactionReceipt-CK-ZZNkd.js";import{h as g,m as N}from"./signing-DW4tyFl0.js";import{s as A}from"./sleep-mAKpSMLY.js";async function I(t){const e=await t({method:"eth_blockNumber"});return g(e)}async function E(t,e){const n=await t({method:"eth_getTransactionReceipt",params:[e.hash]});if(!n)throw new Error("Transaction receipt not found.");return B(n)}const x=5e3,y=1e3,k=500,D=2,T=10;function M(t){for(;t.length<T;)t.unshift(y);return t.reduce((n,i)=>n+i,0)/t.length}function R(t,e,n,i){let l=[],c=[],a=!1,o,r;const b=N({chain:e,client:t});async function p(){if(!a)return;try{const s=await I(b);if(!o||s>o){let m=[];if(o)for(let f=o+1n;f<=s;f++)m.push(BigInt(f));else m=[s];o=s;const w=Date.now();if(r){const f=(w-r)/m.length;c.push(f),c=c.slice(-T)}r=w;for(const f of m)for(const L of l)L(f)}}catch(s){i?i(s):console.error(`[watchBlockNumber]: Failed to poll for latest block number: ${s}`)}const h=M(c),u=Math.max(k,Math.min(x,Math.max(k,h)));await A(u/(n??D)),p()}return function(u,s){return l.push(u),a||(o=s,a=!0,p()),function(){l=l.filter(w=>w!==u),l.length===0&&(o=void 0,r=void 0,a=!1)}}}const _=new Map;function O(t){const{client:e,chain:n,onNewBlockNumber:i,overPollRatio:l,latestBlockNumber:c,onError:a}=t,o=n.id;let r=_.get(o);return r||(r=R(e,n,l,a),_.set(o,r)),r(i,c)}const P=100,d=new Map;function S(t){const{transactionHash:e,chain:n,client:i}=t,c=`${n.id}:tx_${e}`,a=t.maxBlocksWaitTime??P;if(d.has(c))return d.get(c);const o=new Promise((r,b)=>{e||b(new Error("Transaction has no transactionHash to wait for, did you execute it?"));const p=N({chain:n,client:i});let h=-1;const u=O({chain:n,client:i,onNewBlockNumber:async()=>{if(h++,h>=a){u(),b(new Error(`Transaction receipt for ${e} not found after ${a} blocks`));return}try{const s=await E(p,{hash:e});u(),r(s)}catch{}}})}).finally(()=>{d.delete(c)});return d.set(c,o),o}export{I as a,O as b,E as e,S as w};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as r}from"./dcl-schemas-BICTSpB5.js";const T=new Set([r.ProviderType.INJECTED,r.ProviderType.METAMASK_MOBILE,r.ProviderType.FORTMATIC,r.ProviderType.WALLET_CONNECT,r.ProviderType.WALLET_CONNECT_V2,r.ProviderType.WALLET_LINK]);function E(e){return!!e&&T.has(e)}export{E as s};
|