@dcl/shop 0.1.0-29588264451.commit-627b4b7 → 0.1.0-29598294884.commit-796c10b

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 (188) hide show
  1. package/assets/{AnimatedBackground-psFU9eqJ.js → AnimatedBackground-C-OiTwT_.js} +1 -1
  2. package/assets/{Assets-iKVqmFqq.js → Assets-LlBezYwI.js} +1 -1
  3. package/assets/Cart-BBaYBkcV.css +1 -0
  4. package/assets/Cart-BHsLzrAp.js +1 -0
  5. package/assets/{CircularProgress-Fg-Nhc1W.js → CircularProgress-dArtpO16.js} +1 -1
  6. package/assets/{Collection-D5Q48x8i.js → Collection-F3rbRfOx.js} +1 -1
  7. package/assets/CollectionCarousel-B6ehNbVL.js +1 -0
  8. package/assets/CollectionCarousel-FF2VKnCi.css +1 -0
  9. package/assets/{ContentClient-CiSvC4he.js → ContentClient-CHmx9486.js} +1 -1
  10. package/assets/{Creator-Cw25k_kz.js → Creator-a2mAu_fy.js} +1 -1
  11. package/assets/{CssVarsProvider-D1D1cNqm.js → CssVarsProvider-NUrRzWfI.js} +2 -2
  12. package/assets/{DeploymentBuilder-Du1wr7ad.js → DeploymentBuilder-6C4obgT_.js} +1 -1
  13. package/assets/{ExchangeController-DR6BBi2L.js → ExchangeController-Dg0-A3E4.js} +1 -1
  14. package/assets/GetCredits-CgrPoIiv.js +1 -0
  15. package/assets/{HelpersUtil-31KPVf4r.js → HelpersUtil-CZoh_esf.js} +1 -1
  16. package/assets/{ImportListings-dKZfPQUt.js → ImportListings-DB3QAFgV.js} +1 -1
  17. package/assets/{ItemDetail-BMi8a81V.css → ItemDetail-Bu2_xAf0.css} +1 -1
  18. package/assets/ItemDetail-DSp4r-yp.js +2 -0
  19. package/assets/{MarketCheckout-Qn1ixrkb.js → MarketCheckout-Z8xqLDVD.js} +1 -1
  20. package/assets/{MyAssets-DxI94ipn.js → MyAssets-k1eod7LK.js} +1 -1
  21. package/assets/{MyFavorites-D2VaWS1B.js → MyFavorites-BCCw7XaP.js} +1 -1
  22. package/assets/{MyPurchases-B9emkBFN.js → MyPurchases-BUNnpOAU.js} +1 -1
  23. package/assets/{NotFound-E0wDMFCK.js → NotFound-CdZzlgfI.js} +1 -1
  24. package/assets/{StoreSettings-DfKsXLjF.js → StoreSettings-Df0eRihr.js} +1 -1
  25. package/assets/Success-Dv2oWuT3.js +1 -0
  26. package/assets/{SwapController-BhWJpnsS.js → SwapController-BAn_ff02.js} +1 -1
  27. package/assets/{TradeService-CzTJfCBU.js → TradeService-Bt8Tvc9u.js} +1 -1
  28. package/assets/{W3MFrameProviderSingleton-QTe845Ty.js → W3MFrameProviderSingleton-DJ4wJ6eQ.js} +3 -3
  29. package/assets/{WebCryptoP256-C9DwfYdN.js → WebCryptoP256-RT86dqZc.js} +1 -1
  30. package/assets/{basic-BZccaaZw.js → basic-DaW-Z5Dc.js} +1 -1
  31. package/assets/{biconomy-DB7oVSPZ.js → biconomy-CCIerV0I.js} +1 -1
  32. package/assets/{buy-D_7yggiZ.js → buy-CK_8Gv_-.js} +1 -1
  33. package/assets/{buy-gasless-DdXBIm99.js → buy-gasless-B0ASTVfF.js} +1 -1
  34. package/assets/{cart-checkout-C6slCzLp.js → cart-checkout-CMvQamn-.js} +1 -1
  35. package/assets/{categories-CS5KEV15.js → categories-DL4AAJFe.js} +1 -1
  36. package/assets/{ccip-Bs_9Z_ZN.js → ccip-CUNPu8Px.js} +1 -1
  37. package/assets/{ccip-CRir71Ts.js → ccip-kjFlAUew.js} +1 -1
  38. package/assets/{collection-BB4WIsDf.js → collection-B_ypwwV3.js} +1 -1
  39. package/assets/{controller-8YCt_5kO.js → controller-CCqICKdG.js} +2 -2
  40. package/assets/{core-_p71vehW.js → core-7b1kcjwl.js} +4 -4
  41. package/assets/{custom-D5gy9Lbk.js → custom-C02v7urp.js} +1 -1
  42. package/assets/{data-capture-D4KpcM2w.js → data-capture-voKPyp6r.js} +1 -1
  43. package/assets/decimals-BR2Fo8Uy.js +1 -0
  44. package/assets/{decimals-DAdpv8M5.js → decimals-CQH-R473.js} +1 -1
  45. package/assets/{detectExtension-BwC-gZ7s.js → detectExtension-njFG0pmN.js} +1 -1
  46. package/assets/{email-DoKqUCg3.js → email-mWA25X0h.js} +1 -1
  47. package/assets/{embedded-wallet-DFjP-9W6.js → embedded-wallet-CPJZ_UVU.js} +1 -1
  48. package/assets/emotion-styled.browser.esm-B4ZybID-.js +1 -0
  49. package/assets/{engine-C07V9FFP.js → engine-BklvI4dT.js} +1 -1
  50. package/assets/{estimate-l1-fee-CbSYXxVq.js → estimate-l1-fee-C_1YLKk9.js} +1 -1
  51. package/assets/{eth_estimateGas-CHt9spnf.js → eth_estimateGas-CRejf8K4.js} +1 -1
  52. package/assets/{eth_getStorageAt-Dzigs9Zu.js → eth_getStorageAt-DlRQXQWP.js} +1 -1
  53. package/assets/{eth_getTransactionCount-CDY9h_Rg.js → eth_getTransactionCount-CttVR65L.js} +1 -1
  54. package/assets/{extractIPFS-BOTNSryE.js → extractIPFS-lhQJFRGp.js} +1 -1
  55. package/assets/{features-C90RUzSP.js → features-CtUcvntA.js} +1 -1
  56. package/assets/{fetchTokenMetadata-BKZfKsNV.js → fetchTokenMetadata-DU75F_A2.js} +2 -2
  57. package/assets/get-ecosystem-wallet-info-DzHksZKi.js +1 -0
  58. package/assets/{getBalance-Bb_-F40S.js → getBalance-Bya9Y--Q.js} +1 -1
  59. package/assets/{getInstalledModules-BOPp6l-B.js → getInstalledModules-D5QmPDBR.js} +1 -1
  60. package/assets/{getNFT-DsdBNES9.js → getNFT-CRTdCPiY.js} +1 -1
  61. package/assets/{getNFT-jiRKQ5Oo.js → getNFT-DgDEOkwr.js} +2 -2
  62. package/assets/{getOverlayAlpha-CM9JvcJV.js → getOverlayAlpha-nRpMWuqq.js} +1 -1
  63. package/assets/{hashTypedData-DONiI8QZ.js → hashTypedData-BKIW0_QT.js} +1 -1
  64. package/assets/{hashTypedData-vGDzeBcA.js → hashTypedData-rbqmjDS9.js} +1 -1
  65. package/assets/{import-DM-iC_9y.js → import-BpP341-q.js} +1 -1
  66. package/assets/{in-app-wallet-calls-C_aNlFmv.js → in-app-wallet-calls-kb5cpJBB.js} +1 -1
  67. package/assets/{index-CFy8QjLL.js → index-59dY-O7-.js} +1 -1
  68. package/assets/{index-8TBzmL0l.js → index-B5dw0psc.js} +1 -1
  69. package/assets/{index-CRTJ7_WQ.js → index-B5p8pUge.js} +1 -1
  70. package/assets/{index-CsTr0LfC.js → index-B671RqnK.js} +1 -1
  71. package/assets/{index-ChMOJahJ.js → index-B7UojGOz.js} +2 -2
  72. package/assets/{index-Cv14wakP.js → index-B8XnKIzQ.js} +1 -1
  73. package/assets/{index-DHJgxESc.js → index-BB04C8i8.js} +1 -1
  74. package/assets/{index-MqZwF8o9.js → index-BBU85IYf.js} +2 -2
  75. package/assets/{index-CnWEn3Fl.js → index-BH3tdIod.js} +1 -1
  76. package/assets/{index-xHNUVGAh.js → index-BJClelBo.js} +1 -1
  77. package/assets/{index-C5j8nmW-.js → index-BPL_lEQp.js} +1 -1
  78. package/assets/{index-DSs6L904.js → index-BVBZ2zPc.js} +1 -1
  79. package/assets/{index-Bv4pyelF.js → index-BXhZS_AN.js} +1 -1
  80. package/assets/{index-BNsBOmtc.js → index-BY4MKlVU.js} +1 -1
  81. package/assets/{index-7PEMu-vS.js → index-Ba4mXEAV.js} +1 -1
  82. package/assets/{index-gEVnIhEr.js → index-BdITvbLZ.js} +1 -1
  83. package/assets/{index-CE5ZSWni.js → index-Bd_IAGP4.js} +1 -1
  84. package/assets/{index-DO9rihjD.js → index-BiazdCZB.js} +1 -1
  85. package/assets/{index-DmQaEVTR.js → index-BkzieXvc.js} +1 -1
  86. package/assets/{index-Ckj9N8kM.js → index-BosG_Hic.js} +1 -1
  87. package/assets/{index-BpQeHVbA.js → index-BpdGuzAP.js} +1 -1
  88. package/assets/{index-DxBzK74p.js → index-BuJtW-3X.js} +1 -1
  89. package/assets/{index-BQrBXxNO.js → index-BuvUlkht.js} +1 -1
  90. package/assets/{index--gVKrRw0.js → index-C0rWirY0.js} +1 -1
  91. package/assets/{index-CBVNSjCQ.js → index-CAIuPn4q.js} +3 -3
  92. package/assets/{index-zHd02W0T.js → index-CAhWUgSV.js} +1 -1
  93. package/assets/{index-SOuBSYKv.js → index-CJ7Zrqys.js} +1 -1
  94. package/assets/{index-DzmAUU0P.js → index-C_RhfNpS.js} +1 -1
  95. package/assets/{index-C8i-4YQe.js → index-Cc89QD8-.js} +1 -1
  96. package/assets/{index-D8WLCETG.js → index-CfEuhodX.js} +1 -1
  97. package/assets/{index-BUzSFM10.js → index-CjWVGgkX.js} +1 -1
  98. package/assets/{index-C02-3pKD.js → index-Clv1kOTk.js} +1 -1
  99. package/assets/{index-BEob012O.js → index-D0Qxhd6I.js} +1 -1
  100. package/assets/{index-C7gttTv8.js → index-DAh057md.js} +1 -1
  101. package/assets/{index-DD6TVIkI.js → index-DHLTDjWC.js} +1 -1
  102. package/assets/{index-Cmhu1R9V.js → index-DHaPmJI4.js} +1 -1
  103. package/assets/{index-Bn_Nt76C.js → index-DJFIkOB0.js} +1 -1
  104. package/assets/{index-QHZTwn8s.js → index-DQNOvBBK.js} +1 -1
  105. package/assets/{index-D8WMIH5c.js → index-DUBd_edo.js} +1 -1
  106. package/assets/{index-Bj7GkEZm.js → index-DUrbPJsZ.js} +1 -1
  107. package/assets/{index-B2Zw4G7Z.js → index-DVAx1hg9.js} +1 -1
  108. package/assets/{index-Dgwg-DaP.js → index-DYHpzz6b.js} +1 -1
  109. package/assets/{index-C2G2lljO.js → index-DZSo3rng.js} +1 -1
  110. package/assets/{index-BtVa_Kh7.js → index-DZkr5cbg.js} +1 -1
  111. package/assets/{index-CSm8067w.js → index-DcWPLLKy.js} +1 -1
  112. package/assets/{index-DaIODAHU.js → index-Df4Xuchc.js} +1 -1
  113. package/assets/{index-D3SxIXox.js → index-DjtmxbWx.js} +1 -1
  114. package/assets/{index-D66LUjvb.js → index-DkZCrX_a.js} +1 -1
  115. package/assets/{index-BVEDAipP.js → index-Ds3LeGS0.js} +1 -1
  116. package/assets/{index-7DJmnNdg.js → index-Dtzc2-_5.js} +1 -1
  117. package/assets/{index-TNdqfy5A.js → index-GBq5vmD5.js} +2 -2
  118. package/assets/{index-BIJTdhnz.js → index-H1GdZQCE.js} +2 -2
  119. package/assets/{index-BVpuOhLG.js → index-HNkFQ8e1.js} +3 -3
  120. package/assets/{index-C__ZUWCs.js → index-KQXKEiRO.js} +1 -1
  121. package/assets/{index-BNKsMdm-.js → index-QTshBzMT.js} +1 -1
  122. package/assets/{index-BAYW-Y7J.css → index-jbcqNek9.css} +1 -1
  123. package/assets/{index-CThtDCr0.js → index-l2k0682u.js} +3 -3
  124. package/assets/{index-DgPN63Jh.js → index-r45SswES.js} +6 -6
  125. package/assets/{index.es-D2JDwbaX.js → index.es-CEEtvWyE.js} +4 -4
  126. package/assets/{index.es-C122sfII.js → index.es-CZNkKIA6.js} +1 -1
  127. package/assets/{index.es-B5B8Zcyr.js → index.es-D2H6ESNG.js} +1 -1
  128. package/assets/{localBatchGatewayRequest-aLhcfaIA.js → localBatchGatewayRequest-CX4Kfpwl.js} +1 -1
  129. package/assets/{mana-rate-DM_I1GlP.js → mana-rate-iNhXq7r-.js} +1 -1
  130. package/assets/network-B5C8b3kZ.js +1 -0
  131. package/assets/{networks-C5Fm0Wg2.js → networks-CYqUz454.js} +1 -1
  132. package/assets/{onramp-DkCes_uB.js → onramp-CC5CpnYg.js} +1 -1
  133. package/assets/{openzeppelin-Do5qc-L4.js → openzeppelin-mb8eXngw.js} +1 -1
  134. package/assets/{ownerOf-B7-bZ1Kj.js → ownerOf-DkeEezhR.js} +1 -1
  135. package/assets/{parseNft-BnBeb8zU.js → parseNft-C1e4MyGM.js} +2 -2
  136. package/assets/{parseSignature-gA3whR_I.js → parseSignature-CK3NvtCE.js} +1 -1
  137. package/assets/{parseSignature-BXiUrtE0.js → parseSignature-Wiw0A1vU.js} +3 -3
  138. package/assets/{pay-with-exchange-Bfj0m_wp.js → pay-with-exchange-fxRG6paS.js} +1 -1
  139. package/assets/{payments-Cz9uOQEa.js → payments-D_1c4Q0E.js} +1 -1
  140. package/assets/{qr-overlay-tCTGCDoP.js → qr-overlay-ajo1zJy5.js} +1 -1
  141. package/assets/{receive-BB-3p_8X.js → receive-DVkuHUgY.js} +1 -1
  142. package/assets/{resolveImplementation-AZ8V1faE.js → resolveImplementation-CdLMHxJj.js} +1 -1
  143. package/assets/{rpc-DfJIwLRx.js → rpc-D2IBy_U1.js} +1 -1
  144. package/assets/{secp256k1-lxVndZFi.js → secp256k1-BQuggIky.js} +1 -1
  145. package/assets/{secp256k1-D5GxePTM.js → secp256k1-Dm9YAkWu.js} +1 -1
  146. package/assets/{secp256k1-Bmuoeuaz.js → secp256k1-GotX1mTh.js} +1 -1
  147. package/assets/{send-DmW5J-Nc.js → send-CI1L6iNB.js} +1 -1
  148. package/assets/{send-batch-transaction-CZjLQhJF.js → send-batch-transaction-CASuhouL.js} +1 -1
  149. package/assets/{send-eip712-transaction-BhyQ0a_B.js → send-eip712-transaction-35qar9DH.js} +2 -2
  150. package/assets/{send-gasless-transaction-CXbVlKhB.js → send-gasless-transaction-B7r24MkK.js} +2 -2
  151. package/assets/{sendRawTransaction-BGdiWFeb.js → sendRawTransaction-BckXqylS.js} +3 -3
  152. package/assets/{serializeTransaction-DykKczc7.js → serializeTransaction-jUNyAIgS.js} +1 -1
  153. package/assets/{session-proposal-BEX_HaKf.js → session-proposal-Cs3jrnoO.js} +1 -1
  154. package/assets/{session-request-DR4MsaR6.js → session-request-CYnKGzzH.js} +2 -2
  155. package/assets/{sha256-Dlxe-c_a.js → sha256-B_-G--k2.js} +1 -1
  156. package/assets/{signing-DznnvpB3.js → signing-DuFbSjik.js} +4 -4
  157. package/assets/{socials-BIESIfY8.js → socials-Yv1nD9G2.js} +1 -1
  158. package/assets/{swaps-CA_8qfYn.js → swaps-Dr9lB7W5.js} +1 -1
  159. package/assets/{thirdweb-UauMP3KV.js → thirdweb-CrBUG3V0.js} +3 -3
  160. package/assets/{totalSupply-V0CpLejD.js → totalSupply-DCB7wJEJ.js} +1 -1
  161. package/assets/{trade-encoding-CWQaROcB.js → trade-encoding-04aPoKGq.js} +1 -1
  162. package/assets/{transactionReceipt-T_4Pqj5L.js → transactionReceipt-RIlE96Mf.js} +1 -1
  163. package/assets/{transactions-CCKmzO8P.js → transactions-COJR6OXM.js} +1 -1
  164. package/assets/{useInfiniteGrid-BwrFUhaa.js → useInfiniteGrid-BebS5lWt.js} +1 -1
  165. package/assets/{useStore-D9l09yvh.js → useStore-D3W2cLwe.js} +2 -2
  166. package/assets/{useTheme-Bf8Lxsxi.js → useTheme-B1I-qqVe.js} +1 -1
  167. package/assets/useTheme-BMWEIcbK.js +1 -0
  168. package/assets/{verifyHash-DictgvCd.js → verifyHash-Cz68jK0S.js} +1 -1
  169. package/assets/{w3m-modal-DjfQ6wwU.js → w3m-modal-BUoJMaFN.js} +1 -1
  170. package/assets/{w3m-modal-DEg0nzZj.js → w3m-modal-DN3kAovw.js} +1 -1
  171. package/assets/{wait-for-tx-receipt-agyY9QD2.js → wait-for-tx-receipt-BE6V8Tcx.js} +1 -1
  172. package/assets/{wallet-kind-Jzl4cyiP.js → wallet-kind-BUfXt6vu.js} +1 -1
  173. package/assets/{wallets-_A4Bjek9.js → wallets-B5j8uvbG.js} +6 -6
  174. package/assets/{web-connector-BaXQsZJI.js → web-connector-CwdBK-54.js} +3 -3
  175. package/assets/{writeContract-D9YLPdhX.js → writeContract-DU0rJzSn.js} +1 -1
  176. package/assets/{zoraTestnet-BC6E1i5C.js → zoraTestnet-CjGSh-kA.js} +1 -1
  177. package/index.html +8 -8
  178. package/package.json +2 -2
  179. package/assets/Cart-B0oxrKWW.js +0 -1
  180. package/assets/Cart-C612IvK3.css +0 -1
  181. package/assets/GetCredits-HKG4BM_P.js +0 -1
  182. package/assets/ItemDetail-Cx-6T0Eg.js +0 -2
  183. package/assets/Success-D8vbmLlB.js +0 -1
  184. package/assets/decimals-Bkiwsrz3.js +0 -1
  185. package/assets/emotion-styled.browser.esm-B7PezGnO.js +0 -1
  186. package/assets/get-ecosystem-wallet-info-WLLUCIzd.js +0 -1
  187. package/assets/network-Dev_1fOd.js +0 -1
  188. package/assets/useTheme-B2pFHCn2.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-29588264451.commit-627b4b7/favicon.ico" sizes="16x16 32x32 48x48" />
