@dcl/shop 0.10.1-31042990976.commit-7edc9b6 → 1.0.0

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 (191) hide show
  1. package/_assets/Activity-CJO4ONwi.js +371 -0
  2. package/_assets/AnimatedBackground-CHiOSgJ6.js +97 -0
  3. package/_assets/{Assets-BzPVRWYe.js → Assets-1KVsmH01.js} +8 -8
  4. package/_assets/{Assets.styles-D4-S4NWG.js → Assets.styles-BUHnZ7Nb.js} +140 -132
  5. package/_assets/{Authorizations-gGXOHHeT.js → Authorizations-BGlyC4dr.js} +28 -26
  6. package/_assets/Cart-afrKtZvj.js +707 -0
  7. package/_assets/{CircularProgress-DNShuaaC.js → CircularProgress-K7JjSpPZ.js} +1 -1
  8. package/_assets/{Collection-CI_bqtk6.js → Collection-B0G71rJV.js} +19 -19
  9. package/_assets/CollectionCarousel-B4hzcKRb.js +816 -0
  10. package/_assets/{Confetti-DkcOmptO.js → Confetti-BBhDY6Q2.js} +1 -1
  11. package/_assets/{Creator-CFf63R4B.js → Creator-CYC3eVKx.js} +7 -7
  12. package/_assets/{ErrorNotice-C_rQ_hZp.js → ErrorNotice-CnPcFEw_.js} +1 -1
  13. package/_assets/{ExchangeController-BPF_kkCP.js → ExchangeController-BAefeOHy.js} +1 -1
  14. package/_assets/{Faq--E1fBOzk.js → Faq-D03YByjo.js} +20 -14
  15. package/_assets/{GetCredits-C2rjzPBY.js → GetCredits-Cyw0rRMV.js} +114 -80
  16. package/_assets/{Grow-CyHu9l8s.js → Grow-CPwRVF9g.js} +1 -1
  17. package/_assets/{HelpersUtil-Bh7qiwp_.js → HelpersUtil-DJC0aWJi.js} +1 -1
  18. package/_assets/{ItemDetail-CtR1YHPh.js → ItemDetail-DSuMCjR9.js} +510 -480
  19. package/_assets/LazyEmoteControls-D-xqLU4A.js +2 -0
  20. package/_assets/{LoadMore-BQIcG-2Y.js → LoadMore-CMAFsns3.js} +1 -1
  21. package/_assets/ManaPricingBanner.styles-Bb7BS6EM.js +93 -0
  22. package/_assets/{MyAssets-Dk_4queh.js → MyAssets-C5lGRPqP.js} +33 -33
  23. package/_assets/{MyFavorites-yuyxKJv4.js → MyFavorites-C1t1o6Li.js} +12 -11
  24. package/_assets/{NotFound-rquTctww.js → NotFound-Bdi_fN5j.js} +1 -1
  25. package/_assets/{NotificationsBell-CFCmzqHj.js → NotificationsBell-BQk3EV9b.js} +1 -1
  26. package/_assets/{OutfitDetail-BFc4wS6X.js → OutfitDetail-D3Mwl6KR.js} +4 -4
  27. package/_assets/{OutfitPreview-C214293j.js → OutfitPreview-BpWwkAro.js} +2 -2
  28. package/_assets/{OutfitStudio-OOy9Y3VP.js → OutfitStudio-BL7OYD9h.js} +1 -1
  29. package/_assets/{StoreSettings-BpkjL6md.js → StoreSettings-BNhzJJib.js} +1 -1
  30. package/_assets/{Success-BXjczKuA.js → Success-Cnu7oCbI.js} +1 -1
  31. package/_assets/{SwapController-CA7wAH0n.js → SwapController-BD23YCPw.js} +1 -1
  32. package/_assets/{Tooltip-BoJS18Z3.js → Tooltip-tAvMrdFp.js} +1 -1
  33. package/_assets/{TradeService-DsmKoPxy.js → TradeService-a2JgoWq2.js} +1 -1
  34. package/_assets/{W3MFrameProviderSingleton-DKeivVWe.js → W3MFrameProviderSingleton-CPDmjNiA.js} +3 -3
  35. package/_assets/{WebCryptoP256-CJPdW9Ug.js → WebCryptoP256-DIEJtB0I.js} +1 -1
  36. package/_assets/{authorizations-2Xd-ft_C.js → authorizations-HgwrWkaa.js} +1 -1
  37. package/_assets/{basic-CpO7N7NV.js → basic-B3qEjJvY.js} +1 -1
  38. package/_assets/{biconomy-HF5uwOUc.js → biconomy-CzcDC8vB.js} +1 -1
  39. package/_assets/{builder-uBBMnbtK.js → builder-TZGldT6a.js} +1 -1
  40. package/_assets/{buy-CgUGATyG.js → buy-CuFubBZY.js} +1 -1
  41. package/_assets/{buy-gasless-CVTH5KGZ.js → buy-gasless-DO6cBuJ3.js} +1 -1
  42. package/_assets/{categories-yTyOCTA2.js → categories-B3DJZe02.js} +54 -54
  43. package/_assets/{ccip-Bq1h60c1.js → ccip-CB03B_MW.js} +1 -1
  44. package/_assets/{ccip-BjT8ndU2.js → ccip-VI2-jJnV.js} +1 -1
  45. package/_assets/collectionPage.styles-DXfFyRiH.js +49 -0
  46. package/_assets/{controller-CBtSaaQD.js → controller-CEo6ipG_.js} +2 -2
  47. package/_assets/{core-CIuOeePP.js → core-DmqfUS4f.js} +4 -4
  48. package/_assets/{createSvgIcon-Dax4uwaL.js → createSvgIcon-WfOAVB94.js} +4 -4
  49. package/_assets/{custom-CYUokIbm.js → custom-bIxIBqCn.js} +1 -1
  50. package/_assets/{data-capture-6P55-IaB.js → data-capture-Dtaj6ehs.js} +1 -1
  51. package/_assets/disposePreview-5vjiqVZ0.js +1 -0
  52. package/_assets/{email-nYmfz15C.js → email-DBXWS-p0.js} +1 -1
  53. package/_assets/{embedded-wallet-D_e_UWzV.js → embedded-wallet-DqlpsZRk.js} +1 -1
  54. package/_assets/{emotion-styled.browser.esm-s1GWUoDX.js → emotion-styled.browser.esm-pOAX0dMa.js} +1 -1
  55. package/_assets/{engine-CpLQoIqI.js → engine-gP8vp-2g.js} +1 -1
  56. package/_assets/{errors-hu6Xw0D2.js → errors-WNvNILsF.js} +1 -1
  57. package/_assets/{estimate-l1-fee-CLRDa6fI.js → estimate-l1-fee-X1cvAsdL.js} +1 -1
  58. package/_assets/{execute-DqPg9Ksw.js → execute-V2l_cDAW.js} +2 -2
  59. package/_assets/{features-BtrrmffG.js → features-CFR_-yBt.js} +1 -1
  60. package/_assets/{fetchTokenMetadata-DFJ36WnI.js → fetchTokenMetadata-Do5GLuIQ.js} +2 -2
  61. package/_assets/{field.styles-XpeJ0COA.js → field.styles-ciG_OcBi.js} +1 -1
  62. package/_assets/{get-ecosystem-wallet-info-DlCx83R8.js → get-ecosystem-wallet-info-CyDTxLgQ.js} +1 -1
  63. package/_assets/{getBalance-B5ocM9g2.js → getBalance-7wKu8RUe.js} +1 -1
  64. package/_assets/{getNFT-oiyevCuO.js → getNFT-BbpUiMXR.js} +1 -1
  65. package/_assets/{getNFT-DBaH5cpy.js → getNFT-DecLUThv.js} +1 -1
  66. package/_assets/{grid.styles-Dpb8Greh.js → grid.styles-Caahz6PS.js} +1 -1
  67. package/_assets/{hashTypedData-CeLfcFPQ.js → hashTypedData-C9kgxiiE.js} +1 -1
  68. package/_assets/{hashTypedData-NanWeJ-D.js → hashTypedData-Ca524zaX.js} +1 -1
  69. package/_assets/hero-credits-mobile-C9Muog4T.webp +0 -0
  70. package/_assets/{in-app-DfEVZ7ts.js → in-app-B-disnkm.js} +1 -1
  71. package/_assets/{in-app-wallet-calls-CaankqgP.js → in-app-wallet-calls-3yighozE.js} +1 -1
  72. package/_assets/{index-De-xiANX.js → index--1pBMb8n.js} +1 -1
  73. package/_assets/{index-BNnBkkJr.js → index-2-BWsekC.js} +1 -1
  74. package/_assets/{index-DxUWfPTE.js → index-8xcbpK09.js} +1 -1
  75. package/_assets/{index-Dyf04oQ8.js → index-B6l73M7K.js} +1 -1
  76. package/_assets/{index-BJ6fvgAM.js → index-BBX5Tona.js} +1 -1
  77. package/_assets/{index-_l18b6D8.js → index-BLCTVSaC.js} +1 -1
  78. package/_assets/{index-CYd-9A8i.js → index-BMFVFrWl.js} +3 -3
  79. package/_assets/{index-CaH_IfZ9.js → index-BQB7qYN1.js} +1 -1
  80. package/_assets/index-BYP7oMPZ.css +1 -0
  81. package/_assets/{index-BMGdvlP9.js → index-Bd7SNoIN.js} +2 -2
  82. package/_assets/{index-OiVd03k_.js → index-BdQllJHM.js} +1 -1
  83. package/_assets/{index-Cbb2oZ2Y.js → index-BjEDpwxR.js} +1 -1
  84. package/_assets/{index-B4WRMX84.js → index-BrU_i04f.js} +1 -1
  85. package/_assets/{index-BGSoCmOn.js → index-BuImQh6o.js} +1 -1
  86. package/_assets/{index-COqbI5lZ.js → index-C3MGLBUO.js} +1 -1
  87. package/_assets/index-C616xNgB.js +3699 -0
  88. package/_assets/{index-DI0-gUeO.js → index-CAl290ro.js} +1 -1
  89. package/_assets/{index-BPoXI4qO.js → index-CEDBhmGn.js} +1 -1
  90. package/_assets/{index-C8Cm7Ukd.js → index-CEnhHz30.js} +1 -1
  91. package/_assets/{index-BC1n3NBn.js → index-CFziwAGz.js} +1 -1
  92. package/_assets/{index-DJxot5zE.js → index-CGcb9Mz3.js} +1 -1
  93. package/_assets/{index-DxD-NQZ2.js → index-CKkE-eRE.js} +1 -1
  94. package/_assets/{index-cpjoojGa.js → index-CONyzZZC.js} +3 -3
  95. package/_assets/{index-BHzYL11-.js → index-CO_xP_3N.js} +1 -1
  96. package/_assets/{index-BqVSjccZ.js → index-CUAEZ5zJ.js} +1 -1
  97. package/_assets/index-CZBUgvRB.js +1 -0
  98. package/_assets/{index-BXdpk7Oq.js → index-CdFrv2eV.js} +1 -1
  99. package/_assets/{index-zPBk9zxn.js → index-CjhGjrdW.js} +1 -1
  100. package/_assets/{index-w9D58X3R.js → index-CmlH9TBP.js} +1 -1
  101. package/_assets/{index-enm6a-Yh.js → index-CyITvpDL.js} +1 -1
  102. package/_assets/{index-UiKz3U--.js → index-D58OkhU1.js} +1 -1
  103. package/_assets/{index-BKYIrw8q.js → index-D9iAFl4E.js} +1 -1
  104. package/_assets/{index-CWMeoaW8.js → index-DCAUOF_r.js} +1 -1
  105. package/_assets/{index-B-kvIPu1.js → index-DCMLwiSR.js} +1 -1
  106. package/_assets/{index-CPOch-_L.js → index-DEw1jYQT.js} +1 -1
  107. package/_assets/{index-Bry4nBQ3.js → index-DJOlt1Iv.js} +1 -1
  108. package/_assets/{index-Bu9Qy6np.js → index-DKghJgJj.js} +1 -1
  109. package/_assets/{index-CaRe7gid.js → index-DNvcQt0s.js} +3 -3
  110. package/_assets/{index-jzVm2M_d.js → index-DRI1gQSo.js} +1 -1
  111. package/_assets/{index-gR7VkXwX.js → index-DUmo7598.js} +3 -3
  112. package/_assets/{index-BccvdHMd.js → index-Dag4zALf.js} +1 -1
  113. package/_assets/index-DsH_mBtT.js +622 -0
  114. package/_assets/{index-BntzHAg5.js → index-DvjyzmjB.js} +1 -1
  115. package/_assets/{index-T6PQTPj1.js → index-DxB85HDB.js} +1 -1
  116. package/_assets/{index-ChhX0J8g.js → index-Eip3e8N8.js} +1 -1
  117. package/_assets/{index-CQMg581G.js → index-Gw3Mauv_.js} +1 -1
  118. package/_assets/{index-CkvT2_Qp.js → index-JuH5W7YS.js} +2 -2
  119. package/_assets/{index-D9avTVnT.js → index-N5sgh9IC.js} +1 -1
  120. package/_assets/{index-CIJje8vF.js → index-o0b8cjRQ.js} +1 -1
  121. package/_assets/{index-Deo0xkWr.js → index-p0fxtTsZ.js} +2 -2
  122. package/_assets/{index-FaWeourd.js → index-p4Ph7ugv.js} +1 -1
  123. package/_assets/{index-B0jVlmk0.js → index-tCYP1O3W.js} +1 -1
  124. package/_assets/{index-BZQS2qMR.js → index-yiECqJCb.js} +1 -1
  125. package/_assets/{index.es-DZrZt1nk.js → index.es-C5PJ78RX.js} +1 -1
  126. package/_assets/{index.es-COh1P5q0.js → index.es-D73EniUm.js} +1 -1
  127. package/_assets/{index.es-DKfCNVgZ.js → index.es-DF_hlZIu.js} +4 -4
  128. package/_assets/{localBatchGatewayRequest-BI4PJuWG.js → localBatchGatewayRequest-DvkdRgNo.js} +1 -1
  129. package/_assets/{networks-Blxn8DDe.js → networks-7b-i0dnd.js} +1 -1
  130. package/_assets/{onramp-Dy-wl2-G.js → onramp-CoF8bFaS.js} +1 -1
  131. package/_assets/{openzeppelin-BMYbmCTg.js → openzeppelin-DcsEW8tQ.js} +1 -1
  132. package/_assets/{parseNft-C3NZ6wub.js → parseNft-CNJ2CwyE.js} +2 -2
  133. package/_assets/{parseSignature-DYiE9TKW.js → parseSignature-D0-1k6Yx.js} +1 -1
  134. package/_assets/{parseSignature-C_OIotiZ.js → parseSignature-whU_pkfu.js} +3 -3
  135. package/_assets/{passkeys-B1XwJZLc.js → passkeys-SqHHDvyI.js} +1 -1
  136. package/_assets/{pay-with-exchange-CNHEYWhj.js → pay-with-exchange-Cvr7dd94.js} +1 -1
  137. package/_assets/promo-best-rated-emotes-C6kNvB-a.png +0 -0
  138. package/_assets/promo-week-selected-outfits-BBmkZYZx.png +0 -0
  139. package/_assets/{qr-overlay-xYKFPsA7.js → qr-overlay-HlBTd234.js} +1 -1
  140. package/_assets/{receive-CZ46hzUV.js → receive-HPltMi_i.js} +1 -1
  141. package/_assets/{resolveImplementation-CjcXKJyr.js → resolveImplementation-CM1yFlGf.js} +1 -1
  142. package/_assets/{rpc-CcyaVsGv.js → rpc-CPS_djFB.js} +1 -1
  143. package/_assets/{secp256k1-CKJqWWFY.js → secp256k1-CQmdb_AD.js} +1 -1
  144. package/_assets/{secp256k1-CtAF_8et.js → secp256k1-ChRNiO68.js} +1 -1
  145. package/_assets/{secp256k1-ZiNVKyYC.js → secp256k1-DUTfCpIK.js} +1 -1
  146. package/_assets/{send-batch-transaction-BjDzAjfB.js → send-batch-transaction-Vn4JOFM5.js} +1 -1
  147. package/_assets/{send-eip712-transaction-C_cuPsBN.js → send-eip712-transaction-Qvibiwhe.js} +2 -2
  148. package/_assets/{send-gasless-transaction-nJMNrEi5.js → send-gasless-transaction-DQLcvFHt.js} +2 -2
  149. package/_assets/{send-transaction-DlrF4JVI.js → send-transaction-CZ0kapdy.js} +2 -2
  150. package/_assets/{send-C3JUT-Wt.js → send-zy_Vr6BQ.js} +1 -1
  151. package/_assets/{sendMetaTransaction-CYTRgQS4.js → sendMetaTransaction-Ba_-1nOk.js} +1 -1
  152. package/_assets/{sendRawTransaction-CrjHCLLH.js → sendRawTransaction-BUz1EYd8.js} +3 -3
  153. package/_assets/{serializeTransaction-DCwr_uqm.js → serializeTransaction-B8qCVIIu.js} +1 -1
  154. package/_assets/{session-proposal-Cr_4TYaU.js → session-proposal-BqO43SKO.js} +1 -1
  155. package/_assets/{session-request-VECe4LIn.js → session-request-DbQI-hjo.js} +2 -2
  156. package/_assets/{signing-DsQKDYvj.js → signing-CVGndCRE.js} +3 -3
  157. package/_assets/{skeleton.styles-B5haYcet.js → skeleton.styles-K9f1Sxf1.js} +1 -1
  158. package/_assets/{socials-B80b3Xbl.js → socials-CNOGl_eO.js} +1 -1
  159. package/_assets/{styled-qF6AFIDl.js → styled-CljNQW-J.js} +1 -1
  160. package/_assets/{swaps-9KfTzTvK.js → swaps-D5haogfk.js} +1 -1
  161. package/_assets/{thirdweb-C31f21KI.js → thirdweb-CC2bk-Up.js} +3 -3
  162. package/_assets/{to-serializable-transaction-DRO125BM.js → to-serializable-transaction-BB0M9pw8.js} +2 -2
  163. package/_assets/{transactionReceipt-D2IEagp9.js → transactionReceipt-puJsrtjz.js} +1 -1
  164. package/_assets/{transactions-COJcFMl1.js → transactions-BnYHwdat.js} +1 -1
  165. package/_assets/{useCreditPacks-UUgawD-U.js → useCreditPacks-xyyhS_80.js} +1 -1
  166. package/_assets/{useImportable-DdzyhNKj.js → useImportable-Bh7jH6e9.js} +1 -1
  167. package/_assets/{useInfiniteGrid-CWAXtPPS.js → useInfiniteGrid-CV4TXaLn.js} +1 -1
  168. package/_assets/{useTheme-nSt_zjh9.js → useTheme-Czw2-J4G.js} +1 -1
  169. package/_assets/{verifyHash-3joPxTRt.js → verifyHash-CAYWYGEG.js} +1 -1
  170. package/_assets/{w3m-modal-fllBGzZL.js → w3m-modal-DtofW43q.js} +1 -1
  171. package/_assets/{w3m-modal-BdMUp7-V.js → w3m-modal-Fr29zvJe.js} +1 -1
  172. package/_assets/{wait-for-tx-receipt-DLk5rirA.js → wait-for-tx-receipt-mfzWqQ40.js} +1 -1
  173. package/_assets/{wallets-p_5_3A7U.js → wallets-DT2LKaVF.js} +5 -5
  174. package/_assets/{web-connector-B1ItZy3i.js → web-connector-4TZSYYzx.js} +3 -3
  175. package/_assets/{writeContract-_6f7I-3C.js → writeContract-CEQ0n4-z.js} +1 -1
  176. package/_assets/{zoraTestnet-BegtFmVb.js → zoraTestnet-Cd1Th5ww.js} +1 -1
  177. package/index.html +11 -11
  178. package/package.json +2 -2
  179. package/_assets/Activity-Cx-gKp62.js +0 -381
  180. package/_assets/AnimatedBackground-yDvJglBx.js +0 -97
  181. package/_assets/Cart-C4zUzYSx.js +0 -669
  182. package/_assets/CollectionCarousel-BAwS8rTZ.js +0 -804
  183. package/_assets/LazyEmoteControls-BUp4tFZX.js +0 -2
  184. package/_assets/ManaPricingBanner.styles-Dj_122X4.js +0 -74
  185. package/_assets/collectionPage.styles-BOOK4JE1.js +0 -48
  186. package/_assets/disposePreview-C6zVmkpS.js +0 -1
  187. package/_assets/index-BL2RPpVH.js +0 -3390
  188. package/_assets/index-C3zA3tgr.js +0 -519
  189. package/_assets/index-D-NhBWWr.css +0 -1
  190. package/_assets/index-sW8OdK66.js +0 -1
  191. package/_assets/packs-backdrop-BcXiUPeP.webp +0 -0
