@dcl/shop 0.1.0-29584116670.commit-7b991d9 → 0.1.0-29588647657.commit-2cc8158

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 (217) hide show
  1. package/assets/{AnimatedBackground-B9Pw1kge.js → AnimatedBackground-urlvv1u-.js} +3 -3
  2. package/assets/Assets-Bgol1TFW.js +1 -0
  3. package/assets/Cart-BLK0NtgY.js +1 -0
  4. package/assets/{CircularProgress-BGTYLSVF.js → CircularProgress-CPG7ZOfs.js} +5 -5
  5. package/assets/{Collection-X9hhX-Rz.js → Collection-oY08s2SC.js} +1 -1
  6. package/assets/{ConstantsUtil-BL7ODi4n.js → ConstantsUtil-CCJ0yRd8.js} +1 -1
  7. package/assets/{ContentClient-XY1tEPuy.js → ContentClient-CcNIfFcB.js} +1 -1
  8. package/assets/Creator-Geua9taX.js +1 -0
  9. package/assets/{CssVarsProvider-CxQAolcH.js → CssVarsProvider-CNdYCyi9.js} +3 -3
  10. package/assets/{DeploymentBuilder-C9YxIsXI.js → DeploymentBuilder-DOqh7sYP.js} +1 -1
  11. package/assets/{ExchangeController-BPeo8fj3.js → ExchangeController-BnfYxF48.js} +1 -1
  12. package/assets/GetCredits-COdRHzqV.js +1 -0
  13. package/assets/{HelpersUtil-DUakraTi.js → HelpersUtil-C5w2ExFs.js} +1 -1
  14. package/assets/{ImportListings-8eKbca2b.js → ImportListings-B-zcLoS1.js} +1 -1
  15. package/assets/ItemDetail-BEVnVvI_.js +2 -0
  16. package/assets/ItemDetail-BMi8a81V.css +1 -0
  17. package/assets/{LoadMore-Borbhtjd.js → LoadMore-CiZkVzux.js} +1 -1
  18. package/assets/MarketCheckout-k3hh1fMb.js +1 -0
  19. package/assets/{MyAssets-C9v-DUMQ.js → MyAssets-CtamOoiB.js} +1 -1
  20. package/assets/{MyFavorites-Di5_hT1d.js → MyFavorites-DB_RHGeZ.js} +1 -1
  21. package/assets/{MyPurchases-qrWgZ9ZY.js → MyPurchases-DLo5AL4P.js} +1 -1
  22. package/assets/{NetworkUtil-bxmjbsdp.js → NetworkUtil-Yv-DdqEo.js} +1 -1
  23. package/assets/NotFound-CALTSbn3.js +1 -0
  24. package/assets/{StoreSettings-Cle2P_Dp.js → StoreSettings-IyPLWce9.js} +1 -1
  25. package/assets/{Success-CdecfFR-.js → Success-CPrrgz5q.js} +1 -1
  26. package/assets/{SwapController-D31BIXvU.js → SwapController-CUPcRb3X.js} +1 -1
  27. package/assets/{TradeService-VoevqRD7.js → TradeService-DE_CcjPe.js} +1 -1
  28. package/assets/{W3MFrameProviderSingleton-C3ngIw23.js → W3MFrameProviderSingleton-KZXDtdeN.js} +3 -3
  29. package/assets/{WebCryptoP256-DKJaSk24.js → WebCryptoP256-CmfR3sjC.js} +1 -1
  30. package/assets/{basic-ZT38cLV3.js → basic-CrYMfATs.js} +1 -1
  31. package/assets/{biconomy-A8N4_tES.js → biconomy-CHSrNezt.js} +1 -1
  32. package/assets/{browser-7Z6Tx7yC.js → browser-L8b8z1bK.js} +1 -1
  33. package/assets/browser-ponyfill-Cl4XgbUp.js +1 -0
  34. package/assets/{browser-ponyfill-C_hn4Jen.js → browser-ponyfill-jziBOMa-.js} +1 -1
  35. package/assets/{buy-DCyi2TCj.js → buy-C_OnDZx3.js} +1 -1
  36. package/assets/{buy-gasless-CgSRLXqb.js → buy-gasless-uH5qu5A8.js} +1 -1
  37. package/assets/cart-checkout-DJSPllz1.js +1 -0
  38. package/assets/{categories-CAhRovwN.js → categories-Dqa3M8i7.js} +1 -1
  39. package/assets/{ccip-f8kMMqoC.js → ccip-CYomOMLt.js} +1 -1
  40. package/assets/{ccip-C3eSvUSX.js → ccip-h7KPERy4.js} +1 -1
  41. package/assets/{chains-D4mXFh-0.js → chains-sL9nr1ux.js} +1 -1
  42. package/assets/{collection-mQvOrKnG.js → collection-DOsbvafd.js} +1 -1
  43. package/assets/{common-Bq3lgphe.js → common-Dyx8k-hp.js} +1 -1
  44. package/assets/{controller-Bo7JkTt3.js → controller-KHxYFosg.js} +2 -2
  45. package/assets/{core-DSbh2F_2.js → core-pBN9FKMw.js} +4 -4
  46. package/assets/{custom-DCy5VCfZ.js → custom-CEHsyFlW.js} +1 -1
  47. package/assets/{data-capture-CaGo1PxF.js → data-capture-BSdkL8U7.js} +1 -1
  48. package/assets/{decimals-4fS10X_L.js → decimals-BA-bLcGh.js} +1 -1
  49. package/assets/decimals-CwI_mnkm.js +1 -0
  50. package/assets/{detectExtension-BE4V-7e-.js → detectExtension-G5UH8a-M.js} +1 -1
  51. package/assets/{email-BGxNiLrQ.js → email-BMkLtjTu.js} +1 -1
  52. package/assets/{embedded-wallet-DfdKfc0a.js → embedded-wallet-CMLY6maG.js} +1 -1
  53. package/assets/emotion-styled.browser.esm-Bcg9MXM8.js +1 -0
  54. package/assets/{engine-BaNurLKk.js → engine-ZKKEGTTG.js} +1 -1
  55. package/assets/{estimate-l1-fee-CDwQNanq.js → estimate-l1-fee-XHZSoWjk.js} +1 -1
  56. package/assets/eth_estimateGas-Bq7UQHDY.js +1 -0
  57. package/assets/{eth_getStorageAt-B2TJaBLZ.js → eth_getStorageAt-DEYLIJ2f.js} +1 -1
  58. package/assets/eth_getTransactionCount-sK45qAke.js +1 -0
  59. package/assets/{ethereum-dj4CvyL9.js → ethereum-gQdvRN4F.js} +1 -1
  60. package/assets/{ethers-BZNCwGB1.js → ethers-DArfy-QF.js} +1 -1
  61. package/assets/{extractIPFS-MFYkzgfw.js → extractIPFS-BTNSHVMw.js} +1 -1
  62. package/assets/{features-BVZ7jwMo.js → features-jLiVGuCn.js} +1 -1
  63. package/assets/{fetchTokenMetadata-Df-8ebIh.js → fetchTokenMetadata-CLRXW5Ae.js} +2 -2
  64. package/assets/{fortmatic-udOxQk4J.js → fortmatic-BAdaY-Dp.js} +1 -1
  65. package/assets/get-ecosystem-wallet-info-HaXmkjKB.js +1 -0
  66. package/assets/{getBalance-CiOU_KSA.js → getBalance-D85PcSgJ.js} +2 -2
  67. package/assets/{getInstalledModules-CK2r6Us9.js → getInstalledModules-BbkWCUI_.js} +1 -1
  68. package/assets/{getNFT-CsrwIavu.js → getNFT-Ba-KxS5w.js} +1 -1
  69. package/assets/{getNFT-uxrgnO16.js → getNFT-CpSdZEPv.js} +2 -2
  70. package/assets/{getOverlayAlpha-DIkhrJTf.js → getOverlayAlpha-CPeU_wtJ.js} +1 -1
  71. package/assets/{hashTypedData-D7G_pwf8.js → hashTypedData-BiAfRLxc.js} +1 -1
  72. package/assets/{hashTypedData-BeKO9Gph.js → hashTypedData-_My6_zHk.js} +1 -1
  73. package/assets/{import-w6IYTyx9.js → import-BM47oMM1.js} +1 -1
  74. package/assets/{in-app-wallet-calls-BmNgoKoi.js → in-app-wallet-calls-DB4mrEuh.js} +1 -1
  75. package/assets/{index-D5kLlKQU.js → index-0YKOyKsz.js} +1 -1
  76. package/assets/{index-aZDU5Fi_.js → index-1w11c9kT.js} +1 -1
  77. package/assets/{index-Ci9R2pAr.js → index-2lgRM28O.js} +1 -1
  78. package/assets/{index-DjnVWlwG.js → index-57pYnjcK.js} +1 -1
  79. package/assets/{index-Bp3ufdYu.js → index-7a1mhp_I.js} +1 -1
  80. package/assets/{index-Csqh-gdI.js → index-B1e1ZADY.js} +1 -1
  81. package/assets/{index-DpbmEoKi.js → index-B4HZUf7-.js} +1 -1
  82. package/assets/{index-7ugDLFZa.js → index-B9Xqc0Hi.js} +2 -2
  83. package/assets/index-BAYW-Y7J.css +1 -0
  84. package/assets/{index-D2PwoM0f.js → index-BE03Fup7.js} +1 -1
  85. package/assets/{index-0_Q-5Yph.js → index-BNhDGSX8.js} +1 -1
  86. package/assets/{index-DitpCD_h.js → index-BQzrms9Y.js} +1 -1
  87. package/assets/{index-BnfRTjdt.js → index-BS31iF_T.js} +2 -2
  88. package/assets/{index-o7U3KUfn.js → index-BUYyFeCt.js} +2 -2
  89. package/assets/{index-CzJC68I6.js → index-BY2ihj74.js} +1 -1
  90. package/assets/{index-DxQ4Zi7k.js → index-BhW68dt9.js} +1 -1
  91. package/assets/{index-BkvyQrui.js → index-Bi6W-t7S.js} +1 -1
  92. package/assets/{index-Z5yFLCBO.js → index-Bs2u8R9P.js} +1 -1
  93. package/assets/{index-ZLecI7pg.js → index-BseAK0jv.js} +1 -1
  94. package/assets/{index-DJd0Ttfu.js → index-BvJT7BsV.js} +1 -1
  95. package/assets/{index-NtR9tB0O.js → index-BvrUtN1i.js} +1 -1
  96. package/assets/{index-C7pz3G7b.js → index-Bwj5NrhW.js} +1 -1
  97. package/assets/{index-BxwA4vLu.js → index-C-GvP7Ri.js} +1 -1
  98. package/assets/{index-CBmf80G9.js → index-C-uQhIOu.js} +3 -3
  99. package/assets/{index-DQ2RZxO2.js → index-C0OEAd0W.js} +1 -1
  100. package/assets/{index-goOeCklY.js → index-C1L7bhks.js} +1 -1
  101. package/assets/{index-C1wLfrk8.js → index-C6Uar8kN.js} +1 -1
  102. package/assets/{index-DWYIiSc1.js → index-C8L1dg3z.js} +1 -1
  103. package/assets/{index-_MXYcG3h.js → index-CFasXWsQ.js} +1 -1
  104. package/assets/{index-mpn87Y1d.js → index-CGf6vfVT.js} +1 -1
  105. package/assets/index-CIiavQLK.js +1 -0
  106. package/assets/{index-E-7ReSrK.js → index-COd6Hpl3.js} +1 -1
  107. package/assets/{index-Dxs_0mDk.js → index-COmrTRgF.js} +1 -1
  108. package/assets/{index-B2VBWa02.js → index-CRWbHzp3.js} +1 -1
  109. package/assets/{index-VtK5IfsQ.js → index-CSy-_M5R.js} +1 -1
  110. package/assets/{index-kaNpKyjd.js → index-CWkyddUj.js} +1 -1
  111. package/assets/{index-W4B_IWIP.js → index-CYWpV70P.js} +37 -37
  112. package/assets/{index-ge5YPyFz.js → index-Ct5KJb97.js} +1 -1
  113. package/assets/{index-OBTfAbI2.js → index-D8XdtECa.js} +1 -1
  114. package/assets/{index-C0w8Y7Pr.js → index-D8bR8hF2.js} +1 -1
  115. package/assets/{index-BMwA__hl.js → index-DMLSNnyb.js} +1 -1
  116. package/assets/{index-D32umKam.js → index-DMU6YRL7.js} +1 -1
  117. package/assets/{index-B54Zm0IT.js → index-DMWWvHVt.js} +1 -1
  118. package/assets/{index-CiMPT_Ro.js → index-DPAyBtUP.js} +1 -1
  119. package/assets/{index-C_QZ68es.js → index-DUwiQnps.js} +1 -1
  120. package/assets/{index-C0cRipMv.js → index-DWVC6kWx.js} +1 -1
  121. package/assets/{index-FLQXl_Se.js → index-DYJHRYX4.js} +2 -2
  122. package/assets/{index-DEFc7rHy.js → index-Df8J_8ta.js} +3 -3
  123. package/assets/{index-Ds4wBJ9D.js → index-DhmytMhG.js} +1 -1
  124. package/assets/{index-DzzaizOc.js → index-Dih2AmlD.js} +1 -1
  125. package/assets/{index-fQoyXaDm.js → index-DqO1kUFU.js} +1 -1
  126. package/assets/{index-CPz55u4g.js → index-Dy65iyWb.js} +1 -1
  127. package/assets/{index-Dk1_26DS.js → index-Ncc_A7mr.js} +1 -1
  128. package/assets/{index-kcVdtF2N.js → index-T4DqOE4M.js} +1 -1
  129. package/assets/{index-DZeAExGv.js → index-X5dRqFqG.js} +1 -1
  130. package/assets/{index-D8CfAsn6.js → index-XztZBEgs.js} +3 -3
  131. package/assets/{index-DvCjqrZB.js → index-eL578oJV.js} +1 -1
  132. package/assets/{index-ByU7K3c5.js → index-fGWdBWqW.js} +1 -1
  133. package/assets/{index-D-2T01Jr.js → index-fJZF9Wlt.js} +1 -1
  134. package/assets/{index-BY0majDU.js → index-gt71uI0K.js} +1 -1
  135. package/assets/{index-CiID_KCu.js → index-oExJUWSQ.js} +1 -1
  136. package/assets/{index-DHF4L8Ec.js → index-pOWOYTZf.js} +1 -1
  137. package/assets/{index-Cq0eRfqs.js → index-sFssfP96.js} +1 -1
  138. package/assets/{index-HirbVXiG.js → index-wsdLqN_j.js} +2 -2
  139. package/assets/{index-DF7PMIfD.js → index-xVgoxgG9.js} +1 -1
  140. package/assets/{index.es-C2HPR15G.js → index.es-CAdXWwOm.js} +4 -4
  141. package/assets/{index.es-CJCMJluv.js → index.es-CiB5ifZN.js} +1 -1
  142. package/assets/{index.es-KdBFnvI-.js → index.es-CsD1tXVc.js} +1 -1
  143. package/assets/{localBatchGatewayRequest-o3WN89Be.js → localBatchGatewayRequest--Sv8eIOm.js} +1 -1
  144. package/assets/{mana-rate-brJZyjav.js → mana-rate-DgCtJ5pM.js} +1 -1
  145. package/assets/{native-BS4RJIkv.js → native-DBJATukw.js} +1 -1
  146. package/assets/network-DRGleXEI.js +1 -0
  147. package/assets/{networks-DhDaelkG.js → networks-BqVCrj8Y.js} +1 -1
  148. package/assets/{onramp-DPhEOHlt.js → onramp-CBfgz1Ty.js} +1 -1
  149. package/assets/{openzeppelin-BlzaCD2g.js → openzeppelin-D2z1DmVV.js} +1 -1
  150. package/assets/{ownerOf-FaMMoQLm.js → ownerOf-DFlcEy6_.js} +1 -1
  151. package/assets/{parseNft-D4_DbJgc.js → parseNft-msnZvn_A.js} +2 -2
  152. package/assets/{parseSignature-CP7LKJ4p.js → parseSignature-CjbZVQR3.js} +1 -1
  153. package/assets/{parseSignature-lw07DHDL.js → parseSignature-DEAl-96W.js} +3 -3
  154. package/assets/{pay-with-exchange-CBQcsvWb.js → pay-with-exchange-CRwxKD_d.js} +1 -1
  155. package/assets/{payments-DJNklmWA.js → payments-CFEkq9jj.js} +1 -1
  156. package/assets/{qr-overlay-BhLZ2pHm.js → qr-overlay-CS6qAFtp.js} +3 -3
  157. package/assets/{react-BMZSDQJw.js → react-yytiy0wi.js} +1 -1
  158. package/assets/{receive-BOuIH1ov.js → receive-D_7ieG-4.js} +1 -1
  159. package/assets/{resolveImplementation-CedBj6Km.js → resolveImplementation-BxK03jeA.js} +1 -1
  160. package/assets/{rpc-SuxnpJNf.js → rpc-Cd5PGlK-.js} +1 -1
  161. package/assets/{secp256k1-DUCs4Szw.js → secp256k1-BDhwR6SH.js} +1 -1
  162. package/assets/{secp256k1-DGcDefMZ.js → secp256k1-D5XG5Cq2.js} +1 -1
  163. package/assets/{secp256k1-Bp72qBlb.js → secp256k1-D_53A2qu.js} +1 -1
  164. package/assets/{send-Cc73qyEa.js → send--YozeJBn.js} +1 -1
  165. package/assets/{send-batch-transaction-CqMxMLal.js → send-batch-transaction-DiGyQeR5.js} +1 -1
  166. package/assets/{send-eip712-transaction-Ba7gc6Na.js → send-eip712-transaction-Dqu8RfN0.js} +2 -2
  167. package/assets/{send-gasless-transaction-Bkq9RgVC.js → send-gasless-transaction-B5uz3mX0.js} +2 -2
  168. package/assets/{sendRawTransaction-jimkH_Vk.js → sendRawTransaction-rRmixG-d.js} +3 -3
  169. package/assets/{serializeTransaction-B4_qo8zw.js → serializeTransaction-CzGG2kBz.js} +1 -1
  170. package/assets/{session-proposal-OqodD00Z.js → session-proposal-CCHvDJo0.js} +1 -1
  171. package/assets/{session-request-X9CJVkkE.js → session-request-BkhA5-RY.js} +2 -2
  172. package/assets/{sha256-BbyKZ-d_.js → sha256-Bt6mLy1E.js} +1 -1
  173. package/assets/{signing-CyLHhd-P.js → signing-BwuIt3X5.js} +5 -5
  174. package/assets/{socials-LFY_yxPF.js → socials-BStKssws.js} +1 -1
  175. package/assets/{swaps-BdY-zWwk.js → swaps-Bid0ju8o.js} +1 -1
  176. package/assets/{thirdweb-BR0EhpSm.js → thirdweb-BMJ7fr_N.js} +3 -3
  177. package/assets/{totalSupply-B_MUJcfB.js → totalSupply--8jNML7t.js} +1 -1
  178. package/assets/{trade-encoding-BOT9-UWu.js → trade-encoding-Drnx1u3j.js} +1 -1
  179. package/assets/{transactionReceipt-D4B3HzeC.js → transactionReceipt-C1w204dJ.js} +1 -1
  180. package/assets/{transactions-B6cGdLdV.js → transactions-KwvVTP9x.js} +1 -1
  181. package/assets/{useInfiniteGrid-BK47MfTg.js → useInfiniteGrid-BAS-zEte.js} +1 -1
  182. package/assets/useStore-D0Fp5fnX.js +2 -0
  183. package/assets/useTheme-CBsdNYl2.js +1 -0
  184. package/assets/useTheme-DU7pyJai.js +1 -0
  185. package/assets/{utils-DAnGDyuB.js → utils-BDQ8DS2k.js} +1 -1
  186. package/assets/{verifyHash-CnPKc_YI.js → verifyHash-yypMHIUe.js} +1 -1
  187. package/assets/{w3m-modal-DPallRNX.js → w3m-modal-Cf0rHk1f.js} +1 -1
  188. package/assets/{w3m-modal-N4vv62zw.js → w3m-modal-D4BKzcIi.js} +1 -1
  189. package/assets/{wait-for-tx-receipt-D4Q553BP.js → wait-for-tx-receipt-Dq_saZBt.js} +1 -1
  190. package/assets/{wallet-kind-Bio8Yuti.js → wallet-kind-D_7fqJZh.js} +1 -1
  191. package/assets/{wallets-D-H2dLAA.js → wallets-DthYtMmh.js} +6 -6
  192. package/assets/{web-connector-BhqHMVXD.js → web-connector-Cahc_-N0.js} +3 -3
  193. package/assets/{writeContract-sZ9-DuTE.js → writeContract-CYBPanmL.js} +1 -1
  194. package/assets/{zora-sepolia-Jfao6Y6c.js → zora-sepolia-B35hC1NB.js} +1 -1
  195. package/assets/{zoraTestnet-UB0HXnxi.js → zoraTestnet-CupsSsoK.js} +1 -1
  196. package/index.html +8 -8
  197. package/package.json +2 -2
  198. package/assets/Assets-FsQDhPLn.js +0 -1
  199. package/assets/Cart-BezIJz77.js +0 -1
  200. package/assets/Creator-DK5t63LO.js +0 -1
  201. package/assets/GetCredits-X4PI-ku7.js +0 -1
  202. package/assets/ItemDetail-C31uL9qN.css +0 -1
  203. package/assets/ItemDetail-CreYcWa4.js +0 -2
  204. package/assets/NotFound-Co_hmXY9.js +0 -1
  205. package/assets/browser-ponyfill-iWQHRc9C.js +0 -1
  206. package/assets/cart-checkout-Bl-9Rmuy.js +0 -1
  207. package/assets/decimals-DY9F9u4r.js +0 -1
  208. package/assets/emotion-styled.browser.esm-C2X3f31i.js +0 -1
  209. package/assets/eth_estimateGas-DJGaFjHN.js +0 -1
  210. package/assets/eth_getTransactionCount-DH8Lt3om.js +0 -1
  211. package/assets/get-ecosystem-wallet-info-BYGhhdDR.js +0 -1
  212. package/assets/index-BsYYLNpm.js +0 -1
  213. package/assets/index-D2idpE6X.css +0 -1
  214. package/assets/network-DkheBt26.js +0 -1
  215. package/assets/useStore-CgLb6TAk.js +0 -2
  216. package/assets/useTheme-0gLXH6kA.js +0 -1
  217. package/assets/useTheme-BSc7aqCZ.js +0 -1
