@dcl/shop 1.7.1-31581211421.commit-e34f22c → 1.7.1-31588909629.commit-83201d7

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 (231) hide show
  1. package/_assets/{Activity-D8fF9C9I.js → Activity-BcCDm6Fl.js} +11 -11
  2. package/_assets/{AnimatedBackground-zIDETlWA.js → AnimatedBackground-Ln0tLHDh.js} +2 -2
  3. package/_assets/{Assets-DgIEU76P.js → Assets-S_jz0174.js} +15 -15
  4. package/_assets/{Authorizations-DJY1C-0c.js → Authorizations-DFJWblIp.js} +2 -2
  5. package/_assets/{Cart-DkTkUcH7.js → Cart-ZJ_Bppix.js} +13 -13
  6. package/_assets/{CircularProgress-Cr7ZIpc-.js → CircularProgress-rw12eVF6.js} +5 -5
  7. package/_assets/{Collection-CfO5UgmB.js → Collection-CJxBpLyz.js} +8 -8
  8. package/_assets/{CollectionCarousel-CanarvWs.js → CollectionCarousel-C_Eat7_D.js} +53 -53
  9. package/_assets/{Confetti-C3txAlaB.js → Confetti-rdNWp3rt.js} +4 -4
  10. package/_assets/{ConstantsUtil-DSh2cSM7.js → ConstantsUtil-GSXpd5w5.js} +2 -2
  11. package/_assets/{ContentClient-CtZG5oO7.js → ContentClient-CqyA1XLO.js} +2 -2
  12. package/_assets/{Creator-Co_uW2t7.js → Creator-D69p5aL5.js} +5 -5
  13. package/_assets/{DeploymentBuilder-Bqt0w7Kn.js → DeploymentBuilder-C39bHixo.js} +2 -2
  14. package/_assets/{EmotePlaybackBar-cc6YkXQm.js → EmotePlaybackBar-2S9aRBTs.js} +3 -3
  15. package/_assets/{ErrorNotice-ButdQJd0.js → ErrorNotice-DraAWK0D.js} +2 -2
  16. package/_assets/{ExchangeController-Du9bAWhk.js → ExchangeController-BsXYFx4V.js} +2 -2
  17. package/_assets/{Faq-CUpyT6yG.js → Faq-DWIztJkW.js} +2 -2
  18. package/_assets/{GetCredits-YyY7tx9W.js → GetCredits-DZa9MSNQ.js} +5 -5
  19. package/_assets/{Grow-_dZiv27c.js → Grow-C1y0GaQS.js} +2 -2
  20. package/_assets/{HelpersUtil-C0eba7rR.js → HelpersUtil-wr53cQnq.js} +2 -2
  21. package/_assets/{ItemDetail-B7cmVOoH.js → ItemDetail-Bhc_w426.js} +2 -2
  22. package/_assets/{JumpInIcon-5OTD8Ky8.js → JumpInIcon-BCg4gHDe.js} +2 -2
  23. package/_assets/{LoadMore-FmjpQQU3.js → LoadMore-DcyQqB7V.js} +2 -2
  24. package/_assets/{ManaPricingBanner.styles-BmflTPLt.js → ManaPricingBanner.styles-D8yW6YOJ.js} +2 -2
  25. package/_assets/{MyAssets-BXButX9E.js → MyAssets-DW_sO-OM.js} +3 -3
  26. package/_assets/{MyFavorites-BHS6y8Ja.js → MyFavorites-CPd575Q_.js} +3 -3
  27. package/_assets/{NetworkUtil-Dxtk5EDP.js → NetworkUtil-BdmSWRHM.js} +2 -2
  28. package/_assets/{NotFound-T8Vv1Kq7.js → NotFound-CSzZF6DS.js} +2 -2
  29. package/_assets/NotificationsBell-Dl8CPfgj.js +142 -0
  30. package/_assets/{OutfitDetail-DN4VPZ-T.js → OutfitDetail-xXFSLYGU.js} +2 -2
  31. package/_assets/{OutfitPreview-C3lXl-Vg.js → OutfitPreview-BdU0H7of.js} +3 -3
  32. package/_assets/{OutfitStudio-BYVcpvms.js → OutfitStudio-BrRYkQSY.js} +5 -5
  33. package/_assets/{StoreSettings-BfEbPiWg.js → StoreSettings-DUQx_Dt6.js} +22 -22
  34. package/_assets/{Success-BG6LmjYf.js → Success-RaPwuXOy.js} +36 -36
  35. package/_assets/{SwapController-CmEKXq9u.js → SwapController-CUK9rnop.js} +2 -2
  36. package/_assets/{Tooltip-BtEKpkLE.js → Tooltip-7mi0RVwp.js} +2 -2
  37. package/_assets/{TradeService-BbZoYxSl.js → TradeService-DRvijSJR.js} +2 -2
  38. package/_assets/{W3MFrameProviderSingleton-5eHrNQO3.js → W3MFrameProviderSingleton-Gs8pIXDu.js} +4 -4
  39. package/_assets/{WebCryptoP256-BUq5km0A.js → WebCryptoP256-l2eaCMqr.js} +2 -2
  40. package/_assets/{authorizations-BMn09P9I.js → authorizations-BzJgPMIG.js} +2 -2
  41. package/_assets/{basic-BxWXgbyb.js → basic-BZ0cc9NT.js} +2 -2
  42. package/_assets/{biconomy-DHGnsIIM.js → biconomy-lqGo3FqW.js} +2 -2
  43. package/_assets/{browseLayout.styles-B5XfuBCu.js → browseLayout.styles-BOh7KWFh.js} +2 -2
  44. package/_assets/{browser-C49ZLt-D.js → browser-DMDgib2N.js} +2 -2
  45. package/_assets/{browser-ponyfill-DDKLVv73.js → browser-ponyfill-oWMQ6W4U.js} +2 -2
  46. package/_assets/{builder-CUPlZxmr.js → builder-70Bbd4Yo.js} +2 -2
  47. package/_assets/{buy-PRtCD33t.js → buy-CdfkuQvD.js} +2 -2
  48. package/_assets/{buy-gasless-By2ertxo.js → buy-gasless-RbBehDyA.js} +2 -2
  49. package/_assets/{ccip-BDVnz0kv.js → ccip-C78V-wF_.js} +2 -2
  50. package/_assets/{ccip-BaKG6lNo.js → ccip-fjQFi5wf.js} +2 -2
  51. package/_assets/{chains-BeC3YON4.js → chains-BaSn87TI.js} +2 -2
  52. package/_assets/collectionPage.styles-DSeUlSA9.js +40 -0
  53. package/_assets/{common-BeD3phx5.js → common-BaMXvfZO.js} +2 -2
  54. package/_assets/{controller-CPH8DqfF.js → controller-CBS-P4GZ.js} +3 -3
  55. package/_assets/{core-D3kSoOJF.js → core-BkEhcNP-.js} +5 -5
  56. package/_assets/{createSvgIcon-C7IinxXu.js → createSvgIcon-DXItcdI1.js} +2 -2
  57. package/_assets/{custom-DRe-wZWg.js → custom-7TFCWmXz.js} +2 -2
  58. package/_assets/{data-capture-Ch5OTvSR.js → data-capture-CQ0Wp4M5.js} +2 -2
  59. package/_assets/{dcl-schemas-DvvPr89r.js → dcl-schemas-oZ9h4ko3.js} +2 -2
  60. package/_assets/{decimals-rDyFAXu8.js → decimals-B7uMBpx6.js} +2 -2
  61. package/_assets/{decimals-DTGPH3wS.js → decimals-DEAythTE.js} +2 -2
  62. package/_assets/{detectExtension-D30i9Jey.js → detectExtension-BTFFC3GC.js} +2 -2
  63. package/_assets/{disposePreview-C4L-N5GK.js → disposePreview-Dwj5f8OE.js} +2 -2
  64. package/_assets/{email-Co1GsAIc.js → email-NbT9DRCC.js} +2 -2
  65. package/_assets/{embedded-wallet-BYjl8-jD.js → embedded-wallet-CoT2K81g.js} +2 -2
  66. package/_assets/{emotion-styled.browser.esm-fvJWi7-5.js → emotion-styled.browser.esm-TuqOdZ1W.js} +2 -2
  67. package/_assets/{engine-CnGkO2i4.js → engine-CJ8gcBVv.js} +2 -2
  68. package/_assets/{errors-DxvcF67M.js → errors-BMWyMrL-.js} +2 -2
  69. package/_assets/{estimate-l1-fee-C92cmoPv.js → estimate-l1-fee-tyb7kf7a.js} +2 -2
  70. package/_assets/{eth_estimateGas-BHCc2QOL.js → eth_estimateGas-BRUeJfWB.js} +2 -2
  71. package/_assets/{eth_getStorageAt-GRNNZRcd.js → eth_getStorageAt-C12bKqRd.js} +2 -2
  72. package/_assets/{eth_getTransactionCount-hK3tU4Ay.js → eth_getTransactionCount-BY7KXSb0.js} +2 -2
  73. package/_assets/{ethereum-B283VA7v.js → ethereum-XoihOwzi.js} +2 -2
  74. package/_assets/{ethers-DvmxokMR.js → ethers-9NkNazYH.js} +2 -2
  75. package/_assets/{events-Cn0qN4Kt.js → events-yk_it_H_.js} +2 -2
  76. package/_assets/{execute-B7SoFNUO.js → execute-CUvhRThu.js} +3 -3
  77. package/_assets/{extractIPFS-BdmBrseY.js → extractIPFS-CqNCLsEB.js} +2 -2
  78. package/_assets/{features-Dk4Y0RzK.js → features-CMOT5j2N.js} +2 -2
  79. package/_assets/{fetchTokenMetadata-WcPywdCv.js → fetchTokenMetadata-OIU3__l7.js} +3 -3
  80. package/_assets/{field.styles-Ch3BrQO8.js → field.styles-DnIE_hBN.js} +2 -2
  81. package/_assets/{fortmatic-B_MbaAZ-.js → fortmatic-d6kDnMo1.js} +2 -2
  82. package/_assets/{get-bytecode-Dbi1a766.js → get-bytecode-DRUEP_v6.js} +2 -2
  83. package/_assets/{get-ecosystem-wallet-info-C9WnIe1B.js → get-ecosystem-wallet-info-55siV4Qh.js} +2 -2
  84. package/_assets/{getBalance-B9ludF4m.js → getBalance-BdxfgjNN.js} +3 -3
  85. package/_assets/{getInstalledModules-_5RThT9q.js → getInstalledModules-CaH96vr7.js} +2 -2
  86. package/_assets/{getNFT-DN5_6m3K.js → getNFT-1fMfvn-Y.js} +3 -3
  87. package/_assets/{getNFT-iLzcJ1g4.js → getNFT-CD8GHVnM.js} +2 -2
  88. package/_assets/{grid.styles-DikKXQiK.js → grid.styles-CG0auZKj.js} +2 -2
  89. package/_assets/{hashTypedData-DMcnbCy9.js → hashTypedData-BNp_7kH4.js} +2 -2
  90. package/_assets/{hashTypedData-Bmsonusk.js → hashTypedData-FhkMxMq8.js} +2 -2
  91. package/_assets/{in-app-C3BvMCMR.js → in-app-IiBMBdd6.js} +2 -2
  92. package/_assets/{in-app-wallet-calls-DRc-hUL-.js → in-app-wallet-calls-D3n82g7g.js} +2 -2
  93. package/_assets/{index-CiY4diDJ.js → index--DDbkKxj.js} +2 -2
  94. package/_assets/{index-_5t6eEp-.js → index-1ljXkwFR.js} +2 -2
  95. package/_assets/{index-CDdB6And.js → index-B1WSoA_d.js} +2 -2
  96. package/_assets/{index-B6JgAmho.js → index-B4reu1nx.js} +2 -2
  97. package/_assets/{index-BPGhISPl.js → index-B6IVDRLa.js} +4 -4
  98. package/_assets/{index-TtQO9tYh.js → index-BGNETsSQ.js} +2 -2
  99. package/_assets/{index-DddPvlT3.js → index-BLiBKN_P.js} +2 -2
  100. package/_assets/{index-B-J-DPRN.js → index-BOEoxcss.js} +2 -2
  101. package/_assets/{index-D6_KJwLj.js → index-BThdhVMv.js} +4 -4
  102. package/_assets/{index-D-LBw2RR.js → index-BTygCgGD.js} +2 -2
  103. package/_assets/{index-d4vkgFtT.js → index-Bbf2RIr7.js} +2 -2
  104. package/_assets/{index-F5Lfb472.js → index-BeTqS2CB.js} +2 -2
  105. package/_assets/{index-D0c52iWb.js → index-BhWSiQov.js} +2 -2
  106. package/_assets/{index-jgu2BllL.js → index-BmkjmkaR.js} +2 -2
  107. package/_assets/{index-DLUHZpBQ.js → index-Bon3We9w.js} +2 -2
  108. package/_assets/{index-f5tBnV1b.js → index-BseDzJYF.js} +2 -2
  109. package/_assets/{index-CjuRyBMi.js → index-BzAHkA9m.js} +2 -2
  110. package/_assets/{index-B_1bKbt3.js → index-C1lVVyzh.js} +2 -2
  111. package/_assets/{index-ryjNh1D9.js → index-C5Val98O.js} +2 -2
  112. package/_assets/{index-BJCMEC9C.js → index-C6DGRojo.js} +3 -3
  113. package/_assets/{index-D10KWHXY.js → index-C8_b0rdv.js} +2 -2
  114. package/_assets/{index-D7UgzWo_.js → index-CCnv5kKy.js} +2 -2
  115. package/_assets/{index-Tp3bLW1k.js → index-CDyz_tcW.js} +2 -2
  116. package/_assets/{index-BIjmCv3q.js → index-CFbo12NP.js} +2 -2
  117. package/_assets/{index-eYZdB5Hg.js → index-CLE71cHa.js} +2 -2
  118. package/_assets/{index-ByqPRYw_.js → index-CWY4y51L.js} +2 -2
  119. package/_assets/{index-oDSFAYHz.js → index-CcKOzz8r.js} +2 -2
  120. package/_assets/{index-B_axvIGX.js → index-Ced05BdA.js} +2 -2
  121. package/_assets/{index-C6H_U0z-.js → index-Cm9Y6iF_.js} +2 -2
  122. package/_assets/{index-Ba7-AMIr.js → index-CmKOdBLV.js} +3 -3
  123. package/_assets/index-CqhNARLg.js +2 -0
  124. package/_assets/{index-BCQgyOGH.js → index-CvgZI4iH.js} +2 -2
  125. package/_assets/{index-Dqdh1NEk.js → index-CwNaJ0Wt.js} +2 -2
  126. package/_assets/{index-BuZ7d-qH.js → index-CxA38i0e.js} +2 -2
  127. package/_assets/{index-P6L8Ua8L.js → index-CzFP82gq.js} +2 -2
  128. package/_assets/{index-D3RuRQFC.js → index-D2JdVXoK.js} +2 -2
  129. package/_assets/{index-CtQeRjIi.js → index-D5YZcIgK.js} +2 -2
  130. package/_assets/{index-BnTOUqVN.js → index-D5bSmdJh.js} +2 -2
  131. package/_assets/{index-BiSdYTNR.js → index-D6L7YadS.js} +4 -4
  132. package/_assets/{index-DK3Ndew3.js → index-D9u5sNyD.js} +2 -2
  133. package/_assets/{index-w8wVG0vp.js → index-DGyh0Z3B.js} +2 -2
  134. package/_assets/{index-BGmLd16T.js → index-DIu_3Qpj.js} +2 -2
  135. package/_assets/{index-C3Ylktqt.js → index-D_7ZE6rf.js} +2 -2
  136. package/_assets/{index-DHLYFIE4.js → index-Dg_QXQSF.js} +2 -2
  137. package/_assets/{index-CddeHcls.js → index-DqaF8d8U.js} +2 -2
  138. package/_assets/{index-H4gVTEKl.js → index-Dtrkx-bX.js} +2 -2
  139. package/_assets/{index-Lb3mEuHC.js → index-DwY73LjU.js} +2 -2
  140. package/_assets/{index-Cv3YqEfg.js → index-FAlRoTO7.js} +2 -2
  141. package/_assets/{index-DM1Th7nQ.js → index-FD7UdKvz.js} +2 -2
  142. package/_assets/{index-C3bIAsJx.js → index-GyRYqfnl.js} +2 -2
  143. package/_assets/{index-Dw8RNv0Y.js → index-HNVXkkkS.js} +2 -2
  144. package/_assets/{index-B8CpTEi8.js → index-Nfpcco_0.js} +2 -2
  145. package/_assets/{index-BOGfiKya.js → index-PKtaDZPX.js} +2 -2
  146. package/_assets/{index-DJy-qRqj.js → index-PVgr9kqe.js} +2 -2
  147. package/_assets/{index-DbblbeGS.js → index-QLR_j1L3.js} +2 -2
  148. package/_assets/{index-DMHt__mS.js → index-TXQq96ni.js} +2 -2
  149. package/_assets/{index-LrfHDepL.js → index-UE167sCA.js} +3 -3
  150. package/_assets/{index-LCqUgJES.js → index-UVYDSF7V.js} +3 -3
  151. package/_assets/{index-6JxLExB5.js → index-Uc6baGYa.js} +2 -2
  152. package/_assets/{index-DB525KOJ.js → index-VEVDZOLt.js} +2 -2
  153. package/_assets/{index-BB4PaZeM.js → index-_IxhqgxG.js} +2 -2
  154. package/_assets/{index-XzVT0I4Y.js → index-dyZgvxBQ.js} +2 -2
  155. package/_assets/{index-87aKdRLZ.js → index-gIgBdyus.js} +3 -3
  156. package/_assets/{index-rS8fNfOR.js → index-gQVTHUsa.js} +2 -2
  157. package/_assets/{index-D6KWV4_S.js → index-i3FBxfVM.js} +2 -2
  158. package/_assets/{index-DpiavbfG.js → index-pK0njIsP.js} +150 -94
  159. package/_assets/{index-B84gSKN3.js → index-t5SAPiy6.js} +2 -2
  160. package/_assets/{index.es-BKduOMfH.js → index.es-CnaaGjGK.js} +2 -2
  161. package/_assets/{index.es-D4Ffd079.js → index.es-Db1I5w29.js} +2 -2
  162. package/_assets/{index.es-BapACINK.js → index.es-hq4c2BaY.js} +5 -5
  163. package/_assets/{index.es-Ca0rjYkC.js → index.es-stHeeAlu.js} +2 -2
  164. package/_assets/{items-empty-BrN_d0qG.js → items-empty-DfDrX_rB.js} +2 -2
  165. package/_assets/{linkAccount-BQ8MdrsT.js → linkAccount-BxeGB-sO.js} +2 -2
  166. package/_assets/{localBatchGatewayRequest-BYqD0ZBi.js → localBatchGatewayRequest-GTeruLPs.js} +2 -2
  167. package/_assets/{native-B6MUSJPt.js → native-DcBwYWY3.js} +2 -2
  168. package/_assets/{networks-MpMcIBZk.js → networks-BBOXlvX3.js} +2 -2
  169. package/_assets/{onramp-p_FLyzYG.js → onramp-M59zJuNY.js} +2 -2
  170. package/_assets/{openzeppelin-B9OkAxse.js → openzeppelin-mNktJbao.js} +2 -2
  171. package/_assets/{ownerOf-CBsP-itJ.js → ownerOf-DD9ZdWgA.js} +2 -2
  172. package/_assets/{parseNft-Bo_RcmBD.js → parseNft-CxCwcOrH.js} +3 -3
  173. package/_assets/{parseSignature-DY4PajlY.js → parseSignature-CzoEYob3.js} +4 -4
  174. package/_assets/{parseSignature-BO9gIU49.js → parseSignature-EI8RAHZi.js} +2 -2
  175. package/_assets/{passkeys-DzhId6Di.js → passkeys-BHGHjHFg.js} +2 -2
  176. package/_assets/{pay-with-exchange-DtbU9pVf.js → pay-with-exchange-Brbk2xYM.js} +2 -2
  177. package/_assets/{prepare-contract-call-BQKZyk9t.js → prepare-contract-call-Iqn7q77l.js} +2 -2
  178. package/_assets/{qr-overlay-DuBu_rS6.js → qr-overlay-B_VlIeeu.js} +4 -4
  179. package/_assets/{react-Be4yVrKn.js → react-kphusOoP.js} +2 -2
  180. package/_assets/{receive-CjZU-PQU.js → receive-DijB46u3.js} +2 -2
  181. package/_assets/{resolveImplementation-C6Uj_xHi.js → resolveImplementation-A5tnt0DE.js} +2 -2
  182. package/_assets/{resume-buy-Dahq01t6.js → resume-buy-DWhUq2ya.js} +2 -2
  183. package/_assets/{rpc-BoD1JKAH.js → rpc-DuOgI_Dk.js} +2 -2
  184. package/_assets/{sales-empty-CdmnExhb.js → sales-empty-CZpUr8Vo.js} +2 -2
  185. package/_assets/{search-empty-DjMK9ahb.js → search-empty-CUu4COfd.js} +2 -2
  186. package/_assets/{secp256k1-GYPfXwWj.js → secp256k1-C5E_18Uw.js} +2 -2
  187. package/_assets/{secp256k1-W2jKIJ6Q.js → secp256k1-C_Xm46m9.js} +2 -2
  188. package/_assets/{secp256k1-CQyr7Z7G.js → secp256k1-Cts-N8ss.js} +2 -2
  189. package/_assets/{send-DTbiLVtT.js → send-B3iu9w43.js} +2 -2
  190. package/_assets/{send-batch-transaction-BG0DQ83r.js → send-batch-transaction-DXf1GIEI.js} +2 -2
  191. package/_assets/{send-eip712-transaction-ybR9Jhm0.js → send-eip712-transaction-VG-2gOcd.js} +3 -3
  192. package/_assets/{send-gasless-transaction-_q0EoJav.js → send-gasless-transaction-CNpkCAAs.js} +3 -3
  193. package/_assets/{send-transaction-CIMYC5HF.js → send-transaction-BIDisDgg.js} +3 -3
  194. package/_assets/{sendMetaTransaction-DgftRNSg.js → sendMetaTransaction-BOLe3OTv.js} +2 -2
  195. package/_assets/{sendRawTransaction-DnzciX08.js → sendRawTransaction-DCVrs5Dz.js} +4 -4
  196. package/_assets/{sentry-BZIVACz_.js → sentry-NePMG8c7.js} +3 -3
  197. package/_assets/{serializeTransaction-CMY-XUoZ.js → serializeTransaction-DYP2OLyd.js} +2 -2
  198. package/_assets/{session-proposal-K9lpQ49V.js → session-proposal-CXYNmdYe.js} +2 -2
  199. package/_assets/{session-request-BZM9Vq1u.js → session-request-ypQOoDpT.js} +3 -3
  200. package/_assets/{sha256-BG0hM2l9.js → sha256-ClHNgArd.js} +2 -2
  201. package/_assets/{signing-BU69uIif.js → signing-CDNvUpy8.js} +4 -4
  202. package/_assets/{skeleton.styles-CD6ZE0Jg.js → skeleton.styles-Swaf_3Kh.js} +2 -2
  203. package/_assets/{socials-CFnmGVLF.js → socials-BTsj7T0t.js} +2 -2
  204. package/_assets/{styled-BKOZxQw-.js → styled-C_vILGjH.js} +3 -3
  205. package/_assets/{swaps-CtmJI7ON.js → swaps-hUW23IS4.js} +2 -2
  206. package/_assets/{thirdweb-DbtOXE-o.js → thirdweb-Ddww8-jK.js} +4 -4
  207. package/_assets/{to-serializable-transaction-ZoNXdqiO.js → to-serializable-transaction-CI3QTKEO.js} +3 -3
  208. package/_assets/{totalSupply-BlO2EtIG.js → totalSupply-BigzDXUH.js} +2 -2
  209. package/_assets/{transaction-6bfuZAnG.js → transaction-BDOMEoLL.js} +2 -2
  210. package/_assets/{transactionReceipt-9zwmir__.js → transactionReceipt-mi8QqP-6.js} +2 -2
  211. package/_assets/{transactions-eCVVfLnC.js → transactions-CSo8LkF0.js} +2 -2
  212. package/_assets/useCreditPacks-XtadeSCm.js +2 -0
  213. package/_assets/{useInfiniteGrid-DCk1zuNn.js → useInfiniteGrid-BcNHKS4q.js} +2 -2
  214. package/_assets/{useStore-BFMDOUy4.js → useStore-Cshj1ayZ.js} +3 -3
  215. package/_assets/{useTheme-dbltkhsw.js → useTheme-C3qJ-yXp.js} +2 -2
  216. package/_assets/{utils-BekO5Uvx.js → utils-BWWfhrJP.js} +2 -2
  217. package/_assets/{verifyHash-DSm-f_mw.js → verifyHash-BZMHwARe.js} +2 -2
  218. package/_assets/{w3m-modal-D9k8hCLz.js → w3m-modal-Cuj1SP1j.js} +2 -2
  219. package/_assets/{w3m-modal-ELQZ_EA_.js → w3m-modal-DkJA0UeJ.js} +2 -2
  220. package/_assets/{wait-for-tx-receipt-m8rrYAHi.js → wait-for-tx-receipt-XHMrXN-l.js} +2 -2
  221. package/_assets/{wallets-B0p9dagW.js → wallets-CDZziKUN.js} +6 -6
  222. package/_assets/{web-connector-QPGhuRf4.js → web-connector-CYSknakR.js} +4 -4
  223. package/_assets/{writeContract-G6qV2dMI.js → writeContract-YtKzCxsz.js} +2 -2
  224. package/_assets/{zora-sepolia-lUCgTZTo.js → zora-sepolia-dnlxOXqv.js} +2 -2
  225. package/_assets/{zoraTestnet-Cow2oZL2.js → zoraTestnet-DhZrzuIj.js} +2 -2
  226. package/index.html +11 -11
  227. package/package.json +2 -2
  228. package/_assets/NotificationsBell-Bjl82A1_.js +0 -142
  229. package/_assets/collectionPage.styles-CLH0uGuY.js +0 -40
  230. package/_assets/index-D4ThpBMK.js +0 -2
  231. package/_assets/useCreditPacks-BJIunD_h.js +0 -2
