@layers-app/editor 2.2.45 → 2.3.2

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 (221) hide show
  1. package/dist/index.cjs +2 -2
  2. package/dist/index.js +8 -8
  3. package/dist/{layers.sKO5wWzt.js → layers.-Lu1Y8pE.js} +1 -1
  4. package/dist/{layers.n-DYmU2Z.js → layers.-szWP3hz.js} +1 -1
  5. package/dist/{layers.t9b6t4Ii.js → layers.07RX8yEb.js} +1 -1
  6. package/dist/{layers.nXKHyTlo.js → layers.0b2KQv8V.js} +1 -1
  7. package/dist/{layers.CDc-JAN1.js → layers.0p7IoDBP.js} +1 -1
  8. package/dist/{layers.B5yZJBoB.js → layers.1LdmAcFn.js} +1 -1
  9. package/dist/{layers.DIYV_Qgp.js → layers.1QfkvGfu.js} +1 -1
  10. package/dist/{layers.D1OY3B-n.js → layers.1u37zniq.js} +137 -137
  11. package/dist/{layers.Dt-Xolan.js → layers.2YempUdR.js} +1 -1
  12. package/dist/{layers.DNqMXVNp.js → layers.2lHfCJig.js} +1 -1
  13. package/dist/{layers.DVZjfzxM.js → layers.3NkYOlPc.js} +1 -1
  14. package/dist/{layers.DveF4Taj.js → layers.5-nlHms-.js} +1 -1
  15. package/dist/{layers.BaVDbZc-.js → layers.7QEU54i7.js} +1 -1
  16. package/dist/{layers.BVrMVvbD.js → layers.9Ao_2noc.js} +1 -1
  17. package/dist/{layers.CuZ6oi1Y.js → layers.B-SVhE6O.js} +1 -1
  18. package/dist/{layers.CJzs0OdD.js → layers.B18cm1fP.js} +1 -1
  19. package/dist/{layers.C4W6rbDZ.js → layers.B1zVsm3v.js} +2982 -4133
  20. package/dist/{layers.DYK2Cc2v.js → layers.B3AzuO5j.js} +6 -6
  21. package/dist/{layers.DKpytb6w.js → layers.B45uHJx5.js} +1 -1
  22. package/dist/layers.B4RgDHky.js +8 -0
  23. package/dist/{layers.ByyJrMEp.js → layers.B6BkvW61.js} +2 -2
  24. package/dist/{layers.BKrToDbz.js → layers.B6eWq2PJ.js} +1 -1
  25. package/dist/{layers.C2pTMR38.js → layers.B7XmQLJK.js} +1 -1
  26. package/dist/layers.B7stR0tg.js +7 -0
  27. package/dist/{layers.BaMwv1jF.js → layers.BA8DF0PO.js} +1 -1
  28. package/dist/{layers.xMjrkzgP.js → layers.BApatZ6g.js} +1 -1
  29. package/dist/layers.BCIkvjT3.js +1157 -0
  30. package/dist/layers.BDBPcQmQ.js +6 -0
  31. package/dist/{layers.D2IuhDCQ.js → layers.BGhbAdxW.js} +1 -1
  32. package/dist/{layers.BqnQzZ9x.js → layers.BHSzaYhb.js} +1 -1
  33. package/dist/{layers.Cjk9bUrz.js → layers.BJrXormV.js} +1 -1
  34. package/dist/layers.BKn-MzWR.js +1 -0
  35. package/dist/{layers.DiA7fPFt.js → layers.BNJSdCvt.js} +3 -3
  36. package/dist/{layers.oXNzpBlK.js → layers.BNWZu7ax.js} +27 -27
  37. package/dist/{layers.CcfiG8Od.js → layers.BSLmKXjv.js} +1 -1
  38. package/dist/{layers.Cg39QOHR.js → layers.BVgL-L5o.js} +1 -1
  39. package/dist/{layers.BcfRIrYG.js → layers.BZVFfwPr.js} +1 -1
  40. package/dist/{layers.DWpAFgGF.js → layers.B_D5rwSo.js} +1 -1
  41. package/dist/{layers.Du37x8v3.js → layers.B_TxnlNK.js} +1 -1
  42. package/dist/{layers.vEoVIWoQ.js → layers.BaYNtgYj.js} +1 -1
  43. package/dist/{layers.BadeIJgG.js → layers.BcFAMw4h.js} +4 -4
  44. package/dist/layers.Bg7BQcmt.js +31 -0
  45. package/dist/{layers.DjG7qFHf.js → layers.BgfG0iAU.js} +11 -11
  46. package/dist/{layers.CtFiU_U-.js → layers.Bi3TxQ-w.js} +1 -1
  47. package/dist/{layers.ClSS_-JK.js → layers.Bk0YEHy0.js} +1 -1
  48. package/dist/{layers.BEdP6w5G.js → layers.Bl6nUUCL.js} +1 -1
  49. package/dist/{layers.9chn1oBm.js → layers.BmHLBcUn.js} +1 -1
  50. package/dist/{layers.DvfttTXQ.js → layers.Bou1yCWs.js} +1 -1
  51. package/dist/{layers.DinGcvYA.js → layers.BpdNScyT.js} +33 -33
  52. package/dist/{layers.VPQgHqCC.js → layers.BpzAh8uk.js} +1 -1
  53. package/dist/{layers.DheygGyD.js → layers.BqB1S61a.js} +1 -1
  54. package/dist/{layers.DJTqJuKz.js → layers.Bqi5-M5H.js} +15 -15
  55. package/dist/{layers.CABrQ2Zs.js → layers.Br59qLOa.js} +1 -1
  56. package/dist/{layers.CmSiqz4U.js → layers.Br99nr8r.js} +3 -3
  57. package/dist/{layers.DLiv2kEf.js → layers.BsMr5tgs.js} +1 -1
  58. package/dist/{layers.g-cZDg-J.js → layers.BskjH0Pq.js} +42 -42
  59. package/dist/{layers.QhZDFUq4.js → layers.BvQ-SlEw.js} +1 -1
  60. package/dist/{layers.BEIgYyne.js → layers.BvVY8MIz.js} +1 -1
  61. package/dist/{layers.vXZEDgHQ.js → layers.Bw05_Vds.js} +1 -1
  62. package/dist/{layers.Cof8D_jH.js → layers.Bxfnl5-h.js} +1 -1
  63. package/dist/{layers.BOkb4Kwr.js → layers.C0C2_xj0.js} +1 -1
  64. package/dist/{layers.CHqw81xe.js → layers.C0mcLf6q.js} +1 -1
  65. package/dist/{layers.cCd9G0s7.js → layers.C3Rfjtv2.js} +1 -1
  66. package/dist/{layers.CO180qeA.js → layers.C3T10c7B.js} +1 -1
  67. package/dist/{layers.CAs2-nlo.js → layers.C438BOob.js} +13 -13
  68. package/dist/{layers.a0ekgaAk.js → layers.C4Sae2dk.js} +1 -1
  69. package/dist/{layers.CGra3CE8.js → layers.C4ys15M1.js} +2 -2
  70. package/dist/{layers.Cx21Vx7C.js → layers.C6L2IcKs.js} +1 -1
  71. package/dist/{layers.B68ca-eU.js → layers.C8xyAF4H.js} +1 -1
  72. package/dist/{layers.BmnporKE.js → layers.C9ZkpW3f.js} +1 -1
  73. package/dist/{layers.BTBRVGFs.js → layers.CACM-S8f.js} +1 -1
  74. package/dist/{layers.CwiLAF0n.js → layers.CBptEVEC.js} +1 -1
  75. package/dist/{layers.CqFgGsQ4.js → layers.CCO6z_Dk.js} +3 -3
  76. package/dist/{layers.CFLly-Qe.js → layers.CD3hBq0O.js} +1 -1
  77. package/dist/{layers.DqCVQnl5.js → layers.CD6NTcVN.js} +1 -1
  78. package/dist/{layers.YdWr9xoX.js → layers.CDcS1HVy.js} +1 -1
  79. package/dist/{layers.C_M8g-oV.js → layers.CFelVuJn.js} +1 -1
  80. package/dist/{layers.wby51kRL.js → layers.CGrTICUV.js} +4 -4
  81. package/dist/{layers.B028_Pfk.js → layers.CHp6mCE4.js} +13 -13
  82. package/dist/{layers.C7y7h6VM.js → layers.CI5w6LTn.js} +1 -1
  83. package/dist/{layers.Du94jGQf.js → layers.CMmkXOIK.js} +1 -1
  84. package/dist/{layers.CM1BoU1E.js → layers.CNlly0q1.js} +1 -1
  85. package/dist/layers.COQskeW_.js +1 -0
  86. package/dist/{layers.DDTNqkEk.js → layers.CPRLWAR-.js} +1 -1
  87. package/dist/{layers.Cc98lCPt.js → layers.CPTJ3alm.js} +1 -1
  88. package/dist/{layers.Db7WC46z.js → layers.CQ6hARGk.js} +1 -1
  89. package/dist/{layers.B0sQe5D1.js → layers.CQSidsT8.js} +3 -3
  90. package/dist/{layers.D_LcSG5Y.js → layers.CTUNcEKH.js} +1 -1
  91. package/dist/{layers.bk9EcYJr.js → layers.CUICXRX_.js} +39 -39
  92. package/dist/{layers.DG26Vzsi.js → layers.CVoEUbsY.js} +3 -3
  93. package/dist/{layers.NEN1dVNO.js → layers.CVwlyScd.js} +1 -1
  94. package/dist/{layers.Dd_MQmMI.js → layers.CWGbyc5i.js} +8 -8
  95. package/dist/{layers.BfHX9frV.js → layers.CXP6VyC8.js} +1 -1
  96. package/dist/{layers.DvlQFVL_.js → layers.CYjAXUTT.js} +1 -1
  97. package/dist/{layers.Czx1TgLO.js → layers.C_TU8VSm.js} +2 -2
  98. package/dist/{layers.BJrL0_Rw.js → layers.C_pPFp7r.js} +2 -2
  99. package/dist/{layers.C9bqqwGA.js → layers.CaMSFA8F.js} +40 -40
  100. package/dist/{layers.C2izS29k.js → layers.CcrUyw_4.js} +1 -1
  101. package/dist/{layers.Ce54L6_R.js → layers.CfdV11eO.js} +1 -1
  102. package/dist/{layers.CKLSBcei.js → layers.Cgk-kwK1.js} +1 -1
  103. package/dist/{layers.CldflZpf.js → layers.CiGiXdW0.js} +1 -1
  104. package/dist/{layers.CEaPCwCe.js → layers.Ck5r7FLY.js} +1 -1
  105. package/dist/{layers.0KslT0iv.js → layers.CkM48uS9.js} +1 -1
  106. package/dist/{layers.DzgpLhqO.js → layers.Cl9S-4Pe.js} +1 -1
  107. package/dist/{layers.C7E3l-g_.js → layers.CoCas1TR.js} +2 -2
  108. package/dist/{layers.mHLeiSFC.js → layers.Cp0-bIRY.js} +1 -1
  109. package/dist/{layers.C53wglsE.js → layers.CpxSB-RY.js} +1 -1
  110. package/dist/{layers.CLP8NLxE.js → layers.Cs-91dHA.js} +1 -1
  111. package/dist/{layers.km8iRn1X.js → layers.Csa1VvEE.js} +95 -95
  112. package/dist/{layers.DQNE7pSr.js → layers.CslLaJk_.js} +1 -1
  113. package/dist/{layers.9PIBmdB5.js → layers.CuR5VVPK.js} +31 -31
  114. package/dist/{layers.Bex3-2F0.js → layers.CvEHURtU.js} +7 -7
  115. package/dist/{layers.C9O_XgoY.js → layers.CvGS___n.js} +3 -3
  116. package/dist/{layers.Bmw_ImFW.js → layers.CxUdn3NH.js} +1 -1
  117. package/dist/{layers.BDSMUwmt.js → layers.CydBhqPl.js} +1 -1
  118. package/dist/{layers.D53HW-OH.js → layers.CzuvYlVS.js} +1 -1
  119. package/dist/{layers.CiDAyBeD.js → layers.D3ETIEPw.js} +1 -1
  120. package/dist/{layers.BDmaTCfD.js → layers.D5Y3jocj.js} +6 -6
  121. package/dist/{layers.DQbonqH1.js → layers.D6DW5vEY.js} +1 -1
  122. package/dist/{layers.jg--vRcI.js → layers.D6G3COyk.js} +15952 -15775
  123. package/dist/{layers.Cyy4XziO.js → layers.D7jViIYU.js} +1 -1
  124. package/dist/{layers.DhROyrvJ.js → layers.D8LVQ3ZY.js} +1 -1
  125. package/dist/{layers.D-dncXMv.js → layers.D8tNGYAu.js} +1 -1
  126. package/dist/{layers.Bb6_oKs8.js → layers.D98-ldv6.js} +1 -1
  127. package/dist/{layers.CbG7bPrw.js → layers.DBF94XFg.js} +1 -1
  128. package/dist/{layers.C2CWUW0P.js → layers.DBFr2bUd.js} +1 -1
  129. package/dist/{layers.DvhAl2Y2.js → layers.DC8w8IZi.js} +1 -1
  130. package/dist/layers.DEGygGYH.js +1 -0
  131. package/dist/layers.DG37kMJR.js +8 -0
  132. package/dist/{layers.BVQVuKjJ.js → layers.DG8L4wIG.js} +1 -1
  133. package/dist/{layers.B7VPVY9m.js → layers.DGcUMS0Y.js} +1 -1
  134. package/dist/{layers.C5spre2i.js → layers.DHj5lmQt.js} +1 -1
  135. package/dist/{layers.CQESVhxO.js → layers.DIPLdCyl.js} +1 -1
  136. package/dist/{layers.QSp10MBY.js → layers.DJaA-u-I.js} +1 -1
  137. package/dist/{layers.DhOjjk4e.js → layers.DJs9wM3X.js} +1 -1
  138. package/dist/{layers.Dx2lhGzZ.js → layers.DKUdJiaR.js} +3 -3
  139. package/dist/{layers.bWZDlvmW.js → layers.DRlDj5iQ.js} +1 -1
  140. package/dist/{layers.BxaGfbS4.js → layers.DRxlnsz8.js} +2 -2
  141. package/dist/{layers.B22dcdRZ.js → layers.DTz-KpDZ.js} +1 -1
  142. package/dist/{layers.CmXdbn8_.js → layers.DUcUGFmf.js} +1 -1
  143. package/dist/{layers.BC7Cg5cy.js → layers.DUhN3YqR.js} +1 -1
  144. package/dist/{layers.B5HuEtfE.js → layers.DVKcHQP4.js} +1 -1
  145. package/dist/{layers.P39es0O4.js → layers.DVntzq3z.js} +1 -1
  146. package/dist/{layers.C7LxBBYp.js → layers.DW7LKZ0_.js} +5 -5
  147. package/dist/{layers.B5a2e-Mn.js → layers.DXfvADbO.js} +1 -1
  148. package/dist/layers.DZCT2Mg-.js +1314 -0
  149. package/dist/{layers.jcCRaKGd.js → layers.D_beONxk.js} +1 -1
  150. package/dist/layers.Dbm3hiPL.js +5 -0
  151. package/dist/{layers.B465LyPz.js → layers.DcHhrRyA.js} +1 -1
  152. package/dist/{layers.yftdzODL.js → layers.Dd6kYaXy.js} +1 -1
  153. package/dist/{layers.D2bgGfrE.js → layers.DdXWqMWK.js} +5 -5
  154. package/dist/{layers.DRNjIrAp.js → layers.DfiQKKL6.js} +1 -1
  155. package/dist/{layers.CIMF-Kx_.js → layers.DhPRmiMt.js} +1 -1
  156. package/dist/{layers.CP2x77Hz.js → layers.DhySCQVw.js} +1 -1
  157. package/dist/{layers.CsgsF5Ft.js → layers.Di5OB7o7.js} +1 -1
  158. package/dist/{layers.BkUV4peM.js → layers.Di82CoED.js} +1 -1
  159. package/dist/{layers.CZzgBinT.js → layers.DiL6nhZW.js} +1 -1
  160. package/dist/{layers.0O_y_PSM.js → layers.Diyb97EX.js} +4 -4
  161. package/dist/{layers.DxQF7DU5.js → layers.DjZrXDXn.js} +1 -1
  162. package/dist/{layers.CY17OEce.js → layers.DjjlhtCb.js} +1 -1
  163. package/dist/{layers.C-TQ4gDg.js → layers.DktiF6wI.js} +1 -1
  164. package/dist/{layers.CYW1WEKe.js → layers.Dlo3gmCf.js} +1 -1
  165. package/dist/{layers.CgtkYIke.js → layers.Dngx99va.js} +1 -1
  166. package/dist/{layers.CwazPZdq.js → layers.DrCegXS7.js} +2 -2
  167. package/dist/{layers.BpL4mYVq.js → layers.Dsjwdeov.js} +1 -1
  168. package/dist/{layers.VNPeSDc5.js → layers.DuAKqNV4.js} +1 -1
  169. package/dist/{layers.CSsCFhvL.js → layers.DvtOcWdD.js} +1 -1
  170. package/dist/{layers.DFxl_E74.js → layers.Dx0gFI_8.js} +4 -4
  171. package/dist/layers.Dxr2o7ON.js +1 -0
  172. package/dist/{layers.oNZW8UBG.js → layers.DyI1UB-M.js} +1 -1
  173. package/dist/{layers.DXbA6oVt.js → layers.Dywy71My.js} +1 -1
  174. package/dist/{layers.Co4l7_YV.js → layers.EhSWkpTH.js} +1 -1
  175. package/dist/layers.Hlsf4WAl.js +84 -0
  176. package/dist/{layers.j6LRzfso.js → layers.I-yaQKvi.js} +1 -1
  177. package/dist/layers.IP5Q54QC.js +90 -0
  178. package/dist/{layers.CT3XTF81.js → layers.IUszdZkA.js} +1 -1
  179. package/dist/{layers.BuPdI71w.js → layers.JJZGIQ_O.js} +1 -1
  180. package/dist/{layers.DnSDu3aj.js → layers.JK4CPmb2.js} +1 -1
  181. package/dist/{layers.DcYmpYNe.js → layers.LU2ER-pA.js} +1 -1
  182. package/dist/{layers.ia3f0EYv.js → layers.M4pn2wm-.js} +1 -1
  183. package/dist/{layers.BWWFQbUs.js → layers.PLuaosLv.js} +25 -25
  184. package/dist/{layers.Dvt-Szfl.js → layers.PTKeHAhs.js} +1 -1
  185. package/dist/{layers.CMB0mF82.js → layers.Pum1ALdT.js} +1 -1
  186. package/dist/layers.VUXyPQnV.js +1 -0
  187. package/dist/{layers.XAmXrnxl.js → layers.VyIOesty.js} +1 -1
  188. package/dist/{layers.DmmEgUMf.js → layers.Ze-wao45.js} +1 -1
  189. package/dist/{layers.JKpsQUa8.js → layers._dfPZGuq.js} +1 -1
  190. package/dist/{layers.DgBtq91i.js → layers.aT2npTXt.js} +1 -1
  191. package/dist/{layers.BunhC82l.js → layers.ba2tniXd.js} +1 -1
  192. package/dist/{layers.DUD000-v.js → layers.bv5XSWTF.js} +16 -16
  193. package/dist/layers.c7P3mcxJ.js +1 -0
  194. package/dist/{layers.CCQQxd5s.js → layers.dDOcJyrx.js} +1 -1
  195. package/dist/{layers.DuNmb6iV.js → layers.eQTvi5Gi.js} +1 -1
  196. package/dist/{layers.fnoJpR74.js → layers.ezjomIHR.js} +1 -1
  197. package/dist/{layers.Cw289Pgg.js → layers.gFANqZul.js} +12 -12
  198. package/dist/{layers.BUZ2pvws.js → layers.gbsNfZYX.js} +1 -1
  199. package/dist/{layers.Cvc8xBfw.js → layers.h_l-O4Ya.js} +4107 -4135
  200. package/dist/{layers.Bf3CS2lb.js → layers.i4tkD9gF.js} +4 -4
  201. package/dist/{layers.D5naed4X.js → layers.iwts8VqI.js} +1 -1
  202. package/dist/{layers.txhP70wF.js → layers.jASAtfrf.js} +1 -1
  203. package/dist/{layers.DGO5wxx-.js → layers.jC4CNUhM.js} +1 -1
  204. package/dist/{layers.BjDSCoZM.js → layers.khwx4QvE.js} +1 -1
  205. package/dist/{layers.NCy-p2UI.js → layers.lTT2Z5W-.js} +21 -21
  206. package/dist/{layers.rkrNrIQd.js → layers.mY4jXoD0.js} +1 -1
  207. package/dist/{layers.Cg-zHhDe.js → layers.maXwdOZO.js} +2 -2
  208. package/dist/{layers.0ohwJnJO.js → layers.oBoAHASG.js} +174 -167
  209. package/dist/{layers.DoceYQaZ.js → layers.v6OYKSou.js} +1 -1
  210. package/dist/{layers.AL_UvFa5.js → layers.zaXLl66X.js} +1 -1
  211. package/package.json +7 -2
  212. package/dist/layers.BX2zMMPD.js +0 -6
  213. package/dist/layers.CjUQRZCf.js +0 -1313
  214. package/dist/layers.DXT1JSUZ.js +0 -5
  215. package/dist/layers.Dele1d2B.js +0 -1
  216. package/dist/layers.DfHZkVTD.js +0 -1
  217. package/dist/layers.DrZOHzCc.js +0 -84
  218. package/dist/layers.OYg34Rse.js +0 -1
  219. package/dist/layers.SIpDBTUg.js +0 -96
  220. package/dist/layers.nIE5wUh9.js +0 -1
  221. package/dist/layers.rE1cepGv.js +0 -8
