@dcl/shop 0.10.1-31040959942.commit-e9e6433 → 0.10.1-31047879016.commit-2c3846e

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 (191) hide show
  1. package/_assets/Activity-5KZahW4a.js +371 -0
  2. package/_assets/AnimatedBackground-CtA-lb0z.js +97 -0
  3. package/_assets/{Assets-UkGI952T.js → Assets-B-cgdG2V.js} +8 -8
  4. package/_assets/{Assets.styles-D1Vg-U1C.js → Assets.styles-CI8Un36f.js} +140 -132
  5. package/_assets/{Authorizations-B3yDMR41.js → Authorizations-94ctJx1t.js} +28 -26
  6. package/_assets/Cart-BNVSJOrw.js +707 -0
  7. package/_assets/{CircularProgress-CB62Wg9m.js → CircularProgress-CpjqStGb.js} +1 -1
  8. package/_assets/{Collection-CSv9R6xZ.js → Collection-CZJ9SSN3.js} +19 -19
  9. package/_assets/CollectionCarousel-DHOvuq0a.js +816 -0
  10. package/_assets/{Confetti-Blr9NSjA.js → Confetti-BTHehxYh.js} +1 -1
  11. package/_assets/{Creator-sh_sYH1o.js → Creator-vMhSn3Jg.js} +7 -7
  12. package/_assets/{ErrorNotice-CXsnDhEh.js → ErrorNotice-CpmhZUmE.js} +1 -1
  13. package/_assets/{ExchangeController-GIzn0xGk.js → ExchangeController-Bk_zMHVC.js} +1 -1
  14. package/_assets/{Faq-C0nCohQD.js → Faq-Bbk8h1Qk.js} +20 -14
  15. package/_assets/{GetCredits-CBLkNO-w.js → GetCredits-Dvf_riJZ.js} +114 -80
  16. package/_assets/{Grow-Nzyme9Oa.js → Grow-B3DyBqW4.js} +1 -1
  17. package/_assets/{HelpersUtil-D0wBF1PA.js → HelpersUtil-h6aaGDt3.js} +1 -1
  18. package/_assets/{ItemDetail-DZ3mEshJ.js → ItemDetail-oFomOkbt.js} +510 -480
  19. package/_assets/LazyEmoteControls-BdlpjPkr.js +2 -0
  20. package/_assets/{LoadMore-CKNE48ED.js → LoadMore-C9QaMyBo.js} +1 -1
  21. package/_assets/ManaPricingBanner.styles-MtBPxNv2.js +93 -0
  22. package/_assets/{MyAssets-Ble658vU.js → MyAssets-Bx9bW84W.js} +33 -33
  23. package/_assets/{MyFavorites-Qri7XFuW.js → MyFavorites-jhTRLOWx.js} +12 -11
  24. package/_assets/{NotFound-BnEiiuoJ.js → NotFound-y9wUvJSt.js} +1 -1
  25. package/_assets/{NotificationsBell-CXzlEnr9.js → NotificationsBell-BFMX1y3H.js} +1 -1
  26. package/_assets/{OutfitDetail-CL1Y8ii5.js → OutfitDetail-BfEl8ni7.js} +4 -4
  27. package/_assets/{OutfitPreview-DRqW1c5F.js → OutfitPreview-foX1l3Ho.js} +2 -2
  28. package/_assets/{OutfitStudio-DgL1kI47.js → OutfitStudio-CPQbAOhy.js} +1 -1
  29. package/_assets/{StoreSettings--R4i191j.js → StoreSettings-DxqpR3qG.js} +1 -1
  30. package/_assets/{Success-DApKfyee.js → Success-DiIlHKjo.js} +1 -1
  31. package/_assets/{SwapController-0aVdHfMW.js → SwapController-DzdjZRBH.js} +1 -1
  32. package/_assets/{Tooltip-B2qDq-8v.js → Tooltip-CXWXl43D.js} +1 -1
  33. package/_assets/{TradeService-COZXjCcV.js → TradeService-CGuEeH2R.js} +1 -1
  34. package/_assets/{W3MFrameProviderSingleton-BYmipTKt.js → W3MFrameProviderSingleton-DAG-EWFv.js} +3 -3
  35. package/_assets/{WebCryptoP256-Cid44am7.js → WebCryptoP256-BQdHu6KD.js} +1 -1
  36. package/_assets/{authorizations-dpp0OnHI.js → authorizations-Bbp82_V2.js} +1 -1
  37. package/_assets/{basic-An6X8Awg.js → basic-Cf3DJuRG.js} +1 -1
  38. package/_assets/{biconomy-CeZnHUNK.js → biconomy-D5_2I_rj.js} +1 -1
  39. package/_assets/{builder-Ce37-lC-.js → builder-CK5n6bEq.js} +1 -1
  40. package/_assets/{buy-Dgj0sRqb.js → buy-BjEPh7nk.js} +1 -1
  41. package/_assets/{buy-gasless-CYY_v3bj.js → buy-gasless-Bjj3XUsm.js} +1 -1
  42. package/_assets/{categories-KFHNUm7E.js → categories-BQHpVYif.js} +54 -54
  43. package/_assets/{ccip-8Mu0bgFv.js → ccip-B7LQbKA2.js} +1 -1
  44. package/_assets/{ccip-BsYdmRqX.js → ccip-C_76Sm3L.js} +1 -1
  45. package/_assets/collectionPage.styles-k2LmVKux.js +49 -0
  46. package/_assets/{controller-Cam05qfJ.js → controller-CjH--4wE.js} +2 -2
  47. package/_assets/{core-BdiPiyom.js → core-1ZzLkX5X.js} +4 -4
  48. package/_assets/{createSvgIcon-cAMuQ1mD.js → createSvgIcon-DcR4892_.js} +4 -4
  49. package/_assets/{custom-C7A-Vb1Q.js → custom-CW7Ai6OA.js} +1 -1
  50. package/_assets/{data-capture-COGpG9-r.js → data-capture-DGJOI5ie.js} +1 -1
  51. package/_assets/disposePreview-5vjiqVZ0.js +1 -0
  52. package/_assets/{email-WblN0-6I.js → email-BYO9_PSn.js} +1 -1
  53. package/_assets/{embedded-wallet-BDGaY-OT.js → embedded-wallet-Dc3ay_ju.js} +1 -1
  54. package/_assets/{emotion-styled.browser.esm-D7YX5KN0.js → emotion-styled.browser.esm-IjZkrRjv.js} +1 -1
  55. package/_assets/{engine-DjipK7B5.js → engine-eMP7KFCK.js} +1 -1
  56. package/_assets/{errors-CzBZCztT.js → errors-65NA3HkA.js} +1 -1
  57. package/_assets/{estimate-l1-fee-Bk8rxjZm.js → estimate-l1-fee-z4Cv9am6.js} +1 -1
  58. package/_assets/{execute-C4AIZjft.js → execute-Be5majZ7.js} +2 -2
  59. package/_assets/{features-Dz4wLY98.js → features-DDe58ejV.js} +1 -1
  60. package/_assets/{fetchTokenMetadata-DjPW-ayp.js → fetchTokenMetadata-BfT_0X0P.js} +2 -2
  61. package/_assets/{field.styles-BThVZLzX.js → field.styles-5b7RHcOk.js} +1 -1
  62. package/_assets/{get-ecosystem-wallet-info-DMVrxBpI.js → get-ecosystem-wallet-info-BgyWgmsX.js} +1 -1
  63. package/_assets/{getBalance-DeFn5Yjk.js → getBalance-EUbWLqWa.js} +1 -1
  64. package/_assets/{getNFT-iw9a-h4A.js → getNFT-CZQJk04I.js} +1 -1
  65. package/_assets/{getNFT-CRgzh5wf.js → getNFT-DqZaIP8J.js} +1 -1
  66. package/_assets/{grid.styles-U_Gpy1wT.js → grid.styles-r1HwM-dl.js} +1 -1
  67. package/_assets/{hashTypedData-9Zh9SRr-.js → hashTypedData-CdCzwjEg.js} +1 -1
  68. package/_assets/{hashTypedData-CqewBwVq.js → hashTypedData-DpsVzpmw.js} +1 -1
  69. package/_assets/hero-credits-mobile-C9Muog4T.webp +0 -0
  70. package/_assets/{in-app-DNl1emxp.js → in-app-OWTERGos.js} +1 -1
  71. package/_assets/{in-app-wallet-calls-CBy5UcNA.js → in-app-wallet-calls-x6rZUVft.js} +1 -1
  72. package/_assets/{index-CcihKRSf.js → index-5qpydkyU.js} +1 -1
  73. package/_assets/{index-BVDj7GJL.js → index-B-c3ctWE.js} +1 -1
  74. package/_assets/{index-BdQAMxgJ.js → index-B2Y5KUFQ.js} +2 -2
  75. package/_assets/{index-Bc0mTSPi.js → index-B4hWF9JI.js} +1 -1
  76. package/_assets/{index-Dd8eTuKB.js → index-BRs5WQ4y.js} +1 -1
  77. package/_assets/{index-Cmc0GHkA.js → index-BXmbcLjL.js} +1 -1
  78. package/_assets/index-BYP7oMPZ.css +1 -0
  79. package/_assets/{index-CjvMMH2k.js → index-BZbZm3_Z.js} +1 -1
  80. package/_assets/{index-C6rF-YrH.js → index-Bk5pG7hH.js} +1 -1
  81. package/_assets/{index-Dax05iV5.js → index-BoMcphCu.js} +1 -1
  82. package/_assets/{index-BIJiNaiS.js → index-By7bM2FO.js} +1 -1
  83. package/_assets/{index-xMSSxrHn.js → index-C3ZkN3yx.js} +1 -1
  84. package/_assets/{index-CHCVsh7P.js → index-C5Zmr-fp.js} +1 -1
  85. package/_assets/{index-5SMH4VL2.js → index-C5gU7v63.js} +1 -1
  86. package/_assets/{index-Kq5fobWt.js → index-C6dKNgrS.js} +1 -1
  87. package/_assets/{index-B7Rm4vXt.js → index-CAdngWZA.js} +1 -1
  88. package/_assets/{index-h--qqRrb.js → index-CDn28wqX.js} +1 -1
  89. package/_assets/{index-CJCxe5kr.js → index-CF1R6Wyc.js} +1 -1
  90. package/_assets/index-CGHLVlhr.js +622 -0
  91. package/_assets/{index-DT4Zi23l.js → index-CGXSS33-.js} +3 -3
  92. package/_assets/{index-CqJzKRxe.js → index-CIDeydPG.js} +2 -2
  93. package/_assets/{index-CU5QiUkb.js → index-CKAGCwTj.js} +1 -1
  94. package/_assets/{index-y3U1nB0H.js → index-CUHTRIp3.js} +3 -3
  95. package/_assets/{index-DgPfV4X0.js → index-Cabu_wkc.js} +1 -1
  96. package/_assets/{index-DM2dLJ-M.js → index-CdE95fkC.js} +1 -1
  97. package/_assets/{index-xLgJxfJy.js → index-CgbD_7CJ.js} +1 -1
  98. package/_assets/{index-DwrPmkl2.js → index-CzYkiikw.js} +1 -1
  99. package/_assets/{index-CpQbv3Zu.js → index-CzjezMlh.js} +1 -1
  100. package/_assets/{index-DtAsm8Nr.js → index-DB8U79VL.js} +1 -1
  101. package/_assets/{index-D3iRZfgO.js → index-DFIOoHDj.js} +1 -1
  102. package/_assets/{index-BwGtaRec.js → index-DIk7fUKo.js} +1 -1
  103. package/_assets/{index-C_r09vuw.js → index-DJn0-6QO.js} +1 -1
  104. package/_assets/{index-RHSCZ-t0.js → index-DMQGc1DU.js} +1 -1
  105. package/_assets/{index-DfIQCR2U.js → index-DN-GBsyH.js} +1 -1
  106. package/_assets/{index-DXURSM0-.js → index-DVr9P_sW.js} +1 -1
  107. package/_assets/index-DWnXUohj.js +1 -0
  108. package/_assets/{index-HQUcvKn4.js → index-Db-p3Vgn.js} +3 -3
  109. package/_assets/{index-m-SAK4uo.js → index-DcP4Kxjm.js} +1 -1
  110. package/_assets/{index-B0wdLudq.js → index-DhKtXpNk.js} +1 -1
  111. package/_assets/{index-ByPjVaiq.js → index-DrNZnytJ.js} +1 -1
  112. package/_assets/{index-DQ7Kosvv.js → index-DtNI9AcR.js} +3 -3
  113. package/_assets/{index-DhRx4LkD.js → index-Dvpm24my.js} +1 -1
  114. package/_assets/{index-Dqdf5xVB.js → index-DzKQAwwD.js} +1 -1
  115. package/_assets/{index-BC_qLj4b.js → index-DzWVwnl8.js} +1 -1
  116. package/_assets/{index-DO0NylVf.js → index-Gjpu_VUp.js} +1 -1
  117. package/_assets/index-HxLvOExR.js +3699 -0
  118. package/_assets/{index-BsZ1af_A.js → index-JQcdGKbC.js} +1 -1
  119. package/_assets/{index-D3qXchU2.js → index-OpuK1fx_.js} +1 -1
  120. package/_assets/{index-1tktbprD.js → index-U_j9NAbS.js} +1 -1
  121. package/_assets/{index-MPYM0LiN.js → index-WMiYz6IH.js} +1 -1
  122. package/_assets/{index-D6LfEXYp.js → index-bMtXusxB.js} +1 -1
  123. package/_assets/{index-BdkbjSWP.js → index-f--Xju7p.js} +1 -1
  124. package/_assets/{index-B3jctKqs.js → index-tXA64dlA.js} +2 -2
  125. package/_assets/{index.es-CLldxJUJ.js → index.es-B7e293JB.js} +1 -1
  126. package/_assets/{index.es-DGQjR0dR.js → index.es-DLwvz1xx.js} +4 -4
  127. package/_assets/{index.es-DqD9HkXC.js → index.es-DlR-IQtM.js} +1 -1
  128. package/_assets/{localBatchGatewayRequest-COpd6g60.js → localBatchGatewayRequest-cLQ4UydX.js} +1 -1
  129. package/_assets/{networks-ChmokwGp.js → networks-C5yX7tyx.js} +1 -1
  130. package/_assets/{onramp-BmIZ6r8P.js → onramp-CEYvaS9l.js} +1 -1
  131. package/_assets/{openzeppelin-CzypsJB4.js → openzeppelin-Cc2KhXuv.js} +1 -1
  132. package/_assets/{parseNft-CydF3Edv.js → parseNft-YbkZLHPa.js} +2 -2
  133. package/_assets/{parseSignature-BeoYj8uB.js → parseSignature-BHOWaqkR.js} +1 -1
  134. package/_assets/{parseSignature-u2B-ofRt.js → parseSignature-Dgv2pIVc.js} +3 -3
  135. package/_assets/{passkeys-CVYlDRWu.js → passkeys-Dg5ldVwX.js} +1 -1
  136. package/_assets/{pay-with-exchange-DqJU65WS.js → pay-with-exchange-Dx2N2FiO.js} +1 -1
  137. package/_assets/promo-best-rated-emotes-C6kNvB-a.png +0 -0
  138. package/_assets/promo-week-selected-outfits-BBmkZYZx.png +0 -0
  139. package/_assets/{qr-overlay-DNwX_TPq.js → qr-overlay-CJis_Dku.js} +1 -1
  140. package/_assets/{receive-uVtJpZxa.js → receive-DyR3EUgS.js} +1 -1
  141. package/_assets/{resolveImplementation-CRaloAyf.js → resolveImplementation-D-Os7pbq.js} +1 -1
  142. package/_assets/{rpc-CqfSA8g9.js → rpc-gzHaMGM_.js} +1 -1
  143. package/_assets/{secp256k1-2YskFph9.js → secp256k1-A8695JK3.js} +1 -1
  144. package/_assets/{secp256k1-Do9ofviG.js → secp256k1-GWIDn9S3.js} +1 -1
  145. package/_assets/{secp256k1-DvDQYEQd.js → secp256k1-NjVLumzu.js} +1 -1
  146. package/_assets/{send-IbCZj2la.js → send-CKyxXi5G.js} +1 -1
  147. package/_assets/{send-batch-transaction-DFD_LTct.js → send-batch-transaction-BD0nxza5.js} +1 -1
  148. package/_assets/{send-eip712-transaction-DBf5Z4g_.js → send-eip712-transaction-C8HaD4Bl.js} +2 -2
  149. package/_assets/{send-gasless-transaction-TFSfXMLh.js → send-gasless-transaction-C3LFi8_y.js} +2 -2
  150. package/_assets/{send-transaction-DGhInFte.js → send-transaction-Cr1KGOfz.js} +2 -2
  151. package/_assets/{sendMetaTransaction-CzqCMKMd.js → sendMetaTransaction-BuD46hIl.js} +1 -1
  152. package/_assets/{sendRawTransaction-qf9SJfpX.js → sendRawTransaction-CHV_i5MH.js} +3 -3
  153. package/_assets/{serializeTransaction-D4cHSu0O.js → serializeTransaction-C6QCh8ng.js} +1 -1
  154. package/_assets/{session-proposal-5AODiiln.js → session-proposal-AzV-Di6A.js} +1 -1
  155. package/_assets/{session-request-hpYNptgl.js → session-request-BVptHKRT.js} +2 -2
  156. package/_assets/{signing-BQUpSEqZ.js → signing-BCnHiNxp.js} +3 -3
  157. package/_assets/{skeleton.styles-BfEPveSL.js → skeleton.styles-NdJWWZoO.js} +1 -1
  158. package/_assets/{socials-D6EP9g5a.js → socials-SFpy8Nfx.js} +1 -1
  159. package/_assets/{styled-FDInU8Rs.js → styled-YNWg-9qZ.js} +1 -1
  160. package/_assets/{swaps-CqwmfiPX.js → swaps-Bs58cXr0.js} +1 -1
  161. package/_assets/{thirdweb-Cecbmps_.js → thirdweb-Da9bKgaM.js} +3 -3
  162. package/_assets/{to-serializable-transaction-u0MhoPX5.js → to-serializable-transaction-BKFRuKok.js} +2 -2
  163. package/_assets/{transactionReceipt-l4NJYcz9.js → transactionReceipt-BB_HE5DZ.js} +1 -1
  164. package/_assets/{transactions-CeFT9Jfi.js → transactions-BiiNpaI6.js} +1 -1
  165. package/_assets/{useCreditPacks-DQE6Gg5O.js → useCreditPacks-kYM5sqXW.js} +1 -1
  166. package/_assets/{useImportable-Dh1ZOsU2.js → useImportable-CacakRaR.js} +1 -1
  167. package/_assets/{useInfiniteGrid--LOCzyU9.js → useInfiniteGrid-DmCoyc-5.js} +1 -1
  168. package/_assets/{useTheme-CpSHkSMG.js → useTheme-CDzzSrjV.js} +1 -1
  169. package/_assets/{verifyHash-BSS9_MWX.js → verifyHash-Bi8A6_OC.js} +1 -1
  170. package/_assets/{w3m-modal-BCjN4Uqc.js → w3m-modal-DXZzlpAy.js} +1 -1
  171. package/_assets/{w3m-modal-ByuBko0g.js → w3m-modal-hvo-cMQo.js} +1 -1
  172. package/_assets/{wait-for-tx-receipt-CfVB-CU0.js → wait-for-tx-receipt-DtoUQega.js} +1 -1
  173. package/_assets/{wallets-tUzLLBvA.js → wallets-DOYhTD-q.js} +5 -5
  174. package/_assets/{web-connector-BfVr5QpB.js → web-connector-L9IYDmGf.js} +3 -3
  175. package/_assets/{writeContract-B4n8yTsB.js → writeContract-C9Fd0Dqo.js} +1 -1
  176. package/_assets/{zoraTestnet-CNY7oWT9.js → zoraTestnet-CJh-5IFd.js} +1 -1
  177. package/index.html +11 -11
  178. package/package.json +2 -2
  179. package/_assets/Activity-CUf8ogRR.js +0 -381
  180. package/_assets/AnimatedBackground-_78VlBdV.js +0 -97
  181. package/_assets/Cart-CbY3Hhq6.js +0 -695
  182. package/_assets/CollectionCarousel-Cg2MTF9W.js +0 -804
  183. package/_assets/LazyEmoteControls-BEt_49wK.js +0 -2
  184. package/_assets/ManaPricingBanner.styles-CJS5V2Di.js +0 -74
  185. package/_assets/collectionPage.styles-jwKyDncq.js +0 -48
  186. package/_assets/disposePreview-C6zVmkpS.js +0 -1
  187. package/_assets/index-Ba-yhU-2.js +0 -1
  188. package/_assets/index-D-NhBWWr.css +0 -1
  189. package/_assets/index-D8LZCVOB.js +0 -519
  190. package/_assets/index-buu21jrH.js +0 -3390
  191. package/_assets/packs-backdrop-BcXiUPeP.webp +0 -0