20
- <link rel="apple-touch-icon" sizes="180x180" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29588264451.commit-627b4b7/apple-touch-icon.png" />
19
+ <link rel="icon" type="image/x-icon" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29598294884.commit-796c10b/favicon.ico" sizes="16x16 32x32 48x48" />
20
+ <link rel="apple-touch-icon" sizes="180x180" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29598294884.commit-796c10b/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-29588264451.commit-627b4b7/site.webmanifest" />
22
+ <link rel="manifest" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29598294884.commit-796c10b/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-29588264451.commit-627b4b7/sitemap.xml" />
51
+ <link rel="sitemap" type="application/xml" title="Sitemap" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29598294884.commit-796c10b/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-29588264451.commit-627b4b7/assets/index-DgPN63Jh.js"></script>
64
- <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29588264451.commit-627b4b7/assets/react-yytiy0wi.js">
65
- <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29588264451.commit-627b4b7/assets/ethers-DArfy-QF.js">
66
- <link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29588264451.commit-627b4b7/assets/index-BAYW-Y7J.css">
63
+ <script type="module" crossorigin src="https://cdn.decentraland.org/@dcl/shop/0.1.0-29598294884.commit-796c10b/assets/index-r45SswES.js"></script>
64
+ <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29598294884.commit-796c10b/assets/react-yytiy0wi.js">
65
+ <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29598294884.commit-796c10b/assets/ethers-DArfy-QF.js">
66
+ <link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29598294884.commit-796c10b/assets/index-jbcqNek9.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-29588264451.commit-627b4b7",
3
+ "version": "0.1.0-29598294884.commit-796c10b",
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": "627b4b719778f54bf066fa1c1533abfa301ad69b"
11
+ "commit": "796c10bbff12711879f175843e9ca1051f43c2d0"
12
12
  }
