@layers-app/editor 0.2.3-specific.3 → 0.3.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 (228) hide show
  1. package/dist/index.cjs +2 -2
  2. package/dist/index.d.ts +19 -9
  3. package/dist/index.js +6 -6
  4. package/dist/{layers.D6GqnIoL.js → layers.2sOFsgpt.js} +1 -1
  5. package/dist/{layers.bO7reum0.js → layers.46Oaqi6S.js} +1 -1
  6. package/dist/{layers.Dak7KYhU.js → layers.4wMwkbzz.js} +1 -1
  7. package/dist/{layers.wPulzLKc.js → layers.5Fc-eDz_.js} +1 -1
  8. package/dist/{layers.DsN20L5c.js → layers.5Tm9dPWa.js} +1 -1
  9. package/dist/{layers.C3zBVCP6.js → layers.5VVP7KN3.js} +7 -8
  10. package/dist/{layers.FwQD7xoc.js → layers.5h2RcPii.js} +1 -1
  11. package/dist/{layers.Bzispk1K.js → layers.62fLihH9.js} +1 -1
  12. package/dist/{layers.Bx-Pnjsp.js → layers.7tkYogen.js} +1 -1
  13. package/dist/{layers.B40AXz_d.js → layers.8HVSVFE-.js} +1 -1
  14. package/dist/{layers.DJH3Oczu.js → layers.AZC4YUu_.js} +1 -1
  15. package/dist/{layers.BFoLPJdJ.js → layers.B1WO8gEK.js} +6 -7
  16. package/dist/layers.B2tTj5km.js +8 -0
  17. package/dist/{layers.X4bGPYCi.js → layers.B3eNZiVS.js} +1 -1
  18. package/dist/{layers.CN_BnwwD.js → layers.B4pYlpG5.js} +8 -9
  19. package/dist/{layers.Cz3gSlPy.js → layers.B6FBBhIq.js} +6 -7
  20. package/dist/{layers.BNGBGByI.js → layers.B88Tq9fq.js} +1 -1
  21. package/dist/{layers.DVO3a2vq.js → layers.B9QOa-CF.js} +1 -1
  22. package/dist/layers.B9ZnHHGd.js +244 -0
  23. package/dist/{layers.BXOU2J78.js → layers.BAAAIQgL.js} +4 -5
  24. package/dist/{layers.BufGvmxX.js → layers.BD0kudED.js} +1 -1
  25. package/dist/{layers.CXYEnmSC.js → layers.BD5cjyof.js} +1 -1
  26. package/dist/layers.BDUl16pn.js +1 -0
  27. package/dist/{layers.CZ2AJtwz.js → layers.BE9kQeZe.js} +1 -1
  28. package/dist/{layers.gnUyo71v.js → layers.BEKEkSeG.js} +7544 -7306
  29. package/dist/{layers.C5Pm8xjh.js → layers.BFT6OtgR.js} +1 -1
  30. package/dist/{layers.BHz2rBwA.js → layers.BH4W4xK9.js} +1 -1
  31. package/dist/{layers.DP3zcVgG.js → layers.BIj1UrA0.js} +1 -1
  32. package/dist/{layers.BxEduspa.js → layers.BKytuiiB.js} +2 -2
  33. package/dist/{layers.BOf-_Cqh.js → layers.BL-Apcgs.js} +5 -6
  34. package/dist/{layers.DgZDULhU.js → layers.BM0PIwPm.js} +1 -1
  35. package/dist/{layers.D579n8t3.js → layers.BNkMUXgY.js} +1 -1
  36. package/dist/{layers.Cmp1tFvN.js → layers.BRg8Z6Fg.js} +4 -4
  37. package/dist/{layers.DtPnbqA_.js → layers.BSij2zBh.js} +4 -5
  38. package/dist/{layers.DTS_agg7.js → layers.BT47r9lw.js} +1 -1
  39. package/dist/{layers.67ca8P_a.js → layers.BUQI8TYR.js} +3 -3
  40. package/dist/{layers.g4vZ2joo.js → layers.BXD95e_q.js} +5 -6
  41. package/dist/{layers.B-VxCmsL.js → layers.BXcxE02s.js} +1 -1
  42. package/dist/{layers.D6Ix71Ra.js → layers.BYJgHe0j.js} +1 -1
  43. package/dist/{layers.DyG07hWC.js → layers.BZKrOb4j.js} +1 -1
  44. package/dist/layers.BZsELoBg.js +2 -0
  45. package/dist/{layers.Dv1cLqRb.js → layers.BZyLsPlK.js} +4 -5
  46. package/dist/{layers.p0CwMc0K.js → layers.BaHA4Shj.js} +1 -1
  47. package/dist/{layers.CEC2YCPP.js → layers.Be-cU_ws.js} +1 -1
  48. package/dist/{layers.bTgkZ1EB.js → layers.BehKr7r4.js} +1 -1
  49. package/dist/{layers.CYt3zJxQ.js → layers.BfBuL2KB.js} +1 -1
  50. package/dist/{layers.Dz9O0u7I.js → layers.BfgAhPID.js} +1 -1
  51. package/dist/{layers.CV14jVb0.js → layers.Bh65sv3c.js} +1 -1
  52. package/dist/{layers.CjVMlnTi.js → layers.Biiuyvk3.js} +1 -1
  53. package/dist/{layers.DWOw64KV.js → layers.Bipv0RrA.js} +1 -1
  54. package/dist/{layers.C240qOel.js → layers.BjA5a3oW.js} +1 -1
  55. package/dist/{layers.DYVmwncl.js → layers.BkDTMrUN.js} +1 -1
  56. package/dist/{layers.tYj-c3Ws.js → layers.BlFR1qtc.js} +1 -1
  57. package/dist/{layers.B5wdUajd.js → layers.BnB_ZCKf.js} +1 -1
  58. package/dist/{layers.CFhiEE4Y.js → layers.BnRpAAlF.js} +1 -1
  59. package/dist/{layers.COdw8QXK.js → layers.Bne778y0.js} +1 -1
  60. package/dist/{layers.D7Khtjje.js → layers.BoWIpGHq.js} +1 -1
  61. package/dist/{layers.C3odUqou.js → layers.Brjl1KT8.js} +1 -1
  62. package/dist/{layers.BVgNh-Iw.js → layers.BrwveTp_.js} +13 -14
  63. package/dist/{layers.vBuM8mOc.js → layers.Bs3nM_3m.js} +1 -1
  64. package/dist/{layers.sDxsitBJ.js → layers.Bs80VeaG.js} +1 -1
  65. package/dist/{layers.BAMCe6rY.js → layers.Btw6v4iY.js} +1 -1
  66. package/dist/{layers.bSgBzs1_.js → layers.BuJcmKuG.js} +1 -1
  67. package/dist/layers.BubVFU4w.js +1 -0
  68. package/dist/{layers.BKSyEprl.js → layers.BudVqxFc.js} +1 -1
  69. package/dist/{layers.CApp6i1s.js → layers.BwDZF6jP.js} +1 -1
  70. package/dist/{layers.6K1YWQS0.js → layers.BwSoDZk1.js} +1 -1
  71. package/dist/{layers.B3LgVn5Z.js → layers.Bx1ePve8.js} +1 -1
  72. package/dist/{layers.BTcFviQh.js → layers.BxzIRQ9I.js} +1 -1
  73. package/dist/{layers.DIZsGqOX.js → layers.By1Q71yL.js} +1 -1
  74. package/dist/{layers.BFmC5_Wb.js → layers.Bzzte71n.js} +1 -1
  75. package/dist/{layers.DesK2flG.js → layers.C-JonM7I.js} +1 -1
  76. package/dist/{layers.CHDyP1EC.js → layers.C07EEzls.js} +1 -1
  77. package/dist/{layers.BaiiBfxE.js → layers.C1VtSMXU.js} +1 -1
  78. package/dist/{layers.CtJGY-ER.js → layers.C1mH2Dk9.js} +1 -1
  79. package/dist/{layers.BwDMEphM.js → layers.C23xliFJ.js} +1 -1
  80. package/dist/layers.C6an3iNY.js +8 -0
  81. package/dist/{layers.BJ0VhEcO.js → layers.C7hSyuhy.js} +1 -1
  82. package/dist/{layers.qYBhj__-.js → layers.C8YnAQyz.js} +1 -1
  83. package/dist/{layers.B8CugQhG.js → layers.CAf30VQc.js} +1 -1
  84. package/dist/{layers.CrR6Cu1_.js → layers.CC0Hhj9e.js} +1 -1
  85. package/dist/{layers.B29f2yzi.js → layers.CDdlABmL.js} +1 -1
  86. package/dist/{layers.Bwmv62Hw.js → layers.CEF0QmMB.js} +79 -79
  87. package/dist/{layers.B7VS62Ai.js → layers.CG8R0qJB.js} +1 -1
  88. package/dist/{layers.F62HSS8f.js → layers.CI3uwpYk.js} +1 -1
  89. package/dist/{layers.B5hGu_pV.js → layers.CIBcP2_G.js} +1 -1
  90. package/dist/{layers.Cg05q7cN.js → layers.CIkLs05n.js} +1 -1
  91. package/dist/{layers.CMeT89Fo.js → layers.CJEJ4X7s.js} +1 -1
  92. package/dist/{layers.DA9THp9O.js → layers.CKILpQg6.js} +1 -1
  93. package/dist/{layers.B8teKozD.js → layers.CLAkkTQF.js} +1 -1
  94. package/dist/{layers.Ce1gP42h.js → layers.CLf-0Sch.js} +1 -1
  95. package/dist/{layers.DpdibG49.js → layers.CMsdH6MZ.js} +1 -1
  96. package/dist/{layers.DyACarL0.js → layers.COzBijJ2.js} +1 -1
  97. package/dist/{layers.BTntB4FK.js → layers.CPJF7wyf.js} +2 -2
  98. package/dist/{layers.Bt7i4Yqd.js → layers.CPtyJjDZ.js} +1 -1
  99. package/dist/{layers.BUvw1WA0.js → layers.CWSqO_Rm.js} +1 -1
  100. package/dist/layers.CXeLnAYi.js +1 -0
  101. package/dist/{layers.CQBViyhP.js → layers.CXh6lA3a.js} +1 -1
  102. package/dist/{layers.itHqlX_Y.js → layers.CYBOlxgn.js} +8 -9
  103. package/dist/{layers.Da1EGaKb.js → layers.C__5h4aS.js} +1 -1
  104. package/dist/{layers.BS8sCd2S.js → layers.Cct8dVnE.js} +3 -3
  105. package/dist/{layers.DzvQ_Q9L.js → layers.CeEElame.js} +1 -1
  106. package/dist/{layers.BrV5pl2N.js → layers.CkEhdEMJ.js} +1 -1
  107. package/dist/{layers.snesJ3F3.js → layers.CmU-4IOd.js} +1 -1
  108. package/dist/layers.CmjlfzqR.js +1 -0
  109. package/dist/{layers.D06KQS8I.js → layers.CpcqVX72.js} +1 -1
  110. package/dist/layers.CsJaFpQS.js +285 -0
  111. package/dist/{layers.DNmSTlRj.js → layers.CuVGCSqO.js} +1 -1
  112. package/dist/{layers.D62qPJec.js → layers.Cwwx9dqL.js} +1 -1
  113. package/dist/{layers.DT41qoQi.js → layers.CxGQnE2E.js} +1 -1
  114. package/dist/{layers.L_R1KTk3.js → layers.Cy6OFGbS.js} +1 -1
  115. package/dist/{layers.BrMeCTSV.js → layers.Cy9Nv6Fr.js} +1 -1
  116. package/dist/{layers.6nEef2mA.js → layers.CyEIletN.js} +1 -1
  117. package/dist/{layers.R9fxh70q.js → layers.CzAXXTsc.js} +1 -1
  118. package/dist/{layers.lP9cqdkO.js → layers.CzRAqMwS.js} +1 -1
  119. package/dist/{layers.DgtEgUTm.js → layers.D-Q4XxS7.js} +3520 -2994
  120. package/dist/{layers.6X1wsse9.js → layers.D-ai8yBe.js} +5 -6
  121. package/dist/{layers.B_CLw8Z8.js → layers.D0mYhnD_.js} +1 -1
  122. package/dist/{layers.A4kPz8X8.js → layers.D0snKWX1.js} +1 -1
  123. package/dist/{layers.Q5fX-Pjx.js → layers.D12qRcsu.js} +1 -1
  124. package/dist/{layers.B9WqMfzG.js → layers.D48A_dlx.js} +5 -6
  125. package/dist/{layers.DhSQxY92.js → layers.D4T2Soqk.js} +1 -1
  126. package/dist/{layers.D5uU7nYF.js → layers.D6a0mAc6.js} +1 -1
  127. package/dist/{layers.CoJ1A7GX.js → layers.DAwYVZQ2.js} +1 -1
  128. package/dist/{layers.DTd2aka4.js → layers.DDZEzjTB.js} +1 -1
  129. package/dist/{layers.BUYdBxSq.js → layers.DEj_-Grg.js} +1 -1
  130. package/dist/{layers.2oa5MOVJ.js → layers.DGBJxH-i.js} +1 -1
  131. package/dist/{layers.J9BUarSz.js → layers.DGE3E7fO.js} +1 -1
  132. package/dist/{layers.Cjpd_JEC.js → layers.DIinupg_.js} +6 -7
  133. package/dist/{layers.cf7sbt5I.js → layers.DJ29FJsN.js} +1 -1
  134. package/dist/{layers.Cm36nD0R.js → layers.DJw4J3iL.js} +1 -1
  135. package/dist/{layers.5M-g3cqt.js → layers.DMfyflRv.js} +3 -3
  136. package/dist/{layers.Be0EwoHz.js → layers.DONU4DiH.js} +6 -7
  137. package/dist/layers.DPJY4HYM.js +1 -0
  138. package/dist/{layers.DipH4XIT.js → layers.DPJYTRtA.js} +1 -1
  139. package/dist/{layers.DZi5IBK7.js → layers.DPj1fZP9.js} +7 -8
  140. package/dist/{layers.DimPFg1y.js → layers.DQAUau8M.js} +1 -1
  141. package/dist/{layers.DHVFuixE.js → layers.DQDnK58Z.js} +1 -1
  142. package/dist/{layers.aF5Se60W.js → layers.DS9XrncL.js} +1 -1
  143. package/dist/{layers.CBQXX09F.js → layers.DWJeFUzg.js} +1 -1
  144. package/dist/{layers.BQMPPC0D.js → layers.DWjc_eMo.js} +1 -1
  145. package/dist/{layers.CoCXJNYR.js → layers.DWkisZo-.js} +1 -1
  146. package/dist/{layers.BlUn-Ykk.js → layers.DYKoL1v7.js} +5 -6
  147. package/dist/{layers.vPlrYm6B.js → layers.D_7_4U6H.js} +1 -1
  148. package/dist/{layers.RsxQaMxf.js → layers.D_duxQPK.js} +1 -1
  149. package/dist/{layers.C5AgHcnL.js → layers.Dc17KGUJ.js} +1 -1
  150. package/dist/{layers.D-P7pnJi.js → layers.DclYra1-.js} +1 -1
  151. package/dist/{layers.SajCBg7m.js → layers.Dcv9yczD.js} +1 -1
  152. package/dist/{layers.DlHIiPlW.js → layers.DdJlEJId.js} +1 -1
  153. package/dist/{layers.B_FfhtCZ.js → layers.DhVu4iGF.js} +14117 -13708
  154. package/dist/layers.DjOFnT8v.js +1 -0
  155. package/dist/{layers.Dbu8jxbu.js → layers.Dngs5OpP.js} +1 -1
  156. package/dist/{layers.CCDH1QbA.js → layers.DooAEuei.js} +1 -1
  157. package/dist/{layers.BiAsLcrG.js → layers.DqNkUvmt.js} +1 -1
  158. package/dist/{layers.CypoJKqx.js → layers.Dql9KEZr.js} +5 -6
  159. package/dist/{layers.C75id8jo.js → layers.DuEB1Y-T.js} +1 -1
  160. package/dist/{layers.v16TTnnM.js → layers.DuiJZjBm.js} +1 -1
  161. package/dist/layers.Dz3X0MlG.js +161 -0
  162. package/dist/{layers.CXZF-cit.js → layers.DzLp1nNI.js} +1 -1
  163. package/dist/{layers.CQRSWYsV.js → layers.DzOX-fH0.js} +1 -1
  164. package/dist/layers.DzVuFvx3.js +2 -0
  165. package/dist/{layers.BJbU5BHe.js → layers.DzrKg1RQ.js} +1 -1
  166. package/dist/{layers.BOPOoqtR.js → layers.F84K5xXI.js} +1 -1
  167. package/dist/{layers.cZLcSaSP.js → layers.K2uXkFD_.js} +1 -1
  168. package/dist/{layers.CMditKLe.js → layers.KB-lMlC4.js} +1 -1
  169. package/dist/layers.LQullGbk.js +1 -0
  170. package/dist/{layers.Hw42nr2F.js → layers.MOxoSbw2.js} +1 -1
  171. package/dist/{layers.CIlTGlgv.js → layers.NWZBwKEK.js} +1 -1
  172. package/dist/layers.O0NSmzEc.js +73 -0
  173. package/dist/{layers.DX7oWSsD.js → layers.R_5lXX8D.js} +1 -1
  174. package/dist/{layers.Bb5IdU8_.js → layers.UJU8qQAn.js} +1 -1
  175. package/dist/{layers.B1pfFQf9.js → layers.XPl1C4Xv.js} +1 -1
  176. package/dist/{layers.eI740swO.js → layers.XcKE2JQ1.js} +1 -1
  177. package/dist/{layers.pKUI0IrX.js → layers.YXQx_NJy.js} +3 -3
  178. package/dist/{layers.kRQL9_1_.js → layers.Y_OQ_zog.js} +1 -1
  179. package/dist/{layers.RzIbYXxC.js → layers.Z4o2OOf5.js} +4 -4
  180. package/dist/{layers.xNB6wmTq.js → layers._VwDTgZW.js} +1 -1
  181. package/dist/{layers.BxNRVvib.js → layers._mYyPoAM.js} +1 -1
  182. package/dist/{layers.Bi1qwPs0.js → layers.aZknhRkQ.js} +1 -1
  183. package/dist/{layers.DHr_lDCA.js → layers.dFLqx2yF.js} +1 -1
  184. package/dist/{layers.BBGjXC9z.js → layers.dk1FdSQs.js} +1 -1
  185. package/dist/{layers.ClUKnJ7m.js → layers.hXK5MQUI.js} +1 -1
  186. package/dist/{layers.BfUQ73dN.js → layers.iSI2Ixu0.js} +1 -1
  187. package/dist/{layers.bV_yms4N.js → layers.ijvnT6-f.js} +1 -1
  188. package/dist/{layers.Cmju9J_z.js → layers.iuKQqbaH.js} +11 -12
  189. package/dist/{layers.C6ecF1iT.js → layers.kb3mM5t_.js} +6 -6
  190. package/dist/{layers.Be9qa7Ny.js → layers.lmIdYb5_.js} +1 -1
  191. package/dist/layers.mwHjQPRu.js +257 -0
  192. package/dist/{layers.B2mx50Di.js → layers.n7qcjq92.js} +1 -1
  193. package/dist/{layers.CDQZM8kz.js → layers.oTwVbcUa.js} +2 -2
  194. package/dist/{layers.DrvC6QMD.js → layers.pL-8PKFv.js} +1 -1
  195. package/dist/{layers.Bm-u79Al.js → layers.rD_yeisW.js} +1 -1
  196. package/dist/{layers.B-AxwAIy.js → layers.rXaivo1G.js} +89 -90
  197. package/dist/layers.s7jiwsxb.js +96 -0
  198. package/dist/{layers.C5R-uiPA.js → layers.sDmQeN5H.js} +6 -7
  199. package/dist/{layers.CJcnFprP.js → layers.tAblKoS0.js} +1 -1
  200. package/dist/layers.u7Ns5vGH.js +230 -0
  201. package/dist/{layers.CwObcDUF.js → layers.x9pj1ZgJ.js} +1 -1
  202. package/dist/layers.xKmy9hl8.js +6 -0
  203. package/dist/layers.xSKkAVrl.js +1 -0
  204. package/dist/{layers.BcPMpL_X.js → layers.xrnbA0Hx.js} +1 -1
  205. package/dist/{layers.gi1xszBh.js → layers.xuA-KjdM.js} +6 -7
  206. package/package.json +3 -2
  207. package/dist/layers.B4G8aOjk.js +0 -342
  208. package/dist/layers.BGjURAUC.js +0 -8
  209. package/dist/layers.BOXXovpq.js +0 -1
  210. package/dist/layers.BWe8pZzH.js +0 -1
  211. package/dist/layers.BXNFflBM.js +0 -1
  212. package/dist/layers.BY3QhcjO.js +0 -1
  213. package/dist/layers.BcSLF4Xt.js +0 -159
  214. package/dist/layers.BrQ3tjNS.js +0 -52846
  215. package/dist/layers.Bwc5zYGw.js +0 -1
  216. package/dist/layers.C1C8Dy24.js +0 -137
  217. package/dist/layers.C8NfZMN7.js +0 -2
  218. package/dist/layers.CGfsiFou.js +0 -257
  219. package/dist/layers.D3jhkMKI.js +0 -230
  220. package/dist/layers.EGafIndU.js +0 -8
  221. package/dist/layers.E_D59Yym.js +0 -285
  222. package/dist/layers.GHnZTJ9O.js +0 -2
  223. package/dist/layers.JnHNUJic.js +0 -6
  224. package/dist/layers.K8XDZTme.js +0 -1
  225. package/dist/layers.RGOSJmZU.js +0 -1
  226. package/dist/layers.dleF6oa5.js +0 -95
  227. package/dist/layers.eYFoHPwR.js +0 -528
  228. package/dist/layers.pPLY34nb.js +0 -2
