@dcl/shop 1.0.2-31093320960.commit-a66fdac → 1.0.2-31094361365.commit-b4e12f4

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 (174) hide show
  1. package/_assets/{Activity-BZYV865P.js → Activity-eih8ZdOc.js} +5 -5
  2. package/_assets/{AnimatedBackground-C_gdl0Ga.js → AnimatedBackground-Bjic9bNS.js} +1 -1
  3. package/_assets/{Assets-D6xTxE6H.js → Assets-CnETD67e.js} +6 -6
  4. package/_assets/{Assets.styles-C2Y2OMju.js → Assets.styles-Cm61Yk9G.js} +1 -1
  5. package/_assets/{Authorizations-Dyl-2_Wx.js → Authorizations-CG7WO1hC.js} +1 -1
  6. package/_assets/{Cart-q1C0b7B0.js → Cart-C-zS6F-I.js} +83 -77
  7. package/_assets/{CircularProgress-DfC_DW6J.js → CircularProgress-CWz3JCfV.js} +1 -1
  8. package/_assets/{Collection-CikwxEA2.js → Collection-D7JFffZu.js} +1 -1
  9. package/_assets/{CollectionCarousel-CW99ees-.js → CollectionCarousel-CucQ0QV7.js} +2 -2
  10. package/_assets/{Confetti-D-f5Qezh.js → Confetti-DWstoxYf.js} +1 -1
  11. package/_assets/{Creator-sxuxQmmv.js → Creator-C-RBpKLr.js} +22 -22
  12. package/_assets/{ErrorNotice-D_MmJHjd.js → ErrorNotice-C0iIUOEA.js} +1 -1
  13. package/_assets/{ExchangeController-5e1qfrC7.js → ExchangeController-CtAdMliY.js} +1 -1
  14. package/_assets/{Faq-CZWOMrti.js → Faq-CJVPehMK.js} +1 -1
  15. package/_assets/{GetCredits-EPpLyZrC.js → GetCredits-DbGxdrKl.js} +21 -17
  16. package/_assets/{Grow-CJcrEIIk.js → Grow-CBGBZvVu.js} +1 -1
  17. package/_assets/{HelpersUtil-D4FO24BM.js → HelpersUtil-JUn70XlG.js} +1 -1
  18. package/_assets/{ItemDetail-Daqpqudw.js → ItemDetail-C97nncjp.js} +358 -335
  19. package/_assets/LazyEmoteControls-BkXz1q2Q.js +2 -0
  20. package/_assets/{LoadMore-BcR7LuW8.js → LoadMore-BgEWB4j8.js} +1 -1
  21. package/_assets/{ManaPricingBanner.styles-b_tWuH2r.js → ManaPricingBanner.styles-DnMdTKPw.js} +1 -1
  22. package/_assets/{MyAssets-CY3P4YpT.js → MyAssets-DX_Dv5Iw.js} +4 -4
  23. package/_assets/{MyFavorites-2J4ivx_A.js → MyFavorites-D9BRIln5.js} +1 -1
  24. package/_assets/{NotFound-B9SvSXoT.js → NotFound-gxLh1Oz1.js} +1 -1
  25. package/_assets/{NotificationsBell-DDd4PHL_.js → NotificationsBell-9GpgR-9j.js} +1 -1
  26. package/_assets/{OutfitDetail-DfQD1uwS.js → OutfitDetail-vfk8Obgf.js} +1 -1
  27. package/_assets/{OutfitPreview-B8wqKe4G.js → OutfitPreview-BQkuKxKt.js} +1 -1
  28. package/_assets/{OutfitStudio-C8kgT_Q1.js → OutfitStudio-Cbyc_ob0.js} +9 -9
  29. package/_assets/{StoreSettings-BszakGpI.js → StoreSettings-D_9vzZ85.js} +21 -21
  30. package/_assets/{Success-BlrhZwie.js → Success-Bqb9haMX.js} +1 -1
  31. package/_assets/{SwapController-CtdE4CSE.js → SwapController-BAt3MSAG.js} +1 -1
  32. package/_assets/{Tooltip-D92iGFCG.js → Tooltip-C7ohRZVT.js} +1 -1
  33. package/_assets/{TradeService-CDrDGVbQ.js → TradeService-BioVjsGK.js} +1 -1
  34. package/_assets/{W3MFrameProviderSingleton-ChXXI6YZ.js → W3MFrameProviderSingleton-CkaGvlNS.js} +3 -3
  35. package/_assets/{WebCryptoP256-D8s1Qscb.js → WebCryptoP256-DrQ8zT87.js} +1 -1
  36. package/_assets/{authorizations-qnGN3xsk.js → authorizations-5kJTkikm.js} +1 -1
  37. package/_assets/{basic-DhSHVZRT.js → basic-cPftIshO.js} +1 -1
  38. package/_assets/{biconomy-ClBW5VwG.js → biconomy-Bk5GWpkr.js} +1 -1
  39. package/_assets/{builder-CL5pdg21.js → builder-duVm3eqN.js} +1 -1
  40. package/_assets/{buy-B-DDln2Y.js → buy-CnDiuzF0.js} +1 -1
  41. package/_assets/{buy-gasless-C_BmhnE7.js → buy-gasless-DOp9N7fN.js} +1 -1
  42. package/_assets/{categories-B8yCTSzR.js → categories-Bwk-Btnk.js} +14 -11
  43. package/_assets/{ccip-CJEnBLGM.js → ccip-C-cPNY-1.js} +1 -1
  44. package/_assets/{ccip-DQfkaCht.js → ccip-Cnn102VM.js} +1 -1
  45. package/_assets/{collectionPage.styles-CcRhgEaw.js → collectionPage.styles-Cbo17VjU.js} +6 -6
  46. package/_assets/{controller-JXbdlxZp.js → controller-bFOGIDOw.js} +2 -2
  47. package/_assets/{core-BSxLBlxi.js → core-BT84t22J.js} +4 -4
  48. package/_assets/{createSvgIcon-yVJuzYrn.js → createSvgIcon-BKsw2Cb_.js} +2 -2
  49. package/_assets/{custom-B3uMWhu7.js → custom-BUlPw5S7.js} +1 -1
  50. package/_assets/{data-capture-B-nbrWqF.js → data-capture-DKSqr5cv.js} +1 -1
  51. package/_assets/{email-CVdda8uU.js → email-DHSxgAeW.js} +1 -1
  52. package/_assets/{embedded-wallet-Y6M29Es7.js → embedded-wallet-DjLhiaHj.js} +1 -1
  53. package/_assets/{emotion-styled.browser.esm-BF1qb2R0.js → emotion-styled.browser.esm-C6xWmqMa.js} +1 -1
  54. package/_assets/{engine-fjR5dIp4.js → engine-DCT3c-JH.js} +1 -1
  55. package/_assets/{errors-B_JuFrfU.js → errors-DGBGW8UJ.js} +1 -1
  56. package/_assets/{estimate-l1-fee-B1LOd6k3.js → estimate-l1-fee-DlYgxocO.js} +1 -1
  57. package/_assets/{execute-BXynqqjh.js → execute-Dkzbfol0.js} +2 -2
  58. package/_assets/{features-Czbv6jQA.js → features-CVvHxQoV.js} +1 -1
  59. package/_assets/{fetchTokenMetadata-BuR7htwA.js → fetchTokenMetadata-_l1JubAq.js} +2 -2
  60. package/_assets/{field.styles-DFDRX2tk.js → field.styles-BLxFNwqc.js} +1 -1
  61. package/_assets/{get-ecosystem-wallet-info-C8Jcr_V9.js → get-ecosystem-wallet-info-CBkCodOV.js} +1 -1
  62. package/_assets/{getBalance-sCJcvWYJ.js → getBalance-D4FG6mrw.js} +1 -1
  63. package/_assets/{getNFT-mOXdmQiA.js → getNFT-9rCI1jKQ.js} +1 -1
  64. package/_assets/{getNFT-Vt2rJ26d.js → getNFT-BwCpumx4.js} +1 -1
  65. package/_assets/{grid.styles-CX_shgZ5.js → grid.styles-C7DIeQ4F.js} +1 -1
  66. package/_assets/{hashTypedData-LiZBeYpJ.js → hashTypedData-D-Pf78s7.js} +1 -1
  67. package/_assets/{hashTypedData-CN02HuAO.js → hashTypedData-DBC-OJUC.js} +1 -1
  68. package/_assets/{in-app-Di-YguDK.js → in-app-D1Nm6bV1.js} +1 -1
  69. package/_assets/{in-app-wallet-calls-DeaYPRmI.js → in-app-wallet-calls-D5PyTekp.js} +1 -1
  70. package/_assets/{index-Bl852CQj.js → index-0RqsNpah.js} +1 -1
  71. package/_assets/{index-BzBhg1fo.js → index-2DjB0zcq.js} +1 -1
  72. package/_assets/{index-DlFosNf0.js → index-5vvcDM2k.js} +5 -5
  73. package/_assets/{index-DaSPxwNy.js → index-6NIdKt9N.js} +3 -3
  74. package/_assets/{index-B5pEWwvB.js → index-B51NTlTj.js} +1 -1
  75. package/_assets/{index-BKaw3xHY.js → index-BFXpBFCH.js} +1 -1
  76. package/_assets/{index-BPg5Mvmb.js → index-BHxCY9nU.js} +1 -1
  77. package/_assets/{index-DNNPYfed.js → index-BIbwD_h7.js} +1 -1
  78. package/_assets/{index-BsJj67OU.js → index-BbsDSodI.js} +1 -1
  79. package/_assets/{index-DQzE_-yq.js → index-Bd1wvuf1.js} +1 -1
  80. package/_assets/{index-Bz4Oae-5.js → index-BlEvHt7m.js} +1 -1
  81. package/_assets/{index-CahHjkxT.js → index-Bppxm-UK.js} +1 -1
  82. package/_assets/{index-DDJ7sdXv.js → index-BqHb3xk2.js} +1 -1
  83. package/_assets/{index-Dr4f9K-t.js → index-BtR0lQsx.js} +1 -1
  84. package/_assets/{index-Bm_zAXvq.js → index-BwIb-046.js} +1 -1
  85. package/_assets/{index-C0C9VUse.js → index-ByROsW-4.js} +1 -1
  86. package/_assets/{index-CF-t9R4v.js → index-C--P9pv4.js} +1 -1
  87. package/_assets/{index-C6AA1Xf7.js → index-C8ygh3Cc.js} +2 -2
  88. package/_assets/{index-CfP1fkI_.js → index-CBL-49VE.js} +1 -1
  89. package/_assets/{index-BuWzyRcz.js → index-CEWyrymV.js} +1 -1
  90. package/_assets/{index-Dm6Y9ZbQ.js → index-CL6NyWIZ.js} +1 -1
  91. package/_assets/{index-CcCpGfgd.js → index-CQDa0B78.js} +1 -1
  92. package/_assets/{index-BKwIRP5b.js → index-CT7DTzQ0.js} +1 -1
  93. package/_assets/{index-D6OOP-51.js → index-CZYxvxjt.js} +1 -1
  94. package/_assets/{index-94LcKPqN.js → index-Cax079_G.js} +1 -1
  95. package/_assets/{index-8YFhojLT.js → index-CgRQiahV.js} +1 -1
  96. package/_assets/{index-BJXNRLkE.js → index-ChJRAgfr.js} +1 -1
  97. package/_assets/{index-tLIN_GkS.js → index-Cmwvs9e4.js} +1 -1
  98. package/_assets/{index-DJpl6Nbn.js → index-Crzd9TpY.js} +1 -1
  99. package/_assets/{index-CnCeem_J.js → index-CvjzTxQn.js} +1 -1
  100. package/_assets/{index-DjYBUAnI.js → index-D3SdX5ud.js} +1 -1
  101. package/_assets/{index-Cleyy_0q.js → index-D6rcsTPP.js} +1 -1
  102. package/_assets/{index-sFhq_-vF.js → index-D7O7s4gu.js} +1 -1
  103. package/_assets/{index-BkZn7ynX.js → index-DDfgCSl3.js} +1 -1
  104. package/_assets/{index-BgNzVgyj.js → index-DFXJQ_G7.js} +1 -1
  105. package/_assets/{index-Bf_azgOs.js → index-DJl-mzyN.js} +1 -1
  106. package/_assets/{index-BRQ9Wcma.js → index-DMcoQM0q.js} +3 -3
  107. package/_assets/{index-BKtPMRlC.js → index-DOilGPCx.js} +2 -2
  108. package/_assets/{index-BVxFsPRO.js → index-DWHnd0rm.js} +1 -1
  109. package/_assets/{index-DjW0J8pD.js → index-DerNWOKd.js} +1 -1
  110. package/_assets/{index-DULGD4d2.js → index-DgAxP-68.js} +1 -1
  111. package/_assets/{index-BwmnMTdg.js → index-DrsPf8lM.js} +602 -520
  112. package/_assets/{index-OQab0-JQ.js → index-KqrePQun.js} +1 -1
  113. package/_assets/{index-FT6agMXk.js → index-LPzQkwMs.js} +1 -1
  114. package/_assets/{index-CBhJLill.js → index-R66kS2GO.js} +1 -1
  115. package/_assets/{index-IvNZzfoI.js → index-YKnFr2ui.js} +3 -3
  116. package/_assets/{index-N1bohwEM.js → index-ZyTD2rk5.js} +1 -1
  117. package/_assets/{index-C3CEKm2j.js → index-_LSAY_H4.js} +1 -1
  118. package/_assets/{index-rEZ_4IFC.js → index-dgtHYvIy.js} +2 -2
  119. package/_assets/{index-Bk3rNDtD.js → index-eSTWjgZS.js} +1 -1
  120. package/_assets/{index-BanfPpYD.js → index-iN4U0GKi.js} +1 -1
  121. package/_assets/{index-CdZzuE8e.js → index-qPVMgubM.js} +1 -1
  122. package/_assets/{index.es-Dwz0IUN6.js → index.es-BLdr_pVQ.js} +4 -4
  123. package/_assets/{index.es-DAZuzUm7.js → index.es-CH-WgFA9.js} +1 -1
  124. package/_assets/{index.es-CAHIM3qD.js → index.es-D-HRLB1S.js} +1 -1
  125. package/_assets/{localBatchGatewayRequest-CmvuTHFj.js → localBatchGatewayRequest-DoGsIr7C.js} +1 -1
  126. package/_assets/{networks-DxoGDzHE.js → networks-L7OSL8zg.js} +1 -1
  127. package/_assets/{onramp-DUHkYtuW.js → onramp-_ndBrQ1Y.js} +1 -1
  128. package/_assets/{openzeppelin-sla19LMh.js → openzeppelin-CEqH_0rd.js} +1 -1
  129. package/_assets/{parseNft-UEsMFiqe.js → parseNft-DqwsN2e1.js} +2 -2
  130. package/_assets/{parseSignature-CPQ4376G.js → parseSignature-C-Ekknac.js} +3 -3
  131. package/_assets/{parseSignature-BhyKODlU.js → parseSignature-Dz4k-_BJ.js} +1 -1
  132. package/_assets/{passkeys-wDVu6yuN.js → passkeys-BrbqIhfp.js} +1 -1
  133. package/_assets/{pay-with-exchange-CWK-Ssp3.js → pay-with-exchange-MrP0zCJw.js} +1 -1
  134. package/_assets/{qr-overlay-BNEHuGJ4.js → qr-overlay-_GMjxw26.js} +1 -1
  135. package/_assets/{receive-BWFbKioL.js → receive-CPSAAVFo.js} +1 -1
  136. package/_assets/{resolveImplementation-DgfhwMlM.js → resolveImplementation-35MQR22Q.js} +1 -1
  137. package/_assets/{rpc-BqdwSpX8.js → rpc-CIbYZEJ-.js} +1 -1
  138. package/_assets/{secp256k1-C-W8I-Zy.js → secp256k1-B5CND0qJ.js} +1 -1
  139. package/_assets/{secp256k1-BBK7GqHS.js → secp256k1-BLQqFrl6.js} +1 -1
  140. package/_assets/{secp256k1-DREcXm38.js → secp256k1-BsbxTtcz.js} +1 -1
  141. package/_assets/{send-CHzkLWPr.js → send-CRTrg7O4.js} +1 -1
  142. package/_assets/{send-batch-transaction-5BgfAaSR.js → send-batch-transaction-C7LQ1a8I.js} +1 -1
  143. package/_assets/{send-eip712-transaction-D_wCG6QA.js → send-eip712-transaction-D3JpeGm2.js} +2 -2
  144. package/_assets/{send-gasless-transaction-tLadnb9y.js → send-gasless-transaction-C6aPY-r7.js} +2 -2
  145. package/_assets/{send-transaction-D3DYgONV.js → send-transaction-CyvxGWI_.js} +2 -2
  146. package/_assets/{sendMetaTransaction-Uawte2uP.js → sendMetaTransaction-DXB2zppk.js} +1 -1
  147. package/_assets/{sendRawTransaction-yrJJjJuj.js → sendRawTransaction-Dq9HYIL8.js} +3 -3
  148. package/_assets/{serializeTransaction-DbAjRO35.js → serializeTransaction-zE1My_Zo.js} +1 -1
  149. package/_assets/{session-proposal-tovuipdf.js → session-proposal-BztuR617.js} +1 -1
  150. package/_assets/{session-request-CJx8_Nqv.js → session-request-CNoVMSOn.js} +2 -2
  151. package/_assets/{signing-DIdv4EGK.js → signing-Dg_MHc88.js} +3 -3
  152. package/_assets/{skeleton.styles-JTH6hNy6.js → skeleton.styles-B-VOk6tY.js} +1 -1
  153. package/_assets/{socials-BMAR0gR_.js → socials-CB8D1PHY.js} +1 -1
  154. package/_assets/{styled-Dfg0i8eX.js → styled-DxeNVjAi.js} +1 -1
  155. package/_assets/{swaps-BGa4ySw5.js → swaps-BhrhXVsJ.js} +1 -1
  156. package/_assets/{thirdweb-Bf4Axk_U.js → thirdweb-SPUs9Rme.js} +3 -3
  157. package/_assets/{to-serializable-transaction-DRJLaygN.js → to-serializable-transaction-BJrJeLP8.js} +2 -2
  158. package/_assets/{transactionReceipt-Bhig9TGy.js → transactionReceipt-BRpfQd2-.js} +1 -1
  159. package/_assets/{transactions-CCUXYIeH.js → transactions-BXthhxDf.js} +1 -1
  160. package/_assets/{useCreditPacks-D8rMiOb_.js → useCreditPacks-tiUs7FLz.js} +1 -1
  161. package/_assets/{useImportable-CNQfbBw8.js → useImportable-DPsQqZpS.js} +1 -1
  162. package/_assets/{useInfiniteGrid-BADHIu6F.js → useInfiniteGrid-BxsdGvVu.js} +1 -1
  163. package/_assets/{useTheme-DBV2Tqy3.js → useTheme-DGmDzugK.js} +1 -1
  164. package/_assets/{verifyHash-Cdp-LdrE.js → verifyHash--87JCj9L.js} +1 -1
  165. package/_assets/{w3m-modal-BxSlR5wP.js → w3m-modal-BSqPeKdp.js} +1 -1
  166. package/_assets/{w3m-modal-CIDOCqB8.js → w3m-modal-Bwk-fcT4.js} +1 -1
  167. package/_assets/{wait-for-tx-receipt-C9B0C6I6.js → wait-for-tx-receipt-vkwvqtSf.js} +1 -1
  168. package/_assets/{wallets-wYcTf8sk.js → wallets-BKzJcGzk.js} +5 -5
  169. package/_assets/{web-connector-DC2N7iZ9.js → web-connector-C1sskh4G.js} +3 -3
  170. package/_assets/{writeContract-EKs-5iav.js → writeContract-Cb_tmbEE.js} +1 -1
  171. package/_assets/{zoraTestnet-DPmpNXvV.js → zoraTestnet-CuYyg3MY.js} +1 -1
  172. package/index.html +11 -11
  173. package/package.json +2 -2
  174. package/_assets/LazyEmoteControls-CynuOxLa.js +0 -2
