@dcl/shop 1.12.2-34818068749.commit-deb7840 → 1.12.2-34823553415.commit-aeaec50

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 (232) hide show
  1. package/_assets/{Activity-Ln2KNjXv.js → Activity-DbMY05Td.js} +4 -4
  2. package/_assets/{AnimatedBackground-Bv502Skn.js → AnimatedBackground-DBm7o1js.js} +6 -6
  3. package/_assets/{Assets-I2VVAioQ.js → Assets-Cyv8LkmE.js} +9 -9
  4. package/_assets/{Authorizations-Btu1-t77.js → Authorizations-Bx1T-Y1z.js} +2 -2
  5. package/_assets/{Cart-DOZ9HNkC.js → Cart-Chq2viC7.js} +2 -2
  6. package/_assets/Collection-K_kDbTeA.js +134 -0
  7. package/_assets/{CollectionCarousel-DxzM9hwQ.js → CollectionCarousel-btoG5Zui.js} +3 -3
  8. package/_assets/{Confetti-dKT11dac.js → Confetti-DO-WNYS2.js} +4 -4
  9. package/_assets/{ConstantsUtil-Bxu2fV30.js → ConstantsUtil-k7kDDFaA.js} +2 -2
  10. package/_assets/{ContentClient-BD3NqXbV.js → ContentClient-BNBfUiyU.js} +2 -2
  11. package/_assets/{Creator-it_6RtZm.js → Creator-Bdq3Xc0i.js} +2 -2
  12. package/_assets/{DeploymentBuilder-jr5B1DUM.js → DeploymentBuilder-CXYt0sfZ.js} +2 -2
  13. package/_assets/{EmotePlaybackBar-BTrTdkPO.js → EmotePlaybackBar-BugOdMJs.js} +19 -19
  14. package/_assets/{ErrorNotice-D1vyV_9N.js → ErrorNotice-DPZR9TIT.js} +2 -2
  15. package/_assets/{ExchangeController-CP3q2HHz.js → ExchangeController-DNFG7kCb.js} +2 -2
  16. package/_assets/{Faq-DBK0idBE.js → Faq-BzpiZnqD.js} +2 -2
  17. package/_assets/{GetCredits-DOtEXCqd.js → GetCredits-C8jqGL4u.js} +2 -2
  18. package/_assets/{Grow-Dexbu_Wb.js → Grow-D11pEZY5.js} +2 -2
  19. package/_assets/{HelpersUtil-CTRmnU93.js → HelpersUtil-uJW8NlSQ.js} +2 -2
  20. package/_assets/{ItemDetail-5DVtuE3v.js → ItemDetail-D4zJuy-W.js} +194 -194
  21. package/_assets/{LoadMore-BOHXzGNI.js → LoadMore-CK6ovlLm.js} +2 -2
  22. package/_assets/{ManaPricingBanner.styles-CfMtbmew.js → ManaPricingBanner.styles-CTRbVMgV.js} +2 -2
  23. package/_assets/MyAssets-UhwZrg74.js +331 -0
  24. package/_assets/{MyFavorites-O18FJFMu.js → MyFavorites-heK4bAYD.js} +2 -2
  25. package/_assets/{NetworkUtil-CTaI1_6H.js → NetworkUtil-D4ntlaLz.js} +2 -2
  26. package/_assets/{NotFound-BKdN8ALV.js → NotFound-CKJS0Mmf.js} +2 -2
  27. package/_assets/{NotificationsBell-CnDcIaQ5.js → NotificationsBell-CJ6FNcIr.js} +2 -2
  28. package/_assets/{OutfitDetail-CjFfMeeN.js → OutfitDetail-yqW7I9L4.js} +2 -2
  29. package/_assets/{OutfitPreview-D-i_wSG8.js → OutfitPreview-D3hfxKis.js} +2 -2
  30. package/_assets/{OutfitStudio-1by4nTeu.js → OutfitStudio-DoUUlvb7.js} +2 -2
  31. package/_assets/{StoreSettings-CCnNFiTI.js → StoreSettings-CyZjMRMk.js} +2 -2
  32. package/_assets/{Success-BK24O7pN.js → Success-D7LePELP.js} +2 -2
  33. package/_assets/{SwapController-CjHJT0VL.js → SwapController-Cdyblmm2.js} +2 -2
  34. package/_assets/{TradeService-uFzaKbaW.js → TradeService-CydMPnDw.js} +2 -2
  35. package/_assets/{W3MFrameProviderSingleton-DIoDpbq_.js → W3MFrameProviderSingleton-BFqB62Bi.js} +4 -4
  36. package/_assets/{WebCryptoP256-B5QhB34i.js → WebCryptoP256-Dakr9pB4.js} +2 -2
  37. package/_assets/{authorizations-Cl9CAf2g.js → authorizations-JXhdylb0.js} +2 -2
  38. package/_assets/{basic-BcNlwAzp.js → basic-DvuGTSvv.js} +2 -2
  39. package/_assets/{biconomy-Q0jLvmzO.js → biconomy-Bi3-iJrE.js} +2 -2
  40. package/_assets/{browseLayout.styles-BLVGHLwl.js → browseLayout.styles-CCoPSvP7.js} +2 -2
  41. package/_assets/{browser-C0RHHhkl.js → browser-DSf1IXay.js} +2 -2
  42. package/_assets/{browser-ponyfill-CZcyiHtf.js → browser-ponyfill-C8SLl8za.js} +2 -2
  43. package/_assets/{builder-BjpkQ90N.js → builder-2HZX4ztd.js} +2 -2
  44. package/_assets/{buy-DLOIoAYB.js → buy-DKnUYoQz.js} +2 -2
  45. package/_assets/{buy-gasless-C3qljNGZ.js → buy-gasless-BPY5Wv6q.js} +2 -2
  46. package/_assets/{categories-WLIR1xWo.js → categories-BNiDip1t.js} +2 -2
  47. package/_assets/{ccip-BX5CYrNw.js → ccip-B6qlq9J7.js} +2 -2
  48. package/_assets/{ccip-fkdCf8mA.js → ccip-CklxZwhU.js} +2 -2
  49. package/_assets/{chains-CstAynNz.js → chains-BwzV8LL-.js} +2 -2
  50. package/_assets/collectionPage.styles-CF-XuJpF.js +41 -0
  51. package/_assets/{common-CRTNTkn5.js → common-Ck6enMlV.js} +2 -2
  52. package/_assets/{controller-C5fuFix0.js → controller-K9rNSmv4.js} +3 -3
  53. package/_assets/{core-BtTFszHo.js → core-DoBhW-bc.js} +5 -5
  54. package/_assets/{createSvgIcon-CR4oFWwE.js → createSvgIcon-D1ePqnL2.js} +6 -6
  55. package/_assets/{crumbs.styles-CDJpWE7O.js → crumbs.styles-C_N1pxiu.js} +2 -2
  56. package/_assets/{custom-DX6iIlqo.js → custom-48AtJpQq.js} +2 -2
  57. package/_assets/{data-capture-WdnuehPJ.js → data-capture-aprDNT4J.js} +2 -2
  58. package/_assets/{dcl-schemas-C_BnTyQO.js → dcl-schemas-D5wchj0M.js} +2 -2
  59. package/_assets/{decimals-CdwxkbTO.js → decimals-i5eDFk7V.js} +2 -2
  60. package/_assets/{decimals-CnWL1JIX.js → decimals-rAkBLbdw.js} +2 -2
  61. package/_assets/{detectExtension-CtuEyBAP.js → detectExtension-C4QKdYeW.js} +2 -2
  62. package/_assets/{disposePreview-BIDjZz_a.js → disposePreview-CKepjNL4.js} +2 -2
  63. package/_assets/{email-Dl5cSAiD.js → email-BQvNSulI.js} +2 -2
  64. package/_assets/{embedded-wallet-D-9YD23q.js → embedded-wallet-DPFA4vK-.js} +2 -2
  65. package/_assets/{emotion-styled.browser.esm-BEOg2i5k.js → emotion-styled.browser.esm-BI8E1wIE.js} +2 -2
  66. package/_assets/{engine-BArg8S0f.js → engine-DmoXFj2U.js} +2 -2
  67. package/_assets/{errors-BmD4KtWx.js → errors-Dw9Tpd9z.js} +2 -2
  68. package/_assets/{estimate-l1-fee-CHOupmho.js → estimate-l1-fee-ypbzVZ0f.js} +2 -2
  69. package/_assets/{eth_estimateGas-B-BcRVy-.js → eth_estimateGas-C0rYY-JM.js} +2 -2
  70. package/_assets/{eth_getStorageAt-tYZLOZRQ.js → eth_getStorageAt-CYCFlFE0.js} +2 -2
  71. package/_assets/{eth_getTransactionCount-CmlY34K2.js → eth_getTransactionCount-ChLm93la.js} +2 -2
  72. package/_assets/{ethereum-C0Ixg2OQ.js → ethereum-DRwm-_PB.js} +2 -2
  73. package/_assets/{ethers-J3-76ZXn.js → ethers-nJ6WEmLC.js} +2 -2
  74. package/_assets/{events-BaFb0TNw.js → events-B7QmtJ7O.js} +2 -2
  75. package/_assets/{execute-B8rKV8XO.js → execute-BcZz3Ms2.js} +3 -3
  76. package/_assets/{extractIPFS-CnaZsJAc.js → extractIPFS-CVKIlPNq.js} +2 -2
  77. package/_assets/{features-C3B4V5Xv.js → features-Dl1FwSRk.js} +2 -2
  78. package/_assets/{fetchTokenMetadata-CzVbQGG2.js → fetchTokenMetadata-BxymwuXT.js} +3 -3
  79. package/_assets/{field.styles-BOY8_CFB.js → field.styles-CEGIirkl.js} +2 -2
  80. package/_assets/{fortmatic-ChX9KWnV.js → fortmatic-DKDQj2b2.js} +2 -2
  81. package/_assets/{get-bytecode-CnGCKgNH.js → get-bytecode-Cc7kw1oY.js} +2 -2
  82. package/_assets/{get-ecosystem-wallet-info-BQMJgZtx.js → get-ecosystem-wallet-info-BSVlLk9b.js} +2 -2
  83. package/_assets/{getBalance-DB-zx4Az.js → getBalance-BJzk3iM_.js} +3 -3
  84. package/_assets/{getInstalledModules-3miibhNf.js → getInstalledModules-k4Vb7JXk.js} +2 -2
  85. package/_assets/{getNFT-fBrHZcXs.js → getNFT-Cpl0UvEG.js} +3 -3
  86. package/_assets/{getNFT-Cg13hjBK.js → getNFT-DPPc8zkJ.js} +2 -2
  87. package/_assets/{grid.styles-vPdFLyiw.js → grid.styles-6moRN7Ni.js} +2 -2
  88. package/_assets/{hashTypedData-XrNlJlYf.js → hashTypedData-B0g9V9nq.js} +2 -2
  89. package/_assets/{hashTypedData-Bz6zafkY.js → hashTypedData-Bww4giRn.js} +2 -2
  90. package/_assets/{in-app-C1UBNS5V.js → in-app-rGe61t9t.js} +2 -2
  91. package/_assets/{in-app-wallet-calls-RWjs_8LT.js → in-app-wallet-calls-6HRsnpnp.js} +2 -2
  92. package/_assets/{index-BRftsA0k.js → index-1Ou0u4zm.js} +2 -2
  93. package/_assets/{index-BI7hgKsp.js → index-89GkjrG5.js} +2 -2
  94. package/_assets/{index-CBV0MFLm.js → index-8r5DK8PQ.js} +2 -2
  95. package/_assets/{index-f6-RMcuB.js → index-9rhufg00.js} +2 -2
  96. package/_assets/{index-RFyTZAu_.js → index-B-bkKNR8.js} +2 -2
  97. package/_assets/{index-CoOfTABy.js → index-B0GjZmO0.js} +2 -2
  98. package/_assets/{index-Bo9d62G6.js → index-B0xV6agV.js} +2 -2
  99. package/_assets/{index-DLlBUwIa.js → index-B6UaW8nK.js} +2 -2
  100. package/_assets/{index-005j3hW_.js → index-BF9KZkg7.js} +2 -2
  101. package/_assets/{index-DAiBHryT.js → index-BGt7PxUF.js} +2 -2
  102. package/_assets/{index-DBCN4c6_.js → index-BM8sowad.js} +2 -2
  103. package/_assets/{index-R5Ykrt71.js → index-BNyqLcTH.js} +2 -2
  104. package/_assets/{index-DHFJOPDw.js → index-BUnfP8yp.js} +2 -2
  105. package/_assets/{index-DVtcBVO-.js → index-BY3vgepA.js} +2 -2
  106. package/_assets/{index-DZIIcPiJ.js → index-BY54Dfzm.js} +2 -2
  107. package/_assets/{index-a6hkeC9T.js → index-BZw0vNqP.js} +2 -2
  108. package/_assets/{index-vtfh3nwp.js → index-Be9BP3SJ.js} +703 -636
  109. package/_assets/{index-eyq9zApX.js → index-Bhm56BAt.js} +3 -3
  110. package/_assets/{index-CYWCPhui.js → index-Bhtd7XVL.js} +2 -2
  111. package/_assets/{index-DfftqTWz.js → index-Bj_GtaGU.js} +2 -2
  112. package/_assets/{index-CHHfO8Rh.js → index-BkUrq5Hh.js} +2 -2
  113. package/_assets/{index-C9IBWEch.js → index-Bnbo9iaP.js} +3 -3
  114. package/_assets/{index-BzyjUNaA.js → index-BwRUu-xw.js} +2 -2
  115. package/_assets/{index-BSxsLx3f.js → index-Bx2HOJNN.js} +2 -2
  116. package/_assets/{index-OyuPmFxu.js → index-C0RRGQVS.js} +2 -2
  117. package/_assets/{index-tkJbfnnf.js → index-C278RUkd.js} +2 -2
  118. package/_assets/{index-DBZC4RO9.js → index-C30-AgzK.js} +6 -6
  119. package/_assets/index-C827RlVn.js +3 -0
  120. package/_assets/{index-DtwaOTEa.js → index-C9DYbCOh.js} +2 -2
  121. package/_assets/{index-DegRxU-E.js → index-CCX0Oj64.js} +3 -3
  122. package/_assets/{index-DDioWC3I.js → index-CDHxOMpW.js} +2 -2
  123. package/_assets/{index-vmHQc0aw.js → index-CKXIz7Yp.js} +4 -4
  124. package/_assets/{index-1Xto3gWi.js → index-CTM2f6iC.js} +2 -2
  125. package/_assets/{index-Bf9FOmNZ.js → index-CatcXIbg.js} +2 -2
  126. package/_assets/{index-DICrqfHn.js → index-CeMjBxWO.js} +2 -2
  127. package/_assets/{index-DAagxt9C.js → index-CgsvouY9.js} +2 -2
  128. package/_assets/{index-D0qu9IUt.js → index-CoCO4P5X.js} +2 -2
  129. package/_assets/{index-CsLV8vTW.js → index-CoSo28qe.js} +2 -2
  130. package/_assets/{index-DRdF4l3g.js → index-CvnOCVAU.js} +2 -2
  131. package/_assets/{index-CLCNWM-w.js → index-D4JAQam6.js} +4 -4
  132. package/_assets/{index-CSp9S8iO.css → index-D4szyEqt.css} +1 -1
  133. package/_assets/{index-dGcV3X3Q.js → index-DBUootJv.js} +4 -4
  134. package/_assets/{index-BnD3fh69.js → index-DEM8k4a4.js} +2 -2
  135. package/_assets/{index-_jbN_7G8.js → index-DG6IyKdH.js} +2 -2
  136. package/_assets/{index-RJGNt-Ue.js → index-DIgBpKhB.js} +3 -3
  137. package/_assets/{index-CrjAFM5M.js → index-DK3OX1J8.js} +2 -2
  138. package/_assets/{index-CFA6kU2v.js → index-DPIL9ow9.js} +2 -2
  139. package/_assets/{index-04msnBIh.js → index-DTGk2b51.js} +2 -2
  140. package/_assets/{index-BzXLWlAR.js → index-DVguusIF.js} +2 -2
  141. package/_assets/{index-AW96367-.js → index-D_AFP6MG.js} +2 -2
  142. package/_assets/{index-BmwobDoY.js → index-DbtQ0XSx.js} +2 -2
  143. package/_assets/{index-Ck0nA-p2.js → index-DfR967R5.js} +2 -2
  144. package/_assets/{index-C8W_ejQ4.js → index-Dh2vawGY.js} +2 -2
  145. package/_assets/{index-oD5ULYrA.js → index-Dk5dQO-0.js} +2 -2
  146. package/_assets/{index-opicDsem.js → index-DkQ_RWpf.js} +2 -2
  147. package/_assets/{index-H9vtZzDv.js → index-DqjSWFsv.js} +2 -2
  148. package/_assets/{index-DY-atGNw.js → index-Dqn5Px34.js} +2 -2
  149. package/_assets/{index-eOCXB47z.js → index-Dvj-BHOM.js} +2 -2
  150. package/_assets/{index-BAnATH91.js → index-Dvs4vYb2.js} +2 -2
  151. package/_assets/{index-BQ63iW1l.js → index-E3fqSE6Z.js} +3 -3
  152. package/_assets/{index-B11qQWxk.js → index-NO1W2WXD.js} +2 -2
  153. package/_assets/{index-V0BeHm-b.js → index-VZ5Z0BGD.js} +2 -2
  154. package/_assets/{index-Bk_FZt52.js → index-ZEj-h0PS.js} +2 -2
  155. package/_assets/{index-DFrAnNh5.js → index-g3_tkoOb.js} +2 -2
  156. package/_assets/{index-JiO4YHDN.js → index-gPBS31M7.js} +2 -2
  157. package/_assets/{index-XLWjjMb_.js → index-hMwKBo_-.js} +2 -2
  158. package/_assets/{index-BU1hxbMp.js → index-ma8eunAs.js} +2 -2
  159. package/_assets/{index-BDeMq109.js → index-pa0dAwRi.js} +2 -2
  160. package/_assets/{index.es-Bq8W5dn_.js → index.es-BE90DSiS.js} +2 -2
  161. package/_assets/{index.es-DHUsfMvl.js → index.es-BdrXWfvl.js} +5 -5
  162. package/_assets/{index.es-MwO82KBL.js → index.es-DCvi1_dw.js} +2 -2
  163. package/_assets/{index.es-BukOnbO0.js → index.es-hTediFlJ.js} +2 -2
  164. package/_assets/{items-empty-De2VF_VK.js → items-empty-DWAfrOll.js} +2 -2
  165. package/_assets/{jump-CfWKkHrn.js → jump-BM0VbUlD.js} +2 -2
  166. package/_assets/{linkAccount-Dxrtluiq.js → linkAccount-Y-o1ZQgW.js} +2 -2
  167. package/_assets/{localBatchGatewayRequest-DJSWklXe.js → localBatchGatewayRequest-CFlihl4N.js} +2 -2
  168. package/_assets/{native-BHAnhi3X.js → native-D1HSld9f.js} +2 -2
  169. package/_assets/{networks-DMQMbu7p.js → networks-C1oESSoO.js} +2 -2
  170. package/_assets/{onramp-DyPEhvVl.js → onramp-CncNPWDx.js} +2 -2
  171. package/_assets/{openzeppelin-CJiLrAzM.js → openzeppelin-BHo3PaYF.js} +2 -2
  172. package/_assets/{ownerOf-D2boG_oC.js → ownerOf-BENmSmxO.js} +2 -2
  173. package/_assets/{parseNft-EwImS8uf.js → parseNft-srMT8qVY.js} +3 -3
  174. package/_assets/{parseSignature-_Zix9qM5.js → parseSignature-vIJwHltk.js} +4 -4
  175. package/_assets/{parseSignature-DpzNdq2C.js → parseSignature-xvELGcp5.js} +2 -2
  176. package/_assets/{passkeys-A35AGms7.js → passkeys-DGB2Pf3k.js} +2 -2
  177. package/_assets/{pay-with-exchange-BU6Dp4y-.js → pay-with-exchange-oCdb5RC1.js} +2 -2
  178. package/_assets/{prepare-contract-call-tccwxBcD.js → prepare-contract-call-B3DsVXp2.js} +2 -2
  179. package/_assets/{qr-overlay-BaTzO7VH.js → qr-overlay-C6rPhjN6.js} +4 -4
  180. package/_assets/{react-Dvs-h5b4.js → react-a2ePEDgy.js} +2 -2
  181. package/_assets/{receive-Dg6-84O8.js → receive-BVsSwcKt.js} +2 -2
  182. package/_assets/{resolveImplementation-D3CZsCUF.js → resolveImplementation-BjPJ-N31.js} +2 -2
  183. package/_assets/{resume-buy-WLSUq3jw.js → resume-buy-trvKnB1t.js} +2 -2
  184. package/_assets/{rpc-yVEoJjQY.js → rpc-CCPxTYFP.js} +2 -2
  185. package/_assets/{sales-empty-XQOHpdM5.js → sales-empty-C8x6kUpP.js} +2 -2
  186. package/_assets/{search-empty-BhUAGjXZ.js → search-empty-BLediGjJ.js} +2 -2
  187. package/_assets/{secp256k1-DVU3CvKc.js → secp256k1-C-MCPJQC.js} +2 -2
  188. package/_assets/{secp256k1-lwGEMj9M.js → secp256k1-CIn6ei4a.js} +2 -2
  189. package/_assets/{secp256k1-BoYqjWq6.js → secp256k1-DBwhwjWo.js} +2 -2
  190. package/_assets/{send-Q5mh61ou.js → send-CewEak5z.js} +2 -2
  191. package/_assets/{send-batch-transaction--y48VuCR.js → send-batch-transaction-C1T2g6d1.js} +2 -2
  192. package/_assets/{send-eip712-transaction-Bhb1XyTe.js → send-eip712-transaction-ITsyfqxy.js} +3 -3
  193. package/_assets/{send-gasless-transaction-0O49-0eQ.js → send-gasless-transaction-BpM6CLLn.js} +3 -3
  194. package/_assets/{send-transaction-fs8C3bSM.js → send-transaction-DY_hjo3j.js} +3 -3
  195. package/_assets/{sendMetaTransaction-C2E121QZ.js → sendMetaTransaction-C-Mzgrci.js} +2 -2
  196. package/_assets/{sendRawTransaction-QhemjhKJ.js → sendRawTransaction-CBv_U4kp.js} +4 -4
  197. package/_assets/{sentry-3Vm_u2Wu.js → sentry-XIbC1v9G.js} +3 -3
  198. package/_assets/{serializeTransaction-j7iYzoGc.js → serializeTransaction-_n4Q8DJx.js} +2 -2
  199. package/_assets/{session-proposal-D1KW6vU-.js → session-proposal-pxbZUguK.js} +2 -2
  200. package/_assets/{session-request-e6CugmVB.js → session-request-QsQp7621.js} +3 -3
  201. package/_assets/{sha256-BA-vuBXk.js → sha256-DrP_sGCU.js} +2 -2
  202. package/_assets/{signing-sMIrBpXZ.js → signing-D-5WBJIN.js} +4 -4
  203. package/_assets/{skeleton.styles-CeNgpwmA.js → skeleton.styles-C55Czv4g.js} +2 -2
  204. package/_assets/{socials-CtFWrUyI.js → socials-CAtNsYYE.js} +2 -2
  205. package/_assets/{styled-CkcuORRf.js → styled-BSObFh8d.js} +3 -3
  206. package/_assets/{swaps-BARYCijA.js → swaps-BOgMov1T.js} +2 -2
  207. package/_assets/{thirdweb-ytdZA9bc.js → thirdweb-CA6VWP00.js} +4 -4
  208. package/_assets/{to-serializable-transaction-cd8s3OS2.js → to-serializable-transaction-OIwFNtvd.js} +3 -3
  209. package/_assets/{totalSupply-CMEXc5fp.js → totalSupply-BoWPNMDX.js} +2 -2
  210. package/_assets/{transaction-a0s7ECSz.js → transaction-ClJI_rOi.js} +2 -2
  211. package/_assets/{transactionReceipt-BAt8cFPF.js → transactionReceipt-DWjEdj_S.js} +2 -2
  212. package/_assets/{transactions-ByHqg5x-.js → transactions-BSwOK2TH.js} +2 -2
  213. package/_assets/{useCreditPacks-Ckn23vzO.js → useCreditPacks-CrrKa-aS.js} +2 -2
  214. package/_assets/{useInfiniteGrid-9WefgTDi.js → useInfiniteGrid-BeJ0Opet.js} +2 -2
  215. package/_assets/{useStore-N_mC1677.js → useStore-BxmMY8Ae.js} +3 -3
  216. package/_assets/{useTheme-Bu3MACbo.js → useTheme-CjdiJkYe.js} +2 -2
  217. package/_assets/{utils-Crj4-UsN.js → utils-CVWc9rYK.js} +2 -2
  218. package/_assets/{verifyHash-BEUgDt76.js → verifyHash-DYpfan-n.js} +2 -2
  219. package/_assets/{w3m-modal-RE75BeJu.js → w3m-modal-i9Zk4_CA.js} +2 -2
  220. package/_assets/{w3m-modal-BbcAEevu.js → w3m-modal-pAjcyBNu.js} +2 -2
  221. package/_assets/{wait-for-tx-receipt-Cfz_p-eJ.js → wait-for-tx-receipt-C3HfJA67.js} +2 -2
  222. package/_assets/{wallets-CdqbdTg2.js → wallets-z9a0Cb4_.js} +6 -6
  223. package/_assets/{web-connector-Bh-bvUc4.js → web-connector-D-4k05AB.js} +4 -4
  224. package/_assets/{writeContract-BLwTI_d-.js → writeContract-DxA2N6db.js} +2 -2
  225. package/_assets/{zora-sepolia-BdZA0oC2.js → zora-sepolia-BfekKcwP.js} +2 -2
  226. package/_assets/{zoraTestnet-BtgNtapD.js → zoraTestnet-BWpxt3z8.js} +2 -2
  227. package/index.html +11 -11
  228. package/package.json +2 -2
  229. package/_assets/Collection-CJ0qhQO3.js +0 -134
  230. package/_assets/MyAssets-B9u3D-BH.js +0 -331
  231. package/_assets/collectionPage.styles-B2aXuxAt.js +0 -41
  232. package/_assets/index-BVxaII-L.js +0 -3
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-DBZC4RO9.js","_assets/react-Dvs-h5b4.js","_assets/index-vtfh3nwp.js","_assets/dcl-schemas-C_BnTyQO.js","_assets/sentry-3Vm_u2Wu.js","_assets/ethers-J3-76ZXn.js","_assets/intl-AKLEHPeO.js","_assets/index-CSp9S8iO.css","_assets/sales-empty-XQOHpdM5.js","_assets/buy-DLOIoAYB.js","_assets/authorizations-Cl9CAf2g.js","_assets/sendMetaTransaction-C2E121QZ.js","_assets/ManaPricingBanner.styles-CfMtbmew.js","_assets/Faq-DBK0idBE.js","_assets/field.styles-BOY8_CFB.js"])))=>i.map(i=>d[i]);
2
- import{V as we,bJ as Ie,p as U,m as A,bK as Ae,t as o,s as l,n as Ee,o as Le,b as r,J as Ne,I as T,bL as se,bM as ne,bN as $e,_ as Pe,L as Te,r as E,aq as K,bO as Se,v as Ce,bn as B,E as Fe,bP as De,x as N,bQ as Me,bR as Q}from"./index-vtfh3nwp.js";import{r as g,u as He,j as t,e as Re,L as qe}from"./react-Dvs-h5b4.js";import{u as Oe,s as _e}from"./sales-empty-XQOHpdM5.js";import{L as ze}from"./LoadMore-BOHXzGNI.js";import{u as $}from"./useInfiniteGrid-9WefgTDi.js";import{m as de}from"./mana-matic-CEqvSwrJ.js";import{n as We}from"./name-glyph-aUugT8vq.js";import"./dcl-schemas-C_BnTyQO.js";import"./sentry-3Vm_u2Wu.js";import"./ethers-J3-76ZXn.js";import"./intl-AKLEHPeO.js";import"./buy-DLOIoAYB.js";import"./authorizations-Cl9CAf2g.js";import"./sendMetaTransaction-C2E121QZ.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="8e02b7a6-d49d-4aa1-be9d-e24d1110132a",e._sentryDebugIdIdentifier="sentry-dbid-8e02b7a6-d49d-4aa1-be9d-e24d1110132a")}catch{}})();const Ge=15e3;function Ue(e,s){return e.txHash&&s.txHash?e.txHash===s.txHash:e.txHash||s.txHash?!1:e.status===s.status&&Math.abs(e.createdAt-s.createdAt)<=Ge}function Ke(e){const s=[...e].sort((i,d)=>d.createdAt-i.createdAt),n=[];for(const i of s){const d=n[n.length-1];d&&Ue(d[d.length-1],i)?d.push(i):n.push([i])}return n.map(i=>{var d;return{id:((d=i.find(a=>a.txHash))==null?void 0:d.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(a=>a.createdAt)),status:Be(i),totalCredits:i.reduce((a,h)=>a+h.credits,0),lines:i}})}function Be(e){return e.some(s=>s.status==="PENDING")?"PENDING":e.some(s=>s.status==="SETTLED")?"SETTLED":"EXPIRED"}function Qe(e){return e==="SETTLED"?"SETTLED":e==="EXPIRED"?"FAILED":"PENDING"}function Ve(e){return e.tradeId?`trade:${e.tradeId}`:e.contractAddress&&e.itemId?`item:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}function Xe(e){const s=[],n=new Map;for(const i of e){const d=Ve(i);if(!d){s.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,registeredName:i.registeredName??null,quantity:1,credits:i.credits});continue}const a=n.get(d);if(a){a.quantity+=1,a.credits+=i.credits;continue}const h={key:d,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,registeredName:i.registeredName??null,quantity:1,credits:i.credits};n.set(d,h),s.push(h)}return s}function Je(e,s){return{id:e.id,contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId,counterparty:e.buyer,credits:s?we(e.manaWei,s):null,manaWei:e.manaWei,createdAt:e.createdAt,txHash:e.txHash}}function Ye(e){return e.status!=="EXPIRED"||!!e.submittedTxHash}function Ze(e){const n=Ke(e.purchases.filter(Ye)).map(c=>({kind:"purchase",id:`purchase:${c.id}`,createdAt:c.createdAt,order:c})),i=e.sales.map(c=>{const m=Je(c,e.rate);return{kind:"sale",id:`sale:${m.id}`,createdAt:m.createdAt,sale:m}}),d=(e.creditOrders??[]).filter(c=>c.status!=="failed"&&c.status!=="abandoned").map(c=>({kind:"credit",id:`credit:${c.id}`,createdAt:c.createdAt,order:c})),a=new Set(e.purchases.filter(c=>c.txHash).map(c=>c.txHash.toLowerCase())),h=(e.manaPurchases??[]).filter(c=>!a.has(c.txHash.toLowerCase())).map(c=>({kind:"mana-purchase",id:`mana-purchase:${c.id}`,createdAt:c.createdAt,sale:c}));return[...n,...i,...d,...h].sort((c,m)=>m.createdAt-c.createdAt||(c.id<m.id?-1:1))}function et(e,s){return s==="all"?e:s==="sales"?e.filter(n=>n.kind==="sale"):e.filter(n=>n.kind==="purchase"||n.kind==="credit"||n.kind==="mana-purchase")}const ce=e=>e.trim().toLowerCase();function tt(e){const s=new Map;for(const n of e??[]){const i=ce(n.txHash??"");if(!i)continue;const d=s.get(i);d?d.push(n):s.set(i,[n])}return s}function it(e,s,n=Date.now()){const i=s.txHash?e.get(ce(s.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const d=i.length===1?st(i[0].netCents):null,a=i.filter(c=>!c.available&&c.availableAt>n);if(a.length===0)return{kind:"credited",credits:d};const h=a.reduce((c,m)=>Math.max(c,m.availableAt),0);return{kind:"pending",credits:d,availableAt:h}}function st(e){return Ie(e)}function nt(){const e=U(i=>{var d;return(d=i.session)==null?void 0:d.address}),{data:s,isLoading:n}=A({queryKey:["listing-count",e],queryFn:()=>Ae({creator:e,onSale:!0,first:1}),enabled:!!e,staleTime:5*6e4});return{count:s==null?void 0:s.total,isLoading:n}}const at="https://cdn.decentraland.org/@dcl/shop/1.12.2-34818068749.commit-deb7840/_assets/credits-product-vs4Q6u6l.svg",V=Ee`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-C30-AgzK.js","_assets/react-a2ePEDgy.js","_assets/index-Be9BP3SJ.js","_assets/dcl-schemas-D5wchj0M.js","_assets/sentry-XIbC1v9G.js","_assets/ethers-nJ6WEmLC.js","_assets/intl-AKLEHPeO.js","_assets/index-D4szyEqt.css","_assets/sales-empty-C8x6kUpP.js","_assets/buy-DKnUYoQz.js","_assets/authorizations-JXhdylb0.js","_assets/sendMetaTransaction-C-Mzgrci.js","_assets/ManaPricingBanner.styles-CTRbVMgV.js","_assets/Faq-BzpiZnqD.js","_assets/field.styles-CEGIirkl.js"])))=>i.map(i=>d[i]);
2
+ import{V as we,bJ as Ie,p as U,m as A,bK as Ae,t as o,s as l,n as Ee,o as Le,b as r,J as Ne,I as T,bL as se,bM as ne,bN as $e,_ as Pe,L as Te,r as E,aq as K,bO as Se,v as Ce,bn as B,E as Fe,bP as De,x as N,bQ as Me,bR as Q}from"./index-Be9BP3SJ.js";import{r as g,u as He,j as t,e as Re,L as qe}from"./react-a2ePEDgy.js";import{u as Oe,s as _e}from"./sales-empty-C8x6kUpP.js";import{L as ze}from"./LoadMore-CK6ovlLm.js";import{u as $}from"./useInfiniteGrid-BeJ0Opet.js";import{m as de}from"./mana-matic-CEqvSwrJ.js";import{n as We}from"./name-glyph-aUugT8vq.js";import"./dcl-schemas-D5wchj0M.js";import"./sentry-XIbC1v9G.js";import"./ethers-nJ6WEmLC.js";import"./intl-AKLEHPeO.js";import"./buy-DKnUYoQz.js";import"./authorizations-JXhdylb0.js";import"./sendMetaTransaction-C-Mzgrci.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="e12dae18-4b4b-4df2-8484-8a5eecaff478",e._sentryDebugIdIdentifier="sentry-dbid-e12dae18-4b4b-4df2-8484-8a5eecaff478")}catch{}})();const Ge=15e3;function Ue(e,s){return e.txHash&&s.txHash?e.txHash===s.txHash:e.txHash||s.txHash?!1:e.status===s.status&&Math.abs(e.createdAt-s.createdAt)<=Ge}function Ke(e){const s=[...e].sort((i,d)=>d.createdAt-i.createdAt),n=[];for(const i of s){const d=n[n.length-1];d&&Ue(d[d.length-1],i)?d.push(i):n.push([i])}return n.map(i=>{var d;return{id:((d=i.find(a=>a.txHash))==null?void 0:d.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(a=>a.createdAt)),status:Be(i),totalCredits:i.reduce((a,h)=>a+h.credits,0),lines:i}})}function Be(e){return e.some(s=>s.status==="PENDING")?"PENDING":e.some(s=>s.status==="SETTLED")?"SETTLED":"EXPIRED"}function Qe(e){return e==="SETTLED"?"SETTLED":e==="EXPIRED"?"FAILED":"PENDING"}function Ve(e){return e.tradeId?`trade:${e.tradeId}`:e.contractAddress&&e.itemId?`item:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}function Xe(e){const s=[],n=new Map;for(const i of e){const d=Ve(i);if(!d){s.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,registeredName:i.registeredName??null,quantity:1,credits:i.credits});continue}const a=n.get(d);if(a){a.quantity+=1,a.credits+=i.credits;continue}const h={key:d,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,registeredName:i.registeredName??null,quantity:1,credits:i.credits};n.set(d,h),s.push(h)}return s}function Je(e,s){return{id:e.id,contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId,counterparty:e.buyer,credits:s?we(e.manaWei,s):null,manaWei:e.manaWei,createdAt:e.createdAt,txHash:e.txHash}}function Ye(e){return e.status!=="EXPIRED"||!!e.submittedTxHash}function Ze(e){const n=Ke(e.purchases.filter(Ye)).map(c=>({kind:"purchase",id:`purchase:${c.id}`,createdAt:c.createdAt,order:c})),i=e.sales.map(c=>{const m=Je(c,e.rate);return{kind:"sale",id:`sale:${m.id}`,createdAt:m.createdAt,sale:m}}),d=(e.creditOrders??[]).filter(c=>c.status!=="failed"&&c.status!=="abandoned").map(c=>({kind:"credit",id:`credit:${c.id}`,createdAt:c.createdAt,order:c})),a=new Set(e.purchases.filter(c=>c.txHash).map(c=>c.txHash.toLowerCase())),h=(e.manaPurchases??[]).filter(c=>!a.has(c.txHash.toLowerCase())).map(c=>({kind:"mana-purchase",id:`mana-purchase:${c.id}`,createdAt:c.createdAt,sale:c}));return[...n,...i,...d,...h].sort((c,m)=>m.createdAt-c.createdAt||(c.id<m.id?-1:1))}function et(e,s){return s==="all"?e:s==="sales"?e.filter(n=>n.kind==="sale"):e.filter(n=>n.kind==="purchase"||n.kind==="credit"||n.kind==="mana-purchase")}const ce=e=>e.trim().toLowerCase();function tt(e){const s=new Map;for(const n of e??[]){const i=ce(n.txHash??"");if(!i)continue;const d=s.get(i);d?d.push(n):s.set(i,[n])}return s}function it(e,s,n=Date.now()){const i=s.txHash?e.get(ce(s.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const d=i.length===1?st(i[0].netCents):null,a=i.filter(c=>!c.available&&c.availableAt>n);if(a.length===0)return{kind:"credited",credits:d};const h=a.reduce((c,m)=>Math.max(c,m.availableAt),0);return{kind:"pending",credits:d,availableAt:h}}function st(e){return Ie(e)}function nt(){const e=U(i=>{var d;return(d=i.session)==null?void 0:d.address}),{data:s,isLoading:n}=A({queryKey:["listing-count",e],queryFn:()=>Ae({creator:e,onSale:!0,first:1}),enabled:!!e,staleTime:5*6e4});return{count:s==null?void 0:s.total,isLoading:n}}const at="https://cdn.decentraland.org/@dcl/shop/1.12.2-34823553415.commit-aeaec50/_assets/credits-product-vs4Q6u6l.svg",V=Ee`
3
3
  0% { background-position: 200% 0; }