@@ -1,4 +1,4 @@
1
- import{r as u,L as W,e as re,j as e}from"./react-Be4yVrKn.js";import{$ as H,l as U,a0 as le,a1 as de,a2 as ce,a3 as he,t as pe,s as i,I as L,a4 as ue,a5 as me,B as F,a6 as xe,o as V,a7 as ge,n as fe,b as n,a8 as G,a9 as N,aa as be,ab as ye,ac as ve,ad as je,ae as we,af as $e,ag as ke,ah as Ie,ai as Ce,aj as Ee,ak as ze,al as Le,am as Fe,an as We,ao as Se,q as A,ap as O,aq as Ae,ar as Oe,as as Te,at as Pe,au as Re,av as Ne}from"./index-DpiavbfG.js";import{d as B}from"./dcl-schemas-DvvPr89r.js";import{E as Q}from"./ErrorNotice-ButdQJd0.js";import{E as Be}from"./EmotePlaybackBar-cc6YkXQm.js";import{O as Me}from"./OutfitPreview-C3lXl-Vg.js";import"./sentry-BZIVACz_.js";import"./ethers-DvmxokMR.js";import"./intl-AKLEHPeO.js";import"./disposePreview-C4L-N5GK.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="5f0c9c70-a63b-4e98-ae98-35516c9cc1ad",t._sentryDebugIdIdentifier="sentry-dbid-5f0c9c70-a63b-4e98-ae98-35516c9cc1ad")}catch{}})();function qe({address:t,outfitUrns:s,enabled:l=!0}){var b;const{data:r,isFetched:d}=H(t),m=((b=r==null?void 0:r.avatar)==null?void 0:b.wearables)??[],x=!!t&&!!r,p=m.join(","),c=l&&x&&m.length>0,{data:y,isLoading:v,isFetched:j}=U({queryKey:["wearable-rules",p],enabled:c,staleTime:30*6e4,retry:!1,queryFn:()=>he(m)}),k=s.join(",");return u.useMemo(()=>{const I=!!t&&!d||v||c&&!j;return x?{profile:"default",bodyShape:ce(r)??void 0,urns:[...de(y??[]),...s],...le(r),isLoading:I}:{profile:"default",urns:s,isLoading:I}},[t,x,r,d,y,v,j,c,k])}const{colors:o,radius:$,media:h,gradients:_e}=pe,J=i.div`
1
+ import{r as u,L as W,e as re,j as e}from"./react-kphusOoP.js";import{a0 as H,l as U,a1 as le,a2 as de,a3 as ce,a4 as he,t as pe,s as i,I as L,a5 as ue,a6 as me,B as F,a7 as xe,o as V,a8 as ge,n as fe,b as n,a9 as G,aa as N,ab as be,ac as ye,ad as ve,ae as je,af as we,ag as $e,ah as ke,ai as Ie,aj as Ce,ak as Ee,al as ze,am as Le,an as Fe,ao as We,ap as Se,q as A,aq as O,ar as Ae,as as Oe,at as Te,au as Pe,av as Re,aw as Ne}from"./index-pK0njIsP.js";import{d as B}from"./dcl-schemas-oZ9h4ko3.js";import{E as Q}from"./ErrorNotice-DraAWK0D.js";import{E as Be}from"./EmotePlaybackBar-2S9aRBTs.js";import{O as Me}from"./OutfitPreview-BdU0H7of.js";import"./sentry-NePMG8c7.js";import"./ethers-9NkNazYH.js";import"./intl-AKLEHPeO.js";import"./disposePreview-Dwj5f8OE.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="94b69d4b-edad-4e06-a156-953b2ed6927c",t._sentryDebugIdIdentifier="sentry-dbid-94b69d4b-edad-4e06-a156-953b2ed6927c")}catch{}})();function qe({address:t,outfitUrns:s,enabled:l=!0}){var b;const{data:r,isFetched:d}=H(t),m=((b=r==null?void 0:r.avatar)==null?void 0:b.wearables)??[],x=!!t&&!!r,p=m.join(","),c=l&&x&&m.length>0,{data:y,isLoading:v,isFetched:j}=U({queryKey:["wearable-rules",p],enabled:c,staleTime:30*6e4,retry:!1,queryFn:()=>he(m)}),k=s.join(",");return u.useMemo(()=>{const I=!!t&&!d||v||c&&!j;return x?{profile:"default",bodyShape:ce(r)??void 0,urns:[...de(y??[]),...s],...le(r),isLoading:I}:{profile:"default",urns:s,isLoading:I}},[t,x,r,d,y,v,j,c,k])}const{colors:o,radius:$,media:h,gradients:_e}=pe,J=i.div`
2
2
  max-width: 1721px;
3
3
  margin: 0 auto;