@@ -1,16 +1,16 @@
1
- import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t as de,s as i,b as a,L as ce,ax as ta,ay as aa,J as sa,I as O,z as St,K as Le,x as na,X as H,am as ct,o as ia,q as ra,v as oa,az as ca,A as da,aA as la,an as ua,aB as ha,aC as dt,aD as pa,aE as ga,y as ma,aF as lt,Z as V,aG as ut,aH as xa,F as ae,r as fa,c as ht,aI as ya,C as ba,aJ as pt,aK as Re,aL as va,aM as xe,aN as fe,aO as gt,g as ye,f as wa,h as qe,aP as Ca}from"./index-BwmnMTdg.js";import{M as ja,S as ka,C as $a,H as Sa,a as Ma,T as Ta,X as Ia,b as Pa,B as za,c as Aa,d as mt,e as Ea,f as Ce,P as Mt,m as Ra,g as qa,h as Ba,i as _a,j as Fa,k as Tt,l as je,L as Wa,n as La,o as xt,p as ft,W as Ka,q as Na,r as Qa,s as Ua,A as Ha,t as Oa,u as Ga,v as Va,w as Da,x as Ja,y as Xa,z as Ya,D as Za,E as es,F as ts,G as as,I as ss,J as ns,K as is,N as rs,O as os,Q as Be,R as cs,U as ds,V as ls,Y as us,Z as yt,_ as bt,$ as hs,a0 as ps,a1 as gs}from"./CollectionCarousel-CW99ees-.js";import{f as ms,h as xs,a as fs,n as ys,i as bs,A as vs}from"./authorizations-qnGN3xsk.js";import{g as ws,j as _e}from"./buy-B-DDln2Y.js";import{b as Cs,w as js,S as vt,G as ks}from"./buy-gasless-C_BmhnE7.js";import{u as $s,M as Ss,R as be,r as Ms,c as Ts,p as wt}from"./useCreditPacks-D8rMiOb_.js";import{i as Is,a as Ps}from"./errors-B_JuFrfU.js";import{E as zs}from"./ErrorNotice-D_MmJHjd.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-Uawte2uP.js";const{colors:se,radius:As}=de,Es=i.div`
1
+ import{j as e,L as ke,r as T,b as ea,a as ta}from"./react-BYHuwl8r.js";import{t as de,s as i,b as a,L as ce,ax as aa,ay as Re,az as sa,J as na,I as O,z as Mt,K as Ke,x as ia,X as H,am as dt,o as ra,q as oa,v as ca,aA as da,A as la,aB as ua,an as ha,aC as pa,aD as lt,aE as ga,aF as ma,y as xa,aG as ut,Z as V,aH as ht,aI as fa,F as ae,r as ya,c as pt,aJ as ba,C as va,aK as gt,aL as qe,aM as wa,aN as xe,aO as fe,aP as mt,g as ye,f as Ca,h as Be,aQ as ja}from"./index-DrsPf8lM.js";import{M as ka,S as $a,C as Sa,H as Ma,a as Ta,T as Ia,X as Pa,b as za,B as Aa,c as Ea,d as xt,e as Ra,f as Ce,P as Tt,m as qa,g as Ba,h as _a,i as Fa,j as Wa,k as It,l as je,L as La,n as Ka,o as ft,p as yt,W as Na,q as Qa,r as Ua,s as Ha,A as Oa,t as Ga,u as Va,v as Da,w as Ja,x as Xa,y as Ya,z as Za,D as es,E as ts,F as as,G as ss,I as ns,J as is,K as rs,N as os,O as cs,Q as _e,R as ds,U as ls,V as us,Y as hs,Z as bt,_ as vt,$ as ps,a0 as gs,a1 as ms}from"./CollectionCarousel-CucQ0QV7.js";import{f as xs,h as fs,a as ys,n as bs,i as vs,A as ws}from"./authorizations-5kJTkikm.js";import{g as Cs,j as Fe}from"./buy-CnDiuzF0.js";import{b as js,w as ks,S as wt,G as $s}from"./buy-gasless-DOp9N7fN.js";import{u as Ss,M as Ms,R as be,r as Ts,c as Is,p as Ct}from"./useCreditPacks-tiUs7FLz.js";import{i as Ps,a as zs}from"./errors-DGBGW8UJ.js";import{E as As}from"./ErrorNotice-C0iIUOEA.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-DXB2zppk.js";const{colors:se,radius:Es}=de,Rs=i.div`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  justify-content: center;
5
5
  gap: 8px;
6
6
  width: 100%;
7
- `,Rs=i.span`
7
+ `,qs=i.span`
8
8
  font-size: 16px;
9
9
  line-height: 22px;
10
10
  color: ${se.text2};
11
11
  text-transform: capitalize;
12
12
  white-space: nowrap;
13
- `,qs=i.div`
13
+ `,Bs=i.div`
14
14
  display: flex;
15
15
  flex-direction: column;
16
16
  gap: 12px;
@@ -34,14 +34,14 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
34
34
  }
35
35
  &::-webkit-scrollbar-thumb {
36
36
  background: #a2a2a2;
37
- border-radius: ${As.btn};
37
+ border-radius: ${Es.btn};
38
38
  }
39
- `,Bs=i.span`
39
+ `,_s=i.span`
40
40
  margin-left: 8px;
41
41
  font-size: 13px;
42
42
  font-weight: 600;
43
43
  color: ${se.muted};
44
- `,_s=i.div`
44
+ `,Fs=i.div`
45
45
  display: flex;
46
46
  align-items: center;
47
47
  justify-content: space-between;
@@ -58,7 +58,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
58
58
  font-weight: 700;
59
59
  color: ${se.text};
60
60
  }
