@dcl/shop 0.10.1-31027477194.commit-fc53d94 → 0.10.1-31028891267.commit-63bf5fc

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 (232) hide show
  1. package/_assets/{Activity-CfY0DoCE.js → Activity-CKt2wMST.js} +3 -3
  2. package/_assets/{AnimatedBackground-B2cwLILp.js → AnimatedBackground-Bk8h728H.js} +1 -1
  3. package/_assets/{Assets-7La2bjIZ.js → Assets-DXvlbfLT.js} +13 -13
  4. package/_assets/{Assets.styles-B7ymOh16.js → Assets.styles-C7SPIxNU.js} +1 -1
  5. package/_assets/{Authorizations-bGRimXdL.js → Authorizations-UpoZb0DO.js} +1 -1
  6. package/_assets/{Cart-RXfoL9fz.js → Cart-DQtqd6kD.js} +2 -2
  7. package/_assets/{CircularProgress-DDbhIASu.js → CircularProgress-Ci1qMAll.js} +3 -3
  8. package/_assets/{Collection-BYD04XgM.js → Collection-BM2bW2tQ.js} +3 -3
  9. package/_assets/{CollectionCarousel-CTsZLD0o.js → CollectionCarousel-CPlRGKBj.js} +12 -12
  10. package/_assets/Confetti-C17OJKRQ.js +17 -0
  11. package/_assets/{ConstantsUtil-BkhvNc68.js → ConstantsUtil-CtukCvy7.js} +1 -1
  12. package/_assets/{ContentClient-CGWTGqN4.js → ContentClient-Cm1xl3FD.js} +1 -1
  13. package/_assets/{Creator-BFN_d0ZM.js → Creator-Dioa5qBo.js} +27 -27
  14. package/_assets/{DeploymentBuilder-CFls_09j.js → DeploymentBuilder-CF7zLfx2.js} +1 -1
  15. package/_assets/{ErrorNotice-C2_MEmWZ.js → ErrorNotice-D9o1yt7T.js} +1 -1
  16. package/_assets/{ExchangeController-0klZE9Ap.js → ExchangeController-BGV_APPb.js} +1 -1
  17. package/_assets/{Faq-C-IZVkuo.js → Faq-2zs-yjZh.js} +1 -1
  18. package/_assets/{GetCredits-5aPW2BJQ.js → GetCredits-D4fBa0Rx.js} +57 -52
  19. package/_assets/{Grow-C2pkrJSw.js → Grow-cfWFN5Cu.js} +1 -1
  20. package/_assets/{HelpersUtil-ClTpe1py.js → HelpersUtil-C8KGyeWj.js} +1 -1
  21. package/_assets/{ItemDetail-BBn6UmoR.js → ItemDetail-CPVAaixU.js} +99 -99
  22. package/_assets/LazyEmoteControls-BVVxqXv6.js +2 -0
  23. package/_assets/{LoadMore-rF0It0W-.js → LoadMore-DlOSOVSy.js} +1 -1
  24. package/_assets/{ManaPricingBanner.styles-BiRyZA-W.js → ManaPricingBanner.styles-Bd2L7Y9B.js} +1 -1
  25. package/_assets/{MyAssets-C3XR-J53.js → MyAssets-BVY2qFKH.js} +1 -1
  26. package/_assets/{MyFavorites-DB3ZomLE.js → MyFavorites-aKdfj2SE.js} +1 -1
  27. package/_assets/{NetworkUtil-CO-1nCx-.js → NetworkUtil-DXqql1Wz.js} +1 -1
  28. package/_assets/{NotFound-DHr4zm-w.js → NotFound-wRH70_M_.js} +1 -1
  29. package/_assets/{NotificationsBell-DwqEPZXb.js → NotificationsBell-zppbPXxs.js} +1 -1
  30. package/_assets/{OutfitDetail-XrwSdV3b.js → OutfitDetail-Cr692-da.js} +12 -12
  31. package/_assets/{OutfitPreview-GBWpg5ge.js → OutfitPreview-586dWqli.js} +2 -2
  32. package/_assets/{OutfitStudio-BSpaUxyv.js → OutfitStudio-BLvOaq4t.js} +1 -1
  33. package/_assets/{StoreSettings-C7hP7Tua.js → StoreSettings-C6JZEF9p.js} +1 -1
  34. package/_assets/Success-BCnJjwch.js +280 -0
  35. package/_assets/{SwapController-Bmox0i2g.js → SwapController-VBPXAB5r.js} +1 -1
  36. package/_assets/{Tooltip-Bg9BttKY.js → Tooltip-D2JokAZx.js} +2 -2
  37. package/_assets/{TradeService-DzWPKGG_.js → TradeService-BIs6AYPb.js} +1 -1
  38. package/_assets/{W3MFrameProviderSingleton-g4Tuy8Xp.js → W3MFrameProviderSingleton-ColWL6JI.js} +3 -3
  39. package/_assets/{WebCryptoP256-LKM_3T9m.js → WebCryptoP256-duaPPlwP.js} +1 -1
  40. package/_assets/{authorizations-oq_PkaKX.js → authorizations-C81yJZo1.js} +1 -1
  41. package/_assets/{basic-Cet0hOZj.js → basic-D_q2vsmL.js} +1 -1
  42. package/_assets/{biconomy-8FFSqEOX.js → biconomy-C-ZNlBNw.js} +1 -1
  43. package/_assets/{browser-DrmA6_0y.js → browser-DxF-qILS.js} +1 -1
  44. package/_assets/{browser-ponyfill-fSxUcg6c.js → browser-ponyfill-Dj0kiq3a.js} +1 -1
  45. package/_assets/{builder-CjlvqjvE.js → builder-CufTJoty.js} +1 -1
  46. package/_assets/{buy-BbDdxACJ.js → buy-DEfmn-X_.js} +1 -1
  47. package/_assets/{buy-gasless-Dv7SXb76.js → buy-gasless-D1GuSJOS.js} +1 -1
  48. package/_assets/{categories-CTfgPgaL.js → categories-BCX_N_OH.js} +17 -17
  49. package/_assets/{ccip-BC5ka1E9.js → ccip-BYV43Px1.js} +1 -1
  50. package/_assets/{ccip-Bvd8pdLO.js → ccip-CFNsN_0T.js} +1 -1
  51. package/_assets/{chains-BqVOrxrG.js → chains-Dlj4CXzw.js} +1 -1
  52. package/_assets/collectionPage.styles-e4lCCPp2.js +48 -0
  53. package/_assets/{common-CkYiP-7J.js → common-B0ixkeRu.js} +1 -1
  54. package/_assets/{controller-KvdsRufq.js → controller-BpsaW9Zq.js} +2 -2
  55. package/_assets/{core-B0fpMpkF.js → core-OQ6De4mo.js} +4 -4
  56. package/_assets/{createSvgIcon-BT3ydBV-.js → createSvgIcon-DRU2_lRu.js} +2 -2
  57. package/_assets/{custom-_mjMK42z.js → custom-BnyhLwzc.js} +1 -1
  58. package/_assets/{data-capture-Cr2P9fqm.js → data-capture-BXg9TlDi.js} +1 -1
  59. package/_assets/decimals-CMCAWgOh.js +1 -0
  60. package/_assets/{decimals-DyjR4aoq.js → decimals-CqRsKj6U.js} +1 -1
  61. package/_assets/{detectExtension-DWfhzRDC.js → detectExtension-DX7grDLh.js} +1 -1
  62. package/_assets/{disposePreview-flulL6RX.js → disposePreview-C6zVmkpS.js} +1 -1
  63. package/_assets/{email-CYe6La6q.js → email-l7qsQ8Rd.js} +1 -1
  64. package/_assets/{embedded-wallet-nVQstAFr.js → embedded-wallet-BO6W24h2.js} +1 -1
  65. package/_assets/{emotion-styled.browser.esm-D5jqg37e.js → emotion-styled.browser.esm-7_EcPqd8.js} +1 -1
  66. package/_assets/{engine-04vCue7D.js → engine-Bd9i1Z6d.js} +1 -1
  67. package/_assets/{errors-BM_aT-FG.js → errors-COdt9pAA.js} +1 -1
  68. package/_assets/estimate-l1-fee-Bx4d7gkq.js +1 -0
  69. package/_assets/eth_estimateGas-BZtzeL48.js +1 -0
  70. package/_assets/{eth_getStorageAt-C4Yqzc5m.js → eth_getStorageAt-E4OzrSEc.js} +1 -1
  71. package/_assets/eth_getTransactionCount-Ck8bEyl_.js +1 -0
  72. package/_assets/{ethereum-DFU7Vz3W.js → ethereum-CBeS7QFR.js} +1 -1
  73. package/_assets/{ethers-lk3HAbPB.js → ethers-BDpbhgX6.js} +1 -1
  74. package/_assets/{execute-D79L1gLN.js → execute-DKh5Q8iP.js} +2 -2
  75. package/_assets/{extractIPFS-DzfSqAlh.js → extractIPFS-ChPZSPQw.js} +1 -1
  76. package/_assets/{features-j9jVd1tG.js → features-BmerNJs8.js} +1 -1
  77. package/_assets/{fetchTokenMetadata-B2OXopz8.js → fetchTokenMetadata-D1WFnZU_.js} +2 -2
  78. package/_assets/{field.styles-CFDu9cjG.js → field.styles-CfOfIv_D.js} +1 -1
  79. package/_assets/{fortmatic-9W3d2zrH.js → fortmatic-HaPICQeD.js} +1 -1
  80. package/_assets/{get-bytecode-BsB9WanS.js → get-bytecode-BRKTQsHC.js} +1 -1
  81. package/_assets/get-ecosystem-wallet-info-Cx_Gvca8.js +1 -0
  82. package/_assets/{getBalance-SFnrZtyL.js → getBalance-DxUzm5jN.js} +2 -2
  83. package/_assets/{getInstalledModules-BE5-ES5I.js → getInstalledModules-DbNUTCf0.js} +1 -1
  84. package/_assets/{getNFT-C-3gehF2.js → getNFT-Bj55soZF.js} +2 -2
  85. package/_assets/getNFT-Ck8w7H9A.js +1 -0
  86. package/_assets/{grid.styles-BpaaGITL.js → grid.styles-hnDNWobS.js} +1 -1
  87. package/_assets/{hashTypedData-CV2sMq6Z.js → hashTypedData-B0Icjgxk.js} +1 -1
  88. package/_assets/{hashTypedData-DvVTFerK.js → hashTypedData-CgVlg7e8.js} +1 -1
  89. package/_assets/{in-app-DjxNB0c8.js → in-app-Dkm6WQ_a.js} +1 -1
  90. package/_assets/{in-app-wallet-calls-iQv_enzA.js → in-app-wallet-calls-B3-SdWTP.js} +1 -1
  91. package/_assets/{index-CIN6tFSk.js → index--Qq__AYe.js} +1 -1
  92. package/_assets/{index-opFDvQ1x.js → index-4dJnfa71.js} +1 -1
  93. package/_assets/{index-CszSJpDF.js → index-B-R_khcx.js} +1 -1
  94. package/_assets/{index-e2Y_B8Ci.js → index-B00hi3QH.js} +1 -1
  95. package/_assets/{index-DlyawL0m.js → index-B3FgV4Go.js} +1 -1
  96. package/_assets/index-B3hxW8LF.js +2 -0
  97. package/_assets/{index-CGnbH7Qh.js → index-B6jQjPSR.js} +1 -1
  98. package/_assets/{index-DGUYLh6f.js → index-BDBmzQMu.js} +2 -2
  99. package/_assets/{index-DXJpcLn5.js → index-BFlaaQ-B.js} +1 -1
  100. package/_assets/{index-waHK991P.js → index-BNB35_Nh.js} +14 -14
  101. package/_assets/{index--OJyT6Ic.js → index-BR1an-Iu.js} +1 -1
  102. package/_assets/{index-wwfq8-d9.js → index-BSeABvIx.js} +1 -1
  103. package/_assets/{index-Cjgyq-Qg.js → index-BSj9x9y9.js} +1 -1
  104. package/_assets/{index-BzcwOGk4.js → index-BX3lLNL7.js} +1 -1
  105. package/_assets/{index-CyqqIU0s.js → index-BXK3zOdP.js} +1 -1
  106. package/_assets/{index-DMAeyTCM.js → index-BZg8hiGi.js} +3 -3
  107. package/_assets/{index-CKWeyMCP.js → index-BkOXzeMe.js} +2 -2
  108. package/_assets/{index-C-6sWgtb.js → index-Bm-wt3RD.js} +3 -3
  109. package/_assets/{index-CoTORuNv.js → index-BoNVkZLu.js} +1 -1
  110. package/_assets/{index-CjxgAzu2.js → index-BpP4Kpol.js} +3 -3
  111. package/_assets/{index-DiYeyYKY.js → index-Bq3W2PLf.js} +1 -1
  112. package/_assets/{index-KJ7hHQUO.js → index-BuUQ4paE.js} +1 -1
  113. package/_assets/{index-Bf9AmMtW.js → index-C5Cx7iz7.js} +1 -1
  114. package/_assets/{index-B4YQxf6N.js → index-C5_kLByW.js} +1 -1
  115. package/_assets/{index-BO-ntV1Y.js → index-C7AvJNLC.js} +1 -1
  116. package/_assets/{index-DTJTTa6I.js → index-CER_WZdM.js} +1 -1
  117. package/_assets/{index-BoUALVVj.js → index-CHFpYNuT.js} +1 -1
  118. package/_assets/{index-BhB231bL.js → index-CN4l5w2c.js} +1 -1
  119. package/_assets/{index-Bu3aB4kM.js → index-CQmfCn6L.js} +1 -1
  120. package/_assets/{index-BW8VN255.js → index-CUmtcNQg.js} +13 -13
  121. package/_assets/{index-C2nYuWDs.js → index-CW_9ydYl.js} +1 -1
  122. package/_assets/{index-BHUn6t4R.js → index-Ccmd6LJM.js} +1 -1
  123. package/_assets/{index-CIY54srg.js → index-CfcbfNQu.js} +1 -1
  124. package/_assets/{index-Dwwu71v6.js → index-CtGN5cSN.js} +1 -1
  125. package/_assets/{index-7vaOJntM.js → index-CwklEm59.js} +1 -1
  126. package/_assets/{index-DRT-S6qO.js → index-CxQtr_qc.js} +1 -1
  127. package/_assets/{index-BjGkgODt.js → index-Cz3_UYqu.js} +1 -1
  128. package/_assets/{index-B_R6Ibs9.js → index-D2Blmrg8.js} +1 -1
  129. package/_assets/{index-DSVaUKWe.js → index-DCO5tENR.js} +1 -1
  130. package/_assets/{index-B0Nj1Xpe.js → index-DGZgLX5H.js} +1 -1
  131. package/_assets/{index-Dm6yzhpF.js → index-DIdMr_9V.js} +2 -2
  132. package/_assets/{index-CEwbVgfQ.js → index-DK_lT2Up.js} +1 -1
  133. package/_assets/{index-CZ3f_Y1y.js → index-DQUOYl1q.js} +1 -1
  134. package/_assets/{index-JWHcGf8K.js → index-DR1E7fqH.js} +1 -1
  135. package/_assets/{index-BsSKIwHD.js → index-DU4h63RV.js} +1 -1
  136. package/_assets/{index-DZALE8ts.js → index-DUGC97CT.js} +1 -1
  137. package/_assets/{index-xtj1527D.js → index-DWbT4Kr1.js} +1 -1
  138. package/_assets/{index-DtH36dQB.js → index-DZJrIb1u.js} +1 -1
  139. package/_assets/{index-BMJg-nRv.js → index-DbE4A5S0.js} +1 -1
  140. package/_assets/index-DbLpdy-5.js +1 -0
  141. package/_assets/{index-BTLLXXx9.js → index-Dhix31Bu.js} +2 -2
  142. package/_assets/{index-CVq4UoGY.js → index-DxRsYIvk.js} +1 -1
  143. package/_assets/{index-nS1wsSSF.js → index-DzBb30i7.js} +1 -1
  144. package/_assets/{index-CQECNabf.js → index-EdtyEJZS.js} +1 -1
  145. package/_assets/{index-DzGUGKu8.js → index-KziiJ1MB.js} +1 -1
  146. package/_assets/{index-y_YQkq9B.js → index-_A0xNyDg.js} +1 -1
  147. package/_assets/{index-CC3KVZ-C.js → index-_c5LJlQE.js} +1 -1
  148. package/_assets/{index-CC2LJiUl.js → index-c3WZ9F2Z.js} +1 -1
  149. package/_assets/{index-CxU05isW.js → index-hA7xALHz.js} +1 -1
  150. package/_assets/{index-CFuvPjXM.js → index-juiZ5nUu.js} +1 -1
  151. package/_assets/{index-LDMIyr62.js → index-kOIxivqq.js} +1 -1
  152. package/_assets/{index-CydESP8d.js → index-qrMtap-4.js} +1 -1
  153. package/_assets/{index-CJEkcTww.js → index-w01WQ1OT.js} +1 -1
  154. package/_assets/{index-dfL-lDcX.js → index-zbEtT7TF.js} +1 -1
  155. package/_assets/{index.es-DrfFlp1M.js → index.es-C4oAOZ2V.js} +1 -1
  156. package/_assets/{index.es-Cih8rx67.js → index.es-CuQKaC9l.js} +1 -1
  157. package/_assets/{index.es-C4qRwa57.js → index.es-PCPwWCTT.js} +4 -4
  158. package/_assets/{index.es-BbgStuSw.js → index.es-PK14FCnv.js} +1 -1
  159. package/_assets/{linkAccount-CNeA4_rd.js → linkAccount-BtAQZlYa.js} +1 -1
  160. package/_assets/{localBatchGatewayRequest-BO6VhcYd.js → localBatchGatewayRequest-BUwJgNBc.js} +1 -1
  161. package/_assets/{native-D1Bt7nPF.js → native-CPZ4GKee.js} +1 -1
  162. package/_assets/{networks-D5fmsOiy.js → networks-BHjeaNq-.js} +1 -1
  163. package/_assets/{onramp-LjDKN178.js → onramp-BSgQtQgj.js} +1 -1
  164. package/_assets/{openzeppelin-CaukWbLm.js → openzeppelin-woyqiy8r.js} +1 -1
  165. package/_assets/{ownerOf-CSle-7WO.js → ownerOf-DmpjD1-R.js} +1 -1
  166. package/_assets/parseNft-BA3qFR7M.js +2 -0
  167. package/_assets/{parseSignature-CC5YcWnt.js → parseSignature-D8FCzNlu.js} +3 -3
  168. package/_assets/{parseSignature-6vNiOfFl.js → parseSignature-Q4bkoTpW.js} +1 -1
  169. package/_assets/{passkeys-4pAYAclj.js → passkeys-D0qJI5qn.js} +1 -1
  170. package/_assets/{pay-with-exchange-7PIdFg78.js → pay-with-exchange-BsvFInrp.js} +1 -1
  171. package/_assets/{prepare-contract-call-Nm9e1q7x.js → prepare-contract-call-DDzIRXLv.js} +1 -1
  172. package/_assets/{qr-overlay-f-iSNwJr.js → qr-overlay-COQxRKQK.js} +3 -3
  173. package/_assets/{react-OEOSdkUk.js → react-BYHuwl8r.js} +1 -1
  174. package/_assets/{receive-F9PJfxfb.js → receive-DU6iSsB3.js} +1 -1
  175. package/_assets/{resolveImplementation-xg7dESGH.js → resolveImplementation-BrD3qXqg.js} +1 -1
  176. package/_assets/{rpc-DOzFey3g.js → rpc-CcmAmATg.js} +1 -1
  177. package/_assets/{secp256k1-D1MxbsHb.js → secp256k1-CBj4lxi-.js} +1 -1
  178. package/_assets/{secp256k1-CmrMUcTi.js → secp256k1-DKC07Khr.js} +1 -1
  179. package/_assets/{secp256k1-C1xl_AmF.js → secp256k1-htroqWun.js} +1 -1
  180. package/_assets/{send-BCq9hsVc.js → send-9KQDwSEr.js} +1 -1
  181. package/_assets/{send-batch-transaction-CrH7ycYT.js → send-batch-transaction-DljuapA1.js} +1 -1
  182. package/_assets/{send-eip712-transaction-BilSMYkD.js → send-eip712-transaction-CJSJ05-E.js} +2 -2
  183. package/_assets/send-gasless-transaction-C92lFcBx.js +2 -0
  184. package/_assets/{send-transaction-DyTmQr7I.js → send-transaction-B8SeU7wI.js} +2 -2
  185. package/_assets/{sendMetaTransaction-CbAkDxFC.js → sendMetaTransaction-Bn0IbhJL.js} +1 -1
  186. package/_assets/{sendRawTransaction-BF_5UguD.js → sendRawTransaction-BW-1XJ3i.js} +3 -3
  187. package/_assets/{sentry-B60WY-np.js → sentry-Dx-KuLV3.js} +1 -1
  188. package/_assets/{serializeTransaction-269aJ3jg.js → serializeTransaction-hlz3jyV0.js} +1 -1
  189. package/_assets/{session-proposal-DrGxFpy_.js → session-proposal-B7hP3ooD.js} +1 -1
  190. package/_assets/{session-request-BBLE2Bq1.js → session-request-BJvQCt8q.js} +2 -2
  191. package/_assets/{sha256-B3W1x8Ou.js → sha256-CfLwtdyC.js} +1 -1
  192. package/_assets/{signing-CMeEJnjn.js → signing-CWYYGFlX.js} +3 -3
  193. package/_assets/{socials-DIASvbcv.js → socials-DQpuB5SU.js} +1 -1
  194. package/_assets/{styled-BwTnkdpv.js → styled-D5sI5T5A.js} +2 -2
  195. package/_assets/{swaps-CnJGhbEV.js → swaps-Ba0T1vg1.js} +1 -1
  196. package/_assets/{thirdweb-m4OLiEwa.js → thirdweb-paFuobqk.js} +3 -3
  197. package/_assets/{to-serializable-transaction-DPRnbADC.js → to-serializable-transaction-epiA4s5W.js} +2 -2
  198. package/_assets/{totalSupply-BfIXxtR1.js → totalSupply-DRNaCAzP.js} +1 -1
  199. package/_assets/{transaction-C7nbuBwl.js → transaction-Col-q-Ce.js} +1 -1
  200. package/_assets/{transactionReceipt-DuHdFTIu.js → transactionReceipt-SSeQhqw0.js} +1 -1
  201. package/_assets/{transactions-Vb05m5Kj.js → transactions-DIwaSol_.js} +1 -1
  202. package/_assets/{useCreditPacks-C6MAM0-z.js → useCreditPacks-CweMx-zq.js} +1 -1
  203. package/_assets/{useImportable-CRJcbL-A.js → useImportable-BSaWOHS4.js} +1 -1
  204. package/_assets/{useInfiniteGrid-BWxEC1lm.js → useInfiniteGrid-DrCCmf1M.js} +1 -1
  205. package/_assets/useTheme-BM_3ne-T.js +1 -0
  206. package/_assets/{useUrlFilters-DABDXRpV.js → useUrlFilters-DH-gxdfV.js} +1 -1
  207. package/_assets/{utils-BkRfOA0C.js → utils-BQF5MiO5.js} +1 -1
  208. package/_assets/{verifyHash-D58gqhkH.js → verifyHash-Bxxzs98Y.js} +1 -1
  209. package/_assets/{w3m-modal-B_aQ-0FM.js → w3m-modal-C88M31uf.js} +1 -1
  210. package/_assets/{w3m-modal-C6aHqxDm.js → w3m-modal-DsFJ4m5k.js} +1 -1
  211. package/_assets/{wait-for-tx-receipt-DIg8XOMS.js → wait-for-tx-receipt-B1xNDw4h.js} +1 -1
  212. package/_assets/{wallets-CPWmXR2z.js → wallets-CvwsKVgH.js} +5 -5
  213. package/_assets/{web-connector-Bl2-Bfmp.js → web-connector-DLxiyhok.js} +3 -3
  214. package/_assets/{writeContract-B_MWYDl9.js → writeContract-lDfPaaAy.js} +1 -1
  215. package/_assets/{zora-sepolia-DOetv30E.js → zora-sepolia-5SAdD430.js} +1 -1
  216. package/_assets/{zoraTestnet-D-pZ_sg_.js → zoraTestnet-BDzwc4J9.js} +1 -1
  217. package/index.html +11 -11
  218. package/package.json +2 -2
  219. package/_assets/LazyEmoteControls-BImwZY_h.js +0 -2
  220. package/_assets/Success-CSJWItjn.js +0 -296
  221. package/_assets/collectionPage.styles-CL3J1bKl.js +0 -48
  222. package/_assets/decimals-DO67KSdi.js +0 -1
  223. package/_assets/estimate-l1-fee-BBlaFaGO.js +0 -1
  224. package/_assets/eth_estimateGas-CZdRIIy4.js +0 -1
  225. package/_assets/eth_getTransactionCount-W_BA_-db.js +0 -1
  226. package/_assets/get-ecosystem-wallet-info-C1SJws5S.js +0 -1
  227. package/_assets/getNFT-CCTUbY41.js +0 -1
  228. package/_assets/index-3QPqSkja.js +0 -1
  229. package/_assets/index-DLUK99AS.js +0 -2
  230. package/_assets/parseNft-C6FJCS-F.js +0 -2
  231. package/_assets/send-gasless-transaction-D5tRiU7n.js +0 -2
  232. package/_assets/useTheme-BodOGZI1.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-waHK991P.js","_assets/react-OEOSdkUk.js","_assets/index-BW8VN255.js","_assets/dcl-schemas-CmtP3U6y.js","_assets/sentry-B60WY-np.js","_assets/ethers-lk3HAbPB.js","_assets/intl-CBcMB1D2.js","_assets/index-D-NhBWWr.css","_assets/useImportable-CRJcbL-A.js","_assets/buy-BbDdxACJ.js","_assets/authorizations-oq_PkaKX.js","_assets/sendMetaTransaction-CbAkDxFC.js","_assets/ManaPricingBanner.styles-BiRyZA-W.js","_assets/Faq-C-IZVkuo.js","_assets/field.styles-CFDu9cjG.js"])))=>i.map(i=>d[i]);
