@layers-app/editor 2.2.39 → 2.2.41

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 (225) hide show
  1. package/dist/index.cjs +2 -2
  2. package/dist/index.d.ts +3 -2
  3. package/dist/index.js +2 -2
  4. package/dist/{layers.BgCKcFR4.js → layers.-pogHjPZ.js} +1 -1
  5. package/dist/{layers.Oc9jaxB6.js → layers.-prUTMEe.js} +1 -1
  6. package/dist/{layers.BneK1qna.js → layers.0REwXLJa.js} +1 -1
  7. package/dist/{layers.5hidirvk.js → layers.3-KHMN8-.js} +1 -1
  8. package/dist/{layers.DRXgOIaj.js → layers.6NJGN7LR.js} +1 -1
  9. package/dist/{layers.BtilEv7W.js → layers.7iqMYe1Z.js} +1 -1
  10. package/dist/{layers.B4MwyYlr.js → layers.9RpqwIgn.js} +1 -1
  11. package/dist/{layers.DznaoIV-.js → layers.9S8DSgzy.js} +18275 -17779
  12. package/dist/layers.AZFDTfYD.js +108 -0
  13. package/dist/{layers.BeVROkoW.js → layers.B1-2ER2o.js} +1 -1
  14. package/dist/{layers.BA-fPjo6.js → layers.B20QYwrg.js} +1 -1
  15. package/dist/{layers.BM23pRdt.js → layers.B2Y3SOyx.js} +1 -1
  16. package/dist/{layers.C1GrAiVZ.js → layers.B44bGQl8.js} +1 -1
  17. package/dist/{layers.s8sZ9U1H.js → layers.B4pgQDx9.js} +1 -1
  18. package/dist/{layers.BTFVPBI8.js → layers.B5FmUA8d.js} +1 -1
  19. package/dist/{layers.5n2MOy3N.js → layers.B6e4LO7M.js} +3 -3
  20. package/dist/{layers.D4QZ19UT.js → layers.BB5zhvW_.js} +1 -1
  21. package/dist/{layers.DiAoGYDr.js → layers.BBlgFkaX.js} +1 -1
  22. package/dist/{layers.BXdOndbk.js → layers.BEBGt1Dt.js} +1 -1
  23. package/dist/{layers.d8si0CFx.js → layers.BFOV9gyP.js} +3 -3
  24. package/dist/{layers.CfOWffIm.js → layers.BH74WarV.js} +1 -1
  25. package/dist/{layers.CauU55La.js → layers.BHUxeY-o.js} +1 -1
  26. package/dist/{layers.CCAqDLz2.js → layers.BIzPxN5I.js} +3 -3
  27. package/dist/{layers.X_ec8Mjz.js → layers.BJEB2n7C.js} +1 -1
  28. package/dist/{layers.CYP2eKGO.js → layers.BKCo0vbX.js} +10 -10
  29. package/dist/{layers.DiopUi-K.js → layers.BKV_Sn-p.js} +1 -1
  30. package/dist/{layers.CtY9zPeF.js → layers.BNc3uVU5.js} +1 -1
  31. package/dist/{layers.RrqVrea1.js → layers.BNgccTqa.js} +3 -3
  32. package/dist/{layers.BV6x-7O6.js → layers.BPG9BJyp.js} +1 -1
  33. package/dist/layers.BPmFneBG.js +10148 -0
  34. package/dist/{layers.CHXl3j9e.js → layers.BQn0SMyS.js} +1 -1
  35. package/dist/{layers.CEW9Y90t.js → layers.BSUqNKh-.js} +1 -1
  36. package/dist/{layers.DC5QbdwD.js → layers.BTC0a-iu.js} +1 -1
  37. package/dist/{layers.C_PpV0a5.js → layers.BTUD8Ga6.js} +1 -1
  38. package/dist/{layers.BJVQ0qMs.js → layers.BUUbg20U.js} +1 -1
  39. package/dist/{layers.iWzY6Hic.js → layers.BWEwrUfZ.js} +1 -1
  40. package/dist/{layers.P3PZpzps.js → layers.BWiShM4D.js} +7 -7
  41. package/dist/{layers.CmenZVdl.js → layers.BYnRL5fg.js} +1 -1
  42. package/dist/{layers.CLjqbblh.js → layers.BZNymU7f.js} +1 -1
  43. package/dist/{layers.CbfHZRKp.js → layers.B_Zw6UfK.js} +1 -1
  44. package/dist/{layers.k-dxAkmQ.js → layers.Bbx5_76Z.js} +1 -1
  45. package/dist/{layers.Cr72jVG7.js → layers.Bck1nyDf.js} +3 -3
  46. package/dist/{layers.DlkfhQ3e.js → layers.BeEGapP8.js} +1 -1
  47. package/dist/{layers.dbZjzkaK.js → layers.BeIaZJU-.js} +1 -1
  48. package/dist/{layers.C9CD3Ubz.js → layers.BeW-l4JL.js} +1 -1
  49. package/dist/{layers.DmPy8l_m.js → layers.Bf0vTbsV.js} +4 -4
  50. package/dist/{layers.YlOP7lTm.js → layers.Bf6zaNoL.js} +1 -1
  51. package/dist/{layers.C76hHFV5.js → layers.BfBwi9kx.js} +11 -11
  52. package/dist/{layers.BJFAAorh.js → layers.Bfmz9os1.js} +1 -1
  53. package/dist/{layers.C_IvrzZ3.js → layers.BgOa2ZQq.js} +1 -1
  54. package/dist/{layers.D_Q0sJVN.js → layers.Bh0e5oBt.js} +1 -1
  55. package/dist/{layers.DliYTSV9.js → layers.BhQd8YgR.js} +1 -1
  56. package/dist/{layers.B7K7JjK6.js → layers.BiJ8hfRt.js} +3 -3
  57. package/dist/{layers.B_wCJnJ6.js → layers.BjiKlA5A.js} +1 -1
  58. package/dist/{layers.BO_W3Sg4.js → layers.Bjl3-TZ6.js} +1 -1
  59. package/dist/{layers.BDvX-pLw.js → layers.Bk3BD2LO.js} +1 -1
  60. package/dist/{layers.DpZdhqgU.js → layers.BkfLSpc7.js} +1 -1
  61. package/dist/{layers.BWYG-epf.js → layers.Bnns4b8C.js} +1 -1
  62. package/dist/{layers.U8ij3AUv.js → layers.BprGkykI.js} +1 -1
  63. package/dist/{layers.CUnHWxZv.js → layers.BsEdQLFP.js} +1 -1
  64. package/dist/{layers.SzjX-1ik.js → layers.BsiV_mYn.js} +1 -1
  65. package/dist/{layers.CiShUrf7.js → layers.BtEhde9Y.js} +5 -5
  66. package/dist/{layers.xdGpR5F5.js → layers.BtqiE2Zw.js} +1 -1
  67. package/dist/{layers.BeA18HPd.js → layers.BuC8mggQ.js} +1 -1
  68. package/dist/{layers.B-WeTIhF.js → layers.BvdltVTe.js} +4 -4
  69. package/dist/layers.C-a7ykRd.js +7 -0
  70. package/dist/{layers.USIo3HEf.js → layers.C0P8qV9q.js} +1 -1
  71. package/dist/{layers.BZKn--pW.js → layers.C0nd9_au.js} +1 -1
  72. package/dist/{layers.B_zW-Tk4.js → layers.C1_VHbtk.js} +1 -1
  73. package/dist/{layers.D2vDtg7z.js → layers.C2V2Fqd8.js} +2 -2
  74. package/dist/{layers.NcWUdaQE.js → layers.C3TfSp3b.js} +1 -1
  75. package/dist/{layers.DksYERBY.js → layers.C3czrXaI.js} +1 -1
  76. package/dist/{layers.DXNww2DQ.js → layers.C6AQnU4v.js} +1 -1
  77. package/dist/{layers.DJLEhkGq.js → layers.C7CAhgE9.js} +1 -1
  78. package/dist/{layers.B3Akj7E1.js → layers.C9_GwOsc.js} +1 -1
  79. package/dist/{layers.R0UNCw_K.js → layers.CB6Gb2PR.js} +4186 -4135
  80. package/dist/{layers.DU7YyGRb.js → layers.CBZ6rdkQ.js} +1 -1
  81. package/dist/{layers.Wbn2xXXi.js → layers.CCV8nVyL.js} +258 -248
  82. package/dist/{layers.D47h6GlS.js → layers.CCkpZbNU.js} +1 -1
  83. package/dist/{layers.DsT3127f.js → layers.CI2dxkVZ.js} +1 -1
  84. package/dist/{layers.C3QxGl_1.js → layers.CKNafy8Z.js} +1 -1
  85. package/dist/{layers.DmFx2cLd.js → layers.CM1RY50-.js} +310 -319
  86. package/dist/{layers.CjSeEWXG.js → layers.CNGUViM-.js} +4 -4
  87. package/dist/{layers.CroQ5zug.js → layers.CVvm2cN5.js} +1 -1
  88. package/dist/layers.CX2hJt1r.js +423 -0
  89. package/dist/layers.CYf-jzmA.js +8 -0
  90. package/dist/{layers.CmS6rg8R.js → layers.CZ-ghciP.js} +1 -1
  91. package/dist/{layers.B6QJltN6.js → layers.CZ6EIVkr.js} +1 -1
  92. package/dist/{layers.CDPYEtGK.js → layers.CZ6iGqZQ.js} +1 -1
  93. package/dist/layers.CZeKVeuD.js +1 -0
  94. package/dist/{layers.DpuoBdTc.js → layers.C_Ur-9Yr.js} +2 -6
  95. package/dist/{layers.CKRjKRWX.js → layers.C_hkkoz8.js} +1 -1
  96. package/dist/{layers.B06CSm2p.js → layers.CaYqx9TB.js} +1 -1
  97. package/dist/{layers.XqJJTTDF.js → layers.Ca_FfHTH.js} +118 -118
  98. package/dist/{layers.bhtLIrfi.js → layers.CdJ_RdT6.js} +8829 -8493
  99. package/dist/{layers.DttEWukY.js → layers.CdSOkW0t.js} +1 -1
  100. package/dist/{layers.BbU1f-so.js → layers.Ce6JuM4T.js} +3 -3
  101. package/dist/{layers.BDnlMlKY.js → layers.CezhTfqb.js} +1 -1
  102. package/dist/{layers.BCoxinD3.js → layers.ChX7eMI0.js} +4 -4
  103. package/dist/{layers.DIZFYhqM.js → layers.CiRsNynK.js} +1 -1
  104. package/dist/{layers.BebJaZC1.js → layers.CiU5xtTu.js} +1 -1
  105. package/dist/{layers.DxDbSIKs.js → layers.CimFPCJA.js} +1 -1
  106. package/dist/{layers.BA-jTXAv.js → layers.CntF-9iu.js} +1 -1
  107. package/dist/{layers.BZy5Uzzw.js → layers.CoKmxI39.js} +1 -1
  108. package/dist/{layers.BIA7ec4C.js → layers.CqOpB2pv.js} +1 -1
  109. package/dist/{layers.BC0-inqe.js → layers.CqsMZzo3.js} +1 -1
  110. package/dist/{layers.DR0jwzWc.js → layers.CtgJUNhm.js} +1 -1
  111. package/dist/{layers.BqipSFwO.js → layers.CuEH1y5V.js} +1 -1
  112. package/dist/{layers.CO9knj3N.js → layers.CuJjDl5I.js} +1 -1
  113. package/dist/{layers.C45oKzh5.js → layers.CvxHQb8U.js} +1 -1
  114. package/dist/{layers.DRKTw-N-.js → layers.CwzcRNpd.js} +1 -1
  115. package/dist/{layers.CxacO-LY.js → layers.CxnKa1SZ.js} +1 -1
  116. package/dist/{layers.fJRAytBv.js → layers.Cz4C01_N.js} +1 -1
  117. package/dist/{layers.BQGg7n31.js → layers.D-Ie2JQV.js} +1 -1
  118. package/dist/{layers.DMNMYNJf.js → layers.D0sTzHvk.js} +1 -1
  119. package/dist/layers.D0vgKk7k.js +1309 -0
  120. package/dist/{layers.BHFREp9F.js → layers.D1aHIuph.js} +1 -1
  121. package/dist/{layers.DkT9TBiq.js → layers.D1x7GR3O.js} +4 -4
  122. package/dist/{layers.CW1ZIhhZ.js → layers.D2yTz-So.js} +1 -1
  123. package/dist/{layers.BUSJvT4D.js → layers.D4aJmX4D.js} +1 -1
  124. package/dist/{layers.B0ofc_1O.js → layers.D5Ydj3ww.js} +1 -1
  125. package/dist/{layers.Uh1SV_3g.js → layers.D87cBIKf.js} +1 -1
  126. package/dist/{layers.B1N5QoW_.js → layers.D8aKn7_I.js} +1 -1
  127. package/dist/{layers.D7c7Av2e.js → layers.DA9xtoYs.js} +4 -4
  128. package/dist/{layers.CY7OxUJF.js → layers.DAvNRddm.js} +1 -1
  129. package/dist/{layers.Dh-m5G3g.js → layers.DC4WjaI4.js} +1 -1
  130. package/dist/{layers.CZBDium5.js → layers.DDM4b59r.js} +1 -1
  131. package/dist/{layers.R4TihaIl.js → layers.DDm6VVYR.js} +1 -1
  132. package/dist/layers.DFsWppan.js +198 -0
  133. package/dist/{layers.8rMIQVL-.js → layers.DH8HnxJY.js} +2 -2
  134. package/dist/{layers.Dj_5Xbl8.js → layers.DH8K9r9O.js} +1 -1
  135. package/dist/{layers.DDwZIIN7.js → layers.DHCkeaBj.js} +2 -2
  136. package/dist/{layers.Cg1x2G31.js → layers.DHWU1y10.js} +1 -1
  137. package/dist/{layers.uANnQ5Fm.js → layers.DHtvA3UR.js} +1 -1
  138. package/dist/{layers.DpcaOSkM.js → layers.DJNq6slZ.js} +213 -207
  139. package/dist/layers.DJlXUaLG.js +16 -0
  140. package/dist/{layers.BH0SQ40e.js → layers.DK_8k30I.js} +1 -1
  141. package/dist/{layers.B-8WoW9I.js → layers.DNZeWizh.js} +3 -3
  142. package/dist/layers.DQwjT1Ef.js +1 -0
  143. package/dist/{layers.BKNDBDHu.js → layers.DRwGEKDY.js} +4 -4
  144. package/dist/{layers.CdBHvMBb.js → layers.DSA8lkEg.js} +1 -1
  145. package/dist/{layers.f01TeqL7.js → layers.DSs7H9TY.js} +1 -1
  146. package/dist/{layers.oc6z8pju.js → layers.DU-5gyIL.js} +1 -1
  147. package/dist/{layers._BFXtGJ8.js → layers.DUtZsAUN.js} +1 -1
  148. package/dist/{layers.BgR-VV0P.js → layers.DVwRkt1k.js} +2 -2
  149. package/dist/{layers.CLMBiK0a.js → layers.DXAGo5cY.js} +1 -1
  150. package/dist/{layers.BwGpsJ4u.js → layers.DZIuSvWH.js} +1 -1
  151. package/dist/{layers.C8GRvyED.js → layers.DZT3fhDF.js} +1 -1
  152. package/dist/{layers.CFhU1U3X.js → layers.DZr9ja6S.js} +3 -3
  153. package/dist/{layers.BM3g7Gca.js → layers.D_2VYVAz.js} +1 -1
  154. package/dist/{layers.dcx5hh3X.js → layers.DaDNIac_.js} +1 -1
  155. package/dist/{layers.Dxs1Bz9v.js → layers.DaWCCzXz.js} +1 -1
  156. package/dist/{layers.gxFi9LT2.js → layers.DdVFlLYB.js} +1 -1
  157. package/dist/{layers.CvVA1BEe.js → layers.DdogDSyL.js} +1 -1
  158. package/dist/{layers.BZa1ZhQx.js → layers.DhowXOlR.js} +1 -1
  159. package/dist/{layers.DpW_2wbA.js → layers.DlzAUFQk.js} +1 -1
  160. package/dist/{layers.CJpZDp7M.js → layers.DmYKMAk5.js} +1 -1
  161. package/dist/{layers.Da7LCbJf.js → layers.DnX82iOF.js} +1 -1
  162. package/dist/{layers.BdE98P_O.js → layers.DoP-WMDr.js} +6 -6
  163. package/dist/{layers.CHTW7w8j.js → layers.DqLY2bj6.js} +1 -1
  164. package/dist/{layers.cvIsS1cH.js → layers.DqbSBCTg.js} +1 -1
  165. package/dist/{layers.CQo7rAzJ.js → layers.DqqiMEmK.js} +1 -1
  166. package/dist/{layers.RU5L2B1k.js → layers.Dt4hTKjU.js} +1 -1
  167. package/dist/{layers.DCB98xx_.js → layers.DvTE7LyS.js} +1 -1
  168. package/dist/{layers.BTdHI6vd.js → layers.DvprN6bf.js} +1 -1
  169. package/dist/{layers.Boff2IGc.js → layers.DwZRGekE.js} +1 -1
  170. package/dist/{layers.DoyknGUW.js → layers.DweZXvH2.js} +2 -2
  171. package/dist/layers.DwkrCSjE.js +6 -0
  172. package/dist/{layers.B9kZdVly.js → layers.DwxdvxV6.js} +1 -1
  173. package/dist/{layers.pawkqiwU.js → layers.DxiI7oFV.js} +8 -8
  174. package/dist/{layers.9uSonYCj.js → layers.DxoCSH4r.js} +1 -1
  175. package/dist/{layers.BpEQSX7Z.js → layers.FUlqL-BW.js} +1 -1
  176. package/dist/{layers.C2oKI1GV.js → layers.H-s_kgpp.js} +1 -1
  177. package/dist/{layers.B1G1bgWO.js → layers.K9sbiHeh.js} +1 -1
  178. package/dist/{layers.CvliPXiJ.js → layers.KIMFA6cd.js} +1 -1
  179. package/dist/layers.LUWx2Na_.js +1 -0
  180. package/dist/{layers.6_jHps_7.js → layers.R4j_04y7.js} +1 -1
  181. package/dist/layers.V_aDpQCH.js +1 -0
  182. package/dist/layers.ZbZryeHO.js +1 -0
  183. package/dist/{layers.-owKjqHV.js → layers.ZimVFJsj.js} +1 -1
  184. package/dist/{layers.zUI5AYmB.js → layers.azQKEmBP.js} +5 -5
  185. package/dist/{layers.BQFlMXtw.js → layers.eUUVnf56.js} +1 -1
  186. package/dist/{layers.CmcRlu6P.js → layers.iMpiFcJq.js} +1 -1
  187. package/dist/{layers.BpNv93hm.js → layers.iQB27rXc.js} +1 -1
  188. package/dist/{layers.Cke9Oy_D.js → layers.jhkokT-m.js} +1 -1
  189. package/dist/{layers.DseqB-43.js → layers.kPF1pBqD.js} +1 -1
  190. package/dist/layers.lnCuj7Q6.js +51 -0
  191. package/dist/{layers.D2_svYTD.js → layers.m_ulwRpf.js} +1 -1
  192. package/dist/layers.nQDKnlwp.js +425 -0
  193. package/dist/{layers.EsP8_-mS.js → layers.nkBs2J_Y.js} +1 -1
  194. package/dist/{layers.CL7wA00x.js → layers.o6WBaOLa.js} +1 -1
  195. package/dist/{layers.8FM5NsxV.js → layers.oJ2sQ4Hw.js} +22 -22
  196. package/dist/{layers.DmWfT22i.js → layers.pI_GV11S.js} +3 -3
  197. package/dist/{layers.iss3S-LH.js → layers.pSfFlbuv.js} +2 -2
  198. package/dist/{layers.C2JYa_2H.js → layers.pz4hKIUL.js} +1 -1
  199. package/dist/{layers.oYiIETz2.js → layers.q3IjirYU.js} +1 -1
  200. package/dist/{layers.BrN17oUW.js → layers.rvGjGGX-.js} +1 -1
  201. package/dist/{layers.veXJFa7R.js → layers.s8O26TRm.js} +1 -1
  202. package/dist/{layers.CYXmfjKq.js → layers.tgfKdwxk.js} +1 -1
  203. package/dist/{layers.BOinKQOK.js → layers.uO2ixaGs.js} +1 -1
  204. package/dist/{layers.X3SIP7Ip.js → layers.va1nURVd.js} +6 -6
  205. package/dist/{layers.BeBFX8T_.js → layers.vqHuEAO-.js} +1 -1
  206. package/dist/{layers.Ba4F6POA.js → layers.xbktakT7.js} +3 -3
  207. package/dist/layers.z8kAk_Sg.js +1 -0
  208. package/package.json +80 -80
  209. package/dist/layers.3z4hpfnU.js +0 -16
  210. package/dist/layers.BXWDzDej.js +0 -1313
  211. package/dist/layers.BZzKS_Ht.js +0 -8590
  212. package/dist/layers.Bt-yfyCM.js +0 -423
  213. package/dist/layers.C8a6CwP_.js +0 -425
  214. package/dist/layers.CBjrPOu6.js +0 -8
  215. package/dist/layers.CdW7OZ6z.js +0 -96
  216. package/dist/layers.Cs58YuTI.js +0 -1
  217. package/dist/layers.Cw1kMAsl.js +0 -6
  218. package/dist/layers.D6lY_3UF.js +0 -1
  219. package/dist/layers.DA_UUeYz.js +0 -6
  220. package/dist/layers.DCt6JV-Z.js +0 -51
  221. package/dist/layers.DXOudqWU.js +0 -1
  222. package/dist/layers.DaxIHSrE.js +0 -1
  223. package/dist/layers.FtE-FDfI.js +0 -1
  224. package/dist/layers.dBz49wvs.js +0 -1
  225. package/dist/layers.pmaa8paI.js +0 -198
