@dcl/shop 1.4.1-31270430603.commit-6f247b1 → 1.4.1

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.
Files changed (176) hide show
  1. package/_assets/{Activity-DQeezIhZ.js → Activity-Bp8Sw4qK.js} +24 -24
  2. package/_assets/{AnimatedBackground-DkBaXe2D.js → AnimatedBackground-lL_07dfc.js} +1 -1
  3. package/_assets/{Assets-Be8wdnDs.js → Assets-IJnjhA4j.js} +9 -9
  4. package/_assets/{Assets.styles-Dmp_09Pl.js → Assets.styles-DvKHdPv2.js} +1 -1
  5. package/_assets/{Authorizations-CBsxdb6f.js → Authorizations-Dik9aSxH.js} +1 -1
  6. package/_assets/Cart-pNR-1Udw.js +696 -0
  7. package/_assets/{CircularProgress-BqBx5KmY.js → CircularProgress-Be3b2-j-.js} +1 -1
  8. package/_assets/{Collection-KKdZTxcU.js → Collection-CC0NQbio.js} +1 -1
  9. package/_assets/{CollectionCarousel-ifFZguEF.js → CollectionCarousel-CbSaEpnt.js} +2 -2
  10. package/_assets/{Confetti-bZyFgxL6.js → Confetti-CsLfYVYK.js} +1 -1
  11. package/_assets/{Creator-B4NUVn60.js → Creator-BHrSc3yG.js} +1 -1
  12. package/_assets/{ErrorNotice-DuC-viO2.js → ErrorNotice-85K9YN9v.js} +1 -1
  13. package/_assets/{ExchangeController-C0IDTJ-J.js → ExchangeController-pCPaWVPt.js} +1 -1
  14. package/_assets/{Faq-DhMmW24o.js → Faq-TM-W-SNb.js} +1 -1
  15. package/_assets/{GetCredits-CRvP99px.js → GetCredits-DdXr31aY.js} +1 -1
  16. package/_assets/{Grow-CHjLjRky.js → Grow-ChVTGdeq.js} +1 -1
  17. package/_assets/{HelpersUtil-BGPj3EZg.js → HelpersUtil-Ic5GpN9l.js} +1 -1
  18. package/_assets/{ItemDetail-DxMKysaX.js → ItemDetail-CyOs-AQj.js} +1 -1
  19. package/_assets/LazyEmoteControls-CkOxDI6U.js +2 -0
  20. package/_assets/{LoadMore-BzSo65Tc.js → LoadMore-CZrX5Gv7.js} +1 -1
  21. package/_assets/{ManaPricingBanner.styles-zRf3NUIl.js → ManaPricingBanner.styles-BKaFLBUK.js} +1 -1
  22. package/_assets/{MyAssets-Dm8olAJC.js → MyAssets-BQCzzNvz.js} +2 -2
  23. package/_assets/{MyFavorites-DHzrxB0n.js → MyFavorites-BqzCIYTK.js} +1 -1
  24. package/_assets/{NotFound-DRU7a55t.js → NotFound-BHSNy_W9.js} +1 -1
  25. package/_assets/{NotificationsBell-CAk_HGiT.js → NotificationsBell-Cayv1bNv.js} +1 -1
  26. package/_assets/{OutfitDetail-B6UcJsIj.js → OutfitDetail-BTWKm6JG.js} +1 -1
  27. package/_assets/{OutfitPreview-BXxZ73e2.js → OutfitPreview-D11FWLSw.js} +1 -1
  28. package/_assets/{OutfitStudio-C68xzNBe.js → OutfitStudio-dGwku2rf.js} +1 -1
  29. package/_assets/{StoreSettings-CQS2xr81.js → StoreSettings-CitNcyvk.js} +1 -1
  30. package/_assets/{Success-DAfeTSA6.js → Success-D4YuNuG8.js} +1 -1
  31. package/_assets/{SwapController-BFkUbrL5.js → SwapController-C5PTgP9M.js} +1 -1
  32. package/_assets/{Tooltip-DHuweV3B.js → Tooltip-B8fVdcBn.js} +1 -1
  33. package/_assets/{TradeService-C6i0Uy7o.js → TradeService-gwq3auT8.js} +1 -1
  34. package/_assets/{W3MFrameProviderSingleton-Eg5Kuv_w.js → W3MFrameProviderSingleton-CpAC0lb5.js} +3 -3
  35. package/_assets/{WebCryptoP256-DpIVNzIo.js → WebCryptoP256-BdZ7qw2f.js} +1 -1
  36. package/_assets/{authorizations-6b06i7gn.js → authorizations-DF77DF8l.js} +1 -1
  37. package/_assets/{basic-B3jMyD2k.js → basic-BzrBYDLn.js} +1 -1
  38. package/_assets/{biconomy-CWYteJvi.js → biconomy-D0NqkYS4.js} +1 -1
  39. package/_assets/{builder-C8V_I1nE.js → builder-NgL-D1DH.js} +1 -1
  40. package/_assets/{buy-NxNI2INB.js → buy-BO3reV5y.js} +1 -1
  41. package/_assets/{buy-gasless-DJ0IZS8a.js → buy-gasless-D-P_OEFk.js} +1 -1
  42. package/_assets/{categories-Cy_yJicQ.js → categories-DEDiLarq.js} +1 -1
  43. package/_assets/{ccip-BMxLvDAk.js → ccip-CKxxDuCA.js} +1 -1
  44. package/_assets/{ccip-DIS4efMm.js → ccip-CrlybRWE.js} +1 -1
  45. package/_assets/{collectionPage.styles-B2QHM1V9.js → collectionPage.styles-B7luoUwY.js} +1 -1
  46. package/_assets/{controller-Bjq0bzLO.js → controller-D-WxJPwg.js} +2 -2
  47. package/_assets/{core-CyZpPMiz.js → core-B2vVQmfh.js} +4 -4
  48. package/_assets/{createSvgIcon-uGsAEagr.js → createSvgIcon-BpHWx1Ka.js} +1 -1
  49. package/_assets/{custom-DJGLIE0w.js → custom-CxNQPA4R.js} +1 -1
  50. package/_assets/{data-capture-D8-2TG_m.js → data-capture-COq-EdMa.js} +1 -1
  51. package/_assets/{email-Bq2IDC7V.js → email-T9V3sqd1.js} +1 -1
  52. package/_assets/{embedded-wallet-vciiV5m9.js → embedded-wallet-Dg7uu1gY.js} +1 -1
  53. package/_assets/{emotion-styled.browser.esm-le8W8UJJ.js → emotion-styled.browser.esm-DGNmaOEg.js} +1 -1
  54. package/_assets/{engine-CE7-MobS.js → engine-B6OKL1kN.js} +1 -1
  55. package/_assets/{errors-D7H_WTeM.js → errors-ByuDglQO.js} +1 -1
  56. package/_assets/{estimate-l1-fee-DGDdzGNC.js → estimate-l1-fee-U77A6DZp.js} +1 -1
  57. package/_assets/{execute-6A1P_JZK.js → execute-BKGpV3HT.js} +2 -2
  58. package/_assets/{features-BD0QGjtd.js → features-B_0m5qAO.js} +1 -1
  59. package/_assets/{fetchTokenMetadata-CwRyyhYw.js → fetchTokenMetadata-BLkwh0vx.js} +2 -2
  60. package/_assets/{field.styles-zGVzLgaF.js → field.styles-Di2XxH4G.js} +1 -1
  61. package/_assets/{get-ecosystem-wallet-info-C-bwQVNz.js → get-ecosystem-wallet-info-DcdrlNuu.js} +1 -1
  62. package/_assets/{getBalance-CdJjWg93.js → getBalance-XiFtLwlO.js} +1 -1
  63. package/_assets/{getNFT-BB0zV8BQ.js → getNFT-Bmd84BZn.js} +1 -1
  64. package/_assets/{getNFT-B3T6-GG9.js → getNFT-BywN0Kux.js} +1 -1
  65. package/_assets/{grid.styles-D56NEyVk.js → grid.styles-CHyL7A8J.js} +1 -1
  66. package/_assets/{hashTypedData-BfQCIp1T.js → hashTypedData-CPoOrHdV.js} +1 -1
  67. package/_assets/{hashTypedData-tls10eRW.js → hashTypedData-D6j6Ztal.js} +1 -1
  68. package/_assets/{in-app-Dxj5_ooo.js → in-app-bZq5TT4x.js} +1 -1
  69. package/_assets/{in-app-wallet-calls-D7LRfuMY.js → in-app-wallet-calls-zHwhzKhq.js} +1 -1
  70. package/_assets/{index-B2pBojSS.js → index-2FoefM9Q.js} +1 -1
  71. package/_assets/{index-CkXoRRLL.js → index-5bRECx6a.js} +1 -1
  72. package/_assets/{index-6WleM69g.js → index-6jfgxkro.js} +1 -1
  73. package/_assets/{index-CM1b_teH.js → index-B1FHWlJe.js} +1 -1
  74. package/_assets/{index-Ce-K7c-x.js → index-BFMoyHW0.js} +1 -1
  75. package/_assets/{index-rl9CrIhb.js → index-BHzsqUc8.js} +1 -1
  76. package/_assets/{index-DgewRnrV.js → index-BPlrOFTC.js} +1 -1
  77. package/_assets/{index-CvvxPk5n.js → index-BQ9JyrRe.js} +1 -1
  78. package/_assets/{index-Cn8Ycl7U.js → index-BSn1_2Zj.js} +1 -1
  79. package/_assets/{index-BxeOV6JU.js → index-BZ1hhBx4.js} +1 -1
  80. package/_assets/{index-Ds6wlgdd.js → index-BZGM9FWk.js} +1 -1
  81. package/_assets/{index-CqZAAjV4.js → index-BbJAHpzm.js} +1 -1
  82. package/_assets/{index-DtNSE3iA.js → index-BcgGNlqh.js} +2 -2
  83. package/_assets/{index-BjhGePFb.js → index-BsW8Eyey.js} +1 -1
  84. package/_assets/{index-CWoqfVJN.js → index-ByuFbmZ8.js} +1 -1
  85. package/_assets/{index-D-GU34jk.js → index-C4jkL4id.js} +1 -1
  86. package/_assets/{index-DvpyjCuv.js → index-C617s7dD.js} +1 -1
  87. package/_assets/{index-DmrickTh.js → index-CNswf2xV.js} +1 -1
  88. package/_assets/{index-BrSH0ovF.js → index-C__aQGZ3.js} +1 -1
  89. package/_assets/{index-BIGwBKId.js → index-CfoYiHeb.js} +2 -2
  90. package/_assets/{index-BaWON9X8.js → index-Cm_4zTDf.js} +3 -3
  91. package/_assets/{index-CvNn1FrO.js → index-Cn8WVps3.js} +1 -1
  92. package/_assets/{index-uxUFNDjH.js → index-CntdB4i7.js} +1 -1
  93. package/_assets/{index-r4Vqxt3J.js → index-Coy9djZY.js} +1 -1
  94. package/_assets/{index-DcPIkCBV.js → index-CtQ9l7ML.js} +1 -1
  95. package/_assets/{index-r6fQharZ.js → index-CteyodZT.js} +3 -3
  96. package/_assets/{index-JLXNJ-FJ.js → index-CuVgNl3Y.js} +1 -1
  97. package/_assets/{index-0WsFyjb9.js → index-CvqOZGzt.js} +1 -1
  98. package/_assets/{index-CRURx4Md.js → index-CxWIzN3m.js} +1 -1
  99. package/_assets/{index-By7cYEg3.js → index-D00IKQW6.js} +1 -1
  100. package/_assets/{index-CX3rxg56.js → index-D24PzU1R.js} +3 -3
  101. package/_assets/{index-WSX4XsKk.js → index-D3IKI6V4.js} +1 -1
  102. package/_assets/{index-qpb484nj.js → index-D4yUYJLc.js} +1 -1
  103. package/_assets/{index-DfGov7uP.js → index-D7XGzB3c.js} +1 -1
  104. package/_assets/{index-C_zfDYD3.js → index-DF4Ha-75.js} +1 -1
  105. package/_assets/{index-Cn7T_7hU.js → index-DIketzHJ.js} +1 -1
  106. package/_assets/{index-Rkb7cKpK.js → index-DPM_2inZ.js} +1 -1
  107. package/_assets/{index-JUiBY9Lz.js → index-DPtintqP.js} +1 -1
  108. package/_assets/{index-8eHax2b8.js → index-Di-TSk-N.js} +1 -1
  109. package/_assets/{index-CKakyONJ.js → index-Dp3NEgRA.js} +2 -2
  110. package/_assets/{index-gZRkgGqq.js → index-DrWafdvv.js} +1 -1
  111. package/_assets/{index-CZUqGTba.js → index-DtzuonLF.js} +1 -1
  112. package/_assets/{index-DEQmdBhJ.js → index-DwSMiBZJ.js} +1 -1
  113. package/_assets/{index-DaMZD1qa.js → index-Dwdhqx6d.js} +1 -1
  114. package/_assets/{index-Dmu1B_ZB.js → index-ExVTqMiG.js} +1 -1
  115. package/_assets/{index-pRv8UZF7.js → index-V2TPPzBO.js} +1 -1
  116. package/_assets/{index-rNWNVrZ1.js → index-Xxhqhd7B.js} +1 -1
  117. package/_assets/{index-QiXJSvFS.js → index-dfp4J94C.js} +1 -1
  118. package/_assets/{index-Cjr3LPY9.js → index-drIus9if.js} +1 -1
  119. package/_assets/{index-DoeDo6Jt.js → index-hUIzKCfu.js} +1 -1
  120. package/_assets/{index-XKsZltya.js → index-uGopMLx_.js} +12 -12
  121. package/_assets/{index-aUkuwk5s.js → index-yx-xGak5.js} +1 -1
  122. package/_assets/{index.es-CmfHAndG.js → index.es-7a-YRioH.js} +1 -1
  123. package/_assets/{index.es-Bxxn5nWH.js → index.es-BFjxQxKe.js} +1 -1
  124. package/_assets/{index.es-DSw1chJx.js → index.es-DWauw0u3.js} +4 -4
  125. package/_assets/{localBatchGatewayRequest-B4ikh31S.js → localBatchGatewayRequest-0VkJzsEN.js} +1 -1
  126. package/_assets/{networks-DwDEHpsZ.js → networks-DyQsWWgA.js} +1 -1
  127. package/_assets/{onramp-CyO-FlGi.js → onramp-DzK_7EqG.js} +1 -1
  128. package/_assets/{openzeppelin-C2PsbheP.js → openzeppelin-BtnpZFcF.js} +1 -1
  129. package/_assets/{parseNft-DFPqYYyx.js → parseNft-DVNQcQTW.js} +2 -2
  130. package/_assets/{parseSignature-DoIbFyjz.js → parseSignature-d_qU1nsa.js} +3 -3
  131. package/_assets/{parseSignature-BJKOmduM.js → parseSignature-uahxpo6h.js} +1 -1
  132. package/_assets/{passkeys-B1G5vtEP.js → passkeys-DCXgcJ3i.js} +1 -1
  133. package/_assets/{pay-with-exchange-CuxALGjP.js → pay-with-exchange-BAKpQWUa.js} +1 -1
  134. package/_assets/{qr-overlay-CCLFVyK-.js → qr-overlay-cF8AYPXz.js} +1 -1
  135. package/_assets/{receive-CUwvToni.js → receive-DKeQiKpb.js} +1 -1
  136. package/_assets/{resolveImplementation-BQ6Thgp9.js → resolveImplementation-BbMBWFik.js} +1 -1
  137. package/_assets/{rpc-B_jvlN9I.js → rpc-B_5Ot3q6.js} +1 -1
  138. package/_assets/{secp256k1-BZ9zr6pW.js → secp256k1-BJ5_5ze6.js} +1 -1
  139. package/_assets/{secp256k1-C8c3NOvt.js → secp256k1-C2MsrfGW.js} +1 -1
  140. package/_assets/{secp256k1-Dqep9hlV.js → secp256k1-vgDnLeQE.js} +1 -1
  141. package/_assets/{send-C0eWesFn.js → send-DRkbPGAy.js} +1 -1
  142. package/_assets/{send-batch-transaction-BInkGkrI.js → send-batch-transaction-C98vx0Si.js} +1 -1
  143. package/_assets/{send-eip712-transaction-B06D1j4t.js → send-eip712-transaction-B9uhwtxq.js} +2 -2
  144. package/_assets/{send-gasless-transaction-Bj7Mrgrw.js → send-gasless-transaction-DlAx-hhk.js} +2 -2
  145. package/_assets/{send-transaction-GWauSIGJ.js → send-transaction-D7omgpzp.js} +2 -2
  146. package/_assets/{sendMetaTransaction-CWF6fAyn.js → sendMetaTransaction-o2u8XwNS.js} +1 -1
  147. package/_assets/{sendRawTransaction-CmiKwsmY.js → sendRawTransaction-DevIof93.js} +3 -3
  148. package/_assets/{serializeTransaction-mCSHDU72.js → serializeTransaction-DLeETOYT.js} +1 -1
  149. package/_assets/{session-proposal-DpwjDKHE.js → session-proposal-KU3_N1na.js} +1 -1
  150. package/_assets/{session-request-D1PyfYXe.js → session-request-uPrgrHzK.js} +2 -2
  151. package/_assets/{signing-sq4HwF0l.js → signing-QBKrHvr9.js} +3 -3
  152. package/_assets/{skeleton.styles-BA-3FXA6.js → skeleton.styles-BC9MqXiU.js} +1 -1
  153. package/_assets/{socials-BYCvSYmO.js → socials-CoKeQXiF.js} +1 -1
  154. package/_assets/{styled-CfsHUR3m.js → styled-DOIj5nPF.js} +1 -1
  155. package/_assets/{swaps-DJ9anSlW.js → swaps-CRzxJol6.js} +1 -1
  156. package/_assets/{thirdweb-4Ly_9zDM.js → thirdweb-C12p7UHc.js} +3 -3
  157. package/_assets/{to-serializable-transaction-DMTWIns9.js → to-serializable-transaction-VMfkzTnh.js} +2 -2
  158. package/_assets/{transactionReceipt-C7G8JUWW.js → transactionReceipt-BD6aaYgU.js} +1 -1
  159. package/_assets/{transactions-JgsCtTXR.js → transactions-eYCJ_4w6.js} +1 -1
  160. package/_assets/{useCreditPacks-C2hta9uc.js → useCreditPacks-A5RBl1MB.js} +1 -1
  161. package/_assets/{useImportable-DDTcXQiF.js → useImportable-DsSOJu2h.js} +1 -1
  162. package/_assets/{useInfiniteGrid-DJYp6e14.js → useInfiniteGrid-BSzq15pV.js} +1 -1
  163. package/_assets/{useStore-B52kr_HL.js → useStore-Cus0x1de.js} +1 -1
  164. package/_assets/{useTheme-C0kfYwbd.js → useTheme-BRanpp9G.js} +1 -1
  165. package/_assets/{verifyHash-CyikVd00.js → verifyHash-B4ZiNM58.js} +1 -1
  166. package/_assets/{w3m-modal-nKn_LBnk.js → w3m-modal-CC3uZxtJ.js} +1 -1
  167. package/_assets/{w3m-modal-BHusWeG8.js → w3m-modal-DjOtYjTK.js} +1 -1
  168. package/_assets/{wait-for-tx-receipt-BKcsYktk.js → wait-for-tx-receipt-BnCyfeD5.js} +1 -1
  169. package/_assets/{wallets-BDzJUQTB.js → wallets-HnCmZe2C.js} +5 -5
  170. package/_assets/{web-connector-D0iuW-p0.js → web-connector-Bx6u3JDC.js} +3 -3
  171. package/_assets/{writeContract-QVeyHE-4.js → writeContract-BD-47Gns.js} +1 -1
  172. package/_assets/{zoraTestnet-Dh4cz0T9.js → zoraTestnet-Uh6KMdOq.js} +1 -1
  173. package/index.html +11 -11
  174. package/package.json +2 -2
  175. package/_assets/Cart-a-P1Sz4f.js +0 -696
  176. package/_assets/LazyEmoteControls-yC8oH7NF.js +0 -2