package/index.html CHANGED
@@ -16,10 +16,10 @@
16
16
  <link rel="canonical" href="https://shop.decentraland.zone/" />
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-29584116670.commit-7b991d9/favicon.ico" sizes="16x16 32x32 48x48" />
20
- <link rel="apple-touch-icon" sizes="180x180" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29584116670.commit-7b991d9/apple-touch-icon.png" />
19
+ <link rel="icon" type="image/x-icon" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29588647657.commit-2cc8158/favicon.ico" sizes="16x16 32x32 48x48" />
20
+ <link rel="apple-touch-icon" sizes="180x180" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29588647657.commit-2cc8158/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-29584116670.commit-7b991d9/site.webmanifest" />
22
+ <link rel="manifest" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29588647657.commit-2cc8158/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-29584116670.commit-7b991d9/sitemap.xml" />
51
+ <link rel="sitemap" type="application/xml" title="Sitemap" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29588647657.commit-2cc8158/sitemap.xml" />
52
52
 
53
53
  <!-- Warm the 3D preview / fonts -->
54
54
  <link rel="preconnect" href="https://fonts.googleapis.com" />
@@ -60,10 +60,10 @@
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-29584116670.commit-7b991d9/assets/index-W4B_IWIP.js"></script>
64
- <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29584116670.commit-7b991d9/assets/react-BMZSDQJw.js">
65
- <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29584116670.commit-7b991d9/assets/ethers-BZNCwGB1.js">
66
- <link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29584116670.commit-7b991d9/assets/index-D2idpE6X.css">
63
+ <script type="module" crossorigin src="https://cdn.decentraland.org/@dcl/shop/0.1.0-29588647657.commit-2cc8158/assets/index-CYWpV70P.js"></script>
64
+ <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29588647657.commit-2cc8158/assets/react-yytiy0wi.js">
65
+ <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29588647657.commit-2cc8158/assets/ethers-DArfy-QF.js">
66
+ <link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29588647657.commit-2cc8158/assets/index-BAYW-Y7J.css">
67
67
  </head>
68
68
  <body>
69
69
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcl/shop",
3
- "version": "0.1.0-29584116670.commit-7b991d9",
3
+ "version": "0.1.0-29588647657.commit-2cc8158",
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": "7b991d9e70020a2daa28e69dfae3b54b41cb1e42"
11
+ "commit": "2cc8158024ae8fd289dd1166907a8bb737adefd2"
12
12
  }