4
4
  100% { background-position: -200% 0; }
5
5
  `,rt=l.section`
@@ -385,5 +385,5 @@ import{V as we,bJ as Ie,p as U,m as A,bK as Ae,t as o,s as l,n as Ee,o as Le,b a
385
385
  height: 26px;
386
386
  object-fit: contain;
387
387
  }
388
- `,Z=L.withComponent(qe),wt=g.lazy(()=>Pe(()=>import("./index-DBZC4RO9.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])).then(e=>({default:e.ImportListings}))),P=24,It=["all","purchases","sales"],W="section",oe="listings",G="view",At="migrate";function I(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function pe(e){return e.length>10?`${e.slice(0,6)}…${e.slice(-4)}`:e}function me(e){const s=Number(e)/1e18;return Number.isFinite(s)?s.toLocaleString("en",{maximumFractionDigits:2}):"0"}function xe({children:e}){const s=g.useRef(null),[n,i]=g.useState(null),d=()=>{var h;const a=(h=s.current)==null?void 0:h.getBoundingClientRect();a&&i({top:a.bottom+8,left:a.left+a.width/2})};return t.jsxs(xt,{ref:s,tabIndex:0,onMouseEnter:d,onMouseLeave:()=>i(null),onFocus:d,onBlur:()=>i(null),children:[e,n?Re.createPortal(t.jsx(gt,{style:{top:n.top,left:n.left},role:"tooltip",children:r("activity.polygonMana")}),document.body):null]})}function Et({item:e}){const s=!!e.contractAddress&&!!e.itemId,n=!!e.tradeId||s,{data:i,isLoading:d}=A({queryKey:["order-line-display",e.tradeId,e.contractAddress,e.itemId],queryFn:()=>e.tradeId?Me(e.tradeId):Q(e.contractAddress,{itemId:e.itemId}),enabled:n,staleTime:5*6e4}),a=n&&d,h=(i==null?void 0:i.name)??r("activity.itemFallback"),c=(i==null?void 0:i.thumbnail)??"",m=B({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,f=t.jsxs(t.Fragment,{children:[a?t.jsx(J,{}):t.jsx(q,{children:c?t.jsx("img",{src:c,alt:h}):t.jsx(T,{name:"cart",size:20})}),t.jsxs(O,{children:[a?t.jsx(Y,{}):t.jsx(_,{title:h,children:h}),e.quantity>1?t.jsx(z,{children:r("activity.quantity",{count:e.quantity})}):null]}),t.jsxs(he,{children:[t.jsx(E,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.credits})]})]});return m?t.jsx(Z,{to:m,"data-link":"true",children:f}):t.jsx(L,{children:f})}function Lt({item:e}){const s=`@${e.registeredName}`;return t.jsxs(L,{"data-testid":"activity-name-line",children:[t.jsx(kt,{children:t.jsx("img",{src:We,alt:""})}),t.jsxs(O,{children:[t.jsx(_,{title:s,children:s}),t.jsx(z,{children:r("activity.nameRegistration")})]}),t.jsxs(he,{children:[t.jsx(E,{className:"ccy-mark"})," ",e.credits]})]})}function Nt({order:e}){const s=Xe(e.lines),n=s.reduce((a,h)=>a+h.quantity,0),i=Qe(e.status),d=i==="SETTLED"?r("activity.completed"):i==="FAILED"?r("activity.failed"):r("activity.processing");return t.jsxs(S,{"data-testid":"purchase-order",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsxs(M,{children:[r("activity.purchaseLabel")," · ",r("activity.itemCount",{count:n})]})]}),t.jsxs(H,{children:[t.jsx(R,{"data-status":i,children:d}),t.jsxs(k,{children:[t.jsx(E,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.totalCredits})]})]})]}),i==="FAILED"?t.jsx(ft,{children:r("activity.purchaseFailedNote")}):null,t.jsx(X,{children:s.map(a=>a.registeredName?t.jsx(Lt,{item:a},a.key):t.jsx(Et,{item:a},a.key))})]})}function $t({sale:e}){const{data:s,isLoading:n}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>Q(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),i=(s==null?void 0:s.name)??r("activity.itemFallback"),d=(s==null?void 0:s.thumbnail)??"",a=B({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,h=t.jsxs(t.Fragment,{children:[n?t.jsx(J,{}):t.jsx(q,{children:d?t.jsx("img",{src:d,alt:i}):t.jsx(T,{name:"offer",size:20})}),t.jsxs(O,{children:[n?t.jsx(Y,{}):t.jsx(_,{title:i,children:i}),t.jsx(z,{children:r("activity.boughtFrom",{account:pe(e.seller)})})]})]});return t.jsxs(S,{"data-testid":"activity-mana-purchase",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsx(M,{children:r("activity.paidWithMana")})]}),t.jsxs(H,{children:[t.jsx(R,{"data-status":"SETTLED",children:r("activity.completed")}),t.jsxs(k,{children:[me(e.manaWei)," ",t.jsx(xe,{children:t.jsx(ue,{src:de,alt:"MANA"})})]})]})]}),t.jsx(X,{children:a?t.jsx(Z,{to:a,"data-link":"true",children:h}):t.jsx(L,{children:h})})]})}function Pt({sale:e,payout:s}){const{data:n,isLoading:i}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>Q(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),d=(n==null?void 0:n.name)??r("activity.itemFallback"),a=(n==null?void 0:n.thumbnail)??"",h=B({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,c=t.jsxs(t.Fragment,{children:[i?t.jsx(J,{}):t.jsx(q,{children:a?t.jsx("img",{src:a,alt:d}):t.jsx(T,{name:"offer",size:20})}),t.jsxs(O,{children:[i?t.jsx(Y,{}):t.jsx(_,{title:d,children:d}),t.jsxs(z,{children:[r("activity.soldTo",{account:pe(e.counterparty)}),s.kind==="pending"?` · ${r("activity.payoutPendingOn",{date:I(s.availableAt)})}`:""]})]})]});return t.jsxs(S,{"data-testid":"activity-sale",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsx(M,{children:r("activity.saleLabel")})]}),t.jsxs(H,{children:[t.jsx(R,{"data-status":s.kind==="pending"?"PENDING":"SOLD",children:s.kind==="pending"?r("activity.payoutPending"):r("activity.sold")}),s.kind==="direct"?t.jsxs(k,{"data-kind":"income",children:["+",me(e.manaWei)," ",t.jsx(xe,{children:t.jsx(ue,{src:de,alt:"MANA"})})]}):s.credits!==null?t.jsxs(k,{"data-kind":"income",children:[t.jsx(E,{className:"ccy-mark"})," +",Fe(s.credits)]}):t.jsx(k,{"data-kind":"income",children:r("activity.payoutCredited")})]})]}),t.jsx(X,{children:h?t.jsx(Z,{to:h,"data-link":"true",children:c}):t.jsx(L,{children:c})})]})}function Tt({order:e}){const s=`$${(e.usdCents/100).toFixed(2)}`,n=Se(e.status),i=n==="SETTLED"?r("activity.completed"):n==="FAILED"?r("activity.failed"):n==="UNFINISHED"?r("activity.unfinished"):r("activity.processing"),d=U(p=>p.session),a=Ce(),[h,c]=g.useState(!1),m=e.status==="initiated"&&!!d;g.useEffect(()=>{const p=()=>c(!1);return window.addEventListener("pageshow",p),()=>window.removeEventListener("pageshow",p)},[]);async function f(){if(!(!d||h)){c(!0);try{const p=await De(e.id,d.identity);if(p.kind==="url"){if(/^https:\/\/([a-z0-9-]+\.)*stripe\.com\//i.test(p.url)){window.location.href=p.url;return}N.error(r("activity.resumeUnavailable"))}else p.kind==="expired"?(N.info(r("activity.resumeExpired")),a.invalidateQueries({queryKey:["credit-orders"]})):p.kind==="paid"?(N.success(r("activity.resumePaid")),a.invalidateQueries({queryKey:["credit-orders"]})):N.error(r("activity.resumeUnavailable"));c(!1)}catch{c(!1)}}}return t.jsx(S,{"data-testid":"credit-order",children:t.jsxs(C,{children:[t.jsx(pt,{children:t.jsx("img",{src:at,alt:"","aria-hidden":!0})}),t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsxs(M,{children:[r("activity.creditPurchaseLabel")," · ",r("activity.creditPaid",{usd:s})]})]}),t.jsxs(H,{children:[m?t.jsx(mt,{type:"button",onClick:()=>void f(),disabled:h,"data-testid":"resume-order",children:h?r("activity.resuming"):r("activity.resume")}):null,t.jsx(R,{"data-status":n,children:i}),t.jsxs(k,{"data-kind":n==="UNFINISHED"?void 0:"income",children:[n==="UNFINISHED"?"":"+",t.jsx(E,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.credits})]})]})]})})}function St({filter:e}){const s={all:r("activity.emptyAllBody"),purchases:r("activity.emptyPurchasesBody"),sales:r("activity.emptySalesBody")}[e];return t.jsx(bt,{children:t.jsx(Te,{testId:`activity-empty-${e}`,icon:_e,title:r("activity.emptyTitle"),body:s,cta:{label:r("assets.empty.cta"),to:"/items"}})})}function Bt(){const{session:e}=U(),[s,n]=g.useState("all"),[i,d]=He(),a=i.get(W)===oe||i.get(G)===At;Le({title:a?r("seo.import.title"):r("nav.activity"),noindex:!0});const{count:h}=Oe(),{count:c}=nt(),f=h!==void 0&&c!==void 0&&(h>0||c>0||a),p=!!e&&!a&&s!=="sales",x=!!e&&!a&&s!=="purchases",b=$(["purchases",e==null?void 0:e.address],u=>$e(e.address,e.identity,{first:P,skip:u}),{enabled:p}),y=$(["sales",e==null?void 0:e.address],u=>se(e.address,{role:"seller",first:P,skip:u}),{enabled:x}),v=$(["credit-orders",e==null?void 0:e.address],u=>ne(e.address,e.identity,{first:P,skip:u}),{enabled:p}),j=$(["mana-purchases",e==null?void 0:e.address],u=>se(e.address,{role:"buyer",first:P,skip:u}),{enabled:p}),{data:ee}=A({queryKey:["sale-payouts",e==null?void 0:e.address],queryFn:()=>ne(e.address,e.identity,{first:200}).then(u=>u.payouts),enabled:x,staleTime:6e4}),ge=g.useMemo(()=>tt(ee),[ee]),{data:fe}=Ne(x);if(!e)return t.jsxs(yt,{children:[t.jsx(T,{name:"clock",size:40,color:o.colors.muted2}),t.jsx(vt,{children:r("activity.signInTitle")}),t.jsx(jt,{children:r("activity.signInBody")})]});const te=et(Ze({purchases:p?b.items:[],sales:x?y.items:[],creditOrders:p?v.items:[],manaPurchases:p?j.items:[],rate:fe}),s),be=p&&(b.isLoading||v.isLoading||j.isLoading)||x&&y.isLoading,ie=p&&(b.isFetchingNextPage||v.isFetchingNextPage||j.isFetchingNextPage)||x&&y.isFetchingNextPage,ye=p&&(b.hasNextPage||v.hasNextPage||j.hasNextPage)||x&&y.hasNextPage;function ve(){p&&b.hasNextPage&&b.fetchNextPage(),p&&v.hasNextPage&&v.fetchNextPage(),p&&j.hasNextPage&&j.fetchNextPage(),x&&y.hasNextPage&&y.fetchNextPage()}function je(u){if(n(u),!a)return;const w=new URLSearchParams(i);w.delete(W),w.delete(G),d(w,{replace:!0})}function ke(){const u=new URLSearchParams(i);u.set(W,oe),u.delete(G),d(u,{replace:!0})}return t.jsxs(rt,{children:[t.jsx(ot,{children:t.jsx(dt,{children:r("nav.activity")})}),t.jsxs(ct,{role:"tablist","aria-label":r("nav.activity"),children:[It.map(u=>t.jsx(le,{type:"button",role:"tab","aria-selected":!a&&s===u,"data-active":!a&&s===u,"data-testid":`activity-filter-${u}`,onClick:()=>je(u),children:r(`activity.filter.${u}`)},u)),f?t.jsxs(lt,{type:"button",role:"tab","aria-selected":a,"data-active":a,"data-testid":"activity-filter-migrate","aria-label":h?r("activity.migrate.chipAria",{count:h}):void 0,onClick:ke,children:[r("activity.migrate.chip"),h?t.jsx(ut,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:h}):null]}):null]}),a?t.jsx(g.Suspense,{fallback:t.jsx(ht,{"aria-busy":"true"}),children:t.jsx(wt,{})}):be?t.jsx(ae,{children:Array.from({length:5}).map((u,w)=>t.jsx(re,{},w))}):te.length===0?t.jsx(St,{filter:s}):t.jsxs(t.Fragment,{children:[t.jsxs(ae,{children:[te.map(u=>u.kind==="purchase"?t.jsx(Nt,{order:u.order},u.id):u.kind==="credit"?t.jsx(Tt,{order:u.order},u.id):u.kind==="mana-purchase"?t.jsx($t,{sale:u.sale},u.id):t.jsx(Pt,{sale:u.sale,payout:it(ge,u.sale)},u.id)),ie?t.jsx(re,{}):null]}),t.jsx(ze,{hasNextPage:ye,isFetching:ie,onLoadMore:ve})]})]})}export{Bt as Activity};
389
- //# sourceMappingURL=Activity-Ln2KNjXv.js.map
388
+ `,Z=L.withComponent(qe),wt=g.lazy(()=>Pe(()=>import("./index-C30-AgzK.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])).then(e=>({default:e.ImportListings}))),P=24,It=["all","purchases","sales"],W="section",oe="listings",G="view",At="migrate";function I(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function pe(e){return e.length>10?`${e.slice(0,6)}…${e.slice(-4)}`:e}function me(e){const s=Number(e)/1e18;return Number.isFinite(s)?s.toLocaleString("en",{maximumFractionDigits:2}):"0"}function xe({children:e}){const s=g.useRef(null),[n,i]=g.useState(null),d=()=>{var h;const a=(h=s.current)==null?void 0:h.getBoundingClientRect();a&&i({top:a.bottom+8,left:a.left+a.width/2})};return t.jsxs(xt,{ref:s,tabIndex:0,onMouseEnter:d,onMouseLeave:()=>i(null),onFocus:d,onBlur:()=>i(null),children:[e,n?Re.createPortal(t.jsx(gt,{style:{top:n.top,left:n.left},role:"tooltip",children:r("activity.polygonMana")}),document.body):null]})}function Et({item:e}){const s=!!e.contractAddress&&!!e.itemId,n=!!e.tradeId||s,{data:i,isLoading:d}=A({queryKey:["order-line-display",e.tradeId,e.contractAddress,e.itemId],queryFn:()=>e.tradeId?Me(e.tradeId):Q(e.contractAddress,{itemId:e.itemId}),enabled:n,staleTime:5*6e4}),a=n&&d,h=(i==null?void 0:i.name)??r("activity.itemFallback"),c=(i==null?void 0:i.thumbnail)??"",m=B({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,f=t.jsxs(t.Fragment,{children:[a?t.jsx(J,{}):t.jsx(q,{children:c?t.jsx("img",{src:c,alt:h}):t.jsx(T,{name:"cart",size:20})}),t.jsxs(O,{children:[a?t.jsx(Y,{}):t.jsx(_,{title:h,children:h}),e.quantity>1?t.jsx(z,{children:r("activity.quantity",{count:e.quantity})}):null]}),t.jsxs(he,{children:[t.jsx(E,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.credits})]})]});return m?t.jsx(Z,{to:m,"data-link":"true",children:f}):t.jsx(L,{children:f})}function Lt({item:e}){const s=`@${e.registeredName}`;return t.jsxs(L,{"data-testid":"activity-name-line",children:[t.jsx(kt,{children:t.jsx("img",{src:We,alt:""})}),t.jsxs(O,{children:[t.jsx(_,{title:s,children:s}),t.jsx(z,{children:r("activity.nameRegistration")})]}),t.jsxs(he,{children:[t.jsx(E,{className:"ccy-mark"})," ",e.credits]})]})}function Nt({order:e}){const s=Xe(e.lines),n=s.reduce((a,h)=>a+h.quantity,0),i=Qe(e.status),d=i==="SETTLED"?r("activity.completed"):i==="FAILED"?r("activity.failed"):r("activity.processing");return t.jsxs(S,{"data-testid":"purchase-order",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsxs(M,{children:[r("activity.purchaseLabel")," · ",r("activity.itemCount",{count:n})]})]}),t.jsxs(H,{children:[t.jsx(R,{"data-status":i,children:d}),t.jsxs(k,{children:[t.jsx(E,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.totalCredits})]})]})]}),i==="FAILED"?t.jsx(ft,{children:r("activity.purchaseFailedNote")}):null,t.jsx(X,{children:s.map(a=>a.registeredName?t.jsx(Lt,{item:a},a.key):t.jsx(Et,{item:a},a.key))})]})}function $t({sale:e}){const{data:s,isLoading:n}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>Q(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),i=(s==null?void 0:s.name)??r("activity.itemFallback"),d=(s==null?void 0:s.thumbnail)??"",a=B({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,h=t.jsxs(t.Fragment,{children:[n?t.jsx(J,{}):t.jsx(q,{children:d?t.jsx("img",{src:d,alt:i}):t.jsx(T,{name:"offer",size:20})}),t.jsxs(O,{children:[n?t.jsx(Y,{}):t.jsx(_,{title:i,children:i}),t.jsx(z,{children:r("activity.boughtFrom",{account:pe(e.seller)})})]})]});return t.jsxs(S,{"data-testid":"activity-mana-purchase",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsx(M,{children:r("activity.paidWithMana")})]}),t.jsxs(H,{children:[t.jsx(R,{"data-status":"SETTLED",children:r("activity.completed")}),t.jsxs(k,{children:[me(e.manaWei)," ",t.jsx(xe,{children:t.jsx(ue,{src:de,alt:"MANA"})})]})]})]}),t.jsx(X,{children:a?t.jsx(Z,{to:a,"data-link":"true",children:h}):t.jsx(L,{children:h})})]})}function Pt({sale:e,payout:s}){const{data:n,isLoading:i}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>Q(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),d=(n==null?void 0:n.name)??r("activity.itemFallback"),a=(n==null?void 0:n.thumbnail)??"",h=B({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,c=t.jsxs(t.Fragment,{children:[i?t.jsx(J,{}):t.jsx(q,{children:a?t.jsx("img",{src:a,alt:d}):t.jsx(T,{name:"offer",size:20})}),t.jsxs(O,{children:[i?t.jsx(Y,{}):t.jsx(_,{title:d,children:d}),t.jsxs(z,{children:[r("activity.soldTo",{account:pe(e.counterparty)}),s.kind==="pending"?` · ${r("activity.payoutPendingOn",{date:I(s.availableAt)})}`:""]})]})]});return t.jsxs(S,{"data-testid":"activity-sale",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsx(M,{children:r("activity.saleLabel")})]}),t.jsxs(H,{children:[t.jsx(R,{"data-status":s.kind==="pending"?"PENDING":"SOLD",children:s.kind==="pending"?r("activity.payoutPending"):r("activity.sold")}),s.kind==="direct"?t.jsxs(k,{"data-kind":"income",children:["+",me(e.manaWei)," ",t.jsx(xe,{children:t.jsx(ue,{src:de,alt:"MANA"})})]}):s.credits!==null?t.jsxs(k,{"data-kind":"income",children:[t.jsx(E,{className:"ccy-mark"})," +",Fe(s.credits)]}):t.jsx(k,{"data-kind":"income",children:r("activity.payoutCredited")})]})]}),t.jsx(X,{children:h?t.jsx(Z,{to:h,"data-link":"true",children:c}):t.jsx(L,{children:c})})]})}function Tt({order:e}){const s=`$${(e.usdCents/100).toFixed(2)}`,n=Se(e.status),i=n==="SETTLED"?r("activity.completed"):n==="FAILED"?r("activity.failed"):n==="UNFINISHED"?r("activity.unfinished"):r("activity.processing"),d=U(p=>p.session),a=Ce(),[h,c]=g.useState(!1),m=e.status==="initiated"&&!!d;g.useEffect(()=>{const p=()=>c(!1);return window.addEventListener("pageshow",p),()=>window.removeEventListener("pageshow",p)},[]);async function f(){if(!(!d||h)){c(!0);try{const p=await De(e.id,d.identity);if(p.kind==="url"){if(/^https:\/\/([a-z0-9-]+\.)*stripe\.com\//i.test(p.url)){window.location.href=p.url;return}N.error(r("activity.resumeUnavailable"))}else p.kind==="expired"?(N.info(r("activity.resumeExpired")),a.invalidateQueries({queryKey:["credit-orders"]})):p.kind==="paid"?(N.success(r("activity.resumePaid")),a.invalidateQueries({queryKey:["credit-orders"]})):N.error(r("activity.resumeUnavailable"));c(!1)}catch{c(!1)}}}return t.jsx(S,{"data-testid":"credit-order",children:t.jsxs(C,{children:[t.jsx(pt,{children:t.jsx("img",{src:at,alt:"","aria-hidden":!0})}),t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsxs(M,{children:[r("activity.creditPurchaseLabel")," · ",r("activity.creditPaid",{usd:s})]})]}),t.jsxs(H,{children:[m?t.jsx(mt,{type:"button",onClick:()=>void f(),disabled:h,"data-testid":"resume-order",children:h?r("activity.resuming"):r("activity.resume")}):null,t.jsx(R,{"data-status":n,children:i}),t.jsxs(k,{"data-kind":n==="UNFINISHED"?void 0:"income",children:[n==="UNFINISHED"?"":"+",t.jsx(E,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.credits})]})]})]})})}function St({filter:e}){const s={all:r("activity.emptyAllBody"),purchases:r("activity.emptyPurchasesBody"),sales:r("activity.emptySalesBody")}[e];return t.jsx(bt,{children:t.jsx(Te,{testId:`activity-empty-${e}`,icon:_e,title:r("activity.emptyTitle"),body:s,cta:{label:r("assets.empty.cta"),to:"/items"}})})}function Bt(){const{session:e}=U(),[s,n]=g.useState("all"),[i,d]=He(),a=i.get(W)===oe||i.get(G)===At;Le({title:a?r("seo.import.title"):r("nav.activity"),noindex:!0});const{count:h}=Oe(),{count:c}=nt(),f=h!==void 0&&c!==void 0&&(h>0||c>0||a),p=!!e&&!a&&s!=="sales",x=!!e&&!a&&s!=="purchases",b=$(["purchases",e==null?void 0:e.address],u=>$e(e.address,e.identity,{first:P,skip:u}),{enabled:p}),y=$(["sales",e==null?void 0:e.address],u=>se(e.address,{role:"seller",first:P,skip:u}),{enabled:x}),v=$(["credit-orders",e==null?void 0:e.address],u=>ne(e.address,e.identity,{first:P,skip:u}),{enabled:p}),j=$(["mana-purchases",e==null?void 0:e.address],u=>se(e.address,{role:"buyer",first:P,skip:u}),{enabled:p}),{data:ee}=A({queryKey:["sale-payouts",e==null?void 0:e.address],queryFn:()=>ne(e.address,e.identity,{first:200}).then(u=>u.payouts),enabled:x,staleTime:6e4}),ge=g.useMemo(()=>tt(ee),[ee]),{data:fe}=Ne(x);if(!e)return t.jsxs(yt,{children:[t.jsx(T,{name:"clock",size:40,color:o.colors.muted2}),t.jsx(vt,{children:r("activity.signInTitle")}),t.jsx(jt,{children:r("activity.signInBody")})]});const te=et(Ze({purchases:p?b.items:[],sales:x?y.items:[],creditOrders:p?v.items:[],manaPurchases:p?j.items:[],rate:fe}),s),be=p&&(b.isLoading||v.isLoading||j.isLoading)||x&&y.isLoading,ie=p&&(b.isFetchingNextPage||v.isFetchingNextPage||j.isFetchingNextPage)||x&&y.isFetchingNextPage,ye=p&&(b.hasNextPage||v.hasNextPage||j.hasNextPage)||x&&y.hasNextPage;function ve(){p&&b.hasNextPage&&b.fetchNextPage(),p&&v.hasNextPage&&v.fetchNextPage(),p&&j.hasNextPage&&j.fetchNextPage(),x&&y.hasNextPage&&y.fetchNextPage()}function je(u){if(n(u),!a)return;const w=new URLSearchParams(i);w.delete(W),w.delete(G),d(w,{replace:!0})}function ke(){const u=new URLSearchParams(i);u.set(W,oe),u.delete(G),d(u,{replace:!0})}return t.jsxs(rt,{children:[t.jsx(ot,{children:t.jsx(dt,{children:r("nav.activity")})}),t.jsxs(ct,{role:"tablist","aria-label":r("nav.activity"),children:[It.map(u=>t.jsx(le,{type:"button",role:"tab","aria-selected":!a&&s===u,"data-active":!a&&s===u,"data-testid":`activity-filter-${u}`,onClick:()=>je(u),children:r(`activity.filter.${u}`)},u)),f?t.jsxs(lt,{type:"button",role:"tab","aria-selected":a,"data-active":a,"data-testid":"activity-filter-migrate","aria-label":h?r("activity.migrate.chipAria",{count:h}):void 0,onClick:ke,children:[r("activity.migrate.chip"),h?t.jsx(ut,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:h}):null]}):null]}),a?t.jsx(g.Suspense,{fallback:t.jsx(ht,{"aria-busy":"true"}),children:t.jsx(wt,{})}):be?t.jsx(ae,{children:Array.from({length:5}).map((u,w)=>t.jsx(re,{},w))}):te.length===0?t.jsx(St,{filter:s}):t.jsxs(t.Fragment,{children:[t.jsxs(ae,{children:[te.map(u=>u.kind==="purchase"?t.jsx(Nt,{order:u.order},u.id):u.kind==="credit"?t.jsx(Tt,{order:u.order},u.id):u.kind==="mana-purchase"?t.jsx($t,{sale:u.sale},u.id):t.jsx(Pt,{sale:u.sale,payout:it(ge,u.sale)},u.id)),ie?t.jsx(re,{}):null]}),t.jsx(ze,{hasNextPage:ye,isFetching:ie,onLoadMore:ve})]})]})}export{Bt as Activity};
389
+ //# sourceMappingURL=Activity-DbMY05Td.js.map
@@ -1,4 +1,4 @@
1
- import{r as u,j as d}from"./react-Dvs-h5b4.js";import{s as f}from"./index-vtfh3nwp.js";import"./dcl-schemas-C_BnTyQO.js";import"./sentry-3Vm_u2Wu.js";import"./ethers-J3-76ZXn.js";import"./intl-AKLEHPeO.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]="411c978c-4d72-4b0f-8019-acca9fb758d2",e._sentryDebugIdIdentifier="sentry-dbid-411c978c-4d72-4b0f-8019-acca9fb758d2")}catch{}})();const D="https://cdn.decentraland.org/@dcl/shop/1.12.2-34818068749.commit-deb7840/_assets/custom-welcome-background-BxlFQma9.webp",P="https://cdn.decentraland.org/@dcl/shop/1.12.2-34818068749.commit-deb7840/_assets/DCL_LogoPattern-BryBPc3d.png",L=`
1
+ import{r as u,j as d}from"./react-a2ePEDgy.js";import{s as m}from"./index-Be9BP3SJ.js";import"./dcl-schemas-D5wchj0M.js";import"./sentry-XIbC1v9G.js";import"./ethers-nJ6WEmLC.js";import"./intl-AKLEHPeO.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]="eeaeaea6-1bc3-436c-840a-708068b442ef",e._sentryDebugIdIdentifier="sentry-dbid-eeaeaea6-1bc3-436c-840a-708068b442ef")}catch{}})();const D="https://cdn.decentraland.org/@dcl/shop/1.12.2-34823553415.commit-aeaec50/_assets/custom-welcome-background-BxlFQma9.webp",P="https://cdn.decentraland.org/@dcl/shop/1.12.2-34823553415.commit-aeaec50/_assets/DCL_LogoPattern-BryBPc3d.png",L=`
2
2
  attribute vec2 a_position;
3
3
  varying vec2 v_uv;
4
4
  void main() {
@@ -77,11 +77,11 @@ void main() {
77
77
 
78
78
  gl_FragColor = result;
79
79
  }
80
- `;function p(e,a,n){const r=e.createShader(a);return r?(e.shaderSource(r,n),e.compileShader(r),e.getShaderParameter(r,e.COMPILE_STATUS)?r:(console.error("Shader compile error:",e.getShaderInfoLog(r)),e.deleteShader(r),null)):null}function B(e,a,n){const r=e.createProgram();return r?(e.attachShader(r,a),e.attachShader(r,n),e.linkProgram(r),e.getProgramParameter(r,e.LINK_STATUS)?r:(console.error("Program link error:",e.getProgramInfoLog(r)),e.deleteProgram(r),null)):null}function F(e,a,n){const r=e.createTexture();if(!r)return null;e.bindTexture(e.TEXTURE_2D,r),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array([128,128,128,255]));const o=new Image;return o.crossOrigin="anonymous",o.onload=()=>{n!=null&&n()||(e.bindTexture(e.TEXTURE_2D,r),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,o),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.generateMipmap(e.TEXTURE_2D))},o.src=a,r}const C=f.div`
80
+ `;function p(e,a,n){const r=e.createShader(a);return r?(e.shaderSource(r,n),e.compileShader(r),e.getShaderParameter(r,e.COMPILE_STATUS)?r:(console.error("Shader compile error:",e.getShaderInfoLog(r)),e.deleteShader(r),null)):null}function B(e,a,n){const r=e.createProgram();return r?(e.attachShader(r,a),e.attachShader(r,n),e.linkProgram(r),e.getProgramParameter(r,e.LINK_STATUS)?r:(console.error("Program link error:",e.getProgramInfoLog(r)),e.deleteProgram(r),null)):null}function F(e,a,n){const r=e.createTexture();if(!r)return null;e.bindTexture(e.TEXTURE_2D,r),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array([128,128,128,255]));const o=new Image;return o.crossOrigin="anonymous",o.onload=()=>{n!=null&&n()||(e.bindTexture(e.TEXTURE_2D,r),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,o),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.generateMipmap(e.TEXTURE_2D))},o.src=a,r}const C=m.div`
81
81
  position: absolute;
82
82
  inset: 0;
83
83
  overflow: hidden;
84
- `,k=f.div`
84
+ `,k=m.div`
85
85
  position: absolute;
86
86
  inset: 0;
87
87
  width: 100%;
@@ -89,10 +89,10 @@ void main() {
89
89
  background-size: cover;
90
90
  background-position: center;
91
91
  background-repeat: no-repeat;
92
- `,V=f.canvas`
92
+ `,V=m.canvas`
93
93
  position: absolute;
94
94
  inset: 0;
95
95
  width: 100%;
96
96
  height: 100%;
97
- `;function K({patternTiling:e=1.66}){const a=u.useRef(null),n=u.useRef(0),r=u.useRef(e);return r.current=e,u.useEffect(()=>{var _;const o=a.current;if(!o||(_=window.matchMedia)!=null&&_.call(window,"(prefers-reduced-motion: reduce)").matches)return;const t=o.getContext("webgl",{alpha:!1,antialias:!1});if(!t)return;const c=p(t,t.VERTEX_SHADER,L),s=p(t,t.FRAGMENT_SHADER,I);if(!c||!s){c&&t.deleteShader(c),s&&t.deleteShader(s);return}const i=B(t,c,s);if(!i){t.deleteShader(c),t.deleteShader(s);return}const m=t.getAttribLocation(i,"a_position"),R=t.getUniformLocation(i,"u_time"),w=t.getUniformLocation(i,"u_resolution"),b=t.getUniformLocation(i,"u_overlayTex"),A=t.getUniformLocation(i,"u_overlayTiling"),v=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,v),t.bufferData(t.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),t.STATIC_DRAW);let g=!1;const h=F(t,P,()=>g),S=()=>{const l=window.devicePixelRatio||1,E=o.clientWidth*l,x=o.clientHeight*l;(o.width!==E||o.height!==x)&&(o.width=E,o.height=x)},U=performance.now()/1e3,y=()=>{S(),t.viewport(0,0,o.width,o.height),t.useProgram(i),t.uniform1f(R,performance.now()/1e3-U),t.uniform2f(w,o.width,o.height),t.uniform1f(A,r.current),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,h),t.uniform1i(b,0),t.enableVertexAttribArray(m),t.bindBuffer(t.ARRAY_BUFFER,v),t.vertexAttribPointer(m,2,t.FLOAT,!1,0,0),t.drawArrays(t.TRIANGLES,0,6),n.current=requestAnimationFrame(y)},T=l=>{l.preventDefault(),cancelAnimationFrame(n.current),o.style.opacity="0"};return o.addEventListener("webglcontextlost",T,!1),n.current=requestAnimationFrame(y),()=>{g=!0,cancelAnimationFrame(n.current),o.removeEventListener("webglcontextlost",T),t.deleteProgram(i),t.deleteShader(c),t.deleteShader(s),t.deleteBuffer(v),t.deleteTexture(h)}},[]),d.jsxs(C,{"aria-hidden":!0,children:[d.jsx(k,{style:{backgroundImage:`url(${D})`}}),d.jsx(V,{ref:a})]})}export{K as default};
98
- //# sourceMappingURL=AnimatedBackground-Bv502Skn.js.map
97
+ `;function K({patternTiling:e=1.66}){const a=u.useRef(null),n=u.useRef(0),r=u.useRef(e);return r.current=e,u.useEffect(()=>{var _;const o=a.current;if(!o||(_=window.matchMedia)!=null&&_.call(window,"(prefers-reduced-motion: reduce)").matches)return;const t=o.getContext("webgl",{alpha:!1,antialias:!1});if(!t)return;const c=p(t,t.VERTEX_SHADER,L),s=p(t,t.FRAGMENT_SHADER,I);if(!c||!s){c&&t.deleteShader(c),s&&t.deleteShader(s);return}const i=B(t,c,s);if(!i){t.deleteShader(c),t.deleteShader(s);return}const f=t.getAttribLocation(i,"a_position"),R=t.getUniformLocation(i,"u_time"),w=t.getUniformLocation(i,"u_resolution"),b=t.getUniformLocation(i,"u_overlayTex"),A=t.getUniformLocation(i,"u_overlayTiling"),v=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,v),t.bufferData(t.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),t.STATIC_DRAW);let g=!1;const h=F(t,P,()=>g),S=()=>{const l=window.devicePixelRatio||1,E=o.clientWidth*l,x=o.clientHeight*l;(o.width!==E||o.height!==x)&&(o.width=E,o.height=x)},U=performance.now()/1e3,y=()=>{S(),t.viewport(0,0,o.width,o.height),t.useProgram(i),t.uniform1f(R,performance.now()/1e3-U),t.uniform2f(w,o.width,o.height),t.uniform1f(A,r.current),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,h),t.uniform1i(b,0),t.enableVertexAttribArray(f),t.bindBuffer(t.ARRAY_BUFFER,v),t.vertexAttribPointer(f,2,t.FLOAT,!1,0,0),t.drawArrays(t.TRIANGLES,0,6),n.current=requestAnimationFrame(y)},T=l=>{l.preventDefault(),cancelAnimationFrame(n.current),o.style.opacity="0"};return o.addEventListener("webglcontextlost",T,!1),n.current=requestAnimationFrame(y),()=>{g=!0,cancelAnimationFrame(n.current),o.removeEventListener("webglcontextlost",T),t.deleteProgram(i),t.deleteShader(c),t.deleteShader(s),t.deleteBuffer(v),t.deleteTexture(h)}},[]),d.jsxs(C,{"aria-hidden":!0,children:[d.jsx(k,{style:{backgroundImage:`url(${D})`}}),d.jsx(V,{ref:a})]})}export{K as default};
98
+ //# sourceMappingURL=AnimatedBackground-DBm7o1js.js.map
@@ -1,4 +1,4 @@
1
- import{r as m,b as He,j as e,u as tt}from"./react-Dvs-h5b4.js";import{u as nt,s as st}from"./search-empty-BhUAGjXZ.js";import{u as it,t as Ie,R as ot,j as rt,k as at,l as lt,m as ct,n as dt,o as ht,p as pt,v as ut,q as ft,r as mt,M as xt,s as gt}from"./browseLayout.styles-BLVGHLwl.js";import{c as G,R as bt,U as yt,by as wt,bu as vt,aC as jt,a as Ct,m as $t,cz as kt,cA as St,s as i,t,p as Oe,bh as Et,v as Tt,E as ve,b as n,q as Rt,I as E,r as O,cB as le,bf as _t,af as oe,bp as Le,bx as It,bw as Lt,o as De,J as Ge,V as qe,W as Nt,at as zt,L as At,S as Ne,M as J,aK as Mt,bH as Wt}from"./index-vtfh3nwp.js";import{L as Bt}from"./LoadMore-BOHXzGNI.js";import{u as Pt}from"./useInfiniteGrid-9WefgTDi.js";import{n as Ft,S as Ut}from"./categories-WLIR1xWo.js";import{E as Ht}from"./ErrorNotice-D1vyV_9N.js";import{d as Ot}from"./dcl-schemas-C_BnTyQO.js";import{s as Dt,G as Gt,w as qt,S as Vt}from"./buy-gasless-C3qljNGZ.js";import{s as Zt,o as Kt}from"./buy-DLOIoAYB.js";import{f as Qt}from"./errors-BmD4KtWx.js";import{J as Jt,C as Xt,B as je}from"./ethers-J3-76ZXn.js";import{n as Yt}from"./name-glyph-aUugT8vq.js";import{c as en}from"./crumbs.styles-CDJpWE7O.js";import{G as tn}from"./grid.styles-vPdFLyiw.js";import"./skeleton.styles-CeNgpwmA.js";import"./sentry-3Vm_u2Wu.js";import"./intl-AKLEHPeO.js";import"./authorizations-Cl9CAf2g.js";import"./sendMetaTransaction-C2E121QZ.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new s.Error().stack;o&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[o]="a8048947-2220-40b5-94b0-d37f04583bba",s._sentryDebugIdIdentifier="sentry-dbid-a8048947-2220-40b5-94b0-d37f04583bba")}catch{}})();function X(s){const o=s.source??"item",r=s.tradeId||`${s.contractAddress}-${s.tokenId??s.itemId??""}`;return`${o}:${r}`}const V="100000000000000000000",Ve=2,re=15,nn=/^[a-zA-Z0-9]+$/;function ze(s){const o=s.trim();return o.length===0?{ok:!1,reason:"empty"}:nn.test(o)?o.length<Ve?{ok:!1,reason:"too-short"}:o.length>re?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function sn(s){return s.replace(/[^a-zA-Z0-9]/g,"").slice(0,re)}const on=["function available(string _subdomain) view returns (bool)"],Ae={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function rn(){return G.chainId===Number(Ot.ChainId.MATIC_MAINNET)?Ae.mainnet:Ae.sepolia}async function an(s,o={}){var u;const{rpc:r,address:d}=rn(),h=new Jt(r),g=new Xt(d,on,h);console.info(`[names] availability check → DCLRegistrar(${d}).available("${s}") on ${r}`);const l=await g.available(s);if((u=o.signal)!=null&&u.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${s}" available=${l}`),l?"available":"taken"}const ln="https://app.across.to/api";class ke extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}class Ce extends Error{constructor(){super("The name could not be registered on Ethereum; your funds were recovered."),this.name="NameNotRegisteredError"}}class $e extends Error{constructor(){super("We couldn't confirm whether the purchase went through."),this.name="NameSettlementUnknownError"}}function cn(s){return jt(V,s)}async function dn(s,o,r={}){var u;const d=r.chainId??G.chainId,h=r.provider??"across",g=`${G.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(o)}&chainId=${d}&provider=${h}`,l=await Ct(g,{method:"GET",identity:s,metadata:{}});if(!l.ok){let c;try{c=(u=await l.json())==null?void 0:u.code}catch{}throw c==="ROUTE_COST_TOO_HIGH"?new ke:new Error(`fetchNameCreditRoute ${l.status}`)}return l.json()}function hn(s,o){const r=je.from(s.availableAmount),h=je.from(V).sub(r);return{credits:[{value:s.amount,expiresAt:Number(s.expiresAt),salt:Kt(s.id)}],creditsSignatures:[s.signature],externalCall:{target:o.externalCall.target,selector:o.externalCall.selector,data:o.externalCall.data,expiresAt:o.externalCall.expiresAt,salt:o.externalCall.salt},customExternalCallSignature:o.customExternalCallSignature,maxUncreditedValue:h.isNegative()?"0":h.toString(),maxCreditedValue:V}}async function pn(s,o={}){const r=ln,d=o.intervalMs??1e4,h=o.maxAttempts??60;let g={status:"pending",destinationTxHash:null,actionsSucceeded:null};for(let l=0;l<h;l++){try{const u=await fetch(`${r}/deposit/status?originChainId=137&depositTxHash=${s}`);if(u.ok){const c=await u.json(),p=(c.status??"pending").toLowerCase(),f=c.fillTx??c.fillTxnRef??null,w=typeof c.actionsSucceeded=="boolean"?c.actionsSucceeded:null;if(p==="filled")return{status:"filled",destinationTxHash:f,actionsSucceeded:w};if(p==="refunded"||p==="expired")return{status:p,destinationTxHash:null,actionsSucceeded:!1};g={status:"pending",destinationTxHash:f,actionsSucceeded:w}}}catch{}l<h-1&&await new Promise(u=>setTimeout(u,d))}return g}async function un(s){const{name:o,identity:r,signer:d}=s,h=f=>{var w;try{(w=s.onProgress)==null||w.call(s,f)}catch{}},g=s.chainId??G.chainId,l=s.provider??"across",u=(s.beneficiary??await d.getAddress()).toLowerCase();let c=null,p="unconfirmed";console.info("[names] register start",{name:o,buyer:u,chainId:g,provider:l}),h("preparing");try{const f=await bt(yt(G.chainId).address),w=cn(f);console.info("[names] step 1/6 sized reservation",{usdCents:w,manaRate:f});const j=await dn(r,o,{chainId:g,provider:l});console.info("[names] step 2/6 route fetched",{target:j.externalCall.target,selector:j.externalCall.selector,provider:j.provider,quoteId:j.quoteId});const $=await wt(r,w,void 0,void 0,o);if(c=$.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:$.credit.id,maxCreditedValue:$.maxCreditedValue}),je.from($.maxCreditedValue).lt(V))throw new Error("Credit under-sized for the name price");h("awaiting-confirmation");const C=hn($.credit,j);let x;try{x=await Dt({chainId:g,buyer:u,signer:d,args:C})}catch(b){if(!(b instanceof Gt))throw b;if(b.reason==="relayer-unreachable"){p="unobservable";const S=new $e;throw S.cause=b,S}x=await Zt(g,C,d)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:x}),h("confirming"),await qt(x),p="confirmed",console.info("[names] step 5/6 origin tx confirmed",{originTxHash:x}),l==="across"){h("registering");const b=await pn(x,s.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:x};if(b.status==="filled"&&b.actionsSucceeded===null)return console.warn("[names] across filled without reporting actionsSucceeded — reporting pending",{originTxHash:x}),{status:"pending",originTxHash:x};if(b.status!=="filled"||b.actionsSucceeded!==!0)throw new Ce;return{status:"registered",originTxHash:x,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:x}}catch(f){if(console.error("[names] register failed — raw error:",f,{name:o,buyer:u,originState:p}),f instanceof Vt)return{status:"pending",originTxHash:f.txHash};if(c&&p==="unconfirmed"&&await vt(r,[c]).catch(()=>{}),f instanceof ke||f instanceof Ce||f instanceof $e)throw f;const w=new Error(Qt(f,"Couldn't register the name. Please try again.",{sale:!0}));throw w.cause=f,w}}function fn(){const{data:s}=$t({queryKey:["feature-flag","shop-names"],queryFn:()=>kt(St.SHOP_NAMES),staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return s===!0}const mn=60,xn=700,gn=25;function bn(s){if(!s)return[];const o=[];for(let r=1;r<=s.length;r++)o.push({text:s.slice(0,r),delay:mn});o[o.length-1]={text:s,delay:xn};for(let r=s.length-1;r>=1;r--)o.push({text:s.slice(0,r),delay:gn});return o}function yn(s){return s.flatMap(bn)}function wn(s,o){const r=m.useMemo(()=>yn(s),[s]),[d,h]=m.useState(0);return m.useEffect(()=>{if(!o||r.length===0)return;const g=setTimeout(()=>h(l=>(l+1)%r.length),r[d%r.length].delay);return()=>clearTimeout(g)},[d,o,r]),!o||r.length===0?"":r[d%r.length].text}const vn="https://cdn.decentraland.org/@dcl/shop/1.12.2-34818068749.commit-deb7840/_assets/name-verified-oGwQ3ntb.svg",jn="#34fee6",Cn=i.div`
1
+ import{r as m,b as He,j as e,u as tt}from"./react-a2ePEDgy.js";import{u as nt,s as st}from"./search-empty-BLediGjJ.js";import{u as it,t as Ie,R as ot,j as at,k as rt,l as lt,m as ct,n as dt,o as ht,p as pt,v as ut,q as ft,r as mt,M as xt,s as gt}from"./browseLayout.styles-CCoPSvP7.js";import{c as G,R as bt,U as yt,by as wt,bu as vt,aC as jt,a as Ct,m as $t,cA as kt,cB as St,s as i,t,p as Oe,bh as Et,v as Tt,E as ve,b as n,q as Rt,I as E,r as O,cC as le,bf as _t,af as oe,bp as Le,bx as It,bw as Lt,o as De,J as Ge,V as qe,W as Nt,at as At,L as zt,S as Ne,M as J,aK as Mt,bH as Wt}from"./index-Be9BP3SJ.js";import{L as Bt}from"./LoadMore-CK6ovlLm.js";import{u as Pt}from"./useInfiniteGrid-BeJ0Opet.js";import{n as Ft,S as Ut}from"./categories-BNiDip1t.js";import{E as Ht}from"./ErrorNotice-DPZR9TIT.js";import{d as Ot}from"./dcl-schemas-D5wchj0M.js";import{s as Dt,G as Gt,w as qt,S as Vt}from"./buy-gasless-BPY5Wv6q.js";import{s as Zt,o as Kt}from"./buy-DKnUYoQz.js";import{f as Qt}from"./errors-Dw9Tpd9z.js";import{J as Jt,C as Xt,B as je}from"./ethers-nJ6WEmLC.js";import{n as Yt}from"./name-glyph-aUugT8vq.js";import{c as en}from"./crumbs.styles-C_N1pxiu.js";import{G as tn}from"./grid.styles-6moRN7Ni.js";import"./skeleton.styles-C55Czv4g.js";import"./sentry-XIbC1v9G.js";import"./intl-AKLEHPeO.js";import"./authorizations-JXhdylb0.js";import"./sendMetaTransaction-C-Mzgrci.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new s.Error().stack;o&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[o]="e04dd2b0-8d22-4411-9bc6-f002c2942966",s._sentryDebugIdIdentifier="sentry-dbid-e04dd2b0-8d22-4411-9bc6-f002c2942966")}catch{}})();function X(s){const o=s.source??"item",a=s.tradeId||`${s.contractAddress}-${s.tokenId??s.itemId??""}`;return`${o}:${a}`}const V="100000000000000000000",Ve=2,ae=15,nn=/^[a-zA-Z0-9]+$/;function Ae(s){const o=s.trim();return o.length===0?{ok:!1,reason:"empty"}:nn.test(o)?o.length<Ve?{ok:!1,reason:"too-short"}:o.length>ae?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function sn(s){return s.replace(/[^a-zA-Z0-9]/g,"").slice(0,ae)}const on=["function available(string _subdomain) view returns (bool)"],ze={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function an(){return G.chainId===Number(Ot.ChainId.MATIC_MAINNET)?ze.mainnet:ze.sepolia}async function rn(s,o={}){var u;const{rpc:a,address:d}=an(),h=new Jt(a),g=new Xt(d,on,h);console.info(`[names] availability check → DCLRegistrar(${d}).available("${s}") on ${a}`);const l=await g.available(s);if((u=o.signal)!=null&&u.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${s}" available=${l}`),l?"available":"taken"}const ln="https://app.across.to/api";class ke extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}class Ce extends Error{constructor(){super("The name could not be registered on Ethereum; your funds were recovered."),this.name="NameNotRegisteredError"}}class $e extends Error{constructor(){super("We couldn't confirm whether the purchase went through."),this.name="NameSettlementUnknownError"}}function cn(s){return jt(V,s)}async function dn(s,o,a={}){var u;const d=a.chainId??G.chainId,h=a.provider??"across",g=`${G.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(o)}&chainId=${d}&provider=${h}`,l=await Ct(g,{method:"GET",identity:s,metadata:{}});if(!l.ok){let c;try{c=(u=await l.json())==null?void 0:u.code}catch{}throw c==="ROUTE_COST_TOO_HIGH"?new ke:new Error(`fetchNameCreditRoute ${l.status}`)}return l.json()}function hn(s,o){const a=je.from(s.availableAmount),h=je.from(V).sub(a);return{credits:[{value:s.amount,expiresAt:Number(s.expiresAt),salt:Kt(s.id)}],creditsSignatures:[s.signature],externalCall:{target:o.externalCall.target,selector:o.externalCall.selector,data:o.externalCall.data,expiresAt:o.externalCall.expiresAt,salt:o.externalCall.salt},customExternalCallSignature:o.customExternalCallSignature,maxUncreditedValue:h.isNegative()?"0":h.toString(),maxCreditedValue:V}}async function pn(s,o={}){const a=ln,d=o.intervalMs??1e4,h=o.maxAttempts??60;let g={status:"pending",destinationTxHash:null,actionsSucceeded:null};for(let l=0;l<h;l++){try{const u=await fetch(`${a}/deposit/status?originChainId=137&depositTxHash=${s}`);if(u.ok){const c=await u.json(),p=(c.status??"pending").toLowerCase(),f=c.fillTx??c.fillTxnRef??null,w=typeof c.actionsSucceeded=="boolean"?c.actionsSucceeded:null;if(p==="filled")return{status:"filled",destinationTxHash:f,actionsSucceeded:w};if(p==="refunded"||p==="expired")return{status:p,destinationTxHash:null,actionsSucceeded:!1};g={status:"pending",destinationTxHash:f,actionsSucceeded:w}}}catch{}l<h-1&&await new Promise(u=>setTimeout(u,d))}return g}async function un(s){const{name:o,identity:a,signer:d}=s,h=f=>{var w;try{(w=s.onProgress)==null||w.call(s,f)}catch{}},g=s.chainId??G.chainId,l=s.provider??"across",u=(s.beneficiary??await d.getAddress()).toLowerCase();let c=null,p="unconfirmed";console.info("[names] register start",{name:o,buyer:u,chainId:g,provider:l}),h("preparing");try{const f=await bt(yt(G.chainId).address),w=cn(f);console.info("[names] step 1/6 sized reservation",{usdCents:w,manaRate:f});const j=await dn(a,o,{chainId:g,provider:l});console.info("[names] step 2/6 route fetched",{target:j.externalCall.target,selector:j.externalCall.selector,provider:j.provider,quoteId:j.quoteId});const $=await wt(a,w,void 0,void 0,o);if(c=$.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:$.credit.id,maxCreditedValue:$.maxCreditedValue}),je.from($.maxCreditedValue).lt(V))throw new Error("Credit under-sized for the name price");h("awaiting-confirmation");const C=hn($.credit,j);let x;try{x=await Dt({chainId:g,buyer:u,signer:d,args:C})}catch(b){if(!(b instanceof Gt))throw b;if(b.reason==="relayer-unreachable"){p="unobservable";const S=new $e;throw S.cause=b,S}x=await Zt(g,C,d)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:x}),h("confirming"),await qt(x),p="confirmed",console.info("[names] step 5/6 origin tx confirmed",{originTxHash:x}),l==="across"){h("registering");const b=await pn(x,s.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:x};if(b.status==="filled"&&b.actionsSucceeded===null)return console.warn("[names] across filled without reporting actionsSucceeded — reporting pending",{originTxHash:x}),{status:"pending",originTxHash:x};if(b.status!=="filled"||b.actionsSucceeded!==!0)throw new Ce;return{status:"registered",originTxHash:x,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:x}}catch(f){if(console.error("[names] register failed — raw error:",f,{name:o,buyer:u,originState:p}),f instanceof Vt)return{status:"pending",originTxHash:f.txHash};if(c&&p==="unconfirmed"&&await vt(a,[c]).catch(()=>{}),f instanceof ke||f instanceof Ce||f instanceof $e)throw f;const w=new Error(Qt(f,"Couldn't register the name. Please try again.",{sale:!0}));throw w.cause=f,w}}function fn(){const{data:s}=$t({queryKey:["feature-flag","shop-names"],queryFn:()=>kt(St.SHOP_NAMES),staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return s===!0}const mn=60,xn=700,gn=25;function bn(s){if(!s)return[];const o=[];for(let a=1;a<=s.length;a++)o.push({text:s.slice(0,a),delay:mn});o[o.length-1]={text:s,delay:xn};for(let a=s.length-1;a>=1;a--)o.push({text:s.slice(0,a),delay:gn});return o}function yn(s){return s.flatMap(bn)}function wn(s,o){const a=m.useMemo(()=>yn(s),[s]),[d,h]=m.useState(0);return m.useEffect(()=>{if(!o||a.length===0)return;const g=setTimeout(()=>h(l=>(l+1)%a.length),a[d%a.length].delay);return()=>clearTimeout(g)},[d,o,a]),!o||a.length===0?"":a[d%a.length].text}const vn="https://cdn.decentraland.org/@dcl/shop/1.12.2-34823553415.commit-aeaec50/_assets/name-verified-oGwQ3ntb.svg",jn="#34fee6",Cn=i.div`
2
2
  position: fixed;
3
3
  inset: 0;
4
4
  z-index: 10000;
@@ -216,7 +216,7 @@ import{r as m,b as He,j as e,u as tt}from"./react-Dvs-h5b4.js";import{u as nt,s
216
216
  font-family: ${t.font.sans};
217
217
  font-size: 18px;
218
218
  color: ${t.colors.muted2};
219
- `,zn=i.input`
219
+ `,An=i.input`
220
220
  flex: 0 1 auto;
221
221
  min-width: 0;
222
222
  border: 0;
@@ -231,7 +231,7 @@ import{r as m,b as He,j as e,u as tt}from"./react-Dvs-h5b4.js";import{u as nt,s
231
231
  color: ${t.colors.muted2};
232
232
  font-weight: 400;
233
233
  }
234
- `,An=i.span`
234
+ `,zn=i.span`
235
235
  flex: none;
236
236
  font-family: ${t.font.sans};
237
237
  font-size: 16px;
@@ -458,7 +458,7 @@ import{r as m,b as He,j as e,u as tt}from"./react-Dvs-h5b4.js";import{u as nt,s
458
458
  color: ${t.colors.accent};
459
459
  }
460
460
  }
461
- `;function Zn({name:s,priceCredits:o,onClose:r}){const{session:d}=Oe(),{data:h,isError:g}=Et(d),l=Tt(),u=He(),[c,p]=m.useState("confirm"),[f,w]=m.useState(""),[j,$]=m.useState(null),[C,x]=m.useState(!1),[b,S]=m.useState("preparing"),L=m.useRef(!1),T=f.trim().toLowerCase()===s.toLowerCase(),k=c==="completing",W=o!=null?ve(o):"—",B=o==null,A=h==null?void 0:h.credits,P=o!=null&&A!=null?o-A:0,N=P>0,z=B?n("names.priceUnavailable"):N?n("names.insufficientCredits",{credits:ve(P)}):null;m.useEffect(()=>{const y=D=>{D.key==="Escape"&&!k&&r()};document.addEventListener("keydown",y);const U=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=U}},[k,r]);async function F(){if(!(!d||!T||B||N||L.current)){L.current=!0,p("completing"),$(null),S("preparing");try{const y=await un({name:s,identity:d.identity,signer:d.signer,onProgress:S});oe("Shop Completed Purchase",{items:[{item_id:null,contract_address:null,token_id:null,price_usd:Le(o??0),category:"name",is_smart:!1}],purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,value_usd:Le(o??0),transaction_hash:y.originTxHash??null,settlement:y.status}),l.invalidateQueries({queryKey:["usd-balance"]}),l.invalidateQueries({queryKey:["my-assets"]}),p(y.status==="registered"?"success":"pending")}catch(y){oe(Lt(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:It(y),purchase_type:"name"});const U=y instanceof Ce,D=y instanceof $e;$(y instanceof ke?n("names.errorRouteCost"):U?n("names.errorNotRegistered"):D?n("names.errorSettlementUnknown"):(y==null?void 0:y.message)||n("names.errorGeneric")),x(U||D),p("error")}finally{L.current=!1}}}const R=c!=="success"&&c!=="pending",v=Rt(d==null?void 0:d.providerType),I=v?2:1,M=v&&(b==="preparing"||b==="awaiting-confirmation"),_=M?1:I,ae=M?n("names.confirming"):n("names.completing"),Z=b==="registering"?n("names.processingRegistering"):null;return e.jsx(Cn,{onClick:k?void 0:r,role:"presentation",children:e.jsxs($n,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[R&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:c==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(he,{onClick:r,disabled:k,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,g)]}),e.jsx(ue,{})]}),(c==="confirm"||c==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(fe,{children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),W]})]}),c==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(we,{children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),C?e.jsx(ye,{onClick:r,children:n("names.errorSpentDismiss")}):e.jsx(ye,{onClick:()=>p("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Rn,{children:[e.jsx(_n,{children:n("names.confirmTitle")}),e.jsx(In,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${Kn(s)}</b>`})}}),e.jsxs(Ln,{children:[e.jsx(Nn,{"aria-hidden":!0,children:"@"}),e.jsx(zn,{value:f,onChange:y=>w(y.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(f.length,8)}ch`}}),e.jsx(An,{children:".dcl.eth"})]})]}),z?e.jsxs(we,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:z})]}):null,e.jsx(ye,{onClick:()=>void F(),disabled:!T||!d||B||N,children:n("names.buyCta")})]})]}),c==="completing"&&e.jsxs(Mn,{children:[e.jsx(Wn,{src:_t,alt:"",width:61,height:61}),e.jsxs(Bn,{children:[e.jsx(Pn,{children:ae}),e.jsxs(Un,{children:[e.jsx(Hn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(On,{"data-testid":"name-progress-count",children:`${_}/${I}`})]}),Z?e.jsx(Fn,{children:Z}):null]})]}),c==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:n("names.pendingHeaderTitle")}),e.jsx(he,{onClick:r,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,g)]}),e.jsx(ue,{}),e.jsxs(we,{"data-tone":"info",children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(fe,{style:{marginTop:20},children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),W]})]}),e.jsx(We,{children:e.jsx(Be,{onClick:()=>{r(),u("/my-items")},children:n("names.myItems")})})]}),c==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:n("names.successHeaderTitle")}),e.jsx(he,{onClick:r,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,g)]}),e.jsx(ue,{}),e.jsxs(Dn,{children:[e.jsx(Gn,{"aria-hidden":!0,children:e.jsx(E,{name:"check"})}),e.jsxs(qn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(fe,{style:{marginTop:20},children:[e.jsxs(kn,{"data-testid":"name-success-tile",children:[e.jsx(Sn,{src:Yt,alt:"","aria-hidden":!0,width:47,height:47}),e.jsxs(En,{children:[e.jsx("span",{"aria-hidden":!0,children:s}),e.jsx(Tn,{src:vn,alt:"","aria-hidden":!0,width:14,height:14})]})]}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),W]})]}),e.jsxs(We,{children:[e.jsx(Be,{onClick:()=>{r(),u("/my-items")},children:n("names.myItems")}),e.jsx(Vn,{href:G.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function Kn(s){return s.replace(/[&<>"']/g,o=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[o])}const Qn="https://cdn.decentraland.org/@dcl/shop/1.12.2-34818068749.commit-deb7840/_assets/identity-icon-C8yAW_Gq.svg",Jn="https://cdn.decentraland.org/@dcl/shop/1.12.2-34818068749.commit-deb7840/_assets/world-icon-6xQ-PmmW.svg",Xn="https://cdn.decentraland.org/@dcl/shop/1.12.2-34818068749.commit-deb7840/_assets/invite-icon-Bz6lCTuB.svg",Yn="data:image/svg+xml,%3csvg%20width='55.6797'%20height='63.6174'%20viewBox='0%200%2055.6797%2063.6174'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Vote'%3e%3cpath%20id='Vector'%20d='M0.055012%2039.1045C1.61191%2039.4989%202.83757%2039.3938%204.4307%2039.392L8.27108%2039.3878L20.7762%2039.3883L42.8819%2039.3904L50.0954%2039.3907C51.793%2039.3907%2054.0562%2039.5509%2055.6466%2039.0843C55.5909%2040.7931%2055.647%2042.8581%2055.6469%2044.5864L55.6479%2055.616L55.6559%2059.5618C55.6583%2060.6219%2055.8213%2061.9838%2055.261%2062.8837C55.2205%2062.9265%2055.1794%2062.9688%2055.1377%2063.0104C54.7986%2063.3482%2054.3791%2063.5594%2053.9021%2063.5761C52.0714%2063.642%2050.1544%2063.6097%2048.3241%2063.6078L37.4452%2063.6066L2.97352%2063.6103C2.2022%2063.6084%201.15943%2063.6718%200.589171%2063.0576C-0.204857%2062.2037%200.0327979%2060.3244%200.0349529%2059.1687L0.0414734%2054.3929C0.0413119%2049.3191%20-0.00749456%2044.1727%200.055012%2039.1045Z'%20fill='white'%20fill-opacity='0.8'/%3e%3cpath%20id='Subtract'%20d='M37.1168%200.00495927C38.1773%200.00461149%2039.2888%20-0.0284991%2040.3433%200.0811311C41.0714%200.15695%2041.7266%200.914583%2041.7857%201.63484C41.853%202.45491%2041.8268%203.31926%2041.8258%204.15144L41.8189%208.70418L41.8199%2023.9639L40.1099%2023.9659L13.8726%2023.963L13.8678%209.0909L13.8648%204.29793C13.8644%202.52652%2013.3942%200.34203%2015.6754%200.0342561C15.8907%200.016712%2016.237%200.0120998%2016.4557%200.0117952C21.6059%200.00480262%2026.761%200.0117634%2031.9107%200.00788896L37.1168%200.00495927ZM33.3834%206.17293C32.439%206.55612%2031.0531%208.12922%2030.3014%208.88191L25.8297%2013.3634C25.3537%2012.824%2023.3455%2010.7605%2022.8209%2010.4239C22.5581%2010.2549%2022.2566%2010.1546%2021.9449%2010.1329C21.4563%2010.1008%2020.9754%2010.2879%2020.6139%2010.6134C20.2442%2010.9428%2020.0227%2011.4077%2020.0006%2011.9024C19.9561%2013.0748%2021.3406%2014.1198%2022.1256%2014.8868C22.9429%2015.714%2024.1669%2017.1028%2025.1168%2017.67C26.1632%2018.2949%2027.3471%2017.2145%2027.9723%2016.4942C30.25%2014.2025%2032.5393%2011.9456%2034.8101%209.64949C35.2937%209.16062%2035.7138%208.69126%2035.6851%207.96199C35.6419%206.86558%2034.7821%206.09682%2033.6959%206.14656C33.5914%206.15085%2033.4872%206.16001%2033.3834%206.17293Z'%20fill='%23FF7439'/%3e%3cpath%20id='Vector_2'%20d='M45.5498%2015.976C46.6399%2015.986%2049.9504%2015.7705%2050.7361%2016.241C51.0104%2016.4053%2051.2831%2016.6446%2051.4181%2016.9397C51.892%2017.9763%2052.1015%2019.357%2052.3802%2020.4819L54.0582%2027.2308C54.5046%2028.9073%2054.9023%2030.6043%2055.3338%2032.2824C55.6029%2033.329%2055.9417%2034.4293%2054.9705%2035.2255C54.8158%2035.359%2054.4427%2035.5934%2054.2329%2035.6091C52.7731%2035.7184%2051.1693%2035.6701%2049.7108%2035.6679L39.4635%2035.6649L14.5239%2035.6632C10.471%2035.6631%206.41808%2035.6665%202.36531%2035.6698C1.79359%2035.6657%201.33794%2035.6604%200.844568%2035.337C-0.57365%2034.4073%200.381076%2032.2112%200.72189%2030.8501L1.93462%2025.9936L3.28579%2020.566C3.53371%2019.5688%203.77194%2018.5694%204.04289%2017.5781C4.30559%2016.6172%204.74298%2016.1492%205.73966%2015.9892C7.15095%2015.9419%208.72017%2015.9778%2010.1434%2015.9809L10.1451%2023.9585C7.37011%2024.097%207.74242%2027.5535%209.84963%2027.6469C11.6268%2027.7258%2013.6164%2027.6909%2015.4098%2027.691L26.229%2027.6915L39.1339%2027.691L43.273%2027.6909C44.748%2027.6909%2047.2174%2028.0848%2047.3773%2025.9908C47.4212%2025.4807%2047.2565%2024.9745%2046.9209%2024.5879C46.5265%2024.141%2046.1143%2024.0046%2045.5418%2023.9673L45.5498%2015.976Z'%20fill='white'/%3e%3c/g%3e%3c/svg%3e",es=i.div`
461
+ `;function Zn({name:s,priceCredits:o,onClose:a}){const{session:d}=Oe(),{data:h,isError:g}=Et(d),l=Tt(),u=He(),[c,p]=m.useState("confirm"),[f,w]=m.useState(""),[j,$]=m.useState(null),[C,x]=m.useState(!1),[b,S]=m.useState("preparing"),L=m.useRef(!1),T=f.trim().toLowerCase()===s.toLowerCase(),k=c==="completing",W=o!=null?ve(o):"—",B=o==null,z=h==null?void 0:h.credits,P=o!=null&&z!=null?o-z:0,N=P>0,A=B?n("names.priceUnavailable"):N?n("names.insufficientCredits",{credits:ve(P)}):null;m.useEffect(()=>{const y=D=>{D.key==="Escape"&&!k&&a()};document.addEventListener("keydown",y);const U=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=U}},[k,a]);async function F(){if(!(!d||!T||B||N||L.current)){L.current=!0,p("completing"),$(null),S("preparing");try{const y=await un({name:s,identity:d.identity,signer:d.signer,onProgress:S});oe("Shop Completed Purchase",{items:[{item_id:null,contract_address:null,token_id:null,price_usd:Le(o??0),category:"name",is_smart:!1}],purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,value_usd:Le(o??0),transaction_hash:y.originTxHash??null,settlement:y.status}),l.invalidateQueries({queryKey:["usd-balance"]}),l.invalidateQueries({queryKey:["my-assets"]}),p(y.status==="registered"?"success":"pending")}catch(y){oe(Lt(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:It(y),purchase_type:"name"});const U=y instanceof Ce,D=y instanceof $e;$(y instanceof ke?n("names.errorRouteCost"):U?n("names.errorNotRegistered"):D?n("names.errorSettlementUnknown"):(y==null?void 0:y.message)||n("names.errorGeneric")),x(U||D),p("error")}finally{L.current=!1}}}const R=c!=="success"&&c!=="pending",v=Rt(d==null?void 0:d.providerType),I=v?2:1,M=v&&(b==="preparing"||b==="awaiting-confirmation"),_=M?1:I,re=M?n("names.confirming"):n("names.completing"),Z=b==="registering"?n("names.processingRegistering"):null;return e.jsx(Cn,{onClick:k?void 0:a,role:"presentation",children:e.jsxs($n,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[R&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:c==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(he,{onClick:a,disabled:k,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,g)]}),e.jsx(ue,{})]}),(c==="confirm"||c==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(fe,{children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),W]})]}),c==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(we,{children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),C?e.jsx(ye,{onClick:a,children:n("names.errorSpentDismiss")}):e.jsx(ye,{onClick:()=>p("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Rn,{children:[e.jsx(_n,{children:n("names.confirmTitle")}),e.jsx(In,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${Kn(s)}</b>`})}}),e.jsxs(Ln,{children:[e.jsx(Nn,{"aria-hidden":!0,children:"@"}),e.jsx(An,{value:f,onChange:y=>w(y.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(f.length,8)}ch`}}),e.jsx(zn,{children:".dcl.eth"})]})]}),A?e.jsxs(we,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:A})]}):null,e.jsx(ye,{onClick:()=>void F(),disabled:!T||!d||B||N,children:n("names.buyCta")})]})]}),c==="completing"&&e.jsxs(Mn,{children:[e.jsx(Wn,{src:_t,alt:"",width:61,height:61}),e.jsxs(Bn,{children:[e.jsx(Pn,{children:re}),e.jsxs(Un,{children:[e.jsx(Hn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(On,{"data-testid":"name-progress-count",children:`${_}/${I}`})]}),Z?e.jsx(Fn,{children:Z}):null]})]}),c==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:n("names.pendingHeaderTitle")}),e.jsx(he,{onClick:a,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,g)]}),e.jsx(ue,{}),e.jsxs(we,{"data-tone":"info",children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(fe,{style:{marginTop:20},children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),W]})]}),e.jsx(We,{children:e.jsx(Be,{onClick:()=>{a(),u("/my-items")},children:n("names.myItems")})})]}),c==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:n("names.successHeaderTitle")}),e.jsx(he,{onClick:a,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,g)]}),e.jsx(ue,{}),e.jsxs(Dn,{children:[e.jsx(Gn,{"aria-hidden":!0,children:e.jsx(E,{name:"check"})}),e.jsxs(qn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(fe,{style:{marginTop:20},children:[e.jsxs(kn,{"data-testid":"name-success-tile",children:[e.jsx(Sn,{src:Yt,alt:"","aria-hidden":!0,width:47,height:47}),e.jsxs(En,{children:[e.jsx("span",{"aria-hidden":!0,children:s}),e.jsx(Tn,{src:vn,alt:"","aria-hidden":!0,width:14,height:14})]})]}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),W]})]}),e.jsxs(We,{children:[e.jsx(Be,{onClick:()=>{a(),u("/my-items")},children:n("names.myItems")}),e.jsx(Vn,{href:G.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function Kn(s){return s.replace(/[&<>"']/g,o=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[o])}const Qn="https://cdn.decentraland.org/@dcl/shop/1.12.2-34823553415.commit-aeaec50/_assets/identity-icon-C8yAW_Gq.svg",Jn="https://cdn.decentraland.org/@dcl/shop/1.12.2-34823553415.commit-aeaec50/_assets/world-icon-6xQ-PmmW.svg",Xn="https://cdn.decentraland.org/@dcl/shop/1.12.2-34823553415.commit-aeaec50/_assets/invite-icon-Bz6lCTuB.svg",Yn="data:image/svg+xml,%3csvg%20width='55.6797'%20height='63.6174'%20viewBox='0%200%2055.6797%2063.6174'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Vote'%3e%3cpath%20id='Vector'%20d='M0.055012%2039.1045C1.61191%2039.4989%202.83757%2039.3938%204.4307%2039.392L8.27108%2039.3878L20.7762%2039.3883L42.8819%2039.3904L50.0954%2039.3907C51.793%2039.3907%2054.0562%2039.5509%2055.6466%2039.0843C55.5909%2040.7931%2055.647%2042.8581%2055.6469%2044.5864L55.6479%2055.616L55.6559%2059.5618C55.6583%2060.6219%2055.8213%2061.9838%2055.261%2062.8837C55.2205%2062.9265%2055.1794%2062.9688%2055.1377%2063.0104C54.7986%2063.3482%2054.3791%2063.5594%2053.9021%2063.5761C52.0714%2063.642%2050.1544%2063.6097%2048.3241%2063.6078L37.4452%2063.6066L2.97352%2063.6103C2.2022%2063.6084%201.15943%2063.6718%200.589171%2063.0576C-0.204857%2062.2037%200.0327979%2060.3244%200.0349529%2059.1687L0.0414734%2054.3929C0.0413119%2049.3191%20-0.00749456%2044.1727%200.055012%2039.1045Z'%20fill='white'%20fill-opacity='0.8'/%3e%3cpath%20id='Subtract'%20d='M37.1168%200.00495927C38.1773%200.00461149%2039.2888%20-0.0284991%2040.3433%200.0811311C41.0714%200.15695%2041.7266%200.914583%2041.7857%201.63484C41.853%202.45491%2041.8268%203.31926%2041.8258%204.15144L41.8189%208.70418L41.8199%2023.9639L40.1099%2023.9659L13.8726%2023.963L13.8678%209.0909L13.8648%204.29793C13.8644%202.52652%2013.3942%200.34203%2015.6754%200.0342561C15.8907%200.016712%2016.237%200.0120998%2016.4557%200.0117952C21.6059%200.00480262%2026.761%200.0117634%2031.9107%200.00788896L37.1168%200.00495927ZM33.3834%206.17293C32.439%206.55612%2031.0531%208.12922%2030.3014%208.88191L25.8297%2013.3634C25.3537%2012.824%2023.3455%2010.7605%2022.8209%2010.4239C22.5581%2010.2549%2022.2566%2010.1546%2021.9449%2010.1329C21.4563%2010.1008%2020.9754%2010.2879%2020.6139%2010.6134C20.2442%2010.9428%2020.0227%2011.4077%2020.0006%2011.9024C19.9561%2013.0748%2021.3406%2014.1198%2022.1256%2014.8868C22.9429%2015.714%2024.1669%2017.1028%2025.1168%2017.67C26.1632%2018.2949%2027.3471%2017.2145%2027.9723%2016.4942C30.25%2014.2025%2032.5393%2011.9456%2034.8101%209.64949C35.2937%209.16062%2035.7138%208.69126%2035.6851%207.96199C35.6419%206.86558%2034.7821%206.09682%2033.6959%206.14656C33.5914%206.15085%2033.4872%206.16001%2033.3834%206.17293Z'%20fill='%23FF7439'/%3e%3cpath%20id='Vector_2'%20d='M45.5498%2015.976C46.6399%2015.986%2049.9504%2015.7705%2050.7361%2016.241C51.0104%2016.4053%2051.2831%2016.6446%2051.4181%2016.9397C51.892%2017.9763%2052.1015%2019.357%2052.3802%2020.4819L54.0582%2027.2308C54.5046%2028.9073%2054.9023%2030.6043%2055.3338%2032.2824C55.6029%2033.329%2055.9417%2034.4293%2054.9705%2035.2255C54.8158%2035.359%2054.4427%2035.5934%2054.2329%2035.6091C52.7731%2035.7184%2051.1693%2035.6701%2049.7108%2035.6679L39.4635%2035.6649L14.5239%2035.6632C10.471%2035.6631%206.41808%2035.6665%202.36531%2035.6698C1.79359%2035.6657%201.33794%2035.6604%200.844568%2035.337C-0.57365%2034.4073%200.381076%2032.2112%200.72189%2030.8501L1.93462%2025.9936L3.28579%2020.566C3.53371%2019.5688%203.77194%2018.5694%204.04289%2017.5781C4.30559%2016.6172%204.74298%2016.1492%205.73966%2015.9892C7.15095%2015.9419%208.72017%2015.9778%2010.1434%2015.9809L10.1451%2023.9585C7.37011%2024.097%207.74242%2027.5535%209.84963%2027.6469C11.6268%2027.7258%2013.6164%2027.6909%2015.4098%2027.691L26.229%2027.6915L39.1339%2027.691L43.273%2027.6909C44.748%2027.6909%2047.2174%2028.0848%2047.3773%2025.9908C47.4212%2025.4807%2047.2565%2024.9745%2046.9209%2024.5879C46.5265%2024.141%2046.1143%2024.0046%2045.5418%2023.9673L45.5498%2015.976Z'%20fill='white'/%3e%3c/g%3e%3c/svg%3e",es=i.div`
462
462
  width: 100%;
463
463
  min-width: 0;
464
464
  `,ts=i.nav`
@@ -517,12 +517,12 @@ import{r as m,b as He,j as e,u as tt}from"./react-Dvs-h5b4.js";import{u as nt,s
517
517
  padding: 40px 20px;
518
518
  gap: 28px;
519
519
  }
520
- `,rs=i.div`
520
+ `,as=i.div`
521
521
  display: flex;
522
522
  flex-direction: column;
523
523
  align-items: center;
524
524
  gap: 12px;
525
- `,as=i.h1`
525
+ `,rs=i.h1`
526
526
  margin: 0;
527
527
  font-family: ${t.font.sans};
528
528
  font-weight: 600;
@@ -919,7 +919,7 @@ import{r as m,b as He,j as e,u as tt}from"./react-Dvs-h5b4.js";import{u as nt,s
919
919
  clip: rect(0, 0, 0, 0);
920
920
  white-space: nowrap;
921
921
  border: 0;
922
- `,Is="https://docs.decentraland.org/creator/worlds/about/",Ls="https://governance.decentraland.org";function Fe(s){const o=typeof window<"u"?window.location.hostname:"";return`${o.endsWith("decentraland.org")?"https://decentraland.org":o.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(s)}`}function Ns({onBack:s}){De({title:n("seo.names.title"),description:n("seo.names.description")});const{session:o,signIn:r}=Oe(),d=fn(),{data:h}=Ge(),g=h?qe(V,h):null,[l,u]=m.useState(""),[c,p]=m.useState("idle"),[f,w]=m.useState(!1),[j,$]=m.useState(!1),[C,x]=m.useState(()=>{var v;return typeof window<"u"&&!!((v=window.matchMedia)!=null&&v.call(window,"(prefers-reduced-motion: reduce)").matches)});m.useEffect(()=>{var M;const v=(M=window.matchMedia)==null?void 0:M.call(window,"(prefers-reduced-motion: reduce)");if(!v)return;const I=_=>x(_.matches);return v.addEventListener("change",I),()=>v.removeEventListener("change",I)},[]);const b=n("names.placeholderExamples"),S=m.useMemo(()=>b.split(",").map(v=>v.trim()).filter(Boolean),[b]),T=wn(S,!j&&!l&&!C)||n("names.inputPlaceholder"),k=m.useRef(null),[W,B]=m.useState(void 0);m.useLayoutEffect(()=>{k.current&&B(k.current.getBoundingClientRect().width)},[l,T]),m.useEffect(()=>{if(!ze(l).ok){p(l.length===0?"idle":"invalid");return}p("checking");const I=new AbortController,M=setTimeout(()=>{(async()=>{try{const _=await an(l,{signal:I.signal});p(_)}catch(_){if((_==null?void 0:_.name)==="AbortError")return;p("error")}})()},400);return()=>{clearTimeout(M),I.abort()}},[l]);const A=ze(l),P=A.ok&&(c==="available"||c==="error"),N=d&&P,z=!d&&P;function F(){if(N){if(!o){r();return}w(!0)}}const R=e.jsxs(e.Fragment,{children:[n("names.claim"),g!=null?e.jsxs(vs,{children:[e.jsx(O,{}),ve(g)]}):null]});return e.jsxs(es,{"data-testid":"names-page",children:[e.jsxs(ts,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(ns,{onClick:s,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(ss,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(is,{children:[e.jsxs(os,{children:[e.jsxs(rs,{children:[e.jsx(as,{children:n("names.heroTitle")}),e.jsx(ls,{children:n("names.heroSubtitle")})]}),e.jsxs(cs,{children:[e.jsxs(ds,{"data-testid":"names-input-wrap",children:[e.jsxs(hs,{invalid:c==="taken",children:[e.jsxs(ms,{children:[e.jsx(xs,{"aria-hidden":!0,children:"@"}),e.jsx(gs,{value:l,onChange:v=>u(sn(v.target.value)),placeholder:T,"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:re,onFocus:()=>$(!0),style:{width:W!=null?`${W}px`:void 0}}),e.jsx(ps,{ref:k,"aria-hidden":!0,"data-placeholder":!l||void 0,children:l||T}),e.jsx(bs,{children:n("names.suffix")})]}),l.length>0?e.jsxs(ys,{"aria-hidden":!0,children:[l.length,"/",re]}):null,e.jsx(Ke,{onClick:F,disabled:!N,"data-testid":"names-claim",children:R})]}),c==="taken"?e.jsxs(us,{role:"status","data-testid":"names-taken",children:[e.jsx(E,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.taken")}),e.jsxs(fs,{href:Fe(l),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(E,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null,c==="checking"?e.jsx(Y,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):z?e.jsxs(Y,{tone:"muted",role:"status","data-testid":"names-disabled",children:[e.jsx(E,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.registrationDisabled")}),e.jsxs(Cs,{href:Fe(l),target:"_blank",rel:"noopener noreferrer",children:[n("names.registrationDisabledLink"),e.jsx(E,{name:"external-link",size:13,"aria-hidden":!0})]})]}):c==="error"?e.jsx(Y,{tone:"muted",role:"status",children:n("names.checkError")}):c==="invalid"&&!A.ok&&A.reason==="too-short"?e.jsx(Y,{tone:"muted",role:"status",children:n("names.tooShort",{min:Ve})}):null]}),e.jsx(ws,{onClick:F,disabled:!N,children:R}),e.jsx(_s,{role:"status","aria-live":"polite",children:c==="available"?n("names.available",{name:l}):""})]})]}),e.jsxs($s,{children:[e.jsxs(ks,{children:[e.jsx(Ss,{children:n("names.whyTitle")}),e.jsx(Es,{children:n("names.whyIntro")})]}),e.jsxs(Ts,{children:[e.jsxs(ee,{children:[e.jsx(te,{src:Qn,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why1Title")}),e.jsx(ie,{children:n("names.why1")})]})]}),e.jsxs(ee,{children:[e.jsx(te,{src:Jn,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why2Title")}),e.jsxs(ie,{children:[n("names.why2")," ",e.jsx(Rs,{children:n("names.why2Address")})]}),e.jsxs(Pe,{href:Is,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(E,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(ee,{children:[e.jsx(te,{src:Xn,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why3Title")}),e.jsx(ie,{children:n("names.why3")})]})]}),e.jsxs(ee,{children:[e.jsx(te,{src:Yn,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why4Title")}),e.jsx(ie,{children:n("names.why4")}),e.jsxs(Pe,{href:Ls,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(E,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),f?e.jsx(Zn,{name:l,priceCredits:g,onClose:()=>w(!1)}):null]})}const zs=i.p`
922
+ `,Is="https://docs.decentraland.org/creator/worlds/about/",Ls="https://governance.decentraland.org";function Fe(s){const o=typeof window<"u"?window.location.hostname:"";return`${o.endsWith("decentraland.org")?"https://decentraland.org":o.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(s)}`}function Ns({onBack:s}){De({title:n("seo.names.title"),description:n("seo.names.description")});const{session:o,signIn:a}=Oe(),d=fn(),{data:h}=Ge(),g=h?qe(V,h):null,[l,u]=m.useState(""),[c,p]=m.useState("idle"),[f,w]=m.useState(!1),[j,$]=m.useState(!1),[C,x]=m.useState(()=>{var v;return typeof window<"u"&&!!((v=window.matchMedia)!=null&&v.call(window,"(prefers-reduced-motion: reduce)").matches)});m.useEffect(()=>{var M;const v=(M=window.matchMedia)==null?void 0:M.call(window,"(prefers-reduced-motion: reduce)");if(!v)return;const I=_=>x(_.matches);return v.addEventListener("change",I),()=>v.removeEventListener("change",I)},[]);const b=n("names.placeholderExamples"),S=m.useMemo(()=>b.split(",").map(v=>v.trim()).filter(Boolean),[b]),T=wn(S,!j&&!l&&!C)||n("names.inputPlaceholder"),k=m.useRef(null),[W,B]=m.useState(void 0);m.useLayoutEffect(()=>{k.current&&B(k.current.getBoundingClientRect().width)},[l,T]),m.useEffect(()=>{if(!Ae(l).ok){p(l.length===0?"idle":"invalid");return}p("checking");const I=new AbortController,M=setTimeout(()=>{(async()=>{try{const _=await rn(l,{signal:I.signal});p(_)}catch(_){if((_==null?void 0:_.name)==="AbortError")return;p("error")}})()},400);return()=>{clearTimeout(M),I.abort()}},[l]);const z=Ae(l),P=z.ok&&(c==="available"||c==="error"),N=d&&P,A=!d&&P;function F(){if(N){if(!o){a();return}w(!0)}}const R=e.jsxs(e.Fragment,{children:[n("names.claim"),g!=null?e.jsxs(vs,{children:[e.jsx(O,{}),ve(g)]}):null]});return e.jsxs(es,{"data-testid":"names-page",children:[e.jsxs(ts,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(ns,{onClick:s,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(ss,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(is,{children:[e.jsxs(os,{children:[e.jsxs(as,{children:[e.jsx(rs,{children:n("names.heroTitle")}),e.jsx(ls,{children:n("names.heroSubtitle")})]}),e.jsxs(cs,{children:[e.jsxs(ds,{"data-testid":"names-input-wrap",children:[e.jsxs(hs,{invalid:c==="taken",children:[e.jsxs(ms,{children:[e.jsx(xs,{"aria-hidden":!0,children:"@"}),e.jsx(gs,{value:l,onChange:v=>u(sn(v.target.value)),placeholder:T,"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:ae,onFocus:()=>$(!0),style:{width:W!=null?`${W}px`:void 0}}),e.jsx(ps,{ref:k,"aria-hidden":!0,"data-placeholder":!l||void 0,children:l||T}),e.jsx(bs,{children:n("names.suffix")})]}),l.length>0?e.jsxs(ys,{"aria-hidden":!0,children:[l.length,"/",ae]}):null,e.jsx(Ke,{onClick:F,disabled:!N,"data-testid":"names-claim",children:R})]}),c==="taken"?e.jsxs(us,{role:"status","data-testid":"names-taken",children:[e.jsx(E,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.taken")}),e.jsxs(fs,{href:Fe(l),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(E,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null,c==="checking"?e.jsx(Y,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):A?e.jsxs(Y,{tone:"muted",role:"status","data-testid":"names-disabled",children:[e.jsx(E,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.registrationDisabled")}),e.jsxs(Cs,{href:Fe(l),target:"_blank",rel:"noopener noreferrer",children:[n("names.registrationDisabledLink"),e.jsx(E,{name:"external-link",size:13,"aria-hidden":!0})]})]}):c==="error"?e.jsx(Y,{tone:"muted",role:"status",children:n("names.checkError")}):c==="invalid"&&!z.ok&&z.reason==="too-short"?e.jsx(Y,{tone:"muted",role:"status",children:n("names.tooShort",{min:Ve})}):null]}),e.jsx(ws,{onClick:F,disabled:!N,children:R}),e.jsx(_s,{role:"status","aria-live":"polite",children:c==="available"?n("names.available",{name:l}):""})]})]}),e.jsxs($s,{children:[e.jsxs(ks,{children:[e.jsx(Ss,{children:n("names.whyTitle")}),e.jsx(Es,{children:n("names.whyIntro")})]}),e.jsxs(Ts,{children:[e.jsxs(ee,{children:[e.jsx(te,{src:Qn,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why1Title")}),e.jsx(ie,{children:n("names.why1")})]})]}),e.jsxs(ee,{children:[e.jsx(te,{src:Jn,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why2Title")}),e.jsxs(ie,{children:[n("names.why2")," ",e.jsx(Rs,{children:n("names.why2Address")})]}),e.jsxs(Pe,{href:Is,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(E,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(ee,{children:[e.jsx(te,{src:Xn,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why3Title")}),e.jsx(ie,{children:n("names.why3")})]})]}),e.jsxs(ee,{children:[e.jsx(te,{src:Yn,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why4Title")}),e.jsx(ie,{children:n("names.why4")}),e.jsxs(Pe,{href:Ls,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(E,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),f?e.jsx(Zn,{name:l,priceCredits:g,onClose:()=>w(!1)}):null]})}const As=i.p`
923
923
  display: flex;
924
924
  align-items: center;
925
925
  gap: 10px;
@@ -935,5 +935,5 @@ import{r as m,b as He,j as e,u as tt}from"./react-Dvs-h5b4.js";import{u as nt,s
935
935
  background: rgba(211, 51, 51, 0.1);
936
936
  color: ${t.colors.err};
937
937
  }
938
- `,Ue=48,As=["all","on_sale","not_for_sale"],Ms=s=>s?"all":"on_sale";function ii(){const[s]=tt(),o=He(),r=(s.get("q")??"").trim().toLowerCase(),d=(s.get("q")??"").trim();De({title:d?n("seo.collectibles.searchTitle",{query:d}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const h=Ms(!!r),g=m.useMemo(()=>({category:"all",status:h,subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[h]),[l,u]=nt(g),{subCategory:c,rarities:p,priceMin:f,priceMax:w,smart:j,sort:$}=l,C=l.category,x=As.includes(l.status)?l.status:h;it(`${C}:${c??""}`);const[b,S]=m.useState(!1);m.useEffect(()=>{if(!b)return;const a=Q=>{Q.key==="Escape"&&S(!1)};document.addEventListener("keydown",a);const H=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",a),document.body.style.overflow=H}},[b]);const L=x==="on_sale",T=f&&!Number.isNaN(Number(f))?Number(f):void 0,k=w&&!Number.isNaN(Number(w))?Number(w):void 0,W=Nt(),B=c?Ut[c]:void 0,A=(Ie.find(a=>a.key===$)??Ie[0]).server,P={category:C,rarities:p.length?p:void 0,wearableCategories:B,minPriceCredits:T,maxPriceCredits:k,search:r||void 0,sortBy:A,isSmart:j||void 0,onSale:!0,listingType:W?void 0:"primary"},N={category:C,rarities:p.length?p:void 0,wearableCategories:B,search:r||void 0,sortBy:A,isWearableSmart:j||void 0,isOnSale:x==="not_for_sale"?!1:void 0},{items:z,total:F,isLoading:R,isPlaceholderData:v,error:I,hasNextPage:M,isFetchingNextPage:_,isFetchNextPageError:ae,fetchNextPage:Z}=Pt(L?["shop-items",P]:["catalog-items",N],a=>L?Mt({...P,first:Ue,skip:a}):Wt({...N,first:Ue,skip:a}),{enabled:C!=="names"}),y=F,{data:U,isError:D,isPending:Qe}=Ge(),Je=a=>U&&a.manaWei?qe(a.manaWei,U):null,Xe=L&&Qe&&z.some(a=>a.source==="legacy"),Se=R||v||Xe,Ye=R?15:Math.max(z.length,1),Ee=m.useRef(null);m.useEffect(()=>{R||v||!r||Ee.current===r||(Ee.current=r,oe("Shop Searched",{query:r,result_count:y}))},[r,R,v,y]);const K=m.useRef("__init__");m.useEffect(()=>{if(R||v)return;const a=JSON.stringify({category:C,subCategory:c,rarities:p,min:T,max:k,sort:$,status:x,smart:j});if(K.current==="__init__"||K.current===a){K.current=a;return}K.current=a,oe("Shop Applied Filter",{filters:{category:C,sub_category:c,rarities:p,min_price_credits:T??null,max_price_credits:k??null,status:x,smart:j,sort:$},result_count:y})},[C,c,p,T,k,$,x,j,R,v,y]);function Te(a){u({category:a,subCategory:null})}function Re(a){u({status:a})}function _e(a){u({rarities:p.includes(a)?p.filter(H=>H!==a):[...p,a]})}function et(){u(g)}const q=[];(T!=null||k!=null)&&q.push({key:"price",label:n("filter.price"),onRemove:()=>{u({priceMin:"",priceMax:""})}});for(const a of ot)p.includes(a)&&q.push({key:`rarity-${a}`,label:zt(a),onRemove:()=>_e(a)});return j&&q.push({key:"smart",label:n("filter.smart"),onRemove:()=>u({smart:!1})}),x!==h&&q.push({key:"status",label:x==="all"?n("filter.statusAll"):x==="on_sale"?n("filter.onSale"):n("filter.notForSale"),onRemove:()=>Re(h)}),e.jsxs(rt,{"data-testid":"browse",children:[C!=="names"&&e.jsxs(e.Fragment,{children:[b?e.jsx(at,{onClick:()=>S(!1),"aria-hidden":!0}):null,e.jsxs(lt,{"data-open":b||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(ct,{children:[e.jsx(dt,{children:n("assets.filters")}),e.jsx(ht,{onClick:()=>S(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(pt,{children:e.jsx(ut,{category:C,subCategory:c,onCategory:Te,onSub:a=>u({subCategory:a}),priceMin:f,priceMax:w,onPriceMin:a=>u({priceMin:a}),onPriceMax:a=>u({priceMax:a}),rarities:p,onToggleRarity:_e,status:x,onStatus:Re,smart:j,onSmart:a=>u({smart:a})})}),e.jsx(ft,{children:e.jsx(mt,{type:"button",onClick:()=>S(!1),children:n("assets.showItems")})})]})]}),e.jsx(xt,{children:C==="names"?e.jsx(Ns,{onBack:()=>Te("all")}):e.jsxs(e.Fragment,{children:[e.jsx(gt,{sort:$,onSort:a=>u({sort:a}),total:F,loading:R||v,query:r,onOpenFilters:()=>S(!0),chips:q,onClearChips:et}),D&&L&&z.some(a=>a.source==="legacy")?e.jsx(zs,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,I?e.jsx(Ht,{message:n("assets.loadError"),testId:"browse-error"}):null,!Se&&z.length===0&&!I?e.jsx(At,{testId:"browse-empty",icon:st,title:n("assets.empty.title"),body:d?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:d}),n("assets.empty.searchAfter")]}):n("assets.empty.filters"),cta:{label:n("assets.empty.cta"),onClick:()=>o("/overview")}}):e.jsxs(e.Fragment,{children:[e.jsx(tn,{"data-testid":"grid",children:Se?e.jsx(Ne,{count:Ye}):e.jsxs(e.Fragment,{children:[z.map(a=>{if(!L)return e.jsx(J,{item:a,mode:"view"},X(a));const H=a;if(H.source!=="legacy")return e.jsx(J,{item:a},X(a));const Q=Je(H);return Q==null?e.jsx(J,{item:a,mode:"view"},X(a)):e.jsx(J,{item:{...H,priceCredits:Q}},X(a))}),_?e.jsx(Ne,{count:6}):null]})}),e.jsx(Bt,{hasNextPage:M,isFetching:_,isError:ae,onLoadMore:()=>void Z()})]})]})})]})}export{ii as Assets};
939
- //# sourceMappingURL=Assets-I2VVAioQ.js.map
938
+ `,Ue=48,zs=["all","on_sale","not_for_sale"],Ms=s=>s?"all":"on_sale";function ii(){const[s]=tt(),o=He(),a=(s.get("q")??"").trim().toLowerCase(),d=(s.get("q")??"").trim();De({title:d?n("seo.collectibles.searchTitle",{query:d}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const h=Ms(!!a),g=m.useMemo(()=>({category:"all",status:h,subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[h]),[l,u]=nt(g),{subCategory:c,rarities:p,priceMin:f,priceMax:w,smart:j,sort:$}=l,C=l.category,x=zs.includes(l.status)?l.status:h;it(`${C}:${c??""}`);const[b,S]=m.useState(!1);m.useEffect(()=>{if(!b)return;const r=Q=>{Q.key==="Escape"&&S(!1)};document.addEventListener("keydown",r);const H=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",r),document.body.style.overflow=H}},[b]);const L=x==="on_sale",T=f&&!Number.isNaN(Number(f))?Number(f):void 0,k=w&&!Number.isNaN(Number(w))?Number(w):void 0,W=Nt(),B=c?Ut[c]:void 0,z=(Ie.find(r=>r.key===$)??Ie[0]).server,P={category:C,rarities:p.length?p:void 0,wearableCategories:B,minPriceCredits:T,maxPriceCredits:k,search:a||void 0,sortBy:z,isSmart:j||void 0,onSale:!0,listingType:W?void 0:"primary"},N={category:C,rarities:p.length?p:void 0,wearableCategories:B,search:a||void 0,sortBy:z,isWearableSmart:j||void 0,isOnSale:x==="not_for_sale"?!1:void 0},{items:A,total:F,isLoading:R,isPlaceholderData:v,error:I,hasNextPage:M,isFetchingNextPage:_,isFetchNextPageError:re,fetchNextPage:Z}=Pt(L?["shop-items",P]:["catalog-items",N],r=>L?Mt({...P,first:Ue,skip:r}):Wt({...N,first:Ue,skip:r}),{enabled:C!=="names"}),y=F,{data:U,isError:D,isPending:Qe}=Ge(),Je=r=>U&&r.manaWei?qe(r.manaWei,U):null,Xe=L&&Qe&&A.some(r=>r.source==="legacy"),Se=R||v||Xe,Ye=R?15:Math.max(A.length,1),Ee=m.useRef(null);m.useEffect(()=>{R||v||!a||Ee.current===a||(Ee.current=a,oe("Shop Searched",{query:a,result_count:y}))},[a,R,v,y]);const K=m.useRef("__init__");m.useEffect(()=>{if(R||v)return;const r=JSON.stringify({category:C,subCategory:c,rarities:p,min:T,max:k,sort:$,status:x,smart:j});if(K.current==="__init__"||K.current===r){K.current=r;return}K.current=r,oe("Shop Applied Filter",{filters:{category:C,sub_category:c,rarities:p,min_price_credits:T??null,max_price_credits:k??null,status:x,smart:j,sort:$},result_count:y})},[C,c,p,T,k,$,x,j,R,v,y]);function Te(r){u({category:r,subCategory:null})}function Re(r){u({status:r})}function _e(r){u({rarities:p.includes(r)?p.filter(H=>H!==r):[...p,r]})}function et(){u(g)}const q=[];(T!=null||k!=null)&&q.push({key:"price",label:n("filter.price"),onRemove:()=>{u({priceMin:"",priceMax:""})}});for(const r of ot)p.includes(r)&&q.push({key:`rarity-${r}`,label:At(r),onRemove:()=>_e(r)});return j&&q.push({key:"smart",label:n("filter.smart"),onRemove:()=>u({smart:!1})}),x!==h&&q.push({key:"status",label:x==="all"?n("filter.statusAll"):x==="on_sale"?n("filter.onSale"):n("filter.notForSale"),onRemove:()=>Re(h)}),e.jsxs(at,{"data-testid":"browse",children:[C!=="names"&&e.jsxs(e.Fragment,{children:[b?e.jsx(rt,{onClick:()=>S(!1),"aria-hidden":!0}):null,e.jsxs(lt,{"data-open":b||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(ct,{children:[e.jsx(dt,{children:n("assets.filters")}),e.jsx(ht,{onClick:()=>S(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(pt,{children:e.jsx(ut,{category:C,subCategory:c,onCategory:Te,onSub:r=>u({subCategory:r}),priceMin:f,priceMax:w,onPriceMin:r=>u({priceMin:r}),onPriceMax:r=>u({priceMax:r}),rarities:p,onToggleRarity:_e,status:x,onStatus:Re,smart:j,onSmart:r=>u({smart:r})})}),e.jsx(ft,{children:e.jsx(mt,{type:"button",onClick:()=>S(!1),children:n("assets.showItems")})})]})]}),e.jsx(xt,{children:C==="names"?e.jsx(Ns,{onBack:()=>Te("all")}):e.jsxs(e.Fragment,{children:[e.jsx(gt,{sort:$,onSort:r=>u({sort:r}),total:F,loading:R||v,query:a,onOpenFilters:()=>S(!0),chips:q,onClearChips:et}),D&&L&&A.some(r=>r.source==="legacy")?e.jsx(As,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,I?e.jsx(Ht,{message:n("assets.loadError"),testId:"browse-error"}):null,!Se&&A.length===0&&!I?e.jsx(zt,{testId:"browse-empty",icon:st,title:n("assets.empty.title"),body:d?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:d}),n("assets.empty.searchAfter")]}):n("assets.empty.filters"),cta:{label:n("assets.empty.cta"),onClick:()=>o("/overview")}}):e.jsxs(e.Fragment,{children:[e.jsx(tn,{"data-testid":"grid",children:Se?e.jsx(Ne,{count:Ye}):e.jsxs(e.Fragment,{children:[A.map(r=>{if(!L)return e.jsx(J,{item:r,mode:"view"},X(r));const H=r;if(H.source!=="legacy")return e.jsx(J,{item:r},X(r));const Q=Je(H);return Q==null?e.jsx(J,{item:r,mode:"view"},X(r)):e.jsx(J,{item:{...H,priceCredits:Q}},X(r))}),_?e.jsx(Ne,{count:6}):null]})}),e.jsx(Bt,{hasNextPage:M,isFetching:_,isError:re,onLoadMore:()=>void Z()})]})]})})]})}export{ii as Assets};
939
+ //# sourceMappingURL=Assets-Cyv8LkmE.js.map
@@ -1,4 +1,4 @@
1
- import{j as e,L as F,r as G}from"./react-Dvs-h5b4.js";import{t as o,s as n,B as K,n as P,o as Q,b as i,p as H,q as X,I as v,r as V,m as k,v as Z,c as J,w as U,x as T,h as Y,y as tt,z as D}from"./index-vtfh3nwp.js";import{a as et,b as it,c as C,d as ot,e as at,s as nt,f as st}from"./authorizations-Cl9CAf2g.js";import{f as rt}from"./builder-BjpkQ90N.js";import{m as M}from"./mana-matic-CEqvSwrJ.js";import{f as ct}from"./errors-BmD4KtWx.js";import"./dcl-schemas-C_BnTyQO.js";import"./sentry-3Vm_u2Wu.js";import"./ethers-J3-76ZXn.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-C2E121QZ.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="586c40bf-a30f-4df8-9ac2-fe7a2af988f5",t._sentryDebugIdIdentifier="sentry-dbid-586c40bf-a30f-4df8-9ac2-fe7a2af988f5")}catch{}})();const lt=P`
1
+ import{j as e,L as F,r as G}from"./react-a2ePEDgy.js";import{t as o,s as n,B as K,n as P,o as Q,b as i,p as H,q as X,I as v,r as V,m as k,v as Z,c as J,w as U,x as T,h as Y,y as tt,z as D}from"./index-Be9BP3SJ.js";import{a as et,b as it,c as C,d as ot,e as at,s as nt,f as st}from"./authorizations-JXhdylb0.js";import{f as rt}from"./builder-2HZX4ztd.js";import{m as M}from"./mana-matic-CEqvSwrJ.js";import{f as ct}from"./errors-Dw9Tpd9z.js";import"./dcl-schemas-D5wchj0M.js";import"./sentry-XIbC1v9G.js";import"./ethers-nJ6WEmLC.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-C-Mzgrci.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="586c40bf-a30f-4df8-9ac2-fe7a2af988f5",t._sentryDebugIdIdentifier="sentry-dbid-586c40bf-a30f-4df8-9ac2-fe7a2af988f5")}catch{}})();const lt=P`
2
2
  to { transform: rotate(360deg); }
3
3
  `,dt=P`
4
4
  to { background-position: -200% 0; }
@@ -189,4 +189,4 @@ import{j as e,L as F,r as G}from"./react-Dvs-h5b4.js";import{t as o,s as n,B as
189
189
  `,W=n(K)`
190
190
  margin-top: 12px;
191
191
  `;function y({descriptor:t,owner:s,signer:r,name:a,description:c,image:d,icon:m,revokeOnly:$=!1}){const g=Z(),[z,j]=G.useState(!1),{data:u,isLoading:l,refetch:h}=k({queryKey:["authorization",t.id,s],queryFn:()=>st(t,s),staleTime:3e4});async function p(){if(z||l)return;const w=!u;j(!0);try{await nt({auth:t,signer:r,active:w}),await h(),g.setQueryData(["authorization",t.id,s],w),T.success(w?i("authorizations.toastActivated",{name:a}):i("authorizations.toastDeactivated",{name:a}))}catch(E){Y(E,{flow:"authorizations",step:w?"grant":"revoke"}),T.error(ct(E,i("authorizations.errorGeneric")))}finally{j(!1)}}if($&&u===!1)return null;const f=l?i("authorizations.checking"):u?i("authorizations.active"):i("authorizations.inactive");return e.jsxs(gt,{"data-testid":`authorization-${t.id}`,"data-active":!!u,children:[e.jsx(ft,{children:d?e.jsx("img",{src:d,alt:""}):m}),e.jsxs(xt,{children:[e.jsx(yt,{title:a,children:a}),e.jsx(bt,{children:c})]}),e.jsxs(jt,{children:[e.jsx(zt,{"data-active":!!u,children:f}),z?e.jsx(vt,{"aria-label":i("authorizations.working")}):e.jsx(wt,{type:"button","data-testid":`authorization-toggle-${t.id}`,"data-active":!!u,role:"switch","aria-checked":!!u,"aria-label":u?i("authorizations.deactivateAria",{name:a}):i("authorizations.activateAria",{name:a}),disabled:l,onClick:()=>void p()})]})]})}const b=500,B=10,$t=b*B;async function O(t,s){const r=await D(t,{category:s,first:b}),a=Math.min(Math.ceil(r.total/b),B),c=await Promise.all(Array.from({length:Math.max(0,a-1)},(d,m)=>D(t,{category:s,first:b,skip:(m+1)*b})));return{assets:[...r.assets,...c.flatMap(d=>d.assets)],truncated:r.total>$t}}function Ct(t){return k({queryKey:["owned-collections",t],enabled:!!t,staleTime:6e4,queryFn:async()=>{const[s,r]=await Promise.all([O(t,"wearable"),O(t,"emote")]),a=new Map;for(const c of[...s.assets,...r.assets]){const d=c.contractAddress.toLowerCase();a.has(d)||a.set(d,c)}return{collections:[...a.values()],truncated:s.truncated||r.truncated,scanned:s.assets.length+r.assets.length}}})}function At(t){return k({queryKey:["contract-registry"],enabled:t,staleTime:1/0,gcTime:1/0,queryFn:tt})}function It(t,s){const r=s==null?void 0:s.get(t.toLowerCase());if(r)return r;const a=U(t);return a===t?i("authorizations.collectionFallback"):a}function Et(t,s){return k({queryKey:["creator-collections",t],enabled:!!t&&!!s,staleTime:6e4,queryFn:async()=>{const r=await rt(t,s),a=new Map;for(const c of r){const d=c.contractAddress.toLowerCase();a.has(d)||a.set(d,c)}return[...a.values()]}})}function Pt(){Q({title:i("authorizations.title"),noindex:!0});const{session:t,signIn:s}=H(),r=J.chainId,a=X(t==null?void 0:t.providerType),{data:c,isLoading:d}=Ct(a?t==null?void 0:t.address:void 0),{data:m,isLoading:$}=At(!!a&&!!(t!=null&&t.address)),{data:g,isLoading:z}=Et(a?t==null?void 0:t.address:void 0,a?t==null?void 0:t.identity:void 0);if(!t)return e.jsxs(N,{children:[e.jsx(v,{name:"info",size:40,color:o.colors.muted2}),e.jsx(R,{children:i("authorizations.signInTitle")}),e.jsx(q,{children:i("authorizations.signInBody")}),e.jsx(W,{variant:"white",onClick:()=>s(),children:i("storeSettings.signIn")})]});if(!a)return e.jsxs(N,{children:[e.jsx(v,{name:"check",size:40,color:o.colors.ok}),e.jsx(R,{children:i("authorizations.managedTitle")}),e.jsx(q,{children:i("authorizations.managedBody")}),e.jsx(W,{as:F,to:"/items",variant:"white",children:i("authorizations.managedCta")})]});const j=et(r),u=it(r);return e.jsxs(ut,{children:[e.jsxs(ht,{children:[e.jsx(pt,{children:i("authorizations.title")}),e.jsx(mt,{children:i("authorizations.intro")})]}),e.jsxs(A,{children:[e.jsx(I,{children:i("authorizations.buyingTitle")}),e.jsxs(x,{children:[e.jsx(y,{descriptor:j,owner:t.address,signer:t.signer,name:i("authorizations.creditsName"),description:i("authorizations.creditsDesc"),icon:e.jsx(V,{className:"ccy-mark"})}),e.jsx(y,{descriptor:u,owner:t.address,signer:t.signer,name:i("authorizations.manaName"),description:i("authorizations.manaDesc"),icon:e.jsx(L,{src:M,alt:"","aria-hidden":!0})}),C(u).map(l=>e.jsx(y,{descriptor:l,owner:t.address,signer:t.signer,name:`${i("authorizations.manaName")} ${i("authorizations.previousVersion")}`,description:i("authorizations.manaDesc"),icon:e.jsx(L,{src:M,alt:"","aria-hidden":!0}),revokeOnly:!0},l.id))]})]}),e.jsxs(A,{children:[e.jsx(I,{children:i("authorizations.sellingTitle")}),c!=null&&c.truncated?e.jsx(kt,{"data-testid":"authorizations-selling-truncated",children:i("authorizations.sellingTruncated",{count:c.scanned})}):null,d||$?e.jsx(x,{"aria-busy":"true","aria-label":i("authorizations.checking"),children:Array.from({length:3}).map((l,h)=>e.jsx(S,{"aria-hidden":!0},h))}):c&&c.collections.length>0?e.jsx(x,{children:c.collections.flatMap(l=>{const h=ot(l.contractAddress,r);return[h,...C(h)].map((p,f)=>e.jsx(y,{descriptor:p,owner:t.address,signer:t.signer,name:It(l.contractAddress,m),description:i("authorizations.sellingDesc"),image:l.image,icon:e.jsx(v,{name:"pen",size:18}),revokeOnly:f>0},p.id))})}):e.jsx(_,{children:i("authorizations.sellingEmpty")})]}),e.jsxs(A,{children:[e.jsx(I,{children:i("authorizations.mintingTitle")}),z?e.jsx(x,{"aria-busy":"true","aria-label":i("authorizations.checking"),children:Array.from({length:3}).map((l,h)=>e.jsx(S,{"aria-hidden":!0},h))}):g&&g.length>0?e.jsx(x,{children:g.flatMap(l=>{const h=at(l.contractAddress,r);return[h,...C(h)].map((p,f)=>e.jsx(y,{descriptor:p,owner:t.address,signer:t.signer,name:l.name||i("authorizations.collectionFallback"),description:i("authorizations.mintingDesc"),icon:e.jsx(v,{name:"pen",size:18}),revokeOnly:f>0},p.id))})}):e.jsx(_,{children:i("authorizations.mintingEmpty")})]})]})}export{Pt as Authorizations};
192
- //# sourceMappingURL=Authorizations-Btu1-t77.js.map
192
+ //# sourceMappingURL=Authorizations-Bx1T-Y1z.js.map
@@ -1,4 +1,4 @@
1
- import{j as e,L as Qt,r as T,b as xa,a as fa}from"./react-Dvs-h5b4.js";import{s as i,t as E,b as a,r as Pe,E as ae,be as Fe,C as Me,bf as ma,D as Le,bg as ya,A as ba,I as Y,j as Xe,o as va,ad as H,H as jt,p as wa,W as Ca,m as ja,bh as ka,v as $a,bi as Sa,J as Ma,bj as Ta,bk as kt,L as Pa,bl as Ia,bm as Aa,bn as za,aq as Ke,q as Ea,bo as $t,af as V,bp as St,bq as Ba,h as re,br as Ra,bs as qa,bt as _a,bu as Ne,Y as Wa,bv as we,bw as Ce,bx as Mt,by as Fa,g as Tt,f as Pt,bz as La}from"./index-vtfh3nwp.js";import{m as Te,M as Ka,S as Na,C as Qa,H as Ua,a as Ga,T as Oa,X as Ha,b as Da,B as Va,c as Ya,d as It,e as Ja,f as Ie,g as Xa,h as Za,i as es,j as ts,k as Je,l as pe,L as as,P as ss,n as At,o as zt,W as ns,p as is,q as rs,r as os,A as cs,s as ls,t as ds,u as us,v as hs,w as ps,x as gs,y as xs,z as fs,D as ms,E as ys,F as bs,G as vs,I as ws,J as Cs,K as js,N as ks,O as Qe,Q as $s,R as Ss,U as Ms,V as Et,Y as Bt,Z as Ts,_ as Ps,$ as Is,a0 as As,a1 as Rt,a2 as zs}from"./CollectionCarousel-DxzM9hwQ.js";import{l as Es,n as Bs,f as Rs,o as qs,h as _s,A as Ws}from"./authorizations-Cl9CAf2g.js";import{p as qt,g as Fs,h as Ue}from"./buy-DLOIoAYB.js";import{w as Ls,S as Ge,b as Ks,G as Ns}from"./buy-gasless-C3qljNGZ.js";import{u as Qs,M as Us,R as je,r as Gs,c as Os,g as Hs,a as Ds,p as _t,b as Oe}from"./useCreditPacks-Ckn23vzO.js";import{i as Vs,a as Ys}from"./errors-BmD4KtWx.js";import{E as Js}from"./ErrorNotice-D1vyV_9N.js";import"./dcl-schemas-C_BnTyQO.js";import"./sentry-3Vm_u2Wu.js";import"./ethers-J3-76ZXn.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-C2E121QZ.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new r.Error().stack;d&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[d]="91310df3-5127-4303-ac08-f334eebc9540",r._sentryDebugIdIdentifier="sentry-dbid-91310df3-5127-4303-ac08-f334eebc9540")}catch{}})();const Xs=i.div`
1
+ import{j as e,L as Qt,r as T,b as xa,a as fa}from"./react-a2ePEDgy.js";import{s as i,t as E,b as a,r as Pe,E as ae,be as Fe,C as Me,bf as ma,D as Le,bg as ya,A as ba,I as Y,j as Xe,o as va,ad as H,H as jt,p as wa,W as Ca,m as ja,bh as ka,v as $a,bi as Sa,J as Ma,bj as Ta,bk as kt,L as Pa,bl as Ia,bm as Aa,bn as za,aq as Ke,q as Ea,bo as $t,af as V,bp as St,bq as Ba,h as re,br as Ra,bs as qa,bt as _a,bu as Ne,Y as Wa,bv as we,bw as Ce,bx as Mt,by as Fa,g as Tt,f as Pt,bz as La}from"./index-Be9BP3SJ.js";import{m as Te,M as Ka,S as Na,C as Qa,H as Ua,a as Ga,T as Oa,X as Ha,b as Da,B as Va,c as Ya,d as It,e as Ja,f as Ie,g as Xa,h as Za,i as es,j as ts,k as Je,l as pe,L as as,P as ss,n as At,o as zt,W as ns,p as is,q as rs,r as os,A as cs,s as ls,t as ds,u as us,v as hs,w as ps,x as gs,y as xs,z as fs,D as ms,E as ys,F as bs,G as vs,I as ws,J as Cs,K as js,N as ks,O as Qe,Q as $s,R as Ss,U as Ms,V as Et,Y as Bt,Z as Ts,_ as Ps,$ as Is,a0 as As,a1 as Rt,a2 as zs}from"./CollectionCarousel-btoG5Zui.js";import{l as Es,n as Bs,f as Rs,o as qs,h as _s,A as Ws}from"./authorizations-JXhdylb0.js";import{p as qt,g as Fs,h as Ue}from"./buy-DKnUYoQz.js";import{w as Ls,S as Ge,b as Ks,G as Ns}from"./buy-gasless-BPY5Wv6q.js";import{u as Qs,M as Us,R as je,r as Gs,c as Os,g as Hs,a as Ds,p as _t,b as Oe}from"./useCreditPacks-CrrKa-aS.js";import{i as Vs,a as Ys}from"./errors-Dw9Tpd9z.js";import{E as Js}from"./ErrorNotice-DPZR9TIT.js";import"./dcl-schemas-D5wchj0M.js";import"./sentry-XIbC1v9G.js";import"./ethers-nJ6WEmLC.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-C-Mzgrci.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new r.Error().stack;d&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[d]="91310df3-5127-4303-ac08-f334eebc9540",r._sentryDebugIdIdentifier="sentry-dbid-91310df3-5127-4303-ac08-f334eebc9540")}catch{}})();const Xs=i.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 12px;
@@ -745,4 +745,4 @@ import{j as e,L as Qt,r as T,b as xa,a as fa}from"./react-Dvs-h5b4.js";import{s
745
745
  margin-top: 0;
746
746
  }
747
747
  `;function Ve(r){if(Vs(r))return a("errors.rejected");const d=(r.message??"").toLowerCase();return d.includes("insufficient")?a("cart.error.insufficient",{currency:Me.name}):d.includes("no active listing")||d.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const ai=12e4;function si(r){const d=[];return r.unavailable.length&&d.push(a("cart.drop.unavailable",{count:r.unavailable.length})),r.own.length&&d.push(a("cart.drop.own",{count:r.own.length})),a("cart.drop.removed",{items:d.join(` ${a("cart.drop.and")} `)})}const Ye=r=>r.reduce((d,k)=>d+k.priceCredits*k.quantity,0),Se=r=>r.flatMap(d=>Array.from({length:d.quantity},()=>({...d,quantity:1})));function yi(){var Ct;va({title:a("nav.cart"),noindex:!0});const r=H(t=>t.items),d=H(t=>t.remove),k=H(t=>t.increment),$=H(t=>t.decrement),B=H(t=>t.clear),U=H(t=>t.restore),O=H(t=>t.setFittingOpen),A=jt(t=>t.items),J=jt(t=>t.toggle),{session:n,signIn:G}=wa(),Yt=Ca(),ge=Qs().packs.slice(0,Us);T.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const Jt=r.some(t=>t.category!=="emote"),{data:Ae}=ja({queryKey:["upsell-listings"],queryFn:()=>La({first:40}),staleTime:6e4}),{data:j}=ka(n),b=$a(),X=xa(),{state:R}=fa(),[Xt,le]=T.useState(null),[Ze,xe]=T.useState(null),[Zt,q]=T.useState(!1),[_,D]=T.useState(null),et=T.useRef(0),[h,S]=T.useState(null),{data:fe}=Sa(n),{data:de}=Ma(!0),[ze,tt]=T.useState(""),ue=T.useRef(null),at=Ta(r),st=t=>$t(at[t.id]),Ee=r.filter(st),nt=r.length>0&&Ee.length===0,ea=Ee.reduce((t,s)=>t+s.priceCredits*s.quantity,0),ta=r.reduce((t,s)=>t+s.quantity,0),aa=Ee.reduce((t,s)=>t+s.quantity,0),it=_?_.liveTotalCredits:ea,sa=new Set(r.map(t=>t.id)),rt=((Ae==null?void 0:Ae.items)??[]).filter(t=>!sa.has(t.id)).slice(0,12),na=new Map(_==null?void 0:_.buyable.map(t=>[t.item.id,t])),me=(j==null?void 0:j.credits)??0,Be=it*10,ia=de?kt(Be,de):0n,Re=Qe({priceCents:Be,priceManaWei:ia,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:fe??0n}),ra=t=>t.flatMap(s=>{const c=Oe(s);return c.kind==="store"?[c.mint]:[]}),oa=t=>t.flatMap(s=>s.acquisition==="trade"?[s.trade]:[]),ca=Ba,la=t=>qa(t.contractAddress,String(t.itemId));function ye(t){t(),D(null),xe(null),le(null)}function da(){S(null),q(!1)}function ot(t){const s=Ye(t),c=Math.max(0,s-me),o=ge.find(u=>u.credits>=c)??ge[ge.length-1];tt(o.id),V("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:s,credits_balance:me,shortfall:c}),S({phase:"nofunds",lines:t.map(u=>({item:u.item,priceCredits:u.priceCredits,quantity:u.quantity})),shortfall:c}),q(!1)}async function qe(t){if(!n||t.length===0)return;const s=Se(t),c=s.map(m=>({...m.item,priceCredits:m.priceCredits})),o=t.map(m=>({...m.item,priceCredits:m.priceCredits,quantity:m.quantity})),u=[];let v="authorize";const g=new Set,M=new Set,L=new Set,W=[];let w=!1;S({phase:"processing",stage:"reserving",step:1,total:s.length});try{const m=[],z=Hs(s,qt);let K=0;for(const p of z){S({phase:"processing",stage:"reserving",step:K+1,total:s.length});try{const{credit:f,maxCreditedValue:y}=await _a(n.identity,p.units.map(Ds));p.units.forEach((Q,ie)=>{u.push({salt:f.id,itemId:Q.item.id}),m.push({...p.drafts[ie],credits:[f],maxCreditedValue:y})}),K+=p.units.length}catch(f){if(Ys(f)){if(u.length){try{await Ne(n.identity,[...new Set(u.map(y=>y.salt))])}catch(y){re(y,{flow:"cart_checkout",step:"release"})}b.invalidateQueries({queryKey:["usd-balance"]})}ot(t);return}throw f}}u.length&&b.invalidateQueries({queryKey:["usd-balance"]}),v="submit";const N=Fs(m).length,te=p=>N>1?{current:p,total:N}:void 0,F=(p,f)=>S({phase:"processing",stage:p,step:s.length,total:s.length,signatures:te(f)}),C=p=>p<N?F("awaiting-signature",p+1):F("settling",N);F("awaiting-signature",1);let x=[];const P=new Map,se=async p=>{const f=await Promise.allSettled(p.map(y=>Ls(y)));return f.forEach((y,Q)=>{const ie=P.get(p[Q])??[];y.status==="fulfilled"?(ie.forEach(We=>M.add(We)),W.push(p[Q])):y.reason instanceof Ge||ie.forEach(We=>L.add(We))}),f.flatMap(y=>y.status==="rejected"?[y.reason]:[])};if(Es())try{let p=0;x=await Ks({purchases:m,buyer:n.address,signer:n.signer,identity:n.identity,onSigned:()=>F("settling",Math.min(p+1,N)),onBroadcast:({txHash:y,salts:Q})=>{p+=1,P.set(y,Q),Q.forEach(ie=>g.add(ie))},onGroupSettling:({settled:y})=>F("settling",y)});const f=await se(x);if(f.length&&!f.some(y=>y instanceof Ge))throw f[0];w=!0}catch(p){if(p instanceof Ge)throw await se([...P.keys()]),p;if(!(p instanceof Ns)||!Wa(n.providerType))throw p;x=await Ue({purchases:m,buyer:n.address,signer:n.signer,onSigned:C,onBroadcast:({salts:f})=>f.forEach(y=>g.add(y)),onSettled:({txHash:f,salts:y})=>{y.forEach(Q=>M.add(Q)),W.push(f)},onReverted:({salts:f})=>f.forEach(y=>L.add(y))})}else x=await Ue({purchases:m,buyer:n.address,signer:n.signer,onSigned:C,onBroadcast:({salts:p})=>p.forEach(f=>g.add(f)),onSettled:({txHash:p,salts:f})=>{f.forEach(y=>M.add(y)),W.push(p)},onReverted:({salts:p})=>p.forEach(f=>L.add(f))});t.forEach(p=>d(p.item.id)),D(null),V("Shop Completed Purchase",{...we(c),payment_type:"credits",no_crypto_step:w,transaction_hash:x[0]??null}),Bt(b);const ve=ue.current;ue.current=null,S(null),q(!1);const ne={items:o,txHash:x[0]??void 0,txHashes:x,settled:!0,...ve?{creditsAdded:ve}:{}};X("/success",{state:ne,replace:!0})}catch(m){Ce(m)||re(m,{flow:"cart_checkout",step:v,cart_size:t.length});const z=new Set([...g].filter(x=>!L.has(x))),{toRelease:K,boughtItemIds:N}=_t({reservations:u,spent:z,settled:M}),te=[...z].some(x=>!M.has(x)),F=c.filter(x=>N.includes(x.id)),C=c.filter(x=>!N.includes(x.id));if(V(Ce(m)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:v,error_code:Mt(m),value_usd:St(C.reduce((x,P)=>x+P.priceCredits,0)),cart_size:s.length,partial:F.length>0}),K.length)try{await Ne(n.identity,K)}catch(x){re(x,{flow:"cart_checkout",step:"release"})}if(b.invalidateQueries({queryKey:["usd-balance"]}),F.length>0){N.forEach(x=>d(x)),D(null),Bt(b),V("Shop Completed Purchase",{...we(F),payment_type:"credits",no_crypto_step:w,transaction_hash:W[0]??null,partial:!0}),S({phase:"error",message:a("cart.error.partiallyBought"),heldCredits:te}),q(!1);return}S({phase:"error",message:te?void 0:Ve(m),heldCredits:te})}}function ct(t,s){b.invalidateQueries({queryKey:["usd-balance"]}),b.invalidateQueries({queryKey:["detail-trade"]}),b.invalidateQueries({queryKey:["shop-item"]}),b.invalidateQueries({queryKey:["owned-token"]}),b.invalidateQueries({queryKey:["public-token"]}),b.invalidateQueries({queryKey:["item-resales"]}),b.invalidateQueries({queryKey:["shop-items"]}),b.invalidateQueries({queryKey:["catalog-items"]}),b.invalidateQueries({queryKey:["my-assets"]}),b.invalidateQueries({queryKey:["purchases"]}),b.invalidateQueries({queryKey:["owned-item-count"]}),b.invalidateQueries({queryKey:["overview-listings"]}),b.invalidateQueries({queryKey:["upsell-listings"]});const c=ue.current;ue.current=null,S(null),q(!1);const o={items:t,txHash:s[0]??void 0,txHashes:s,settled:!0,...c?{creditsAdded:c}:{}};X("/success",{state:o,replace:!0})}function lt(t,s){Ce(t)||re(t,{flow:s,step:"submit"}),V(Ce(t)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Mt(t)}),S({phase:"error",message:Ve(t)}),q(!1)}async function ua(t,s,c){const o=Tt(Pt.MANAToken,s),u=Tt(Pt.CreditsManager,s);await _s({auth:{kind:Ws.Allowance,contractAddress:o.address,spenderAddress:u.address,chainId:s},signer:t,requiredWei:c})}async function dt(){if(de)return de;try{return await b.fetchQuery(Ra())}catch{return}}async function ha(t){const s=Se(t).reduce((v,g)=>v+g.usdCents,0),o=(fe??0n)>0n?await dt():de,u=o?kt(s,o):0n;return{totalCents:s,manaWei:u}}async function ut(t,s){const c=Ye(t),{totalCents:o,manaWei:u}=await ha(t),v=Qe({priceCents:o,priceManaWei:u,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:fe??0n});if(s&&v.options.some(g=>g.method===s)){if(s==="credits"){qe(t);return}const g=xt(v,s);await pt(ht(s,t),g,()=>s==="mana"?void ft(t,g):void mt(t,o,u));return}if(v.options.some(g=>g.method==="mana"||g.method==="combined")){S({phase:"choose",lines:t,totalCents:o,manaWei:u}),q(!1);return}if(j!=null&&j.credits<c){ot(t);return}qe(t)}function _e(t){return Qe({priceCents:t.totalCents,priceManaWei:t.manaWei,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:fe??0n})}const[he,be]=T.useState(null);function ht(t,s){const c=new Map;for(const o of s){const u=Ts(t,Oe(o));c.set(`${u.chainId}:${u.spender.toLowerCase()}`,u)}return[...c.values()]}async function pt(t,s,c){const o=[];for(const{spender:u,chainId:v}of t){const g=Bs(v,u),M=n?await Rs(g,n.address,s).catch(()=>!0):!0;qs(n==null?void 0:n.providerType,M)&&o.push(g)}if(o.length===0){c();return}q(!1),gt(o,0,c)}function gt(t,s,c){be({auth:t[s],index:s+1,total:t.length,run:()=>s+1<t.length?gt(t,s+1,c):c()})}function xt(t,s){var c;return((c=t.options.find(o=>o.method===s))==null?void 0:c.manaWei)??0n}function pa(t){if((h==null?void 0:h.phase)!=="choose")return;const{lines:s,totalCents:c,manaWei:o}=h;if(t==="credits"){qe(s);return}const u=xt(_e(h),t);pt(ht(t,s),u,()=>t==="mana"?void ft(s,u):void mt(s,c,o))}async function ft(t,s){if(!n||t.length===0)return;const c=Se(t),o=c.map(g=>({...g.item,priceCredits:g.priceCredits})),u=t.map(g=>({...g.item,priceCredits:g.priceCredits,quantity:g.quantity})),v=()=>S({phase:"processing",stage:"settling",step:c.length,total:c.length});S({phase:"processing",stage:"awaiting-signature",step:c.length,total:c.length});try{const g=await Ps({trades:oa(c),mints:ra(c),buyer:n.address,signer:n.signer,onSigned:v,manaWei:s});t.forEach(M=>d(M.item.id)),D(null),V("Shop Completed Purchase",{...we(o),payment_type:"mana",transaction_hash:g[0]??null}),b.invalidateQueries({queryKey:["mana-balance"]}),ct(u,g)}catch(g){lt(g,"buy_cart_mana")}}async function mt(t,s,c){if(!n||t.length===0)return;const o=Se(t),u=o.map(w=>({...w.item,priceCredits:w.priceCredits})),v=t.map(w=>({...w.item,priceCredits:w.priceCredits,quantity:w.quantity})),g=Is(o.map(w=>w.usdCents),(j==null?void 0:j.balanceCents)??0),M=[],L=new Set,W=new Set;S({phase:"processing",stage:"reserving",step:1,total:o.length});try{const w=o.map(Oe),m=[],z=new Map,K=new Map;for(let C=0;C<o.length;C++){const x=o[C],P=w[C],se=g[C],ve=As(Math.max(0,x.usdCents-se),s,c);let ne;if(se<=0)ne=Rt(P,[],"0");else{S({phase:"processing",stage:"reserving",step:C+1,total:o.length});const f=x.item,{credit:y,maxCreditedValue:Q}=await Fa(n.identity,se,P.kind==="trade"?P.trade.id:void 0,f.contractAddress&&f.itemId!=null?{contractAddress:f.contractAddress,itemId:String(f.itemId)}:void 0);M.push({salt:y.id,itemId:f.id}),ne=Rt(P,[y],Q)}const p=qt(ne);z.set(p,(z.get(p)??0n)+ve),K.has(p)||K.set(p,m.length),m.push(ne)}M.length&&b.invalidateQueries({queryKey:["usd-balance"]});for(const[C,x]of z){const P=K.get(C);P==null||x<=0n||(m[P]={...m[P],maxCreditedValue:(BigInt(m[P].maxCreditedValue)+x).toString()})}const N=[...z.values()].reduce((C,x)=>C+x,0n);await ua(n.signer,zs(w[0]),N);const te=()=>S({phase:"processing",stage:"settling",step:o.length,total:o.length});S({phase:"processing",stage:"awaiting-signature",step:o.length,total:o.length});const F=await Ue({purchases:m,buyer:n.address,signer:n.signer,onSigned:te,onBroadcast:({salts:C})=>C.forEach(x=>L.add(x)),onReverted:({salts:C})=>C.forEach(x=>W.add(x))});t.forEach(C=>d(C.item.id)),D(null),V("Shop Completed Purchase",{...we(u),payment_type:"credits_and_mana",transaction_hash:F[0]??null}),b.invalidateQueries({queryKey:["mana-balance"]}),ct(v,F)}catch(w){const{toRelease:m}=_t({reservations:M,spent:new Set([...L].filter(z=>!W.has(z))),settled:new Set});m.length&&Ne(n.identity,m).catch(()=>{}),M.length&&b.invalidateQueries({queryKey:["usd-balance"]}),lt(w,"buy_cart_combined")}}async function Z(t){if(!n){Et({type:"cart-checkout"}),G();return}const s=H.getState().items.filter(st);if(s.length===0)return;le(null),xe(null),q(!0);const c=s.reduce((o,u)=>o+u.priceCredits*u.quantity,0);V("Shop Started Checkout",{checkout_source:"cart",cart_size:s.length,cart_value_credits:c,cart_value_usd:St(c),has_sufficient_credits:me>=c});try{const o=await Gs(s,n.address,ca,await dt(),la),u=[...o.unavailable,...o.own];if(u.length&&(u.forEach(v=>d(v.id)),xe(si(o))),o.buyable.length===0){le(a("cart.error.noneAvailable")),D(null);return}if(o.orderChanged){D(o),et.current=Date.now();return}await ut(o.buyable,t)}catch(o){re(o,{flow:"cart_checkout",step:"review",cart_size:s.length}),le(Ve(o))}finally{q(!1)}}async function yt(){if(_){if(!n){Et({type:"cart-checkout"}),G();return}if(Date.now()-et.current>ai){D(null),xe(null),await Z();return}le(null),ut(_.buyable)}}async function ga(){if(ze){try{sessionStorage.setItem(je,JSON.stringify(H.getState().items))}catch{}q(!0);try{const t=await Os(ze,n?{address:n.address,identity:n.identity}:void 0);if(t.url){window.location.href=t.url;return}X("/credits")}catch(t){try{sessionStorage.removeItem(je)}catch{}re(t,{flow:"cart_buy_credits"}),S({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{q(!1)}}}const bt=T.useRef(!1);T.useEffect(()=>{if(!n||bt.current||!$s("cart-checkout"))return;bt.current=!0;const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[n]);const vt=T.useRef(!1);T.useEffect(()=>{if(!(R!=null&&R.resumeCheckout)||vt.current)return;vt.current=!0,ue.current=R.creditsAdded??null;try{const s=sessionStorage.getItem(je);if(s){sessionStorage.removeItem(je);const c=JSON.parse(s);Array.isArray(c)&&c.length&&U(c)}}catch{}b.invalidateQueries({queryKey:["usd-balance"]});const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[R==null?void 0:R.resumeCheckout]);const wt=T.useRef(!1);T.useEffect(()=>{if(!(R!=null&&R.startCheckout)||wt.current)return;wt.current=!0,X(".",{replace:!0,state:null});const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[R==null?void 0:R.startCheckout]);const ee=Zt||(h==null?void 0:h.phase)==="processing";return r.length===0&&!h?e.jsx(Ft,{children:e.jsxs(Kt,{children:[e.jsxs(Lt,{onClick:()=>X(-1),type:"button",children:[e.jsx(Y,{name:"arrow-left"}),a("nav.cart")]}),e.jsx(yn,{children:e.jsx(Pa,{variant:"light",testId:"cart-empty",icon:Ia,title:a("cart.empty.title"),body:a("cart.empty.body"),cta:{label:a("cart.empty.cta"),to:"/items"}})})]})}):e.jsxs(Ft,{children:[e.jsxs(Kt,{children:[e.jsxs(Lt,{onClick:()=>X(-1),type:"button",children:[e.jsx(Y,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(gn,{children:[e.jsxs(xn,{children:[e.jsxs(fn,{children:[e.jsx(bn,{onClick:()=>X(-1),type:"button","aria-label":a("cart.goBack"),children:e.jsx(Y,{name:"arrow-left"})}),e.jsx(vn,{children:a("cart.panelTitle",{count:ta})}),Jt?e.jsxs(wn,{onClick:()=>O(!0),disabled:ee,children:[e.jsx(Y,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),e.jsxs(mn,{children:[e.jsx(Cn,{children:r.map(t=>{const s=na.get(t.id),c=s?s.priceCredits:t.priceCredits,o=!!s&&s.priceCredits!==t.priceCredits,u=!t.tokenId,v=t.quantity,g=typeof t.available=="number"&&v>=t.available,M=c*v,L=Aa(t),W=!!L&&!!A[L],w=za(t),m=at[t.id],z=!$t(m),K=m==="sold-out"?a("cart.availability.soldOut"):a("cart.availability.unavailable");return e.jsxs(jn,{"data-unavailable":z||void 0,children:[e.jsxs(kn,{"data-thumb":!0,children:[w?e.jsx($n,{to:w,state:{item:t,tradeId:t.tradeId},"aria-label":t.name,children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:t.name}):null}):t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:t.name}):null,e.jsx(Sn,{"data-check":!0,"aria-hidden":!0,children:e.jsx("svg",{viewBox:"0 0 20 20",width:"12",height:"12",children:e.jsx("path",{d:"M5 10.5l3 3 7-7.5",fill:"none",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),e.jsxs(Mn,{children:[e.jsxs(Tn,{"data-desc":!0,children:[w?e.jsx(In,{to:w,state:{item:t,tradeId:t.tradeId},title:t.name,children:t.name}):e.jsx(Pn,{title:t.name,children:t.name}),t.creator?e.jsx(An,{address:t.creator,linkToProfile:!0}):null,Yt&&u?e.jsxs(Kn,{"data-testid":"cart-creator-tag",children:[e.jsx(Nn,{name:"buy-from-creator"}),a("cart.creatorTag")]}):null]}),e.jsx(zn,{children:z?e.jsxs(Fn,{children:[e.jsx(Ln,{name:"warning-fill",size:24}),K]}):e.jsxs(e.Fragment,{children:[u?e.jsxs(En,{children:[e.jsx(Nt,{onClick:()=>ye(()=>$(t.id)),disabled:ee||v<=1,"aria-label":a("cart.decreaseQuantity",{name:t.name}),children:e.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:e.jsx("path",{d:"M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}),e.jsx(Bn,{children:v}),e.jsx(Nt,{onClick:()=>ye(()=>k(t.id)),disabled:ee||g,"aria-label":a("cart.increaseQuantity"),children:e.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:e.jsx("path",{d:"M8 3.5v9M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}):null,e.jsxs(Rn,{children:[e.jsx(qn,{})," ",e.jsx(Ke,{credits:M}),o?e.jsx(_n,{children:e.jsx(Ke,{credits:t.priceCredits*v})}):null]})]})})]}),e.jsxs(Wn,{children:[L?e.jsx(Qn,{"data-on":W||void 0,onClick:()=>J(t),"aria-label":W?a("cart.removeFromFavorites",{name:t.name}):a("cart.addToFavorites",{name:t.name}),title:W?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:e.jsx(Y,{name:W?"heart-solid":"heart"})}):null,e.jsx(Un,{onClick:()=>ye(()=>d(t.id)),disabled:ee,"aria-label":a("cart.remove",{name:t.name}),title:a("cart.removeTitle"),children:e.jsx(Y,{name:"trash",size:24})})]})]},t.id)})}),e.jsx(Gn,{children:e.jsx("button",{className:"link",onClick:()=>ye(B),disabled:ee,children:a("cart.clearCart")})})]})]}),e.jsxs(On,{children:[e.jsx(Hn,{children:a("cart.purchaseSummary")}),e.jsxs(Dn,{children:[e.jsxs(Vn,{children:[e.jsx(Yn,{children:a("cart.totalItems",{count:aa})}),e.jsx(Xn,{children:e.jsxs(Jn,{children:[e.jsx(Zn,{})," ",e.jsx(Ke,{credits:it})]})})]}),e.jsx(Gt,{options:Re.options,totalCents:Be,shortfall:Re.manaShortfall,showCreditsAmount:!1,creditsLabel:_?a("marketCheckout.confirmPurchase"):Re.options.length>1?a("cart.buyWithCredits"):a("cart.checkout"),busy:ee||nt,onPay:t=>void(_?yt():Z(t)),creditsFallback:{label:ee?a("cart.working"):_?a("marketCheckout.confirmPurchase"):a("cart.checkout"),onClick:()=>void(_?yt():Z())}}),nt?e.jsx($e,{className:"muted",children:a("cart.allUnavailable")}):null,n?null:e.jsx($e,{className:"muted",children:a("cart.signInHint")}),_?e.jsx($e,{className:"muted",children:a("cart.priceChanged")}):null,Ze?e.jsx($e,{className:"muted",children:Ze}):null,e.jsx(ei,{message:Xt})]})]})]})]}),rt.length>0?e.jsx(ti,{children:e.jsx(Ss,{title:a("cart.youMightAlsoLike"),items:rt})}):null,he&&n?e.jsx(Ms,{auth:he.auth,signer:n.signer,step:{index:he.index,total:he.total},title:a("authorizeStep.manaTitle"),name:a("authorizeStep.manaName"),reason:a("authorizeStep.manaReason"),icon:e.jsx("img",{src:Te,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{run:t}=he;be(null),t()},onCancel:()=>be(null),onClose:()=>be(null)}):null,h?e.jsx(dn,{phase:h.phase,balanceCredits:me,heldCreditsCount:((Ct=j==null?void 0:j.held)==null?void 0:Ct.credits)??null,onClose:da,stage:h.phase==="processing"?h.stage:void 0,step:h.phase==="processing"?h.step:void 0,total:h.phase==="processing"?h.total:void 0,isSelfCustody:Ea(n==null?void 0:n.providerType),signatures:h.phase==="processing"?h.signatures:void 0,options:h.phase==="choose"?_e(h).options:void 0,shortfall:h.phase==="choose"?_e(h).manaShortfall:void 0,onPay:pa,totalCents:h.phase==="choose"?h.totalCents:void 0,totalManaWei:h.phase==="choose"?h.manaWei:void 0,totalCredits:h.phase==="choose"?Ye(h.lines):void 0,lines:h.phase==="nofunds"?h.lines:void 0,shortfallCredits:h.phase==="nofunds"?h.shortfall:void 0,packs:ge,selectedPack:ze,onSelectPack:tt,onBuyPacks:()=>void ga(),message:h.phase==="error"?h.message:void 0,heldCredits:h.phase==="error"&&!!h.heldCredits,onRetry:()=>void Z()}):null]})}export{yi as Cart};
748
- //# sourceMappingURL=Cart-DOZ9HNkC.js.map
748
+ //# sourceMappingURL=Cart-Chq2viC7.js.map