@dcl/shop 1.11.2-33050849044.commit-d710ef0 → 1.11.2

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 (228) hide show
  1. package/_assets/{Activity-Cb8UPooR.js → Activity-BhrsqnTy.js} +8 -8
  2. package/_assets/{AnimatedBackground-DTrZDJA8.js → AnimatedBackground-DB2urHfN.js} +2 -2
  3. package/_assets/{Assets-BeMy0zBm.js → Assets-CEOKXfHN.js} +3 -3
  4. package/_assets/{Authorizations-DncizvNg.js → Authorizations-zY_jkrdd.js} +2 -2
  5. package/_assets/{Cart-DT8eTjju.js → Cart-CD3QMZMU.js} +2 -2
  6. package/_assets/{Collection-DCZ3YJU4.js → Collection-fLHFUGHo.js} +2 -2
  7. package/_assets/{CollectionCarousel-0tR5Mlt1.js → CollectionCarousel-Cs01J4sG.js} +3 -3
  8. package/_assets/{Confetti-ViY_Tl_x.js → Confetti-DI93CkCr.js} +4 -4
  9. package/_assets/{ConstantsUtil-CPnBLCKC.js → ConstantsUtil-9orAwS_V.js} +2 -2
  10. package/_assets/{ContentClient-BkKFRXIG.js → ContentClient-Dr4IkAbb.js} +2 -2
  11. package/_assets/{Creator-eDokOdG6.js → Creator-DGT3lqoW.js} +2 -2
  12. package/_assets/{DeploymentBuilder-sKGEh439.js → DeploymentBuilder-BsQ4GIy9.js} +2 -2
  13. package/_assets/{EmotePlaybackBar-Dhz63yAz.js → EmotePlaybackBar-WqjOzm12.js} +3 -3
  14. package/_assets/{ErrorNotice-CSHOj_36.js → ErrorNotice-BanVYx_o.js} +2 -2
  15. package/_assets/{ExchangeController-CsKQzi2K.js → ExchangeController-BWLF9BXM.js} +2 -2
  16. package/_assets/{Faq-DDRZibDb.js → Faq-Dt8RPaHZ.js} +2 -2
  17. package/_assets/{GetCredits-CpP-OsF7.js → GetCredits-BtM_F2J_.js} +2 -2
  18. package/_assets/{Grow-DCgFqXHz.js → Grow-DqnkmJ7j.js} +2 -2
  19. package/_assets/{HelpersUtil-iJ1yh8Qr.js → HelpersUtil-BtPtcaFe.js} +2 -2
  20. package/_assets/{ItemDetail-DwAqmdIu.js → ItemDetail-C28UgJKw.js} +2 -2
  21. package/_assets/{LoadMore-BwZO73du.js → LoadMore-hoiSVN2H.js} +2 -2
  22. package/_assets/{ManaPricingBanner.styles-DGJbiC1Z.js → ManaPricingBanner.styles-rIYX7xjf.js} +2 -2
  23. package/_assets/{MyAssets-hcKLnv5g.js → MyAssets-BtAcjcuT.js} +2 -2
  24. package/_assets/{MyFavorites-Bp6GPtXE.js → MyFavorites-C3BVkIkn.js} +2 -2
  25. package/_assets/{NetworkUtil-DbL_V1jR.js → NetworkUtil-BIUbrPWa.js} +2 -2
  26. package/_assets/{NotFound-CTb_1gzv.js → NotFound-BgmQ5oFS.js} +2 -2
  27. package/_assets/{NotificationsBell--siTbfxL.js → NotificationsBell-Bjpu5hGT.js} +2 -2
  28. package/_assets/{OutfitDetail-pb_IcBaj.js → OutfitDetail-CIeX74fk.js} +2 -2
  29. package/_assets/{OutfitPreview-CSV0Ba-9.js → OutfitPreview-Clicok_x.js} +2 -2
  30. package/_assets/{OutfitStudio-CtmMGesj.js → OutfitStudio-DLStaax_.js} +2 -2
  31. package/_assets/{StoreSettings-8ag4TiMf.js → StoreSettings-DwoVLG99.js} +2 -2
  32. package/_assets/{Success-CYW7s5SU.js → Success-BKkeu6d7.js} +2 -2
  33. package/_assets/{SwapController-uLupOCWo.js → SwapController-Cnrhnusk.js} +2 -2
  34. package/_assets/{TradeService-CRFzT-Hr.js → TradeService-BgsoZh0O.js} +2 -2
  35. package/_assets/{W3MFrameProviderSingleton-Cb17Fn7X.js → W3MFrameProviderSingleton-DqaMm2mV.js} +4 -4
  36. package/_assets/{WebCryptoP256-CgN7P_px.js → WebCryptoP256-R5qc29Sl.js} +2 -2
  37. package/_assets/{authorizations-ChjDHhq0.js → authorizations-DC168PVR.js} +2 -2
  38. package/_assets/{basic-DJQVI2W6.js → basic-CcMC-Noe.js} +2 -2
  39. package/_assets/{biconomy-ZY5p1Lnz.js → biconomy-MuBR1fCG.js} +2 -2
  40. package/_assets/{browseLayout.styles-BGMKaxNl.js → browseLayout.styles-C_vn8XYJ.js} +2 -2
  41. package/_assets/{browser-DrZivzFf.js → browser-CTTbQgwQ.js} +2 -2
  42. package/_assets/{browser-ponyfill-BNOW_pBr.js → browser-ponyfill-2MY_3eYQ.js} +2 -2
  43. package/_assets/{builder-BfRqFJQ4.js → builder-CpxipFmE.js} +2 -2
  44. package/_assets/{buy-Cmc6VGNE.js → buy-C9vFcpIy.js} +2 -2
  45. package/_assets/{buy-gasless-SuVAuIoA.js → buy-gasless-Co1yjKqt.js} +2 -2
  46. package/_assets/{categories-CcQWbCI7.js → categories-DSulO5YB.js} +2 -2
  47. package/_assets/{ccip-DwiL0Ome.js → ccip-BGKWaLZd.js} +2 -2
  48. package/_assets/{ccip-DwRl-KxC.js → ccip-CIGFVe9f.js} +2 -2
  49. package/_assets/{chains-DsUWcPpA.js → chains-B_96BGTk.js} +2 -2
  50. package/_assets/collectionPage.styles-DUDsxvQH.js +40 -0
  51. package/_assets/{common-CraL5c5H.js → common-nayH6Qb7.js} +2 -2
  52. package/_assets/{controller-BuSjdOVC.js → controller-BoM50IGk.js} +3 -3
  53. package/_assets/{core-C68iFRG-.js → core-C6U0AzoB.js} +5 -5
  54. package/_assets/{createSvgIcon-CGmCpEG5.js → createSvgIcon-DLtjIgIX.js} +2 -2
  55. package/_assets/{custom-4GcYKxl5.js → custom-BDzyroM1.js} +2 -2
  56. package/_assets/{data-capture-Cyiav8vl.js → data-capture-Zb8-AfOh.js} +2 -2
  57. package/_assets/{dcl-schemas-Z_oWg9h9.js → dcl-schemas-OH8G4Ndl.js} +2 -2
  58. package/_assets/{decimals-Bq-S3aqE.js → decimals-DwmaOPpT.js} +2 -2
  59. package/_assets/{decimals-CArBdPn5.js → decimals-gxw11IoF.js} +2 -2
  60. package/_assets/{detectExtension-Dt_yYPg7.js → detectExtension-GZk2y11b.js} +2 -2
  61. package/_assets/{disposePreview-D4xN-rbE.js → disposePreview-CoU0o2LJ.js} +2 -2
  62. package/_assets/{email-CZ4jC6eQ.js → email-Bs2nQCjl.js} +2 -2
  63. package/_assets/{embedded-wallet-DZADS08N.js → embedded-wallet-DaMZY5wt.js} +2 -2
  64. package/_assets/{emotion-styled.browser.esm-beWfTrJ9.js → emotion-styled.browser.esm-pl53fr_X.js} +2 -2
  65. package/_assets/{engine-BSXxNgo0.js → engine-_-Y9EygX.js} +2 -2
  66. package/_assets/{errors-BOK5UzVJ.js → errors-ISVrHVty.js} +2 -2
  67. package/_assets/{estimate-l1-fee-GVxA6iNo.js → estimate-l1-fee-C2MojaUq.js} +2 -2
  68. package/_assets/{eth_estimateGas-etehgmZh.js → eth_estimateGas-ByaJEeM-.js} +2 -2
  69. package/_assets/{eth_getStorageAt-CbdzG1l_.js → eth_getStorageAt-CfRtAGD-.js} +2 -2
  70. package/_assets/{eth_getTransactionCount-B5PZdzoN.js → eth_getTransactionCount-DCx1pf2k.js} +2 -2
  71. package/_assets/{ethereum-CS-n5Xr7.js → ethereum-BgVZC6F_.js} +2 -2
  72. package/_assets/{ethers-Cpz0Q6xx.js → ethers-DwK2TdL6.js} +2 -2
  73. package/_assets/{events-DACjjuYo.js → events-CSIN-_05.js} +2 -2
  74. package/_assets/{execute-D9BdF3-v.js → execute-wmZZdldV.js} +3 -3
  75. package/_assets/{extractIPFS-nIeATqsF.js → extractIPFS-BS6I288E.js} +2 -2
  76. package/_assets/{features-C_LEXfeO.js → features-DimRp-1s.js} +2 -2
  77. package/_assets/{fetchTokenMetadata-0K65OHg2.js → fetchTokenMetadata-DZy_tSZt.js} +3 -3
  78. package/_assets/{field.styles-Cc8geV5i.js → field.styles-6_NAJBdz.js} +2 -2
  79. package/_assets/{fortmatic-BQvAbAE8.js → fortmatic-D-iEWKOV.js} +2 -2
  80. package/_assets/{get-bytecode-CUOf1h_g.js → get-bytecode-We_Yud0L.js} +2 -2
  81. package/_assets/{get-ecosystem-wallet-info-CRF2DpN6.js → get-ecosystem-wallet-info-CZ2Y-cLY.js} +2 -2
  82. package/_assets/{getBalance-CZZhOPZE.js → getBalance-SeTBLCzL.js} +3 -3
  83. package/_assets/{getInstalledModules-jGEvSZtN.js → getInstalledModules-Dj-K4xQC.js} +2 -2
  84. package/_assets/{getNFT-CitsyjuX.js → getNFT-BCYWBTK4.js} +3 -3
  85. package/_assets/{getNFT-WfSacIBg.js → getNFT-BiPo4cEC.js} +2 -2
  86. package/_assets/{grid.styles-BgULreOR.js → grid.styles-DlGaOCzf.js} +2 -2
  87. package/_assets/{hashTypedData-C6vCQMAc.js → hashTypedData-Dr6t3Q-D.js} +2 -2
  88. package/_assets/{hashTypedData-ByJYgeO9.js → hashTypedData-OCiZaYsv.js} +2 -2
  89. package/_assets/{in-app-DelW162t.js → in-app-CVvPAYT7.js} +2 -2
  90. package/_assets/{in-app-wallet-calls-GZEjZInR.js → in-app-wallet-calls-ChA73nJF.js} +2 -2
  91. package/_assets/{index-CFDDMQJK.js → index-2aK4zhJE.js} +2 -2
  92. package/_assets/{index-CIKEzKBH.js → index-ARGrbe3A.js} +3 -3
  93. package/_assets/{index-BhStT_cc.js → index-Axq2dKdE.js} +2 -2
  94. package/_assets/{index-_K5f8PeG.js → index-B0OkSRGZ.js} +2 -2
  95. package/_assets/{index-Cw7Rqo2-.js → index-B1wSCmue.js} +2 -2
  96. package/_assets/{index-D4aVxZvs.js → index-B2uxq6bU.js} +2 -2
  97. package/_assets/{index-C_qbG0dy.js → index-B3Ji4DRo.js} +2 -2
  98. package/_assets/{index-nlnz8IwV.js → index-B9Up_SK0.js} +2 -2
  99. package/_assets/{index-CPtUYput.js → index-BACBbqlk.js} +2 -2
  100. package/_assets/{index-DNVhmP-g.js → index-BDJuqgxU.js} +2 -2
  101. package/_assets/{index-Ch-uhgiT.js → index-BHbHN01N.js} +2 -2
  102. package/_assets/{index-DgrGQPbb.js → index-BJA_2Ynv.js} +2 -2
  103. package/_assets/{index-j6WPFSGW.js → index-BPQVwfa5.js} +2 -2
  104. package/_assets/{index-BfFqEUOq.js → index-BPinodm9.js} +2 -2
  105. package/_assets/{index-Q6NI03qq.js → index-BWEvNyOP.js} +2 -2
  106. package/_assets/{index-CUxOFwrr.js → index-BiAbz-7Q.js} +2 -2
  107. package/_assets/{index-CnKfDln2.js → index-BjdjqJv4.js} +4 -4
  108. package/_assets/{index-vSQyyLPX.js → index-BlorBoCd.js} +2 -2
  109. package/_assets/{index-06nAp6_P.js → index-C3LVhWuY.js} +2 -2
  110. package/_assets/{index-B3hIuOjX.js → index-CATjpM0W.js} +2 -2
  111. package/_assets/{index-Bzl3YxsW.js → index-CFGlj3ri.js} +2 -2
  112. package/_assets/{index-BiFC9g1V.js → index-CGdQ1CYx.js} +3 -3
  113. package/_assets/{index-nAcepwRH.js → index-CK4WqWqO.js} +2 -2
  114. package/_assets/{index-478kymCd.js → index-CO9qakt0.js} +2 -2
  115. package/_assets/{index-qNV8isBD.js → index-CQvLWK26.js} +2 -2
  116. package/_assets/{index-zyHGk9oP.js → index-CS1VnyR1.js} +2 -2
  117. package/_assets/{index-D6uAgsgt.js → index-CUa90VgH.js} +2 -2
  118. package/_assets/{index-DLfuFdyq.js → index-CWThS2BY.js} +2 -2
  119. package/_assets/{index-Btp9BlB2.js → index-CY38y8q8.js} +2 -2
  120. package/_assets/{index-6H7SIWE4.js → index-CbMw0H1W.js} +3 -3
  121. package/_assets/{index-BQcRovWk.js → index-ChNIU-k1.js} +2 -2
  122. package/_assets/{index-DKaHo61X.js → index-Cj5zg5gT.js} +2 -2
  123. package/_assets/{index-0drXYznK.js → index-CmcTFc5W.js} +4 -4
  124. package/_assets/{index-DZwiznKc.js → index-CmcvBNcU.js} +2 -2
  125. package/_assets/{index-B3Z7srlP.js → index-Cst1nEOO.js} +2 -2
  126. package/_assets/{index-DrtJak5c.js → index-Ct9dUkSX.js} +2 -2
  127. package/_assets/{index-KxXBUjbr.js → index-CtayMM8a.js} +4 -4
  128. package/_assets/{index-oUqiABFT.js → index-D0Wlf6gr.js} +2 -2
  129. package/_assets/{index-BBxO56gH.js → index-D0q045Px.js} +2 -2
  130. package/_assets/{index-B_2Mo4bu.js → index-D1jUYM4a.js} +2 -2
  131. package/_assets/{index-COOTjCVL.js → index-D2CYJ9zD.js} +2 -2
  132. package/_assets/{index-C9Nt4S9K.js → index-D7_zDlZP.js} +2 -2
  133. package/_assets/{index-BhuPVo5e.js → index-D8QWWYMI.js} +2 -2
  134. package/_assets/{index-DeqZWYRQ.js → index-DAqd6v3r.js} +2 -2
  135. package/_assets/{index-DSfy1hBC.js → index-DCE7JXu8.js} +2 -2
  136. package/_assets/{index-0GqxSgjs.js → index-DGUzkX-I.js} +2 -2
  137. package/_assets/{index-HKZSXNsr.js → index-DGwAzxg5.js} +2 -2
  138. package/_assets/{index-ZdJgkDfq.js → index-DJXUib_8.js} +2 -2
  139. package/_assets/{index-_YF7EieY.js → index-DKiFTtAe.js} +3 -3
  140. package/_assets/{index-DRS8NbOe.js → index-DLKAGp7r.js} +2 -2
  141. package/_assets/{index-BMxAuVf4.js → index-DRR34LYo.js} +2 -2
  142. package/_assets/{index-Oc8g3W54.js → index-DZcNiUa1.js} +2 -2
  143. package/_assets/{index-MVmOAy4C.js → index-DejzmYQv.js} +2 -2
  144. package/_assets/{index-8ROQzz_g.js → index-DibFNBla.js} +2 -2
  145. package/_assets/{index-7k0c5Qcy.js → index-Dn8vBHwo.js} +2 -2
  146. package/_assets/{index-1oZGCxrR.js → index-Dxe6AOQE.js} +2 -2
  147. package/_assets/{index-Zw_hjMg7.js → index-G5AacsmF.js} +2 -2
  148. package/_assets/{index-CHxIVaGD.js → index-MZXf7D1W.js} +2 -2
  149. package/_assets/{index-C-bEpZKt.js → index-_-VFmxzj.js} +2 -2
  150. package/_assets/{index-DO2w-wQR.js → index-bJXcZSYa.js} +12 -12
  151. package/_assets/{index-BqDmiiZ-.js → index-ficvqfHi.js} +2 -2
  152. package/_assets/{index-B0FVA0eZ.js → index-gAex9EE8.js} +2 -2
  153. package/_assets/{index-YBa5NFZw.js → index-gm_D0aNI.js} +2 -2
  154. package/_assets/{index-Bl045Uro.js → index-n4qOUE64.js} +2 -2
  155. package/_assets/{index-DtNLghFi.js → index-nQ3hptXe.js} +2 -2
  156. package/_assets/{index-D3bYCsfh.js → index-ncctYqB-.js} +2 -2
  157. package/_assets/{index-RB8sYWdK.js → index-zkaZwO7E.js} +2 -2
  158. package/_assets/{index.es-BPsWV599.js → index.es-4xrWWZcO.js} +2 -2
  159. package/_assets/{index.es-DxzKuifY.js → index.es-CstVHWlV.js} +5 -5
  160. package/_assets/{index.es-Tp1KZ2HQ.js → index.es-DYbPPtM5.js} +2 -2
  161. package/_assets/{index.es-BOCjx120.js → index.es-DzLQ6Fnb.js} +2 -2
  162. package/_assets/items-empty-CpzVwMne.js +2 -0
  163. package/_assets/{jump-DErRvLju.js → jump-CVtY0iTz.js} +2 -2
  164. package/_assets/{linkAccount-YghbSYWp.js → linkAccount-6NTQv8aT.js} +2 -2
  165. package/_assets/{localBatchGatewayRequest-BExIf5_1.js → localBatchGatewayRequest-Dks7VfkN.js} +2 -2
  166. package/_assets/{native-c1T6eoXp.js → native-CXAGKkI7.js} +2 -2
  167. package/_assets/{networks-B-wEMoJV.js → networks-DtT18tMT.js} +2 -2
  168. package/_assets/{onramp-CDCcNQHe.js → onramp-CUVL5AKN.js} +2 -2
  169. package/_assets/{openzeppelin-CpRja1Th.js → openzeppelin-C6HmSX5F.js} +2 -2
  170. package/_assets/{ownerOf-C70qi64U.js → ownerOf-iHeO-A0L.js} +2 -2
  171. package/_assets/{parseNft-CZOYTgLm.js → parseNft-_qkiBgGY.js} +3 -3
  172. package/_assets/{parseSignature-DzR-8mQD.js → parseSignature-DCX2Homx.js} +4 -4
  173. package/_assets/{parseSignature-BEsyV8el.js → parseSignature-DpYJxwtD.js} +2 -2
  174. package/_assets/{passkeys-yBovAv90.js → passkeys-CaDDwDfa.js} +2 -2
  175. package/_assets/{pay-with-exchange-7bhrHbog.js → pay-with-exchange-mjjMFDoB.js} +2 -2
  176. package/_assets/{prepare-contract-call-h84PINiM.js → prepare-contract-call-B3PEXjk8.js} +2 -2
  177. package/_assets/{qr-overlay-WkRjHKs6.js → qr-overlay-Dte-FwLF.js} +4 -4
  178. package/_assets/{react-C_gdQiCE.js → react-Io5Wove7.js} +2 -2
  179. package/_assets/{receive-Do89clPB.js → receive-BOylnCCD.js} +2 -2
  180. package/_assets/{resolveImplementation-B9JWy09W.js → resolveImplementation-eqKe_Jd_.js} +2 -2
  181. package/_assets/{resume-buy-BC0M_EmE.js → resume-buy-l-MsHDN-.js} +2 -2
  182. package/_assets/{rpc-BSS6zm8k.js → rpc-Bd3ag8E4.js} +2 -2
  183. package/_assets/{sales-empty-DYbL-9_y.js → sales-empty-71lDTBeo.js} +2 -2
  184. package/_assets/{search-empty-CZAYhXXz.js → search-empty-C2pIWVz4.js} +2 -2
  185. package/_assets/{secp256k1-BBFBLxON.js → secp256k1-BCTY01q6.js} +2 -2
  186. package/_assets/{secp256k1-ZJxm9Bys.js → secp256k1-ChjjZr2n.js} +2 -2
  187. package/_assets/{secp256k1-BYDa0XLp.js → secp256k1-D89skxyt.js} +2 -2
  188. package/_assets/{send-ClRYnajv.js → send-BoRH3tdn.js} +2 -2
  189. package/_assets/{send-batch-transaction-DwvLC0W4.js → send-batch-transaction-qs3ijcbz.js} +2 -2
  190. package/_assets/{send-eip712-transaction-DvY1NVgK.js → send-eip712-transaction-BLU365vg.js} +3 -3
  191. package/_assets/{send-gasless-transaction-o1auSTit.js → send-gasless-transaction-COE6PePF.js} +3 -3
  192. package/_assets/{send-transaction-Br2a0g7W.js → send-transaction-DWia223-.js} +3 -3
  193. package/_assets/{sendMetaTransaction-Bu8b5LeI.js → sendMetaTransaction-Bnb1e1Oo.js} +2 -2
  194. package/_assets/{sendRawTransaction-BpeJI0sp.js → sendRawTransaction-QUpRtv1T.js} +4 -4
  195. package/_assets/{sentry-Cxy688Uv.js → sentry-faeuEJiQ.js} +3 -3
  196. package/_assets/{serializeTransaction-FQ6RV9RE.js → serializeTransaction-Bzap5VIj.js} +2 -2
  197. package/_assets/{session-proposal-C6u2LdKL.js → session-proposal-BRPQA6_F.js} +2 -2
  198. package/_assets/{session-request-w0C1Tobh.js → session-request-DE3BfIwL.js} +3 -3
  199. package/_assets/{sha256-CTCuMrwW.js → sha256-my9t8oLg.js} +2 -2
  200. package/_assets/{signing-D3zt3At6.js → signing-BKRnKKdl.js} +4 -4
  201. package/_assets/{skeleton.styles-B1HNltmx.js → skeleton.styles-Cjpy58bn.js} +2 -2
  202. package/_assets/{socials-DfbgvKTd.js → socials-CHs46oCs.js} +2 -2
  203. package/_assets/{styled-Cuj3EyKZ.js → styled-3e6FPpFM.js} +2 -2
  204. package/_assets/{swaps-b1I3uEg7.js → swaps-BQAfj8hR.js} +2 -2
  205. package/_assets/{thirdweb-auekSJDk.js → thirdweb-I3ycy-sq.js} +4 -4
  206. package/_assets/{to-serializable-transaction-CfmjnNDu.js → to-serializable-transaction-D4JXNF6K.js} +3 -3
  207. package/_assets/{totalSupply-BUwJKf4f.js → totalSupply-RRjcgrsd.js} +2 -2
  208. package/_assets/{transaction-DnOh3Eg-.js → transaction-CpNDZT6H.js} +2 -2
  209. package/_assets/{transactionReceipt-CqUJCou2.js → transactionReceipt-BsGymDgp.js} +2 -2
  210. package/_assets/{transactions-C3x5-V61.js → transactions-ZyGjrTz1.js} +2 -2
  211. package/_assets/{useCreditPacks-DCsNOyZ8.js → useCreditPacks-RKaHRtDl.js} +2 -2
  212. package/_assets/{useInfiniteGrid-R77Z-ty5.js → useInfiniteGrid-CKUOL3of.js} +2 -2
  213. package/_assets/{useStore-D2qLhY6J.js → useStore-zwLaMv5E.js} +3 -3
  214. package/_assets/{useTheme-BGjlT7WM.js → useTheme-6lXtg_We.js} +2 -2
  215. package/_assets/{utils-BtZfUVLs.js → utils-DmCacC3Z.js} +2 -2
  216. package/_assets/{verifyHash-DPHC3ZIF.js → verifyHash-BnLy1LQ8.js} +2 -2
  217. package/_assets/{w3m-modal-CbZN_Q63.js → w3m-modal-CqeYEpsp.js} +2 -2
  218. package/_assets/{w3m-modal-D0JziRdg.js → w3m-modal-igkHA2Yg.js} +2 -2
  219. package/_assets/{wait-for-tx-receipt-DZiNnQbl.js → wait-for-tx-receipt-BBZ5JG62.js} +2 -2
  220. package/_assets/{wallets-rH1kVf3P.js → wallets-BUa02PiV.js} +6 -6
  221. package/_assets/{web-connector-COam_ETk.js → web-connector-C7j-Aqf_.js} +4 -4
  222. package/_assets/{writeContract-14h9tGQE.js → writeContract-DUS_4K4j.js} +2 -2
  223. package/_assets/{zora-sepolia-CutqFesD.js → zora-sepolia-CDPQd0aL.js} +2 -2
  224. package/_assets/{zoraTestnet-bXAN-i92.js → zoraTestnet-DzzH_a_k.js} +2 -2
  225. package/index.html +11 -11
  226. package/package.json +1 -1
  227. package/_assets/collectionPage.styles-DVsIiXb2.js +0 -40
  228. package/_assets/items-empty-x6ksK26N.js +0 -2
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-BqDmiiZ-.js","_assets/react-C_gdQiCE.js","_assets/index-DO2w-wQR.js","_assets/dcl-schemas-Z_oWg9h9.js","_assets/sentry-Cxy688Uv.js","_assets/ethers-Cpz0Q6xx.js","_assets/intl-AKLEHPeO.js","_assets/index-CKGO8NWe.css","_assets/sales-empty-DYbL-9_y.js","_assets/buy-Cmc6VGNE.js","_assets/authorizations-ChjDHhq0.js","_assets/sendMetaTransaction-Bu8b5LeI.js","_assets/ManaPricingBanner.styles-DGJbiC1Z.js","_assets/Faq-DDRZibDb.js","_assets/field.styles-Cc8geV5i.js"])))=>i.map(i=>d[i]);
2
- import{U as we,bG as Ie,o as U,l as A,bH as Ae,t as o,s as l,m as Ee,n as Le,b as r,J as Ne,I as T,bI as se,bJ as ne,bK as $e,_ as Pe,L as Te,q as E,ao as K,bL as Se,r as Ce,bl as B,E as Fe,bM as De,w as N,bN as Me,bO as Q}from"./index-DO2w-wQR.js";import{r as g,u as He,j as t,e as qe,L as Oe}from"./react-C_gdQiCE.js";import{u as Re,s as _e}from"./sales-empty-DYbL-9_y.js";import{L as ze}from"./LoadMore-BwZO73du.js";import{u as $}from"./useInfiniteGrid-R77Z-ty5.js";import{m as de}from"./mana-matic-CEqvSwrJ.js";import{n as We}from"./name-glyph-aUugT8vq.js";import"./dcl-schemas-Z_oWg9h9.js";import"./sentry-Cxy688Uv.js";import"./ethers-Cpz0Q6xx.js";import"./intl-AKLEHPeO.js";import"./buy-Cmc6VGNE.js";import"./authorizations-ChjDHhq0.js";import"./sendMetaTransaction-Bu8b5LeI.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="6b089217-c490-4d59-81ec-c4cd09d019cc",e._sentryDebugIdIdentifier="sentry-dbid-6b089217-c490-4d59-81ec-c4cd09d019cc")}catch{}})();const Ge=15e3;function Ue(e,s){return e.txHash&&s.txHash?e.txHash===s.txHash:e.txHash||s.txHash?!1:e.status===s.status&&Math.abs(e.createdAt-s.createdAt)<=Ge}function Ke(e){const s=[...e].sort((i,d)=>d.createdAt-i.createdAt),n=[];for(const i of s){const d=n[n.length-1];d&&Ue(d[d.length-1],i)?d.push(i):n.push([i])}return n.map(i=>{var d;return{id:((d=i.find(a=>a.txHash))==null?void 0:d.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(a=>a.createdAt)),status:Be(i),totalCredits:i.reduce((a,h)=>a+h.credits,0),lines:i}})}function Be(e){return e.some(s=>s.status==="PENDING")?"PENDING":e.some(s=>s.status==="SETTLED")?"SETTLED":"EXPIRED"}function Qe(e){return e==="SETTLED"?"SETTLED":e==="EXPIRED"?"FAILED":"PENDING"}function Xe(e){return e.tradeId?`trade:${e.tradeId}`:e.contractAddress&&e.itemId?`item:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}function Ve(e){const s=[],n=new Map;for(const i of e){const d=Xe(i);if(!d){s.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,registeredName:i.registeredName??null,quantity:1,credits:i.credits});continue}const a=n.get(d);if(a){a.quantity+=1,a.credits+=i.credits;continue}const h={key:d,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,registeredName:i.registeredName??null,quantity:1,credits:i.credits};n.set(d,h),s.push(h)}return s}function Je(e,s){return{id:e.id,contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId,counterparty:e.buyer,credits:s?we(e.manaWei,s):null,manaWei:e.manaWei,createdAt:e.createdAt,txHash:e.txHash}}function Ye(e){return e.status!=="EXPIRED"||!!e.submittedTxHash}function Ze(e){const n=Ke(e.purchases.filter(Ye)).map(c=>({kind:"purchase",id:`purchase:${c.id}`,createdAt:c.createdAt,order:c})),i=e.sales.map(c=>{const m=Je(c,e.rate);return{kind:"sale",id:`sale:${m.id}`,createdAt:m.createdAt,sale:m}}),d=(e.creditOrders??[]).filter(c=>c.status!=="failed"&&c.status!=="abandoned").map(c=>({kind:"credit",id:`credit:${c.id}`,createdAt:c.createdAt,order:c})),a=new Set(e.purchases.filter(c=>c.txHash).map(c=>c.txHash.toLowerCase())),h=(e.manaPurchases??[]).filter(c=>!a.has(c.txHash.toLowerCase())).map(c=>({kind:"mana-purchase",id:`mana-purchase:${c.id}`,createdAt:c.createdAt,sale:c}));return[...n,...i,...d,...h].sort((c,m)=>m.createdAt-c.createdAt||(c.id<m.id?-1:1))}function et(e,s){return s==="all"?e:s==="sales"?e.filter(n=>n.kind==="sale"):e.filter(n=>n.kind==="purchase"||n.kind==="credit"||n.kind==="mana-purchase")}const ce=e=>e.trim().toLowerCase();function tt(e){const s=new Map;for(const n of e??[]){const i=ce(n.txHash??"");if(!i)continue;const d=s.get(i);d?d.push(n):s.set(i,[n])}return s}function it(e,s,n=Date.now()){const i=s.txHash?e.get(ce(s.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const d=i.length===1?st(i[0].netCents):null,a=i.filter(c=>!c.available&&c.availableAt>n);if(a.length===0)return{kind:"credited",credits:d};const h=a.reduce((c,m)=>Math.max(c,m.availableAt),0);return{kind:"pending",credits:d,availableAt:h}}function st(e){return Ie(e)}function nt(){const e=U(i=>{var d;return(d=i.session)==null?void 0:d.address}),{data:s,isLoading:n}=A({queryKey:["listing-count",e],queryFn:()=>Ae({creator:e,onSale:!0,first:1}),enabled:!!e,staleTime:5*6e4});return{count:s==null?void 0:s.total,isLoading:n}}const at="https://cdn.decentraland.org/@dcl/shop/1.11.2-33050849044.commit-d710ef0/_assets/credits-product-vs4Q6u6l.svg",X=Ee`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-ficvqfHi.js","_assets/react-Io5Wove7.js","_assets/index-bJXcZSYa.js","_assets/dcl-schemas-OH8G4Ndl.js","_assets/sentry-faeuEJiQ.js","_assets/ethers-DwK2TdL6.js","_assets/intl-AKLEHPeO.js","_assets/index-CKGO8NWe.css","_assets/sales-empty-71lDTBeo.js","_assets/buy-C9vFcpIy.js","_assets/authorizations-DC168PVR.js","_assets/sendMetaTransaction-Bnb1e1Oo.js","_assets/ManaPricingBanner.styles-rIYX7xjf.js","_assets/Faq-Dt8RPaHZ.js","_assets/field.styles-6_NAJBdz.js"])))=>i.map(i=>d[i]);
2
+ import{U as we,bG as Ie,o as U,l as A,bH as Ae,t as o,s as l,m as Ee,n as Le,b as r,J as Ne,I as T,bI as se,bJ as ne,bK as $e,_ as Pe,L as Te,q as E,ao as K,bL as Se,r as Ce,bl as B,E as Fe,bM as De,w as N,bN as Me,bO as Q}from"./index-bJXcZSYa.js";import{r as g,u as He,j as t,e as qe,L as Oe}from"./react-Io5Wove7.js";import{u as Re,s as _e}from"./sales-empty-71lDTBeo.js";import{L as ze}from"./LoadMore-hoiSVN2H.js";import{u as $}from"./useInfiniteGrid-CKUOL3of.js";import{m as de}from"./mana-matic-CEqvSwrJ.js";import{n as We}from"./name-glyph-aUugT8vq.js";import"./dcl-schemas-OH8G4Ndl.js";import"./sentry-faeuEJiQ.js";import"./ethers-DwK2TdL6.js";import"./intl-AKLEHPeO.js";import"./buy-C9vFcpIy.js";import"./authorizations-DC168PVR.js";import"./sendMetaTransaction-Bnb1e1Oo.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="b9a30dc3-b849-4c32-b88e-5064d0734d6d",e._sentryDebugIdIdentifier="sentry-dbid-b9a30dc3-b849-4c32-b88e-5064d0734d6d")}catch{}})();const Ge=15e3;function Ue(e,s){return e.txHash&&s.txHash?e.txHash===s.txHash:e.txHash||s.txHash?!1:e.status===s.status&&Math.abs(e.createdAt-s.createdAt)<=Ge}function Ke(e){const s=[...e].sort((i,d)=>d.createdAt-i.createdAt),n=[];for(const i of s){const d=n[n.length-1];d&&Ue(d[d.length-1],i)?d.push(i):n.push([i])}return n.map(i=>{var d;return{id:((d=i.find(a=>a.txHash))==null?void 0:d.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(a=>a.createdAt)),status:Be(i),totalCredits:i.reduce((a,h)=>a+h.credits,0),lines:i}})}function Be(e){return e.some(s=>s.status==="PENDING")?"PENDING":e.some(s=>s.status==="SETTLED")?"SETTLED":"EXPIRED"}function Qe(e){return e==="SETTLED"?"SETTLED":e==="EXPIRED"?"FAILED":"PENDING"}function Xe(e){return e.tradeId?`trade:${e.tradeId}`:e.contractAddress&&e.itemId?`item:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}function Ve(e){const s=[],n=new Map;for(const i of e){const d=Xe(i);if(!d){s.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,registeredName:i.registeredName??null,quantity:1,credits:i.credits});continue}const a=n.get(d);if(a){a.quantity+=1,a.credits+=i.credits;continue}const h={key:d,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,registeredName:i.registeredName??null,quantity:1,credits:i.credits};n.set(d,h),s.push(h)}return s}function Je(e,s){return{id:e.id,contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId,counterparty:e.buyer,credits:s?we(e.manaWei,s):null,manaWei:e.manaWei,createdAt:e.createdAt,txHash:e.txHash}}function Ye(e){return e.status!=="EXPIRED"||!!e.submittedTxHash}function Ze(e){const n=Ke(e.purchases.filter(Ye)).map(c=>({kind:"purchase",id:`purchase:${c.id}`,createdAt:c.createdAt,order:c})),i=e.sales.map(c=>{const x=Je(c,e.rate);return{kind:"sale",id:`sale:${x.id}`,createdAt:x.createdAt,sale:x}}),d=(e.creditOrders??[]).filter(c=>c.status!=="failed"&&c.status!=="abandoned").map(c=>({kind:"credit",id:`credit:${c.id}`,createdAt:c.createdAt,order:c})),a=new Set(e.purchases.filter(c=>c.txHash).map(c=>c.txHash.toLowerCase())),h=(e.manaPurchases??[]).filter(c=>!a.has(c.txHash.toLowerCase())).map(c=>({kind:"mana-purchase",id:`mana-purchase:${c.id}`,createdAt:c.createdAt,sale:c}));return[...n,...i,...d,...h].sort((c,x)=>x.createdAt-c.createdAt||(c.id<x.id?-1:1))}function et(e,s){return s==="all"?e:s==="sales"?e.filter(n=>n.kind==="sale"):e.filter(n=>n.kind==="purchase"||n.kind==="credit"||n.kind==="mana-purchase")}const ce=e=>e.trim().toLowerCase();function tt(e){const s=new Map;for(const n of e??[]){const i=ce(n.txHash??"");if(!i)continue;const d=s.get(i);d?d.push(n):s.set(i,[n])}return s}function it(e,s,n=Date.now()){const i=s.txHash?e.get(ce(s.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const d=i.length===1?st(i[0].netCents):null,a=i.filter(c=>!c.available&&c.availableAt>n);if(a.length===0)return{kind:"credited",credits:d};const h=a.reduce((c,x)=>Math.max(c,x.availableAt),0);return{kind:"pending",credits:d,availableAt:h}}function st(e){return Ie(e)}function nt(){const e=U(i=>{var d;return(d=i.session)==null?void 0:d.address}),{data:s,isLoading:n}=A({queryKey:["listing-count",e],queryFn:()=>Ae({creator:e,onSale:!0,first:1}),enabled:!!e,staleTime:5*6e4});return{count:s==null?void 0:s.total,isLoading:n}}const at="https://cdn.decentraland.org/@dcl/shop/1.11.2/_assets/credits-product-vs4Q6u6l.svg",X=Ee`
3
3
  0% { background-position: 200% 0; }
