@dcl/shop 0.1.0-29736515487.commit-b64bf82 → 0.1.0-29792819793.commit-bcbfeac

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 (207) hide show
  1. package/assets/{AnimatedBackground-BJBUqhHZ.js → AnimatedBackground-D56igB0H.js} +1 -1
  2. package/assets/Assets-DvxF_g1B.js +1 -0
  3. package/assets/Cart-C75800mc.css +1 -0
  4. package/assets/Cart-Ccc7hMA3.js +3 -0
  5. package/assets/{CircularProgress-C9g4a9bc.js → CircularProgress-B5065SQc.js} +4 -4
  6. package/assets/Collection-CegF4Bg6.js +45 -0
  7. package/assets/Collection-Dpog3TvS.css +1 -0
  8. package/assets/CollectionCarousel-CI_xuvlL.js +1 -0
  9. package/assets/Creator-Cpx_caba.css +1 -0
  10. package/assets/Creator-DMEgGcPH.js +1 -0
  11. package/assets/{CssVarsProvider-Bc8wQjEb.js → CssVarsProvider-Dk1aMrkN.js} +3 -3
  12. package/assets/ErrorNotice-CKeOu_Oi.js +1 -0
  13. package/assets/{ExchangeController-B6lNqmFK.js → ExchangeController-C-7GeeUG.js} +1 -1
  14. package/assets/GetCredits-DkdN8Bhp.js +1 -0
  15. package/assets/{HelpersUtil-zS6eOrPz.js → HelpersUtil-BSdS6suS.js} +1 -1
  16. package/assets/ImportListings-AQXg48hx.js +5 -0
  17. package/assets/{ImportListings-Cdx3om4x.css → ImportListings-Dx8BzO4r.css} +1 -1
  18. package/assets/ItemDetail-5q6iNQ7f.js +29 -0
  19. package/assets/ItemDetail-CV-0-ZkB.css +1 -0
  20. package/assets/LoadMore-CpjVWxfC.js +7 -0
  21. package/assets/MarketCheckout-DOjNy7WS.js +3 -0
  22. package/assets/MyAssets-DyNGSmlq.js +7 -0
  23. package/assets/MyAssets-FkZXy017.css +1 -0
  24. package/assets/MyFavorites-DyIDy1bn.js +3 -0
  25. package/assets/MyPurchases-DvllAazp.js +3 -0
  26. package/assets/NotFound-pLaOVJZH.js +1 -0
  27. package/assets/StoreSettings-Bk5IXwNu.css +1 -0
  28. package/assets/StoreSettings-CGJVKy8y.js +53 -0
  29. package/assets/Success-QRszHOfo.js +98 -0
  30. package/assets/{SwapController-BHBv5Fp0.js → SwapController-NM8NLhBK.js} +1 -1
  31. package/assets/{TradeService-CNoDt48E.js → TradeService-tfJ3u36y.js} +1 -1
  32. package/assets/{W3MFrameProviderSingleton-Bndo_4Rg.js → W3MFrameProviderSingleton-Cw2a6UVb.js} +3 -3
  33. package/assets/{WebCryptoP256-Bt50-H1K.js → WebCryptoP256-DPkQuUHZ.js} +1 -1
  34. package/assets/{basic-Bub5O4ZI.js → basic-Dw_SNPcl.js} +1 -1
  35. package/assets/{biconomy-DuIIEXUB.js → biconomy-CRzlpcf3.js} +1 -1
  36. package/assets/{buy--wjHgZbY.js → buy-BhSXg06e.js} +1 -1
  37. package/assets/{buy-gasless-DaSij0O9.js → buy-gasless-7ufZIH4V.js} +1 -1
  38. package/assets/{cart-checkout-RV2JhHc0.js → cart-checkout-mDO-sH0L.js} +1 -1
  39. package/assets/categories-TbcSl5d3.js +7 -0
  40. package/assets/categories-_8oO8Yih.css +1 -0
  41. package/assets/{ccip-Cbub1KDX.js → ccip-CivR7OIS.js} +1 -1
  42. package/assets/{ccip-C1ke5tRS.js → ccip-DFqwb91R.js} +1 -1
  43. package/assets/collection-C6WmEOVc.js +1 -0
  44. package/assets/{controller-Cn9mR-pN.js → controller-BHb75Qgx.js} +2 -2
  45. package/assets/{core-Z6gT3FaJ.js → core-CbJ-Ervx.js} +4 -4
  46. package/assets/{custom-Djk6BRDC.js → custom-Ccs_ccnL.js} +1 -1
  47. package/assets/{data-capture-CaF6YYAr.js → data-capture-l63W8j3T.js} +1 -1
  48. package/assets/{decimals-BW2hoshz.js → decimals-DuIIGtOu.js} +1 -1
  49. package/assets/{decimals-_kiKzbOr.js → decimals-DzfF7TyV.js} +1 -1
  50. package/assets/{detectExtension-BkZ-FjJy.js → detectExtension-DFGJRiKZ.js} +1 -1
  51. package/assets/{email-1Van4lx1.js → email-dBQjbinH.js} +1 -1
  52. package/assets/{embedded-wallet-_TVgs7Qd.js → embedded-wallet-DUae_P_k.js} +1 -1
  53. package/assets/emotion-styled.browser.esm-CG5P7VGz.js +1 -0
  54. package/assets/{engine-D9uS1iWH.js → engine-oRVYxur7.js} +1 -1
  55. package/assets/{errors-BFbUxXdM.js → errors-DyHnPgpr.js} +1 -1
  56. package/assets/{estimate-l1-fee-DFpjQWvm.js → estimate-l1-fee-ARqdcX-t.js} +1 -1
  57. package/assets/{eth_estimateGas-XGJ1z-TU.js → eth_estimateGas-BSIKlyPh.js} +1 -1
  58. package/assets/{eth_getStorageAt-4_YV1iAo.js → eth_getStorageAt-CVgsobsA.js} +1 -1
  59. package/assets/{eth_getTransactionCount-DO_4-OAP.js → eth_getTransactionCount-SZqnB2Fd.js} +1 -1
  60. package/assets/{extractIPFS-CMkI68ZH.js → extractIPFS-BZfGMcbR.js} +1 -1
  61. package/assets/{features-Dzd7PGBD.js → features-Bd_x9PgJ.js} +1 -1
  62. package/assets/{fetchTokenMetadata-BJILnwgp.js → fetchTokenMetadata-ClzNbKM3.js} +2 -2
  63. package/assets/{get-ecosystem-wallet-info-BD5YDDMh.js → get-ecosystem-wallet-info-4G7NxEId.js} +1 -1
  64. package/assets/{getBalance-SRetmB3S.js → getBalance-NpSJnYq2.js} +1 -1
  65. package/assets/{getInstalledModules-DFh2dv3C.js → getInstalledModules-DP_6RMgU.js} +1 -1
  66. package/assets/{getNFT-CJ8nxXzA.js → getNFT-BejxGTxr.js} +1 -1
  67. package/assets/{getNFT-CtODGGom.js → getNFT-DhE_Sqp0.js} +2 -2
  68. package/assets/{getOverlayAlpha-DqVbiGQa.js → getOverlayAlpha-Cv_6_sjJ.js} +1 -1
  69. package/assets/{hashTypedData-B9EX4kQr.js → hashTypedData-COhFmPMp.js} +1 -1
  70. package/assets/{hashTypedData-DF-5orkI.js → hashTypedData-DUGnhSaC.js} +1 -1
  71. package/assets/{import-DjSObRBl.js → import-C6NVzCbS.js} +1 -1
  72. package/assets/{in-app-wallet-calls-BIFm_f4e.js → in-app-wallet-calls-BriVf0Xa.js} +1 -1
  73. package/assets/{index-_PfBd9GI.js → index-1v_Y3jeY.js} +2 -2
  74. package/assets/{index-Dp3LaHz2.js → index-6WmBd2xZ.js} +1 -1
  75. package/assets/{index-rjGwBRLW.js → index-9L9gLdlq.js} +1 -1
  76. package/assets/{index-BMvjtMcC.js → index-B85akwvZ.js} +1 -1
  77. package/assets/index-BEsdviTk.js +231 -0
  78. package/assets/{index-B8oIDYaY.js → index-BKefR4TN.js} +1 -1
  79. package/assets/{index-Baz_xGcG.js → index-BLKX3221.js} +1 -1
  80. package/assets/{index-CB1b6TrQ.js → index-BbuvKqv1.js} +1 -1
  81. package/assets/{index-RUxrTr_p.js → index-Bdey45s-.js} +1 -1
  82. package/assets/{index-4FVRm8A1.js → index-BjJPa7Dq.js} +1 -1
  83. package/assets/{index-CnO86Xf-.js → index-BjyH5s2H.js} +2 -2
  84. package/assets/{index-C6_L5Mw_.js → index-BkRZls_1.js} +1 -1
  85. package/assets/{index-icCmSJB-.js → index-BnIFiC-c.js} +1 -1
  86. package/assets/{index-CI-M1Arz.js → index-C3pTUvlm.js} +1 -1
  87. package/assets/{index-kwYOhJAZ.js → index-CCM3z3QM.js} +1 -1
  88. package/assets/{index-BIm4mg7q.js → index-CJ8L34lL.js} +1 -1
  89. package/assets/{index-C7dwOEd4.js → index-CLf8EeAx.js} +1 -1
  90. package/assets/{index-mj00iiOs.js → index-COBFSj0w.js} +1 -1
  91. package/assets/{index-CXx3fqSb.js → index-CS5T2jHs.js} +1 -1
  92. package/assets/{index-B0vpo1ZT.js → index-CYh10Tb-.js} +1 -1
  93. package/assets/{index-COxhR5RZ.js → index-CaS_3bHx.js} +1 -1
  94. package/assets/{index-wua-qNwF.js → index-CbZ9myKX.js} +1 -1
  95. package/assets/index-Cc7yK5VV.css +1 -0
  96. package/assets/{index-D9ieJGKB.js → index-Cg3K-M7Q.js} +3 -3
  97. package/assets/{index-DZXCznoC.js → index-Cqgv99mD.js} +1 -1
  98. package/assets/{index-Cxc0o5xP.js → index-Cv6v4Xzm.js} +3 -3
  99. package/assets/{index-5DUAhgPD.js → index-CvXWh3Uv.js} +1 -1
  100. package/assets/{index-D1WSRIS2.js → index-CyoVz-o4.js} +4 -4
  101. package/assets/{index-BuMqkfRn.js → index-DAfpkBU7.js} +1 -1
  102. package/assets/{index-lt9H89-j.js → index-DR2hgxdz.js} +1 -1
  103. package/assets/{index-z0NRAVC7.js → index-DWi7HxDb.js} +1 -1
  104. package/assets/{index-B84aCWu7.js → index-DXygeL6X.js} +1 -1
  105. package/assets/{index-435lMBSs.js → index-DjqWnfd7.js} +1 -1
  106. package/assets/{index-Cq05ek6k.js → index-Dl9zwaYA.js} +1 -1
  107. package/assets/{index-D-g3I2lj.js → index-DsshJ_lX.js} +1 -1
  108. package/assets/{index-C4u9N2Kl.js → index-DuzgHfIP.js} +1 -1
  109. package/assets/{index-B-R-UWD3.js → index-DyTWdHYC.js} +1 -1
  110. package/assets/{index-D-OL6_Yb.js → index-HBR0FANJ.js} +1 -1
  111. package/assets/{index-C7FmrxuL.js → index-HHpkG_47.js} +2 -2
  112. package/assets/{index-BJhyH2t3.js → index-IY4O0BLz.js} +1 -1
  113. package/assets/{index-D6gXM0CC.js → index-QQPs4pW8.js} +1 -1
  114. package/assets/{index-Ca1AwnnV.js → index-Sq6XS4iZ.js} +1 -1
  115. package/assets/{index-BDpvYYDT.js → index-UCJJplAh.js} +2 -2
  116. package/assets/{index-C1ZfYzAF.js → index-WwPC62mN.js} +1 -1
  117. package/assets/{index-CuuFwMsN.js → index-Z3oZVFq1.js} +1 -1
  118. package/assets/{index-DxHhM-lc.js → index-akCK_e-v.js} +1 -1
  119. package/assets/{index-D4I9bYC2.js → index-i8wZZpV8.js} +1 -1
  120. package/assets/{index-CPEmMCeJ.js → index-n0FG0lrX.js} +1 -1
  121. package/assets/{index-BTBCIBCb.js → index-nPzHYZwD.js} +1 -1
  122. package/assets/{index-C2Nkwj4Q.js → index-uqiMGPI_.js} +1 -1
  123. package/assets/{index-ChsZA2LJ.js → index-w7PaUg3E.js} +1 -1
  124. package/assets/{index-BP93EahD.js → index-w8OYRXEi.js} +1 -1
  125. package/assets/{index.es-BzNqI7gq.js → index.es-BU5Zdnp2.js} +1 -1
  126. package/assets/{index.es-1OmAzkct.js → index.es-C8ZiAv5V.js} +4 -4
  127. package/assets/{index.es-CwZSb0ol.js → index.es-D4cTyBEt.js} +1 -1
  128. package/assets/{localBatchGatewayRequest-yoTBhn0Z.js → localBatchGatewayRequest-CYqIYIeA.js} +1 -1
  129. package/assets/{mana-rate-Db4BQ-_Q.js → mana-rate-9Jo_gX3p.js} +1 -1
  130. package/assets/{networks-DK4RaMPB.js → networks-BXnLLN9G.js} +1 -1
  131. package/assets/{onramp-D9q0W6xC.js → onramp-C_RYTyg_.js} +1 -1
  132. package/assets/{openzeppelin-BquKm-KX.js → openzeppelin-DUG0JmL6.js} +1 -1
  133. package/assets/{ownerOf-DuMQ2Sl6.js → ownerOf-BQnZeard.js} +1 -1
  134. package/assets/{parseNft-ufNn3-SE.js → parseNft-CeWFWM7R.js} +2 -2
  135. package/assets/{parseSignature-DMb3jl_X.js → parseSignature-B4493K6W.js} +1 -1
  136. package/assets/{parseSignature-BwqWTE77.js → parseSignature-DYe1pTGB.js} +3 -3
  137. package/assets/{pay-with-exchange-CTQ9umub.js → pay-with-exchange-DYgWKjra.js} +1 -1
  138. package/assets/{payments-tEVDRx3d.js → payments-CFwDz2Wq.js} +1 -1
  139. package/assets/{qr-overlay-dEspWwjk.js → qr-overlay-Di6CWZOn.js} +1 -1
  140. package/assets/{receive-D0GHoQxU.js → receive-C0o1V-RP.js} +1 -1
  141. package/assets/{resolveImplementation-C8pfiiFc.js → resolveImplementation-BA0XFre0.js} +1 -1
  142. package/assets/{rpc-DmLUQYS0.js → rpc-Cggo7ec6.js} +1 -1
  143. package/assets/{secp256k1-Dr9eLw2v.js → secp256k1-BI9qggp6.js} +1 -1
  144. package/assets/{secp256k1-Dfs57S6d.js → secp256k1-BIMo8RCk.js} +1 -1
  145. package/assets/{secp256k1-Nx-YHmXH.js → secp256k1-Q4_NkfIK.js} +1 -1
  146. package/assets/{send-BwQAcpw3.js → send-DI70Bi5S.js} +1 -1
  147. package/assets/{send-batch-transaction-DzTkK7I2.js → send-batch-transaction-DyhjjWlE.js} +1 -1
  148. package/assets/{send-eip712-transaction-Cwec8TpW.js → send-eip712-transaction-1hRMqxdz.js} +2 -2
  149. package/assets/{send-gasless-transaction-CM25TtQp.js → send-gasless-transaction-C0Nsj1nC.js} +2 -2
  150. package/assets/{sendRawTransaction-D4a6ft8m.js → sendRawTransaction-DxHQqxHr.js} +3 -3
  151. package/assets/{serializeTransaction-2sq4x0kU.js → serializeTransaction-riX5VAFo.js} +1 -1
  152. package/assets/{session-proposal-BdXqD0a8.js → session-proposal-D83uxPCI.js} +1 -1
  153. package/assets/{session-request-DK4XwmDL.js → session-request-C93Wve_c.js} +2 -2
  154. package/assets/{sha256-D-WKRl2Q.js → sha256-BMoxeY3y.js} +1 -1
  155. package/assets/{signing-BT7JgIF_.js → signing-CHiAS07A.js} +4 -4
  156. package/assets/{socials-BOqU6AoU.js → socials-EqcQO_zT.js} +1 -1
  157. package/assets/{swaps-CG6VNxsT.js → swaps-COT97xIs.js} +1 -1
  158. package/assets/{thirdweb-CAdiquMi.js → thirdweb-liZ1mqED.js} +3 -3
  159. package/assets/{totalSupply-DjhdgKBK.js → totalSupply-DnZRn5dr.js} +1 -1
  160. package/assets/{trade-encoding-6ejU5fQD.js → trade-encoding-BT4RgSDL.js} +1 -1
  161. package/assets/{transactionReceipt-DWMHa3N1.js → transactionReceipt-BeRjRPBL.js} +1 -1
  162. package/assets/{transactions-BgR8COf-.js → transactions-C9vRrGPO.js} +1 -1
  163. package/assets/{useInfiniteGrid-gL0KJ-yb.js → useInfiniteGrid-Cw9zdPUx.js} +1 -1
  164. package/assets/{useStore-BXbR3Zt_.js → useStore-Cd9Nfgb3.js} +1 -1
  165. package/assets/useTheme-BudDZzP5.js +1 -0
  166. package/assets/useTheme-iplrvBaa.js +1 -0
  167. package/assets/{verifyHash-0bNfbKAs.js → verifyHash-BXYMx_5q.js} +1 -1
  168. package/assets/{w3m-modal-L-SoXhRP.js → w3m-modal-B0jKCWZl.js} +1 -1
  169. package/assets/{w3m-modal-Cb8f-N8c.js → w3m-modal-CQvfr1TI.js} +1 -1
  170. package/assets/{wait-for-tx-receipt-DHi00k13.js → wait-for-tx-receipt-k4rIDXu0.js} +1 -1
  171. package/assets/{wallets-DQmx7SO4.js → wallets-Bn-94ZFz.js} +6 -6
  172. package/assets/{web-connector-DZjwkeRe.js → web-connector-DxHdU9RY.js} +3 -3
  173. package/assets/{writeContract-DzbrR3T0.js → writeContract-D55yCJIp.js} +1 -1
  174. package/assets/{zoraTestnet-CiD1Xv8j.js → zoraTestnet-7NHmqxTI.js} +1 -1
  175. package/index.html +11 -11
  176. package/package.json +2 -2
  177. package/assets/Assets-BLEE2McM.js +0 -1
  178. package/assets/Cart-BBaYBkcV.css +0 -1
  179. package/assets/Cart-CNsRhX_R.js +0 -1
  180. package/assets/Collection-CEmVbx8y.js +0 -1
  181. package/assets/Collection-CxRRuAdy.css +0 -1
  182. package/assets/CollectionCarousel-CiKValmX.js +0 -1
  183. package/assets/Creator-CSW1SPi9.js +0 -1
  184. package/assets/Creator-DJqbQ8AX.css +0 -1
  185. package/assets/ErrorNotice-Rze9rgc9.js +0 -1
  186. package/assets/GetCredits-CovHo4LD.js +0 -1
  187. package/assets/ImportListings-B_GYydG3.js +0 -1
  188. package/assets/ItemDetail-Dkstj3oi.css +0 -1
  189. package/assets/ItemDetail-DmBWsg8l.js +0 -2
  190. package/assets/LoadMore-BIjeTH4T.js +0 -1
  191. package/assets/MarketCheckout-DoRZsMk0.js +0 -1
  192. package/assets/MyAssets-7sMdrGBa.js +0 -1
  193. package/assets/MyAssets-BqJHbQOZ.css +0 -1
  194. package/assets/MyFavorites-CRqCDkA2.js +0 -1
  195. package/assets/MyPurchases-BsTMOXYC.js +0 -1
  196. package/assets/NotFound-COraILzW.js +0 -1
  197. package/assets/StoreSettings-BsV7iEJX.css +0 -1
  198. package/assets/StoreSettings-C_SlMQ79.js +0 -1
  199. package/assets/Success-3OL55SvR.js +0 -1
  200. package/assets/categories-BwgdoXaT.js +0 -1
  201. package/assets/categories-CBvVTfQE.css +0 -1
  202. package/assets/collection-CtZ-NDco.js +0 -1
  203. package/assets/emotion-styled.browser.esm-B2VU5Fdx.js +0 -1
  204. package/assets/index-CDzDnyJW.js +0 -38
  205. package/assets/index-DvbMYtAp.css +0 -1
  206. package/assets/useTheme-CmaVa_eU.js +0 -1
  207. package/assets/useTheme-bLwsL2uj.js +0 -1
package/index.html CHANGED
@@ -16,10 +16,10 @@
16
16
  <link rel="canonical" href="https://shop.decentraland.org/" />
17
17
 
18
18
  <!-- Favicon: the Decentraland mark (same as the marketplace). -->
19
- <link rel="icon" type="image/x-icon" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29736515487.commit-b64bf82/favicon.ico" sizes="16x16 32x32 48x48" />
20
- <link rel="apple-touch-icon" sizes="180x180" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29736515487.commit-b64bf82/apple-touch-icon.png" />
19
+ <link rel="icon" type="image/x-icon" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29792819793.commit-bcbfeac/favicon.ico" sizes="16x16 32x32 48x48" />
20
+ <link rel="apple-touch-icon" sizes="180x180" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29792819793.commit-bcbfeac/apple-touch-icon.png" />
21
21
  <meta name="apple-mobile-web-app-title" content="DCL Shop" />
22
- <link rel="manifest" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29736515487.commit-b64bf82/site.webmanifest" />
22
+ <link rel="manifest" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29792819793.commit-bcbfeac/site.webmanifest" />
23
23
 
24
24
  <!-- Open Graph -->
25
25
  <meta property="og:type" content="website" />
@@ -48,7 +48,7 @@
48
48
  <meta name="twitter:image:alt" content="Decentraland Shop — wearables and emotes for your avatar" />
49
49
 
50
50
  <!-- Sitemap -->
51
- <link rel="sitemap" type="application/xml" title="Sitemap" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29736515487.commit-b64bf82/sitemap.xml" />
51
+ <link rel="sitemap" type="application/xml" title="Sitemap" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29792819793.commit-bcbfeac/sitemap.xml" />
52
52
 
53
53
  <!-- Warm the 3D preview / fonts -->
54
54
  <link rel="preconnect" href="https://fonts.googleapis.com" />
@@ -60,13 +60,13 @@
60
60
  <link rel="preconnect" href="https://wearable-preview.decentraland.org" />
61
61
  <link rel="preconnect" href="https://peer.decentraland.zone" crossorigin />
62
62
  <link rel="preconnect" href="https://peer.decentraland.org" crossorigin />
63
- <script type="module" crossorigin src="https://cdn.decentraland.org/@dcl/shop/0.1.0-29736515487.commit-b64bf82/assets/index-CDzDnyJW.js"></script>
64
- <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29736515487.commit-b64bf82/assets/react-yytiy0wi.js">
65
- <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29736515487.commit-b64bf82/assets/dcl-schemas-BICTSpB5.js">
66
- <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29736515487.commit-b64bf82/assets/sentry-BPJvc5GU.js">
67
- <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29736515487.commit-b64bf82/assets/ethers-w2AslR0v.js">
68
- <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29736515487.commit-b64bf82/assets/intl-CBcMB1D2.js">
69
- <link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29736515487.commit-b64bf82/assets/index-DvbMYtAp.css">
63
+ <script type="module" crossorigin src="https://cdn.decentraland.org/@dcl/shop/0.1.0-29792819793.commit-bcbfeac/assets/index-BEsdviTk.js"></script>
64
+ <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29792819793.commit-bcbfeac/assets/react-yytiy0wi.js">
65
+ <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29792819793.commit-bcbfeac/assets/dcl-schemas-BICTSpB5.js">
66
+ <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29792819793.commit-bcbfeac/assets/sentry-BPJvc5GU.js">
67
+ <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29792819793.commit-bcbfeac/assets/ethers-w2AslR0v.js">
68
+ <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29792819793.commit-bcbfeac/assets/intl-CBcMB1D2.js">
69
+ <link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29792819793.commit-bcbfeac/assets/index-Cc7yK5VV.css">
70
70
  </head>
71
71
  <body>
72
72
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcl/shop",
3
- "version": "0.1.0-29736515487.commit-b64bf82",
3
+ "version": "0.1.0-29792819793.commit-bcbfeac",
4
4
  "main": "index.js",
5
5
  "author": "Decentraland",
6
6
  "license": "Apache-2.0",
@@ -8,5 +8,5 @@
8
8
  "type": "git",
9
9
  "url": "git+https://github.com/decentraland/shop.git"
10
10
  },
11
- "commit": "b64bf82817c005e4e9d6ba283924dfa8824ce216"
11
+ "commit": "bcbfeac3b631f70fdc14dfd0224247b743da8f35"
12
12
  }
