@dcl/shop 0.1.0-30133871697.commit-2ebb498 → 0.1.0-30216809991.commit-6a5fe36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/assets/{Activity-gX01fOn1.js → Activity-p0Gv2QHT.js} +1 -1
  2. package/assets/{AnimatedBackground-BcZFP3Pq.js → AnimatedBackground-DnQr-9Mq.js} +3 -3
  3. package/assets/{Assets-Dq1jEm1M.js → Assets-Dcq0ZtLs.js} +1 -1
  4. package/assets/{Assets.styles-BjRnkieR.js → Assets.styles-D1Wq-TGU.js} +1 -1
  5. package/assets/{Authorizations-ST2Ksxu2.js → Authorizations-h0EkrJ0e.js} +1 -1
  6. package/assets/{Button-B5fJsLQz.js → Button-C483PxiV.js} +1 -1
  7. package/assets/{Cart-Cm7Ro9Zg.js → Cart-yl6RsJLo.js} +1 -1
  8. package/assets/{CircularProgress-BOlrlIsy.js → CircularProgress-CD6e_OY0.js} +1 -1
  9. package/assets/{Collection-CVnDwKTq.js → Collection-BuNkbz0w.js} +1 -1
  10. package/assets/{CollectionCarousel-CrNhWA-o.js → CollectionCarousel-b8Pkk8Km.js} +1 -1
  11. package/assets/{Creator-BJQdfcDy.js → Creator-Bum8upfQ.js} +1 -1
  12. package/assets/{ExchangeController-BMLTvv35.js → ExchangeController-BP6YJw76.js} +1 -1
  13. package/assets/{GetCredits-NwyjnfXT.js → GetCredits-QZ5OleLz.js} +1 -1
  14. package/assets/{HelpersUtil-blirPsD-.js → HelpersUtil-DuOrR9po.js} +1 -1
  15. package/assets/{ImportListings-bh6vN4Da.js → ImportListings-ChXKaCQz.js} +1 -1
  16. package/assets/{ItemDetail-BMSsPEpH.js → ItemDetail-kt1pYKGI.js} +94 -88
  17. package/assets/{LoadMore-B-s5G0me.js → LoadMore-D8ty75NY.js} +1 -1
  18. package/assets/{MarketCheckout-B49jmgSp.js → MarketCheckout-D0iyzaVw.js} +1 -1
  19. package/assets/{MenuList-FlHFmpzz.js → MenuList-BlgDyhwx.js} +1 -1
  20. package/assets/{MyAssets-B1ayGmqi.js → MyAssets-mMvbaZIu.js} +1 -1
  21. package/assets/{MyFavorites-5fee_O_x.js → MyFavorites-DrFwMGOz.js} +1 -1
  22. package/assets/{NotFound-CrXtR1yD.js → NotFound-irCZ2J9j.js} +1 -1
  23. package/assets/{NotificationsBell-C1ruQm-B.js → NotificationsBell-CWM_V8VA.js} +1 -1
  24. package/assets/{StoreSettings-hmXrDY12.js → StoreSettings-DO0XM0zv.js} +6 -6
  25. package/assets/{Success-C9uPuvRL.js → Success-Deh0S9r8.js} +1 -1
  26. package/assets/{SwapController-7nCdO1U5.js → SwapController-eYsqHQVq.js} +1 -1
  27. package/assets/{Tooltip-g1zVFNbN.js → Tooltip-D5x9mtLq.js} +1 -1
  28. package/assets/{TradeService-DDaxyeeY.js → TradeService-CyVIwnXr.js} +1 -1
  29. package/assets/{W3MFrameProviderSingleton-CSS0v250.js → W3MFrameProviderSingleton-8Loh-tcg.js} +3 -3
  30. package/assets/{WebCryptoP256-Dd-qNk1N.js → WebCryptoP256-_5YOzGku.js} +1 -1
  31. package/assets/{authorizations-CfRBicRM.js → authorizations-DRmWTFDz.js} +1 -1
  32. package/assets/{basic-cXgzHrk4.js → basic-Dgdmjvu-.js} +1 -1
  33. package/assets/{biconomy-BD95tc6J.js → biconomy-CTB1iEZo.js} +1 -1
  34. package/assets/{builder-InlokaP6.js → builder-C82LQxNu.js} +1 -1
  35. package/assets/{buy-BIt1DjVh.js → buy-CXClikLg.js} +1 -1
  36. package/assets/{buy-gasless-DEhbR0zX.js → buy-gasless-Bw8QJ3nL.js} +1 -1
  37. package/assets/{cart-checkout-DbfpnMCR.js → cart-checkout-BLQod-hb.js} +1 -1
  38. package/assets/{categories-BhIJhSSv.js → categories-7z3tYoma.js} +1 -1
  39. package/assets/{ccip-Bv1a4Yma.js → ccip-D-ohWyZn.js} +1 -1
  40. package/assets/{ccip-Cw-8qrBn.js → ccip-bWj-X9bi.js} +1 -1
  41. package/assets/{collection-C81dinEb.js → collection-COS6jpIf.js} +1 -1
  42. package/assets/{controller-BylrM6_v.js → controller-BZD1JOom.js} +2 -2
  43. package/assets/{core-eHNalNm4.js → core-C_GtTJNN.js} +4 -4
  44. package/assets/{custom-_W6fFDpX.js → custom-CAN35ixC.js} +1 -1
  45. package/assets/{data-capture-BxdAy2sl.js → data-capture-B-5GIEdn.js} +1 -1
  46. package/assets/{email-bZ6wRCkD.js → email-7cQ5BcKt.js} +1 -1
  47. package/assets/{embedded-wallet-DbI0v7TE.js → embedded-wallet-CSbr0hGE.js} +1 -1
  48. package/assets/{emotion-styled.browser.esm-B91CdXZp.js → emotion-styled.browser.esm-CqAclZX0.js} +1 -1
  49. package/assets/{engine-B01gKfmv.js → engine-InYIweSO.js} +1 -1
  50. package/assets/{errors-CevO4-B_.js → errors-BoZbc8ja.js} +1 -1
  51. package/assets/{estimate-l1-fee-V0nqca67.js → estimate-l1-fee-DCl5Ufw3.js} +1 -1
  52. package/assets/{execute-CtC0aukb.js → execute-DpamAJLp.js} +2 -2
  53. package/assets/{features-DobOb6a4.js → features-Rjg-ANH0.js} +1 -1
  54. package/assets/{fetchTokenMetadata-BDfA4fxa.js → fetchTokenMetadata-AJ4lKXX9.js} +2 -2
  55. package/assets/{get-ecosystem-wallet-info-CRAxsX5A.js → get-ecosystem-wallet-info-CKj02gSt.js} +1 -1
  56. package/assets/{getBalance-IhjxbhOH.js → getBalance-BqYttXHj.js} +1 -1
  57. package/assets/{getNFT-D3q95MH5.js → getNFT-BJkpOLzg.js} +1 -1
  58. package/assets/{getNFT-Cy_TLxNg.js → getNFT-BOt74c7e.js} +1 -1
  59. package/assets/{getThemeProps-DXO8GAe-.js → getThemeProps-mcuaUO8y.js} +1 -1
  60. package/assets/{hashTypedData-0ex2klzG.js → hashTypedData-BFbifruY.js} +1 -1
  61. package/assets/{hashTypedData-BvnMw7-W.js → hashTypedData-Dwz0CvVq.js} +1 -1
  62. package/assets/{import-DCJnhgeF.js → import-CMJHvuBQ.js} +1 -1
  63. package/assets/{in-app-d1EIziHl.js → in-app-DGKkRjiU.js} +1 -1
  64. package/assets/{in-app-wallet-calls-B_X-nI2j.js → in-app-wallet-calls-DsURwMZt.js} +1 -1
  65. package/assets/{index-Bg1ZNPTw.js → index-0dt_-EWV.js} +1 -1
  66. package/assets/{index-BvFAHBPw.js → index-B3usVPuW.js} +1 -1
  67. package/assets/{index-DAkVX2rn.js → index-B9DJzC9W.js} +1 -1
  68. package/assets/{index-BVNUCwoW.js → index-BFbFleR2.js} +1 -1
  69. package/assets/{index-2sUFrijZ.js → index-BLYcSCqE.js} +1 -1
  70. package/assets/{index-D7WOoyG2.js → index-BOkJyEiZ.js} +1 -1
  71. package/assets/{index-CFAO03Mm.js → index-BRp1Hi5c.js} +3 -3
  72. package/assets/{index-lonwQF-A.js → index-Bh3QXfF7.js} +1 -1
  73. package/assets/{index-4QjFMRJM.js → index-BmG2cJb0.js} +1 -1
  74. package/assets/{index-C1iu8iFi.js → index-BmhN1IpY.js} +1 -1
  75. package/assets/{index-BbpXvktu.js → index-BovcADsh.js} +1 -1
  76. package/assets/{index-Bs0gslDD.js → index-BqPFEzHK.js} +1 -1
  77. package/assets/{index-BK8hpvmz.js → index-ByBK3zAq.js} +1 -1
  78. package/assets/{index-nFVdOOJ4.js → index-C91ic8D1.js} +1 -1
  79. package/assets/{index-B_qqDPlw.js → index-CHMAXqpk.js} +1 -1
  80. package/assets/{index-DyKUzG8Y.js → index-CJqz0URZ.js} +1 -1
  81. package/assets/{index-CtKD8E50.js → index-CMPZPIlN.js} +1 -1
  82. package/assets/{index-BNE2syyg.js → index-CO-S9ny1.js} +1 -1
  83. package/assets/{index-s056mQ5V.js → index-CQ7zHnQz.js} +25 -25
  84. package/assets/{index-CvkS52F9.js → index-CUfExZ9o.js} +1 -1
  85. package/assets/{index-BY4jMTMx.js → index-CYPyPkPv.js} +1 -1
  86. package/assets/{index-DcRGF9AB.js → index-CYylIN_g.js} +1 -1
  87. package/assets/{index-C1ObOz4r.js → index-CZJgPwNX.js} +1 -1
  88. package/assets/{index-CF75eDmC.js → index-CanXSl5D.js} +2 -2
  89. package/assets/{index-C1kCjuW_.js → index-CcKCkHsm.js} +1 -1
  90. package/assets/{index-CfZU7JZ8.js → index-CfvEFeJy.js} +1 -1
  91. package/assets/{index-DD481f9l.js → index-CpWvcPRx.js} +3 -3
  92. package/assets/{index-DHRIl4kO.js → index-CqIPLlwY.js} +1 -1
  93. package/assets/{index-DyEhiyex.js → index-CuQBA8zv.js} +1 -1
  94. package/assets/{index-CqTyoGcx.js → index-CxAUKMI5.js} +1 -1
  95. package/assets/{index-C1HJ4_9f.js → index-Cyg21C4C.js} +1 -1
  96. package/assets/{index-CQ6Kx0mL.js → index-CzrbZ0gX.js} +1 -1
  97. package/assets/{index-Dk71d1Cj.js → index-D9VGAjdG.js} +1 -1
  98. package/assets/{index-DA95kUS1.js → index-DDUD_YNg.js} +1 -1
  99. package/assets/{index-ChH5Jg4B.js → index-DL6bFhJF.js} +2 -2
  100. package/assets/{index-BwV4V8ew.js → index-DPrFtnxd.js} +1 -1
  101. package/assets/{index-Dd36z0m0.js → index-DRP0urBC.js} +1 -1
  102. package/assets/{index-D3TOJ6mv.js → index-DX8NS5sw.js} +1 -1
  103. package/assets/{index-BKlRsJAx.js → index-DXpvdibF.js} +1 -1
  104. package/assets/{index-aAl_aW1H.js → index-DZj_LkVv.js} +1 -1
  105. package/assets/{index-CGJaoBK1.js → index-Da6TtbpY.js} +3 -3
  106. package/assets/{index-CX5CK71g.js → index-Drmzd35g.js} +1 -1
  107. package/assets/{index-zKsnnSgr.js → index-Ef29yGW8.js} +1 -1
  108. package/assets/{index-BDd-bL6J.js → index-H-r202nh.js} +2 -2
  109. package/assets/{index-DFo_ZRYH.js → index-L7YgxqTz.js} +1 -1
  110. package/assets/{index-CgvcHmR7.js → index-YyewAtxu.js} +1 -1
  111. package/assets/{index-DCy3UdsY.js → index-a62MEGzC.js} +1 -1
  112. package/assets/{index-ZsWOupBf.js → index-crVxZA-3.js} +1 -1
  113. package/assets/{index-atL8DMAD.js → index-eR2BQEn3.js} +1 -1
  114. package/assets/{index-lia1DHpb.js → index-pCZmKsUc.js} +1 -1
  115. package/assets/{index-BMfvPaeE.js → index-ycAekMh-.js} +1 -1
  116. package/assets/{index.es-BdVIt87u.js → index.es-Clfd8n9X.js} +1 -1
  117. package/assets/{index.es-Df5aw0SC.js → index.es-DlF_3uv_.js} +4 -4
  118. package/assets/{index.es-DN16GURc.js → index.es-xajRQQ-9.js} +1 -1
  119. package/assets/{localBatchGatewayRequest-IqnQgBVr.js → localBatchGatewayRequest-CxV7CkF0.js} +1 -1
  120. package/assets/{mana-rate-C7Xb6QOI.js → mana-rate-HiPPfJwE.js} +1 -1
  121. package/assets/{networks-DN2XAief.js → networks-DqfX9Mw6.js} +1 -1
  122. package/assets/{onramp-B19K6tdH.js → onramp-ysJm9_I2.js} +1 -1
  123. package/assets/{openzeppelin-DGZusii6.js → openzeppelin-C8BwugSd.js} +1 -1
  124. package/assets/{parseNft-DMGK6Taa.js → parseNft-ttELvFXh.js} +2 -2
  125. package/assets/{parseSignature-Cp_SEN37.js → parseSignature-BUMEnAVd.js} +3 -3
  126. package/assets/{parseSignature-BN4GI5Gq.js → parseSignature-BY4ETsCJ.js} +1 -1
  127. package/assets/{passkeys-D_kmBKbc.js → passkeys-cKtVgLWy.js} +1 -1
  128. package/assets/{pay-with-exchange-BOHZzA4e.js → pay-with-exchange-_biZz1bs.js} +1 -1
  129. package/assets/{qr-overlay-CxQ_5fgo.js → qr-overlay-CUUyyjB4.js} +1 -1
  130. package/assets/{receive-DH_J_1l9.js → receive-Ct0p2V6_.js} +1 -1
  131. package/assets/{resolveImplementation-D8Xd3SU4.js → resolveImplementation-CrXCyIA3.js} +1 -1
  132. package/assets/{rpc-CLZOpWR4.js → rpc-B_PtwG8P.js} +1 -1
  133. package/assets/{secp256k1-BJpXPJIB.js → secp256k1-BHpk8kxj.js} +1 -1
  134. package/assets/{secp256k1-BBSuqIwv.js → secp256k1-C2YG7CTs.js} +1 -1
  135. package/assets/{secp256k1-Bt0GketY.js → secp256k1-DvHkD7Ln.js} +1 -1
  136. package/assets/{send-BOh425tb.js → send-B4-vLgbZ.js} +1 -1
  137. package/assets/{send-batch-transaction-DONfz9fC.js → send-batch-transaction-Dr_1zK2x.js} +1 -1
  138. package/assets/{send-eip712-transaction-C-ftAsHC.js → send-eip712-transaction-e5d3-I5n.js} +2 -2
  139. package/assets/{send-gasless-transaction-DvIC4XMf.js → send-gasless-transaction-hfNVmFuC.js} +2 -2
  140. package/assets/{send-transaction-4Pzr9Is4.js → send-transaction-AE4gbLbx.js} +2 -2
  141. package/assets/{sendRawTransaction-Beep3a_c.js → sendRawTransaction-BuFkD4rL.js} +3 -3
  142. package/assets/{serializeTransaction-DSKyq4zg.js → serializeTransaction-DbtSO7eG.js} +1 -1
  143. package/assets/{session-proposal-EjRZl42C.js → session-proposal-Z_hvYy-l.js} +1 -1
  144. package/assets/{session-request-Bu1VWYTD.js → session-request-Di-qGpws.js} +2 -2
  145. package/assets/{signing-BzQX0vi3.js → signing-ByY-PbpF.js} +3 -3
  146. package/assets/{socials-Dl4vkgvy.js → socials-C2_Ry2Pa.js} +1 -1
  147. package/assets/{swaps-B1fxMUbG.js → swaps-atTRyi6S.js} +1 -1
  148. package/assets/{thirdweb-D8mff26M.js → thirdweb-JUf4I4fd.js} +3 -3
  149. package/assets/{to-serializable-transaction-D0Ot62NY.js → to-serializable-transaction-DG4LO8kM.js} +2 -2
  150. package/assets/trade-encoding-DB6daWEb.js +1 -0
  151. package/assets/{transactionReceipt-CsXKmeJS.js → transactionReceipt-yJTxkzP2.js} +1 -1
  152. package/assets/{transactions-EPT_g3Bm.js → transactions-DHUK-2qW.js} +1 -1
  153. package/assets/{useCreditPacks-19hJrzxg.js → useCreditPacks-BYlDej2O.js} +1 -1
  154. package/assets/{useInfiniteGrid-DzWtFyHK.js → useInfiniteGrid-DWshFIqR.js} +1 -1
  155. package/assets/useManaRate-_PfWfJdh.js +1 -0
  156. package/assets/{useStore-B63Yqu_R.js → useStore-B33TojLf.js} +1 -1
  157. package/assets/{useTheme-PoMzVS0s.js → useTheme-He91kBbi.js} +1 -1
  158. package/assets/{verifyHash-BEO4ZrCQ.js → verifyHash-P48QT828.js} +1 -1
  159. package/assets/{w3m-modal-rFWYtees.js → w3m-modal-4i7wgjUL.js} +1 -1
  160. package/assets/{w3m-modal-ClmixmsH.js → w3m-modal-Bg_urlfN.js} +1 -1
  161. package/assets/{wait-for-tx-receipt-B8_pgfcA.js → wait-for-tx-receipt-CtN0J51M.js} +1 -1
  162. package/assets/{wallets-Dm-solJh.js → wallets-CkQyCjuq.js} +5 -5
  163. package/assets/{web-connector-DBjxfQt_.js → web-connector-ClVjflKq.js} +3 -3
  164. package/assets/{writeContract-CrX86u2O.js → writeContract-ZYH-yaYg.js} +1 -1
  165. package/assets/{zoraTestnet-AwQWrKOY.js → zoraTestnet-B95WaAkB.js} +1 -1
  166. package/index.html +11 -11
  167. package/package.json +2 -2
  168. package/assets/trade-encoding-C87iaBkc.js +0 -1
  169. package/assets/useManaRate-rTAxqnrj.js +0 -1
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/fortmatic-DM_o40Lo.js","assets/react-BW1xvPTF.js","assets/index-7wIrWeGQ.js","assets/dcl-schemas-BICTSpB5.js","assets/ethers-BcZhdsUx.js","assets/sentry-BV_ZSgtd.js","assets/index-COjgItKg.js","assets/index-BVcRMh5p.js","assets/index-CSZuXP_O.js","assets/hooks.module-C4R15-Vr.js","assets/events-DQ172AOg.js","assets/intl-CBcMB1D2.js","assets/index-CFAO03Mm.js","assets/index-s056mQ5V.js","assets/index-D3DtvRSj.css","assets/W3MFrameProviderSingleton-CSS0v250.js","assets/index-BZ6S4-Qy.js","assets/browser-ponyfill-6L1OGOLN.js","assets/browser-ponyfill-CI1-rMvf.js","assets/NetworkUtil-C1aEwuOK.js","assets/index-C1kCjuW_.js","assets/index-nibyPLVP.js","assets/index-Dd36z0m0.js","assets/index.es-BdVIt87u.js","assets/lit-element-B3y9oplH.js","assets/index-CGJaoBK1.js","assets/sendRawTransaction-Beep3a_c.js","assets/index-B6MKNzS8.js","assets/store-CraP4F4Y.js","assets/custom-_W6fFDpX.js","assets/writeContract-CrX86u2O.js","assets/networks-DN2XAief.js","assets/zoraTestnet-AwQWrKOY.js","assets/verifyHash-BEO4ZrCQ.js","assets/secp256k1-BJpXPJIB.js","assets/serializeTransaction-DSKyq4zg.js","assets/index-m5R1RgvV.js","assets/index-DiGXPxzb.js","assets/index-DfquOfhZ.js","assets/index-DYFQOypb.js","assets/wallets-Dm-solJh.js","assets/signing-BzQX0vi3.js","assets/prepare-contract-call-CHrp3EL4.js","assets/utils-B7rjkjB1.js","assets/to-serializable-transaction-D0Ot62NY.js","assets/transaction-BOS1fhp8.js","assets/get-bytecode-C6TlbHJu.js","assets/execute-CtC0aukb.js","assets/detectExtension-BgMIFAUw.js","assets/linkAccount-BR5_llhd.js","assets/index-DD481f9l.js","assets/ethereum-3zUUm4Pr.js","assets/types-DC0Zmj1B.js","assets/hashTypedData-BvnMw7-W.js","assets/send-transaction-4Pzr9Is4.js","assets/eth_sendRawTransaction-DPdnXbFR.js","assets/index-CJdot1dH.js","assets/in-app-d1EIziHl.js","assets/passkeys-D_kmBKbc.js","assets/uint8-array-CjVHUazS.js","assets/thirdweb-D8mff26M.js","assets/wait-for-tx-receipt-B8_pgfcA.js","assets/transactionReceipt-CsXKmeJS.js","assets/sleep-mAKpSMLY.js","assets/eth_estimateGas-JYqF9U1i.js","assets/eth_getStorageAt--oQrWy0Q.js","assets/eth_getTransactionCount-BEhAgz2O.js","assets/decimals-Bmvg-V50.js","assets/decimals-C4nLn1ac.js","assets/zora-sepolia-CVS3owSi.js","assets/send-batch-transaction-DONfz9fC.js","assets/chains-Znt1BTfw.js"])))=>i.map(i=>d[i]);
2
- var ce=Object.defineProperty;var de=(o,n,e)=>n in o?ce(o,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[n]=e;var d=(o,n,e)=>de(o,typeof n!="symbol"?n+"":n,e);import{c as h,e as l,f as g}from"./dcl-schemas-BICTSpB5.js";import{g as ue}from"./react-BW1xvPTF.js";import{r as he}from"./events-DQ172AOg.js";import{_ as m}from"./index-s056mQ5V.js";var C;(function(o){o.Update="Web3ReactUpdate",o.Error="Web3ReactError",o.Deactivate="Web3ReactDeactivate"})(C||(C={}));const le={clientId:"e1adce863fe287bb6cf0e3fd90bdb77f",chains:[h.ChainId.ETHEREUM_MAINNET,h.ChainId.ETHEREUM_SEPOLIA,h.ChainId.MATIC_MAINNET,h.ChainId.MATIC_AMOY]},pe={storageKey:"decentraland-connect-storage-key",[l.ProviderType.INJECTED]:{},[l.ProviderType.FORTMATIC]:{apiKeys:{[h.ChainId.ETHEREUM_MAINNET]:"pk_live_F8E24DF8DD5BCBC5",[h.ChainId.ETHEREUM_SEPOLIA]:"pk_test_5B728BEFE5C10911"},urls:A(l.ProviderType.FORTMATIC)},[l.ProviderType.NETWORK]:{urls:A(l.ProviderType.NETWORK)},[l.ProviderType.WALLET_LINK]:{appName:"Decentraland",urls:A(l.ProviderType.WALLET_LINK)},[l.ProviderType.WALLET_CONNECT_V2]:{projectId:"61570c542c2d66c659492e5b24a41522",urls:A(l.ProviderType.WALLET_CONNECT_V2),chains:[h.ChainId.ETHEREUM_MAINNET,h.ChainId.ETHEREUM_SEPOLIA,h.ChainId.MATIC_MAINNET,h.ChainId.MATIC_AMOY,h.ChainId.ARBITRUM_MAINNET,h.ChainId.OPTIMISM_MAINNET,h.ChainId.AVALANCHE_MAINNET,h.ChainId.BSC_MAINNET,h.ChainId.FANTOM_MAINNET]},[l.ProviderType.MAGIC]:{apiKey:"pk_live_212568025B158355",urls:A(l.ProviderType.MAGIC),chains:[h.ChainId.ETHEREUM_MAINNET,h.ChainId.ETHEREUM_SEPOLIA,h.ChainId.MATIC_MAINNET,h.ChainId.MATIC_AMOY,h.ChainId.OPTIMISM_MAINNET,h.ChainId.ARBITRUM_MAINNET,h.ChainId.AVALANCHE_MAINNET,h.ChainId.BSC_MAINNET,h.ChainId.FANTOM_MAINNET]},[l.ProviderType.MAGIC_TEST]:{apiKey:"pk_live_CE856A4938B36648",urls:A(l.ProviderType.MAGIC),chains:[h.ChainId.ETHEREUM_MAINNET,h.ChainId.ETHEREUM_SEPOLIA,h.ChainId.MATIC_MAINNET,h.ChainId.MATIC_AMOY,h.ChainId.OPTIMISM_MAINNET,h.ChainId.ARBITRUM_MAINNET,h.ChainId.AVALANCHE_MAINNET,h.ChainId.BSC_MAINNET,h.ChainId.FANTOM_MAINNET]},thirdweb:le};function I(){return pe}function A(o){const n={[h.ChainId.ETHEREUM_MAINNET]:"https://rpc.decentraland.org/mainnet",[h.ChainId.ETHEREUM_SEPOLIA]:"https://rpc.decentraland.org/sepolia",[h.ChainId.MATIC_MAINNET]:"https://rpc.decentraland.org/polygon",[h.ChainId.MATIC_AMOY]:"https://rpc.decentraland.org/amoy",[h.ChainId.ARBITRUM_MAINNET]:"https://rpc.decentraland.org/arbitrum",[h.ChainId.OPTIMISM_MAINNET]:"https://rpc.decentraland.org/optimism",[h.ChainId.AVALANCHE_MAINNET]:"https://rpc.decentraland.org/avalanche",[h.ChainId.BSC_MAINNET]:"https://rpc.decentraland.org/binance",[h.ChainId.FANTOM_MAINNET]:"https://rpc.decentraland.org/fantom"};let e="";switch(o){case l.ProviderType.WALLET_LINK:e="walletlink";break;case l.ProviderType.FORTMATIC:e="fortmatic";break;case l.ProviderType.MAGIC:e="magic";break;case l.ProviderType.MAGIC_TEST:e="magic";break;case l.ProviderType.WALLET_CONNECT_V2:e="walletconnect-v2";break;case l.ProviderType.THIRDWEB:e="thirdweb";break}if(e){const t=Object.keys(n);for(const r of t)n[r]+=`?project=${e}`}return n}var $=he();const je=ue($);function fe(o,n){o.prototype=Object.create(n.prototype),o.prototype.constructor=o,o.__proto__=n}var E=(function(o){fe(n,o);function n(t){var r,i=t===void 0?{}:t,s=i.supportedChainIds;return r=o.call(this)||this,r.supportedChainIds=s,r}var e=n.prototype;return e.emitUpdate=function(r){this.emit(C.Update,r)},e.emitError=function(r){this.emit(C.Error,r)},e.emitDeactivate=function(){this.emit(C.Deactivate)},n})($.EventEmitter);class z extends E{constructor(e){const t=I()[g.ProviderType.FORTMATIC],r=Object.keys(t.apiKeys).map(i=>Number(i));if(!r.includes(e))throw new Error(`Invariant error: Unsupported chainId ${e}`);super({supportedChainIds:r});d(this,"apiKey");d(this,"chainId");d(this,"rpcUrl");d(this,"fortmatic");this.apiKey=t.apiKeys[e],this.chainId=e,this.rpcUrl=t.urls[e]}async activate(){if(!this.fortmatic){const{default:t}=await m(async()=>{const{default:r}=await import("./fortmatic-DM_o40Lo.js").then(i=>i.f);return{default:r}},__vite__mapDeps([0,1]));this.fortmatic=new t(this.apiKey,{rpcUrl:this.rpcUrl,chainId:this.chainId})}const e=await this.fortmatic.getProvider().enable().then(t=>t[0]);return{provider:this.fortmatic.getProvider(),chainId:this.chainId,account:e}}getApiKey(){return this.apiKey}async getProvider(){return this.fortmatic.getProvider()}async getChainId(){return this.chainId}async getAccount(){return this.fortmatic.getProvider().send("eth_accounts").then(e=>e[0])}deactivate(){}close(){return this.fortmatic.user.logout()}}function j(){return j=Object.assign||function(o){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(o[t]=e[t])}return o},j.apply(this,arguments)}function q(o,n){o.prototype=Object.create(n.prototype),o.prototype.constructor=o,o.__proto__=n}function K(o){return K=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},K(o)}function L(o,n){return L=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t},L(o,n)}function ve(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function O(o,n,e){return ve()?O=Reflect.construct:O=function(r,i,s){var a=[null];a.push.apply(a,i);var c=Function.bind.apply(r,a),u=new c;return s&&L(u,s.prototype),u},O.apply(null,arguments)}function we(o){return Function.toString.call(o).indexOf("[native code]")!==-1}function S(o){var n=typeof Map=="function"?new Map:void 0;return S=function(t){if(t===null||!we(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n<"u"){if(n.has(t))return n.get(t);n.set(t,r)}function r(){return O(t,arguments,K(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),L(r,t)},S(o)}function b(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}typeof Symbol<"u"&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")));typeof Symbol<"u"&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));function P(o,n){try{var e=o()}catch(t){return n(t)}return e&&e.then?e.then(void 0,n):e}function y(o){return o.hasOwnProperty("result")?o.result:o}var k=(function(o){q(n,o);function n(){var e;return e=o.call(this)||this,e.name=e.constructor.name,e.message="No Ethereum provider was found on window.ethereum.",e}return n})(S(Error)),ge=(function(o){q(n,o);function n(){var e;return e=o.call(this)||this,e.name=e.constructor.name,e.message="The user rejected the request.",e}return n})(S(Error)),me=(function(o){q(n,o);function n(t){var r;return r=o.call(this,t)||this,r.handleNetworkChanged=r.handleNetworkChanged.bind(b(r)),r.handleChainChanged=r.handleChainChanged.bind(b(r)),r.handleAccountsChanged=r.handleAccountsChanged.bind(b(r)),r.handleClose=r.handleClose.bind(b(r)),r}var e=n.prototype;return e.handleChainChanged=function(r){this.emitUpdate({chainId:r,provider:window.ethereum})},e.handleAccountsChanged=function(r){r.length===0?this.emitDeactivate():this.emitUpdate({account:r[0]})},e.handleClose=function(r,i){this.emitDeactivate()},e.handleNetworkChanged=function(r){this.emitUpdate({chainId:r,provider:window.ethereum})},e.activate=function(){try{var r=function(f){if(i)return f;function p(){return j({provider:window.ethereum},a?{account:a}:{})}var v=(function(){if(!a)return Promise.resolve(window.ethereum.enable().then(function(T){return T&&y(T)[0]})).then(function(T){a=T})})();return v&&v.then?v.then(p):p(v)},i=!1,s=this;if(!window.ethereum)throw new k;window.ethereum.on&&(window.ethereum.on("chainChanged",s.handleChainChanged),window.ethereum.on("accountsChanged",s.handleAccountsChanged),window.ethereum.on("close",s.handleClose),window.ethereum.on("networkChanged",s.handleNetworkChanged)),window.ethereum.isMetaMask&&(window.ethereum.autoRefreshOnNetworkChange=!1);var a,c=P(function(){return Promise.resolve(window.ethereum.send("eth_requestAccounts").then(function(u){return y(u)[0]})).then(function(u){a=u})},function(u){if(u.code===4001)throw new ge});return Promise.resolve(c&&c.then?c.then(r):r(c))}catch(u){return Promise.reject(u)}},e.getProvider=function(){try{return Promise.resolve(window.ethereum)}catch(r){return Promise.reject(r)}},e.getChainId=function(){try{var r=function(){function c(){if(!i)try{i=y(window.ethereum.send({method:"net_version"}))}catch{}return i||(window.ethereum.isDapper?i=y(window.ethereum.cachedResults.net_version):i=window.ethereum.chainId||window.ethereum.netVersion||window.ethereum.networkVersion||window.ethereum._chainId),i}var u=(function(){if(!i){var f=P(function(){return Promise.resolve(window.ethereum.send("net_version").then(y)).then(function(p){i=p})},function(){});if(f&&f.then)return f.then(function(){})}})();return u&&u.then?u.then(c):c(u)};if(!window.ethereum)throw new k;var i,s=P(function(){return Promise.resolve(window.ethereum.send("eth_chainId").then(y)).then(function(a){i=a})},function(){});return Promise.resolve(s&&s.then?s.then(r):r(s))}catch(a){return Promise.reject(a)}},e.getAccount=function(){try{var r=function(){function c(){return i||(i=y(window.ethereum.send({method:"eth_accounts"}))[0]),i}var u=(function(){if(!i){var f=P(function(){return Promise.resolve(window.ethereum.enable().then(function(p){return y(p)[0]})).then(function(p){i=p})},function(){});if(f&&f.then)return f.then(function(){})}})();return u&&u.then?u.then(c):c(u)};if(!window.ethereum)throw new k;var i,s=P(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(a){return y(a)[0]})).then(function(a){i=a})},function(){});return Promise.resolve(s&&s.then?s.then(r):r(s))}catch(a){return Promise.reject(a)}},e.deactivate=function(){window.ethereum&&window.ethereum.removeListener&&(window.ethereum.removeListener("chainChanged",this.handleChainChanged),window.ethereum.removeListener("accountsChanged",this.handleAccountsChanged),window.ethereum.removeListener("close",this.handleClose),window.ethereum.removeListener("networkChanged",this.handleNetworkChanged))},e.isAuthorized=function(){try{return window.ethereum?Promise.resolve(P(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(r){return y(r).length>0}))},function(){return!1})):Promise.resolve(!1)}catch(r){return Promise.reject(r)}},n})(E);class G extends Error{constructor(){super("There was an error unlocking your wallet. Please be sure your wallet is unlocked and try again."),this.name="ErrorUnlockingWallet"}}const Ie=60*1e3;class J extends me{constructor(n){super({supportedChainIds:[n]})}async activate(){const n=new Promise((t,r)=>{setTimeout(()=>{r(new G)},Ie)}),e=super.activate();return Promise.race([e,n])}}var ye="Invariant failed";function V(o,n){throw new Error(ye)}function Y(o,n){o.prototype=Object.create(n.prototype),o.prototype.constructor=o,N(o,n)}function D(o){return D=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},D(o)}function N(o,n){return N=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t},N(o,n)}function Ce(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function R(o,n,e){return Ce()?R=Reflect.construct:R=function(r,i,s){var a=[null];a.push.apply(a,i);var c=Function.bind.apply(r,a),u=new c;return s&&N(u,s.prototype),u},R.apply(null,arguments)}function Ee(o){return Function.toString.call(o).indexOf("[native code]")!==-1}function W(o){var n=typeof Map=="function"?new Map:void 0;return W=function(t){if(t===null||!Ee(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n<"u"){if(n.has(t))return n.get(t);n.set(t,r)}function r(){return R(t,arguments,D(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),N(r,t)},W(o)}var U=(function(o){Y(n,o);function n(e,t,r){var i;return i=o.call(this)||this,i.code=t,i.data=r,i.name=i.constructor.name,i.message=e,i}return n})(W(Error)),Ae=function(n,e){var t=this,r=this;this.isMetaMask=!1,this.sendAsync=function(s,a){console.log("sendAsync",s.method,s.params),r.request(s.method,s.params).then(function(c){return a(null,{jsonrpc:"2.0",id:s.id,result:c})}).catch(function(c){return a(c,null)})},this.request=function(s,a){try{return typeof s!="string"&&(a=s.params,s=s.method),Promise.resolve(fetch(t.url,{method:"POST",body:JSON.stringify({jsonrpc:"2.0",id:1,method:s,params:a}),headers:{"Content-Type":"application/json"}})).then(function(c){if(!c.ok)throw new U(c.status+": "+c.statusText,-32e3);return Promise.resolve(c.json()).then(function(u){if("error"in u){var f,p,v;throw new U(u==null||(f=u.error)==null?void 0:f.message,u==null||(p=u.error)==null?void 0:p.code,u==null||(v=u.error)==null?void 0:v.data)}else{if("result"in u)return u.result;throw new U("Received unexpected JSON-RPC response to "+s+" request.",-32e3,u)}})})}catch(c){return Promise.reject(c)}},this.chainId=n,this.url=e;var i=new URL(e);this.host=i.host,this.path=i.pathname},Te=(function(o){Y(n,o);function n(t){var r,i=t.urls,s=t.defaultChainId;return s||Object.keys(i).length===1||V(),r=o.call(this,{supportedChainIds:Object.keys(i).map(function(a){return Number(a)})})||this,r.currentChainId=s||Number(Object.keys(i)[0]),r.providers=Object.keys(i).reduce(function(a,c){return a[Number(c)]=new Ae(Number(c),i[Number(c)]),a},{}),r}var e=n.prototype;return e.activate=function(){try{var r=this;return Promise.resolve({provider:r.providers[r.currentChainId],chainId:r.currentChainId,account:null})}catch(i){return Promise.reject(i)}},e.getProvider=function(){try{var r=this;return Promise.resolve(r.providers[r.currentChainId])}catch(i){return Promise.reject(i)}},e.getChainId=function(){try{var r=this;return Promise.resolve(r.currentChainId)}catch(i){return Promise.reject(i)}},e.getAccount=function(){return Promise.resolve(null)},e.deactivate=function(){},e.changeChainId=function(r){Object.keys(this.providers).includes(r.toString())||V(),this.currentChainId=r,this.emitUpdate({provider:this.providers[this.currentChainId],chainId:r})},n})(E);class Q extends Te{constructor(n){super({urls:I()[l.ProviderType.NETWORK].urls,defaultChainId:n})}}function x(){return x=Object.assign||function(o){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(o[t]=e[t])}return o},x.apply(this,arguments)}function Pe(o,n){o.prototype=Object.create(n.prototype),o.prototype.constructor=o,F(o,n)}function F(o,n){return F=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t},F(o,n)}function B(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}var _e=1,Ne=(function(o){Pe(n,o);function n(t){var r,i=t.url,s=t.appName,a=t.appLogoUrl,c=t.darkMode,u=t.supportedChainIds;return r=o.call(this,{supportedChainIds:u})||this,r.url=i,r.appName=s,r.appLogoUrl=a,r.darkMode=c||!1,r.handleChainChanged=r.handleChainChanged.bind(B(r)),r.handleAccountsChanged=r.handleAccountsChanged.bind(B(r)),r}var e=n.prototype;return e.activate=function(){try{var r=this,i=function(){return Promise.resolve(r.provider.request({method:"eth_requestAccounts"})).then(function(c){var u=c[0];return r.provider.on("chainChanged",r.handleChainChanged),r.provider.on("accountsChanged",r.handleAccountsChanged),{provider:r.provider,account:u}})},s=(function(){if(window.ethereum&&window.ethereum.isCoinbaseWallet===!0)r.provider=window.ethereum;else{var a=(function(){if(!r.walletLink)return Promise.resolve(m(()=>import("./index-7wIrWeGQ.js").then(c=>c.i),__vite__mapDeps([2,1,3,4,5,6,7,8,9,10,11])).then(function(c){var u;return(u=c==null?void 0:c.default)!=null?u:c})).then(function(c){r.walletLink=new c(x({appName:r.appName,darkMode:r.darkMode},r.appLogoUrl?{appLogoUrl:r.appLogoUrl}:{})),r.provider=r.walletLink.makeWeb3Provider(r.url,_e)})})();if(a&&a.then)return a.then(function(){})}})();return Promise.resolve(s&&s.then?s.then(i):i(s))}catch(a){return Promise.reject(a)}},e.getProvider=function(){try{var r=this;return Promise.resolve(r.provider)}catch(i){return Promise.reject(i)}},e.getChainId=function(){try{var r=this;return Promise.resolve(r.provider.chainId)}catch(i){return Promise.reject(i)}},e.getAccount=function(){try{var r=this;return Promise.resolve(r.provider.request({method:"eth_requestAccounts"})).then(function(i){return i[0]})}catch(i){return Promise.reject(i)}},e.deactivate=function(){this.provider.removeListener("chainChanged",this.handleChainChanged),this.provider.removeListener("accountsChanged",this.handleAccountsChanged)},e.close=function(){try{var r=this;return r.provider.close(),r.emitDeactivate(),Promise.resolve()}catch(i){return Promise.reject(i)}},e.handleChainChanged=function(r){this.emitUpdate({chainId:r})},e.handleAccountsChanged=function(r){this.emitUpdate({account:r[0]})},n})(E);class X extends Ne{constructor(n){const e=I()[g.ProviderType.WALLET_LINK],t=e.urls[n];if(!t)throw new Error(`Unsupported chainId for WalletLink: ${n}. Supported chains: ${Object.keys(e.urls).join(", ")}`);super({url:t,appName:e.appName,supportedChainIds:[n]})}}class Me{}class Z extends Me{get(n){const e=window.localStorage.getItem(n);return e===null?void 0:e}set(n,e){window.localStorage.setItem(n,e)}remove(n){window.localStorage.removeItem(n)}removeRegExp(n){for(let e=localStorage.length-1;e>=0;e--){const t=localStorage.key(e);t&&n.test(t)&&localStorage.removeItem(t)}}}const be={[g.ChainId.ETHEREUM_MAINNET]:"mainnet",[g.ChainId.ETHEREUM_SEPOLIA]:"sepolia",[g.ChainId.MATIC_MAINNET]:"polygon",[g.ChainId.MATIC_AMOY]:"polygonAmoy",[g.ChainId.ARBITRUM_MAINNET]:"arbitrum",[g.ChainId.OPTIMISM_MAINNET]:"optimism",[g.ChainId.AVALANCHE_MAINNET]:"avalanche",[g.ChainId.BSC_MAINNET]:"bsc",[g.ChainId.FANTOM_MAINNET]:"fantom"},w=class w extends E{constructor(e){super({supportedChainIds:w.configuration.chains});d(this,"desiredChainId");d(this,"appKit");d(this,"provider");d(this,"accountUnsubscribe");d(this,"networkUnsubscribe");d(this,"initAppKit",async()=>{if(w.sharedAppKit)return this.appKit=w.sharedAppKit,this.appKit;const{createAppKit:e}=await m(async()=>{const{createAppKit:s}=await import("./index-CFAO03Mm.js").then(a=>a.h);return{createAppKit:s}},__vite__mapDeps([12,13,1,5,3,4,11,14,15,16,17,18,19,20,21,22,23,24])),{WagmiAdapter:t}=await m(async()=>{const{WagmiAdapter:s}=await import("./index-CGJaoBK1.js").then(a=>a.b);return{WagmiAdapter:s}},__vite__mapDeps([25,15,3,16,1,5,17,18,19,13,4,11,14,26,27,6,28,29,30])),r=await this.getNetworks(),i=new t({networks:r,projectId:w.configuration.projectId});return this.appKit=e({adapters:[i],projectId:w.configuration.projectId,networks:r,defaultNetwork:r[0],metadata:{name:"Decentraland",description:"Decentraland - Virtual World",url:typeof window<"u"?window.location.origin:"https://decentraland.org",icons:["https://decentraland.org/favicon.ico"]},themeMode:"dark",themeVariables:{"--w3m-z-index":3e3},features:{analytics:!1,email:!1,socials:!1,onramp:!1,swaps:!1},enableInjected:!0,enableEIP6963:!0}),w.sharedAppKit=this.appKit,await this.waitForSessionRestore(),this.appKit});d(this,"waitForSessionRestore",async()=>{const e=this.appKit;if(!e)return;const t=e.getAccount();if((t==null?void 0:t.status)==="connected"||(t==null?void 0:t.status)==="disconnected")return;const r=t!=null&&t.status?5e3:500;return new Promise(i=>{const s=setTimeout(()=>{a==null||a(),i()},r),a=e.subscribeAccount(c=>{((c==null?void 0:c.status)==="connected"||(c==null?void 0:c.status)==="disconnected")&&(clearTimeout(s),a==null||a(),i())},"eip155")})});d(this,"validateRestoredSession",async e=>{try{const t=e.getWalletProvider();return t?(await t.request({method:"eth_chainId"}),!0):!1}catch(t){return w.isStaleSessionError(t)?!1:(console.warn("Error validating WalletConnect session:",t),!0)}});d(this,"openModalAndWaitForConnection",async()=>{const e=this.requireAppKit(),t=()=>new Promise((r,i)=>{let s=!1;const a=(p,v)=>{s||(s=!0,clearTimeout(c),p==null||p(),v==null||v())},c=setTimeout(()=>{a(),i(new Error("Connection timeout"))},3e5),u=e.subscribeAccount(p=>{p!=null&&p.isConnected&&(p!=null&&p.address)&&(a(u,f),r(p.address))},"eip155"),f=e.subscribeState(p=>{!p.open&&!e.getAddress("eip155")&&(a(u,f),i(new Error("User closed the modal without connecting")))})});try{await e.open({view:"Connect"}),await t()}catch(r){if(w.isStaleSessionError(r)){if(console.warn("Stale session detected, retrying connection..."),w.clearStorage(),await this.initAppKit(),!this.appKit)throw new Error("AppKit reinitialization failed");await this.appKit.open({view:"Connect"}),await t()}else throw r}});d(this,"activate",async()=>{try{await this.initAppKit()}catch(c){if(console.error("Error initializing AppKit",c),w.isStaleSessionError(c))console.warn("WalletConnect session is stale, clearing storage and retrying..."),w.clearStorage(),await this.initAppKit();else throw c}const e=this.requireAppKit(),t=e.getAccount();(t==null?void 0:t.status)==="connected"&&(t==null?void 0:t.address)?await this.validateRestoredSession(e)||(console.warn("Restored WalletConnect session is stale, clearing and prompting reconnection..."),w.clearStorage(),await this.initAppKit(),await this.openModalAndWaitForConnection()):await this.openModalAndWaitForConnection();const i=e.getWalletProvider();if(!i)throw new Error("Failed to get wallet provider after connection");this.provider=i,this.accountUnsubscribe=e.subscribeAccount(c=>{c!=null&&c.address&&this.handleAccountsChanged([c.address])},"eip155"),this.networkUnsubscribe=e.subscribeCaipNetworkChange(c=>{c!=null&&c.id&&this.handleChainChanged(c.id)});const s=e.getAddress("eip155");return{chainId:e.getChainId()||this.desiredChainId,account:s||null,provider:this.provider}});d(this,"getProvider",async()=>{if(!this.provider)throw new Error("Provider is undefined");return this.provider});d(this,"getChainId",async()=>this.requireAppKit().getChainId()??this.desiredChainId);d(this,"getAccount",async()=>this.requireAppKit().getAddress("eip155")??null);d(this,"getWalletName",()=>{var e,t,r;return(r=(t=(e=this.appKit)==null?void 0:e.getWalletInfo)==null?void 0:t.call(e,"eip155"))==null?void 0:r.name});d(this,"deactivate",()=>{});d(this,"clearInstance",()=>{var t,r;const e=this.provider;if(e){this.provider=void 0;try{(t=this.accountUnsubscribe)==null||t.call(this),(r=this.networkUnsubscribe)==null||r.call(this)}catch(i){console.warn("Error unsubscribing from AppKit events:",i)}return this.accountUnsubscribe=void 0,this.networkUnsubscribe=void 0,e}});d(this,"close",async()=>{var t;if(this.clearInstance()){try{await((t=this.appKit)==null?void 0:t.disconnect())}catch(r){console.warn("Error during WalletConnect disconnect:",r)}this.appKit=void 0}});d(this,"handleAccountsChanged",e=>{this.emitUpdate({account:e[0]})});d(this,"handleChainChanged",e=>{this.emitUpdate({chainId:e})});d(this,"handleDisconnect",()=>{this.clearInstance(),this.emitDeactivate()});this.desiredChainId=e}requireAppKit(){if(!this.appKit)throw new Error("AppKit is not initialized");return this.appKit}static isStaleSessionError(e){if(e instanceof Error){const t=e.message.toLowerCase();return t.includes("no matching key")||t.includes("session topic doesn't exist")||t.includes("missing or invalid")||t.includes("expired")||t.includes("user rejected methods")||t.includes("is not configured")||t.includes("cannot read properties")||t.includes("undefined is not an object")}return!1}async getNetworks(){const e=w.configuration.chains,t=await m(()=>import("./networks-DN2XAief.js"),__vite__mapDeps([31,19,5,1,32,33,26,13,3,4,11,14,34,35,30])),r=e.map(s=>{const a=be[s];if(a)return t[a]}).filter(s=>s!==void 0);if(r.length===0)throw new Error("No supported networks found for WalletConnect");const i=r.find(s=>s.id===this.desiredChainId);if(i){const s=r.filter(a=>a.id!==this.desiredChainId);return[i,...s]}return[r[0],...r.slice(1)]}};d(w,"configuration",I()[g.ProviderType.WALLET_CONNECT_V2]),d(w,"clearStorage",(e=new Z)=>{e.removeRegExp(new RegExp("^wc@2:")),e.removeRegExp(new RegExp("^@appkit")),w.sharedAppKit=null}),d(w,"sharedAppKit",null);let _=w;class H extends E{constructor(e,t=!1){super({supportedChainIds:I()[g.ProviderType.MAGIC].chains});d(this,"isTest");d(this,"chainId");d(this,"account");d(this,"magic");d(this,"activate",async()=>{if(this.magic=await this.buildMagicInstance(this.chainId),!await this.magic.user.isLoggedIn())throw new Error("Magic: user isn't logged in");const t=await this.getProvider(),r=await t.request({method:"eth_accounts"});return this.account=r[0]??null,{provider:t,chainId:this.chainId,account:this.account}});d(this,"getProvider",async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");const e=await this.magic.wallet.getProvider();return{...e,isMagic:!0,request:new Proxy(e.request,{apply:async(t,r,i)=>{var s,a,c;if(((s=i[0])==null?void 0:s.method)==="wallet_switchEthereumChain")try{const u=parseInt((c=(a=i[0])==null?void 0:a.params[0])==null?void 0:c.chainId,16);return this.supportedChainIds&&!this.supportedChainIds.includes(u)?{code:2020202,message:"Unsupported Magic ChainId"}:(this.magic=await this.buildMagicInstance(u),this.emitUpdate({chainId:u}),null)}catch{return{code:2020201,message:"Error changing the Magic ChainId"}}return t.bind(e)(...i)}}),sendAsync:new Proxy(e.send,{apply:async(t,r,i)=>t.bind(e)(...i)})}});d(this,"getChainId",async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");return this.chainId});d(this,"getAccount",async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");return this.account});d(this,"getEmail",async()=>{try{if(!this.magic||!await this.magic.user.isLoggedIn())return;const t=await this.magic.user.getInfo();return(t==null?void 0:t.email)??void 0}catch{return}});d(this,"deactivate",()=>{});d(this,"buildMagicInstance",async e=>{const{Magic:t}=await m(async()=>{const{Magic:a}=await import("./index-m5R1RgvV.js");return{Magic:a}},__vite__mapDeps([36,5,1,37])),{OAuthExtension:r}=await m(async()=>{const{OAuthExtension:a}=await import("./index-DfquOfhZ.js");return{OAuthExtension:a}},__vite__mapDeps([38,37,5,1,39,7,8,4,10,3])),i=I()[this.isTest?g.ProviderType.MAGIC_TEST:g.ProviderType.MAGIC],s=i.urls[e];if(!s)throw new Error(`Unsupported chainId for Magic: ${e}. Supported chains: ${Object.keys(i.urls).join(", ")}`);return new t(i.apiKey,{extensions:[new r],network:{rpcUrl:s,chainId:e}})});this.isTest=t,this.chainId=e,this.account=null}close(){if(!this.magic)throw new Error("Magic: instance was not initialized");return this.magic.user.logout()}}class ee extends H{constructor(n){super(n,!0)}}class te extends E{constructor(e){var t;super({supportedChainIds:((t=I().thirdweb)==null?void 0:t.chains)??[h.ChainId.ETHEREUM_MAINNET,h.ChainId.ETHEREUM_SEPOLIA]});d(this,"chainId");d(this,"client");d(this,"wallet");d(this,"chain");d(this,"eip1193Provider");d(this,"activate",async()=>{const e=await this.getClient(),t=await this.getWallet();let r;try{r=await t.autoConnect({client:e})}catch{throw new Error("Thirdweb: No active session. User must authenticate first.")}if(!r)throw new Error("Thirdweb: No active session. User must authenticate first.");const i=await this.getChain(),{EIP1193:s}=await m(async()=>{const{EIP1193:u}=await import("./wallets-Dm-solJh.js").then(f=>f.Q);return{EIP1193:u}},__vite__mapDeps([40,41,42,43,5,1,13,3,4,11,14,44,45,46,47,48,49,50,51,52,28,53,54,55,20,16,21,56,22]));return this.eip1193Provider=s.toProvider({wallet:t,chain:i,client:e}),{provider:await this.getProvider(),chainId:this.chainId,account:r.address}});d(this,"getProvider",async()=>{if(!this.eip1193Provider)throw new Error("Thirdweb: wallet is not connected. Call activate() first.");const e=this.eip1193Provider;return{...e,isDapper:!1,isFortmatic:!1,isMetamask:!1,isMagic:!1,isThirdweb:!0,request:new Proxy(e.request,{apply:async(t,r,i)=>{var a,c,u,f;if(((a=i[0])==null?void 0:a.method)==="wallet_switchEthereumChain"){const p=(f=(u=(c=i[0])==null?void 0:c.params)==null?void 0:u[0])==null?void 0:f.chainId,v=parseInt(p,16);if(this.supportedChainIds&&!this.supportedChainIds.includes(v))throw new Error("Thirdweb: unsupported chain");this.chainId=v,this.chain=null,this.eip1193Provider=null;const T=await this.getClient(),ne=await this.getWallet(),ie=await this.getChain(),{EIP1193:oe}=await m(async()=>{const{EIP1193:ae}=await import("./wallets-Dm-solJh.js").then(se=>se.Q);return{EIP1193:ae}},__vite__mapDeps([40,41,42,43,5,1,13,3,4,11,14,44,45,46,47,48,49,50,51,52,28,53,54,55,20,16,21,56,22]));return this.eip1193Provider=oe.toProvider({wallet:ne,chain:ie,client:T}),this.emitUpdate({chainId:v}),null}return Reflect.apply(t,e,i)}}),sendAsync:new Proxy(e.request,{apply:async(t,r,i)=>Reflect.apply(t,e,i)})}});d(this,"getChainId",async()=>this.chainId);d(this,"getAccount",async()=>{if(!this.wallet)return null;try{const e=this.wallet.getAccount();return(e==null?void 0:e.address)??null}catch{return null}});d(this,"getEmail",async()=>{try{const e=await this.getClient(),{getUserEmail:t}=await m(async()=>{const{getUserEmail:i}=await import("./in-app-d1EIziHl.js");return{getUserEmail:i}},__vite__mapDeps([57,42,43,5,1,48,47,13,3,4,11,14,58,59]));return await t({client:e})??void 0}catch{return}});d(this,"deactivate",()=>{});this.chainId=e,this.client=null,this.wallet=null,this.chain=null,this.eip1193Provider=null}async getClient(){if(this.client)return this.client;let e;try{e=await m(()=>import("./thirdweb-D8mff26M.js").then(r=>r.t),__vite__mapDeps([60,43,5,1,42,41,13,3,4,11,14,44,45,46,61,62,63,64,65,66,55,67,68,69,70,54]))}catch{throw new Error("Thirdweb: thirdweb package is not installed.")}const t=I().thirdweb;return this.client=e.createThirdwebClient({clientId:t.clientId}),this.client}async getWallet(){if(this.wallet)return this.wallet;let e;try{e=await m(()=>import("./wallets-Dm-solJh.js").then(t=>t.Q),__vite__mapDeps([40,41,42,43,5,1,13,3,4,11,14,44,45,46,47,48,49,50,51,52,28,53,54,55,20,16,21,56,22]))}catch{throw new Error("Thirdweb: thirdweb package is not installed. Run: npm install thirdweb")}return this.wallet=e.inAppWallet(),this.wallet}async getChain(){if(this.chain)return this.chain;const e=await m(()=>import("./chains-Znt1BTfw.js"),__vite__mapDeps([71,43,5,1,69,51]));return this.chain=e.defineChain(this.chainId),this.chain}async close(){this.wallet&&await this.wallet.disconnect(),this.wallet=null,this.chain=null,this.eip1193Provider=null}}class M{constructor(n){d(this,"provider");d(this,"id",0);d(this,"on",(n,e)=>this.provider.on(n,e));d(this,"emit",(n,...e)=>this.provider.emit(n,e));d(this,"removeListener",(n,e)=>this.provider.removeListener(n,e));d(this,"request",async({method:n,params:e})=>this.isModernProvider()?this.provider.request({method:n,params:e}):this.send(n,e));d(this,"sendAsync",async(n,e)=>this.hasSendAsync()?this.provider.sendAsync(n,(t,r)=>{r&&!Object.prototype.hasOwnProperty.call(r,"result")?e(t,{id:0,jsonrpc:"2.0",result:r}):e(t,r)}):this.send(n,e));this.provider=n}static adapt(n){const e=new M(n);return{...n,on:e.on,emit:e.emit,removeListener:e.removeListener,request:e.request,sendAsync:e.sendAsync,send:e.send.bind(e)}}async send(n,e){let t,r,i;const s=typeof e=="function";if(s){const a=n;r=a.params||[],t=a.method,i=e}else t=n,r=e||[],i=(a,c)=>{if(a)throw a;return c};if(this.isModernProvider()){const[a,c]=await this.provider.request({method:t,params:r}).then(f=>[null,f]).catch(f=>[f,void 0]);return i(a,s?{id:"",jsonrpc:"2.0",result:c}:c)}else{this.patchOldMobile();const[a,c]=s?await new Promise(u=>this.provider.send(n,(f,p)=>{u([f,p])})):await new Promise(u=>this.provider.send({jsonrpc:"2.0",id:++this.id,method:t,params:r},(f,p)=>{const v=p;u([(v==null?void 0:v.error)??f,(v==null?void 0:v.result)??p])}));return i(a,c)}}isModernProvider(){return"request"in this.provider&&typeof this.provider.request=="function"}hasSendAsync(){return typeof this.provider.sendAsync=="function"}patchOldMobile(){this.provider&&!this.provider.isDapper&&!this.provider.isFortmatic&&!this.provider.isMetamask&&this.hasSendAsync()&&this.provider.send!==this.provider.sendAsync&&(this.provider.send=this.provider.sendAsync.bind(this.provider))}}class re{constructor(n){d(this,"storage");d(this,"connector");d(this,"promiseOfConnection");d(this,"getWalletName",()=>{if(this.connector instanceof _)return this.connector.getWalletName()});d(this,"clearConnectionData",()=>{const{storageKey:n}=I();this.storage.remove(n),_.clearStorage(this.storage)});d(this,"handleWeb3ReactDeactivate",async()=>{try{await this.disconnect()}catch(n){console.error(n)}});this.storage=n}async connect(n,e=h.ChainId.ETHEREUM_MAINNET){if(this.connector)try{await this.disconnect()}catch(a){console.error("Error disconnecting previous connection",a)}const t=this.buildConnector(n,e);t.on(C.Deactivate,this.handleWeb3ReactDeactivate);let{provider:r,account:i}={};try{const a=await t.activate();r=a.provider,i=a.account}catch(a){throw console.error("Error activating the connector",a),a}(n===l.ProviderType.MAGIC||n===l.ProviderType.MAGIC_TEST||n===l.ProviderType.THIRDWEB)&&t.on(C.Update,({chainId:a})=>{a&&this.setConnectionData(n,a)});let s=e;if(n===l.ProviderType.INJECTED){const a=await r.request({method:"eth_chainId"});s=a?parseInt(a,16):s}return this.connector=t,this.setConnectionData(n,s),{provider:M.adapt(r),providerType:n,account:i||"",chainId:s}}isConnected(){return!!this.connector&&!!this.getConnectionData()}async tryPreviousConnection(){const n=this.getConnectionData();if(!n)throw new Error("Could not find a valid provider. Make sure to call the `connect` method first");if(this.connector){const[t,r]=await Promise.all([this.connector.getProvider(),this.connector.getAccount()]);return{provider:t,providerType:n.providerType,chainId:n.chainId,account:r||""}}let e;try{e=this.promiseOfConnection?await this.promiseOfConnection:await(this.promiseOfConnection=this.connect(n.providerType,n.chainId))}finally{this.promiseOfConnection=void 0}return{...e,chainId:this.getConnectionData().chainId}}getAvailableProviders(){const n=[l.ProviderType.FORTMATIC,l.ProviderType.WALLET_CONNECT,l.ProviderType.WALLET_LINK];return typeof window<"u"&&window.ethereum!==void 0?n.unshift(l.ProviderType.INJECTED):n.unshift(l.ProviderType.METAMASK_MOBILE),n}async disconnect(){this.connector&&(this.connector.removeAllListeners(C.Deactivate),this.connector.removeAllListeners(C.Update),this.connector.deactivate(),this.isClosableConnector()&&await this.connector.close()),this.clearConnectionData(),this.connector=void 0}async getProvider(){if(!this.connector)throw new Error("No valid connector found. Please .connect() first");return this.connector.getProvider()}async getEmail(){const n=this.connector;if(n!=null&&n.getEmail)try{return await n.getEmail()}catch{return}}async createProvider(n,e=h.ChainId.ETHEREUM_MAINNET){const r=await this.buildConnector(n,e).getProvider();return M.adapt(r)}buildConnector(n,e){switch(n){case l.ProviderType.INJECTED:return new J(e);case l.ProviderType.FORTMATIC:return new z(e);case l.ProviderType.MAGIC:return new H(e);case l.ProviderType.MAGIC_TEST:return new ee(e);case l.ProviderType.WALLET_LINK:return new X(e);case l.ProviderType.NETWORK:return new Q(e);case l.ProviderType.WALLET_CONNECT_V2:return new _(e);case l.ProviderType.THIRDWEB:return new te(e);default:throw new Error(`Invalid provider ${n}`)}}getConnectionData(){const{storageKey:n}=I(),e=this.storage.get(n);try{return e?JSON.parse(e):void 0}catch(t){console.error("Error parsing connection data",t);return}}storeConnectionData(n,e){this.setConnectionData(n,e)}setConnectionData(n,e){const{storageKey:t}=I(),r=JSON.stringify({providerType:n,chainId:e});this.storage.set(t,r)}isClosableConnector(){return this.connector&&"close"in this.connector}}const Oe=new re(new Z),Ke=Object.freeze(Object.defineProperty({__proto__:null,AbstractConnector:E,ConnectionManager:re,ErrorUnlockingWallet:G,FortmaticConnector:z,InjectedConnector:J,MagicConnector:H,MagicTestConnector:ee,NetworkConnector:Q,ProviderAdapter:M,ThirdwebConnector:te,WalletConnectV2Connector:_,WalletLinkConnector:X,connection:Oe,getConfiguration:I,getRpcUrls:A},Symbol.toStringTag,{value:"Module"}));export{je as N,Oe as c,$ as e,Ke as i};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/fortmatic-DM_o40Lo.js","assets/react-BW1xvPTF.js","assets/index-7wIrWeGQ.js","assets/dcl-schemas-BICTSpB5.js","assets/ethers-BcZhdsUx.js","assets/sentry-BV_ZSgtd.js","assets/index-COjgItKg.js","assets/index-BVcRMh5p.js","assets/index-CSZuXP_O.js","assets/hooks.module-C4R15-Vr.js","assets/events-DQ172AOg.js","assets/intl-CBcMB1D2.js","assets/index-BRp1Hi5c.js","assets/index-CQ7zHnQz.js","assets/index-D3DtvRSj.css","assets/W3MFrameProviderSingleton-8Loh-tcg.js","assets/index-BZ6S4-Qy.js","assets/browser-ponyfill-6L1OGOLN.js","assets/browser-ponyfill-CI1-rMvf.js","assets/NetworkUtil-C1aEwuOK.js","assets/index-CcKCkHsm.js","assets/index-nibyPLVP.js","assets/index-DRP0urBC.js","assets/index.es-Clfd8n9X.js","assets/lit-element-B3y9oplH.js","assets/index-Da6TtbpY.js","assets/sendRawTransaction-BuFkD4rL.js","assets/index-B6MKNzS8.js","assets/store-CraP4F4Y.js","assets/custom-CAN35ixC.js","assets/writeContract-ZYH-yaYg.js","assets/networks-DqfX9Mw6.js","assets/zoraTestnet-B95WaAkB.js","assets/verifyHash-P48QT828.js","assets/secp256k1-BHpk8kxj.js","assets/serializeTransaction-DbtSO7eG.js","assets/index-m5R1RgvV.js","assets/index-DiGXPxzb.js","assets/index-DfquOfhZ.js","assets/index-DYFQOypb.js","assets/wallets-CkQyCjuq.js","assets/signing-ByY-PbpF.js","assets/prepare-contract-call-CHrp3EL4.js","assets/utils-B7rjkjB1.js","assets/to-serializable-transaction-DG4LO8kM.js","assets/transaction-BOS1fhp8.js","assets/get-bytecode-C6TlbHJu.js","assets/execute-DpamAJLp.js","assets/detectExtension-BgMIFAUw.js","assets/linkAccount-BR5_llhd.js","assets/index-CpWvcPRx.js","assets/ethereum-3zUUm4Pr.js","assets/types-DC0Zmj1B.js","assets/hashTypedData-Dwz0CvVq.js","assets/send-transaction-AE4gbLbx.js","assets/eth_sendRawTransaction-DPdnXbFR.js","assets/index-CJdot1dH.js","assets/in-app-DGKkRjiU.js","assets/passkeys-cKtVgLWy.js","assets/uint8-array-CjVHUazS.js","assets/thirdweb-JUf4I4fd.js","assets/wait-for-tx-receipt-CtN0J51M.js","assets/transactionReceipt-yJTxkzP2.js","assets/sleep-mAKpSMLY.js","assets/eth_estimateGas-JYqF9U1i.js","assets/eth_getStorageAt--oQrWy0Q.js","assets/eth_getTransactionCount-BEhAgz2O.js","assets/decimals-Bmvg-V50.js","assets/decimals-C4nLn1ac.js","assets/zora-sepolia-CVS3owSi.js","assets/send-batch-transaction-Dr_1zK2x.js","assets/chains-Znt1BTfw.js"])))=>i.map(i=>d[i]);
2
+ var ce=Object.defineProperty;var de=(o,n,e)=>n in o?ce(o,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[n]=e;var d=(o,n,e)=>de(o,typeof n!="symbol"?n+"":n,e);import{c as h,e as l,f as g}from"./dcl-schemas-BICTSpB5.js";import{g as ue}from"./react-BW1xvPTF.js";import{r as he}from"./events-DQ172AOg.js";import{_ as m}from"./index-CQ7zHnQz.js";var C;(function(o){o.Update="Web3ReactUpdate",o.Error="Web3ReactError",o.Deactivate="Web3ReactDeactivate"})(C||(C={}));const le={clientId:"e1adce863fe287bb6cf0e3fd90bdb77f",chains:[h.ChainId.ETHEREUM_MAINNET,h.ChainId.ETHEREUM_SEPOLIA,h.ChainId.MATIC_MAINNET,h.ChainId.MATIC_AMOY]},pe={storageKey:"decentraland-connect-storage-key",[l.ProviderType.INJECTED]:{},[l.ProviderType.FORTMATIC]:{apiKeys:{[h.ChainId.ETHEREUM_MAINNET]:"pk_live_F8E24DF8DD5BCBC5",[h.ChainId.ETHEREUM_SEPOLIA]:"pk_test_5B728BEFE5C10911"},urls:A(l.ProviderType.FORTMATIC)},[l.ProviderType.NETWORK]:{urls:A(l.ProviderType.NETWORK)},[l.ProviderType.WALLET_LINK]:{appName:"Decentraland",urls:A(l.ProviderType.WALLET_LINK)},[l.ProviderType.WALLET_CONNECT_V2]:{projectId:"61570c542c2d66c659492e5b24a41522",urls:A(l.ProviderType.WALLET_CONNECT_V2),chains:[h.ChainId.ETHEREUM_MAINNET,h.ChainId.ETHEREUM_SEPOLIA,h.ChainId.MATIC_MAINNET,h.ChainId.MATIC_AMOY,h.ChainId.ARBITRUM_MAINNET,h.ChainId.OPTIMISM_MAINNET,h.ChainId.AVALANCHE_MAINNET,h.ChainId.BSC_MAINNET,h.ChainId.FANTOM_MAINNET]},[l.ProviderType.MAGIC]:{apiKey:"pk_live_212568025B158355",urls:A(l.ProviderType.MAGIC),chains:[h.ChainId.ETHEREUM_MAINNET,h.ChainId.ETHEREUM_SEPOLIA,h.ChainId.MATIC_MAINNET,h.ChainId.MATIC_AMOY,h.ChainId.OPTIMISM_MAINNET,h.ChainId.ARBITRUM_MAINNET,h.ChainId.AVALANCHE_MAINNET,h.ChainId.BSC_MAINNET,h.ChainId.FANTOM_MAINNET]},[l.ProviderType.MAGIC_TEST]:{apiKey:"pk_live_CE856A4938B36648",urls:A(l.ProviderType.MAGIC),chains:[h.ChainId.ETHEREUM_MAINNET,h.ChainId.ETHEREUM_SEPOLIA,h.ChainId.MATIC_MAINNET,h.ChainId.MATIC_AMOY,h.ChainId.OPTIMISM_MAINNET,h.ChainId.ARBITRUM_MAINNET,h.ChainId.AVALANCHE_MAINNET,h.ChainId.BSC_MAINNET,h.ChainId.FANTOM_MAINNET]},thirdweb:le};function I(){return pe}function A(o){const n={[h.ChainId.ETHEREUM_MAINNET]:"https://rpc.decentraland.org/mainnet",[h.ChainId.ETHEREUM_SEPOLIA]:"https://rpc.decentraland.org/sepolia",[h.ChainId.MATIC_MAINNET]:"https://rpc.decentraland.org/polygon",[h.ChainId.MATIC_AMOY]:"https://rpc.decentraland.org/amoy",[h.ChainId.ARBITRUM_MAINNET]:"https://rpc.decentraland.org/arbitrum",[h.ChainId.OPTIMISM_MAINNET]:"https://rpc.decentraland.org/optimism",[h.ChainId.AVALANCHE_MAINNET]:"https://rpc.decentraland.org/avalanche",[h.ChainId.BSC_MAINNET]:"https://rpc.decentraland.org/binance",[h.ChainId.FANTOM_MAINNET]:"https://rpc.decentraland.org/fantom"};let e="";switch(o){case l.ProviderType.WALLET_LINK:e="walletlink";break;case l.ProviderType.FORTMATIC:e="fortmatic";break;case l.ProviderType.MAGIC:e="magic";break;case l.ProviderType.MAGIC_TEST:e="magic";break;case l.ProviderType.WALLET_CONNECT_V2:e="walletconnect-v2";break;case l.ProviderType.THIRDWEB:e="thirdweb";break}if(e){const t=Object.keys(n);for(const r of t)n[r]+=`?project=${e}`}return n}var $=he();const je=ue($);function fe(o,n){o.prototype=Object.create(n.prototype),o.prototype.constructor=o,o.__proto__=n}var E=(function(o){fe(n,o);function n(t){var r,i=t===void 0?{}:t,s=i.supportedChainIds;return r=o.call(this)||this,r.supportedChainIds=s,r}var e=n.prototype;return e.emitUpdate=function(r){this.emit(C.Update,r)},e.emitError=function(r){this.emit(C.Error,r)},e.emitDeactivate=function(){this.emit(C.Deactivate)},n})($.EventEmitter);class z extends E{constructor(e){const t=I()[g.ProviderType.FORTMATIC],r=Object.keys(t.apiKeys).map(i=>Number(i));if(!r.includes(e))throw new Error(`Invariant error: Unsupported chainId ${e}`);super({supportedChainIds:r});d(this,"apiKey");d(this,"chainId");d(this,"rpcUrl");d(this,"fortmatic");this.apiKey=t.apiKeys[e],this.chainId=e,this.rpcUrl=t.urls[e]}async activate(){if(!this.fortmatic){const{default:t}=await m(async()=>{const{default:r}=await import("./fortmatic-DM_o40Lo.js").then(i=>i.f);return{default:r}},__vite__mapDeps([0,1]));this.fortmatic=new t(this.apiKey,{rpcUrl:this.rpcUrl,chainId:this.chainId})}const e=await this.fortmatic.getProvider().enable().then(t=>t[0]);return{provider:this.fortmatic.getProvider(),chainId:this.chainId,account:e}}getApiKey(){return this.apiKey}async getProvider(){return this.fortmatic.getProvider()}async getChainId(){return this.chainId}async getAccount(){return this.fortmatic.getProvider().send("eth_accounts").then(e=>e[0])}deactivate(){}close(){return this.fortmatic.user.logout()}}function j(){return j=Object.assign||function(o){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(o[t]=e[t])}return o},j.apply(this,arguments)}function q(o,n){o.prototype=Object.create(n.prototype),o.prototype.constructor=o,o.__proto__=n}function K(o){return K=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},K(o)}function L(o,n){return L=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t},L(o,n)}function ve(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function O(o,n,e){return ve()?O=Reflect.construct:O=function(r,i,s){var a=[null];a.push.apply(a,i);var c=Function.bind.apply(r,a),u=new c;return s&&L(u,s.prototype),u},O.apply(null,arguments)}function we(o){return Function.toString.call(o).indexOf("[native code]")!==-1}function S(o){var n=typeof Map=="function"?new Map:void 0;return S=function(t){if(t===null||!we(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n<"u"){if(n.has(t))return n.get(t);n.set(t,r)}function r(){return O(t,arguments,K(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),L(r,t)},S(o)}function b(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}typeof Symbol<"u"&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")));typeof Symbol<"u"&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));function P(o,n){try{var e=o()}catch(t){return n(t)}return e&&e.then?e.then(void 0,n):e}function y(o){return o.hasOwnProperty("result")?o.result:o}var k=(function(o){q(n,o);function n(){var e;return e=o.call(this)||this,e.name=e.constructor.name,e.message="No Ethereum provider was found on window.ethereum.",e}return n})(S(Error)),ge=(function(o){q(n,o);function n(){var e;return e=o.call(this)||this,e.name=e.constructor.name,e.message="The user rejected the request.",e}return n})(S(Error)),me=(function(o){q(n,o);function n(t){var r;return r=o.call(this,t)||this,r.handleNetworkChanged=r.handleNetworkChanged.bind(b(r)),r.handleChainChanged=r.handleChainChanged.bind(b(r)),r.handleAccountsChanged=r.handleAccountsChanged.bind(b(r)),r.handleClose=r.handleClose.bind(b(r)),r}var e=n.prototype;return e.handleChainChanged=function(r){this.emitUpdate({chainId:r,provider:window.ethereum})},e.handleAccountsChanged=function(r){r.length===0?this.emitDeactivate():this.emitUpdate({account:r[0]})},e.handleClose=function(r,i){this.emitDeactivate()},e.handleNetworkChanged=function(r){this.emitUpdate({chainId:r,provider:window.ethereum})},e.activate=function(){try{var r=function(f){if(i)return f;function p(){return j({provider:window.ethereum},a?{account:a}:{})}var v=(function(){if(!a)return Promise.resolve(window.ethereum.enable().then(function(T){return T&&y(T)[0]})).then(function(T){a=T})})();return v&&v.then?v.then(p):p(v)},i=!1,s=this;if(!window.ethereum)throw new k;window.ethereum.on&&(window.ethereum.on("chainChanged",s.handleChainChanged),window.ethereum.on("accountsChanged",s.handleAccountsChanged),window.ethereum.on("close",s.handleClose),window.ethereum.on("networkChanged",s.handleNetworkChanged)),window.ethereum.isMetaMask&&(window.ethereum.autoRefreshOnNetworkChange=!1);var a,c=P(function(){return Promise.resolve(window.ethereum.send("eth_requestAccounts").then(function(u){return y(u)[0]})).then(function(u){a=u})},function(u){if(u.code===4001)throw new ge});return Promise.resolve(c&&c.then?c.then(r):r(c))}catch(u){return Promise.reject(u)}},e.getProvider=function(){try{return Promise.resolve(window.ethereum)}catch(r){return Promise.reject(r)}},e.getChainId=function(){try{var r=function(){function c(){if(!i)try{i=y(window.ethereum.send({method:"net_version"}))}catch{}return i||(window.ethereum.isDapper?i=y(window.ethereum.cachedResults.net_version):i=window.ethereum.chainId||window.ethereum.netVersion||window.ethereum.networkVersion||window.ethereum._chainId),i}var u=(function(){if(!i){var f=P(function(){return Promise.resolve(window.ethereum.send("net_version").then(y)).then(function(p){i=p})},function(){});if(f&&f.then)return f.then(function(){})}})();return u&&u.then?u.then(c):c(u)};if(!window.ethereum)throw new k;var i,s=P(function(){return Promise.resolve(window.ethereum.send("eth_chainId").then(y)).then(function(a){i=a})},function(){});return Promise.resolve(s&&s.then?s.then(r):r(s))}catch(a){return Promise.reject(a)}},e.getAccount=function(){try{var r=function(){function c(){return i||(i=y(window.ethereum.send({method:"eth_accounts"}))[0]),i}var u=(function(){if(!i){var f=P(function(){return Promise.resolve(window.ethereum.enable().then(function(p){return y(p)[0]})).then(function(p){i=p})},function(){});if(f&&f.then)return f.then(function(){})}})();return u&&u.then?u.then(c):c(u)};if(!window.ethereum)throw new k;var i,s=P(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(a){return y(a)[0]})).then(function(a){i=a})},function(){});return Promise.resolve(s&&s.then?s.then(r):r(s))}catch(a){return Promise.reject(a)}},e.deactivate=function(){window.ethereum&&window.ethereum.removeListener&&(window.ethereum.removeListener("chainChanged",this.handleChainChanged),window.ethereum.removeListener("accountsChanged",this.handleAccountsChanged),window.ethereum.removeListener("close",this.handleClose),window.ethereum.removeListener("networkChanged",this.handleNetworkChanged))},e.isAuthorized=function(){try{return window.ethereum?Promise.resolve(P(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(r){return y(r).length>0}))},function(){return!1})):Promise.resolve(!1)}catch(r){return Promise.reject(r)}},n})(E);class G extends Error{constructor(){super("There was an error unlocking your wallet. Please be sure your wallet is unlocked and try again."),this.name="ErrorUnlockingWallet"}}const Ie=60*1e3;class J extends me{constructor(n){super({supportedChainIds:[n]})}async activate(){const n=new Promise((t,r)=>{setTimeout(()=>{r(new G)},Ie)}),e=super.activate();return Promise.race([e,n])}}var ye="Invariant failed";function V(o,n){throw new Error(ye)}function Y(o,n){o.prototype=Object.create(n.prototype),o.prototype.constructor=o,N(o,n)}function D(o){return D=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},D(o)}function N(o,n){return N=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t},N(o,n)}function Ce(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function R(o,n,e){return Ce()?R=Reflect.construct:R=function(r,i,s){var a=[null];a.push.apply(a,i);var c=Function.bind.apply(r,a),u=new c;return s&&N(u,s.prototype),u},R.apply(null,arguments)}function Ee(o){return Function.toString.call(o).indexOf("[native code]")!==-1}function W(o){var n=typeof Map=="function"?new Map:void 0;return W=function(t){if(t===null||!Ee(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n<"u"){if(n.has(t))return n.get(t);n.set(t,r)}function r(){return R(t,arguments,D(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),N(r,t)},W(o)}var U=(function(o){Y(n,o);function n(e,t,r){var i;return i=o.call(this)||this,i.code=t,i.data=r,i.name=i.constructor.name,i.message=e,i}return n})(W(Error)),Ae=function(n,e){var t=this,r=this;this.isMetaMask=!1,this.sendAsync=function(s,a){console.log("sendAsync",s.method,s.params),r.request(s.method,s.params).then(function(c){return a(null,{jsonrpc:"2.0",id:s.id,result:c})}).catch(function(c){return a(c,null)})},this.request=function(s,a){try{return typeof s!="string"&&(a=s.params,s=s.method),Promise.resolve(fetch(t.url,{method:"POST",body:JSON.stringify({jsonrpc:"2.0",id:1,method:s,params:a}),headers:{"Content-Type":"application/json"}})).then(function(c){if(!c.ok)throw new U(c.status+": "+c.statusText,-32e3);return Promise.resolve(c.json()).then(function(u){if("error"in u){var f,p,v;throw new U(u==null||(f=u.error)==null?void 0:f.message,u==null||(p=u.error)==null?void 0:p.code,u==null||(v=u.error)==null?void 0:v.data)}else{if("result"in u)return u.result;throw new U("Received unexpected JSON-RPC response to "+s+" request.",-32e3,u)}})})}catch(c){return Promise.reject(c)}},this.chainId=n,this.url=e;var i=new URL(e);this.host=i.host,this.path=i.pathname},Te=(function(o){Y(n,o);function n(t){var r,i=t.urls,s=t.defaultChainId;return s||Object.keys(i).length===1||V(),r=o.call(this,{supportedChainIds:Object.keys(i).map(function(a){return Number(a)})})||this,r.currentChainId=s||Number(Object.keys(i)[0]),r.providers=Object.keys(i).reduce(function(a,c){return a[Number(c)]=new Ae(Number(c),i[Number(c)]),a},{}),r}var e=n.prototype;return e.activate=function(){try{var r=this;return Promise.resolve({provider:r.providers[r.currentChainId],chainId:r.currentChainId,account:null})}catch(i){return Promise.reject(i)}},e.getProvider=function(){try{var r=this;return Promise.resolve(r.providers[r.currentChainId])}catch(i){return Promise.reject(i)}},e.getChainId=function(){try{var r=this;return Promise.resolve(r.currentChainId)}catch(i){return Promise.reject(i)}},e.getAccount=function(){return Promise.resolve(null)},e.deactivate=function(){},e.changeChainId=function(r){Object.keys(this.providers).includes(r.toString())||V(),this.currentChainId=r,this.emitUpdate({provider:this.providers[this.currentChainId],chainId:r})},n})(E);class Q extends Te{constructor(n){super({urls:I()[l.ProviderType.NETWORK].urls,defaultChainId:n})}}function x(){return x=Object.assign||function(o){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(o[t]=e[t])}return o},x.apply(this,arguments)}function Pe(o,n){o.prototype=Object.create(n.prototype),o.prototype.constructor=o,F(o,n)}function F(o,n){return F=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t},F(o,n)}function B(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}var _e=1,Ne=(function(o){Pe(n,o);function n(t){var r,i=t.url,s=t.appName,a=t.appLogoUrl,c=t.darkMode,u=t.supportedChainIds;return r=o.call(this,{supportedChainIds:u})||this,r.url=i,r.appName=s,r.appLogoUrl=a,r.darkMode=c||!1,r.handleChainChanged=r.handleChainChanged.bind(B(r)),r.handleAccountsChanged=r.handleAccountsChanged.bind(B(r)),r}var e=n.prototype;return e.activate=function(){try{var r=this,i=function(){return Promise.resolve(r.provider.request({method:"eth_requestAccounts"})).then(function(c){var u=c[0];return r.provider.on("chainChanged",r.handleChainChanged),r.provider.on("accountsChanged",r.handleAccountsChanged),{provider:r.provider,account:u}})},s=(function(){if(window.ethereum&&window.ethereum.isCoinbaseWallet===!0)r.provider=window.ethereum;else{var a=(function(){if(!r.walletLink)return Promise.resolve(m(()=>import("./index-7wIrWeGQ.js").then(c=>c.i),__vite__mapDeps([2,1,3,4,5,6,7,8,9,10,11])).then(function(c){var u;return(u=c==null?void 0:c.default)!=null?u:c})).then(function(c){r.walletLink=new c(x({appName:r.appName,darkMode:r.darkMode},r.appLogoUrl?{appLogoUrl:r.appLogoUrl}:{})),r.provider=r.walletLink.makeWeb3Provider(r.url,_e)})})();if(a&&a.then)return a.then(function(){})}})();return Promise.resolve(s&&s.then?s.then(i):i(s))}catch(a){return Promise.reject(a)}},e.getProvider=function(){try{var r=this;return Promise.resolve(r.provider)}catch(i){return Promise.reject(i)}},e.getChainId=function(){try{var r=this;return Promise.resolve(r.provider.chainId)}catch(i){return Promise.reject(i)}},e.getAccount=function(){try{var r=this;return Promise.resolve(r.provider.request({method:"eth_requestAccounts"})).then(function(i){return i[0]})}catch(i){return Promise.reject(i)}},e.deactivate=function(){this.provider.removeListener("chainChanged",this.handleChainChanged),this.provider.removeListener("accountsChanged",this.handleAccountsChanged)},e.close=function(){try{var r=this;return r.provider.close(),r.emitDeactivate(),Promise.resolve()}catch(i){return Promise.reject(i)}},e.handleChainChanged=function(r){this.emitUpdate({chainId:r})},e.handleAccountsChanged=function(r){this.emitUpdate({account:r[0]})},n})(E);class X extends Ne{constructor(n){const e=I()[g.ProviderType.WALLET_LINK],t=e.urls[n];if(!t)throw new Error(`Unsupported chainId for WalletLink: ${n}. Supported chains: ${Object.keys(e.urls).join(", ")}`);super({url:t,appName:e.appName,supportedChainIds:[n]})}}class Me{}class Z extends Me{get(n){const e=window.localStorage.getItem(n);return e===null?void 0:e}set(n,e){window.localStorage.setItem(n,e)}remove(n){window.localStorage.removeItem(n)}removeRegExp(n){for(let e=localStorage.length-1;e>=0;e--){const t=localStorage.key(e);t&&n.test(t)&&localStorage.removeItem(t)}}}const be={[g.ChainId.ETHEREUM_MAINNET]:"mainnet",[g.ChainId.ETHEREUM_SEPOLIA]:"sepolia",[g.ChainId.MATIC_MAINNET]:"polygon",[g.ChainId.MATIC_AMOY]:"polygonAmoy",[g.ChainId.ARBITRUM_MAINNET]:"arbitrum",[g.ChainId.OPTIMISM_MAINNET]:"optimism",[g.ChainId.AVALANCHE_MAINNET]:"avalanche",[g.ChainId.BSC_MAINNET]:"bsc",[g.ChainId.FANTOM_MAINNET]:"fantom"},w=class w extends E{constructor(e){super({supportedChainIds:w.configuration.chains});d(this,"desiredChainId");d(this,"appKit");d(this,"provider");d(this,"accountUnsubscribe");d(this,"networkUnsubscribe");d(this,"initAppKit",async()=>{if(w.sharedAppKit)return this.appKit=w.sharedAppKit,this.appKit;const{createAppKit:e}=await m(async()=>{const{createAppKit:s}=await import("./index-BRp1Hi5c.js").then(a=>a.h);return{createAppKit:s}},__vite__mapDeps([12,13,1,5,3,4,11,14,15,16,17,18,19,20,21,22,23,24])),{WagmiAdapter:t}=await m(async()=>{const{WagmiAdapter:s}=await import("./index-Da6TtbpY.js").then(a=>a.b);return{WagmiAdapter:s}},__vite__mapDeps([25,15,3,16,1,5,17,18,19,13,4,11,14,26,27,6,28,29,30])),r=await this.getNetworks(),i=new t({networks:r,projectId:w.configuration.projectId});return this.appKit=e({adapters:[i],projectId:w.configuration.projectId,networks:r,defaultNetwork:r[0],metadata:{name:"Decentraland",description:"Decentraland - Virtual World",url:typeof window<"u"?window.location.origin:"https://decentraland.org",icons:["https://decentraland.org/favicon.ico"]},themeMode:"dark",themeVariables:{"--w3m-z-index":3e3},features:{analytics:!1,email:!1,socials:!1,onramp:!1,swaps:!1},enableInjected:!0,enableEIP6963:!0}),w.sharedAppKit=this.appKit,await this.waitForSessionRestore(),this.appKit});d(this,"waitForSessionRestore",async()=>{const e=this.appKit;if(!e)return;const t=e.getAccount();if((t==null?void 0:t.status)==="connected"||(t==null?void 0:t.status)==="disconnected")return;const r=t!=null&&t.status?5e3:500;return new Promise(i=>{const s=setTimeout(()=>{a==null||a(),i()},r),a=e.subscribeAccount(c=>{((c==null?void 0:c.status)==="connected"||(c==null?void 0:c.status)==="disconnected")&&(clearTimeout(s),a==null||a(),i())},"eip155")})});d(this,"validateRestoredSession",async e=>{try{const t=e.getWalletProvider();return t?(await t.request({method:"eth_chainId"}),!0):!1}catch(t){return w.isStaleSessionError(t)?!1:(console.warn("Error validating WalletConnect session:",t),!0)}});d(this,"openModalAndWaitForConnection",async()=>{const e=this.requireAppKit(),t=()=>new Promise((r,i)=>{let s=!1;const a=(p,v)=>{s||(s=!0,clearTimeout(c),p==null||p(),v==null||v())},c=setTimeout(()=>{a(),i(new Error("Connection timeout"))},3e5),u=e.subscribeAccount(p=>{p!=null&&p.isConnected&&(p!=null&&p.address)&&(a(u,f),r(p.address))},"eip155"),f=e.subscribeState(p=>{!p.open&&!e.getAddress("eip155")&&(a(u,f),i(new Error("User closed the modal without connecting")))})});try{await e.open({view:"Connect"}),await t()}catch(r){if(w.isStaleSessionError(r)){if(console.warn("Stale session detected, retrying connection..."),w.clearStorage(),await this.initAppKit(),!this.appKit)throw new Error("AppKit reinitialization failed");await this.appKit.open({view:"Connect"}),await t()}else throw r}});d(this,"activate",async()=>{try{await this.initAppKit()}catch(c){if(console.error("Error initializing AppKit",c),w.isStaleSessionError(c))console.warn("WalletConnect session is stale, clearing storage and retrying..."),w.clearStorage(),await this.initAppKit();else throw c}const e=this.requireAppKit(),t=e.getAccount();(t==null?void 0:t.status)==="connected"&&(t==null?void 0:t.address)?await this.validateRestoredSession(e)||(console.warn("Restored WalletConnect session is stale, clearing and prompting reconnection..."),w.clearStorage(),await this.initAppKit(),await this.openModalAndWaitForConnection()):await this.openModalAndWaitForConnection();const i=e.getWalletProvider();if(!i)throw new Error("Failed to get wallet provider after connection");this.provider=i,this.accountUnsubscribe=e.subscribeAccount(c=>{c!=null&&c.address&&this.handleAccountsChanged([c.address])},"eip155"),this.networkUnsubscribe=e.subscribeCaipNetworkChange(c=>{c!=null&&c.id&&this.handleChainChanged(c.id)});const s=e.getAddress("eip155");return{chainId:e.getChainId()||this.desiredChainId,account:s||null,provider:this.provider}});d(this,"getProvider",async()=>{if(!this.provider)throw new Error("Provider is undefined");return this.provider});d(this,"getChainId",async()=>this.requireAppKit().getChainId()??this.desiredChainId);d(this,"getAccount",async()=>this.requireAppKit().getAddress("eip155")??null);d(this,"getWalletName",()=>{var e,t,r;return(r=(t=(e=this.appKit)==null?void 0:e.getWalletInfo)==null?void 0:t.call(e,"eip155"))==null?void 0:r.name});d(this,"deactivate",()=>{});d(this,"clearInstance",()=>{var t,r;const e=this.provider;if(e){this.provider=void 0;try{(t=this.accountUnsubscribe)==null||t.call(this),(r=this.networkUnsubscribe)==null||r.call(this)}catch(i){console.warn("Error unsubscribing from AppKit events:",i)}return this.accountUnsubscribe=void 0,this.networkUnsubscribe=void 0,e}});d(this,"close",async()=>{var t;if(this.clearInstance()){try{await((t=this.appKit)==null?void 0:t.disconnect())}catch(r){console.warn("Error during WalletConnect disconnect:",r)}this.appKit=void 0}});d(this,"handleAccountsChanged",e=>{this.emitUpdate({account:e[0]})});d(this,"handleChainChanged",e=>{this.emitUpdate({chainId:e})});d(this,"handleDisconnect",()=>{this.clearInstance(),this.emitDeactivate()});this.desiredChainId=e}requireAppKit(){if(!this.appKit)throw new Error("AppKit is not initialized");return this.appKit}static isStaleSessionError(e){if(e instanceof Error){const t=e.message.toLowerCase();return t.includes("no matching key")||t.includes("session topic doesn't exist")||t.includes("missing or invalid")||t.includes("expired")||t.includes("user rejected methods")||t.includes("is not configured")||t.includes("cannot read properties")||t.includes("undefined is not an object")}return!1}async getNetworks(){const e=w.configuration.chains,t=await m(()=>import("./networks-DqfX9Mw6.js"),__vite__mapDeps([31,19,5,1,32,33,26,13,3,4,11,14,34,35,30])),r=e.map(s=>{const a=be[s];if(a)return t[a]}).filter(s=>s!==void 0);if(r.length===0)throw new Error("No supported networks found for WalletConnect");const i=r.find(s=>s.id===this.desiredChainId);if(i){const s=r.filter(a=>a.id!==this.desiredChainId);return[i,...s]}return[r[0],...r.slice(1)]}};d(w,"configuration",I()[g.ProviderType.WALLET_CONNECT_V2]),d(w,"clearStorage",(e=new Z)=>{e.removeRegExp(new RegExp("^wc@2:")),e.removeRegExp(new RegExp("^@appkit")),w.sharedAppKit=null}),d(w,"sharedAppKit",null);let _=w;class H extends E{constructor(e,t=!1){super({supportedChainIds:I()[g.ProviderType.MAGIC].chains});d(this,"isTest");d(this,"chainId");d(this,"account");d(this,"magic");d(this,"activate",async()=>{if(this.magic=await this.buildMagicInstance(this.chainId),!await this.magic.user.isLoggedIn())throw new Error("Magic: user isn't logged in");const t=await this.getProvider(),r=await t.request({method:"eth_accounts"});return this.account=r[0]??null,{provider:t,chainId:this.chainId,account:this.account}});d(this,"getProvider",async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");const e=await this.magic.wallet.getProvider();return{...e,isMagic:!0,request:new Proxy(e.request,{apply:async(t,r,i)=>{var s,a,c;if(((s=i[0])==null?void 0:s.method)==="wallet_switchEthereumChain")try{const u=parseInt((c=(a=i[0])==null?void 0:a.params[0])==null?void 0:c.chainId,16);return this.supportedChainIds&&!this.supportedChainIds.includes(u)?{code:2020202,message:"Unsupported Magic ChainId"}:(this.magic=await this.buildMagicInstance(u),this.emitUpdate({chainId:u}),null)}catch{return{code:2020201,message:"Error changing the Magic ChainId"}}return t.bind(e)(...i)}}),sendAsync:new Proxy(e.send,{apply:async(t,r,i)=>t.bind(e)(...i)})}});d(this,"getChainId",async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");return this.chainId});d(this,"getAccount",async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");return this.account});d(this,"getEmail",async()=>{try{if(!this.magic||!await this.magic.user.isLoggedIn())return;const t=await this.magic.user.getInfo();return(t==null?void 0:t.email)??void 0}catch{return}});d(this,"deactivate",()=>{});d(this,"buildMagicInstance",async e=>{const{Magic:t}=await m(async()=>{const{Magic:a}=await import("./index-m5R1RgvV.js");return{Magic:a}},__vite__mapDeps([36,5,1,37])),{OAuthExtension:r}=await m(async()=>{const{OAuthExtension:a}=await import("./index-DfquOfhZ.js");return{OAuthExtension:a}},__vite__mapDeps([38,37,5,1,39,7,8,4,10,3])),i=I()[this.isTest?g.ProviderType.MAGIC_TEST:g.ProviderType.MAGIC],s=i.urls[e];if(!s)throw new Error(`Unsupported chainId for Magic: ${e}. Supported chains: ${Object.keys(i.urls).join(", ")}`);return new t(i.apiKey,{extensions:[new r],network:{rpcUrl:s,chainId:e}})});this.isTest=t,this.chainId=e,this.account=null}close(){if(!this.magic)throw new Error("Magic: instance was not initialized");return this.magic.user.logout()}}class ee extends H{constructor(n){super(n,!0)}}class te extends E{constructor(e){var t;super({supportedChainIds:((t=I().thirdweb)==null?void 0:t.chains)??[h.ChainId.ETHEREUM_MAINNET,h.ChainId.ETHEREUM_SEPOLIA]});d(this,"chainId");d(this,"client");d(this,"wallet");d(this,"chain");d(this,"eip1193Provider");d(this,"activate",async()=>{const e=await this.getClient(),t=await this.getWallet();let r;try{r=await t.autoConnect({client:e})}catch{throw new Error("Thirdweb: No active session. User must authenticate first.")}if(!r)throw new Error("Thirdweb: No active session. User must authenticate first.");const i=await this.getChain(),{EIP1193:s}=await m(async()=>{const{EIP1193:u}=await import("./wallets-CkQyCjuq.js").then(f=>f.Q);return{EIP1193:u}},__vite__mapDeps([40,41,42,43,5,1,13,3,4,11,14,44,45,46,47,48,49,50,51,52,28,53,54,55,20,16,21,56,22]));return this.eip1193Provider=s.toProvider({wallet:t,chain:i,client:e}),{provider:await this.getProvider(),chainId:this.chainId,account:r.address}});d(this,"getProvider",async()=>{if(!this.eip1193Provider)throw new Error("Thirdweb: wallet is not connected. Call activate() first.");const e=this.eip1193Provider;return{...e,isDapper:!1,isFortmatic:!1,isMetamask:!1,isMagic:!1,isThirdweb:!0,request:new Proxy(e.request,{apply:async(t,r,i)=>{var a,c,u,f;if(((a=i[0])==null?void 0:a.method)==="wallet_switchEthereumChain"){const p=(f=(u=(c=i[0])==null?void 0:c.params)==null?void 0:u[0])==null?void 0:f.chainId,v=parseInt(p,16);if(this.supportedChainIds&&!this.supportedChainIds.includes(v))throw new Error("Thirdweb: unsupported chain");this.chainId=v,this.chain=null,this.eip1193Provider=null;const T=await this.getClient(),ne=await this.getWallet(),ie=await this.getChain(),{EIP1193:oe}=await m(async()=>{const{EIP1193:ae}=await import("./wallets-CkQyCjuq.js").then(se=>se.Q);return{EIP1193:ae}},__vite__mapDeps([40,41,42,43,5,1,13,3,4,11,14,44,45,46,47,48,49,50,51,52,28,53,54,55,20,16,21,56,22]));return this.eip1193Provider=oe.toProvider({wallet:ne,chain:ie,client:T}),this.emitUpdate({chainId:v}),null}return Reflect.apply(t,e,i)}}),sendAsync:new Proxy(e.request,{apply:async(t,r,i)=>Reflect.apply(t,e,i)})}});d(this,"getChainId",async()=>this.chainId);d(this,"getAccount",async()=>{if(!this.wallet)return null;try{const e=this.wallet.getAccount();return(e==null?void 0:e.address)??null}catch{return null}});d(this,"getEmail",async()=>{try{const e=await this.getClient(),{getUserEmail:t}=await m(async()=>{const{getUserEmail:i}=await import("./in-app-DGKkRjiU.js");return{getUserEmail:i}},__vite__mapDeps([57,42,43,5,1,48,47,13,3,4,11,14,58,59]));return await t({client:e})??void 0}catch{return}});d(this,"deactivate",()=>{});this.chainId=e,this.client=null,this.wallet=null,this.chain=null,this.eip1193Provider=null}async getClient(){if(this.client)return this.client;let e;try{e=await m(()=>import("./thirdweb-JUf4I4fd.js").then(r=>r.t),__vite__mapDeps([60,43,5,1,42,41,13,3,4,11,14,44,45,46,61,62,63,64,65,66,55,67,68,69,70,54]))}catch{throw new Error("Thirdweb: thirdweb package is not installed.")}const t=I().thirdweb;return this.client=e.createThirdwebClient({clientId:t.clientId}),this.client}async getWallet(){if(this.wallet)return this.wallet;let e;try{e=await m(()=>import("./wallets-CkQyCjuq.js").then(t=>t.Q),__vite__mapDeps([40,41,42,43,5,1,13,3,4,11,14,44,45,46,47,48,49,50,51,52,28,53,54,55,20,16,21,56,22]))}catch{throw new Error("Thirdweb: thirdweb package is not installed. Run: npm install thirdweb")}return this.wallet=e.inAppWallet(),this.wallet}async getChain(){if(this.chain)return this.chain;const e=await m(()=>import("./chains-Znt1BTfw.js"),__vite__mapDeps([71,43,5,1,69,51]));return this.chain=e.defineChain(this.chainId),this.chain}async close(){this.wallet&&await this.wallet.disconnect(),this.wallet=null,this.chain=null,this.eip1193Provider=null}}class M{constructor(n){d(this,"provider");d(this,"id",0);d(this,"on",(n,e)=>this.provider.on(n,e));d(this,"emit",(n,...e)=>this.provider.emit(n,e));d(this,"removeListener",(n,e)=>this.provider.removeListener(n,e));d(this,"request",async({method:n,params:e})=>this.isModernProvider()?this.provider.request({method:n,params:e}):this.send(n,e));d(this,"sendAsync",async(n,e)=>this.hasSendAsync()?this.provider.sendAsync(n,(t,r)=>{r&&!Object.prototype.hasOwnProperty.call(r,"result")?e(t,{id:0,jsonrpc:"2.0",result:r}):e(t,r)}):this.send(n,e));this.provider=n}static adapt(n){const e=new M(n);return{...n,on:e.on,emit:e.emit,removeListener:e.removeListener,request:e.request,sendAsync:e.sendAsync,send:e.send.bind(e)}}async send(n,e){let t,r,i;const s=typeof e=="function";if(s){const a=n;r=a.params||[],t=a.method,i=e}else t=n,r=e||[],i=(a,c)=>{if(a)throw a;return c};if(this.isModernProvider()){const[a,c]=await this.provider.request({method:t,params:r}).then(f=>[null,f]).catch(f=>[f,void 0]);return i(a,s?{id:"",jsonrpc:"2.0",result:c}:c)}else{this.patchOldMobile();const[a,c]=s?await new Promise(u=>this.provider.send(n,(f,p)=>{u([f,p])})):await new Promise(u=>this.provider.send({jsonrpc:"2.0",id:++this.id,method:t,params:r},(f,p)=>{const v=p;u([(v==null?void 0:v.error)??f,(v==null?void 0:v.result)??p])}));return i(a,c)}}isModernProvider(){return"request"in this.provider&&typeof this.provider.request=="function"}hasSendAsync(){return typeof this.provider.sendAsync=="function"}patchOldMobile(){this.provider&&!this.provider.isDapper&&!this.provider.isFortmatic&&!this.provider.isMetamask&&this.hasSendAsync()&&this.provider.send!==this.provider.sendAsync&&(this.provider.send=this.provider.sendAsync.bind(this.provider))}}class re{constructor(n){d(this,"storage");d(this,"connector");d(this,"promiseOfConnection");d(this,"getWalletName",()=>{if(this.connector instanceof _)return this.connector.getWalletName()});d(this,"clearConnectionData",()=>{const{storageKey:n}=I();this.storage.remove(n),_.clearStorage(this.storage)});d(this,"handleWeb3ReactDeactivate",async()=>{try{await this.disconnect()}catch(n){console.error(n)}});this.storage=n}async connect(n,e=h.ChainId.ETHEREUM_MAINNET){if(this.connector)try{await this.disconnect()}catch(a){console.error("Error disconnecting previous connection",a)}const t=this.buildConnector(n,e);t.on(C.Deactivate,this.handleWeb3ReactDeactivate);let{provider:r,account:i}={};try{const a=await t.activate();r=a.provider,i=a.account}catch(a){throw console.error("Error activating the connector",a),a}(n===l.ProviderType.MAGIC||n===l.ProviderType.MAGIC_TEST||n===l.ProviderType.THIRDWEB)&&t.on(C.Update,({chainId:a})=>{a&&this.setConnectionData(n,a)});let s=e;if(n===l.ProviderType.INJECTED){const a=await r.request({method:"eth_chainId"});s=a?parseInt(a,16):s}return this.connector=t,this.setConnectionData(n,s),{provider:M.adapt(r),providerType:n,account:i||"",chainId:s}}isConnected(){return!!this.connector&&!!this.getConnectionData()}async tryPreviousConnection(){const n=this.getConnectionData();if(!n)throw new Error("Could not find a valid provider. Make sure to call the `connect` method first");if(this.connector){const[t,r]=await Promise.all([this.connector.getProvider(),this.connector.getAccount()]);return{provider:t,providerType:n.providerType,chainId:n.chainId,account:r||""}}let e;try{e=this.promiseOfConnection?await this.promiseOfConnection:await(this.promiseOfConnection=this.connect(n.providerType,n.chainId))}finally{this.promiseOfConnection=void 0}return{...e,chainId:this.getConnectionData().chainId}}getAvailableProviders(){const n=[l.ProviderType.FORTMATIC,l.ProviderType.WALLET_CONNECT,l.ProviderType.WALLET_LINK];return typeof window<"u"&&window.ethereum!==void 0?n.unshift(l.ProviderType.INJECTED):n.unshift(l.ProviderType.METAMASK_MOBILE),n}async disconnect(){this.connector&&(this.connector.removeAllListeners(C.Deactivate),this.connector.removeAllListeners(C.Update),this.connector.deactivate(),this.isClosableConnector()&&await this.connector.close()),this.clearConnectionData(),this.connector=void 0}async getProvider(){if(!this.connector)throw new Error("No valid connector found. Please .connect() first");return this.connector.getProvider()}async getEmail(){const n=this.connector;if(n!=null&&n.getEmail)try{return await n.getEmail()}catch{return}}async createProvider(n,e=h.ChainId.ETHEREUM_MAINNET){const r=await this.buildConnector(n,e).getProvider();return M.adapt(r)}buildConnector(n,e){switch(n){case l.ProviderType.INJECTED:return new J(e);case l.ProviderType.FORTMATIC:return new z(e);case l.ProviderType.MAGIC:return new H(e);case l.ProviderType.MAGIC_TEST:return new ee(e);case l.ProviderType.WALLET_LINK:return new X(e);case l.ProviderType.NETWORK:return new Q(e);case l.ProviderType.WALLET_CONNECT_V2:return new _(e);case l.ProviderType.THIRDWEB:return new te(e);default:throw new Error(`Invalid provider ${n}`)}}getConnectionData(){const{storageKey:n}=I(),e=this.storage.get(n);try{return e?JSON.parse(e):void 0}catch(t){console.error("Error parsing connection data",t);return}}storeConnectionData(n,e){this.setConnectionData(n,e)}setConnectionData(n,e){const{storageKey:t}=I(),r=JSON.stringify({providerType:n,chainId:e});this.storage.set(t,r)}isClosableConnector(){return this.connector&&"close"in this.connector}}const Oe=new re(new Z),Ke=Object.freeze(Object.defineProperty({__proto__:null,AbstractConnector:E,ConnectionManager:re,ErrorUnlockingWallet:G,FortmaticConnector:z,InjectedConnector:J,MagicConnector:H,MagicTestConnector:ee,NetworkConnector:Q,ProviderAdapter:M,ThirdwebConnector:te,WalletConnectV2Connector:_,WalletLinkConnector:X,connection:Oe,getConfiguration:I,getRpcUrls:A},Symbol.toStringTag,{value:"Module"}));export{je as N,Oe as c,$ as e,Ke as i};
@@ -1,4 +1,4 @@
1
- import{i as m,b as f}from"./lit-element-B3y9oplH.js";import{n as h}from"./class-map-CxwNmq0D.js";import{c as l}from"./index-BbpXvktu.js";import{d as c}from"./index-CFAO03Mm.js";const p=c`
1
+ import{i as m,b as f}from"./lit-element-B3y9oplH.js";import{n as h}from"./class-map-CxwNmq0D.js";import{c as l}from"./index-BovcADsh.js";import{d as c}from"./index-BRp1Hi5c.js";const p=c`
2
2
  :host {
3
3
  display: block;
4
4
  background: linear-gradient(
@@ -1,4 +1,4 @@
1
- import{w as f,i as w,b as l}from"./lit-element-B3y9oplH.js";import{n as o,o as y}from"./class-map-CxwNmq0D.js";import{c as v,U as $}from"./index-BbpXvktu.js";import"./index-2sUFrijZ.js";import{d as b,r as x,e as z}from"./index-CFAO03Mm.js";import"./index-4QjFMRJM.js";const S=f`<svg width="86" height="96" fill="none">
1
+ import{w as f,i as w,b as l}from"./lit-element-B3y9oplH.js";import{n as o,o as y}from"./class-map-CxwNmq0D.js";import{c as v,U as $}from"./index-BovcADsh.js";import"./index-BLYcSCqE.js";import{d as b,r as x,e as z}from"./index-BRp1Hi5c.js";import"./index-BmG2cJb0.js";const S=f`<svg width="86" height="96" fill="none">
2
2
  <path
3
3
  d="M78.3244 18.926L50.1808 2.45078C45.7376 -0.150261 40.2624 -0.150262 35.8192 2.45078L7.6756 18.926C3.23322 21.5266 0.5 26.3301 0.5 31.5248V64.4752C0.5 69.6699 3.23322 74.4734 7.6756 77.074L35.8192 93.5492C40.2624 96.1503 45.7376 96.1503 50.1808 93.5492L78.3244 77.074C82.7668 74.4734 85.5 69.6699 85.5 64.4752V31.5248C85.5 26.3301 82.7668 21.5266 78.3244 18.926Z"
4
4
  />
@@ -1,4 +1,4 @@
1
- import{i as m,b as n}from"./lit-element-B3y9oplH.js";import{n as r}from"./class-map-CxwNmq0D.js";import{c as u}from"./index-BbpXvktu.js";import"./index-2sUFrijZ.js";import"./index-DFo_ZRYH.js";import{d as g,r as p,e as x}from"./index-CFAO03Mm.js";const b=g`
1
+ import{i as m,b as n}from"./lit-element-B3y9oplH.js";import{n as r}from"./class-map-CxwNmq0D.js";import{c as u}from"./index-BovcADsh.js";import"./index-BLYcSCqE.js";import"./index-L7YgxqTz.js";import{d as g,r as p,e as x}from"./index-BRp1Hi5c.js";const b=g`
2
2
  button {
3
3
  display: block;
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- import{i as b,b as l}from"./lit-element-B3y9oplH.js";import{n as s}from"./class-map-CxwNmq0D.js";import{c as p}from"./index-BbpXvktu.js";import{d as m,r as f,e as v}from"./index-CFAO03Mm.js";const h=m`
1
+ import{i as b,b as l}from"./lit-element-B3y9oplH.js";import{n as s}from"./class-map-CxwNmq0D.js";import{c as p}from"./index-BovcADsh.js";import{d as m,r as f,e as v}from"./index-BRp1Hi5c.js";const h=m`
2
2
  button {
3
3
  border: none;
4
4
  background: transparent;
@@ -1,4 +1,4 @@
1
- import{w as k,i as W,b as v}from"./lit-element-B3y9oplH.js";import{n as y}from"./class-map-CxwNmq0D.js";import{c as I}from"./index-BbpXvktu.js";import"./index-2sUFrijZ.js";import{Q as M}from"./browser-CTzRZpIE.js";import{d as O,r as N}from"./index-CFAO03Mm.js";const Q=.1,_=2.5,$=7;function x(t,a,d){return t===a?!1:(t-a<0?a-t:t-a)<=d+Q}function A(t,a){const d=Array.prototype.slice.call(M.create(t,{errorCorrectionLevel:a}).modules.data,0),l=Math.sqrt(d.length);return d.reduce((h,f,p)=>(p%l===0?h.push([f]):h[h.length-1].push(f))&&h,[])}const q={generate({uri:t,size:a,logoSize:d,padding:l=8,dotColor:h="var(--apkt-colors-black)"}){const p=[],u=A(t,"Q"),n=(a-2*l)/u.length,E=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];E.forEach(({x:i,y:e})=>{const s=(u.length-$)*n*i+l,r=(u.length-$)*n*e+l,c=.45;for(let o=0;o<E.length;o+=1){const m=n*($-o*2);p.push(k`
1
+ import{w as k,i as W,b as v}from"./lit-element-B3y9oplH.js";import{n as y}from"./class-map-CxwNmq0D.js";import{c as I}from"./index-BovcADsh.js";import"./index-BLYcSCqE.js";import{Q as M}from"./browser-CTzRZpIE.js";import{d as O,r as N}from"./index-BRp1Hi5c.js";const Q=.1,_=2.5,$=7;function x(t,a,d){return t===a?!1:(t-a<0?a-t:t-a)<=d+Q}function A(t,a){const d=Array.prototype.slice.call(M.create(t,{errorCorrectionLevel:a}).modules.data,0),l=Math.sqrt(d.length);return d.reduce((h,f,p)=>(p%l===0?h.push([f]):h[h.length-1].push(f))&&h,[])}const q={generate({uri:t,size:a,logoSize:d,padding:l=8,dotColor:h="var(--apkt-colors-black)"}){const p=[],u=A(t,"Q"),n=(a-2*l)/u.length,E=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];E.forEach(({x:i,y:e})=>{const s=(u.length-$)*n*i+l,r=(u.length-$)*n*e+l,c=.45;for(let o=0;o<E.length;o+=1){const m=n*($-o*2);p.push(k`
2
2
  <rect
3
3
  fill=${o===2?"var(--apkt-colors-black)":"var(--apkt-colors-white)"}
4
4
  width=${o===0?m-10:m}
@@ -1 +1 @@
1
- import{g as x,k as N,r as i,j as f}from"./react-BW1xvPTF.js";import{a as v,g}from"./dcl-schemas-BICTSpB5.js";import{bm as L,bn as q}from"./index-s056mQ5V.js";import{n as M}from"./emotion-styled.browser.esm-B91CdXZp.js";import{c as he,d as ye}from"./Button-B5fJsLQz.js";import{C as ve}from"./CircularProgress-BOlrlIsy.js";var A={},oe;function Ee(){if(oe)return A;oe=1,Object.defineProperty(A,"__esModule",{value:!0});function e(){let r,n;const t=new Promise((s,u)=>{r=c=>{s(c),t.isPending=!1},n=c=>{u(c),t.isPending=!1}}).catch(s=>Promise.reject(s));return t.resolve=r,t.reject=n,"finally"in t||(t.finally=s=>{t.then(s),t.catch(s)}),t.isPending=!0,t}return A.future=e,A.default=e,A}var we=Ee();const be=x(we);function se(e){return{all:e=e||new Map,on:function(r,n){var t=e.get(r);t?t.push(n):e.set(r,[n])},off:function(r,n){var t=e.get(r);t&&(n?t.splice(t.indexOf(n)>>>0,1):e.set(r,[]))},emit:function(r,n){var t=e.get(r);t&&t.slice().map(function(s){s(n)}),(t=e.get("*"))&&t.slice().map(function(s){s(r,n)})}}}const S=new Map,Y=new Map,Z=new Map,k=new Map;function ae(e){const r=document.getElementById(e);return!r||!r.contentWindow?!1:Z.get(r.contentWindow)??!1}function H(e){if(e.data&&e.data.type)try{switch(e.data.type){case v.PreviewMessageType.CONTROLLER_RESPONSE:{const r=e.data.payload,{id:n}=r,t=S.get(n);t&&(S.delete(n),r.ok?t.resolve(r.result):r.ok===!1&&t.reject(new Error(r.error)));break}case v.PreviewMessageType.EMOTE_EVENT:{const r=e.data.payload,{type:n,payload:t}=r,s=e.source?Y.get(e.source):null;s&&n&&s.emit(n,t);break}case v.PreviewMessageType.LOAD:{e.source&&(Z.set(e.source,!0),(k.get(e.source)||[]).filter(t=>{var s;return((s=t.data)==null?void 0:s.type)!==v.PreviewMessageType.LOAD}).forEach(H),k.delete(e.source));break}default:}}catch(r){console.error("Error processing WearablePreview message:",r)}}const Pe=e=>{var n;if(((n=e.data)==null?void 0:n.type)===v.PreviewMessageType.LOAD){H(e);return}if(!(e.source?Z.get(e.source):!1)&&e.source){const t=k.get(e.source)||[];t.push(e),k.set(e.source,t);return}H(e)};typeof window<"u"&&window.addEventListener("message",Pe,!1);let ie=0;function Se(e){return function(n,t,s){const u=document.getElementById(e);if(!u||!u.contentWindow){const d=new Error("iframe not found or not accessible");return Promise.reject(d)}const c=e+"-"+ie,l=be();S.set(c,l);const p=v.PreviewMessageType.CONTROLLER_REQUEST,y={id:c,namespace:n,method:t,params:s},m=setTimeout(()=>{S.delete(c),l.reject(new Error(`Request timeout for ${t}`))},1e4),a=l.resolve,j=l.reject;l.resolve=d=>{clearTimeout(m),a(d)},l.reject=d=>{clearTimeout(m),j(d)};try{v.sendMessage(u.contentWindow,p,y)}catch(d){const w=d instanceof Error?d.message:String(d);l.reject(new Error(`Failed to send message: ${w}`)),S.delete(c),clearTimeout(m)}return ie++,l}}function Me(e){const r=document.getElementById(e);if(!r)throw new Error(`Could not find an iframe with id="${e}"`);S.clear();const n=r.contentWindow?Y.get(r.contentWindow)??se():se();r.contentWindow&&Y.set(r.contentWindow,n);const t=Se(e);return{scene:{getScreenshot(s,u){return t("scene","getScreenshot",[s,u])},getMetrics(){return t("scene","getMetrics",[])},changeZoom:function(s){return t("scene","changeZoom",[s])},panCamera:function(s){return t("scene","panCamera",[s])},changeCameraPosition:function(s){return t("scene","changeCameraPosition",[s])},cleanup(){return t("scene","cleanup",[])},setUsername:function(s){return t("scene","setUsername",[s])}},emote:{getLength(){return t("emote","getLength",[])},isPlaying(){return t("emote","isPlaying",[])},goTo(s){return t("emote","goTo",[s])},play(){return t("emote","play",[])},pause(){return t("emote","pause",[])},stop(){return t("emote","stop",[])},enableSound(){return t("emote","enableSound",[])},disableSound(){return t("emote","disableSound",[])},hasSound(){return t("emote","hasSound",[])},isSocialEmote(){return t("emote","isSocialEmote",[])},getSocialEmoteAnimations(){return t("emote","getSocialEmoteAnimations",[])},getPlayingSocialEmoteAnimation(){return t("emote","getPlayingSocialEmoteAnimation",[])},emote:null,events:n},physics:{setSpringBonesParams(s,u){return t("physics","setSpringBonesParams",[s,u])}}}}var R={},ue;function Ae(){if(ue)return R;ue=1;var e=L();Object.defineProperty(R,"__esModule",{value:!0}),R.default=void 0;var r=e(q()),n=N();return R.default=(0,r.default)((0,n.jsx)("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"}),"Pause"),R}var Re=Ae();const Te=x(Re);var T={},ce;function Ce(){if(ce)return T;ce=1;var e=L();Object.defineProperty(T,"__esModule",{value:!0}),T.default=void 0;var r=e(q()),n=N();return T.default=(0,r.default)((0,n.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow"),T}var Ie=Ce();const xe=x(Ie);var C={},le;function je(){if(le)return C;le=1;var e=L();Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var r=e(q()),n=N();return C.default=(0,r.default)((0,n.jsx)("path",{d:"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63m2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71M4.27 3 3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9zM12 4 9.91 6.09 12 8.18z"}),"VolumeOff"),C}var _e=je();const Oe=x(_e);var I={},de;function ke(){if(de)return I;de=1;var e=L();Object.defineProperty(I,"__esModule",{value:!0}),I.default=void 0;var r=e(q()),n=N();return I.default=(0,r.default)((0,n.jsx)("path",{d:"M3 9v6h4l5 5V4L7 9zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77"}),"VolumeUp"),I}var Ne=ke();const Le=x(Ne),qe=(e,r)=>{const n=i.useRef(null),[t,s]=i.useState(!1);return i.useEffect(()=>{const u=r??Me(e);if(n.current=u,ae(e)){s(!0);return}const c=document.getElementById(e);if(!c){console.error(`Could not find iframe with id="${e}"`);return}if(!c.contentWindow){console.error(`Iframe contentWindow is not accessible for id="${e}"`);return}const p=y=>{var m;((m=y.data)==null?void 0:m.type)===v.PreviewMessageType.LOAD&&ae(e)&&s(!0)};return window.addEventListener("message",p),()=>{window.removeEventListener("message",p),s(!1),n.current=null}},[e,r]),{controllerRef:n,isReady:t}},We={small:16,medium:20,large:24},me=({children:e,startIcon:r,endIcon:n,loading:t=!1,loadingIcon:s,loadingPosition:u="center",disabled:c=!1,size:l="medium",...p})=>{const y=f.jsx(ve,{color:"inherit",size:We[l]}),m=s||y,a=t&&u==="center"?m:e;return f.jsx(he,{disabled:c||t,startIcon:t&&u==="start"?m:r,endIcon:t&&u==="end"?m:n,size:l,...p,children:a})},Ve=M(ye)(({theme:e})=>({display:"flex",position:"absolute",width:"100%",bottom:0,margin:`${e.spacing(2)} 0`,padding:`0 ${e.spacing(3)}`,gap:e.spacing(2)})),Ue=M(me)(({theme:e})=>({width:56,height:44,padding:0,minWidth:"unset",background:"rgba(0, 0, 0, 0.64) !important","& svg":{marginLeft:e.spacing(.5)}})),De=M(me)(({theme:e,muted:r})=>({marginLeft:e.spacing(2.5),minWidth:25,background:"none",padding:0,opacity:r?.5:1})),Fe=M("input")(({theme:e})=>({flex:1,width:"100%",background:"none",WebkitAppearance:"none","&:focus":{outline:"none"},"&::-webkit-slider-thumb":{WebkitAppearance:"none",width:24,height:24,borderRadius:10,backgroundColor:"#736e7d",overflow:"visible",cursor:"pointer",paddingBottom:e.spacing(.625),marginTop:e.spacing(-.5)},"&::-moz-range-thumb":{width:24,height:24,borderRadius:20,backgroundColor:"#736e7d",overflow:"visible",cursor:"pointer",border:"none"},"&::-ms-thumb":{width:24,height:24,borderRadius:20,backgroundColor:"#736e7d",overflow:"visible",cursor:"pointer"},"&::-webkit-slider-runnable-track":{width:300,height:15,background:"rgba(115, 110, 125, 0.32)",border:"none",borderRadius:10},"&::-moz-range-track":{width:"100%",height:15,borderRadius:10,cursor:"pointer",background:"rgba(115, 110, 125, 0.32)"}})),Be=M("div")({display:"flex",alignItems:"center"}),ze=M("input")({width:56,height:44,borderRadius:5,background:"transparent",border:"1px solid rgba(115, 110, 125, 0.4)",color:"white",textAlign:"center","&:focus-visible":{outline:"1px solid"}}),$e=({wearablePreviewId:e,className:r,hideFrameInput:n,hideProgressInput:t,hidePlayButton:s,hideSoundButton:u,wearablePreviewController:c,renderPlayButton:l,renderSoundButton:p,renderProgressBar:y,renderFrameInput:m})=>{const{controllerRef:a,isReady:j}=qe(e,c),[d,w]=i.useState(0),[b,W]=i.useState(!1),[h,fe]=i.useState(void 0),[P,ge]=i.useState(!0),[_,G]=i.useState(void 0),[J,Q]=i.useState(!1),[K,X]=i.useState(!1),V=i.useCallback(()=>{w(0)},[]),U=i.useCallback(()=>{W(!1),w(o=>o>=Math.floor((h??0)*100)?0:o)},[h]),D=i.useCallback(()=>{W(!1)},[]),F=i.useCallback(async()=>{if(!K){let o=h;!h&&a.current&&(o=await a.current.emote.getLength()),W(!0),fe(o)}},[h,K,a]),B=i.useCallback(({length:o})=>{w(Math.ceil((o??0)*100))},[]);i.useEffect(()=>{const o=a.current;if(o)return o.emote.events.on(g.PreviewEmoteEventType.ANIMATION_PLAY,F),o.emote.events.on(g.PreviewEmoteEventType.ANIMATION_PLAYING,B),o.emote.events.on(g.PreviewEmoteEventType.ANIMATION_END,U),o.emote.events.on(g.PreviewEmoteEventType.ANIMATION_PAUSE,D),o.emote.events.on(g.PreviewEmoteEventType.ANIMATION_LOOP,V),()=>{o.emote.events.off(g.PreviewEmoteEventType.ANIMATION_PLAY,F),o.emote.events.off(g.PreviewEmoteEventType.ANIMATION_PLAYING,B),o.emote.events.off(g.PreviewEmoteEventType.ANIMATION_END,U),o.emote.events.off(g.PreviewEmoteEventType.ANIMATION_PAUSE,D),o.emote.events.off(g.PreviewEmoteEventType.ANIMATION_LOOP,V)}},[a,F,B,U,D,V]),i.useEffect(()=>{_===void 0&&j&&a.current&&a.current.emote.hasSound().then(o=>G(o)).catch(o=>{console.error("Error checking sound:",o),G(!1)})},[_,j,a]);const z=i.useCallback(async()=>{if(a.current)try{await a.current.emote.play()}catch(o){console.error("Error playing emote:",o)}},[a]),$=i.useCallback(async()=>{if(a.current)try{await a.current.emote.pause()}catch(o){console.error("Error pausing emote:",o)}},[a]),ee=i.useCallback(async()=>{b?await $():await z()},[b,z,$]),te=i.useCallback(()=>{var o,E;P?(o=a.current)==null||o.emote.disableSound():(E=a.current)==null||E.emote.enableSound(),ge(!P)},[P,a]),O=i.useCallback(async o=>{if(isNaN(o)||!a.current)return;let E=o;const ne=h??0;ne*100<o&&(E=ne*100),w(E),X(!0);try{b&&(await a.current.emote.pause(),Q(!0)),await a.current.emote.goTo(E/100)}catch(pe){console.error("Error changing frame:",pe)}},[h,b,a]),re=i.useCallback(async()=>{if(X(!1),J&&a.current){try{await a.current.emote.play()}catch(o){console.error("Error resuming play:",o)}Q(!1)}},[J,a]);return f.jsxs(Ve,{className:r,children:[s?null:l?l({isPlaying:b,onPlay:z,onPause:$,onToggle:ee}):f.jsx(Ue,{onClick:ee,children:b?f.jsx(Te,{}):f.jsx(xe,{})}),t?null:y?y({frame:d,length:h??0,onChange:O,onMouseUp:re}):f.jsx(Fe,{type:"range",value:d,max:Math.ceil((h??0)*100),min:0,step:1,onChange:o=>O(Number(o.target.value)),onMouseUp:re}),n?null:f.jsx(Be,{children:m?m({frame:Math.round(d/100),onChange:o=>O(o*100)}):f.jsx(ze,{type:"number",value:Math.round(d/100),onChange:o=>O(Number(o.target.value)*100)})}),u||!_?null:p?p({isSoundEnabled:P,hasSound:_,onToggle:te}):f.jsx(De,{muted:!P,onClick:te,children:P?f.jsx(Le,{}):f.jsx(Oe,{})})]})},Ke=Object.freeze(Object.defineProperty({__proto__:null,EmoteControls:$e},Symbol.toStringTag,{value:"Module"}));export{me as B,$e as E,Me as c,Ke as i,qe as u};
1
+ import{g as x,k as N,r as i,j as f}from"./react-BW1xvPTF.js";import{a as v,g}from"./dcl-schemas-BICTSpB5.js";import{bm as L,bn as q}from"./index-CQ7zHnQz.js";import{n as M}from"./emotion-styled.browser.esm-CqAclZX0.js";import{c as he,d as ye}from"./Button-C483PxiV.js";import{C as ve}from"./CircularProgress-CD6e_OY0.js";var A={},oe;function Ee(){if(oe)return A;oe=1,Object.defineProperty(A,"__esModule",{value:!0});function e(){let r,n;const t=new Promise((s,u)=>{r=c=>{s(c),t.isPending=!1},n=c=>{u(c),t.isPending=!1}}).catch(s=>Promise.reject(s));return t.resolve=r,t.reject=n,"finally"in t||(t.finally=s=>{t.then(s),t.catch(s)}),t.isPending=!0,t}return A.future=e,A.default=e,A}var we=Ee();const be=x(we);function se(e){return{all:e=e||new Map,on:function(r,n){var t=e.get(r);t?t.push(n):e.set(r,[n])},off:function(r,n){var t=e.get(r);t&&(n?t.splice(t.indexOf(n)>>>0,1):e.set(r,[]))},emit:function(r,n){var t=e.get(r);t&&t.slice().map(function(s){s(n)}),(t=e.get("*"))&&t.slice().map(function(s){s(r,n)})}}}const S=new Map,Y=new Map,Z=new Map,k=new Map;function ae(e){const r=document.getElementById(e);return!r||!r.contentWindow?!1:Z.get(r.contentWindow)??!1}function H(e){if(e.data&&e.data.type)try{switch(e.data.type){case v.PreviewMessageType.CONTROLLER_RESPONSE:{const r=e.data.payload,{id:n}=r,t=S.get(n);t&&(S.delete(n),r.ok?t.resolve(r.result):r.ok===!1&&t.reject(new Error(r.error)));break}case v.PreviewMessageType.EMOTE_EVENT:{const r=e.data.payload,{type:n,payload:t}=r,s=e.source?Y.get(e.source):null;s&&n&&s.emit(n,t);break}case v.PreviewMessageType.LOAD:{e.source&&(Z.set(e.source,!0),(k.get(e.source)||[]).filter(t=>{var s;return((s=t.data)==null?void 0:s.type)!==v.PreviewMessageType.LOAD}).forEach(H),k.delete(e.source));break}default:}}catch(r){console.error("Error processing WearablePreview message:",r)}}const Pe=e=>{var n;if(((n=e.data)==null?void 0:n.type)===v.PreviewMessageType.LOAD){H(e);return}if(!(e.source?Z.get(e.source):!1)&&e.source){const t=k.get(e.source)||[];t.push(e),k.set(e.source,t);return}H(e)};typeof window<"u"&&window.addEventListener("message",Pe,!1);let ie=0;function Se(e){return function(n,t,s){const u=document.getElementById(e);if(!u||!u.contentWindow){const d=new Error("iframe not found or not accessible");return Promise.reject(d)}const c=e+"-"+ie,l=be();S.set(c,l);const p=v.PreviewMessageType.CONTROLLER_REQUEST,y={id:c,namespace:n,method:t,params:s},m=setTimeout(()=>{S.delete(c),l.reject(new Error(`Request timeout for ${t}`))},1e4),a=l.resolve,j=l.reject;l.resolve=d=>{clearTimeout(m),a(d)},l.reject=d=>{clearTimeout(m),j(d)};try{v.sendMessage(u.contentWindow,p,y)}catch(d){const w=d instanceof Error?d.message:String(d);l.reject(new Error(`Failed to send message: ${w}`)),S.delete(c),clearTimeout(m)}return ie++,l}}function Me(e){const r=document.getElementById(e);if(!r)throw new Error(`Could not find an iframe with id="${e}"`);S.clear();const n=r.contentWindow?Y.get(r.contentWindow)??se():se();r.contentWindow&&Y.set(r.contentWindow,n);const t=Se(e);return{scene:{getScreenshot(s,u){return t("scene","getScreenshot",[s,u])},getMetrics(){return t("scene","getMetrics",[])},changeZoom:function(s){return t("scene","changeZoom",[s])},panCamera:function(s){return t("scene","panCamera",[s])},changeCameraPosition:function(s){return t("scene","changeCameraPosition",[s])},cleanup(){return t("scene","cleanup",[])},setUsername:function(s){return t("scene","setUsername",[s])}},emote:{getLength(){return t("emote","getLength",[])},isPlaying(){return t("emote","isPlaying",[])},goTo(s){return t("emote","goTo",[s])},play(){return t("emote","play",[])},pause(){return t("emote","pause",[])},stop(){return t("emote","stop",[])},enableSound(){return t("emote","enableSound",[])},disableSound(){return t("emote","disableSound",[])},hasSound(){return t("emote","hasSound",[])},isSocialEmote(){return t("emote","isSocialEmote",[])},getSocialEmoteAnimations(){return t("emote","getSocialEmoteAnimations",[])},getPlayingSocialEmoteAnimation(){return t("emote","getPlayingSocialEmoteAnimation",[])},emote:null,events:n},physics:{setSpringBonesParams(s,u){return t("physics","setSpringBonesParams",[s,u])}}}}var R={},ue;function Ae(){if(ue)return R;ue=1;var e=L();Object.defineProperty(R,"__esModule",{value:!0}),R.default=void 0;var r=e(q()),n=N();return R.default=(0,r.default)((0,n.jsx)("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"}),"Pause"),R}var Re=Ae();const Te=x(Re);var T={},ce;function Ce(){if(ce)return T;ce=1;var e=L();Object.defineProperty(T,"__esModule",{value:!0}),T.default=void 0;var r=e(q()),n=N();return T.default=(0,r.default)((0,n.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow"),T}var Ie=Ce();const xe=x(Ie);var C={},le;function je(){if(le)return C;le=1;var e=L();Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var r=e(q()),n=N();return C.default=(0,r.default)((0,n.jsx)("path",{d:"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63m2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71M4.27 3 3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9zM12 4 9.91 6.09 12 8.18z"}),"VolumeOff"),C}var _e=je();const Oe=x(_e);var I={},de;function ke(){if(de)return I;de=1;var e=L();Object.defineProperty(I,"__esModule",{value:!0}),I.default=void 0;var r=e(q()),n=N();return I.default=(0,r.default)((0,n.jsx)("path",{d:"M3 9v6h4l5 5V4L7 9zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77"}),"VolumeUp"),I}var Ne=ke();const Le=x(Ne),qe=(e,r)=>{const n=i.useRef(null),[t,s]=i.useState(!1);return i.useEffect(()=>{const u=r??Me(e);if(n.current=u,ae(e)){s(!0);return}const c=document.getElementById(e);if(!c){console.error(`Could not find iframe with id="${e}"`);return}if(!c.contentWindow){console.error(`Iframe contentWindow is not accessible for id="${e}"`);return}const p=y=>{var m;((m=y.data)==null?void 0:m.type)===v.PreviewMessageType.LOAD&&ae(e)&&s(!0)};return window.addEventListener("message",p),()=>{window.removeEventListener("message",p),s(!1),n.current=null}},[e,r]),{controllerRef:n,isReady:t}},We={small:16,medium:20,large:24},me=({children:e,startIcon:r,endIcon:n,loading:t=!1,loadingIcon:s,loadingPosition:u="center",disabled:c=!1,size:l="medium",...p})=>{const y=f.jsx(ve,{color:"inherit",size:We[l]}),m=s||y,a=t&&u==="center"?m:e;return f.jsx(he,{disabled:c||t,startIcon:t&&u==="start"?m:r,endIcon:t&&u==="end"?m:n,size:l,...p,children:a})},Ve=M(ye)(({theme:e})=>({display:"flex",position:"absolute",width:"100%",bottom:0,margin:`${e.spacing(2)} 0`,padding:`0 ${e.spacing(3)}`,gap:e.spacing(2)})),Ue=M(me)(({theme:e})=>({width:56,height:44,padding:0,minWidth:"unset",background:"rgba(0, 0, 0, 0.64) !important","& svg":{marginLeft:e.spacing(.5)}})),De=M(me)(({theme:e,muted:r})=>({marginLeft:e.spacing(2.5),minWidth:25,background:"none",padding:0,opacity:r?.5:1})),Fe=M("input")(({theme:e})=>({flex:1,width:"100%",background:"none",WebkitAppearance:"none","&:focus":{outline:"none"},"&::-webkit-slider-thumb":{WebkitAppearance:"none",width:24,height:24,borderRadius:10,backgroundColor:"#736e7d",overflow:"visible",cursor:"pointer",paddingBottom:e.spacing(.625),marginTop:e.spacing(-.5)},"&::-moz-range-thumb":{width:24,height:24,borderRadius:20,backgroundColor:"#736e7d",overflow:"visible",cursor:"pointer",border:"none"},"&::-ms-thumb":{width:24,height:24,borderRadius:20,backgroundColor:"#736e7d",overflow:"visible",cursor:"pointer"},"&::-webkit-slider-runnable-track":{width:300,height:15,background:"rgba(115, 110, 125, 0.32)",border:"none",borderRadius:10},"&::-moz-range-track":{width:"100%",height:15,borderRadius:10,cursor:"pointer",background:"rgba(115, 110, 125, 0.32)"}})),Be=M("div")({display:"flex",alignItems:"center"}),ze=M("input")({width:56,height:44,borderRadius:5,background:"transparent",border:"1px solid rgba(115, 110, 125, 0.4)",color:"white",textAlign:"center","&:focus-visible":{outline:"1px solid"}}),$e=({wearablePreviewId:e,className:r,hideFrameInput:n,hideProgressInput:t,hidePlayButton:s,hideSoundButton:u,wearablePreviewController:c,renderPlayButton:l,renderSoundButton:p,renderProgressBar:y,renderFrameInput:m})=>{const{controllerRef:a,isReady:j}=qe(e,c),[d,w]=i.useState(0),[b,W]=i.useState(!1),[h,fe]=i.useState(void 0),[P,ge]=i.useState(!0),[_,G]=i.useState(void 0),[J,Q]=i.useState(!1),[K,X]=i.useState(!1),V=i.useCallback(()=>{w(0)},[]),U=i.useCallback(()=>{W(!1),w(o=>o>=Math.floor((h??0)*100)?0:o)},[h]),D=i.useCallback(()=>{W(!1)},[]),F=i.useCallback(async()=>{if(!K){let o=h;!h&&a.current&&(o=await a.current.emote.getLength()),W(!0),fe(o)}},[h,K,a]),B=i.useCallback(({length:o})=>{w(Math.ceil((o??0)*100))},[]);i.useEffect(()=>{const o=a.current;if(o)return o.emote.events.on(g.PreviewEmoteEventType.ANIMATION_PLAY,F),o.emote.events.on(g.PreviewEmoteEventType.ANIMATION_PLAYING,B),o.emote.events.on(g.PreviewEmoteEventType.ANIMATION_END,U),o.emote.events.on(g.PreviewEmoteEventType.ANIMATION_PAUSE,D),o.emote.events.on(g.PreviewEmoteEventType.ANIMATION_LOOP,V),()=>{o.emote.events.off(g.PreviewEmoteEventType.ANIMATION_PLAY,F),o.emote.events.off(g.PreviewEmoteEventType.ANIMATION_PLAYING,B),o.emote.events.off(g.PreviewEmoteEventType.ANIMATION_END,U),o.emote.events.off(g.PreviewEmoteEventType.ANIMATION_PAUSE,D),o.emote.events.off(g.PreviewEmoteEventType.ANIMATION_LOOP,V)}},[a,F,B,U,D,V]),i.useEffect(()=>{_===void 0&&j&&a.current&&a.current.emote.hasSound().then(o=>G(o)).catch(o=>{console.error("Error checking sound:",o),G(!1)})},[_,j,a]);const z=i.useCallback(async()=>{if(a.current)try{await a.current.emote.play()}catch(o){console.error("Error playing emote:",o)}},[a]),$=i.useCallback(async()=>{if(a.current)try{await a.current.emote.pause()}catch(o){console.error("Error pausing emote:",o)}},[a]),ee=i.useCallback(async()=>{b?await $():await z()},[b,z,$]),te=i.useCallback(()=>{var o,E;P?(o=a.current)==null||o.emote.disableSound():(E=a.current)==null||E.emote.enableSound(),ge(!P)},[P,a]),O=i.useCallback(async o=>{if(isNaN(o)||!a.current)return;let E=o;const ne=h??0;ne*100<o&&(E=ne*100),w(E),X(!0);try{b&&(await a.current.emote.pause(),Q(!0)),await a.current.emote.goTo(E/100)}catch(pe){console.error("Error changing frame:",pe)}},[h,b,a]),re=i.useCallback(async()=>{if(X(!1),J&&a.current){try{await a.current.emote.play()}catch(o){console.error("Error resuming play:",o)}Q(!1)}},[J,a]);return f.jsxs(Ve,{className:r,children:[s?null:l?l({isPlaying:b,onPlay:z,onPause:$,onToggle:ee}):f.jsx(Ue,{onClick:ee,children:b?f.jsx(Te,{}):f.jsx(xe,{})}),t?null:y?y({frame:d,length:h??0,onChange:O,onMouseUp:re}):f.jsx(Fe,{type:"range",value:d,max:Math.ceil((h??0)*100),min:0,step:1,onChange:o=>O(Number(o.target.value)),onMouseUp:re}),n?null:f.jsx(Be,{children:m?m({frame:Math.round(d/100),onChange:o=>O(o*100)}):f.jsx(ze,{type:"number",value:Math.round(d/100),onChange:o=>O(Number(o.target.value)*100)})}),u||!_?null:p?p({isSoundEnabled:P,hasSound:_,onToggle:te}):f.jsx(De,{muted:!P,onClick:te,children:P?f.jsx(Le,{}):f.jsx(Oe,{})})]})},Ke=Object.freeze(Object.defineProperty({__proto__:null,EmoteControls:$e},Symbol.toStringTag,{value:"Module"}));export{me as B,$e as E,Me as c,Ke as i,qe as u};
@@ -1 +1 @@
1
- import{c as r}from"./parseSignature-BN4GI5Gq.js";import{B as f,E as v,a as A,b as S,F as I,W as F,d as R,e as x,f as C,g as B,p as N,l as P,n as D,p as U,h as w,s as L,z as M}from"./parseSignature-BN4GI5Gq.js";import{I as k,c as z,a as q,p as V,w as O}from"./custom-_W6fFDpX.js";import{h as s}from"./W3MFrameProviderSingleton-CSS0v250.js";import{U as j,c as W,f as K,s as Z,w as J,a as Q}from"./W3MFrameProviderSingleton-CSS0v250.js";import{A as Y,a as _,B as $,b as aa,C as ra,D as oa,E as sa,F as ea,c as ta,H as ia,I as na,d as ca,e as da,f as Ea,g as pa,h as ua,i as la,j as ma,k as Ta,l as ga,J as ba,L as ha,M as ya,m as fa,N as va,n as Aa,o as Sa,P as Ia,p as Fa,q as Ra,R as xa,r as Ca,s as Ba,t as Na,u as Pa,S as Da,v as Ua,w as wa,x as La,T as Ma,y as Ha,z as ka,G as za,U as qa,K as Va,O as Oa,Q as Ga,V as ja,W as Wa,X as Ka,Y as Za,Z as Ja,_ as Qa,$ as Xa,a0 as Ya,a1 as _a,a2 as $a,a3 as ar,a4 as rr,a5 as or,a6 as sr,a7 as er,a8 as tr,a9 as ir,aa as nr,ab as cr,ac as dr,ad as Er,ae as pr,af as ur,ag as lr,ah as mr,ai as Tr,aj as gr,ak as br,al as hr,am as yr,an as fr,ao as vr,ap as Ar,a1 as Sr}from"./NetworkUtil-C1aEwuOK.js";import{A as Fr,a as Rr,b as xr,c as Cr,d as Br,e as Nr,f as Pr,g as Dr,h as Ur,i as wr,j as Lr,k as Mr,l as Hr,m as kr,n as zr,o as qr,p as Vr,B as Or,q as Gr,r as jr,C as Wr,s as Kr,t as Zr,u as Jr,v as Qr,w as Xr,x as Yr,y as _r,z as $r,D as ao,E as ro,F as oo,G as so,H as eo,I as to,J as io,K as no,L as co,M as Eo,N as po,O as uo,P as lo,Q as mo,R as To,S as go,T as bo,U as ho,V as yo,W as fo,X as vo,Y as Ao,Z as So,_ as Io,$ as Fo,a0 as Ro,a1 as xo,a2 as Co,a3 as Bo,a4 as No,a5 as Po,a6 as Do,a7 as Uo,a8 as wo,a9 as Lo,aa as Mo,ab as Ho,ac as ko,ad as zo,ae as qo,af as Vo,ag as Oo,ah as Go,ai as jo,aj as Wo,ak as Ko,al as Zo,am as Jo,an as Qo,ao as Xo,ap as Yo,aq as _o,ar as $o,as,at as rs,au as os,av as ss,aw as es,ax as ts,ay as is,az as ns,aA as cs,aB as ds,aC as Es,aD as ps,aE as us,aF as ls,aG as ms,aH as Ts,aI as gs,aJ as bs,aK as hs,aL as ys,aM as fs,aN as vs,aM as As,aO as Ss,aP as Is,aQ as Fs,aR as Rs,aS as xs,aT as Cs,aU as Bs,aV as Ns,aW as Ps,aX as Ds,aY as Us,aZ as ws,a_ as Ls,a$ as Ms,b0 as Hs,b1 as ks,b2 as zs,b3 as qs,b4 as Vs,aL as Os,aM as Gs,b4 as js,aN as Ws,aM as Ks,b5 as Zs,b6 as Js,aA as Qs}from"./sendRawTransaction-Beep3a_c.js";import{I as Ys,a as _s,b as $s,g as ae,h as re,c as oe,d as se,e as ee,p as te,t as ie,v as ne}from"./hashTypedData-0ex2klzG.js";import{d as de,e as Ee,a as pe}from"./localBatchGatewayRequest-IqnQgBVr.js";import{ccipRequest as le,ccipRequest as me,offchainLookup as Te,offchainLookupAbiItem as ge,offchainLookupSignature as be}from"./ccip-Bv1a4Yma.js";import{d as t}from"./verifyHash-BEO4ZrCQ.js";import{e as ye,p as fe,a as ve,s as Ae,s as Se}from"./verifyHash-BEO4ZrCQ.js";import{a as Fe,b as Re,c as xe,s as Ce,d as Be}from"./serializeTransaction-DSKyq4zg.js";import"./secp256k1-BJpXPJIB.js";import"./dcl-schemas-BICTSpB5.js";import"./index-BZ6S4-Qy.js";import"./react-BW1xvPTF.js";import"./sentry-BV_ZSgtd.js";import"./index-BDd-bL6J.js";import"./events-DQ172AOg.js";import"./index-s056mQ5V.js";import"./ethers-BcZhdsUx.js";import"./intl-CBcMB1D2.js";import"./browser-ponyfill-6L1OGOLN.js";import"./browser-ponyfill-CI1-rMvf.js";export{Fr as AbiConstructorNotFoundError,Rr as AbiConstructorParamsNotFoundError,xr as AbiDecodingDataSizeTooSmallError,Cr as AbiDecodingZeroDataError,Br as AbiEncodingArrayLengthMismatchError,Nr as AbiEncodingBytesSizeMismatchError,Pr as AbiEncodingLengthMismatchError,Dr as AbiErrorInputsNotFoundError,Ur as AbiErrorNotFoundError,wr as AbiErrorSignatureNotFoundError,Lr as AbiEventNotFoundError,Mr as AbiEventSignatureEmptyTopicsError,Hr as AbiEventSignatureNotFoundError,kr as AbiFunctionNotFoundError,zr as AbiFunctionOutputsNotFoundError,qr as AbiFunctionSignatureNotFoundError,Vr as AccountStateConflictError,Y as AtomicReadyWalletRejectedUpgradeError,_ as AtomicityNotSupportedError,$ as BaseError,Or as BaseFeeScalarError,Gr as BlockNotFoundError,f as BundleFailedError,aa as BundleTooLargeError,jr as BytesSizeMismatchError,Wr as CallExecutionError,ra as ChainDisconnectedError,Kr as ChainDoesNotSupportContract,Zr as ChainMismatchError,Jr as ChainNotFoundError,Qr as CircularReferenceError,Xr as ClientChainNotConfiguredError,Yr as ContractFunctionExecutionError,_r as ContractFunctionRevertedError,$r as ContractFunctionZeroDataError,ao as CounterfactualDeploymentFailedError,ro as DecodeLogDataMismatch,oo as DecodeLogTopicsMismatch,oa as DuplicateIdError,so as Eip1559FeesNotSupportedError,v as EnsAvatarInvalidNftUriError,A as EnsAvatarUnsupportedNamespaceError,S as EnsAvatarUriResolutionError,eo as EstimateGasExecutionError,sa as ExecutionRevertedError,ea as FeeCapTooHighError,ta as FeeCapTooLowError,I as FilterTypeNotSupportedError,ia as HttpRequestError,na as InsufficientFundsError,ca as IntegerOutOfRangeError,da as InternalRpcError,Ea as IntrinsicGasTooHighError,pa as IntrinsicGasTooLowError,to as InvalidAbiDecodingTypeError,io as InvalidAbiEncodingTypeError,no as InvalidAbiItemError,co as InvalidAbiParametersError,Eo as InvalidAbiTypeParameterError,po as InvalidAddressError,uo as InvalidArrayError,ua as InvalidBytesBooleanError,lo as InvalidChainIdError,k as InvalidDecimalNumberError,mo as InvalidDefinitionTypeError,Ys as InvalidDomainError,To as InvalidFunctionModifierError,la as InvalidHexBooleanError,ma as InvalidInputRpcError,go as InvalidLegacyVError,bo as InvalidModifierError,ho as InvalidParameterError,Ta as InvalidParamsRpcError,yo as InvalidParenthesisError,_s as InvalidPrimaryTypeError,ga as InvalidRequestRpcError,fo as InvalidSerializableTransactionError,vo as InvalidSignatureError,Ao as InvalidStorageKeySizeError,So as InvalidStructSignatureError,$s as InvalidStructTypeError,ba as JsonRpcVersionUnsupportedError,ha as LimitExceededRpcError,Io as MaxFeePerGasTooLowError,ya as MethodNotFoundRpcError,fa as MethodNotSupportedRpcError,va as NonceMaxValueError,Aa as NonceTooHighError,Sa as NonceTooLowError,Ia as ParseRpcError,Fa as ProviderDisconnectedError,Ra as ProviderRpcError,Fo as RawContractError,xa as ResourceNotFoundRpcError,Ca as ResourceUnavailableRpcError,Ba as ResponseBodyTooLargeError,Na as RpcError,Pa as RpcRequestError,Da as SizeExceedsPaddingSizeError,Ua as SizeOverflowError,wa as SliceOffsetOutOfBoundsError,Ro as SolidityProtectedKeywordError,xo as StateAssignmentConflictError,La as SwitchChainError,Ma as TimeoutError,Ha as TipAboveFeeCapError,Co as TransactionExecutionError,Bo as TransactionNotFoundError,No as TransactionReceiptNotFoundError,ka as TransactionRejectedRpcError,za as TransactionTypeNotSupportedError,qa as UnauthorizedProviderError,Va as UnknownBundleIdError,Oa as UnknownNodeError,Ga as UnknownRpcError,Po as UnknownSignatureError,Do as UnknownTypeError,ja as UnsupportedChainIdError,Wa as UnsupportedNonOptionalCapabilityError,Uo as UnsupportedPackedAbiType,Ka as UnsupportedProviderMethodError,j as UrlRequiredError,Za as UserRejectedRequestError,F as WaitForCallsStatusTimeoutError,wo as WaitForTransactionReceiptTimeoutError,Lo as assertCurrentChain,Mo as assertRequest,Fe as assertTransactionEIP1559,Re as assertTransactionEIP2930,xe as assertTransactionLegacy,Ho as blobsToCommitments,ko as blobsToProofs,Ja as boolToBytes,Qa as boolToHex,zo as bytesToBigInt,qo as bytesToBool,Xa as bytesToHex,Vo as bytesToNumber,Oo as bytesToString,le as ccipFetch,me as ccipRequest,Go as checksumAddress,jo as commitmentToVersionedHash,Wo as commitmentsToVersionedHashes,Ko as concat,Zo as concatBytes,Jo as concatHex,z as createClient,R as createNonceManager,r as createPublicClient,W as createTransport,q as custom,Qo as decodeAbiParameters,Xo as decodeErrorResult,Yo as decodeEventLog,de as decodeFunctionData,_o as decodeFunctionResult,$o as defineBlock,t as defineChain,as as defineTransaction,rs as defineTransactionReceipt,os as defineTransactionRequest,ss as deploylessCallViaBytecodeBytecode,es as deploylessCallViaFactoryBytecode,ts as encodeAbiParameters,is as encodeDeployData,Ee as encodeErrorResult,x as encodeEventTopics,ns as encodeFunctionData,pe as encodeFunctionResult,C as encodePacked,Ya as erc20Abi,_a as erc6492SignatureValidatorAbi,cs as erc6492SignatureValidatorByteCode,B as ethAddress,$a as etherUnits,ye as extendSchema,K as fallback,ds as formatBlock,Es as formatEther,ar as formatGwei,ps as formatLog,us as formatTransaction,ls as formatTransactionReceipt,ms as formatTransactionRequest,rr as formatUnits,or as fromHex,Ts as getAbiItem,gs as getAddress,bs as getChainContractAddress,hs as getContractError,ys as getEventSelector,fs as getEventSignature,vs as getFunctionSelector,As as getFunctionSignature,Ss as getTransactionType,ae as getTypesForEIP712Domain,sr as gweiUnits,re as hashDomain,oe as hashMessage,se as hashStruct,ee as hashTypedData,er as hexToBigInt,tr as hexToBool,ir as hexToBytes,nr as hexToNumber,N as hexToSignature,cr as hexToString,s as http,Is as isAddress,Fs as isAddressEqual,dr as isHex,Rs as keccak256,P as labelhash,xs as maxUint16,Cs as maxUint256,Er as multicall3Abi,D as namehash,pr as numberToBytes,ur as numberToHex,Te as offchainLookup,ge as offchainLookupAbiItem,be as offchainLookupSignature,lr as pad,mr as padBytes,Tr as padHex,Bs as parseAbi,fe as parseAbiItem,ve as parseAbiParameters,Ns as parseEventLogs,U as parseSignature,V as parseUnits,Ps as prepareEncodeFunctionData,te as presignMessagePrefix,w as publicActions,Ds as recoverAddress,Us as recoverPublicKey,ws as rpcTransactionType,Ce as serializeAccessList,L as serializeErc6492Signature,Ae as serializeSignature,Be as serializeTransaction,Ls as sha256,Z as shouldThrow,Se as signatureToHex,gr as size,Ms as slice,Hs as sliceBytes,ks as sliceHex,br as stringToBytes,hr as stringToHex,yr as stringify,zs as toBlobSidecars,qs as toBlobs,fr as toBytes,Vs as toEventHash,Os as toEventSelector,Gs as toEventSignature,js as toFunctionHash,Ws as toFunctionSelector,Ks as toFunctionSignature,vr as toHex,ie as toPrefixedMessage,Zs as toRlp,Js as transactionType,Ar as trim,Sr as universalSignatureValidatorAbi,Qs as universalSignatureValidatorByteCode,ne as validateTypedData,O as withCache,J as withRetry,Q as withTimeout,M as zeroAddress};
1
+ import{c as r}from"./parseSignature-BY4ETsCJ.js";import{B as f,E as v,a as A,b as S,F as I,W as F,d as R,e as x,f as C,g as B,p as N,l as P,n as D,p as U,h as w,s as L,z as M}from"./parseSignature-BY4ETsCJ.js";import{I as k,c as z,a as q,p as V,w as O}from"./custom-CAN35ixC.js";import{h as s}from"./W3MFrameProviderSingleton-8Loh-tcg.js";import{U as j,c as W,f as K,s as Z,w as J,a as Q}from"./W3MFrameProviderSingleton-8Loh-tcg.js";import{A as Y,a as _,B as $,b as aa,C as ra,D as oa,E as sa,F as ea,c as ta,H as ia,I as na,d as ca,e as da,f as Ea,g as pa,h as ua,i as la,j as ma,k as Ta,l as ga,J as ba,L as ha,M as ya,m as fa,N as va,n as Aa,o as Sa,P as Ia,p as Fa,q as Ra,R as xa,r as Ca,s as Ba,t as Na,u as Pa,S as Da,v as Ua,w as wa,x as La,T as Ma,y as Ha,z as ka,G as za,U as qa,K as Va,O as Oa,Q as Ga,V as ja,W as Wa,X as Ka,Y as Za,Z as Ja,_ as Qa,$ as Xa,a0 as Ya,a1 as _a,a2 as $a,a3 as ar,a4 as rr,a5 as or,a6 as sr,a7 as er,a8 as tr,a9 as ir,aa as nr,ab as cr,ac as dr,ad as Er,ae as pr,af as ur,ag as lr,ah as mr,ai as Tr,aj as gr,ak as br,al as hr,am as yr,an as fr,ao as vr,ap as Ar,a1 as Sr}from"./NetworkUtil-C1aEwuOK.js";import{A as Fr,a as Rr,b as xr,c as Cr,d as Br,e as Nr,f as Pr,g as Dr,h as Ur,i as wr,j as Lr,k as Mr,l as Hr,m as kr,n as zr,o as qr,p as Vr,B as Or,q as Gr,r as jr,C as Wr,s as Kr,t as Zr,u as Jr,v as Qr,w as Xr,x as Yr,y as _r,z as $r,D as ao,E as ro,F as oo,G as so,H as eo,I as to,J as io,K as no,L as co,M as Eo,N as po,O as uo,P as lo,Q as mo,R as To,S as go,T as bo,U as ho,V as yo,W as fo,X as vo,Y as Ao,Z as So,_ as Io,$ as Fo,a0 as Ro,a1 as xo,a2 as Co,a3 as Bo,a4 as No,a5 as Po,a6 as Do,a7 as Uo,a8 as wo,a9 as Lo,aa as Mo,ab as Ho,ac as ko,ad as zo,ae as qo,af as Vo,ag as Oo,ah as Go,ai as jo,aj as Wo,ak as Ko,al as Zo,am as Jo,an as Qo,ao as Xo,ap as Yo,aq as _o,ar as $o,as,at as rs,au as os,av as ss,aw as es,ax as ts,ay as is,az as ns,aA as cs,aB as ds,aC as Es,aD as ps,aE as us,aF as ls,aG as ms,aH as Ts,aI as gs,aJ as bs,aK as hs,aL as ys,aM as fs,aN as vs,aM as As,aO as Ss,aP as Is,aQ as Fs,aR as Rs,aS as xs,aT as Cs,aU as Bs,aV as Ns,aW as Ps,aX as Ds,aY as Us,aZ as ws,a_ as Ls,a$ as Ms,b0 as Hs,b1 as ks,b2 as zs,b3 as qs,b4 as Vs,aL as Os,aM as Gs,b4 as js,aN as Ws,aM as Ks,b5 as Zs,b6 as Js,aA as Qs}from"./sendRawTransaction-BuFkD4rL.js";import{I as Ys,a as _s,b as $s,g as ae,h as re,c as oe,d as se,e as ee,p as te,t as ie,v as ne}from"./hashTypedData-BFbifruY.js";import{d as de,e as Ee,a as pe}from"./localBatchGatewayRequest-CxV7CkF0.js";import{ccipRequest as le,ccipRequest as me,offchainLookup as Te,offchainLookupAbiItem as ge,offchainLookupSignature as be}from"./ccip-D-ohWyZn.js";import{d as t}from"./verifyHash-P48QT828.js";import{e as ye,p as fe,a as ve,s as Ae,s as Se}from"./verifyHash-P48QT828.js";import{a as Fe,b as Re,c as xe,s as Ce,d as Be}from"./serializeTransaction-DbtSO7eG.js";import"./secp256k1-BHpk8kxj.js";import"./dcl-schemas-BICTSpB5.js";import"./index-BZ6S4-Qy.js";import"./react-BW1xvPTF.js";import"./sentry-BV_ZSgtd.js";import"./index-H-r202nh.js";import"./events-DQ172AOg.js";import"./index-CQ7zHnQz.js";import"./ethers-BcZhdsUx.js";import"./intl-CBcMB1D2.js";import"./browser-ponyfill-6L1OGOLN.js";import"./browser-ponyfill-CI1-rMvf.js";export{Fr as AbiConstructorNotFoundError,Rr as AbiConstructorParamsNotFoundError,xr as AbiDecodingDataSizeTooSmallError,Cr as AbiDecodingZeroDataError,Br as AbiEncodingArrayLengthMismatchError,Nr as AbiEncodingBytesSizeMismatchError,Pr as AbiEncodingLengthMismatchError,Dr as AbiErrorInputsNotFoundError,Ur as AbiErrorNotFoundError,wr as AbiErrorSignatureNotFoundError,Lr as AbiEventNotFoundError,Mr as AbiEventSignatureEmptyTopicsError,Hr as AbiEventSignatureNotFoundError,kr as AbiFunctionNotFoundError,zr as AbiFunctionOutputsNotFoundError,qr as AbiFunctionSignatureNotFoundError,Vr as AccountStateConflictError,Y as AtomicReadyWalletRejectedUpgradeError,_ as AtomicityNotSupportedError,$ as BaseError,Or as BaseFeeScalarError,Gr as BlockNotFoundError,f as BundleFailedError,aa as BundleTooLargeError,jr as BytesSizeMismatchError,Wr as CallExecutionError,ra as ChainDisconnectedError,Kr as ChainDoesNotSupportContract,Zr as ChainMismatchError,Jr as ChainNotFoundError,Qr as CircularReferenceError,Xr as ClientChainNotConfiguredError,Yr as ContractFunctionExecutionError,_r as ContractFunctionRevertedError,$r as ContractFunctionZeroDataError,ao as CounterfactualDeploymentFailedError,ro as DecodeLogDataMismatch,oo as DecodeLogTopicsMismatch,oa as DuplicateIdError,so as Eip1559FeesNotSupportedError,v as EnsAvatarInvalidNftUriError,A as EnsAvatarUnsupportedNamespaceError,S as EnsAvatarUriResolutionError,eo as EstimateGasExecutionError,sa as ExecutionRevertedError,ea as FeeCapTooHighError,ta as FeeCapTooLowError,I as FilterTypeNotSupportedError,ia as HttpRequestError,na as InsufficientFundsError,ca as IntegerOutOfRangeError,da as InternalRpcError,Ea as IntrinsicGasTooHighError,pa as IntrinsicGasTooLowError,to as InvalidAbiDecodingTypeError,io as InvalidAbiEncodingTypeError,no as InvalidAbiItemError,co as InvalidAbiParametersError,Eo as InvalidAbiTypeParameterError,po as InvalidAddressError,uo as InvalidArrayError,ua as InvalidBytesBooleanError,lo as InvalidChainIdError,k as InvalidDecimalNumberError,mo as InvalidDefinitionTypeError,Ys as InvalidDomainError,To as InvalidFunctionModifierError,la as InvalidHexBooleanError,ma as InvalidInputRpcError,go as InvalidLegacyVError,bo as InvalidModifierError,ho as InvalidParameterError,Ta as InvalidParamsRpcError,yo as InvalidParenthesisError,_s as InvalidPrimaryTypeError,ga as InvalidRequestRpcError,fo as InvalidSerializableTransactionError,vo as InvalidSignatureError,Ao as InvalidStorageKeySizeError,So as InvalidStructSignatureError,$s as InvalidStructTypeError,ba as JsonRpcVersionUnsupportedError,ha as LimitExceededRpcError,Io as MaxFeePerGasTooLowError,ya as MethodNotFoundRpcError,fa as MethodNotSupportedRpcError,va as NonceMaxValueError,Aa as NonceTooHighError,Sa as NonceTooLowError,Ia as ParseRpcError,Fa as ProviderDisconnectedError,Ra as ProviderRpcError,Fo as RawContractError,xa as ResourceNotFoundRpcError,Ca as ResourceUnavailableRpcError,Ba as ResponseBodyTooLargeError,Na as RpcError,Pa as RpcRequestError,Da as SizeExceedsPaddingSizeError,Ua as SizeOverflowError,wa as SliceOffsetOutOfBoundsError,Ro as SolidityProtectedKeywordError,xo as StateAssignmentConflictError,La as SwitchChainError,Ma as TimeoutError,Ha as TipAboveFeeCapError,Co as TransactionExecutionError,Bo as TransactionNotFoundError,No as TransactionReceiptNotFoundError,ka as TransactionRejectedRpcError,za as TransactionTypeNotSupportedError,qa as UnauthorizedProviderError,Va as UnknownBundleIdError,Oa as UnknownNodeError,Ga as UnknownRpcError,Po as UnknownSignatureError,Do as UnknownTypeError,ja as UnsupportedChainIdError,Wa as UnsupportedNonOptionalCapabilityError,Uo as UnsupportedPackedAbiType,Ka as UnsupportedProviderMethodError,j as UrlRequiredError,Za as UserRejectedRequestError,F as WaitForCallsStatusTimeoutError,wo as WaitForTransactionReceiptTimeoutError,Lo as assertCurrentChain,Mo as assertRequest,Fe as assertTransactionEIP1559,Re as assertTransactionEIP2930,xe as assertTransactionLegacy,Ho as blobsToCommitments,ko as blobsToProofs,Ja as boolToBytes,Qa as boolToHex,zo as bytesToBigInt,qo as bytesToBool,Xa as bytesToHex,Vo as bytesToNumber,Oo as bytesToString,le as ccipFetch,me as ccipRequest,Go as checksumAddress,jo as commitmentToVersionedHash,Wo as commitmentsToVersionedHashes,Ko as concat,Zo as concatBytes,Jo as concatHex,z as createClient,R as createNonceManager,r as createPublicClient,W as createTransport,q as custom,Qo as decodeAbiParameters,Xo as decodeErrorResult,Yo as decodeEventLog,de as decodeFunctionData,_o as decodeFunctionResult,$o as defineBlock,t as defineChain,as as defineTransaction,rs as defineTransactionReceipt,os as defineTransactionRequest,ss as deploylessCallViaBytecodeBytecode,es as deploylessCallViaFactoryBytecode,ts as encodeAbiParameters,is as encodeDeployData,Ee as encodeErrorResult,x as encodeEventTopics,ns as encodeFunctionData,pe as encodeFunctionResult,C as encodePacked,Ya as erc20Abi,_a as erc6492SignatureValidatorAbi,cs as erc6492SignatureValidatorByteCode,B as ethAddress,$a as etherUnits,ye as extendSchema,K as fallback,ds as formatBlock,Es as formatEther,ar as formatGwei,ps as formatLog,us as formatTransaction,ls as formatTransactionReceipt,ms as formatTransactionRequest,rr as formatUnits,or as fromHex,Ts as getAbiItem,gs as getAddress,bs as getChainContractAddress,hs as getContractError,ys as getEventSelector,fs as getEventSignature,vs as getFunctionSelector,As as getFunctionSignature,Ss as getTransactionType,ae as getTypesForEIP712Domain,sr as gweiUnits,re as hashDomain,oe as hashMessage,se as hashStruct,ee as hashTypedData,er as hexToBigInt,tr as hexToBool,ir as hexToBytes,nr as hexToNumber,N as hexToSignature,cr as hexToString,s as http,Is as isAddress,Fs as isAddressEqual,dr as isHex,Rs as keccak256,P as labelhash,xs as maxUint16,Cs as maxUint256,Er as multicall3Abi,D as namehash,pr as numberToBytes,ur as numberToHex,Te as offchainLookup,ge as offchainLookupAbiItem,be as offchainLookupSignature,lr as pad,mr as padBytes,Tr as padHex,Bs as parseAbi,fe as parseAbiItem,ve as parseAbiParameters,Ns as parseEventLogs,U as parseSignature,V as parseUnits,Ps as prepareEncodeFunctionData,te as presignMessagePrefix,w as publicActions,Ds as recoverAddress,Us as recoverPublicKey,ws as rpcTransactionType,Ce as serializeAccessList,L as serializeErc6492Signature,Ae as serializeSignature,Be as serializeTransaction,Ls as sha256,Z as shouldThrow,Se as signatureToHex,gr as size,Ms as slice,Hs as sliceBytes,ks as sliceHex,br as stringToBytes,hr as stringToHex,yr as stringify,zs as toBlobSidecars,qs as toBlobs,fr as toBytes,Vs as toEventHash,Os as toEventSelector,Gs as toEventSignature,js as toFunctionHash,Ws as toFunctionSelector,Ks as toFunctionSignature,vr as toHex,ie as toPrefixedMessage,Zs as toRlp,Js as transactionType,Ar as trim,Sr as universalSignatureValidatorAbi,Qs as universalSignatureValidatorByteCode,ne as validateTypedData,O as withCache,J as withRetry,Q as withTimeout,M as zeroAddress};
@@ -1 +1 @@
1
- import{e as d}from"./index-BDd-bL6J.js";import{o}from"./browser-ponyfill-6L1OGOLN.js";import{i as a,s as h,a as u,f as m,p as y}from"./index-C1kCjuW_.js";import"./index-BZ6S4-Qy.js";var b=Object.defineProperty,P=Object.defineProperties,w=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,c=(s,e,t)=>e in s?b(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,p=(s,e)=>{for(var t in e||(e={}))E.call(e,t)&&c(s,t,e[t]);if(l)for(var t of l(e))O.call(e,t)&&c(s,t,e[t]);return s},v=(s,e)=>P(s,w(e));const L={Accept:"application/json","Content-Type":"application/json"},j="POST",f={headers:L,method:j},g=10;class M{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new d.EventEmitter,this.isAvailable=!1,this.registering=!1,!a(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=t}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e){this.isAvailable||await this.register();try{const t=h(e),r=await(await o(this.url,v(p({},f),{body:t}))).json();this.onPayload({data:r})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!a(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const t=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=t||this.events.listenerCount("open")>=t)&&this.events.setMaxListeners(t+1),new Promise((r,i)=>{this.events.once("register_error",n=>{this.resetMaxListeners(),i(n)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return i(new Error("HTTP connection is missing or invalid"));r()})})}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const t=h({id:1,jsonrpc:"2.0",method:"test",params:[]});await o(e,v(p({},f),{body:t}))}this.onOpen()}catch(t){const r=this.parseError(t);throw this.events.emit("register_error",r),this.onClose(),r}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;const t=typeof e.data=="string"?u(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const r=this.parseError(t),i=r.message||r.toString(),n=m(e,i);this.events.emit("payload",n)}parseError(e,t=this.url){return y(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>g&&this.events.setMaxListeners(g)}}export{M as f};
1
+ import{e as d}from"./index-H-r202nh.js";import{o}from"./browser-ponyfill-6L1OGOLN.js";import{i as a,s as h,a as u,f as m,p as y}from"./index-CcKCkHsm.js";import"./index-BZ6S4-Qy.js";var b=Object.defineProperty,P=Object.defineProperties,w=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,c=(s,e,t)=>e in s?b(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,p=(s,e)=>{for(var t in e||(e={}))E.call(e,t)&&c(s,t,e[t]);if(l)for(var t of l(e))O.call(e,t)&&c(s,t,e[t]);return s},v=(s,e)=>P(s,w(e));const L={Accept:"application/json","Content-Type":"application/json"},j="POST",f={headers:L,method:j},g=10;class M{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new d.EventEmitter,this.isAvailable=!1,this.registering=!1,!a(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=t}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e){this.isAvailable||await this.register();try{const t=h(e),r=await(await o(this.url,v(p({},f),{body:t}))).json();this.onPayload({data:r})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!a(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const t=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=t||this.events.listenerCount("open")>=t)&&this.events.setMaxListeners(t+1),new Promise((r,i)=>{this.events.once("register_error",n=>{this.resetMaxListeners(),i(n)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return i(new Error("HTTP connection is missing or invalid"));r()})})}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const t=h({id:1,jsonrpc:"2.0",method:"test",params:[]});await o(e,v(p({},f),{body:t}))}this.onOpen()}catch(t){const r=this.parseError(t);throw this.events.emit("register_error",r),this.onClose(),r}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;const t=typeof e.data=="string"?u(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const r=this.parseError(t),i=r.message||r.toString(),n=m(e,i);this.events.emit("payload",n)}parseError(e,t=this.url){return y(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>g&&this.events.setMaxListeners(g)}}export{M as f};