@dcl/shop 0.1.0-29819574895.commit-1be9890 → 0.1.0-29820315471.commit-e34db25
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.
- package/assets/{AnimatedBackground-BB18aGoi.js → AnimatedBackground-DQ46urVV.js} +1 -1
- package/assets/{Assets-DwmQyI4I.js → Assets-5wZu90xj.js} +1 -1
- package/assets/Cart-DDgcOTzw.js +3 -0
- package/assets/Cart-DXZzP7Af.css +1 -0
- package/assets/{CircularProgress-BX-j97co.js → CircularProgress-CfcEerVP.js} +1 -1
- package/assets/{Collection-DFs882M1.js → Collection-Bi7w1GKJ.js} +1 -1
- package/assets/{CollectionCarousel-DPzQqA3V.js → CollectionCarousel-Bu8qPKKJ.js} +1 -1
- package/assets/{Creator-GAJcABp8.js → Creator-B13Gi9z4.js} +1 -1
- package/assets/{CssVarsProvider-COXz1SZ5.js → CssVarsProvider-CvtfLfCd.js} +1 -1
- package/assets/{ExchangeController-Dxc2zJCM.js → ExchangeController-B9D_7PXu.js} +1 -1
- package/assets/{GetCredits-B_H2NrZO.js → GetCredits-C3rj35ez.js} +1 -1
- package/assets/{HelpersUtil-BWz5mtlg.js → HelpersUtil-CNtn9Kzj.js} +1 -1
- package/assets/{ImportListings-BKjhIrHh.js → ImportListings-hNp1sEuT.js} +1 -1
- package/assets/ItemDetail-BqrPvIRT.js +29 -0
- package/assets/{LoadMore-DWBrwti5.js → LoadMore-CwKrPv19.js} +1 -1
- package/assets/{MarketCheckout-DBP_j8E8.js → MarketCheckout-D-VQDb7F.js} +1 -1
- package/assets/{MyAssets-BFRWzZu9.js → MyAssets-CzmZ_l10.js} +1 -1
- package/assets/{MyFavorites-B3M7wvJE.js → MyFavorites-CdAcz-wK.js} +1 -1
- package/assets/{MyPurchases-C30sLRPh.js → MyPurchases-Bw8Lb-63.js} +1 -1
- package/assets/{NotFound-CAJ5qxaS.js → NotFound-C3wbCG4q.js} +1 -1
- package/assets/{StoreSettings-BAB7veQ7.js → StoreSettings-BhJ4tKkZ.js} +1 -1
- package/assets/{Success-DEUBa-He.js → Success-CiXoIPVr.js} +1 -1
- package/assets/{SwapController-BQcXbG1U.js → SwapController-53Vi_fXW.js} +1 -1
- package/assets/{TradeService-wzxIIwxb.js → TradeService-C8gY38rG.js} +1 -1
- package/assets/{W3MFrameProviderSingleton-Crc70eR6.js → W3MFrameProviderSingleton-CaYG210l.js} +3 -3
- package/assets/{WebCryptoP256-aK_AglSp.js → WebCryptoP256-DtgFm5FB.js} +1 -1
- package/assets/{basic-TwrGAovp.js → basic-Ch9NQwrH.js} +1 -1
- package/assets/{biconomy-D8X3NjQh.js → biconomy-TNDCvsRI.js} +1 -1
- package/assets/{buy-DZ_7JRMI.js → buy-BPkraJ17.js} +1 -1
- package/assets/{buy-gasless-BYas5NEq.js → buy-gasless-uVyAhlxN.js} +1 -1
- package/assets/cart-checkout-Co7t_k8J.js +1 -0
- package/assets/{categories-Eg0M4x1-.js → categories-pY-U0UXm.js} +1 -1
- package/assets/{ccip-EZ4IbM1x.js → ccip-BAHa2VFa.js} +1 -1
- package/assets/{ccip-DVEOkLHE.js → ccip-scmwpqQC.js} +1 -1
- package/assets/{collection-DVfZRA_s.js → collection-BdgBOuhz.js} +1 -1
- package/assets/{controller-DDQ9r5Zw.js → controller-DGvMtERc.js} +2 -2
- package/assets/{core-DnULoqUc.js → core-DflkIDmd.js} +4 -4
- package/assets/{custom-BVPQfFkf.js → custom-DclbkPm_.js} +1 -1
- package/assets/{data-capture-D5QKO7xh.js → data-capture-D7FmI-WY.js} +1 -1
- package/assets/{decimals-Bnwap2o7.js → decimals-B34hEReu.js} +1 -1
- package/assets/{decimals-CM3PRnCU.js → decimals-Cd90iC1A.js} +1 -1
- package/assets/{detectExtension-C4Pgm49m.js → detectExtension-BCqIz4gv.js} +1 -1
- package/assets/{email-DkTRtnoT.js → email-B6HsCs0u.js} +1 -1
- package/assets/{embedded-wallet-D8ksuIfn.js → embedded-wallet-cye2mSzK.js} +1 -1
- package/assets/{emotion-styled.browser.esm-9a0DfT6j.js → emotion-styled.browser.esm-B-hzcBrK.js} +1 -1
- package/assets/{engine-CguikVMG.js → engine-CMumcr4T.js} +1 -1
- package/assets/{errors-BLnaqG_B.js → errors-qUwGIanA.js} +1 -1
- package/assets/{estimate-l1-fee-hpFskH2I.js → estimate-l1-fee-DebL8v3Z.js} +1 -1
- package/assets/{eth_estimateGas-BhfEX-GI.js → eth_estimateGas-2pKUTcbV.js} +1 -1
- package/assets/{eth_getStorageAt-Tz9jCxoP.js → eth_getStorageAt-CFTZVftG.js} +1 -1
- package/assets/{eth_getTransactionCount-BVCBcZZu.js → eth_getTransactionCount-39Gh8JUo.js} +1 -1
- package/assets/{extractIPFS-CMCcv5z6.js → extractIPFS-PVH2EVQE.js} +1 -1
- package/assets/{features-CzzmTmz6.js → features-D9Taji2F.js} +1 -1
- package/assets/{fetchTokenMetadata-fO_WCHKz.js → fetchTokenMetadata-DM2B3NZz.js} +2 -2
- package/assets/{get-ecosystem-wallet-info-B4AmC5vV.js → get-ecosystem-wallet-info-kEbf8Llc.js} +1 -1
- package/assets/{getBalance-BgVIQwTj.js → getBalance-B4GGi_h8.js} +1 -1
- package/assets/{getInstalledModules-DqkyXX3r.js → getInstalledModules-W39oQBw8.js} +1 -1
- package/assets/{getNFT-BFIDUQnN.js → getNFT-COMLY0k-.js} +1 -1
- package/assets/{getNFT-2lQKZO83.js → getNFT-_ore7rdY.js} +2 -2
- package/assets/{getOverlayAlpha-BwKPCnfl.js → getOverlayAlpha-BX66SxOu.js} +1 -1
- package/assets/{hashTypedData-CFsiTYnX.js → hashTypedData-C9Vn70Lp.js} +1 -1
- package/assets/{hashTypedData-Garf5jDo.js → hashTypedData-CxL0SEsX.js} +1 -1
- package/assets/{import-C5JuvyaY.js → import-C7kEB_S5.js} +1 -1
- package/assets/{in-app-wallet-calls-B-TxFf7j.js → in-app-wallet-calls-Dv5D-qmW.js} +1 -1
- package/assets/{index-BOv7UHw4.js → index--KLajle8.js} +1 -1
- package/assets/{index-jB4CyxiC.js → index-3j2VRNSj.js} +2 -2
- package/assets/{index-Cv9eOJhC.js → index-B1ztebBZ.js} +1 -1
- package/assets/{index-BXnjb5mx.js → index-B6A_pOmU.js} +1 -1
- package/assets/{index-B7RoYrRU.js → index-BB3seE1H.js} +1 -1
- package/assets/{index-CvHkCaC2.js → index-BHvu7he_.js} +1 -1
- package/assets/{index-BvS-mJPm.js → index-BNabonCc.js} +1 -1
- package/assets/{index-B8F7uv85.js → index-BPURGbOI.js} +2 -2
- package/assets/{index-DR6wyJjC.js → index-BXG5dCKJ.js} +1 -1
- package/assets/{index-DmYb9BOo.js → index-BZ2A41zN.js} +1 -1
- package/assets/{index-CuQsWl3Z.js → index-Bbub8cs6.js} +3 -3
- package/assets/{index-BK7w_jg4.js → index-BdsoQlUk.js} +1 -1
- package/assets/{index-Credvs-k.js → index-BhokrOsa.js} +1 -1
- package/assets/{index-0PoIqfAn.js → index-BmTc8K12.js} +1 -1
- package/assets/{index-BYjMsBUY.js → index-BoB0Y302.js} +1 -1
- package/assets/{index-CSasgQRe.js → index-BtOJu30H.js} +1 -1
- package/assets/{index-CRRvNa9_.js → index-BvjAr8nY.js} +1 -1
- package/assets/{index-D6vHueH_.js → index-BznxuYKb.js} +1 -1
- package/assets/{index-BsnBrX5F.js → index-C-PXxORu.js} +1 -1
- package/assets/{index-D3XlIZsg.js → index-CF-ZZ_LW.js} +1 -1
- package/assets/{index-D3l3GGHs.js → index-CFcehHl6.js} +1 -1
- package/assets/{index-HwYgzTtv.js → index-CTJrkNxC.js} +1 -1
- package/assets/{index-DKaxPxBD.js → index-CUImhRoy.js} +1 -1
- package/assets/{index-BK3e0Hdi.js → index-CcFuTBt3.js} +1 -1
- package/assets/{index-De99eSAL.js → index-CcSs3xun.js} +1 -1
- package/assets/{index-p5M_DJiq.js → index-CigjJrdx.js} +1 -1
- package/assets/{index-CIeAhK29.js → index-CkezkMvS.js} +2 -2
- package/assets/{index-BppFJCy0.js → index-CobH2y5K.js} +1 -1
- package/assets/{index-CdMmldko.js → index-CzWl3qk_.js} +1 -1
- package/assets/{index-CndiTQRa.js → index-D1hhOo8i.js} +1 -1
- package/assets/{index-DGLZfcDr.js → index-D5DA5XrX.js} +1 -1
- package/assets/{index-DEYY549Z.js → index-D9VTjnkt.js} +1 -1
- package/assets/{index-BwdXphJH.js → index-DCPsmlPD.js} +1 -1
- package/assets/{index-WK0UJmsO.js → index-DEN3gLrI.js} +1 -1
- package/assets/{index-B79AoJoF.js → index-DTSgeQ5D.js} +1 -1
- package/assets/{index-jFa59Hyg.js → index-DXDtFVPs.js} +1 -1
- package/assets/{index-DUjkyDeu.js → index-DbYRql_-.js} +1 -1
- package/assets/{index-DUZRVKyr.js → index-Dc1jVnMf.js} +3 -3
- package/assets/{index-CS8zRo9U.js → index-DpRVy6UQ.js} +1 -1
- package/assets/{index-DysYInn2.js → index-DuRVCvRc.js} +1 -1
- package/assets/{index-BeLgCkFf.js → index-I594L5Wd.js} +1 -1
- package/assets/{index-DNP6JUva.js → index-Tvwwbs5L.js} +1 -1
- package/assets/{index-D_NfPBVk.js → index-VhulZp0_.js} +1 -1
- package/assets/{index-CsoC73Bm.js → index-W7cyhQOk.js} +1 -1
- package/assets/{index-wk0ZPUph.js → index-boL29_Yj.js} +1 -1
- package/assets/{index-kiuUdw-p.js → index-d4x-ttpO.js} +30 -30
- package/assets/{index-Ds-G27vp.js → index-nyWvMhrR.js} +1 -1
- package/assets/{index-lpmUOPy0.js → index-sBxcn5Yg.js} +1 -1
- package/assets/{index-Bb_-f1jJ.js → index-txCoS8XJ.js} +1 -1
- package/assets/{index-B4GcGq_I.js → index-vqW6dFQp.js} +1 -1
- package/assets/{index-10WMO2vw.js → index-xAQNqr4T.js} +1 -1
- package/assets/{index.es-BdFuzjq_.js → index.es-CX7mxtcH.js} +4 -4
- package/assets/{index.es-hC-s8UNZ.js → index.es-DHRIRbEx.js} +1 -1
- package/assets/{index.es-D2pKkRc9.js → index.es-Dzc3VMLo.js} +1 -1
- package/assets/{localBatchGatewayRequest-D2LVLe-7.js → localBatchGatewayRequest-DPQULVCl.js} +1 -1
- package/assets/{mana-rate-CFV-b8jH.js → mana-rate-BWFOkvpC.js} +1 -1
- package/assets/{networks-Cppx3wem.js → networks-h2z6LNz5.js} +1 -1
- package/assets/{onramp-CRfISLNH.js → onramp-DkkFwfD-.js} +1 -1
- package/assets/{openzeppelin-D6i2TljE.js → openzeppelin-Dt8oZ76u.js} +1 -1
- package/assets/{ownerOf-BNR_Fc8c.js → ownerOf-D61ptJju.js} +1 -1
- package/assets/{parseNft-De-nBwAs.js → parseNft-DF9_xc-W.js} +2 -2
- package/assets/{parseSignature-Dhs4VV5T.js → parseSignature-BGy6ebQm.js} +1 -1
- package/assets/{parseSignature-DVHkNMe8.js → parseSignature-CoN-flwV.js} +3 -3
- package/assets/{pay-with-exchange-BHEfXY31.js → pay-with-exchange-CrvAas-k.js} +1 -1
- package/assets/{payments-Dlf2JvWP.js → payments-DEbBixXM.js} +1 -1
- package/assets/{qr-overlay-Dtqijola.js → qr-overlay-_AYDDd2P.js} +1 -1
- package/assets/{receive-BKuNny9t.js → receive-BikF2OCK.js} +1 -1
- package/assets/{resolveImplementation-BBYHdeOd.js → resolveImplementation-CyERb8Bt.js} +1 -1
- package/assets/{rpc-DPVk3wS7.js → rpc-Bj2mehcE.js} +1 -1
- package/assets/{secp256k1-DPQ0CeoG.js → secp256k1-4S_gx5U_.js} +1 -1
- package/assets/{secp256k1-C1QcNmHp.js → secp256k1-BlXhQE61.js} +1 -1
- package/assets/{secp256k1-BoVVSQz6.js → secp256k1-BwiABSKe.js} +1 -1
- package/assets/{send-CFq_oCZr.js → send-B7leZ2sF.js} +1 -1
- package/assets/{send-batch-transaction-DMP4__pD.js → send-batch-transaction-NCJfUQmg.js} +1 -1
- package/assets/{send-eip712-transaction-DQLplawP.js → send-eip712-transaction-DyB2yZtW.js} +2 -2
- package/assets/{send-gasless-transaction-BGTgewFy.js → send-gasless-transaction-DxbiAsWR.js} +2 -2
- package/assets/{sendRawTransaction-DHS_me7_.js → sendRawTransaction-CXnui5Km.js} +3 -3
- package/assets/{serializeTransaction-BjaMCBHz.js → serializeTransaction-BA8Lx_h7.js} +1 -1
- package/assets/{session-proposal-tKp3dl-p.js → session-proposal-ZPunDXaI.js} +1 -1
- package/assets/{session-request-BFsvjXqH.js → session-request-D_b2ouvA.js} +2 -2
- package/assets/{sha256-CyKKboI9.js → sha256-D2Fo41ck.js} +1 -1
- package/assets/{signing-DlLmYOTE.js → signing-CP2v_dlr.js} +4 -4
- package/assets/{socials-BwfJ5-R-.js → socials-xqF7U9Yn.js} +1 -1
- package/assets/{swaps-Ck5gODY9.js → swaps-B3ujQJZz.js} +1 -1
- package/assets/{thirdweb-BphFCNzF.js → thirdweb-B7ea2PEt.js} +3 -3
- package/assets/{totalSupply-u7i_HL91.js → totalSupply-D22_m4j2.js} +1 -1
- package/assets/{trade-encoding-gDCifoY8.js → trade-encoding-cvcruSuW.js} +1 -1
- package/assets/{transactionReceipt-B4QMCKgB.js → transactionReceipt-9wnHZrRL.js} +1 -1
- package/assets/{transactions-BxMUaDja.js → transactions-Nu8-9WNT.js} +1 -1
- package/assets/{useInfiniteGrid-FwNB-guC.js → useInfiniteGrid-ClIfwXAY.js} +1 -1
- package/assets/{useStore-Cl2oWEee.js → useStore-BPgnQXlK.js} +1 -1
- package/assets/useTheme-BwxUDr5G.js +1 -0
- package/assets/{useTheme-Ct2vhEl6.js → useTheme-HWLX9NSW.js} +1 -1
- package/assets/{verifyHash-cIY2CyDT.js → verifyHash-DMHtO2BR.js} +1 -1
- package/assets/{w3m-modal-B8N-_t_Q.js → w3m-modal-Cx_nmtny.js} +1 -1
- package/assets/{w3m-modal-Um5oa4gq.js → w3m-modal-wqk18fis.js} +1 -1
- package/assets/{wait-for-tx-receipt-BMB2ozbO.js → wait-for-tx-receipt-BPkFazzP.js} +1 -1
- package/assets/{wallets-CuEcciie.js → wallets-CmM_4Vm-.js} +6 -6
- package/assets/{web-connector-BCjRkdB2.js → web-connector-B01y8d6Z.js} +3 -3
- package/assets/{writeContract-BsEgddUS.js → writeContract-BTRFLrl9.js} +1 -1
- package/assets/{zoraTestnet-BVMhhdng.js → zoraTestnet-Bq4RAmQw.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/assets/Cart-B5tU2f7O.js +0 -3
- package/assets/Cart-C75800mc.css +0 -1
- package/assets/ItemDetail-kRr-53et.js +0 -29
- package/assets/cart-checkout-DGDUpU-c.js +0 -1
- package/assets/useTheme-CFU3mOvD.js +0 -1
package/index.html
CHANGED
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
<link rel="canonical" href="https://shop.decentraland.org/" />
|
|
17
17
|
|
|
18
18
|
<!-- Favicon: the Decentraland mark (same as the marketplace). -->
|
|
19
|
-
<link rel="icon" type="image/x-icon" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
20
|
-
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
19
|
+
<link rel="icon" type="image/x-icon" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29820315471.commit-e34db25/favicon.ico" sizes="16x16 32x32 48x48" />
|
|
20
|
+
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29820315471.commit-e34db25/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-
|
|
22
|
+
<link rel="manifest" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29820315471.commit-e34db25/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-
|
|
51
|
+
<link rel="sitemap" type="application/xml" title="Sitemap" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29820315471.commit-e34db25/sitemap.xml" />
|
|
52
52
|
|
|
53
53
|
<!-- Warm the 3D preview / fonts -->
|
|
54
54
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
@@ -60,13 +60,13 @@
|
|
|
60
60
|
<link rel="preconnect" href="https://wearable-preview.decentraland.org" />
|
|
61
61
|
<link rel="preconnect" href="https://peer.decentraland.zone" crossorigin />
|
|
62
62
|
<link rel="preconnect" href="https://peer.decentraland.org" crossorigin />
|
|
63
|
-
<script type="module" crossorigin src="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
64
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
65
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
66
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
67
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
68
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
69
|
-
<link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
63
|
+
<script type="module" crossorigin src="https://cdn.decentraland.org/@dcl/shop/0.1.0-29820315471.commit-e34db25/assets/index-d4x-ttpO.js"></script>
|
|
64
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29820315471.commit-e34db25/assets/react-yytiy0wi.js">
|
|
65
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29820315471.commit-e34db25/assets/dcl-schemas-BICTSpB5.js">
|
|
66
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29820315471.commit-e34db25/assets/sentry-BPJvc5GU.js">
|
|
67
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29820315471.commit-e34db25/assets/ethers-w2AslR0v.js">
|
|
68
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29820315471.commit-e34db25/assets/intl-CBcMB1D2.js">
|
|
69
|
+
<link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29820315471.commit-e34db25/assets/index-BbQ0ahsR.css">
|
|
70
70
|
</head>
|
|
71
71
|
<body>
|
|
72
72
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/shop",
|
|
3
|
-
"version": "0.1.0-
|
|
3
|
+
"version": "0.1.0-29820315471.commit-e34db25",
|
|
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": "
|
|
11
|
+
"commit": "e34db2560c89ec4964fc6bf022fb2018941c5ec2"
|
|
12
12
|
}
|
package/assets/Cart-B5tU2f7O.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{j as e,a as ge,b as ve,r as x,L as V}from"./react-yytiy0wi.js";import{t as a,C as N,a8 as A,a as Ne,a9 as v,c as ce,d as Ce,g as we,o as Me,u as Se,I,aa as Ie,b as K,ab as re,ac as Pe,D as R,s as Te,B as Ee,j as Le,k as Be,w as Fe,q as ne,ad as Re,y as le,x as Ae,ae as We}from"./index-kiuUdw-p.js";import{a as oe}from"./buy-DZ_7JRMI.js";import{g as ze,a as Ue,w as qe,S as Ke,G as $e}from"./buy-gasless-BYas5NEq.js";import{R as $,r as Qe}from"./cart-checkout-DGDUpU-c.js";import{C as Oe,c as De}from"./payments-Dlf2JvWP.js";import{E as de}from"./ErrorNotice-CKeOu_Oi.js";import{i as Ge,a as Je}from"./errors-BLnaqG_B.js";import{C as Ve}from"./CollectionCarousel-DPzQqA3V.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-BPJvc5GU.js";import"./ethers-w2AslR0v.js";import"./intl-CBcMB1D2.js";import"./trade-encoding-gDCifoY8.js";import"./index-HN6Rk25C.js";function Ye(t){const{phase:r,balanceCredits:j,onClose:o}=t,C=r==="processing",P=r!=="complete",T=r==="nofunds"?a("cartCheckout.titleNoFunds"):a("cartCheckout.titleBuy"),n=r==="processing";return e.jsxs("div",{className:"buy-modal",role:"dialog","aria-modal":"true","aria-label":a("cartCheckout.dialogAria"),children:[e.jsx("div",{className:"buy-modal__scrim",onClick:C?void 0:o,"aria-hidden":!0}),e.jsxs("div",{className:`buy-modal__card${n?" buy-modal__card--tall":""}`,children:[P&&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:T}),!C&&e.jsx("button",{className:"buy-modal__x",onClick:o,"aria-label":a("buyModal.close"),children:e.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,children:e.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})})]}),e.jsxs("div",{className:"buy-modal__balance",children:[e.jsx("span",{className:"buy-modal__balance-label",children:r==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),e.jsx(N,{className:"buy-modal__balance-ico"}),e.jsx("span",{className:"buy-modal__balance-value",children:A(j)})]})]}),r==="processing"&&e.jsx(He,{step:t.step??1,total:t.total??1}),r==="nofunds"&&e.jsx(Xe,{lines:t.lines??[],shortfallCredits:t.shortfallCredits??0,packs:t.packs??[],selectedPack:t.selectedPack??"",onSelectPack:t.onSelectPack??(()=>{}),onBuyPacks:t.onBuyPacks??(()=>{}),onCancel:o}),r==="complete"&&e.jsx(Ze,{purchased:t.purchased??[],onMyAssets:t.onMyAssets??o,onTryInWorld:t.onTryInWorld??o}),r==="error"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsx(de,{message:t.message}),e.jsx("div",{className:"buy-modal__ctas",children:e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient",onClick:o,children:a("buyModal.close")})})]})]})]})}function He({step:t,total:r}){return e.jsxs("div",{className:"buy-modal__body buy-modal__processing",children:[e.jsx("img",{className:"buy-modal__logo",src:"/icon-192.png",alt:"",width:61,height:61}),e.jsx("div",{className:"buy-modal__processing-text",children:a("buyModal.completingTransaction")}),e.jsxs("div",{className:"cart-checkout__progress-row",children:[e.jsx("div",{className:"buy-modal__progress","aria-hidden":!0,children:e.jsx("span",{className:"buy-modal__progress-fill"})}),e.jsxs("span",{className:"cart-checkout__step",children:[t,"/",r]})]})]})}function Xe({lines:t,shortfallCredits:r,packs:j,selectedPack:o,onSelectPack:C,onBuyPacks:P,onCancel:T}){const n=j.find(i=>i.id===o);return e.jsxs("div",{className:"buy-modal__body",children:[e.jsxs("div",{className:"buy-modal__warning",children:[e.jsxs("svg",{viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":!0,className:"buy-modal__warning-ico",children:[e.jsx("path",{d:"M12 3L2 20h20L12 3z",fill:"none",stroke:"#691fa9",strokeWidth:"1.8",strokeLinejoin:"round"}),e.jsx("path",{d:"M12 9v5",stroke:"#691fa9",strokeWidth:"1.8",strokeLinecap:"round"}),e.jsx("circle",{cx:"12",cy:"17",r:"1.1",fill:"#691fa9"})]}),e.jsxs("p",{className:"buy-modal__warning-text",children:[e.jsx("b",{children:a("buyModal.insufficientFunds")})," ",a("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:a("buyModal.warningCreditsAmount",{count:Math.max(0,r)})})," ",a("buyModal.warningToPurchase",{count:t.length})]})]}),e.jsx("div",{className:"cart-checkout__scroll",children:t.map(i=>e.jsxs("div",{className:"buy-modal__asset",children:[e.jsx("div",{className:"buy-modal__asset-thumb",children:i.item.thumbnail?e.jsx("img",{src:i.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:i.item.name,children:i.item.name||a("buyModal.itemFallback")}),i.item.creator?e.jsx("div",{className:"buy-modal__asset-creator",children:a("search.byCreator",{name:i.item.creator})}):null]}),e.jsxs("div",{className:"buy-modal__asset-price",children:[e.jsx(N,{className:"buy-modal__asset-price-ico"}),e.jsx("span",{children:A(i.priceCredits)})]})]})]},i.item.id))}),e.jsx("div",{className:"buy-modal__packs",children:j.map(i=>{const E=i.id===o;return e.jsxs("button",{className:`buy-modal__pack${E?" buy-modal__pack--on":""}`,onClick:()=>C(i.id),children:[e.jsx(N,{className:"buy-modal__pack-ico"}),e.jsx("span",{className:"buy-modal__pack-amount",children:A(i.credits)}),e.jsxs("span",{className:"buy-modal__pack-usd",children:["($",i.usd.toFixed(2),")"]})]},i.id)})}),e.jsxs("div",{className:"buy-modal__total",children:[e.jsxs("div",{className:"buy-modal__total-credits",children:[e.jsx(N,{className:"buy-modal__total-ico"}),e.jsx("span",{children:A((n==null?void 0:n.credits)??0)})]}),e.jsxs("span",{className:"buy-modal__total-usd",children:["$",((n==null?void 0:n.usd)??0).toFixed(2)]})]}),e.jsxs("div",{className:"buy-modal__ctas",children:[e.jsx("button",{className:"buy-modal__btn buy-modal__btn--outline",onClick:T,children:a("buyModal.cancel")}),e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient",onClick:P,children:a("buyModal.buy")})]})]})}function Ze({purchased:t,onMyAssets:r,onTryInWorld:j}){return e.jsxs("div",{className:"buy-modal__body cart-checkout__done-body",children:[e.jsxs("div",{className:"buy-modal__success",children:[e.jsxs("svg",{viewBox:"0 0 64 64",width:"60",height:"60","aria-hidden":!0,children:[e.jsx("circle",{cx:"32",cy:"32",r:"32",fill:"#34ce77"}),e.jsx("path",{d:"M20 33l8 8 16-18",fill:"none",stroke:"#fff",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"})]}),e.jsxs("p",{className:"buy-modal__success-text",children:[e.jsx("b",{children:a("getCredits.successTitle")})," ",a("buyModal.successBody")]})]}),e.jsx("div",{className:"cart-checkout__done",children:e.jsx("div",{className:"cart-checkout__done-scroll",children:t.map(o=>e.jsxs("div",{className:"cart-checkout__done-row",children:[e.jsxs("div",{className:"cart-checkout__done-thumb",children:[o.thumbnail?e.jsx("img",{src:o.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:o.name,children:o.name||a("buyModal.itemFallback")}),o.creator?e.jsx("div",{className:"cart-checkout__done-creator",children:a("search.byCreator",{name:o.creator})}):null]}),e.jsxs("div",{className:"cart-checkout__done-price",children:[e.jsx(N,{className:"cart-checkout__done-price-ico"}),e.jsx("span",{children:A(o.priceCredits)})]})]},o.id))})}),e.jsxs("div",{className:"buy-modal__ctas",children:[e.jsx("button",{className:"buy-modal__btn buy-modal__btn--outline",onClick:r,children:a("buyModal.myAssets")}),e.jsxs("button",{className:"buy-modal__btn buy-modal__btn--ruby",onClick:j,children:[a("buyModal.tryInWorld"),e.jsx("svg",{viewBox:"0 0 24 24",width:"20",height:"20","aria-hidden":!0,children:e.jsx("path",{d:"M5 12h12M13 7l5 5-5 5",fill:"none",stroke:"#fcfcfc",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]})]})]})}const es=Te(Ee)`
|
|
2
|
-
margin-top: 12px;
|
|
3
|
-
`;function ie(t){if(Ge(t))return a("errors.rejected");const r=(t.message??"").toLowerCase();return r.includes("insufficient")?a("cart.error.insufficient",{currency:Be.name}):r.includes("no active listing")||r.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const ss=12e4,Q=Oe.slice(0,3),as=Le.chainId===80002?"https://decentraland.zone/jump":"https://decentraland.org/jump";function ts(t){const r=[];return t.unavailable.length&&r.push(a("cart.drop.unavailable",{count:t.unavailable.length})),t.own.length&&r.push(a("cart.drop.own",{count:t.own.length})),a("cart.drop.removed",{items:r.join(` ${a("cart.drop.and")} `)})}function js(){Ne({title:a("nav.cart"),noindex:!0});const t=v(s=>s.items),r=v(s=>s.remove),j=v(s=>s.clear),o=v(s=>s.restore),C=v(s=>s.setFittingOpen),P=ce(s=>s.items),T=ce(s=>s.toggle),{session:n}=Ce(),i=t.some(s=>s.category!=="emote"),{data:E}=we({queryKey:["upsell-listings"],queryFn:()=>We({first:40}),staleTime:6e4}),{data:L}=Me(n),W=Se(),z=ge(),{state:w}=ve(),[Y,B]=x.useState(null),[ue,k]=x.useState(null),[H,U]=x.useState(null),[he,M]=x.useState(!1),[y,F]=x.useState(null),X=x.useRef(0),[d,f]=x.useState(null),[O,Z]=x.useState(""),me=t.reduce((s,c)=>s+c.priceCredits,0),_e=y?y.liveTotalCredits:me,be=new Set(t.map(s=>s.id)),ee=((E==null?void 0:E.items)??[]).filter(s=>!be.has(s.id)).slice(0,12),pe=new Map(y==null?void 0:y.buyable.map(s=>[s.item.id,s])),q=(L==null?void 0:L.credits)??0,ye=Pe;function D(s){s(),F(null),U(null),k(null)}function xe(){f(null),M(!1)}function se(s){const c=s.reduce((h,u)=>h+u.priceCredits,0),l=Math.max(0,c-q),p=Q.find(h=>h.credits>=l)??Q[Q.length-1];Z(p.id),K("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:c,credits_balance:q,shortfall:l}),f({phase:"nofunds",lines:s.map(h=>({item:h.item,priceCredits:h.priceCredits})),shortfall:l}),M(!1)}async function je(s){if(!n||s.length===0)return;const c=s.map(u=>({...u.item,priceCredits:u.priceCredits})),l=[];let p="authorize",h=!1;f({phase:"processing",step:1,total:s.length});try{const u=[];for(let _=0;_<s.length;_++){const g=s[_];f({phase:"processing",step:_+1,total:s.length});try{const{credit:b,maxCreditedValue:J}=await Fe(n.identity,g.usdCents,g.trade.id);l.push(b.id),u.push({trade:g.trade,credits:[b],maxCreditedValue:J})}catch(b){if(Je(b)){if(l.length){try{await ne(n.identity,l)}catch(J){R(J,{flow:"cart_checkout",step:"release"})}W.invalidateQueries({queryKey:["usd-balance"]})}se(s);return}throw b}}p="submit";let m=[];if(ze())try{m=await Ue({purchases:u,buyer:n.address,signer:n.signer});const g=(await Promise.allSettled(m.map(b=>qe(b)))).flatMap(b=>b.status==="rejected"?[b.reason]:[]);if(g.length&&!g.some(b=>b instanceof Ke))throw g[0];h=!0}catch(_){if(!(_ instanceof $e))throw _;m=await oe({purchases:u,buyer:n.address,signer:n.signer})}else m=await oe({purchases:u,buyer:n.address,signer:n.signer});s.forEach(_=>r(_.item.id)),F(null),K("Shop Completed Purchase",{...Re(c),payment_type:"credits",no_crypto_step:h,transaction_hash:m[0]??null}),W.invalidateQueries({queryKey:["usd-balance"]}),f({phase:"complete",purchased:c})}catch(u){if(le(u)||R(u,{flow:"cart_checkout",step:p,cart_size:s.length}),K(le(u)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:p,error_code:Ae(u),value_usd:re(c.reduce((m,_)=>m+_.priceCredits,0)),cart_size:s.length}),l.length){try{await ne(n.identity,l)}catch(m){R(m,{flow:"cart_checkout",step:"release"})}W.invalidateQueries({queryKey:["usd-balance"]})}f({phase:"error",message:ie(u)})}}function ae(s){const c=s.reduce((l,p)=>l+p.priceCredits,0);if(L!=null&&L.credits<c){se(s);return}je(s)}async function G(){if(!n){k(a("buyModal.signInToCheckout"));return}const s=v.getState().items;if(s.length!==0){k(null),U(null),M(!0),K("Shop Started Checkout",{cart_size:s.length,cart_value_credits:s.reduce((c,l)=>c+l.priceCredits,0),cart_value_usd:re(s.reduce((c,l)=>c+l.priceCredits,0)),has_sufficient_credits:q>=s.reduce((c,l)=>c+l.priceCredits,0)});try{B(a("cart.status.reviewing"));const c=await Qe(s,n.address,ye),l=[...c.unavailable,...c.own];if(l.length&&(l.forEach(p=>r(p.id)),U(ts(c))),c.buyable.length===0){k(a("cart.error.noneAvailable")),F(null),B(null);return}if(c.orderChanged){F(c),X.current=Date.now(),B(null);return}B(null),ae(c.buyable)}catch(c){R(c,{flow:"cart_checkout",step:"review",cart_size:s.length}),k(ie(c)),B(null)}finally{M(!1)}}}async function ke(){if(y){if(!n){k(a("buyModal.signInToCheckout"));return}if(Date.now()-X.current>ss){F(null),U(null),await G();return}k(null),ae(y.buyable)}}async function fe(){if(O){try{sessionStorage.setItem($,JSON.stringify(v.getState().items))}catch{}M(!0);try{const s=await De(O,n?{address:n.address,identity:n.identity}:void 0);if(s.url){window.location.href=s.url;return}z("/credits")}catch(s){try{sessionStorage.removeItem($)}catch{}R(s,{flow:"cart_buy_credits"}),f({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{M(!1)}}}const te=x.useRef(!1);x.useEffect(()=>{if(!(w!=null&&w.resumeCheckout)||te.current)return;te.current=!0;try{const c=sessionStorage.getItem($);if(c){sessionStorage.removeItem($);const l=JSON.parse(c);Array.isArray(l)&&l.length&&o(l)}}catch{}W.invalidateQueries({queryKey:["usd-balance"]});const s=setTimeout(()=>void G(),0);return()=>clearTimeout(s)},[w==null?void 0:w.resumeCheckout]);const S=he||(d==null?void 0:d.phase)==="processing";return t.length===0&&!d?e.jsxs("div",{className:"cart cart--empty",children:[e.jsx(I,{name:"cart",size:44,color:"var(--muted-2)"}),e.jsx("p",{className:"cart-empty__title",children:a("cart.empty.title")}),e.jsx("p",{className:"muted",children:a("cart.empty.body")}),e.jsx(es,{as:V,to:"/assets",variant:"purple",children:a("cart.empty.cta")})]}):e.jsxs("div",{className:"checkout",children:[e.jsxs("button",{className:"checkout__back",onClick:()=>z(-1),type:"button",children:[e.jsx(I,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs("div",{className:"checkout__body",children:[e.jsxs("section",{className:"checkout__panel",children:[e.jsxs("div",{className:"checkout__panel-head",children:[e.jsx("button",{className:"checkout__panel-back",onClick:()=>z(-1),type:"button","aria-label":a("cart.goBack"),children:e.jsx(I,{name:"arrow-left"})}),e.jsx("h1",{className:"checkout__panel-title",children:a("cart.panelTitle",{count:t.length})}),i?e.jsxs("button",{className:"checkout__fitting",onClick:()=>C(!0),disabled:S,children:[e.jsx(I,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),e.jsx("div",{className:"checkout__list",children:t.map(s=>{const c=pe.get(s.id),l=c?c.priceCredits:s.priceCredits,p=!!c&&c.priceCredits!==s.priceCredits,h=!!P[s.id],u=s.tokenId??s.itemId,m=s.contractAddress&&u?`/item/${s.contractAddress}/${u}`:null;return e.jsxs("div",{className:"checkout__card",children:[e.jsxs("div",{className:"checkout__thumb",children:[m?e.jsx(V,{className:"checkout__thumb-link",to:m,state:{item:s,tradeId:s.tradeId},"aria-label":s.name,children:s.thumbnail?e.jsx("img",{src:s.thumbnail,alt:s.name}):null}):s.thumbnail?e.jsx("img",{src:s.thumbnail,alt:s.name}):null,e.jsx("span",{className:"checkout__thumb-check","aria-hidden":!0,children:e.jsx("svg",{viewBox:"0 0 20 20",width:"12",height:"12",children:e.jsx("path",{d:"M5 10.5l3 3 7-7.5",fill:"none",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),e.jsxs("div",{className:"checkout__info",children:[e.jsxs("div",{className:"checkout__desc",children:[m?e.jsx(V,{className:"checkout__name",to:m,state:{item:s,tradeId:s.tradeId},title:s.name,children:s.name}):e.jsx("div",{className:"checkout__name",title:s.name,children:s.name}),s.creator?e.jsx(Ie,{address:s.creator,className:"checkout__creator",linkToProfile:!0}):null]}),e.jsxs("div",{className:"checkout__foot",children:[e.jsxs("div",{className:"checkout__stepper",children:[e.jsx("button",{className:"checkout__step",onClick:()=>D(()=>r(s.id)),disabled:S,"aria-label":a("cart.removeFromCart",{name:s.name}),children:e.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:e.jsx("path",{d:"M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}),e.jsx("span",{className:"checkout__qty",children:"1"}),e.jsx("button",{className:"checkout__step",disabled:!0,"aria-label":a("cart.increaseQuantity"),children:e.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:e.jsx("path",{d:"M8 3.5v9M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),e.jsxs("div",{className:"checkout__price",children:[e.jsx(N,{className:"checkout__price-ico"})," ",l,p?e.jsx("span",{className:"checkout__price-was",children:s.priceCredits}):null]})]})]}),e.jsxs("div",{className:"checkout__actions",children:[e.jsx("button",{className:`checkout__fav${h?" is-on":""}`,onClick:()=>T(s),"aria-label":h?a("cart.removeFromFavorites",{name:s.name}):a("cart.addToFavorites",{name:s.name}),title:h?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:e.jsx(I,{name:h?"heart-solid":"heart"})}),e.jsx("button",{className:"checkout__remove",onClick:()=>D(()=>r(s.id)),disabled:S,"aria-label":a("cart.remove",{name:s.name}),title:a("cart.removeTitle"),children:e.jsx(I,{name:"trash",size:24})})]})]},s.id)})}),e.jsxs("div",{className:"checkout__utils",children:[e.jsx("button",{className:"link",onClick:()=>D(j),disabled:S,children:a("cart.clearCart")}),null]})]}),e.jsxs("aside",{className:"checkout__summary",children:[e.jsx("h2",{className:"checkout__summary-title",children:a("cart.purchaseSummary")}),e.jsxs("div",{className:"checkout__summary-body",children:[e.jsxs("div",{className:"checkout__total-line",children:[e.jsx("span",{className:"checkout__total-label",children:a("cart.totalItems",{count:t.length})}),e.jsxs("span",{className:"checkout__total-value",children:[e.jsx(N,{className:"checkout__total-ico"})," ",_e]})]}),e.jsx("button",{className:"checkout__cta",onClick:()=>void(y?ke():G()),disabled:S,children:S?a("cart.working"):y?a("marketCheckout.confirmPurchase"):a("assetCard.buyNow")}),y?e.jsx("p",{className:"muted checkout__msg",children:a("cart.priceChanged")}):null,H?e.jsx("p",{className:"muted checkout__msg",children:H}):null,Y?e.jsx("p",{className:"muted checkout__msg",children:Y}):null,e.jsx(de,{message:ue,className:"checkout__msg"})]})]})]}),ee.length>0?e.jsx("div",{className:"cart-upsell",children:e.jsx(Ve,{title:a("cart.youMightAlsoLike"),items:ee})}):null,d?e.jsx(Ye,{phase:d.phase,balanceCredits:q,onClose:xe,step:d.phase==="processing"?d.step:void 0,total:d.phase==="processing"?d.total:void 0,lines:d.phase==="nofunds"?d.lines:void 0,shortfallCredits:d.phase==="nofunds"?d.shortfall:void 0,packs:Q,selectedPack:O,onSelectPack:Z,onBuyPacks:()=>void fe(),purchased:d.phase==="complete"?d.purchased:void 0,onMyAssets:()=>z("/assets?tab=mine"),onTryInWorld:()=>window.open(as,"_blank","noopener"),message:d.phase==="error"?d.message:void 0}):null]})}export{js as Cart};
|
package/assets/Cart-C75800mc.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.checkout{max-width:1510px;margin:0 auto}.checkout__back{display:inline-flex;align-items:center;gap:6px;margin:0 0 16px;padding:0;border:0;background:none;color:var(--text-2);font-size:14px;font-weight:600;letter-spacing:.02em;text-transform:uppercase;cursor:pointer;transition:color .15s ease}.checkout__back:hover{color:var(--accent)}.checkout__back .ico{width:18px;height:18px}.checkout__body{display:grid;grid-template-columns:minmax(0,1fr) 600px;gap:24px;align-items:start}.checkout__panel{min-width:0;background:#fff;border:1px solid var(--line);border-radius:16px;padding:24px}.checkout__panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:24px}.checkout__panel-back{display:none}.checkout__panel-title{margin:0;font-size:18px;font-weight:600;line-height:1.2;color:var(--text)}.checkout__fitting{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:40px;padding:0 12px;border:2px solid transparent;border-radius:8px;background:linear-gradient(#fff,#fff) padding-box,var(--amethyst) border-box;color:var(--accent);font-size:13px;font-weight:600;line-height:24px;letter-spacing:.46px;text-transform:uppercase;white-space:nowrap;cursor:pointer;transition:box-shadow .15s ease,filter .15s ease}.checkout__fitting:hover:not(:disabled){box-shadow:0 0 8px #a524b359}.checkout__fitting:active:not(:disabled){filter:brightness(.97)}.checkout__fitting:disabled{opacity:.55;cursor:default}.checkout__fitting-ico{width:24px;height:24px}.checkout__list{display:flex;flex-direction:column;gap:12px}.checkout__card{position:relative;display:flex;align-items:stretch;gap:12px;background:#fff;border:1px solid #cfcdd4;border-radius:12px;overflow:hidden}.checkout__thumb{position:relative;flex-shrink:0;width:137px;height:137px;background:var(--media);border-radius:12px;display:grid;place-items:center;overflow:hidden}.checkout__thumb-link{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center}.checkout__thumb img{width:83%;height:83%;object-fit:contain;filter:drop-shadow(.56px 2.25px 2.8px rgba(0,0,0,.1))}.checkout__thumb-check{position:absolute;top:7.5px;left:7.5px;width:20px;height:20px;border-radius:50%;background:#34ce77;display:grid;place-items:center}.checkout__info{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:space-between;gap:8px;padding:16px 8px}.checkout__desc{display:flex;flex-direction:column;gap:4px;min-width:0;padding-right:64px}.checkout__name{display:block;font-size:16px;font-weight:600;line-height:1.2;color:var(--text);text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}a.checkout__name:hover{color:var(--accent)}.checkout__creator{font-size:10px;line-height:1.43;color:var(--muted)}.checkout__creator [data-avatar]{display:none}.checkout__creator [data-testid=creator-name]{font-size:10px;line-height:1.43}.checkout__foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-right:8px}.checkout__stepper{display:inline-flex;align-items:center;gap:8px;padding:6px;border:.5px solid var(--muted-2);border-radius:50px}.checkout__step{display:grid;place-items:center;width:16px;height:16px;padding:0;border:0;background:none;color:var(--text);cursor:pointer}.checkout__step:disabled{color:var(--muted-2);cursor:default}.checkout__step svg{width:16px;height:16px}.checkout__qty{min-width:12px;font-size:14px;font-weight:500;line-height:1.2;color:var(--text);text-align:center}.checkout__price{display:inline-flex;align-items:center;gap:4px;font-size:24px;font-weight:600;color:var(--text-2)}.checkout__price-ico{width:24px;height:24px;background:var(--accent)}.checkout__price-was{margin-left:6px;font-size:14px;font-weight:500;color:var(--muted);text-decoration:line-through}.checkout__actions{position:absolute;top:10px;right:10px;display:flex;align-items:center;gap:12px}.checkout__fav,.checkout__remove{display:grid;place-items:center;width:24px;height:24px;padding:0;border:0;background:none;color:var(--muted);cursor:pointer;transition:color .12s ease}.checkout__fav:hover:not(:disabled){color:var(--text)}.checkout__fav.is-on{color:var(--dcl-red)}.checkout__remove:hover:not(:disabled){color:var(--dcl-red)}.checkout__fav:disabled,.checkout__remove:disabled{opacity:.5;cursor:default}.checkout__utils{display:flex;gap:20px;margin-top:16px}.checkout__utils .link{font-size:13px;color:var(--muted);font-weight:600}.checkout__utils .link:hover:not(:disabled){color:var(--text)}.checkout__summary{position:sticky;top:172px;display:flex;flex-direction:column;background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px}.checkout__summary-title{margin:0 0 16px;padding-bottom:16px;border-bottom:1px solid #cfcdd4;font-size:20px;font-weight:600;color:var(--text)}.checkout__summary-body{display:flex;flex-direction:column;gap:12px}.checkout__total-line{display:flex;align-items:center;justify-content:space-between;gap:12px}.checkout__total-label{font-size:14px;font-weight:600;color:#5e5b67}.checkout__total-value{display:inline-flex;align-items:center;gap:8px;font-size:24px;font-weight:700;color:var(--text)}.checkout__total-ico{width:24px;height:24px;background:var(--accent)}.checkout__cta{width:100%;height:56px;border:0;border-radius:8px;background:var(--amethyst);color:var(--soft-white);font-size:15px;font-weight:600;letter-spacing:.046em;text-transform:uppercase;cursor:pointer;transition:background .15s ease,filter .15s ease}.checkout__cta:hover:not(:disabled){background:var(--accent)}.checkout__cta:active:not(:disabled){filter:brightness(.95)}.checkout__cta:disabled{opacity:.6;cursor:default}.checkout__msg{margin:0;font-size:13px}.cart-upsell{margin-top:8px}@media(max-width:1080px){.checkout__body{grid-template-columns:1fr}.checkout__summary{position:static}}@media(max-width:880px){.checkout{padding-bottom:188px}.checkout__back{display:none}.checkout__panel{padding:16px}.checkout__panel-head{margin-bottom:16px;gap:8px}.checkout__panel-back{display:inline-flex;align-items:center;flex-shrink:0;border:0;background:none;padding:0;color:var(--text);cursor:pointer}.checkout__panel-back .ico{width:20px;height:20px}.checkout__panel-title{flex:1;min-width:0;font-size:16px}.checkout__fitting{height:36px;padding:0 10px;font-size:12px}.checkout__fitting-ico{width:20px;height:20px}.checkout__thumb{width:120px;height:120px}.checkout__info{padding:12px 4px 12px 0}.checkout__name{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}.checkout__price{font-size:20px}.checkout__price-ico{width:20px;height:20px}.checkout__summary{position:fixed;left:0;right:0;top:auto;bottom:0;z-index:30;border:0;border-radius:16px 16px 0 0;box-shadow:0 -4px 20px #1615181f}.checkout__summary-title{margin-bottom:12px;padding-bottom:12px}}.cart-checkout__progress-row{display:flex;align-items:center;justify-content:center;gap:8px;width:100%}.cart-checkout__step{font-size:16px;line-height:22px;color:var(--text-2);text-transform:capitalize;white-space:nowrap}.cart-checkout__scroll{display:flex;flex-direction:column;gap:8px;max-height:360px;overflow-y:auto;width:100%;scrollbar-width:thin;scrollbar-color:#a2a2a2 var(--media)}.cart-checkout__scroll::-webkit-scrollbar{width:8px}.cart-checkout__scroll::-webkit-scrollbar-track{background:var(--media);border-radius:10px}.cart-checkout__scroll::-webkit-scrollbar-thumb{background:#a2a2a2;border-radius:8px}.cart-checkout__done{display:flex;flex-direction:column;border:1px solid var(--muted-2);border-radius:16px;padding:24px}.cart-checkout__done-scroll{display:flex;flex-direction:column;gap:12px;max-height:320px;overflow-y:auto}.cart-checkout__done-row{display:flex;align-items:center;gap:12px}.cart-checkout__done-row+.cart-checkout__done-row{border-top:1px solid var(--line);padding-top:12px}.cart-checkout__done-thumb{position:relative;flex-shrink:0;width:96px;height:96px;background:var(--media);border:.13px solid var(--muted-2);border-radius:8px;display:grid;place-items:center;overflow:hidden}.cart-checkout__done-thumb img{width:83%;height:83%;object-fit:contain}.cart-checkout__done-check{position:absolute;top:6px;left:6px;width:20px;height:20px;border-radius:4px;background:var(--dcl-red);display:grid;place-items:center}.cart-checkout__done-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;padding:8px;overflow:hidden}.cart-checkout__done-name{font-size:20px;font-weight:600;line-height:1.4;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cart-checkout__done-creator{font-size:10px;line-height:1.43;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cart-checkout__done-price{display:inline-flex;align-items:center;gap:4px;flex-shrink:0;padding-right:4px;font-size:24px;font-weight:600;color:var(--text-2)}.cart-checkout__done-price-ico{width:24px;height:24px;background:var(--accent)}.cart-checkout__done-body{display:flex;flex-direction:column;gap:12px}.cart-checkout__done-body .buy-modal__success{flex-direction:row;align-items:center;gap:24px;padding:16px 24px}.cart-checkout__done-body .buy-modal__success-text{text-align:left;font-size:18px}.cart-checkout__done-body .buy-modal__btn{min-width:0}@media(max-width:600px){.cart-checkout__done-body .buy-modal__success{flex-direction:column;gap:12px;padding:16px}.cart-checkout__done-body .buy-modal__success-text{text-align:center}.cart-checkout__done{padding:16px}.cart-checkout__done-thumb{width:72px;height:72px}.cart-checkout__done-name{font-size:16px}.cart-checkout__done-price{font-size:20px}.cart-checkout__done-price-ico{width:20px;height:20px}}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-WK0UJmsO.js","assets/react-yytiy0wi.js","assets/dcl-schemas-BICTSpB5.js","assets/index-kiuUdw-p.js","assets/sentry-BPJvc5GU.js","assets/ethers-w2AslR0v.js","assets/intl-CBcMB1D2.js","assets/index-BbQ0ahsR.css","assets/emotion-styled.browser.esm-9a0DfT6j.js","assets/useTheme-Ct2vhEl6.js","assets/CircularProgress-BX-j97co.js","assets/index-B4GcGq_I.js","assets/useTheme-CFU3mOvD.js","assets/CssVarsProvider-COXz1SZ5.js","assets/getOverlayAlpha-BwKPCnfl.js","assets/index-CndiTQRa.js","assets/colors-LINLm1ux.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{a as te,r as m,j as e,d as De,b as Te,L as Be}from"./react-yytiy0wi.js";import{d as ie,o as Re,u as $e,t as s,ac as Ve,l as We,m as qe,w as ze,q as Z,b as K,x as _e,y as ae,ad as Oe,D as he,C as M,a8 as X,_ as se,ag as Ke,aj as Ue,ai as Ge,az as Qe,am as He,j as we,aA as Ye,af as Ce,s as re,aB as Je,aC as Ze,aD as Xe,aE as ea,a9 as pe,c as be,g as O,aF as aa,aG as sa,aH as ta,aI as ia,aJ as ra,ao as la,a as da,I as R,aK as na,aL as ca,aM as oa,aa as ma,aN as xe,aO as ua,B as ke,ar as _a,aP as ha,aQ as pa,as as ba,aR as xa}from"./index-kiuUdw-p.js";import{d as V}from"./dcl-schemas-BICTSpB5.js";import{b as ye}from"./buy-DZ_7JRMI.js";import{g as ya,b as va,w as ja,S as fa,G as ga}from"./buy-gasless-BYas5NEq.js";import{C as Na,c as wa}from"./payments-Dlf2JvWP.js";import{R as ve}from"./resume-buy-Bf0zIH7y.js";import{a as Ca,f as je}from"./errors-BLnaqG_B.js";import{E as ka}from"./ErrorNotice-CKeOu_Oi.js";import{C as Ia}from"./CircularProgress-BX-j97co.js";import{u as Aa,M as Ma}from"./MarketCheckout-DBP_j8E8.js";import{s as Sa}from"./address-DrURAr9O.js";import{C as Pa}from"./CollectionCarousel-DPzQqA3V.js";import"./sentry-BPJvc5GU.js";import"./ethers-w2AslR0v.js";import"./intl-CBcMB1D2.js";import"./trade-encoding-gDCifoY8.js";import"./index-HN6Rk25C.js";import"./mana-rate-CFV-b8jH.js";const $=Na.slice(0,3);function Ea({item:r,onClose:c,resume:t=!1}){var I,H;const{session:o}=ie(),{data:d}=Re(o),p=$e(),y=te(),[_,l]=m.useState("loading"),[v,a]=m.useState(null),[j,P]=m.useState(""),[f,L]=m.useState(r.priceCredits),[C,N]=m.useState(null),g=m.useRef(null),W=(C==null?void 0:C.credits)??f,k=(d==null?void 0:d.credits)??0;m.useEffect(()=>{let n=!1;if(!o){l("error"),a(s("buyModal.signInToCheckout"));return}const x=u=>{const h=u-((d==null?void 0:d.credits)??0),b=$.find(A=>A.credits>=h)??$[$.length-1];P(b.id),K("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:u,credits_balance:(d==null?void 0:d.credits)??0,shortfall:Math.max(0,h)}),l("nofunds")};return(async()=>{var u,h;try{const b=await Ve(r);if(!b)throw new Error("not for sale");if(We(b,o.address))throw new Error("You can't buy your own listing.");const A=qe((h=(u=b.received)==null?void 0:u[0])==null?void 0:h.amount);if(!Number.isFinite(A)||A<=0)throw new Error("price unavailable");const T=Math.ceil(A/10);if(n)return;if(L(T),d!=null&&d.credits<T){x(T);return}try{const{credit:E,maxCreditedValue:q,usdCents:B}=await ze(o.identity,A,b.id);if(n){Z(o.identity,[E.id]).catch(()=>{});return}g.current=E.id;const w=Math.ceil(B/10);L(w);const z={trade:b,credit:E,maxCreditedValue:q,usdCents:B,credits:w};N(z),t?U(z):l("ready")}catch(E){if(n)return;if(Ca(E)){x(T);return}throw E}}catch(b){if(n)return;K(ae(b)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:_e(b)}),l("error"),a(je(b,s("buyModal.error.generic"),{sale:!0}))}})(),()=>{n=!0,g.current&&o&&(Z(o.identity,[g.current]).catch(()=>{}),g.current=null)}},[]);async function U(n=C){if(!o||!n)return;l("processing"),a(null);let x=!1;try{const u={trade:n.trade,buyer:o.address,signer:o.signer,credits:[n.credit],maxCreditedValue:n.maxCreditedValue};let h;if(ya())try{h=await va(u),await ja(h),x=!0}catch(b){if(b instanceof fa)x=!0;else if(b instanceof ga)h=await ye(u);else throw b}else h=await ye(u);g.current=null,K("Shop Completed Purchase",{...Oe([r]),payment_type:"credits",no_crypto_step:x,transaction_hash:h??null}),p.invalidateQueries({queryKey:["usd-balance"]}),l("complete")}catch(u){ae(u)||he(u,{flow:"buy",step:"submit",gasless:x}),Z(o.identity,[n.credit.id]).catch(()=>{}),g.current=null,K(ae(u)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:_e(u)}),p.invalidateQueries({queryKey:["usd-balance"]}),a(je(u,s("buyModal.error.generic"),{sale:!0})),l("error")}}async function G(){if(!(!j||!o)){try{sessionStorage.setItem(ve,JSON.stringify(r))}catch{}C&&Z(o.identity,[C.credit.id]).catch(()=>{}),g.current=null,l("loading");try{const n=await wa(j,{address:o.address,identity:o.identity});if(n.url){window.location.href=n.url;return}y("/credits")}catch(n){he(n,{flow:"buy_credits_and_item"});try{sessionStorage.removeItem(ve)}catch{}a(s("buyModal.error.creditsCheckout")),l("error")}}}const Q=_==="processing",D=_==="complete"?s("buyModal.titleComplete"):_==="nofunds"?s("buyModal.titleNoFunds"):s("buyModal.titleBuy");return e.jsxs("div",{className:"buy-modal",role:"dialog","aria-modal":"true","aria-label":s("buyModal.dialogAria",{name:r.name}),children:[e.jsx("div",{className:"buy-modal__scrim",onClick:Q?void 0:c,"aria-hidden":!0}),e.jsxs("div",{className:`buy-modal__card${_==="processing"||_==="loading"?" buy-modal__card--tall":""}`,children:[e.jsxs("div",{className:"buy-modal__head",children:[e.jsxs("div",{className:"buy-modal__head-row",children:[e.jsx("h2",{className:"buy-modal__title",children:D}),!Q&&e.jsx("button",{className:"buy-modal__x",onClick:c,"aria-label":s("buyModal.close"),children:e.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,children:e.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})})]}),e.jsxs("div",{className:"buy-modal__balance",children:[e.jsx("span",{className:"buy-modal__balance-label",children:_==="nofunds"?s("buyModal.dclBalance"):s("buyModal.myCreditsBalance")}),e.jsx(M,{className:"buy-modal__balance-ico"}),e.jsx("span",{className:"buy-modal__balance-value",children:X(k)})]})]}),_==="loading"&&e.jsx("div",{className:"buy-modal__body buy-modal__processing",children:e.jsx(Ia,{size:44})}),_==="error"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsx(ka,{message:v}),e.jsx("div",{className:"buy-modal__ctas",children:e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient",onClick:c,children:s("buyModal.close")})})]}),_==="nofunds"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsxs("div",{className:"buy-modal__warning",children:[e.jsxs("svg",{viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":!0,className:"buy-modal__warning-ico",children:[e.jsx("path",{d:"M12 3L2 20h20L12 3z",fill:"none",stroke:"#691fa9",strokeWidth:"1.8",strokeLinejoin:"round"}),e.jsx("path",{d:"M12 9v5",stroke:"#691fa9",strokeWidth:"1.8",strokeLinecap:"round"}),e.jsx("circle",{cx:"12",cy:"17",r:"1.1",fill:"#691fa9"})]}),e.jsxs("p",{className:"buy-modal__warning-text",children:[e.jsx("b",{children:s("buyModal.insufficientFunds")})," ",s("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:s("buyModal.warningCreditsAmount",{count:Math.max(0,W-k)})})," ",s("buyModal.warningToPurchase",{count:1})]})]}),e.jsx(fe,{item:r,priceCredits:W}),e.jsx("div",{className:"buy-modal__packs",children:$.map(n=>{const x=n.credits,u=n.id===j;return e.jsxs("button",{className:`buy-modal__pack${u?" buy-modal__pack--on":""}`,onClick:()=>P(n.id),children:[e.jsx(M,{className:"buy-modal__pack-ico"}),e.jsx("span",{className:"buy-modal__pack-amount",children:X(x)}),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(M,{className:"buy-modal__total-ico"}),e.jsx("span",{children:X(((I=$.find(n=>n.id===j))==null?void 0:I.credits)??0)})]}),e.jsxs("span",{className:"buy-modal__total-usd",children:["$",(((H=$.find(n=>n.id===j))==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:c,children:s("buyModal.cancel")}),e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient",onClick:()=>void G(),children:s("buyModal.buy")})]})]}),_==="ready"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsx(fe,{item:r,priceCredits:W}),e.jsx("div",{className:"buy-modal__ctas",children:e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient buy-modal__btn--full",onClick:()=>void U(),children:s("buyModal.buy")})})]}),_==="processing"&&e.jsxs("div",{className:"buy-modal__body buy-modal__processing",children:[e.jsx("img",{className:"buy-modal__logo",src:"/icon-192.png",alt:"",width:61,height:61}),e.jsx("div",{className:"buy-modal__processing-text",children:t?s("buyModal.completingPurchase"):s("buyModal.completingTransaction")}),e.jsx("div",{className:"buy-modal__progress","aria-hidden":!0,children:e.jsx("span",{className:"buy-modal__progress-fill"})})]}),_==="complete"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsxs("div",{className:"buy-modal__success",children:[e.jsxs("svg",{viewBox:"0 0 64 64",width:"64",height:"64","aria-hidden":!0,children:[e.jsx("circle",{cx:"32",cy:"32",r:"32",fill:"#34ce74"}),e.jsx("path",{d:"M20 33l8 8 16-18",fill:"none",stroke:"#fff",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"})]}),e.jsxs("p",{className:"buy-modal__success-text",children:[e.jsx("b",{children:s("getCredits.successTitle")})," ",s("buyModal.successBody")]})]}),e.jsxs("div",{className:"buy-modal__ctas",children:[e.jsx("button",{className:"buy-modal__btn buy-modal__btn--outline",onClick:()=>y("/assets?tab=mine"),children:s("buyModal.myAssets")}),e.jsxs("button",{className:"buy-modal__btn buy-modal__btn--ruby",onClick:c,children:[s("buyModal.tryInWorld"),e.jsx("svg",{viewBox:"0 0 24 24",width:"20",height:"20","aria-hidden":!0,children:e.jsx("path",{d:"M5 12h12M13 7l5 5-5 5",fill:"none",stroke:"#fcfcfc",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]})]})]})]})]})}function fe({item:r,priceCredits:c}){return e.jsxs("div",{className:"buy-modal__asset",children:[e.jsx("div",{className:"buy-modal__asset-thumb",children:r.thumbnail?e.jsx("img",{src:r.thumbnail,alt:""}):null}),e.jsxs("div",{className:"buy-modal__asset-info",children:[e.jsxs("div",{children:[e.jsx("div",{className:"buy-modal__asset-name",title:r.name,children:r.name||s("buyModal.itemFallback")}),r.creator?e.jsx("div",{className:"buy-modal__asset-creator",children:s("search.byCreator",{name:r.creator})}):null]}),e.jsxs("div",{className:"buy-modal__asset-price",children:[e.jsx(M,{className:"buy-modal__asset-price-ico"}),e.jsx("span",{children:X(c)})]})]})]})}const Fa=m.lazy(async()=>{const[{EmoteControls:r},{Experimental_CssVarsProvider:c},{light:t}]=await Promise.all([se(()=>import("./index-WK0UJmsO.js").then(o=>o.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])),se(()=>import("./index-B4GcGq_I.js"),__vite__mapDeps([11,3,1,2,4,5,6,7,12,9,13,14])),se(()=>import("./index-CndiTQRa.js"),__vite__mapDeps([15,3,1,2,4,5,6,7,16,14,13,9]))]);return{default:o=>e.jsx(c,{theme:t,children:e.jsx(r,{...o})})}});function La(r){return e.jsx(m.Suspense,{fallback:null,children:e.jsx(Fa,{...r})})}function Da({item:r}){const c=ie(N=>{var g;return(g=N.session)==null?void 0:g.address}),{data:t,isLoading:o}=Ke(c),d=c&&t?c:"default",p=r.category==="emote",[y,_]=m.useState("item"),l=!p&&y==="item",v=l||!o,[a,j]=m.useState(!0);m.useEffect(()=>{j(!0)},[r.id,l]);const P=!!c&&!!t,f=P&&Ue(r,Ge(t)),L=Qe(r)[0],C=P&&!f&&!p;return e.jsxs(e.Fragment,{children:[v?e.jsx(He,{id:"shop-item-preview",contractAddress:r.contractAddress,tokenId:r.tokenId??void 0,itemId:r.tokenId?void 0:r.itemId??void 0,profile:l?void 0:f?d:"default",bodyShape:l||f?void 0:L,type:p?void 0:l?V.PreviewType.WEARABLE:V.PreviewType.AVATAR,emote:p||l?void 0:V.PreviewEmote.FASHION,disableBackground:!0,wheelZoom:p?1.5:void 0,wheelStart:p?100:void 0,dev:we.chainId===80002,onLoad:()=>j(!1)}):null,!v||a?e.jsx("div",{className:"item-preview__loading","aria-busy":"true","aria-label":s("itemPreview.loading"),children:e.jsx("span",{className:"item-preview__spinner","aria-hidden":!0})}):null,C&&!l?e.jsx("p",{className:"item-preview__note",children:s("itemPreview.shownOnBody",{shape:Ye(L)})}):null,p?e.jsx("div",{className:"item-preview__emote-controls","data-testid":"emote-controls",children:e.jsx(La,{wearablePreviewId:"shop-item-preview",hideFrameInput:!0})}):e.jsxs("div",{className:"item-preview__toggle",role:"group","aria-label":s("itemPreview.previewMode"),children:[e.jsxs("button",{type:"button",className:y==="avatar"?"is-active":"","aria-pressed":y==="avatar","aria-label":s("itemPreview.onAvatar"),onClick:()=>_("avatar"),children:[e.jsxs("svg",{className:"item-preview__toggle-ico",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:[e.jsx("circle",{cx:"12",cy:"7.5",r:"4"}),e.jsx("path",{d:"M4 20c0-4.2 3.6-6.5 8-6.5s8 2.3 8 6.5v.5H4z"})]}),e.jsx("span",{className:"item-preview__toggle-label",children:s("itemPreview.onAvatar")})]}),e.jsxs("button",{type:"button",className:y==="item"?"is-active":"","aria-pressed":y==="item","aria-label":s("itemPreview.item"),onClick:()=>_("item"),children:[e.jsx("svg",{className:"item-preview__toggle-ico",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:e.jsx("path",{d:"M8.5 3 3 6l1.8 3.8 2.2-1V21h10V8.8l2.2 1L22 6l-5.5-3a2.6 2.6 0 0 1-4.5 1.4A2.6 2.6 0 0 1 8.5 3z"})}),e.jsx("span",{className:"item-preview__toggle-label",children:s("itemPreview.item")})]})]})]})}const Ta=re(Je)`
|
|
3
|
-
display: flex;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
overflow: hidden;
|
|
6
|
-
gap: 1px;
|
|
7
|
-
background: ${Ce.colors.lineStrong};
|
|
8
|
-
`;function Ba({contractAddress:r,name:c,items:t,className:o}){const d=te();if(!r||!c)return null;const p=(t??[]).map(l=>l.thumbnail).filter(l=>!!l).slice(0,4),y=p.slice(0,2),_=p.slice(2,4);return e.jsxs(Ze,{as:"button","data-link":!0,className:o,"data-testid":"creator",onClick:l=>{l.stopPropagation(),d(`/collection/${r}`)},children:[p.length>0?e.jsxs(Ta,{as:"span","data-avatar":!0,"data-testid":"creator-ava","aria-hidden":!0,children:[e.jsx("span",{className:`collection-collage__row${_.length===0?" collection-collage__row--full":""}`,children:y.map((l,v)=>e.jsx("img",{src:l,alt:""},v))}),_.length>0?e.jsx("span",{className:"collection-collage__row",children:_.map((l,v)=>e.jsx("img",{src:l,alt:""},v))}):null]}):null,e.jsx(Xe,{"data-testid":"creator-name",children:ea(c)})]})}const Ra=re(ke)`
|
|
9
|
-
margin-top: 6px;
|
|
10
|
-
`,ge=re(ke)`
|
|
11
|
-
&& {
|
|
12
|
-
width: 100%;
|
|
13
|
-
height: 48px;
|
|
14
|
-
font-size: 15px;
|
|
15
|
-
font-weight: 600;
|
|
16
|
-
letter-spacing: 0.46px;
|
|
17
|
-
display: flex;
|
|
18
|
-
align-items: center;
|
|
19
|
-
justify-content: center;
|
|
20
|
-
gap: 8px;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
${Ce.media.down("lg")} {
|
|
24
|
-
.item-detail__ctas--dual && {
|
|
25
|
-
flex: 1 1 auto;
|
|
26
|
-
width: auto;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
`;function $a(r){return Object.values(V.Rarity).includes(r)}function Va(r){return r==="male"?s("itemDetail.genderMale"):r==="female"?s("itemDetail.genderFemale"):r==="unisex"?s("itemDetail.genderUnisex"):null}function Ne(r){return r.wearableCategory?r.wearableCategory.replace(/_/g," "):r.category==="emote"?s("itemDetail.categoryEmote"):s("itemDetail.categoryWearable")}function ds(){const{contractAddress:r,tokenId:c}=De(),{state:t}=Te(),o=te(),d=!!(t!=null&&t.market),p=(t==null?void 0:t.marketPriceCredits)??null,y=pe(i=>i.add),_=pe(i=>i.items),l=be(i=>i.toggle),{session:v}=ie(),[a,j]=m.useState(()=>t!=null&&t.item?{...t.item,tradeId:t.tradeId??t.item.tradeId}:{id:`${r}-${c}`,name:"",creator:"",contractAddress:r??"",itemId:null,category:"wearable",rarity:"common",network:"MATIC",chainId:we.chainId,thumbnail:"",priceCredits:0,gender:null,isSmart:!1,tokenId:c??void 0,tradeId:t==null?void 0:t.tradeId}),[P,f]=m.useState(!1),[L,C]=m.useState(!!(t!=null&&t.resumeBuy));m.useEffect(()=>{t!=null&&t.resumeBuy&&f(!0)},[t==null?void 0:t.resumeBuy]);const{data:N=[],isFetched:g}=O({queryKey:["collection-items",a.contractAddress],enabled:!!a.contractAddress,queryFn:()=>_a(a.contractAddress,{first:20}).then(i=>i.items)}),W=a.available==null&&!a.tokenId,{data:k,isLoading:U}=O({queryKey:["shop-item",a.contractAddress,c],enabled:!d&&!!a.contractAddress&&!!c&&(!(t!=null&&t.item)||W),queryFn:()=>ha(a.contractAddress,c)});m.useEffect(()=>{k&&j(i=>i.tradeId?i.available!=null&&i.wearableCategory?i:{...i,available:i.available??k.available,wearableCategory:i.wearableCategory??k.wearableCategory}:{...k})},[k]);const[G,Q]=m.useState(!1),{data:D=""}=O({queryKey:["item-desc",a.contractAddress,a.itemId],enabled:!!a.contractAddress&&!!a.itemId,staleTime:5*6e4,queryFn:()=>pa(a.contractAddress,a.itemId)}),{data:I}=O({queryKey:["collection-meta",a.contractAddress],enabled:!!a.contractAddress,staleTime:5*6e4,queryFn:()=>ba(a.contractAddress)});m.useEffect(()=>{if(a.name||k||N.length===0)return;const i=c&&N.find(S=>S.tokenId===c||S.itemId===c)||N.find(S=>S.contractAddress===a.contractAddress);i&&j(S=>({...i,tradeId:S.tradeId??i.tradeId}))},[N,k]);const H=m.useMemo(()=>{const i=new Set,S=[];for(const F of N){if(F.id===a.id||a.itemId&&F.itemId===a.itemId||a.tokenId&&F.tokenId===a.tokenId)continue;const ue=`${F.contractAddress}-${F.itemId??F.tokenId??F.id}`;i.has(ue)||(i.add(ue),S.push(F))}return S},[N,a.id,a.itemId,a.tokenId]),{data:n,isLoading:x}=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 xa(a.contractAddress,a.itemId);return(i==null?void 0:i.id)??null}return null}}),u=a.tradeId??n??void 0,h=!!u,{data:b}=Aa(d),A=m.useMemo(()=>{if(!d||!(t!=null&&t.item))return null;const i=t.item;return i.manaWei?{tradeId:i.tradeId??i.id,listingType:"primary",contractAddress:i.contractAddress,itemId:i.itemId??"",name:i.name,thumbnail:i.thumbnail,rarity:i.rarity,category:i.category,wearableCategory:i.wearableCategory??null,creator:i.creator,manaWei:i.manaWei,available:1,network:i.network,chainId:i.chainId,createdAt:0}:null},[d,t==null?void 0:t.item]),T=d&&p!=null&&!!b&&!!A,E=aa({priceCredits:a.priceCredits,compareAtCredits:a.compareAtCredits,saleEndsAt:a.saleEndsAt}),q=m.useMemo(()=>({...a,tradeId:u,id:u??a.id}),[a,u]),B=_.some(i=>i.id===q.id),w=be(i=>!!i.items[a.id]),z=m.useRef(null);m.useEffect(()=>{!a.name||x||z.current===a.id||(z.current=a.id,K("Shop Viewed Item",{...sa(a),for_sale:h}),ta(a))},[a.id,a.name,x,h]);const Y=`${r}/${c}`,le=m.useRef(Y);m.useEffect(()=>{le.current!==Y&&(le.current=Y,t!=null&&t.item&&j({...t.item,tradeId:t.tradeId??t.item.tradeId}),typeof window<"u"&&window.scrollTo({top:0,behavior:"smooth"}))},[Y]);function Ie(){!h||B||J||y(q,"item_detail")}const ee=$a(a.rarity)?a.rarity:V.Rarity.COMMON,de=Va(a.gender),ne=ia(a),ce=ra(a.gender),Ae=h&&E,Me=s("itemDetail.moreFromCollection"),J=la(a,v==null?void 0:v.address),oe=h?B?s("assetCard.inCart"):x?s("itemDetail.checking"):s("assetCard.addToCart"):s("itemDetail.notForSale"),Se=typeof a.available=="number"&&a.available>0&&!a.tokenId&&!d,Pe=!J&&h&&!d,Ee=d||!J,Fe=U||!!a.contractAddress&&!g,me=!a.name&&!Fe,Le=/^https?:\/\//i.test(a.thumbnail);return da(me?{title:s("seo.item.notFoundTitle"),noindex:!0}:a.name?{title:a.name,description:D||s("seo.item.fallbackDescription",{name:a.name,rarity:a.rarity,category:Ne(a),creator:Sa(a.creator)}),image:Le?a.thumbnail:void 0,type:"product"}:{}),me?e.jsxs("div",{className:"item-detail item-detail--notfound",children:[e.jsx(R,{name:"cart",className:"item-detail__notfound-ico"}),e.jsx("h1",{className:"item-detail__notfound-title",children:s("itemDetail.notAvailableTitle")}),e.jsx("p",{className:"muted",children:s("itemDetail.notAvailableBody")}),e.jsx(Ra,{variant:"purple",onClick:()=>o("/assets"),children:s("notFound.cta")})]}):e.jsxs("div",{className:"item-detail",children:[e.jsxs("nav",{className:"item-detail__crumbs","aria-label":s("itemDetail.breadcrumbAria"),children:[e.jsx("button",{className:"item-detail__crumb-link",onClick:()=>o("/assets"),children:s("nav.collectibles")}),e.jsx("span",{className:"item-detail__crumb-sep",children:"/"}),e.jsx("span",{className:"item-detail__crumb-current",children:a.name||s("itemDetail.itemFallback")})]}),e.jsxs("div",{className:"item-detail__main",children:[e.jsxs("div",{className:"item-detail__preview","data-testid":"item-preview",children:[a.name?e.jsx(Da,{item:a}):e.jsx("div",{className:"item-preview__loading","aria-busy":"true","aria-label":s("itemPreview.loading"),children:e.jsx("span",{className:"skeleton item-preview__skeleton","aria-hidden":!0})}),e.jsx("button",{className:`item-detail__fav item-detail__fav--preview${w?" is-on":""}`,onClick:()=>l(a),"aria-pressed":w,"aria-label":w?s("assetCard.removeFromFavorites"):s("assetCard.addToFavorites"),children:e.jsx(R,{name:w?"heart-solid":"heart",size:18})})]}),e.jsx("div",{className:"item-detail__info",children:a.name?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"item-detail__info-head",children:[e.jsx("h1",{className:"item-detail__title",children:a.name}),e.jsx("button",{className:`item-detail__fav${w?" is-on":""}`,onClick:()=>l(a),"aria-pressed":w,"aria-label":w?s("assetCard.removeFromFavorites"):s("assetCard.addToFavorites"),children:e.jsx(R,{name:w?"heart-solid":"heart",size:18})})]}),e.jsxs("div",{className:"item-detail__chips",children:[e.jsx("span",{className:"chip chip--rarity",style:{background:oa(ee),color:ca(ee)},title:na(a.rarity),children:a.rarity}),e.jsxs("span",{className:"chip item-detail__chip",children:[ne?e.jsx(R,{name:ne,size:18,color:"var(--text-2)"}):null,Ne(a)]}),de?e.jsxs("span",{className:"chip item-detail__chip",children:[ce?e.jsx(R,{name:ce,size:18,color:"var(--text-2)"}):null,de]}):null]}),D?e.jsxs("div",{className:"item-detail__section item-detail__description",children:[e.jsx("div",{className:"item-detail__label",children:s("itemDetail.description")}),e.jsx("p",{className:`item-detail__desc-text${G?" is-expanded":""}`,children:D}),D.length>140?e.jsx("button",{className:"link item-detail__desc-toggle",onClick:()=>Q(i=>!i),children:G?s("itemDetail.showLess"):s("itemDetail.readMore")}):null]}):null,a.creator||I!=null&&I.name?e.jsxs("div",{className:"item-detail__meta",children:[a.creator?e.jsxs("div",{className:"item-detail__meta-col",children:[e.jsx("div",{className:"item-detail__label",children:s("itemDetail.creator")}),e.jsx(ma,{address:a.creator,className:"item-detail__creator",linkToProfile:!0,hidePrefix:!0})]}):null,I!=null&&I.name?e.jsxs("div",{className:"item-detail__meta-col item-detail__meta-col--collection",children:[e.jsx("div",{className:"item-detail__label",children:s("itemDetail.collection")}),e.jsx(Ba,{contractAddress:a.contractAddress,name:I.name,items:N,className:"item-detail__creator"})]}):null]}):null,e.jsx("hr",{className:"item-detail__divider"}),e.jsx("div",{className:"item-detail__price-block",children:e.jsxs("div",{className:"item-detail__price-row",children:[e.jsxs("div",{className:"item-detail__price-col",children:[e.jsx("div",{className:"item-detail__price-label",children:s("itemDetail.price")}),d?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"item-detail__price item-detail__price--market",children:p==null?e.jsx("span",{className:"item-detail__price-value",children:"—"}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"item-detail__approx","aria-hidden":!0,children:"≈"}),e.jsx(M,{className:"item-detail__diamond"}),e.jsx("span",{className:"item-detail__price-value",children:p})]})}),e.jsx("div",{className:"item-detail__market-note muted",children:s("assetCard.marketPrice")})]}):h?Ae?e.jsxs("div",{className:"item-detail__price item-detail__price--sale",children:[e.jsxs("span",{className:"item-detail__price",children:[e.jsx(M,{className:"item-detail__diamond"}),e.jsx("span",{className:"item-detail__price-value",children:a.priceCredits})]}),e.jsxs("span",{className:"item-detail__price-was",children:[e.jsx(M,{className:"item-detail__diamond item-detail__diamond--was"}),a.compareAtCredits]}),xe(a.compareAtCredits,a.priceCredits)>0?e.jsx("span",{className:"item-detail__sale-badge",children:s("assetCard.saleWithDiscount",{pct:xe(a.compareAtCredits,a.priceCredits)})}):null,e.jsx(ua,{endsAt:a.saleEndsAt,className:"item-detail__countdown"})]}):e.jsxs("div",{className:"item-detail__price",children:[e.jsx(M,{className:"item-detail__diamond"}),e.jsx("span",{className:"item-detail__price-value",children:a.priceCredits})]}):e.jsx("div",{className:"item-detail__price item-detail__price--none",children:s("itemDetail.notForSale")})]}),Se?e.jsxs("div",{className:"item-detail__stock-col",children:[e.jsx("div",{className:"item-detail__price-label",children:s("itemDetail.stock")}),e.jsxs("div",{className:"item-detail__stock-value",children:[(a.available??0).toLocaleString(),"/",V.Rarity.getMaxSupply(ee).toLocaleString()]})]}):null]})}),e.jsx("div",{className:`item-detail__ctas${Ee?" item-detail__ctas--buttons":""}${Pe?" item-detail__ctas--dual":""}`,children:d?e.jsxs(ge,{variant:"purple",onClick:()=>f(!0),disabled:!T,children:[e.jsx("span",{className:"item-detail__cta-label",children:s("assetCard.buyNow")}),p!=null?e.jsxs("span",{className:"item-detail__cta-price","aria-hidden":!0,children:[e.jsx(M,{className:"item-detail__cta-diamond"}),p]}):null]}):J?e.jsxs("p",{className:"item-detail__own-note muted",children:[s("itemDetail.ownItemPrefix")," ",e.jsx(Be,{to:"/my-assets",children:s("nav.myAssets")}),s("itemDetail.ownItemSuffix")]}):e.jsxs(e.Fragment,{children:[h?e.jsxs(ge,{variant:"purple",onClick:()=>f(!0),disabled:x,children:[e.jsx("span",{className:"item-detail__cta-label",children:s("assetCard.buyNow")}),e.jsxs("span",{className:"item-detail__cta-price","aria-hidden":!0,children:[e.jsx(M,{className:"item-detail__cta-diamond"}),a.priceCredits]})]}):null,e.jsxs("button",{className:"item-detail__addcart",onClick:Ie,disabled:!h||B||x,"aria-label":oe,children:[e.jsx(R,{name:"cart-solid"}),e.jsx("span",{className:"item-detail__addcart-label",children:oe})]})]})})]}):e.jsx(Wa,{})})]}),e.jsx(Pa,{title:Me,items:H,onViewAll:a.contractAddress?()=>o(`/collection/${a.contractAddress}`):void 0}),P&&d&&A&&b?e.jsx(Ma,{listing:A,rate:b,onClose:()=>f(!1),onSold:()=>f(!1)}):P&&!d?e.jsx(Ea,{item:q,resume:L,onClose:()=>{f(!1),C(!1)}}):null]})}function Wa(){return e.jsxs("div",{className:"item-detail__info-skel","aria-hidden":!0,children:[e.jsx("span",{className:"skeleton id-skel__title"}),e.jsxs("div",{className:"id-skel__chips",children:[e.jsx("span",{className:"skeleton id-skel__chip"}),e.jsx("span",{className:"skeleton id-skel__chip"})]}),e.jsx("span",{className:"skeleton id-skel__line"}),e.jsx("span",{className:"skeleton id-skel__line id-skel__line--short"}),e.jsx("hr",{className:"item-detail__divider"}),e.jsx("span",{className:"skeleton id-skel__price"}),e.jsx("span",{className:"skeleton id-skel__btn"})]})}export{ds as ItemDetail,ds as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as h,m as C}from"./index-kiuUdw-p.js";const f="dcl_shop_resume_cart";function l(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:l(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{f as R,T as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./react-yytiy0wi.js";import{T as m,n as t}from"./index-kiuUdw-p.js";import{u as o}from"./useTheme-Ct2vhEl6.js";function a(){const e=o(t);return e[m]||e}export{a as u};
|