4
4
  /* The page's bottom padding is 56px, but the phone CTA bar is sticky and has its own bottom padding for the safe area.
@@ -365,4 +365,4 @@ import{r as u,L as W,e as re,j as e}from"./react-Be4yVrKn.js";import{$ as H,l as
365
365
  margin: 0;
366
366
  color: ${o.gray4};
367
367
  `,K="outfit-detail-preview";function Et(){const{id:t}=re(),s=V(c=>c.session),l=ge(),r=l==="creator",{data:d,isError:m,refetch:x}=U({queryKey:["outfit",t,r],enabled:N()&&!!t,staleTime:6e4,queryFn:()=>Ne(t,r&&s?s.identity:void 0)}),p=!N()||!t||d===null&&l!=="pending";return fe(p?{title:n("seo.outfit.notFoundTitle"),noindex:!0}:d?{title:d.name,image:G(d.thumbnailHash)??void 0}:{}),p?e.jsxs(D,{"data-testid":"outfit-notfound",children:[e.jsx(ht,{name:"cart",size:44}),e.jsx(pt,{children:n("outfits.detail.notFoundTitle")}),e.jsx(ut,{children:n("outfits.detail.notFoundBody")}),e.jsx(F,{as:W,to:"/items",variant:"purple",children:n("notFound.cta")})]}):m?e.jsxs(D,{"data-testid":"outfit-detail-error",children:[e.jsx(Q,{message:n("outfits.errors.generic")}),e.jsx(F,{variant:"purple",onClick:()=>void x(),children:n("outfits.detail.retry")})]}):d?e.jsx(xt,{outfit:d}):e.jsx(J,{"aria-busy":"true","data-testid":"outfit-detail-loading",children:e.jsxs(X,{children:[e.jsx(Y,{children:e.jsx("span",{className:"skeleton",style:{position:"absolute",inset:0},"aria-hidden":!0})}),e.jsxs(Z,{children:[e.jsx("span",{className:"skeleton",style:{width:"60%",height:32},"aria-hidden":!0}),e.jsx("span",{className:"skeleton",style:{width:"40%",height:16},"aria-hidden":!0}),e.jsx("span",{className:"skeleton",style:{width:"100%",height:48},"aria-hidden":!0})]})]})})}function mt({item:t}){const s=Ae(t),l=Oe(t.gender);return e.jsxs(it,{children:[t.rarity?e.jsx(z,{"data-variant":"rarity",style:{background:Re(t.rarity)},title:Pe(t.rarity),children:Te(t.rarity)}):null,t.isSmart?e.jsxs(z,{"data-variant":"smart",children:[e.jsx(L,{name:"smart",size:13}),n("assetCard.smart")]}):null,s?e.jsx(z,{"data-variant":"icon",children:e.jsx(L,{name:s})}):null,l?e.jsx(z,{"data-variant":"icon",children:e.jsx(L,{name:l})}):null]})}function xt({outfit:t}){const s=be(t),{split:l,availableCount:r,totalCredits:d,outfitCredits:m,addOutfit:x,isAdding:p}=ye(t,s),c=V(a=>{var w;return(w=a.session)==null?void 0:w.address}),y=ve(a=>a.items),v=u.useMemo(()=>new Set(y.map(je)),[y]),j=G(t.thumbnailHash),k=u.useRef(null);u.useEffect(()=>{k.current!==t.id&&(k.current=t.id,we("Shop Outfit Viewed",{outfit_id:t.id,item_count:t.items.length}))},[t.id,t.items.length]);const b=u.useMemo(()=>t.items.map(a=>{const w=$e(a),S=s.byKey.get(w)??null;return{key:w,item:S,state:S?ke(S,{address:c,cartKeys:v}):"missing"}}),[t,s.byKey,c,v]),{isFetched:I}=H(c),ee=!c||I,te=t.bodyShape==="female"?Ie:t.bodyShape==="male"?Ce:void 0,g=u.useMemo(()=>b.map(a=>a.item).filter(a=>!!a),[b]),P=u.useMemo(()=>Ee(g),[g]),ie=u.useMemo(()=>ze(g),[g]),R=u.useMemo(()=>{const a=Le(g);return a?Fe(a):null},[g]),ae=R??B.PreviewEmote.FASHION,se=!!R,f=qe({address:c,outfitUrns:P}),ne=t.items.length,oe=!s.isLoading&&!s.isError,C=l.purchasable.length;return e.jsxs(J,{"data-testid":"outfit-detail",children:[e.jsxs(De,{"aria-label":n("outfits.detail.breadcrumbAria"),children:[e.jsx(M,{to:"/overview",children:n("nav.overview")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(M,{to:"/overview",children:n("outfits.detail.breadcrumbLooks")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Ke,{children:t.name})]}),e.jsxs(X,{children:[e.jsx(Y,{"data-testid":"outfit-detail-preview",style:{background:We(t)},children:j&&!s.isLoading&&P.length===0?e.jsx(He,{src:j,alt:t.name}):e.jsx(Me,{id:K,profile:f.profile,bodyShape:ie??f.bodyShape??te,urns:f.urns,emote:ae,unityMode:B.PreviewUnityMode.BUILDER,skin:f.skin,hair:f.hair,eyes:f.eyes,enabled:ee&&!f.isLoading&&!s.isLoading,controls:se?e.jsx(Be,{previewId:K,testId:"outfit-emote-controls"}):null})}),e.jsxs(Z,{children:[e.jsx(Ue,{children:t.name}),e.jsx(Ve,{"data-testid":"outfit-detail-meta",children:n("outfits.detail.itemsCount",{count:ne})}),s.isError?e.jsxs(st,{children:[e.jsx(Q,{message:n("outfits.detail.resolveError"),testId:"outfit-detail-resolve-error"}),e.jsx(F,{variant:"outline","data-testid":"outfit-detail-retry",onClick:s.retry,children:n("outfits.detail.retry")})]}):e.jsxs(e.Fragment,{children:[e.jsx(Ge,{children:e.jsx(Qe,{children:b.map(a=>e.jsx(Je,{"data-testid":"outfit-detail-item","data-state":a.state,children:a.item?e.jsxs(e.Fragment,{children:[e.jsx(Xe,{to:`/item/${a.item.contractAddress}/${a.item.itemId}`,state:{item:a.item},"aria-label":a.item.name}),e.jsx(Ye,{src:a.item.thumbnail,alt:"",loading:"lazy"}),e.jsxs(q,{children:[e.jsx(T,{children:a.item.name}),a.item.creator?e.jsx(et,{to:`/items/creator/${a.item.creator}`,children:e.jsx(Se,{address:a.item.creator})}):null,e.jsxs(_,{children:[a.state!=="unavailable"?e.jsxs(tt,{children:[e.jsx(A,{size:15}),e.jsx(O,{credits:a.item.priceCredits})]}):null,a.state==="unavailable"?e.jsx(E,{children:n("outfits.card.unavailable")}):a.state==="own_listing"?e.jsx(E,{children:n("outfits.detail.yourListing")}):a.state==="in_cart"?e.jsx(E,{children:n("outfits.detail.inCart")}):null,e.jsx(mt,{item:a.item})]})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(Ze,{className:s.isLoading?"skeleton":void 0,"aria-hidden":!0}),e.jsx(q,{children:s.isLoading?e.jsx(T,{children:e.jsx("span",{className:"skeleton",style:{display:"block",width:"70%",height:14}})}):e.jsxs(e.Fragment,{children:[e.jsx(T,{children:n("outfits.card.unavailable")}),e.jsx(_,{children:e.jsx(E,{children:n("outfits.card.unavailable")})})]})})]})},a.key))})}),e.jsxs(nt,{"data-testid":"outfit-detail-ctabar",children:[oe&&l.ownListing.length>0?e.jsx(at,{children:n("outfits.detail.yourListingHint")}):null,g.length>0&&e.jsxs(ot,{children:[e.jsx(rt,{children:n("outfits.detail.totalPrice")}),s.isLoading?e.jsx("span",{className:"skeleton",style:{width:64,height:26},"aria-hidden":!0}):e.jsxs(lt,{children:[e.jsx(A,{size:22}),e.jsx(O,{credits:m})]})]}),s.isLoading?e.jsx("span",{className:"skeleton",style:{width:"100%",height:52,borderRadius:26},"aria-hidden":!0}):e.jsxs(dt,{variant:"purple","data-testid":"outfit-detail-cta",onClick:x,disabled:p||C===0,"aria-busy":p||void 0,children:[p?n("outfits.card.adding"):C>0?n("outfits.detail.addCount",{count:C}):r>0?n("outfits.detail.nothingToAdd"):n("outfits.card.unavailable"),!p&&C>0?e.jsxs(ct,{children:[e.jsx(A,{size:16}),e.jsx(O,{credits:d})]}):null]})]})]})]})]})]})}export{Et as OutfitDetail,Et as default};
368
- //# sourceMappingURL=OutfitDetail-DN4VPZ-T.js.map
368
+ //# sourceMappingURL=OutfitDetail-xXFSLYGU.js.map
@@ -1,7 +1,7 @@
1
- import{r as c,j as d}from"./react-Be4yVrKn.js";import{d as m}from"./dcl-schemas-DvvPr89r.js";import{bk as S,l as T,s as _,ac as k,bl as q,bm as M,bn as U,b as W}from"./index-DpiavbfG.js";import{d as C}from"./disposePreview-C4L-N5GK.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6e941fdb-dc89-4c7d-8187-2d58d8284b16",e._sentryDebugIdIdentifier="sentry-dbid-6e941fdb-dc89-4c7d-8187-2d58d8284b16")}catch{}})();function h(e){return e.startsWith("urn:")}function $(e,n){var o,f;const s=(o=e.metadata)==null?void 0:o.emoteDataADR74;if(!((f=s==null?void 0:s.representations)!=null&&f.length))return null;const a=new Map((e.content??[]).map(r=>[r.file,r.hash])),t=s.representations.map(r=>({...r,contents:(r.contents??[]).filter(l=>a.has(l)).map(l=>({key:l,url:`${n}/content/contents/${a.get(l)}`}))}));return t.every(r=>r.contents.length===0)?null:{base64:H({...e.metadata,emoteDataADR74:{...s,representations:t}}),loop:!!s.loop}}function H(e){return btoa(JSON.stringify(e).replace(/[^\x20-\x7f]/g,""))}async function J(e,n=S([e]),s){var a;try{const t=await fetch(`${n}/content/entities/active`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({pointers:[e]}),signal:s});if(!t.ok)return await((a=t.body)==null?void 0:a.cancel()),null;const[o]=await t.json();return o?$(o,n):null}catch{return null}}function K(e){var s,a;const n=T({queryKey:["emote-base64",e],enabled:!!e,staleTime:18e5,retry:!1,queryFn:({signal:t})=>J(e,void 0,t)});return{base64:((s=n.data)==null?void 0:s.base64)??null,loop:((a=n.data)==null?void 0:a.loop)??!1,isLoading:n.isLoading}}const Q=_.div`
1
+ import{r as c,j as f}from"./react-kphusOoP.js";import{d as m}from"./dcl-schemas-oZ9h4ko3.js";import{bk as S,l as T,s as _,ad as k,bl as q,bm as M,bn as U,b as W}from"./index-pK0njIsP.js";import{d as C}from"./disposePreview-Dwj5f8OE.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b6042bb9-6188-42ec-9bf2-605cb6ee0b9f",e._sentryDebugIdIdentifier="sentry-dbid-b6042bb9-6188-42ec-9bf2-605cb6ee0b9f")}catch{}})();function h(e){return e.startsWith("urn:")}function $(e,n){var o,d;const s=(o=e.metadata)==null?void 0:o.emoteDataADR74;if(!((d=s==null?void 0:s.representations)!=null&&d.length))return null;const a=new Map((e.content??[]).map(r=>[r.file,r.hash])),t=s.representations.map(r=>({...r,contents:(r.contents??[]).filter(l=>a.has(l)).map(l=>({key:l,url:`${n}/content/contents/${a.get(l)}`}))}));return t.every(r=>r.contents.length===0)?null:{base64:H({...e.metadata,emoteDataADR74:{...s,representations:t}}),loop:!!s.loop}}function H(e){return btoa(JSON.stringify(e).replace(/[^\x20-\x7f]/g,""))}async function J(e,n=S([e]),s){var a;try{const t=await fetch(`${n}/content/entities/active`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({pointers:[e]}),signal:s});if(!t.ok)return await((a=t.body)==null?void 0:a.cancel()),null;const[o]=await t.json();return o?$(o,n):null}catch{return null}}function K(e){var s,a;const n=T({queryKey:["emote-base64",e],enabled:!!e,staleTime:18e5,retry:!1,queryFn:({signal:t})=>J(e,void 0,t)});return{base64:((s=n.data)==null?void 0:s.base64)??null,loop:((a=n.data)==null?void 0:a.loop)??!1,isLoading:n.isLoading}}const Q=_.div`
2
2
  position: absolute;
3
3
  inset: 0;
4
4
  display: grid;
5
5
  place-items: center;
6
- `;function X({id:e,profile:n,bodyShape:s,urns:a,emote:t=m.PreviewEmote.FASHION,enabled:o=!0,skin:f,hair:r,eyes:l,unityMode:E=m.PreviewUnityMode.BUILDER,controls:x,onRenderer:I}){const A=k(u=>u.fittingOpen),{ref:j,active:D}=q(),g=t&&h(t)?t:null,{base64:p,loop:O,isLoading:R}=K(g),i=o&&a.length>0&&D&&!A&&!R,B=M(a)===m.ChainName.MATIC_AMOY,[L,b]=c.useState(!1),P=a.join(",");c.useEffect(()=>{b(!1)},[P,n,s,t,f,r,l]),c.useEffect(()=>{i&&b(!1)},[i]);const[F,v]=c.useState(!1);c.useEffect(()=>{if(!i){v(!1);return}let u=0,N=0;const w=()=>{document.getElementById(e)?v(!0):N++<300&&(u=requestAnimationFrame(w))};return w(),()=>cancelAnimationFrame(u)},[i,e]);const y=c.useRef(null);return c.useEffect(()=>{if(i)return()=>{C(y.current),y.current=null}},[i]),d.jsxs(d.Fragment,{children:[d.jsx("div",{ref:j,"data-preview-viewport":!0,"aria-hidden":!0}),i?d.jsx(U,{id:e,profile:n,bodyShape:s,urns:a,skin:f,hair:r,eyes:l,type:m.PreviewType.AVATAR,emote:g?void 0:t&&!h(t)?t:void 0,base64s:p?[p]:void 0,disableDefaultEmotes:!!p&&!O,unityMode:E,disableBackground:!0,disableFadeEffect:!0,dev:B,onRenderer:I,onLoad:()=>{var u;b(!0),y.current=((u=document.getElementById(e))==null?void 0:u.contentWindow)??null}},n):null,F?x:null,o&&a.length===0?null:!i||!L?d.jsx(Q,{"aria-busy":"true","aria-label":W("spinner.loading"),children:d.jsx("span",{className:"spinner","aria-hidden":!0})}):null]})}export{X as O};
7
- //# sourceMappingURL=OutfitPreview-C3lXl-Vg.js.map
6
+ `;function X({id:e,profile:n,bodyShape:s,urns:a,emote:t=m.PreviewEmote.FASHION,enabled:o=!0,skin:d,hair:r,eyes:l,unityMode:E=m.PreviewUnityMode.BUILDER,controls:x,onRenderer:I}){const A=k(u=>u.fittingOpen),{ref:j,active:D}=q(),g=t&&h(t)?t:null,{base64:p,loop:O,isLoading:R}=K(g),i=o&&a.length>0&&D&&!A&&!R,B=M(a)===m.ChainName.MATIC_AMOY,[L,b]=c.useState(!1),P=a.join(",");c.useEffect(()=>{b(!1)},[P,n,s,t,d,r,l]),c.useEffect(()=>{i&&b(!1)},[i]);const[F,v]=c.useState(!1);c.useEffect(()=>{if(!i){v(!1);return}let u=0,N=0;const w=()=>{document.getElementById(e)?v(!0):N++<300&&(u=requestAnimationFrame(w))};return w(),()=>cancelAnimationFrame(u)},[i,e]);const y=c.useRef(null);return c.useEffect(()=>{if(i)return()=>{C(y.current),y.current=null}},[i]),f.jsxs(f.Fragment,{children:[f.jsx("div",{ref:j,"data-preview-viewport":!0,"aria-hidden":!0}),i?f.jsx(U,{id:e,profile:n,bodyShape:s,urns:a,skin:d,hair:r,eyes:l,type:m.PreviewType.AVATAR,emote:g?void 0:t&&!h(t)?t:void 0,base64s:p?[p]:void 0,disableDefaultEmotes:!!p&&!O,unityMode:E,disableBackground:!0,disableFadeEffect:!0,dev:B,onRenderer:I,onLoad:()=>{var u;b(!0),y.current=((u=document.getElementById(e))==null?void 0:u.contentWindow)??null}},n):null,F?x:null,o&&a.length===0?null:!i||!L?f.jsx(Q,{"aria-busy":"true","aria-label":W("spinner.loading"),children:f.jsx("span",{className:"spinner","aria-hidden":!0})}):null]})}export{X as O};
7
+ //# sourceMappingURL=OutfitPreview-BdU0H7of.js.map
@@ -1,4 +1,4 @@
1
- import{r as d,j as t,L as F,e as Xt,a as Yt,b as Zt}from"./react-Be4yVrKn.js";import{s,t as ut,I as _,b2 as te,b as e,q as ot,ap as rt,B as x,A as Ct,o as X,a7 as ee,n as ie,r as Et,l as Lt,aa as se,af as z,b3 as V,b4 as oe,b5 as re,b6 as J,aj as ae,al as ne,ah as de,ai as le,a8 as Rt,an as ue,b7 as at,b8 as ce,b9 as pe,ba as fe,w as N,bb as zt,bc as Pt,bd as A,h as nt,be as dt,bf as he,bg as xe,bh as me,ae as ge,bi as be,bj as ye,av as je}from"./index-DpiavbfG.js";import{E as U}from"./ErrorNotice-ButdQJd0.js";import{L as ve}from"./LoadMore-FmjpQQU3.js";import{u as we}from"./useInfiniteGrid-DCk1zuNn.js";import{O as $e}from"./OutfitPreview-C3lXl-Vg.js";import{T as ke}from"./skeleton.styles-CD6ZE0Jg.js";import"./dcl-schemas-DvvPr89r.js";import"./sentry-BZIVACz_.js";import"./ethers-DvmxokMR.js";import"./intl-AKLEHPeO.js";import"./disposePreview-C4L-N5GK.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},f=new a.Error().stack;f&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[f]="5ee80e05-1e6e-4d70-ad3e-bea779491769",a._sentryDebugIdIdentifier="sentry-dbid-5ee80e05-1e6e-4d70-ad3e-bea779491769")}catch{}})();const{colors:m,radius:Y,media:Se}=ut,Ie=s.div`
1
+ import{r as d,j as t,L as F,e as Xt,a as Yt,b as Zt}from"./react-kphusOoP.js";import{s,t as ut,I as _,b2 as te,b as e,q as ot,aq as rt,B as x,A as Ct,o as X,a8 as ee,n as ie,r as Et,l as Lt,ab as se,ag as z,b3 as V,b4 as oe,b5 as re,b6 as J,ak as ae,am as ne,ai as de,aj as le,a9 as Rt,ao as ue,b7 as at,b8 as ce,b9 as pe,ba as fe,w as N,bb as zt,bc as Pt,bd as A,h as nt,be as dt,bf as he,bg as xe,bh as me,af as ge,bi as be,bj as ye,aw as je}from"./index-pK0njIsP.js";import{E as U}from"./ErrorNotice-DraAWK0D.js";import{L as ve}from"./LoadMore-DcyQqB7V.js";import{u as we}from"./useInfiniteGrid-BcNHKS4q.js";import{O as $e}from"./OutfitPreview-BdU0H7of.js";import{T as ke}from"./skeleton.styles-Swaf_3Kh.js";import"./dcl-schemas-oZ9h4ko3.js";import"./sentry-NePMG8c7.js";import"./ethers-9NkNazYH.js";import"./intl-AKLEHPeO.js";import"./disposePreview-Dwj5f8OE.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},f=new a.Error().stack;f&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[f]="250bb29d-e642-4b0a-a1c7-c13c3a3de170",a._sentryDebugIdIdentifier="sentry-dbid-250bb29d-e642-4b0a-a1c7-c13c3a3de170")}catch{}})();const{colors:m,radius:Y,media:Se}=ut,Ie=s.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 12px;
@@ -216,13 +216,13 @@ import{r as d,j as t,L as F,e as Xt,a as Yt,b as Zt}from"./react-Be4yVrKn.js";im
216
216
  white-space: nowrap;
217
217
  overflow: hidden;
218
218
  text-overflow: ellipsis;
219
- `,Ge=s.span`
219
+ `,qe=s.span`
220
220
  display: inline-flex;
221
221
  align-items: center;
222
222
  gap: 8px;
223
223
  font-size: 13px;
224
224
  color: ${n.gray4};
225
- `,qe=s.div`
225
+ `,Ge=s.div`
226
226
  display: flex;
227
227
  align-items: center;
228
228
  gap: 8px;
@@ -553,5 +553,5 @@ import{r as d,j as t,L as F,e as Xt,a as Yt,b as Zt}from"./react-Be4yVrKn.js";im
553
553
  display: flex;
554
554
  flex-wrap: wrap;
555
555
  gap: 10px;
556
- `;function Ki(){const{id:a}=Xt(),{pathname:f}=Yt(),h=X(b=>b.session),c=X(b=>b.signIn),y=ee();ie({title:e("outfits.studio.title"),noindex:!0});const j=f.endsWith("/new")?"new":a?"edit":"list";return y==="pending"?t.jsx(O,{"aria-busy":"true","data-testid":"outfit-studio-loading",children:t.jsx("span",{className:"spinner","aria-hidden":!0})}):h?y!=="creator"?t.jsxs(O,{"data-testid":"outfit-studio-unavailable",children:[t.jsx(kt,{children:e("outfits.studio.title")}),t.jsx(w,{children:e("outfits.studio.notAvailable")}),t.jsx(x,{as:F,to:"/overview",variant:"white",children:e("outfits.studio.backToShop")})]}):j==="list"?t.jsx(Ei,{}):t.jsx(zi,{outfitId:j==="edit"?a:null},a??"new"):t.jsxs(O,{"data-testid":"outfit-studio-signin",children:[t.jsx(kt,{children:e("outfits.studio.title")}),t.jsx(w,{children:e("outfits.studio.signInPrompt")}),t.jsx(x,{variant:"white",onClick:()=>c(),children:e("outfits.studio.signIn")})]})}function Ci({outfit:a}){const f=Rt(a.thumbnailHash);return f?t.jsx(Me,{style:{background:pe(a)},children:t.jsx("img",{src:f,alt:"",loading:"lazy"})}):t.jsx(Ue,{"aria-hidden":!0})}function Ei(){const a=X(u=>u.session),f=Et(),[h,c]=d.useState(null),[y,j]=d.useState(null),{data:b=[],isLoading:o,isError:R,refetch:T}=Lt({queryKey:["outfits-all"],enabled:!!a,staleTime:3e4,queryFn:()=>ye(a.identity)});async function C(u,S){if(a){j(u.id);try{S==="delete"?(await fe(u.id,a.identity),N.success(e("outfits.studio.deleted"))):(await zt({...lt(u),published:!1},a.identity,"update"),N.success(e("outfits.studio.unpublished"))),Pt(f)}catch(E){E instanceof A||nt(E,{flow:`outfit-${S}`}),N.error(e(E instanceof A?dt(E.code):"outfits.errors.generic"))}finally{j(null),c(null)}}}return t.jsxs(Wt,{"data-testid":"outfit-studio-list",children:[t.jsxs(Ot,{children:[t.jsx(At,{children:e("outfits.studio.myOutfits")}),t.jsx(x,{as:F,to:"/outfits/new",variant:"white","data-testid":"outfit-studio-new",children:e("outfits.studio.new")})]}),o?t.jsx(St,{"aria-busy":"true",children:Array.from({length:3},(u,S)=>t.jsx(Be,{className:"skeleton","aria-hidden":!0},S))}):R?t.jsxs(O,{children:[t.jsx(U,{message:e("outfits.errors.generic")}),t.jsx(x,{variant:"white",onClick:()=>void T(),children:e("outfits.detail.retry")})]}):b.length===0?t.jsx(w,{children:e("outfits.studio.empty")}):t.jsx(St,{children:b.map(u=>t.jsxs(He,{"data-testid":"outfit-studio-row","data-published":u.published||void 0,children:[t.jsx(Ci,{outfit:u}),t.jsxs(_e,{children:[t.jsx(Ke,{children:u.name||e("outfits.studio.untitled")}),t.jsxs(Ge,{children:[t.jsx(Ft,{"data-state":u.published?"published":"draft",children:u.published?e("outfits.studio.publishedState"):e("outfits.studio.draft")}),e("outfits.card.items",{count:u.items.length})]})]}),t.jsxs(qe,{children:[u.published?t.jsx(x,{as:F,to:`/items/outfits/${u.id}`,variant:"ghost",size:"sm",children:e("outfits.studio.view")}):null,t.jsx(x,{as:F,to:`/outfits/${u.id}/edit`,variant:"outline",size:"sm","data-testid":"outfit-studio-edit",children:e("outfits.studio.edit")}),t.jsx(Qe,{type:"button","data-testid":"outfit-studio-delete","aria-label":e("outfits.studio.confirmDelete"),disabled:y===u.id,onClick:()=>c(u),children:t.jsx(_,{name:"trash",size:18})})]})]},u.id))}),h?t.jsxs(Ve,{role:"dialog","aria-modal":"true","aria-label":e("outfits.studio.deleteTitle"),"data-testid":"outfit-studio-confirm",children:[t.jsx(Je,{onClick:()=>c(null)}),t.jsxs(Xe,{children:[t.jsx(Ye,{children:e("outfits.studio.deleteTitle")}),t.jsx("p",{className:"muted",children:e("outfits.studio.deleteBody")}),t.jsxs(Ze,{children:[h.published?t.jsx(x,{variant:"purple","data-testid":"outfit-studio-confirm-unpublish",disabled:y===h.id,onClick:()=>void C(h,"unpublish"),children:e("outfits.studio.unpublish")}):null,t.jsx(x,{variant:h.published?"outline":"purple","data-testid":"outfit-studio-confirm-delete",disabled:y===h.id,onClick:()=>void C(h,"delete"),children:e("outfits.studio.confirmDelete")}),t.jsx(x,{variant:"ghost",onClick:()=>c(null),children:e("outfits.studio.cancel")})]})]})]}):null]})}const Tt=["image/png","image/jpeg","image/webp"];function Li(){return{id:crypto.randomUUID(),name:"",thumbnailHash:"",items:[],bodyShape:"unisex",gradientFrom:at.from,gradientTo:at.to,published:!1}}function lt(a){return{id:a.id,name:a.name,thumbnailHash:a.thumbnailHash,items:a.items,bodyShape:a.bodyShape,gradientFrom:a.gradientFrom,gradientTo:a.gradientTo,published:a.published}}function Ri(a){try{const f=sessionStorage.getItem(a);return f?JSON.parse(f):null}catch{return null}}function zi({outfitId:a}){const f=a===null,h=`outfit-draft:${a??"new"}`,c=X(i=>i.session),y=Et(),j=Zt(),[b]=d.useState(()=>Ri(h)),[o,R]=d.useState(()=>b??(f?Li():null)),[T,C]=d.useState(!!b),{data:u,isLoading:S,isError:E,refetch:Z}=Lt({queryKey:["outfit",a,!0],enabled:!f&&!!c,staleTime:0,queryFn:()=>je(a,c.identity)});d.useEffect(()=>{u&&R(i=>i??lt(u))},[u]);function k(i){R(r=>r&&{...r,...i}),C(!0)}d.useEffect(()=>{if(!(!o||!T))try{sessionStorage.setItem(h,JSON.stringify(o))}catch{}},[o,T,h]),d.useEffect(()=>{if(!T)return;const i=r=>r.preventDefault();return window.addEventListener("beforeunload",i),()=>window.removeEventListener("beforeunload",i)},[T]),d.useEffect(()=>()=>sessionStorage.removeItem(h),[h]);const g=se(o??void 0),K=d.useMemo(()=>new Set(((o==null?void 0:o.items)??[]).map(z)),[o]),B=i=>be((o==null?void 0:o.items)??[],i,g.byKey),l=i=>!!i.itemId&&B(i).length<=J;function v(i){!o||!l(i)||k({items:B(i)})}const[H,ct]=d.useState(null),L=d.useRef(null),tt=d.useRef(!0);d.useEffect(()=>(tt.current=!0,()=>{tt.current=!1}),[]);const[G,pt]=d.useState(!1),[Bt,q]=d.useState(null),[et,ft]=d.useState(""),[Ht,ht]=d.useState(null),[I,Mt]=d.useState();d.useEffect(()=>()=>{L.current&&URL.revokeObjectURL(L.current)},[]);function xt(){const i=me(et);if(!i){ht(e("outfits.studio.importError"));return}ht(null),ft(""),Mt(i.colors),k({items:i.items,...i.bodyShape?{bodyShape:i.bodyShape}:{}}),N.success(e("outfits.studio.importSuccess",{count:i.items.length}))}async function Ut(i){if(!i||!c)return;if(q(null),!Tt.includes(i.type)){q(e("outfits.errors.unsupportedType"));return}if(i.size>he){q(e("outfits.errors.tooLarge"));return}L.current&&URL.revokeObjectURL(L.current);const r=URL.createObjectURL(i);L.current=r,ct(r),pt(!0);try{const p=await xe(i,c.identity);k({thumbnailHash:p})}catch(p){p instanceof A||nt(p,{flow:"outfit-thumbnail"}),q(e(p instanceof A?dt(p.code):"outfits.errors.generic")),L.current&&(URL.revokeObjectURL(L.current),L.current=null),ct(null)}finally{pt(!1)}}const[M,mt]=d.useState(!1),[_t,gt]=d.useState(null),it=!!o&&o.name.trim().length>0&&o.name.length<=60,Kt=!!o&&V(o.gradientFrom)&&V(o.gradientTo),bt=!!o&&o.items.some(i=>{const r=g.byKey.get(z(i));return!r||oe(r)}),yt=!!o&&it&&!!o.thumbnailHash&&Kt&&bt&&o.items.length>=re&&o.items.length<=J;async function st(i){if(!(!c||!o||M)){mt(!0),gt(null);try{const r=await zt({...o,published:i},c.identity,f?"create":"update");if(!tt.current)return;sessionStorage.removeItem(h),R(lt(r)),C(!1),Pt(y),i&&!o.published?(ge("Shop Outfit Published",{outfit_id:r.id,item_count:r.items.length}),N.success(e("outfits.studio.publishedToast"))):N.success(e("outfits.studio.saved")),f&&(y.setQueryData(["outfit",r.id,!0],r),j(`/outfits/${r.id}/edit`,{replace:!0}))}catch(r){r instanceof A||nt(r,{flow:"outfit-save"}),gt(e(r instanceof A?dt(r.code):"outfits.errors.generic"))}finally{mt(!1)}}}const Q=d.useMemo(()=>((o==null?void 0:o.items)??[]).map(i=>g.byKey.get(z(i))).filter(i=>!!i),[o,g.byKey]),jt=d.useMemo(()=>ae(Q),[Q]),Gt=d.useMemo(()=>{const i=ne(Q);return i!=null&&i.itemId?z({contractAddress:i.contractAddress,itemId:i.itemId}):null},[Q]),qt=(o==null?void 0:o.bodyShape)==="female"?de:(o==null?void 0:o.bodyShape)==="male"?le:void 0;if(!c)return null;if(!o)return E?t.jsxs(O,{children:[t.jsx(U,{message:e("outfits.errors.generic")}),t.jsx(x,{variant:"white",onClick:()=>void Z(),children:e("outfits.detail.retry")})]}):!S&&u===null?t.jsxs(O,{"data-testid":"outfit-studio-missing",children:[t.jsx(w,{children:e("outfits.errors.notFound")}),t.jsx(x,{as:F,to:"/outfits/manage",variant:"white",children:e("outfits.studio.myOutfits")})]}):t.jsx(O,{"aria-busy":"true",children:t.jsx("span",{className:"spinner","aria-hidden":!0})});const vt=H??Rt(o.thumbnailHash),Qt={...o,authorAddress:(c==null?void 0:c.address)??"",createdAt:0,updatedAt:0},Vt=o.items.reduce((i,r)=>{var p;return i+(((p=g.byKey.get(z(r)))==null?void 0:p.priceCredits)??0)},0);return t.jsxs(Wt,{"data-testid":"outfit-studio-editor",children:[t.jsxs(Ot,{children:[t.jsx(De,{to:"/outfits/manage","aria-label":e("outfits.studio.myOutfits"),"data-testid":"outfit-studio-back",children:t.jsx(_,{name:"arrow-left",size:18})}),t.jsx(At,{children:f?e("outfits.studio.new"):e("outfits.studio.editTitle")}),t.jsx(Ft,{"data-state":o.published?"published":"draft",children:o.published?e("outfits.studio.publishedState"):e("outfits.studio.draft")})]}),t.jsxs(ti,{children:[t.jsxs(ei,{children:[t.jsxs(si,{"data-testid":"outfit-studio-preview",style:{background:ue(o)},children:[t.jsx($e,{id:"outfit-studio-preview-frame",profile:"default",bodyShape:qt,urns:jt,skin:I==null?void 0:I.skin,hair:I==null?void 0:I.hair,eyes:I==null?void 0:I.eyes,enabled:!g.isLoading}),jt.length===0&&!g.isLoading?t.jsx(oi,{children:e("outfits.studio.previewEmpty")}):null]}),t.jsxs(P,{children:[t.jsx(W,{as:"span",children:e("outfits.studio.bodyShape")}),t.jsx(ri,{role:"group","aria-label":e("outfits.studio.bodyShape"),children:["unisex","male","female"].map(i=>t.jsx(ai,{type:"button","data-selected":o.bodyShape===i||void 0,onClick:()=>k({bodyShape:i}),children:e(`outfits.studio.shape.${i}`)},i))})]}),t.jsxs(P,{children:[t.jsx(W,{as:"span",children:e("outfits.studio.gradient")}),t.jsx(di,{children:["gradientFrom","gradientTo"].map(i=>t.jsxs(li,{children:[t.jsx(ui,{type:"color",value:V(o[i])?o[i]:at.from,"aria-label":e(i==="gradientFrom"?"outfits.studio.gradientTop":"outfits.studio.gradientBottom"),"data-testid":i==="gradientFrom"?"outfit-studio-gradient-from":"outfit-studio-gradient-to",onChange:r=>k({[i]:r.target.value.toLowerCase()})}),t.jsxs(ci,{children:[t.jsx("span",{children:e(i==="gradientFrom"?"outfits.studio.gradientTop":"outfits.studio.gradientBottom")}),t.jsx(pi,{value:o[i],maxLength:7,spellCheck:!1,placeholder:"#000000","aria-label":e(i==="gradientFrom"?"outfits.studio.gradientTopHex":"outfits.studio.gradientBottomHex"),"data-invalid":!V(o[i])||void 0,onChange:r=>{const p=r.target.value.trim().toLowerCase();k({[i]:p.startsWith("#")||p===""?p:`#${p}`})}})]})]},i))}),t.jsx(w,{children:e("outfits.studio.gradientHint")})]}),t.jsxs(P,{children:[t.jsx(W,{as:"span",children:e("outfits.studio.thumbnail")}),vt?t.jsx(ni,{"data-busy":G||void 0,children:t.jsx("img",{src:vt,alt:""})}):null,t.jsxs(hi,{as:"label",variant:"outline",size:"sm","data-busy":G||void 0,children:[G?e("outfits.studio.uploading"):e("outfits.studio.upload"),t.jsx("input",{type:"file",accept:Tt.join(","),hidden:!0,disabled:G,onChange:i=>{var r;return void Ut((r=i.target.files)==null?void 0:r[0])},"data-testid":"outfit-studio-thumb-input"})]}),t.jsx(w,{children:e("outfits.studio.thumbnailHint")}),t.jsx(U,{message:Bt,testId:"outfit-studio-thumb-error"})]}),t.jsxs(P,{children:[t.jsx(W,{as:"span",children:e("outfits.studio.cardPreview")}),t.jsx(fi,{"data-testid":"outfit-studio-card-preview",onClickCapture:i=>{i.preventDefault(),i.stopPropagation()},children:t.jsx(ce,{outfit:Qt,resolution:g})})]})]}),t.jsxs(ii,{children:[t.jsxs(P,{children:[t.jsx(W,{htmlFor:"outfit-import",children:e("outfits.studio.import")}),t.jsxs(xi,{children:[t.jsx(It,{id:"outfit-import",value:et,spellCheck:!1,placeholder:e("outfits.studio.importPlaceholder"),onChange:i=>ft(i.target.value),onKeyDown:i=>{i.key==="Enter"&&xt()},"data-testid":"outfit-studio-import"}),t.jsx(x,{variant:"outline",size:"sm",onClick:xt,disabled:et.trim()==="","data-testid":"outfit-studio-import-apply",children:e("outfits.studio.importApply")})]}),t.jsx(w,{children:e("outfits.studio.importHint")}),t.jsx(U,{message:Ht,testId:"outfit-studio-import-error"})]}),t.jsxs(P,{children:[t.jsx(W,{htmlFor:"outfit-name",children:e("outfits.studio.name")}),t.jsx(It,{id:"outfit-name",value:o.name,maxLength:60,placeholder:e("outfits.studio.namePlaceholder"),onChange:i=>k({name:i.target.value}),"data-testid":"outfit-studio-name"})]}),t.jsxs(P,{children:[t.jsxs(W,{as:"span",children:[e("outfits.studio.items")," (",o.items.length,"/",J,")"]}),o.items.length===0?t.jsx(w,{children:e("outfits.studio.noItems")}):t.jsx(mi,{children:o.items.map(i=>{const r=z(i),p=g.byKey.get(r);return t.jsxs(gi,{"data-testid":"outfit-studio-selected","data-missing":!p||void 0,children:[p?t.jsx(bi,{src:p.thumbnail,alt:""}):t.jsx(yi,{className:g.isLoading?"skeleton":void 0,"aria-hidden":!0}),t.jsx(ji,{className:p?void 0:"muted",children:p?p.name:g.isLoading?t.jsx(ke,{className:"skeleton",width:96,"aria-hidden":!0}):e("outfits.card.unavailable")}),r===Gt?t.jsx(vi,{"data-testid":"outfit-studio-plays-in-preview",children:e("outfits.studio.playsInPreview")}):null,p?t.jsxs(wi,{children:[t.jsx(ot,{size:12}),t.jsx(rt,{credits:p.priceCredits})]}):null,t.jsx(Si,{type:"button","aria-label":e("outfits.studio.remove"),title:e("outfits.studio.remove"),onClick:()=>k({items:o.items.filter(Jt=>z(Jt)!==r)}),children:t.jsx(_,{name:"trash",size:16})})]},r)})}),o.items.length>0?t.jsxs($i,{"data-testid":"outfit-studio-total",children:[t.jsx("span",{children:e("outfits.detail.totalPrice")}),t.jsxs(ki,{children:[t.jsx(ot,{size:14}),t.jsx(rt,{credits:Vt})]})]}):null,o.items.length>=J?t.jsx(w,{children:e("outfits.studio.maxItems")}):null]}),t.jsx(Fe,{selectedKeys:K,onPick:v,canPick:l})]})]}),t.jsxs(Ii,{"data-testid":"outfit-studio-savebar",children:[t.jsx(U,{message:_t,testId:"outfit-studio-save-error"}),it?!yt&&!o.published?t.jsx(w,{"data-testid":"outfit-studio-publish-hint",children:!bt&&o.items.length>0?e("outfits.studio.needsWearable"):e("outfits.errors.notPublishable")}):null:t.jsx(w,{children:e("outfits.studio.needName")}),t.jsxs(Ti,{children:[t.jsx(x,{variant:"outline","data-testid":"outfit-studio-save",disabled:M||!it,onClick:()=>void st(o.published),children:M?e("outfits.studio.saving"):e("outfits.studio.saveDraft")}),o.published?t.jsx(x,{variant:"white","data-testid":"outfit-studio-unpublish",disabled:M,onClick:()=>void st(!1),children:e("outfits.studio.unpublish")}):t.jsx(x,{variant:"white","data-testid":"outfit-studio-publish",disabled:M||!yt,onClick:()=>void st(!0),children:e("outfits.studio.publish")})]})]})]})}export{Ki as OutfitStudio,Ki as default};
557
- //# sourceMappingURL=OutfitStudio-BYVcpvms.js.map
556
+ `;function Ki(){const{id:a}=Xt(),{pathname:f}=Yt(),h=X(b=>b.session),c=X(b=>b.signIn),y=ee();ie({title:e("outfits.studio.title"),noindex:!0});const j=f.endsWith("/new")?"new":a?"edit":"list";return y==="pending"?t.jsx(O,{"aria-busy":"true","data-testid":"outfit-studio-loading",children:t.jsx("span",{className:"spinner","aria-hidden":!0})}):h?y!=="creator"?t.jsxs(O,{"data-testid":"outfit-studio-unavailable",children:[t.jsx(kt,{children:e("outfits.studio.title")}),t.jsx(w,{children:e("outfits.studio.notAvailable")}),t.jsx(x,{as:F,to:"/overview",variant:"white",children:e("outfits.studio.backToShop")})]}):j==="list"?t.jsx(Ei,{}):t.jsx(zi,{outfitId:j==="edit"?a:null},a??"new"):t.jsxs(O,{"data-testid":"outfit-studio-signin",children:[t.jsx(kt,{children:e("outfits.studio.title")}),t.jsx(w,{children:e("outfits.studio.signInPrompt")}),t.jsx(x,{variant:"white",onClick:()=>c(),children:e("outfits.studio.signIn")})]})}function Ci({outfit:a}){const f=Rt(a.thumbnailHash);return f?t.jsx(Me,{style:{background:pe(a)},children:t.jsx("img",{src:f,alt:"",loading:"lazy"})}):t.jsx(Ue,{"aria-hidden":!0})}function Ei(){const a=X(u=>u.session),f=Et(),[h,c]=d.useState(null),[y,j]=d.useState(null),{data:b=[],isLoading:o,isError:R,refetch:T}=Lt({queryKey:["outfits-all"],enabled:!!a,staleTime:3e4,queryFn:()=>ye(a.identity)});async function C(u,S){if(a){j(u.id);try{S==="delete"?(await fe(u.id,a.identity),N.success(e("outfits.studio.deleted"))):(await zt({...lt(u),published:!1},a.identity,"update"),N.success(e("outfits.studio.unpublished"))),Pt(f)}catch(E){E instanceof A||nt(E,{flow:`outfit-${S}`}),N.error(e(E instanceof A?dt(E.code):"outfits.errors.generic"))}finally{j(null),c(null)}}}return t.jsxs(Wt,{"data-testid":"outfit-studio-list",children:[t.jsxs(Ot,{children:[t.jsx(At,{children:e("outfits.studio.myOutfits")}),t.jsx(x,{as:F,to:"/outfits/new",variant:"white","data-testid":"outfit-studio-new",children:e("outfits.studio.new")})]}),o?t.jsx(St,{"aria-busy":"true",children:Array.from({length:3},(u,S)=>t.jsx(Be,{className:"skeleton","aria-hidden":!0},S))}):R?t.jsxs(O,{children:[t.jsx(U,{message:e("outfits.errors.generic")}),t.jsx(x,{variant:"white",onClick:()=>void T(),children:e("outfits.detail.retry")})]}):b.length===0?t.jsx(w,{children:e("outfits.studio.empty")}):t.jsx(St,{children:b.map(u=>t.jsxs(He,{"data-testid":"outfit-studio-row","data-published":u.published||void 0,children:[t.jsx(Ci,{outfit:u}),t.jsxs(_e,{children:[t.jsx(Ke,{children:u.name||e("outfits.studio.untitled")}),t.jsxs(qe,{children:[t.jsx(Ft,{"data-state":u.published?"published":"draft",children:u.published?e("outfits.studio.publishedState"):e("outfits.studio.draft")}),e("outfits.card.items",{count:u.items.length})]})]}),t.jsxs(Ge,{children:[u.published?t.jsx(x,{as:F,to:`/items/outfits/${u.id}`,variant:"ghost",size:"sm",children:e("outfits.studio.view")}):null,t.jsx(x,{as:F,to:`/outfits/${u.id}/edit`,variant:"outline",size:"sm","data-testid":"outfit-studio-edit",children:e("outfits.studio.edit")}),t.jsx(Qe,{type:"button","data-testid":"outfit-studio-delete","aria-label":e("outfits.studio.confirmDelete"),disabled:y===u.id,onClick:()=>c(u),children:t.jsx(_,{name:"trash",size:18})})]})]},u.id))}),h?t.jsxs(Ve,{role:"dialog","aria-modal":"true","aria-label":e("outfits.studio.deleteTitle"),"data-testid":"outfit-studio-confirm",children:[t.jsx(Je,{onClick:()=>c(null)}),t.jsxs(Xe,{children:[t.jsx(Ye,{children:e("outfits.studio.deleteTitle")}),t.jsx("p",{className:"muted",children:e("outfits.studio.deleteBody")}),t.jsxs(Ze,{children:[h.published?t.jsx(x,{variant:"purple","data-testid":"outfit-studio-confirm-unpublish",disabled:y===h.id,onClick:()=>void C(h,"unpublish"),children:e("outfits.studio.unpublish")}):null,t.jsx(x,{variant:h.published?"outline":"purple","data-testid":"outfit-studio-confirm-delete",disabled:y===h.id,onClick:()=>void C(h,"delete"),children:e("outfits.studio.confirmDelete")}),t.jsx(x,{variant:"ghost",onClick:()=>c(null),children:e("outfits.studio.cancel")})]})]})]}):null]})}const Tt=["image/png","image/jpeg","image/webp"];function Li(){return{id:crypto.randomUUID(),name:"",thumbnailHash:"",items:[],bodyShape:"unisex",gradientFrom:at.from,gradientTo:at.to,published:!1}}function lt(a){return{id:a.id,name:a.name,thumbnailHash:a.thumbnailHash,items:a.items,bodyShape:a.bodyShape,gradientFrom:a.gradientFrom,gradientTo:a.gradientTo,published:a.published}}function Ri(a){try{const f=sessionStorage.getItem(a);return f?JSON.parse(f):null}catch{return null}}function zi({outfitId:a}){const f=a===null,h=`outfit-draft:${a??"new"}`,c=X(i=>i.session),y=Et(),j=Zt(),[b]=d.useState(()=>Ri(h)),[o,R]=d.useState(()=>b??(f?Li():null)),[T,C]=d.useState(!!b),{data:u,isLoading:S,isError:E,refetch:Z}=Lt({queryKey:["outfit",a,!0],enabled:!f&&!!c,staleTime:0,queryFn:()=>je(a,c.identity)});d.useEffect(()=>{u&&R(i=>i??lt(u))},[u]);function k(i){R(r=>r&&{...r,...i}),C(!0)}d.useEffect(()=>{if(!(!o||!T))try{sessionStorage.setItem(h,JSON.stringify(o))}catch{}},[o,T,h]),d.useEffect(()=>{if(!T)return;const i=r=>r.preventDefault();return window.addEventListener("beforeunload",i),()=>window.removeEventListener("beforeunload",i)},[T]),d.useEffect(()=>()=>sessionStorage.removeItem(h),[h]);const g=se(o??void 0),K=d.useMemo(()=>new Set(((o==null?void 0:o.items)??[]).map(z)),[o]),B=i=>be((o==null?void 0:o.items)??[],i,g.byKey),l=i=>!!i.itemId&&B(i).length<=J;function v(i){!o||!l(i)||k({items:B(i)})}const[H,ct]=d.useState(null),L=d.useRef(null),tt=d.useRef(!0);d.useEffect(()=>(tt.current=!0,()=>{tt.current=!1}),[]);const[q,pt]=d.useState(!1),[Bt,G]=d.useState(null),[et,ft]=d.useState(""),[Ht,ht]=d.useState(null),[I,Mt]=d.useState();d.useEffect(()=>()=>{L.current&&URL.revokeObjectURL(L.current)},[]);function xt(){const i=me(et);if(!i){ht(e("outfits.studio.importError"));return}ht(null),ft(""),Mt(i.colors),k({items:i.items,...i.bodyShape?{bodyShape:i.bodyShape}:{}}),N.success(e("outfits.studio.importSuccess",{count:i.items.length}))}async function Ut(i){if(!i||!c)return;if(G(null),!Tt.includes(i.type)){G(e("outfits.errors.unsupportedType"));return}if(i.size>he){G(e("outfits.errors.tooLarge"));return}L.current&&URL.revokeObjectURL(L.current);const r=URL.createObjectURL(i);L.current=r,ct(r),pt(!0);try{const p=await xe(i,c.identity);k({thumbnailHash:p})}catch(p){p instanceof A||nt(p,{flow:"outfit-thumbnail"}),G(e(p instanceof A?dt(p.code):"outfits.errors.generic")),L.current&&(URL.revokeObjectURL(L.current),L.current=null),ct(null)}finally{pt(!1)}}const[M,mt]=d.useState(!1),[_t,gt]=d.useState(null),it=!!o&&o.name.trim().length>0&&o.name.length<=60,Kt=!!o&&V(o.gradientFrom)&&V(o.gradientTo),bt=!!o&&o.items.some(i=>{const r=g.byKey.get(z(i));return!r||oe(r)}),yt=!!o&&it&&!!o.thumbnailHash&&Kt&&bt&&o.items.length>=re&&o.items.length<=J;async function st(i){if(!(!c||!o||M)){mt(!0),gt(null);try{const r=await zt({...o,published:i},c.identity,f?"create":"update");if(!tt.current)return;sessionStorage.removeItem(h),R(lt(r)),C(!1),Pt(y),i&&!o.published?(ge("Shop Outfit Published",{outfit_id:r.id,item_count:r.items.length}),N.success(e("outfits.studio.publishedToast"))):N.success(e("outfits.studio.saved")),f&&(y.setQueryData(["outfit",r.id,!0],r),j(`/outfits/${r.id}/edit`,{replace:!0}))}catch(r){r instanceof A||nt(r,{flow:"outfit-save"}),gt(e(r instanceof A?dt(r.code):"outfits.errors.generic"))}finally{mt(!1)}}}const Q=d.useMemo(()=>((o==null?void 0:o.items)??[]).map(i=>g.byKey.get(z(i))).filter(i=>!!i),[o,g.byKey]),jt=d.useMemo(()=>ae(Q),[Q]),qt=d.useMemo(()=>{const i=ne(Q);return i!=null&&i.itemId?z({contractAddress:i.contractAddress,itemId:i.itemId}):null},[Q]),Gt=(o==null?void 0:o.bodyShape)==="female"?de:(o==null?void 0:o.bodyShape)==="male"?le:void 0;if(!c)return null;if(!o)return E?t.jsxs(O,{children:[t.jsx(U,{message:e("outfits.errors.generic")}),t.jsx(x,{variant:"white",onClick:()=>void Z(),children:e("outfits.detail.retry")})]}):!S&&u===null?t.jsxs(O,{"data-testid":"outfit-studio-missing",children:[t.jsx(w,{children:e("outfits.errors.notFound")}),t.jsx(x,{as:F,to:"/outfits/manage",variant:"white",children:e("outfits.studio.myOutfits")})]}):t.jsx(O,{"aria-busy":"true",children:t.jsx("span",{className:"spinner","aria-hidden":!0})});const vt=H??Rt(o.thumbnailHash),Qt={...o,authorAddress:(c==null?void 0:c.address)??"",createdAt:0,updatedAt:0},Vt=o.items.reduce((i,r)=>{var p;return i+(((p=g.byKey.get(z(r)))==null?void 0:p.priceCredits)??0)},0);return t.jsxs(Wt,{"data-testid":"outfit-studio-editor",children:[t.jsxs(Ot,{children:[t.jsx(De,{to:"/outfits/manage","aria-label":e("outfits.studio.myOutfits"),"data-testid":"outfit-studio-back",children:t.jsx(_,{name:"arrow-left",size:18})}),t.jsx(At,{children:f?e("outfits.studio.new"):e("outfits.studio.editTitle")}),t.jsx(Ft,{"data-state":o.published?"published":"draft",children:o.published?e("outfits.studio.publishedState"):e("outfits.studio.draft")})]}),t.jsxs(ti,{children:[t.jsxs(ei,{children:[t.jsxs(si,{"data-testid":"outfit-studio-preview",style:{background:ue(o)},children:[t.jsx($e,{id:"outfit-studio-preview-frame",profile:"default",bodyShape:Gt,urns:jt,skin:I==null?void 0:I.skin,hair:I==null?void 0:I.hair,eyes:I==null?void 0:I.eyes,enabled:!g.isLoading}),jt.length===0&&!g.isLoading?t.jsx(oi,{children:e("outfits.studio.previewEmpty")}):null]}),t.jsxs(P,{children:[t.jsx(W,{as:"span",children:e("outfits.studio.bodyShape")}),t.jsx(ri,{role:"group","aria-label":e("outfits.studio.bodyShape"),children:["unisex","male","female"].map(i=>t.jsx(ai,{type:"button","data-selected":o.bodyShape===i||void 0,onClick:()=>k({bodyShape:i}),children:e(`outfits.studio.shape.${i}`)},i))})]}),t.jsxs(P,{children:[t.jsx(W,{as:"span",children:e("outfits.studio.gradient")}),t.jsx(di,{children:["gradientFrom","gradientTo"].map(i=>t.jsxs(li,{children:[t.jsx(ui,{type:"color",value:V(o[i])?o[i]:at.from,"aria-label":e(i==="gradientFrom"?"outfits.studio.gradientTop":"outfits.studio.gradientBottom"),"data-testid":i==="gradientFrom"?"outfit-studio-gradient-from":"outfit-studio-gradient-to",onChange:r=>k({[i]:r.target.value.toLowerCase()})}),t.jsxs(ci,{children:[t.jsx("span",{children:e(i==="gradientFrom"?"outfits.studio.gradientTop":"outfits.studio.gradientBottom")}),t.jsx(pi,{value:o[i],maxLength:7,spellCheck:!1,placeholder:"#000000","aria-label":e(i==="gradientFrom"?"outfits.studio.gradientTopHex":"outfits.studio.gradientBottomHex"),"data-invalid":!V(o[i])||void 0,onChange:r=>{const p=r.target.value.trim().toLowerCase();k({[i]:p.startsWith("#")||p===""?p:`#${p}`})}})]})]},i))}),t.jsx(w,{children:e("outfits.studio.gradientHint")})]}),t.jsxs(P,{children:[t.jsx(W,{as:"span",children:e("outfits.studio.thumbnail")}),vt?t.jsx(ni,{"data-busy":q||void 0,children:t.jsx("img",{src:vt,alt:""})}):null,t.jsxs(hi,{as:"label",variant:"outline",size:"sm","data-busy":q||void 0,children:[q?e("outfits.studio.uploading"):e("outfits.studio.upload"),t.jsx("input",{type:"file",accept:Tt.join(","),hidden:!0,disabled:q,onChange:i=>{var r;return void Ut((r=i.target.files)==null?void 0:r[0])},"data-testid":"outfit-studio-thumb-input"})]}),t.jsx(w,{children:e("outfits.studio.thumbnailHint")}),t.jsx(U,{message:Bt,testId:"outfit-studio-thumb-error"})]}),t.jsxs(P,{children:[t.jsx(W,{as:"span",children:e("outfits.studio.cardPreview")}),t.jsx(fi,{"data-testid":"outfit-studio-card-preview",onClickCapture:i=>{i.preventDefault(),i.stopPropagation()},children:t.jsx(ce,{outfit:Qt,resolution:g})})]})]}),t.jsxs(ii,{children:[t.jsxs(P,{children:[t.jsx(W,{htmlFor:"outfit-import",children:e("outfits.studio.import")}),t.jsxs(xi,{children:[t.jsx(It,{id:"outfit-import",value:et,spellCheck:!1,placeholder:e("outfits.studio.importPlaceholder"),onChange:i=>ft(i.target.value),onKeyDown:i=>{i.key==="Enter"&&xt()},"data-testid":"outfit-studio-import"}),t.jsx(x,{variant:"outline",size:"sm",onClick:xt,disabled:et.trim()==="","data-testid":"outfit-studio-import-apply",children:e("outfits.studio.importApply")})]}),t.jsx(w,{children:e("outfits.studio.importHint")}),t.jsx(U,{message:Ht,testId:"outfit-studio-import-error"})]}),t.jsxs(P,{children:[t.jsx(W,{htmlFor:"outfit-name",children:e("outfits.studio.name")}),t.jsx(It,{id:"outfit-name",value:o.name,maxLength:60,placeholder:e("outfits.studio.namePlaceholder"),onChange:i=>k({name:i.target.value}),"data-testid":"outfit-studio-name"})]}),t.jsxs(P,{children:[t.jsxs(W,{as:"span",children:[e("outfits.studio.items")," (",o.items.length,"/",J,")"]}),o.items.length===0?t.jsx(w,{children:e("outfits.studio.noItems")}):t.jsx(mi,{children:o.items.map(i=>{const r=z(i),p=g.byKey.get(r);return t.jsxs(gi,{"data-testid":"outfit-studio-selected","data-missing":!p||void 0,children:[p?t.jsx(bi,{src:p.thumbnail,alt:""}):t.jsx(yi,{className:g.isLoading?"skeleton":void 0,"aria-hidden":!0}),t.jsx(ji,{className:p?void 0:"muted",children:p?p.name:g.isLoading?t.jsx(ke,{className:"skeleton",width:96,"aria-hidden":!0}):e("outfits.card.unavailable")}),r===qt?t.jsx(vi,{"data-testid":"outfit-studio-plays-in-preview",children:e("outfits.studio.playsInPreview")}):null,p?t.jsxs(wi,{children:[t.jsx(ot,{size:12}),t.jsx(rt,{credits:p.priceCredits})]}):null,t.jsx(Si,{type:"button","aria-label":e("outfits.studio.remove"),title:e("outfits.studio.remove"),onClick:()=>k({items:o.items.filter(Jt=>z(Jt)!==r)}),children:t.jsx(_,{name:"trash",size:16})})]},r)})}),o.items.length>0?t.jsxs($i,{"data-testid":"outfit-studio-total",children:[t.jsx("span",{children:e("outfits.detail.totalPrice")}),t.jsxs(ki,{children:[t.jsx(ot,{size:14}),t.jsx(rt,{credits:Vt})]})]}):null,o.items.length>=J?t.jsx(w,{children:e("outfits.studio.maxItems")}):null]}),t.jsx(Fe,{selectedKeys:K,onPick:v,canPick:l})]})]}),t.jsxs(Ii,{"data-testid":"outfit-studio-savebar",children:[t.jsx(U,{message:_t,testId:"outfit-studio-save-error"}),it?!yt&&!o.published?t.jsx(w,{"data-testid":"outfit-studio-publish-hint",children:!bt&&o.items.length>0?e("outfits.studio.needsWearable"):e("outfits.errors.notPublishable")}):null:t.jsx(w,{children:e("outfits.studio.needName")}),t.jsxs(Ti,{children:[t.jsx(x,{variant:"outline","data-testid":"outfit-studio-save",disabled:M||!it,onClick:()=>void st(o.published),children:M?e("outfits.studio.saving"):e("outfits.studio.saveDraft")}),o.published?t.jsx(x,{variant:"white","data-testid":"outfit-studio-unpublish",disabled:M,onClick:()=>void st(!1),children:e("outfits.studio.unpublish")}):t.jsx(x,{variant:"white","data-testid":"outfit-studio-publish",disabled:M||!yt,onClick:()=>void st(!0),children:e("outfits.studio.publish")})]})]})]})}export{Ki as OutfitStudio,Ki as default};
557
+ //# sourceMappingURL=OutfitStudio-BrRYkQSY.js.map
@@ -1,8 +1,8 @@
1
- import{j as t,L as oe,b as le,r as l}from"./react-Be4yVrKn.js";import{b as n,t as S,s as a,m as ce,B as G,n as de,o as pe,r as ue,I,w as R}from"./index-DpiavbfG.js";import{u as ge,d as me,t as he,L as xe,i as F,a as f,s as fe}from"./useStore-BFMDOUy4.js";import{E as A}from"./ErrorNotice-ButdQJd0.js";import{F as j}from"./field.styles-Ch3BrQO8.js";import"./dcl-schemas-DvvPr89r.js";import"./sentry-BZIVACz_.js";import"./ethers-DvmxokMR.js";import"./intl-AKLEHPeO.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new r.Error().stack;d&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[d]="339fe94a-9e01-4e0e-8624-040df3ddfe29",r._sentryDebugIdIdentifier="sentry-dbid-339fe94a-9e01-4e0e-8624-040df3ddfe29")}catch{}})();const ve="https://cdn.decentraland.org/@dcl/shop/1.7.1-31581211421.commit-e34f22c/_assets/template-cover-1-BETekfHg.jpeg",be="https://cdn.decentraland.org/@dcl/shop/1.7.1-31581211421.commit-e34f22c/_assets/template-cover-2-Dni9s0i_.jpeg",we=Object.assign({"../assets/creator-covers/template-cover-1.jpeg":ve,"../assets/creator-covers/template-cover-2.jpeg":be}),v=Object.entries(we).sort(([r],[d])=>r.localeCompare(d)).map(([r,d])=>({name:r.split("/").pop(),url:d})),je=ce`
1
+ import{j as t,L as oe,b as le,r as l}from"./react-kphusOoP.js";import{b as n,t as S,s as r,m as ce,B as G,n as de,o as pe,r as ue,I,w as R}from"./index-pK0njIsP.js";import{u as ge,d as me,t as he,L as xe,i as F,a as f,s as fe}from"./useStore-Cshj1ayZ.js";import{E as A}from"./ErrorNotice-DraAWK0D.js";import{F as j}from"./field.styles-DnIE_hBN.js";import"./dcl-schemas-oZ9h4ko3.js";import"./sentry-NePMG8c7.js";import"./ethers-9NkNazYH.js";import"./intl-AKLEHPeO.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new a.Error().stack;d&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[d]="0e2a4c6b-2777-47a5-a793-da48cb2b75b9",a._sentryDebugIdIdentifier="sentry-dbid-0e2a4c6b-2777-47a5-a793-da48cb2b75b9")}catch{}})();const ve="https://cdn.decentraland.org/@dcl/shop/1.7.1-31588909629.commit-83201d7/_assets/template-cover-1-BETekfHg.jpeg",be="https://cdn.decentraland.org/@dcl/shop/1.7.1-31588909629.commit-83201d7/_assets/template-cover-2-Dni9s0i_.jpeg",we=Object.assign({"../assets/creator-covers/template-cover-1.jpeg":ve,"../assets/creator-covers/template-cover-2.jpeg":be}),v=Object.entries(we).sort(([a],[d])=>a.localeCompare(d)).map(([a,d])=>({name:a.split("/").pop(),url:d})),je=ce`
2
2
  to {
3
3
  transform: rotate(360deg);
4
4
  }
5
- `,Se=a.div`
5
+ `,Se=r.div`
6
6
  display: flex;
7
7
  align-items: center;
8
8
  justify-content: center;
@@ -16,7 +16,7 @@ import{j as t,L as oe,b as le,r as l}from"./react-Be4yVrKn.js";import{b as n,t a
16
16
  flex-direction: column;
17
17
  text-align: center;
18
18
  }
19
- `,ke=a.span`
19
+ `,ke=r.span`
20
20
  flex: none;
21
21
  border-radius: 50%;
22
22
  border-style: solid;
@@ -43,21 +43,21 @@ import{j as t,L as oe,b as le,r as l}from"./react-Be4yVrKn.js";import{b as n,t a
43
43
  @media (prefers-reduced-motion: reduce) {
44
44
  animation-duration: 2s;
45
45
  }
46
- `,ye=a.span`
46
+ `,ye=r.span`
47
47
  font-size: 14px;
48
48
  font-weight: 600;
49
- `;function $e({label:r,size:d="medium",direction:b="column",className:k}){return t.jsxs(Se,{className:k,"data-testid":"spinner-box","data-direction":b,role:"status","aria-live":"polite","aria-label":r?void 0:n("spinner.loading"),children:[t.jsx(ke,{"data-testid":"spinner-box-ring","data-size":d,"aria-hidden":!0}),r?t.jsx(ye,{children:r}):null]})}const{colors:s,radius:_e,media:K}=S,Ee=a($e)`
49
+ `;function $e({label:a,size:d="medium",direction:b="column",className:k}){return t.jsxs(Se,{className:k,"data-testid":"spinner-box","data-direction":b,role:"status","aria-live":"polite","aria-label":a?void 0:n("spinner.loading"),children:[t.jsx(ke,{"data-testid":"spinner-box-ring","data-size":d,"aria-hidden":!0}),a?t.jsx(ye,{children:a}):null]})}const{colors:s,radius:_e,media:K}=S,Ee=r($e)`
50
50
  display: grid;
51
51
  place-items: center;
52
52
  min-height: 60vh;
53
- `,ze=a(G)`
53
+ `,ze=r(G)`
54
54
  align-self: center;
55
55
  min-width: 200px;
56
56
  margin-top: 8px;
57
- `,Ie=a.p`
57
+ `,Ie=r.p`
58
58
  margin: 0;
59
59
  color: ${s.gray4};
60
- `,M=a.section`
60
+ `,M=r.section`
61
61
  max-width: 640px;
62
62
  margin: 0 auto;
63
63
  padding: 8px 0 48px;
@@ -88,17 +88,17 @@ import{j as t,L as oe,b as le,r as l}from"./react-Be4yVrKn.js";import{b as n,t a
88
88
  resize: vertical;
89
89
  min-height: 88px;
90
90
  }
91
- `,Le=a.div`
91
+ `,Le=r.div`
92
92
  display: flex;
93
93
  align-items: baseline;
94
94
  justify-content: space-between;
95
95
  gap: 16px;
96
96
  flex-wrap: wrap;
97
- `,Ne=a.div`
97
+ `,Ne=r.div`
98
98
  display: flex;
99
99
  align-items: center;
100
100
  gap: 10px;
101
- `,Ce=a(oe)`
101
+ `,Ce=r(oe)`
102
102
  display: flex;
103
103
  align-items: center;
104
104
  justify-content: center;
@@ -112,10 +112,10 @@ import{j as t,L as oe,b as le,r as l}from"./react-Be4yVrKn.js";import{b as n,t a
112
112
  width: 22px;
113
113
  height: 22px;
114
114
  }
115
- `,O=a.h1`
115
+ `,O=r.h1`
116
116
  font-size: 24px;
117
117
  font-weight: 800;
118
- `,He=a.a`
118
+ `,He=r.a`
119
119
  display: inline-flex;
120
120
  align-items: center;
121
121
  gap: 6px;
@@ -131,7 +131,7 @@ import{j as t,L as oe,b as le,r as l}from"./react-Be4yVrKn.js";import{b as n,t a
131
131
  width: 15px;
132
132
  height: 15px;
133
133
  }
134
- `,Te=a.div`
134
+ `,Te=r.div`
135
135
  display: flex;
136
136
  align-items: stretch;
137
137
  border: 1px solid ${s.lineStrong};
@@ -145,7 +145,7 @@ import{j as t,L as oe,b as le,r as l}from"./react-Be4yVrKn.js";import{b as n,t a
145
145
  flex: 1;
146
146
  min-width: 0;
147
147
  }
148
- `,De=a.span`
148
+ `,De=r.span`
149
149
  display: flex;
150
150
  align-items: center;
151
151
  padding: 0 10px;
@@ -154,7 +154,7 @@ import{j as t,L as oe,b as le,r as l}from"./react-Be4yVrKn.js";import{b as n,t a
154
154
  font-size: 13px;
155
155
  white-space: nowrap;
156
156
  border-right: 1px solid ${s.lineStrong};
157
- `,Pe=a.div`
157
+ `,Pe=r.div`
158
158
  display: grid;
159
159
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
160
160
  gap: 12px;
@@ -162,7 +162,7 @@ import{j as t,L as oe,b as le,r as l}from"./react-Be4yVrKn.js";import{b as n,t a
162
162
  ${K.maxWidth("mobile")} {
163
163
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
164
164
  }
165
- `,L=a.button`
165
+ `,L=r.button`
166
166
  position: relative;
167
167
  padding: 0;
168
168
  border: 2px solid ${s.lineStrong};
@@ -223,22 +223,22 @@ import{j as t,L as oe,b as le,r as l}from"./react-Be4yVrKn.js";import{b as n,t a
223
223
  &[data-variant='upload']:hover .ico {
224
224
  background: ${s.accent};
225
225
  }
226
- `,Be=a.input`
226
+ `,Be=r.input`
227
227
  position: absolute;
228
228
  width: 1px;
229
229
  height: 1px;
230
230
  opacity: 0;
231
231
  pointer-events: none;
232
- `,Re=a.div`
232
+ `,Re=r.div`
233
233
  display: flex;
234
234
  justify-content: flex-end;
235
235
  gap: 12px;
236
236
  margin-top: 8px;
237
- `,Fe=a(G)`
237
+ `,Fe=r(G)`
238
238
  min-width: 180px;
239
239
 
240
240
  ${K.maxWidth("mobile")} {
241
241
  width: 100%;
242
242
  }
243
- `,W=1e6,V={cover:"",coverName:"",coverHash:"",description:"",links:{website:"",twitter:"",discord:"",facebook:""}};function Y(r){return`${(r/1e6).toLocaleString(void 0,{maximumFractionDigits:2})}MB`}function Je(){de({title:n("seo.storeSettings.title"),noindex:!0});const{session:r,signIn:d}=pe(),b=le(),k=ue(),u=r==null?void 0:r.address,{data:y,isLoading:q}=ge(u),[o,g]=l.useState(V),[N,C]=l.useState(V),[$,h]=l.useState(),[x,H]=l.useState(!1),[c,_]=l.useState(null),[w,J]=l.useState({}),T=l.useRef(null);l.useEffect(()=>{if(y){const e=me(y);g(e),C(e),h(void 0),_(e.cover?{url:e.cover,name:e.coverName,hash:e.coverHash}:null)}},[y]),l.useEffect(()=>{let e=!1;return Promise.all(v.map(async i=>[i.name,await he(i.url)])).then(i=>{e||J(Object.fromEntries(i))}).catch(()=>{}),()=>{e=!0}},[]);const E=l.useMemo(()=>{const e=v.find(p=>o.coverName===`cover/${p.name}`);if(e)return e.name;const i=o.coverHash?v.find(p=>w[p.name]===o.coverHash):void 0;return i==null?void 0:i.name},[o.coverName,o.coverHash,w]);l.useEffect(()=>{c!=null&&c.hash&&v.some(e=>w[e.name]===c.hash)&&_(null)},[w,c]);const D=$!==void 0&&$>W,Q=l.useMemo(()=>xe.filter(e=>!F(e,o.links[e])),[o.links]),U=D||Q.length>0,z=l.useMemo(()=>JSON.stringify(o)!==JSON.stringify(N),[o,N]),X=z&&!U&&!x;if(l.useEffect(()=>{if(!z)return;const e=i=>{i.preventDefault()};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[z]),!r)return t.jsxs(M,{"data-signin":!0,"aria-label":n("storeSettings.title"),children:[t.jsx(O,{children:n("storeSettings.title")}),t.jsx(Ie,{children:n("storeSettings.signInPrompt")}),t.jsx(ze,{variant:"white",onClick:d,children:n("storeSettings.signIn")})]});function Z(e,i){h(void 0),g(p=>({...p,cover:i,coverName:`cover/${e}`,coverHash:""}))}const ee=["image/png","image/jpeg","image/webp"];function te(e){var P;const i=(P=e.target.files)==null?void 0:P[0];if(!i||!ee.includes(i.type))return;h(i.size);const p=`cover/${i.name}`,m=new FileReader;m.onload=()=>{const B=m.result;_({url:B,name:p,hash:""}),g(ae=>({...ae,cover:B,coverName:p,coverHash:""}))},m.readAsDataURL(i)}function ie(){c&&(h(void 0),g(e=>({...e,cover:c.url,coverName:c.name,coverHash:c.hash})))}function se(e,i){const p=i?(f[e]+i).replace(/\s/g,""):"";g(m=>({...m,links:{...m.links,[e]:p}}))}function ne(e){const i=o.links[e];return e==="website"?i:i.replace(f[e],"")}async function re(){if(!(!u||!r)){H(!0);try{await fe(u,o,r.identity),C(o),h(void 0),await k.invalidateQueries({queryKey:["store",u.toLowerCase()]}),R.success(n("storeSettings.saved")),b(`/items/creator/${u}`)}catch{R.error(n("storeSettings.saveError"))}finally{H(!1)}}}return t.jsxs(M,{"aria-label":n("storeSettings.title"),children:[t.jsxs(Le,{children:[t.jsxs(Ne,{children:[u?t.jsx(Ce,{to:`/items/creator/${u}`,title:n("storeSettings.back"),"aria-label":n("storeSettings.back"),children:t.jsx(I,{name:"arrow-left"})}):null,t.jsx(O,{children:n("storeSettings.title")})]}),u?t.jsxs(He,{href:`/items/creator/${u}`,target:"_blank",rel:"noopener noreferrer",children:[n("storeSettings.seeAsGuest"),t.jsx(I,{name:"external-link"})]}):null]}),q?t.jsx(Ee,{size:"large",label:n("storeSettings.loading")}):t.jsxs(t.Fragment,{children:[t.jsxs(j,{children:[t.jsx("span",{className:"field__label",children:n("storeSettings.cover")}),t.jsxs(Pe,{role:"group","aria-label":n("storeSettings.cover"),children:[v.map(e=>{const i=E===e.name;return t.jsx(L,{type:"button","data-testid":"cover-picker-tile","data-selected":i,"aria-pressed":i,onClick:()=>Z(e.name,e.url),children:t.jsx("img",{src:e.url,alt:"",loading:"lazy"})},e.name)}),c?t.jsx(L,{type:"button","data-testid":"cover-picker-tile","data-variant":"custom","data-selected":!E,"aria-pressed":!E,onClick:ie,children:t.jsx("img",{src:c.url,alt:""})}):null,t.jsxs(L,{type:"button","data-testid":"cover-picker-tile","data-variant":"upload",onClick:()=>{var e;return(e=T.current)==null?void 0:e.click()},children:[t.jsx(I,{name:"upload"}),t.jsx("span",{children:n("storeSettings.upload")})]}),t.jsx(Be,{ref:T,type:"file",accept:"image/png, image/jpeg, image/webp","data-testid":"cover-picker-input",onChange:te})]}),D?t.jsx(A,{message:n("storeSettings.sizeError",{max:Y(W),current:Y($)})}):null]}),t.jsxs(j,{as:"label",children:[t.jsx("span",{className:"field__label",children:n("storeSettings.description")}),t.jsx("textarea",{value:o.description,rows:4,disabled:x,onChange:e=>g(i=>({...i,description:e.target.value}))})]}),t.jsxs(j,{as:"label",children:[t.jsx("span",{className:"field__label",children:n("storeSettings.website")}),t.jsx("input",{type:"url",value:o.links.website,placeholder:f.website,disabled:x,onChange:e=>g(i=>({...i,links:{...i.links,website:e.target.value.replace(/\s/g,"")}}))}),F("website",o.links.website)?null:t.jsx(A,{message:n("storeSettings.linkError",{value:f.website})})]}),["twitter","discord","facebook"].map(e=>t.jsxs(j,{as:"label",children:[t.jsx("span",{className:"field__label",children:n(`storeSettings.${e}`)}),t.jsxs(Te,{children:[t.jsx(De,{children:f[e]}),t.jsx("input",{type:"text",value:ne(e),disabled:x,onChange:i=>se(e,i.target.value)})]})]},e)),t.jsx(Re,{children:t.jsx(Fe,{variant:"white","data-testid":"store-settings-save",onClick:()=>void re(),disabled:!X,children:x?n("storeSettings.saving"):n("storeSettings.save")})})]})]})}export{Je as StoreSettings,Je as default};
244
- //# sourceMappingURL=StoreSettings-BfEbPiWg.js.map
243
+ `,W=1e6,V={cover:"",coverName:"",coverHash:"",description:"",links:{website:"",twitter:"",discord:"",facebook:""}};function Y(a){return`${(a/1e6).toLocaleString(void 0,{maximumFractionDigits:2})}MB`}function Je(){de({title:n("seo.storeSettings.title"),noindex:!0});const{session:a,signIn:d}=pe(),b=le(),k=ue(),u=a==null?void 0:a.address,{data:y,isLoading:q}=ge(u),[o,g]=l.useState(V),[N,C]=l.useState(V),[$,h]=l.useState(),[x,H]=l.useState(!1),[c,_]=l.useState(null),[w,J]=l.useState({}),T=l.useRef(null);l.useEffect(()=>{if(y){const e=me(y);g(e),C(e),h(void 0),_(e.cover?{url:e.cover,name:e.coverName,hash:e.coverHash}:null)}},[y]),l.useEffect(()=>{let e=!1;return Promise.all(v.map(async i=>[i.name,await he(i.url)])).then(i=>{e||J(Object.fromEntries(i))}).catch(()=>{}),()=>{e=!0}},[]);const E=l.useMemo(()=>{const e=v.find(p=>o.coverName===`cover/${p.name}`);if(e)return e.name;const i=o.coverHash?v.find(p=>w[p.name]===o.coverHash):void 0;return i==null?void 0:i.name},[o.coverName,o.coverHash,w]);l.useEffect(()=>{c!=null&&c.hash&&v.some(e=>w[e.name]===c.hash)&&_(null)},[w,c]);const D=$!==void 0&&$>W,Q=l.useMemo(()=>xe.filter(e=>!F(e,o.links[e])),[o.links]),U=D||Q.length>0,z=l.useMemo(()=>JSON.stringify(o)!==JSON.stringify(N),[o,N]),X=z&&!U&&!x;if(l.useEffect(()=>{if(!z)return;const e=i=>{i.preventDefault()};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[z]),!a)return t.jsxs(M,{"data-signin":!0,"aria-label":n("storeSettings.title"),children:[t.jsx(O,{children:n("storeSettings.title")}),t.jsx(Ie,{children:n("storeSettings.signInPrompt")}),t.jsx(ze,{variant:"white",onClick:d,children:n("storeSettings.signIn")})]});function Z(e,i){h(void 0),g(p=>({...p,cover:i,coverName:`cover/${e}`,coverHash:""}))}const ee=["image/png","image/jpeg","image/webp"];function te(e){var P;const i=(P=e.target.files)==null?void 0:P[0];if(!i||!ee.includes(i.type))return;h(i.size);const p=`cover/${i.name}`,m=new FileReader;m.onload=()=>{const B=m.result;_({url:B,name:p,hash:""}),g(re=>({...re,cover:B,coverName:p,coverHash:""}))},m.readAsDataURL(i)}function ie(){c&&(h(void 0),g(e=>({...e,cover:c.url,coverName:c.name,coverHash:c.hash})))}function se(e,i){const p=i?(f[e]+i).replace(/\s/g,""):"";g(m=>({...m,links:{...m.links,[e]:p}}))}function ne(e){const i=o.links[e];return e==="website"?i:i.replace(f[e],"")}async function ae(){if(!(!u||!a)){H(!0);try{await fe(u,o,a.identity),C(o),h(void 0),await k.invalidateQueries({queryKey:["store",u.toLowerCase()]}),R.success(n("storeSettings.saved")),b(`/items/creator/${u}`)}catch{R.error(n("storeSettings.saveError"))}finally{H(!1)}}}return t.jsxs(M,{"aria-label":n("storeSettings.title"),children:[t.jsxs(Le,{children:[t.jsxs(Ne,{children:[u?t.jsx(Ce,{to:`/items/creator/${u}`,title:n("storeSettings.back"),"aria-label":n("storeSettings.back"),children:t.jsx(I,{name:"arrow-left"})}):null,t.jsx(O,{children:n("storeSettings.title")})]}),u?t.jsxs(He,{href:`/items/creator/${u}`,target:"_blank",rel:"noopener noreferrer",children:[n("storeSettings.seeAsGuest"),t.jsx(I,{name:"external-link"})]}):null]}),q?t.jsx(Ee,{size:"large",label:n("storeSettings.loading")}):t.jsxs(t.Fragment,{children:[t.jsxs(j,{children:[t.jsx("span",{className:"field__label",children:n("storeSettings.cover")}),t.jsxs(Pe,{role:"group","aria-label":n("storeSettings.cover"),children:[v.map(e=>{const i=E===e.name;return t.jsx(L,{type:"button","data-testid":"cover-picker-tile","data-selected":i,"aria-pressed":i,onClick:()=>Z(e.name,e.url),children:t.jsx("img",{src:e.url,alt:"",loading:"lazy"})},e.name)}),c?t.jsx(L,{type:"button","data-testid":"cover-picker-tile","data-variant":"custom","data-selected":!E,"aria-pressed":!E,onClick:ie,children:t.jsx("img",{src:c.url,alt:""})}):null,t.jsxs(L,{type:"button","data-testid":"cover-picker-tile","data-variant":"upload",onClick:()=>{var e;return(e=T.current)==null?void 0:e.click()},children:[t.jsx(I,{name:"upload"}),t.jsx("span",{children:n("storeSettings.upload")})]}),t.jsx(Be,{ref:T,type:"file",accept:"image/png, image/jpeg, image/webp","data-testid":"cover-picker-input",onChange:te})]}),D?t.jsx(A,{message:n("storeSettings.sizeError",{max:Y(W),current:Y($)})}):null]}),t.jsxs(j,{as:"label",children:[t.jsx("span",{className:"field__label",children:n("storeSettings.description")}),t.jsx("textarea",{value:o.description,rows:4,disabled:x,onChange:e=>g(i=>({...i,description:e.target.value}))})]}),t.jsxs(j,{as:"label",children:[t.jsx("span",{className:"field__label",children:n("storeSettings.website")}),t.jsx("input",{type:"url",value:o.links.website,placeholder:f.website,disabled:x,onChange:e=>g(i=>({...i,links:{...i.links,website:e.target.value.replace(/\s/g,"")}}))}),F("website",o.links.website)?null:t.jsx(A,{message:n("storeSettings.linkError",{value:f.website})})]}),["twitter","discord","facebook"].map(e=>t.jsxs(j,{as:"label",children:[t.jsx("span",{className:"field__label",children:n(`storeSettings.${e}`)}),t.jsxs(Te,{children:[t.jsx(De,{children:f[e]}),t.jsx("input",{type:"text",value:ne(e),disabled:x,onChange:i=>se(e,i.target.value)})]})]},e)),t.jsx(Re,{children:t.jsx(Fe,{variant:"white","data-testid":"store-settings-save",onClick:()=>void ae(),disabled:!X,children:x?n("storeSettings.saving"):n("storeSettings.save")})})]})]})}export{Je as StoreSettings,Je as default};
244
+ //# sourceMappingURL=StoreSettings-DUQx_Dt6.js.map
@@ -1,4 +1,4 @@
1
- import{a as P,b as _,j as e,N as D,r as A}from"./react-Be4yVrKn.js";import{t as W,s as t,q as E,z as M,A as q,o as J,n as O,b as n,p as H,C as U,D as X,E as G,c as N,B as K,F as Q}from"./index-DpiavbfG.js";import{C as Y}from"./Confetti-C3txAlaB.js";import{J as V}from"./JumpInIcon-5OTD8Ky8.js";import{w as Z,S as ee}from"./buy-gasless-By2ertxo.js";import"./dcl-schemas-DvvPr89r.js";import"./sentry-BZIVACz_.js";import"./ethers-DvmxokMR.js";import"./intl-AKLEHPeO.js";import"./authorizations-BMn09P9I.js";import"./sendMetaTransaction-DgftRNSg.js";import"./buy-PRtCD33t.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new r.Error().stack;o&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[o]="df9e4e65-5e91-4914-83fb-425ad166fbf1",r._sentryDebugIdIdentifier="sentry-dbid-df9e4e65-5e91-4914-83fb-425ad166fbf1")}catch{}})();const{colors:i,radius:j}=W,l="@media (max-width: 600px)",S=t.div`
1
+ import{a as M,b as W,j as e,N as q,r as A}from"./react-kphusOoP.js";import{t as J,s as t,q as _,z as O,A as U,o as G,n as H,b as n,p as X,D as T,C as K,E as Q,F as Y,c as D,B as V,G as Z}from"./index-pK0njIsP.js";import{C as ee}from"./Confetti-rdNWp3rt.js";import{J as te}from"./JumpInIcon-BCg4gHDe.js";import{w as ne,S as ie}from"./buy-gasless-RbBehDyA.js";import"./dcl-schemas-oZ9h4ko3.js";import"./sentry-NePMG8c7.js";import"./ethers-9NkNazYH.js";import"./intl-AKLEHPeO.js";import"./authorizations-BzJgPMIG.js";import"./sendMetaTransaction-BOLe3OTv.js";import"./buy-CdfkuQvD.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new r.Error().stack;o&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[o]="a9df8840-dda4-49be-a590-7db908d3b622",r._sentryDebugIdIdentifier="sentry-dbid-a9df8840-dda4-49be-a590-7db908d3b622")}catch{}})();const{colors:i,radius:j}=J,l="@media (max-width: 600px)",B=t.div`
2
2
  /* Its own stacking context, above the confetti layer (z-index 0). Needed because z-index is inert without
3
3
  a position, so the content would otherwise sit below the burst regardless of order. */
