@dcl/shop 1.16.0 → 1.16.1-36009595531.commit-94584a5

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 (421) hide show
  1. package/_assets/Activity-DnfPbi6I.js +400 -0
  2. package/_assets/{AnimatedBackground-CCv_8WvR.js → AnimatedBackground-DMoJIXm4.js} +2 -2
  3. package/_assets/{Assets-G4zKJq-g.js → Assets-CeTv3PQS.js} +3 -3
  4. package/_assets/{Cart-DsQMnYFW.js → Cart-XTP_NTRb.js} +2 -2
  5. package/_assets/{Collection-C4njSIXs.js → Collection-Kg9-iA_F.js} +7 -7
  6. package/_assets/{CollectionCarousel-Dg8w-Ze2.js → CollectionCarousel-KDiNS7Z2.js} +5 -5
  7. package/_assets/{Confetti-DcqbQMk-.js → Confetti-CCN1Rj6u.js} +4 -4
  8. package/_assets/{ConstantsUtil-CEwS_5e4.js → ConstantsUtil-DTRWtii2.js} +2 -2
  9. package/_assets/{ContentClient-BW1JgVbg.js → ContentClient-DTdXtBSl.js} +2 -2
  10. package/_assets/Creator-tRdc-i6W.js +312 -0
  11. package/_assets/{CreditPackPicker-D6M8C5at.js → CreditPackPicker-DC2Uhrv6.js} +2 -2
  12. package/_assets/CreditRate-Dzg044Lg.js +35 -0
  13. package/_assets/{DeploymentBuilder-Yv8ck1p_.js → DeploymentBuilder-DFQ5QdOZ.js} +3 -3
  14. package/_assets/{EmotePlaybackBar-DamRJKE8.js → EmotePlaybackBar-CDv0UlNn.js} +3 -3
  15. package/_assets/{ErrorNotice-5cQusmGK.js → ErrorNotice-BndI9TcU.js} +2 -2
  16. package/_assets/{Event-DNSKDhvo.js → Event-kW78ULJG.js} +5 -5
  17. package/_assets/{ExchangeController-DnyR_njB.js → ExchangeController-DjXLLKM5.js} +2 -2
  18. package/_assets/{Faq-DB62IPDv.js → Faq-CcOpCC4Z.js} +2 -2
  19. package/_assets/{Filters-DZJTBasv.js → Filters-D_wo8nf7.js} +2 -2
  20. package/_assets/{GetCredits-CQDD4Y7M.js → GetCredits-C9KlxvdS.js} +5 -5
  21. package/_assets/{Grow-Dqkd-8TJ.js → Grow-CJJkPu7p.js} +2 -2
  22. package/_assets/{HelpersUtil-CefOE7SN.js → HelpersUtil-S-ipA7d_.js} +4 -4
  23. package/_assets/{ItemDetail-BhOAzg_H.js → ItemDetail-DxChv0Az.js} +32 -32
  24. package/_assets/{LoadMore-yxZw85kf.js → LoadMore-CCDkdfxt.js} +2 -2
  25. package/_assets/ManaPricingBanner-C5SbV_Cy.js +684 -0
  26. package/_assets/ManaPricingBanner.styles-Bys2rCoo.js +96 -0
  27. package/_assets/MyAssets-C0wGKI5K.js +497 -0
  28. package/_assets/{MyFavorites-C8PXtYWt.js → MyFavorites-Cwv-npnC.js} +4 -4
  29. package/_assets/MyStore-BF6s2HmL.js +1630 -0
  30. package/_assets/{NetworkUtil-DB3XDe5L.js → NetworkUtil-Dn6I5ZVR.js} +2 -2
  31. package/_assets/{NotFound-Bvz1-F-x.js → NotFound-D2HuPI4c.js} +2 -2
  32. package/_assets/{NotificationsBell-CkfnfOhR.js → NotificationsBell-C8ye5ghN.js} +13 -13
  33. package/_assets/{OutfitDetail-Bnstzwcb.js → OutfitDetail-CDfyVMhI.js} +2 -2
  34. package/_assets/OutfitPreview-C7YIhS7h.js +7 -0
  35. package/_assets/{OutfitStudio-CDJQlhEd.js → OutfitStudio-CDLiO2FU.js} +11 -11
  36. package/_assets/{PaymentMethodStep-Dmy4hMV3.js → PaymentMethodStep-DvFcy0mk.js} +3 -3
  37. package/_assets/{PhArrowCircleDown-oZRgIV6I.js → PhArrowCircleDown-BgP2jbf5.js} +3 -3
  38. package/_assets/{PhArrowClockwise-D6H6uB8s.js → PhArrowClockwise-CuNU0iSl.js} +2 -2
  39. package/_assets/{PhArrowDown-CRBvhObC.js → PhArrowDown-BrLks3Uz.js} +4 -4
  40. package/_assets/{PhArrowLeft-iC7ALVz_.js → PhArrowLeft-BbZGSN_s.js} +5 -5
  41. package/_assets/{PhArrowRight-BMhSphsR.js → PhArrowRight-DqLi6_uj.js} +4 -4
  42. package/_assets/{PhArrowSquareOut-BGOFtcYV.js → PhArrowSquareOut-CX0ZRgNC.js} +4 -4
  43. package/_assets/{PhArrowUp-DaOakyLF.js → PhArrowUp-D9ugstgK.js} +3 -3
  44. package/_assets/{PhArrowUpRight-Dv-X4w2R.js → PhArrowUpRight-Bpfn12eW.js} +4 -4
  45. package/_assets/{PhArrowsClockwise-DnI7mFlV.js → PhArrowsClockwise-CRZyQVpN.js} +4 -4
  46. package/_assets/{PhArrowsDownUp-BT1rp80C.js → PhArrowsDownUp-CV1NqVLb.js} +4 -4
  47. package/_assets/{PhArrowsLeftRight-3JEyJt0N.js → PhArrowsLeftRight-DvGI6Nto.js} +5 -5
  48. package/_assets/{PhBank-DlTySila.js → PhBank-BRxdKSKq.js} +5 -5
  49. package/_assets/{PhBrowser-CxUZLRbi.js → PhBrowser-C_wNKcTe.js} +5 -5
  50. package/_assets/PhCaretDown-DBNFm85V.js +15 -0
  51. package/_assets/{PhCaretLeft-ScH02zvv.js → PhCaretLeft-Cad__LUx.js} +3 -3
  52. package/_assets/{PhCaretRight-CG-ZCjvT.js → PhCaretRight-CuRYBcM2.js} +3 -3
  53. package/_assets/PhCaretUp-DE2FiuTS.js +15 -0
  54. package/_assets/{PhCheck-DETGkRRi.js → PhCheck-y4MOxgof.js} +5 -5
  55. package/_assets/{PhCircleHalf-BN36Nweh.js → PhCircleHalf-xlPKmtS7.js} +4 -4
  56. package/_assets/{PhClock-DPd3K2DL.js → PhClock-BBNMhMKw.js} +4 -4
  57. package/_assets/{PhCompass-F0g-SfuH.js → PhCompass-DpAl_LfZ.js} +5 -5
  58. package/_assets/{PhCopy-CzpD7rrG.js → PhCopy-D4HwCqa2.js} +5 -5
  59. package/_assets/{PhCreditCard-NnI7YcNP.js → PhCreditCard-CD12JEEL.js} +3 -3
  60. package/_assets/{PhCurrencyDollar-Bst29vzW.js → PhCurrencyDollar-DPFX6nyR.js} +2 -2
  61. package/_assets/{PhDesktop-CFSSNEkS.js → PhDesktop-CNhh70Hf.js} +3 -3
  62. package/_assets/{PhDeviceMobile-Dd2ijltg.js → PhDeviceMobile-DQgHhtB0.js} +5 -5
  63. package/_assets/{PhDotsThree-CI5y9TIg.js → PhDotsThree-B1gOaArE.js} +4 -4
  64. package/_assets/{PhEnvelope-DrQ5vbHf.js → PhEnvelope-CGnM9AiA.js} +4 -4
  65. package/_assets/{PhFunnelSimple-CI4FOzkp.js → PhFunnelSimple-D8YZwX53.js} +4 -4
  66. package/_assets/{PhGlobe-DR2SpSWA.js → PhGlobe-CXtg_GcB.js} +4 -4
  67. package/_assets/{PhIdentificationCard-5YfSRHO7.js → PhIdentificationCard-oMtubY4C.js} +3 -3
  68. package/_assets/{PhImage-D7dVXxCI.js → PhImage-DKp6-EHn.js} +2 -2
  69. package/_assets/{PhInfo-DNTh1xhU.js → PhInfo-CPd-HNhu.js} +5 -5
  70. package/_assets/{PhLightbulb-BfCndXXI.js → PhLightbulb-C47afrxR.js} +5 -5
  71. package/_assets/{PhMagnifyingGlass-DB41rFTM.js → PhMagnifyingGlass-DBaqb5ff.js} +2 -2
  72. package/_assets/{PhPaperPlaneRight-D6oxeO8G.js → PhPaperPlaneRight-FQGhQUrW.js} +4 -4
  73. package/_assets/{PhPlus-B90Q_jSC.js → PhPlus-B_CxFvZS.js} +4 -4
  74. package/_assets/{PhPower-B3OeVFPP.js → PhPower-DRTSLLeY.js} +4 -4
  75. package/_assets/{PhPuzzlePiece-DMvneE8o.js → PhPuzzlePiece-zlHiPdqx.js} +4 -4
  76. package/_assets/{PhQrCode-B1ogONq9.js → PhQrCode-riEgpq80.js} +4 -4
  77. package/_assets/{PhQuestion-BGPtjzO3.js → PhQuestion-DHYK7o0G.js} +3 -3
  78. package/_assets/{PhQuestionMark-Bx5KlE6e.js → PhQuestionMark-ZgOsaVvK.js} +4 -4
  79. package/_assets/{PhSealCheck-kDiKrn8v.js → PhSealCheck-B5VE_9Jt.js} +3 -3
  80. package/_assets/{PhSignOut-C40w8abk.js → PhSignOut-DKQOfDHS.js} +4 -4
  81. package/_assets/{PhSpinner-BnCR7oBU.js → PhSpinner-B3k7aAJt.js} +4 -4
  82. package/_assets/{PhTrash-Dx6EnoNj.js → PhTrash-CD2fhMLB.js} +3 -3
  83. package/_assets/{PhUser-BMrVwUFx.js → PhUser-BeKUoVY6.js} +2 -2
  84. package/_assets/{PhVault-CJhJgRMl.js → PhVault-DC9QjU0-.js} +5 -5
  85. package/_assets/{PhWallet-DUAwnObx.js → PhWallet-djswo-CG.js} +3 -3
  86. package/_assets/{PhWarning-DQNslokT.js → PhWarning-B4g8NvcF.js} +4 -4
  87. package/_assets/{PhWarningCircle-p1EFi5p4.js → PhWarningCircle-xLZ7sbu0.js} +5 -5
  88. package/_assets/{PhX-cY2Ff_Gl.js → PhX-BVzMqBjL.js} +5 -5
  89. package/_assets/{SaleCountdown-C7e8fbLx.js → SaleCountdown-OciTJP0u.js} +3 -3
  90. package/_assets/{Spinner-B2OgiWjC.js → Spinner-PtrEnSHG.js} +2 -2
  91. package/_assets/StoreSettings-DijP-YCx.js +197 -0
  92. package/_assets/{Success-CZuQ607L.js → Success-ClDhCP8V.js} +5 -5
  93. package/_assets/{SwapController-5k9aONbx.js → SwapController-ZZrBzp1z.js} +2 -2
  94. package/_assets/{Tooltip-S7k1SpAV.js → Tooltip-u81Sv8t-.js} +2 -2
  95. package/_assets/{TradeService-B8-mao6x.js → TradeService-5RwgV0Xg.js} +2 -2
  96. package/_assets/{W3MFrameProviderSingleton-BMplcCEo.js → W3MFrameProviderSingleton-B4cXTRps.js} +4 -4
  97. package/_assets/{WebCryptoP256-O7lzGJiD.js → WebCryptoP256-CzBMVHqY.js} +2 -2
  98. package/_assets/{add-WhTS4Lmx.js → add-C46RTTNX.js} +3 -3
  99. package/_assets/{all-wallets-BjG4VftA.js → all-wallets-byTNDEq1.js} +2 -2
  100. package/_assets/{app-store-BU7T42Cx.js → app-store-CaKIhI-8.js} +2 -2
  101. package/_assets/{apple-CawmhmSa.js → apple-DAMB_3Lk.js} +3 -3
  102. package/_assets/{arrow-bottom-CnNmrvB7.js → arrow-bottom-Cx66u8_t.js} +2 -2
  103. package/_assets/{arrow-bottom-circle-4Fk8ZSin.js → arrow-bottom-circle-Bv2eZVEF.js} +2 -2
  104. package/_assets/{arrow-left-CfMYQlcz.js → arrow-left-D0I0JXz4.js} +3 -3
  105. package/_assets/arrow-right-BHc70exa.js +9 -0
  106. package/_assets/{arrow-top-B19eH9mc.js → arrow-top-uM_hNW8Z.js} +3 -3
  107. package/_assets/{async-directive-BTrBVINo.js → async-directive-CeCQAQEH.js} +4 -4
  108. package/_assets/{bank-CvCwnNxT.js → bank-CQUOEuRq.js} +2 -2
  109. package/_assets/{basic-Ccax6-qK.js → basic-CzPdzQZ1.js} +2 -2
  110. package/_assets/{biconomy-DvdEbc7G.js → biconomy-CmUC9Vgz.js} +2 -2
  111. package/_assets/{browseLayout.styles-D4_s76IT.js → browseLayout.styles-BJ83PjpA.js} +2 -2
  112. package/_assets/{browser-D_6XKzYg.js → browser-Bh67F6hL.js} +3 -3
  113. package/_assets/{browser-BZ3BqlqY.js → browser-Bnnu-876.js} +2 -2
  114. package/_assets/{browser-5Iquaht5.js → browser-DkgNbGy6.js} +2 -2
  115. package/_assets/{browser-ponyfill-cZkQn4gz.js → browser-ponyfill-DjCvoPa9.js} +2 -2
  116. package/_assets/{buy-Bz6BQ053.js → buy-DjjL35rl.js} +2 -2
  117. package/_assets/{buy-gasless-C_qSC2r9.js → buy-gasless-D72pqxFQ.js} +2 -2
  118. package/_assets/{card-Bs7vF3ws.js → card-DcQ1wkCr.js} +2 -2
  119. package/_assets/{ccip-DmZQ8H34.js → ccip-CHs8su-n.js} +2 -2
  120. package/_assets/{ccip-4dYwjzuR.js → ccip-Di9g1yps.js} +2 -2
  121. package/_assets/{chains-C05Ihug0.js → chains-C0P4vetK.js} +2 -2
  122. package/_assets/{checkmark-e3BzxNSm.js → checkmark-GDL9YfL4.js} +2 -2
  123. package/_assets/{checkmark-bold-CwL3zpGi.js → checkmark-bold-B-Sg0XJy.js} +3 -3
  124. package/_assets/chevron-bottom-CLuKI9LQ.js +9 -0
  125. package/_assets/chevron-left-B_RU4s1F.js +9 -0
  126. package/_assets/chevron-right-C6ckznAo.js +9 -0
  127. package/_assets/chevron-top-CJOmtrv2.js +9 -0
  128. package/_assets/{chrome-store-B9E5S_r1.js → chrome-store-s39Q_LJM.js} +3 -3
  129. package/_assets/{class-map-BaReYv7k.js → class-map-BxMzgOIb.js} +5 -5
  130. package/_assets/{clock-98t-BkG5.js → clock-DmJj-grN.js} +2 -2
  131. package/_assets/close-D4d1U5NV.js +9 -0
  132. package/_assets/{coinPlaceholder-rH-MsidA.js → coinPlaceholder-VDdmV3rm.js} +2 -2
  133. package/_assets/collectionPage.styles-BdifnJ7n.js +41 -0
  134. package/_assets/common-CoVAsSlp.js +2 -0
  135. package/_assets/{compass-C4iPyfoB.js → compass-O2jaVbub.js} +3 -3
  136. package/_assets/{controller-Dxu_LD2b.js → controller-8vZuqKx5.js} +3 -3
  137. package/_assets/{copy-Db_EXK-k.js → copy-D2eE3KCY.js} +3 -3
  138. package/_assets/{core-Ckvw2yS0.js → core-BAbJlgdS.js} +5 -5
  139. package/_assets/{createSvgIcon-Coc0eUXe.js → createSvgIcon-D7ErdKmf.js} +2 -2
  140. package/_assets/{crumbs.styles-CQ8x8Q1s.js → crumbs.styles-Do82Lh7D.js} +2 -2
  141. package/_assets/{cursor-BLyA32Y6.js → cursor-DSrN7SuI.js} +3 -3
  142. package/_assets/{cursor-transparent-is8_6H5o.js → cursor-transparent-DxuBEx9O.js} +2 -2
  143. package/_assets/{custom-BobhwJvM.js → custom-CA56e9mw.js} +2 -2
  144. package/_assets/{data-capture-B1l9YeOa.js → data-capture-B2LJxsgg.js} +2 -2
  145. package/_assets/{dcl-schemas-B-Ph0Ls4.js → dcl-schemas-D-5rZ83i.js} +2 -2
  146. package/_assets/decimals-BfgT5uZb.js +2 -0
  147. package/_assets/decimals-CMVt6Fnf.js +2 -0
  148. package/_assets/{desktop-w7YXG_JM.js → desktop-DwZtv9fm.js} +2 -2
  149. package/_assets/detectExtension-D7EH5FOC.js +2 -0
  150. package/_assets/{disconnect-BoVeWInH.js → disconnect-BbwiqFJ2.js} +3 -3
  151. package/_assets/{discord-CmXuPXeB.js → discord-qWAUKbRO.js} +3 -3
  152. package/_assets/{disposePreview-BWK9pW9i.js → disposePreview-Dn-nV7da.js} +2 -2
  153. package/_assets/{email-CR6_v_7o.js → email-R9Eh56FQ.js} +4 -4
  154. package/_assets/{embedded-wallet-CMslqrer.js → embedded-wallet-DKyKgqt3.js} +2 -2
  155. package/_assets/{emotion-styled.browser.esm-B49fbxGZ.js → emotion-styled.browser.esm-D-s-EeXK.js} +2 -2
  156. package/_assets/{engine-Da2W6flo.js → engine-DODLqszn.js} +2 -2
  157. package/_assets/{errors-wUAVqc_c.js → errors-g7TfMjmz.js} +2 -2
  158. package/_assets/estimate-l1-fee-DngUQ5JF.js +2 -0
  159. package/_assets/eth_estimateGas-CZaRMpws.js +2 -0
  160. package/_assets/eth_getStorageAt-CzulrMRy.js +2 -0
  161. package/_assets/eth_getTransactionCount-58y45L6E.js +2 -0
  162. package/_assets/ethereum-mrT0UM5G.js +2 -0
  163. package/_assets/{ethers-bR7FzlYq.js → ethers-CopgDOSY.js} +2 -2
  164. package/_assets/{etherscan-C6oDVSRT.js → etherscan-TUQ32gbU.js} +2 -2
  165. package/_assets/{events-CSMTNmJ4.js → events-Ws3Yj1Vh.js} +2 -2
  166. package/_assets/{exclamation-triangle-DeoEkpAd.js → exclamation-triangle-ETkxexlo.js} +2 -2
  167. package/_assets/{execute-DRuAik5I.js → execute-CbNEb0_w.js} +3 -3
  168. package/_assets/{extension-BC4u9PFt.js → extension-DoOVmXmT.js} +3 -3
  169. package/_assets/external-link-BEPN-Y2j.js +9 -0
  170. package/_assets/{extractIPFS-Do1_pPys.js → extractIPFS-BFJ52Qik.js} +2 -2
  171. package/_assets/{facebook-BfvFcXpk.js → facebook-BmPLPVaB.js} +3 -3
  172. package/_assets/{farcaster-DBSK9Oxt.js → farcaster-BLIAglQl.js} +2 -2
  173. package/_assets/{features-DnUPrb3F.js → features-9s_Hez8h.js} +2 -2
  174. package/_assets/{fetchTokenMetadata-0uUCrtuX.js → fetchTokenMetadata-BIKmk-Qg.js} +3 -3
  175. package/_assets/{field.styles-RDJk3ZFi.js → field.styles-DgktWQSW.js} +2 -2
  176. package/_assets/{filters-Bx7yqePJ.js → filters-DWaFeZ95.js} +3 -3
  177. package/_assets/{fortmatic-CzflUuB3.js → fortmatic-I6j8s8Pp.js} +2 -2
  178. package/_assets/{get-bytecode-CuUypJRS.js → get-bytecode-Hn-ME_dR.js} +2 -2
  179. package/_assets/get-ecosystem-wallet-info-i7hQ8Um2.js +2 -0
  180. package/_assets/{getBalance-CXMj_dSJ.js → getBalance-DbupekTB.js} +3 -3
  181. package/_assets/{getInstalledModules-DwjgJmXZ.js → getInstalledModules-DgeolJcX.js} +2 -2
  182. package/_assets/{getNFT-DAE6KSzC.js → getNFT-CF7JQE0L.js} +3 -3
  183. package/_assets/getNFT-CScO-Xmp.js +2 -0
  184. package/_assets/{github-Bir9JlcK.js → github-BiA5cQMJ.js} +3 -3
  185. package/_assets/{google-BlkSyDA4.js → google-CsF9xgle.js} +3 -3
  186. package/_assets/{grid.styles-CCv5GYbY.js → grid.styles-D-jF6MZw.js} +2 -2
  187. package/_assets/{hashTypedData-uKFMbdty.js → hashTypedData-Cx9nB98K.js} +2 -2
  188. package/_assets/{hashTypedData-DMajHdTK.js → hashTypedData-LiCSkSgg.js} +2 -2
  189. package/_assets/{help-circle-DA-n1pkO.js → help-circle-Bwgxn3Vn.js} +3 -3
  190. package/_assets/{id-UrGKP3rm.js → id-O5raZ1NS.js} +2 -2
  191. package/_assets/{image-D3PTNca-.js → image-CbhOQpP5.js} +2 -2
  192. package/_assets/{import-CeVyQRnj.js → import-CcqIyt2r.js} +2 -2
  193. package/_assets/{in-app-Macl9ih4.js → in-app-Bbr1VWOo.js} +2 -2
  194. package/_assets/{in-app-wallet-calls-D4aUvnS_.js → in-app-wallet-calls-ML9-rfvZ.js} +2 -2
  195. package/_assets/{index-CbaYXysJ.js → index-0zcbOnOy.js} +2 -2
  196. package/_assets/{index-CjDu2TSA.js → index-1fOWwGDY.js} +4 -4
  197. package/_assets/{index-DF3A7nt0.js → index-4svJAA0r.js} +2 -2
  198. package/_assets/{index-CYFe0Jna.js → index-6XNUf3SO.js} +3 -3
  199. package/_assets/{index-C7BuumTt.js → index-9847KGFU.js} +2 -2
  200. package/_assets/{index-D02KSSv9.js → index-B0jKErn5.js} +3 -3
  201. package/_assets/{index-zU2vwYZs.js → index-BBGQ2fEH.js} +2 -2
  202. package/_assets/{index-B2a3z3ZJ.js → index-BGXJtQVe.js} +2 -2
  203. package/_assets/{index-CI7ggdTq.js → index-BJncx6-7.js} +3 -3
  204. package/_assets/index-BJzeHzwn.js +2 -0
  205. package/_assets/{index-D08tUgRe.js → index-BKoVRwNl.js} +6 -6
  206. package/_assets/{index-CeTfbZRA.js → index-BLLo6gmS.js} +6 -6
  207. package/_assets/{index-rBUdQsaK.js → index-BMNT4Vj8.js} +2 -2
  208. package/_assets/{index-C975TN26.js → index-BQqlUoCn.js} +4 -4
  209. package/_assets/{index-BE9Mcus4.js → index-BRT6TqeK.js} +2 -2
  210. package/_assets/{index-BGgan3dP.js → index-BYR5agWV.js} +2 -2
  211. package/_assets/{index-DddATSzO.js → index-BcwUv4WI.js} +2 -2
  212. package/_assets/{index-Cx07-hgn.js → index-Be5CQ9Ek.js} +2 -2
  213. package/_assets/{index-D1vrdbBh.js → index-BhQyMuiB.js} +4 -4
  214. package/_assets/{index-CBygHfb6.js → index-BjVmqSlb.js} +2 -2
  215. package/_assets/{index-a25ffY_L.js → index-BotucDu0.js} +2 -2
  216. package/_assets/index-BpUtXe3X.js +2 -0
  217. package/_assets/{index-Di89BRQr.js → index-C-DYXMyc.js} +3 -3
  218. package/_assets/{index-C6uMO8F3.js → index-C0Nwpyec.js} +4 -4
  219. package/_assets/{index-GUobIWjX.js → index-C6gyBlSG.js} +2 -2
  220. package/_assets/{index-BVbWCh70.js → index-CBKmaKUs.js} +3 -3
  221. package/_assets/{index-B54oU8gi.js → index-CCJPLKej.js} +2 -2
  222. package/_assets/{index-9AH47OiK.js → index-CEosqueA.js} +3 -3
  223. package/_assets/{index-CQRmPqX6.js → index-CJX-36Qo.js} +3 -3
  224. package/_assets/{index-Bj9lpeYa.js → index-CMSu9Fi8.js} +5 -5
  225. package/_assets/{index-BlJwQFxj.js → index-CN6kBFKz.js} +2 -2
  226. package/_assets/{index-CUi-ykiz.js → index-CPc9SG5b.js} +2 -2
  227. package/_assets/{index-Cyu7VCzw.js → index-CS-Fo7Dd.js} +2 -2
  228. package/_assets/{index-CO_NYi5I.js → index-CTBXMXHE.js} +3 -3
  229. package/_assets/{index-BD5IY2ZK.js → index-CThQspM5.js} +3 -3
  230. package/_assets/{index-afs4W15f.js → index-CV2DmEzD.js} +2 -2
  231. package/_assets/{index-B5zTgTXf.js → index-CVvFzoi-.js} +7 -7
  232. package/_assets/{index-CvTuaMxq.js → index-CdlPsyOh.js} +2 -2
  233. package/_assets/{index-bswiu2fP.js → index-Ce2pZB5r.js} +2 -2
  234. package/_assets/{index-BvY2KEZR.js → index-Cgrg3nln.js} +3 -3
  235. package/_assets/{index-Cl9akTA1.js → index-CiMgUHWr.js} +2 -2
  236. package/_assets/{index-D4oNA6LG.js → index-CjUcdG9l.js} +4 -4
  237. package/_assets/{index-4Wt1itZR.js → index-Co7rAvqY.js} +4 -4
  238. package/_assets/{index-CCH3GG8S.js → index-CqQb43_w.js} +4 -4
  239. package/_assets/{index-6Ea7HxB0.js → index-Cw3ZjlHu.js} +4 -4
  240. package/_assets/{index-DhErzm2X.js → index-D4F1pTlw.js} +3 -3
  241. package/_assets/index-D8mGQF7W.css +1 -0
  242. package/_assets/{index-BFj-hzu9.js → index-DH16m9NQ.js} +2 -2
  243. package/_assets/{index-Wf_dU8kj.js → index-DPrbmi0P.js} +2 -2
  244. package/_assets/{index-CCtrpRL3.js → index-DSPPGbih.js} +7 -7
  245. package/_assets/{index-D_UH7dG5.js → index-DTQvJkIk.js} +2 -2
  246. package/_assets/{index-DJk0y4Pb.js → index-DVU_sbVS.js} +4 -4
  247. package/_assets/{index-tWaiezoT.js → index-DesfxtJB.js} +2 -2
  248. package/_assets/{index-15wtEeEb.js → index-DhL9UDpx.js} +2 -2
  249. package/_assets/{index-BGPtWppq.js → index-Dt0hkf0E.js} +4 -4
  250. package/_assets/{index-BX0anDQH.js → index-DvMKbX71.js} +2 -2
  251. package/_assets/{index-BotYB9Ug.js → index-DwSlWQJc.js} +4 -4
  252. package/_assets/{index-BzfaUuJy.js → index-DyBYKhuJ.js} +4 -4
  253. package/_assets/{index-C9cxIatH.js → index-LyvfKRJn.js} +2 -2
  254. package/_assets/{index-CCbd3W2s.js → index-MH4VZj7X.js} +2 -2
  255. package/_assets/{index-DWZpjai1.js → index-O-gEYpGp.js} +2 -2
  256. package/_assets/{index-CoEQwfR-.js → index-VqSwDYu3.js} +2 -2
  257. package/_assets/{index-DsNJL-1_.js → index-axCSMzU7.js} +2 -2
  258. package/_assets/{index-C4OMOTuz.js → index-cEVfGif7.js} +2 -2
  259. package/_assets/{index-B3VjL_uo.js → index-iLEI2Hze.js} +3 -3
  260. package/_assets/{index-CM8il_cs.js → index-ljbyRJDV.js} +2 -2
  261. package/_assets/{index-DVSIxGm9.js → index-oiiBJT0I.js} +4 -4
  262. package/_assets/index-x3_oOTlT.js +4331 -0
  263. package/_assets/{index.es-_TtdXlOp.js → index.es-CATzJKgL.js} +5 -5
  264. package/_assets/{index.es-DLcWAUrd.js → index.es-CcpqAHBO.js} +2 -2
  265. package/_assets/{index.es-Dq25h1l9.js → index.es-DTIR3PFi.js} +2 -2
  266. package/_assets/{index.es-kX0u41uY.js → index.es-DvYgO4WC.js} +2 -2
  267. package/_assets/{info-Dsmi8VWW.js → info-B91xCNqh.js} +3 -3
  268. package/_assets/info-circle-DtEY-DDD.js +13 -0
  269. package/_assets/items-empty-Cr9cPS1Z.js +2 -0
  270. package/_assets/jsxRuntime.module-BUzu5v1_.js +2 -0
  271. package/_assets/{jump-Xu9XuIAg.js → jump-Bl1mTmWC.js} +2 -2
  272. package/_assets/{lightbulb-B2s8QgKQ.js → lightbulb-ByedgZqO.js} +3 -3
  273. package/_assets/{linkAccount-CPkzkJuG.js → linkAccount-D6iv170c.js} +2 -2
  274. package/_assets/{loader-logo-DnFrESbi.js → loader-logo-VsDgHWNm.js} +2 -2
  275. package/_assets/{localBatchGatewayRequest-xmkiXjrL.js → localBatchGatewayRequest-BfGg370Q.js} +2 -2
  276. package/_assets/{mail-CZ9ghbH-.js → mail-B2wBPliw.js} +2 -2
  277. package/_assets/{mobile-D7KL87qI.js → mobile-COGIkuHo.js} +2 -2
  278. package/_assets/{modal.styles-Do478QcD.js → modal.styles-LVyI-Nms.js} +2 -2
  279. package/_assets/{more-C1vsI2Vu.js → more-zcriamqw.js} +2 -2
  280. package/_assets/{native-DfSWgaR4.js → native-l5Om0Rwv.js} +2 -2
  281. package/_assets/{network-placeholder-C6sglFRh.js → network-placeholder-Cm-6akxX.js} +2 -2
  282. package/_assets/{networks-Cfa5rIsc.js → networks-CF4HnplJ.js} +2 -2
  283. package/_assets/{nftPlaceholder-ByX0V9oA.js → nftPlaceholder-vZdYCYRL.js} +2 -2
  284. package/_assets/off-CLF8R11w.js +9 -0
  285. package/_assets/{onramp-BnohX24l.js → onramp-Df-XZyQ-.js} +2 -2
  286. package/_assets/openzeppelin-CtFkrbTC.js +2 -0
  287. package/_assets/ownerOf-Dd-hBmVt.js +2 -0
  288. package/_assets/parseNft-DlnuLVoy.js +3 -0
  289. package/_assets/{parseSignature-J-955_t1.js → parseSignature-B1mzw2r7.js} +2 -2
  290. package/_assets/{parseSignature-CoNohiB0.js → parseSignature-C060flwU.js} +4 -4
  291. package/_assets/{passkeys-NXOIdrEd.js → passkeys-CbeyIyCT.js} +2 -2
  292. package/_assets/{pay-with-exchange-DAZa8ZY1.js → pay-with-exchange-zZqzHc1N.js} +2 -2
  293. package/_assets/{play-store-BBusJ15a.js → play-store-CAbJYmXD.js} +2 -2
  294. package/_assets/{plus-QdPNUgRE.js → plus-DWQF9t2p.js} +3 -3
  295. package/_assets/{prepare-contract-call-CJg2QHZX.js → prepare-contract-call-Cd3rzK4m.js} +2 -2
  296. package/_assets/{qr-code-SdYLFk2z.js → qr-code-Br4VphwV.js} +2 -2
  297. package/_assets/{qr-overlay-Dv6gg5Q5.js → qr-overlay-C0sLtyHu.js} +6 -6
  298. package/_assets/{react-COwX0Zlk.js → react-xTOg_zXI.js} +3 -3
  299. package/_assets/{receive-D0kNMOsa.js → receive-B32yzPpP.js} +2 -2
  300. package/_assets/{recycle-horizontal-SCXYOpJq.js → recycle-horizontal-DdAImjTL.js} +3 -3
  301. package/_assets/{ref-DRxYb1N1.js → ref-D90CCjlU.js} +2 -2
  302. package/_assets/{refresh-eticwJ3S.js → refresh-S-H2nzPq.js} +2 -2
  303. package/_assets/{reown-logo-C2dHPSrm.js → reown-logo-D5L2QY4i.js} +3 -3
  304. package/_assets/{resolveImplementation-C71So4sE.js → resolveImplementation-CUvrhOz5.js} +2 -2
  305. package/_assets/{resume-buy-DG0KaJKe.js → resume-buy-CadxFuJD.js} +2 -2
  306. package/_assets/{resume-name-DGCFrQWT.js → resume-name-DCcU5Jmo.js} +2 -2
  307. package/_assets/{rpc-6is72ePA.js → rpc-D7LJ7NvJ.js} +2 -2
  308. package/_assets/{sales-empty-BCWN_I8i.js → sales-empty-C0kdamh4.js} +2 -2
  309. package/_assets/{search-empty-DlvFh8OP.js → search-empty-eYhzQ9FT.js} +2 -2
  310. package/_assets/{search-CeQ1H1CU.js → search-f6j421fJ.js} +3 -3
  311. package/_assets/{secp256k1-By_oEGjh.js → secp256k1-B41_WO6S.js} +2 -2
  312. package/_assets/{secp256k1-l4zSwoMY.js → secp256k1-CW_LtzZ8.js} +2 -2
  313. package/_assets/{secp256k1-BHyRMwqk.js → secp256k1-GkgG1V04.js} +2 -2
  314. package/_assets/{send-Bo03Ql2I.js → send-BAUrBF6z.js} +3 -3
  315. package/_assets/{send-BxPbGMh3.js → send-C-GM4PE7.js} +2 -2
  316. package/_assets/send-batch-transaction-DT9GnwuT.js +2 -0
  317. package/_assets/{send-eip712-transaction-Cd2xhI0p.js → send-eip712-transaction-SnaEyRTO.js} +3 -3
  318. package/_assets/send-gasless-transaction-CznNnhM4.js +3 -0
  319. package/_assets/send-transaction-Bf6g32F5.js +3 -0
  320. package/_assets/{sendMetaTransaction-Cpk-JkUY.js → sendMetaTransaction-BVZGqOEK.js} +2 -2
  321. package/_assets/{sendRawTransaction-CmggkI48.js → sendRawTransaction-CkffR3oO.js} +4 -4
  322. package/_assets/{sentry-D9BarSwm.js → sentry-B0Y62cGL.js} +3 -3
  323. package/_assets/{serializeTransaction-DDF3EQOU.js → serializeTransaction-CMJTyk8U.js} +2 -2
  324. package/_assets/{session-proposal-CHYRi6z3.js → session-proposal-DC94r99f.js} +2 -2
  325. package/_assets/{session-request-r5jbMTp-.js → session-request-DgLUUnOE.js} +3 -3
  326. package/_assets/{sha256-DBqizRIu.js → sha256-CED-jKYK.js} +2 -2
  327. package/_assets/{sha3-B0gscz6j.js → sha3-CD2fzV95.js} +2 -2
  328. package/_assets/signin-empty-Djiz9wqy.js +2 -0
  329. package/_assets/{signing-Dv0wmdMO.js → signing-lMjAMQBI.js} +4 -4
  330. package/_assets/{skeleton.styles-BEkEh9Xo.js → skeleton.styles-OHtRJI1m.js} +2 -2
  331. package/_assets/{socials-9e49sRbo.js → socials-XRxoPbeV.js} +2 -2
  332. package/_assets/{styled-byzvgoEW.js → styled-2Gc9bEJf.js} +3 -3
  333. package/_assets/{swapHorizontal-C6GakaRf.js → swapHorizontal-BXjIGAcZ.js} +2 -2
  334. package/_assets/{swapHorizontalBold-oeP-_O-R.js → swapHorizontalBold-BzueHopN.js} +2 -2
  335. package/_assets/{swapHorizontalMedium-C64EXSWD.js → swapHorizontalMedium-DLFo4hRx.js} +2 -2
  336. package/_assets/{swapHorizontalRoundedBold-CHgP6XK-.js → swapHorizontalRoundedBold-BddBy7OL.js} +2 -2
  337. package/_assets/{swapVertical-8SLU7RpO.js → swapVertical-DYkySTmy.js} +3 -3
  338. package/_assets/{swaps-CMMXFVlc.js → swaps-1NO4w9-f.js} +8 -8
  339. package/_assets/{telegram-CF91ES6s.js → telegram-D8ymSABf.js} +2 -2
  340. package/_assets/{thirdweb-CilSVdOh.js → thirdweb-BJ3MsX6E.js} +4 -4
  341. package/_assets/{three-dots-BsCoLPC9.js → three-dots-CiS9iH0H.js} +2 -2
  342. package/_assets/{to-serializable-transaction-BtKRmZ5q.js → to-serializable-transaction-BUXwOt0l.js} +3 -3
  343. package/_assets/totalSupply-BbOY-Ah8.js +2 -0
  344. package/_assets/{trade-encoding-DqOFT-xH.js → trade-encoding-BeeCLIbm.js} +2 -2
  345. package/_assets/{transaction-Crt3oKUU.js → transaction-f7fSDSEv.js} +2 -2
  346. package/_assets/transactionReceipt-BNvHMRIb.js +2 -0
  347. package/_assets/transactions-swTuiqzl.js +17 -0
  348. package/_assets/{twitch-BranWKeM.js → twitch-BJQCmiGz.js} +2 -2
  349. package/_assets/{twitterIcon-BfIWT5DS.js → twitterIcon-B78o99Zv.js} +2 -2
  350. package/_assets/{useInfiniteGrid-CoFLGUq5.js → useInfiniteGrid-BEX_xsnJ.js} +2 -2
  351. package/_assets/useStore-B7dt3ckg.js +3 -0
  352. package/_assets/{useTheme-BtQzSd_x.js → useTheme-CCKeGB3A.js} +2 -2
  353. package/_assets/{utils-Di6UMxpb.js → utils-DA456_1A.js} +2 -2
  354. package/_assets/{verify-DcO5QuX7.js → verify-CrYE2kna.js} +3 -3
  355. package/_assets/{verify-filled-CKp8XQqI.js → verify-filled-CwwnY5h6.js} +3 -3
  356. package/_assets/{verifyHash-CyVD3HFU.js → verifyHash-BvlEdLQe.js} +2 -2
  357. package/_assets/{w3m-modal-DY_5HDWk.js → w3m-modal-BYjCcYG7.js} +2 -2
  358. package/_assets/{w3m-modal-VycpFrGV.js → w3m-modal-dqg0Bbo6.js} +2 -2
  359. package/_assets/wait-for-tx-receipt-mAbrkotI.js +2 -0
  360. package/_assets/{wallet-BHCiGpYx.js → wallet-EosqBoq7.js} +3 -3
  361. package/_assets/{wallet-placeholder-BVguMNEt.js → wallet-placeholder-DL8kIY2O.js} +3 -3
  362. package/_assets/{walletconnect-9t1WJh4k.js → walletconnect-CauX9cVK.js} +4 -4
  363. package/_assets/{wallets-CF_BBG99.js → wallets-BPfs-4HQ.js} +6 -6
  364. package/_assets/{warning-circle-II7Vcaxs.js → warning-circle-BrcBx24p.js} +3 -3
  365. package/_assets/{web-connector-DQro6gxL.js → web-connector-B7BkqcWh.js} +4 -4
  366. package/_assets/{writeContract-DhM9t6Ig.js → writeContract-BXbZZHUF.js} +2 -2
  367. package/_assets/x-CwtQDczS.js +13 -0
  368. package/_assets/{zora-sepolia-CVzG0Xwo.js → zora-sepolia-CTxGeA6f.js} +2 -2
  369. package/_assets/{zoraTestnet-D_-LBRSS.js → zoraTestnet-5ljqJp2x.js} +2 -2
  370. package/index.html +12 -12
  371. package/package.json +2 -2
  372. package/_assets/Activity-Zur2krvm.js +0 -400
  373. package/_assets/Creator-CnhYdhYL.js +0 -312
  374. package/_assets/ManaPricingBanner.styles-C-mAX-6w.js +0 -129
  375. package/_assets/MyAssets-5gpOzD_e.js +0 -410
  376. package/_assets/MyStore-C64oleTN.js +0 -1062
  377. package/_assets/OutfitPreview-BoRA9kOx.js +0 -7
  378. package/_assets/PhCaretDown-Co8viBJv.js +0 -15
  379. package/_assets/PhCaretUp-SXVNZaJo.js +0 -15
  380. package/_assets/StoreSettings-Boa-EyyK.js +0 -181
  381. package/_assets/arrow-right-QKHuTr9a.js +0 -9
  382. package/_assets/chevron-bottom-DVpGPQvJ.js +0 -9
  383. package/_assets/chevron-left-CSISn9Tl.js +0 -9
  384. package/_assets/chevron-right-D0n7Onzs.js +0 -9
  385. package/_assets/chevron-top-BSRcfV5m.js +0 -9
  386. package/_assets/close-BnCucYZG.js +0 -9
  387. package/_assets/collectionPage.styles-SF1IDwaV.js +0 -41
  388. package/_assets/common-z_d14HNn.js +0 -2
  389. package/_assets/decimals-DMW-nilF.js +0 -2
  390. package/_assets/decimals-DWYtWgBS.js +0 -2
  391. package/_assets/detectExtension-TTfkcmVw.js +0 -2
  392. package/_assets/estimate-l1-fee-CYcm0S5M.js +0 -2
  393. package/_assets/eth_estimateGas-BF6-2JVJ.js +0 -2
  394. package/_assets/eth_getStorageAt-CPTGlZUx.js +0 -2
  395. package/_assets/eth_getTransactionCount-izvwkQul.js +0 -2
  396. package/_assets/ethereum-BxDg7UsP.js +0 -2
  397. package/_assets/external-link-D1_8iC7n.js +0 -9
  398. package/_assets/get-ecosystem-wallet-info-CmJgYBeZ.js +0 -2
  399. package/_assets/getNFT-D7lfpr7H.js +0 -2
  400. package/_assets/index-BRNshUaV.js +0 -4310
  401. package/_assets/index-BmTyuiQs.css +0 -1
  402. package/_assets/index-DYa3ZRHr.js +0 -2
  403. package/_assets/index-PR_0BnK6.js +0 -2
  404. package/_assets/info-circle-CppZa7vK.js +0 -13
  405. package/_assets/items-empty-CFX8gNeF.js +0 -2
  406. package/_assets/jsxRuntime.module-Q9HBaTr-.js +0 -2
  407. package/_assets/off-B5vm0egN.js +0 -9
  408. package/_assets/openzeppelin-DpMlfPE2.js +0 -2
  409. package/_assets/ownerOf-qUf4d1F7.js +0 -2
  410. package/_assets/parseNft-DWZbRJRG.js +0 -3
  411. package/_assets/send-batch-transaction-BizQRWSH.js +0 -2
  412. package/_assets/send-gasless-transaction-DXUxg38U.js +0 -3
  413. package/_assets/send-transaction-D0szv-rw.js +0 -3
  414. package/_assets/signin-empty-C2-U4-eJ.js +0 -2
  415. package/_assets/totalSupply-gIi83gXe.js +0 -2
  416. package/_assets/transactionReceipt-yftDQJCI.js +0 -2
  417. package/_assets/transactions-BFd4sGt3.js +0 -17
  418. package/_assets/useCreatorSales-D2bq-mjs.js +0 -784
  419. package/_assets/useStore-DCfwTeT_.js +0 -3
  420. package/_assets/wait-for-tx-receipt-BnSiwjNZ.js +0 -2
  421. package/_assets/x-D0s8LW19.js +0 -13