@@ -1,13 +1,13 @@
1
- import { jsx as n, jsxs as N, Fragment as H } from "react/jsx-runtime";
2
- import { useState as y, useCallback as C, useRef as Q, useEffect as P, useMemo as K, useContext as Ie } from "react";
3
- import { useTranslation as B } from "react-i18next";
4
- import { useLexicalComposerContext as V } from "@lexical/react/LexicalComposerContext";
5
- import { Menu as x, Flex as Z, Popover as A, Stack as He, Button as j, Box as Be, LoadingOverlay as Ve } from "@mantine/core";
6
- import { $getNodeByKey as E, COMMAND_PRIORITY_LOW as Ge, $setSelection as Xe } from "lexical";
7
- import { y as Ye, z as Ze, B as qe, D as Je, F as he, G as J, J as Qe, L as Ke, A as ee, K as et, P as tt, H as U, Q as Ce, n as De, S as Le, U as Ne, V as S, N as Oe, W as ot, X as nt, q as we, Y as it, C as Pe, Z as at, _ as rt, a0 as q, a1 as lt, a2 as st, a3 as dt, a4 as ct, a5 as ut, a6 as pt, R as mt, m as be, O as gt, k as ke, a7 as ve, o as ft } from "./layers.jg--vRcI.js";
8
- import { AttachmentsGalleryModal as Te, showErrorNotification as ht } from "@layers-app/shared";
9
- import { useLexicalEditable as te } from "@lexical/react/useLexicalEditable";
10
- import { useDisclosure as $ } from "@mantine/hooks";
1
+ import { jsx as n, jsxs as N, Fragment as B } from "react/jsx-runtime";
2
+ import { useState as y, useCallback as C, useRef as ee, useEffect as S, useMemo as te, useContext as Ie } from "react";
3
+ import { useTranslation as V } from "react-i18next";
4
+ import { useLexicalComposerContext as G } from "@lexical/react/LexicalComposerContext";
5
+ import { Menu as R, Flex as J, Popover as z, Stack as He, Button as $, Box as Be, LoadingOverlay as Ve } from "@mantine/core";
6
+ import { $getNodeByKey as T, COMMAND_PRIORITY_LOW as Ge, $setSelection as Xe } from "lexical";
7
+ import { y as Ye, z as Ze, B as qe, D as Je, F as he, G as K, J as Qe, L as Ke, A as oe, K as et, P as tt, H as M, Q as Ce, n as De, S as Le, U as Ne, V as E, N as Oe, W as ot, X as nt, q as we, Y as it, C as Se, Z as at, _ as rt, a0 as Q, a1 as lt, a2 as st, a3 as dt, a4 as ct, a5 as ut, a6 as pt, R as mt, m as be, O as gt, a7 as ft, k as ke, a8 as ve, o as ht, a9 as wt, aa as bt } from "./layers.D6G3COyk.js";
8
+ import { AttachmentsGalleryModal as Pe, showErrorNotification as kt } from "@layers-app/shared";
9
+ import { useLexicalEditable as ne } from "@lexical/react/useLexicalEditable";
10
+ import { useDisclosure as H } from "@mantine/hooks";
11
11
  import "@lexical/react/LexicalDecoratorBlockNode";
