@dcl/shop 0.1.0-30612955316.commit-0d9b744 → 0.1.0-30633401379.commit-5cd1c31
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-BHKoZZp5.js +291 -0
- package/assets/{AnimatedBackground-DTgtqP8R.js → AnimatedBackground-BlD5oHcR.js} +2 -2
- package/assets/{Assets-B9KXwYG0.js → Assets-DUKvbfgo.js} +7 -7
- package/assets/{Assets.styles-Dm_MgfhY.js → Assets.styles-BLCNmjO6.js} +1 -1
- package/assets/{Authorizations--gatNHIW.js → Authorizations-6n5FWz0U.js} +1 -1
- package/assets/Cart-D7ktjzZK.js +695 -0
- package/assets/{CircularProgress-BRaMu2HF.js → CircularProgress-CMZVAt1l.js} +1 -1
- package/assets/{Collection-BIR5xrVe.js → Collection-CQps3SAa.js} +1 -1
- package/assets/{CollectionCarousel-oh8d08gi.js → CollectionCarousel-CrTrsXB-.js} +1 -1
- package/assets/{Creator-jKJMNfvf.js → Creator-DeBO0_hP.js} +2 -2
- package/assets/{ErrorNotice-C2qBxBzo.js → ErrorNotice-DwhdhAu6.js} +1 -1
- package/assets/{ExchangeController-BJ20Rri0.js → ExchangeController-DFaPYxag.js} +1 -1
- package/assets/{GetCredits-DWkdHCSk.js → GetCredits-CH0SxGoe.js} +8 -8
- package/assets/{HelpersUtil-Bc_-rYa4.js → HelpersUtil-CGxvruiS.js} +1 -1
- package/assets/{ImportListings-C61E-WD4.js → ImportListings-D3Q-MYHt.js} +8 -8
- package/assets/{ItemDetail-BFNeFxLh.js → ItemDetail-grsXVByw.js} +3 -3
- package/assets/{LoadMore-BI2cyij4.js → LoadMore-CVBNO6CV.js} +1 -1
- package/assets/{MenuList-CsoSKANx.js → MenuList-D5vC383J.js} +1 -1
- package/assets/{MyAssets-B8jlwAvA.js → MyAssets-B4-suVif.js} +1 -1
- package/assets/{MyFavorites-B6kCgq1h.js → MyFavorites-rQde9LEq.js} +1 -1
- package/assets/{NotFound-CWtlpg63.js → NotFound-CICAlcY2.js} +1 -1
- package/assets/{NotificationsBell-wPKuEs_b.js → NotificationsBell-BcUtKYE_.js} +1 -1
- package/assets/{StoreSettings-BW2EY9gn.js → StoreSettings-D-p-KMUm.js} +1 -1
- package/assets/Success-CKUShs2s.js +276 -0
- package/assets/{SwapController-DHr7xvAI.js → SwapController-BqpEkXCy.js} +1 -1
- package/assets/{Tooltip-DFmfpHxa.js → Tooltip-v8d4_GhH.js} +1 -1
- package/assets/{TradeService-BxS-ssTi.js → TradeService-CMvEMasH.js} +1 -1
- package/assets/{W3MFrameProviderSingleton-D3RatyJZ.js → W3MFrameProviderSingleton-MrB8u6EW.js} +3 -3
- package/assets/{WebCryptoP256-DLlMYv1t.js → WebCryptoP256-CP0xBKi2.js} +1 -1
- package/assets/{authorizations-BrAVsIY_.js → authorizations-uQp0Tner.js} +1 -1
- package/assets/{basic-B1iPuZqz.js → basic-B_OSMlWi.js} +1 -1
- package/assets/{biconomy-CReC5_o1.js → biconomy-DrNdbDOV.js} +1 -1
- package/assets/{browseLayout.styles-Ck-h2OX5.js → browseLayout.styles-B5gAAnD7.js} +5 -5
- package/assets/{builder-BW_vsdgs.js → builder-BH8bW8w3.js} +1 -1
- package/assets/buy-DI2htlf2.js +1 -0
- package/assets/{buy-gasless-DoEdxK3L.js → buy-gasless-D3ucK012.js} +1 -1
- package/assets/{categories-P1zgLmzy.js → categories-CUWn-vWY.js} +1 -1
- package/assets/{ccip-BHjcKqJV.js → ccip-D4QJIvrM.js} +1 -1
- package/assets/{ccip-CZBbVQi3.js → ccip-zHeTh1U3.js} +1 -1
- package/assets/{clsx-DhFqZi_3.js → clsx-C78Se7VZ.js} +2 -2
- package/assets/{controller-DGy85CgR.js → controller-BICwQmay.js} +2 -2
- package/assets/{core-Db5S1VHS.js → core-BpePoapT.js} +4 -4
- package/assets/{createSvgIcon-DLpGC0um.js → createSvgIcon-D6bh0MrS.js} +3 -3
- package/assets/{custom-ClweN61f.js → custom-DIlU15wg.js} +1 -1
- package/assets/{data-capture-z84EsTtU.js → data-capture-DF5W_J8T.js} +1 -1
- package/assets/{email-CcLkWyvu.js → email-CLMX01kZ.js} +1 -1
- package/assets/{embedded-wallet-COy2jXd-.js → embedded-wallet-CbYQTubx.js} +1 -1
- package/assets/{emotion-styled.browser.esm-Bl0xNQms.js → emotion-styled.browser.esm-uimCutsp.js} +1 -1
- package/assets/{engine-D5VFTt2U.js → engine-Bobn5NnI.js} +1 -1
- package/assets/{errors-D660SWgT.js → errors-BHapDldI.js} +1 -1
- package/assets/{estimate-l1-fee-D0AZXU9d.js → estimate-l1-fee-Zo4D8zNV.js} +1 -1
- package/assets/{execute-B7xe5F3I.js → execute-B3koRsQT.js} +2 -2
- package/assets/{features-CDbo6Rgb.js → features-29eUittk.js} +1 -1
- package/assets/{fetchTokenMetadata-CTdt9CEd.js → fetchTokenMetadata-BVVFFsly.js} +2 -2
- package/assets/{get-ecosystem-wallet-info-DSZkSx4X.js → get-ecosystem-wallet-info-Fbs6oNmw.js} +1 -1
- package/assets/{getBalance-BDX5XOeM.js → getBalance-BynOYuPH.js} +1 -1
- package/assets/{getNFT-CVs2H6Tl.js → getNFT-C7BU-05F.js} +1 -1
- package/assets/{getNFT-DINbSeyy.js → getNFT-CHPhy1te.js} +1 -1
- package/assets/{getThemeProps-CGtqDWEq.js → getThemeProps-BCb3jyqf.js} +1 -1
- package/assets/{grid.styles-D4B-EHGj.js → grid.styles-CFlLjGWA.js} +1 -1
- package/assets/{hashTypedData-Dz79Rf5q.js → hashTypedData-BmEKHoZL.js} +1 -1
- package/assets/{hashTypedData-B7lV4LZj.js → hashTypedData-CixGH523.js} +1 -1
- package/assets/{import-DSm0v4af.js → import-xE4hDmDm.js} +1 -1
- package/assets/{in-app-C5pWpM6r.js → in-app-BcKmOV8m.js} +1 -1
- package/assets/{in-app-wallet-calls-DXx7lWeR.js → in-app-wallet-calls-BI1PaW_x.js} +1 -1
- package/assets/{index-ODLNljC7.js → index-9WfG_CLW.js} +1 -1
- package/assets/{index-CJgXTNhS.js → index-ASq7s2Iv.js} +2 -2
- package/assets/{index-BobbFiKW.js → index-B0eTctvC.js} +1 -1
- package/assets/{index-D7R57an8.js → index-B439DG-9.js} +2 -2
- package/assets/{index-BZocXWA4.js → index-BAORCNZn.js} +1 -1
- package/assets/{index-G1xB9dvf.js → index-BFzvJeyM.js} +1 -1
- package/assets/{index-Cl-v7TvL.js → index-BHVh9ZD-.js} +1 -1
- package/assets/{index-yJi2QIJf.js → index-BMIuNfCB.js} +252 -252
- package/assets/{index-CZTqkynu.js → index-BTOrBWcS.js} +1 -1
- package/assets/{index-b_a6Xe2g.js → index-BUo3wAlN.js} +3 -3
- package/assets/{index-1koyBXBc.js → index-Bb9TuCMN.js} +1 -1
- package/assets/{index-B81PeozV.js → index-BdDw5syJ.js} +1 -1
- package/assets/{index-xZ3i_Adn.js → index-Bdx6vg6T.js} +1 -1
- package/assets/{index-tdQJ2A6x.js → index-Bler0kM4.js} +1 -1
- package/assets/{index-3ZTohoUZ.js → index-C7EZCMfv.js} +1 -1
- package/assets/{index-BBkUTtNV.js → index-CG3EVA6i.js} +2 -2
- package/assets/{index-P_XHlb3T.js → index-CP0MJS3n.js} +1 -1
- package/assets/{index-frQRdZ2q.js → index-CSzz0-yL.js} +1 -1
- package/assets/{index-BFSsZJPW.js → index-CY9EBgzo.js} +1 -1
- package/assets/{index-DiOmLLPI.js → index-CgOcSf2Q.js} +1 -1
- package/assets/{index-CdsKR_zs.js → index-CkfB4xYf.js} +1 -1
- package/assets/{index-CZ1tNVf6.js → index-CpKxcKSt.js} +1 -1
- package/assets/{index-B8zb5Fyq.js → index-CsCFxm9l.js} +1 -1
- package/assets/{index-DZg10nMY.js → index-CugdcJ5p.js} +1 -1
- package/assets/{index-gKwUmrp3.js → index-CvuWb2er.js} +1 -1
- package/assets/{index-BgoikptS.js → index-D-jdrajA.js} +1 -1
- package/assets/{index-DfTLbDYm.js → index-D6z3Iok7.js} +1 -1
- package/assets/{index-DQ2sE8uD.js → index-DA1IdQid.js} +1 -1
- package/assets/{index-DMjEzVVJ.js → index-DCUYsq3Z.js} +1 -1
- package/assets/{index-1c_qW8yi.js → index-DI-G5L8D.js} +1 -1
- package/assets/{index-C0LSKXhw.js → index-DJGQazF5.js} +1 -1
- package/assets/{index-C0odNd_G.js → index-DNLfbOQJ.js} +1 -1
- package/assets/{index-CuPPMOVj.js → index-DfVobYmm.js} +1 -1
- package/assets/{index-C-C5pEJc.js → index-DmnyvmGd.js} +1 -1
- package/assets/{index-CpqhaC2H.js → index-DpjOr79p.js} +1 -1
- package/assets/{index-DjbRx8bI.js → index-DzCJVhsv.js} +1 -1
- package/assets/{index-CXntdDwE.js → index-Eco3bQ72.js} +2 -2
- package/assets/{index-CwVjvkdk.js → index-FvB9JTSh.js} +1 -1
- package/assets/{index-DU8_EWWx.js → index-H02HAhZo.js} +1 -1
- package/assets/{index-CzByZQWv.js → index-LL0BV6rh.js} +1 -1
- package/assets/{index-CLBmEx6A.js → index-MsJgZMgr.js} +3 -3
- package/assets/{index-Dr4K4hFL.js → index-R3pS6x6y.js} +3 -3
- package/assets/{index-CX5Ekh69.js → index-dXYc2QRl.js} +1 -1
- package/assets/{index-CkBDyoGg.js → index-hwCoxi9L.js} +1 -1
- package/assets/{index-BJ-25Q5l.js → index-ldblNYIT.js} +1 -1
- package/assets/{index-CbITlqFn.js → index-n-ShiY2h.js} +1 -1
- package/assets/{index-DIR4uPmO.js → index-oFYHMIzO.js} +1 -1
- package/assets/{index-Cw6mXTIQ.js → index-rFh28dtY.js} +1 -1
- package/assets/{index-CKEG3W2m.js → index-wfubccp5.js} +1 -1
- package/assets/{index-Dw4Gh8Hk.js → index-wnx7vlu-.js} +2 -2
- package/assets/{index-NPIY1Vbs.js → index-xk15qzPN.js} +1 -1
- package/assets/{index.es-CdLNKigl.js → index.es-BEVmNmLD.js} +4 -4
- package/assets/{index.es-CZz1nBev.js → index.es-BPA6fTzR.js} +1 -1
- package/assets/{index.es-CeoIh9-h.js → index.es-BW6RduBG.js} +1 -1
- package/assets/{localBatchGatewayRequest-Dbz593U8.js → localBatchGatewayRequest-C2eNLm--.js} +1 -1
- package/assets/{mana-convert-DTic_WF4.js → mana-convert-C341n1xm.js} +1 -1
- package/assets/{mana-rate-DTd_zYK_.js → mana-rate-BAPBwbaG.js} +1 -1
- package/assets/{networks-D-WgnPJO.js → networks-gEGHz8eL.js} +1 -1
- package/assets/{onramp-CxZE_awn.js → onramp-DHcILVIp.js} +1 -1
- package/assets/{openzeppelin-BicG6fZ-.js → openzeppelin-BvSgRich.js} +1 -1
- package/assets/{parseNft-crNNmDcM.js → parseNft-DrAu-xVe.js} +2 -2
- package/assets/{parseSignature-xro4_AeM.js → parseSignature--WNVOXAe.js} +3 -3
- package/assets/{parseSignature-TUf4MZpE.js → parseSignature-BlmIeeL7.js} +1 -1
- package/assets/{passkeys-DlsWo5hj.js → passkeys-BD41PpMD.js} +1 -1
- package/assets/{pay-with-exchange-uJFVzJz2.js → pay-with-exchange-DCmtfnr1.js} +1 -1
- package/assets/{qr-overlay-D1DRCZeg.js → qr-overlay-DYViFXBB.js} +1 -1
- package/assets/{receive-jEtfcBkz.js → receive-LPMbYHZa.js} +1 -1
- package/assets/{resolveImplementation-Dfr_x2D4.js → resolveImplementation-CdVPuboc.js} +1 -1
- package/assets/{rpc-HxGwRhjl.js → rpc-D2C2velX.js} +1 -1
- package/assets/{secp256k1-BeCdbOwL.js → secp256k1-DLPIWcy9.js} +1 -1
- package/assets/{secp256k1-Bmo0zLoN.js → secp256k1-DtCfsIY0.js} +1 -1
- package/assets/{secp256k1-CPsxfMTn.js → secp256k1-KqMjq-B-.js} +1 -1
- package/assets/{send-SCYWhWgO.js → send-BYANl3m1.js} +1 -1
- package/assets/{send-batch-transaction-ClJpcx_r.js → send-batch-transaction-BHqPVqqQ.js} +1 -1
- package/assets/{send-eip712-transaction-DCKQGfPC.js → send-eip712-transaction-D3zsFnZJ.js} +2 -2
- package/assets/{send-gasless-transaction-C6PqTuT4.js → send-gasless-transaction-Db4a0n6K.js} +2 -2
- package/assets/{send-transaction-DCRA_QBx.js → send-transaction-0fPTuVE4.js} +2 -2
- package/assets/{sendMetaTransaction-BOtIj1YL.js → sendMetaTransaction-DAsHliEn.js} +1 -1
- package/assets/{sendRawTransaction-BkrUK6tH.js → sendRawTransaction-B5IMe5Y5.js} +3 -3
- package/assets/{serializeTransaction-bVNzq6Wv.js → serializeTransaction-BT9LeH0D.js} +1 -1
- package/assets/{session-proposal-BwFRVt7g.js → session-proposal-plO_EjqI.js} +1 -1
- package/assets/{session-request-4TbdsxSC.js → session-request-DTauixOT.js} +2 -2
- package/assets/{signing-BxAbixw6.js → signing-BKT41maQ.js} +3 -3
- package/assets/{socials-B5zVEegD.js → socials-BPcwRKMp.js} +1 -1
- package/assets/{swaps-DQ1LcBTU.js → swaps-DddX0hWZ.js} +1 -1
- package/assets/{thirdweb-r2nvH1Ph.js → thirdweb-DI1D_9ce.js} +3 -3
- package/assets/{to-serializable-transaction-DMc2E6fk.js → to-serializable-transaction-BZX746C8.js} +2 -2
- package/assets/trade-encoding-CK5EArKF.js +1 -0
- package/assets/{transactionReceipt-DFdTIN3F.js → transactionReceipt-2D5Q3zvv.js} +1 -1
- package/assets/{transactions-DnRd57Kk.js → transactions-DtbDwrsO.js} +1 -1
- package/assets/useCreditPacks-Dw0jIjQE.js +1 -0
- package/assets/{useInfiniteGrid-CDkGdzFf.js → useInfiniteGrid-Xjfvrq_T.js} +1 -1
- package/assets/useManaRate-BEVwu7Q9.js +1 -0
- package/assets/{useSecondarySales-BLnZD7gi.js → useSecondarySales-bajhgse5.js} +1 -1
- package/assets/{useStore-Dt337zVA.js → useStore-CIqjcPjh.js} +1 -1
- package/assets/{useTheme-DlRIY8zD.js → useTheme-DVSXpYGO.js} +1 -1
- package/assets/{verifyHash-D8nhWUT9.js → verifyHash-DmL5gbPk.js} +1 -1
- package/assets/{w3m-modal-Z-IBP9yL.js → w3m-modal-B2N-eyv6.js} +1 -1
- package/assets/{w3m-modal-D1mPkWGM.js → w3m-modal-CfZXCvPG.js} +1 -1
- package/assets/{wait-for-tx-receipt-8bgpdxSo.js → wait-for-tx-receipt-BEDrW5cD.js} +1 -1
- package/assets/{wallets-BTh4qQ9L.js → wallets-DQk0dtw_.js} +5 -5
- package/assets/{web-connector-DXtL7d_s.js → web-connector-2N1NjIJ4.js} +3 -3
- package/assets/{writeContract-B7vnLdJy.js → writeContract-BZemjhP4.js} +1 -1
- package/assets/{zoraTestnet-kFdaoH4G.js → zoraTestnet-BK5x9nJO.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/assets/Activity-BF3WNwMh.js +0 -291
- package/assets/Cart-Cs0FD0IN.js +0 -695
- package/assets/Success-CTKJzQjE.js +0 -276
- package/assets/buy-DLi3_94e.js +0 -1
- package/assets/trade-encoding-BFXwI1r3.js +0 -1
- package/assets/useCreditPacks-DnQLmQo7.js +0 -1
- package/assets/useManaRate-DwO6H8fK.js +0 -1
package/assets/Cart-Cs0FD0IN.js
DELETED
|
@@ -1,695 +0,0 @@
|
|
|
1
|
-
import{j as e,L as ge,r as S,b as Rt,a as Wt}from"./react-vyZjIDcS.js";import{t as Z,s as i,e as a,J as X,aj as Ft,G as Lt,I as _,z as ut,H as Pe,m as Kt,ak as q,Q as Ye,n as Nt,u as Qt,al as Ut,E as Ot,am as Ht,an as Vt,ao as Gt,ap as Dt,y as Yt,aq as Je,ar as N,as as Xe,at as Jt,l as V,c as Ze,h as Xt,au as et,av as je,aw as ke,ax as oe,ay as tt,a as ce,b as Zt,C as $e,az as ea}from"./index-yJi2QIJf.js";import{M as ta,S as aa,C as sa,H as na,a as ia,T as ra,X as oa,b as ca,B as la,c as da,d as at,e as ua,f as he,P as ht,m as ha,g as pa,h as ga,i as xa,j as pt,k as pe,L as ma,l as fa,n as st,o as nt,W as ya,p as ba,q as va,A as Ca,r as wa,s as ja,t as ka,u as $a,v as Sa,w as Ma,x as Ta,y as za,z as Pa,D as Aa,E as Ia,F as qa,G as _a,I as Ba,J as Ea,K as Se,N as Ra,O as Wa,Q as Fa,R as La,U as it,V as Ka,Y as Na,Z as Qa,_ as Ua}from"./CollectionCarousel-oh8d08gi.js";import{u as Oa}from"./useManaRate-DwO6H8fK.js";import{r as Ha}from"./mana-rate-DTd_zYK_.js";import{i as Va,j as Ga,f as Da,n as Ya,h as Ja,A as Xa}from"./authorizations-BrAVsIY_.js";import{b as Me}from"./buy-DLi3_94e.js";import{b as Za,w as es,S as ts,G as as}from"./buy-gasless-DoEdxK3L.js";import{u as ss,M as ns,R as le,r as is,c as rs}from"./useCreditPacks-DnQLmQo7.js";import{i as os,a as cs}from"./errors-D660SWgT.js";import{E as ls}from"./ErrorNotice-C2qBxBzo.js";import{u as rt}from"./mana-convert-DTic_WF4.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CXBJm_wN.js";import"./intl-CBcMB1D2.js";import"./trade-encoding-BFXwI1r3.js";import"./sendMetaTransaction-BOtIj1YL.js";const{colors:G,radius:ds}=Z,us=i.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
justify-content: center;
|
|
5
|
-
gap: 8px;
|
|
6
|
-
width: 100%;
|
|
7
|
-
`,hs=i.span`
|
|
8
|
-
font-size: 16px;
|
|
9
|
-
line-height: 22px;
|
|
10
|
-
color: ${G.text2};
|
|
11
|
-
text-transform: capitalize;
|
|
12
|
-
white-space: nowrap;
|
|
13
|
-
`,ps=i.div`
|
|
14
|
-
display: flex;
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
gap: 8px;
|
|
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 ${G.media};
|
|
27
|
-
|
|
28
|
-
&::-webkit-scrollbar {
|
|
29
|
-
width: 8px;
|
|
30
|
-
}
|
|
31
|
-
&::-webkit-scrollbar-track {
|
|
32
|
-
background: ${G.media};
|
|
33
|
-
border-radius: 10px;
|
|
34
|
-
}
|
|
35
|
-
&::-webkit-scrollbar-thumb {
|
|
36
|
-
background: #a2a2a2;
|
|
37
|
-
border-radius: ${ds.btn};
|
|
38
|
-
}
|
|
39
|
-
`,gs=i.span`
|
|
40
|
-
margin-left: 8px;
|
|
41
|
-
font-size: 13px;
|
|
42
|
-
font-weight: 600;
|
|
43
|
-
color: ${G.muted};
|
|
44
|
-
`,xs=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: ${G.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: ${G.text};
|
|
60
|
-
}
|
|
61
|
-
`,ms="https://cdn.decentraland.org/@dcl/shop/0.1.0-30612955316.commit-0d9b744/assets/buy-error-22UunaPC.png";function fs(c){const{phase:d,balanceCredits:$,onClose:M}=c,B=d==="processing",W=d==="error"?a("cartCheckout.errorTitle"):d==="nofunds"?a("cartCheckout.titleNoFunds"):d==="choose"?a("buyModal.choosePayment"):a("cartCheckout.titleBuy"),F=d==="processing";return e.jsxs(ta,{role:"dialog","aria-modal":"true","aria-label":a("cartCheckout.dialogAria"),children:[e.jsx(aa,{onClick:B?void 0:M,"aria-hidden":!0}),e.jsxs(sa,{"data-tall":F||void 0,children:[e.jsxs(na,{children:[e.jsxs(ia,{children:[e.jsx(ra,{children:W}),!B&&e.jsx(oa,{onClick:M,"aria-label":a("buyModal.close"),children:e.jsx(ca,{})})]}),e.jsxs(la,{children:[e.jsx(da,{children:d==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),e.jsx(at,{}),e.jsx(ua,{children:X($)})]})]}),d==="choose"&&e.jsxs(he,{children:[e.jsxs(xs,{children:[e.jsx("span",{children:a("cart.purchaseSummary")}),e.jsxs("strong",{children:[e.jsx(at,{}),X(c.totalCredits??0)]})]}),e.jsx(ht,{options:c.options??[],totalCents:c.totalCents??0,onPay:c.onPay??(()=>{}),rateNote:(()=>{const P=ha(c.totalCents??0,c.totalManaWei??0n);return P!=null?a("buyModal.manaRate",{mana:P.toLocaleString("en",{maximumFractionDigits:2})}):null})()})]}),d==="processing"&&e.jsx(ys,{stage:c.stage??"reserving",step:c.step??1,total:c.total??1,isSelfCustody:!!c.isSelfCustody}),d==="nofunds"&&e.jsx(bs,{lines:c.lines??[],shortfallCredits:c.shortfallCredits??0,packs:c.packs??[],selectedPack:c.selectedPack??"",onSelectPack:c.onSelectPack??(()=>{}),onBuyPacks:c.onBuyPacks??(()=>{}),onCancel:M}),d==="error"&&e.jsxs(he,{children:[e.jsxs(pa,{"data-testid":"buy-error",children:[e.jsx(ga,{src:ms,alt:"",width:64,height:80}),e.jsxs(xa,{children:[e.jsx("b",{children:a("cartCheckout.errorHeadline")})," ",a("cartCheckout.errorBody")]})]}),e.jsxs(pt,{children:[e.jsx(pe,{"data-variant":"outline",onClick:M,children:a("buyModal.cancel")}),e.jsx(pe,{"data-variant":"purple",onClick:c.onRetry??M,children:a("cartCheckout.tryAgain")})]})]})]})]})}function ys({stage:c,step:d,total:$,isSelfCustody:M}){const B=c==="reserving",W=$>0?Math.min(100,Math.round(d/$*100)):0,F=c==="awaiting-signature"?M?a("buyModal.confirmToContinue"):a("buyModal.completingTransaction"):c==="settling"?a("buyModal.completingTransaction"):a("cartCheckout.preparing");return e.jsxs(he,{"data-processing":!0,children:[e.jsx(ma,{src:Ft,alt:"",width:61,height:61}),e.jsx(fa,{children:F}),B?e.jsxs(us,{children:[e.jsx(st,{"aria-hidden":!0,children:e.jsx(nt,{"data-step":!0,style:{width:`${W}%`}})}),$>1?e.jsxs(hs,{children:[d,"/",$]}):null]}):e.jsx(st,{"aria-hidden":!0,children:e.jsx(nt,{})})]})}function bs({lines:c,shortfallCredits:d,packs:$,selectedPack:M,onSelectPack:B,onBuyPacks:W,onCancel:F}){const P=$.find(n=>n.id===M),xe=c.reduce((n,I)=>n+(I.quantity??1),0);return e.jsxs(he,{children:[e.jsxs(ya,{"data-testid":"nofunds-warning",children:[e.jsx(ba,{}),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,d)})})," ",a("buyModal.warningToPurchase",{count:xe})]})]}),e.jsx(ps,{children:c.map(n=>{const I=n.quantity??1;return e.jsxs(Ca,{children:[e.jsx(wa,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsxs(ja,{children:[e.jsxs("div",{children:[e.jsxs(ka,{title:n.item.name,children:[n.item.name||a("buyModal.itemFallback"),I>1?e.jsx(gs,{children:a("cartCheckout.qty",{count:I})}):null]}),n.item.creator?e.jsx($a,{address:n.item.creator}):null]}),e.jsxs(Sa,{children:[e.jsx(Ma,{}),e.jsx("span",{children:X(n.priceCredits*I)})]})]})]},n.item.id)})}),e.jsx(Ta,{children:$.map(n=>{const I=n.id===M;return e.jsxs(za,{"data-testid":"credit-pack","data-on":I||void 0,onClick:()=>B(n.id),children:[e.jsx(Pa,{}),e.jsx(Aa,{children:X(n.credits)}),e.jsxs(Ia,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),e.jsxs(qa,{children:[e.jsxs(_a,{children:[e.jsx(Ba,{}),e.jsx("span",{children:X((P==null?void 0:P.credits)??0)})]}),e.jsxs(Ea,{children:["$",((P==null?void 0:P.usd)??0).toFixed(2)]})]}),e.jsxs(pt,{children:[e.jsx(pe,{"data-variant":"outline",onClick:F,children:a("buyModal.cancel")}),e.jsx(pe,{"data-variant":"gradient",onClick:W,children:a("buyModal.buy")})]})]})}const{colors:o,gradients:gt,radius:Q}=Z,xt="@media (max-width: 1080px)",k="@media (max-width: 880px)",ot=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
|
-
${k} {
|
|
72
|
-
padding-bottom: 188px; /* room for the fixed summary bar */
|
|
73
|
-
}
|
|
74
|
-
`,ct=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: ${o.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: ${o.accent};
|
|
92
|
-
}
|
|
93
|
-
& .ico {
|
|
94
|
-
width: 18px;
|
|
95
|
-
height: 18px;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
${k} {
|
|
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
|
-
${xt} {
|
|
108
|
-
grid-template-columns: 1fr;
|
|
109
|
-
}
|
|
110
|
-
`,lt=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
|
-
|
|
118
|
-
${k} {
|
|
119
|
-
/* The single-column layout is already taller than the desktop band, and the fixed summary bar sits over
|
|
120
|
-
the bottom of it — a floor here would only add empty gray. */
|
|
121
|
-
min-height: 0;
|
|
122
|
-
}
|
|
123
|
-
`,Cs=i.div`
|
|
124
|
-
min-width: 0;
|
|
125
|
-
display: flex;
|
|
126
|
-
flex-direction: column;
|
|
127
|
-
gap: 12px;
|
|
128
|
-
`,ws=i.div`
|
|
129
|
-
display: flex;
|
|
130
|
-
align-items: center;
|
|
131
|
-
justify-content: space-between;
|
|
132
|
-
gap: 12px;
|
|
133
|
-
background: ${o.white};
|
|
134
|
-
border-radius: 16px;
|
|
135
|
-
padding: 12px 12px 12px 24px;
|
|
136
|
-
|
|
137
|
-
${k} {
|
|
138
|
-
gap: 8px;
|
|
139
|
-
padding: 12px;
|
|
140
|
-
}
|
|
141
|
-
`,mt=i.section`
|
|
142
|
-
min-width: 0;
|
|
143
|
-
background: ${o.white};
|
|
144
|
-
border-radius: 16px;
|
|
145
|
-
padding: 24px;
|
|
146
|
-
|
|
147
|
-
${k} {
|
|
148
|
-
padding: 16px;
|
|
149
|
-
}
|
|
150
|
-
`,js=i(mt)`
|
|
151
|
-
display: flex;
|
|
152
|
-
flex-direction: column;
|
|
153
|
-
align-items: center;
|
|
154
|
-
justify-content: center;
|
|
155
|
-
gap: 24px;
|
|
156
|
-
min-height: 420px;
|
|
157
|
-
padding: 48px 16px;
|
|
158
|
-
text-align: center;
|
|
159
|
-
color: ${o.text};
|
|
160
|
-
|
|
161
|
-
${Z.media.maxWidth("mobile")} {
|
|
162
|
-
min-height: 320px;
|
|
163
|
-
padding: 32px 16px;
|
|
164
|
-
}
|
|
165
|
-
`,ks=i.div`
|
|
166
|
-
display: flex;
|
|
167
|
-
flex-direction: column;
|
|
168
|
-
align-items: center;
|
|
169
|
-
gap: 12px;
|
|
170
|
-
padding-bottom: 16px;
|
|
171
|
-
`,$s=i.p`
|
|
172
|
-
margin: 0;
|
|
173
|
-
font-size: 24px;
|
|
174
|
-
font-weight: 700;
|
|
175
|
-
line-height: 1.6;
|
|
176
|
-
|
|
177
|
-
${Z.media.maxWidth("mobile")} {
|
|
178
|
-
font-size: 20px;
|
|
179
|
-
}
|
|
180
|
-
`,Ss=i.p`
|
|
181
|
-
margin: 0;
|
|
182
|
-
font-size: 20px;
|
|
183
|
-
font-weight: 400;
|
|
184
|
-
line-height: 1.6;
|
|
185
|
-
|
|
186
|
-
${Z.media.maxWidth("mobile")} {
|
|
187
|
-
font-size: 16px;
|
|
188
|
-
}
|
|
189
|
-
`,Ms=i(ge)`
|
|
190
|
-
display: inline-flex;
|
|
191
|
-
align-items: center;
|
|
192
|
-
justify-content: center;
|
|
193
|
-
width: 310px;
|
|
194
|
-
max-width: 100%;
|
|
195
|
-
height: 56px;
|
|
196
|
-
padding: 0 12px;
|
|
197
|
-
border-radius: ${Q.card};
|
|
198
|
-
background: ${o.accent};
|
|
199
|
-
color: ${o.softWhite};
|
|
200
|
-
font-size: 15px;
|
|
201
|
-
font-weight: 600;
|
|
202
|
-
line-height: 24px;
|
|
203
|
-
letter-spacing: 0.46px;
|
|
204
|
-
text-transform: uppercase;
|
|
205
|
-
text-decoration: none;
|
|
206
|
-
transition: background 0.15s ease;
|
|
207
|
-
|
|
208
|
-
&:hover {
|
|
209
|
-
background: ${o.accentHover};
|
|
210
|
-
}
|
|
211
|
-
&:focus-visible {
|
|
212
|
-
outline: 2px solid ${o.accent};
|
|
213
|
-
outline-offset: 2px;
|
|
214
|
-
}
|
|
215
|
-
`,Ts=i.button`
|
|
216
|
-
display: none;
|
|
217
|
-
|
|
218
|
-
${k} {
|
|
219
|
-
display: inline-flex;
|
|
220
|
-
align-items: center;
|
|
221
|
-
flex-shrink: 0;
|
|
222
|
-
border: 0;
|
|
223
|
-
background: none;
|
|
224
|
-
padding: 0;
|
|
225
|
-
color: ${o.text};
|
|
226
|
-
cursor: pointer;
|
|
227
|
-
|
|
228
|
-
& .ico {
|
|
229
|
-
width: 20px;
|
|
230
|
-
height: 20px;
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
`,zs=i.h1`
|
|
234
|
-
margin: 0;
|
|
235
|
-
font-size: 14px;
|
|
236
|
-
font-weight: 600;
|
|
237
|
-
line-height: 1.57;
|
|
238
|
-
color: ${o.text};
|
|
239
|
-
|
|
240
|
-
${k} {
|
|
241
|
-
flex: 1;
|
|
242
|
-
min-width: 0;
|
|
243
|
-
font-size: 16px;
|
|
244
|
-
}
|
|
245
|
-
`,Ps=i.button`
|
|
246
|
-
display: inline-flex;
|
|
247
|
-
align-items: center;
|
|
248
|
-
justify-content: center;
|
|
249
|
-
gap: 8px;
|
|
250
|
-
height: 40px;
|
|
251
|
-
padding: 0 12px;
|
|
252
|
-
border: 2px solid transparent;
|
|
253
|
-
border-radius: ${Q.btn};
|
|
254
|
-
background:
|
|
255
|
-
linear-gradient(${o.white}, ${o.white}) padding-box,
|
|
256
|
-
${gt.amethyst} border-box;
|
|
257
|
-
color: ${o.accent};
|
|
258
|
-
font-size: 13px;
|
|
259
|
-
font-weight: 600;
|
|
260
|
-
line-height: 24px;
|
|
261
|
-
letter-spacing: 0.46px;
|
|
262
|
-
text-transform: uppercase;
|
|
263
|
-
white-space: nowrap;
|
|
264
|
-
cursor: pointer;
|
|
265
|
-
transition:
|
|
266
|
-
box-shadow 0.15s ease,
|
|
267
|
-
filter 0.15s ease;
|
|
268
|
-
|
|
269
|
-
&:hover:not(:disabled) {
|
|
270
|
-
box-shadow: 0 0 8px 0 rgba(165, 36, 179, 0.35);
|
|
271
|
-
}
|
|
272
|
-
&:active:not(:disabled) {
|
|
273
|
-
filter: brightness(0.97);
|
|
274
|
-
}
|
|
275
|
-
&:disabled {
|
|
276
|
-
opacity: 0.55;
|
|
277
|
-
cursor: default;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
${k} {
|
|
281
|
-
height: 36px;
|
|
282
|
-
padding: 0 10px;
|
|
283
|
-
font-size: 12px;
|
|
284
|
-
}
|
|
285
|
-
`,As=i.div`
|
|
286
|
-
display: flex;
|
|
287
|
-
flex-direction: column;
|
|
288
|
-
gap: 24px;
|
|
289
|
-
`,Is=i.div`
|
|
290
|
-
position: relative;
|
|
291
|
-
display: flex;
|
|
292
|
-
align-items: stretch;
|
|
293
|
-
gap: 12px;
|
|
294
|
-
background: ${o.white};
|
|
295
|
-
border: 1px solid ${o.gray4};
|
|
296
|
-
border-radius: ${Q.card};
|
|
297
|
-
overflow: hidden;
|
|
298
|
-
|
|
299
|
-
&[data-unavailable] [data-thumb] {
|
|
300
|
-
opacity: 0.5;
|
|
301
|
-
}
|
|
302
|
-
&[data-unavailable] [data-check] {
|
|
303
|
-
display: none;
|
|
304
|
-
}
|
|
305
|
-
&[data-unavailable] [data-desc] {
|
|
306
|
-
opacity: 0.7;
|
|
307
|
-
}
|
|
308
|
-
`,qs=i.div`
|
|
309
|
-
position: relative;
|
|
310
|
-
flex-shrink: 0;
|
|
311
|
-
width: 137.5px;
|
|
312
|
-
height: 137px;
|
|
313
|
-
background: ${o.media};
|
|
314
|
-
border-radius: ${Q.card};
|
|
315
|
-
display: grid;
|
|
316
|
-
place-items: center;
|
|
317
|
-
overflow: hidden;
|
|
318
|
-
|
|
319
|
-
& img {
|
|
320
|
-
width: 83%;
|
|
321
|
-
height: 83%;
|
|
322
|
-
object-fit: contain;
|
|
323
|
-
filter: drop-shadow(0.56px 2.25px 2.8px rgba(0, 0, 0, 0.1));
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
${k} {
|
|
327
|
-
width: 120px;
|
|
328
|
-
height: 120px;
|
|
329
|
-
}
|
|
330
|
-
`,_s=i(ge)`
|
|
331
|
-
position: absolute;
|
|
332
|
-
inset: 0;
|
|
333
|
-
display: grid;
|
|
334
|
-
place-items: center;
|
|
335
|
-
`,Bs=i.span`
|
|
336
|
-
position: absolute;
|
|
337
|
-
top: 7.5px;
|
|
338
|
-
left: 7.5px;
|
|
339
|
-
width: 20px;
|
|
340
|
-
height: 20px;
|
|
341
|
-
border-radius: 50%;
|
|
342
|
-
background: #34ce77;
|
|
343
|
-
display: grid;
|
|
344
|
-
place-items: center;
|
|
345
|
-
`,Es=i.div`
|
|
346
|
-
flex: 1;
|
|
347
|
-
min-width: 0;
|
|
348
|
-
display: flex;
|
|
349
|
-
flex-direction: column;
|
|
350
|
-
justify-content: space-between;
|
|
351
|
-
gap: 8px;
|
|
352
|
-
padding: 16px 8px;
|
|
353
|
-
|
|
354
|
-
${k} {
|
|
355
|
-
padding: 12px 4px 12px 0;
|
|
356
|
-
}
|
|
357
|
-
`,Rs=i.div`
|
|
358
|
-
display: flex;
|
|
359
|
-
flex-direction: column;
|
|
360
|
-
gap: 4px;
|
|
361
|
-
min-width: 0;
|
|
362
|
-
padding-right: 64px; /* clear the top-right favourite + remove group */
|
|
363
|
-
`,ft=Pe`
|
|
364
|
-
display: block;
|
|
365
|
-
font-size: 16px;
|
|
366
|
-
font-weight: 600;
|
|
367
|
-
line-height: 1.2;
|
|
368
|
-
color: ${o.text};
|
|
369
|
-
text-decoration: none;
|
|
370
|
-
overflow: hidden;
|
|
371
|
-
text-overflow: ellipsis;
|
|
372
|
-
white-space: nowrap;
|
|
373
|
-
|
|
374
|
-
a&:hover {
|
|
375
|
-
color: ${o.accent};
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
${k} {
|
|
379
|
-
white-space: normal;
|
|
380
|
-
display: -webkit-box;
|
|
381
|
-
-webkit-line-clamp: 2;
|
|
382
|
-
line-clamp: 2;
|
|
383
|
-
-webkit-box-orient: vertical;
|
|
384
|
-
}
|
|
385
|
-
`,Ws=i.div`
|
|
386
|
-
${ft};
|
|
387
|
-
`,Fs=i(ge)`
|
|
388
|
-
${ft};
|
|
389
|
-
`,Ls=i(Lt)`
|
|
390
|
-
font-size: 10px;
|
|
391
|
-
line-height: 1.43;
|
|
392
|
-
color: ${o.muted};
|
|
393
|
-
|
|
394
|
-
& [data-avatar] {
|
|
395
|
-
display: none;
|
|
396
|
-
}
|
|
397
|
-
& [data-testid='creator-name'] {
|
|
398
|
-
font-size: 10px;
|
|
399
|
-
line-height: 1.43;
|
|
400
|
-
}
|
|
401
|
-
`,Ks=i.div`
|
|
402
|
-
display: flex;
|
|
403
|
-
align-items: center;
|
|
404
|
-
justify-content: space-between;
|
|
405
|
-
gap: 12px;
|
|
406
|
-
padding-right: 8px;
|
|
407
|
-
`,Ns=i.div`
|
|
408
|
-
display: inline-flex;
|
|
409
|
-
align-items: center;
|
|
410
|
-
gap: 8px;
|
|
411
|
-
padding: 6px;
|
|
412
|
-
border: 0.5px solid ${o.muted2};
|
|
413
|
-
border-radius: ${Q.pill};
|
|
414
|
-
`,dt=i.button`
|
|
415
|
-
display: grid;
|
|
416
|
-
place-items: center;
|
|
417
|
-
width: 16px;
|
|
418
|
-
height: 16px;
|
|
419
|
-
padding: 0;
|
|
420
|
-
border: 0;
|
|
421
|
-
background: none;
|
|
422
|
-
color: ${o.text};
|
|
423
|
-
cursor: pointer;
|
|
424
|
-
|
|
425
|
-
&:disabled {
|
|
426
|
-
color: ${o.muted2};
|
|
427
|
-
cursor: default;
|
|
428
|
-
}
|
|
429
|
-
`,Qs=i.span`
|
|
430
|
-
min-width: 12px;
|
|
431
|
-
font-size: 14px;
|
|
432
|
-
font-weight: 500;
|
|
433
|
-
line-height: 1.2;
|
|
434
|
-
color: ${o.text};
|
|
435
|
-
text-align: center;
|
|
436
|
-
`,Us=i.div`
|
|
437
|
-
display: inline-flex;
|
|
438
|
-
align-items: center;
|
|
439
|
-
gap: 4px;
|
|
440
|
-
/* Always right-aligned: with a stepper present space-between handles it; for secondary/unique lines
|
|
441
|
-
(no stepper) the auto margin keeps the lone price on the right instead of falling to the left. */
|
|
442
|
-
margin-left: auto;
|
|
443
|
-
font-size: 24px;
|
|
444
|
-
font-weight: 600;
|
|
445
|
-
color: ${o.text2};
|
|
446
|
-
|
|
447
|
-
${k} {
|
|
448
|
-
font-size: 20px;
|
|
449
|
-
}
|
|
450
|
-
`,Os=i(ut)`
|
|
451
|
-
width: 24px;
|
|
452
|
-
height: 24px;
|
|
453
|
-
background: ${o.text};
|
|
454
|
-
|
|
455
|
-
${k} {
|
|
456
|
-
width: 20px;
|
|
457
|
-
height: 20px;
|
|
458
|
-
}
|
|
459
|
-
`,Hs=i.span`
|
|
460
|
-
margin-left: 6px;
|
|
461
|
-
font-size: 14px;
|
|
462
|
-
font-weight: 500;
|
|
463
|
-
color: ${o.muted};
|
|
464
|
-
text-decoration: line-through;
|
|
465
|
-
`,Vs=i.div`
|
|
466
|
-
position: absolute;
|
|
467
|
-
top: 9px;
|
|
468
|
-
right: 7px;
|
|
469
|
-
display: flex;
|
|
470
|
-
align-items: flex-start;
|
|
471
|
-
gap: 12px;
|
|
472
|
-
`,Gs=i.span`
|
|
473
|
-
display: inline-flex;
|
|
474
|
-
align-items: center;
|
|
475
|
-
gap: 4px;
|
|
476
|
-
font-size: 12px;
|
|
477
|
-
font-weight: 600;
|
|
478
|
-
line-height: 1;
|
|
479
|
-
text-transform: uppercase;
|
|
480
|
-
color: ${o.text2};
|
|
481
|
-
`,Ds=i(_)`
|
|
482
|
-
color: #f48221;
|
|
483
|
-
`,Ys=i(ge)`
|
|
484
|
-
font-size: 12px;
|
|
485
|
-
font-weight: 600;
|
|
486
|
-
line-height: 24px;
|
|
487
|
-
letter-spacing: 0.46px;
|
|
488
|
-
text-transform: uppercase;
|
|
489
|
-
text-decoration: underline;
|
|
490
|
-
color: ${o.accent};
|
|
491
|
-
|
|
492
|
-
&:hover {
|
|
493
|
-
color: ${o.accentHover};
|
|
494
|
-
}
|
|
495
|
-
&:focus-visible {
|
|
496
|
-
outline: 2px solid ${o.accent};
|
|
497
|
-
outline-offset: 2px;
|
|
498
|
-
}
|
|
499
|
-
`,Js=i.span`
|
|
500
|
-
align-self: flex-start;
|
|
501
|
-
display: inline-flex;
|
|
502
|
-
align-items: center;
|
|
503
|
-
gap: 4px;
|
|
504
|
-
padding: 2px 4px;
|
|
505
|
-
border-radius: ${Q.chip};
|
|
506
|
-
background: #f4e9ff;
|
|
507
|
-
font-size: 10px;
|
|
508
|
-
font-weight: 400;
|
|
509
|
-
line-height: 14px;
|
|
510
|
-
color: ${o.text};
|
|
511
|
-
`,Xs=i(_)`
|
|
512
|
-
width: 11.31px;
|
|
513
|
-
height: 10.94px;
|
|
514
|
-
background: ${o.text};
|
|
515
|
-
`,yt=Pe`
|
|
516
|
-
display: grid;
|
|
517
|
-
place-items: center;
|
|
518
|
-
width: 24px;
|
|
519
|
-
height: 24px;
|
|
520
|
-
padding: 0;
|
|
521
|
-
border: 0;
|
|
522
|
-
background: none;
|
|
523
|
-
color: ${o.muted};
|
|
524
|
-
cursor: pointer;
|
|
525
|
-
transition: color 0.12s ease;
|
|
526
|
-
|
|
527
|
-
&:disabled {
|
|
528
|
-
opacity: 0.5;
|
|
529
|
-
cursor: default;
|
|
530
|
-
}
|
|
531
|
-
`,Zs=i.button`
|
|
532
|
-
${yt};
|
|
533
|
-
|
|
534
|
-
&:hover:not(:disabled) {
|
|
535
|
-
color: ${o.text};
|
|
536
|
-
}
|
|
537
|
-
&[data-on] {
|
|
538
|
-
color: ${o.dclRed};
|
|
539
|
-
}
|
|
540
|
-
`,en=i.button`
|
|
541
|
-
${yt};
|
|
542
|
-
|
|
543
|
-
&:hover:not(:disabled) {
|
|
544
|
-
color: ${o.dclRed};
|
|
545
|
-
}
|
|
546
|
-
`,tn=i.div`
|
|
547
|
-
display: flex;
|
|
548
|
-
gap: 20px;
|
|
549
|
-
margin-top: 16px;
|
|
550
|
-
|
|
551
|
-
& .link {
|
|
552
|
-
font-size: 13px;
|
|
553
|
-
color: ${o.muted};
|
|
554
|
-
font-weight: 600;
|
|
555
|
-
}
|
|
556
|
-
& .link:hover:not(:disabled) {
|
|
557
|
-
color: ${o.text};
|
|
558
|
-
}
|
|
559
|
-
`,an=i.aside`
|
|
560
|
-
position: sticky;
|
|
561
|
-
top: 172px;
|
|
562
|
-
display: flex;
|
|
563
|
-
flex-direction: column;
|
|
564
|
-
background: ${o.white};
|
|
565
|
-
box-shadow: 0 1px 3px rgba(22, 21, 24, 0.06);
|
|
566
|
-
border-radius: 16px;
|
|
567
|
-
padding: 16px;
|
|
568
|
-
|
|
569
|
-
${xt} {
|
|
570
|
-
position: static;
|
|
571
|
-
}
|
|
572
|
-
${k} {
|
|
573
|
-
position: fixed;
|
|
574
|
-
left: 0;
|
|
575
|
-
right: 0;
|
|
576
|
-
top: auto;
|
|
577
|
-
bottom: 0;
|
|
578
|
-
z-index: 30;
|
|
579
|
-
border: 0;
|
|
580
|
-
border-radius: 16px 16px 0 0;
|
|
581
|
-
box-shadow: 0 -4px 20px rgba(22, 21, 24, 0.12);
|
|
582
|
-
}
|
|
583
|
-
`,sn=i.h2`
|
|
584
|
-
margin: 0 0 24px;
|
|
585
|
-
padding-bottom: 16px;
|
|
586
|
-
border-bottom: 1px solid ${o.gray4};
|
|
587
|
-
font-size: 24px;
|
|
588
|
-
font-weight: 600;
|
|
589
|
-
color: ${o.text};
|
|
590
|
-
|
|
591
|
-
${k} {
|
|
592
|
-
margin-bottom: 12px;
|
|
593
|
-
padding-bottom: 12px;
|
|
594
|
-
}
|
|
595
|
-
`,nn=i.div`
|
|
596
|
-
display: flex;
|
|
597
|
-
flex-direction: column;
|
|
598
|
-
gap: 12px;
|
|
599
|
-
`,rn=i.div`
|
|
600
|
-
display: flex;
|
|
601
|
-
align-items: flex-start;
|
|
602
|
-
justify-content: space-between;
|
|
603
|
-
gap: 12px;
|
|
604
|
-
`,on=i.span`
|
|
605
|
-
font-size: 14px;
|
|
606
|
-
font-weight: 600;
|
|
607
|
-
line-height: 1.57;
|
|
608
|
-
color: ${o.muted1};
|
|
609
|
-
`,cn=i.span`
|
|
610
|
-
display: inline-flex;
|
|
611
|
-
align-items: center;
|
|
612
|
-
gap: 8px;
|
|
613
|
-
font-size: 24px;
|
|
614
|
-
font-weight: 700;
|
|
615
|
-
color: ${o.text};
|
|
616
|
-
`,ln=i.span`
|
|
617
|
-
display: flex;
|
|
618
|
-
flex-direction: column;
|
|
619
|
-
align-items: flex-end;
|
|
620
|
-
justify-content: center;
|
|
621
|
-
gap: 4px;
|
|
622
|
-
`;i.span`
|
|
623
|
-
font-size: 12px;
|
|
624
|
-
font-weight: 400;
|
|
625
|
-
line-height: 1;
|
|
626
|
-
color: ${o.muted};
|
|
627
|
-
`;const dn=i(ut)`
|
|
628
|
-
width: 30px;
|
|
629
|
-
height: 30px;
|
|
630
|
-
background: ${o.text};
|
|
631
|
-
-webkit-mask-size: 24px 24px;
|
|
632
|
-
mask-size: 24px 24px;
|
|
633
|
-
-webkit-mask-position: left center;
|
|
634
|
-
mask-position: left center;
|
|
635
|
-
`,un=i.button`
|
|
636
|
-
width: 100%;
|
|
637
|
-
height: 56px;
|
|
638
|
-
border: 0;
|
|
639
|
-
border-radius: ${Q.btn};
|
|
640
|
-
background: ${gt.amethyst};
|
|
641
|
-
color: ${o.softWhite};
|
|
642
|
-
font-size: 15px;
|
|
643
|
-
font-weight: 600;
|
|
644
|
-
letter-spacing: 0.046em;
|
|
645
|
-
text-transform: uppercase;
|
|
646
|
-
cursor: pointer;
|
|
647
|
-
transition:
|
|
648
|
-
background 0.15s ease,
|
|
649
|
-
filter 0.15s ease;
|
|
650
|
-
|
|
651
|
-
&:hover:not(:disabled) {
|
|
652
|
-
background: ${o.accent};
|
|
653
|
-
}
|
|
654
|
-
&:active:not(:disabled) {
|
|
655
|
-
filter: brightness(0.95);
|
|
656
|
-
}
|
|
657
|
-
&:disabled {
|
|
658
|
-
opacity: 0.6;
|
|
659
|
-
cursor: default;
|
|
660
|
-
}
|
|
661
|
-
`,bt=Pe`
|
|
662
|
-
margin: 0;
|
|
663
|
-
font-size: 13px;
|
|
664
|
-
`,de=i.p`
|
|
665
|
-
${bt};
|
|
666
|
-
`,hn=i(ls)`
|
|
667
|
-
${bt};
|
|
668
|
-
`,pn=i.div`
|
|
669
|
-
position: relative;
|
|
670
|
-
/* Takes the leftover height so its white ::before covers it — see .page[data-route="/cart"]. */
|
|
671
|
-
flex: 1 0 auto;
|
|
672
|
-
margin-top: 48px;
|
|
673
|
-
/* The whole gap from the top of the cross-sell to the "You might also like" heading — the shared
|
|
674
|
-
carousel's own top margin is zeroed below so this padding isn't stacked on top of it. */
|
|
675
|
-
padding: 47px 0 24px;
|
|
676
|
-
|
|
677
|
-
&::before {
|
|
678
|
-
content: '';
|
|
679
|
-
position: absolute;
|
|
680
|
-
top: 0;
|
|
681
|
-
bottom: -80px; /* eat .page's bottom padding so the white reaches the footer */
|
|
682
|
-
left: 50%;
|
|
683
|
-
width: 100vw;
|
|
684
|
-
transform: translateX(-50%);
|
|
685
|
-
background: ${o.bg};
|
|
686
|
-
z-index: 0;
|
|
687
|
-
}
|
|
688
|
-
& > * {
|
|
689
|
-
position: relative;
|
|
690
|
-
z-index: 1;
|
|
691
|
-
}
|
|
692
|
-
& section {
|
|
693
|
-
margin-top: 0;
|
|
694
|
-
}
|
|
695
|
-
`;function Te(c){if(os(c))return a("errors.rejected");const d=(c.message??"").toLowerCase();return d.includes("insufficient")?a("cart.error.insufficient",{currency:Xt.name}):d.includes("no active listing")||d.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const gn=12e4;function xn(c){const d=[];return c.unavailable.length&&d.push(a("cart.drop.unavailable",{count:c.unavailable.length})),c.own.length&&d.push(a("cart.drop.own",{count:c.own.length})),a("cart.drop.removed",{items:d.join(` ${a("cart.drop.and")} `)})}const ze=c=>c.reduce((d,$)=>d+$.priceCredits*$.quantity,0),ue=c=>c.flatMap(d=>Array.from({length:d.quantity},()=>({...d,quantity:1})));function _n(){Kt({title:a("nav.cart"),noindex:!0});const c=q(t=>t.items),d=q(t=>t.remove),$=q(t=>t.increment),M=q(t=>t.decrement),B=q(t=>t.clear),W=q(t=>t.restore),F=q(t=>t.setFittingOpen),P=Ye(t=>t.items),xe=Ye(t=>t.toggle),{session:n,signIn:I}=Nt(),ee=ss().packs.slice(0,ns);S.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const vt=c.some(t=>t.category!=="emote"),{data:me}=Qt({queryKey:["upsell-listings"],queryFn:()=>ea({first:40}),staleTime:6e4}),{data:v}=Ut(n),m=Ot(),U=Rt(),{state:L}=Wt(),[Ct,D]=S.useState(null),[Ae,te]=S.useState(null),[wt,A]=S.useState(!1),[T,K]=S.useState(null),Ie=S.useRef(0),[p,b]=S.useState(null),{data:ae}=Ht(n),{data:Y}=Oa(!0),[fe,qe]=S.useState(""),J=S.useRef(null),_e=Vt(c),Be=t=>Je(_e[t.id]),ye=c.filter(Be),be=c.length>0&&ye.length===0,jt=ye.reduce((t,s)=>t+s.priceCredits*s.quantity,0),kt=c.reduce((t,s)=>t+s.quantity,0),$t=ye.reduce((t,s)=>t+s.quantity,0),Ee=T?T.liveTotalCredits:jt,St=new Set(c.map(t=>t.id)),Re=((me==null?void 0:me.items)??[]).filter(t=>!St.has(t.id)).slice(0,12),Mt=new Map(T==null?void 0:T.buyable.map(t=>[t.item.id,t])),se=(v==null?void 0:v.credits)??0,ve=Ee*10,Tt=Y?rt(ve,Y):0n,ne=Se({priceCents:ve,priceManaWei:Tt,balanceCents:(v==null?void 0:v.balanceCents)??0,manaBalanceWei:ae??0n}),zt=Jt;function ie(t){t(),K(null),te(null),D(null)}function Pt(){b(null),A(!1)}function We(t){const s=ze(t),l=Math.max(0,s-se),r=ee.find(u=>u.credits>=l)??ee[ee.length-1];qe(r.id),N("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:s,credits_balance:se,shortfall:l}),b({phase:"nofunds",lines:t.map(u=>({item:u.item,priceCredits:u.priceCredits,quantity:u.quantity})),shortfall:l}),A(!1)}async function Ce(t){if(!n||t.length===0)return;const s=ue(t),l=s.map(x=>({...x.item,priceCredits:x.priceCredits})),r=t.map(x=>({...x.item,priceCredits:x.priceCredits,quantity:x.quantity})),u=[];let h="authorize",f=!1;b({phase:"processing",stage:"reserving",step:1,total:s.length});try{const x=[];for(let j=0;j<s.length;j++){const y=s[j];b({phase:"processing",stage:"reserving",step:j+1,total:s.length});try{const{credit:w,maxCreditedValue:H}=await et(n.identity,y.usdCents,y.trade.id);u.push(w.id),x.push({trade:y.trade,credits:[w],maxCreditedValue:H})}catch(w){if(cs(w)){if(u.length){try{await je(n.identity,u)}catch(H){V(H,{flow:"cart_checkout",step:"release"})}m.invalidateQueries({queryKey:["usd-balance"]})}We(t);return}throw w}}h="submit";const z=()=>b({phase:"processing",stage:"settling",step:s.length,total:s.length});b({phase:"processing",stage:"awaiting-signature",step:s.length,total:s.length});let C=[];if(Va())try{C=await Za({purchases:x,buyer:n.address,signer:n.signer,onSigned:z});const y=(await Promise.allSettled(C.map(w=>es(w)))).flatMap(w=>w.status==="rejected"?[w.reason]:[]);if(y.length&&!y.some(w=>w instanceof ts))throw y[0];f=!0}catch(j){if(!(j instanceof as))throw j;C=await Me({purchases:x,buyer:n.address,signer:n.signer,onSigned:z})}else C=await Me({purchases:x,buyer:n.address,signer:n.signer});t.forEach(j=>d(j.item.id)),K(null),N("Shop Completed Purchase",{...ke(l),payment_type:"credits",no_crypto_step:f,transaction_hash:C[0]??null}),Ka(m);const g=J.current;J.current=null,b(null),A(!1);const R={items:r,txHash:C[0]??void 0,settled:!0,...g?{creditsAdded:g}:{}};U("/success",{state:R,replace:!0})}catch(x){if(oe(x)||V(x,{flow:"cart_checkout",step:h,cart_size:t.length}),N(oe(x)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:h,error_code:tt(x),value_usd:Xe(l.reduce((z,C)=>z+C.priceCredits,0)),cart_size:s.length}),u.length){try{await je(n.identity,u)}catch(z){V(z,{flow:"cart_checkout",step:"release"})}m.invalidateQueries({queryKey:["usd-balance"]})}b({phase:"error",message:Te(x)})}}function Fe(t,s){m.invalidateQueries({queryKey:["usd-balance"]}),m.invalidateQueries({queryKey:["detail-trade"]}),m.invalidateQueries({queryKey:["shop-item"]}),m.invalidateQueries({queryKey:["owned-token"]}),m.invalidateQueries({queryKey:["public-token"]}),m.invalidateQueries({queryKey:["item-resales"]}),m.invalidateQueries({queryKey:["shop-items"]}),m.invalidateQueries({queryKey:["catalog-items"]}),m.invalidateQueries({queryKey:["my-assets"]}),m.invalidateQueries({queryKey:["purchases"]}),m.invalidateQueries({queryKey:["owned-item-count"]}),m.invalidateQueries({queryKey:["overview-listings"]}),m.invalidateQueries({queryKey:["upsell-listings"]});const l=J.current;J.current=null,b(null),A(!1);const r={items:t,txHash:s[0]??void 0,settled:!0,...l?{creditsAdded:l}:{}};U("/success",{state:r,replace:!0})}function Le(t,s){oe(t)||V(t,{flow:s,step:"submit"}),N(oe(t)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:tt(t)}),b({phase:"error",message:Te(t)}),A(!1)}async function At(t,s){const l=ce($e.MANAToken,s),r=ce($e.CreditsManager,s);await Ja({auth:{kind:Xa.Allowance,contractAddress:l.address,spenderAddress:r.address,chainId:s},signer:t})}async function Ke(){if(Y)return Y;try{return await m.fetchQuery({queryKey:["mana-rate",Ze.chainId],queryFn:()=>Ha(Ze.chainId),staleTime:6e4})}catch{return}}async function It(t){const s=ue(t).reduce((h,f)=>h+f.usdCents,0),r=(ae??0n)>0n?await Ke():Y,u=r?rt(s,r):0n;return{totalCents:s,manaWei:u}}async function Ne(t,s){const l=ze(t),{totalCents:r,manaWei:u}=await It(t),h=Se({priceCents:r,priceManaWei:u,balanceCents:(v==null?void 0:v.balanceCents)??0,manaBalanceWei:ae??0n});if(s&&h.options.some(f=>f.method===s)){if(s==="credits"){Ce(t);return}const{spender:f,chainId:x}=Qe(s,t);await Ue(f,x,()=>s==="mana"?void Oe(t):void He(t,r,u));return}if(h.options.some(f=>f.method==="mana"||f.method==="combined")){b({phase:"choose",lines:t,totalCents:r,manaWei:u}),A(!1);return}if(v!=null&&v.credits<l){We(t);return}Ce(t)}function qt(t){return Se({priceCents:t.totalCents,priceManaWei:t.manaWei,balanceCents:(v==null?void 0:v.balanceCents)??0,manaBalanceWei:ae??0n})}const[we,re]=S.useState(null);function Qe(t,s){const l=s[0].trade;return{spender:t==="mana"?ce(Zt(l.contract),l.chainId).address:ce($e.CreditsManager,l.chainId).address,chainId:l.chainId}}async function Ue(t,s,l){const r=Ga(s,t),u=n?await Da(r,n.address).catch(()=>!0):!0;if(Ya(n==null?void 0:n.providerType,u)){A(!1),re({auth:r,run:l});return}l()}function _t(t){if((p==null?void 0:p.phase)!=="choose")return;const{lines:s,totalCents:l,manaWei:r}=p;if(t==="credits"){Ce(s);return}const{spender:u,chainId:h}=Qe(t,s);Ue(u,h,()=>t==="mana"?void Oe(s):void He(s,l,r))}async function Oe(t){if(!n||t.length===0)return;const s=ue(t),l=s.map(h=>({...h.item,priceCredits:h.priceCredits})),r=t.map(h=>({...h.item,priceCredits:h.priceCredits,quantity:h.quantity})),u=()=>b({phase:"processing",stage:"settling",step:s.length,total:s.length});b({phase:"processing",stage:"awaiting-signature",step:s.length,total:s.length});try{const h=await Na({trades:s.map(f=>f.trade),buyer:n.address,signer:n.signer,onSigned:u});t.forEach(f=>d(f.item.id)),K(null),N("Shop Completed Purchase",{...ke(l),payment_type:"mana",transaction_hash:h[0]??null}),m.invalidateQueries({queryKey:["mana-balance"]}),Fe(r,h)}catch(h){Le(h,"buy_cart_mana")}}async function He(t,s,l){if(!n||t.length===0)return;const r=ue(t),u=r.map(g=>({...g.item,priceCredits:g.priceCredits})),h=t.map(g=>({...g.item,priceCredits:g.priceCredits,quantity:g.quantity})),f=Qa(r.map(g=>g.usdCents),(v==null?void 0:v.balanceCents)??0),x=f.reduce((g,R)=>g+R,0),z=Ua(Math.max(0,s-x),s,l),C=[];b({phase:"processing",stage:"reserving",step:1,total:r.length});try{const g=[];for(let y=0;y<r.length;y++){const w=f[y];if(w<=0)continue;b({phase:"processing",stage:"reserving",step:y+1,total:r.length});const{credit:H,maxCreditedValue:Et}=await et(n.identity,w,r[y].trade.id);C.push(H.id),g.push({trade:r[y].trade,credits:[H],maxCreditedValue:Et})}r.forEach((y,w)=>{f[w]<=0&&g.push({trade:y.trade,credits:[],maxCreditedValue:"0"})}),g[0]={...g[0],maxCreditedValue:(BigInt(g[0].maxCreditedValue)+z).toString()},await At(n.signer,r[0].trade.chainId);const R=()=>b({phase:"processing",stage:"settling",step:r.length,total:r.length});b({phase:"processing",stage:"awaiting-signature",step:r.length,total:r.length});const j=await Me({purchases:g,buyer:n.address,signer:n.signer,onSigned:R});t.forEach(y=>d(y.item.id)),K(null),N("Shop Completed Purchase",{...ke(u),payment_type:"credits_and_mana",transaction_hash:j[0]??null}),m.invalidateQueries({queryKey:["mana-balance"]}),Fe(h,j)}catch(g){C.length&&(je(n.identity,C).catch(()=>{}),m.invalidateQueries({queryKey:["usd-balance"]})),Le(g,"buy_cart_combined")}}async function O(t){if(!n){it({type:"cart-checkout"}),I();return}const s=q.getState().items.filter(Be);if(s.length===0)return;D(null),te(null),A(!0);const l=s.reduce((r,u)=>r+u.priceCredits*u.quantity,0);N("Shop Started Checkout",{cart_size:s.length,cart_value_credits:l,cart_value_usd:Xe(l),has_sufficient_credits:se>=l});try{const r=await is(s,n.address,zt,await Ke()),u=[...r.unavailable,...r.own];if(u.length&&(u.forEach(h=>d(h.id)),te(xn(r))),r.buyable.length===0){D(a("cart.error.noneAvailable")),K(null);return}if(r.orderChanged){K(r),Ie.current=Date.now();return}await Ne(r.buyable,t)}catch(r){V(r,{flow:"cart_checkout",step:"review",cart_size:s.length}),D(Te(r))}finally{A(!1)}}async function Ve(){if(T){if(!n){it({type:"cart-checkout"}),I();return}if(Date.now()-Ie.current>gn){K(null),te(null),await O();return}D(null),Ne(T.buyable)}}async function Bt(){if(fe){try{sessionStorage.setItem(le,JSON.stringify(q.getState().items))}catch{}A(!0);try{const t=await rs(fe,n?{address:n.address,identity:n.identity}:void 0);if(t.url){window.location.href=t.url;return}U("/credits")}catch(t){try{sessionStorage.removeItem(le)}catch{}V(t,{flow:"cart_buy_credits"}),b({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{A(!1)}}}const Ge=S.useRef(!1);S.useEffect(()=>{if(!n||Ge.current||!Ra("cart-checkout"))return;Ge.current=!0;const t=setTimeout(()=>void O(),0);return()=>clearTimeout(t)},[n]);const De=S.useRef(!1);S.useEffect(()=>{if(!(L!=null&&L.resumeCheckout)||De.current)return;De.current=!0,J.current=L.creditsAdded??null;try{const s=sessionStorage.getItem(le);if(s){sessionStorage.removeItem(le);const l=JSON.parse(s);Array.isArray(l)&&l.length&&W(l)}}catch{}m.invalidateQueries({queryKey:["usd-balance"]});const t=setTimeout(()=>void O(),0);return()=>clearTimeout(t)},[L==null?void 0:L.resumeCheckout]);const E=wt||(p==null?void 0:p.phase)==="processing";return c.length===0&&!p?e.jsx(ot,{children:e.jsxs(lt,{children:[e.jsxs(ct,{onClick:()=>U(-1),type:"button",children:[e.jsx(_,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(js,{"data-testid":"cart-empty",children:[e.jsx(_,{name:"cart-plus",size:110}),e.jsxs(ks,{children:[e.jsx($s,{children:a("cart.empty.title")}),e.jsx(Ss,{children:a("cart.empty.body")})]}),e.jsx(Ms,{to:"/assets",children:a("cart.empty.cta")})]})]})}):e.jsxs(ot,{children:[e.jsxs(lt,{children:[e.jsxs(ct,{onClick:()=>U(-1),type:"button",children:[e.jsx(_,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(vs,{children:[e.jsxs(Cs,{children:[e.jsxs(ws,{children:[e.jsx(Ts,{onClick:()=>U(-1),type:"button","aria-label":a("cart.goBack"),children:e.jsx(_,{name:"arrow-left"})}),e.jsx(zs,{children:a("cart.panelTitle",{count:kt})}),vt?e.jsxs(Ps,{onClick:()=>F(!0),disabled:E,children:[e.jsx(_,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),e.jsxs(mt,{children:[e.jsx(As,{children:c.map(t=>{const s=Mt.get(t.id),l=s?s.priceCredits:t.priceCredits,r=!!s&&s.priceCredits!==t.priceCredits,u=!t.tokenId,h=t.quantity,f=typeof t.available=="number"&&h>=t.available,x=l*h,z=Gt(t),C=!!z&&!!P[z],g=Dt(t),R=_e[t.id],j=!Je(R),y=R==="sold-out"?a("cart.availability.soldOut"):a("cart.availability.unavailable");return e.jsxs(Is,{"data-unavailable":j||void 0,children:[e.jsxs(qs,{"data-thumb":!0,children:[g?e.jsx(_s,{to:g,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(Bs,{"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(Es,{children:[e.jsxs(Rs,{"data-desc":!0,children:[g?e.jsx(Fs,{to:g,state:{item:t,tradeId:t.tradeId},title:t.name,children:t.name}):e.jsx(Ws,{title:t.name,children:t.name}),t.creator?e.jsx(Ls,{address:t.creator,linkToProfile:!0}):null,u?e.jsxs(Js,{"data-testid":"cart-creator-tag",children:[e.jsx(Xs,{name:"buy-from-creator"}),a("cart.creatorTag")]}):null]}),e.jsx(Ks,{children:j?e.jsxs(e.Fragment,{children:[e.jsxs(Gs,{children:[e.jsx(Ds,{name:"warning-fill",size:24}),y]}),g?e.jsx(Ys,{to:g,state:{item:t,tradeId:t.tradeId},children:a("cart.availability.viewResales")}):null]}):e.jsxs(e.Fragment,{children:[u?e.jsxs(Ns,{children:[e.jsx(dt,{onClick:()=>ie(()=>M(t.id)),disabled:E||h<=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(Qs,{children:h}),e.jsx(dt,{onClick:()=>ie(()=>$(t.id)),disabled:E||f,"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(Us,{children:[e.jsx(Os,{})," ",x,r?e.jsx(Hs,{children:t.priceCredits*h}):null]})]})})]}),e.jsxs(Vs,{children:[z?e.jsx(Zs,{"data-on":C||void 0,onClick:()=>xe(t),"aria-label":C?a("cart.removeFromFavorites",{name:t.name}):a("cart.addToFavorites",{name:t.name}),title:C?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:e.jsx(_,{name:C?"heart-solid":"heart"})}):null,e.jsx(en,{onClick:()=>ie(()=>d(t.id)),disabled:E,"aria-label":a("cart.remove",{name:t.name}),title:a("cart.removeTitle"),children:e.jsx(_,{name:"trash",size:24})})]})]},t.id)})}),e.jsx(tn,{children:e.jsx("button",{className:"link",onClick:()=>ie(B),disabled:E,children:a("cart.clearCart")})})]})]}),e.jsxs(an,{children:[e.jsx(sn,{children:a("cart.purchaseSummary")}),e.jsxs(nn,{children:[e.jsxs(rn,{children:[e.jsx(on,{children:a("cart.totalItems",{count:$t})}),e.jsx(ln,{children:e.jsxs(cn,{children:[e.jsx(dn,{})," ",Ee]})})]}),ne.options.length>0||ne.manaShortfall?e.jsx(ht,{options:ne.options,totalCents:ve,shortfall:ne.manaShortfall,creditsLabel:T?a("marketCheckout.confirmPurchase"):a("cart.buyWithCredits"),busy:E||be,onPay:t=>void(T?Ve():O(t))}):e.jsx(un,{onClick:()=>void(T?Ve():O()),disabled:E||be,children:E?a("cart.working"):T?a("marketCheckout.confirmPurchase"):a("assetCard.buyNow")}),be?e.jsx(de,{className:"muted",children:a("cart.allUnavailable")}):null,n?null:e.jsx(de,{className:"muted",children:a("cart.signInHint")}),T?e.jsx(de,{className:"muted",children:a("cart.priceChanged")}):null,Ae?e.jsx(de,{className:"muted",children:Ae}):null,e.jsx(hn,{message:Ct})]})]})]})]}),Re.length>0?e.jsx(pn,{children:e.jsx(Wa,{title:a("cart.youMightAlsoLike"),items:Re})}):null,we&&n?e.jsx(Fa,{auth:we.auth,signer:n.signer,title:a("authorizeStep.manaTitle"),name:a("authorizeStep.manaName"),reason:a("authorizeStep.manaReason"),icon:e.jsx("img",{src:La,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{run:t}=we;re(null),t()},onCancel:()=>re(null),onClose:()=>re(null)}):null,p?e.jsx(fs,{phase:p.phase,balanceCredits:se,onClose:Pt,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:Yt(n==null?void 0:n.providerType),options:p.phase==="choose"?qt(p).options:void 0,onPay:_t,totalCents:p.phase==="choose"?p.totalCents:void 0,totalManaWei:p.phase==="choose"?p.manaWei:void 0,totalCredits:p.phase==="choose"?ze(p.lines):void 0,lines:p.phase==="nofunds"?p.lines:void 0,shortfallCredits:p.phase==="nofunds"?p.shortfall:void 0,packs:ee,selectedPack:fe,onSelectPack:qe,onBuyPacks:()=>void Bt(),message:p.phase==="error"?p.message:void 0,onRetry:()=>void O()}):null]})}export{_n as Cart};
|