@dcl/shop 1.4.2-31322494096.commit-984acea → 1.4.2-31322819328.commit-403d972
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-CKFTYaBs.js +378 -0
- package/_assets/{AnimatedBackground-yDJGFuXs.js → AnimatedBackground-B0x7_N1H.js} +1 -1
- package/_assets/{Assets-DNZmp0kB.js → Assets-BPR-1a4W.js} +2 -2
- package/_assets/{Assets.styles-BOAoaKYw.js → Assets.styles-C7r_ZJhU.js} +1 -1
- package/_assets/{Authorizations-BjZqkvFP.js → Authorizations-DugmrT1Q.js} +1 -1
- package/_assets/Cart-BLezijep.js +705 -0
- package/_assets/{CircularProgress-CP3qplJi.js → CircularProgress-C8nyeKvZ.js} +1 -1
- package/_assets/{Collection-Ct93QOl7.js → Collection-BI3Qt_bN.js} +1 -1
- package/_assets/{CollectionCarousel-BBYLCc51.js → CollectionCarousel-Di0TwYMB.js} +119 -113
- package/_assets/{Confetti-CSSh6Q3n.js → Confetti-BvITTGYi.js} +1 -1
- package/_assets/{ConstantsUtil-DU-HtIqA.js → ConstantsUtil-yKI-3mdC.js} +1 -1
- package/_assets/{ContentClient-Br0TlHB0.js → ContentClient-JPjz7pkw.js} +1 -1
- package/_assets/{Creator-CZ-u7pJQ.js → Creator-DYdDR06n.js} +1 -1
- package/_assets/{DeploymentBuilder-B9ep1TYQ.js → DeploymentBuilder-D8Fp_Wpd.js} +1 -1
- package/_assets/{ErrorNotice-D_pEmaKa.js → ErrorNotice-Bx0TFK67.js} +1 -1
- package/_assets/{ExchangeController-BMOFU2Yk.js → ExchangeController-DhSbvjye.js} +1 -1
- package/_assets/{Faq-SyWZBPv3.js → Faq-CX0NuYp9.js} +1 -1
- package/_assets/{GetCredits-Cj0sC8-8.js → GetCredits-Rremt2I1.js} +1 -1
- package/_assets/{Grow-BvQyOM08.js → Grow-LTpUAnhv.js} +1 -1
- package/_assets/{HelpersUtil-DA7I_LJN.js → HelpersUtil-CzJt3zKg.js} +1 -1
- package/_assets/{ItemDetail-Aw5EeYPI.js → ItemDetail-BV4sONxK.js} +1 -1
- package/_assets/LazyEmoteControls-HUINIOWX.js +2 -0
- package/_assets/{LoadMore-CWOcL7-R.js → LoadMore-VDZeuABQ.js} +1 -1
- package/_assets/{ManaPricingBanner.styles-9rG2J5jf.js → ManaPricingBanner.styles-P45QsV85.js} +1 -1
- package/_assets/{MyAssets-BUD8t5K1.js → MyAssets-DcczsFFh.js} +2 -2
- package/_assets/{MyFavorites-C4-JhNjZ.js → MyFavorites-DQXL_PLr.js} +1 -1
- package/_assets/{NetworkUtil-Bj4dy73o.js → NetworkUtil-wKfGQm77.js} +1 -1
- package/_assets/{NotFound-CG1KO7xT.js → NotFound-zfDQh5PT.js} +1 -1
- package/_assets/{NotificationsBell-BsUCxrEm.js → NotificationsBell-3gAYVg8C.js} +1 -1
- package/_assets/{OutfitDetail-uGWxg-j2.js → OutfitDetail-DVAkyalp.js} +1 -1
- package/_assets/{OutfitPreview-D2fEID3k.js → OutfitPreview-C_I21E1H.js} +1 -1
- package/_assets/{OutfitStudio-BtcNDXsS.js → OutfitStudio-DpmY5qla.js} +1 -1
- package/_assets/{StoreSettings-DgR8kapL.js → StoreSettings-BxBZVoTo.js} +21 -21
- package/_assets/{Success-D2k8YVGQ.js → Success-m6Pz5SLi.js} +1 -1
- package/_assets/{SwapController-Cugeklr7.js → SwapController-DC6FV64H.js} +1 -1
- package/_assets/{Tooltip-Crq74Yk1.js → Tooltip-7RBgiOhJ.js} +1 -1
- package/_assets/{TradeService-BF-TBU32.js → TradeService-D7iERxs7.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-B32zOdWK.js → W3MFrameProviderSingleton-BX5i5zB5.js} +3 -3
- package/_assets/{WebCryptoP256-BCgTqIAD.js → WebCryptoP256-CswFThLL.js} +1 -1
- package/_assets/{authorizations-hJkxcnlY.js → authorizations-xMkPvvjF.js} +1 -1
- package/_assets/{basic-Q439CW_S.js → basic-Ds0dGCa2.js} +1 -1
- package/_assets/{biconomy-BsrQT-jW.js → biconomy-BJusvAnA.js} +1 -1
- package/_assets/{builder-CwiQ4DZP.js → builder-9e7esvMB.js} +1 -1
- package/_assets/{buy-gasless-Ce4W7rkQ.js → buy-gasless-Upx9mueH.js} +1 -1
- package/_assets/{buy-BufCe-jB.js → buy-kraR4aMZ.js} +1 -1
- package/_assets/{categories-Daeah9jY.js → categories-BfA8_KJ7.js} +1 -1
- package/_assets/{ccip-Bjd61y2d.js → ccip-CfYrZarP.js} +1 -1
- package/_assets/{ccip-CkvN4cy3.js → ccip-yqY6BD2O.js} +1 -1
- package/_assets/{chains-CT4rY2Dl.js → chains-6Ifznsas.js} +1 -1
- package/_assets/{collectionPage.styles-c51u5sBI.js → collectionPage.styles-C9j7wSby.js} +6 -6
- package/_assets/{common-CBJkiZuG.js → common--ChyYHZo.js} +1 -1
- package/_assets/{controller-Drr-zqI0.js → controller-DiMfykYk.js} +2 -2
- package/_assets/{core-T9VWkzal.js → core-SmBUByfu.js} +4 -4
- package/_assets/{createSvgIcon-BUNycQ7O.js → createSvgIcon-AK8piVy_.js} +1 -1
- package/_assets/{custom-B-yfwqNO.js → custom-BBBbWLeL.js} +1 -1
- package/_assets/{data-capture-CnAKe3GD.js → data-capture-B2_tGgB7.js} +1 -1
- package/_assets/{decimals-D78gtlm7.js → decimals-DkevB2WX.js} +1 -1
- package/_assets/decimals-G-JtEu1Q.js +1 -0
- package/_assets/{detectExtension-DdzKJuxz.js → detectExtension-COhMq9sE.js} +1 -1
- package/_assets/{email-Dh44BYbJ.js → email-CRUx9Can.js} +1 -1
- package/_assets/{embedded-wallet-K1rjcsUE.js → embedded-wallet-D7X3A62W.js} +1 -1
- package/_assets/{emotion-styled.browser.esm-BB594k_t.js → emotion-styled.browser.esm-Co12iU6P.js} +1 -1
- package/_assets/{engine-DLlN9N1e.js → engine-Cd0RjI4B.js} +1 -1
- package/_assets/{errors-X12fPjsF.js → errors-DGBfq9F-.js} +1 -1
- package/_assets/{estimate-l1-fee-DQEWUbn7.js → estimate-l1-fee-BeOXoT2T.js} +1 -1
- package/_assets/{eth_estimateGas-BlvaHHP6.js → eth_estimateGas-YshWewsW.js} +1 -1
- package/_assets/{eth_getStorageAt-BnlbpEeM.js → eth_getStorageAt-vWdlTg_C.js} +1 -1
- package/_assets/{eth_getTransactionCount-wa7Lg-Bw.js → eth_getTransactionCount-BJDSuFpI.js} +1 -1
- package/_assets/{ethereum-D6hcrVKr.js → ethereum-DwkEraTN.js} +1 -1
- package/_assets/{ethers-BW12Sk6C.js → ethers-CFWbjvmu.js} +1 -1
- package/_assets/{execute-CnzbuAor.js → execute-MyT55RH7.js} +2 -2
- package/_assets/{extractIPFS-DZpRWJUo.js → extractIPFS-Du-gmjy5.js} +1 -1
- package/_assets/{features-CVWY4Y16.js → features-DpeURfEv.js} +1 -1
- package/_assets/{fetchTokenMetadata-Cv4i3eUm.js → fetchTokenMetadata-qf4awNO0.js} +2 -2
- package/_assets/{field.styles-C4ptqp5d.js → field.styles-CLkA7aXy.js} +1 -1
- package/_assets/{get-bytecode-CJQVu_Sy.js → get-bytecode-D0Y5xfwK.js} +1 -1
- package/_assets/get-ecosystem-wallet-info-BSwGvk5S.js +1 -0
- package/_assets/{getBalance-DFbuu6jU.js → getBalance-BZHQLuI9.js} +2 -2
- package/_assets/{getInstalledModules-DELpVjJN.js → getInstalledModules-gU0ZuL3I.js} +1 -1
- package/_assets/{getNFT-C_gk9oBP.js → getNFT-ChoI1pvl.js} +2 -2
- package/_assets/getNFT-Drl9pNtz.js +1 -0
- package/_assets/{grid.styles-rSbKZ0v1.js → grid.styles-6Swsp3t3.js} +1 -1
- package/_assets/{hashTypedData-BcHyl6VZ.js → hashTypedData-C6DKF7hk.js} +1 -1
- package/_assets/{hashTypedData-DsCdFFSj.js → hashTypedData-LqqzK45m.js} +1 -1
- package/_assets/{in-app-ASu9R97D.js → in-app-CkFPTg7k.js} +1 -1
- package/_assets/{in-app-wallet-calls-DZ3CNvzA.js → in-app-wallet-calls-BnM7OkWB.js} +1 -1
- package/_assets/{index-BDQl0sBK.js → index--0Z6_zp8.js} +1 -1
- package/_assets/{index-CYr5viwL.js → index--bI9GPO2.js} +1 -1
- package/_assets/{index-ou7_MVjV.js → index-8uMNLy-o.js} +1 -1
- package/_assets/{index-C42GIhEX.js → index-B7YMZ6Ym.js} +1 -1
- package/_assets/{index-tgZAnVTI.js → index-BBFVDtfR.js} +1 -1
- package/_assets/{index-DjZaFE0D.js → index-BKk3uJR7.js} +1 -1
- package/_assets/{index-B5HKp0Vi.js → index-BL_JhI8B.js} +1 -1
- package/_assets/{index-wPcVB-NE.js → index-BSUeL-nt.js} +2 -2
- package/_assets/{index-B4j4OZHM.js → index-BUuJYPHR.js} +1 -1
- package/_assets/{index-Bey_ceBS.js → index-BbDNwMJ5.js} +1 -1
- package/_assets/{index-DCUosWWt.js → index-BmjCQO-4.js} +1 -1
- package/_assets/{index-j-I68K_j.js → index-Bo6A_sYw.js} +1 -1
- package/_assets/{index-Br_8qIDa.js → index-Br7Yze9C.js} +1 -1
- package/_assets/{index-CW4tU326.js → index-BuEByVaA.js} +1 -1
- package/_assets/{index-BM1ICnW9.js → index-BwoeM8sn.js} +1 -1
- package/_assets/{index-VoG2nd6o.js → index-ByqY4FwM.js} +1 -1
- package/_assets/{index-l-kM20sQ.js → index-C2er2WPk.js} +1 -1
- package/_assets/{index-BT9sShn9.js → index-C9H380nx.js} +1 -1
- package/_assets/{index-GyBz3V-v.js → index-CAIqRpnz.js} +1 -1
- package/_assets/{index-BY2CCydA.js → index-CAnHijD-.js} +2 -2
- package/_assets/{index-4l5lQG6P.js → index-CFS2vjXp.js} +12 -12
- package/_assets/{index-C4q1AOAT.js → index-CMDNqOvK.js} +1 -1
- package/_assets/{index-6xyHFGDx.js → index-CWol5wN7.js} +1 -1
- package/_assets/{index-D-o8XxwM.js → index-C_CYYu7f.js} +1 -1
- package/_assets/{index-CBUEDYhH.js → index-CajVN0yY.js} +1 -1
- package/_assets/{index-DwgAiRxn.js → index-Cbiugi30.js} +1 -1
- package/_assets/{index-DPp-ESea.js → index-CfAOFjSl.js} +1 -1
- package/_assets/{index-BpBNDR7U.js → index-Ck4AIO_P.js} +1 -1
- package/_assets/{index-BtA0WZKk.js → index-CkUWZPNB.js} +1 -1
- package/_assets/{index-B7MTfURE.js → index-Cmn5nrw7.js} +1 -1
- package/_assets/{index-smN0JdKJ.js → index-CoR4vPFU.js} +1 -1
- package/_assets/{index-DFub6yV4.js → index-CrWnxBYL.js} +1 -1
- package/_assets/{index-Cbkq3v8Q.js → index-CwmFt9PN.js} +1 -1
- package/_assets/{index-Dd_cpmzS.js → index-D0GrKU0x.js} +3 -3
- package/_assets/{index-D61v6G1k.js → index-D2MuA3CK.js} +1 -1
- package/_assets/{index-DzXDBt2v.js → index-D3sAnLsf.js} +1 -1
- package/_assets/{index-DvIRIwYS.js → index-D4GSAwab.js} +1 -1
- package/_assets/{index-Bd_k4IIg.js → index-DAHoW_y1.js} +1 -1
- package/_assets/{index-BrMDkuYR.js → index-DFVt1AdC.js} +1 -1
- package/_assets/{index-Bm4ND0ad.js → index-DLKLxvW_.js} +1 -1
- package/_assets/{index-CFa_f09j.js → index-DTKLOkHB.js} +1 -1
- package/_assets/{index-DtKJjd3G.js → index-DVZX_gjd.js} +1 -1
- package/_assets/{index-V1R0ZrK8.js → index-Dd4uk9U8.js} +1 -1
- package/_assets/{index-ClPGOmky.js → index-Ddxekr4f.js} +2 -2
- package/_assets/{index-gKCSgSoz.js → index-Di534FL9.js} +1 -1
- package/_assets/{index-DNsqNhGy.js → index-Dm2buwQD.js} +1 -1
- package/_assets/{index-CvtTLzrw.js → index-DsuP5G5w.js} +1 -1
- package/_assets/{index-BAaRF1Kt.js → index-Dvlzhr1J.js} +3 -3
- package/_assets/{index-DG5pCQ1l.js → index-Dwu4qBLC.js} +2 -2
- package/_assets/{index-B3t0Akyi.js → index-I2JVBcar.js} +1 -1
- package/_assets/{index-C90fpqFv.js → index-RCawaz2-.js} +1 -1
- package/_assets/{index-CpstG8j_.js → index-Ud3y_NvU.js} +1 -1
- package/_assets/{index-OnR82uEt.js → index-X-ZabhTM.js} +1 -1
- package/_assets/{index-BTLnCH8f.js → index-ZBsQBJN0.js} +1 -1
- package/_assets/{index-BST4drMR.js → index-cUcyE7jy.js} +1 -1
- package/_assets/{index-iA_-wyby.js → index-d4jfsTKe.js} +1 -1
- package/_assets/{index-CZynYiAt.js → index-fixOjPYd.js} +1 -1
- package/_assets/{index-N3BoWSGy.js → index-hvg5vVrJ.js} +1 -1
- package/_assets/{index-BAq41SqM.js → index-ilWcbkqI.js} +1 -1
- package/_assets/{index-DHimBJeb.js → index-k-j1bELr.js} +3 -3
- package/_assets/{index-BuhEnsVy.js → index-qnAZZfkH.js} +1 -1
- package/_assets/{index-Bsu-4fMn.js → index-y3SpZLfc.js} +1 -1
- package/_assets/{index.es-B_FpSEI8.js → index.es-A50BSm7x.js} +1 -1
- package/_assets/{index.es-9addtGV6.js → index.es-CVnMIH4S.js} +4 -4
- package/_assets/{index.es-o1twLNBp.js → index.es-Cm-4-zUk.js} +1 -1
- package/_assets/{linkAccount-DbSkR5qI.js → linkAccount-NmFxiPPR.js} +1 -1
- package/_assets/{localBatchGatewayRequest-Ce2qdeYU.js → localBatchGatewayRequest-DhHc8Vrr.js} +1 -1
- package/_assets/{native-DP1zuDzq.js → native-2gXXvJVn.js} +1 -1
- package/_assets/{networks-GHAOIb1u.js → networks-cDO6eERp.js} +1 -1
- package/_assets/{onramp-ChGRuE_I.js → onramp-BnqF4EGs.js} +1 -1
- package/_assets/{openzeppelin-BpVt2ax-.js → openzeppelin-CsMwzBJR.js} +1 -1
- package/_assets/{ownerOf-D3oh4dw9.js → ownerOf-DpCf2F7F.js} +1 -1
- package/_assets/{parseNft-CpHXr1f9.js → parseNft-B-t2mQ4R.js} +2 -2
- package/_assets/{parseSignature-Biy-M_Ls.js → parseSignature-BVzpg-v_.js} +3 -3
- package/_assets/{parseSignature-CkpIuMXG.js → parseSignature-COpZXTjT.js} +1 -1
- package/_assets/{passkeys-Bzya5Xwz.js → passkeys-B9lzQRWH.js} +1 -1
- package/_assets/{pay-with-exchange-DJvHsdHS.js → pay-with-exchange-DE0dnRUc.js} +1 -1
- package/_assets/{prepare-contract-call-CCknEo7R.js → prepare-contract-call-D5d4zOA2.js} +1 -1
- package/_assets/{qr-overlay-CiuMbJzl.js → qr-overlay-pg0BNduP.js} +1 -1
- package/_assets/{receive-BUDrQ_j7.js → receive-CblBJppO.js} +1 -1
- package/_assets/{resolveImplementation-CmrD7-Qy.js → resolveImplementation-B-hz-9Uc.js} +1 -1
- package/_assets/{rpc-BuSBKN7B.js → rpc-DkX1UUTP.js} +1 -1
- package/_assets/{secp256k1-C7HcLsFI.js → secp256k1-CxenCQb0.js} +1 -1
- package/_assets/{secp256k1-Bgx_ahIh.js → secp256k1-Dpno3_Km.js} +1 -1
- package/_assets/{secp256k1-DqvSFleR.js → secp256k1-Dw3YB3q9.js} +1 -1
- package/_assets/{send-BH9IbnPj.js → send-BOKqFIEn.js} +1 -1
- package/_assets/{send-batch-transaction-C8_wxAl6.js → send-batch-transaction-iSv6ZMsV.js} +1 -1
- package/_assets/{send-eip712-transaction-DTqP7bXj.js → send-eip712-transaction-BqWfh1rK.js} +2 -2
- package/_assets/send-gasless-transaction-DTZLcnjw.js +2 -0
- package/_assets/{send-transaction-CBeHX_MY.js → send-transaction-BKIxumNA.js} +2 -2
- package/_assets/{sendMetaTransaction-CAjsqDgk.js → sendMetaTransaction-Clf7D2IU.js} +1 -1
- package/_assets/{sendRawTransaction-B1_XLL_b.js → sendRawTransaction-BMOBsy0b.js} +3 -3
- package/_assets/{sentry-CSXKq8As.js → sentry-DfofRafD.js} +1 -1
- package/_assets/{serializeTransaction-Cy2l29rW.js → serializeTransaction-BipaBHsG.js} +1 -1
- package/_assets/{session-proposal-CQXFswbd.js → session-proposal-D0HzdF_d.js} +1 -1
- package/_assets/{session-request-D1aaTCYR.js → session-request-B2Z9A_3c.js} +2 -2
- package/_assets/{sha256-BSj1fVMj.js → sha256-ByLhf2PT.js} +1 -1
- package/_assets/{signing-CjfMxOl5.js → signing-CvylLaqM.js} +3 -3
- package/_assets/{skeleton.styles-aYFCDYET.js → skeleton.styles-fSgRe9xD.js} +1 -1
- package/_assets/{socials-D6cE3xEM.js → socials-Ca42o6Qq.js} +1 -1
- package/_assets/{styled-BG3p97YR.js → styled-A45sAn4i.js} +1 -1
- package/_assets/{swaps-CHmAzwqq.js → swaps-BSg8WlDN.js} +1 -1
- package/_assets/{thirdweb-DnrIo8LX.js → thirdweb-421iVdzN.js} +3 -3
- package/_assets/{to-serializable-transaction-BJo6e6cC.js → to-serializable-transaction-DZlbgvvK.js} +2 -2
- package/_assets/{totalSupply-BHy3jN3T.js → totalSupply-CT13XPT-.js} +1 -1
- package/_assets/{transaction-EJzw2A1o.js → transaction-CnQEpfjA.js} +1 -1
- package/_assets/{transactionReceipt-Bgj48RCD.js → transactionReceipt-EO6z8fAI.js} +1 -1
- package/_assets/{transactions-B9e1qYux.js → transactions-B2W6rIJ6.js} +1 -1
- package/_assets/{useCreditPacks-DWPKNzJV.js → useCreditPacks-JmRRPKzu.js} +1 -1
- package/_assets/{useImportable-BA7ZiV_e.js → useImportable-DOUlkSU5.js} +1 -1
- package/_assets/{useInfiniteGrid-C2jLQlnX.js → useInfiniteGrid-Bg-uRUOo.js} +1 -1
- package/_assets/{useStore-Bcu8D3OM.js → useStore-CjD-7LST.js} +2 -2
- package/_assets/{useTheme-DwmRtz-q.js → useTheme-CKG4BvQX.js} +1 -1
- package/_assets/{utils-CrzpKf7A.js → utils-CpbSECBR.js} +1 -1
- package/_assets/{verifyHash-B457rphK.js → verifyHash-BYWAcNEm.js} +1 -1
- package/_assets/{w3m-modal-jpev0Y86.js → w3m-modal-BWYhTTZn.js} +1 -1
- package/_assets/{w3m-modal-Bk3PvXDz.js → w3m-modal-CEXcWnfq.js} +1 -1
- package/_assets/{wait-for-tx-receipt-B46W8tR-.js → wait-for-tx-receipt-CeC1uuWr.js} +1 -1
- package/_assets/{wallets-CAbZ_EVb.js → wallets-BWgSA3Xm.js} +5 -5
- package/_assets/{web-connector-BAFqrIFK.js → web-connector-Ct1Kzumc.js} +3 -3
- package/_assets/{writeContract-CVV87MRB.js → writeContract-BrlM0Dw_.js} +1 -1
- package/_assets/{zora-sepolia-F6QrxqAf.js → zora-sepolia-lIjvO21R.js} +1 -1
- package/_assets/{zoraTestnet-BOKqoV8O.js → zoraTestnet-C-KnQ85q.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/Activity-DH3M_bvV.js +0 -378
- package/_assets/Cart-18jfr2ZI.js +0 -705
- package/_assets/LazyEmoteControls-BonklT4k.js +0 -2
- package/_assets/decimals-BXz32UcZ.js +0 -1
- package/_assets/get-ecosystem-wallet-info-BmsGe2JV.js +0 -1
- package/_assets/getNFT-D3eoxL4a.js +0 -1
- package/_assets/send-gasless-transaction-BYT_cS3b.js +0 -2
|
@@ -0,0 +1,705 @@
|
|
|
1
|
+
import{j as e,L as Ke,r as I,b as oa,a as ca}from"./react-BYHuwl8r.js";import{t as J,s as i,b as a,L as ue,C as ke,ax as la,ay as Ee,az as da,J as ua,I as O,A as qt,K as Qe,y as ha,X as H,am as pt,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 gt,aE as wa,aF as Ca,z as ja,aG as mt,Z as D,aH as xt,aI as ka,h as ne,r as $a,c as ft,aJ as Sa,aK as yt,aL as qe,aM as Ma,aN as be,aO as ve,aP as bt,g as vt,f as wt,aQ as Ta}from"./index-CFS2vjXp.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 Wa,d as Ct,e as _a,f as $e,P as Bt,g as La,h as Ka,i as Qa,j as Na,k as Le,l as he,L as Ua,m as Ga,n as jt,o as kt,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 Be,Q as ps,R as gs,U as ms,V as xs,Y as $t,Z as St,_ as fs,$ as ys,a0 as bs,a1 as vs,a2 as Mt,a3 as ws}from"./CollectionCarousel-Di0TwYMB.js";import{f as Cs,h as js,a as ks,n as $s,i as Ss,A as Ms}from"./authorizations-xMkPvvjF.js";import{g as Ts,h as Re,p as Is}from"./buy-kraR4aMZ.js";import{b as Ps,w as As,S as Tt,G as zs}from"./buy-gasless-Upx9mueH.js";import{u as Es,M as qs,R as we,r as Bs,c as Rs,p as It,a as Fe}from"./useCreditPacks-JmRRPKzu.js";import{i as Fs,a as Ws}from"./errors-DGBfq9F-.js";import{E as _s}from"./ErrorNotice-Bx0TFK67.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-DfofRafD.js";import"./ethers-CFWbjvmu.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-Clf7D2IU.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(r){const{phase:h,balanceCredits:A,onClose:z}=r,_=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:_?void 0:z,"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}),!_&&e.jsx(Ba,{onClick:z,"aria-label":a("buyModal.close"),children:e.jsx(Ra,{})})]}),e.jsxs(Fa,{children:[e.jsx(Wa,{children:h==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),e.jsx(Ct,{}),e.jsx(_a,{children:ue(A)})]}),r.heldCreditsCount&&(h==="choose"||h==="nofunds")?e.jsx(Hs,{"data-testid":"cart-held-notice",children:a("buyModal.heldExplainer",{credits:r.heldCreditsCount,currency:ke.name})}):null]}),h==="choose"&&e.jsxs($e,{children:[e.jsxs(Gs,{children:[e.jsx("span",{children:a("cart.purchaseSummary")}),e.jsxs("strong",{children:[e.jsx(Ct,{}),ue(r.totalCredits??0)]})]}),e.jsx(Bt,{options:r.options??[],totalCents:r.totalCents??0,shortfall:r.shortfall,onPay:r.onPay??(()=>{})})]}),h==="processing"&&e.jsx(Vs,{stage:r.stage??"reserving",step:r.step??1,total:r.total??1,isSelfCustody:!!r.isSelfCustody,signatures:r.signatures}),h==="nofunds"&&e.jsx(Ds,{lines:r.lines??[],shortfallCredits:r.shortfallCredits??0,packs:r.packs??[],selectedPack:r.selectedPack??"",onSelectPack:r.onSelectPack??(()=>{}),onBuyPacks:r.onBuyPacks??(()=>{}),onCancel:z}),h==="error"&&e.jsxs($e,{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")})," ",r.heldCredits?e.jsxs(e.Fragment,{children:[r.message?e.jsxs(e.Fragment,{children:[r.message," "]}):null,a("cartCheckout.heldLead",{currency:ke.name}),e.jsx("b",{children:a("cartCheckout.heldBold")}),a("cartCheckout.heldTail",{currency:ke.name})]}):r.message??a("cartCheckout.errorBody")]})]}),r.heldCredits?e.jsx(Le,{children:e.jsx(he,{"data-variant":"purple","data-full":!0,onClick:z,children:a("cartCheckout.gotIt")})}):e.jsxs(Le,{children:[e.jsx(he,{"data-variant":"outline",onClick:z,children:a("buyModal.cancel")}),e.jsx(he,{"data-variant":"purple",onClick:r.onRetry??z,children:a("cartCheckout.tryAgain")})]})]})]})]})}function Vs({stage:r,step:h,total:A,isSelfCustody:z,signatures:_}){const X=r==="reserving",Y=A>0?Math.min(100,Math.round(h/A*100)):0,K=z&&_&&_.total>1,re=r==="awaiting-signature"?z?K?a("cartCheckout.confirmMultiple",{current:_.current,total:_.total}):a("buyModal.confirmToContinue"):a("buyModal.completingTransaction"):r==="settling"?a("buyModal.completingTransaction"):a("cartCheckout.preparing");return e.jsxs($e,{"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(jt,{"aria-hidden":!0,children:e.jsx(kt,{"data-step":!0,style:{width:`${Y}%`}})}),A>1?e.jsxs(Qs,{children:[h,"/",A]}):null]}):e.jsx(jt,{"aria-hidden":!0,children:e.jsx(kt,{})})]})}function Ds({lines:r,shortfallCredits:h,packs:A,selectedPack:z,onSelectPack:_,onBuyPacks:X,onCancel:Y}){const K=A.find(n=>n.id===z),re=r.reduce((n,Q)=>n+(Q.quantity??1),0);return e.jsxs($e,{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}),Ee()?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:r.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:ue(n.priceCredits*Q)})]})]})]},n.item.id)})}),Ee()?null:e.jsxs(e.Fragment,{children:[e.jsx(ss,{children:A.map(n=>{const Q=n.id===z;return e.jsxs(ns,{"data-testid":"credit-pack","data-on":Q||void 0,onClick:()=>_(n.id),children:[e.jsx(is,{src:rs,alt:""}),e.jsx(os,{children:ue(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:ue((K==null?void 0:K.credits)??0)})]}),e.jsxs(hs,{children:["$",((K==null?void 0:K.usd)??0).toFixed(2)]})]})]}),e.jsxs(Le,{children:[e.jsx(he,{"data-variant":"outline",onClick:Y,children:a("buyModal.cancel")}),Ee()?null:e.jsx(he,{"data-variant":"gradient",onClick:X,children:a("buyModal.buy")})]})]})}const{colors:l,gradients:Js,radius:ae}=J,Rt="@media (max-width: 1080px)",P="@media (max-width: 880px)",Pt=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
|
+
${P} {
|
|
81
|
+
padding-bottom: 188px; /* room for the fixed summary bar */
|
|
82
|
+
}
|
|
83
|
+
`,At=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
|
+
${P} {
|
|
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
|
+
${Rt} {
|
|
117
|
+
grid-template-columns: 1fr;
|
|
118
|
+
}
|
|
119
|
+
`,zt=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
|
+
${P} {
|
|
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
|
+
${P} {
|
|
174
|
+
gap: 8px;
|
|
175
|
+
padding: 8px 16px;
|
|
176
|
+
}
|
|
177
|
+
`,Ft=i.section`
|
|
178
|
+
min-width: 0;
|
|
179
|
+
background: ${l.white};
|
|
180
|
+
border-radius: 16px;
|
|
181
|
+
padding: 24px;
|
|
182
|
+
|
|
183
|
+
${P} {
|
|
184
|
+
padding: 16px;
|
|
185
|
+
}
|
|
186
|
+
`,en=i(Ft)`
|
|
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(Ke)`
|
|
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
|
+
${P} {
|
|
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
|
+
${P} {
|
|
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
|
+
${P} {
|
|
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
|
+
${P} {
|
|
364
|
+
width: 120px;
|
|
365
|
+
height: 120px;
|
|
366
|
+
}
|
|
367
|
+
`,hn=i(Ke)`
|
|
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
|
+
${P} {
|
|
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
|
+
`,Wt=Qe`
|
|
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
|
+
${P} {
|
|
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
|
+
${Wt};
|
|
424
|
+
`,fn=i(Ke)`
|
|
425
|
+
${Wt};
|
|
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
|
+
`,Et=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
|
+
${P} {
|
|
485
|
+
font-size: 20px;
|
|
486
|
+
}
|
|
487
|
+
`,jn=i(qt)`
|
|
488
|
+
width: 24px;
|
|
489
|
+
height: 24px;
|
|
490
|
+
background: ${l.text};
|
|
491
|
+
|
|
492
|
+
${P} {
|
|
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=Qe`
|
|
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
|
+
${Rt} {
|
|
591
|
+
position: static;
|
|
592
|
+
}
|
|
593
|
+
${P} {
|
|
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
|
+
${P} {
|
|
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
|
+
`,Wn=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
|
+
`,_n=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(qt)`
|
|
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 Lt=Qe`
|
|
687
|
+
margin: 0;
|
|
688
|
+
font-size: 13px;
|
|
689
|
+
`,Ce=i.p`
|
|
690
|
+
${Lt};
|
|
691
|
+
`,Kn=i(_s)`
|
|
692
|
+
${Lt};
|
|
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(r){if(Fs(r))return a("errors.rejected");const h=(r.message??"").toLowerCase();return h.includes("insufficient")?a("cart.error.insufficient",{currency:ke.name}):h.includes("no active listing")||h.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const Nn=12e4;function Un(r){const h=[];return r.unavailable.length&&h.push(a("cart.drop.unavailable",{count:r.unavailable.length})),r.own.length&&h.push(a("cart.drop.own",{count:r.own.length})),a("cart.drop.removed",{items:h.join(` ${a("cart.drop.and")} `)})}const _e=r=>r.reduce((h,A)=>h+A.priceCredits*A.quantity,0),je=r=>r.flatMap(h=>Array.from({length:h.quantity},()=>({...h,quantity:1})));function ii(){var ht;ha({title:a("nav.cart"),noindex:!0});const r=H(t=>t.items),h=H(t=>t.remove),A=H(t=>t.increment),z=H(t=>t.decrement),_=H(t=>t.clear),X=H(t=>t.restore),Y=H(t=>t.setFittingOpen),K=pt(t=>t.items),re=pt(t=>t.toggle),{session:n,signIn:Q}=pa(),Kt=ga(),pe=Es().packs.slice(0,qs);I.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const Qt=r.some(t=>t.category!=="emote"),{data:Se}=ma({queryKey:["upsell-listings"],queryFn:()=>Ta({first:40}),staleTime:6e4}),{data:j}=xa(n),y=fa(),Z=oa(),{state:q}=ca(),[Nt,oe]=I.useState(null),[Ne,ge]=I.useState(null),[Ut,R]=I.useState(!1),[F,V]=I.useState(null),Ue=I.useRef(0),[p,k]=I.useState(null),{data:me}=ya(n),{data:ce}=ba(!0),[Me,Ge]=I.useState(""),le=I.useRef(null),He=va(r),Oe=t=>mt(He[t.id]),Te=r.filter(Oe),Ve=r.length>0&&Te.length===0,Gt=Te.reduce((t,s)=>t+s.priceCredits*s.quantity,0),Ht=r.reduce((t,s)=>t+s.quantity,0),Ot=Te.reduce((t,s)=>t+s.quantity,0),De=F?F.liveTotalCredits:Gt,Vt=new Set(r.map(t=>t.id)),Je=((Se==null?void 0:Se.items)??[]).filter(t=>!Vt.has(t.id)).slice(0,12),Dt=new Map(F==null?void 0:F.buyable.map(t=>[t.item.id,t])),xe=(j==null?void 0:j.credits)??0,Ie=De*10,Jt=ce?gt(Ie,ce):0n,Pe=Be({priceCents:Ie,priceManaWei:Jt,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:me??0n}),Xt=t=>t.flatMap(s=>{const c=Fe(s);return c.kind==="store"?[c.mint]:[]}),Yt=t=>t.flatMap(s=>s.acquisition==="trade"?[s.trade]:[]),Zt=ka,ea=t=>Sa(t.contractAddress,String(t.itemId));function fe(t){t(),V(null),ge(null),oe(null)}function ta(){k(null),R(!1)}function Xe(t){const s=_e(t),c=Math.max(0,s-xe),o=pe.find(d=>d.credits>=c)??pe[pe.length-1];Ge(o.id),D("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:s,credits_balance:xe,shortfall:c}),k({phase:"nofunds",lines:t.map(d=>({item:d.item,priceCredits:d.priceCredits,quantity:d.quantity})),shortfall:c}),R(!1)}async function Ae(t){if(!n||t.length===0)return;const s=je(t),c=s.map(x=>({...x.item,priceCredits:x.priceCredits})),o=t.map(x=>({...x.item,priceCredits:x.priceCredits,quantity:x.quantity})),d=[];let v="authorize";const m=new Set,M=new Set,L=new Set,W=[];let w=!1;k({phase:"processing",stage:"reserving",step:1,total:s.length});try{const x=[];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 yt(n.identity,g.usdCents,S,b);d.push({salt:E.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:[E],maxCreditedValue:B,chainId:g.item.chainId}:{kind:"trade",trade:g.trade,credits:[E],maxCreditedValue:B})}catch(S){if(Ws(S)){if(d.length){try{await qe(n.identity,d.map(b=>b.salt))}catch(b){ne(b,{flow:"cart_checkout",step:"release"})}y.invalidateQueries({queryKey:["usd-balance"]})}Xe(t);return}throw S}}d.length&&y.invalidateQueries({queryKey:["usd-balance"]}),v="submit";const $=Ts(x).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 T=[];if(Cs())try{const u=new Map;T=await Ps({purchases:x,buyer:n.address,signer:n.signer,onSigned:()=>G($),onBroadcast:({txHash:b,salts:E})=>{u.set(b,E),E.forEach(B=>m.add(B))}});const g=await Promise.allSettled(T.map(b=>As(b)));g.forEach((b,E)=>{const B=u.get(T[E])??[];b.status==="fulfilled"?(B.forEach(se=>M.add(se)),W.push(T[E])):b.reason instanceof Tt||B.forEach(se=>L.add(se))});const S=g.flatMap(b=>b.status==="rejected"?[b.reason]:[]);if(S.length&&!S.some(b=>b instanceof Tt))throw S[0];w=!0}catch(u){if(!(u instanceof zs)||!Ma(n.providerType))throw u;T=await Re({purchases:x,buyer:n.address,signer:n.signer,onSigned:G,onBroadcast:({salts:g})=>g.forEach(S=>m.add(S)),onSettled:({txHash:g,salts:S})=>{S.forEach(b=>M.add(b)),W.push(g)},onReverted:({salts:g})=>g.forEach(S=>L.add(S))})}else T=await Re({purchases:x,buyer:n.address,signer:n.signer,onSigned:G,onBroadcast:({salts:u})=>u.forEach(g=>m.add(g)),onSettled:({txHash:u,salts:g})=>{g.forEach(S=>M.add(S)),W.push(u)},onReverted:({salts:u})=>u.forEach(g=>L.add(g))});t.forEach(u=>h(u.item.id)),V(null),D("Shop Completed Purchase",{...be(c),payment_type:"credits",no_crypto_step:w,transaction_hash:T[0]??null}),St(y);const C=le.current;le.current=null,k(null),R(!1);const f={items:o,txHash:T[0]??void 0,txHashes:T,settled:!0,...C?{creditsAdded:C}:{}};Z("/success",{state:f,replace:!0})}catch(x){ve(x)||ne(x,{flow:"cart_checkout",step:v,cart_size:t.length});const $=new Set([...m].filter(f=>!L.has(f))),{toRelease:N,boughtItemIds:U}=It({reservations:d,spent:$,settled:M}),G=[...$].some(f=>!M.has(f)),T=c.filter(f=>U.includes(f.id)),C=c.filter(f=>!U.includes(f.id));if(D(ve(x)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:v,error_code:bt(x),value_usd:xt(C.reduce((f,u)=>f+u.priceCredits,0)),cart_size:s.length,partial:T.length>0}),N.length)try{await qe(n.identity,N)}catch(f){ne(f,{flow:"cart_checkout",step:"release"})}if(y.invalidateQueries({queryKey:["usd-balance"]}),T.length>0){U.forEach(f=>h(f)),V(null),St(y),D("Shop Completed Purchase",{...be(T),payment_type:"credits",no_crypto_step:w,transaction_hash:W[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(x),heldCredits:G})}}function Ye(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 o={items:t,txHash:s[0]??void 0,txHashes:s,settled:!0,...c?{creditsAdded:c}:{}};Z("/success",{state:o,replace:!0})}function Ze(t,s){ve(t)||ne(t,{flow:s,step:"submit"}),D(ve(t)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:bt(t)}),k({phase:"error",message:We(t)}),R(!1)}async function aa(t,s,c){const o=vt(wt.MANAToken,s),d=vt(wt.CreditsManager,s);await Ss({auth:{kind:Ms.Allowance,contractAddress:o.address,spenderAddress:d.address,chainId:s},signer:t,requiredWei:c})}async function et(){if(ce)return ce;try{return await y.fetchQuery({queryKey:["mana-rate",ft.chainId],queryFn:()=>$a(ft.chainId),staleTime:6e4})}catch{return}}async function sa(t){const s=je(t).reduce((v,m)=>v+m.usdCents,0),o=(me??0n)>0n?await et():ce,d=o?gt(s,o):0n;return{totalCents:s,manaWei:d}}async function tt(t,s){const c=_e(t),{totalCents:o,manaWei:d}=await sa(t),v=Be({priceCents:o,priceManaWei:d,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:me??0n});if(s&&v.options.some(m=>m.method===s)){if(s==="credits"){Ae(t);return}const m=it(v,s);await st(at(s,t),m,()=>s==="mana"?void rt(t,m):void ot(t,o,d));return}if(v.options.some(m=>m.method==="mana"||m.method==="combined")){k({phase:"choose",lines:t,totalCents:o,manaWei:d}),R(!1);return}if(j!=null&&j.credits<c){Xe(t);return}Ae(t)}function ze(t){return Be({priceCents:t.totalCents,priceManaWei:t.manaWei,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:me??0n})}const[de,ye]=I.useState(null);function at(t,s){const c=new Map;for(const o of s){const d=fs(t,Fe(o));c.set(`${d.chainId}:${d.spender.toLowerCase()}`,d)}return[...c.values()]}async function st(t,s,c){const o=[];for(const{spender:d,chainId:v}of t){const m=js(v,d),M=n?await ks(m,n.address,s).catch(()=>!0):!0;$s(n==null?void 0:n.providerType,M)&&o.push(m)}if(o.length===0){c();return}R(!1),nt(o,0,c)}function nt(t,s,c){ye({auth:t[s],index:s+1,total:t.length,run:()=>s+1<t.length?nt(t,s+1,c):c()})}function it(t,s){var c;return((c=t.options.find(o=>o.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:o}=p;if(t==="credits"){Ae(s);return}const d=it(ze(p),t);st(at(t,s),d,()=>t==="mana"?void rt(s,d):void ot(s,c,o))}async function rt(t,s){if(!n||t.length===0)return;const c=je(t),o=c.map(m=>({...m.item,priceCredits:m.priceCredits})),d=t.map(m=>({...m.item,priceCredits:m.priceCredits,quantity:m.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 m=await ys({trades:Yt(c),mints:Xt(c),buyer:n.address,signer:n.signer,onSigned:v,manaWei:s});t.forEach(M=>h(M.item.id)),V(null),D("Shop Completed Purchase",{...be(o),payment_type:"mana",transaction_hash:m[0]??null}),y.invalidateQueries({queryKey:["mana-balance"]}),Ye(d,m)}catch(m){Ze(m,"buy_cart_mana")}}async function ot(t,s,c){if(!n||t.length===0)return;const o=je(t),d=o.map(w=>({...w.item,priceCredits:w.priceCredits})),v=t.map(w=>({...w.item,priceCredits:w.priceCredits,quantity:w.quantity})),m=bs(o.map(w=>w.usdCents),(j==null?void 0:j.balanceCents)??0),M=[],L=new Set,W=new Set;k({phase:"processing",stage:"reserving",step:1,total:o.length});try{const w=o.map(Fe),x=[],$=new Map,N=new Map;for(let C=0;C<o.length;C++){const f=o[C],u=w[C],g=m[C],S=vs(Math.max(0,f.usdCents-g),s,c);let b;if(g<=0)b=Mt(u,[],"0");else{k({phase:"processing",stage:"reserving",step:C+1,total:o.length});const B=f.item,{credit:se,maxCreditedValue:ra}=await yt(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);M.push({salt:se.id,itemId:B.id}),b=Mt(u,[se],ra)}const E=Is(b);$.set(E,($.get(E)??0n)+S),N.has(E)||N.set(E,x.length),x.push(b)}M.length&&y.invalidateQueries({queryKey:["usd-balance"]});for(const[C,f]of $){const u=N.get(C);u==null||f<=0n||(x[u]={...x[u],maxCreditedValue:(BigInt(x[u].maxCreditedValue)+f).toString()})}const U=[...$.values()].reduce((C,f)=>C+f,0n);await aa(n.signer,ws(w[0]),U);const G=()=>k({phase:"processing",stage:"settling",step:o.length,total:o.length});k({phase:"processing",stage:"awaiting-signature",step:o.length,total:o.length});const T=await Re({purchases:x,buyer:n.address,signer:n.signer,onSigned:G,onBroadcast:({salts:C})=>C.forEach(f=>L.add(f)),onReverted:({salts:C})=>C.forEach(f=>W.add(f))});t.forEach(C=>h(C.item.id)),V(null),D("Shop Completed Purchase",{...be(d),payment_type:"credits_and_mana",transaction_hash:T[0]??null}),y.invalidateQueries({queryKey:["mana-balance"]}),Ye(v,T)}catch(w){const{toRelease:x}=It({reservations:M,spent:new Set([...L].filter($=>!W.has($))),settled:new Set});x.length&&qe(n.identity,x).catch(()=>{}),M.length&&y.invalidateQueries({queryKey:["usd-balance"]}),Ze(w,"buy_cart_combined")}}async function ee(t){if(!n){$t({type:"cart-checkout"}),Q();return}const s=H.getState().items.filter(Oe);if(s.length===0)return;oe(null),ge(null),R(!0);const c=s.reduce((o,d)=>o+d.priceCredits*d.quantity,0);D("Shop Started Checkout",{cart_size:s.length,cart_value_credits:c,cart_value_usd:xt(c),has_sufficient_credits:xe>=c});try{const o=await Bs(s,n.address,Zt,await et(),ea),d=[...o.unavailable,...o.own];if(d.length&&(d.forEach(v=>h(v.id)),ge(Un(o))),o.buyable.length===0){oe(a("cart.error.noneAvailable")),V(null);return}if(o.orderChanged){V(o),Ue.current=Date.now();return}await tt(o.buyable,t)}catch(o){ne(o,{flow:"cart_checkout",step:"review",cart_size:s.length}),oe(We(o))}finally{R(!1)}}async function ct(){if(F){if(!n){$t({type:"cart-checkout"}),Q();return}if(Date.now()-Ue.current>Nn){V(null),ge(null),await ee();return}oe(null),tt(F.buyable)}}async function ia(){if(Me){try{sessionStorage.setItem(we,JSON.stringify(H.getState().items))}catch{}R(!0);try{const t=await Rs(Me,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(we)}catch{}ne(t,{flow:"cart_buy_credits"}),k({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{R(!1)}}}const lt=I.useRef(!1);I.useEffect(()=>{if(!n||lt.current||!ps("cart-checkout"))return;lt.current=!0;const t=setTimeout(()=>void ee(),0);return()=>clearTimeout(t)},[n]);const dt=I.useRef(!1);I.useEffect(()=>{if(!(q!=null&&q.resumeCheckout)||dt.current)return;dt.current=!0,le.current=q.creditsAdded??null;try{const s=sessionStorage.getItem(we);if(s){sessionStorage.removeItem(we);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 ut=I.useRef(!1);I.useEffect(()=>{if(!(q!=null&&q.startCheckout)||ut.current)return;ut.current=!0,Z(".",{replace:!0,state:null});const t=setTimeout(()=>void ee(),0);return()=>clearTimeout(t)},[q==null?void 0:q.startCheckout]);const te=Ut||(p==null?void 0:p.phase)==="processing";return r.length===0&&!p?e.jsx(Pt,{children:e.jsxs(zt,{children:[e.jsxs(At,{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(Pt,{children:[e.jsxs(zt,{children:[e.jsxs(At,{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:Ht})}),Qt?e.jsxs(cn,{onClick:()=>Y(!0),disabled:te,children:[e.jsx(O,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),e.jsxs(Ft,{children:[e.jsx(ln,{children:r.map(t=>{const s=Dt.get(t.id),c=s?s.priceCredits:t.priceCredits,o=!!s&&s.priceCredits!==t.priceCredits,d=!t.tokenId,v=t.quantity,m=typeof t.available=="number"&&v>=t.available,M=c*v,L=wa(t),W=!!L&&!!K[L],w=Ca(t),x=He[t.id],$=!mt(x),N=x==="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,Kt&&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(Et,{onClick:()=>fe(()=>z(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(Et,{onClick:()=>fe(()=>A(t.id)),disabled:te||m,"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,{})," ",M,o?e.jsx(kn,{children:t.priceCredits*v}):null]})]})})]}),e.jsxs($n,{children:[L?e.jsx(Pn,{"data-on":W||void 0,onClick:()=>re(t),"aria-label":W?a("cart.removeFromFavorites",{name:t.name}):a("cart.addToFavorites",{name:t.name}),title:W?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:e.jsx(O,{name:W?"heart-solid":"heart"})}):null,e.jsx(An,{onClick:()=>fe(()=>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:()=>fe(_),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:Ot})}),e.jsx(_n,{children:e.jsxs(Wn,{children:[e.jsx(Ln,{})," ",De]})})]}),e.jsx(Bt,{options:Pe.options,totalCents:Ie,shortfall:Pe.manaShortfall,showCreditsAmount:!1,creditsLabel:F?a("marketCheckout.confirmPurchase"):Pe.options.length>1?a("cart.buyWithCredits"):a("cart.checkout"),busy:te||Ve,onPay:t=>void(F?ct():ee(t)),creditsFallback:{label:te?a("cart.working"):F?a("marketCheckout.confirmPurchase"):a("cart.checkout"),onClick:()=>void(F?ct():ee())}}),Ve?e.jsx(Ce,{className:"muted",children:a("cart.allUnavailable")}):null,n?null:e.jsx(Ce,{className:"muted",children:a("cart.signInHint")}),F?e.jsx(Ce,{className:"muted",children:a("cart.priceChanged")}):null,Ne?e.jsx(Ce,{className:"muted",children:Ne}):null,e.jsx(Kn,{message:Nt})]})]})]})]}),Je.length>0?e.jsx(Qn,{children:e.jsx(gs,{title:a("cart.youMightAlsoLike"),items:Je})}):null,de&&n?e.jsx(ms,{auth:de.auth,signer:n.signer,step:{index:de.index,total:de.total},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}=de;ye(null),t()},onCancel:()=>ye(null),onClose:()=>ye(null)}):null,p?e.jsx(Os,{phase:p.phase,balanceCredits:xe,heldCreditsCount:((ht=j==null?void 0:j.held)==null?void 0:ht.credits)??null,onClose:ta,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"?ze(p).options:void 0,shortfall:p.phase==="choose"?ze(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"?_e(p.lines):void 0,lines:p.phase==="nofunds"?p.lines:void 0,shortfallCredits:p.phase==="nofunds"?p.shortfall:void 0,packs:pe,selectedPack:Me,onSelectPack:Ge,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};
|