@dcl/shop 1.0.2-31061952187.commit-8d8b09e → 1.0.2-31093320960.commit-a66fdac

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 (190) hide show
  1. package/_assets/{Activity-D_fQdZon.js → Activity-BZYV865P.js} +29 -29
  2. package/_assets/{AnimatedBackground-C9W4RBcZ.js → AnimatedBackground-C_gdl0Ga.js} +1 -1
  3. package/_assets/Assets-D6xTxE6H.js +892 -0
  4. package/_assets/{Assets.styles-BBWJCcMx.js → Assets.styles-C2Y2OMju.js} +80 -72
  5. package/_assets/{Authorizations-DVwQ95Ww.js → Authorizations-Dyl-2_Wx.js} +1 -1
  6. package/_assets/Cart-q1C0b7B0.js +706 -0
  7. package/_assets/{CircularProgress-D09608yv.js → CircularProgress-DfC_DW6J.js} +1 -1
  8. package/_assets/{Collection-DllncUVv.js → Collection-CikwxEA2.js} +11 -11
  9. package/_assets/{CollectionCarousel-B9HmGuVb.js → CollectionCarousel-CW99ees-.js} +182 -126
  10. package/_assets/{Confetti-Dl6FT7nL.js → Confetti-D-f5Qezh.js} +1 -1
  11. package/_assets/Creator-sxuxQmmv.js +307 -0
  12. package/_assets/{ErrorNotice-OUNK486K.js → ErrorNotice-D_MmJHjd.js} +1 -1
  13. package/_assets/{ExchangeController-Cp3qbfAM.js → ExchangeController-5e1qfrC7.js} +1 -1
  14. package/_assets/{Faq-DXtTtsuA.js → Faq-CZWOMrti.js} +1 -1
  15. package/_assets/{GetCredits-BhRNCaTG.js → GetCredits-EPpLyZrC.js} +19 -12
  16. package/_assets/{Grow-DXdR0gI9.js → Grow-CJcrEIIk.js} +1 -1
  17. package/_assets/{HelpersUtil-rQp5uDAx.js → HelpersUtil-D4FO24BM.js} +1 -1
  18. package/_assets/ItemDetail-Daqpqudw.js +3552 -0
  19. package/_assets/JumpInIcon-CfzbSVBF.js +1 -0
  20. package/_assets/LazyEmoteControls-CynuOxLa.js +2 -0
  21. package/_assets/{LoadMore-jSNRJiwZ.js → LoadMore-BcR7LuW8.js} +1 -1
  22. package/_assets/{ManaPricingBanner.styles-vDUAKLLe.js → ManaPricingBanner.styles-b_tWuH2r.js} +2 -2
  23. package/_assets/MyAssets-CY3P4YpT.js +396 -0
  24. package/_assets/{MyFavorites-BLrz2vwY.js → MyFavorites-2J4ivx_A.js} +20 -17
  25. package/_assets/{NotFound-DP4nosOd.js → NotFound-B9SvSXoT.js} +1 -1
  26. package/_assets/{NotificationsBell-ARziPv8W.js → NotificationsBell-DDd4PHL_.js} +1 -1
  27. package/_assets/{OutfitDetail-CLmuEgB3.js → OutfitDetail-DfQD1uwS.js} +12 -9
  28. package/_assets/{OutfitPreview-PWdXvCaE.js → OutfitPreview-B8wqKe4G.js} +1 -1
  29. package/_assets/{OutfitStudio-Cx3Xm6ff.js → OutfitStudio-C8kgT_Q1.js} +46 -46
  30. package/_assets/{StoreSettings-BQtEgWRm.js → StoreSettings-BszakGpI.js} +21 -21
  31. package/_assets/Success-BlrhZwie.js +353 -0
  32. package/_assets/{SwapController-Bf58lQ6b.js → SwapController-CtdE4CSE.js} +1 -1
  33. package/_assets/{Tooltip-BDmKiALz.js → Tooltip-D92iGFCG.js} +1 -1
  34. package/_assets/{TradeService-Yecm1OxI.js → TradeService-CDrDGVbQ.js} +1 -1
  35. package/_assets/{W3MFrameProviderSingleton-BQyeyr-U.js → W3MFrameProviderSingleton-ChXXI6YZ.js} +3 -3
  36. package/_assets/{WebCryptoP256-Ou_F2OJp.js → WebCryptoP256-D8s1Qscb.js} +1 -1
  37. package/_assets/{authorizations-B3AvOvOm.js → authorizations-qnGN3xsk.js} +1 -1
  38. package/_assets/{basic-DTDRwam-.js → basic-DhSHVZRT.js} +1 -1
  39. package/_assets/{biconomy-DaLi1O64.js → biconomy-ClBW5VwG.js} +1 -1
  40. package/_assets/{builder-DxumJmKw.js → builder-CL5pdg21.js} +1 -1
  41. package/_assets/{buy-BHkfYJLe.js → buy-B-DDln2Y.js} +1 -1
  42. package/_assets/{buy-gasless-BfTEWjT9.js → buy-gasless-C_BmhnE7.js} +1 -1
  43. package/_assets/{categories-D23W_J-A.js → categories-B8yCTSzR.js} +73 -58
  44. package/_assets/{ccip-qhHiv1gU.js → ccip-CJEnBLGM.js} +1 -1
  45. package/_assets/{ccip-DGVhZCZ4.js → ccip-DQfkaCht.js} +1 -1
  46. package/_assets/collectionPage.styles-CcRhgEaw.js +32 -0
  47. package/_assets/{controller-DGtmLk4f.js → controller-JXbdlxZp.js} +2 -2
  48. package/_assets/{core-BAqS3vu7.js → core-BSxLBlxi.js} +4 -4
  49. package/_assets/{createSvgIcon-Bm9nxGqG.js → createSvgIcon-yVJuzYrn.js} +2 -2
  50. package/_assets/{custom-MaGTnz7S.js → custom-B3uMWhu7.js} +1 -1
  51. package/_assets/{data-capture-5Vi1cyBa.js → data-capture-B-nbrWqF.js} +1 -1
  52. package/_assets/{email-BG6hRXMo.js → email-CVdda8uU.js} +1 -1
  53. package/_assets/{embedded-wallet-CfnknCH8.js → embedded-wallet-Y6M29Es7.js} +1 -1
  54. package/_assets/{emotion-styled.browser.esm-CoxAZUrJ.js → emotion-styled.browser.esm-BF1qb2R0.js} +1 -1
  55. package/_assets/{engine-nQGCV50K.js → engine-fjR5dIp4.js} +1 -1
  56. package/_assets/{errors-DZ_QWsza.js → errors-B_JuFrfU.js} +1 -1
  57. package/_assets/{estimate-l1-fee-CVpJ9ym5.js → estimate-l1-fee-B1LOd6k3.js} +1 -1
  58. package/_assets/{execute-DFvUDrLY.js → execute-BXynqqjh.js} +2 -2
  59. package/_assets/{features-BXUedULM.js → features-Czbv6jQA.js} +1 -1
  60. package/_assets/{fetchTokenMetadata-CkQcnzmO.js → fetchTokenMetadata-BuR7htwA.js} +2 -2
  61. package/_assets/{field.styles-PE4ZasC2.js → field.styles-DFDRX2tk.js} +1 -1
  62. package/_assets/{get-ecosystem-wallet-info-CRLH8I6C.js → get-ecosystem-wallet-info-C8Jcr_V9.js} +1 -1
  63. package/_assets/{getBalance-CiV48JsZ.js → getBalance-sCJcvWYJ.js} +1 -1
  64. package/_assets/{getNFT-CV3N9TTA.js → getNFT-Vt2rJ26d.js} +1 -1
  65. package/_assets/{getNFT-C3ucNb89.js → getNFT-mOXdmQiA.js} +1 -1
  66. package/_assets/{grid.styles-hOZTJ80g.js → grid.styles-CX_shgZ5.js} +1 -1
  67. package/_assets/{hashTypedData-BtF2J233.js → hashTypedData-CN02HuAO.js} +1 -1
  68. package/_assets/{hashTypedData-gTABcRB5.js → hashTypedData-LiZBeYpJ.js} +1 -1
  69. package/_assets/identity-icon-C8yAW_Gq.svg +8 -0
  70. package/_assets/{in-app-CSDr4Blb.js → in-app-Di-YguDK.js} +1 -1
  71. package/_assets/{in-app-wallet-calls-Crivl9zc.js → in-app-wallet-calls-DeaYPRmI.js} +1 -1
  72. package/_assets/{index-CvwosU6Y.js → index-8YFhojLT.js} +1 -1
  73. package/_assets/{index-BTDIKmoC.js → index-94LcKPqN.js} +1 -1
  74. package/_assets/{index-CHf7lsmp.js → index-B5pEWwvB.js} +1 -1
  75. package/_assets/{index-D5eMvKb_.js → index-BJXNRLkE.js} +1 -1
  76. package/_assets/{index-ItjVcw1b.js → index-BKaw3xHY.js} +1 -1
  77. package/_assets/{index-Bs4LvV4K.js → index-BKtPMRlC.js} +2 -2
  78. package/_assets/{index-S0X-BG2b.js → index-BKwIRP5b.js} +1 -1
  79. package/_assets/{index-C0pcaEQl.js → index-BPg5Mvmb.js} +1 -1
  80. package/_assets/{index-CwRTjZPC.js → index-BRQ9Wcma.js} +3 -3
  81. package/_assets/{index-DKHMu0o3.js → index-BVxFsPRO.js} +1 -1
  82. package/_assets/{index-CyRHowbs.js → index-BanfPpYD.js} +1 -1
  83. package/_assets/{index-KWEbYeSY.js → index-Bf_azgOs.js} +1 -1
  84. package/_assets/{index-HAEoS9R6.js → index-BgNzVgyj.js} +1 -1
  85. package/_assets/{index-BniGBCAO.js → index-Bk3rNDtD.js} +1 -1
  86. package/_assets/{index-Dp2641E3.js → index-BkZn7ynX.js} +1 -1
  87. package/_assets/{index-C5Evg5sh.js → index-Bl852CQj.js} +1 -1
  88. package/_assets/{index-DkV5TYom.js → index-Bm_zAXvq.js} +1 -1
  89. package/_assets/{index-CHolIX6U.js → index-BsJj67OU.js} +1 -1
  90. package/_assets/{index-hKv-BpxY.js → index-BuWzyRcz.js} +1 -1
  91. package/_assets/{index-CKUuopSw.js → index-BwmnMTdg.js} +526 -451
  92. package/_assets/{index-BBbwMaBz.js → index-Bz4Oae-5.js} +1 -1
  93. package/_assets/{index-DSuiX4WG.js → index-BzBhg1fo.js} +1 -1
  94. package/_assets/{index-DnJJn52L.js → index-C0C9VUse.js} +1 -1
  95. package/_assets/{index-CmY0V0eX.js → index-C3CEKm2j.js} +1 -1
  96. package/_assets/{index-DdmULNRk.js → index-C6AA1Xf7.js} +2 -2
  97. package/_assets/{index-CkGO7qOd.js → index-CBhJLill.js} +1 -1
  98. package/_assets/{index-DLFQdlEW.js → index-CF-t9R4v.js} +1 -1
  99. package/_assets/{index-BNBzDf6z.js → index-CahHjkxT.js} +1 -1
  100. package/_assets/{index-Cf-gi-Qq.js → index-CcCpGfgd.js} +1 -1
  101. package/_assets/{index-UyXkCiLs.js → index-CdZzuE8e.js} +1 -1
  102. package/_assets/{index-DjTNPtj2.js → index-CfP1fkI_.js} +1 -1
  103. package/_assets/{index-Dh85kccn.js → index-Cleyy_0q.js} +1 -1
  104. package/_assets/{index-DwX-9Zo4.js → index-CnCeem_J.js} +1 -1
  105. package/_assets/{index-ClUPCoEW.js → index-D6OOP-51.js} +1 -1
  106. package/_assets/{index-BYP7oMPZ.css → index-DB6GvbxL.css} +1 -1
  107. package/_assets/{index-DXRL-4ld.js → index-DDJ7sdXv.js} +1 -1
  108. package/_assets/{index-CS27am7J.js → index-DJpl6Nbn.js} +1 -1
  109. package/_assets/{index-DKdQUEzy.js → index-DNNPYfed.js} +1 -1
  110. package/_assets/{index-9x1mGBeU.js → index-DQzE_-yq.js} +1 -1
  111. package/_assets/{index-DgOiZShm.js → index-DULGD4d2.js} +1 -1
  112. package/_assets/{index-C7hpB9s1.js → index-DaSPxwNy.js} +3 -3
  113. package/_assets/{index-DoGz07sk.js → index-DjW0J8pD.js} +1 -1
  114. package/_assets/{index-9_4ZEs3N.js → index-DjYBUAnI.js} +1 -1
  115. package/_assets/{index-CGBg3yUz.js → index-DlFosNf0.js} +5 -5
  116. package/_assets/{index-D7LYoLo4.js → index-Dm6Y9ZbQ.js} +1 -1
  117. package/_assets/{index-EKmmXx1j.js → index-Dr4f9K-t.js} +1 -1
  118. package/_assets/{index-qGMuaBIs.js → index-FT6agMXk.js} +1 -1
  119. package/_assets/{index-1oceTWwb.js → index-IvNZzfoI.js} +3 -3
  120. package/_assets/{index-C23D_vyT.js → index-N1bohwEM.js} +1 -1
  121. package/_assets/{index-D769FdFr.js → index-OQab0-JQ.js} +1 -1
  122. package/_assets/{index-wRmEiTlP.js → index-rEZ_4IFC.js} +2 -2
  123. package/_assets/{index-Bg_gOSx_.js → index-sFhq_-vF.js} +1 -1
  124. package/_assets/{index-DY1xBku2.js → index-tLIN_GkS.js} +1 -1
  125. package/_assets/{index.es-g_bB-nFv.js → index.es-CAHIM3qD.js} +1 -1
  126. package/_assets/{index.es-DnMGDxtr.js → index.es-DAZuzUm7.js} +1 -1
  127. package/_assets/{index.es-wpL2Ycto.js → index.es-Dwz0IUN6.js} +4 -4
  128. package/_assets/invite-icon-Bz6lCTuB.svg +11 -0
  129. package/_assets/{localBatchGatewayRequest-DtELSHiE.js → localBatchGatewayRequest-CmvuTHFj.js} +1 -1
  130. package/_assets/{networks-ZmRqsvV6.js → networks-DxoGDzHE.js} +1 -1
  131. package/_assets/{onramp-Bffl3qa3.js → onramp-DUHkYtuW.js} +1 -1
  132. package/_assets/{openzeppelin-BmH-LNci.js → openzeppelin-sla19LMh.js} +1 -1
  133. package/_assets/{parseNft-PSjb4qKi.js → parseNft-UEsMFiqe.js} +2 -2
  134. package/_assets/{parseSignature-IigTmAp7.js → parseSignature-BhyKODlU.js} +1 -1
  135. package/_assets/{parseSignature-D947kFfv.js → parseSignature-CPQ4376G.js} +3 -3
  136. package/_assets/{passkeys-BsJVcpuM.js → passkeys-wDVu6yuN.js} +1 -1
  137. package/_assets/{pay-with-exchange-CU_HZd9F.js → pay-with-exchange-CWK-Ssp3.js} +1 -1
  138. package/_assets/{qr-overlay-EMShc5uE.js → qr-overlay-BNEHuGJ4.js} +1 -1
  139. package/_assets/{receive-CO6WElZa.js → receive-BWFbKioL.js} +1 -1
  140. package/_assets/{resolveImplementation-CUngPhAv.js → resolveImplementation-DgfhwMlM.js} +1 -1
  141. package/_assets/{rpc-BqH_VMy9.js → rpc-BqdwSpX8.js} +1 -1
  142. package/_assets/{secp256k1-D7kpLshE.js → secp256k1-BBK7GqHS.js} +1 -1
  143. package/_assets/{secp256k1-CTsmRKJj.js → secp256k1-C-W8I-Zy.js} +1 -1
  144. package/_assets/{secp256k1-DneM3aYG.js → secp256k1-DREcXm38.js} +1 -1
  145. package/_assets/{send-DnwW2LgN.js → send-CHzkLWPr.js} +1 -1
  146. package/_assets/{send-batch-transaction-BgJnfEM8.js → send-batch-transaction-5BgfAaSR.js} +1 -1
  147. package/_assets/{send-eip712-transaction-Cw3ykz5y.js → send-eip712-transaction-D_wCG6QA.js} +2 -2
  148. package/_assets/{send-gasless-transaction-BjGhnCwR.js → send-gasless-transaction-tLadnb9y.js} +2 -2
  149. package/_assets/{send-transaction-COKVeGfk.js → send-transaction-D3DYgONV.js} +2 -2
  150. package/_assets/{sendMetaTransaction-Bp3kwdLJ.js → sendMetaTransaction-Uawte2uP.js} +1 -1
  151. package/_assets/{sendRawTransaction-eVli2oE3.js → sendRawTransaction-yrJJjJuj.js} +3 -3
  152. package/_assets/{serializeTransaction-CIM9i_-w.js → serializeTransaction-DbAjRO35.js} +1 -1
  153. package/_assets/{session-proposal-KGl_Ah2b.js → session-proposal-tovuipdf.js} +1 -1
  154. package/_assets/{session-request-VAEXTksW.js → session-request-CJx8_Nqv.js} +2 -2
  155. package/_assets/{signing-Cgx49_1X.js → signing-DIdv4EGK.js} +3 -3
  156. package/_assets/{skeleton.styles-BXNXDWEi.js → skeleton.styles-JTH6hNy6.js} +1 -1
  157. package/_assets/{socials-oKAOeF-k.js → socials-BMAR0gR_.js} +1 -1
  158. package/_assets/{styled-pD_2hanx.js → styled-Dfg0i8eX.js} +1 -1
  159. package/_assets/{swaps-BcAY_D99.js → swaps-BGa4ySw5.js} +1 -1
  160. package/_assets/{thirdweb-ChAqWFCO.js → thirdweb-Bf4Axk_U.js} +3 -3
  161. package/_assets/{to-serializable-transaction-D9qGbcrS.js → to-serializable-transaction-DRJLaygN.js} +2 -2
  162. package/_assets/{transactionReceipt-BMw52z-f.js → transactionReceipt-Bhig9TGy.js} +1 -1
  163. package/_assets/{transactions-CeENvGIt.js → transactions-CCUXYIeH.js} +1 -1
  164. package/_assets/{useCreditPacks-BcavayJ3.js → useCreditPacks-D8rMiOb_.js} +1 -1
  165. package/_assets/{useImportable-CqnIvzif.js → useImportable-CNQfbBw8.js} +1 -1
  166. package/_assets/{useInfiniteGrid-BjEQAabI.js → useInfiniteGrid-BADHIu6F.js} +1 -1
  167. package/_assets/{useTheme-BnnteKI4.js → useTheme-DBV2Tqy3.js} +1 -1
  168. package/_assets/{verifyHash-CuRmy06R.js → verifyHash-Cdp-LdrE.js} +1 -1
  169. package/_assets/{w3m-modal-BvOCJx7k.js → w3m-modal-BxSlR5wP.js} +1 -1
  170. package/_assets/{w3m-modal-CkBFH4cA.js → w3m-modal-CIDOCqB8.js} +1 -1
  171. package/_assets/{wait-for-tx-receipt-B2KaPYJT.js → wait-for-tx-receipt-C9B0C6I6.js} +1 -1
  172. package/_assets/{wallets-CpXU08d2.js → wallets-wYcTf8sk.js} +5 -5
  173. package/_assets/{web-connector-BHRkWbB9.js → web-connector-DC2N7iZ9.js} +3 -3
  174. package/_assets/world-icon-6xQ-PmmW.svg +7 -0
  175. package/_assets/{writeContract-DNDGvg0r.js → writeContract-EKs-5iav.js} +1 -1
  176. package/_assets/{zoraTestnet-CCn01jlp.js → zoraTestnet-DPmpNXvV.js} +1 -1
  177. package/index.html +11 -11
  178. package/package.json +2 -2
  179. package/_assets/Assets-CvZql_4R.js +0 -866
  180. package/_assets/Cart-CBLHJRVj.js +0 -706
  181. package/_assets/Creator-BreBnKPX.js +0 -305
  182. package/_assets/ItemDetail-clRbfaLQ.js +0 -3551
  183. package/_assets/LazyEmoteControls-B7UYn8xk.js +0 -2
  184. package/_assets/MyAssets-CsWhc-qa.js +0 -381
  185. package/_assets/Success-BWfI3_Mu.js +0 -280
  186. package/_assets/collectionPage.styles-CoEdrsfq.js +0 -49
  187. package/_assets/governance-DnazlIjy.webp +0 -0
  188. package/_assets/identity-B4DXDuJP.webp +0 -0
  189. package/_assets/invite-BfwIhP2C.webp +0 -0
  190. package/_assets/world-B-9aPlxu.webp +0 -0