4
4
  100% { background-position: -200% 0; }
5
5
  `,rt=l.section`
@@ -188,7 +188,7 @@ import{U as we,bG as Ie,o as U,l as A,bH as Ae,t as o,s as l,m as Ee,n as Le,b a
188
188
  background: ${o.colors.line};
189
189
  color: ${o.colors.muted};
190
190
  }
191
- `,mt=l.button`
191
+ `,xt=l.button`
192
192
  font-size: 11px;
193
193
  font-weight: 700;
194
194
  text-transform: uppercase;
@@ -230,7 +230,7 @@ import{U as we,bG as Ie,o as U,l as A,bH as Ae,t as o,s as l,m as Ee,n as Le,b a
230
230
  width: 16px;
231
231
  height: 16px;
232
232
  vertical-align: -0.15em;
233
- `,xt=l.span`
233
+ `,mt=l.span`
234
234
  display: inline-flex;
235
235
  align-items: center;
236
236
  cursor: pointer;
@@ -357,11 +357,11 @@ import{U as we,bG as Ie,o as U,l as A,bH as Ae,t as o,s as l,m as Ee,n as Le,b a
357
357
  @media (prefers-reduced-motion: reduce) {
358
358
  animation: none;
359
359
  }
360
- `,yt=l.div`
360
+ `,bt=l.div`
361
361
  display: flex;
362
362
  flex-direction: column;
363
363
  align-items: center;
364
- `,bt=l.div`
364
+ `,yt=l.div`
365
365
  display: flex;
366
366
  flex-direction: column;
367
367
  align-items: center;
@@ -385,5 +385,5 @@ import{U as we,bG as Ie,o as U,l as A,bH as Ae,t as o,s as l,m as Ee,n as Le,b a
385
385
  height: 26px;
386
386
  object-fit: contain;
387
387
  }
388
- `,Z=L.withComponent(Oe),wt=g.lazy(()=>Pe(()=>import("./index-BqDmiiZ-.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])).then(e=>({default:e.ImportListings}))),P=24,It=["all","purchases","sales"],W="section",oe="listings",G="view",At="migrate";function I(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function pe(e){return e.length>10?`${e.slice(0,6)}…${e.slice(-4)}`:e}function me(e){const s=Number(e)/1e18;return Number.isFinite(s)?s.toLocaleString("en",{maximumFractionDigits:2}):"0"}function xe({children:e}){const s=g.useRef(null),[n,i]=g.useState(null),d=()=>{var h;const a=(h=s.current)==null?void 0:h.getBoundingClientRect();a&&i({top:a.bottom+8,left:a.left+a.width/2})};return t.jsxs(xt,{ref:s,tabIndex:0,onMouseEnter:d,onMouseLeave:()=>i(null),onFocus:d,onBlur:()=>i(null),children:[e,n?qe.createPortal(t.jsx(gt,{style:{top:n.top,left:n.left},role:"tooltip",children:r("activity.polygonMana")}),document.body):null]})}function Et({item:e}){const s=!!e.contractAddress&&!!e.itemId,n=!!e.tradeId||s,{data:i,isLoading:d}=A({queryKey:["order-line-display",e.tradeId,e.contractAddress,e.itemId],queryFn:()=>e.tradeId?Me(e.tradeId):Q(e.contractAddress,{itemId:e.itemId}),enabled:n,staleTime:5*6e4}),a=n&&d,h=(i==null?void 0:i.name)??r("activity.itemFallback"),c=(i==null?void 0:i.thumbnail)??"",m=B({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,f=t.jsxs(t.Fragment,{children:[a?t.jsx(J,{}):t.jsx(O,{children:c?t.jsx("img",{src:c,alt:h}):t.jsx(T,{name:"cart",size:20})}),t.jsxs(R,{children:[a?t.jsx(Y,{}):t.jsx(_,{title:h,children:h}),e.quantity>1?t.jsx(z,{children:r("activity.quantity",{count:e.quantity})}):null]}),t.jsxs(he,{children:[t.jsx(E,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.credits})]})]});return m?t.jsx(Z,{to:m,"data-link":"true",children:f}):t.jsx(L,{children:f})}function Lt({item:e}){const s=`@${e.registeredName}`;return t.jsxs(L,{"data-testid":"activity-name-line",children:[t.jsx(kt,{children:t.jsx("img",{src:We,alt:""})}),t.jsxs(R,{children:[t.jsx(_,{title:s,children:s}),t.jsx(z,{children:r("activity.nameRegistration")})]}),t.jsxs(he,{children:[t.jsx(E,{className:"ccy-mark"})," ",e.credits]})]})}function Nt({order:e}){const s=Ve(e.lines),n=s.reduce((a,h)=>a+h.quantity,0),i=Qe(e.status),d=i==="SETTLED"?r("activity.completed"):i==="FAILED"?r("activity.failed"):r("activity.processing");return t.jsxs(S,{"data-testid":"purchase-order",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsxs(M,{children:[r("activity.purchaseLabel")," · ",r("activity.itemCount",{count:n})]})]}),t.jsxs(H,{children:[t.jsx(q,{"data-status":i,children:d}),t.jsxs(k,{children:[t.jsx(E,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.totalCredits})]})]})]}),i==="FAILED"?t.jsx(ft,{children:r("activity.purchaseFailedNote")}):null,t.jsx(V,{children:s.map(a=>a.registeredName?t.jsx(Lt,{item:a},a.key):t.jsx(Et,{item:a},a.key))})]})}function $t({sale:e}){const{data:s,isLoading:n}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>Q(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),i=(s==null?void 0:s.name)??r("activity.itemFallback"),d=(s==null?void 0:s.thumbnail)??"",a=B({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,h=t.jsxs(t.Fragment,{children:[n?t.jsx(J,{}):t.jsx(O,{children:d?t.jsx("img",{src:d,alt:i}):t.jsx(T,{name:"offer",size:20})}),t.jsxs(R,{children:[n?t.jsx(Y,{}):t.jsx(_,{title:i,children:i}),t.jsx(z,{children:r("activity.boughtFrom",{account:pe(e.seller)})})]})]});return t.jsxs(S,{"data-testid":"activity-mana-purchase",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsx(M,{children:r("activity.paidWithMana")})]}),t.jsxs(H,{children:[t.jsx(q,{"data-status":"SETTLED",children:r("activity.completed")}),t.jsxs(k,{children:[me(e.manaWei)," ",t.jsx(xe,{children:t.jsx(ue,{src:de,alt:"MANA"})})]})]})]}),t.jsx(V,{children:a?t.jsx(Z,{to:a,"data-link":"true",children:h}):t.jsx(L,{children:h})})]})}function Pt({sale:e,payout:s}){const{data:n,isLoading:i}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>Q(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),d=(n==null?void 0:n.name)??r("activity.itemFallback"),a=(n==null?void 0:n.thumbnail)??"",h=B({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,c=t.jsxs(t.Fragment,{children:[i?t.jsx(J,{}):t.jsx(O,{children:a?t.jsx("img",{src:a,alt:d}):t.jsx(T,{name:"offer",size:20})}),t.jsxs(R,{children:[i?t.jsx(Y,{}):t.jsx(_,{title:d,children:d}),t.jsxs(z,{children:[r("activity.soldTo",{account:pe(e.counterparty)}),s.kind==="pending"?` · ${r("activity.payoutPendingOn",{date:I(s.availableAt)})}`:""]})]})]});return t.jsxs(S,{"data-testid":"activity-sale",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsx(M,{children:r("activity.saleLabel")})]}),t.jsxs(H,{children:[t.jsx(q,{"data-status":s.kind==="pending"?"PENDING":"SOLD",children:s.kind==="pending"?r("activity.payoutPending"):r("activity.sold")}),s.kind==="direct"?t.jsxs(k,{"data-kind":"income",children:["+",me(e.manaWei)," ",t.jsx(xe,{children:t.jsx(ue,{src:de,alt:"MANA"})})]}):s.credits!==null?t.jsxs(k,{"data-kind":"income",children:[t.jsx(E,{className:"ccy-mark"})," +",Fe(s.credits)]}):t.jsx(k,{"data-kind":"income",children:r("activity.payoutCredited")})]})]}),t.jsx(V,{children:h?t.jsx(Z,{to:h,"data-link":"true",children:c}):t.jsx(L,{children:c})})]})}function Tt({order:e}){const s=`$${(e.usdCents/100).toFixed(2)}`,n=Se(e.status),i=n==="SETTLED"?r("activity.completed"):n==="FAILED"?r("activity.failed"):n==="UNFINISHED"?r("activity.unfinished"):r("activity.processing"),d=U(p=>p.session),a=Ce(),[h,c]=g.useState(!1),m=e.status==="initiated"&&!!d;g.useEffect(()=>{const p=()=>c(!1);return window.addEventListener("pageshow",p),()=>window.removeEventListener("pageshow",p)},[]);async function f(){if(!(!d||h)){c(!0);try{const p=await De(e.id,d.identity);if(p.kind==="url"){if(/^https:\/\/([a-z0-9-]+\.)*stripe\.com\//i.test(p.url)){window.location.href=p.url;return}N.error(r("activity.resumeUnavailable"))}else p.kind==="expired"?(N.info(r("activity.resumeExpired")),a.invalidateQueries({queryKey:["credit-orders"]})):p.kind==="paid"?(N.success(r("activity.resumePaid")),a.invalidateQueries({queryKey:["credit-orders"]})):N.error(r("activity.resumeUnavailable"));c(!1)}catch{c(!1)}}}return t.jsx(S,{"data-testid":"credit-order",children:t.jsxs(C,{children:[t.jsx(pt,{children:t.jsx("img",{src:at,alt:"","aria-hidden":!0})}),t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsxs(M,{children:[r("activity.creditPurchaseLabel")," · ",r("activity.creditPaid",{usd:s})]})]}),t.jsxs(H,{children:[m?t.jsx(mt,{type:"button",onClick:()=>void f(),disabled:h,"data-testid":"resume-order",children:h?r("activity.resuming"):r("activity.resume")}):null,t.jsx(q,{"data-status":n,children:i}),t.jsxs(k,{"data-kind":n==="UNFINISHED"?void 0:"income",children:[n==="UNFINISHED"?"":"+",t.jsx(E,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.credits})]})]})]})})}function St({filter:e}){const s={all:r("activity.emptyAllBody"),purchases:r("activity.emptyPurchasesBody"),sales:r("activity.emptySalesBody")}[e];return t.jsx(yt,{children:t.jsx(Te,{testId:`activity-empty-${e}`,icon:_e,title:r("activity.emptyTitle"),body:s,cta:{label:r("assets.empty.cta"),to:"/items"}})})}function Bt(){const{session:e}=U(),[s,n]=g.useState("all"),[i,d]=He(),a=i.get(W)===oe||i.get(G)===At;Le({title:a?r("seo.import.title"):r("nav.activity"),noindex:!0});const{count:h}=Re(),{count:c}=nt(),f=h!==void 0&&c!==void 0&&(h>0||c>0||a),p=!!e&&!a&&s!=="sales",x=!!e&&!a&&s!=="purchases",y=$(["purchases",e==null?void 0:e.address],u=>$e(e.address,e.identity,{first:P,skip:u}),{enabled:p}),b=$(["sales",e==null?void 0:e.address],u=>se(e.address,{role:"seller",first:P,skip:u}),{enabled:x}),v=$(["credit-orders",e==null?void 0:e.address],u=>ne(e.address,e.identity,{first:P,skip:u}),{enabled:p}),j=$(["mana-purchases",e==null?void 0:e.address],u=>se(e.address,{role:"buyer",first:P,skip:u}),{enabled:p}),{data:ee}=A({queryKey:["sale-payouts",e==null?void 0:e.address],queryFn:()=>ne(e.address,e.identity,{first:200}).then(u=>u.payouts),enabled:x,staleTime:6e4}),ge=g.useMemo(()=>tt(ee),[ee]),{data:fe}=Ne(x);if(!e)return t.jsxs(bt,{children:[t.jsx(T,{name:"clock",size:40,color:o.colors.muted2}),t.jsx(vt,{children:r("activity.signInTitle")}),t.jsx(jt,{children:r("activity.signInBody")})]});const te=et(Ze({purchases:p?y.items:[],sales:x?b.items:[],creditOrders:p?v.items:[],manaPurchases:p?j.items:[],rate:fe}),s),ye=p&&(y.isLoading||v.isLoading||j.isLoading)||x&&b.isLoading,ie=p&&(y.isFetchingNextPage||v.isFetchingNextPage||j.isFetchingNextPage)||x&&b.isFetchingNextPage,be=p&&(y.hasNextPage||v.hasNextPage||j.hasNextPage)||x&&b.hasNextPage;function ve(){p&&y.hasNextPage&&y.fetchNextPage(),p&&v.hasNextPage&&v.fetchNextPage(),p&&j.hasNextPage&&j.fetchNextPage(),x&&b.hasNextPage&&b.fetchNextPage()}function je(u){if(n(u),!a)return;const w=new URLSearchParams(i);w.delete(W),w.delete(G),d(w,{replace:!0})}function ke(){const u=new URLSearchParams(i);u.set(W,oe),u.delete(G),d(u,{replace:!0})}return t.jsxs(rt,{children:[t.jsx(ot,{children:t.jsx(dt,{children:r("nav.activity")})}),t.jsxs(ct,{role:"tablist","aria-label":r("nav.activity"),children:[It.map(u=>t.jsx(le,{type:"button",role:"tab","aria-selected":!a&&s===u,"data-active":!a&&s===u,"data-testid":`activity-filter-${u}`,onClick:()=>je(u),children:r(`activity.filter.${u}`)},u)),f?t.jsxs(lt,{type:"button",role:"tab","aria-selected":a,"data-active":a,"data-testid":"activity-filter-migrate","aria-label":h?r("activity.migrate.chipAria",{count:h}):void 0,onClick:ke,children:[r("activity.migrate.chip"),h?t.jsx(ut,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:h}):null]}):null]}),a?t.jsx(g.Suspense,{fallback:t.jsx(ht,{"aria-busy":"true"}),children:t.jsx(wt,{})}):ye?t.jsx(ae,{children:Array.from({length:5}).map((u,w)=>t.jsx(re,{},w))}):te.length===0?t.jsx(St,{filter:s}):t.jsxs(t.Fragment,{children:[t.jsxs(ae,{children:[te.map(u=>u.kind==="purchase"?t.jsx(Nt,{order:u.order},u.id):u.kind==="credit"?t.jsx(Tt,{order:u.order},u.id):u.kind==="mana-purchase"?t.jsx($t,{sale:u.sale},u.id):t.jsx(Pt,{sale:u.sale,payout:it(ge,u.sale)},u.id)),ie?t.jsx(re,{}):null]}),t.jsx(ze,{hasNextPage:be,isFetching:ie,onLoadMore:ve})]})]})}export{Bt as Activity};
389
- //# sourceMappingURL=Activity-Cb8UPooR.js.map
388
+ `,Z=L.withComponent(Oe),wt=g.lazy(()=>Pe(()=>import("./index-ficvqfHi.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])).then(e=>({default:e.ImportListings}))),P=24,It=["all","purchases","sales"],W="section",oe="listings",G="view",At="migrate";function I(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function pe(e){return e.length>10?`${e.slice(0,6)}…${e.slice(-4)}`:e}function xe(e){const s=Number(e)/1e18;return Number.isFinite(s)?s.toLocaleString("en",{maximumFractionDigits:2}):"0"}function me({children:e}){const s=g.useRef(null),[n,i]=g.useState(null),d=()=>{var h;const a=(h=s.current)==null?void 0:h.getBoundingClientRect();a&&i({top:a.bottom+8,left:a.left+a.width/2})};return t.jsxs(mt,{ref:s,tabIndex:0,onMouseEnter:d,onMouseLeave:()=>i(null),onFocus:d,onBlur:()=>i(null),children:[e,n?qe.createPortal(t.jsx(gt,{style:{top:n.top,left:n.left},role:"tooltip",children:r("activity.polygonMana")}),document.body):null]})}function Et({item:e}){const s=!!e.contractAddress&&!!e.itemId,n=!!e.tradeId||s,{data:i,isLoading:d}=A({queryKey:["order-line-display",e.tradeId,e.contractAddress,e.itemId],queryFn:()=>e.tradeId?Me(e.tradeId):Q(e.contractAddress,{itemId:e.itemId}),enabled:n,staleTime:5*6e4}),a=n&&d,h=(i==null?void 0:i.name)??r("activity.itemFallback"),c=(i==null?void 0:i.thumbnail)??"",x=B({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,f=t.jsxs(t.Fragment,{children:[a?t.jsx(J,{}):t.jsx(O,{children:c?t.jsx("img",{src:c,alt:h}):t.jsx(T,{name:"cart",size:20})}),t.jsxs(R,{children:[a?t.jsx(Y,{}):t.jsx(_,{title:h,children:h}),e.quantity>1?t.jsx(z,{children:r("activity.quantity",{count:e.quantity})}):null]}),t.jsxs(he,{children:[t.jsx(E,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.credits})]})]});return x?t.jsx(Z,{to:x,"data-link":"true",children:f}):t.jsx(L,{children:f})}function Lt({item:e}){const s=`@${e.registeredName}`;return t.jsxs(L,{"data-testid":"activity-name-line",children:[t.jsx(kt,{children:t.jsx("img",{src:We,alt:""})}),t.jsxs(R,{children:[t.jsx(_,{title:s,children:s}),t.jsx(z,{children:r("activity.nameRegistration")})]}),t.jsxs(he,{children:[t.jsx(E,{className:"ccy-mark"})," ",e.credits]})]})}function Nt({order:e}){const s=Ve(e.lines),n=s.reduce((a,h)=>a+h.quantity,0),i=Qe(e.status),d=i==="SETTLED"?r("activity.completed"):i==="FAILED"?r("activity.failed"):r("activity.processing");return t.jsxs(S,{"data-testid":"purchase-order",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsxs(M,{children:[r("activity.purchaseLabel")," · ",r("activity.itemCount",{count:n})]})]}),t.jsxs(H,{children:[t.jsx(q,{"data-status":i,children:d}),t.jsxs(k,{children:[t.jsx(E,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.totalCredits})]})]})]}),i==="FAILED"?t.jsx(ft,{children:r("activity.purchaseFailedNote")}):null,t.jsx(V,{children:s.map(a=>a.registeredName?t.jsx(Lt,{item:a},a.key):t.jsx(Et,{item:a},a.key))})]})}function $t({sale:e}){const{data:s,isLoading:n}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>Q(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),i=(s==null?void 0:s.name)??r("activity.itemFallback"),d=(s==null?void 0:s.thumbnail)??"",a=B({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,h=t.jsxs(t.Fragment,{children:[n?t.jsx(J,{}):t.jsx(O,{children:d?t.jsx("img",{src:d,alt:i}):t.jsx(T,{name:"offer",size:20})}),t.jsxs(R,{children:[n?t.jsx(Y,{}):t.jsx(_,{title:i,children:i}),t.jsx(z,{children:r("activity.boughtFrom",{account:pe(e.seller)})})]})]});return t.jsxs(S,{"data-testid":"activity-mana-purchase",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsx(M,{children:r("activity.paidWithMana")})]}),t.jsxs(H,{children:[t.jsx(q,{"data-status":"SETTLED",children:r("activity.completed")}),t.jsxs(k,{children:[xe(e.manaWei)," ",t.jsx(me,{children:t.jsx(ue,{src:de,alt:"MANA"})})]})]})]}),t.jsx(V,{children:a?t.jsx(Z,{to:a,"data-link":"true",children:h}):t.jsx(L,{children:h})})]})}function Pt({sale:e,payout:s}){const{data:n,isLoading:i}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>Q(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),d=(n==null?void 0:n.name)??r("activity.itemFallback"),a=(n==null?void 0:n.thumbnail)??"",h=B({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,c=t.jsxs(t.Fragment,{children:[i?t.jsx(J,{}):t.jsx(O,{children:a?t.jsx("img",{src:a,alt:d}):t.jsx(T,{name:"offer",size:20})}),t.jsxs(R,{children:[i?t.jsx(Y,{}):t.jsx(_,{title:d,children:d}),t.jsxs(z,{children:[r("activity.soldTo",{account:pe(e.counterparty)}),s.kind==="pending"?` · ${r("activity.payoutPendingOn",{date:I(s.availableAt)})}`:""]})]})]});return t.jsxs(S,{"data-testid":"activity-sale",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsx(M,{children:r("activity.saleLabel")})]}),t.jsxs(H,{children:[t.jsx(q,{"data-status":s.kind==="pending"?"PENDING":"SOLD",children:s.kind==="pending"?r("activity.payoutPending"):r("activity.sold")}),s.kind==="direct"?t.jsxs(k,{"data-kind":"income",children:["+",xe(e.manaWei)," ",t.jsx(me,{children:t.jsx(ue,{src:de,alt:"MANA"})})]}):s.credits!==null?t.jsxs(k,{"data-kind":"income",children:[t.jsx(E,{className:"ccy-mark"})," +",Fe(s.credits)]}):t.jsx(k,{"data-kind":"income",children:r("activity.payoutCredited")})]})]}),t.jsx(V,{children:h?t.jsx(Z,{to:h,"data-link":"true",children:c}):t.jsx(L,{children:c})})]})}function Tt({order:e}){const s=`$${(e.usdCents/100).toFixed(2)}`,n=Se(e.status),i=n==="SETTLED"?r("activity.completed"):n==="FAILED"?r("activity.failed"):n==="UNFINISHED"?r("activity.unfinished"):r("activity.processing"),d=U(p=>p.session),a=Ce(),[h,c]=g.useState(!1),x=e.status==="initiated"&&!!d;g.useEffect(()=>{const p=()=>c(!1);return window.addEventListener("pageshow",p),()=>window.removeEventListener("pageshow",p)},[]);async function f(){if(!(!d||h)){c(!0);try{const p=await De(e.id,d.identity);if(p.kind==="url"){if(/^https:\/\/([a-z0-9-]+\.)*stripe\.com\//i.test(p.url)){window.location.href=p.url;return}N.error(r("activity.resumeUnavailable"))}else p.kind==="expired"?(N.info(r("activity.resumeExpired")),a.invalidateQueries({queryKey:["credit-orders"]})):p.kind==="paid"?(N.success(r("activity.resumePaid")),a.invalidateQueries({queryKey:["credit-orders"]})):N.error(r("activity.resumeUnavailable"));c(!1)}catch{c(!1)}}}return t.jsx(S,{"data-testid":"credit-order",children:t.jsxs(C,{children:[t.jsx(pt,{children:t.jsx("img",{src:at,alt:"","aria-hidden":!0})}),t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsxs(M,{children:[r("activity.creditPurchaseLabel")," · ",r("activity.creditPaid",{usd:s})]})]}),t.jsxs(H,{children:[x?t.jsx(xt,{type:"button",onClick:()=>void f(),disabled:h,"data-testid":"resume-order",children:h?r("activity.resuming"):r("activity.resume")}):null,t.jsx(q,{"data-status":n,children:i}),t.jsxs(k,{"data-kind":n==="UNFINISHED"?void 0:"income",children:[n==="UNFINISHED"?"":"+",t.jsx(E,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.credits})]})]})]})})}function St({filter:e}){const s={all:r("activity.emptyAllBody"),purchases:r("activity.emptyPurchasesBody"),sales:r("activity.emptySalesBody")}[e];return t.jsx(bt,{children:t.jsx(Te,{testId:`activity-empty-${e}`,icon:_e,title:r("activity.emptyTitle"),body:s,cta:{label:r("assets.empty.cta"),to:"/items"}})})}function Bt(){const{session:e}=U(),[s,n]=g.useState("all"),[i,d]=He(),a=i.get(W)===oe||i.get(G)===At;Le({title:a?r("seo.import.title"):r("nav.activity"),noindex:!0});const{count:h}=Re(),{count:c}=nt(),f=h!==void 0&&c!==void 0&&(h>0||c>0||a),p=!!e&&!a&&s!=="sales",m=!!e&&!a&&s!=="purchases",b=$(["purchases",e==null?void 0:e.address],u=>$e(e.address,e.identity,{first:P,skip:u}),{enabled:p}),y=$(["sales",e==null?void 0:e.address],u=>se(e.address,{role:"seller",first:P,skip:u}),{enabled:m}),v=$(["credit-orders",e==null?void 0:e.address],u=>ne(e.address,e.identity,{first:P,skip:u}),{enabled:p}),j=$(["mana-purchases",e==null?void 0:e.address],u=>se(e.address,{role:"buyer",first:P,skip:u}),{enabled:p}),{data:ee}=A({queryKey:["sale-payouts",e==null?void 0:e.address],queryFn:()=>ne(e.address,e.identity,{first:200}).then(u=>u.payouts),enabled:m,staleTime:6e4}),ge=g.useMemo(()=>tt(ee),[ee]),{data:fe}=Ne(m);if(!e)return t.jsxs(yt,{children:[t.jsx(T,{name:"clock",size:40,color:o.colors.muted2}),t.jsx(vt,{children:r("activity.signInTitle")}),t.jsx(jt,{children:r("activity.signInBody")})]});const te=et(Ze({purchases:p?b.items:[],sales:m?y.items:[],creditOrders:p?v.items:[],manaPurchases:p?j.items:[],rate:fe}),s),be=p&&(b.isLoading||v.isLoading||j.isLoading)||m&&y.isLoading,ie=p&&(b.isFetchingNextPage||v.isFetchingNextPage||j.isFetchingNextPage)||m&&y.isFetchingNextPage,ye=p&&(b.hasNextPage||v.hasNextPage||j.hasNextPage)||m&&y.hasNextPage;function ve(){p&&b.hasNextPage&&b.fetchNextPage(),p&&v.hasNextPage&&v.fetchNextPage(),p&&j.hasNextPage&&j.fetchNextPage(),m&&y.hasNextPage&&y.fetchNextPage()}function je(u){if(n(u),!a)return;const w=new URLSearchParams(i);w.delete(W),w.delete(G),d(w,{replace:!0})}function ke(){const u=new URLSearchParams(i);u.set(W,oe),u.delete(G),d(u,{replace:!0})}return t.jsxs(rt,{children:[t.jsx(ot,{children:t.jsx(dt,{children:r("nav.activity")})}),t.jsxs(ct,{role:"tablist","aria-label":r("nav.activity"),children:[It.map(u=>t.jsx(le,{type:"button",role:"tab","aria-selected":!a&&s===u,"data-active":!a&&s===u,"data-testid":`activity-filter-${u}`,onClick:()=>je(u),children:r(`activity.filter.${u}`)},u)),f?t.jsxs(lt,{type:"button",role:"tab","aria-selected":a,"data-active":a,"data-testid":"activity-filter-migrate","aria-label":h?r("activity.migrate.chipAria",{count:h}):void 0,onClick:ke,children:[r("activity.migrate.chip"),h?t.jsx(ut,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:h}):null]}):null]}),a?t.jsx(g.Suspense,{fallback:t.jsx(ht,{"aria-busy":"true"}),children:t.jsx(wt,{})}):be?t.jsx(ae,{children:Array.from({length:5}).map((u,w)=>t.jsx(re,{},w))}):te.length===0?t.jsx(St,{filter:s}):t.jsxs(t.Fragment,{children:[t.jsxs(ae,{children:[te.map(u=>u.kind==="purchase"?t.jsx(Nt,{order:u.order},u.id):u.kind==="credit"?t.jsx(Tt,{order:u.order},u.id):u.kind==="mana-purchase"?t.jsx($t,{sale:u.sale},u.id):t.jsx(Pt,{sale:u.sale,payout:it(ge,u.sale)},u.id)),ie?t.jsx(re,{}):null]}),t.jsx(ze,{hasNextPage:ye,isFetching:ie,onLoadMore:ve})]})]})}export{Bt as Activity};
389
+ //# sourceMappingURL=Activity-BhrsqnTy.js.map
@@ -1,4 +1,4 @@
1
- import{r as u,j as d}from"./react-C_gdQiCE.js";import{s as f}from"./index-DO2w-wQR.js";import"./dcl-schemas-Z_oWg9h9.js";import"./sentry-Cxy688Uv.js";import"./ethers-Cpz0Q6xx.js";import"./intl-AKLEHPeO.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="dd04e7a8-8597-4cf7-8622-00893428b5b6",e._sentryDebugIdIdentifier="sentry-dbid-dd04e7a8-8597-4cf7-8622-00893428b5b6")}catch{}})();const D="https://cdn.decentraland.org/@dcl/shop/1.11.2-33050849044.commit-d710ef0/_assets/custom-welcome-background-BxlFQma9.webp",P="https://cdn.decentraland.org/@dcl/shop/1.11.2-33050849044.commit-d710ef0/_assets/DCL_LogoPattern-BryBPc3d.png",L=`
1
+ import{r as u,j as d}from"./react-Io5Wove7.js";import{s as f}from"./index-bJXcZSYa.js";import"./dcl-schemas-OH8G4Ndl.js";import"./sentry-faeuEJiQ.js";import"./ethers-DwK2TdL6.js";import"./intl-AKLEHPeO.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="6e401ab1-fd43-4d45-9450-51dbf58d041b",e._sentryDebugIdIdentifier="sentry-dbid-6e401ab1-fd43-4d45-9450-51dbf58d041b")}catch{}})();const D="https://cdn.decentraland.org/@dcl/shop/1.11.2/_assets/custom-welcome-background-BxlFQma9.webp",P="https://cdn.decentraland.org/@dcl/shop/1.11.2/_assets/DCL_LogoPattern-BryBPc3d.png",L=`
2
2
  attribute vec2 a_position;
3
3
  varying vec2 v_uv;
4
4
  void main() {
@@ -95,4 +95,4 @@ void main() {
95
95
  width: 100%;
96
96
  height: 100%;
97
97
  `;function K({patternTiling:e=1.66}){const a=u.useRef(null),n=u.useRef(0),r=u.useRef(e);return r.current=e,u.useEffect(()=>{var _;const o=a.current;if(!o||(_=window.matchMedia)!=null&&_.call(window,"(prefers-reduced-motion: reduce)").matches)return;const t=o.getContext("webgl",{alpha:!1,antialias:!1});if(!t)return;const c=p(t,t.VERTEX_SHADER,L),s=p(t,t.FRAGMENT_SHADER,I);if(!c||!s){c&&t.deleteShader(c),s&&t.deleteShader(s);return}const i=B(t,c,s);if(!i){t.deleteShader(c),t.deleteShader(s);return}const m=t.getAttribLocation(i,"a_position"),R=t.getUniformLocation(i,"u_time"),w=t.getUniformLocation(i,"u_resolution"),b=t.getUniformLocation(i,"u_overlayTex"),A=t.getUniformLocation(i,"u_overlayTiling"),v=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,v),t.bufferData(t.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),t.STATIC_DRAW);let g=!1;const h=F(t,P,()=>g),S=()=>{const l=window.devicePixelRatio||1,E=o.clientWidth*l,x=o.clientHeight*l;(o.width!==E||o.height!==x)&&(o.width=E,o.height=x)},U=performance.now()/1e3,y=()=>{S(),t.viewport(0,0,o.width,o.height),t.useProgram(i),t.uniform1f(R,performance.now()/1e3-U),t.uniform2f(w,o.width,o.height),t.uniform1f(A,r.current),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,h),t.uniform1i(b,0),t.enableVertexAttribArray(m),t.bindBuffer(t.ARRAY_BUFFER,v),t.vertexAttribPointer(m,2,t.FLOAT,!1,0,0),t.drawArrays(t.TRIANGLES,0,6),n.current=requestAnimationFrame(y)},T=l=>{l.preventDefault(),cancelAnimationFrame(n.current),o.style.opacity="0"};return o.addEventListener("webglcontextlost",T,!1),n.current=requestAnimationFrame(y),()=>{g=!0,cancelAnimationFrame(n.current),o.removeEventListener("webglcontextlost",T),t.deleteProgram(i),t.deleteShader(c),t.deleteShader(s),t.deleteBuffer(v),t.deleteTexture(h)}},[]),d.jsxs(C,{"aria-hidden":!0,children:[d.jsx(k,{style:{backgroundImage:`url(${D})`}}),d.jsx(V,{ref:a})]})}export{K as default};
98
- //# sourceMappingURL=AnimatedBackground-DTrZDJA8.js.map
98
+ //# sourceMappingURL=AnimatedBackground-DB2urHfN.js.map
@@ -1,4 +1,4 @@
1
- import{r as u,b as He,j as e,u as et}from"./react-C_gdQiCE.js";import{u as tt,s as nt}from"./search-empty-CZAYhXXz.js";import{u as st,t as Ie,R as it,j as ot,k as rt,l as at,m as lt,n as ct,o as dt,p as ht,v as pt,q as ut,r as ft,M as mt,s as xt}from"./browseLayout.styles-BGMKaxNl.js";import{c as V,R as gt,bv as bt,br as yt,aA as wt,a as vt,l as jt,cw as Ct,cx as $t,s as i,t,o as Oe,bf as kt,r as St,E as ve,b as n,p as Et,I as E,q as O,cy as le,bd as Tt,ad as oe,bn as Le,bu as Rt,bt as _t,n as De,J as Ge,U as qe,V as It,ar as Lt,L as Nt,S as Ne,M as J,aI as At,bE as zt}from"./index-DO2w-wQR.js";import{L as Mt}from"./LoadMore-BwZO73du.js";import{u as Wt}from"./useInfiniteGrid-R77Z-ty5.js";import{n as Bt,S as Pt}from"./categories-CcQWbCI7.js";import{E as Ft}from"./ErrorNotice-CSHOj_36.js";import{d as Ut}from"./dcl-schemas-Z_oWg9h9.js";import{s as Ht,G as Ot,w as Dt,S as Gt}from"./buy-gasless-SuVAuIoA.js";import{s as qt,o as Vt}from"./buy-Cmc6VGNE.js";import{f as Zt}from"./errors-BOK5UzVJ.js";import{J as Qt,C as Kt,B as je}from"./ethers-Cpz0Q6xx.js";import{n as Jt}from"./name-glyph-aUugT8vq.js";import{G as Xt}from"./grid.styles-BgULreOR.js";import"./skeleton.styles-B1HNltmx.js";import"./sentry-Cxy688Uv.js";import"./intl-AKLEHPeO.js";import"./authorizations-ChjDHhq0.js";import"./sendMetaTransaction-Bu8b5LeI.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new s.Error().stack;o&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[o]="9987aca8-be7b-48e2-afd0-73777badf041",s._sentryDebugIdIdentifier="sentry-dbid-9987aca8-be7b-48e2-afd0-73777badf041")}catch{}})();function X(s){const o=s.source??"item",r=s.tradeId||`${s.contractAddress}-${s.tokenId??s.itemId??""}`;return`${o}:${r}`}const Z="100000000000000000000",Ve=2,re=15,Yt=/^[a-zA-Z0-9]+$/;function Ae(s){const o=s.trim();return o.length===0?{ok:!1,reason:"empty"}:Yt.test(o)?o.length<Ve?{ok:!1,reason:"too-short"}:o.length>re?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function en(s){return s.replace(/[^a-zA-Z0-9]/g,"").slice(0,re)}const tn=["function available(string _subdomain) view returns (bool)"],ze={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function nn(){return V.chainId===Number(Ut.ChainId.MATIC_MAINNET)?ze.mainnet:ze.sepolia}async function sn(s,o={}){var m;const{rpc:r,address:d}=nn(),h=new Qt(r),f=new Kt(d,tn,h);console.info(`[names] availability check → DCLRegistrar(${d}).available("${s}") on ${r}`);const l=await f.available(s);if((m=o.signal)!=null&&m.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${s}" available=${l}`),l?"available":"taken"}const on="https://app.across.to/api";class ke extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}class Ce extends Error{constructor(){super("The name could not be registered on Ethereum; your funds were recovered."),this.name="NameNotRegisteredError"}}class $e extends Error{constructor(){super("We couldn't confirm whether the purchase went through."),this.name="NameSettlementUnknownError"}}function rn(s){return wt(Z,s)}async function an(s,o,r={}){var m;const d=r.chainId??V.chainId,h=r.provider??"across",f=`${V.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(o)}&chainId=${d}&provider=${h}`,l=await vt(f,{method:"GET",identity:s,metadata:{}});if(!l.ok){let c;try{c=(m=await l.json())==null?void 0:m.code}catch{}throw c==="ROUTE_COST_TOO_HIGH"?new ke:new Error(`fetchNameCreditRoute ${l.status}`)}return l.json()}function ln(s,o){const r=je.from(s.availableAmount),h=je.from(Z).sub(r);return{credits:[{value:s.amount,expiresAt:Number(s.expiresAt),salt:Vt(s.id)}],creditsSignatures:[s.signature],externalCall:{target:o.externalCall.target,selector:o.externalCall.selector,data:o.externalCall.data,expiresAt:o.externalCall.expiresAt,salt:o.externalCall.salt},customExternalCallSignature:o.customExternalCallSignature,maxUncreditedValue:h.isNegative()?"0":h.toString(),maxCreditedValue:Z}}async function cn(s,o={}){const r=on,d=o.intervalMs??1e4,h=o.maxAttempts??60;let f={status:"pending",destinationTxHash:null,actionsSucceeded:null};for(let l=0;l<h;l++){try{const m=await fetch(`${r}/deposit/status?originChainId=137&depositTxHash=${s}`);if(m.ok){const c=await m.json(),g=(c.status??"pending").toLowerCase(),p=c.fillTx??c.fillTxnRef??null,b=typeof c.actionsSucceeded=="boolean"?c.actionsSucceeded:null;if(g==="filled")return{status:"filled",destinationTxHash:p,actionsSucceeded:b};if(g==="refunded"||g==="expired")return{status:g,destinationTxHash:null,actionsSucceeded:!1};f={status:"pending",destinationTxHash:p,actionsSucceeded:b}}}catch{}l<h-1&&await new Promise(m=>setTimeout(m,d))}return f}async function dn(s){const{name:o,identity:r,signer:d}=s,h=p=>{var b;try{(b=s.onProgress)==null||b.call(s,p)}catch{}},f=s.chainId??V.chainId,l=s.provider??"across",m=(s.beneficiary??await d.getAddress()).toLowerCase();let c=null,g="unconfirmed";console.info("[names] register start",{name:o,buyer:m,chainId:f,provider:l}),h("preparing");try{const p=await gt(f),b=rn(p);console.info("[names] step 1/6 sized reservation",{usdCents:b,manaRate:p});const C=await an(r,o,{chainId:f,provider:l});console.info("[names] step 2/6 route fetched",{target:C.externalCall.target,selector:C.externalCall.selector,provider:C.provider,quoteId:C.quoteId});const w=await bt(r,b,void 0,void 0,o);if(c=w.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:w.credit.id,maxCreditedValue:w.maxCreditedValue}),je.from(w.maxCreditedValue).lt(Z))throw new Error("Credit under-sized for the name price");h("awaiting-confirmation");const $=ln(w.credit,C);let v;try{v=await Ht({chainId:f,buyer:m,signer:d,args:$})}catch(x){if(!(x instanceof Ot))throw x;if(x.reason==="relayer-unreachable"){g="unobservable";const k=new $e;throw k.cause=x,k}v=await qt(f,$,d)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:v}),h("confirming"),await Dt(v),g="confirmed",console.info("[names] step 5/6 origin tx confirmed",{originTxHash:v}),l==="across"){h("registering");const x=await cn(v,s.acrossPoll);if(console.info("[names] step 6/6 across status",x),x.status==="pending")return{status:"pending",originTxHash:v};if(x.status==="filled"&&x.actionsSucceeded===null)return console.warn("[names] across filled without reporting actionsSucceeded — reporting pending",{originTxHash:v}),{status:"pending",originTxHash:v};if(x.status!=="filled"||x.actionsSucceeded!==!0)throw new Ce;return{status:"registered",originTxHash:v,destinationTxHash:x.destinationTxHash}}return{status:"pending",originTxHash:v}}catch(p){if(console.error("[names] register failed — raw error:",p,{name:o,buyer:m,originState:g}),p instanceof Gt)return{status:"pending",originTxHash:p.txHash};if(c&&g==="unconfirmed"&&await yt(r,[c]).catch(()=>{}),p instanceof ke||p instanceof Ce||p instanceof $e)throw p;const b=new Error(Zt(p,"Couldn't register the name. Please try again.",{sale:!0}));throw b.cause=p,b}}function hn(){const{data:s}=jt({queryKey:["feature-flag","shop-names"],queryFn:()=>Ct($t.SHOP_NAMES),staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return s===!0}const pn=60,un=700,fn=25;function mn(s){if(!s)return[];const o=[];for(let r=1;r<=s.length;r++)o.push({text:s.slice(0,r),delay:pn});o[o.length-1]={text:s,delay:un};for(let r=s.length-1;r>=1;r--)o.push({text:s.slice(0,r),delay:fn});return o}function xn(s){return s.flatMap(mn)}function gn(s,o){const r=u.useMemo(()=>xn(s),[s]),[d,h]=u.useState(0);return u.useEffect(()=>{if(!o||r.length===0)return;const f=setTimeout(()=>h(l=>(l+1)%r.length),r[d%r.length].delay);return()=>clearTimeout(f)},[d,o,r]),!o||r.length===0?"":r[d%r.length].text}const bn="https://cdn.decentraland.org/@dcl/shop/1.11.2-33050849044.commit-d710ef0/_assets/name-verified-oGwQ3ntb.svg",yn="#34fee6",wn=i.div`
1
+ import{r as u,b as He,j as e,u as et}from"./react-Io5Wove7.js";import{u as tt,s as nt}from"./search-empty-C2pIWVz4.js";import{u as st,t as Ie,R as it,j as ot,k as rt,l as at,m as lt,n as ct,o as dt,p as ht,v as pt,q as ut,r as ft,M as mt,s as xt}from"./browseLayout.styles-C_vn8XYJ.js";import{c as V,R as gt,bv as bt,br as yt,aA as wt,a as vt,l as jt,cw as Ct,cx as $t,s as i,t,o as Oe,bf as kt,r as St,E as ve,b as n,p as Et,I as E,q as O,cy as le,bd as Tt,ad as oe,bn as Le,bu as Rt,bt as _t,n as De,J as Ge,U as qe,V as It,ar as Lt,L as Nt,S as Ne,M as J,aI as At,bE as zt}from"./index-bJXcZSYa.js";import{L as Mt}from"./LoadMore-hoiSVN2H.js";import{u as Wt}from"./useInfiniteGrid-CKUOL3of.js";import{n as Bt,S as Pt}from"./categories-DSulO5YB.js";import{E as Ft}from"./ErrorNotice-BanVYx_o.js";import{d as Ut}from"./dcl-schemas-OH8G4Ndl.js";import{s as Ht,G as Ot,w as Dt,S as Gt}from"./buy-gasless-Co1yjKqt.js";import{s as qt,o as Vt}from"./buy-C9vFcpIy.js";import{f as Zt}from"./errors-ISVrHVty.js";import{J as Qt,C as Kt,B as je}from"./ethers-DwK2TdL6.js";import{n as Jt}from"./name-glyph-aUugT8vq.js";import{G as Xt}from"./grid.styles-DlGaOCzf.js";import"./skeleton.styles-Cjpy58bn.js";import"./sentry-faeuEJiQ.js";import"./intl-AKLEHPeO.js";import"./authorizations-DC168PVR.js";import"./sendMetaTransaction-Bnb1e1Oo.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new s.Error().stack;o&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[o]="fcf1fb08-af1b-446f-8e96-3b0a5eb36b77",s._sentryDebugIdIdentifier="sentry-dbid-fcf1fb08-af1b-446f-8e96-3b0a5eb36b77")}catch{}})();function X(s){const o=s.source??"item",r=s.tradeId||`${s.contractAddress}-${s.tokenId??s.itemId??""}`;return`${o}:${r}`}const Z="100000000000000000000",Ve=2,re=15,Yt=/^[a-zA-Z0-9]+$/;function Ae(s){const o=s.trim();return o.length===0?{ok:!1,reason:"empty"}:Yt.test(o)?o.length<Ve?{ok:!1,reason:"too-short"}:o.length>re?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function en(s){return s.replace(/[^a-zA-Z0-9]/g,"").slice(0,re)}const tn=["function available(string _subdomain) view returns (bool)"],ze={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function nn(){return V.chainId===Number(Ut.ChainId.MATIC_MAINNET)?ze.mainnet:ze.sepolia}async function sn(s,o={}){var m;const{rpc:r,address:d}=nn(),h=new Qt(r),f=new Kt(d,tn,h);console.info(`[names] availability check → DCLRegistrar(${d}).available("${s}") on ${r}`);const l=await f.available(s);if((m=o.signal)!=null&&m.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${s}" available=${l}`),l?"available":"taken"}const on="https://app.across.to/api";class ke extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}class Ce extends Error{constructor(){super("The name could not be registered on Ethereum; your funds were recovered."),this.name="NameNotRegisteredError"}}class $e extends Error{constructor(){super("We couldn't confirm whether the purchase went through."),this.name="NameSettlementUnknownError"}}function rn(s){return wt(Z,s)}async function an(s,o,r={}){var m;const d=r.chainId??V.chainId,h=r.provider??"across",f=`${V.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(o)}&chainId=${d}&provider=${h}`,l=await vt(f,{method:"GET",identity:s,metadata:{}});if(!l.ok){let c;try{c=(m=await l.json())==null?void 0:m.code}catch{}throw c==="ROUTE_COST_TOO_HIGH"?new ke:new Error(`fetchNameCreditRoute ${l.status}`)}return l.json()}function ln(s,o){const r=je.from(s.availableAmount),h=je.from(Z).sub(r);return{credits:[{value:s.amount,expiresAt:Number(s.expiresAt),salt:Vt(s.id)}],creditsSignatures:[s.signature],externalCall:{target:o.externalCall.target,selector:o.externalCall.selector,data:o.externalCall.data,expiresAt:o.externalCall.expiresAt,salt:o.externalCall.salt},customExternalCallSignature:o.customExternalCallSignature,maxUncreditedValue:h.isNegative()?"0":h.toString(),maxCreditedValue:Z}}async function cn(s,o={}){const r=on,d=o.intervalMs??1e4,h=o.maxAttempts??60;let f={status:"pending",destinationTxHash:null,actionsSucceeded:null};for(let l=0;l<h;l++){try{const m=await fetch(`${r}/deposit/status?originChainId=137&depositTxHash=${s}`);if(m.ok){const c=await m.json(),g=(c.status??"pending").toLowerCase(),p=c.fillTx??c.fillTxnRef??null,b=typeof c.actionsSucceeded=="boolean"?c.actionsSucceeded:null;if(g==="filled")return{status:"filled",destinationTxHash:p,actionsSucceeded:b};if(g==="refunded"||g==="expired")return{status:g,destinationTxHash:null,actionsSucceeded:!1};f={status:"pending",destinationTxHash:p,actionsSucceeded:b}}}catch{}l<h-1&&await new Promise(m=>setTimeout(m,d))}return f}async function dn(s){const{name:o,identity:r,signer:d}=s,h=p=>{var b;try{(b=s.onProgress)==null||b.call(s,p)}catch{}},f=s.chainId??V.chainId,l=s.provider??"across",m=(s.beneficiary??await d.getAddress()).toLowerCase();let c=null,g="unconfirmed";console.info("[names] register start",{name:o,buyer:m,chainId:f,provider:l}),h("preparing");try{const p=await gt(f),b=rn(p);console.info("[names] step 1/6 sized reservation",{usdCents:b,manaRate:p});const C=await an(r,o,{chainId:f,provider:l});console.info("[names] step 2/6 route fetched",{target:C.externalCall.target,selector:C.externalCall.selector,provider:C.provider,quoteId:C.quoteId});const w=await bt(r,b,void 0,void 0,o);if(c=w.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:w.credit.id,maxCreditedValue:w.maxCreditedValue}),je.from(w.maxCreditedValue).lt(Z))throw new Error("Credit under-sized for the name price");h("awaiting-confirmation");const $=ln(w.credit,C);let v;try{v=await Ht({chainId:f,buyer:m,signer:d,args:$})}catch(x){if(!(x instanceof Ot))throw x;if(x.reason==="relayer-unreachable"){g="unobservable";const k=new $e;throw k.cause=x,k}v=await qt(f,$,d)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:v}),h("confirming"),await Dt(v),g="confirmed",console.info("[names] step 5/6 origin tx confirmed",{originTxHash:v}),l==="across"){h("registering");const x=await cn(v,s.acrossPoll);if(console.info("[names] step 6/6 across status",x),x.status==="pending")return{status:"pending",originTxHash:v};if(x.status==="filled"&&x.actionsSucceeded===null)return console.warn("[names] across filled without reporting actionsSucceeded — reporting pending",{originTxHash:v}),{status:"pending",originTxHash:v};if(x.status!=="filled"||x.actionsSucceeded!==!0)throw new Ce;return{status:"registered",originTxHash:v,destinationTxHash:x.destinationTxHash}}return{status:"pending",originTxHash:v}}catch(p){if(console.error("[names] register failed — raw error:",p,{name:o,buyer:m,originState:g}),p instanceof Gt)return{status:"pending",originTxHash:p.txHash};if(c&&g==="unconfirmed"&&await yt(r,[c]).catch(()=>{}),p instanceof ke||p instanceof Ce||p instanceof $e)throw p;const b=new Error(Zt(p,"Couldn't register the name. Please try again.",{sale:!0}));throw b.cause=p,b}}function hn(){const{data:s}=jt({queryKey:["feature-flag","shop-names"],queryFn:()=>Ct($t.SHOP_NAMES),staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return s===!0}const pn=60,un=700,fn=25;function mn(s){if(!s)return[];const o=[];for(let r=1;r<=s.length;r++)o.push({text:s.slice(0,r),delay:pn});o[o.length-1]={text:s,delay:un};for(let r=s.length-1;r>=1;r--)o.push({text:s.slice(0,r),delay:fn});return o}function xn(s){return s.flatMap(mn)}function gn(s,o){const r=u.useMemo(()=>xn(s),[s]),[d,h]=u.useState(0);return u.useEffect(()=>{if(!o||r.length===0)return;const f=setTimeout(()=>h(l=>(l+1)%r.length),r[d%r.length].delay);return()=>clearTimeout(f)},[d,o,r]),!o||r.length===0?"":r[d%r.length].text}const bn="https://cdn.decentraland.org/@dcl/shop/1.11.2/_assets/name-verified-oGwQ3ntb.svg",yn="#34fee6",wn=i.div`
2
2
  position: fixed;
3
3
  inset: 0;
4
4
  z-index: 10000;
@@ -458,7 +458,7 @@ import{r as u,b as He,j as e,u as et}from"./react-C_gdQiCE.js";import{u as tt,s
458
458
  color: ${t.colors.accent};
459
459
  }
460
460
  }
461
- `;function Gn({name:s,priceCredits:o,onClose:r}){const{session:d}=Oe(),{data:h,isError:f}=kt(d),l=St(),m=He(),[c,g]=u.useState("confirm"),[p,b]=u.useState(""),[C,w]=u.useState(null),[$,v]=u.useState(!1),[x,k]=u.useState("preparing"),L=u.useRef(!1),T=p.trim().toLowerCase()===s.toLowerCase(),N=c==="completing",M=o!=null?ve(o):"—",B=o==null,W=h==null?void 0:h.credits,P=o!=null&&W!=null?o-W:0,S=P>0,F=B?n("names.priceUnavailable"):S?n("names.insufficientCredits",{credits:ve(P)}):null;u.useEffect(()=>{const y=G=>{G.key==="Escape"&&!N&&r()};document.addEventListener("keydown",y);const D=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=D}},[N,r]);async function R(){if(!(!d||!T||B||S||L.current)){L.current=!0,g("completing"),w(null),k("preparing");try{const y=await dn({name:s,identity:d.identity,signer:d.signer,onProgress:k});oe("Shop Completed Purchase",{items:[{item_id:null,contract_address:null,token_id:null,price_usd:Le(o??0),category:"name",is_smart:!1}],purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,value_usd:Le(o??0),transaction_hash:y.originTxHash??null,settlement:y.status}),l.invalidateQueries({queryKey:["usd-balance"]}),l.invalidateQueries({queryKey:["my-assets"]}),g(y.status==="registered"?"success":"pending")}catch(y){oe(_t(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Rt(y),purchase_type:"name"});const D=y instanceof Ce,G=y instanceof $e;w(y instanceof ke?n("names.errorRouteCost"):D?n("names.errorNotRegistered"):G?n("names.errorSettlementUnknown"):(y==null?void 0:y.message)||n("names.errorGeneric")),v(D||G),g("error")}finally{L.current=!1}}}const _=c!=="success"&&c!=="pending",j=Et(d==null?void 0:d.providerType),A=j?2:1,z=j&&(x==="preparing"||x==="awaiting-confirmation"),I=z?1:A,ae=z?n("names.confirming"):n("names.completing"),U=x==="registering"?n("names.processingRegistering"):null;return e.jsx(wn,{onClick:N?void 0:r,role:"presentation",children:e.jsxs(vn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[_&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:c==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(he,{onClick:r,disabled:N,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,f)]}),e.jsx(ue,{})]}),(c==="confirm"||c==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(fe,{children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),M]})]}),c==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(we,{children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:C})]}),$?e.jsx(ye,{onClick:r,children:n("names.errorSpentDismiss")}):e.jsx(ye,{onClick:()=>g("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Sn,{children:[e.jsx(En,{children:n("names.confirmTitle")}),e.jsx(Tn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${qn(s)}</b>`})}}),e.jsxs(Rn,{children:[e.jsx(_n,{"aria-hidden":!0,children:"@"}),e.jsx(In,{value:p,onChange:y=>b(y.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(p.length,8)}ch`}}),e.jsx(Ln,{children:".dcl.eth"})]})]}),F?e.jsxs(we,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:F})]}):null,e.jsx(ye,{onClick:()=>void R(),disabled:!T||!d||B||S,children:n("names.buyCta")})]})]}),c==="completing"&&e.jsxs(Nn,{children:[e.jsx(An,{src:Tt,alt:"",width:61,height:61}),e.jsxs(zn,{children:[e.jsx(Mn,{children:ae}),e.jsxs(Bn,{children:[e.jsx(Pn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(Fn,{"data-testid":"name-progress-count",children:`${I}/${A}`})]}),U?e.jsx(Wn,{children:U}):null]})]}),c==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:n("names.pendingHeaderTitle")}),e.jsx(he,{onClick:r,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,f)]}),e.jsx(ue,{}),e.jsxs(we,{"data-tone":"info",children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(fe,{style:{marginTop:20},children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),M]})]}),e.jsx(We,{children:e.jsx(Be,{onClick:()=>{r(),m("/my-items")},children:n("names.myItems")})})]}),c==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:n("names.successHeaderTitle")}),e.jsx(he,{onClick:r,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,f)]}),e.jsx(ue,{}),e.jsxs(Un,{children:[e.jsx(Hn,{"aria-hidden":!0,children:e.jsx(E,{name:"check"})}),e.jsxs(On,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(fe,{style:{marginTop:20},children:[e.jsxs(jn,{"data-testid":"name-success-tile",children:[e.jsx(Cn,{src:Jt,alt:"","aria-hidden":!0,width:47,height:47}),e.jsxs($n,{children:[e.jsx("span",{"aria-hidden":!0,children:s}),e.jsx(kn,{src:bn,alt:"","aria-hidden":!0,width:14,height:14})]})]}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),M]})]}),e.jsxs(We,{children:[e.jsx(Be,{onClick:()=>{r(),m("/my-items")},children:n("names.myItems")}),e.jsx(Dn,{href:V.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function qn(s){return s.replace(/[&<>"']/g,o=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[o])}const Vn="https://cdn.decentraland.org/@dcl/shop/1.11.2-33050849044.commit-d710ef0/_assets/identity-icon-C8yAW_Gq.svg",Zn="https://cdn.decentraland.org/@dcl/shop/1.11.2-33050849044.commit-d710ef0/_assets/world-icon-6xQ-PmmW.svg",Qn="https://cdn.decentraland.org/@dcl/shop/1.11.2-33050849044.commit-d710ef0/_assets/invite-icon-Bz6lCTuB.svg",Kn="data:image/svg+xml,%3csvg%20width='55.6797'%20height='63.6174'%20viewBox='0%200%2055.6797%2063.6174'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Vote'%3e%3cpath%20id='Vector'%20d='M0.055012%2039.1045C1.61191%2039.4989%202.83757%2039.3938%204.4307%2039.392L8.27108%2039.3878L20.7762%2039.3883L42.8819%2039.3904L50.0954%2039.3907C51.793%2039.3907%2054.0562%2039.5509%2055.6466%2039.0843C55.5909%2040.7931%2055.647%2042.8581%2055.6469%2044.5864L55.6479%2055.616L55.6559%2059.5618C55.6583%2060.6219%2055.8213%2061.9838%2055.261%2062.8837C55.2205%2062.9265%2055.1794%2062.9688%2055.1377%2063.0104C54.7986%2063.3482%2054.3791%2063.5594%2053.9021%2063.5761C52.0714%2063.642%2050.1544%2063.6097%2048.3241%2063.6078L37.4452%2063.6066L2.97352%2063.6103C2.2022%2063.6084%201.15943%2063.6718%200.589171%2063.0576C-0.204857%2062.2037%200.0327979%2060.3244%200.0349529%2059.1687L0.0414734%2054.3929C0.0413119%2049.3191%20-0.00749456%2044.1727%200.055012%2039.1045Z'%20fill='white'%20fill-opacity='0.8'/%3e%3cpath%20id='Subtract'%20d='M37.1168%200.00495927C38.1773%200.00461149%2039.2888%20-0.0284991%2040.3433%200.0811311C41.0714%200.15695%2041.7266%200.914583%2041.7857%201.63484C41.853%202.45491%2041.8268%203.31926%2041.8258%204.15144L41.8189%208.70418L41.8199%2023.9639L40.1099%2023.9659L13.8726%2023.963L13.8678%209.0909L13.8648%204.29793C13.8644%202.52652%2013.3942%200.34203%2015.6754%200.0342561C15.8907%200.016712%2016.237%200.0120998%2016.4557%200.0117952C21.6059%200.00480262%2026.761%200.0117634%2031.9107%200.00788896L37.1168%200.00495927ZM33.3834%206.17293C32.439%206.55612%2031.0531%208.12922%2030.3014%208.88191L25.8297%2013.3634C25.3537%2012.824%2023.3455%2010.7605%2022.8209%2010.4239C22.5581%2010.2549%2022.2566%2010.1546%2021.9449%2010.1329C21.4563%2010.1008%2020.9754%2010.2879%2020.6139%2010.6134C20.2442%2010.9428%2020.0227%2011.4077%2020.0006%2011.9024C19.9561%2013.0748%2021.3406%2014.1198%2022.1256%2014.8868C22.9429%2015.714%2024.1669%2017.1028%2025.1168%2017.67C26.1632%2018.2949%2027.3471%2017.2145%2027.9723%2016.4942C30.25%2014.2025%2032.5393%2011.9456%2034.8101%209.64949C35.2937%209.16062%2035.7138%208.69126%2035.6851%207.96199C35.6419%206.86558%2034.7821%206.09682%2033.6959%206.14656C33.5914%206.15085%2033.4872%206.16001%2033.3834%206.17293Z'%20fill='%23FF7439'/%3e%3cpath%20id='Vector_2'%20d='M45.5498%2015.976C46.6399%2015.986%2049.9504%2015.7705%2050.7361%2016.241C51.0104%2016.4053%2051.2831%2016.6446%2051.4181%2016.9397C51.892%2017.9763%2052.1015%2019.357%2052.3802%2020.4819L54.0582%2027.2308C54.5046%2028.9073%2054.9023%2030.6043%2055.3338%2032.2824C55.6029%2033.329%2055.9417%2034.4293%2054.9705%2035.2255C54.8158%2035.359%2054.4427%2035.5934%2054.2329%2035.6091C52.7731%2035.7184%2051.1693%2035.6701%2049.7108%2035.6679L39.4635%2035.6649L14.5239%2035.6632C10.471%2035.6631%206.41808%2035.6665%202.36531%2035.6698C1.79359%2035.6657%201.33794%2035.6604%200.844568%2035.337C-0.57365%2034.4073%200.381076%2032.2112%200.72189%2030.8501L1.93462%2025.9936L3.28579%2020.566C3.53371%2019.5688%203.77194%2018.5694%204.04289%2017.5781C4.30559%2016.6172%204.74298%2016.1492%205.73966%2015.9892C7.15095%2015.9419%208.72017%2015.9778%2010.1434%2015.9809L10.1451%2023.9585C7.37011%2024.097%207.74242%2027.5535%209.84963%2027.6469C11.6268%2027.7258%2013.6164%2027.6909%2015.4098%2027.691L26.229%2027.6915L39.1339%2027.691L43.273%2027.6909C44.748%2027.6909%2047.2174%2028.0848%2047.3773%2025.9908C47.4212%2025.4807%2047.2565%2024.9745%2046.9209%2024.5879C46.5265%2024.141%2046.1143%2024.0046%2045.5418%2023.9673L45.5498%2015.976Z'%20fill='white'/%3e%3c/g%3e%3c/svg%3e",Jn=i.div`
461
+ `;function Gn({name:s,priceCredits:o,onClose:r}){const{session:d}=Oe(),{data:h,isError:f}=kt(d),l=St(),m=He(),[c,g]=u.useState("confirm"),[p,b]=u.useState(""),[C,w]=u.useState(null),[$,v]=u.useState(!1),[x,k]=u.useState("preparing"),L=u.useRef(!1),T=p.trim().toLowerCase()===s.toLowerCase(),N=c==="completing",M=o!=null?ve(o):"—",B=o==null,W=h==null?void 0:h.credits,P=o!=null&&W!=null?o-W:0,S=P>0,F=B?n("names.priceUnavailable"):S?n("names.insufficientCredits",{credits:ve(P)}):null;u.useEffect(()=>{const y=G=>{G.key==="Escape"&&!N&&r()};document.addEventListener("keydown",y);const D=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=D}},[N,r]);async function R(){if(!(!d||!T||B||S||L.current)){L.current=!0,g("completing"),w(null),k("preparing");try{const y=await dn({name:s,identity:d.identity,signer:d.signer,onProgress:k});oe("Shop Completed Purchase",{items:[{item_id:null,contract_address:null,token_id:null,price_usd:Le(o??0),category:"name",is_smart:!1}],purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,value_usd:Le(o??0),transaction_hash:y.originTxHash??null,settlement:y.status}),l.invalidateQueries({queryKey:["usd-balance"]}),l.invalidateQueries({queryKey:["my-assets"]}),g(y.status==="registered"?"success":"pending")}catch(y){oe(_t(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Rt(y),purchase_type:"name"});const D=y instanceof Ce,G=y instanceof $e;w(y instanceof ke?n("names.errorRouteCost"):D?n("names.errorNotRegistered"):G?n("names.errorSettlementUnknown"):(y==null?void 0:y.message)||n("names.errorGeneric")),v(D||G),g("error")}finally{L.current=!1}}}const _=c!=="success"&&c!=="pending",j=Et(d==null?void 0:d.providerType),A=j?2:1,z=j&&(x==="preparing"||x==="awaiting-confirmation"),I=z?1:A,ae=z?n("names.confirming"):n("names.completing"),U=x==="registering"?n("names.processingRegistering"):null;return e.jsx(wn,{onClick:N?void 0:r,role:"presentation",children:e.jsxs(vn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[_&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:c==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(he,{onClick:r,disabled:N,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,f)]}),e.jsx(ue,{})]}),(c==="confirm"||c==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(fe,{children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),M]})]}),c==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(we,{children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:C})]}),$?e.jsx(ye,{onClick:r,children:n("names.errorSpentDismiss")}):e.jsx(ye,{onClick:()=>g("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Sn,{children:[e.jsx(En,{children:n("names.confirmTitle")}),e.jsx(Tn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${qn(s)}</b>`})}}),e.jsxs(Rn,{children:[e.jsx(_n,{"aria-hidden":!0,children:"@"}),e.jsx(In,{value:p,onChange:y=>b(y.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(p.length,8)}ch`}}),e.jsx(Ln,{children:".dcl.eth"})]})]}),F?e.jsxs(we,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:F})]}):null,e.jsx(ye,{onClick:()=>void R(),disabled:!T||!d||B||S,children:n("names.buyCta")})]})]}),c==="completing"&&e.jsxs(Nn,{children:[e.jsx(An,{src:Tt,alt:"",width:61,height:61}),e.jsxs(zn,{children:[e.jsx(Mn,{children:ae}),e.jsxs(Bn,{children:[e.jsx(Pn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(Fn,{"data-testid":"name-progress-count",children:`${I}/${A}`})]}),U?e.jsx(Wn,{children:U}):null]})]}),c==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:n("names.pendingHeaderTitle")}),e.jsx(he,{onClick:r,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,f)]}),e.jsx(ue,{}),e.jsxs(we,{"data-tone":"info",children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(fe,{style:{marginTop:20},children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),M]})]}),e.jsx(We,{children:e.jsx(Be,{onClick:()=>{r(),m("/my-items")},children:n("names.myItems")})})]}),c==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:n("names.successHeaderTitle")}),e.jsx(he,{onClick:r,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,f)]}),e.jsx(ue,{}),e.jsxs(Un,{children:[e.jsx(Hn,{"aria-hidden":!0,children:e.jsx(E,{name:"check"})}),e.jsxs(On,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(fe,{style:{marginTop:20},children:[e.jsxs(jn,{"data-testid":"name-success-tile",children:[e.jsx(Cn,{src:Jt,alt:"","aria-hidden":!0,width:47,height:47}),e.jsxs($n,{children:[e.jsx("span",{"aria-hidden":!0,children:s}),e.jsx(kn,{src:bn,alt:"","aria-hidden":!0,width:14,height:14})]})]}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),M]})]}),e.jsxs(We,{children:[e.jsx(Be,{onClick:()=>{r(),m("/my-items")},children:n("names.myItems")}),e.jsx(Dn,{href:V.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function qn(s){return s.replace(/[&<>"']/g,o=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[o])}const Vn="https://cdn.decentraland.org/@dcl/shop/1.11.2/_assets/identity-icon-C8yAW_Gq.svg",Zn="https://cdn.decentraland.org/@dcl/shop/1.11.2/_assets/world-icon-6xQ-PmmW.svg",Qn="https://cdn.decentraland.org/@dcl/shop/1.11.2/_assets/invite-icon-Bz6lCTuB.svg",Kn="data:image/svg+xml,%3csvg%20width='55.6797'%20height='63.6174'%20viewBox='0%200%2055.6797%2063.6174'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Vote'%3e%3cpath%20id='Vector'%20d='M0.055012%2039.1045C1.61191%2039.4989%202.83757%2039.3938%204.4307%2039.392L8.27108%2039.3878L20.7762%2039.3883L42.8819%2039.3904L50.0954%2039.3907C51.793%2039.3907%2054.0562%2039.5509%2055.6466%2039.0843C55.5909%2040.7931%2055.647%2042.8581%2055.6469%2044.5864L55.6479%2055.616L55.6559%2059.5618C55.6583%2060.6219%2055.8213%2061.9838%2055.261%2062.8837C55.2205%2062.9265%2055.1794%2062.9688%2055.1377%2063.0104C54.7986%2063.3482%2054.3791%2063.5594%2053.9021%2063.5761C52.0714%2063.642%2050.1544%2063.6097%2048.3241%2063.6078L37.4452%2063.6066L2.97352%2063.6103C2.2022%2063.6084%201.15943%2063.6718%200.589171%2063.0576C-0.204857%2062.2037%200.0327979%2060.3244%200.0349529%2059.1687L0.0414734%2054.3929C0.0413119%2049.3191%20-0.00749456%2044.1727%200.055012%2039.1045Z'%20fill='white'%20fill-opacity='0.8'/%3e%3cpath%20id='Subtract'%20d='M37.1168%200.00495927C38.1773%200.00461149%2039.2888%20-0.0284991%2040.3433%200.0811311C41.0714%200.15695%2041.7266%200.914583%2041.7857%201.63484C41.853%202.45491%2041.8268%203.31926%2041.8258%204.15144L41.8189%208.70418L41.8199%2023.9639L40.1099%2023.9659L13.8726%2023.963L13.8678%209.0909L13.8648%204.29793C13.8644%202.52652%2013.3942%200.34203%2015.6754%200.0342561C15.8907%200.016712%2016.237%200.0120998%2016.4557%200.0117952C21.6059%200.00480262%2026.761%200.0117634%2031.9107%200.00788896L37.1168%200.00495927ZM33.3834%206.17293C32.439%206.55612%2031.0531%208.12922%2030.3014%208.88191L25.8297%2013.3634C25.3537%2012.824%2023.3455%2010.7605%2022.8209%2010.4239C22.5581%2010.2549%2022.2566%2010.1546%2021.9449%2010.1329C21.4563%2010.1008%2020.9754%2010.2879%2020.6139%2010.6134C20.2442%2010.9428%2020.0227%2011.4077%2020.0006%2011.9024C19.9561%2013.0748%2021.3406%2014.1198%2022.1256%2014.8868C22.9429%2015.714%2024.1669%2017.1028%2025.1168%2017.67C26.1632%2018.2949%2027.3471%2017.2145%2027.9723%2016.4942C30.25%2014.2025%2032.5393%2011.9456%2034.8101%209.64949C35.2937%209.16062%2035.7138%208.69126%2035.6851%207.96199C35.6419%206.86558%2034.7821%206.09682%2033.6959%206.14656C33.5914%206.15085%2033.4872%206.16001%2033.3834%206.17293Z'%20fill='%23FF7439'/%3e%3cpath%20id='Vector_2'%20d='M45.5498%2015.976C46.6399%2015.986%2049.9504%2015.7705%2050.7361%2016.241C51.0104%2016.4053%2051.2831%2016.6446%2051.4181%2016.9397C51.892%2017.9763%2052.1015%2019.357%2052.3802%2020.4819L54.0582%2027.2308C54.5046%2028.9073%2054.9023%2030.6043%2055.3338%2032.2824C55.6029%2033.329%2055.9417%2034.4293%2054.9705%2035.2255C54.8158%2035.359%2054.4427%2035.5934%2054.2329%2035.6091C52.7731%2035.7184%2051.1693%2035.6701%2049.7108%2035.6679L39.4635%2035.6649L14.5239%2035.6632C10.471%2035.6631%206.41808%2035.6665%202.36531%2035.6698C1.79359%2035.6657%201.33794%2035.6604%200.844568%2035.337C-0.57365%2034.4073%200.381076%2032.2112%200.72189%2030.8501L1.93462%2025.9936L3.28579%2020.566C3.53371%2019.5688%203.77194%2018.5694%204.04289%2017.5781C4.30559%2016.6172%204.74298%2016.1492%205.73966%2015.9892C7.15095%2015.9419%208.72017%2015.9778%2010.1434%2015.9809L10.1451%2023.9585C7.37011%2024.097%207.74242%2027.5535%209.84963%2027.6469C11.6268%2027.7258%2013.6164%2027.6909%2015.4098%2027.691L26.229%2027.6915L39.1339%2027.691L43.273%2027.6909C44.748%2027.6909%2047.2174%2028.0848%2047.3773%2025.9908C47.4212%2025.4807%2047.2565%2024.9745%2046.9209%2024.5879C46.5265%2024.141%2046.1143%2024.0046%2045.5418%2023.9673L45.5498%2015.976Z'%20fill='white'/%3e%3c/g%3e%3c/svg%3e",Jn=i.div`
462
462
  width: 100%;
463
463
  min-width: 0;
464
464
  `,Xn=i.nav`
@@ -935,4 +935,4 @@ import{r as u,b as He,j as e,u as et}from"./react-C_gdQiCE.js";import{u as tt,s
935
935
  color: ${t.colors.err};
936
936
  }
937
937
  `,Ue=48,Ls=["all","on_sale","not_for_sale"];function Ys(){const[s]=et(),o=He(),r=(s.get("q")??"").trim().toLowerCase(),d=(s.get("q")??"").trim();De({title:d?n("seo.collectibles.searchTitle",{query:d}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const h=u.useMemo(()=>({category:"all",status:"on_sale",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[f,l]=tt(h),{subCategory:m,rarities:c,priceMin:g,priceMax:p,smart:b,sort:C}=f,w=f.category,$=Ls.includes(f.status)?f.status:"on_sale";st(`${w}:${m??""}`);const[v,x]=u.useState(!1);u.useEffect(()=>{if(!v)return;const a=K=>{K.key==="Escape"&&x(!1)};document.addEventListener("keydown",a);const H=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",a),document.body.style.overflow=H}},[v]);const k=$==="on_sale",L=g&&!Number.isNaN(Number(g))?Number(g):void 0,T=p&&!Number.isNaN(Number(p))?Number(p):void 0,N=It(),M=m?Pt[m]:void 0,B=(Ie.find(a=>a.key===C)??Ie[0]).server,W={category:w,rarities:c.length?c:void 0,wearableCategories:M,minPriceCredits:L,maxPriceCredits:T,search:r||void 0,sortBy:B,isSmart:b||void 0,onSale:!0,listingType:N?void 0:"primary"},P={category:w,rarities:c.length?c:void 0,wearableCategories:M,search:r||void 0,sortBy:B,isWearableSmart:b||void 0,isOnSale:$==="not_for_sale"?!1:void 0},{items:S,total:F,isLoading:R,isPlaceholderData:_,error:j,hasNextPage:A,isFetchingNextPage:z,isFetchNextPageError:I,fetchNextPage:ae}=Wt(k?["shop-items",W]:["catalog-items",P],a=>k?At({...W,first:Ue,skip:a}):zt({...P,first:Ue,skip:a}),{enabled:w!=="names"}),U=F,{data:y,isError:D,isPending:G}=Ge(),Ke=a=>y&&a.manaWei?qe(a.manaWei,y):null,Je=k&&G&&S.some(a=>a.source==="legacy"),Se=R||_||Je,Xe=R?15:Math.max(S.length,1),Ee=u.useRef(null);u.useEffect(()=>{R||_||!r||Ee.current===r||(Ee.current=r,oe("Shop Searched",{query:r,result_count:U}))},[r,R,_,U]);const Q=u.useRef("__init__");u.useEffect(()=>{if(R||_)return;const a=JSON.stringify({category:w,subCategory:m,rarities:c,min:L,max:T,sort:C,status:$,smart:b});if(Q.current==="__init__"||Q.current===a){Q.current=a;return}Q.current=a,oe("Shop Applied Filter",{filters:{category:w,sub_category:m,rarities:c,min_price_credits:L??null,max_price_credits:T??null,status:$,smart:b,sort:C},result_count:U})},[w,m,c,L,T,C,$,b,R,_,U]);function Te(a){l({category:a,subCategory:null})}function Re(a){l({status:a})}function _e(a){l({rarities:c.includes(a)?c.filter(H=>H!==a):[...c,a]})}function Ye(){l(h)}const q=[];(L!=null||T!=null)&&q.push({key:"price",label:n("filter.price"),onRemove:()=>{l({priceMin:"",priceMax:""})}});for(const a of it)c.includes(a)&&q.push({key:`rarity-${a}`,label:Lt(a),onRemove:()=>_e(a)});return b&&q.push({key:"smart",label:n("filter.smart"),onRemove:()=>l({smart:!1})}),$!=="on_sale"&&q.push({key:"status",label:$==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>Re("on_sale")}),e.jsxs(ot,{"data-testid":"browse",children:[w!=="names"&&e.jsxs(e.Fragment,{children:[v?e.jsx(rt,{onClick:()=>x(!1),"aria-hidden":!0}):null,e.jsxs(at,{"data-open":v||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(lt,{children:[e.jsx(ct,{children:n("assets.filters")}),e.jsx(dt,{onClick:()=>x(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(ht,{children:e.jsx(pt,{category:w,subCategory:m,onCategory:Te,onSub:a=>l({subCategory:a}),priceMin:g,priceMax:p,onPriceMin:a=>l({priceMin:a}),onPriceMax:a=>l({priceMax:a}),rarities:c,onToggleRarity:_e,status:$,onStatus:Re,smart:b,onSmart:a=>l({smart:a})})}),e.jsx(ut,{children:e.jsx(ft,{type:"button",onClick:()=>x(!1),children:n("assets.showItems")})})]})]}),e.jsx(mt,{children:w==="names"?e.jsx(_s,{onBack:()=>Te("all")}):e.jsxs(e.Fragment,{children:[e.jsx(xt,{sort:C,onSort:a=>l({sort:a}),total:F,loading:R||_,query:r,onOpenFilters:()=>x(!0),chips:q,onClearChips:Ye}),D&&k&&S.some(a=>a.source==="legacy")?e.jsx(Is,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,j?e.jsx(Ft,{message:n("assets.loadError"),testId:"browse-error"}):null,!Se&&S.length===0&&!j?e.jsx(Nt,{testId:"browse-empty",icon:nt,title:n("assets.empty.title"),body:d?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:d}),n("assets.empty.searchAfter")]}):n("assets.empty.filters"),cta:{label:n("assets.empty.cta"),onClick:()=>o("/overview")}}):e.jsxs(e.Fragment,{children:[e.jsx(Xt,{"data-testid":"grid",children:Se?e.jsx(Ne,{count:Xe}):e.jsxs(e.Fragment,{children:[S.map(a=>{if(!k)return e.jsx(J,{item:a,mode:"view"},X(a));const H=a;if(H.source!=="legacy")return e.jsx(J,{item:a},X(a));const K=Ke(H);return K==null?e.jsx(J,{item:a,mode:"view"},X(a)):e.jsx(J,{item:{...H,priceCredits:K}},X(a))}),z?e.jsx(Ne,{count:6}):null]})}),e.jsx(Mt,{hasNextPage:A,isFetching:z,isError:I,onLoadMore:()=>void ae()})]})]})})]})}export{Ys as Assets};
938
- //# sourceMappingURL=Assets-BeMy0zBm.js.map
938
+ //# sourceMappingURL=Assets-CEOKXfHN.js.map
@@ -1,4 +1,4 @@
1
- import{j as e,L as W,r as P}from"./react-C_gdQiCE.js";import{t as o,s as n,B,m as R,n as F,b as i,o as G,p as O,I as z,q as K,l as w,r as Q,c as H,v as X,w as A,h as Z,x as J,y as I}from"./index-DO2w-wQR.js";import{a as U,b as V,c as Y,d as tt,s as et,e as it}from"./authorizations-ChjDHhq0.js";import{f as ot}from"./builder-BfRqFJQ4.js";import{m as at}from"./mana-matic-CEqvSwrJ.js";import{f as nt}from"./errors-BOK5UzVJ.js";import"./dcl-schemas-Z_oWg9h9.js";import"./sentry-Cxy688Uv.js";import"./ethers-Cpz0Q6xx.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-Bu8b5LeI.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="c2ec6301-beed-4385-8d18-7f5357a4a2c4",t._sentryDebugIdIdentifier="sentry-dbid-c2ec6301-beed-4385-8d18-7f5357a4a2c4")}catch{}})();const st=R`
1
+ import{j as e,L as W,r as P}from"./react-Io5Wove7.js";import{t as o,s as n,B,m as R,n as F,b as i,o as G,p as O,I as z,q as K,l as w,r as Q,c as H,v as X,w as A,h as Z,x as J,y as I}from"./index-bJXcZSYa.js";import{a as U,b as V,c as Y,d as tt,s as et,e as it}from"./authorizations-DC168PVR.js";import{f as ot}from"./builder-CpxipFmE.js";import{m as at}from"./mana-matic-CEqvSwrJ.js";import{f as nt}from"./errors-ISVrHVty.js";import"./dcl-schemas-OH8G4Ndl.js";import"./sentry-faeuEJiQ.js";import"./ethers-DwK2TdL6.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-Bnb1e1Oo.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="c2ec6301-beed-4385-8d18-7f5357a4a2c4",t._sentryDebugIdIdentifier="sentry-dbid-c2ec6301-beed-4385-8d18-7f5357a4a2c4")}catch{}})();const st=R`
2
2
  to { transform: rotate(360deg); }
3
3
  `,rt=R`
4
4
  to { background-position: -200% 0; }
@@ -189,4 +189,4 @@ import{j as e,L as W,r as P}from"./react-C_gdQiCE.js";import{t as o,s as n,B,m a
189
189
  `,M=n(B)`
190
190
  margin-top: 12px;
191
191
  `;function j({descriptor:t,owner:s,signer:r,name:a,description:c,image:l,icon:p}){const v=Q(),[h,y]=P.useState(!1),{data:u,isLoading:g,refetch:d}=w({queryKey:["authorization",t.id,s],queryFn:()=>it(t,s),staleTime:3e4});async function m(){if(h||g)return;const b=!u;y(!0);try{await et({auth:t,signer:r,active:b}),await d(),v.setQueryData(["authorization",t.id,s],b),A.success(b?i("authorizations.toastActivated",{name:a}):i("authorizations.toastDeactivated",{name:a}))}catch(C){Z(C,{flow:"authorizations",step:b?"grant":"revoke"}),A.error(nt(C,i("authorizations.errorGeneric")))}finally{y(!1)}}const N=g?i("authorizations.checking"):u?i("authorizations.active"):i("authorizations.inactive");return e.jsxs(ht,{"data-testid":`authorization-${t.id}`,"data-active":!!u,children:[e.jsx(gt,{children:l?e.jsx("img",{src:l,alt:""}):p}),e.jsxs(mt,{children:[e.jsx(ft,{title:a,children:a}),e.jsx(xt,{children:c})]}),e.jsxs(bt,{children:[e.jsx(yt,{"data-active":!!u,children:N}),h?e.jsx(jt,{"aria-label":i("authorizations.working")}):e.jsx(zt,{type:"button","data-testid":`authorization-toggle-${t.id}`,"data-active":!!u,role:"switch","aria-checked":!!u,"aria-label":u?i("authorizations.deactivateAria",{name:a}):i("authorizations.activateAria",{name:a}),disabled:g,onClick:()=>void m()})]})]})}const x=500,q=10,vt=x*q;async function _(t,s){const r=await I(t,{category:s,first:x}),a=Math.min(Math.ceil(r.total/x),q),c=await Promise.all(Array.from({length:Math.max(0,a-1)},(l,p)=>I(t,{category:s,first:x,skip:(p+1)*x})));return{assets:[...r.assets,...c.flatMap(l=>l.assets)],truncated:r.total>vt}}function kt(t){return w({queryKey:["owned-collections",t],enabled:!!t,staleTime:6e4,queryFn:async()=>{const[s,r]=await Promise.all([_(t,"wearable"),_(t,"emote")]),a=new Map;for(const c of[...s.assets,...r.assets]){const l=c.contractAddress.toLowerCase();a.has(l)||a.set(l,c)}return{collections:[...a.values()],truncated:s.truncated||r.truncated,scanned:s.assets.length+r.assets.length}}})}function $t(t){return w({queryKey:["contract-registry"],enabled:t,staleTime:1/0,gcTime:1/0,queryFn:J})}function Ct(t,s){const r=s==null?void 0:s.get(t.toLowerCase());if(r)return r;const a=X(t);return a===t?i("authorizations.collectionFallback"):a}function At(t,s){return w({queryKey:["creator-collections",t],enabled:!!t&&!!s,staleTime:6e4,queryFn:async()=>{const r=await ot(t,s),a=new Map;for(const c of r){const l=c.contractAddress.toLowerCase();a.has(l)||a.set(l,c)}return[...a.values()]}})}function Wt(){F({title:i("authorizations.title"),noindex:!0});const{session:t,signIn:s}=G(),r=H.chainId,a=O(t==null?void 0:t.providerType),{data:c,isLoading:l}=kt(a?t==null?void 0:t.address:void 0),{data:p,isLoading:v}=$t(!!a&&!!(t!=null&&t.address)),{data:h,isLoading:y}=At(a?t==null?void 0:t.address:void 0,a?t==null?void 0:t.identity:void 0);if(!t)return e.jsxs(D,{children:[e.jsx(z,{name:"info",size:40,color:o.colors.muted2}),e.jsx(S,{children:i("authorizations.signInTitle")}),e.jsx(L,{children:i("authorizations.signInBody")}),e.jsx(M,{variant:"white",onClick:()=>s(),children:i("storeSettings.signIn")})]});if(!a)return e.jsxs(D,{children:[e.jsx(z,{name:"check",size:40,color:o.colors.ok}),e.jsx(S,{children:i("authorizations.managedTitle")}),e.jsx(L,{children:i("authorizations.managedBody")}),e.jsx(M,{as:W,to:"/items",variant:"white",children:i("authorizations.managedCta")})]});const u=U(r),g=V(r);return e.jsxs(ct,{children:[e.jsxs(lt,{children:[e.jsx(dt,{children:i("authorizations.title")}),e.jsx(ut,{children:i("authorizations.intro")})]}),e.jsxs(k,{children:[e.jsx($,{children:i("authorizations.buyingTitle")}),e.jsxs(f,{children:[e.jsx(j,{descriptor:u,owner:t.address,signer:t.signer,name:i("authorizations.creditsName"),description:i("authorizations.creditsDesc"),icon:e.jsx(K,{className:"ccy-mark"})}),e.jsx(j,{descriptor:g,owner:t.address,signer:t.signer,name:i("authorizations.manaName"),description:i("authorizations.manaDesc"),icon:e.jsx(pt,{src:at,alt:"","aria-hidden":!0})})]})]}),e.jsxs(k,{children:[e.jsx($,{children:i("authorizations.sellingTitle")}),c!=null&&c.truncated?e.jsx(wt,{"data-testid":"authorizations-selling-truncated",children:i("authorizations.sellingTruncated",{count:c.scanned})}):null,l||v?e.jsx(f,{"aria-busy":"true","aria-label":i("authorizations.checking"),children:Array.from({length:3}).map((d,m)=>e.jsx(E,{"aria-hidden":!0},m))}):c&&c.collections.length>0?e.jsx(f,{children:c.collections.map(d=>e.jsx(j,{descriptor:Y(d.contractAddress,r),owner:t.address,signer:t.signer,name:Ct(d.contractAddress,p),description:i("authorizations.sellingDesc"),image:d.image,icon:e.jsx(z,{name:"pen",size:18})},d.contractAddress))}):e.jsx(T,{children:i("authorizations.sellingEmpty")})]}),e.jsxs(k,{children:[e.jsx($,{children:i("authorizations.mintingTitle")}),y?e.jsx(f,{"aria-busy":"true","aria-label":i("authorizations.checking"),children:Array.from({length:3}).map((d,m)=>e.jsx(E,{"aria-hidden":!0},m))}):h&&h.length>0?e.jsx(f,{children:h.map(d=>e.jsx(j,{descriptor:tt(d.contractAddress,r),owner:t.address,signer:t.signer,name:d.name||i("authorizations.collectionFallback"),description:i("authorizations.mintingDesc"),icon:e.jsx(z,{name:"pen",size:18})},d.contractAddress))}):e.jsx(T,{children:i("authorizations.mintingEmpty")})]})]})}export{Wt as Authorizations};
192
- //# sourceMappingURL=Authorizations-DncizvNg.js.map
192
+ //# sourceMappingURL=Authorizations-zY_jkrdd.js.map
@@ -1,4 +1,4 @@
1
- import{j as e,L as Ut,r as T,b as fa,a as ma}from"./react-C_gdQiCE.js";import{s as i,t as E,b as a,q as Ie,E as ae,bc as Fe,C as Me,bd as ya,D as Le,be as ba,z as va,I as Y,A as Xe,n as wa,ab as O,H as jt,o as Ca,V as ja,l as ka,bf as $a,r as Sa,bg as Ma,J as Ta,bh as Ia,bi as kt,L as Pa,bj as Aa,bk as za,bl as Ea,ao as Ke,p as Ra,bm as $t,ad as V,bn as St,bo as Ba,h as re,R as qa,c as Mt,bp as _a,bq as Wa,br as Ne,W as Fa,bs as we,bt as Ce,bu as Tt,bv as La,g as It,f as Pt,bw as Ka}from"./index-DO2w-wQR.js";import{m as Te,M as Na,S as Qa,C as Ua,H as Ga,a as Ha,T as Oa,X as Da,b as Va,B as Ya,c as Ja,d as At,e as Xa,f as Pe,g as Za,h as es,i as ts,j as as,k as Je,l as pe,L as ss,P as ns,n as zt,o as Et,W as is,p as rs,q as os,r as cs,A as ls,s as ds,t as us,u as hs,v as ps,w as gs,x as xs,y as fs,z as ms,D as ys,E as bs,F as vs,G as ws,I as Cs,J as js,K as ks,N as $s,O as Qe,Q as Ss,R as Ms,U as Ts,V as Rt,Y as Bt,Z as Is,_ as Ps,$ as As,a0 as zs,a1 as qt,a2 as Es}from"./CollectionCarousel-0tR5Mlt1.js";import{k as Rs,l as Bs,e as qs,n as _s,f as Ws,A as Fs}from"./authorizations-ChjDHhq0.js";import{p as _t,g as Ls,h as Ue}from"./buy-Cmc6VGNE.js";import{w as Ks,S as Ge,b as Ns,G as Qs}from"./buy-gasless-SuVAuIoA.js";import{u as Us,M as Gs,R as je,r as Hs,c as Os,g as Ds,a as Vs,p as Wt,b as He}from"./useCreditPacks-DCsNOyZ8.js";import{i as Ys,a as Js}from"./errors-BOK5UzVJ.js";import{E as Xs}from"./ErrorNotice-CSHOj_36.js";import"./dcl-schemas-Z_oWg9h9.js";import"./sentry-Cxy688Uv.js";import"./ethers-Cpz0Q6xx.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-Bu8b5LeI.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new r.Error().stack;d&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[d]="114aeeec-407a-4490-a588-1fdc1dc08445",r._sentryDebugIdIdentifier="sentry-dbid-114aeeec-407a-4490-a588-1fdc1dc08445")}catch{}})();const Zs=i.div`
1
+ import{j as e,L as Ut,r as T,b as fa,a as ma}from"./react-Io5Wove7.js";import{s as i,t as E,b as a,q as Ie,E as ae,bc as Fe,C as Me,bd as ya,D as Le,be as ba,z as va,I as Y,A as Xe,n as wa,ab as O,H as jt,o as Ca,V as ja,l as ka,bf as $a,r as Sa,bg as Ma,J as Ta,bh as Ia,bi as kt,L as Pa,bj as Aa,bk as za,bl as Ea,ao as Ke,p as Ra,bm as $t,ad as V,bn as St,bo as Ba,h as re,R as qa,c as Mt,bp as _a,bq as Wa,br as Ne,W as Fa,bs as we,bt as Ce,bu as Tt,bv as La,g as It,f as Pt,bw as Ka}from"./index-bJXcZSYa.js";import{m as Te,M as Na,S as Qa,C as Ua,H as Ga,a as Ha,T as Oa,X as Da,b as Va,B as Ya,c as Ja,d as At,e as Xa,f as Pe,g as Za,h as es,i as ts,j as as,k as Je,l as pe,L as ss,P as ns,n as zt,o as Et,W as is,p as rs,q as os,r as cs,A as ls,s as ds,t as us,u as hs,v as ps,w as gs,x as xs,y as fs,z as ms,D as ys,E as bs,F as vs,G as ws,I as Cs,J as js,K as ks,N as $s,O as Qe,Q as Ss,R as Ms,U as Ts,V as Rt,Y as Bt,Z as Is,_ as Ps,$ as As,a0 as zs,a1 as qt,a2 as Es}from"./CollectionCarousel-Cs01J4sG.js";import{k as Rs,l as Bs,e as qs,n as _s,f as Ws,A as Fs}from"./authorizations-DC168PVR.js";import{p as _t,g as Ls,h as Ue}from"./buy-C9vFcpIy.js";import{w as Ks,S as Ge,b as Ns,G as Qs}from"./buy-gasless-Co1yjKqt.js";import{u as Us,M as Gs,R as je,r as Hs,c as Os,g as Ds,a as Vs,p as Wt,b as He}from"./useCreditPacks-RKaHRtDl.js";import{i as Ys,a as Js}from"./errors-ISVrHVty.js";import{E as Xs}from"./ErrorNotice-BanVYx_o.js";import"./dcl-schemas-OH8G4Ndl.js";import"./sentry-faeuEJiQ.js";import"./ethers-DwK2TdL6.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-Bnb1e1Oo.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new r.Error().stack;d&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[d]="114aeeec-407a-4490-a588-1fdc1dc08445",r._sentryDebugIdIdentifier="sentry-dbid-114aeeec-407a-4490-a588-1fdc1dc08445")}catch{}})();const Zs=i.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 12px;
@@ -745,4 +745,4 @@ import{j as e,L as Ut,r as T,b as fa,a as ma}from"./react-C_gdQiCE.js";import{s
745
745
  margin-top: 0;
746
746
  }
747
747
  `;function Ve(r){if(Ys(r))return a("errors.rejected");const d=(r.message??"").toLowerCase();return d.includes("insufficient")?a("cart.error.insufficient",{currency:Me.name}):d.includes("no active listing")||d.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const si=12e4;function ni(r){const d=[];return r.unavailable.length&&d.push(a("cart.drop.unavailable",{count:r.unavailable.length})),r.own.length&&d.push(a("cart.drop.own",{count:r.own.length})),a("cart.drop.removed",{items:d.join(` ${a("cart.drop.and")} `)})}const Ye=r=>r.reduce((d,k)=>d+k.priceCredits*k.quantity,0),Se=r=>r.flatMap(d=>Array.from({length:d.quantity},()=>({...d,quantity:1})));function bi(){var Ct;wa({title:a("nav.cart"),noindex:!0});const r=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),A=jt(t=>t.items),J=jt(t=>t.toggle),{session:n,signIn:G}=Ca(),Jt=ja(),ge=Us().packs.slice(0,Gs);T.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const Xt=r.some(t=>t.category!=="emote"),{data:Ae}=ka({queryKey:["upsell-listings"],queryFn:()=>Ka({first:40}),staleTime:6e4}),{data:j}=$a(n),b=Sa(),X=fa(),{state:B}=ma(),[Zt,le]=T.useState(null),[Ze,xe]=T.useState(null),[ea,q]=T.useState(!1),[_,D]=T.useState(null),et=T.useRef(0),[h,S]=T.useState(null),{data:fe}=Ma(n),{data:de}=Ta(!0),[ze,tt]=T.useState(""),ue=T.useRef(null),at=Ia(r),st=t=>$t(at[t.id]),Ee=r.filter(st),nt=r.length>0&&Ee.length===0,ta=Ee.reduce((t,s)=>t+s.priceCredits*s.quantity,0),aa=r.reduce((t,s)=>t+s.quantity,0),sa=Ee.reduce((t,s)=>t+s.quantity,0),it=_?_.liveTotalCredits:ta,na=new Set(r.map(t=>t.id)),rt=((Ae==null?void 0:Ae.items)??[]).filter(t=>!na.has(t.id)).slice(0,12),ia=new Map(_==null?void 0:_.buyable.map(t=>[t.item.id,t])),me=(j==null?void 0:j.credits)??0,Re=it*10,ra=de?kt(Re,de):0n,Be=Qe({priceCents:Re,priceManaWei:ra,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:fe??0n}),oa=t=>t.flatMap(s=>{const c=He(s);return c.kind==="store"?[c.mint]:[]}),ca=t=>t.flatMap(s=>s.acquisition==="trade"?[s.trade]:[]),la=Ba,da=t=>_a(t.contractAddress,String(t.itemId));function ye(t){t(),D(null),xe(null),le(null)}function ua(){S(null),q(!1)}function ot(t){const s=Ye(t),c=Math.max(0,s-me),o=ge.find(u=>u.credits>=c)??ge[ge.length-1];tt(o.id),V("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:s,credits_balance:me,shortfall:c}),S({phase:"nofunds",lines:t.map(u=>({item:u.item,priceCredits:u.priceCredits,quantity:u.quantity})),shortfall:c}),q(!1)}async function qe(t){if(!n||t.length===0)return;const s=Se(t),c=s.map(m=>({...m.item,priceCredits:m.priceCredits})),o=t.map(m=>({...m.item,priceCredits:m.priceCredits,quantity:m.quantity})),u=[];let v="authorize";const g=new Set,M=new Set,L=new Set,W=[];let w=!1;S({phase:"processing",stage:"reserving",step:1,total:s.length});try{const m=[],z=Ds(s,_t);let K=0;for(const p of z){S({phase:"processing",stage:"reserving",step:K+1,total:s.length});try{const{credit:f,maxCreditedValue:y}=await Wa(n.identity,p.units.map(Vs));p.units.forEach((Q,ie)=>{u.push({salt:f.id,itemId:Q.item.id}),m.push({...p.drafts[ie],credits:[f],maxCreditedValue:y})}),K+=p.units.length}catch(f){if(Js(f)){if(u.length){try{await Ne(n.identity,[...new Set(u.map(y=>y.salt))])}catch(y){re(y,{flow:"cart_checkout",step:"release"})}b.invalidateQueries({queryKey:["usd-balance"]})}ot(t);return}throw f}}u.length&&b.invalidateQueries({queryKey:["usd-balance"]}),v="submit";const N=Ls(m).length,te=p=>N>1?{current:p,total:N}:void 0,F=(p,f)=>S({phase:"processing",stage:p,step:s.length,total:s.length,signatures:te(f)}),C=p=>p<N?F("awaiting-signature",p+1):F("settling",N);F("awaiting-signature",1);let x=[];const I=new Map,se=async p=>{const f=await Promise.allSettled(p.map(y=>Ks(y)));return f.forEach((y,Q)=>{const ie=I.get(p[Q])??[];y.status==="fulfilled"?(ie.forEach(We=>M.add(We)),W.push(p[Q])):y.reason instanceof Ge||ie.forEach(We=>L.add(We))}),f.flatMap(y=>y.status==="rejected"?[y.reason]:[])};if(Rs())try{let p=0;x=await Ns({purchases:m,buyer:n.address,signer:n.signer,identity:n.identity,onSigned:()=>F("settling",Math.min(p+1,N)),onBroadcast:({txHash:y,salts:Q})=>{p+=1,I.set(y,Q),Q.forEach(ie=>g.add(ie))},onGroupSettling:({settled:y})=>F("settling",y)});const f=await se(x);if(f.length&&!f.some(y=>y instanceof Ge))throw f[0];w=!0}catch(p){if(p instanceof Ge)throw await se([...I.keys()]),p;if(!(p instanceof Qs)||!Fa(n.providerType))throw p;x=await Ue({purchases:m,buyer:n.address,signer:n.signer,onSigned:C,onBroadcast:({salts:f})=>f.forEach(y=>g.add(y)),onSettled:({txHash:f,salts:y})=>{y.forEach(Q=>M.add(Q)),W.push(f)},onReverted:({salts:f})=>f.forEach(y=>L.add(y))})}else x=await Ue({purchases:m,buyer:n.address,signer:n.signer,onSigned:C,onBroadcast:({salts:p})=>p.forEach(f=>g.add(f)),onSettled:({txHash:p,salts:f})=>{f.forEach(y=>M.add(y)),W.push(p)},onReverted:({salts:p})=>p.forEach(f=>L.add(f))});t.forEach(p=>d(p.item.id)),D(null),V("Shop Completed Purchase",{...we(c),payment_type:"credits",no_crypto_step:w,transaction_hash:x[0]??null}),Bt(b);const ve=ue.current;ue.current=null,S(null),q(!1);const ne={items:o,txHash:x[0]??void 0,txHashes:x,settled:!0,...ve?{creditsAdded:ve}:{}};X("/success",{state:ne,replace:!0})}catch(m){Ce(m)||re(m,{flow:"cart_checkout",step:v,cart_size:t.length});const z=new Set([...g].filter(x=>!L.has(x))),{toRelease:K,boughtItemIds:N}=Wt({reservations:u,spent:z,settled:M}),te=[...z].some(x=>!M.has(x)),F=c.filter(x=>N.includes(x.id)),C=c.filter(x=>!N.includes(x.id));if(V(Ce(m)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:v,error_code:Tt(m),value_usd:St(C.reduce((x,I)=>x+I.priceCredits,0)),cart_size:s.length,partial:F.length>0}),K.length)try{await Ne(n.identity,K)}catch(x){re(x,{flow:"cart_checkout",step:"release"})}if(b.invalidateQueries({queryKey:["usd-balance"]}),F.length>0){N.forEach(x=>d(x)),D(null),Bt(b),V("Shop Completed Purchase",{...we(F),payment_type:"credits",no_crypto_step:w,transaction_hash:W[0]??null,partial:!0}),S({phase:"error",message:a("cart.error.partiallyBought"),heldCredits:te}),q(!1);return}S({phase:"error",message:te?void 0:Ve(m),heldCredits:te})}}function ct(t,s){b.invalidateQueries({queryKey:["usd-balance"]}),b.invalidateQueries({queryKey:["detail-trade"]}),b.invalidateQueries({queryKey:["shop-item"]}),b.invalidateQueries({queryKey:["owned-token"]}),b.invalidateQueries({queryKey:["public-token"]}),b.invalidateQueries({queryKey:["item-resales"]}),b.invalidateQueries({queryKey:["shop-items"]}),b.invalidateQueries({queryKey:["catalog-items"]}),b.invalidateQueries({queryKey:["my-assets"]}),b.invalidateQueries({queryKey:["purchases"]}),b.invalidateQueries({queryKey:["owned-item-count"]}),b.invalidateQueries({queryKey:["overview-listings"]}),b.invalidateQueries({queryKey:["upsell-listings"]});const c=ue.current;ue.current=null,S(null),q(!1);const o={items:t,txHash:s[0]??void 0,txHashes:s,settled:!0,...c?{creditsAdded:c}:{}};X("/success",{state:o,replace:!0})}function lt(t,s){Ce(t)||re(t,{flow:s,step:"submit"}),V(Ce(t)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Tt(t)}),S({phase:"error",message:Ve(t)}),q(!1)}async function ha(t,s,c){const o=It(Pt.MANAToken,s),u=It(Pt.CreditsManager,s);await Ws({auth:{kind:Fs.Allowance,contractAddress:o.address,spenderAddress:u.address,chainId:s},signer:t,requiredWei:c})}async function dt(){if(de)return de;try{return await b.fetchQuery({queryKey:["mana-rate",Mt.chainId],queryFn:()=>qa(Mt.chainId),staleTime:6e4})}catch{return}}async function pa(t){const s=Se(t).reduce((v,g)=>v+g.usdCents,0),o=(fe??0n)>0n?await dt():de,u=o?kt(s,o):0n;return{totalCents:s,manaWei:u}}async function ut(t,s){const c=Ye(t),{totalCents:o,manaWei:u}=await pa(t),v=Qe({priceCents:o,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=xt(v,s);await pt(ht(s,t),g,()=>s==="mana"?void ft(t,g):void mt(t,o,u));return}if(v.options.some(g=>g.method==="mana"||g.method==="combined")){S({phase:"choose",lines:t,totalCents:o,manaWei:u}),q(!1);return}if(j!=null&&j.credits<c){ot(t);return}qe(t)}function _e(t){return Qe({priceCents:t.totalCents,priceManaWei:t.manaWei,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:fe??0n})}const[he,be]=T.useState(null);function ht(t,s){const c=new Map;for(const o of s){const u=Is(t,He(o));c.set(`${u.chainId}:${u.spender.toLowerCase()}`,u)}return[...c.values()]}async function pt(t,s,c){const o=[];for(const{spender:u,chainId:v}of t){const g=Bs(v,u),M=n?await qs(g,n.address,s).catch(()=>!0):!0;_s(n==null?void 0:n.providerType,M)&&o.push(g)}if(o.length===0){c();return}q(!1),gt(o,0,c)}function gt(t,s,c){be({auth:t[s],index:s+1,total:t.length,run:()=>s+1<t.length?gt(t,s+1,c):c()})}function xt(t,s){var c;return((c=t.options.find(o=>o.method===s))==null?void 0:c.manaWei)??0n}function ga(t){if((h==null?void 0:h.phase)!=="choose")return;const{lines:s,totalCents:c,manaWei:o}=h;if(t==="credits"){qe(s);return}const u=xt(_e(h),t);pt(ht(t,s),u,()=>t==="mana"?void ft(s,u):void mt(s,c,o))}async function ft(t,s){if(!n||t.length===0)return;const c=Se(t),o=c.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:c.length,total:c.length});S({phase:"processing",stage:"awaiting-signature",step:c.length,total:c.length});try{const g=await Ps({trades:ca(c),mints:oa(c),buyer:n.address,signer:n.signer,onSigned:v,manaWei:s});t.forEach(M=>d(M.item.id)),D(null),V("Shop Completed Purchase",{...we(o),payment_type:"mana",transaction_hash:g[0]??null}),b.invalidateQueries({queryKey:["mana-balance"]}),ct(u,g)}catch(g){lt(g,"buy_cart_mana")}}async function mt(t,s,c){if(!n||t.length===0)return;const o=Se(t),u=o.map(w=>({...w.item,priceCredits:w.priceCredits})),v=t.map(w=>({...w.item,priceCredits:w.priceCredits,quantity:w.quantity})),g=As(o.map(w=>w.usdCents),(j==null?void 0:j.balanceCents)??0),M=[],L=new Set,W=new Set;S({phase:"processing",stage:"reserving",step:1,total:o.length});try{const w=o.map(He),m=[],z=new Map,K=new Map;for(let C=0;C<o.length;C++){const x=o[C],I=w[C],se=g[C],ve=zs(Math.max(0,x.usdCents-se),s,c);let ne;if(se<=0)ne=qt(I,[],"0");else{S({phase:"processing",stage:"reserving",step:C+1,total:o.length});const f=x.item,{credit:y,maxCreditedValue:Q}=await La(n.identity,se,I.kind==="trade"?I.trade.id:void 0,f.contractAddress&&f.itemId!=null?{contractAddress:f.contractAddress,itemId:String(f.itemId)}:void 0);M.push({salt:y.id,itemId:f.id}),ne=qt(I,[y],Q)}const p=_t(ne);z.set(p,(z.get(p)??0n)+ve),K.has(p)||K.set(p,m.length),m.push(ne)}M.length&&b.invalidateQueries({queryKey:["usd-balance"]});for(const[C,x]of z){const I=K.get(C);I==null||x<=0n||(m[I]={...m[I],maxCreditedValue:(BigInt(m[I].maxCreditedValue)+x).toString()})}const N=[...z.values()].reduce((C,x)=>C+x,0n);await ha(n.signer,Es(w[0]),N);const te=()=>S({phase:"processing",stage:"settling",step:o.length,total:o.length});S({phase:"processing",stage:"awaiting-signature",step:o.length,total:o.length});const F=await Ue({purchases:m,buyer:n.address,signer:n.signer,onSigned:te,onBroadcast:({salts:C})=>C.forEach(x=>L.add(x)),onReverted:({salts:C})=>C.forEach(x=>W.add(x))});t.forEach(C=>d(C.item.id)),D(null),V("Shop Completed Purchase",{...we(u),payment_type:"credits_and_mana",transaction_hash:F[0]??null}),b.invalidateQueries({queryKey:["mana-balance"]}),ct(v,F)}catch(w){const{toRelease:m}=Wt({reservations:M,spent:new Set([...L].filter(z=>!W.has(z))),settled:new Set});m.length&&Ne(n.identity,m).catch(()=>{}),M.length&&b.invalidateQueries({queryKey:["usd-balance"]}),lt(w,"buy_cart_combined")}}async function Z(t){if(!n){Rt({type:"cart-checkout"}),G();return}const s=O.getState().items.filter(st);if(s.length===0)return;le(null),xe(null),q(!0);const c=s.reduce((o,u)=>o+u.priceCredits*u.quantity,0);V("Shop Started Checkout",{checkout_source:"cart",cart_size:s.length,cart_value_credits:c,cart_value_usd:St(c),has_sufficient_credits:me>=c});try{const o=await Hs(s,n.address,la,await dt(),da),u=[...o.unavailable,...o.own];if(u.length&&(u.forEach(v=>d(v.id)),xe(ni(o))),o.buyable.length===0){le(a("cart.error.noneAvailable")),D(null);return}if(o.orderChanged){D(o),et.current=Date.now();return}await ut(o.buyable,t)}catch(o){re(o,{flow:"cart_checkout",step:"review",cart_size:s.length}),le(Ve(o))}finally{q(!1)}}async function yt(){if(_){if(!n){Rt({type:"cart-checkout"}),G();return}if(Date.now()-et.current>si){D(null),xe(null),await Z();return}le(null),ut(_.buyable)}}async function xa(){if(ze){try{sessionStorage.setItem(je,JSON.stringify(O.getState().items))}catch{}q(!0);try{const t=await Os(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(je)}catch{}re(t,{flow:"cart_buy_credits"}),S({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{q(!1)}}}const bt=T.useRef(!1);T.useEffect(()=>{if(!n||bt.current||!Ss("cart-checkout"))return;bt.current=!0;const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[n]);const vt=T.useRef(!1);T.useEffect(()=>{if(!(B!=null&&B.resumeCheckout)||vt.current)return;vt.current=!0,ue.current=B.creditsAdded??null;try{const s=sessionStorage.getItem(je);if(s){sessionStorage.removeItem(je);const c=JSON.parse(s);Array.isArray(c)&&c.length&&U(c)}}catch{}b.invalidateQueries({queryKey:["usd-balance"]});const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[B==null?void 0:B.resumeCheckout]);const wt=T.useRef(!1);T.useEffect(()=>{if(!(B!=null&&B.startCheckout)||wt.current)return;wt.current=!0,X(".",{replace:!0,state:null});const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[B==null?void 0:B.startCheckout]);const ee=ea||(h==null?void 0:h.phase)==="processing";return r.length===0&&!h?e.jsx(Lt,{children:e.jsxs(Nt,{children:[e.jsxs(Kt,{onClick:()=>X(-1),type:"button",children:[e.jsx(Y,{name:"arrow-left"}),a("nav.cart")]}),e.jsx(bn,{children:e.jsx(Pa,{variant:"light",testId:"cart-empty",icon:Aa,title:a("cart.empty.title"),body:a("cart.empty.body"),cta:{label:a("cart.empty.cta"),to:"/items"}})})]})}):e.jsxs(Lt,{children:[e.jsxs(Nt,{children:[e.jsxs(Kt,{onClick:()=>X(-1),type:"button",children:[e.jsx(Y,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(xn,{children:[e.jsxs(fn,{children:[e.jsxs(mn,{children:[e.jsx(vn,{onClick:()=>X(-1),type:"button","aria-label":a("cart.goBack"),children:e.jsx(Y,{name:"arrow-left"})}),e.jsx(wn,{children:a("cart.panelTitle",{count:aa})}),Xt?e.jsxs(Cn,{onClick:()=>H(!0),disabled:ee,children:[e.jsx(Y,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),e.jsxs(yn,{children:[e.jsx(jn,{children:r.map(t=>{const s=ia.get(t.id),c=s?s.priceCredits:t.priceCredits,o=!!s&&s.priceCredits!==t.priceCredits,u=!t.tokenId,v=t.quantity,g=typeof t.available=="number"&&v>=t.available,M=c*v,L=za(t),W=!!L&&!!A[L],w=Ea(t),m=at[t.id],z=!$t(m),K=m==="sold-out"?a("cart.availability.soldOut"):a("cart.availability.unavailable");return e.jsxs(kn,{"data-unavailable":z||void 0,children:[e.jsxs($n,{"data-thumb":!0,children:[w?e.jsx(Sn,{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(Mn,{"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(Tn,{children:[e.jsxs(In,{"data-desc":!0,children:[w?e.jsx(An,{to:w,state:{item:t,tradeId:t.tradeId},title:t.name,children:t.name}):e.jsx(Pn,{title:t.name,children:t.name}),t.creator?e.jsx(zn,{address:t.creator,linkToProfile:!0}):null,Jt&&u?e.jsxs(Nn,{"data-testid":"cart-creator-tag",children:[e.jsx(Qn,{name:"buy-from-creator"}),a("cart.creatorTag")]}):null]}),e.jsx(En,{children:z?e.jsxs(Ln,{children:[e.jsx(Kn,{name:"warning-fill",size:24}),K]}):e.jsxs(e.Fragment,{children:[u?e.jsxs(Rn,{children:[e.jsx(Qt,{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(Bn,{children:v}),e.jsx(Qt,{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(qn,{children:[e.jsx(_n,{})," ",e.jsx(Ke,{credits:M}),o?e.jsx(Wn,{children:e.jsx(Ke,{credits:t.priceCredits*v})}):null]})]})})]}),e.jsxs(Fn,{children:[L?e.jsx(Un,{"data-on":W||void 0,onClick:()=>J(t),"aria-label":W?a("cart.removeFromFavorites",{name:t.name}):a("cart.addToFavorites",{name:t.name}),title:W?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:e.jsx(Y,{name:W?"heart-solid":"heart"})}):null,e.jsx(Gn,{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(Hn,{children:e.jsx("button",{className:"link",onClick:()=>ye(R),disabled:ee,children:a("cart.clearCart")})})]})]}),e.jsxs(On,{children:[e.jsx(Dn,{children:a("cart.purchaseSummary")}),e.jsxs(Vn,{children:[e.jsxs(Yn,{children:[e.jsx(Jn,{children:a("cart.totalItems",{count:sa})}),e.jsx(Zn,{children:e.jsxs(Xn,{children:[e.jsx(ei,{})," ",e.jsx(Ke,{credits:it})]})})]}),e.jsx(Ht,{options:Be.options,totalCents:Re,shortfall:Be.manaShortfall,showCreditsAmount:!1,creditsLabel:_?a("marketCheckout.confirmPurchase"):Be.options.length>1?a("cart.buyWithCredits"):a("cart.checkout"),busy:ee||nt,onPay:t=>void(_?yt():Z(t)),creditsFallback:{label:ee?a("cart.working"):_?a("marketCheckout.confirmPurchase"):a("cart.checkout"),onClick:()=>void(_?yt():Z())}}),nt?e.jsx($e,{className:"muted",children:a("cart.allUnavailable")}):null,n?null:e.jsx($e,{className:"muted",children:a("cart.signInHint")}),_?e.jsx($e,{className:"muted",children:a("cart.priceChanged")}):null,Ze?e.jsx($e,{className:"muted",children:Ze}):null,e.jsx(ti,{message:Zt})]})]})]})]}),rt.length>0?e.jsx(ai,{children:e.jsx(Ms,{title:a("cart.youMightAlsoLike"),items:rt})}):null,he&&n?e.jsx(Ts,{auth:he.auth,signer:n.signer,step:{index:he.index,total:he.total},title:a("authorizeStep.manaTitle"),name:a("authorizeStep.manaName"),reason:a("authorizeStep.manaReason"),icon:e.jsx("img",{src:Te,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{run:t}=he;be(null),t()},onCancel:()=>be(null),onClose:()=>be(null)}):null,h?e.jsx(un,{phase:h.phase,balanceCredits:me,heldCreditsCount:((Ct=j==null?void 0:j.held)==null?void 0:Ct.credits)??null,onClose:ua,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:Ra(n==null?void 0:n.providerType),signatures:h.phase==="processing"?h.signatures:void 0,options:h.phase==="choose"?_e(h).options:void 0,shortfall:h.phase==="choose"?_e(h).manaShortfall:void 0,onPay:ga,totalCents:h.phase==="choose"?h.totalCents:void 0,totalManaWei:h.phase==="choose"?h.manaWei:void 0,totalCredits:h.phase==="choose"?Ye(h.lines):void 0,lines:h.phase==="nofunds"?h.lines:void 0,shortfallCredits:h.phase==="nofunds"?h.shortfall:void 0,packs:ge,selectedPack:ze,onSelectPack:tt,onBuyPacks:()=>void xa(),message:h.phase==="error"?h.message:void 0,heldCredits:h.phase==="error"&&!!h.heldCredits,onRetry:()=>void Z()}):null]})}export{bi as Cart};
748
- //# sourceMappingURL=Cart-DT8eTjju.js.map
748
+ //# sourceMappingURL=Cart-CD3QMZMU.js.map
@@ -1,4 +1,4 @@
1
- import{j as e,r as h,d as te,b as oe}from"./react-C_gdQiCE.js";import{t as b,s as u,h as se,I as re,m as ae,b as r,Z as q,v as F,bC as ie,bD as ne,c as le,l as ce,n as de,ar as ue,L as me,S as W,M as pe,bE as fe,bR as he}from"./index-DO2w-wQR.js";import{E as xe}from"./ErrorNotice-CSHOj_36.js";import{d as be,P as ge,C as ye,a as N,b as ve,S as je}from"./collectionPage.styles-DVsIiXb2.js";import{u as we}from"./useStore-D2qLhY6J.js";import{u as Ce,t as G,R as ke,j as Se,k as $e,l as Ee,m as Ne,n as Me,o as Fe,p as Ie,v as Re,q as Te,r as _e,M as Ae,s as Pe}from"./browseLayout.styles-BGMKaxNl.js";import{L as De}from"./LoadMore-BwZO73du.js";import{u as Le}from"./useInfiniteGrid-R77Z-ty5.js";import{u as Be,s as ze}from"./search-empty-CZAYhXXz.js";import{S as Oe}from"./categories-CcQWbCI7.js";import{G as We}from"./grid.styles-BgULreOR.js";import"./dcl-schemas-Z_oWg9h9.js";import"./sentry-Cxy688Uv.js";import"./ethers-Cpz0Q6xx.js";import"./intl-AKLEHPeO.js";import"./skeleton.styles-B1HNltmx.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new s.Error().stack;o&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[o]="0b51f0a5-f416-4607-b62f-12653d11d4c8",s._sentryDebugIdIdentifier="sentry-dbid-0b51f0a5-f416-4607-b62f-12653d11d4c8")}catch{}})();const Ge=u.section`
1
+ import{j as e,r as h,d as te,b as oe}from"./react-Io5Wove7.js";import{t as b,s as u,h as se,I as re,m as ae,b as r,Z as q,v as F,bC as ie,bD as ne,c as le,l as ce,n as de,ar as ue,L as me,S as W,M as pe,bE as fe,bR as he}from"./index-bJXcZSYa.js";import{E as xe}from"./ErrorNotice-BanVYx_o.js";import{d as be,P as ge,C as ye,a as N,b as ve,S as je}from"./collectionPage.styles-DUDsxvQH.js";import{u as we}from"./useStore-zwLaMv5E.js";import{u as Ce,t as G,R as ke,j as Se,k as $e,l as Ee,m as Ne,n as Me,o as Fe,p as Ie,v as Re,q as Te,r as _e,M as Ae,s as Pe}from"./browseLayout.styles-C_vn8XYJ.js";import{L as De}from"./LoadMore-hoiSVN2H.js";import{u as Le}from"./useInfiniteGrid-CKUOL3of.js";import{u as Be,s as ze}from"./search-empty-C2pIWVz4.js";import{S as Oe}from"./categories-DSulO5YB.js";import{G as We}from"./grid.styles-DlGaOCzf.js";import"./dcl-schemas-OH8G4Ndl.js";import"./sentry-faeuEJiQ.js";import"./ethers-DwK2TdL6.js";import"./intl-AKLEHPeO.js";import"./skeleton.styles-Cjpy58bn.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new s.Error().stack;o&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[o]="0b51f0a5-f416-4607-b62f-12653d11d4c8",s._sentryDebugIdIdentifier="sentry-dbid-0b51f0a5-f416-4607-b62f-12653d11d4c8")}catch{}})();const Ge=u.section`
2
2
  position: relative;
3
3
  border-radius: ${b.radius.card};
4
4
  overflow: hidden;
@@ -131,4 +131,4 @@ import{j as e,r as h,d as te,b as oe}from"./react-C_gdQiCE.js";import{t as b,s a
131
131
  background: ${j.blackBtn};
132
132
  }
133
133
  `;function it({address:s}){var d,n;const{data:o}=q(s);if(!s)return null;const i=(o==null?void 0:o.name)||F(s),l=(n=(d=o==null?void 0:o.avatar)==null?void 0:d.snapshots)==null?void 0:n.face256,a=`${le.profileUrl}/${s}`,m=ie(ne({name:o==null?void 0:o.name,hasClaimedName:o==null?void 0:o.hasClaimedName,ethAddress:(o==null?void 0:o.ethAddress)??s}));return e.jsxs(st,{"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(rt,{title:i,children:i}),e.jsx(tt,{value:s,label:r("collection.copyAddress"),flow:"copy_creator_address",testId:"creator-card-copy",children:e.jsx("span",{children:F(s)})}),e.jsx(at,{"data-testid":"creator-card-view",href:a,target:"_blank",rel:"noopener noreferrer",children:r("collection.viewProfile")})]})}const nt=48,lt=["all","on_sale","not_for_sale"];function St(){var O;const{contractAddress:s}=te(),o=oe(),i=h.useMemo(()=>({category:"all",status:"all",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[l,a]=Be(i),{category:m,subCategory:d,rarities:n,priceMin:x,priceMax:f,smart:C,sort:I}=l,g=lt.includes(l.status)?l.status:"all",R=t=>a({status:t});Ce(`${m}:${d??""}`);const[w,y]=h.useState(!1);h.useEffect(()=>{if(!w)return;const t=ee=>{ee.key==="Escape"&&y(!1)};document.addEventListener("keydown",t);const E=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",t),document.body.style.overflow=E}},[w]);const T=x&&!Number.isNaN(Number(x))?Number(x):void 0,_=f&&!Number.isNaN(Number(f))?Number(f):void 0,H=d?Oe[d]:void 0,K=(G.find(t=>t.key===I)??G[0]).server,A={contractAddress:s,category:m,rarities:n.length?n:void 0,wearableCategories:H,minPriceCredits:T,maxPriceCredits:_,isWearableSmart:C||void 0,isOnSale:g==="all"?void 0:g==="on_sale",sortBy:K},{items:k,total:Z,isLoading:S,error:P,hasNextPage:Q,isFetchingNextPage:D,isFetchNextPageError:V,fetchNextPage:J}=Le(["collection-page",A],t=>fe({...A,first:nt,skip:t}),{enabled:!!s}),{data:c}=ce({queryKey:["collection-meta",s],queryFn:()=>he(s),enabled:!!s,staleTime:5*6e4}),L=(c==null?void 0:c.name)||r("collection.fallbackTitle");de({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=k[0])==null?void 0:O.creator),{data:$}=q(p),X=($==null?void 0:$.name)||(p?F(p):"");function Y(t){a({category:t,subCategory:null})}function B(t){a({rarities:n.includes(t)?n.filter(E=>E!==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 ke)n.includes(t)&&v.push({key:`rarity-${t}`,label:ue(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(ge,{"data-testid":"collection-page",children:[e.jsxs(ye,{"aria-label":r("collection.breadcrumbAria"),children:[e.jsx(N,{onClick:()=>o("/items"),children:r("collection.breadcrumb")}),p?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"/"}),e.jsx(N,{onClick:()=>o(`/items/creator/${p}`),children:X}),e.jsx("span",{children:"/"}),e.jsx(N,{onClick:()=>o(`/items/creator/${p}?collections`),children:r("categories.collections")})]}):null,e.jsx("span",{children:"/"}),e.jsx(ve,{children:L})]}),e.jsx(Ze,{name:L,creator:p}),e.jsxs(Se,{"data-testid":"browse",children:[w?e.jsx($e,{onClick:()=>y(!1),"aria-hidden":!0}):null,e.jsxs(je,{children:[e.jsx(it,{address:p}),e.jsxs(Ee,{"data-open":w||void 0,"data-static":!0,"data-testid":"browse-sidebar",children:[e.jsxs(Ne,{children:[e.jsx(Me,{children:r("assets.filters")}),e.jsx(Fe,{onClick:()=>y(!1),"aria-label":r("assets.closeFilters"),children:"✕"})]}),e.jsx(Ie,{children:e.jsx(Re,{category:m,subCategory:d,onCategory:Y,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(Te,{children:e.jsx(_e,{type:"button",onClick:()=>y(!1),children:r("assets.showItems")})})]})]}),e.jsxs(Ae,{children:[e.jsx(Pe,{sort:I,onSort:t=>a({sort:t}),total:Z,loading:S,onOpenFilters:()=>y(!0),chips:v,onClearChips:z}),P?e.jsx(xe,{message:r("collection.error")}):null,!S&&!P&&k.length===0?e.jsx(me,{testId:"collection-empty",icon:ze,title:r("assets.empty.title"),body:r("collection.empty"),cta:{label:r("filterBar.clearAll"),onClick:z}}):e.jsxs(e.Fragment,{children:[e.jsx(We,{"data-testid":"grid",children:S?e.jsx(W,{count:15}):e.jsxs(e.Fragment,{children:[k.map(t=>e.jsx(pe,{item:t},t.id)),D?e.jsx(W,{count:6}):null]})}),e.jsx(De,{hasNextPage:Q,isFetching:D,isError:V,onLoadMore:()=>void J()})]})]})]})]})}export{St as Collection,St as default};
134
- //# sourceMappingURL=Collection-DCZ3YJU4.js.map
134
+ //# sourceMappingURL=Collection-fLHFUGHo.js.map
@@ -1,4 +1,4 @@
1
- import{r as C,j as s}from"./react-C_gdQiCE.js";import{s as ae,f as E,A as $,g as T,r as H,m as O,i as R,j as X}from"./authorizations-ChjDHhq0.js";import{i as ne}from"./errors-BOK5UzVJ.js";import{t as c,s as a,m as ie,b as k,I as K,h as z,aC as re,bG as D,c5 as oe,g as A,f as M,aH as U,W as se,X as Q,q as S,an as de,c6 as ce,c7 as L,M as le}from"./index-DO2w-wQR.js";import{E as pe}from"./ErrorNotice-CSHOj_36.js";import{j as he,k as ue,l as G,m as ge,n as fe}from"./buy-Cmc6VGNE.js";import{a as xe,w as me,S as be,G as we}from"./buy-gasless-SuVAuIoA.js";import{M as B,E as N,s as Z}from"./sendMetaTransaction-Bu8b5LeI.js";import{I as ye,C as J}from"./ethers-Cpz0Q6xx.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]="1b9dabd0-4c4c-474b-a8b4-31af8a70d260",t._sentryDebugIdIdentifier="sentry-dbid-1b9dabd0-4c4c-474b-a8b4-31af8a70d260")}catch{}})();const W="shop:resume_after_signin",ve=900*1e3;function pt(t){try{sessionStorage.setItem(W,JSON.stringify({...t,at:Date.now()}))}catch{}}function ht(t){let e;try{e=sessionStorage.getItem(W)}catch{return null}if(!e)return null;try{sessionStorage.removeItem(W)}catch{}let n;try{n=JSON.parse(e)}catch{return null}return!n||n.type!==t||typeof n.at!="number"||Date.now()-n.at>ve?null:n.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:n.path}}function ut(t,e){const n=(o,...l)=>void t.invalidateQueries({queryKey:e?[o,...l]:[o]});t.invalidateQueries({queryKey:["usd-balance"]}),t.invalidateQueries({queryKey:["detail-trade"]}),t.invalidateQueries({queryKey:["shop-item"]}),n("owned-token",e==null?void 0:e.contractAddress,e==null?void 0:e.tokenId),n("public-token",e==null?void 0:e.contractAddress,e==null?void 0:e.tokenId),n("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 ke=ie`
1
+ import{r as C,j as s}from"./react-Io5Wove7.js";import{s as ae,f as E,A as $,g as T,r as H,m as O,i as R,j as X}from"./authorizations-DC168PVR.js";import{i as ne}from"./errors-ISVrHVty.js";import{t as c,s as a,m as ie,b as k,I as K,h as z,aC as re,bG as D,c5 as oe,g as A,f as M,aH as U,W as se,X as Q,q as S,an as de,c6 as ce,c7 as L,M as le}from"./index-bJXcZSYa.js";import{E as pe}from"./ErrorNotice-BanVYx_o.js";import{j as he,k as ue,l as G,m as ge,n as fe}from"./buy-C9vFcpIy.js";import{a as xe,w as me,S as be,G as we}from"./buy-gasless-Co1yjKqt.js";import{M as B,E as N,s as Z}from"./sendMetaTransaction-Bnb1e1Oo.js";import{I as ye,C as J}from"./ethers-DwK2TdL6.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]="fbf5556a-a264-4aa8-a1f6-ecf00d3aa72a",t._sentryDebugIdIdentifier="sentry-dbid-fbf5556a-a264-4aa8-a1f6-ecf00d3aa72a")}catch{}})();const W="shop:resume_after_signin",ve=900*1e3;function pt(t){try{sessionStorage.setItem(W,JSON.stringify({...t,at:Date.now()}))}catch{}}function ht(t){let e;try{e=sessionStorage.getItem(W)}catch{return null}if(!e)return null;try{sessionStorage.removeItem(W)}catch{}let n;try{n=JSON.parse(e)}catch{return null}return!n||n.type!==t||typeof n.at!="number"||Date.now()-n.at>ve?null:n.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:n.path}}function ut(t,e){const n=(o,...l)=>void t.invalidateQueries({queryKey:e?[o,...l]:[o]});t.invalidateQueries({queryKey:["usd-balance"]}),t.invalidateQueries({queryKey:["detail-trade"]}),t.invalidateQueries({queryKey:["shop-item"]}),n("owned-token",e==null?void 0:e.contractAddress,e==null?void 0:e.tokenId),n("public-token",e==null?void 0:e.contractAddress,e==null?void 0:e.tokenId),n("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 ke=ie`
2
2
  to { transform: rotate(360deg); }
3
3
  `,Ce=a.div`
4
4
  position: fixed;
@@ -184,7 +184,7 @@ import{r as C,j as s}from"./react-C_gdQiCE.js";import{s as ae,f as E,A as $,g as
184
184
  @media (prefers-reduced-motion: reduce) {
185
185
  animation: none;
186
186
  }
187
- `;function gt({auth:t,signer:e,step:n,title:o,reason:l,name:p,image:g,icon:u,onAuthorized:y,onCancel:b,onClose:h}){const[f,m]=C.useState(!1),[r,w]=C.useState(null);async function x(){m(!0),w(null);try{await ae({auth:t,signer:e,active:!0}),y()}catch(d){ne(d)?w(k("authorizeStep.errorRejected")):(z(d,{flow:"authorize_step",kind:t.kind}),w(k("authorizeStep.errorGeneric"))),m(!1)}}return s.jsx(Ce,{onClick:f?void 0:h,role:"presentation","data-testid":"authorize-step-scrim",children:s.jsxs(Ae,{onClick:d=>d.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":o,children:[s.jsxs(Me,{children:[s.jsx(Te,{children:o}),n&&n.total>1?s.jsx(ze,{"data-testid":"authorize-step-count",children:k("authorizeStep.stepOf",{index:n.index,total:n.total})}):null,s.jsx(je,{onClick:h,disabled:f,"aria-label":k("authorizeStep.close"),children:s.jsx(K,{name:"close",className:"ico"})})]}),s.jsxs(Ie,{"data-testid":"authorize-step-row",children:[s.jsx(We,{children:g?s.jsx("img",{src:g,alt:""}):u}),s.jsxs(Ee,{children:[s.jsx($e,{title:p,children:p}),s.jsx(Se,{children:l})]})]}),s.jsx(Be,{children:k("authorizeStep.note")}),s.jsx(pe,{message:r}),s.jsxs(Ne,{children:[s.jsx(Pe,{type:"button",onClick:b,disabled:f,children:k("authorizeStep.cancel")}),s.jsx(Fe,{type:"button","data-testid":"authorize-step-action",onClick:()=>void x(),disabled:f,children:f?s.jsxs(s.Fragment,{children:[s.jsx(Ve,{"aria-hidden":!0}),k("authorizeStep.authorizing")]}):k("authorizeStep.authorize")})]})]})})}const ft="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%201'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%202L22%2012L12%2022L2%2012L12%202ZM12%204.8L19.2%2012L12%2019.2L4.8%2012L12%204.8ZM12%2015.6C12.9548%2015.6001%2013.8705%2015.2209%2014.5457%2014.5459C15.2209%2013.8708%2015.6003%2012.9552%2015.6004%2012.0004C15.6005%2011.0456%2015.2213%2010.1299%2014.5463%209.45471C13.8712%208.7795%2012.9556%208.40011%2012.0008%208.4C11.0461%208.4%2010.1304%208.77928%209.45525%209.45442C8.78012%2010.1295%208.40083%2011.0452%208.40083%2012C8.40083%2012.9548%208.78012%2013.8705%209.45525%2014.5456C10.1304%2015.2207%2011.0461%2015.6%2012.0008%2015.6H12Z'%20fill='white'/%3e%3cg%20id='Rectangle%201'%3e%3c/g%3e%3c/g%3e%3c/svg%3e",xt="data:image/webp;base64,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",mt="https://cdn.decentraland.org/@dcl/shop/1.11.2-33050849044.commit-d710ef0/_assets/buy-error-22UunaPC.png";function De(t,e){return(t+e-1n)/e}function Le(t,e,n){return t<=0||e<=0?0n:t>=e?n:De(n*BigInt(t),BigInt(e))}function bt(t){var h,f,m;const e=Number.isFinite(t.priceCents)?Math.max(0,Math.trunc(t.priceCents)):0,n=Number.isFinite(t.balanceCents)?Math.max(0,Math.trunc(t.balanceCents)):0,o=t.priceManaWei>0n?t.priceManaWei:0n,l=t.manaBalanceWei>0n?t.manaBalanceWei:0n;if(e<=0)return{options:[],preferred:null,manaShortfall:null};const p=[];n>=e&&p.push({method:"credits",creditsCents:e,credits:re(e),manaWei:0n});const g=D(n)*oe;if(o>0n&&g>0&&g<e){const r=e-g,w=Le(r,e,o);l>=w&&p.push({method:"combined",creditsCents:g,credits:D(g),manaWei:w})}o>0n&&l>=o&&p.push({method:"mana",creditsCents:0,credits:0,manaWei:o});const u=((h=p.find(r=>r.method==="credits"))==null?void 0:h.method)??((f=p.find(r=>r.method==="combined"))==null?void 0:f.method)??((m=p.find(r=>r.method==="mana"))==null?void 0:m.method)??null,b=!p.some(r=>r.method==="mana"||r.method==="combined")&&o>0n&&l>0n?{manaWei:l,manaCents:qe(l,e,o),priceCents:e}:null;return{options:p,preferred:u,manaShortfall:b}}function qe(t,e,n){return Number(t*BigInt(e)/n)}function wt(t,e){let n=Number.isFinite(e)?Math.max(0,Math.trunc(e)):0;return t.map(o=>{const l=Number.isFinite(o)?Math.max(0,Math.trunc(o)):0,p=Math.min(l,n);return n-=p,p})}function yt(t,e){return t.options.find(n=>n.method===e)??null}async function vt(t){const[e]=await Y({...t,trades:[t.trade]});return e}async function kt(t){const[e]=await Y({...t,trades:[],mints:[t.mint]});return e}async function Y(t){const{trades:e,mints:n=[],buyer:o,signer:l,onSigned:p,manaWei:g}=t;if(e.length===0&&n.length===0)throw new Error("No items to buy");const u=new Map;for(const h of e){const f=`${h.chainId}:${h.contract.toLowerCase()}`,m=u.get(f);m?m.push(h):u.set(f,[h])}const y=new Map;for(const h of n){const f=y.get(h.chainId);f?f.push(h):y.set(h.chainId,[h])}const b=[];for(const h of u.values())b.push(await He({trades:h,buyer:o,signer:l,onSigned:p,requiredManaWei:g}));for(const[h,f]of y){const m=g??f.reduce((r,w)=>r+BigInt(w.item.priceWei),0n);b.push(await Oe({mints:f,chainId:h,buyer:o,signer:l,onSigned:p,requiredManaWei:m}))}return b}async function He(t){const{trades:e,buyer:n,signer:o,onSigned:l,requiredManaWei:p}=t,g=e[0],u=A(U(g.contract),g.chainId),y=A(M.MANAToken,g.chainId);await E({auth:{kind:$.Allowance,contractAddress:y.address,spenderAddress:u.address,chainId:g.chainId},signer:o,requiredWei:p});const b=e.map(r=>ue(r,n));if(T.enabled)try{const r=new ye(u.abi).encodeFunctionData("accept",[b]),w=H(),x=O(o.provider,w),d=await Z(x,w,r,u,{serverURL:T.relayerUrl});return l==null||l(),await R(d,"the MANA purchase"),d}catch(r){if(r instanceof B&&r.code===N.USER_DENIED||r instanceof X)throw r;z(r,{flow:"buy_mana",step:"gasless_fallback"})}await Q(o.provider,g.chainId);const f=await new J(u.address,u.abi,o).accept(b,G(g.chainId));return l==null||l(),(await f.wait()).transactionHash}async function Oe(t){const{mints:e,chainId:n,buyer:o,signer:l,onSigned:p,requiredManaWei:g}=t,u=A(M.CollectionStore,n),y=A(M.MANAToken,n),b=e.map(r=>r.item);if(await E({auth:{kind:$.Allowance,contractAddress:y.address,spenderAddress:u.address,chainId:n},signer:l,requiredWei:g}),T.enabled)try{const r=ge(b,o,u.abi),w=H(),x=O(l.provider,w),d=await Z(x,w,r,u,{serverURL:T.relayerUrl});return p==null||p(),await R(d,"the MANA purchase"),d}catch(r){if(r instanceof B&&r.code===N.USER_DENIED||r instanceof X)throw r;z(r,{flow:"buy_mint_mana",step:"gasless_fallback"})}await Q(l.provider,n);const f=await new J(u.address,u.abi,l).buy(fe(b,o),G(n));return p==null||p(),(await f.wait()).transactionHash}async function Ct(t){const{trade:e,...n}=t;return _({target:{kind:"trade",trade:e},...n})}async function At(t){const{mint:e,...n}=t;return _({target:{kind:"store",mint:e},...n})}async function _(t){const{target:e,buyer:n,signer:o,credits:l,manaGapWei:p,providerType:g,onBroadcast:u,onReverted:y,onUnobservable:b}=t;if(l.length===0)throw new Error("No credits to spend — use the MANA-only rail for that");if(p<=0n)throw new Error("No MANA gap to cover — use the credits-only rail for that");const h=ee(e),f=A(M.MANAToken,h),m=A(M.CreditsManager,h);await E({auth:{kind:$.Allowance,contractAddress:f.address,spenderAddress:m.address,chainId:h},signer:o,requiredWei:p});const w=(l.reduce((d,v)=>d+BigInt(v.availableAmount),0n)+p).toString(),x=Re(e,l,w);if(T.enabled){let d;try{return d=await xe({purchase:x,buyer:n,signer:o}),u==null||u({txHash:d}),await me(d),d}catch(v){if(v instanceof B&&v.code===N.USER_DENIED||v instanceof be)throw v;if(!(v instanceof we))throw d&&(y==null||y({txHash:d})),v;if(v.reason==="relayer-unreachable")throw b==null||b(),v;if(!se(g))throw v;z(v,{flow:"buy_credits_and_mana",step:"gasless_fallback"})}}return he({purchase:x,buyer:n,signer:o,onBroadcast:u,onReverted:y})}function ee(t){return t.kind==="trade"?t.trade.chainId:t.mint.chainId}function Re(t,e,n){return t.kind==="trade"?{kind:"trade",trade:t.trade,credits:e,maxCreditedValue:n}:{kind:"store",item:t.mint.item,chainId:t.mint.chainId,credits:e,maxCreditedValue:n}}function Mt(t,e){const n=ee(e);return t==="combined"?{spender:A(M.CreditsManager,n).address,chainId:n}:{spender:e.kind==="trade"?A(U(e.trade.contract),n).address:A(M.CollectionStore,n).address,chainId:n}}function Tt(t){return s.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,...t,children:s.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})}function jt(t){return s.jsx("svg",{viewBox:"0 0 20 20",width:"24",height:"24","aria-hidden":!0,...t,children:s.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:P,radius:te,z:Xe}=c,zt=a.div`
187
+ `;function gt({auth:t,signer:e,step:n,title:o,reason:l,name:p,image:g,icon:u,onAuthorized:y,onCancel:b,onClose:h}){const[f,m]=C.useState(!1),[r,w]=C.useState(null);async function x(){m(!0),w(null);try{await ae({auth:t,signer:e,active:!0}),y()}catch(d){ne(d)?w(k("authorizeStep.errorRejected")):(z(d,{flow:"authorize_step",kind:t.kind}),w(k("authorizeStep.errorGeneric"))),m(!1)}}return s.jsx(Ce,{onClick:f?void 0:h,role:"presentation","data-testid":"authorize-step-scrim",children:s.jsxs(Ae,{onClick:d=>d.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":o,children:[s.jsxs(Me,{children:[s.jsx(Te,{children:o}),n&&n.total>1?s.jsx(ze,{"data-testid":"authorize-step-count",children:k("authorizeStep.stepOf",{index:n.index,total:n.total})}):null,s.jsx(je,{onClick:h,disabled:f,"aria-label":k("authorizeStep.close"),children:s.jsx(K,{name:"close",className:"ico"})})]}),s.jsxs(Ie,{"data-testid":"authorize-step-row",children:[s.jsx(We,{children:g?s.jsx("img",{src:g,alt:""}):u}),s.jsxs(Ee,{children:[s.jsx($e,{title:p,children:p}),s.jsx(Se,{children:l})]})]}),s.jsx(Be,{children:k("authorizeStep.note")}),s.jsx(pe,{message:r}),s.jsxs(Ne,{children:[s.jsx(Pe,{type:"button",onClick:b,disabled:f,children:k("authorizeStep.cancel")}),s.jsx(Fe,{type:"button","data-testid":"authorize-step-action",onClick:()=>void x(),disabled:f,children:f?s.jsxs(s.Fragment,{children:[s.jsx(Ve,{"aria-hidden":!0}),k("authorizeStep.authorizing")]}):k("authorizeStep.authorize")})]})]})})}const ft="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%201'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%202L22%2012L12%2022L2%2012L12%202ZM12%204.8L19.2%2012L12%2019.2L4.8%2012L12%204.8ZM12%2015.6C12.9548%2015.6001%2013.8705%2015.2209%2014.5457%2014.5459C15.2209%2013.8708%2015.6003%2012.9552%2015.6004%2012.0004C15.6005%2011.0456%2015.2213%2010.1299%2014.5463%209.45471C13.8712%208.7795%2012.9556%208.40011%2012.0008%208.4C11.0461%208.4%2010.1304%208.77928%209.45525%209.45442C8.78012%2010.1295%208.40083%2011.0452%208.40083%2012C8.40083%2012.9548%208.78012%2013.8705%209.45525%2014.5456C10.1304%2015.2207%2011.0461%2015.6%2012.0008%2015.6H12Z'%20fill='white'/%3e%3cg%20id='Rectangle%201'%3e%3c/g%3e%3c/g%3e%3c/svg%3e",xt="data:image/webp;base64,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",mt="https://cdn.decentraland.org/@dcl/shop/1.11.2/_assets/buy-error-22UunaPC.png";function De(t,e){return(t+e-1n)/e}function Le(t,e,n){return t<=0||e<=0?0n:t>=e?n:De(n*BigInt(t),BigInt(e))}function bt(t){var h,f,m;const e=Number.isFinite(t.priceCents)?Math.max(0,Math.trunc(t.priceCents)):0,n=Number.isFinite(t.balanceCents)?Math.max(0,Math.trunc(t.balanceCents)):0,o=t.priceManaWei>0n?t.priceManaWei:0n,l=t.manaBalanceWei>0n?t.manaBalanceWei:0n;if(e<=0)return{options:[],preferred:null,manaShortfall:null};const p=[];n>=e&&p.push({method:"credits",creditsCents:e,credits:re(e),manaWei:0n});const g=D(n)*oe;if(o>0n&&g>0&&g<e){const r=e-g,w=Le(r,e,o);l>=w&&p.push({method:"combined",creditsCents:g,credits:D(g),manaWei:w})}o>0n&&l>=o&&p.push({method:"mana",creditsCents:0,credits:0,manaWei:o});const u=((h=p.find(r=>r.method==="credits"))==null?void 0:h.method)??((f=p.find(r=>r.method==="combined"))==null?void 0:f.method)??((m=p.find(r=>r.method==="mana"))==null?void 0:m.method)??null,b=!p.some(r=>r.method==="mana"||r.method==="combined")&&o>0n&&l>0n?{manaWei:l,manaCents:qe(l,e,o),priceCents:e}:null;return{options:p,preferred:u,manaShortfall:b}}function qe(t,e,n){return Number(t*BigInt(e)/n)}function wt(t,e){let n=Number.isFinite(e)?Math.max(0,Math.trunc(e)):0;return t.map(o=>{const l=Number.isFinite(o)?Math.max(0,Math.trunc(o)):0,p=Math.min(l,n);return n-=p,p})}function yt(t,e){return t.options.find(n=>n.method===e)??null}async function vt(t){const[e]=await Y({...t,trades:[t.trade]});return e}async function kt(t){const[e]=await Y({...t,trades:[],mints:[t.mint]});return e}async function Y(t){const{trades:e,mints:n=[],buyer:o,signer:l,onSigned:p,manaWei:g}=t;if(e.length===0&&n.length===0)throw new Error("No items to buy");const u=new Map;for(const h of e){const f=`${h.chainId}:${h.contract.toLowerCase()}`,m=u.get(f);m?m.push(h):u.set(f,[h])}const y=new Map;for(const h of n){const f=y.get(h.chainId);f?f.push(h):y.set(h.chainId,[h])}const b=[];for(const h of u.values())b.push(await He({trades:h,buyer:o,signer:l,onSigned:p,requiredManaWei:g}));for(const[h,f]of y){const m=g??f.reduce((r,w)=>r+BigInt(w.item.priceWei),0n);b.push(await Oe({mints:f,chainId:h,buyer:o,signer:l,onSigned:p,requiredManaWei:m}))}return b}async function He(t){const{trades:e,buyer:n,signer:o,onSigned:l,requiredManaWei:p}=t,g=e[0],u=A(U(g.contract),g.chainId),y=A(M.MANAToken,g.chainId);await E({auth:{kind:$.Allowance,contractAddress:y.address,spenderAddress:u.address,chainId:g.chainId},signer:o,requiredWei:p});const b=e.map(r=>ue(r,n));if(T.enabled)try{const r=new ye(u.abi).encodeFunctionData("accept",[b]),w=H(),x=O(o.provider,w),d=await Z(x,w,r,u,{serverURL:T.relayerUrl});return l==null||l(),await R(d,"the MANA purchase"),d}catch(r){if(r instanceof B&&r.code===N.USER_DENIED||r instanceof X)throw r;z(r,{flow:"buy_mana",step:"gasless_fallback"})}await Q(o.provider,g.chainId);const f=await new J(u.address,u.abi,o).accept(b,G(g.chainId));return l==null||l(),(await f.wait()).transactionHash}async function Oe(t){const{mints:e,chainId:n,buyer:o,signer:l,onSigned:p,requiredManaWei:g}=t,u=A(M.CollectionStore,n),y=A(M.MANAToken,n),b=e.map(r=>r.item);if(await E({auth:{kind:$.Allowance,contractAddress:y.address,spenderAddress:u.address,chainId:n},signer:l,requiredWei:g}),T.enabled)try{const r=ge(b,o,u.abi),w=H(),x=O(l.provider,w),d=await Z(x,w,r,u,{serverURL:T.relayerUrl});return p==null||p(),await R(d,"the MANA purchase"),d}catch(r){if(r instanceof B&&r.code===N.USER_DENIED||r instanceof X)throw r;z(r,{flow:"buy_mint_mana",step:"gasless_fallback"})}await Q(l.provider,n);const f=await new J(u.address,u.abi,l).buy(fe(b,o),G(n));return p==null||p(),(await f.wait()).transactionHash}async function Ct(t){const{trade:e,...n}=t;return _({target:{kind:"trade",trade:e},...n})}async function At(t){const{mint:e,...n}=t;return _({target:{kind:"store",mint:e},...n})}async function _(t){const{target:e,buyer:n,signer:o,credits:l,manaGapWei:p,providerType:g,onBroadcast:u,onReverted:y,onUnobservable:b}=t;if(l.length===0)throw new Error("No credits to spend — use the MANA-only rail for that");if(p<=0n)throw new Error("No MANA gap to cover — use the credits-only rail for that");const h=ee(e),f=A(M.MANAToken,h),m=A(M.CreditsManager,h);await E({auth:{kind:$.Allowance,contractAddress:f.address,spenderAddress:m.address,chainId:h},signer:o,requiredWei:p});const w=(l.reduce((d,v)=>d+BigInt(v.availableAmount),0n)+p).toString(),x=Re(e,l,w);if(T.enabled){let d;try{return d=await xe({purchase:x,buyer:n,signer:o}),u==null||u({txHash:d}),await me(d),d}catch(v){if(v instanceof B&&v.code===N.USER_DENIED||v instanceof be)throw v;if(!(v instanceof we))throw d&&(y==null||y({txHash:d})),v;if(v.reason==="relayer-unreachable")throw b==null||b(),v;if(!se(g))throw v;z(v,{flow:"buy_credits_and_mana",step:"gasless_fallback"})}}return he({purchase:x,buyer:n,signer:o,onBroadcast:u,onReverted:y})}function ee(t){return t.kind==="trade"?t.trade.chainId:t.mint.chainId}function Re(t,e,n){return t.kind==="trade"?{kind:"trade",trade:t.trade,credits:e,maxCreditedValue:n}:{kind:"store",item:t.mint.item,chainId:t.mint.chainId,credits:e,maxCreditedValue:n}}function Mt(t,e){const n=ee(e);return t==="combined"?{spender:A(M.CreditsManager,n).address,chainId:n}:{spender:e.kind==="trade"?A(U(e.trade.contract),n).address:A(M.CollectionStore,n).address,chainId:n}}function Tt(t){return s.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,...t,children:s.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})}function jt(t){return s.jsx("svg",{viewBox:"0 0 20 20",width:"24",height:"24","aria-hidden":!0,...t,children:s.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:P,radius:te,z:Xe}=c,zt=a.div`
188
188
  position: fixed;
189
189
  inset: 0;
190
190
  z-index: ${Xe.overlay};
@@ -831,4 +831,4 @@ import{r as C,j as s}from"./react-C_gdQiCE.js";import{s as ae,f as E,A as $,g as
831
831
  transform: scale(1.1);
832
832
  }
833
833
  `;function xa({title:t,items:e,onViewAll:n}){const o=C.useRef(null),[l,p]=C.useState(1),[g,u]=C.useState(0),[y,b]=C.useState(!0),[h,f]=C.useState(!1),m=C.useCallback(()=>{const x=o.current;if(!x)return;const{scrollLeft:d,scrollWidth:v,clientWidth:I}=x,V=Math.max(1,Math.ceil(v/I));p(V),u(Math.min(V-1,Math.round(d/I))),b(d<=1),f(d+I>=v-1)},[]);if(C.useEffect(()=>{m();const x=o.current;if(x)return x.addEventListener("scroll",m,{passive:!0}),window.addEventListener("resize",m),()=>{x.removeEventListener("scroll",m),window.removeEventListener("resize",m)}},[m,e.length]),e.length===0)return null;function r(x){const d=o.current;d&&d.scrollBy({left:x*d.clientWidth,behavior:"smooth"})}function w(x){const d=o.current;d&&d.scrollTo({left:x*d.clientWidth,behavior:"smooth"})}return s.jsxs(Ue,{"data-testid":"carousel",children:[s.jsxs(Qe,{children:[s.jsx(Ge,{children:t}),n?s.jsxs(Ze,{onClick:n,children:[k("collectionCarousel.viewAll"),s.jsx(Je,{name:"chevron-down",size:16})]}):null]}),s.jsxs(Ye,{children:[s.jsx(q,{"data-side":"left",onClick:()=>r(-1),"aria-label":k("collectionCarousel.scrollLeft"),disabled:y,children:s.jsx("img",{src:L,alt:"","aria-hidden":!0})}),s.jsx(_e,{ref:o,children:e.map(x=>s.jsx(le,{item:x},x.id))}),s.jsx(q,{"data-side":"right",onClick:()=>r(1),"aria-label":k("collectionCarousel.scrollRight"),disabled:h,children:s.jsx("img",{src:L,alt:"","aria-hidden":!0})})]}),l>1?s.jsx(et,{"aria-label":k("collectionCarousel.pages"),children:Array.from({length:l}).map((x,d)=>s.jsx(tt,{"data-active":d===g||void 0,"aria-label":k("collectionCarousel.goToPage",{page:d+1}),"aria-current":d===g?"true":void 0,onClick:()=>w(d)},d))}):null]})}export{wt as $,Lt as A,Nt as B,Wt as C,Yt as D,xt as E,_t as F,ea as G,Et as H,ta as I,aa as J,na as K,sa as L,zt as M,ia as N,bt as O,pa as P,ht as Q,xa as R,It as S,St as T,gt as U,pt as V,Ut as W,Bt as X,ut as Y,Mt as Z,Y as _,$t as a,Le as a0,Re as a1,ee as a2,ga as a3,fa as a4,oa as a5,yt as a6,vt as a7,kt as a8,Ct as a9,At as aa,Tt as b,Pt as c,Ft as d,Vt as e,Dt as f,da as g,ca as h,mt as i,la as j,ra as k,Ke as l,ft as m,ha as n,ua as o,jt as p,Qt as q,Gt as r,qt as s,Ht as t,Ot as u,Rt as v,Xt as w,Kt as x,Zt as y,Jt as z};
834
- //# sourceMappingURL=CollectionCarousel-0tR5Mlt1.js.map
834
+ //# sourceMappingURL=CollectionCarousel-Cs01J4sG.js.map
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index.es-BPsWV599.js","_assets/react-C_gdQiCE.js"])))=>i.map(i=>d[i]);
2
- import{s as a,_ as s}from"./index-DO2w-wQR.js";import{r as n,j as i}from"./react-C_gdQiCE.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]="6fa02be9-33fb-4ba3-9237-36b1dcd4bb39",e._sentryDebugIdIdentifier="sentry-dbid-6fa02be9-33fb-4ba3-9237-36b1dcd4bb39")}catch{}})();const o=a.div`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index.es-4xrWWZcO.js","_assets/react-Io5Wove7.js"])))=>i.map(i=>d[i]);
2
+ import{s as a,_ as s}from"./index-bJXcZSYa.js";import{r as n,j as i}from"./react-Io5Wove7.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]="6fa02be9-33fb-4ba3-9237-36b1dcd4bb39",e._sentryDebugIdIdentifier="sentry-dbid-6fa02be9-33fb-4ba3-9237-36b1dcd4bb39")}catch{}})();const o=a.div`
3
3
  position: fixed;
4
4
  inset: 0;
5
5
  /**
@@ -14,5 +14,5 @@ import{s as a,_ as s}from"./index-DO2w-wQR.js";import{r as n,j as i}from"./react
14
14
  */
15
15
  z-index: -1;
16
16
  pointer-events: none;
17
- `,r=n.lazy(async()=>{const[{default:e},{default:t}]=await Promise.all([s(()=>import("./index.es-BPsWV599.js"),__vite__mapDeps([0,1])),s(()=>import("./confettiAnimation-Btd6HRFo.js"),[])]);return{default:()=>i.jsx(e,{animationData:t,loop:1})}});function u(){const[e]=n.useState(()=>{var t;return!((t=window.matchMedia)!=null&&t.call(window,"(prefers-reduced-motion: reduce)").matches)});return e?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-ViY_Tl_x.js.map
17
+ `,r=n.lazy(async()=>{const[{default:e},{default:t}]=await Promise.all([s(()=>import("./index.es-4xrWWZcO.js"),__vite__mapDeps([0,1])),s(()=>import("./confettiAnimation-Btd6HRFo.js"),[])]);return{default:()=>i.jsx(e,{animationData:t,loop:1})}});function u(){const[e]=n.useState(()=>{var t;return!((t=window.matchMedia)!=null&&t.call(window,"(prefers-reduced-motion: reduce)").matches)});return e?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-DI93CkCr.js.map
@@ -1,2 +1,2 @@
1
- import{p as o}from"./sentry-Cxy688Uv.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-CPnBLCKC.js.map
1
+ import{p as o}from"./sentry-faeuEJiQ.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-9orAwS_V.js.map