@@ -1,2 +1,2 @@
1
- import{B as M}from"./dcl-schemas-B-Ph0Ls4.js";import{B as Tt,m as Mt,K as ot,o as J,q as Bt,Y as F,P as $t,F as B,V as R,r as z,t as At,u as Lt}from"./wallets-CF_BBG99.js";import"./index-Cyu7VCzw.js";import{b as Jt,o as g,c as Et}from"./index-Cx07-hgn.js";import{f as P}from"./index.es-kX0u41uY.js";import{N as zt}from"./index-9AH47OiK.js";import"./react-COwX0Zlk.js";import"./signing-Dv0wmdMO.js";import"./prepare-contract-call-CJg2QHZX.js";import"./utils-Di6UMxpb.js";import"./sentry-D9BarSwm.js";import"./index-BRNshUaV.js";import"./ethers-bR7FzlYq.js";import"./intl-AKLEHPeO.js";import"./to-serializable-transaction-BtKRmZ5q.js";import"./transaction-Crt3oKUU.js";import"./get-bytecode-CuUypJRS.js";import"./execute-DRuAik5I.js";import"./detectExtension-TTfkcmVw.js";import"./linkAccount-CPkzkJuG.js";import"./index-C6uMO8F3.js";import"./ethereum-BxDg7UsP.js";import"./types-BeDU9GfL.js";import"./store-80QKZ2rN.js";import"./hashTypedData-uKFMbdty.js";import"./send-transaction-D0szv-rw.js";import"./eth_sendRawTransaction-DYAsy3sS.js";import"./index-OpYIGLSa.js";import"./index-DddATSzO.js";import"./index-4Wt1itZR.js";import"./browser-ponyfill-cZkQn4gz.js";import"./events-CSMTNmJ4.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new i.Error().stack;t&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[t]="4a4a9145-4ee6-494f-a375-39149516f543",i._sentryDebugIdIdentifier="sentry-dbid-4a4a9145-4ee6-494f-a375-39149516f543")}catch{}})();const ct="error",Gt="wss://relay.walletconnect.org",Vt="wc",Kt="universal_provider",x=`${Vt}@2:${Kt}:`,St="https://rpc.walletconnect.org/v1/",qt="generic",Wt=`${St}bundler`,_="call_status",Yt=86400,v={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};function it(i){return i==null||typeof i!="object"&&typeof i!="function"}function Nt(i){return Object.getOwnPropertySymbols(i).filter(t=>Object.prototype.propertyIsEnumerable.call(i,t))}function Dt(i){return i==null?i===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(i)}const Qt="[object RegExp]",_t="[object String]",Ft="[object Number]",Rt="[object Boolean]",xt="[object Arguments]",Xt="[object Symbol]",Zt="[object Date]",te="[object Map]",ee="[object Set]",ie="[object Array]",se="[object ArrayBuffer]",re="[object Object]",ne="[object DataView]",ae="[object Uint8Array]",oe="[object Uint8ClampedArray]",ce="[object Uint16Array]",he="[object Uint32Array]",pe="[object Int8Array]",ue="[object Int16Array]",le="[object Int32Array]",de="[object Float32Array]",fe="[object Float64Array]";function st(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function me(i,t){return D(i,void 0,i,new Map,t)}function D(i,t,e,s=new Map,n=void 0){const a=n==null?void 0:n(i,t,e,s);if(a!=null)return a;if(it(i))return i;if(s.has(i))return s.get(i);if(Array.isArray(i)){const r=new Array(i.length);s.set(i,r);for(let o=0;o<i.length;o++)r[o]=D(i[o],o,e,s,n);return Object.hasOwn(i,"index")&&(r.index=i.index),Object.hasOwn(i,"input")&&(r.input=i.input),r}if(i instanceof Date)return new Date(i.getTime());if(i instanceof RegExp){const r=new RegExp(i.source,i.flags);return r.lastIndex=i.lastIndex,r}if(i instanceof Map){const r=new Map;s.set(i,r);for(const[o,c]of i)r.set(o,D(c,o,e,s,n));return r}if(i instanceof Set){const r=new Set;s.set(i,r);for(const o of i)r.add(D(o,void 0,e,s,n));return r}if(typeof M<"u"&&M.isBuffer(i))return i.subarray();if(st(i)){const r=new(Object.getPrototypeOf(i)).constructor(i.length);s.set(i,r);for(let o=0;o<i.length;o++)r[o]=D(i[o],o,e,s,n);return r}if(i instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&i instanceof SharedArrayBuffer)return i.slice(0);if(i instanceof DataView){const r=new DataView(i.buffer.slice(0),i.byteOffset,i.byteLength);return s.set(i,r),y(r,i,e,s,n),r}if(typeof File<"u"&&i instanceof File){const r=new File([i],i.name,{type:i.type});return s.set(i,r),y(r,i,e,s,n),r}if(i instanceof Blob){const r=new Blob([i],{type:i.type});return s.set(i,r),y(r,i,e,s,n),r}if(i instanceof Error){const r=new i.constructor;return s.set(i,r),r.message=i.message,r.name=i.name,r.stack=i.stack,r.cause=i.cause,y(r,i,e,s,n),r}if(typeof i=="object"&&ve(i)){const r=Object.create(Object.getPrototypeOf(i));return s.set(i,r),y(r,i,e,s,n),r}return i}function y(i,t,e=i,s,n){const a=[...Object.keys(t),...Nt(t)];for(let r=0;r<a.length;r++){const o=a[r],c=Object.getOwnPropertyDescriptor(i,o);(c==null||c.writable)&&(i[o]=D(t[o],o,e,s,n))}}function ve(i){switch(Dt(i)){case xt:case ie:case se:case ne:case Rt:case Zt:case de:case fe:case pe:case ue:case le:case te:case Ft:case re:case Qt:case ee:case _t:case Xt:case ae:case oe:case ce:case he:return!0;default:return!1}}function ge(i,t){return me(i,(e,s,n,a)=>{if(typeof i=="object")switch(Object.prototype.toString.call(i)){case Ft:case _t:case Rt:{const r=new i.constructor(i==null?void 0:i.valueOf());return y(r,i),r}case xt:{const r={};return y(r,i),r.length=i.length,r[Symbol.iterator]=i[Symbol.iterator],r}default:return}})}function ht(i){return ge(i)}function pt(i){return i!==null&&typeof i=="object"&&Dt(i)==="[object Arguments]"}function ut(i){return typeof i=="object"&&i!==null}function Pe(){}function we(i){return st(i)}function be(i){var e;if(typeof i!="object"||i==null)return!1;if(Object.getPrototypeOf(i)===null)return!0;if(Object.prototype.toString.call(i)!=="[object Object]"){const s=i[Symbol.toStringTag];return s==null||!((e=Object.getOwnPropertyDescriptor(i,Symbol.toStringTag))!=null&&e.writable)?!1:i.toString()===`[object ${s}]`}let t=i;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(i)===t}function ye(i){if(it(i))return i;if(Array.isArray(i)||st(i)||i instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&i instanceof SharedArrayBuffer)return i.slice(0);const t=Object.getPrototypeOf(i),e=t.constructor;if(i instanceof Date||i instanceof Map||i instanceof Set)return new e(i);if(i instanceof RegExp){const s=new e(i);return s.lastIndex=i.lastIndex,s}if(i instanceof DataView)return new e(i.buffer.slice(0));if(i instanceof Error){const s=new e(i.message);return s.stack=i.stack,s.name=i.name,s.cause=i.cause,s}if(typeof File<"u"&&i instanceof File)return new e([i],i.name,{type:i.type,lastModified:i.lastModified});if(typeof i=="object"){const s=Object.create(t);return Object.assign(s,i)}return i}function Ie(i,...t){const e=t.slice(0,-1),s=t[t.length-1];let n=i;for(let a=0;a<e.length;a++){const r=e[a];n=Z(n,r,s,new Map)}return n}function Z(i,t,e,s){if(it(i)&&(i=Object(i)),t==null||typeof t!="object")return i;if(s.has(t))return ye(s.get(t));if(s.set(t,i),Array.isArray(t)){t=t.slice();for(let a=0;a<t.length;a++)t[a]=t[a]??void 0}const n=[...Object.keys(t),...Nt(t)];for(let a=0;a<n.length;a++){const r=n[a];let o=t[r],c=i[r];if(pt(o)&&(o={...o}),pt(c)&&(c={...c}),typeof M<"u"&&M.isBuffer(o)&&(o=ht(o)),Array.isArray(o))if(typeof c=="object"&&c!=null){const l=[],h=Reflect.ownKeys(c);for(let w=0;w<h.length;w++){const d=h[w];l[d]=c[d]}c=l}else c=[];const u=e(c,o,r,i,t,s);u!=null?i[r]=u:Array.isArray(o)||ut(c)&&ut(o)?i[r]=Z(c,o,e,s):c==null&&be(o)?i[r]=Z({},o,e,s):c==null&&we(o)?i[r]=ht(o):(c===void 0||o!==void 0)&&(i[r]=o)}return i}function Ce(i,...t){return Ie(i,...t,Pe)}var Oe=Object.defineProperty,je=Object.defineProperties,He=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,dt=(i,t,e)=>t in i?Oe(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,U=(i,t)=>{for(var e in t||(t={}))$e.call(t,e)&&dt(i,e,t[e]);if(lt)for(var e of lt(t))Ae.call(t,e)&&dt(i,e,t[e]);return i},Ee=(i,t)=>je(i,He(t));function f(i,t,e){var s;const n=B(i);return((s=t.rpcMap)==null?void 0:s[n.reference])||`${St}?chainId=${n.namespace}:${n.reference}&projectId=${e}`}function I(i){return i.includes(":")?i.split(":")[1]:i}function Ut(i){return i.map(t=>`${t.split(":")[0]}:${t.split(":")[1]}`)}function Se(i,t){const e=Object.keys(t.namespaces).filter(n=>n.includes(i));if(!e.length)return[];const s=[];return e.forEach(n=>{const a=t.namespaces[n].accounts;s.push(...a)}),s}function ft(i){return Object.fromEntries(Object.entries(i).filter(([t,e])=>{var s,n;return((s=e==null?void 0:e.chains)==null?void 0:s.length)&&((n=e==null?void 0:e.chains)==null?void 0:n.length)>0}))}function k(i={},t={}){const e=ft(mt(i)),s=ft(mt(t));return Ce(e,s)}function mt(i){var t,e,s,n,a;const r={};if(!R(i))return r;for(const[o,c]of Object.entries(i)){const u=$t(o)?[o]:c.chains,l=c.methods||[],h=c.events||[],w=c.rpcMap||{},d=F(o);r[d]=Ee(U(U({},r[d]),c),{chains:z(u,(t=r[d])==null?void 0:t.chains),methods:z(l,(e=r[d])==null?void 0:e.methods),events:z(h,(s=r[d])==null?void 0:s.events)}),(R(w)||R(((n=r[d])==null?void 0:n.rpcMap)||{}))&&(r[d].rpcMap=U(U({},w),(a=r[d])==null?void 0:a.rpcMap))}return r}function vt(i){return i.includes(":")?i.split(":")[2]:i}function gt(i){const t={};for(const[e,s]of Object.entries(i)){const n=s.methods||[],a=s.events||[],r=s.accounts||[],o=$t(e)?[e]:s.chains?s.chains:Ut(s.accounts);t[e]={chains:o,methods:n,events:a,accounts:r}}return t}function G(i){return typeof i=="number"?i:i.includes("0x")?parseInt(i,16):(i=i.includes(":")?i.split(":")[1]:i,isNaN(Number(i))?i:Number(i))}function qe(i){try{const t=JSON.parse(i);return typeof t=="object"&&t!==null&&!Array.isArray(t)}catch{return!1}}const kt={},p=i=>kt[i],V=(i,t)=>{kt[i]=t};var Ne=Object.defineProperty,Pt=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,wt=(i,t,e)=>t in i?Ne(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,bt=(i,t)=>{for(var e in t||(t={}))De.call(t,e)&&wt(i,e,t[e]);if(Pt)for(var e of Pt(t))_e.call(t,e)&&wt(i,e,t[e]);return i};const yt="eip155",Fe=["atomic","flow-control","paymasterService","sessionKeys","auxiliaryFunds"],Re=i=>i&&i.startsWith("0x")?BigInt(i).toString(10):i,K=i=>i&&i.startsWith("0x")?i:`0x${BigInt(i).toString(16)}`,It=i=>Object.keys(i).filter(t=>Fe.includes(t)).reduce((t,e)=>(t[e]=xe(i[e]),t),{}),xe=i=>typeof i=="string"&&qe(i)?JSON.parse(i):i,Ue=(i,t,e)=>{const{sessionProperties:s={},scopedProperties:n={}}=i,a={};if(!R(n)&&!R(s))return;const r=It(s);for(const o of e){const c=Re(o);if(!c)continue;a[K(c)]=r;const u=n==null?void 0:n[`${yt}:${c}`];if(u){const l=u==null?void 0:u[`${yt}:${c}:${t}`];a[K(c)]=bt(bt({},a[K(c)]),It(l||u))}}for(const[o,c]of Object.entries(a))Object.keys(c).length===0&&delete a[o];return Object.keys(a).length>0?a:void 0};var ke=Object.defineProperty,Te=(i,t,e)=>t in i?ke(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,Me=(i,t,e)=>Te(i,t+"",e);let W;class rt{constructor(t){Me(this,"storage"),this.storage=t}async getItem(t){return await this.storage.getItem(t)}async setItem(t,e){return await this.storage.setItem(t,e)}async removeItem(t){return await this.storage.removeItem(t)}static getStorage(t){return W||(W=new rt(t)),W}}var Be=Object.defineProperty,Le=Object.defineProperties,Je=Object.getOwnPropertyDescriptors,Ct=Object.getOwnPropertySymbols,ze=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,Ot=(i,t,e)=>t in i?Be(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,Ve=(i,t)=>{for(var e in t||(t={}))ze.call(t,e)&&Ot(i,e,t[e]);if(Ct)for(var e of Ct(t))Ge.call(t,e)&&Ot(i,e,t[e]);return i},Ke=(i,t)=>Le(i,Je(t));async function We(i,t){const e=B(i.result.capabilities.caip345.caip2),s=i.result.capabilities.caip345.transactionHashes,n=await Promise.allSettled(s.map(h=>Ye(e.reference,h,t))),a=n.filter(h=>h.status==="fulfilled").map(h=>h.value).filter(h=>h);n.filter(h=>h.status==="rejected").forEach(h=>console.warn("Failed to fetch transaction receipt:",h.reason));const r=!a.length||a.some(h=>!h),o=a.every(h=>(h==null?void 0:h.status)==="0x1"),c=a.every(h=>(h==null?void 0:h.status)==="0x0"),u=a.some(h=>(h==null?void 0:h.status)==="0x0");let l;return r?l=100:o?l=200:c?l=500:u&&(l=600),{id:i.result.id,version:i.request.version,atomic:i.request.atomicRequired,chainId:i.request.chainId,capabilities:i.result.capabilities,receipts:a,status:l}}async function Ye(i,t,e){return await e(parseInt(i)).request(Et("eth_getTransactionReceipt",[t]))}async function Qe({sendCalls:i,storage:t}){const e=await t.getItem(_);await t.setItem(_,Ke(Ve({},e),{[i.result.id]:{request:i.request,result:i.result,expiry:Lt(Yt)}}))}async function Xe({resultId:i,storage:t}){const e=await t.getItem(_);if(e){delete e[i],await t.setItem(_,e);for(const s in e)At(e[s].expiry)&&delete e[s];await t.setItem(_,e)}}async function Ze({resultId:i,storage:t}){const e=await t.getItem(_),s=e==null?void 0:e[i];if(s&&!At(s.expiry))return s;await Xe({resultId:i,storage:t})}var ti=Object.defineProperty,ei=(i,t,e)=>t in i?ti(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,C=(i,t,e)=>ei(i,typeof t!="symbol"?t+"":t,e);class ii{constructor(t){C(this,"name","polkadot"),C(this,"client"),C(this,"httpProviders"),C(this,"events"),C(this,"namespace"),C(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=I(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var si=Object.defineProperty,ri=Object.defineProperties,ni=Object.getOwnPropertyDescriptors,jt=Object.getOwnPropertySymbols,ai=Object.prototype.hasOwnProperty,oi=Object.prototype.propertyIsEnumerable,tt=(i,t,e)=>t in i?si(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,Y=(i,t)=>{for(var e in t||(t={}))ai.call(t,e)&&tt(i,e,t[e]);if(jt)for(var e of jt(t))oi.call(t,e)&&tt(i,e,t[e]);return i},Q=(i,t)=>ri(i,ni(t)),b=(i,t,e)=>tt(i,typeof t!="symbol"?t+"":t,e);class ci{constructor(t){b(this,"name","eip155"),b(this,"client"),b(this,"chainId"),b(this,"namespace"),b(this,"httpProviders"),b(this,"events"),b(this,"storage"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain()),this.storage=rt.getStorage(this.client.core.storage)}async request(t){switch(t.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(t);case"eth_chainId":return parseInt(this.getDefaultChain());case"wallet_getCapabilities":return await this.getCapabilities(t);case"wallet_getCallsStatus":return await this.getCallStatus(t);case"wallet_sendCalls":return await this.sendCalls(t)}return this.namespace.methods.includes(t.request.method)?await this.client.request(t):this.getHttpProvider().request(t.request)}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(parseInt(t),e),this.chainId=parseInt(t),this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}createHttpProvider(t,e){const s=e||f(`${this.name}:${t}`,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=parseInt(I(e));t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}getHttpProvider(t){const e=t||this.chainId;return this.httpProviders[e]||(this.httpProviders=Q(Y({},this.httpProviders),{[e]:this.createHttpProvider(e)}),this.httpProviders[e])}async handleSwitchChain(t){var e,s;let n=t.request.params?(e=t.request.params[0])==null?void 0:e.chainId:"0x0";n=n.startsWith("0x")?n:`0x${n}`;const a=parseInt(n,16);if(this.isChainApproved(a))this.setDefaultChain(`${a}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:t.topic,request:{method:t.request.method,params:[{chainId:n}]},chainId:(s=this.namespace.chains)==null?void 0:s[0]}),this.setDefaultChain(`${a}`);else throw new Error(`Failed to switch to chain 'eip155:${a}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(t){return this.namespace.chains.includes(`${this.name}:${t}`)}async getCapabilities(t){var e,s,n,a,r;const o=(s=(e=t.request)==null?void 0:e.params)==null?void 0:s[0],c=((a=(n=t.request)==null?void 0:n.params)==null?void 0:a[1])||[];if(!o)throw new Error("Missing address parameter in `wallet_getCapabilities` request");const u=this.client.session.get(t.topic),l=((r=u==null?void 0:u.sessionProperties)==null?void 0:r.capabilities)||{},h=`${o}${c.join(",")}`,w=l==null?void 0:l[h];if(w)return w;let d;try{d=Ue(u,o,c)}catch(L){console.warn("Failed to extract capabilities from session",L)}if(d)return d;const at=await this.client.request(t);try{await this.client.session.update(t.topic,{sessionProperties:Q(Y({},u.sessionProperties||{}),{capabilities:Q(Y({},l||{}),{[h]:at})})})}catch(L){console.warn("Failed to update session with capabilities",L)}return at}async getCallStatus(t){var e,s,n;const a=this.client.session.get(t.topic),r=(e=a.sessionProperties)==null?void 0:e.bundler_name;if(r){const u=this.getBundlerUrl(t.chainId,r);try{return await this.getUserOperationReceipt(u,t)}catch(l){console.warn("Failed to fetch call status from bundler",l,u)}}const o=(s=a.sessionProperties)==null?void 0:s.bundler_url;if(o)try{return await this.getUserOperationReceipt(o,t)}catch(u){console.warn("Failed to fetch call status from custom bundler",u,o)}const c=await Ze({resultId:(n=t.request.params)==null?void 0:n[0],storage:this.storage});if(c)try{return await We(c,this.getHttpProvider.bind(this))}catch(u){console.warn("Failed to fetch call status from stored send calls",u,c)}if(this.namespace.methods.includes(t.request.method))return await this.client.request(t);throw new Error("Fetching call status not approved by the wallet.")}async getUserOperationReceipt(t,e){var s;const n=new URL(t),a=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Et("eth_getUserOperationReceipt",[(s=e.request.params)==null?void 0:s[0]]))});if(!a.ok)throw new Error(`Failed to fetch user operation receipt - ${a.status}`);return await a.json()}getBundlerUrl(t,e){return`${Wt}?projectId=${this.client.core.projectId}&chainId=${t}&bundler=${e}`}async sendCalls(t){var e,s,n;const a=await this.client.request(t),r=(e=t.request.params)==null?void 0:e[0],o=a==null?void 0:a.id,c=(a==null?void 0:a.capabilities)||{},u=(s=c==null?void 0:c.caip345)==null?void 0:s.caip2,l=(n=c==null?void 0:c.caip345)==null?void 0:n.transactionHashes;return!o||!u||!(l!=null&&l.length)||await Qe({sendCalls:{request:r,result:a},storage:this.storage}),a}}var hi=Object.defineProperty,pi=(i,t,e)=>t in i?hi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,O=(i,t,e)=>pi(i,typeof t!="symbol"?t+"":t,e);class ui{constructor(t){O(this,"name","solana"),O(this,"client"),O(this,"httpProviders"),O(this,"events"),O(this,"namespace"),O(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=I(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var li=Object.defineProperty,di=(i,t,e)=>t in i?li(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,j=(i,t,e)=>di(i,typeof t!="symbol"?t+"":t,e);class fi{constructor(t){j(this,"name","cosmos"),j(this,"client"),j(this,"httpProviders"),j(this,"events"),j(this,"namespace"),j(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=I(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var mi=Object.defineProperty,vi=(i,t,e)=>t in i?mi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,H=(i,t,e)=>vi(i,typeof t!="symbol"?t+"":t,e);class gi{constructor(t){H(this,"name","algorand"),H(this,"client"),H(this,"httpProviders"),H(this,"events"),H(this,"namespace"),H(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){if(!this.httpProviders[t]){const s=e||f(`${this.name}:${t}`,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;t[e]=this.createHttpProvider(e,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);return typeof s>"u"?void 0:new g(new P(s,p("disableProviderPing")))}}var Pi=Object.defineProperty,wi=(i,t,e)=>t in i?Pi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,$=(i,t,e)=>wi(i,typeof t!="symbol"?t+"":t,e);class bi{constructor(t){$(this,"name","cip34"),$(this,"client"),$(this,"httpProviders"),$(this,"events"),$(this,"namespace"),$(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{const s=this.getCardanoRPCUrl(e),n=I(e);t[n]=this.createHttpProvider(n,s)}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}getCardanoRPCUrl(t){const e=this.namespace.rpcMap;if(e)return e[t]}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||this.getCardanoRPCUrl(t);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var yi=Object.defineProperty,Ii=(i,t,e)=>t in i?yi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,A=(i,t,e)=>Ii(i,typeof t!="symbol"?t+"":t,e);class Ci{constructor(t){A(this,"name","elrond"),A(this,"client"),A(this,"httpProviders"),A(this,"events"),A(this,"namespace"),A(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=I(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var Oi=Object.defineProperty,ji=(i,t,e)=>t in i?Oi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,E=(i,t,e)=>ji(i,typeof t!="symbol"?t+"":t,e);class Hi{constructor(t){E(this,"name","multiversx"),E(this,"client"),E(this,"httpProviders"),E(this,"events"),E(this,"namespace"),E(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=I(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var $i=Object.defineProperty,Ai=(i,t,e)=>t in i?$i(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,S=(i,t,e)=>Ai(i,typeof t!="symbol"?t+"":t,e);class Ei{constructor(t){S(this,"name","near"),S(this,"client"),S(this,"httpProviders"),S(this,"events"),S(this,"namespace"),S(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){if(this.chainId=t,!this.httpProviders[t]){const s=e||f(`${this.name}:${t}`,this.namespace);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;t[e]=this.createHttpProvider(e,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace);return typeof s>"u"?void 0:new g(new P(s,p("disableProviderPing")))}}var Si=Object.defineProperty,qi=(i,t,e)=>t in i?Si(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,q=(i,t,e)=>qi(i,typeof t!="symbol"?t+"":t,e);class Ni{constructor(t){q(this,"name","tezos"),q(this,"client"),q(this,"httpProviders"),q(this,"events"),q(this,"namespace"),q(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){if(this.chainId=t,!this.httpProviders[t]){const s=e||f(`${this.name}:${t}`,this.namespace);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{t[e]=this.createHttpProvider(e)}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace);return typeof s>"u"?void 0:new g(new P(s))}}var Di=Object.defineProperty,_i=(i,t,e)=>t in i?Di(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,N=(i,t,e)=>_i(i,typeof t!="symbol"?t+"":t,e);class Fi{constructor(t){N(this,"name",qt),N(this,"client"),N(this,"httpProviders"),N(this,"events"),N(this,"namespace"),N(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.name=this.getNamespaceName(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace.chains=[...new Set((this.namespace.chains||[]).concat(t.chains||[]))],this.namespace.accounts=[...new Set((this.namespace.accounts||[]).concat(t.accounts||[]))],this.namespace.methods=[...new Set((this.namespace.methods||[]).concat(t.methods||[]))],this.namespace.events=[...new Set((this.namespace.events||[]).concat(t.events||[]))],this.httpProviders=this.createHttpProviders()}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider(t.chainId).request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getNamespaceName(){const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return B(t).namespace}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){var t,e;const s={};return(e=(t=this.namespace)==null?void 0:t.accounts)==null||e.forEach(n=>{const a=B(n);s[a.reference]=this.createHttpProvider(n)}),s}getHttpProvider(t){const e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var Ri=Object.defineProperty,xi=Object.defineProperties,Ui=Object.getOwnPropertyDescriptors,Ht=Object.getOwnPropertySymbols,ki=Object.prototype.hasOwnProperty,Ti=Object.prototype.propertyIsEnumerable,et=(i,t,e)=>t in i?Ri(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,T=(i,t)=>{for(var e in t||(t={}))ki.call(t,e)&&et(i,e,t[e]);if(Ht)for(var e of Ht(t))Ti.call(t,e)&&et(i,e,t[e]);return i},X=(i,t)=>xi(i,Ui(t)),m=(i,t,e)=>et(i,typeof t!="symbol"?t+"":t,e);class nt{constructor(t){m(this,"client"),m(this,"namespaces"),m(this,"optionalNamespaces"),m(this,"sessionProperties"),m(this,"scopedProperties"),m(this,"events",new zt),m(this,"rpcProviders",{}),m(this,"session"),m(this,"providerOpts"),m(this,"logger"),m(this,"uri"),m(this,"disableProviderPing",!1),this.providerOpts=t,this.logger=typeof(t==null?void 0:t.logger)<"u"&&typeof(t==null?void 0:t.logger)!="string"?t.logger:Tt(Mt({level:(t==null?void 0:t.logger)||ct})),this.disableProviderPing=(t==null?void 0:t.disableProviderPing)||!1}static async init(t){const e=new nt(t);return await e.initialize(),e}async request(t,e,s){const[n,a]=this.validateChain(e);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(n).request({request:T({},t),chainId:`${n}:${a}`,topic:this.session.topic,expiry:s})}sendAsync(t,e,s,n){const a=new Date().getTime();this.request(t,s,n).then(r=>e(null,Jt(a,r))).catch(r=>e(r,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties,scopedProperties:this.scopedProperties}),await this.requestAccounts()}async disconnect(){var t;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(t=this.session)==null?void 0:t.topic,reason:ot("USER_DISCONNECTED")}),await this.cleanup()}async connect(t){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(t),this.cleanupPendingPairings(),!t.skipPairing)return await this.pair(t.pairingTopic)}async authenticate(t,e){if(!this.client)throw new Error("Sign Client not initialized");this.setNamespaces(t),await this.cleanupPendingPairings();const{uri:s,response:n}=await this.client.authenticate(t,e);s&&(this.uri=s,this.events.emit("display_uri",s));const a=await n();if(this.session=a.session,this.session){const r=gt(this.session.namespaces);this.namespaces=k(this.namespaces,r),await this.persist("namespaces",this.namespaces),this.onConnect()}return a}on(t,e){this.events.on(t,e)}once(t,e){this.events.once(t,e)}removeListener(t,e){this.events.removeListener(t,e)}off(t,e){this.events.off(t,e)}get isWalletConnect(){return!0}async pair(t){const{uri:e,approval:s}=await this.client.connect({pairingTopic:t,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties,scopedProperties:this.scopedProperties});e&&(this.uri=e,this.events.emit("display_uri",e));const n=await s();this.session=n;const a=gt(n.namespaces);return this.namespaces=k(this.namespaces,a),await this.persist("namespaces",this.namespaces),await this.persist("optionalNamespaces",this.optionalNamespaces),this.onConnect(),this.session}setDefaultChain(t,e){try{if(!this.session)return;const[s,n]=this.validateChain(t);this.getProvider(s).setDefaultChain(n,e)}catch(s){if(!/Please call connect/.test(s.message))throw s}}async cleanupPendingPairings(t={}){try{this.logger.info("Cleaning up inactive pairings...");const e=this.client.pairing.getAll();if(!J(e))return;for(const s of e)t.deletePairings?this.client.core.expirer.set(s.topic,0):await this.client.core.relayer.subscriber.unsubscribe(s.topic);this.logger.info(`Inactive pairings cleared: ${e.length}`)}catch(e){this.logger.warn("Failed to cleanup pending pairings",e)}}abortPairingAttempt(){this.logger.warn("abortPairingAttempt is deprecated. This is now a no-op.")}async checkStorage(){this.namespaces=await this.getFromStore("namespaces")||{},this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.session&&this.createProviders()}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){var t,e;if(this.client=this.providerOpts.client||await Bt.init({core:this.providerOpts.core,logger:this.providerOpts.logger||ct,relayUrl:this.providerOpts.relayUrl||Gt,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name,customStoragePrefix:this.providerOpts.customStoragePrefix,telemetryEnabled:this.providerOpts.telemetryEnabled}),this.providerOpts.session)try{this.session=this.client.session.get(this.providerOpts.session.topic)}catch(s){throw this.logger.error("Failed to get session",s),new Error(`The provided session: ${(e=(t=this.providerOpts)==null?void 0:t.session)==null?void 0:e.topic} doesn't exist in the Sign client`)}else{const s=this.client.session.getAll();this.session=s[0]}this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const t=[...new Set(Object.keys(this.session.namespaces).map(e=>F(e)))];V("client",this.client),V("events",this.events),V("disableProviderPing",this.disableProviderPing),t.forEach(e=>{if(!this.session)return;const s=Se(e,this.session);if((s==null?void 0:s.length)===0)return;const n=Ut(s),a=k(this.namespaces,this.optionalNamespaces),r=X(T({},a[e]),{accounts:s,chains:n});switch(e){case"eip155":this.rpcProviders[e]=new ci({namespace:r});break;case"algorand":this.rpcProviders[e]=new gi({namespace:r});break;case"solana":this.rpcProviders[e]=new ui({namespace:r});break;case"cosmos":this.rpcProviders[e]=new fi({namespace:r});break;case"polkadot":this.rpcProviders[e]=new ii({namespace:r});break;case"cip34":this.rpcProviders[e]=new bi({namespace:r});break;case"elrond":this.rpcProviders[e]=new Ci({namespace:r});break;case"multiversx":this.rpcProviders[e]=new Hi({namespace:r});break;case"near":this.rpcProviders[e]=new Ei({namespace:r});break;case"tezos":this.rpcProviders[e]=new Ni({namespace:r});break;default:this.rpcProviders[e]=new Fi({namespace:r})}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",t=>{var e;const{topic:s}=t;s===((e=this.session)==null?void 0:e.topic)&&this.events.emit("session_ping",t)}),this.client.on("session_event",t=>{var e;const{params:s,topic:n}=t;if(n!==((e=this.session)==null?void 0:e.topic))return;const{event:a}=s;if(a.name==="accountsChanged"){const r=a.data;r&&J(r)&&this.events.emit("accountsChanged",r.map(vt))}else if(a.name==="chainChanged"){const r=s.chainId,o=s.event.data,c=F(r),u=G(r)!==G(o)?`${c}:${G(o)}`:r;this.onChainChanged(u)}else this.events.emit(a.name,a.data);this.events.emit("session_event",t)}),this.client.on("session_update",({topic:t,params:e})=>{var s,n;if(t!==((s=this.session)==null?void 0:s.topic))return;const{namespaces:a}=e,r=(n=this.client)==null?void 0:n.session.get(t);this.session=X(T({},r),{namespaces:a}),this.onSessionUpdate(),this.events.emit("session_update",{topic:t,params:e})}),this.client.on("session_delete",async t=>{var e;t.topic===((e=this.session)==null?void 0:e.topic)&&(await this.cleanup(),this.events.emit("session_delete",t),this.events.emit("disconnect",X(T({},ot("USER_DISCONNECTED")),{data:t.topic})))}),this.on(v.DEFAULT_CHAIN_CHANGED,t=>{this.onChainChanged(t,!0)})}getProvider(t){return this.rpcProviders[t]||this.rpcProviders[qt]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(t=>{var e;this.getProvider(t).updateNamespace((e=this.session)==null?void 0:e.namespaces[t])})}setNamespaces(t){const{namespaces:e={},optionalNamespaces:s={},sessionProperties:n,scopedProperties:a}=t;this.optionalNamespaces=k(e,s),this.sessionProperties=n,this.scopedProperties=a}validateChain(t){const[e,s]=(t==null?void 0:t.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[e,s];if(e&&!Object.keys(this.namespaces||{}).map(r=>F(r)).includes(e))throw new Error(`Namespace '${e}' is not configured. Please call connect() first with namespace config.`);if(e&&s)return[e,s];const n=F(Object.keys(this.namespaces)[0]),a=this.rpcProviders[n].getDefaultChain();return[n,a]}async requestAccounts(){const[t]=this.validateChain();return await this.getProvider(t).requestAccounts()}async onChainChanged(t,e=!1){if(!this.namespaces)return;const[s,n]=this.validateChain(t);if(!n)return;this.updateNamespaceChain(s,n);const a=this.getProvider(s).getDefaultChain();e?(this.events.emit("chainChanged",n),this.emitAccountsChangedOnChainChange({namespace:s,previousChainId:a,newChainId:t})):this.getProvider(s).setDefaultChain(n),await this.persist("namespaces",this.namespaces)}emitAccountsChangedOnChainChange({namespace:t,previousChainId:e,newChainId:s}){var n,a;try{if(e===s)return;const r=(a=(n=this.session)==null?void 0:n.namespaces[t])==null?void 0:a.accounts;if(!r)return;const o=r.filter(c=>c.includes(`${s}:`)).map(vt);if(!J(o))return;this.events.emit("accountsChanged",o)}catch(r){this.logger.warn("Failed to emit accountsChanged on chain change",r)}}updateNamespaceChain(t,e){if(!this.namespaces)return;const s=this.namespaces[t]?t:`${t}:${e}`,n={chains:[],methods:[],events:[],defaultChain:e};this.namespaces[s]?this.namespaces[s]&&(this.namespaces[s].defaultChain=e):this.namespaces[s]=n}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,await this.deleteFromStore("namespaces"),await this.deleteFromStore("optionalNamespaces"),await this.deleteFromStore("sessionProperties"),this.session=void 0,this.cleanupPendingPairings({deletePairings:!0}),await this.cleanupStorage()}async persist(t,e){var s;const n=((s=this.session)==null?void 0:s.topic)||"";await this.client.core.storage.setItem(`${x}/${t}${n}`,e)}async getFromStore(t){var e;const s=((e=this.session)==null?void 0:e.topic)||"";return await this.client.core.storage.getItem(`${x}/${t}${s}`)}async deleteFromStore(t){var e;const s=((e=this.session)==null?void 0:e.topic)||"";await this.client.core.storage.removeItem(`${x}/${t}${s}`)}async cleanupStorage(){var t;try{if(((t=this.client)==null?void 0:t.session.length)>0)return;const e=await this.client.core.storage.getKeys();for(const s of e)s.startsWith(x)&&await this.client.core.storage.removeItem(s)}catch(e){this.logger.warn("Failed to cleanup storage",e)}}}const ws=nt;export{ws as UniversalProvider,nt as default};
2
- //# sourceMappingURL=index.es-Dq25h1l9.js.map
1
+ import{B as M}from"./dcl-schemas-D-5rZ83i.js";import{B as Tt,m as Mt,K as ot,o as J,q as Bt,Y as F,P as $t,F as B,V as R,r as z,t as At,u as Lt}from"./wallets-BPfs-4HQ.js";import"./index-CS-Fo7Dd.js";import{b as Jt,o as g,c as Et}from"./index-Be5CQ9Ek.js";import{f as P}from"./index.es-DvYgO4WC.js";import{N as zt}from"./index-CEosqueA.js";import"./react-xTOg_zXI.js";import"./signing-lMjAMQBI.js";import"./prepare-contract-call-Cd3rzK4m.js";import"./utils-DA456_1A.js";import"./sentry-B0Y62cGL.js";import"./index-x3_oOTlT.js";import"./ethers-CopgDOSY.js";import"./intl-AKLEHPeO.js";import"./to-serializable-transaction-BUXwOt0l.js";import"./transaction-f7fSDSEv.js";import"./get-bytecode-Hn-ME_dR.js";import"./execute-CbNEb0_w.js";import"./detectExtension-D7EH5FOC.js";import"./linkAccount-D6iv170c.js";import"./index-C0Nwpyec.js";import"./ethereum-mrT0UM5G.js";import"./types-BeDU9GfL.js";import"./store-80QKZ2rN.js";import"./hashTypedData-Cx9nB98K.js";import"./send-transaction-Bf6g32F5.js";import"./eth_sendRawTransaction-DYAsy3sS.js";import"./index-OpYIGLSa.js";import"./index-BcwUv4WI.js";import"./index-Co7rAvqY.js";import"./browser-ponyfill-DjCvoPa9.js";import"./events-Ws3Yj1Vh.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new i.Error().stack;t&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[t]="4ab2a32b-c7dc-4eed-99f6-5e1a6385b902",i._sentryDebugIdIdentifier="sentry-dbid-4ab2a32b-c7dc-4eed-99f6-5e1a6385b902")}catch{}})();const ct="error",Gt="wss://relay.walletconnect.org",Vt="wc",Kt="universal_provider",x=`${Vt}@2:${Kt}:`,St="https://rpc.walletconnect.org/v1/",qt="generic",Wt=`${St}bundler`,_="call_status",Yt=86400,v={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};function it(i){return i==null||typeof i!="object"&&typeof i!="function"}function Nt(i){return Object.getOwnPropertySymbols(i).filter(t=>Object.prototype.propertyIsEnumerable.call(i,t))}function Dt(i){return i==null?i===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(i)}const Qt="[object RegExp]",_t="[object String]",Ft="[object Number]",Rt="[object Boolean]",xt="[object Arguments]",Xt="[object Symbol]",Zt="[object Date]",te="[object Map]",ee="[object Set]",ie="[object Array]",se="[object ArrayBuffer]",re="[object Object]",ne="[object DataView]",ae="[object Uint8Array]",oe="[object Uint8ClampedArray]",ce="[object Uint16Array]",he="[object Uint32Array]",pe="[object Int8Array]",ue="[object Int16Array]",le="[object Int32Array]",de="[object Float32Array]",fe="[object Float64Array]";function st(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function me(i,t){return D(i,void 0,i,new Map,t)}function D(i,t,e,s=new Map,n=void 0){const a=n==null?void 0:n(i,t,e,s);if(a!=null)return a;if(it(i))return i;if(s.has(i))return s.get(i);if(Array.isArray(i)){const r=new Array(i.length);s.set(i,r);for(let o=0;o<i.length;o++)r[o]=D(i[o],o,e,s,n);return Object.hasOwn(i,"index")&&(r.index=i.index),Object.hasOwn(i,"input")&&(r.input=i.input),r}if(i instanceof Date)return new Date(i.getTime());if(i instanceof RegExp){const r=new RegExp(i.source,i.flags);return r.lastIndex=i.lastIndex,r}if(i instanceof Map){const r=new Map;s.set(i,r);for(const[o,c]of i)r.set(o,D(c,o,e,s,n));return r}if(i instanceof Set){const r=new Set;s.set(i,r);for(const o of i)r.add(D(o,void 0,e,s,n));return r}if(typeof M<"u"&&M.isBuffer(i))return i.subarray();if(st(i)){const r=new(Object.getPrototypeOf(i)).constructor(i.length);s.set(i,r);for(let o=0;o<i.length;o++)r[o]=D(i[o],o,e,s,n);return r}if(i instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&i instanceof SharedArrayBuffer)return i.slice(0);if(i instanceof DataView){const r=new DataView(i.buffer.slice(0),i.byteOffset,i.byteLength);return s.set(i,r),y(r,i,e,s,n),r}if(typeof File<"u"&&i instanceof File){const r=new File([i],i.name,{type:i.type});return s.set(i,r),y(r,i,e,s,n),r}if(i instanceof Blob){const r=new Blob([i],{type:i.type});return s.set(i,r),y(r,i,e,s,n),r}if(i instanceof Error){const r=new i.constructor;return s.set(i,r),r.message=i.message,r.name=i.name,r.stack=i.stack,r.cause=i.cause,y(r,i,e,s,n),r}if(typeof i=="object"&&ve(i)){const r=Object.create(Object.getPrototypeOf(i));return s.set(i,r),y(r,i,e,s,n),r}return i}function y(i,t,e=i,s,n){const a=[...Object.keys(t),...Nt(t)];for(let r=0;r<a.length;r++){const o=a[r],c=Object.getOwnPropertyDescriptor(i,o);(c==null||c.writable)&&(i[o]=D(t[o],o,e,s,n))}}function ve(i){switch(Dt(i)){case xt:case ie:case se:case ne:case Rt:case Zt:case de:case fe:case pe:case ue:case le:case te:case Ft:case re:case Qt:case ee:case _t:case Xt:case ae:case oe:case ce:case he:return!0;default:return!1}}function ge(i,t){return me(i,(e,s,n,a)=>{if(typeof i=="object")switch(Object.prototype.toString.call(i)){case Ft:case _t:case Rt:{const r=new i.constructor(i==null?void 0:i.valueOf());return y(r,i),r}case xt:{const r={};return y(r,i),r.length=i.length,r[Symbol.iterator]=i[Symbol.iterator],r}default:return}})}function ht(i){return ge(i)}function pt(i){return i!==null&&typeof i=="object"&&Dt(i)==="[object Arguments]"}function ut(i){return typeof i=="object"&&i!==null}function Pe(){}function we(i){return st(i)}function be(i){var e;if(typeof i!="object"||i==null)return!1;if(Object.getPrototypeOf(i)===null)return!0;if(Object.prototype.toString.call(i)!=="[object Object]"){const s=i[Symbol.toStringTag];return s==null||!((e=Object.getOwnPropertyDescriptor(i,Symbol.toStringTag))!=null&&e.writable)?!1:i.toString()===`[object ${s}]`}let t=i;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(i)===t}function ye(i){if(it(i))return i;if(Array.isArray(i)||st(i)||i instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&i instanceof SharedArrayBuffer)return i.slice(0);const t=Object.getPrototypeOf(i),e=t.constructor;if(i instanceof Date||i instanceof Map||i instanceof Set)return new e(i);if(i instanceof RegExp){const s=new e(i);return s.lastIndex=i.lastIndex,s}if(i instanceof DataView)return new e(i.buffer.slice(0));if(i instanceof Error){const s=new e(i.message);return s.stack=i.stack,s.name=i.name,s.cause=i.cause,s}if(typeof File<"u"&&i instanceof File)return new e([i],i.name,{type:i.type,lastModified:i.lastModified});if(typeof i=="object"){const s=Object.create(t);return Object.assign(s,i)}return i}function Ie(i,...t){const e=t.slice(0,-1),s=t[t.length-1];let n=i;for(let a=0;a<e.length;a++){const r=e[a];n=Z(n,r,s,new Map)}return n}function Z(i,t,e,s){if(it(i)&&(i=Object(i)),t==null||typeof t!="object")return i;if(s.has(t))return ye(s.get(t));if(s.set(t,i),Array.isArray(t)){t=t.slice();for(let a=0;a<t.length;a++)t[a]=t[a]??void 0}const n=[...Object.keys(t),...Nt(t)];for(let a=0;a<n.length;a++){const r=n[a];let o=t[r],c=i[r];if(pt(o)&&(o={...o}),pt(c)&&(c={...c}),typeof M<"u"&&M.isBuffer(o)&&(o=ht(o)),Array.isArray(o))if(typeof c=="object"&&c!=null){const l=[],h=Reflect.ownKeys(c);for(let w=0;w<h.length;w++){const d=h[w];l[d]=c[d]}c=l}else c=[];const u=e(c,o,r,i,t,s);u!=null?i[r]=u:Array.isArray(o)||ut(c)&&ut(o)?i[r]=Z(c,o,e,s):c==null&&be(o)?i[r]=Z({},o,e,s):c==null&&we(o)?i[r]=ht(o):(c===void 0||o!==void 0)&&(i[r]=o)}return i}function Ce(i,...t){return Ie(i,...t,Pe)}var Oe=Object.defineProperty,je=Object.defineProperties,He=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,dt=(i,t,e)=>t in i?Oe(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,U=(i,t)=>{for(var e in t||(t={}))$e.call(t,e)&&dt(i,e,t[e]);if(lt)for(var e of lt(t))Ae.call(t,e)&&dt(i,e,t[e]);return i},Ee=(i,t)=>je(i,He(t));function f(i,t,e){var s;const n=B(i);return((s=t.rpcMap)==null?void 0:s[n.reference])||`${St}?chainId=${n.namespace}:${n.reference}&projectId=${e}`}function I(i){return i.includes(":")?i.split(":")[1]:i}function Ut(i){return i.map(t=>`${t.split(":")[0]}:${t.split(":")[1]}`)}function Se(i,t){const e=Object.keys(t.namespaces).filter(n=>n.includes(i));if(!e.length)return[];const s=[];return e.forEach(n=>{const a=t.namespaces[n].accounts;s.push(...a)}),s}function ft(i){return Object.fromEntries(Object.entries(i).filter(([t,e])=>{var s,n;return((s=e==null?void 0:e.chains)==null?void 0:s.length)&&((n=e==null?void 0:e.chains)==null?void 0:n.length)>0}))}function k(i={},t={}){const e=ft(mt(i)),s=ft(mt(t));return Ce(e,s)}function mt(i){var t,e,s,n,a;const r={};if(!R(i))return r;for(const[o,c]of Object.entries(i)){const u=$t(o)?[o]:c.chains,l=c.methods||[],h=c.events||[],w=c.rpcMap||{},d=F(o);r[d]=Ee(U(U({},r[d]),c),{chains:z(u,(t=r[d])==null?void 0:t.chains),methods:z(l,(e=r[d])==null?void 0:e.methods),events:z(h,(s=r[d])==null?void 0:s.events)}),(R(w)||R(((n=r[d])==null?void 0:n.rpcMap)||{}))&&(r[d].rpcMap=U(U({},w),(a=r[d])==null?void 0:a.rpcMap))}return r}function vt(i){return i.includes(":")?i.split(":")[2]:i}function gt(i){const t={};for(const[e,s]of Object.entries(i)){const n=s.methods||[],a=s.events||[],r=s.accounts||[],o=$t(e)?[e]:s.chains?s.chains:Ut(s.accounts);t[e]={chains:o,methods:n,events:a,accounts:r}}return t}function G(i){return typeof i=="number"?i:i.includes("0x")?parseInt(i,16):(i=i.includes(":")?i.split(":")[1]:i,isNaN(Number(i))?i:Number(i))}function qe(i){try{const t=JSON.parse(i);return typeof t=="object"&&t!==null&&!Array.isArray(t)}catch{return!1}}const kt={},p=i=>kt[i],V=(i,t)=>{kt[i]=t};var Ne=Object.defineProperty,Pt=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,wt=(i,t,e)=>t in i?Ne(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,bt=(i,t)=>{for(var e in t||(t={}))De.call(t,e)&&wt(i,e,t[e]);if(Pt)for(var e of Pt(t))_e.call(t,e)&&wt(i,e,t[e]);return i};const yt="eip155",Fe=["atomic","flow-control","paymasterService","sessionKeys","auxiliaryFunds"],Re=i=>i&&i.startsWith("0x")?BigInt(i).toString(10):i,K=i=>i&&i.startsWith("0x")?i:`0x${BigInt(i).toString(16)}`,It=i=>Object.keys(i).filter(t=>Fe.includes(t)).reduce((t,e)=>(t[e]=xe(i[e]),t),{}),xe=i=>typeof i=="string"&&qe(i)?JSON.parse(i):i,Ue=(i,t,e)=>{const{sessionProperties:s={},scopedProperties:n={}}=i,a={};if(!R(n)&&!R(s))return;const r=It(s);for(const o of e){const c=Re(o);if(!c)continue;a[K(c)]=r;const u=n==null?void 0:n[`${yt}:${c}`];if(u){const l=u==null?void 0:u[`${yt}:${c}:${t}`];a[K(c)]=bt(bt({},a[K(c)]),It(l||u))}}for(const[o,c]of Object.entries(a))Object.keys(c).length===0&&delete a[o];return Object.keys(a).length>0?a:void 0};var ke=Object.defineProperty,Te=(i,t,e)=>t in i?ke(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,Me=(i,t,e)=>Te(i,t+"",e);let W;class rt{constructor(t){Me(this,"storage"),this.storage=t}async getItem(t){return await this.storage.getItem(t)}async setItem(t,e){return await this.storage.setItem(t,e)}async removeItem(t){return await this.storage.removeItem(t)}static getStorage(t){return W||(W=new rt(t)),W}}var Be=Object.defineProperty,Le=Object.defineProperties,Je=Object.getOwnPropertyDescriptors,Ct=Object.getOwnPropertySymbols,ze=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,Ot=(i,t,e)=>t in i?Be(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,Ve=(i,t)=>{for(var e in t||(t={}))ze.call(t,e)&&Ot(i,e,t[e]);if(Ct)for(var e of Ct(t))Ge.call(t,e)&&Ot(i,e,t[e]);return i},Ke=(i,t)=>Le(i,Je(t));async function We(i,t){const e=B(i.result.capabilities.caip345.caip2),s=i.result.capabilities.caip345.transactionHashes,n=await Promise.allSettled(s.map(h=>Ye(e.reference,h,t))),a=n.filter(h=>h.status==="fulfilled").map(h=>h.value).filter(h=>h);n.filter(h=>h.status==="rejected").forEach(h=>console.warn("Failed to fetch transaction receipt:",h.reason));const r=!a.length||a.some(h=>!h),o=a.every(h=>(h==null?void 0:h.status)==="0x1"),c=a.every(h=>(h==null?void 0:h.status)==="0x0"),u=a.some(h=>(h==null?void 0:h.status)==="0x0");let l;return r?l=100:o?l=200:c?l=500:u&&(l=600),{id:i.result.id,version:i.request.version,atomic:i.request.atomicRequired,chainId:i.request.chainId,capabilities:i.result.capabilities,receipts:a,status:l}}async function Ye(i,t,e){return await e(parseInt(i)).request(Et("eth_getTransactionReceipt",[t]))}async function Qe({sendCalls:i,storage:t}){const e=await t.getItem(_);await t.setItem(_,Ke(Ve({},e),{[i.result.id]:{request:i.request,result:i.result,expiry:Lt(Yt)}}))}async function Xe({resultId:i,storage:t}){const e=await t.getItem(_);if(e){delete e[i],await t.setItem(_,e);for(const s in e)At(e[s].expiry)&&delete e[s];await t.setItem(_,e)}}async function Ze({resultId:i,storage:t}){const e=await t.getItem(_),s=e==null?void 0:e[i];if(s&&!At(s.expiry))return s;await Xe({resultId:i,storage:t})}var ti=Object.defineProperty,ei=(i,t,e)=>t in i?ti(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,C=(i,t,e)=>ei(i,typeof t!="symbol"?t+"":t,e);class ii{constructor(t){C(this,"name","polkadot"),C(this,"client"),C(this,"httpProviders"),C(this,"events"),C(this,"namespace"),C(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=I(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var si=Object.defineProperty,ri=Object.defineProperties,ni=Object.getOwnPropertyDescriptors,jt=Object.getOwnPropertySymbols,ai=Object.prototype.hasOwnProperty,oi=Object.prototype.propertyIsEnumerable,tt=(i,t,e)=>t in i?si(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,Y=(i,t)=>{for(var e in t||(t={}))ai.call(t,e)&&tt(i,e,t[e]);if(jt)for(var e of jt(t))oi.call(t,e)&&tt(i,e,t[e]);return i},Q=(i,t)=>ri(i,ni(t)),b=(i,t,e)=>tt(i,typeof t!="symbol"?t+"":t,e);class ci{constructor(t){b(this,"name","eip155"),b(this,"client"),b(this,"chainId"),b(this,"namespace"),b(this,"httpProviders"),b(this,"events"),b(this,"storage"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain()),this.storage=rt.getStorage(this.client.core.storage)}async request(t){switch(t.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(t);case"eth_chainId":return parseInt(this.getDefaultChain());case"wallet_getCapabilities":return await this.getCapabilities(t);case"wallet_getCallsStatus":return await this.getCallStatus(t);case"wallet_sendCalls":return await this.sendCalls(t)}return this.namespace.methods.includes(t.request.method)?await this.client.request(t):this.getHttpProvider().request(t.request)}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(parseInt(t),e),this.chainId=parseInt(t),this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}createHttpProvider(t,e){const s=e||f(`${this.name}:${t}`,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=parseInt(I(e));t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}getHttpProvider(t){const e=t||this.chainId;return this.httpProviders[e]||(this.httpProviders=Q(Y({},this.httpProviders),{[e]:this.createHttpProvider(e)}),this.httpProviders[e])}async handleSwitchChain(t){var e,s;let n=t.request.params?(e=t.request.params[0])==null?void 0:e.chainId:"0x0";n=n.startsWith("0x")?n:`0x${n}`;const a=parseInt(n,16);if(this.isChainApproved(a))this.setDefaultChain(`${a}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:t.topic,request:{method:t.request.method,params:[{chainId:n}]},chainId:(s=this.namespace.chains)==null?void 0:s[0]}),this.setDefaultChain(`${a}`);else throw new Error(`Failed to switch to chain 'eip155:${a}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(t){return this.namespace.chains.includes(`${this.name}:${t}`)}async getCapabilities(t){var e,s,n,a,r;const o=(s=(e=t.request)==null?void 0:e.params)==null?void 0:s[0],c=((a=(n=t.request)==null?void 0:n.params)==null?void 0:a[1])||[];if(!o)throw new Error("Missing address parameter in `wallet_getCapabilities` request");const u=this.client.session.get(t.topic),l=((r=u==null?void 0:u.sessionProperties)==null?void 0:r.capabilities)||{},h=`${o}${c.join(",")}`,w=l==null?void 0:l[h];if(w)return w;let d;try{d=Ue(u,o,c)}catch(L){console.warn("Failed to extract capabilities from session",L)}if(d)return d;const at=await this.client.request(t);try{await this.client.session.update(t.topic,{sessionProperties:Q(Y({},u.sessionProperties||{}),{capabilities:Q(Y({},l||{}),{[h]:at})})})}catch(L){console.warn("Failed to update session with capabilities",L)}return at}async getCallStatus(t){var e,s,n;const a=this.client.session.get(t.topic),r=(e=a.sessionProperties)==null?void 0:e.bundler_name;if(r){const u=this.getBundlerUrl(t.chainId,r);try{return await this.getUserOperationReceipt(u,t)}catch(l){console.warn("Failed to fetch call status from bundler",l,u)}}const o=(s=a.sessionProperties)==null?void 0:s.bundler_url;if(o)try{return await this.getUserOperationReceipt(o,t)}catch(u){console.warn("Failed to fetch call status from custom bundler",u,o)}const c=await Ze({resultId:(n=t.request.params)==null?void 0:n[0],storage:this.storage});if(c)try{return await We(c,this.getHttpProvider.bind(this))}catch(u){console.warn("Failed to fetch call status from stored send calls",u,c)}if(this.namespace.methods.includes(t.request.method))return await this.client.request(t);throw new Error("Fetching call status not approved by the wallet.")}async getUserOperationReceipt(t,e){var s;const n=new URL(t),a=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Et("eth_getUserOperationReceipt",[(s=e.request.params)==null?void 0:s[0]]))});if(!a.ok)throw new Error(`Failed to fetch user operation receipt - ${a.status}`);return await a.json()}getBundlerUrl(t,e){return`${Wt}?projectId=${this.client.core.projectId}&chainId=${t}&bundler=${e}`}async sendCalls(t){var e,s,n;const a=await this.client.request(t),r=(e=t.request.params)==null?void 0:e[0],o=a==null?void 0:a.id,c=(a==null?void 0:a.capabilities)||{},u=(s=c==null?void 0:c.caip345)==null?void 0:s.caip2,l=(n=c==null?void 0:c.caip345)==null?void 0:n.transactionHashes;return!o||!u||!(l!=null&&l.length)||await Qe({sendCalls:{request:r,result:a},storage:this.storage}),a}}var hi=Object.defineProperty,pi=(i,t,e)=>t in i?hi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,O=(i,t,e)=>pi(i,typeof t!="symbol"?t+"":t,e);class ui{constructor(t){O(this,"name","solana"),O(this,"client"),O(this,"httpProviders"),O(this,"events"),O(this,"namespace"),O(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=I(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var li=Object.defineProperty,di=(i,t,e)=>t in i?li(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,j=(i,t,e)=>di(i,typeof t!="symbol"?t+"":t,e);class fi{constructor(t){j(this,"name","cosmos"),j(this,"client"),j(this,"httpProviders"),j(this,"events"),j(this,"namespace"),j(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=I(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var mi=Object.defineProperty,vi=(i,t,e)=>t in i?mi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,H=(i,t,e)=>vi(i,typeof t!="symbol"?t+"":t,e);class gi{constructor(t){H(this,"name","algorand"),H(this,"client"),H(this,"httpProviders"),H(this,"events"),H(this,"namespace"),H(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){if(!this.httpProviders[t]){const s=e||f(`${this.name}:${t}`,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;t[e]=this.createHttpProvider(e,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);return typeof s>"u"?void 0:new g(new P(s,p("disableProviderPing")))}}var Pi=Object.defineProperty,wi=(i,t,e)=>t in i?Pi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,$=(i,t,e)=>wi(i,typeof t!="symbol"?t+"":t,e);class bi{constructor(t){$(this,"name","cip34"),$(this,"client"),$(this,"httpProviders"),$(this,"events"),$(this,"namespace"),$(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{const s=this.getCardanoRPCUrl(e),n=I(e);t[n]=this.createHttpProvider(n,s)}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}getCardanoRPCUrl(t){const e=this.namespace.rpcMap;if(e)return e[t]}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||this.getCardanoRPCUrl(t);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var yi=Object.defineProperty,Ii=(i,t,e)=>t in i?yi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,A=(i,t,e)=>Ii(i,typeof t!="symbol"?t+"":t,e);class Ci{constructor(t){A(this,"name","elrond"),A(this,"client"),A(this,"httpProviders"),A(this,"events"),A(this,"namespace"),A(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=I(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var Oi=Object.defineProperty,ji=(i,t,e)=>t in i?Oi(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,E=(i,t,e)=>ji(i,typeof t!="symbol"?t+"":t,e);class Hi{constructor(t){E(this,"name","multiversx"),E(this,"client"),E(this,"httpProviders"),E(this,"events"),E(this,"namespace"),E(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;const n=I(e);t[n]=this.createHttpProvider(n,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var $i=Object.defineProperty,Ai=(i,t,e)=>t in i?$i(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,S=(i,t,e)=>Ai(i,typeof t!="symbol"?t+"":t,e);class Ei{constructor(t){S(this,"name","near"),S(this,"client"),S(this,"httpProviders"),S(this,"events"),S(this,"namespace"),S(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){if(this.chainId=t,!this.httpProviders[t]){const s=e||f(`${this.name}:${t}`,this.namespace);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{var s;t[e]=this.createHttpProvider(e,(s=this.namespace.rpcMap)==null?void 0:s[e])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace);return typeof s>"u"?void 0:new g(new P(s,p("disableProviderPing")))}}var Si=Object.defineProperty,qi=(i,t,e)=>t in i?Si(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,q=(i,t,e)=>qi(i,typeof t!="symbol"?t+"":t,e);class Ni{constructor(t){q(this,"name","tezos"),q(this,"client"),q(this,"httpProviders"),q(this,"events"),q(this,"namespace"),q(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){if(this.chainId=t,!this.httpProviders[t]){const s=e||f(`${this.name}:${t}`,this.namespace);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(e=>{t[e]=this.createHttpProvider(e)}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace);return typeof s>"u"?void 0:new g(new P(s))}}var Di=Object.defineProperty,_i=(i,t,e)=>t in i?Di(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,N=(i,t,e)=>_i(i,typeof t!="symbol"?t+"":t,e);class Fi{constructor(t){N(this,"name",qt),N(this,"client"),N(this,"httpProviders"),N(this,"events"),N(this,"namespace"),N(this,"chainId"),this.namespace=t.namespace,this.events=p("events"),this.client=p("client"),this.chainId=this.getDefaultChain(),this.name=this.getNamespaceName(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace.chains=[...new Set((this.namespace.chains||[]).concat(t.chains||[]))],this.namespace.accounts=[...new Set((this.namespace.accounts||[]).concat(t.accounts||[]))],this.namespace.methods=[...new Set((this.namespace.methods||[]).concat(t.methods||[]))],this.namespace.events=[...new Set((this.namespace.events||[]).concat(t.events||[]))],this.httpProviders=this.createHttpProviders()}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider(t.chainId).request(t.request)}setDefaultChain(t,e){this.httpProviders[t]||this.setHttpProvider(t,e),this.chainId=t,this.events.emit(v.DEFAULT_CHAIN_CHANGED,`${this.name}:${t}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getNamespaceName(){const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return B(t).namespace}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){var t,e;const s={};return(e=(t=this.namespace)==null?void 0:t.accounts)==null||e.forEach(n=>{const a=B(n);s[a.reference]=this.createHttpProvider(n)}),s}getHttpProvider(t){const e=this.httpProviders[t];if(typeof e>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return e}setHttpProvider(t,e){const s=this.createHttpProvider(t,e);s&&(this.httpProviders[t]=s)}createHttpProvider(t,e){const s=e||f(t,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);return new g(new P(s,p("disableProviderPing")))}}var Ri=Object.defineProperty,xi=Object.defineProperties,Ui=Object.getOwnPropertyDescriptors,Ht=Object.getOwnPropertySymbols,ki=Object.prototype.hasOwnProperty,Ti=Object.prototype.propertyIsEnumerable,et=(i,t,e)=>t in i?Ri(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,T=(i,t)=>{for(var e in t||(t={}))ki.call(t,e)&&et(i,e,t[e]);if(Ht)for(var e of Ht(t))Ti.call(t,e)&&et(i,e,t[e]);return i},X=(i,t)=>xi(i,Ui(t)),m=(i,t,e)=>et(i,typeof t!="symbol"?t+"":t,e);class nt{constructor(t){m(this,"client"),m(this,"namespaces"),m(this,"optionalNamespaces"),m(this,"sessionProperties"),m(this,"scopedProperties"),m(this,"events",new zt),m(this,"rpcProviders",{}),m(this,"session"),m(this,"providerOpts"),m(this,"logger"),m(this,"uri"),m(this,"disableProviderPing",!1),this.providerOpts=t,this.logger=typeof(t==null?void 0:t.logger)<"u"&&typeof(t==null?void 0:t.logger)!="string"?t.logger:Tt(Mt({level:(t==null?void 0:t.logger)||ct})),this.disableProviderPing=(t==null?void 0:t.disableProviderPing)||!1}static async init(t){const e=new nt(t);return await e.initialize(),e}async request(t,e,s){const[n,a]=this.validateChain(e);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(n).request({request:T({},t),chainId:`${n}:${a}`,topic:this.session.topic,expiry:s})}sendAsync(t,e,s,n){const a=new Date().getTime();this.request(t,s,n).then(r=>e(null,Jt(a,r))).catch(r=>e(r,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties,scopedProperties:this.scopedProperties}),await this.requestAccounts()}async disconnect(){var t;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(t=this.session)==null?void 0:t.topic,reason:ot("USER_DISCONNECTED")}),await this.cleanup()}async connect(t){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(t),this.cleanupPendingPairings(),!t.skipPairing)return await this.pair(t.pairingTopic)}async authenticate(t,e){if(!this.client)throw new Error("Sign Client not initialized");this.setNamespaces(t),await this.cleanupPendingPairings();const{uri:s,response:n}=await this.client.authenticate(t,e);s&&(this.uri=s,this.events.emit("display_uri",s));const a=await n();if(this.session=a.session,this.session){const r=gt(this.session.namespaces);this.namespaces=k(this.namespaces,r),await this.persist("namespaces",this.namespaces),this.onConnect()}return a}on(t,e){this.events.on(t,e)}once(t,e){this.events.once(t,e)}removeListener(t,e){this.events.removeListener(t,e)}off(t,e){this.events.off(t,e)}get isWalletConnect(){return!0}async pair(t){const{uri:e,approval:s}=await this.client.connect({pairingTopic:t,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties,scopedProperties:this.scopedProperties});e&&(this.uri=e,this.events.emit("display_uri",e));const n=await s();this.session=n;const a=gt(n.namespaces);return this.namespaces=k(this.namespaces,a),await this.persist("namespaces",this.namespaces),await this.persist("optionalNamespaces",this.optionalNamespaces),this.onConnect(),this.session}setDefaultChain(t,e){try{if(!this.session)return;const[s,n]=this.validateChain(t);this.getProvider(s).setDefaultChain(n,e)}catch(s){if(!/Please call connect/.test(s.message))throw s}}async cleanupPendingPairings(t={}){try{this.logger.info("Cleaning up inactive pairings...");const e=this.client.pairing.getAll();if(!J(e))return;for(const s of e)t.deletePairings?this.client.core.expirer.set(s.topic,0):await this.client.core.relayer.subscriber.unsubscribe(s.topic);this.logger.info(`Inactive pairings cleared: ${e.length}`)}catch(e){this.logger.warn("Failed to cleanup pending pairings",e)}}abortPairingAttempt(){this.logger.warn("abortPairingAttempt is deprecated. This is now a no-op.")}async checkStorage(){this.namespaces=await this.getFromStore("namespaces")||{},this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.session&&this.createProviders()}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){var t,e;if(this.client=this.providerOpts.client||await Bt.init({core:this.providerOpts.core,logger:this.providerOpts.logger||ct,relayUrl:this.providerOpts.relayUrl||Gt,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name,customStoragePrefix:this.providerOpts.customStoragePrefix,telemetryEnabled:this.providerOpts.telemetryEnabled}),this.providerOpts.session)try{this.session=this.client.session.get(this.providerOpts.session.topic)}catch(s){throw this.logger.error("Failed to get session",s),new Error(`The provided session: ${(e=(t=this.providerOpts)==null?void 0:t.session)==null?void 0:e.topic} doesn't exist in the Sign client`)}else{const s=this.client.session.getAll();this.session=s[0]}this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const t=[...new Set(Object.keys(this.session.namespaces).map(e=>F(e)))];V("client",this.client),V("events",this.events),V("disableProviderPing",this.disableProviderPing),t.forEach(e=>{if(!this.session)return;const s=Se(e,this.session);if((s==null?void 0:s.length)===0)return;const n=Ut(s),a=k(this.namespaces,this.optionalNamespaces),r=X(T({},a[e]),{accounts:s,chains:n});switch(e){case"eip155":this.rpcProviders[e]=new ci({namespace:r});break;case"algorand":this.rpcProviders[e]=new gi({namespace:r});break;case"solana":this.rpcProviders[e]=new ui({namespace:r});break;case"cosmos":this.rpcProviders[e]=new fi({namespace:r});break;case"polkadot":this.rpcProviders[e]=new ii({namespace:r});break;case"cip34":this.rpcProviders[e]=new bi({namespace:r});break;case"elrond":this.rpcProviders[e]=new Ci({namespace:r});break;case"multiversx":this.rpcProviders[e]=new Hi({namespace:r});break;case"near":this.rpcProviders[e]=new Ei({namespace:r});break;case"tezos":this.rpcProviders[e]=new Ni({namespace:r});break;default:this.rpcProviders[e]=new Fi({namespace:r})}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",t=>{var e;const{topic:s}=t;s===((e=this.session)==null?void 0:e.topic)&&this.events.emit("session_ping",t)}),this.client.on("session_event",t=>{var e;const{params:s,topic:n}=t;if(n!==((e=this.session)==null?void 0:e.topic))return;const{event:a}=s;if(a.name==="accountsChanged"){const r=a.data;r&&J(r)&&this.events.emit("accountsChanged",r.map(vt))}else if(a.name==="chainChanged"){const r=s.chainId,o=s.event.data,c=F(r),u=G(r)!==G(o)?`${c}:${G(o)}`:r;this.onChainChanged(u)}else this.events.emit(a.name,a.data);this.events.emit("session_event",t)}),this.client.on("session_update",({topic:t,params:e})=>{var s,n;if(t!==((s=this.session)==null?void 0:s.topic))return;const{namespaces:a}=e,r=(n=this.client)==null?void 0:n.session.get(t);this.session=X(T({},r),{namespaces:a}),this.onSessionUpdate(),this.events.emit("session_update",{topic:t,params:e})}),this.client.on("session_delete",async t=>{var e;t.topic===((e=this.session)==null?void 0:e.topic)&&(await this.cleanup(),this.events.emit("session_delete",t),this.events.emit("disconnect",X(T({},ot("USER_DISCONNECTED")),{data:t.topic})))}),this.on(v.DEFAULT_CHAIN_CHANGED,t=>{this.onChainChanged(t,!0)})}getProvider(t){return this.rpcProviders[t]||this.rpcProviders[qt]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(t=>{var e;this.getProvider(t).updateNamespace((e=this.session)==null?void 0:e.namespaces[t])})}setNamespaces(t){const{namespaces:e={},optionalNamespaces:s={},sessionProperties:n,scopedProperties:a}=t;this.optionalNamespaces=k(e,s),this.sessionProperties=n,this.scopedProperties=a}validateChain(t){const[e,s]=(t==null?void 0:t.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[e,s];if(e&&!Object.keys(this.namespaces||{}).map(r=>F(r)).includes(e))throw new Error(`Namespace '${e}' is not configured. Please call connect() first with namespace config.`);if(e&&s)return[e,s];const n=F(Object.keys(this.namespaces)[0]),a=this.rpcProviders[n].getDefaultChain();return[n,a]}async requestAccounts(){const[t]=this.validateChain();return await this.getProvider(t).requestAccounts()}async onChainChanged(t,e=!1){if(!this.namespaces)return;const[s,n]=this.validateChain(t);if(!n)return;this.updateNamespaceChain(s,n);const a=this.getProvider(s).getDefaultChain();e?(this.events.emit("chainChanged",n),this.emitAccountsChangedOnChainChange({namespace:s,previousChainId:a,newChainId:t})):this.getProvider(s).setDefaultChain(n),await this.persist("namespaces",this.namespaces)}emitAccountsChangedOnChainChange({namespace:t,previousChainId:e,newChainId:s}){var n,a;try{if(e===s)return;const r=(a=(n=this.session)==null?void 0:n.namespaces[t])==null?void 0:a.accounts;if(!r)return;const o=r.filter(c=>c.includes(`${s}:`)).map(vt);if(!J(o))return;this.events.emit("accountsChanged",o)}catch(r){this.logger.warn("Failed to emit accountsChanged on chain change",r)}}updateNamespaceChain(t,e){if(!this.namespaces)return;const s=this.namespaces[t]?t:`${t}:${e}`,n={chains:[],methods:[],events:[],defaultChain:e};this.namespaces[s]?this.namespaces[s]&&(this.namespaces[s].defaultChain=e):this.namespaces[s]=n}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,await this.deleteFromStore("namespaces"),await this.deleteFromStore("optionalNamespaces"),await this.deleteFromStore("sessionProperties"),this.session=void 0,this.cleanupPendingPairings({deletePairings:!0}),await this.cleanupStorage()}async persist(t,e){var s;const n=((s=this.session)==null?void 0:s.topic)||"";await this.client.core.storage.setItem(`${x}/${t}${n}`,e)}async getFromStore(t){var e;const s=((e=this.session)==null?void 0:e.topic)||"";return await this.client.core.storage.getItem(`${x}/${t}${s}`)}async deleteFromStore(t){var e;const s=((e=this.session)==null?void 0:e.topic)||"";await this.client.core.storage.removeItem(`${x}/${t}${s}`)}async cleanupStorage(){var t;try{if(((t=this.client)==null?void 0:t.session.length)>0)return;const e=await this.client.core.storage.getKeys();for(const s of e)s.startsWith(x)&&await this.client.core.storage.removeItem(s)}catch(e){this.logger.warn("Failed to cleanup storage",e)}}}const ws=nt;export{ws as UniversalProvider,nt as default};
2
+ //# sourceMappingURL=index.es-DTIR3PFi.js.map
@@ -1,2 +1,2 @@
1
- import{e as v}from"./index-9AH47OiK.js";import{o}from"./browser-ponyfill-cZkQn4gz.js";import{i as a,s as l,a as u,f as y,p as b}from"./index-Cx07-hgn.js";import"./index-Cyu7VCzw.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="eb2f6c4c-2a8f-4864-8561-f760a17d334a",s._sentryDebugIdIdentifier="sentry-dbid-eb2f6c4c-2a8f-4864-8561-f760a17d334a")}catch{}})();var m=Object.defineProperty,w=Object.defineProperties,P=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,c=(s,e,t)=>e in s?m(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,f=(s,e)=>{for(var t in e||(e={}))E.call(e,t)&&c(s,t,e[t]);if(h)for(var t of h(e))O.call(e,t)&&c(s,t,e[t]);return s},d=(s,e)=>w(s,P(e));const L={Accept:"application/json","Content-Type":"application/json"},j="POST",p={headers:L,method:j},g=10;class M{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new v.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=l(e),r=await(await o(this.url,d(f({},p),{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=l({id:1,jsonrpc:"2.0",method:"test",params:[]});await o(e,d(f({},p),{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=y(e,i);this.events.emit("payload",n)}parseError(e,t=this.url){return b(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>g&&this.events.setMaxListeners(g)}}export{M as f};
2
- //# sourceMappingURL=index.es-kX0u41uY.js.map
1
+ import{e as v}from"./index-CEosqueA.js";import{o}from"./browser-ponyfill-DjCvoPa9.js";import{i as a,s as l,a as b,f as u,p as y}from"./index-Be5CQ9Ek.js";import"./index-CS-Fo7Dd.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="557987a5-0f95-4a61-9bd0-78ce817b237d",s._sentryDebugIdIdentifier="sentry-dbid-557987a5-0f95-4a61-9bd0-78ce817b237d")}catch{}})();var m=Object.defineProperty,w=Object.defineProperties,P=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,c=(s,e,t)=>e in s?m(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,d=(s,e)=>{for(var t in e||(e={}))E.call(e,t)&&c(s,t,e[t]);if(h)for(var t of h(e))O.call(e,t)&&c(s,t,e[t]);return s},p=(s,e)=>w(s,P(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 v.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=l(e),r=await(await o(this.url,p(d({},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=l({id:1,jsonrpc:"2.0",method:"test",params:[]});await o(e,p(d({},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"?b(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const r=this.parseError(t),i=r.message||r.toString(),n=u(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};
2
+ //# sourceMappingURL=index.es-DvYgO4WC.js.map
@@ -1,4 +1,4 @@
1
- import{w as d}from"./lit-element-wjYUA6aF.js";(function(){try{var C=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new C.Error().stack;e&&(C._sentryDebugIds=C._sentryDebugIds||{},C._sentryDebugIds[e]="11d2ffee-25de-42eb-9daf-b8ae35539648",C._sentryDebugIdIdentifier="sentry-dbid-11d2ffee-25de-42eb-9daf-b8ae35539648")}catch{}})();const f=d`<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
1
+ import{w as n}from"./lit-element-wjYUA6aF.js";(function(){try{var C=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new C.Error().stack;e&&(C._sentryDebugIds=C._sentryDebugIds||{},C._sentryDebugIds[e]="aed13b92-7105-4e9e-99fb-ae0e584cda4a",C._sentryDebugIdIdentifier="sentry-dbid-aed13b92-7105-4e9e-99fb-ae0e584cda4a")}catch{}})();const o=n`<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
2
2
  <path d="M9.125 6.875C9.125 6.57833 9.21298 6.28832 9.3778 6.04165C9.54262 5.79497 9.77689 5.60271 10.051 5.48918C10.3251 5.37565 10.6267 5.34594 10.9176 5.40382C11.2086 5.4617 11.4759 5.60456 11.6857 5.81434C11.8954 6.02412 12.0383 6.29139 12.0962 6.58236C12.1541 6.87334 12.1244 7.17494 12.0108 7.44903C11.8973 7.72311 11.705 7.95738 11.4584 8.1222C11.2117 8.28703 10.9217 8.375 10.625 8.375C10.2272 8.375 9.84565 8.21696 9.56434 7.93566C9.28304 7.65436 9.125 7.27282 9.125 6.875ZM21.125 11C21.125 13.0025 20.5312 14.9601 19.4186 16.6251C18.3061 18.2902 16.7248 19.5879 14.8747 20.3543C13.0246 21.1206 10.9888 21.3211 9.02471 20.9305C7.06066 20.5398 5.25656 19.5755 3.84055 18.1595C2.42454 16.7435 1.46023 14.9393 1.06955 12.9753C0.678878 11.0112 0.879387 8.97543 1.64572 7.12533C2.41206 5.27523 3.70981 3.69392 5.37486 2.58137C7.0399 1.46882 8.99747 0.875 11 0.875C13.6844 0.877978 16.258 1.94567 18.1562 3.84383C20.0543 5.74199 21.122 8.3156 21.125 11ZM18.875 11C18.875 9.44247 18.4131 7.91992 17.5478 6.62488C16.6825 5.32985 15.4526 4.32049 14.0136 3.72445C12.5747 3.12841 10.9913 2.97246 9.46367 3.27632C7.93607 3.58017 6.53288 4.3302 5.43154 5.43153C4.3302 6.53287 3.58018 7.93606 3.27632 9.46366C2.97246 10.9913 3.12841 12.5747 3.72445 14.0136C4.32049 15.4526 5.32985 16.6825 6.62489 17.5478C7.91993 18.4131 9.44248 18.875 11 18.875C13.0879 18.8728 15.0896 18.0424 16.566 16.566C18.0424 15.0896 18.8728 13.0879 18.875 11ZM12.125 14.4387V11.375C12.125 10.8777 11.9275 10.4008 11.5758 10.0492C11.2242 9.69754 10.7473 9.5 10.25 9.5C9.98433 9.4996 9.72708 9.59325 9.52383 9.76435C9.32058 9.93544 9.18444 10.173 9.13952 10.4348C9.09461 10.6967 9.14381 10.966 9.27843 11.195C9.41304 11.4241 9.62438 11.5981 9.875 11.6863V14.75C9.875 15.2473 10.0725 15.7242 10.4242 16.0758C10.7758 16.4275 11.2527 16.625 11.75 16.625C12.0157 16.6254 12.2729 16.5318 12.4762 16.3607C12.6794 16.1896 12.8156 15.952 12.8605 15.6902C12.9054 15.4283 12.8562 15.159 12.7216 14.93C12.587 14.7009 12.3756 14.5269 12.125 14.4387Z" fill="currentColor"/>
3
- </svg>`;export{f as infoSvg};
4
- //# sourceMappingURL=info-Dsmi8VWW.js.map
3
+ </svg>`;export{o as infoSvg};
4
+ //# sourceMappingURL=info-B91xCNqh.js.map
@@ -0,0 +1,13 @@
1
+ import{w as d}from"./lit-element-wjYUA6aF.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a9afbe47-f280-40aa-b5b5-416be5b73abd",e._sentryDebugIdIdentifier="sentry-dbid-a9afbe47-f280-40aa-b5b5-416be5b73abd")}catch{}})();const o=d`<svg fill="none" viewBox="0 0 14 15">
2
+ <path
3
+ fill="currentColor"
4
+ d="M6 10.49a1 1 0 1 0 2 0v-2a1 1 0 0 0-2 0v2ZM7 4.49a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"
5
+ />
6
+ <path
7
+ fill="currentColor"
8
+ fill-rule="evenodd"
9
+ d="M7 14.99a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm5-7a5 5 0 1 1-10 0 5 5 0 0 1 10 0Z"
10
+ clip-rule="evenodd"
11
+ />
12
+ </svg>`;export{o as infoCircleSvg};
13
+ //# sourceMappingURL=info-circle-DtEY-DDD.js.map
@@ -0,0 +1,2 @@
1
+ (function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1bbd7bee-7b93-46f5-994e-9c6590ef5b32",e._sentryDebugIdIdentifier="sentry-dbid-1bbd7bee-7b93-46f5-994e-9c6590ef5b32")}catch{}})();const o="https://cdn.decentraland.org/@dcl/shop/1.16.1-36009595531.commit-94584a5/_assets/collections-empty-5cIoxSYD.svg",s="data:image/svg+xml,%3csvg%20width='138'%20height='138'%20viewBox='0%200%20138%20138'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M100.208%2082.875V69.5C100.208%2062.4055%2097.3894%2055.6015%2092.3728%2050.5849C87.3562%2045.5683%2080.5522%2042.75%2073.4577%2042.75H60.0827V38.2917C60.0827%2035.9268%2061.0221%2033.6588%2062.6943%2031.9866C64.3665%2030.3144%2066.6345%2029.375%2068.9994%2029.375C71.3642%2029.375%2073.6322%2030.3144%2075.3044%2031.9866C76.9766%2033.6588%2077.916%2035.9268%2077.916%2038.2917V42.75M99.6326%20100.138C98.7987%20102.883%2097.1042%20105.287%2094.7994%20106.995C92.4946%20108.704%2089.7016%20109.626%2086.8327%20109.625H51.166C47.6188%20109.625%2044.2168%20108.216%2041.7085%20105.708C39.2002%20103.199%2037.791%2099.7973%2037.791%2096.25V69.5C37.7875%2065.4555%2038.7026%2061.4631%2040.4673%2057.8239C42.2321%2054.1848%2044.8003%2050.994%2047.9783%2048.4923'%20stroke='url(%23paint0_linear_1565_322568)'%20stroke-width='8.91667'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M55.625%20109.625V91.7917C55.625%2089.4268%2056.5644%2087.1588%2058.2366%2085.4866C59.9088%2083.8144%2062.1768%2082.875%2064.5417%2082.875H73.4583C75.8232%2082.875%2078.0912%2083.8144%2079.7634%2085.4866C81.4356%2087.1588%2082.375%2089.4268%2082.375%2091.7917V109.625M28.875%2029.375L109.125%20109.625'%20stroke='url(%23paint1_linear_1565_322568)'%20stroke-width='8.91667'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_1565_322568'%20x1='35.8244'%20y1='69.5051'%20x2='146.296'%20y2='61.4101'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_1565_322568'%20x1='26.3464'%20y1='69.5051'%20x2='167.888'%20y2='56.17'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e";export{o as c,s as i};
2
+ //# sourceMappingURL=items-empty-Cr9cPS1Z.js.map
@@ -0,0 +1,2 @@
1
+ import{l as u}from"./hooks.module-54Oj1-WJ.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="7c693ce2-e7f8-4627-992a-378db9fc0c14",e._sentryDebugIdIdentifier="sentry-dbid-7c693ce2-e7f8-4627-992a-378db9fc0c14")}catch{}})();var l=0;function a(e,n,_,t,c,i){n||(n={});var r,f,o=n;"ref"in n&&(r=n.ref,delete n.ref);var d={type:e,props:o,key:_,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--l,__i:-1,__u:0,__source:c,__self:i};if(typeof e=="function"&&(r=e.defaultProps))for(f in r)o[f]===void 0&&(o[f]=r[f]);return u.vnode&&u.vnode(d),d}export{a as u};
2
+ //# sourceMappingURL=jsxRuntime.module-BUzu5v1_.js.map
@@ -1,2 +1,2 @@
1
- import{j as t}from"./react-COwX0Zlk.js";import{c as i}from"./index-BRNshUaV.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3c984330-6e53-4d15-b071-a83ae228044c",e._sentryDebugIdIdentifier="sentry-dbid-3c984330-6e53-4d15-b071-a83ae228044c")}catch{}})();function a(e){return t.jsxs("svg",{viewBox:"0 0 32 32",width:"32",height:"32",fill:"none","aria-hidden":!0,...e,children:[t.jsx("rect",{width:"32.0012",height:"32.0012",rx:"8",fill:"#FF2D55"}),t.jsx("rect",{x:"1.2632",y:"1.2632",width:"29.4748",height:"29.4748",rx:"6.7368",stroke:"#FCFCFC",strokeOpacity:"0.5",strokeWidth:"2.52641"}),t.jsx("path",{d:"M27.3021 14.4254L19.4245 6.55186C18.0203 5.14831 15.657 6.14106 15.657 8.12658V10.7283C15.5885 10.7283 15.5543 10.7283 15.4858 10.7283H8.01351C6.74626 10.7283 5.71875 11.721 5.71875 12.9877V18.9784C5.71875 20.2451 6.74626 21.272 8.01351 21.272H15.4515C15.52 21.272 15.5543 21.272 15.6228 21.272V23.8738C15.6228 25.8593 18.0203 26.852 19.3903 25.4485L27.2678 17.5749C28.1583 16.6848 28.1583 15.2813 27.3021 14.4254Z",fill:"#FCFCFC"})]})}const c=i.chainId===80002?"https://decentraland.zone/jump":"https://decentraland.org/jump";function u(e){var r;const n=(r=e.find(d=>d.urn))==null?void 0:r.urn;return`decentraland://open?iap_enabled=true${n?`&urn=${encodeURIComponent(n)}`:""}`}export{c as J,a,u as b};
2
- //# sourceMappingURL=jump-Xu9XuIAg.js.map
1
+ import{j as t}from"./react-xTOg_zXI.js";import{c as i}from"./index-x3_oOTlT.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3c984330-6e53-4d15-b071-a83ae228044c",e._sentryDebugIdIdentifier="sentry-dbid-3c984330-6e53-4d15-b071-a83ae228044c")}catch{}})();function a(e){return t.jsxs("svg",{viewBox:"0 0 32 32",width:"32",height:"32",fill:"none","aria-hidden":!0,...e,children:[t.jsx("rect",{width:"32.0012",height:"32.0012",rx:"8",fill:"#FF2D55"}),t.jsx("rect",{x:"1.2632",y:"1.2632",width:"29.4748",height:"29.4748",rx:"6.7368",stroke:"#FCFCFC",strokeOpacity:"0.5",strokeWidth:"2.52641"}),t.jsx("path",{d:"M27.3021 14.4254L19.4245 6.55186C18.0203 5.14831 15.657 6.14106 15.657 8.12658V10.7283C15.5885 10.7283 15.5543 10.7283 15.4858 10.7283H8.01351C6.74626 10.7283 5.71875 11.721 5.71875 12.9877V18.9784C5.71875 20.2451 6.74626 21.272 8.01351 21.272H15.4515C15.52 21.272 15.5543 21.272 15.6228 21.272V23.8738C15.6228 25.8593 18.0203 26.852 19.3903 25.4485L27.2678 17.5749C28.1583 16.6848 28.1583 15.2813 27.3021 14.4254Z",fill:"#FCFCFC"})]})}const c=i.chainId===80002?"https://decentraland.zone/jump":"https://decentraland.org/jump";function u(e){var r;const n=(r=e.find(d=>d.urn))==null?void 0:r.urn;return`decentraland://open?iap_enabled=true${n?`&urn=${encodeURIComponent(n)}`:""}`}export{c as J,a,u as b};
2
+ //# sourceMappingURL=jump-Bl1mTmWC.js.map
@@ -1,4 +1,4 @@
1
- import{w as d}from"./lit-element-wjYUA6aF.js";(function(){try{var C=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new C.Error().stack;e&&(C._sentryDebugIds=C._sentryDebugIds||{},C._sentryDebugIds[e]="670dfa46-326c-45b6-82a3-279f0a0d1487",C._sentryDebugIdIdentifier="sentry-dbid-670dfa46-326c-45b6-82a3-279f0a0d1487")}catch{}})();const f=d`<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
1
+ import{w as f}from"./lit-element-wjYUA6aF.js";(function(){try{var C=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new C.Error().stack;e&&(C._sentryDebugIds=C._sentryDebugIds||{},C._sentryDebugIds[e]="2fa27afe-8650-4cf1-9c7b-f7feedbe9995",C._sentryDebugIdIdentifier="sentry-dbid-2fa27afe-8650-4cf1-9c7b-f7feedbe9995")}catch{}})();const t=f`<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
2
2
  <path fill-rule="evenodd" clip-rule="evenodd" d="M5.00177 1.78569C3.8179 1.78569 2.85819 2.74508 2.85819 3.92855C2.85819 4.52287 3.09928 5.05956 3.49077 5.4485L3.5005 5.45817C3.64381 5.60054 3.76515 5.72108 3.85631 5.81845C3.93747 5.90512 4.05255 6.03218 4.12889 6.1805C4.16999 6.26034 4.19 6.30843 4.21768 6.39385C4.22145 6.40546 4.22499 6.41703 4.22833 6.42855H5.77521C5.77854 6.41703 5.78208 6.40547 5.78585 6.39385C5.81353 6.30843 5.83354 6.26034 5.87464 6.1805C5.95098 6.03218 6.06606 5.90512 6.14722 5.81845C6.23839 5.72108 6.35973 5.60053 6.50304 5.45816L6.51276 5.4485C6.90425 5.05956 7.14534 4.52287 7.14534 3.92855C7.14534 2.74508 6.18563 1.78569 5.00177 1.78569ZM5.71629 7.85712H4.28724C4.28724 8.21403 4.28876 8.40985 4.30703 8.54571C4.30727 8.54748 4.30751 8.54921 4.30774 8.55091C4.30944 8.55115 4.31118 8.55138 4.31295 8.55162C4.44884 8.56989 4.64474 8.5714 5.00177 8.5714C5.3588 8.5714 5.55469 8.56989 5.69059 8.55162C5.69236 8.55138 5.69409 8.55115 5.69579 8.55091C5.69603 8.54921 5.69627 8.54748 5.6965 8.54571C5.71477 8.40985 5.71629 8.21403 5.71629 7.85712ZM2.85819 7.14283C2.85819 6.9948 2.85796 6.91114 2.8548 6.85032C2.85461 6.84656 2.85441 6.84309 2.85421 6.83988C2.84393 6.8282 2.83047 6.81334 2.81301 6.79469C2.74172 6.71856 2.63908 6.61643 2.48342 6.46178C1.83307 5.81566 1.42914 4.91859 1.42914 3.92855C1.42914 1.9561 3.02866 0.357117 5.00177 0.357117C6.97487 0.357117 8.57439 1.9561 8.57439 3.92855C8.57439 4.91859 8.17047 5.81566 7.52012 6.46178C7.36445 6.61643 7.26182 6.71856 7.19053 6.79469C7.17306 6.81334 7.1596 6.8282 7.14932 6.83988C7.14912 6.84309 7.14892 6.84656 7.14873 6.85032C7.14557 6.91114 7.14534 6.9948 7.14534 7.14283V7.85712C7.14534 7.87009 7.14535 7.88304 7.14535 7.89598C7.14541 8.19889 7.14547 8.49326 7.11281 8.73606C7.076 9.00978 6.98631 9.32212 6.72678 9.58156C6.46726 9.841 6.15481 9.93065 5.881 9.96745C5.63813 10.0001 5.34365 10 5.04064 9.99998C5.0277 9.99998 5.01474 9.99998 5.00177 9.99998C4.98879 9.99998 4.97583 9.99998 4.96289 9.99998C4.65988 10 4.36541 10.0001 4.12253 9.96745C3.84872 9.93065 3.53628 9.841 3.27675 9.58156C3.01722 9.32212 2.92753 9.00978 2.89072 8.73606C2.85807 8.49326 2.85812 8.19889 2.85818 7.89598C2.85819 7.88304 2.85819 7.87008 2.85819 7.85712V7.14283ZM7.1243 6.86977C7.12366 6.87069 7.1233 6.87116 7.12327 6.87119C7.12323 6.87123 7.12356 6.87076 7.1243 6.86977ZM2.88027 6.8712C2.88025 6.87119 2.87988 6.8707 2.87921 6.86975C2.87995 6.87072 2.88028 6.8712 2.88027 6.8712Z" fill="#949E9E"/>