61
- `;function Fs(o){const{phase:l,balanceCredits:P,onClose:z}=o,W=l==="processing",D=l==="error"?a("cartCheckout.errorTitle"):l==="nofunds"?a("cartCheckout.titleNoFunds"):l==="choose"?a("buyModal.choosePayment"):a("cartCheckout.titleBuy"),J=l==="processing";return t.jsxs(ja,{role:"dialog","aria-modal":"true","aria-label":a("cartCheckout.dialogAria"),children:[t.jsx(ka,{onClick:W?void 0:z,"aria-hidden":!0}),t.jsxs($a,{"data-tall":J||void 0,children:[t.jsxs(Sa,{children:[t.jsxs(Ma,{children:[t.jsx(Ta,{children:D}),!W&&t.jsx(Ia,{onClick:z,"aria-label":a("buyModal.close"),children:t.jsx(Pa,{})})]}),t.jsxs(za,{children:[t.jsx(Aa,{children:l==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),t.jsx(mt,{}),t.jsx(Ea,{children:ce(P)})]})]}),l==="choose"&&t.jsxs(Ce,{children:[t.jsxs(_s,{children:[t.jsx("span",{children:a("cart.purchaseSummary")}),t.jsxs("strong",{children:[t.jsx(mt,{}),ce(o.totalCredits??0)]})]}),t.jsx(Mt,{options:o.options??[],totalCents:o.totalCents??0,onPay:o.onPay??(()=>{}),rateNote:(()=>{const A=Ra(o.totalCents??0,o.totalManaWei??0n);return A!=null?a("buyModal.manaRate",{mana:A.toLocaleString("en",{maximumFractionDigits:2})}):null})()})]}),l==="processing"&&t.jsx(Ws,{stage:o.stage??"reserving",step:o.step??1,total:o.total??1,isSelfCustody:!!o.isSelfCustody,signatures:o.signatures}),l==="nofunds"&&t.jsx(Ls,{lines:o.lines??[],shortfallCredits:o.shortfallCredits??0,packs:o.packs??[],selectedPack:o.selectedPack??"",onSelectPack:o.onSelectPack??(()=>{}),onBuyPacks:o.onBuyPacks??(()=>{}),onCancel:z}),l==="error"&&t.jsxs(Ce,{children:[t.jsxs(qa,{"data-testid":"buy-error",children:[t.jsx(Ba,{src:_a,alt:"",width:64,height:80}),t.jsxs(Fa,{children:[t.jsx("b",{children:a("cartCheckout.errorHeadline")})," ",o.message??a("cartCheckout.errorBody")]})]}),t.jsxs(Tt,{children:[t.jsx(je,{"data-variant":"outline",onClick:z,children:a("buyModal.cancel")}),t.jsx(je,{"data-variant":"purple",onClick:o.onRetry??z,children:a("cartCheckout.tryAgain")})]})]})]})]})}function Ws({stage:o,step:l,total:P,isSelfCustody:z,signatures:W}){const D=o==="reserving",J=P>0?Math.min(100,Math.round(l/P*100)):0,A=z&&W&&W.total>1,ne=o==="awaiting-signature"?z?A?a("cartCheckout.confirmMultiple",{current:W.current,total:W.total}):a("buyModal.confirmToContinue"):a("buyModal.completingTransaction"):o==="settling"?a("buyModal.completingTransaction"):a("cartCheckout.preparing");return t.jsxs(Ce,{"data-processing":!0,children:[t.jsx(Wa,{src:ta,alt:"",width:61,height:61}),t.jsx(La,{children:ne}),D?t.jsxs(Es,{children:[t.jsx(xt,{"aria-hidden":!0,children:t.jsx(ft,{"data-step":!0,style:{width:`${J}%`}})}),P>1?t.jsxs(Rs,{children:[l,"/",P]}):null]}):t.jsx(xt,{"aria-hidden":!0,children:t.jsx(ft,{})})]})}function Ls({lines:o,shortfallCredits:l,packs:P,selectedPack:z,onSelectPack:W,onBuyPacks:D,onCancel:J}){const A=P.find(n=>n.id===z),ne=o.reduce((n,K)=>n+(K.quantity??1),0);return t.jsxs(Ce,{children:[t.jsxs(Ka,{"data-testid":"nofunds-warning",children:[t.jsx(Na,{}),t.jsxs(Qa,{children:[t.jsx("b",{children:a("buyModal.insufficientFunds")})," ",a("buyModal.warningNeedToBuy")," ",t.jsx("b",{children:a("buyModal.warningCreditsAmount",{count:Math.max(0,l)})})," ",a("buyModal.warningToPurchase",{count:ne}),t.jsx("br",{}),t.jsx(Ua,{href:aa("/credits"),target:"_blank",rel:"noopener noreferrer",children:a("buyModal.warningLearnMore")})]})]}),t.jsx(qs,{children:o.map(n=>{const K=n.quantity??1;return t.jsxs(Ha,{children:[t.jsx(Oa,{children:n.item.thumbnail?t.jsx("img",{src:n.item.thumbnail,alt:""}):null}),t.jsxs(Ga,{children:[t.jsxs("div",{children:[t.jsxs(Va,{title:n.item.name,children:[n.item.name||a("buyModal.itemFallback"),K>1?t.jsx(Bs,{children:a("cartCheckout.qty",{count:K})}):null]}),n.item.creator?t.jsx(Da,{address:n.item.creator}):null]}),t.jsxs(Ja,{children:[t.jsx(Xa,{}),t.jsx("span",{children:ce(n.priceCredits*K)})]})]})]},n.item.id)})}),t.jsx(Ya,{children:P.map(n=>{const K=n.id===z;return t.jsxs(Za,{"data-testid":"credit-pack","data-on":K||void 0,onClick:()=>W(n.id),children:[t.jsx(es,{src:ts,alt:""}),t.jsx(as,{children:ce(n.credits)}),t.jsxs(ss,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),t.jsxs(ns,{children:[t.jsxs(is,{children:[t.jsx(rs,{}),t.jsx("span",{children:ce((A==null?void 0:A.credits)??0)})]}),t.jsxs(os,{children:["$",((A==null?void 0:A.usd)??0).toFixed(2)]})]}),t.jsxs(Tt,{children:[t.jsx(je,{"data-variant":"outline",onClick:J,children:a("buyModal.cancel")}),t.jsx(je,{"data-variant":"gradient",onClick:D,children:a("buyModal.buy")})]})]})}const{colors:r,gradients:Ks,radius:te}=de,It="@media (max-width: 1080px)",I="@media (max-width: 880px)",Ct=i.div`
61
+ `;function Ws(o){const{phase:l,balanceCredits:P,onClose:z}=o,W=l==="processing",D=l==="error"?a("cartCheckout.errorTitle"):l==="nofunds"?a("cartCheckout.titleNoFunds"):l==="choose"?a("buyModal.choosePayment"):a("cartCheckout.titleBuy"),J=l==="processing";return e.jsxs(ka,{role:"dialog","aria-modal":"true","aria-label":a("cartCheckout.dialogAria"),children:[e.jsx($a,{onClick:W?void 0:z,"aria-hidden":!0}),e.jsxs(Sa,{"data-tall":J||void 0,children:[e.jsxs(Ma,{children:[e.jsxs(Ta,{children:[e.jsx(Ia,{children:D}),!W&&e.jsx(Pa,{onClick:z,"aria-label":a("buyModal.close"),children:e.jsx(za,{})})]}),e.jsxs(Aa,{children:[e.jsx(Ea,{children:l==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),e.jsx(xt,{}),e.jsx(Ra,{children:ce(P)})]})]}),l==="choose"&&e.jsxs(Ce,{children:[e.jsxs(Fs,{children:[e.jsx("span",{children:a("cart.purchaseSummary")}),e.jsxs("strong",{children:[e.jsx(xt,{}),ce(o.totalCredits??0)]})]}),e.jsx(Tt,{options:o.options??[],totalCents:o.totalCents??0,onPay:o.onPay??(()=>{}),rateNote:(()=>{const A=qa(o.totalCents??0,o.totalManaWei??0n);return A!=null?a("buyModal.manaRate",{mana:A.toLocaleString("en",{maximumFractionDigits:2})}):null})()})]}),l==="processing"&&e.jsx(Ls,{stage:o.stage??"reserving",step:o.step??1,total:o.total??1,isSelfCustody:!!o.isSelfCustody,signatures:o.signatures}),l==="nofunds"&&e.jsx(Ks,{lines:o.lines??[],shortfallCredits:o.shortfallCredits??0,packs:o.packs??[],selectedPack:o.selectedPack??"",onSelectPack:o.onSelectPack??(()=>{}),onBuyPacks:o.onBuyPacks??(()=>{}),onCancel:z}),l==="error"&&e.jsxs(Ce,{children:[e.jsxs(Ba,{"data-testid":"buy-error",children:[e.jsx(_a,{src:Fa,alt:"",width:64,height:80}),e.jsxs(Wa,{children:[e.jsx("b",{children:a("cartCheckout.errorHeadline")})," ",o.message??a("cartCheckout.errorBody")]})]}),e.jsxs(It,{children:[e.jsx(je,{"data-variant":"outline",onClick:z,children:a("buyModal.cancel")}),e.jsx(je,{"data-variant":"purple",onClick:o.onRetry??z,children:a("cartCheckout.tryAgain")})]})]})]})]})}function Ls({stage:o,step:l,total:P,isSelfCustody:z,signatures:W}){const D=o==="reserving",J=P>0?Math.min(100,Math.round(l/P*100)):0,A=z&&W&&W.total>1,ne=o==="awaiting-signature"?z?A?a("cartCheckout.confirmMultiple",{current:W.current,total:W.total}):a("buyModal.confirmToContinue"):a("buyModal.completingTransaction"):o==="settling"?a("buyModal.completingTransaction"):a("cartCheckout.preparing");return e.jsxs(Ce,{"data-processing":!0,children:[e.jsx(La,{src:aa,alt:"",width:61,height:61}),e.jsx(Ka,{children:ne}),D?e.jsxs(Rs,{children:[e.jsx(ft,{"aria-hidden":!0,children:e.jsx(yt,{"data-step":!0,style:{width:`${J}%`}})}),P>1?e.jsxs(qs,{children:[l,"/",P]}):null]}):e.jsx(ft,{"aria-hidden":!0,children:e.jsx(yt,{})})]})}function Ks({lines:o,shortfallCredits:l,packs:P,selectedPack:z,onSelectPack:W,onBuyPacks:D,onCancel:J}){const A=P.find(n=>n.id===z),ne=o.reduce((n,K)=>n+(K.quantity??1),0);return e.jsxs(Ce,{children:[e.jsxs(Na,{"data-testid":"nofunds-warning",children:[e.jsx(Qa,{}),e.jsxs(Ua,{children:[e.jsx("b",{children:a("buyModal.insufficientFunds")})," ",a("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:a("buyModal.warningCreditsAmount",{count:Math.max(0,l)})})," ",a("buyModal.warningToPurchase",{count:ne}),Re()?null:e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(Ha,{href:sa("/credits"),target:"_blank",rel:"noopener noreferrer",children:a("buyModal.warningLearnMore")})]})]})]}),e.jsx(Bs,{children:o.map(n=>{const K=n.quantity??1;return e.jsxs(Oa,{children:[e.jsx(Ga,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsxs(Va,{children:[e.jsxs("div",{children:[e.jsxs(Da,{title:n.item.name,children:[n.item.name||a("buyModal.itemFallback"),K>1?e.jsx(_s,{children:a("cartCheckout.qty",{count:K})}):null]}),n.item.creator?e.jsx(Ja,{address:n.item.creator}):null]}),e.jsxs(Xa,{children:[e.jsx(Ya,{}),e.jsx("span",{children:ce(n.priceCredits*K)})]})]})]},n.item.id)})}),Re()?null:e.jsxs(e.Fragment,{children:[e.jsx(Za,{children:P.map(n=>{const K=n.id===z;return e.jsxs(es,{"data-testid":"credit-pack","data-on":K||void 0,onClick:()=>W(n.id),children:[e.jsx(ts,{src:as,alt:""}),e.jsx(ss,{children:ce(n.credits)}),e.jsxs(ns,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),e.jsxs(is,{children:[e.jsxs(rs,{children:[e.jsx(os,{}),e.jsx("span",{children:ce((A==null?void 0:A.credits)??0)})]}),e.jsxs(cs,{children:["$",((A==null?void 0:A.usd)??0).toFixed(2)]})]})]}),e.jsxs(It,{children:[e.jsx(je,{"data-variant":"outline",onClick:J,children:a("buyModal.cancel")}),Re()?null:e.jsx(je,{"data-variant":"gradient",onClick:D,children:a("buyModal.buy")})]})]})}const{colors:r,gradients:Ns,radius:te}=de,Pt="@media (max-width: 1080px)",I="@media (max-width: 880px)",jt=i.div`
62
62
  max-width: 1510px;
63
63
  margin: 0 auto;
64
64
  /* Grows into the page's leftover height and passes it down to Upsell, so the white cross-sell band ends at
@@ -71,7 +71,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
71
71
  ${I} {
72
72
  padding-bottom: 188px; /* room for the fixed summary bar */
73
73
  }
74
- `,jt=i.button`
74
+ `,kt=i.button`
75
75
  display: inline-flex;
76
76
  align-items: center;
77
77
  gap: 6px;
@@ -98,16 +98,16 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
98
98
  ${I} {
99
99
  display: none;
100
100
  }
101
- `,Ns=i.div`
101
+ `,Qs=i.div`
102
102
  display: grid;