@@ -1,11 +1,11 @@
1
- import { jsxs as C, jsx as n, Fragment as G } from "react/jsx-runtime";
2
- import { useMemo as X, useState as b, useCallback as I, useContext as ge, useRef as We, useEffect as P } from "react";
3
- import { useTranslation as L } from "react-i18next";
4
- import { useLexicalComposerContext as U } from "@lexical/react/LexicalComposerContext";
5
- import { Menu as S, Flex as de, Stack as ke, Button as $, Box as Le, LoadingOverlay as Ue } from "@mantine/core";
6
- import { $getNodeByKey as N, COMMAND_PRIORITY_LOW as ze, $setSelection as _e } from "lexical";
7
- import { y as Fe, A as Y, K as He, H as x, z as he, n as fe, B as we, D as O, N as be, F as je, G as $e, q as Be, C as ve, J as Ve, L as Ge, P as B, Q as Xe, S as Ye, U as qe, V as Je, W as Qe, X as Ze, R as Ke, m as ce, O as et, k as ue, Y as me, o as tt } from "./layers.DznaoIV-.js";
8
- import { AttachmentsGalleryModal as ye, showErrorNotification as ot } from "@layers-app/shared";
1
+ import { jsxs as I, jsx as n, Fragment as G } from "react/jsx-runtime";
2
+ import { useMemo as X, useState as b, useCallback as k, useContext as he, useRef as Ee, useEffect as M } from "react";
3
+ import { useTranslation as R } from "react-i18next";
4
+ import { useLexicalComposerContext as z } from "@lexical/react/LexicalComposerContext";
5
+ import { Menu as A, Flex as de, Stack as Te, Button as $, Box as Re, LoadingOverlay as ze } from "@mantine/core";
6
+ import { $getNodeByKey as L, COMMAND_PRIORITY_LOW as Ue, $setSelection as je } from "lexical";
7
+ import { y as _e, k as q, m as Fe, H as O, z as ge, D as fe, B as D, N as we, F as He, G as $e, q as Be, C as be, J as Ve, K as Ge, L as B, Q as Xe, S as qe, T as Je, U as Qe, V as Ye, W as Ze, R as Ke, O as et, r as ce, j as ue, X as pe, o as tt } from "./layers.9S8DSgzy.js";
8
+ import { AttachmentsGalleryModal as Ce, showErrorNotification as ot } from "@layers-app/shared";
9
9
  import { useLexicalEditable as nt } from "@lexical/react/useLexicalEditable";