2
- import{n as we,bL as je,o as q,v as I,bM as ke,s as l,t as s,w as Ie,B as Ae,x as $e,b as d,ak as Pe,I as A,bN as Y,bO as ee,bP as Le,_ as Ne,z as N,bQ as Ee,A as Te,bg as z,aD as Ce,bR as Se,E as Fe,bS as De,bT as O}from"./index-BW8VN255.js";import{r as g,u as Me,j as t,L as se,b as He}from"./react-OEOSdkUk.js";import{u as qe}from"./useImportable-CRJcbL-A.js";import{L as ze}from"./LoadMore-rF0It0W-.js";import{u as P}from"./useInfiniteGrid-BWxEC1lm.js";import{m as ne}from"./mana-matic-C4e1sNO3.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-B60WY-np.js";import"./ethers-lk3HAbPB.js";import"./intl-CBcMB1D2.js";import"./buy-BbDdxACJ.js";import"./authorizations-oq_PkaKX.js";import"./sendMetaTransaction-CbAkDxFC.js";const Oe=15e3;function Re(e,a){return e.txHash&&a.txHash?e.txHash===a.txHash:e.txHash||a.txHash?!1:e.status===a.status&&Math.abs(e.createdAt-a.createdAt)<=Oe}function We(e){const a=[...e].sort((i,r)=>r.createdAt-i.createdAt),n=[];for(const i of a){const r=n[n.length-1];r&&Re(r[r.length-1],i)?r.push(i):n.push([i])}return n.map(i=>{var r;return{id:((r=i.find(c=>c.txHash))==null?void 0:r.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(c=>c.createdAt)),status:i.some(c=>c.status==="PENDING")?"PENDING":"SETTLED",totalCredits:i.reduce((c,u)=>c+u.credits,0),lines:i}})}function _e(e){return e.tradeId?`trade:${e.tradeId}`:e.contractAddress&&e.itemId?`item:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}function Be(e){const a=[],n=new Map;for(const i of e){const r=_e(i);if(!r){a.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits});continue}const c=n.get(r);if(c){c.quantity+=1,c.credits+=i.credits;continue}const u={key:r,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits};n.set(r,u),a.push(u)}return a}function Ge(e,a){return{id:e.id,contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId,counterparty:e.buyer,credits:a?we(e.manaWei,a):null,manaWei:e.manaWei,createdAt:e.createdAt,txHash:e.txHash}}function Ue(e){const n=We(e.purchases.filter(o=>o.status!=="EXPIRED")).map(o=>({kind:"purchase",id:`purchase:${o.id}`,createdAt:o.createdAt,order:o})),i=e.sales.map(o=>{const x=Ge(o,e.rate);return{kind:"sale",id:`sale:${x.id}`,createdAt:x.createdAt,sale:x}}),r=(e.creditOrders??[]).filter(o=>o.status!=="failed"&&o.status!=="abandoned").map(o=>({kind:"credit",id:`credit:${o.id}`,createdAt:o.createdAt,order:o})),c=new Set(e.purchases.filter(o=>o.txHash).map(o=>o.txHash.toLowerCase())),u=(e.manaPurchases??[]).filter(o=>!c.has(o.txHash.toLowerCase())).map(o=>({kind:"mana-purchase",id:`mana-purchase:${o.id}`,createdAt:o.createdAt,sale:o}));return[...n,...i,...r,...u].sort((o,x)=>x.createdAt-o.createdAt||(o.id<x.id?-1:1))}function Ke(e,a){return a==="all"?e:a==="sales"?e.filter(n=>n.kind==="sale"):e.filter(n=>n.kind==="purchase"||n.kind==="credit"||n.kind==="mana-purchase")}const re=e=>e.trim().toLowerCase();function Qe(e){const a=new Map;for(const n of e??[]){const i=re(n.txHash??"");if(!i)continue;const r=a.get(i);r?r.push(n):a.set(i,[n])}return a}function Ve(e,a,n=Date.now()){const i=a.txHash?e.get(re(a.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const r=i.length===1?Xe(i[0].netCents):null,c=i.filter(o=>!o.available&&o.availableAt>n);if(c.length===0)return{kind:"credited",credits:r};const u=c.reduce((o,x)=>Math.max(o,x.availableAt),0);return{kind:"pending",credits:r,availableAt:u}}function Xe(e){return je(e)}function Ze(){const e=q(i=>{var r;return(r=i.session)==null?void 0:r.address}),{data:a,isLoading:n}=I({queryKey:["listing-count",e],queryFn:()=>ke({creator:e,onSale:!0,first:1}),enabled:!!e,staleTime:5*6e4});return{count:a==null?void 0:a.total,isLoading:n}}const Je="https://cdn.decentraland.org/@dcl/shop/0.10.1-31027477194.commit-fc53d94/_assets/credits-product-vs4Q6u6l.svg",R=Ie`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-BNB35_Nh.js","_assets/react-BYHuwl8r.js","_assets/index-CUmtcNQg.js","_assets/dcl-schemas-CmtP3U6y.js","_assets/sentry-Dx-KuLV3.js","_assets/ethers-BDpbhgX6.js","_assets/intl-CBcMB1D2.js","_assets/index-D-NhBWWr.css","_assets/useImportable-BSaWOHS4.js","_assets/buy-DEfmn-X_.js","_assets/authorizations-C81yJZo1.js","_assets/sendMetaTransaction-Bn0IbhJL.js","_assets/ManaPricingBanner.styles-Bd2L7Y9B.js","_assets/Faq-2zs-yjZh.js","_assets/field.styles-CfOfIv_D.js"])))=>i.map(i=>d[i]);
2
+ import{n as we,bL as je,o as q,v as I,bM as ke,s as l,t as s,w as Ie,B as Ae,x as $e,b as d,an as Le,I as A,bN as Y,bO as ee,bP as Pe,_ as Ne,z as N,bQ as Ee,A as Te,bg as z,L as Ce,bR as Se,E as Fe,bS as De,bT as O}from"./index-CUmtcNQg.js";import{r as g,u as Me,j as t,L as se,e as He}from"./react-BYHuwl8r.js";import{u as qe}from"./useImportable-BSaWOHS4.js";import{L as ze}from"./LoadMore-DlOSOVSy.js";import{u as L}from"./useInfiniteGrid-DrCCmf1M.js";import{m as ne}from"./mana-matic-C4e1sNO3.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./buy-DEfmn-X_.js";import"./authorizations-C81yJZo1.js";import"./sendMetaTransaction-Bn0IbhJL.js";const Oe=15e3;function Re(e,a){return e.txHash&&a.txHash?e.txHash===a.txHash:e.txHash||a.txHash?!1:e.status===a.status&&Math.abs(e.createdAt-a.createdAt)<=Oe}function We(e){const a=[...e].sort((i,r)=>r.createdAt-i.createdAt),n=[];for(const i of a){const r=n[n.length-1];r&&Re(r[r.length-1],i)?r.push(i):n.push([i])}return n.map(i=>{var r;return{id:((r=i.find(c=>c.txHash))==null?void 0:r.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(c=>c.createdAt)),status:i.some(c=>c.status==="PENDING")?"PENDING":"SETTLED",totalCredits:i.reduce((c,u)=>c+u.credits,0),lines:i}})}function _e(e){return e.tradeId?`trade:${e.tradeId}`:e.contractAddress&&e.itemId?`item:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}function Be(e){const a=[],n=new Map;for(const i of e){const r=_e(i);if(!r){a.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits});continue}const c=n.get(r);if(c){c.quantity+=1,c.credits+=i.credits;continue}const u={key:r,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits};n.set(r,u),a.push(u)}return a}function Ge(e,a){return{id:e.id,contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId,counterparty:e.buyer,credits:a?we(e.manaWei,a):null,manaWei:e.manaWei,createdAt:e.createdAt,txHash:e.txHash}}function Ue(e){const n=We(e.purchases.filter(o=>o.status!=="EXPIRED")).map(o=>({kind:"purchase",id:`purchase:${o.id}`,createdAt:o.createdAt,order:o})),i=e.sales.map(o=>{const x=Ge(o,e.rate);return{kind:"sale",id:`sale:${x.id}`,createdAt:x.createdAt,sale:x}}),r=(e.creditOrders??[]).filter(o=>o.status!=="failed"&&o.status!=="abandoned").map(o=>({kind:"credit",id:`credit:${o.id}`,createdAt:o.createdAt,order:o})),c=new Set(e.purchases.filter(o=>o.txHash).map(o=>o.txHash.toLowerCase())),u=(e.manaPurchases??[]).filter(o=>!c.has(o.txHash.toLowerCase())).map(o=>({kind:"mana-purchase",id:`mana-purchase:${o.id}`,createdAt:o.createdAt,sale:o}));return[...n,...i,...r,...u].sort((o,x)=>x.createdAt-o.createdAt||(o.id<x.id?-1:1))}function Ke(e,a){return a==="all"?e:a==="sales"?e.filter(n=>n.kind==="sale"):e.filter(n=>n.kind==="purchase"||n.kind==="credit"||n.kind==="mana-purchase")}const re=e=>e.trim().toLowerCase();function Qe(e){const a=new Map;for(const n of e??[]){const i=re(n.txHash??"");if(!i)continue;const r=a.get(i);r?r.push(n):a.set(i,[n])}return a}function Ve(e,a,n=Date.now()){const i=a.txHash?e.get(re(a.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const r=i.length===1?Xe(i[0].netCents):null,c=i.filter(o=>!o.available&&o.availableAt>n);if(c.length===0)return{kind:"credited",credits:r};const u=c.reduce((o,x)=>Math.max(o,x.availableAt),0);return{kind:"pending",credits:r,availableAt:u}}function Xe(e){return je(e)}function Ze(){const e=q(i=>{var r;return(r=i.session)==null?void 0:r.address}),{data:a,isLoading:n}=I({queryKey:["listing-count",e],queryFn:()=>ke({creator:e,onSale:!0,first:1}),enabled:!!e,staleTime:5*6e4});return{count:a==null?void 0:a.total,isLoading:n}}const Je="https://cdn.decentraland.org/@dcl/shop/0.10.1-31028891267.commit-63bf5fc/_assets/credits-product-vs4Q6u6l.svg",R=Ie`
3
3
  0% { background-position: 200% 0; }
4
4
  100% { background-position: -200% 0; }
5
5
  `,Ye=l.section`
@@ -378,4 +378,4 @@ import{n as we,bL as je,o as q,v as I,bM as ke,s as l,t as s,w as Ie,B as Ae,x a
378
378
  margin: 6px 0 0;
379
379
  `,ht=l(Ae)`
380
380
  margin-top: 12px;
381
- `,V=H.withComponent(se),ut=g.lazy(()=>Ne(()=>import("./index-waHK991P.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])).then(e=>({default:e.ImportListings}))),L=24,pt=["all","purchases","sales"],ae="migrate";function k(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function he(e){return e.length>10?`${e.slice(0,6)}…${e.slice(-4)}`:e}function ue(e){const a=Number(e)/1e18;return Number.isFinite(a)?a.toLocaleString("en",{maximumFractionDigits:2}):"0"}function pe({children:e}){const a=g.useRef(null),[n,i]=g.useState(null),r=()=>{var u;const c=(u=a.current)==null?void 0:u.getBoundingClientRect();c&&i({top:c.bottom+8,left:c.left+c.width/2})};return t.jsxs(ct,{ref:a,tabIndex:0,onMouseEnter:r,onMouseLeave:()=>i(null),onFocus:r,onBlur:()=>i(null),children:[e,n?He.createPortal(t.jsx(dt,{style:{top:n.top,left:n.left},role:"tooltip",children:d("activity.polygonMana")}),document.body):null]})}function xt({item:e}){const a=!!e.contractAddress&&!!e.itemId,n=!!e.tradeId||a,{data:i,isLoading:r}=I({queryKey:["order-line-display",e.tradeId,e.contractAddress,e.itemId],queryFn:()=>e.tradeId?De(e.tradeId):O(e.contractAddress,{itemId:e.itemId}),enabled:n,staleTime:5*6e4}),c=n&&r,u=(i==null?void 0:i.name)??d("activity.itemFallback"),o=(i==null?void 0:i.thumbnail)??"",x=z({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:[c?t.jsx(B,{}):t.jsx(_,{children:o?t.jsx("img",{src:o,alt:u}):t.jsx(A,{name:"cart",size:20})}),t.jsxs(G,{children:[c?t.jsx(K,{}):t.jsx(U,{title:u,children:u}),e.quantity>1?t.jsx(Q,{children:d("activity.quantity",{count:e.quantity})}):null]}),t.jsxs(lt,{children:[t.jsx(N,{className:"ccy-mark"})," ",e.credits]})]});return x?t.jsx(V,{to:x,"data-link":"true",children:f}):t.jsx(H,{children:f})}function mt({order:e}){const a=Be(e.lines),n=a.reduce((i,r)=>i+r.quantity,0);return t.jsxs(E,{"data-testid":"purchase-order",children:[t.jsxs(T,{children:[t.jsxs(C,{children:[t.jsx(S,{children:k(e.createdAt)}),t.jsxs(F,{children:[d("activity.purchaseLabel")," · ",d("activity.itemCount",{count:n})]})]}),t.jsxs(D,{children:[t.jsx(M,{"data-status":e.status,children:e.status==="PENDING"?d("activity.processing"):d("activity.completed")}),t.jsxs(j,{children:[t.jsx(N,{className:"ccy-mark"})," ",e.totalCredits]})]})]}),t.jsx(W,{children:a.map(i=>t.jsx(xt,{item:i},i.key))})]})}function gt({sale:e}){const{data:a,isLoading:n}=I({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>O(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),i=(a==null?void 0:a.name)??d("activity.itemFallback"),r=(a==null?void 0:a.thumbnail)??"",c=z({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,u=t.jsxs(t.Fragment,{children:[n?t.jsx(B,{}):t.jsx(_,{children:r?t.jsx("img",{src:r,alt:i}):t.jsx(A,{name:"offer",size:20})}),t.jsxs(G,{children:[n?t.jsx(K,{}):t.jsx(U,{title:i,children:i}),t.jsx(Q,{children:d("activity.boughtFrom",{account:he(e.seller)})})]})]});return t.jsxs(E,{"data-testid":"activity-mana-purchase",children:[t.jsxs(T,{children:[t.jsxs(C,{children:[t.jsx(S,{children:k(e.createdAt)}),t.jsx(F,{children:d("activity.paidWithMana")})]}),t.jsxs(D,{children:[t.jsx(M,{"data-status":"SETTLED",children:d("activity.completed")}),t.jsxs(j,{children:[ue(e.manaWei)," ",t.jsx(pe,{children:t.jsx(ce,{src:ne,alt:"MANA"})})]})]})]}),t.jsx(W,{children:c?t.jsx(V,{to:c,"data-link":"true",children:u}):t.jsx(H,{children:u})})]})}function ft({sale:e,payout:a}){const{data:n,isLoading:i}=I({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>O(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),r=(n==null?void 0:n.name)??d("activity.itemFallback"),c=(n==null?void 0:n.thumbnail)??"",u=z({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,o=t.jsxs(t.Fragment,{children:[i?t.jsx(B,{}):t.jsx(_,{children:c?t.jsx("img",{src:c,alt:r}):t.jsx(A,{name:"offer",size:20})}),t.jsxs(G,{children:[i?t.jsx(K,{}):t.jsx(U,{title:r,children:r}),t.jsxs(Q,{children:[d("activity.soldTo",{account:he(e.counterparty)}),a.kind==="pending"?` · ${d("activity.payoutPendingOn",{date:k(a.availableAt)})}`:""]})]})]});return t.jsxs(E,{"data-testid":"activity-sale",children:[t.jsxs(T,{children:[t.jsxs(C,{children:[t.jsx(S,{children:k(e.createdAt)}),t.jsx(F,{children:d("activity.saleLabel")})]}),t.jsxs(D,{children:[t.jsx(M,{"data-status":a.kind==="pending"?"PENDING":"SOLD",children:a.kind==="pending"?d("activity.payoutPending"):d("activity.sold")}),a.kind==="direct"?t.jsxs(j,{"data-kind":"income",children:["+",ue(e.manaWei)," ",t.jsx(pe,{children:t.jsx(ce,{src:ne,alt:"MANA"})})]}):a.credits!==null?t.jsxs(j,{"data-kind":"income",children:[t.jsx(N,{className:"ccy-mark"})," +",Ce(a.credits)]}):t.jsx(j,{"data-kind":"income",children:d("activity.payoutCredited")})]})]}),t.jsx(W,{children:u?t.jsx(V,{to:u,"data-link":"true",children:o}):t.jsx(H,{children:o})})]})}function bt({order:e}){const a=`$${(e.usdCents/100).toFixed(2)}`,n=Ee(e.status),i=n==="SETTLED"?d("activity.completed"):n==="FAILED"?d("activity.failed"):n==="UNFINISHED"?d("activity.unfinished"):d("activity.processing"),r=q(p=>p.session),c=Te(),[u,o]=g.useState(!1),x=e.status==="initiated"&&!!r;async function f(){if(!(!r||u)){o(!0);try{const p=await Se(e.id,r.identity);if(p){window.location.href=p;return}Fe.info(d("activity.resumeExpired")),c.invalidateQueries({queryKey:["credit-orders"]})}finally{o(!1)}}}return t.jsx(E,{"data-testid":"credit-order",children:t.jsxs(T,{children:[t.jsx(rt,{children:t.jsx("img",{src:Je,alt:"","aria-hidden":!0})}),t.jsxs(C,{children:[t.jsx(S,{children:k(e.createdAt)}),t.jsxs(F,{children:[d("activity.creditPurchaseLabel")," · ",d("activity.creditPaid",{usd:a})]})]}),t.jsxs(D,{children:[x?t.jsx(ot,{type:"button",onClick:()=>void f(),disabled:u,"data-testid":"resume-order",children:u?d("activity.resuming"):d("activity.resume")}):null,t.jsx(M,{"data-status":n,children:i}),t.jsxs(j,{"data-kind":"income",children:["+",t.jsx(N,{className:"ccy-mark"})," ",e.credits]})]})]})})}function yt({filter:e}){const a={all:{icon:"clock",title:d("activity.emptyAllTitle"),body:d("activity.emptyAllBody")},purchases:{icon:"cart",title:d("activity.emptyPurchasesTitle"),body:d("activity.emptyPurchasesBody")},sales:{icon:"offer",title:d("activity.emptySalesTitle"),body:d("activity.emptySalesBody")}}[e];return t.jsxs(de,{children:[t.jsx(A,{name:a.icon,size:40,color:s.colors.muted2}),t.jsx(le,{children:a.title}),t.jsx("p",{className:"muted",children:a.body}),e!=="sales"?t.jsx(ht,{as:se,to:"/items",variant:"purple",children:d("notFound.cta")}):null]})}function St(){const{session:e}=q(),[a,n]=g.useState("all"),[i,r]=Me(),c=i.get("view")===ae;$e({title:c?d("seo.import.title"):d("nav.activity"),noindex:!0});const{count:u}=qe(),{count:o}=Ze(),f=u!==void 0&&o!==void 0&&(u>0||o>0||c),p=!!e&&!c&&a!=="sales",m=!!e&&!c&&a!=="purchases",b=P(["purchases",e==null?void 0:e.address],h=>Le(e.address,e.identity,{first:L,skip:h}),{enabled:p}),y=P(["sales",e==null?void 0:e.address],h=>Y(e.address,{role:"seller",first:L,skip:h}),{enabled:m}),v=P(["credit-orders",e==null?void 0:e.address],h=>ee(e.address,e.identity,{first:L,skip:h}),{enabled:p}),w=P(["mana-purchases",e==null?void 0:e.address],h=>Y(e.address,{role:"buyer",first:L,skip:h}),{enabled:p}),{data:X}=I({queryKey:["sale-payouts",e==null?void 0:e.address],queryFn:()=>ee(e.address,e.identity,{first:200}).then(h=>h.payouts),enabled:m,staleTime:6e4}),xe=g.useMemo(()=>Qe(X),[X]),{data:me}=Pe(m);if(!e)return t.jsxs(de,{children:[t.jsx(A,{name:"clock",size:40,color:s.colors.muted2}),t.jsx(le,{children:d("activity.signInTitle")}),t.jsx("p",{className:"muted",children:d("activity.signInBody")})]});const Z=Ke(Ue({purchases:p?b.items:[],sales:m?y.items:[],creditOrders:p?v.items:[],manaPurchases:p?w.items:[],rate:me}),a),ge=p&&(b.isLoading||v.isLoading||w.isLoading)||m&&y.isLoading,J=p&&(b.isFetchingNextPage||v.isFetchingNextPage||w.isFetchingNextPage)||m&&y.isFetchingNextPage,fe=p&&(b.hasNextPage||v.hasNextPage||w.hasNextPage)||m&&y.hasNextPage;function be(){p&&b.hasNextPage&&b.fetchNextPage(),p&&v.hasNextPage&&v.fetchNextPage(),p&&w.hasNextPage&&w.fetchNextPage(),m&&y.hasNextPage&&y.fetchNextPage()}function ye(h){if(n(h),!c)return;const $=new URLSearchParams(i);$.delete("view"),r($,{replace:!0})}function ve(){const h=new URLSearchParams(i);h.set("view",ae),r(h,{replace:!0})}return t.jsxs(Ye,{children:[t.jsx(et,{children:t.jsx(tt,{children:d("nav.activity")})}),t.jsxs(it,{role:"tablist","aria-label":d("nav.activity"),children:[pt.map(h=>t.jsx(oe,{type:"button",role:"tab","aria-selected":!c&&a===h,"data-active":!c&&a===h,"data-testid":`activity-filter-${h}`,onClick:()=>ye(h),children:d(`activity.filter.${h}`)},h)),f?t.jsxs(at,{type:"button",role:"tab","aria-selected":c,"data-active":c,"data-testid":"activity-filter-migrate","aria-label":u?d("activity.migrate.chipAria",{count:u}):void 0,onClick:ve,children:[d("activity.migrate.chip"),u?t.jsx(st,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:u}):null]}):null]}),c?t.jsx(g.Suspense,{fallback:t.jsx(nt,{"aria-busy":"true"}),children:t.jsx(ut,{})}):ge?t.jsx(te,{children:Array.from({length:5}).map((h,$)=>t.jsx(ie,{},$))}):Z.length===0?t.jsx(yt,{filter:a}):t.jsxs(t.Fragment,{children:[t.jsxs(te,{children:[Z.map(h=>h.kind==="purchase"?t.jsx(mt,{order:h.order},h.id):h.kind==="credit"?t.jsx(bt,{order:h.order},h.id):h.kind==="mana-purchase"?t.jsx(gt,{sale:h.sale},h.id):t.jsx(ft,{sale:h.sale,payout:Ve(xe,h.sale)},h.id)),J?t.jsx(ie,{}):null]}),t.jsx(ze,{hasNextPage:fe,isFetching:J,onLoadMore:be})]})]})}export{St as Activity};
381
+ `,V=H.withComponent(se),ut=g.lazy(()=>Ne(()=>import("./index-BNB35_Nh.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,pt=["all","purchases","sales"],ae="migrate";function k(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function he(e){return e.length>10?`${e.slice(0,6)}…${e.slice(-4)}`:e}function ue(e){const a=Number(e)/1e18;return Number.isFinite(a)?a.toLocaleString("en",{maximumFractionDigits:2}):"0"}function pe({children:e}){const a=g.useRef(null),[n,i]=g.useState(null),r=()=>{var u;const c=(u=a.current)==null?void 0:u.getBoundingClientRect();c&&i({top:c.bottom+8,left:c.left+c.width/2})};return t.jsxs(ct,{ref:a,tabIndex:0,onMouseEnter:r,onMouseLeave:()=>i(null),onFocus:r,onBlur:()=>i(null),children:[e,n?He.createPortal(t.jsx(dt,{style:{top:n.top,left:n.left},role:"tooltip",children:d("activity.polygonMana")}),document.body):null]})}function xt({item:e}){const a=!!e.contractAddress&&!!e.itemId,n=!!e.tradeId||a,{data:i,isLoading:r}=I({queryKey:["order-line-display",e.tradeId,e.contractAddress,e.itemId],queryFn:()=>e.tradeId?De(e.tradeId):O(e.contractAddress,{itemId:e.itemId}),enabled:n,staleTime:5*6e4}),c=n&&r,u=(i==null?void 0:i.name)??d("activity.itemFallback"),o=(i==null?void 0:i.thumbnail)??"",x=z({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:[c?t.jsx(B,{}):t.jsx(_,{children:o?t.jsx("img",{src:o,alt:u}):t.jsx(A,{name:"cart",size:20})}),t.jsxs(G,{children:[c?t.jsx(K,{}):t.jsx(U,{title:u,children:u}),e.quantity>1?t.jsx(Q,{children:d("activity.quantity",{count:e.quantity})}):null]}),t.jsxs(lt,{children:[t.jsx(N,{className:"ccy-mark"})," ",e.credits]})]});return x?t.jsx(V,{to:x,"data-link":"true",children:f}):t.jsx(H,{children:f})}function mt({order:e}){const a=Be(e.lines),n=a.reduce((i,r)=>i+r.quantity,0);return t.jsxs(E,{"data-testid":"purchase-order",children:[t.jsxs(T,{children:[t.jsxs(C,{children:[t.jsx(S,{children:k(e.createdAt)}),t.jsxs(F,{children:[d("activity.purchaseLabel")," · ",d("activity.itemCount",{count:n})]})]}),t.jsxs(D,{children:[t.jsx(M,{"data-status":e.status,children:e.status==="PENDING"?d("activity.processing"):d("activity.completed")}),t.jsxs(j,{children:[t.jsx(N,{className:"ccy-mark"})," ",e.totalCredits]})]})]}),t.jsx(W,{children:a.map(i=>t.jsx(xt,{item:i},i.key))})]})}function gt({sale:e}){const{data:a,isLoading:n}=I({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>O(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),i=(a==null?void 0:a.name)??d("activity.itemFallback"),r=(a==null?void 0:a.thumbnail)??"",c=z({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,u=t.jsxs(t.Fragment,{children:[n?t.jsx(B,{}):t.jsx(_,{children:r?t.jsx("img",{src:r,alt:i}):t.jsx(A,{name:"offer",size:20})}),t.jsxs(G,{children:[n?t.jsx(K,{}):t.jsx(U,{title:i,children:i}),t.jsx(Q,{children:d("activity.boughtFrom",{account:he(e.seller)})})]})]});return t.jsxs(E,{"data-testid":"activity-mana-purchase",children:[t.jsxs(T,{children:[t.jsxs(C,{children:[t.jsx(S,{children:k(e.createdAt)}),t.jsx(F,{children:d("activity.paidWithMana")})]}),t.jsxs(D,{children:[t.jsx(M,{"data-status":"SETTLED",children:d("activity.completed")}),t.jsxs(j,{children:[ue(e.manaWei)," ",t.jsx(pe,{children:t.jsx(ce,{src:ne,alt:"MANA"})})]})]})]}),t.jsx(W,{children:c?t.jsx(V,{to:c,"data-link":"true",children:u}):t.jsx(H,{children:u})})]})}function ft({sale:e,payout:a}){const{data:n,isLoading:i}=I({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>O(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),r=(n==null?void 0:n.name)??d("activity.itemFallback"),c=(n==null?void 0:n.thumbnail)??"",u=z({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,o=t.jsxs(t.Fragment,{children:[i?t.jsx(B,{}):t.jsx(_,{children:c?t.jsx("img",{src:c,alt:r}):t.jsx(A,{name:"offer",size:20})}),t.jsxs(G,{children:[i?t.jsx(K,{}):t.jsx(U,{title:r,children:r}),t.jsxs(Q,{children:[d("activity.soldTo",{account:he(e.counterparty)}),a.kind==="pending"?` · ${d("activity.payoutPendingOn",{date:k(a.availableAt)})}`:""]})]})]});return t.jsxs(E,{"data-testid":"activity-sale",children:[t.jsxs(T,{children:[t.jsxs(C,{children:[t.jsx(S,{children:k(e.createdAt)}),t.jsx(F,{children:d("activity.saleLabel")})]}),t.jsxs(D,{children:[t.jsx(M,{"data-status":a.kind==="pending"?"PENDING":"SOLD",children:a.kind==="pending"?d("activity.payoutPending"):d("activity.sold")}),a.kind==="direct"?t.jsxs(j,{"data-kind":"income",children:["+",ue(e.manaWei)," ",t.jsx(pe,{children:t.jsx(ce,{src:ne,alt:"MANA"})})]}):a.credits!==null?t.jsxs(j,{"data-kind":"income",children:[t.jsx(N,{className:"ccy-mark"})," +",Ce(a.credits)]}):t.jsx(j,{"data-kind":"income",children:d("activity.payoutCredited")})]})]}),t.jsx(W,{children:u?t.jsx(V,{to:u,"data-link":"true",children:o}):t.jsx(H,{children:o})})]})}function bt({order:e}){const a=`$${(e.usdCents/100).toFixed(2)}`,n=Ee(e.status),i=n==="SETTLED"?d("activity.completed"):n==="FAILED"?d("activity.failed"):n==="UNFINISHED"?d("activity.unfinished"):d("activity.processing"),r=q(p=>p.session),c=Te(),[u,o]=g.useState(!1),x=e.status==="initiated"&&!!r;async function f(){if(!(!r||u)){o(!0);try{const p=await Se(e.id,r.identity);if(p){window.location.href=p;return}Fe.info(d("activity.resumeExpired")),c.invalidateQueries({queryKey:["credit-orders"]})}finally{o(!1)}}}return t.jsx(E,{"data-testid":"credit-order",children:t.jsxs(T,{children:[t.jsx(rt,{children:t.jsx("img",{src:Je,alt:"","aria-hidden":!0})}),t.jsxs(C,{children:[t.jsx(S,{children:k(e.createdAt)}),t.jsxs(F,{children:[d("activity.creditPurchaseLabel")," · ",d("activity.creditPaid",{usd:a})]})]}),t.jsxs(D,{children:[x?t.jsx(ot,{type:"button",onClick:()=>void f(),disabled:u,"data-testid":"resume-order",children:u?d("activity.resuming"):d("activity.resume")}):null,t.jsx(M,{"data-status":n,children:i}),t.jsxs(j,{"data-kind":"income",children:["+",t.jsx(N,{className:"ccy-mark"})," ",e.credits]})]})]})})}function yt({filter:e}){const a={all:{icon:"clock",title:d("activity.emptyAllTitle"),body:d("activity.emptyAllBody")},purchases:{icon:"cart",title:d("activity.emptyPurchasesTitle"),body:d("activity.emptyPurchasesBody")},sales:{icon:"offer",title:d("activity.emptySalesTitle"),body:d("activity.emptySalesBody")}}[e];return t.jsxs(de,{children:[t.jsx(A,{name:a.icon,size:40,color:s.colors.muted2}),t.jsx(le,{children:a.title}),t.jsx("p",{className:"muted",children:a.body}),e!=="sales"?t.jsx(ht,{as:se,to:"/items",variant:"purple",children:d("notFound.cta")}):null]})}function St(){const{session:e}=q(),[a,n]=g.useState("all"),[i,r]=Me(),c=i.get("view")===ae;$e({title:c?d("seo.import.title"):d("nav.activity"),noindex:!0});const{count:u}=qe(),{count:o}=Ze(),f=u!==void 0&&o!==void 0&&(u>0||o>0||c),p=!!e&&!c&&a!=="sales",m=!!e&&!c&&a!=="purchases",b=L(["purchases",e==null?void 0:e.address],h=>Pe(e.address,e.identity,{first:P,skip:h}),{enabled:p}),y=L(["sales",e==null?void 0:e.address],h=>Y(e.address,{role:"seller",first:P,skip:h}),{enabled:m}),v=L(["credit-orders",e==null?void 0:e.address],h=>ee(e.address,e.identity,{first:P,skip:h}),{enabled:p}),w=L(["mana-purchases",e==null?void 0:e.address],h=>Y(e.address,{role:"buyer",first:P,skip:h}),{enabled:p}),{data:X}=I({queryKey:["sale-payouts",e==null?void 0:e.address],queryFn:()=>ee(e.address,e.identity,{first:200}).then(h=>h.payouts),enabled:m,staleTime:6e4}),xe=g.useMemo(()=>Qe(X),[X]),{data:me}=Le(m);if(!e)return t.jsxs(de,{children:[t.jsx(A,{name:"clock",size:40,color:s.colors.muted2}),t.jsx(le,{children:d("activity.signInTitle")}),t.jsx("p",{className:"muted",children:d("activity.signInBody")})]});const Z=Ke(Ue({purchases:p?b.items:[],sales:m?y.items:[],creditOrders:p?v.items:[],manaPurchases:p?w.items:[],rate:me}),a),ge=p&&(b.isLoading||v.isLoading||w.isLoading)||m&&y.isLoading,J=p&&(b.isFetchingNextPage||v.isFetchingNextPage||w.isFetchingNextPage)||m&&y.isFetchingNextPage,fe=p&&(b.hasNextPage||v.hasNextPage||w.hasNextPage)||m&&y.hasNextPage;function be(){p&&b.hasNextPage&&b.fetchNextPage(),p&&v.hasNextPage&&v.fetchNextPage(),p&&w.hasNextPage&&w.fetchNextPage(),m&&y.hasNextPage&&y.fetchNextPage()}function ye(h){if(n(h),!c)return;const $=new URLSearchParams(i);$.delete("view"),r($,{replace:!0})}function ve(){const h=new URLSearchParams(i);h.set("view",ae),r(h,{replace:!0})}return t.jsxs(Ye,{children:[t.jsx(et,{children:t.jsx(tt,{children:d("nav.activity")})}),t.jsxs(it,{role:"tablist","aria-label":d("nav.activity"),children:[pt.map(h=>t.jsx(oe,{type:"button",role:"tab","aria-selected":!c&&a===h,"data-active":!c&&a===h,"data-testid":`activity-filter-${h}`,onClick:()=>ye(h),children:d(`activity.filter.${h}`)},h)),f?t.jsxs(at,{type:"button",role:"tab","aria-selected":c,"data-active":c,"data-testid":"activity-filter-migrate","aria-label":u?d("activity.migrate.chipAria",{count:u}):void 0,onClick:ve,children:[d("activity.migrate.chip"),u?t.jsx(st,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:u}):null]}):null]}),c?t.jsx(g.Suspense,{fallback:t.jsx(nt,{"aria-busy":"true"}),children:t.jsx(ut,{})}):ge?t.jsx(te,{children:Array.from({length:5}).map((h,$)=>t.jsx(ie,{},$))}):Z.length===0?t.jsx(yt,{filter:a}):t.jsxs(t.Fragment,{children:[t.jsxs(te,{children:[Z.map(h=>h.kind==="purchase"?t.jsx(mt,{order:h.order},h.id):h.kind==="credit"?t.jsx(bt,{order:h.order},h.id):h.kind==="mana-purchase"?t.jsx(gt,{sale:h.sale},h.id):t.jsx(ft,{sale:h.sale,payout:Ve(xe,h.sale)},h.id)),J?t.jsx(ie,{}):null]}),t.jsx(ze,{hasNextPage:fe,isFetching:J,onLoadMore:be})]})]})}export{St as Activity};
@@ -1,4 +1,4 @@
1
- import{r as l,j as v}from"./react-OEOSdkUk.js";import{s as u}from"./index-BW8VN255.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-B60WY-np.js";import"./ethers-lk3HAbPB.js";import"./intl-CBcMB1D2.js";const S="https://cdn.decentraland.org/@dcl/shop/0.10.1-31027477194.commit-fc53d94/_assets/custom-welcome-background-BxlFQma9.webp",b="https://cdn.decentraland.org/@dcl/shop/0.10.1-31027477194.commit-fc53d94/_assets/DCL_LogoPattern-BryBPc3d.png",U=`
1
+ import{r as l,j as v}from"./react-BYHuwl8r.js";import{s as u}from"./index-CUmtcNQg.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";const S="https://cdn.decentraland.org/@dcl/shop/0.10.1-31028891267.commit-63bf5fc/_assets/custom-welcome-background-BxlFQma9.webp",b="https://cdn.decentraland.org/@dcl/shop/0.10.1-31028891267.commit-63bf5fc/_assets/DCL_LogoPattern-BryBPc3d.png",U=`
2
2
  attribute vec2 a_position;
3
3
  varying vec2 v_uv;
4
4
  void main() {
@@ -1,4 +1,4 @@
1
- import{e as Ae,r as w,j as e,u as Je}from"./react-OEOSdkUk.js";import{u as Ke}from"./useUrlFilters-DABDXRpV.js";import{c as W,r as Qe,bl as Xe,bm as Ye,ay as et,a as tt,s,t,o as Me,bb as nt,A as st,aD as fe,b as n,y as it,I as _,z as A,bY as Y,ba as rt,V as Q,bq as ot,bp as at,x as Ne,ak as Pe,n as We,q as lt,ai as ct,am as ke,an as D,aF as dt,bJ as pt}from"./index-BW8VN255.js";import{g as ht,h as xt,i as ft,j as mt,k as ut,C as gt,l as bt,o as yt,m as wt,n as jt,M as vt,u as $t,E as Ct,v as kt,p as St,q as Et,r as _t,s as Tt,t as Rt}from"./Assets.styles-B7ymOh16.js";import{S as Se,R as zt,F as It,e as At}from"./categories-CTfgPgaL.js";import{L as Mt}from"./LoadMore-rF0It0W-.js";import{u as Nt}from"./useInfiniteGrid-BWxEC1lm.js";import{E as Pt}from"./ErrorNotice-C2_MEmWZ.js";import{d as Wt}from"./dcl-schemas-CmtP3U6y.js";import{s as Bt,G as Ft,w as Lt,S as Ut}from"./buy-gasless-Dv7SXb76.js";import{s as Ht,k as Ot}from"./buy-BbDdxACJ.js";import{f as Dt}from"./errors-BM_aT-FG.js";import{J as Gt,C as qt,B as me}from"./ethers-lk3HAbPB.js";import{n as Vt}from"./Tooltip-Bg9BttKY.js";import{G as Zt}from"./grid.styles-BpaaGITL.js";import"./sentry-B60WY-np.js";import"./intl-CBcMB1D2.js";import"./authorizations-oq_PkaKX.js";import"./sendMetaTransaction-CbAkDxFC.js";function G(i){const o=i.source??"item",l=i.tradeId||`${i.contractAddress}-${i.tokenId??i.itemId??""}`;return`${o}:${l}`}const B="100000000000000000000",Be=2,X=15,Jt=/^[a-zA-Z0-9]+$/;function Ee(i){const o=i.trim();return o.length===0?{ok:!1,reason:"empty"}:Jt.test(o)?o.length<Be?{ok:!1,reason:"too-short"}:o.length>X?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Kt(i){return i.replace(/[^a-zA-Z0-9]/g,"").slice(0,X)}const Qt=["function available(string _subdomain) view returns (bool)"],_e={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Xt(){return W.chainId===Number(Wt.ChainId.MATIC_MAINNET)?_e.mainnet:_e.sepolia}async function Yt(i,o={}){var d;const{rpc:l,address:x}=Xt(),h=new Gt(l),c=new qt(x,Qt,h);console.info(`[names] availability check → DCLRegistrar(${x}).available("${i}") on ${l}`);const p=await c.available(i);if((d=o.signal)!=null&&d.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${i}" available=${p}`),p?"available":"taken"}const en="https://app.across.to/api";class ue extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function tn(i){return et(B,i)}async function nn(i,o,l={}){var d;const x=l.chainId??W.chainId,h=l.provider??"across",c=`${W.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(o)}&chainId=${x}&provider=${h}`,p=await tt(c,{method:"GET",identity:i,metadata:{}});if(!p.ok){let a;try{a=(d=await p.json())==null?void 0:d.code}catch{}throw a==="ROUTE_COST_TOO_HIGH"?new ue:new Error(`fetchNameCreditRoute ${p.status}`)}return p.json()}function sn(i,o){const l=me.from(i.availableAmount),h=me.from(B).sub(l);return{credits:[{value:i.amount,expiresAt:Number(i.expiresAt),salt:Ot(i.id)}],creditsSignatures:[i.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:B}}async function rn(i,o={}){const l=en,x=o.intervalMs??1e4,h=o.maxAttempts??60;let c={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let p=0;p<h;p++){try{const d=await fetch(`${l}/deposit/status?originChainId=137&depositTxHash=${i}`);if(d.ok){const a=await d.json(),f=(a.status??"pending").toLowerCase(),g=a.fillTx??a.fillTxnRef??null,u=a.actionsSucceeded!==!1;if(f==="filled")return{status:"filled",destinationTxHash:g,actionsSucceeded:u};if(f==="refunded"||f==="expired")return{status:f,destinationTxHash:null,actionsSucceeded:!1};c={status:"pending",destinationTxHash:g,actionsSucceeded:u}}}catch{}p<h-1&&await new Promise(d=>setTimeout(d,x))}return c}async function on(i){const{name:o,identity:l,signer:x}=i,h=i.chainId??W.chainId,c=i.provider??"across",p=(i.beneficiary??await x.getAddress()).toLowerCase();let d=null,a=!1;console.info("[names] register start",{name:o,buyer:p,chainId:h,provider:c});try{const f=await Qe(h),g=tn(f);console.info("[names] step 1/6 sized reservation",{usdCents:g,manaRate:f});const u=await nn(l,o,{chainId:h,provider:c});console.info("[names] step 2/6 route fetched",{target:u.externalCall.target,selector:u.externalCall.selector,provider:u.provider,quoteId:u.quoteId});const v=await Xe(l,g);if(d=v.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:v.credit.id,maxCreditedValue:v.maxCreditedValue}),me.from(v.maxCreditedValue).lt(B))throw new Error("Credit under-sized for the name price");const j=sn(v.credit,u);let m;try{m=await Bt({chainId:h,buyer:p,signer:x,args:j})}catch(b){if(!(b instanceof Ft))throw b;m=await Ht(h,j,x)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:m}),await Lt(m),a=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:m}),c==="across"){const b=await rn(m,i.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:m};if(b.status!=="filled"||!b.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:m,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:m}}catch(f){if(console.error("[names] register failed — raw error:",f,{name:o,buyer:p,originConfirmed:a}),f instanceof Ut)return{status:"pending",originTxHash:f.txHash};if(d&&!a&&await Ye(l,[d]).catch(()=>{}),f instanceof ue)throw f;const g=new Error(Dt(f,"Couldn't register the name. Please try again.",{sale:!0}));throw g.cause=f,g}}const an=s.div`
1
+ import{b as Ae,r as w,j as e,u as Je}from"./react-BYHuwl8r.js";import{u as Ke}from"./useUrlFilters-DH-gxdfV.js";import{c as B,r as Qe,bl as Xe,bm as Ye,aB as et,a as tt,s,t,o as Me,bb as nt,A as st,L as fe,b as n,y as rt,I as _,z as A,bY as Y,ba as it,Z as Q,bq as ot,bp as at,x as Ne,an as Pe,n as Be,q as lt,al as ct,ap as ke,aq as D,aF as dt,bJ as pt}from"./index-CUmtcNQg.js";import{g as ht,h as xt,i as ft,j as mt,k as ut,C as gt,l as bt,o as yt,m as wt,n as jt,M as vt,u as $t,E as Ct,v as kt,p as St,q as Et,r as _t,s as Tt,t as Rt}from"./Assets.styles-C7SPIxNU.js";import{S as Se,R as zt,F as It,e as At}from"./categories-BCX_N_OH.js";import{L as Mt}from"./LoadMore-DlOSOVSy.js";import{u as Nt}from"./useInfiniteGrid-DrCCmf1M.js";import{E as Pt}from"./ErrorNotice-D9o1yt7T.js";import{d as Bt}from"./dcl-schemas-CmtP3U6y.js";import{s as Wt,G as Ft,w as Lt,S as Ut}from"./buy-gasless-D1GuSJOS.js";import{s as Ht,k as Ot}from"./buy-DEfmn-X_.js";import{f as Dt}from"./errors-COdt9pAA.js";import{J as Gt,C as qt,B as me}from"./ethers-BDpbhgX6.js";import{n as Vt}from"./Tooltip-D2JokAZx.js";import{G as Zt}from"./grid.styles-hnDNWobS.js";import"./sentry-Dx-KuLV3.js";import"./intl-CBcMB1D2.js";import"./authorizations-C81yJZo1.js";import"./sendMetaTransaction-Bn0IbhJL.js";function G(r){const o=r.source??"item",l=r.tradeId||`${r.contractAddress}-${r.tokenId??r.itemId??""}`;return`${o}:${l}`}const W="100000000000000000000",We=2,X=15,Jt=/^[a-zA-Z0-9]+$/;function Ee(r){const o=r.trim();return o.length===0?{ok:!1,reason:"empty"}:Jt.test(o)?o.length<We?{ok:!1,reason:"too-short"}:o.length>X?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Kt(r){return r.replace(/[^a-zA-Z0-9]/g,"").slice(0,X)}const Qt=["function available(string _subdomain) view returns (bool)"],_e={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Xt(){return B.chainId===Number(Bt.ChainId.MATIC_MAINNET)?_e.mainnet:_e.sepolia}async function Yt(r,o={}){var d;const{rpc:l,address:x}=Xt(),h=new Gt(l),c=new qt(x,Qt,h);console.info(`[names] availability check → DCLRegistrar(${x}).available("${r}") on ${l}`);const p=await c.available(r);if((d=o.signal)!=null&&d.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${r}" available=${p}`),p?"available":"taken"}const en="https://app.across.to/api";class ue extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function tn(r){return et(W,r)}async function nn(r,o,l={}){var d;const x=l.chainId??B.chainId,h=l.provider??"across",c=`${B.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(o)}&chainId=${x}&provider=${h}`,p=await tt(c,{method:"GET",identity:r,metadata:{}});if(!p.ok){let a;try{a=(d=await p.json())==null?void 0:d.code}catch{}throw a==="ROUTE_COST_TOO_HIGH"?new ue:new Error(`fetchNameCreditRoute ${p.status}`)}return p.json()}function sn(r,o){const l=me.from(r.availableAmount),h=me.from(W).sub(l);return{credits:[{value:r.amount,expiresAt:Number(r.expiresAt),salt:Ot(r.id)}],creditsSignatures:[r.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:W}}async function rn(r,o={}){const l=en,x=o.intervalMs??1e4,h=o.maxAttempts??60;let c={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let p=0;p<h;p++){try{const d=await fetch(`${l}/deposit/status?originChainId=137&depositTxHash=${r}`);if(d.ok){const a=await d.json(),f=(a.status??"pending").toLowerCase(),g=a.fillTx??a.fillTxnRef??null,u=a.actionsSucceeded!==!1;if(f==="filled")return{status:"filled",destinationTxHash:g,actionsSucceeded:u};if(f==="refunded"||f==="expired")return{status:f,destinationTxHash:null,actionsSucceeded:!1};c={status:"pending",destinationTxHash:g,actionsSucceeded:u}}}catch{}p<h-1&&await new Promise(d=>setTimeout(d,x))}return c}async function on(r){const{name:o,identity:l,signer:x}=r,h=r.chainId??B.chainId,c=r.provider??"across",p=(r.beneficiary??await x.getAddress()).toLowerCase();let d=null,a=!1;console.info("[names] register start",{name:o,buyer:p,chainId:h,provider:c});try{const f=await Qe(h),g=tn(f);console.info("[names] step 1/6 sized reservation",{usdCents:g,manaRate:f});const u=await nn(l,o,{chainId:h,provider:c});console.info("[names] step 2/6 route fetched",{target:u.externalCall.target,selector:u.externalCall.selector,provider:u.provider,quoteId:u.quoteId});const v=await Xe(l,g);if(d=v.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:v.credit.id,maxCreditedValue:v.maxCreditedValue}),me.from(v.maxCreditedValue).lt(W))throw new Error("Credit under-sized for the name price");const j=sn(v.credit,u);let m;try{m=await Wt({chainId:h,buyer:p,signer:x,args:j})}catch(b){if(!(b instanceof Ft))throw b;m=await Ht(h,j,x)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:m}),await Lt(m),a=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:m}),c==="across"){const b=await rn(m,r.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:m};if(b.status!=="filled"||!b.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:m,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:m}}catch(f){if(console.error("[names] register failed — raw error:",f,{name:o,buyer:p,originConfirmed:a}),f instanceof Ut)return{status:"pending",originTxHash:f.txHash};if(d&&!a&&await Ye(l,[d]).catch(()=>{}),f instanceof ue)throw f;const g=new Error(Dt(f,"Couldn't register the name. Please try again.",{sale:!0}));throw g.cause=f,g}}const an=s.div`
2
2
  position: fixed;
3
3
  inset: 0;
4
4
  z-index: 10000;
@@ -69,11 +69,11 @@ import{e as Ae,r as w,j as e,u as Je}from"./react-OEOSdkUk.js";import{u as Ke}fr
69
69
  height: 16px;
70
70
  color: ${t.colors.brandViolet};
71
71
  }
72
- `,ie=s.hr`
72
+ `,re=s.hr`
73
73
  border: 0;
74
74
  border-top: 1px solid ${t.colors.line};
75
75
  margin: 16px 0;
76
- `,re=s.div`
76
+ `,ie=s.div`
77
77
  display: flex;
78
78
  align-items: center;
79
79
  gap: 16px;
@@ -379,7 +379,7 @@ import{e as Ae,r as w,j as e,u as Je}from"./react-OEOSdkUk.js";import{u as Ke}fr
379
379
  color: ${t.colors.accent};
380
380
  }
381
381
  }
382
- `;function Sn({name:i,priceCredits:o,onClose:l}){const{session:x}=Me(),{data:h,isError:c}=nt(x),p=st(),d=Ae(),[a,f]=w.useState("confirm"),[g,u]=w.useState(""),[v,j]=w.useState(null),m=w.useRef(!1),b=g.trim().toLowerCase()===i.toLowerCase(),$=a==="completing",C=o!=null?fe(o):"—",k=o==null,E=h==null?void 0:h.credits,M=o!=null&&E!=null?o-E:0,S=M>0,N=k?n("names.priceUnavailable"):S?n("names.insufficientCredits",{credits:fe(M)}):null;w.useEffect(()=>{const y=R=>{R.key==="Escape"&&!$&&l()};document.addEventListener("keydown",y);const T=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=T}},[$,l]);async function F(){if(!(!x||!b||k||S||m.current)){m.current=!0,f("completing"),j(null);try{const y=await on({name:i,identity:x.identity,signer:x.signer});Q("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,settlement:y.status}),p.invalidateQueries({queryKey:["usd-balance"]}),p.invalidateQueries({queryKey:["my-assets"]}),f(y.status==="registered"?"success":"pending")}catch(y){Q(at(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:ot(y),purchase_type:"name"}),j(y instanceof ue?n("names.errorRouteCost"):(y==null?void 0:y.message)||n("names.errorGeneric")),f("error")}finally{m.current=!1}}}const L=a!=="success"&&a!=="pending",z=it(x==null?void 0:x.providerType);return e.jsx(an,{onClick:$?void 0:l,role:"presentation",children:e.jsxs(ln,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[L&&e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsx(te,{children:a==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(ne,{onClick:l,disabled:$,"aria-label":n("buyModal.close"),children:e.jsx(_,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(A,{})," ",Y(h,c)]}),e.jsx(ie,{})]}),(a==="confirm"||a==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(re,{children:[e.jsx(oe,{"aria-hidden":!0,children:"@"}),e.jsxs(ae,{children:[e.jsxs(le,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ce,{children:n("names.subtitle")})]}),e.jsxs(de,{children:[e.jsx(A,{}),C]})]}),a==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(pe,{children:[e.jsx(_,{name:"info","aria-hidden":!0}),e.jsx("span",{children:v})]}),e.jsx(Te,{onClick:()=>f("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(cn,{children:[e.jsx(dn,{children:n("names.confirmTitle")}),e.jsx(pn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${En(i)}</b>`})}}),e.jsxs(hn,{children:[e.jsx(xn,{"aria-hidden":!0,children:"@"}),e.jsx(fn,{value:g,onChange:y=>u(y.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(g.length,8)}ch`}}),e.jsx(mn,{children:".dcl.eth"})]})]}),N?e.jsxs(pe,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(_,{name:"info","aria-hidden":!0}),e.jsx("span",{children:N})]}):null,e.jsx(Te,{onClick:()=>void F(),disabled:!b||!x||k||S,children:n("names.buyCta")})]})]}),a==="completing"&&e.jsxs(un,{children:[e.jsx(gn,{src:rt,alt:"",width:56,height:56}),e.jsx(bn,{children:z?n("names.confirming"):n("names.completing")}),e.jsxs(yn,{children:[e.jsx(wn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(jn,{children:"1/1"})]})]}),a==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsx(te,{children:n("names.pendingHeaderTitle")}),e.jsx(ne,{onClick:l,"aria-label":n("buyModal.close"),children:e.jsx(_,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(A,{})," ",Y(h,c)]}),e.jsx(ie,{}),e.jsxs(pe,{"data-tone":"info",children:[e.jsx(_,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(re,{style:{marginTop:20},children:[e.jsx(oe,{"aria-hidden":!0,children:"@"}),e.jsxs(ae,{children:[e.jsxs(le,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ce,{children:n("names.subtitle")})]}),e.jsxs(de,{children:[e.jsx(A,{}),C]})]}),e.jsx(Re,{children:e.jsx(ze,{onClick:()=>{l(),d("/my-items")},children:n("names.myItems")})})]}),a==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsx(te,{children:n("names.successHeaderTitle")}),e.jsx(ne,{onClick:l,"aria-label":n("buyModal.close"),children:e.jsx(_,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(A,{})," ",Y(h,c)]}),e.jsx(ie,{}),e.jsxs(vn,{children:[e.jsx($n,{"aria-hidden":!0,children:e.jsx(_,{name:"check"})}),e.jsxs(Cn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(re,{style:{marginTop:20},children:[e.jsx(oe,{"aria-hidden":!0,children:"@"}),e.jsxs(ae,{children:[e.jsxs(le,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ce,{children:n("names.subtitle")})]}),e.jsxs(de,{children:[e.jsx(A,{}),C]})]}),e.jsxs(Re,{children:[e.jsx(ze,{onClick:()=>{l(),d("/my-items")},children:n("names.myItems")}),e.jsx(kn,{href:W.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function En(i){return i.replace(/[&<>"']/g,o=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[o])}const _n="https://cdn.decentraland.org/@dcl/shop/0.10.1-31027477194.commit-fc53d94/_assets/identity-B4DXDuJP.webp",Tn="https://cdn.decentraland.org/@dcl/shop/0.10.1-31027477194.commit-fc53d94/_assets/world-B-9aPlxu.webp",Rn="https://cdn.decentraland.org/@dcl/shop/0.10.1-31027477194.commit-fc53d94/_assets/invite-BfwIhP2C.webp",zn="https://cdn.decentraland.org/@dcl/shop/0.10.1-31027477194.commit-fc53d94/_assets/governance-DnazlIjy.webp",In=s.div`
382
+ `;function Sn({name:r,priceCredits:o,onClose:l}){const{session:x}=Me(),{data:h,isError:c}=nt(x),p=st(),d=Ae(),[a,f]=w.useState("confirm"),[g,u]=w.useState(""),[v,j]=w.useState(null),m=w.useRef(!1),b=g.trim().toLowerCase()===r.toLowerCase(),$=a==="completing",C=o!=null?fe(o):"—",k=o==null,E=h==null?void 0:h.credits,M=o!=null&&E!=null?o-E:0,S=M>0,N=k?n("names.priceUnavailable"):S?n("names.insufficientCredits",{credits:fe(M)}):null;w.useEffect(()=>{const y=R=>{R.key==="Escape"&&!$&&l()};document.addEventListener("keydown",y);const T=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=T}},[$,l]);async function F(){if(!(!x||!b||k||S||m.current)){m.current=!0,f("completing"),j(null);try{const y=await on({name:r,identity:x.identity,signer:x.signer});Q("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,settlement:y.status}),p.invalidateQueries({queryKey:["usd-balance"]}),p.invalidateQueries({queryKey:["my-assets"]}),f(y.status==="registered"?"success":"pending")}catch(y){Q(at(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:ot(y),purchase_type:"name"}),j(y instanceof ue?n("names.errorRouteCost"):(y==null?void 0:y.message)||n("names.errorGeneric")),f("error")}finally{m.current=!1}}}const L=a!=="success"&&a!=="pending",z=rt(x==null?void 0:x.providerType);return e.jsx(an,{onClick:$?void 0:l,role:"presentation",children:e.jsxs(ln,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[L&&e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsx(te,{children:a==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(ne,{onClick:l,disabled:$,"aria-label":n("buyModal.close"),children:e.jsx(_,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(A,{})," ",Y(h,c)]}),e.jsx(re,{})]}),(a==="confirm"||a==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(ie,{children:[e.jsx(oe,{"aria-hidden":!0,children:"@"}),e.jsxs(ae,{children:[e.jsxs(le,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ce,{children:n("names.subtitle")})]}),e.jsxs(de,{children:[e.jsx(A,{}),C]})]}),a==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(pe,{children:[e.jsx(_,{name:"info","aria-hidden":!0}),e.jsx("span",{children:v})]}),e.jsx(Te,{onClick:()=>f("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(cn,{children:[e.jsx(dn,{children:n("names.confirmTitle")}),e.jsx(pn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${En(r)}</b>`})}}),e.jsxs(hn,{children:[e.jsx(xn,{"aria-hidden":!0,children:"@"}),e.jsx(fn,{value:g,onChange:y=>u(y.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(g.length,8)}ch`}}),e.jsx(mn,{children:".dcl.eth"})]})]}),N?e.jsxs(pe,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(_,{name:"info","aria-hidden":!0}),e.jsx("span",{children:N})]}):null,e.jsx(Te,{onClick:()=>void F(),disabled:!b||!x||k||S,children:n("names.buyCta")})]})]}),a==="completing"&&e.jsxs(un,{children:[e.jsx(gn,{src:it,alt:"",width:56,height:56}),e.jsx(bn,{children:z?n("names.confirming"):n("names.completing")}),e.jsxs(yn,{children:[e.jsx(wn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(jn,{children:"1/1"})]})]}),a==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsx(te,{children:n("names.pendingHeaderTitle")}),e.jsx(ne,{onClick:l,"aria-label":n("buyModal.close"),children:e.jsx(_,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(A,{})," ",Y(h,c)]}),e.jsx(re,{}),e.jsxs(pe,{"data-tone":"info",children:[e.jsx(_,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(ie,{style:{marginTop:20},children:[e.jsx(oe,{"aria-hidden":!0,children:"@"}),e.jsxs(ae,{children:[e.jsxs(le,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ce,{children:n("names.subtitle")})]}),e.jsxs(de,{children:[e.jsx(A,{}),C]})]}),e.jsx(Re,{children:e.jsx(ze,{onClick:()=>{l(),d("/my-items")},children:n("names.myItems")})})]}),a==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsx(te,{children:n("names.successHeaderTitle")}),e.jsx(ne,{onClick:l,"aria-label":n("buyModal.close"),children:e.jsx(_,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(A,{})," ",Y(h,c)]}),e.jsx(re,{}),e.jsxs(vn,{children:[e.jsx($n,{"aria-hidden":!0,children:e.jsx(_,{name:"check"})}),e.jsxs(Cn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(ie,{style:{marginTop:20},children:[e.jsx(oe,{"aria-hidden":!0,children:"@"}),e.jsxs(ae,{children:[e.jsxs(le,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ce,{children:n("names.subtitle")})]}),e.jsxs(de,{children:[e.jsx(A,{}),C]})]}),e.jsxs(Re,{children:[e.jsx(ze,{onClick:()=>{l(),d("/my-items")},children:n("names.myItems")}),e.jsx(kn,{href:B.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function En(r){return r.replace(/[&<>"']/g,o=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[o])}const _n="https://cdn.decentraland.org/@dcl/shop/0.10.1-31028891267.commit-63bf5fc/_assets/identity-B4DXDuJP.webp",Tn="https://cdn.decentraland.org/@dcl/shop/0.10.1-31028891267.commit-63bf5fc/_assets/world-B-9aPlxu.webp",Rn="https://cdn.decentraland.org/@dcl/shop/0.10.1-31028891267.commit-63bf5fc/_assets/invite-BfwIhP2C.webp",zn="https://cdn.decentraland.org/@dcl/shop/0.10.1-31028891267.commit-63bf5fc/_assets/governance-DnazlIjy.webp",In=s.div`
383
383
  width: 100%;
384
384
  min-width: 0;
385
385
  `,An=s.nav`
@@ -422,7 +422,7 @@ import{e as Ae,r as w,j as e,u as Je}from"./react-OEOSdkUk.js";import{u as Ke}fr
422
422
  gap: 32px;
423
423
  padding-bottom: 32px;
424
424
  }
425
- `,Wn=s.div`
425
+ `,Bn=s.div`
426
426
  position: relative;
427
427
  border-radius: ${t.radius.banner};
428
428
  overflow: hidden;
@@ -438,7 +438,7 @@ import{e as Ae,r as w,j as e,u as Je}from"./react-OEOSdkUk.js";import{u as Ke}fr
438
438
  padding: 40px 20px;
439
439
  gap: 28px;
440
440
  }
441
- `,Bn=s.div`
441
+ `,Wn=s.div`
442
442
  display: flex;
443
443
  flex-direction: column;
444
444
  align-items: center;
@@ -479,11 +479,11 @@ import{e as Ae,r as w,j as e,u as Je}from"./react-OEOSdkUk.js";import{u as Ke}fr
479
479
  gap: 8px;
480
480
  padding: 8px 8px 8px 16px;
481
481
  background: ${t.colors.softWhite};
482
- border: 1.5px solid ${({invalid:i})=>i?t.colors.dclRed:t.colors.line};
482
+ border: 1.5px solid ${({invalid:r})=>r?t.colors.dclRed:t.colors.line};
483
483
  border-radius: 20px;
484
484
 
485
485
  &:focus-within {
486
- border-color: ${({invalid:i})=>i?t.colors.dclRed:t.colors.magenta};
486
+ border-color: ${({invalid:r})=>r?t.colors.dclRed:t.colors.magenta};
487
487
  }
488
488
 
489
489
  ${t.media.maxWidth("mobile")} {
@@ -669,8 +669,8 @@ import{e as Ae,r as w,j as e,u as Je}from"./react-OEOSdkUk.js";import{u as Ke}fr
669
669
  font-weight: 500;
670
670
  text-align: left;
671
671
 
672
- background: ${({tone:i})=>i==="error"?"rgba(255, 45, 85, 0.12)":i==="ok"?"rgba(30, 166, 114, 0.14)":"rgba(255,255,255,0.14)"};
673
- color: ${({tone:i})=>i==="error"?t.colors.dclRed:i==="ok"?"#0f7a4f":"#ecebed"};
672
+ background: ${({tone:r})=>r==="error"?"rgba(255, 45, 85, 0.12)":r==="ok"?"rgba(30, 166, 114, 0.14)":"rgba(255,255,255,0.14)"};
673
+ color: ${({tone:r})=>r==="error"?t.colors.dclRed:r==="ok"?"#0f7a4f":"#ecebed"};
674
674
 
675
675
  .ico {
676
676
  width: 16px;
@@ -717,7 +717,7 @@ import{e as Ae,r as w,j as e,u as Je}from"./react-OEOSdkUk.js";import{u as Ke}fr
717
717
  ${t.media.maxWidth("mobile")} {
718
718
  font-size: 16px;
719
719
  }
720
- `,is=s.div`
720
+ `,rs=s.div`
721
721
  display: grid;
722
722
  grid-template-columns: repeat(4, 1fr);
723
723
  gap: 24px;
@@ -764,7 +764,7 @@ import{e as Ae,r as w,j as e,u as Je}from"./react-OEOSdkUk.js";import{u as Ke}fr
764
764
  font-size: 14px;
765
765
  line-height: 1.57;
766
766
  color: ${t.colors.text};
767
- `,rs=s.span`
767
+ `,is=s.span`
768
768
  font-weight: 600;
769
769
  color: ${t.colors.accent};
770
770
  `,Ie=s.a`
@@ -798,4 +798,4 @@ import{e as Ae,r as w,j as e,u as Je}from"./react-OEOSdkUk.js";import{u as Ke}fr
798
798
  clip: rect(0, 0, 0, 0);
799
799
  white-space: nowrap;
800
800
  border: 0;
801
- `,as="https://docs.decentraland.org/creator/worlds/about/",ls="https://governance.decentraland.org";function cs(i){const o=typeof window<"u"?window.location.hostname:"";return`${o.endsWith("decentraland.org")?"https://decentraland.org":o.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(i)}`}function ds({onBack:i}){Ne({title:n("seo.names.title"),description:n("seo.names.description")});const{session:o,signIn:l}=Me(),{data:x}=Pe(),h=x?We(B,x):null,[c,p]=w.useState(""),[d,a]=w.useState("idle"),[f,g]=w.useState(!1),u=w.useRef(null),[v,j]=w.useState(void 0);w.useLayoutEffect(()=>{u.current&&j(u.current.offsetWidth)},[c]),w.useEffect(()=>{if(!Ee(c).ok){a(c.length===0?"idle":"invalid");return}a("checking");const E=new AbortController,M=setTimeout(()=>{(async()=>{try{const S=await Yt(c,{signal:E.signal});a(S)}catch(S){if((S==null?void 0:S.name)==="AbortError")return;a("error")}})()},400);return()=>{clearTimeout(M),E.abort()}},[c]);const m=Ee(c),b=m.ok&&(d==="available"||d==="error");function $(){if(b){if(!o){l();return}g(!0)}}const C=e.jsxs(e.Fragment,{children:[n("names.claim"),h!=null?e.jsxs(Yn,{children:[e.jsx(A,{}),fe(h)]}):null]});return e.jsxs(In,{"data-testid":"names-page",children:[e.jsxs(An,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Mn,{onClick:i,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Nn,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(Pn,{children:[e.jsxs(Wn,{children:[e.jsxs(Bn,{children:[e.jsx(Fn,{children:n("names.heroTitle")}),e.jsx(Ln,{children:n("names.heroSubtitle")})]}),e.jsxs(Un,{children:[e.jsxs(Hn,{children:[e.jsxs(On,{invalid:d==="taken",children:[e.jsxs(Vn,{children:[e.jsx(Zn,{"aria-hidden":!0,children:"@"}),e.jsx(Jn,{value:c,onChange:k=>p(Kt(k.target.value)),placeholder:n("names.inputPlaceholder"),"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:X,style:{width:v!=null?`${v}px`:void 0}}),e.jsx(Dn,{ref:u,"aria-hidden":!0,children:c||n("names.inputPlaceholder")}),e.jsx(Kn,{children:n("names.suffix")})]}),c.length>0?e.jsxs(Qn,{"aria-hidden":!0,children:[c.length,"/",X]}):null,e.jsx(Fe,{onClick:$,disabled:!b,"data-testid":"names-claim",children:C})]}),d==="taken"?e.jsxs(Gn,{role:"status","data-testid":"names-taken",children:[e.jsx(_,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.taken")}),e.jsxs(qn,{href:cs(c),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(_,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(Xn,{onClick:$,disabled:!b,children:C}),d==="checking"?e.jsx(he,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):d==="error"?e.jsx(he,{tone:"muted",role:"status",children:n("names.checkError")}):d==="invalid"&&!m.ok&&m.reason==="too-short"?e.jsx(he,{tone:"muted",role:"status",children:n("names.tooShort",{min:Be})}):null,e.jsx(os,{role:"status","aria-live":"polite",children:d==="available"?n("names.available",{name:c}):""})]})]}),e.jsxs(es,{children:[e.jsxs(ts,{children:[e.jsx(ns,{children:n("names.whyTitle")}),e.jsx(ss,{children:n("names.whyIntro")})]}),e.jsxs(is,{children:[e.jsxs(q,{children:[e.jsx(V,{src:_n,alt:""}),e.jsxs(Z,{children:[e.jsx(J,{children:n("names.why1Title")}),e.jsx(K,{children:n("names.why1")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Tn,alt:""}),e.jsxs(Z,{children:[e.jsx(J,{children:n("names.why2Title")}),e.jsxs(K,{children:[n("names.why2")," ",e.jsx(rs,{children:n("names.why2Address")})]}),e.jsxs(Ie,{href:as,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(_,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Rn,alt:""}),e.jsxs(Z,{children:[e.jsx(J,{children:n("names.why3Title")}),e.jsx(K,{children:n("names.why3")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:zn,alt:""}),e.jsxs(Z,{children:[e.jsx(J,{children:n("names.why4Title")}),e.jsx(K,{children:n("names.why4")}),e.jsxs(Ie,{href:ls,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(_,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),f?e.jsx(Sn,{name:c,priceCredits:h,onClose:()=>g(!1)}):null]})}const ps="data:image/svg+xml,%3csvg%20width='101'%20height='101'%20viewBox='0%200%20101%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M42.4493%2040.9855L30.7394%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M30.7391%2040.9855L42.449%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M36.2621%2071.0604C29.6047%2071.0604%2023.9709%2068.7542%2019.3608%2064.1416C14.7507%2059.5291%2012.4445%2053.8953%2012.442%2047.2404C12.4396%2040.5854%2014.7459%2034.9516%2019.3608%2030.3391C23.9758%2025.7266%2029.6096%2023.4203%2036.2621%2023.4203C42.9146%2023.4203%2048.5496%2025.7266%2053.167%2030.3391C57.7844%2034.9516%2060.0895%2040.5854%2060.0822%2047.2404C60.0822%2049.9277%2059.6546%2052.4624%2058.7995%2054.8445C57.9445%2057.2265%2056.784%2059.3336%2055.3181%2061.1659L75.84%2081.6878C76.5119%2082.3597%2076.8478%2083.2148%2076.8478%2084.2531C76.8478%2085.2914%2076.5119%2086.1465%2075.84%2086.8183C75.1682%2087.4902%2074.3131%2087.8261%2073.2748%2087.8261C72.2365%2087.8261%2071.3814%2087.4902%2070.7096%2086.8183L50.1877%2066.2964C48.3554%2067.7623%2046.2482%2068.9227%2043.8662%2069.7778C41.4842%2070.6329%2038.9495%2071.0604%2036.2621%2071.0604ZM36.2621%2063.7312C40.8429%2063.7312%2044.7372%2062.1285%2047.9449%2058.9232C51.1527%2055.7179%2052.7554%2051.8236%2052.7529%2047.2404C52.7505%2042.6571%2051.1478%2038.7641%2047.9449%2035.5612C44.742%2032.3583%2040.8478%2030.7544%2036.2621%2030.7495C31.6764%2030.7447%2027.7834%2032.3485%2024.5829%2035.5612C21.3825%2038.7739%2019.7786%2042.6669%2019.7713%2047.2404C19.764%2051.8138%2021.3678%2055.7081%2024.5829%2058.9232C27.798%2062.1383%2031.6911%2063.7409%2036.2621%2063.7312Z'%20fill='url(%23paint0_linear_search_empty)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_search_empty'%20x1='10.4127'%20y1='55.6273'%20x2='124.009'%20y2='44.925'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",xe=48,hs=["all","on_sale","not_for_sale"];function Is(){const[i]=Je(),o=Ae(),l=(i.get("q")??"").trim().toLowerCase(),x=(i.get("q")??"").trim();Ne({title:x?n("seo.collectibles.searchTitle",{query:x}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const h=w.useMemo(()=>({category:l?"all":"wearable",status:"on_sale",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[l]),[c,p]=Ke(h),{subCategory:d,rarities:a,priceMin:f,priceMax:g,smart:u,sort:v}=c,j=c.category,m=hs.includes(c.status)?c.status:"on_sale",[b,$]=w.useState(!1);w.useEffect(()=>{if(!b)return;const r=O=>{O.key==="Escape"&&$(!1)};document.addEventListener("keydown",r);const I=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",r),document.body.style.overflow=I}},[b]);const C=m==="on_sale",k=f&&!Number.isNaN(Number(f))?Number(f):void 0,E=g&&!Number.isNaN(Number(g))?Number(g):void 0,M=lt(),S=d?At[d]:void 0,N=(Se.find(r=>r.key===v)??Se[0]).server,F={category:j,rarities:a.length?a:void 0,wearableCategories:S,minPriceCredits:k,maxPriceCredits:E,search:l||void 0,sortBy:N,isSmart:u||void 0,onSale:!0,listingType:M?void 0:"primary"},L={category:j,rarities:a.length?a:void 0,wearableCategories:S,search:l||void 0,sortBy:N,isWearableSmart:u||void 0,isOnSale:m==="not_for_sale"?!1:void 0},{items:z,total:y,isLoading:T,isPlaceholderData:R,error:ge,hasNextPage:Le,isFetchingNextPage:be,isFetchNextPageError:Ue,fetchNextPage:He}=Nt(C?["shop-items",F]:["catalog-items",L],r=>C?dt({...F,first:xe,skip:r}):pt({...L,first:xe,skip:r}),{enabled:j!=="names"}),U=y,{data:ye,isError:Oe,isPending:De}=Pe(),Ge=r=>ye&&r.manaWei?We(r.manaWei,ye):null,qe=C&&De&&z.some(r=>r.source==="legacy"),we=T||R||qe,Ve=T?15:Math.min(Math.max(z.length,1),xe),je=w.useRef(null);w.useEffect(()=>{T||R||!l||je.current===l||(je.current=l,Q("Shop Searched",{query:l,result_count:U}))},[l,T,R,U]);const H=w.useRef("__init__");w.useEffect(()=>{if(T||R)return;const r=JSON.stringify({category:j,subCategory:d,rarities:a,min:k,max:E,sort:v,status:m,smart:u});if(H.current==="__init__"||H.current===r){H.current=r;return}H.current=r,Q("Shop Applied Filter",{filters:{category:j,sub_category:d,rarities:a,min_price_credits:k??null,max_price_credits:E??null,status:m,smart:u,sort:v},result_count:U})},[j,d,a,k,E,v,m,u,T,R,U]);function ve(r){p({category:r,subCategory:null})}function $e(r){p({status:r})}function Ce(r){p({rarities:a.includes(r)?a.filter(I=>I!==r):[...a,r]})}function Ze(){p(h)}const P=[];(k!=null||E!=null)&&P.push({key:"price",label:n("filter.price"),onRemove:()=>{p({priceMin:"",priceMax:""})}});for(const r of zt)a.includes(r)&&P.push({key:`rarity-${r}`,label:ct(r),onRemove:()=>Ce(r)});return u&&P.push({key:"smart",label:n("filter.smart"),onRemove:()=>p({smart:!1})}),m!=="on_sale"&&P.push({key:"status",label:m==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>$e("on_sale")}),e.jsxs(ht,{"data-testid":"browse",children:[j!=="names"&&e.jsxs(e.Fragment,{children:[b?e.jsx(xt,{onClick:()=>$(!1),"aria-hidden":!0}):null,e.jsxs(ft,{"data-open":b||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(mt,{children:[e.jsx(ut,{children:n("assets.filters")}),e.jsx(gt,{onClick:()=>$(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(bt,{children:e.jsx(yt,{category:j,subCategory:d,onCategory:ve,onSub:r=>p({subCategory:r}),priceMin:f,priceMax:g,onPriceMin:r=>p({priceMin:r}),onPriceMax:r=>p({priceMax:r}),rarities:a,onToggleRarity:Ce,status:m,onStatus:$e,smart:u,onSmart:r=>p({smart:r})})}),e.jsx(wt,{children:e.jsx(jt,{type:"button",onClick:()=>$(!1),children:n("assets.showItems")})})]})]}),e.jsx(vt,{children:j==="names"?e.jsx(ds,{onBack:()=>ve("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(It,{sort:v,onSort:r=>p({sort:r}),total:y,loading:T||R,query:l,onOpenFilters:()=>$(!0),chips:P,onClearChips:Ze}),Oe&&C&&z.some(r=>r.source==="legacy")?e.jsx($t,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,ge?e.jsx(Pt,{message:n("assets.loadError"),testId:"browse-error"}):null,!we&&z.length===0&&!ge?e.jsxs(Ct,{"data-testid":"browse-empty",children:[e.jsx(kt,{src:ps,alt:""}),e.jsxs(St,{children:[e.jsx(Et,{children:n("assets.empty.title")}),e.jsx(_t,{children:x?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:x}),n("assets.empty.searchAfter")]}):n("assets.empty.filters")})]}),e.jsx(Tt,{children:e.jsx(Rt,{type:"button",onClick:()=>o("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Zt,{"data-testid":"grid",children:we?e.jsx(ke,{count:Ve}):e.jsxs(e.Fragment,{children:[z.map(r=>{if(!C)return e.jsx(D,{item:r,mode:"view"},G(r));const I=r;if(I.source!=="legacy")return e.jsx(D,{item:r},G(r));const O=Ge(I);return O==null?e.jsx(D,{item:r,mode:"view"},G(r)):e.jsx(D,{item:{...I,priceCredits:O}},G(r))}),be?e.jsx(ke,{count:6}):null]})}),e.jsx(Mt,{hasNextPage:Le,isFetching:be,isError:Ue,onLoadMore:()=>void He()})]})]})})]})}export{Is as Assets};
801
+ `,as="https://docs.decentraland.org/creator/worlds/about/",ls="https://governance.decentraland.org";function cs(r){const o=typeof window<"u"?window.location.hostname:"";return`${o.endsWith("decentraland.org")?"https://decentraland.org":o.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(r)}`}function ds({onBack:r}){Ne({title:n("seo.names.title"),description:n("seo.names.description")});const{session:o,signIn:l}=Me(),{data:x}=Pe(),h=x?Be(W,x):null,[c,p]=w.useState(""),[d,a]=w.useState("idle"),[f,g]=w.useState(!1),u=w.useRef(null),[v,j]=w.useState(void 0);w.useLayoutEffect(()=>{u.current&&j(u.current.offsetWidth)},[c]),w.useEffect(()=>{if(!Ee(c).ok){a(c.length===0?"idle":"invalid");return}a("checking");const E=new AbortController,M=setTimeout(()=>{(async()=>{try{const S=await Yt(c,{signal:E.signal});a(S)}catch(S){if((S==null?void 0:S.name)==="AbortError")return;a("error")}})()},400);return()=>{clearTimeout(M),E.abort()}},[c]);const m=Ee(c),b=m.ok&&(d==="available"||d==="error");function $(){if(b){if(!o){l();return}g(!0)}}const C=e.jsxs(e.Fragment,{children:[n("names.claim"),h!=null?e.jsxs(Yn,{children:[e.jsx(A,{}),fe(h)]}):null]});return e.jsxs(In,{"data-testid":"names-page",children:[e.jsxs(An,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Mn,{onClick:r,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Nn,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(Pn,{children:[e.jsxs(Bn,{children:[e.jsxs(Wn,{children:[e.jsx(Fn,{children:n("names.heroTitle")}),e.jsx(Ln,{children:n("names.heroSubtitle")})]}),e.jsxs(Un,{children:[e.jsxs(Hn,{children:[e.jsxs(On,{invalid:d==="taken",children:[e.jsxs(Vn,{children:[e.jsx(Zn,{"aria-hidden":!0,children:"@"}),e.jsx(Jn,{value:c,onChange:k=>p(Kt(k.target.value)),placeholder:n("names.inputPlaceholder"),"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:X,style:{width:v!=null?`${v}px`:void 0}}),e.jsx(Dn,{ref:u,"aria-hidden":!0,children:c||n("names.inputPlaceholder")}),e.jsx(Kn,{children:n("names.suffix")})]}),c.length>0?e.jsxs(Qn,{"aria-hidden":!0,children:[c.length,"/",X]}):null,e.jsx(Fe,{onClick:$,disabled:!b,"data-testid":"names-claim",children:C})]}),d==="taken"?e.jsxs(Gn,{role:"status","data-testid":"names-taken",children:[e.jsx(_,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.taken")}),e.jsxs(qn,{href:cs(c),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(_,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(Xn,{onClick:$,disabled:!b,children:C}),d==="checking"?e.jsx(he,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):d==="error"?e.jsx(he,{tone:"muted",role:"status",children:n("names.checkError")}):d==="invalid"&&!m.ok&&m.reason==="too-short"?e.jsx(he,{tone:"muted",role:"status",children:n("names.tooShort",{min:We})}):null,e.jsx(os,{role:"status","aria-live":"polite",children:d==="available"?n("names.available",{name:c}):""})]})]}),e.jsxs(es,{children:[e.jsxs(ts,{children:[e.jsx(ns,{children:n("names.whyTitle")}),e.jsx(ss,{children:n("names.whyIntro")})]}),e.jsxs(rs,{children:[e.jsxs(q,{children:[e.jsx(V,{src:_n,alt:""}),e.jsxs(Z,{children:[e.jsx(J,{children:n("names.why1Title")}),e.jsx(K,{children:n("names.why1")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Tn,alt:""}),e.jsxs(Z,{children:[e.jsx(J,{children:n("names.why2Title")}),e.jsxs(K,{children:[n("names.why2")," ",e.jsx(is,{children:n("names.why2Address")})]}),e.jsxs(Ie,{href:as,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(_,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Rn,alt:""}),e.jsxs(Z,{children:[e.jsx(J,{children:n("names.why3Title")}),e.jsx(K,{children:n("names.why3")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:zn,alt:""}),e.jsxs(Z,{children:[e.jsx(J,{children:n("names.why4Title")}),e.jsx(K,{children:n("names.why4")}),e.jsxs(Ie,{href:ls,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(_,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),f?e.jsx(Sn,{name:c,priceCredits:h,onClose:()=>g(!1)}):null]})}const ps="data:image/svg+xml,%3csvg%20width='101'%20height='101'%20viewBox='0%200%20101%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M42.4493%2040.9855L30.7394%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M30.7391%2040.9855L42.449%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M36.2621%2071.0604C29.6047%2071.0604%2023.9709%2068.7542%2019.3608%2064.1416C14.7507%2059.5291%2012.4445%2053.8953%2012.442%2047.2404C12.4396%2040.5854%2014.7459%2034.9516%2019.3608%2030.3391C23.9758%2025.7266%2029.6096%2023.4203%2036.2621%2023.4203C42.9146%2023.4203%2048.5496%2025.7266%2053.167%2030.3391C57.7844%2034.9516%2060.0895%2040.5854%2060.0822%2047.2404C60.0822%2049.9277%2059.6546%2052.4624%2058.7995%2054.8445C57.9445%2057.2265%2056.784%2059.3336%2055.3181%2061.1659L75.84%2081.6878C76.5119%2082.3597%2076.8478%2083.2148%2076.8478%2084.2531C76.8478%2085.2914%2076.5119%2086.1465%2075.84%2086.8183C75.1682%2087.4902%2074.3131%2087.8261%2073.2748%2087.8261C72.2365%2087.8261%2071.3814%2087.4902%2070.7096%2086.8183L50.1877%2066.2964C48.3554%2067.7623%2046.2482%2068.9227%2043.8662%2069.7778C41.4842%2070.6329%2038.9495%2071.0604%2036.2621%2071.0604ZM36.2621%2063.7312C40.8429%2063.7312%2044.7372%2062.1285%2047.9449%2058.9232C51.1527%2055.7179%2052.7554%2051.8236%2052.7529%2047.2404C52.7505%2042.6571%2051.1478%2038.7641%2047.9449%2035.5612C44.742%2032.3583%2040.8478%2030.7544%2036.2621%2030.7495C31.6764%2030.7447%2027.7834%2032.3485%2024.5829%2035.5612C21.3825%2038.7739%2019.7786%2042.6669%2019.7713%2047.2404C19.764%2051.8138%2021.3678%2055.7081%2024.5829%2058.9232C27.798%2062.1383%2031.6911%2063.7409%2036.2621%2063.7312Z'%20fill='url(%23paint0_linear_search_empty)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_search_empty'%20x1='10.4127'%20y1='55.6273'%20x2='124.009'%20y2='44.925'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",xe=48,hs=["all","on_sale","not_for_sale"];function Is(){const[r]=Je(),o=Ae(),l=(r.get("q")??"").trim().toLowerCase(),x=(r.get("q")??"").trim();Ne({title:x?n("seo.collectibles.searchTitle",{query:x}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const h=w.useMemo(()=>({category:l?"all":"wearable",status:"on_sale",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[l]),[c,p]=Ke(h),{subCategory:d,rarities:a,priceMin:f,priceMax:g,smart:u,sort:v}=c,j=c.category,m=hs.includes(c.status)?c.status:"on_sale",[b,$]=w.useState(!1);w.useEffect(()=>{if(!b)return;const i=O=>{O.key==="Escape"&&$(!1)};document.addEventListener("keydown",i);const I=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",i),document.body.style.overflow=I}},[b]);const C=m==="on_sale",k=f&&!Number.isNaN(Number(f))?Number(f):void 0,E=g&&!Number.isNaN(Number(g))?Number(g):void 0,M=lt(),S=d?At[d]:void 0,N=(Se.find(i=>i.key===v)??Se[0]).server,F={category:j,rarities:a.length?a:void 0,wearableCategories:S,minPriceCredits:k,maxPriceCredits:E,search:l||void 0,sortBy:N,isSmart:u||void 0,onSale:!0,listingType:M?void 0:"primary"},L={category:j,rarities:a.length?a:void 0,wearableCategories:S,search:l||void 0,sortBy:N,isWearableSmart:u||void 0,isOnSale:m==="not_for_sale"?!1:void 0},{items:z,total:y,isLoading:T,isPlaceholderData:R,error:ge,hasNextPage:Le,isFetchingNextPage:be,isFetchNextPageError:Ue,fetchNextPage:He}=Nt(C?["shop-items",F]:["catalog-items",L],i=>C?dt({...F,first:xe,skip:i}):pt({...L,first:xe,skip:i}),{enabled:j!=="names"}),U=y,{data:ye,isError:Oe,isPending:De}=Pe(),Ge=i=>ye&&i.manaWei?Be(i.manaWei,ye):null,qe=C&&De&&z.some(i=>i.source==="legacy"),we=T||R||qe,Ve=T?15:Math.min(Math.max(z.length,1),xe),je=w.useRef(null);w.useEffect(()=>{T||R||!l||je.current===l||(je.current=l,Q("Shop Searched",{query:l,result_count:U}))},[l,T,R,U]);const H=w.useRef("__init__");w.useEffect(()=>{if(T||R)return;const i=JSON.stringify({category:j,subCategory:d,rarities:a,min:k,max:E,sort:v,status:m,smart:u});if(H.current==="__init__"||H.current===i){H.current=i;return}H.current=i,Q("Shop Applied Filter",{filters:{category:j,sub_category:d,rarities:a,min_price_credits:k??null,max_price_credits:E??null,status:m,smart:u,sort:v},result_count:U})},[j,d,a,k,E,v,m,u,T,R,U]);function ve(i){p({category:i,subCategory:null})}function $e(i){p({status:i})}function Ce(i){p({rarities:a.includes(i)?a.filter(I=>I!==i):[...a,i]})}function Ze(){p(h)}const P=[];(k!=null||E!=null)&&P.push({key:"price",label:n("filter.price"),onRemove:()=>{p({priceMin:"",priceMax:""})}});for(const i of zt)a.includes(i)&&P.push({key:`rarity-${i}`,label:ct(i),onRemove:()=>Ce(i)});return u&&P.push({key:"smart",label:n("filter.smart"),onRemove:()=>p({smart:!1})}),m!=="on_sale"&&P.push({key:"status",label:m==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>$e("on_sale")}),e.jsxs(ht,{"data-testid":"browse",children:[j!=="names"&&e.jsxs(e.Fragment,{children:[b?e.jsx(xt,{onClick:()=>$(!1),"aria-hidden":!0}):null,e.jsxs(ft,{"data-open":b||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(mt,{children:[e.jsx(ut,{children:n("assets.filters")}),e.jsx(gt,{onClick:()=>$(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(bt,{children:e.jsx(yt,{category:j,subCategory:d,onCategory:ve,onSub:i=>p({subCategory:i}),priceMin:f,priceMax:g,onPriceMin:i=>p({priceMin:i}),onPriceMax:i=>p({priceMax:i}),rarities:a,onToggleRarity:Ce,status:m,onStatus:$e,smart:u,onSmart:i=>p({smart:i})})}),e.jsx(wt,{children:e.jsx(jt,{type:"button",onClick:()=>$(!1),children:n("assets.showItems")})})]})]}),e.jsx(vt,{children:j==="names"?e.jsx(ds,{onBack:()=>ve("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(It,{sort:v,onSort:i=>p({sort:i}),total:y,loading:T||R,query:l,onOpenFilters:()=>$(!0),chips:P,onClearChips:Ze}),Oe&&C&&z.some(i=>i.source==="legacy")?e.jsx($t,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,ge?e.jsx(Pt,{message:n("assets.loadError"),testId:"browse-error"}):null,!we&&z.length===0&&!ge?e.jsxs(Ct,{"data-testid":"browse-empty",children:[e.jsx(kt,{src:ps,alt:""}),e.jsxs(St,{children:[e.jsx(Et,{children:n("assets.empty.title")}),e.jsx(_t,{children:x?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:x}),n("assets.empty.searchAfter")]}):n("assets.empty.filters")})]}),e.jsx(Tt,{children:e.jsx(Rt,{type:"button",onClick:()=>o("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Zt,{"data-testid":"grid",children:we?e.jsx(ke,{count:Ve}):e.jsxs(e.Fragment,{children:[z.map(i=>{if(!C)return e.jsx(D,{item:i,mode:"view"},G(i));const I=i;if(I.source!=="legacy")return e.jsx(D,{item:i},G(i));const O=Ge(I);return O==null?e.jsx(D,{item:i,mode:"view"},G(i)):e.jsx(D,{item:{...I,priceCredits:O}},G(i))}),be?e.jsx(ke,{count:6}):null]})}),e.jsx(Mt,{hasNextPage:Le,isFetching:be,isError:Ue,onLoadMore:()=>void He()})]})]})})]})}export{Is as Assets};
@@ -1,4 +1,4 @@
1
- import{r as $,j as t}from"./react-OEOSdkUk.js";import{R as T,C as ae,a as re,b as le}from"./categories-CTfgPgaL.js";import{n as c,T as ce}from"./Tooltip-Bg9BttKY.js";import{t as e,s as o,I as g,b as s,ai as W,C as v}from"./index-BW8VN255.js";const de=o.div`
1
+ import{r as $,j as t}from"./react-BYHuwl8r.js";import{R as T,C as ae,a as re,b as le}from"./categories-BCX_N_OH.js";import{n as c,T as ce}from"./Tooltip-D2JokAZx.js";import{t as e,s as o,I as g,b as s,al as W,C as v}from"./index-CUmtcNQg.js";const de=o.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 12px;
@@ -1,4 +1,4 @@
1
- import{j as i,L as _,r as F}from"./react-OEOSdkUk.js";import{s as n,B as G,t as a,w as D,x as P,b as e,o as W,y as O,I as z,z as B,v as w,A as K,c as H,D as Q,E as A,F as X,G as Z,H as E}from"./index-BW8VN255.js";import{c as J,d as U,b as V,e as Y,s as tt,a as it}from"./authorizations-oq_PkaKX.js";import{f as et}from"./builder-CjlvqjvE.js";import{m as ot}from"./mana-matic-C4e1sNO3.js";import{f as at}from"./errors-BM_aT-FG.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-B60WY-np.js";import"./ethers-lk3HAbPB.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-CbAkDxFC.js";const nt=D`
1
+ import{j as i,L as _,r as F}from"./react-BYHuwl8r.js";import{s as n,B as G,t as a,w as D,x as P,b as e,o as W,y as O,I as z,z as B,v as w,A as K,c as H,D as Q,E as A,F as X,G as Z,H as E}from"./index-CUmtcNQg.js";import{c as J,d as U,b as V,e as Y,s as tt,a as it}from"./authorizations-C81yJZo1.js";import{f as et}from"./builder-CufTJoty.js";import{m as ot}from"./mana-matic-C4e1sNO3.js";import{f as at}from"./errors-COdt9pAA.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-Bn0IbhJL.js";const nt=D`
2
2
  to { transform: rotate(360deg); }
3
3
  `,st=D`
4
4
  to { background-position: -200% 0; }
@@ -1,4 +1,4 @@
1
- import{j as e,L as Se,r as P,e as Zt,d as ea}from"./react-OEOSdkUk.js";import{t as le,s as i,b as a,aD as de,ba as ta,aC as aa,I as H,z as St,ah as Ke,x as sa,S as Q,aj as ot,o as na,q as ia,v as ra,bb as oa,A as ca,bc as da,ak as la,bd as ua,be as ct,bf as ha,bg as pa,y as ga,bh as dt,V as G,bi as lt,bj as xa,F as ae,r as ma,c as ut,bk as fa,C as ya,bl as ht,bm as Be,bn as ba,bo as fe,bp as ye,bq as pt,g as be,f as va,h as Re,br as wa}from"./index-BW8VN255.js";import{M as Ca,S as ja,C as ka,H as Sa,a as $a,T as Ma,X as Ta,b as Ia,B as Pa,c as za,d as gt,e as Aa,f as je,P as $t,m as Ea,g as qa,h as Ba,i as Ra,j as Mt,k as ke,L as _a,l as Wa,n as xt,o as mt,W as Fa,p as La,q as Ka,A as Ua,r as Na,s as Qa,t as Ha,u as Oa,v as Va,w as Ga,x as Da,y as Ya,z as Ja,D as Xa,E as Za,F as es,G as ts,I as as,J as ss,K as _e,N as ns,O as is,Q as rs,R as os,U as ft,V as yt,Y as cs,Z as ds,_ as ls}from"./CollectionCarousel-CTsZLD0o.js";import{k as us,l as hs,a as ps,n as gs,f as xs,A as ms}from"./authorizations-oq_PkaKX.js";import{g as fs,j as We}from"./buy-BbDdxACJ.js";import{b as ys,w as bs,S as bt,G as vs}from"./buy-gasless-Dv7SXb76.js";import{u as ws,M as Cs,R as ve,r as js,c as ks,p as vt}from"./useCreditPacks-C6MAM0-z.js";import{i as Ss,a as $s}from"./errors-BM_aT-FG.js";import{E as Ms}from"./ErrorNotice-C2_MEmWZ.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-B60WY-np.js";import"./ethers-lk3HAbPB.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-CbAkDxFC.js";const{colors:se,radius:Ts}=le,Is=i.div`
1
+ import{j as e,L as Se,r as P,b as Zt,a as ea}from"./react-BYHuwl8r.js";import{t as le,s as i,b as a,L as de,ba as ta,J as aa,I as H,z as St,K as Ke,x as sa,X as Q,am as ot,o as na,q as ia,v as ra,bb as oa,A as ca,bc as da,an as la,bd as ua,be as ct,bf as ha,bg as pa,y as ga,bh as dt,Z as G,bi as lt,bj as xa,F as ae,r as ma,c as ut,bk as fa,C as ya,bl as ht,bm as Be,bn as ba,bo as fe,bp as ye,bq as pt,g as be,f as va,h as Re,br as wa}from"./index-CUmtcNQg.js";import{M as Ca,S as ja,C as ka,H as Sa,a as $a,T as Ma,X as Ta,b as Ia,B as Pa,c as za,d as gt,e as Aa,f as je,P as $t,m as Ea,g as qa,h as Ba,i as Ra,j as Mt,k as ke,L as _a,l as Wa,n as xt,o as mt,W as Fa,p as La,q as Ka,A as Ua,r as Na,s as Qa,t as Ha,u as Oa,v as Va,w as Ga,x as Da,y as Ya,z as Ja,D as Xa,E as Za,F as es,G as ts,I as as,J as ss,K as _e,N as ns,O as is,Q as rs,R as os,U as ft,V as yt,Y as cs,Z as ds,_ as ls}from"./CollectionCarousel-CPlRGKBj.js";import{k as us,l as hs,a as ps,n as gs,f as xs,A as ms}from"./authorizations-C81yJZo1.js";import{g as fs,j as We}from"./buy-DEfmn-X_.js";import{b as ys,w as bs,S as bt,G as vs}from"./buy-gasless-D1GuSJOS.js";import{u as ws,M as Cs,R as ve,r as js,c as ks,p as vt}from"./useCreditPacks-CweMx-zq.js";import{i as Ss,a as $s}from"./errors-COdt9pAA.js";import{E as Ms}from"./ErrorNotice-D9o1yt7T.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-Bn0IbhJL.js";const{colors:se,radius:Ts}=le,Is=i.div`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  justify-content: center;
@@ -58,7 +58,7 @@ import{j as e,L as Se,r as P,e as Zt,d as ea}from"./react-OEOSdkUk.js";import{t
58
58
  font-weight: 700;
59
59
  color: ${se.text};
60
60
  }
61
- `,qs="https://cdn.decentraland.org/@dcl/shop/0.10.1-31027477194.commit-fc53d94/_assets/buy-error-22UunaPC.png";function Bs(o){const{phase:l,balanceCredits:I,onClose:z}=o,W=l==="processing",D=l==="error"?a("cartCheckout.errorTitle"):l==="nofunds"?a("cartCheckout.titleNoFunds"):l==="choose"?a("buyModal.choosePayment"):a("cartCheckout.titleBuy"),Y=l==="processing";return e.jsxs(Ca,{role:"dialog","aria-modal":"true","aria-label":a("cartCheckout.dialogAria"),children:[e.jsx(ja,{onClick:W?void 0:z,"aria-hidden":!0}),e.jsxs(ka,{"data-tall":Y||void 0,children:[e.jsxs(Sa,{children:[e.jsxs($a,{children:[e.jsx(Ma,{children:D}),!W&&e.jsx(Ta,{onClick:z,"aria-label":a("buyModal.close"),children:e.jsx(Ia,{})})]}),e.jsxs(Pa,{children:[e.jsx(za,{children:l==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),e.jsx(gt,{}),e.jsx(Aa,{children:de(I)})]})]}),l==="choose"&&e.jsxs(je,{children:[e.jsxs(Es,{children:[e.jsx("span",{children:a("cart.purchaseSummary")}),e.jsxs("strong",{children:[e.jsx(gt,{}),de(o.totalCredits??0)]})]}),e.jsx($t,{options:o.options??[],totalCents:o.totalCents??0,onPay:o.onPay??(()=>{}),rateNote:(()=>{const A=Ea(o.totalCents??0,o.totalManaWei??0n);return A!=null?a("buyModal.manaRate",{mana:A.toLocaleString("en",{maximumFractionDigits:2})}):null})()})]}),l==="processing"&&e.jsx(Rs,{stage:o.stage??"reserving",step:o.step??1,total:o.total??1,isSelfCustody:!!o.isSelfCustody,signatures:o.signatures}),l==="nofunds"&&e.jsx(_s,{lines:o.lines??[],shortfallCredits:o.shortfallCredits??0,packs:o.packs??[],selectedPack:o.selectedPack??"",onSelectPack:o.onSelectPack??(()=>{}),onBuyPacks:o.onBuyPacks??(()=>{}),onCancel:z}),l==="error"&&e.jsxs(je,{children:[e.jsxs(qa,{"data-testid":"buy-error",children:[e.jsx(Ba,{src:qs,alt:"",width:64,height:80}),e.jsxs(Ra,{children:[e.jsx("b",{children:a("cartCheckout.errorHeadline")})," ",o.message??a("cartCheckout.errorBody")]})]}),e.jsxs(Mt,{children:[e.jsx(ke,{"data-variant":"outline",onClick:z,children:a("buyModal.cancel")}),e.jsx(ke,{"data-variant":"purple",onClick:o.onRetry??z,children:a("cartCheckout.tryAgain")})]})]})]})]})}function Rs({stage:o,step:l,total:I,isSelfCustody:z,signatures:W}){const D=o==="reserving",Y=I>0?Math.min(100,Math.round(l/I*100)):0,A=z&&W&&W.total>1,ne=o==="awaiting-signature"?z?A?a("cartCheckout.confirmMultiple",{current:W.current,total:W.total}):a("buyModal.confirmToContinue"):a("buyModal.completingTransaction"):o==="settling"?a("buyModal.completingTransaction"):a("cartCheckout.preparing");return e.jsxs(je,{"data-processing":!0,children:[e.jsx(_a,{src:ta,alt:"",width:61,height:61}),e.jsx(Wa,{children:ne}),D?e.jsxs(Is,{children:[e.jsx(xt,{"aria-hidden":!0,children:e.jsx(mt,{"data-step":!0,style:{width:`${Y}%`}})}),I>1?e.jsxs(Ps,{children:[l,"/",I]}):null]}):e.jsx(xt,{"aria-hidden":!0,children:e.jsx(mt,{})})]})}function _s({lines:o,shortfallCredits:l,packs:I,selectedPack:z,onSelectPack:W,onBuyPacks:D,onCancel:Y}){const A=I.find(n=>n.id===z),ne=o.reduce((n,L)=>n+(L.quantity??1),0);return e.jsxs(je,{children:[e.jsxs(Fa,{"data-testid":"nofunds-warning",children:[e.jsx(La,{}),e.jsxs(Ka,{children:[e.jsx("b",{children:a("buyModal.insufficientFunds")})," ",a("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:a("buyModal.warningCreditsAmount",{count:Math.max(0,l)})})," ",a("buyModal.warningToPurchase",{count:ne})]})]}),e.jsx(zs,{children:o.map(n=>{const L=n.quantity??1;return e.jsxs(Ua,{children:[e.jsx(Na,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsxs(Qa,{children:[e.jsxs("div",{children:[e.jsxs(Ha,{title:n.item.name,children:[n.item.name||a("buyModal.itemFallback"),L>1?e.jsx(As,{children:a("cartCheckout.qty",{count:L})}):null]}),n.item.creator?e.jsx(Oa,{address:n.item.creator}):null]}),e.jsxs(Va,{children:[e.jsx(Ga,{}),e.jsx("span",{children:de(n.priceCredits*L)})]})]})]},n.item.id)})}),e.jsx(Da,{children:I.map(n=>{const L=n.id===z;return e.jsxs(Ya,{"data-testid":"credit-pack","data-on":L||void 0,onClick:()=>W(n.id),children:[e.jsx(Ja,{}),e.jsx(Xa,{children:de(n.credits)}),e.jsxs(Za,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),e.jsxs(es,{children:[e.jsxs(ts,{children:[e.jsx(as,{}),e.jsx("span",{children:de((A==null?void 0:A.credits)??0)})]}),e.jsxs(ss,{children:["$",((A==null?void 0:A.usd)??0).toFixed(2)]})]}),e.jsxs(Mt,{children:[e.jsx(ke,{"data-variant":"outline",onClick:Y,children:a("buyModal.cancel")}),e.jsx(ke,{"data-variant":"gradient",onClick:D,children:a("buyModal.buy")})]})]})}const{colors:r,gradients:Tt,radius:Z}=le,It="@media (max-width: 1080px)",T="@media (max-width: 880px)",wt=i.div`
61
+ `,qs="https://cdn.decentraland.org/@dcl/shop/0.10.1-31028891267.commit-63bf5fc/_assets/buy-error-22UunaPC.png";function Bs(o){const{phase:l,balanceCredits:I,onClose:z}=o,W=l==="processing",D=l==="error"?a("cartCheckout.errorTitle"):l==="nofunds"?a("cartCheckout.titleNoFunds"):l==="choose"?a("buyModal.choosePayment"):a("cartCheckout.titleBuy"),Y=l==="processing";return e.jsxs(Ca,{role:"dialog","aria-modal":"true","aria-label":a("cartCheckout.dialogAria"),children:[e.jsx(ja,{onClick:W?void 0:z,"aria-hidden":!0}),e.jsxs(ka,{"data-tall":Y||void 0,children:[e.jsxs(Sa,{children:[e.jsxs($a,{children:[e.jsx(Ma,{children:D}),!W&&e.jsx(Ta,{onClick:z,"aria-label":a("buyModal.close"),children:e.jsx(Ia,{})})]}),e.jsxs(Pa,{children:[e.jsx(za,{children:l==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),e.jsx(gt,{}),e.jsx(Aa,{children:de(I)})]})]}),l==="choose"&&e.jsxs(je,{children:[e.jsxs(Es,{children:[e.jsx("span",{children:a("cart.purchaseSummary")}),e.jsxs("strong",{children:[e.jsx(gt,{}),de(o.totalCredits??0)]})]}),e.jsx($t,{options:o.options??[],totalCents:o.totalCents??0,onPay:o.onPay??(()=>{}),rateNote:(()=>{const A=Ea(o.totalCents??0,o.totalManaWei??0n);return A!=null?a("buyModal.manaRate",{mana:A.toLocaleString("en",{maximumFractionDigits:2})}):null})()})]}),l==="processing"&&e.jsx(Rs,{stage:o.stage??"reserving",step:o.step??1,total:o.total??1,isSelfCustody:!!o.isSelfCustody,signatures:o.signatures}),l==="nofunds"&&e.jsx(_s,{lines:o.lines??[],shortfallCredits:o.shortfallCredits??0,packs:o.packs??[],selectedPack:o.selectedPack??"",onSelectPack:o.onSelectPack??(()=>{}),onBuyPacks:o.onBuyPacks??(()=>{}),onCancel:z}),l==="error"&&e.jsxs(je,{children:[e.jsxs(qa,{"data-testid":"buy-error",children:[e.jsx(Ba,{src:qs,alt:"",width:64,height:80}),e.jsxs(Ra,{children:[e.jsx("b",{children:a("cartCheckout.errorHeadline")})," ",o.message??a("cartCheckout.errorBody")]})]}),e.jsxs(Mt,{children:[e.jsx(ke,{"data-variant":"outline",onClick:z,children:a("buyModal.cancel")}),e.jsx(ke,{"data-variant":"purple",onClick:o.onRetry??z,children:a("cartCheckout.tryAgain")})]})]})]})]})}function Rs({stage:o,step:l,total:I,isSelfCustody:z,signatures:W}){const D=o==="reserving",Y=I>0?Math.min(100,Math.round(l/I*100)):0,A=z&&W&&W.total>1,ne=o==="awaiting-signature"?z?A?a("cartCheckout.confirmMultiple",{current:W.current,total:W.total}):a("buyModal.confirmToContinue"):a("buyModal.completingTransaction"):o==="settling"?a("buyModal.completingTransaction"):a("cartCheckout.preparing");return e.jsxs(je,{"data-processing":!0,children:[e.jsx(_a,{src:ta,alt:"",width:61,height:61}),e.jsx(Wa,{children:ne}),D?e.jsxs(Is,{children:[e.jsx(xt,{"aria-hidden":!0,children:e.jsx(mt,{"data-step":!0,style:{width:`${Y}%`}})}),I>1?e.jsxs(Ps,{children:[l,"/",I]}):null]}):e.jsx(xt,{"aria-hidden":!0,children:e.jsx(mt,{})})]})}function _s({lines:o,shortfallCredits:l,packs:I,selectedPack:z,onSelectPack:W,onBuyPacks:D,onCancel:Y}){const A=I.find(n=>n.id===z),ne=o.reduce((n,L)=>n+(L.quantity??1),0);return e.jsxs(je,{children:[e.jsxs(Fa,{"data-testid":"nofunds-warning",children:[e.jsx(La,{}),e.jsxs(Ka,{children:[e.jsx("b",{children:a("buyModal.insufficientFunds")})," ",a("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:a("buyModal.warningCreditsAmount",{count:Math.max(0,l)})})," ",a("buyModal.warningToPurchase",{count:ne})]})]}),e.jsx(zs,{children:o.map(n=>{const L=n.quantity??1;return e.jsxs(Ua,{children:[e.jsx(Na,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsxs(Qa,{children:[e.jsxs("div",{children:[e.jsxs(Ha,{title:n.item.name,children:[n.item.name||a("buyModal.itemFallback"),L>1?e.jsx(As,{children:a("cartCheckout.qty",{count:L})}):null]}),n.item.creator?e.jsx(Oa,{address:n.item.creator}):null]}),e.jsxs(Va,{children:[e.jsx(Ga,{}),e.jsx("span",{children:de(n.priceCredits*L)})]})]})]},n.item.id)})}),e.jsx(Da,{children:I.map(n=>{const L=n.id===z;return e.jsxs(Ya,{"data-testid":"credit-pack","data-on":L||void 0,onClick:()=>W(n.id),children:[e.jsx(Ja,{}),e.jsx(Xa,{children:de(n.credits)}),e.jsxs(Za,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),e.jsxs(es,{children:[e.jsxs(ts,{children:[e.jsx(as,{}),e.jsx("span",{children:de((A==null?void 0:A.credits)??0)})]}),e.jsxs(ss,{children:["$",((A==null?void 0:A.usd)??0).toFixed(2)]})]}),e.jsxs(Mt,{children:[e.jsx(ke,{"data-variant":"outline",onClick:Y,children:a("buyModal.cancel")}),e.jsx(ke,{"data-variant":"gradient",onClick:D,children:a("buyModal.buy")})]})]})}const{colors:r,gradients:Tt,radius:Z}=le,It="@media (max-width: 1080px)",T="@media (max-width: 880px)",wt=i.div`
62
62
  max-width: 1510px;
63
63
  margin: 0 auto;
64
64
  /* Grows into the page's leftover height and passes it down to Upsell, so the white cross-sell band ends at
@@ -1,4 +1,4 @@
1
- import{ad as N,ae as w,af as o,ag as n,ah as D,w as M}from"./index-BW8VN255.js";import{r as U,j as g}from"./react-OEOSdkUk.js";import{g as z,a as E,c as I,b as F}from"./clsx-WwvpwSg0.js";import{s as v}from"./styled-BwTnkdpv.js";function K(r){return z("MuiCircularProgress",r)}E("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const W=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,P,b,S,$;const t=44,B=M(P||(P=l`
1
+ import{ah as N,ai as w,aj as o,ak as n,K as D,w as M}from"./index-CUmtcNQg.js";import{r as U,j as g}from"./react-BYHuwl8r.js";import{g as z,a as E,c as I,b as K}from"./clsx-WwvpwSg0.js";import{s as v}from"./styled-D5sI5T5A.js";function F(r){return z("MuiCircularProgress",r)}E("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const W=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,P,b,S,$;const t=44,B=M(P||(P=l`
2
2
  0% {
3
3
  transform: rotate(0deg);
4
4
  }
@@ -21,8 +21,8 @@ import{ad as N,ae as w,af as o,ag as n,ah as D,w as M}from"./index-BW8VN255.js";
21
21
  stroke-dasharray: 100px, 200px;
22
22
  stroke-dashoffset: -125px;
23
23
  }
24
- `)),L=r=>{const{classes:e,variant:s,color:a,disableShrink:d}=r,m={root:["root",s,`color${n(a)}`],svg:["svg"],circle:["circle",`circle${n(s)}`,d&&"circleDisableShrink"]};return F(m,K,e)},V=v("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(r,e)=>{const{ownerState:s}=r;return[e.root,e[s.variant],e[`color${n(s.color)}`]]}})(({ownerState:r,theme:e})=>o({display:"inline-block"},r.variant==="determinate"&&{transition:e.transitions.create("transform")},r.color!=="inherit"&&{color:(e.vars||e).palette[r.color].main}),({ownerState:r})=>r.variant==="indeterminate"&&D(S||(S=l`
24
+ `)),L=r=>{const{classes:e,variant:s,color:a,disableShrink:d}=r,m={root:["root",s,`color${n(a)}`],svg:["svg"],circle:["circle",`circle${n(s)}`,d&&"circleDisableShrink"]};return K(m,F,e)},V=v("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(r,e)=>{const{ownerState:s}=r;return[e.root,e[s.variant],e[`color${n(s.color)}`]]}})(({ownerState:r,theme:e})=>o({display:"inline-block"},r.variant==="determinate"&&{transition:e.transitions.create("transform")},r.color!=="inherit"&&{color:(e.vars||e).palette[r.color].main}),({ownerState:r})=>r.variant==="indeterminate"&&D(S||(S=l`
25
25
  animation: ${0} 1.4s linear infinite;
26
26
  `),B)),Z=v("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(r,e)=>e.svg})({display:"block"}),q=v("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(r,e)=>{const{ownerState:s}=r;return[e.circle,e[`circle${n(s.variant)}`],s.disableShrink&&e.circleDisableShrink]}})(({ownerState:r,theme:e})=>o({stroke:"currentColor"},r.variant==="determinate"&&{transition:e.transitions.create("stroke-dashoffset")},r.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:r})=>r.variant==="indeterminate"&&!r.disableShrink&&D($||($=l`
27
27
  animation: ${0} 1.4s ease-in-out infinite;
28
- `),G)),Q=U.forwardRef(function(e,s){const a=N({props:e,name:"MuiCircularProgress"}),{className:d,color:m="primary",disableShrink:R=!1,size:u=40,style:_,thickness:i=3.6,value:f=0,variant:k="indeterminate"}=a,j=w(a,W),c=o({},a,{color:m,disableShrink:R,size:u,thickness:i,value:f,variant:k}),p=L(c),h={},x={},y={};if(k==="determinate"){const C=2*Math.PI*((t-i)/2);h.strokeDasharray=C.toFixed(3),y["aria-valuenow"]=Math.round(f),h.strokeDashoffset=`${((100-f)/100*C).toFixed(3)}px`,x.transform="rotate(-90deg)"}return g.jsx(V,o({className:I(p.root,d),style:o({width:u,height:u},x,_),ownerState:c,ref:s,role:"progressbar"},y,j,{children:g.jsx(Z,{className:p.svg,ownerState:c,viewBox:`${t/2} ${t/2} ${t} ${t}`,children:g.jsx(q,{className:p.circle,style:h,ownerState:c,cx:t,cy:t,r:(t-i)/2,fill:"none",strokeWidth:i})})}))});export{Q as C};
28
+ `),G)),Q=U.forwardRef(function(e,s){const a=N({props:e,name:"MuiCircularProgress"}),{className:d,color:m="primary",disableShrink:R=!1,size:u=40,style:_,thickness:i=3.6,value:p=0,variant:k="indeterminate"}=a,j=w(a,W),c=o({},a,{color:m,disableShrink:R,size:u,thickness:i,value:p,variant:k}),f=L(c),h={},x={},y={};if(k==="determinate"){const C=2*Math.PI*((t-i)/2);h.strokeDasharray=C.toFixed(3),y["aria-valuenow"]=Math.round(p),h.strokeDashoffset=`${((100-p)/100*C).toFixed(3)}px`,x.transform="rotate(-90deg)"}return g.jsx(V,o({className:I(f.root,d),style:o({width:u,height:u},x,_),ownerState:c,ref:s,role:"progressbar"},y,j,{children:g.jsx(Z,{className:f.svg,ownerState:c,viewBox:`${t/2} ${t/2} ${t} ${t}`,children:g.jsx(q,{className:f.circle,style:h,ownerState:c,cx:t,cy:t,r:(t-i)/2,fill:"none",strokeWidth:i})})}))});export{Q as C};
@@ -1,4 +1,4 @@
1
- import{j as e,r as h,a as J,e as X}from"./react-OEOSdkUk.js";import{t as b,s,bs as ee,Y as te,D as T,bt as ae,bu as oe,I as ie,b as a,c as re,F as se,v as ne,x as ce,C as le,am as z,an as de,bv as pe,bw as xe}from"./index-BW8VN255.js";import{E as me}from"./ErrorNotice-C2_MEmWZ.js";import{d as he,P as ue,C as ge,a as be,b as fe,A as ve}from"./collectionPage.styles-CL3J1bKl.js";import{S as L,C as je,F as ye,c as we,P as Ce,d as $e,H as ke,e as Ne}from"./categories-CTfgPgaL.js";import{L as Pe}from"./LoadMore-rF0It0W-.js";import{u as Se}from"./useInfiniteGrid-BWxEC1lm.js";import{G as Ae}from"./grid.styles-BpaaGITL.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-B60WY-np.js";import"./ethers-lk3HAbPB.js";import"./intl-CBcMB1D2.js";const Me=s.section`
1
+ import{j as e,r as h,d as J,b as X}from"./react-BYHuwl8r.js";import{t as b,s,bs as ee,a1 as te,D as T,bt as ae,bu as oe,I as ie,b as a,c as re,F as se,v as ne,x as ce,C as le,ap as z,aq as de,bv as pe,bw as xe}from"./index-CUmtcNQg.js";import{E as me}from"./ErrorNotice-D9o1yt7T.js";import{d as he,P as ue,C as ge,a as be,b as fe,A as ve}from"./collectionPage.styles-e4lCCPp2.js";import{S as L,C as je,F as ye,c as we,P as Ce,d as $e,H as ke,e as Ne}from"./categories-BCX_N_OH.js";import{L as Pe}from"./LoadMore-DlOSOVSy.js";import{u as Se}from"./useInfiniteGrid-DrCCmf1M.js";import{G as Ae}from"./grid.styles-hnDNWobS.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";const Me=s.section`
2
2
  position: relative;
3
3
  border-radius: ${b.radius.card};
4
4
  overflow: hidden;
@@ -132,7 +132,7 @@ import{j as e,r as h,a as J,e as X}from"./react-OEOSdkUk.js";import{t as b,s,bs
132
132
  ${$.maxWidth("lg")} {
133
133
  width: 100%;
134
134
  }
135
- `,Ye=s.aside`
135
+ `,qe=s.aside`
136
136
  flex: none;
137
137
  width: 265px;
138
138
 
@@ -159,4 +159,4 @@ import{j as e,r as h,a as J,e as X}from"./react-OEOSdkUk.js";import{t as b,s,bs
159
159
  visibility: visible;
160
160
  }
161
161
  }
162
- `,qe=48;function it(){var R;const{contractAddress:o}=J(),t=X(),[n,d]=h.useState("wearable"),[p,u]=h.useState(null),[g,f]=h.useState([]),[x,v]=h.useState(""),[l,y]=h.useState(""),[k,W]=h.useState("newest"),N=x&&!Number.isNaN(Number(x))?Number(x):void 0,P=l&&!Number.isNaN(Number(l))?Number(l):void 0,_=p?Ne[p]:void 0,G=(L.find(i=>i.key===k)??L[0]).server,S={category:n,rarities:g.length?g:void 0,wearableCategories:_,minPriceCredits:N,maxPriceCredits:P,sortBy:G},{items:j,total:H,isLoading:w,error:A,hasNextPage:U,isFetchingNextPage:M,isFetchNextPageError:Y,fetchNextPage:q}=Se(["collection-page",o,S],i=>pe(o,{...S,first:qe,skip:i}),{enabled:!!o}),{data:r}=ne({queryKey:["collection-meta",o],queryFn:()=>xe(o),enabled:!!o,staleTime:5*6e4}),E=(r==null?void 0:r.name)||a("collection.fallbackTitle");ce({title:r==null?void 0:r.name,description:r!=null&&r.name?a("seo.collection.description",{name:r.name}):void 0});const F=(r==null?void 0:r.creator)||((R=j[0])==null?void 0:R.creator);function D(i){d(i),u(null)}function K(i){f(m=>m.includes(i)?m.filter(Z=>Z!==i):[...m,i])}function O(){d("wearable"),u(null),f([]),v(""),y("")}const C=!!(N||P),Q=C?`${x||"0"}–${l||"∞"}`:a("filter.price"),V=n!=="wearable"||!!p||g.length>0||C;return e.jsxs(ue,{"data-testid":"collection-page",children:[e.jsxs(ge,{"aria-label":a("collection.breadcrumbAria"),children:[e.jsx(be,{onClick:()=>t("/items"),children:a("collection.breadcrumb")}),e.jsx("span",{children:"/"}),e.jsx(fe,{children:E})]}),e.jsx(ze,{name:E,creator:F}),e.jsxs(He,{"data-testid":"browse",children:[e.jsxs(Ye,{"data-testid":"browse-sidebar",children:[e.jsx(_e,{address:F}),e.jsx(je,{category:n,subCategory:p,onCategory:D,onSub:u,title:a("collection.category"),flat:!0})]}),e.jsxs(Ue,{children:[!w&&j.length>0?e.jsx(ve,{items:j,source:"collection"}):null,e.jsx(ye,{rarities:g,onToggleRarity:K,sort:k,onSort:W,total:H,loading:w,anyActive:V,onClear:O,renderTrailing:i=>e.jsx(we,{panelKey:"price",label:Q,active:C,panel:i,children:e.jsxs(Ce,{"data-variant":"price",children:[e.jsxs($e,{children:[e.jsx("input",{type:"number",min:"0","aria-label":a("collection.priceMin"),placeholder:a("collection.priceMinPlaceholder"),value:x,onChange:m=>v(m.target.value)}),e.jsx("span",{children:"–"}),e.jsx("input",{type:"number",min:"0","aria-label":a("collection.priceMax"),placeholder:a("collection.priceMaxPlaceholder"),value:l,onChange:m=>y(m.target.value)})]}),e.jsx(ke,{children:a("collection.priceHint",{currency:le.name})})]})})}),A?e.jsx(me,{message:a("collection.error")}):null,e.jsx(Ae,{"data-testid":"grid",children:w?e.jsx(z,{count:15}):e.jsxs(e.Fragment,{children:[j.map(i=>e.jsx(de,{item:i},i.id)),M?e.jsx(z,{count:6}):null]})}),e.jsx(Pe,{hasNextPage:U,isFetching:M,isError:Y,onLoadMore:()=>void q()}),!w&&!A&&j.length===0?e.jsx("p",{className:"muted",children:a("collection.empty")}):null]})]})]})}export{it as Collection,it as default};
162
+ `,Ye=48;function it(){var R;const{contractAddress:o}=J(),t=X(),[n,d]=h.useState("wearable"),[p,u]=h.useState(null),[g,f]=h.useState([]),[x,v]=h.useState(""),[l,y]=h.useState(""),[k,W]=h.useState("newest"),N=x&&!Number.isNaN(Number(x))?Number(x):void 0,P=l&&!Number.isNaN(Number(l))?Number(l):void 0,_=p?Ne[p]:void 0,G=(L.find(i=>i.key===k)??L[0]).server,S={category:n,rarities:g.length?g:void 0,wearableCategories:_,minPriceCredits:N,maxPriceCredits:P,sortBy:G},{items:j,total:H,isLoading:w,error:A,hasNextPage:U,isFetchingNextPage:M,isFetchNextPageError:q,fetchNextPage:Y}=Se(["collection-page",o,S],i=>pe(o,{...S,first:Ye,skip:i}),{enabled:!!o}),{data:r}=ne({queryKey:["collection-meta",o],queryFn:()=>xe(o),enabled:!!o,staleTime:5*6e4}),E=(r==null?void 0:r.name)||a("collection.fallbackTitle");ce({title:r==null?void 0:r.name,description:r!=null&&r.name?a("seo.collection.description",{name:r.name}):void 0});const F=(r==null?void 0:r.creator)||((R=j[0])==null?void 0:R.creator);function D(i){d(i),u(null)}function K(i){f(m=>m.includes(i)?m.filter(Z=>Z!==i):[...m,i])}function O(){d("wearable"),u(null),f([]),v(""),y("")}const C=!!(N||P),Q=C?`${x||"0"}–${l||"∞"}`:a("filter.price"),V=n!=="wearable"||!!p||g.length>0||C;return e.jsxs(ue,{"data-testid":"collection-page",children:[e.jsxs(ge,{"aria-label":a("collection.breadcrumbAria"),children:[e.jsx(be,{onClick:()=>t("/items"),children:a("collection.breadcrumb")}),e.jsx("span",{children:"/"}),e.jsx(fe,{children:E})]}),e.jsx(ze,{name:E,creator:F}),e.jsxs(He,{"data-testid":"browse",children:[e.jsxs(qe,{"data-testid":"browse-sidebar",children:[e.jsx(_e,{address:F}),e.jsx(je,{category:n,subCategory:p,onCategory:D,onSub:u,title:a("collection.category"),flat:!0})]}),e.jsxs(Ue,{children:[!w&&j.length>0?e.jsx(ve,{items:j,source:"collection"}):null,e.jsx(ye,{rarities:g,onToggleRarity:K,sort:k,onSort:W,total:H,loading:w,anyActive:V,onClear:O,renderTrailing:i=>e.jsx(we,{panelKey:"price",label:Q,active:C,panel:i,children:e.jsxs(Ce,{"data-variant":"price",children:[e.jsxs($e,{children:[e.jsx("input",{type:"number",min:"0","aria-label":a("collection.priceMin"),placeholder:a("collection.priceMinPlaceholder"),value:x,onChange:m=>v(m.target.value)}),e.jsx("span",{children:"–"}),e.jsx("input",{type:"number",min:"0","aria-label":a("collection.priceMax"),placeholder:a("collection.priceMaxPlaceholder"),value:l,onChange:m=>y(m.target.value)})]}),e.jsx(ke,{children:a("collection.priceHint",{currency:le.name})})]})})}),A?e.jsx(me,{message:a("collection.error")}):null,e.jsx(Ae,{"data-testid":"grid",children:w?e.jsx(z,{count:15}):e.jsxs(e.Fragment,{children:[j.map(i=>e.jsx(de,{item:i},i.id)),M?e.jsx(z,{count:6}):null]})}),e.jsx(Pe,{hasNextPage:U,isFetching:M,isError:q,onLoadMore:()=>void Y()}),!w&&!A&&j.length===0?e.jsx("p",{className:"muted",children:a("collection.empty")}):null]})]})]})}export{it as Collection,it as default};
@@ -1,4 +1,4 @@
1
- import{j as t,r as v}from"./react-OEOSdkUk.js";import{s as e,t as o,b as f,z as k,aD as j,bV as C,C as G,w as Y,I as Q,F as X,g as W,h as B,f as Z,ap as q,a5 as J,bZ as F,an as ee}from"./index-BW8VN255.js";import{s as te,f as U,A as H,g as D,r as ne,m as ae,i as ie,j as oe}from"./authorizations-oq_PkaKX.js";import{i as se}from"./errors-BM_aT-FG.js";import{E as re}from"./ErrorNotice-C2_MEmWZ.js";import{l as ce,m as de,n as le}from"./buy-BbDdxACJ.js";import{s as pe,M as he,E as ue}from"./sendMetaTransaction-CbAkDxFC.js";import{I as xe,C as ge}from"./ethers-lk3HAbPB.js";const R="shop:resume_after_signin",fe=900*1e3;function ct(a){try{sessionStorage.setItem(R,JSON.stringify({...a,at:Date.now()}))}catch{}}function dt(a){let n;try{n=sessionStorage.getItem(R)}catch{return null}if(!n)return null;try{sessionStorage.removeItem(R)}catch{}let i;try{i=JSON.parse(n)}catch{return null}return!i||i.type!==a||typeof i.at!="number"||Date.now()-i.at>fe?null:i.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:i.path}}function me(a,n){return(a+n-1n)/n}function be(a,n,i){return a<=0||n<=0?0n:a>=n?i:me(i*BigInt(a),BigInt(n))}function lt(a){var b,y,w;const n=Number.isFinite(a.priceCents)?Math.max(0,Math.trunc(a.priceCents)):0,i=Number.isFinite(a.balanceCents)?Math.max(0,Math.trunc(a.balanceCents)):0,s=a.priceManaWei>0n?a.priceManaWei:0n,l=a.manaBalanceWei>0n?a.manaBalanceWei:0n;if(n<=0)return{options:[],preferred:null,manaShortfall:null};const c=[];if(i>=n&&c.push({method:"credits",creditsCents:n,manaWei:0n}),s>0n&&i>0&&i<n){const d=n-i,m=be(d,n,s);l>=m&&c.push({method:"combined",creditsCents:i,manaWei:m})}s>0n&&l>=s&&c.push({method:"mana",creditsCents:0,manaWei:s});const p=((b=c.find(d=>d.method==="credits"))==null?void 0:b.method)??((y=c.find(d=>d.method==="combined"))==null?void 0:y.method)??((w=c.find(d=>d.method==="mana"))==null?void 0:w.method)??null,u=!c.some(d=>d.method==="mana"||d.method==="combined")&&s>0n&&l>0n?{manaWei:l,manaCents:ye(l,n,s),priceCents:n}:null;return{options:c,preferred:p,manaShortfall:u}}function ye(a,n,i){return Number(a*BigInt(n)/i)}function pt(a,n){let i=Number.isFinite(n)?Math.max(0,Math.trunc(n)):0;return a.map(s=>{const l=Number.isFinite(s)?Math.max(0,Math.trunc(s)):0,c=Math.min(l,i);return i-=c,c})}function z(a){return Number.isFinite(a)?Math.max(0,a)/10:0}function ht(a,n){return a.options.find(i=>i.method===n)??null}function ut(a,n){if(!Number.isFinite(a)||a<=0||n<=0n)return null;const i=a/10;return Number(n)/1e18/i}const T="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",we=e.div`
1
+ import{j as t,r as v}from"./react-BYHuwl8r.js";import{s as e,t as o,b as f,z as k,L as j,bV as C,C as G,w as Y,I as Q,F as X,g as W,h as B,f as Z,as as q,a9 as J,bZ as F,aq as ee}from"./index-CUmtcNQg.js";import{s as te,f as U,A as H,g as K,r as ne,m as ae,i as ie,j as oe}from"./authorizations-C81yJZo1.js";import{i as se}from"./errors-COdt9pAA.js";import{E as re}from"./ErrorNotice-D9o1yt7T.js";import{l as ce,m as de,n as le}from"./buy-DEfmn-X_.js";import{s as pe,M as he,E as ue}from"./sendMetaTransaction-Bn0IbhJL.js";import{I as xe,C as ge}from"./ethers-BDpbhgX6.js";const L="shop:resume_after_signin",fe=900*1e3;function ct(a){try{sessionStorage.setItem(L,JSON.stringify({...a,at:Date.now()}))}catch{}}function dt(a){let n;try{n=sessionStorage.getItem(L)}catch{return null}if(!n)return null;try{sessionStorage.removeItem(L)}catch{}let i;try{i=JSON.parse(n)}catch{return null}return!i||i.type!==a||typeof i.at!="number"||Date.now()-i.at>fe?null:i.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:i.path}}function me(a,n){return(a+n-1n)/n}function be(a,n,i){return a<=0||n<=0?0n:a>=n?i:me(i*BigInt(a),BigInt(n))}function lt(a){var b,y,w;const n=Number.isFinite(a.priceCents)?Math.max(0,Math.trunc(a.priceCents)):0,i=Number.isFinite(a.balanceCents)?Math.max(0,Math.trunc(a.balanceCents)):0,s=a.priceManaWei>0n?a.priceManaWei:0n,l=a.manaBalanceWei>0n?a.manaBalanceWei:0n;if(n<=0)return{options:[],preferred:null,manaShortfall:null};const c=[];if(i>=n&&c.push({method:"credits",creditsCents:n,manaWei:0n}),s>0n&&i>0&&i<n){const d=n-i,m=be(d,n,s);l>=m&&c.push({method:"combined",creditsCents:i,manaWei:m})}s>0n&&l>=s&&c.push({method:"mana",creditsCents:0,manaWei:s});const p=((b=c.find(d=>d.method==="credits"))==null?void 0:b.method)??((y=c.find(d=>d.method==="combined"))==null?void 0:y.method)??((w=c.find(d=>d.method==="mana"))==null?void 0:w.method)??null,u=!c.some(d=>d.method==="mana"||d.method==="combined")&&s>0n&&l>0n?{manaWei:l,manaCents:ye(l,n,s),priceCents:n}:null;return{options:c,preferred:p,manaShortfall:u}}function ye(a,n,i){return Number(a*BigInt(n)/i)}function pt(a,n){let i=Number.isFinite(n)?Math.max(0,Math.trunc(n)):0;return a.map(s=>{const l=Number.isFinite(s)?Math.max(0,Math.trunc(s)):0,c=Math.min(l,i);return i-=c,c})}function z(a){return Number.isFinite(a)?Math.max(0,a)/10:0}function ht(a,n){return a.options.find(i=>i.method===n)??null}function ut(a,n){if(!Number.isFinite(a)||a<=0||n<=0n)return null;const i=a/10;return Number(n)/1e18/i}const T="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",we=e.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 12px;
@@ -206,11 +206,11 @@ import{j as t,r as v}from"./react-OEOSdkUk.js";import{s as e,t as o,b as f,z as
206
206
  `,Be=e.span`
207
207
  font-weight: 700;
208
208
  color: ${o.colors.text};
209
- `,Re=e.span`
209
+ `,Le=e.span`
210
210
  font-size: 13px;
211
211
  line-height: 1.45;
212
212
  color: ${o.colors.muted};
213
- `,Le=e.p`
213
+ `,Re=e.p`
214
214
  margin: 0;
215
215
  font-size: 12px;
216
216
  line-height: 1.5;
@@ -248,7 +248,7 @@ import{j as t,r as v}from"./react-OEOSdkUk.js";import{s as e,t as o,b as f,z as
248
248
  outline: 2px solid ${o.colors.accent};
249
249
  outline-offset: 2px;
250
250
  }
251
- `,De=e.button`
251
+ `,Ke=e.button`
252
252
  flex: 1 1 0;
253
253
  display: inline-flex;
254
254
  align-items: center;
@@ -278,7 +278,7 @@ import{j as t,r as v}from"./react-OEOSdkUk.js";import{s as e,t as o,b as f,z as
278
278
  outline: 2px solid ${o.colors.accent};
279
279
  outline-offset: 2px;
280
280
  }
281
- `,Ke=e.span`
281
+ `,De=e.span`
282
282
  width: 16px;
283
283
  height: 16px;
284
284
  border-radius: 50%;
@@ -289,7 +289,7 @@ import{j as t,r as v}from"./react-OEOSdkUk.js";import{s as e,t as o,b as f,z as
289
289
  @media (prefers-reduced-motion: reduce) {
290
290
  animation: none;
291
291
  }
292
- `;function ft({auth:a,signer:n,title:i,reason:s,name:l,image:c,icon:p,onAuthorized:x,onCancel:u,onClose:b}){const[y,w]=v.useState(!1),[d,m]=v.useState(null);async function $(){w(!0),m(null);try{await te({auth:a,signer:n,active:!0}),x()}catch(h){se(h)?m(f("authorizeStep.errorRejected")):(X(h,{flow:"authorize_step",kind:a.kind}),m(f("authorizeStep.errorGeneric"))),w(!1)}}return t.jsx(Me,{onClick:y?void 0:b,role:"presentation",children:t.jsxs(Ae,{onClick:h=>h.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i,children:[t.jsxs(We,{children:[t.jsx(Ie,{children:i}),t.jsx(Se,{onClick:b,disabled:y,"aria-label":f("authorizeStep.close"),children:t.jsx(Q,{name:"close",className:"ico"})})]}),t.jsxs(Te,{"data-testid":"authorize-step-row",children:[t.jsx(Ne,{children:c?t.jsx("img",{src:c,alt:""}):p}),t.jsxs(Ee,{children:[t.jsx(Be,{title:l,children:l}),t.jsx(Re,{children:s})]})]}),t.jsx(Le,{children:f("authorizeStep.note")}),t.jsx(re,{message:d}),t.jsxs(Pe,{children:[t.jsx(Fe,{type:"button",onClick:u,disabled:y,children:f("authorizeStep.cancel")}),t.jsx(De,{type:"button","data-testid":"authorize-step-action",onClick:()=>void $(),disabled:y,children:y?t.jsxs(t.Fragment,{children:[t.jsx(Ke,{"aria-hidden":!0}),f("authorizeStep.authorizing")]}):f("authorizeStep.authorize")})]})]})})}async function mt(a){const[n]=await Qe({...a,trades:[a.trade]});return n}async function Qe(a){const{trades:n,buyer:i,signer:s,onSigned:l}=a;if(n.length===0)throw new Error("No items to buy");const c=new Map;for(const x of n){const u=`${x.chainId}:${x.contract.toLowerCase()}`,b=c.get(u);b?b.push(x):c.set(u,[x])}const p=[];for(const x of c.values())p.push(await Ue({trades:x,buyer:i,signer:s,onSigned:l}));return p}async function Ue(a){const{trades:n,buyer:i,signer:s,onSigned:l}=a,c=n[0],p=W(Z(c.contract),c.chainId),x=W(B.MANAToken,c.chainId);await U({auth:{kind:H.Allowance,contractAddress:x.address,spenderAddress:p.address,chainId:c.chainId},signer:s});const u=n.map(d=>de(d,i));if(D.enabled)try{const d=new xe(p.abi).encodeFunctionData("accept",[u]),m=ne(),$=ae(s.provider,m),h=await pe($,m,d,p,{serverURL:D.relayerUrl});return l==null||l(),await ie(h,"the MANA purchase"),h}catch(d){if(d instanceof he&&d.code===ue.USER_DENIED||d instanceof oe)throw d;console.warn("[buyWithMana] gasless meta-tx failed, falling back to a direct tx:",d)}await q(s.provider,c.chainId);const y=await new ge(p.address,p.abi,s).accept(u,le(c.chainId));return l==null||l(),(await y.wait()).transactionHash}async function bt(a){const{trade:n,buyer:i,signer:s,credits:l,manaGapWei:c,onBroadcast:p,onReverted:x}=a;if(l.length===0)throw new Error("No credits to spend — use buyWithMana for a MANA-only purchase");if(c<=0n)throw new Error("No MANA gap to cover — use buyWithCredits for a credits-only purchase");const u=W(B.MANAToken,n.chainId),b=W(B.CreditsManager,n.chainId);await U({auth:{kind:H.Allowance,contractAddress:u.address,spenderAddress:b.address,chainId:n.chainId},signer:s});const w=(l.reduce((d,m)=>d+BigInt(m.availableAmount),0n)+c).toString();return ce({trade:n,buyer:i,signer:s,credits:l,maxCreditedValue:w,onBroadcast:p,onReverted:x})}function yt(a){return t.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,...a,children:t.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})}function wt(a){return t.jsxs("svg",{viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":!0,...a,children:[t.jsx("path",{d:"M12 3L2 20h20L12 3z",fill:"none",stroke:"#691fa9",strokeWidth:"1.8",strokeLinejoin:"round"}),t.jsx("path",{d:"M12 9v5",stroke:"#691fa9",strokeWidth:"1.8",strokeLinecap:"round"}),t.jsx("circle",{cx:"12",cy:"17",r:"1.1",fill:"#691fa9"})]})}const{colors:r,gradients:_,radius:O,z:He}=o,vt=e.div`
292
+ `;function ft({auth:a,signer:n,title:i,reason:s,name:l,image:c,icon:p,onAuthorized:x,onCancel:u,onClose:b}){const[y,w]=v.useState(!1),[d,m]=v.useState(null);async function $(){w(!0),m(null);try{await te({auth:a,signer:n,active:!0}),x()}catch(h){se(h)?m(f("authorizeStep.errorRejected")):(X(h,{flow:"authorize_step",kind:a.kind}),m(f("authorizeStep.errorGeneric"))),w(!1)}}return t.jsx(Me,{onClick:y?void 0:b,role:"presentation",children:t.jsxs(Ae,{onClick:h=>h.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i,children:[t.jsxs(We,{children:[t.jsx(Ie,{children:i}),t.jsx(Se,{onClick:b,disabled:y,"aria-label":f("authorizeStep.close"),children:t.jsx(Q,{name:"close",className:"ico"})})]}),t.jsxs(Te,{"data-testid":"authorize-step-row",children:[t.jsx(Ne,{children:c?t.jsx("img",{src:c,alt:""}):p}),t.jsxs(Ee,{children:[t.jsx(Be,{title:l,children:l}),t.jsx(Le,{children:s})]})]}),t.jsx(Re,{children:f("authorizeStep.note")}),t.jsx(re,{message:d}),t.jsxs(Pe,{children:[t.jsx(Fe,{type:"button",onClick:u,disabled:y,children:f("authorizeStep.cancel")}),t.jsx(Ke,{type:"button","data-testid":"authorize-step-action",onClick:()=>void $(),disabled:y,children:y?t.jsxs(t.Fragment,{children:[t.jsx(De,{"aria-hidden":!0}),f("authorizeStep.authorizing")]}):f("authorizeStep.authorize")})]})]})})}async function mt(a){const[n]=await Qe({...a,trades:[a.trade]});return n}async function Qe(a){const{trades:n,buyer:i,signer:s,onSigned:l}=a;if(n.length===0)throw new Error("No items to buy");const c=new Map;for(const x of n){const u=`${x.chainId}:${x.contract.toLowerCase()}`,b=c.get(u);b?b.push(x):c.set(u,[x])}const p=[];for(const x of c.values())p.push(await Ue({trades:x,buyer:i,signer:s,onSigned:l}));return p}async function Ue(a){const{trades:n,buyer:i,signer:s,onSigned:l}=a,c=n[0],p=W(Z(c.contract),c.chainId),x=W(B.MANAToken,c.chainId);await U({auth:{kind:H.Allowance,contractAddress:x.address,spenderAddress:p.address,chainId:c.chainId},signer:s});const u=n.map(d=>de(d,i));if(K.enabled)try{const d=new xe(p.abi).encodeFunctionData("accept",[u]),m=ne(),$=ae(s.provider,m),h=await pe($,m,d,p,{serverURL:K.relayerUrl});return l==null||l(),await ie(h,"the MANA purchase"),h}catch(d){if(d instanceof he&&d.code===ue.USER_DENIED||d instanceof oe)throw d;console.warn("[buyWithMana] gasless meta-tx failed, falling back to a direct tx:",d)}await q(s.provider,c.chainId);const y=await new ge(p.address,p.abi,s).accept(u,le(c.chainId));return l==null||l(),(await y.wait()).transactionHash}async function bt(a){const{trade:n,buyer:i,signer:s,credits:l,manaGapWei:c,onBroadcast:p,onReverted:x}=a;if(l.length===0)throw new Error("No credits to spend — use buyWithMana for a MANA-only purchase");if(c<=0n)throw new Error("No MANA gap to cover — use buyWithCredits for a credits-only purchase");const u=W(B.MANAToken,n.chainId),b=W(B.CreditsManager,n.chainId);await U({auth:{kind:H.Allowance,contractAddress:u.address,spenderAddress:b.address,chainId:n.chainId},signer:s});const w=(l.reduce((d,m)=>d+BigInt(m.availableAmount),0n)+c).toString();return ce({trade:n,buyer:i,signer:s,credits:l,maxCreditedValue:w,onBroadcast:p,onReverted:x})}function yt(a){return t.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,...a,children:t.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})}function wt(a){return t.jsxs("svg",{viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":!0,...a,children:[t.jsx("path",{d:"M12 3L2 20h20L12 3z",fill:"none",stroke:"#691fa9",strokeWidth:"1.8",strokeLinejoin:"round"}),t.jsx("path",{d:"M12 9v5",stroke:"#691fa9",strokeWidth:"1.8",strokeLinecap:"round"}),t.jsx("circle",{cx:"12",cy:"17",r:"1.1",fill:"#691fa9"})]})}const{colors:r,gradients:_,radius:O,z:He}=o,vt=e.div`
293
293
  position: fixed;
294
294
  inset: 0;
295
295
  z-index: ${He.overlay};
@@ -415,14 +415,14 @@ import{j as t,r as v}from"./react-OEOSdkUk.js";import{s as e,t as o,b as f,z as
415
415
  flex-direction: column;
416
416
  gap: 32px;
417
417
  padding: 8px;
418
- `,Rt=e.div`
418
+ `,Lt=e.div`
419
419
  font-size: 20px;
420
420
  font-weight: 600;
421
421
  line-height: 1.57;
422
422
  color: ${r.text};
423
423
  overflow: hidden;
424
424
  text-overflow: ellipsis;
425
- `,Lt=e(J)`
425
+ `,Rt=e(J)`
426
426
  font-size: 10px;
427
427
  line-height: 1.43;
428
428
  color: ${r.muted};
@@ -440,7 +440,7 @@ import{j as t,r as v}from"./react-OEOSdkUk.js";import{s as e,t as o,b as f,z as
440
440
  width: 24px;
441
441
  height: 24px;
442
442
  background: ${r.text2};
443
- `,Dt=e.div`
443
+ `,Kt=e.div`
444
444
  display: flex;
445
445
  align-items: center;
446
446
  gap: 8px;
@@ -448,7 +448,7 @@ import{j as t,r as v}from"./react-OEOSdkUk.js";import{s as e,t as o,b as f,z as
448
448
  background: rgba(255, 162, 90, 0.3);
449
449
  border-radius: ${O.btn};
450
450
  padding: 12px 8px;
451
- `,Kt=e.p`
451
+ `,Dt=e.p`
452
452
  margin: 0;
453
453
  font-size: 14px;
454
454
  line-height: 1.334;
@@ -698,7 +698,7 @@ import{j as t,r as v}from"./react-OEOSdkUk.js";import{s as e,t as o,b as f,z as
698
698
  transform: rotate(-90deg);
699
699
  `,Xe=e.div`
700
700
  position: relative;
701
- `,K=e.button`
701
+ `,D=e.button`
702
702
  position: absolute;
703
703
  top: 112px;
704
704
  transform: translateY(-50%);
@@ -801,4 +801,4 @@ import{j as t,r as v}from"./react-OEOSdkUk.js";import{s as e,t as o,b as f,z as
801
801
  opacity: 1;
802
802
  transform: scale(1.1);
803
803
  }
804
- `;function dn({title:a,items:n,onViewAll:i}){const s=v.useRef(null),[l,c]=v.useState(1),[p,x]=v.useState(0),[u,b]=v.useState(!0),[y,w]=v.useState(!1),d=v.useCallback(()=>{const h=s.current;if(!h)return;const{scrollLeft:g,scrollWidth:L,clientWidth:S}=h,P=Math.max(1,Math.ceil(L/S));c(P),x(Math.min(P-1,Math.round(g/S))),b(g<=1),w(g+S>=L-1)},[]);if(v.useEffect(()=>{d();const h=s.current;if(h)return h.addEventListener("scroll",d,{passive:!0}),window.addEventListener("resize",d),()=>{h.removeEventListener("scroll",d),window.removeEventListener("resize",d)}},[d,n.length]),n.length===0)return null;function m(h){const g=s.current;g&&g.scrollBy({left:h*g.clientWidth,behavior:"smooth"})}function $(h){const g=s.current;g&&g.scrollTo({left:h*g.clientWidth,behavior:"smooth"})}return t.jsxs(Ve,{children:[t.jsxs(_e,{children:[t.jsx(Oe,{children:a}),i?t.jsxs(Ge,{onClick:i,children:[f("collectionCarousel.viewAll"),t.jsx(Ye,{name:"chevron-down",size:16})]}):null]}),t.jsxs(Xe,{children:[t.jsx(K,{"data-side":"left",onClick:()=>m(-1),"aria-label":f("collectionCarousel.scrollLeft"),disabled:u,children:t.jsx("img",{src:F,alt:"","aria-hidden":!0})}),t.jsx(Ze,{ref:s,children:n.map(h=>t.jsx(ee,{item:h},h.id))}),t.jsx(K,{"data-side":"right",onClick:()=>m(1),"aria-label":f("collectionCarousel.scrollRight"),disabled:y,children:t.jsx("img",{src:F,alt:"","aria-hidden":!0})})]}),l>1?t.jsx(qe,{"aria-label":f("collectionCarousel.pages"),children:Array.from({length:l}).map((h,g)=>t.jsx(Je,{"data-active":g===p||void 0,"aria-label":f("collectionCarousel.goToPage",{page:g+1}),"aria-current":g===p?"true":void 0,onClick:()=>$(g)},g))}):null]})}export{z as $,Nt as A,At as B,$t as C,Vt as D,_t as E,Ot as F,Gt as G,jt as H,Yt as I,Xt as J,lt as K,Jt as L,vt as M,dt as N,dn as O,xt as P,ft as Q,T as R,kt as S,zt as T,ct as U,gt as V,Dt as W,Mt as X,Qe as Y,pt as Z,be as _,Ct as a,rn as a0,cn as a1,mt as a2,ht as a3,bt as a4,yt as b,Wt as c,It as d,St as e,Tt as f,en as g,tn as h,nn as i,Zt as j,qt as k,an as l,ut as m,on as n,sn as o,wt as p,Kt as q,Et as r,Bt as s,Rt as t,Lt as u,Pt as v,Ft as w,Qt as x,Ut as y,Ht as z};
804
+ `;function dn({title:a,items:n,onViewAll:i}){const s=v.useRef(null),[l,c]=v.useState(1),[p,x]=v.useState(0),[u,b]=v.useState(!0),[y,w]=v.useState(!1),d=v.useCallback(()=>{const h=s.current;if(!h)return;const{scrollLeft:g,scrollWidth:R,clientWidth:S}=h,P=Math.max(1,Math.ceil(R/S));c(P),x(Math.min(P-1,Math.round(g/S))),b(g<=1),w(g+S>=R-1)},[]);if(v.useEffect(()=>{d();const h=s.current;if(h)return h.addEventListener("scroll",d,{passive:!0}),window.addEventListener("resize",d),()=>{h.removeEventListener("scroll",d),window.removeEventListener("resize",d)}},[d,n.length]),n.length===0)return null;function m(h){const g=s.current;g&&g.scrollBy({left:h*g.clientWidth,behavior:"smooth"})}function $(h){const g=s.current;g&&g.scrollTo({left:h*g.clientWidth,behavior:"smooth"})}return t.jsxs(Ve,{children:[t.jsxs(_e,{children:[t.jsx(Oe,{children:a}),i?t.jsxs(Ge,{onClick:i,children:[f("collectionCarousel.viewAll"),t.jsx(Ye,{name:"chevron-down",size:16})]}):null]}),t.jsxs(Xe,{children:[t.jsx(D,{"data-side":"left",onClick:()=>m(-1),"aria-label":f("collectionCarousel.scrollLeft"),disabled:u,children:t.jsx("img",{src:F,alt:"","aria-hidden":!0})}),t.jsx(Ze,{ref:s,children:n.map(h=>t.jsx(ee,{item:h},h.id))}),t.jsx(D,{"data-side":"right",onClick:()=>m(1),"aria-label":f("collectionCarousel.scrollRight"),disabled:y,children:t.jsx("img",{src:F,alt:"","aria-hidden":!0})})]}),l>1?t.jsx(qe,{"aria-label":f("collectionCarousel.pages"),children:Array.from({length:l}).map((h,g)=>t.jsx(Je,{"data-active":g===p||void 0,"aria-label":f("collectionCarousel.goToPage",{page:g+1}),"aria-current":g===p?"true":void 0,onClick:()=>$(g)},g))}):null]})}export{z as $,Nt as A,At as B,$t as C,Vt as D,_t as E,Ot as F,Gt as G,jt as H,Yt as I,Xt as J,lt as K,Jt as L,vt as M,dt as N,dn as O,xt as P,ft as Q,T as R,kt as S,zt as T,ct as U,gt as V,Kt as W,Mt as X,Qe as Y,pt as Z,be as _,Ct as a,rn as a0,cn as a1,mt as a2,ht as a3,bt as a4,yt as b,Wt as c,It as d,St as e,Tt as f,en as g,tn as h,nn as i,Zt as j,qt as k,an as l,ut as m,on as n,sn as o,wt as p,Dt as q,Et as r,Bt as s,Lt as t,Rt as u,Pt as v,Ft as w,Qt as x,Ut as y,Ht as z};