4
4
  position: relative;
@@ -33,14 +33,14 @@ import{a as P,b as _,j as e,N as D,r as A}from"./react-Be4yVrKn.js";import{t as
33
33
  top: -16px;
34
34
  }
35
35
  }
36
- `,te=t.div`
36
+ `,se=t.div`
37
37
  display: flex;
38
38
  flex-direction: column;
39
39
  align-items: center;
40
40
  text-align: center;
41
41
  justify-content: center;
42
42
  min-height: 60vh;
43
- `,ne=t.span`
43
+ `,re=t.span`
44
44
  margin: 4px auto 8px;
45
45
  width: 40px;
46
46
  height: 40px;
@@ -63,24 +63,24 @@ import{a as P,b as _,j as e,N as D,r as A}from"./react-Be4yVrKn.js";import{t as
63
63
  justify-content: flex-end;
64
64
  margin: 0;
65
65
  }
66
- `,ie=t.a`
66
+ `,oe=t.a`
67
67
  display: inline-block;
68
68
  margin: 0;
69
69
  color: ${i.accent};
70
70
  font-weight: 600;
71
71
  font-size: 14px;
72
72
  text-decoration: none;
73
- `,T=t.div`
73
+ `,S=t.div`
74
74
  display: flex;
75
75
  gap: 12px;