3
- </svg>`;export{f as lightbulbSvg};
4
- //# sourceMappingURL=lightbulb-B2s8QgKQ.js.map
3
+ </svg>`;export{t as lightbulbSvg};
4
+ //# sourceMappingURL=lightbulb-ByedgZqO.js.map
@@ -1,2 +1,2 @@
1
- import{v as k,p,s as h}from"./prepare-contract-call-CJg2QHZX.js";import{c as l,e as w}from"./utils-Di6UMxpb.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="80b069a1-3f34-4bda-a7e5-3c06a0ce0d73",n._sentryDebugIdIdentifier="sentry-dbid-80b069a1-3f34-4bda-a7e5-3c06a0ce0d73")}catch{}})();function y(n){const t=n.domain;return(t==null?void 0:t.chainId)!==void 0&&k(t.chainId)&&(n.domain={...n.domain,chainId:p(n.domain.chainId)}),n}async function b({client:n,ecosystem:t,tokenToLink:e,storage:r}){const d=w(n,t),c=l("inAppWallet"),s=await r.getAuthCookie();if(!s)throw new Error("Failed to link account, no user logged in");const o={Authorization:`Bearer iaw-auth-token:${s}`,"Content-Type":"application/json"},a=await d(`${c}/api/2024-05-05/account/connect`,{body:h({accountAuthTokenToConnect:e}),headers:o,method:"POST"});if(!a.ok){const u=await a.json();throw new Error(u.message||"Failed to link account.")}const{linkedAccounts:i}=await a.json();return i??[]}async function m({client:n,ecosystem:t,profileToUnlink:e,allowAccountDeletion:r=!1,storage:d}){const c=w(n,t),s=l("inAppWallet"),o=await d.getAuthCookie();if(!o)throw new Error("Failed to unlink account, no user logged in");const a={Authorization:`Bearer iaw-auth-token:${o}`,"Content-Type":"application/json"},i=await c(`${s}/api/2024-05-05/account/disconnect`,{body:h({allowAccountDeletion:r,details:e.details,type:e.type}),headers:a,method:"POST"});if(!i.ok){const f=await i.json();throw new Error(f.message||"Failed to unlink account.")}const{linkedAccounts:u}=await i.json();return u??[]}async function I({client:n,ecosystem:t,storage:e}){const r=w(n,t),d=l("inAppWallet"),c=await e.getAuthCookie();if(!c)throw new Error("Failed to get linked accounts, no user logged in");const s={Authorization:`Bearer iaw-auth-token:${c}`,"Content-Type":"application/json"},o=await r(`${d}/api/2024-05-05/accounts`,{headers:s,method:"GET"});if(!o.ok){const i=await o.json();throw new Error(i.message||"Failed to get linked accounts.")}const{linkedAccounts:a}=await o.json();return a??[]}export{I as g,b as l,y as p,m as u};
2
- //# sourceMappingURL=linkAccount-CPkzkJuG.js.map
1
+ import{v as k,p,s as h}from"./prepare-contract-call-Cd3rzK4m.js";import{c as l,e as w}from"./utils-DA456_1A.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="a49902db-b00a-4baf-8aa6-9391729aa69c",n._sentryDebugIdIdentifier="sentry-dbid-a49902db-b00a-4baf-8aa6-9391729aa69c")}catch{}})();function b(n){const t=n.domain;return(t==null?void 0:t.chainId)!==void 0&&k(t.chainId)&&(n.domain={...n.domain,chainId:p(n.domain.chainId)}),n}async function y({client:n,ecosystem:t,tokenToLink:e,storage:r}){const d=w(n,t),c=l("inAppWallet"),s=await r.getAuthCookie();if(!s)throw new Error("Failed to link account, no user logged in");const o={Authorization:`Bearer iaw-auth-token:${s}`,"Content-Type":"application/json"},a=await d(`${c}/api/2024-05-05/account/connect`,{body:h({accountAuthTokenToConnect:e}),headers:o,method:"POST"});if(!a.ok){const u=await a.json();throw new Error(u.message||"Failed to link account.")}const{linkedAccounts:i}=await a.json();return i??[]}async function m({client:n,ecosystem:t,profileToUnlink:e,allowAccountDeletion:r=!1,storage:d}){const c=w(n,t),s=l("inAppWallet"),o=await d.getAuthCookie();if(!o)throw new Error("Failed to unlink account, no user logged in");const a={Authorization:`Bearer iaw-auth-token:${o}`,"Content-Type":"application/json"},i=await c(`${s}/api/2024-05-05/account/disconnect`,{body:h({allowAccountDeletion:r,details:e.details,type:e.type}),headers:a,method:"POST"});if(!i.ok){const f=await i.json();throw new Error(f.message||"Failed to unlink account.")}const{linkedAccounts:u}=await i.json();return u??[]}async function I({client:n,ecosystem:t,storage:e}){const r=w(n,t),d=l("inAppWallet"),c=await e.getAuthCookie();if(!c)throw new Error("Failed to get linked accounts, no user logged in");const s={Authorization:`Bearer iaw-auth-token:${c}`,"Content-Type":"application/json"},o=await r(`${d}/api/2024-05-05/accounts`,{headers:s,method:"GET"});if(!o.ok){const i=await o.json();throw new Error(i.message||"Failed to get linked accounts.")}const{linkedAccounts:a}=await o.json();return a??[]}export{I as g,y as l,b as p,m as u};
2
+ //# sourceMappingURL=linkAccount-D6iv170c.js.map
@@ -1,2 +1,2 @@
1
- import{ba as w,c as p,bb as F,w as M,bc as b,bd as E,be as A,V as S,bf as P,bg as U}from"./index-BRNshUaV.js";import"./react-COwX0Zlk.js";import{d as h}from"./dcl-schemas-B-Ph0Ls4.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="76e674e7-5863-4785-8381-3687df9bf8da",e._sentryDebugIdIdentifier="sentry-dbid-76e674e7-5863-4785-8381-3687df9bf8da")}catch{}})();function v(){return p.creditsServerUrl}function D(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||void 0}catch{return}}async function x(e,r){const t=await w(`${v()}/credits/checkout`,{method:"POST",identity:r,metadata:{},headers:{"Content-Type":"application/json"},body:JSON.stringify({packId:e,timezone:D(),source:"website"})});if(!t.ok)throw new Error(`checkout ${t.status}: ${await t.text()}`);const{orderId:n,url:s}=await t.json();return{orderId:n,url:s,mock:!1}}async function L(e,r,t={}){const{intervalMs:n=1500,timeoutMs:s=6e4,signal:i}=t,o=Date.now()+s;for(;;){if(i!=null&&i.aborted)throw new DOMException("Aborted","AbortError");const c=await O(e,r,i);if(!R(c.status))return c;if(Date.now()>o)return c.status==="initiated"?c:{status:"pending"};await $(n,i)}}function R(e){return e==="processing"||e==="crediting"||e==="initiated"}async function O(e,r,t){const n=await w(`${v()}/credits/orders/${e}`,{method:"GET",identity:r,metadata:{},signal:t});if(n.status===404)return{status:"processing"};if(!n.ok)throw new Error(`order status ${n.status}`);return n.json()}function $(e,r){return new Promise((t,n)=>{const s=setTimeout(t,e);r==null||r.addEventListener("abort",()=>{clearTimeout(s),n(new DOMException("Aborted","AbortError"))})})}const B=.1,k=[{id:"pack_5",usd:5.99,credits:40},{id:"pack_10",usd:11.99,credits:100,bestValue:!0},{id:"pack_25",usd:29.99,credits:260},{id:"pack_50",usd:59.99,credits:540}];function Q(e,r){const t=r.reduce((i,o)=>o.usd<i.usd?o:i,r[0]);if(!t||t.id===e.id||!(t.usd>0))return null;const n=Math.floor(t.credits/t.usd*e.usd),s=e.credits-n;return s>0?{baseline:n,bonus:s}:null}const ee=4;function te(e,r){const t=Math.max(0,r),n=t>0?e.filter(c=>c.credits>=t):e,s=t<=0||n.length>0,i=n.length>0?n:e;if(i.length===0)return{packs:i,recommended:null,closesGap:s};const o=s?i.reduce((c,a)=>a.credits<c.credits?a:c):i.reduce((c,a)=>a.credits>c.credits?a:c);return{packs:i,recommended:o,closesGap:s}}function C(e){return e.imageUrlWebp||e.imageUrl||void 0}async function G(){const e=await fetch(`${p.creditsServerUrl}/credits/packs`);if(!e.ok)throw new Error(`credit packs ${e.status}`);const{packs:r}=await e.json();return r.slice().sort((t,n)=>(t.order??0)-(n.order??0)).map(t=>({id:t.id,usd:t.usd,credits:t.credits,...t.recommended?{bestValue:!0}:{},...C(t)?{artUrl:C(t)}:{}}))}function _(e){return k.find(r=>r.id===e)}const m="mock_cs_",N=new Set([80002,11155111,1337,31337]);function I(){const e=!p.stripePublishableKey;if(e&&!N.has(p.chainId))throw new Error(`Stripe publishable key is missing on chainId=${p.chainId}, which is not a recognized test network. Refusing to fall back to mock payments in a real-money environment — configure STRIPE_PUBLISHABLE_KEY.`);return e}async function re(e,r){const t=_(e);if(!t)throw new Error("Unknown pack");if(I())return W(t);if(!(r!=null&&r.identity))throw new Error("Sign in to get credits.");return x(e,r.identity)}async function ne(e,r={}){const{intervalMs:t,timeoutMs:n,signal:s,identity:i}=r;if(I()||e.startsWith(m))return H(e,r);if(!i)throw new Error("Sign in to get credits.");return L(e,i,{intervalMs:t,timeoutMs:n,signal:s})}function W(e){const r=`${m}${e.id}_${Date.now()}`;return T(400).then(()=>({orderId:r,clientSecret:`${m}${e.id}`,mock:!0}))}async function H(e,r={}){await T(r.intervalMs??900);const t=e.replace(m,"").replace(/_\d+$/,""),n=_(t),s=(n==null?void 0:n.credits)??0;if(r.address&&n)try{const i=await F(r.address,Math.round(n.credits*B*100));return{status:"credited",creditsGranted:s,newBalance:i.credits}}catch(i){return{status:"failed",error:i.message}}return{status:"credited",creditsGranted:s,newBalance:s}}function T(e,r){return new Promise((t,n)=>{setTimeout(t,e)})}function ie(){const{data:e,isLoading:r}=M({queryKey:["credit-packs"],queryFn:G,staleTime:3e5,retry:!1});return{packs:e??k,isLoading:r&&e===void 0}}const g=1e6,q=1;function Z(e){return e.acquisition==="store"?{kind:"store",item:{collection:e.item.contractAddress??"",itemId:String(e.item.itemId??""),priceWei:e.priceWei},chainId:e.item.chainId}:{kind:"trade",trade:e.trade,coupon:e.coupon}}function se(e){const r=!!e.item.contractAddress&&e.item.itemId!=null;return{usdPriceCents:e.usdCents,...e.acquisition==="trade"?{tradeId:e.trade.id}:{},...r?{contractAddress:e.item.contractAddress,itemId:String(e.item.itemId)}:{}}}function oe(e,r){const t=new Map;for(const n of e){const s=Z(n),i=r(s),o=t.get(i);o?(o.units.push(n),o.drafts.push(s)):t.set(i,{key:i,units:[n],drafts:[s]})}return[...t.values()]}const ce="dcl_shop_resume_cart";function y(e){return S(e)}function K(e,r){const t=e.received[0];return t?t.assetType===Number(h.TradeAssetType.USD_PEGGED_MANA)?U(t.amount):t.assetType===Number(h.TradeAssetType.ERC20)?!r||!t.amount?0:b(t.amount,r):0:0}function ae(e){return e.acquisition==="trade"?{kind:"trade",trade:e.trade,coupon:e.coupon}:{kind:"store",mint:{item:{collection:e.item.contractAddress,itemId:String(e.item.itemId),priceWei:e.priceWei},chainId:e.item.chainId}}}async function V(e,r,t,n,s,i){const o=e.tokenId?1:Math.max(1,Math.floor(e.quantity??1));if((e.acquisition??"trade")==="store"){const l=s?await s(e):null;if(!l||!n)return{status:"gone"};if(l.available<o)return{status:"gone"};const d=b(l.priceWei,n);return!Number.isFinite(d)||d<=0?{status:"no-price"}:{status:"buyable",line:{item:e,acquisition:"store",priceWei:l.priceWei,usdCents:d,priceCredits:y(d),quantity:o}}}const c=await t(e);if(!c)return{status:"gone"};if(!E(c))return{status:"gone"};if(A(c,r))return{status:"own"};const a=e.coupon?z(await(i==null?void 0:i(e)),c):void 0,u=j(K(c,n),a);return!Number.isFinite(u)||u<=0?{status:"no-price"}:{status:"buyable",line:{item:e,acquisition:"trade",trade:c,coupon:a,usdCents:u,priceCredits:y(u),quantity:o}}}function j(e,r){return!r||e<=0?e:Math.ceil(e*(g-r.discount)/g)}function z(e,r,t=Date.now()){var o,c,a;if(!e||e.discountType!==q||e.discount<=0||e.discount>=g||Number((o=e.checks)==null?void 0:o.expiration)<=t||!(Number((c=e.checks)==null?void 0:c.effective)<=t))return;const n=P(r);if(n===null||((a=e.couponManager)==null?void 0:a.toLowerCase())!==n)return;const s=r.sent??[];return s.length>0&&s.every(u=>Number(u.assetType)===Number(h.TradeAssetType.COLLECTION_ITEM))?e:void 0}async function de(e,r,t,n,s,i){const o=[],c=[],a=[];for(const d of e)try{const f=await V(d,r,t,n,s,i);f.status==="buyable"?o.push(f.line):f.status==="own"?a.push(d):c.push(d)}catch{c.push(d)}const u=o.reduce((d,f)=>d+f.priceCredits*f.quantity,0),l=c.length>0||a.length>0||o.some(d=>d.priceCredits!==d.item.priceCredits);return{buyable:o,unavailable:c,own:a,liveTotalCredits:u,orderChanged:l}}function ue(e){const{reservations:r,spent:t,settled:n}=e,s=[...new Set(r.filter(o=>!t.has(o.salt)).map(o=>o.salt))],i=[...new Set(r.filter(o=>n.has(o.salt)).map(o=>o.itemId))];return{toRelease:s,boughtItemIds:i}}const le="data:image/svg+xml,%3csvg%20width='61'%20height='61'%20viewBox='0%200%2061%2061'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M30.5%2061C47.3447%2061%2061%2047.3447%2061%2030.5C61%2013.6553%2047.3447%200%2030.5%200C13.6553%200%200%2013.6553%200%2030.5C0%2047.3447%2013.6553%2061%2030.5%2061Z'%20fill='url(%23gc_paint0)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.2001%2054.8997C17.2935%2058.7274%2023.6375%2060.9997%2030.5%2060.9997C37.3625%2060.9997%2043.7065%2058.7274%2048.8%2054.8997H12.2001Z'%20fill='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.10013%2048.7997C7.83863%2051.1024%209.89738%2053.1612%2012.2001%2054.8997H48.8001C51.1029%2053.1612%2053.1616%2051.1024%2054.9001%2048.7997H6.10013Z'%20fill='%23FFA25A'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M40.9158%2042.6998H2.5468C3.4923%2044.8805%204.69705%2046.924%206.10005%2048.7997H40.9311V42.6998H40.9158Z'%20fill='%23FFC95B'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M21.6094%2019.8247V42.6997H40.6719L21.6094%2019.8247Z'%20fill='url(%23gc_paint1)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.5468%2042.6997H21.6093V19.8248L2.5468%2042.6997Z'%20fill='%23FCFCFC'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M40.9158%2032.025V48.8H54.9L40.9158%2032.025Z'%20fill='url(%23gc_paint2)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M26.9467%2048.8H40.9157V32.025L26.9467%2048.8Z'%20fill='%23FCFCFC'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M40.9158%2027.4497C45.127%2027.4497%2048.5408%2024.0359%2048.5408%2019.8247C48.5408%2015.6136%2045.127%2012.1998%2040.9158%2012.1998C36.7046%2012.1998%2033.2908%2015.6136%2033.2908%2019.8247C33.2908%2024.0359%2036.7046%2027.4497%2040.9158%2027.4497Z'%20fill='%23FFC95B'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M21.6092%2015.2497C23.7148%2015.2497%2025.4217%2013.5428%2025.4217%2011.4372C25.4217%209.33166%2023.7148%207.62475%2021.6092%207.62475C19.5036%207.62475%2017.7967%209.33166%2017.7967%2011.4372C17.7967%2013.5428%2019.5036%2015.2497%2021.6092%2015.2497Z'%20fill='%23FFC95B'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='gc_paint0'%20x1='30.5'%20y1='-12.6335'%20x2='-12.6335'%20y2='30.5'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3clinearGradient%20id='gc_paint1'%20x1='21.6029'%20y1='19.8247'%20x2='21.6029'%20y2='42.6997'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A524B3'/%3e%3cstop%20offset='1'%20stop-color='%23FF2D55'/%3e%3c/linearGradient%3e%3clinearGradient%20id='gc_paint2'%20x1='40.9111'%20y1='32.025'%20x2='40.9111'%20y2='48.8'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A524B3'/%3e%3cstop%20offset='1'%20stop-color='%23FF2D55'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e";export{ee as M,ce as R,se as a,ae as b,re as c,ne as d,Q as e,V as f,oe as g,I as i,le as l,te as o,ue as p,de as r,ie as u};
2
- //# sourceMappingURL=loader-logo-DnFrESbi.js.map
1
+ import{ba as w,c as p,bb as F,w as M,bc as b,bd as E,be as A,V as S,bf as P,bg as U}from"./index-x3_oOTlT.js";import"./react-xTOg_zXI.js";import{d as h}from"./dcl-schemas-D-5rZ83i.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="76e674e7-5863-4785-8381-3687df9bf8da",e._sentryDebugIdIdentifier="sentry-dbid-76e674e7-5863-4785-8381-3687df9bf8da")}catch{}})();function v(){return p.creditsServerUrl}function D(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||void 0}catch{return}}async function x(e,r){const t=await w(`${v()}/credits/checkout`,{method:"POST",identity:r,metadata:{},headers:{"Content-Type":"application/json"},body:JSON.stringify({packId:e,timezone:D(),source:"website"})});if(!t.ok)throw new Error(`checkout ${t.status}: ${await t.text()}`);const{orderId:n,url:s}=await t.json();return{orderId:n,url:s,mock:!1}}async function L(e,r,t={}){const{intervalMs:n=1500,timeoutMs:s=6e4,signal:i}=t,o=Date.now()+s;for(;;){if(i!=null&&i.aborted)throw new DOMException("Aborted","AbortError");const c=await O(e,r,i);if(!R(c.status))return c;if(Date.now()>o)return c.status==="initiated"?c:{status:"pending"};await $(n,i)}}function R(e){return e==="processing"||e==="crediting"||e==="initiated"}async function O(e,r,t){const n=await w(`${v()}/credits/orders/${e}`,{method:"GET",identity:r,metadata:{},signal:t});if(n.status===404)return{status:"processing"};if(!n.ok)throw new Error(`order status ${n.status}`);return n.json()}function $(e,r){return new Promise((t,n)=>{const s=setTimeout(t,e);r==null||r.addEventListener("abort",()=>{clearTimeout(s),n(new DOMException("Aborted","AbortError"))})})}const B=.1,k=[{id:"pack_5",usd:5.99,credits:40},{id:"pack_10",usd:11.99,credits:100,bestValue:!0},{id:"pack_25",usd:29.99,credits:260},{id:"pack_50",usd:59.99,credits:540}];function Q(e,r){const t=r.reduce((i,o)=>o.usd<i.usd?o:i,r[0]);if(!t||t.id===e.id||!(t.usd>0))return null;const n=Math.floor(t.credits/t.usd*e.usd),s=e.credits-n;return s>0?{baseline:n,bonus:s}:null}const ee=4;function te(e,r){const t=Math.max(0,r),n=t>0?e.filter(c=>c.credits>=t):e,s=t<=0||n.length>0,i=n.length>0?n:e;if(i.length===0)return{packs:i,recommended:null,closesGap:s};const o=s?i.reduce((c,a)=>a.credits<c.credits?a:c):i.reduce((c,a)=>a.credits>c.credits?a:c);return{packs:i,recommended:o,closesGap:s}}function C(e){return e.imageUrlWebp||e.imageUrl||void 0}async function G(){const e=await fetch(`${p.creditsServerUrl}/credits/packs`);if(!e.ok)throw new Error(`credit packs ${e.status}`);const{packs:r}=await e.json();return r.slice().sort((t,n)=>(t.order??0)-(n.order??0)).map(t=>({id:t.id,usd:t.usd,credits:t.credits,...t.recommended?{bestValue:!0}:{},...C(t)?{artUrl:C(t)}:{}}))}function _(e){return k.find(r=>r.id===e)}const m="mock_cs_",N=new Set([80002,11155111,1337,31337]);function I(){const e=!p.stripePublishableKey;if(e&&!N.has(p.chainId))throw new Error(`Stripe publishable key is missing on chainId=${p.chainId}, which is not a recognized test network. Refusing to fall back to mock payments in a real-money environment — configure STRIPE_PUBLISHABLE_KEY.`);return e}async function re(e,r){const t=_(e);if(!t)throw new Error("Unknown pack");if(I())return W(t);if(!(r!=null&&r.identity))throw new Error("Sign in to get credits.");return x(e,r.identity)}async function ne(e,r={}){const{intervalMs:t,timeoutMs:n,signal:s,identity:i}=r;if(I()||e.startsWith(m))return H(e,r);if(!i)throw new Error("Sign in to get credits.");return L(e,i,{intervalMs:t,timeoutMs:n,signal:s})}function W(e){const r=`${m}${e.id}_${Date.now()}`;return T(400).then(()=>({orderId:r,clientSecret:`${m}${e.id}`,mock:!0}))}async function H(e,r={}){await T(r.intervalMs??900);const t=e.replace(m,"").replace(/_\d+$/,""),n=_(t),s=(n==null?void 0:n.credits)??0;if(r.address&&n)try{const i=await F(r.address,Math.round(n.credits*B*100));return{status:"credited",creditsGranted:s,newBalance:i.credits}}catch(i){return{status:"failed",error:i.message}}return{status:"credited",creditsGranted:s,newBalance:s}}function T(e,r){return new Promise((t,n)=>{setTimeout(t,e)})}function ie(){const{data:e,isLoading:r}=M({queryKey:["credit-packs"],queryFn:G,staleTime:3e5,retry:!1});return{packs:e??k,isLoading:r&&e===void 0}}const g=1e6,q=1;function Z(e){return e.acquisition==="store"?{kind:"store",item:{collection:e.item.contractAddress??"",itemId:String(e.item.itemId??""),priceWei:e.priceWei},chainId:e.item.chainId}:{kind:"trade",trade:e.trade,coupon:e.coupon}}function se(e){const r=!!e.item.contractAddress&&e.item.itemId!=null;return{usdPriceCents:e.usdCents,...e.acquisition==="trade"?{tradeId:e.trade.id}:{},...r?{contractAddress:e.item.contractAddress,itemId:String(e.item.itemId)}:{}}}function oe(e,r){const t=new Map;for(const n of e){const s=Z(n),i=r(s),o=t.get(i);o?(o.units.push(n),o.drafts.push(s)):t.set(i,{key:i,units:[n],drafts:[s]})}return[...t.values()]}const ce="dcl_shop_resume_cart";function y(e){return S(e)}function K(e,r){const t=e.received[0];return t?t.assetType===Number(h.TradeAssetType.USD_PEGGED_MANA)?U(t.amount):t.assetType===Number(h.TradeAssetType.ERC20)?!r||!t.amount?0:b(t.amount,r):0:0}function ae(e){return e.acquisition==="trade"?{kind:"trade",trade:e.trade,coupon:e.coupon}:{kind:"store",mint:{item:{collection:e.item.contractAddress,itemId:String(e.item.itemId),priceWei:e.priceWei},chainId:e.item.chainId}}}async function V(e,r,t,n,s,i){const o=e.tokenId?1:Math.max(1,Math.floor(e.quantity??1));if((e.acquisition??"trade")==="store"){const l=s?await s(e):null;if(!l||!n)return{status:"gone"};if(l.available<o)return{status:"gone"};const d=b(l.priceWei,n);return!Number.isFinite(d)||d<=0?{status:"no-price"}:{status:"buyable",line:{item:e,acquisition:"store",priceWei:l.priceWei,usdCents:d,priceCredits:y(d),quantity:o}}}const c=await t(e);if(!c)return{status:"gone"};if(!E(c))return{status:"gone"};if(A(c,r))return{status:"own"};const a=e.coupon?z(await(i==null?void 0:i(e)),c):void 0,u=j(K(c,n),a);return!Number.isFinite(u)||u<=0?{status:"no-price"}:{status:"buyable",line:{item:e,acquisition:"trade",trade:c,coupon:a,usdCents:u,priceCredits:y(u),quantity:o}}}function j(e,r){return!r||e<=0?e:Math.ceil(e*(g-r.discount)/g)}function z(e,r,t=Date.now()){var o,c,a;if(!e||e.discountType!==q||e.discount<=0||e.discount>=g||Number((o=e.checks)==null?void 0:o.expiration)<=t||!(Number((c=e.checks)==null?void 0:c.effective)<=t))return;const n=P(r);if(n===null||((a=e.couponManager)==null?void 0:a.toLowerCase())!==n)return;const s=r.sent??[];return s.length>0&&s.every(u=>Number(u.assetType)===Number(h.TradeAssetType.COLLECTION_ITEM))?e:void 0}async function de(e,r,t,n,s,i){const o=[],c=[],a=[];for(const d of e)try{const f=await V(d,r,t,n,s,i);f.status==="buyable"?o.push(f.line):f.status==="own"?a.push(d):c.push(d)}catch{c.push(d)}const u=o.reduce((d,f)=>d+f.priceCredits*f.quantity,0),l=c.length>0||a.length>0||o.some(d=>d.priceCredits!==d.item.priceCredits);return{buyable:o,unavailable:c,own:a,liveTotalCredits:u,orderChanged:l}}function ue(e){const{reservations:r,spent:t,settled:n}=e,s=[...new Set(r.filter(o=>!t.has(o.salt)).map(o=>o.salt))],i=[...new Set(r.filter(o=>n.has(o.salt)).map(o=>o.itemId))];return{toRelease:s,boughtItemIds:i}}const le="data:image/svg+xml,%3csvg%20width='61'%20height='61'%20viewBox='0%200%2061%2061'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M30.5%2061C47.3447%2061%2061%2047.3447%2061%2030.5C61%2013.6553%2047.3447%200%2030.5%200C13.6553%200%200%2013.6553%200%2030.5C0%2047.3447%2013.6553%2061%2030.5%2061Z'%20fill='url(%23gc_paint0)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.2001%2054.8997C17.2935%2058.7274%2023.6375%2060.9997%2030.5%2060.9997C37.3625%2060.9997%2043.7065%2058.7274%2048.8%2054.8997H12.2001Z'%20fill='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.10013%2048.7997C7.83863%2051.1024%209.89738%2053.1612%2012.2001%2054.8997H48.8001C51.1029%2053.1612%2053.1616%2051.1024%2054.9001%2048.7997H6.10013Z'%20fill='%23FFA25A'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M40.9158%2042.6998H2.5468C3.4923%2044.8805%204.69705%2046.924%206.10005%2048.7997H40.9311V42.6998H40.9158Z'%20fill='%23FFC95B'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M21.6094%2019.8247V42.6997H40.6719L21.6094%2019.8247Z'%20fill='url(%23gc_paint1)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.5468%2042.6997H21.6093V19.8248L2.5468%2042.6997Z'%20fill='%23FCFCFC'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M40.9158%2032.025V48.8H54.9L40.9158%2032.025Z'%20fill='url(%23gc_paint2)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M26.9467%2048.8H40.9157V32.025L26.9467%2048.8Z'%20fill='%23FCFCFC'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M40.9158%2027.4497C45.127%2027.4497%2048.5408%2024.0359%2048.5408%2019.8247C48.5408%2015.6136%2045.127%2012.1998%2040.9158%2012.1998C36.7046%2012.1998%2033.2908%2015.6136%2033.2908%2019.8247C33.2908%2024.0359%2036.7046%2027.4497%2040.9158%2027.4497Z'%20fill='%23FFC95B'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M21.6092%2015.2497C23.7148%2015.2497%2025.4217%2013.5428%2025.4217%2011.4372C25.4217%209.33166%2023.7148%207.62475%2021.6092%207.62475C19.5036%207.62475%2017.7967%209.33166%2017.7967%2011.4372C17.7967%2013.5428%2019.5036%2015.2497%2021.6092%2015.2497Z'%20fill='%23FFC95B'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='gc_paint0'%20x1='30.5'%20y1='-12.6335'%20x2='-12.6335'%20y2='30.5'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3clinearGradient%20id='gc_paint1'%20x1='21.6029'%20y1='19.8247'%20x2='21.6029'%20y2='42.6997'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A524B3'/%3e%3cstop%20offset='1'%20stop-color='%23FF2D55'/%3e%3c/linearGradient%3e%3clinearGradient%20id='gc_paint2'%20x1='40.9111'%20y1='32.025'%20x2='40.9111'%20y2='48.8'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A524B3'/%3e%3cstop%20offset='1'%20stop-color='%23FF2D55'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e";export{ee as M,ce as R,se as a,ae as b,re as c,ne as d,Q as e,V as f,oe as g,I as i,le as l,te as o,ue as p,de as r,ie as u};
2
+ //# sourceMappingURL=loader-logo-VsDgHWNm.js.map
@@ -1,2 +1,2 @@
1
- import{av as f}from"./NetworkUtil-DB3XDe5L.js";import{a$ as l,aN as w,bn as p,o as E,an as A,aH as g,h as b,g as F,ax as y,am as N,m,n as I,O as P,bo as R}from"./sendRawTransaction-CmggkI48.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="4de35ede-a25f-499f-8a4c-6f4d03946ea8",e._sentryDebugIdIdentifier="sentry-dbid-4de35ede-a25f-499f-8a4c-6f4d03946ea8")}catch{}})();function D(e){const{abi:o,data:n}=e,a=l(n,0,4),t=o.find(r=>r.type==="function"&&a===w(p(r)));if(!t)throw new E(a,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:t.name,args:"inputs"in t&&t.inputs&&t.inputs.length>0?A(t.inputs,l(n,4)):void 0}}const u="/docs/contract/encodeErrorResult";function h(e){const{abi:o,errorName:n,args:a}=e;let t=o[0];if(n){const c=g({abi:o,args:a,name:n});if(!c)throw new b(n,{docsPath:u});t=c}if(t.type!=="error")throw new b(void 0,{docsPath:u});const r=p(t),s=w(r);let i="0x";if(a&&a.length>0){if(!t.inputs)throw new F(t.name,{docsPath:u});i=y(t.inputs,a)}return N([s,i])}const d="/docs/contract/encodeFunctionResult";function v(e){const{abi:o,functionName:n,result:a}=e;let t=o[0];if(n){const s=g({abi:o,name:n});if(!s)throw new m(n,{docsPath:d});t=s}if(t.type!=="function")throw new m(void 0,{docsPath:d});if(!t.outputs)throw new I(t.name,{docsPath:d});const r=(()=>{if(t.outputs.length===0)return[];if(t.outputs.length===1)return[a];if(Array.isArray(a))return a;throw new P(a)})();return y(t.outputs,r)}const x="x-batch-gateway:true";async function H(e){const{data:o,ccipRequest:n}=e,{args:[a]}=D({abi:f,data:o}),t=[],r=[];return await Promise.all(a.map(async(s,i)=>{try{r[i]=s.urls.includes(x)?await H({data:s.data,ccipRequest:n}):await n(s),t[i]=!1}catch(c){t[i]=!0,r[i]=_(c)}})),v({abi:f,functionName:"query",result:[t,r]})}function _(e){return e.name==="HttpRequestError"&&e.status?h({abi:f,errorName:"HttpError",args:[e.status,e.shortMessage]}):h({abi:[R],errorName:"Error",args:["shortMessage"in e?e.shortMessage:e.message]})}export{v as a,H as b,D as d,h as e,x as l};
2
- //# sourceMappingURL=localBatchGatewayRequest-xmkiXjrL.js.map
1
+ import{av as f}from"./NetworkUtil-Dn6I5ZVR.js";import{a$ as l,aN as w,bn as p,o as E,an as A,aH as g,h as b,g as F,ax as y,am as N,m,n as I,O as P,bo as R}from"./sendRawTransaction-CkffR3oO.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="4de35ede-a25f-499f-8a4c-6f4d03946ea8",e._sentryDebugIdIdentifier="sentry-dbid-4de35ede-a25f-499f-8a4c-6f4d03946ea8")}catch{}})();function D(e){const{abi:o,data:n}=e,a=l(n,0,4),t=o.find(r=>r.type==="function"&&a===w(p(r)));if(!t)throw new E(a,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:t.name,args:"inputs"in t&&t.inputs&&t.inputs.length>0?A(t.inputs,l(n,4)):void 0}}const u="/docs/contract/encodeErrorResult";function h(e){const{abi:o,errorName:n,args:a}=e;let t=o[0];if(n){const c=g({abi:o,args:a,name:n});if(!c)throw new b(n,{docsPath:u});t=c}if(t.type!=="error")throw new b(void 0,{docsPath:u});const r=p(t),s=w(r);let i="0x";if(a&&a.length>0){if(!t.inputs)throw new F(t.name,{docsPath:u});i=y(t.inputs,a)}return N([s,i])}const d="/docs/contract/encodeFunctionResult";function v(e){const{abi:o,functionName:n,result:a}=e;let t=o[0];if(n){const s=g({abi:o,name:n});if(!s)throw new m(n,{docsPath:d});t=s}if(t.type!=="function")throw new m(void 0,{docsPath:d});if(!t.outputs)throw new I(t.name,{docsPath:d});const r=(()=>{if(t.outputs.length===0)return[];if(t.outputs.length===1)return[a];if(Array.isArray(a))return a;throw new P(a)})();return y(t.outputs,r)}const x="x-batch-gateway:true";async function H(e){const{data:o,ccipRequest:n}=e,{args:[a]}=D({abi:f,data:o}),t=[],r=[];return await Promise.all(a.map(async(s,i)=>{try{r[i]=s.urls.includes(x)?await H({data:s.data,ccipRequest:n}):await n(s),t[i]=!1}catch(c){t[i]=!0,r[i]=_(c)}})),v({abi:f,functionName:"query",result:[t,r]})}function _(e){return e.name==="HttpRequestError"&&e.status?h({abi:f,errorName:"HttpError",args:[e.status,e.shortMessage]}):h({abi:[R],errorName:"Error",args:["shortMessage"in e?e.shortMessage:e.message]})}export{v as a,H as b,D as d,h as e,x as l};
2
+ //# sourceMappingURL=localBatchGatewayRequest-BfGg370Q.js.map
@@ -1,4 +1,4 @@
1
- import{w as n}from"./lit-element-wjYUA6aF.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="7e973267-37b5-4d71-9ec8-5e5330bbd309",e._sentryDebugIdIdentifier="sentry-dbid-7e973267-37b5-4d71-9ec8-5e5330bbd309")}catch{}})();const r=n`<svg fill="none" viewBox="0 0 16 16">
1
+ import{w as n}from"./lit-element-wjYUA6aF.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="c92f5874-4e3e-4861-a7ab-2e433b5b44d1",e._sentryDebugIdIdentifier="sentry-dbid-c92f5874-4e3e-4861-a7ab-2e433b5b44d1")}catch{}})();const r=n`<svg fill="none" viewBox="0 0 16 16">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -6,4 +6,4 @@ import{w as n}from"./lit-element-wjYUA6aF.js";(function(){try{var e=typeof windo
6
6
  clip-rule="evenodd"