@@ -1,519 +0,0 @@
1
- import{j as e,b as se,r as g,L as ae}from"./react-BYHuwl8r.js";import{t as q,s as t,w as re,y as oe,b as i,C as Q,B as E,bV as Z,z as ee,$ as de,ba as N,F as D,R as le,o as ce,A as pe,b9 as he,I as W,ab as ge,am as xe,ae as me,af as ue,bW as fe,E as we}from"./index-BL2RPpVH.js";import{c as ye,i as be,R as ve,u as je}from"./useImportable-DdzyhNKj.js";import{S as ke,C as Ce,b as $e}from"./ManaPricingBanner.styles-Dj_122X4.js";import{F as O}from"./Faq--E1fBOzk.js";import{C as U}from"./field.styles-XpeJ0COA.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./buy-CgUGATyG.js";import"./authorizations-2Xd-ft_C.js";import"./sendMetaTransaction-CYTRgQS4.js";function Se({size:a=12,...l}){return e.jsx("svg",{viewBox:"0 0 20 20",width:a,height:a,fill:"none","aria-hidden":!0,focusable:"false",...l,children:e.jsx("path",{d:"M5 10.5l3 3 7-7.5",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})}const{colors:S,radius:Ie,z:Le}=q,Te=re`
2
- 0% {
3
- transform: scale(0);
4
- opacity: 0;
5
- }
6
- 100% {
7
- transform: scale(1);
8
- opacity: 1;
9
- }
10
- `,K=t.div`
11
- position: fixed;
12
- inset: 0;
13
- background: rgba(0, 0, 0, 0.5);
14
- display: flex;
15
- overflow-y: auto;
16
- padding: 20px;
17
- // Above the global DCL navbar so the backdrop dims the full viewport (navbar included).
18
- z-index: ${Le.overlay};
19
- `,te=t.div`
20
- background: ${S.white};
21
- border-radius: ${Ie.card};
22
- padding: 24px;
23
- width: min(420px, 92vw);
24
- margin: auto;
25
- /* Never taller than the (padded) viewport, and scroll inside if the content still does not fit — on a
26
- short screen the actions used to sit off the bottom edge with no way to reach them. */
27
- max-height: 100%;
28
- overflow-y: auto;
29
- display: flex;
30
- flex-direction: column;
31
- gap: 12px;
32
-
33
- &[data-success] {
34
- text-align: center;
35
- align-items: center;
36
- }
37
- &[data-success] [data-actions] {
38
- justify-content: center;
39
- width: 100%;
40
- }
41
- `,G=t.h2`
42
- font-size: 20px;
43
- `;t.img`
44
- width: 140px;
45
- height: 140px;
46
- object-fit: contain;
47
- align-self: center;
48
- background: ${S.media};
49
- border-radius: 10px;
50
- `;const ze=t.div`
51
- position: sticky;
52
- bottom: 0;
53
- display: flex;
54
- justify-content: flex-end;
55
- gap: 10px;
56
- margin-top: 6px;
57
- padding-top: 8px;
58
- background: ${S.white};
59
- `;t.div`
60
- width: 56px;
61
- height: 56px;
62
- border-radius: 50%;
63
- background: ${S.okStrong};
64
- color: ${S.white};
65
- font-size: 30px;
66
- font-weight: 800;
67
- display: grid;
68
- place-items: center;
69
- margin: 4px auto 2px;
70
- animation: ${Te} 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.4);
71
-
72
- @media (prefers-reduced-motion: reduce) {
73
- animation: none;
74
- }
75
- `;t.p`
76
- font-weight: 700;
77
- font-size: 16px;
78
- margin: 2px 0 0;
79
- `;const{colors:f,gradients:Ae,radius:_e}=q,Me=t(te)`
80
- width: min(460px, 94vw);
81
- text-align: left;
82
- align-items: stretch;
83
- `,Ee=t.div`
84
- height: 6px;
85
- border-radius: 999px;
86
- background: ${f.line};
87
- overflow: hidden;
88
- margin: 6px 0 14px;
89
- `,Re=t.div`
90
- height: 100%;
91
- width: 0;
92
- background: ${Ae.amethyst};
93
- border-radius: 999px;
94
- transition: width 0.45s ease;
95
- `,Fe=t.ul`
96
- list-style: none;
97
- margin: 0;
98
- padding: 0;
99
- display: flex;
100
- flex-direction: column;
101
- gap: 8px;
102
- /* The elastic part of a viewport-capped modal: it gives up height before anything else. The floor is
103
- explicit because a scroll container's automatic minimum size is zero — it would otherwise collapse
104
- to nothing on a short screen instead of just showing fewer rows. */
105
- min-height: 96px;
106
- max-height: 320px;
107
- overflow-y: auto;
108
- `,Pe=t.li`
109
- display: grid;
110
- grid-template-columns: 34px 1fr auto auto;
111
- align-items: center;
112
- gap: 10px;
113
- padding: 8px;
114
- border-radius: 10px;
115
- transition: background 0.2s;
116
-
117
- &[data-status='active'] {
118
- background: ${f.rarityBg};
119
- }
120
- &[data-status='done'] {
121
- opacity: 0.75;
122
- }
123
- &[data-status='skipped'],
124
- &[data-status='failed'] {
125
- opacity: 0.6;
126
- }
127
- `,Be=t.span`
128
- width: 34px;
129
- height: 34px;
130
- border-radius: ${_e.btn};
131
- overflow: hidden;
132
- background: ${f.media};
133
- display: grid;
134
- place-items: center;
135
-
136
- & img {
137
- width: 100%;
138
- height: 100%;
139
- object-fit: contain;
140
- }
141
- `,Qe=t.span`
142
- font-weight: 600;
143
- font-size: 14px;
144
- white-space: nowrap;
145
- overflow: hidden;
146
- text-overflow: ellipsis;
147
- `,Ne=t.span`
148
- font-weight: 700;
149
- font-size: 13px;
150
- color: ${f.text2};
151
- `,qe=t.span`
152
- font-size: 12px;
153
- font-weight: 700;
154
- color: ${f.accent};
155
- display: inline-flex;
156
- align-items: center;
157
- gap: 6px;
158
- justify-content: flex-end;
159
- min-width: 74px;
160
- `,De=t.span`
161
- color: ${f.muted2};
162
- font-weight: 600;
163
- `,B=t.span`
164
- color: ${f.muted};
165
- font-weight: 600;
166
- `,We=t.span`
167
- width: 14px;
168
- height: 14px;
169
- margin: 0;
170
- border-width: 2px;
171
- `,Oe=t.span`
172
- width: 20px;
173
- height: 20px;
174
- border-radius: 50%;
175
- background: ${f.ok};
176
- color: ${f.white};
177
- display: grid;
178
- place-items: center;
179
- font-size: 12px;
180
- `,Ue=t.p`
181
- margin: 12px 0 0;
182
- `;function Ke(a,l){switch(a==null?void 0:a.step){case"cancelling":return l?i("migrate.phaseCancelConfirm"):i("migrate.phaseCancel");case"confirming-cancel":return l?i("migrate.phaseConfirmingCancel"):i("migrate.phaseConfirmingCancelManaged");case"authorising":return l?i("migrate.phaseAuthoriseConfirm"):i("migrate.phaseAuthorise");case"signing":return l?i("migrate.phaseSignConfirm"):i("migrate.phaseSign");case"publishing":return i("migrate.phasePublishing");case"indexing":return i("migrate.phaseIndexing",{attempt:a.attempt,of:a.of});default:return l?i("migrate.statusConfirm"):i("migrate.statusAdding")}}function Ge({queue:a,session:l,onClose:p,onDone:k}){const R=se(),y=oe(l.providerType),[F,L]=g.useState(()=>a.map(()=>null)),[b,T]=g.useState(null),[c,w]=g.useState(()=>a.map(()=>"pending")),[x,z]=g.useState("running"),v=g.useRef(!1);g.useEffect(()=>{if(v.current)return;v.current=!0;let s=!1;return y&&ye(a.map(r=>r.item),l.address).then(r=>{!s&&r&&T({approvals:r.approvals,total:r.total})}).catch(()=>{}),(async()=>{for(let r=0;r<a.length;r++){if(s)return;w(h=>h.map((m,u)=>u===r?"active":m));try{await be(a[r].item,a[r].priceCredits,l,{onPhase:h=>{s||L(m=>m.map((u,$)=>$===r?h:u))}}),de("Shop Migrated Listing",{item_id:a[r].item.itemId??a[r].item.oldTradeId??null,contract_address:a[r].item.contractAddress,new_price_credits:a[r].priceCredits,new_price_usd:N(a[r].priceCredits)}),s||w(h=>h.map((m,u)=>u===r?"done":m))}catch(h){if(h instanceof ve)D(h,{flow:"import_listing",step:"relist",itemId:a[r].item.itemId??a[r].item.oldTradeId}),s||w(m=>m.map((u,$)=>$===r?"unlisted":u));else{const m=h,u=m.code===4001||/reject|denied|cancel/i.test(m.message??"");u||D(h,{flow:"import_listing",itemId:a[r].item.itemId??a[r].item.oldTradeId}),s||w($=>$.map((ie,ne)=>ne===r?u?"skipped":"failed":ie))}}}s||z("finished")})(),()=>{s=!0}},[]);const C=c.filter(s=>s==="done").length,A=c.findIndex(s=>s==="active"),P=Math.round(c.filter(s=>s!=="pending"&&s!=="active").length/a.length*100);function _(){k(),p()}const M=c.filter(s=>s==="skipped"||s==="failed").length,j=c.filter(s=>s==="unlisted").length,n=g.useRef(!1);return g.useEffect(()=>{x!=="finished"||j>0||n.current||(n.current=!0,_())},[x,j]),x==="finished"?j===0?null:e.jsx(K,{role:"presentation",children:e.jsxs(te,{"data-success":!0,role:"dialog","aria-modal":"true","data-testid":"migrate-unlisted",children:[e.jsx(G,{children:i("migrate.unlistedTitle")}),e.jsxs("p",{className:"muted",style:{margin:0},children:[i("migrate.unlistedSummary",{count:j}),C>0?" "+i("migrate.listedSummary",{count:C,currency:Q.name}):"",M>0?" "+i("migrate.skippedSummary",{count:M}):""]}),e.jsxs(ze,{"data-actions":!0,children:[e.jsx(E,{variant:"ghost",onClick:_,children:i("getCredits.done")}),e.jsx(E,{variant:"purple",onClick:()=>{k(),p(),R(Z)},children:i("migrate.goToMyAssets")})]})]})}):e.jsx(K,{role:"presentation",children:e.jsxs(Me,{"data-testid":"modal",role:"dialog","aria-modal":"true","aria-live":"polite",children:[e.jsx(G,{children:i("migrate.listingTitle")}),e.jsxs("p",{className:"muted small",style:{margin:"0 0 4px"},children:[y?i("migrate.subConfirm"):i("migrate.subManaged")," ",A>=0?i("migrate.progressCount",{current:A+1,total:a.length}):""]}),e.jsx(Ee,{children:e.jsx(Re,{style:{width:`${P}%`}})}),e.jsx(Fe,{children:a.map((s,d)=>e.jsxs(Pe,{"data-status":c[d],children:[e.jsx(Be,{children:s.item.thumbnail?e.jsx("img",{src:s.item.thumbnail,alt:""}):null}),e.jsx(Qe,{title:s.item.name,children:s.item.name||i("migrate.itemFallback")}),e.jsxs(Ne,{children:[e.jsx(ee,{className:"ccy-mark"})," ",s.priceCredits.toLocaleString()]}),e.jsx(qe,{"data-testid":c[d]==="active"?"migrate-active-status":void 0,children:c[d]==="active"?e.jsxs(e.Fragment,{children:[e.jsx(We,{className:"spinner","aria-hidden":!0})," ",Ke(F[d],y)]}):c[d]==="done"?e.jsx(Oe,{children:e.jsx(Se,{})}):c[d]==="skipped"?e.jsx(B,{children:i("migrate.statusSkipped")}):c[d]==="failed"?e.jsx(B,{children:i("migrate.statusFailed")}):c[d]==="unlisted"?e.jsx(B,{title:i("migrate.unlistedTooltip"),children:i("migrate.statusUnlisted")}):e.jsx(De,{children:i("migrate.statusWaiting")})})]},s.item.oldTradeId))}),e.jsx(Ue,{className:"muted small",children:y?b?i(b.approvals>0?"migrate.hintCountApproval":"migrate.hintCount",{total:b.total}):i("migrate.hintConfirm"):i("migrate.hintManaged")})]})})}const He="data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='84.837'%20height='84.837'%20viewBox='0%200%2084.837%2084.837'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group'%3e%3cpath%20id='Vector'%20d='M29.2935%2033.6675L43.5472%2044.36C44.4303%2045.0223%2045.5311%2045.3263%2046.6288%2045.2111C47.7266%2045.0959%2048.7403%2044.5699%2049.4666%2043.7387L77.4185%2011.7925'%20stroke='url(%23paint0_linear_0_74)'%20stroke-width='6.08696'%20stroke-linecap='round'/%3e%3cpath%20id='Vector_2'%20d='M81.7935%2042.4178C81.7936%2050.6451%2079.2167%2058.6658%2074.4245%2065.3533C69.6323%2072.0409%2062.8657%2077.0594%2055.075%2079.7039C47.2843%2082.3485%2038.8609%2082.4862%2030.9879%2080.0978C23.1149%2077.7094%2016.1878%2072.9149%2011.1796%2066.3876C6.17126%2059.8603%203.33339%2051.9282%203.06452%2043.7053C2.79565%2035.4824%205.10927%2027.3818%209.68046%2020.5413C14.2516%2013.7008%2020.8507%208.46394%2028.5509%205.56634C36.251%202.66875%2044.6654%202.25594%2052.6122%204.38589'%20stroke='url(%23paint1_linear_0_74)'%20stroke-width='6.08696'%20stroke-linecap='round'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_0_74'%20x1='27.7771'%20y1='28.5159'%20x2='111.866'%20y2='17.1154'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_0_74'%20x1='0.562175'%20y1='42.4235'%20x2='139.458'%20y2='29.3377'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",{colors:o,font:Ve,media:Ye,radius:I}=q,Je=t.div`
183
- display: flex;
184
- flex-direction: column;
185
- align-items: center;
186
- gap: 24px;
187
- padding: 24px 20px 80px;
188
- `,Xe=t.div`
189
- /* 615px in the design; capped rather than fixed so it still fits a phone. */
190
- width: 100%;
191
- max-width: 615px;
192
- display: flex;
193
- flex-direction: column;
194
- align-items: center;
195
- justify-content: center;
196
- gap: 24px;
197
- padding: 16px;
198
- border-radius: ${I.modal};
199
- background: ${o.white};
200
- text-align: center;
201
- `,Ze=t.span`
202
- flex-shrink: 0;
203
- width: 105px;
204
- height: 105px;
205
- display: flex;
206
- align-items: center;
207
- justify-content: center;
208
- overflow: hidden;
209
-
210
- img {
211
- width: 84.837px;
212
- height: 84.837px;
213
- }
214
- `,et=t.div`
215
- width: 100%;
216
- display: flex;
217
- flex-direction: column;
218
- align-items: center;
219
- gap: 12px;
220
- padding-bottom: 16px;
221
- line-height: 1.6;
222
- color: ${o.text};
223
- `,tt=t.h2`
224
- margin: 0;
225
- font-size: 20px;
226
- font-weight: 700;
227
- `,it=t.p`
228
- margin: 0;
229
- font-size: 16px;
230
- font-weight: 400;
231
- `,nt=t.div`
232
- width: 310px;
233
- max-width: 100%;
234
- padding-bottom: 16px;
235
- `,st=t(E)`
236
- width: 100%;
237
- height: 56px;
238
- border-radius: 12px;
239
- font-size: 15px;
240
- /* The variant sets 0.046em, which at 15px is 0.69px; the design asks for 0.46px flat. */
241
- letter-spacing: 0.46px;
242
- `,H=t.div`
243
- max-width: 1003px;
244
- margin: 0 auto;
245
- padding-bottom: 120px;
246
- display: flex;
247
- flex-direction: column;
248
- gap: 12px;
249
- font-family: ${Ve.sans};
250
- `,at=t.header`
251
- display: flex;
252
- flex-direction: column;
253
- gap: 16px;
254
- padding: 10px 12px;
255
- `,rt=t.div`
256
- display: flex;
257
- flex-direction: column;
258
- gap: 8px;
259
- `,ot=t.h2`
260
- margin: 0;
261
- font-weight: 600;
262
- font-size: 20px;
263
- line-height: 24px;
264
- letter-spacing: 0.46px;
265
- color: ${o.text};
266
- `,dt=t.p`
267
- margin: 0;
268
- font-weight: 500;
269
- font-size: 14px;
270
- line-height: 1.334;
271
- color: ${o.muted1};
272
- `,lt=t.a`
273
- display: inline-flex;
274
- align-items: center;
275
- gap: 2px;
276
- font-weight: 600;
277
- font-size: 14px;
278
- line-height: 30px;
279
- text-decoration: underline;
280
- color: ${o.accent};
281
-
282
- .ico {
283
- width: 13px;
284
- height: 13px;
285
- }
286
- &:focus-visible {
287
- outline: 2px solid ${o.accent};
288
- outline-offset: 2px;
289
- }
290
- `,ct=t.hr`
291
- width: 100%;
292
- height: 0;
293
- margin: 0;
294
- border: 0;
295
- border-top: 1px solid ${o.gray4};
296
- `,pt=t.div`
297
- display: flex;
298
- flex-direction: column;
299
- gap: 8px;
300
- padding: 8px 12px 0;
301
- `,ht=t(ke)`
302
- font-size: 14px;
303
- line-height: 1.334;
304
- color: ${o.text2};
305
- `,gt=t.span`
306
- flex: none;
307
- display: grid;
308
- place-items: center;
309
- width: 20px;
310
- height: 20px;
311
- border-radius: ${I.pill};
312
- background: ${o.brandViolet};
313
- font-weight: 600;
314
- font-size: 12px;
315
- line-height: 1.6;
316
- color: ${o.white};
317
- `,xt=t.div`
318
- display: flex;
319
- flex-direction: column;
320
- gap: 4px;
321
- `,mt=t.label`
322
- display: flex;
323
- align-items: center;
324
- align-self: flex-start;
325
- font-size: 14px;
326
- line-height: 1.2;
327
- color: ${o.text};
328
- cursor: pointer;
329
- `,V=t.span`
330
- flex: none;
331
- display: grid;
332
- place-items: center;
333
- width: 40px;
334
- height: 40px;
335
- `,ut=t.div`
336
- display: flex;
337
- flex-direction: column;
338
- gap: 12px;
339
- `,ft=t.article`
340
- display: flex;
341
- align-items: center;
342
- flex-wrap: wrap;
343
- gap: 12px;
344
- row-gap: 8px;
345
- padding: 12px 24px 12px 0;
346
- border: 1px solid ${o.gray4};
347
- border-radius: ${I.card};
348
- background: ${o.white};
349
- overflow: hidden;
350
- transition: opacity 0.25s ease;
351
-
352
- &[data-off] {
353
- opacity: 0.5;
354
- }
355
- `,wt=t.div`
356
- flex: none;
357
- display: flex;
358
- align-items: center;
359
- `,yt=t.div`
360
- flex: none;
361
- display: grid;
362
- place-items: center;
363
- width: 74.289px;
364
- height: 74px;
365
- border-radius: 6.482px;
366
- background: ${o.media};
367
- overflow: hidden;
368
-
369
- & img {
370
- width: 61.57px;
371
- height: 61.281px;
372
- object-fit: contain;
373
- filter: drop-shadow(0.303px 1.212px 1.516px rgba(0, 0, 0, 0.1));
374
- }
375
- `,bt=t.div`
376
- /* Basis (not min-width) is what makes the price column wrap to its own line on a phone; min-width: 0
377
- then lets the name ellipsize once it is on a line of its own. */
378
- flex: 1 1 150px;
379
- min-width: 0;
380
- display: flex;
381
- flex-direction: column;
382
- justify-content: center;
383
- gap: 8px;
384
- padding: 16px 8px;
385
- `,vt=t.div`
386
- font-weight: 600;
387
- font-size: 16px;
388
- line-height: 1.2;
389
- color: ${o.text};
390
- white-space: nowrap;
391
- overflow: hidden;
392
- text-overflow: ellipsis;
393
- `,jt=t.div`
394
- display: flex;
395
- align-items: flex-end;
396
- gap: 4px;
397
- `,Y=t(le)`
398
- padding: 1.623px 6.491px;
399
- font-weight: 600;
400
- font-size: 8.56px;
401
- line-height: 11.851px;
402
-
403
- /* Same padding as the rarity chip beside it — the design sets the category chip flush with it, and
404
- only the narrower gender chip (which this row does not carry) gets the tighter inset. Restated
405
- rather than inherited because the shared chip's own icon variant is a more specific selector. */
406
- &[data-variant='icon'] {
407
- padding: 1.623px 6.491px;
408
- }
409
- &[data-variant='icon'] .ico {
410
- width: 14.605px;
411
- height: 14.605px;
412
- }
413
- `,kt=t.div`
414
- flex: none;
415
- /* Right-aligns the block on the desktop row AND on the line it wraps to on narrow screens. */
416
- margin-left: auto;
417
- display: flex;
418
- flex-direction: column;
419
- align-items: flex-end;
420
- justify-content: center;
421
- gap: 4px;
422
- `,Ct=t.div`
423
- display: flex;
424
- align-items: center;
425
- justify-content: space-between;
426
- gap: 8px;
427
- width: 144px;
428
- height: 42px;
429
- padding: 8px;
430
- border: 0.5px solid ${o.muted2};
431
- border-radius: ${I.btn};
432
- background: ${o.panel};
433
-
434
- /* The MONOCHROME credit glyph, in the text colour and matched to the amount beside it: the filled
435
- gradient mark is right for a price you are being SHOWN, and this is a price you are typing, so the
436
- unit belongs to the input's own type. 17px is the size the design draws the mark at here. */
437
- & .ico {
438
- flex: 0 0 auto;
439
- width: 17px;
440
- height: 17px;
441
- color: ${o.text};
442
- }
443
- transition:
444
- border-color 0.15s,
445
- box-shadow 0.15s;
446
-
447
- &:focus-within {
448
- border-color: ${o.accent};
449
- box-shadow: 0 0 0 3px ${o.rarityBg};
450
- }
451
- `,$t=t.input`
452
- flex: 1 1 auto;
453
- min-width: 0;
454
- border: 0;
455
- outline: 0;
456
- background: transparent;
457
- font: inherit;
458
- font-weight: 600;
459
- font-size: 16px;
460
- color: ${o.text};
461
- text-align: right;
462
- font-variant-numeric: tabular-nums;
463
- `,St=t.div`
464
- display: flex;
465
- align-items: baseline;
466
- gap: 4px;
467
- font-weight: 500;
468
- font-size: 12px;
469
- color: ${o.gray0};
470
- `,It=t.span`
471
- font-weight: 300;
472
- font-size: 10px;
473
- color: ${o.muted};
474
- `,Lt=t.div`
475
- height: 101px;
476
- border: 1px solid transparent;
477
- border-radius: ${I.card};
478
- background: linear-gradient(100deg, #ededed 30%, #f7f7f7 50%, #ededed 70%);
479
- background-size: 200% 100%;
480
- animation: shimmer 1.3s infinite linear;
481
- `,Tt=t.div`
482
- position: fixed;
483
- left: 0;
484
- right: 0;
485
- bottom: 0;
486
- z-index: 30;
487
- background: rgba(255, 255, 255, 0.9);
488
- backdrop-filter: blur(12px);
489
- border-top: 1px solid ${o.line};
490
- `,zt=t.div`
491
- max-width: 1003px;
492
- margin: 0 auto;
493
- padding: 15px 20px;
494
- display: flex;
495
- align-items: center;
496
- gap: 16px;
497
-
498
- ${Ye.maxWidth("mobile")} {
499
- padding: 12px 16px;
500
- gap: 12px;
501
- }
502
- `,At=t.div`
503
- display: flex;
504
- align-items: center;
505
- gap: 6px;
506
- font-weight: 600;
507
- font-size: 16px;
508
- color: ${o.text};
509
- `,_t=t.div`
510
- font-size: 13px;
511
- color: ${o.muted};
512
- `,Mt=t.span`
513
- flex: 1 1 auto;
514
- `,Et=t(E)`
515
- flex: none;
516
- padding: 13px 24px;
517
- `,J=t.div`
518
- padding: 16px 12px 0;
519
- `,X=[{question:"faq.sellers.whatAreQ",answer:"faq.sellers.whatAreA"},{question:"faq.sellers.whyCreditsQ",answer:"faq.sellers.whyCreditsA"},{question:"faq.sellers.receiveCreditsQ",answer:"faq.sellers.receiveCreditsA"},{question:"faq.sellers.changePriceQ",answer:"faq.sellers.changePriceA"},{question:"faq.sellers.mustSwitchQ",answer:"faq.sellers.mustSwitchA"},{question:"faq.sellers.suggestedPriceQ",answer:"faq.sellers.suggestedPriceA"}],Rt="https://docs.decentraland.org";function Ft(a){try{return fe(BigInt(a))}catch{return null}}function Yt(){const{session:a}=ce(),l=pe(),{items:p,isLoading:k}=je(),[R,y]=g.useState({}),[F,L]=g.useState(new Set),[b,T]=g.useState(null);g.useEffect(()=>{p.length&&y(n=>{const s={...n};for(const d of p)s[d.oldTradeId]==null&&(s[d.oldTradeId]=d.suggestedCredits);return s})},[p]);const c=n=>!F.has(n),w=n=>R[n.oldTradeId]??n.suggestedCredits,x=p.filter(n=>c(n.oldTradeId)),z=x.reduce((n,s)=>n+w(s),0),v=p.length>0&&x.length===p.length,C=x.length>0&&!v;function A(n,s){const d=s.replace(/[^\d]/g,"");y(r=>({...r,[n]:d===""?0:parseInt(d,10)}))}function P(n){L(s=>{const d=new Set(s);return d.has(n)?d.delete(n):d.add(n),d})}function _(){L(v?new Set(p.map(n=>n.oldTradeId)):new Set)}function M(n){return n.map(s=>({item:s,priceCredits:Math.max(1,w(s))}))}function j(){l.invalidateQueries({queryKey:["importable"]}),l.invalidateQueries({queryKey:["shop-items"]}),l.invalidateQueries({queryKey:["catalog-items"]}),l.invalidateQueries({queryKey:["overview-listings"]}),l.invalidateQueries({queryKey:["upsell-listings"]}),l.invalidateQueries({queryKey:["my-assets"]}),l.invalidateQueries({queryKey:["collection-sale-state"]}),we.success(i("importListings.toastUpdated"))}return!k&&p.length===0?e.jsxs(H,{children:[e.jsx(Je,{"data-testid":"import-empty",children:e.jsxs(Xe,{children:[e.jsx(Ze,{"aria-hidden":!0,children:e.jsx("img",{src:He,alt:"",width:85,height:85})}),e.jsxs(et,{children:[e.jsx(tt,{children:i("importListings.emptyTitle")}),e.jsx(it,{children:i("importListings.emptyBody")})]}),e.jsx(nt,{children:e.jsx(st,{as:ae,to:Z,variant:"purple",children:i("importListings.goToMyAssets")})})]})}),e.jsx(J,{children:e.jsx(O,{title:"faq.title",entries:X})})]}):e.jsxs(H,{children:[e.jsxs(at,{children:[e.jsxs(rt,{children:[e.jsx(ot,{children:i("importListings.title")}),e.jsxs("div",{children:[e.jsx(dt,{children:i("importListings.lede",{currency:he(Q.name)})}),e.jsxs(lt,{href:Rt,target:"_blank",rel:"noopener noreferrer",children:[i("importListings.learnMore"),e.jsx(W,{name:"external-link",className:"ico","aria-hidden":!0})]})]})]}),e.jsx(Ce,{})]}),e.jsx(ct,{}),e.jsxs(pt,{children:[e.jsxs(ht,{"data-testid":"import-progress",children:[e.jsx(gt,{"data-testid":"import-count",children:p.length}),i("importListings.updatePricing")]}),e.jsxs(xt,{children:[e.jsxs(mt,{children:[e.jsx(V,{children:e.jsx(U,{type:"checkbox",checked:v,ref:n=>{n&&(n.indeterminate=C)},"data-indeterminate":C,onChange:_,"data-testid":"import-select-all","aria-label":i("importListings.selectAllAria")})}),i("importListings.selectAll")]}),e.jsx(ut,{children:k?Array.from({length:4}).map((n,s)=>e.jsx(Lt,{},s)):p.map(n=>{const s=w(n),d=ge({...n,wearableCategory:n.wearableCategory??void 0}),r=Ft(n.manaWei);return e.jsxs(ft,{"data-off":c(n.oldTradeId)?void 0:!0,children:[e.jsxs(wt,{children:[e.jsx(V,{children:e.jsx(U,{type:"checkbox",checked:c(n.oldTradeId),onChange:()=>P(n.oldTradeId),"data-testid":"import-row-check","aria-label":i("importListings.includeItem",{name:n.name})})}),e.jsx(yt,{children:n.thumbnail?e.jsx("img",{src:n.thumbnail,alt:""}):null})]}),e.jsxs(bt,{children:[e.jsx(vt,{title:n.name,children:n.name||i("importListings.itemFallback")}),e.jsxs(jt,{children:[e.jsx(Y,{"data-variant":"rarity",style:{background:ue(n.rarity),color:me(n.rarity)},children:xe(n.rarity)}),d?e.jsx(Y,{"data-variant":"icon",children:e.jsx(W,{name:d,"aria-hidden":!0})}):null]})]}),e.jsxs(kt,{children:[e.jsxs(Ct,{children:[e.jsx(ee,{}),e.jsx($t,{"data-testid":"imp-price-input",inputMode:"numeric",value:s.toLocaleString(),onChange:h=>A(n.oldTradeId,h.target.value),"aria-label":i("importListings.priceAria",{currency:Q.name,name:n.name})})]}),e.jsxs(St,{children:[e.jsxs("span",{children:["$",N(s).toFixed(2)]}),r?e.jsx(It,{children:i("importListings.wasMana",{amount:r})}):null]})]})]},n.oldTradeId)})})]})]}),e.jsx(J,{children:e.jsx(O,{title:"faq.title",entries:X})}),e.jsx(Tt,{children:e.jsxs(zt,{children:[e.jsxs("div",{children:[e.jsxs(At,{children:[e.jsx($e,{})," ",z.toLocaleString()]}),e.jsx(_t,{children:i("importListings.selectedSummary",{count:x.length,usd:N(z).toFixed(2)})})]}),e.jsx(Mt,{}),e.jsx(Et,{variant:"purple",disabled:x.length===0,onClick:()=>T(M(x)),children:i("importListings.listAll",{count:x.length})})]})}),b&&a?e.jsx(Ge,{queue:b,session:a,onClose:()=>T(null),onDone:j}):null]})}export{Yt as ImportListings};
@@ -1 +0,0 @@
1
- .ico{display:inline-block;width:20px;height:20px;flex:none;background-color:currentColor;-webkit-mask-image:var(--icon-url);mask-image:var(--icon-url);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-size:contain;mask-size:contain}.ccy-mark{width:1em;height:1em;vertical-align:-.125em}.ccy-mark,.ccy{color:var(--text)}:root{--bg: #ffffff;--text: #161518;--text-2: #242129;--muted: #716b7c;--muted-1: #5e5b67;--muted-2: #a09ba8;--line: #e6e4ea;--line-strong: #a09ba8;--media: #ecebed;--panel: #f5f5f5;--chip: #ecebed;--gray-0: #43404a;--accent: #691fa9;--brand-violet: #a524b3;--rarity: #a14bf3;--rarity-bg: rgba(161, 75, 243, .3);--black-btn: #242129;--soft-white: #fcfcfc;--dcl-red: #ff2d55;--ok: #1ea672;--err: #d33;--amethyst: linear-gradient(180deg, #c640cd 0%, #691fa9 100%);--cerise: linear-gradient(135deg, #ff2d55 0%, #c640cd 100%);--radius-card: 12px;--radius-chip: 4px;--radius-btn: 8px;--radius-pill: 50px;--radius-banner: 24px;--sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;--z-overlay: 10000;--z-tooltip: 10010}*{box-sizing:border-box}html{overflow-x:clip}body{margin:0;padding-top:92px;background:var(--bg);color:var(--text);font-family:var(--sans);-webkit-font-smoothing:antialiased}@media(max-width:768px){body{padding-top:64px}}body.shop-cart-bg{background:var(--media)}#root{display:flex;flex-direction:column;min-height:calc(100vh - 92px)}@media(max-width:768px){#root{min-height:calc(100vh - 64px)}}a{color:inherit;text-decoration:none}button{font-family:inherit;cursor:pointer}h1,h2{margin:0}.muted{color:var(--muted)}.small{font-size:13px}.error{color:var(--err)}.error-notice{display:flex;align-items:center;gap:8px;margin:0;padding:10px 12px;border:1px solid rgba(221,51,51,.25);border-radius:var(--radius-btn);background:#dd333314;color:var(--err);font-size:14px;line-height:1.4;text-align:left}.error-notice__ico{flex:none;width:18px;height:18px}.error-notice__msg{color:var(--text-2)}.link{background:none;border:0;color:var(--accent);cursor:pointer;padding:0;font:inherit;font-weight:600}.page{padding:28px 54px 80px;max-width:1760px;margin:0 auto;width:100%;flex:1 0 auto;min-height:calc(100vh - 92px)}.page[data-route="/credits"]{min-height:0}.page[data-route="/overview"]{padding-top:0}.page[data-route="/cart"]{display:flex;flex-direction:column}@media(max-width:768px){.page{padding:16px 16px 56px;min-height:calc(100vh - 64px)}.page[data-route="/credits"]{min-height:0}}.placeholder{color:var(--muted);font-size:18px;padding:40px 0}.page-loading{display:grid;place-items:center;min-height:60vh}@keyframes shimmer{to{background-position:-200% 0}}.spinner{width:30px;height:30px;margin-top:14px;border-radius:50%;border:3px solid var(--line);border-top-color:var(--accent);animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.spinner{animation-duration:2s}}.skeleton{border-radius:6px;background:linear-gradient(100deg,#efeef2 30%,#e2e0e7,#efeef2 70%);background-size:200% 100%;animation:shimmer 1.4s infinite linear}@media(prefers-reduced-motion:reduce){.skeleton{animation:none}}@keyframes cart-pop-in{0%{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
@@ -1 +0,0 @@
1
- import{r as i,j as g,g as L,k as G}from"./react-BYHuwl8r.js";import{p as I,h}from"./dcl-schemas-CmtP3U6y.js";import{c1 as Pe,ai as Ie,aj as Re,ak as y,al as b,cA as U,cu as H}from"./index-BL2RPpVH.js";import{B as Me,r as Y,e as Se}from"./createSvgIcon-Dax4uwaL.js";import{n as k}from"./emotion-styled.browser.esm-s1GWUoDX.js";import{C as ze}from"./CircularProgress-DNShuaaC.js";import{g as we,a as ke,c as de,b as Te}from"./clsx-WwvpwSg0.js";import{s as ae,a as Ae}from"./styled-qF6AFIDl.js";function Ne(e){return we("MuiButton",e)}const F=ke("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),je=i.createContext({}),_e=i.createContext(void 0),Oe=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],Le=e=>{const{color:o,disableElevation:n,fullWidth:t,size:r,variant:l,classes:c}=e,u={root:["root",l,`${l}${b(o)}`,`size${b(r)}`,`${l}Size${b(r)}`,`color${b(o)}`,n&&"disableElevation",t&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${b(r)}`],endIcon:["icon","endIcon",`iconSize${b(r)}`]},f=Te(u,Ne,c);return y({},c,f)},xe=e=>y({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),$e=ae(Me,{shouldForwardProp:e=>Ae(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:n}=e;return[o.root,o[n.variant],o[`${n.variant}${b(n.color)}`],o[`size${b(n.size)}`],o[`${n.variant}Size${b(n.size)}`],n.color==="inherit"&&o.colorInherit,n.disableElevation&&o.disableElevation,n.fullWidth&&o.fullWidth]}})(({theme:e,ownerState:o})=>{var n,t;const r=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],l=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return y({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":y({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:U.alpha(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},o.variant==="text"&&o.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[o.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:U.alpha(e.palette[o.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},o.variant==="outlined"&&o.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[o.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[o.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:U.alpha(e.palette[o.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},o.variant==="contained"&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:l,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},o.variant==="contained"&&o.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[o.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[o.color].main}}),"&:active":y({},o.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${F.focusVisible}`]:y({},o.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${F.disabled}`]:y({color:(e.vars||e).palette.action.disabled},o.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},o.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},o.variant==="text"&&{padding:"6px 8px"},o.variant==="text"&&o.color!=="inherit"&&{color:(e.vars||e).palette[o.color].main},o.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},o.variant==="outlined"&&o.color!=="inherit"&&{color:(e.vars||e).palette[o.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[o.color].mainChannel} / 0.5)`:`1px solid ${U.alpha(e.palette[o.color].main,.5)}`},o.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(n=(t=e.palette).getContrastText)==null?void 0:n.call(t,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:r,boxShadow:(e.vars||e).shadows[2]},o.variant==="contained"&&o.color!=="inherit"&&{color:(e.vars||e).palette[o.color].contrastText,backgroundColor:(e.vars||e).palette[o.color].main},o.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},o.size==="small"&&o.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},o.size==="large"&&o.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},o.size==="small"&&o.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},o.size==="large"&&o.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},o.size==="small"&&o.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},o.size==="large"&&o.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},o.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${F.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${F.disabled}`]:{boxShadow:"none"}}),Be=ae("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,o)=>{const{ownerState:n}=e;return[o.startIcon,o[`iconSize${b(n.size)}`]]}})(({ownerState:e})=>y({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},xe(e))),We=ae("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,o)=>{const{ownerState:n}=e;return[o.endIcon,o[`iconSize${b(n.size)}`]]}})(({ownerState:e})=>y({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},xe(e))),Ve=i.forwardRef(function(o,n){const t=i.useContext(je),r=i.useContext(_e),l=Pe(t,o),c=Ie({props:l,name:"MuiButton"}),{children:u,color:f="primary",component:m="button",className:p,disabled:s=!1,disableElevation:S=!1,disableFocusRipple:d=!1,endIcon:x,focusVisibleClassName:C,fullWidth:T=!1,size:v="medium",startIcon:$,type:E,variant:Z="text"}=c,z=Re(c,Oe),R=y({},c,{color:f,component:m,disabled:s,disableElevation:S,disableFocusRipple:d,fullWidth:T,size:v,type:E,variant:Z}),P=Le(R),B=$&&g.jsx(Be,{className:P.startIcon,ownerState:R,children:$}),W=x&&g.jsx(We,{className:P.endIcon,ownerState:R,children:x}),V=r||"";return g.jsxs($e,y({ownerState:R,className:de(t.className,P.root,p,V),component:m,disabled:s,focusRipple:!d,focusVisibleClassName:de(P.focusVisible,C),ref:n,type:E},z,{classes:P,children:[B,u,W]}))});var A={},pe;function qe(){if(pe)return A;pe=1,Object.defineProperty(A,"__esModule",{value:!0});function e(){let o,n;const t=new Promise((r,l)=>{o=c=>{r(c),t.isPending=!1},n=c=>{l(c),t.isPending=!1}}).catch(r=>Promise.reject(r));return t.resolve=o,t.reject=n,"finally"in t||(t.finally=r=>{t.then(r),t.catch(r)}),t.isPending=!0,t}return A.future=e,A.default=e,A}var Ue=qe();const Fe=L(Ue);function ge(e){return{all:e=e||new Map,on:function(o,n){var t=e.get(o);t?t.push(n):e.set(o,[n])},off:function(o,n){var t=e.get(o);t&&(n?t.splice(t.indexOf(n)>>>0,1):e.set(o,[]))},emit:function(o,n){var t=e.get(o);t&&t.slice().map(function(r){r(n)}),(t=e.get("*"))&&t.slice().map(function(r){r(o,n)})}}}const w=new Map,ne=new Map,se=new Map,D=new Map;function fe(e){const o=document.getElementById(e);return!o||!o.contentWindow?!1:se.get(o.contentWindow)??!1}function re(e){if(e.data&&e.data.type)try{switch(e.data.type){case I.PreviewMessageType.CONTROLLER_RESPONSE:{const o=e.data.payload,{id:n}=o,t=w.get(n);t&&(w.delete(n),o.ok?t.resolve(o.result):o.ok===!1&&t.reject(new Error(o.error)));break}case I.PreviewMessageType.EMOTE_EVENT:{const o=e.data.payload,{type:n,payload:t}=o,r=e.source?ne.get(e.source):null;r&&n&&r.emit(n,t);break}case I.PreviewMessageType.LOAD:{e.source&&(se.set(e.source,!0),(D.get(e.source)||[]).filter(t=>{var r;return((r=t.data)==null?void 0:r.type)!==I.PreviewMessageType.LOAD}).forEach(re),D.delete(e.source));break}default:}}catch(o){console.error("Error processing WearablePreview message:",o)}}const De=e=>{var n;if(((n=e.data)==null?void 0:n.type)===I.PreviewMessageType.LOAD){re(e);return}if(!(e.source?se.get(e.source):!1)&&e.source){const t=D.get(e.source)||[];t.push(e),D.set(e.source,t);return}re(e)};typeof window<"u"&&window.addEventListener("message",De,!1);let me=0;function Ge(e){return function(n,t,r){const l=document.getElementById(e);if(!l||!l.contentWindow){const d=new Error("iframe not found or not accessible");return Promise.reject(d)}const c=e+"-"+me,u=Fe();w.set(c,u);const f=I.PreviewMessageType.CONTROLLER_REQUEST,m={id:c,namespace:n,method:t,params:r},p=setTimeout(()=>{w.delete(c),u.reject(new Error(`Request timeout for ${t}`))},1e4),s=u.resolve,S=u.reject;u.resolve=d=>{clearTimeout(p),s(d)},u.reject=d=>{clearTimeout(p),S(d)};try{I.sendMessage(l.contentWindow,f,m)}catch(d){const x=d instanceof Error?d.message:String(d);u.reject(new Error(`Failed to send message: ${x}`)),w.delete(c),clearTimeout(p)}return me++,u}}function He(e){const o=document.getElementById(e);if(!o)throw new Error(`Could not find an iframe with id="${e}"`);w.clear();const n=o.contentWindow?ne.get(o.contentWindow)??ge():ge();o.contentWindow&&ne.set(o.contentWindow,n);const t=Ge(e);return{scene:{getScreenshot(r,l){return t("scene","getScreenshot",[r,l])},getMetrics(){return t("scene","getMetrics",[])},changeZoom:function(r){return t("scene","changeZoom",[r])},panCamera:function(r){return t("scene","panCamera",[r])},changeCameraPosition:function(r){return t("scene","changeCameraPosition",[r])},cleanup(){return t("scene","cleanup",[])},setUsername:function(r){return t("scene","setUsername",[r])}},emote:{getLength(){return t("emote","getLength",[])},isPlaying(){return t("emote","isPlaying",[])},goTo(r){return t("emote","goTo",[r])},play(){return t("emote","play",[])},pause(){return t("emote","pause",[])},stop(){return t("emote","stop",[])},enableSound(){return t("emote","enableSound",[])},disableSound(){return t("emote","disableSound",[])},hasSound(){return t("emote","hasSound",[])},isSocialEmote(){return t("emote","isSocialEmote",[])},getSocialEmoteAnimations(){return t("emote","getSocialEmoteAnimations",[])},getPlayingSocialEmoteAnimation(){return t("emote","getPlayingSocialEmoteAnimation",[])},emote:null,events:n},physics:{setSpringBonesParams(r,l){return t("physics","setSpringBonesParams",[r,l])}}}}var N={},ve;function Ye(){if(ve)return N;ve=1;var e=H();Object.defineProperty(N,"__esModule",{value:!0}),N.default=void 0;var o=e(Y()),n=G();return N.default=(0,o.default)((0,n.jsx)("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"}),"Pause"),N}var Ze=Ye();const Je=L(Ze);var j={},be;function Qe(){if(be)return j;be=1;var e=H();Object.defineProperty(j,"__esModule",{value:!0}),j.default=void 0;var o=e(Y()),n=G();return j.default=(0,o.default)((0,n.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow"),j}var Ke=Qe();const Xe=L(Ke);var _={},ye;function eo(){if(ye)return _;ye=1;var e=H();Object.defineProperty(_,"__esModule",{value:!0}),_.default=void 0;var o=e(Y()),n=G();return _.default=(0,o.default)((0,n.jsx)("path",{d:"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63m2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71M4.27 3 3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9zM12 4 9.91 6.09 12 8.18z"}),"VolumeOff"),_}var oo=eo();const to=L(oo);var O={},he;function no(){if(he)return O;he=1;var e=H();Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var o=e(Y()),n=G();return O.default=(0,o.default)((0,n.jsx)("path",{d:"M3 9v6h4l5 5V4L7 9zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77"}),"VolumeUp"),O}var ro=no();const ao=L(ro),so=(e,o)=>{const n=i.useRef(null),[t,r]=i.useState(!1);return i.useEffect(()=>{const l=o??He(e);if(n.current=l,fe(e)){r(!0);return}const c=document.getElementById(e);if(!c){console.error(`Could not find iframe with id="${e}"`);return}if(!c.contentWindow){console.error(`Iframe contentWindow is not accessible for id="${e}"`);return}const f=m=>{var p;((p=m.data)==null?void 0:p.type)===I.PreviewMessageType.LOAD&&fe(e)&&r(!0)};return window.addEventListener("message",f),()=>{window.removeEventListener("message",f),r(!1),n.current=null}},[e,o]),{controllerRef:n,isReady:t}},io={small:16,medium:20,large:24},Ee=({children:e,startIcon:o,endIcon:n,loading:t=!1,loadingIcon:r,loadingPosition:l="center",disabled:c=!1,size:u="medium",...f})=>{const m=g.jsx(ze,{color:"inherit",size:io[u]}),p=r||m,s=t&&l==="center"?p:e;return g.jsx(Ve,{disabled:c||t,startIcon:t&&l==="start"?p:o,endIcon:t&&l==="end"?p:n,size:u,...f,children:s})},lo=k(Se)(({theme:e})=>({display:"flex",position:"absolute",width:"100%",bottom:0,margin:`${e.spacing(2)} 0`,padding:`0 ${e.spacing(3)}`,gap:e.spacing(2)})),co=k(Ee)(({theme:e})=>({width:56,height:44,padding:0,minWidth:"unset",background:"rgba(0, 0, 0, 0.64) !important","& svg":{marginLeft:e.spacing(.5)}})),uo=k(Ee)(({theme:e,muted:o})=>({marginLeft:e.spacing(2.5),minWidth:25,background:"none",padding:0,opacity:o?.5:1})),po=k("input")(({theme:e})=>({flex:1,width:"100%",background:"none",WebkitAppearance:"none","&:focus":{outline:"none"},"&::-webkit-slider-thumb":{WebkitAppearance:"none",width:24,height:24,borderRadius:10,backgroundColor:"#736e7d",overflow:"visible",cursor:"pointer",paddingBottom:e.spacing(.625),marginTop:e.spacing(-.5)},"&::-moz-range-thumb":{width:24,height:24,borderRadius:20,backgroundColor:"#736e7d",overflow:"visible",cursor:"pointer",border:"none"},"&::-ms-thumb":{width:24,height:24,borderRadius:20,backgroundColor:"#736e7d",overflow:"visible",cursor:"pointer"},"&::-webkit-slider-runnable-track":{width:300,height:15,background:"rgba(115, 110, 125, 0.32)",border:"none",borderRadius:10},"&::-moz-range-track":{width:"100%",height:15,borderRadius:10,cursor:"pointer",background:"rgba(115, 110, 125, 0.32)"}})),go=k("div")({display:"flex",alignItems:"center"}),fo=k("input")({width:56,height:44,borderRadius:5,background:"transparent",border:"1px solid rgba(115, 110, 125, 0.4)",color:"white",textAlign:"center","&:focus-visible":{outline:"1px solid"}}),mo=({wearablePreviewId:e,className:o,hideFrameInput:n,hideProgressInput:t,hidePlayButton:r,hideSoundButton:l,wearablePreviewController:c,renderPlayButton:u,renderSoundButton:f,renderProgressBar:m,renderFrameInput:p})=>{const{controllerRef:s,isReady:S}=so(e,c),[d,x]=i.useState(0),[C,T]=i.useState(!1),[v,$]=i.useState(void 0),[E,Z]=i.useState(!0),[z,R]=i.useState(void 0),[P,B]=i.useState(!1),[W,V]=i.useState(!1),J=i.useCallback(()=>{x(0)},[]),Q=i.useCallback(()=>{T(!1),x(a=>a>=Math.floor((v??0)*100)?0:a)},[v]),K=i.useCallback(()=>{T(!1)},[]),X=i.useCallback(async()=>{if(!W){let a=v;!v&&s.current&&(a=await s.current.emote.getLength()),T(!0),$(a)}},[v,W,s]),ee=i.useCallback(({length:a})=>{x(Math.ceil((a??0)*100))},[]);i.useEffect(()=>{const a=s.current;if(a)return a.emote.events.on(h.PreviewEmoteEventType.ANIMATION_PLAY,X),a.emote.events.on(h.PreviewEmoteEventType.ANIMATION_PLAYING,ee),a.emote.events.on(h.PreviewEmoteEventType.ANIMATION_END,Q),a.emote.events.on(h.PreviewEmoteEventType.ANIMATION_PAUSE,K),a.emote.events.on(h.PreviewEmoteEventType.ANIMATION_LOOP,J),()=>{a.emote.events.off(h.PreviewEmoteEventType.ANIMATION_PLAY,X),a.emote.events.off(h.PreviewEmoteEventType.ANIMATION_PLAYING,ee),a.emote.events.off(h.PreviewEmoteEventType.ANIMATION_END,Q),a.emote.events.off(h.PreviewEmoteEventType.ANIMATION_PAUSE,K),a.emote.events.off(h.PreviewEmoteEventType.ANIMATION_LOOP,J)}},[s,X,ee,Q,K,J]),i.useEffect(()=>{z===void 0&&S&&s.current&&s.current.emote.hasSound().then(a=>R(a)).catch(a=>{console.error("Error checking sound:",a),R(!1)})},[z,S,s]);const oe=i.useCallback(async()=>{if(s.current)try{await s.current.emote.play()}catch(a){console.error("Error playing emote:",a)}},[s]),te=i.useCallback(async()=>{if(s.current)try{await s.current.emote.pause()}catch(a){console.error("Error pausing emote:",a)}},[s]),ie=i.useCallback(async()=>{C?await te():await oe()},[C,oe,te]),le=i.useCallback(()=>{var a,M;E?(a=s.current)==null||a.emote.disableSound():(M=s.current)==null||M.emote.enableSound(),Z(!E)},[E,s]),q=i.useCallback(async a=>{if(isNaN(a)||!s.current)return;let M=a;const ue=v??0;ue*100<a&&(M=ue*100),x(M),V(!0);try{C&&(await s.current.emote.pause(),B(!0)),await s.current.emote.goTo(M/100)}catch(Ce){console.error("Error changing frame:",Ce)}},[v,C,s]),ce=i.useCallback(async()=>{if(V(!1),P&&s.current){try{await s.current.emote.play()}catch(a){console.error("Error resuming play:",a)}B(!1)}},[P,s]);return g.jsxs(lo,{className:o,children:[r?null:u?u({isPlaying:C,onPlay:oe,onPause:te,onToggle:ie}):g.jsx(co,{onClick:ie,children:C?g.jsx(Je,{}):g.jsx(Xe,{})}),t?null:m?m({frame:d,length:v??0,onChange:q,onMouseUp:ce}):g.jsx(po,{type:"range",value:d,max:Math.ceil((v??0)*100),min:0,step:1,onChange:a=>q(Number(a.target.value)),onMouseUp:ce}),n?null:g.jsx(go,{children:p?p({frame:Math.round(d/100),onChange:a=>q(a*100)}):g.jsx(fo,{type:"number",value:Math.round(d/100),onChange:a=>q(Number(a.target.value)*100)})}),l||!z?null:f?f({isSoundEnabled:E,hasSound:z,onToggle:le}):g.jsx(uo,{muted:!E,onClick:le,children:E?g.jsx(ao,{}):g.jsx(to,{})})]})},Io=Object.freeze(Object.defineProperty({__proto__:null,EmoteControls:mo},Symbol.toStringTag,{value:"Module"}));export{je as B,mo as E,_e as a,Ve as b,He as c,Ee as d,Io as i,so as u};