@dcl/shop 0.1.0-30043940031.commit-1a0b88f → 0.1.0-30098548645.commit-d41f1c2

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 (244) hide show
  1. package/assets/Activity-BqXTjVty.js +244 -0
  2. package/assets/{AnimatedBackground-DKAviRVb.js → AnimatedBackground-B1wSbdZF.js} +3 -3
  3. package/assets/{Assets-CbIX010b.js → Assets-uNZ9-jka.js} +11 -11
  4. package/assets/{Assets.styles-C5zpZCUK.js → Assets.styles-C-xsD5dl.js} +6 -6
  5. package/assets/Authorizations-W1UUdrPD.js +175 -0
  6. package/assets/Cart-Blw7vVhV.js +3 -0
  7. package/assets/{CircularProgress-CeVjKviE.js → CircularProgress-BFfCy1Hd.js} +1 -1
  8. package/assets/{Collection-CdFvuhxV.js → Collection-DQPRvrkF.js} +2 -2
  9. package/assets/CollectionCarousel-D2Bi7Sgm.js +1 -0
  10. package/assets/{ConstantsUtil-CJUlyS7R.js → ConstantsUtil-DamObtDN.js} +1 -1
  11. package/assets/{ContentClient-DtuNqgIp.js → ContentClient-JBAwNjZ1.js} +1 -1
  12. package/assets/Creator-DPwgF8OQ.js +1 -0
  13. package/assets/{CssVarsProvider-B0QPJ9UY.js → CssVarsProvider-Cp4XcbYa.js} +3 -3
  14. package/assets/{DeploymentBuilder-Bt5zjBVh.js → DeploymentBuilder-Ch1YSyjd.js} +1 -1
  15. package/assets/{ErrorNotice-C7soUjRV.js → ErrorNotice-Cmr8aXJs.js} +1 -1
  16. package/assets/{ExchangeController-aeqEXROB.js → ExchangeController-DdMMOoWf.js} +1 -1
  17. package/assets/GetCredits-BbXMUpEL.js +1 -0
  18. package/assets/{HelpersUtil-fELrO7Xi.js → HelpersUtil-CQPNVThh.js} +1 -1
  19. package/assets/ImportListings-DvBSRPqC.js +5 -0
  20. package/assets/ItemDetail--8GO0Wno.css +1 -0
  21. package/assets/ItemDetail-CVK9Pwv2.js +1437 -0
  22. package/assets/{LoadMore-CHlPzPXC.js → LoadMore-Co82ACWq.js} +1 -1
  23. package/assets/{MarketCheckout-dyTQT0v3.js → MarketCheckout-CXF5RWuK.js} +1 -1
  24. package/assets/MyAssets-BPoXrFd-.js +258 -0
  25. package/assets/{MyFavorites-B7HUqvEe.js → MyFavorites-BLOtKEJq.js} +1 -1
  26. package/assets/{NetworkUtil-Xp0fNa8X.js → NetworkUtil-xdrSr8Td.js} +1 -1
  27. package/assets/{NotFound-DgN5Ojh9.js → NotFound-B-Y9Dm45.js} +1 -1
  28. package/assets/PrimaryListModal-cAIZGy2D.js +320 -0
  29. package/assets/{StoreSettings-Bx7T9d4h.js → StoreSettings-Bos_AZlO.js} +3 -3
  30. package/assets/{StoreSettings-Bk5IXwNu.css → StoreSettings-qz4M138c.css} +1 -1
  31. package/assets/{Success-B45Qtg3D.js → Success-DNHF9FcH.js} +1 -1
  32. package/assets/{SwapController-qtGuRSFp.js → SwapController-Bk4YDtlv.js} +1 -1
  33. package/assets/{Tooltip-BjVKL7Fw.js → Tooltip-CMiyDsYT.js} +1 -1
  34. package/assets/{TradeService-DWfELVYz.js → TradeService-B-E0tJaw.js} +1 -1
  35. package/assets/{W3MFrameProviderSingleton-BYvOktGz.js → W3MFrameProviderSingleton-B4WegxTX.js} +3 -3
  36. package/assets/{WebCryptoP256-BaA8puph.js → WebCryptoP256-CIN8LP5I.js} +1 -1
  37. package/assets/authorizations-xecfPSH8.js +1 -0
  38. package/assets/{basic-Ceg7-rw5.js → basic-DrYgU33R.js} +1 -1
  39. package/assets/{biconomy-dWuJAVG6.js → biconomy-BkGZoSRG.js} +1 -1
  40. package/assets/{browser-9oFjBwrz.js → browser-EKOgZpqm.js} +1 -1
  41. package/assets/browser-ponyfill-CjkfloA2.js +1 -0
  42. package/assets/{browser-ponyfill-DMgE6PM5.js → browser-ponyfill-sXwzu6Qj.js} +1 -1
  43. package/assets/builder-CdMpbqLu.js +1 -0
  44. package/assets/buy-DnDBBIJp.js +1 -0
  45. package/assets/{buy-gasless-C7VsNrLp.js → buy-gasless-DITQks7J.js} +1 -1
  46. package/assets/{cart-checkout-QeMYLp4l.js → cart-checkout-DldS-zcM.js} +1 -1
  47. package/assets/{categories-DDZgtl6y.js → categories-q4cmLb4w.js} +5 -5
  48. package/assets/{ccip-D1vE27l0.js → ccip-6xULYkiQ.js} +1 -1
  49. package/assets/{ccip-O9QIlP6E.js → ccip-Iagv6b6U.js} +1 -1
  50. package/assets/{chains-Bzau33xB.js → chains-Ce3mOHm7.js} +1 -1
  51. package/assets/collection-9XqBYepL.js +1 -0
  52. package/assets/{common-BaN-pXG4.js → common-D_VcNXlU.js} +1 -1
  53. package/assets/{controller-BDtPSPmx.js → controller-CGXADiD7.js} +2 -2
  54. package/assets/{core-LjTvFg1D.js → core-ClJQ0SHg.js} +4 -4
  55. package/assets/{custom-COtXL8aP.js → custom-CRZtbdh1.js} +1 -1
  56. package/assets/{data-capture-CXZOXZ6B.js → data-capture-Brtecicz.js} +1 -1
  57. package/assets/decimals-Br2WcHKo.js +1 -0
  58. package/assets/{decimals-DaU_ek4_.js → decimals-DIRnQ_Ef.js} +1 -1
  59. package/assets/{detectExtension-C2ped1rb.js → detectExtension-DBVDFtUM.js} +1 -1
  60. package/assets/{email-BS7ZREiA.js → email-Dc521KI9.js} +1 -1
  61. package/assets/{embedded-wallet-CWaQUjgL.js → embedded-wallet-qO37cv4b.js} +1 -1
  62. package/assets/{emotion-styled.browser.esm-c2FFx3DR.js → emotion-styled.browser.esm-CdNioFJM.js} +1 -1
  63. package/assets/{engine-bGCn900B.js → engine-C38d94-_.js} +1 -1
  64. package/assets/{errors-D2EYBG38.js → errors-BHedmHUe.js} +1 -1
  65. package/assets/estimate-l1-fee-BIFy_-EC.js +1 -0
  66. package/assets/eth_estimateGas-DhEvfMK1.js +1 -0
  67. package/assets/{eth_getStorageAt-CvOhghFe.js → eth_getStorageAt-C5DWgtYS.js} +1 -1
  68. package/assets/eth_getTransactionCount-CYnx77q9.js +1 -0
  69. package/assets/{ethereum-B_IIMsg0.js → ethereum-C11g7mpZ.js} +1 -1
  70. package/assets/{ethers-w5dOkonM.js → ethers-BJDbBwOP.js} +1 -1
  71. package/assets/{execute-DySDEvjB.js → execute-CxvgrSL8.js} +2 -2
  72. package/assets/{extractIPFS-mhjpSq1K.js → extractIPFS-CvNdY0iH.js} +1 -1
  73. package/assets/{features-DLc5WZYN.js → features-CLCrkR7s.js} +1 -1
  74. package/assets/{fetchTokenMetadata-C9wYmfXl.js → fetchTokenMetadata-ChVieTUE.js} +2 -2
  75. package/assets/{fortmatic-DhmlcDbL.js → fortmatic-bc1cz1bJ.js} +1 -1
  76. package/assets/{get-bytecode-D38h1G96.js → get-bytecode-B9DXJUIQ.js} +1 -1
  77. package/assets/get-ecosystem-wallet-info-zShJZuFf.js +1 -0
  78. package/assets/{getBalance-j6TTPwxJ.js → getBalance-D426yGLP.js} +2 -2
  79. package/assets/{getInstalledModules-3Q5HYxkN.js → getInstalledModules-_oxiIuvc.js} +1 -1
  80. package/assets/getNFT-DDdhWmh5.js +1 -0
  81. package/assets/{getNFT-BJKaB30S.js → getNFT-DbYpgeGV.js} +2 -2
  82. package/assets/{getOverlayAlpha-Dgr3elr3.js → getOverlayAlpha-DF26uj8z.js} +1 -1
  83. package/assets/{hashTypedData-C3LWcJNr.js → hashTypedData-DBErsqac.js} +1 -1
  84. package/assets/{hashTypedData-B3ueg2tO.js → hashTypedData-ZQ4gFkel.js} +1 -1
  85. package/assets/{import-CT__rglP.js → import-ZCCl3Kgl.js} +1 -1
  86. package/assets/{in-app-eO_XP67Y.js → in-app-CpdkUQeY.js} +1 -1
  87. package/assets/{in-app-wallet-calls-CaxSZMND.js → in-app-wallet-calls-dlczJBmg.js} +1 -1
  88. package/assets/index-B-GW8Cic.js +1 -0
  89. package/assets/{index-LLNcsqnt.js → index-BCFHpbdv.js} +1 -1
  90. package/assets/{index-D7KDT9M9.js → index-BH2TijWz.js} +1 -1
  91. package/assets/{index-CqYbCFw1.js → index-BJ8Gi1m8.js} +1 -1
  92. package/assets/{index-BfnFZQqu.js → index-BKypSXDA.js} +1 -1
  93. package/assets/{index-BNz2c_gH.js → index-BPE4c8Hm.js} +1 -1
  94. package/assets/{index-DTVGIjcC.js → index-BTEpBP4F.js} +1 -1
  95. package/assets/{index-Bt4sSx0j.js → index-BUxPYCpI.js} +1 -1
  96. package/assets/{index-Chf28tkX.js → index-BYL4Amcw.js} +1 -1
  97. package/assets/{index-BLif3fcT.js → index-Be_wjnpZ.js} +1 -1
  98. package/assets/{index-D-DOtIYj.js → index-BfgxxLyc.js} +1 -1
  99. package/assets/{index-I60bR1z0.js → index-BmClkpNO.js} +1 -1
  100. package/assets/{index-B7mff2o2.js → index-BoQpPvsJ.js} +3 -3
  101. package/assets/{index-BLHU8DgF.js → index-BpsxTpFt.js} +1 -1
  102. package/assets/{index-CoBli9XK.js → index-BqBeehVu.js} +1 -1
  103. package/assets/{index-D2Lec10t.js → index-BwP2pQ92.js} +1 -1
  104. package/assets/{index-Dp3Py-Ws.js → index-C1J0uyJU.js} +1 -1
  105. package/assets/{index-C6h_WU9m.js → index-C8X5uQxK.js} +1 -1
  106. package/assets/{index-B6KO-WXc.js → index-C8gW1uS_.js} +1 -1
  107. package/assets/{index-lVvjFIjk.js → index-CBz9QBMp.js} +1 -1
  108. package/assets/{index-BcatoSfw.js → index-CIVsEPCC.js} +1 -1
  109. package/assets/{index-BR4zrdA9.js → index-CO8EAj61.js} +2 -2
  110. package/assets/index-CUtMWqIp.css +1 -0
  111. package/assets/{index-Ck1Cgm82.js → index-C_3MXGQ5.js} +1 -1
  112. package/assets/{index-UvWrbkyR.js → index-C_96F6p3.js} +1 -1
  113. package/assets/{index-dVV4LZRn.js → index-Cf3Ptwp7.js} +1 -1
  114. package/assets/{index-FmAwtPUy.js → index-CmFvRPK_.js} +1 -1
  115. package/assets/{index-BzQBX2p-.js → index-CnNzrERF.js} +1 -1
  116. package/assets/{index-CI_Eucnr.js → index-CtyVceSL.js} +3 -3
  117. package/assets/{index-BgEzTrtV.js → index-CwuYCSTt.js} +1 -1
  118. package/assets/{index-DRB-gQiu.js → index-D0UaCvc1.js} +1 -1
  119. package/assets/{index-BLLuYu72.js → index-D9WRMnJQ.js} +1 -1
  120. package/assets/{index-D84f1SZS.js → index-DCT6sOxM.js} +1 -1
  121. package/assets/{index-CSlkMlP4.js → index-DHqnjZXk.js} +1 -1
  122. package/assets/{index-Bk6ayCIs.js → index-DL1-u2m5.js} +1 -1
  123. package/assets/{index-DQ1f3JN6.js → index-DTFks6GD.js} +1 -1
  124. package/assets/{index-BTO-tMff.js → index-DTSWcrXA.js} +1 -1
  125. package/assets/{index-BCdiIcLt.js → index-DUHukso9.js} +1 -1
  126. package/assets/{index-DPeNzqnx.js → index-DWo6WByw.js} +1 -1
  127. package/assets/{index-QTjwITlm.js → index-DXsS9lM4.js} +1 -1
  128. package/assets/{index-D4SQVwZS.js → index-DZWZ4ZjC.js} +3 -3
  129. package/assets/{index-DtCbj4Bu.js → index-DjNqY58Q.js} +1 -1
  130. package/assets/{index-ahfZZDfz.js → index-DkV39niV.js} +2 -2
  131. package/assets/{index-yeRgwVVL.js → index-Dkdo-C-7.js} +2 -2
  132. package/assets/{index-DGOaB47n.js → index-DsEcY3jS.js} +1 -1
  133. package/assets/{index-Cfbe2Qvo.js → index-DsmEu83d.js} +2 -2
  134. package/assets/{index-CPhNis9E.js → index-Dum_hwGS.js} +1 -1
  135. package/assets/{index-BgKrxOfP.js → index-Dw9WIdKs.js} +1 -1
  136. package/assets/{index-B7P0UO1e.js → index-Dz6EILW5.js} +1 -1
  137. package/assets/{index-Bi7dtaTz.js → index-FfFqAJ3l.js} +1 -1
  138. package/assets/{index-DDk8aurE.js → index-GYAvpxvp.js} +1 -1
  139. package/assets/{index-6eUPFQAl.js → index-GctTWB_u.js} +1 -1
  140. package/assets/{index-BbfDA6Q2.js → index-Ix0aAVOz.js} +1 -1
  141. package/assets/{index-DFwKLiGe.js → index-LwWUxbJ1.js} +1 -1
  142. package/assets/index-N282EqWL.js +289 -0
  143. package/assets/{index-DhuOONXr.js → index-PtVfNA02.js} +1 -1
  144. package/assets/{index-DSY1kJ-n.js → index-SeXxQE7d.js} +1 -1
  145. package/assets/{index-QMzB_9kT.js → index-cm1yskAO.js} +1 -1
  146. package/assets/{index-CLZOJwm_.js → index-dOPjS08E.js} +3 -3
  147. package/assets/{index-DnjriEQ8.js → index-dc-VQ6_u.js} +1 -1
  148. package/assets/{index-F4KCRFXO.js → index-ej1HeaVq.js} +1 -1
  149. package/assets/{index-RYFuERlG.js → index-hSbfPxTM.js} +1 -1
  150. package/assets/{index-BAbZ1oMa.js → index-oDGz3alu.js} +1 -1
  151. package/assets/{index-CoY6w5ve.js → index-uRCNAkhD.js} +1 -1
  152. package/assets/{index-DTEyrFW2.js → index-xEDt5tK0.js} +2 -2
  153. package/assets/{index.es-DcggvVah.js → index.es-8l4m8O48.js} +1 -1
  154. package/assets/{index.es-pkeG3qQo.js → index.es-BAkCd3hx.js} +4 -4
  155. package/assets/{index.es-BxDkRG0j.js → index.es-mQdmYoWw.js} +1 -1
  156. package/assets/{linkAccount-e50lqdUE.js → linkAccount-Dt1RoiMg.js} +1 -1
  157. package/assets/{localBatchGatewayRequest-B7VW_3F8.js → localBatchGatewayRequest-C-QF008k.js} +1 -1
  158. package/assets/{mana-rate-Ez6IlT0x.js → mana-rate-B5qogWAy.js} +1 -1
  159. package/assets/{native-BMBZUPnx.js → native-8psXkTNV.js} +1 -1
  160. package/assets/{networks-CuAkQzro.js → networks-DTf6JA_i.js} +1 -1
  161. package/assets/{onramp-C5uxESKn.js → onramp-C6_Jmv_4.js} +1 -1
  162. package/assets/{openzeppelin-CEEpXs6H.js → openzeppelin-BI3jzvYe.js} +1 -1
  163. package/assets/{ownerOf-dLmWQ3QZ.js → ownerOf-CGV4XkwU.js} +1 -1
  164. package/assets/{parseNft-CjnCetmp.js → parseNft-BJiElQOd.js} +2 -2
  165. package/assets/{parseSignature-CjHHoeVW.js → parseSignature-BTArmdp-.js} +1 -1
  166. package/assets/{parseSignature-Ba1mhqh5.js → parseSignature-YsYfChHW.js} +3 -3
  167. package/assets/{passkeys-DKJW-FEa.js → passkeys-ClpAr2XQ.js} +1 -1
  168. package/assets/{pay-with-exchange-yOexVTa_.js → pay-with-exchange-BrMLcJvy.js} +1 -1
  169. package/assets/{prepare-contract-call-aT1l2NVg.js → prepare-contract-call-CWZtwOpY.js} +1 -1
  170. package/assets/{qr-overlay-CurN-_cO.js → qr-overlay-DFoBAvax.js} +3 -3
  171. package/assets/{react-C51i12iP.js → react-BXazHbBy.js} +1 -1
  172. package/assets/{receive-Bvf5SspN.js → receive-2v3kqZfq.js} +1 -1
  173. package/assets/{resolveImplementation-BMaNFS8w.js → resolveImplementation-Cz7jydx-.js} +1 -1
  174. package/assets/{rpc-Bclh4OVX.js → rpc-DcYX9vLT.js} +1 -1
  175. package/assets/{secp256k1-B7PtKdKr.js → secp256k1-CRO1xSNd.js} +1 -1
  176. package/assets/{secp256k1-BznDUTmG.js → secp256k1-D0kj9oiG.js} +1 -1
  177. package/assets/{secp256k1---Cfb5Gr.js → secp256k1-Du_5cnvk.js} +1 -1
  178. package/assets/{send-BxN6VGCE.js → send-EHrmCt5p.js} +1 -1
  179. package/assets/{send-batch-transaction-BY7yHkGa.js → send-batch-transaction-DrLYa7mf.js} +1 -1
  180. package/assets/{send-eip712-transaction-RXT3aSSm.js → send-eip712-transaction-DWQC0CYI.js} +2 -2
  181. package/assets/send-gasless-transaction-DraXgpfw.js +2 -0
  182. package/assets/{send-transaction-BvCcEvFd.js → send-transaction-Di96Go1T.js} +2 -2
  183. package/assets/{sendRawTransaction-BJZ0BEjt.js → sendRawTransaction-CzOwT9zB.js} +3 -3
  184. package/assets/{sentry-DKBoGDXH.js → sentry-CLqlZ0dX.js} +1 -1
  185. package/assets/{serializeTransaction-CRJP65Ad.js → serializeTransaction-BVfMAhW_.js} +1 -1
  186. package/assets/{session-proposal-Dvj-F2wQ.js → session-proposal-DQbScMFK.js} +1 -1
  187. package/assets/{session-request-Ce-DwiYu.js → session-request-BSJWiNx1.js} +2 -2
  188. package/assets/{sha256-BcAs0Y4r.js → sha256-CHkDhyAO.js} +1 -1
  189. package/assets/{signing-BCzW8Yh4.js → signing-BTj_vr30.js} +3 -3
  190. package/assets/{socials-2qO6GWvx.js → socials-Ca0m8Bc6.js} +1 -1
  191. package/assets/{swaps-Byx37cWK.js → swaps-Bxufbu_7.js} +1 -1
  192. package/assets/{thirdweb-Bzinkygh.js → thirdweb-BSXHM0bk.js} +3 -3
  193. package/assets/{to-serializable-transaction-BPYyQKxa.js → to-serializable-transaction-BiEB81zL.js} +2 -2
  194. package/assets/{totalSupply-BCBM6uY2.js → totalSupply-D7o26vFv.js} +1 -1
  195. package/assets/{trade-encoding-Bq9nPTSy.js → trade-encoding-6_dO5FYh.js} +1 -1
  196. package/assets/{transaction-Db6pntE5.js → transaction-B7gL56RA.js} +1 -1
  197. package/assets/{transactionReceipt-7aTE2Yz3.js → transactionReceipt-WUy2-DIs.js} +1 -1
  198. package/assets/{transactions-Y7mX5hPf.js → transactions-Ddu0qS1y.js} +1 -1
  199. package/assets/{useCreditPacks-CG7L_UQ4.js → useCreditPacks-BXDDD38Z.js} +1 -1
  200. package/assets/{useInfiniteGrid-H1sfBdhy.js → useInfiniteGrid-BokrX5YA.js} +1 -1
  201. package/assets/useManaRate-CtZMBb6a.js +1 -0
  202. package/assets/{useStore-Cbt7cLyp.js → useStore-DL2tZW7o.js} +2 -2
  203. package/assets/useTheme-B-xHZMoE.js +1 -0
  204. package/assets/{useTheme-CauhIIJq.js → useTheme-Tgfl6yPv.js} +1 -1
  205. package/assets/{utils-DBnU1jhd.js → utils-CPrJV6vP.js} +1 -1
  206. package/assets/{verifyHash-BzzdH-JT.js → verifyHash-DEKVRRCg.js} +1 -1
  207. package/assets/{w3m-modal-R9G6tUSA.js → w3m-modal-BOayHahj.js} +1 -1
  208. package/assets/{w3m-modal-Uf8zuJST.js → w3m-modal-DGk65SCN.js} +1 -1
  209. package/assets/{wait-for-tx-receipt-UIT99Yyq.js → wait-for-tx-receipt-C-yyIlse.js} +1 -1
  210. package/assets/{wallets-CgBIBei6.js → wallets-CKstZZYA.js} +5 -5
  211. package/assets/{web-connector-B1ptdbTS.js → web-connector-Df1Nw4jg.js} +3 -3
  212. package/assets/{writeContract-aQQPNQN6.js → writeContract-EXXVPkwI.js} +1 -1
  213. package/assets/{zora-sepolia-Bwjy_6bk.js → zora-sepolia-DQJtwyvj.js} +1 -1
  214. package/assets/{zoraTestnet-BxMHEDAV.js → zoraTestnet-Dj9qFBkp.js} +1 -1
  215. package/index.html +11 -11
  216. package/package.json +2 -2
  217. package/assets/Activity-CnoF6F3Z.js +0 -243
  218. package/assets/Authorizations-4u2_v7qf.js +0 -163
  219. package/assets/Cart-C1woE131.js +0 -3
  220. package/assets/CollectionCarousel-BC4r8J9j.js +0 -1
  221. package/assets/Creator-Cpw9Qy_r.js +0 -1
  222. package/assets/GetCredits-BfCzeAeD.js +0 -1
  223. package/assets/ImportListings-CxJDA8Su.js +0 -5
  224. package/assets/ItemDetail-BF1WOMVU.css +0 -1
  225. package/assets/ItemDetail-D1Xe6t7i.js +0 -82
  226. package/assets/MyAssets-C_wlVXNb.js +0 -258
  227. package/assets/PrimaryListModal-vBauRE_Q.js +0 -1
  228. package/assets/address-DrURAr9O.js +0 -1
  229. package/assets/authorizations-BdVBiEr7.js +0 -1
  230. package/assets/browser-ponyfill-Djb5Py6a.js +0 -1
  231. package/assets/buy-B_TXfJF4.js +0 -1
  232. package/assets/collection-d97cPr3w.js +0 -1
  233. package/assets/decimals-HChuNAkm.js +0 -1
  234. package/assets/estimate-l1-fee-CEy_ASr7.js +0 -1
  235. package/assets/eth_estimateGas-DcV1bi0C.js +0 -1
  236. package/assets/eth_getTransactionCount-BNyI69eR.js +0 -1
  237. package/assets/get-ecosystem-wallet-info-B4KRbr6l.js +0 -1
  238. package/assets/getNFT-B7SHBqxZ.js +0 -1
  239. package/assets/index-CkvNUeW9.css +0 -1
  240. package/assets/index-DH3Yzbz3.js +0 -1
  241. package/assets/index-k1Bog_tr.js +0 -289
  242. package/assets/send-gasless-transaction-DDPuuxQ-.js +0 -2
  243. package/assets/useManaRate-BO1b19Qr.js +0 -1
  244. package/assets/useTheme-TzAV5P1-.js +0 -1
