@dcl/shop 1.4.2-31312432830.commit-294f554 → 1.4.2-31318792168.commit-63acc2c
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-NHOQ_W_-.js → Activity-CUtzGuZi.js} +5 -5
- package/_assets/{AnimatedBackground-BuJlRsTt.js → AnimatedBackground-CKYd1b1O.js} +2 -2
- package/_assets/{Assets-DsnrEwvE.js → Assets-BhlW9Wx3.js} +2 -2
- package/_assets/{Assets.styles-CuWT78zl.js → Assets.styles-DG1h47nn.js} +1 -1
- package/_assets/{Authorizations-B4PIyNsB.js → Authorizations-BASwkC0l.js} +1 -1
- package/_assets/Cart-DxmkSugV.js +696 -0
- package/_assets/{CircularProgress-DUq9NPI6.js → CircularProgress-DYQ08DWl.js} +1 -1
- package/_assets/{Collection-BGucqUBi.js → Collection-UgRDwUmd.js} +1 -1
- package/_assets/{CollectionCarousel-Cps0wYBU.js → CollectionCarousel-BvghNLQG.js} +169 -177
- package/_assets/{Confetti-CBj-mVZI.js → Confetti-8gjQ6tb0.js} +1 -1
- package/_assets/{ConstantsUtil-Ck3fDr3h.js → ConstantsUtil-_wDeZ6ui.js} +1 -1
- package/_assets/{ContentClient-Cx6YR2x_.js → ContentClient-S2yImRPT.js} +1 -1
- package/_assets/{Creator-CXw3Kadz.js → Creator-DjPkuErt.js} +1 -1
- package/_assets/{DeploymentBuilder-8vMsUZ5r.js → DeploymentBuilder-BuYQQso0.js} +1 -1
- package/_assets/{ErrorNotice-C_RVGUzO.js → ErrorNotice-Dh0G_UH0.js} +1 -1
- package/_assets/{ExchangeController-BlbdUNWF.js → ExchangeController-BqD5t9Zu.js} +1 -1
- package/_assets/{Faq-D0xuEVP5.js → Faq-CrJ-GH4k.js} +1 -1
- package/_assets/{GetCredits-DrHn8Lnz.js → GetCredits-DzDBOEft.js} +2 -2
- package/_assets/{Grow-CU75s2bu.js → Grow-BcWJyxmA.js} +1 -1
- package/_assets/{HelpersUtil-D6HuwesN.js → HelpersUtil-YGElNPtF.js} +1 -1
- package/_assets/ItemDetail-BVO9W3Ag.js +3570 -0
- package/_assets/LazyEmoteControls-BATwcsS-.js +2 -0
- package/_assets/{LoadMore-P_MKAf1K.js → LoadMore-DZz0apc4.js} +1 -1
- package/_assets/{ManaPricingBanner.styles-CWoDMKMl.js → ManaPricingBanner.styles-Bir49U3g.js} +1 -1
- package/_assets/{MyAssets-CUEMlx_o.js → MyAssets-D1VBULvk.js} +2 -2
- package/_assets/{MyFavorites-BPb8OEVx.js → MyFavorites-MQoA41I-.js} +1 -1
- package/_assets/{NetworkUtil-tcDS1IIB.js → NetworkUtil-ooNEpt2E.js} +1 -1
- package/_assets/{NotFound-tne0tBOa.js → NotFound-C0I1Fl9w.js} +1 -1
- package/_assets/{NotificationsBell-CmFSFwZP.js → NotificationsBell-CsjRTFAw.js} +1 -1
- package/_assets/{OutfitDetail-BT9obLRM.js → OutfitDetail-Cj-7nYPN.js} +1 -1
- package/_assets/{OutfitPreview-CYXMUVw2.js → OutfitPreview-B5sSYG7H.js} +1 -1
- package/_assets/{OutfitStudio-YBvL5VGl.js → OutfitStudio-VIQWadz3.js} +1 -1
- package/_assets/{StoreSettings-CZz1NxHF.js → StoreSettings-C2GziXJc.js} +21 -21
- package/_assets/{Success-CQKYcWpX.js → Success-D1R3OpeD.js} +1 -1
- package/_assets/{SwapController-BEVqtoCD.js → SwapController-BPzqNjIO.js} +1 -1
- package/_assets/{Tooltip-sT07OWHO.js → Tooltip-NVEtu7WR.js} +1 -1
- package/_assets/{TradeService-CI3giiHH.js → TradeService-P6cAagrj.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-CF6uvH5s.js → W3MFrameProviderSingleton-CZkhqHTC.js} +3 -3
- package/_assets/{WebCryptoP256-BORYCvjs.js → WebCryptoP256-Btl0G7MC.js} +1 -1
- package/_assets/authorizations-rKqoPfba.js +1 -0
- package/_assets/{basic-C4mQYhuA.js → basic-DUMQQiuv.js} +1 -1
- package/_assets/{biconomy-CuJVLNp7.js → biconomy-DaDoOKwT.js} +1 -1
- package/_assets/{builder-CkniOHea.js → builder-BjxL6GAx.js} +1 -1
- package/_assets/{buy-P1ELLgiE.js → buy-BVwGfu-u.js} +1 -1
- package/_assets/{buy-gasless-BHi46MwF.js → buy-gasless-QheWl_4u.js} +1 -1
- package/_assets/{categories-C3d1csvn.js → categories-BwYVv5LN.js} +1 -1
- package/_assets/{ccip-BuuvnkRx.js → ccip-D9RgwF6z.js} +1 -1
- package/_assets/{ccip-C2VEvCbm.js → ccip-Wq6QNi-S.js} +1 -1
- package/_assets/{chains-BIWEr0ij.js → chains-6gSx70Hh.js} +1 -1
- package/_assets/{collectionPage.styles-CeGOp9uA.js → collectionPage.styles-DpjxCqdp.js} +4 -4
- package/_assets/{common-DC11HrTT.js → common-feYFL93O.js} +1 -1
- package/_assets/{controller-BFSczMkH.js → controller-C66aulNK.js} +2 -2
- package/_assets/{core-BW1P_HvM.js → core-Btwy40Yo.js} +4 -4
- package/_assets/{createSvgIcon-Cv96eCpQ.js → createSvgIcon-CdJg0Jup.js} +1 -1
- package/_assets/{custom-DTSkEq9y.js → custom-DoWLNbWe.js} +1 -1
- package/_assets/{data-capture-CqPKue4D.js → data-capture-BGI0-xMQ.js} +1 -1
- package/_assets/{decimals-Cq50aW31.js → decimals-Cs0fUBZW.js} +1 -1
- package/_assets/decimals-ajtlKW5P.js +1 -0
- package/_assets/{detectExtension-DECAB97m.js → detectExtension-C37KQAih.js} +1 -1
- package/_assets/{email-Y6VS8X-I.js → email-AZF8we76.js} +1 -1
- package/_assets/{embedded-wallet-DhCY0HS9.js → embedded-wallet-CoNOZa9l.js} +1 -1
- package/_assets/{emotion-styled.browser.esm-DS9PERKq.js → emotion-styled.browser.esm-D5G81H0Z.js} +1 -1
- package/_assets/{engine-C0KKoxYU.js → engine-DK35k3Wx.js} +1 -1
- package/_assets/{errors-CJ2pCYot.js → errors-By1GnMe7.js} +1 -1
- package/_assets/{estimate-l1-fee-CdSpN9-3.js → estimate-l1-fee-CXKE1On5.js} +1 -1
- package/_assets/{eth_estimateGas-cxuHKZ6E.js → eth_estimateGas-BrLzlWeD.js} +1 -1
- package/_assets/{eth_getStorageAt-CtArmjiC.js → eth_getStorageAt-BpgMYXhH.js} +1 -1
- package/_assets/{eth_getTransactionCount-BfjxI2ac.js → eth_getTransactionCount-CnBRomEq.js} +1 -1
- package/_assets/{ethereum-DDjO_s3T.js → ethereum-DVNzjDRr.js} +1 -1
- package/_assets/{ethers-DfPQ1iPJ.js → ethers-Zj6qlwhg.js} +1 -1
- package/_assets/{execute-D_9LMioQ.js → execute-CMXov2Ym.js} +2 -2
- package/_assets/{extractIPFS-BzqQpbV3.js → extractIPFS-CBKK6zoo.js} +1 -1
- package/_assets/{features-D0XU01_q.js → features-ChMtmYU9.js} +1 -1
- package/_assets/{fetchTokenMetadata-3bs5L4Ed.js → fetchTokenMetadata-lypRtD7l.js} +2 -2
- package/_assets/{field.styles-DJeExo1o.js → field.styles-DBKEhZ68.js} +1 -1
- package/_assets/{get-bytecode-CBzbILdG.js → get-bytecode-BM7naPwd.js} +1 -1
- package/_assets/get-ecosystem-wallet-info-Br746vUu.js +1 -0
- package/_assets/{getBalance-CfTr0idF.js → getBalance-D7kh5vBa.js} +2 -2
- package/_assets/{getInstalledModules-CMaA3R_c.js → getInstalledModules-b10bOXJE.js} +1 -1
- package/_assets/{getNFT-CpdvnGlo.js → getNFT-D-tJRp8I.js} +2 -2
- package/_assets/getNFT-VGd_dY0w.js +1 -0
- package/_assets/{grid.styles-pd8Kimjr.js → grid.styles-DJWMt6vO.js} +1 -1
- package/_assets/{hashTypedData-DyjRVyiF.js → hashTypedData-CjD9Onxg.js} +1 -1
- package/_assets/{hashTypedData-BznBKEJ4.js → hashTypedData-DHhLMbA9.js} +1 -1
- package/_assets/{in-app-CYmfrim9.js → in-app-cMkoA_0X.js} +1 -1
- package/_assets/{in-app-wallet-calls-CqmNnUJE.js → in-app-wallet-calls-B1N_tJhq.js} +1 -1
- package/_assets/{index-CWAxO3pP.js → index--EeJI3gz.js} +1 -1
- package/_assets/{index-B9uk5-Wa.js → index--LxIcqOG.js} +1 -1
- package/_assets/{index-BspLYzJo.js → index-06iPgNel.js} +1 -1
- package/_assets/{index--7bmhnCr.js → index-AJgeFEbz.js} +1 -1
- package/_assets/{index-CiPrjG5a.js → index-B4j7Y-xb.js} +1 -1
- package/_assets/{index-B6lhjXm3.js → index-B51FIhv5.js} +1 -1
- package/_assets/{index-D-X0uab8.js → index-B6kTxvDn.js} +1 -1
- package/_assets/{index-DNCRJDU6.js → index-BAwpYw08.js} +1 -1
- package/_assets/{index-D4Dobs6V.js → index-BFm7_2vm.js} +1 -1
- package/_assets/{index-1ioVeg7x.js → index-BHF7j7iL.js} +1 -1
- package/_assets/{index-B40CqL6J.js → index-BHIzwyES.js} +1 -1
- package/_assets/{index-h9B4YXUq.js → index-BHY_vmT3.js} +1 -1
- package/_assets/{index-YTZYM_mv.js → index-BJpwf_jJ.js} +1 -1
- package/_assets/{index-CoNQ2sAc.js → index-BKjJvyPt.js} +1 -1
- package/_assets/{index-BoVFCbnW.js → index-BLGkMtvD.js} +1 -1
- package/_assets/{index-BOFr5q8K.js → index-BUl8ifmb.js} +1 -1
- package/_assets/{index-D_Xy7OI9.js → index-BXupZ0pl.js} +1 -1
- package/_assets/{index-sMZT0osM.js → index-BYEO4mFR.js} +1 -1
- package/_assets/{index-koAbgvGY.js → index-BccN6K5r.js} +1 -1
- package/_assets/{index-CB7o8WQW.js → index-BeGq8iy0.js} +1 -1
- package/_assets/{index-BdcjNzsb.js → index-BecyzLoT.js} +1 -1
- package/_assets/{index-zsZ0nIv4.js → index-BfJ-QKCm.js} +1 -1
- package/_assets/{index-CGQb2ZQU.js → index-BgbpD9U4.js} +1 -1
- package/_assets/{index-BkA4dzPp.js → index-Bh5UTaeB.js} +1 -1
- package/_assets/{index-BZuG0Sc3.js → index-Bj9Iyp6h.js} +1 -1
- package/_assets/{index-Bt3T1cvz.js → index-Bnn0ZkbX.js} +1 -1
- package/_assets/{index-Cn9uLg18.js → index-BsJlFErD.js} +1 -1
- package/_assets/{index-CXgpMw_a.js → index-By0vIQQY.js} +1 -1
- package/_assets/{index-C9qn3MDW.js → index-C12063Q0.js} +1 -1
- package/_assets/{index-Bpjughes.js → index-C3n5CX-T.js} +3 -3
- package/_assets/{index-Cd27zE1I.js → index-C7qUllZE.js} +1 -1
- package/_assets/{index-CiRq1n15.js → index-C92g1mMH.js} +2 -2
- package/_assets/{index-Cq8I2bCh.js → index-C9Tyc_4P.js} +12 -12
- package/_assets/{index-DIZ6Fpja.js → index-CH0fY4DE.js} +1 -1
- package/_assets/{index-DwnMvkbN.js → index-CIvXnRxR.js} +1 -1
- package/_assets/{index-Domysh9-.js → index-COUpKEi3.js} +1 -1
- package/_assets/{index-BFG6-uk-.js → index-CStVd5hO.js} +1 -1
- package/_assets/{index-2pZiTD3a.js → index-CVJMJ5ib.js} +1 -1
- package/_assets/{index-CcCLyIxX.js → index-CVvddNb-.js} +3 -3
- package/_assets/{index-CX_8l6aH.js → index-Cd60w9wC.js} +1 -1
- package/_assets/{index-DG04DWBB.js → index-CeoZ_quC.js} +1 -1
- package/_assets/{index-SkahHxGM.js → index-ChH-BEH6.js} +1 -1
- package/_assets/{index-CVVzw90M.js → index-CrCEqqSc.js} +1 -1
- package/_assets/{index-ChdPVYi_.js → index-Cu7FOomH.js} +2 -2
- package/_assets/{index-Dbs-O_xu.js → index-D8HAo-hq.js} +2 -2
- package/_assets/{index-HMAhnswt.js → index-D93lVP2Z.js} +1 -1
- package/_assets/{index-D4I_r7iA.js → index-DCzMWgYB.js} +1 -1
- package/_assets/{index-HlCcqGG0.js → index-DFAQC55P.js} +1 -1
- package/_assets/{index-B2jn-mld.js → index-DV-D1rm_.js} +1 -1
- package/_assets/{index-DO1MDP-3.js → index-DWopoPMG.js} +1 -1
- package/_assets/{index-C_bUhgEP.js → index-DY2HLZR7.js} +1 -1
- package/_assets/{index-CU34Q9VB.js → index-DZbbUxqz.js} +1 -1
- package/_assets/{index-BeYcw5Co.js → index-DhJfQlI3.js} +1 -1
- package/_assets/{index-5g575ePx.js → index-Dlysgquh.js} +1 -1
- package/_assets/{index-DqbRg5LC.js → index-FnYl0-IH.js} +2 -2
- package/_assets/{index-BNzvL79U.js → index-NFLi3_OK.js} +1 -1
- package/_assets/{index-oyav6SwC.js → index-XZ_rZBqC.js} +1 -1
- package/_assets/{index-1UqZYo-x.js → index-ZmzAm-04.js} +1 -1
- package/_assets/{index-dFumStoV.js → index-hznwjI3b.js} +1 -1
- package/_assets/{index-DMsfjzv3.js → index-x1otqjN5.js} +1 -1
- package/_assets/{index-BAEUZZ6m.js → index-xIzbBpoa.js} +1 -1
- package/_assets/{index-C0FhBugy.js → index-xQRwfYpo.js} +3 -3
- package/_assets/{index.es-C5ucclti.js → index.es-CV3ZzR0v.js} +1 -1
- package/_assets/{index.es-BgY67W9o.js → index.es-CvYI4kyo.js} +4 -4
- package/_assets/{index.es-B088SWVm.js → index.es-DoNqTTY8.js} +1 -1
- package/_assets/{linkAccount-B2LX6Ayb.js → linkAccount-D0R_anql.js} +1 -1
- package/_assets/{localBatchGatewayRequest-CrEvGINX.js → localBatchGatewayRequest-D3ayDqLT.js} +1 -1
- package/_assets/{native-BYuJILVU.js → native-Dvf6Py4t.js} +1 -1
- package/_assets/{networks-BgzjLjJ2.js → networks-C_FZdidw.js} +1 -1
- package/_assets/{onramp-Svn_UmTw.js → onramp-73QiKjy2.js} +1 -1
- package/_assets/{openzeppelin-BPRRVTr1.js → openzeppelin-B-lW-LCn.js} +1 -1
- package/_assets/{ownerOf-BswBoTM4.js → ownerOf-CFg0Vnog.js} +1 -1
- package/_assets/{parseNft-CfYOiCXQ.js → parseNft-CQJX5i7g.js} +2 -2
- package/_assets/{parseSignature-gNg7kA4M.js → parseSignature-B8ORNT06.js} +3 -3
- package/_assets/{parseSignature-NfMUgfN4.js → parseSignature-C7Bg4ICM.js} +1 -1
- package/_assets/{passkeys-Bf7HGrQE.js → passkeys-CnT7FFCm.js} +1 -1
- package/_assets/{pay-with-exchange-NpC_jsVL.js → pay-with-exchange-D1snaauI.js} +1 -1
- package/_assets/{prepare-contract-call-DrM5fnvt.js → prepare-contract-call-gUfFspet.js} +1 -1
- package/_assets/{qr-overlay-CX-B0YKk.js → qr-overlay-DpC39UbJ.js} +1 -1
- package/_assets/{receive-DU_jmquO.js → receive-DoLTg1vH.js} +1 -1
- package/_assets/{resolveImplementation-0bOm_A8l.js → resolveImplementation-C9QiCx9e.js} +1 -1
- package/_assets/{rpc-DwUMO0mH.js → rpc-CMSbn2iN.js} +1 -1
- package/_assets/{secp256k1-CRg-T_AS.js → secp256k1-BJ7bCcmT.js} +1 -1
- package/_assets/{secp256k1-NtZ6kHJZ.js → secp256k1-Bsn7vpBQ.js} +1 -1
- package/_assets/{secp256k1-BJWN557q.js → secp256k1-DjE4Bhh_.js} +1 -1
- package/_assets/{send-B6q0W9lI.js → send-C299MJc-.js} +1 -1
- package/_assets/{send-batch-transaction-Cg-JwW7k.js → send-batch-transaction-BPpXN4Fh.js} +1 -1
- package/_assets/{send-eip712-transaction-GrhIPA6L.js → send-eip712-transaction-D6kwLa1u.js} +2 -2
- package/_assets/send-gasless-transaction-BVCq6iro.js +2 -0
- package/_assets/{send-transaction-Aq0ndQmo.js → send-transaction-DOroXsTv.js} +2 -2
- package/_assets/{sendMetaTransaction-BuEwIAyh.js → sendMetaTransaction-BgzHuwAc.js} +1 -1
- package/_assets/{sendRawTransaction-JGobH71Z.js → sendRawTransaction-DezSAkxN.js} +3 -3
- package/_assets/{sentry-2i8Tr7WR.js → sentry-BwKB4Jgk.js} +1 -1
- package/_assets/{serializeTransaction-B-NbRyZz.js → serializeTransaction-psWDn-qZ.js} +1 -1
- package/_assets/{session-proposal-b3xSScTf.js → session-proposal-CbjngApN.js} +1 -1
- package/_assets/{session-request-BhfPcY4l.js → session-request-B-6p9Iy6.js} +2 -2
- package/_assets/{sha256-BKfXR492.js → sha256-CW4Z69Qa.js} +1 -1
- package/_assets/{signing-CzYSJwB8.js → signing-WVQFEK4R.js} +3 -3
- package/_assets/{skeleton.styles-BwXvfynq.js → skeleton.styles-BpJWZ8pG.js} +1 -1
- package/_assets/{socials-ClkHxAE_.js → socials-DUXs1Y48.js} +1 -1
- package/_assets/{styled-jiv5F83t.js → styled-CVhCfwHn.js} +1 -1
- package/_assets/{swaps-BwEAGSoG.js → swaps-Q8DvVlLL.js} +1 -1
- package/_assets/{thirdweb-BCcw3IiV.js → thirdweb-DhSCkElu.js} +3 -3
- package/_assets/{to-serializable-transaction-CI-QnODl.js → to-serializable-transaction-B_fpIxbR.js} +2 -2
- package/_assets/{totalSupply-gVMBAoD-.js → totalSupply-DbHIgwL_.js} +1 -1
- package/_assets/{transaction-7HLCNEOz.js → transaction-DRQKYXRS.js} +1 -1
- package/_assets/{transactionReceipt-a17hpBtt.js → transactionReceipt-BPSwGpr5.js} +1 -1
- package/_assets/{transactions-up6hcXnh.js → transactions-DgPefDR1.js} +1 -1
- package/_assets/useCreditPacks-BMtorUrc.js +1 -0
- package/_assets/{useImportable-BpgbDKEn.js → useImportable-B8ire4qL.js} +1 -1
- package/_assets/{useInfiniteGrid-CyR838AE.js → useInfiniteGrid-CVaXxfUk.js} +1 -1
- package/_assets/{useStore-kijFHyHV.js → useStore-CX-1oAbc.js} +2 -2
- package/_assets/{useTheme-DIejI6C_.js → useTheme-QS2IpnyN.js} +1 -1
- package/_assets/{utils-BPBPOxKw.js → utils-DMz9kkrI.js} +1 -1
- package/_assets/{verifyHash-BqY8uOSx.js → verifyHash-B0_1_m-X.js} +1 -1
- package/_assets/{w3m-modal-D0vRJJdP.js → w3m-modal-BAX9M2UR.js} +1 -1
- package/_assets/{w3m-modal-DWLBXt0Y.js → w3m-modal-CX_GlEzf.js} +1 -1
- package/_assets/{wait-for-tx-receipt-1xUKRb2m.js → wait-for-tx-receipt-BzR663uT.js} +1 -1
- package/_assets/{wallets-B25NNhvI.js → wallets-DQjyJT7O.js} +5 -5
- package/_assets/{web-connector-N42CiDrd.js → web-connector-ClAZTCUe.js} +3 -3
- package/_assets/{writeContract-CuegwesU.js → writeContract-CAcPIacd.js} +1 -1
- package/_assets/{zora-sepolia-ChK9Wob7.js → zora-sepolia-CFzDpcm0.js} +1 -1
- package/_assets/{zoraTestnet-k3Q5cVnd.js → zoraTestnet-DO-LfJcd.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/Cart-CWjD9l0B.js +0 -696
- package/_assets/ItemDetail-7FWHJW_E.js +0 -3577
- package/_assets/LazyEmoteControls-D_Cuiw7-.js +0 -2
- package/_assets/authorizations-CAFiSVFA.js +0 -1
- package/_assets/decimals-DUdu01dG.js +0 -1
- package/_assets/get-ecosystem-wallet-info-ASLw891I.js +0 -1
- package/_assets/getNFT-BLfp3o9w.js +0 -1
- package/_assets/send-gasless-transaction-Dnd0BR62.js +0 -2
- package/_assets/useCreditPacks-CDD4tXAF.js +0 -1
package/_assets/Cart-CWjD9l0B.js
DELETED
|
@@ -1,696 +0,0 @@
|
|
|
1
|
-
import{j as e,L as Ke,r as M,b as ia,a as ra}from"./react-BYHuwl8r.js";import{t as ue,s as i,b as s,L as le,C as We,ax as oa,ay as ze,az as ca,J as la,I as O,A as zt,K as Ne,y as da,X as H,am as ut,v as ua,w as ha,l as pa,aA as ga,D as ma,aB as xa,an as fa,aC as ya,aD as ht,aE as ba,aF as va,z as wa,aG as pt,Z as V,aH as gt,aI as Ca,k as ae,r as ja,c as mt,aJ as ka,aK as xt,aL as Ee,aM as $a,aN as ye,aO as be,aP as ft,g as yt,f as bt,aQ as Sa}from"./index-Cq8I2bCh.js";import{M as Ma,S as Ta,C as Ia,H as Pa,a as Aa,T as za,X as Ea,b as Ba,B as Ra,c as qa,d as vt,e as Fa,f as je,P as Et,m as _a,g as Wa,h as La,i as Ka,j as Na,k as Le,l as de,L as Qa,n as Ua,o as wt,p as Ct,W as Ga,q as Ha,r as Oa,s as Da,A as Va,t as Ja,u as Xa,v as Ya,w as Za,x as es,y as ts,z as as,D as ss,E as ns,F as is,G as rs,I as os,J as cs,K as ls,N as ds,O as us,Q as Be,R as hs,U as ps,V as gs,Y as ms,Z as jt,_ as kt,$ as xs,a0 as fs,a1 as ys,a2 as bs,a3 as $t,a4 as vs}from"./CollectionCarousel-Cps0wYBU.js";import{f as ws,h as Cs,a as js,n as ks,i as $s,A as Ss}from"./authorizations-CAFiSVFA.js";import{g as Ms,h as Re,p as Ts}from"./buy-P1ELLgiE.js";import{b as Is,w as Ps,S as St,G as As}from"./buy-gasless-BHi46MwF.js";import{u as zs,M as Es,R as ve,r as Bs,c as Rs,p as Mt,a as qe}from"./useCreditPacks-CDD4tXAF.js";import{i as qs,a as Fs}from"./errors-CJ2pCYot.js";import{E as _s}from"./ErrorNotice-C_RVGUzO.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-2i8Tr7WR.js";import"./ethers-DfPQ1iPJ.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-BuEwIAyh.js";const{colors:se,radius:Ws}=ue,Ls=i.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
justify-content: center;
|
|
5
|
-
gap: 8px;
|
|
6
|
-
width: 100%;
|
|
7
|
-
`,Ks=i.span`
|
|
8
|
-
font-size: 16px;
|
|
9
|
-
line-height: 22px;
|
|
10
|
-
color: ${se.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 ${se.media};
|
|
27
|
-
|
|
28
|
-
&::-webkit-scrollbar {
|
|
29
|
-
width: 8px;
|
|
30
|
-
}
|
|
31
|
-
&::-webkit-scrollbar-track {
|
|
32
|
-
background: ${se.media};
|
|
33
|
-
border-radius: 10px;
|
|
34
|
-
}
|
|
35
|
-
&::-webkit-scrollbar-thumb {
|
|
36
|
-
background: #a2a2a2;
|
|
37
|
-
border-radius: ${Ws.btn};
|
|
38
|
-
}
|
|
39
|
-
`,Qs=i.span`
|
|
40
|
-
margin-left: 8px;
|
|
41
|
-
font-size: 13px;
|
|
42
|
-
font-weight: 600;
|
|
43
|
-
color: ${se.muted};
|
|
44
|
-
`,Us=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: ${se.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: ${se.text};
|
|
60
|
-
}
|
|
61
|
-
`;function Gs(o){const{phase:u,balanceCredits:P,onClose:A}=o,_=u==="processing",J=u==="error"?s("cartCheckout.errorTitle"):u==="nofunds"?s("cartCheckout.titleNoFunds"):u==="choose"?s("buyModal.choosePayment"):s("cartCheckout.titleBuy"),X=u==="processing";return e.jsxs(Ma,{role:"dialog","aria-modal":"true","aria-label":s("cartCheckout.dialogAria"),children:[e.jsx(Ta,{onClick:_?void 0:A,"aria-hidden":!0}),e.jsxs(Ia,{"data-tall":X||void 0,children:[e.jsxs(Pa,{children:[e.jsxs(Aa,{children:[e.jsx(za,{children:J}),!_&&e.jsx(Ea,{onClick:A,"aria-label":s("buyModal.close"),children:e.jsx(Ba,{})})]}),e.jsxs(Ra,{children:[e.jsx(qa,{children:u==="nofunds"?s("buyModal.dclBalance"):s("buyModal.myCreditsBalance")}),e.jsx(vt,{}),e.jsx(Fa,{children:le(P)})]})]}),u==="choose"&&e.jsxs(je,{children:[e.jsxs(Us,{children:[e.jsx("span",{children:s("cart.purchaseSummary")}),e.jsxs("strong",{children:[e.jsx(vt,{}),le(o.totalCredits??0)]})]}),e.jsx(Et,{options:o.options??[],totalCents:o.totalCents??0,onPay:o.onPay??(()=>{}),rateNote:(()=>{const E=_a(o.totalCents??0,o.totalManaWei??0n);return E!=null?s("buyModal.manaRate",{mana:E.toLocaleString("en",{maximumFractionDigits:2})}):null})()})]}),u==="processing"&&e.jsx(Hs,{stage:o.stage??"reserving",step:o.step??1,total:o.total??1,isSelfCustody:!!o.isSelfCustody,signatures:o.signatures}),u==="nofunds"&&e.jsx(Os,{lines:o.lines??[],shortfallCredits:o.shortfallCredits??0,packs:o.packs??[],selectedPack:o.selectedPack??"",onSelectPack:o.onSelectPack??(()=>{}),onBuyPacks:o.onBuyPacks??(()=>{}),onCancel:A}),u==="error"&&e.jsxs(je,{children:[e.jsxs(Wa,{"data-testid":"buy-error",children:[e.jsx(La,{src:Ka,alt:"",width:64,height:80}),e.jsxs(Na,{children:[e.jsx("b",{children:s("cartCheckout.errorHeadline")})," ",o.heldCredits?e.jsxs(e.Fragment,{children:[o.message?e.jsxs(e.Fragment,{children:[o.message," "]}):null,s("cartCheckout.heldLead",{currency:We.name}),e.jsx("b",{children:s("cartCheckout.heldBold")}),s("cartCheckout.heldTail",{currency:We.name})]}):o.message??s("cartCheckout.errorBody")]})]}),o.heldCredits?e.jsx(Le,{children:e.jsx(de,{"data-variant":"purple","data-full":!0,onClick:A,children:s("cartCheckout.gotIt")})}):e.jsxs(Le,{children:[e.jsx(de,{"data-variant":"outline",onClick:A,children:s("buyModal.cancel")}),e.jsx(de,{"data-variant":"purple",onClick:o.onRetry??A,children:s("cartCheckout.tryAgain")})]})]})]})]})}function Hs({stage:o,step:u,total:P,isSelfCustody:A,signatures:_}){const J=o==="reserving",X=P>0?Math.min(100,Math.round(u/P*100)):0,E=A&&_&&_.total>1,ne=o==="awaiting-signature"?A?E?s("cartCheckout.confirmMultiple",{current:_.current,total:_.total}):s("buyModal.confirmToContinue"):s("buyModal.completingTransaction"):o==="settling"?s("buyModal.completingTransaction"):s("cartCheckout.preparing");return e.jsxs(je,{"data-processing":!0,children:[e.jsx(Qa,{src:oa,alt:"",width:61,height:61}),e.jsx(Ua,{children:ne}),J?e.jsxs(Ls,{children:[e.jsx(wt,{"aria-hidden":!0,children:e.jsx(Ct,{"data-step":!0,style:{width:`${X}%`}})}),P>1?e.jsxs(Ks,{children:[u,"/",P]}):null]}):e.jsx(wt,{"aria-hidden":!0,children:e.jsx(Ct,{})})]})}function Os({lines:o,shortfallCredits:u,packs:P,selectedPack:A,onSelectPack:_,onBuyPacks:J,onCancel:X}){const E=P.find(n=>n.id===A),ne=o.reduce((n,K)=>n+(K.quantity??1),0);return e.jsxs(je,{children:[e.jsxs(Ga,{"data-testid":"nofunds-warning",children:[e.jsx(Ha,{}),e.jsxs(Oa,{children:[e.jsx("b",{children:s("buyModal.insufficientFunds")})," ",s("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:s("buyModal.warningCreditsAmount",{count:Math.max(0,u)})})," ",s("buyModal.warningToPurchase",{count:ne}),ze()?null:e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(Da,{href:ca("/credits"),target:"_blank",rel:"noopener noreferrer",children:s("buyModal.warningLearnMore")})]})]})]}),e.jsx(Ns,{children:o.map(n=>{const K=n.quantity??1;return e.jsxs(Va,{children:[e.jsx(Ja,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsxs(Xa,{children:[e.jsxs("div",{children:[e.jsxs(Ya,{title:n.item.name,children:[n.item.name||s("buyModal.itemFallback"),K>1?e.jsx(Qs,{children:s("cartCheckout.qty",{count:K})}):null]}),n.item.creator?e.jsx(Za,{address:n.item.creator}):null]}),e.jsxs(es,{children:[e.jsx(ts,{}),e.jsx("span",{children:le(n.priceCredits*K)})]})]})]},n.item.id)})}),ze()?null:e.jsxs(e.Fragment,{children:[e.jsx(as,{children:P.map(n=>{const K=n.id===A;return e.jsxs(ss,{"data-testid":"credit-pack","data-on":K||void 0,onClick:()=>_(n.id),children:[e.jsx(ns,{src:is,alt:""}),e.jsx(rs,{children:le(n.credits)}),e.jsxs(os,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),e.jsxs(cs,{children:[e.jsxs(ls,{children:[e.jsx(ds,{}),e.jsx("span",{children:le((E==null?void 0:E.credits)??0)})]}),e.jsxs(us,{children:["$",((E==null?void 0:E.usd)??0).toFixed(2)]})]})]}),e.jsxs(Le,{children:[e.jsx(de,{"data-variant":"outline",onClick:X,children:s("buyModal.cancel")}),ze()?null:e.jsx(de,{"data-variant":"gradient",onClick:J,children:s("buyModal.buy")})]})]})}const{colors:c,gradients:Ds,radius:te}=ue,Bt="@media (max-width: 1080px)",I="@media (max-width: 880px)",Tt=i.div`
|
|
62
|
-
max-width: 1510px;
|
|
63
|
-
margin: 0 auto;
|
|
64
|
-
/* Grows into the page's leftover height and passes it down to Upsell, so the white cross-sell band ends at
|
|
65
|
-
the footer rather than leaving a gray strip. Needs .page[data-route="/cart"] to be a flex column. */
|
|
66
|
-
width: 100%;
|
|
67
|
-
flex: 1 0 auto;
|
|
68
|
-
display: flex;
|
|
69
|
-
flex-direction: column;
|
|
70
|
-
|
|
71
|
-
${I} {
|
|
72
|
-
padding-bottom: 188px; /* room for the fixed summary bar */
|
|
73
|
-
}
|
|
74
|
-
`,It=i.button`
|
|
75
|
-
display: inline-flex;
|
|
76
|
-
align-items: center;
|
|
77
|
-
gap: 6px;
|
|
78
|
-
margin: 0 0 16px;
|
|
79
|
-
padding: 0;
|
|
80
|
-
border: 0;
|
|
81
|
-
background: none;
|
|
82
|
-
color: ${c.text2};
|
|
83
|
-
font-size: 14px;
|
|
84
|
-
font-weight: 600;
|
|
85
|
-
letter-spacing: 0.02em;
|
|
86
|
-
text-transform: uppercase;
|
|
87
|
-
cursor: pointer;
|
|
88
|
-
transition: color 0.15s ease;
|
|
89
|
-
|
|
90
|
-
&:hover {
|
|
91
|
-
color: ${c.accent};
|
|
92
|
-
}
|
|
93
|
-
& .ico {
|
|
94
|
-
width: 18px;
|
|
95
|
-
height: 18px;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
${I} {
|
|
99
|
-
display: none;
|
|
100
|
-
}
|
|
101
|
-
`,Vs=i.div`
|
|
102
|
-
display: grid;
|
|
103
|
-
grid-template-columns: minmax(0, 1fr) 615px;
|
|
104
|
-
gap: 24px;
|
|
105
|
-
align-items: start;
|
|
106
|
-
|
|
107
|
-
${Bt} {
|
|
108
|
-
grid-template-columns: 1fr;
|
|
109
|
-
}
|
|
110
|
-
`,Pt=i.div`
|
|
111
|
-
position: relative;
|
|
112
|
-
/* The gray band is 733px in Figma (1553-317103) — taller than the panels inside it, deliberately. Without
|
|
113
|
-
this it collapsed to the panels' height, and the page shell's own viewport-filling min-height then padded
|
|
114
|
-
the page out BELOW the cross-sell, so a strip of gray showed under "You might also like" instead of the
|
|
115
|
-
footer. Giving the band its designed height puts the leftover space where the design wants it. */
|
|
116
|
-
min-height: 733px;
|
|
117
|
-
/* Gray below the panels so the band never hugs the last card: Figma's band runs y152–950 with the
|
|
118
|
-
content ending at 854. The min-height above only covers a SHORT cart — once the list outgrows it
|
|
119
|
-
the band tracks the content, and without this padding it would butt straight into the purple. */
|
|
120
|
-
padding-bottom: 96px;
|
|
121
|
-
|
|
122
|
-
&::before {
|
|
123
|
-
content: '';
|
|
124
|
-
position: absolute;
|
|
125
|
-
top: -28px;
|
|
126
|
-
bottom: 0;
|
|
127
|
-
left: 50%;
|
|
128
|
-
width: 100vw;
|
|
129
|
-
transform: translateX(-50%);
|
|
130
|
-
background: ${c.media};
|
|
131
|
-
z-index: 0;
|
|
132
|
-
}
|
|
133
|
-
& > * {
|
|
134
|
-
position: relative;
|
|
135
|
-
z-index: 1;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
${I} {
|
|
139
|
-
/* The single-column layout is already taller than the desktop band, and the fixed summary bar sits over
|
|
140
|
-
the bottom of it — a floor here would only add empty gray. */
|
|
141
|
-
min-height: 0;
|
|
142
|
-
|
|
143
|
-
/* The fixed summary bar already reserves room at the bottom on mobile (see Checkout). */
|
|
144
|
-
padding-bottom: 32px;
|
|
145
|
-
|
|
146
|
-
&::before {
|
|
147
|
-
top: -16px; /* .page's mobile padding */
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
`,Js=i.div`
|
|
151
|
-
min-width: 0;
|
|
152
|
-
display: flex;
|
|
153
|
-
flex-direction: column;
|
|
154
|
-
gap: 12px;
|
|
155
|
-
`,Xs=i.div`
|
|
156
|
-
display: flex;
|
|
157
|
-
align-items: center;
|
|
158
|
-
justify-content: space-between;
|
|
159
|
-
gap: 12px;
|
|
160
|
-
background: ${c.white};
|
|
161
|
-
border-radius: 16px;
|
|
162
|
-
padding: 12px 12px 12px 24px;
|
|
163
|
-
|
|
164
|
-
${I} {
|
|
165
|
-
gap: 8px;
|
|
166
|
-
padding: 8px 16px;
|
|
167
|
-
}
|
|
168
|
-
`,Rt=i.section`
|
|
169
|
-
min-width: 0;
|
|
170
|
-
background: ${c.white};
|
|
171
|
-
border-radius: 16px;
|
|
172
|
-
padding: 24px;
|
|
173
|
-
|
|
174
|
-
${I} {
|
|
175
|
-
padding: 16px;
|
|
176
|
-
}
|
|
177
|
-
`,Ys=i(Rt)`
|
|
178
|
-
display: flex;
|
|
179
|
-
flex-direction: column;
|
|
180
|
-
align-items: center;
|
|
181
|
-
justify-content: center;
|
|
182
|
-
gap: 24px;
|
|
183
|
-
min-height: 420px;
|
|
184
|
-
padding: 48px 16px;
|
|
185
|
-
text-align: center;
|
|
186
|
-
color: ${c.text};
|
|
187
|
-
|
|
188
|
-
${ue.media.maxWidth("mobile")} {
|
|
189
|
-
min-height: 320px;
|
|
190
|
-
padding: 32px 16px;
|
|
191
|
-
}
|
|
192
|
-
`,Zs=i.div`
|
|
193
|
-
display: flex;
|
|
194
|
-
flex-direction: column;
|
|
195
|
-
align-items: center;
|
|
196
|
-
gap: 12px;
|
|
197
|
-
padding-bottom: 16px;
|
|
198
|
-
`,en=i.p`
|
|
199
|
-
margin: 0;
|
|
200
|
-
font-size: 24px;
|
|
201
|
-
font-weight: 700;
|
|
202
|
-
line-height: 1.6;
|
|
203
|
-
|
|
204
|
-
${ue.media.maxWidth("mobile")} {
|
|
205
|
-
font-size: 20px;
|
|
206
|
-
}
|
|
207
|
-
`,tn=i.p`
|
|
208
|
-
margin: 0;
|
|
209
|
-
font-size: 20px;
|
|
210
|
-
font-weight: 400;
|
|
211
|
-
line-height: 1.6;
|
|
212
|
-
|
|
213
|
-
${ue.media.maxWidth("mobile")} {
|
|
214
|
-
font-size: 16px;
|
|
215
|
-
}
|
|
216
|
-
`,an=i(Ke)`
|
|
217
|
-
display: inline-flex;
|
|
218
|
-
align-items: center;
|
|
219
|
-
justify-content: center;
|
|
220
|
-
width: 310px;
|
|
221
|
-
max-width: 100%;
|
|
222
|
-
height: 56px;
|
|
223
|
-
padding: 0 12px;
|
|
224
|
-
border-radius: ${te.card};
|
|
225
|
-
background: ${c.accent};
|
|
226
|
-
color: ${c.softWhite};
|
|
227
|
-
font-size: 15px;
|
|
228
|
-
font-weight: 600;
|
|
229
|
-
line-height: 24px;
|
|
230
|
-
letter-spacing: 0.46px;
|
|
231
|
-
text-transform: uppercase;
|
|
232
|
-
text-decoration: none;
|
|
233
|
-
transition: background 0.15s ease;
|
|
234
|
-
|
|
235
|
-
&:hover {
|
|
236
|
-
background: ${c.accentHover};
|
|
237
|
-
}
|
|
238
|
-
&:focus-visible {
|
|
239
|
-
outline: 2px solid ${c.accent};
|
|
240
|
-
outline-offset: 2px;
|
|
241
|
-
}
|
|
242
|
-
`,sn=i.button`
|
|
243
|
-
display: none;
|
|
244
|
-
|
|
245
|
-
${I} {
|
|
246
|
-
display: inline-flex;
|
|
247
|
-
align-items: center;
|
|
248
|
-
flex-shrink: 0;
|
|
249
|
-
border: 0;
|
|
250
|
-
background: none;
|
|
251
|
-
padding: 0;
|
|
252
|
-
color: ${c.text};
|
|
253
|
-
cursor: pointer;
|
|
254
|
-
|
|
255
|
-
& .ico {
|
|
256
|
-
width: 20px;
|
|
257
|
-
height: 20px;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
`,nn=i.h1`
|
|
261
|
-
margin: 0;
|
|
262
|
-
font-size: 14px;
|
|
263
|
-
font-weight: 600;
|
|
264
|
-
line-height: 1.57;
|
|
265
|
-
color: ${c.text};
|
|
266
|
-
|
|
267
|
-
${I} {
|
|
268
|
-
flex: 1;
|
|
269
|
-
min-width: 0;
|
|
270
|
-
font-size: 16px;
|
|
271
|
-
}
|
|
272
|
-
`,rn=i.button`
|
|
273
|
-
display: inline-flex;
|
|
274
|
-
align-items: center;
|
|
275
|
-
justify-content: center;
|
|
276
|
-
gap: 8px;
|
|
277
|
-
height: 40px;
|
|
278
|
-
padding: 0 12px;
|
|
279
|
-
border: 2px solid ${c.text2};
|
|
280
|
-
border-radius: ${te.btn};
|
|
281
|
-
background: none;
|
|
282
|
-
color: ${c.text2};
|
|
283
|
-
font-size: 13px;
|
|
284
|
-
font-weight: 600;
|
|
285
|
-
line-height: 24px;
|
|
286
|
-
letter-spacing: 0.46px;
|
|
287
|
-
text-transform: uppercase;
|
|
288
|
-
white-space: nowrap;
|
|
289
|
-
cursor: pointer;
|
|
290
|
-
transition:
|
|
291
|
-
background 0.15s ease,
|
|
292
|
-
filter 0.15s ease;
|
|
293
|
-
|
|
294
|
-
/* Mixed from currentColor so the wash cannot drift from the border colour. */
|
|
295
|
-
&:hover:not(:disabled) {
|
|
296
|
-
background: color-mix(in srgb, currentColor 6%, transparent);
|
|
297
|
-
}
|
|
298
|
-
&:active:not(:disabled) {
|
|
299
|
-
filter: brightness(0.97);
|
|
300
|
-
}
|
|
301
|
-
&:disabled {
|
|
302
|
-
opacity: 0.55;
|
|
303
|
-
cursor: default;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
/* Mobile keeps the full 40px button and thins the outline to 1px (1182:236892) rather than shrinking
|
|
307
|
-
the type, which had it reading smaller than the row title beside it. */
|
|
308
|
-
${I} {
|
|
309
|
-
border-width: 1px;
|
|
310
|
-
border-color: ${c.text};
|
|
311
|
-
color: ${c.text};
|
|
312
|
-
}
|
|
313
|
-
`,on=i.div`
|
|
314
|
-
display: flex;
|
|
315
|
-
flex-direction: column;
|
|
316
|
-
gap: 24px;
|
|
317
|
-
`,cn=i.div`
|
|
318
|
-
position: relative;
|
|
319
|
-
display: flex;
|
|
320
|
-
align-items: stretch;
|
|
321
|
-
gap: 12px;
|
|
322
|
-
background: ${c.white};
|
|
323
|
-
border: 1px solid ${c.gray4};
|
|
324
|
-
border-radius: ${te.card};
|
|
325
|
-
overflow: hidden;
|
|
326
|
-
|
|
327
|
-
&[data-unavailable] [data-thumb] {
|
|
328
|
-
opacity: 0.5;
|
|
329
|
-
}
|
|
330
|
-
&[data-unavailable] [data-check] {
|
|
331
|
-
display: none;
|
|
332
|
-
}
|
|
333
|
-
&[data-unavailable] [data-desc] {
|
|
334
|
-
opacity: 0.7;
|
|
335
|
-
}
|
|
336
|
-
`,ln=i.div`
|
|
337
|
-
position: relative;
|
|
338
|
-
flex-shrink: 0;
|
|
339
|
-
width: 137.5px;
|
|
340
|
-
height: 137px;
|
|
341
|
-
background: ${c.media};
|
|
342
|
-
border-radius: ${te.card};
|
|
343
|
-
display: grid;
|
|
344
|
-
place-items: center;
|
|
345
|
-
overflow: hidden;
|
|
346
|
-
|
|
347
|
-
& img {
|
|
348
|
-
width: 83%;
|
|
349
|
-
height: 83%;
|
|
350
|
-
object-fit: contain;
|
|
351
|
-
filter: drop-shadow(0.56px 2.25px 2.8px rgba(0, 0, 0, 0.1));
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
${I} {
|
|
355
|
-
width: 120px;
|
|
356
|
-
height: 120px;
|
|
357
|
-
}
|
|
358
|
-
`,dn=i(Ke)`
|
|
359
|
-
position: absolute;
|
|
360
|
-
inset: 0;
|
|
361
|
-
display: grid;
|
|
362
|
-
place-items: center;
|
|
363
|
-
`,un=i.span`
|
|
364
|
-
position: absolute;
|
|
365
|
-
top: 7.5px;
|
|
366
|
-
left: 7.5px;
|
|
367
|
-
width: 20px;
|
|
368
|
-
height: 20px;
|
|
369
|
-
border-radius: 50%;
|
|
370
|
-
background: #34ce77;
|
|
371
|
-
display: grid;
|
|
372
|
-
place-items: center;
|
|
373
|
-
`,hn=i.div`
|
|
374
|
-
flex: 1;
|
|
375
|
-
min-width: 0;
|
|
376
|
-
display: flex;
|
|
377
|
-
flex-direction: column;
|
|
378
|
-
justify-content: space-between;
|
|
379
|
-
gap: 8px;
|
|
380
|
-
padding: 16px 8px;
|
|
381
|
-
|
|
382
|
-
${I} {
|
|
383
|
-
padding: 12px 4px 12px 0;
|
|
384
|
-
}
|
|
385
|
-
`,pn=i.div`
|
|
386
|
-
display: flex;
|
|
387
|
-
flex-direction: column;
|
|
388
|
-
gap: 4px;
|
|
389
|
-
min-width: 0;
|
|
390
|
-
padding-right: 64px; /* clear the top-right favourite + remove group */
|
|
391
|
-
`,qt=Ne`
|
|
392
|
-
display: block;
|
|
393
|
-
font-size: 16px;
|
|
394
|
-
font-weight: 600;
|
|
395
|
-
line-height: 1.2;
|
|
396
|
-
color: ${c.text};
|
|
397
|
-
text-decoration: none;
|
|
398
|
-
overflow: hidden;
|
|
399
|
-
text-overflow: ellipsis;
|
|
400
|
-
white-space: nowrap;
|
|
401
|
-
|
|
402
|
-
a&:hover {
|
|
403
|
-
color: ${c.accent};
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
${I} {
|
|
407
|
-
white-space: normal;
|
|
408
|
-
display: -webkit-box;
|
|
409
|
-
-webkit-line-clamp: 2;
|
|
410
|
-
line-clamp: 2;
|
|
411
|
-
-webkit-box-orient: vertical;
|
|
412
|
-
}
|
|
413
|
-
`,gn=i.div`
|
|
414
|
-
${qt};
|
|
415
|
-
`,mn=i(Ke)`
|
|
416
|
-
${qt};
|
|
417
|
-
`,xn=i(la)`
|
|
418
|
-
font-size: 10px;
|
|
419
|
-
line-height: 1.43;
|
|
420
|
-
color: ${c.muted};
|
|
421
|
-
|
|
422
|
-
& [data-avatar] {
|
|
423
|
-
display: none;
|
|
424
|
-
}
|
|
425
|
-
& [data-testid='creator-name'] {
|
|
426
|
-
font-size: 10px;
|
|
427
|
-
line-height: 1.43;
|
|
428
|
-
}
|
|
429
|
-
`,fn=i.div`
|
|
430
|
-
display: flex;
|
|
431
|
-
align-items: center;
|
|
432
|
-
justify-content: space-between;
|
|
433
|
-
gap: 12px;
|
|
434
|
-
padding-right: 8px;
|
|
435
|
-
`,yn=i.div`
|
|
436
|
-
display: inline-flex;
|
|
437
|
-
align-items: center;
|
|
438
|
-
gap: 8px;
|
|
439
|
-
padding: 6px;
|
|
440
|
-
border: 0.5px solid ${c.muted2};
|
|
441
|
-
border-radius: ${te.pill};
|
|
442
|
-
`,At=i.button`
|
|
443
|
-
display: grid;
|
|
444
|
-
place-items: center;
|
|
445
|
-
width: 16px;
|
|
446
|
-
height: 16px;
|
|
447
|
-
padding: 0;
|
|
448
|
-
border: 0;
|
|
449
|
-
background: none;
|
|
450
|
-
color: ${c.text};
|
|
451
|
-
cursor: pointer;
|
|
452
|
-
|
|
453
|
-
&:disabled {
|
|
454
|
-
color: ${c.muted2};
|
|
455
|
-
cursor: default;
|
|
456
|
-
}
|
|
457
|
-
`,bn=i.span`
|
|
458
|
-
min-width: 12px;
|
|
459
|
-
font-size: 14px;
|
|
460
|
-
font-weight: 500;
|
|
461
|
-
line-height: 1.2;
|
|
462
|
-
color: ${c.text};
|
|
463
|
-
text-align: center;
|
|
464
|
-
`,vn=i.div`
|
|
465
|
-
display: inline-flex;
|
|
466
|
-
align-items: center;
|
|
467
|
-
gap: 4px;
|
|
468
|
-
/* Always right-aligned: with a stepper present space-between handles it; for secondary/unique lines
|
|
469
|
-
(no stepper) the auto margin keeps the lone price on the right instead of falling to the left. */
|
|
470
|
-
margin-left: auto;
|
|
471
|
-
font-size: 24px;
|
|
472
|
-
font-weight: 600;
|
|
473
|
-
color: ${c.text2};
|
|
474
|
-
|
|
475
|
-
${I} {
|
|
476
|
-
font-size: 20px;
|
|
477
|
-
}
|
|
478
|
-
`,wn=i(zt)`
|
|
479
|
-
width: 24px;
|
|
480
|
-
height: 24px;
|
|
481
|
-
background: ${c.text};
|
|
482
|
-
|
|
483
|
-
${I} {
|
|
484
|
-
width: 20px;
|
|
485
|
-
height: 20px;
|
|
486
|
-
}
|
|
487
|
-
`,Cn=i.span`
|
|
488
|
-
margin-left: 6px;
|
|
489
|
-
font-size: 14px;
|
|
490
|
-
font-weight: 500;
|
|
491
|
-
color: ${c.muted};
|
|
492
|
-
text-decoration: line-through;
|
|
493
|
-
`,jn=i.div`
|
|
494
|
-
position: absolute;
|
|
495
|
-
top: 9px;
|
|
496
|
-
right: 7px;
|
|
497
|
-
display: flex;
|
|
498
|
-
align-items: flex-start;
|
|
499
|
-
gap: 12px;
|
|
500
|
-
`,kn=i.span`
|
|
501
|
-
display: inline-flex;
|
|
502
|
-
align-items: center;
|
|
503
|
-
gap: 4px;
|
|
504
|
-
font-size: 12px;
|
|
505
|
-
font-weight: 600;
|
|
506
|
-
line-height: 1;
|
|
507
|
-
text-transform: uppercase;
|
|
508
|
-
color: ${c.text2};
|
|
509
|
-
`,$n=i(O)`
|
|
510
|
-
color: #f48221;
|
|
511
|
-
`,Sn=i.span`
|
|
512
|
-
align-self: flex-start;
|
|
513
|
-
display: inline-flex;
|
|
514
|
-
align-items: center;
|
|
515
|
-
gap: 4px;
|
|
516
|
-
padding: 2px 4px;
|
|
517
|
-
border-radius: ${te.chip};
|
|
518
|
-
background: #f4e9ff;
|
|
519
|
-
font-size: 10px;
|
|
520
|
-
font-weight: 400;
|
|
521
|
-
line-height: 14px;
|
|
522
|
-
color: ${c.text};
|
|
523
|
-
`,Mn=i(O)`
|
|
524
|
-
width: 11.31px;
|
|
525
|
-
height: 10.94px;
|
|
526
|
-
background: ${c.text};
|
|
527
|
-
`,Ft=Ne`
|
|
528
|
-
display: grid;
|
|
529
|
-
place-items: center;
|
|
530
|
-
width: 24px;
|
|
531
|
-
height: 24px;
|
|
532
|
-
padding: 0;
|
|
533
|
-
border: 0;
|
|
534
|
-
background: none;
|
|
535
|
-
color: ${c.muted};
|
|
536
|
-
cursor: pointer;
|
|
537
|
-
transition: color 0.12s ease;
|
|
538
|
-
|
|
539
|
-
&:disabled {
|
|
540
|
-
opacity: 0.5;
|
|
541
|
-
cursor: default;
|
|
542
|
-
}
|
|
543
|
-
`,Tn=i.button`
|
|
544
|
-
${Ft};
|
|
545
|
-
|
|
546
|
-
&:hover:not(:disabled) {
|
|
547
|
-
color: ${c.text};
|
|
548
|
-
}
|
|
549
|
-
&[data-on] {
|
|
550
|
-
color: ${c.dclRed};
|
|
551
|
-
}
|
|
552
|
-
`,In=i.button`
|
|
553
|
-
${Ft};
|
|
554
|
-
|
|
555
|
-
&:hover:not(:disabled) {
|
|
556
|
-
color: ${c.dclRed};
|
|
557
|
-
}
|
|
558
|
-
`,Pn=i.div`
|
|
559
|
-
display: flex;
|
|
560
|
-
gap: 20px;
|
|
561
|
-
margin-top: 16px;
|
|
562
|
-
|
|
563
|
-
& .link {
|
|
564
|
-
font-size: 13px;
|
|
565
|
-
color: ${c.muted};
|
|
566
|
-
font-weight: 600;
|
|
567
|
-
}
|
|
568
|
-
& .link:hover:not(:disabled) {
|
|
569
|
-
color: ${c.text};
|
|
570
|
-
}
|
|
571
|
-
`,An=i.aside`
|
|
572
|
-
position: sticky;
|
|
573
|
-
top: 172px;
|
|
574
|
-
display: flex;
|
|
575
|
-
flex-direction: column;
|
|
576
|
-
background: ${c.white};
|
|
577
|
-
box-shadow: 0 1px 3px rgba(22, 21, 24, 0.06);
|
|
578
|
-
border-radius: 16px;
|
|
579
|
-
padding: 16px;
|
|
580
|
-
|
|
581
|
-
${Bt} {
|
|
582
|
-
position: static;
|
|
583
|
-
}
|
|
584
|
-
${I} {
|
|
585
|
-
position: fixed;
|
|
586
|
-
left: 0;
|
|
587
|
-
right: 0;
|
|
588
|
-
top: auto;
|
|
589
|
-
bottom: 0;
|
|
590
|
-
z-index: 30;
|
|
591
|
-
border: 0;
|
|
592
|
-
/* Square and hard-edged against the page (1182:236910): it is a bar docked to the bottom, not a sheet
|
|
593
|
-
lifted off it. */
|
|
594
|
-
border-radius: 0;
|
|
595
|
-
box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.25);
|
|
596
|
-
}
|
|
597
|
-
`,zn=i.h2`
|
|
598
|
-
margin: 0 0 24px;
|
|
599
|
-
padding-bottom: 16px;
|
|
600
|
-
border-bottom: 1px solid ${c.gray4};
|
|
601
|
-
font-size: 24px;
|
|
602
|
-
font-weight: 600;
|
|
603
|
-
color: ${c.text};
|
|
604
|
-
|
|
605
|
-
${I} {
|
|
606
|
-
margin-bottom: 12px;
|
|
607
|
-
padding-bottom: 8px;
|
|
608
|
-
font-size: 16px;
|
|
609
|
-
line-height: 1.6;
|
|
610
|
-
}
|
|
611
|
-
`,En=i.div`
|
|
612
|
-
display: flex;
|
|
613
|
-
flex-direction: column;
|
|
614
|
-
gap: 12px;
|
|
615
|
-
`,Bn=i.div`
|
|
616
|
-
display: flex;
|
|
617
|
-
align-items: flex-start;
|
|
618
|
-
justify-content: space-between;
|
|
619
|
-
gap: 12px;
|
|
620
|
-
`,Rn=i.span`
|
|
621
|
-
font-size: 14px;
|
|
622
|
-
font-weight: 600;
|
|
623
|
-
line-height: 1.57;
|
|
624
|
-
color: ${c.muted1};
|
|
625
|
-
`,qn=i.span`
|
|
626
|
-
display: inline-flex;
|
|
627
|
-
align-items: center;
|
|
628
|
-
gap: 8px;
|
|
629
|
-
font-size: 24px;
|
|
630
|
-
font-weight: 700;
|
|
631
|
-
color: ${c.text};
|
|
632
|
-
`,Fn=i.span`
|
|
633
|
-
display: flex;
|
|
634
|
-
flex-direction: column;
|
|
635
|
-
align-items: flex-end;
|
|
636
|
-
justify-content: center;
|
|
637
|
-
gap: 4px;
|
|
638
|
-
`;i.span`
|
|
639
|
-
font-size: 12px;
|
|
640
|
-
font-weight: 400;
|
|
641
|
-
line-height: 1;
|
|
642
|
-
color: ${c.muted};
|
|
643
|
-
`;const _n=i(zt)`
|
|
644
|
-
width: 30px;
|
|
645
|
-
height: 30px;
|
|
646
|
-
background: ${c.text};
|
|
647
|
-
-webkit-mask-size: 24px 24px;
|
|
648
|
-
mask-size: 24px 24px;
|
|
649
|
-
-webkit-mask-position: left center;
|
|
650
|
-
mask-position: left center;
|
|
651
|
-
`;i.button`
|
|
652
|
-
width: 100%;
|
|
653
|
-
height: 56px;
|
|
654
|
-
border: 0;
|
|
655
|
-
border-radius: ${te.btn};
|
|
656
|
-
background: ${Ds.buyBtn};
|
|
657
|
-
color: ${c.softWhite};
|
|
658
|
-
font-size: 15px;
|
|
659
|
-
font-weight: 600;
|
|
660
|
-
letter-spacing: 0.046em;
|
|
661
|
-
text-transform: uppercase;
|
|
662
|
-
cursor: pointer;
|
|
663
|
-
transition: background-image 0.15s ease;
|
|
664
|
-
|
|
665
|
-
/* Primary hover/pressed is the solid Primary red (Figma 738:53252 / 738:53262) — the gradient is
|
|
666
|
-
the RESTING fill only. Painted as a flat GRADIENT, not a background-color: the shorthand can't
|
|
667
|
-
interpolate background-image, so gradient -> colour dropped the image midway while the colour was
|
|
668
|
-
still half transparent and the button visibly blinked. Same property both ends = a clean swap. */
|
|
669
|
-
&:hover:not(:disabled),
|
|
670
|
-
&:active:not(:disabled) {
|
|
671
|
-
background-image: linear-gradient(${c.dclRed}, ${c.dclRed});
|
|
672
|
-
}
|
|
673
|
-
&:disabled {
|
|
674
|
-
opacity: 0.6;
|
|
675
|
-
cursor: default;
|
|
676
|
-
}
|
|
677
|
-
`;const _t=Ne`
|
|
678
|
-
margin: 0;
|
|
679
|
-
font-size: 13px;
|
|
680
|
-
`,we=i.p`
|
|
681
|
-
${_t};
|
|
682
|
-
`,Wn=i(_s)`
|
|
683
|
-
${_t};
|
|
684
|
-
`,Ln=i.div`
|
|
685
|
-
position: relative;
|
|
686
|
-
flex: 1 0 auto;
|
|
687
|
-
margin-top: 48px;
|
|
688
|
-
/* Below the gray band the cross-sell sits straight on the purple field (Figma) — hence no band of its
|
|
689
|
-
own. The padding is the whole gap from the top of the section to the heading; the shared carousel's
|
|
690
|
-
own top margin is zeroed below so the two don't stack. */
|
|
691
|
-
padding: 47px 0 24px;
|
|
692
|
-
|
|
693
|
-
& section {
|
|
694
|
-
margin-top: 0;
|
|
695
|
-
}
|
|
696
|
-
`;function Fe(o){if(qs(o))return s("errors.rejected");const u=(o.message??"").toLowerCase();return u.includes("insufficient")?s("cart.error.insufficient",{currency:We.name}):u.includes("no active listing")||u.includes("your own listing")?s("cart.error.listingChanged"):s("marketCheckout.error.generic")}const Kn=12e4;function Nn(o){const u=[];return o.unavailable.length&&u.push(s("cart.drop.unavailable",{count:o.unavailable.length})),o.own.length&&u.push(s("cart.drop.own",{count:o.own.length})),s("cart.drop.removed",{items:u.join(` ${s("cart.drop.and")} `)})}const _e=o=>o.reduce((u,P)=>u+P.priceCredits*P.quantity,0),Ce=o=>o.flatMap(u=>Array.from({length:u.quantity},()=>({...u,quantity:1})));function si(){da({title:s("nav.cart"),noindex:!0});const o=H(t=>t.items),u=H(t=>t.remove),P=H(t=>t.increment),A=H(t=>t.decrement),_=H(t=>t.clear),J=H(t=>t.restore),X=H(t=>t.setFittingOpen),E=ut(t=>t.items),ne=ut(t=>t.toggle),{session:n,signIn:K}=ua(),Wt=ha(),he=zs().packs.slice(0,Es);M.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const Lt=o.some(t=>t.category!=="emote"),{data:ke}=pa({queryKey:["upsell-listings"],queryFn:()=>Sa({first:40}),staleTime:6e4}),{data:k}=ga(n),v=ma(),Y=ia(),{state:B}=ra(),[Kt,ie]=M.useState(null),[Qe,pe]=M.useState(null),[Nt,R]=M.useState(!1),[q,D]=M.useState(null),Ue=M.useRef(0),[h,j]=M.useState(null),{data:ge}=xa(n),{data:re}=fa(!0),[$e,Ge]=M.useState(""),oe=M.useRef(null),He=ya(o),Oe=t=>pt(He[t.id]),Se=o.filter(Oe),De=o.length>0&&Se.length===0,Qt=Se.reduce((t,a)=>t+a.priceCredits*a.quantity,0),Ut=o.reduce((t,a)=>t+a.quantity,0),Gt=Se.reduce((t,a)=>t+a.quantity,0),Ve=q?q.liveTotalCredits:Qt,Ht=new Set(o.map(t=>t.id)),Je=((ke==null?void 0:ke.items)??[]).filter(t=>!Ht.has(t.id)).slice(0,12),Ot=new Map(q==null?void 0:q.buyable.map(t=>[t.item.id,t])),me=(k==null?void 0:k.credits)??0,Me=Ve*10,Dt=re?ht(Me,re):0n,Te=Be({priceCents:Me,priceManaWei:Dt,balanceCents:(k==null?void 0:k.balanceCents)??0,manaBalanceWei:ge??0n}),Vt=t=>t.flatMap(a=>{const l=qe(a);return l.kind==="store"?[l.mint]:[]}),Jt=t=>t.flatMap(a=>a.acquisition==="trade"?[a.trade]:[]),Xt=Ca,Yt=t=>ka(t.contractAddress,String(t.itemId));function xe(t){t(),D(null),pe(null),ie(null)}function Zt(){j(null),R(!1)}function Xe(t){const a=_e(t),l=Math.max(0,a-me),r=he.find(d=>d.credits>=l)??he[he.length-1];Ge(r.id),V("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:a,credits_balance:me,shortfall:l}),j({phase:"nofunds",lines:t.map(d=>({item:d.item,priceCredits:d.priceCredits,quantity:d.quantity})),shortfall:l}),R(!1)}async function Ie(t){if(!n||t.length===0)return;const a=Ce(t),l=a.map(x=>({...x.item,priceCredits:x.priceCredits})),r=t.map(x=>({...x.item,priceCredits:x.priceCredits,quantity:x.quantity})),d=[];let p="authorize";const $=new Set,W=new Set,L=new Set,F=[];let w=!1;j({phase:"processing",stage:"reserving",step:1,total:a.length});try{const x=[];for(let m=0;m<a.length;m++){const g=a[m];j({phase:"processing",stage:"reserving",step:m+1,total:a.length});try{const C=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:T,maxCreditedValue:U}=await xt(n.identity,g.usdCents,C,b);d.push({salt:T.id,itemId:g.item.id}),x.push(g.acquisition==="store"?{kind:"store",item:{collection:g.item.contractAddress,itemId:String(g.item.itemId),priceWei:g.priceWei},credits:[T],maxCreditedValue:U,chainId:g.item.chainId}:{kind:"trade",trade:g.trade,credits:[T],maxCreditedValue:U})}catch(C){if(Fs(C)){if(d.length){try{await Ee(n.identity,d.map(b=>b.salt))}catch(b){ae(b,{flow:"cart_checkout",step:"release"})}v.invalidateQueries({queryKey:["usd-balance"]})}Xe(t);return}throw C}}p="submit";const S=Ms(x).length,N=m=>S>1?{current:m,total:S}:void 0,G=(m,g)=>j({phase:"processing",stage:m,step:a.length,total:a.length,signatures:N(g)}),Q=m=>m<S?G("awaiting-signature",m+1):G("settling",S);G("awaiting-signature",1);let f=[];if(ws())try{const m=new Map;f=await Is({purchases:x,buyer:n.address,signer:n.signer,onSigned:()=>Q(S),onBroadcast:({txHash:b,salts:T})=>{m.set(b,T),T.forEach(U=>$.add(U))}});const g=await Promise.allSettled(f.map(b=>Ps(b)));g.forEach((b,T)=>{const U=m.get(f[T])??[];b.status==="fulfilled"?(U.forEach(ce=>W.add(ce)),F.push(f[T])):b.reason instanceof St||U.forEach(ce=>L.add(ce))});const C=g.flatMap(b=>b.status==="rejected"?[b.reason]:[]);if(C.length&&!C.some(b=>b instanceof St))throw C[0];w=!0}catch(m){if(!(m instanceof As)||!$a(n.providerType))throw m;f=await Re({purchases:x,buyer:n.address,signer:n.signer,onSigned:Q,onBroadcast:({salts:g})=>g.forEach(C=>$.add(C)),onSettled:({txHash:g,salts:C})=>{C.forEach(b=>W.add(b)),F.push(g)},onReverted:({salts:g})=>g.forEach(C=>L.add(C))})}else f=await Re({purchases:x,buyer:n.address,signer:n.signer,onSigned:Q,onBroadcast:({salts:m})=>m.forEach(g=>$.add(g)),onSettled:({txHash:m,salts:g})=>{g.forEach(C=>W.add(C)),F.push(m)},onReverted:({salts:m})=>m.forEach(g=>L.add(g))});t.forEach(m=>u(m.item.id)),D(null),V("Shop Completed Purchase",{...ye(l),payment_type:"credits",no_crypto_step:w,transaction_hash:f[0]??null}),kt(v);const z=oe.current;oe.current=null,j(null),R(!1);const y={items:r,txHash:f[0]??void 0,txHashes:f,settled:!0,...z?{creditsAdded:z}:{}};Y("/success",{state:y,replace:!0})}catch(x){be(x)||ae(x,{flow:"cart_checkout",step:p,cart_size:t.length});const S=new Set([...$].filter(y=>!L.has(y))),{toRelease:N,boughtItemIds:G}=Mt({reservations:d,spent:S,settled:W}),Q=[...S].some(y=>!W.has(y)),f=l.filter(y=>G.includes(y.id)),z=l.filter(y=>!G.includes(y.id));if(V(be(x)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:p,error_code:ft(x),value_usd:gt(z.reduce((y,m)=>y+m.priceCredits,0)),cart_size:a.length,partial:f.length>0}),N.length)try{await Ee(n.identity,N)}catch(y){ae(y,{flow:"cart_checkout",step:"release"})}if(v.invalidateQueries({queryKey:["usd-balance"]}),f.length>0){G.forEach(y=>u(y)),D(null),kt(v),V("Shop Completed Purchase",{...ye(f),payment_type:"credits",no_crypto_step:w,transaction_hash:F[0]??null,partial:!0}),j({phase:"error",message:s("cart.error.partiallyBought"),heldCredits:Q}),R(!1);return}j({phase:"error",message:Q?void 0:Fe(x),heldCredits:Q})}}function Ye(t,a){v.invalidateQueries({queryKey:["usd-balance"]}),v.invalidateQueries({queryKey:["detail-trade"]}),v.invalidateQueries({queryKey:["shop-item"]}),v.invalidateQueries({queryKey:["owned-token"]}),v.invalidateQueries({queryKey:["public-token"]}),v.invalidateQueries({queryKey:["item-resales"]}),v.invalidateQueries({queryKey:["shop-items"]}),v.invalidateQueries({queryKey:["catalog-items"]}),v.invalidateQueries({queryKey:["my-assets"]}),v.invalidateQueries({queryKey:["purchases"]}),v.invalidateQueries({queryKey:["owned-item-count"]}),v.invalidateQueries({queryKey:["overview-listings"]}),v.invalidateQueries({queryKey:["upsell-listings"]});const l=oe.current;oe.current=null,j(null),R(!1);const r={items:t,txHash:a[0]??void 0,txHashes:a,settled:!0,...l?{creditsAdded:l}:{}};Y("/success",{state:r,replace:!0})}function Ze(t,a){be(t)||ae(t,{flow:a,step:"submit"}),V(be(t)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:ft(t)}),j({phase:"error",message:Fe(t)}),R(!1)}async function ea(t,a){const l=yt(bt.MANAToken,a),r=yt(bt.CreditsManager,a);await $s({auth:{kind:Ss.Allowance,contractAddress:l.address,spenderAddress:r.address,chainId:a},signer:t})}async function et(){if(re)return re;try{return await v.fetchQuery({queryKey:["mana-rate",mt.chainId],queryFn:()=>ja(mt.chainId),staleTime:6e4})}catch{return}}async function ta(t){const a=Ce(t).reduce((p,$)=>p+$.usdCents,0),r=(ge??0n)>0n?await et():re,d=r?ht(a,r):0n;return{totalCents:a,manaWei:d}}async function tt(t,a){const l=_e(t),{totalCents:r,manaWei:d}=await ta(t),p=Be({priceCents:r,priceManaWei:d,balanceCents:(k==null?void 0:k.balanceCents)??0,manaBalanceWei:ge??0n});if(a&&p.options.some($=>$.method===a)){if(a==="credits"){Ie(t);return}await Ae(st(a,t),nt(p,a),()=>a==="mana"?void it(t):void rt(t,r,d));return}if(p.options.some($=>$.method==="mana"||$.method==="combined")){j({phase:"choose",lines:t,totalCents:r,manaWei:d}),R(!1);return}if(k!=null&&k.credits<l){Xe(t);return}Ie(t)}function at(t){return Be({priceCents:t.totalCents,priceManaWei:t.manaWei,balanceCents:(k==null?void 0:k.balanceCents)??0,manaBalanceWei:ge??0n})}const[Pe,fe]=M.useState(null);function st(t,a){const l=new Map;for(const r of a){const d=xs(t,qe(r));l.set(`${d.chainId}:${d.spender.toLowerCase()}`,d)}return[...l.values()]}async function Ae(t,a,l){const[r,...d]=t;if(!r){l();return}await aa(r.spender,r.chainId,a,()=>void Ae(d,a,l))}async function aa(t,a,l,r){const d=Cs(a,t),p=n?await js(d,n.address,l).catch(()=>!0):!0;if(ks(n==null?void 0:n.providerType,p)){R(!1),fe({auth:d,run:r});return}r()}function nt(t,a){var l;return((l=t.options.find(r=>r.method===a))==null?void 0:l.manaWei)??0n}function sa(t){if((h==null?void 0:h.phase)!=="choose")return;const{lines:a,totalCents:l,manaWei:r}=h;if(t==="credits"){Ie(a);return}Ae(st(t,a),nt(at(h),t),()=>t==="mana"?void it(a):void rt(a,l,r))}async function it(t){if(!n||t.length===0)return;const a=Ce(t),l=a.map(p=>({...p.item,priceCredits:p.priceCredits})),r=t.map(p=>({...p.item,priceCredits:p.priceCredits,quantity:p.quantity})),d=()=>j({phase:"processing",stage:"settling",step:a.length,total:a.length});j({phase:"processing",stage:"awaiting-signature",step:a.length,total:a.length});try{const p=await fs({trades:Jt(a),mints:Vt(a),buyer:n.address,signer:n.signer,onSigned:d});t.forEach($=>u($.item.id)),D(null),V("Shop Completed Purchase",{...ye(l),payment_type:"mana",transaction_hash:p[0]??null}),v.invalidateQueries({queryKey:["mana-balance"]}),Ye(r,p)}catch(p){Ze(p,"buy_cart_mana")}}async function rt(t,a,l){if(!n||t.length===0)return;const r=Ce(t),d=r.map(w=>({...w.item,priceCredits:w.priceCredits})),p=t.map(w=>({...w.item,priceCredits:w.priceCredits,quantity:w.quantity})),$=ys(r.map(w=>w.usdCents),(k==null?void 0:k.balanceCents)??0),W=[],L=new Set,F=new Set;j({phase:"processing",stage:"reserving",step:1,total:r.length});try{const w=r.map(qe),x=[],S=new Map,N=new Map;for(let f=0;f<r.length;f++){const z=r[f],y=w[f],m=$[f],g=bs(Math.max(0,z.usdCents-m),a,l);let C;if(m<=0)C=$t(y,[],"0");else{j({phase:"processing",stage:"reserving",step:f+1,total:r.length});const T=z.item,{credit:U,maxCreditedValue:ce}=await xt(n.identity,m,y.kind==="trade"?y.trade.id:void 0,T.contractAddress&&T.itemId!=null?{contractAddress:T.contractAddress,itemId:String(T.itemId)}:void 0);W.push({salt:U.id,itemId:T.id}),C=$t(y,[U],ce)}const b=Ts(C);S.set(b,(S.get(b)??0n)+g),N.has(b)||N.set(b,x.length),x.push(C)}for(const[f,z]of S){const y=N.get(f);y==null||z<=0n||(x[y]={...x[y],maxCreditedValue:(BigInt(x[y].maxCreditedValue)+z).toString()})}await ea(n.signer,vs(w[0]));const G=()=>j({phase:"processing",stage:"settling",step:r.length,total:r.length});j({phase:"processing",stage:"awaiting-signature",step:r.length,total:r.length});const Q=await Re({purchases:x,buyer:n.address,signer:n.signer,onSigned:G,onBroadcast:({salts:f})=>f.forEach(z=>L.add(z)),onReverted:({salts:f})=>f.forEach(z=>F.add(z))});t.forEach(f=>u(f.item.id)),D(null),V("Shop Completed Purchase",{...ye(d),payment_type:"credits_and_mana",transaction_hash:Q[0]??null}),v.invalidateQueries({queryKey:["mana-balance"]}),Ye(p,Q)}catch(w){const{toRelease:x}=Mt({reservations:W,spent:new Set([...L].filter(S=>!F.has(S))),settled:new Set});x.length&&Ee(n.identity,x).catch(()=>{}),W.length&&v.invalidateQueries({queryKey:["usd-balance"]}),Ze(w,"buy_cart_combined")}}async function Z(t){if(!n){jt({type:"cart-checkout"}),K();return}const a=H.getState().items.filter(Oe);if(a.length===0)return;ie(null),pe(null),R(!0);const l=a.reduce((r,d)=>r+d.priceCredits*d.quantity,0);V("Shop Started Checkout",{cart_size:a.length,cart_value_credits:l,cart_value_usd:gt(l),has_sufficient_credits:me>=l});try{const r=await Bs(a,n.address,Xt,await et(),Yt),d=[...r.unavailable,...r.own];if(d.length&&(d.forEach(p=>u(p.id)),pe(Nn(r))),r.buyable.length===0){ie(s("cart.error.noneAvailable")),D(null);return}if(r.orderChanged){D(r),Ue.current=Date.now();return}await tt(r.buyable,t)}catch(r){ae(r,{flow:"cart_checkout",step:"review",cart_size:a.length}),ie(Fe(r))}finally{R(!1)}}async function ot(){if(q){if(!n){jt({type:"cart-checkout"}),K();return}if(Date.now()-Ue.current>Kn){D(null),pe(null),await Z();return}ie(null),tt(q.buyable)}}async function na(){if($e){try{sessionStorage.setItem(ve,JSON.stringify(H.getState().items))}catch{}R(!0);try{const t=await Rs($e,n?{address:n.address,identity:n.identity}:void 0);if(t.url){window.location.href=t.url;return}Y("/credits")}catch(t){try{sessionStorage.removeItem(ve)}catch{}ae(t,{flow:"cart_buy_credits"}),j({phase:"error",message:s("buyModal.error.creditsCheckout")})}finally{R(!1)}}}const ct=M.useRef(!1);M.useEffect(()=>{if(!n||ct.current||!hs("cart-checkout"))return;ct.current=!0;const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[n]);const lt=M.useRef(!1);M.useEffect(()=>{if(!(B!=null&&B.resumeCheckout)||lt.current)return;lt.current=!0,oe.current=B.creditsAdded??null;try{const a=sessionStorage.getItem(ve);if(a){sessionStorage.removeItem(ve);const l=JSON.parse(a);Array.isArray(l)&&l.length&&J(l)}}catch{}v.invalidateQueries({queryKey:["usd-balance"]});const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[B==null?void 0:B.resumeCheckout]);const dt=M.useRef(!1);M.useEffect(()=>{if(!(B!=null&&B.startCheckout)||dt.current)return;dt.current=!0,Y(".",{replace:!0,state:null});const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[B==null?void 0:B.startCheckout]);const ee=Nt||(h==null?void 0:h.phase)==="processing";return o.length===0&&!h?e.jsx(Tt,{children:e.jsxs(Pt,{children:[e.jsxs(It,{onClick:()=>Y(-1),type:"button",children:[e.jsx(O,{name:"arrow-left"}),s("nav.cart")]}),e.jsxs(Ys,{"data-testid":"cart-empty",children:[e.jsx(O,{name:"cart-plus",size:110}),e.jsxs(Zs,{children:[e.jsx(en,{children:s("cart.empty.title")}),e.jsx(tn,{children:s("cart.empty.body")})]}),e.jsx(an,{to:"/items",children:s("cart.empty.cta")})]})]})}):e.jsxs(Tt,{children:[e.jsxs(Pt,{children:[e.jsxs(It,{onClick:()=>Y(-1),type:"button",children:[e.jsx(O,{name:"arrow-left"}),s("nav.cart")]}),e.jsxs(Vs,{children:[e.jsxs(Js,{children:[e.jsxs(Xs,{children:[e.jsx(sn,{onClick:()=>Y(-1),type:"button","aria-label":s("cart.goBack"),children:e.jsx(O,{name:"arrow-left"})}),e.jsx(nn,{children:s("cart.panelTitle",{count:Ut})}),Lt?e.jsxs(rn,{onClick:()=>X(!0),disabled:ee,children:[e.jsx(O,{name:"fitting-room"}),s("cart.fittingRoom")]}):null]}),e.jsxs(Rt,{children:[e.jsx(on,{children:o.map(t=>{const a=Ot.get(t.id),l=a?a.priceCredits:t.priceCredits,r=!!a&&a.priceCredits!==t.priceCredits,d=!t.tokenId,p=t.quantity,$=typeof t.available=="number"&&p>=t.available,W=l*p,L=ba(t),F=!!L&&!!E[L],w=va(t),x=He[t.id],S=!pt(x),N=x==="sold-out"?s("cart.availability.soldOut"):s("cart.availability.unavailable");return e.jsxs(cn,{"data-unavailable":S||void 0,children:[e.jsxs(ln,{"data-thumb":!0,children:[w?e.jsx(dn,{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(un,{"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(hn,{children:[e.jsxs(pn,{"data-desc":!0,children:[w?e.jsx(mn,{to:w,state:{item:t,tradeId:t.tradeId},title:t.name,children:t.name}):e.jsx(gn,{title:t.name,children:t.name}),t.creator?e.jsx(xn,{address:t.creator,linkToProfile:!0}):null,Wt&&d?e.jsxs(Sn,{"data-testid":"cart-creator-tag",children:[e.jsx(Mn,{name:"buy-from-creator"}),s("cart.creatorTag")]}):null]}),e.jsx(fn,{children:S?e.jsxs(kn,{children:[e.jsx($n,{name:"warning-fill",size:24}),N]}):e.jsxs(e.Fragment,{children:[d?e.jsxs(yn,{children:[e.jsx(At,{onClick:()=>xe(()=>A(t.id)),disabled:ee||p<=1,"aria-label":s("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(bn,{children:p}),e.jsx(At,{onClick:()=>xe(()=>P(t.id)),disabled:ee||$,"aria-label":s("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(vn,{children:[e.jsx(wn,{})," ",W,r?e.jsx(Cn,{children:t.priceCredits*p}):null]})]})})]}),e.jsxs(jn,{children:[L?e.jsx(Tn,{"data-on":F||void 0,onClick:()=>ne(t),"aria-label":F?s("cart.removeFromFavorites",{name:t.name}):s("cart.addToFavorites",{name:t.name}),title:F?s("assetCard.removeFromFavorites"):s("assetCard.addToFavorites"),children:e.jsx(O,{name:F?"heart-solid":"heart"})}):null,e.jsx(In,{onClick:()=>xe(()=>u(t.id)),disabled:ee,"aria-label":s("cart.remove",{name:t.name}),title:s("cart.removeTitle"),children:e.jsx(O,{name:"trash",size:24})})]})]},t.id)})}),e.jsx(Pn,{children:e.jsx("button",{className:"link",onClick:()=>xe(_),disabled:ee,children:s("cart.clearCart")})})]})]}),e.jsxs(An,{children:[e.jsx(zn,{children:s("cart.purchaseSummary")}),e.jsxs(En,{children:[e.jsxs(Bn,{children:[e.jsx(Rn,{children:s("cart.totalItems",{count:Gt})}),e.jsx(Fn,{children:e.jsxs(qn,{children:[e.jsx(_n,{})," ",Ve]})})]}),e.jsx(Et,{options:Te.options,totalCents:Me,shortfall:Te.manaShortfall,showCreditsAmount:!1,creditsLabel:q?s("marketCheckout.confirmPurchase"):Te.options.length>1?s("cart.buyWithCredits"):s("cart.checkout"),busy:ee||De,onPay:t=>void(q?ot():Z(t)),creditsFallback:{label:ee?s("cart.working"):q?s("marketCheckout.confirmPurchase"):s("cart.checkout"),onClick:()=>void(q?ot():Z())}}),De?e.jsx(we,{className:"muted",children:s("cart.allUnavailable")}):null,n?null:e.jsx(we,{className:"muted",children:s("cart.signInHint")}),q?e.jsx(we,{className:"muted",children:s("cart.priceChanged")}):null,Qe?e.jsx(we,{className:"muted",children:Qe}):null,e.jsx(Wn,{message:Kt})]})]})]})]}),Je.length>0?e.jsx(Ln,{children:e.jsx(ps,{title:s("cart.youMightAlsoLike"),items:Je})}):null,Pe&&n?e.jsx(gs,{auth:Pe.auth,signer:n.signer,title:s("authorizeStep.manaTitle"),name:s("authorizeStep.manaName"),reason:s("authorizeStep.manaReason"),icon:e.jsx("img",{src:ms,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{run:t}=Pe;fe(null),t()},onCancel:()=>fe(null),onClose:()=>fe(null)}):null,h?e.jsx(Gs,{phase:h.phase,balanceCredits:me,onClose:Zt,stage:h.phase==="processing"?h.stage:void 0,step:h.phase==="processing"?h.step:void 0,total:h.phase==="processing"?h.total:void 0,isSelfCustody:wa(n==null?void 0:n.providerType),signatures:h.phase==="processing"?h.signatures:void 0,options:h.phase==="choose"?at(h).options:void 0,onPay:sa,totalCents:h.phase==="choose"?h.totalCents:void 0,totalManaWei:h.phase==="choose"?h.manaWei:void 0,totalCredits:h.phase==="choose"?_e(h.lines):void 0,lines:h.phase==="nofunds"?h.lines:void 0,shortfallCredits:h.phase==="nofunds"?h.shortfall:void 0,packs:he,selectedPack:$e,onSelectPack:Ge,onBuyPacks:()=>void na(),message:h.phase==="error"?h.message:void 0,heldCredits:h.phase==="error"&&!!h.heldCredits,onRetry:()=>void Z()}):null]})}export{si as Cart};
|