@dcl/shop 1.13.1-35146304116.commit-0532a2b → 1.13.1-35147466824.commit-691c71e

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 (418) hide show
  1. package/_assets/{Activity-CUoq5Ec_.js → Activity-B_D0SGqX.js} +7 -7
  2. package/_assets/{AnimatedBackground-CkSS8iDv.js → AnimatedBackground-CwQmxOFi.js} +6 -6
  3. package/_assets/{Assets-SQGh-_eg.js → Assets-VVrgUxpf.js} +14 -14
  4. package/_assets/{Authorizations-L1Pu4suv.js → Authorizations-Bepgew8q.js} +10 -10
  5. package/_assets/{Cart-CyKZk7CM.js → Cart-8uayDrxo.js} +9 -9
  6. package/_assets/{Collection-DeDyoluW.js → Collection-GfGftuMU.js} +7 -7
  7. package/_assets/{CollectionCarousel-DM2JN-Og.js → CollectionCarousel-CrO5pEgo.js} +14 -14
  8. package/_assets/Confetti-D8VQEKfB.js +18 -0
  9. package/_assets/{ConstantsUtil-CzAq2JlG.js → ConstantsUtil-BQvpBpQu.js} +2 -2
  10. package/_assets/{ContentClient-CwohpHEJ.js → ContentClient-HMgCjCsc.js} +2 -2
  11. package/_assets/{Creator-CXCzrdUF.js → Creator-D-qT8exB.js} +46 -46
  12. package/_assets/{DeploymentBuilder-CXqgptK8.js → DeploymentBuilder-BbyLDwPt.js} +4 -4
  13. package/_assets/{EmotePlaybackBar-B-oE6PfU.js → EmotePlaybackBar-CaJAXuFm.js} +19 -19
  14. package/_assets/{ErrorNotice-BjKorbeP.js → ErrorNotice-DgLTEx75.js} +2 -2
  15. package/_assets/Event-F8QeIya1.js +72 -0
  16. package/_assets/{ExchangeController-Ca1vSNQH.js → ExchangeController-7TtAhy38.js} +2 -2
  17. package/_assets/{Faq-BVnO4obf.js → Faq-DGPgsE0y.js} +2 -2
  18. package/_assets/{GetCredits-uWqqViY_.js → GetCredits-Dy4K0Tve.js} +11 -11
  19. package/_assets/{Grow-EG3kvKvE.js → Grow-aL4So4Ma.js} +2 -2
  20. package/_assets/HelpersUtil-BQh8MsBd.js +63 -0
  21. package/_assets/{ItemDetail-D9wpx_7k.js → ItemDetail-DH3C6g1a.js} +33 -33
  22. package/_assets/LoadMore-CAovcyRj.js +8 -0
  23. package/_assets/{ManaPricingBanner.styles-BQp5Kq1w.js → ManaPricingBanner.styles-DlZ7ilpc.js} +3 -3
  24. package/_assets/{MyAssets-pm-zUWXo.js → MyAssets-A6dazeyv.js} +14 -14
  25. package/_assets/{MyFavorites-CrlDOLqd.js → MyFavorites-DuT_Xsaf.js} +9 -9
  26. package/_assets/{NetworkUtil-D5060_28.js → NetworkUtil-BtYJyuKu.js} +2 -2
  27. package/_assets/NotFound-C2JeBVxZ.js +18 -0
  28. package/_assets/{NotificationsBell--z2laYR4.js → NotificationsBell-BdWtXFrk.js} +2 -2
  29. package/_assets/{OutfitDetail-C45j_NQH.js → OutfitDetail-CvA6YqRb.js} +5 -5
  30. package/_assets/OutfitPreview-RpSf5VhQ.js +7 -0
  31. package/_assets/{OutfitStudio-BQAYSFVW.js → OutfitStudio-C_fP6Tdr.js} +2 -2
  32. package/_assets/{PhArrowCircleDown-Bmy0XPqd.js → PhArrowCircleDown-oZRgIV6I.js} +5 -5
  33. package/_assets/{PhArrowClockwise-Bklo7MBV.js → PhArrowClockwise-D6H6uB8s.js} +3 -3
  34. package/_assets/{PhArrowDown-CBjJCstB.js → PhArrowDown-CRBvhObC.js} +4 -4
  35. package/_assets/{PhArrowLeft-BCeYPtMx.js → PhArrowLeft-iC7ALVz_.js} +3 -3
  36. package/_assets/{PhArrowRight-Ch61WxZn.js → PhArrowRight-BMhSphsR.js} +4 -4
  37. package/_assets/{PhArrowSquareOut-Bk5nSBoz.js → PhArrowSquareOut-BGOFtcYV.js} +4 -4
  38. package/_assets/{PhArrowUp-CzPwFe1F.js → PhArrowUp-DaOakyLF.js} +5 -5
  39. package/_assets/{PhArrowUpRight-DF87CEc7.js → PhArrowUpRight-Dv-X4w2R.js} +4 -4
  40. package/_assets/{PhArrowsClockwise-D5XWB216.js → PhArrowsClockwise-DnI7mFlV.js} +4 -4
  41. package/_assets/{PhArrowsDownUp-CVtoWYS-.js → PhArrowsDownUp-BT1rp80C.js} +5 -5
  42. package/_assets/{PhArrowsLeftRight-Cu83Wp7y.js → PhArrowsLeftRight-3JEyJt0N.js} +3 -3
  43. package/_assets/{PhBank-BjB_uqsX.js → PhBank-DlTySila.js} +3 -3
  44. package/_assets/{PhBrowser-CW3ZGiB7.js → PhBrowser-CxUZLRbi.js} +4 -4
  45. package/_assets/PhCaretDown-Co8viBJv.js +15 -0
  46. package/_assets/{PhCaretLeft-DPSFahQA.js → PhCaretLeft-ScH02zvv.js} +4 -4
  47. package/_assets/PhCaretRight-CG-ZCjvT.js +15 -0
  48. package/_assets/{PhCaretUp-Bit2hvKo.js → PhCaretUp-SXVNZaJo.js} +4 -4
  49. package/_assets/{PhCheck-BHmNQJ6P.js → PhCheck-DETGkRRi.js} +3 -3
  50. package/_assets/{PhCircleHalf-AD4oTWoj.js → PhCircleHalf-BN36Nweh.js} +4 -4
  51. package/_assets/{PhClock-3t4anT3D.js → PhClock-DPd3K2DL.js} +3 -3
  52. package/_assets/{PhCompass-DpvhkfDj.js → PhCompass-F0g-SfuH.js} +5 -5
  53. package/_assets/{PhCopy-We2XYWCm.js → PhCopy-CzpD7rrG.js} +5 -5
  54. package/_assets/{PhCreditCard-BBnTMXbe.js → PhCreditCard-NnI7YcNP.js} +4 -4
  55. package/_assets/{PhCurrencyDollar-dPV4byY8.js → PhCurrencyDollar-Bst29vzW.js} +4 -4
  56. package/_assets/{PhDesktop-DVuLe5q1.js → PhDesktop-CFSSNEkS.js} +2 -2
  57. package/_assets/{PhDeviceMobile-D6knI_PD.js → PhDeviceMobile-Dd2ijltg.js} +5 -5
  58. package/_assets/{PhDotsThree-D_uTiViU.js → PhDotsThree-CI5y9TIg.js} +4 -4
  59. package/_assets/{PhEnvelope-Bkk7fDMT.js → PhEnvelope-DrQ5vbHf.js} +2 -2
  60. package/_assets/{PhFunnelSimple-BVx2yoJC.js → PhFunnelSimple-CI4FOzkp.js} +4 -4
  61. package/_assets/{PhGlobe-BUa1rAnN.js → PhGlobe-DR2SpSWA.js} +2 -2
  62. package/_assets/{PhIdentificationCard-D7mCEldI.js → PhIdentificationCard-5YfSRHO7.js} +3 -3
  63. package/_assets/{PhImage-DN8upEaC.js → PhImage-D7dVXxCI.js} +2 -2
  64. package/_assets/{PhInfo-BRv5JqkG.js → PhInfo-DNTh1xhU.js} +4 -4
  65. package/_assets/{PhLightbulb-LZ8Bksrw.js → PhLightbulb-BfCndXXI.js} +4 -4
  66. package/_assets/{PhMagnifyingGlass-Nlml1ksU.js → PhMagnifyingGlass-DB41rFTM.js} +2 -2
  67. package/_assets/{PhPaperPlaneRight-QfFyGr7O.js → PhPaperPlaneRight-D6oxeO8G.js} +4 -4
  68. package/_assets/{PhPlus-C6YKBVJU.js → PhPlus-B90Q_jSC.js} +3 -3
  69. package/_assets/{PhPower-BtHcdIUq.js → PhPower-B3OeVFPP.js} +4 -4
  70. package/_assets/{PhPuzzlePiece-D5mYYrHE.js → PhPuzzlePiece-DMvneE8o.js} +4 -4
  71. package/_assets/{PhQrCode-MfgEx90-.js → PhQrCode-B1ogONq9.js} +4 -4
  72. package/_assets/{PhQuestion-BHeGiiUF.js → PhQuestion-BGPtjzO3.js} +2 -2
  73. package/_assets/{PhQuestionMark-DNtDU6-_.js → PhQuestionMark-Bx5KlE6e.js} +4 -4
  74. package/_assets/{PhSealCheck-CDWno5AE.js → PhSealCheck-kDiKrn8v.js} +3 -3
  75. package/_assets/{PhSignOut-BWUfOWAY.js → PhSignOut-C40w8abk.js} +4 -4
  76. package/_assets/{PhSpinner-Chbk-Rrh.js → PhSpinner-BnCR7oBU.js} +3 -3
  77. package/_assets/{PhTrash-CknzCMhK.js → PhTrash-Dx6EnoNj.js} +2 -2
  78. package/_assets/{PhUser-DBmpCM-x.js → PhUser-BMrVwUFx.js} +3 -3
  79. package/_assets/{PhVault-B_-lceT6.js → PhVault-CJhJgRMl.js} +2 -2
  80. package/_assets/{PhWallet-DzHci4bI.js → PhWallet-DUAwnObx.js} +3 -3
  81. package/_assets/{PhWarning-DNajgYKH.js → PhWarning-DQNslokT.js} +3 -3
  82. package/_assets/{PhWarningCircle-DaWHEJd0.js → PhWarningCircle-p1EFi5p4.js} +2 -2
  83. package/_assets/{PhX-o_0aqvnZ.js → PhX-cY2Ff_Gl.js} +4 -4
  84. package/_assets/{SaleCountdown-BF0I20W5.js → SaleCountdown-BOp8aJfy.js} +2 -2
  85. package/_assets/{Spinner-BA7Ut7Kf.js → Spinner-BynqtNdl.js} +4 -4
  86. package/_assets/{StoreSettings-yx6fb2zF.js → StoreSettings-CbPna8kP.js} +13 -13
  87. package/_assets/{Success-NX2ENRib.js → Success-bg8XK0yM.js} +11 -11
  88. package/_assets/{SwapController-DEOB6qkC.js → SwapController-FBcxo_2T.js} +2 -2
  89. package/_assets/{TradeService-B3hWo7M3.js → TradeService-B10-pJNL.js} +2 -2
  90. package/_assets/{W3MFrameProviderSingleton-B6rhAVVy.js → W3MFrameProviderSingleton-D0jWw1Cc.js} +4 -4
  91. package/_assets/{WebCryptoP256-BeNxJSfZ.js → WebCryptoP256-sEn4Ph9s.js} +2 -2
  92. package/_assets/{add-DMqlCS_5.js → add-WhTS4Lmx.js} +2 -2
  93. package/_assets/{all-wallets-jltIqTjt.js → all-wallets-BjG4VftA.js} +2 -2
  94. package/_assets/{app-store-8U-XnKiq.js → app-store-BU7T42Cx.js} +3 -3
  95. package/_assets/{apple-DqtIUOT7.js → apple-CawmhmSa.js} +2 -2
  96. package/_assets/{arrow-bottom-PA3nOuzV.js → arrow-bottom-CnNmrvB7.js} +2 -2
  97. package/_assets/{arrow-bottom-circle-C-CSXtk9.js → arrow-bottom-circle-4Fk8ZSin.js} +3 -3
  98. package/_assets/arrow-left-CfMYQlcz.js +9 -0
  99. package/_assets/arrow-right-QKHuTr9a.js +9 -0
  100. package/_assets/{arrow-top-BAZtnW6A.js → arrow-top-B19eH9mc.js} +2 -2
  101. package/_assets/{async-directive-C0XTxdV5.js → async-directive-BTrBVINo.js} +3 -3
  102. package/_assets/{authorizations-B83pvCo5.js → authorizations-mOwNJkid.js} +2 -2
  103. package/_assets/{bank-C-8Jh-Iw.js → bank-CvCwnNxT.js} +3 -3
  104. package/_assets/{basic-X15YC4vH.js → basic-Dxa7jgJV.js} +2 -2
  105. package/_assets/{biconomy-CN8DzcqS.js → biconomy-BX2NYC5K.js} +2 -2
  106. package/_assets/{browseLayout.styles-BKjgHcP6.js → browseLayout.styles-DdpwxtcS.js} +12 -12
  107. package/_assets/{browser-CE_WgHCW.js → browser-D4AM3MwN.js} +2 -2
  108. package/_assets/{browser-BLhgq6bj.js → browser-DSvDuDU2.js} +2 -2
  109. package/_assets/{browser-BXKNeaZx.js → browser-D_6XKzYg.js} +2 -2
  110. package/_assets/{browser-ponyfill-rx4ABrHQ.js → browser-ponyfill-BNascxOI.js} +2 -2
  111. package/_assets/{builder-e1EitLO9.js → builder-B5xu14hD.js} +2 -2
  112. package/_assets/{buy-D7nFmJT8.js → buy-DhVTrZNv.js} +2 -2
  113. package/_assets/buy-gasless-CaOBmjwx.js +2 -0
  114. package/_assets/{card-Uc0KebvL.js → card-Bs7vF3ws.js} +2 -2
  115. package/_assets/{categories-CBw6i6jK.js → categories-CVmtX9AQ.js} +3 -3
  116. package/_assets/{ccip-CSmx0Ukl.js → ccip-BqWqT45T.js} +2 -2
  117. package/_assets/{ccip-WSZ1SOI1.js → ccip-DrB-HQcA.js} +2 -2
  118. package/_assets/{chains-CSz4uaiN.js → chains-D7KB36RB.js} +2 -2
  119. package/_assets/{checkmark-bold-BwTefyx7.js → checkmark-bold-CwL3zpGi.js} +3 -3
  120. package/_assets/{checkmark-7uWcPB0u.js → checkmark-e3BzxNSm.js} +2 -2
  121. package/_assets/chevron-bottom-DVpGPQvJ.js +9 -0
  122. package/_assets/{chevron-left-DKH1P9Pf.js → chevron-left-CSISn9Tl.js} +3 -3
  123. package/_assets/chevron-right-D0n7Onzs.js +9 -0
  124. package/_assets/{chevron-top-Dn0py8bk.js → chevron-top-BSRcfV5m.js} +2 -2
  125. package/_assets/{chrome-store-DUbm69Gl.js → chrome-store-B9E5S_r1.js} +3 -3
  126. package/_assets/{class-map-C7I-HYAi.js → class-map-BaReYv7k.js} +5 -5
  127. package/_assets/{clock-CMav6VuQ.js → clock-98t-BkG5.js} +2 -2
  128. package/_assets/{close-Byftwzmc.js → close-BnCucYZG.js} +2 -2
  129. package/_assets/{coinPlaceholder-C0F4r6oU.js → coinPlaceholder-rH-MsidA.js} +2 -2
  130. package/_assets/collectionPage.styles-brmBi9Tl.js +41 -0
  131. package/_assets/common-7XkB6e5H.js +2 -0
  132. package/_assets/{compass-CPDOuTyF.js → compass-C4iPyfoB.js} +2 -2
  133. package/_assets/{controller-BZ74u9Mx.js → controller-B1_lWq9z.js} +3 -3
  134. package/_assets/{copy-CjXNbdx3.js → copy-Db_EXK-k.js} +3 -3
  135. package/_assets/{core-DArcUITf.js → core-AITNuvVU.js} +5 -5
  136. package/_assets/{createSvgIcon-D90PXHtL.js → createSvgIcon-Dm_EPzPD.js} +6 -6
  137. package/_assets/crumbs.styles-CWDzzCAG.js +10 -0
  138. package/_assets/{cursor-D-SkqFO5.js → cursor-BLyA32Y6.js} +3 -3
  139. package/_assets/{cursor-transparent-RE6Zec8w.js → cursor-transparent-is8_6H5o.js} +3 -3
  140. package/_assets/{custom-C1-1hU-n.js → custom-xkj1tLSz.js} +2 -2
  141. package/_assets/{data-capture-BlpHZAMp.js → data-capture-DAJqMG1k.js} +2 -2
  142. package/_assets/{dcl-schemas-DwpPH57a.js → dcl-schemas-CmSCesR5.js} +2 -2
  143. package/_assets/decimals-BHfME2e2.js +2 -0
  144. package/_assets/decimals-DfUPuYV7.js +2 -0
  145. package/_assets/{desktop-tp0dY4sR.js → desktop-w7YXG_JM.js} +3 -3
  146. package/_assets/detectExtension-DkHb3fXD.js +2 -0
  147. package/_assets/{disconnect-PN0ATTQe.js → disconnect-BoVeWInH.js} +3 -3
  148. package/_assets/{discord-ISYEjXZK.js → discord-CmXuPXeB.js} +3 -3
  149. package/_assets/{disposePreview-HoZr4ggw.js → disposePreview-DVwGA7Ub.js} +2 -2
  150. package/_assets/{email-C0VnJMNG.js → email-Hk4429M_.js} +2 -2
  151. package/_assets/{embedded-wallet-Bi2n7sef.js → embedded-wallet-BkIMq9yg.js} +2 -2
  152. package/_assets/{emotion-styled.browser.esm-DA7w4htd.js → emotion-styled.browser.esm-DjDg2ZB8.js} +2 -2
  153. package/_assets/{engine-Bztsdwml.js → engine-XG_XgfGd.js} +2 -2
  154. package/_assets/errors-u0_epNfV.js +2 -0
  155. package/_assets/estimate-l1-fee-5EJiMKoX.js +2 -0
  156. package/_assets/eth_estimateGas-DwKvWYPo.js +2 -0
  157. package/_assets/eth_getStorageAt-C5p-8MAr.js +2 -0
  158. package/_assets/eth_getTransactionCount-t66aQ8TR.js +2 -0
  159. package/_assets/ethereum-BCdz72n5.js +2 -0
  160. package/_assets/{ethers-1M1CfdDX.js → ethers-tJNwaRFg.js} +2 -2
  161. package/_assets/{etherscan-CjB1AtvG.js → etherscan-C6oDVSRT.js} +3 -3
  162. package/_assets/{events-ChynmAya.js → events-h2iFxkMp.js} +2 -2
  163. package/_assets/{exclamation-triangle-Vw_jmJIs.js → exclamation-triangle-DeoEkpAd.js} +2 -2
  164. package/_assets/{execute-CMhgmHrV.js → execute-z2O707m9.js} +3 -3
  165. package/_assets/{extension-p5vqJTq0.js → extension-BC4u9PFt.js} +3 -3
  166. package/_assets/external-link-D1_8iC7n.js +9 -0
  167. package/_assets/{extractIPFS-Dmk6yNJt.js → extractIPFS-BfApxnTo.js} +2 -2
  168. package/_assets/{facebook-BdpnpvkK.js → facebook-BfvFcXpk.js} +3 -3
  169. package/_assets/{farcaster-DyedtTLV.js → farcaster-DBSK9Oxt.js} +2 -2
  170. package/_assets/{features-BOeSwrw7.js → features-NisBD24W.js} +2 -2
  171. package/_assets/fetchTokenMetadata-DWdccaM6.js +3 -0
  172. package/_assets/{field.styles-CjXfWCnd.js → field.styles-DGvQ3_KI.js} +4 -4
  173. package/_assets/{filters-CMt2xly-.js → filters-Bx7yqePJ.js} +2 -2
  174. package/_assets/{fortmatic-q9_51_t1.js → fortmatic-CzuM5VkM.js} +2 -2
  175. package/_assets/{get-bytecode-C9C09tyO.js → get-bytecode-oe9dgjT_.js} +2 -2
  176. package/_assets/get-ecosystem-wallet-info-BQa2CpBc.js +2 -0
  177. package/_assets/{getBalance-B3PyAxk9.js → getBalance-Db2IDw6o.js} +3 -3
  178. package/_assets/getInstalledModules-DQi2Ywnx.js +2 -0
  179. package/_assets/getNFT-B3EOo0zp.js +3 -0
  180. package/_assets/getNFT-DHGI8HoZ.js +2 -0
  181. package/_assets/{github-DpuVIU6C.js → github-Bir9JlcK.js} +3 -3
  182. package/_assets/{google-BwS7c7G5.js → google-BlkSyDA4.js} +2 -2
  183. package/_assets/grid.styles-Cw2pwIs-.js +15 -0
  184. package/_assets/{hashTypedData-CwOONztK.js → hashTypedData-C3YI5ahi.js} +2 -2
  185. package/_assets/{hashTypedData-CHOe753o.js → hashTypedData-oPzuFATg.js} +2 -2
  186. package/_assets/{help-circle-D4e71YxP.js → help-circle-DA-n1pkO.js} +3 -3
  187. package/_assets/{id-CkCU8Jqk.js → id-UrGKP3rm.js} +3 -3
  188. package/_assets/{image-BgNr9PHW.js → image-D3PTNca-.js} +2 -2
  189. package/_assets/{import-DTtBPLJq.js → import-BWdTYI20.js} +2 -2
  190. package/_assets/{in-app-CxjWjLLj.js → in-app-w7g8Nhc9.js} +2 -2
  191. package/_assets/{in-app-wallet-calls-BmK7j5xu.js → in-app-wallet-calls-CgxzzkFg.js} +2 -2
  192. package/_assets/{index-mp-W7rgu.js → index-0e3v9CpE.js} +2 -2
  193. package/_assets/{index-Du3ibQ0n.js → index-6ybT_yl_.js} +2 -2
  194. package/_assets/{index-D4G9X1ch.js → index-B8_xh5D1.js} +7 -7
  195. package/_assets/{index-Dzt-Eb9V.js → index-BEL4VIeu.js} +2 -2
  196. package/_assets/{index-DBONtw7H.js → index-BG7qJ3Aa.js} +311 -279
  197. package/_assets/{index-B4g6oTgw.js → index-BH-VYf5l.js} +4 -4
  198. package/_assets/{index-DQb-ID00.js → index-BIxaiAEl.js} +3 -3
  199. package/_assets/{index-Drj3_D29.css → index-BJz1Up2I.css} +1 -1
  200. package/_assets/{index-C17qo1Vn.js → index-BLtuf6m4.js} +2 -2
  201. package/_assets/{index-Dwa5YPI2.js → index-BNnbhKYu.js} +9 -9
  202. package/_assets/{index-p-Gdk04N.js → index-BZuTbleF.js} +2 -2
  203. package/_assets/{index-DIYaVDaM.js → index-Bcl-5AK7.js} +4 -4
  204. package/_assets/{index-CI-biK0J.js → index-Bj2y_yjG.js} +7 -7
  205. package/_assets/{index-CnEhIH6s.js → index-BldJs_X4.js} +2 -2
  206. package/_assets/{index-CyRKYgX3.js → index-BqYsqQ5e.js} +4 -4
  207. package/_assets/{index-mA2FGc2n.js → index-BsuCjDRM.js} +2 -2
  208. package/_assets/{index-CkhwV11V.js → index-BwhcvSEl.js} +4 -4
  209. package/_assets/{index-BwmG-IHr.js → index-Bx9moibP.js} +4 -4
  210. package/_assets/{index-Lm6gRDgk.js → index-BzFKKsMe.js} +2 -2
  211. package/_assets/{index-BX1TYBrh.js → index-C1EVlgG9.js} +10 -10
  212. package/_assets/{index-2O4398aF.js → index-C6fxHuUK.js} +2 -2
  213. package/_assets/{index-lzsOd2r-.js → index-CA1VPaBS.js} +2 -2
  214. package/_assets/{index-D5ygN-7N.js → index-CBg-Sm5h.js} +3 -3
  215. package/_assets/{index-B4MGZXnJ.js → index-CFhF41J2.js} +3 -3
  216. package/_assets/{index-AKVaFU6R.js → index-CNhiEbnP.js} +4 -4
  217. package/_assets/{index-o4QA-YgI.js → index-CTw0n0JC.js} +4 -4
  218. package/_assets/{index-DSo-HA-Q.js → index-CY3hUb7S.js} +3 -3
  219. package/_assets/{index-BBshwWxl.js → index-C_yfqMNU.js} +2 -2
  220. package/_assets/{index-MW2iAiMi.js → index-CekZ5Iqg.js} +4 -4
  221. package/_assets/{index-DMqzgHxy.js → index-CjFqn_i1.js} +2 -2
  222. package/_assets/{index-DcFBuCAU.js → index-CxQ0CvH_.js} +2 -2
  223. package/_assets/{index-DT0ol44j.js → index-CynamobY.js} +2 -2
  224. package/_assets/{index-BvktIHhu.js → index-D24CLlPA.js} +3 -3
  225. package/_assets/{index-CtQRm-uR.js → index-D39wCCYL.js} +4 -4
  226. package/_assets/{index-8pBNkHhZ.js → index-D3jPbs8j.js} +2 -2
  227. package/_assets/{index-ZDi0sa76.js → index-D6ySRUMB.js} +2 -2
  228. package/_assets/{index-C9YXrqLC.js → index-DBFGegL3.js} +3 -3
  229. package/_assets/{index-CNCV5gb2.js → index-DBeNYttS.js} +2 -2
  230. package/_assets/{index-CaMOVOnV.js → index-DC6Ttv02.js} +4 -4
  231. package/_assets/{index-Dx5GsTV9.js → index-DHqGt_jn.js} +3 -3
  232. package/_assets/{index-BG18kxxr.js → index-DJpAryBd.js} +2 -2
  233. package/_assets/{index-qIZigzaT.js → index-DJxFrgnc.js} +2 -2
  234. package/_assets/{index-BxDOHc7K.js → index-DLmetrvd.js} +2 -2
  235. package/_assets/index-DRTZJdSM.js +2 -0
  236. package/_assets/{index-BmpyzmIh.js → index-DSpJHztY.js} +2 -2
  237. package/_assets/{index-CjJbgwsG.js → index-DTRYM8Jl.js} +2 -2
  238. package/_assets/index-DW6FMcTo.js +2 -0
  239. package/_assets/{index-Ei6ZjPB-.js → index-DdLWviF_.js} +6 -6
  240. package/_assets/{index-BmCV7OM0.js → index-DgvZWtVI.js} +2 -2
  241. package/_assets/{index-Wiz3KnKQ.js → index-Dk_RFoYO.js} +2 -2
  242. package/_assets/{index-BWmCSXNe.js → index-DtFBTuiv.js} +2 -2
  243. package/_assets/{index-sAHSTD-e.js → index-EnFBokn9.js} +5 -5
  244. package/_assets/{index-Nl1WGeRF.js → index-JgBnlWsC.js} +2 -2
  245. package/_assets/{index-DSUMm5bM.js → index-Y7bxplKw.js} +3 -3
  246. package/_assets/{index-CArhbxfh.js → index-ZrIhKrUY.js} +9 -9
  247. package/_assets/{index-D4mLzE5t.js → index-_5dLlQT_.js} +2 -2
  248. package/_assets/{index-BRPC-KxV.js → index-_TZGGhWP.js} +2 -2
  249. package/_assets/{index-Cxm44GCk.js → index-c8OkQC3w.js} +2 -2
  250. package/_assets/{index-DPzFuzjH.js → index-dD-qY7M-.js} +15 -15
  251. package/_assets/{index-DArg0qfu.js → index-fEiPFyrn.js} +2 -2
  252. package/_assets/{index-DuT7MyhP.js → index-lSclNpXC.js} +2 -2
  253. package/_assets/{index-Dp05ebh4.js → index-nANjwUMg.js} +2 -2
  254. package/_assets/{index-DB-g40Lk.js → index-qirgQBq5.js} +2 -2
  255. package/_assets/{index-Bbna9UA6.js → index-sYKgsd2E.js} +2 -2
  256. package/_assets/{index-BdcOwi8k.js → index-umccxemy.js} +2 -2
  257. package/_assets/{index-CzFmHLD1.js → index-w25QikzJ.js} +2 -2
  258. package/_assets/{index-DwPwW3EN.js → index-xWBB44w4.js} +5 -5
  259. package/_assets/{index-Dy1jWaGR.js → index-xYE9fkjq.js} +2 -2
  260. package/_assets/{index.es-D1GXqsQd.js → index.es-BIKI7JLq.js} +5 -5
  261. package/_assets/{index.es-RB1w60M4.js → index.es-D7qMhur5.js} +2 -2
  262. package/_assets/{index.es-BojIKfcn.js → index.es-Gw4AHyZB.js} +2 -2
  263. package/_assets/{index.es-Bu43E8Od.js → index.es-__1hkKpa.js} +2 -2
  264. package/_assets/{info-CULnZZaj.js → info-Dsmi8VWW.js} +3 -3
  265. package/_assets/{info-circle-lLJ-CNp2.js → info-circle-CppZa7vK.js} +2 -2
  266. package/_assets/{items-empty-DLLWCTVk.js → items-empty-BkXBlSAo.js} +2 -2
  267. package/_assets/jsxRuntime.module-Q9HBaTr-.js +2 -0
  268. package/_assets/{jump-BPwh2vZy.js → jump-Dh2r-J5T.js} +2 -2
  269. package/_assets/{lightbulb-4T7s9a-o.js → lightbulb-B2s8QgKQ.js} +2 -2
  270. package/_assets/linkAccount-Bev4yuZS.js +2 -0
  271. package/_assets/{localBatchGatewayRequest-DwX7OXdU.js → localBatchGatewayRequest-D0XhtVRB.js} +2 -2
  272. package/_assets/{mail-DhJDk7cH.js → mail-CZ9ghbH-.js} +2 -2
  273. package/_assets/{mobile-CydJ5WdV.js → mobile-D7KL87qI.js} +2 -2
  274. package/_assets/{modal.styles-XB3kPZSk.js → modal.styles-CUboNT-w.js} +2 -2
  275. package/_assets/{more-Dg2B8rio.js → more-C1vsI2Vu.js} +3 -3
  276. package/_assets/{native-CVoJihlN.js → native-I31DoDqU.js} +2 -2
  277. package/_assets/{network-placeholder-h8TrKQkX.js → network-placeholder-C6sglFRh.js} +2 -2
  278. package/_assets/{networks-k-5FUkuC.js → networks-CeoMEJlu.js} +2 -2
  279. package/_assets/{nftPlaceholder-B4g7qDN6.js → nftPlaceholder-ByX0V9oA.js} +3 -3
  280. package/_assets/off-B5vm0egN.js +9 -0
  281. package/_assets/{onramp-BlfVZmFE.js → onramp-BIEWKelE.js} +2 -2
  282. package/_assets/openzeppelin-Bi1GA2cJ.js +2 -0
  283. package/_assets/ownerOf-yybzNeeI.js +2 -0
  284. package/_assets/parseNft-wHStJKpc.js +3 -0
  285. package/_assets/{parseSignature-UG1Z-iRF.js → parseSignature-DCfeEmC8.js} +4 -4
  286. package/_assets/{parseSignature-C8wluzrl.js → parseSignature-Dzal_2R6.js} +2 -2
  287. package/_assets/{passkeys-BgD3qEUS.js → passkeys-Cm45YlML.js} +2 -2
  288. package/_assets/{pay-with-exchange-Dul7TqcO.js → pay-with-exchange-BKmd6iRp.js} +2 -2
  289. package/_assets/{play-store-B1ADa5-a.js → play-store-BBusJ15a.js} +2 -2
  290. package/_assets/{plus-CkIDGwOx.js → plus-QdPNUgRE.js} +2 -2
  291. package/_assets/{prepare-contract-call-BDx98mcK.js → prepare-contract-call-CP8gdRn0.js} +2 -2
  292. package/_assets/{qr-code-DInpw8H9.js → qr-code-SdYLFk2z.js} +2 -2
  293. package/_assets/{qr-overlay-CzJOf0PR.js → qr-overlay-pc4SHTdg.js} +4 -4
  294. package/_assets/{react-VV7ruaEe.js → react-BaEtM5XJ.js} +3 -3
  295. package/_assets/{receive-Mbh48-Du.js → receive-BrKrTaHR.js} +12 -12
  296. package/_assets/{recycle-horizontal-frlUVLoe.js → recycle-horizontal-SCXYOpJq.js} +3 -3
  297. package/_assets/{ref-BDtPbYkK.js → ref-DRxYb1N1.js} +3 -3
  298. package/_assets/{refresh-BJgYdDWe.js → refresh-eticwJ3S.js} +3 -3
  299. package/_assets/{reown-logo-CptpO-OK.js → reown-logo-C2dHPSrm.js} +2 -2
  300. package/_assets/{resolveImplementation-C-Bp0jW1.js → resolveImplementation-Cn9CmlXV.js} +2 -2
  301. package/_assets/{resume-buy-lwwrCAQL.js → resume-buy-DjpxQ16x.js} +2 -2
  302. package/_assets/{rpc-dS3qUOUv.js → rpc-CtaMLsF-.js} +2 -2
  303. package/_assets/{sales-empty-CdZ6YLiR.js → sales-empty-CEW_7w0S.js} +2 -2
  304. package/_assets/{search-CovtTjFk.js → search-CeQ1H1CU.js} +2 -2
  305. package/_assets/{search-empty-Xv_q1rjS.js → search-empty-CXnXGBuW.js} +2 -2
  306. package/_assets/{secp256k1-CzYB4UO1.js → secp256k1-2lPahONa.js} +2 -2
  307. package/_assets/{secp256k1-B29fjO3k.js → secp256k1-Cw5yUkzd.js} +2 -2
  308. package/_assets/{secp256k1-BYEzJ9Ar.js → secp256k1-OfpsBHCS.js} +2 -2
  309. package/_assets/{send-Kib-9VTx.js → send-BAtrg0LJ.js} +2 -2
  310. package/_assets/{send-BqmhOSPb.js → send-Bo03Ql2I.js} +2 -2
  311. package/_assets/{send-batch-transaction-Bsec8aWl.js → send-batch-transaction-BpcguXC6.js} +2 -2
  312. package/_assets/{send-eip712-transaction-B8xB6E7z.js → send-eip712-transaction-Bd6QC-Sw.js} +3 -3
  313. package/_assets/send-gasless-transaction-Y66RJHE0.js +3 -0
  314. package/_assets/send-transaction-DXMKNLAk.js +3 -0
  315. package/_assets/{sendMetaTransaction-ZH8zQFka.js → sendMetaTransaction-BIO5pykC.js} +2 -2
  316. package/_assets/{sendRawTransaction-Dj_4qH3D.js → sendRawTransaction-DRzDGfBS.js} +4 -4
  317. package/_assets/{sentry-o0F_Elyr.js → sentry-CpILff32.js} +3 -3
  318. package/_assets/{serializeTransaction-Ci108h6S.js → serializeTransaction-BTmx-nT5.js} +2 -2
  319. package/_assets/{session-proposal-DoiJdtGZ.js → session-proposal-Cdm62cOe.js} +2 -2
  320. package/_assets/session-request-CRquTW31.js +3 -0
  321. package/_assets/{sha256-DKc8_pkb.js → sha256-7kFStUiX.js} +2 -2
  322. package/_assets/sha3-CheitC6D.js +2 -0
  323. package/_assets/signin-empty-BTSk9lYx.js +2 -0
  324. package/_assets/{signing-B2ulpOrN.js → signing-CQjkeZoU.js} +4 -4
  325. package/_assets/{skeleton.styles-V94rqky6.js → skeleton.styles-ClyzppIO.js} +2 -2
  326. package/_assets/{socials-Oa6dTfHZ.js → socials-DADzSqnT.js} +2 -2
  327. package/_assets/{styled-DyNfGwco.js → styled-CjWYLp6b.js} +3 -3
  328. package/_assets/{swapHorizontal-BzkqO77h.js → swapHorizontal-C6GakaRf.js} +3 -3
  329. package/_assets/{swapHorizontalBold-Ci7CW-Ps.js → swapHorizontalBold-oeP-_O-R.js} +2 -2
  330. package/_assets/{swapHorizontalMedium-BIJFHqWY.js → swapHorizontalMedium-C64EXSWD.js} +3 -3
  331. package/_assets/{swapHorizontalRoundedBold-DgbOKQnq.js → swapHorizontalRoundedBold-CHgP6XK-.js} +2 -2
  332. package/_assets/{swapVertical-AbfbZRwH.js → swapVertical-8SLU7RpO.js} +2 -2
  333. package/_assets/{swaps-COfyeTsO.js → swaps-UA0cD3BW.js} +2 -2
  334. package/_assets/{telegram-D7G_eJ_b.js → telegram-CF91ES6s.js} +2 -2
  335. package/_assets/{thirdweb-DI7ZaNzU.js → thirdweb-y-wkF1vZ.js} +4 -4
  336. package/_assets/{three-dots-OoMaedcW.js → three-dots-BsCoLPC9.js} +2 -2
  337. package/_assets/{to-serializable-transaction-By8QfhXP.js → to-serializable-transaction-thDAMGtK.js} +3 -3
  338. package/_assets/totalSupply-Cpawfqqv.js +2 -0
  339. package/_assets/{transaction-B1xgjYJ6.js → transaction-DJRXk5oN.js} +2 -2
  340. package/_assets/transactionReceipt-B67AwtOj.js +2 -0
  341. package/_assets/transactions-CfUmlRJ6.js +17 -0
  342. package/_assets/{twitch-XFZ_dW-0.js → twitch-BranWKeM.js} +2 -2
  343. package/_assets/{twitterIcon-DFIrOz7L.js → twitterIcon-BfIWT5DS.js} +3 -3
  344. package/_assets/{useCreditPacks-DgnQhl__.js → useCreditPacks-CQnl_Fa8.js} +2 -2
  345. package/_assets/{useInfiniteGrid-CqEvXCvo.js → useInfiniteGrid-CV3Vck1D.js} +2 -2
  346. package/_assets/useStore-W0Q-z1uf.js +3 -0
  347. package/_assets/useTheme-CDcFqXEY.js +2 -0
  348. package/_assets/{utils-ClhrwhHu.js → utils-uSRrzKHh.js} +2 -2
  349. package/_assets/{verify-CtqWYnsr.js → verify-DcO5QuX7.js} +3 -3
  350. package/_assets/{verify-filled-db_bDI2X.js → verify-filled-CKp8XQqI.js} +3 -3
  351. package/_assets/{verifyHash-CUVRY0V6.js → verifyHash-BGhiKEhq.js} +2 -2
  352. package/_assets/{w3m-modal-Cl3xsdnY.js → w3m-modal-6m_XMwwg.js} +2 -2
  353. package/_assets/{w3m-modal-BGMNR53_.js → w3m-modal-DGE9Js41.js} +2 -2
  354. package/_assets/wait-for-tx-receipt-CEm8zMyI.js +2 -0
  355. package/_assets/{wallet-C7Nkm-1r.js → wallet-BHCiGpYx.js} +3 -3
  356. package/_assets/{wallet-placeholder-BAZfiJ4M.js → wallet-placeholder-BVguMNEt.js} +2 -2
  357. package/_assets/{walletconnect-jD4HJXgj.js → walletconnect-9t1WJh4k.js} +4 -4
  358. package/_assets/{wallets-B1ZJrwjj.js → wallets-D7Q9xQCT.js} +6 -6
  359. package/_assets/{warning-circle-DG9C8ETA.js → warning-circle-II7Vcaxs.js} +2 -2
  360. package/_assets/{web-connector-Dq-fpFU2.js → web-connector-nXRPn9Z3.js} +4 -4
  361. package/_assets/{writeContract-BvArkAMz.js → writeContract-CZeJcaDt.js} +2 -2
  362. package/_assets/x-D0s8LW19.js +13 -0
  363. package/_assets/{zora-sepolia-IkBJSEG_.js → zora-sepolia-CI048TsY.js} +2 -2
  364. package/_assets/{zoraTestnet-DP3dbXZ6.js → zoraTestnet-C9v3YIE6.js} +2 -2
  365. package/index.html +11 -11
  366. package/package.json +2 -2
  367. package/_assets/Confetti-BLxVbH5o.js +0 -18
  368. package/_assets/Event-_99dGtyj.js +0 -2
  369. package/_assets/HelpersUtil-BAFzVkMb.js +0 -63
  370. package/_assets/LoadMore-DE7YSrmA.js +0 -8
  371. package/_assets/NotFound-DWWysD5r.js +0 -18
  372. package/_assets/OutfitPreview-DrOdc6y-.js +0 -7
  373. package/_assets/PhCaretDown-PT_hkshh.js +0 -15
  374. package/_assets/PhCaretRight-EEBUAb9H.js +0 -15
  375. package/_assets/arrow-left-Cddzsk1s.js +0 -9
  376. package/_assets/arrow-right-FkB0kPcW.js +0 -9
  377. package/_assets/buy-gasless-DNEVxdLb.js +0 -2
  378. package/_assets/chevron-bottom-CJ9Wl9Xm.js +0 -9
  379. package/_assets/chevron-right-DeNTJHBI.js +0 -9
  380. package/_assets/collectionPage.styles-CGv38BAV.js +0 -41
  381. package/_assets/common-CsauCio8.js +0 -2
  382. package/_assets/crumbs.styles-B_xC21o-.js +0 -10
  383. package/_assets/decimals-DM3o8F2C.js +0 -2
  384. package/_assets/decimals-aCEDG5JH.js +0 -2
  385. package/_assets/detectExtension-0ov0Rrws.js +0 -2
  386. package/_assets/errors-CNu2839_.js +0 -2
  387. package/_assets/estimate-l1-fee-B-J8ubtj.js +0 -2
  388. package/_assets/eth_estimateGas-PqNhqizJ.js +0 -2
  389. package/_assets/eth_getStorageAt-OHBtIi6n.js +0 -2
  390. package/_assets/eth_getTransactionCount-3Fo1K1in.js +0 -2
  391. package/_assets/ethereum-DgDIagMf.js +0 -2
  392. package/_assets/external-link-6l8BDrnZ.js +0 -9
  393. package/_assets/fetchTokenMetadata-B3gG8lNZ.js +0 -3
  394. package/_assets/get-ecosystem-wallet-info-Md6d1ElT.js +0 -2
  395. package/_assets/getInstalledModules-Cc3eGsGW.js +0 -2
  396. package/_assets/getNFT-08MzaPPL.js +0 -2
  397. package/_assets/getNFT-Ct0fZovm.js +0 -3
  398. package/_assets/grid.styles-DLJDk6Da.js +0 -15
  399. package/_assets/index-Bldxc1rA.js +0 -2
  400. package/_assets/index-BlsDk8cY.js +0 -2
  401. package/_assets/jsxRuntime.module-gjtb1wYS.js +0 -2
  402. package/_assets/linkAccount-D8t0rhjQ.js +0 -2
  403. package/_assets/off-UwuZMWU-.js +0 -9
  404. package/_assets/openzeppelin-CHH76T2R.js +0 -2
  405. package/_assets/ownerOf-BsF3HIfV.js +0 -2
  406. package/_assets/parseNft-fbo1tW69.js +0 -3
  407. package/_assets/send-gasless-transaction-DOAZoiru.js +0 -3
  408. package/_assets/send-transaction-C8HId9c-.js +0 -3
  409. package/_assets/session-request-D9ZfIWnv.js +0 -3
  410. package/_assets/sha3-Djo6RzzD.js +0 -2
  411. package/_assets/signin-empty-0RVG8Orx.js +0 -2
  412. package/_assets/totalSupply-BFOzDnZo.js +0 -2
  413. package/_assets/transactionReceipt-D8BwP6qt.js +0 -2
  414. package/_assets/transactions-Bphi4uNv.js +0 -17
  415. package/_assets/useStore-BxEjYiKk.js +0 -3
  416. package/_assets/useTheme-BSSQBx8D.js +0 -2
  417. package/_assets/wait-for-tx-receipt-CL_z5VGg.js +0 -2
  418. package/_assets/x-B-2M90IQ.js +0 -13