@@ -1,866 +0,0 @@
1
- import{b as Fe,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Qe}from"./useUrlFilters-DH-gxdfV.js";import{u as Je,S as $e,R as Xe,F as Ye,e as et}from"./categories-D23W_J-A.js";import{c as L,r as tt,bm as nt,bn as st,aA as it,a as ot,s,t,o as Ie,bc as rt,A as at,L as xe,b as n,y as lt,I as E,z as F,c0 as Y,bb as ct,Z as J,br as dt,bq as pt,x as Ae,an as Ne,n as Le,q as ht,ac as xt,ap as ke,aq as G,aG as ft,bL as mt}from"./index-CKUuopSw.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 Ct,m as $t,n as kt,M as St,u as Tt,E as Et,v as _t,p as Rt,q as Mt,r as zt,s as Ft,t as It}from"./Assets.styles-BBWJCcMx.js";import{L as At}from"./LoadMore-jSNRJiwZ.js";import{u as Nt}from"./useInfiniteGrid-BjEQAabI.js";import{E as Lt}from"./ErrorNotice-OUNK486K.js";import{d as Wt}from"./dcl-schemas-CmtP3U6y.js";import{s as Pt,G as Bt,w as Ht,S as Ut}from"./buy-gasless-BfTEWjT9.js";import{s as Ot,k as Gt}from"./buy-BHkfYJLe.js";import{f as Dt}from"./errors-DZ_QWsza.js";import{J as qt,C as Zt,B as fe}from"./ethers-BDpbhgX6.js";import{n as Vt}from"./Tooltip-BDmKiALz.js";import{G as Kt}from"./grid.styles-hOZTJ80g.js";import"./skeleton.styles-BXNXDWEi.js";import"./sentry-Dx-KuLV3.js";import"./intl-CBcMB1D2.js";import"./authorizations-B3AvOvOm.js";import"./sendMetaTransaction-Bp3kwdLJ.js";function D(i){const r=i.source??"item",l=i.tradeId||`${i.contractAddress}-${i.tokenId??i.itemId??""}`;return`${r}:${l}`}const W="100000000000000000000",We=2,X=15,Qt=/^[a-zA-Z0-9]+$/;function Se(i){const r=i.trim();return r.length===0?{ok:!1,reason:"empty"}:Qt.test(r)?r.length<We?{ok:!1,reason:"too-short"}:r.length>X?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Jt(i){return i.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 L.chainId===Number(Wt.ChainId.MATIC_MAINNET)?Te.mainnet:Te.sepolia}async function en(i,r={}){var c;const{rpc:l,address:x}=Yt(),h=new qt(l),d=new Zt(x,Xt,h);console.info(`[names] availability check → DCLRegistrar(${x}).available("${i}") on ${l}`);const p=await d.available(i);if((c=r.signal)!=null&&c.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${i}" available=${p}`),p?"available":"taken"}const tn="https://app.across.to/api";class me extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function nn(i){return it(W,i)}async function sn(i,r,l={}){var c;const x=l.chainId??L.chainId,h=l.provider??"across",d=`${L.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(r)}&chainId=${x}&provider=${h}`,p=await ot(d,{method:"GET",identity:i,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 me:new Error(`fetchNameCreditRoute ${p.status}`)}return p.json()}function on(i,r){const l=fe.from(i.availableAmount),h=fe.from(W).sub(l);return{credits:[{value:i.amount,expiresAt:Number(i.expiresAt),salt:Gt(i.id)}],creditsSignatures:[i.signature],externalCall:{target:r.externalCall.target,selector:r.externalCall.selector,data:r.externalCall.data,expiresAt:r.externalCall.expiresAt,salt:r.externalCall.salt},customExternalCallSignature:r.customExternalCallSignature,maxUncreditedValue:h.isNegative()?"0":h.toString(),maxCreditedValue:W}}async function rn(i,r={}){const l=tn,x=r.intervalMs??1e4,h=r.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=${i}`);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(i){const{name:r,identity:l,signer:x}=i,h=i.chainId??L.chainId,d=i.provider??"across",p=(i.beneficiary??await x.getAddress()).toLowerCase();let c=null,a=!1;console.info("[names] register start",{name:r,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,r,{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(W))throw new Error("Credit under-sized for the name price");const j=on(v.credit,u);let m;try{m=await Pt({chainId:h,buyer:p,signer:x,args:j})}catch(b){if(!(b instanceof Bt))throw b;m=await Ot(h,j,x)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:m}),await Ht(m),a=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:m}),d==="across"){const b=await rn(m,i.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:r,buyer:p,originConfirmed:a}),f instanceof Ut)return{status:"pending",originTxHash:f.txHash};if(c&&!a&&await st(l,[c]).catch(()=>{}),f instanceof me)throw f;const g=new Error(Dt(f,"Couldn't register the name. Please try again.",{sale:!0}));throw g.cause=f,g}}const ln="data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='46.999'%20height='46.999'%20viewBox='0%200%2046.999%2046.999'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Vector'%3e%3cpath%20d='M23.5861%2046.999C27.4441%2046.999%2031.1266%2046.1286%2034.3708%2044.475H12.8014C16.0456%2046.1286%2019.6405%2046.999%2023.5861%2046.999Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M8.76807%2041.9509H38.1411C39.1056%2041.1676%2040.1577%2040.2102%2040.7715%2039.514H6.13765C7.01445%2040.3843%207.89126%2041.2547%208.76807%2041.9509Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M25.0767%2034.0307H2.2797C2.80578%2035.0752%203.41955%2036.0326%204.03331%2036.9899H22.5339L25.0767%2034.0307Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M23.5861%200C10.6094%200%200%2010.4442%200%2023.4125C0%2026.2846%200.526084%2029.0697%201.49057%2031.5938L10.6094%2020.7144L15.8702%2014.3608L28.6716%2029.679L32.3542%2025.2402L41.999%2036.7288H42.7882C45.5063%2032.8993%2046.9968%2028.2864%2046.9968%2023.3254C47.1722%2010.4442%2036.5628%200%2023.5861%200ZM15.7825%2012.272C13.9412%2012.272%2012.5383%2010.7924%2012.5383%209.05166C12.5383%207.31095%2014.0289%205.83136%2015.7825%205.83136C17.6238%205.83136%2019.0267%207.31095%2019.0267%209.05166C19.0267%2010.7924%2017.6238%2012.272%2015.7825%2012.272ZM32.8803%2022.8032C29.2853%2022.8032%2026.3919%2019.931%2026.3919%2016.3626C26.3919%2012.7942%2029.2853%209.92201%2032.8803%209.92201C36.4752%209.92201%2039.3686%2012.7942%2039.3686%2016.3626C39.4563%2019.931%2036.4752%2022.8032%2032.8803%2022.8032Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M16.484%2018.7126V31.6808H27.2687L16.484%2018.7126Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M33.1433%2037.164H39.2809L33.1433%2029.766V37.164Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3c/g%3e%3c/svg%3e",cn="https://cdn.decentraland.org/@dcl/shop/1.0.2-31061952187.commit-8d8b09e/_assets/name-verified-oGwQ3ntb.svg",dn="#34fee6",pn=s.div`
2
- position: fixed;
3
- inset: 0;
4
- z-index: 10000;
5
- display: flex;
6
- align-items: center;
7
- justify-content: center;
8
- padding: 16px;
9
- background: rgba(22, 21, 24, 0.55);
10
- `,hn=s.div`
11
- width: 560px;
12
- max-width: 100%;
13
- max-height: 92vh;
14
- overflow-y: auto;
15
- background: ${t.colors.white};
16
- border-radius: 16px;
17
- padding: 20px 24px 24px;
18
- box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
19
-
20
- ${t.media.maxWidth("mobile")} {
21
- padding: 16px;
22
- }
23
- `,ee=s.div`
24
- display: flex;
25
- align-items: flex-start;
26
- justify-content: space-between;
27
- gap: 12px;
28
- `,te=s.h2`
29
- margin: 0;
30
- font-family: ${t.font.sans};
31
- font-weight: 700;
32
- font-size: 22px;
33
- line-height: 1.2;
34
- color: ${t.colors.text};
35
- `,ne=s.button`
36
- flex: none;
37
- display: grid;
38
- place-items: center;
39
- width: 28px;
40
- height: 28px;
41
- border: 0;
42
- background: none;
43
- cursor: pointer;
44
- color: ${t.colors.text};
45
-
46
- .ico {
47
- width: 18px;
48
- height: 18px;
49
- }
50
- &:disabled {
51
- opacity: 0.4;
52
- cursor: default;
53
- }
54
- &:focus-visible {
55
- outline: 2px solid ${t.colors.accent};
56
- outline-offset: 2px;
57
- }
58
- `,se=s.div`
59
- display: flex;
60
- align-items: center;
61
- gap: 6px;
62
- margin-top: 4px;
63
- font-family: ${t.font.sans};
64
- font-size: 14px;
65
- color: ${t.colors.text2};
66
-
67
- .ico {
68
- width: 16px;
69
- height: 16px;
70
- color: ${t.colors.brandViolet};
71
- }
72
- `,ie=s.hr`
73
- border: 0;
74
- border-top: 1px solid ${t.colors.line};
75
- margin: 16px 0;
76
- `,oe=s.div`
77
- display: flex;
78
- align-items: center;
79
- gap: 16px;
80
- `,xn=s.div`
81
- flex: none;
82
- display: flex;
83
- flex-direction: column;
84
- align-items: center;
85
- justify-content: center;
86
- gap: 12px;
87
- width: 137px;
88
- height: 137px;
89
- padding: 20px 0;
90
- border-radius: 12px;
91
- overflow: hidden;
92
- background: ${t.gradients.amethyst};
93
- `,fn=s.img`
94
- display: block;
95
- width: 47px;
96
- height: 47px;
97
- `,mn=s.span`
98
- display: inline-flex;
99
- align-items: center;
100
- gap: 2px;
101
- max-width: 100%;
102
- padding: 0 8px;
103
- font-family: ${t.font.sans};
104
- font-size: 18px;
105
- font-weight: 600;
106
- /* The design's cyan — it has to read against the purple, which the body text colour would not. */
107
- color: ${dn};
108
- white-space: nowrap;
109
- overflow: hidden;
110
-
111
- /* Truncation belongs on the flex item, not this box: text-overflow is inert on a flex container, and
112
- the zero min-width is what lets the name shrink instead of pushing the tick out. */
113
- > span {
114
- min-width: 0;
115
- overflow: hidden;
116
- text-overflow: ellipsis;
117
- }
118
- `,un=s.img`
119
- flex: none;
120
- display: block;
121
- width: 14px;
122
- height: 14px;
123
- `,Ee=s.div`
124
- flex: none;
125
- display: grid;
126
- place-items: center;
127
- width: 56px;
128
- height: 56px;
129
- border-radius: 10px;
130
- background: ${t.gradients.amethyst};
131
- color: ${t.colors.white};
132
-
133
- .ico {
134
- width: 30px;
135
- height: 30px;
136
- }
137
- `,re=s.div`
138
- flex: 1;
139
- min-width: 0;
140
- `,ae=s.div`
141
- font-family: ${t.font.sans};
142
- font-weight: 700;
143
- font-size: 20px;
144
- line-height: 1.3;
145
- color: ${t.colors.text};
146
- overflow: hidden;
147
- text-overflow: ellipsis;
148
- white-space: nowrap;
149
-
150
- span {
151
- font-weight: 400;
152
- color: ${t.colors.muted2};
153
- }
154
- `,le=s.div`
155
- font-family: ${t.font.sans};
156
- font-size: 14px;
157
- color: ${t.colors.muted2};
158
- `,ce=s.div`
159
- flex: none;
160
- display: flex;
161
- align-items: center;
162
- gap: 6px;
163
- font-family: ${t.font.sans};
164
- font-weight: 600;
165
- font-size: 24px;
166
- color: ${t.colors.text};
167
-
168
- .ico {
169
- width: 22px;
170
- height: 22px;
171
- color: ${t.colors.brandViolet};
172
- }
173
- `,gn=s.div`
174
- margin-top: 16px;
175
- padding: 16px;
176
- border-radius: 12px;
177
- background: #f2e7fc;
178
- `,bn=s.div`
179
- font-family: ${t.font.sans};
180
- font-weight: 700;
181
- font-size: 16px;
182
- color: ${t.colors.text};
183
- `,yn=s.p`
184
- margin: 8px 0 16px;
185
- font-family: ${t.font.sans};
186
- font-size: 14px;
187
- line-height: 1.5;
188
- color: ${t.colors.text2};
189
-
190
- b {
191
- font-weight: 700;
192
- color: ${t.colors.brandViolet};
193
- }
194
- `,wn=s.label`
195
- display: flex;
196
- align-items: center;
197
- gap: 8px;
198
- padding: 12px 14px;
199
- background: ${t.colors.white};
200
- border: 1px solid ${t.colors.text};
201
- border-radius: 10px;
202
- cursor: text;
203
-
204
- &:focus-within {
205
- border-color: ${t.colors.magenta};
206
- }
207
- `,jn=s.span`
208
- flex: none;
209
- font-family: ${t.font.sans};
210
- font-size: 18px;
211
- color: ${t.colors.muted2};
212
- `,vn=s.input`
213
- flex: 0 1 auto;
214
- min-width: 0;
215
- border: 0;
216
- outline: none;
217
- background: transparent;
218
- font-family: ${t.font.sans};
219
- font-size: 16px;
220
- font-weight: 600;
221
- color: ${t.colors.text};
222
-
223
- &::placeholder {
224
- color: ${t.colors.muted2};
225
- font-weight: 400;
226
- }
227
- `,Cn=s.span`
228
- flex: none;
229
- font-family: ${t.font.sans};
230
- font-size: 16px;
231
- color: ${t.colors.muted2};
232
- `,_e=s.button`
233
- margin-top: 16px;
234
- width: 100%;
235
- height: 52px;
236
- border: 0;
237
- border-radius: 12px;
238
- cursor: pointer;
239
- background: ${t.gradients.amethyst};
240
- color: ${t.colors.softWhite};
241
- font-family: ${t.font.sans};
242
- font-weight: 600;
243
- font-size: 15px;
244
- letter-spacing: 0.46px;
245
- text-transform: uppercase;
246
-
247
- &:hover:not(:disabled) {
248
- filter: brightness(1.06);
249
- }
250
- &:focus-visible {
251
- outline: 2px solid ${t.colors.accent};
252
- outline-offset: 2px;
253
- }
254
- &:disabled {
255
- cursor: not-allowed;
256
- background: #ddc7ec;
257
- color: #f4ecfa;
258
- }
259
- `,$n=s.div`
260
- display: flex;
261
- flex-direction: column;
262
- align-items: flex-start;
263
- gap: 20px;
264
- padding: 32px 0 8px;
265
- `,kn=s.img`
266
- align-self: center;
267
- width: 56px;
268
- height: 56px;
269
- `,Sn=s.div`
270
- font-family: ${t.font.sans};
271
- font-weight: 700;
272
- font-size: 18px;
273
- color: ${t.colors.text};
274
- `,Tn=s.div`
275
- display: flex;
276
- align-items: center;
277
- gap: 12px;
278
- width: 100%;
279
- `,En=s.div`
280
- flex: 1;
281
- height: 8px;
282
- border-radius: 999px;
283
- background: ${t.colors.chip};
284
- overflow: hidden;
285
-
286
- span {
287
- display: block;
288
- height: 100%;
289
- width: 40%;
290
- border-radius: 999px;
291
- background: ${t.gradients.amethyst};
292
- animation: nameProgress 1.1s ease-in-out infinite;
293
- }
294
-
295
- @keyframes nameProgress {
296
- 0% {
297
- transform: translateX(-100%);
298
- }
299
- 100% {
300
- transform: translateX(320%);
301
- }
302
- }
303
- `,_n=s.span`
304
- flex: none;
305
- font-family: ${t.font.sans};
306
- font-size: 14px;
307
- color: ${t.colors.muted};
308
- `,Rn=s.div`
309
- display: flex;
310
- flex-direction: column;
311
- align-items: center;
312
- gap: 16px;
313
- padding: 24px;
314
- border-radius: 12px;
315
- background: #e2f5ea;
316
- text-align: center;
317
- `,Mn=s.div`
318
- display: grid;
319
- place-items: center;
320
- width: 56px;
321
- height: 56px;
322
- border-radius: 50%;
323
- background: ${t.colors.ok};
324
- color: ${t.colors.white};
325
-
326
- .ico {
327
- width: 30px;
328
- height: 30px;
329
- }
330
- `,zn=s.p`
331
- margin: 0;
332
- font-family: ${t.font.sans};
333
- font-size: 16px;
334
- line-height: 1.4;
335
- color: ${t.colors.text};
336
-
337
- b {
338
- font-weight: 700;
339
- }
340
- `,Re=s.div`
341
- display: flex;
342
- gap: 16px;
343
- margin-top: 20px;
344
-
345
- ${t.media.maxWidth("mobile")} {
346
- flex-direction: column;
347
- }
348
- `,Me=s.button`
349
- flex: 1;
350
- height: 48px;
351
- border: 1px solid ${t.colors.accent};
352
- border-radius: 8px;
353
- background: ${t.colors.white};
354
- color: ${t.colors.accent};
355
- cursor: pointer;
356
- font-family: ${t.font.sans};
357
- font-weight: 600;
358
- font-size: 13px;
359
- letter-spacing: 0.46px;
360
- text-transform: uppercase;
361
-
362
- &:hover {
363
- background: rgba(105, 31, 169, 0.06);
364
- }
365
- &:focus-visible {
366
- outline: 2px solid ${t.colors.accent};
367
- outline-offset: 2px;
368
- }
369
- `,Fn=s.a`
370
- flex: 1;
371
- display: inline-flex;
372
- align-items: center;
373
- justify-content: center;
374
- height: 48px;
375
- border-radius: 8px;
376
- background: ${t.colors.dclRed};
377
- color: ${t.colors.softWhite};
378
- cursor: pointer;
379
- text-decoration: none;
380
- font-family: ${t.font.sans};
381
- font-weight: 600;
382
- font-size: 13px;
383
- letter-spacing: 0.46px;
384
- text-transform: uppercase;
385
-
386
- &:hover {
387
- filter: brightness(1.05);
388
- }
389
- &:focus-visible {
390
- outline: 2px solid ${t.colors.accent};
391
- outline-offset: 2px;
392
- }
393
- `,de=s.div`
394
- display: flex;
395
- align-items: flex-start;
396
- gap: 12px;
397
- padding: 16px;
398
- margin-top: 8px;
399
- border-radius: 12px;
400
- background: rgba(255, 45, 85, 0.1);
401
- font-family: ${t.font.sans};
402
- font-size: 14px;
403
- line-height: 1.5;
404
- color: ${t.colors.text};
405
-
406
- .ico {
407
- width: 22px;
408
- height: 22px;
409
- flex: none;
410
- color: ${t.colors.dclRed};
411
- }
412
-
413
- /**
414
- * Informational, not a failure. Used for "your payment went through, the NAME is on its way" and for the
415
- * reason a purchase is not available yet (no price, not enough credits) — none of which is an error, and
416
- * all of which would contradict themselves rendered in the red error treatment.
417
- */
418
- &[data-tone='info'] {
419
- background: ${t.colors.panel};
420
-
421
- .ico {
422
- color: ${t.colors.accent};
423
- }
424
- }
425
- `;function In({name:i,priceCredits:r,onClose:l}){const{session:x}=Ie(),{data:h,isError:d}=rt(x),p=at(),c=Fe(),[a,f]=w.useState("confirm"),[g,u]=w.useState(""),[v,j]=w.useState(null),m=w.useRef(!1),b=g.trim().toLowerCase()===i.toLowerCase(),C=a==="completing",$=r!=null?xe(r):"—",k=r==null,T=h==null?void 0:h.credits,I=r!=null&&T!=null?r-T:0,S=I>0,A=k?n("names.priceUnavailable"):S?n("names.insufficientCredits",{credits:xe(I)}):null;w.useEffect(()=>{const y=R=>{R.key==="Escape"&&!C&&l()};document.addEventListener("keydown",y);const _=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=_}},[C,l]);async function P(){if(!(!x||!b||k||S||m.current)){m.current=!0,f("completing"),j(null);try{const y=await an({name:i,identity:x.identity,signer:x.signer});J("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:r??null,settlement:y.status}),p.invalidateQueries({queryKey:["usd-balance"]}),p.invalidateQueries({queryKey:["my-assets"]}),f(y.status==="registered"?"success":"pending")}catch(y){J(pt(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:dt(y),purchase_type:"name"}),j(y instanceof me?n("names.errorRouteCost"):(y==null?void 0:y.message)||n("names.errorGeneric")),f("error")}finally{m.current=!1}}}const B=a!=="success"&&a!=="pending",M=lt(x==null?void 0:x.providerType);return e.jsx(pn,{onClick:C?void 0:l,role:"presentation",children:e.jsxs(hn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[B&&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:C,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(F,{})," ",Y(h,d)]}),e.jsx(ie,{})]}),(a==="confirm"||a==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(oe,{children:[e.jsx(Ee,{"aria-hidden":!0,children:"@"}),e.jsxs(re,{children:[e.jsxs(ae,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(le,{children:n("names.subtitle")})]}),e.jsxs(ce,{children:[e.jsx(F,{}),$]})]}),a==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(de,{children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:v})]}),e.jsx(_e,{onClick:()=>f("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(gn,{children:[e.jsx(bn,{children:n("names.confirmTitle")}),e.jsx(yn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${An(i)}</b>`})}}),e.jsxs(wn,{children:[e.jsx(jn,{"aria-hidden":!0,children:"@"}),e.jsx(vn,{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(Cn,{children:".dcl.eth"})]})]}),A?e.jsxs(de,{"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(_e,{onClick:()=>void P(),disabled:!b||!x||k||S,children:n("names.buyCta")})]})]}),a==="completing"&&e.jsxs($n,{children:[e.jsx(kn,{src:ct,alt:"",width:56,height:56}),e.jsx(Sn,{children:M?n("names.confirming"):n("names.completing")}),e.jsxs(Tn,{children:[e.jsx(En,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(_n,{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(E,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(F,{})," ",Y(h,d)]}),e.jsx(ie,{}),e.jsxs(de,{"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(oe,{style:{marginTop:20},children:[e.jsx(Ee,{"aria-hidden":!0,children:"@"}),e.jsxs(re,{children:[e.jsxs(ae,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(le,{children:n("names.subtitle")})]}),e.jsxs(ce,{children:[e.jsx(F,{}),$]})]}),e.jsx(Re,{children:e.jsx(Me,{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(E,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(F,{})," ",Y(h,d)]}),e.jsx(ie,{}),e.jsxs(Rn,{children:[e.jsx(Mn,{"aria-hidden":!0,children:e.jsx(E,{name:"check"})}),e.jsxs(zn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(oe,{style:{marginTop:20},children:[e.jsxs(xn,{"data-testid":"name-success-tile",children:[e.jsx(fn,{src:ln,alt:"","aria-hidden":!0,width:47,height:47}),e.jsxs(mn,{children:[e.jsx("span",{"aria-hidden":!0,children:i}),e.jsx(un,{src:cn,alt:"","aria-hidden":!0,width:14,height:14})]})]}),e.jsxs(re,{children:[e.jsxs(ae,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(le,{children:n("names.subtitle")})]}),e.jsxs(ce,{children:[e.jsx(F,{}),$]})]}),e.jsxs(Re,{children:[e.jsx(Me,{onClick:()=>{l(),c("/my-items")},children:n("names.myItems")}),e.jsx(Fn,{href:L.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function An(i){return i.replace(/[&<>"']/g,r=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[r])}const Nn="https://cdn.decentraland.org/@dcl/shop/1.0.2-31061952187.commit-8d8b09e/_assets/identity-B4DXDuJP.webp",Ln="https://cdn.decentraland.org/@dcl/shop/1.0.2-31061952187.commit-8d8b09e/_assets/world-B-9aPlxu.webp",Wn="https://cdn.decentraland.org/@dcl/shop/1.0.2-31061952187.commit-8d8b09e/_assets/invite-BfwIhP2C.webp",Pn="https://cdn.decentraland.org/@dcl/shop/1.0.2-31061952187.commit-8d8b09e/_assets/governance-DnazlIjy.webp",Bn=s.div`
426
- width: 100%;
427
- min-width: 0;
428
- `,Hn=s.nav`
429
- display: flex;
430
- align-items: center;
431
- gap: 6px;
432
- margin: 4px 0 16px;
433
- font-family: ${t.font.sans};
434
- font-size: 12px;
435
- line-height: 1;
436
- color: ${t.colors.gray4};
437
- `,Un=s.button`
438
- border: 0;
439
- background: none;
440
- padding: 0;
441
- cursor: pointer;
442
- font: inherit;
443
- color: ${t.colors.gray4};
444
-
445
- &:hover {
446
- color: ${t.colors.white};
447
- text-decoration: underline;
448
- }
449
- &:focus-visible {
450
- outline: 2px solid ${t.colors.white};
451
- outline-offset: 2px;
452
- }
453
- `,On=s.span`
454
- font-weight: 700;
455
- color: ${t.colors.softWhite};
456
- `,Gn=s.div`
457
- display: flex;
458
- flex-direction: column;
459
- gap: 48px;
460
- padding-bottom: 48px;
461
- background: #ecdbfd;
462
- border-radius: ${t.radius.banner};
463
- overflow: hidden;
464
-
465
- ${t.media.maxWidth("mobile")} {
466
- gap: 32px;
467
- padding-bottom: 32px;
468
- }
469
- `,Dn=s.div`
470
- position: relative;
471
- border-radius: ${t.radius.banner};
472
- overflow: hidden;
473
- padding: 88px 48px;
474
- display: flex;
475
- flex-direction: column;
476
- align-items: center;
477
- gap: 48px;
478
- text-align: center;
479
- background: radial-gradient(120% 95% at 50% 118%, #d13bd6 0%, #a026b0 28%, #6a1b9c 58%, #4a1173 100%);
480
-
481
- ${t.media.maxWidth("mobile")} {
482
- padding: 40px 20px;
483
- gap: 28px;
484
- }
485
- `,qn=s.div`
486
- display: flex;
487
- flex-direction: column;
488
- align-items: center;
489
- gap: 12px;
490
- `,Zn=s.h1`
491
- margin: 0;
492
- font-family: ${t.font.sans};
493
- font-weight: 600;
494
- font-size: 40px;
495
- line-height: 1.167;
496
- color: ${t.colors.white};
497
-
498
- ${t.media.maxWidth("mobile")} {
499
- font-size: 26px;
500
- }
501
- `,Vn=s.p`
502
- margin: 0;
503
- max-width: 760px;
504
- font-family: ${t.font.sans};
505
- font-weight: 500;
506
- font-size: 24px;
507
- line-height: 1.334;
508
- color: #ecebed;
509
-
510
- ${t.media.maxWidth("mobile")} {
511
- font-size: 16px;
512
- }
513
- `,Kn=s.div`
514
- width: min(785px, 100%);
515
- display: flex;
516
- flex-direction: column;
517
- gap: 12px;
518
- `,Qn=s.div`
519
- position: relative;
520
- `,Jn=s("div",Vt("invalid"))`
521
- display: flex;
522
- align-items: center;
523
- gap: 8px;
524
- padding: 8px 8px 8px 16px;
525
- background: ${t.colors.softWhite};
526
- border: 1.5px solid ${({invalid:i})=>i?t.colors.dclRed:t.colors.line};
527
- border-radius: 20px;
528
-
529
- &:focus-within {
530
- border-color: ${({invalid:i})=>i?t.colors.dclRed:t.colors.magenta};
531
- }
532
-
533
- ${t.media.maxWidth("mobile")} {
534
- border-radius: 16px;
535
- }
536
- `,Xn=s.span`
537
- position: absolute;
538
- left: -9999px;
539
- top: 0;
540
- visibility: hidden;
541
- pointer-events: none;
542
- white-space: pre;
543
- font-family: ${t.font.sans};
544
- font-size: 20px;
545
- font-weight: 600;
546
- line-height: 1.6;
547
-
548
- ${t.media.maxWidth("mobile")} {
549
- font-size: 16px;
550
- }
551
- `,Yn=s.div`
552
- position: absolute;
553
- top: calc(100% + 8px);
554
- left: 0;
555
- right: 0;
556
- z-index: 2;
557
- display: flex;
558
- align-items: center;
559
- gap: 8px;
560
- padding: 8px 12px;
561
- border-radius: 8px;
562
- background: #ffcdd4;
563
- color: #ec303a;
564
- font-family: ${t.font.sans};
565
- font-size: 14px;
566
- font-weight: 500;
567
- line-height: 1.2;
568
- text-align: left;
569
-
570
- ${t.media.maxWidth("mobile")} {
571
- position: static;
572
- margin-top: 8px;
573
- align-items: flex-start;
574
- flex-wrap: wrap;
575
- }
576
- `,es=s.a`
577
- display: inline-flex;
578
- align-items: center;
579
- gap: 2px;
580
- margin-left: auto;
581
- color: #ec303a;
582
- font-weight: 600;
583
- text-decoration: underline;
584
- text-transform: uppercase;
585
- white-space: nowrap;
586
-
587
- ${t.media.maxWidth("mobile")} {
588
- margin-left: 0;
589
- }
590
- `,ts=s.label`
591
- flex: 1;
592
- min-width: 0;
593
- display: flex;
594
- align-items: center;
595
- gap: 0;
596
- cursor: text;
597
- overflow: hidden;
598
- `,ns=s.span`
599
- flex: none;
600
- margin-right: 8px;
601
- font-family: ${t.font.sans};
602
- font-size: 26px;
603
- font-weight: 500;
604
- line-height: 1;
605
- color: ${t.colors.muted2};
606
-
607
- ${t.media.maxWidth("mobile")} {
608
- font-size: 20px;
609
- }
610
- `,ss=s.input`
611
- flex: 0 1 auto;
612
- min-width: 0;
613
- max-width: 100%;
614
- border: 0;
615
- outline: none;
616
- background: transparent;
617
- font-family: ${t.font.sans};
618
- font-size: 20px;
619
- font-weight: 600;
620
- line-height: 1.6;
621
- color: ${t.colors.text};
622
- padding: 0;
623
-
624
- &::placeholder {
625
- color: ${t.colors.muted1};
626
- font-weight: 400;
627
- }
628
-
629
- ${t.media.maxWidth("mobile")} {
630
- font-size: 16px;
631
- }
632
- `,is=s.span`
633
- flex: none;
634
- margin-left: 2px;
635
- /* Not selectable: it is the fixed part of the address, not something the reader typed. */
636
- user-select: none;
637
- -webkit-user-select: none;
638
- font-family: ${t.font.sans};
639
- font-size: 20px;
640
- font-weight: 400;
641
- line-height: 1.6;
642
- color: ${t.colors.muted1};
643
-
644
- ${t.media.maxWidth("mobile")} {
645
- font-size: 16px;
646
- }
647
- `,os=s.span`
648
- flex: none;
649
- font-family: ${t.font.sans};
650
- font-size: 13px;
651
- color: ${t.colors.muted2};
652
- white-space: nowrap;
653
- `,Pe=s.button`
654
- flex: none;
655
- display: inline-flex;
656
- align-items: center;
657
- justify-content: center;
658
- gap: 8px;
659
- height: 52px;
660
- padding: 0 24px;
661
- border: 0;
662
- border-radius: 12px;
663
- cursor: pointer;
664
- background: ${t.gradients.cerise};
665
- color: ${t.colors.softWhite};
666
- font-family: ${t.font.sans};
667
- font-weight: 600;
668
- font-size: 15px;
669
- letter-spacing: 0.46px;
670
- line-height: 24px;
671
- text-transform: uppercase;
672
-
673
- &:hover:not(:disabled) {
674
- filter: brightness(1.05);
675
- }
676
- &:focus-visible {
677
- outline: 2px solid ${t.colors.white};
678
- outline-offset: 2px;
679
- }
680
- &:disabled {
681
- cursor: not-allowed;
682
- background: #e7c8e9;
683
- color: #fbe9fb;
684
- }
685
-
686
- ${t.media.maxWidth("mobile")} {
687
- display: none;
688
- }
689
- `,rs=s(Pe)`
690
- display: none;
691
-
692
- ${t.media.maxWidth("mobile")} {
693
- display: inline-flex;
694
- width: 100%;
695
- height: 48px;
696
- border-radius: 12px;
697
- }
698
- `,as=s.span`
699
- display: inline-flex;
700
- align-items: center;
701
- gap: 4px;
702
- font-weight: 600;
703
-
704
- .ico {
705
- width: 16px;
706
- height: 16px;
707
- }
708
- `,ls=s.div`
709
- display: flex;
710
- align-items: center;
711
- gap: 8px;
712
- padding: 8px 14px;
713
- border-radius: 8px;
714
- font-family: ${t.font.sans};
715
- font-size: 13px;
716
- font-weight: 500;
717
- text-align: left;
718
-
719
- background: ${({tone:i})=>i==="error"?"rgba(255, 45, 85, 0.12)":i==="ok"?"rgba(30, 166, 114, 0.14)":"rgba(255,255,255,0.14)"};
720
- color: ${({tone:i})=>i==="error"?t.colors.dclRed:i==="ok"?"#0f7a4f":"#ecebed"};
721
-
722
- .ico {
723
- width: 16px;
724
- height: 16px;
725
- flex: none;
726
- }
727
- `,pe=s(ls)`
728
- position: absolute;
729
- top: calc(100% + 8px);
730
- left: 0;
731
- right: 0;
732
- z-index: 2;
733
-
734
- /* Static on mobile, as TakenBanner is: the claim button sits below InputWrap there, so anything
735
- floating out of the input lands on top of it. */
736
- ${t.media.maxWidth("mobile")} {
737
- position: static;
738
- margin-top: 8px;
739
- }
740
- `,cs=s.section`
741
- display: flex;
742
- flex-direction: column;
743
- gap: 48px;
744
- padding: 0 48px;
745
-
746
- ${t.media.maxWidth("mobile")} {
747
- gap: 32px;
748
- padding: 0 20px;
749
- }
750
- `,ds=s.div`
751
- display: flex;
752
- flex-direction: column;
753
- align-items: center;
754
- gap: 24px;
755
- `,ps=s.h2`
756
- margin: 0;
757
- text-align: center;
758
- font-family: ${t.font.sans};
759
- font-weight: 600;
760
- font-size: 32px;
761
- line-height: 1.167;
762
- color: ${t.colors.text2};
763
-
764
- ${t.media.maxWidth("mobile")} {
765
- font-size: 22px;
766
- }
767
- `,hs=s.p`
768
- margin: 0;
769
- max-width: 907px;
770
- text-align: center;
771
- font-family: ${t.font.sans};
772
- font-weight: 400;
773
- font-size: 20px;
774
- line-height: 1.57;
775
- color: ${t.colors.text};
776
-
777
- ${t.media.maxWidth("mobile")} {
778
- font-size: 16px;
779
- }
780
- `,xs=s.div`
781
- display: grid;
782
- grid-template-columns: repeat(4, 1fr);
783
- gap: 24px;
784
- align-items: stretch;
785
-
786
- ${t.media.maxWidth("lg")} {
787
- grid-template-columns: repeat(2, 1fr);
788
- }
789
- ${t.media.maxWidth("mobile")} {
790
- grid-template-columns: 1fr;
791
- }
792
- `,q=s.article`
793
- min-width: 0;
794
- display: flex;
795
- flex-direction: column;
796
- background: ${t.colors.white};
797
- box-shadow: 0 0 0 0.25px ${t.colors.muted2};
798
- border-radius: ${t.radius.card};
799
- overflow: hidden;
800
-
801
- /* Forced colours drop decorative shadows. Outline rather than border: it survives there and, like the
802
- shadow, takes no layout, so the artwork still reaches the corner. */
803
- @media (forced-colors: active) {
804
- outline: 1px solid CanvasText;
805
- }
806
- `,Z=s.img`
807
- display: block;
808
- width: 100%;
809
- aspect-ratio: 388 / 235;
810
- object-fit: cover;
811
- `,V=s.div`
812
- flex: 1;
813
- display: flex;
814
- flex-direction: column;
815
- gap: 6px;
816
- padding: 12px 16px;
817
- `,K=s.h3`
818
- margin: 0;
819
- font-family: ${t.font.sans};
820
- font-weight: 700;
821
- font-size: 20px;
822
- line-height: 1.57;
823
- text-transform: uppercase;
824
- color: ${t.colors.text};
825
- `,Q=s.p`
826
- margin: 0;
827
- font-family: ${t.font.sans};
828
- font-weight: 400;
829
- font-size: 14px;
830
- line-height: 1.57;
831
- color: ${t.colors.text};
832
- `,fs=s.span`
833
- font-weight: 600;
834
- color: ${t.colors.accent};
835
- `,ze=s.a`
836
- display: inline-flex;
837
- align-items: center;
838
- gap: 2px;
839
- margin-top: auto;
840
- font-family: ${t.font.sans};
841
- font-weight: 500;
842
- font-size: 14px;
843
- line-height: 30px;
844
- color: ${t.colors.accent};
845
- text-decoration: underline;
846
-
847
- &:focus-visible {
848
- outline: 2px solid ${t.colors.accent};
849
- outline-offset: 2px;
850
- }
851
-
852
- .ico {
853
- width: 13px;
854
- height: 13px;
855
- }
856
- `,ms=s.span`
857
- position: absolute;
858
- width: 1px;
859
- height: 1px;
860
- padding: 0;
861
- margin: -1px;
862
- overflow: hidden;
863
- clip: rect(0, 0, 0, 0);
864
- white-space: nowrap;
865
- border: 0;
866
- `,us="https://docs.decentraland.org/creator/worlds/about/",gs="https://governance.decentraland.org";function bs(i){const r=typeof window<"u"?window.location.hostname:"";return`${r.endsWith("decentraland.org")?"https://decentraland.org":r.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(i)}`}function ys({onBack:i}){Ae({title:n("seo.names.title"),description:n("seo.names.description")});const{session:r,signIn:l}=Ie(),{data:x}=Ne(),h=x?Le(W,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(!Se(d).ok){a(d.length===0?"idle":"invalid");return}a("checking");const T=new AbortController,I=setTimeout(()=>{(async()=>{try{const S=await en(d,{signal:T.signal});a(S)}catch(S){if((S==null?void 0:S.name)==="AbortError")return;a("error")}})()},400);return()=>{clearTimeout(I),T.abort()}},[d]);const m=Se(d),b=m.ok&&(c==="available"||c==="error");function C(){if(b){if(!r){l();return}g(!0)}}const $=e.jsxs(e.Fragment,{children:[n("names.claim"),h!=null?e.jsxs(as,{children:[e.jsx(F,{}),xe(h)]}):null]});return e.jsxs(Bn,{"data-testid":"names-page",children:[e.jsxs(Hn,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Un,{onClick:i,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(On,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(Gn,{children:[e.jsxs(Dn,{children:[e.jsxs(qn,{children:[e.jsx(Zn,{children:n("names.heroTitle")}),e.jsx(Vn,{children:n("names.heroSubtitle")})]}),e.jsxs(Kn,{children:[e.jsxs(Qn,{"data-testid":"names-input-wrap",children:[e.jsxs(Jn,{invalid:c==="taken",children:[e.jsxs(ts,{children:[e.jsx(ns,{"aria-hidden":!0,children:"@"}),e.jsx(ss,{value:d,onChange:k=>p(Jt(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(Xn,{ref:u,"aria-hidden":!0,children:d||n("names.inputPlaceholder")}),e.jsx(is,{children:n("names.suffix")})]}),d.length>0?e.jsxs(os,{"aria-hidden":!0,children:[d.length,"/",X]}):null,e.jsx(Pe,{onClick:C,disabled:!b,"data-testid":"names-claim",children:$})]}),c==="taken"?e.jsxs(Yn,{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(es,{href:bs(d),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(pe,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):c==="error"?e.jsx(pe,{tone:"muted",role:"status",children:n("names.checkError")}):c==="invalid"&&!m.ok&&m.reason==="too-short"?e.jsx(pe,{tone:"muted",role:"status",children:n("names.tooShort",{min:We})}):null]}),e.jsx(rs,{onClick:C,disabled:!b,children:$}),e.jsx(ms,{role:"status","aria-live":"polite",children:c==="available"?n("names.available",{name:d}):""})]})]}),e.jsxs(cs,{children:[e.jsxs(ds,{children:[e.jsx(ps,{children:n("names.whyTitle")}),e.jsx(hs,{children:n("names.whyIntro")})]}),e.jsxs(xs,{children:[e.jsxs(q,{children:[e.jsx(Z,{src:Nn,alt:""}),e.jsxs(V,{children:[e.jsx(K,{children:n("names.why1Title")}),e.jsx(Q,{children:n("names.why1")})]})]}),e.jsxs(q,{children:[e.jsx(Z,{src:Ln,alt:""}),e.jsxs(V,{children:[e.jsx(K,{children:n("names.why2Title")}),e.jsxs(Q,{children:[n("names.why2")," ",e.jsx(fs,{children:n("names.why2Address")})]}),e.jsxs(ze,{href:us,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(E,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(q,{children:[e.jsx(Z,{src:Wn,alt:""}),e.jsxs(V,{children:[e.jsx(K,{children:n("names.why3Title")}),e.jsx(Q,{children:n("names.why3")})]})]}),e.jsxs(q,{children:[e.jsx(Z,{src:Pn,alt:""}),e.jsxs(V,{children:[e.jsx(K,{children:n("names.why4Title")}),e.jsx(Q,{children:n("names.why4")}),e.jsxs(ze,{href:gs,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(E,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),f?e.jsx(In,{name:d,priceCredits:h,onClose:()=>g(!1)}):null]})}const ws="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",he=48,js=["all","on_sale","not_for_sale"];function Us(){const[i]=Ke(),r=Fe(),l=(i.get("q")??"").trim().toLowerCase(),x=(i.get("q")??"").trim();Ae({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]=Qe(h),{subCategory:c,rarities:a,priceMin:f,priceMax:g,smart:u,sort:v}=d,j=d.category,m=js.includes(d.status)?d.status:"on_sale";Je(`${j}:${c??""}`);const[b,C]=w.useState(!1);w.useEffect(()=>{if(!b)return;const o=O=>{O.key==="Escape"&&C(!1)};document.addEventListener("keydown",o);const z=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",o),document.body.style.overflow=z}},[b]);const $=m==="on_sale",k=f&&!Number.isNaN(Number(f))?Number(f):void 0,T=g&&!Number.isNaN(Number(g))?Number(g):void 0,I=ht(),S=c?et[c]:void 0,A=($e.find(o=>o.key===v)??$e[0]).server,P={category:j,rarities:a.length?a:void 0,wearableCategories:S,minPriceCredits:k,maxPriceCredits:T,search:l||void 0,sortBy:A,isSmart:u||void 0,onSale:!0,listingType:I?void 0:"primary"},B={category:j,rarities:a.length?a:void 0,wearableCategories:S,search:l||void 0,sortBy:A,isWearableSmart:u||void 0,isOnSale:m==="not_for_sale"?!1:void 0},{items:M,total:y,isLoading:_,isPlaceholderData:R,error:ue,hasNextPage:Be,isFetchingNextPage:ge,isFetchNextPageError:He,fetchNextPage:Ue}=Nt($?["shop-items",P]:["catalog-items",B],o=>$?ft({...P,first:he,skip:o}):mt({...B,first:he,skip:o}),{enabled:j!=="names"}),H=y,{data:be,isError:Oe,isPending:Ge}=Ne(),De=o=>be&&o.manaWei?Le(o.manaWei,be):null,qe=$&&Ge&&M.some(o=>o.source==="legacy"),ye=_||R||qe,Ze=_?15:Math.min(Math.max(M.length,1),he),we=w.useRef(null);w.useEffect(()=>{_||R||!l||we.current===l||(we.current=l,J("Shop Searched",{query:l,result_count:H}))},[l,_,R,H]);const U=w.useRef("__init__");w.useEffect(()=>{if(_||R)return;const o=JSON.stringify({category:j,subCategory:c,rarities:a,min:k,max:T,sort:v,status:m,smart:u});if(U.current==="__init__"||U.current===o){U.current=o;return}U.current=o,J("Shop Applied Filter",{filters:{category:j,sub_category:c,rarities:a,min_price_credits:k??null,max_price_credits:T??null,status:m,smart:u,sort:v},result_count:H})},[j,c,a,k,T,v,m,u,_,R,H]);function je(o){p({category:o,subCategory:null})}function ve(o){p({status:o})}function Ce(o){p({rarities:a.includes(o)?a.filter(z=>z!==o):[...a,o]})}function Ve(){p(h)}const N=[];(k!=null||T!=null)&&N.push({key:"price",label:n("filter.price"),onRemove:()=>{p({priceMin:"",priceMax:""})}});for(const o of Xe)a.includes(o)&&N.push({key:`rarity-${o}`,label:xt(o),onRemove:()=>Ce(o)});return u&&N.push({key:"smart",label:n("filter.smart"),onRemove:()=>p({smart:!1})}),m!=="on_sale"&&N.push({key:"status",label:m==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>ve("on_sale")}),e.jsxs(ut,{"data-testid":"browse",children:[j!=="names"&&e.jsxs(e.Fragment,{children:[b?e.jsx(gt,{onClick:()=>C(!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:()=>C(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(vt,{children:e.jsx(Ct,{category:j,subCategory:c,onCategory:je,onSub:o=>p({subCategory:o}),priceMin:f,priceMax:g,onPriceMin:o=>p({priceMin:o}),onPriceMax:o=>p({priceMax:o}),rarities:a,onToggleRarity:Ce,status:m,onStatus:ve,smart:u,onSmart:o=>p({smart:o})})}),e.jsx($t,{children:e.jsx(kt,{type:"button",onClick:()=>C(!1),children:n("assets.showItems")})})]})]}),e.jsx(St,{children:j==="names"?e.jsx(ys,{onBack:()=>je("all")}):e.jsxs(e.Fragment,{children:[e.jsx(Ye,{sort:v,onSort:o=>p({sort:o}),total:y,loading:_||R,query:l,onOpenFilters:()=>C(!0),chips:N,onClearChips:Ve}),Oe&&$&&M.some(o=>o.source==="legacy")?e.jsx(Tt,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,ue?e.jsx(Lt,{message:n("assets.loadError"),testId:"browse-error"}):null,!ye&&M.length===0&&!ue?e.jsxs(Et,{"data-testid":"browse-empty",children:[e.jsx(_t,{src:ws,alt:""}),e.jsxs(Rt,{children:[e.jsx(Mt,{children:n("assets.empty.title")}),e.jsx(zt,{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(Ft,{children:e.jsx(It,{type:"button",onClick:()=>r("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Kt,{"data-testid":"grid",children:ye?e.jsx(ke,{count:Ze}):e.jsxs(e.Fragment,{children:[M.map(o=>{if(!$)return e.jsx(G,{item:o,mode:"view"},D(o));const z=o;if(z.source!=="legacy")return e.jsx(G,{item:o},D(o));const O=De(z);return O==null?e.jsx(G,{item:o,mode:"view"},D(o)):e.jsx(G,{item:{...z,priceCredits:O}},D(o))}),ge?e.jsx(ke,{count:6}):null]})}),e.jsx(At,{hasNextPage:Be,isFetching:ge,isError:He,onLoadMore:()=>void Ue()})]})]})})]})}export{Us as Assets};