@dcl/shop 0.1.0-29254959255.commit-3cd2325 → 0.1.0-29254964718.commit-bc79b69

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 (165) hide show
  1. package/assets/{AnimatedBackground-CDUBj4y0.js → AnimatedBackground-CYPw0X0a.js} +3 -3
  2. package/assets/{Assets-NANr3qb9.js → Assets-DxS2faEZ.js} +1 -1
  3. package/assets/{Button-DqWM_3MR.js → Button-jfeZp7ca.js} +1 -1
  4. package/assets/{Cart-CTQGm_ja.js → Cart-D-1Cw1Sr.js} +1 -1
  5. package/assets/{CircularProgress-BBL7xJ_3.js → CircularProgress-CPvlc7QL.js} +1 -1
  6. package/assets/{Collection-ZuFsA8L4.js → Collection-CYi23kK5.js} +1 -1
  7. package/assets/{Creator-C0jkSnJz.js → Creator-qLB6WcFI.js} +1 -1
  8. package/assets/{ExchangeController-DVY12NoW.js → ExchangeController-V8OR0dzr.js} +1 -1
  9. package/assets/GetCredits-DPE-aWPu.js +2 -0
  10. package/assets/{HelpersUtil-Ca5EgHCl.js → HelpersUtil-CtIs2MhB.js} +1 -1
  11. package/assets/{ImportListings-3mKD8qbb.js → ImportListings-40JsDT9M.js} +1 -1
  12. package/assets/{ItemDetail-B9tJjLlJ.js → ItemDetail-I6d0cFBS.js} +2 -2
  13. package/assets/{Market-D61zxQ67.js → Market-WU7aF7sI.js} +1 -1
  14. package/assets/{MenuItem-BbaNE8Mu.js → MenuItem-w3Bac3-j.js} +1 -1
  15. package/assets/{MyAssets-C3-t_mYq.js → MyAssets-3d8acYU5.js} +1 -1
  16. package/assets/{MyFavorites--YAxltWz.js → MyFavorites-B_cD0Nva.js} +1 -1
  17. package/assets/{MyPurchases-DT6NEYdT.js → MyPurchases-BKjDwmLs.js} +1 -1
  18. package/assets/{NotFound-cPBFVHQG.js → NotFound-lbzVYbwO.js} +1 -1
  19. package/assets/{RealCheckout-B4OdfXIG.js → RealCheckout-B0bgjX2-.js} +1 -1
  20. package/assets/{ShopFooterInner-EIBXBQ5d.js → ShopFooterInner-DZ0k_kvA.js} +2 -2
  21. package/assets/{Success-QTNYiUu0.js → Success-Dg5SGZJd.js} +1 -1
  22. package/assets/{SvgIcon-DVGrnwOp.js → SvgIcon-5egtOrJ1.js} +1 -1
  23. package/assets/{SwapController-9C4gdC6w.js → SwapController-DGVAOKON.js} +1 -1
  24. package/assets/{TradeService-Bx9MzH12.js → TradeService-CFsfszzf.js} +1 -1
  25. package/assets/{W3MFrameProviderSingleton-kv89Sw6-.js → W3MFrameProviderSingleton-D-sA9voE.js} +3 -3
  26. package/assets/{WebCryptoP256-PWLKGmE2.js → WebCryptoP256-Cur58MZH.js} +1 -1
  27. package/assets/{basic-rVcDTIXu.js → basic-w3M6gfMQ.js} +1 -1
  28. package/assets/{biconomy-DkqOwXyF.js → biconomy-CYidIfsD.js} +1 -1
  29. package/assets/{buy-Bv5rL_T6.js → buy-DPkdz8_j.js} +1 -1
  30. package/assets/{buy-gasless-Dl9oiGu4.js → buy-gasless-C1f9BGN1.js} +1 -1
  31. package/assets/{ccip-CtooyqJg.js → ccip-BVFRaXzI.js} +1 -1
  32. package/assets/{ccip-DCFO-8m6.js → ccip-tqDMgLYY.js} +1 -1
  33. package/assets/{collection-eKqAvjgr.js → collection-VGK84by0.js} +1 -1
  34. package/assets/{controller-GhfmDvHC.js → controller-DX7HSWkP.js} +2 -2
  35. package/assets/{core-5Z2KWHyv.js → core-BM6gIeM_.js} +4 -4
  36. package/assets/{custom-C6zpUGAU.js → custom-CsWC_84R.js} +1 -1
  37. package/assets/{data-capture-BJ5v-o61.js → data-capture-SKbYUAS8.js} +1 -1
  38. package/assets/{decimals-DyunviVp.js → decimals-CZLlhwKd.js} +1 -1
  39. package/assets/decimals-Dx-ayJ8g.js +1 -0
  40. package/assets/{detectExtension-HSZKGRbO.js → detectExtension-BZ2-93E_.js} +1 -1
  41. package/assets/{email-j61gB4s7.js → email-DDSeTNsL.js} +1 -1
  42. package/assets/{embedded-wallet-B-wAditN.js → embedded-wallet-Brrr_aoM.js} +1 -1
  43. package/assets/{engine-CSxB2Vjm.js → engine-BFbHnKUR.js} +1 -1
  44. package/assets/{estimate-l1-fee-DsqSQ-w1.js → estimate-l1-fee-C-ypH83W.js} +1 -1
  45. package/assets/{eth_estimateGas-C82UNSAP.js → eth_estimateGas-DoUbiXjX.js} +1 -1
  46. package/assets/{eth_getStorageAt-BcOw0zaP.js → eth_getStorageAt-XRojRAyD.js} +1 -1
  47. package/assets/{eth_getTransactionCount-BfkmHf_V.js → eth_getTransactionCount-CKTG58Gl.js} +1 -1
  48. package/assets/{extractIPFS-CKOWe-1p.js → extractIPFS-CUFJqgxI.js} +1 -1
  49. package/assets/{features-XJ9gScxQ.js → features-TNRzfRjw.js} +1 -1
  50. package/assets/{fetchTokenMetadata-DtUGEjWS.js → fetchTokenMetadata-CFrMm1kS.js} +2 -2
  51. package/assets/{generateUtilityClasses-BqTxi5Sw.js → generateUtilityClasses-fINIb8L-.js} +1 -1
  52. package/assets/{get-ecosystem-wallet-info-yojC0uAC.js → get-ecosystem-wallet-info-nffk7j4l.js} +1 -1
  53. package/assets/{getBalance-CMpD2uJP.js → getBalance-BSwMlOG5.js} +1 -1
  54. package/assets/{getInstalledModules-Dp_ahHJG.js → getInstalledModules-DqnNZrIl.js} +1 -1
  55. package/assets/{getNFT-Bu3jwggk.js → getNFT-CsNxud4l.js} +1 -1
  56. package/assets/{getNFT-C8EC9Sa0.js → getNFT-D5RLr30P.js} +2 -2
  57. package/assets/{hashTypedData-BPBVYwD_.js → hashTypedData-BUM2UbU8.js} +1 -1
  58. package/assets/{hashTypedData-U5LYyrLd.js → hashTypedData-DOlGWBor.js} +1 -1
  59. package/assets/{import-Cu8VVfW_.js → import-Bvvecx-a.js} +1 -1
  60. package/assets/{in-app-wallet-calls-BP2Orkpm.js → in-app-wallet-calls-BwsYr0X-.js} +1 -1
  61. package/assets/{index-7vJT2Rc7.js → index-1W4ke6tk.js} +1 -1
  62. package/assets/{index-_RIV5Ko4.js → index-5E4Qxuys.js} +1 -1
  63. package/assets/{index-CLC_1CrD.js → index-5FJu7_pQ.js} +1 -1
  64. package/assets/{index-DxWadf5b.js → index-93I3rDvn.js} +1 -1
  65. package/assets/{index-B2r4N10f.js → index-B9e3yQ39.js} +3 -3
  66. package/assets/{index-CjauG1a_.js → index-BAVs-li0.js} +1 -1
  67. package/assets/{index-IXx60DdU.js → index-BGEefTl2.js} +2 -2
  68. package/assets/{index-CKaFkODt.js → index-BHQVkrbu.js} +1 -1
  69. package/assets/{index-Do3kfWO6.js → index-BLs4FXiR.js} +1 -1
  70. package/assets/{index-Cl3BEBGX.js → index-BN16ZkhT.js} +1 -1
  71. package/assets/{index-YgH_1ppY.js → index-BPZXZd4b.js} +3 -3
  72. package/assets/{index-DK6BFOyH.js → index-BWkZgiPu.js} +1 -1
  73. package/assets/{index-ZzQQOhdb.js → index-BlUhpggc.js} +1 -1
  74. package/assets/{index-Boh7V7mm.js → index-BsGtBIbY.js} +1 -1
  75. package/assets/{index-DZoQw4aY.js → index-ByRL-K0O.js} +1 -1
  76. package/assets/{index-DDxG-8Gu.js → index-BzNrbFS5.js} +1 -1
  77. package/assets/{index-B-3a8HUY.js → index-C-zOuzFt.js} +1 -1
  78. package/assets/{index-Cqn-WYye.js → index-C5yBkdsj.js} +1 -1
  79. package/assets/{index-CsMtLDxg.js → index-C8v4sBkt.js} +1 -1
  80. package/assets/{index-DB2-ofZ2.js → index-CBp1JvML.js} +1 -1
  81. package/assets/{index-KUQH6SSY.js → index-CIsmu4yZ.js} +1 -1
  82. package/assets/{index-KGZnnoZ8.js → index-CKP5tgqu.js} +1 -1
  83. package/assets/{index-DNU-lqWb.js → index-CK_w5rE-.js} +1 -1
  84. package/assets/{index-JXH4_6X2.js → index-CRJchE0b.js} +2 -2
  85. package/assets/{index-BkPFXYI2.js → index-CVEtsrwz.js} +1 -1
  86. package/assets/{index-BVtD7LOo.js → index-CaT4Yoza.js} +1 -1
  87. package/assets/{index-6UZiNOm8.js → index-Cccog_Wr.js} +1 -1
  88. package/assets/{index-CqgmbxdM.js → index-CdglnCaM.js} +1 -1
  89. package/assets/{index-BJHE167Q.js → index-CrAp-Hqd.js} +1 -1
  90. package/assets/{index-DuDlVW1U.js → index-D2VoAnKZ.js} +1 -1
  91. package/assets/{index-B7OlhSeG.js → index-DBgz21lR.js} +1 -1
  92. package/assets/{index-SnX7JYIG.js → index-DGI8RsK5.js} +1 -1
  93. package/assets/{index-6oDymZWR.js → index-DGb0-PGf.js} +1 -1
  94. package/assets/{index-Bo-mQR8I.js → index-DOxmIwh4.js} +1 -1
  95. package/assets/{index-DXi8gKNe.js → index-DQUQfZyN.js} +1 -1
  96. package/assets/{index-3oy1YetG.js → index-DT_ZoznA.js} +1 -1
  97. package/assets/{index-BOdLHYvg.js → index-DYWK8g8J.js} +1 -1
  98. package/assets/{index-B8g5zh3J.js → index-Dhamn116.js} +1 -1
  99. package/assets/{index-WNGJ9Ytg.js → index-DkRoZ1kn.js} +1 -1
  100. package/assets/{index-D3nSaxcC.js → index-DkYuWNYd.js} +1 -1
  101. package/assets/{index-DredIDCG.js → index-Dn_nS3H8.js} +1 -1
  102. package/assets/{index-B9u2XRPF.js → index-DoV0ZXV-.js} +1 -1
  103. package/assets/{index-DvXHw62x.js → index-Dya1qtKt.js} +1 -1
  104. package/assets/{index-Sz6yV1AN.js → index-Dyy2Vrl8.js} +1 -1
  105. package/assets/{index-mUuAO2ml.js → index-NmDgDGPG.js} +1 -1
  106. package/assets/{index-DC3L0_Kx.js → index-OpBhEJ0O.js} +5 -5
  107. package/assets/{index-B7Z9rZTg.js → index-SmBWdodi.js} +1 -1
  108. package/assets/{index-uNE5Ox4P.js → index-UZsYrJpx.js} +1 -1
  109. package/assets/{index-DM1AwHt_.js → index-pBIbi3sY.js} +1 -1
  110. package/assets/{index-B9jRxa7Y.js → index-rziIJjT3.js} +1 -1
  111. package/assets/{index-CIwwzuMJ.js → index-w4da2I_c.js} +2 -2
  112. package/assets/{index-BfYQUwfq.js → index-xfTQqZlI.js} +1 -1
  113. package/assets/{index-CZPmTNzF.js → index-y18oYnpV.js} +1 -1
  114. package/assets/{index.es-BFUliaII.js → index.es-B2m0dGuK.js} +1 -1
  115. package/assets/{index.es-CFYNDRAV.js → index.es-Bz88joRt.js} +1 -1
  116. package/assets/{index.es-BadTMk3h.js → index.es-WVKi35_9.js} +4 -4
  117. package/assets/{localBatchGatewayRequest-Cclkr3d7.js → localBatchGatewayRequest-Dx1Ngoiv.js} +1 -1
  118. package/assets/{mana-rate-CgBtfPJ6.js → mana-rate-BwWfDtJA.js} +1 -1
  119. package/assets/network-Ecp55o0j.js +1 -0
  120. package/assets/{networks-CM3sGb4g.js → networks-DV6L3hZH.js} +1 -1
  121. package/assets/{onramp-DDJcttCc.js → onramp-BgQ1VTr3.js} +1 -1
  122. package/assets/{openzeppelin-ceMGZM-q.js → openzeppelin-d5g8gt6k.js} +1 -1
  123. package/assets/{ownerOf-C75PqCPi.js → ownerOf-mSbNpFEc.js} +1 -1
  124. package/assets/{parseNft-gClEo5Oe.js → parseNft-BqTY16Sh.js} +2 -2
  125. package/assets/{parseSignature-B9oH4Syp.js → parseSignature-DDoIdVmZ.js} +3 -3
  126. package/assets/{parseSignature-OVARoa0M.js → parseSignature-DED62W1Z.js} +1 -1
  127. package/assets/{pay-with-exchange-CrzyGoub.js → pay-with-exchange-DtygapAt.js} +1 -1
  128. package/assets/{qr-overlay-CbfDPRwR.js → qr-overlay-BsnSx594.js} +1 -1
  129. package/assets/{receive-DnrL7aZf.js → receive-Bk_Y4nir.js} +1 -1
  130. package/assets/{resolveImplementation-Cd4HLyYY.js → resolveImplementation-2cqTuYY3.js} +1 -1
  131. package/assets/{rpc-CCo5yy8Q.js → rpc-C-_3TTfR.js} +1 -1
  132. package/assets/{secp256k1-DnzE4zk2.js → secp256k1-B6m_r9vE.js} +1 -1
  133. package/assets/{secp256k1-DStZYSGU.js → secp256k1-DJm7cf-B.js} +1 -1
  134. package/assets/{secp256k1-CyqqpLxz.js → secp256k1-DTGkWTQZ.js} +1 -1
  135. package/assets/{send-CLns-jZW.js → send-CtZgL8WM.js} +1 -1
  136. package/assets/{send-batch-transaction-DhJEXjx9.js → send-batch-transaction-D0n9dziL.js} +1 -1
  137. package/assets/{send-eip712-transaction-BTPIfxOm.js → send-eip712-transaction-BZIS831Y.js} +2 -2
  138. package/assets/{send-gasless-transaction-BAH91Jx0.js → send-gasless-transaction-DApNUzAF.js} +2 -2
  139. package/assets/{sendRawTransaction-BkJ9p7sm.js → sendRawTransaction-BoQdixC3.js} +3 -3
  140. package/assets/{serializeTransaction-DfoZ0-AM.js → serializeTransaction-DN1RjM-F.js} +1 -1
  141. package/assets/{session-proposal-D-kOKjun.js → session-proposal-BjuHQlqy.js} +1 -1
  142. package/assets/{session-request-CeKA0NjC.js → session-request-BYnkRq1D.js} +2 -2
  143. package/assets/{sha256-Djgj_foZ.js → sha256-S4mPKaQu.js} +1 -1
  144. package/assets/{signing-Bh7MmapP.js → signing-DCH_IdFq.js} +4 -4
  145. package/assets/{socials-BEJbWDsD.js → socials-BoDTcCP1.js} +1 -1
  146. package/assets/{swaps-DToo_E-Z.js → swaps-CZEay7rk.js} +1 -1
  147. package/assets/{thirdweb-ueK5F6MO.js → thirdweb-C7C9bpXy.js} +3 -3
  148. package/assets/{totalSupply-BYSgGgpL.js → totalSupply-CZT7CnUl.js} +1 -1
  149. package/assets/{transactionReceipt-CwzOJtK0.js → transactionReceipt-h0CSeAi-.js} +1 -1
  150. package/assets/{transactions-CvCj54mG.js → transactions-CbcysK7b.js} +1 -1
  151. package/assets/{useInfiniteGrid-DnX_HQZy.js → useInfiniteGrid-DcPmkTvS.js} +1 -1
  152. package/assets/{verifyHash-DutlRonP.js → verifyHash-D30bdle-.js} +1 -1
  153. package/assets/{w3m-modal-BtFBBvXP.js → w3m-modal-DKot6AnX.js} +1 -1
  154. package/assets/{w3m-modal-DB4RFiQ_.js → w3m-modal-YGSU7pfJ.js} +1 -1
  155. package/assets/{wait-for-tx-receipt-H0jp18XR.js → wait-for-tx-receipt-Dx_eJJVk.js} +1 -1
  156. package/assets/{wallet-kind-CyXbsyHc.js → wallet-kind-8FEv-QVA.js} +1 -1
  157. package/assets/{wallets-XuFRxnmh.js → wallets-C58TNTZv.js} +6 -6
  158. package/assets/{web-connector-DEXgdVv-.js → web-connector-BLGVIwAD.js} +3 -3
  159. package/assets/{writeContract-D-E_9p9e.js → writeContract-DvcMEQyV.js} +1 -1
  160. package/assets/{zoraTestnet-oUYOCNKW.js → zoraTestnet-B_y-7tzp.js} +1 -1
  161. package/index.html +8 -8
  162. package/package.json +2 -2
  163. package/assets/GetCredits-CZ4zbmx6.js +0 -2
  164. package/assets/decimals-BxZhgLeZ.js +0 -1
  165. package/assets/network-BgQHihpS.js +0 -1