@@ -1,4 +1,4 @@
1
- import{b as Ae,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Je}from"./useUrlFilters-DH-gxdfV.js";import{u as Qe,S as ke,R as Xe,F as Ye,e as et}from"./categories-KFHNUm7E.js";import{c as W,r as tt,bm as nt,bn as st,aC as rt,a as it,s,t,o as Me,bc as ot,A as at,L as me,b as n,y as lt,I as T,z as A,bZ as Y,bb as ct,$ as Q,br as dt,bq as pt,x as Ne,ao as Pe,n as We,q as ht,am as xt,aq as Se,ar as G,aG as mt,bK as ft}from"./index-buu21jrH.js";import{g as ut,h as gt,i as bt,j as yt,k as wt,C as jt,l as vt,o as $t,m as Ct,n as kt,M as St,u as Et,E as Tt,v as _t,p as Rt,q as zt,r as It,s as At,t as Mt}from"./Assets.styles-D1Vg-U1C.js";import{L as Nt}from"./LoadMore-CKNE48ED.js";import{u as Pt}from"./useInfiniteGrid--LOCzyU9.js";import{E as Wt}from"./ErrorNotice-CXsnDhEh.js";import{d as Bt}from"./dcl-schemas-CmtP3U6y.js";import{s as Ft,G as Lt,w as Ut,S as Ht}from"./buy-gasless-CYY_v3bj.js";import{s as Ot,k as Gt}from"./buy-Dgj0sRqb.js";import{f as Dt}from"./errors-CzBZCztT.js";import{J as qt,C as Vt,B as fe}from"./ethers-BDpbhgX6.js";import{n as Zt}from"./Tooltip-B2qDq-8v.js";import{G as Kt}from"./grid.styles-U_Gpy1wT.js";import"./skeleton.styles-BfEPveSL.js";import"./sentry-Dx-KuLV3.js";import"./intl-CBcMB1D2.js";import"./authorizations-dpp0OnHI.js";import"./sendMetaTransaction-CzqCMKMd.js";function D(r){const o=r.source??"item",l=r.tradeId||`${r.contractAddress}-${r.tokenId??r.itemId??""}`;return`${o}:${l}`}const B="100000000000000000000",Be=2,X=15,Jt=/^[a-zA-Z0-9]+$/;function Ee(r){const o=r.trim();return o.length===0?{ok:!1,reason:"empty"}:Jt.test(o)?o.length<Be?{ok:!1,reason:"too-short"}:o.length>X?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Qt(r){return r.replace(/[^a-zA-Z0-9]/g,"").slice(0,X)}const Xt=["function available(string _subdomain) view returns (bool)"],Te={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Yt(){return W.chainId===Number(Bt.ChainId.MATIC_MAINNET)?Te.mainnet:Te.sepolia}async function en(r,o={}){var c;const{rpc:l,address:x}=Yt(),h=new qt(l),d=new Vt(x,Xt,h);console.info(`[names] availability check → DCLRegistrar(${x}).available("${r}") on ${l}`);const p=await d.available(r);if((c=o.signal)!=null&&c.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${r}" available=${p}`),p?"available":"taken"}const tn="https://app.across.to/api";class ue extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function nn(r){return rt(B,r)}async function sn(r,o,l={}){var c;const x=l.chainId??W.chainId,h=l.provider??"across",d=`${W.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(o)}&chainId=${x}&provider=${h}`,p=await it(d,{method:"GET",identity:r,metadata:{}});if(!p.ok){let a;try{a=(c=await p.json())==null?void 0:c.code}catch{}throw a==="ROUTE_COST_TOO_HIGH"?new ue:new Error(`fetchNameCreditRoute ${p.status}`)}return p.json()}function rn(r,o){const l=fe.from(r.availableAmount),h=fe.from(B).sub(l);return{credits:[{value:r.amount,expiresAt:Number(r.expiresAt),salt:Gt(r.id)}],creditsSignatures:[r.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:B}}async function on(r,o={}){const l=tn,x=o.intervalMs??1e4,h=o.maxAttempts??60;let d={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let p=0;p<h;p++){try{const c=await fetch(`${l}/deposit/status?originChainId=137&depositTxHash=${r}`);if(c.ok){const a=await c.json(),m=(a.status??"pending").toLowerCase(),g=a.fillTx??a.fillTxnRef??null,u=a.actionsSucceeded!==!1;if(m==="filled")return{status:"filled",destinationTxHash:g,actionsSucceeded:u};if(m==="refunded"||m==="expired")return{status:m,destinationTxHash:null,actionsSucceeded:!1};d={status:"pending",destinationTxHash:g,actionsSucceeded:u}}}catch{}p<h-1&&await new Promise(c=>setTimeout(c,x))}return d}async function an(r){const{name:o,identity:l,signer:x}=r,h=r.chainId??W.chainId,d=r.provider??"across",p=(r.beneficiary??await x.getAddress()).toLowerCase();let c=null,a=!1;console.info("[names] register start",{name:o,buyer:p,chainId:h,provider:d});try{const m=await tt(h),g=nn(m);console.info("[names] step 1/6 sized reservation",{usdCents:g,manaRate:m});const u=await sn(l,o,{chainId:h,provider:d});console.info("[names] step 2/6 route fetched",{target:u.externalCall.target,selector:u.externalCall.selector,provider:u.provider,quoteId:u.quoteId});const v=await nt(l,g);if(c=v.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:v.credit.id,maxCreditedValue:v.maxCreditedValue}),fe.from(v.maxCreditedValue).lt(B))throw new Error("Credit under-sized for the name price");const j=rn(v.credit,u);let f;try{f=await Ft({chainId:h,buyer:p,signer:x,args:j})}catch(b){if(!(b instanceof Lt))throw b;f=await Ot(h,j,x)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:f}),await Ut(f),a=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:f}),d==="across"){const b=await on(f,r.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:f};if(b.status!=="filled"||!b.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:f,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:f}}catch(m){if(console.error("[names] register failed — raw error:",m,{name:o,buyer:p,originConfirmed:a}),m instanceof Ht)return{status:"pending",originTxHash:m.txHash};if(c&&!a&&await st(l,[c]).catch(()=>{}),m instanceof ue)throw m;const g=new Error(Dt(m,"Couldn't register the name. Please try again.",{sale:!0}));throw g.cause=m,g}}const ln=s.div`
1
+ import{b as Ae,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Je}from"./useUrlFilters-DH-gxdfV.js";import{u as Qe,S as ke,R as Xe,F as Ye,e as et}from"./categories-BQHpVYif.js";import{c as W,r as tt,bn as nt,bo as st,aD as rt,a as it,s,t,o as Me,bd as ot,A as at,L as fe,b as n,y as lt,I as _,z as A,b_ as Y,bc as ct,$ as Q,bs as dt,br as pt,x as Ne,ap as Pe,n as We,q as ht,an as xt,ar as Se,as as D,aH as ft,bL as mt}from"./index-HxLvOExR.js";import{g as ut,h as gt,i as bt,j as yt,k as wt,C as jt,l as vt,o as $t,m as Ct,n as kt,M as St,u as Et,E as _t,v as Tt,p as Rt,q as zt,r as It,s as At,t as Mt}from"./Assets.styles-CI8Un36f.js";import{L as Nt}from"./LoadMore-C9QaMyBo.js";import{u as Pt}from"./useInfiniteGrid-DmCoyc-5.js";import{E as Wt}from"./ErrorNotice-CpmhZUmE.js";import{d as Bt}from"./dcl-schemas-CmtP3U6y.js";import{s as Ft,G as Lt,w as Ut,S as Ht}from"./buy-gasless-Bjj3XUsm.js";import{s as Ot,k as Dt}from"./buy-BjEPh7nk.js";import{f as Gt}from"./errors-65NA3HkA.js";import{J as qt,C as Vt,B as me}from"./ethers-BDpbhgX6.js";import{n as Zt}from"./Tooltip-CXWXl43D.js";import{G as Kt}from"./grid.styles-r1HwM-dl.js";import"./skeleton.styles-NdJWWZoO.js";import"./sentry-Dx-KuLV3.js";import"./intl-CBcMB1D2.js";import"./authorizations-Bbp82_V2.js";import"./sendMetaTransaction-BuD46hIl.js";function G(r){const o=r.source??"item",l=r.tradeId||`${r.contractAddress}-${r.tokenId??r.itemId??""}`;return`${o}:${l}`}const B="100000000000000000000",Be=2,X=15,Jt=/^[a-zA-Z0-9]+$/;function Ee(r){const o=r.trim();return o.length===0?{ok:!1,reason:"empty"}:Jt.test(o)?o.length<Be?{ok:!1,reason:"too-short"}:o.length>X?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Qt(r){return r.replace(/[^a-zA-Z0-9]/g,"").slice(0,X)}const Xt=["function available(string _subdomain) view returns (bool)"],_e={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Yt(){return W.chainId===Number(Bt.ChainId.MATIC_MAINNET)?_e.mainnet:_e.sepolia}async function en(r,o={}){var c;const{rpc:l,address:x}=Yt(),h=new qt(l),d=new Vt(x,Xt,h);console.info(`[names] availability check → DCLRegistrar(${x}).available("${r}") on ${l}`);const p=await d.available(r);if((c=o.signal)!=null&&c.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${r}" available=${p}`),p?"available":"taken"}const tn="https://app.across.to/api";class ue extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function nn(r){return rt(B,r)}async function sn(r,o,l={}){var c;const x=l.chainId??W.chainId,h=l.provider??"across",d=`${W.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(o)}&chainId=${x}&provider=${h}`,p=await it(d,{method:"GET",identity:r,metadata:{}});if(!p.ok){let a;try{a=(c=await p.json())==null?void 0:c.code}catch{}throw a==="ROUTE_COST_TOO_HIGH"?new ue:new Error(`fetchNameCreditRoute ${p.status}`)}return p.json()}function rn(r,o){const l=me.from(r.availableAmount),h=me.from(B).sub(l);return{credits:[{value:r.amount,expiresAt:Number(r.expiresAt),salt:Dt(r.id)}],creditsSignatures:[r.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:B}}async function on(r,o={}){const l=tn,x=o.intervalMs??1e4,h=o.maxAttempts??60;let d={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let p=0;p<h;p++){try{const c=await fetch(`${l}/deposit/status?originChainId=137&depositTxHash=${r}`);if(c.ok){const a=await c.json(),f=(a.status??"pending").toLowerCase(),g=a.fillTx??a.fillTxnRef??null,u=a.actionsSucceeded!==!1;if(f==="filled")return{status:"filled",destinationTxHash:g,actionsSucceeded:u};if(f==="refunded"||f==="expired")return{status:f,destinationTxHash:null,actionsSucceeded:!1};d={status:"pending",destinationTxHash:g,actionsSucceeded:u}}}catch{}p<h-1&&await new Promise(c=>setTimeout(c,x))}return d}async function an(r){const{name:o,identity:l,signer:x}=r,h=r.chainId??W.chainId,d=r.provider??"across",p=(r.beneficiary??await x.getAddress()).toLowerCase();let c=null,a=!1;console.info("[names] register start",{name:o,buyer:p,chainId:h,provider:d});try{const f=await tt(h),g=nn(f);console.info("[names] step 1/6 sized reservation",{usdCents:g,manaRate:f});const u=await sn(l,o,{chainId:h,provider:d});console.info("[names] step 2/6 route fetched",{target:u.externalCall.target,selector:u.externalCall.selector,provider:u.provider,quoteId:u.quoteId});const v=await nt(l,g);if(c=v.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:v.credit.id,maxCreditedValue:v.maxCreditedValue}),me.from(v.maxCreditedValue).lt(B))throw new Error("Credit under-sized for the name price");const j=rn(v.credit,u);let m;try{m=await Ft({chainId:h,buyer:p,signer:x,args:j})}catch(b){if(!(b instanceof Lt))throw b;m=await Ot(h,j,x)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:m}),await Ut(m),a=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:m}),d==="across"){const b=await on(m,r.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:m};if(b.status!=="filled"||!b.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:m,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:m}}catch(f){if(console.error("[names] register failed — raw error:",f,{name:o,buyer:p,originConfirmed:a}),f instanceof Ht)return{status:"pending",originTxHash:f.txHash};if(c&&!a&&await st(l,[c]).catch(()=>{}),f instanceof ue)throw f;const g=new Error(Gt(f,"Couldn't register the name. Please try again.",{sale:!0}));throw g.cause=f,g}}const ln=s.div`
2
2
  position: fixed;
3
3
  inset: 0;
4
4
  z-index: 10000;
@@ -161,12 +161,12 @@ import{b as Ae,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Je}fr
161
161
  &:focus-within {
162
162
  border-color: ${t.colors.magenta};
163
163
  }
164
- `,mn=s.span`
164
+ `,fn=s.span`
165
165
  flex: none;
166
166
  font-family: ${t.font.sans};
167
167
  font-size: 18px;
168
168
  color: ${t.colors.muted2};
169
- `,fn=s.input`
169
+ `,mn=s.input`
170
170
  flex: 0 1 auto;
171
171
  min-width: 0;
172
172
  border: 0;
@@ -186,7 +186,7 @@ import{b as Ae,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Je}fr
186
186
  font-family: ${t.font.sans};
187
187
  font-size: 16px;
188
188
  color: ${t.colors.muted2};
189
- `,_e=s.button`
189
+ `,Te=s.button`
190
190
  margin-top: 16px;
191
191
  width: 100%;
192
192
  height: 52px;
@@ -379,7 +379,7 @@ import{b as Ae,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Je}fr
379
379
  color: ${t.colors.accent};
380
380
  }
381
381
  }
382
- `;function En({name:r,priceCredits:o,onClose:l}){const{session:x}=Me(),{data:h,isError:d}=ot(x),p=at(),c=Ae(),[a,m]=w.useState("confirm"),[g,u]=w.useState(""),[v,j]=w.useState(null),f=w.useRef(!1),b=g.trim().toLowerCase()===r.toLowerCase(),$=a==="completing",C=o!=null?me(o):"—",k=o==null,E=h==null?void 0:h.credits,M=o!=null&&E!=null?o-E:0,S=M>0,N=k?n("names.priceUnavailable"):S?n("names.insufficientCredits",{credits:me(M)}):null;w.useEffect(()=>{const y=R=>{R.key==="Escape"&&!$&&l()};document.addEventListener("keydown",y);const _=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=_}},[$,l]);async function F(){if(!(!x||!b||k||S||f.current)){f.current=!0,m("completing"),j(null);try{const y=await an({name:r,identity:x.identity,signer:x.signer});Q("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,settlement:y.status}),p.invalidateQueries({queryKey:["usd-balance"]}),p.invalidateQueries({queryKey:["my-assets"]}),m(y.status==="registered"?"success":"pending")}catch(y){Q(pt(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:dt(y),purchase_type:"name"}),j(y instanceof ue?n("names.errorRouteCost"):(y==null?void 0:y.message)||n("names.errorGeneric")),m("error")}finally{f.current=!1}}}const L=a!=="success"&&a!=="pending",z=lt(x==null?void 0:x.providerType);return e.jsx(ln,{onClick:$?void 0:l,role:"presentation",children:e.jsxs(cn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[L&&e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsx(te,{children:a==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(ne,{onClick:l,disabled:$,"aria-label":n("buyModal.close"),children:e.jsx(T,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(A,{})," ",Y(h,d)]}),e.jsx(re,{})]}),(a==="confirm"||a==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(ie,{children:[e.jsx(oe,{"aria-hidden":!0,children:"@"}),e.jsxs(ae,{children:[e.jsxs(le,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ce,{children:n("names.subtitle")})]}),e.jsxs(de,{children:[e.jsx(A,{}),C]})]}),a==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(pe,{children:[e.jsx(T,{name:"info","aria-hidden":!0}),e.jsx("span",{children:v})]}),e.jsx(_e,{onClick:()=>m("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(dn,{children:[e.jsx(pn,{children:n("names.confirmTitle")}),e.jsx(hn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${Tn(r)}</b>`})}}),e.jsxs(xn,{children:[e.jsx(mn,{"aria-hidden":!0,children:"@"}),e.jsx(fn,{value:g,onChange:y=>u(y.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(g.length,8)}ch`}}),e.jsx(un,{children:".dcl.eth"})]})]}),N?e.jsxs(pe,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(T,{name:"info","aria-hidden":!0}),e.jsx("span",{children:N})]}):null,e.jsx(_e,{onClick:()=>void F(),disabled:!b||!x||k||S,children:n("names.buyCta")})]})]}),a==="completing"&&e.jsxs(gn,{children:[e.jsx(bn,{src:ct,alt:"",width:56,height:56}),e.jsx(yn,{children:z?n("names.confirming"):n("names.completing")}),e.jsxs(wn,{children:[e.jsx(jn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(vn,{children:"1/1"})]})]}),a==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsx(te,{children:n("names.pendingHeaderTitle")}),e.jsx(ne,{onClick:l,"aria-label":n("buyModal.close"),children:e.jsx(T,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(A,{})," ",Y(h,d)]}),e.jsx(re,{}),e.jsxs(pe,{"data-tone":"info",children:[e.jsx(T,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(ie,{style:{marginTop:20},children:[e.jsx(oe,{"aria-hidden":!0,children:"@"}),e.jsxs(ae,{children:[e.jsxs(le,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ce,{children:n("names.subtitle")})]}),e.jsxs(de,{children:[e.jsx(A,{}),C]})]}),e.jsx(Re,{children:e.jsx(ze,{onClick:()=>{l(),c("/my-items")},children:n("names.myItems")})})]}),a==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsx(te,{children:n("names.successHeaderTitle")}),e.jsx(ne,{onClick:l,"aria-label":n("buyModal.close"),children:e.jsx(T,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(A,{})," ",Y(h,d)]}),e.jsx(re,{}),e.jsxs($n,{children:[e.jsx(Cn,{"aria-hidden":!0,children:e.jsx(T,{name:"check"})}),e.jsxs(kn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(ie,{style:{marginTop:20},children:[e.jsx(oe,{"aria-hidden":!0,children:"@"}),e.jsxs(ae,{children:[e.jsxs(le,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ce,{children:n("names.subtitle")})]}),e.jsxs(de,{children:[e.jsx(A,{}),C]})]}),e.jsxs(Re,{children:[e.jsx(ze,{onClick:()=>{l(),c("/my-items")},children:n("names.myItems")}),e.jsx(Sn,{href:W.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function Tn(r){return r.replace(/[&<>"']/g,o=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[o])}const _n="https://cdn.decentraland.org/@dcl/shop/0.10.1-31040959942.commit-e9e6433/_assets/identity-B4DXDuJP.webp",Rn="https://cdn.decentraland.org/@dcl/shop/0.10.1-31040959942.commit-e9e6433/_assets/world-B-9aPlxu.webp",zn="https://cdn.decentraland.org/@dcl/shop/0.10.1-31040959942.commit-e9e6433/_assets/invite-BfwIhP2C.webp",In="https://cdn.decentraland.org/@dcl/shop/0.10.1-31040959942.commit-e9e6433/_assets/governance-DnazlIjy.webp",An=s.div`
382
+ `;function En({name:r,priceCredits:o,onClose:l}){const{session:x}=Me(),{data:h,isError:d}=ot(x),p=at(),c=Ae(),[a,f]=w.useState("confirm"),[g,u]=w.useState(""),[v,j]=w.useState(null),m=w.useRef(!1),b=g.trim().toLowerCase()===r.toLowerCase(),$=a==="completing",C=o!=null?fe(o):"—",k=o==null,E=h==null?void 0:h.credits,M=o!=null&&E!=null?o-E:0,S=M>0,N=k?n("names.priceUnavailable"):S?n("names.insufficientCredits",{credits:fe(M)}):null;w.useEffect(()=>{const y=R=>{R.key==="Escape"&&!$&&l()};document.addEventListener("keydown",y);const T=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=T}},[$,l]);async function F(){if(!(!x||!b||k||S||m.current)){m.current=!0,f("completing"),j(null);try{const y=await an({name:r,identity:x.identity,signer:x.signer});Q("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,settlement:y.status}),p.invalidateQueries({queryKey:["usd-balance"]}),p.invalidateQueries({queryKey:["my-assets"]}),f(y.status==="registered"?"success":"pending")}catch(y){Q(pt(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:dt(y),purchase_type:"name"}),j(y instanceof ue?n("names.errorRouteCost"):(y==null?void 0:y.message)||n("names.errorGeneric")),f("error")}finally{m.current=!1}}}const L=a!=="success"&&a!=="pending",z=lt(x==null?void 0:x.providerType);return e.jsx(ln,{onClick:$?void 0:l,role:"presentation",children:e.jsxs(cn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[L&&e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsx(te,{children:a==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(ne,{onClick:l,disabled:$,"aria-label":n("buyModal.close"),children:e.jsx(_,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(A,{})," ",Y(h,d)]}),e.jsx(re,{})]}),(a==="confirm"||a==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(ie,{children:[e.jsx(oe,{"aria-hidden":!0,children:"@"}),e.jsxs(ae,{children:[e.jsxs(le,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ce,{children:n("names.subtitle")})]}),e.jsxs(de,{children:[e.jsx(A,{}),C]})]}),a==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(pe,{children:[e.jsx(_,{name:"info","aria-hidden":!0}),e.jsx("span",{children:v})]}),e.jsx(Te,{onClick:()=>f("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(dn,{children:[e.jsx(pn,{children:n("names.confirmTitle")}),e.jsx(hn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${_n(r)}</b>`})}}),e.jsxs(xn,{children:[e.jsx(fn,{"aria-hidden":!0,children:"@"}),e.jsx(mn,{value:g,onChange:y=>u(y.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(g.length,8)}ch`}}),e.jsx(un,{children:".dcl.eth"})]})]}),N?e.jsxs(pe,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(_,{name:"info","aria-hidden":!0}),e.jsx("span",{children:N})]}):null,e.jsx(Te,{onClick:()=>void F(),disabled:!b||!x||k||S,children:n("names.buyCta")})]})]}),a==="completing"&&e.jsxs(gn,{children:[e.jsx(bn,{src:ct,alt:"",width:56,height:56}),e.jsx(yn,{children:z?n("names.confirming"):n("names.completing")}),e.jsxs(wn,{children:[e.jsx(jn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(vn,{children:"1/1"})]})]}),a==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsx(te,{children:n("names.pendingHeaderTitle")}),e.jsx(ne,{onClick:l,"aria-label":n("buyModal.close"),children:e.jsx(_,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(A,{})," ",Y(h,d)]}),e.jsx(re,{}),e.jsxs(pe,{"data-tone":"info",children:[e.jsx(_,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(ie,{style:{marginTop:20},children:[e.jsx(oe,{"aria-hidden":!0,children:"@"}),e.jsxs(ae,{children:[e.jsxs(le,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ce,{children:n("names.subtitle")})]}),e.jsxs(de,{children:[e.jsx(A,{}),C]})]}),e.jsx(Re,{children:e.jsx(ze,{onClick:()=>{l(),c("/my-items")},children:n("names.myItems")})})]}),a==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsx(te,{children:n("names.successHeaderTitle")}),e.jsx(ne,{onClick:l,"aria-label":n("buyModal.close"),children:e.jsx(_,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(A,{})," ",Y(h,d)]}),e.jsx(re,{}),e.jsxs($n,{children:[e.jsx(Cn,{"aria-hidden":!0,children:e.jsx(_,{name:"check"})}),e.jsxs(kn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(ie,{style:{marginTop:20},children:[e.jsx(oe,{"aria-hidden":!0,children:"@"}),e.jsxs(ae,{children:[e.jsxs(le,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ce,{children:n("names.subtitle")})]}),e.jsxs(de,{children:[e.jsx(A,{}),C]})]}),e.jsxs(Re,{children:[e.jsx(ze,{onClick:()=>{l(),c("/my-items")},children:n("names.myItems")}),e.jsx(Sn,{href:W.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function _n(r){return r.replace(/[&<>"']/g,o=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[o])}const Tn="https://cdn.decentraland.org/@dcl/shop/0.10.1-31047879016.commit-2c3846e/_assets/identity-B4DXDuJP.webp",Rn="https://cdn.decentraland.org/@dcl/shop/0.10.1-31047879016.commit-2c3846e/_assets/world-B-9aPlxu.webp",zn="https://cdn.decentraland.org/@dcl/shop/0.10.1-31047879016.commit-2c3846e/_assets/invite-BfwIhP2C.webp",In="https://cdn.decentraland.org/@dcl/shop/0.10.1-31047879016.commit-2c3846e/_assets/governance-DnazlIjy.webp",An=s.div`
383
383
  width: 100%;
384
384
  min-width: 0;
385
385
  `,Mn=s.nav`
@@ -473,7 +473,7 @@ import{b as Ae,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Je}fr
473
473
  gap: 12px;
474
474
  `,On=s.div`
475
475
  position: relative;
476
- `,Gn=s("div",Zt("invalid"))`
476
+ `,Dn=s("div",Zt("invalid"))`
477
477
  display: flex;
478
478
  align-items: center;
479
479
  gap: 8px;
@@ -489,7 +489,7 @@ import{b as Ae,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Je}fr
489
489
  ${t.media.maxWidth("mobile")} {
490
490
  border-radius: 16px;
491
491
  }
492
- `,Dn=s.span`
492
+ `,Gn=s.span`
493
493
  position: absolute;
494
494
  left: -9999px;
495
495
  top: 0;
@@ -798,4 +798,4 @@ import{b as Ae,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Je}fr
798
798
  clip: rect(0, 0, 0, 0);
799
799
  white-space: nowrap;
800
800
  border: 0;
801
- `,ls="https://docs.decentraland.org/creator/worlds/about/",cs="https://governance.decentraland.org";function ds(r){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(r)}`}function ps({onBack:r}){Ne({title:n("seo.names.title"),description:n("seo.names.description")});const{session:o,signIn:l}=Me(),{data:x}=Pe(),h=x?We(B,x):null,[d,p]=w.useState(""),[c,a]=w.useState("idle"),[m,g]=w.useState(!1),u=w.useRef(null),[v,j]=w.useState(void 0);w.useLayoutEffect(()=>{u.current&&j(u.current.offsetWidth)},[d]),w.useEffect(()=>{if(!Ee(d).ok){a(d.length===0?"idle":"invalid");return}a("checking");const E=new AbortController,M=setTimeout(()=>{(async()=>{try{const S=await en(d,{signal:E.signal});a(S)}catch(S){if((S==null?void 0:S.name)==="AbortError")return;a("error")}})()},400);return()=>{clearTimeout(M),E.abort()}},[d]);const f=Ee(d),b=f.ok&&(c==="available"||c==="error");function $(){if(b){if(!o){l();return}g(!0)}}const C=e.jsxs(e.Fragment,{children:[n("names.claim"),h!=null?e.jsxs(es,{children:[e.jsx(A,{}),me(h)]}):null]});return e.jsxs(An,{"data-testid":"names-page",children:[e.jsxs(Mn,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Nn,{onClick:r,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Pn,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(Wn,{children:[e.jsxs(Bn,{children:[e.jsxs(Fn,{children:[e.jsx(Ln,{children:n("names.heroTitle")}),e.jsx(Un,{children:n("names.heroSubtitle")})]}),e.jsxs(Hn,{children:[e.jsxs(On,{children:[e.jsxs(Gn,{invalid:c==="taken",children:[e.jsxs(Zn,{children:[e.jsx(Kn,{"aria-hidden":!0,children:"@"}),e.jsx(Jn,{value:d,onChange:k=>p(Qt(k.target.value)),placeholder:n("names.inputPlaceholder"),"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:X,style:{width:v!=null?`${v}px`:void 0}}),e.jsx(Dn,{ref:u,"aria-hidden":!0,children:d||n("names.inputPlaceholder")}),e.jsx(Qn,{children:n("names.suffix")})]}),d.length>0?e.jsxs(Xn,{"aria-hidden":!0,children:[d.length,"/",X]}):null,e.jsx(Fe,{onClick:$,disabled:!b,"data-testid":"names-claim",children:C})]}),c==="taken"?e.jsxs(qn,{role:"status","data-testid":"names-taken",children:[e.jsx(T,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.taken")}),e.jsxs(Vn,{href:ds(d),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(T,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(Yn,{onClick:$,disabled:!b,children:C}),c==="checking"?e.jsx(he,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):c==="error"?e.jsx(he,{tone:"muted",role:"status",children:n("names.checkError")}):c==="invalid"&&!f.ok&&f.reason==="too-short"?e.jsx(he,{tone:"muted",role:"status",children:n("names.tooShort",{min:Be})}):null,e.jsx(as,{role:"status","aria-live":"polite",children:c==="available"?n("names.available",{name:d}):""})]})]}),e.jsxs(ts,{children:[e.jsxs(ns,{children:[e.jsx(ss,{children:n("names.whyTitle")}),e.jsx(rs,{children:n("names.whyIntro")})]}),e.jsxs(is,{children:[e.jsxs(q,{children:[e.jsx(V,{src:_n,alt:""}),e.jsxs(Z,{children:[e.jsx(K,{children:n("names.why1Title")}),e.jsx(J,{children:n("names.why1")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Rn,alt:""}),e.jsxs(Z,{children:[e.jsx(K,{children:n("names.why2Title")}),e.jsxs(J,{children:[n("names.why2")," ",e.jsx(os,{children:n("names.why2Address")})]}),e.jsxs(Ie,{href:ls,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(T,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:zn,alt:""}),e.jsxs(Z,{children:[e.jsx(K,{children:n("names.why3Title")}),e.jsx(J,{children:n("names.why3")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:In,alt:""}),e.jsxs(Z,{children:[e.jsx(K,{children:n("names.why4Title")}),e.jsx(J,{children:n("names.why4")}),e.jsxs(Ie,{href:cs,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(T,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),m?e.jsx(En,{name:d,priceCredits:h,onClose:()=>g(!1)}):null]})}const hs="data:image/svg+xml,%3csvg%20width='101'%20height='101'%20viewBox='0%200%20101%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M42.4493%2040.9855L30.7394%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M30.7391%2040.9855L42.449%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M36.2621%2071.0604C29.6047%2071.0604%2023.9709%2068.7542%2019.3608%2064.1416C14.7507%2059.5291%2012.4445%2053.8953%2012.442%2047.2404C12.4396%2040.5854%2014.7459%2034.9516%2019.3608%2030.3391C23.9758%2025.7266%2029.6096%2023.4203%2036.2621%2023.4203C42.9146%2023.4203%2048.5496%2025.7266%2053.167%2030.3391C57.7844%2034.9516%2060.0895%2040.5854%2060.0822%2047.2404C60.0822%2049.9277%2059.6546%2052.4624%2058.7995%2054.8445C57.9445%2057.2265%2056.784%2059.3336%2055.3181%2061.1659L75.84%2081.6878C76.5119%2082.3597%2076.8478%2083.2148%2076.8478%2084.2531C76.8478%2085.2914%2076.5119%2086.1465%2075.84%2086.8183C75.1682%2087.4902%2074.3131%2087.8261%2073.2748%2087.8261C72.2365%2087.8261%2071.3814%2087.4902%2070.7096%2086.8183L50.1877%2066.2964C48.3554%2067.7623%2046.2482%2068.9227%2043.8662%2069.7778C41.4842%2070.6329%2038.9495%2071.0604%2036.2621%2071.0604ZM36.2621%2063.7312C40.8429%2063.7312%2044.7372%2062.1285%2047.9449%2058.9232C51.1527%2055.7179%2052.7554%2051.8236%2052.7529%2047.2404C52.7505%2042.6571%2051.1478%2038.7641%2047.9449%2035.5612C44.742%2032.3583%2040.8478%2030.7544%2036.2621%2030.7495C31.6764%2030.7447%2027.7834%2032.3485%2024.5829%2035.5612C21.3825%2038.7739%2019.7786%2042.6669%2019.7713%2047.2404C19.764%2051.8138%2021.3678%2055.7081%2024.5829%2058.9232C27.798%2062.1383%2031.6911%2063.7409%2036.2621%2063.7312Z'%20fill='url(%23paint0_linear_search_empty)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_search_empty'%20x1='10.4127'%20y1='55.6273'%20x2='124.009'%20y2='44.925'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",xe=48,xs=["all","on_sale","not_for_sale"];function Ms(){const[r]=Ke(),o=Ae(),l=(r.get("q")??"").trim().toLowerCase(),x=(r.get("q")??"").trim();Ne({title:x?n("seo.collectibles.searchTitle",{query:x}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const h=w.useMemo(()=>({category:"all",status:"on_sale",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[d,p]=Je(h),{subCategory:c,rarities:a,priceMin:m,priceMax:g,smart:u,sort:v}=d,j=d.category,f=xs.includes(d.status)?d.status:"on_sale";Qe(`${j}:${c??""}`);const[b,$]=w.useState(!1);w.useEffect(()=>{if(!b)return;const i=O=>{O.key==="Escape"&&$(!1)};document.addEventListener("keydown",i);const I=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",i),document.body.style.overflow=I}},[b]);const C=f==="on_sale",k=m&&!Number.isNaN(Number(m))?Number(m):void 0,E=g&&!Number.isNaN(Number(g))?Number(g):void 0,M=ht(),S=c?et[c]:void 0,N=(ke.find(i=>i.key===v)??ke[0]).server,F={category:j,rarities:a.length?a:void 0,wearableCategories:S,minPriceCredits:k,maxPriceCredits:E,search:l||void 0,sortBy:N,isSmart:u||void 0,onSale:!0,listingType:M?void 0:"primary"},L={category:j,rarities:a.length?a:void 0,wearableCategories:S,search:l||void 0,sortBy:N,isWearableSmart:u||void 0,isOnSale:f==="not_for_sale"?!1:void 0},{items:z,total:y,isLoading:_,isPlaceholderData:R,error:ge,hasNextPage:Le,isFetchingNextPage:be,isFetchNextPageError:Ue,fetchNextPage:He}=Pt(C?["shop-items",F]:["catalog-items",L],i=>C?mt({...F,first:xe,skip:i}):ft({...L,first:xe,skip:i}),{enabled:j!=="names"}),U=y,{data:ye,isError:Oe,isPending:Ge}=Pe(),De=i=>ye&&i.manaWei?We(i.manaWei,ye):null,qe=C&&Ge&&z.some(i=>i.source==="legacy"),we=_||R||qe,Ve=_?15:Math.min(Math.max(z.length,1),xe),je=w.useRef(null);w.useEffect(()=>{_||R||!l||je.current===l||(je.current=l,Q("Shop Searched",{query:l,result_count:U}))},[l,_,R,U]);const H=w.useRef("__init__");w.useEffect(()=>{if(_||R)return;const i=JSON.stringify({category:j,subCategory:c,rarities:a,min:k,max:E,sort:v,status:f,smart:u});if(H.current==="__init__"||H.current===i){H.current=i;return}H.current=i,Q("Shop Applied Filter",{filters:{category:j,sub_category:c,rarities:a,min_price_credits:k??null,max_price_credits:E??null,status:f,smart:u,sort:v},result_count:U})},[j,c,a,k,E,v,f,u,_,R,U]);function ve(i){p({category:i,subCategory:null})}function $e(i){p({status:i})}function Ce(i){p({rarities:a.includes(i)?a.filter(I=>I!==i):[...a,i]})}function Ze(){p(h)}const P=[];(k!=null||E!=null)&&P.push({key:"price",label:n("filter.price"),onRemove:()=>{p({priceMin:"",priceMax:""})}});for(const i of Xe)a.includes(i)&&P.push({key:`rarity-${i}`,label:xt(i),onRemove:()=>Ce(i)});return u&&P.push({key:"smart",label:n("filter.smart"),onRemove:()=>p({smart:!1})}),f!=="on_sale"&&P.push({key:"status",label:f==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>$e("on_sale")}),e.jsxs(ut,{"data-testid":"browse",children:[j!=="names"&&e.jsxs(e.Fragment,{children:[b?e.jsx(gt,{onClick:()=>$(!1),"aria-hidden":!0}):null,e.jsxs(bt,{"data-open":b||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(yt,{children:[e.jsx(wt,{children:n("assets.filters")}),e.jsx(jt,{onClick:()=>$(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(vt,{children:e.jsx($t,{category:j,subCategory:c,onCategory:ve,onSub:i=>p({subCategory:i}),priceMin:m,priceMax:g,onPriceMin:i=>p({priceMin:i}),onPriceMax:i=>p({priceMax:i}),rarities:a,onToggleRarity:Ce,status:f,onStatus:$e,smart:u,onSmart:i=>p({smart:i})})}),e.jsx(Ct,{children:e.jsx(kt,{type:"button",onClick:()=>$(!1),children:n("assets.showItems")})})]})]}),e.jsx(St,{children:j==="names"?e.jsx(ps,{onBack:()=>ve("all")}):e.jsxs(e.Fragment,{children:[e.jsx(Ye,{sort:v,onSort:i=>p({sort:i}),total:y,loading:_||R,query:l,onOpenFilters:()=>$(!0),chips:P,onClearChips:Ze}),Oe&&C&&z.some(i=>i.source==="legacy")?e.jsx(Et,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,ge?e.jsx(Wt,{message:n("assets.loadError"),testId:"browse-error"}):null,!we&&z.length===0&&!ge?e.jsxs(Tt,{"data-testid":"browse-empty",children:[e.jsx(_t,{src:hs,alt:""}),e.jsxs(Rt,{children:[e.jsx(zt,{children:n("assets.empty.title")}),e.jsx(It,{children:x?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:x}),n("assets.empty.searchAfter")]}):n("assets.empty.filters")})]}),e.jsx(At,{children:e.jsx(Mt,{type:"button",onClick:()=>o("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Kt,{"data-testid":"grid",children:we?e.jsx(Se,{count:Ve}):e.jsxs(e.Fragment,{children:[z.map(i=>{if(!C)return e.jsx(G,{item:i,mode:"view"},D(i));const I=i;if(I.source!=="legacy")return e.jsx(G,{item:i},D(i));const O=De(I);return O==null?e.jsx(G,{item:i,mode:"view"},D(i)):e.jsx(G,{item:{...I,priceCredits:O}},D(i))}),be?e.jsx(Se,{count:6}):null]})}),e.jsx(Nt,{hasNextPage:Le,isFetching:be,isError:Ue,onLoadMore:()=>void He()})]})]})})]})}export{Ms as Assets};
801
+ `,ls="https://docs.decentraland.org/creator/worlds/about/",cs="https://governance.decentraland.org";function ds(r){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(r)}`}function ps({onBack:r}){Ne({title:n("seo.names.title"),description:n("seo.names.description")});const{session:o,signIn:l}=Me(),{data:x}=Pe(),h=x?We(B,x):null,[d,p]=w.useState(""),[c,a]=w.useState("idle"),[f,g]=w.useState(!1),u=w.useRef(null),[v,j]=w.useState(void 0);w.useLayoutEffect(()=>{u.current&&j(u.current.offsetWidth)},[d]),w.useEffect(()=>{if(!Ee(d).ok){a(d.length===0?"idle":"invalid");return}a("checking");const E=new AbortController,M=setTimeout(()=>{(async()=>{try{const S=await en(d,{signal:E.signal});a(S)}catch(S){if((S==null?void 0:S.name)==="AbortError")return;a("error")}})()},400);return()=>{clearTimeout(M),E.abort()}},[d]);const m=Ee(d),b=m.ok&&(c==="available"||c==="error");function $(){if(b){if(!o){l();return}g(!0)}}const C=e.jsxs(e.Fragment,{children:[n("names.claim"),h!=null?e.jsxs(es,{children:[e.jsx(A,{}),fe(h)]}):null]});return e.jsxs(An,{"data-testid":"names-page",children:[e.jsxs(Mn,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Nn,{onClick:r,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Pn,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(Wn,{children:[e.jsxs(Bn,{children:[e.jsxs(Fn,{children:[e.jsx(Ln,{children:n("names.heroTitle")}),e.jsx(Un,{children:n("names.heroSubtitle")})]}),e.jsxs(Hn,{children:[e.jsxs(On,{children:[e.jsxs(Dn,{invalid:c==="taken",children:[e.jsxs(Zn,{children:[e.jsx(Kn,{"aria-hidden":!0,children:"@"}),e.jsx(Jn,{value:d,onChange:k=>p(Qt(k.target.value)),placeholder:n("names.inputPlaceholder"),"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:X,style:{width:v!=null?`${v}px`:void 0}}),e.jsx(Gn,{ref:u,"aria-hidden":!0,children:d||n("names.inputPlaceholder")}),e.jsx(Qn,{children:n("names.suffix")})]}),d.length>0?e.jsxs(Xn,{"aria-hidden":!0,children:[d.length,"/",X]}):null,e.jsx(Fe,{onClick:$,disabled:!b,"data-testid":"names-claim",children:C})]}),c==="taken"?e.jsxs(qn,{role:"status","data-testid":"names-taken",children:[e.jsx(_,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.taken")}),e.jsxs(Vn,{href:ds(d),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(_,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(Yn,{onClick:$,disabled:!b,children:C}),c==="checking"?e.jsx(he,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):c==="error"?e.jsx(he,{tone:"muted",role:"status",children:n("names.checkError")}):c==="invalid"&&!m.ok&&m.reason==="too-short"?e.jsx(he,{tone:"muted",role:"status",children:n("names.tooShort",{min:Be})}):null,e.jsx(as,{role:"status","aria-live":"polite",children:c==="available"?n("names.available",{name:d}):""})]})]}),e.jsxs(ts,{children:[e.jsxs(ns,{children:[e.jsx(ss,{children:n("names.whyTitle")}),e.jsx(rs,{children:n("names.whyIntro")})]}),e.jsxs(is,{children:[e.jsxs(q,{children:[e.jsx(V,{src:Tn,alt:""}),e.jsxs(Z,{children:[e.jsx(K,{children:n("names.why1Title")}),e.jsx(J,{children:n("names.why1")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Rn,alt:""}),e.jsxs(Z,{children:[e.jsx(K,{children:n("names.why2Title")}),e.jsxs(J,{children:[n("names.why2")," ",e.jsx(os,{children:n("names.why2Address")})]}),e.jsxs(Ie,{href:ls,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(_,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:zn,alt:""}),e.jsxs(Z,{children:[e.jsx(K,{children:n("names.why3Title")}),e.jsx(J,{children:n("names.why3")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:In,alt:""}),e.jsxs(Z,{children:[e.jsx(K,{children:n("names.why4Title")}),e.jsx(J,{children:n("names.why4")}),e.jsxs(Ie,{href:cs,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(_,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),f?e.jsx(En,{name:d,priceCredits:h,onClose:()=>g(!1)}):null]})}const hs="data:image/svg+xml,%3csvg%20width='101'%20height='101'%20viewBox='0%200%20101%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M42.4493%2040.9855L30.7394%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M30.7391%2040.9855L42.449%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M36.2621%2071.0604C29.6047%2071.0604%2023.9709%2068.7542%2019.3608%2064.1416C14.7507%2059.5291%2012.4445%2053.8953%2012.442%2047.2404C12.4396%2040.5854%2014.7459%2034.9516%2019.3608%2030.3391C23.9758%2025.7266%2029.6096%2023.4203%2036.2621%2023.4203C42.9146%2023.4203%2048.5496%2025.7266%2053.167%2030.3391C57.7844%2034.9516%2060.0895%2040.5854%2060.0822%2047.2404C60.0822%2049.9277%2059.6546%2052.4624%2058.7995%2054.8445C57.9445%2057.2265%2056.784%2059.3336%2055.3181%2061.1659L75.84%2081.6878C76.5119%2082.3597%2076.8478%2083.2148%2076.8478%2084.2531C76.8478%2085.2914%2076.5119%2086.1465%2075.84%2086.8183C75.1682%2087.4902%2074.3131%2087.8261%2073.2748%2087.8261C72.2365%2087.8261%2071.3814%2087.4902%2070.7096%2086.8183L50.1877%2066.2964C48.3554%2067.7623%2046.2482%2068.9227%2043.8662%2069.7778C41.4842%2070.6329%2038.9495%2071.0604%2036.2621%2071.0604ZM36.2621%2063.7312C40.8429%2063.7312%2044.7372%2062.1285%2047.9449%2058.9232C51.1527%2055.7179%2052.7554%2051.8236%2052.7529%2047.2404C52.7505%2042.6571%2051.1478%2038.7641%2047.9449%2035.5612C44.742%2032.3583%2040.8478%2030.7544%2036.2621%2030.7495C31.6764%2030.7447%2027.7834%2032.3485%2024.5829%2035.5612C21.3825%2038.7739%2019.7786%2042.6669%2019.7713%2047.2404C19.764%2051.8138%2021.3678%2055.7081%2024.5829%2058.9232C27.798%2062.1383%2031.6911%2063.7409%2036.2621%2063.7312Z'%20fill='url(%23paint0_linear_search_empty)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_search_empty'%20x1='10.4127'%20y1='55.6273'%20x2='124.009'%20y2='44.925'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",xe=48,xs=["all","on_sale","not_for_sale"];function Ms(){const[r]=Ke(),o=Ae(),l=(r.get("q")??"").trim().toLowerCase(),x=(r.get("q")??"").trim();Ne({title:x?n("seo.collectibles.searchTitle",{query:x}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const h=w.useMemo(()=>({category:"all",status:"on_sale",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[d,p]=Je(h),{subCategory:c,rarities:a,priceMin:f,priceMax:g,smart:u,sort:v}=d,j=d.category,m=xs.includes(d.status)?d.status:"on_sale";Qe(`${j}:${c??""}`);const[b,$]=w.useState(!1);w.useEffect(()=>{if(!b)return;const i=O=>{O.key==="Escape"&&$(!1)};document.addEventListener("keydown",i);const I=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",i),document.body.style.overflow=I}},[b]);const C=m==="on_sale",k=f&&!Number.isNaN(Number(f))?Number(f):void 0,E=g&&!Number.isNaN(Number(g))?Number(g):void 0,M=ht(),S=c?et[c]:void 0,N=(ke.find(i=>i.key===v)??ke[0]).server,F={category:j,rarities:a.length?a:void 0,wearableCategories:S,minPriceCredits:k,maxPriceCredits:E,search:l||void 0,sortBy:N,isSmart:u||void 0,onSale:!0,listingType:M?void 0:"primary"},L={category:j,rarities:a.length?a:void 0,wearableCategories:S,search:l||void 0,sortBy:N,isWearableSmart:u||void 0,isOnSale:m==="not_for_sale"?!1:void 0},{items:z,total:y,isLoading:T,isPlaceholderData:R,error:ge,hasNextPage:Le,isFetchingNextPage:be,isFetchNextPageError:Ue,fetchNextPage:He}=Pt(C?["shop-items",F]:["catalog-items",L],i=>C?ft({...F,first:xe,skip:i}):mt({...L,first:xe,skip:i}),{enabled:j!=="names"}),U=y,{data:ye,isError:Oe,isPending:De}=Pe(),Ge=i=>ye&&i.manaWei?We(i.manaWei,ye):null,qe=C&&De&&z.some(i=>i.source==="legacy"),we=T||R||qe,Ve=T?15:Math.min(Math.max(z.length,1),xe),je=w.useRef(null);w.useEffect(()=>{T||R||!l||je.current===l||(je.current=l,Q("Shop Searched",{query:l,result_count:U}))},[l,T,R,U]);const H=w.useRef("__init__");w.useEffect(()=>{if(T||R)return;const i=JSON.stringify({category:j,subCategory:c,rarities:a,min:k,max:E,sort:v,status:m,smart:u});if(H.current==="__init__"||H.current===i){H.current=i;return}H.current=i,Q("Shop Applied Filter",{filters:{category:j,sub_category:c,rarities:a,min_price_credits:k??null,max_price_credits:E??null,status:m,smart:u,sort:v},result_count:U})},[j,c,a,k,E,v,m,u,T,R,U]);function ve(i){p({category:i,subCategory:null})}function $e(i){p({status:i})}function Ce(i){p({rarities:a.includes(i)?a.filter(I=>I!==i):[...a,i]})}function Ze(){p(h)}const P=[];(k!=null||E!=null)&&P.push({key:"price",label:n("filter.price"),onRemove:()=>{p({priceMin:"",priceMax:""})}});for(const i of Xe)a.includes(i)&&P.push({key:`rarity-${i}`,label:xt(i),onRemove:()=>Ce(i)});return u&&P.push({key:"smart",label:n("filter.smart"),onRemove:()=>p({smart:!1})}),m!=="on_sale"&&P.push({key:"status",label:m==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>$e("on_sale")}),e.jsxs(ut,{"data-testid":"browse",children:[j!=="names"&&e.jsxs(e.Fragment,{children:[b?e.jsx(gt,{onClick:()=>$(!1),"aria-hidden":!0}):null,e.jsxs(bt,{"data-open":b||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(yt,{children:[e.jsx(wt,{children:n("assets.filters")}),e.jsx(jt,{onClick:()=>$(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(vt,{children:e.jsx($t,{category:j,subCategory:c,onCategory:ve,onSub:i=>p({subCategory:i}),priceMin:f,priceMax:g,onPriceMin:i=>p({priceMin:i}),onPriceMax:i=>p({priceMax:i}),rarities:a,onToggleRarity:Ce,status:m,onStatus:$e,smart:u,onSmart:i=>p({smart:i})})}),e.jsx(Ct,{children:e.jsx(kt,{type:"button",onClick:()=>$(!1),children:n("assets.showItems")})})]})]}),e.jsx(St,{children:j==="names"?e.jsx(ps,{onBack:()=>ve("all")}):e.jsxs(e.Fragment,{children:[e.jsx(Ye,{sort:v,onSort:i=>p({sort:i}),total:y,loading:T||R,query:l,onOpenFilters:()=>$(!0),chips:P,onClearChips:Ze}),Oe&&C&&z.some(i=>i.source==="legacy")?e.jsx(Et,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,ge?e.jsx(Wt,{message:n("assets.loadError"),testId:"browse-error"}):null,!we&&z.length===0&&!ge?e.jsxs(_t,{"data-testid":"browse-empty",children:[e.jsx(Tt,{src:hs,alt:""}),e.jsxs(Rt,{children:[e.jsx(zt,{children:n("assets.empty.title")}),e.jsx(It,{children:x?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:x}),n("assets.empty.searchAfter")]}):n("assets.empty.filters")})]}),e.jsx(At,{children:e.jsx(Mt,{type:"button",onClick:()=>o("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Kt,{"data-testid":"grid",children:we?e.jsx(Se,{count:Ve}):e.jsxs(e.Fragment,{children:[z.map(i=>{if(!C)return e.jsx(D,{item:i,mode:"view"},G(i));const I=i;if(I.source!=="legacy")return e.jsx(D,{item:i},G(i));const O=Ge(I);return O==null?e.jsx(D,{item:i,mode:"view"},G(i)):e.jsx(D,{item:{...I,priceCredits:O}},G(i))}),be?e.jsx(Se,{count:6}):null]})}),e.jsx(Nt,{hasNextPage:Le,isFetching:be,isError:Ue,onLoadMore:()=>void He()})]})]})})]})}export{Ms as Assets};