@dcl/shop 0.1.0-30535358248.commit-2722a7f → 0.1.0-30555147117.commit-c0cc5df
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-CvucBHHY.js → Activity-DCbV7Dlz.js} +4 -4
- package/assets/{AnimatedBackground-RAMrqGx_.js → AnimatedBackground-D7rZFX-y.js} +2 -2
- package/assets/{Assets-knlkMAu5.js → Assets-DbLl1p1e.js} +2 -2
- package/assets/{Assets.styles-CvuyiKqx.js → Assets.styles-CHGtG3LU.js} +1 -1
- package/assets/{Authorizations-6ASyROzc.js → Authorizations-DJNBkPEr.js} +1 -1
- package/assets/Cart-BghZZpIP.js +695 -0
- package/assets/{CircularProgress-DNgXJHy_.js → CircularProgress-BrEKWj5U.js} +1 -1
- package/assets/{Collection-BMVrfLkT.js → Collection-BcOlqkP2.js} +1 -1
- package/assets/{CollectionCarousel-CEeV8t-a.js → CollectionCarousel-C3qgLsBY.js} +1 -1
- package/assets/{Creator-BpM4S3Hm.js → Creator-CuPJUn5F.js} +2 -2
- package/assets/{ErrorNotice-BStoa2Qo.js → ErrorNotice-DwAAnUwA.js} +1 -1
- package/assets/{ExchangeController-BYHmUZwM.js → ExchangeController-D02GxCIy.js} +1 -1
- package/assets/{GetCredits-BkAuC3jt.js → GetCredits-BLTnXBjj.js} +7 -7
- package/assets/{HelpersUtil-DRtQnbop.js → HelpersUtil-BfxyEXTh.js} +1 -1
- package/assets/{ImportListings-Dmc9cvXJ.js → ImportListings-CFXHsPKY.js} +6 -6
- package/assets/{ItemDetail-DHe174rO.js → ItemDetail-gmzGWkMe.js} +197 -197
- package/assets/{LoadMore-D2rhC3FV.js → LoadMore-D8bZTLv8.js} +1 -1
- package/assets/{MenuList-BWVPPtBW.js → MenuList-iDFhw9sU.js} +1 -1
- package/assets/{MyAssets-BKeT--Ql.js → MyAssets-BRzGjYcN.js} +1 -1
- package/assets/{MyFavorites-BHrdEY10.js → MyFavorites-CM49GENl.js} +44 -17
- package/assets/{NotFound-vJnWF5cu.js → NotFound-D7aOezUK.js} +1 -1
- package/assets/{NotificationsBell-Chozh7TD.js → NotificationsBell-BO0w1qMB.js} +1 -1
- package/assets/{StoreSettings-TqML4NDY.js → StoreSettings-Dl8TtNvz.js} +1 -1
- package/assets/{Success-D3O1Ladi.js → Success-B8p6G_k7.js} +1 -1
- package/assets/{SwapController-Da0gS2ji.js → SwapController-DXYt8eCk.js} +1 -1
- package/assets/{Tooltip-DG5HvItw.js → Tooltip-CmtPsxJu.js} +1 -1
- package/assets/{TradeService-DZaBK_Qv.js → TradeService-C1yOBoUa.js} +1 -1
- package/assets/{W3MFrameProviderSingleton-DAYqclPH.js → W3MFrameProviderSingleton-_nUMMN_r.js} +3 -3
- package/assets/{WebCryptoP256-C0lhkhci.js → WebCryptoP256-BOLkPPIP.js} +1 -1
- package/assets/{authorizations-BVmXaQeu.js → authorizations-CzNpcwj-.js} +1 -1
- package/assets/{basic-DO7LyzkW.js → basic-IpbulmwC.js} +1 -1
- package/assets/{biconomy-DmIZbqMf.js → biconomy-C9xwq1iP.js} +1 -1
- package/assets/{browseLayout.styles-DBRHDPrA.js → browseLayout.styles-Gi_W6L0Y.js} +8 -8
- package/assets/{builder-D-ICo29L.js → builder-BLl0dWNe.js} +1 -1
- package/assets/{buy-Ccaxv3lt.js → buy-VVCbwxmX.js} +1 -1
- package/assets/{buy-gasless-UjTpzokh.js → buy-gasless-Cw6IFMAC.js} +1 -1
- package/assets/{categories-BFgtEsDl.js → categories-D7Zdwanh.js} +1 -1
- package/assets/{ccip--AYEzQZX.js → ccip-D3gG15Tx.js} +1 -1
- package/assets/{ccip-XSek2mtN.js → ccip-DxAXdNb6.js} +1 -1
- package/assets/{clsx-CsyFr0ZL.js → clsx-CWRNqKvL.js} +2 -2
- package/assets/{controller-UEFY0vzS.js → controller-z_ubtZAp.js} +2 -2
- package/assets/{core-BvM6vAlM.js → core-B3AJ_0ua.js} +4 -4
- package/assets/{createSvgIcon-CqEJzhBK.js → createSvgIcon-CPVuPy9d.js} +2 -2
- package/assets/{custom-CmDrwoPL.js → custom-Dz8prIE7.js} +1 -1
- package/assets/{data-capture-BGpPQSe4.js → data-capture-BB1fv1MC.js} +1 -1
- package/assets/{email-MR7l-5-Z.js → email-fbqqGJ2s.js} +1 -1
- package/assets/{embedded-wallet-jJ0wwb2F.js → embedded-wallet-BJhLZ3lj.js} +1 -1
- package/assets/{emotion-styled.browser.esm-BjI-2U8x.js → emotion-styled.browser.esm-CyKS4j--.js} +1 -1
- package/assets/{engine-CLWZ2d9c.js → engine-BGXLTiQ_.js} +1 -1
- package/assets/{errors-BfJQR72Z.js → errors-w45osmm9.js} +1 -1
- package/assets/{estimate-l1-fee-DZ79UIrf.js → estimate-l1-fee-dybW3PfS.js} +1 -1
- package/assets/{execute-DOgqp-6j.js → execute-CbayRz2e.js} +2 -2
- package/assets/{features-ChZmqAVE.js → features-94WCX2Ou.js} +1 -1
- package/assets/{fetchTokenMetadata-C3VIvOiy.js → fetchTokenMetadata-EsaUgq3p.js} +2 -2
- package/assets/{get-ecosystem-wallet-info-1W7jn21T.js → get-ecosystem-wallet-info-DWv-IFz5.js} +1 -1
- package/assets/{getBalance-ofifHtS7.js → getBalance-Dz92_v99.js} +1 -1
- package/assets/{getNFT-D3I1Pmv7.js → getNFT-B1pdUf6E.js} +1 -1
- package/assets/{getNFT-0GUqM1mE.js → getNFT-EyZ4qlqr.js} +1 -1
- package/assets/{getThemeProps-DMJMKWz1.js → getThemeProps-CpslPeXJ.js} +1 -1
- package/assets/{grid.styles-BdzonCru.js → grid.styles-BT8g6G1w.js} +1 -1
- package/assets/{hashTypedData-BQ7YG-GD.js → hashTypedData-BkhJypb9.js} +1 -1
- package/assets/{hashTypedData-SMqK0Bvk.js → hashTypedData-VXV11ywt.js} +1 -1
- package/assets/{import-BBD0DWIT.js → import-CjcH4cDS.js} +1 -1
- package/assets/{in-app-wallet-calls-D8u8Lb5V.js → in-app-wallet-calls-Ymglwrpz.js} +1 -1
- package/assets/{in-app-CxfPziwR.js → in-app-x5rZbfaN.js} +1 -1
- package/assets/{index-uF4O1HZa.js → index-8ajBsaIg.js} +1 -1
- package/assets/{index-DpRFZG3X.js → index-9PvOV8po.js} +1 -1
- package/assets/{index-BYWBHUre.js → index-9QCAyhSS.js} +1 -1
- package/assets/{index-D7jjeu20.js → index-BBMJuL6J.js} +2 -2
- package/assets/{index-pFP2Nx_c.js → index-BFnETbyc.js} +1 -1
- package/assets/{index-CF_sMyTl.js → index-BLFM-OTz.js} +2 -2
- package/assets/{index-YUVIXaKh.css → index-BMzstP-8.css} +1 -1
- package/assets/{index-CwAAZj9L.js → index-BU6KJB83.js} +3 -3
- package/assets/{index-DBpv4hR1.js → index-BX6zRkQu.js} +1 -1
- package/assets/{index-BIl576Hj.js → index-BcMB9SzQ.js} +1 -1
- package/assets/{index-DK6Afp1x.js → index-BfQNtRN2.js} +2 -2
- package/assets/{index-CDKfv2bi.js → index-BgtS_WGf.js} +2 -2
- package/assets/index-BuQvO-I_.js +2815 -0
- package/assets/{index-CufAJ6Dp.js → index-C5sGgO2Z.js} +1 -1
- package/assets/{index-BhaRkjyI.js → index-C7ZO8TeQ.js} +1 -1
- package/assets/{index-De2dnF3o.js → index-C98Y4Kcd.js} +1 -1
- package/assets/{index-DAMK8alV.js → index-CAKt5A1a.js} +1 -1
- package/assets/{index-BHA1eBb6.js → index-CE288NDM.js} +1 -1
- package/assets/{index-BMX5hUGo.js → index-CEeFcj09.js} +1 -1
- package/assets/{index-BumYVyPx.js → index-CLHh2p8J.js} +1 -1
- package/assets/{index-_MfLxWCe.js → index-CPgr_tFp.js} +1 -1
- package/assets/{index-r9DiwXAN.js → index-CV4-Elfa.js} +1 -1
- package/assets/{index-DkzGDwlW.js → index-Ca6u28zB.js} +1 -1
- package/assets/{index-CDl1_5Gn.js → index-CdVDWbCf.js} +1 -1
- package/assets/{index-C-lIghD5.js → index-CfEIPaZw.js} +3 -3
- package/assets/{index-CbdwidXO.js → index-ChJR2Cb6.js} +1 -1
- package/assets/{index-B8hqb_ut.js → index-Cif8I2ag.js} +1 -1
- package/assets/{index-Dvv2TfLB.js → index-CkmitkFW.js} +1 -1
- package/assets/{index-DCo_b6w_.js → index-CtNwLSfQ.js} +1 -1
- package/assets/{index-XhO07huK.js → index-CwxnxxLC.js} +1 -1
- package/assets/{index-BiuoTYZN.js → index-CxfClWVp.js} +1 -1
- package/assets/{index-2vrBl8sT.js → index-D1DRMy8J.js} +1 -1
- package/assets/{index-C1nKRU6X.js → index-D5knZcXs.js} +1 -1
- package/assets/{index-Bf-t954n.js → index-DEUtIbvw.js} +1 -1
- package/assets/{index-DLYns3Ur.js → index-DNn84jht.js} +1 -1
- package/assets/{index-CbbvhaCZ.js → index-DRYd17R7.js} +1 -1
- package/assets/{index-CheBwFGj.js → index-DVj7ZD_M.js} +1 -1
- package/assets/{index-zc0VnW3D.js → index-DfwSZDrU.js} +1 -1
- package/assets/{index-BsLfKftk.js → index-DkJikW0i.js} +2 -2
- package/assets/{index-m5SntnZ-.js → index-Dl5is3QK.js} +1 -1
- package/assets/{index-2cVzfxOB.js → index-Dyl2Q7D5.js} +1 -1
- package/assets/{index-CQqiVn6f.js → index-DzvSkfmg.js} +1 -1
- package/assets/{index-BTZdGMI1.js → index-ExQbvVoB.js} +1 -1
- package/assets/{index-Du25SJyr.js → index-HythI0O3.js} +3 -3
- package/assets/{index-_FQ-SV4x.js → index-LKOnauOl.js} +1 -1
- package/assets/{index-B56ftAbJ.js → index-RIvQTx8Y.js} +1 -1
- package/assets/{index-SqWDQHXX.js → index-R_BTue84.js} +1 -1
- package/assets/{index-CfG77Wyl.js → index-cT8CoAgc.js} +1 -1
- package/assets/{index-BU6Q-KL3.js → index-m4CDcFCJ.js} +1 -1
- package/assets/{index-CEiPmUBh.js → index-mX19fYJK.js} +1 -1
- package/assets/{index-Do9Xy8lr.js → index-vhIb1kkg.js} +1 -1
- package/assets/{index-C_o1Zom8.js → index-ywZbqGdK.js} +1 -1
- package/assets/{index.es-DXmbtBur.js → index.es-9cuw7AIG.js} +1 -1
- package/assets/{index.es-D3lybDuO.js → index.es-C3lxlyK0.js} +1 -1
- package/assets/{index.es-DXhNuD76.js → index.es-CdIjtqga.js} +4 -4
- package/assets/{localBatchGatewayRequest-CExVMgRH.js → localBatchGatewayRequest-D8nesUnT.js} +1 -1
- package/assets/{mana-convert-cZR9DTGN.js → mana-convert-CJwIMTsi.js} +1 -1
- package/assets/{mana-rate-cSpFrGml.js → mana-rate-BjJ4VPVX.js} +1 -1
- package/assets/{networks-DRyUri_T.js → networks-DJ8NMmpk.js} +1 -1
- package/assets/{onramp-B1GVlRI3.js → onramp-Dp70skLy.js} +1 -1
- package/assets/{openzeppelin-78-FJYh6.js → openzeppelin-o4LserP7.js} +1 -1
- package/assets/{parseNft-Ci4sX3gJ.js → parseNft-DyV_faDA.js} +2 -2
- package/assets/{parseSignature-uB_1oAEz.js → parseSignature-DcV_CWPU.js} +1 -1
- package/assets/{parseSignature-CTZ9pKw7.js → parseSignature-nmdMwQ7H.js} +3 -3
- package/assets/{passkeys-CA3YYnAU.js → passkeys-DSmRIXvD.js} +1 -1
- package/assets/{pay-with-exchange-DAyDjUqu.js → pay-with-exchange-CMlWCwA-.js} +1 -1
- package/assets/{qr-overlay-BTio6zaV.js → qr-overlay-Dr097QQh.js} +1 -1
- package/assets/{receive-yChzvN3k.js → receive-BA30V6DG.js} +1 -1
- package/assets/{resolveImplementation-CJVJqdzd.js → resolveImplementation-CMn2be6C.js} +1 -1
- package/assets/{rpc-DUGIeI5g.js → rpc-DInWGKvF.js} +1 -1
- package/assets/{secp256k1-C54GlILm.js → secp256k1-BTduTORI.js} +1 -1
- package/assets/{secp256k1-DwMMQidi.js → secp256k1-BUubbbM8.js} +1 -1
- package/assets/{secp256k1-B3QC3RZg.js → secp256k1-CfCSXbGA.js} +1 -1
- package/assets/{send-XMScNnJu.js → send-C9h_Nq4W.js} +1 -1
- package/assets/{send-batch-transaction-ByP9c7mI.js → send-batch-transaction-CxCYZMmx.js} +1 -1
- package/assets/{send-eip712-transaction-B6wWlCEV.js → send-eip712-transaction-DtfuXZ3d.js} +2 -2
- package/assets/{send-gasless-transaction-CCtF_hMm.js → send-gasless-transaction-DCcHZj4r.js} +2 -2
- package/assets/{send-transaction-D8-Foq0N.js → send-transaction-CS28b2D9.js} +2 -2
- package/assets/{sendMetaTransaction-CdI6QA-v.js → sendMetaTransaction-BZ7AB8iM.js} +1 -1
- package/assets/{sendRawTransaction-BZO-KbQ7.js → sendRawTransaction-DYCcmGM8.js} +3 -3
- package/assets/{serializeTransaction-LcE2ddKR.js → serializeTransaction-BURsrWBP.js} +1 -1
- package/assets/{session-proposal-BGYLVtWS.js → session-proposal-Fqbqs3BQ.js} +1 -1
- package/assets/{session-request-B4DLpo1c.js → session-request-SGm1lg_K.js} +2 -2
- package/assets/{signing-D-serK4b.js → signing-DYbMGJXG.js} +3 -3
- package/assets/{socials-DOdAv2Kb.js → socials-I4tJUDyJ.js} +1 -1
- package/assets/{swaps-DDatq7je.js → swaps-CwWUu5zw.js} +1 -1
- package/assets/{thirdweb-tS0phgDU.js → thirdweb-ClhSV9RB.js} +3 -3
- package/assets/{to-serializable-transaction-BjLSxJFE.js → to-serializable-transaction-CJKUUbtG.js} +2 -2
- package/assets/{trade-encoding-CJDVWYcF.js → trade-encoding-9Q36L1oR.js} +1 -1
- package/assets/{transactionReceipt-C1bkyZl1.js → transactionReceipt-D6SA5WI-.js} +1 -1
- package/assets/{transactions-BQh9q_5C.js → transactions-B_RyJBLE.js} +1 -1
- package/assets/{useCreditPacks-puL7tAtr.js → useCreditPacks-CQLtHnQk.js} +1 -1
- package/assets/{useInfiniteGrid-BxfEkchv.js → useInfiniteGrid-CaF2w2LC.js} +1 -1
- package/assets/useManaRate-B4xS82Ma.js +1 -0
- package/assets/{useSecondarySales-W8e5_GEF.js → useSecondarySales-BL0-GE0K.js} +1 -1
- package/assets/{useStore-B7PIu8Uw.js → useStore-GXb9v5v6.js} +1 -1
- package/assets/{useTheme-CbnMJ7mn.js → useTheme-JT9c87P9.js} +1 -1
- package/assets/{verifyHash-CjYiVJ2q.js → verifyHash-BNsLW48c.js} +1 -1
- package/assets/{w3m-modal-q4l3tcYV.js → w3m-modal-C-8IZr2V.js} +1 -1
- package/assets/{w3m-modal-BFtxRT9O.js → w3m-modal-Dnehziva.js} +1 -1
- package/assets/{wait-for-tx-receipt-DTWTovYR.js → wait-for-tx-receipt-BXVft6N8.js} +1 -1
- package/assets/{wallets-Dka8GiAQ.js → wallets-BcnalF0U.js} +5 -5
- package/assets/{web-connector-BB8cyTKu.js → web-connector-AcMV6Y4R.js} +3 -3
- package/assets/{writeContract-CznbjJyh.js → writeContract-Cnl1Hojy.js} +1 -1
- package/assets/{zoraTestnet-DhqU039o.js → zoraTestnet-Dwinu5_g.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/assets/Cart-CktbEy9V.js +0 -676
- package/assets/index-D6kQ69Bn.js +0 -2815
- package/assets/useManaRate-x5FL9eAV.js +0 -1
|
@@ -0,0 +1,695 @@
|
|
|
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-BuQvO-I_.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-C3qgLsBY.js";import{u as Oa}from"./useManaRate-B4xS82Ma.js";import{r as Ha}from"./mana-rate-BjJ4VPVX.js";import{i as Va,j as Ga,f as Da,n as Ya,h as Ja,A as Xa}from"./authorizations-CzNpcwj-.js";import{b as Me}from"./buy-VVCbwxmX.js";import{b as Za,w as es,S as ts,G as as}from"./buy-gasless-Cw6IFMAC.js";import{u as ss,M as ns,R as le,r as is,c as rs}from"./useCreditPacks-CQLtHnQk.js";import{i as os,a as cs}from"./errors-w45osmm9.js";import{E as ls}from"./ErrorNotice-DwAAnUwA.js";import{u as rt}from"./mana-convert-CJwIMTsi.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CXBJm_wN.js";import"./intl-CBcMB1D2.js";import"./trade-encoding-9Q36L1oR.js";import"./sendMetaTransaction-BZ7AB8iM.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-30555147117.commit-c0cc5df/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};
|