@@ -1 +0,0 @@
1
- import{u as xe,r as i,j as e,a as be}from"./react-BMZSDQJw.js";import{b as ye,e as V,a as je,a2 as ge,h as re,a3 as L,C as w,l as D,a4 as ve,i as K,d as Ne,m as Ce,a5 as ke,t as P,k as H,a6 as J,A as X,a7 as we}from"./index-W4B_IWIP.js";import{r as Se,a as Y,m as Ie}from"./mana-rate-brJZyjav.js";import{S as Z,C as Me,R as Ee,F as Pe,a as ee,b as Fe}from"./categories-CAhRovwN.js";import{L as Re}from"./LoadMore-Borbhtjd.js";import{b as ae}from"./buy-DCyi2TCj.js";import{g as Ae,b as Le,w as qe,S as We,G as Te}from"./buy-gasless-CgSRLXqb.js";import{u as Oe}from"./useInfiniteGrid-BK47MfTg.js";import"./ethers-BZNCwGB1.js";import"./index-ge5YPyFz.js";import"./trade-encoding-BOT9-UWu.js";function Ue(){return ye({queryKey:["mana-rate",V.chainId],queryFn:()=>Se(V.chainId),staleTime:6e4,refetchInterval:6e4,retry:1})}function se(s){const o=s,u=(o.message??"").toLowerCase();return o.code===4001||u.includes("reject")||u.includes("denied")||u.includes("cancel")?"You cancelled the request.":u.includes("insufficient")?`Not enough ${K.name} — get more first.`:u.includes("not found")||u.includes("no active listing")||u.includes("404")?"This item was just sold or removed. Refreshing the market…":u.includes("your own listing")?"You can't buy your own listing.":"Couldn't complete checkout — please try again."}function $e(s){return{id:s.tradeId,tradeId:s.tradeId,name:s.name,creator:s.creator,contractAddress:s.contractAddress,itemId:s.itemId,category:s.category,wearableCategory:s.wearableCategory??void 0,rarity:s.rarity,network:s.network,chainId:s.chainId,thumbnail:s.thumbnail,priceCredits:0,gender:null,isSmart:!1}}function Be({listing:s,rate:o,onClose:u,onSold:N}){const{session:n}=je(),{data:c,isError:F}=ge(n),_=re(),R=xe(),[C,y]=i.useState("confirm"),[j,S]=i.useState("Locking today’s price…"),[g,I]=i.useState(null),[r,B]=i.useState(null),d=i.useRef(null),k=Math.ceil(Y(s.manaWei,o)/10);i.useEffect(()=>{let x=!1;if(!n){y("error"),I("Sign in to check out.");return}return(async()=>{try{const t=await Ne(s.tradeId);if(!t)throw new Error("not found");if(Ce(t,n.address))throw new Error("You can't buy your own listing.");const m=Y(s.manaWei,o);if(!Number.isFinite(m)||m<=0)throw new Error("price unavailable");const{credit:E,maxCreditedValue:b,usdCents:q}=await ke(n.identity,m,s.tradeId);if(x){L(n.identity,[E.id]).catch(()=>{});return}d.current=E.id,B({trade:t,credit:E,maxCreditedValue:b,usdCents:q,credits:Math.ceil(q/10)}),S("")}catch(t){if(x)return;console.error("[market] authorize failed",t),P(J(t)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:H(t),value_usd:Math.round(Y(s.manaWei,o))/100}),y("error"),I(se(t))}})(),()=>{x=!0,d.current&&n&&(L(n.identity,[d.current]).catch(()=>{}),d.current=null)}},[]);const M=!!r&&c!=null&&c.credits<r.credits;async function A(){if(!n||!r)return;if(M){P("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:r.credits,credits_balance:(c==null?void 0:c.credits)??0,shortfall:Math.max(0,r.credits-((c==null?void 0:c.credits)??0))}),L(n.identity,[r.credit.id]).catch(()=>{}),d.current=null,R("/credits");return}y("working"),I(null);let x=!1;try{S("Confirming your purchase…");const p={trade:r.trade,buyer:n.address,signer:n.signer,credits:[r.credit],maxCreditedValue:r.maxCreditedValue};let t;if(Ae())try{t=await Le(p),await qe(t),x=!0}catch(m){if(m instanceof We)x=!0;else if(m instanceof Te)t=await ae(p);else throw m}else t=await ae(p);d.current=null,P("Shop Completed Purchase",{items:[{item_id:s.itemId??null,contract_address:s.contractAddress,token_id:null,price_usd:r.usdCents/100}],value_credits:r.credits,value_usd:r.usdCents/100,purchase_type:"item",is_primary:!0,payment_type:"credits",no_crypto_step:x,transaction_hash:t??null}),_.invalidateQueries({queryKey:["usd-balance"]}),R("/success",{state:{items:[$e(s)],txHash:t}})}catch(p){console.error("[market] buy now failed",p),L(n.identity,[r.credit.id]).catch(()=>{}),d.current=null,P(J(p)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:H(p),value_usd:r.usdCents/100}),_.invalidateQueries({queryKey:["usd-balance"]});const t=se(p);I(t),y("error"),/sold or removed/i.test(t)&&N()}}function f(){n&&r&&L(n.identity,[r.credit.id]).catch(()=>{}),d.current=null,u()}const h=C==="working";return e.jsxs("div",{className:"mkt-modal",role:"dialog","aria-modal":"true","aria-label":`Buy ${s.name}`,children:[e.jsx("div",{className:"mkt-modal__scrim",onClick:h?void 0:f,"aria-hidden":!0}),e.jsxs("div",{className:"mkt-modal__card",children:[e.jsxs("div",{className:"mkt-modal__head",children:[e.jsx("div",{className:"mkt-modal__thumb",children:s.thumbnail?e.jsx("img",{src:s.thumbnail,alt:""}):null}),e.jsxs("div",{children:[e.jsx("div",{className:"mkt-modal__name",title:s.name,children:s.name||"Item"}),e.jsx("span",{className:"chip chip--rarity",children:s.rarity})]})]}),e.jsx("div",{className:"mkt-modal__price",children:r?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mkt-modal__price-label",children:"Final price"}),e.jsxs("div",{className:"mkt-modal__price-value",children:[e.jsx(w,{className:"mkt-modal__diamond"}),D(r.credits)]}),e.jsxs("div",{className:"mkt-modal__price-sub muted",children:["Locked for this purchase · $",(r.usdCents/100).toFixed(2)]})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mkt-modal__price-label",children:"Today’s price"}),e.jsxs("div",{className:"mkt-modal__price-value mkt-modal__price-value--approx",children:[e.jsx("span",{className:"mkt-modal__approx","aria-hidden":!0,children:"≈"}),e.jsx(w,{className:"mkt-modal__diamond"}),D(k)]}),e.jsx("div",{className:"mkt-modal__price-sub muted",children:j||"Locking today’s price…"})]})}),n?e.jsxs("div",{className:"mkt-modal__balance muted",children:["Your balance: ",e.jsx(w,{className:"ccy-mark"})," ",ve(c,F)]}):null,M?e.jsxs("p",{className:"muted mkt-modal__note",children:["You’ll need a few more ",K.name," to buy this."]}):null,j&&C==="working"?e.jsx("p",{className:"muted mkt-modal__note",children:j}):null,g?e.jsx("p",{className:"error mkt-modal__note",children:g}):null,e.jsxs("div",{className:"mkt-modal__actions",children:[e.jsx("button",{className:"btn btn--ghost",onClick:f,disabled:h,children:"Cancel"}),e.jsx("button",{className:"btn btn--purple",onClick:()=>void A(),disabled:h||!r,children:h?"Buying…":M?`Get ${K.name}`:"Confirm purchase"})]})]})]})}const Ge=48,v=1e5;function Ye(s){return{tradeId:s.tradeId??s.id,listingType:"primary",contractAddress:s.contractAddress,itemId:s.itemId??"",name:s.name,thumbnail:s.thumbnail,rarity:s.rarity,category:s.category,wearableCategory:s.wearableCategory??null,creator:s.creator,manaWei:s.manaWei??"0",available:1,network:s.network,chainId:s.chainId,createdAt:0}}function sa(){const[s]=be(),o=(s.get("q")??"").trim().toLowerCase(),u=re(),[N,n]=i.useState("wearable"),[c,F]=i.useState(null),[_,R]=i.useState([]),[C,y]=i.useState(""),[j,S]=i.useState(""),[g,I]=i.useState("newest"),[r,B]=i.useState(!1),[d,k]=i.useState(!1),[M,A]=i.useState(null);i.useEffect(()=>{if(!d)return;const a=l=>{l.key==="Escape"&&k(!1)};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[d]);const f=C&&!Number.isNaN(Number(C))?Number(C):void 0,h=j&&!Number.isNaN(Number(j))?Number(j):void 0,x=c?Fe[c]:void 0,p=(Z.find(a=>a.key===g)??Z[0]).server,t={category:N,rarities:_.length?_:void 0,wearableCategories:x,minPriceCredits:f,maxPriceCredits:h,search:o||void 0,sortBy:p},{items:m,total:E,isLoading:b,error:q,hasNextPage:te,isFetchingNextPage:Q,fetchNextPage:ie}=Oe(["unified-listings",t],a=>we({...t,first:Ge,skip:a})),W=E,{data:T,isError:ne}=Ue(),ce=a=>T&&a.manaWei?Ie(a.manaWei,T):null,z=i.useRef(null);i.useEffect(()=>{b||!o||z.current===o||(z.current=o,P("Shop Searched",{query:o,result_count:W}))},[o,b,W]);const O=i.useRef("__init__");i.useEffect(()=>{if(b)return;const a=JSON.stringify({category:N,subCategory:c,rarities:_,min:f,max:h,sort:g});if(O.current==="__init__"||O.current===a){O.current=a;return}O.current=a,P("Shop Applied Filter",{filters:{category:N,sub_category:c,rarities:_,min_price_credits:f??null,max_price_credits:h??null,sort:g},result_count:W})},[N,c,_,f,h,g,b,W]);function le(a){n(a),F(null)}function oe(a){R(l=>l.includes(a)?l.filter(G=>G!==a):[...l,a])}function de(){n("wearable"),F(null),R([]),y(""),S("")}function ue(a){const l=m.find(G=>G.id===a.id);l&&l.source==="legacy"&&l.manaWei&&A(Ye(l))}function me(){u.invalidateQueries({queryKey:["unified-listings"]})}const U=f!=null?Math.min(f,v):0,$=h!=null?Math.min(h,v):v,he=U/v*100,pe=$/v*100;function _e(a){const l=Math.min(a,$);y(l<=0?"":String(l))}function fe(a){const l=Math.max(a,U);S(l>=v?"":String(l))}return e.jsxs("div",{className:"browse browse--sidebar",children:[d?e.jsx("div",{className:"browse__scrim",onClick:()=>k(!1),"aria-hidden":!0}):null,e.jsxs("aside",{className:`browse__sidebar${d?" is-open":""}`,children:[e.jsxs("div",{className:"browse__sidebar-head",children:[e.jsx("span",{className:"browse__sidebar-title",children:"Filters"}),e.jsx("button",{className:"browse__sidebar-close",onClick:()=>k(!1),"aria-label":"Close filters",children:"✕"})]}),e.jsx("div",{className:"sidebar__section-label",children:"Category"}),e.jsx(Me,{category:N,subCategory:c,onCategory:le,onSub:F}),e.jsx("div",{className:"sidebar__divider"}),e.jsx("div",{className:"sidebar__section-label",children:"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:"Min"}),e.jsxs("span",{className:"price-filter__box",children:[e.jsx(w,{className:"price-filter__coin"}),e.jsx("input",{type:"number",min:"0","aria-label":"Minimum price",placeholder:"0",value:C,onChange:a=>y(a.target.value)})]})]}),e.jsx("span",{className:"price-filter__to",children:"to"}),e.jsxs("label",{className:"price-filter__field",children:[e.jsx("span",{className:"price-filter__field-label",children:"Max"}),e.jsxs("span",{className:"price-filter__box",children:[e.jsx(w,{className:"price-filter__coin"}),e.jsx("input",{type:"number",min:"0","aria-label":"Maximum price",placeholder:"0",value:j,onChange:a=>S(a.target.value)})]})]})]}),e.jsxs("div",{className:"price-filter__slider",style:{"--min-pct":`${he}%`,"--max-pct":`${pe}%`},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:v,value:U,"aria-label":"Minimum price slider",onChange:a=>_e(Number(a.target.value))}),e.jsx("input",{type:"range",min:0,max:v,value:$,"aria-label":"Maximum price slider",onChange:a=>fe(Number(a.target.value))})]}),e.jsxs("div",{className:"price-filter__range",children:[e.jsxs("span",{className:"price-filter__range-val",children:[e.jsx(w,{className:"price-filter__coin"}),U.toLocaleString()]}),e.jsxs("span",{className:"price-filter__range-val",children:[e.jsx(w,{className:"price-filter__coin"}),$.toLocaleString()]})]})]}),e.jsx("div",{className:"sidebar__divider"}),e.jsxs("button",{type:"button",className:"sidebar__section-toggle","aria-expanded":r,onClick:()=>B(a=>!a),children:[e.jsx("span",{className:"sidebar__section-label",children:"Rarity"}),e.jsx("span",{className:`ico ico-chevron sidebar__section-chev${r?" is-up":""}`,"aria-hidden":!0})]}),r?e.jsx("div",{className:"rarity-filter",children:Ee.map(a=>e.jsxs("label",{className:`rarity-filter__check${_.includes(a)?" is-on":""}`,children:[e.jsx("input",{type:"checkbox",checked:_.includes(a),onChange:()=>oe(a)}),e.jsx("span",{children:a})]},a))}):null,e.jsxs("div",{className:"browse__sidebar-foot",children:[e.jsx("button",{type:"button",className:"browse__clear",onClick:de,children:"Clear Filters"}),e.jsx("button",{type:"button",className:"browse__apply",onClick:()=>k(!1),children:"Apply"})]})]}),e.jsxs("div",{className:"browse__main",children:[e.jsx(Pe,{sort:g,onSort:I,total:E,loading:b,query:o,onOpenFilters:()=>k(!0)}),ne&&m.some(a=>a.source==="legacy")?e.jsx("p",{className:"market-banner market-banner--warn",children:"Some market prices are temporarily unavailable — buying those items is paused for a moment. Please try again shortly."}):null,q?e.jsx("p",{className:"error",children:"Couldn’t load items — please try again."}):null,e.jsx("div",{className:"grid",children:b?e.jsx(ee,{count:15}):e.jsxs(e.Fragment,{children:[m.map(a=>a.source==="legacy"?e.jsx(X,{item:a,mode:"market",marketPriceCredits:ce(a),onBuyNow:ue},a.id):e.jsx(X,{item:a},a.id)),Q?e.jsx(ee,{count:6}):null]})}),e.jsx(Re,{hasNextPage:te,isFetching:Q,onLoadMore:()=>void ie()}),!b&&m.length===0?e.jsx("p",{className:"muted",children:"No items match your filters."}):null]}),M&&T?e.jsx(Be,{listing:M,rate:T,onClose:()=>A(null),onSold:()=>{A(null),me()}}):null]})}export{sa as Assets};
@@ -1 +0,0 @@
1
- import{j as e,u as be,b as xe,r as b,L as je}from"./react-BMZSDQJw.js";import{C as v,ae as R,af as N,a as fe,b as ke,a2 as ge,h as Ne,o as Y,ag as ve,A as Ce,t as F,ah as se,ai as we,j as B,e as Se,i as Me,a5 as Pe,a3 as ae,aj as Le,a6 as te,k as Ee,ak as Ie}from"./index-W4B_IWIP.js";import{a as ce}from"./buy-DCyi2TCj.js";import{g as Be,a as Re,w as Te,S as We,G as Ae}from"./buy-gasless-CgSRLXqb.js";import{R as q,r as Fe}from"./cart-checkout-Bl-9Rmuy.js";import{c as qe,C as Ue}from"./payments-DJNklmWA.js";import"./ethers-BZNCwGB1.js";import"./trade-encoding-BOT9-UWu.js";import"./index-ge5YPyFz.js";function $e(a){const{phase:c,balanceCredits:d,onClose:l}=a,C=c==="processing",i=c!=="complete",P=c==="nofunds"?"Buy Credits and Items":"Buy Assets",h=c==="processing";return e.jsxs("div",{className:"buy-modal",role:"dialog","aria-modal":"true","aria-label":"Check out your cart",children:[e.jsx("div",{className:"buy-modal__scrim",onClick:C?void 0:l,"aria-hidden":!0}),e.jsxs("div",{className:`buy-modal__card${h?" 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:l,"aria-label":"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:c==="nofunds"?"DCL Balance:":"My Credits Balance:"}),e.jsx(v,{className:"buy-modal__balance-ico"}),e.jsx("span",{className:"buy-modal__balance-value",children:R(d)})]})]}),c==="processing"&&e.jsx(ze,{step:a.step??1,total:a.total??1}),c==="nofunds"&&e.jsx(Ke,{lines:a.lines??[],shortfallCredits:a.shortfallCredits??0,packs:a.packs??[],selectedPack:a.selectedPack??"",onSelectPack:a.onSelectPack??(()=>{}),onBuyPacks:a.onBuyPacks??(()=>{}),onCancel:l}),c==="complete"&&e.jsx(Ye,{purchased:a.purchased??[],onMyAssets:a.onMyAssets??l,onTryInWorld:a.onTryInWorld??l}),c==="error"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsx("p",{className:"buy-modal__error",children:a.message}),e.jsx("div",{className:"buy-modal__ctas",children:e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient",onClick:l,children:"Close"})})]})]})]})}function ze({step:a,total:c}){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:"Completing transaction…"}),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:[a,"/",c]})]})]})}function Ke({lines:a,shortfallCredits:c,packs:d,selectedPack:l,onSelectPack:C,onBuyPacks:i,onCancel:P}){const h=d.find(n=>n.id===l);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:"Insufficient Funds."})," You will need to buy ",e.jsxs("b",{children:[Math.max(0,c)," Credits"]})," to purchase",a.length===1?" this item.":" these items."]})]}),e.jsx("div",{className:"cart-checkout__scroll",children:a.map(n=>e.jsxs("div",{className:"buy-modal__asset",children:[e.jsx("div",{className:"buy-modal__asset-thumb",children:n.item.thumbnail?e.jsx("img",{src:n.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:n.item.name,children:n.item.name||"Item"}),n.item.creator?e.jsxs("div",{className:"buy-modal__asset-creator",children:["By ",n.item.creator]}):null]}),e.jsxs("div",{className:"buy-modal__asset-price",children:[e.jsx(v,{className:"buy-modal__asset-price-ico"}),e.jsx("span",{children:R(n.priceCredits)})]})]})]},n.item.id))}),e.jsx("div",{className:"buy-modal__packs",children:d.map(n=>{const w=n.id===l;return e.jsxs("button",{className:`buy-modal__pack${w?" buy-modal__pack--on":""}`,onClick:()=>C(n.id),children:[e.jsx(v,{className:"buy-modal__pack-ico"}),e.jsx("span",{className:"buy-modal__pack-amount",children:R(n.credits)}),e.jsxs("span",{className:"buy-modal__pack-usd",children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),e.jsxs("div",{className:"buy-modal__total",children:[e.jsxs("div",{className:"buy-modal__total-credits",children:[e.jsx(v,{className:"buy-modal__total-ico"}),e.jsx("span",{children:R((h==null?void 0:h.credits)??0)})]}),e.jsxs("span",{className:"buy-modal__total-usd",children:["$",((h==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:P,children:"Cancel"}),e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient",onClick:i,children:"Buy"})]})]})}function Ye({purchased:a,onMyAssets:c,onTryInWorld:d}){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:"Your purchase was successful!"})," You can find your item in the My Assets tab."]})]}),e.jsx("div",{className:"cart-checkout__done",children:e.jsx("div",{className:"cart-checkout__done-scroll",children:a.map(l=>e.jsxs("div",{className:"cart-checkout__done-row",children:[e.jsxs("div",{className:"cart-checkout__done-thumb",children:[l.thumbnail?e.jsx("img",{src:l.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:l.name,children:l.name||"Item"}),l.creator?e.jsxs("div",{className:"cart-checkout__done-creator",children:["By ",l.creator]}):null]}),e.jsxs("div",{className:"cart-checkout__done-price",children:[e.jsx(v,{className:"cart-checkout__done-price-ico"}),e.jsx("span",{children:R(l.priceCredits)})]})]},l.id))})}),e.jsxs("div",{className:"buy-modal__ctas",children:[e.jsx("button",{className:"buy-modal__btn buy-modal__btn--outline",onClick:c,children:"My assets"}),e.jsxs("button",{className:"buy-modal__btn buy-modal__btn--ruby",onClick:d,children:["Try in world",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 re(a){const c=a,d=(c.message??"").toLowerCase();return c.code===4001||d.includes("reject")||d.includes("denied")||d.includes("cancel")?"You cancelled the request.":d.includes("insufficient")?`You don't have enough ${Me.name} — get more first.`:d.includes("no active listing")||d.includes("your own listing")?c.message:"Couldn't complete checkout — please try again."}function Qe(a){const c=a;return c.code===402||c.status===402||(c.message??"").toLowerCase().includes("insufficient")}const Oe=12e4,U=Ue.slice(0,3),Ge=Se.chainId===80002?"https://decentraland.zone/jump":"https://decentraland.org/jump";function De(a){const c=[];return a.unavailable.length&&c.push(`${a.unavailable.length} no longer available`),a.own.length&&c.push(`${a.own.length} you can't buy (your own listing)`),`Removed ${c.join(" and ")} from your cart.`}function cs(){const a=N(s=>s.items),c=N(s=>s.remove),d=N(s=>s.clear),l=N(s=>s.restore),C=N(s=>s.setFittingOpen),{session:i}=fe(),P=a.some(s=>s.category!=="emote"),{data:h}=ke({queryKey:["upsell-listings"],queryFn:()=>Ie({first:40}),staleTime:6e4}),{data:n}=ge(i),w=Ne(),T=be(),{state:S}=xe(),[Q,L]=b.useState(null),[O,f]=b.useState(null),[G,W]=b.useState(null),[ne,M]=b.useState(!1),[y,E]=b.useState(null),D=b.useRef(0),[o,k]=b.useState(null),[$,J]=b.useState(""),ie=a.reduce((s,t)=>s+t.priceCredits,0),le=y?y.liveTotalCredits:ie,oe=new Set(a.map(s=>s.id)),V=((h==null?void 0:h.items)??[]).filter(s=>!oe.has(s.id)).slice(0,6),de=new Map(y==null?void 0:y.buyable.map(s=>[s.item.id,s])),A=(n==null?void 0:n.credits)??0,ue=we;function H(s){s(),E(null),W(null),f(null)}function he(){k(null),M(!1)}function X(s){const t=s.reduce((x,u)=>x+u.priceCredits,0),r=Math.max(0,t-A),p=U.find(x=>x.credits>=r)??U[U.length-1];J(p.id),F("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:t,credits_balance:A,shortfall:r}),k({phase:"nofunds",lines:s.map(x=>({item:x.item,priceCredits:x.priceCredits})),shortfall:r}),M(!1)}async function me(s){if(!i||s.length===0)return;const t=s.map(u=>({...u.item,priceCredits:u.priceCredits})),r=[];let p="authorize",x=!1;k({phase:"processing",step:1,total:s.length});try{const u=[];for(let m=0;m<s.length;m++){const g=s[m];k({phase:"processing",step:m+1,total:s.length});try{const{credit:_,maxCreditedValue:K}=await Pe(i.identity,g.usdCents,g.trade.id);r.push(_.id),u.push({trade:g.trade,credits:[_],maxCreditedValue:K})}catch(_){if(Qe(_)){if(r.length){try{await ae(i.identity,r)}catch(K){B(K,{flow:"cart_checkout",step:"release"})}w.invalidateQueries({queryKey:["usd-balance"]})}X(s);return}throw _}}p="submit";let j=[];if(Be())try{j=await Re({purchases:u,buyer:i.address,signer:i.signer});const g=(await Promise.allSettled(j.map(_=>Te(_)))).flatMap(_=>_.status==="rejected"?[_.reason]:[]);if(g.length&&!g.some(_=>_ instanceof We))throw g[0];x=!0}catch(m){if(!(m instanceof Ae))throw m;j=await ce({purchases:u,buyer:i.address,signer:i.signer})}else j=await ce({purchases:u,buyer:i.address,signer:i.signer});s.forEach(m=>c(m.item.id)),E(null),F("Shop Completed Purchase",{...Le(t),payment_type:"credits",no_crypto_step:x,transaction_hash:j[0]??null}),w.invalidateQueries({queryKey:["usd-balance"]}),k({phase:"complete",purchased:t})}catch(u){if(te(u)||B(u,{flow:"cart_checkout",step:p,cart_size:s.length}),F(te(u)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:p,error_code:Ee(u),value_usd:se(t.reduce((j,m)=>j+m.priceCredits,0)),cart_size:s.length}),r.length){try{await ae(i.identity,r)}catch(j){B(j,{flow:"cart_checkout",step:"release"})}w.invalidateQueries({queryKey:["usd-balance"]})}k({phase:"error",message:re(u)})}}function Z(s){const t=s.reduce((r,p)=>r+p.priceCredits,0);if(n!=null&&n.credits<t){X(s);return}me(s)}async function z(){if(!i){f("Sign in to check out.");return}const s=N.getState().items;if(s.length!==0){f(null),W(null),M(!0),F("Shop Started Checkout",{cart_size:s.length,cart_value_credits:s.reduce((t,r)=>t+r.priceCredits,0),cart_value_usd:se(s.reduce((t,r)=>t+r.priceCredits,0)),has_sufficient_credits:A>=s.reduce((t,r)=>t+r.priceCredits,0)});try{L("Reviewing your cart…");const t=await Fe(s,i.address,ue),r=[...t.unavailable,...t.own];if(r.length&&(r.forEach(p=>c(p.id)),W(De(t))),t.buyable.length===0){f("None of these items are available to buy right now."),E(null),L(null);return}if(t.orderChanged){E(t),D.current=Date.now(),L(null);return}L(null),Z(t.buyable)}catch(t){B(t,{flow:"cart_checkout",step:"review",cart_size:s.length}),f(re(t)),L(null)}finally{M(!1)}}}async function _e(){if(y){if(!i){f("Sign in to check out.");return}if(Date.now()-D.current>Oe){E(null),W(null),await z();return}f(null),Z(y.buyable)}}async function pe(){if($){try{sessionStorage.setItem(q,JSON.stringify(N.getState().items))}catch{}M(!0);try{const s=await qe($,i?{address:i.address,identity:i.identity}:void 0);if(s.url){window.location.href=s.url;return}T("/credits")}catch(s){try{sessionStorage.removeItem(q)}catch{}B(s,{flow:"cart_buy_credits"}),k({phase:"error",message:"Couldn't start the credits checkout — please try again."})}finally{M(!1)}}}const ee=b.useRef(!1);b.useEffect(()=>{if(!(S!=null&&S.resumeCheckout)||ee.current)return;ee.current=!0;try{const t=sessionStorage.getItem(q);if(t){sessionStorage.removeItem(q);const r=JSON.parse(t);Array.isArray(r)&&r.length&&l(r)}}catch{}w.invalidateQueries({queryKey:["usd-balance"]});const s=setTimeout(()=>void z(),0);return()=>clearTimeout(s)},[S==null?void 0:S.resumeCheckout]);const I=ne||(o==null?void 0:o.phase)==="processing";if(a.length===0&&!o)return 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:Y("cart.empty.title")}),e.jsx("p",{className:"muted",children:Y("cart.empty.body")}),e.jsx(je,{className:"btn btn--purple",to:"/assets",children:Y("cart.empty.cta")})]});const ye=a.length===1?"Item":"Items";return e.jsxs("div",{className:"checkout",children:[e.jsxs("button",{className:"checkout__back",onClick:()=>T(-1),type:"button",children:[e.jsx("span",{className:"ico ico-arrow-left","aria-hidden":!0}),"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:()=>T(-1),type:"button","aria-label":"Go back",children:e.jsx("span",{className:"ico ico-arrow-left","aria-hidden":!0})}),e.jsxs("h1",{className:"checkout__panel-title",children:["Cart: ",a.length," ",ye]}),P?e.jsxs("button",{className:"checkout__fitting",onClick:()=>C(!0),disabled:I,children:[e.jsx("span",{className:"ico ico-emote-dance checkout__fitting-ico","aria-hidden":!0}),"Fitting Room"]}):null]}),e.jsx("div",{className:"checkout__list",children:a.map(s=>{const t=de.get(s.id),r=t?t.priceCredits:s.priceCredits,p=!!t&&t.priceCredits!==s.priceCredits;return e.jsxs("div",{className:"checkout__card",children:[e.jsxs("div",{className:"checkout__thumb",children:[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:[e.jsx("div",{className:"checkout__name",title:s.name,children:s.name}),s.creator?e.jsx(ve,{address:s.creator,className:"checkout__creator",linkToProfile:!0}):null]}),e.jsxs("div",{className:"checkout__foot",children:[e.jsxs("span",{className:"checkout__qty","aria-label":"Quantity: 1",children:[e.jsx("span",{className:"checkout__qty-sign","aria-hidden":!0,children:"−"}),e.jsx("span",{className:"checkout__qty-num",children:"1"}),e.jsx("span",{className:"checkout__qty-sign","aria-hidden":!0,children:"+"})]}),e.jsxs("div",{className:"checkout__price",children:[e.jsx(v,{className:"checkout__price-ico"})," ",r,p?e.jsx("span",{className:"checkout__price-was",children:s.priceCredits}):null]})]})]}),e.jsx("button",{className:"checkout__remove",onClick:()=>H(()=>c(s.id)),disabled:I,"aria-label":`Remove ${s.name}`,title:"Remove",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:()=>H(d),disabled:I,children:"Clear cart"}),null]})]}),e.jsxs("aside",{className:"checkout__summary",children:[e.jsx("h2",{className:"checkout__summary-title",children:"Purchase Summary"}),e.jsxs("div",{className:"checkout__summary-body",children:[e.jsxs("div",{className:"checkout__total-line",children:[e.jsxs("span",{className:"checkout__total-label",children:["Total: ",a.length," ",a.length===1?"item":"items"]}),e.jsxs("span",{className:"checkout__total-value",children:[e.jsx(v,{className:"checkout__total-ico"})," ",le]})]}),e.jsx("button",{className:"checkout__cta",onClick:y?_e:z,disabled:I,children:I?"Working…":y?"Confirm purchase":"Buy now"}),y?e.jsx("p",{className:"muted checkout__msg",children:"Prices or availability changed since you added these — review the updated total and confirm to buy."}):null,G?e.jsx("p",{className:"muted checkout__msg",children:G}):null,Q?e.jsx("p",{className:"muted checkout__msg",children:Q}):null,O?e.jsx("p",{className:"error checkout__msg",children:O}):null]})]})]}),V.length>0?e.jsxs("section",{className:"row cart-upsell",children:[e.jsx("div",{className:"row__head",children:e.jsx("h2",{className:"row__title",children:"You might also like"})}),e.jsx("div",{className:"row__track",children:V.map(s=>e.jsx(Ce,{item:s},s.id))})]}):null,o?e.jsx($e,{phase:o.phase,balanceCredits:A,onClose:he,step:o.phase==="processing"?o.step:void 0,total:o.phase==="processing"?o.total:void 0,lines:o.phase==="nofunds"?o.lines:void 0,shortfallCredits:o.phase==="nofunds"?o.shortfall:void 0,packs:U,selectedPack:$,onSelectPack:J,onBuyPacks:pe,purchased:o.phase==="complete"?o.purchased:void 0,onMyAssets:()=>T("/assets?tab=mine"),onTryInWorld:()=>window.open(Ge,"_blank","noopener"),message:o.phase==="error"?o.message:void 0}):null]})}export{cs as Cart};
@@ -1 +0,0 @@
1
- import{u as I,j as e,L as ee,d as ae,a as se,r as p}from"./react-BMZSDQJw.js";import{as as re,at as te,ag as oe,o,au as $,x as U,a as ce,e as le,i as ne,A as ie,ak as de,av as me}from"./index-W4B_IWIP.js";import{s as K,d as ue,g as he,a as ge,A as xe}from"./collection-mQvOrKnG.js";import{u as _e,L as Ne}from"./useStore-CgLb6TAk.js";import{S as R,C as je,a as w,F as pe,c as be,b as fe}from"./categories-CAhRovwN.js";import{L as T}from"./LoadMore-Borbhtjd.js";import{u as B}from"./useInfiniteGrid-BK47MfTg.js";import"./ethers-BZNCwGB1.js";function ve({collection:r,cover:a,itemCount:t}){const n=I(),{contractAddress:m,name:N,creator:g}=r,j=a==null||t==null,{data:i}=re(m,j),_=a==null?(i==null?void 0:i.items)??[]:[],h=t??(i==null?void 0:i.total);function x(){n(`/collection/${m}`)}return e.jsxs("article",{className:"coll-card",role:"link",tabIndex:0,onClick:x,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),x())},children:[e.jsx("div",{className:"coll-card__media",children:a?e.jsx("img",{className:"coll-card__img",src:a,alt:"",loading:"lazy"}):_.length>0?e.jsx(te,{items:_,className:"coll-card__cover"}):null}),e.jsxs("div",{className:"coll-card__body",children:[e.jsx("h3",{className:"coll-card__name",title:N,children:N}),e.jsxs("div",{className:"coll-card__meta",children:[g?e.jsx(oe,{address:g,className:"coll-card__creator",linkToProfile:!0}):e.jsx("span",{className:"coll-card__creator",children:" "}),e.jsx("span",{className:"coll-card__count",children:h==null?"…":o("collectionCard.itemCount",{count:h})})]}),e.jsx("button",{className:"coll-card__view",onClick:d=>{d.stopPropagation(),x()},tabIndex:-1,children:o("collectionCard.viewCollection")})]})]})}function Ce({address:r,className:a=""}){const t=$(m=>m.followed.includes(r.toLowerCase())),n=$(m=>m.toggle);return r?e.jsx("button",{type:"button",className:`btn btn--sm ${t?"btn--ghost":"btn--outline"} ${a}`.trim(),"aria-pressed":t,title:t?o("creator.unfollowTitle"):o("creator.followTitle"),onClick:()=>n(r),children:t?o("creator.following"):o("creator.follow")}):null}const we={website:"ico-website",twitter:"ico-twitter",discord:"ico-discord",facebook:"ico-facebook"};function ke({address:r}){var d,b;const{data:a}=U(r),{data:t}=_e(r),n=ce(l=>{var f;return(f=l.session)==null?void 0:f.address}),m=!!n&&n.toLowerCase()===r.toLowerCase(),N=(a==null?void 0:a.name)||K(r),g=(b=(d=a==null?void 0:a.avatar)==null?void 0:d.snapshots)==null?void 0:b.face256,j=(t==null?void 0:t.cover)||ue,i=t==null?void 0:t.description,_=`${le.profileUrl}/${r}`,h=Ne.filter(l=>t==null?void 0:t.links[l]),x=he(ge({name:a==null?void 0:a.name,hasClaimedName:a==null?void 0:a.hasClaimedName,ethAddress:(a==null?void 0:a.ethAddress)??r}));return e.jsxs("section",{className:"creator-hero","aria-label":`${N} storefront`,children:[e.jsxs("div",{className:"creator-hero__cover",children:[e.jsx("img",{className:"creator-hero__cover-img",src:j,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:(t==null?void 0:t.links[l])??"",target:"_blank",rel:"noopener noreferrer",title:o(`creator.link.${l}`),"aria-label":o(`creator.link.${l}`),children:e.jsx("span",{className:`ico ${we[l]}`,"aria-hidden":!0})},l)),m&&e.jsx(ee,{className:"creator-hero__link creator-hero__edit",to:"/store-settings",title:o("creator.editStore"),"aria-label":o("creator.editStore"),children:e.jsx("span",{className:"ico ico-pen","aria-hidden":!0})})]}),e.jsxs("div",{className:"creator-hero__body",children:[g?e.jsx("img",{className:"creator-hero__ava",src:g,alt:"",loading:"eager",style:{backgroundColor:x}}):e.jsx("span",{className:"creator-hero__ava creator-hero__ava--ph","aria-hidden":!0,style:{backgroundColor:x}}),e.jsxs("div",{children:[e.jsx("h2",{className:"creator-hero__name",children:N}),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:_,target:"_blank",rel:"noopener noreferrer",children:o("creator.viewProfile")}),e.jsx(Ce,{address:r,className:"creator-hero__follow"})]})]})]})}const E=48;function Re(){const{address:r}=ae(),a=I(),[t]=se(),n=t.has("collections"),{data:m}=U(r),N=(m==null?void 0:m.name)||(r?K(r):o("creator.fallbackName")),[g,j]=p.useState("wearable"),[i,_]=p.useState(null),[h,x]=p.useState([]),[d,b]=p.useState(""),[l,f]=p.useState(""),[P,D]=p.useState("newest"),S=d&&!Number.isNaN(Number(d))?Number(d):void 0,y=l&&!Number.isNaN(Number(l))?Number(l):void 0,O=i?fe[i]:void 0,G=(R.find(s=>s.key===P)??R[0]).server,L={creator:r,category:g,rarities:h.length?h:void 0,wearableCategories:O,minPriceCredits:S,maxPriceCredits:y,sortBy:G},{items:v,total:Y,isLoading:C,error:A,hasNextPage:z,isFetchingNextPage:F,fetchNextPage:H}=B(["creator-listings",L],s=>de({...L,first:E,skip:s}),{enabled:!!r&&!n}),u=B(["creator-collections",r],s=>me(r,{first:E,skip:s}).then(c=>({items:c.collections,total:c.total})),{enabled:!!r&&n});function W(s){j(s),_(null),n&&M()}function M(){const s=new URLSearchParams(t);s.delete("collections");const c=s.toString();a({search:c?`?${c}`:""},{replace:!0})}function Z(){if(n){M();return}const s=new URLSearchParams(t);s.delete("collections");const c=s.toString();a({search:c?`?${c}&collections`:"?collections"},{replace:!0})}function q(s){x(c=>c.includes(s)?c.filter(X=>X!==s):[...c,s])}function J(){j("wearable"),_(null),x([]),b(""),f("")}const k=!!(S||y),Q=k?`${d||"0"}–${l||"∞"}`:o("filter.price"),V=g!=="wearable"||!!i||h.length>0||k;return e.jsxs("div",{className:"collection-page",children:[e.jsxs("nav",{className:"collection-page__crumbs","aria-label":"Breadcrumb",children:[e.jsx("button",{className:"collection-page__crumb-link",onClick:()=>a("/assets"),children:o("creator.breadcrumb")}),e.jsx("span",{className:"collection-page__crumb-sep",children:"/"}),e.jsx("span",{className:"collection-page__crumb-current",children:N})]}),r?e.jsx(ke,{address:r}):null,!n&&!C&&v.length>0?e.jsx(xe,{items:v,source:"creator"}):null,e.jsxs("div",{className:"browse browse--sidebar",children:[e.jsx("aside",{className:"browse__sidebar",children:e.jsx(je,{category:g,subCategory:i,onCategory:W,onSub:_,title:o("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?"…":o("creator.collectionsCount",{count:u.total})})}),u.error?e.jsx("p",{className:"error",children:o("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(ve,{collection:s,itemCount:s.itemCount},s.contractAddress)),u.isFetchingNextPage?e.jsx(w,{count:6}):null]})}),e.jsx(T,{hasNextPage:u.hasNextPage,isFetching:u.isFetchingNextPage,onLoadMore:()=>void u.fetchNextPage()}),!u.isLoading&&!u.error&&u.items.length===0?e.jsx("p",{className:"muted",children:o("creator.collectionsEmpty")}):null]}):e.jsxs(e.Fragment,{children:[e.jsx(pe,{rarities:h,onToggleRarity:q,sort:P,onSort:D,total:Y,loading:C,anyActive:V,onClear:J,renderTrailing:s=>e.jsx(be,{panelKey:"price",label:Q,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":"Minimum price",placeholder:"Min",value:d,onChange:c=>b(c.target.value)}),e.jsx("span",{children:"–"}),e.jsx("input",{type:"number",min:"0","aria-label":"Maximum price",placeholder:"Max",value:l,onChange:c=>f(c.target.value)})]}),e.jsxs("p",{className:"filter-pop__hint",children:["Price in ",ne.name]})]})})}),A?e.jsx("p",{className:"error",children:o("creator.error")}):null,e.jsx("div",{className:"grid",children:C?e.jsx(w,{count:15}):e.jsxs(e.Fragment,{children:[v.map(s=>e.jsx(ie,{item:s},s.id)),F?e.jsx(w,{count:6}):null]})}),e.jsx(T,{hasNextPage:z,isFetching:F,onLoadMore:()=>void H()}),!C&&!A&&v.length===0?e.jsx("p",{className:"muted",children:o("creator.empty")}):null]})})]})]})}export{Re as Creator,Re as default};
@@ -1 +0,0 @@
1
- import{u as K,a as q,r as n,j as e}from"./react-BMZSDQJw.js";import{a as Q,h as z,t as p,i,j as $,k as G,C as k,l as F}from"./index-W4B_IWIP.js";import{R as Y}from"./resume-buy-Bf0zIH7y.js";import{R as J}from"./cart-checkout-Bl-9Rmuy.js";import{p as L,c as O,i as H,C as W}from"./payments-DJNklmWA.js";import{C as I}from"./CircularProgress-BGTYLSVF.js";import"./ethers-BZNCwGB1.js";const f=H()?"mock":"stripe";function A(c){const s=c;if((s==null?void 0:s.name)==="AbortError")return"You cancelled the request.";const o=((s==null?void 0:s.message)??"").toLowerCase();return o.includes("sign in")?`Sign in to get ${i.name}.`:o.includes("timed out")?`This is taking longer than usual — your ${i.name} will appear shortly.`:"Couldn't complete your purchase — please try again."}function le(){const c=K(),{session:s,signIn:o}=Q(),_=z(),[u,x]=q(),[h,l]=n.useState("select"),[a,S]=n.useState(null),[j,w]=n.useState(null),[T,P]=n.useState(null),[M,g]=n.useState(null),[U,N]=n.useState(!1),C=n.useRef(null);n.useEffect(()=>()=>{var t;return(t=C.current)==null?void 0:t.abort()},[]);const E=n.useCallback(()=>{x(t=>{const r=new URLSearchParams(t);return r.delete("order"),r.delete("canceled"),r},{replace:!0})},[x]),b=n.useCallback(async t=>{l("processing");const r=new AbortController;C.current=r;try{const m=await L(t,{signal:r.signal,address:s==null?void 0:s.address,identity:s==null?void 0:s.identity});if(m.status==="credited"){P(m.creditsGranted??(a==null?void 0:a.credits)??0),l("success"),p("Shop Completed Buy Credits",{order_id:t,pack_usd:(a==null?void 0:a.usd)??null,credits:m.creditsGranted??(a==null?void 0:a.credits)??0,provider:f}),_.invalidateQueries({queryKey:["usd-balance"]});try{if(sessionStorage.getItem(J)){c("/cart",{state:{resumeCheckout:!0}});return}}catch{}try{const R=sessionStorage.getItem(Y);if(R){sessionStorage.removeItem(Y);const d=JSON.parse(R),B=(d==null?void 0:d.tokenId)??(d==null?void 0:d.itemId);if(d!=null&&d.contractAddress&&B){c(`/item/${d.contractAddress}/${B}`,{state:{item:d,resumeBuy:!0}});return}}}catch{}}else m.status==="pending"?(p("Shop Buy Credits Pending",{step:"grant",pack_usd:(a==null?void 0:a.usd)??null}),_.invalidateQueries({queryKey:["usd-balance"]}),l("pending")):(p("Shop Buy Credits Failed",{step:"grant",error_code:"grant_failed",pack_usd:(a==null?void 0:a.usd)??null}),g(m.error??`Couldn't add your ${i.name} — please try again.`),l("error"))}catch(m){$(m,{flow:"get_credits",step:"grant",order_id:t}),p("Shop Buy Credits Failed",{step:"grant",error_code:G(m),pack_usd:(a==null?void 0:a.usd)??null}),g(A(m)),l("error")}},[a,s,_]),V=n.useCallback(async t=>{if(!s){o();return}g(null),N(!1),S(t),l("paying"),p("Shop Started Buy Credits",{pack_usd:t.usd,credits:t.credits,provider:f});try{const r=await O(t.id,{address:s.address,identity:s.identity});if(r.mock)w(r);else if(r.url)p("Shop Redirected To Stripe",{order_id:r.orderId,pack_usd:t.usd,credits:t.credits}),window.location.href=r.url;else throw new Error("Checkout did not return a redirect url")}catch(r){$(r,{flow:"get_credits",step:"checkout",provider:f}),p("Shop Buy Credits Failed",{step:"checkout",error_code:G(r),pack_usd:t.usd}),g(A(r)),l("error")}},[s,o]),D=n.useCallback(()=>{j&&b(j.orderId)},[j,b]),v=n.useRef(!1);n.useEffect(()=>{if(v.current)return;const t=u.get("order");if(u.get("canceled")!=null){v.current=!0,p("Shop Buy Credits Cancelled",{order_id:t,provider:f}),E(),N(!0),l("select");return}t&&(l("processing"),s&&(v.current=!0,E(),b(t)))},[u,s]);function y(){var t;(t=C.current)==null||t.abort(),l("select"),S(null),w(null),P(null),g(null),N(!1)}return e.jsxs("div",{className:"getcredits",children:[e.jsxs("header",{className:"getcredits__head",children:[e.jsxs("h1",{className:"getcredits__title",children:["Get ",i.name]}),e.jsxs("p",{className:"muted",children:["Add ",i.name," to your account to shop. Pay with any card."]})]}),s?e.jsxs(e.Fragment,{children:[h==="select"&&e.jsxs(e.Fragment,{children:[U&&e.jsx("p",{className:"getcredits__note muted",role:"status",children:"Payment canceled — no charge was made. Pick a pack whenever you’re ready."}),e.jsx(X,{onSelect:t=>void V(t)})]}),h==="paying"&&a&&e.jsx(Z,{pack:a,checkout:j,onPaid:D,onCancel:y}),h==="processing"&&e.jsxs("div",{className:"getcredits__status",role:"status","aria-live":"polite",children:[e.jsx(I,{size:40}),e.jsxs("p",{className:"getcredits__status-title",children:["Adding your ",i.name,"…"]}),e.jsx("p",{className:"muted",children:"Payment received. Just a moment while we top up your balance."})]}),h==="success"&&e.jsxs("div",{className:"getcredits__status getcredits__status--ok",role:"status","aria-live":"polite",children:[e.jsx("div",{className:"getcredits__confetti","aria-hidden":!0,children:"🎉"}),e.jsx("p",{className:"getcredits__status-title",children:"You’re all set!"}),e.jsxs("p",{className:"muted",children:[e.jsxs("strong",{children:[e.jsx(k,{className:"ccy-mark"})," ",T]})," ",i.name," added to your account."]}),e.jsxs("div",{className:"getcredits__status-actions",children:[e.jsx("button",{className:"btn",onClick:()=>c("/cart"),children:"Back to cart"}),e.jsxs("button",{className:"btn btn--ghost",onClick:y,children:["Get more ",i.name]})]})]}),h==="pending"&&e.jsxs("div",{className:"getcredits__status",role:"status","aria-live":"polite",children:[e.jsxs("p",{className:"getcredits__status-title",children:["Your ",i.name," are on the way"]}),e.jsx("p",{className:"muted",children:"Your payment went through. It’s taking a little longer than usual to confirm — your balance will update automatically as soon as it lands, no need to pay again."}),e.jsxs("div",{className:"getcredits__status-actions",children:[e.jsx("button",{className:"btn",onClick:()=>c("/cart"),children:"Back to cart"}),e.jsx("button",{className:"btn btn--ghost",onClick:y,children:"Done"})]})]}),h==="error"&&e.jsxs("div",{className:"getcredits__status getcredits__status--err",role:"alert",children:[e.jsx("p",{className:"getcredits__status-title",children:"Something went wrong"}),e.jsx("p",{className:"error",children:M}),e.jsx("div",{className:"getcredits__status-actions",children:e.jsx("button",{className:"btn",onClick:y,children:"Try again"})})]})]}):e.jsxs("div",{className:"getcredits__status",role:"status",children:[e.jsxs("p",{className:"getcredits__status-title",children:["Sign in to get ",i.name]}),e.jsxs("p",{className:"muted",children:["Connect your account to buy ",i.name," and start shopping."]}),e.jsx("div",{className:"getcredits__status-actions",children:e.jsx("button",{className:"btn btn--purple",onClick:o,children:"Sign in"})})]})]})}function X({onSelect:c}){return e.jsx("div",{className:"packs",children:W.map(s=>e.jsxs("button",{type:"button",className:`pack${s.bestValue?" pack--best":""}`,onClick:()=>c(s),"aria-label":`Get ${F(s.credits)} for $${s.usd}`,children:[s.bestValue&&e.jsx("span",{className:"pack__ribbon",children:"Best value"}),e.jsxs("span",{className:"pack__credits",children:[e.jsx(k,{className:"pack__credits-ico"}),s.credits]}),e.jsx("span",{className:"pack__label",children:i.name}),e.jsxs("span",{className:"pack__price",children:["$",s.usd]}),e.jsxs("span",{className:"pack__cta",children:["Get ",i.name]})]},s.id))})}function Z({pack:c,checkout:s,onPaid:o,onCancel:_}){return e.jsxs("div",{className:"pay",children:[e.jsxs("div",{className:"pay__summary",children:[e.jsx("button",{className:"link",onClick:_,children:"← Choose a different pack"}),e.jsxs("div",{className:"pay__summary-row",children:[e.jsx("span",{children:"You’ll get"}),e.jsxs("strong",{children:[e.jsx(k,{className:"ccy-mark"})," ",F(c.credits)]})]}),e.jsxs("div",{className:"pay__summary-row pay__summary-row--total",children:[e.jsx("span",{children:"You pay"}),e.jsxs("strong",{children:["$",c.usd]})]})]}),e.jsx("div",{className:"pay__form",children:s!=null&&s.mock?e.jsx(ee,{onPaid:o,amountUsd:c.usd}):e.jsxs("div",{className:"getcredits__status",role:"status","aria-live":"polite",children:[e.jsx(I,{size:32}),e.jsx("p",{className:"muted",children:"Getting the payment form ready…"})]})})]})}function ee({onPaid:c,amountUsd:s}){const[o,_]=n.useState("4242 4242 4242 4242"),[u,x]=n.useState(!1);function h(){x(!0),setTimeout(()=>c(),700)}return e.jsxs("div",{className:"card-form","aria-label":"Payment details",children:[e.jsx("p",{className:"muted small card-form__note",children:"Demo mode — no real charge is made."}),e.jsxs("label",{className:"field",children:[e.jsx("span",{children:"Card number"}),e.jsx("input",{value:o,onChange:l=>_(l.target.value),disabled:u,inputMode:"numeric"})]}),e.jsxs("div",{className:"card-form__row",children:[e.jsxs("label",{className:"field",children:[e.jsx("span",{children:"Expiry"}),e.jsx("input",{defaultValue:"12 / 34",disabled:u})]}),e.jsxs("label",{className:"field",children:[e.jsx("span",{children:"CVC"}),e.jsx("input",{defaultValue:"123",disabled:u,inputMode:"numeric"})]})]}),e.jsx("button",{className:"btn btn--purple card-form__pay",onClick:h,disabled:u,children:u?"Processing…":`Pay $${s}`})]})}export{le as GetCredits,le as default};
@@ -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-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__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__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)}.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__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}}.collection-carousel{margin-top:64px}.collection-carousel__head{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.collection-carousel__title{font-size:22px;font-weight:700;color:var(--text)}.collection-carousel__viewall{display:inline-flex;align-items:center;gap:4px;background:none;border:0;padding:0;color:var(--accent);font-weight:700;font-size:13px;letter-spacing:.046em;text-transform:uppercase;cursor:pointer;white-space:nowrap}.collection-carousel__viewall:hover{text-decoration:underline}.collection-carousel__viewall-ico{width:16px;height:16px;transform:rotate(-90deg)}.collection-carousel__viewport{position:relative}.collection-carousel__arrow{position:absolute;top:112px;transform:translateY(-50%);z-index:5;width:53px;height:53px;padding:0;border:0;background:transparent;cursor:pointer;filter:drop-shadow(0 2px 6px rgba(0,0,0,.18));transition:transform .15s ease,filter .15s ease,opacity .15s ease}.collection-carousel__arrow img{display:block;width:100%;height:100%}.collection-carousel__arrow--left{left:-40px}.collection-carousel__arrow--right{right:-40px}.collection-carousel__arrow--left img{transform:scaleX(-1)}.collection-carousel__arrow:hover:not(:disabled){transform:translateY(-50%) scale(1.07)}.collection-carousel__arrow:disabled{opacity:0;pointer-events:none}@media(prefers-reduced-motion:reduce){.collection-carousel__arrow{transition:none}}@media(max-width:900px){.collection-carousel__arrow{display:none}}.collection-carousel__track{display:flex;gap:16px;overflow-x:auto;padding:12px 10px;margin:0 -10px;scroll-snap-type:x proximity;scrollbar-width:none}.collection-carousel__track::-webkit-scrollbar{display:none}.collection-carousel__track>.card{flex:0 0 281px;scroll-snap-align:start}@media(max-width:720px){.collection-carousel__track>.card{flex:0 0 85%}}.collection-carousel__dots{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:18px}.collection-carousel__dot{width:10px;height:10px;border-radius:50%;border:0;padding:0;background:var(--line-strong);opacity:.5;cursor:pointer;transition:opacity .12s ease,background .12s ease,transform .12s ease}.collection-carousel__dot:hover{opacity:.8}.collection-carousel__dot.is-active{background:var(--accent);opacity:1;transform:scale(1.1)}.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-DEFc7rHy.js","assets/react-BMZSDQJw.js","assets/index-W4B_IWIP.js","assets/ethers-BZNCwGB1.js","assets/index-D2idpE6X.css","assets/emotion-styled.browser.esm-C2X3f31i.js","assets/useTheme-BSc7aqCZ.js","assets/CircularProgress-BGTYLSVF.js","assets/index-FLQXl_Se.js","assets/useTheme-0gLXH6kA.js","assets/CssVarsProvider-CxQAolcH.js","assets/getOverlayAlpha-DIkhrJTf.js","assets/index-BMwA__hl.js","assets/colors-LINLm1ux.js"])))=>i.map(i=>d[i]);
2
- import{u as X,r as n,j as e,d as ve,b as je,L as Ne}from"./react-BMZSDQJw.js";import{a as ee,a2 as ge,h as Ce,ai as we,m as ke,n as Ie,a5 as Ae,a3 as Y,t as O,k as ie,a6 as J,aj as Se,j as re,C as T,ae as G,_ as Z,x as Ee,D as Le,z as Pe,aw as Be,W as Te,g as K,e as he,ax as Fe,ay as le,A as Me,af as ne,u as ce,b as D,az as Re,aA as $e,aB as We,aC as qe,aD as Ve,ap as De,aE as Oe,aF as Ke,ag as ze,aG as de,aH as Ue,an as Ye,aI as Ge,aJ as Qe,ao as He,aK as Je}from"./index-W4B_IWIP.js";import{b as oe}from"./buy-DCyi2TCj.js";import{g as Ze,b as Xe,w as es,S as ss,G as as}from"./buy-gasless-CgSRLXqb.js";import{C as ts,c as is}from"./payments-DJNklmWA.js";import{R as ue}from"./resume-buy-Bf0zIH7y.js";import{C as rs}from"./CircularProgress-BGTYLSVF.js";import"./ethers-BZNCwGB1.js";import"./trade-encoding-BOT9-UWu.js";import"./index-ge5YPyFz.js";function me(a){const i=a,t=(i.message??"").toLowerCase();return i.code===4001||t.includes("reject")||t.includes("denied")||t.includes("cancel")?"You cancelled the request.":t.includes("not for sale")||t.includes("not found")||t.includes("404")?"This item was just sold or removed.":t.includes("your own listing")?"You can't buy your own listing.":"Couldn't complete the purchase — please try again."}function ls(a){const i=a;return i.code===402||i.status===402||(i.message??"").toLowerCase().includes("insufficient")}const $=ts.slice(0,3);function ns({item:a,onClose:i,resume:t=!1}){var P,M;const{session:l}=ee(),{data:_}=ge(l),p=Ce(),y=X(),[u,s]=n.useState("loading"),[w,j]=n.useState(null),[f,b]=n.useState(""),[k,v]=n.useState(a.priceCredits),[o,c]=n.useState(null),N=n.useRef(null),C=(o==null?void 0:o.credits)??k,F=(_==null?void 0:_.credits)??0;n.useEffect(()=>{let r=!1;if(!l){s("error"),j("Sign in to check out.");return}const g=m=>{const x=m-((_==null?void 0:_.credits)??0),h=$.find(A=>A.credits>=x)??$[$.length-1];b(h.id),O("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:m,credits_balance:(_==null?void 0:_.credits)??0,shortfall:Math.max(0,x)}),s("nofunds")};return(async()=>{var m,x;try{const h=await we(a);if(!h)throw new Error("not for sale");if(ke(h,l.address))throw new Error("You can't buy your own listing.");const A=Ie((x=(m=h.received)==null?void 0:m[0])==null?void 0:x.amount);if(!Number.isFinite(A)||A<=0)throw new Error("price unavailable");const S=Math.ceil(A/10);if(r)return;if(v(S),_!=null&&_.credits<S){g(S);return}try{const{credit:E,maxCreditedValue:H,usdCents:W}=await Ae(l.identity,A,h.id);if(r){Y(l.identity,[E.id]).catch(()=>{});return}N.current=E.id;const q=Math.ceil(W/10);v(q);const V={trade:h,credit:E,maxCreditedValue:H,usdCents:W,credits:q};c(V),t?R(V):s("ready")}catch(E){if(r)return;if(ls(E)){g(S);return}throw E}}catch(h){if(r)return;O(J(h)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:ie(h)}),s("error"),j(me(h))}})(),()=>{r=!0,N.current&&l&&(Y(l.identity,[N.current]).catch(()=>{}),N.current=null)}},[]);async function R(r=o){if(!l||!r)return;s("processing"),j(null);let g=!1;try{const m={trade:r.trade,buyer:l.address,signer:l.signer,credits:[r.credit],maxCreditedValue:r.maxCreditedValue};let x;if(Ze())try{x=await Xe(m),await es(x),g=!0}catch(h){if(h instanceof ss)g=!0;else if(h instanceof as)x=await oe(m);else throw h}else x=await oe(m);N.current=null,O("Shop Completed Purchase",{...Se([a]),payment_type:"credits",no_crypto_step:g,transaction_hash:x??null}),p.invalidateQueries({queryKey:["usd-balance"]}),s("complete")}catch(m){J(m)||re(m,{flow:"buy",step:"submit",gasless:g}),Y(l.identity,[r.credit.id]).catch(()=>{}),N.current=null,O(J(m)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:ie(m)}),p.invalidateQueries({queryKey:["usd-balance"]}),j(me(m)),s("error")}}async function I(){if(!(!f||!l)){try{sessionStorage.setItem(ue,JSON.stringify(a))}catch{}o&&Y(l.identity,[o.credit.id]).catch(()=>{}),N.current=null,s("loading");try{const r=await is(f,{address:l.address,identity:l.identity});if(r.url){window.location.href=r.url;return}y("/credits")}catch(r){re(r,{flow:"buy_credits_and_item"});try{sessionStorage.removeItem(ue)}catch{}j("Couldn't start the credits checkout — please try again."),s("error")}}}const z=u==="processing",Q=u==="complete"?"Purchase complete!":u==="nofunds"?"Buy Credits and Item":"Buy Asset";return e.jsxs("div",{className:"buy-modal",role:"dialog","aria-modal":"true","aria-label":`Buy ${a.name}`,children:[e.jsx("div",{className:"buy-modal__scrim",onClick:z?void 0:i,"aria-hidden":!0}),e.jsxs("div",{className:`buy-modal__card${u==="processing"||u==="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:Q}),!z&&e.jsx("button",{className:"buy-modal__x",onClick:i,"aria-label":"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:u==="nofunds"?"DCL Balance:":"My Credits Balance:"}),e.jsx(T,{className:"buy-modal__balance-ico"}),e.jsx("span",{className:"buy-modal__balance-value",children:G(F)})]})]}),u==="loading"&&e.jsx("div",{className:"buy-modal__body buy-modal__processing",children:e.jsx(rs,{size:44})}),u==="error"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsx("p",{className:"buy-modal__error",children:w}),e.jsx("div",{className:"buy-modal__ctas",children:e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient",onClick:i,children:"Close"})})]}),u==="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:"Insufficient Funds."})," You will need to buy"," ",e.jsxs("b",{children:[Math.max(0,C-F)," Credits"]})," to purchase this item."]})]}),e.jsx(_e,{item:a,priceCredits:C}),e.jsx("div",{className:"buy-modal__packs",children:$.map(r=>{const g=r.credits,m=r.id===f;return e.jsxs("button",{className:`buy-modal__pack${m?" buy-modal__pack--on":""}`,onClick:()=>b(r.id),children:[e.jsx(T,{className:"buy-modal__pack-ico"}),e.jsx("span",{className:"buy-modal__pack-amount",children:G(g)}),e.jsxs("span",{className:"buy-modal__pack-usd",children:["($",r.usd.toFixed(2),")"]})]},r.id)})}),e.jsxs("div",{className:"buy-modal__total",children:[e.jsxs("div",{className:"buy-modal__total-credits",children:[e.jsx(T,{className:"buy-modal__total-ico"}),e.jsx("span",{children:G(((P=$.find(r=>r.id===f))==null?void 0:P.credits)??0)})]}),e.jsxs("span",{className:"buy-modal__total-usd",children:["$",(((M=$.find(r=>r.id===f))==null?void 0:M.usd)??0).toFixed(2)]})]}),e.jsxs("div",{className:"buy-modal__ctas",children:[e.jsx("button",{className:"buy-modal__btn buy-modal__btn--outline",onClick:i,children:"Cancel"}),e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient",onClick:I,children:"Buy"})]})]}),u==="ready"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsx(_e,{item:a,priceCredits:C}),e.jsx("div",{className:"buy-modal__ctas",children:e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient buy-modal__btn--full",onClick:()=>R(),children:"Buy"})})]}),u==="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?"Completing Purchase…":"Completing transaction…"}),e.jsx("div",{className:"buy-modal__progress","aria-hidden":!0,children:e.jsx("span",{className:"buy-modal__progress-fill"})})]}),u==="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:"Your purchase was successful!"})," You can find your item in the My Assets tab."]})]}),e.jsxs("div",{className:"buy-modal__ctas",children:[e.jsx("button",{className:"buy-modal__btn buy-modal__btn--outline",onClick:()=>y("/assets?tab=mine"),children:"My assets"}),e.jsxs("button",{className:"buy-modal__btn buy-modal__btn--ruby",onClick:i,children:["Try in world",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 _e({item:a,priceCredits:i}){return e.jsxs("div",{className:"buy-modal__asset",children:[e.jsx("div",{className:"buy-modal__asset-thumb",children:a.thumbnail?e.jsx("img",{src:a.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:a.name,children:a.name||"Item"}),a.creator?e.jsxs("div",{className:"buy-modal__asset-creator",children:["By ",a.creator]}):null]}),e.jsxs("div",{className:"buy-modal__asset-price",children:[e.jsx(T,{className:"buy-modal__asset-price-ico"}),e.jsx("span",{children:G(i)})]})]})]})}const cs=n.lazy(async()=>{const[{EmoteControls:a},{Experimental_CssVarsProvider:i},{light:t}]=await Promise.all([Z(()=>import("./index-DEFc7rHy.js").then(l=>l.i),__vite__mapDeps([0,1,2,3,4,5,6,7])),Z(()=>import("./index-FLQXl_Se.js"),__vite__mapDeps([8,2,1,3,4,9,6,10,11])),Z(()=>import("./index-BMwA__hl.js"),__vite__mapDeps([12,2,1,3,4,13,11,10,6]))]);return{default:l=>e.jsx(i,{theme:t,children:e.jsx(a,{...l})})}});function ds(a){return e.jsx(n.Suspense,{fallback:null,children:e.jsx(cs,{...a})})}function os({item:a}){const i=ee(o=>{var c;return(c=o.session)==null?void 0:c.address}),{data:t,isLoading:l}=Ee(i),_=i&&t?i:"default",p=a.category==="emote",[y,u]=n.useState("avatar"),s=!p&&y==="item",[w,j]=n.useState(!0);n.useEffect(()=>{j(!0)},[a.id,s]);const f=!!i&&!!t,b=f&&Le(a,Pe(t)),k=Be(a)[0],v=f&&!b&&!p;return e.jsxs(e.Fragment,{children:[l?null:e.jsx(Te,{id:"shop-item-preview",contractAddress:a.contractAddress,tokenId:a.tokenId??void 0,itemId:a.tokenId?void 0:a.itemId??void 0,profile:s?void 0:b?_:"default",bodyShape:s||b?void 0:k,type:p?void 0:s?K.PreviewType.WEARABLE:K.PreviewType.AVATAR,emote:p||s?void 0:K.PreviewEmote.FASHION,disableBackground:!0,wheelZoom:p?1.5:void 0,wheelStart:p?100:void 0,dev:he.chainId===80002,onLoad:()=>j(!1)},a.id),l||w?e.jsx("div",{className:"item-preview__loading","aria-busy":"true","aria-label":"Loading preview",children:e.jsx("span",{className:"item-preview__spinner","aria-hidden":!0})}):null,v&&!s?e.jsxs("p",{className:"item-preview__note",children:["Shown on a ",Fe(k)," body — this item isn’t made for your avatar’s shape."]}):null,p?e.jsx("div",{className:"item-preview__emote-controls",children:e.jsx(ds,{wearablePreviewId:"shop-item-preview",hideFrameInput:!0})}):e.jsxs("div",{className:"item-preview__toggle",role:"group","aria-label":"Preview mode",children:[e.jsx("button",{type:"button",className:y==="avatar"?"is-active":"","aria-pressed":y==="avatar",onClick:()=>u("avatar"),children:"On avatar"}),e.jsx("button",{type:"button",className:y==="item"?"is-active":"","aria-pressed":y==="item",onClick:()=>u("item"),children:"Item"})]})]})}function us({title:a,items:i,onViewAll:t}){const l=n.useRef(null),[_,p]=n.useState(1),[y,u]=n.useState(0),[s,w]=n.useState(!0),[j,f]=n.useState(!1),b=n.useCallback(()=>{const o=l.current;if(!o)return;const{scrollLeft:c,scrollWidth:N,clientWidth:C}=o,F=Math.max(1,Math.ceil(N/C));p(F),u(Math.min(F-1,Math.round(c/C))),w(c<=1),f(c+C>=N-1)},[]);if(n.useEffect(()=>{b();const o=l.current;if(o)return o.addEventListener("scroll",b,{passive:!0}),window.addEventListener("resize",b),()=>{o.removeEventListener("scroll",b),window.removeEventListener("resize",b)}},[b,i.length]),i.length===0)return null;function k(o){const c=l.current;c&&c.scrollBy({left:o*c.clientWidth,behavior:"smooth"})}function v(o){const c=l.current;c&&c.scrollTo({left:o*c.clientWidth,behavior:"smooth"})}return e.jsxs("section",{className:"collection-carousel",children:[e.jsxs("div",{className:"collection-carousel__head",children:[e.jsx("h2",{className:"collection-carousel__title",children:a}),t?e.jsxs("button",{className:"collection-carousel__viewall",onClick:t,children:["View all",e.jsx("span",{className:"ico ico-chevron collection-carousel__viewall-ico","aria-hidden":!0})]}):null]}),e.jsxs("div",{className:"collection-carousel__viewport",children:[e.jsx("button",{className:"collection-carousel__arrow collection-carousel__arrow--left",onClick:()=>k(-1),"aria-label":"Scroll left",disabled:s,children:e.jsx("img",{src:le,alt:"","aria-hidden":!0})}),e.jsx("div",{className:"collection-carousel__track",ref:l,children:i.map(o=>e.jsx(Me,{item:o},o.id))}),e.jsx("button",{className:"collection-carousel__arrow collection-carousel__arrow--right",onClick:()=>k(1),"aria-label":"Scroll right",disabled:j,children:e.jsx("img",{src:le,alt:"","aria-hidden":!0})})]}),_>1?e.jsx("div",{className:"collection-carousel__dots","aria-label":"Carousel pages",children:Array.from({length:_}).map((o,c)=>e.jsx("button",{className:`collection-carousel__dot${c===y?" is-active":""}`,"aria-label":`Go to page ${c+1}`,"aria-current":c===y?"true":void 0,onClick:()=>v(c)},c))}):null]})}function ms(a){let i=0;for(let t=0;t<a.length;t++)i=i*31+a.charCodeAt(t)>>>0;return`hsl(${i%360}, 52%, 45%)`}function _s({contractAddress:a,name:i,className:t}){const l=X();if(!a||!i)return null;const _=(i.trim()[0]||"?").toUpperCase();return e.jsxs("button",{className:`creator creator--link${t?` ${t}`:""}`,onClick:p=>{p.stopPropagation(),l(`/collection/${a}`)},children:[e.jsx("span",{className:"creator__ava creator__ava--letter",style:{backgroundColor:ms(a)},"aria-hidden":!0,children:_}),e.jsx("span",{className:"creator__name",children:i})]})}function hs(a){return Object.values(K.Rarity).includes(a)}function ps(a){return a==="male"?"Male":a==="female"?"Female":a==="unisex"?"Unisex":null}function bs(a){return a.wearableCategory?a.wearableCategory.replace(/_/g," "):a.category==="emote"?"Emote":"Wearable"}function Is(){const{contractAddress:a,tokenId:i}=ve(),{state:t}=je(),l=X(),_=ne(d=>d.add),p=ne(d=>d.items),y=ce(d=>d.toggle),{session:u}=ee(),[s,w]=n.useState(()=>t!=null&&t.item?{...t.item,tradeId:t.tradeId??t.item.tradeId}:{id:`${a}-${i}`,name:"",creator:"",contractAddress:a??"",itemId:null,category:"wearable",rarity:"common",network:"MATIC",chainId:he.chainId,thumbnail:"",priceCredits:0,gender:null,isSmart:!1,tokenId:i??void 0,tradeId:t==null?void 0:t.tradeId}),[j,f]=n.useState(!1),[b,k]=n.useState(!!(t!=null&&t.resumeBuy));n.useEffect(()=>{t!=null&&t.resumeBuy&&f(!0)},[t==null?void 0:t.resumeBuy]);const{data:v=[],isFetched:o}=D({queryKey:["collection-items",s.contractAddress],enabled:!!s.contractAddress,queryFn:()=>Ye(s.contractAddress,{first:20}).then(d=>d.items)}),{data:c,isLoading:N}=D({queryKey:["shop-item",s.contractAddress,i],enabled:!(t!=null&&t.item)&&!!s.contractAddress&&!!i,queryFn:()=>Ge(s.contractAddress,i)});n.useEffect(()=>{c&&w(d=>d.tradeId?d:{...c})},[c]);const[C,F]=n.useState(!1),{data:R=""}=D({queryKey:["item-desc",s.contractAddress,s.itemId],enabled:!!s.contractAddress&&!!s.itemId,staleTime:5*6e4,queryFn:()=>Qe(s.contractAddress,s.itemId)}),{data:I}=D({queryKey:["collection-meta",s.contractAddress],enabled:!!s.contractAddress,staleTime:5*6e4,queryFn:()=>He(s.contractAddress)});n.useEffect(()=>{if(s.name||c||v.length===0)return;const d=i&&v.find(L=>L.tokenId===i||L.itemId===i)||v.find(L=>L.contractAddress===s.contractAddress);d&&w(L=>({...d,tradeId:L.tradeId??d.tradeId}))},[v,c]);const z=n.useMemo(()=>{const d=new Set,L=[];for(const B of v){if(B.id===s.id||s.itemId&&B.itemId===s.itemId||s.tokenId&&B.tokenId===s.tokenId)continue;const te=`${B.contractAddress}-${B.itemId??B.tokenId??B.id}`;d.has(te)||(d.add(te),L.push(B))}return L},[v,s.id,s.itemId,s.tokenId]),{data:Q,isLoading:P}=D({queryKey:["detail-trade",s.id,s.tradeId,s.contractAddress,s.itemId],enabled:!!s.contractAddress,queryFn:async()=>{if(s.tradeId)return s.tradeId;if(s.itemId){const d=await Je(s.contractAddress,s.itemId);return(d==null?void 0:d.id)??null}return null}}),M=s.tradeId??Q??void 0,r=!!M,g=Re({priceCredits:s.priceCredits,compareAtCredits:s.compareAtCredits,saleEndsAt:s.saleEndsAt}),m=n.useMemo(()=>({...s,tradeId:M,id:M??s.id}),[s,M]),x=p.some(d=>d.id===m.id),h=ce(d=>!!d.items[s.id]),A=n.useRef(null);n.useEffect(()=>{!s.name||P||A.current===s.id||(A.current=s.id,O("Shop Viewed Item",{...$e(s),for_sale:r}),We(s))},[s.id,s.name,P,r]);const S=`${a}/${i}`,E=n.useRef(S);n.useEffect(()=>{E.current!==S&&(E.current=S,t!=null&&t.item&&w({...t.item,tradeId:t.tradeId??t.item.tradeId}),typeof window<"u"&&window.scrollTo({top:0,behavior:"smooth"}))},[S]);function H(){!r||x||U||_(m,"item_detail")}const W=hs(s.rarity)?s.rarity:K.Rarity.COMMON,q=ps(s.gender),V=qe(s),se=Ve(s.gender),pe=r&&g,be="More from this collection",U=De(s,u==null?void 0:u.address),ae=r?x?"In cart":P?"Checking…":"Add to cart":"Not for sale",xe=typeof s.available=="number"&&s.available>0&&!s.tokenId,fe=!U&&r,ye=N||!!s.contractAddress&&!o;return!s.name&&!ye?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:"This item isn’t available"}),e.jsx("p",{className:"muted",children:"It may have been delisted or moved. Browse Collectibles for something else."}),e.jsx("button",{className:"btn btn--purple",onClick:()=>l("/assets"),children:"Browse Collectibles"})]}):e.jsxs("div",{className:"item-detail",children:[e.jsxs("nav",{className:"item-detail__crumbs","aria-label":"Breadcrumb",children:[e.jsx("button",{className:"item-detail__crumb-link",onClick:()=>l("/assets"),children:"Collectibles"}),e.jsx("span",{className:"item-detail__crumb-sep",children:"/"}),e.jsx("span",{className:"item-detail__crumb-current",children:s.name||"Item"})]}),e.jsxs("div",{className:"item-detail__main",children:[e.jsx("div",{className:"item-detail__preview",children:s.name?e.jsx(os,{item:s}):e.jsx("div",{className:"item-preview__loading","aria-busy":"true","aria-label":"Loading preview",children:e.jsx("span",{className:"item-preview__spinner","aria-hidden":!0})})}),e.jsxs("div",{className:"item-detail__info",children:[e.jsxs("div",{className:"item-detail__info-head",children:[e.jsx("h1",{className:"item-detail__title",children:s.name||"Loading…"}),e.jsx("button",{className:`item-detail__fav${h?" is-on":""}`,onClick:()=>y(s),"aria-pressed":h,"aria-label":h?"Remove from favorites":"Add to favorites",children:e.jsx("span",{className:`ico ${h?"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:Ke(W),color:Oe(W)},children:s.rarity}),e.jsxs("span",{className:"chip item-detail__chip",children:[V?e.jsx("span",{className:`ico ico-${V} item-detail__chip-ico`,"aria-hidden":!0}):null,bs(s)]}),q?e.jsxs("span",{className:"chip item-detail__chip",children:[se?e.jsx("span",{className:`ico ico-${se} item-detail__chip-ico`,"aria-hidden":!0}):null,q]}):null]}),R?e.jsxs("div",{className:"item-detail__section item-detail__description",children:[e.jsx("div",{className:"item-detail__label",children:"Description"}),e.jsx("p",{className:`item-detail__desc-text${C?" is-expanded":""}`,children:R}),R.length>140?e.jsx("button",{className:"link item-detail__desc-toggle",onClick:()=>F(d=>!d),children:C?"Show less":"Read more"}):null]}):null,s.creator||I!=null&&I.name?e.jsxs("div",{className:"item-detail__meta",children:[s.creator?e.jsxs("div",{className:"item-detail__meta-col",children:[e.jsx("div",{className:"item-detail__label",children:"Creator"}),e.jsx(ze,{address:s.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:"Collection"}),e.jsx(_s,{contractAddress:s.contractAddress,name:I.name,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:"Price"}),r?pe?e.jsxs("div",{className:"item-detail__price item-detail__price--sale",children:[e.jsxs("span",{className:"item-detail__price",children:[e.jsx(T,{className:"item-detail__diamond"}),e.jsx("span",{className:"item-detail__price-value",children:s.priceCredits})]}),e.jsxs("span",{className:"item-detail__price-was",children:[e.jsx(T,{className:"item-detail__diamond item-detail__diamond--was"}),s.compareAtCredits]}),de(s.compareAtCredits,s.priceCredits)>0?e.jsxs("span",{className:"item-detail__sale-badge",children:["SALE -",de(s.compareAtCredits,s.priceCredits),"%"]}):null,e.jsx(Ue,{endsAt:s.saleEndsAt,className:"item-detail__countdown"})]}):e.jsxs("div",{className:"item-detail__price",children:[e.jsx(T,{className:"item-detail__diamond"}),e.jsx("span",{className:"item-detail__price-value",children:s.priceCredits})]}):e.jsx("div",{className:"item-detail__price item-detail__price--none",children:"Not for sale"})]}),xe?e.jsxs("div",{className:"item-detail__stock-col",children:[e.jsx("div",{className:"item-detail__price-label",children:"Stock"}),e.jsx("div",{className:"item-detail__stock-value",children:s.available})]}):null]})}),e.jsx("div",{className:`item-detail__ctas${U?"":" item-detail__ctas--buttons"}${fe?" item-detail__ctas--dual":""}`,children:U?e.jsxs("p",{className:"item-detail__own-note muted",children:["This is your item — manage it in ",e.jsx(Ne,{to:"/my-assets",children:"My Assets"}),"."]}):e.jsxs(e.Fragment,{children:[r?e.jsxs("button",{className:"btn btn--purple item-detail__cta",onClick:()=>f(!0),disabled:P,children:[e.jsx("span",{className:"item-detail__cta-label",children:"Buy now"}),e.jsxs("span",{className:"item-detail__cta-price","aria-hidden":!0,children:[e.jsx(T,{className:"item-detail__cta-diamond"}),s.priceCredits]})]}):null,e.jsxs("button",{className:"item-detail__addcart",onClick:H,disabled:!r||x||P,"aria-label":ae,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:ae})]})]})})]})]}),e.jsx(us,{title:be,items:z,onViewAll:s.contractAddress?()=>l(`/collection/${s.contractAddress}`):void 0}),j?e.jsx(ns,{item:m,resume:b,onClose:()=>{f(!1),k(!1)}}):null]})}export{Is as ItemDetail,Is as default};
@@ -1 +0,0 @@
1
- import{j as t,L as n}from"./react-BMZSDQJw.js";import{o}from"./index-W4B_IWIP.js";import"./ethers-BZNCwGB1.js";function i(){return 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{i as NotFound,i as default};
@@ -1 +0,0 @@
1
- import{g as r}from"./react-BMZSDQJw.js";import{r as o}from"./browser-ponyfill-C_hn4Jen.js";var t=o();const f=r(t);export{f as o};
@@ -1 +0,0 @@
1
- import{m as h,n as C}from"./index-W4B_IWIP.js";const l="dcl_shop_resume_cart";function m(r){return Math.ceil(r/10)}async function T(r,a,u){var o;const n=[],s=[],c=[];for(const e of r)try{const t=await u(e);if(!t){s.push(e);continue}if(h(t,a)){c.push(e);continue}const i=C((o=t.received[0])==null?void 0:o.amount);if(!Number.isFinite(i)||i<=0){s.push(e);continue}n.push({item:e,trade:t,usdCents:i,priceCredits:m(i)})}catch{s.push(e)}const d=n.reduce((e,t)=>e+t.priceCredits,0),p=s.length>0||c.length>0||n.some(e=>e.priceCredits!==e.item.priceCredits);return{buyable:n,unavailable:s,own:c,liveTotalCredits:d,orderChanged:p}}export{l as R,T as r};
@@ -1 +0,0 @@
1
- import{w as r}from"./utils-DAnGDyuB.js";import{d as a}from"./decimals-4fS10X_L.js";import"./ethers-BZNCwGB1.js";import"./react-BMZSDQJw.js";import"./signing-CyLHhd-P.js";import"./index-W4B_IWIP.js";async function s(c){return r(()=>a(c),{cacheKey:`${c.contract.chain.id}:${c.contract.address}:decimals`,cacheTime:Number.POSITIVE_INFINITY})}export{s as decimals};
@@ -1 +0,0 @@
1
- import{L as z,S as I,U as j,V as q,X as A,Y as D,Z as G,$ as R,a0 as U}from"./index-W4B_IWIP.js";import{r as c}from"./react-BMZSDQJw.js";var V=I,L=function(e){return e!=="theme"},E=function(e){return typeof e=="string"&&e.charCodeAt(0)>96?V:L},O=function(e,t,s){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(d){return e.__emotion_forwardProp(d)&&i(d)}:i}return typeof r!="function"&&s&&(r=e.__emotion_forwardProp),r},W=function(e){var t=e.cache,s=e.serialized,r=e.isStringTag;return G(t,s,r),R(function(){return U(t,s,r)}),null},X=function o(e,t){var s=e.__emotion_real===e,r=s&&e.__emotion_base||e,i,d;t!==void 0&&(i=t.label,d=t.target);var b=O(e,t,s),w=b||E(r),_=!w("as");return function(){var m=arguments,l=s&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(i!==void 0&&l.push("label:"+i+";"),m[0]==null||m[0].raw===void 0)l.push.apply(l,m);else{var S=m[0];l.push(S[0]);for(var x=m.length,p=1;p<x;p++)l.push(m[p],S[p])}var n=j(function(a,u,v){var P=_&&a.as||r,f="",F=[],h=a;if(a.theme==null){h={};for(var C in a)h[C]=a[C];h.theme=c.useContext(q)}typeof a.className=="string"?f=A(u.registered,F,a.className):a.className!=null&&(f=a.className+" ");var N=D(l.concat(F),u.registered,h);f+=u.key+"-"+N.name,d!==void 0&&(f+=" "+d);var k=_&&b===void 0?E(P):w,g={};for(var y in a)_&&y==="as"||k(y)&&(g[y]=a[y]);return g.className=f,v&&(g.ref=v),c.createElement(c.Fragment,null,c.createElement(W,{cache:u,serialized:N,isStringTag:typeof P=="string"}),c.createElement(P,g))});return n.displayName=i!==void 0?i:"Styled("+(typeof r=="string"?r:r.displayName||r.name||"Component")+")",n.defaultProps=e.defaultProps,n.__emotion_real=n,n.__emotion_base=r,n.__emotion_styles=l,n.__emotion_forwardProp=b,Object.defineProperty(n,"toString",{value:function(){return"."+d}}),n.withComponent=function(a,u){var v=o(a,z({},t,u,{shouldForwardProp:O(n,u,!0)}));return v.apply(void 0,l)},n}},Y=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],T=X.bind(null);Y.forEach(function(o){T[o]=T(o)});export{T as n};
@@ -1 +0,0 @@
1
- import{h as i}from"./signing-CyLHhd-P.js";import"./utils-DAnGDyuB.js";import"./ethers-BZNCwGB1.js";import"./react-BMZSDQJw.js";import"./index-W4B_IWIP.js";async function n(t,e){const a=await t({method:"eth_estimateGas",params:[e]});return i(a)}export{n as eth_estimateGas};
@@ -1 +0,0 @@
1
- import{n as e,a as r}from"./signing-CyLHhd-P.js";import"./utils-DAnGDyuB.js";import"./ethers-BZNCwGB1.js";import"./react-BMZSDQJw.js";import"./index-W4B_IWIP.js";async function b(t,o){const n=await t({method:"eth_getTransactionCount",params:[o.address,o.blockNumber?e(o.blockNumber):o.blockTag||"pending"]});return r(n)}export{b as eth_getTransactionCount};
@@ -1 +0,0 @@
1
- import{g as i}from"./wallets-D-H2dLAA.js";import"./signing-CyLHhd-P.js";import"./utils-DAnGDyuB.js";import"./ethers-BZNCwGB1.js";import"./react-BMZSDQJw.js";import"./index-W4B_IWIP.js";import"./store-CraP4F4Y.js";import"./hashTypedData-D7G_pwf8.js";import"./index-o7U3KUfn.js";import"./events-DQ172AOg.js";import"./index-VtK5IfsQ.js";import"./index-C1wLfrk8.js";import"./index-nibyPLVP.js";import"./index-CJdot1dH.js";import"./index-DitpCD_h.js";import"./ethereum-dj4CvyL9.js";async function x(o){const l=await i(o);return{app:{android:null,browser:null,chrome:null,edge:null,firefox:null,ios:null,linux:null,mac:null,opera:null,safari:null,windows:null},desktop:{native:null,universal:null},homepage:l.homepage||"",id:o,image_id:l.imageUrl||"",mobile:{native:null,universal:null},name:l.name,rdns:null}}export{x as getEcosystemWalletInfo};
@@ -1 +0,0 @@
1
- import{g as t}from"./react-BMZSDQJw.js";import{r}from"./index-COjgItKg.js";var e=r();const i=t(e);export{i as E};