12
12
  import "@lexical/utils";
13
13
  import "@lexical/mark";
@@ -17,11 +17,11 @@ import "react-dom";
17
17
  import "@lexical/react/LexicalErrorBoundary";
18
18
  import "@lexical/react/LexicalBlockWithAlignableContents";
19
19
  import "@mantine/notifications";
20
- function wt(e, i) {
20
+ function vt(e, i) {
21
21
  const t = document.createElement("a");
22
22
  t.href = e, t.download = i, t.rel = "noopener", document.body.appendChild(t), t.click(), t.remove();
23
23
  }
24
- function oe(e) {
24
+ function ie(e) {
25
25
  try {
26
26
  const t = new URL(e, window.location.origin).pathname.split("/").pop() || "image";
27
27
  return t.includes(".") ? t : `${t}.png`;
@@ -29,18 +29,18 @@ function oe(e) {
29
29
  return "image";
30
30
  }
31
31
  }
32
- async function ne(e, i) {
32
+ async function ae(e, i) {
33
33
  const t = await fetch(e);
34
34
  if (!t.ok)
35
35
  throw new Error("fetch failed");
36
36
  const a = await t.blob(), r = URL.createObjectURL(a);
37
37
  try {
38
- wt(r, i);
38
+ vt(r, i);
39
39
  } finally {
40
40
  setTimeout(() => URL.revokeObjectURL(r), 0);
41
41
  }
42
42
  }
43
- function bt({
43
+ function yt({
44
44
  editor: e,
45
45
  nodeKey: i,
46
46
  href: t,
@@ -58,7 +58,7 @@ function bt({
58
58
  b(!0);
59
59
  return;
60
60
  }
61
- he(e, i, J(c)), a();
61
+ he(e, i, K(c)), a();
62
62
  }, [e, i, l, r, a]), v = C(() => {
63
63
  he(e, i, ""), a();
64
64
  }, [e, i, a]), k = C(
@@ -78,15 +78,15 @@ function bt({
78
78
  onRemove: v
79
79
  };
80
80
  }
81
- function ie({
81
+ function re({
82
82
  editor: e,
83
83
  nodeKey: i,
84
84
  href: t,
85
85
  onClose: a,
86
86
  mobile: r
87
87
  }) {
88
- const s = Q(null), l = bt({ editor: e, nodeKey: i, href: t, onClose: a });
89
- return P(() => {
88
+ const s = ee(null), l = yt({ editor: e, nodeKey: i, href: t, onClose: a });
89
+ return S(() => {
90
90
  var d;
91
91
  (d = s.current) == null || d.focus({ preventScroll: !0 });
92
92
  }, []), /* @__PURE__ */ n(
@@ -106,7 +106,7 @@ function ie({
106
106
  }
107
107
  );
108
108
  }
109
- function Ee({
109
+ function Te({
110
110
  opened: e,
111
111
  onOpenChange: i,
112
112
  t,
@@ -116,7 +116,7 @@ function Ee({
116
116
  onLinkAction: l
117
117
  }) {
118
118
  return /* @__PURE__ */ N(
119
- x,
119
+ R,
120
120
  {
121
121
  opened: e,
122
122
  onChange: i,
@@ -127,8 +127,8 @@ function Ee({
127
127
  withinPortal: !0,
128
128
  closeOnItemClick: !0,
129
129
  children: [
130
- /* @__PURE__ */ n(x.Target, { children: /* @__PURE__ */ n(
131
- ee,
130
+ /* @__PURE__ */ n(R.Target, { children: /* @__PURE__ */ n(
131
+ oe,
132
132
  {
133
133
  label: t("editor.toolbar.more"),
134
134
  icon: et,
@@ -137,7 +137,7 @@ function Ee({
137
137
  }
138
138
  ) }),
139
139
  /* @__PURE__ */ N(
140
- x.Dropdown,
140
+ R.Dropdown,
141
141
  {
142
142
  p: 4,
143
143
  miw: 164,
@@ -145,9 +145,9 @@ function Ee({
145
145
  onMouseDown: (d) => d.preventDefault(),
146
146
  children: [
147
147
  l && /* @__PURE__ */ n(
148
- x.Item,
148
+ R.Item,
149
149
  {
150
- leftSection: /* @__PURE__ */ n(Z, { align: "center", justify: "center", c: "gray.6", children: /* @__PURE__ */ n(tt, { name: "link", size: 16 }) }),
150
+ leftSection: /* @__PURE__ */ n(J, { align: "center", justify: "center", c: "gray.6", children: /* @__PURE__ */ n(tt, { name: "link", size: 16 }) }),
151
151
  onClick: (d) => {
152
152
  d.stopPropagation(), l();
153
153
  },
@@ -155,9 +155,9 @@ function Ee({
155
155
  }
156
156
  ),
157
157
  /* @__PURE__ */ n(
158
- x.Item,
158
+ R.Item,
159
159
  {
160
- leftSection: /* @__PURE__ */ n(Z, { align: "center", justify: "center", c: "gray.6", children: /* @__PURE__ */ n(U, { icon: Ce, size: 16 }) }),
160
+ leftSection: /* @__PURE__ */ n(J, { align: "center", justify: "center", c: "gray.6", children: /* @__PURE__ */ n(M, { icon: Ce, size: 16 }) }),
161
161
  onClick: (d) => {
162
162
  d.stopPropagation(), a();
163
163
  },
@@ -165,10 +165,10 @@ function Ee({
165
165
  }
166
166
  ),
167
167
  /* @__PURE__ */ n(
168
- x.Item,
168
+ R.Item,
169
169
  {
170
170
  color: "red",
171
- leftSection: /* @__PURE__ */ n(Z, { align: "center", justify: "center", c: "red.6", children: /* @__PURE__ */ n(U, { icon: De, size: 16 }) }),
171
+ leftSection: /* @__PURE__ */ n(J, { align: "center", justify: "center", c: "red.6", children: /* @__PURE__ */ n(M, { icon: De, size: 16 }) }),
172
172
  onClick: (d) => {
173
173
  d.stopPropagation(), r();
174
174
  },
@@ -182,13 +182,13 @@ function Ee({
182
182
  }
183
183
  );
184
184
  }
185
- const Se = ({
185
+ const Ee = ({
186
186
  t: e,
187
187
  src: i,
188
188
  setShown: t,
189
189
  id: a
190
190
  }) => {
191
- const [r, { open: s, close: l }] = $(!1), d = Le(), I = K(() => [
191
+ const [r, { open: s, close: l }] = H(!1), d = Le(), I = te(() => [
192
192
  {
193
193
  id: !a || a === "0" ? "" : a,
194
194
  Url: i ?? "",
@@ -208,9 +208,9 @@ const Se = ({
208
208
  deletedAt: /* @__PURE__ */ new Date()
209
209
  }
210
210
  ], [i, a]);
211
- return /* @__PURE__ */ N(H, { children: [
211
+ return /* @__PURE__ */ N(B, { children: [
212
212
  /* @__PURE__ */ n(
213
- Te,
213
+ Pe,
214
214
  {
215
215
  opened: r,
216
216
  onOpenChange: (p) => {
@@ -221,7 +221,7 @@ const Se = ({
221
221
  }
222
222
  ),
223
223
  /* @__PURE__ */ n(
224
- ee,
224
+ oe,
225
225
  {
226
226
  label: e("editor.image.preview"),
227
227
  icon: Ne,
@@ -233,13 +233,13 @@ const Se = ({
233
233
  }
234
234
  )
235
235
  ] });
236
- }, kt = ({
236
+ }, It = ({
237
237
  nodeKey: e,
238
238
  src: i,
239
239
  href: t
240
240
  }) => {
241
- const [a] = V(), r = te(), [s, l] = y(!1), [d, I] = y(!1), [b, p] = y(!1), { t: m } = B();
242
- P(() => {
241
+ const [a] = G(), r = ne(), [s, l] = y(!1), [d, I] = y(!1), [b, p] = y(!1), { t: m } = V();
242
+ S(() => {
243
243
  if (!b) return;
244
244
  const k = (c) => {
245
245
  const w = c.target;
@@ -249,18 +249,18 @@ const Se = ({
249
249
  }, [b]);
250
250
  const h = C(() => {
251
251
  a.update(() => {
252
- const k = E(e);
253
- S(k) && k.remove();
252
+ const k = T(e);
253
+ E(k) && k.remove();
254
254
  });
255
255
  }, [a, e]), v = C(async () => {
256
256
  if (i)
257
257
  try {
258
- await ne(i, oe(i));
258
+ await ae(i, ie(i));
259
259
  } catch {
260
260
  }
261
261
  }, [i]);
262
262
  return /* @__PURE__ */ N(
263
- A,
263
+ z,
264
264
  {
265
265
  opened: b,
266
266
  onChange: p,
@@ -271,14 +271,14 @@ const Se = ({
271
271
  withinPortal: !0,
272
272
  closeOnClickOutside: !1,
273
273
  children: [
274
- /* @__PURE__ */ n(A.Target, { children: /* @__PURE__ */ N(
274
+ /* @__PURE__ */ n(z.Target, { children: /* @__PURE__ */ N(
275
275
  "div",
276
276
  {
277
277
  className: `media-actions ${r ? "" : "media-actions--readonly"}`,
278
278
  children: [
279
- /* @__PURE__ */ n(Se, { t: m, src: i, setShown: () => {
279
+ /* @__PURE__ */ n(Ee, { t: m, src: i, setShown: () => {
280
280
  } }),
281
- r && /* @__PURE__ */ N(H, { children: [
281
+ r && /* @__PURE__ */ N(B, { children: [
282
282
  /* @__PURE__ */ n(
283
283
  Oe,
284
284
  {
@@ -292,7 +292,7 @@ const Se = ({
292
292
  }
293
293
  ),
294
294
  /* @__PURE__ */ n(
295
- Ee,
295
+ Te,
296
296
  {
297
297
  opened: d,
298
298
  onOpenChange: I,
@@ -308,12 +308,12 @@ const Se = ({
308
308
  }
309
309
  ) }),
310
310
  /* @__PURE__ */ n(
311
- A.Dropdown,
311
+ z.Dropdown,
312
312
  {
313
313
  className: `floating-link-dropdown floating-link-dropdown--${t ? "edit" : "create"}-mode`,
314
314
  "data-test-id": "floating-link-dropdown",
315
315
  children: /* @__PURE__ */ n(
316
- ie,
316
+ re,
317
317
  {
318
318
  editor: a,
319
319
  nodeKey: e,
@@ -326,11 +326,11 @@ const Se = ({
326
326
  ]
327
327
  }
328
328
  );
329
- }, vt = () => {
329
+ }, Ct = () => {
330
330
  };
331
- function yt({ nodeKey: e, src: i, id: t, href: a }) {
332
- const { t: r } = B(), [s] = V(), l = te(), [d, I] = y(!1), [b, p] = y(!1), [m, h] = y(!1);
333
- P(() => {
331
+ function Dt({ nodeKey: e, src: i, id: t, href: a }) {
332
+ const { t: r } = V(), [s] = G(), l = ne(), [d, I] = y(!1), [b, p] = y(!1), [m, h] = y(!1);
333
+ S(() => {
334
334
  if (!m) return;
335
335
  const c = (w) => {
336
336
  const u = w.target;
@@ -340,20 +340,20 @@ function yt({ nodeKey: e, src: i, id: t, href: a }) {
340
340
  }, [m]);
341
341
  const v = C(() => {
342
342
  p(!1), s.update(() => {
343
- const c = E(e);
344
- if (!S(c)) return;
343
+ const c = T(e);
344
+ if (!E(c)) return;
345
345
  const w = c.getParent();
346
346
  ot(w) ? w.remove() : c.remove();
347
347
  });
348
348
  }, [s, e]), k = C(async () => {
349
349
  if (i)
350
350
  try {
351
- await ne(i, oe(i));
351
+ await ae(i, ie(i));
352
352
  } catch {
353
353
  }
354
354
  }, [i]);
355
355
  return /* @__PURE__ */ N(
356
- A,
356
+ z,
357
357
  {
358
358
  opened: m,
359
359
  onChange: h,
@@ -364,7 +364,7 @@ function yt({ nodeKey: e, src: i, id: t, href: a }) {
364
364
  withinPortal: !0,
365
365
  closeOnClickOutside: !1,
366
366
  children: [
367
- /* @__PURE__ */ n(A.Target, { children: /* @__PURE__ */ N(
367
+ /* @__PURE__ */ n(z.Target, { children: /* @__PURE__ */ N(
368
368
  "div",
369
369
  {
370
370
  className: "media-actions visible",
@@ -379,8 +379,8 @@ function yt({ nodeKey: e, src: i, id: t, href: a }) {
379
379
  },
380
380
  onClick: (c) => c.stopPropagation(),
381
381
  children: [
382
- /* @__PURE__ */ n(Se, { t: r, src: i, setShown: vt, id: t }),
383
- l && /* @__PURE__ */ N(H, { children: [
382
+ /* @__PURE__ */ n(Ee, { t: r, src: i, setShown: Ct, id: t }),
383
+ l && /* @__PURE__ */ N(B, { children: [
384
384
  /* @__PURE__ */ n(
385
385
  Oe,
386
386
  {
@@ -392,7 +392,7 @@ function yt({ nodeKey: e, src: i, id: t, href: a }) {
392
392
  }
393
393
  ),
394
394
  /* @__PURE__ */ n(
395
- Ee,
395
+ Te,
396
396
  {
397
397
  opened: b,
398
398
  onOpenChange: p,
@@ -408,12 +408,12 @@ function yt({ nodeKey: e, src: i, id: t, href: a }) {
408
408
  }
409
409
  ) }),
410
410
  /* @__PURE__ */ n(
411
- A.Dropdown,
411
+ z.Dropdown,
412
412
  {
413
413
  className: `floating-link-dropdown floating-link-dropdown--${a ? "edit" : "create"}-mode`,
414
414
  "data-test-id": "floating-link-dropdown",
415
415
  children: /* @__PURE__ */ n(
416
- ie,
416
+ re,
417
417
  {
418
418
  editor: s,
419
419
  nodeKey: e,
@@ -427,10 +427,10 @@ function yt({ nodeKey: e, src: i, id: t, href: a }) {
427
427
  }
428
428
  );
429
429
  }
430
- function It({ nodeKey: e, src: i, id: t, href: a }) {
431
- const { t: r } = B(), [s] = V(), l = te(), d = Le(), [I, { open: b, close: p }] = $(!1), [m, { open: h, close: v }] = $(!1), [k, { open: c, close: w }] = $(!1), u = () => {
430
+ function Lt({ nodeKey: e, src: i, id: t, href: a }) {
431
+ const { t: r } = V(), [s] = G(), l = ne(), d = Le(), [I, { open: b, close: p }] = H(!1), [m, { open: h, close: v }] = H(!1), [k, { open: c, close: w }] = H(!1), u = () => {
432
432
  p(), c();
433
- }, T = K(
433
+ }, P = te(
434
434
  () => [
435
435
  {
436
436
  id: !t || t === "0" ? "" : t,
@@ -452,21 +452,21 @@ function It({ nodeKey: e, src: i, id: t, href: a }) {
452
452
  }
453
453
  ],
454
454
  [i, t]
455
- ), R = () => {
455
+ ), U = () => {
456
456
  p(), h();
457
457
  }, L = C(async () => {
458
458
  if (p(), !!i)
459
459
  try {
460
- await ne(i, oe(i));
460
+ await ae(i, ie(i));
461
461
  } catch {
462
462
  }
463
- }, [i, p]), M = C(() => {
463
+ }, [i, p]), x = C(() => {
464
464
  p(), s.update(() => {
465
- const O = E(e);
466
- S(O) && O.remove();
465
+ const O = T(e);
466
+ E(O) && O.remove();
467
467
  });
468
468
  }, [s, e, p]);
469
- return /* @__PURE__ */ N(H, { children: [
469
+ return /* @__PURE__ */ N(B, { children: [
470
470
  /* @__PURE__ */ n(
471
471
  "div",
472
472
  {
@@ -480,7 +480,7 @@ function It({ nodeKey: e, src: i, id: t, href: a }) {
480
480
  },
481
481
  onClick: (O) => O.stopPropagation(),
482
482
  children: /* @__PURE__ */ n(
483
- ee,
483
+ oe,
484
484
  {
485
485
  label: r("editor.toolbar.more"),
486
486
  icon: nt,
@@ -492,11 +492,11 @@ function It({ nodeKey: e, src: i, id: t, href: a }) {
492
492
  }
493
493
  ),
494
494
  /* @__PURE__ */ n(
495
- Te,
495
+ Pe,
496
496
  {
497
497
  opened: m,
498
498
  onOpenChange: (O) => O ? h() : v(),
499
- attachments: T,
499
+ attachments: P,
500
500
  allowDownload: d
501
501
  }
502
502
  ),
@@ -508,7 +508,7 @@ function It({ nodeKey: e, src: i, id: t, href: a }) {
508
508
  title: r("editor.image.mobileActions"),
509
509
  children: /* @__PURE__ */ N(He, { gap: 4, p: 0, children: [
510
510
  /* @__PURE__ */ n(
511
- j,
511
+ $,
512
512
  {
513
513
  type: "button",
514
514
  variant: "subtle",
@@ -516,9 +516,9 @@ function It({ nodeKey: e, src: i, id: t, href: a }) {
516
516
  fullWidth: !0,
517
517
  justify: "flex-start",
518
518
  bg: "var(--editor-action-bg)",
519
- onClick: R,
519
+ onClick: U,
520
520
  leftSection: /* @__PURE__ */ n(
521
- U,
521
+ M,
522
522
  {
523
523
  icon: Ne,
524
524
  size: 16,
@@ -529,7 +529,7 @@ function It({ nodeKey: e, src: i, id: t, href: a }) {
529
529
  }
530
530
  ),
531
531
  l && /* @__PURE__ */ n(
532
- j,
532
+ $,
533
533
  {
534
534
  type: "button",
535
535
  variant: "subtle",
@@ -539,7 +539,7 @@ function It({ nodeKey: e, src: i, id: t, href: a }) {
539
539
  bg: "var(--editor-action-bg)",
540
540
  onClick: u,
541
541
  leftSection: /* @__PURE__ */ n(
542
- U,
542
+ M,
543
543
  {
544
544
  icon: it,
545
545
  size: 16,
@@ -550,7 +550,7 @@ function It({ nodeKey: e, src: i, id: t, href: a }) {
550
550
  }
551
551
  ),
552
552
  d && /* @__PURE__ */ n(
553
- j,
553
+ $,
554
554
  {
555
555
  type: "button",
556
556
  variant: "subtle",
@@ -560,7 +560,7 @@ function It({ nodeKey: e, src: i, id: t, href: a }) {
560
560
  bg: "var(--editor-action-bg)",
561
561
  onClick: () => void L(),
562
562
  leftSection: /* @__PURE__ */ n(
563
- U,
563
+ M,
564
564
  {
565
565
  icon: Ce,
566
566
  size: 16,
@@ -571,7 +571,7 @@ function It({ nodeKey: e, src: i, id: t, href: a }) {
571
571
  }
572
572
  ),
573
573
  l && /* @__PURE__ */ n(
574
- j,
574
+ $,
575
575
  {
576
576
  type: "button",
577
577
  variant: "subtle",
@@ -579,9 +579,9 @@ function It({ nodeKey: e, src: i, id: t, href: a }) {
579
579
  fullWidth: !0,
580
580
  justify: "flex-start",
581
581
  bg: "var(--editor-action-bg)",
582
- onClick: M,
582
+ onClick: x,
583
583
  leftSection: /* @__PURE__ */ n(
584
- U,
584
+ M,
585
585
  {
586
586
  icon: De,
587
587
  size: 16,
@@ -601,7 +601,7 @@ function It({ nodeKey: e, src: i, id: t, href: a }) {
601
601
  onClose: w,
602
602
  title: r(a ? "editor.link.editLink" : "editor.link.addLink"),
603
603
  children: /* @__PURE__ */ n(
604
- ie,
604
+ re,
605
605
  {
606
606
  editor: s,
607
607
  nodeKey: e,
@@ -627,7 +627,7 @@ const ye = (e) => {
627
627
  maxWidth: b,
628
628
  aspectRatio: p,
629
629
  href: m
630
- } = e, h = Q(null);
630
+ } = e, h = ee(null);
631
631
  return /* @__PURE__ */ N(
632
632
  "div",
633
633
  {
@@ -655,7 +655,7 @@ const ye = (e) => {
655
655
  {
656
656
  className: "editor-image-link",
657
657
  "data-link": m ? "true" : void 0,
658
- "data-href": m ? J(m) : void 0,
658
+ "data-href": m ? K(m) : void 0,
659
659
  role: m ? "link" : void 0,
660
660
  rel: m ? "noopener noreferrer" : void 0,
661
661
  draggable: !1,
@@ -665,10 +665,10 @@ const ye = (e) => {
665
665
  onClick: m ? (v) => {
666
666
  v.preventDefault();
667
667
  const k = h.current;
668
- h.current = null, !(k && Math.hypot(v.clientX - k.x, v.clientY - k.y) > 5) && window.open(J(m), "_blank", "noopener,noreferrer");
668
+ h.current = null, !(k && Math.hypot(v.clientX - k.x, v.clientY - k.y) > 5) && window.open(K(m), "_blank", "noopener,noreferrer");
669
669
  } : void 0,
670
670
  children: /* @__PURE__ */ n(
671
- Ct,
671
+ Nt,
672
672
  {
673
673
  className: null,
674
674
  src: s,
@@ -683,7 +683,7 @@ const ye = (e) => {
683
683
  }
684
684
  ),
685
685
  ke && /* @__PURE__ */ n(
686
- It,
686
+ Lt,
687
687
  {
688
688
  nodeKey: e.nodeKey,
689
689
  src: s,
@@ -692,7 +692,7 @@ const ye = (e) => {
692
692
  }
693
693
  ),
694
694
  ve && /* @__PURE__ */ n(
695
- yt,
695
+ Dt,
696
696
  {
697
697
  nodeKey: e.nodeKey,
698
698
  src: s,
@@ -700,12 +700,12 @@ const ye = (e) => {
700
700
  href: m
701
701
  }
702
702
  ),
703
- ft && !ke && !ve && /* @__PURE__ */ n(kt, { nodeKey: e.nodeKey, src: s, href: m })
703
+ ht && !ke && !ve && /* @__PURE__ */ n(It, { nodeKey: e.nodeKey, src: s, href: m })
704
704
  ]
705
705
  }
706
706
  );
707
707
  };
708
- function Ct({
708
+ function Nt({
709
709
  altText: e,
710
710
  className: i,
711
711
  imageRef: t,
@@ -738,11 +738,11 @@ function Ct({
738
738
  }
739
739
  );
740
740
  }
741
- function Xt(e) {
742
- const { disable: i } = Ie(Pe);
743
- return i && at.isPlaceholderSrc(e.src) ? null : /* @__PURE__ */ n(Dt, { ...e });
741
+ function qt(e) {
742
+ const { disable: i } = Ie(Se);
743
+ return i && at.isPlaceholderSrc(e.src) ? null : /* @__PURE__ */ n(Ot, { ...e });
744
744
  }
745
- function Dt({
745
+ function Ot({
746
746
  src: e,
747
747
  altText: i,
748
748
  nodeKey: t,
@@ -759,25 +759,25 @@ function Dt({
759
759
  href: v
760
760
  }) {
761
761
  var ge, fe;
762
- const k = Q(null), [c, w] = y(!0), [u] = V(), [T, R] = y(!0), [L, M] = y({
762
+ const k = ee(null), [c, w] = y(!0), [u] = G(), [P, U] = y(!0), [L, x] = y({
763
763
  width: 0,
764
764
  height: 0
765
- }), { start: O } = rt(), [Lt, G] = y(0), {
766
- fetchUploadMedia: z,
767
- fetchDeleteMedia: ae,
768
- maxFileSize: Nt,
769
- imperativeHandleRef: W,
770
- disable: xe
771
- } = Ie(Pe), _ = q.has(e) && (((ge = q.get(e)) == null ? void 0 : ge.mediaNodeKeys.length) === 0 || ((fe = q.get(e)) == null ? void 0 : fe.mediaNodeKeys.length) === void 0 || e.trim() === ""), { t: F } = B(), re = (o) => {
765
+ }), { start: O } = rt(), [St, X] = y(0), {
766
+ fetchUploadMedia: W,
767
+ fetchDeleteMedia: le,
768
+ maxFileSize: Pt,
769
+ imperativeHandleRef: _,
770
+ disable: Ue
771
+ } = Ie(Se), F = Q.has(e) && (((ge = Q.get(e)) == null ? void 0 : ge.mediaNodeKeys.length) === 0 || ((fe = Q.get(e)) == null ? void 0 : fe.mediaNodeKeys.length) === void 0 || e.trim() === ""), { t: j } = V(), se = (o) => {
772
772
  if (typeof o == "number") return o > 0 ? o : null;
773
773
  if (typeof o == "string" && !o.includes("%")) {
774
774
  const g = parseFloat(o);
775
775
  return Number.isFinite(g) && g > 0 ? g : null;
776
776
  }
777
777
  return null;
778
- }, le = re(a), se = re(r), de = le && se ? le / se : void 0, [Ue, Ae] = y(
778
+ }, A = se(a), de = se(r), ce = A && de ? A / de : void 0, [xe, Ae] = y(
779
779
  void 0
780
- ), ce = K(() => {
780
+ ), ue = te(() => {
781
781
  try {
782
782
  const o = parseFloat(
783
783
  localStorage.getItem("layers-img-ratio:" + e) || ""
@@ -786,13 +786,13 @@ function Dt({
786
786
  } catch {
787
787
  return;
788
788
  }
789
- }, [e]), Re = de ?? h ?? ce ?? Ue, [Me, ue] = y(!1), ze = !Me && !de && (h ?? ce) != null, [Ot, We] = y(0);
790
- P(() => u.registerDecoratorListener(() => {
789
+ }, [e]), Re = ce ?? h ?? ue ?? xe, [Me, Y] = y(!1), ze = !Me && !ce && (h ?? ue) != null, [Tt, We] = y(0);
790
+ S(() => u.registerDecoratorListener(() => {
791
791
  We((o) => o + 1);
792
- }), [_]), P(() => {
792
+ }), [F]), S(() => {
793
793
  const o = u.getElementByKey(t);
794
794
  o && (o.style.removeProperty("aspect-ratio"), o.style.removeProperty("width"));
795
- }, [u, t]), P(() => {
795
+ }, [u, t]), S(() => {
796
796
  if (!e || e.startsWith("data:image/") || !e.trim()) {
797
797
  w(!1);
798
798
  return;
@@ -808,8 +808,8 @@ function Dt({
808
808
  }
809
809
  !h && o.naturalWidth >= 100 && u.update(
810
810
  () => {
811
- const f = E(t);
812
- S(f) && f.getAspectRatio() == null && f.setAspectRatio(g);
811
+ const f = T(t);
812
+ E(f) && f.getAspectRatio() == null && f.setAspectRatio(g);
813
813
  },
814
814
  { tag: "history-merge" }
815
815
  );
@@ -817,23 +817,24 @@ function Dt({
817
817
  }, o.onerror = () => {
818
818
  w(!1);
819
819
  };
820
- }, [e, _]);
820
+ }, [e, F]);
821
821
  const _e = (o, g) => {
822
822
  u.update(() => {
823
823
  Xe(null);
824
- const f = E(t);
825
- S(f) && f.setWidthAndHeight(o, g);
824
+ const f = T(t);
825
+ E(f) && f.setWidthAndHeight(o, g);
826
826
  });
827
827
  }, { historyState: pe } = lt(), {
828
828
  settings: { showNestedEditorTreeView: me }
829
829
  } = st();
830
830
  function Fe(o) {
831
- return o.endsWith(".svg") || o.includes("image/svg+xml");
831
+ const g = wt(o);
832
+ return g ? bt(g).width : 0;
832
833
  }
833
834
  function je(o) {
834
835
  return new Promise((g, f) => {
835
- if (Fe(o)) {
836
- g(0);
836
+ if (ft(o)) {
837
+ g(Fe(o));
837
838
  return;
838
839
  }
839
840
  const D = new Image();
@@ -844,66 +845,72 @@ function Dt({
844
845
  };
845
846
  });
846
847
  }
847
- P(() => {
848
+ S(() => {
848
849
  let o = a, g = r, f = 100;
849
- (e.includes("unsplash") ? e.trim() : !_ && e.trim() || e.includes("upload-src-editor")) && e !== "upload" && je(e).then((D) => {
850
- typeof o == "number" && o < f && D < f ? (R(!0), M({
851
- width: o,
852
- height: g
853
- })) : D < f ? (R(!0), M({
854
- width: "auto",
855
- height: "auto"
856
- })) : (M({
857
- width: D,
858
- height: D
859
- }), R(!1)), ue(!0);
860
- }).catch((D) => {
861
- ue(!0), console.warn("Ошибка при загрузке изображения:", D.message);
862
- });
863
- }, [e, _]), P(() => {
864
- L.width && L.height && T && u.update(() => {
865
- const o = E(t);
866
- S(o) && o.setWidthAndHeight(L.width, L.height);
850
+ if ((e.includes("unsplash") ? e.trim() : !F && e.trim() || e.includes("upload-src-editor")) && e !== "upload") {
851
+ if (A != null && A >= f) {
852
+ U(!1), x({ width: A, height: A }), Y(!0);
853
+ return;
854
+ }
855
+ je(e).then((D) => {
856
+ typeof o == "number" && o < f && D < f ? (U(!0), x({
857
+ width: o,
858
+ height: g
859
+ })) : D < f ? (U(!0), x({
860
+ width: "auto",
861
+ height: "auto"
862
+ })) : (x({
863
+ width: D,
864
+ height: D
865
+ }), U(!1)), Y(!0);
866
+ }).catch((D) => {
867
+ Y(!0), console.warn("Ошибка при загрузке изображения:", D.message);
868
+ });
869
+ }
870
+ }, [e, F]), S(() => {
871
+ L.width && L.height && P && u.update(() => {
872
+ const o = T(t);
873
+ E(o) && o.setWidthAndHeight(L.width, L.height);
867
874
  });
868
- }, [L.width, L.height, T]);
875
+ }, [L.width, L.height, P]);
869
876
  const $e = C(
870
877
  (o) => dt(u, t, o),
871
878
  [u, t]
872
- ), X = C(
879
+ ), Z = C(
873
880
  (o, g) => {
874
881
  w(!1), u.update(() => {
875
- const f = E(t);
876
- S(f) && (f.setSrc(o), f.setId(g));
882
+ const f = T(t);
883
+ E(f) && (f.setSrc(o), f.setId(g));
877
884
  });
878
885
  },
879
886
  [u, t]
880
- ), Y = C(
887
+ ), q = C(
881
888
  (o) => {
882
889
  w(!0);
883
890
  const g = O();
884
- z && z(
891
+ W && W(
885
892
  o[0],
886
893
  (f, D) => {
887
- X(f, D), G(0);
894
+ Z(f, D), X(0);
888
895
  },
889
896
  (f) => {
890
- f && ht({
891
- message: F("editor.gallery.errorFile")
892
- }), G(0), X(e.startsWith("blob:") ? "upload" : "", "");
897
+ f && kt({
898
+ message: j("editor.gallery.errorFile")
899
+ }), X(0), Z(e.startsWith("blob:") ? "upload" : "", "");
893
900
  },
894
901
  g,
895
902
  (f) => {
896
- G(f);
903
+ X(f);
897
904
  }
898
905
  );
899
906
  },
900
- [z, O, F, X, e]
907
+ [W, O, j, Z, e]
901
908
  );
902
- return P(() => u.registerCommand(
909
+ return S(() => u.registerCommand(
903
910
  ct,
904
- (o) => !e.startsWith("blob:") && e !== "upload" || o.targetNodeKey !== t ? !1 : (Y(o.files), !0),
911
+ (o) => !e.startsWith("blob:") && e !== "upload" || o.targetNodeKey !== t ? !1 : (q(o.files), !0),
905
912
  Ge
906
- ), [u, Y, t, e]), !e || e === "upload" ? /* @__PURE__ */ n(Be, { "data-editor-image-picker-drop-root": !0, w: "100%", children: /* @__PURE__ */ n(
913
+ ), [u, q, t, e]), !e || e === "upload" ? /* @__PURE__ */ n(Be, { "data-editor-image-picker-drop-root": !0, w: "100%", children: /* @__PURE__ */ n(
907
914
  ut,
908
915
  {
909
916
  inline: !0,
@@ -912,7 +919,7 @@ function Dt({
912
919
  onWriteTabToNode: $e,
913
920
  uploading: !1,
914
921
  onUpload: (o) => {
915
- !z || !o.length || Y(o);
922
+ !W || !o.length || q(o);
916
923
  },
917
924
  popoverProps: {
918
925
  opened: !0,
@@ -921,24 +928,24 @@ function Dt({
921
928
  },
922
929
  onChange: (o) => {
923
930
  u.update(() => {
924
- const g = E(t);
925
- S(g) && g.setSrc(o);
931
+ const g = T(t);
932
+ E(g) && g.setSrc(o);
926
933
  });
927
934
  }
928
935
  }
929
- ) }) : T && !ze ? /* @__PURE__ */ n(
936
+ ) }) : P && !ze ? /* @__PURE__ */ n(
930
937
  ye,
931
938
  {
932
939
  width: L.width,
933
940
  height: L.height,
934
941
  isLoading: c,
935
942
  isError: !1,
936
- isIcon: T,
943
+ isIcon: P,
937
944
  src: e,
938
945
  id: I,
939
946
  editor: u,
940
947
  nodeKey: t,
941
- fetchDeleteMedia: ae,
948
+ fetchDeleteMedia: le,
942
949
  altText: i,
943
950
  imageRef: k,
944
951
  maxWidth: s,
@@ -947,23 +954,23 @@ function Dt({
947
954
  isCollabActive: !1,
948
955
  historyState: pe,
949
956
  showNestedEditorTreeView: me,
950
- t: F,
957
+ t: j,
951
958
  href: v
952
959
  }
953
960
  ) : /* @__PURE__ */ n(
954
961
  mt,
955
962
  {
956
963
  editor: u,
957
- isIcon: T,
964
+ isIcon: P,
958
965
  width: be(a),
959
966
  height: be(r),
960
967
  initialWidth: L.width || "",
961
968
  initialHeight: L.height || "",
962
969
  onResizeEnd: _e,
963
970
  alignment: p,
964
- disable: xe,
971
+ disable: Ue,
965
972
  onRegisterDecoratorEnter: (o) => {
966
- W != null && W.current && (W.current.decoratorEnterAction = o);
973
+ _ != null && _.current && (_.current.decoratorEnterAction = o);
967
974
  },
968
975
  onActivate: () => u.dispatchCommand(gt, "show_menu"),
969
976
  children: /* @__PURE__ */ n(
@@ -974,12 +981,12 @@ function Dt({
974
981
  aspectRatio: Re,
975
982
  isLoading: c,
976
983
  isError: !1,
977
- isIcon: T,
984
+ isIcon: P,
978
985
  src: e,
979
986
  id: I,
980
987
  editor: u,
981
988
  nodeKey: t,
982
- fetchDeleteMedia: ae,
989
+ fetchDeleteMedia: le,
983
990
  altText: i,
984
991
  imageRef: k,
985
992
  maxWidth: s,
@@ -988,7 +995,7 @@ function Dt({
988
995
  isCollabActive: !1,
989
996
  historyState: pe,
990
997
  showNestedEditorTreeView: me,
991
- t: F,
998
+ t: j,
992
999
  href: v
993
1000
  }
994
1001
  )
@@ -996,5 +1003,5 @@ function Dt({
996
1003
  );
997
1004
  }
998
1005
  export {
999
- Xt as default
1006
+ qt as default
1000
1007
  };