@@ -0,0 +1,244 @@
1
+ import{r as V,j as e,L as $}from"./react-BXazHbBy.js";import{s as o,G as a,N as X,B as Z,m as J,t as c,u as Y,I as x,ai as tt,aj as et,C as h,o as I,ak as w,al as it,am as st}from"./index-N282EqWL.js";import{a as nt}from"./mana-rate-B5qogWAy.js";import{u as at}from"./useManaRate-CtZMBb6a.js";import{L as rt}from"./LoadMore-Co82ACWq.js";import{u as b}from"./useInfiniteGrid-BokrX5YA.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-CLqlZ0dX.js";import"./ethers-BJDbBwOP.js";import"./intl-CBcMB1D2.js";import"./index-HN6Rk25C.js";const ot=15e3;function ct(t,i){return t.txHash&&i.txHash?t.txHash===i.txHash:t.txHash||i.txHash?!1:t.status===i.status&&Math.abs(t.createdAt-i.createdAt)<=ot}function dt(t){const i=[...t].sort((s,n)=>n.createdAt-s.createdAt),d=[];for(const s of i){const n=d[d.length-1];n&&ct(n[n.length-1],s)?n.push(s):d.push([s])}return d.map(s=>{var n;return{id:((n=s.find(r=>r.txHash))==null?void 0:n.txHash)??s[s.length-1].id,createdAt:Math.max(...s.map(r=>r.createdAt)),status:s.some(r=>r.status==="PENDING")?"PENDING":"SETTLED",totalCredits:s.reduce((r,u)=>r+u.credits,0),lines:s}})}function lt(t){const i=[],d=new Map;for(const s of t)if(s.tradeId){const n=d.get(s.tradeId);if(n){n.quantity+=1,n.credits+=s.credits;continue}const r={key:s.tradeId,tradeId:s.tradeId,quantity:1,credits:s.credits};d.set(s.tradeId,r),i.push(r)}else i.push({key:s.id,tradeId:null,quantity:1,credits:s.credits});return i}function ut(t,i){return{id:t.id,contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId,counterparty:t.buyer,credits:i?nt(t.manaWei,i):null,createdAt:t.createdAt}}function pt(t){const d=dt(t.purchases.filter(n=>n.status!=="EXPIRED")).map(n=>({kind:"purchase",id:`purchase:${n.id}`,createdAt:n.createdAt,order:n})),s=t.sales.map(n=>{const r=ut(n,t.rate);return{kind:"sale",id:`sale:${r.id}`,createdAt:r.createdAt,sale:r}});return[...d,...s].sort((n,r)=>r.createdAt-n.createdAt||(n.id<r.id?-1:1))}function xt(t,i){if(i==="all")return t;const d=i==="purchases"?"purchase":"sale";return t.filter(s=>s.kind===d)}const m=X`
2
+ 0% { background-position: 200% 0; }
3
+ 100% { background-position: -200% 0; }
4
+ `,ht=o.section`
5
+ width: 100%;
6
+ min-width: 0;
7
+ min-height: 60vh;
8
+ `,mt=o.div`
9
+ display: flex;
10
+ align-items: baseline;
11
+ gap: 12px;
12
+ margin-bottom: 20px;
13
+ `,gt=o.h1`
14
+ font-family: ${a.font.sans};
15
+ margin: 0;
16
+ `;o.span`
17
+ color: ${a.colors.muted};
18
+ font-size: 14px;
19
+ `;const ft=o.div`
20
+ display: flex;
21
+ gap: 8px;
22
+ margin-bottom: 20px;
23
+ flex-wrap: wrap;
24
+ `,yt=o.button`
25
+ appearance: none;
26
+ border: 1px solid ${a.colors.line};
27
+ background: ${a.colors.white};
28
+ color: ${a.colors.text};
29
+ font-family: ${a.font.sans};
30
+ font-size: 14px;
31
+ font-weight: 600;
32
+ padding: 8px 16px;
33
+ min-height: 40px;
34
+ border-radius: ${a.radius.pill};
35
+ cursor: pointer;
36
+ transition:
37
+ background 0.15s,
38
+ border-color 0.15s,
39
+ color 0.15s;
40
+
41
+ &:hover {
42
+ background: ${a.colors.media};
43
+ }
44
+ &:focus-visible {
45
+ outline: 2px solid ${a.colors.accent};
46
+ outline-offset: 2px;
47
+ }
48
+ &[data-active='true'] {
49
+ background: ${a.colors.accent};
50
+ border-color: ${a.colors.accent};
51
+ color: ${a.colors.white};
52
+ }
53
+ `,j=o.div`
54
+ display: flex;
55
+ flex-direction: column;
56
+ gap: 16px;
57
+ max-width: 760px;
58
+ `,A=o.div`
59
+ background: ${a.colors.white};
60
+ border: 1px solid ${a.colors.line};
61
+ border-radius: 16px;
62
+ overflow: hidden;
63
+ `,L=o.div`
64
+ display: flex;
65
+ align-items: center;
66
+ justify-content: space-between;
67
+ gap: 12px;
68
+ padding: 14px 18px;
69
+ background: ${a.colors.softWhite};
70
+ border-bottom: 1px solid ${a.colors.line};
71
+
72
+ ${a.media.down("mobile")} {
73
+ flex-wrap: wrap;
74
+ }
75
+ `,N=o.div`
76
+ display: flex;
77
+ flex-direction: column;
78
+ gap: 2px;
79
+ min-width: 0;
80
+ `,P=o.span`
81
+ font-weight: 700;
82
+ color: ${a.colors.text};
83
+ `,E=o.span`
84
+ font-size: 13px;
85
+ color: ${a.colors.muted};
86
+ `,T=o.div`
87
+ display: flex;
88
+ align-items: center;
89
+ gap: 14px;
90
+ `,S=o.span`
91
+ font-size: 11px;
92
+ font-weight: 700;
93
+ text-transform: uppercase;
94
+ letter-spacing: 0.03em;
95
+ padding: 4px 10px;
96
+ border-radius: ${a.radius.pill};
97
+ white-space: nowrap;
98
+
99
+ &[data-status='SETTLED'] {
100
+ background: rgba(30, 166, 114, 0.14);
101
+ color: ${a.colors.okStrong};
102
+ }
103
+ &[data-status='PENDING'] {
104
+ background: rgba(245, 166, 35, 0.16);
105
+ color: #b5790a;
106
+ }
107
+ &[data-status='SOLD'] {
108
+ background: rgba(103, 58, 183, 0.14);
109
+ color: ${a.colors.accent};
110
+ }
111
+ `,C=o.div`
112
+ display: flex;
113
+ align-items: center;
114
+ gap: 5px;
115
+ font-weight: 800;
116
+ color: ${a.colors.text};
117
+ white-space: nowrap;
118
+
119
+ .ccy-mark {
120
+ width: 16px;
121
+ height: 16px;
122
+ }
123
+
124
+ // Money received (a sale) reads as income in the shop's success green.
125
+ &[data-kind='income'] {
126
+ color: ${a.colors.okStrong};
127
+ }
128
+ `,D=o.div`
129
+ display: flex;
130
+ flex-direction: column;
131
+ `,g=o.div`
132
+ display: grid;
133
+ grid-template-columns: 52px 1fr auto;
134
+ align-items: center;
135
+ gap: 14px;
136
+ padding: 12px 18px;
137
+ text-decoration: none;
138
+ color: inherit;
139
+
140
+ & + & {
141
+ border-top: 1px solid ${a.colors.line};
142
+ }
143
+
144
+ &[data-link='true'] {
145
+ transition: background 0.15s;
146
+ }
147
+ &[data-link='true']:hover {
148
+ background: ${a.colors.media};
149
+ }
150
+ &[data-link='true']:focus-visible {
151
+ outline: 2px solid ${a.colors.accent};
152
+ outline-offset: -2px;
153
+ }
154
+ `,F=o.div`
155
+ width: 52px;
156
+ height: 52px;
157
+ border-radius: 10px;
158
+ background: ${a.colors.media};
159
+ overflow: hidden;
160
+ display: flex;
161
+ align-items: center;
162
+ justify-content: center;
163
+ color: ${a.colors.muted2};
164
+
165
+ img {
166
+ width: 100%;
167
+ height: 100%;
168
+ object-fit: contain;
169
+ }
170
+ `,z=o.div`
171
+ width: 52px;
172
+ height: 52px;
173
+ border-radius: 10px;
174
+ background: linear-gradient(100deg, ${a.colors.media} 30%, ${a.colors.panel} 50%, ${a.colors.media} 70%);
175
+ background-size: 200% 100%;
176
+ animation: ${m} 1.3s infinite linear;
177
+
178
+ @media (prefers-reduced-motion: reduce) {
179
+ animation: none;
180
+ }
181
+ `,H=o.div`
182
+ min-width: 0;
183
+ display: flex;
184
+ flex-direction: column;
185
+ gap: 2px;
186
+ `,q=o.span`
187
+ font-weight: 700;
188
+ white-space: nowrap;
189
+ overflow: hidden;
190
+ text-overflow: ellipsis;
191
+ `,M=o.span`
192
+ display: inline-block;
193
+ width: 140px;
194
+ max-width: 60%;
195
+ height: 12px;
196
+ border-radius: 6px;
197
+ background: linear-gradient(100deg, ${a.colors.media} 30%, ${a.colors.panel} 50%, ${a.colors.media} 70%);
198
+ background-size: 200% 100%;
199
+ animation: ${m} 1.3s infinite linear;
200
+
201
+ @media (prefers-reduced-motion: reduce) {
202
+ animation: none;
203
+ }
204
+ `,G=o.span`
205
+ font-size: 13px;
206
+ color: ${a.colors.muted};
207
+ `,bt=o.div`
208
+ display: flex;
209
+ align-items: center;
210
+ gap: 4px;
211
+ font-weight: 700;
212
+ color: ${a.colors.text};
213
+ white-space: nowrap;
214
+
215
+ .ccy-mark {
216
+ width: 14px;
217
+ height: 14px;
218
+ }
219
+ `,v=o.div`
220
+ height: 132px;
221
+ border-radius: 16px;
222
+ border: 1px solid transparent;
223
+ background: linear-gradient(100deg, ${a.colors.media} 30%, ${a.colors.panel} 50%, ${a.colors.media} 70%);
224
+ background-size: 200% 100%;
225
+ animation: ${m} 1.3s infinite linear;
226
+
227
+ @media (prefers-reduced-motion: reduce) {
228
+ animation: none;
229
+ }
230
+ `,O=o.div`
231
+ display: flex;
232
+ flex-direction: column;
233
+ align-items: center;
234
+ gap: 8px;
235
+ text-align: center;
236
+ padding: 90px 20px;
237
+ min-height: 50vh;
238
+ `,R=o.p`
239
+ font-size: 22px;
240
+ font-weight: 700;
241
+ margin: 6px 0 0;
242
+ `,jt=o(Z)`
243
+ margin-top: 12px;
244
+ `,B=g.withComponent($),k=24,vt=["all","purchases","sales"];function W(t){try{return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function kt(t){return t.length>10?`${t.slice(0,6)}…${t.slice(-4)}`:t}function $t({item:t}){const{data:i,isLoading:d}=I({queryKey:["trade-display",t.tradeId],queryFn:()=>it(t.tradeId),enabled:!!t.tradeId,staleTime:3e5}),s=!!t.tradeId&&d,n=(i==null?void 0:i.name)??c("activity.itemFallback"),r=(i==null?void 0:i.thumbnail)??"",u=w({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,p=e.jsxs(e.Fragment,{children:[s?e.jsx(z,{}):e.jsx(F,{children:r?e.jsx("img",{src:r,alt:n}):e.jsx(x,{name:"cart",size:20})}),e.jsxs(H,{children:[s?e.jsx(M,{}):e.jsx(q,{title:n,children:n}),t.quantity>1?e.jsx(G,{children:c("activity.quantity",{count:t.quantity})}):null]}),e.jsxs(bt,{children:[e.jsx(h,{className:"ccy-mark"})," ",t.credits]})]});return u?e.jsx(B,{to:u,"data-link":"true",children:p}):e.jsx(g,{children:p})}function It({order:t}){const i=lt(t.lines),d=i.reduce((s,n)=>s+n.quantity,0);return e.jsxs(A,{"data-testid":"purchase-order",children:[e.jsxs(L,{children:[e.jsxs(N,{children:[e.jsx(P,{children:W(t.createdAt)}),e.jsxs(E,{children:[c("activity.purchaseLabel")," · ",c("activity.itemCount",{count:d})]})]}),e.jsxs(T,{children:[e.jsx(S,{"data-status":t.status,children:t.status==="PENDING"?c("activity.processing"):c("activity.completed")}),e.jsxs(C,{children:[e.jsx(h,{className:"ccy-mark"})," ",t.totalCredits]})]})]}),e.jsx(D,{children:i.map(s=>e.jsx($t,{item:s},s.key))})]})}function wt({sale:t}){const{data:i,isLoading:d}=I({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>st(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),s=(i==null?void 0:i.name)??c("activity.itemFallback"),n=(i==null?void 0:i.thumbnail)??"",r=w({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,u=e.jsxs(e.Fragment,{children:[d?e.jsx(z,{}):e.jsx(F,{children:n?e.jsx("img",{src:n,alt:s}):e.jsx(x,{name:"offer",size:20})}),e.jsxs(H,{children:[d?e.jsx(M,{}):e.jsx(q,{title:s,children:s}),e.jsx(G,{children:c("activity.soldTo",{account:kt(t.counterparty)})})]})]});return e.jsxs(A,{"data-testid":"activity-sale",children:[e.jsxs(L,{children:[e.jsxs(N,{children:[e.jsx(P,{children:W(t.createdAt)}),e.jsx(E,{children:c("activity.saleLabel")})]}),e.jsxs(T,{children:[e.jsx(S,{"data-status":"SOLD",children:c("activity.sold")}),t.credits!=null?e.jsxs(C,{"data-kind":"income",title:c("activity.approxValue"),children:["+",e.jsx(h,{className:"ccy-mark"})," ",t.credits]}):null]})]}),e.jsx(D,{children:r?e.jsx(B,{to:r,"data-link":"true",children:u}):e.jsx(g,{children:u})})]})}function At({filter:t}){const i={all:{icon:"clock",title:c("activity.emptyAllTitle"),body:c("activity.emptyAllBody")},purchases:{icon:"cart",title:c("activity.emptyPurchasesTitle"),body:c("activity.emptyPurchasesBody")},sales:{icon:"offer",title:c("activity.emptySalesTitle"),body:c("activity.emptySalesBody")}}[t];return e.jsxs(O,{children:[e.jsx(x,{name:i.icon,size:40,color:"var(--muted-2)"}),e.jsx(R,{children:i.title}),e.jsx("p",{className:"muted",children:i.body}),t!=="sales"?e.jsx(jt,{as:$,to:"/assets",variant:"purple",children:c("notFound.cta")}):null]})}function qt(){J({title:c("nav.activity"),noindex:!0});const{session:t}=Y(),[i,d]=V.useState("all"),s=!!t&&i!=="sales",n=!!t&&i!=="purchases",r=b(["purchases",t==null?void 0:t.address],l=>et(t.address,t.identity,{first:k,skip:l}),{enabled:s}),u=b(["sales",t==null?void 0:t.address],l=>tt(t.address,{role:"seller",first:k,skip:l}),{enabled:n}),{data:p}=at(n);if(!t)return e.jsxs(O,{children:[e.jsx(x,{name:"clock",size:40,color:"var(--muted-2)"}),e.jsx(R,{children:c("activity.signInTitle")}),e.jsx("p",{className:"muted",children:c("activity.signInBody")})]});const f=xt(pt({purchases:s?r.items:[],sales:n?u.items:[],rate:p}),i),_=s&&r.isLoading||n&&u.isLoading,y=s&&r.isFetchingNextPage||n&&u.isFetchingNextPage,U=s&&r.hasNextPage||n&&u.hasNextPage;function K(){s&&r.hasNextPage&&r.fetchNextPage(),n&&u.hasNextPage&&u.fetchNextPage()}return e.jsxs(ht,{children:[e.jsx(mt,{children:e.jsx(gt,{children:c("nav.activity")})}),e.jsx(ft,{role:"tablist","aria-label":c("nav.activity"),children:vt.map(l=>e.jsx(yt,{type:"button",role:"tab","aria-selected":i===l,"data-active":i===l,"data-testid":`activity-filter-${l}`,onClick:()=>d(l),children:c(`activity.filter.${l}`)},l))}),_?e.jsx(j,{children:Array.from({length:5}).map((l,Q)=>e.jsx(v,{},Q))}):f.length===0?e.jsx(At,{filter:i}):e.jsxs(e.Fragment,{children:[e.jsxs(j,{children:[f.map(l=>l.kind==="purchase"?e.jsx(It,{order:l.order},l.id):e.jsx(wt,{sale:l.sale},l.id)),y?e.jsx(v,{}):null]}),e.jsx(rt,{hasNextPage:U,isFetching:y,onLoadMore:K})]})]})}export{qt as Activity};
@@ -1,11 +1,11 @@
1
- import{r as l,j as v}from"./react-C51i12iP.js";const w="https://cdn.decentraland.org/@dcl/shop/0.1.0-30043940031.commit-1a0b88f/assets/custom-welcome-background-BxlFQma9.webp",S="https://cdn.decentraland.org/@dcl/shop/0.1.0-30043940031.commit-1a0b88f/assets/DCL_LogoPattern-BryBPc3d.png",b=`
1
+ import{r as l,j as v}from"./react-BXazHbBy.js";const w="https://cdn.decentraland.org/@dcl/shop/0.1.0-30098548645.commit-d41f1c2/assets/custom-welcome-background-BxlFQma9.webp",S="https://cdn.decentraland.org/@dcl/shop/0.1.0-30098548645.commit-d41f1c2/assets/DCL_LogoPattern-BryBPc3d.png",U=`
2
2
  attribute vec2 a_position;
3
3
  varying vec2 v_uv;
4
4
  void main() {
5
5
  v_uv = a_position * 0.5 + 0.5;
6
6
  gl_Position = vec4(a_position, 0.0, 1.0);
7
7
  }
8
- `,U=`
8
+ `,b=`
9
9
  precision highp float;
10
10
 
11
11
  uniform float u_time;
@@ -77,4 +77,4 @@ void main() {
77
77
 
78
78
  gl_FragColor = result;
79
79
  }
80
- `;function g(t,a,r){const e=t.createShader(a);return e?(t.shaderSource(e,r),t.compileShader(e),t.getShaderParameter(e,t.COMPILE_STATUS)?e:(console.error("Shader compile error:",t.getShaderInfoLog(e)),t.deleteShader(e),null)):null}function P(t,a,r){const e=t.createProgram();return e?(t.attachShader(e,a),t.attachShader(e,r),t.linkProgram(e),t.getProgramParameter(e,t.LINK_STATUS)?e:(console.error("Program link error:",t.getProgramInfoLog(e)),t.deleteProgram(e),null)):null}function D(t,a,r){const e=t.createTexture();if(!e)return null;t.bindTexture(t.TEXTURE_2D,e),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array([128,128,128,255]));const o=new Image;return o.crossOrigin="anonymous",o.onload=()=>{r!=null&&r()||(t.bindTexture(t.TEXTURE_2D,e),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,!0),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,o),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.generateMipmap(t.TEXTURE_2D))},o.src=a,e}function L(){const t=l.useRef(null),a=l.useRef(0);return l.useEffect(()=>{var h;const r=t.current;if(!r||(h=window.matchMedia)!=null&&h.call(window,"(prefers-reduced-motion: reduce)").matches)return;const e=r.getContext("webgl",{alpha:!1,antialias:!1});if(!e)return;const o=g(e,e.VERTEX_SHADER,b),c=g(e,e.FRAGMENT_SHADER,U);if(!o||!c){o&&e.deleteShader(o),c&&e.deleteShader(c);return}const n=P(e,o,c);if(!n){e.deleteShader(o),e.deleteShader(c);return}const u=e.getAttribLocation(n,"a_position"),_=e.getUniformLocation(n,"u_time"),R=e.getUniformLocation(n,"u_resolution"),y=e.getUniformLocation(n,"u_overlayTex"),s=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,s),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),e.STATIC_DRAW);let m=!1;const d=D(e,S,()=>m),A=()=>{const i=window.devicePixelRatio||1,x=r.clientWidth*i,E=r.clientHeight*i;(r.width!==x||r.height!==E)&&(r.width=x,r.height=E)},p=performance.now()/1e3,f=()=>{A(),e.viewport(0,0,r.width,r.height),e.useProgram(n),e.uniform1f(_,performance.now()/1e3-p),e.uniform2f(R,r.width,r.height),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,d),e.uniform1i(y,0),e.enableVertexAttribArray(u),e.bindBuffer(e.ARRAY_BUFFER,s),e.vertexAttribPointer(u,2,e.FLOAT,!1,0,0),e.drawArrays(e.TRIANGLES,0,6),a.current=requestAnimationFrame(f)},T=i=>{i.preventDefault(),cancelAnimationFrame(a.current),r.style.opacity="0"};return r.addEventListener("webglcontextlost",T,!1),a.current=requestAnimationFrame(f),()=>{m=!0,cancelAnimationFrame(a.current),r.removeEventListener("webglcontextlost",T),e.deleteProgram(n),e.deleteShader(o),e.deleteShader(c),e.deleteBuffer(s),e.deleteTexture(d)}},[]),v.jsxs("div",{className:"AnimatedBackground","aria-hidden":!0,children:[v.jsx("div",{className:"AnimatedBackground__fallback",style:{backgroundImage:`url(${w})`}}),v.jsx("canvas",{ref:t,className:"AnimatedBackground__canvas"})]})}export{L as default};
80
+ `;function g(t,a,r){const e=t.createShader(a);return e?(t.shaderSource(e,r),t.compileShader(e),t.getShaderParameter(e,t.COMPILE_STATUS)?e:(console.error("Shader compile error:",t.getShaderInfoLog(e)),t.deleteShader(e),null)):null}function P(t,a,r){const e=t.createProgram();return e?(t.attachShader(e,a),t.attachShader(e,r),t.linkProgram(e),t.getProgramParameter(e,t.LINK_STATUS)?e:(console.error("Program link error:",t.getProgramInfoLog(e)),t.deleteProgram(e),null)):null}function D(t,a,r){const e=t.createTexture();if(!e)return null;t.bindTexture(t.TEXTURE_2D,e),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array([128,128,128,255]));const o=new Image;return o.crossOrigin="anonymous",o.onload=()=>{r!=null&&r()||(t.bindTexture(t.TEXTURE_2D,e),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,!0),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,o),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.generateMipmap(t.TEXTURE_2D))},o.src=a,e}function L(){const t=l.useRef(null),a=l.useRef(0);return l.useEffect(()=>{var h;const r=t.current;if(!r||(h=window.matchMedia)!=null&&h.call(window,"(prefers-reduced-motion: reduce)").matches)return;const e=r.getContext("webgl",{alpha:!1,antialias:!1});if(!e)return;const o=g(e,e.VERTEX_SHADER,U),c=g(e,e.FRAGMENT_SHADER,b);if(!o||!c){o&&e.deleteShader(o),c&&e.deleteShader(c);return}const n=P(e,o,c);if(!n){e.deleteShader(o),e.deleteShader(c);return}const u=e.getAttribLocation(n,"a_position"),_=e.getUniformLocation(n,"u_time"),R=e.getUniformLocation(n,"u_resolution"),y=e.getUniformLocation(n,"u_overlayTex"),s=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,s),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),e.STATIC_DRAW);let m=!1;const d=D(e,S,()=>m),A=()=>{const i=window.devicePixelRatio||1,x=r.clientWidth*i,E=r.clientHeight*i;(r.width!==x||r.height!==E)&&(r.width=x,r.height=E)},p=performance.now()/1e3,f=()=>{A(),e.viewport(0,0,r.width,r.height),e.useProgram(n),e.uniform1f(_,performance.now()/1e3-p),e.uniform2f(R,r.width,r.height),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,d),e.uniform1i(y,0),e.enableVertexAttribArray(u),e.bindBuffer(e.ARRAY_BUFFER,s),e.vertexAttribPointer(u,2,e.FLOAT,!1,0,0),e.drawArrays(e.TRIANGLES,0,6),a.current=requestAnimationFrame(f)},T=i=>{i.preventDefault(),cancelAnimationFrame(a.current),r.style.opacity="0"};return r.addEventListener("webglcontextlost",T,!1),a.current=requestAnimationFrame(f),()=>{m=!0,cancelAnimationFrame(a.current),r.removeEventListener("webglcontextlost",T),e.deleteProgram(n),e.deleteShader(o),e.deleteShader(c),e.deleteBuffer(s),e.deleteTexture(d)}},[]),v.jsxs("div",{className:"AnimatedBackground","aria-hidden":!0,children:[v.jsx("div",{className:"AnimatedBackground__fallback",style:{backgroundImage:`url(${w})`}}),v.jsx("canvas",{ref:t,className:"AnimatedBackground__canvas"})]})}export{L as default};
@@ -1,4 +1,4 @@
1
- import{u as Ze,r as p,j as e,b as Je}from"./react-C51i12iP.js";import{p as W,h as Xe,c as Ye,M as et,s,F as t,u as oe,a as tt,b as Ne,x as Ae,v as nt,t as o,I as N,C as F,d as he,j as D,k as st,l as ot,m as _e,G as rt,A as Q,az as it,aA as at}from"./index-k1Bog_tr.js";import{r as lt,m as ct,a as Pe}from"./mana-rate-Ez6IlT0x.js";import{u as Me}from"./useManaRate-BO1b19Qr.js";import{g as dt,h as ft,i as pt,j as ut,k as xt,C as ht,l as mt,o as gt,m as bt,n as yt,M as wt}from"./Assets.styles-C5zpZCUK.js";import{d as me,R as vt,F as jt,S as ge,b as $t}from"./categories-DDZgtl6y.js";import{L as Ct}from"./LoadMore-CHlPzPXC.js";import{M as kt}from"./MarketCheckout-dyTQT0v3.js";import{u as St}from"./useInfiniteGrid-H1sfBdhy.js";import{E as Rt}from"./ErrorNotice-C7soUjRV.js";import{d as It}from"./dcl-schemas-BICTSpB5.js";import{u as Et,G as Tt,w as zt,S as Nt}from"./buy-gasless-C7VsNrLp.js";import{s as At}from"./buy-B_TXfJF4.js";import{h as _t}from"./trade-encoding-Bq9nPTSy.js";import{f as Pt}from"./errors-D2EYBG38.js";import{J as Mt,C as Lt,B as se}from"./ethers-w5dOkonM.js";import{l as Bt}from"./loader-logo-BzY9EKdC.js";import{n as Ft}from"./emotion-CSxEP8yM.js";import"./sentry-DKBoGDXH.js";import"./intl-CBcMB1D2.js";import"./index-HN6Rk25C.js";import"./Tooltip-BjVKL7Fw.js";import"./authorizations-BdVBiEr7.js";import"./sendMetaTransaction-CiO3jI6F.js";function Z(n){const r=n.source??"item",f=n.tradeId||`${n.contractAddress}-${n.tokenId??n.itemId??""}`;return`${r}:${f}`}const H="100000000000000000000",Le=2,V=15,Wt=/^[a-zA-Z0-9]+$/;function be(n){const r=n.trim();return r.length===0?{ok:!1,reason:"empty"}:Wt.test(r)?r.length<Le?{ok:!1,reason:"too-short"}:r.length>V?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Ht(n){return n.replace(/[^a-zA-Z0-9]/g,"").slice(0,V)}const Ot=["function available(string _subdomain) view returns (bool)"],ye={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Ut(){return W.chainId===It.ChainId.MATIC_MAINNET?ye.mainnet:ye.sepolia}async function Gt(n,r={}){var d;const{rpc:f,address:u}=Ut(),h=new Mt(f),l=new Lt(u,Ot,h);console.info(`[names] availability check → DCLRegistrar(${u}).available("${n}") on ${f}`);const c=await l.available(n);if((d=r.signal)!=null&&d.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${n}" available=${c}`),c?"available":"taken"}const qt="https://app.across.to/api";class Be extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function Dt(n){return ct(H,n)}async function Vt(n,r,f={}){var d;const u=f.chainId??W.chainId,h=f.provider??"across",l=`${W.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(r)}&chainId=${u}&provider=${h}`,c=await et(l,{method:"GET",identity:n,metadata:{}});if(!c.ok){let a;try{a=(d=await c.json())==null?void 0:d.code}catch{}throw a==="ROUTE_COST_TOO_HIGH"?new Be:new Error(`fetchNameCreditRoute ${c.status}`)}return c.json()}function Kt(n,r){const f=se.from(n.availableAmount),h=se.from(H).sub(f);return{credits:[{value:n.amount,expiresAt:Number(n.expiresAt),salt:_t(n.id)}],creditsSignatures:[n.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:H}}async function Qt(n,r={}){const f=qt,u=r.intervalMs??1e4,h=r.maxAttempts??60;let l={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let c=0;c<h;c++){try{const d=await fetch(`${f}/deposit/status?originChainId=137&depositTxHash=${n}`);if(d.ok){const a=await d.json(),x=(a.status??"pending").toLowerCase(),m=a.fillTx??a.fillTxnRef??null,w=a.actionsSucceeded!==!1;if(x==="filled")return{status:"filled",destinationTxHash:m,actionsSucceeded:w};if(x==="refunded"||x==="expired")return{status:x,destinationTxHash:null,actionsSucceeded:!1};l={status:"pending",destinationTxHash:m,actionsSucceeded:w}}}catch{}c<h-1&&await new Promise(d=>setTimeout(d,u))}return l}async function Zt(n){const{name:r,identity:f,signer:u}=n,h=n.chainId??W.chainId,l=n.provider??"across",c=(n.beneficiary??await u.getAddress()).toLowerCase();let d=null,a=!1;console.info("[names] register start",{name:r,buyer:c,chainId:h,provider:l});try{const x=await lt(h),m=Dt(x);console.info("[names] step 1/6 sized reservation",{usdCents:m,manaRate:x});const w=await Vt(f,r,{chainId:h,provider:l});console.info("[names] step 2/6 route fetched",{target:w.externalCall.target,selector:w.externalCall.selector,provider:w.provider,quoteId:w.quoteId});const j=await Xe(f,m);if(d=j.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:j.credit.id,maxCreditedValue:j.maxCreditedValue}),se.from(j.maxCreditedValue).lt(H))throw new Error("Credit under-sized for the name price");const k=Kt(j.credit,w);let g;try{g=await Et({chainId:h,buyer:c,signer:u,args:k})}catch(y){if(!(y instanceof Tt))throw y;g=await At(h,k,u)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:g}),await zt(g),a=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:g}),l==="across"){const y=await Qt(g,n.acrossPoll);if(console.info("[names] step 6/6 across status",y),y.status==="pending")return{status:"pending",originTxHash:g};if(y.status!=="filled"||!y.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:g,destinationTxHash:y.destinationTxHash}}return{status:"pending",originTxHash:g}}catch(x){if(console.error("[names] register failed — raw error:",x,{name:r,buyer:c,originConfirmed:a}),x instanceof Nt)return{status:"pending",originTxHash:x.txHash};throw d&&!a&&await Ye(f,[d]).catch(()=>{}),x instanceof Be?x:new Error(Pt(x,"Couldn't register the name. Please try again.",{sale:!0}))}}const Jt=s.div`
1
+ import{u as Ze,r as p,j as e,b as Je}from"./react-BXazHbBy.js";import{p as H,h as Xe,c as Ye,r as et,s,G as t,u as oe,a as tt,b as Ne,y as _e,w as nt,t as o,I as N,C as F,d as he,j as D,k as st,l as ot,m as Ae,H as rt,A as Q,aD as it,aE as at}from"./index-N282EqWL.js";import{r as lt,m as ct,a as Pe}from"./mana-rate-B5qogWAy.js";import{u as Me}from"./useManaRate-CtZMBb6a.js";import{g as dt,h as ft,i as pt,j as ut,k as xt,C as ht,l as mt,o as gt,m as bt,n as yt,M as wt}from"./Assets.styles-C-xsD5dl.js";import{d as me,R as vt,F as jt,S as ge,b as $t}from"./categories-q4cmLb4w.js";import{L as Ct}from"./LoadMore-Co82ACWq.js";import{M as kt}from"./MarketCheckout-CXF5RWuK.js";import{u as St}from"./useInfiniteGrid-BokrX5YA.js";import{E as Rt}from"./ErrorNotice-Cmr8aXJs.js";import{d as Et}from"./dcl-schemas-BICTSpB5.js";import{u as It,G as Tt,w as zt,S as Nt}from"./buy-gasless-DITQks7J.js";import{s as _t}from"./buy-DnDBBIJp.js";import{h as At}from"./trade-encoding-6_dO5FYh.js";import{f as Pt}from"./errors-BHedmHUe.js";import{J as Mt,C as Lt,B as se}from"./ethers-BJDbBwOP.js";import{l as Bt}from"./loader-logo-BzY9EKdC.js";import{n as Ft}from"./emotion-CSxEP8yM.js";import"./sentry-CLqlZ0dX.js";import"./intl-CBcMB1D2.js";import"./index-HN6Rk25C.js";import"./Tooltip-CMiyDsYT.js";import"./authorizations-xecfPSH8.js";import"./sendMetaTransaction-CiO3jI6F.js";function Z(n){const r=n.source??"item",f=n.tradeId||`${n.contractAddress}-${n.tokenId??n.itemId??""}`;return`${r}:${f}`}const W="100000000000000000000",Le=2,V=15,Ht=/^[a-zA-Z0-9]+$/;function be(n){const r=n.trim();return r.length===0?{ok:!1,reason:"empty"}:Ht.test(r)?r.length<Le?{ok:!1,reason:"too-short"}:r.length>V?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Wt(n){return n.replace(/[^a-zA-Z0-9]/g,"").slice(0,V)}const Ot=["function available(string _subdomain) view returns (bool)"],ye={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Ut(){return H.chainId===Et.ChainId.MATIC_MAINNET?ye.mainnet:ye.sepolia}async function Gt(n,r={}){var d;const{rpc:f,address:u}=Ut(),h=new Mt(f),l=new Lt(u,Ot,h);console.info(`[names] availability check → DCLRegistrar(${u}).available("${n}") on ${f}`);const c=await l.available(n);if((d=r.signal)!=null&&d.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${n}" available=${c}`),c?"available":"taken"}const qt="https://app.across.to/api";class Be extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function Dt(n){return ct(W,n)}async function Vt(n,r,f={}){var d;const u=f.chainId??H.chainId,h=f.provider??"across",l=`${H.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(r)}&chainId=${u}&provider=${h}`,c=await et(l,{method:"GET",identity:n,metadata:{}});if(!c.ok){let a;try{a=(d=await c.json())==null?void 0:d.code}catch{}throw a==="ROUTE_COST_TOO_HIGH"?new Be:new Error(`fetchNameCreditRoute ${c.status}`)}return c.json()}function Kt(n,r){const f=se.from(n.availableAmount),h=se.from(W).sub(f);return{credits:[{value:n.amount,expiresAt:Number(n.expiresAt),salt:At(n.id)}],creditsSignatures:[n.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 Qt(n,r={}){const f=qt,u=r.intervalMs??1e4,h=r.maxAttempts??60;let l={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let c=0;c<h;c++){try{const d=await fetch(`${f}/deposit/status?originChainId=137&depositTxHash=${n}`);if(d.ok){const a=await d.json(),x=(a.status??"pending").toLowerCase(),m=a.fillTx??a.fillTxnRef??null,w=a.actionsSucceeded!==!1;if(x==="filled")return{status:"filled",destinationTxHash:m,actionsSucceeded:w};if(x==="refunded"||x==="expired")return{status:x,destinationTxHash:null,actionsSucceeded:!1};l={status:"pending",destinationTxHash:m,actionsSucceeded:w}}}catch{}c<h-1&&await new Promise(d=>setTimeout(d,u))}return l}async function Zt(n){const{name:r,identity:f,signer:u}=n,h=n.chainId??H.chainId,l=n.provider??"across",c=(n.beneficiary??await u.getAddress()).toLowerCase();let d=null,a=!1;console.info("[names] register start",{name:r,buyer:c,chainId:h,provider:l});try{const x=await lt(h),m=Dt(x);console.info("[names] step 1/6 sized reservation",{usdCents:m,manaRate:x});const w=await Vt(f,r,{chainId:h,provider:l});console.info("[names] step 2/6 route fetched",{target:w.externalCall.target,selector:w.externalCall.selector,provider:w.provider,quoteId:w.quoteId});const j=await Xe(f,m);if(d=j.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:j.credit.id,maxCreditedValue:j.maxCreditedValue}),se.from(j.maxCreditedValue).lt(W))throw new Error("Credit under-sized for the name price");const k=Kt(j.credit,w);let g;try{g=await It({chainId:h,buyer:c,signer:u,args:k})}catch(y){if(!(y instanceof Tt))throw y;g=await _t(h,k,u)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:g}),await zt(g),a=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:g}),l==="across"){const y=await Qt(g,n.acrossPoll);if(console.info("[names] step 6/6 across status",y),y.status==="pending")return{status:"pending",originTxHash:g};if(y.status!=="filled"||!y.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:g,destinationTxHash:y.destinationTxHash}}return{status:"pending",originTxHash:g}}catch(x){if(console.error("[names] register failed — raw error:",x,{name:r,buyer:c,originConfirmed:a}),x instanceof Nt)return{status:"pending",originTxHash:x.txHash};throw d&&!a&&await Ye(f,[d]).catch(()=>{}),x instanceof Be?x:new Error(Pt(x,"Couldn't register the name. Please try again.",{sale:!0}))}}const Jt=s.div`
2
2
  position: fixed;
3
3
  inset: 0;
4
4
  z-index: 10000;
@@ -94,7 +94,7 @@ import{u as Ze,r as p,j as e,b as Je}from"./react-C51i12iP.js";import{p as W,h a
94
94
  `,Re=s.div`
95
95
  flex: 1;
96
96
  min-width: 0;
97
- `,Ie=s.div`
97
+ `,Ee=s.div`
98
98
  font-family: ${t.font.sans};
99
99
  font-weight: 700;
100
100
  font-size: 20px;
@@ -108,7 +108,7 @@ import{u as Ze,r as p,j as e,b as Je}from"./react-C51i12iP.js";import{p as W,h a
108
108
  font-weight: 400;
109
109
  color: ${t.colors.muted2};
110
110
  }
111
- `,Ee=s.div`
111
+ `,Ie=s.div`
112
112
  font-family: ${t.font.sans};
113
113
  font-size: 14px;
114
114
  color: ${t.colors.muted2};
@@ -366,7 +366,7 @@ import{u as Ze,r as p,j as e,b as Je}from"./react-C51i12iP.js";import{p as W,h a
366
366
  flex: none;
367
367
  color: ${t.colors.dclRed};
368
368
  }
369
- `;function wn({name:n,priceCredits:r,onClose:f}){const{session:u}=oe(),{data:h,isError:l}=tt(u),c=Ne(),d=Ze(),[a,x]=p.useState("confirm"),[m,w]=p.useState(""),[j,k]=p.useState(null),g=p.useRef(!1),y=m.trim().toLowerCase()===n.toLowerCase(),v=a==="completing",S=r!=null?Ae(r):"—";p.useEffect(()=>{const b=T=>{T.key==="Escape"&&!v&&f()};document.addEventListener("keydown",b);const A=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",b),document.body.style.overflow=A}},[v,f]);async function C(){if(!(!u||!y||g.current)){g.current=!0,x("completing"),k(null);try{await Zt({name:n,identity:u.identity,signer:u.signer}),D("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:r??null}),c.invalidateQueries({queryKey:["usd-balance"]}),c.invalidateQueries({queryKey:["my-assets"]}),x("success")}catch(b){D(ot(b)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:st(b),purchase_type:"name"}),k((b==null?void 0:b.message)||o("names.errorGeneric")),x("error")}finally{g.current=!1}}}const I=a!=="success",R=nt(u==null?void 0:u.providerType);return e.jsx(Jt,{onClick:v?void 0:f,role:"presentation",children:e.jsxs(Xt,{role:"dialog","aria-modal":"true","aria-label":o("names.buyTitle"),onClick:b=>b.stopPropagation(),children:[I&&e.jsxs(e.Fragment,{children:[e.jsxs(we,{children:[e.jsx(ve,{children:a==="error"?o("names.errorTitle"):o("names.buyTitle")}),e.jsx(je,{onClick:f,disabled:v,"aria-label":o("buyModal.close"),children:e.jsx(N,{name:"close"})})]}),e.jsxs($e,{children:[o("names.myCreditsBalance")," ",e.jsx(F,{})," ",he(h,l)]}),e.jsx(Ce,{})]}),(a==="confirm"||a==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(ke,{children:[e.jsx(Se,{"aria-hidden":!0,children:"@"}),e.jsxs(Re,{children:[e.jsxs(Ie,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Ee,{children:o("names.subtitle")})]}),e.jsxs(Te,{children:[e.jsx(F,{}),S]})]}),a==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(yn,{children:[e.jsx(N,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),e.jsx(ze,{onClick:()=>x("confirm"),children:o("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Yt,{children:[e.jsx(en,{children:o("names.confirmTitle")}),e.jsx(tn,{dangerouslySetInnerHTML:{__html:o("names.confirmBody",{name:`<b>@${vn(n)}</b>`})}}),e.jsxs(nn,{children:[e.jsx(sn,{"aria-hidden":!0,children:"@"}),e.jsx(on,{value:m,onChange:b=>w(b.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":o("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(m.length,8)}ch`}}),e.jsx(rn,{children:".dcl.eth"})]})]}),e.jsx(ze,{onClick:()=>void C(),disabled:!y||!u,children:o("names.buyCta")})]})]}),a==="completing"&&e.jsxs(an,{children:[e.jsx(ln,{src:Bt,alt:"",width:56,height:56}),e.jsx(cn,{children:R?o("names.confirming"):o("names.completing")}),e.jsxs(dn,{children:[e.jsx(fn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(pn,{children:"1/1"})]})]}),a==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(we,{children:[e.jsx(ve,{children:o("names.successHeaderTitle")}),e.jsx(je,{onClick:f,"aria-label":o("buyModal.close"),children:e.jsx(N,{name:"close"})})]}),e.jsxs($e,{children:[o("names.myCreditsBalance")," ",e.jsx(F,{})," ",he(h,l)]}),e.jsx(Ce,{}),e.jsxs(un,{children:[e.jsx(xn,{"aria-hidden":!0,children:e.jsx(N,{name:"check"})}),e.jsxs(hn,{children:[e.jsx("b",{children:o("names.successBannerBold")})," ",o("names.successBannerRest")]})]}),e.jsxs(ke,{style:{marginTop:20},children:[e.jsx(Se,{"aria-hidden":!0,children:"@"}),e.jsxs(Re,{children:[e.jsxs(Ie,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Ee,{children:o("names.subtitle")})]}),e.jsxs(Te,{children:[e.jsx(F,{}),S]})]}),e.jsxs(mn,{children:[e.jsx(gn,{onClick:()=>{f(),d("/my-assets")},children:o("names.myItems")}),e.jsx(bn,{href:W.profileUrl,target:"_blank",rel:"noopener noreferrer",children:o("names.assignToAvatar")})]})]})]})})}function vn(n){return n.replace(/[&<>"']/g,r=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[r])}const jn=s.div`
369
+ `;function wn({name:n,priceCredits:r,onClose:f}){const{session:u}=oe(),{data:h,isError:l}=tt(u),c=Ne(),d=Ze(),[a,x]=p.useState("confirm"),[m,w]=p.useState(""),[j,k]=p.useState(null),g=p.useRef(!1),y=m.trim().toLowerCase()===n.toLowerCase(),v=a==="completing",S=r!=null?_e(r):"—";p.useEffect(()=>{const b=T=>{T.key==="Escape"&&!v&&f()};document.addEventListener("keydown",b);const _=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",b),document.body.style.overflow=_}},[v,f]);async function C(){if(!(!u||!y||g.current)){g.current=!0,x("completing"),k(null);try{await Zt({name:n,identity:u.identity,signer:u.signer}),D("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:r??null}),c.invalidateQueries({queryKey:["usd-balance"]}),c.invalidateQueries({queryKey:["my-assets"]}),x("success")}catch(b){D(ot(b)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:st(b),purchase_type:"name"}),k((b==null?void 0:b.message)||o("names.errorGeneric")),x("error")}finally{g.current=!1}}}const E=a!=="success",R=nt(u==null?void 0:u.providerType);return e.jsx(Jt,{onClick:v?void 0:f,role:"presentation",children:e.jsxs(Xt,{role:"dialog","aria-modal":"true","aria-label":o("names.buyTitle"),onClick:b=>b.stopPropagation(),children:[E&&e.jsxs(e.Fragment,{children:[e.jsxs(we,{children:[e.jsx(ve,{children:a==="error"?o("names.errorTitle"):o("names.buyTitle")}),e.jsx(je,{onClick:f,disabled:v,"aria-label":o("buyModal.close"),children:e.jsx(N,{name:"close"})})]}),e.jsxs($e,{children:[o("names.myCreditsBalance")," ",e.jsx(F,{})," ",he(h,l)]}),e.jsx(Ce,{})]}),(a==="confirm"||a==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(ke,{children:[e.jsx(Se,{"aria-hidden":!0,children:"@"}),e.jsxs(Re,{children:[e.jsxs(Ee,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Ie,{children:o("names.subtitle")})]}),e.jsxs(Te,{children:[e.jsx(F,{}),S]})]}),a==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(yn,{children:[e.jsx(N,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),e.jsx(ze,{onClick:()=>x("confirm"),children:o("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Yt,{children:[e.jsx(en,{children:o("names.confirmTitle")}),e.jsx(tn,{dangerouslySetInnerHTML:{__html:o("names.confirmBody",{name:`<b>@${vn(n)}</b>`})}}),e.jsxs(nn,{children:[e.jsx(sn,{"aria-hidden":!0,children:"@"}),e.jsx(on,{value:m,onChange:b=>w(b.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":o("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(m.length,8)}ch`}}),e.jsx(rn,{children:".dcl.eth"})]})]}),e.jsx(ze,{onClick:()=>void C(),disabled:!y||!u,children:o("names.buyCta")})]})]}),a==="completing"&&e.jsxs(an,{children:[e.jsx(ln,{src:Bt,alt:"",width:56,height:56}),e.jsx(cn,{children:R?o("names.confirming"):o("names.completing")}),e.jsxs(dn,{children:[e.jsx(fn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(pn,{children:"1/1"})]})]}),a==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(we,{children:[e.jsx(ve,{children:o("names.successHeaderTitle")}),e.jsx(je,{onClick:f,"aria-label":o("buyModal.close"),children:e.jsx(N,{name:"close"})})]}),e.jsxs($e,{children:[o("names.myCreditsBalance")," ",e.jsx(F,{})," ",he(h,l)]}),e.jsx(Ce,{}),e.jsxs(un,{children:[e.jsx(xn,{"aria-hidden":!0,children:e.jsx(N,{name:"check"})}),e.jsxs(hn,{children:[e.jsx("b",{children:o("names.successBannerBold")})," ",o("names.successBannerRest")]})]}),e.jsxs(ke,{style:{marginTop:20},children:[e.jsx(Se,{"aria-hidden":!0,children:"@"}),e.jsxs(Re,{children:[e.jsxs(Ee,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Ie,{children:o("names.subtitle")})]}),e.jsxs(Te,{children:[e.jsx(F,{}),S]})]}),e.jsxs(mn,{children:[e.jsx(gn,{onClick:()=>{f(),d("/my-assets")},children:o("names.myItems")}),e.jsx(bn,{href:H.profileUrl,target:"_blank",rel:"noopener noreferrer",children:o("names.assignToAvatar")})]})]})]})})}function vn(n){return n.replace(/[&<>"']/g,r=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[r])}const jn=s.div`
370
370
  width: 100%;
371
371
  min-width: 0;
372
372
  `,$n=s.nav`
@@ -425,12 +425,12 @@ import{u as Ze,r as p,j as e,b as Je}from"./react-C51i12iP.js";import{p as W,h a
425
425
  padding: 40px 20px;
426
426
  gap: 28px;
427
427
  }
428
- `,In=s.div`
428
+ `,En=s.div`
429
429
  display: flex;
430
430
  flex-direction: column;
431
431
  align-items: center;
432
432
  gap: 12px;
433
- `,En=s.h1`
433
+ `,In=s.h1`
434
434
  margin: 0;
435
435
  font-family: ${t.font.sans};
436
436
  font-weight: 600;
@@ -460,7 +460,7 @@ import{u as Ze,r as p,j as e,b as Je}from"./react-C51i12iP.js";import{p as W,h a
460
460
  gap: 12px;
461
461
  `,Nn=s.div`
462
462
  position: relative;
463
- `,An=s("div",Ft("invalid"))`
463
+ `,_n=s("div",Ft("invalid"))`
464
464
  display: flex;
465
465
  align-items: center;
466
466
  gap: 8px;
@@ -476,7 +476,7 @@ import{u as Ze,r as p,j as e,b as Je}from"./react-C51i12iP.js";import{p as W,h a
476
476
  ${t.media.down("mobile")} {
477
477
  border-radius: 16px;
478
478
  }
479
- `,_n=s.span`
479
+ `,An=s.span`
480
480
  position: absolute;
481
481
  left: -9999px;
482
482
  top: 0;
@@ -572,7 +572,7 @@ import{u as Ze,r as p,j as e,b as Je}from"./react-C51i12iP.js";import{p as W,h a
572
572
  ${t.media.down("mobile")} {
573
573
  font-size: 16px;
574
574
  }
575
- `,Wn=s.span`
575
+ `,Hn=s.span`
576
576
  flex: none;
577
577
  margin-left: 2px;
578
578
  font-family: ${t.font.sans};
@@ -584,7 +584,7 @@ import{u as Ze,r as p,j as e,b as Je}from"./react-C51i12iP.js";import{p as W,h a
584
584
  ${t.media.down("mobile")} {
585
585
  font-size: 16px;
586
586
  }
587
- `,Hn=s.span`
587
+ `,Wn=s.span`
588
588
  flex: none;
589
589
  font-family: ${t.font.sans};
590
590
  font-size: 13px;
@@ -755,4 +755,4 @@ import{u as Ze,r as p,j as e,b as Je}from"./react-C51i12iP.js";import{p as W,h a
755
755
  clip: rect(0, 0, 0, 0);
756
756
  white-space: nowrap;
757
757
  border: 0;
758
- `,Zn="https://docs.decentraland.org/creator/worlds/about/";function Jn(n){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(n)}`}function Xn({onBack:n}){_e({title:o("seo.names.title"),description:o("seo.names.description")});const{session:r,signIn:f}=oe(),{data:u}=Me(),h=u?Pe(H,u):null,[l,c]=p.useState(""),[d,a]=p.useState("idle"),[x,m]=p.useState(!1),w=p.useRef(null),[j,k]=p.useState(void 0);p.useLayoutEffect(()=>{w.current&&k(w.current.offsetWidth)},[l]),p.useEffect(()=>{if(!be(l).ok){a(l.length===0?"idle":"invalid");return}a("checking");const I=new AbortController,R=setTimeout(()=>{(async()=>{try{const b=await Gt(l,{signal:I.signal});a(b)}catch(b){if((b==null?void 0:b.name)==="AbortError")return;a("error")}})()},400);return()=>{clearTimeout(R),I.abort()}},[l]);const g=be(l),y=g.ok&&(d==="available"||d==="error");function v(){if(y){if(!r){f();return}m(!0)}}const S=e.jsxs(e.Fragment,{children:[o("names.claim"),h!=null?e.jsxs(Un,{children:[e.jsx(F,{}),Ae(h)]}):null]});return e.jsxs(jn,{"data-testid":"names-page",children:[e.jsxs($n,{"aria-label":o("names.breadcrumbAria"),children:[e.jsx(Cn,{onClick:n,children:o("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(kn,{children:o("names.breadcrumbCurrent")})]}),e.jsxs(Sn,{children:[e.jsxs(Rn,{children:[e.jsxs(In,{children:[e.jsx(En,{children:o("names.heroTitle")}),e.jsx(Tn,{children:o("names.heroSubtitle")})]}),e.jsxs(zn,{children:[e.jsxs(Nn,{children:[e.jsxs(An,{invalid:d==="taken",children:[e.jsxs(Ln,{children:[e.jsx(Bn,{"aria-hidden":!0,children:"@"}),e.jsx(Fn,{value:l,onChange:C=>c(Ht(C.target.value)),placeholder:o("names.inputPlaceholder"),"aria-label":o("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:V,style:{width:j!=null?`${j}px`:void 0}}),e.jsx(_n,{ref:w,"aria-hidden":!0,children:l||o("names.inputPlaceholder")}),e.jsx(Wn,{children:o("names.suffix")})]}),l.length>0?e.jsxs(Hn,{"aria-hidden":!0,children:[l.length,"/",V]}):null,e.jsx(Fe,{onClick:v,disabled:!y,"data-testid":"names-claim",children:S})]}),d==="taken"?e.jsxs(Pn,{role:"status","data-testid":"names-taken",children:[e.jsx(N,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:o("names.taken")}),e.jsxs(Mn,{href:Jn(l),target:"_blank",rel:"noopener noreferrer",children:[o("names.takenMakeOffer"),e.jsx(N,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(On,{onClick:v,disabled:!y,children:S}),d==="checking"?e.jsx(J,{tone:"muted",role:"status","data-testid":"names-checking",children:o("names.checking")}):d==="error"?e.jsx(J,{tone:"muted",role:"status",children:o("names.checkError")}):d==="invalid"&&!g.ok&&g.reason==="too-short"?e.jsx(J,{tone:"muted",role:"status",children:o("names.tooShort",{min:Le})}):null,e.jsx(Qn,{role:"status","aria-live":"polite",children:d==="available"?o("names.available",{name:l}):""})]})]}),e.jsxs(Gn,{children:[e.jsx(qn,{children:o("names.whyTitle")}),e.jsxs(Dn,{children:[e.jsxs(X,{children:[e.jsx(Y,{"aria-hidden":!0}),e.jsx(ee,{children:e.jsx(te,{children:o("names.why1")})})]}),e.jsxs(X,{children:[e.jsx(Y,{"aria-hidden":!0}),e.jsxs(ee,{children:[e.jsx(te,{children:o("names.why2")}),e.jsxs(Vn,{href:Zn,target:"_blank",rel:"noopener noreferrer",children:[o("names.why2Link"),e.jsx(N,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(X,{children:[e.jsx(Y,{"aria-hidden":!0}),e.jsxs(ee,{children:[e.jsx(te,{children:o("names.why3")}),e.jsx(Kn,{children:o("names.why3Link")})]})]})]})]})]}),x?e.jsx(wn,{name:l,priceCredits:h,onClose:()=>m(!1)}):null]})}const ne=48;function Yn(n){return{tradeId:n.tradeId??n.id,listingType:"primary",contractAddress:n.contractAddress,itemId:n.itemId??"",name:n.name,thumbnail:n.thumbnail,rarity:n.rarity,category:n.category,wearableCategory:n.wearableCategory??null,creator:n.creator,manaWei:n.manaWei??"0",available:1,network:n.network,chainId:n.chainId,createdAt:0}}function Cs(){const[n]=Je(),r=(n.get("q")??"").trim().toLowerCase(),f=Ne(),{session:u,signIn:h}=oe(),l=(n.get("q")??"").trim();_e({title:l?o("seo.collectibles.searchTitle",{query:l}):o("seo.collectibles.title"),description:o("seo.collectibles.description")});const[c,d]=p.useState("wearable"),[a,x]=p.useState(null),[m,w]=p.useState([]),[j,k]=p.useState(""),[g,y]=p.useState(""),[v,S]=p.useState("on_sale"),[C,I]=p.useState(!1),[R,b]=p.useState("newest"),[A,T]=p.useState(!1),[re,K]=p.useState(null);p.useEffect(()=>{if(!A)return;const i=B=>{B.key==="Escape"&&T(!1)};document.addEventListener("keydown",i);const $=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",i),document.body.style.overflow=$}},[A]);const O=v==="on_sale",_=j&&!Number.isNaN(Number(j))?Number(j):void 0,P=g&&!Number.isNaN(Number(g))?Number(g):void 0,ie=a?$t[a]:void 0,ae=(me.find(i=>i.key===R)??me[0]).server,le={category:c,rarities:m.length?m:void 0,wearableCategories:ie,minPriceCredits:_,maxPriceCredits:P,search:r||void 0,sortBy:ae,isSmart:C||void 0,onSale:!0},ce={category:c,rarities:m.length?m:void 0,wearableCategories:ie,search:r||void 0,sortBy:ae,isWearableSmart:C||void 0,isOnSale:v==="not_for_sale"?!1:void 0},{items:M,total:de,isLoading:E,isPlaceholderData:z,error:We,hasNextPage:He,isFetchingNextPage:fe,fetchNextPage:Oe}=St(O?["shop-items",le]:["catalog-items",ce],i=>O?it({...le,first:ne,skip:i}):at({...ce,first:ne,skip:i}),{enabled:c!=="names"}),U=de,Ue=E||z,Ge=E?15:Math.min(Math.max(M.length,1),ne),{data:G,isError:qe}=Me(),De=i=>G&&i.manaWei?Pe(i.manaWei,G):null,pe=p.useRef(null);p.useEffect(()=>{E||z||!r||pe.current===r||(pe.current=r,D("Shop Searched",{query:r,result_count:U}))},[r,E,z,U]);const q=p.useRef("__init__");p.useEffect(()=>{if(E||z)return;const i=JSON.stringify({category:c,subCategory:a,rarities:m,min:_,max:P,sort:R,status:v,smart:C});if(q.current==="__init__"||q.current===i){q.current=i;return}q.current=i,D("Shop Applied Filter",{filters:{category:c,sub_category:a,rarities:m,min_price_credits:_??null,max_price_credits:P??null,status:v,smart:C,sort:R},result_count:U})},[c,a,m,_,P,R,v,C,E,z,U]);function ue(i){d(i),x(null)}function xe(i){w($=>$.includes(i)?$.filter(B=>B!==i):[...$,i])}function Ve(){d("wearable"),x(null),w([]),k(""),y(""),S("on_sale"),I(!1)}function Ke(i){const $=M.find(B=>B.id===i.id);if(!(!$||$.source!=="legacy"||!$.manaWei)){if(!u){h();return}K(Yn($))}}function Qe(){f.invalidateQueries({queryKey:["shop-items"]})}const L=[];(_!=null||P!=null)&&L.push({key:"price",label:o("filter.price"),onRemove:()=>{k(""),y("")}});for(const i of vt)m.includes(i)&&L.push({key:`rarity-${i}`,label:rt(i),onRemove:()=>xe(i)});return C&&L.push({key:"smart",label:o("filter.smart"),onRemove:()=>I(!1)}),v!=="on_sale"&&L.push({key:"status",label:v==="all"?o("filter.statusAll"):o("filter.notForSale"),onRemove:()=>S("on_sale")}),e.jsxs(dt,{"data-testid":"browse",children:[c!=="names"&&e.jsxs(e.Fragment,{children:[A?e.jsx(ft,{onClick:()=>T(!1),"aria-hidden":!0}):null,e.jsxs(pt,{className:A?"is-open":"","data-testid":"browse-sidebar",children:[e.jsxs(ut,{children:[e.jsx(xt,{children:o("assets.filters")}),e.jsx(ht,{onClick:()=>T(!1),"aria-label":o("assets.closeFilters"),children:"✕"})]}),e.jsx(mt,{children:e.jsx(gt,{category:c,subCategory:a,onCategory:ue,onSub:x,priceMin:j,priceMax:g,onPriceMin:k,onPriceMax:y,rarities:m,onToggleRarity:xe,status:v,onStatus:S,smart:C,onSmart:I})}),e.jsx(bt,{children:e.jsx(yt,{type:"button",onClick:()=>T(!1),children:o("assets.showItems")})})]})]}),e.jsx(wt,{children:c==="names"?e.jsx(Xn,{onBack:()=>ue("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(jt,{sort:R,onSort:b,total:de,loading:E||z,query:r,onOpenFilters:()=>T(!0),chips:L,onClearChips:Ve}),qe&&O&&M.some(i=>i.source==="legacy")?e.jsx("p",{className:"market-banner market-banner--warn",children:o("assets.marketUnavailable")}):null,We?e.jsx(Rt,{message:o("assets.loadError"),testId:"browse-error"}):null,e.jsx("div",{className:"grid","data-testid":"grid",children:Ue?e.jsx(ge,{count:Ge}):e.jsxs(e.Fragment,{children:[M.map(i=>{if(!O)return e.jsx(Q,{item:i,mode:"view"},Z(i));const $=i;return $.source==="legacy"?e.jsx(Q,{item:$,mode:"market",marketPriceCredits:De($),onBuyNow:Ke},Z(i)):e.jsx(Q,{item:i},Z(i))}),fe?e.jsx(ge,{count:6}):null]})}),e.jsx(Ct,{hasNextPage:He,isFetching:fe,onLoadMore:()=>void Oe()}),!E&&!z&&M.length===0?e.jsx("p",{className:"muted",children:o("assets.noItems")}):null]})}),re&&G?e.jsx(kt,{listing:re,rate:G,onClose:()=>K(null),onSold:()=>{K(null),Qe()}}):null]})}export{Cs as Assets};
758
+ `,Zn="https://docs.decentraland.org/creator/worlds/about/";function Jn(n){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(n)}`}function Xn({onBack:n}){Ae({title:o("seo.names.title"),description:o("seo.names.description")});const{session:r,signIn:f}=oe(),{data:u}=Me(),h=u?Pe(W,u):null,[l,c]=p.useState(""),[d,a]=p.useState("idle"),[x,m]=p.useState(!1),w=p.useRef(null),[j,k]=p.useState(void 0);p.useLayoutEffect(()=>{w.current&&k(w.current.offsetWidth)},[l]),p.useEffect(()=>{if(!be(l).ok){a(l.length===0?"idle":"invalid");return}a("checking");const E=new AbortController,R=setTimeout(()=>{(async()=>{try{const b=await Gt(l,{signal:E.signal});a(b)}catch(b){if((b==null?void 0:b.name)==="AbortError")return;a("error")}})()},400);return()=>{clearTimeout(R),E.abort()}},[l]);const g=be(l),y=g.ok&&(d==="available"||d==="error");function v(){if(y){if(!r){f();return}m(!0)}}const S=e.jsxs(e.Fragment,{children:[o("names.claim"),h!=null?e.jsxs(Un,{children:[e.jsx(F,{}),_e(h)]}):null]});return e.jsxs(jn,{"data-testid":"names-page",children:[e.jsxs($n,{"aria-label":o("names.breadcrumbAria"),children:[e.jsx(Cn,{onClick:n,children:o("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(kn,{children:o("names.breadcrumbCurrent")})]}),e.jsxs(Sn,{children:[e.jsxs(Rn,{children:[e.jsxs(En,{children:[e.jsx(In,{children:o("names.heroTitle")}),e.jsx(Tn,{children:o("names.heroSubtitle")})]}),e.jsxs(zn,{children:[e.jsxs(Nn,{children:[e.jsxs(_n,{invalid:d==="taken",children:[e.jsxs(Ln,{children:[e.jsx(Bn,{"aria-hidden":!0,children:"@"}),e.jsx(Fn,{value:l,onChange:C=>c(Wt(C.target.value)),placeholder:o("names.inputPlaceholder"),"aria-label":o("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:V,style:{width:j!=null?`${j}px`:void 0}}),e.jsx(An,{ref:w,"aria-hidden":!0,children:l||o("names.inputPlaceholder")}),e.jsx(Hn,{children:o("names.suffix")})]}),l.length>0?e.jsxs(Wn,{"aria-hidden":!0,children:[l.length,"/",V]}):null,e.jsx(Fe,{onClick:v,disabled:!y,"data-testid":"names-claim",children:S})]}),d==="taken"?e.jsxs(Pn,{role:"status","data-testid":"names-taken",children:[e.jsx(N,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:o("names.taken")}),e.jsxs(Mn,{href:Jn(l),target:"_blank",rel:"noopener noreferrer",children:[o("names.takenMakeOffer"),e.jsx(N,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(On,{onClick:v,disabled:!y,children:S}),d==="checking"?e.jsx(J,{tone:"muted",role:"status","data-testid":"names-checking",children:o("names.checking")}):d==="error"?e.jsx(J,{tone:"muted",role:"status",children:o("names.checkError")}):d==="invalid"&&!g.ok&&g.reason==="too-short"?e.jsx(J,{tone:"muted",role:"status",children:o("names.tooShort",{min:Le})}):null,e.jsx(Qn,{role:"status","aria-live":"polite",children:d==="available"?o("names.available",{name:l}):""})]})]}),e.jsxs(Gn,{children:[e.jsx(qn,{children:o("names.whyTitle")}),e.jsxs(Dn,{children:[e.jsxs(X,{children:[e.jsx(Y,{"aria-hidden":!0}),e.jsx(ee,{children:e.jsx(te,{children:o("names.why1")})})]}),e.jsxs(X,{children:[e.jsx(Y,{"aria-hidden":!0}),e.jsxs(ee,{children:[e.jsx(te,{children:o("names.why2")}),e.jsxs(Vn,{href:Zn,target:"_blank",rel:"noopener noreferrer",children:[o("names.why2Link"),e.jsx(N,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(X,{children:[e.jsx(Y,{"aria-hidden":!0}),e.jsxs(ee,{children:[e.jsx(te,{children:o("names.why3")}),e.jsx(Kn,{children:o("names.why3Link")})]})]})]})]})]}),x?e.jsx(wn,{name:l,priceCredits:h,onClose:()=>m(!1)}):null]})}const ne=48;function Yn(n){return{tradeId:n.tradeId??n.id,listingType:"primary",contractAddress:n.contractAddress,itemId:n.itemId??"",name:n.name,thumbnail:n.thumbnail,rarity:n.rarity,category:n.category,wearableCategory:n.wearableCategory??null,creator:n.creator,manaWei:n.manaWei??"0",available:1,network:n.network,chainId:n.chainId,createdAt:0}}function Cs(){const[n]=Je(),r=(n.get("q")??"").trim().toLowerCase(),f=Ne(),{session:u,signIn:h}=oe(),l=(n.get("q")??"").trim();Ae({title:l?o("seo.collectibles.searchTitle",{query:l}):o("seo.collectibles.title"),description:o("seo.collectibles.description")});const[c,d]=p.useState("wearable"),[a,x]=p.useState(null),[m,w]=p.useState([]),[j,k]=p.useState(""),[g,y]=p.useState(""),[v,S]=p.useState("on_sale"),[C,E]=p.useState(!1),[R,b]=p.useState("newest"),[_,T]=p.useState(!1),[re,K]=p.useState(null);p.useEffect(()=>{if(!_)return;const i=B=>{B.key==="Escape"&&T(!1)};document.addEventListener("keydown",i);const $=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",i),document.body.style.overflow=$}},[_]);const O=v==="on_sale",A=j&&!Number.isNaN(Number(j))?Number(j):void 0,P=g&&!Number.isNaN(Number(g))?Number(g):void 0,ie=a?$t[a]:void 0,ae=(me.find(i=>i.key===R)??me[0]).server,le={category:c,rarities:m.length?m:void 0,wearableCategories:ie,minPriceCredits:A,maxPriceCredits:P,search:r||void 0,sortBy:ae,isSmart:C||void 0,onSale:!0},ce={category:c,rarities:m.length?m:void 0,wearableCategories:ie,search:r||void 0,sortBy:ae,isWearableSmart:C||void 0,isOnSale:v==="not_for_sale"?!1:void 0},{items:M,total:de,isLoading:I,isPlaceholderData:z,error:He,hasNextPage:We,isFetchingNextPage:fe,fetchNextPage:Oe}=St(O?["shop-items",le]:["catalog-items",ce],i=>O?it({...le,first:ne,skip:i}):at({...ce,first:ne,skip:i}),{enabled:c!=="names"}),U=de,Ue=I||z,Ge=I?15:Math.min(Math.max(M.length,1),ne),{data:G,isError:qe}=Me(),De=i=>G&&i.manaWei?Pe(i.manaWei,G):null,pe=p.useRef(null);p.useEffect(()=>{I||z||!r||pe.current===r||(pe.current=r,D("Shop Searched",{query:r,result_count:U}))},[r,I,z,U]);const q=p.useRef("__init__");p.useEffect(()=>{if(I||z)return;const i=JSON.stringify({category:c,subCategory:a,rarities:m,min:A,max:P,sort:R,status:v,smart:C});if(q.current==="__init__"||q.current===i){q.current=i;return}q.current=i,D("Shop Applied Filter",{filters:{category:c,sub_category:a,rarities:m,min_price_credits:A??null,max_price_credits:P??null,status:v,smart:C,sort:R},result_count:U})},[c,a,m,A,P,R,v,C,I,z,U]);function ue(i){d(i),x(null)}function xe(i){w($=>$.includes(i)?$.filter(B=>B!==i):[...$,i])}function Ve(){d("wearable"),x(null),w([]),k(""),y(""),S("on_sale"),E(!1)}function Ke(i){const $=M.find(B=>B.id===i.id);if(!(!$||$.source!=="legacy"||!$.manaWei)){if(!u){h();return}K(Yn($))}}function Qe(){f.invalidateQueries({queryKey:["shop-items"]})}const L=[];(A!=null||P!=null)&&L.push({key:"price",label:o("filter.price"),onRemove:()=>{k(""),y("")}});for(const i of vt)m.includes(i)&&L.push({key:`rarity-${i}`,label:rt(i),onRemove:()=>xe(i)});return C&&L.push({key:"smart",label:o("filter.smart"),onRemove:()=>E(!1)}),v!=="on_sale"&&L.push({key:"status",label:v==="all"?o("filter.statusAll"):o("filter.notForSale"),onRemove:()=>S("on_sale")}),e.jsxs(dt,{"data-testid":"browse",children:[c!=="names"&&e.jsxs(e.Fragment,{children:[_?e.jsx(ft,{onClick:()=>T(!1),"aria-hidden":!0}):null,e.jsxs(pt,{className:_?"is-open":"","data-testid":"browse-sidebar",children:[e.jsxs(ut,{children:[e.jsx(xt,{children:o("assets.filters")}),e.jsx(ht,{onClick:()=>T(!1),"aria-label":o("assets.closeFilters"),children:"✕"})]}),e.jsx(mt,{children:e.jsx(gt,{category:c,subCategory:a,onCategory:ue,onSub:x,priceMin:j,priceMax:g,onPriceMin:k,onPriceMax:y,rarities:m,onToggleRarity:xe,status:v,onStatus:S,smart:C,onSmart:E})}),e.jsx(bt,{children:e.jsx(yt,{type:"button",onClick:()=>T(!1),children:o("assets.showItems")})})]})]}),e.jsx(wt,{children:c==="names"?e.jsx(Xn,{onBack:()=>ue("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(jt,{sort:R,onSort:b,total:de,loading:I||z,query:r,onOpenFilters:()=>T(!0),chips:L,onClearChips:Ve}),qe&&O&&M.some(i=>i.source==="legacy")?e.jsx("p",{className:"market-banner market-banner--warn",children:o("assets.marketUnavailable")}):null,He?e.jsx(Rt,{message:o("assets.loadError"),testId:"browse-error"}):null,e.jsx("div",{className:"grid","data-testid":"grid",children:Ue?e.jsx(ge,{count:Ge}):e.jsxs(e.Fragment,{children:[M.map(i=>{if(!O)return e.jsx(Q,{item:i,mode:"view"},Z(i));const $=i;return $.source==="legacy"?e.jsx(Q,{item:$,mode:"market",marketPriceCredits:De($),onBuyNow:Ke},Z(i)):e.jsx(Q,{item:i},Z(i))}),fe?e.jsx(ge,{count:6}):null]})}),e.jsx(Ct,{hasNextPage:We,isFetching:fe,onLoadMore:()=>void Oe()}),!I&&!z&&M.length===0?e.jsx("p",{className:"muted",children:o("assets.noItems")}):null]})}),re&&G?e.jsx(kt,{listing:re,rate:G,onClose:()=>K(null),onSold:()=>{K(null),Qe()}}):null]})}export{Cs as Assets};
@@ -1,4 +1,4 @@
1
- import{r as y,j as t}from"./react-C51i12iP.js";import{R as z,a as oe,C as ie,c as ne}from"./categories-DDZgtl6y.js";import{T as se}from"./Tooltip-BjVKL7Fw.js";import{F as e,s as o,I as m,t as s,G as re,e as v}from"./index-k1Bog_tr.js";import{n as c}from"./emotion-CSxEP8yM.js";const ae=o.div`
1
+ import{r as y,j as t}from"./react-BXazHbBy.js";import{R as z,a as oe,C as ie,c as ne}from"./categories-q4cmLb4w.js";import{T as se}from"./Tooltip-CMiyDsYT.js";import{G as e,s as o,I as m,t as s,H as re,e as v}from"./index-N282EqWL.js";import{n as c}from"./emotion-CSxEP8yM.js";const ae=o.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 12px;
@@ -100,7 +100,7 @@ import{r as y,j as t}from"./react-C51i12iP.js";import{R as z,a as oe,C as ie,c a
100
100
  font-weight: 400;
101
101
  font-size: 12px;
102
102
  color: ${e.colors.muted};
103
- `,F=o.span`
103
+ `,P=o.span`
104
104
  display: flex;
105
105
  align-items: center;
106
106
  gap: 4px;
@@ -113,7 +113,7 @@ import{r as y,j as t}from"./react-C51i12iP.js";import{R as z,a as oe,C as ie,c a
113
113
  &:focus-within {
114
114
  border-color: ${e.rarities.epic};
115
115
  }
116
- `,P=o(m)`
116
+ `,F=o(m)`
117
117
  width: 16px;
118
118
  height: 16px;
119
119
  color: ${e.colors.rarity};
@@ -300,7 +300,7 @@ import{r as y,j as t}from"./react-C51i12iP.js";import{R as z,a as oe,C as ie,c a
300
300
  display: flex;
301
301
  align-items: center;
302
302
  gap: 6px;
303
- `,Fe=o(m)`
303
+ `,Pe=o(m)`
304
304
  width: 14px;
305
305
  height: 14px;
306
306
  color: ${e.colors.text};
@@ -309,7 +309,7 @@ import{r as y,j as t}from"./react-C51i12iP.js";import{R as z,a as oe,C as ie,c a
309
309
  width: 16px;
310
310
  height: 16px;
311
311
  }
312
- `,Pe=o.span`
312
+ `,Fe=o.span`
313
313
  font-family: ${e.font.sans};
314
314
  font-weight: 600;
315
315
  font-size: 14px;
@@ -367,7 +367,7 @@ import{r as y,j as t}from"./react-C51i12iP.js";import{R as z,a as oe,C as ie,c a
367
367
  height: 18px;
368
368
  left: ${({on:i})=>i?"calc(100% - 18px)":"2px"};
369
369
  }
370
- `,d=1e5;function De(i){var l;for(const x of ie){const p=(l=x.subs)==null?void 0:l.find(r=>r.key===i);if(p)return s(p.labelKey)}return i}function j({title:i,open:l,onToggle:x,summary:p,desktopStatic:r,headerTestId:h,headerAria:u,children:f}){const g=t.jsx(ne,{up:l,size:24,color:"var(--text)"});return t.jsxs(le,{children:[t.jsxs(ce,{type:"button",desktopStatic:r,onClick:x,"aria-expanded":l,"aria-label":u,"data-testid":h,children:[t.jsx(de,{children:i}),r?t.jsx(pe,{children:g}):g]}),!l&&p?t.jsx(he,{desktopHidden:r,children:p}):null,t.jsx(xe,{open:l,desktopStatic:r,children:t.jsx(ge,{children:f})})]})}function Me({category:i,subCategory:l,onCategory:x,onSub:p,priceMin:r,priceMax:h,onPriceMin:u,onPriceMax:f,rarities:g,onToggleRarity:E,status:S,onStatus:L,smart:b,onSmart:O}){const[_,Y]=y.useState(!0),[M,B]=y.useState(!0),[G,K]=y.useState(!1),[U,W]=y.useState(!0),R=r&&!Number.isNaN(Number(r))?Number(r):void 0,C=h&&!Number.isNaN(Number(h))?Number(h):void 0,w=R!=null?Math.min(R,d):0,$=C!=null?Math.min(C,d):d,V=w/d*100,X=$/d*100;function q(n){const a=Math.min(n,$);u(a<=0?"":String(a))}function J(n){const a=Math.max(n,w);f(a>=d?"":String(a))}const Q=l?De(l):i!=="wearable"?s(`categories.${i==="emote"?"emotes":i==="all"?"shopAll":i}`):"",Z=R!=null||C!=null?`${r||"0"}-${h||"∞"}`:"",ee=z.filter(n=>g.includes(n)).map(re).join(", "),te=S==="on_sale"?s("filter.onSale"):S==="not_for_sale"?s("filter.notForSale"):"";return t.jsxs(ae,{children:[t.jsx(j,{title:s("assets.category"),open:_,onToggle:()=>Y(n=>!n),summary:Q,desktopStatic:!0,children:t.jsx(oe,{category:i,subCategory:l,onCategory:x,onSub:p})}),t.jsx(k,{}),t.jsxs(j,{title:s("filter.price"),open:M,onToggle:()=>B(n=>!n),summary:Z,desktopStatic:!0,children:[t.jsxs(me,{children:[t.jsxs(T,{children:[t.jsx(N,{children:s("assets.min")}),t.jsxs(F,{children:[t.jsx(P,{name:v.iconName,"aria-hidden":!0}),t.jsx(I,{type:"number",min:"0","aria-label":s("assets.minPriceAria"),placeholder:"0",value:r,onChange:n=>u(n.target.value)})]})]}),t.jsx(ue,{children:s("assets.priceTo")}),t.jsxs(T,{children:[t.jsx(N,{children:s("assets.max")}),t.jsxs(F,{children:[t.jsx(P,{name:v.iconName,"aria-hidden":!0}),t.jsx(I,{type:"number",min:"0","aria-label":s("assets.maxPriceAria"),placeholder:"0",value:h,onChange:n=>f(n.target.value)})]})]})]}),t.jsxs(fe,{children:[t.jsx(be,{"aria-hidden":!0}),t.jsx(we,{minPct:V,maxPct:X,"aria-hidden":!0}),t.jsx(A,{type:"range",min:0,max:d,value:w,"aria-label":s("assets.minPriceSliderAria"),onChange:n=>q(Number(n.target.value))}),t.jsx(A,{type:"range",min:0,max:d,value:$,"aria-label":s("assets.maxPriceSliderAria"),onChange:n=>J(Number(n.target.value))})]}),t.jsxs($e,{children:[t.jsxs(H,{children:[t.jsx(D,{name:v.iconName,"aria-hidden":!0}),w.toLocaleString()]}),t.jsxs(H,{children:[t.jsx(D,{name:v.iconName,"aria-hidden":!0}),$.toLocaleString()]})]})]}),t.jsx(k,{}),t.jsx(j,{title:s("assets.rarity"),open:G,onToggle:()=>K(n=>!n),summary:ee,headerTestId:"sidebar-section-toggle",children:t.jsx(ye,{"data-testid":"rarity-filter",children:z.map(n=>{const a=g.includes(n);return t.jsxs(ve,{type:"button",selected:a,"aria-pressed":a,onClick:()=>E(n),"data-testid":"rarity-filter-check",children:[t.jsx(ke,{color:e.rarities[n],children:a?t.jsx(je,{name:"check","aria-hidden":!0}):null}),t.jsx(Se,{selected:a,children:n})]},n)})})}),t.jsx(k,{}),t.jsx(j,{title:s("filter.status"),open:U,onToggle:()=>W(n=>!n),summary:te,children:[["all",s("filter.statusAll")],["on_sale",s("filter.onSale")],["not_for_sale",s("filter.notForSale")]].map(([n,a])=>t.jsxs(Re,{children:[t.jsx(Ce,{type:"radio",name:"shop-status",checked:S===n,onChange:()=>L(n)}),t.jsx(ze,{children:a})]},n))}),t.jsx(k,{}),t.jsxs(Te,{children:[t.jsxs(Ne,{children:[t.jsx(Fe,{name:"smart","aria-hidden":!0}),t.jsx(Pe,{children:s("filter.smart")}),t.jsx(se,{content:s("filter.smartHint"),placement:"bottom",children:t.jsx(Ie,{name:"info",role:"img","aria-label":s("filter.smartHint"),tabIndex:0})})]}),t.jsx(Ae,{type:"button",role:"switch",on:b,"aria-checked":b,"aria-label":s("filter.smart"),onClick:()=>O(!b),children:t.jsx(He,{on:b})})]})]})}const Be=o.div`
370
+ `,d=1e5;function De(i){var l;for(const x of ie){const p=(l=x.subs)==null?void 0:l.find(r=>r.key===i);if(p)return s(p.labelKey)}return i}function j({title:i,open:l,onToggle:x,summary:p,desktopStatic:r,headerTestId:h,headerAria:u,children:f}){const g=t.jsx(ne,{up:l,size:24,color:"var(--text)"});return t.jsxs(le,{children:[t.jsxs(ce,{type:"button",desktopStatic:r,onClick:x,"aria-expanded":l,"aria-label":u,"data-testid":h,children:[t.jsx(de,{children:i}),r?t.jsx(pe,{children:g}):g]}),!l&&p?t.jsx(he,{desktopHidden:r,children:p}):null,t.jsx(xe,{open:l,desktopStatic:r,children:t.jsx(ge,{children:f})})]})}function Me({category:i,subCategory:l,onCategory:x,onSub:p,priceMin:r,priceMax:h,onPriceMin:u,onPriceMax:f,rarities:g,onToggleRarity:E,status:S,onStatus:L,smart:b,onSmart:O}){const[_,Y]=y.useState(!0),[M,B]=y.useState(!0),[G,K]=y.useState(!1),[U,W]=y.useState(!0),R=r&&!Number.isNaN(Number(r))?Number(r):void 0,C=h&&!Number.isNaN(Number(h))?Number(h):void 0,w=R!=null?Math.min(R,d):0,$=C!=null?Math.min(C,d):d,V=w/d*100,X=$/d*100;function q(n){const a=Math.min(n,$);u(a<=0?"":String(a))}function J(n){const a=Math.max(n,w);f(a>=d?"":String(a))}const Q=l?De(l):i!=="wearable"?s(`categories.${i==="emote"?"emotes":i==="all"?"shopAll":i}`):"",Z=R!=null||C!=null?`${r||"0"}-${h||"∞"}`:"",ee=z.filter(n=>g.includes(n)).map(re).join(", "),te=S==="on_sale"?s("filter.onSale"):S==="not_for_sale"?s("filter.notForSale"):"";return t.jsxs(ae,{children:[t.jsx(j,{title:s("assets.category"),open:_,onToggle:()=>Y(n=>!n),summary:Q,desktopStatic:!0,children:t.jsx(oe,{category:i,subCategory:l,onCategory:x,onSub:p})}),t.jsx(k,{}),t.jsxs(j,{title:s("filter.price"),open:M,onToggle:()=>B(n=>!n),summary:Z,desktopStatic:!0,children:[t.jsxs(me,{children:[t.jsxs(T,{children:[t.jsx(N,{children:s("assets.min")}),t.jsxs(P,{children:[t.jsx(F,{name:v.iconName,"aria-hidden":!0}),t.jsx(I,{type:"number",min:"0","aria-label":s("assets.minPriceAria"),placeholder:"0",value:r,onChange:n=>u(n.target.value)})]})]}),t.jsx(ue,{children:s("assets.priceTo")}),t.jsxs(T,{children:[t.jsx(N,{children:s("assets.max")}),t.jsxs(P,{children:[t.jsx(F,{name:v.iconName,"aria-hidden":!0}),t.jsx(I,{type:"number",min:"0","aria-label":s("assets.maxPriceAria"),placeholder:"0",value:h,onChange:n=>f(n.target.value)})]})]})]}),t.jsxs(fe,{children:[t.jsx(be,{"aria-hidden":!0}),t.jsx(we,{minPct:V,maxPct:X,"aria-hidden":!0}),t.jsx(A,{type:"range",min:0,max:d,value:w,"aria-label":s("assets.minPriceSliderAria"),onChange:n=>q(Number(n.target.value))}),t.jsx(A,{type:"range",min:0,max:d,value:$,"aria-label":s("assets.maxPriceSliderAria"),onChange:n=>J(Number(n.target.value))})]}),t.jsxs($e,{children:[t.jsxs(H,{children:[t.jsx(D,{name:v.iconName,"aria-hidden":!0}),w.toLocaleString()]}),t.jsxs(H,{children:[t.jsx(D,{name:v.iconName,"aria-hidden":!0}),$.toLocaleString()]})]})]}),t.jsx(k,{}),t.jsx(j,{title:s("assets.rarity"),open:G,onToggle:()=>K(n=>!n),summary:ee,headerTestId:"sidebar-section-toggle",children:t.jsx(ye,{"data-testid":"rarity-filter",children:z.map(n=>{const a=g.includes(n);return t.jsxs(ve,{type:"button",selected:a,"aria-pressed":a,onClick:()=>E(n),"data-testid":"rarity-filter-check",children:[t.jsx(ke,{color:e.rarities[n],children:a?t.jsx(je,{name:"check","aria-hidden":!0}):null}),t.jsx(Se,{selected:a,children:n})]},n)})})}),t.jsx(k,{}),t.jsx(j,{title:s("filter.status"),open:U,onToggle:()=>W(n=>!n),summary:te,children:[["all",s("filter.statusAll")],["on_sale",s("filter.onSale")],["not_for_sale",s("filter.notForSale")]].map(([n,a])=>t.jsxs(Re,{children:[t.jsx(Ce,{type:"radio",name:"shop-status",checked:S===n,onChange:()=>L(n)}),t.jsx(ze,{children:a})]},n))}),t.jsx(k,{}),t.jsxs(Te,{children:[t.jsxs(Ne,{children:[t.jsx(Pe,{name:"smart","aria-hidden":!0}),t.jsx(Fe,{children:s("filter.smart")}),t.jsx(se,{content:s("filter.smartHint"),placement:"bottom",children:t.jsx(Ie,{name:"info",role:"img","aria-label":s("filter.smartHint"),tabIndex:0})})]}),t.jsx(Ae,{type:"button",role:"switch",on:b,"aria-checked":b,"aria-label":s("filter.smart"),onClick:()=>O(!b),children:t.jsx(He,{on:b})})]})]})}const Be=o.div`
371
371
  position: relative;
372
372
  display: flex;
373
373
  gap: 32px;