103
103
  grid-template-columns: minmax(0, 1fr) 615px;
104
104
  gap: 24px;
105
105
  align-items: start;
106
106
 
107
- ${It} {
107
+ ${Pt} {
108
108
  grid-template-columns: 1fr;
109
109
  }
110
- `,kt=i.div`
110
+ `,$t=i.div`
111
111
  position: relative;
112
112
  /* The gray band is 733px in Figma (1553-317103) — taller than the panels inside it, deliberately. Without
113
113
  this it collapsed to the panels' height, and the page shell's own viewport-filling min-height then padded
@@ -147,12 +147,12 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
147
147
  top: -16px; /* .page's mobile padding */
148
148
  }
149
149
  }
150
- `,Qs=i.div`
150
+ `,Us=i.div`
151
151
  min-width: 0;
152
152
  display: flex;
153
153
  flex-direction: column;
154
154
  gap: 12px;
155
- `,Us=i.div`
155
+ `,Hs=i.div`
156
156
  display: flex;
157
157
  align-items: center;
158
158
  justify-content: space-between;
@@ -163,9 +163,9 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
163
163
 
164
164
  ${I} {
165
165
  gap: 8px;
166
- padding: 12px;
166
+ padding: 8px 16px;
167
167
  }
168
- `,Pt=i.section`
168
+ `,zt=i.section`
169
169
  min-width: 0;
170
170
  background: ${r.white};
171
171
  border-radius: 16px;
@@ -174,7 +174,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
174
174
  ${I} {
175
175
  padding: 16px;
176
176
  }
177
- `,Hs=i(Pt)`
177
+ `,Os=i(zt)`
178
178
  display: flex;
179
179
  flex-direction: column;
180
180
  align-items: center;
@@ -189,13 +189,13 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
189
189
  min-height: 320px;
190
190
  padding: 32px 16px;
191
191
  }
192
- `,Os=i.div`
192
+ `,Gs=i.div`
193
193
  display: flex;
194
194
  flex-direction: column;
195
195
  align-items: center;
196
196
  gap: 12px;
197
197
  padding-bottom: 16px;
198
- `,Gs=i.p`
198
+ `,Vs=i.p`
199
199
  margin: 0;
200
200
  font-size: 24px;
201
201
  font-weight: 700;
@@ -204,7 +204,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
204
204
  ${de.media.maxWidth("mobile")} {
205
205
  font-size: 20px;
206
206
  }
207
- `,Vs=i.p`
207
+ `,Ds=i.p`
208
208
  margin: 0;
209
209
  font-size: 20px;
210
210
  font-weight: 400;
@@ -213,7 +213,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
213
213
  ${de.media.maxWidth("mobile")} {
214
214
  font-size: 16px;
215
215
  }
216
- `,Ds=i(ke)`
216
+ `,Js=i(ke)`
217
217
  display: inline-flex;
218
218
  align-items: center;
219
219
  justify-content: center;
@@ -239,7 +239,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
239
239
  outline: 2px solid ${r.accent};
240
240
  outline-offset: 2px;
241
241
  }
242
- `,Js=i.button`
242
+ `,Xs=i.button`
243
243
  display: none;
244
244
 
245
245
  ${I} {
@@ -257,7 +257,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
257
257
  height: 20px;
258
258
  }
259
259
  }
260
- `,Xs=i.h1`
260
+ `,Ys=i.h1`
261
261
  margin: 0;
262
262
  font-size: 14px;
263
263
  font-weight: 600;
@@ -269,7 +269,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
269
269
  min-width: 0;
270
270
  font-size: 16px;
271
271
  }
272
- `,Ys=i.button`
272
+ `,Zs=i.button`
273
273
  display: inline-flex;
274
274
  align-items: center;
275
275
  justify-content: center;
@@ -303,16 +303,18 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
303
303
  cursor: default;
304
304
  }
305
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. */
306
308
  ${I} {
307
- height: 36px;
308
- padding: 0 10px;
309
- font-size: 12px;
309
+ border-width: 1px;
310
+ border-color: ${r.text};
311
+ color: ${r.text};
310
312
  }
311
- `,Zs=i.div`
313
+ `,en=i.div`
312
314
  display: flex;
313
315
  flex-direction: column;
314
316
  gap: 24px;
315
- `,en=i.div`
317
+ `,tn=i.div`
316
318
  position: relative;
317
319
  display: flex;
318
320
  align-items: stretch;
@@ -331,7 +333,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
331
333
  &[data-unavailable] [data-desc] {
332
334
  opacity: 0.7;
333
335
  }
334
- `,tn=i.div`
336
+ `,an=i.div`
335
337
  position: relative;
336
338
  flex-shrink: 0;
337
339
  width: 137.5px;
@@ -353,12 +355,12 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
353
355
  width: 120px;
354
356
  height: 120px;
355
357
  }
356
- `,an=i(ke)`
358
+ `,sn=i(ke)`
357
359
  position: absolute;
358
360
  inset: 0;
359
361
  display: grid;
360
362
  place-items: center;
361
- `,sn=i.span`
363
+ `,nn=i.span`
362
364
  position: absolute;
363
365
  top: 7.5px;
364
366
  left: 7.5px;
@@ -368,7 +370,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
368
370
  background: #34ce77;
369
371
  display: grid;
370
372
  place-items: center;
371
- `,nn=i.div`
373
+ `,rn=i.div`
372
374
  flex: 1;
373
375
  min-width: 0;
374
376
  display: flex;
@@ -380,13 +382,13 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
380
382
  ${I} {
381
383
  padding: 12px 4px 12px 0;
382
384
  }
383
- `,rn=i.div`
385
+ `,on=i.div`
384
386
  display: flex;
385
387
  flex-direction: column;
386
388
  gap: 4px;
387
389
  min-width: 0;
388
390
  padding-right: 64px; /* clear the top-right favourite + remove group */
389
- `,zt=Le`
391
+ `,At=Ke`
390
392
  display: block;
391
393
  font-size: 16px;
392
394
  font-weight: 600;
@@ -408,11 +410,11 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
408
410
  line-clamp: 2;
409
411
  -webkit-box-orient: vertical;
410
412
  }
411
- `,on=i.div`
412
- ${zt};
413
- `,cn=i(ke)`
414
- ${zt};
415
- `,dn=i(sa)`
413
+ `,cn=i.div`
414
+ ${At};
415
+ `,dn=i(ke)`
416
+ ${At};
417
+ `,ln=i(na)`
416
418
  font-size: 10px;
417
419
  line-height: 1.43;
418
420
  color: ${r.muted};
@@ -424,20 +426,20 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
424
426
  font-size: 10px;
425
427
  line-height: 1.43;
426
428
  }
427
- `,ln=i.div`
429
+ `,un=i.div`
428
430
  display: flex;
429
431
  align-items: center;
430
432
  justify-content: space-between;
431
433
  gap: 12px;
432
434
  padding-right: 8px;
433
- `,un=i.div`
435
+ `,hn=i.div`
434
436
  display: inline-flex;
435
437
  align-items: center;
436
438
  gap: 8px;
437
439
  padding: 6px;
438
440
  border: 0.5px solid ${r.muted2};
439
441
  border-radius: ${te.pill};
440
- `,$t=i.button`
442
+ `,St=i.button`
441
443
  display: grid;
442
444
  place-items: center;
443
445
  width: 16px;
@@ -452,14 +454,14 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
452
454
  color: ${r.muted2};
453
455
  cursor: default;
454
456
  }
455
- `,hn=i.span`
457
+ `,pn=i.span`
456
458
  min-width: 12px;
457
459
  font-size: 14px;
458
460
  font-weight: 500;
459
461
  line-height: 1.2;
460
462
  color: ${r.text};
461
463
  text-align: center;
462
- `,pn=i.div`
464
+ `,gn=i.div`
463
465
  display: inline-flex;
464
466
  align-items: center;
465
467
  gap: 4px;
@@ -473,7 +475,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
473
475
  ${I} {
474
476
  font-size: 20px;
475
477
  }
476
- `,gn=i(St)`
478
+ `,mn=i(Mt)`
477
479
  width: 24px;
478
480
  height: 24px;
479
481
  background: ${r.text};
@@ -482,20 +484,20 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
482
484
  width: 20px;
483
485
  height: 20px;
484
486
  }
485
- `,mn=i.span`
487
+ `,xn=i.span`
486
488
  margin-left: 6px;
487
489
  font-size: 14px;
488
490
  font-weight: 500;
489
491
  color: ${r.muted};
490
492
  text-decoration: line-through;
491
- `,xn=i.div`
493
+ `,fn=i.div`
492
494
  position: absolute;
493
495
  top: 9px;
494
496
  right: 7px;
495
497
  display: flex;
496
498
  align-items: flex-start;
497
499
  gap: 12px;
498
- `,fn=i.span`
500
+ `,yn=i.span`
499
501
  display: inline-flex;
500
502
  align-items: center;
501
503
  gap: 4px;
@@ -504,9 +506,9 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
504
506
  line-height: 1;
505
507
  text-transform: uppercase;
506
508
  color: ${r.text2};
507
- `,yn=i(O)`
509
+ `,bn=i(O)`
508
510
  color: #f48221;
509
- `,bn=i(ke)`
511
+ `,vn=i(ke)`
510
512
  font-size: 12px;
511
513
  font-weight: 600;
512
514
  line-height: 24px;
@@ -522,7 +524,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
522
524
  outline: 2px solid ${r.accent};
523
525
  outline-offset: 2px;
524
526
  }
525
- `,vn=i.span`
527
+ `,wn=i.span`
526
528
  align-self: flex-start;
527
529
  display: inline-flex;
528
530
  align-items: center;
@@ -534,11 +536,11 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
534
536
  font-weight: 400;
535
537
  line-height: 14px;
536
538
  color: ${r.text};
537
- `,wn=i(O)`
539
+ `,Cn=i(O)`
538
540
  width: 11.31px;
539
541
  height: 10.94px;
540
542
  background: ${r.text};
541
- `,At=Le`
543
+ `,Et=Ke`
542
544
  display: grid;
543
545
  place-items: center;
544
546
  width: 24px;
@@ -554,8 +556,8 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
554
556
  opacity: 0.5;
555
557
  cursor: default;
556
558
  }
557
- `,Cn=i.button`
558
- ${At};
559
+ `,jn=i.button`
560
+ ${Et};
559
561
 
560
562
  &:hover:not(:disabled) {
561
563
  color: ${r.text};
@@ -563,13 +565,13 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
563
565
  &[data-on] {
564
566
  color: ${r.dclRed};
565
567
  }
566
- `,jn=i.button`
567
- ${At};
568
+ `,kn=i.button`
569
+ ${Et};
568
570
 
569
571
  &:hover:not(:disabled) {
570
572
  color: ${r.dclRed};
571
573
  }
572
- `,kn=i.div`
574
+ `,$n=i.div`
573
575
  display: flex;
574
576
  gap: 20px;
575
577
  margin-top: 16px;
@@ -582,7 +584,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
582
584
  & .link:hover:not(:disabled) {
583
585
  color: ${r.text};
584
586
  }
585
- `,$n=i.aside`
587
+ `,Sn=i.aside`
586
588
  position: sticky;
587
589
  top: 172px;
588
590
  display: flex;
@@ -592,7 +594,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
592
594
  border-radius: 16px;
593
595
  padding: 16px;
594
596
 
595
- ${It} {
597
+ ${Pt} {
596
598
  position: static;
597
599
  }
598
600
  ${I} {
@@ -603,10 +605,12 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
603
605
  bottom: 0;
604
606
  z-index: 30;
605
607
  border: 0;
606
- border-radius: 16px 16px 0 0;
607
- box-shadow: 0 -4px 20px rgba(22, 21, 24, 0.12);
608
+ /* Square and hard-edged against the page (1182:236910): it is a bar docked to the bottom, not a sheet
609
+ lifted off it. */
610
+ border-radius: 0;
611
+ box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.25);
608
612
  }
609
- `,Sn=i.h2`
613
+ `,Mn=i.h2`
610
614
  margin: 0 0 24px;
611
615
  padding-bottom: 16px;
612
616
  border-bottom: 1px solid ${r.gray4};
@@ -616,30 +620,32 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
616
620
 
617
621
  ${I} {
618
622
  margin-bottom: 12px;
619
- padding-bottom: 12px;
623
+ padding-bottom: 8px;
624
+ font-size: 16px;
625
+ line-height: 1.6;
620
626
  }
621
- `,Mn=i.div`
627
+ `,Tn=i.div`
622
628
  display: flex;
623
629
  flex-direction: column;
624
630
  gap: 12px;
625
- `,Tn=i.div`
631
+ `,In=i.div`
626
632
  display: flex;
627
633
  align-items: flex-start;
628
634
  justify-content: space-between;
629
635
  gap: 12px;
630
- `,In=i.span`
636
+ `,Pn=i.span`
631
637
  font-size: 14px;
632
638
  font-weight: 600;
633
639
  line-height: 1.57;
634
640
  color: ${r.muted1};
635
- `,Pn=i.span`
641
+ `,zn=i.span`
636
642
  display: inline-flex;
637
643
  align-items: center;
638
644
  gap: 8px;
639
645
  font-size: 24px;
640
646
  font-weight: 700;
641
647
  color: ${r.text};
642
- `,zn=i.span`
648
+ `,An=i.span`
643
649
  display: flex;
644
650
  flex-direction: column;
645
651
  align-items: flex-end;
@@ -650,7 +656,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
650
656
  font-weight: 400;
651
657
  line-height: 1;
652
658
  color: ${r.muted};
653
- `;const An=i(St)`
659
+ `;const En=i(Mt)`
654
660
  width: 30px;
655
661
  height: 30px;
656
662
  background: ${r.text};
@@ -663,7 +669,7 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
663
669
  height: 56px;
664
670
  border: 0;
665
671
  border-radius: ${te.btn};
666
- background: ${Ks.buyBtn};
672
+ background: ${Ns.buyBtn};
667
673
  color: ${r.softWhite};
668
674
  font-size: 15px;
669
675
  font-weight: 600;
@@ -684,14 +690,14 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
684
690
  opacity: 0.6;
685
691
  cursor: default;
686
692
  }