@@ -1,4 +1,4 @@
1
- import{a as b,i as g,b as m}from"./lit-element-B3y9oplH.js";import{n as v,r as h}from"./class-map-CxwNmq0D.js";import{d as y}from"./index-YgH_1ppY.js";import{c as w}from"./index-DvXHw62x.js";import{j as x,e as $,i as R,p as T,R as C,M as P}from"./W3MFrameProviderSingleton-kv89Sw6-.js";const s=T({message:"",open:!1,triggerRect:{width:0,height:0,top:0,left:0},variant:"shade"}),_={state:s,subscribe(t){return R(s,()=>t(s))},subscribeKey(t,e){return $(s,t,e)},showTooltip({message:t,triggerRect:e,variant:o}){s.open=!0,s.message=t,s.triggerRect=e,s.variant=o},hide(){s.open=!1,s.message="",s.triggerRect={width:0,height:0,top:0,left:0}}},a=x(_),j=b`
1
+ import{a as b,i as g,b as m}from"./lit-element-B3y9oplH.js";import{n as v,r as h}from"./class-map-CxwNmq0D.js";import{d as y}from"./index-BPZXZd4b.js";import{c as w}from"./index-Dya1qtKt.js";import{j as x,e as $,i as R,p as T,R as C,M as P}from"./W3MFrameProviderSingleton-D-sA9voE.js";const s=T({message:"",open:!1,triggerRect:{width:0,height:0,top:0,left:0},variant:"shade"}),_={state:s,subscribe(t){return R(s,()=>t(s))},subscribeKey(t,e){return $(s,t,e)},showTooltip({message:t,triggerRect:e,variant:o}){s.open=!0,s.message=t,s.triggerRect=e,s.variant=o},hide(){s.open=!1,s.message="",s.triggerRect={width:0,height:0,top:0,left:0}}},a=x(_),j=b`
2
2
  :host {
3
3
  width: 100%;
4
4
  display: block;
@@ -1,4 +1,4 @@
1
- import{i as _,b as l,a as ve}from"./lit-element-B3y9oplH.js";import{n as b,o as f,r as h,a as Ie}from"./class-map-CxwNmq0D.js";import{d as U,r as Ne,e as Se,v as ke}from"./index-YgH_1ppY.js";import{c as C,U as _e}from"./index-DvXHw62x.js";import"./index-BfYQUwfq.js";import"./index-DxWadf5b.js";import"./index-6oDymZWR.js";import"./index-Sz6yV1AN.js";import"./index-Do3kfWO6.js";import"./index-Cqn-WYye.js";import"./index-B9jRxa7Y.js";import{$ as Ce,k as v,a0 as $e,a1 as y,b as O,a2 as Re,a3 as N,O as ce,N as A,a4 as me,C as m,q as T,E as M,S as R,n as Oe,M as G,e as Ue,i as Le,p as qe,o as P,R as z}from"./W3MFrameProviderSingleton-kv89Sw6-.js";import{au as I}from"./NetworkUtil-DDES604E.js";import"./index-BkPFXYI2.js";import{M as ge}from"./MathUtil-BGCe3rZ3.js";const De=U`
1
+ import{i as _,b as l,a as ve}from"./lit-element-B3y9oplH.js";import{n as b,o as f,r as h,a as Ie}from"./class-map-CxwNmq0D.js";import{d as U,r as Ne,e as Se,v as ke}from"./index-BPZXZd4b.js";import{c as C,U as _e}from"./index-Dya1qtKt.js";import"./index-xfTQqZlI.js";import"./index-93I3rDvn.js";import"./index-DGb0-PGf.js";import"./index-Dyy2Vrl8.js";import"./index-BLs4FXiR.js";import"./index-C5yBkdsj.js";import"./index-rziIJjT3.js";import{$ as Ce,k as v,a0 as $e,a1 as y,b as O,a2 as Re,a3 as N,O as ce,N as A,a4 as me,C as m,q as T,E as M,S as R,n as Oe,M as G,e as Ue,i as Le,p as qe,o as P,R as z}from"./W3MFrameProviderSingleton-D-sA9voE.js";import{au as I}from"./NetworkUtil-DDES604E.js";import"./index-CVEtsrwz.js";import{M as ge}from"./MathUtil-BGCe3rZ3.js";const De=U`
2
2
  :host {
3
3
  position: relative;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{i as d,b as h}from"./lit-element-B3y9oplH.js";import{n as r}from"./class-map-CxwNmq0D.js";import{e as m,n as f}from"./ref-BsAZ42-h.js";import{d as c,r as v,e as y,v as b}from"./index-YgH_1ppY.js";import{c as g,U as w}from"./index-DvXHw62x.js";const x=c`
1
+ import{i as d,b as h}from"./lit-element-B3y9oplH.js";import{n as r}from"./class-map-CxwNmq0D.js";import{e as m,n as f}from"./ref-BsAZ42-h.js";import{d as c,r as v,e as y,v as b}from"./index-BPZXZd4b.js";import{c as g,U as w}from"./index-Dya1qtKt.js";const x=c`
2
2
  :host {
3
3
  position: relative;
4
4
  display: inline-block;
@@ -1,4 +1,4 @@
1
- import{i as b,b as l,a as O}from"./lit-element-B3y9oplH.js";import{n as h,r as d}from"./class-map-CxwNmq0D.js";import{d as C,r as E,e as P}from"./index-YgH_1ppY.js";import{c as v,U as x}from"./index-DvXHw62x.js";import"./index-Cl3BEBGX.js";import"./index-Do3kfWO6.js";import{u as g,R as S,o as $,b as R,S as T}from"./W3MFrameProviderSingleton-kv89Sw6-.js";const L=C`
1
+ import{i as b,b as l,a as O}from"./lit-element-B3y9oplH.js";import{n as h,r as d}from"./class-map-CxwNmq0D.js";import{d as C,r as E,e as P}from"./index-BPZXZd4b.js";import{c as v,U as x}from"./index-Dya1qtKt.js";import"./index-BN16ZkhT.js";import"./index-BLs4FXiR.js";import{u as g,R as S,o as $,b as R,S as T}from"./W3MFrameProviderSingleton-D-sA9voE.js";const L=C`
2
2
  :host {
3
3
  position: relative;
4
4
  display: inline-block;
@@ -1,4 +1,4 @@
1
- import{i as u,b as h}from"./lit-element-B3y9oplH.js";import{n as d,o as f}from"./class-map-CxwNmq0D.js";import{c as p}from"./index-DvXHw62x.js";import{d as g,r as m,e as b}from"./index-YgH_1ppY.js";const y=g`
1
+ import{i as u,b as h}from"./lit-element-B3y9oplH.js";import{n as d,o as f}from"./class-map-CxwNmq0D.js";import{c as p}from"./index-Dya1qtKt.js";import{d as g,r as m,e as b}from"./index-BPZXZd4b.js";const y=g`
2
2
  :host {
3
3
  display: inline-flex;
4
4
  justify-content: center;
@@ -1,4 +1,4 @@
1
- import{i as m,b as n}from"./lit-element-B3y9oplH.js";import{n as r}from"./class-map-CxwNmq0D.js";import{c as u}from"./index-DvXHw62x.js";import"./index-6oDymZWR.js";import"./index-BkPFXYI2.js";import{d as g,r as p,e as x}from"./index-YgH_1ppY.js";const b=g`
1
+ import{i as m,b as n}from"./lit-element-B3y9oplH.js";import{n as r}from"./class-map-CxwNmq0D.js";import{c as u}from"./index-Dya1qtKt.js";import"./index-DGb0-PGf.js";import"./index-CVEtsrwz.js";import{d as g,r as p,e as x}from"./index-BPZXZd4b.js";const b=g`
2
2
  button {
3
3
  display: block;
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- import{w as f,i as w,b as l}from"./lit-element-B3y9oplH.js";import{n as o,o as y}from"./class-map-CxwNmq0D.js";import{c as v,U as $}from"./index-DvXHw62x.js";import"./index-6oDymZWR.js";import{d as b,r as x,e as z}from"./index-YgH_1ppY.js";import"./index-DDxG-8Gu.js";const S=f`<svg width="86" height="96" fill="none">
1
+ import{w as f,i as w,b as l}from"./lit-element-B3y9oplH.js";import{n as o,o as y}from"./class-map-CxwNmq0D.js";import{c as v,U as $}from"./index-Dya1qtKt.js";import"./index-DGb0-PGf.js";import{d as b,r as x,e as z}from"./index-BPZXZd4b.js";import"./index-BzNrbFS5.js";const S=f`<svg width="86" height="96" fill="none">
2
2
  <path
3
3
  d="M78.3244 18.926L50.1808 2.45078C45.7376 -0.150261 40.2624 -0.150262 35.8192 2.45078L7.6756 18.926C3.23322 21.5266 0.5 26.3301 0.5 31.5248V64.4752C0.5 69.6699 3.23322 74.4734 7.6756 77.074L35.8192 93.5492C40.2624 96.1503 45.7376 96.1503 50.1808 93.5492L78.3244 77.074C82.7668 74.4734 85.5 69.6699 85.5 64.4752V31.5248C85.5 26.3301 82.7668 21.5266 78.3244 18.926Z"
4
4
  />
@@ -1 +1 @@
1
- import{g as x,k as N,r as i,j as f}from"./react-Vu6nbGi5.js";import{al as he,am as ve}from"./index-DC3L0_Kx.js";import{J as L}from"./generateUtilityClasses-BqTxi5Sw.js";import{r as q,j as ye,k as Ee}from"./Button-DqWM_3MR.js";import{n as M}from"./SvgIcon-DVGrnwOp.js";import{C as we}from"./CircularProgress-BBL7xJ_3.js";var y=he(),A={},oe;function Pe(){if(oe)return A;oe=1,Object.defineProperty(A,"__esModule",{value:!0});function e(){let r,n;const t=new Promise((a,u)=>{r=c=>{a(c),t.isPending=!1},n=c=>{u(c),t.isPending=!1}}).catch(a=>Promise.reject(a));return t.resolve=r,t.reject=n,"finally"in t||(t.finally=a=>{t.then(a),t.catch(a)}),t.isPending=!0,t}return A.future=e,A.default=e,A}var be=Pe();const Se=x(be);function ae(e){return{all:e=e||new Map,on:function(r,n){var t=e.get(r);t?t.push(n):e.set(r,[n])},off:function(r,n){var t=e.get(r);t&&(n?t.splice(t.indexOf(n)>>>0,1):e.set(r,[]))},emit:function(r,n){var t=e.get(r);t&&t.slice().map(function(a){a(n)}),(t=e.get("*"))&&t.slice().map(function(a){a(r,n)})}}}const S=new Map,Y=new Map,Z=new Map,k=new Map;function se(e){const r=document.getElementById(e);return!r||!r.contentWindow?!1:Z.get(r.contentWindow)??!1}function H(e){if(e.data&&e.data.type)try{switch(e.data.type){case y.PreviewMessageType.CONTROLLER_RESPONSE:{const r=e.data.payload,{id:n}=r,t=S.get(n);t&&(S.delete(n),r.ok?t.resolve(r.result):r.ok===!1&&t.reject(new Error(r.error)));break}case y.PreviewMessageType.EMOTE_EVENT:{const r=e.data.payload,{type:n,payload:t}=r,a=e.source?Y.get(e.source):null;a&&n&&a.emit(n,t);break}case y.PreviewMessageType.LOAD:{e.source&&(Z.set(e.source,!0),(k.get(e.source)||[]).filter(t=>{var a;return((a=t.data)==null?void 0:a.type)!==y.PreviewMessageType.LOAD}).forEach(H),k.delete(e.source));break}default:}}catch(r){console.error("Error processing WearablePreview message:",r)}}const Me=e=>{var n;if(((n=e.data)==null?void 0:n.type)===y.PreviewMessageType.LOAD){H(e);return}if(!(e.source?Z.get(e.source):!1)&&e.source){const t=k.get(e.source)||[];t.push(e),k.set(e.source,t);return}H(e)};typeof window<"u"&&window.addEventListener("message",Me,!1);let ie=0;function Ae(e){return function(n,t,a){const u=document.getElementById(e);if(!u||!u.contentWindow){const d=new Error("iframe not found or not accessible");return Promise.reject(d)}const c=e+"-"+ie,l=Se();S.set(c,l);const p=y.PreviewMessageType.CONTROLLER_REQUEST,v={id:c,namespace:n,method:t,params:a},m=setTimeout(()=>{S.delete(c),l.reject(new Error(`Request timeout for ${t}`))},1e4),s=l.resolve,j=l.reject;l.resolve=d=>{clearTimeout(m),s(d)},l.reject=d=>{clearTimeout(m),j(d)};try{y.sendMessage(u.contentWindow,p,v)}catch(d){const w=d instanceof Error?d.message:String(d);l.reject(new Error(`Failed to send message: ${w}`)),S.delete(c),clearTimeout(m)}return ie++,l}}function Re(e){const r=document.getElementById(e);if(!r)throw new Error(`Could not find an iframe with id="${e}"`);S.clear();const n=r.contentWindow?Y.get(r.contentWindow)??ae():ae();r.contentWindow&&Y.set(r.contentWindow,n);const t=Ae(e);return{scene:{getScreenshot(a,u){return t("scene","getScreenshot",[a,u])},getMetrics(){return t("scene","getMetrics",[])},changeZoom:function(a){return t("scene","changeZoom",[a])},panCamera:function(a){return t("scene","panCamera",[a])},changeCameraPosition:function(a){return t("scene","changeCameraPosition",[a])},cleanup(){return t("scene","cleanup",[])},setUsername:function(a){return t("scene","setUsername",[a])}},emote:{getLength(){return t("emote","getLength",[])},isPlaying(){return t("emote","isPlaying",[])},goTo(a){return t("emote","goTo",[a])},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(a,u){return t("physics","setSpringBonesParams",[a,u])}}}}var g=ve(),R={},ue;function Te(){if(ue)return R;ue=1;var e=L();Object.defineProperty(R,"__esModule",{value:!0}),R.default=void 0;var r=e(q()),n=N();return R.default=(0,r.default)((0,n.jsx)("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"}),"Pause"),R}var Ce=Te();const Ie=x(Ce);var T={},ce;function xe(){if(ce)return T;ce=1;var e=L();Object.defineProperty(T,"__esModule",{value:!0}),T.default=void 0;var r=e(q()),n=N();return T.default=(0,r.default)((0,n.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow"),T}var je=xe();const _e=x(je);var C={},le;function Oe(){if(le)return C;le=1;var e=L();Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var r=e(q()),n=N();return C.default=(0,r.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"),C}var ke=Oe();const Ne=x(ke);var I={},de;function Le(){if(de)return I;de=1;var e=L();Object.defineProperty(I,"__esModule",{value:!0}),I.default=void 0;var r=e(q()),n=N();return I.default=(0,r.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"),I}var qe=Le();const We=x(qe),Ve=(e,r)=>{const n=i.useRef(null),[t,a]=i.useState(!1);return i.useEffect(()=>{const u=r??Re(e);if(n.current=u,se(e)){a(!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 p=v=>{var m;((m=v.data)==null?void 0:m.type)===y.PreviewMessageType.LOAD&&se(e)&&a(!0)};return window.addEventListener("message",p),()=>{window.removeEventListener("message",p),a(!1),n.current=null}},[e,r]),{controllerRef:n,isReady:t}},Ue={small:16,medium:20,large:24},me=({children:e,startIcon:r,endIcon:n,loading:t=!1,loadingIcon:a,loadingPosition:u="center",disabled:c=!1,size:l="medium",...p})=>{const v=f.jsx(we,{color:"inherit",size:Ue[l]}),m=a||v,s=t&&u==="center"?m:e;return f.jsx(ye,{disabled:c||t,startIcon:t&&u==="start"?m:r,endIcon:t&&u==="end"?m:n,size:l,...p,children:s})},De=M(Ee)(({theme:e})=>({display:"flex",position:"absolute",width:"100%",bottom:0,margin:`${e.spacing(2)} 0`,padding:`0 ${e.spacing(3)}`,gap:e.spacing(2)})),Fe=M(me)(({theme:e})=>({width:56,height:44,padding:0,minWidth:"unset",background:"rgba(0, 0, 0, 0.64) !important","& svg":{marginLeft:e.spacing(.5)}})),Be=M(me)(({theme:e,muted:r})=>({marginLeft:e.spacing(2.5),minWidth:25,background:"none",padding:0,opacity:r?.5:1})),ze=M("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)"}})),$e=M("div")({display:"flex",alignItems:"center"}),Ye=M("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"}}),He=({wearablePreviewId:e,className:r,hideFrameInput:n,hideProgressInput:t,hidePlayButton:a,hideSoundButton:u,wearablePreviewController:c,renderPlayButton:l,renderSoundButton:p,renderProgressBar:v,renderFrameInput:m})=>{const{controllerRef:s,isReady:j}=Ve(e,c),[d,w]=i.useState(0),[P,W]=i.useState(!1),[h,fe]=i.useState(void 0),[b,ge]=i.useState(!0),[_,G]=i.useState(void 0),[J,Q]=i.useState(!1),[K,X]=i.useState(!1),V=i.useCallback(()=>{w(0)},[]),U=i.useCallback(()=>{W(!1),w(o=>o>=Math.floor((h??0)*100)?0:o)},[h]),D=i.useCallback(()=>{W(!1)},[]),F=i.useCallback(async()=>{if(!K){let o=h;!h&&s.current&&(o=await s.current.emote.getLength()),W(!0),fe(o)}},[h,K,s]),B=i.useCallback(({length:o})=>{w(Math.ceil((o??0)*100))},[]);i.useEffect(()=>{const o=s.current;if(o)return o.emote.events.on(g.PreviewEmoteEventType.ANIMATION_PLAY,F),o.emote.events.on(g.PreviewEmoteEventType.ANIMATION_PLAYING,B),o.emote.events.on(g.PreviewEmoteEventType.ANIMATION_END,U),o.emote.events.on(g.PreviewEmoteEventType.ANIMATION_PAUSE,D),o.emote.events.on(g.PreviewEmoteEventType.ANIMATION_LOOP,V),()=>{o.emote.events.off(g.PreviewEmoteEventType.ANIMATION_PLAY,F),o.emote.events.off(g.PreviewEmoteEventType.ANIMATION_PLAYING,B),o.emote.events.off(g.PreviewEmoteEventType.ANIMATION_END,U),o.emote.events.off(g.PreviewEmoteEventType.ANIMATION_PAUSE,D),o.emote.events.off(g.PreviewEmoteEventType.ANIMATION_LOOP,V)}},[s,F,B,U,D,V]),i.useEffect(()=>{_===void 0&&j&&s.current&&s.current.emote.hasSound().then(o=>G(o)).catch(o=>{console.error("Error checking sound:",o),G(!1)})},[_,j,s]);const z=i.useCallback(async()=>{if(s.current)try{await s.current.emote.play()}catch(o){console.error("Error playing emote:",o)}},[s]),$=i.useCallback(async()=>{if(s.current)try{await s.current.emote.pause()}catch(o){console.error("Error pausing emote:",o)}},[s]),ee=i.useCallback(async()=>{P?await $():await z()},[P,z,$]),te=i.useCallback(()=>{var o,E;b?(o=s.current)==null||o.emote.disableSound():(E=s.current)==null||E.emote.enableSound(),ge(!b)},[b,s]),O=i.useCallback(async o=>{if(isNaN(o)||!s.current)return;let E=o;const ne=h??0;ne*100<o&&(E=ne*100),w(E),X(!0);try{P&&(await s.current.emote.pause(),Q(!0)),await s.current.emote.goTo(E/100)}catch(pe){console.error("Error changing frame:",pe)}},[h,P,s]),re=i.useCallback(async()=>{if(X(!1),J&&s.current){try{await s.current.emote.play()}catch(o){console.error("Error resuming play:",o)}Q(!1)}},[J,s]);return f.jsxs(De,{className:r,children:[a?null:l?l({isPlaying:P,onPlay:z,onPause:$,onToggle:ee}):f.jsx(Fe,{onClick:ee,children:P?f.jsx(Ie,{}):f.jsx(_e,{})}),t?null:v?v({frame:d,length:h??0,onChange:O,onMouseUp:re}):f.jsx(ze,{type:"range",value:d,max:Math.ceil((h??0)*100),min:0,step:1,onChange:o=>O(Number(o.target.value)),onMouseUp:re}),n?null:f.jsx($e,{children:m?m({frame:Math.round(d/100),onChange:o=>O(o*100)}):f.jsx(Ye,{type:"number",value:Math.round(d/100),onChange:o=>O(Number(o.target.value)*100)})}),u||!_?null:p?p({isSoundEnabled:b,hasSound:_,onToggle:te}):f.jsx(Be,{muted:!b,onClick:te,children:b?f.jsx(We,{}):f.jsx(Ne,{})})]})},et=Object.freeze(Object.defineProperty({__proto__:null,EmoteControls:He},Symbol.toStringTag,{value:"Module"}));export{me as B,He as E,Re as c,et as i,y as p,Ve as u};
1
+ import{g as x,k as N,r as i,j as f}from"./react-Vu6nbGi5.js";import{al as he,am as ve}from"./index-OpBhEJ0O.js";import{J as L}from"./generateUtilityClasses-fINIb8L-.js";import{r as q,j as ye,k as Ee}from"./Button-jfeZp7ca.js";import{n as M}from"./SvgIcon-5egtOrJ1.js";import{C as we}from"./CircularProgress-CPvlc7QL.js";var y=he(),A={},oe;function Pe(){if(oe)return A;oe=1,Object.defineProperty(A,"__esModule",{value:!0});function e(){let r,n;const t=new Promise((a,u)=>{r=c=>{a(c),t.isPending=!1},n=c=>{u(c),t.isPending=!1}}).catch(a=>Promise.reject(a));return t.resolve=r,t.reject=n,"finally"in t||(t.finally=a=>{t.then(a),t.catch(a)}),t.isPending=!0,t}return A.future=e,A.default=e,A}var be=Pe();const Se=x(be);function ae(e){return{all:e=e||new Map,on:function(r,n){var t=e.get(r);t?t.push(n):e.set(r,[n])},off:function(r,n){var t=e.get(r);t&&(n?t.splice(t.indexOf(n)>>>0,1):e.set(r,[]))},emit:function(r,n){var t=e.get(r);t&&t.slice().map(function(a){a(n)}),(t=e.get("*"))&&t.slice().map(function(a){a(r,n)})}}}const S=new Map,Y=new Map,Z=new Map,k=new Map;function se(e){const r=document.getElementById(e);return!r||!r.contentWindow?!1:Z.get(r.contentWindow)??!1}function H(e){if(e.data&&e.data.type)try{switch(e.data.type){case y.PreviewMessageType.CONTROLLER_RESPONSE:{const r=e.data.payload,{id:n}=r,t=S.get(n);t&&(S.delete(n),r.ok?t.resolve(r.result):r.ok===!1&&t.reject(new Error(r.error)));break}case y.PreviewMessageType.EMOTE_EVENT:{const r=e.data.payload,{type:n,payload:t}=r,a=e.source?Y.get(e.source):null;a&&n&&a.emit(n,t);break}case y.PreviewMessageType.LOAD:{e.source&&(Z.set(e.source,!0),(k.get(e.source)||[]).filter(t=>{var a;return((a=t.data)==null?void 0:a.type)!==y.PreviewMessageType.LOAD}).forEach(H),k.delete(e.source));break}default:}}catch(r){console.error("Error processing WearablePreview message:",r)}}const Me=e=>{var n;if(((n=e.data)==null?void 0:n.type)===y.PreviewMessageType.LOAD){H(e);return}if(!(e.source?Z.get(e.source):!1)&&e.source){const t=k.get(e.source)||[];t.push(e),k.set(e.source,t);return}H(e)};typeof window<"u"&&window.addEventListener("message",Me,!1);let ie=0;function Ae(e){return function(n,t,a){const u=document.getElementById(e);if(!u||!u.contentWindow){const d=new Error("iframe not found or not accessible");return Promise.reject(d)}const c=e+"-"+ie,l=Se();S.set(c,l);const p=y.PreviewMessageType.CONTROLLER_REQUEST,v={id:c,namespace:n,method:t,params:a},m=setTimeout(()=>{S.delete(c),l.reject(new Error(`Request timeout for ${t}`))},1e4),s=l.resolve,j=l.reject;l.resolve=d=>{clearTimeout(m),s(d)},l.reject=d=>{clearTimeout(m),j(d)};try{y.sendMessage(u.contentWindow,p,v)}catch(d){const w=d instanceof Error?d.message:String(d);l.reject(new Error(`Failed to send message: ${w}`)),S.delete(c),clearTimeout(m)}return ie++,l}}function Re(e){const r=document.getElementById(e);if(!r)throw new Error(`Could not find an iframe with id="${e}"`);S.clear();const n=r.contentWindow?Y.get(r.contentWindow)??ae():ae();r.contentWindow&&Y.set(r.contentWindow,n);const t=Ae(e);return{scene:{getScreenshot(a,u){return t("scene","getScreenshot",[a,u])},getMetrics(){return t("scene","getMetrics",[])},changeZoom:function(a){return t("scene","changeZoom",[a])},panCamera:function(a){return t("scene","panCamera",[a])},changeCameraPosition:function(a){return t("scene","changeCameraPosition",[a])},cleanup(){return t("scene","cleanup",[])},setUsername:function(a){return t("scene","setUsername",[a])}},emote:{getLength(){return t("emote","getLength",[])},isPlaying(){return t("emote","isPlaying",[])},goTo(a){return t("emote","goTo",[a])},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(a,u){return t("physics","setSpringBonesParams",[a,u])}}}}var g=ve(),R={},ue;function Te(){if(ue)return R;ue=1;var e=L();Object.defineProperty(R,"__esModule",{value:!0}),R.default=void 0;var r=e(q()),n=N();return R.default=(0,r.default)((0,n.jsx)("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"}),"Pause"),R}var Ce=Te();const Ie=x(Ce);var T={},ce;function xe(){if(ce)return T;ce=1;var e=L();Object.defineProperty(T,"__esModule",{value:!0}),T.default=void 0;var r=e(q()),n=N();return T.default=(0,r.default)((0,n.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow"),T}var je=xe();const _e=x(je);var C={},le;function Oe(){if(le)return C;le=1;var e=L();Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var r=e(q()),n=N();return C.default=(0,r.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"),C}var ke=Oe();const Ne=x(ke);var I={},de;function Le(){if(de)return I;de=1;var e=L();Object.defineProperty(I,"__esModule",{value:!0}),I.default=void 0;var r=e(q()),n=N();return I.default=(0,r.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"),I}var qe=Le();const We=x(qe),Ve=(e,r)=>{const n=i.useRef(null),[t,a]=i.useState(!1);return i.useEffect(()=>{const u=r??Re(e);if(n.current=u,se(e)){a(!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 p=v=>{var m;((m=v.data)==null?void 0:m.type)===y.PreviewMessageType.LOAD&&se(e)&&a(!0)};return window.addEventListener("message",p),()=>{window.removeEventListener("message",p),a(!1),n.current=null}},[e,r]),{controllerRef:n,isReady:t}},Ue={small:16,medium:20,large:24},me=({children:e,startIcon:r,endIcon:n,loading:t=!1,loadingIcon:a,loadingPosition:u="center",disabled:c=!1,size:l="medium",...p})=>{const v=f.jsx(we,{color:"inherit",size:Ue[l]}),m=a||v,s=t&&u==="center"?m:e;return f.jsx(ye,{disabled:c||t,startIcon:t&&u==="start"?m:r,endIcon:t&&u==="end"?m:n,size:l,...p,children:s})},De=M(Ee)(({theme:e})=>({display:"flex",position:"absolute",width:"100%",bottom:0,margin:`${e.spacing(2)} 0`,padding:`0 ${e.spacing(3)}`,gap:e.spacing(2)})),Fe=M(me)(({theme:e})=>({width:56,height:44,padding:0,minWidth:"unset",background:"rgba(0, 0, 0, 0.64) !important","& svg":{marginLeft:e.spacing(.5)}})),Be=M(me)(({theme:e,muted:r})=>({marginLeft:e.spacing(2.5),minWidth:25,background:"none",padding:0,opacity:r?.5:1})),ze=M("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)"}})),$e=M("div")({display:"flex",alignItems:"center"}),Ye=M("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"}}),He=({wearablePreviewId:e,className:r,hideFrameInput:n,hideProgressInput:t,hidePlayButton:a,hideSoundButton:u,wearablePreviewController:c,renderPlayButton:l,renderSoundButton:p,renderProgressBar:v,renderFrameInput:m})=>{const{controllerRef:s,isReady:j}=Ve(e,c),[d,w]=i.useState(0),[P,W]=i.useState(!1),[h,fe]=i.useState(void 0),[b,ge]=i.useState(!0),[_,G]=i.useState(void 0),[J,Q]=i.useState(!1),[K,X]=i.useState(!1),V=i.useCallback(()=>{w(0)},[]),U=i.useCallback(()=>{W(!1),w(o=>o>=Math.floor((h??0)*100)?0:o)},[h]),D=i.useCallback(()=>{W(!1)},[]),F=i.useCallback(async()=>{if(!K){let o=h;!h&&s.current&&(o=await s.current.emote.getLength()),W(!0),fe(o)}},[h,K,s]),B=i.useCallback(({length:o})=>{w(Math.ceil((o??0)*100))},[]);i.useEffect(()=>{const o=s.current;if(o)return o.emote.events.on(g.PreviewEmoteEventType.ANIMATION_PLAY,F),o.emote.events.on(g.PreviewEmoteEventType.ANIMATION_PLAYING,B),o.emote.events.on(g.PreviewEmoteEventType.ANIMATION_END,U),o.emote.events.on(g.PreviewEmoteEventType.ANIMATION_PAUSE,D),o.emote.events.on(g.PreviewEmoteEventType.ANIMATION_LOOP,V),()=>{o.emote.events.off(g.PreviewEmoteEventType.ANIMATION_PLAY,F),o.emote.events.off(g.PreviewEmoteEventType.ANIMATION_PLAYING,B),o.emote.events.off(g.PreviewEmoteEventType.ANIMATION_END,U),o.emote.events.off(g.PreviewEmoteEventType.ANIMATION_PAUSE,D),o.emote.events.off(g.PreviewEmoteEventType.ANIMATION_LOOP,V)}},[s,F,B,U,D,V]),i.useEffect(()=>{_===void 0&&j&&s.current&&s.current.emote.hasSound().then(o=>G(o)).catch(o=>{console.error("Error checking sound:",o),G(!1)})},[_,j,s]);const z=i.useCallback(async()=>{if(s.current)try{await s.current.emote.play()}catch(o){console.error("Error playing emote:",o)}},[s]),$=i.useCallback(async()=>{if(s.current)try{await s.current.emote.pause()}catch(o){console.error("Error pausing emote:",o)}},[s]),ee=i.useCallback(async()=>{P?await $():await z()},[P,z,$]),te=i.useCallback(()=>{var o,E;b?(o=s.current)==null||o.emote.disableSound():(E=s.current)==null||E.emote.enableSound(),ge(!b)},[b,s]),O=i.useCallback(async o=>{if(isNaN(o)||!s.current)return;let E=o;const ne=h??0;ne*100<o&&(E=ne*100),w(E),X(!0);try{P&&(await s.current.emote.pause(),Q(!0)),await s.current.emote.goTo(E/100)}catch(pe){console.error("Error changing frame:",pe)}},[h,P,s]),re=i.useCallback(async()=>{if(X(!1),J&&s.current){try{await s.current.emote.play()}catch(o){console.error("Error resuming play:",o)}Q(!1)}},[J,s]);return f.jsxs(De,{className:r,children:[a?null:l?l({isPlaying:P,onPlay:z,onPause:$,onToggle:ee}):f.jsx(Fe,{onClick:ee,children:P?f.jsx(Ie,{}):f.jsx(_e,{})}),t?null:v?v({frame:d,length:h??0,onChange:O,onMouseUp:re}):f.jsx(ze,{type:"range",value:d,max:Math.ceil((h??0)*100),min:0,step:1,onChange:o=>O(Number(o.target.value)),onMouseUp:re}),n?null:f.jsx($e,{children:m?m({frame:Math.round(d/100),onChange:o=>O(o*100)}):f.jsx(Ye,{type:"number",value:Math.round(d/100),onChange:o=>O(Number(o.target.value)*100)})}),u||!_?null:p?p({isSoundEnabled:b,hasSound:_,onToggle:te}):f.jsx(Be,{muted:!b,onClick:te,children:b?f.jsx(We,{}):f.jsx(Ne,{})})]})},et=Object.freeze(Object.defineProperty({__proto__:null,EmoteControls:He},Symbol.toStringTag,{value:"Module"}));export{me as B,He as E,Re as c,et as i,y as p,Ve as u};