10
10
  import { useDisclosure as V } from "@mantine/hooks";
11
11
  import "@lexical/react/LexicalDecoratorBlockNode";
@@ -17,11 +17,21 @@ import "react-dom";
17
17
  import "@lexical/react/LexicalErrorBoundary";
18
18
  import "@lexical/react/LexicalBlockWithAlignableContents";
19
19
  import "@mantine/notifications";
20
+ const ye = [
21
+ ["path", { d: "M8.00001 3.09779C8.00001 3.09779 4.03375 2.74194 3.38784 3.38785C2.74192 4.03375 3.09784 8 3.09784 8", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", key: "0" }],
22
+ ["path", { d: "M8.00001 20.9022C8.00001 20.9022 4.03375 21.2581 3.38784 20.6122C2.74192 19.9662 3.09784 16 3.09784 16", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", key: "1" }],
23
+ ["path", { d: "M16 3.09779C16 3.09779 19.9663 2.74194 20.6122 3.38785C21.2581 4.03375 20.9022 8 20.9022 8", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", key: "2" }],
24
+ ["path", { d: "M16 20.9022C16 20.9022 19.9663 21.2581 20.6122 20.6122C21.2581 19.9662 20.9022 16 20.9022 16", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", key: "3" }],
25
+ ["path", { d: "M14.0107 9.99847L20.0625 3.94678", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", key: "4" }],
26
+ ["path", { d: "M9.99696 14.0024L3.63966 20.3807", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", key: "5" }],
27
+ ["path", { d: "M9.99732 10.0024L3.84571 3.85889", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", key: "6" }],
28
+ ["path", { d: "M13.9795 14.0024L20.5279 20.4983", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", key: "7" }]
29
+ ];
20
30
  function it(e, i) {
21
31
  const o = document.createElement("a");
22
32
  o.href = e, o.download = i, o.rel = "noopener", document.body.appendChild(o), o.click(), o.remove();
23
33
  }
24
- function q(e) {
34
+ function J(e) {
25
35
  try {
26
36
  const o = new URL(e, window.location.origin).pathname.split("/").pop() || "image";
27
37
  return o.includes(".") ? o : `${o}.png`;
@@ -29,63 +39,63 @@ function q(e) {
29
39
  return "image";
30
40
  }
31
41
  }
32
- async function J(e, i) {
42
+ async function Q(e, i) {
33
43
  const o = await fetch(e);
34
44
  if (!o.ok)
35
45
  throw new Error("fetch failed");
36
- const a = await o.blob(), s = URL.createObjectURL(a);
46
+ const r = await o.blob(), s = URL.createObjectURL(r);
37
47
  try {
38
48
  it(s, i);
39
49
  } finally {
40
50
  setTimeout(() => URL.revokeObjectURL(s), 0);
41
51
  }
42
52
  }
43
- function Ie({
53
+ function ke({
44
54
  opened: e,
45
55
  onOpenChange: i,
46
56
  t: o,
47
- onDownload: a,
57
+ onDownload: r,
48
58
  onDelete: s
49
59
  }) {
50
- return /* @__PURE__ */ C(
51
- S,
60
+ return /* @__PURE__ */ I(
61
+ A,
52
62
  {
53
63
  opened: e,
54
64
  onChange: i,
55
- transitionProps: Fe,
65
+ transitionProps: _e,
56
66
  shadow: "md",
57
67
  position: "bottom-start",
58
68
  offset: 4,
59
69
  withinPortal: !0,
60
70
  closeOnItemClick: !0,
61
71
  children: [
62
- /* @__PURE__ */ n(S.Target, { children: /* @__PURE__ */ n(
63
- Y,
72
+ /* @__PURE__ */ n(A.Target, { children: /* @__PURE__ */ n(
73
+ q,
64
74
  {
65
75
  label: o("editor.toolbar.more"),
66
- icon: He,
76
+ icon: Fe,
67
77
  iconColor: "var(--mantine-color-gray-text)",
68
78
  "aria-label": o("editor.toolbar.more")
69
79
  }
70
80
  ) }),
71
- /* @__PURE__ */ C(S.Dropdown, { p: 4, w: 164, onMouseDown: (r) => r.preventDefault(), children: [
81
+ /* @__PURE__ */ I(A.Dropdown, { p: 4, w: 164, onMouseDown: (a) => a.preventDefault(), children: [
72
82
  /* @__PURE__ */ n(
73
- S.Item,
83
+ A.Item,
74
84
  {
75
- leftSection: /* @__PURE__ */ n(de, { align: "center", justify: "center", c: "gray.6", children: /* @__PURE__ */ n(x, { icon: he, size: 16 }) }),
76
- onClick: (r) => {
77
- r.stopPropagation(), a();
85
+ leftSection: /* @__PURE__ */ n(de, { align: "center", justify: "center", c: "gray.6", children: /* @__PURE__ */ n(O, { icon: ge, size: 16 }) }),
86
+ onClick: (a) => {
87
+ a.stopPropagation(), r();
78
88
  },
79
89
  children: o("editor.gallery.download")
80
90
  }
81
91
  ),
82
92
  /* @__PURE__ */ n(
83
- S.Item,
93
+ A.Item,
84
94
  {
85
95
  color: "red",
86
- leftSection: /* @__PURE__ */ n(de, { align: "center", justify: "center", c: "red.6", children: /* @__PURE__ */ n(x, { icon: fe, size: 16 }) }),
87
- onClick: (r) => {
88
- r.stopPropagation(), s();
96
+ leftSection: /* @__PURE__ */ n(de, { align: "center", justify: "center", c: "red.6", children: /* @__PURE__ */ n(O, { icon: fe, size: 16 }) }),
97
+ onClick: (a) => {
98
+ a.stopPropagation(), s();
89
99
  },
90
100
  children: o("editor.contextMenu.delete")
91
101
  }
@@ -95,15 +105,15 @@ function Ie({
95
105
  }
96
106
  );
97
107
  }
98
- const Ce = ({
108
+ const Ie = ({
99
109
  t: e,
100
110
  src: i,
101
111
  setShown: o,
102
- id: a
112
+ id: r
103
113
  }) => {
104
- const [s, { open: r, close: m }] = V(!1), c = X(() => [
114
+ const [s, { open: a, close: p }] = V(!1), c = X(() => [
105
115
  {
106
- id: !a || a === "0" ? "" : a,
116
+ id: !r || r === "0" ? "" : r,
107
117
  Url: i ?? "",
108
118
  contentType: "image/*",
109
119
  originalFileName: "",
@@ -120,61 +130,61 @@ const Ce = ({
120
130
  deleted: !1,
121
131
  deletedAt: /* @__PURE__ */ new Date()
122
132
  }
123
- ], [i, a]);
124
- return /* @__PURE__ */ C(G, { children: [
133
+ ], [i, r]);
134
+ return /* @__PURE__ */ I(G, { children: [
125
135
  /* @__PURE__ */ n(
126
- ye,
136
+ Ce,
127
137
  {
128
138
  opened: s,
129
- onOpenChange: (g) => {
130
- g ? r() : m();
139
+ onOpenChange: (h) => {
140
+ h ? a() : p();
131
141
  },
132
142
  attachments: c
133
143
  }
134
144
  ),
135
145
  /* @__PURE__ */ n(
136
- Y,
146
+ q,
137
147
  {
138
148
  label: e("editor.image.preview"),
139
- icon: we,
149
+ icon: ye,
140
150
  iconColor: "var(--mantine-color-gray-text)",
141
151
  "aria-label": e("editor.image.preview"),
142
152
  onClick: () => {
143
- o(!1), r();
153
+ o(!1), a();
144
154
  }
145
155
  }
146
156
  )
147
157
  ] });
148
- }, at = ({
158
+ }, rt = ({
149
159
  nodeKey: e,
150
160
  src: i
151
161
  }) => {
152
- const [o] = U(), a = nt(), [s, r] = b(!1), [m, c] = b(!1), { t: p } = L(), g = I(() => {
162
+ const [o] = z(), r = nt(), [s, a] = b(!1), [p, c] = b(!1), { t: m } = R(), h = k(() => {
153
163
  o.update(() => {
154
- const f = N(e);
155
- O(f) && f.remove();
164
+ const f = L(e);
165
+ D(f) && f.remove();
156
166
  });
157
- }, [o, e]), v = I(async () => {
167
+ }, [o, e]), C = k(async () => {
158
168
  if (i)
159
169
  try {
160
- await J(i, q(i));
170
+ await Q(i, J(i));
161
171
  } catch {
162
172
  }
163
173
  }, [i]);
164
- return /* @__PURE__ */ C(
174
+ return /* @__PURE__ */ I(
165
175
  "div",
166
176
  {
167
- className: `media-actions ${a ? "" : "media-actions--readonly"}`,
177
+ className: `media-actions ${r ? "" : "media-actions--readonly"}`,
168
178
  children: [
169
- /* @__PURE__ */ n(Ce, { t: p, src: i, setShown: () => {
179
+ /* @__PURE__ */ n(Ie, { t: m, src: i, setShown: () => {
170
180
  } }),
171
- a && /* @__PURE__ */ C(G, { children: [
181
+ r && /* @__PURE__ */ I(G, { children: [
172
182
  /* @__PURE__ */ n(
173
- be,
183
+ we,
174
184
  {
175
185
  opened: s,
176
- setOpened: r,
177
- t: p,
186
+ setOpened: a,
187
+ t: m,
178
188
  editor: o,
179
189
  nodeKey: e,
180
190
  setShown: () => {
@@ -182,37 +192,37 @@ const Ce = ({
182
192
  }
183
193
  ),
184
194
  /* @__PURE__ */ n(
185
- Ie,
195
+ ke,
186
196
  {
187
- opened: m,
197
+ opened: p,
188
198
  onOpenChange: c,
189
- t: p,
190
- onDownload: () => void v(),
191
- onDelete: g
199
+ t: m,
200
+ onDownload: () => void C(),
201
+ onDelete: h
192
202
  }
193
203
  )
194
204
  ] })
195
205
  ]
196
206
  }
197
207
  );
198
- }, rt = () => {
208
+ }, at = () => {
199
209
  };
200
210
  function st({ nodeKey: e, src: i, id: o }) {
201
- const { t: a } = L(), [s] = U(), [r, m] = b(!1), [c, p] = b(!1), g = I(() => {
202
- p(!1), s.update(() => {
203
- const f = N(e);
204
- if (!O(f)) return;
205
- const D = f.getParent();
206
- je(D) ? D.remove() : f.remove();
211
+ const { t: r } = R(), [s] = z(), [a, p] = b(!1), [c, m] = b(!1), h = k(() => {
212
+ m(!1), s.update(() => {
213
+ const f = L(e);
214
+ if (!D(f)) return;
215
+ const v = f.getParent();
216
+ He(v) ? v.remove() : f.remove();
207
217
  });
208
- }, [s, e]), v = I(async () => {
218
+ }, [s, e]), C = k(async () => {
209
219
  if (i)
210
220
  try {
211
- await J(i, q(i));
221
+ await Q(i, J(i));
212
222
  } catch {
213
223
  }
214
224
  }, [i]);
215
- return /* @__PURE__ */ C(
225
+ return /* @__PURE__ */ I(
216
226
  "div",
217
227
  {
218
228
  className: "media-actions visible",
@@ -227,25 +237,25 @@ function st({ nodeKey: e, src: i, id: o }) {
227
237
  },
228
238
  onClick: (f) => f.stopPropagation(),
229
239
  children: [
230
- /* @__PURE__ */ n(Ce, { t: a, src: i, setShown: rt, id: o }),
240
+ /* @__PURE__ */ n(Ie, { t: r, src: i, setShown: at, id: o }),
231
241
  /* @__PURE__ */ n(
232
- be,
242
+ we,
233
243
  {
234
- opened: r,
235
- setOpened: m,
236
- t: a,
244
+ opened: a,
245
+ setOpened: p,
246
+ t: r,
237
247
  editor: s,
238
248
  nodeKey: e
239
249
  }
240
250
  ),
241
251
  /* @__PURE__ */ n(
242
- Ie,
252
+ ke,
243
253
  {
244
254
  opened: c,
245
- onOpenChange: p,
246
- t: a,
247
- onDownload: () => void v(),
248
- onDelete: g
255
+ onOpenChange: m,
256
+ t: r,
257
+ onDownload: () => void C(),
258
+ onDelete: h
249
259
  }
250
260
  )
251
261
  ]
@@ -253,7 +263,7 @@ function st({ nodeKey: e, src: i, id: o }) {
253
263
  );
254
264
  }
255
265
  function lt({ nodeKey: e, src: i, id: o }) {
256
- const { t: a } = L(), [s] = U(), [r, { open: m, close: c }] = V(!1), [p, { open: g, close: v }] = V(!1), f = X(
266
+ const { t: r } = R(), [s] = z(), [a, { open: p, close: c }] = V(!1), [m, { open: h, close: C }] = V(!1), f = X(
257
267
  () => [
258
268
  {
259
269
  id: !o || o === "0" ? "" : o,
@@ -275,21 +285,21 @@ function lt({ nodeKey: e, src: i, id: o }) {
275
285
  }
276
286
  ],
277
287
  [i, o]
278
- ), D = () => {
279
- c(), g();
280
- }, E = I(async () => {
288
+ ), v = () => {
289
+ c(), h();
290
+ }, x = k(async () => {
281
291
  if (c(), !!i)
282
292
  try {
283
- await J(i, q(i));
293
+ await Q(i, J(i));
284
294
  } catch {
285
295
  }
286
- }, [i, c]), T = I(() => {
296
+ }, [i, c]), S = k(() => {
287
297
  c(), s.update(() => {
288
- const w = N(e);
289
- O(w) && w.remove();
298
+ const w = L(e);
299
+ D(w) && w.remove();
290
300
  });
291
301
  }, [s, e, c]);
292
- return /* @__PURE__ */ C(G, { children: [
302
+ return /* @__PURE__ */ I(G, { children: [
293
303
  /* @__PURE__ */ n(
294
304
  "div",
295
305
  {
@@ -303,32 +313,32 @@ function lt({ nodeKey: e, src: i, id: o }) {
303
313
  },
304
314
  onClick: (w) => w.stopPropagation(),
305
315
  children: /* @__PURE__ */ n(
306
- Y,
316
+ q,
307
317
  {
308
- label: a("editor.toolbar.more"),
318
+ label: r("editor.toolbar.more"),
309
319
  icon: $e,
310
320
  iconColor: "var(--mantine-color-gray-text)",
311
- "aria-label": a("editor.toolbar.more"),
312
- onClick: m
321
+ "aria-label": r("editor.toolbar.more"),
322
+ onClick: p
313
323
  }
314
324
  )
315
325
  }
316
326
  ),
317
327
  /* @__PURE__ */ n(
318
- ye,
328
+ Ce,
319
329
  {
320
- opened: p,
321
- onOpenChange: (w) => w ? g() : v(),
330
+ opened: m,
331
+ onOpenChange: (w) => w ? h() : C(),
322
332
  attachments: f
323
333
  }
324
334
  ),
325
335
  /* @__PURE__ */ n(
326
336
  Be,
327
337
  {
328
- opened: r,
338
+ opened: a,
329
339
  onClose: c,
330
- title: a("editor.image.mobileActions"),
331
- children: /* @__PURE__ */ C(ke, { gap: 4, p: 0, children: [
340
+ title: r("editor.image.mobileActions"),
341
+ children: /* @__PURE__ */ I(Te, { gap: 4, p: 0, children: [
332
342
  /* @__PURE__ */ n(
333
343
  $,
334
344
  {
@@ -338,16 +348,16 @@ function lt({ nodeKey: e, src: i, id: o }) {
338
348
  fullWidth: !0,
339
349
  justify: "flex-start",
340
350
  bg: "var(--editor-action-bg)",
341
- onClick: D,
351
+ onClick: v,
342
352
  leftSection: /* @__PURE__ */ n(
343
- x,
353
+ O,
344
354
  {
345
- icon: we,
355
+ icon: ye,
346
356
  size: 16,
347
357
  color: "var(--mantine-color-dimmed)"
348
358
  }
349
359
  ),
350
- children: a("editor.image.previewFullScreen")
360
+ children: r("editor.image.previewFullScreen")
351
361
  }
352
362
  ),
353
363
  /* @__PURE__ */ n(
@@ -359,16 +369,16 @@ function lt({ nodeKey: e, src: i, id: o }) {
359
369
  fullWidth: !0,
360
370
  justify: "flex-start",
361
371
  bg: "var(--editor-action-bg)",
362
- onClick: () => void E(),
372
+ onClick: () => void x(),
363
373
  leftSection: /* @__PURE__ */ n(
364
- x,
374
+ O,
365
375
  {
366
- icon: he,
376
+ icon: ge,
367
377
  size: 16,
368
378
  color: "var(--mantine-color-dimmed)"
369
379
  }
370
380
  ),
371
- children: a("editor.gallery.download")
381
+ children: r("editor.gallery.download")
372
382
  }
373
383
  ),
374
384
  /* @__PURE__ */ n(
@@ -380,16 +390,16 @@ function lt({ nodeKey: e, src: i, id: o }) {
380
390
  fullWidth: !0,
381
391
  justify: "flex-start",
382
392
  bg: "var(--editor-action-bg)",
383
- onClick: T,
393
+ onClick: S,
384
394
  leftSection: /* @__PURE__ */ n(
385
- x,
395
+ O,
386
396
  {
387
397
  icon: fe,
388
398
  size: 16,
389
399
  color: "var(--mantine-color-red-6)"
390
400
  }
391
401
  ),
392
- children: a("editor.actions.delete")
402
+ children: r("editor.actions.delete")
393
403
  }
394
404
  )
395
405
  ] })
@@ -397,36 +407,36 @@ function lt({ nodeKey: e, src: i, id: o }) {
397
407
  )
398
408
  ] });
399
409
  }
400
- const pe = (e) => {
410
+ const me = (e) => {
401
411
  const {
402
412
  width: i,
403
413
  height: o,
404
- isLoading: a,
414
+ isLoading: r,
405
415
  isError: s,
406
- src: r,
407
- id: m,
416
+ src: a,
417
+ id: p,
408
418
  altText: c,
409
- imageRef: p,
410
- maxWidth: g,
411
- aspectRatio: v
419
+ imageRef: m,
420
+ maxWidth: h,
421
+ aspectRatio: C
412
422
  } = e;
413
- return /* @__PURE__ */ C(
423
+ return /* @__PURE__ */ I(
414
424
  "div",
415
425
  {
416
426
  className: "media-wrapper",
417
- "data-reserved-box": v ? "" : void 0,
427
+ "data-reserved-box": C ? "" : void 0,
418
428
  style: {
419
429
  width: i,
420
- height: v ? "auto" : o,
421
- aspectRatio: v || void 0,
430
+ height: C ? "auto" : o,
431
+ aspectRatio: C || void 0,
422
432
  display: "inline-flex",
423
433
  position: "relative"
424
434
  },
425
435
  children: [
426
436
  /* @__PURE__ */ n(
427
- Ue,
437
+ ze,
428
438
  {
429
- visible: a,
439
+ visible: r,
430
440
  zIndex: 1e3,
431
441
  overlayProps: { backgroundOpacity: 0.5 },
432
442
  loaderProps: { size: 24, color: "black" }
@@ -436,18 +446,18 @@ const pe = (e) => {
436
446
  dt,
437
447
  {
438
448
  className: null,
439
- src: r,
449
+ src: a,
440
450
  altText: c,
441
- imageRef: p,
451
+ imageRef: m,
442
452
  width: "inherit",
443
453
  height: "inherit",
444
- maxWidth: g || "auto",
445
- id: m
454
+ maxWidth: h || "auto",
455
+ id: p
446
456
  }
447
457
  ),
448
- ue && /* @__PURE__ */ n(lt, { nodeKey: e.nodeKey, src: r, id: m }),
449
- me && /* @__PURE__ */ n(st, { nodeKey: e.nodeKey, src: r, id: m }),
450
- tt && !ue && !me && /* @__PURE__ */ n(at, { nodeKey: e.nodeKey, src: r })
458
+ ue && /* @__PURE__ */ n(lt, { nodeKey: e.nodeKey, src: a, id: p }),
459
+ pe && /* @__PURE__ */ n(st, { nodeKey: e.nodeKey, src: a, id: p }),
460
+ tt && !ue && !pe && /* @__PURE__ */ n(rt, { nodeKey: e.nodeKey, src: a })
451
461
  ]
452
462
  }
453
463
  );
@@ -456,72 +466,72 @@ function dt({
456
466
  altText: e,
457
467
  className: i,
458
468
  imageRef: o,
459
- src: a,
469
+ src: r,
460
470
  width: s,
461
- height: r,
462
- maxWidth: m,
471
+ height: a,
472
+ maxWidth: p,
463
473
  id: c
464
474
  }) {
465
- const [p, g] = b(!1);
475
+ const [m, h] = b(!1);
466
476
  return /* @__PURE__ */ n(
467
477
  "img",
468
478
  {
469
- className: `${i || void 0} ${p ? "" : "loading"}`,
470
- src: a,
479
+ className: `${i || void 0} ${m ? "" : "loading"}`,
480
+ src: r,
471
481
  alt: e,
472
482
  ref: o,
473
483
  style: {
474
- height: r,
475
- maxWidth: m,
484
+ height: a,
485
+ maxWidth: p,
476
486
  width: s
477
487
  },
478
488
  onLoad: () => {
479
- a.includes("splash") ? setTimeout(() => {
480
- g(!0);
481
- }, 100) : g(!0);
489
+ r.includes("splash") ? setTimeout(() => {
490
+ h(!0);
491
+ }, 100) : h(!0);
482
492
  },
483
493
  draggable: "false",
484
494
  "data-id": c
485
495
  }
486
496
  );
487
497
  }
488
- function Mt(e) {
489
- const { disable: i } = ge(ve);
498
+ function Pt(e) {
499
+ const { disable: i } = he(be);
490
500
  return i && Ve.isPlaceholderSrc(e.src) ? null : /* @__PURE__ */ n(ct, { ...e });
491
501
  }
492
502
  function ct({
493
503
  src: e,
494
504
  altText: i,
495
505
  nodeKey: o,
496
- width: a,
506
+ width: r,
497
507
  height: s,
498
- maxWidth: r,
499
- showCaption: m,
508
+ maxWidth: a,
509
+ showCaption: p,
500
510
  caption: c,
501
- id: p,
502
- create: g,
503
- alignment: v,
511
+ id: m,
512
+ create: h,
513
+ alignment: C,
504
514
  imagePickerTab: f,
505
- aspectRatio: D
515
+ aspectRatio: v
506
516
  }) {
507
517
  var se, le;
508
- const E = We(null), [T, w] = b(!0), [u] = U(), [A, z] = b(!0), [y, _] = b({
518
+ const x = Ee(null), [S, w] = b(!0), [u] = z(), [N, U] = b(!0), [y, j] = b({
509
519
  width: 0,
510
520
  height: 0
511
- }), { start: Q } = Ge(), [ut, F] = b(0), {
512
- fetchUploadMedia: R,
521
+ }), { start: Y } = Ge(), [ut, _] = b(0), {
522
+ fetchUploadMedia: W,
513
523
  fetchDeleteMedia: Z,
514
- maxFileSize: mt,
515
- imperativeHandleRef: M,
516
- disable: De
517
- } = ge(ve), W = B.has(e) && (((se = B.get(e)) == null ? void 0 : se.mediaNodeKeys.length) === 0 || ((le = B.get(e)) == null ? void 0 : le.mediaNodeKeys.length) === void 0 || e.trim() === ""), { t: k } = L(), K = (t) => {
524
+ maxFileSize: pt,
525
+ imperativeHandleRef: P,
526
+ disable: ve
527
+ } = he(be), E = B.has(e) && (((se = B.get(e)) == null ? void 0 : se.mediaNodeKeys.length) === 0 || ((le = B.get(e)) == null ? void 0 : le.mediaNodeKeys.length) === void 0 || e.trim() === ""), { t: T } = R(), K = (t) => {
518
528
  if (typeof t == "number") return t > 0 ? t : null;
519
529
  if (typeof t == "string" && !t.includes("%")) {
520
530
  const l = parseFloat(t);
521
531
  return Number.isFinite(l) && l > 0 ? l : null;
522
532
  }
523
533
  return null;
524
- }, ee = K(a), te = K(s), oe = ee && te ? ee / te : void 0, [Ne, Oe] = b(
534
+ }, ee = K(r), te = K(s), oe = ee && te ? ee / te : void 0, [Le, De] = b(
525
535
  void 0
526
536
  ), ne = X(() => {
527
537
  try {
@@ -532,13 +542,13 @@ function ct({
532
542
  } catch {
533
543
  return;
534
544
  }
535
- }, [e]), Ae = oe ?? D ?? ne ?? Ne, [Pe, ie] = b(!1), Se = !Pe && !oe && (D ?? ne) != null, [pt, xe] = b(0);
536
- P(() => u.registerDecoratorListener(() => {
537
- xe((t) => t + 1);
538
- }), [W]), P(() => {
545
+ }, [e]), Ne = oe ?? v ?? ne ?? Le, [Me, ie] = b(!1), Ae = !Me && !oe && (v ?? ne) != null, [mt, Oe] = b(0);
546
+ M(() => u.registerDecoratorListener(() => {
547
+ Oe((t) => t + 1);
548
+ }), [E]), M(() => {
539
549
  const t = u.getElementByKey(o);
540
550
  t && (t.style.removeProperty("aspect-ratio"), t.style.removeProperty("width"));
541
- }, [u, o]), P(() => {
551
+ }, [u, o]), M(() => {
542
552
  if (!e || e.startsWith("data:image/") || !e.trim()) {
543
553
  w(!1);
544
554
  return;
@@ -547,15 +557,15 @@ function ct({
547
557
  t.src = e, t.onload = () => {
548
558
  if (w(!1), t.naturalWidth) {
549
559
  const l = t.naturalWidth / t.naturalHeight;
550
- if (Oe(l), t.naturalWidth >= 100)
560
+ if (De(l), t.naturalWidth >= 100)
551
561
  try {
552
562
  localStorage.setItem("layers-img-ratio:" + e, String(l));
553
563
  } catch {
554
564
  }
555
- !D && t.naturalWidth >= 100 && u.update(
565
+ !v && t.naturalWidth >= 100 && u.update(
556
566
  () => {
557
- const d = N(o);
558
- O(d) && d.getAspectRatio() == null && d.setAspectRatio(l);
567
+ const d = L(o);
568
+ D(d) && d.getAspectRatio() == null && d.setAspectRatio(l);
559
569
  },
560
570
  { tag: "history-merge" }
561
571
  );
@@ -563,102 +573,102 @@ function ct({
563
573
  }, t.onerror = () => {
564
574
  w(!1);
565
575
  };
566
- }, [e, W]);
567
- const Ee = (t, l) => {
576
+ }, [e, E]);
577
+ const xe = (t, l) => {
568
578
  u.update(() => {
569
- _e(null);
570
- const d = N(o);
571
- O(d) && d.setWidthAndHeight(t, l);
579
+ je(null);
580
+ const d = L(o);
581
+ D(d) && d.setWidthAndHeight(t, l);
572
582
  });
573
- }, { historyState: ae } = Xe(), {
574
- settings: { showNestedEditorTreeView: re }
575
- } = Ye();
576
- function Te(t) {
583
+ }, { historyState: re } = Xe(), {
584
+ settings: { showNestedEditorTreeView: ae }
585
+ } = qe();
586
+ function Se(t) {
577
587
  return t.endsWith(".svg") || t.includes("image/svg+xml");
578
588
  }
579
- function Re(t) {
589
+ function We(t) {
580
590
  return new Promise((l, d) => {
581
- if (Te(t)) {
591
+ if (Se(t)) {
582
592
  l(0);
583
593
  return;
584
594
  }
585
- const h = new Image();
586
- h.src = t, h.onload = () => {
587
- l(h.width);
588
- }, h.onerror = () => {
595
+ const g = new Image();
596
+ g.src = t, g.onload = () => {
597
+ l(g.width);
598
+ }, g.onerror = () => {
589
599
  d(new Error("Failed to load image"));
590
600
  };
591
601
  });
592
602
  }
593
- P(() => {
594
- let t = a, l = s, d = 100;
595
- (e.includes("unsplash") ? e.trim() : !W && e.trim() || e.includes("upload-src-editor")) && e !== "upload" && Re(e).then((h) => {
596
- typeof t == "number" && t < d && h < d ? (z(!0), _({
603
+ M(() => {
604
+ let t = r, l = s, d = 100;
605
+ (e.includes("unsplash") ? e.trim() : !E && e.trim() || e.includes("upload-src-editor")) && e !== "upload" && We(e).then((g) => {
606
+ typeof t == "number" && t < d && g < d ? (U(!0), j({
597
607
  width: t,
598
608
  height: l
599
- })) : h < d ? (z(!0), _({
609
+ })) : g < d ? (U(!0), j({
600
610
  width: "auto",
601
611
  height: "auto"
602
- })) : (_({
603
- width: h,
604
- height: h
605
- }), z(!1)), ie(!0);
606
- }).catch((h) => {
607
- ie(!0), console.warn("Ошибка при загрузке изображения:", h.message);
612
+ })) : (j({
613
+ width: g,
614
+ height: g
615
+ }), U(!1)), ie(!0);
616
+ }).catch((g) => {
617
+ ie(!0), console.warn("Ошибка при загрузке изображения:", g.message);
608
618
  });
609
- }, [e, W]), P(() => {
610
- y.width && y.height && A && u.update(() => {
611
- const t = N(o);
612
- O(t) && t.setWidthAndHeight(y.width, y.height);
619
+ }, [e, E]), M(() => {
620
+ y.width && y.height && N && u.update(() => {
621
+ const t = L(o);
622
+ D(t) && t.setWidthAndHeight(y.width, y.height);
613
623
  });
614
- }, [y.width, y.height, A]);
615
- const Me = I(
616
- (t) => qe(u, o, t),
624
+ }, [y.width, y.height, N]);
625
+ const Pe = k(
626
+ (t) => Je(u, o, t),
617
627
  [u, o]
618
- ), H = I(
628
+ ), F = k(
619
629
  (t, l) => {
620
630
  w(!1), u.update(() => {
621
- const d = N(o);
622
- O(d) && (d.setSrc(t), d.setId(l));
631
+ const d = L(o);
632
+ D(d) && (d.setSrc(t), d.setId(l));
623
633
  });
624
634
  },
625
635
  [u, o]
626
- ), j = I(
636
+ ), H = k(
627
637
  (t) => {
628
638
  w(!0);
629
- const l = Q();
630
- R && R(
639
+ const l = Y();
640
+ W && W(
631
641
  t[0],
632
- (d, h) => {
633
- H(d, h), F(0);
642
+ (d, g) => {
643
+ F(d, g), _(0);
634
644
  },
635
645
  (d) => {
636
646
  d && ot({
637
- message: k("editor.gallery.errorFile")
638
- }), F(0), H(e.startsWith("blob:") ? "upload" : "", "");
647
+ message: T("editor.gallery.errorFile")
648
+ }), _(0), F(e.startsWith("blob:") ? "upload" : "", "");
639
649
  },
640
650
  l,
641
651
  (d) => {
642
- F(d);
652
+ _(d);
643
653
  }
644
654
  );
645
655
  },
646
- [R, Q, k, H, e]
656
+ [W, Y, T, F, e]
647
657
  );
648
- return P(() => u.registerCommand(
649
- Je,
650
- (t) => !e.startsWith("blob:") && e !== "upload" || t.targetNodeKey !== o ? !1 : (j(t.files), !0),
651
- ze
652
- ), [u, j, o, e]), !e || e === "upload" ? /* @__PURE__ */ n(Le, { "data-editor-image-picker-drop-root": !0, w: "100%", children: /* @__PURE__ */ n(
658
+ return M(() => u.registerCommand(
653
659
  Qe,
660
+ (t) => !e.startsWith("blob:") && e !== "upload" || t.targetNodeKey !== o ? !1 : (H(t.files), !0),
661
+ Ue
662
+ ), [u, H, o, e]), !e || e === "upload" ? /* @__PURE__ */ n(Re, { "data-editor-image-picker-drop-root": !0, w: "100%", children: /* @__PURE__ */ n(
663
+ Ye,
654
664
  {
655
665
  inline: !0,
656
666
  nodeKey: o,
657
667
  defaultTabValue: f,
658
- onWriteTabToNode: Me,
668
+ onWriteTabToNode: Pe,
659
669
  uploading: !1,
660
670
  onUpload: (t) => {
661
- !R || !t.length || j(t);
671
+ !W || !t.length || H(t);
662
672
  },
663
673
  popoverProps: {
664
674
  opened: !0,
@@ -667,78 +677,78 @@ function ct({
667
677
  },
668
678
  onChange: (t) => {
669
679
  u.update(() => {
670
- const l = N(o);
671
- O(l) && l.setSrc(t);
680
+ const l = L(o);
681
+ D(l) && l.setSrc(t);
672
682
  });
673
683
  }
674
684
  }
675
- ) }) : A && !Se ? /* @__PURE__ */ n(
676
- pe,
685
+ ) }) : N && !Ae ? /* @__PURE__ */ n(
686
+ me,
677
687
  {
678
688
  width: y.width,
679
689
  height: y.height,
680
- isLoading: T,
690
+ isLoading: S,
681
691
  isError: !1,
682
- isIcon: A,
692
+ isIcon: N,
683
693
  src: e,
684
- id: p,
694
+ id: m,
685
695
  editor: u,
686
696
  nodeKey: o,
687
697
  fetchDeleteMedia: Z,
688
698
  altText: i,
689
- imageRef: E,
690
- maxWidth: r,
691
- showCaption: m,
699
+ imageRef: x,
700
+ maxWidth: a,
701
+ showCaption: p,
692
702
  caption: c,
693
703
  isCollabActive: !1,
694
- historyState: ae,
695
- showNestedEditorTreeView: re,
696
- t: k
704
+ historyState: re,
705
+ showNestedEditorTreeView: ae,
706
+ t: T
697
707
  }
698
708
  ) : /* @__PURE__ */ n(
699
709
  Ke,
700
710
  {
701
711
  editor: u,
702
- isIcon: A,
703
- width: ce(a),
712
+ isIcon: N,
713
+ width: ce(r),
704
714
  height: ce(s),
705
715
  initialWidth: y.width || "",
706
716
  initialHeight: y.height || "",
707
- onResizeEnd: Ee,
708
- alignment: v,
709
- disable: De,
717
+ onResizeEnd: xe,
718
+ alignment: C,
719
+ disable: ve,
710
720
  onRegisterDecoratorEnter: (t) => {
711
- M != null && M.current && (M.current.decoratorEnterAction = t);
721
+ P != null && P.current && (P.current.decoratorEnterAction = t);
712
722
  },
713
723
  onActivate: () => u.dispatchCommand(et, "show_menu"),
714
724
  children: /* @__PURE__ */ n(
715
- pe,
725
+ me,
716
726
  {
717
727
  width: "inherit",
718
728
  height: "inherit",
719
- aspectRatio: Ae,
720
- isLoading: T,
729
+ aspectRatio: Ne,
730
+ isLoading: S,
721
731
  isError: !1,
722
- isIcon: A,
732
+ isIcon: N,
723
733
  src: e,
724
- id: p,
734
+ id: m,
725
735
  editor: u,
726
736
  nodeKey: o,
727
737
  fetchDeleteMedia: Z,
728
738
  altText: i,
729
- imageRef: E,
730
- maxWidth: r,
731
- showCaption: m,
739
+ imageRef: x,
740
+ maxWidth: a,
741
+ showCaption: p,
732
742
  caption: c,
733
743
  isCollabActive: !1,
734
- historyState: ae,
735
- showNestedEditorTreeView: re,
736
- t: k
744
+ historyState: re,
745
+ showNestedEditorTreeView: ae,
746
+ t: T
737
747
  }
738
748
  )
739
749
  }
740
750
  );
741
751
  }
742
752
  export {
743
- Mt as default
753
+ Pt as default
744
754
  };