76
76
  flex-wrap: wrap;
77
77
  justify-content: center;
78
- `,se=t.div`
78
+ `,ae=t.div`
79
79
  display: flex;
80
80
  flex-direction: column;
81
81
  gap: 12px;
82
82
  width: 100%;
83
- `,re=t.div`
83
+ `,ce=t.div`
84
84
  display: flex;
85
85
  align-items: center;
86
86
  justify-content: center;
@@ -94,12 +94,12 @@ import{a as P,b as _,j as e,N as D,r as A}from"./react-Be4yVrKn.js";import{t as
94
94
  flex-direction: column;
95
95
  border: 0;
96
96
  }
97
- `,oe=t.span`
97
+ `,de=t.span`
98
98
  flex-shrink: 0;
99
99
  width: 60px;
100
100
  height: 60px;
101
101
  line-height: 0;
102
- `,ae=t.p`
102
+ `,le=t.p`
103
103
  margin: 0;
104
104
  max-width: 640px;
105
105
  text-align: center;
@@ -114,7 +114,7 @@ import{a as P,b as _,j as e,N as D,r as A}from"./react-Be4yVrKn.js";import{t as
114
114
  ${l} {
115
115
  font-size: 17px;
116
116
  }
117
- `,ce=t.div`
117
+ `,pe=t.div`
118
118
  display: flex;
119
119
  flex-direction: column;
120
120
  padding: 24px;
@@ -128,7 +128,7 @@ import{a as P,b as _,j as e,N as D,r as A}from"./react-Be4yVrKn.js";import{t as
128
128
  background: none;
129
129
  border: 0;
130
130
  }
131
- `,de=t.div`
131
+ `,xe=t.div`
132
132
  display: flex;
133
133
  flex-direction: column;
134
134
 
@@ -138,7 +138,7 @@ import{a as P,b as _,j as e,N as D,r as A}from"./react-Be4yVrKn.js";import{t as
138
138
  border: 1px solid ${i.gray4};
139
139
  border-radius: 16px;
140
140
  }
141
- `,le=t.span`
141
+ `,he=t.span`
142
142
  display: block;
143
143
  height: 1px;
144
144
  margin: 12px 0;
@@ -147,7 +147,7 @@ import{a as P,b as _,j as e,N as D,r as A}from"./react-Be4yVrKn.js";import{t as
147
147
  ${l} {
148
148
  display: none;
149
149
  }
150
- `,pe=t.div`
150
+ `,ue=t.div`
151
151
  position: relative;
152
152
  display: flex;
153
153
  align-items: center;
@@ -163,23 +163,23 @@ import{a as P,b as _,j as e,N as D,r as A}from"./react-Be4yVrKn.js";import{t as
163
163
  ${l} {
164
164
  margin-bottom: 0;
165
165
  }
166
- `,xe=t(E)`
166
+ `,ge=t(_)`
167
167
  width: 30px;
168
168
  height: 30px;
169
169
  color: ${i.text};
170
- `,he=t.p`
170
+ `,fe=t.p`
171
171
  display: inline-flex;
172
172
  align-items: baseline;
173
173
  gap: 6px;
174
174
  margin: 0;
175
- `,ue=t.span`
175
+ `,me=t.span`
176
176
  font-size: 24px;
177
177
  font-weight: 700;
178
178
  text-transform: capitalize;
179
- `,ge=t.span`
179
+ `,be=t.span`
180
180
  font-size: 14px;
181
181
  font-weight: 400;
182
- `,fe=t.div`
182
+ `,je=t.div`
183
183
  display: grid;
184
184
  grid-template-columns: auto 1fr auto;
185
185
  align-items: center;
@@ -204,7 +204,7 @@ import{a as P,b as _,j as e,N as D,r as A}from"./react-Be4yVrKn.js";import{t as
204
204
  margin-top: 4px;
205
205
  }
206
206
  }
207
- `,me=t.div`
207
+ `,we=t.div`
208
208
  position: relative;
209
209
  flex-shrink: 0;
210
210
  width: 137px;
@@ -228,7 +228,7 @@ import{a as P,b as _,j as e,N as D,r as A}from"./react-Be4yVrKn.js";import{t as
228
228
  width: 96px;
229
229
  height: 96px;
230
230
  }
231
- `,B=t.span`
231
+ `,L=t.span`
232
232
  position: absolute;
233
233
  top: 8px;
234
234
  left: 8px;
@@ -240,14 +240,14 @@ import{a as P,b as _,j as e,N as D,r as A}from"./react-Be4yVrKn.js";import{t as
240
240
  background: ${i.dclRed};
241
241
  border-radius: ${j.chip};
242
242
  line-height: 0;
243
- `,be=t.div`
243
+ `,ye=t.div`
244
244
  flex: 1;
245
245
  min-width: 0;
246
246
  display: flex;
247
247
  flex-direction: column;
248
248
  justify-content: center;
249
249
  gap: 4px;
250
- `,je=t.div`
250
+ `,ve=t.div`
251
251
  font-weight: 700;
252
252
  font-size: 20px;
253
253
  line-height: 1.3;
@@ -259,12 +259,12 @@ import{a as P,b as _,j as e,N as D,r as A}from"./react-Be4yVrKn.js";import{t as
259
259
  ${l} {
260
260
  font-size: 16px;
261
261
  }
262
- `,we=t.span`
262
+ `,ke=t.span`
263
263
  margin-left: 8px;
264
264
  font-weight: 600;
265
265
  font-size: 13px;
266
266
  color: ${i.muted};
267
- `,ye=t(M)`
267
+ `,$e=t(O)`
268
268
  position: relative;
269
269
  z-index: 1;
270
270
  color: ${i.muted};
@@ -273,7 +273,7 @@ import{a as P,b as _,j as e,N as D,r as A}from"./react-Be4yVrKn.js";import{t as
273
273
  & [data-avatar] {
274
274
  display: none;
275
275
  }
276
- `,ve=t.div`
276
+ `,Ce=t.div`
277
277
  display: flex;
278
278
  align-items: center;
279
279
  gap: 6px;
@@ -286,17 +286,17 @@ import{a as P,b as _,j as e,N as D,r as A}from"./react-Be4yVrKn.js";import{t as
286
286
  ${l} {
287
287
  font-size: 18px;
288
288
  }
289
- `,ke=t(E)`
289
+ `,Ie=t(_)`
290
290
  width: 22px;
291
291
  height: 22px;
292
292
  background: ${i.text2};
293
- `,$e=t.div`
293
+ `,ze=t.div`
294
294
  display: flex;
295
295
  gap: 12px;
296
296
  align-items: center;
297
297
  justify-content: flex-end;
298
298
  margin-top: 4px;
299
- `,F=q`
299
+ `,P=U`
300
300
  flex: 1;
301
301
  min-width: 0;
302
302
  height: 48px;
@@ -339,16 +339,16 @@ import{a as P,b as _,j as e,N as D,r as A}from"./react-Be4yVrKn.js";import{t as
339
339
  padding: 0 12px;
340
340
  font-size: 13px;
341
341
  }
342
- `,Ce=t.button`
343
- ${F};
344
- `,ze=t.a`
345
- ${F};
346
- `,Ie=t.span`
342
+ `,E=t.button`
343
+ ${P};
344
+ `,F=t.a`
345
+ ${P};
346
+ `,Re=t.span`
347
347
  display: inline-flex;
348
348
  flex-shrink: 0;
349
349
  line-height: 0;
350
- `,z=t(K)`
350
+ `,I=t(V)`
351
351
  min-width: 160px;
352
352
  text-align: center;
353
- `;function Re(r){return null}const Ae=r=>new Promise(o=>setTimeout(o,r)),L=()=>e.jsx("svg",{viewBox:"0 0 18 18",width:"12",height:"12",children:e.jsx("path",{d:"M4 9l3.5 3.5L14 5",fill:"none",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})});function Se(r,o){const[s,d]=A.useState(r?"pending":"confirmed"),x=o?`${o.owner}-${o.contractAddress}-${o.itemId}`:"";return A.useEffect(()=>{if(!r)return;let p=!1;return(async()=>{let f=!1;for(let a=0;a<20&&!p;a++)try{await Z(r,{timeoutMs:15e3}),f=!0;break}catch(y){if(y instanceof ee)continue;p||d("failed");return}if(!p){if(!f){d("timed-out");return}if(!o){d("confirmed");return}d("indexing");for(let a=0;a<40&&!p;a++){if(await Q(o.owner,o.contractAddress,o.itemId)){p||d("confirmed");return}await Ae(3e3)}p||d("timed-out")}})(),()=>{p=!0}},[r,x]),s}const Te=N.chainId===80002?"https://decentraland.zone/jump":"https://decentraland.org/jump",Be=N.chainId===80002?"https://amoy.polygonscan.com/tx/":"https://polygonscan.com/tx/";function Ue(){var R;const{state:r,search:o}=P(),s=r??Re(),d=_(),{session:x}=J(),p=s==null?void 0:s.txHash,w=(s==null?void 0:s.items)??[],f=s!=null&&s.creditsAdded&&s.creditsAdded>0?s.creditsAdded:null,a=w[0],y=x!=null&&x.address&&(a!=null&&a.contractAddress)&&(a!=null&&a.itemId)?{owner:x.address,contractAddress:a.contractAddress,itemId:a.itemId}:null,g=Se(s!=null&&s.settled?void 0:p,y);O({title:n("seo.success.title"),noindex:!0});const h=w;if(h.length===0)return e.jsx(D,{to:"/items",replace:!0});const I=h[0],m=(R=s==null?void 0:s.txHashes)!=null&&R.length?s.txHashes:p?[p]:[],u=m.length>0&&H(x==null?void 0:x.providerType)?m.map((c,v)=>e.jsx(ie,{href:`${Be}${c}`,target:"_blank",rel:"noreferrer",children:m.length>1?n("success.viewTransactionNumbered",{n:v+1,total:m.length}):n("success.viewTransaction")},c)):null;return g!=="confirmed"?e.jsx(S,{children:e.jsx(te,{children:g==="pending"||g==="indexing"?e.jsxs(e.Fragment,{children:[e.jsx(ne,{className:"spinner","aria-hidden":!0}),e.jsx($,{children:g==="indexing"?n("success.finalizing"):n("success.processing")}),e.jsx(C,{children:g==="indexing"?e.jsxs(e.Fragment,{children:[n("success.indexingBefore")," ",h.length===1?e.jsx("strong",{children:I.name}):n("success.itemCount",{count:h.length})," ",n("success.indexingAfter")]}):e.jsxs(e.Fragment,{children:[n("success.confirmingBefore")," ",h.length===1?e.jsx("strong",{children:I.name}):n("success.itemCount",{count:h.length})," ",n("success.confirmingAfter")]})}),u?e.jsx(b,{children:u}):null]}):g==="timed-out"?e.jsxs(e.Fragment,{children:[e.jsx($,{children:n("success.stillProcessingTitle")}),e.jsxs(C,{children:[n("success.timedOutBefore")," ",e.jsx("button",{className:"link",onClick:()=>d("/activity"),children:n("nav.activity")})," ",n("success.timedOutAfter")]}),u?e.jsx(b,{children:u}):null,e.jsxs(T,{children:[e.jsx(z,{variant:"purple",onClick:()=>d("/activity"),children:n("success.viewActivity")}),e.jsx(z,{variant:"ghost",onClick:()=>d("/items"),children:n("success.keepShopping")})]})]}):e.jsxs(e.Fragment,{children:[e.jsx($,{children:n("success.failedTitle")}),e.jsx(C,{children:n("success.failedBody")}),u?e.jsx(b,{children:u}):null,e.jsx(T,{children:e.jsx(z,{variant:"purple",onClick:()=>d("/items"),children:n("success.backToShop")})})]})})}):e.jsxs(S,{children:[e.jsx(Y,{}),e.jsxs(se,{children:[e.jsxs(re,{role:"status",children:[e.jsx(oe,{"aria-hidden":!0,children:e.jsxs("svg",{viewBox:"0 0 60 60",width:"60",height:"60",children:[e.jsx("circle",{cx:"30",cy:"30",r:"30",fill:"#34ce77"}),e.jsx("path",{d:"M18 31l8 8 16-18",fill:"none",stroke:"#fff",strokeWidth:"4.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}),e.jsxs(ae,{children:[e.jsx("b",{children:n("success.bannerTitle")})," ",n("success.bannerBody")]})]}),e.jsxs(ce,{children:[f?e.jsxs(pe,{"data-testid":"success-credits",children:[e.jsx(B,{"aria-hidden":!0,children:e.jsx(L,{})}),e.jsx(xe,{}),e.jsxs(he,{children:[e.jsx(ue,{children:n("getCredits.creditsAmount",{credits:f,currency:U.name})})," ",e.jsx(ge,{children:n("getCredits.creditsAdded")})]})]}):null,h.map((c,v)=>{const k=c.quantity??1;return e.jsxs(de,{children:[v>0?e.jsx(le,{"aria-hidden":!0}):null,e.jsxs(fe,{children:[e.jsxs(me,{"data-thumb":!0,children:[c.thumbnail?e.jsx("img",{src:c.thumbnail,alt:""}):null,e.jsx(B,{"aria-hidden":!0,children:e.jsx(L,{})})]}),e.jsxs(be,{"data-info":!0,children:[e.jsxs(je,{title:c.name,children:[c.name||n("buyModal.itemFallback"),k>1?e.jsx(we,{children:n("cartCheckout.qty",{count:k})}):null]}),c.creator?e.jsx(ye,{address:c.creator,linkToProfile:!0}):null]}),e.jsxs(ve,{"data-price":!0,children:[e.jsx(ke,{}),e.jsx("span",{children:X(c.priceCredits*k)})]})]})]},c.id)})]}),u?e.jsx(b,{"data-receipt":!0,children:u}):null,e.jsxs($e,{children:[e.jsx(Ce,{"data-variant":"ghost",onClick:()=>d(G(h.map(c=>c.category))),children:n("success.myAssets")}),e.jsxs(ze,{"data-variant":"ruby",href:Te,target:"_blank",rel:"noreferrer",children:[n("success.tryInWorld"),e.jsx(Ie,{"aria-hidden":!0,children:e.jsx(V,{})})]})]})]})]})}export{Ue as Success,Ue as default};
354
- //# sourceMappingURL=Success-BG6LmjYf.js.map
353
+ `;function Ae(r){return null}const Te=r=>new Promise(o=>setTimeout(o,r)),N=()=>e.jsx("svg",{viewBox:"0 0 18 18",width:"12",height:"12",children:e.jsx("path",{d:"M4 9l3.5 3.5L14 5",fill:"none",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})});function Be(r,o){const[s,a]=A.useState(r?"pending":"confirmed"),x=o?`${o.owner}-${o.contractAddress}-${o.itemId}`:"";return A.useEffect(()=>{if(!r)return;let p=!1;return(async()=>{let f=!1;for(let c=0;c<20&&!p;c++)try{await ne(r,{timeoutMs:15e3}),f=!0;break}catch(y){if(y instanceof ie)continue;p||a("failed");return}if(!p){if(!f){a("timed-out");return}if(!o){a("confirmed");return}a("indexing");for(let c=0;c<40&&!p;c++){if(await Z(o.owner,o.contractAddress,o.itemId)){p||a("confirmed");return}await Te(3e3)}p||a("timed-out")}})(),()=>{p=!0}},[r,x]),s}const Se=D.chainId===80002?"https://decentraland.zone/jump":"https://decentraland.org/jump",Le=D.chainId===80002?"https://amoy.polygonscan.com/tx/":"https://polygonscan.com/tx/";function Ee(r){var s;const o=(s=r.find(a=>a.urn))==null?void 0:s.urn;return`decentraland://open?iap_enabled=true${o?`&urn=${encodeURIComponent(o)}`:""}`}function Xe(){var R;const{state:r,search:o}=M(),s=r??Ae(),a=W(),{session:x}=G(),p=s==null?void 0:s.txHash,w=(s==null?void 0:s.items)??[],f=s!=null&&s.creditsAdded&&s.creditsAdded>0?s.creditsAdded:null,c=w[0],y=x!=null&&x.address&&(c!=null&&c.contractAddress)&&(c!=null&&c.itemId)?{owner:x.address,contractAddress:c.contractAddress,itemId:c.itemId}:null,g=Be(s!=null&&s.settled?void 0:p,y);H({title:n("seo.success.title"),noindex:!0});const h=w;if(h.length===0)return e.jsx(q,{to:"/items",replace:!0});const z=h[0],m=(R=s==null?void 0:s.txHashes)!=null&&R.length?s.txHashes:p?[p]:[],u=m.length>0&&X(x==null?void 0:x.providerType)?m.map((d,v)=>e.jsx(oe,{href:`${Le}${d}`,target:"_blank",rel:"noreferrer",children:m.length>1?n("success.viewTransactionNumbered",{n:v+1,total:m.length}):n("success.viewTransaction")},d)):null;return g!=="confirmed"?e.jsx(B,{children:e.jsx(se,{children:g==="pending"||g==="indexing"?e.jsxs(e.Fragment,{children:[e.jsx(re,{className:"spinner","aria-hidden":!0}),e.jsx($,{children:g==="indexing"?n("success.finalizing"):n("success.processing")}),e.jsx(C,{children:g==="indexing"?e.jsxs(e.Fragment,{children:[n("success.indexingBefore")," ",h.length===1?e.jsx("strong",{children:z.name}):n("success.itemCount",{count:h.length})," ",n("success.indexingAfter")]}):e.jsxs(e.Fragment,{children:[n("success.confirmingBefore")," ",h.length===1?e.jsx("strong",{children:z.name}):n("success.itemCount",{count:h.length})," ",n("success.confirmingAfter")]})}),u?e.jsx(b,{children:u}):null]}):g==="timed-out"?e.jsxs(e.Fragment,{children:[e.jsx($,{children:n("success.stillProcessingTitle")}),e.jsxs(C,{children:[n("success.timedOutBefore")," ",e.jsx("button",{className:"link",onClick:()=>a("/activity"),children:n("nav.activity")})," ",n("success.timedOutAfter")]}),u?e.jsx(b,{children:u}):null,e.jsxs(S,{children:[e.jsx(I,{variant:"purple",onClick:()=>a("/activity"),children:n("success.viewActivity")}),e.jsx(I,{variant:"ghost",onClick:()=>a("/items"),children:n("success.keepShopping")})]})]}):e.jsxs(e.Fragment,{children:[e.jsx($,{children:n("success.failedTitle")}),e.jsx(C,{children:n("success.failedBody")}),u?e.jsx(b,{children:u}):null,e.jsx(S,{children:e.jsx(I,{variant:"purple",onClick:()=>a("/items"),children:n("success.backToShop")})})]})})}):e.jsxs(B,{children:[e.jsx(ee,{}),e.jsxs(ae,{children:[e.jsxs(ce,{role:"status",children:[e.jsx(de,{"aria-hidden":!0,children:e.jsxs("svg",{viewBox:"0 0 60 60",width:"60",height:"60",children:[e.jsx("circle",{cx:"30",cy:"30",r:"30",fill:"#34ce77"}),e.jsx("path",{d:"M18 31l8 8 16-18",fill:"none",stroke:"#fff",strokeWidth:"4.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}),e.jsxs(le,{children:[e.jsx("b",{children:n("success.bannerTitle")})," ",T()?n("success.bannerBodyIap"):n("success.bannerBody")]})]}),e.jsxs(pe,{children:[f?e.jsxs(ue,{"data-testid":"success-credits",children:[e.jsx(L,{"aria-hidden":!0,children:e.jsx(N,{})}),e.jsx(ge,{}),e.jsxs(fe,{children:[e.jsx(me,{children:n("getCredits.creditsAmount",{credits:f,currency:K.name})})," ",e.jsx(be,{children:n("getCredits.creditsAdded")})]})]}):null,h.map((d,v)=>{const k=d.quantity??1;return e.jsxs(xe,{children:[v>0?e.jsx(he,{"aria-hidden":!0}):null,e.jsxs(je,{children:[e.jsxs(we,{"data-thumb":!0,children:[d.thumbnail?e.jsx("img",{src:d.thumbnail,alt:""}):null,e.jsx(L,{"aria-hidden":!0,children:e.jsx(N,{})})]}),e.jsxs(ye,{"data-info":!0,children:[e.jsxs(ve,{title:d.name,children:[d.name||n("buyModal.itemFallback"),k>1?e.jsx(ke,{children:n("cartCheckout.qty",{count:k})}):null]}),d.creator?e.jsx($e,{address:d.creator,linkToProfile:!0}):null]}),e.jsxs(Ce,{"data-price":!0,children:[e.jsx(Ie,{}),e.jsx("span",{children:Q(d.priceCredits*k)})]})]})]},d.id)})]}),u?e.jsx(b,{"data-receipt":!0,children:u}):null,e.jsx(ze,{children:T()?e.jsxs(e.Fragment,{children:[e.jsx(E,{"data-variant":"ghost",onClick:()=>a("/overview"),children:n("success.done")}),e.jsx(F,{"data-variant":"ruby",href:Ee(h),children:n("success.goToBackpack")})]}):e.jsxs(e.Fragment,{children:[e.jsx(E,{"data-variant":"ghost",onClick:()=>a(Y(h.map(d=>d.category))),children:n("success.myAssets")}),e.jsxs(F,{"data-variant":"ruby",href:Se,target:"_blank",rel:"noreferrer",children:[n("success.tryInWorld"),e.jsx(Re,{"aria-hidden":!0,children:e.jsx(te,{})})]})]})})]})]})}export{Xe as Success,Xe as default};
354
+ //# sourceMappingURL=Success-RaPwuXOy.js.map