@@ -1,4 +1,4 @@
1
- import{j as e,L as Yt,r as M,u as ja,b as ka}from"./react-VV7ruaEe.js";import{s as r,d as z,c as a,K as Ae,S as ae,bk as Le,C as Te,bl as $a,R as Ke,bm as Sa,Q as Ma,I as Y,x as Ze,H as Ta,aj as O,W as Tt,E as Ia,F as Aa,D as Ea,bn as Pa,L as za,bo as Ra,X as Ba,bp as _a,bq as qa,br as Fa,bs as It,Z as Wa,bt as La,bu as Ka,bv as Qa,aw as Qe,$ as Na,J as Ua,bw as At,al as V,bx as Et,by as Ga,bz as Ha,i as oe,bA as Oa,bB as Da,bC as Va,bD as Ne,a3 as Ya,bE as Ce,bF as je,bG as Pt,bH as Ja,v as zt,w as Rt,bI as Xa}from"./index-DBONtw7H.js";import{M as Za,S as es,C as ts,H as as,a as ss,T as ns,X as is,b as rs,B as os,c as cs,d as Bt,e as ls,f as Ee,g as ds,h as us,i as hs,j as ps,k as Xe,l as ge,L as gs,P as xs,m as _t,n as qt,W as ms,o as fs,p as bs,q as ys,A as vs,r as ws,s as Cs,t as js,u as ks,v as $s,w as Ss,x as Ms,y as Ts,z as Is,D as As,E as Es,F as Ps,G as zs,I as Rs,J as Bs,K as _s,N as Ue,O as qs,Q as Fs,R as Ws,U as Ft,V as Wt,Y as Ls,Z as Ks,_ as Qs,$ as Ns,a0 as Lt,a1 as Us}from"./CollectionCarousel-DM2JN-Og.js";import{m as Ie}from"./mana-matic-light-Bl5duieC.js";import{l as Gs,n as Hs,g as Os,o as Ds,h as Vs,A as Ys}from"./authorizations-B83pvCo5.js";import{p as Kt,g as Js,h as Ge}from"./buy-D7nFmJT8.js";import{w as Xs,S as He,b as Zs,G as en}from"./buy-gasless-DNEVxdLb.js";import{u as tn,M as an,R as ke,r as sn,c as nn,g as rn,a as on,p as Qt,b as Oe}from"./useCreditPacks-DgnQhl__.js";import{i as cn,a as ln}from"./errors-CNu2839_.js";import{E as dn}from"./ErrorNotice-BjKorbeP.js";import"./dcl-schemas-DwpPH57a.js";import"./sentry-o0F_Elyr.js";import"./ethers-1M1CfdDX.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-ZH8zQFka.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new i.Error().stack;d&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[d]="01e2da6c-e8fa-4a56-9536-eaab151d7785",i._sentryDebugIdIdentifier="sentry-dbid-01e2da6c-e8fa-4a56-9536-eaab151d7785")}catch{}})();const un=r.div`
1
+ import{j as e,L as Yt,r as M,b as ja,a as ka}from"./react-BaEtM5XJ.js";import{s as r,a as z,t as a,E as Ae,N as ae,bl as Le,C as Te,bm as $a,M as Ne,bn as Sa,L as Ma,I as Y,o as Ze,A as Ta,al as O,Y as Tt,y as Ia,z as Aa,x as Ea,bo as Pa,F as za,bp as Ra,Z as Ba,bq as _a,br as qa,bs as Fa,bt as It,a0 as Wa,bu as La,bv as Na,bw as Ka,ax as Ke,a1 as Qa,D as Ua,bx as At,R as V,by as Et,bz as Ga,bA as Ha,d as oe,bB as Oa,bC as Da,bD as Va,bE as Qe,a5 as Ya,bF as Ce,bG as je,bH as Pt,bI as Ja,l as zt,n as Rt,bJ as Xa}from"./index-BG7qJ3Aa.js";import{M as Za,S as es,C as ts,H as as,a as ss,T as ns,X as is,b as rs,B as os,c as cs,d as Bt,e as ls,f as Ee,g as ds,h as us,i as hs,j as ps,k as Xe,l as ge,L as gs,P as xs,m as _t,n as qt,W as ms,o as fs,p as bs,q as ys,A as vs,r as ws,s as Cs,t as js,u as ks,v as $s,w as Ss,x as Ms,y as Ts,z as Is,D as As,E as Es,F as Ps,G as zs,I as Rs,J as Bs,K as _s,N as Ue,O as qs,Q as Fs,R as Ws,U as Ft,V as Wt,Y as Ls,Z as Ns,_ as Ks,$ as Qs,a0 as Lt,a1 as Us}from"./CollectionCarousel-CrO5pEgo.js";import{m as Ie}from"./mana-matic-light-Bl5duieC.js";import{l as Gs,n as Hs,g as Os,o as Ds,h as Vs,A as Ys}from"./authorizations-mOwNJkid.js";import{p as Nt,g as Js,h as Ge}from"./buy-DhVTrZNv.js";import{w as Xs,S as He,b as Zs,G as en}from"./buy-gasless-CaOBmjwx.js";import{u as tn,M as an,R as ke,r as sn,c as nn,g as rn,a as on,p as Kt,b as Oe}from"./useCreditPacks-CQnl_Fa8.js";import{i as cn,a as ln}from"./errors-u0_epNfV.js";import{E as dn}from"./ErrorNotice-DgLTEx75.js";import"./dcl-schemas-CmSCesR5.js";import"./sentry-CpILff32.js";import"./ethers-tJNwaRFg.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-BIO5pykC.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new i.Error().stack;d&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[d]="3fcf134e-75e9-44b1-b4e3-8b8cb8c6a5b3",i._sentryDebugIdIdentifier="sentry-dbid-3fcf134e-75e9-44b1-b4e3-8b8cb8c6a5b3")}catch{}})();const un=r.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 12px;
@@ -35,7 +35,7 @@ import{j as e,L as Yt,r as M,u as ja,b as ka}from"./react-VV7ruaEe.js";import{s
35
35
  opacity: 0.6;
36
36
  cursor: default;
37
37
  }
38
- `,Nt=r.button`
38
+ `,Qt=r.button`
39
39
  ${Jt}
40
40
  background: ${z.gradients.buyBtn};
41
41
 