687
- `;const Et=Le`
693
+ `;const Rt=Ke`
688
694
  margin: 0;
689
695
  font-size: 13px;
690
696
  `,ve=i.p`
691
- ${Et};
692
- `,En=i(zs)`
693
- ${Et};
694
- `,Rn=i.div`
697
+ ${Rt};
698
+ `,Rn=i(As)`
699
+ ${Rt};
700
+ `,qn=i.div`
695
701
  position: relative;
696
702
  flex: 1 0 auto;
697
703
  margin-top: 48px;
@@ -703,4 +709,4 @@ import{j as t,L as ke,r as T,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t
703
709
  & section {
704
710
  margin-top: 0;
705
711
  }
706
- `;function Fe(o){if(Is(o))return a("errors.rejected");const l=(o.message??"").toLowerCase();return l.includes("insufficient")?a("cart.error.insufficient",{currency:ba.name}):l.includes("no active listing")||l.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const qn=12e4;function Bn(o){const l=[];return o.unavailable.length&&l.push(a("cart.drop.unavailable",{count:o.unavailable.length})),o.own.length&&l.push(a("cart.drop.own",{count:o.own.length})),a("cart.drop.removed",{items:l.join(` ${a("cart.drop.and")} `)})}const We=o=>o.reduce((l,P)=>l+P.priceCredits*P.quantity,0),we=o=>o.flatMap(l=>Array.from({length:l.quantity},()=>({...l,quantity:1})));function Xn(){na({title:a("nav.cart"),noindex:!0});const o=H(e=>e.items),l=H(e=>e.remove),P=H(e=>e.increment),z=H(e=>e.decrement),W=H(e=>e.clear),D=H(e=>e.restore),J=H(e=>e.setFittingOpen),A=ct(e=>e.items),ne=ct(e=>e.toggle),{session:n,signIn:K}=ia(),Rt=ra(),le=$s().packs.slice(0,Ss);T.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const qt=o.some(e=>e.category!=="emote"),{data:$e}=oa({queryKey:["upsell-listings"],queryFn:()=>Ca({first:40}),staleTime:6e4}),{data:$}=ca(n),v=da(),X=Zt(),{state:E}=ea(),[Bt,ie]=T.useState(null),[Ke,ue]=T.useState(null),[_t,B]=T.useState(!1),[_,G]=T.useState(null),Ne=T.useRef(0),[g,j]=T.useState(null),{data:he}=la(n),{data:re}=ua(!0),[Se,Qe]=T.useState(""),oe=T.useRef(null),Ue=ha(o),He=e=>lt(Ue[e.id]),Me=o.filter(He),Oe=o.length>0&&Me.length===0,Ft=Me.reduce((e,s)=>e+s.priceCredits*s.quantity,0),Wt=o.reduce((e,s)=>e+s.quantity,0),Lt=Me.reduce((e,s)=>e+s.quantity,0),Ge=_?_.liveTotalCredits:Ft,Kt=new Set(o.map(e=>e.id)),Ve=(($e==null?void 0:$e.items)??[]).filter(e=>!Kt.has(e.id)).slice(0,12),Nt=new Map(_==null?void 0:_.buyable.map(e=>[e.item.id,e])),pe=($==null?void 0:$.credits)??0,Te=Ge*10,Qt=re?dt(Te,re):0n,Ie=Be({priceCents:Te,priceManaWei:Qt,balanceCents:($==null?void 0:$.balanceCents)??0,manaBalanceWei:he??0n}),Ut=e=>e.some(s=>s.acquisition==="store"),Pe=e=>e.flatMap(s=>s.acquisition==="trade"?[s]:[]),Ht=xa,Ot=e=>ya(e.contractAddress,String(e.itemId));function ge(e){e(),G(null),ue(null),ie(null)}function Gt(){j(null),B(!1)}function De(e){const s=We(e),d=Math.max(0,s-pe),c=le.find(u=>u.credits>=d)??le[le.length-1];Qe(c.id),V("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:s,credits_balance:pe,shortfall:d}),j({phase:"nofunds",lines:e.map(u=>({item:u.item,priceCredits:u.priceCredits,quantity:u.quantity})),shortfall:d}),B(!1)}async function ze(e){if(!n||e.length===0)return;const s=we(e),d=s.map(y=>({...y.item,priceCredits:y.priceCredits})),c=e.map(y=>({...y.item,priceCredits:y.priceCredits,quantity:y.quantity})),u=[];let h="authorize";const w=new Set,S=new Set,F=new Set,R=[];let q=!1;j({phase:"processing",stage:"reserving",step:1,total:s.length});try{const y=[];for(let x=0;x<s.length;x++){const p=s[x];j({phase:"processing",stage:"reserving",step:x+1,total:s.length});try{const M=p.acquisition==="trade"?p.trade.id:void 0,C=p.item.contractAddress&&p.item.itemId!=null?{contractAddress:p.item.contractAddress,itemId:String(p.item.itemId)}:void 0,{credit:U,maxCreditedValue:ee}=await pt(n.identity,p.usdCents,M,C);u.push({salt:U.id,itemId:p.item.id}),y.push(p.acquisition==="store"?{kind:"store",item:{collection:p.item.contractAddress,itemId:String(p.item.itemId),priceWei:p.priceWei},credits:[U],maxCreditedValue:ee,chainId:p.item.chainId}:{kind:"trade",trade:p.trade,credits:[U],maxCreditedValue:ee})}catch(M){if(Ps(M)){if(u.length){try{await Re(n.identity,u.map(C=>C.salt))}catch(C){ae(C,{flow:"cart_checkout",step:"release"})}v.invalidateQueries({queryKey:["usd-balance"]})}De(e);return}throw M}}h="submit";const m=ws(y).length,k=x=>m>1?{current:x,total:m}:void 0,L=(x,p)=>j({phase:"processing",stage:x,step:s.length,total:s.length,signatures:k(p)}),N=x=>x<m?L("awaiting-signature",x+1):L("settling",m);L("awaiting-signature",1);let f=[];if(ms())try{const x=new Map;f=await Cs({purchases:y,buyer:n.address,signer:n.signer,onSigned:()=>N(m),onBroadcast:({txHash:C,salts:U})=>{x.set(C,U),U.forEach(ee=>w.add(ee))}});const p=await Promise.allSettled(f.map(C=>js(C)));p.forEach((C,U)=>{const ee=x.get(f[U])??[];C.status==="fulfilled"?(ee.forEach(Ee=>S.add(Ee)),R.push(f[U])):C.reason instanceof vt||ee.forEach(Ee=>F.add(Ee))});const M=p.flatMap(C=>C.status==="rejected"?[C.reason]:[]);if(M.length&&!M.some(C=>C instanceof vt))throw M[0];q=!0}catch(x){if(!(x instanceof ks)||!va(n.providerType))throw x;f=await _e({purchases:y,buyer:n.address,signer:n.signer,onSigned:N,onBroadcast:({salts:p})=>p.forEach(M=>w.add(M)),onSettled:({txHash:p,salts:M})=>{M.forEach(C=>S.add(C)),R.push(p)},onReverted:({salts:p})=>p.forEach(M=>F.add(M))})}else f=await _e({purchases:y,buyer:n.address,signer:n.signer,onSigned:N,onBroadcast:({salts:x})=>x.forEach(p=>w.add(p)),onSettled:({txHash:x,salts:p})=>{p.forEach(M=>S.add(M)),R.push(x)},onReverted:({salts:x})=>x.forEach(p=>F.add(p))});e.forEach(x=>l(x.item.id)),G(null),V("Shop Completed Purchase",{...xe(d),payment_type:"credits",no_crypto_step:q,transaction_hash:f[0]??null}),bt(v);const b=oe.current;oe.current=null,j(null),B(!1);const Q={items:c,txHash:f[0]??void 0,txHashes:f,settled:!0,...b?{creditsAdded:b}:{}};X("/success",{state:Q,replace:!0})}catch(y){fe(y)||ae(y,{flow:"cart_checkout",step:h,cart_size:e.length});const m=new Set([...w].filter(b=>!F.has(b))),{toRelease:k,boughtItemIds:L}=wt({reservations:u,spent:m,settled:S}),N=d.filter(b=>L.includes(b.id)),f=d.filter(b=>!L.includes(b.id));if(V(fe(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:h,error_code:gt(y),value_usd:ut(f.reduce((b,Q)=>b+Q.priceCredits,0)),cart_size:s.length,partial:N.length>0}),k.length)try{await Re(n.identity,k)}catch(b){ae(b,{flow:"cart_checkout",step:"release"})}if(v.invalidateQueries({queryKey:["usd-balance"]}),N.length>0){L.forEach(b=>l(b)),G(null),bt(v),V("Shop Completed Purchase",{...xe(N),payment_type:"credits",no_crypto_step:q,transaction_hash:R[0]??null,partial:!0}),j({phase:"error",message:a("cart.error.partiallyBought")}),B(!1);return}j({phase:"error",message:Fe(y)})}}function Je(e,s){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 d=oe.current;oe.current=null,j(null),B(!1);const c={items:e,txHash:s[0]??void 0,txHashes:s,settled:!0,...d?{creditsAdded:d}:{}};X("/success",{state:c,replace:!0})}function Xe(e,s){fe(e)||ae(e,{flow:s,step:"submit"}),V(fe(e)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:gt(e)}),j({phase:"error",message:Fe(e)}),B(!1)}async function Vt(e,s){const d=ye(qe.MANAToken,s),c=ye(qe.CreditsManager,s);await bs({auth:{kind:vs.Allowance,contractAddress:d.address,spenderAddress:c.address,chainId:s},signer:e})}async function Ye(){if(re)return re;try{return await v.fetchQuery({queryKey:["mana-rate",ht.chainId],queryFn:()=>fa(ht.chainId),staleTime:6e4})}catch{return}}async function Dt(e){const s=we(e).reduce((h,w)=>h+w.usdCents,0),c=(he??0n)>0n?await Ye():re,u=c?dt(s,c):0n;return{totalCents:s,manaWei:u}}async function Ze(e,s){const d=We(e),{totalCents:c,manaWei:u}=await Dt(e),h=Be({priceCents:c,priceManaWei:u,balanceCents:($==null?void 0:$.balanceCents)??0,manaBalanceWei:he??0n}),w=Ut(e)?{...h,options:h.options.filter(S=>S.method==="credits")}:h;if(s&&w.options.some(S=>S.method===s)){if(s==="credits"){ze(e);return}const{spender:S,chainId:F}=et(s,e);await tt(S,F,()=>s==="mana"?void at(e):void st(e,c,u));return}if(w.options.some(S=>S.method==="mana"||S.method==="combined")){j({phase:"choose",lines:e,totalCents:c,manaWei:u}),B(!1);return}if($!=null&&$.credits<d){De(e);return}ze(e)}function Jt(e){return Be({priceCents:e.totalCents,priceManaWei:e.manaWei,balanceCents:($==null?void 0:$.balanceCents)??0,manaBalanceWei:he??0n})}const[Ae,me]=T.useState(null);function et(e,s){const d=Pe(s)[0].trade;return{spender:e==="mana"?ye(wa(d.contract),d.chainId).address:ye(qe.CreditsManager,d.chainId).address,chainId:d.chainId}}async function tt(e,s,d){const c=xs(s,e),u=n?await fs(c,n.address).catch(()=>!0):!0;if(ys(n==null?void 0:n.providerType,u)){B(!1),me({auth:c,run:d});return}d()}function Xt(e){if((g==null?void 0:g.phase)!=="choose")return;const{lines:s,totalCents:d,manaWei:c}=g;if(e==="credits"){ze(s);return}const{spender:u,chainId:h}=et(e,s);tt(u,h,()=>e==="mana"?void at(s):void st(s,d,c))}async function at(e){if(!n||e.length===0)return;const s=we(e),d=s.map(h=>({...h.item,priceCredits:h.priceCredits})),c=e.map(h=>({...h.item,priceCredits:h.priceCredits,quantity:h.quantity})),u=()=>j({phase:"processing",stage:"settling",step:s.length,total:s.length});j({phase:"processing",stage:"awaiting-signature",step:s.length,total:s.length});try{const h=await hs({trades:Pe(s).map(w=>w.trade),buyer:n.address,signer:n.signer,onSigned:u});e.forEach(w=>l(w.item.id)),G(null),V("Shop Completed Purchase",{...xe(d),payment_type:"mana",transaction_hash:h[0]??null}),v.invalidateQueries({queryKey:["mana-balance"]}),Je(c,h)}catch(h){Xe(h,"buy_cart_mana")}}async function st(e,s,d){if(!n||e.length===0)return;const c=we(e),u=c.map(m=>({...m.item,priceCredits:m.priceCredits})),h=e.map(m=>({...m.item,priceCredits:m.priceCredits,quantity:m.quantity})),w=ps(c.map(m=>m.usdCents),($==null?void 0:$.balanceCents)??0),S=w.reduce((m,k)=>m+k,0),F=gs(Math.max(0,s-S),s,d),R=[],q=new Set,y=new Set;j({phase:"processing",stage:"reserving",step:1,total:c.length});try{const m=Pe(c),k=[];for(let f=0;f<m.length;f++){const b=w[f];if(b<=0)continue;j({phase:"processing",stage:"reserving",step:f+1,total:m.length});const Q=m[f].item,{credit:x,maxCreditedValue:p}=await pt(n.identity,b,m[f].trade.id,Q.contractAddress&&Q.itemId!=null?{contractAddress:Q.contractAddress,itemId:String(Q.itemId)}:void 0);R.push({salt:x.id,itemId:Q.id}),k.push({kind:"trade",trade:m[f].trade,credits:[x],maxCreditedValue:p})}m.forEach((f,b)=>{w[b]<=0&&k.push({kind:"trade",trade:f.trade,credits:[],maxCreditedValue:"0"})}),k[0]={...k[0],maxCreditedValue:(BigInt(k[0].maxCreditedValue)+F).toString()},await Vt(n.signer,m[0].trade.chainId);const L=()=>j({phase:"processing",stage:"settling",step:c.length,total:c.length});j({phase:"processing",stage:"awaiting-signature",step:c.length,total:c.length});const N=await _e({purchases:k,buyer:n.address,signer:n.signer,onSigned:L,onBroadcast:({salts:f})=>f.forEach(b=>q.add(b)),onReverted:({salts:f})=>f.forEach(b=>y.add(b))});e.forEach(f=>l(f.item.id)),G(null),V("Shop Completed Purchase",{...xe(u),payment_type:"credits_and_mana",transaction_hash:N[0]??null}),v.invalidateQueries({queryKey:["mana-balance"]}),Je(h,N)}catch(m){const{toRelease:k}=wt({reservations:R,spent:new Set([...q].filter(L=>!y.has(L))),settled:new Set});k.length&&Re(n.identity,k).catch(()=>{}),R.length&&v.invalidateQueries({queryKey:["usd-balance"]}),Xe(m,"buy_cart_combined")}}async function Y(e){if(!n){yt({type:"cart-checkout"}),K();return}const s=H.getState().items.filter(He);if(s.length===0)return;ie(null),ue(null),B(!0);const d=s.reduce((c,u)=>c+u.priceCredits*u.quantity,0);V("Shop Started Checkout",{cart_size:s.length,cart_value_credits:d,cart_value_usd:ut(d),has_sufficient_credits:pe>=d});try{const c=await Ms(s,n.address,Ht,await Ye(),Ot),u=[...c.unavailable,...c.own];if(u.length&&(u.forEach(h=>l(h.id)),ue(Bn(c))),c.buyable.length===0){ie(a("cart.error.noneAvailable")),G(null);return}if(c.orderChanged){G(c),Ne.current=Date.now();return}await Ze(c.buyable,e)}catch(c){ae(c,{flow:"cart_checkout",step:"review",cart_size:s.length}),ie(Fe(c))}finally{B(!1)}}async function nt(){if(_){if(!n){yt({type:"cart-checkout"}),K();return}if(Date.now()-Ne.current>qn){G(null),ue(null),await Y();return}ie(null),Ze(_.buyable)}}async function Yt(){if(Se){try{sessionStorage.setItem(be,JSON.stringify(H.getState().items))}catch{}B(!0);try{const e=await Ts(Se,n?{address:n.address,identity:n.identity}:void 0);if(e.url){window.location.href=e.url;return}X("/credits")}catch(e){try{sessionStorage.removeItem(be)}catch{}ae(e,{flow:"cart_buy_credits"}),j({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{B(!1)}}}const it=T.useRef(!1);T.useEffect(()=>{if(!n||it.current||!cs("cart-checkout"))return;it.current=!0;const e=setTimeout(()=>void Y(),0);return()=>clearTimeout(e)},[n]);const rt=T.useRef(!1);T.useEffect(()=>{if(!(E!=null&&E.resumeCheckout)||rt.current)return;rt.current=!0,oe.current=E.creditsAdded??null;try{const s=sessionStorage.getItem(be);if(s){sessionStorage.removeItem(be);const d=JSON.parse(s);Array.isArray(d)&&d.length&&D(d)}}catch{}v.invalidateQueries({queryKey:["usd-balance"]});const e=setTimeout(()=>void Y(),0);return()=>clearTimeout(e)},[E==null?void 0:E.resumeCheckout]);const ot=T.useRef(!1);T.useEffect(()=>{if(!(E!=null&&E.startCheckout)||ot.current)return;ot.current=!0,X(".",{replace:!0,state:null});const e=setTimeout(()=>void Y(),0);return()=>clearTimeout(e)},[E==null?void 0:E.startCheckout]);const Z=_t||(g==null?void 0:g.phase)==="processing";return o.length===0&&!g?t.jsx(Ct,{children:t.jsxs(kt,{children:[t.jsxs(jt,{onClick:()=>X(-1),type:"button",children:[t.jsx(O,{name:"arrow-left"}),a("nav.cart")]}),t.jsxs(Hs,{"data-testid":"cart-empty",children:[t.jsx(O,{name:"cart-plus",size:110}),t.jsxs(Os,{children:[t.jsx(Gs,{children:a("cart.empty.title")}),t.jsx(Vs,{children:a("cart.empty.body")})]}),t.jsx(Ds,{to:"/items",children:a("cart.empty.cta")})]})]})}):t.jsxs(Ct,{children:[t.jsxs(kt,{children:[t.jsxs(jt,{onClick:()=>X(-1),type:"button",children:[t.jsx(O,{name:"arrow-left"}),a("nav.cart")]}),t.jsxs(Ns,{children:[t.jsxs(Qs,{children:[t.jsxs(Us,{children:[t.jsx(Js,{onClick:()=>X(-1),type:"button","aria-label":a("cart.goBack"),children:t.jsx(O,{name:"arrow-left"})}),t.jsx(Xs,{children:a("cart.panelTitle",{count:Wt})}),qt?t.jsxs(Ys,{onClick:()=>J(!0),disabled:Z,children:[t.jsx(O,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),t.jsxs(Pt,{children:[t.jsx(Zs,{children:o.map(e=>{const s=Nt.get(e.id),d=s?s.priceCredits:e.priceCredits,c=!!s&&s.priceCredits!==e.priceCredits,u=!e.tokenId,h=e.quantity,w=typeof e.available=="number"&&h>=e.available,S=d*h,F=pa(e),R=!!F&&!!A[F],q=ga(e),y=Ue[e.id],m=!lt(y),k=y==="sold-out"?a("cart.availability.soldOut"):a("cart.availability.unavailable");return t.jsxs(en,{"data-unavailable":m||void 0,children:[t.jsxs(tn,{"data-thumb":!0,children:[q?t.jsx(an,{to:q,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(sn,{"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(nn,{children:[t.jsxs(rn,{"data-desc":!0,children:[q?t.jsx(cn,{to:q,state:{item:e,tradeId:e.tradeId},title:e.name,children:e.name}):t.jsx(on,{title:e.name,children:e.name}),e.creator?t.jsx(dn,{address:e.creator,linkToProfile:!0}):null,Rt&&u?t.jsxs(vn,{"data-testid":"cart-creator-tag",children:[t.jsx(wn,{name:"buy-from-creator"}),a("cart.creatorTag")]}):null]}),t.jsx(ln,{children:m?t.jsxs(t.Fragment,{children:[t.jsxs(fn,{children:[t.jsx(yn,{name:"warning-fill",size:24}),k]}),q?t.jsx(bn,{to:q,state:{item:e,tradeId:e.tradeId},children:a("cart.availability.viewResales")}):null]}):t.jsxs(t.Fragment,{children:[u?t.jsxs(un,{children:[t.jsx($t,{onClick:()=>ge(()=>z(e.id)),disabled:Z||h<=1,"aria-label":a("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(hn,{children:h}),t.jsx($t,{onClick:()=>ge(()=>P(e.id)),disabled:Z||w,"aria-label":a("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(pn,{children:[t.jsx(gn,{})," ",S,c?t.jsx(mn,{children:e.priceCredits*h}):null]})]})})]}),t.jsxs(xn,{children:[F?t.jsx(Cn,{"data-on":R||void 0,onClick:()=>ne(e),"aria-label":R?a("cart.removeFromFavorites",{name:e.name}):a("cart.addToFavorites",{name:e.name}),title:R?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:t.jsx(O,{name:R?"heart-solid":"heart"})}):null,t.jsx(jn,{onClick:()=>ge(()=>l(e.id)),disabled:Z,"aria-label":a("cart.remove",{name:e.name}),title:a("cart.removeTitle"),children:t.jsx(O,{name:"trash",size:24})})]})]},e.id)})}),t.jsx(kn,{children:t.jsx("button",{className:"link",onClick:()=>ge(W),disabled:Z,children:a("cart.clearCart")})})]})]}),t.jsxs($n,{children:[t.jsx(Sn,{children:a("cart.purchaseSummary")}),t.jsxs(Mn,{children:[t.jsxs(Tn,{children:[t.jsx(In,{children:a("cart.totalItems",{count:Lt})}),t.jsx(zn,{children:t.jsxs(Pn,{children:[t.jsx(An,{})," ",Ge]})})]}),t.jsx(Mt,{options:Ie.options,totalCents:Te,shortfall:Ie.manaShortfall,showCreditsAmount:!1,creditsLabel:_?a("marketCheckout.confirmPurchase"):Ie.options.length>1?a("cart.buyWithCredits"):a("cart.checkout"),busy:Z||Oe,onPay:e=>void(_?nt():Y(e)),creditsFallback:{label:Z?a("cart.working"):_?a("marketCheckout.confirmPurchase"):a("cart.checkout"),onClick:()=>void(_?nt():Y())}}),Oe?t.jsx(ve,{className:"muted",children:a("cart.allUnavailable")}):null,n?null:t.jsx(ve,{className:"muted",children:a("cart.signInHint")}),_?t.jsx(ve,{className:"muted",children:a("cart.priceChanged")}):null,Ke?t.jsx(ve,{className:"muted",children:Ke}):null,t.jsx(En,{message:Bt})]})]})]})]}),Ve.length>0?t.jsx(Rn,{children:t.jsx(ds,{title:a("cart.youMightAlsoLike"),items:Ve})}):null,Ae&&n?t.jsx(ls,{auth:Ae.auth,signer:n.signer,title:a("authorizeStep.manaTitle"),name:a("authorizeStep.manaName"),reason:a("authorizeStep.manaReason"),icon:t.jsx("img",{src:us,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{run:e}=Ae;me(null),e()},onCancel:()=>me(null),onClose:()=>me(null)}):null,g?t.jsx(Fs,{phase:g.phase,balanceCredits:pe,onClose:Gt,stage:g.phase==="processing"?g.stage:void 0,step:g.phase==="processing"?g.step:void 0,total:g.phase==="processing"?g.total:void 0,isSelfCustody:ma(n==null?void 0:n.providerType),signatures:g.phase==="processing"?g.signatures:void 0,options:g.phase==="choose"?Jt(g).options:void 0,onPay:Xt,totalCents:g.phase==="choose"?g.totalCents:void 0,totalManaWei:g.phase==="choose"?g.manaWei:void 0,totalCredits:g.phase==="choose"?We(g.lines):void 0,lines:g.phase==="nofunds"?g.lines:void 0,shortfallCredits:g.phase==="nofunds"?g.shortfall:void 0,packs:le,selectedPack:Se,onSelectPack:Qe,onBuyPacks:()=>void Yt(),message:g.phase==="error"?g.message:void 0,onRetry:()=>void Y()}):null]})}export{Xn as Cart};
712
+ `;function We(o){if(Ps(o))return a("errors.rejected");const l=(o.message??"").toLowerCase();return l.includes("insufficient")?a("cart.error.insufficient",{currency:va.name}):l.includes("no active listing")||l.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const Bn=12e4;function _n(o){const l=[];return o.unavailable.length&&l.push(a("cart.drop.unavailable",{count:o.unavailable.length})),o.own.length&&l.push(a("cart.drop.own",{count:o.own.length})),a("cart.drop.removed",{items:l.join(` ${a("cart.drop.and")} `)})}const Le=o=>o.reduce((l,P)=>l+P.priceCredits*P.quantity,0),we=o=>o.flatMap(l=>Array.from({length:l.quantity},()=>({...l,quantity:1})));function Yn(){ia({title:a("nav.cart"),noindex:!0});const o=H(t=>t.items),l=H(t=>t.remove),P=H(t=>t.increment),z=H(t=>t.decrement),W=H(t=>t.clear),D=H(t=>t.restore),J=H(t=>t.setFittingOpen),A=dt(t=>t.items),ne=dt(t=>t.toggle),{session:n,signIn:K}=ra(),qt=oa(),le=Ss().packs.slice(0,Ms);T.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const Bt=o.some(t=>t.category!=="emote"),{data:$e}=ca({queryKey:["upsell-listings"],queryFn:()=>ja({first:40}),staleTime:6e4}),{data:$}=da(n),v=la(),X=ea(),{state:E}=ta(),[_t,ie]=T.useState(null),[Ne,ue]=T.useState(null),[Ft,B]=T.useState(!1),[_,G]=T.useState(null),Qe=T.useRef(0),[g,j]=T.useState(null),{data:he}=ua(n),{data:re}=ha(!0),[Se,Ue]=T.useState(""),oe=T.useRef(null),He=pa(o),Oe=t=>ut(He[t.id]),Me=o.filter(Oe),Ge=o.length>0&&Me.length===0,Wt=Me.reduce((t,s)=>t+s.priceCredits*s.quantity,0),Lt=o.reduce((t,s)=>t+s.quantity,0),Kt=Me.reduce((t,s)=>t+s.quantity,0),Ve=_?_.liveTotalCredits:Wt,Nt=new Set(o.map(t=>t.id)),De=(($e==null?void 0:$e.items)??[]).filter(t=>!Nt.has(t.id)).slice(0,12),Qt=new Map(_==null?void 0:_.buyable.map(t=>[t.item.id,t])),pe=($==null?void 0:$.credits)??0,Te=Ve*10,Ut=re?lt(Te,re):0n,Ie=_e({priceCents:Te,priceManaWei:Ut,balanceCents:($==null?void 0:$.balanceCents)??0,manaBalanceWei:he??0n}),Ht=t=>t.some(s=>s.acquisition==="store"),Pe=t=>t.flatMap(s=>s.acquisition==="trade"?[s]:[]),Ot=fa,Gt=t=>ba(t.contractAddress,String(t.itemId));function ge(t){t(),G(null),ue(null),ie(null)}function Vt(){j(null),B(!1)}function Je(t){const s=Le(t),d=Math.max(0,s-pe),c=le.find(u=>u.credits>=d)??le[le.length-1];Ue(c.id),V("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:s,credits_balance:pe,shortfall:d}),j({phase:"nofunds",lines:t.map(u=>({item:u.item,priceCredits:u.priceCredits,quantity:u.quantity})),shortfall:d}),B(!1)}async function ze(t){if(!n||t.length===0)return;const s=we(t),d=s.map(y=>({...y.item,priceCredits:y.priceCredits})),c=t.map(y=>({...y.item,priceCredits:y.priceCredits,quantity:y.quantity})),u=[];let h="authorize";const w=new Set,S=new Set,F=new Set,R=[];let q=!1;j({phase:"processing",stage:"reserving",step:1,total:s.length});try{const y=[];for(let x=0;x<s.length;x++){const p=s[x];j({phase:"processing",stage:"reserving",step:x+1,total:s.length});try{const M=p.acquisition==="trade"?p.trade.id:void 0,C=p.item.contractAddress&&p.item.itemId!=null?{contractAddress:p.item.contractAddress,itemId:String(p.item.itemId)}:void 0,{credit:U,maxCreditedValue:ee}=await gt(n.identity,p.usdCents,M,C);u.push({salt:U.id,itemId:p.item.id}),y.push(p.acquisition==="store"?{kind:"store",item:{collection:p.item.contractAddress,itemId:String(p.item.itemId),priceWei:p.priceWei},credits:[U],maxCreditedValue:ee,chainId:p.item.chainId}:{kind:"trade",trade:p.trade,credits:[U],maxCreditedValue:ee})}catch(M){if(zs(M)){if(u.length){try{await qe(n.identity,u.map(C=>C.salt))}catch(C){ae(C,{flow:"cart_checkout",step:"release"})}v.invalidateQueries({queryKey:["usd-balance"]})}Je(t);return}throw M}}h="submit";const m=Cs(y).length,k=x=>m>1?{current:x,total:m}:void 0,L=(x,p)=>j({phase:"processing",stage:x,step:s.length,total:s.length,signatures:k(p)}),N=x=>x<m?L("awaiting-signature",x+1):L("settling",m);L("awaiting-signature",1);let f=[];if(xs())try{const x=new Map;f=await js({purchases:y,buyer:n.address,signer:n.signer,onSigned:()=>N(m),onBroadcast:({txHash:C,salts:U})=>{x.set(C,U),U.forEach(ee=>w.add(ee))}});const p=await Promise.allSettled(f.map(C=>ks(C)));p.forEach((C,U)=>{const ee=x.get(f[U])??[];C.status==="fulfilled"?(ee.forEach(Ee=>S.add(Ee)),R.push(f[U])):C.reason instanceof wt||ee.forEach(Ee=>F.add(Ee))});const M=p.flatMap(C=>C.status==="rejected"?[C.reason]:[]);if(M.length&&!M.some(C=>C instanceof wt))throw M[0];q=!0}catch(x){if(!(x instanceof $s)||!wa(n.providerType))throw x;f=await Fe({purchases:y,buyer:n.address,signer:n.signer,onSigned:N,onBroadcast:({salts:p})=>p.forEach(M=>w.add(M)),onSettled:({txHash:p,salts:M})=>{M.forEach(C=>S.add(C)),R.push(p)},onReverted:({salts:p})=>p.forEach(M=>F.add(M))})}else f=await Fe({purchases:y,buyer:n.address,signer:n.signer,onSigned:N,onBroadcast:({salts:x})=>x.forEach(p=>w.add(p)),onSettled:({txHash:x,salts:p})=>{p.forEach(M=>S.add(M)),R.push(x)},onReverted:({salts:x})=>x.forEach(p=>F.add(p))});t.forEach(x=>l(x.item.id)),G(null),V("Shop Completed Purchase",{...xe(d),payment_type:"credits",no_crypto_step:q,transaction_hash:f[0]??null}),vt(v);const b=oe.current;oe.current=null,j(null),B(!1);const Q={items:c,txHash:f[0]??void 0,txHashes:f,settled:!0,...b?{creditsAdded:b}:{}};X("/success",{state:Q,replace:!0})}catch(y){fe(y)||ae(y,{flow:"cart_checkout",step:h,cart_size:t.length});const m=new Set([...w].filter(b=>!F.has(b))),{toRelease:k,boughtItemIds:L}=Ct({reservations:u,spent:m,settled:S}),N=d.filter(b=>L.includes(b.id)),f=d.filter(b=>!L.includes(b.id));if(V(fe(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:h,error_code:mt(y),value_usd:ht(f.reduce((b,Q)=>b+Q.priceCredits,0)),cart_size:s.length,partial:N.length>0}),k.length)try{await qe(n.identity,k)}catch(b){ae(b,{flow:"cart_checkout",step:"release"})}if(v.invalidateQueries({queryKey:["usd-balance"]}),N.length>0){L.forEach(b=>l(b)),G(null),vt(v),V("Shop Completed Purchase",{...xe(N),payment_type:"credits",no_crypto_step:q,transaction_hash:R[0]??null,partial:!0}),j({phase:"error",message:a("cart.error.partiallyBought")}),B(!1);return}j({phase:"error",message:We(y)})}}function Xe(t,s){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 d=oe.current;oe.current=null,j(null),B(!1);const c={items:t,txHash:s[0]??void 0,txHashes:s,settled:!0,...d?{creditsAdded:d}:{}};X("/success",{state:c,replace:!0})}function Ye(t,s){fe(t)||ae(t,{flow:s,step:"submit"}),V(fe(t)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:mt(t)}),j({phase:"error",message:We(t)}),B(!1)}async function Dt(t,s){const d=ye(Be.MANAToken,s),c=ye(Be.CreditsManager,s);await vs({auth:{kind:ws.Allowance,contractAddress:d.address,spenderAddress:c.address,chainId:s},signer:t})}async function Ze(){if(re)return re;try{return await v.fetchQuery({queryKey:["mana-rate",pt.chainId],queryFn:()=>ya(pt.chainId),staleTime:6e4})}catch{return}}async function Jt(t){const s=we(t).reduce((h,w)=>h+w.usdCents,0),c=(he??0n)>0n?await Ze():re,u=c?lt(s,c):0n;return{totalCents:s,manaWei:u}}async function et(t,s){const d=Le(t),{totalCents:c,manaWei:u}=await Jt(t),h=_e({priceCents:c,priceManaWei:u,balanceCents:($==null?void 0:$.balanceCents)??0,manaBalanceWei:he??0n}),w=Ht(t)?{...h,options:h.options.filter(S=>S.method==="credits")}:h;if(s&&w.options.some(S=>S.method===s)){if(s==="credits"){ze(t);return}const{spender:S,chainId:F}=tt(s,t);await at(S,F,()=>s==="mana"?void st(t):void nt(t,c,u));return}if(w.options.some(S=>S.method==="mana"||S.method==="combined")){j({phase:"choose",lines:t,totalCents:c,manaWei:u}),B(!1);return}if($!=null&&$.credits<d){Je(t);return}ze(t)}function Xt(t){return _e({priceCents:t.totalCents,priceManaWei:t.manaWei,balanceCents:($==null?void 0:$.balanceCents)??0,manaBalanceWei:he??0n})}const[Ae,me]=T.useState(null);function tt(t,s){const d=Pe(s)[0].trade;return{spender:t==="mana"?ye(Ca(d.contract),d.chainId).address:ye(Be.CreditsManager,d.chainId).address,chainId:d.chainId}}async function at(t,s,d){const c=fs(s,t),u=n?await ys(c,n.address).catch(()=>!0):!0;if(bs(n==null?void 0:n.providerType,u)){B(!1),me({auth:c,run:d});return}d()}function Yt(t){if((g==null?void 0:g.phase)!=="choose")return;const{lines:s,totalCents:d,manaWei:c}=g;if(t==="credits"){ze(s);return}const{spender:u,chainId:h}=tt(t,s);at(u,h,()=>t==="mana"?void st(s):void nt(s,d,c))}async function st(t){if(!n||t.length===0)return;const s=we(t),d=s.map(h=>({...h.item,priceCredits:h.priceCredits})),c=t.map(h=>({...h.item,priceCredits:h.priceCredits,quantity:h.quantity})),u=()=>j({phase:"processing",stage:"settling",step:s.length,total:s.length});j({phase:"processing",stage:"awaiting-signature",step:s.length,total:s.length});try{const h=await ps({trades:Pe(s).map(w=>w.trade),buyer:n.address,signer:n.signer,onSigned:u});t.forEach(w=>l(w.item.id)),G(null),V("Shop Completed Purchase",{...xe(d),payment_type:"mana",transaction_hash:h[0]??null}),v.invalidateQueries({queryKey:["mana-balance"]}),Xe(c,h)}catch(h){Ye(h,"buy_cart_mana")}}async function nt(t,s,d){if(!n||t.length===0)return;const c=we(t),u=c.map(m=>({...m.item,priceCredits:m.priceCredits})),h=t.map(m=>({...m.item,priceCredits:m.priceCredits,quantity:m.quantity})),w=gs(c.map(m=>m.usdCents),($==null?void 0:$.balanceCents)??0),S=w.reduce((m,k)=>m+k,0),F=ms(Math.max(0,s-S),s,d),R=[],q=new Set,y=new Set;j({phase:"processing",stage:"reserving",step:1,total:c.length});try{const m=Pe(c),k=[];for(let f=0;f<m.length;f++){const b=w[f];if(b<=0)continue;j({phase:"processing",stage:"reserving",step:f+1,total:m.length});const Q=m[f].item,{credit:x,maxCreditedValue:p}=await gt(n.identity,b,m[f].trade.id,Q.contractAddress&&Q.itemId!=null?{contractAddress:Q.contractAddress,itemId:String(Q.itemId)}:void 0);R.push({salt:x.id,itemId:Q.id}),k.push({kind:"trade",trade:m[f].trade,credits:[x],maxCreditedValue:p})}m.forEach((f,b)=>{w[b]<=0&&k.push({kind:"trade",trade:f.trade,credits:[],maxCreditedValue:"0"})}),k[0]={...k[0],maxCreditedValue:(BigInt(k[0].maxCreditedValue)+F).toString()},await Dt(n.signer,m[0].trade.chainId);const L=()=>j({phase:"processing",stage:"settling",step:c.length,total:c.length});j({phase:"processing",stage:"awaiting-signature",step:c.length,total:c.length});const N=await Fe({purchases:k,buyer:n.address,signer:n.signer,onSigned:L,onBroadcast:({salts:f})=>f.forEach(b=>q.add(b)),onReverted:({salts:f})=>f.forEach(b=>y.add(b))});t.forEach(f=>l(f.item.id)),G(null),V("Shop Completed Purchase",{...xe(u),payment_type:"credits_and_mana",transaction_hash:N[0]??null}),v.invalidateQueries({queryKey:["mana-balance"]}),Xe(h,N)}catch(m){const{toRelease:k}=Ct({reservations:R,spent:new Set([...q].filter(L=>!y.has(L))),settled:new Set});k.length&&qe(n.identity,k).catch(()=>{}),R.length&&v.invalidateQueries({queryKey:["usd-balance"]}),Ye(m,"buy_cart_combined")}}async function Y(t){if(!n){bt({type:"cart-checkout"}),K();return}const s=H.getState().items.filter(Oe);if(s.length===0)return;ie(null),ue(null),B(!0);const d=s.reduce((c,u)=>c+u.priceCredits*u.quantity,0);V("Shop Started Checkout",{cart_size:s.length,cart_value_credits:d,cart_value_usd:ht(d),has_sufficient_credits:pe>=d});try{const c=await Ts(s,n.address,Ot,await Ze(),Gt),u=[...c.unavailable,...c.own];if(u.length&&(u.forEach(h=>l(h.id)),ue(_n(c))),c.buyable.length===0){ie(a("cart.error.noneAvailable")),G(null);return}if(c.orderChanged){G(c),Qe.current=Date.now();return}await et(c.buyable,t)}catch(c){ae(c,{flow:"cart_checkout",step:"review",cart_size:s.length}),ie(We(c))}finally{B(!1)}}async function it(){if(_){if(!n){bt({type:"cart-checkout"}),K();return}if(Date.now()-Qe.current>Bn){G(null),ue(null),await Y();return}ie(null),et(_.buyable)}}async function Zt(){if(Se){try{sessionStorage.setItem(be,JSON.stringify(H.getState().items))}catch{}B(!0);try{const t=await Is(Se,n?{address:n.address,identity:n.identity}:void 0);if(t.url){window.location.href=t.url;return}X("/credits")}catch(t){try{sessionStorage.removeItem(be)}catch{}ae(t,{flow:"cart_buy_credits"}),j({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{B(!1)}}}const rt=T.useRef(!1);T.useEffect(()=>{if(!n||rt.current||!ds("cart-checkout"))return;rt.current=!0;const t=setTimeout(()=>void Y(),0);return()=>clearTimeout(t)},[n]);const ot=T.useRef(!1);T.useEffect(()=>{if(!(E!=null&&E.resumeCheckout)||ot.current)return;ot.current=!0,oe.current=E.creditsAdded??null;try{const s=sessionStorage.getItem(be);if(s){sessionStorage.removeItem(be);const d=JSON.parse(s);Array.isArray(d)&&d.length&&D(d)}}catch{}v.invalidateQueries({queryKey:["usd-balance"]});const t=setTimeout(()=>void Y(),0);return()=>clearTimeout(t)},[E==null?void 0:E.resumeCheckout]);const ct=T.useRef(!1);T.useEffect(()=>{if(!(E!=null&&E.startCheckout)||ct.current)return;ct.current=!0,X(".",{replace:!0,state:null});const t=setTimeout(()=>void Y(),0);return()=>clearTimeout(t)},[E==null?void 0:E.startCheckout]);const Z=Ft||(g==null?void 0:g.phase)==="processing";return o.length===0&&!g?e.jsx(jt,{children:e.jsxs($t,{children:[e.jsxs(kt,{onClick:()=>X(-1),type:"button",children:[e.jsx(O,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(Os,{"data-testid":"cart-empty",children:[e.jsx(O,{name:"cart-plus",size:110}),e.jsxs(Gs,{children:[e.jsx(Vs,{children:a("cart.empty.title")}),e.jsx(Ds,{children:a("cart.empty.body")})]}),e.jsx(Js,{to:"/items",children:a("cart.empty.cta")})]})]})}):e.jsxs(jt,{children:[e.jsxs($t,{children:[e.jsxs(kt,{onClick:()=>X(-1),type:"button",children:[e.jsx(O,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(Qs,{children:[e.jsxs(Us,{children:[e.jsxs(Hs,{children:[e.jsx(Xs,{onClick:()=>X(-1),type:"button","aria-label":a("cart.goBack"),children:e.jsx(O,{name:"arrow-left"})}),e.jsx(Ys,{children:a("cart.panelTitle",{count:Lt})}),Bt?e.jsxs(Zs,{onClick:()=>J(!0),disabled:Z,children:[e.jsx(O,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),e.jsxs(zt,{children:[e.jsx(en,{children:o.map(t=>{const s=Qt.get(t.id),d=s?s.priceCredits:t.priceCredits,c=!!s&&s.priceCredits!==t.priceCredits,u=!t.tokenId,h=t.quantity,w=typeof t.available=="number"&&h>=t.available,S=d*h,F=ga(t),R=!!F&&!!A[F],q=ma(t),y=He[t.id],m=!ut(y),k=y==="sold-out"?a("cart.availability.soldOut"):a("cart.availability.unavailable");return e.jsxs(tn,{"data-unavailable":m||void 0,children:[e.jsxs(an,{"data-thumb":!0,children:[q?e.jsx(sn,{to:q,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(nn,{"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(rn,{children:[e.jsxs(on,{"data-desc":!0,children:[q?e.jsx(dn,{to:q,state:{item:t,tradeId:t.tradeId},title:t.name,children:t.name}):e.jsx(cn,{title:t.name,children:t.name}),t.creator?e.jsx(ln,{address:t.creator,linkToProfile:!0}):null,qt&&u?e.jsxs(wn,{"data-testid":"cart-creator-tag",children:[e.jsx(Cn,{name:"buy-from-creator"}),a("cart.creatorTag")]}):null]}),e.jsx(un,{children:m?e.jsxs(e.Fragment,{children:[e.jsxs(yn,{children:[e.jsx(bn,{name:"warning-fill",size:24}),k]}),q?e.jsx(vn,{to:q,state:{item:t,tradeId:t.tradeId},children:a("cart.availability.viewResales")}):null]}):e.jsxs(e.Fragment,{children:[u?e.jsxs(hn,{children:[e.jsx(St,{onClick:()=>ge(()=>z(t.id)),disabled:Z||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(pn,{children:h}),e.jsx(St,{onClick:()=>ge(()=>P(t.id)),disabled:Z||w,"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(gn,{children:[e.jsx(mn,{})," ",S,c?e.jsx(xn,{children:t.priceCredits*h}):null]})]})})]}),e.jsxs(fn,{children:[F?e.jsx(jn,{"data-on":R||void 0,onClick:()=>ne(t),"aria-label":R?a("cart.removeFromFavorites",{name:t.name}):a("cart.addToFavorites",{name:t.name}),title:R?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:e.jsx(O,{name:R?"heart-solid":"heart"})}):null,e.jsx(kn,{onClick:()=>ge(()=>l(t.id)),disabled:Z,"aria-label":a("cart.remove",{name:t.name}),title:a("cart.removeTitle"),children:e.jsx(O,{name:"trash",size:24})})]})]},t.id)})}),e.jsx($n,{children:e.jsx("button",{className:"link",onClick:()=>ge(W),disabled:Z,children:a("cart.clearCart")})})]})]}),e.jsxs(Sn,{children:[e.jsx(Mn,{children:a("cart.purchaseSummary")}),e.jsxs(Tn,{children:[e.jsxs(In,{children:[e.jsx(Pn,{children:a("cart.totalItems",{count:Kt})}),e.jsx(An,{children:e.jsxs(zn,{children:[e.jsx(En,{})," ",Ve]})})]}),e.jsx(Tt,{options:Ie.options,totalCents:Te,shortfall:Ie.manaShortfall,showCreditsAmount:!1,creditsLabel:_?a("marketCheckout.confirmPurchase"):Ie.options.length>1?a("cart.buyWithCredits"):a("cart.checkout"),busy:Z||Ge,onPay:t=>void(_?it():Y(t)),creditsFallback:{label:Z?a("cart.working"):_?a("marketCheckout.confirmPurchase"):a("cart.checkout"),onClick:()=>void(_?it():Y())}}),Ge?e.jsx(ve,{className:"muted",children:a("cart.allUnavailable")}):null,n?null:e.jsx(ve,{className:"muted",children:a("cart.signInHint")}),_?e.jsx(ve,{className:"muted",children:a("cart.priceChanged")}):null,Ne?e.jsx(ve,{className:"muted",children:Ne}):null,e.jsx(Rn,{message:_t})]})]})]})]}),De.length>0?e.jsx(qn,{children:e.jsx(ls,{title:a("cart.youMightAlsoLike"),items:De})}):null,Ae&&n?e.jsx(us,{auth:Ae.auth,signer:n.signer,title:a("authorizeStep.manaTitle"),name:a("authorizeStep.manaName"),reason:a("authorizeStep.manaReason"),icon:e.jsx("img",{src:hs,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{run:t}=Ae;me(null),t()},onCancel:()=>me(null),onClose:()=>me(null)}):null,g?e.jsx(Ws,{phase:g.phase,balanceCredits:pe,onClose:Vt,stage:g.phase==="processing"?g.stage:void 0,step:g.phase==="processing"?g.step:void 0,total:g.phase==="processing"?g.total:void 0,isSelfCustody:xa(n==null?void 0:n.providerType),signatures:g.phase==="processing"?g.signatures:void 0,options:g.phase==="choose"?Xt(g).options:void 0,onPay:Yt,totalCents:g.phase==="choose"?g.totalCents:void 0,totalManaWei:g.phase==="choose"?g.manaWei:void 0,totalCredits:g.phase==="choose"?Le(g.lines):void 0,lines:g.phase==="nofunds"?g.lines:void 0,shortfallCredits:g.phase==="nofunds"?g.shortfall:void 0,packs:le,selectedPack:Se,onSelectPack:Ue,onBuyPacks:()=>void Zt(),message:g.phase==="error"?g.message:void 0,onRetry:()=>void Y()}):null]})}export{Yn as Cart};
@@ -1,4 +1,4 @@
1
- import{ai as N,aj as w,ak as o,al as n,K as D,w as M}from"./index-BwmnMTdg.js";import{r as U,j as g}from"./react-BYHuwl8r.js";import{g as z,a as E,c as I,b as K}from"./clsx-WwvpwSg0.js";import{s as v}from"./styled-Dfg0i8eX.js";function F(r){return z("MuiCircularProgress",r)}E("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const W=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,P,b,S,$;const t=44,B=M(P||(P=l`
1
+ import{ai as N,aj as w,ak as o,al as n,K as D,w as M}from"./index-DrsPf8lM.js";import{r as U,j as g}from"./react-BYHuwl8r.js";import{g as z,a as E,c as I,b as K}from"./clsx-WwvpwSg0.js";import{s as v}from"./styled-DxeNVjAi.js";function F(r){return z("MuiCircularProgress",r)}E("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const W=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,P,b,S,$;const t=44,B=M(P||(P=l`
2
2
  0% {
3
3
  transform: rotate(0deg);
4
4
  }
@@ -1,4 +1,4 @@
1
- import{j as e,r as m,d as J,b as X}from"./react-BYHuwl8r.js";import{t as b,s,bs as ee,a1 as te,D as T,bt as ae,bu as oe,I as ie,b as a,c as re,F as se,v as ne,x as ce,C as le,ap as z,aq as de,bv as pe,bw as xe}from"./index-BwmnMTdg.js";import{E as he}from"./ErrorNotice-D_MmJHjd.js";import{d as me,P as ge,C as ue,a as be,b as fe}from"./collectionPage.styles-CcRhgEaw.js";import{u as ve,S as W,a as ye,F as je,c as Ce,P as we,d as $e,H as ke,e as Ne}from"./categories-B8yCTSzR.js";import{L as Se}from"./LoadMore-BcR7LuW8.js";import{u as Pe}from"./useInfiniteGrid-BADHIu6F.js";import{G as Ae}from"./grid.styles-CX_shgZ5.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./skeleton.styles-JTH6hNy6.js";const Me=s.section`
1
+ import{j as e,r as m,d as J,b as X}from"./react-BYHuwl8r.js";import{t as b,s,bt as ee,a1 as te,D as T,bu as ae,bv as oe,I as ie,b as a,c as re,F as se,v as ne,x as ce,C as le,ap as z,aq as de,bw as pe,bx as xe}from"./index-DrsPf8lM.js";import{E as he}from"./ErrorNotice-C0iIUOEA.js";import{d as me,P as ge,C as ue,a as be,b as fe}from"./collectionPage.styles-Cbo17VjU.js";import{u as ve,S as W,a as ye,F as je,c as Ce,P as we,d as $e,H as ke,e as Ne}from"./categories-Bwk-Btnk.js";import{L as Se}from"./LoadMore-BgEWB4j8.js";import{u as Pe}from"./useInfiniteGrid-BxsdGvVu.js";import{G as Ae}from"./grid.styles-C7DIeQ4F.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./skeleton.styles-B-VOk6tY.js";const Me=s.section`
2
2
  position: relative;
3
3
  border-radius: ${b.radius.card};
4
4
  overflow: hidden;