@@ -1,8 +0,0 @@
1
- import { C as e, Q as t, N as m, A as r } from "./layers.Cg05q7cN.js";
2
- import "./layers.gnUyo71v.js";
3
- export {
4
- e as Commands,
5
- t as subsetToBase64,
6
- m as subsetToBinary,
7
- r as toBase64
8
- };
@@ -1,285 +0,0 @@
1
- import { jsx as d, jsxs as q } from "react/jsx-runtime";
2
- import { useRef as J, useState as v, useContext as Q, useEffect as u } from "react";
3
- import { useTranslation as X } from "react-i18next";
4
- import { l as Y, o as Z, C as K, m as P, u as ee, a as te, b as L, $ as S, t as ie, U as oe, I as ne, c as ae, E as se, R as re, d as le } from "./layers.B_FfhtCZ.js";
5
- import { LoadingOverlay as de } from "@mantine/core";
6
- import { showErrorNotification as he } from "@layers-app/shared";
7
- const $ = (t) => {
8
- const {
9
- width: m,
10
- height: s,
11
- isLoading: n,
12
- isError: h,
13
- src: f,
14
- id: c,
15
- altText: p,
16
- imageRef: I,
17
- maxWidth: g
18
- } = t;
19
- return /* @__PURE__ */ q(
20
- "div",
21
- {
22
- className: "media-wrapper",
23
- style: {
24
- width: m,
25
- height: s,
26
- display: "inline-flex",
27
- position: "relative"
28
- },
29
- children: [
30
- /* @__PURE__ */ d(
31
- de,
32
- {
33
- visible: n,
34
- zIndex: 1e3,
35
- overlayProps: { backgroundOpacity: 0.5 },
36
- loaderProps: { size: 24, color: "black" }
37
- }
38
- ),
39
- /* @__PURE__ */ d(
40
- ge,
41
- {
42
- className: null,
43
- src: f,
44
- altText: p,
45
- imageRef: I,
46
- width: "inherit",
47
- height: "inherit",
48
- maxWidth: g || "auto",
49
- id: c
50
- }
51
- )
52
- ]
53
- }
54
- );
55
- };
56
- function ge({
57
- altText: t,
58
- className: m,
59
- imageRef: s,
60
- src: n,
61
- width: h,
62
- height: f,
63
- maxWidth: c,
64
- id: p
65
- }) {
66
- const [I, g] = v(!1);
67
- return /* @__PURE__ */ d(
68
- "img",
69
- {
70
- className: `${m || void 0} ${I ? "" : "loading"}`,
71
- src: n,
72
- alt: t,
73
- ref: s,
74
- style: {
75
- height: f,
76
- maxWidth: c,
77
- width: h
78
- },
79
- onLoad: () => {
80
- n.includes("splash") ? setTimeout(() => {
81
- g(!0);
82
- }, 100) : g(!0);
83
- },
84
- draggable: "false",
85
- "data-id": p
86
- }
87
- );
88
- }
89
- function xe({
90
- src: t,
91
- altText: m,
92
- nodeKey: s,
93
- width: n,
94
- height: h,
95
- maxWidth: f,
96
- showCaption: c,
97
- caption: p,
98
- id: I,
99
- create: g,
100
- alignment: T
101
- }) {
102
- var D, _;
103
- const R = J(null), [E, x] = v(!0), { isCollabActive: A } = Y(), [l] = Z(), [w, W] = v(!0), [r, z] = v({
104
- width: 0,
105
- height: 0
106
- }), { fetchUploadMedia: M, fetchDeleteMedia: O, maxFileSize: ue } = Q(K), b = P.has(t) && (((D = P.get(t)) == null ? void 0 : D.mediaNodeKeys.length) === 0 || ((_ = P.get(t)) == null ? void 0 : _.mediaNodeKeys.length) === void 0 || t.trim() === ""), { t: y } = X(), [me, j] = v(0);
107
- u(() => l.registerDecoratorListener(() => {
108
- j((e) => e + 1);
109
- }), [b]), u(() => {
110
- if (!t || t.startsWith("data:image/") || !t.trim()) {
111
- x(!1);
112
- return;
113
- }
114
- const e = new Image();
115
- e.src = t, e.onload = () => x(!1), e.onerror = () => {
116
- x(!1);
117
- };
118
- }, [t, b]);
119
- const B = (e, i) => {
120
- l.update(() => {
121
- le(null);
122
- const o = L(s);
123
- S(o) && o.setWidthAndHeight(e, i);
124
- });
125
- }, { historyState: U } = ee(), {
126
- settings: { showNestedEditorTreeView: k }
127
- } = te(), [N, C] = v(!1);
128
- function G(e) {
129
- return e.endsWith(".svg") || e.includes("image/svg+xml");
130
- }
131
- function V(e) {
132
- return new Promise((i, o) => {
133
- if (G(e)) {
134
- i(0);
135
- return;
136
- }
137
- const a = new Image();
138
- a.src = e, a.onload = () => {
139
- i(a.width);
140
- }, a.onerror = () => {
141
- o(new Error("Failed to load image"));
142
- };
143
- });
144
- }
145
- u(() => {
146
- g && C(!0);
147
- }, [g]), u(() => {
148
- let e = n, i = h, o = 100;
149
- (t.includes("unsplash") ? t.trim() : !b && t.trim() || t.includes("upload-src-editor")) && t !== "upload" && V(t).then((a) => {
150
- typeof e == "number" && e < o && a < o ? (W(!0), z({
151
- width: e,
152
- height: i
153
- })) : a < o ? (W(!0), z({
154
- width: "auto",
155
- height: "auto"
156
- })) : (z({
157
- width: a,
158
- height: a
159
- }), W(!1));
160
- }).catch((a) => {
161
- console.warn("Ошибка при загрузке изображения:", a.message);
162
- });
163
- }, [t, b]), u(() => {
164
- r.width && r.height && w && l.update(() => {
165
- const e = L(s);
166
- S(e) && e.setWidthAndHeight(r.width, r.height);
167
- });
168
- }, [r.width, r.height, w]), u(() => {
169
- const e = document.documentElement;
170
- ie(N, e);
171
- }, [N]), u(() => l.registerCommand(
172
- oe,
173
- (e) => (t === "upload" && H(e), !1),
174
- ne
175
- ), [t, E]);
176
- const F = (e, i) => {
177
- x(!1), l.update(() => {
178
- const o = L(s);
179
- S(o) && (o.setSrc(e), o.setId(i));
180
- });
181
- }, H = (e) => {
182
- x(!0), M && M(
183
- e[0],
184
- (i, o) => {
185
- F(i, o);
186
- },
187
- (i) => {
188
- i && he({
189
- message: y("editor.gallery.errorFile")
190
- }), F("", "");
191
- }
192
- );
193
- };
194
- return !t || t === "upload" ? /* @__PURE__ */ d(
195
- ae,
196
- {
197
- uploading: !1,
198
- onUpload: (e) => {
199
- !M || !e.length || (H(e), C(!1));
200
- },
201
- popoverProps: {
202
- opened: N,
203
- position: "bottom",
204
- onChange: C
205
- },
206
- onChange: (e) => {
207
- C(!1), l.update(() => {
208
- const i = L(s);
209
- S(i) && i.setSrc(e);
210
- });
211
- },
212
- children: /* @__PURE__ */ d(
213
- se,
214
- {
215
- title: y("editor.image.add_photo"),
216
- icon: "photo",
217
- onClick: () => C(!N),
218
- isLoading: E
219
- }
220
- )
221
- }
222
- ) : w ? /* @__PURE__ */ d(
223
- $,
224
- {
225
- width: r.width,
226
- height: r.height,
227
- isLoading: E,
228
- isError: !1,
229
- isIcon: w,
230
- src: t,
231
- id: I,
232
- editor: l,
233
- nodeKey: s,
234
- fetchDeleteMedia: O,
235
- altText: m,
236
- imageRef: R,
237
- maxWidth: f,
238
- showCaption: c,
239
- caption: p,
240
- isCollabActive: A,
241
- historyState: U,
242
- showNestedEditorTreeView: k,
243
- t: y
244
- }
245
- ) : /* @__PURE__ */ d(
246
- re,
247
- {
248
- editor: l,
249
- isIcon: w,
250
- width: typeof n == "string" && n.includes("%") ? parseFloat(n) : n,
251
- height: typeof h == "string" && h.includes("%") ? parseFloat(h) : n,
252
- initialWidth: r.width || "",
253
- initialHeight: r.height || "",
254
- onResizeEnd: B,
255
- alignment: T,
256
- children: /* @__PURE__ */ d(
257
- $,
258
- {
259
- width: "inherit",
260
- height: "inherit",
261
- isLoading: E,
262
- isError: !1,
263
- isIcon: w,
264
- src: t,
265
- id: I,
266
- editor: l,
267
- nodeKey: s,
268
- fetchDeleteMedia: O,
269
- altText: m,
270
- imageRef: R,
271
- maxWidth: f,
272
- showCaption: c,
273
- caption: p,
274
- isCollabActive: A,
275
- historyState: U,
276
- showNestedEditorTreeView: k,
277
- t: y
278
- }
279
- )
280
- }
281
- );
282
- }
283
- export {
284
- xe as default
285
- };
@@ -1,2 +0,0 @@
1
- "use strict";/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:Tt,setPrototypeOf:rt,isFrozen:Bt,getPrototypeOf:Yt,getOwnPropertyDescriptor:Xt}=Object;let{freeze:S,seal:y,create:_t}=Object,{apply:we,construct:xe}=typeof Reflect<"u"&&Reflect;S||(S=function(o){return o});y||(y=function(o){return o});we||(we=function(o,l,s){return o.apply(l,s)});xe||(xe=function(o,l){return new o(...l)});const le=R(Array.prototype.forEach),jt=R(Array.prototype.lastIndexOf),st=R(Array.prototype.pop),$=R(Array.prototype.push),Vt=R(Array.prototype.splice),fe=R(String.prototype.toLowerCase),Ne=R(String.prototype.toString),lt=R(String.prototype.match),q=R(String.prototype.replace),$t=R(String.prototype.indexOf),qt=R(String.prototype.trim),L=R(Object.prototype.hasOwnProperty),A=R(RegExp.prototype.test),K=Kt(TypeError);function R(r){return function(o){o instanceof RegExp&&(o.lastIndex=0);for(var l=arguments.length,s=new Array(l>1?l-1:0),T=1;T<l;T++)s[T-1]=arguments[T];return we(r,o,s)}}function Kt(r){return function(){for(var o=arguments.length,l=new Array(o),s=0;s<o;s++)l[s]=arguments[s];return xe(r,l)}}function a(r,o){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:fe;rt&&rt(r,null);let s=o.length;for(;s--;){let T=o[s];if(typeof T=="string"){const N=l(T);N!==T&&(Bt(o)||(o[s]=N),T=N)}r[T]=!0}return r}function Zt(r){for(let o=0;o<r.length;o++)L(r,o)||(r[o]=null);return r}function C(r){const o=_t(null);for(const[l,s]of Tt(r))L(r,l)&&(Array.isArray(s)?o[l]=Zt(s):s&&typeof s=="object"&&s.constructor===Object?o[l]=C(s):o[l]=s);return o}function Z(r,o){for(;r!==null;){const s=Xt(r,o);if(s){if(s.get)return R(s.get);if(typeof s.value=="function")return R(s.value)}r=Yt(r)}function l(){return null}return l}const ct=S(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),be=S(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ie=S(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Jt=S(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Me=S(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Qt=S(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ft=S(["#text"]),ut=S(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ce=S(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),mt=S(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ce=S(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),en=y(/\{\{[\w\W]*|[\w\W]*\}\}/gm),tn=y(/<%[\w\W]*|[\w\W]*%>/gm),nn=y(/\$\{[\w\W]*/gm),on=y(/^data-[\-\w.\u00B7-\uFFFF]+$/),an=y(/^aria-[\-\w]+$/),Et=y(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),rn=y(/^(?:\w+script|data):/i),sn=y(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),gt=y(/^html$/i),ln=y(/^[a-z][.\w]*(-[.\w]+)+$/i);var pt=Object.freeze({__proto__:null,ARIA_ATTR:an,ATTR_WHITESPACE:sn,CUSTOM_ELEMENT:ln,DATA_ATTR:on,DOCTYPE_NAME:gt,ERB_EXPR:tn,IS_ALLOWED_URI:Et,IS_SCRIPT_OR_DATA:rn,MUSTACHE_EXPR:en,TMPLIT_EXPR:nn});const J={element:1,text:3,progressingInstruction:7,comment:8,document:9},cn=function(){return typeof window>"u"?null:window},fn=function(o,l){if(typeof o!="object"||typeof o.createPolicy!="function")return null;let s=null;const T="data-tt-policy-suffix";l&&l.hasAttribute(T)&&(s=l.getAttribute(T));const N="dompurify"+(s?"#"+s:"");try{return o.createPolicy(N,{createHTML(x){return x},createScriptURL(x){return x}})}catch{return console.warn("TrustedTypes policy "+N+" could not be created."),null}},dt=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function ht(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:cn();const o=i=>ht(i);if(o.version="3.2.6",o.removed=[],!r||!r.document||r.document.nodeType!==J.document||!r.Element)return o.isSupported=!1,o;let{document:l}=r;const s=l,T=s.currentScript,{DocumentFragment:N,HTMLTemplateElement:x,Node:ue,Element:Pe,NodeFilter:G,NamedNodeMap:At=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:St,DOMParser:Rt,trustedTypes:Q}=r,W=Pe.prototype,Ot=Z(W,"cloneNode"),yt=Z(W,"remove"),Lt=Z(W,"nextSibling"),Dt=Z(W,"childNodes"),ee=Z(W,"parentNode");if(typeof x=="function"){const i=l.createElement("template");i.content&&i.content.ownerDocument&&(l=i.content.ownerDocument)}let g,B="";const{implementation:me,createNodeIterator:Nt,createDocumentFragment:bt,getElementsByTagName:It}=l,{importNode:Mt}=s;let h=dt();o.isSupported=typeof Tt=="function"&&typeof ee=="function"&&me&&me.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:pe,ERB_EXPR:de,TMPLIT_EXPR:Te,DATA_ATTR:Ct,ARIA_ATTR:wt,IS_SCRIPT_OR_DATA:xt,ATTR_WHITESPACE:ve,CUSTOM_ELEMENT:Pt}=pt;let{IS_ALLOWED_URI:ke}=pt,m=null;const Ue=a({},[...ct,...be,...Ie,...Me,...ft]);let d=null;const Fe=a({},[...ut,...Ce,...mt,...ce]);let f=Object.seal(_t(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Y=null,_e=null,He=!0,Ee=!0,ze=!1,Ge=!0,P=!1,te=!0,w=!1,ge=!1,he=!1,v=!1,ne=!1,oe=!1,We=!0,Be=!1;const vt="user-content-";let Ae=!0,X=!1,k={},U=null;const Ye=a({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Xe=null;const je=a({},["audio","video","img","source","image","track"]);let Se=null;const Ve=a({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ie="http://www.w3.org/1998/Math/MathML",ae="http://www.w3.org/2000/svg",b="http://www.w3.org/1999/xhtml";let F=b,Re=!1,Oe=null;const kt=a({},[ie,ae,b],Ne);let re=a({},["mi","mo","mn","ms","mtext"]),se=a({},["annotation-xml"]);const Ut=a({},["title","style","font","a","script"]);let j=null;const Ft=["application/xhtml+xml","text/html"],Ht="text/html";let p=null,H=null;const zt=l.createElement("form"),$e=function(e){return e instanceof RegExp||e instanceof Function},ye=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(H&&H===e)){if((!e||typeof e!="object")&&(e={}),e=C(e),j=Ft.indexOf(e.PARSER_MEDIA_TYPE)===-1?Ht:e.PARSER_MEDIA_TYPE,p=j==="application/xhtml+xml"?Ne:fe,m=L(e,"ALLOWED_TAGS")?a({},e.ALLOWED_TAGS,p):Ue,d=L(e,"ALLOWED_ATTR")?a({},e.ALLOWED_ATTR,p):Fe,Oe=L(e,"ALLOWED_NAMESPACES")?a({},e.ALLOWED_NAMESPACES,Ne):kt,Se=L(e,"ADD_URI_SAFE_ATTR")?a(C(Ve),e.ADD_URI_SAFE_ATTR,p):Ve,Xe=L(e,"ADD_DATA_URI_TAGS")?a(C(je),e.ADD_DATA_URI_TAGS,p):je,U=L(e,"FORBID_CONTENTS")?a({},e.FORBID_CONTENTS,p):Ye,Y=L(e,"FORBID_TAGS")?a({},e.FORBID_TAGS,p):C({}),_e=L(e,"FORBID_ATTR")?a({},e.FORBID_ATTR,p):C({}),k=L(e,"USE_PROFILES")?e.USE_PROFILES:!1,He=e.ALLOW_ARIA_ATTR!==!1,Ee=e.ALLOW_DATA_ATTR!==!1,ze=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ge=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,P=e.SAFE_FOR_TEMPLATES||!1,te=e.SAFE_FOR_XML!==!1,w=e.WHOLE_DOCUMENT||!1,v=e.RETURN_DOM||!1,ne=e.RETURN_DOM_FRAGMENT||!1,oe=e.RETURN_TRUSTED_TYPE||!1,he=e.FORCE_BODY||!1,We=e.SANITIZE_DOM!==!1,Be=e.SANITIZE_NAMED_PROPS||!1,Ae=e.KEEP_CONTENT!==!1,X=e.IN_PLACE||!1,ke=e.ALLOWED_URI_REGEXP||Et,F=e.NAMESPACE||b,re=e.MATHML_TEXT_INTEGRATION_POINTS||re,se=e.HTML_INTEGRATION_POINTS||se,f=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&$e(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(f.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&$e(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(f.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(f.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),P&&(Ee=!1),ne&&(v=!0),k&&(m=a({},ft),d=[],k.html===!0&&(a(m,ct),a(d,ut)),k.svg===!0&&(a(m,be),a(d,Ce),a(d,ce)),k.svgFilters===!0&&(a(m,Ie),a(d,Ce),a(d,ce)),k.mathMl===!0&&(a(m,Me),a(d,mt),a(d,ce))),e.ADD_TAGS&&(m===Ue&&(m=C(m)),a(m,e.ADD_TAGS,p)),e.ADD_ATTR&&(d===Fe&&(d=C(d)),a(d,e.ADD_ATTR,p)),e.ADD_URI_SAFE_ATTR&&a(Se,e.ADD_URI_SAFE_ATTR,p),e.FORBID_CONTENTS&&(U===Ye&&(U=C(U)),a(U,e.FORBID_CONTENTS,p)),Ae&&(m["#text"]=!0),w&&a(m,["html","head","body"]),m.table&&(a(m,["tbody"]),delete Y.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');g=e.TRUSTED_TYPES_POLICY,B=g.createHTML("")}else g===void 0&&(g=fn(Q,T)),g!==null&&typeof B=="string"&&(B=g.createHTML(""));S&&S(e),H=e}},qe=a({},[...be,...Ie,...Jt]),Ke=a({},[...Me,...Qt]),Gt=function(e){let t=ee(e);(!t||!t.tagName)&&(t={namespaceURI:F,tagName:"template"});const n=fe(e.tagName),c=fe(t.tagName);return Oe[e.namespaceURI]?e.namespaceURI===ae?t.namespaceURI===b?n==="svg":t.namespaceURI===ie?n==="svg"&&(c==="annotation-xml"||re[c]):!!qe[n]:e.namespaceURI===ie?t.namespaceURI===b?n==="math":t.namespaceURI===ae?n==="math"&&se[c]:!!Ke[n]:e.namespaceURI===b?t.namespaceURI===ae&&!se[c]||t.namespaceURI===ie&&!re[c]?!1:!Ke[n]&&(Ut[n]||!qe[n]):!!(j==="application/xhtml+xml"&&Oe[e.namespaceURI]):!1},D=function(e){$(o.removed,{element:e});try{ee(e).removeChild(e)}catch{yt(e)}},z=function(e,t){try{$(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch{$(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),e==="is")if(v||ne)try{D(t)}catch{}else try{t.setAttribute(e,"")}catch{}},Ze=function(e){let t=null,n=null;if(he)e="<remove></remove>"+e;else{const u=lt(e,/^[\r\n\t ]+/);n=u&&u[0]}j==="application/xhtml+xml"&&F===b&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const c=g?g.createHTML(e):e;if(F===b)try{t=new Rt().parseFromString(c,j)}catch{}if(!t||!t.documentElement){t=me.createDocument(F,"template",null);try{t.documentElement.innerHTML=Re?B:c}catch{}}const _=t.body||t.documentElement;return e&&n&&_.insertBefore(l.createTextNode(n),_.childNodes[0]||null),F===b?It.call(t,w?"html":"body")[0]:w?t.documentElement:_},Je=function(e){return Nt.call(e.ownerDocument||e,e,G.SHOW_ELEMENT|G.SHOW_COMMENT|G.SHOW_TEXT|G.SHOW_PROCESSING_INSTRUCTION|G.SHOW_CDATA_SECTION,null)},Le=function(e){return e instanceof St&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof At)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},Qe=function(e){return typeof ue=="function"&&e instanceof ue};function I(i,e,t){le(i,n=>{n.call(o,e,t,H)})}const et=function(e){let t=null;if(I(h.beforeSanitizeElements,e,null),Le(e))return D(e),!0;const n=p(e.nodeName);if(I(h.uponSanitizeElement,e,{tagName:n,allowedTags:m}),te&&e.hasChildNodes()&&!Qe(e.firstElementChild)&&A(/<[/\w!]/g,e.innerHTML)&&A(/<[/\w!]/g,e.textContent)||e.nodeType===J.progressingInstruction||te&&e.nodeType===J.comment&&A(/<[/\w]/g,e.data))return D(e),!0;if(!m[n]||Y[n]){if(!Y[n]&&nt(n)&&(f.tagNameCheck instanceof RegExp&&A(f.tagNameCheck,n)||f.tagNameCheck instanceof Function&&f.tagNameCheck(n)))return!1;if(Ae&&!U[n]){const c=ee(e)||e.parentNode,_=Dt(e)||e.childNodes;if(_&&c){const u=_.length;for(let O=u-1;O>=0;--O){const M=Ot(_[O],!0);M.__removalCount=(e.__removalCount||0)+1,c.insertBefore(M,Lt(e))}}}return D(e),!0}return e instanceof Pe&&!Gt(e)||(n==="noscript"||n==="noembed"||n==="noframes")&&A(/<\/no(script|embed|frames)/i,e.innerHTML)?(D(e),!0):(P&&e.nodeType===J.text&&(t=e.textContent,le([pe,de,Te],c=>{t=q(t,c," ")}),e.textContent!==t&&($(o.removed,{element:e.cloneNode()}),e.textContent=t)),I(h.afterSanitizeElements,e,null),!1)},tt=function(e,t,n){if(We&&(t==="id"||t==="name")&&(n in l||n in zt))return!1;if(!(Ee&&!_e[t]&&A(Ct,t))){if(!(He&&A(wt,t))){if(!d[t]||_e[t]){if(!(nt(e)&&(f.tagNameCheck instanceof RegExp&&A(f.tagNameCheck,e)||f.tagNameCheck instanceof Function&&f.tagNameCheck(e))&&(f.attributeNameCheck instanceof RegExp&&A(f.attributeNameCheck,t)||f.attributeNameCheck instanceof Function&&f.attributeNameCheck(t))||t==="is"&&f.allowCustomizedBuiltInElements&&(f.tagNameCheck instanceof RegExp&&A(f.tagNameCheck,n)||f.tagNameCheck instanceof Function&&f.tagNameCheck(n))))return!1}else if(!Se[t]){if(!A(ke,q(n,ve,""))){if(!((t==="src"||t==="xlink:href"||t==="href")&&e!=="script"&&$t(n,"data:")===0&&Xe[e])){if(!(ze&&!A(xt,q(n,ve,"")))){if(n)return!1}}}}}}return!0},nt=function(e){return e!=="annotation-xml"&&lt(e,Pt)},ot=function(e){I(h.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Le(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:d,forceKeepAttr:void 0};let c=t.length;for(;c--;){const _=t[c],{name:u,namespaceURI:O,value:M}=_,V=p(u),De=M;let E=u==="value"?De:qt(De);if(n.attrName=V,n.attrValue=E,n.keepAttr=!0,n.forceKeepAttr=void 0,I(h.uponSanitizeAttribute,e,n),E=n.attrValue,Be&&(V==="id"||V==="name")&&(z(u,e),E=vt+E),te&&A(/((--!?|])>)|<\/(style|title)/i,E)){z(u,e);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){z(u,e);continue}if(!Ge&&A(/\/>/i,E)){z(u,e);continue}P&&le([pe,de,Te],at=>{E=q(E,at," ")});const it=p(e.nodeName);if(!tt(it,V,E)){z(u,e);continue}if(g&&typeof Q=="object"&&typeof Q.getAttributeType=="function"&&!O)switch(Q.getAttributeType(it,V)){case"TrustedHTML":{E=g.createHTML(E);break}case"TrustedScriptURL":{E=g.createScriptURL(E);break}}if(E!==De)try{O?e.setAttributeNS(O,u,E):e.setAttribute(u,E),Le(e)?D(e):st(o.removed)}catch{z(u,e)}}I(h.afterSanitizeAttributes,e,null)},Wt=function i(e){let t=null;const n=Je(e);for(I(h.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)I(h.uponSanitizeShadowNode,t,null),et(t),ot(t),t.content instanceof N&&i(t.content);I(h.afterSanitizeShadowDOM,e,null)};return o.sanitize=function(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,n=null,c=null,_=null;if(Re=!i,Re&&(i="<!-->"),typeof i!="string"&&!Qe(i))if(typeof i.toString=="function"){if(i=i.toString(),typeof i!="string")throw K("dirty is not a string, aborting")}else throw K("toString is not a function");if(!o.isSupported)return i;if(ge||ye(e),o.removed=[],typeof i=="string"&&(X=!1),X){if(i.nodeName){const M=p(i.nodeName);if(!m[M]||Y[M])throw K("root node is forbidden and cannot be sanitized in-place")}}else if(i instanceof ue)t=Ze("<!---->"),n=t.ownerDocument.importNode(i,!0),n.nodeType===J.element&&n.nodeName==="BODY"||n.nodeName==="HTML"?t=n:t.appendChild(n);else{if(!v&&!P&&!w&&i.indexOf("<")===-1)return g&&oe?g.createHTML(i):i;if(t=Ze(i),!t)return v?null:oe?B:""}t&&he&&D(t.firstChild);const u=Je(X?i:t);for(;c=u.nextNode();)et(c),ot(c),c.content instanceof N&&Wt(c.content);if(X)return i;if(v){if(ne)for(_=bt.call(t.ownerDocument);t.firstChild;)_.appendChild(t.firstChild);else _=t;return(d.shadowroot||d.shadowrootmode)&&(_=Mt.call(s,_,!0)),_}let O=w?t.outerHTML:t.innerHTML;return w&&m["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&A(gt,t.ownerDocument.doctype.name)&&(O="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
2
- `+O),P&&le([pe,de,Te],M=>{O=q(O,M," ")}),g&&oe?g.createHTML(O):O},o.setConfig=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ye(i),ge=!0},o.clearConfig=function(){H=null,ge=!1},o.isValidAttribute=function(i,e,t){H||ye({});const n=p(i),c=p(e);return tt(n,c,t)},o.addHook=function(i,e){typeof e=="function"&&$(h[i],e)},o.removeHook=function(i,e){if(e!==void 0){const t=jt(h[i],e);return t===-1?void 0:Vt(h[i],t,1)[0]}return st(h[i])},o.removeHooks=function(i){h[i]=[]},o.removeAllHooks=function(){h=dt()},o}var un=ht();exports.purify=un;
@@ -1,6 +0,0 @@
1
- import { e as o, j as s, o as f } from "./layers.gnUyo71v.js";
2
- export {
3
- o as default,
4
- s as en,
5
- f as kaa
6
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react/jsx-runtime"),n=require("react"),_=require("react-i18next"),i=require("./layers.BcSLF4Xt.js"),B=require("@mantine/core"),G=require("@layers-app/shared"),k=t=>{const{width:f,height:d,isLoading:a,isError:h,src:m,id:p,altText:I,imageRef:x,maxWidth:c}=t;return g.jsxs("div",{className:"media-wrapper",style:{width:f,height:d,display:"inline-flex",position:"relative"},children:[g.jsx(B.LoadingOverlay,{visible:a,zIndex:1e3,overlayProps:{backgroundOpacity:.5},loaderProps:{size:24,color:"black"}}),g.jsx(V,{className:null,src:m,altText:I,imageRef:x,width:"inherit",height:"inherit",maxWidth:c||"auto",id:p})]})};function V({altText:t,className:f,imageRef:d,src:a,width:h,height:m,maxWidth:p,id:I}){const[x,c]=n.useState(!1);return g.jsx("img",{className:`${f||void 0} ${x?"":"loading"}`,src:a,alt:t,ref:d,style:{height:m,maxWidth:p,width:h},onLoad:()=>{a.includes("splash")?setTimeout(()=>{c(!0)},100):c(!0)},draggable:"false","data-id":I})}function J({src:t,altText:f,nodeKey:d,width:a,height:h,maxWidth:m,showCaption:p,caption:I,id:x,create:c,alignment:F}){var A,$;const M=n.useRef(null),[v,S]=n.useState(!0),{isCollabActive:W}=i.l(),[u]=i.o(),[E,j]=n.useState(!0),[l,C]=n.useState({width:0,height:0}),{fetchUploadMedia:L,fetchDeleteMedia:P,maxFileSize:Q}=n.useContext(i.Context),N=i.mediaMap.has(t)&&(((A=i.mediaMap.get(t))==null?void 0:A.mediaNodeKeys.length)===0||(($=i.mediaMap.get(t))==null?void 0:$.mediaNodeKeys.length)===void 0||t.trim()===""),{t:y}=_.useTranslation(),[X,H]=n.useState(0);n.useEffect(()=>u.registerDecoratorListener(()=>{H(e=>e+1)}),[N]),n.useEffect(()=>{if(!t||t.startsWith("data:image/")||!t.trim()){S(!1);return}const e=new Image;e.src=t,e.onload=()=>S(!1),e.onerror=()=>{S(!1)}},[t,N]);const U=(e,o)=>{u.update(()=>{i.ms(null);const s=i.us(d);i.$isImageNode(s)&&s.setWidthAndHeight(e,o)})},{historyState:R}=i.useSharedHistoryContext(),{settings:{showNestedEditorTreeView:z}}=i.useSettings(),[b,w]=n.useState(!1);function D(e){return e.endsWith(".svg")||e.includes("image/svg+xml")}function T(e){return new Promise((o,s)=>{if(D(e)){o(0);return}const r=new Image;r.src=e,r.onload=()=>{o(r.width)},r.onerror=()=>{s(new Error("Failed to load image"))}})}n.useEffect(()=>{c&&w(!0)},[c]),n.useEffect(()=>{let e=a,o=h,s=100;(t.includes("unsplash")?t.trim():!N&&t.trim()||t.includes("upload-src-editor"))&&t!=="upload"&&T(t).then(r=>{typeof e=="number"&&e<s&&r<s?(j(!0),C({width:e,height:o})):r<s?(j(!0),C({width:"auto",height:"auto"})):(C({width:r,height:r}),j(!1))}).catch(r=>{console.warn("Ошибка при загрузке изображения:",r.message)})},[t,N]),n.useEffect(()=>{l.width&&l.height&&E&&u.update(()=>{const e=i.us(d);i.$isImageNode(e)&&e.setWidthAndHeight(l.width,l.height)})},[l.width,l.height,E]),n.useEffect(()=>{const e=document.documentElement;i.toggleLockScroll(b,e)},[b]),n.useEffect(()=>u.registerCommand(i.UPLOAD_IMAGE_COMMAND,e=>(t==="upload"&&q(e),!1),i.Ii),[t,v]);const O=(e,o)=>{S(!1),u.update(()=>{const s=i.us(d);i.$isImageNode(s)&&(s.setSrc(e),s.setId(o))})},q=e=>{S(!0),L&&L(e[0],(o,s)=>{O(o,s)},o=>{o&&G.showErrorNotification({message:y("editor.gallery.errorFile")}),O("","")})};return!t||t==="upload"?g.jsx(i.ImagePicker,{uploading:!1,onUpload:e=>{!L||!e.length||(q(e),w(!1))},popoverProps:{opened:b,position:"bottom",onChange:w},onChange:e=>{w(!1),u.update(()=>{const o=i.us(d);i.$isImageNode(o)&&o.setSrc(e)})},children:g.jsx(i.EmptyNodeButton,{title:y("editor.image.add_photo"),icon:"photo",onClick:()=>w(!b),isLoading:v})}):E?g.jsx(k,{width:l.width,height:l.height,isLoading:v,isError:!1,isIcon:E,src:t,id:x,editor:u,nodeKey:d,fetchDeleteMedia:P,altText:f,imageRef:M,maxWidth:m,showCaption:p,caption:I,isCollabActive:W,historyState:R,showNestedEditorTreeView:z,t:y}):g.jsx(i.ResizableContainer,{editor:u,isIcon:E,width:typeof a=="string"&&a.includes("%")?parseFloat(a):a,height:typeof h=="string"&&h.includes("%")?parseFloat(h):a,initialWidth:l.width||"",initialHeight:l.height||"",onResizeEnd:U,alignment:F,children:g.jsx(k,{width:"inherit",height:"inherit",isLoading:v,isError:!1,isIcon:E,src:t,id:x,editor:u,nodeKey:d,fetchDeleteMedia:P,altText:f,imageRef:M,maxWidth:m,showCaption:p,caption:I,isCollabActive:W,historyState:R,showNestedEditorTreeView:z,t:y})})}exports.default=J;
@@ -1 +0,0 @@
1
- "use strict";const v=require("./layers.BcSLF4Xt.js");var I,q;function Y(){if(q)return I;q=1;var o="Expected a function",r=NaN,t="[object Symbol]",e=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,M=/^0o[0-7]+$/i,N=parseInt,R=typeof v.commonjsGlobal=="object"&&v.commonjsGlobal&&v.commonjsGlobal.Object===Object&&v.commonjsGlobal,W=typeof self=="object"&&self&&self.Object===Object&&self,$=R||W||Function("return this")(),B=Object.prototype,F=B.toString,D=Math.max,H=Math.min,h=function(){return $.Date.now()};function U(n,c,u){var d,g,O,y,f,p,m=0,k=!1,b=!1,S=!0;if(typeof n!="function")throw new TypeError(o);c=L(c)||0,x(u)&&(k=!!u.leading,b="maxWait"in u,O=b?D(L(u.maxWait)||0,c):O,S="trailing"in u?!!u.trailing:S);function T(i){var l=d,_=g;return d=g=void 0,m=i,y=n.apply(_,l),y}function J(i){return m=i,f=setTimeout(j,c),k?T(i):y}function K(i){var l=i-p,_=i-m,G=c-l;return b?H(G,O-_):G}function w(i){var l=i-p,_=i-m;return p===void 0||l>=c||l<0||b&&_>=O}function j(){var i=h();if(w(i))return C(i);f=setTimeout(j,K(i))}function C(i){return f=void 0,S&&d?T(i):(d=g=void 0,y)}function Q(){f!==void 0&&clearTimeout(f),m=0,d=p=g=f=void 0}function V(){return f===void 0?y:C(h())}function E(){var i=h(),l=w(i);if(d=arguments,g=this,p=i,l){if(f===void 0)return J(p);if(b)return f=setTimeout(j,c),T(p)}return f===void 0&&(f=setTimeout(j,c)),y}return E.cancel=Q,E.flush=V,E}function x(n){var c=typeof n;return!!n&&(c=="object"||c=="function")}function X(n){return!!n&&typeof n=="object"}function z(n){return typeof n=="symbol"||X(n)&&F.call(n)==t}function L(n){if(typeof n=="number")return n;if(z(n))return r;if(x(n)){var c=typeof n.valueOf=="function"?n.valueOf():n;n=x(c)?c+"":c}if(typeof n!="string")return n===0?n:+n;n=n.replace(e,"");var u=s.test(n);return u||M.test(n)?N(n.slice(2),u?2:8):a.test(n)?r:+n}return I=U,I}function P(){return P=Object.assign?Object.assign.bind():function(o){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var e in t)({}).hasOwnProperty.call(t,e)&&(o[e]=t[e])}return o},P.apply(null,arguments)}var A=function(o,r){return A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])},A(o,r)};function Z(o,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");A(o,r);function t(){this.constructor=o}o.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}exports.__assign=function(){return exports.__assign=Object.assign||function(r){for(var t,e=1,a=arguments.length;e<a;e++){t=arguments[e];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=t[s])}return r},exports.__assign.apply(this,arguments)};function ee(o,r){var t={};for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&r.indexOf(e)<0&&(t[e]=o[e]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,e=Object.getOwnPropertySymbols(o);a<e.length;a++)r.indexOf(e[a])<0&&Object.prototype.propertyIsEnumerable.call(o,e[a])&&(t[e[a]]=o[e[a]]);return t}function ne(o,r,t){if(t||arguments.length===2)for(var e=0,a=r.length,s;e<a;e++)(s||!(e in r))&&(s||(s=Array.prototype.slice.call(r,0,e)),s[e]=r[e]);return o.concat(s||Array.prototype.slice.call(r))}exports.__extends=Z;exports.__rest=ee;exports.__spreadArray=ne;exports._extends=P;exports.requireLodash_debounce=Y;