7
7
  />
8
8
  </svg>`;export{r as mailSvg};
9
- //# sourceMappingURL=mail-CZ9ghbH-.js.map
9
+ //# sourceMappingURL=mail-B2wBPliw.js.map
@@ -1,4 +1,4 @@
1
- import{w as n}from"./lit-element-wjYUA6aF.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="03135392-badb-43ca-866b-b68120849152",e._sentryDebugIdIdentifier="sentry-dbid-03135392-badb-43ca-866b-b68120849152")}catch{}})();const l=n`<svg fill="none" viewBox="0 0 20 20">
1
+ import{w as n}from"./lit-element-wjYUA6aF.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="06ec51e1-c91f-4d2c-b000-18a4c53701a6",e._sentryDebugIdIdentifier="sentry-dbid-06ec51e1-c91f-4d2c-b000-18a4c53701a6")}catch{}})();const l=n`<svg fill="none" viewBox="0 0 20 20">
2
2
  <path fill="currentColor" d="M10.81 5.81a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z" />
3
3
  <path
4
4
  fill="currentColor"
@@ -7,4 +7,4 @@ import{w as n}from"./lit-element-wjYUA6aF.js";(function(){try{var e=typeof windo
7
7
  clip-rule="evenodd"
8
8
  />
9
9
  </svg>`;export{l as mobileSvg};
10
- //# sourceMappingURL=mobile-D7KL87qI.js.map
10
+ //# sourceMappingURL=mobile-COGIkuHo.js.map
@@ -1,4 +1,4 @@
1
- import{a as n,s as t,k as i}from"./index-BRNshUaV.js";import"./react-COwX0Zlk.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new o.Error().stack;a&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[a]="295db3e3-b29d-4da7-9cb8-0d4904b4a15e",o._sentryDebugIdIdentifier="sentry-dbid-295db3e3-b29d-4da7-9cb8-0d4904b4a15e")}catch{}})();const{colors:e,radius:d,z:r}=n,s=i`
1
+ import{a as n,s as t,k as i}from"./index-x3_oOTlT.js";import"./react-xTOg_zXI.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new o.Error().stack;a&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[a]="295db3e3-b29d-4da7-9cb8-0d4904b4a15e",o._sentryDebugIdIdentifier="sentry-dbid-295db3e3-b29d-4da7-9cb8-0d4904b4a15e")}catch{}})();const{colors:e,radius:d,z:r}=n,s=i`
2
2
  0% {
3
3
  transform: scale(0);
4
4
  opacity: 0;
@@ -109,4 +109,4 @@ import{a as n,s as t,k as i}from"./index-BRNshUaV.js";import"./react-COwX0Zlk.js
109
109
  font-size: 16px;
110
110
  margin: 2px 0 0;
111
111
  `;export{h as A,f as B,u as H,x as L,b as M,g as T};
112
- //# sourceMappingURL=modal.styles-Do478QcD.js.map
112
+ //# sourceMappingURL=modal.styles-LVyI-Nms.js.map
@@ -1,4 +1,4 @@
1
- import{w as f}from"./lit-element-wjYUA6aF.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="737c76c0-8f7d-46d1-92aa-ef0e19803e75",e._sentryDebugIdIdentifier="sentry-dbid-737c76c0-8f7d-46d1-92aa-ef0e19803e75")}catch{}})();const o=f`<svg fill="none" viewBox="0 0 41 40">
1
+ import{w as t}from"./lit-element-wjYUA6aF.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},f=new e.Error().stack;f&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[f]="bc0a46a0-75fd-4f68-997c-f88ee3157e3c",e._sentryDebugIdIdentifier="sentry-dbid-bc0a46a0-75fd-4f68-997c-f88ee3157e3c")}catch{}})();const o=t`<svg fill="none" viewBox="0 0 41 40">
2
2
  <path
3
3
  style="fill: var(--wui-color-fg-100);"
4
4
  fill-opacity=".05"
@@ -9,4 +9,4 @@ import{w as f}from"./lit-element-wjYUA6aF.js";(function(){try{var e=typeof windo
9
9
  d="M15.6 20.31a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0ZM23.1 20.31a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0ZM28.1 22.81a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z"
10
10
  />
11
11
  </svg>`;export{o as moreSvg};
12
- //# sourceMappingURL=more-C1vsI2Vu.js.map
12
+ //# sourceMappingURL=more-zcriamqw.js.map
@@ -1,2 +1,2 @@
1
- import{g as t}from"./sentry-D9BarSwm.js";(function(){try{var e=typeof window<"u"?window:typeof t<"u"?t:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="307db27e-c364-44c8-9bac-a9a9aa31e23c",e._sentryDebugIdIdentifier="sentry-dbid-307db27e-c364-44c8-9bac-a9a9aa31e23c")}catch{}})();function o(){if(typeof WebSocket<"u")return WebSocket;if(typeof t.WebSocket<"u")return t.WebSocket;if(typeof window.WebSocket<"u")return window.WebSocket;if(typeof self.WebSocket<"u")return self.WebSocket;throw new Error("`WebSocket` is not supported in this environment")}const r=o(),i=Object.freeze(Object.defineProperty({__proto__:null,WebSocket:r},Symbol.toStringTag,{value:"Module"}));export{i as n};
2
- //# sourceMappingURL=native-DfSWgaR4.js.map
1
+ import{g as t}from"./sentry-B0Y62cGL.js";(function(){try{var e=typeof window<"u"?window:typeof t<"u"?t:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="307db27e-c364-44c8-9bac-a9a9aa31e23c",e._sentryDebugIdIdentifier="sentry-dbid-307db27e-c364-44c8-9bac-a9a9aa31e23c")}catch{}})();function o(){if(typeof WebSocket<"u")return WebSocket;if(typeof t.WebSocket<"u")return t.WebSocket;if(typeof window.WebSocket<"u")return window.WebSocket;if(typeof self.WebSocket<"u")return self.WebSocket;throw new Error("`WebSocket` is not supported in this environment")}const r=o(),i=Object.freeze(Object.defineProperty({__proto__:null,WebSocket:r},Symbol.toStringTag,{value:"Module"}));export{i as n};
2
+ //# sourceMappingURL=native-l5Om0Rwv.js.map
@@ -1,4 +1,4 @@
1
- import{w as l}from"./lit-element-wjYUA6aF.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="bfb1288d-0ad0-46b2-ba2a-0a4efe52490a",e._sentryDebugIdIdentifier="sentry-dbid-bfb1288d-0ad0-46b2-ba2a-0a4efe52490a")}catch{}})();const r=l`<svg fill="none" viewBox="0 0 22 20">
1
+ import{w as l}from"./lit-element-wjYUA6aF.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="f112fc8a-195f-40ec-9a31-9aaafa9e0a93",a._sentryDebugIdIdentifier="sentry-dbid-f112fc8a-195f-40ec-9a31-9aaafa9e0a93")}catch{}})();const r=l`<svg fill="none" viewBox="0 0 22 20">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -12,4 +12,4 @@ import{w as l}from"./lit-element-wjYUA6aF.js";(function(){try{var e=typeof windo
12
12
  clip-rule="evenodd"
13
13
  />
14
14
  </svg>`;export{r as networkPlaceholderSvg};
15
- //# sourceMappingURL=network-placeholder-C6sglFRh.js.map
15
+ //# sourceMappingURL=network-placeholder-Cm-6akxX.js.map