@@ -1,696 +0,0 @@
1
- import{j as t,L as We,r as M,b as na,a as ia}from"./react-BYHuwl8r.js";import{t as de,s as i,b as s,L as le,ax as ra,ay as ze,az as oa,J as ca,I as O,A as Pt,K as Le,y as la,X as H,am as lt,v as da,w as ua,l as ha,aA as pa,D as ga,aB as ma,an as xa,aC as fa,aD as dt,aE as ya,aF as ba,z as va,aG as ut,Z as V,aH as ht,aI as wa,k as ae,r as Ca,c as pt,aJ as ja,C as ka,aK as gt,aL as Ee,aM as $a,aN as fe,aO as ye,aP as mt,g as xt,f as ft,aQ as Sa}from"./index-XKsZltya.js";import{M as Ma,S as Ta,C as Ia,H as Pa,a as Aa,T as za,X as Ea,b as Ra,B as Ba,c as qa,d as yt,e as _a,f as Ce,P as At,m as Fa,g as Wa,h as La,i as Ka,j as Na,k as zt,l as je,L as Qa,n as Ua,o as bt,p as vt,W as Ga,q as Ha,r as Oa,s as Da,A as Va,t as Ja,u as Xa,v as Ya,w as Za,x as es,y as ts,z as as,D as ss,E as ns,F as is,G as rs,I as os,J as cs,K as ls,N as ds,O as us,Q as Re,R as hs,U as ps,V as gs,Y as ms,Z as wt,_ as Ct,$ as xs,a0 as fs,a1 as ys,a2 as bs,a3 as jt,a4 as vs}from"./CollectionCarousel-ifFZguEF.js";import{f as ws,h as Cs,a as js,n as ks,i as $s,A as Ss}from"./authorizations-6b06i7gn.js";import{g as Ms,h as Be,p as Ts}from"./buy-NxNI2INB.js";import{b as Is,w as Ps,S as kt,G as As}from"./buy-gasless-DJ0IZS8a.js";import{u as zs,M as Es,R as be,r as Rs,c as Bs,p as $t,a as qe}from"./useCreditPacks-C2hta9uc.js";import{i as qs,a as _s}from"./errors-D7H_WTeM.js";import{E as Fs}from"./ErrorNotice-DuC-viO2.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-CFqPm_mN.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-CWF6fAyn.js";const{colors:se,radius:Ws}=de,Ls=i.div`
2
- display: flex;
3
- align-items: center;
4
- justify-content: center;
5
- gap: 8px;
6
- width: 100%;
7
- `,Ks=i.span`
8
- font-size: 16px;
9
- line-height: 22px;
10
- color: ${se.text2};
11
- text-transform: capitalize;
12
- white-space: nowrap;
13
- `,Ns=i.div`
14
- display: flex;
15
- flex-direction: column;
16
- gap: 12px;
17
- /* The list is the modal's elastic region: inside a viewport-capped card it gives up height first, so
18
- the pack picker, total and Cancel/Buy below it stay on screen without scrolling. The floor is an
19
- explicit ~one row because a scroll container's automatic minimum size is zero — it would otherwise
20
- collapse to nothing on a short screen. */
21
- min-height: 120px;
22
- max-height: 360px;
23
- overflow-y: auto;
24
- width: 100%;
25
- scrollbar-width: thin;
26
- scrollbar-color: #a2a2a2 ${se.media};
27
-
28
- &::-webkit-scrollbar {
29
- width: 8px;
30
- }
31
- &::-webkit-scrollbar-track {
32
- background: ${se.media};
33
- border-radius: 10px;
34
- }
35
- &::-webkit-scrollbar-thumb {
36
- background: #a2a2a2;
37
- border-radius: ${Ws.btn};
38
- }
39
- `,Qs=i.span`
40
- margin-left: 8px;
41
- font-size: 13px;
42
- font-weight: 600;
43
- color: ${se.muted};
44
- `,Us=i.div`
45
- display: flex;
46
- align-items: center;
47
- justify-content: space-between;
48
- gap: 12px;
49
- padding: 0 0 12px;
50
- font-size: 14px;
51
- color: ${se.muted};
52
-
53
- & strong {
54
- display: inline-flex;
55
- align-items: center;
56
- gap: 6px;
57
- font-size: 20px;
58
- font-weight: 700;
59
- color: ${se.text};
60
- }
61
- `;function Gs(o){const{phase:u,balanceCredits:P,onClose:A}=o,F=u==="processing",J=u==="error"?s("cartCheckout.errorTitle"):u==="nofunds"?s("cartCheckout.titleNoFunds"):u==="choose"?s("buyModal.choosePayment"):s("cartCheckout.titleBuy"),X=u==="processing";return t.jsxs(Ma,{role:"dialog","aria-modal":"true","aria-label":s("cartCheckout.dialogAria"),children:[t.jsx(Ta,{onClick:F?void 0:A,"aria-hidden":!0}),t.jsxs(Ia,{"data-tall":X||void 0,children:[t.jsxs(Pa,{children:[t.jsxs(Aa,{children:[t.jsx(za,{children:J}),!F&&t.jsx(Ea,{onClick:A,"aria-label":s("buyModal.close"),children:t.jsx(Ra,{})})]}),t.jsxs(Ba,{children:[t.jsx(qa,{children:u==="nofunds"?s("buyModal.dclBalance"):s("buyModal.myCreditsBalance")}),t.jsx(yt,{}),t.jsx(_a,{children:le(P)})]})]}),u==="choose"&&t.jsxs(Ce,{children:[t.jsxs(Us,{children:[t.jsx("span",{children:s("cart.purchaseSummary")}),t.jsxs("strong",{children:[t.jsx(yt,{}),le(o.totalCredits??0)]})]}),t.jsx(At,{options:o.options??[],totalCents:o.totalCents??0,onPay:o.onPay??(()=>{}),rateNote:(()=>{const z=Fa(o.totalCents??0,o.totalManaWei??0n);return z!=null?s("buyModal.manaRate",{mana:z.toLocaleString("en",{maximumFractionDigits:2})}):null})()})]}),u==="processing"&&t.jsx(Hs,{stage:o.stage??"reserving",step:o.step??1,total:o.total??1,isSelfCustody:!!o.isSelfCustody,signatures:o.signatures}),u==="nofunds"&&t.jsx(Os,{lines:o.lines??[],shortfallCredits:o.shortfallCredits??0,packs:o.packs??[],selectedPack:o.selectedPack??"",onSelectPack:o.onSelectPack??(()=>{}),onBuyPacks:o.onBuyPacks??(()=>{}),onCancel:A}),u==="error"&&t.jsxs(Ce,{children:[t.jsxs(Wa,{"data-testid":"buy-error",children:[t.jsx(La,{src:Ka,alt:"",width:64,height:80}),t.jsxs(Na,{children:[t.jsx("b",{children:s("cartCheckout.errorHeadline")})," ",o.message??s("cartCheckout.errorBody")]})]}),t.jsxs(zt,{children:[t.jsx(je,{"data-variant":"outline",onClick:A,children:s("buyModal.cancel")}),t.jsx(je,{"data-variant":"purple",onClick:o.onRetry??A,children:s("cartCheckout.tryAgain")})]})]})]})]})}function Hs({stage:o,step:u,total:P,isSelfCustody:A,signatures:F}){const J=o==="reserving",X=P>0?Math.min(100,Math.round(u/P*100)):0,z=A&&F&&F.total>1,ne=o==="awaiting-signature"?A?z?s("cartCheckout.confirmMultiple",{current:F.current,total:F.total}):s("buyModal.confirmToContinue"):s("buyModal.completingTransaction"):o==="settling"?s("buyModal.completingTransaction"):s("cartCheckout.preparing");return t.jsxs(Ce,{"data-processing":!0,children:[t.jsx(Qa,{src:ra,alt:"",width:61,height:61}),t.jsx(Ua,{children:ne}),J?t.jsxs(Ls,{children:[t.jsx(bt,{"aria-hidden":!0,children:t.jsx(vt,{"data-step":!0,style:{width:`${X}%`}})}),P>1?t.jsxs(Ks,{children:[u,"/",P]}):null]}):t.jsx(bt,{"aria-hidden":!0,children:t.jsx(vt,{})})]})}function Os({lines:o,shortfallCredits:u,packs:P,selectedPack:A,onSelectPack:F,onBuyPacks:J,onCancel:X}){const z=P.find(n=>n.id===A),ne=o.reduce((n,L)=>n+(L.quantity??1),0);return t.jsxs(Ce,{children:[t.jsxs(Ga,{"data-testid":"nofunds-warning",children:[t.jsx(Ha,{}),t.jsxs(Oa,{children:[t.jsx("b",{children:s("buyModal.insufficientFunds")})," ",s("buyModal.warningNeedToBuy")," ",t.jsx("b",{children:s("buyModal.warningCreditsAmount",{count:Math.max(0,u)})})," ",s("buyModal.warningToPurchase",{count:ne}),ze()?null:t.jsxs(t.Fragment,{children:[t.jsx("br",{}),t.jsx(Da,{href:oa("/credits"),target:"_blank",rel:"noopener noreferrer",children:s("buyModal.warningLearnMore")})]})]})]}),t.jsx(Ns,{children:o.map(n=>{const L=n.quantity??1;return t.jsxs(Va,{children:[t.jsx(Ja,{children:n.item.thumbnail?t.jsx("img",{src:n.item.thumbnail,alt:""}):null}),t.jsxs(Xa,{children:[t.jsxs("div",{children:[t.jsxs(Ya,{title:n.item.name,children:[n.item.name||s("buyModal.itemFallback"),L>1?t.jsx(Qs,{children:s("cartCheckout.qty",{count:L})}):null]}),n.item.creator?t.jsx(Za,{address:n.item.creator}):null]}),t.jsxs(es,{children:[t.jsx(ts,{}),t.jsx("span",{children:le(n.priceCredits*L)})]})]})]},n.item.id)})}),ze()?null:t.jsxs(t.Fragment,{children:[t.jsx(as,{children:P.map(n=>{const L=n.id===A;return t.jsxs(ss,{"data-testid":"credit-pack","data-on":L||void 0,onClick:()=>F(n.id),children:[t.jsx(ns,{src:is,alt:""}),t.jsx(rs,{children:le(n.credits)}),t.jsxs(os,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),t.jsxs(cs,{children:[t.jsxs(ls,{children:[t.jsx(ds,{}),t.jsx("span",{children:le((z==null?void 0:z.credits)??0)})]}),t.jsxs(us,{children:["$",((z==null?void 0:z.usd)??0).toFixed(2)]})]})]}),t.jsxs(zt,{children:[t.jsx(je,{"data-variant":"outline",onClick:X,children:s("buyModal.cancel")}),ze()?null:t.jsx(je,{"data-variant":"gradient",onClick:J,children:s("buyModal.buy")})]})]})}const{colors:c,gradients:Ds,radius:te}=de,Et="@media (max-width: 1080px)",I="@media (max-width: 880px)",St=i.div`
62
- max-width: 1510px;
63
- margin: 0 auto;
64
- /* Grows into the page's leftover height and passes it down to Upsell, so the white cross-sell band ends at
65
- the footer rather than leaving a gray strip. Needs .page[data-route="/cart"] to be a flex column. */
66
- width: 100%;
67
- flex: 1 0 auto;
68
- display: flex;
69
- flex-direction: column;
70
-
71
- ${I} {
72
- padding-bottom: 188px; /* room for the fixed summary bar */
73
- }
74
- `,Mt=i.button`
75
- display: inline-flex;
76
- align-items: center;
77
- gap: 6px;
78
- margin: 0 0 16px;
79
- padding: 0;
80
- border: 0;
81
- background: none;
82
- color: ${c.text2};
83
- font-size: 14px;
84
- font-weight: 600;
85
- letter-spacing: 0.02em;
86
- text-transform: uppercase;
87
- cursor: pointer;
88
- transition: color 0.15s ease;
89
-
90
- &:hover {
91
- color: ${c.accent};
92
- }
93
- & .ico {
94
- width: 18px;
95
- height: 18px;
96
- }
97
-
98
- ${I} {
99
- display: none;
100
- }
101
- `,Vs=i.div`
102
- display: grid;
103
- grid-template-columns: minmax(0, 1fr) 615px;
104
- gap: 24px;
105
- align-items: start;
106
-
107
- ${Et} {
108
- grid-template-columns: 1fr;
109
- }
110
- `,Tt=i.div`
111
- position: relative;
112
- /* The gray band is 733px in Figma (1553-317103) — taller than the panels inside it, deliberately. Without
113
- this it collapsed to the panels' height, and the page shell's own viewport-filling min-height then padded
114
- the page out BELOW the cross-sell, so a strip of gray showed under "You might also like" instead of the
115
- footer. Giving the band its designed height puts the leftover space where the design wants it. */
116
- min-height: 733px;
117
- /* Gray below the panels so the band never hugs the last card: Figma's band runs y152–950 with the
118
- content ending at 854. The min-height above only covers a SHORT cart — once the list outgrows it
119
- the band tracks the content, and without this padding it would butt straight into the purple. */
120
- padding-bottom: 96px;
121
-
122
- &::before {
123
- content: '';
124
- position: absolute;
125
- top: -28px;
126
- bottom: 0;
127
- left: 50%;
128
- width: 100vw;
129
- transform: translateX(-50%);
130
- background: ${c.media};
131
- z-index: 0;
132
- }
133
- & > * {
134
- position: relative;
135
- z-index: 1;
136
- }
137
-
138
- ${I} {
139
- /* The single-column layout is already taller than the desktop band, and the fixed summary bar sits over
140
- the bottom of it — a floor here would only add empty gray. */
141
- min-height: 0;
142
-
143
- /* The fixed summary bar already reserves room at the bottom on mobile (see Checkout). */
144
- padding-bottom: 32px;
145
-
146
- &::before {
147
- top: -16px; /* .page's mobile padding */
148
- }
149
- }
150
- `,Js=i.div`
151
- min-width: 0;
152
- display: flex;
153
- flex-direction: column;
154
- gap: 12px;
155
- `,Xs=i.div`
156
- display: flex;
157
- align-items: center;
158
- justify-content: space-between;
159
- gap: 12px;
160
- background: ${c.white};
161
- border-radius: 16px;
162
- padding: 12px 12px 12px 24px;
163
-
164
- ${I} {
165
- gap: 8px;
166
- padding: 8px 16px;
167
- }
168
- `,Rt=i.section`
169
- min-width: 0;
170
- background: ${c.white};
171
- border-radius: 16px;
172
- padding: 24px;
173
-
174
- ${I} {
175
- padding: 16px;
176
- }
177
- `,Ys=i(Rt)`
178
- display: flex;
179
- flex-direction: column;
180
- align-items: center;
181
- justify-content: center;
182
- gap: 24px;
183
- min-height: 420px;
184
- padding: 48px 16px;
185
- text-align: center;
186
- color: ${c.text};
187
-
188
- ${de.media.maxWidth("mobile")} {
189
- min-height: 320px;
190
- padding: 32px 16px;
191
- }
192
- `,Zs=i.div`
193
- display: flex;
194
- flex-direction: column;
195
- align-items: center;
196
- gap: 12px;
197
- padding-bottom: 16px;
198
- `,en=i.p`
199
- margin: 0;
200
- font-size: 24px;
201
- font-weight: 700;
202
- line-height: 1.6;
203
-
204
- ${de.media.maxWidth("mobile")} {
205
- font-size: 20px;
206
- }
207
- `,tn=i.p`
208
- margin: 0;
209
- font-size: 20px;
210
- font-weight: 400;
211
- line-height: 1.6;
212
-
213
- ${de.media.maxWidth("mobile")} {
214
- font-size: 16px;
215
- }
216
- `,an=i(We)`
217
- display: inline-flex;
218
- align-items: center;
219
- justify-content: center;
220
- width: 310px;
221
- max-width: 100%;
222
- height: 56px;
223
- padding: 0 12px;
224
- border-radius: ${te.card};
225
- background: ${c.accent};
226
- color: ${c.softWhite};
227
- font-size: 15px;
228
- font-weight: 600;
229
- line-height: 24px;
230
- letter-spacing: 0.46px;
231
- text-transform: uppercase;
232
- text-decoration: none;
233
- transition: background 0.15s ease;
234
-
235
- &:hover {
236
- background: ${c.accentHover};
237
- }
238
- &:focus-visible {
239
- outline: 2px solid ${c.accent};
240
- outline-offset: 2px;
241
- }
242
- `,sn=i.button`
243
- display: none;
244
-
245
- ${I} {
246
- display: inline-flex;
247
- align-items: center;
248
- flex-shrink: 0;
249
- border: 0;
250
- background: none;
251
- padding: 0;
252
- color: ${c.text};
253
- cursor: pointer;
254
-
255
- & .ico {
256
- width: 20px;
257
- height: 20px;
258
- }
259
- }
260
- `,nn=i.h1`
261
- margin: 0;
262
- font-size: 14px;
263
- font-weight: 600;
264
- line-height: 1.57;
265
- color: ${c.text};
266
-
267
- ${I} {
268
- flex: 1;
269
- min-width: 0;
270
- font-size: 16px;
271
- }
272
- `,rn=i.button`
273
- display: inline-flex;
274
- align-items: center;
275
- justify-content: center;
276
- gap: 8px;
277
- height: 40px;
278
- padding: 0 12px;
279
- border: 2px solid ${c.text2};
280
- border-radius: ${te.btn};
281
- background: none;
282
- color: ${c.text2};
283
- font-size: 13px;
284
- font-weight: 600;
285
- line-height: 24px;
286
- letter-spacing: 0.46px;
287
- text-transform: uppercase;
288
- white-space: nowrap;
289
- cursor: pointer;
290
- transition:
291
- background 0.15s ease,
292
- filter 0.15s ease;
293
-
294
- /* Mixed from currentColor so the wash cannot drift from the border colour. */
295
- &:hover:not(:disabled) {
296
- background: color-mix(in srgb, currentColor 6%, transparent);
297
- }
298
- &:active:not(:disabled) {
299
- filter: brightness(0.97);
300
- }
301
- &:disabled {
302
- opacity: 0.55;
303
- cursor: default;
304
- }
305
-
306
- /* Mobile keeps the full 40px button and thins the outline to 1px (1182:236892) rather than shrinking
307
- the type, which had it reading smaller than the row title beside it. */
308
- ${I} {
309
- border-width: 1px;
310
- border-color: ${c.text};
311
- color: ${c.text};
312
- }
313
- `,on=i.div`
314
- display: flex;
315
- flex-direction: column;
316
- gap: 24px;
317
- `,cn=i.div`
318
- position: relative;
319
- display: flex;
320
- align-items: stretch;
321
- gap: 12px;
322
- background: ${c.white};
323
- border: 1px solid ${c.gray4};
324
- border-radius: ${te.card};
325
- overflow: hidden;
326
-
327
- &[data-unavailable] [data-thumb] {
328
- opacity: 0.5;
329
- }
330
- &[data-unavailable] [data-check] {
331
- display: none;
332
- }
333
- &[data-unavailable] [data-desc] {
334
- opacity: 0.7;
335
- }
336
- `,ln=i.div`
337
- position: relative;
338
- flex-shrink: 0;
339
- width: 137.5px;
340
- height: 137px;
341
- background: ${c.media};
342
- border-radius: ${te.card};
343
- display: grid;
344
- place-items: center;
345
- overflow: hidden;
346
-
347
- & img {
348
- width: 83%;
349
- height: 83%;
350
- object-fit: contain;
351
- filter: drop-shadow(0.56px 2.25px 2.8px rgba(0, 0, 0, 0.1));
352
- }
353
-
354
- ${I} {
355
- width: 120px;
356
- height: 120px;
357
- }
358
- `,dn=i(We)`
359
- position: absolute;
360
- inset: 0;
361
- display: grid;
362
- place-items: center;
363
- `,un=i.span`
364
- position: absolute;
365
- top: 7.5px;
366
- left: 7.5px;
367
- width: 20px;
368
- height: 20px;
369
- border-radius: 50%;
370
- background: #34ce77;
371
- display: grid;
372
- place-items: center;
373
- `,hn=i.div`
374
- flex: 1;
375
- min-width: 0;
376
- display: flex;
377
- flex-direction: column;
378
- justify-content: space-between;
379
- gap: 8px;
380
- padding: 16px 8px;
381
-
382
- ${I} {
383
- padding: 12px 4px 12px 0;
384
- }
385
- `,pn=i.div`
386
- display: flex;
387
- flex-direction: column;
388
- gap: 4px;
389
- min-width: 0;
390
- padding-right: 64px; /* clear the top-right favourite + remove group */
391
- `,Bt=Le`
392
- display: block;
393
- font-size: 16px;
394
- font-weight: 600;
395
- line-height: 1.2;
396
- color: ${c.text};
397
- text-decoration: none;
398
- overflow: hidden;
399
- text-overflow: ellipsis;
400
- white-space: nowrap;
401
-
402
- a&:hover {
403
- color: ${c.accent};
404
- }
405
-
406
- ${I} {
407
- white-space: normal;
408
- display: -webkit-box;
409
- -webkit-line-clamp: 2;
410
- line-clamp: 2;
411
- -webkit-box-orient: vertical;
412
- }
413
- `,gn=i.div`
414
- ${Bt};
415
- `,mn=i(We)`
416
- ${Bt};
417
- `,xn=i(ca)`
418
- font-size: 10px;
419
- line-height: 1.43;
420
- color: ${c.muted};
421
-
422
- & [data-avatar] {
423
- display: none;
424
- }
425
- & [data-testid='creator-name'] {
426
- font-size: 10px;
427
- line-height: 1.43;
428
- }
429
- `,fn=i.div`
430
- display: flex;
431
- align-items: center;
432
- justify-content: space-between;
433
- gap: 12px;
434
- padding-right: 8px;
435
- `,yn=i.div`
436
- display: inline-flex;
437
- align-items: center;
438
- gap: 8px;
439
- padding: 6px;
440
- border: 0.5px solid ${c.muted2};
441
- border-radius: ${te.pill};
442
- `,It=i.button`
443
- display: grid;
444
- place-items: center;
445
- width: 16px;
446
- height: 16px;
447
- padding: 0;
448
- border: 0;
449
- background: none;
450
- color: ${c.text};
451
- cursor: pointer;
452
-
453
- &:disabled {
454
- color: ${c.muted2};
455
- cursor: default;
456
- }
457
- `,bn=i.span`
458
- min-width: 12px;
459
- font-size: 14px;
460
- font-weight: 500;
461
- line-height: 1.2;
462
- color: ${c.text};
463
- text-align: center;
464
- `,vn=i.div`
465
- display: inline-flex;
466
- align-items: center;
467
- gap: 4px;
468
- /* Always right-aligned: with a stepper present space-between handles it; for secondary/unique lines
469
- (no stepper) the auto margin keeps the lone price on the right instead of falling to the left. */
470
- margin-left: auto;
471
- font-size: 24px;
472
- font-weight: 600;
473
- color: ${c.text2};
474
-
475
- ${I} {
476
- font-size: 20px;
477
- }
478
- `,wn=i(Pt)`
479
- width: 24px;
480
- height: 24px;
481
- background: ${c.text};
482
-
483
- ${I} {
484
- width: 20px;
485
- height: 20px;
486
- }
487
- `,Cn=i.span`
488
- margin-left: 6px;
489
- font-size: 14px;
490
- font-weight: 500;
491
- color: ${c.muted};
492
- text-decoration: line-through;
493
- `,jn=i.div`
494
- position: absolute;
495
- top: 9px;
496
- right: 7px;
497
- display: flex;
498
- align-items: flex-start;
499
- gap: 12px;
500
- `,kn=i.span`
501
- display: inline-flex;
502
- align-items: center;
503
- gap: 4px;
504
- font-size: 12px;
505
- font-weight: 600;
506
- line-height: 1;
507
- text-transform: uppercase;
508
- color: ${c.text2};
509
- `,$n=i(O)`
510
- color: #f48221;
511
- `,Sn=i.span`
512
- align-self: flex-start;
513
- display: inline-flex;
514
- align-items: center;
515
- gap: 4px;
516
- padding: 2px 4px;
517
- border-radius: ${te.chip};
518
- background: #f4e9ff;
519
- font-size: 10px;
520
- font-weight: 400;
521
- line-height: 14px;
522
- color: ${c.text};
523
- `,Mn=i(O)`
524
- width: 11.31px;
525
- height: 10.94px;
526
- background: ${c.text};
527
- `,qt=Le`
528
- display: grid;
529
- place-items: center;
530
- width: 24px;
531
- height: 24px;
532
- padding: 0;
533
- border: 0;
534
- background: none;
535
- color: ${c.muted};
536
- cursor: pointer;
537
- transition: color 0.12s ease;
538
-
539
- &:disabled {
540
- opacity: 0.5;
541
- cursor: default;
542
- }
543
- `,Tn=i.button`
544
- ${qt};
545
-
546
- &:hover:not(:disabled) {
547
- color: ${c.text};
548
- }
549
- &[data-on] {
550
- color: ${c.dclRed};
551
- }
552
- `,In=i.button`
553
- ${qt};
554
-
555
- &:hover:not(:disabled) {
556
- color: ${c.dclRed};
557
- }
558
- `,Pn=i.div`
559
- display: flex;
560
- gap: 20px;
561
- margin-top: 16px;
562
-
563
- & .link {
564
- font-size: 13px;
565
- color: ${c.muted};
566
- font-weight: 600;
567
- }
568
- & .link:hover:not(:disabled) {
569
- color: ${c.text};
570
- }
571
- `,An=i.aside`
572
- position: sticky;
573
- top: 172px;
574
- display: flex;
575
- flex-direction: column;
576
- background: ${c.white};
577
- box-shadow: 0 1px 3px rgba(22, 21, 24, 0.06);
578
- border-radius: 16px;
579
- padding: 16px;
580
-
581
- ${Et} {
582
- position: static;
583
- }
584
- ${I} {
585
- position: fixed;
586
- left: 0;
587
- right: 0;
588
- top: auto;
589
- bottom: 0;
590
- z-index: 30;
591
- border: 0;
592
- /* Square and hard-edged against the page (1182:236910): it is a bar docked to the bottom, not a sheet
593
- lifted off it. */
594
- border-radius: 0;
595
- box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.25);
596
- }
597
- `,zn=i.h2`
598
- margin: 0 0 24px;
599
- padding-bottom: 16px;
600
- border-bottom: 1px solid ${c.gray4};
601
- font-size: 24px;
602
- font-weight: 600;
603
- color: ${c.text};
604
-
605
- ${I} {
606
- margin-bottom: 12px;
607
- padding-bottom: 8px;
608
- font-size: 16px;
609
- line-height: 1.6;
610
- }
611
- `,En=i.div`
612
- display: flex;
613
- flex-direction: column;
614
- gap: 12px;
615
- `,Rn=i.div`
616
- display: flex;
617
- align-items: flex-start;
618
- justify-content: space-between;
619
- gap: 12px;
620
- `,Bn=i.span`
621
- font-size: 14px;
622
- font-weight: 600;
623
- line-height: 1.57;
624
- color: ${c.muted1};
625
- `,qn=i.span`
626
- display: inline-flex;
627
- align-items: center;
628
- gap: 8px;
629
- font-size: 24px;
630
- font-weight: 700;
631
- color: ${c.text};
632
- `,_n=i.span`
633
- display: flex;
634
- flex-direction: column;
635
- align-items: flex-end;
636
- justify-content: center;
637
- gap: 4px;
638
- `;i.span`
639
- font-size: 12px;
640
- font-weight: 400;
641
- line-height: 1;
642
- color: ${c.muted};
643
- `;const Fn=i(Pt)`
644
- width: 30px;
645
- height: 30px;
646
- background: ${c.text};
647
- -webkit-mask-size: 24px 24px;
648
- mask-size: 24px 24px;
649
- -webkit-mask-position: left center;
650
- mask-position: left center;
651
- `;i.button`
652
- width: 100%;
653
- height: 56px;
654
- border: 0;
655
- border-radius: ${te.btn};
656
- background: ${Ds.buyBtn};
657
- color: ${c.softWhite};
658
- font-size: 15px;
659
- font-weight: 600;
660
- letter-spacing: 0.046em;
661
- text-transform: uppercase;
662
- cursor: pointer;
663
- transition: background-image 0.15s ease;
664
-
665
- /* Primary hover/pressed is the solid Primary red (Figma 738:53252 / 738:53262) — the gradient is
666
- the RESTING fill only. Painted as a flat GRADIENT, not a background-color: the shorthand can't
667
- interpolate background-image, so gradient -> colour dropped the image midway while the colour was
668
- still half transparent and the button visibly blinked. Same property both ends = a clean swap. */
669
- &:hover:not(:disabled),
670
- &:active:not(:disabled) {
671
- background-image: linear-gradient(${c.dclRed}, ${c.dclRed});
672
- }
673
- &:disabled {
674
- opacity: 0.6;
675
- cursor: default;
676
- }
677
- `;const _t=Le`
678
- margin: 0;
679
- font-size: 13px;
680
- `,ve=i.p`
681
- ${_t};
682
- `,Wn=i(Fs)`
683
- ${_t};
684
- `,Ln=i.div`
685
- position: relative;
686
- flex: 1 0 auto;
687
- margin-top: 48px;
688
- /* Below the gray band the cross-sell sits straight on the purple field (Figma) — hence no band of its
689
- own. The padding is the whole gap from the top of the section to the heading; the shared carousel's
690
- own top margin is zeroed below so the two don't stack. */
691
- padding: 47px 0 24px;
692
-
693
- & section {
694
- margin-top: 0;
695
- }
696
- `;function _e(o){if(qs(o))return s("errors.rejected");const u=(o.message??"").toLowerCase();return u.includes("insufficient")?s("cart.error.insufficient",{currency:ka.name}):u.includes("no active listing")||u.includes("your own listing")?s("cart.error.listingChanged"):s("marketCheckout.error.generic")}const Kn=12e4;function Nn(o){const u=[];return o.unavailable.length&&u.push(s("cart.drop.unavailable",{count:o.unavailable.length})),o.own.length&&u.push(s("cart.drop.own",{count:o.own.length})),s("cart.drop.removed",{items:u.join(` ${s("cart.drop.and")} `)})}const Fe=o=>o.reduce((u,P)=>u+P.priceCredits*P.quantity,0),we=o=>o.flatMap(u=>Array.from({length:u.quantity},()=>({...u,quantity:1})));function si(){la({title:s("nav.cart"),noindex:!0});const o=H(e=>e.items),u=H(e=>e.remove),P=H(e=>e.increment),A=H(e=>e.decrement),F=H(e=>e.clear),J=H(e=>e.restore),X=H(e=>e.setFittingOpen),z=lt(e=>e.items),ne=lt(e=>e.toggle),{session:n,signIn:L}=da(),Ft=ua(),ue=zs().packs.slice(0,Es);M.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const Wt=o.some(e=>e.category!=="emote"),{data:ke}=ha({queryKey:["upsell-listings"],queryFn:()=>Sa({first:40}),staleTime:6e4}),{data:k}=pa(n),v=ga(),Y=na(),{state:E}=ia(),[Lt,ie]=M.useState(null),[Ke,he]=M.useState(null),[Kt,B]=M.useState(!1),[q,D]=M.useState(null),Ne=M.useRef(0),[h,j]=M.useState(null),{data:pe}=ma(n),{data:re}=xa(!0),[$e,Qe]=M.useState(""),oe=M.useRef(null),Ue=fa(o),Ge=e=>ut(Ue[e.id]),Se=o.filter(Ge),He=o.length>0&&Se.length===0,Nt=Se.reduce((e,a)=>e+a.priceCredits*a.quantity,0),Qt=o.reduce((e,a)=>e+a.quantity,0),Ut=Se.reduce((e,a)=>e+a.quantity,0),Oe=q?q.liveTotalCredits:Nt,Gt=new Set(o.map(e=>e.id)),De=((ke==null?void 0:ke.items)??[]).filter(e=>!Gt.has(e.id)).slice(0,12),Ht=new Map(q==null?void 0:q.buyable.map(e=>[e.item.id,e])),ge=(k==null?void 0:k.credits)??0,Me=Oe*10,Ot=re?dt(Me,re):0n,Te=Re({priceCents:Me,priceManaWei:Ot,balanceCents:(k==null?void 0:k.balanceCents)??0,manaBalanceWei:pe??0n}),Dt=e=>e.flatMap(a=>{const l=qe(a);return l.kind==="store"?[l.mint]:[]}),Vt=e=>e.flatMap(a=>a.acquisition==="trade"?[a.trade]:[]),Jt=wa,Xt=e=>ja(e.contractAddress,String(e.itemId));function me(e){e(),D(null),he(null),ie(null)}function Yt(){j(null),B(!1)}function Ve(e){const a=Fe(e),l=Math.max(0,a-ge),r=ue.find(d=>d.credits>=l)??ue[ue.length-1];Qe(r.id),V("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:a,credits_balance:ge,shortfall:l}),j({phase:"nofunds",lines:e.map(d=>({item:d.item,priceCredits:d.priceCredits,quantity:d.quantity})),shortfall:l}),B(!1)}async function Ie(e){if(!n||e.length===0)return;const a=we(e),l=a.map(m=>({...m.item,priceCredits:m.priceCredits})),r=e.map(m=>({...m.item,priceCredits:m.priceCredits,quantity:m.quantity})),d=[];let p="authorize";const $=new Set,K=new Set,W=new Set,_=[];let w=!1;j({phase:"processing",stage:"reserving",step:1,total:a.length});try{const m=[];for(let x=0;x<a.length;x++){const g=a[x];j({phase:"processing",stage:"reserving",step:x+1,total:a.length});try{const C=g.acquisition==="trade"?g.trade.id:void 0,b=g.item.contractAddress&&g.item.itemId!=null?{contractAddress:g.item.contractAddress,itemId:String(g.item.itemId)}:void 0,{credit:T,maxCreditedValue:U}=await gt(n.identity,g.usdCents,C,b);d.push({salt:T.id,itemId:g.item.id}),m.push(g.acquisition==="store"?{kind:"store",item:{collection:g.item.contractAddress,itemId:String(g.item.itemId),priceWei:g.priceWei},credits:[T],maxCreditedValue:U,chainId:g.item.chainId}:{kind:"trade",trade:g.trade,credits:[T],maxCreditedValue:U})}catch(C){if(_s(C)){if(d.length){try{await Ee(n.identity,d.map(b=>b.salt))}catch(b){ae(b,{flow:"cart_checkout",step:"release"})}v.invalidateQueries({queryKey:["usd-balance"]})}Ve(e);return}throw C}}p="submit";const S=Ms(m).length,N=x=>S>1?{current:x,total:S}:void 0,G=(x,g)=>j({phase:"processing",stage:x,step:a.length,total:a.length,signatures:N(g)}),Q=x=>x<S?G("awaiting-signature",x+1):G("settling",S);G("awaiting-signature",1);let f=[];if(ws())try{const x=new Map;f=await Is({purchases:m,buyer:n.address,signer:n.signer,onSigned:()=>Q(S),onBroadcast:({txHash:b,salts:T})=>{x.set(b,T),T.forEach(U=>$.add(U))}});const g=await Promise.allSettled(f.map(b=>Ps(b)));g.forEach((b,T)=>{const U=x.get(f[T])??[];b.status==="fulfilled"?(U.forEach(ce=>K.add(ce)),_.push(f[T])):b.reason instanceof kt||U.forEach(ce=>W.add(ce))});const C=g.flatMap(b=>b.status==="rejected"?[b.reason]:[]);if(C.length&&!C.some(b=>b instanceof kt))throw C[0];w=!0}catch(x){if(!(x instanceof As)||!$a(n.providerType))throw x;f=await Be({purchases:m,buyer:n.address,signer:n.signer,onSigned:Q,onBroadcast:({salts:g})=>g.forEach(C=>$.add(C)),onSettled:({txHash:g,salts:C})=>{C.forEach(b=>K.add(b)),_.push(g)},onReverted:({salts:g})=>g.forEach(C=>W.add(C))})}else f=await Be({purchases:m,buyer:n.address,signer:n.signer,onSigned:Q,onBroadcast:({salts:x})=>x.forEach(g=>$.add(g)),onSettled:({txHash:x,salts:g})=>{g.forEach(C=>K.add(C)),_.push(x)},onReverted:({salts:x})=>x.forEach(g=>W.add(g))});e.forEach(x=>u(x.item.id)),D(null),V("Shop Completed Purchase",{...fe(l),payment_type:"credits",no_crypto_step:w,transaction_hash:f[0]??null}),Ct(v);const y=oe.current;oe.current=null,j(null),B(!1);const R={items:r,txHash:f[0]??void 0,txHashes:f,settled:!0,...y?{creditsAdded:y}:{}};Y("/success",{state:R,replace:!0})}catch(m){ye(m)||ae(m,{flow:"cart_checkout",step:p,cart_size:e.length});const S=new Set([...$].filter(y=>!W.has(y))),{toRelease:N,boughtItemIds:G}=$t({reservations:d,spent:S,settled:K}),Q=l.filter(y=>G.includes(y.id)),f=l.filter(y=>!G.includes(y.id));if(V(ye(m)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:p,error_code:mt(m),value_usd:ht(f.reduce((y,R)=>y+R.priceCredits,0)),cart_size:a.length,partial:Q.length>0}),N.length)try{await Ee(n.identity,N)}catch(y){ae(y,{flow:"cart_checkout",step:"release"})}if(v.invalidateQueries({queryKey:["usd-balance"]}),Q.length>0){G.forEach(y=>u(y)),D(null),Ct(v),V("Shop Completed Purchase",{...fe(Q),payment_type:"credits",no_crypto_step:w,transaction_hash:_[0]??null,partial:!0}),j({phase:"error",message:s("cart.error.partiallyBought")}),B(!1);return}j({phase:"error",message:_e(m)})}}function Je(e,a){v.invalidateQueries({queryKey:["usd-balance"]}),v.invalidateQueries({queryKey:["detail-trade"]}),v.invalidateQueries({queryKey:["shop-item"]}),v.invalidateQueries({queryKey:["owned-token"]}),v.invalidateQueries({queryKey:["public-token"]}),v.invalidateQueries({queryKey:["item-resales"]}),v.invalidateQueries({queryKey:["shop-items"]}),v.invalidateQueries({queryKey:["catalog-items"]}),v.invalidateQueries({queryKey:["my-assets"]}),v.invalidateQueries({queryKey:["purchases"]}),v.invalidateQueries({queryKey:["owned-item-count"]}),v.invalidateQueries({queryKey:["overview-listings"]}),v.invalidateQueries({queryKey:["upsell-listings"]});const l=oe.current;oe.current=null,j(null),B(!1);const r={items:e,txHash:a[0]??void 0,txHashes:a,settled:!0,...l?{creditsAdded:l}:{}};Y("/success",{state:r,replace:!0})}function Xe(e,a){ye(e)||ae(e,{flow:a,step:"submit"}),V(ye(e)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:mt(e)}),j({phase:"error",message:_e(e)}),B(!1)}async function Zt(e,a){const l=xt(ft.MANAToken,a),r=xt(ft.CreditsManager,a);await $s({auth:{kind:Ss.Allowance,contractAddress:l.address,spenderAddress:r.address,chainId:a},signer:e})}async function Ye(){if(re)return re;try{return await v.fetchQuery({queryKey:["mana-rate",pt.chainId],queryFn:()=>Ca(pt.chainId),staleTime:6e4})}catch{return}}async function ea(e){const a=we(e).reduce((p,$)=>p+$.usdCents,0),r=(pe??0n)>0n?await Ye():re,d=r?dt(a,r):0n;return{totalCents:a,manaWei:d}}async function Ze(e,a){const l=Fe(e),{totalCents:r,manaWei:d}=await ea(e),p=Re({priceCents:r,priceManaWei:d,balanceCents:(k==null?void 0:k.balanceCents)??0,manaBalanceWei:pe??0n});if(a&&p.options.some($=>$.method===a)){if(a==="credits"){Ie(e);return}await Ae(tt(a,e),at(p,a),()=>a==="mana"?void st(e):void nt(e,r,d));return}if(p.options.some($=>$.method==="mana"||$.method==="combined")){j({phase:"choose",lines:e,totalCents:r,manaWei:d}),B(!1);return}if(k!=null&&k.credits<l){Ve(e);return}Ie(e)}function et(e){return Re({priceCents:e.totalCents,priceManaWei:e.manaWei,balanceCents:(k==null?void 0:k.balanceCents)??0,manaBalanceWei:pe??0n})}const[Pe,xe]=M.useState(null);function tt(e,a){const l=new Map;for(const r of a){const d=xs(e,qe(r));l.set(`${d.chainId}:${d.spender.toLowerCase()}`,d)}return[...l.values()]}async function Ae(e,a,l){const[r,...d]=e;if(!r){l();return}await ta(r.spender,r.chainId,a,()=>void Ae(d,a,l))}async function ta(e,a,l,r){const d=Cs(a,e),p=n?await js(d,n.address,l).catch(()=>!0):!0;if(ks(n==null?void 0:n.providerType,p)){B(!1),xe({auth:d,run:r});return}r()}function at(e,a){var l;return((l=e.options.find(r=>r.method===a))==null?void 0:l.manaWei)??0n}function aa(e){if((h==null?void 0:h.phase)!=="choose")return;const{lines:a,totalCents:l,manaWei:r}=h;if(e==="credits"){Ie(a);return}Ae(tt(e,a),at(et(h),e),()=>e==="mana"?void st(a):void nt(a,l,r))}async function st(e){if(!n||e.length===0)return;const a=we(e),l=a.map(p=>({...p.item,priceCredits:p.priceCredits})),r=e.map(p=>({...p.item,priceCredits:p.priceCredits,quantity:p.quantity})),d=()=>j({phase:"processing",stage:"settling",step:a.length,total:a.length});j({phase:"processing",stage:"awaiting-signature",step:a.length,total:a.length});try{const p=await fs({trades:Vt(a),mints:Dt(a),buyer:n.address,signer:n.signer,onSigned:d});e.forEach($=>u($.item.id)),D(null),V("Shop Completed Purchase",{...fe(l),payment_type:"mana",transaction_hash:p[0]??null}),v.invalidateQueries({queryKey:["mana-balance"]}),Je(r,p)}catch(p){Xe(p,"buy_cart_mana")}}async function nt(e,a,l){if(!n||e.length===0)return;const r=we(e),d=r.map(w=>({...w.item,priceCredits:w.priceCredits})),p=e.map(w=>({...w.item,priceCredits:w.priceCredits,quantity:w.quantity})),$=ys(r.map(w=>w.usdCents),(k==null?void 0:k.balanceCents)??0),K=[],W=new Set,_=new Set;j({phase:"processing",stage:"reserving",step:1,total:r.length});try{const w=r.map(qe),m=[],S=new Map,N=new Map;for(let f=0;f<r.length;f++){const y=r[f],R=w[f],x=$[f],g=bs(Math.max(0,y.usdCents-x),a,l);let C;if(x<=0)C=jt(R,[],"0");else{j({phase:"processing",stage:"reserving",step:f+1,total:r.length});const T=y.item,{credit:U,maxCreditedValue:ce}=await gt(n.identity,x,R.kind==="trade"?R.trade.id:void 0,T.contractAddress&&T.itemId!=null?{contractAddress:T.contractAddress,itemId:String(T.itemId)}:void 0);K.push({salt:U.id,itemId:T.id}),C=jt(R,[U],ce)}const b=Ts(C);S.set(b,(S.get(b)??0n)+g),N.has(b)||N.set(b,m.length),m.push(C)}for(const[f,y]of S){const R=N.get(f);R==null||y<=0n||(m[R]={...m[R],maxCreditedValue:(BigInt(m[R].maxCreditedValue)+y).toString()})}await Zt(n.signer,vs(w[0]));const G=()=>j({phase:"processing",stage:"settling",step:r.length,total:r.length});j({phase:"processing",stage:"awaiting-signature",step:r.length,total:r.length});const Q=await Be({purchases:m,buyer:n.address,signer:n.signer,onSigned:G,onBroadcast:({salts:f})=>f.forEach(y=>W.add(y)),onReverted:({salts:f})=>f.forEach(y=>_.add(y))});e.forEach(f=>u(f.item.id)),D(null),V("Shop Completed Purchase",{...fe(d),payment_type:"credits_and_mana",transaction_hash:Q[0]??null}),v.invalidateQueries({queryKey:["mana-balance"]}),Je(p,Q)}catch(w){const{toRelease:m}=$t({reservations:K,spent:new Set([...W].filter(S=>!_.has(S))),settled:new Set});m.length&&Ee(n.identity,m).catch(()=>{}),K.length&&v.invalidateQueries({queryKey:["usd-balance"]}),Xe(w,"buy_cart_combined")}}async function Z(e){if(!n){wt({type:"cart-checkout"}),L();return}const a=H.getState().items.filter(Ge);if(a.length===0)return;ie(null),he(null),B(!0);const l=a.reduce((r,d)=>r+d.priceCredits*d.quantity,0);V("Shop Started Checkout",{cart_size:a.length,cart_value_credits:l,cart_value_usd:ht(l),has_sufficient_credits:ge>=l});try{const r=await Rs(a,n.address,Jt,await Ye(),Xt),d=[...r.unavailable,...r.own];if(d.length&&(d.forEach(p=>u(p.id)),he(Nn(r))),r.buyable.length===0){ie(s("cart.error.noneAvailable")),D(null);return}if(r.orderChanged){D(r),Ne.current=Date.now();return}await Ze(r.buyable,e)}catch(r){ae(r,{flow:"cart_checkout",step:"review",cart_size:a.length}),ie(_e(r))}finally{B(!1)}}async function it(){if(q){if(!n){wt({type:"cart-checkout"}),L();return}if(Date.now()-Ne.current>Kn){D(null),he(null),await Z();return}ie(null),Ze(q.buyable)}}async function sa(){if($e){try{sessionStorage.setItem(be,JSON.stringify(H.getState().items))}catch{}B(!0);try{const e=await Bs($e,n?{address:n.address,identity:n.identity}:void 0);if(e.url){window.location.href=e.url;return}Y("/credits")}catch(e){try{sessionStorage.removeItem(be)}catch{}ae(e,{flow:"cart_buy_credits"}),j({phase:"error",message:s("buyModal.error.creditsCheckout")})}finally{B(!1)}}}const rt=M.useRef(!1);M.useEffect(()=>{if(!n||rt.current||!hs("cart-checkout"))return;rt.current=!0;const e=setTimeout(()=>void Z(),0);return()=>clearTimeout(e)},[n]);const ot=M.useRef(!1);M.useEffect(()=>{if(!(E!=null&&E.resumeCheckout)||ot.current)return;ot.current=!0,oe.current=E.creditsAdded??null;try{const a=sessionStorage.getItem(be);if(a){sessionStorage.removeItem(be);const l=JSON.parse(a);Array.isArray(l)&&l.length&&J(l)}}catch{}v.invalidateQueries({queryKey:["usd-balance"]});const e=setTimeout(()=>void Z(),0);return()=>clearTimeout(e)},[E==null?void 0:E.resumeCheckout]);const ct=M.useRef(!1);M.useEffect(()=>{if(!(E!=null&&E.startCheckout)||ct.current)return;ct.current=!0,Y(".",{replace:!0,state:null});const e=setTimeout(()=>void Z(),0);return()=>clearTimeout(e)},[E==null?void 0:E.startCheckout]);const ee=Kt||(h==null?void 0:h.phase)==="processing";return o.length===0&&!h?t.jsx(St,{children:t.jsxs(Tt,{children:[t.jsxs(Mt,{onClick:()=>Y(-1),type:"button",children:[t.jsx(O,{name:"arrow-left"}),s("nav.cart")]}),t.jsxs(Ys,{"data-testid":"cart-empty",children:[t.jsx(O,{name:"cart-plus",size:110}),t.jsxs(Zs,{children:[t.jsx(en,{children:s("cart.empty.title")}),t.jsx(tn,{children:s("cart.empty.body")})]}),t.jsx(an,{to:"/items",children:s("cart.empty.cta")})]})]})}):t.jsxs(St,{children:[t.jsxs(Tt,{children:[t.jsxs(Mt,{onClick:()=>Y(-1),type:"button",children:[t.jsx(O,{name:"arrow-left"}),s("nav.cart")]}),t.jsxs(Vs,{children:[t.jsxs(Js,{children:[t.jsxs(Xs,{children:[t.jsx(sn,{onClick:()=>Y(-1),type:"button","aria-label":s("cart.goBack"),children:t.jsx(O,{name:"arrow-left"})}),t.jsx(nn,{children:s("cart.panelTitle",{count:Qt})}),Wt?t.jsxs(rn,{onClick:()=>X(!0),disabled:ee,children:[t.jsx(O,{name:"fitting-room"}),s("cart.fittingRoom")]}):null]}),t.jsxs(Rt,{children:[t.jsx(on,{children:o.map(e=>{const a=Ht.get(e.id),l=a?a.priceCredits:e.priceCredits,r=!!a&&a.priceCredits!==e.priceCredits,d=!e.tokenId,p=e.quantity,$=typeof e.available=="number"&&p>=e.available,K=l*p,W=ya(e),_=!!W&&!!z[W],w=ba(e),m=Ue[e.id],S=!ut(m),N=m==="sold-out"?s("cart.availability.soldOut"):s("cart.availability.unavailable");return t.jsxs(cn,{"data-unavailable":S||void 0,children:[t.jsxs(ln,{"data-thumb":!0,children:[w?t.jsx(dn,{to:w,state:{item:e,tradeId:e.tradeId},"aria-label":e.name,children:e.thumbnail?t.jsx("img",{src:e.thumbnail,alt:e.name}):null}):e.thumbnail?t.jsx("img",{src:e.thumbnail,alt:e.name}):null,t.jsx(un,{"data-check":!0,"aria-hidden":!0,children:t.jsx("svg",{viewBox:"0 0 20 20",width:"12",height:"12",children:t.jsx("path",{d:"M5 10.5l3 3 7-7.5",fill:"none",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),t.jsxs(hn,{children:[t.jsxs(pn,{"data-desc":!0,children:[w?t.jsx(mn,{to:w,state:{item:e,tradeId:e.tradeId},title:e.name,children:e.name}):t.jsx(gn,{title:e.name,children:e.name}),e.creator?t.jsx(xn,{address:e.creator,linkToProfile:!0}):null,Ft&&d?t.jsxs(Sn,{"data-testid":"cart-creator-tag",children:[t.jsx(Mn,{name:"buy-from-creator"}),s("cart.creatorTag")]}):null]}),t.jsx(fn,{children:S?t.jsxs(kn,{children:[t.jsx($n,{name:"warning-fill",size:24}),N]}):t.jsxs(t.Fragment,{children:[d?t.jsxs(yn,{children:[t.jsx(It,{onClick:()=>me(()=>A(e.id)),disabled:ee||p<=1,"aria-label":s("cart.decreaseQuantity",{name:e.name}),children:t.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:t.jsx("path",{d:"M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}),t.jsx(bn,{children:p}),t.jsx(It,{onClick:()=>me(()=>P(e.id)),disabled:ee||$,"aria-label":s("cart.increaseQuantity"),children:t.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:t.jsx("path",{d:"M8 3.5v9M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}):null,t.jsxs(vn,{children:[t.jsx(wn,{})," ",K,r?t.jsx(Cn,{children:e.priceCredits*p}):null]})]})})]}),t.jsxs(jn,{children:[W?t.jsx(Tn,{"data-on":_||void 0,onClick:()=>ne(e),"aria-label":_?s("cart.removeFromFavorites",{name:e.name}):s("cart.addToFavorites",{name:e.name}),title:_?s("assetCard.removeFromFavorites"):s("assetCard.addToFavorites"),children:t.jsx(O,{name:_?"heart-solid":"heart"})}):null,t.jsx(In,{onClick:()=>me(()=>u(e.id)),disabled:ee,"aria-label":s("cart.remove",{name:e.name}),title:s("cart.removeTitle"),children:t.jsx(O,{name:"trash",size:24})})]})]},e.id)})}),t.jsx(Pn,{children:t.jsx("button",{className:"link",onClick:()=>me(F),disabled:ee,children:s("cart.clearCart")})})]})]}),t.jsxs(An,{children:[t.jsx(zn,{children:s("cart.purchaseSummary")}),t.jsxs(En,{children:[t.jsxs(Rn,{children:[t.jsx(Bn,{children:s("cart.totalItems",{count:Ut})}),t.jsx(_n,{children:t.jsxs(qn,{children:[t.jsx(Fn,{})," ",Oe]})})]}),t.jsx(At,{options:Te.options,totalCents:Me,shortfall:Te.manaShortfall,showCreditsAmount:!1,creditsLabel:q?s("marketCheckout.confirmPurchase"):Te.options.length>1?s("cart.buyWithCredits"):s("cart.checkout"),busy:ee||He,onPay:e=>void(q?it():Z(e)),creditsFallback:{label:ee?s("cart.working"):q?s("marketCheckout.confirmPurchase"):s("cart.checkout"),onClick:()=>void(q?it():Z())}}),He?t.jsx(ve,{className:"muted",children:s("cart.allUnavailable")}):null,n?null:t.jsx(ve,{className:"muted",children:s("cart.signInHint")}),q?t.jsx(ve,{className:"muted",children:s("cart.priceChanged")}):null,Ke?t.jsx(ve,{className:"muted",children:Ke}):null,t.jsx(Wn,{message:Lt})]})]})]})]}),De.length>0?t.jsx(Ln,{children:t.jsx(ps,{title:s("cart.youMightAlsoLike"),items:De})}):null,Pe&&n?t.jsx(gs,{auth:Pe.auth,signer:n.signer,title:s("authorizeStep.manaTitle"),name:s("authorizeStep.manaName"),reason:s("authorizeStep.manaReason"),icon:t.jsx("img",{src:ms,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{run:e}=Pe;xe(null),e()},onCancel:()=>xe(null),onClose:()=>xe(null)}):null,h?t.jsx(Gs,{phase:h.phase,balanceCredits:ge,onClose:Yt,stage:h.phase==="processing"?h.stage:void 0,step:h.phase==="processing"?h.step:void 0,total:h.phase==="processing"?h.total:void 0,isSelfCustody:va(n==null?void 0:n.providerType),signatures:h.phase==="processing"?h.signatures:void 0,options:h.phase==="choose"?et(h).options:void 0,onPay:aa,totalCents:h.phase==="choose"?h.totalCents:void 0,totalManaWei:h.phase==="choose"?h.manaWei:void 0,totalCredits:h.phase==="choose"?Fe(h.lines):void 0,lines:h.phase==="nofunds"?h.lines:void 0,shortfallCredits:h.phase==="nofunds"?h.shortfall:void 0,packs:ue,selectedPack:$e,onSelectPack:Qe,onBuyPacks:()=>void sa(),message:h.phase==="error"?h.message:void 0,onRetry:()=>void Z()}):null]})}export{si as Cart};