@dcl/shop 1.4.2-31320710520.commit-47b5e79 → 1.4.2-31321117785.commit-e69ddc8
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/{Activity-Bj50vKR0.js → Activity-vUciLqTf.js} +4 -4
- package/_assets/{AnimatedBackground-DM_J9sFS.js → AnimatedBackground-D8EE4gIZ.js} +1 -1
- package/_assets/{Assets-Le2w7iQI.js → Assets-DeNWsLcJ.js} +5 -5
- package/_assets/{Assets.styles-CpqF_Fdz.js → Assets.styles-9eZKD8s9.js} +1 -1
- package/_assets/{Authorizations-_Wg34m7S.js → Authorizations-CuKbIbof.js} +1 -1
- package/_assets/Cart-DRGswNIT.js +705 -0
- package/_assets/{CircularProgress-CxEoMF4A.js → CircularProgress-417O120F.js} +1 -1
- package/_assets/{Collection-VHStAFNx.js → Collection-DIl5sMmU.js} +1 -1
- package/_assets/{CollectionCarousel-myES4XcG.js → CollectionCarousel-C6Qurv1c.js} +2 -2
- package/_assets/{Confetti-DeVL3NXt.js → Confetti-C-W2Wx7a.js} +1 -1
- package/_assets/{ConstantsUtil-DdEaqFLk.js → ConstantsUtil-B-N7tmhJ.js} +1 -1
- package/_assets/{ContentClient-DoEKbMYH.js → ContentClient-31_9Q5IS.js} +1 -1
- package/_assets/{Creator-PDdG-iXV.js → Creator-DNk4uxt9.js} +1 -1
- package/_assets/{DeploymentBuilder-CLcel3Eo.js → DeploymentBuilder-DQuYAFLI.js} +1 -1
- package/_assets/{ErrorNotice-CHfdCZkq.js → ErrorNotice-DivoNxAh.js} +1 -1
- package/_assets/{ExchangeController-BsfHECP_.js → ExchangeController-BcX3uUH7.js} +1 -1
- package/_assets/{Faq-DZoTGHut.js → Faq-SbSZ_ven.js} +1 -1
- package/_assets/{GetCredits-DUBcWOB1.js → GetCredits-BiezC23h.js} +1 -1
- package/_assets/{Grow-DgEI6Im-.js → Grow-CRDOnWnS.js} +1 -1
- package/_assets/{HelpersUtil-Dy-rbv5K.js → HelpersUtil-B1FOZLKI.js} +1 -1
- package/_assets/{ItemDetail-BkJjwdIs.js → ItemDetail-B8BxXpKv.js} +17 -17
- package/_assets/LazyEmoteControls-DFo4LVof.js +2 -0
- package/_assets/{LoadMore-CX0YRQgF.js → LoadMore-Bj3YyMIu.js} +1 -1
- package/_assets/{ManaPricingBanner.styles-BwFSl7LS.js → ManaPricingBanner.styles-DaNuAlQd.js} +1 -1
- package/_assets/{MyAssets-BjStqGxu.js → MyAssets-Bf6l8btr.js} +2 -2
- package/_assets/{MyFavorites-Dvo5uJVF.js → MyFavorites-B0xCRFDV.js} +1 -1
- package/_assets/{NetworkUtil-B-eKNJQq.js → NetworkUtil-B0TAHRVW.js} +1 -1
- package/_assets/{NotFound-CuEmIcZw.js → NotFound-Mb8CPlkq.js} +1 -1
- package/_assets/{NotificationsBell-lm3dBPHl.js → NotificationsBell-BviPOVne.js} +1 -1
- package/_assets/{OutfitDetail-D2DXT1hX.js → OutfitDetail-Ci5MgpAF.js} +1 -1
- package/_assets/{OutfitPreview-FcBW6hyj.js → OutfitPreview-C0o9HFjd.js} +1 -1
- package/_assets/{OutfitStudio-BKGN4eJn.js → OutfitStudio-UF3Nq1dn.js} +1 -1
- package/_assets/{StoreSettings-CuE1xosG.js → StoreSettings-BZR8VCrX.js} +1 -1
- package/_assets/{Success-cy7VeSoE.js → Success-BdnhPfxX.js} +1 -1
- package/_assets/{SwapController-CDs7ZYXx.js → SwapController-DnTd3a5J.js} +1 -1
- package/_assets/{Tooltip-CXFRnod1.js → Tooltip-DyT9Nmx6.js} +1 -1
- package/_assets/{TradeService-xoqTPgqX.js → TradeService-BU5sYL5A.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-PClCN64a.js → W3MFrameProviderSingleton-DK8M6L_d.js} +3 -3
- package/_assets/{WebCryptoP256-BUPseViS.js → WebCryptoP256-D8fnuOYK.js} +1 -1
- package/_assets/{authorizations-BwORYJQ9.js → authorizations-CGsXmKlT.js} +1 -1
- package/_assets/{basic-C4se6tSm.js → basic-B5dlNOvx.js} +1 -1
- package/_assets/{biconomy-Du_8Umsh.js → biconomy-DkX-xo0j.js} +1 -1
- package/_assets/{builder-DfX-mH6j.js → builder-C5qlb5g7.js} +1 -1
- package/_assets/{buy-Gj-kpaAH.js → buy-DPUp0il9.js} +1 -1
- package/_assets/{buy-gasless-DIKNMgNF.js → buy-gasless-HWNzfRM9.js} +1 -1
- package/_assets/{categories-CwxnAvm3.js → categories-rIrLyLhy.js} +1 -1
- package/_assets/{ccip-L6Ofyz0j.js → ccip-BDTNQTNt.js} +1 -1
- package/_assets/{ccip-3LUdJIKA.js → ccip-BwI-jEx0.js} +1 -1
- package/_assets/{chains-MlB0BpGt.js → chains-D2oWbaWg.js} +1 -1
- package/_assets/{collectionPage.styles-B3Xgj9MA.js → collectionPage.styles-DyZ6yfVA.js} +6 -6
- package/_assets/{common-CdWgKbjo.js → common-BAvH8GHQ.js} +1 -1
- package/_assets/{controller-LFh_Ka-C.js → controller-Cuvny8mm.js} +2 -2
- package/_assets/{core-BgYGhM-G.js → core-d_w0otml.js} +4 -4
- package/_assets/{createSvgIcon-CdDr--Ku.js → createSvgIcon-Sv_6XDk_.js} +1 -1
- package/_assets/{custom-BE1FXlr9.js → custom-D3ThyY6Q.js} +1 -1
- package/_assets/{data-capture-bmPXPZw0.js → data-capture-CIAiYYr_.js} +1 -1
- package/_assets/decimals-B0alSDDy.js +1 -0
- package/_assets/{decimals-DY2Q4K8y.js → decimals-CZsb_Tk_.js} +1 -1
- package/_assets/{detectExtension-DuOOm9SA.js → detectExtension-rsF4cbdU.js} +1 -1
- package/_assets/{email-D4q8Zaeb.js → email-DYTNNiw_.js} +1 -1
- package/_assets/{embedded-wallet-B2KDebTr.js → embedded-wallet-CaxCIqyZ.js} +1 -1
- package/_assets/{emotion-styled.browser.esm-BbJO6XrC.js → emotion-styled.browser.esm-D-zA0hBW.js} +1 -1
- package/_assets/{engine-BDy2Ae8T.js → engine-B6Wkto0L.js} +1 -1
- package/_assets/{errors-BMIEJWrl.js → errors-BgGl4_vk.js} +1 -1
- package/_assets/{estimate-l1-fee-BWxIEsdB.js → estimate-l1-fee-CwRQP56r.js} +1 -1
- package/_assets/{eth_estimateGas-DBodmhEo.js → eth_estimateGas-B0JtMXaP.js} +1 -1
- package/_assets/{eth_getStorageAt-CekC9DsJ.js → eth_getStorageAt-BWiaTHYk.js} +1 -1
- package/_assets/{eth_getTransactionCount-Bvc7o7xs.js → eth_getTransactionCount-DxkkCESB.js} +1 -1
- package/_assets/{ethereum-DoUOPHwc.js → ethereum-BQu4alQE.js} +1 -1
- package/_assets/{ethers-C2aT6vPn.js → ethers-DYJhhXPV.js} +1 -1
- package/_assets/{execute-C4QWK6aN.js → execute-CnNCm8P6.js} +2 -2
- package/_assets/{extractIPFS-Cc3nmFwl.js → extractIPFS-DcAd3dA4.js} +1 -1
- package/_assets/{features-CeMZQtN_.js → features-Dy0GUX0N.js} +1 -1
- package/_assets/{fetchTokenMetadata-XeM6tKfs.js → fetchTokenMetadata-D1q-pnnU.js} +2 -2
- package/_assets/{field.styles-qh9N2rfp.js → field.styles-DaRdJ0Y8.js} +1 -1
- package/_assets/{get-bytecode-D4K-YBIB.js → get-bytecode-G9ucw6r2.js} +1 -1
- package/_assets/get-ecosystem-wallet-info-B3hjPPro.js +1 -0
- package/_assets/{getBalance-DXAGBbVC.js → getBalance-DzL2VWrp.js} +2 -2
- package/_assets/{getInstalledModules-BTjlPGjb.js → getInstalledModules-9JIeedPe.js} +1 -1
- package/_assets/getNFT-DT3yCCbz.js +1 -0
- package/_assets/{getNFT-CNJ-_M01.js → getNFT-gbQFtRNR.js} +2 -2
- package/_assets/{grid.styles-BL-AZNEl.js → grid.styles-BLNJxnwJ.js} +1 -1
- package/_assets/{hashTypedData-D4XG2ByP.js → hashTypedData-C5SQ50I6.js} +1 -1
- package/_assets/{hashTypedData-DlLD_1k9.js → hashTypedData-cmcOA8ay.js} +1 -1
- package/_assets/{in-app-CvvyDaIR.js → in-app-BxN-iatR.js} +1 -1
- package/_assets/{in-app-wallet-calls-KwCyTYu4.js → in-app-wallet-calls-NBQL4XFJ.js} +1 -1
- package/_assets/{index-fAxVQOAa.js → index-218Sej3Q.js} +1 -1
- package/_assets/{index-CLMqQAew.js → index-2NVhi815.js} +1 -1
- package/_assets/{index-DD9-eNIh.js → index-5O7asnX4.js} +1 -1
- package/_assets/{index-CPO0SyLp.js → index-B23IgafR.js} +1 -1
- package/_assets/{index-3xmjR6aV.js → index-B4PGHKPV.js} +2 -2
- package/_assets/{index-BSkXuNTI.js → index-B5DFOtWx.js} +1 -1
- package/_assets/{index-CjCe04F0.js → index-B8fBx8-w.js} +1 -1
- package/_assets/{index-BDMLisxX.js → index-BC1Wsxp3.js} +1 -1
- package/_assets/{index-D3_WugnV.js → index-BDawxd7K.js} +1 -1
- package/_assets/{index-ULJcIHe0.js → index-BGS9C_i9.js} +510 -441
- package/_assets/{index-Dj4N1S4W.js → index-BOct49Vj.js} +1 -1
- package/_assets/{index--vfgdtJH.js → index-BUpfB8FR.js} +1 -1
- package/_assets/{index-BjQITz-8.js → index-BUzs9scd.js} +1 -1
- package/_assets/{index-FmQ2Znb5.js → index-B_A3LHnA.js} +1 -1
- package/_assets/{index-fTsVEPz3.js → index-BaqALAx-.js} +1 -1
- package/_assets/{index-Boa_g2os.js → index-BaxEHXOM.js} +1 -1
- package/_assets/{index-xFci8055.js → index-BcyBTPof.js} +1 -1
- package/_assets/{index-D2d8wxlg.js → index-Bfp0Y4Pw.js} +1 -1
- package/_assets/{index-5MPkg-ua.js → index-Bhtj7hDK.js} +3 -3
- package/_assets/{index-iBFKBxN1.js → index-BnGs2U1H.js} +1 -1
- package/_assets/{index-B6Yc6mtH.js → index-Btob1yJ2.js} +1 -1
- package/_assets/{index-LXqcIZPG.js → index-BuoSbTCz.js} +1 -1
- package/_assets/{index-CLl3mIl8.js → index-BzMH2n9V.js} +1 -1
- package/_assets/{index-fAYbiDnu.js → index-C-qoWK2S.js} +1 -1
- package/_assets/{index-C5A8Yad0.js → index-C5D0KpNA.js} +2 -2
- package/_assets/{index-CiO812Ca.js → index-C6tCZwI6.js} +1 -1
- package/_assets/{index-ClmS_QYw.js → index-CCvG9DBk.js} +1 -1
- package/_assets/{index-BXw_7R9L.js → index-CF4Ku7YV.js} +1 -1
- package/_assets/{index-ClaGX2vw.js → index-CIfAYGCp.js} +1 -1
- package/_assets/{index-CEWixcPf.js → index-CO6uIjyC.js} +3 -3
- package/_assets/{index-TI6_sn0N.js → index-CfsDDDtE.js} +1 -1
- package/_assets/{index-25UlwZ8K.js → index-CmTDUoFL.js} +1 -1
- package/_assets/{index-Df6NB0bD.js → index-CrGGUg7V.js} +1 -1
- package/_assets/{index-D4ZnNcOV.js → index-D1IqEWjK.js} +1 -1
- package/_assets/{index-CanVHHXT.js → index-D3xGDSz7.js} +1 -1
- package/_assets/{index-C_2YgwDC.js → index-D8XCi3aX.js} +2 -2
- package/_assets/{index-BNKhGWJy.js → index-DDi4NQb2.js} +1 -1
- package/_assets/{index-CTbMQcYM.js → index-DGNm9Eym.js} +1 -1
- package/_assets/{index-C4sZNEwQ.js → index-DJfImPGN.js} +1 -1
- package/_assets/{index-Dqi1Ahna.js → index-DLdpXsvH.js} +1 -1
- package/_assets/{index-DnB7f-EM.js → index-DYYZp072.js} +2 -2
- package/_assets/{index-CYj_dZQu.js → index-Db0xJokm.js} +1 -1
- package/_assets/{index-DSwVpxq2.js → index-DdsbGkyj.js} +1 -1
- package/_assets/{index-BgGXHJAj.js → index-DiSEimfZ.js} +1 -1
- package/_assets/{index-DRQk28IU.js → index-DspCdG2m.js} +1 -1
- package/_assets/{index-DXbJCnmP.js → index-DtYqvBS-.js} +1 -1
- package/_assets/{index-5qxNhTDL.js → index-DwYM9TXB.js} +1 -1
- package/_assets/{index-k89JybTR.js → index-DwmB1OcJ.js} +1 -1
- package/_assets/{index-u8AU6tTj.js → index-DzIDFWT0.js} +3 -3
- package/_assets/{index-DJmB870S.js → index-JUSoFFJD.js} +1 -1
- package/_assets/{index-Ce8ihRu4.js → index-KhBWlDLt.js} +1 -1
- package/_assets/{index-S_HE117X.js → index-L88EKwUU.js} +1 -1
- package/_assets/{index-Bj6eP-0Y.js → index-M8Qhipno.js} +1 -1
- package/_assets/{index-B30MVCe4.js → index-RtOMytms.js} +1 -1
- package/_assets/{index-DScU3nKX.js → index-X7MvWQQb.js} +1 -1
- package/_assets/{index-Dl6uuY7g.js → index-_wt2ox1t.js} +1 -1
- package/_assets/{index-BY0Bney7.js → index-gbLpvk0M.js} +1 -1
- package/_assets/{index-4baAkBo1.js → index-gqd47qxW.js} +1 -1
- package/_assets/{index-Y7QBjYCj.js → index-roUOVZsO.js} +1 -1
- package/_assets/{index-CSC4uqgH.js → index-v-oeqUfd.js} +1 -1
- package/_assets/{index-BiF7cs9Y.js → index-xqoDvYsT.js} +1 -1
- package/_assets/{index-CyhH3Owi.js → index-yXUgI3Y8.js} +1 -1
- package/_assets/{index.es-C8QCn5tW.js → index.es-C6y0J8Tt.js} +1 -1
- package/_assets/{index.es-DQ8XF9bt.js → index.es-CSI3hDuw.js} +1 -1
- package/_assets/{index.es-Dka5Kgw7.js → index.es-CzazB5gL.js} +4 -4
- package/_assets/{linkAccount-D43nvVpf.js → linkAccount-Dqh7KxX0.js} +1 -1
- package/_assets/{localBatchGatewayRequest-DhJVA43e.js → localBatchGatewayRequest-BE9sc6Bj.js} +1 -1
- package/_assets/{native-BulWZ7QV.js → native-BqatX2SO.js} +1 -1
- package/_assets/{networks-BnMbPdpN.js → networks-BTCxpPfq.js} +1 -1
- package/_assets/{onramp-DMJQHKg-.js → onramp-BRQHD09i.js} +1 -1
- package/_assets/{openzeppelin-C3Pl3yuu.js → openzeppelin-Duoy0McU.js} +1 -1
- package/_assets/{ownerOf-CRxTSA2c.js → ownerOf-D2bgWPl4.js} +1 -1
- package/_assets/{parseNft-Bs-RQe4T.js → parseNft-L35iDsLu.js} +2 -2
- package/_assets/{parseSignature-rsOf3_qw.js → parseSignature-BW4RUQHL.js} +1 -1
- package/_assets/{parseSignature-RYls3v4v.js → parseSignature-D82Px8bB.js} +3 -3
- package/_assets/{passkeys-BUxRhn2L.js → passkeys-CWRdzOgW.js} +1 -1
- package/_assets/{pay-with-exchange-DHW-C64V.js → pay-with-exchange-e9qqe6Il.js} +1 -1
- package/_assets/{prepare-contract-call-e3f1C8XP.js → prepare-contract-call-DDUXPPWf.js} +1 -1
- package/_assets/{qr-overlay-Cg-WkKuT.js → qr-overlay-Dfuos3Dx.js} +1 -1
- package/_assets/{receive-Cu-ZV-cu.js → receive-BZ2k6lzF.js} +1 -1
- package/_assets/{resolveImplementation-Bh36MQvx.js → resolveImplementation-zyU9nNFG.js} +1 -1
- package/_assets/{rpc-6d6u8O5r.js → rpc-D5Y8gbEs.js} +1 -1
- package/_assets/{secp256k1-B92Ywaq1.js → secp256k1-CKOpdK2z.js} +1 -1
- package/_assets/{secp256k1-D2taLWYD.js → secp256k1-CmtsAL4o.js} +1 -1
- package/_assets/{secp256k1-D1m__--i.js → secp256k1-Em6pk7JJ.js} +1 -1
- package/_assets/{send-heKmoW9F.js → send-BIFJ211N.js} +1 -1
- package/_assets/{send-batch-transaction-CvTCh5wP.js → send-batch-transaction-DOXxOqep.js} +1 -1
- package/_assets/{send-eip712-transaction-B9AdogZT.js → send-eip712-transaction-BH50-BBC.js} +2 -2
- package/_assets/send-gasless-transaction-DoMxo8So.js +2 -0
- package/_assets/{send-transaction-B69VAvsk.js → send-transaction-sMQ2fCJ1.js} +2 -2
- package/_assets/{sendMetaTransaction-DpVGu658.js → sendMetaTransaction-BzjGNyNr.js} +1 -1
- package/_assets/{sendRawTransaction-DV4GVVoj.js → sendRawTransaction-BHReQOjp.js} +3 -3
- package/_assets/{sentry-BK5fu_HX.js → sentry-ByNeKxg1.js} +1 -1
- package/_assets/{serializeTransaction-DlpejkUw.js → serializeTransaction-wTVp_UPB.js} +1 -1
- package/_assets/{session-proposal-Dx3yOKUi.js → session-proposal-D7dUDP4A.js} +1 -1
- package/_assets/{session-request-DCyVYhuz.js → session-request-yXC_poMj.js} +2 -2
- package/_assets/{sha256-CnRuTod2.js → sha256-DlvyKk25.js} +1 -1
- package/_assets/{signing-D2s4UaW5.js → signing-tozip71V.js} +3 -3
- package/_assets/{skeleton.styles-D7VHybuU.js → skeleton.styles-BkIQo-2n.js} +1 -1
- package/_assets/{socials-CakRupC1.js → socials-BqCKUUee.js} +1 -1
- package/_assets/{styled-HBeZsj4_.js → styled-D09jxUGQ.js} +1 -1
- package/_assets/{swaps-DqDP1lId.js → swaps-CD2yvr5k.js} +1 -1
- package/_assets/{thirdweb-DQKaNdML.js → thirdweb-CVmDBG2O.js} +3 -3
- package/_assets/{to-serializable-transaction-BdIactDO.js → to-serializable-transaction-D11t4_Ix.js} +2 -2
- package/_assets/{totalSupply-iZRkxhL1.js → totalSupply-BZAL3oCm.js} +1 -1
- package/_assets/{transaction-C4vjl2Fm.js → transaction-DdagAX_X.js} +1 -1
- package/_assets/{transactionReceipt-BQu434pp.js → transactionReceipt-C_HbaTZp.js} +1 -1
- package/_assets/{transactions-CNPMMMBr.js → transactions-oSY8W1hd.js} +1 -1
- package/_assets/{useCreditPacks-BWVDizmd.js → useCreditPacks-USUUNSOp.js} +1 -1
- package/_assets/{useImportable-yzPDMI0N.js → useImportable-CrCX6e-b.js} +1 -1
- package/_assets/{useInfiniteGrid-CTKQTKU7.js → useInfiniteGrid-Cw-ORqbZ.js} +1 -1
- package/_assets/{useStore-Dkbc_tki.js → useStore-CfjE2pXy.js} +2 -2
- package/_assets/{useTheme-DXtBSimm.js → useTheme-hg2AifFk.js} +1 -1
- package/_assets/{utils-DeM1E6iD.js → utils-BjezQJkW.js} +1 -1
- package/_assets/{verifyHash-CBVL_1yb.js → verifyHash-BRfBGsvp.js} +1 -1
- package/_assets/{w3m-modal-BmABaD4G.js → w3m-modal-2MMPp63l.js} +1 -1
- package/_assets/{w3m-modal-CXIA1TIS.js → w3m-modal-C4kBiIJJ.js} +1 -1
- package/_assets/{wait-for-tx-receipt-FGfPKCKV.js → wait-for-tx-receipt-CqYuxxBM.js} +1 -1
- package/_assets/{wallets-DCgEemEi.js → wallets-DzlLDHLy.js} +5 -5
- package/_assets/{web-connector-ClK8-EsV.js → web-connector-5tLEu31t.js} +3 -3
- package/_assets/{writeContract-DudS1oCU.js → writeContract-DK1RD1Dv.js} +1 -1
- package/_assets/{zora-sepolia-lz4GmBCL.js → zora-sepolia-Bj4K3_p8.js} +1 -1
- package/_assets/{zoraTestnet-p_eIbpZq.js → zoraTestnet-ZxpHk1Ex.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/Cart-wplxHX39.js +0 -696
- package/_assets/LazyEmoteControls-rTlV3yXE.js +0 -2
- package/_assets/decimals-DaugtsOj.js +0 -1
- package/_assets/get-ecosystem-wallet-info-Cy3ItbjQ.js +0 -1
- package/_assets/getNFT-D10rHe0g.js +0 -1
- package/_assets/send-gasless-transaction-md4Lgjib.js +0 -2
|
@@ -0,0 +1,705 @@
|
|
|
1
|
+
import{j as e,L as Qe,r as T,b as oa,a as ca}from"./react-BYHuwl8r.js";import{t as J,s as i,b as a,L as de,C as je,ax as la,ay as qe,az as da,J as ua,I as O,A as Et,K as Ne,y as ha,X as H,am as ht,v as pa,w as ga,l as ma,aA as xa,D as fa,aB as ya,an as ba,aC as va,aD as pt,aE as wa,aF as Ca,z as ja,aG as gt,Z as D,aH as mt,aI as ka,k as ne,r as $a,c as xt,aJ as Sa,aK as ft,aL as Be,aM as Ma,aN as ye,aO as be,aP as yt,g as bt,f as vt,aQ as Ta}from"./index-BGS9C_i9.js";import{M as Ia,S as Pa,C as Aa,H as za,a as Ea,T as qa,X as Ba,b as Ra,B as Fa,c as _a,d as wt,e as Wa,f as ke,P as qt,g as La,h as Ka,i as Qa,j as Na,k as Ke,l as ue,L as Ua,m as Ga,n as Ct,o as jt,W as Ha,p as Oa,q as Va,r as Da,A as Ja,s as Xa,t as Ya,u as Za,v as es,w as ts,x as as,y as ss,z as ns,D as is,E as rs,F as os,G as cs,I as ls,J as ds,K as us,N as hs,O as Re,Q as ps,R as gs,U as ms,V as xs,Y as kt,Z as $t,_ as fs,$ as ys,a0 as bs,a1 as vs,a2 as St,a3 as ws}from"./CollectionCarousel-C6Qurv1c.js";import{f as Cs,h as js,a as ks,n as $s,i as Ss,A as Ms}from"./authorizations-CGsXmKlT.js";import{g as Ts,h as Fe,p as Is}from"./buy-DPUp0il9.js";import{b as Ps,w as As,S as Mt,G as zs}from"./buy-gasless-HWNzfRM9.js";import{u as Es,M as qs,R as ve,r as Bs,c as Rs,p as Tt,a as _e}from"./useCreditPacks-USUUNSOp.js";import{i as Fs,a as _s}from"./errors-BgGl4_vk.js";import{E as Ws}from"./ErrorNotice-DivoNxAh.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-ByNeKxg1.js";import"./ethers-DYJhhXPV.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-BzjGNyNr.js";const{colors:ie,radius:Ls}=J,Ks=i.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
gap: 8px;
|
|
6
|
+
width: 100%;
|
|
7
|
+
`,Qs=i.span`
|
|
8
|
+
font-size: 16px;
|
|
9
|
+
line-height: 22px;
|
|
10
|
+
color: ${ie.text2};
|
|
11
|
+
text-transform: capitalize;
|
|
12
|
+
white-space: nowrap;
|
|
13
|
+
`,Ns=i.div`
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
gap: 12px;
|
|
17
|
+
/* The list is the modal's elastic region: inside a viewport-capped card it gives up height first, so
|
|
18
|
+
the pack picker, total and Cancel/Buy below it stay on screen without scrolling. The floor is an
|
|
19
|
+
explicit ~one row because a scroll container's automatic minimum size is zero — it would otherwise
|
|
20
|
+
collapse to nothing on a short screen. */
|
|
21
|
+
min-height: 120px;
|
|
22
|
+
max-height: 360px;
|
|
23
|
+
overflow-y: auto;
|
|
24
|
+
width: 100%;
|
|
25
|
+
scrollbar-width: thin;
|
|
26
|
+
scrollbar-color: #a2a2a2 ${ie.media};
|
|
27
|
+
|
|
28
|
+
&::-webkit-scrollbar {
|
|
29
|
+
width: 8px;
|
|
30
|
+
}
|
|
31
|
+
&::-webkit-scrollbar-track {
|
|
32
|
+
background: ${ie.media};
|
|
33
|
+
border-radius: 10px;
|
|
34
|
+
}
|
|
35
|
+
&::-webkit-scrollbar-thumb {
|
|
36
|
+
background: #a2a2a2;
|
|
37
|
+
border-radius: ${Ls.btn};
|
|
38
|
+
}
|
|
39
|
+
`,Us=i.span`
|
|
40
|
+
margin-left: 8px;
|
|
41
|
+
font-size: 13px;
|
|
42
|
+
font-weight: 600;
|
|
43
|
+
color: ${ie.muted};
|
|
44
|
+
`,Gs=i.div`
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: space-between;
|
|
48
|
+
gap: 12px;
|
|
49
|
+
padding: 0 0 12px;
|
|
50
|
+
font-size: 14px;
|
|
51
|
+
color: ${ie.muted};
|
|
52
|
+
|
|
53
|
+
& strong {
|
|
54
|
+
display: inline-flex;
|
|
55
|
+
align-items: center;
|
|
56
|
+
gap: 6px;
|
|
57
|
+
font-size: 20px;
|
|
58
|
+
font-weight: 700;
|
|
59
|
+
color: ${ie.text};
|
|
60
|
+
}
|
|
61
|
+
`,Hs=i.p`
|
|
62
|
+
margin: 12px 0 0;
|
|
63
|
+
background: rgba(255, 162, 90, 0.3);
|
|
64
|
+
border-radius: ${J.radius.btn};
|
|
65
|
+
padding: 12px 16px;
|
|
66
|
+
font-family: ${J.font.sans};
|
|
67
|
+
font-size: 14px;
|
|
68
|
+
line-height: 1.334;
|
|
69
|
+
color: ${J.colors.text2};
|
|
70
|
+
`;function Os(o){const{phase:h,balanceCredits:P,onClose:A}=o,W=h==="processing",X=h==="error"?a("cartCheckout.errorTitle"):h==="nofunds"?a("cartCheckout.titleNoFunds"):h==="choose"?a("buyModal.choosePayment"):a("cartCheckout.titleBuy"),Y=h==="processing";return e.jsxs(Ia,{role:"dialog","aria-modal":"true","aria-label":a("cartCheckout.dialogAria"),children:[e.jsx(Pa,{onClick:W?void 0:A,"aria-hidden":!0}),e.jsxs(Aa,{"data-tall":Y||void 0,children:[e.jsxs(za,{children:[e.jsxs(Ea,{children:[e.jsx(qa,{children:X}),!W&&e.jsx(Ba,{onClick:A,"aria-label":a("buyModal.close"),children:e.jsx(Ra,{})})]}),e.jsxs(Fa,{children:[e.jsx(_a,{children:h==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),e.jsx(wt,{}),e.jsx(Wa,{children:de(P)})]}),o.heldCreditsCount&&(h==="choose"||h==="nofunds")?e.jsx(Hs,{"data-testid":"cart-held-notice",children:a("buyModal.heldExplainer",{credits:o.heldCreditsCount,currency:je.name})}):null]}),h==="choose"&&e.jsxs(ke,{children:[e.jsxs(Gs,{children:[e.jsx("span",{children:a("cart.purchaseSummary")}),e.jsxs("strong",{children:[e.jsx(wt,{}),de(o.totalCredits??0)]})]}),e.jsx(qt,{options:o.options??[],totalCents:o.totalCents??0,shortfall:o.shortfall,onPay:o.onPay??(()=>{})})]}),h==="processing"&&e.jsx(Vs,{stage:o.stage??"reserving",step:o.step??1,total:o.total??1,isSelfCustody:!!o.isSelfCustody,signatures:o.signatures}),h==="nofunds"&&e.jsx(Ds,{lines:o.lines??[],shortfallCredits:o.shortfallCredits??0,packs:o.packs??[],selectedPack:o.selectedPack??"",onSelectPack:o.onSelectPack??(()=>{}),onBuyPacks:o.onBuyPacks??(()=>{}),onCancel:A}),h==="error"&&e.jsxs(ke,{children:[e.jsxs(La,{"data-testid":"buy-error",children:[e.jsx(Ka,{src:Qa,alt:"",width:64,height:80}),e.jsxs(Na,{children:[e.jsx("b",{children:a("cartCheckout.errorHeadline")})," ",o.heldCredits?e.jsxs(e.Fragment,{children:[o.message?e.jsxs(e.Fragment,{children:[o.message," "]}):null,a("cartCheckout.heldLead",{currency:je.name}),e.jsx("b",{children:a("cartCheckout.heldBold")}),a("cartCheckout.heldTail",{currency:je.name})]}):o.message??a("cartCheckout.errorBody")]})]}),o.heldCredits?e.jsx(Ke,{children:e.jsx(ue,{"data-variant":"purple","data-full":!0,onClick:A,children:a("cartCheckout.gotIt")})}):e.jsxs(Ke,{children:[e.jsx(ue,{"data-variant":"outline",onClick:A,children:a("buyModal.cancel")}),e.jsx(ue,{"data-variant":"purple",onClick:o.onRetry??A,children:a("cartCheckout.tryAgain")})]})]})]})]})}function Vs({stage:o,step:h,total:P,isSelfCustody:A,signatures:W}){const X=o==="reserving",Y=P>0?Math.min(100,Math.round(h/P*100)):0,K=A&&W&&W.total>1,re=o==="awaiting-signature"?A?K?a("cartCheckout.confirmMultiple",{current:W.current,total:W.total}):a("buyModal.confirmToContinue"):a("buyModal.completingTransaction"):o==="settling"?a("buyModal.completingTransaction"):a("cartCheckout.preparing");return e.jsxs(ke,{"data-processing":!0,children:[e.jsx(Ua,{src:la,alt:"",width:61,height:61}),e.jsx(Ga,{children:re}),X?e.jsxs(Ks,{children:[e.jsx(Ct,{"aria-hidden":!0,children:e.jsx(jt,{"data-step":!0,style:{width:`${Y}%`}})}),P>1?e.jsxs(Qs,{children:[h,"/",P]}):null]}):e.jsx(Ct,{"aria-hidden":!0,children:e.jsx(jt,{})})]})}function Ds({lines:o,shortfallCredits:h,packs:P,selectedPack:A,onSelectPack:W,onBuyPacks:X,onCancel:Y}){const K=P.find(n=>n.id===A),re=o.reduce((n,Q)=>n+(Q.quantity??1),0);return e.jsxs(ke,{children:[e.jsxs(Ha,{"data-testid":"nofunds-warning",children:[e.jsx(Oa,{}),e.jsxs(Va,{children:[e.jsx("b",{children:a("buyModal.insufficientFunds")})," ",a("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:a("buyModal.warningCreditsAmount",{count:Math.max(0,h)})})," ",a("buyModal.warningToPurchase",{count:re}),qe()?null:e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(Da,{href:da("/credits"),target:"_blank",rel:"noopener noreferrer",children:a("buyModal.warningLearnMore")})]})]})]}),e.jsx(Ns,{children:o.map(n=>{const Q=n.quantity??1;return e.jsxs(Ja,{children:[e.jsx(Xa,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsxs(Ya,{children:[e.jsxs("div",{children:[e.jsxs(Za,{title:n.item.name,children:[n.item.name||a("buyModal.itemFallback"),Q>1?e.jsx(Us,{children:a("cartCheckout.qty",{count:Q})}):null]}),n.item.creator?e.jsx(es,{address:n.item.creator}):null]}),e.jsxs(ts,{children:[e.jsx(as,{}),e.jsx("span",{children:de(n.priceCredits*Q)})]})]})]},n.item.id)})}),qe()?null:e.jsxs(e.Fragment,{children:[e.jsx(ss,{children:P.map(n=>{const Q=n.id===A;return e.jsxs(ns,{"data-testid":"credit-pack","data-on":Q||void 0,onClick:()=>W(n.id),children:[e.jsx(is,{src:rs,alt:""}),e.jsx(os,{children:de(n.credits)}),e.jsxs(cs,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),e.jsxs(ls,{children:[e.jsxs(ds,{children:[e.jsx(us,{}),e.jsx("span",{children:de((K==null?void 0:K.credits)??0)})]}),e.jsxs(hs,{children:["$",((K==null?void 0:K.usd)??0).toFixed(2)]})]})]}),e.jsxs(Ke,{children:[e.jsx(ue,{"data-variant":"outline",onClick:Y,children:a("buyModal.cancel")}),qe()?null:e.jsx(ue,{"data-variant":"gradient",onClick:X,children:a("buyModal.buy")})]})]})}const{colors:l,gradients:Js,radius:ae}=J,Bt="@media (max-width: 1080px)",I="@media (max-width: 880px)",It=i.div`
|
|
71
|
+
max-width: 1510px;
|
|
72
|
+
margin: 0 auto;
|
|
73
|
+
/* Grows into the page's leftover height and passes it down to Upsell, so the white cross-sell band ends at
|
|
74
|
+
the footer rather than leaving a gray strip. Needs .page[data-route="/cart"] to be a flex column. */
|
|
75
|
+
width: 100%;
|
|
76
|
+
flex: 1 0 auto;
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-direction: column;
|
|
79
|
+
|
|
80
|
+
${I} {
|
|
81
|
+
padding-bottom: 188px; /* room for the fixed summary bar */
|
|
82
|
+
}
|
|
83
|
+
`,Pt=i.button`
|
|
84
|
+
display: inline-flex;
|
|
85
|
+
align-items: center;
|
|
86
|
+
gap: 6px;
|
|
87
|
+
margin: 0 0 16px;
|
|
88
|
+
padding: 0;
|
|
89
|
+
border: 0;
|
|
90
|
+
background: none;
|
|
91
|
+
color: ${l.text2};
|
|
92
|
+
font-size: 14px;
|
|
93
|
+
font-weight: 600;
|
|
94
|
+
letter-spacing: 0.02em;
|
|
95
|
+
text-transform: uppercase;
|
|
96
|
+
cursor: pointer;
|
|
97
|
+
transition: color 0.15s ease;
|
|
98
|
+
|
|
99
|
+
&:hover {
|
|
100
|
+
color: ${l.accent};
|
|
101
|
+
}
|
|
102
|
+
& .ico {
|
|
103
|
+
width: 18px;
|
|
104
|
+
height: 18px;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
${I} {
|
|
108
|
+
display: none;
|
|
109
|
+
}
|
|
110
|
+
`,Xs=i.div`
|
|
111
|
+
display: grid;
|
|
112
|
+
grid-template-columns: minmax(0, 1fr) 615px;
|
|
113
|
+
gap: 24px;
|
|
114
|
+
align-items: start;
|
|
115
|
+
|
|
116
|
+
${Bt} {
|
|
117
|
+
grid-template-columns: 1fr;
|
|
118
|
+
}
|
|
119
|
+
`,At=i.div`
|
|
120
|
+
position: relative;
|
|
121
|
+
/* The gray band is 733px in Figma (1553-317103) — taller than the panels inside it, deliberately. Without
|
|
122
|
+
this it collapsed to the panels' height, and the page shell's own viewport-filling min-height then padded
|
|
123
|
+
the page out BELOW the cross-sell, so a strip of gray showed under "You might also like" instead of the
|
|
124
|
+
footer. Giving the band its designed height puts the leftover space where the design wants it. */
|
|
125
|
+
min-height: 733px;
|
|
126
|
+
/* Gray below the panels so the band never hugs the last card: Figma's band runs y152–950 with the
|
|
127
|
+
content ending at 854. The min-height above only covers a SHORT cart — once the list outgrows it
|
|
128
|
+
the band tracks the content, and without this padding it would butt straight into the purple. */
|
|
129
|
+
padding-bottom: 96px;
|
|
130
|
+
|
|
131
|
+
&::before {
|
|
132
|
+
content: '';
|
|
133
|
+
position: absolute;
|
|
134
|
+
top: -28px;
|
|
135
|
+
bottom: 0;
|
|
136
|
+
left: 50%;
|
|
137
|
+
width: 100vw;
|
|
138
|
+
transform: translateX(-50%);
|
|
139
|
+
background: ${l.media};
|
|
140
|
+
z-index: 0;
|
|
141
|
+
}
|
|
142
|
+
& > * {
|
|
143
|
+
position: relative;
|
|
144
|
+
z-index: 1;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
${I} {
|
|
148
|
+
/* The single-column layout is already taller than the desktop band, and the fixed summary bar sits over
|
|
149
|
+
the bottom of it — a floor here would only add empty gray. */
|
|
150
|
+
min-height: 0;
|
|
151
|
+
|
|
152
|
+
/* The fixed summary bar already reserves room at the bottom on mobile (see Checkout). */
|
|
153
|
+
padding-bottom: 32px;
|
|
154
|
+
|
|
155
|
+
&::before {
|
|
156
|
+
top: -16px; /* .page's mobile padding */
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
`,Ys=i.div`
|
|
160
|
+
min-width: 0;
|
|
161
|
+
display: flex;
|
|
162
|
+
flex-direction: column;
|
|
163
|
+
gap: 12px;
|
|
164
|
+
`,Zs=i.div`
|
|
165
|
+
display: flex;
|
|
166
|
+
align-items: center;
|
|
167
|
+
justify-content: space-between;
|
|
168
|
+
gap: 12px;
|
|
169
|
+
background: ${l.white};
|
|
170
|
+
border-radius: 16px;
|
|
171
|
+
padding: 12px 12px 12px 24px;
|
|
172
|
+
|
|
173
|
+
${I} {
|
|
174
|
+
gap: 8px;
|
|
175
|
+
padding: 8px 16px;
|
|
176
|
+
}
|
|
177
|
+
`,Rt=i.section`
|
|
178
|
+
min-width: 0;
|
|
179
|
+
background: ${l.white};
|
|
180
|
+
border-radius: 16px;
|
|
181
|
+
padding: 24px;
|
|
182
|
+
|
|
183
|
+
${I} {
|
|
184
|
+
padding: 16px;
|
|
185
|
+
}
|
|
186
|
+
`,en=i(Rt)`
|
|
187
|
+
display: flex;
|
|
188
|
+
flex-direction: column;
|
|
189
|
+
align-items: center;
|
|
190
|
+
justify-content: center;
|
|
191
|
+
gap: 24px;
|
|
192
|
+
min-height: 420px;
|
|
193
|
+
padding: 48px 16px;
|
|
194
|
+
text-align: center;
|
|
195
|
+
color: ${l.text};
|
|
196
|
+
|
|
197
|
+
${J.media.maxWidth("mobile")} {
|
|
198
|
+
min-height: 320px;
|
|
199
|
+
padding: 32px 16px;
|
|
200
|
+
}
|
|
201
|
+
`,tn=i.div`
|
|
202
|
+
display: flex;
|
|
203
|
+
flex-direction: column;
|
|
204
|
+
align-items: center;
|
|
205
|
+
gap: 12px;
|
|
206
|
+
padding-bottom: 16px;
|
|
207
|
+
`,an=i.p`
|
|
208
|
+
margin: 0;
|
|
209
|
+
font-size: 24px;
|
|
210
|
+
font-weight: 700;
|
|
211
|
+
line-height: 1.6;
|
|
212
|
+
|
|
213
|
+
${J.media.maxWidth("mobile")} {
|
|
214
|
+
font-size: 20px;
|
|
215
|
+
}
|
|
216
|
+
`,sn=i.p`
|
|
217
|
+
margin: 0;
|
|
218
|
+
font-size: 20px;
|
|
219
|
+
font-weight: 400;
|
|
220
|
+
line-height: 1.6;
|
|
221
|
+
|
|
222
|
+
${J.media.maxWidth("mobile")} {
|
|
223
|
+
font-size: 16px;
|
|
224
|
+
}
|
|
225
|
+
`,nn=i(Qe)`
|
|
226
|
+
display: inline-flex;
|
|
227
|
+
align-items: center;
|
|
228
|
+
justify-content: center;
|
|
229
|
+
width: 310px;
|
|
230
|
+
max-width: 100%;
|
|
231
|
+
height: 56px;
|
|
232
|
+
padding: 0 12px;
|
|
233
|
+
border-radius: ${ae.card};
|
|
234
|
+
background: ${l.accent};
|
|
235
|
+
color: ${l.softWhite};
|
|
236
|
+
font-size: 15px;
|
|
237
|
+
font-weight: 600;
|
|
238
|
+
line-height: 24px;
|
|
239
|
+
letter-spacing: 0.46px;
|
|
240
|
+
text-transform: uppercase;
|
|
241
|
+
text-decoration: none;
|
|
242
|
+
transition: background 0.15s ease;
|
|
243
|
+
|
|
244
|
+
&:hover {
|
|
245
|
+
background: ${l.accentHover};
|
|
246
|
+
}
|
|
247
|
+
&:focus-visible {
|
|
248
|
+
outline: 2px solid ${l.accent};
|
|
249
|
+
outline-offset: 2px;
|
|
250
|
+
}
|
|
251
|
+
`,rn=i.button`
|
|
252
|
+
display: none;
|
|
253
|
+
|
|
254
|
+
${I} {
|
|
255
|
+
display: inline-flex;
|
|
256
|
+
align-items: center;
|
|
257
|
+
flex-shrink: 0;
|
|
258
|
+
border: 0;
|
|
259
|
+
background: none;
|
|
260
|
+
padding: 0;
|
|
261
|
+
color: ${l.text};
|
|
262
|
+
cursor: pointer;
|
|
263
|
+
|
|
264
|
+
& .ico {
|
|
265
|
+
width: 20px;
|
|
266
|
+
height: 20px;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
`,on=i.h1`
|
|
270
|
+
margin: 0;
|
|
271
|
+
font-size: 14px;
|
|
272
|
+
font-weight: 600;
|
|
273
|
+
line-height: 1.57;
|
|
274
|
+
color: ${l.text};
|
|
275
|
+
|
|
276
|
+
${I} {
|
|
277
|
+
flex: 1;
|
|
278
|
+
min-width: 0;
|
|
279
|
+
font-size: 16px;
|
|
280
|
+
}
|
|
281
|
+
`,cn=i.button`
|
|
282
|
+
display: inline-flex;
|
|
283
|
+
align-items: center;
|
|
284
|
+
justify-content: center;
|
|
285
|
+
gap: 8px;
|
|
286
|
+
height: 40px;
|
|
287
|
+
padding: 0 12px;
|
|
288
|
+
border: 2px solid ${l.text2};
|
|
289
|
+
border-radius: ${ae.btn};
|
|
290
|
+
background: none;
|
|
291
|
+
color: ${l.text2};
|
|
292
|
+
font-size: 13px;
|
|
293
|
+
font-weight: 600;
|
|
294
|
+
line-height: 24px;
|
|
295
|
+
letter-spacing: 0.46px;
|
|
296
|
+
text-transform: uppercase;
|
|
297
|
+
white-space: nowrap;
|
|
298
|
+
cursor: pointer;
|
|
299
|
+
transition:
|
|
300
|
+
background 0.15s ease,
|
|
301
|
+
filter 0.15s ease;
|
|
302
|
+
|
|
303
|
+
/* Mixed from currentColor so the wash cannot drift from the border colour. */
|
|
304
|
+
&:hover:not(:disabled) {
|
|
305
|
+
background: color-mix(in srgb, currentColor 6%, transparent);
|
|
306
|
+
}
|
|
307
|
+
&:active:not(:disabled) {
|
|
308
|
+
filter: brightness(0.97);
|
|
309
|
+
}
|
|
310
|
+
&:disabled {
|
|
311
|
+
opacity: 0.55;
|
|
312
|
+
cursor: default;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/* Mobile keeps the full 40px button and thins the outline to 1px (1182:236892) rather than shrinking
|
|
316
|
+
the type, which had it reading smaller than the row title beside it. */
|
|
317
|
+
${I} {
|
|
318
|
+
border-width: 1px;
|
|
319
|
+
border-color: ${l.text};
|
|
320
|
+
color: ${l.text};
|
|
321
|
+
}
|
|
322
|
+
`,ln=i.div`
|
|
323
|
+
display: flex;
|
|
324
|
+
flex-direction: column;
|
|
325
|
+
gap: 24px;
|
|
326
|
+
`,dn=i.div`
|
|
327
|
+
position: relative;
|
|
328
|
+
display: flex;
|
|
329
|
+
align-items: stretch;
|
|
330
|
+
gap: 12px;
|
|
331
|
+
background: ${l.white};
|
|
332
|
+
border: 1px solid ${l.gray4};
|
|
333
|
+
border-radius: ${ae.card};
|
|
334
|
+
overflow: hidden;
|
|
335
|
+
|
|
336
|
+
&[data-unavailable] [data-thumb] {
|
|
337
|
+
opacity: 0.5;
|
|
338
|
+
}
|
|
339
|
+
&[data-unavailable] [data-check] {
|
|
340
|
+
display: none;
|
|
341
|
+
}
|
|
342
|
+
&[data-unavailable] [data-desc] {
|
|
343
|
+
opacity: 0.7;
|
|
344
|
+
}
|
|
345
|
+
`,un=i.div`
|
|
346
|
+
position: relative;
|
|
347
|
+
flex-shrink: 0;
|
|
348
|
+
width: 137.5px;
|
|
349
|
+
height: 137px;
|
|
350
|
+
background: ${l.media};
|
|
351
|
+
border-radius: ${ae.card};
|
|
352
|
+
display: grid;
|
|
353
|
+
place-items: center;
|
|
354
|
+
overflow: hidden;
|
|
355
|
+
|
|
356
|
+
& img {
|
|
357
|
+
width: 83%;
|
|
358
|
+
height: 83%;
|
|
359
|
+
object-fit: contain;
|
|
360
|
+
filter: drop-shadow(0.56px 2.25px 2.8px rgba(0, 0, 0, 0.1));
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
${I} {
|
|
364
|
+
width: 120px;
|
|
365
|
+
height: 120px;
|
|
366
|
+
}
|
|
367
|
+
`,hn=i(Qe)`
|
|
368
|
+
position: absolute;
|
|
369
|
+
inset: 0;
|
|
370
|
+
display: grid;
|
|
371
|
+
place-items: center;
|
|
372
|
+
`,pn=i.span`
|
|
373
|
+
position: absolute;
|
|
374
|
+
top: 7.5px;
|
|
375
|
+
left: 7.5px;
|
|
376
|
+
width: 20px;
|
|
377
|
+
height: 20px;
|
|
378
|
+
border-radius: 50%;
|
|
379
|
+
background: #34ce77;
|
|
380
|
+
display: grid;
|
|
381
|
+
place-items: center;
|
|
382
|
+
`,gn=i.div`
|
|
383
|
+
flex: 1;
|
|
384
|
+
min-width: 0;
|
|
385
|
+
display: flex;
|
|
386
|
+
flex-direction: column;
|
|
387
|
+
justify-content: space-between;
|
|
388
|
+
gap: 8px;
|
|
389
|
+
padding: 16px 8px;
|
|
390
|
+
|
|
391
|
+
${I} {
|
|
392
|
+
padding: 12px 4px 12px 0;
|
|
393
|
+
}
|
|
394
|
+
`,mn=i.div`
|
|
395
|
+
display: flex;
|
|
396
|
+
flex-direction: column;
|
|
397
|
+
gap: 4px;
|
|
398
|
+
min-width: 0;
|
|
399
|
+
padding-right: 64px; /* clear the top-right favourite + remove group */
|
|
400
|
+
`,Ft=Ne`
|
|
401
|
+
display: block;
|
|
402
|
+
font-size: 16px;
|
|
403
|
+
font-weight: 600;
|
|
404
|
+
line-height: 1.2;
|
|
405
|
+
color: ${l.text};
|
|
406
|
+
text-decoration: none;
|
|
407
|
+
overflow: hidden;
|
|
408
|
+
text-overflow: ellipsis;
|
|
409
|
+
white-space: nowrap;
|
|
410
|
+
|
|
411
|
+
a&:hover {
|
|
412
|
+
color: ${l.accent};
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
${I} {
|
|
416
|
+
white-space: normal;
|
|
417
|
+
display: -webkit-box;
|
|
418
|
+
-webkit-line-clamp: 2;
|
|
419
|
+
line-clamp: 2;
|
|
420
|
+
-webkit-box-orient: vertical;
|
|
421
|
+
}
|
|
422
|
+
`,xn=i.div`
|
|
423
|
+
${Ft};
|
|
424
|
+
`,fn=i(Qe)`
|
|
425
|
+
${Ft};
|
|
426
|
+
`,yn=i(ua)`
|
|
427
|
+
font-size: 10px;
|
|
428
|
+
line-height: 1.43;
|
|
429
|
+
color: ${l.muted};
|
|
430
|
+
|
|
431
|
+
& [data-avatar] {
|
|
432
|
+
display: none;
|
|
433
|
+
}
|
|
434
|
+
& [data-testid='creator-name'] {
|
|
435
|
+
font-size: 10px;
|
|
436
|
+
line-height: 1.43;
|
|
437
|
+
}
|
|
438
|
+
`,bn=i.div`
|
|
439
|
+
display: flex;
|
|
440
|
+
align-items: center;
|
|
441
|
+
justify-content: space-between;
|
|
442
|
+
gap: 12px;
|
|
443
|
+
padding-right: 8px;
|
|
444
|
+
`,vn=i.div`
|
|
445
|
+
display: inline-flex;
|
|
446
|
+
align-items: center;
|
|
447
|
+
gap: 8px;
|
|
448
|
+
padding: 6px;
|
|
449
|
+
border: 0.5px solid ${l.muted2};
|
|
450
|
+
border-radius: ${ae.pill};
|
|
451
|
+
`,zt=i.button`
|
|
452
|
+
display: grid;
|
|
453
|
+
place-items: center;
|
|
454
|
+
width: 16px;
|
|
455
|
+
height: 16px;
|
|
456
|
+
padding: 0;
|
|
457
|
+
border: 0;
|
|
458
|
+
background: none;
|
|
459
|
+
color: ${l.text};
|
|
460
|
+
cursor: pointer;
|
|
461
|
+
|
|
462
|
+
&:disabled {
|
|
463
|
+
color: ${l.muted2};
|
|
464
|
+
cursor: default;
|
|
465
|
+
}
|
|
466
|
+
`,wn=i.span`
|
|
467
|
+
min-width: 12px;
|
|
468
|
+
font-size: 14px;
|
|
469
|
+
font-weight: 500;
|
|
470
|
+
line-height: 1.2;
|
|
471
|
+
color: ${l.text};
|
|
472
|
+
text-align: center;
|
|
473
|
+
`,Cn=i.div`
|
|
474
|
+
display: inline-flex;
|
|
475
|
+
align-items: center;
|
|
476
|
+
gap: 4px;
|
|
477
|
+
/* Always right-aligned: with a stepper present space-between handles it; for secondary/unique lines
|
|
478
|
+
(no stepper) the auto margin keeps the lone price on the right instead of falling to the left. */
|
|
479
|
+
margin-left: auto;
|
|
480
|
+
font-size: 24px;
|
|
481
|
+
font-weight: 600;
|
|
482
|
+
color: ${l.text2};
|
|
483
|
+
|
|
484
|
+
${I} {
|
|
485
|
+
font-size: 20px;
|
|
486
|
+
}
|
|
487
|
+
`,jn=i(Et)`
|
|
488
|
+
width: 24px;
|
|
489
|
+
height: 24px;
|
|
490
|
+
background: ${l.text};
|
|
491
|
+
|
|
492
|
+
${I} {
|
|
493
|
+
width: 20px;
|
|
494
|
+
height: 20px;
|
|
495
|
+
}
|
|
496
|
+
`,kn=i.span`
|
|
497
|
+
margin-left: 6px;
|
|
498
|
+
font-size: 14px;
|
|
499
|
+
font-weight: 500;
|
|
500
|
+
color: ${l.muted};
|
|
501
|
+
text-decoration: line-through;
|
|
502
|
+
`,$n=i.div`
|
|
503
|
+
position: absolute;
|
|
504
|
+
top: 9px;
|
|
505
|
+
right: 7px;
|
|
506
|
+
display: flex;
|
|
507
|
+
align-items: flex-start;
|
|
508
|
+
gap: 12px;
|
|
509
|
+
`,Sn=i.span`
|
|
510
|
+
display: inline-flex;
|
|
511
|
+
align-items: center;
|
|
512
|
+
gap: 4px;
|
|
513
|
+
font-size: 12px;
|
|
514
|
+
font-weight: 600;
|
|
515
|
+
line-height: 1;
|
|
516
|
+
text-transform: uppercase;
|
|
517
|
+
color: ${l.text2};
|
|
518
|
+
`,Mn=i(O)`
|
|
519
|
+
color: #f48221;
|
|
520
|
+
`,Tn=i.span`
|
|
521
|
+
align-self: flex-start;
|
|
522
|
+
display: inline-flex;
|
|
523
|
+
align-items: center;
|
|
524
|
+
gap: 4px;
|
|
525
|
+
padding: 2px 4px;
|
|
526
|
+
border-radius: ${ae.chip};
|
|
527
|
+
background: #f4e9ff;
|
|
528
|
+
font-size: 10px;
|
|
529
|
+
font-weight: 400;
|
|
530
|
+
line-height: 14px;
|
|
531
|
+
color: ${l.text};
|
|
532
|
+
`,In=i(O)`
|
|
533
|
+
width: 11.31px;
|
|
534
|
+
height: 10.94px;
|
|
535
|
+
background: ${l.text};
|
|
536
|
+
`,_t=Ne`
|
|
537
|
+
display: grid;
|
|
538
|
+
place-items: center;
|
|
539
|
+
width: 24px;
|
|
540
|
+
height: 24px;
|
|
541
|
+
padding: 0;
|
|
542
|
+
border: 0;
|
|
543
|
+
background: none;
|
|
544
|
+
color: ${l.muted};
|
|
545
|
+
cursor: pointer;
|
|
546
|
+
transition: color 0.12s ease;
|
|
547
|
+
|
|
548
|
+
&:disabled {
|
|
549
|
+
opacity: 0.5;
|
|
550
|
+
cursor: default;
|
|
551
|
+
}
|
|
552
|
+
`,Pn=i.button`
|
|
553
|
+
${_t};
|
|
554
|
+
|
|
555
|
+
&:hover:not(:disabled) {
|
|
556
|
+
color: ${l.text};
|
|
557
|
+
}
|
|
558
|
+
&[data-on] {
|
|
559
|
+
color: ${l.dclRed};
|
|
560
|
+
}
|
|
561
|
+
`,An=i.button`
|
|
562
|
+
${_t};
|
|
563
|
+
|
|
564
|
+
&:hover:not(:disabled) {
|
|
565
|
+
color: ${l.dclRed};
|
|
566
|
+
}
|
|
567
|
+
`,zn=i.div`
|
|
568
|
+
display: flex;
|
|
569
|
+
gap: 20px;
|
|
570
|
+
margin-top: 16px;
|
|
571
|
+
|
|
572
|
+
& .link {
|
|
573
|
+
font-size: 13px;
|
|
574
|
+
color: ${l.muted};
|
|
575
|
+
font-weight: 600;
|
|
576
|
+
}
|
|
577
|
+
& .link:hover:not(:disabled) {
|
|
578
|
+
color: ${l.text};
|
|
579
|
+
}
|
|
580
|
+
`,En=i.aside`
|
|
581
|
+
position: sticky;
|
|
582
|
+
top: 172px;
|
|
583
|
+
display: flex;
|
|
584
|
+
flex-direction: column;
|
|
585
|
+
background: ${l.white};
|
|
586
|
+
box-shadow: 0 1px 3px rgba(22, 21, 24, 0.06);
|
|
587
|
+
border-radius: 16px;
|
|
588
|
+
padding: 16px;
|
|
589
|
+
|
|
590
|
+
${Bt} {
|
|
591
|
+
position: static;
|
|
592
|
+
}
|
|
593
|
+
${I} {
|
|
594
|
+
position: fixed;
|
|
595
|
+
left: 0;
|
|
596
|
+
right: 0;
|
|
597
|
+
top: auto;
|
|
598
|
+
bottom: 0;
|
|
599
|
+
z-index: 30;
|
|
600
|
+
border: 0;
|
|
601
|
+
/* Square and hard-edged against the page (1182:236910): it is a bar docked to the bottom, not a sheet
|
|
602
|
+
lifted off it. */
|
|
603
|
+
border-radius: 0;
|
|
604
|
+
box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.25);
|
|
605
|
+
}
|
|
606
|
+
`,qn=i.h2`
|
|
607
|
+
margin: 0 0 24px;
|
|
608
|
+
padding-bottom: 16px;
|
|
609
|
+
border-bottom: 1px solid ${l.gray4};
|
|
610
|
+
font-size: 24px;
|
|
611
|
+
font-weight: 600;
|
|
612
|
+
color: ${l.text};
|
|
613
|
+
|
|
614
|
+
${I} {
|
|
615
|
+
margin-bottom: 12px;
|
|
616
|
+
padding-bottom: 8px;
|
|
617
|
+
font-size: 16px;
|
|
618
|
+
line-height: 1.6;
|
|
619
|
+
}
|
|
620
|
+
`,Bn=i.div`
|
|
621
|
+
display: flex;
|
|
622
|
+
flex-direction: column;
|
|
623
|
+
gap: 12px;
|
|
624
|
+
`,Rn=i.div`
|
|
625
|
+
display: flex;
|
|
626
|
+
align-items: flex-start;
|
|
627
|
+
justify-content: space-between;
|
|
628
|
+
gap: 12px;
|
|
629
|
+
`,Fn=i.span`
|
|
630
|
+
font-size: 14px;
|
|
631
|
+
font-weight: 600;
|
|
632
|
+
line-height: 1.57;
|
|
633
|
+
color: ${l.muted1};
|
|
634
|
+
`,_n=i.span`
|
|
635
|
+
display: inline-flex;
|
|
636
|
+
align-items: center;
|
|
637
|
+
gap: 8px;
|
|
638
|
+
font-size: 24px;
|
|
639
|
+
font-weight: 700;
|
|
640
|
+
color: ${l.text};
|
|
641
|
+
`,Wn=i.span`
|
|
642
|
+
display: flex;
|
|
643
|
+
flex-direction: column;
|
|
644
|
+
align-items: flex-end;
|
|
645
|
+
justify-content: center;
|
|
646
|
+
gap: 4px;
|
|
647
|
+
`;i.span`
|
|
648
|
+
font-size: 12px;
|
|
649
|
+
font-weight: 400;
|
|
650
|
+
line-height: 1;
|
|
651
|
+
color: ${l.muted};
|
|
652
|
+
`;const Ln=i(Et)`
|
|
653
|
+
width: 30px;
|
|
654
|
+
height: 30px;
|
|
655
|
+
background: ${l.text};
|
|
656
|
+
-webkit-mask-size: 24px 24px;
|
|
657
|
+
mask-size: 24px 24px;
|
|
658
|
+
-webkit-mask-position: left center;
|
|
659
|
+
mask-position: left center;
|
|
660
|
+
`;i.button`
|
|
661
|
+
width: 100%;
|
|
662
|
+
height: 56px;
|
|
663
|
+
border: 0;
|
|
664
|
+
border-radius: ${ae.btn};
|
|
665
|
+
background: ${Js.buyBtn};
|
|
666
|
+
color: ${l.softWhite};
|
|
667
|
+
font-size: 15px;
|
|
668
|
+
font-weight: 600;
|
|
669
|
+
letter-spacing: 0.046em;
|
|
670
|
+
text-transform: uppercase;
|
|
671
|
+
cursor: pointer;
|
|
672
|
+
transition: background-image 0.15s ease;
|
|
673
|
+
|
|
674
|
+
/* Primary hover/pressed is the solid Primary red (Figma 738:53252 / 738:53262) — the gradient is
|
|
675
|
+
the RESTING fill only. Painted as a flat GRADIENT, not a background-color: the shorthand can't
|
|
676
|
+
interpolate background-image, so gradient -> colour dropped the image midway while the colour was
|
|
677
|
+
still half transparent and the button visibly blinked. Same property both ends = a clean swap. */
|
|
678
|
+
&:hover:not(:disabled),
|
|
679
|
+
&:active:not(:disabled) {
|
|
680
|
+
background-image: linear-gradient(${l.dclRed}, ${l.dclRed});
|
|
681
|
+
}
|
|
682
|
+
&:disabled {
|
|
683
|
+
opacity: 0.6;
|
|
684
|
+
cursor: default;
|
|
685
|
+
}
|
|
686
|
+
`;const Wt=Ne`
|
|
687
|
+
margin: 0;
|
|
688
|
+
font-size: 13px;
|
|
689
|
+
`,we=i.p`
|
|
690
|
+
${Wt};
|
|
691
|
+
`,Kn=i(Ws)`
|
|
692
|
+
${Wt};
|
|
693
|
+
`,Qn=i.div`
|
|
694
|
+
position: relative;
|
|
695
|
+
flex: 1 0 auto;
|
|
696
|
+
margin-top: 48px;
|
|
697
|
+
/* Below the gray band the cross-sell sits straight on the purple field (Figma) — hence no band of its
|
|
698
|
+
own. The padding is the whole gap from the top of the section to the heading; the shared carousel's
|
|
699
|
+
own top margin is zeroed below so the two don't stack. */
|
|
700
|
+
padding: 47px 0 24px;
|
|
701
|
+
|
|
702
|
+
& section {
|
|
703
|
+
margin-top: 0;
|
|
704
|
+
}
|
|
705
|
+
`;function We(o){if(Fs(o))return a("errors.rejected");const h=(o.message??"").toLowerCase();return h.includes("insufficient")?a("cart.error.insufficient",{currency:je.name}):h.includes("no active listing")||h.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const Nn=12e4;function Un(o){const h=[];return o.unavailable.length&&h.push(a("cart.drop.unavailable",{count:o.unavailable.length})),o.own.length&&h.push(a("cart.drop.own",{count:o.own.length})),a("cart.drop.removed",{items:h.join(` ${a("cart.drop.and")} `)})}const Le=o=>o.reduce((h,P)=>h+P.priceCredits*P.quantity,0),Ce=o=>o.flatMap(h=>Array.from({length:h.quantity},()=>({...h,quantity:1})));function ii(){var ut;ha({title:a("nav.cart"),noindex:!0});const o=H(t=>t.items),h=H(t=>t.remove),P=H(t=>t.increment),A=H(t=>t.decrement),W=H(t=>t.clear),X=H(t=>t.restore),Y=H(t=>t.setFittingOpen),K=ht(t=>t.items),re=ht(t=>t.toggle),{session:n,signIn:Q}=pa(),Lt=ga(),he=Es().packs.slice(0,qs);T.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const Kt=o.some(t=>t.category!=="emote"),{data:$e}=ma({queryKey:["upsell-listings"],queryFn:()=>Ta({first:40}),staleTime:6e4}),{data:j}=xa(n),y=fa(),Z=oa(),{state:q}=ca(),[Qt,oe]=T.useState(null),[Ue,pe]=T.useState(null),[Nt,R]=T.useState(!1),[F,V]=T.useState(null),Ge=T.useRef(0),[p,k]=T.useState(null),{data:ge}=ya(n),{data:ce}=ba(!0),[Se,He]=T.useState(""),le=T.useRef(null),Oe=va(o),Ve=t=>gt(Oe[t.id]),Me=o.filter(Ve),De=o.length>0&&Me.length===0,Ut=Me.reduce((t,s)=>t+s.priceCredits*s.quantity,0),Gt=o.reduce((t,s)=>t+s.quantity,0),Ht=Me.reduce((t,s)=>t+s.quantity,0),Je=F?F.liveTotalCredits:Ut,Ot=new Set(o.map(t=>t.id)),Xe=(($e==null?void 0:$e.items)??[]).filter(t=>!Ot.has(t.id)).slice(0,12),Vt=new Map(F==null?void 0:F.buyable.map(t=>[t.item.id,t])),me=(j==null?void 0:j.credits)??0,Te=Je*10,Dt=ce?pt(Te,ce):0n,Ie=Re({priceCents:Te,priceManaWei:Dt,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:ge??0n}),Jt=t=>t.flatMap(s=>{const c=_e(s);return c.kind==="store"?[c.mint]:[]}),Xt=t=>t.flatMap(s=>s.acquisition==="trade"?[s.trade]:[]),Yt=ka,Zt=t=>Sa(t.contractAddress,String(t.itemId));function xe(t){t(),V(null),pe(null),oe(null)}function ea(){k(null),R(!1)}function Ye(t){const s=Le(t),c=Math.max(0,s-me),r=he.find(d=>d.credits>=c)??he[he.length-1];He(r.id),D("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:s,credits_balance:me,shortfall:c}),k({phase:"nofunds",lines:t.map(d=>({item:d.item,priceCredits:d.priceCredits,quantity:d.quantity})),shortfall:c}),R(!1)}async function Pe(t){if(!n||t.length===0)return;const s=Ce(t),c=s.map(m=>({...m.item,priceCredits:m.priceCredits})),r=t.map(m=>({...m.item,priceCredits:m.priceCredits,quantity:m.quantity})),d=[];let v="authorize";const x=new Set,z=new Set,L=new Set,_=[];let w=!1;k({phase:"processing",stage:"reserving",step:1,total:s.length});try{const m=[];for(let u=0;u<s.length;u++){const g=s[u];k({phase:"processing",stage:"reserving",step:u+1,total:s.length});try{const S=g.acquisition==="trade"?g.trade.id:void 0,b=g.item.contractAddress&&g.item.itemId!=null?{contractAddress:g.item.contractAddress,itemId:String(g.item.itemId)}:void 0,{credit:E,maxCreditedValue:B}=await ft(n.identity,g.usdCents,S,b);d.push({salt:E.id,itemId:g.item.id}),m.push(g.acquisition==="store"?{kind:"store",item:{collection:g.item.contractAddress,itemId:String(g.item.itemId),priceWei:g.priceWei},credits:[E],maxCreditedValue:B,chainId:g.item.chainId}:{kind:"trade",trade:g.trade,credits:[E],maxCreditedValue:B})}catch(S){if(_s(S)){if(d.length){try{await Be(n.identity,d.map(b=>b.salt))}catch(b){ne(b,{flow:"cart_checkout",step:"release"})}y.invalidateQueries({queryKey:["usd-balance"]})}Ye(t);return}throw S}}d.length&&y.invalidateQueries({queryKey:["usd-balance"]}),v="submit";const $=Ts(m).length,N=u=>$>1?{current:u,total:$}:void 0,U=(u,g)=>k({phase:"processing",stage:u,step:s.length,total:s.length,signatures:N(g)}),G=u=>u<$?U("awaiting-signature",u+1):U("settling",$);U("awaiting-signature",1);let M=[];if(Cs())try{const u=new Map;M=await Ps({purchases:m,buyer:n.address,signer:n.signer,onSigned:()=>G($),onBroadcast:({txHash:b,salts:E})=>{u.set(b,E),E.forEach(B=>x.add(B))}});const g=await Promise.allSettled(M.map(b=>As(b)));g.forEach((b,E)=>{const B=u.get(M[E])??[];b.status==="fulfilled"?(B.forEach(se=>z.add(se)),_.push(M[E])):b.reason instanceof Mt||B.forEach(se=>L.add(se))});const S=g.flatMap(b=>b.status==="rejected"?[b.reason]:[]);if(S.length&&!S.some(b=>b instanceof Mt))throw S[0];w=!0}catch(u){if(!(u instanceof zs)||!Ma(n.providerType))throw u;M=await Fe({purchases:m,buyer:n.address,signer:n.signer,onSigned:G,onBroadcast:({salts:g})=>g.forEach(S=>x.add(S)),onSettled:({txHash:g,salts:S})=>{S.forEach(b=>z.add(b)),_.push(g)},onReverted:({salts:g})=>g.forEach(S=>L.add(S))})}else M=await Fe({purchases:m,buyer:n.address,signer:n.signer,onSigned:G,onBroadcast:({salts:u})=>u.forEach(g=>x.add(g)),onSettled:({txHash:u,salts:g})=>{g.forEach(S=>z.add(S)),_.push(u)},onReverted:({salts:u})=>u.forEach(g=>L.add(g))});t.forEach(u=>h(u.item.id)),V(null),D("Shop Completed Purchase",{...ye(c),payment_type:"credits",no_crypto_step:w,transaction_hash:M[0]??null}),$t(y);const C=le.current;le.current=null,k(null),R(!1);const f={items:r,txHash:M[0]??void 0,txHashes:M,settled:!0,...C?{creditsAdded:C}:{}};Z("/success",{state:f,replace:!0})}catch(m){be(m)||ne(m,{flow:"cart_checkout",step:v,cart_size:t.length});const $=new Set([...x].filter(f=>!L.has(f))),{toRelease:N,boughtItemIds:U}=Tt({reservations:d,spent:$,settled:z}),G=[...$].some(f=>!z.has(f)),M=c.filter(f=>U.includes(f.id)),C=c.filter(f=>!U.includes(f.id));if(D(be(m)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:v,error_code:yt(m),value_usd:mt(C.reduce((f,u)=>f+u.priceCredits,0)),cart_size:s.length,partial:M.length>0}),N.length)try{await Be(n.identity,N)}catch(f){ne(f,{flow:"cart_checkout",step:"release"})}if(y.invalidateQueries({queryKey:["usd-balance"]}),M.length>0){U.forEach(f=>h(f)),V(null),$t(y),D("Shop Completed Purchase",{...ye(M),payment_type:"credits",no_crypto_step:w,transaction_hash:_[0]??null,partial:!0}),k({phase:"error",message:a("cart.error.partiallyBought"),heldCredits:G}),R(!1);return}k({phase:"error",message:G?void 0:We(m),heldCredits:G})}}function Ze(t,s){y.invalidateQueries({queryKey:["usd-balance"]}),y.invalidateQueries({queryKey:["detail-trade"]}),y.invalidateQueries({queryKey:["shop-item"]}),y.invalidateQueries({queryKey:["owned-token"]}),y.invalidateQueries({queryKey:["public-token"]}),y.invalidateQueries({queryKey:["item-resales"]}),y.invalidateQueries({queryKey:["shop-items"]}),y.invalidateQueries({queryKey:["catalog-items"]}),y.invalidateQueries({queryKey:["my-assets"]}),y.invalidateQueries({queryKey:["purchases"]}),y.invalidateQueries({queryKey:["owned-item-count"]}),y.invalidateQueries({queryKey:["overview-listings"]}),y.invalidateQueries({queryKey:["upsell-listings"]});const c=le.current;le.current=null,k(null),R(!1);const r={items:t,txHash:s[0]??void 0,txHashes:s,settled:!0,...c?{creditsAdded:c}:{}};Z("/success",{state:r,replace:!0})}function et(t,s){be(t)||ne(t,{flow:s,step:"submit"}),D(be(t)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:yt(t)}),k({phase:"error",message:We(t)}),R(!1)}async function ta(t,s,c){const r=bt(vt.MANAToken,s),d=bt(vt.CreditsManager,s);await Ss({auth:{kind:Ms.Allowance,contractAddress:r.address,spenderAddress:d.address,chainId:s},signer:t,requiredWei:c})}async function tt(){if(ce)return ce;try{return await y.fetchQuery({queryKey:["mana-rate",xt.chainId],queryFn:()=>$a(xt.chainId),staleTime:6e4})}catch{return}}async function aa(t){const s=Ce(t).reduce((v,x)=>v+x.usdCents,0),r=(ge??0n)>0n?await tt():ce,d=r?pt(s,r):0n;return{totalCents:s,manaWei:d}}async function at(t,s){const c=Le(t),{totalCents:r,manaWei:d}=await aa(t),v=Re({priceCents:r,priceManaWei:d,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:ge??0n});if(s&&v.options.some(x=>x.method===s)){if(s==="credits"){Pe(t);return}const x=nt(v,s);await Ee(st(s,t),x,()=>s==="mana"?void it(t,x):void rt(t,r,d));return}if(v.options.some(x=>x.method==="mana"||x.method==="combined")){k({phase:"choose",lines:t,totalCents:r,manaWei:d}),R(!1);return}if(j!=null&&j.credits<c){Ye(t);return}Pe(t)}function Ae(t){return Re({priceCents:t.totalCents,priceManaWei:t.manaWei,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:ge??0n})}const[ze,fe]=T.useState(null);function st(t,s){const c=new Map;for(const r of s){const d=fs(t,_e(r));c.set(`${d.chainId}:${d.spender.toLowerCase()}`,d)}return[...c.values()]}async function Ee(t,s,c){const[r,...d]=t;if(!r){c();return}await sa(r.spender,r.chainId,s,()=>void Ee(d,s,c))}async function sa(t,s,c,r){const d=js(s,t),v=n?await ks(d,n.address,c).catch(()=>!0):!0;if($s(n==null?void 0:n.providerType,v)){R(!1),fe({auth:d,run:r});return}r()}function nt(t,s){var c;return((c=t.options.find(r=>r.method===s))==null?void 0:c.manaWei)??0n}function na(t){if((p==null?void 0:p.phase)!=="choose")return;const{lines:s,totalCents:c,manaWei:r}=p;if(t==="credits"){Pe(s);return}const d=nt(Ae(p),t);Ee(st(t,s),d,()=>t==="mana"?void it(s,d):void rt(s,c,r))}async function it(t,s){if(!n||t.length===0)return;const c=Ce(t),r=c.map(x=>({...x.item,priceCredits:x.priceCredits})),d=t.map(x=>({...x.item,priceCredits:x.priceCredits,quantity:x.quantity})),v=()=>k({phase:"processing",stage:"settling",step:c.length,total:c.length});k({phase:"processing",stage:"awaiting-signature",step:c.length,total:c.length});try{const x=await ys({trades:Xt(c),mints:Jt(c),buyer:n.address,signer:n.signer,onSigned:v,manaWei:s});t.forEach(z=>h(z.item.id)),V(null),D("Shop Completed Purchase",{...ye(r),payment_type:"mana",transaction_hash:x[0]??null}),y.invalidateQueries({queryKey:["mana-balance"]}),Ze(d,x)}catch(x){et(x,"buy_cart_mana")}}async function rt(t,s,c){if(!n||t.length===0)return;const r=Ce(t),d=r.map(w=>({...w.item,priceCredits:w.priceCredits})),v=t.map(w=>({...w.item,priceCredits:w.priceCredits,quantity:w.quantity})),x=bs(r.map(w=>w.usdCents),(j==null?void 0:j.balanceCents)??0),z=[],L=new Set,_=new Set;k({phase:"processing",stage:"reserving",step:1,total:r.length});try{const w=r.map(_e),m=[],$=new Map,N=new Map;for(let C=0;C<r.length;C++){const f=r[C],u=w[C],g=x[C],S=vs(Math.max(0,f.usdCents-g),s,c);let b;if(g<=0)b=St(u,[],"0");else{k({phase:"processing",stage:"reserving",step:C+1,total:r.length});const B=f.item,{credit:se,maxCreditedValue:ra}=await ft(n.identity,g,u.kind==="trade"?u.trade.id:void 0,B.contractAddress&&B.itemId!=null?{contractAddress:B.contractAddress,itemId:String(B.itemId)}:void 0);z.push({salt:se.id,itemId:B.id}),b=St(u,[se],ra)}const E=Is(b);$.set(E,($.get(E)??0n)+S),N.has(E)||N.set(E,m.length),m.push(b)}z.length&&y.invalidateQueries({queryKey:["usd-balance"]});for(const[C,f]of $){const u=N.get(C);u==null||f<=0n||(m[u]={...m[u],maxCreditedValue:(BigInt(m[u].maxCreditedValue)+f).toString()})}const U=[...$.values()].reduce((C,f)=>C+f,0n);await ta(n.signer,ws(w[0]),U);const G=()=>k({phase:"processing",stage:"settling",step:r.length,total:r.length});k({phase:"processing",stage:"awaiting-signature",step:r.length,total:r.length});const M=await Fe({purchases:m,buyer:n.address,signer:n.signer,onSigned:G,onBroadcast:({salts:C})=>C.forEach(f=>L.add(f)),onReverted:({salts:C})=>C.forEach(f=>_.add(f))});t.forEach(C=>h(C.item.id)),V(null),D("Shop Completed Purchase",{...ye(d),payment_type:"credits_and_mana",transaction_hash:M[0]??null}),y.invalidateQueries({queryKey:["mana-balance"]}),Ze(v,M)}catch(w){const{toRelease:m}=Tt({reservations:z,spent:new Set([...L].filter($=>!_.has($))),settled:new Set});m.length&&Be(n.identity,m).catch(()=>{}),z.length&&y.invalidateQueries({queryKey:["usd-balance"]}),et(w,"buy_cart_combined")}}async function ee(t){if(!n){kt({type:"cart-checkout"}),Q();return}const s=H.getState().items.filter(Ve);if(s.length===0)return;oe(null),pe(null),R(!0);const c=s.reduce((r,d)=>r+d.priceCredits*d.quantity,0);D("Shop Started Checkout",{cart_size:s.length,cart_value_credits:c,cart_value_usd:mt(c),has_sufficient_credits:me>=c});try{const r=await Bs(s,n.address,Yt,await tt(),Zt),d=[...r.unavailable,...r.own];if(d.length&&(d.forEach(v=>h(v.id)),pe(Un(r))),r.buyable.length===0){oe(a("cart.error.noneAvailable")),V(null);return}if(r.orderChanged){V(r),Ge.current=Date.now();return}await at(r.buyable,t)}catch(r){ne(r,{flow:"cart_checkout",step:"review",cart_size:s.length}),oe(We(r))}finally{R(!1)}}async function ot(){if(F){if(!n){kt({type:"cart-checkout"}),Q();return}if(Date.now()-Ge.current>Nn){V(null),pe(null),await ee();return}oe(null),at(F.buyable)}}async function ia(){if(Se){try{sessionStorage.setItem(ve,JSON.stringify(H.getState().items))}catch{}R(!0);try{const t=await Rs(Se,n?{address:n.address,identity:n.identity}:void 0);if(t.url){window.location.href=t.url;return}Z("/credits")}catch(t){try{sessionStorage.removeItem(ve)}catch{}ne(t,{flow:"cart_buy_credits"}),k({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{R(!1)}}}const ct=T.useRef(!1);T.useEffect(()=>{if(!n||ct.current||!ps("cart-checkout"))return;ct.current=!0;const t=setTimeout(()=>void ee(),0);return()=>clearTimeout(t)},[n]);const lt=T.useRef(!1);T.useEffect(()=>{if(!(q!=null&&q.resumeCheckout)||lt.current)return;lt.current=!0,le.current=q.creditsAdded??null;try{const s=sessionStorage.getItem(ve);if(s){sessionStorage.removeItem(ve);const c=JSON.parse(s);Array.isArray(c)&&c.length&&X(c)}}catch{}y.invalidateQueries({queryKey:["usd-balance"]});const t=setTimeout(()=>void ee(),0);return()=>clearTimeout(t)},[q==null?void 0:q.resumeCheckout]);const dt=T.useRef(!1);T.useEffect(()=>{if(!(q!=null&&q.startCheckout)||dt.current)return;dt.current=!0,Z(".",{replace:!0,state:null});const t=setTimeout(()=>void ee(),0);return()=>clearTimeout(t)},[q==null?void 0:q.startCheckout]);const te=Nt||(p==null?void 0:p.phase)==="processing";return o.length===0&&!p?e.jsx(It,{children:e.jsxs(At,{children:[e.jsxs(Pt,{onClick:()=>Z(-1),type:"button",children:[e.jsx(O,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(en,{"data-testid":"cart-empty",children:[e.jsx(O,{name:"cart-plus",size:110}),e.jsxs(tn,{children:[e.jsx(an,{children:a("cart.empty.title")}),e.jsx(sn,{children:a("cart.empty.body")})]}),e.jsx(nn,{to:"/items",children:a("cart.empty.cta")})]})]})}):e.jsxs(It,{children:[e.jsxs(At,{children:[e.jsxs(Pt,{onClick:()=>Z(-1),type:"button",children:[e.jsx(O,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(Xs,{children:[e.jsxs(Ys,{children:[e.jsxs(Zs,{children:[e.jsx(rn,{onClick:()=>Z(-1),type:"button","aria-label":a("cart.goBack"),children:e.jsx(O,{name:"arrow-left"})}),e.jsx(on,{children:a("cart.panelTitle",{count:Gt})}),Kt?e.jsxs(cn,{onClick:()=>Y(!0),disabled:te,children:[e.jsx(O,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),e.jsxs(Rt,{children:[e.jsx(ln,{children:o.map(t=>{const s=Vt.get(t.id),c=s?s.priceCredits:t.priceCredits,r=!!s&&s.priceCredits!==t.priceCredits,d=!t.tokenId,v=t.quantity,x=typeof t.available=="number"&&v>=t.available,z=c*v,L=wa(t),_=!!L&&!!K[L],w=Ca(t),m=Oe[t.id],$=!gt(m),N=m==="sold-out"?a("cart.availability.soldOut"):a("cart.availability.unavailable");return e.jsxs(dn,{"data-unavailable":$||void 0,children:[e.jsxs(un,{"data-thumb":!0,children:[w?e.jsx(hn,{to:w,state:{item:t,tradeId:t.tradeId},"aria-label":t.name,children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:t.name}):null}):t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:t.name}):null,e.jsx(pn,{"data-check":!0,"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(gn,{children:[e.jsxs(mn,{"data-desc":!0,children:[w?e.jsx(fn,{to:w,state:{item:t,tradeId:t.tradeId},title:t.name,children:t.name}):e.jsx(xn,{title:t.name,children:t.name}),t.creator?e.jsx(yn,{address:t.creator,linkToProfile:!0}):null,Lt&&d?e.jsxs(Tn,{"data-testid":"cart-creator-tag",children:[e.jsx(In,{name:"buy-from-creator"}),a("cart.creatorTag")]}):null]}),e.jsx(bn,{children:$?e.jsxs(Sn,{children:[e.jsx(Mn,{name:"warning-fill",size:24}),N]}):e.jsxs(e.Fragment,{children:[d?e.jsxs(vn,{children:[e.jsx(zt,{onClick:()=>xe(()=>A(t.id)),disabled:te||v<=1,"aria-label":a("cart.decreaseQuantity",{name:t.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(wn,{children:v}),e.jsx(zt,{onClick:()=>xe(()=>P(t.id)),disabled:te||x,"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"})})})]}):null,e.jsxs(Cn,{children:[e.jsx(jn,{})," ",z,r?e.jsx(kn,{children:t.priceCredits*v}):null]})]})})]}),e.jsxs($n,{children:[L?e.jsx(Pn,{"data-on":_||void 0,onClick:()=>re(t),"aria-label":_?a("cart.removeFromFavorites",{name:t.name}):a("cart.addToFavorites",{name:t.name}),title:_?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:e.jsx(O,{name:_?"heart-solid":"heart"})}):null,e.jsx(An,{onClick:()=>xe(()=>h(t.id)),disabled:te,"aria-label":a("cart.remove",{name:t.name}),title:a("cart.removeTitle"),children:e.jsx(O,{name:"trash",size:24})})]})]},t.id)})}),e.jsx(zn,{children:e.jsx("button",{className:"link",onClick:()=>xe(W),disabled:te,children:a("cart.clearCart")})})]})]}),e.jsxs(En,{children:[e.jsx(qn,{children:a("cart.purchaseSummary")}),e.jsxs(Bn,{children:[e.jsxs(Rn,{children:[e.jsx(Fn,{children:a("cart.totalItems",{count:Ht})}),e.jsx(Wn,{children:e.jsxs(_n,{children:[e.jsx(Ln,{})," ",Je]})})]}),e.jsx(qt,{options:Ie.options,totalCents:Te,shortfall:Ie.manaShortfall,showCreditsAmount:!1,creditsLabel:F?a("marketCheckout.confirmPurchase"):Ie.options.length>1?a("cart.buyWithCredits"):a("cart.checkout"),busy:te||De,onPay:t=>void(F?ot():ee(t)),creditsFallback:{label:te?a("cart.working"):F?a("marketCheckout.confirmPurchase"):a("cart.checkout"),onClick:()=>void(F?ot():ee())}}),De?e.jsx(we,{className:"muted",children:a("cart.allUnavailable")}):null,n?null:e.jsx(we,{className:"muted",children:a("cart.signInHint")}),F?e.jsx(we,{className:"muted",children:a("cart.priceChanged")}):null,Ue?e.jsx(we,{className:"muted",children:Ue}):null,e.jsx(Kn,{message:Qt})]})]})]})]}),Xe.length>0?e.jsx(Qn,{children:e.jsx(gs,{title:a("cart.youMightAlsoLike"),items:Xe})}):null,ze&&n?e.jsx(ms,{auth:ze.auth,signer:n.signer,title:a("authorizeStep.manaTitle"),name:a("authorizeStep.manaName"),reason:a("authorizeStep.manaReason"),icon:e.jsx("img",{src:xs,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{run:t}=ze;fe(null),t()},onCancel:()=>fe(null),onClose:()=>fe(null)}):null,p?e.jsx(Os,{phase:p.phase,balanceCredits:me,heldCreditsCount:((ut=j==null?void 0:j.held)==null?void 0:ut.credits)??null,onClose:ea,stage:p.phase==="processing"?p.stage:void 0,step:p.phase==="processing"?p.step:void 0,total:p.phase==="processing"?p.total:void 0,isSelfCustody:ja(n==null?void 0:n.providerType),signatures:p.phase==="processing"?p.signatures:void 0,options:p.phase==="choose"?Ae(p).options:void 0,shortfall:p.phase==="choose"?Ae(p).manaShortfall:void 0,onPay:na,totalCents:p.phase==="choose"?p.totalCents:void 0,totalManaWei:p.phase==="choose"?p.manaWei:void 0,totalCredits:p.phase==="choose"?Le(p.lines):void 0,lines:p.phase==="nofunds"?p.lines:void 0,shortfallCredits:p.phase==="nofunds"?p.shortfall:void 0,packs:he,selectedPack:Se,onSelectPack:He,onBuyPacks:()=>void ia(),message:p.phase==="error"?p.message:void 0,heldCredits:p.phase==="error"&&!!p.heldCredits,onRetry:()=>void ee()}):null]})}export{ii as Cart};
|