@@ -101,7 +101,7 @@ import{j as e,L as Yt,r as M,u as ja,b as ka}from"./react-VV7ruaEe.js";import{s
101
101
  line-height: 1.4;
102
102
  color: ${z.colors.muted};
103
103
  text-align: center;
104
- `;function Xt({options:i,totalCents:d,onPay:k,busy:$=!1,creditsLabel:R,shortfall:U,showCreditsAmount:H=!0,creditsFallback:E=null}){const J=i.some(n=>n.method==="credits");return e.jsxs(un,{children:[!J&&E?e.jsx(Nt,{type:"button","data-testid":"pay-with-credits-topup",onClick:E.onClick,disabled:$,children:e.jsx("span",{children:E.label})}):null,i.map(n=>n.method==="credits"?e.jsxs(Nt,{type:"button","data-testid":"pay-with-credits",onClick:()=>k("credits"),disabled:$,children:[e.jsx("span",{children:R??a("buyModal.buy")}),H?e.jsxs($e,{children:[e.jsx(Ae,{}),e.jsx("span",{children:ae(n.credits)})]}):null]},"credits"):n.method==="mana"?e.jsxs(De,{type:"button","data-testid":"pay-with-mana",onClick:()=>k("mana"),disabled:$,children:[e.jsx("span",{children:a("buyModal.buyWithMana")}),e.jsxs($e,{children:[e.jsx(Ve,{children:e.jsx("img",{src:Ie,alt:"","aria-hidden":!0})}),e.jsx("span",{children:Le(n.manaWei)})]})]},"mana"):e.jsxs(De,{type:"button","data-testid":"pay-with-combined",onClick:()=>k("combined"),disabled:$,children:[e.jsx("span",{children:a("buyModal.buyWith")}),e.jsxs($e,{children:[e.jsx(Ae,{}),e.jsx("span",{children:ae(n.credits)}),e.jsx(pn,{children:"+"}),e.jsx(Ve,{children:e.jsx("img",{src:Ie,alt:"","aria-hidden":!0})}),e.jsx("span",{children:Le(n.manaWei)}),e.jsx(hn,{children:"MANA"})]})]},"combined")),U?e.jsxs(e.Fragment,{children:[e.jsxs(De,{type:"button","data-testid":"pay-with-mana-disabled",disabled:!0,children:[e.jsx("span",{children:a("buyModal.buyWithMana")}),e.jsxs($e,{children:[e.jsx(Ve,{children:e.jsx("img",{src:Ie,alt:"","aria-hidden":!0})}),e.jsx("span",{children:Le(U.manaWei)})]})]},"mana-short"),e.jsx(gn,{"data-testid":"mana-shortfall-note",children:a("buyModal.notEnoughMana")})]}):null,e.jsx("span",{hidden:!0,"data-testid":"pay-total-cents",children:d})]})}const{colors:ce,radius:xn}=z,mn=r.div`
104
+ `;function Xt({options:i,totalCents:d,onPay:k,busy:$=!1,creditsLabel:R,shortfall:U,showCreditsAmount:H=!0,creditsFallback:E=null}){const J=i.some(n=>n.method==="credits");return e.jsxs(un,{children:[!J&&E?e.jsx(Qt,{type:"button","data-testid":"pay-with-credits-topup",onClick:E.onClick,disabled:$,children:e.jsx("span",{children:E.label})}):null,i.map(n=>n.method==="credits"?e.jsxs(Qt,{type:"button","data-testid":"pay-with-credits",onClick:()=>k("credits"),disabled:$,children:[e.jsx("span",{children:R??a("buyModal.buy")}),H?e.jsxs($e,{children:[e.jsx(Ae,{}),e.jsx("span",{children:ae(n.credits)})]}):null]},"credits"):n.method==="mana"?e.jsxs(De,{type:"button","data-testid":"pay-with-mana",onClick:()=>k("mana"),disabled:$,children:[e.jsx("span",{children:a("buyModal.buyWithMana")}),e.jsxs($e,{children:[e.jsx(Ve,{children:e.jsx("img",{src:Ie,alt:"","aria-hidden":!0})}),e.jsx("span",{children:Le(n.manaWei)})]})]},"mana"):e.jsxs(De,{type:"button","data-testid":"pay-with-combined",onClick:()=>k("combined"),disabled:$,children:[e.jsx("span",{children:a("buyModal.buyWith")}),e.jsxs($e,{children:[e.jsx(Ae,{}),e.jsx("span",{children:ae(n.credits)}),e.jsx(pn,{children:"+"}),e.jsx(Ve,{children:e.jsx("img",{src:Ie,alt:"","aria-hidden":!0})}),e.jsx("span",{children:Le(n.manaWei)}),e.jsx(hn,{children:"MANA"})]})]},"combined")),U?e.jsxs(e.Fragment,{children:[e.jsxs(De,{type:"button","data-testid":"pay-with-mana-disabled",disabled:!0,children:[e.jsx("span",{children:a("buyModal.buyWithMana")}),e.jsxs($e,{children:[e.jsx(Ve,{children:e.jsx("img",{src:Ie,alt:"","aria-hidden":!0})}),e.jsx("span",{children:Le(U.manaWei)})]})]},"mana-short"),e.jsx(gn,{"data-testid":"mana-shortfall-note",children:a("buyModal.notEnoughMana")})]}):null,e.jsx("span",{hidden:!0,"data-testid":"pay-total-cents",children:d})]})}const{colors:ce,radius:xn}=z,mn=r.div`
105
105
  display: flex;
106
106
  align-items: center;
107
107
  justify-content: center;
@@ -170,7 +170,7 @@ import{j as e,L as Yt,r as M,u as ja,b as ka}from"./react-VV7ruaEe.js";import{s
170
170
  font-size: 14px;
171
171
  line-height: 1.334;
172
172
  color: ${z.colors.text2};
173
- `;function Cn(i){const{phase:d,balanceCredits:k,onClose:$}=i,R=d==="processing",U=d==="error"?a("cartCheckout.errorTitle"):d==="nofunds"?a("cartCheckout.titleNoFunds"):d==="choose"?a("buyModal.choosePayment"):a("cartCheckout.titleBuy"),H=d==="processing";return e.jsxs(Za,{role:"dialog","aria-modal":"true","aria-label":a("cartCheckout.dialogAria"),children:[e.jsx(es,{onClick:R?void 0:$,"aria-hidden":!0}),e.jsxs(ts,{"data-tall":H||void 0,children:[e.jsxs(as,{children:[e.jsxs(ss,{children:[e.jsx(ns,{children:U}),!R&&e.jsx(is,{onClick:$,"aria-label":a("buyModal.close"),children:e.jsx(rs,{})})]}),e.jsxs(os,{children:[e.jsx(cs,{children:d==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),e.jsx(Bt,{}),e.jsx(ls,{children:ae(k)})]}),i.heldCreditsCount&&(d==="choose"||d==="nofunds")?e.jsx(wn,{"data-testid":"cart-held-notice",children:a("buyModal.heldExplainer",{credits:i.heldCreditsCount,currency:Te.name})}):null]}),d==="choose"&&e.jsxs(Ee,{children:[e.jsxs(vn,{children:[e.jsx("span",{children:a("cart.purchaseSummary")}),e.jsxs("strong",{children:[e.jsx(Bt,{}),ae(i.totalCredits??0)]})]}),e.jsx(Xt,{options:i.options??[],totalCents:i.totalCents??0,shortfall:i.shortfall,onPay:i.onPay??(()=>{})})]}),d==="processing"&&e.jsx(jn,{stage:i.stage??"reserving",step:i.step??1,total:i.total??1,isSelfCustody:!!i.isSelfCustody,signatures:i.signatures}),d==="nofunds"&&e.jsx(kn,{lines:i.lines??[],shortfallCredits:i.shortfallCredits??0,packs:i.packs??[],selectedPack:i.selectedPack??"",onSelectPack:i.onSelectPack??(()=>{}),onBuyPacks:i.onBuyPacks??(()=>{}),onCancel:$}),d==="error"&&e.jsxs(Ee,{children:[e.jsxs(ds,{"data-testid":"buy-error",children:[e.jsx(us,{src:hs,alt:"",width:64,height:80}),e.jsxs(ps,{children:[e.jsx("b",{children:a("cartCheckout.errorHeadline")})," ",i.heldCredits?e.jsxs(e.Fragment,{children:[i.message?e.jsxs(e.Fragment,{children:[i.message," "]}):null,a("cartCheckout.heldLead",{currency:Te.name}),e.jsx("b",{children:a("cartCheckout.heldBold")}),a("cartCheckout.heldTail",{currency:Te.name})]}):i.message??a("cartCheckout.errorBody")]})]}),i.heldCredits?e.jsx(Xe,{children:e.jsx(ge,{"data-variant":"purple","data-full":!0,onClick:$,children:a("cartCheckout.gotIt")})}):e.jsxs(Xe,{children:[e.jsx(ge,{"data-variant":"outline",onClick:$,children:a("buyModal.cancel")}),e.jsx(ge,{"data-variant":"purple",onClick:i.onRetry??$,children:a("cartCheckout.tryAgain")})]})]})]})]})}function jn({stage:i,step:d,total:k,isSelfCustody:$,signatures:R}){const U=i==="reserving",H=k>0?Math.min(100,Math.round(d/k*100)):0,E=$&&R&&R.total>1,J=i==="awaiting-signature"?$?E?a("cartCheckout.confirmMultiple",{current:R.current,total:R.total}):a("buyModal.confirmToContinue"):a("buyModal.completingTransaction"):i==="settling"?a("buyModal.completingTransaction"):a("cartCheckout.preparing");return e.jsxs(Ee,{"data-processing":!0,children:[e.jsx(gs,{src:$a,alt:"",width:61,height:61}),e.jsx(xs,{children:J}),U?e.jsxs(mn,{children:[e.jsx(_t,{"aria-hidden":!0,children:e.jsx(qt,{"data-step":!0,style:{width:`${H}%`}})}),k>1?e.jsxs(fn,{children:[d,"/",k]}):null]}):e.jsx(_t,{"aria-hidden":!0,children:e.jsx(qt,{})})]})}function kn({lines:i,shortfallCredits:d,packs:k,selectedPack:$,onSelectPack:R,onBuyPacks:U,onCancel:H}){const E=k.find(n=>n.id===$),J=i.reduce((n,G)=>n+(G.quantity??1),0);return e.jsxs(Ee,{children:[e.jsxs(ms,{"data-testid":"nofunds-warning",children:[e.jsx(fs,{}),e.jsxs(bs,{children:[e.jsx("b",{children:a("buyModal.insufficientFunds")})," ",a("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:a("buyModal.warningCreditsAmount",{count:Math.max(0,d)})})," ",a("buyModal.warningToPurchase",{count:J}),Ke()?null:e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(ys,{href:Sa("/credits"),target:"_blank",rel:"noopener noreferrer",children:a("buyModal.warningLearnMore")})]})]})]}),e.jsx(bn,{children:i.map(n=>{const G=n.quantity??1;return e.jsxs(vs,{children:[e.jsx(ws,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsxs(Cs,{children:[e.jsxs("div",{children:[e.jsxs(js,{title:n.item.name,children:[n.item.name||a("buyModal.itemFallback"),G>1?e.jsx(yn,{children:a("cartCheckout.qty",{count:G})}):null]}),n.item.creator?e.jsx(ks,{address:n.item.creator}):null]}),e.jsxs($s,{children:[e.jsx(Ss,{}),e.jsx("span",{children:ae(n.priceCredits*G)})]})]})]},n.item.id)})}),Ke()?null:e.jsxs(e.Fragment,{children:[e.jsx(Ms,{children:k.map(n=>{const G=n.id===$;return e.jsxs(Ts,{"data-testid":"credit-pack","data-on":G||void 0,onClick:()=>R(n.id),children:[e.jsx(Is,{src:As,alt:""}),e.jsx(Es,{children:ae(n.credits)}),e.jsxs(Ps,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),e.jsxs(zs,{children:[e.jsxs(Rs,{children:[e.jsx(Bs,{}),e.jsx("span",{children:ae((E==null?void 0:E.credits)??0)})]}),e.jsxs(_s,{children:["$",((E==null?void 0:E.usd)??0).toFixed(2)]})]})]}),e.jsxs(Xe,{children:[e.jsx(ge,{"data-variant":"outline",onClick:H,children:a("buyModal.cancel")}),Ke()?null:e.jsx(ge,{"data-variant":"gradient",onClick:U,children:a("buyModal.buy")})]})]})}const{colors:l,gradients:$n,radius:le}=z,Zt="@media (max-width: 1080px)",A="@media (max-width: 880px)",Ut=r.div`
173
+ `;function Cn(i){const{phase:d,balanceCredits:k,onClose:$}=i,R=d==="processing",U=d==="error"?a("cartCheckout.errorTitle"):d==="nofunds"?a("cartCheckout.titleNoFunds"):d==="choose"?a("buyModal.choosePayment"):a("cartCheckout.titleBuy"),H=d==="processing";return e.jsxs(Za,{role:"dialog","aria-modal":"true","aria-label":a("cartCheckout.dialogAria"),children:[e.jsx(es,{onClick:R?void 0:$,"aria-hidden":!0}),e.jsxs(ts,{"data-tall":H||void 0,children:[e.jsxs(as,{children:[e.jsxs(ss,{children:[e.jsx(ns,{children:U}),!R&&e.jsx(is,{onClick:$,"aria-label":a("buyModal.close"),children:e.jsx(rs,{})})]}),e.jsxs(os,{children:[e.jsx(cs,{children:d==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),e.jsx(Bt,{}),e.jsx(ls,{children:ae(k)})]}),i.heldCreditsCount&&(d==="choose"||d==="nofunds")?e.jsx(wn,{"data-testid":"cart-held-notice",children:a("buyModal.heldExplainer",{credits:i.heldCreditsCount,currency:Te.name})}):null]}),d==="choose"&&e.jsxs(Ee,{children:[e.jsxs(vn,{children:[e.jsx("span",{children:a("cart.purchaseSummary")}),e.jsxs("strong",{children:[e.jsx(Bt,{}),ae(i.totalCredits??0)]})]}),e.jsx(Xt,{options:i.options??[],totalCents:i.totalCents??0,shortfall:i.shortfall,onPay:i.onPay??(()=>{})})]}),d==="processing"&&e.jsx(jn,{stage:i.stage??"reserving",step:i.step??1,total:i.total??1,isSelfCustody:!!i.isSelfCustody,signatures:i.signatures}),d==="nofunds"&&e.jsx(kn,{lines:i.lines??[],shortfallCredits:i.shortfallCredits??0,packs:i.packs??[],selectedPack:i.selectedPack??"",onSelectPack:i.onSelectPack??(()=>{}),onBuyPacks:i.onBuyPacks??(()=>{}),onCancel:$}),d==="error"&&e.jsxs(Ee,{children:[e.jsxs(ds,{"data-testid":"buy-error",children:[e.jsx(us,{src:hs,alt:"",width:64,height:80}),e.jsxs(ps,{children:[e.jsx("b",{children:a("cartCheckout.errorHeadline")})," ",i.heldCredits?e.jsxs(e.Fragment,{children:[i.message?e.jsxs(e.Fragment,{children:[i.message," "]}):null,a("cartCheckout.heldLead",{currency:Te.name}),e.jsx("b",{children:a("cartCheckout.heldBold")}),a("cartCheckout.heldTail",{currency:Te.name})]}):i.message??a("cartCheckout.errorBody")]})]}),i.heldCredits?e.jsx(Xe,{children:e.jsx(ge,{"data-variant":"purple","data-full":!0,onClick:$,children:a("cartCheckout.gotIt")})}):e.jsxs(Xe,{children:[e.jsx(ge,{"data-variant":"outline",onClick:$,children:a("buyModal.cancel")}),e.jsx(ge,{"data-variant":"purple",onClick:i.onRetry??$,children:a("cartCheckout.tryAgain")})]})]})]})]})}function jn({stage:i,step:d,total:k,isSelfCustody:$,signatures:R}){const U=i==="reserving",H=k>0?Math.min(100,Math.round(d/k*100)):0,E=$&&R&&R.total>1,J=i==="awaiting-signature"?$?E?a("cartCheckout.confirmMultiple",{current:R.current,total:R.total}):a("buyModal.confirmToContinue"):a("buyModal.completingTransaction"):i==="settling"?a("buyModal.completingTransaction"):a("cartCheckout.preparing");return e.jsxs(Ee,{"data-processing":!0,children:[e.jsx(gs,{src:$a,alt:"",width:61,height:61}),e.jsx(xs,{children:J}),U?e.jsxs(mn,{children:[e.jsx(_t,{"aria-hidden":!0,children:e.jsx(qt,{"data-step":!0,style:{width:`${H}%`}})}),k>1?e.jsxs(fn,{children:[d,"/",k]}):null]}):e.jsx(_t,{"aria-hidden":!0,children:e.jsx(qt,{})})]})}function kn({lines:i,shortfallCredits:d,packs:k,selectedPack:$,onSelectPack:R,onBuyPacks:U,onCancel:H}){const E=k.find(n=>n.id===$),J=i.reduce((n,G)=>n+(G.quantity??1),0);return e.jsxs(Ee,{children:[e.jsxs(ms,{"data-testid":"nofunds-warning",children:[e.jsx(fs,{}),e.jsxs(bs,{children:[e.jsx("b",{children:a("buyModal.insufficientFunds")})," ",a("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:a("buyModal.warningCreditsAmount",{count:Math.max(0,d)})})," ",a("buyModal.warningToPurchase",{count:J}),Ne()?null:e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(ys,{href:Sa("/credits"),target:"_blank",rel:"noopener noreferrer",children:a("buyModal.warningLearnMore")})]})]})]}),e.jsx(bn,{children:i.map(n=>{const G=n.quantity??1;return e.jsxs(vs,{children:[e.jsx(ws,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsxs(Cs,{children:[e.jsxs("div",{children:[e.jsxs(js,{title:n.item.name,children:[n.item.name||a("buyModal.itemFallback"),G>1?e.jsx(yn,{children:a("cartCheckout.qty",{count:G})}):null]}),n.item.creator?e.jsx(ks,{address:n.item.creator}):null]}),e.jsxs($s,{children:[e.jsx(Ss,{}),e.jsx("span",{children:ae(n.priceCredits*G)})]})]})]},n.item.id)})}),Ne()?null:e.jsxs(e.Fragment,{children:[e.jsx(Ms,{children:k.map(n=>{const G=n.id===$;return e.jsxs(Ts,{"data-testid":"credit-pack","data-on":G||void 0,onClick:()=>R(n.id),children:[e.jsx(Is,{src:As,alt:""}),e.jsx(Es,{children:ae(n.credits)}),e.jsxs(Ps,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),e.jsxs(zs,{children:[e.jsxs(Rs,{children:[e.jsx(Bs,{}),e.jsx("span",{children:ae((E==null?void 0:E.credits)??0)})]}),e.jsxs(_s,{children:["$",((E==null?void 0:E.usd)??0).toFixed(2)]})]})]}),e.jsxs(Xe,{children:[e.jsx(ge,{"data-variant":"outline",onClick:H,children:a("buyModal.cancel")}),Ne()?null:e.jsx(ge,{"data-variant":"gradient",onClick:U,children:a("buyModal.buy")})]})]})}const{colors:l,gradients:$n,radius:le}=z,Zt="@media (max-width: 1080px)",A="@media (max-width: 880px)",Ut=r.div`
174
174
  max-width: 1510px;
175
175
  margin: 0 auto;
176
176
  /* Grows into the page's leftover height and passes it down to Upsell, so the white cross-sell band ends at
@@ -461,11 +461,11 @@ import{j as e,L as Yt,r as M,u as ja,b as ka}from"./react-VV7ruaEe.js";import{s
461
461
  line-clamp: 2;
462
462
  -webkit-box-orient: vertical;
463
463
  }
464
- `,Kn=r.div`
464
+ `,Nn=r.div`
465
465
  ${ea};
466
- `,Qn=r(Yt)`
466
+ `,Kn=r(Yt)`
467
467
  ${ea};
468
- `,Nn=r(Ma)`
468
+ `,Qn=r(Ma)`
469
469
  font-size: 10px;
470
470
  line-height: 1.43;
471
471
  color: ${l.muted};
@@ -744,5 +744,5 @@ import{j as e,L as Yt,r as M,u as ja,b as ka}from"./react-VV7ruaEe.js";import{s
744
744
  & section {
745
745
  margin-top: 0;
746
746
  }
747
- `;function Ye(i){if(cn(i))return a("errors.rejected");const d=(i.message??"").toLowerCase();return d.includes("insufficient")?a("cart.error.insufficient",{currency:Te.name}):d.includes("no active listing")||d.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const pi=12e4;function gi(i){const d=[];return i.unavailable.length&&d.push(a("cart.drop.unavailable",{count:i.unavailable.length})),i.own.length&&d.push(a("cart.drop.own",{count:i.own.length})),a("cart.drop.removed",{items:d.join(` ${a("cart.drop.and")} `)})}const Je=i=>i.reduce((d,k)=>d+k.priceCredits*k.quantity,0),Me=i=>i.flatMap(d=>Array.from({length:d.quantity},()=>({...d,quantity:1}))),Vt=8;function Ai(){var $t,St,Mt;Ta({title:a("nav.cart"),noindex:!0});const i=O(t=>t.items),d=O(t=>t.remove),k=O(t=>t.increment),$=O(t=>t.decrement),R=O(t=>t.clear),U=O(t=>t.restore),H=O(t=>t.setFittingOpen),E=Tt(t=>t.items),J=Tt(t=>t.toggle),{session:n,signIn:G}=Ia(),sa=Aa(),xe=tn().packs.slice(0,an);M.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const na=i.some(t=>t.category!=="emote"),{data:Pe}=Ea({queryKey:["upsell-listings"],queryFn:()=>Xa({first:40}),staleTime:6e4}),{data:j}=Pa(n),y=za(),X=ja(),{state:B}=ka(),[ia,de]=M.useState(null),[et,me]=M.useState(null),[ra,_]=M.useState(!1),[q,D]=M.useState(null),tt=M.useRef(0),[h,S]=M.useState(null),{data:fe}=Ra(n),{data:ue}=Ba(!0),[ze,at]=M.useState(""),he=M.useRef(null),st=_a(i),nt=t=>At(st[t.id]),Re=i.filter(nt),it=i.length>0&&Re.length===0,oa=Re.reduce((t,s)=>t+s.priceCredits*s.quantity,0),ca=i.reduce((t,s)=>t+s.quantity,0),la=Re.reduce((t,s)=>t+s.quantity,0),rt=q?q.liveTotalCredits:oa,da=new Set(i.map(t=>t.id)),ot=((Pe==null?void 0:Pe.items)??[]).filter(t=>!da.has(t.id)).slice(0,12),ct=M.useMemo(()=>i.map(t=>t.contractAddress&&t.itemId?`${t.contractAddress.toLowerCase()}-${t.itemId}`:null).filter(t=>t!==null),[i]),se=qa(Vt,{exclude:ct}),lt=Fa({enabled:se.enabled,hasSignal:se.hasSignal,isLoading:se.isLoading,isError:se.isError,personalized:($t=se.result)==null?void 0:$t.personalized,rowCount:((St=se.result)==null?void 0:St.data.length)??0}),ua=new Map(q==null?void 0:q.buyable.map(t=>[t.item.id,t])),be=(j==null?void 0:j.credits)??0,Be=rt*10,ha=ue?It(Be,ue):0n,_e=Ue({priceCents:Be,priceManaWei:ha,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:fe??0n}),pa=t=>t.flatMap(s=>{const o=Oe(s);return o.kind==="store"?[o.mint]:[]}),ga=t=>t.flatMap(s=>s.acquisition==="trade"?[s.trade]:[]),xa=t=>Object.fromEntries(t.flatMap(s=>s.acquisition==="trade"&&s.coupon?[[s.trade.id,s.coupon]]:[])),ma=Ga,fa=t=>Da(t.contractAddress,String(t.itemId));function ye(t){t(),D(null),me(null),de(null)}function ba(){S(null),_(!1)}function dt(t){const s=Je(t),o=Math.max(0,s-be),c=xe.find(u=>u.credits>=o)??xe[xe.length-1];at(c.id),V("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:s,credits_balance:be,shortfall:o}),S({phase:"nofunds",lines:t.map(u=>({item:u.item,priceCredits:u.priceCredits,quantity:u.quantity})),shortfall:o}),_(!1)}async function qe(t){if(!n||t.length===0)return;const s=Me(t),o=s.map(f=>({...f.item,priceCredits:f.priceCredits})),c=t.map(f=>({...f.item,priceCredits:f.priceCredits,quantity:f.quantity})),u=[];let v="authorize";const g=new Set,T=new Set,L=new Set,F=[];let w=!1;S({phase:"processing",stage:"reserving",step:1,total:s.length});try{const f=[],P=rn(s,Kt);let K=0;for(const p of P){S({phase:"processing",stage:"reserving",step:K+1,total:s.length});try{const{credit:m,maxCreditedValue:b}=await Va(n.identity,p.units.map(on));p.units.forEach((N,re)=>{u.push({salt:m.id,itemId:N.item.id}),f.push({...p.drafts[re],credits:[m],maxCreditedValue:b})}),K+=p.units.length}catch(m){if(ln(m)){if(u.length){try{await Ne(n.identity,[...new Set(u.map(b=>b.salt))])}catch(b){oe(b,{flow:"cart_checkout",step:"release"})}y.invalidateQueries({queryKey:["usd-balance"]})}dt(t);return}throw m}}u.length&&y.invalidateQueries({queryKey:["usd-balance"]}),v="submit";const Q=Js(f).length,te=p=>Q>1?{current:p,total:Q}:void 0,W=(p,m)=>S({phase:"processing",stage:p,step:s.length,total:s.length,signatures:te(m)}),C=p=>p<Q?W("awaiting-signature",p+1):W("settling",Q);W("awaiting-signature",1);let x=[];const I=new Map,ne=async p=>{const m=await Promise.allSettled(p.map(b=>Xs(b)));return m.forEach((b,N)=>{const re=I.get(p[N])??[];b.status==="fulfilled"?(re.forEach(We=>T.add(We)),F.push(p[N])):b.reason instanceof He||re.forEach(We=>L.add(We))}),m.flatMap(b=>b.status==="rejected"?[b.reason]:[])};if(Gs())try{let p=0;x=await Zs({purchases:f,buyer:n.address,signer:n.signer,identity:n.identity,onSigned:()=>W("settling",Math.min(p+1,Q)),onBroadcast:({txHash:b,salts:N})=>{p+=1,I.set(b,N),N.forEach(re=>g.add(re))},onGroupSettling:({settled:b})=>W("settling",b)});const m=await ne(x);if(m.length&&!m.some(b=>b instanceof He))throw m[0];w=!0}catch(p){if(p instanceof He)throw await ne([...I.keys()]),p;if(!(p instanceof en)||!Ya(n.providerType))throw p;x=await Ge({purchases:f,buyer:n.address,signer:n.signer,onSigned:C,onBroadcast:({salts:m})=>m.forEach(b=>g.add(b)),onSettled:({txHash:m,salts:b})=>{b.forEach(N=>T.add(N)),F.push(m)},onReverted:({salts:m})=>m.forEach(b=>L.add(b))})}else x=await Ge({purchases:f,buyer:n.address,signer:n.signer,onSigned:C,onBroadcast:({salts:p})=>p.forEach(m=>g.add(m)),onSettled:({txHash:p,salts:m})=>{m.forEach(b=>T.add(b)),F.push(p)},onReverted:({salts:p})=>p.forEach(m=>L.add(m))});t.forEach(p=>d(p.item.id)),D(null),V("Shop Completed Purchase",{...Ce(o),payment_type:"credits",no_crypto_step:w,transaction_hash:x[0]??null}),Wt(y);const we=he.current;he.current=null,S(null),_(!1);const ie={items:c,txHash:x[0]??void 0,txHashes:x,settled:!0,...we?{creditsAdded:we}:{}};X("/success",{state:ie,replace:!0})}catch(f){je(f)||oe(f,{flow:"cart_checkout",step:v,cart_size:t.length});const P=new Set([...g].filter(x=>!L.has(x))),{toRelease:K,boughtItemIds:Q}=Qt({reservations:u,spent:P,settled:T}),te=[...P].some(x=>!T.has(x)),W=o.filter(x=>Q.includes(x.id)),C=o.filter(x=>!Q.includes(x.id));if(V(je(f)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:v,error_code:Pt(f),value_usd:Et(C.reduce((x,I)=>x+I.priceCredits,0)),cart_size:s.length,partial:W.length>0}),K.length)try{await Ne(n.identity,K)}catch(x){oe(x,{flow:"cart_checkout",step:"release"})}if(y.invalidateQueries({queryKey:["usd-balance"]}),W.length>0){Q.forEach(x=>d(x)),D(null),Wt(y),V("Shop Completed Purchase",{...Ce(W),payment_type:"credits",no_crypto_step:w,transaction_hash:F[0]??null,partial:!0}),S({phase:"error",message:a("cart.error.partiallyBought"),heldCredits:te}),_(!1);return}S({phase:"error",message:te?void 0:Ye(f),heldCredits:te})}}function ut(t,s){y.invalidateQueries({queryKey:["usd-balance"]}),y.invalidateQueries({queryKey:["detail-trade"]}),y.invalidateQueries({queryKey:["shop-item"]}),y.invalidateQueries({queryKey:["owned-token"]}),y.invalidateQueries({queryKey:["public-token"]}),y.invalidateQueries({queryKey:["item-resales"]}),y.invalidateQueries({queryKey:["shop-items"]}),y.invalidateQueries({queryKey:["catalog-items"]}),y.invalidateQueries({queryKey:["my-assets"]}),y.invalidateQueries({queryKey:["purchases"]}),y.invalidateQueries({queryKey:["owned-item-count"]}),y.invalidateQueries({queryKey:["overview-listings"]}),y.invalidateQueries({queryKey:["upsell-listings"]});const o=he.current;he.current=null,S(null),_(!1);const c={items:t,txHash:s[0]??void 0,txHashes:s,settled:!0,...o?{creditsAdded:o}:{}};X("/success",{state:c,replace:!0})}function ht(t,s){je(t)||oe(t,{flow:s,step:"submit"}),V(je(t)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Pt(t)}),S({phase:"error",message:Ye(t)}),_(!1)}async function ya(t,s,o){const c=zt(Rt.MANAToken,s),u=zt(Rt.CreditsManager,s);await Vs({auth:{kind:Ys.Allowance,contractAddress:c.address,spenderAddress:u.address,chainId:s},signer:t,requiredWei:o})}async function pt(){if(ue)return ue;try{return await y.fetchQuery(Oa())}catch{return}}async function va(t){const s=Me(t).reduce((v,g)=>v+g.usdCents,0),c=(fe??0n)>0n?await pt():ue,u=c?It(s,c):0n;return{totalCents:s,manaWei:u}}async function gt(t,s){const o=Je(t),{totalCents:c,manaWei:u}=await va(t),v=Ue({priceCents:c,priceManaWei:u,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:fe??0n});if(s&&v.options.some(g=>g.method===s)){if(s==="credits"){qe(t);return}const g=bt(v,s);await mt(xt(s,t),g,()=>s==="mana"?void yt(t,g):void vt(t,c,u));return}if(v.options.some(g=>g.method==="mana"||g.method==="combined")){S({phase:"choose",lines:t,totalCents:c,manaWei:u}),_(!1);return}if(j!=null&&j.credits<o){dt(t);return}qe(t)}function Fe(t){return Ue({priceCents:t.totalCents,priceManaWei:t.manaWei,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:fe??0n})}const[pe,ve]=M.useState(null);function xt(t,s){const o=new Map;for(const c of s){const u=Ls(t,Oe(c));o.set(`${u.chainId}:${u.spender.toLowerCase()}`,u)}return[...o.values()]}async function mt(t,s,o){const c=[];for(const{spender:u,chainId:v}of t){const g=Hs(v,u),T=n?await Os(g,n.address,s).catch(()=>!0):!0;Ds(n==null?void 0:n.providerType,T)&&c.push(g)}if(c.length===0){o();return}_(!1),ft(c,0,o)}function ft(t,s,o){ve({auth:t[s],index:s+1,total:t.length,run:()=>s+1<t.length?ft(t,s+1,o):o()})}function bt(t,s){var o;return((o=t.options.find(c=>c.method===s))==null?void 0:o.manaWei)??0n}function wa(t){if((h==null?void 0:h.phase)!=="choose")return;const{lines:s,totalCents:o,manaWei:c}=h;if(t==="credits"){qe(s);return}const u=bt(Fe(h),t);mt(xt(t,s),u,()=>t==="mana"?void yt(s,u):void vt(s,o,c))}async function yt(t,s){if(!n||t.length===0)return;const o=Me(t),c=o.map(g=>({...g.item,priceCredits:g.priceCredits})),u=t.map(g=>({...g.item,priceCredits:g.priceCredits,quantity:g.quantity})),v=()=>S({phase:"processing",stage:"settling",step:o.length,total:o.length});S({phase:"processing",stage:"awaiting-signature",step:o.length,total:o.length});try{const g=await Ks({trades:ga(o),coupons:xa(o),mints:pa(o),buyer:n.address,signer:n.signer,onSigned:v,manaWei:s});t.forEach(T=>d(T.item.id)),D(null),V("Shop Completed Purchase",{...Ce(c),payment_type:"mana",transaction_hash:g[0]??null}),y.invalidateQueries({queryKey:["mana-balance"]}),ut(u,g)}catch(g){ht(g,"buy_cart_mana")}}async function vt(t,s,o){if(!n||t.length===0)return;const c=Me(t),u=c.map(w=>({...w.item,priceCredits:w.priceCredits})),v=t.map(w=>({...w.item,priceCredits:w.priceCredits,quantity:w.quantity})),g=Qs(c.map(w=>w.usdCents),(j==null?void 0:j.balanceCents)??0),T=[],L=new Set,F=new Set;S({phase:"processing",stage:"reserving",step:1,total:c.length});try{const w=c.map(Oe),f=[],P=new Map,K=new Map;for(let C=0;C<c.length;C++){const x=c[C],I=w[C],ne=g[C],we=Ns(Math.max(0,x.usdCents-ne),s,o);let ie;if(ne<=0)ie=Lt(I,[],"0");else{S({phase:"processing",stage:"reserving",step:C+1,total:c.length});const m=x.item,{credit:b,maxCreditedValue:N}=await Ja(n.identity,ne,I.kind==="trade"?I.trade.id:void 0,m.contractAddress&&m.itemId!=null?{contractAddress:m.contractAddress,itemId:String(m.itemId)}:void 0);T.push({salt:b.id,itemId:m.id}),ie=Lt(I,[b],N)}const p=Kt(ie);P.set(p,(P.get(p)??0n)+we),K.has(p)||K.set(p,f.length),f.push(ie)}T.length&&y.invalidateQueries({queryKey:["usd-balance"]});for(const[C,x]of P){const I=K.get(C);I==null||x<=0n||(f[I]={...f[I],maxCreditedValue:(BigInt(f[I].maxCreditedValue)+x).toString()})}const Q=[...P.values()].reduce((C,x)=>C+x,0n);await ya(n.signer,Us(w[0]),Q);const te=()=>S({phase:"processing",stage:"settling",step:c.length,total:c.length});S({phase:"processing",stage:"awaiting-signature",step:c.length,total:c.length});const W=await Ge({purchases:f,buyer:n.address,signer:n.signer,onSigned:te,onBroadcast:({salts:C})=>C.forEach(x=>L.add(x)),onReverted:({salts:C})=>C.forEach(x=>F.add(x))});t.forEach(C=>d(C.item.id)),D(null),V("Shop Completed Purchase",{...Ce(u),payment_type:"credits_and_mana",transaction_hash:W[0]??null}),y.invalidateQueries({queryKey:["mana-balance"]}),ut(v,W)}catch(w){const{toRelease:f}=Qt({reservations:T,spent:new Set([...L].filter(P=>!F.has(P))),settled:new Set});f.length&&Ne(n.identity,f).catch(()=>{}),T.length&&y.invalidateQueries({queryKey:["usd-balance"]}),ht(w,"buy_cart_combined")}}async function Z(t){if(!n){Ft({type:"cart-checkout"}),G();return}const s=O.getState().items.filter(nt);if(s.length===0)return;de(null),me(null),_(!0);const o=s.reduce((c,u)=>c+u.priceCredits*u.quantity,0);V("Shop Started Checkout",{checkout_source:"cart",cart_size:s.length,cart_value_credits:o,cart_value_usd:Et(o),has_sufficient_credits:be>=o});try{const c=await sn(s,n.address,ma,await pt(),fa,Ha),u=[...c.unavailable,...c.own];if(u.length&&(u.forEach(v=>d(v.id)),me(gi(c))),c.buyable.length===0){de(a("cart.error.noneAvailable")),D(null);return}if(c.orderChanged){D(c),tt.current=Date.now();return}await gt(c.buyable,t)}catch(c){oe(c,{flow:"cart_checkout",step:"review",cart_size:s.length}),de(Ye(c))}finally{_(!1)}}async function wt(){if(q){if(!n){Ft({type:"cart-checkout"}),G();return}if(Date.now()-tt.current>pi){D(null),me(null),await Z();return}de(null),gt(q.buyable)}}async function Ca(){if(ze){try{sessionStorage.setItem(ke,JSON.stringify(O.getState().items))}catch{}_(!0);try{const t=await nn(ze,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(ke)}catch{}oe(t,{flow:"cart_buy_credits"}),S({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{_(!1)}}}const Ct=M.useRef(!1);M.useEffect(()=>{if(!n||Ct.current||!qs("cart-checkout"))return;Ct.current=!0;const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[n]);const jt=M.useRef(!1);M.useEffect(()=>{if(!(B!=null&&B.resumeCheckout)||jt.current)return;jt.current=!0,he.current=B.creditsAdded??null;try{const s=sessionStorage.getItem(ke);if(s){sessionStorage.removeItem(ke);const o=JSON.parse(s);Array.isArray(o)&&o.length&&U(o)}}catch{}y.invalidateQueries({queryKey:["usd-balance"]});const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[B==null?void 0:B.resumeCheckout]);const kt=M.useRef(!1);M.useEffect(()=>{if(!(B!=null&&B.startCheckout)||kt.current)return;kt.current=!0,X(".",{replace:!0,state:null});const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[B==null?void 0:B.startCheckout]);const ee=ra||(h==null?void 0:h.phase)==="processing";return i.length===0&&!h?e.jsx(Ut,{children:e.jsxs(Ht,{children:[e.jsxs(Gt,{onClick:()=>X(-1),type:"button",children:[e.jsx(Y,{name:"arrow-left"}),a("nav.cart")]}),e.jsx(An,{children:e.jsx(Wa,{variant:"light",testId:"cart-empty",icon:La,title:a("cart.empty.title"),body:a("cart.empty.body"),cta:{label:a("cart.empty.cta"),to:"/items"}})})]})}):e.jsxs(Ut,{children:[e.jsxs(Ht,{children:[e.jsxs(Gt,{onClick:()=>X(-1),type:"button",children:[e.jsx(Y,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(Sn,{children:[e.jsxs(Mn,{children:[e.jsxs(Tn,{children:[e.jsx(En,{onClick:()=>X(-1),type:"button","aria-label":a("cart.goBack"),children:e.jsx(Y,{name:"arrow-left"})}),e.jsx(Pn,{children:a("cart.panelTitle",{count:ca})}),na?e.jsxs(zn,{onClick:()=>H(!0),disabled:ee,children:[e.jsx(Y,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),e.jsxs(In,{children:[e.jsx(Rn,{children:i.map(t=>{const s=ua.get(t.id),o=s?s.priceCredits:t.priceCredits,c=!!s&&s.priceCredits!==t.priceCredits,u=!t.tokenId,v=t.quantity,g=typeof t.available=="number"&&v>=t.available,T=o*v,L=Ka(t),F=!!L&&!!E[L],w=Qa(t),f=st[t.id],P=!At(f),K=f==="sold-out"?a("cart.availability.soldOut"):a("cart.availability.unavailable");return e.jsxs(Bn,{"data-unavailable":P||void 0,children:[e.jsxs(_n,{"data-thumb":!0,children:[w?e.jsx(qn,{to:w,state:{item:t,tradeId:t.tradeId},"aria-label":t.name,children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:t.name}):null}):t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:t.name}):null,e.jsx(Fn,{"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(Wn,{children:[e.jsxs(Ln,{"data-desc":!0,children:[w?e.jsx(Qn,{to:w,state:{item:t,tradeId:t.tradeId},title:t.name,children:t.name}):e.jsx(Kn,{title:t.name,children:t.name}),t.creator?e.jsx(Nn,{address:t.creator,linkToProfile:!0}):null,sa&&u?e.jsxs(Zn,{"data-testid":"cart-creator-tag",children:[e.jsx(ei,{name:"buy-from-creator"}),a("cart.creatorTag")]}):null]}),e.jsx(Un,{children:P?e.jsxs(Jn,{children:[e.jsx(Xn,{name:"warning-fill",size:24}),K]}):e.jsxs(e.Fragment,{children:[u?e.jsxs(Gn,{children:[e.jsx(Ot,{onClick:()=>ye(()=>$(t.id)),disabled:ee||v<=1,"aria-label":a("cart.decreaseQuantity",{name:t.name}),children:e.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:e.jsx("path",{d:"M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}),e.jsx(Hn,{children:v}),e.jsx(Ot,{onClick:()=>ye(()=>k(t.id)),disabled:ee||g,"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(On,{children:[e.jsx(Dn,{})," ",e.jsx(Qe,{credits:T}),c?e.jsx(Vn,{children:e.jsx(Qe,{credits:t.priceCredits*v})}):null]})]})})]}),e.jsxs(Yn,{children:[L?e.jsx(ti,{"data-on":F||void 0,onClick:()=>J(t),"aria-label":F?a("cart.removeFromFavorites",{name:t.name}):a("cart.addToFavorites",{name:t.name}),title:F?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:e.jsx(Y,{name:F?"heart-solid":"heart"})}):null,e.jsx(ai,{onClick:()=>ye(()=>d(t.id)),disabled:ee,"aria-label":a("cart.remove",{name:t.name}),title:a("cart.removeTitle"),children:e.jsx(Y,{name:"trash",size:24})})]})]},t.id)})}),e.jsx(si,{children:e.jsx("button",{className:"link",onClick:()=>ye(R),disabled:ee,children:a("cart.clearCart")})})]})]}),e.jsxs(ni,{children:[e.jsx(ii,{children:a("cart.purchaseSummary")}),e.jsxs(ri,{children:[e.jsxs(oi,{children:[e.jsx(ci,{children:a("cart.totalItems",{count:la})}),e.jsx(di,{children:e.jsxs(li,{children:[e.jsx(ui,{})," ",e.jsx(Qe,{credits:rt})]})})]}),e.jsx(Xt,{options:_e.options,totalCents:Be,shortfall:_e.manaShortfall,showCreditsAmount:!1,creditsLabel:q?a("marketCheckout.confirmPurchase"):_e.options.length>1?a("cart.buyWithCredits"):a("cart.checkout"),busy:ee||it,onPay:t=>void(q?wt():Z(t)),creditsFallback:{label:ee?a("cart.working"):q?a("marketCheckout.confirmPurchase"):a("cart.checkout"),onClick:()=>void(q?wt():Z())}}),it?e.jsx(Se,{className:"muted",children:a("cart.allUnavailable")}):null,n?null:e.jsx(Se,{className:"muted",children:a("cart.signInHint")}),q?e.jsx(Se,{className:"muted",children:a("cart.priceChanged")}):null,et?e.jsx(Se,{className:"muted",children:et}):null,e.jsx(hi,{message:ia})]})]})]})]}),lt===null&&e.jsx(Dt,{"data-testid":"cart-personal-upsell",children:e.jsx(Na,{exclude:ct,title:a("cart.suggestedTitle"),surface:"cart",first:Vt})}),lt!==null&&ot.length>0?e.jsx(Dt,{children:e.jsx(Fs,{title:a("cart.youMightAlsoLike"),items:ot})}):null,pe&&n?e.jsx(Ws,{auth:pe.auth,signer:n.signer,step:{index:pe.index,total:pe.total},title:a("authorizeStep.manaTitle"),name:a("authorizeStep.manaName"),reason:a("authorizeStep.manaReason"),icon:e.jsx("img",{src:Ie,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{run:t}=pe;ve(null),t()},onCancel:()=>ve(null),onClose:()=>ve(null)}):null,h?e.jsx(Cn,{phase:h.phase,balanceCredits:be,heldCreditsCount:((Mt=j==null?void 0:j.held)==null?void 0:Mt.credits)??null,onClose:ba,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:Ua(n==null?void 0:n.providerType),signatures:h.phase==="processing"?h.signatures:void 0,options:h.phase==="choose"?Fe(h).options:void 0,shortfall:h.phase==="choose"?Fe(h).manaShortfall:void 0,onPay:wa,totalCents:h.phase==="choose"?h.totalCents:void 0,totalManaWei:h.phase==="choose"?h.manaWei:void 0,totalCredits:h.phase==="choose"?Je(h.lines):void 0,lines:h.phase==="nofunds"?h.lines:void 0,shortfallCredits:h.phase==="nofunds"?h.shortfall:void 0,packs:xe,selectedPack:ze,onSelectPack:at,onBuyPacks:()=>void Ca(),message:h.phase==="error"?h.message:void 0,heldCredits:h.phase==="error"&&!!h.heldCredits,onRetry:()=>void Z()}):null]})}export{Ai as Cart};
748
- //# sourceMappingURL=Cart-CyKZk7CM.js.map
747
+ `;function Ye(i){if(cn(i))return a("errors.rejected");const d=(i.message??"").toLowerCase();return d.includes("insufficient")?a("cart.error.insufficient",{currency:Te.name}):d.includes("no active listing")||d.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const pi=12e4;function gi(i){const d=[];return i.unavailable.length&&d.push(a("cart.drop.unavailable",{count:i.unavailable.length})),i.own.length&&d.push(a("cart.drop.own",{count:i.own.length})),a("cart.drop.removed",{items:d.join(` ${a("cart.drop.and")} `)})}const Je=i=>i.reduce((d,k)=>d+k.priceCredits*k.quantity,0),Me=i=>i.flatMap(d=>Array.from({length:d.quantity},()=>({...d,quantity:1}))),Vt=8;function Ai(){var $t,St,Mt;Ta({title:a("nav.cart"),noindex:!0});const i=O(t=>t.items),d=O(t=>t.remove),k=O(t=>t.increment),$=O(t=>t.decrement),R=O(t=>t.clear),U=O(t=>t.restore),H=O(t=>t.setFittingOpen),E=Tt(t=>t.items),J=Tt(t=>t.toggle),{session:n,signIn:G}=Ia(),sa=Aa(),xe=tn().packs.slice(0,an);M.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const na=i.some(t=>t.category!=="emote"),{data:Pe}=Ea({queryKey:["upsell-listings"],queryFn:()=>Xa({first:40}),staleTime:6e4}),{data:j}=Pa(n),y=za(),X=ja(),{state:B}=ka(),[ia,de]=M.useState(null),[et,me]=M.useState(null),[ra,_]=M.useState(!1),[q,D]=M.useState(null),tt=M.useRef(0),[h,S]=M.useState(null),{data:fe}=Ra(n),{data:ue}=Ba(!0),[ze,at]=M.useState(""),he=M.useRef(null),st=_a(i),nt=t=>At(st[t.id]),Re=i.filter(nt),it=i.length>0&&Re.length===0,oa=Re.reduce((t,s)=>t+s.priceCredits*s.quantity,0),ca=i.reduce((t,s)=>t+s.quantity,0),la=Re.reduce((t,s)=>t+s.quantity,0),rt=q?q.liveTotalCredits:oa,da=new Set(i.map(t=>t.id)),ot=((Pe==null?void 0:Pe.items)??[]).filter(t=>!da.has(t.id)).slice(0,12),ct=M.useMemo(()=>i.map(t=>t.contractAddress&&t.itemId?`${t.contractAddress.toLowerCase()}-${t.itemId}`:null).filter(t=>t!==null),[i]),se=qa(Vt,{exclude:ct}),lt=Fa({enabled:se.enabled,hasSignal:se.hasSignal,isLoading:se.isLoading,isError:se.isError,personalized:($t=se.result)==null?void 0:$t.personalized,rowCount:((St=se.result)==null?void 0:St.data.length)??0}),ua=new Map(q==null?void 0:q.buyable.map(t=>[t.item.id,t])),be=(j==null?void 0:j.credits)??0,Be=rt*10,ha=ue?It(Be,ue):0n,_e=Ue({priceCents:Be,priceManaWei:ha,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:fe??0n}),pa=t=>t.flatMap(s=>{const o=Oe(s);return o.kind==="store"?[o.mint]:[]}),ga=t=>t.flatMap(s=>s.acquisition==="trade"?[s.trade]:[]),xa=t=>Object.fromEntries(t.flatMap(s=>s.acquisition==="trade"&&s.coupon?[[s.trade.id,s.coupon]]:[])),ma=Ga,fa=t=>Da(t.contractAddress,String(t.itemId));function ye(t){t(),D(null),me(null),de(null)}function ba(){S(null),_(!1)}function dt(t){const s=Je(t),o=Math.max(0,s-be),c=xe.find(u=>u.credits>=o)??xe[xe.length-1];at(c.id),V("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:s,credits_balance:be,shortfall:o}),S({phase:"nofunds",lines:t.map(u=>({item:u.item,priceCredits:u.priceCredits,quantity:u.quantity})),shortfall:o}),_(!1)}async function qe(t){if(!n||t.length===0)return;const s=Me(t),o=s.map(f=>({...f.item,priceCredits:f.priceCredits})),c=t.map(f=>({...f.item,priceCredits:f.priceCredits,quantity:f.quantity})),u=[];let v="authorize";const g=new Set,T=new Set,L=new Set,F=[];let w=!1;S({phase:"processing",stage:"reserving",step:1,total:s.length});try{const f=[],P=rn(s,Nt);let N=0;for(const p of P){S({phase:"processing",stage:"reserving",step:N+1,total:s.length});try{const{credit:m,maxCreditedValue:b}=await Va(n.identity,p.units.map(on));p.units.forEach((Q,re)=>{u.push({salt:m.id,itemId:Q.item.id}),f.push({...p.drafts[re],credits:[m],maxCreditedValue:b})}),N+=p.units.length}catch(m){if(ln(m)){if(u.length){try{await Qe(n.identity,[...new Set(u.map(b=>b.salt))])}catch(b){oe(b,{flow:"cart_checkout",step:"release"})}y.invalidateQueries({queryKey:["usd-balance"]})}dt(t);return}throw m}}u.length&&y.invalidateQueries({queryKey:["usd-balance"]}),v="submit";const K=Js(f).length,te=p=>K>1?{current:p,total:K}:void 0,W=(p,m)=>S({phase:"processing",stage:p,step:s.length,total:s.length,signatures:te(m)}),C=p=>p<K?W("awaiting-signature",p+1):W("settling",K);W("awaiting-signature",1);let x=[];const I=new Map,ne=async p=>{const m=await Promise.allSettled(p.map(b=>Xs(b)));return m.forEach((b,Q)=>{const re=I.get(p[Q])??[];b.status==="fulfilled"?(re.forEach(We=>T.add(We)),F.push(p[Q])):b.reason instanceof He||re.forEach(We=>L.add(We))}),m.flatMap(b=>b.status==="rejected"?[b.reason]:[])};if(Gs())try{let p=0;x=await Zs({purchases:f,buyer:n.address,signer:n.signer,identity:n.identity,onSigned:()=>W("settling",Math.min(p+1,K)),onBroadcast:({txHash:b,salts:Q})=>{p+=1,I.set(b,Q),Q.forEach(re=>g.add(re))},onGroupSettling:({settled:b})=>W("settling",b)});const m=await ne(x);if(m.length&&!m.some(b=>b instanceof He))throw m[0];w=!0}catch(p){if(p instanceof He)throw await ne([...I.keys()]),p;if(!(p instanceof en)||!Ya(n.providerType))throw p;x=await Ge({purchases:f,buyer:n.address,signer:n.signer,onSigned:C,onBroadcast:({salts:m})=>m.forEach(b=>g.add(b)),onSettled:({txHash:m,salts:b})=>{b.forEach(Q=>T.add(Q)),F.push(m)},onReverted:({salts:m})=>m.forEach(b=>L.add(b))})}else x=await Ge({purchases:f,buyer:n.address,signer:n.signer,onSigned:C,onBroadcast:({salts:p})=>p.forEach(m=>g.add(m)),onSettled:({txHash:p,salts:m})=>{m.forEach(b=>T.add(b)),F.push(p)},onReverted:({salts:p})=>p.forEach(m=>L.add(m))});t.forEach(p=>d(p.item.id)),D(null),V("Shop Completed Purchase",{...Ce(o),payment_type:"credits",no_crypto_step:w,transaction_hash:x[0]??null}),Wt(y);const we=he.current;he.current=null,S(null),_(!1);const ie={items:c,txHash:x[0]??void 0,txHashes:x,settled:!0,...we?{creditsAdded:we}:{}};X("/success",{state:ie,replace:!0})}catch(f){je(f)||oe(f,{flow:"cart_checkout",step:v,cart_size:t.length});const P=new Set([...g].filter(x=>!L.has(x))),{toRelease:N,boughtItemIds:K}=Kt({reservations:u,spent:P,settled:T}),te=[...P].some(x=>!T.has(x)),W=o.filter(x=>K.includes(x.id)),C=o.filter(x=>!K.includes(x.id));if(V(je(f)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:v,error_code:Pt(f),value_usd:Et(C.reduce((x,I)=>x+I.priceCredits,0)),cart_size:s.length,partial:W.length>0}),N.length)try{await Qe(n.identity,N)}catch(x){oe(x,{flow:"cart_checkout",step:"release"})}if(y.invalidateQueries({queryKey:["usd-balance"]}),W.length>0){K.forEach(x=>d(x)),D(null),Wt(y),V("Shop Completed Purchase",{...Ce(W),payment_type:"credits",no_crypto_step:w,transaction_hash:F[0]??null,partial:!0}),S({phase:"error",message:a("cart.error.partiallyBought"),heldCredits:te}),_(!1);return}S({phase:"error",message:te?void 0:Ye(f),heldCredits:te})}}function ut(t,s){y.invalidateQueries({queryKey:["usd-balance"]}),y.invalidateQueries({queryKey:["detail-trade"]}),y.invalidateQueries({queryKey:["shop-item"]}),y.invalidateQueries({queryKey:["owned-token"]}),y.invalidateQueries({queryKey:["public-token"]}),y.invalidateQueries({queryKey:["item-resales"]}),y.invalidateQueries({queryKey:["shop-items"]}),y.invalidateQueries({queryKey:["catalog-items"]}),y.invalidateQueries({queryKey:["my-assets"]}),y.invalidateQueries({queryKey:["purchases"]}),y.invalidateQueries({queryKey:["owned-item-count"]}),y.invalidateQueries({queryKey:["overview-listings"]}),y.invalidateQueries({queryKey:["upsell-listings"]});const o=he.current;he.current=null,S(null),_(!1);const c={items:t,txHash:s[0]??void 0,txHashes:s,settled:!0,...o?{creditsAdded:o}:{}};X("/success",{state:c,replace:!0})}function ht(t,s){je(t)||oe(t,{flow:s,step:"submit"}),V(je(t)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Pt(t)}),S({phase:"error",message:Ye(t)}),_(!1)}async function ya(t,s,o){const c=zt(Rt.MANAToken,s),u=zt(Rt.CreditsManager,s);await Vs({auth:{kind:Ys.Allowance,contractAddress:c.address,spenderAddress:u.address,chainId:s},signer:t,requiredWei:o})}async function pt(){if(ue)return ue;try{return await y.fetchQuery(Oa())}catch{return}}async function va(t){const s=Me(t).reduce((v,g)=>v+g.usdCents,0),c=(fe??0n)>0n?await pt():ue,u=c?It(s,c):0n;return{totalCents:s,manaWei:u}}async function gt(t,s){const o=Je(t),{totalCents:c,manaWei:u}=await va(t),v=Ue({priceCents:c,priceManaWei:u,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:fe??0n});if(s&&v.options.some(g=>g.method===s)){if(s==="credits"){qe(t);return}const g=bt(v,s);await mt(xt(s,t),g,()=>s==="mana"?void yt(t,g):void vt(t,c,u));return}if(v.options.some(g=>g.method==="mana"||g.method==="combined")){S({phase:"choose",lines:t,totalCents:c,manaWei:u}),_(!1);return}if(j!=null&&j.credits<o){dt(t);return}qe(t)}function Fe(t){return Ue({priceCents:t.totalCents,priceManaWei:t.manaWei,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:fe??0n})}const[pe,ve]=M.useState(null);function xt(t,s){const o=new Map;for(const c of s){const u=Ls(t,Oe(c));o.set(`${u.chainId}:${u.spender.toLowerCase()}`,u)}return[...o.values()]}async function mt(t,s,o){const c=[];for(const{spender:u,chainId:v}of t){const g=Hs(v,u),T=n?await Os(g,n.address,s).catch(()=>!0):!0;Ds(n==null?void 0:n.providerType,T)&&c.push(g)}if(c.length===0){o();return}_(!1),ft(c,0,o)}function ft(t,s,o){ve({auth:t[s],index:s+1,total:t.length,run:()=>s+1<t.length?ft(t,s+1,o):o()})}function bt(t,s){var o;return((o=t.options.find(c=>c.method===s))==null?void 0:o.manaWei)??0n}function wa(t){if((h==null?void 0:h.phase)!=="choose")return;const{lines:s,totalCents:o,manaWei:c}=h;if(t==="credits"){qe(s);return}const u=bt(Fe(h),t);mt(xt(t,s),u,()=>t==="mana"?void yt(s,u):void vt(s,o,c))}async function yt(t,s){if(!n||t.length===0)return;const o=Me(t),c=o.map(g=>({...g.item,priceCredits:g.priceCredits})),u=t.map(g=>({...g.item,priceCredits:g.priceCredits,quantity:g.quantity})),v=()=>S({phase:"processing",stage:"settling",step:o.length,total:o.length});S({phase:"processing",stage:"awaiting-signature",step:o.length,total:o.length});try{const g=await Ns({trades:ga(o),coupons:xa(o),mints:pa(o),buyer:n.address,signer:n.signer,onSigned:v,manaWei:s});t.forEach(T=>d(T.item.id)),D(null),V("Shop Completed Purchase",{...Ce(c),payment_type:"mana",transaction_hash:g[0]??null}),y.invalidateQueries({queryKey:["mana-balance"]}),ut(u,g)}catch(g){ht(g,"buy_cart_mana")}}async function vt(t,s,o){if(!n||t.length===0)return;const c=Me(t),u=c.map(w=>({...w.item,priceCredits:w.priceCredits})),v=t.map(w=>({...w.item,priceCredits:w.priceCredits,quantity:w.quantity})),g=Ks(c.map(w=>w.usdCents),(j==null?void 0:j.balanceCents)??0),T=[],L=new Set,F=new Set;S({phase:"processing",stage:"reserving",step:1,total:c.length});try{const w=c.map(Oe),f=[],P=new Map,N=new Map;for(let C=0;C<c.length;C++){const x=c[C],I=w[C],ne=g[C],we=Qs(Math.max(0,x.usdCents-ne),s,o);let ie;if(ne<=0)ie=Lt(I,[],"0");else{S({phase:"processing",stage:"reserving",step:C+1,total:c.length});const m=x.item,{credit:b,maxCreditedValue:Q}=await Ja(n.identity,ne,I.kind==="trade"?I.trade.id:void 0,m.contractAddress&&m.itemId!=null?{contractAddress:m.contractAddress,itemId:String(m.itemId)}:void 0);T.push({salt:b.id,itemId:m.id}),ie=Lt(I,[b],Q)}const p=Nt(ie);P.set(p,(P.get(p)??0n)+we),N.has(p)||N.set(p,f.length),f.push(ie)}T.length&&y.invalidateQueries({queryKey:["usd-balance"]});for(const[C,x]of P){const I=N.get(C);I==null||x<=0n||(f[I]={...f[I],maxCreditedValue:(BigInt(f[I].maxCreditedValue)+x).toString()})}const K=[...P.values()].reduce((C,x)=>C+x,0n);await ya(n.signer,Us(w[0]),K);const te=()=>S({phase:"processing",stage:"settling",step:c.length,total:c.length});S({phase:"processing",stage:"awaiting-signature",step:c.length,total:c.length});const W=await Ge({purchases:f,buyer:n.address,signer:n.signer,onSigned:te,onBroadcast:({salts:C})=>C.forEach(x=>L.add(x)),onReverted:({salts:C})=>C.forEach(x=>F.add(x))});t.forEach(C=>d(C.item.id)),D(null),V("Shop Completed Purchase",{...Ce(u),payment_type:"credits_and_mana",transaction_hash:W[0]??null}),y.invalidateQueries({queryKey:["mana-balance"]}),ut(v,W)}catch(w){const{toRelease:f}=Kt({reservations:T,spent:new Set([...L].filter(P=>!F.has(P))),settled:new Set});f.length&&Qe(n.identity,f).catch(()=>{}),T.length&&y.invalidateQueries({queryKey:["usd-balance"]}),ht(w,"buy_cart_combined")}}async function Z(t){if(!n){Ft({type:"cart-checkout"}),G();return}const s=O.getState().items.filter(nt);if(s.length===0)return;de(null),me(null),_(!0);const o=s.reduce((c,u)=>c+u.priceCredits*u.quantity,0);V("Shop Started Checkout",{checkout_source:"cart",cart_size:s.length,cart_value_credits:o,cart_value_usd:Et(o),has_sufficient_credits:be>=o});try{const c=await sn(s,n.address,ma,await pt(),fa,Ha),u=[...c.unavailable,...c.own];if(u.length&&(u.forEach(v=>d(v.id)),me(gi(c))),c.buyable.length===0){de(a("cart.error.noneAvailable")),D(null);return}if(c.orderChanged){D(c),tt.current=Date.now();return}await gt(c.buyable,t)}catch(c){oe(c,{flow:"cart_checkout",step:"review",cart_size:s.length}),de(Ye(c))}finally{_(!1)}}async function wt(){if(q){if(!n){Ft({type:"cart-checkout"}),G();return}if(Date.now()-tt.current>pi){D(null),me(null),await Z();return}de(null),gt(q.buyable)}}async function Ca(){if(ze){try{sessionStorage.setItem(ke,JSON.stringify(O.getState().items))}catch{}_(!0);try{const t=await nn(ze,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(ke)}catch{}oe(t,{flow:"cart_buy_credits"}),S({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{_(!1)}}}const Ct=M.useRef(!1);M.useEffect(()=>{if(!n||Ct.current||!qs("cart-checkout"))return;Ct.current=!0;const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[n]);const jt=M.useRef(!1);M.useEffect(()=>{if(!(B!=null&&B.resumeCheckout)||jt.current)return;jt.current=!0,he.current=B.creditsAdded??null;try{const s=sessionStorage.getItem(ke);if(s){sessionStorage.removeItem(ke);const o=JSON.parse(s);Array.isArray(o)&&o.length&&U(o)}}catch{}y.invalidateQueries({queryKey:["usd-balance"]});const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[B==null?void 0:B.resumeCheckout]);const kt=M.useRef(!1);M.useEffect(()=>{if(!(B!=null&&B.startCheckout)||kt.current)return;kt.current=!0,X(".",{replace:!0,state:null});const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[B==null?void 0:B.startCheckout]);const ee=ra||(h==null?void 0:h.phase)==="processing";return i.length===0&&!h?e.jsx(Ut,{children:e.jsxs(Ht,{children:[e.jsxs(Gt,{onClick:()=>X(-1),type:"button",children:[e.jsx(Y,{name:"arrow-left"}),a("nav.cart")]}),e.jsx(An,{children:e.jsx(Wa,{variant:"light",testId:"cart-empty",icon:La,title:a("cart.empty.title"),body:a("cart.empty.body"),cta:{label:a("cart.empty.cta"),to:"/items"}})})]})}):e.jsxs(Ut,{children:[e.jsxs(Ht,{children:[e.jsxs(Gt,{onClick:()=>X(-1),type:"button",children:[e.jsx(Y,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(Sn,{children:[e.jsxs(Mn,{children:[e.jsxs(Tn,{children:[e.jsx(En,{onClick:()=>X(-1),type:"button","aria-label":a("cart.goBack"),children:e.jsx(Y,{name:"arrow-left"})}),e.jsx(Pn,{children:a("cart.panelTitle",{count:ca})}),na?e.jsxs(zn,{onClick:()=>H(!0),disabled:ee,children:[e.jsx(Y,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),e.jsxs(In,{children:[e.jsx(Rn,{children:i.map(t=>{const s=ua.get(t.id),o=s?s.priceCredits:t.priceCredits,c=!!s&&s.priceCredits!==t.priceCredits,u=!t.tokenId,v=t.quantity,g=typeof t.available=="number"&&v>=t.available,T=o*v,L=Na(t),F=!!L&&!!E[L],w=Ka(t),f=st[t.id],P=!At(f),N=f==="sold-out"?a("cart.availability.soldOut"):a("cart.availability.unavailable");return e.jsxs(Bn,{"data-unavailable":P||void 0,children:[e.jsxs(_n,{"data-thumb":!0,children:[w?e.jsx(qn,{to:w,state:{item:t,tradeId:t.tradeId},"aria-label":t.name,children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:t.name}):null}):t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:t.name}):null,e.jsx(Fn,{"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(Wn,{children:[e.jsxs(Ln,{"data-desc":!0,children:[w?e.jsx(Kn,{to:w,state:{item:t,tradeId:t.tradeId},title:t.name,children:t.name}):e.jsx(Nn,{title:t.name,children:t.name}),t.creator?e.jsx(Qn,{address:t.creator,linkToProfile:!0}):null,sa&&u?e.jsxs(Zn,{"data-testid":"cart-creator-tag",children:[e.jsx(ei,{name:"buy-from-creator"}),a("cart.creatorTag")]}):null]}),e.jsx(Un,{children:P?e.jsxs(Jn,{children:[e.jsx(Xn,{name:"warning-fill",size:24}),N]}):e.jsxs(e.Fragment,{children:[u?e.jsxs(Gn,{children:[e.jsx(Ot,{onClick:()=>ye(()=>$(t.id)),disabled:ee||v<=1,"aria-label":a("cart.decreaseQuantity",{name:t.name}),children:e.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:e.jsx("path",{d:"M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}),e.jsx(Hn,{children:v}),e.jsx(Ot,{onClick:()=>ye(()=>k(t.id)),disabled:ee||g,"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(On,{children:[e.jsx(Dn,{})," ",e.jsx(Ke,{credits:T}),c?e.jsx(Vn,{children:e.jsx(Ke,{credits:t.priceCredits*v})}):null]})]})})]}),e.jsxs(Yn,{children:[L?e.jsx(ti,{"data-on":F||void 0,onClick:()=>J(t),"aria-label":F?a("cart.removeFromFavorites",{name:t.name}):a("cart.addToFavorites",{name:t.name}),title:F?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:e.jsx(Y,{name:F?"heart-solid":"heart"})}):null,e.jsx(ai,{onClick:()=>ye(()=>d(t.id)),disabled:ee,"aria-label":a("cart.remove",{name:t.name}),title:a("cart.removeTitle"),children:e.jsx(Y,{name:"trash",size:24})})]})]},t.id)})}),e.jsx(si,{children:e.jsx("button",{className:"link",onClick:()=>ye(R),disabled:ee,children:a("cart.clearCart")})})]})]}),e.jsxs(ni,{children:[e.jsx(ii,{children:a("cart.purchaseSummary")}),e.jsxs(ri,{children:[e.jsxs(oi,{children:[e.jsx(ci,{children:a("cart.totalItems",{count:la})}),e.jsx(di,{children:e.jsxs(li,{children:[e.jsx(ui,{})," ",e.jsx(Ke,{credits:rt})]})})]}),e.jsx(Xt,{options:_e.options,totalCents:Be,shortfall:_e.manaShortfall,showCreditsAmount:!1,creditsLabel:q?a("marketCheckout.confirmPurchase"):_e.options.length>1?a("cart.buyWithCredits"):a("cart.checkout"),busy:ee||it,onPay:t=>void(q?wt():Z(t)),creditsFallback:{label:ee?a("cart.working"):q?a("marketCheckout.confirmPurchase"):a("cart.checkout"),onClick:()=>void(q?wt():Z())}}),it?e.jsx(Se,{className:"muted",children:a("cart.allUnavailable")}):null,n?null:e.jsx(Se,{className:"muted",children:a("cart.signInHint")}),q?e.jsx(Se,{className:"muted",children:a("cart.priceChanged")}):null,et?e.jsx(Se,{className:"muted",children:et}):null,e.jsx(hi,{message:ia})]})]})]})]}),lt===null&&e.jsx(Dt,{"data-testid":"cart-personal-upsell",children:e.jsx(Qa,{exclude:ct,title:a("cart.suggestedTitle"),surface:"cart",first:Vt})}),lt!==null&&ot.length>0?e.jsx(Dt,{children:e.jsx(Fs,{title:a("cart.youMightAlsoLike"),items:ot})}):null,pe&&n?e.jsx(Ws,{auth:pe.auth,signer:n.signer,step:{index:pe.index,total:pe.total},title:a("authorizeStep.manaTitle"),name:a("authorizeStep.manaName"),reason:a("authorizeStep.manaReason"),icon:e.jsx("img",{src:Ie,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{run:t}=pe;ve(null),t()},onCancel:()=>ve(null),onClose:()=>ve(null)}):null,h?e.jsx(Cn,{phase:h.phase,balanceCredits:be,heldCreditsCount:((Mt=j==null?void 0:j.held)==null?void 0:Mt.credits)??null,onClose:ba,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:Ua(n==null?void 0:n.providerType),signatures:h.phase==="processing"?h.signatures:void 0,options:h.phase==="choose"?Fe(h).options:void 0,shortfall:h.phase==="choose"?Fe(h).manaShortfall:void 0,onPay:wa,totalCents:h.phase==="choose"?h.totalCents:void 0,totalManaWei:h.phase==="choose"?h.manaWei:void 0,totalCredits:h.phase==="choose"?Je(h.lines):void 0,lines:h.phase==="nofunds"?h.lines:void 0,shortfallCredits:h.phase==="nofunds"?h.shortfall:void 0,packs:xe,selectedPack:ze,onSelectPack:at,onBuyPacks:()=>void Ca(),message:h.phase==="error"?h.message:void 0,heldCredits:h.phase==="error"&&!!h.heldCredits,onRetry:()=>void Z()}):null]})}export{Ai as Cart};
748
+ //# sourceMappingURL=Cart-8uayDrxo.js.map
@@ -1,4 +1,4 @@
1
- import{j as e,r as h,d as se,u as oe}from"./react-VV7ruaEe.js";import{d as b,s as u,i as re,I as ae,k as ie,c as r,a6 as H,M as F,bO as ne,bP as le,e as ce,c4 as de,D as ue,H as me,az as pe,Z as fe,a0 as W,a1 as he,bQ as xe,c5 as be}from"./index-DBONtw7H.js";import{E as ge}from"./ErrorNotice-BjKorbeP.js";import{d as ye,P as ve,C as je,a as E,b as we,S as Ce}from"./collectionPage.styles-CGv38BAV.js";import{u as ke}from"./useStore-BxEjYiKk.js";import{u as Se,S as G,R as $e,a as Ne,b as Ee,c as Ie,D as Fe,d as Me,C as Re,e as Te,F as _e,f as Pe,g as Ae,M as De,h as Le}from"./browseLayout.styles-BKjgHcP6.js";import{L as Be}from"./LoadMore-DE7YSrmA.js";import{u as ze}from"./useInfiniteGrid-CqEvXCvo.js";import{u as Oe,s as We}from"./search-empty-Xv_q1rjS.js";import{S as Ge}from"./categories-CBw6i6jK.js";import{G as Ue}from"./grid.styles-DLJDk6Da.js";import"./dcl-schemas-DwpPH57a.js";import"./sentry-o0F_Elyr.js";import"./ethers-1M1CfdDX.js";import"./intl-AKLEHPeO.js";import"./crumbs.styles-B_xC21o-.js";import"./skeleton.styles-V94rqky6.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new o.Error().stack;s&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[s]="08b54752-9169-4e47-bbdd-f4d93e1b27dc",o._sentryDebugIdIdentifier="sentry-dbid-08b54752-9169-4e47-bbdd-f4d93e1b27dc")}catch{}})();const He=u.section`
1
+ import{j as e,r as h,d as se,b as oe}from"./react-BaEtM5XJ.js";import{a as b,s as u,d as re,I as ae,k as ie,t as r,a8 as q,G as F,bP as ne,bQ as ce,c as le,c5 as de,x as ue,A as me,aA as pe,a0 as fe,a2 as G,a3 as he,bR as xe,c6 as be}from"./index-BG7qJ3Aa.js";import{E as ge}from"./ErrorNotice-DgLTEx75.js";import{d as ye,P as ve,C as je,a as E,b as we,S as Ce}from"./collectionPage.styles-brmBi9Tl.js";import{u as ke}from"./useStore-W0Q-z1uf.js";import{u as Se,S as W,R as $e,a as Ne,b as Ee,c as Ie,D as Fe,d as Me,C as Re,e as Ae,F as Te,f as _e,g as Pe,M as De,h as Le}from"./browseLayout.styles-DdpwxtcS.js";import{L as Be}from"./LoadMore-CAovcyRj.js";import{u as ze}from"./useInfiniteGrid-CV3Vck1D.js";import{u as Oe,s as Ge}from"./search-empty-CXnXGBuW.js";import{S as We}from"./categories-CVmtX9AQ.js";import{G as Ue}from"./grid.styles-Cw2pwIs-.js";import"./dcl-schemas-CmSCesR5.js";import"./sentry-CpILff32.js";import"./ethers-tJNwaRFg.js";import"./intl-AKLEHPeO.js";import"./crumbs.styles-CWDzzCAG.js";import"./skeleton.styles-ClyzppIO.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new o.Error().stack;s&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[s]="3ecdc6a2-89be-46ff-8cc9-0bb5d70c90e8",o._sentryDebugIdIdentifier="sentry-dbid-3ecdc6a2-89be-46ff-8cc9-0bb5d70c90e8")}catch{}})();const qe=u.section`
2
2
  position: relative;
3
3
  border-radius: ${b.radius.card};
4
4
  overflow: hidden;
@@ -11,7 +11,7 @@ import{j as e,r as h,d as se,u as oe}from"./react-VV7ruaEe.js";import{d as b,s a
11
11
  ${b.media.maxWidth("mobile")} {
12
12
  min-height: 140px;
13
13
  }
14
- `,qe=u.div`
14
+ `,He=u.div`
15
15
  position: absolute;
16
16
  inset: 0;
17
17
  z-index: 0;
@@ -24,7 +24,7 @@ import{j as e,r as h,d as se,u as oe}from"./react-VV7ruaEe.js";import{d as b,s a
24
24
  position: absolute;
25
25
  inset: 0;
26
26
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.55) 100%);
27
- `,Ze=u.h1`
27
+ `,Ve=u.h1`
28
28
  position: relative;
29
29
  z-index: 1;
30
30
  margin: 0;
@@ -42,7 +42,7 @@ import{j as e,r as h,d as se,u as oe}from"./react-VV7ruaEe.js";import{d as b,s a
42
42
  padding: 24px 16px;
43
43
  font-size: 26px;
44
44
  }
45
- `;function Ve({name:o,creator:s}){const{data:i}=ke(s),l=(i==null?void 0:i.cover)||ye;return e.jsxs(He,{"data-testid":"collection-hero","aria-label":o,children:[e.jsxs(qe,{children:[e.jsx(Ke,{src:l,alt:"",loading:"eager"}),e.jsx(Qe,{"aria-hidden":!0})]}),e.jsx(Ze,{"data-testid":"collection-hero-title",children:o})]})}const Je=1500;function Xe(o){const[s,i]=h.useState(!1),l=h.useRef();h.useEffect(()=>()=>window.clearTimeout(l.current),[]);const a=h.useCallback(async m=>{try{await navigator.clipboard.writeText(m),i(!0),window.clearTimeout(l.current),l.current=window.setTimeout(()=>i(!1),Je)}catch(d){re(d,{flow:o})}},[o]);return{copied:s,copy:a}}const{colors:I,radius:Ye}=b,et=ie`
45
+ `;function Ze({name:o,creator:s}){const{data:i}=ke(s),c=(i==null?void 0:i.cover)||ye;return e.jsxs(qe,{"data-testid":"collection-hero","aria-label":o,children:[e.jsxs(He,{children:[e.jsx(Ke,{src:c,alt:"",loading:"eager"}),e.jsx(Qe,{"aria-hidden":!0})]}),e.jsx(Ve,{"data-testid":"collection-hero-title",children:o})]})}const Je=1500;function Xe(o){const[s,i]=h.useState(!1),c=h.useRef();h.useEffect(()=>()=>window.clearTimeout(c.current),[]);const a=h.useCallback(async m=>{try{await navigator.clipboard.writeText(m),i(!0),window.clearTimeout(c.current),c.current=window.setTimeout(()=>i(!1),Je)}catch(d){re(d,{flow:o})}},[o]);return{copied:s,copy:a}}const{colors:I,radius:Ye}=b,et=ie`
46
46
  0% { transform: scale(0.6); opacity: 0; }
47
47
  60% { transform: scale(1.15); }
48
48
  100% { transform: scale(1); opacity: 1; }
@@ -77,7 +77,7 @@ import{j as e,r as h,d as se,u as oe}from"./react-VV7ruaEe.js";import{d as b,s a
77
77
  @media (prefers-reduced-motion: reduce) {
78
78
  animation: none;
79
79
  }
80
- `;function ot({value:o,children:s,label:i,flow:l="copy_to_clipboard",size:a=16,className:m,testId:d}){const{copied:n,copy:x}=Xe(l),f=n?r("common.copied"):i??r("common.copy");return e.jsxs(tt,{type:"button",onClick:()=>void x(o),title:f,"aria-label":f,"data-copied":n||void 0,className:m,"data-testid":d,children:[s,e.jsx(st,{name:n?"check":"copy",size:a},n?"ok":"idle")]})}const{colors:j,radius:rt}=b,at=u.div`
80
+ `;function ot({value:o,children:s,label:i,flow:c="copy_to_clipboard",size:a=16,className:m,testId:d}){const{copied:n,copy:x}=Xe(c),f=n?r("common.copied"):i??r("common.copy");return e.jsxs(tt,{type:"button",onClick:()=>void x(o),title:f,"aria-label":f,"data-copied":n||void 0,className:m,"data-testid":d,children:[s,e.jsx(st,{name:n?"check":"copy",size:a},n?"ok":"idle")]})}const{colors:j,radius:rt}=b,at=u.div`
81
81
  display: flex;
82
82
  flex-direction: column;
83
83
  align-items: center;
@@ -130,5 +130,5 @@ import{j as e,r as h,d as se,u as oe}from"./react-VV7ruaEe.js";import{d as b,s a
130
130
  &:hover {
131
131
  background: ${j.blackBtn};
132
132
  }
133
- `;function lt({address:o}){var d,n;const{data:s}=H(o);if(!o)return null;const i=(s==null?void 0:s.name)||F(o),l=(n=(d=s==null?void 0:s.avatar)==null?void 0:d.snapshots)==null?void 0:n.face256,a=`${ce.profileUrl}/${o}`,m=ne(le({name:s==null?void 0:s.name,hasClaimedName:s==null?void 0:s.hasClaimedName,ethAddress:(s==null?void 0:s.ethAddress)??o}));return e.jsxs(at,{"data-testid":"creator-card",children:[l?e.jsx(U,{src:l,alt:"",loading:"eager",style:{backgroundColor:m}}):e.jsx(U,{as:"span","aria-hidden":!0,style:{backgroundColor:m}}),e.jsx(it,{title:i,children:i}),e.jsx(ot,{value:o,label:r("collection.copyAddress"),flow:"copy_creator_address",testId:"creator-card-copy",children:e.jsx("span",{children:F(o)})}),e.jsx(nt,{"data-testid":"creator-card-view",href:a,target:"_blank",rel:"noopener noreferrer",children:r("collection.viewProfile")})]})}const ct=48,dt=["all","on_sale","not_for_sale"];function Et(){var O;const{contractAddress:o}=se(),s=oe(),i=h.useMemo(()=>({category:"all",status:"all",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[l,a]=Oe(i),{category:m,subCategory:d,rarities:n,priceMin:x,priceMax:f,smart:C,sort:M}=l,g=dt.includes(l.status)?l.status:"all",R=t=>a({status:t});Se(`${m}:${d??""}`);const[w,y]=h.useState(!1);h.useEffect(()=>{if(!w)return;const t=te=>{te.key==="Escape"&&y(!1)};document.addEventListener("keydown",t);const N=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",t),document.body.style.overflow=N}},[w]);const T=x&&!Number.isNaN(Number(x))?Number(x):void 0,_=f&&!Number.isNaN(Number(f))?Number(f):void 0,q=d?Ge[d]:void 0,K=(G.find(t=>t.key===M)??G[0]).server,P={contractAddress:o,category:m,rarities:n.length?n:void 0,wearableCategories:q,minPriceCredits:T,maxPriceCredits:_,isWearableSmart:C||void 0,isOnSale:g==="all"?void 0:g==="on_sale",sortBy:K},{items:Q,total:Z,isLoading:k,error:A,hasNextPage:V,isFetchingNextPage:D,isFetchNextPageError:J,fetchNextPage:X}=ze(["collection-page",P],t=>xe({...P,first:ct,skip:t}),{enabled:!!o}),S=de(Q),{data:c}=ue({queryKey:["collection-meta",o],queryFn:()=>be(o),enabled:!!o,staleTime:5*6e4}),L=(c==null?void 0:c.name)||r("collection.fallbackTitle");me({title:c==null?void 0:c.name,description:c!=null&&c.name?r("seo.collection.description",{name:c.name}):void 0});const p=(c==null?void 0:c.creator)||((O=S[0])==null?void 0:O.creator),{data:$}=H(p),Y=($==null?void 0:$.name)||(p?F(p):"");function ee(t){a({category:t,subCategory:null})}function B(t){a({rarities:n.includes(t)?n.filter(N=>N!==t):[...n,t]})}function z(){a(i)}const v=[];(T!=null||_!=null)&&v.push({key:"price",label:r("filter.price"),onRemove:()=>{a({priceMin:"",priceMax:""})}});for(const t of $e)n.includes(t)&&v.push({key:`rarity-${t}`,label:pe(t),onRemove:()=>B(t)});return C&&v.push({key:"smart",label:r("filter.smart"),onRemove:()=>a({smart:!1})}),g!=="all"&&v.push({key:"status",label:g==="on_sale"?r("filter.onSale"):r("filter.notForSale"),onRemove:()=>R("all")}),e.jsxs(ve,{"data-testid":"collection-page",children:[e.jsxs(je,{"aria-label":r("collection.breadcrumbAria"),children:[e.jsx(E,{onClick:()=>s("/items"),children:r("collection.breadcrumb")}),p?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"/"}),e.jsx(E,{onClick:()=>s(`/items/creator/${p}`),children:Y}),e.jsx("span",{children:"/"}),e.jsx(E,{onClick:()=>s(`/items/creator/${p}?collections`),children:r("categories.collections")})]}):null,e.jsx("span",{children:"/"}),e.jsx(we,{children:L})]}),e.jsx(Ve,{name:L,creator:p}),e.jsxs(Ne,{"data-testid":"browse",children:[w?e.jsx(Ee,{onClick:()=>y(!1),"aria-hidden":!0}):null,e.jsxs(Ce,{children:[e.jsx(lt,{address:p}),e.jsxs(Ie,{"data-open":w||void 0,"data-static":!0,"data-testid":"browse-sidebar",children:[e.jsxs(Fe,{children:[e.jsx(Me,{children:r("assets.filters")}),e.jsx(Re,{onClick:()=>y(!1),"aria-label":r("assets.closeFilters"),children:"✕"})]}),e.jsx(Te,{children:e.jsx(_e,{category:m,subCategory:d,onCategory:ee,onSub:t=>a({subCategory:t}),priceMin:x,priceMax:f,onPriceMin:t=>a({priceMin:t}),onPriceMax:t=>a({priceMax:t}),rarities:n,onToggleRarity:B,status:g,onStatus:R,smart:C,onSmart:t=>a({smart:t}),hideNames:!0})}),e.jsx(Pe,{children:e.jsx(Ae,{type:"button",onClick:()=>y(!1),children:r("assets.showItems")})})]})]}),e.jsxs(De,{children:[e.jsx(Le,{sort:M,onSort:t=>a({sort:t}),total:Z,loading:k,onOpenFilters:()=>y(!0),chips:v,onClearChips:z}),A?e.jsx(ge,{message:r("collection.error")}):null,!k&&!A&&S.length===0?e.jsx(fe,{testId:"collection-empty",icon:We,title:r("assets.empty.title"),body:r("collection.empty"),cta:{label:r("filterBar.clearAll"),onClick:z}}):e.jsxs(e.Fragment,{children:[e.jsx(Ue,{"data-testid":"grid",children:k?e.jsx(W,{count:15}):e.jsxs(e.Fragment,{children:[S.map(t=>e.jsx(he,{item:t},t.id)),D?e.jsx(W,{count:6}):null]})}),e.jsx(Be,{hasNextPage:V,isFetching:D,isError:J,onLoadMore:()=>void X()})]})]})]})]})}export{Et as Collection,Et as default};
134
- //# sourceMappingURL=Collection-DeDyoluW.js.map
133
+ `;function ct({address:o}){var d,n;const{data:s}=q(o);if(!o)return null;const i=(s==null?void 0:s.name)||F(o),c=(n=(d=s==null?void 0:s.avatar)==null?void 0:d.snapshots)==null?void 0:n.face256,a=`${le.profileUrl}/${o}`,m=ne(ce({name:s==null?void 0:s.name,hasClaimedName:s==null?void 0:s.hasClaimedName,ethAddress:(s==null?void 0:s.ethAddress)??o}));return e.jsxs(at,{"data-testid":"creator-card",children:[c?e.jsx(U,{src:c,alt:"",loading:"eager",style:{backgroundColor:m}}):e.jsx(U,{as:"span","aria-hidden":!0,style:{backgroundColor:m}}),e.jsx(it,{title:i,children:i}),e.jsx(ot,{value:o,label:r("collection.copyAddress"),flow:"copy_creator_address",testId:"creator-card-copy",children:e.jsx("span",{children:F(o)})}),e.jsx(nt,{"data-testid":"creator-card-view",href:a,target:"_blank",rel:"noopener noreferrer",children:r("collection.viewProfile")})]})}const lt=48,dt=["all","on_sale","not_for_sale"];function Et(){var O;const{contractAddress:o}=se(),s=oe(),i=h.useMemo(()=>({category:"all",status:"all",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[c,a]=Oe(i),{category:m,subCategory:d,rarities:n,priceMin:x,priceMax:f,smart:C,sort:M}=c,g=dt.includes(c.status)?c.status:"all",R=t=>a({status:t});Se(`${m}:${d??""}`);const[w,y]=h.useState(!1);h.useEffect(()=>{if(!w)return;const t=te=>{te.key==="Escape"&&y(!1)};document.addEventListener("keydown",t);const N=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",t),document.body.style.overflow=N}},[w]);const A=x&&!Number.isNaN(Number(x))?Number(x):void 0,T=f&&!Number.isNaN(Number(f))?Number(f):void 0,H=d?We[d]:void 0,K=(W.find(t=>t.key===M)??W[0]).server,_={contractAddress:o,category:m,rarities:n.length?n:void 0,wearableCategories:H,minPriceCredits:A,maxPriceCredits:T,isWearableSmart:C||void 0,isOnSale:g==="all"?void 0:g==="on_sale",sortBy:K},{items:Q,total:V,isLoading:k,error:P,hasNextPage:Z,isFetchingNextPage:D,isFetchNextPageError:J,fetchNextPage:X}=ze(["collection-page",_],t=>xe({..._,first:lt,skip:t}),{enabled:!!o}),S=de(Q),{data:l}=ue({queryKey:["collection-meta",o],queryFn:()=>be(o),enabled:!!o,staleTime:5*6e4}),L=(l==null?void 0:l.name)||r("collection.fallbackTitle");me({title:l==null?void 0:l.name,description:l!=null&&l.name?r("seo.collection.description",{name:l.name}):void 0});const p=(l==null?void 0:l.creator)||((O=S[0])==null?void 0:O.creator),{data:$}=q(p),Y=($==null?void 0:$.name)||(p?F(p):"");function ee(t){a({category:t,subCategory:null})}function B(t){a({rarities:n.includes(t)?n.filter(N=>N!==t):[...n,t]})}function z(){a(i)}const v=[];(A!=null||T!=null)&&v.push({key:"price",label:r("filter.price"),onRemove:()=>{a({priceMin:"",priceMax:""})}});for(const t of $e)n.includes(t)&&v.push({key:`rarity-${t}`,label:pe(t),onRemove:()=>B(t)});return C&&v.push({key:"smart",label:r("filter.smart"),onRemove:()=>a({smart:!1})}),g!=="all"&&v.push({key:"status",label:g==="on_sale"?r("filter.onSale"):r("filter.notForSale"),onRemove:()=>R("all")}),e.jsxs(ve,{"data-testid":"collection-page",children:[e.jsxs(je,{"aria-label":r("collection.breadcrumbAria"),children:[e.jsx(E,{onClick:()=>s("/items"),children:r("collection.breadcrumb")}),p?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"/"}),e.jsx(E,{onClick:()=>s(`/items/creator/${p}`),children:Y}),e.jsx("span",{children:"/"}),e.jsx(E,{onClick:()=>s(`/items/creator/${p}?collections`),children:r("categories.collections")})]}):null,e.jsx("span",{children:"/"}),e.jsx(we,{children:L})]}),e.jsx(Ze,{name:L,creator:p}),e.jsxs(Ne,{"data-testid":"browse",children:[w?e.jsx(Ee,{onClick:()=>y(!1),"aria-hidden":!0}):null,e.jsxs(Ce,{children:[e.jsx(ct,{address:p}),e.jsxs(Ie,{"data-open":w||void 0,"data-static":!0,"data-testid":"browse-sidebar",children:[e.jsxs(Fe,{children:[e.jsx(Me,{children:r("assets.filters")}),e.jsx(Re,{onClick:()=>y(!1),"aria-label":r("assets.closeFilters"),children:"✕"})]}),e.jsx(Ae,{children:e.jsx(Te,{category:m,subCategory:d,onCategory:ee,onSub:t=>a({subCategory:t}),priceMin:x,priceMax:f,onPriceMin:t=>a({priceMin:t}),onPriceMax:t=>a({priceMax:t}),rarities:n,onToggleRarity:B,status:g,onStatus:R,smart:C,onSmart:t=>a({smart:t}),hideNames:!0})}),e.jsx(_e,{children:e.jsx(Pe,{type:"button",onClick:()=>y(!1),children:r("assets.showItems")})})]})]}),e.jsxs(De,{children:[e.jsx(Le,{sort:M,onSort:t=>a({sort:t}),total:V,loading:k,onOpenFilters:()=>y(!0),chips:v,onClearChips:z}),P?e.jsx(ge,{message:r("collection.error")}):null,!k&&!P&&S.length===0?e.jsx(fe,{testId:"collection-empty",icon:Ge,title:r("assets.empty.title"),body:r("collection.empty"),cta:{label:r("filterBar.clearAll"),onClick:z}}):e.jsxs(e.Fragment,{children:[e.jsx(Ue,{"data-testid":"grid",children:k?e.jsx(G,{count:15}):e.jsxs(e.Fragment,{children:[S.map(t=>e.jsx(he,{item:t},t.id)),D?e.jsx(G,{count:6}):null]})}),e.jsx(Be,{hasNextPage:Z,isFetching:D,isError:J,onLoadMore:()=>void X()})]})]})]})]})}export{Et as Collection,Et as default};
134
+ //# sourceMappingURL=Collection-GfGftuMU.js.map
@@ -1,4 +1,4 @@
1
- import{r as C,j as r}from"./react-VV7ruaEe.js";import{s as ne,h as S,A as P,b as j,r as R,m as K,k as X,i as U}from"./authorizations-B83pvCo5.js";import{i as ie}from"./errors-CNu2839_.js";import{d as l,s as n,k as oe,c as k,I as Q,i as E,aK as re,bS as O,ci as se,v as A,w as M,aP as G,a3 as de,a4 as J,K as N,av as ce,cj as le,ck as H,a1 as he}from"./index-DBONtw7H.js";import{E as pe}from"./ErrorNotice-BjKorbeP.js";import{j as ue,k as ge,l as fe,m as xe,n as me,o as I,q as be,s as we}from"./buy-D7nFmJT8.js";import{a as ve,w as ye,S as ke,G as Ce}from"./buy-gasless-DNEVxdLb.js";import{M as B,E as F,s as Y}from"./sendMetaTransaction-ZH8zQFka.js";import{C as Z}from"./ethers-1M1CfdDX.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="e01e4217-4286-4b2f-a655-cdba77702db7",t._sentryDebugIdIdentifier="sentry-dbid-e01e4217-4286-4b2f-a655-cdba77702db7")}catch{}})();const $="shop:resume_after_signin",Ae=900*1e3;function gt(t){try{sessionStorage.setItem($,JSON.stringify({...t,at:Date.now()}))}catch{}}function ft(t){let e;try{e=sessionStorage.getItem($)}catch{return null}if(!e)return null;try{sessionStorage.removeItem($)}catch{}let a;try{a=JSON.parse(e)}catch{return null}return!a||a.type!==t||typeof a.at!="number"||Date.now()-a.at>Ae?null:a.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:a.path}}function xt(t,e){const a=(o,...u)=>void t.invalidateQueries({queryKey:e?[o,...u]:[o]});t.invalidateQueries({queryKey:["usd-balance"]}),t.invalidateQueries({queryKey:["detail-trade"]}),t.invalidateQueries({queryKey:["shop-item"]}),a("owned-token",e==null?void 0:e.contractAddress,e==null?void 0:e.tokenId),a("public-token",e==null?void 0:e.contractAddress,e==null?void 0:e.tokenId),a("item-resales",e==null?void 0:e.contractAddress,e==null?void 0:e.itemId),t.invalidateQueries({queryKey:["shop-items"]}),t.invalidateQueries({queryKey:["catalog-items"]}),t.invalidateQueries({queryKey:["overview-listings"]}),t.invalidateQueries({queryKey:["upsell-listings"]}),t.invalidateQueries({queryKey:["my-assets"]}),t.invalidateQueries({queryKey:["purchases"]}),t.invalidateQueries({queryKey:["owned-item-count"]})}const Me=oe`
1
+ import{r as C,j as r}from"./react-BaEtM5XJ.js";import{s as ne,h as S,A as N,b as j,r as R,m as X,k as U,i as K}from"./authorizations-mOwNJkid.js";import{i as ie}from"./errors-u0_epNfV.js";import{a as l,s as n,k as oe,t as k,I as Q,d as E,aL as re,bT as O,cj as se,l as A,n as M,aQ as G,a5 as de,a6 as J,E as P,aw as ce,ck as le,cl as H,a3 as he}from"./index-BG7qJ3Aa.js";import{E as pe}from"./ErrorNotice-DgLTEx75.js";import{j as ue,k as ge,l as fe,m as xe,n as me,o as I,q as be,s as we}from"./buy-DhVTrZNv.js";import{a as ve,w as ye,S as ke,G as Ce}from"./buy-gasless-CaOBmjwx.js";import{M as B,E as F,s as Y}from"./sendMetaTransaction-BIO5pykC.js";import{C as Z}from"./ethers-tJNwaRFg.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="0033a745-75e9-4155-a9f2-55be8e0beea0",t._sentryDebugIdIdentifier="sentry-dbid-0033a745-75e9-4155-a9f2-55be8e0beea0")}catch{}})();const $="shop:resume_after_signin",Ae=900*1e3;function gt(t){try{sessionStorage.setItem($,JSON.stringify({...t,at:Date.now()}))}catch{}}function ft(t){let e;try{e=sessionStorage.getItem($)}catch{return null}if(!e)return null;try{sessionStorage.removeItem($)}catch{}let a;try{a=JSON.parse(e)}catch{return null}return!a||a.type!==t||typeof a.at!="number"||Date.now()-a.at>Ae?null:a.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:a.path}}function xt(t,e){const a=(o,...u)=>void t.invalidateQueries({queryKey:e?[o,...u]:[o]});t.invalidateQueries({queryKey:["usd-balance"]}),t.invalidateQueries({queryKey:["detail-trade"]}),t.invalidateQueries({queryKey:["shop-item"]}),a("owned-token",e==null?void 0:e.contractAddress,e==null?void 0:e.tokenId),a("public-token",e==null?void 0:e.contractAddress,e==null?void 0:e.tokenId),a("item-resales",e==null?void 0:e.contractAddress,e==null?void 0:e.itemId),t.invalidateQueries({queryKey:["shop-items"]}),t.invalidateQueries({queryKey:["catalog-items"]}),t.invalidateQueries({queryKey:["overview-listings"]}),t.invalidateQueries({queryKey:["upsell-listings"]}),t.invalidateQueries({queryKey:["my-assets"]}),t.invalidateQueries({queryKey:["purchases"]}),t.invalidateQueries({queryKey:["owned-item-count"]})}const Me=oe`
2
2
  to { transform: rotate(360deg); }
3
3
  `,Te=n.div`
4
4
  position: fixed;
@@ -93,12 +93,12 @@ import{r as C,j as r}from"./react-VV7ruaEe.js";import{s as ne,h as S,A as P,b as
93
93
  width: 26px;
94
94
  height: 26px;
95
95
  }
96
- `,Pe=n.div`
96
+ `,Ne=n.div`
97
97
  min-width: 0;
98
98
  display: flex;
99
99
  flex-direction: column;
100
100
  gap: 4px;
101
- `,Ne=n.span`
101
+ `,Pe=n.span`
102
102
  font-weight: 700;
103
103
  color: ${l.colors.text};
104
104
  `,Be=n.span`
@@ -184,7 +184,7 @@ import{r as C,j as r}from"./react-VV7ruaEe.js";import{s as ne,h as S,A as P,b as
184
184
  @media (prefers-reduced-motion: reduce) {
185
185
  animation: none;
186
186
  }
187
- `;function mt({auth:t,signer:e,step:a,title:o,reason:u,name:c,image:m,icon:f,onAuthorized:x,onCancel:w,onClose:b}){const[p,g]=C.useState(!1),[s,y]=C.useState(null);async function h(){g(!0),y(null);try{await ne({auth:t,signer:e,active:!0}),x()}catch(d){ie(d)?y(k("authorizeStep.errorRejected")):(E(d,{flow:"authorize_step",kind:t.kind}),y(k("authorizeStep.errorGeneric"))),g(!1)}}return r.jsx(Te,{onClick:p?void 0:b,role:"presentation","data-testid":"authorize-step-scrim",children:r.jsxs(je,{onClick:d=>d.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":o,children:[r.jsxs(ze,{children:[r.jsx(We,{children:o}),a&&a.total>1?r.jsx(Ie,{"data-testid":"authorize-step-count",children:k("authorizeStep.stepOf",{index:a.index,total:a.total})}):null,r.jsx(Ee,{onClick:b,disabled:p,"aria-label":k("authorizeStep.close"),children:r.jsx(Q,{name:"close",className:"ico"})})]}),r.jsxs($e,{"data-testid":"authorize-step-row",children:[r.jsx(Se,{children:m?r.jsx("img",{src:m,alt:""}):f}),r.jsxs(Pe,{children:[r.jsx(Ne,{title:c,children:c}),r.jsx(Be,{children:u})]})]}),r.jsx(Fe,{children:k("authorizeStep.note")}),r.jsx(pe,{message:s}),r.jsxs(Ve,{children:[r.jsx(De,{type:"button",onClick:w,disabled:p,children:k("authorizeStep.cancel")}),r.jsx(qe,{type:"button","data-testid":"authorize-step-action",onClick:()=>void h(),disabled:p,children:p?r.jsxs(r.Fragment,{children:[r.jsx(Oe,{"aria-hidden":!0}),k("authorizeStep.authorizing")]}):k("authorizeStep.authorize")})]})]})})}const bt="data:image/webp;base64,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",wt="https://cdn.decentraland.org/@dcl/shop/1.13.1-35146304116.commit-0532a2b/_assets/buy-error-22UunaPC.png";function He(t,e){return(t+e-1n)/e}function Le(t,e,a){return t<=0||e<=0?0n:t>=e?a:He(a*BigInt(t),BigInt(e))}function vt(t){var b,p,g;const e=Number.isFinite(t.priceCents)?Math.max(0,Math.trunc(t.priceCents)):0,a=Number.isFinite(t.balanceCents)?Math.max(0,Math.trunc(t.balanceCents)):0,o=t.priceManaWei>0n?t.priceManaWei:0n,u=t.manaBalanceWei>0n?t.manaBalanceWei:0n;if(e<=0)return{options:[],preferred:null,manaShortfall:null};const c=[];a>=e&&c.push({method:"credits",creditsCents:e,credits:re(e),manaWei:0n});const m=O(a)*se;if(o>0n&&m>0&&m<e){const s=e-m,y=Le(s,e,o);u>=y&&c.push({method:"combined",creditsCents:m,credits:O(m),manaWei:y})}o>0n&&u>=o&&c.push({method:"mana",creditsCents:0,credits:0,manaWei:o});const f=((b=c.find(s=>s.method==="credits"))==null?void 0:b.method)??((p=c.find(s=>s.method==="combined"))==null?void 0:p.method)??((g=c.find(s=>s.method==="mana"))==null?void 0:g.method)??null,w=!c.some(s=>s.method==="mana"||s.method==="combined")&&o>0n&&u>0n?{manaWei:u,manaCents:Re(u,e,o),priceCents:e}:null;return{options:c,preferred:f,manaShortfall:w}}function Re(t,e,a){return Number(t*BigInt(e)/a)}function yt(t,e){let a=Number.isFinite(e)?Math.max(0,Math.trunc(e)):0;return t.map(o=>{const u=Number.isFinite(o)?Math.max(0,Math.trunc(o)):0,c=Math.min(u,a);return a-=c,c})}function kt(t,e){return t.options.find(a=>a.method===e)??null}async function Ct(t){const[e]=await _({...t,trades:[t.trade],coupons:t.coupon?{[t.trade.id]:t.coupon}:void 0});return e}async function At(t){const[e]=await _({...t,trades:[],mints:[t.mint]});return e}async function _(t){const{trades:e,coupons:a,mints:o=[],buyer:u,signer:c,onSigned:m,manaWei:f}=t;if(e.length===0&&o.length===0)throw new Error("No items to buy");const x=new Map;for(const p of e){const g=`${p.chainId}:${p.contract.toLowerCase()}:${a!=null&&a[p.id]?"coupon":"plain"}`,s=x.get(g);s?s.push(p):x.set(g,[p])}const w=new Map;for(const p of o){const g=w.get(p.chainId);g?g.push(p):w.set(p.chainId,[p])}const b=[];for(const p of x.values()){const g=a?p.map(s=>a[s.id]).filter(s=>s!=null):[];b.push(await Ke({trades:p,coupons:g.length?g:void 0,buyer:u,signer:c,onSigned:m,requiredManaWei:f}))}for(const[p,g]of w){const s=f??g.reduce((y,h)=>y+BigInt(h.item.priceWei),0n);b.push(await Xe({mints:g,chainId:p,buyer:u,signer:c,onSigned:m,requiredManaWei:s}))}return b}async function Ke(t){const{trades:e,coupons:a,buyer:o,signer:u,onSigned:c,requiredManaWei:m}=t,f=e[0],x=A(G(f.contract),f.chainId),w=A(M.MANAToken,f.chainId);await S({auth:{kind:P.Allowance,contractAddress:w.address,spenderAddress:x.address,chainId:f.chainId},signer:u,requiredWei:m});const b=e.map(h=>ge(h,o));if(a!=null&&a.length&&a.length!==e.length)throw new Error(`acceptWithCoupon needs one coupon per trade, got ${a.length} for ${e.length} trades`);const p=a!=null&&a.length?a.map((h,d)=>fe(h,e[d].sent.length)):void 0;if(j.enabled)try{const{selector:h,data:d}=p?xe(e,a??[],o,x.abi):me(e,o,x.abi),v=h+d.slice(2),T=R(),z=K(u.provider,T),q=await Y(z,T,v,x,{serverURL:j.relayerUrl});return c==null||c(),await X(q,"the MANA purchase"),q}catch(h){if(h instanceof B&&h.code===F.USER_DENIED||h instanceof U)throw h;E(h,{flow:"buy_mana",step:"gasless_fallback"})}await J(u.provider,f.chainId);const g=new Z(x.address,x.abi,u),s=p?await g.acceptWithCoupon(b,p,I(f.chainId)):await g.accept(b,I(f.chainId));return c==null||c(),(await s.wait()).transactionHash}async function Xe(t){const{mints:e,chainId:a,buyer:o,signer:u,onSigned:c,requiredManaWei:m}=t,f=A(M.CollectionStore,a),x=A(M.MANAToken,a),w=e.map(s=>s.item);if(await S({auth:{kind:P.Allowance,contractAddress:x.address,spenderAddress:f.address,chainId:a},signer:u,requiredWei:m}),j.enabled)try{const s=be(w,o,f.abi),y=R(),h=K(u.provider,y),d=await Y(h,y,s,f,{serverURL:j.relayerUrl});return c==null||c(),await X(d,"the MANA purchase"),d}catch(s){if(s instanceof B&&s.code===F.USER_DENIED||s instanceof U)throw s;E(s,{flow:"buy_mint_mana",step:"gasless_fallback"})}await J(u.provider,a);const p=await new Z(f.address,f.abi,u).buy(we(w,o),I(a));return c==null||c(),(await p.wait()).transactionHash}async function Mt(t){const{trade:e,coupon:a,...o}=t;return ee({target:{kind:"trade",trade:e,coupon:a},...o})}async function Tt(t){const{mint:e,...a}=t;return ee({target:{kind:"store",mint:e},...a})}async function ee(t){const{target:e,buyer:a,signer:o,credits:u,manaGapWei:c,providerType:m,onBroadcast:f,onReverted:x,onUnobservable:w}=t;if(u.length===0)throw new Error("No credits to spend — use the MANA-only rail for that");if(c<=0n)throw new Error("No MANA gap to cover — use the credits-only rail for that");const b=te(e),p=A(M.MANAToken,b),g=A(M.CreditsManager,b);await S({auth:{kind:P.Allowance,contractAddress:p.address,spenderAddress:g.address,chainId:b},signer:o,requiredWei:c});const y=(u.reduce((d,v)=>d+BigInt(v.availableAmount),0n)+c).toString(),h=Ue(e,u,y);if(j.enabled){let d;try{return d=await ve({purchase:h,buyer:a,signer:o}),f==null||f({txHash:d}),await ye(d),d}catch(v){if(v instanceof B&&v.code===F.USER_DENIED||v instanceof ke)throw v;if(!(v instanceof Ce))throw d&&(x==null||x({txHash:d})),v;if(v.reason==="relayer-unreachable")throw w==null||w(),v;if(!de(m))throw v;E(v,{flow:"buy_credits_and_mana",step:"gasless_fallback"})}}return ue({purchase:h,buyer:a,signer:o,onBroadcast:f,onReverted:x})}function te(t){return t.kind==="trade"?t.trade.chainId:t.mint.chainId}function Ue(t,e,a){return t.kind==="trade"?{kind:"trade",trade:t.trade,coupon:t.coupon,credits:e,maxCreditedValue:a}:{kind:"store",item:t.mint.item,chainId:t.mint.chainId,credits:e,maxCreditedValue:a}}function jt(t,e){const a=te(e);return t==="combined"?{spender:A(M.CreditsManager,a).address,chainId:a}:{spender:e.kind==="trade"?A(G(e.trade.contract),a).address:A(M.CollectionStore,a).address,chainId:a}}function zt(t){return r.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,...t,children:r.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})}function Wt(t){return r.jsx("svg",{viewBox:"0 0 20 20",width:"24",height:"24","aria-hidden":!0,...t,children:r.jsx("path",{fill:"#f48221",d:"M10 0a10 10 0 1 1 0 20 10 10 0 0 1 0-20Zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm0 11a1 1 0 1 1 0 2 1 1 0 0 1 0-2Zm0-8a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0V6a1 1 0 0 1 1-1Z"})})}const{colors:i,gradients:V,radius:ae,z:Qe}=l,Et=n.div`
187
+ `;function mt({auth:t,signer:e,step:a,title:o,reason:u,name:c,image:m,icon:f,onAuthorized:x,onCancel:w,onClose:b}){const[p,g]=C.useState(!1),[s,y]=C.useState(null);async function h(){g(!0),y(null);try{await ne({auth:t,signer:e,active:!0}),x()}catch(d){ie(d)?y(k("authorizeStep.errorRejected")):(E(d,{flow:"authorize_step",kind:t.kind}),y(k("authorizeStep.errorGeneric"))),g(!1)}}return r.jsx(Te,{onClick:p?void 0:b,role:"presentation","data-testid":"authorize-step-scrim",children:r.jsxs(je,{onClick:d=>d.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":o,children:[r.jsxs(ze,{children:[r.jsx(We,{children:o}),a&&a.total>1?r.jsx(Ie,{"data-testid":"authorize-step-count",children:k("authorizeStep.stepOf",{index:a.index,total:a.total})}):null,r.jsx(Ee,{onClick:b,disabled:p,"aria-label":k("authorizeStep.close"),children:r.jsx(Q,{name:"close",className:"ico"})})]}),r.jsxs($e,{"data-testid":"authorize-step-row",children:[r.jsx(Se,{children:m?r.jsx("img",{src:m,alt:""}):f}),r.jsxs(Ne,{children:[r.jsx(Pe,{title:c,children:c}),r.jsx(Be,{children:u})]})]}),r.jsx(Fe,{children:k("authorizeStep.note")}),r.jsx(pe,{message:s}),r.jsxs(Ve,{children:[r.jsx(De,{type:"button",onClick:w,disabled:p,children:k("authorizeStep.cancel")}),r.jsx(qe,{type:"button","data-testid":"authorize-step-action",onClick:()=>void h(),disabled:p,children:p?r.jsxs(r.Fragment,{children:[r.jsx(Oe,{"aria-hidden":!0}),k("authorizeStep.authorizing")]}):k("authorizeStep.authorize")})]})]})})}const bt="data:image/webp;base64,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",wt="https://cdn.decentraland.org/@dcl/shop/1.13.1-35147466824.commit-691c71e/_assets/buy-error-22UunaPC.png";function He(t,e){return(t+e-1n)/e}function Le(t,e,a){return t<=0||e<=0?0n:t>=e?a:He(a*BigInt(t),BigInt(e))}function vt(t){var b,p,g;const e=Number.isFinite(t.priceCents)?Math.max(0,Math.trunc(t.priceCents)):0,a=Number.isFinite(t.balanceCents)?Math.max(0,Math.trunc(t.balanceCents)):0,o=t.priceManaWei>0n?t.priceManaWei:0n,u=t.manaBalanceWei>0n?t.manaBalanceWei:0n;if(e<=0)return{options:[],preferred:null,manaShortfall:null};const c=[];a>=e&&c.push({method:"credits",creditsCents:e,credits:re(e),manaWei:0n});const m=O(a)*se;if(o>0n&&m>0&&m<e){const s=e-m,y=Le(s,e,o);u>=y&&c.push({method:"combined",creditsCents:m,credits:O(m),manaWei:y})}o>0n&&u>=o&&c.push({method:"mana",creditsCents:0,credits:0,manaWei:o});const f=((b=c.find(s=>s.method==="credits"))==null?void 0:b.method)??((p=c.find(s=>s.method==="combined"))==null?void 0:p.method)??((g=c.find(s=>s.method==="mana"))==null?void 0:g.method)??null,w=!c.some(s=>s.method==="mana"||s.method==="combined")&&o>0n&&u>0n?{manaWei:u,manaCents:Re(u,e,o),priceCents:e}:null;return{options:c,preferred:f,manaShortfall:w}}function Re(t,e,a){return Number(t*BigInt(e)/a)}function yt(t,e){let a=Number.isFinite(e)?Math.max(0,Math.trunc(e)):0;return t.map(o=>{const u=Number.isFinite(o)?Math.max(0,Math.trunc(o)):0,c=Math.min(u,a);return a-=c,c})}function kt(t,e){return t.options.find(a=>a.method===e)??null}async function Ct(t){const[e]=await _({...t,trades:[t.trade],coupons:t.coupon?{[t.trade.id]:t.coupon}:void 0});return e}async function At(t){const[e]=await _({...t,trades:[],mints:[t.mint]});return e}async function _(t){const{trades:e,coupons:a,mints:o=[],buyer:u,signer:c,onSigned:m,manaWei:f}=t;if(e.length===0&&o.length===0)throw new Error("No items to buy");const x=new Map;for(const p of e){const g=`${p.chainId}:${p.contract.toLowerCase()}:${a!=null&&a[p.id]?"coupon":"plain"}`,s=x.get(g);s?s.push(p):x.set(g,[p])}const w=new Map;for(const p of o){const g=w.get(p.chainId);g?g.push(p):w.set(p.chainId,[p])}const b=[];for(const p of x.values()){const g=a?p.map(s=>a[s.id]).filter(s=>s!=null):[];b.push(await Xe({trades:p,coupons:g.length?g:void 0,buyer:u,signer:c,onSigned:m,requiredManaWei:f}))}for(const[p,g]of w){const s=f??g.reduce((y,h)=>y+BigInt(h.item.priceWei),0n);b.push(await Ue({mints:g,chainId:p,buyer:u,signer:c,onSigned:m,requiredManaWei:s}))}return b}async function Xe(t){const{trades:e,coupons:a,buyer:o,signer:u,onSigned:c,requiredManaWei:m}=t,f=e[0],x=A(G(f.contract),f.chainId),w=A(M.MANAToken,f.chainId);await S({auth:{kind:N.Allowance,contractAddress:w.address,spenderAddress:x.address,chainId:f.chainId},signer:u,requiredWei:m});const b=e.map(h=>ge(h,o));if(a!=null&&a.length&&a.length!==e.length)throw new Error(`acceptWithCoupon needs one coupon per trade, got ${a.length} for ${e.length} trades`);const p=a!=null&&a.length?a.map((h,d)=>fe(h,e[d].sent.length)):void 0;if(j.enabled)try{const{selector:h,data:d}=p?xe(e,a??[],o,x.abi):me(e,o,x.abi),v=h+d.slice(2),T=R(),z=X(u.provider,T),q=await Y(z,T,v,x,{serverURL:j.relayerUrl});return c==null||c(),await U(q,"the MANA purchase"),q}catch(h){if(h instanceof B&&h.code===F.USER_DENIED||h instanceof K)throw h;E(h,{flow:"buy_mana",step:"gasless_fallback"})}await J(u.provider,f.chainId);const g=new Z(x.address,x.abi,u),s=p?await g.acceptWithCoupon(b,p,I(f.chainId)):await g.accept(b,I(f.chainId));return c==null||c(),(await s.wait()).transactionHash}async function Ue(t){const{mints:e,chainId:a,buyer:o,signer:u,onSigned:c,requiredManaWei:m}=t,f=A(M.CollectionStore,a),x=A(M.MANAToken,a),w=e.map(s=>s.item);if(await S({auth:{kind:N.Allowance,contractAddress:x.address,spenderAddress:f.address,chainId:a},signer:u,requiredWei:m}),j.enabled)try{const s=be(w,o,f.abi),y=R(),h=X(u.provider,y),d=await Y(h,y,s,f,{serverURL:j.relayerUrl});return c==null||c(),await U(d,"the MANA purchase"),d}catch(s){if(s instanceof B&&s.code===F.USER_DENIED||s instanceof K)throw s;E(s,{flow:"buy_mint_mana",step:"gasless_fallback"})}await J(u.provider,a);const p=await new Z(f.address,f.abi,u).buy(we(w,o),I(a));return c==null||c(),(await p.wait()).transactionHash}async function Mt(t){const{trade:e,coupon:a,...o}=t;return ee({target:{kind:"trade",trade:e,coupon:a},...o})}async function Tt(t){const{mint:e,...a}=t;return ee({target:{kind:"store",mint:e},...a})}async function ee(t){const{target:e,buyer:a,signer:o,credits:u,manaGapWei:c,providerType:m,onBroadcast:f,onReverted:x,onUnobservable:w}=t;if(u.length===0)throw new Error("No credits to spend — use the MANA-only rail for that");if(c<=0n)throw new Error("No MANA gap to cover — use the credits-only rail for that");const b=te(e),p=A(M.MANAToken,b),g=A(M.CreditsManager,b);await S({auth:{kind:N.Allowance,contractAddress:p.address,spenderAddress:g.address,chainId:b},signer:o,requiredWei:c});const y=(u.reduce((d,v)=>d+BigInt(v.availableAmount),0n)+c).toString(),h=Ke(e,u,y);if(j.enabled){let d;try{return d=await ve({purchase:h,buyer:a,signer:o}),f==null||f({txHash:d}),await ye(d),d}catch(v){if(v instanceof B&&v.code===F.USER_DENIED||v instanceof ke)throw v;if(!(v instanceof Ce))throw d&&(x==null||x({txHash:d})),v;if(v.reason==="relayer-unreachable")throw w==null||w(),v;if(!de(m))throw v;E(v,{flow:"buy_credits_and_mana",step:"gasless_fallback"})}}return ue({purchase:h,buyer:a,signer:o,onBroadcast:f,onReverted:x})}function te(t){return t.kind==="trade"?t.trade.chainId:t.mint.chainId}function Ke(t,e,a){return t.kind==="trade"?{kind:"trade",trade:t.trade,coupon:t.coupon,credits:e,maxCreditedValue:a}:{kind:"store",item:t.mint.item,chainId:t.mint.chainId,credits:e,maxCreditedValue:a}}function jt(t,e){const a=te(e);return t==="combined"?{spender:A(M.CreditsManager,a).address,chainId:a}:{spender:e.kind==="trade"?A(G(e.trade.contract),a).address:A(M.CollectionStore,a).address,chainId:a}}function zt(t){return r.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,...t,children:r.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})}function Wt(t){return r.jsx("svg",{viewBox:"0 0 20 20",width:"24",height:"24","aria-hidden":!0,...t,children:r.jsx("path",{fill:"#f48221",d:"M10 0a10 10 0 1 1 0 20 10 10 0 0 1 0-20Zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm0 11a1 1 0 1 1 0 2 1 1 0 0 1 0-2Zm0-8a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0V6a1 1 0 0 1 1-1Z"})})}const{colors:i,gradients:V,radius:ae,z:Qe}=l,Et=n.div`
188
188
  position: fixed;
189
189
  inset: 0;
190
190
  z-index: ${Qe.overlay};
@@ -231,12 +231,12 @@ import{r as C,j as r}from"./react-VV7ruaEe.js";import{s as ne,h as S,A as P,b as
231
231
  gap: 4px;
232
232
  padding-bottom: 16px;
233
233
  border-bottom: 1px solid ${i.gray4};
234
- `,Pt=n.div`
234
+ `,Nt=n.div`
235
235
  display: flex;
236
236
  align-items: flex-start;
237
237
  justify-content: space-between;
238
238
  gap: 8px;
239
- `,Nt=n.h2`
239
+ `,Pt=n.h2`
240
240
  margin: 0;
241
241
  font-size: 20px;
242
242
  font-weight: 700;
@@ -257,7 +257,7 @@ import{r as C,j as r}from"./react-VV7ruaEe.js";import{s as ne,h as S,A as P,b as
257
257
  font-size: 14px;
258
258
  font-weight: 600;
259
259
  color: ${i.muted1};
260
- `,Dt=n(N)`
260
+ `,Dt=n(P)`
261
261
  width: 14px;
262
262
  height: 14px;
263
263
  background: ${i.text};
@@ -319,7 +319,7 @@ import{r as C,j as r}from"./react-VV7ruaEe.js";import{s as ne,h as S,A as P,b as
319
319
  flex-direction: column;
320
320
  justify-content: center;
321
321
  gap: 4px;
322
- `,Kt=n.div`
322
+ `,Xt=n.div`
323
323
  font-size: 18px;
324
324
  font-weight: 700;
325
325
  line-height: 1.3;
@@ -330,7 +330,7 @@ import{r as C,j as r}from"./react-VV7ruaEe.js";import{s as ne,h as S,A as P,b as
330
330
  ${l.media.maxWidth("mobile")} {
331
331
  font-size: 16px;
332
332
  }
333
- `,Xt=n(ce)`
333
+ `,Ut=n(ce)`
334
334
  font-size: 12px;
335
335
  line-height: 1.43;
336
336
  color: ${i.muted};
@@ -338,7 +338,7 @@ import{r as C,j as r}from"./react-VV7ruaEe.js";import{s as ne,h as S,A as P,b as
338
338
  ${l.media.maxWidth("mobile")} {
339
339
  font-size: 10px;
340
340
  }
341
- `,Ut=n.div`
341
+ `,Kt=n.div`
342
342
  display: flex;
343
343
  align-items: center;
344
344
  gap: 6px;
@@ -355,7 +355,7 @@ import{r as C,j as r}from"./react-VV7ruaEe.js";import{s as ne,h as S,A as P,b as
355
355
  font-size: 20px;
356
356
  }
357
357
  }
358
- `,Qt=n(N)`
358
+ `,Qt=n(P)`
359
359
  width: 18px;
360
360
  height: 18px;
361
361
  background: ${i.text2};
@@ -489,7 +489,7 @@ import{r as C,j as r}from"./react-VV7ruaEe.js";import{s as ne,h as S,A as P,b as
489
489
  font-size: 24px;
490
490
  font-weight: 700;
491
491
  color: ${i.text};
492
- `,oa=n(N)`
492
+ `,oa=n(P)`
493
493
  width: 30px;
494
494
  height: 30px;
495
495
  background: ${i.text};
@@ -847,5 +847,5 @@ import{r as C,j as r}from"./react-VV7ruaEe.js";import{s as ne,h as S,A as P,b as
847
847
  opacity: 1;
848
848
  transform: scale(1.1);
849
849
  }
850
- `;function ba({title:t,items:e,onViewAll:a}){const o=C.useRef(null),[u,c]=C.useState(1),[m,f]=C.useState(0),[x,w]=C.useState(!0),[b,p]=C.useState(!1),g=C.useCallback(()=>{const h=o.current;if(!h)return;const{scrollLeft:d,scrollWidth:v,clientWidth:T}=h,z=Math.max(1,Math.ceil(v/T));c(z),f(Math.min(z-1,Math.round(d/T))),w(d<=1),p(d+T>=v-1)},[]);if(C.useEffect(()=>{g();const h=o.current;if(h)return h.addEventListener("scroll",g,{passive:!0}),window.addEventListener("resize",g),()=>{h.removeEventListener("scroll",g),window.removeEventListener("resize",g)}},[g,e.length]),e.length===0)return null;function s(h){const d=o.current;d&&d.scrollBy({left:h*d.clientWidth,behavior:"smooth"})}function y(h){const d=o.current;d&&d.scrollTo({left:h*d.clientWidth,behavior:"smooth"})}return r.jsxs(Je,{"data-testid":"carousel",children:[r.jsxs(Ye,{children:[r.jsx(Ze,{children:t}),a?r.jsxs(_e,{onClick:a,children:[k("collectionCarousel.viewAll"),r.jsx(et,{name:"chevron-down",size:16})]}):null]}),r.jsxs(tt,{children:[r.jsx(L,{"data-side":"left",onClick:()=>s(-1),"aria-label":k("collectionCarousel.scrollLeft"),disabled:x,children:r.jsx("img",{src:H,alt:"","aria-hidden":!0})}),r.jsx(at,{ref:o,children:e.map(h=>r.jsx(he,{item:h},h.id))}),r.jsx(L,{"data-side":"right",onClick:()=>s(1),"aria-label":k("collectionCarousel.scrollRight"),disabled:b,children:r.jsx("img",{src:H,alt:"","aria-hidden":!0})})]}),u>1?r.jsx(nt,{"aria-label":k("collectionCarousel.pages"),children:Array.from({length:u}).map((h,d)=>r.jsx(it,{"data-active":d===m||void 0,"aria-label":k("collectionCarousel.goToPage",{page:d+1}),"aria-current":d===m?"true":void 0,onClick:()=>y(d)},d))}):null]})}export{Le as $,Ht as A,Ft as B,$t as C,bt as D,ta as E,aa as F,na as G,St as H,ia as I,oa as J,ra as K,ca as L,Et as M,vt as N,ft as O,ua as P,ba as Q,mt as R,It as S,Nt as T,gt as U,xt as V,Gt as W,Bt as X,jt as Y,_ as Z,yt as _,Pt as a,Ue as a0,te as a1,xa as a2,ma as a3,da as a4,kt as a5,Ct as a6,At as a7,Mt as a8,Tt as a9,zt as b,Vt as c,Dt as d,qt as e,Ot as f,la as g,ha as h,wt as i,pa as j,sa as k,Ge as l,ga as m,fa as n,Wt as o,Jt as p,Yt as q,Lt as r,Rt as s,Kt as t,Xt as u,Ut as v,Qt as w,Zt as x,_t as y,ea as z};
851
- //# sourceMappingURL=CollectionCarousel-DM2JN-Og.js.map
850
+ `;function ba({title:t,items:e,onViewAll:a}){const o=C.useRef(null),[u,c]=C.useState(1),[m,f]=C.useState(0),[x,w]=C.useState(!0),[b,p]=C.useState(!1),g=C.useCallback(()=>{const h=o.current;if(!h)return;const{scrollLeft:d,scrollWidth:v,clientWidth:T}=h,z=Math.max(1,Math.ceil(v/T));c(z),f(Math.min(z-1,Math.round(d/T))),w(d<=1),p(d+T>=v-1)},[]);if(C.useEffect(()=>{g();const h=o.current;if(h)return h.addEventListener("scroll",g,{passive:!0}),window.addEventListener("resize",g),()=>{h.removeEventListener("scroll",g),window.removeEventListener("resize",g)}},[g,e.length]),e.length===0)return null;function s(h){const d=o.current;d&&d.scrollBy({left:h*d.clientWidth,behavior:"smooth"})}function y(h){const d=o.current;d&&d.scrollTo({left:h*d.clientWidth,behavior:"smooth"})}return r.jsxs(Je,{"data-testid":"carousel",children:[r.jsxs(Ye,{children:[r.jsx(Ze,{children:t}),a?r.jsxs(_e,{onClick:a,children:[k("collectionCarousel.viewAll"),r.jsx(et,{name:"chevron-down",size:16})]}):null]}),r.jsxs(tt,{children:[r.jsx(L,{"data-side":"left",onClick:()=>s(-1),"aria-label":k("collectionCarousel.scrollLeft"),disabled:x,children:r.jsx("img",{src:H,alt:"","aria-hidden":!0})}),r.jsx(at,{ref:o,children:e.map(h=>r.jsx(he,{item:h},h.id))}),r.jsx(L,{"data-side":"right",onClick:()=>s(1),"aria-label":k("collectionCarousel.scrollRight"),disabled:b,children:r.jsx("img",{src:H,alt:"","aria-hidden":!0})})]}),u>1?r.jsx(nt,{"aria-label":k("collectionCarousel.pages"),children:Array.from({length:u}).map((h,d)=>r.jsx(it,{"data-active":d===m||void 0,"aria-label":k("collectionCarousel.goToPage",{page:d+1}),"aria-current":d===m?"true":void 0,onClick:()=>y(d)},d))}):null]})}export{Le as $,Ht as A,Ft as B,$t as C,bt as D,ta as E,aa as F,na as G,St as H,ia as I,oa as J,ra as K,ca as L,Et as M,vt as N,ft as O,ua as P,ba as Q,mt as R,It as S,Pt as T,gt as U,xt as V,Gt as W,Bt as X,jt as Y,_ as Z,yt as _,Nt as a,Ke as a0,te as a1,xa as a2,ma as a3,da as a4,kt as a5,Ct as a6,At as a7,Mt as a8,Tt as a9,zt as b,Vt as c,Dt as d,qt as e,Ot as f,la as g,ha as h,wt as i,pa as j,sa as k,Ge as l,ga as m,fa as n,Wt as o,Jt as p,Yt as q,Lt as r,Rt as s,Xt as t,Ut as u,Kt as v,Qt as w,Zt as x,_t as y,ea as z};
851
+ //# sourceMappingURL=CollectionCarousel-CrO5pEgo.js.map
@@ -0,0 +1,18 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index.es-D7qMhur5.js","_assets/react-BaEtM5XJ.js"])))=>i.map(i=>d[i]);
2
+ import{s,_ as a}from"./index-BG7qJ3Aa.js";import{r as n,j as i}from"./react-BaEtM5XJ.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="590f1af6-a149-444b-a999-9434b62cd3dc",t._sentryDebugIdIdentifier="sentry-dbid-590f1af6-a149-444b-a999-9434b62cd3dc")}catch{}})();const o=s.div`
3
+ position: fixed;
4
+ inset: 0;
5
+ /**
6
+ * NEGATIVE, and that is the whole trick.
7
+ *
8
+ * This layer renders INSIDE Success's Root, so it shares that stacking context with the card: a positive or
9
+ * zero z-index paints it above every in-flow sibling no matter what the parent's own z-index is, which is
10
+ * why raising Root did nothing. Only a negative value puts a positioned child behind its parent's content.
11
+ *
12
+ * The parent must then form a stacking context (Root sets position/z-index), or -1 would escape past it and
13
+ * hide behind the page background instead.
14
+ */
15
+ z-index: -1;
16
+ pointer-events: none;
17
+ `,r=n.lazy(async()=>{const[{default:t},{default:e}]=await Promise.all([a(()=>import("./index.es-D7qMhur5.js"),__vite__mapDeps([0,1])),a(()=>import("./confettiAnimation-Btd6HRFo.js"),[])]);return{default:()=>i.jsx(t,{animationData:e,loop:1})}});function u(){const[t]=n.useState(()=>{var e;return!((e=window.matchMedia)!=null&&e.call(window,"(prefers-reduced-motion: reduce)").matches)});return t?i.jsx(o,{"aria-hidden":!0,"data-testid":"confetti",children:i.jsx(n.Suspense,{fallback:null,children:i.jsx(r,{})})}):null}export{u as C};
18
+ //# sourceMappingURL=Confetti-D8VQEKfB.js.map
@@ -1,2 +1,2 @@
1
- import{p as o}from"./sentry-o0F_Elyr.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="212e6b2b-00bf-4961-b68b-1d32c6f901a6",e._sentryDebugIdIdentifier="sentry-dbid-212e6b2b-00bf-4961-b68b-1d32c6f901a6")}catch{}})();var n={};const r={ACCOUNT_TABS:[{label:"Tokens"},{label:"Activity"}],SECURE_SITE_ORIGIN:(typeof o<"u"&&typeof n<"u"?n.NEXT_PUBLIC_SECURE_SITE_ORIGIN:void 0)||"https://secure.walletconnect.org",VIEW_DIRECTION:{Next:"next",Prev:"prev"},ANIMATION_DURATIONS:{HeaderText:120},VIEWS_WITH_LEGAL_FOOTER:["Connect","ConnectWallets","OnRampTokenSelect","OnRampFiatSelect","OnRampProviders"],VIEWS_WITH_DEFAULT_FOOTER:["Networks"]};export{r as C};
2
- //# sourceMappingURL=ConstantsUtil-CzAq2JlG.js.map
1
+ import{p as o}from"./sentry-CpILff32.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="212e6b2b-00bf-4961-b68b-1d32c6f901a6",e._sentryDebugIdIdentifier="sentry-dbid-212e6b2b-00bf-4961-b68b-1d32c6f901a6")}catch{}})();var n={};const r={ACCOUNT_TABS:[{label:"Tokens"},{label:"Activity"}],SECURE_SITE_ORIGIN:(typeof o<"u"&&typeof n<"u"?n.NEXT_PUBLIC_SECURE_SITE_ORIGIN:void 0)||"https://secure.walletconnect.org",VIEW_DIRECTION:{Next:"next",Prev:"prev"},ANIMATION_DURATIONS:{HeaderText:120},VIEWS_WITH_LEGAL_FOOTER:["Connect","ConnectWallets","OnRampTokenSelect","OnRampFiatSelect","OnRampProviders"],VIEWS_WITH_DEFAULT_FOOTER:["Networks"]};export{r as C};
2
+ //# sourceMappingURL=ConstantsUtil-BQvpBpQu.js.map
@@ -1,2 +1,2 @@
1
- import{g as z}from"./react-VV7ruaEe.js";import{r as W}from"./index-BBshwWxl.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new s.Error().stack;d&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[d]="ff71893d-ab65-4572-9315-e8a4195440a4",s._sentryDebugIdIdentifier="sentry-dbid-ff71893d-ab65-4572-9315-e8a4195440a4")}catch{}})();function Y(s,d){for(var F=0;F<d.length;F++){const P=d[F];if(typeof P!="string"&&!Array.isArray(P)){for(const f in P)if(f!=="default"&&!(f in s)){const m=Object.getOwnPropertyDescriptor(P,f);m&&Object.defineProperty(s,f,m.get?m:{enumerable:!0,get:()=>P[f]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}var O={},L={},D={},U={},I;function G(){if(I)return U;I=1,Object.defineProperty(U,"__esModule",{value:!0}),U.createFetchComponent=P;const s=new Set([400,401,403,404]),d=new Set(["GET","HEAD","OPTIONS","PUT","DELETE"]);async function F(f,m,y){var $;const{timeout:g,retryDelay:h,abortController:S}=y,q=S.signal;let M=y.attempts,w,_;do{w=void 0,_=void 0;let b=null;try{g&&(b=setTimeout(()=>S.abort(),g)),--M,w=await fetch(f,m)}catch(n){_=n}finally{b&&clearTimeout(b)}if(w&&(w.ok||s.has(w.status))||q.aborted||M===0)break;w&&await(($=w.body)==null?void 0:$.cancel().catch(()=>{})),await new Promise(n=>setTimeout(n,h))}while(!0);if(q.aborted)throw new Error("Request aborted (timed out)");if(!w)throw _;return w}function P(f){const m=f==null?void 0:f.defaultHeaders;async function y(g,h){const{timeout:S,method:q="GET",retryDelay:M=0,abortController:w,attempts:_,...$}={...f==null?void 0:f.defaultFetcherOptions,...h},b=w||new AbortController,n=d.has(q.toUpperCase())?_??1:1,e={...$,method:q,signal:b.signal};return m&&(e.headers={...m,...$.headers||{}}),F(g,e,{timeout:S,retryDelay:M,attempts:n,abortController:b})}return{fetch:y}}return U}var H;function X(){return H||(H=1,(function(s){Object.defineProperty(s,"__esModule",{value:!0}),s.createFetchComponent=void 0;var d=G();Object.defineProperty(s,"createFetchComponent",{enumerable:!0,get:function(){return d.createFetchComponent}})})(D)),D}const J="0.0.0-development",K={version:J};var Q;function Z(){return Q||(Q=1,(function(s){Object.defineProperty(s,"__esModule",{value:!0}),s.QueryBuilder=s.sanitizeUrl=s.mergeRequestOptions=s.convertFiltersToQueryParams=s.splitValuesIntoManyQueries=s.splitValuesIntoManyQueryBuilders=s.splitAndFetchPaginated=s.splitAndFetch=s.MAX_URL_LENGTH=s.addModelToFormData=s.getCurrentVersion=void 0;const d=X(),F=K;function P(){return F.version}s.getCurrentVersion=P;function f(n,e,i=""){for(const r in n){if(!n.hasOwnProperty(r)||n[r]===null||n[r]===void 0)continue;const t=i?`${i}[${r}]`:r;n[r]instanceof Date?e.append(t,n[r].toISOString()):n[r]instanceof Array?n[r].forEach((a,o)=>{const c=`${t}[${o}]`;f(a,e,c)}):typeof n[r]=="object"?f(n[r],e,t):e.append(t,n[r].toString())}return e}s.addModelToFormData=f;function m(n){return Array.from(new Set(n))}s.MAX_URL_LENGTH=2048;async function y({baseUrl:n,path:e,queryParams:i,fetcher:r,uniqueBy:t,options:a}){r=r||(0,d.createFetchComponent)();const o=q({baseUrl:n,path:e,queryParams:i}),c=new Map;for(const u of o)(await(await r.fetch(u,{...a,headers:{"Content-Type":"application/json"}})).json()).forEach(E=>c.set(t?E[t]:c.size,E));return Array.from(c.values())}s.splitAndFetch=y;const g=7;async function h({baseUrl:n,path:e,queryParams:i,elementsProperty:r,uniqueBy:t,options:a,fetcher:o}){o=o||(0,d.createFetchComponent)();const u=q({baseUrl:n,path:e,queryParams:i,reservedParams:new Map([["offset",g]])}),C=new Map;let E=!1;for(let v=0;v<u.length&&!E;v++){let l=u[v];for(;l&&!E;)try{const p=(await o.fetch(l,a)).json();p[r].forEach(j=>C.set(j[t],j));const T=p.pagination.next;l=T?new URL(T,l).toString():void 0}catch{E=!0}}return Array.from(C.values())}s.splitAndFetchPaginated=h;function S({queryParams:n,baseUrl:e,path:i,reservedParams:r}){const t="name"in n?new Map([[n.name,n.values]]):n;if(t.size===0)return[new b(e+i,t,r)];const o=Array.from(t.entries()).map(([l,p])=>[l,m(p)]).sort(([l,p],[A,T])=>p.length-T.length),c=new b(e+i,new Map,r);for(let l=0;l<o.length-1;l++){const[p,A]=o[l];if(!c.canSetParams(p,A))throw new Error("This library can split one query param into many HTTP requests, but it can't split more than one. You will need to do that on the client side.");c.setParams(p,A)}let u=b.clone(c);const[C,E]=o[o.length-1],v=[];for(const l of E)u.canAddParam(C,l)||(v.push(u),u=b.clone(c)),u.addParam(C,l);return v.push(u),v}s.splitValuesIntoManyQueryBuilders=S;function q(n){return S(n).map(i=>i.toString())}s.splitValuesIntoManyQueries=q;function M(n){if(!n)return new Map;const e=Object.entries(n).filter(([i,r])=>!!r).map(([i,r])=>{const t=i.endsWith("s")?i.slice(0,-1):i;let a;if(Array.isArray(r))a=[...r].filter(_).map(o=>`${o}`);else if(_(r))a=[`${r}`];else throw new Error("Query params must be either a string, a number, a boolean or an array of the types just mentioned");return[t,a]}).filter(([i,r])=>r.length>0);return new Map(e)}s.convertFiltersToQueryParams=M;function w(n,e){const i={...n==null?void 0:n.headers,...e==null?void 0:e.headers};return{...n,...e,headers:i}}s.mergeRequestOptions=w;function _(n){return typeof n=="string"||typeof n=="number"||typeof n=="boolean"}function $(n){return n=n.trim(),!n.startsWith("https://")&&!n.startsWith("http://")&&(n="https://"+n),n.endsWith("/")&&(n=n.slice(0,-1)),n}s.sanitizeUrl=$;class b{constructor(e,i=new Map,r=new Map){this.baseUrl=e,this.queryParams=i,this.reservedParams=r,this.length=this.calculateUrlLength(i,r)}canAddParam(e,i){return this.length+e.length+i.length+2<s.MAX_URL_LENGTH}addParam(e,i){if(!this.canAddParam(e,i))throw new Error(`You can't add this parameter '${e}', since it would exceed the max url length`);const r=this.queryParams.get(e),t=r||[];return t.push(i),this.queryParams.set(e,t),this.length+=this.calculateAddedLength(e,[i]),this}canSetParams(e,i){const r=new Map([...this.queryParams,[e,i]]);return this.calculateUrlLength(r,this.reservedParams)<s.MAX_URL_LENGTH}setParams(e,i){if(!this.canSetParams(e,i))throw new Error(`You can't add this parameter '${e}', since it would exceed the max url length`);return this.queryParams.set(e,i.map(r=>`${r}`)),this.length=this.calculateUrlLength(this.queryParams,this.reservedParams),this}setParam(e,i){return this.setParams(e,[i]),this}toString(){let e=this.baseUrl,i=!1;for(const[r,t]of this.queryParams)for(const a of t)i?e+=`&${r}=${a}`:(e+=`?${r}=${a}`,i=!0);return e}calculateUrlLength(e,i){let r=this.baseUrl.length;for(const[t,a]of i)this.queryParams.has(t)||(r+=t.length+2+a);for(const[t,a]of e)r+=this.calculateAddedLength(t,a);return r}static clone(e){return new b(e.baseUrl,new Map(e.queryParams),e.reservedParams)}calculateAddedLength(e,i){return this.calculateArrayLength(i)+(e.length+2)*i.length}calculateArrayLength(e){return e.map(i=>`${i}`).reduce((i,r)=>i+r.length,0)}}s.QueryBuilder=b})(L)),L}var R={},V;function x(){if(V)return R;V=1,Object.defineProperty(R,"__esModule",{value:!0}),R.retry=void 0;async function s(d,F,P,f){for(;P>0;)try{return await F()}catch(m){if(P--,P>0)console.info(`Failed to ${d}. Still have ${P} attempt/s left. Will try again in ${f}`),await new Promise(y=>setTimeout(y,f));else throw m}throw new Error("Please specify more than one attempt for the retry function")}return R.retry=s,R}var N;function ee(){if(N)return O;N=1,Object.defineProperty(O,"__esModule",{value:!0}),O.createContentClient=O.downloadContent=void 0;const s=W(),d=Z(),F=x();async function P(m,y,g,h){const{attempts:S=3,retryDelay:q=500}=h||{},M=h!=null&&h.timeout?{timeout:h.timeout}:{};return(0,F.retry)(`fetch file with hash ${g} from ${y}`,async()=>{const w=await m.fetch(`${y}/${g}`,M),_=new Uint8Array(await w.arrayBuffer());if(!(h!=null&&h.avoidChecks)&&(g.startsWith("Qm")?await(0,s.hashV0)(_):await(0,s.hashV1)(_))!==g)throw new Error(`Failed to fetch file with hash ${g} from ${y}`);return _},S,q)}O.downloadContent=P;function f(m){const{fetcher:y,logger:g}=m,h=(0,d.sanitizeUrl)(m.url),S=m==null?void 0:m.parallelConfig;async function q(t,a,o){const c=new AbortController,u=c.signal,C=(0,d.mergeRequestOptions)(o,{signal:u});return new Promise(async E=>{let v=t.length;const l=()=>{v--,v===0&&E([])},p=A=>A&&Array.isArray(A)&&A.length>0?(c.abort(),E(A),!0):!1;t.forEach(async A=>{try{const T=(0,d.sanitizeUrl)(A),j=await y.fetch(`${T}${a}`,C);if(u.aborted){l();return}const B=await j.json();p(B)||l()}catch(T){u.aborted||g==null||g.warn(`Failed to fetch from ${A}:`,T),l()}})})}async function M(t,a,o){const u=(await Promise.allSettled(t.map(async l=>{try{const p=(0,d.sanitizeUrl)(l);return await(await y.fetch(`${p}${a}`,o)).json()}catch(p){return g==null||g.warn(`Failed to fetch from ${l}:`,p),[]}}))).filter(l=>l.status==="fulfilled").map(l=>l.value||[]),C=u.flatMap(l=>l),E=u.filter(l=>l.length===0).length,v=new Map;return C.forEach(l=>{(!v.has(l.id)||l.timestamp>v.get(l.id).timestamp)&&v.set(l.id,l)}),{entities:Array.from(v.values()),emptyResults:E}}async function w(t,a){const o=new FormData;o.append("entityId",t.entityId),(0,d.addModelToFormData)(t.authChain,o,"authChain");const c=await i(Array.from(t.files.keys()),a);for(const[u,C]of t.files)(!c.has(u)||u===t.entityId)&&o.append(u,new Blob([C]),u);return o}async function _(t,a){const o=await w(t,a),c=(0,d.mergeRequestOptions)(a||{},{body:o,method:"POST"});return await y.fetch(`${h}/entities`,c)}async function $(t,a){if(t.length===0)return Promise.reject("You must set at least one pointer.");const o=(0,d.mergeRequestOptions)(a||{},{body:JSON.stringify({pointers:t}),method:"POST",headers:{"Content-Type":"application/json"}});return(await y.fetch(`${h}/entities/active`,o)).json()}async function b(t,a){if(t.length===0)return Promise.reject("You must set at least one id.");const o=(0,d.mergeRequestOptions)(a||{},{body:JSON.stringify({ids:t}),method:"POST",headers:{"Content-Type":"application/json"}}),c=(a==null?void 0:a.parallel)||S;return c!=null&&c.urls&&(c==null?void 0:c.urls.length)>0?q([h,...c.urls],"/entities/active",o):(await y.fetch(`${h}/entities/active`,o)).json()}async function n(t,a){const o=await b([t],a);return o.length===0?Promise.reject(`Failed to find an entity with id '${t}'.`):o[0]}function e(t,a){return t.length===0?Promise.reject("You must set at least one cid."):(0,d.splitAndFetch)({fetcher:y,options:a,baseUrl:h,path:"/available-content",queryParams:{name:"cid",values:t},uniqueBy:"cid"})}async function i(t,a){const c=(await e(t,a)).filter(u=>u.available).map(({cid:u})=>u);return new Set(c)}async function r(t,a){const o=(a==null?void 0:a.parallel)||S;if(!(o!=null&&o.urls)||o.urls.length===0)throw new Error("Parallel configuration is required for checking pointer consistency");const c=(0,d.mergeRequestOptions)(a||{},{body:JSON.stringify({pointers:[t]}),method:"POST",headers:{"Content-Type":"application/json"}}),u=[h,...o.urls],{entities:C,emptyResults:E}=await M(u,"/entities/active",c);if(C.length===0)return{isConsistent:!0,upToDateEntities:void 0,outdatedEntities:void 0};const v=Math.max(...C.map(T=>T.timestamp)),l=C.filter(T=>T.timestamp===v),p=C.filter(T=>T.timestamp<v);return{isConsistent:p.length===0&&E===0,upToDateEntities:l.length>0?l:void 0,outdatedEntities:p.length>0?p:void 0}}return{buildEntityFormDataForDeployment:w,fetchEntitiesByPointers:$,fetchEntitiesByIds:b,fetchEntityById:n,downloadContent:(t,a)=>P(y,h+"/contents",t,a),deploy:_,isContentAvailable:e,checkPointerConsistency:r}}return O.createContentClient=f,O}var k=ee();const te=z(k),ae=Y({__proto__:null,default:te},[k]);export{ae as C};
2
- //# sourceMappingURL=ContentClient-CwohpHEJ.js.map
1
+ import{g as z}from"./react-BaEtM5XJ.js";import{r as W}from"./index-C_yfqMNU.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new s.Error().stack;d&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[d]="5c7e8e77-ca22-479e-a409-899db371af9e",s._sentryDebugIdIdentifier="sentry-dbid-5c7e8e77-ca22-479e-a409-899db371af9e")}catch{}})();function Y(s,d){for(var F=0;F<d.length;F++){const P=d[F];if(typeof P!="string"&&!Array.isArray(P)){for(const f in P)if(f!=="default"&&!(f in s)){const m=Object.getOwnPropertyDescriptor(P,f);m&&Object.defineProperty(s,f,m.get?m:{enumerable:!0,get:()=>P[f]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}var O={},L={},D={},U={},I;function G(){if(I)return U;I=1,Object.defineProperty(U,"__esModule",{value:!0}),U.createFetchComponent=P;const s=new Set([400,401,403,404]),d=new Set(["GET","HEAD","OPTIONS","PUT","DELETE"]);async function F(f,m,y){var $;const{timeout:g,retryDelay:h,abortController:S}=y,q=S.signal;let M=y.attempts,w,_;do{w=void 0,_=void 0;let b=null;try{g&&(b=setTimeout(()=>S.abort(),g)),--M,w=await fetch(f,m)}catch(n){_=n}finally{b&&clearTimeout(b)}if(w&&(w.ok||s.has(w.status))||q.aborted||M===0)break;w&&await(($=w.body)==null?void 0:$.cancel().catch(()=>{})),await new Promise(n=>setTimeout(n,h))}while(!0);if(q.aborted)throw new Error("Request aborted (timed out)");if(!w)throw _;return w}function P(f){const m=f==null?void 0:f.defaultHeaders;async function y(g,h){const{timeout:S,method:q="GET",retryDelay:M=0,abortController:w,attempts:_,...$}={...f==null?void 0:f.defaultFetcherOptions,...h},b=w||new AbortController,n=d.has(q.toUpperCase())?_??1:1,e={...$,method:q,signal:b.signal};return m&&(e.headers={...m,...$.headers||{}}),F(g,e,{timeout:S,retryDelay:M,attempts:n,abortController:b})}return{fetch:y}}return U}var H;function X(){return H||(H=1,(function(s){Object.defineProperty(s,"__esModule",{value:!0}),s.createFetchComponent=void 0;var d=G();Object.defineProperty(s,"createFetchComponent",{enumerable:!0,get:function(){return d.createFetchComponent}})})(D)),D}const J="0.0.0-development",K={version:J};var Q;function Z(){return Q||(Q=1,(function(s){Object.defineProperty(s,"__esModule",{value:!0}),s.QueryBuilder=s.sanitizeUrl=s.mergeRequestOptions=s.convertFiltersToQueryParams=s.splitValuesIntoManyQueries=s.splitValuesIntoManyQueryBuilders=s.splitAndFetchPaginated=s.splitAndFetch=s.MAX_URL_LENGTH=s.addModelToFormData=s.getCurrentVersion=void 0;const d=X(),F=K;function P(){return F.version}s.getCurrentVersion=P;function f(n,e,i=""){for(const r in n){if(!n.hasOwnProperty(r)||n[r]===null||n[r]===void 0)continue;const t=i?`${i}[${r}]`:r;n[r]instanceof Date?e.append(t,n[r].toISOString()):n[r]instanceof Array?n[r].forEach((a,o)=>{const c=`${t}[${o}]`;f(a,e,c)}):typeof n[r]=="object"?f(n[r],e,t):e.append(t,n[r].toString())}return e}s.addModelToFormData=f;function m(n){return Array.from(new Set(n))}s.MAX_URL_LENGTH=2048;async function y({baseUrl:n,path:e,queryParams:i,fetcher:r,uniqueBy:t,options:a}){r=r||(0,d.createFetchComponent)();const o=q({baseUrl:n,path:e,queryParams:i}),c=new Map;for(const u of o)(await(await r.fetch(u,{...a,headers:{"Content-Type":"application/json"}})).json()).forEach(E=>c.set(t?E[t]:c.size,E));return Array.from(c.values())}s.splitAndFetch=y;const g=7;async function h({baseUrl:n,path:e,queryParams:i,elementsProperty:r,uniqueBy:t,options:a,fetcher:o}){o=o||(0,d.createFetchComponent)();const u=q({baseUrl:n,path:e,queryParams:i,reservedParams:new Map([["offset",g]])}),C=new Map;let E=!1;for(let v=0;v<u.length&&!E;v++){let l=u[v];for(;l&&!E;)try{const p=(await o.fetch(l,a)).json();p[r].forEach(j=>C.set(j[t],j));const T=p.pagination.next;l=T?new URL(T,l).toString():void 0}catch{E=!0}}return Array.from(C.values())}s.splitAndFetchPaginated=h;function S({queryParams:n,baseUrl:e,path:i,reservedParams:r}){const t="name"in n?new Map([[n.name,n.values]]):n;if(t.size===0)return[new b(e+i,t,r)];const o=Array.from(t.entries()).map(([l,p])=>[l,m(p)]).sort(([l,p],[A,T])=>p.length-T.length),c=new b(e+i,new Map,r);for(let l=0;l<o.length-1;l++){const[p,A]=o[l];if(!c.canSetParams(p,A))throw new Error("This library can split one query param into many HTTP requests, but it can't split more than one. You will need to do that on the client side.");c.setParams(p,A)}let u=b.clone(c);const[C,E]=o[o.length-1],v=[];for(const l of E)u.canAddParam(C,l)||(v.push(u),u=b.clone(c)),u.addParam(C,l);return v.push(u),v}s.splitValuesIntoManyQueryBuilders=S;function q(n){return S(n).map(i=>i.toString())}s.splitValuesIntoManyQueries=q;function M(n){if(!n)return new Map;const e=Object.entries(n).filter(([i,r])=>!!r).map(([i,r])=>{const t=i.endsWith("s")?i.slice(0,-1):i;let a;if(Array.isArray(r))a=[...r].filter(_).map(o=>`${o}`);else if(_(r))a=[`${r}`];else throw new Error("Query params must be either a string, a number, a boolean or an array of the types just mentioned");return[t,a]}).filter(([i,r])=>r.length>0);return new Map(e)}s.convertFiltersToQueryParams=M;function w(n,e){const i={...n==null?void 0:n.headers,...e==null?void 0:e.headers};return{...n,...e,headers:i}}s.mergeRequestOptions=w;function _(n){return typeof n=="string"||typeof n=="number"||typeof n=="boolean"}function $(n){return n=n.trim(),!n.startsWith("https://")&&!n.startsWith("http://")&&(n="https://"+n),n.endsWith("/")&&(n=n.slice(0,-1)),n}s.sanitizeUrl=$;class b{constructor(e,i=new Map,r=new Map){this.baseUrl=e,this.queryParams=i,this.reservedParams=r,this.length=this.calculateUrlLength(i,r)}canAddParam(e,i){return this.length+e.length+i.length+2<s.MAX_URL_LENGTH}addParam(e,i){if(!this.canAddParam(e,i))throw new Error(`You can't add this parameter '${e}', since it would exceed the max url length`);const r=this.queryParams.get(e),t=r||[];return t.push(i),this.queryParams.set(e,t),this.length+=this.calculateAddedLength(e,[i]),this}canSetParams(e,i){const r=new Map([...this.queryParams,[e,i]]);return this.calculateUrlLength(r,this.reservedParams)<s.MAX_URL_LENGTH}setParams(e,i){if(!this.canSetParams(e,i))throw new Error(`You can't add this parameter '${e}', since it would exceed the max url length`);return this.queryParams.set(e,i.map(r=>`${r}`)),this.length=this.calculateUrlLength(this.queryParams,this.reservedParams),this}setParam(e,i){return this.setParams(e,[i]),this}toString(){let e=this.baseUrl,i=!1;for(const[r,t]of this.queryParams)for(const a of t)i?e+=`&${r}=${a}`:(e+=`?${r}=${a}`,i=!0);return e}calculateUrlLength(e,i){let r=this.baseUrl.length;for(const[t,a]of i)this.queryParams.has(t)||(r+=t.length+2+a);for(const[t,a]of e)r+=this.calculateAddedLength(t,a);return r}static clone(e){return new b(e.baseUrl,new Map(e.queryParams),e.reservedParams)}calculateAddedLength(e,i){return this.calculateArrayLength(i)+(e.length+2)*i.length}calculateArrayLength(e){return e.map(i=>`${i}`).reduce((i,r)=>i+r.length,0)}}s.QueryBuilder=b})(L)),L}var R={},V;function x(){if(V)return R;V=1,Object.defineProperty(R,"__esModule",{value:!0}),R.retry=void 0;async function s(d,F,P,f){for(;P>0;)try{return await F()}catch(m){if(P--,P>0)console.info(`Failed to ${d}. Still have ${P} attempt/s left. Will try again in ${f}`),await new Promise(y=>setTimeout(y,f));else throw m}throw new Error("Please specify more than one attempt for the retry function")}return R.retry=s,R}var N;function ee(){if(N)return O;N=1,Object.defineProperty(O,"__esModule",{value:!0}),O.createContentClient=O.downloadContent=void 0;const s=W(),d=Z(),F=x();async function P(m,y,g,h){const{attempts:S=3,retryDelay:q=500}=h||{},M=h!=null&&h.timeout?{timeout:h.timeout}:{};return(0,F.retry)(`fetch file with hash ${g} from ${y}`,async()=>{const w=await m.fetch(`${y}/${g}`,M),_=new Uint8Array(await w.arrayBuffer());if(!(h!=null&&h.avoidChecks)&&(g.startsWith("Qm")?await(0,s.hashV0)(_):await(0,s.hashV1)(_))!==g)throw new Error(`Failed to fetch file with hash ${g} from ${y}`);return _},S,q)}O.downloadContent=P;function f(m){const{fetcher:y,logger:g}=m,h=(0,d.sanitizeUrl)(m.url),S=m==null?void 0:m.parallelConfig;async function q(t,a,o){const c=new AbortController,u=c.signal,C=(0,d.mergeRequestOptions)(o,{signal:u});return new Promise(async E=>{let v=t.length;const l=()=>{v--,v===0&&E([])},p=A=>A&&Array.isArray(A)&&A.length>0?(c.abort(),E(A),!0):!1;t.forEach(async A=>{try{const T=(0,d.sanitizeUrl)(A),j=await y.fetch(`${T}${a}`,C);if(u.aborted){l();return}const B=await j.json();p(B)||l()}catch(T){u.aborted||g==null||g.warn(`Failed to fetch from ${A}:`,T),l()}})})}async function M(t,a,o){const u=(await Promise.allSettled(t.map(async l=>{try{const p=(0,d.sanitizeUrl)(l);return await(await y.fetch(`${p}${a}`,o)).json()}catch(p){return g==null||g.warn(`Failed to fetch from ${l}:`,p),[]}}))).filter(l=>l.status==="fulfilled").map(l=>l.value||[]),C=u.flatMap(l=>l),E=u.filter(l=>l.length===0).length,v=new Map;return C.forEach(l=>{(!v.has(l.id)||l.timestamp>v.get(l.id).timestamp)&&v.set(l.id,l)}),{entities:Array.from(v.values()),emptyResults:E}}async function w(t,a){const o=new FormData;o.append("entityId",t.entityId),(0,d.addModelToFormData)(t.authChain,o,"authChain");const c=await i(Array.from(t.files.keys()),a);for(const[u,C]of t.files)(!c.has(u)||u===t.entityId)&&o.append(u,new Blob([C]),u);return o}async function _(t,a){const o=await w(t,a),c=(0,d.mergeRequestOptions)(a||{},{body:o,method:"POST"});return await y.fetch(`${h}/entities`,c)}async function $(t,a){if(t.length===0)return Promise.reject("You must set at least one pointer.");const o=(0,d.mergeRequestOptions)(a||{},{body:JSON.stringify({pointers:t}),method:"POST",headers:{"Content-Type":"application/json"}});return(await y.fetch(`${h}/entities/active`,o)).json()}async function b(t,a){if(t.length===0)return Promise.reject("You must set at least one id.");const o=(0,d.mergeRequestOptions)(a||{},{body:JSON.stringify({ids:t}),method:"POST",headers:{"Content-Type":"application/json"}}),c=(a==null?void 0:a.parallel)||S;return c!=null&&c.urls&&(c==null?void 0:c.urls.length)>0?q([h,...c.urls],"/entities/active",o):(await y.fetch(`${h}/entities/active`,o)).json()}async function n(t,a){const o=await b([t],a);return o.length===0?Promise.reject(`Failed to find an entity with id '${t}'.`):o[0]}function e(t,a){return t.length===0?Promise.reject("You must set at least one cid."):(0,d.splitAndFetch)({fetcher:y,options:a,baseUrl:h,path:"/available-content",queryParams:{name:"cid",values:t},uniqueBy:"cid"})}async function i(t,a){const c=(await e(t,a)).filter(u=>u.available).map(({cid:u})=>u);return new Set(c)}async function r(t,a){const o=(a==null?void 0:a.parallel)||S;if(!(o!=null&&o.urls)||o.urls.length===0)throw new Error("Parallel configuration is required for checking pointer consistency");const c=(0,d.mergeRequestOptions)(a||{},{body:JSON.stringify({pointers:[t]}),method:"POST",headers:{"Content-Type":"application/json"}}),u=[h,...o.urls],{entities:C,emptyResults:E}=await M(u,"/entities/active",c);if(C.length===0)return{isConsistent:!0,upToDateEntities:void 0,outdatedEntities:void 0};const v=Math.max(...C.map(T=>T.timestamp)),l=C.filter(T=>T.timestamp===v),p=C.filter(T=>T.timestamp<v);return{isConsistent:p.length===0&&E===0,upToDateEntities:l.length>0?l:void 0,outdatedEntities:p.length>0?p:void 0}}return{buildEntityFormDataForDeployment:w,fetchEntitiesByPointers:$,fetchEntitiesByIds:b,fetchEntityById:n,downloadContent:(t,a)=>P(y,h+"/contents",t,a),deploy:_,isContentAvailable:e,checkPointerConsistency:r}}return O.createContentClient=f,O}var k=ee();const te=z(k),ae=Y({__proto__:null,default:te},[k]);export{ae as C};
2
+ //# sourceMappingURL=ContentClient-HMgCjCsc.js.map