@@ -1 +0,0 @@
1
- import{j as e,a as be,b as xe,r as b,L as je}from"./react-yytiy0wi.js";import{C as v,ae as R,af as N,b as fe,d as ke,v as ge,u as Ne,q as Y,ag as ve,A as Ce,t as q,ah as se,ai as we,k as B,h as Se,j as Me,y as Pe,w as ae,aj as Le,z as te,l as Ee,ak as Ie}from"./index-DgPN63Jh.js";import{a as ce}from"./buy-D_7yggiZ.js";import{g as Be,a as Re,w as Te,S as We,G as Ae}from"./buy-gasless-DdXBIm99.js";import{R as F,r as qe}from"./cart-checkout-C6slCzLp.js";import{c as Fe,C as Ue}from"./payments-Cz9uOQEa.js";import"./ethers-DArfy-QF.js";import"./trade-encoding-CWQaROcB.js";import"./index-B2Zw4G7Z.js";function ze(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($e,{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 $e({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),[z,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),q("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),q("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}),q(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 $(){if(!i){f("Sign in to check out.");return}const s=N.getState().items;if(s.length!==0){f(null),W(null),M(!0),q("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 qe(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 $();return}f(null),Z(y.buyable)}}async function pe(){if(z){try{sessionStorage.setItem(F,JSON.stringify(N.getState().items))}catch{}M(!0);try{const s=await Fe(z,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(F)}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(F);if(t){sessionStorage.removeItem(F);const r=JSON.parse(t);Array.isArray(r)&&r.length&&l(r)}}catch{}w.invalidateQueries({queryKey:["usd-balance"]});const s=setTimeout(()=>void $(),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:$,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(ze,{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:z,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
- .checkout{max-width:1510px;margin:0 auto}.checkout__back{display:inline-flex;align-items:center;gap:6px;margin:0 0 16px;padding:0;border:0;background:none;color:var(--text-2);font-size:14px;font-weight:600;letter-spacing:.02em;text-transform:uppercase;cursor:pointer;transition:color .15s ease}.checkout__back:hover{color:var(--accent)}.checkout__back .ico{width:18px;height:18px}.checkout__body{display:grid;grid-template-columns:minmax(0,1fr) 600px;gap:24px;align-items:start}.checkout__panel{min-width:0;background:#fff;border:1px solid var(--line);border-radius:16px;padding:24px}.checkout__panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:24px}.checkout__panel-back{display:none}.checkout__panel-title{margin:0;font-size:18px;font-weight:600;line-height:1.2;color:var(--text)}.checkout__fitting{display:inline-flex;align-items:center;gap:8px;background:#fff;border:1.5px solid #c640cd;border-radius:8px;padding:9px 16px;color:var(--accent);font-size:13px;font-weight:600;letter-spacing:.046em;text-transform:uppercase;white-space:nowrap;transition:background .15s ease}.checkout__fitting:hover:not(:disabled){background:#c640cd0f}.checkout__fitting:disabled{opacity:.55;cursor:default}.checkout__fitting-ico{width:20px;height:20px}.checkout__list{display:flex;flex-direction:column;gap:12px}.checkout__card{position:relative;display:flex;align-items:stretch;gap:12px;background:#fff;border:1px solid #cfcdd4;border-radius:12px;overflow:hidden}.checkout__thumb{position:relative;flex-shrink:0;width:137px;height:137px;background:var(--media);border-radius:12px;display:grid;place-items:center;overflow:hidden}.checkout__thumb img{width:83%;height:83%;object-fit:contain;filter:drop-shadow(.56px 2.25px 2.8px rgba(0,0,0,.1))}.checkout__thumb-check{position:absolute;top:7.5px;left:7.5px;width:20px;height:20px;border-radius:50%;background:#34ce77;display:grid;place-items:center}.checkout__info{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:space-between;gap:8px;padding:16px 8px}.checkout__desc{display:flex;flex-direction:column;gap:4px;min-width:0;padding-right:56px}.checkout__name{font-size:16px;font-weight:600;line-height:1.2;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.checkout__creator{font-size:10px;line-height:1.43;color:var(--muted)}.checkout__foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-right:8px}.checkout__qty{display:inline-flex;align-items:center;gap:8px;padding:5px 10px;border:.5px solid var(--muted-2);border-radius:50px;color:var(--muted-2)}.checkout__qty-sign{width:16px;font-size:18px;line-height:1;text-align:center}.checkout__qty-num{min-width:12px;font-size:14px;font-weight:500;color:var(--text);text-align:center}.checkout__price{display:inline-flex;align-items:center;gap:4px;font-size:24px;font-weight:600;color:var(--text-2)}.checkout__price-ico{width:24px;height:24px;background:var(--accent)}.checkout__price-was{margin-left:6px;font-size:14px;font-weight:500;color:var(--muted);text-decoration:line-through}.checkout__remove{position:absolute;top:12px;right:12px;border:0;background:none;color:var(--muted-2);cursor:pointer;padding:4px;border-radius:8px;display:grid;place-items:center;transition:color .12s ease,background .12s ease}.checkout__remove .ico-trash{width:24px;height:24px}.checkout__remove:hover:not(:disabled){color:var(--dcl-red);background:#ff2d551a}.checkout__remove:disabled{opacity:.5;cursor:default}.checkout__utils{display:flex;gap:20px;margin-top:16px}.checkout__utils .link{font-size:13px;color:var(--muted);font-weight:600}.checkout__utils .link:hover:not(:disabled){color:var(--text)}.checkout__summary{position:sticky;top:172px;display:flex;flex-direction:column;background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px}.checkout__summary-title{margin:0 0 16px;padding-bottom:16px;border-bottom:1px solid #cfcdd4;font-size:20px;font-weight:600;color:var(--text)}.checkout__summary-body{display:flex;flex-direction:column;gap:12px}.checkout__total-line{display:flex;align-items:center;justify-content:space-between;gap:12px}.checkout__total-label{font-size:14px;font-weight:600;color:#5e5b67}.checkout__total-value{display:inline-flex;align-items:center;gap:8px;font-size:24px;font-weight:700;color:var(--text)}.checkout__total-ico{width:24px;height:24px;background:var(--accent)}.checkout__cta{width:100%;height:56px;border:0;border-radius:8px;background:var(--amethyst);color:var(--soft-white);font-size:15px;font-weight:600;letter-spacing:.046em;text-transform:uppercase;cursor:pointer;transition:background .15s ease,filter .15s ease}.checkout__cta:hover:not(:disabled){background:var(--accent)}.checkout__cta:active:not(:disabled){filter:brightness(.95)}.checkout__cta:disabled{opacity:.6;cursor:default}.checkout__msg{margin:0;font-size:13px}.cart-upsell{margin-top:40px}@media(max-width:1080px){.checkout__body{grid-template-columns:1fr}.checkout__summary{position:static}}@media(max-width:880px){.checkout{padding-bottom:188px}.checkout__back{display:none}.checkout__panel{padding:16px}.checkout__panel-head{margin-bottom:16px;gap:8px}.checkout__panel-back{display:inline-flex;align-items:center;flex-shrink:0;border:0;background:none;padding:0;color:var(--text);cursor:pointer}.checkout__panel-back .ico{width:20px;height:20px}.checkout__panel-title{flex:1;min-width:0;font-size:16px}.checkout__fitting{padding:8px 12px;font-size:12px}.checkout__thumb{width:120px;height:120px}.checkout__info{padding:12px 4px 12px 0}.checkout__name{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}.checkout__price{font-size:20px}.checkout__price-ico{width:20px;height:20px}.checkout__summary{position:fixed;left:0;right:0;top:auto;bottom:0;z-index:30;border:0;border-radius:16px 16px 0 0;box-shadow:0 -4px 20px #1615181f}.checkout__summary-title{margin-bottom:12px;padding-bottom:12px}}.cart-checkout__progress-row{display:flex;align-items:center;justify-content:center;gap:8px;width:100%}.cart-checkout__step{font-size:16px;line-height:22px;color:var(--text-2);text-transform:capitalize;white-space:nowrap}.cart-checkout__scroll{display:flex;flex-direction:column;gap:8px;max-height:360px;overflow-y:auto;width:100%;scrollbar-width:thin;scrollbar-color:#a2a2a2 var(--media)}.cart-checkout__scroll::-webkit-scrollbar{width:8px}.cart-checkout__scroll::-webkit-scrollbar-track{background:var(--media);border-radius:10px}.cart-checkout__scroll::-webkit-scrollbar-thumb{background:#a2a2a2;border-radius:8px}.cart-checkout__done{display:flex;flex-direction:column;border:1px solid var(--muted-2);border-radius:16px;padding:24px}.cart-checkout__done-scroll{display:flex;flex-direction:column;gap:12px;max-height:320px;overflow-y:auto}.cart-checkout__done-row{display:flex;align-items:center;gap:12px}.cart-checkout__done-row+.cart-checkout__done-row{border-top:1px solid var(--line);padding-top:12px}.cart-checkout__done-thumb{position:relative;flex-shrink:0;width:96px;height:96px;background:var(--media);border:.13px solid var(--muted-2);border-radius:8px;display:grid;place-items:center;overflow:hidden}.cart-checkout__done-thumb img{width:83%;height:83%;object-fit:contain}.cart-checkout__done-check{position:absolute;top:6px;left:6px;width:20px;height:20px;border-radius:4px;background:var(--dcl-red);display:grid;place-items:center}.cart-checkout__done-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;padding:8px;overflow:hidden}.cart-checkout__done-name{font-size:20px;font-weight:600;line-height:1.4;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cart-checkout__done-creator{font-size:10px;line-height:1.43;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cart-checkout__done-price{display:inline-flex;align-items:center;gap:4px;flex-shrink:0;padding-right:4px;font-size:24px;font-weight:600;color:var(--text-2)}.cart-checkout__done-price-ico{width:24px;height:24px;background:var(--accent)}.cart-checkout__done-body{display:flex;flex-direction:column;gap:12px}.cart-checkout__done-body .buy-modal__success{flex-direction:row;align-items:center;gap:24px;padding:16px 24px}.cart-checkout__done-body .buy-modal__success-text{text-align:left;font-size:18px}.cart-checkout__done-body .buy-modal__btn{min-width:0}@media(max-width:600px){.cart-checkout__done-body .buy-modal__success{flex-direction:column;gap:12px;padding:16px}.cart-checkout__done-body .buy-modal__success-text{text-align:center}.cart-checkout__done{padding:16px}.cart-checkout__done-thumb{width:72px;height:72px}.cart-checkout__done-name{font-size:16px}.cart-checkout__done-price{font-size:20px}.cart-checkout__done-price-ico{width:20px;height:20px}}
@@ -1 +0,0 @@
1
- import{a as K,u as q,r as n,j as e}from"./react-yytiy0wi.js";import{b as Q,u as z,t as p,j as i,k as $,l as G,C as k,m as F}from"./index-DgPN63Jh.js";import{R as Y}from"./resume-buy-Bf0zIH7y.js";import{R as J}from"./cart-checkout-C6slCzLp.js";import{p as L,c as O,i as H,C as W}from"./payments-Cz9uOQEa.js";import{C as I}from"./CircularProgress-Fg-Nhc1W.js";import"./ethers-DArfy-QF.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,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CBVNSjCQ.js","assets/react-yytiy0wi.js","assets/index-DgPN63Jh.js","assets/ethers-DArfy-QF.js","assets/index-BAYW-Y7J.css","assets/emotion-styled.browser.esm-B7PezGnO.js","assets/useTheme-Bf8Lxsxi.js","assets/CircularProgress-Fg-Nhc1W.js","assets/index-ChMOJahJ.js","assets/useTheme-B2pFHCn2.js","assets/CssVarsProvider-D1D1cNqm.js","assets/getOverlayAlpha-CM9JvcJV.js","assets/index-DD6TVIkI.js","assets/colors-LINLm1ux.js"])))=>i.map(i=>d[i]);
2
- import{a as ae,r as n,j as e,d as Ie,b as Ae,L as Se}from"./react-yytiy0wi.js";import{b as se,v as Ee,u as Le,ai as Pe,n as Be,o as Me,y as Re,w as Q,t as z,l as de,z as X,aj as Fe,k as oe,C as S,ae as J,_ as ee,G as Te,J as $e,I as We,aw as Ve,W as qe,i as $,h as fe,ax as Oe,ay as me,A as ze,az as De,af as ue,a as _e,d as O,aA as Ke,aB as Ye,aC as Ge,aD as Ue,aE as He,ap as Qe,aF as Je,aG as Ze,aH as Xe,ag as ea,aI as he,aJ as aa,an as sa,aK as ta,aL as ia,ao as ra,aM as la}from"./index-DgPN63Jh.js";import{b as pe}from"./buy-D_7yggiZ.js";import{g as na,b as ca,w as da,S as oa,G as ma}from"./buy-gasless-DdXBIm99.js";import{C as ua,c as _a}from"./payments-Cz9uOQEa.js";import{R as be}from"./resume-buy-Bf0zIH7y.js";import{C as ha}from"./CircularProgress-Fg-Nhc1W.js";import{u as pa,M as ba}from"./MarketCheckout-Qn1ixrkb.js";import"./ethers-DArfy-QF.js";import"./trade-encoding-CWQaROcB.js";import"./index-B2Zw4G7Z.js";import"./mana-rate-DM_I1GlP.js";function xe(t){const r=t,s=(r.message??"").toLowerCase();return r.code===4001||s.includes("reject")||s.includes("denied")||s.includes("cancel")?"You cancelled the request.":s.includes("not for sale")||s.includes("not found")||s.includes("404")?"This item was just sold or removed.":s.includes("your own listing")?"You can't buy your own listing.":"Couldn't complete the purchase — please try again."}function xa(t){const r=t;return r.code===402||r.status===402||(r.message??"").toLowerCase().includes("insufficient")}const T=ua.slice(0,3);function ya({item:t,onClose:r,resume:s=!1}){var I,G;const{session:l}=se(),{data:c}=Ee(l),h=Le(),f=ae(),[_,d]=n.useState("loading"),[N,a]=n.useState(null),[j,y]=n.useState(""),[g,P]=n.useState(t.priceCredits),[u,o]=n.useState(null),C=n.useRef(null),E=(u==null?void 0:u.credits)??g,w=(c==null?void 0:c.credits)??0;n.useEffect(()=>{let m=!1;if(!l){d("error"),a("Sign in to check out.");return}const v=p=>{const b=p-((c==null?void 0:c.credits)??0),x=T.find(A=>A.credits>=b)??T[T.length-1];y(x.id),z("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:p,credits_balance:(c==null?void 0:c.credits)??0,shortfall:Math.max(0,b)}),d("nofunds")};return(async()=>{var p,b;try{const x=await Pe(t);if(!x)throw new Error("not for sale");if(Be(x,l.address))throw new Error("You can't buy your own listing.");const A=Me((b=(p=x.received)==null?void 0:p[0])==null?void 0:b.amount);if(!Number.isFinite(A)||A<=0)throw new Error("price unavailable");const R=Math.ceil(A/10);if(m)return;if(P(R),c!=null&&c.credits<R){v(R);return}try{const{credit:B,maxCreditedValue:V,usdCents:F}=await Re(l.identity,A,x.id);if(m){Q(l.identity,[B.id]).catch(()=>{});return}C.current=B.id;const k=Math.ceil(F/10);P(k);const q={trade:x,credit:B,maxCreditedValue:V,usdCents:F,credits:k};o(q),s?D(q):d("ready")}catch(B){if(m)return;if(xa(B)){v(R);return}throw B}}catch(x){if(m)return;z(X(x)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:de(x)}),d("error"),a(xe(x))}})(),()=>{m=!0,C.current&&l&&(Q(l.identity,[C.current]).catch(()=>{}),C.current=null)}},[]);async function D(m=u){if(!l||!m)return;d("processing"),a(null);let v=!1;try{const p={trade:m.trade,buyer:l.address,signer:l.signer,credits:[m.credit],maxCreditedValue:m.maxCreditedValue};let b;if(na())try{b=await ca(p),await da(b),v=!0}catch(x){if(x instanceof oa)v=!0;else if(x instanceof ma)b=await pe(p);else throw x}else b=await pe(p);C.current=null,z("Shop Completed Purchase",{...Fe([t]),payment_type:"credits",no_crypto_step:v,transaction_hash:b??null}),h.invalidateQueries({queryKey:["usd-balance"]}),d("complete")}catch(p){X(p)||oe(p,{flow:"buy",step:"submit",gasless:v}),Q(l.identity,[m.credit.id]).catch(()=>{}),C.current=null,z(X(p)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:de(p)}),h.invalidateQueries({queryKey:["usd-balance"]}),a(xe(p)),d("error")}}async function K(){if(!(!j||!l)){try{sessionStorage.setItem(be,JSON.stringify(t))}catch{}u&&Q(l.identity,[u.credit.id]).catch(()=>{}),C.current=null,d("loading");try{const m=await _a(j,{address:l.address,identity:l.identity});if(m.url){window.location.href=m.url;return}f("/credits")}catch(m){oe(m,{flow:"buy_credits_and_item"});try{sessionStorage.removeItem(be)}catch{}a("Couldn't start the credits checkout — please try again."),d("error")}}}const Y=_==="processing",W=_==="complete"?"Purchase complete!":_==="nofunds"?"Buy Credits and Item":"Buy Asset";return e.jsxs("div",{className:"buy-modal",role:"dialog","aria-modal":"true","aria-label":`Buy ${t.name}`,children:[e.jsx("div",{className:"buy-modal__scrim",onClick:Y?void 0:r,"aria-hidden":!0}),e.jsxs("div",{className:`buy-modal__card${_==="processing"||_==="loading"?" buy-modal__card--tall":""}`,children:[e.jsxs("div",{className:"buy-modal__head",children:[e.jsxs("div",{className:"buy-modal__head-row",children:[e.jsx("h2",{className:"buy-modal__title",children:W}),!Y&&e.jsx("button",{className:"buy-modal__x",onClick:r,"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:_==="nofunds"?"DCL Balance:":"My Credits Balance:"}),e.jsx(S,{className:"buy-modal__balance-ico"}),e.jsx("span",{className:"buy-modal__balance-value",children:J(w)})]})]}),_==="loading"&&e.jsx("div",{className:"buy-modal__body buy-modal__processing",children:e.jsx(ha,{size:44})}),_==="error"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsx("p",{className:"buy-modal__error",children:N}),e.jsx("div",{className:"buy-modal__ctas",children:e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient",onClick:r,children:"Close"})})]}),_==="nofunds"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsxs("div",{className:"buy-modal__warning",children:[e.jsxs("svg",{viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":!0,className:"buy-modal__warning-ico",children:[e.jsx("path",{d:"M12 3L2 20h20L12 3z",fill:"none",stroke:"#691fa9",strokeWidth:"1.8",strokeLinejoin:"round"}),e.jsx("path",{d:"M12 9v5",stroke:"#691fa9",strokeWidth:"1.8",strokeLinecap:"round"}),e.jsx("circle",{cx:"12",cy:"17",r:"1.1",fill:"#691fa9"})]}),e.jsxs("p",{className:"buy-modal__warning-text",children:[e.jsx("b",{children:"Insufficient Funds."})," You will need to buy"," ",e.jsxs("b",{children:[Math.max(0,E-w)," Credits"]})," to purchase this item."]})]}),e.jsx(ye,{item:t,priceCredits:E}),e.jsx("div",{className:"buy-modal__packs",children:T.map(m=>{const v=m.credits,p=m.id===j;return e.jsxs("button",{className:`buy-modal__pack${p?" buy-modal__pack--on":""}`,onClick:()=>y(m.id),children:[e.jsx(S,{className:"buy-modal__pack-ico"}),e.jsx("span",{className:"buy-modal__pack-amount",children:J(v)}),e.jsxs("span",{className:"buy-modal__pack-usd",children:["($",m.usd.toFixed(2),")"]})]},m.id)})}),e.jsxs("div",{className:"buy-modal__total",children:[e.jsxs("div",{className:"buy-modal__total-credits",children:[e.jsx(S,{className:"buy-modal__total-ico"}),e.jsx("span",{children:J(((I=T.find(m=>m.id===j))==null?void 0:I.credits)??0)})]}),e.jsxs("span",{className:"buy-modal__total-usd",children:["$",(((G=T.find(m=>m.id===j))==null?void 0:G.usd)??0).toFixed(2)]})]}),e.jsxs("div",{className:"buy-modal__ctas",children:[e.jsx("button",{className:"buy-modal__btn buy-modal__btn--outline",onClick:r,children:"Cancel"}),e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient",onClick:K,children:"Buy"})]})]}),_==="ready"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsx(ye,{item:t,priceCredits:E}),e.jsx("div",{className:"buy-modal__ctas",children:e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient buy-modal__btn--full",onClick:()=>D(),children:"Buy"})})]}),_==="processing"&&e.jsxs("div",{className:"buy-modal__body buy-modal__processing",children:[e.jsx("img",{className:"buy-modal__logo",src:"/icon-192.png",alt:"",width:61,height:61}),e.jsx("div",{className:"buy-modal__processing-text",children:s?"Completing Purchase…":"Completing transaction…"}),e.jsx("div",{className:"buy-modal__progress","aria-hidden":!0,children:e.jsx("span",{className:"buy-modal__progress-fill"})})]}),_==="complete"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsxs("div",{className:"buy-modal__success",children:[e.jsxs("svg",{viewBox:"0 0 64 64",width:"64",height:"64","aria-hidden":!0,children:[e.jsx("circle",{cx:"32",cy:"32",r:"32",fill:"#34ce74"}),e.jsx("path",{d:"M20 33l8 8 16-18",fill:"none",stroke:"#fff",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"})]}),e.jsxs("p",{className:"buy-modal__success-text",children:[e.jsx("b",{children:"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:()=>f("/assets?tab=mine"),children:"My assets"}),e.jsxs("button",{className:"buy-modal__btn buy-modal__btn--ruby",onClick:r,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 ye({item:t,priceCredits:r}){return e.jsxs("div",{className:"buy-modal__asset",children:[e.jsx("div",{className:"buy-modal__asset-thumb",children:t.thumbnail?e.jsx("img",{src:t.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:t.name,children:t.name||"Item"}),t.creator?e.jsxs("div",{className:"buy-modal__asset-creator",children:["By ",t.creator]}):null]}),e.jsxs("div",{className:"buy-modal__asset-price",children:[e.jsx(S,{className:"buy-modal__asset-price-ico"}),e.jsx("span",{children:J(r)})]})]})]})}const fa=n.lazy(async()=>{const[{EmoteControls:t},{Experimental_CssVarsProvider:r},{light:s}]=await Promise.all([ee(()=>import("./index-CBVNSjCQ.js").then(l=>l.i),__vite__mapDeps([0,1,2,3,4,5,6,7])),ee(()=>import("./index-ChMOJahJ.js"),__vite__mapDeps([8,2,1,3,4,9,6,10,11])),ee(()=>import("./index-DD6TVIkI.js"),__vite__mapDeps([12,2,1,3,4,13,11,10,6]))]);return{default:l=>e.jsx(r,{theme:s,children:e.jsx(t,{...l})})}});function va(t){return e.jsx(n.Suspense,{fallback:null,children:e.jsx(fa,{...t})})}function ja({item:t}){const r=se(u=>{var o;return(o=u.session)==null?void 0:o.address}),{data:s,isLoading:l}=Te(r),c=r&&s?r:"default",h=t.category==="emote",[f,_]=n.useState("avatar"),d=!h&&f==="item",[N,a]=n.useState(!0);n.useEffect(()=>{a(!0)},[t.id,d]);const j=!!r&&!!s,y=j&&$e(t,We(s)),g=Ve(t)[0],P=j&&!y&&!h;return e.jsxs(e.Fragment,{children:[l?null:e.jsx(qe,{id:"shop-item-preview",contractAddress:t.contractAddress,tokenId:t.tokenId??void 0,itemId:t.tokenId?void 0:t.itemId??void 0,profile:d?void 0:y?c:"default",bodyShape:d||y?void 0:g,type:h?void 0:d?$.PreviewType.WEARABLE:$.PreviewType.AVATAR,emote:h||d?void 0:$.PreviewEmote.FASHION,disableBackground:!0,wheelZoom:h?1.5:void 0,wheelStart:h?100:void 0,dev:fe.chainId===80002,onLoad:()=>a(!1)},t.id),l||N?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,P&&!d?e.jsxs("p",{className:"item-preview__note",children:["Shown on a ",Oe(g)," body — this item isn’t made for your avatar’s shape."]}):null,h?e.jsx("div",{className:"item-preview__emote-controls",children:e.jsx(va,{wearablePreviewId:"shop-item-preview",hideFrameInput:!0})}):e.jsxs("div",{className:"item-preview__toggle",role:"group","aria-label":"Preview mode",children:[e.jsxs("button",{type:"button",className:f==="avatar"?"is-active":"","aria-pressed":f==="avatar","aria-label":"On avatar",onClick:()=>_("avatar"),children:[e.jsxs("svg",{className:"item-preview__toggle-ico",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:[e.jsx("circle",{cx:"12",cy:"7.5",r:"4"}),e.jsx("path",{d:"M4 20c0-4.2 3.6-6.5 8-6.5s8 2.3 8 6.5v.5H4z"})]}),e.jsx("span",{className:"item-preview__toggle-label",children:"On avatar"})]}),e.jsxs("button",{type:"button",className:f==="item"?"is-active":"","aria-pressed":f==="item","aria-label":"Item",onClick:()=>_("item"),children:[e.jsx("svg",{className:"item-preview__toggle-ico",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:e.jsx("path",{d:"M8.5 3 3 6l1.8 3.8 2.2-1V21h10V8.8l2.2 1L22 6l-5.5-3a2.6 2.6 0 0 1-4.5 1.4A2.6 2.6 0 0 1 8.5 3z"})}),e.jsx("span",{className:"item-preview__toggle-label",children:"Item"})]})]})]})}function ga({title:t,items:r,onViewAll:s}){const l=n.useRef(null),[c,h]=n.useState(1),[f,_]=n.useState(0),[d,N]=n.useState(!0),[a,j]=n.useState(!1),y=n.useCallback(()=>{const u=l.current;if(!u)return;const{scrollLeft:o,scrollWidth:C,clientWidth:E}=u,w=Math.max(1,Math.ceil(C/E));h(w),_(Math.min(w-1,Math.round(o/E))),N(o<=1),j(o+E>=C-1)},[]);if(n.useEffect(()=>{y();const u=l.current;if(u)return u.addEventListener("scroll",y,{passive:!0}),window.addEventListener("resize",y),()=>{u.removeEventListener("scroll",y),window.removeEventListener("resize",y)}},[y,r.length]),r.length===0)return null;function g(u){const o=l.current;o&&o.scrollBy({left:u*o.clientWidth,behavior:"smooth"})}function P(u){const o=l.current;o&&o.scrollTo({left:u*o.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:t}),s?e.jsxs("button",{className:"collection-carousel__viewall",onClick:s,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:()=>g(-1),"aria-label":"Scroll left",disabled:d,children:e.jsx("img",{src:me,alt:"","aria-hidden":!0})}),e.jsx("div",{className:"collection-carousel__track",ref:l,children:r.map(u=>e.jsx(ze,{item:u},u.id))}),e.jsx("button",{className:"collection-carousel__arrow collection-carousel__arrow--right",onClick:()=>g(1),"aria-label":"Scroll right",disabled:a,children:e.jsx("img",{src:me,alt:"","aria-hidden":!0})})]}),c>1?e.jsx("div",{className:"collection-carousel__dots","aria-label":"Carousel pages",children:Array.from({length:c}).map((u,o)=>e.jsx("button",{className:`collection-carousel__dot${o===f?" is-active":""}`,"aria-label":`Go to page ${o+1}`,"aria-current":o===f?"true":void 0,onClick:()=>P(o)},o))}):null]})}function Na({contractAddress:t,name:r,items:s,className:l}){const c=ae();if(!t||!r)return null;const h=(s??[]).map(d=>d.thumbnail).filter(d=>!!d).slice(0,4),f=h.slice(0,2),_=h.slice(2,4);return e.jsxs("button",{className:`creator creator--link${l?` ${l}`:""}`,onClick:d=>{d.stopPropagation(),c(`/collection/${t}`)},children:[h.length>0?e.jsxs("span",{className:"creator__ava collection-collage","aria-hidden":!0,children:[e.jsx("span",{className:`collection-collage__row${_.length===0?" collection-collage__row--full":""}`,children:f.map((d,N)=>e.jsx("img",{src:d,alt:""},N))}),_.length>0?e.jsx("span",{className:"collection-collage__row",children:_.map((d,N)=>e.jsx("img",{src:d,alt:""},N))}):null]}):null,e.jsx("span",{className:"creator__name",children:De(r)})]})}function wa(t){return Object.values($.Rarity).includes(t)}function Ca(t){return t==="male"?"Male":t==="female"?"Female":t==="unisex"?"Unisex":null}function ka(t){return t.wearableCategory?t.wearableCategory.replace(/_/g," "):t.category==="emote"?"Emote":"Wearable"}function Wa(){const{contractAddress:t,tokenId:r}=Ie(),{state:s}=Ae(),l=ae(),c=!!(s!=null&&s.market),h=(s==null?void 0:s.marketPriceCredits)??null,f=ue(i=>i.add),_=ue(i=>i.items),d=_e(i=>i.toggle),{session:N}=se(),[a,j]=n.useState(()=>s!=null&&s.item?{...s.item,tradeId:s.tradeId??s.item.tradeId}:{id:`${t}-${r}`,name:"",creator:"",contractAddress:t??"",itemId:null,category:"wearable",rarity:"common",network:"MATIC",chainId:fe.chainId,thumbnail:"",priceCredits:0,gender:null,isSmart:!1,tokenId:r??void 0,tradeId:s==null?void 0:s.tradeId}),[y,g]=n.useState(!1),[P,u]=n.useState(!!(s!=null&&s.resumeBuy));n.useEffect(()=>{s!=null&&s.resumeBuy&&g(!0)},[s==null?void 0:s.resumeBuy]);const{data:o=[],isFetched:C}=O({queryKey:["collection-items",a.contractAddress],enabled:!!a.contractAddress,queryFn:()=>sa(a.contractAddress,{first:20}).then(i=>i.items)}),E=a.available==null&&!a.tokenId,{data:w,isLoading:D}=O({queryKey:["shop-item",a.contractAddress,r],enabled:!c&&!!a.contractAddress&&!!r&&(!(s!=null&&s.item)||E),queryFn:()=>ta(a.contractAddress,r)});n.useEffect(()=>{w&&j(i=>i.tradeId?i.available!=null&&i.wearableCategory?i:{...i,available:i.available??w.available,wearableCategory:i.wearableCategory??w.wearableCategory}:{...w})},[w]);const[K,Y]=n.useState(!1),{data:W=""}=O({queryKey:["item-desc",a.contractAddress,a.itemId],enabled:!!a.contractAddress&&!!a.itemId,staleTime:5*6e4,queryFn:()=>ia(a.contractAddress,a.itemId)}),{data:I}=O({queryKey:["collection-meta",a.contractAddress],enabled:!!a.contractAddress,staleTime:5*6e4,queryFn:()=>ra(a.contractAddress)});n.useEffect(()=>{if(a.name||w||o.length===0)return;const i=r&&o.find(L=>L.tokenId===r||L.itemId===r)||o.find(L=>L.contractAddress===a.contractAddress);i&&j(L=>({...i,tradeId:L.tradeId??i.tradeId}))},[o,w]);const G=n.useMemo(()=>{const i=new Set,L=[];for(const M of o){if(M.id===a.id||a.itemId&&M.itemId===a.itemId||a.tokenId&&M.tokenId===a.tokenId)continue;const ce=`${M.contractAddress}-${M.itemId??M.tokenId??M.id}`;i.has(ce)||(i.add(ce),L.push(M))}return L},[o,a.id,a.itemId,a.tokenId]),{data:m,isLoading:v}=O({queryKey:["detail-trade",a.id,a.tradeId,a.contractAddress,a.itemId],enabled:!!a.contractAddress,queryFn:async()=>{if(a.tradeId)return a.tradeId;if(a.itemId){const i=await la(a.contractAddress,a.itemId);return(i==null?void 0:i.id)??null}return null}}),p=a.tradeId??m??void 0,b=!!p,{data:x}=pa(c),A=n.useMemo(()=>{if(!c||!(s!=null&&s.item))return null;const i=s.item;return i.manaWei?{tradeId:i.tradeId??i.id,listingType:"primary",contractAddress:i.contractAddress,itemId:i.itemId??"",name:i.name,thumbnail:i.thumbnail,rarity:i.rarity,category:i.category,wearableCategory:i.wearableCategory??null,creator:i.creator,manaWei:i.manaWei,available:1,network:i.network,chainId:i.chainId,createdAt:0}:null},[c,s==null?void 0:s.item]),R=c&&h!=null&&!!x&&!!A,B=Ke({priceCredits:a.priceCredits,compareAtCredits:a.compareAtCredits,saleEndsAt:a.saleEndsAt}),V=n.useMemo(()=>({...a,tradeId:p,id:p??a.id}),[a,p]),F=_.some(i=>i.id===V.id),k=_e(i=>!!i.items[a.id]),q=n.useRef(null);n.useEffect(()=>{!a.name||v||q.current===a.id||(q.current=a.id,z("Shop Viewed Item",{...Ye(a),for_sale:b}),Ge(a))},[a.id,a.name,v,b]);const U=`${t}/${r}`,te=n.useRef(U);n.useEffect(()=>{te.current!==U&&(te.current=U,s!=null&&s.item&&j({...s.item,tradeId:s.tradeId??s.item.tradeId}),typeof window<"u"&&window.scrollTo({top:0,behavior:"smooth"}))},[U]);function ve(){!b||F||H||f(V,"item_detail")}const Z=wa(a.rarity)?a.rarity:$.Rarity.COMMON,ie=Ca(a.gender),re=Ue(a),le=He(a.gender),je=b&&B,ge="More from this collection",H=Qe(a,N==null?void 0:N.address),ne=b?F?"In cart":v?"Checking…":"Add to cart":"Not for sale",Ne=typeof a.available=="number"&&a.available>0&&!a.tokenId&&!c,we=!H&&b&&!c,Ce=c||!H,ke=D||!!a.contractAddress&&!C;return!a.name&&!ke?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:a.name||"Item"})]}),e.jsxs("div",{className:"item-detail__main",children:[e.jsxs("div",{className:"item-detail__preview",children:[a.name?e.jsx(ja,{item:a}):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.jsx("button",{className:`item-detail__fav item-detail__fav--preview${k?" is-on":""}`,onClick:()=>d(a),"aria-pressed":k,"aria-label":k?"Remove from favorites":"Add to favorites",children:e.jsx("span",{className:`ico ${k?"ico-heart-solid":"ico-heart"}`,"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:a.name||"Loading…"}),e.jsx("button",{className:`item-detail__fav${k?" is-on":""}`,onClick:()=>d(a),"aria-pressed":k,"aria-label":k?"Remove from favorites":"Add to favorites",children:e.jsx("span",{className:`ico ${k?"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:Xe(Z),color:Ze(Z)},title:Je(a.rarity),children:a.rarity}),e.jsxs("span",{className:"chip item-detail__chip",children:[re?e.jsx("span",{className:`ico ico-${re} item-detail__chip-ico`,"aria-hidden":!0}):null,ka(a)]}),ie?e.jsxs("span",{className:"chip item-detail__chip",children:[le?e.jsx("span",{className:`ico ico-${le} item-detail__chip-ico`,"aria-hidden":!0}):null,ie]}):null]}),W?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${K?" is-expanded":""}`,children:W}),W.length>140?e.jsx("button",{className:"link item-detail__desc-toggle",onClick:()=>Y(i=>!i),children:K?"Show less":"Read more"}):null]}):null,a.creator||I!=null&&I.name?e.jsxs("div",{className:"item-detail__meta",children:[a.creator?e.jsxs("div",{className:"item-detail__meta-col",children:[e.jsx("div",{className:"item-detail__label",children:"Creator"}),e.jsx(ea,{address:a.creator,className:"item-detail__creator",linkToProfile:!0,hidePrefix:!0})]}):null,I!=null&&I.name?e.jsxs("div",{className:"item-detail__meta-col item-detail__meta-col--collection",children:[e.jsx("div",{className:"item-detail__label",children:"Collection"}),e.jsx(Na,{contractAddress:a.contractAddress,name:I.name,items:o,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"}),c?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"item-detail__price item-detail__price--market",children:h==null?e.jsx("span",{className:"item-detail__price-value",children:"—"}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"item-detail__approx","aria-hidden":!0,children:"≈"}),e.jsx(S,{className:"item-detail__diamond"}),e.jsx("span",{className:"item-detail__price-value",children:h})]})}),e.jsx("div",{className:"item-detail__market-note muted",children:"Market price"})]}):b?je?e.jsxs("div",{className:"item-detail__price item-detail__price--sale",children:[e.jsxs("span",{className:"item-detail__price",children:[e.jsx(S,{className:"item-detail__diamond"}),e.jsx("span",{className:"item-detail__price-value",children:a.priceCredits})]}),e.jsxs("span",{className:"item-detail__price-was",children:[e.jsx(S,{className:"item-detail__diamond item-detail__diamond--was"}),a.compareAtCredits]}),he(a.compareAtCredits,a.priceCredits)>0?e.jsxs("span",{className:"item-detail__sale-badge",children:["SALE -",he(a.compareAtCredits,a.priceCredits),"%"]}):null,e.jsx(aa,{endsAt:a.saleEndsAt,className:"item-detail__countdown"})]}):e.jsxs("div",{className:"item-detail__price",children:[e.jsx(S,{className:"item-detail__diamond"}),e.jsx("span",{className:"item-detail__price-value",children:a.priceCredits})]}):e.jsx("div",{className:"item-detail__price item-detail__price--none",children:"Not for sale"})]}),Ne?e.jsxs("div",{className:"item-detail__stock-col",children:[e.jsx("div",{className:"item-detail__price-label",children:"Stock"}),e.jsxs("div",{className:"item-detail__stock-value",children:[(a.available??0).toLocaleString(),"/",$.Rarity.getMaxSupply(Z).toLocaleString()]})]}):null]})}),e.jsx("div",{className:`item-detail__ctas${Ce?" item-detail__ctas--buttons":""}${we?" item-detail__ctas--dual":""}`,children:c?e.jsxs("button",{className:"btn btn--purple item-detail__cta",onClick:()=>g(!0),disabled:!R,children:[e.jsx("span",{className:"item-detail__cta-label",children:"Buy now"}),h!=null?e.jsxs("span",{className:"item-detail__cta-price","aria-hidden":!0,children:[e.jsx(S,{className:"item-detail__cta-diamond"}),h]}):null]}):H?e.jsxs("p",{className:"item-detail__own-note muted",children:["This is your item — manage it in ",e.jsx(Se,{to:"/my-assets",children:"My Assets"}),"."]}):e.jsxs(e.Fragment,{children:[b?e.jsxs("button",{className:"btn btn--purple item-detail__cta",onClick:()=>g(!0),disabled:v,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(S,{className:"item-detail__cta-diamond"}),a.priceCredits]})]}):null,e.jsxs("button",{className:"item-detail__addcart",onClick:ve,disabled:!b||F||v,"aria-label":ne,children:[e.jsx("span",{className:"ico ico-cart-solid item-detail__addcart-ico","aria-hidden":!0}),e.jsx("span",{className:"item-detail__addcart-label",children:ne})]})]})})]})]}),e.jsx(ga,{title:ge,items:G,onViewAll:a.contractAddress?()=>l(`/collection/${a.contractAddress}`):void 0}),y&&c&&A&&x?e.jsx(ba,{listing:A,rate:x,onClose:()=>g(!1),onSold:()=>g(!1)}):y&&!c?e.jsx(ya,{item:V,resume:P,onClose:()=>{g(!1),u(!1)}}):null]})}export{Wa as ItemDetail,Wa as default};
@@ -1 +0,0 @@
1
- import{j as e,b as E,a as $,N as F,r as w}from"./react-yytiy0wi.js";import{b as T,G as C,H as V,I as M,J as R,K as L,L as B,W as I,i as _,h as g,M as K}from"./index-DgPN63Jh.js";import{s as O}from"./wallet-kind-Jzl4cyiP.js";import{w as U,S as W}from"./buy-gasless-DdXBIm99.js";import"./ethers-DArfy-QF.js";import"./trade-encoding-CWQaROcB.js";import"./index-B2Zw4G7Z.js";function Y(){return e.jsxs("div",{className:"success-anim",role:"img","aria-label":"Purchase successful",children:[e.jsxs("svg",{className:"success-anim__svg",viewBox:"0 0 120 120",children:[e.jsx("circle",{className:"success-anim__ring",cx:"60",cy:"60",r:"54"}),e.jsx("path",{className:"success-anim__check",d:"M37 61 l16 16 l30 -34"})]}),e.jsx("span",{className:"success-anim__spark success-anim__spark--1","aria-hidden":!0,children:"✦"}),e.jsx("span",{className:"success-anim__spark success-anim__spark--2","aria-hidden":!0,children:"✦"}),e.jsx("span",{className:"success-anim__spark success-anim__spark--3","aria-hidden":!0,children:"◈"}),e.jsx("span",{className:"success-anim__spark success-anim__spark--4","aria-hidden":!0,children:"✦"})]})}const z=t=>new Promise(s=>setTimeout(s,t));function H(t,s){const[a,o]=w.useState(t?"pending":"confirmed"),d=s?`${s.owner}-${s.contractAddress}-${s.itemId}`:"";return w.useEffect(()=>{if(!t)return;let r=!1;return(async()=>{let h=!1;for(let n=0;n<20&&!r;n++)try{await U(t,{timeoutMs:15e3}),h=!0;break}catch(c){if(c instanceof W)continue;r||o("failed");return}if(!r){if(!h){o("timed-out");return}if(!s){o("confirmed");return}o("indexing");for(let n=0;n<40&&!r;n++){if(await K(s.owner,s.contractAddress,s.itemId)){r||o("confirmed");return}await z(3e3)}r||o("timed-out")}})(),()=>{r=!0}},[t,d]),a}const J=g.chainId===80002?"https://decentraland.zone/jump":"https://decentraland.org/jump",x=g.chainId===80002?"https://amoy.polygonscan.com/tx/":"https://polygonscan.com/tx/";function se(){const{state:t}=E(),s=$(),{session:a}=T(),{data:o}=C(a==null?void 0:a.address),d=t==null?void 0:t.txHash,r=(t==null?void 0:t.items)??[],l=r[0],h=a!=null&&a.address&&(l!=null&&l.contractAddress)&&(l!=null&&l.itemId)?{owner:a.address,contractAddress:l.contractAddress,itemId:l.itemId}:null,n=H(d,h),c=r;if(c.length===0)return e.jsx(F,{to:"/assets",replace:!0});const u=c[0],j=c.filter(i=>i.category!=="emote"),A=c.find(i=>i.category==="emote")??null,b=j.map(V).filter(i=>!!i),f=M(o),S=!!f&&j.every(i=>R(i,f)),P=L(j)??f??B,v=!!(a!=null&&a.address)&&S,y=v?a.address:"default",k=v?void 0:P,m=A??u,N=m.category==="emote",p=!!d&&O(a==null?void 0:a.providerType);return e.jsxs("div",{className:"success",children:[e.jsx("div",{className:"success__preview",children:b.length>0?e.jsx(I,{profile:y,bodyShape:k,urns:b,type:_.PreviewType.AVATAR,emote:_.PreviewEmote.FASHION,background:"ecebed",dev:g.chainId===80002},u.id):e.jsx(I,{contractAddress:m.contractAddress,tokenId:m.tokenId??void 0,itemId:m.tokenId?void 0:m.itemId??void 0,profile:y,bodyShape:N?void 0:k,type:N?void 0:_.PreviewType.AVATAR,emote:N?void 0:_.PreviewEmote.FASHION,background:"ecebed",dev:g.chainId===80002},m.id)}),e.jsx("div",{className:"success__panel",children:n==="pending"||n==="indexing"?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"spinner success__spinner","aria-hidden":!0}),e.jsx("h1",{className:"success__title",children:n==="indexing"?"Finalizing your purchase…":"Processing your purchase…"}),e.jsx("p",{className:"success__sub",children:n==="indexing"?e.jsxs(e.Fragment,{children:["Payment confirmed — adding"," ",c.length===1?e.jsx("strong",{children:u.name}):`${c.length} items`," to your wardrobe. Almost there."]}):e.jsxs(e.Fragment,{children:["Confirming ",c.length===1?e.jsx("strong",{children:u.name}):`${c.length} items`," on-chain. This usually takes a few seconds — keep this tab open."]})}),p?e.jsx("div",{className:"success__links",children:e.jsx("a",{className:"success__receipt",href:`${x}${d}`,target:"_blank",rel:"noreferrer",children:"View transaction ↗"})}):null]}):n==="timed-out"?e.jsxs(e.Fragment,{children:[e.jsx("h1",{className:"success__title",children:"Still processing…"}),e.jsxs("p",{className:"success__sub",children:["This is taking longer than usual to confirm. Your purchase may still complete — check"," ",e.jsx("button",{className:"link",onClick:()=>s("/my-purchases"),children:"My Purchases"})," ","in a few minutes to see the final status. No need to buy again."]}),e.jsx("div",{className:"success__links",children:p?e.jsx("a",{className:"success__receipt",href:`${x}${d}`,target:"_blank",rel:"noreferrer",children:"View transaction ↗"}):null}),e.jsxs("div",{className:"success__actions",children:[e.jsx("button",{className:"btn btn--purple",onClick:()=>s("/my-purchases"),children:"View my purchases"}),e.jsx("button",{className:"btn btn--ghost",onClick:()=>s("/assets"),children:"Keep shopping"})]})]}):n==="failed"?e.jsxs(e.Fragment,{children:[e.jsx("h1",{className:"success__title",children:"Your purchase didn’t go through"}),e.jsx("p",{className:"success__sub",children:"The transaction failed on-chain, so nothing was delivered. Your credits weren’t spent (any hold is released shortly) — you can try again."}),e.jsx("div",{className:"success__links",children:p?e.jsx("a",{className:"success__receipt",href:`${x}${d}`,target:"_blank",rel:"noreferrer",children:"View transaction ↗"}):null}),e.jsx("div",{className:"success__actions",children:e.jsx("button",{className:"btn btn--purple",onClick:()=>s("/assets"),children:"Back to shop"})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Y,{}),e.jsx("h1",{className:"success__title",children:"It’s yours!"}),c.length===1?e.jsxs("p",{className:"success__sub",children:[e.jsx("strong",{children:u.name})," is now in your wardrobe."]}):e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"success__sub",children:[c.length," items are now in your wardrobe."]}),e.jsx("ul",{className:"success__list",children:c.map(i=>e.jsx("li",{children:i.name},i.id))})]}),e.jsxs("div",{className:"success__links",children:[e.jsx("button",{className:"success__receipt",onClick:()=>s("/my-purchases"),children:"View order"}),p?e.jsx("a",{className:"success__receipt",href:`${x}${d}`,target:"_blank",rel:"noreferrer",children:"View transaction ↗"}):null]}),e.jsxs("div",{className:"success__actions",children:[e.jsx("a",{className:"btn btn--purple",href:J,target:"_blank",rel:"noreferrer",children:"Use it in-world"}),e.jsx("button",{className:"btn btn--ghost",onClick:()=>s("/assets"),children:"Keep shopping"})]})]})})]})}export{se as Success,se as default};
@@ -1 +0,0 @@
1
- import{w as r}from"./utils-BDQ8DS2k.js";import{d as a}from"./decimals-DAdpv8M5.js";import"./ethers-DArfy-QF.js";import"./react-yytiy0wi.js";import"./signing-DznnvpB3.js";import"./index-DgPN63Jh.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{R as z,$ as I,a0 as j,a1 as q,a2 as R,a3 as A,a4 as D,a5 as G,a6 as U}from"./index-DgPN63Jh.js";import{r as c}from"./react-yytiy0wi.js";var V=I,W=function(e){return e!=="theme"},E=function(e){return typeof e=="string"&&e.charCodeAt(0)>96?V:W},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},$=function(e){var t=e.cache,s=e.serialized,r=e.isStringTag;return D(t,s,r),G(function(){return U(t,s,r)}),null},B=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=R(u.registered,F,a.className):a.className!=null&&(f=a.className+" ");var N=A(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($,{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}},H=["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=B.bind(null);H.forEach(function(o){T[o]=T(o)});export{T as n};
@@ -1 +0,0 @@
1
- import{g as i}from"./wallets-_A4Bjek9.js";import"./signing-DznnvpB3.js";import"./utils-BDQ8DS2k.js";import"./ethers-DArfy-QF.js";import"./react-yytiy0wi.js";import"./index-DgPN63Jh.js";import"./store-CraP4F4Y.js";import"./hashTypedData-DONiI8QZ.js";import"./index-BIJTdhnz.js";import"./events-DQ172AOg.js";import"./index-gEVnIhEr.js";import"./index-C6Uar8kN.js";import"./index-nibyPLVP.js";import"./index-CJdot1dH.js";import"./index-Bj7GkEZm.js";import"./ethereum-gQdvRN4F.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{r}from"./index-DgPN63Jh.js";var e=r();export{e as n};
@@ -1 +0,0 @@
1
- import"./react-yytiy0wi.js";import{T as m,s as t}from"./index-DgPN63Jh.js";import{u as o}from"./useTheme-Bf8Lxsxi.js";function a(){const e=o(t);return e[m]||e}export{a as u};