@@ -1 +0,0 @@
1
- import{u as oe,r as t,j as e}from"./react-yytiy0wi.js";import{u as de,a as ue,t as a,b as $,C,A as B,f as me}from"./index-CDzDnyJW.js";import{m as pe}from"./mana-rate-Db4BQ-_Q.js";import{u as _e,M as fe}from"./MarketCheckout-DoRZsMk0.js";import{S as G,C as xe,R as he,F as be,a as Q,b as ge}from"./categories-BwgdoXaT.js";import{L as je}from"./LoadMore-BIjeTH4T.js";import{u as Ne}from"./useInfiniteGrid-gL0KJ-yb.js";import{E as ye}from"./ErrorNotice-Rze9rgc9.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-BPJvc5GU.js";import"./ethers-w2AslR0v.js";import"./intl-CBcMB1D2.js";import"./index-HN6Rk25C.js";import"./buy--wjHgZbY.js";import"./trade-encoding-6ejU5fQD.js";import"./buy-gasless-DaSij0O9.js";import"./errors-BFbUxXdM.js";const ve=48,n=1e5;function Se(r){return{tradeId:r.tradeId??r.id,listingType:"primary",contractAddress:r.contractAddress,itemId:r.itemId??"",name:r.name,thumbnail:r.thumbnail,rarity:r.rarity,category:r.category,wearableCategory:r.wearableCategory??null,creator:r.creator,manaWei:r.manaWei??"0",available:1,network:r.network,chainId:r.chainId,createdAt:0}}function Ge(){const[r]=oe(),l=(r.get("q")??"").trim().toLowerCase(),U=de(),I=(r.get("q")??"").trim();ue({title:I?a("seo.collectibles.searchTitle",{query:I}):a("seo.collectibles.title"),description:a("seo.collectibles.description")});const[p,F]=t.useState("wearable"),[d,k]=t.useState(null),[c,R]=t.useState([]),[x,w]=t.useState(""),[h,M]=t.useState(""),[_,K]=t.useState("newest"),[P,D]=t.useState(!1),[b,f]=t.useState(!1),[L,E]=t.useState(null);t.useEffect(()=>{if(!b)return;const s=i=>{i.key==="Escape"&&f(!1)};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[b]);const u=x&&!Number.isNaN(Number(x))?Number(x):void 0,m=h&&!Number.isNaN(Number(h))?Number(h):void 0,J=d?ge[d]:void 0,X=(G.find(s=>s.key===_)??G[0]).server,q={category:p,rarities:c.length?c:void 0,wearableCategories:J,minPriceCredits:u,maxPriceCredits:m,search:l||void 0,sortBy:X},{items:g,total:O,isLoading:o,error:Z,hasNextPage:z,isFetchingNextPage:T,fetchNextPage:H}=Ne(["unified-listings",q],s=>me({...q,first:ve,skip:s})),j=O,{data:N,isError:V}=_e(),Y=s=>N&&s.manaWei?pe(s.manaWei,N):null,W=t.useRef(null);t.useEffect(()=>{o||!l||W.current===l||(W.current=l,$("Shop Searched",{query:l,result_count:j}))},[l,o,j]);const y=t.useRef("__init__");t.useEffect(()=>{if(o)return;const s=JSON.stringify({category:p,subCategory:d,rarities:c,min:u,max:m,sort:_});if(y.current==="__init__"||y.current===s){y.current=s;return}y.current=s,$("Shop Applied Filter",{filters:{category:p,sub_category:d,rarities:c,min_price_credits:u??null,max_price_credits:m??null,sort:_},result_count:j})},[p,d,c,u,m,_,o,j]);function ee(s){F(s),k(null)}function se(s){R(i=>i.includes(s)?i.filter(A=>A!==s):[...i,s])}function ae(){F("wearable"),k(null),R([]),w(""),M("")}function re(s){const i=g.find(A=>A.id===s.id);i&&i.source==="legacy"&&i.manaWei&&E(Se(i))}function ie(){U.invalidateQueries({queryKey:["unified-listings"]})}const v=u!=null?Math.min(u,n):0,S=m!=null?Math.min(m,n):n,te=v/n*100,ne=S/n*100;function le(s){const i=Math.min(s,S);w(i<=0?"":String(i))}function ce(s){const i=Math.max(s,v);M(i>=n?"":String(i))}return e.jsxs("div",{className:"browse browse--sidebar",children:[b?e.jsx("div",{className:"browse__scrim",onClick:()=>f(!1),"aria-hidden":!0}):null,e.jsxs("aside",{className:`browse__sidebar${b?" is-open":""}`,children:[e.jsxs("div",{className:"browse__sidebar-head",children:[e.jsx("span",{className:"browse__sidebar-title",children:a("assets.filters")}),e.jsx("button",{className:"browse__sidebar-close",onClick:()=>f(!1),"aria-label":a("assets.closeFilters"),children:"✕"})]}),e.jsx("div",{className:"sidebar__section-label",children:a("assets.category")}),e.jsx(xe,{category:p,subCategory:d,onCategory:ee,onSub:k}),e.jsx("div",{className:"sidebar__divider"}),e.jsx("div",{className:"sidebar__section-label",children:a("filter.price")}),e.jsxs("div",{className:"price-filter",children:[e.jsxs("div",{className:"price-filter__inputs",children:[e.jsxs("label",{className:"price-filter__field",children:[e.jsx("span",{className:"price-filter__field-label",children:a("assets.min")}),e.jsxs("span",{className:"price-filter__box",children:[e.jsx(C,{className:"price-filter__coin"}),e.jsx("input",{type:"number",min:"0","aria-label":a("assets.minPriceAria"),placeholder:"0",value:x,onChange:s=>w(s.target.value)})]})]}),e.jsx("span",{className:"price-filter__to",children:a("assets.priceTo")}),e.jsxs("label",{className:"price-filter__field",children:[e.jsx("span",{className:"price-filter__field-label",children:a("assets.max")}),e.jsxs("span",{className:"price-filter__box",children:[e.jsx(C,{className:"price-filter__coin"}),e.jsx("input",{type:"number",min:"0","aria-label":a("assets.maxPriceAria"),placeholder:"0",value:h,onChange:s=>M(s.target.value)})]})]})]}),e.jsxs("div",{className:"price-filter__slider",style:{"--min-pct":`${te}%`,"--max-pct":`${ne}%`},children:[e.jsx("div",{className:"price-filter__track","aria-hidden":!0}),e.jsx("div",{className:"price-filter__fill","aria-hidden":!0}),e.jsx("input",{type:"range",min:0,max:n,value:v,"aria-label":a("assets.minPriceSliderAria"),onChange:s=>le(Number(s.target.value))}),e.jsx("input",{type:"range",min:0,max:n,value:S,"aria-label":a("assets.maxPriceSliderAria"),onChange:s=>ce(Number(s.target.value))})]}),e.jsxs("div",{className:"price-filter__range",children:[e.jsxs("span",{className:"price-filter__range-val",children:[e.jsx(C,{className:"price-filter__coin"}),v.toLocaleString()]}),e.jsxs("span",{className:"price-filter__range-val",children:[e.jsx(C,{className:"price-filter__coin"}),S.toLocaleString()]})]})]}),e.jsx("div",{className:"sidebar__divider"}),e.jsxs("button",{type:"button",className:"sidebar__section-toggle","aria-expanded":P,onClick:()=>D(s=>!s),children:[e.jsx("span",{className:"sidebar__section-label",children:a("assets.rarity")}),e.jsx("span",{className:`ico ico-chevron sidebar__section-chev${P?" is-up":""}`,"aria-hidden":!0})]}),P?e.jsx("div",{className:"rarity-filter",children:he.map(s=>e.jsxs("label",{className:`rarity-filter__check${c.includes(s)?" is-on":""}`,children:[e.jsx("input",{type:"checkbox",checked:c.includes(s),onChange:()=>se(s)}),e.jsx("span",{children:s})]},s))}):null,e.jsxs("div",{className:"browse__sidebar-foot",children:[e.jsx("button",{type:"button",className:"browse__clear",onClick:ae,children:a("assets.clearFilters")}),e.jsx("button",{type:"button",className:"browse__apply",onClick:()=>f(!1),children:a("assets.apply")})]})]}),e.jsxs("div",{className:"browse__main",children:[e.jsx(be,{sort:_,onSort:K,total:O,loading:o,query:l,onOpenFilters:()=>f(!0)}),V&&g.some(s=>s.source==="legacy")?e.jsx("p",{className:"market-banner market-banner--warn",children:a("assets.marketUnavailable")}):null,Z?e.jsx(ye,{message:a("assets.loadError")}):null,e.jsx("div",{className:"grid",children:o?e.jsx(Q,{count:15}):e.jsxs(e.Fragment,{children:[g.map(s=>s.source==="legacy"?e.jsx(B,{item:s,mode:"market",marketPriceCredits:Y(s),onBuyNow:re},s.id):e.jsx(B,{item:s},s.id)),T?e.jsx(Q,{count:6}):null]})}),e.jsx(je,{hasNextPage:z,isFetching:T,onLoadMore:()=>void H()}),!o&&g.length===0?e.jsx("p",{className:"muted",children:a("assets.noItems")}):null]}),L&&N?e.jsx(fe,{listing:L,rate:N,onClose:()=>E(null),onSold:()=>{E(null),ie()}}):null]})}export{Ge as Assets};
@@ -1 +0,0 @@
1
- .checkout{max-width:1510px;margin:0 auto}.checkout__back{display:inline-flex;align-items:center;gap:6px;margin:0 0 16px;padding:0;border:0;background:none;color:var(--text-2);font-size:14px;font-weight:600;letter-spacing:.02em;text-transform:uppercase;cursor:pointer;transition:color .15s ease}.checkout__back:hover{color:var(--accent)}.checkout__back .ico{width:18px;height:18px}.checkout__body{display:grid;grid-template-columns:minmax(0,1fr) 600px;gap:24px;align-items:start}.checkout__panel{min-width:0;background:#fff;border:1px solid var(--line);border-radius:16px;padding:24px}.checkout__panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:24px}.checkout__panel-back{display:none}.checkout__panel-title{margin:0;font-size:18px;font-weight:600;line-height:1.2;color:var(--text)}.checkout__fitting{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:40px;padding:0 12px;border:2px solid transparent;border-radius:8px;background:linear-gradient(#fff,#fff) padding-box,var(--amethyst) border-box;color:var(--accent);font-size:13px;font-weight:600;line-height:24px;letter-spacing:.46px;text-transform:uppercase;white-space:nowrap;cursor:pointer;transition:box-shadow .15s ease,filter .15s ease}.checkout__fitting:hover:not(:disabled){box-shadow:0 0 8px #a524b359}.checkout__fitting:active:not(:disabled){filter:brightness(.97)}.checkout__fitting:disabled{opacity:.55;cursor:default}.checkout__fitting-ico{width:24px;height:24px}.checkout__list{display:flex;flex-direction:column;gap:12px}.checkout__card{position:relative;display:flex;align-items:stretch;gap:12px;background:#fff;border:1px solid #cfcdd4;border-radius:12px;overflow:hidden}.checkout__thumb{position:relative;flex-shrink:0;width:137px;height:137px;background:var(--media);border-radius:12px;display:grid;place-items:center;overflow:hidden}.checkout__thumb-link{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center}.checkout__thumb img{width:83%;height:83%;object-fit:contain;filter:drop-shadow(.56px 2.25px 2.8px rgba(0,0,0,.1))}.checkout__thumb-check{position:absolute;top:7.5px;left:7.5px;width:20px;height:20px;border-radius:50%;background:#34ce77;display:grid;place-items:center}.checkout__info{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:space-between;gap:8px;padding:16px 8px}.checkout__desc{display:flex;flex-direction:column;gap:4px;min-width:0;padding-right:64px}.checkout__name{display:block;font-size:16px;font-weight:600;line-height:1.2;color:var(--text);text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}a.checkout__name:hover{color:var(--accent)}.checkout__creator{font-size:10px;line-height:1.43;color:var(--muted)}.checkout__creator .creator__ava{display:none}.checkout__creator .creator__name{font-size:10px;line-height:1.43}.checkout__foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-right:8px}.checkout__stepper{display:inline-flex;align-items:center;gap:8px;padding:6px;border:.5px solid var(--muted-2);border-radius:50px}.checkout__step{display:grid;place-items:center;width:16px;height:16px;padding:0;border:0;background:none;color:var(--text);cursor:pointer}.checkout__step:disabled{color:var(--muted-2);cursor:default}.checkout__step svg{width:16px;height:16px}.checkout__qty{min-width:12px;font-size:14px;font-weight:500;line-height:1.2;color:var(--text);text-align:center}.checkout__price{display:inline-flex;align-items:center;gap:4px;font-size:24px;font-weight:600;color:var(--text-2)}.checkout__price-ico{width:24px;height:24px;background:var(--accent)}.checkout__price-was{margin-left:6px;font-size:14px;font-weight:500;color:var(--muted);text-decoration:line-through}.checkout__actions{position:absolute;top:10px;right:10px;display:flex;align-items:center;gap:12px}.checkout__fav,.checkout__remove{display:grid;place-items:center;width:24px;height:24px;padding:0;border:0;background:none;color:var(--muted);cursor:pointer;transition:color .12s ease}.checkout__fav .ico,.checkout__remove .ico{width:24px;height:24px}.checkout__fav:hover:not(:disabled){color:var(--text)}.checkout__fav.is-on{color:var(--dcl-red)}.checkout__remove:hover:not(:disabled){color:var(--dcl-red)}.checkout__fav:disabled,.checkout__remove:disabled{opacity:.5;cursor:default}.checkout__utils{display:flex;gap:20px;margin-top:16px}.checkout__utils .link{font-size:13px;color:var(--muted);font-weight:600}.checkout__utils .link:hover:not(:disabled){color:var(--text)}.checkout__summary{position:sticky;top:172px;display:flex;flex-direction:column;background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px}.checkout__summary-title{margin:0 0 16px;padding-bottom:16px;border-bottom:1px solid #cfcdd4;font-size:20px;font-weight:600;color:var(--text)}.checkout__summary-body{display:flex;flex-direction:column;gap:12px}.checkout__total-line{display:flex;align-items:center;justify-content:space-between;gap:12px}.checkout__total-label{font-size:14px;font-weight:600;color:#5e5b67}.checkout__total-value{display:inline-flex;align-items:center;gap:8px;font-size:24px;font-weight:700;color:var(--text)}.checkout__total-ico{width:24px;height:24px;background:var(--accent)}.checkout__cta{width:100%;height:56px;border:0;border-radius:8px;background:var(--amethyst);color:var(--soft-white);font-size:15px;font-weight:600;letter-spacing:.046em;text-transform:uppercase;cursor:pointer;transition:background .15s ease,filter .15s ease}.checkout__cta:hover:not(:disabled){background:var(--accent)}.checkout__cta:active:not(:disabled){filter:brightness(.95)}.checkout__cta:disabled{opacity:.6;cursor:default}.checkout__msg{margin:0;font-size:13px}.cart-upsell{margin-top:8px}@media(max-width:1080px){.checkout__body{grid-template-columns:1fr}.checkout__summary{position:static}}@media(max-width:880px){.checkout{padding-bottom:188px}.checkout__back{display:none}.checkout__panel{padding:16px}.checkout__panel-head{margin-bottom:16px;gap:8px}.checkout__panel-back{display:inline-flex;align-items:center;flex-shrink:0;border:0;background:none;padding:0;color:var(--text);cursor:pointer}.checkout__panel-back .ico{width:20px;height:20px}.checkout__panel-title{flex:1;min-width:0;font-size:16px}.checkout__fitting{height:36px;padding:0 10px;font-size:12px}.checkout__fitting-ico{width:20px;height:20px}.checkout__thumb{width:120px;height:120px}.checkout__info{padding:12px 4px 12px 0}.checkout__name{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}.checkout__price{font-size:20px}.checkout__price-ico{width:20px;height:20px}.checkout__summary{position:fixed;left:0;right:0;top:auto;bottom:0;z-index:30;border:0;border-radius:16px 16px 0 0;box-shadow:0 -4px 20px #1615181f}.checkout__summary-title{margin-bottom:12px;padding-bottom:12px}}.cart-checkout__progress-row{display:flex;align-items:center;justify-content:center;gap:8px;width:100%}.cart-checkout__step{font-size:16px;line-height:22px;color:var(--text-2);text-transform:capitalize;white-space:nowrap}.cart-checkout__scroll{display:flex;flex-direction:column;gap:8px;max-height:360px;overflow-y:auto;width:100%;scrollbar-width:thin;scrollbar-color:#a2a2a2 var(--media)}.cart-checkout__scroll::-webkit-scrollbar{width:8px}.cart-checkout__scroll::-webkit-scrollbar-track{background:var(--media);border-radius:10px}.cart-checkout__scroll::-webkit-scrollbar-thumb{background:#a2a2a2;border-radius:8px}.cart-checkout__done{display:flex;flex-direction:column;border:1px solid var(--muted-2);border-radius:16px;padding:24px}.cart-checkout__done-scroll{display:flex;flex-direction:column;gap:12px;max-height:320px;overflow-y:auto}.cart-checkout__done-row{display:flex;align-items:center;gap:12px}.cart-checkout__done-row+.cart-checkout__done-row{border-top:1px solid var(--line);padding-top:12px}.cart-checkout__done-thumb{position:relative;flex-shrink:0;width:96px;height:96px;background:var(--media);border:.13px solid var(--muted-2);border-radius:8px;display:grid;place-items:center;overflow:hidden}.cart-checkout__done-thumb img{width:83%;height:83%;object-fit:contain}.cart-checkout__done-check{position:absolute;top:6px;left:6px;width:20px;height:20px;border-radius:4px;background:var(--dcl-red);display:grid;place-items:center}.cart-checkout__done-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;padding:8px;overflow:hidden}.cart-checkout__done-name{font-size:20px;font-weight:600;line-height:1.4;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cart-checkout__done-creator{font-size:10px;line-height:1.43;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cart-checkout__done-price{display:inline-flex;align-items:center;gap:4px;flex-shrink:0;padding-right:4px;font-size:24px;font-weight:600;color:var(--text-2)}.cart-checkout__done-price-ico{width:24px;height:24px;background:var(--accent)}.cart-checkout__done-body{display:flex;flex-direction:column;gap:12px}.cart-checkout__done-body .buy-modal__success{flex-direction:row;align-items:center;gap:24px;padding:16px 24px}.cart-checkout__done-body .buy-modal__success-text{text-align:left;font-size:18px}.cart-checkout__done-body .buy-modal__btn{min-width:0}@media(max-width:600px){.cart-checkout__done-body .buy-modal__success{flex-direction:column;gap:12px;padding:16px}.cart-checkout__done-body .buy-modal__success-text{text-align:center}.cart-checkout__done{padding:16px}.cart-checkout__done-thumb{width:72px;height:72px}.cart-checkout__done-name{font-size:16px}.cart-checkout__done-price{font-size:20px}.cart-checkout__done-price-ico{width:20px;height:20px}}
@@ -1 +0,0 @@
1
- import{j as e,a as fe,b as ge,r as x,L as J}from"./react-yytiy0wi.js";import{t as a,C as N,ad as R,a as ve,ae as v,c as te,d as Ne,g as Ce,o as we,u as Me,af as Se,b as z,ag as ce,ah as Ie,z as B,j as Pe,k as Te,v as Le,q as re,ai as Ee,x as ne,w as Fe,aj as Be}from"./index-CDzDnyJW.js";import{a as le}from"./buy--wjHgZbY.js";import{g as Re,a as Ae,w as We,S as Ue,G as qe}from"./buy-gasless-DaSij0O9.js";import{R as $,r as ze}from"./cart-checkout-RV2JhHc0.js";import{c as $e,C as Ke}from"./payments-tEVDRx3d.js";import{E as oe}from"./ErrorNotice-Rze9rgc9.js";import{i as Qe,a as Oe}from"./errors-BFbUxXdM.js";import{C as Ge}from"./CollectionCarousel-CiKValmX.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-BPJvc5GU.js";import"./ethers-w2AslR0v.js";import"./intl-CBcMB1D2.js";import"./trade-encoding-6ejU5fQD.js";import"./index-HN6Rk25C.js";function De(t){const{phase:r,balanceCredits:j,onClose:i}=t,C=r==="processing",I=r!=="complete",P=r==="nofunds"?a("cartCheckout.titleNoFunds"):a("cartCheckout.titleBuy"),n=r==="processing";return e.jsxs("div",{className:"buy-modal",role:"dialog","aria-modal":"true","aria-label":a("cartCheckout.dialogAria"),children:[e.jsx("div",{className:"buy-modal__scrim",onClick:C?void 0:i,"aria-hidden":!0}),e.jsxs("div",{className:`buy-modal__card${n?" buy-modal__card--tall":""}`,children:[I&&e.jsxs("div",{className:"buy-modal__head",children:[e.jsxs("div",{className:"buy-modal__head-row",children:[e.jsx("h2",{className:"buy-modal__title",children:P}),!C&&e.jsx("button",{className:"buy-modal__x",onClick:i,"aria-label":a("buyModal.close"),children:e.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,children:e.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})})]}),e.jsxs("div",{className:"buy-modal__balance",children:[e.jsx("span",{className:"buy-modal__balance-label",children:r==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),e.jsx(N,{className:"buy-modal__balance-ico"}),e.jsx("span",{className:"buy-modal__balance-value",children:R(j)})]})]}),r==="processing"&&e.jsx(Je,{step:t.step??1,total:t.total??1}),r==="nofunds"&&e.jsx(Ve,{lines:t.lines??[],shortfallCredits:t.shortfallCredits??0,packs:t.packs??[],selectedPack:t.selectedPack??"",onSelectPack:t.onSelectPack??(()=>{}),onBuyPacks:t.onBuyPacks??(()=>{}),onCancel:i}),r==="complete"&&e.jsx(Ye,{purchased:t.purchased??[],onMyAssets:t.onMyAssets??i,onTryInWorld:t.onTryInWorld??i}),r==="error"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsx(oe,{message:t.message}),e.jsx("div",{className:"buy-modal__ctas",children:e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient",onClick:i,children:a("buyModal.close")})})]})]})]})}function Je({step:t,total:r}){return e.jsxs("div",{className:"buy-modal__body buy-modal__processing",children:[e.jsx("img",{className:"buy-modal__logo",src:"/icon-192.png",alt:"",width:61,height:61}),e.jsx("div",{className:"buy-modal__processing-text",children:a("buyModal.completingTransaction")}),e.jsxs("div",{className:"cart-checkout__progress-row",children:[e.jsx("div",{className:"buy-modal__progress","aria-hidden":!0,children:e.jsx("span",{className:"buy-modal__progress-fill"})}),e.jsxs("span",{className:"cart-checkout__step",children:[t,"/",r]})]})]})}function Ve({lines:t,shortfallCredits:r,packs:j,selectedPack:i,onSelectPack:C,onBuyPacks:I,onCancel:P}){const n=j.find(o=>o.id===i);return e.jsxs("div",{className:"buy-modal__body",children:[e.jsxs("div",{className:"buy-modal__warning",children:[e.jsxs("svg",{viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":!0,className:"buy-modal__warning-ico",children:[e.jsx("path",{d:"M12 3L2 20h20L12 3z",fill:"none",stroke:"#691fa9",strokeWidth:"1.8",strokeLinejoin:"round"}),e.jsx("path",{d:"M12 9v5",stroke:"#691fa9",strokeWidth:"1.8",strokeLinecap:"round"}),e.jsx("circle",{cx:"12",cy:"17",r:"1.1",fill:"#691fa9"})]}),e.jsxs("p",{className:"buy-modal__warning-text",children:[e.jsx("b",{children:a("buyModal.insufficientFunds")})," ",a("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:a("buyModal.warningCreditsAmount",{count:Math.max(0,r)})})," ",a("buyModal.warningToPurchase",{count:t.length})]})]}),e.jsx("div",{className:"cart-checkout__scroll",children:t.map(o=>e.jsxs("div",{className:"buy-modal__asset",children:[e.jsx("div",{className:"buy-modal__asset-thumb",children:o.item.thumbnail?e.jsx("img",{src:o.item.thumbnail,alt:""}):null}),e.jsxs("div",{className:"buy-modal__asset-info",children:[e.jsxs("div",{children:[e.jsx("div",{className:"buy-modal__asset-name",title:o.item.name,children:o.item.name||a("buyModal.itemFallback")}),o.item.creator?e.jsx("div",{className:"buy-modal__asset-creator",children:a("search.byCreator",{name:o.item.creator})}):null]}),e.jsxs("div",{className:"buy-modal__asset-price",children:[e.jsx(N,{className:"buy-modal__asset-price-ico"}),e.jsx("span",{children:R(o.priceCredits)})]})]})]},o.item.id))}),e.jsx("div",{className:"buy-modal__packs",children:j.map(o=>{const T=o.id===i;return e.jsxs("button",{className:`buy-modal__pack${T?" buy-modal__pack--on":""}`,onClick:()=>C(o.id),children:[e.jsx(N,{className:"buy-modal__pack-ico"}),e.jsx("span",{className:"buy-modal__pack-amount",children:R(o.credits)}),e.jsxs("span",{className:"buy-modal__pack-usd",children:["($",o.usd.toFixed(2),")"]})]},o.id)})}),e.jsxs("div",{className:"buy-modal__total",children:[e.jsxs("div",{className:"buy-modal__total-credits",children:[e.jsx(N,{className:"buy-modal__total-ico"}),e.jsx("span",{children:R((n==null?void 0:n.credits)??0)})]}),e.jsxs("span",{className:"buy-modal__total-usd",children:["$",((n==null?void 0:n.usd)??0).toFixed(2)]})]}),e.jsxs("div",{className:"buy-modal__ctas",children:[e.jsx("button",{className:"buy-modal__btn buy-modal__btn--outline",onClick:P,children:a("buyModal.cancel")}),e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient",onClick:I,children:a("buyModal.buy")})]})]})}function Ye({purchased:t,onMyAssets:r,onTryInWorld:j}){return e.jsxs("div",{className:"buy-modal__body cart-checkout__done-body",children:[e.jsxs("div",{className:"buy-modal__success",children:[e.jsxs("svg",{viewBox:"0 0 64 64",width:"60",height:"60","aria-hidden":!0,children:[e.jsx("circle",{cx:"32",cy:"32",r:"32",fill:"#34ce77"}),e.jsx("path",{d:"M20 33l8 8 16-18",fill:"none",stroke:"#fff",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"})]}),e.jsxs("p",{className:"buy-modal__success-text",children:[e.jsx("b",{children:a("getCredits.successTitle")})," ",a("buyModal.successBody")]})]}),e.jsx("div",{className:"cart-checkout__done",children:e.jsx("div",{className:"cart-checkout__done-scroll",children:t.map(i=>e.jsxs("div",{className:"cart-checkout__done-row",children:[e.jsxs("div",{className:"cart-checkout__done-thumb",children:[i.thumbnail?e.jsx("img",{src:i.thumbnail,alt:""}):null,e.jsx("span",{className:"cart-checkout__done-check","aria-hidden":!0,children:e.jsx("svg",{viewBox:"0 0 18 18",width:"12",height:"12",children:e.jsx("path",{d:"M4 9l3.5 3.5L14 5",fill:"none",stroke:"#fff",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),e.jsxs("div",{className:"cart-checkout__done-info",children:[e.jsx("div",{className:"cart-checkout__done-name",title:i.name,children:i.name||a("buyModal.itemFallback")}),i.creator?e.jsx("div",{className:"cart-checkout__done-creator",children:a("search.byCreator",{name:i.creator})}):null]}),e.jsxs("div",{className:"cart-checkout__done-price",children:[e.jsx(N,{className:"cart-checkout__done-price-ico"}),e.jsx("span",{children:R(i.priceCredits)})]})]},i.id))})}),e.jsxs("div",{className:"buy-modal__ctas",children:[e.jsx("button",{className:"buy-modal__btn buy-modal__btn--outline",onClick:r,children:a("buyModal.myAssets")}),e.jsxs("button",{className:"buy-modal__btn buy-modal__btn--ruby",onClick:j,children:[a("buyModal.tryInWorld"),e.jsx("svg",{viewBox:"0 0 24 24",width:"20",height:"20","aria-hidden":!0,children:e.jsx("path",{d:"M5 12h12M13 7l5 5-5 5",fill:"none",stroke:"#fcfcfc",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]})]})]})}function ie(t){if(Qe(t))return a("errors.rejected");const r=(t.message??"").toLowerCase();return r.includes("insufficient")?a("cart.error.insufficient",{currency:Te.name}):r.includes("no active listing")||r.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const He=12e4,K=Ke.slice(0,3),Xe=Pe.chainId===80002?"https://decentraland.zone/jump":"https://decentraland.org/jump";function Ze(t){const r=[];return t.unavailable.length&&r.push(a("cart.drop.unavailable",{count:t.unavailable.length})),t.own.length&&r.push(a("cart.drop.own",{count:t.own.length})),a("cart.drop.removed",{items:r.join(` ${a("cart.drop.and")} `)})}function bs(){ve({title:a("nav.cart"),noindex:!0});const t=v(s=>s.items),r=v(s=>s.remove),j=v(s=>s.clear),i=v(s=>s.restore),C=v(s=>s.setFittingOpen),I=te(s=>s.items),P=te(s=>s.toggle),{session:n}=Ne(),o=t.some(s=>s.category!=="emote"),{data:T}=Ce({queryKey:["upsell-listings"],queryFn:()=>Be({first:40}),staleTime:6e4}),{data:L}=we(n),A=Me(),W=fe(),{state:w}=ge(),[V,E]=x.useState(null),[de,k]=x.useState(null),[Y,U]=x.useState(null),[ue,M]=x.useState(!1),[y,F]=x.useState(null),H=x.useRef(0),[d,f]=x.useState(null),[Q,X]=x.useState(""),he=t.reduce((s,c)=>s+c.priceCredits,0),me=y?y.liveTotalCredits:he,_e=new Set(t.map(s=>s.id)),Z=((T==null?void 0:T.items)??[]).filter(s=>!_e.has(s.id)).slice(0,12),be=new Map(y==null?void 0:y.buyable.map(s=>[s.item.id,s])),q=(L==null?void 0:L.credits)??0,pe=Ie;function O(s){s(),F(null),U(null),k(null)}function ye(){f(null),M(!1)}function ee(s){const c=s.reduce((h,u)=>h+u.priceCredits,0),l=Math.max(0,c-q),p=K.find(h=>h.credits>=l)??K[K.length-1];X(p.id),z("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:c,credits_balance:q,shortfall:l}),f({phase:"nofunds",lines:s.map(h=>({item:h.item,priceCredits:h.priceCredits})),shortfall:l}),M(!1)}async function xe(s){if(!n||s.length===0)return;const c=s.map(u=>({...u.item,priceCredits:u.priceCredits})),l=[];let p="authorize",h=!1;f({phase:"processing",step:1,total:s.length});try{const u=[];for(let _=0;_<s.length;_++){const g=s[_];f({phase:"processing",step:_+1,total:s.length});try{const{credit:b,maxCreditedValue:D}=await Le(n.identity,g.usdCents,g.trade.id);l.push(b.id),u.push({trade:g.trade,credits:[b],maxCreditedValue:D})}catch(b){if(Oe(b)){if(l.length){try{await re(n.identity,l)}catch(D){B(D,{flow:"cart_checkout",step:"release"})}A.invalidateQueries({queryKey:["usd-balance"]})}ee(s);return}throw b}}p="submit";let m=[];if(Re())try{m=await Ae({purchases:u,buyer:n.address,signer:n.signer});const g=(await Promise.allSettled(m.map(b=>We(b)))).flatMap(b=>b.status==="rejected"?[b.reason]:[]);if(g.length&&!g.some(b=>b instanceof Ue))throw g[0];h=!0}catch(_){if(!(_ instanceof qe))throw _;m=await le({purchases:u,buyer:n.address,signer:n.signer})}else m=await le({purchases:u,buyer:n.address,signer:n.signer});s.forEach(_=>r(_.item.id)),F(null),z("Shop Completed Purchase",{...Ee(c),payment_type:"credits",no_crypto_step:h,transaction_hash:m[0]??null}),A.invalidateQueries({queryKey:["usd-balance"]}),f({phase:"complete",purchased:c})}catch(u){if(ne(u)||B(u,{flow:"cart_checkout",step:p,cart_size:s.length}),z(ne(u)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:p,error_code:Fe(u),value_usd:ce(c.reduce((m,_)=>m+_.priceCredits,0)),cart_size:s.length}),l.length){try{await re(n.identity,l)}catch(m){B(m,{flow:"cart_checkout",step:"release"})}A.invalidateQueries({queryKey:["usd-balance"]})}f({phase:"error",message:ie(u)})}}function se(s){const c=s.reduce((l,p)=>l+p.priceCredits,0);if(L!=null&&L.credits<c){ee(s);return}xe(s)}async function G(){if(!n){k(a("buyModal.signInToCheckout"));return}const s=v.getState().items;if(s.length!==0){k(null),U(null),M(!0),z("Shop Started Checkout",{cart_size:s.length,cart_value_credits:s.reduce((c,l)=>c+l.priceCredits,0),cart_value_usd:ce(s.reduce((c,l)=>c+l.priceCredits,0)),has_sufficient_credits:q>=s.reduce((c,l)=>c+l.priceCredits,0)});try{E(a("cart.status.reviewing"));const c=await ze(s,n.address,pe),l=[...c.unavailable,...c.own];if(l.length&&(l.forEach(p=>r(p.id)),U(Ze(c))),c.buyable.length===0){k(a("cart.error.noneAvailable")),F(null),E(null);return}if(c.orderChanged){F(c),H.current=Date.now(),E(null);return}E(null),se(c.buyable)}catch(c){B(c,{flow:"cart_checkout",step:"review",cart_size:s.length}),k(ie(c)),E(null)}finally{M(!1)}}}async function je(){if(y){if(!n){k(a("buyModal.signInToCheckout"));return}if(Date.now()-H.current>He){F(null),U(null),await G();return}k(null),se(y.buyable)}}async function ke(){if(Q){try{sessionStorage.setItem($,JSON.stringify(v.getState().items))}catch{}M(!0);try{const s=await $e(Q,n?{address:n.address,identity:n.identity}:void 0);if(s.url){window.location.href=s.url;return}W("/credits")}catch(s){try{sessionStorage.removeItem($)}catch{}B(s,{flow:"cart_buy_credits"}),f({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{M(!1)}}}const ae=x.useRef(!1);x.useEffect(()=>{if(!(w!=null&&w.resumeCheckout)||ae.current)return;ae.current=!0;try{const c=sessionStorage.getItem($);if(c){sessionStorage.removeItem($);const l=JSON.parse(c);Array.isArray(l)&&l.length&&i(l)}}catch{}A.invalidateQueries({queryKey:["usd-balance"]});const s=setTimeout(()=>void G(),0);return()=>clearTimeout(s)},[w==null?void 0:w.resumeCheckout]);const S=ue||(d==null?void 0:d.phase)==="processing";return t.length===0&&!d?e.jsxs("div",{className:"cart cart--empty",children:[e.jsx("span",{className:"ico ico-cart cart-empty__ico","aria-hidden":!0}),e.jsx("p",{className:"cart-empty__title",children:a("cart.empty.title")}),e.jsx("p",{className:"muted",children:a("cart.empty.body")}),e.jsx(J,{className:"btn btn--purple",to:"/assets",children:a("cart.empty.cta")})]}):e.jsxs("div",{className:"checkout",children:[e.jsxs("button",{className:"checkout__back",onClick:()=>W(-1),type:"button",children:[e.jsx("span",{className:"ico ico-arrow-left","aria-hidden":!0}),a("nav.cart")]}),e.jsxs("div",{className:"checkout__body",children:[e.jsxs("section",{className:"checkout__panel",children:[e.jsxs("div",{className:"checkout__panel-head",children:[e.jsx("button",{className:"checkout__panel-back",onClick:()=>W(-1),type:"button","aria-label":a("cart.goBack"),children:e.jsx("span",{className:"ico ico-arrow-left","aria-hidden":!0})}),e.jsx("h1",{className:"checkout__panel-title",children:a("cart.panelTitle",{count:t.length})}),o?e.jsxs("button",{className:"checkout__fitting",onClick:()=>C(!0),disabled:S,children:[e.jsx("span",{className:"ico ico-fitting-room checkout__fitting-ico","aria-hidden":!0}),a("cart.fittingRoom")]}):null]}),e.jsx("div",{className:"checkout__list",children:t.map(s=>{const c=be.get(s.id),l=c?c.priceCredits:s.priceCredits,p=!!c&&c.priceCredits!==s.priceCredits,h=!!I[s.id],u=s.tokenId??s.itemId,m=s.contractAddress&&u?`/item/${s.contractAddress}/${u}`:null;return e.jsxs("div",{className:"checkout__card",children:[e.jsxs("div",{className:"checkout__thumb",children:[m?e.jsx(J,{className:"checkout__thumb-link",to:m,state:{item:s,tradeId:s.tradeId},"aria-label":s.name,children:s.thumbnail?e.jsx("img",{src:s.thumbnail,alt:s.name}):null}):s.thumbnail?e.jsx("img",{src:s.thumbnail,alt:s.name}):null,e.jsx("span",{className:"checkout__thumb-check","aria-hidden":!0,children:e.jsx("svg",{viewBox:"0 0 20 20",width:"12",height:"12",children:e.jsx("path",{d:"M5 10.5l3 3 7-7.5",fill:"none",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),e.jsxs("div",{className:"checkout__info",children:[e.jsxs("div",{className:"checkout__desc",children:[m?e.jsx(J,{className:"checkout__name",to:m,state:{item:s,tradeId:s.tradeId},title:s.name,children:s.name}):e.jsx("div",{className:"checkout__name",title:s.name,children:s.name}),s.creator?e.jsx(Se,{address:s.creator,className:"checkout__creator",linkToProfile:!0}):null]}),e.jsxs("div",{className:"checkout__foot",children:[e.jsxs("div",{className:"checkout__stepper",children:[e.jsx("button",{className:"checkout__step",onClick:()=>O(()=>r(s.id)),disabled:S,"aria-label":a("cart.removeFromCart",{name:s.name}),children:e.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:e.jsx("path",{d:"M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}),e.jsx("span",{className:"checkout__qty",children:"1"}),e.jsx("button",{className:"checkout__step",disabled:!0,"aria-label":a("cart.increaseQuantity"),children:e.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:e.jsx("path",{d:"M8 3.5v9M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),e.jsxs("div",{className:"checkout__price",children:[e.jsx(N,{className:"checkout__price-ico"})," ",l,p?e.jsx("span",{className:"checkout__price-was",children:s.priceCredits}):null]})]})]}),e.jsxs("div",{className:"checkout__actions",children:[e.jsx("button",{className:`checkout__fav${h?" is-on":""}`,onClick:()=>P(s),"aria-label":h?a("cart.removeFromFavorites",{name:s.name}):a("cart.addToFavorites",{name:s.name}),title:h?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:e.jsx("span",{className:`ico ${h?"ico-heart-solid":"ico-heart"}`,"aria-hidden":!0})}),e.jsx("button",{className:"checkout__remove",onClick:()=>O(()=>r(s.id)),disabled:S,"aria-label":a("cart.remove",{name:s.name}),title:a("cart.removeTitle"),children:e.jsx("span",{className:"ico ico-trash","aria-hidden":!0})})]})]},s.id)})}),e.jsxs("div",{className:"checkout__utils",children:[e.jsx("button",{className:"link",onClick:()=>O(j),disabled:S,children:a("cart.clearCart")}),null]})]}),e.jsxs("aside",{className:"checkout__summary",children:[e.jsx("h2",{className:"checkout__summary-title",children:a("cart.purchaseSummary")}),e.jsxs("div",{className:"checkout__summary-body",children:[e.jsxs("div",{className:"checkout__total-line",children:[e.jsx("span",{className:"checkout__total-label",children:a("cart.totalItems",{count:t.length})}),e.jsxs("span",{className:"checkout__total-value",children:[e.jsx(N,{className:"checkout__total-ico"})," ",me]})]}),e.jsx("button",{className:"checkout__cta",onClick:y?je:G,disabled:S,children:S?a("cart.working"):y?a("marketCheckout.confirmPurchase"):a("assetCard.buyNow")}),y?e.jsx("p",{className:"muted checkout__msg",children:a("cart.priceChanged")}):null,Y?e.jsx("p",{className:"muted checkout__msg",children:Y}):null,V?e.jsx("p",{className:"muted checkout__msg",children:V}):null,e.jsx(oe,{message:de,className:"checkout__msg"})]})]})]}),Z.length>0?e.jsx("div",{className:"cart-upsell",children:e.jsx(Ge,{title:a("cart.youMightAlsoLike"),items:Z})}):null,d?e.jsx(De,{phase:d.phase,balanceCredits:q,onClose:ye,step:d.phase==="processing"?d.step:void 0,total:d.phase==="processing"?d.total:void 0,lines:d.phase==="nofunds"?d.lines:void 0,shortfallCredits:d.phase==="nofunds"?d.shortfall:void 0,packs:K,selectedPack:Q,onSelectPack:X,onBuyPacks:ke,purchased:d.phase==="complete"?d.purchased:void 0,onMyAssets:()=>W("/assets?tab=mine"),onTryInWorld:()=>window.open(Xe,"_blank","noopener"),message:d.phase==="error"?d.message:void 0}):null]})}export{bs as Cart};
@@ -1 +0,0 @@
1
- import{j as e,r as u,d as D,a as O}from"./react-yytiy0wi.js";import{F as Q,t as r,j as Y,z as Z,g as J,a as V,A as W,an as X,k as ee,ao as ae}from"./index-CDzDnyJW.js";import{E as re}from"./ErrorNotice-Rze9rgc9.js";import{d as te,g as se,a as ce,A as oe}from"./collection-CtZ-NDco.js";import{u as ie}from"./useStore-BXbR3Zt_.js";import{s as M}from"./address-DrURAr9O.js";import{S as F,C as le,F as ne,c as de,a as T,b as me}from"./categories-BwgdoXaT.js";import{L as ue}from"./LoadMore-BIjeTH4T.js";import{u as pe}from"./useInfiniteGrid-gL0KJ-yb.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-BPJvc5GU.js";import"./ethers-w2AslR0v.js";import"./intl-CBcMB1D2.js";function he({name:t,creator:a}){const{data:o}=ie(a),l=(o==null?void 0:o.cover)||te;return e.jsxs("section",{className:"collection-hero","aria-label":t,children:[e.jsxs("div",{className:"collection-hero__cover",children:[e.jsx("img",{className:"collection-hero__cover-img",src:l,alt:"",loading:"eager"}),e.jsx("div",{className:"collection-hero__scrim","aria-hidden":!0})]}),e.jsx("h1",{className:"collection-hero__title",children:t})]})}function ge({address:t}){var x,i;const{data:a}=Q(t),[o,l]=u.useState(!1);if(!t)return null;const n=(a==null?void 0:a.name)||M(t),p=(i=(x=a==null?void 0:a.avatar)==null?void 0:x.snapshots)==null?void 0:i.face256,h=`${Y.profileUrl}/${t}`,g=se(ce({name:a==null?void 0:a.name,hasClaimedName:a==null?void 0:a.hasClaimedName,ethAddress:(a==null?void 0:a.ethAddress)??t}));async function d(){try{await navigator.clipboard.writeText(t),l(!0),window.setTimeout(()=>l(!1),1500)}catch(_){Z(_,{flow:"copy_creator_address"})}}return e.jsxs("div",{className:"creator-card",children:[p?e.jsx("img",{className:"creator-card__ava",src:p,alt:"",loading:"eager",style:{backgroundColor:g}}):e.jsx("span",{className:"creator-card__ava creator-card__ava--ph","aria-hidden":!0,style:{backgroundColor:g}}),e.jsx("h2",{className:"creator-card__name",title:n,children:n}),e.jsxs("button",{type:"button",className:"creator-card__account",onClick:()=>void d(),title:o?r("collection.copied"):r("collection.copyAddress"),"aria-label":o?r("collection.copied"):r("collection.copyAddress"),children:[e.jsx("span",{className:"creator-card__account-text",children:M(t)}),e.jsx("span",{className:"ico ico-copy creator-card__copy","aria-hidden":!0})]}),e.jsx("a",{className:"creator-card__view",href:h,target:"_blank",rel:"noopener noreferrer",children:r("collection.viewProfile")})]})}const xe=48;function Me(){var k;const{contractAddress:t}=D(),a=O(),[o,l]=u.useState("wearable"),[n,p]=u.useState(null),[h,g]=u.useState([]),[d,x]=u.useState(""),[i,_]=u.useState(""),[v,E]=u.useState("newest"),f=d&&!Number.isNaN(Number(d))?Number(d):void 0,C=i&&!Number.isNaN(Number(i))?Number(i):void 0,R=n?me[n]:void 0,B=(F.find(s=>s.key===v)??F[0]).server,y={category:o,rarities:h.length?h:void 0,wearableCategories:R,minPriceCredits:f,maxPriceCredits:C,sortBy:B},{items:b,total:L,isLoading:N,error:A,hasNextPage:U,isFetchingNextPage:S,fetchNextPage:$}=pe(["collection-page",t,y],s=>X(t,{...y,first:xe,skip:s}),{enabled:!!t}),{data:c}=J({queryKey:["collection-meta",t],queryFn:()=>ae(t),enabled:!!t,staleTime:5*6e4}),w=(c==null?void 0:c.name)||r("collection.fallbackTitle");V({title:c==null?void 0:c.name,description:c!=null&&c.name?r("seo.collection.description",{name:c.name}):void 0});const P=(c==null?void 0:c.creator)||((k=b[0])==null?void 0:k.creator);function I(s){l(s),p(null)}function q(s){g(m=>m.includes(s)?m.filter(z=>z!==s):[...m,s])}function G(){l("wearable"),p(null),g([]),x(""),_("")}const j=!!(f||C),H=j?`${d||"0"}–${i||"∞"}`:r("filter.price"),K=o!=="wearable"||!!n||h.length>0||j;return e.jsxs("div",{className:"collection-page",children:[e.jsxs("nav",{className:"collection-page__crumbs","aria-label":r("collection.breadcrumbAria"),children:[e.jsx("button",{className:"collection-page__crumb-link",onClick:()=>a("/assets"),children:r("collection.breadcrumb")}),e.jsx("span",{className:"collection-page__crumb-sep",children:"/"}),e.jsx("span",{className:"collection-page__crumb-current",children:w})]}),e.jsx(he,{name:w,creator:P}),e.jsxs("div",{className:"browse browse--sidebar collection-page__browse",children:[e.jsxs("aside",{className:"browse__sidebar",children:[e.jsx(ge,{address:P}),e.jsx(le,{category:o,subCategory:n,onCategory:I,onSub:p,title:r("collection.category"),flat:!0})]}),e.jsxs("div",{className:"browse__main",children:[!N&&b.length>0?e.jsx(oe,{items:b,source:"collection"}):null,e.jsx(ne,{rarities:h,onToggleRarity:q,sort:v,onSort:E,total:L,loading:N,anyActive:K,onClear:G,renderTrailing:s=>e.jsx(de,{panelKey:"price",label:H,active:j,panel:s,children:e.jsxs("div",{className:"filter-pop filter-pop--price",children:[e.jsxs("div",{className:"filter-pop__price-row",children:[e.jsx("input",{type:"number",min:"0","aria-label":r("collection.priceMin"),placeholder:r("collection.priceMinPlaceholder"),value:d,onChange:m=>x(m.target.value)}),e.jsx("span",{children:"–"}),e.jsx("input",{type:"number",min:"0","aria-label":r("collection.priceMax"),placeholder:r("collection.priceMaxPlaceholder"),value:i,onChange:m=>_(m.target.value)})]}),e.jsx("p",{className:"filter-pop__hint",children:r("collection.priceHint",{currency:ee.name})})]})})}),A?e.jsx(re,{message:r("collection.error")}):null,e.jsx("div",{className:"grid",children:N?e.jsx(T,{count:15}):e.jsxs(e.Fragment,{children:[b.map(s=>e.jsx(W,{item:s},s.id)),S?e.jsx(T,{count:6}):null]})}),e.jsx(ue,{hasNextPage:U,isFetching:S,onLoadMore:()=>void $()}),!N&&!A&&b.length===0?e.jsx("p",{className:"muted",children:r("collection.empty")}):null]})]})]})}export{Me as Collection,Me as default};
@@ -1 +0,0 @@
1
- .collection-hero{position:relative;border-radius:var(--radius-card);overflow:hidden;margin-bottom:24px;min-height:200px;display:flex;align-items:center;justify-content:center}.collection-hero__cover{position:absolute;top:0;right:0;bottom:0;left:0;z-index:0}.collection-hero__cover-img{width:100%;height:100%;object-fit:cover;display:block}.collection-hero__scrim{position:absolute;top:0;right:0;bottom:0;left:0;background:radial-gradient(ellipse at center,#00000059,#0000008c)}.collection-hero__title{position:relative;z-index:1;margin:0;padding:32px 24px;text-align:center;color:#fff;font-size:40px;font-weight:800;line-height:1.2;letter-spacing:.02em;text-transform:uppercase;text-shadow:0 2px 12px rgba(0,0,0,.4)}@media(max-width:768px){.collection-hero{min-height:140px}.collection-hero__title{padding:24px 16px;font-size:26px}}.creator-card{display:flex;flex-direction:column;align-items:center;text-align:center;gap:12px;padding-bottom:24px;margin-top:-79px;margin-bottom:8px;border-bottom:1px solid var(--line)}.creator-card__ava{width:110px;height:110px;border-radius:50%;object-fit:cover;border:5px solid #fff;box-shadow:0 2px 12px #0003;background:#ff4bed}.creator-card__ava--ph{display:block}.creator-card__name{margin:0;font-size:20px;font-weight:700;line-height:1.3;color:var(--text);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.creator-card__account{display:inline-flex;align-items:center;gap:8px;padding:4px 8px;border:0;border-radius:var(--radius-btn);background:none;color:var(--muted);font:inherit;font-size:14px;cursor:pointer;transition:color .15s ease,background .15s ease}.creator-card__account:hover{color:var(--text);background:var(--media)}.creator-card__copy{width:16px;height:16px}.creator-card__view{display:inline-flex;align-items:center;justify-content:center;width:100%;height:44px;padding:0 20px;border:2px solid var(--accent);border-radius:var(--radius-btn);background:transparent;color:var(--accent);font-weight:600;font-size:13px;text-transform:uppercase;letter-spacing:.046em;text-decoration:none;transition:background .15s ease,color .15s ease}.creator-card__view:hover{background:var(--accent);color:#fff}
@@ -1 +0,0 @@
1
- import{r as o,j as t}from"./react-yytiy0wi.js";import{t as s,B as f,A as k}from"./index-CDzDnyJW.js";function A({title:v,items:a,onViewAll:i}){const r=o.useRef(null),[u,x]=o.useState(1),[d,g]=o.useState(0),[j,p]=o.useState(!0),[C,b]=o.useState(!1),c=o.useCallback(()=>{const l=r.current;if(!l)return;const{scrollLeft:e,scrollWidth:m,clientWidth:n}=l,_=Math.max(1,Math.ceil(m/n));x(_),g(Math.min(_-1,Math.round(e/n))),p(e<=1),b(e+n>=m-1)},[]);if(o.useEffect(()=>{c();const l=r.current;if(l)return l.addEventListener("scroll",c,{passive:!0}),window.addEventListener("resize",c),()=>{l.removeEventListener("scroll",c),window.removeEventListener("resize",c)}},[c,a.length]),a.length===0)return null;function h(l){const e=r.current;e&&e.scrollBy({left:l*e.clientWidth,behavior:"smooth"})}function w(l){const e=r.current;e&&e.scrollTo({left:l*e.clientWidth,behavior:"smooth"})}return t.jsxs("section",{className:"collection-carousel",children:[t.jsxs("div",{className:"collection-carousel__head",children:[t.jsx("h2",{className:"collection-carousel__title",children:v}),i?t.jsxs("button",{className:"collection-carousel__viewall",onClick:i,children:[s("collectionCarousel.viewAll"),t.jsx("span",{className:"ico ico-chevron collection-carousel__viewall-ico","aria-hidden":!0})]}):null]}),t.jsxs("div",{className:"collection-carousel__viewport",children:[t.jsx("button",{className:"collection-carousel__arrow collection-carousel__arrow--left",onClick:()=>h(-1),"aria-label":s("collectionCarousel.scrollLeft"),disabled:j,children:t.jsx("img",{src:f,alt:"","aria-hidden":!0})}),t.jsx("div",{className:"collection-carousel__track",ref:r,children:a.map(l=>t.jsx(k,{item:l},l.id))}),t.jsx("button",{className:"collection-carousel__arrow collection-carousel__arrow--right",onClick:()=>h(1),"aria-label":s("collectionCarousel.scrollRight"),disabled:C,children:t.jsx("img",{src:f,alt:"","aria-hidden":!0})})]}),u>1?t.jsx("div",{className:"collection-carousel__dots","aria-label":s("collectionCarousel.pages"),children:Array.from({length:u}).map((l,e)=>t.jsx("button",{className:`collection-carousel__dot${e===d?" is-active":""}`,"aria-label":s("collectionCarousel.goToPage",{page:e+1}),"aria-current":e===d?"true":void 0,onClick:()=>w(e)},e))}):null]})}export{A as C};
@@ -1 +0,0 @@
1
- import{a as U,j as e,L as ae,d as re,u as se,r as j}from"./react-yytiy0wi.js";import{aH as te,aI as oe,af as ce,t as a,aJ as $,F as K,d as le,j as ne,a as ie,A as de,aj as me,aK as ue,k as he}from"./index-CDzDnyJW.js";import{d as ge,g as xe,a as _e,A as pe}from"./collection-CtZ-NDco.js";import{u as Ne,L as je}from"./useStore-BXbR3Zt_.js";import{s as D}from"./address-DrURAr9O.js";import{S as E,C as be,a as w,F as fe,c as Ce,b as ve}from"./categories-BwgdoXaT.js";import{L as I}from"./LoadMore-BIjeTH4T.js";import{u as R}from"./useInfiniteGrid-gL0KJ-yb.js";import{E as T}from"./ErrorNotice-Rze9rgc9.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-BPJvc5GU.js";import"./ethers-w2AslR0v.js";import"./intl-CBcMB1D2.js";function we({collection:t,cover:r,itemCount:o}){const n=U(),{contractAddress:m,name:g,creator:x}=t,N=r==null||o==null,{data:i}=te(m,N),p=r==null?(i==null?void 0:i.items)??[]:[],h=o??(i==null?void 0:i.total);function _(){n(`/collection/${m}`)}return e.jsxs("article",{className:"coll-card",role:"link",tabIndex:0,onClick:_,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),_())},children:[e.jsx("div",{className:"coll-card__media",children:r?e.jsx("img",{className:"coll-card__img",src:r,alt:"",loading:"lazy"}):p.length>0?e.jsx(oe,{items:p,className:"coll-card__cover"}):null}),e.jsxs("div",{className:"coll-card__body",children:[e.jsx("h3",{className:"coll-card__name",title:g,children:g}),e.jsxs("div",{className:"coll-card__meta",children:[x?e.jsx(ce,{address:x,className:"coll-card__creator",linkToProfile:!0}):e.jsx("span",{className:"coll-card__creator",children:" "}),e.jsx("span",{className:"coll-card__count",children:h==null?"…":a("collectionCard.itemCount",{count:h})})]}),e.jsx("button",{className:"coll-card__view",onClick:d=>{d.stopPropagation(),_()},tabIndex:-1,children:a("collectionCard.viewCollection")})]})]})}function ke({address:t,className:r=""}){const o=$(m=>m.followed.includes(t.toLowerCase())),n=$(m=>m.toggle);return t?e.jsx("button",{type:"button",className:`btn btn--sm ${o?"btn--ghost":"btn--outline"} ${r}`.trim(),"aria-pressed":o,title:o?a("creator.unfollowTitle"):a("creator.followTitle"),onClick:()=>n(t),children:o?a("creator.following"):a("creator.follow")}):null}const Pe={website:"ico-website",twitter:"ico-twitter",discord:"ico-discord",facebook:"ico-facebook"};function Se({address:t}){var d,b;const{data:r}=K(t),{data:o}=Ne(t),n=le(l=>{var f;return(f=l.session)==null?void 0:f.address}),m=!!n&&n.toLowerCase()===t.toLowerCase(),g=(r==null?void 0:r.name)||D(t),x=(b=(d=r==null?void 0:r.avatar)==null?void 0:d.snapshots)==null?void 0:b.face256,N=(o==null?void 0:o.cover)||ge,i=o==null?void 0:o.description,p=`${ne.profileUrl}/${t}`,h=je.filter(l=>o==null?void 0:o.links[l]),_=xe(_e({name:r==null?void 0:r.name,hasClaimedName:r==null?void 0:r.hasClaimedName,ethAddress:(r==null?void 0:r.ethAddress)??t}));return e.jsxs("section",{className:"creator-hero","aria-label":`${g} storefront`,children:[e.jsxs("div",{className:"creator-hero__cover",children:[e.jsx("img",{className:"creator-hero__cover-img",src:N,alt:"",loading:"eager"}),e.jsx("div",{className:"creator-hero__scrim","aria-hidden":!0})]}),(h.length>0||m)&&e.jsxs("div",{className:"creator-hero__links",children:[h.map(l=>e.jsx("a",{className:"creator-hero__link",href:(o==null?void 0:o.links[l])??"",target:"_blank",rel:"noopener noreferrer",title:a(`creator.link.${l}`),"aria-label":a(`creator.link.${l}`),children:e.jsx("span",{className:`ico ${Pe[l]}`,"aria-hidden":!0})},l)),m&&e.jsx(ae,{className:"creator-hero__link creator-hero__edit",to:"/store-settings",title:a("creator.editStore"),"aria-label":a("creator.editStore"),children:e.jsx("span",{className:"ico ico-pen","aria-hidden":!0})})]}),e.jsxs("div",{className:"creator-hero__body",children:[x?e.jsx("img",{className:"creator-hero__ava",src:x,alt:"",loading:"eager",style:{backgroundColor:_}}):e.jsx("span",{className:"creator-hero__ava creator-hero__ava--ph","aria-hidden":!0,style:{backgroundColor:_}}),e.jsxs("div",{children:[e.jsx("h2",{className:"creator-hero__name",children:g}),i?e.jsx("p",{className:"creator-hero__desc",children:i}):null]}),e.jsxs("div",{className:"creator-hero__actions",children:[e.jsx("a",{className:"creator-hero__view",href:p,target:"_blank",rel:"noopener noreferrer",children:a("creator.viewProfile")}),e.jsx(ke,{address:t,className:"creator-hero__follow"})]})]})]})}const B=48;function De(){const{address:t}=re(),r=U(),[o]=se(),n=o.has("collections"),{data:m}=K(t),g=(m==null?void 0:m.name)||(t?D(t):a("creator.fallbackName"));ie({title:g,description:a("seo.creator.description",{name:g})});const[x,N]=j.useState("wearable"),[i,p]=j.useState(null),[h,_]=j.useState([]),[d,b]=j.useState(""),[l,f]=j.useState(""),[P,H]=j.useState("newest"),S=d&&!Number.isNaN(Number(d))?Number(d):void 0,y=l&&!Number.isNaN(Number(l))?Number(l):void 0,O=i?ve[i]:void 0,G=(E.find(s=>s.key===P)??E[0]).server,L={creator:t,category:x,rarities:h.length?h:void 0,wearableCategories:O,minPriceCredits:S,maxPriceCredits:y,sortBy:G},{items:C,total:Y,isLoading:v,error:A,hasNextPage:z,isFetchingNextPage:F,fetchNextPage:J}=R(["creator-listings",L],s=>me({...L,first:B,skip:s}),{enabled:!!t&&!n}),u=R(["creator-collections",t],s=>ue(t,{first:B,skip:s}).then(c=>({items:c.collections,total:c.total})),{enabled:!!t&&n});function W(s){N(s),p(null),n&&M()}function M(){const s=new URLSearchParams(o);s.delete("collections");const c=s.toString();r({search:c?`?${c}`:""},{replace:!0})}function Z(){if(n){M();return}const s=new URLSearchParams(o);s.delete("collections");const c=s.toString();r({search:c?`?${c}&collections`:"?collections"},{replace:!0})}function q(s){_(c=>c.includes(s)?c.filter(ee=>ee!==s):[...c,s])}function Q(){N("wearable"),p(null),_([]),b(""),f("")}const k=!!(S||y),V=k?`${d||"0"}–${l||"∞"}`:a("filter.price"),X=x!=="wearable"||!!i||h.length>0||k;return e.jsxs("div",{className:"collection-page",children:[e.jsxs("nav",{className:"collection-page__crumbs","aria-label":a("creator.breadcrumbAria"),children:[e.jsx("button",{className:"collection-page__crumb-link",onClick:()=>r("/assets"),children:a("creator.breadcrumb")}),e.jsx("span",{className:"collection-page__crumb-sep",children:"/"}),e.jsx("span",{className:"collection-page__crumb-current",children:g})]}),t?e.jsx(Se,{address:t}):null,!n&&!v&&C.length>0?e.jsx(pe,{items:C,source:"creator"}):null,e.jsxs("div",{className:"browse browse--sidebar",children:[e.jsx("aside",{className:"browse__sidebar",children:e.jsx(be,{category:x,subCategory:i,onCategory:W,onSub:p,title:a("creator.category"),flat:!0,collections:n,onCollections:Z})}),e.jsx("div",{className:"browse__main",children:n?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"creator-collections__bar",children:e.jsx("span",{className:"assets__count",children:u.isLoading?"…":a("creator.collectionsCount",{count:u.total})})}),u.error?e.jsx(T,{message:a("creator.error")}):null,e.jsx("div",{className:"grid grid--collections",children:u.isLoading?e.jsx(w,{count:9}):e.jsxs(e.Fragment,{children:[u.items.map(s=>e.jsx(we,{collection:s,itemCount:s.itemCount},s.contractAddress)),u.isFetchingNextPage?e.jsx(w,{count:6}):null]})}),e.jsx(I,{hasNextPage:u.hasNextPage,isFetching:u.isFetchingNextPage,onLoadMore:()=>void u.fetchNextPage()}),!u.isLoading&&!u.error&&u.items.length===0?e.jsx("p",{className:"muted",children:a("creator.collectionsEmpty")}):null]}):e.jsxs(e.Fragment,{children:[e.jsx(fe,{rarities:h,onToggleRarity:q,sort:P,onSort:H,total:Y,loading:v,anyActive:X,onClear:Q,renderTrailing:s=>e.jsx(Ce,{panelKey:"price",label:V,active:k,panel:s,children:e.jsxs("div",{className:"filter-pop filter-pop--price",children:[e.jsxs("div",{className:"filter-pop__price-row",children:[e.jsx("input",{type:"number",min:"0","aria-label":a("creator.priceMin"),placeholder:a("creator.priceMinPlaceholder"),value:d,onChange:c=>b(c.target.value)}),e.jsx("span",{children:"–"}),e.jsx("input",{type:"number",min:"0","aria-label":a("creator.priceMax"),placeholder:a("creator.priceMaxPlaceholder"),value:l,onChange:c=>f(c.target.value)})]}),e.jsx("p",{className:"filter-pop__hint",children:a("creator.priceHint",{currency:he.name})})]})})}),A?e.jsx(T,{message:a("creator.error")}):null,e.jsx("div",{className:"grid",children:v?e.jsx(w,{count:15}):e.jsxs(e.Fragment,{children:[C.map(s=>e.jsx(de,{item:s},s.id)),F?e.jsx(w,{count:6}):null]})}),e.jsx(I,{hasNextPage:z,isFetching:F,onLoadMore:()=>void J()}),!v&&!A&&C.length===0?e.jsx("p",{className:"muted",children:a("creator.empty")}):null]})})]})]})}export{De as Creator,De as default};
@@ -1 +0,0 @@
1
- .coll-card{height:300px;background:linear-gradient(#fff,#fff) padding-box,linear-gradient(var(--line),var(--line)) border-box;border:2px solid transparent;border-radius:var(--radius-card);overflow:hidden;display:flex;flex-direction:column;cursor:pointer;transition:background .15s ease,box-shadow .15s ease}.coll-card:hover,.coll-card:focus-visible{background:linear-gradient(#fff,#fff) padding-box,var(--cerise) border-box;box-shadow:0 0 8px 0 var(--brand-violet);outline:none}.coll-card__media{position:relative;flex:1;min-height:0;background:var(--media);overflow:hidden}.coll-card__img{width:100%;height:100%;object-fit:cover;display:block}.coll-card__cover{gap:2px}.coll-card__cover .coll-thumb__cell img{object-fit:contain;padding:10px}.coll-card__body{flex:0 0 auto;padding:12px 14px;display:flex;flex-direction:column;gap:8px}.coll-card__name{margin:0;font-weight:700;font-size:18px;line-height:1.3;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.coll-card__meta{display:flex;align-items:center;justify-content:space-between;gap:10px}.coll-card__creator{min-width:0}.coll-card__creator.creator{color:var(--muted)}.coll-card__creator .creator__ava{width:24px;height:24px}.coll-card__creator .creator__name{font-size:14px}.coll-card__creator .creator__display{color:var(--dcl-red);font-weight:700}.coll-card__count{flex:none;color:var(--text);font-weight:600;font-size:14px;white-space:nowrap}.coll-card__view{display:none;width:100%;align-items:center;justify-content:center;height:44px;background:var(--amethyst);color:var(--soft-white);border:0;border-radius:var(--radius-btn);font-weight:700;font-size:13px;text-transform:uppercase;letter-spacing:.046em;transition:filter .15s ease}.coll-card:hover .coll-card__view,.coll-card:focus-within .coll-card__view{display:flex}@media(hover:none){.coll-card__view{display:flex}}.coll-card__view:hover{filter:brightness(1.08)}@media(max-width:768px){.coll-card__name{font-size:16px}}.creator-hero{position:relative;border-radius:var(--radius-card);overflow:hidden;margin-bottom:24px;min-height:360px;display:flex;align-items:center;justify-content:center}.creator-hero__cover{position:absolute;top:0;right:0;bottom:0;left:0;z-index:0}.creator-hero__cover-img{width:100%;height:100%;object-fit:cover;display:block}.creator-hero__scrim{position:absolute;top:0;right:0;bottom:0;left:0;background:radial-gradient(ellipse at center,#00000059,#0000008c)}.creator-hero__links{position:absolute;top:16px;right:16px;z-index:2;display:flex;align-items:center;gap:8px}.creator-hero__link{display:flex;align-items:center;justify-content:center;color:#fff;transition:opacity .15s linear}.creator-hero__link:hover{opacity:.8}.creator-hero__link .ico{width:36px;height:36px}.creator-hero__edit{width:32px;height:32px;border-radius:50%;border:2px solid #fff;transition:background-color .15s linear}.creator-hero__edit:hover{opacity:1;background:#ffffff3d}.creator-hero__edit .ico-pen{width:16px;height:16px}.creator-hero__body{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;text-align:center;gap:24px;padding:32px 20px}.creator-hero__ava{width:112px;height:112px;border-radius:50%;object-fit:cover;border:4px solid #fff;box-shadow:0 2px 12px #0000004d;background:#ff4bed}.creator-hero__ava--ph{display:block}.creator-hero__name{margin:0;font-size:18px;font-weight:700;color:#fff;line-height:1.6}.creator-hero__desc{margin:0;font-size:15px;color:#fff;line-height:1.6;max-width:520px}.creator-hero__actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:center}.creator-hero__view,.creator-hero .creator-hero__follow{display:inline-flex;align-items:center;justify-content:center;height:44px;padding:0 28px;border:2px solid #fff;border-radius:var(--radius-btn);background:transparent;color:#fff;font-weight:600;font-size:13px;text-transform:uppercase;letter-spacing:.046em;text-decoration:none;transition:background .15s ease}.creator-hero__view:hover,.creator-hero .creator-hero__follow:hover:not(:disabled){background:#ffffff24}@media(max-width:768px){.creator-hero{min-height:260px}.creator-hero__body{padding:56px 16px 24px}.creator-hero__ava{width:88px;height:88px}.creator-hero__name{font-size:16px}.creator-hero__desc{font-size:14px}.creator-hero__links{top:12px;right:12px;gap:6px}.creator-hero__link .ico{width:30px;height:30px}.creator-hero__edit{width:28px;height:28px}.creator-hero__edit .ico-pen{width:14px;height:14px}}
@@ -1 +0,0 @@
1
- import{j as r}from"./react-yytiy0wi.js";function n({message:e,className:o}){return e?r.jsxs("p",{className:o?`error-notice ${o}`:"error-notice",role:"alert",children:[r.jsx("svg",{className:"error-notice__ico",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:r.jsx("path",{d:"M12 2 1 21h22L12 2zm0 6a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0V9a1 1 0 0 1 1-1zm0 8.25a1.25 1.25 0 1 1 0 2.5 1.25 1.25 0 0 1 0-2.5z"})}),r.jsx("span",{className:"error-notice__msg",children:e})]}):null}export{n as E};
@@ -1 +0,0 @@
1
- import{a as I,u as V,r as i,j as e}from"./react-yytiy0wi.js";import{a as D,t,d as O,u as K,b as g,k as d,z as A,w as L,C as Y,r as $}from"./index-CDzDnyJW.js";import{R as G}from"./resume-buy-Bf0zIH7y.js";import{R as q}from"./cart-checkout-RV2JhHc0.js";import{p as z,c as Q,i as W,C as J}from"./payments-tEVDRx3d.js";import{C as X}from"./CircularProgress-C9g4a9bc.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-BPJvc5GU.js";import"./ethers-w2AslR0v.js";import"./intl-CBcMB1D2.js";const C="https://cdn.decentraland.org/@dcl/shop/0.1.0-29736515487.commit-b64bf82/assets/pack-chips--HnOpf5U.webp",ee="https://cdn.decentraland.org/@dcl/shop/0.1.0-29736515487.commit-b64bf82/assets/credit-coin-CmcTCd5i.webp",se="data:image/svg+xml,%3csvg%20width='60'%20height='60'%20viewBox='0%200%2060%2060'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='60'%20height='60'%20rx='30'%20fill='%2334CE77'/%3e%3cpath%20d='M21.6583%2046.1067L11.4656%2036.0591C10.1688%2034.829%2010.1905%2032.7207%2011.4769%2031.4622L13.6868%2029.3591C14.9732%2028.1006%2017.1615%2028.1058%2018.4582%2029.3359L23.8747%2034.6197L41.9704%2015.6527C43.2568%2014.3942%2045.4291%2014.2093%2046.7258%2015.4394L48.8765%2017.3628C50.1732%2018.5929%2050.3491%2020.6844%2049.0626%2021.9429L26.6112%2045.8766C25.1433%2047.342%2022.955%2047.3368%2021.6583%2046.1067Z'%20fill='%23FCFCFC'/%3e%3c/svg%3e",te="data:image/svg+xml,%3csvg%20width='61'%20height='61'%20viewBox='0%200%2061%2061'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M30.5%2061C47.3447%2061%2061%2047.3447%2061%2030.5C61%2013.6553%2047.3447%200%2030.5%200C13.6553%200%200%2013.6553%200%2030.5C0%2047.3447%2013.6553%2061%2030.5%2061Z'%20fill='url(%23gc_paint0)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.2001%2054.8997C17.2935%2058.7274%2023.6375%2060.9997%2030.5%2060.9997C37.3625%2060.9997%2043.7065%2058.7274%2048.8%2054.8997H12.2001Z'%20fill='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.10013%2048.7997C7.83863%2051.1024%209.89738%2053.1612%2012.2001%2054.8997H48.8001C51.1029%2053.1612%2053.1616%2051.1024%2054.9001%2048.7997H6.10013Z'%20fill='%23FFA25A'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M40.9158%2042.6998H2.5468C3.4923%2044.8805%204.69705%2046.924%206.10005%2048.7997H40.9311V42.6998H40.9158Z'%20fill='%23FFC95B'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M21.6094%2019.8247V42.6997H40.6719L21.6094%2019.8247Z'%20fill='url(%23gc_paint1)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.5468%2042.6997H21.6093V19.8248L2.5468%2042.6997Z'%20fill='%23FCFCFC'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M40.9158%2032.025V48.8H54.9L40.9158%2032.025Z'%20fill='url(%23gc_paint2)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M26.9467%2048.8H40.9157V32.025L26.9467%2048.8Z'%20fill='%23FCFCFC'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M40.9158%2027.4497C45.127%2027.4497%2048.5408%2024.0359%2048.5408%2019.8247C48.5408%2015.6136%2045.127%2012.1998%2040.9158%2012.1998C36.7046%2012.1998%2033.2908%2015.6136%2033.2908%2019.8247C33.2908%2024.0359%2036.7046%2027.4497%2040.9158%2027.4497Z'%20fill='%23FFC95B'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M21.6092%2015.2497C23.7148%2015.2497%2025.4217%2013.5428%2025.4217%2011.4372C25.4217%209.33166%2023.7148%207.62475%2021.6092%207.62475C19.5036%207.62475%2017.7967%209.33166%2017.7967%2011.4372C17.7967%2013.5428%2019.5036%2015.2497%2021.6092%2015.2497Z'%20fill='%23FFC95B'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='gc_paint0'%20x1='30.5'%20y1='-12.6335'%20x2='-12.6335'%20y2='30.5'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3clinearGradient%20id='gc_paint1'%20x1='21.6029'%20y1='19.8247'%20x2='21.6029'%20y2='42.6997'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A524B3'/%3e%3cstop%20offset='1'%20stop-color='%23FF2D55'/%3e%3c/linearGradient%3e%3clinearGradient%20id='gc_paint2'%20x1='40.9111'%20y1='32.025'%20x2='40.9111'%20y2='48.8'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A524B3'/%3e%3cstop%20offset='1'%20stop-color='%23FF2D55'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",_=W()?"mock":"stripe",re={pack_5:C,pack_10:C,pack_25:C,pack_50:C},ce="https://docs.decentraland.org";function P(o){const s=o;if((s==null?void 0:s.name)==="AbortError")return t("getCredits.errorCanceled");const h=((s==null?void 0:s.message)??"").toLowerCase();return h.includes("sign in")?t("getCredits.errorSignIn",{currency:d.name}):h.includes("timed out")?t("getCredits.errorTimeout",{currency:d.name}):t("getCredits.errorGeneric")}function _e(){D({title:t("nav.getCredits",{currency:d.name}),noindex:!0});const o=I(),{session:s,signIn:h}=O(),x=K(),[v,w]=V(),[p,l]=i.useState("select"),[a,S]=i.useState(null),[F,E]=i.useState(null),[H,m]=i.useState(null),[U,j]=i.useState(!1),N=i.useRef(null);i.useEffect(()=>()=>{var r;return(r=N.current)==null?void 0:r.abort()},[]);const B=i.useCallback(()=>{w(r=>{const c=new URLSearchParams(r);return c.delete("order"),c.delete("canceled"),c},{replace:!0})},[w]),y=i.useCallback(async r=>{l("processing");const c=new AbortController;N.current=c;try{const u=await z(r,{signal:c.signal,address:s==null?void 0:s.address,identity:s==null?void 0:s.identity});if(u.status==="credited"){const f=u.creditsGranted??(a==null?void 0:a.credits)??0;E(f>0?f:null),l("success"),g("Shop Completed Buy Credits",{order_id:r,pack_usd:(a==null?void 0:a.usd)??null,credits:f>0?f:null,provider:_}),x.invalidateQueries({queryKey:["usd-balance"]});try{if(sessionStorage.getItem(q)){o("/cart",{state:{resumeCheckout:!0}});return}}catch{}try{const R=sessionStorage.getItem(G);if(R){sessionStorage.removeItem(G);const n=JSON.parse(R),M=(n==null?void 0:n.tokenId)??(n==null?void 0:n.itemId);if(n!=null&&n.contractAddress&&M){o(`/item/${n.contractAddress}/${M}`,{state:{item:n,resumeBuy:!0}});return}}}catch{}}else u.status==="pending"?(g("Shop Buy Credits Pending",{step:"grant",pack_usd:(a==null?void 0:a.usd)??null}),x.invalidateQueries({queryKey:["usd-balance"]}),l("pending")):(g("Shop Buy Credits Failed",{step:"grant",error_code:"grant_failed",pack_usd:(a==null?void 0:a.usd)??null}),m(u.error??t("getCredits.errorGrant",{currency:d.name})),l("error"))}catch(u){A(u,{flow:"get_credits",step:"grant",order_id:r}),g("Shop Buy Credits Failed",{step:"grant",error_code:L(u),pack_usd:(a==null?void 0:a.usd)??null}),m(P(u)),l("error")}},[a,s,x,o]),Z=i.useCallback(async r=>{if(!s){h();return}m(null),j(!1),S(r),l(_==="mock"?"processing":"redirecting"),g("Shop Started Buy Credits",{pack_usd:r.usd,credits:r.credits,provider:_});try{const c=await Q(r.id,{address:s.address,identity:s.identity});if(c.mock)y(c.orderId);else if(c.url)g("Shop Redirected To Stripe",{order_id:c.orderId,pack_usd:r.usd,credits:r.credits}),window.location.href=c.url;else throw new Error("Checkout did not return a redirect url")}catch(c){A(c,{flow:"get_credits",step:"checkout",provider:_}),g("Shop Buy Credits Failed",{step:"checkout",error_code:L(c),pack_usd:r.usd}),m(P(c)),l("error")}},[s,h,y]),b=i.useRef(!1);i.useEffect(()=>{if(b.current)return;const r=v.get("order");if(v.get("canceled")!=null){b.current=!0,g("Shop Buy Credits Cancelled",{order_id:r,provider:_}),B(),j(!0),l("select");return}r&&(l("processing"),s&&(b.current=!0,B(),y(r)))},[v,s]);function k(){var r;(r=N.current)==null||r.abort(),l("select"),S(null),E(null),m(null),j(!1)}const T=p==="select";return e.jsxs("div",{className:"getcredits",children:[T&&e.jsxs("header",{className:"getcredits__head",children:[e.jsx("h1",{className:"getcredits__title",children:t("getCredits.title",{currency:d.name})}),e.jsxs("p",{className:"getcredits__sub",children:[t("getCredits.subtitle",{currency:d.name})," ",e.jsxs("a",{className:"getcredits__learn",href:ce,target:"_blank",rel:"noreferrer",children:[t("getCredits.learnMore"),e.jsxs("svg",{className:"getcredits__learn-ico",viewBox:"0 0 13 13","aria-hidden":!0,fill:"none",children:[e.jsx("path",{d:"M4 2h7v7",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M11 2 2 11",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})]})]})]})]}),p==="select"&&e.jsxs(e.Fragment,{children:[U&&e.jsx("p",{className:"getcredits__note muted",role:"status",children:t("getCredits.canceledNote")}),e.jsx(ae,{onSelect:r=>void Z(r)})]}),p==="redirecting"&&e.jsxs("div",{className:"getcredits__status",role:"status","aria-live":"polite",children:[e.jsx(X,{size:32}),e.jsx("p",{className:"muted",children:t("getCredits.redirecting")})]}),p==="processing"&&e.jsxs("div",{className:"gc-processing",role:"status","aria-live":"polite",children:[e.jsx("img",{className:"gc-processing__logo",src:te,alt:"",width:61,height:61}),e.jsxs("div",{className:"gc-processing__body",children:[e.jsxs("p",{className:"gc-processing__title",children:[e.jsx("strong",{children:t("getCredits.processing")}),"…"]}),e.jsxs("div",{className:"gc-progress","aria-hidden":!0,children:[e.jsx("span",{className:"gc-progress__track",children:e.jsx("span",{className:"gc-progress__fill"})}),e.jsx("span",{className:"gc-progress__count",children:"1/1"})]})]})]}),p==="success"&&e.jsxs("div",{className:"gc-success",role:"status","aria-live":"polite",children:[e.jsxs("div",{className:"gc-banner",children:[e.jsx("img",{className:"gc-banner__icon",src:se,alt:"",width:60,height:60}),e.jsxs("p",{className:"gc-banner__text",children:[e.jsx("strong",{children:t("getCredits.successTitle")})," ",t("getCredits.successBody",{currency:d.name})]})]}),F!=null&&e.jsx("div",{className:"gc-credits",children:e.jsxs("div",{className:"gc-credits__row",children:[e.jsx("img",{className:"gc-credits__coin",src:ee,alt:"",width:93,height:93}),e.jsxs("p",{className:"gc-credits__text",children:[e.jsx(Y,{className:"gc-credits__diamond"}),e.jsxs("span",{children:[e.jsx("strong",{className:"gc-credits__amount",children:t("getCredits.creditsAmount",{credits:F,currency:d.name})})," ",e.jsx("span",{className:"gc-credits__added",children:t("getCredits.creditsAdded")})]})]})]})}),e.jsxs("div",{className:"gc-actions",children:[e.jsx("button",{className:"gc-actions__btn gc-actions__btn--outline",onClick:k,children:t("getCredits.buyMore",{currency:d.name})}),e.jsx("button",{className:"gc-actions__btn gc-actions__btn--solid",onClick:()=>o("/assets"),children:t("getCredits.startShopping")})]})]}),p==="pending"&&e.jsxs("div",{className:"gc-status",role:"status","aria-live":"polite",children:[e.jsx("p",{className:"gc-status__title",children:t("getCredits.pendingTitle",{currency:d.name})}),e.jsx("p",{className:"muted",children:t("getCredits.pendingBody")}),e.jsxs("div",{className:"gc-status__actions",children:[e.jsx("button",{className:"gc-actions__btn gc-actions__btn--solid",onClick:()=>o("/assets"),children:t("getCredits.startShopping")}),e.jsx("button",{className:"gc-actions__btn gc-actions__btn--outline",onClick:k,children:t("getCredits.done")})]})]}),p==="error"&&e.jsxs("div",{className:"gc-status gc-status--err",role:"alert",children:[e.jsx("p",{className:"gc-status__title",children:t("getCredits.errorTitle")}),e.jsx("p",{className:"error",children:H}),e.jsx("div",{className:"gc-status__actions",children:e.jsx("button",{className:"gc-actions__btn gc-actions__btn--solid",onClick:k,children:t("getCredits.tryAgain")})})]})]})}function ae({onSelect:o}){return e.jsx("div",{className:"packs",children:J.map(s=>e.jsxs("button",{type:"button",className:`pack${s.bestValue?" pack--best":""}`,onClick:()=>o(s),"aria-label":t("getCredits.packAria",{amount:$(s.credits),usd:s.usd}),children:[s.bestValue&&e.jsx("span",{className:"pack__badge",children:t("getCredits.packBadge")}),e.jsxs("span",{className:"pack__inner",children:[e.jsx("span",{className:"pack__label",children:t("getCredits.creditsAmount",{credits:s.credits,currency:d.name})}),e.jsx("span",{className:"pack__art",children:e.jsx("img",{src:re[s.id]??C,alt:"",loading:"lazy"})}),e.jsx("span",{className:"pack__cta-wrap",children:e.jsxs("span",{className:"pack__cta",children:["$",s.usd.toFixed(2)]})})]})]},s.id))})}export{_e as GetCredits,_e as default};
@@ -1 +0,0 @@
1
- import{a as F,r as g,j as e,L as Q}from"./react-yytiy0wi.js";import{t as s,k as S,C as L,b as R,z as E,a as K,d as $,u as P,g as U,ac as W}from"./index-CDzDnyJW.js";import{i as B,R as O,f as z}from"./import-DjSObRBl.js";import{s as Y}from"./wallet-kind-B9P1TeIH.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-BPJvc5GU.js";import"./ethers-w2AslR0v.js";import"./intl-CBcMB1D2.js";import"./buy--wjHgZbY.js";import"./trade-encoding-6ejU5fQD.js";import"./index-HN6Rk25C.js";import"./mana-rate-Db4BQ-_Q.js";function G({queue:n,session:C,onClose:j,onDone:h}){const N=F(),m=Y(C.providerType),[d,f]=g.useState(()=>n.map(()=>"pending")),[v,w]=g.useState("running"),T=g.useRef(!1);g.useEffect(()=>{if(T.current)return;T.current=!0;let t=!1;return(async()=>{for(let r=0;r<n.length;r++){if(t)return;f(p=>p.map((u,o)=>o===r?"active":u));try{await B(n[r].item,n[r].priceCredits,C),R("Shop Migrated Listing",{item_id:n[r].item.itemId??n[r].item.oldTradeId??null,contract_address:n[r].item.contractAddress,new_price_credits:n[r].priceCredits,new_price_usd:n[r].priceCredits/10}),t||f(p=>p.map((u,o)=>o===r?"done":u))}catch(p){if(p instanceof O)E(p,{flow:"import_listing",step:"relist",itemId:n[r].item.itemId??n[r].item.oldTradeId}),t||f(u=>u.map((o,k)=>k===r?"unlisted":o));else{const u=p,o=u.code===4001||/reject|denied|cancel/i.test(u.message??"");o||E(p,{flow:"import_listing",itemId:n[r].item.itemId??n[r].item.oldTradeId}),t||f(k=>k.map((a,l)=>l===r?o?"skipped":"failed":a))}}}t||w("finished")})(),()=>{t=!0}},[]);const _=d.filter(t=>t==="done").length,b=d.findIndex(t=>t==="active"),x=Math.round(d.filter(t=>t!=="pending"&&t!=="active").length/n.length*100);function y(){h(),j()}if(v==="finished"){const t=d.filter(r=>r==="skipped"||r==="failed").length,c=d.filter(r=>r==="unlisted").length;return e.jsx("div",{className:"modal-backdrop",role:"presentation",children:e.jsxs("div",{className:"modal modal--success",role:"dialog","aria-modal":"true",children:[e.jsx("div",{className:"modal-success__check","aria-hidden":!0,children:"✓"}),e.jsx("h2",{className:"modal__title",children:_>0?s("migrate.successTitle"):s("migrate.nothingTitle")}),e.jsxs("p",{className:"muted",style:{margin:0},children:[_>0?s("migrate.listedSummary",{count:_,currency:S.name}):s("migrate.noneListed"),t>0?" "+s("migrate.skippedSummary",{count:t}):"",c>0?" "+s("migrate.unlistedSummary",{count:c}):""]}),e.jsxs("div",{className:"modal__actions",children:[e.jsx("button",{className:"btn btn--ghost",onClick:y,children:s("getCredits.done")}),c>0?e.jsx("button",{className:"btn btn--purple",onClick:()=>{h(),j(),N("/my-assets")},children:s("migrate.goToMyAssets")}):_>0?e.jsx("button",{className:"btn btn--purple",onClick:()=>{h(),j(),N("/assets")},children:s("migrate.viewInShop")}):null]})]})})}return e.jsx("div",{className:"modal-backdrop",role:"presentation",children:e.jsxs("div",{className:"modal migrate",role:"dialog","aria-modal":"true","aria-live":"polite",children:[e.jsx("h2",{className:"modal__title",children:s("migrate.listingTitle")}),e.jsxs("p",{className:"muted small",style:{margin:"0 0 4px"},children:[m?s("migrate.subConfirm"):s("migrate.subManaged")," ",b>=0?s("migrate.progressCount",{current:b+1,total:n.length}):""]}),e.jsx("div",{className:"migrate__progress",children:e.jsx("div",{className:"migrate__bar",style:{width:`${x}%`}})}),e.jsx("ul",{className:"migrate__list",children:n.map((t,c)=>e.jsxs("li",{className:`migrate__row migrate__row--${d[c]}`,children:[e.jsx("span",{className:"migrate__thumb",children:t.item.thumbnail?e.jsx("img",{src:t.item.thumbnail,alt:""}):null}),e.jsx("span",{className:"migrate__name",title:t.item.name,children:t.item.name||s("migrate.itemFallback")}),e.jsxs("span",{className:"migrate__price",children:[e.jsx(L,{className:"ccy-mark"})," ",t.priceCredits.toLocaleString()]}),e.jsx("span",{className:"migrate__status",children:d[c]==="active"?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"spinner migrate__spin","aria-hidden":!0})," ",m?s("migrate.statusConfirm"):s("migrate.statusAdding")]}):d[c]==="done"?e.jsx("span",{className:"migrate__tick",children:"✓"}):d[c]==="skipped"?e.jsx("span",{className:"migrate__skip",children:s("migrate.statusSkipped")}):d[c]==="failed"?e.jsx("span",{className:"migrate__skip",children:s("migrate.statusFailed")}):d[c]==="unlisted"?e.jsx("span",{className:"migrate__skip",title:s("migrate.unlistedTooltip"),children:s("migrate.statusUnlisted")}):e.jsx("span",{className:"migrate__wait",children:s("migrate.statusWaiting")})})]},t.item.oldTradeId))}),e.jsx("p",{className:"muted small migrate__hint",children:m?s("migrate.hintConfirm"):s("migrate.hintManaged")})]})})}const H=[{key:"creations",title:"importListings.creations.title",sub:"importListings.creations.sub"},{key:"owned",title:"importListings.owned.title",sub:"importListings.owned.sub"}];function ne(){K({title:s("seo.import.title"),noindex:!0});const{session:n,signIn:C,restore:j}=$(),h=P(),N=n==null?void 0:n.address;g.useEffect(()=>{j()},[j]);const{data:m,isLoading:d}=U({queryKey:["importable",N],queryFn:()=>z(N),enabled:!!N}),[f,v]=g.useState({}),[w,T]=g.useState(new Set),[_,b]=g.useState(null),x=g.useMemo(()=>[...(m==null?void 0:m.creations)??[],...(m==null?void 0:m.owned)??[]],[m]);g.useEffect(()=>{x.length&&v(a=>{const l={...a};for(const i of x)l[i.oldTradeId]==null&&(l[i.oldTradeId]=i.suggestedCredits);return l})},[x]);const y=a=>!w.has(a),t=a=>f[a.oldTradeId]??a.suggestedCredits,c=x.filter(a=>y(a.oldTradeId)),r=c.reduce((a,l)=>a+t(l),0);function p(a,l){const i=l.replace(/[^\d]/g,"");v(I=>({...I,[a]:i===""?0:parseInt(i,10)}))}function u(a){T(l=>{const i=new Set(l);return i.has(a)?i.delete(a):i.add(a),i})}function o(a){return a.map(l=>({item:l,priceCredits:Math.max(1,t(l))}))}function k(){h.invalidateQueries({queryKey:["importable"]}),h.invalidateQueries({queryKey:["unified-listings"]}),h.invalidateQueries({queryKey:["my-assets"]}),h.invalidateQueries({queryKey:["collection-sale-state"]}),W.success(s("importListings.toastUpdated"))}return n?!d&&x.length===0?e.jsxs("div",{className:"imp-empty",children:[e.jsx("span",{className:"imp-empty__ico","aria-hidden":!0,children:"✨"}),e.jsx("h1",{className:"imp-empty__title",children:s("importListings.emptyTitle")}),e.jsx("p",{className:"muted",children:s("importListings.emptyBody")}),e.jsx(Q,{className:"btn btn--purple",to:"/my-assets",children:s("importListings.goToMyAssets")})]}):e.jsxs("div",{className:"imp",children:[e.jsxs("header",{className:"imp__head",children:[e.jsx("span",{className:"imp__eyebrow",children:s("importListings.eyebrow")}),e.jsxs("h1",{className:"imp__title",children:[s("importListings.titleLead")," ",e.jsx("span",{className:"imp__grad",children:s("importListings.titleAccent")})]}),e.jsx("p",{className:"imp__lede",children:s("importListings.lede",{currency:S.name})})]}),e.jsxs("div",{className:"imp__ratebar",children:[e.jsx(L,{className:"ccy-mark imp__diamond"})," ",s("importListings.rate",{currency:S.nameSingular})]}),d?e.jsx("div",{className:"imp__list",children:Array.from({length:4}).map((a,l)=>e.jsx("div",{className:"imp-row imp-row--skeleton"},l))}):H.map(a=>{const l=(m==null?void 0:m[a.key])??[];return l.length===0?null:e.jsxs("section",{className:"imp__section",children:[e.jsxs("div",{className:"imp__section-head",children:[e.jsx("h2",{className:"imp__section-title",children:s(a.title)}),e.jsx("span",{className:"imp__section-sub",children:s(a.sub)})]}),e.jsx("div",{className:"imp__list",children:l.map(i=>{const I=t(i),A=I!==i.suggestedCredits;return e.jsxs("article",{className:`imp-row${y(i.oldTradeId)?"":" is-off"}`,children:[e.jsx("input",{type:"checkbox",className:"imp-check",checked:y(i.oldTradeId),onChange:()=>u(i.oldTradeId),"aria-label":s("importListings.includeItem",{name:i.name})}),e.jsx("div",{className:"imp-thumb",children:i.thumbnail?e.jsx("img",{src:i.thumbnail,alt:""}):null}),e.jsxs("div",{className:"imp-meta",children:[e.jsx("div",{className:"imp-name",title:i.name,children:i.name||s("importListings.itemFallback")}),e.jsx("span",{className:"imp-chip",children:i.rarity})]}),e.jsxs("div",{className:"imp-price",children:[e.jsxs("div",{className:"imp-price__field",children:[e.jsx(L,{className:"ccy-mark imp-price__diamond"}),e.jsx("input",{className:"imp-price__input",inputMode:"numeric",value:I.toLocaleString(),onChange:M=>p(i.oldTradeId,M.target.value),"aria-label":s("importListings.priceAria",{currency:S.name,name:i.name})})]}),e.jsxs("div",{className:"imp-price__sub",children:[e.jsxs("span",{children:["$",(I*.1).toFixed(2)]}),A?e.jsxs("button",{className:"imp-price__reset",onClick:()=>v(M=>({...M,[i.oldTradeId]:i.suggestedCredits})),children:[s("importListings.resetTo")," ",e.jsx(L,{className:"ccy-mark"}),i.suggestedCredits.toLocaleString()]}):null]})]}),e.jsx("div",{className:"imp-action",children:e.jsx("button",{className:"btn btn--sm imp-row__list",disabled:!y(i.oldTradeId),onClick:()=>b(o([i])),children:s("importListings.list")})})]},i.oldTradeId)})})]},a.key)}),e.jsx("div",{className:"imp-dock",children:e.jsxs("div",{className:"imp-dock__inner",children:[e.jsxs("div",{className:"imp-dock__summary",children:[e.jsxs("div",{className:"imp-dock__total",children:[e.jsx(L,{className:"ccy-mark imp__diamond"})," ",r.toLocaleString()]}),e.jsx("div",{className:"imp-dock__sub",children:s("importListings.selectedSummary",{count:c.length,usd:(r*.1).toFixed(2)})})]}),e.jsx("span",{className:"imp-dock__spacer"}),e.jsx("button",{className:"btn btn--purple imp-dock__cta",disabled:c.length===0,onClick:()=>b(o(c)),children:s("importListings.listAll",{count:c.length})})]})}),_&&n?e.jsx(G,{queue:_,session:n,onClose:()=>b(null),onDone:k}):null]}):e.jsxs("div",{className:"imp-empty",children:[e.jsx("span",{className:"imp-empty__ico","aria-hidden":!0,children:"📦"}),e.jsx("h1",{className:"imp-empty__title",children:s("importListings.signInTitle")}),e.jsx("p",{className:"muted",children:s("importListings.signInBody")}),e.jsx("button",{className:"btn btn--purple",onClick:()=>C(),children:s("storeSettings.signIn")})]})}export{ne as ImportListings};
@@ -1 +0,0 @@
1
- .item-detail{max-width:1721px;margin:0 auto}.item-detail__crumbs{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted);margin-bottom:24px}.item-detail__crumb-link{background:none;border:0;padding:0;font:inherit;color:var(--muted)}.item-detail__crumb-link:hover{color:var(--text)}.item-detail__crumb-sep{color:var(--muted-2)}.item-detail__crumb-current{color:var(--text);font-weight:600}.item-detail__main{display:grid;grid-template-columns:minmax(0,1045fr) minmax(0,514fr);gap:48px;align-items:start;max-width:1607px;margin:0 auto}@media(max-width:900px){.item-detail__main{grid-template-columns:1fr;gap:24px;max-width:none}}.item-detail__preview{position:relative;aspect-ratio:1045 / 752;border-radius:16px;overflow:hidden;background:var(--media)}@media(max-width:900px){.item-detail__preview{aspect-ratio:1 / 1}}.item-detail__preview iframe,.item-detail__preview>*{width:100%;height:100%;border:0;display:block}.item-detail__preview>.item-preview__toggle{position:absolute;top:16px;left:16px;z-index:2;width:auto;height:auto;display:inline-flex;gap:2px;padding:3px;background:#ffffffeb;border:1px solid var(--line);border-radius:999px;box-shadow:0 1px 4px #0000001f}.item-preview__toggle button{border:0;background:none;cursor:pointer;padding:6px 16px;border-radius:999px;font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);transition:background .12s ease,color .12s ease}.item-preview__toggle button.is-active{background:var(--text);color:#fff}.item-preview__toggle button:not(.is-active):hover{color:var(--text)}.item-preview__toggle-ico{display:none;width:18px;height:18px}.item-detail__preview>.item-preview__emote-controls{position:absolute;bottom:16px;left:50%;transform:translate(-50%);z-index:2;width:min(360px,88%);height:auto;display:flex;align-items:center;background:#fffffff0;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);border:1px solid var(--line);border-radius:var(--radius-pill);padding:6px 12px;box-shadow:0 2px 10px #1615181f}.item-preview__emote-controls .MuiBox-root{position:static;width:100%;margin:0;padding:0;display:flex;align-items:center;gap:10px}.item-preview__emote-controls .MuiButtonBase-root{min-width:0;padding:0;margin:0;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:none!important;box-shadow:none!important;color:var(--muted);flex:0 0 auto;transition:background .12s ease,color .12s ease}.item-preview__emote-controls .MuiButtonBase-root .MuiSvgIcon-root{font-size:20px;margin:0}.item-preview__emote-controls .MuiBox-root>.MuiButtonBase-root:first-child{width:34px;height:34px;background:var(--accent)!important;color:#fff}.item-preview__emote-controls .MuiBox-root>.MuiButtonBase-root:first-child:hover{background:var(--text)!important}.item-preview__emote-controls .MuiBox-root>input+.MuiButtonBase-root{width:30px;height:30px;color:var(--muted)}.item-preview__emote-controls .MuiBox-root>input+.MuiButtonBase-root:hover{background:var(--media)!important;color:var(--text)}.item-preview__emote-controls input[type=range]{flex:1 1 auto;width:auto;min-width:0;height:4px;margin:0;padding:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;cursor:pointer}.item-preview__emote-controls input[type=range]::-webkit-slider-runnable-track{height:4px;border-radius:999px;background:var(--line-strong)}.item-preview__emote-controls input[type=range]::-moz-range-track{height:4px;border-radius:999px;background:var(--line-strong)}.item-preview__emote-controls input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:13px;height:13px;margin-top:-4.5px;border-radius:50%;background:var(--accent);border:2px solid #fff;box-shadow:0 1px 3px #1615184d;cursor:pointer}.item-preview__emote-controls input[type=range]::-moz-range-thumb{width:13px;height:13px;border-radius:50%;background:var(--accent);border:2px solid #fff;box-shadow:0 1px 3px #1615184d;cursor:pointer}.item-preview__emote-controls input[type=range]:focus-visible{outline:none}.item-preview__emote-controls input[type=range]:focus-visible::-webkit-slider-thumb{outline:2px solid var(--accent);outline-offset:2px}.item-detail__preview>.item-preview__note{position:absolute;bottom:14px;left:50%;transform:translate(-50%);z-index:2;width:auto;height:auto;max-width:88%;margin:0;text-align:center;background:#161518c7;color:#fff;font-size:12px;font-weight:500;padding:6px 12px;border-radius:999px}.item-detail__preview>.item-preview__loading{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;display:flex;align-items:center;justify-content:center;width:100%;height:100%;background:transparent}.item-preview__spinner{width:34px;height:34px;border-radius:50%;border:3px solid var(--line);border-top-color:var(--accent);animation:item-preview-spin .8s linear infinite}@keyframes item-preview-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.item-preview__spinner{animation-duration:2.4s}}.item-detail__preview>.item-preview__loading .item-preview__skeleton{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;border-radius:inherit}.item-detail__info-skel{display:flex;flex-direction:column;gap:16px}.id-skel__title{height:34px;width:70%;border-radius:8px}.id-skel__chips{display:flex;gap:8px}.id-skel__chip{height:24px;width:88px;border-radius:6px}.id-skel__line{height:14px;width:100%;border-radius:6px}.id-skel__line--short{width:55%}.id-skel__price{height:30px;width:40%;border-radius:8px}.id-skel__btn{height:48px;width:100%;border-radius:8px;margin-top:8px}.item-detail__info{display:flex;flex-direction:column;gap:0}.item-detail__info-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.item-detail__title{font-size:28px;font-weight:600;line-height:34px;color:var(--text-2)}.item-detail__fav{flex:none;width:40px;height:40px;border-radius:50%;border:0;background:var(--media);display:grid;place-items:center;color:var(--text-2);cursor:pointer;transition:color .12s ease,background .12s ease}.item-detail__fav:hover{background:var(--line)}.item-detail__fav.is-on{color:var(--dcl-red)}.item-detail__fav .ico-heart{width:18px;height:18px}.item-detail__preview>.item-detail__fav--preview{display:none}.item-detail__label{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:500;text-transform:uppercase;letter-spacing:0;color:var(--muted)}.item-detail__chips{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px}.item-detail__chips .chip{height:24px;padding:0 8px;gap:3px;font-size:13px;font-weight:500;border-radius:4px;letter-spacing:.02em;text-transform:uppercase}.item-detail__chip{background:var(--chip);color:var(--text-2)}.item-detail__chip-ico{width:18px;height:18px;color:var(--text-2)}.item-detail__section{display:flex;flex-direction:column;align-items:flex-start;gap:8px}.item-detail__description{margin-top:15px;gap:11px}.item-detail__desc-text{margin:0;color:var(--text-2);font-size:14px;line-height:30px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden}.item-detail__desc-text.is-expanded{-webkit-line-clamp:unset;overflow:visible}.item-detail__desc-toggle{font-size:13px;align-self:flex-start}.item-detail__meta{display:flex;justify-content:space-between;gap:16px;margin-top:32px}.item-detail__meta-col{display:flex;flex-direction:column;gap:15px;min-width:0}.item-detail__meta-col--collection{align-items:flex-start}.item-detail__creator.creator{color:var(--accent);font-size:14px;gap:12px}.item-detail__creator .creator__ava{width:48px;height:48px}.item-detail__creator .creator__ava--letter{font-size:18px}.item-detail__creator .creator__name{color:var(--accent);font-weight:500;text-decoration:underline}.item-detail__creator.creator--link:hover .creator__name{color:var(--brand-violet)}.collection-collage{display:flex;flex-direction:column;overflow:hidden;gap:1px;background:var(--line-strong)}.collection-collage__row{display:flex;flex:1 1 50%;min-height:0;gap:1px}.collection-collage__row--full{flex-basis:100%}.collection-collage__row img{flex:1 1 0;min-width:0;width:100%;height:100%;object-fit:cover;display:block}.item-detail__divider{border:0;border-top:1px solid #cfcdd4;margin:24px 0 0;width:100%}.item-detail__price-block{margin-top:16px}.item-detail__price-row{display:flex;align-items:flex-start;gap:16px;width:100%}.item-detail__price-col{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:8px}.item-detail__stock-col{flex:0 0 auto;display:flex;flex-direction:column;align-items:flex-end;gap:8px;text-align:right}.item-detail__stock-value{font-size:18px;font-weight:500;line-height:1;color:var(--text-2)}.item-detail__price-label{font-size:14px;font-weight:600;text-transform:uppercase;letter-spacing:0;color:#5e5b67}.item-detail__price{display:flex;align-items:center;gap:10px;font-weight:700;color:var(--text)}.item-detail__diamond{width:30px;height:30px;color:var(--brand-violet)}.item-detail__price-value{font-size:30px;line-height:1}.item-detail__price--none{font-size:18px;color:var(--muted)}.item-detail__approx{font-size:24px;font-weight:700;color:var(--text);margin-right:-2px}.item-detail__market-note{font-size:13px;margin-top:6px}.item-detail__price--sale{flex-wrap:wrap;gap:10px 14px}.item-detail__price--sale .item-detail__price,.item-detail__price--sale .item-detail__price-value,.item-detail__price--sale .item-detail__diamond{color:var(--dcl-red)}.item-detail__price-was{display:inline-flex;align-items:center;gap:6px;color:var(--muted);text-decoration:line-through;font-weight:600;font-size:20px}.item-detail__diamond--was{width:18px;height:18px;color:var(--muted)}.item-detail__sale-badge{display:inline-flex;align-items:center;background:var(--dcl-red);color:#fff;font-weight:800;font-size:13px;letter-spacing:.03em;text-transform:uppercase;border-radius:6px;padding:4px 10px}.item-detail__countdown{display:inline-flex;align-items:center;gap:5px;background:var(--rarity-bg);color:var(--accent);font-size:13px;font-weight:700;border-radius:6px;padding:4px 10px;white-space:nowrap}.item-detail__countdown .sale-countdown__ico{width:14px;height:14px}.item-detail__ctas{display:flex;flex-direction:column;gap:12px;margin-top:20px}.item-detail__cta{width:100%;height:48px;border-radius:8px;font-size:15px;font-weight:600;letter-spacing:.46px;display:flex;align-items:center;justify-content:center;gap:8px}.item-detail__cta-price{display:none;align-items:center;gap:6px}.item-detail__cta-diamond{width:20px;height:20px;color:#fff}.item-detail__addcart{width:100%;height:48px;display:flex;align-items:center;justify-content:center;gap:8px;background:var(--black-btn);color:var(--soft-white);border:0;border-radius:8px;font-weight:600;font-size:15px;text-transform:uppercase;letter-spacing:.46px;cursor:pointer;transition:filter .15s ease}.item-detail__addcart:hover:not(:disabled){filter:brightness(1.35)}.item-detail__addcart:disabled{opacity:.55;cursor:default}.item-detail__addcart-ico{width:20px;height:20px}.item-detail__status{margin:0;font-size:13px}.item-detail__own-note{margin:0;font-size:14px}.item-detail__own-note a{color:var(--accent);font-weight:600}@media(max-width:900px){.item-detail__title{font-size:20px;line-height:24px}.item-detail__info-head{order:0}.item-detail__chips{order:1;margin-top:10px}.item-detail__meta{order:2;margin-top:20px}.item-detail__description{order:3;margin-top:20px}.item-detail__divider{order:4;margin-top:20px}.item-detail__price-block{order:5;margin-top:16px}.item-detail__ctas{order:6}.item-detail__status{order:7}.item-detail{padding-bottom:88px}.item-detail__ctas--buttons{position:fixed;left:0;right:0;bottom:0;z-index:40;margin-top:0;padding:12px 16px calc(12px + env(safe-area-inset-bottom));background:var(--soft-white);box-shadow:0 -4px 16px #1615181f}.item-detail__ctas--dual{flex-direction:row;align-items:stretch;gap:12px}.item-detail__ctas--dual .item-detail__cta{flex:1 1 auto;width:auto}.item-detail__ctas--dual .item-detail__cta-price{display:inline-flex}.item-detail__ctas--dual .item-detail__addcart{flex:0 0 auto;width:56px;padding:0}.item-detail__ctas--dual .item-detail__addcart-label{display:none}.item-detail__ctas--dual .item-detail__addcart-ico{margin:0}.item-detail__info-head .item-detail__fav{display:none}.item-detail__preview>.item-detail__fav--preview{display:grid;position:absolute;top:12px;right:12px;z-index:3;width:40px;height:40px;background:#ffffffeb;box-shadow:0 1px 4px #1615182e}.item-detail__preview>.item-detail__fav--preview:hover{background:#fff}.item-detail__preview>.item-preview__toggle{top:auto;left:auto;bottom:12px;right:12px;gap:0;padding:0;background:transparent;border:0;box-shadow:0 1px 4px #1615182e;overflow:hidden}.item-preview__toggle-label{display:none}.item-preview__toggle-ico{display:block}.item-preview__toggle button{padding:9px 13px;border-radius:0;background:#fff;color:var(--text-2)}.item-preview__toggle button.is-active{background:var(--text);color:#fff}.item-preview__toggle button:first-child{border-top-left-radius:999px;border-bottom-left-radius:999px}.item-preview__toggle button:last-child{border-top-right-radius:999px;border-bottom-right-radius:999px}}.item-detail--notfound{min-height:46vh;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:14px}.item-detail__notfound-ico{width:44px;height:44px;opacity:.4}.item-detail__notfound-title{font-size:22px}.item-detail--notfound .btn{margin-top:6px}
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-D1WSRIS2.js","assets/react-yytiy0wi.js","assets/dcl-schemas-BICTSpB5.js","assets/index-CDzDnyJW.js","assets/sentry-BPJvc5GU.js","assets/ethers-w2AslR0v.js","assets/intl-CBcMB1D2.js","assets/index-DvbMYtAp.css","assets/emotion-styled.browser.esm-B2VU5Fdx.js","assets/useTheme-CmaVa_eU.js","assets/CircularProgress-C9g4a9bc.js","assets/index-_PfBd9GI.js","assets/useTheme-bLwsL2uj.js","assets/CssVarsProvider-Bc8wQjEb.js","assets/getOverlayAlpha-DqVbiGQa.js","assets/index-icCmSJB-.js","assets/colors-LINLm1ux.js"])))=>i.map(i=>d[i]);
2
- import{a as se,r as m,j as e,d as Se,b as Pe,L as Ee}from"./react-yytiy0wi.js";import{d as te,o as Fe,u as Le,t as s,ah as De,l as Te,m as Be,v as Re,q as J,b as z,w as me,x as ee,ai as $e,z as ue,C as M,ad as Z,_ as ae,F as We,I as Ve,H as qe,ar as Oe,W as ze,j as fe,as as Ke,at as Ue,ae as _e,c as he,g as O,au as Ge,av as He,aw as Qe,ax as Ye,ay as Je,ak as Ze,a as Xe,az as ea,aA as aa,aB as sa,af as ta,aC as be,aD as ia,an as ra,aE as la,aF as da,ao as na,aG as ca}from"./index-CDzDnyJW.js";import{d as $}from"./dcl-schemas-BICTSpB5.js";import{b as pe}from"./buy--wjHgZbY.js";import{g as oa,b as ma,w as ua,S as _a,G as ha}from"./buy-gasless-DaSij0O9.js";import{C as ba,c as pa}from"./payments-tEVDRx3d.js";import{R as ye}from"./resume-buy-Bf0zIH7y.js";import{a as ya,f as xe}from"./errors-BFbUxXdM.js";import{E as xa}from"./ErrorNotice-Rze9rgc9.js";import{C as ja}from"./CircularProgress-C9g4a9bc.js";import{u as va,M as fa}from"./MarketCheckout-DoRZsMk0.js";import{s as Na}from"./address-DrURAr9O.js";import{C as ga}from"./CollectionCarousel-CiKValmX.js";import"./sentry-BPJvc5GU.js";import"./ethers-w2AslR0v.js";import"./intl-CBcMB1D2.js";import"./trade-encoding-6ejU5fQD.js";import"./index-HN6Rk25C.js";import"./mana-rate-Db4BQ-_Q.js";const R=ba.slice(0,3);function wa({item:r,onClose:o,resume:t=!1}){var I,H;const{session:d}=te(),{data:n}=Fe(d),b=Le(),x=se(),[_,l]=m.useState("loading"),[j,a]=m.useState(null),[v,P]=m.useState(""),[f,L]=m.useState(r.priceCredits),[C,g]=m.useState(null),N=m.useRef(null),W=(C==null?void 0:C.credits)??f,k=(n==null?void 0:n.credits)??0;m.useEffect(()=>{let c=!1;if(!d){l("error"),a(s("buyModal.signInToCheckout"));return}const y=u=>{const h=u-((n==null?void 0:n.credits)??0),p=R.find(A=>A.credits>=h)??R[R.length-1];P(p.id),z("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:u,credits_balance:(n==null?void 0:n.credits)??0,shortfall:Math.max(0,h)}),l("nofunds")};return(async()=>{var u,h;try{const p=await De(r);if(!p)throw new Error("not for sale");if(Te(p,d.address))throw new Error("You can't buy your own listing.");const A=Be((h=(u=p.received)==null?void 0:u[0])==null?void 0:h.amount);if(!Number.isFinite(A)||A<=0)throw new Error("price unavailable");const T=Math.ceil(A/10);if(c)return;if(L(T),n!=null&&n.credits<T){y(T);return}try{const{credit:E,maxCreditedValue:V,usdCents:B}=await Re(d.identity,A,p.id);if(c){J(d.identity,[E.id]).catch(()=>{});return}N.current=E.id;const w=Math.ceil(B/10);L(w);const q={trade:p,credit:E,maxCreditedValue:V,usdCents:B,credits:w};g(q),t?K(q):l("ready")}catch(E){if(c)return;if(ya(E)){y(T);return}throw E}}catch(p){if(c)return;z(ee(p)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:me(p)}),l("error"),a(xe(p,s("buyModal.error.generic"),{sale:!0}))}})(),()=>{c=!0,N.current&&d&&(J(d.identity,[N.current]).catch(()=>{}),N.current=null)}},[]);async function K(c=C){if(!d||!c)return;l("processing"),a(null);let y=!1;try{const u={trade:c.trade,buyer:d.address,signer:d.signer,credits:[c.credit],maxCreditedValue:c.maxCreditedValue};let h;if(oa())try{h=await ma(u),await ua(h),y=!0}catch(p){if(p instanceof _a)y=!0;else if(p instanceof ha)h=await pe(u);else throw p}else h=await pe(u);N.current=null,z("Shop Completed Purchase",{...$e([r]),payment_type:"credits",no_crypto_step:y,transaction_hash:h??null}),b.invalidateQueries({queryKey:["usd-balance"]}),l("complete")}catch(u){ee(u)||ue(u,{flow:"buy",step:"submit",gasless:y}),J(d.identity,[c.credit.id]).catch(()=>{}),N.current=null,z(ee(u)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:me(u)}),b.invalidateQueries({queryKey:["usd-balance"]}),a(xe(u,s("buyModal.error.generic"),{sale:!0})),l("error")}}async function U(){if(!(!v||!d)){try{sessionStorage.setItem(ye,JSON.stringify(r))}catch{}C&&J(d.identity,[C.credit.id]).catch(()=>{}),N.current=null,l("loading");try{const c=await pa(v,{address:d.address,identity:d.identity});if(c.url){window.location.href=c.url;return}x("/credits")}catch(c){ue(c,{flow:"buy_credits_and_item"});try{sessionStorage.removeItem(ye)}catch{}a(s("buyModal.error.creditsCheckout")),l("error")}}}const G=_==="processing",D=_==="complete"?s("buyModal.titleComplete"):_==="nofunds"?s("buyModal.titleNoFunds"):s("buyModal.titleBuy");return e.jsxs("div",{className:"buy-modal",role:"dialog","aria-modal":"true","aria-label":s("buyModal.dialogAria",{name:r.name}),children:[e.jsx("div",{className:"buy-modal__scrim",onClick:G?void 0:o,"aria-hidden":!0}),e.jsxs("div",{className:`buy-modal__card${_==="processing"||_==="loading"?" buy-modal__card--tall":""}`,children:[e.jsxs("div",{className:"buy-modal__head",children:[e.jsxs("div",{className:"buy-modal__head-row",children:[e.jsx("h2",{className:"buy-modal__title",children:D}),!G&&e.jsx("button",{className:"buy-modal__x",onClick:o,"aria-label":s("buyModal.close"),children:e.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,children:e.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})})]}),e.jsxs("div",{className:"buy-modal__balance",children:[e.jsx("span",{className:"buy-modal__balance-label",children:_==="nofunds"?s("buyModal.dclBalance"):s("buyModal.myCreditsBalance")}),e.jsx(M,{className:"buy-modal__balance-ico"}),e.jsx("span",{className:"buy-modal__balance-value",children:Z(k)})]})]}),_==="loading"&&e.jsx("div",{className:"buy-modal__body buy-modal__processing",children:e.jsx(ja,{size:44})}),_==="error"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsx(xa,{message:j}),e.jsx("div",{className:"buy-modal__ctas",children:e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient",onClick:o,children:s("buyModal.close")})})]}),_==="nofunds"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsxs("div",{className:"buy-modal__warning",children:[e.jsxs("svg",{viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":!0,className:"buy-modal__warning-ico",children:[e.jsx("path",{d:"M12 3L2 20h20L12 3z",fill:"none",stroke:"#691fa9",strokeWidth:"1.8",strokeLinejoin:"round"}),e.jsx("path",{d:"M12 9v5",stroke:"#691fa9",strokeWidth:"1.8",strokeLinecap:"round"}),e.jsx("circle",{cx:"12",cy:"17",r:"1.1",fill:"#691fa9"})]}),e.jsxs("p",{className:"buy-modal__warning-text",children:[e.jsx("b",{children:s("buyModal.insufficientFunds")})," ",s("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:s("buyModal.warningCreditsAmount",{count:Math.max(0,W-k)})})," ",s("buyModal.warningToPurchase",{count:1})]})]}),e.jsx(je,{item:r,priceCredits:W}),e.jsx("div",{className:"buy-modal__packs",children:R.map(c=>{const y=c.credits,u=c.id===v;return e.jsxs("button",{className:`buy-modal__pack${u?" buy-modal__pack--on":""}`,onClick:()=>P(c.id),children:[e.jsx(M,{className:"buy-modal__pack-ico"}),e.jsx("span",{className:"buy-modal__pack-amount",children:Z(y)}),e.jsxs("span",{className:"buy-modal__pack-usd",children:["($",c.usd.toFixed(2),")"]})]},c.id)})}),e.jsxs("div",{className:"buy-modal__total",children:[e.jsxs("div",{className:"buy-modal__total-credits",children:[e.jsx(M,{className:"buy-modal__total-ico"}),e.jsx("span",{children:Z(((I=R.find(c=>c.id===v))==null?void 0:I.credits)??0)})]}),e.jsxs("span",{className:"buy-modal__total-usd",children:["$",(((H=R.find(c=>c.id===v))==null?void 0:H.usd)??0).toFixed(2)]})]}),e.jsxs("div",{className:"buy-modal__ctas",children:[e.jsx("button",{className:"buy-modal__btn buy-modal__btn--outline",onClick:o,children:s("buyModal.cancel")}),e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient",onClick:U,children:s("buyModal.buy")})]})]}),_==="ready"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsx(je,{item:r,priceCredits:W}),e.jsx("div",{className:"buy-modal__ctas",children:e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient buy-modal__btn--full",onClick:()=>K(),children:s("buyModal.buy")})})]}),_==="processing"&&e.jsxs("div",{className:"buy-modal__body buy-modal__processing",children:[e.jsx("img",{className:"buy-modal__logo",src:"/icon-192.png",alt:"",width:61,height:61}),e.jsx("div",{className:"buy-modal__processing-text",children:t?s("buyModal.completingPurchase"):s("buyModal.completingTransaction")}),e.jsx("div",{className:"buy-modal__progress","aria-hidden":!0,children:e.jsx("span",{className:"buy-modal__progress-fill"})})]}),_==="complete"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsxs("div",{className:"buy-modal__success",children:[e.jsxs("svg",{viewBox:"0 0 64 64",width:"64",height:"64","aria-hidden":!0,children:[e.jsx("circle",{cx:"32",cy:"32",r:"32",fill:"#34ce74"}),e.jsx("path",{d:"M20 33l8 8 16-18",fill:"none",stroke:"#fff",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"})]}),e.jsxs("p",{className:"buy-modal__success-text",children:[e.jsx("b",{children:s("getCredits.successTitle")})," ",s("buyModal.successBody")]})]}),e.jsxs("div",{className:"buy-modal__ctas",children:[e.jsx("button",{className:"buy-modal__btn buy-modal__btn--outline",onClick:()=>x("/assets?tab=mine"),children:s("buyModal.myAssets")}),e.jsxs("button",{className:"buy-modal__btn buy-modal__btn--ruby",onClick:o,children:[s("buyModal.tryInWorld"),e.jsx("svg",{viewBox:"0 0 24 24",width:"20",height:"20","aria-hidden":!0,children:e.jsx("path",{d:"M5 12h12M13 7l5 5-5 5",fill:"none",stroke:"#fcfcfc",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]})]})]})]})]})}function je({item:r,priceCredits:o}){return e.jsxs("div",{className:"buy-modal__asset",children:[e.jsx("div",{className:"buy-modal__asset-thumb",children:r.thumbnail?e.jsx("img",{src:r.thumbnail,alt:""}):null}),e.jsxs("div",{className:"buy-modal__asset-info",children:[e.jsxs("div",{children:[e.jsx("div",{className:"buy-modal__asset-name",title:r.name,children:r.name||s("buyModal.itemFallback")}),r.creator?e.jsx("div",{className:"buy-modal__asset-creator",children:s("search.byCreator",{name:r.creator})}):null]}),e.jsxs("div",{className:"buy-modal__asset-price",children:[e.jsx(M,{className:"buy-modal__asset-price-ico"}),e.jsx("span",{children:Z(o)})]})]})]})}const Ca=m.lazy(async()=>{const[{EmoteControls:r},{Experimental_CssVarsProvider:o},{light:t}]=await Promise.all([ae(()=>import("./index-D1WSRIS2.js").then(d=>d.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])),ae(()=>import("./index-_PfBd9GI.js"),__vite__mapDeps([11,3,1,2,4,5,6,7,12,9,13,14])),ae(()=>import("./index-icCmSJB-.js"),__vite__mapDeps([15,3,1,2,4,5,6,7,16,14,13,9]))]);return{default:d=>e.jsx(o,{theme:t,children:e.jsx(r,{...d})})}});function ka(r){return e.jsx(m.Suspense,{fallback:null,children:e.jsx(Ca,{...r})})}function Ia({item:r}){const o=te(g=>{var N;return(N=g.session)==null?void 0:N.address}),{data:t,isLoading:d}=We(o),n=o&&t?o:"default",b=r.category==="emote",[x,_]=m.useState("item"),l=!b&&x==="item",j=l||!d,[a,v]=m.useState(!0);m.useEffect(()=>{v(!0)},[r.id,l]);const P=!!o&&!!t,f=P&&Ve(r,qe(t)),L=Oe(r)[0],C=P&&!f&&!b;return e.jsxs(e.Fragment,{children:[j?e.jsx(ze,{id:"shop-item-preview",contractAddress:r.contractAddress,tokenId:r.tokenId??void 0,itemId:r.tokenId?void 0:r.itemId??void 0,profile:l?void 0:f?n:"default",bodyShape:l||f?void 0:L,type:b?void 0:l?$.PreviewType.WEARABLE:$.PreviewType.AVATAR,emote:b||l?void 0:$.PreviewEmote.FASHION,disableBackground:!0,wheelZoom:b?1.5:void 0,wheelStart:b?100:void 0,dev:fe.chainId===80002,onLoad:()=>v(!1)}):null,!j||a?e.jsx("div",{className:"item-preview__loading","aria-busy":"true","aria-label":s("itemPreview.loading"),children:e.jsx("span",{className:"item-preview__spinner","aria-hidden":!0})}):null,C&&!l?e.jsx("p",{className:"item-preview__note",children:s("itemPreview.shownOnBody",{shape:Ke(L)})}):null,b?e.jsx("div",{className:"item-preview__emote-controls",children:e.jsx(ka,{wearablePreviewId:"shop-item-preview",hideFrameInput:!0})}):e.jsxs("div",{className:"item-preview__toggle",role:"group","aria-label":s("itemPreview.previewMode"),children:[e.jsxs("button",{type:"button",className:x==="avatar"?"is-active":"","aria-pressed":x==="avatar","aria-label":s("itemPreview.onAvatar"),onClick:()=>_("avatar"),children:[e.jsxs("svg",{className:"item-preview__toggle-ico",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:[e.jsx("circle",{cx:"12",cy:"7.5",r:"4"}),e.jsx("path",{d:"M4 20c0-4.2 3.6-6.5 8-6.5s8 2.3 8 6.5v.5H4z"})]}),e.jsx("span",{className:"item-preview__toggle-label",children:s("itemPreview.onAvatar")})]}),e.jsxs("button",{type:"button",className:x==="item"?"is-active":"","aria-pressed":x==="item","aria-label":s("itemPreview.item"),onClick:()=>_("item"),children:[e.jsx("svg",{className:"item-preview__toggle-ico",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:e.jsx("path",{d:"M8.5 3 3 6l1.8 3.8 2.2-1V21h10V8.8l2.2 1L22 6l-5.5-3a2.6 2.6 0 0 1-4.5 1.4A2.6 2.6 0 0 1 8.5 3z"})}),e.jsx("span",{className:"item-preview__toggle-label",children:s("itemPreview.item")})]})]})]})}function Aa({contractAddress:r,name:o,items:t,className:d}){const n=se();if(!r||!o)return null;const b=(t??[]).map(l=>l.thumbnail).filter(l=>!!l).slice(0,4),x=b.slice(0,2),_=b.slice(2,4);return e.jsxs("button",{className:`creator creator--link${d?` ${d}`:""}`,onClick:l=>{l.stopPropagation(),n(`/collection/${r}`)},children:[b.length>0?e.jsxs("span",{className:"creator__ava collection-collage","aria-hidden":!0,children:[e.jsx("span",{className:`collection-collage__row${_.length===0?" collection-collage__row--full":""}`,children:x.map((l,j)=>e.jsx("img",{src:l,alt:""},j))}),_.length>0?e.jsx("span",{className:"collection-collage__row",children:_.map((l,j)=>e.jsx("img",{src:l,alt:""},j))}):null]}):null,e.jsx("span",{className:"creator__name",children:Ue(o)})]})}function Ma(r){return Object.values($.Rarity).includes(r)}function Sa(r){return r==="male"?s("itemDetail.genderMale"):r==="female"?s("itemDetail.genderFemale"):r==="unisex"?s("itemDetail.genderUnisex"):null}function ve(r){return r.wearableCategory?r.wearableCategory.replace(/_/g," "):r.category==="emote"?s("itemDetail.categoryEmote"):s("itemDetail.categoryWearable")}function Ja(){const{contractAddress:r,tokenId:o}=Se(),{state:t}=Pe(),d=se(),n=!!(t!=null&&t.market),b=(t==null?void 0:t.marketPriceCredits)??null,x=_e(i=>i.add),_=_e(i=>i.items),l=he(i=>i.toggle),{session:j}=te(),[a,v]=m.useState(()=>t!=null&&t.item?{...t.item,tradeId:t.tradeId??t.item.tradeId}:{id:`${r}-${o}`,name:"",creator:"",contractAddress:r??"",itemId:null,category:"wearable",rarity:"common",network:"MATIC",chainId:fe.chainId,thumbnail:"",priceCredits:0,gender:null,isSmart:!1,tokenId:o??void 0,tradeId:t==null?void 0:t.tradeId}),[P,f]=m.useState(!1),[L,C]=m.useState(!!(t!=null&&t.resumeBuy));m.useEffect(()=>{t!=null&&t.resumeBuy&&f(!0)},[t==null?void 0:t.resumeBuy]);const{data:g=[],isFetched:N}=O({queryKey:["collection-items",a.contractAddress],enabled:!!a.contractAddress,queryFn:()=>ra(a.contractAddress,{first:20}).then(i=>i.items)}),W=a.available==null&&!a.tokenId,{data:k,isLoading:K}=O({queryKey:["shop-item",a.contractAddress,o],enabled:!n&&!!a.contractAddress&&!!o&&(!(t!=null&&t.item)||W),queryFn:()=>la(a.contractAddress,o)});m.useEffect(()=>{k&&v(i=>i.tradeId?i.available!=null&&i.wearableCategory?i:{...i,available:i.available??k.available,wearableCategory:i.wearableCategory??k.wearableCategory}:{...k})},[k]);const[U,G]=m.useState(!1),{data:D=""}=O({queryKey:["item-desc",a.contractAddress,a.itemId],enabled:!!a.contractAddress&&!!a.itemId,staleTime:5*6e4,queryFn:()=>da(a.contractAddress,a.itemId)}),{data:I}=O({queryKey:["collection-meta",a.contractAddress],enabled:!!a.contractAddress,staleTime:5*6e4,queryFn:()=>na(a.contractAddress)});m.useEffect(()=>{if(a.name||k||g.length===0)return;const i=o&&g.find(S=>S.tokenId===o||S.itemId===o)||g.find(S=>S.contractAddress===a.contractAddress);i&&v(S=>({...i,tradeId:S.tradeId??i.tradeId}))},[g,k]);const H=m.useMemo(()=>{const i=new Set,S=[];for(const F of g){if(F.id===a.id||a.itemId&&F.itemId===a.itemId||a.tokenId&&F.tokenId===a.tokenId)continue;const oe=`${F.contractAddress}-${F.itemId??F.tokenId??F.id}`;i.has(oe)||(i.add(oe),S.push(F))}return S},[g,a.id,a.itemId,a.tokenId]),{data:c,isLoading:y}=O({queryKey:["detail-trade",a.id,a.tradeId,a.contractAddress,a.itemId],enabled:!!a.contractAddress,queryFn:async()=>{if(a.tradeId)return a.tradeId;if(a.itemId){const i=await ca(a.contractAddress,a.itemId);return(i==null?void 0:i.id)??null}return null}}),u=a.tradeId??c??void 0,h=!!u,{data:p}=va(n),A=m.useMemo(()=>{if(!n||!(t!=null&&t.item))return null;const i=t.item;return i.manaWei?{tradeId:i.tradeId??i.id,listingType:"primary",contractAddress:i.contractAddress,itemId:i.itemId??"",name:i.name,thumbnail:i.thumbnail,rarity:i.rarity,category:i.category,wearableCategory:i.wearableCategory??null,creator:i.creator,manaWei:i.manaWei,available:1,network:i.network,chainId:i.chainId,createdAt:0}:null},[n,t==null?void 0:t.item]),T=n&&b!=null&&!!p&&!!A,E=Ge({priceCredits:a.priceCredits,compareAtCredits:a.compareAtCredits,saleEndsAt:a.saleEndsAt}),V=m.useMemo(()=>({...a,tradeId:u,id:u??a.id}),[a,u]),B=_.some(i=>i.id===V.id),w=he(i=>!!i.items[a.id]),q=m.useRef(null);m.useEffect(()=>{!a.name||y||q.current===a.id||(q.current=a.id,z("Shop Viewed Item",{...He(a),for_sale:h}),Qe(a))},[a.id,a.name,y,h]);const Q=`${r}/${o}`,ie=m.useRef(Q);m.useEffect(()=>{ie.current!==Q&&(ie.current=Q,t!=null&&t.item&&v({...t.item,tradeId:t.tradeId??t.item.tradeId}),typeof window<"u"&&window.scrollTo({top:0,behavior:"smooth"}))},[Q]);function Ne(){!h||B||Y||x(V,"item_detail")}const X=Ma(a.rarity)?a.rarity:$.Rarity.COMMON,re=Sa(a.gender),le=Ye(a),de=Je(a.gender),ge=h&&E,we=s("itemDetail.moreFromCollection"),Y=Ze(a,j==null?void 0:j.address),ne=h?B?s("assetCard.inCart"):y?s("itemDetail.checking"):s("assetCard.addToCart"):s("itemDetail.notForSale"),Ce=typeof a.available=="number"&&a.available>0&&!a.tokenId&&!n,ke=!Y&&h&&!n,Ie=n||!Y,Ae=K||!!a.contractAddress&&!N,ce=!a.name&&!Ae,Me=/^https?:\/\//i.test(a.thumbnail);return Xe(ce?{title:s("seo.item.notFoundTitle"),noindex:!0}:a.name?{title:a.name,description:D||s("seo.item.fallbackDescription",{name:a.name,rarity:a.rarity,category:ve(a),creator:Na(a.creator)}),image:Me?a.thumbnail:void 0,type:"product"}:{}),ce?e.jsxs("div",{className:"item-detail item-detail--notfound",children:[e.jsx("span",{className:"ico ico-cart item-detail__notfound-ico","aria-hidden":!0}),e.jsx("h1",{className:"item-detail__notfound-title",children:s("itemDetail.notAvailableTitle")}),e.jsx("p",{className:"muted",children:s("itemDetail.notAvailableBody")}),e.jsx("button",{className:"btn btn--purple",onClick:()=>d("/assets"),children:s("notFound.cta")})]}):e.jsxs("div",{className:"item-detail",children:[e.jsxs("nav",{className:"item-detail__crumbs","aria-label":s("itemDetail.breadcrumbAria"),children:[e.jsx("button",{className:"item-detail__crumb-link",onClick:()=>d("/assets"),children:s("nav.collectibles")}),e.jsx("span",{className:"item-detail__crumb-sep",children:"/"}),e.jsx("span",{className:"item-detail__crumb-current",children:a.name||s("itemDetail.itemFallback")})]}),e.jsxs("div",{className:"item-detail__main",children:[e.jsxs("div",{className:"item-detail__preview",children:[a.name?e.jsx(Ia,{item:a}):e.jsx("div",{className:"item-preview__loading","aria-busy":"true","aria-label":s("itemPreview.loading"),children:e.jsx("span",{className:"skeleton item-preview__skeleton","aria-hidden":!0})}),e.jsx("button",{className:`item-detail__fav item-detail__fav--preview${w?" is-on":""}`,onClick:()=>l(a),"aria-pressed":w,"aria-label":w?s("assetCard.removeFromFavorites"):s("assetCard.addToFavorites"),children:e.jsx("span",{className:`ico ${w?"ico-heart-solid":"ico-heart"}`,"aria-hidden":!0})})]}),e.jsx("div",{className:"item-detail__info",children:a.name?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"item-detail__info-head",children:[e.jsx("h1",{className:"item-detail__title",children:a.name}),e.jsx("button",{className:`item-detail__fav${w?" is-on":""}`,onClick:()=>l(a),"aria-pressed":w,"aria-label":w?s("assetCard.removeFromFavorites"):s("assetCard.addToFavorites"),children:e.jsx("span",{className:`ico ${w?"ico-heart-solid":"ico-heart"}`,"aria-hidden":!0})})]}),e.jsxs("div",{className:"item-detail__chips",children:[e.jsx("span",{className:"chip chip--rarity",style:{background:sa(X),color:aa(X)},title:ea(a.rarity),children:a.rarity}),e.jsxs("span",{className:"chip item-detail__chip",children:[le?e.jsx("span",{className:`ico ico-${le} item-detail__chip-ico`,"aria-hidden":!0}):null,ve(a)]}),re?e.jsxs("span",{className:"chip item-detail__chip",children:[de?e.jsx("span",{className:`ico ico-${de} item-detail__chip-ico`,"aria-hidden":!0}):null,re]}):null]}),D?e.jsxs("div",{className:"item-detail__section item-detail__description",children:[e.jsx("div",{className:"item-detail__label",children:s("itemDetail.description")}),e.jsx("p",{className:`item-detail__desc-text${U?" is-expanded":""}`,children:D}),D.length>140?e.jsx("button",{className:"link item-detail__desc-toggle",onClick:()=>G(i=>!i),children:U?s("itemDetail.showLess"):s("itemDetail.readMore")}):null]}):null,a.creator||I!=null&&I.name?e.jsxs("div",{className:"item-detail__meta",children:[a.creator?e.jsxs("div",{className:"item-detail__meta-col",children:[e.jsx("div",{className:"item-detail__label",children:s("itemDetail.creator")}),e.jsx(ta,{address:a.creator,className:"item-detail__creator",linkToProfile:!0,hidePrefix:!0})]}):null,I!=null&&I.name?e.jsxs("div",{className:"item-detail__meta-col item-detail__meta-col--collection",children:[e.jsx("div",{className:"item-detail__label",children:s("itemDetail.collection")}),e.jsx(Aa,{contractAddress:a.contractAddress,name:I.name,items:g,className:"item-detail__creator"})]}):null]}):null,e.jsx("hr",{className:"item-detail__divider"}),e.jsx("div",{className:"item-detail__price-block",children:e.jsxs("div",{className:"item-detail__price-row",children:[e.jsxs("div",{className:"item-detail__price-col",children:[e.jsx("div",{className:"item-detail__price-label",children:s("itemDetail.price")}),n?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"item-detail__price item-detail__price--market",children:b==null?e.jsx("span",{className:"item-detail__price-value",children:"—"}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"item-detail__approx","aria-hidden":!0,children:"≈"}),e.jsx(M,{className:"item-detail__diamond"}),e.jsx("span",{className:"item-detail__price-value",children:b})]})}),e.jsx("div",{className:"item-detail__market-note muted",children:s("assetCard.marketPrice")})]}):h?ge?e.jsxs("div",{className:"item-detail__price item-detail__price--sale",children:[e.jsxs("span",{className:"item-detail__price",children:[e.jsx(M,{className:"item-detail__diamond"}),e.jsx("span",{className:"item-detail__price-value",children:a.priceCredits})]}),e.jsxs("span",{className:"item-detail__price-was",children:[e.jsx(M,{className:"item-detail__diamond item-detail__diamond--was"}),a.compareAtCredits]}),be(a.compareAtCredits,a.priceCredits)>0?e.jsx("span",{className:"item-detail__sale-badge",children:s("assetCard.saleWithDiscount",{pct:be(a.compareAtCredits,a.priceCredits)})}):null,e.jsx(ia,{endsAt:a.saleEndsAt,className:"item-detail__countdown"})]}):e.jsxs("div",{className:"item-detail__price",children:[e.jsx(M,{className:"item-detail__diamond"}),e.jsx("span",{className:"item-detail__price-value",children:a.priceCredits})]}):e.jsx("div",{className:"item-detail__price item-detail__price--none",children:s("itemDetail.notForSale")})]}),Ce?e.jsxs("div",{className:"item-detail__stock-col",children:[e.jsx("div",{className:"item-detail__price-label",children:s("itemDetail.stock")}),e.jsxs("div",{className:"item-detail__stock-value",children:[(a.available??0).toLocaleString(),"/",$.Rarity.getMaxSupply(X).toLocaleString()]})]}):null]})}),e.jsx("div",{className:`item-detail__ctas${Ie?" item-detail__ctas--buttons":""}${ke?" item-detail__ctas--dual":""}`,children:n?e.jsxs("button",{className:"btn btn--purple item-detail__cta",onClick:()=>f(!0),disabled:!T,children:[e.jsx("span",{className:"item-detail__cta-label",children:s("assetCard.buyNow")}),b!=null?e.jsxs("span",{className:"item-detail__cta-price","aria-hidden":!0,children:[e.jsx(M,{className:"item-detail__cta-diamond"}),b]}):null]}):Y?e.jsxs("p",{className:"item-detail__own-note muted",children:[s("itemDetail.ownItemPrefix")," ",e.jsx(Ee,{to:"/my-assets",children:s("nav.myAssets")}),s("itemDetail.ownItemSuffix")]}):e.jsxs(e.Fragment,{children:[h?e.jsxs("button",{className:"btn btn--purple item-detail__cta",onClick:()=>f(!0),disabled:y,children:[e.jsx("span",{className:"item-detail__cta-label",children:s("assetCard.buyNow")}),e.jsxs("span",{className:"item-detail__cta-price","aria-hidden":!0,children:[e.jsx(M,{className:"item-detail__cta-diamond"}),a.priceCredits]})]}):null,e.jsxs("button",{className:"item-detail__addcart",onClick:Ne,disabled:!h||B||y,"aria-label":ne,children:[e.jsx("span",{className:"ico ico-cart-solid item-detail__addcart-ico","aria-hidden":!0}),e.jsx("span",{className:"item-detail__addcart-label",children:ne})]})]})})]}):e.jsx(Pa,{})})]}),e.jsx(ga,{title:we,items:H,onViewAll:a.contractAddress?()=>d(`/collection/${a.contractAddress}`):void 0}),P&&n&&A&&p?e.jsx(fa,{listing:A,rate:p,onClose:()=>f(!1),onSold:()=>f(!1)}):P&&!n?e.jsx(wa,{item:V,resume:L,onClose:()=>{f(!1),C(!1)}}):null]})}function Pa(){return e.jsxs("div",{className:"item-detail__info-skel","aria-hidden":!0,children:[e.jsx("span",{className:"skeleton id-skel__title"}),e.jsxs("div",{className:"id-skel__chips",children:[e.jsx("span",{className:"skeleton id-skel__chip"}),e.jsx("span",{className:"skeleton id-skel__chip"})]}),e.jsx("span",{className:"skeleton id-skel__line"}),e.jsx("span",{className:"skeleton id-skel__line id-skel__line--short"}),e.jsx("hr",{className:"item-detail__divider"}),e.jsx("span",{className:"skeleton id-skel__price"}),e.jsx("span",{className:"skeleton id-skel__btn"})]})}export{Ja as ItemDetail,Ja as default};
@@ -1 +0,0 @@
1
- import{r as c,j as i}from"./react-yytiy0wi.js";import{t as u}from"./index-CDzDnyJW.js";function m({hasNextPage:e,isFetching:r,onLoadMore:o}){const t=c.useRef(null);return c.useEffect(()=>{const n=t.current;if(!n||!e)return;const s=new IntersectionObserver(a=>{var l;(l=a[0])!=null&&l.isIntersecting&&!r&&o()},{rootMargin:"600px 0px"});return s.observe(n),()=>s.disconnect()},[e,r,o]),e?i.jsx("div",{className:"load-more",ref:t,children:i.jsx("button",{className:"btn btn--ghost",onClick:o,disabled:r,children:r?u("loadMore.loading"):u("loadMore.loadMore")})}):null}export{m as L};
@@ -1 +0,0 @@
1
- import{g as K,j as S,d as O,o as V,u as Y,t,q as h,C as b,r as M,s as H,k as j,i as $,l as D,v as J,b as y,w as F,x as R}from"./index-CDzDnyJW.js";import{r as X,a as x}from"./mana-rate-Db4BQ-_Q.js";import{a as Z,r as m,j as r}from"./react-yytiy0wi.js";import{b as U}from"./buy--wjHgZbY.js";import{g as ee,b as re,w as ae,S as te,G as se}from"./buy-gasless-DaSij0O9.js";import{i as ie}from"./errors-BFbUxXdM.js";import{E as ce}from"./ErrorNotice-Rze9rgc9.js";function fe(e=!0){return K({queryKey:["mana-rate",S.chainId],queryFn:()=>X(S.chainId),enabled:e,staleTime:6e4,refetchInterval:6e4,retry:1})}function q(e){if(ie(e))return t("errors.rejected");const n=(e.message??"").toLowerCase();return n.includes("insufficient")?t("marketCheckout.error.insufficient",{currency:j.name}):n.includes("not found")||n.includes("no active listing")||n.includes("404")?t("marketCheckout.error.soldOrRemoved"):n.includes("your own listing")?t("errors.cantBuyOwn"):t("marketCheckout.error.generic")}function ne(e){return{id:e.tradeId,tradeId:e.tradeId,name:e.name,creator:e.creator,contractAddress:e.contractAddress,itemId:e.itemId,category:e.category,wearableCategory:e.wearableCategory??void 0,rarity:e.rarity,network:e.network,chainId:e.chainId,thumbnail:e.thumbnail,priceCredits:0,gender:null,isSmart:!1}}function _e({listing:e,rate:n,onClose:A,onSold:W}){const{session:i}=O(),{data:d,isError:T}=V(i),w=Y(),N=Z(),[g,k]=m.useState("confirm"),[p,I]=m.useState(t("marketCheckout.lockingPrice")),[B,f]=m.useState(null),[a,G]=m.useState(null),o=m.useRef(null),L=Math.ceil(x(e.manaWei,n)/10);m.useEffect(()=>{let l=!1;if(!i){k("error"),f(t("buyModal.signInToCheckout"));return}return(async()=>{try{const s=await $(e.tradeId);if(!s)throw new Error("not found");if(D(s,i.address))throw new Error("You can't buy your own listing.");const u=x(e.manaWei,n);if(!Number.isFinite(u)||u<=0)throw new Error("price unavailable");const{credit:v,maxCreditedValue:z,usdCents:P}=await J(i.identity,u,e.tradeId);if(l){h(i.identity,[v.id]).catch(()=>{});return}o.current=v.id,G({trade:s,credit:v,maxCreditedValue:z,usdCents:P,credits:Math.ceil(P/10)}),I("")}catch(s){if(l)return;console.error("[market] authorize failed",s),y(R(s)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:F(s),value_usd:Math.round(x(e.manaWei,n))/100}),k("error"),f(q(s))}})(),()=>{l=!0,o.current&&i&&(h(i.identity,[o.current]).catch(()=>{}),o.current=null)}},[]);const C=!!a&&d!=null&&d.credits<a.credits;async function Q(){if(!i||!a)return;if(C){y("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:a.credits,credits_balance:(d==null?void 0:d.credits)??0,shortfall:Math.max(0,a.credits-((d==null?void 0:d.credits)??0))}),h(i.identity,[a.credit.id]).catch(()=>{}),o.current=null,N("/credits");return}k("working"),f(null);let l=!1;try{I(t("marketCheckout.confirming"));const c={trade:a.trade,buyer:i.address,signer:i.signer,credits:[a.credit],maxCreditedValue:a.maxCreditedValue};let s;if(ee())try{s=await re(c),await ae(s),l=!0}catch(u){if(u instanceof te)l=!0;else if(u instanceof se)s=await U(c);else throw u}else s=await U(c);o.current=null,y("Shop Completed Purchase",{items:[{item_id:e.itemId??null,contract_address:e.contractAddress,token_id:null,price_usd:a.usdCents/100}],value_credits:a.credits,value_usd:a.usdCents/100,purchase_type:"item",is_primary:!0,payment_type:"credits",no_crypto_step:l,transaction_hash:s??null}),w.invalidateQueries({queryKey:["usd-balance"]}),N("/success",{state:{items:[ne(e)],txHash:s}})}catch(c){console.error("[market] buy now failed",c),h(i.identity,[a.credit.id]).catch(()=>{}),o.current=null,y(R(c)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:F(c),value_usd:a.usdCents/100}),w.invalidateQueries({queryKey:["usd-balance"]}),f(q(c)),k("error");const s=(c.message??"").toLowerCase();(s.includes("not found")||s.includes("no active listing")||s.includes("404"))&&W()}}function E(){i&&a&&h(i.identity,[a.credit.id]).catch(()=>{}),o.current=null,A()}const _=g==="working";return r.jsxs("div",{className:"mkt-modal",role:"dialog","aria-modal":"true","aria-label":t("buyModal.dialogAria",{name:e.name}),children:[r.jsx("div",{className:"mkt-modal__scrim",onClick:_?void 0:E,"aria-hidden":!0}),r.jsxs("div",{className:"mkt-modal__card",children:[r.jsxs("div",{className:"mkt-modal__head",children:[r.jsx("div",{className:"mkt-modal__thumb",children:e.thumbnail?r.jsx("img",{src:e.thumbnail,alt:""}):null}),r.jsxs("div",{children:[r.jsx("div",{className:"mkt-modal__name",title:e.name,children:e.name||t("buyModal.itemFallback")}),r.jsx("span",{className:"chip chip--rarity",children:e.rarity})]})]}),r.jsx("div",{className:"mkt-modal__price",children:a?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"mkt-modal__price-label",children:t("marketCheckout.finalPrice")}),r.jsxs("div",{className:"mkt-modal__price-value",children:[r.jsx(b,{className:"mkt-modal__diamond"}),M(a.credits)]}),r.jsxs("div",{className:"mkt-modal__price-sub muted",children:[t("marketCheckout.lockedForPurchase")," · $",(a.usdCents/100).toFixed(2)]})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"mkt-modal__price-label",children:t("marketCheckout.todaysPrice")}),r.jsxs("div",{className:"mkt-modal__price-value mkt-modal__price-value--approx",children:[r.jsx("span",{className:"mkt-modal__approx","aria-hidden":!0,children:"≈"}),r.jsx(b,{className:"mkt-modal__diamond"}),M(L)]}),r.jsx("div",{className:"mkt-modal__price-sub muted",children:p||t("marketCheckout.lockingPrice")})]})}),i?r.jsxs("div",{className:"mkt-modal__balance muted",children:[t("marketCheckout.yourBalance")," ",r.jsx(b,{className:"ccy-mark"})," ",H(d,T)]}):null,C?r.jsx("p",{className:"muted mkt-modal__note",children:t("marketCheckout.needMore",{currency:j.name})}):null,p&&g==="working"?r.jsx("p",{className:"muted mkt-modal__note",children:p}):null,r.jsx(ce,{message:B,className:"mkt-modal__note"}),r.jsxs("div",{className:"mkt-modal__actions",children:[r.jsx("button",{className:"btn btn--ghost",onClick:E,disabled:_,children:t("buyModal.cancel")}),r.jsx("button",{className:"btn btn--purple",onClick:()=>void Q(),disabled:_||!a,children:_?t("marketCheckout.buying"):C?t("nav.getCredits",{currency:j.name}):t("marketCheckout.confirmPurchase")})]})]})]})}export{_e as M,fe as u};
@@ -1 +0,0 @@
1
- import{a as G,r as m,j as e,L as os}from"./react-yytiy0wi.js";import{j as B,D as ds,u as H,t as a,C as F,k as w,p as es,b as M,ac as X,z,w as as,a as ms,d as us,g as D,ap as hs,i as ps,aq as ys}from"./index-CDzDnyJW.js";import{f as bs}from"./import-DjSObRBl.js";import{d as ts}from"./dcl-schemas-BICTSpB5.js";import{c as gs}from"./buy--wjHgZbY.js";import{a as xs,b as js,i as _s,e as Ns,c as fs}from"./trade-encoding-6ejU5fQD.js";import{f as ns}from"./errors-BFbUxXdM.js";import{E as $}from"./ErrorNotice-Rze9rgc9.js";import{s as vs}from"./wallet-kind-B9P1TeIH.js";import{L as Is}from"./LoadMore-BIjeTH4T.js";import{u as As}from"./useInfiniteGrid-gL0KJ-yb.js";import"./sentry-BPJvc5GU.js";import"./ethers-w2AslR0v.js";import"./intl-CBcMB1D2.js";import"./mana-rate-Db4BQ-_Q.js";import"./index-HN6Rk25C.js";const O=()=>`${B.builderServerUrl}/v1`;function rs(s){return Array.isArray(s)?s:"results"in s&&Array.isArray(s.results)?s.results:"data"in s&&Array.isArray(s.data)?s.data:[]}async function is(s,i){const r=await ds(s,{method:"GET",identity:i,metadata:{}});if(!r.ok)throw new Error(`builder-server ${r.status}: ${await r.text()}`);const o=await r.json();return o.data??o}function ks(s,i){const r=i-s;return r>0?r:0}function Ss(s){var i,r,o,l,c;return((r=(i=s.data)==null?void 0:i.wearable)==null?void 0:r.category)??((l=(o=s.data)==null?void 0:o.emote)==null?void 0:l.category)??((c=s.data)==null?void 0:c.category)??s.type??"wearable"}function Z(s){return`${O()}/storage/contents/${s}`}function P(s,i){if(!s)return"";if(/^https?:\/\//.test(s))return s;const r=i==null?void 0:i[s];return r?Z(r):/^(ba|Qm)/.test(s)?Z(s):""}async function Cs(s,i){try{const r=await fetch(`${O()}/items/${s}/${i}/contents`);if(!r.ok)return{};const o=await r.json();return o.data??o}catch{return{}}}async function ws(s,i,r){const o=P(s.thumbnail,s.contents)||P("thumbnail.png",s.contents);if(o)return o;if(i&&r){const l=await Cs(i,r);return P(s.thumbnail,l)||P("thumbnail.png",l)||P("image.png",l)}return""}async function Ls(s,i){const r=`${O()}/${s.toLowerCase()}/collections?is_published=true`,o=await is(r,i);return rs(o).filter(l=>l.is_published&&!!l.contract_address).map(l=>({id:l.id,name:l.name,contractAddress:l.contract_address.toLowerCase(),isPublished:l.is_published,isApproved:l.is_approved,minters:(l.minters??[]).map(c=>c.toLowerCase())}))}async function Ms(s,i){const r=`${O()}/collections/${s.id}/items`,o=await is(r,i);return(await Promise.all(rs(o).map(async c=>{const v=c.rarity??"common",N=Number(c.total_supply??0)||0;let u;try{u=ts.Rarity.getMaxSupply(v)}catch{u=0}const I=(c.contract_address??s.contractAddress).toLowerCase(),y=c.blockchain_item_id??"";return{id:c.id,collectionId:s.id,collectionName:s.name,contractAddress:I,blockchainItemId:y,name:c.name,category:Ss(c),rarity:v,thumbnail:await ws(c,I,y),type:c.type??"wearable",isPublished:c.is_published??s.isPublished,isApproved:c.is_approved??s.isApproved,totalSupply:N,maxSupply:u,remainingSupply:ks(N,u),minters:s.minters}}))).filter(Ps)}function Ps(s){return s.isPublished&&s.isApproved&&s.blockchainItemId!==""&&s.blockchainItemId!=null&&s.remainingSupply>0}async function $s(s,i){const r=await Ls(s,i);return(await Promise.all(r.map(async l=>{try{return await Ms(l,i)}catch{return[]}}))).flat()}const Es=1e3*60*60*24*182;function Ts({asset:s,session:i,onClose:r}){const o=H(),l=G(),[c,v]=m.useState("10"),[N,u]=m.useState(null),[I,y]=m.useState(null),[b,S]=m.useState(!1),[_,A]=m.useState(null);async function C(){y(null);const d=Number(c);if(!Number.isInteger(d)||d<=0){y(a("sellModal.errorWholeNumber"));return}S(!0);try{u(a("sellModal.statusPreparing")),await xs({signer:i.signer,contractAddress:s.contractAddress,chainId:s.chainId}),u(a("sellModal.statusListing"));const f=await js({signer:i.signer,nft:{contractAddress:s.contractAddress,tokenId:s.tokenId,network:s.network,chainId:s.chainId},usdPrice:d/10,expiresAtMs:Date.now()+Es});u(a("sellModal.statusPublishing")),await es(f,i.identity),u(null),A(d),M("Shop Listed Item",{item_id:s.itemId??s.tokenId??null,contract_address:s.contractAddress,price_credits:d,price_usd:d/10,listing_type:"secondary",is_primary:!1}),X.success(a("sellModal.toastOnSale",{name:s.name})),o.invalidateQueries({queryKey:["my-assets",i.address]})}catch(f){z(f,{flow:"list_secondary"}),M("Shop Listing Failed",{listing_type:"secondary",error_code:as(f)}),y(ns(f,a("sellModal.errorGeneric"))),u(null)}finally{S(!1)}}function j(){r(),l(`/item/${s.contractAddress}/${s.tokenId}`)}return _!==null?e.jsx("div",{className:"modal-backdrop",onClick:r,role:"presentation",children:e.jsxs("div",{className:"modal modal--success",onClick:d=>d.stopPropagation(),role:"dialog","aria-modal":"true",children:[e.jsx("div",{className:"modal-success__check","aria-hidden":!0,children:"✓"}),e.jsx("h2",{className:"modal__title",children:a("sellModal.successTitle")}),s.image?e.jsx("img",{className:"modal__img",src:s.image,alt:s.name}):null,e.jsx("p",{className:"modal-success__name",children:s.name}),e.jsxs("p",{className:"muted small",children:[a("sellModal.listedFor")," ",e.jsxs("strong",{children:[e.jsx(F,{className:"ccy-mark"})," ",_]})]}),e.jsxs("div",{className:"modal__actions",children:[e.jsx("button",{className:"btn btn--ghost",onClick:r,children:a("getCredits.done")}),e.jsx("button",{className:"btn btn--purple",onClick:j,children:a("sellModal.viewInShop")})]})]})}):e.jsx("div",{className:"modal-backdrop",onClick:r,role:"presentation",children:e.jsxs("div",{className:"modal",onClick:d=>d.stopPropagation(),role:"dialog","aria-modal":"true",children:[e.jsx("h2",{className:"modal__title",children:a("sellModal.listTitle",{name:s.name})}),s.image?e.jsx("img",{className:"modal__img",src:s.image,alt:s.name}):null,e.jsxs("label",{className:"field",children:[e.jsx("span",{children:a("sellModal.priceLabel",{currency:w.name})}),e.jsx("input",{type:"number",min:"1",step:"1",value:c,onChange:d=>v(d.target.value),disabled:b})]}),e.jsx("p",{className:"muted small",children:a("sellModal.pricedInWhole",{currency:w.name,currencySingular:w.nameSingular})}),N?e.jsx("p",{className:"muted",children:N}):null,e.jsx($,{message:I}),e.jsxs("div",{className:"modal__actions",children:[e.jsx("button",{className:"btn btn--ghost",onClick:r,disabled:b,children:a("sellModal.cancel")}),e.jsx("button",{className:"btn",onClick:()=>void C(),disabled:b,children:b?a("sellModal.listing"):a("sellModal.putOnSale")})]})]})})}const qs=1e3*60*60*24*182;function Fs({item:s,session:i,onClose:r}){const o=H(),l=G(),[c,v]=m.useState("10"),[N,u]=m.useState(null),[I,y]=m.useState(null),[b,S]=m.useState(!1),[_,A]=m.useState(null),[C,j]=m.useState(null),d=B.chainId,f=vs(i.providerType);m.useEffect(()=>{let h=!1;return(async()=>{try{const g=await _s({contractAddress:s.contractAddress,chainId:d});h||A(g)}catch{h||A(!1)}})(),()=>{h=!0}},[s.contractAddress,d]);async function K(){y(null);const h=Number(c);if(!Number.isInteger(h)||h<=0){y(a("primaryList.errorWholeNumber"));return}S(!0);try{_||(u(a("primaryList.statusEnabling")),await Ns({signer:i.signer,contractAddress:s.contractAddress,chainId:d}),A(!0)),u(a("primaryList.statusPublishing"));const g=await fs({signer:i.signer,item:{contractAddress:s.contractAddress,itemId:s.blockchainItemId,network:ts.Network.MATIC,chainId:d},usdPrice:h/10,uses:s.remainingSupply,expiresAtMs:Date.now()+qs});u(a("primaryList.statusFinishing")),await es(g,i.identity),u(null),j(h),M("Shop Listed Item",{item_id:s.blockchainItemId,contract_address:s.contractAddress,price_credits:h,price_usd:h/10,listing_type:"primary",is_primary:!0}),X.success(a("primaryList.toastOnSale",{name:s.name})),o.invalidateQueries({queryKey:["publishable-items"]}),o.invalidateQueries({queryKey:["collection-sale-state"]})}catch(g){z(g,{flow:"list_primary"}),M("Shop Listing Failed",{listing_type:"primary",error_code:as(g)}),y(ns(g,a("primaryList.errorGeneric"))),u(null)}finally{S(!1)}}function Q(){r(),l(`/item/${s.contractAddress}/${s.blockchainItemId}`)}const E=b?a("primaryList.listing"):_===!1?a("primaryList.enableAndPutOnSale"):a("primaryList.putOnSale");return C!==null?e.jsx("div",{className:"modal-backdrop",onClick:r,role:"presentation",children:e.jsxs("div",{className:"modal modal--success",onClick:h=>h.stopPropagation(),role:"dialog","aria-modal":"true",children:[e.jsx("div",{className:"modal-success__check","aria-hidden":!0,children:"✓"}),e.jsx("h2",{className:"modal__title",children:a("primaryList.successTitle")}),s.thumbnail?e.jsx("img",{className:"modal__img",src:s.thumbnail,alt:s.name}):null,e.jsx("p",{className:"modal-success__name",children:s.name}),e.jsxs("p",{className:"muted small",children:[a("primaryList.listedFor")," ",e.jsxs("strong",{children:[e.jsx(F,{className:"ccy-mark"})," ",C]})," ",a("primaryList.dotAvailable",{count:s.remainingSupply})]}),e.jsxs("div",{className:"modal__actions",children:[e.jsx("button",{className:"btn btn--ghost",onClick:r,children:a("getCredits.done")}),e.jsx("button",{className:"btn btn--purple",onClick:Q,children:a("primaryList.viewInShop")})]})]})}):e.jsx("div",{className:"modal-backdrop",onClick:r,role:"presentation",children:e.jsxs("div",{className:"modal",onClick:h=>h.stopPropagation(),role:"dialog","aria-modal":"true",children:[e.jsx("h2",{className:"modal__title",children:a("primaryList.publishTitle",{name:s.name})}),s.thumbnail?e.jsx("img",{className:"modal__img",src:s.thumbnail,alt:s.name}):null,e.jsx("p",{className:"muted small",children:a("primaryList.fromCollection",{collectionName:s.collectionName,count:s.remainingSupply})}),e.jsxs("label",{className:"field",children:[e.jsx("span",{children:a("primaryList.priceLabel",{currency:w.name})}),e.jsx("input",{type:"number",min:"1",step:"1",value:c,onChange:h=>v(h.target.value),disabled:b})]}),e.jsx("p",{className:"muted small",children:a("primaryList.pricedInWhole",{currency:w.name,currencySingular:w.nameSingular})}),_===!1&&!b?f?e.jsx("p",{className:"muted small primary-note",children:a("primaryList.firstTimeConfirm",{collectionName:s.collectionName})}):e.jsx("p",{className:"muted small primary-note",children:a("primaryList.firstTimeManaged",{collectionName:s.collectionName})}):_===!0&&!b?f?e.jsx("p",{className:"muted small primary-note",children:a("primaryList.readyConfirm")}):e.jsx("p",{className:"muted small primary-note",children:a("primaryList.readyManaged")}):null,N?e.jsx("p",{className:"muted",children:N}):null,e.jsx($,{message:I}),e.jsxs("div",{className:"modal__actions",children:[e.jsx("button",{className:"btn btn--ghost",onClick:r,disabled:b,children:a("primaryList.cancel")}),e.jsx("button",{className:"btn",onClick:()=>void K(),disabled:b||_===null,children:_===null?a("primaryList.checking"):E})]})]})})}const Os=48;function Ks(s){return{id:s.id,name:s.name,creator:"",contractAddress:s.contractAddress,itemId:s.itemId,category:s.category,rarity:s.rarity??"common",network:s.network,chainId:s.chainId,thumbnail:s.image,priceCredits:s.listingPrice??0,gender:null,isSmart:!1,tokenId:s.tokenId}}function ss(s){return{id:`${s.contractAddress}-${s.blockchainItemId}`,name:s.name,creator:"",contractAddress:s.contractAddress,itemId:s.blockchainItemId,category:s.category,rarity:s.rarity,network:"MATIC",chainId:B.chainId,thumbnail:s.thumbnail,priceCredits:0,gender:null,isSmart:!1}}function ae(){ms({title:a("nav.myAssets"),noindex:!0});const{session:s,error:i,signIn:r,restore:o}=us(),l=G(),c=H(),[v,N]=m.useState(null),[u,I]=m.useState(null),[y,b]=m.useState(null),[S,_]=m.useState(null);function A(t){const n=t.tokenId??t.itemId??"";!t.contractAddress||!n||l(`/item/${t.contractAddress}/${n}`,{state:{item:t}})}async function C(t,n,p){if(s){_(null),b(p);try{const x=await ps(t);await gs({trade:x,signer:s.signer}),X.success(a("myAssets.removedFromSale",{name:n})),await c.invalidateQueries({queryKey:["my-assets",s.address]}),await c.invalidateQueries({queryKey:["collection-sale-state"]})}catch(x){const T=x,q=(T.message??"").toLowerCase(),Y=T.code===4001||q.includes("reject")||q.includes("denied");Y||z(x,{flow:"remove-listing",tradeId:t}),_(Y?a("getCredits.errorCanceled"):a("myAssets.removeListingError"))}finally{b(null)}}}m.useEffect(()=>{o()},[o]);const j=s==null?void 0:s.address,{items:d,isLoading:f,error:K,hasNextPage:Q,isFetchingNextPage:E,fetchNextPage:h}=As(["my-assets",j],t=>hs(j,{first:Os,skip:t}).then(n=>({items:n.assets,total:n.total})),{enabled:!!j}),{data:g}=D({queryKey:["importable",j],queryFn:()=>bs(j),enabled:!!j}),J=((g==null?void 0:g.creations.length)??0)+((g==null?void 0:g.owned.length)??0),{data:L,isLoading:ls,isError:cs}=D({queryKey:["publishable-items",j],queryFn:()=>$s(j,s.identity),enabled:!!s,retry:!1}),R=m.useMemo(()=>[...new Set((L??[]).map(t=>t.contractAddress))],[L]),{data:k}=D({queryKey:["collection-sale-state",j,R],enabled:R.length>0,queryFn:async()=>{const t=await Promise.all(R.map(async p=>[p,await ys(p)])),n={};for(const[p,x]of t)for(const[T,q]of Object.entries(x))n[`${p}-${T}`]=q;return n}}),U=t=>k==null?void 0:k[`${t.contractAddress}-${t.blockchainItemId}`],W=m.useMemo(()=>(L??[]).filter(t=>{var n;return(n=U(t))==null?void 0:n.isOnSale}),[L,k]),V=m.useMemo(()=>{var n;const t=new Map;for(const p of L??[]){if((n=k==null?void 0:k[`${p.contractAddress}-${p.blockchainItemId}`])!=null&&n.isOnSale)continue;const x=t.get(p.collectionId)??{id:p.collectionId,name:p.collectionName,items:[]};x.items.push(p),t.set(p.collectionId,x)}return[...t.values()]},[L,k]);return s?e.jsxs("section",{className:"myassets",children:[e.jsx("h1",{children:a("nav.myAssets")}),J>0?e.jsxs(os,{className:"import-banner",to:"/import",children:[e.jsx("span",{className:"import-banner__ico","aria-hidden":!0,children:"📦"}),e.jsxs("span",{className:"import-banner__text",children:[e.jsx("strong",{children:a("myAssets.importTitle")}),e.jsx("span",{className:"import-banner__sub",children:a("myAssets.importSub",{count:J})})]}),e.jsx("span",{className:"import-banner__cta",children:a("myAssets.import")})]}):null,e.jsxs("div",{className:"myassets__section",children:[e.jsxs("div",{className:"myassets__section-head",children:[e.jsx("h2",{className:"myassets__section-title",children:a("myAssets.ownedTitle")}),e.jsx("p",{className:"myassets__section-sub",children:a("myAssets.ownedSub")})]}),K?e.jsx($,{message:a("myAssets.ownedError")}):null,e.jsx($,{message:S}),e.jsxs("div",{className:"asset-grid",children:[f?Array.from({length:8}).map((t,n)=>e.jsx("div",{className:"asset-card asset-card--skeleton"},`sk-${n}`)):d.map(t=>e.jsxs("article",{className:"asset-card asset-card--link",children:[e.jsx("button",{className:"card-link-overlay","aria-label":a("myAssets.viewItem",{name:t.name}),onClick:()=>A(Ks(t))}),e.jsx("div",{className:"asset-card__img",children:t.image?e.jsx("img",{src:t.image,alt:t.name}):null}),e.jsx("div",{className:"asset-card__name",title:t.name,children:t.name}),t.isOnSale?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"asset-card__listed",children:[e.jsxs("span",{className:"asset-card__price",children:[e.jsx(F,{className:"ccy-mark"})," ",t.listingPrice]}),e.jsx("span",{className:"badge",children:a("myAssets.onSale")})]}),e.jsx("button",{className:"btn btn--sm btn--ghost asset-card__remove",disabled:y===t.id||!t.tradeId,onClick:n=>{n.stopPropagation(),t.tradeId&&C(t.tradeId,t.name,t.id)},children:y===t.id?a("myAssets.removing"):a("myAssets.removeListing")})]}):e.jsx("button",{className:"btn btn--sm",onClick:n=>{n.stopPropagation(),M("Shop Started Listing",{listing_type:"secondary",item_id:t.itemId??t.tokenId??null}),N(t)},children:a("myAssets.putOnSale")})]},t.id)),E?Array.from({length:4}).map((t,n)=>e.jsx("div",{className:"asset-card asset-card--skeleton"},`msk-${n}`)):null]}),e.jsx(Is,{hasNextPage:Q,isFetching:E,onLoadMore:()=>void h()}),!f&&d.length===0?e.jsx("p",{className:"muted",children:a("myAssets.ownedEmpty")}):null]}),e.jsxs("div",{className:"myassets__section",children:[e.jsxs("div",{className:"myassets__section-head",children:[e.jsx("h2",{className:"myassets__section-title",children:a("myAssets.creationsTitle")}),e.jsx("p",{className:"myassets__section-sub",children:a("myAssets.creationsSub",{currency:w.name})})]}),ls?e.jsx("div",{className:"publish-grid",children:Array.from({length:4}).map((t,n)=>e.jsx("div",{className:"asset-card asset-card--skeleton"},`pub-sk-${n}`))}):cs?e.jsx("p",{className:"publish-empty",children:a("myAssets.collectionsError")}):W.length===0&&V.length===0?e.jsx("p",{className:"publish-empty",children:a("myAssets.nothingToPublish")}):e.jsxs(e.Fragment,{children:[W.length>0?e.jsxs("div",{className:"creations-collection",children:[e.jsx("h3",{className:"creations-collection__name",children:a("myAssets.onSale")}),e.jsx("div",{className:"publish-grid",children:W.map(t=>{var n;return e.jsxs("article",{className:"publish-card publish-card--link",children:[e.jsx("button",{className:"card-link-overlay","aria-label":a("myAssets.viewItem",{name:t.name}),onClick:()=>A(ss(t))}),e.jsx("div",{className:"publish-card__img",children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:t.name}):null}),e.jsx("div",{className:"publish-card__name",title:t.name,children:t.name}),e.jsxs("div",{className:"publish-card__listed",children:[e.jsxs("span",{className:"publish-card__price",children:[e.jsx(F,{className:"ccy-mark"})," ",((n=U(t))==null?void 0:n.priceCredits)??0]}),e.jsx("span",{className:"badge",children:a("myAssets.onSale")})]}),e.jsx("button",{className:"btn btn--sm btn--ghost publish-card__cta",disabled:y===t.id,onClick:p=>{p.stopPropagation();const x=U(t);x!=null&&x.tradeId&&C(x.tradeId,t.name,t.id)},children:y===t.id?a("myAssets.removing"):a("myAssets.removeListing")})]},`${t.contractAddress}-${t.blockchainItemId}`)})})]}):null,V.map(t=>e.jsxs("div",{className:"creations-collection",children:[e.jsx("h3",{className:"creations-collection__name",children:t.name}),e.jsx("div",{className:"publish-grid",children:t.items.map(n=>e.jsxs("article",{className:"publish-card publish-card--link",children:[e.jsx("button",{className:"card-link-overlay","aria-label":a("myAssets.viewItem",{name:n.name}),onClick:()=>A(ss(n))}),e.jsx("div",{className:"publish-card__img",children:n.thumbnail?e.jsx("img",{src:n.thumbnail,alt:n.name}):null}),e.jsx("div",{className:"publish-card__name",title:n.name,children:n.name}),e.jsxs("div",{className:"publish-card__meta",children:[e.jsx("span",{className:"publish-chip publish-chip--rarity",children:n.rarity}),e.jsx("span",{className:"publish-card__supply",children:a("myAssets.available",{count:n.remainingSupply})})]}),e.jsx("button",{className:"btn btn--sm btn--purple publish-card__cta",onClick:p=>{p.stopPropagation(),M("Shop Started Listing",{listing_type:"primary",item_id:n.blockchainItemId}),I(n)},children:a("myAssets.putOnSale")})]},`${n.contractAddress}-${n.blockchainItemId}`))})]},t.id))]})]}),v?e.jsx(Ts,{asset:v,session:s,onClose:()=>N(null)}):null,u?e.jsx(Fs,{item:u,session:s,onClose:()=>I(null)}):null]}):e.jsxs("section",{className:"myassets",children:[e.jsx("h1",{children:a("nav.myAssets")}),e.jsx("p",{className:"muted",children:a("myAssets.signInPrompt")}),e.jsx("div",{className:"connect-row",children:e.jsx("button",{className:"btn btn--purple",onClick:()=>r(),children:a("storeSettings.signIn")})}),e.jsx($,{message:i})]})}export{ae as MyAssets};
@@ -1 +0,0 @@
1
- .publish-section{margin-top:40px}.publish-section__head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:6px}.publish-section__title{font-size:20px;font-weight:700;color:var(--text)}.publish-section__hint{color:var(--muted);font-size:14px;margin:0 0 16px}.publish-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:16px;margin-top:8px}.publish-card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:10px}.publish-card__img{aspect-ratio:1;background:var(--media);border-radius:8px;display:grid;place-items:center;overflow:hidden}.publish-card__img img{width:100%;height:100%;object-fit:contain}.publish-card__name{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.publish-card__meta{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.publish-card__collection{color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.publish-chip{display:inline-flex;align-items:center;font-size:11px;font-weight:700;border-radius:var(--radius-chip);padding:3px 8px;background:var(--chip);color:#555}.publish-chip--rarity{background:var(--rarity-bg);color:var(--rarity);text-transform:uppercase;letter-spacing:.02em}.publish-card__supply{color:var(--muted);font-size:12px}.publish-card__cta{margin-top:auto;width:100%}.publish-empty{color:var(--muted);padding:16px 0}.primary-note{background:var(--rarity-bg);color:var(--accent);border-radius:8px;padding:10px 12px;margin:0}.myassets__section{margin-bottom:48px}.myassets__section-head{margin-bottom:18px}.myassets__section-title{font-size:22px;font-weight:700;margin:0}.myassets__section-sub{color:var(--muted);font-size:14px;margin:4px 0 0}.creations-collection{margin-bottom:26px}.creations-collection__name{font-size:15px;font-weight:700;color:var(--text-2);margin:0 0 14px;padding-bottom:8px;border-bottom:1px solid var(--line)}.asset-card--link,.publish-card--link{position:relative;transition:box-shadow .15s ease,transform .15s ease}.asset-card--link:hover,.publish-card--link:hover{box-shadow:0 10px 26px #14141e1f;transform:translateY(-2px)}.card-link-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;background:transparent;border:0;padding:0;cursor:pointer}.card-link-overlay:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.asset-card--link>button:not(.card-link-overlay),.publish-card--link>button:not(.card-link-overlay){position:relative;z-index:2}.asset-card__remove{margin-top:8px;width:100%}.publish-card__listed{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto}.publish-card__price{font-weight:800;font-size:15px}.import-banner{display:flex;align-items:center;gap:14px;text-decoration:none;color:var(--text);background:linear-gradient(100deg,#a524b31a,#691fa90f);border:1px solid rgba(105,31,169,.22);border-radius:14px;padding:14px 18px;margin:4px 0 22px;transition:box-shadow .15s ease,transform .15s ease}.import-banner:hover{box-shadow:0 10px 26px #691fa929;transform:translateY(-1px)}.import-banner__ico{font-size:26px}.import-banner__text{display:flex;flex-direction:column;gap:2px;min-width:0}.import-banner__text strong{font-size:15px}.import-banner__sub{color:var(--muted);font-size:13px}.import-banner__cta{margin-left:auto;flex:none;background:var(--accent);color:#fff;font-weight:700;font-size:13px;letter-spacing:.03em;text-transform:uppercase;padding:9px 18px;border-radius:9px}
@@ -1 +0,0 @@
1
- import{r as n,j as s,L as c}from"./react-yytiy0wi.js";import{a as m,t,c as l,A as d}from"./index-CDzDnyJW.js";import{L as p}from"./LoadMore-BIjeTH4T.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-BPJvc5GU.js";import"./ethers-w2AslR0v.js";import"./intl-CBcMB1D2.js";const r=24;function N(){m({title:t("nav.myFavorites"),noindex:!0});const a=l(e=>Object.values(e.items)),[i,o]=n.useState(r);return a.length===0?s.jsxs("div",{className:"favorites-empty",children:[s.jsx("span",{className:"ico ico-heart favorites-empty__ico","aria-hidden":!0}),s.jsx("p",{className:"favorites-empty__title",children:t("myFavorites.emptyTitle")}),s.jsx("p",{className:"muted",children:t("myFavorites.emptyBody")}),s.jsx(c,{className:"btn btn--purple",to:"/assets",children:t("notFound.cta")})]}):s.jsxs("section",{className:"favorites",children:[s.jsxs("div",{className:"favorites__head",children:[s.jsx("h1",{children:t("nav.myFavorites")}),s.jsx("span",{className:"favorites__count",children:t("myFavorites.itemCount",{count:a.length})})]}),s.jsx("div",{className:"grid",children:a.slice(0,i).map(e=>s.jsx(d,{item:e},e.id))}),s.jsx(p,{hasNextPage:i<a.length,isFetching:!1,onLoadMore:()=>o(e=>e+r)})]})}export{N as MyFavorites};
@@ -1 +0,0 @@
1
- import{j as s,L as h}from"./react-yytiy0wi.js";import{a as l,t as r,d as o,e as p,g as x,C as _,h as j}from"./index-CDzDnyJW.js";import{L as N}from"./LoadMore-BIjeTH4T.js";import{u as y}from"./useInfiniteGrid-gL0KJ-yb.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-BPJvc5GU.js";import"./ethers-w2AslR0v.js";import"./intl-CBcMB1D2.js";const g=24;function f(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function P({status:e}){return e==="PENDING"?s.jsx("span",{className:"purchase__badge purchase__badge--pending",children:r("myPurchases.processing")}):s.jsx("span",{className:"purchase__badge purchase__badge--done",children:r("myPurchases.completed")})}function v({purchase:e}){const{data:a}=x({queryKey:["trade-display",e.tradeId],queryFn:()=>j(e.tradeId),enabled:!!e.tradeId,staleTime:3e5}),c=(a==null?void 0:a.name)??r("myPurchases.itemFallback"),m=(a==null?void 0:a.thumbnail)??"",i=(a==null?void 0:a.tokenId)??(a==null?void 0:a.itemId)??"",d=a!=null&&a.contractAddress&&i?`/item/${a.contractAddress}/${i}`:void 0,n=s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"purchase__thumb",children:m?s.jsx("img",{src:m,alt:c}):null}),s.jsxs("div",{className:"purchase__info",children:[s.jsx("div",{className:"purchase__name",title:c,children:c}),s.jsx("div",{className:"muted purchase__date",children:f(e.createdAt)})]}),s.jsx(P,{status:e.status}),s.jsxs("div",{className:"purchase__price",children:[s.jsx(_,{className:"ccy-mark"})," ",e.credits]})]});return d?s.jsx(h,{className:"purchase",to:d,children:n}):s.jsx("div",{className:"purchase",children:n})}function S(){l({title:r("nav.myPurchases"),noindex:!0});const{session:e}=o(),{items:a,isLoading:c,hasNextPage:m,isFetchingNextPage:i,fetchNextPage:d}=y(["purchases",e==null?void 0:e.address],t=>p(e.address,e.identity,{first:g,skip:t}),{enabled:!!e});if(!e)return s.jsxs("div",{className:"purchases-empty",children:[s.jsx("span",{className:"ico ico-cart purchases-empty__ico","aria-hidden":!0}),s.jsx("p",{className:"purchases-empty__title",children:r("myPurchases.signInTitle")}),s.jsx("p",{className:"muted",children:r("myPurchases.signInBody")})]});const n=a.filter(t=>t.status!=="EXPIRED");return!c&&n.length===0?s.jsxs("div",{className:"purchases-empty",children:[s.jsx("span",{className:"ico ico-cart purchases-empty__ico","aria-hidden":!0}),s.jsx("p",{className:"purchases-empty__title",children:r("myPurchases.emptyTitle")}),s.jsx("p",{className:"muted",children:r("myPurchases.emptyBody")}),s.jsx(h,{className:"btn btn--purple",to:"/assets",children:r("notFound.cta")})]}):s.jsxs("section",{className:"purchases",children:[s.jsxs("div",{className:"purchases__head",children:[s.jsx("h1",{children:r("nav.myPurchases")}),c?null:s.jsx("span",{className:"purchases__count",children:r("myPurchases.orderCount",{count:n.length})})]}),s.jsx("div",{className:"purchases__list",children:c?Array.from({length:4}).map((t,u)=>s.jsx("div",{className:"purchase purchase--skeleton"},u)):s.jsxs(s.Fragment,{children:[n.map(t=>s.jsx(v,{purchase:t},t.id)),i?Array.from({length:2}).map((t,u)=>s.jsx("div",{className:"purchase purchase--skeleton"},`m-${u}`)):null]})}),s.jsx(N,{hasNextPage:m,isFetching:i,onLoadMore:()=>void d()})]})}export{S as MyPurchases};
@@ -1 +0,0 @@
1
- import{j as t,L as n}from"./react-yytiy0wi.js";import{a as s,t as o}from"./index-CDzDnyJW.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-BPJvc5GU.js";import"./ethers-w2AslR0v.js";import"./intl-CBcMB1D2.js";function c(){return s({title:o("seo.notFound.title"),noindex:!0}),t.jsxs("div",{className:"notfound",children:[t.jsx("span",{className:"ico ico-cart notfound__ico","aria-hidden":!0}),t.jsx("h1",{className:"notfound__title",children:o("notFound.title")}),t.jsx("p",{className:"muted",children:o("notFound.body")}),t.jsx(n,{className:"btn btn--purple",to:"/assets",children:o("notFound.cta")})]})}export{c as NotFound,c as default};
@@ -1 +0,0 @@
1
- .spinner-box{display:flex;align-items:center;justify-content:center;gap:12px;color:var(--muted)}.spinner-box--row{flex-direction:row}.spinner-box--column{flex-direction:column;text-align:center}.spinner-box__label{font-size:14px;font-weight:600}.spinner-box__ring{flex:none;border-radius:50%;border-style:solid;border-color:var(--line);border-top-color:var(--accent);animation:spin .8s linear infinite}.spinner-box__ring--small{width:18px;height:18px;border-width:2px}.spinner-box__ring--medium{width:30px;height:30px;border-width:3px}.spinner-box__ring--large{width:48px;height:48px;border-width:4px}@media(prefers-reduced-motion:reduce){.spinner-box__ring{animation-duration:2s}}.store-settings{max-width:640px;margin:0 auto;padding:8px 0 48px;display:flex;flex-direction:column;gap:20px}.store-settings--signin{min-height:60vh;align-items:center;justify-content:center;text-align:center;gap:12px}.store-settings__signin-btn{align-self:center;min-width:200px;margin-top:8px}.store-settings__head{display:flex;align-items:baseline;justify-content:space-between;gap:16px;flex-wrap:wrap}.store-settings__heading{display:flex;align-items:center;gap:10px}.store-settings__back{display:flex;align-items:center;justify-content:center;color:var(--text);transition:color .15s linear}.store-settings__back:hover{color:var(--accent)}.store-settings__back .ico{width:22px;height:22px}.store-settings__title{font-size:24px;font-weight:800}.store-settings__guest{display:inline-flex;align-items:center;gap:6px;color:var(--accent);font-weight:700;font-size:14px;text-decoration:none}.store-settings__guest:hover{text-decoration:underline}.store-settings__guest .ico{width:15px;height:15px}.store-settings .field__label{font-weight:700;color:var(--text)}.store-settings textarea{background:#fff;border:1px solid var(--line-strong);border-radius:8px;padding:10px 12px;color:var(--text);font:inherit;resize:vertical;min-height:88px}.field__prefixed{display:flex;align-items:stretch;border:1px solid var(--line-strong);border-radius:8px;overflow:hidden;background:#fff}.field__prefix{display:flex;align-items:center;padding:0 10px;background:#0000000a;color:var(--muted);font-size:13px;white-space:nowrap;border-right:1px solid var(--line-strong)}.field__prefixed input{border:0!important;border-radius:0!important;flex:1;min-width:0}.cover-picker{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:12px}.cover-picker__tile{position:relative;padding:0;border:2px solid var(--line-strong);border-radius:var(--radius-card);overflow:hidden;aspect-ratio:16 / 9;background:var(--media, #f0eef2);cursor:pointer}.cover-picker__tile img{width:100%;height:100%;object-fit:cover;display:block}.cover-picker__tile.is-selected{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent)}.cover-picker__tile.is-selected:after{content:"✓";position:absolute;top:6px;right:6px;width:22px;height:22px;display:grid;place-items:center;border-radius:50%;background:var(--accent);color:#fff;font-size:13px;font-weight:700}.cover-picker__upload{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;border-style:dashed;color:var(--muted);font-size:13px;font-weight:700;background:#fff}.cover-picker__upload .ico{width:22px;height:22px;background:var(--muted)}.cover-picker__upload:hover{border-color:var(--accent);color:var(--accent)}.cover-picker__upload:hover .ico{background:var(--accent)}.cover-picker__input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.store-settings__actions{display:flex;justify-content:flex-end;gap:12px;margin-top:8px}.store-settings__save{min-width:180px}.store-settings__loading{padding:64px 0}@media(max-width:768px){.store-settings__actions .btn{width:100%}.cover-picker{grid-template-columns:repeat(auto-fill,minmax(120px,1fr))}}