@layers-app/editor 2.3.24 → 2.3.26

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 (214) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.js +5 -5
  3. package/dist/{layers.CJgbI_A6.js → layers.06kxkdOn.js} +2 -2
  4. package/dist/{layers.CIm79Ra1.js → layers.0Xb9eyO9.js} +4 -4
  5. package/dist/{layers.XufwhRWn.js → layers.1ZUBBaE9.js} +1 -1
  6. package/dist/{layers.C8NgjywA.js → layers.1slD_q-E.js} +1 -1
  7. package/dist/{layers.v9JhgLGL.js → layers.3RceEWj9.js} +1 -1
  8. package/dist/{layers.OVc7WJn6.js → layers.5A202pak.js} +1 -1
  9. package/dist/{layers.SqD4gItY.js → layers.5HQkdVEZ.js} +24 -24
  10. package/dist/{layers.CyqHpq0B.js → layers.5mynYo8l.js} +1 -1
  11. package/dist/{layers.BFMrrvO6.js → layers.5q5EeM59.js} +1 -1
  12. package/dist/{layers.ClswqtpD.js → layers.80VCTD7v.js} +1 -1
  13. package/dist/{layers.CORpX7r7.js → layers.8ZfminSA.js} +1 -1
  14. package/dist/{layers.rxoXKzgA.js → layers.93mWP3q1.js} +3 -3
  15. package/dist/{layers.DZwJH6W1.js → layers.B1VodtLc.js} +1 -1
  16. package/dist/{layers.D_7F5phf.js → layers.B2Ak8uT3.js} +1 -1
  17. package/dist/{layers.DXTeiF-e.js → layers.B2fXuMiK.js} +2 -2
  18. package/dist/{layers.CEe-N6eG.js → layers.B2n3wluV.js} +3 -3
  19. package/dist/{layers.B-hQUarG.js → layers.B4RiOCCc.js} +1 -1
  20. package/dist/{layers.CGtmQbiV.js → layers.B753Sw6t.js} +1 -1
  21. package/dist/{layers.BL4_Vrtj.js → layers.B8d7VeDT.js} +1 -1
  22. package/dist/{layers.Dmh6stK3.js → layers.B8da1EXN.js} +1 -1
  23. package/dist/{layers.CDYV-VhD.js → layers.B9WauHjc.js} +1 -1
  24. package/dist/{layers.Zv83kZG8.js → layers.BBhuRA0J.js} +1 -1
  25. package/dist/{layers.BJ4aigFR.js → layers.BCTW0EQE.js} +1 -1
  26. package/dist/{layers.Cim8IgKH.js → layers.BGBqw2WI.js} +1 -1
  27. package/dist/{layers.DBT8nxxX.js → layers.BGXxE8XC.js} +1 -1
  28. package/dist/{layers.CD71nr4_.js → layers.BHXiNUkl.js} +1 -1
  29. package/dist/{layers.BEQSkQb5.js → layers.BJ68wl6N.js} +1 -1
  30. package/dist/{layers.CcDllE0Z.js → layers.BNM6fjOD.js} +1 -1
  31. package/dist/{layers.DBvEUYd0.js → layers.BNVrCebq.js} +1 -1
  32. package/dist/{layers.CCY9XOI0.js → layers.BRkRGLpe.js} +2 -2
  33. package/dist/{layers.ClY73P1k.js → layers.BS4LGM2k.js} +1 -1
  34. package/dist/{layers.DKKrMI1y.js → layers.BUIDBWuk.js} +1 -1
  35. package/dist/{layers.taYJuEcx.js → layers.BVeRN2gy.js} +1 -1
  36. package/dist/{layers.CnVOqy-h.js → layers.BWijKAoG.js} +1 -1
  37. package/dist/{layers.VGDmP6RB.js → layers.BX0Tr12G.js} +1 -1
  38. package/dist/{layers.Dd-wIXHi.js → layers.BZqO9Gum.js} +1 -1
  39. package/dist/{layers.DKpTuMTK.js → layers.BbFbd8Ow.js} +1 -1
  40. package/dist/{layers.CHzUR2uh.js → layers.BbwEz-Rj.js} +1 -1
  41. package/dist/{layers.BBdzXGC6.js → layers.Bcify-hp.js} +1 -1
  42. package/dist/{layers.CdYNCOg7.js → layers.BeEKrOsf.js} +1 -1
  43. package/dist/{layers.BH42eSHV.js → layers.BgiypEt0.js} +1 -1
  44. package/dist/{layers.CBKhhbj_.js → layers.BhEqXs7L.js} +1 -1
  45. package/dist/{layers.yZEhq0RN.js → layers.BhUV8dgx.js} +1 -1
  46. package/dist/{layers.CyLTrS4x.js → layers.BiMX0URe.js} +1 -1
  47. package/dist/{layers.0CpMH7Qd.js → layers.BmJ6umV_.js} +1 -1
  48. package/dist/{layers.CZTvQbIJ.js → layers.BmJDSttA.js} +1 -1
  49. package/dist/{layers.xcpsF3RF.js → layers.Bo3hX10v.js} +1 -1
  50. package/dist/{layers.DtzgBbW_.js → layers.BqdSKxto.js} +2 -2
  51. package/dist/{layers.DCI-PU7V.js → layers.BrG8aBro.js} +3 -3
  52. package/dist/{layers.IP3dJr3G.js → layers.BtCroBH3.js} +1 -1
  53. package/dist/{layers.zbwA3qRl.js → layers.BtWXLFqX.js} +54 -53
  54. package/dist/{layers.CLeeY6Zi.js → layers.BuuJEfe5.js} +1 -1
  55. package/dist/{layers.BElnuJGo.js → layers.BwCX6Zbb.js} +1 -1
  56. package/dist/{layers.Cq6Uaebt.js → layers.BxTOsR6r.js} +1 -1
  57. package/dist/{layers.Dqjw6JqU.js → layers.Bxe51HIv.js} +7 -7
  58. package/dist/{layers.DGHhm0ig.js → layers.ByJjzHy5.js} +1 -1
  59. package/dist/{layers.SpT_PVDP.js → layers.BzxJsM5r.js} +1 -1
  60. package/dist/{layers.DkGrVIsD.js → layers.C0NOC776.js} +1 -1
  61. package/dist/{layers.C_1xPfQN.js → layers.C0Pwdwl4.js} +2 -2
  62. package/dist/{layers.bk6BoA31.js → layers.C16qlCnq.js} +1 -1
  63. package/dist/layers.C1pi18JI.js +6 -0
  64. package/dist/{layers.b-D90IdJ.js → layers.C2WkXc0V.js} +1 -1
  65. package/dist/{layers.DUcRoa8i.js → layers.C3b5Otdk.js} +3 -3
  66. package/dist/{layers.C3G0i3tG.js → layers.C4LXM5sQ.js} +1 -1
  67. package/dist/{layers.BQiCz5VQ.js → layers.C55aLJYZ.js} +1 -1
  68. package/dist/{layers.CdVMpdra.js → layers.C5LFGcNR.js} +1 -1
  69. package/dist/{layers.Buwyevgo.js → layers.C6q5BWce.js} +1 -1
  70. package/dist/{layers.CNfT77xZ.js → layers.CAYrC2cX.js} +1 -1
  71. package/dist/{layers.p99FvPzP.js → layers.CB8glfw3.js} +1 -1
  72. package/dist/{layers.ClnZvd9i.js → layers.CBi3LX0E.js} +1 -1
  73. package/dist/{layers.Bl9fmgeS.js → layers.CEGLWHqY.js} +1 -1
  74. package/dist/{layers.Dqie3AbF.js → layers.CFx1QgsK.js} +1 -1
  75. package/dist/{layers.uOzxdMWN.js → layers.CKabsp_P.js} +1 -1
  76. package/dist/{layers.CNY3Xyfj.js → layers.CLs6IZSt.js} +1 -1
  77. package/dist/{layers.Cf8-96M8.js → layers.COUhr6uI.js} +1 -1
  78. package/dist/{layers.DGJY2FkO.js → layers.COVqoaPF.js} +1 -1
  79. package/dist/{layers.B7rjsYyQ.js → layers.COsMLe2U.js} +1 -1
  80. package/dist/{layers.Cj_EqAWT.js → layers.CQbTyv-D.js} +1 -1
  81. package/dist/{layers.DD1nZQay.js → layers.CTFA2pN8.js} +1 -1
  82. package/dist/{layers.vl-FtmBd.js → layers.CTKKxCDz.js} +3 -3
  83. package/dist/{layers.B_B2UGan.js → layers.CTerPAMp.js} +1 -1
  84. package/dist/{layers.C3Q2x4vM.js → layers.CToUZtau.js} +3 -3
  85. package/dist/{layers.Bgv2K37s.js → layers.CV19_sfl.js} +1 -1
  86. package/dist/{layers.DQ0SYwRq.js → layers.CVh2C_qH.js} +1 -1
  87. package/dist/{layers.DHo3KKeF.js → layers.CWlsjw9_.js} +1 -1
  88. package/dist/{layers.CwkZ6Ipi.js → layers.CXz-70Ss.js} +1 -1
  89. package/dist/{layers.BvT1pOJ7.js → layers.CYXYl4S4.js} +1 -1
  90. package/dist/{layers.AwhdZDwP.js → layers.CYqodYKM.js} +235 -229
  91. package/dist/{layers.DDtCoAUS.js → layers.CaMOsOga.js} +1 -1
  92. package/dist/{layers.BhbnND3b.js → layers.CbYN0Ct8.js} +1 -1
  93. package/dist/{layers.hkPgmxE-.js → layers.CdmNOXjZ.js} +1 -1
  94. package/dist/{layers.C_x8dLfm.js → layers.CentuFDF.js} +1 -1
  95. package/dist/{layers.B9XsK7sf.js → layers.Cf_XdArM.js} +1 -1
  96. package/dist/{layers.LL7KnkpN.js → layers.CiVrPEVY.js} +1 -1
  97. package/dist/{layers.CPJeTos-.js → layers.Cj2VRaTj.js} +1 -1
  98. package/dist/{layers.BPAXEqLu.js → layers.CjiNgCn9.js} +1 -1
  99. package/dist/{layers.DPTnVoRy.js → layers.Cl4iVYcX.js} +1 -1
  100. package/dist/{layers.ClHoBwGo.js → layers.Clkd6QzV.js} +1 -1
  101. package/dist/{layers.hQtFhwXx.js → layers.Cnvews_b.js} +1 -1
  102. package/dist/{layers.D6NCqWh9.js → layers.Co7T1xJE.js} +1 -1
  103. package/dist/{layers.B5-fG7P8.js → layers.CpO-2uiC.js} +1 -1
  104. package/dist/{layers.DfPPz_X1.js → layers.CqpG8AyW.js} +1 -1
  105. package/dist/{layers.wSDWdOKk.js → layers.CtK8YnhM.js} +1 -1
  106. package/dist/{layers.D9PPBeAk.js → layers.Ctra8nKc.js} +1 -1
  107. package/dist/{layers.Dif1MzgT.js → layers.Cv4qBsoZ.js} +1 -1
  108. package/dist/{layers.DAeqbGMo.js → layers.CwLWDj2w.js} +1 -1
  109. package/dist/{layers.7sTg2ka1.js → layers.D1R1Tj6y.js} +3 -3
  110. package/dist/{layers.DAn4p0sm.js → layers.D2rpvr4Y.js} +1 -1
  111. package/dist/{layers.Kz3zpi50.js → layers.D3RbYDJF.js} +1 -1
  112. package/dist/{layers.DjmlUPia.js → layers.D3Zev3TA.js} +1 -1
  113. package/dist/{layers.DTjXnAGW.js → layers.D4DAfKZt.js} +1 -1
  114. package/dist/{layers.sWOuZ1z8.js → layers.D4Pmmu4D.js} +3 -3
  115. package/dist/{layers.CFIW_fEO.js → layers.D4UZjKiD.js} +1 -1
  116. package/dist/{layers.hM4mb7rr.js → layers.D4YoFuaj.js} +1 -1
  117. package/dist/{layers.DLxiVk7N.js → layers.D5lA_5Wf.js} +1 -1
  118. package/dist/{layers.BVm7Nx47.js → layers.D6KQMGBF.js} +1 -1
  119. package/dist/{layers.DzRb8jra.js → layers.D6dgG1LJ.js} +1 -1
  120. package/dist/{layers.C1PtkGX3.js → layers.DAGyoNkA.js} +1 -1
  121. package/dist/{layers.BWwL3Ve5.js → layers.DDPnaAO6.js} +1 -1
  122. package/dist/{layers.CVJMrJM8.js → layers.DG8Vbv0I.js} +1 -1
  123. package/dist/{layers.ZtfusTop.js → layers.DGX8x4Aq.js} +1 -1
  124. package/dist/{layers.D0FgHO-y.js → layers.DGmrObFJ.js} +1 -1
  125. package/dist/{layers.ppcSfBF_.js → layers.DHh_ktw0.js} +1 -1
  126. package/dist/{layers.Dlf6x2Ju.js → layers.DIHAcds6.js} +1 -1
  127. package/dist/{layers.z_BaOEVR.js → layers.DJPs4-lV.js} +1 -1
  128. package/dist/{layers.Bf1K1fkU.js → layers.DJU6wk5G.js} +2 -2
  129. package/dist/{layers.Du79wVhh.js → layers.DKj4u-bP.js} +1 -1
  130. package/dist/{layers.D8Wxx6-x.js → layers.DKol2KvM.js} +4 -4
  131. package/dist/{layers.DBeX5TLo.js → layers.DL7836AF.js} +4 -4
  132. package/dist/{layers.B4roGXPG.js → layers.DNNRV5v8.js} +1 -1
  133. package/dist/{layers.xYL0u_aZ.js → layers.DOBKsisz.js} +1 -1
  134. package/dist/{layers.FpsTRMn5.js → layers.DOOEq-VE.js} +1 -1
  135. package/dist/{layers.CBK3ExrE.js → layers.DOZ9lw_c.js} +1 -1
  136. package/dist/{layers.B2B2rB8R.js → layers.DQ64SqO9.js} +1 -1
  137. package/dist/{layers.DSCXzQ2d.js → layers.DQtQhZvL.js} +1 -1
  138. package/dist/{layers.CWi9bxx2.js → layers.DRJE8nbJ.js} +1 -1
  139. package/dist/{layers.DKOKkFda.js → layers.DRmatRRM.js} +3 -3
  140. package/dist/{layers.DeQgcYwV.js → layers.DTGwHNbR.js} +1 -1
  141. package/dist/{layers.D0ce_VhN.js → layers.DTTEecQB.js} +3 -3
  142. package/dist/{layers.CxG2fQ_T.js → layers.DVKQizIF.js} +1 -1
  143. package/dist/{layers.B3wtrxWs.js → layers.DVfiUS4k.js} +1 -1
  144. package/dist/{layers.CHwK_NbH.js → layers.DWg9fKy9.js} +1 -1
  145. package/dist/{layers.CKQ_7R8w.js → layers.DWyvX4RU.js} +1 -1
  146. package/dist/{layers.CSAoWA5M.js → layers.DX6jWh1g.js} +1 -1
  147. package/dist/{layers.CNxKlWUs.js → layers.DXpNFNvL.js} +1 -1
  148. package/dist/{layers.aHu_65DR.js → layers.DXxebJIY.js} +1 -1
  149. package/dist/{layers.CvOQ_oHk.js → layers.DY-7AD21.js} +1 -1
  150. package/dist/{layers.BWMUkW4D.js → layers.DYq970Cu.js} +1 -1
  151. package/dist/{layers.CBdq-aon.js → layers.D_ZifgOj.js} +1 -1
  152. package/dist/{layers.DEVf_8IC.js → layers.DapC_uhI.js} +1 -1
  153. package/dist/{layers.D55-oG-_.js → layers.DblyXM5V.js} +1 -1
  154. package/dist/{layers.BgotFTf5.js → layers.DeIghn5n.js} +1 -1
  155. package/dist/{layers.u8DIrcKm.js → layers.DeZfSyvl.js} +1 -1
  156. package/dist/{layers.CV2Y68YA.js → layers.Df3IwTb3.js} +1 -1
  157. package/dist/{layers.gctTNjH6.js → layers.DhaKt_Ib.js} +1 -1
  158. package/dist/{layers.DT3oYLNK.js → layers.DmY1C1Yi.js} +1 -1
  159. package/dist/{layers.BfKluevR.js → layers.DmYutf7j.js} +4 -4
  160. package/dist/{layers.Brigp_BM.js → layers.DpxQJ7Rb.js} +2 -2
  161. package/dist/{layers.C2JRWmoz.js → layers.DqNymmvu.js} +1 -1
  162. package/dist/{layers.DuBANgoi.js → layers.DqqIh-A8.js} +2 -2
  163. package/dist/{layers.BqPMskjv.js → layers.Dqt0E0gt.js} +1 -1
  164. package/dist/{layers.BB5xZerr.js → layers.Dv7rQUn2.js} +1 -1
  165. package/dist/{layers.BcbGROAq.js → layers.DvO11OLY.js} +1 -1
  166. package/dist/{layers.ChO-FN9-.js → layers.DvqVBxKB.js} +1 -1
  167. package/dist/{layers.U_MaUknB.js → layers.DwQurUDL.js} +3 -3
  168. package/dist/layers.DxGRDSkU.js +1 -0
  169. package/dist/{layers.C-EOUS7D.js → layers.DxkTV6v5.js} +2 -2
  170. package/dist/{layers.PvYWyb5N.js → layers.Dy0sAky2.js} +3 -3
  171. package/dist/{layers.CaReiIEX.js → layers.DyI-Ahxd.js} +1 -1
  172. package/dist/{layers.BJ6E1qlO.js → layers.Dyh0nDnO.js} +1 -1
  173. package/dist/{layers.BrDVZz1T.js → layers.E1BHe5Zw.js} +47 -47
  174. package/dist/{layers.BaINgm3q.js → layers.FuU1jzBD.js} +1 -1
  175. package/dist/{layers.BNG9-t-U.js → layers.HLJCtZKR.js} +5 -5
  176. package/dist/{layers.DTHxplVc.js → layers.L8zpS39e.js} +1 -1
  177. package/dist/{layers.vhwfBfVO.js → layers.La9_RhzS.js} +1 -1
  178. package/dist/layers.LwuXnrVV.js +1 -0
  179. package/dist/{layers.CWVq7Uy7.js → layers.NyxoOheY.js} +1 -1
  180. package/dist/{layers.CGNxynSI.js → layers.PHBH_jv5.js} +1 -1
  181. package/dist/{layers.4UUvIK2t.js → layers.QNT0vjba.js} +1 -1
  182. package/dist/{layers.EffsiuNu.js → layers.R_WRqNBM.js} +1 -1
  183. package/dist/{layers.D4eP5NqW.js → layers.WrKONvAx.js} +1 -1
  184. package/dist/{layers.CVpip4qM.js → layers.ZOsPWpjF.js} +1 -1
  185. package/dist/{layers.CzbGQTNa.js → layers.ZX0sa40g.js} +1 -1
  186. package/dist/{layers.D1Ng1ixT.js → layers.ao5OlJwt.js} +1 -1
  187. package/dist/{layers.C5zCKOAF.js → layers.eAgubtQz.js} +1 -1
  188. package/dist/{layers.XVuP78OS.js → layers.eZC85wv2.js} +1 -1
  189. package/dist/{layers.eZOSE1Mz.js → layers.gBanBt1Q.js} +1 -1
  190. package/dist/{layers.zTwito3k.js → layers.gL4XlBSL.js} +1 -1
  191. package/dist/{layers.B8aPpU-3.js → layers.gexyL6xt.js} +1 -1
  192. package/dist/{layers.QU-k-nIw.js → layers.hdGM2zns.js} +1 -1
  193. package/dist/{layers.GNukBRwS.js → layers.iJbW6H2W.js} +1 -1
  194. package/dist/{layers.CLjq-kTO.js → layers.iQJZ_Xeu.js} +1 -1
  195. package/dist/{layers.CqeO-3EO.js → layers.kaRYlXdk.js} +1 -1
  196. package/dist/{layers.BxcAE7-A.js → layers.mQYFLWEM.js} +2 -2
  197. package/dist/{layers.BxM08fK-.js → layers.o3REqDRL.js} +1 -1
  198. package/dist/{layers.BDZwabym.js → layers.pZlo1ayW.js} +1 -1
  199. package/dist/{layers.WA_t21W5.js → layers.pjDEZw4_.js} +1 -1
  200. package/dist/{layers.qYo1swlB.js → layers.ptNr6_U6.js} +1 -1
  201. package/dist/{layers.BjygM-VR.js → layers.qYxvP8qW.js} +1 -1
  202. package/dist/{layers.DB2pNf2i.js → layers.rqkW9mFY.js} +1 -1
  203. package/dist/{layers.D0-QtSj4.js → layers.sczFo7uR.js} +1 -1
  204. package/dist/layers.tH0oZLYW.js +8 -0
  205. package/dist/{layers.O0qRaRpX.js → layers.uZoB4wRw.js} +1 -1
  206. package/dist/{layers.Zv74Kxrh.js → layers.vuLDwDZL.js} +1 -1
  207. package/dist/{layers.DFFWjOIN.js → layers.xxmjlO9V.js} +8 -8
  208. package/dist/layers.yrvXw0Eh.js +1 -0
  209. package/package.json +1 -1
  210. package/dist/layers.BohN9r_4.js +0 -8
  211. package/dist/layers.ByUMS4pV.js +0 -1
  212. package/dist/layers.CeEEuJcv.js +0 -1
  213. package/dist/layers.DRzWJs0T.js +0 -1
  214. package/dist/layers.xxa1nfz9.js +0 -6
@@ -1,11 +1,11 @@
1
1
  import { jsx as n, jsxs as N, Fragment as X } from "react/jsx-runtime";
2
- import { useState as y, useCallback as L, useRef as ne, useEffect as E, useMemo as ie, useContext as Ue } from "react";
2
+ import { useState as y, useCallback as L, useRef as ne, useEffect as O, useMemo as ie, useContext as xe } from "react";
3
3
  import { useTranslation as Y } from "react-i18next";
4
4
  import { useLexicalComposerContext as Z } from "@lexical/react/LexicalComposerContext";
5
- import { Menu as R, Flex as ee, Popover as z, Stack as et, Button as G, Box as Le, LoadingOverlay as tt } from "@mantine/core";
6
- import { $getNodeByKey as P, COMMAND_PRIORITY_LOW as ot, $setSelection as nt } from "lexical";
7
- import { z as it, B as rt, D as at, F as lt, G as Ne, J as oe, N as st, P as dt, L as re, K as ct, Q as ut, H as M, R as Ae, m as Re, S as Me, U as ze, W as O, w as We, X as pt, Y as mt, n as Se, Z as gt, C as Fe, _ as ht, a0 as ft, a1 as te, a2 as wt, a3 as kt, a4 as bt, a5 as vt, a6 as yt, a7 as It, a8 as Ct, y as Dt, k as Pe, O as Lt, a9 as Nt, aa as St, ab as Pt, V as Oe, ac as Ee, A as Ot } from "./layers.zbwA3qRl.js";
8
- import { AttachmentsGalleryModal as _e, showErrorNotification as Et } from "@layers-app/shared";
5
+ import { Menu as M, Flex as ee, Popover as W, Stack as tt, Button as G, Box as Le, LoadingOverlay as ot } from "@mantine/core";
6
+ import { $getNodeByKey as E, COMMAND_PRIORITY_LOW as nt, $setSelection as it } from "lexical";
7
+ import { D as rt, z as at, B as lt, F as st, G as dt, J as Ne, N as oe, P as ct, Q as ut, L as re, K as pt, R as mt, H as R, S as Ae, m as Me, U as Re, W as We, X as P, w as ze, Y as gt, Z as ft, n as Se, _ as ht, C as Fe, a0 as wt, a1 as bt, a2 as te, a3 as kt, a4 as vt, a5 as yt, a6 as It, a7 as Ct, a8 as Dt, a9 as Lt, y as Nt, k as Ee, O as St, aa as Et, ab as Pt, ac as Ot, V as Pe, ad as Oe, A as Tt } from "./layers.BtWXLFqX.js";
8
+ import { AttachmentsGalleryModal as _e, showErrorNotification as Ut } from "@layers-app/shared";
9
9
  import { useLexicalEditable as ae } from "@lexical/react/useLexicalEditable";
10
10
  import { useDisclosure as V } from "@mantine/hooks";
11
11
  import "@lexical/react/LexicalDecoratorBlockNode";
@@ -17,7 +17,13 @@ import "react-dom";
17
17
  import "@lexical/react/LexicalErrorBoundary";
18
18
  import "@lexical/react/LexicalBlockWithAlignableContents";
19
19
  import "@mantine/notifications";
20
- function xt(e, i) {
20
+ const xt = (e) => {
21
+ if (typeof e == "number") return e > 0;
22
+ if (e.includes("%")) return e !== rt;
23
+ const i = parseFloat(e);
24
+ return Number.isFinite(i) && i > 0;
25
+ };
26
+ function At(e, i) {
21
27
  const t = document.createElement("a");
22
28
  t.href = e, t.download = i, t.rel = "noopener", document.body.appendChild(t), t.click(), t.remove();
23
29
  }
@@ -35,27 +41,27 @@ async function se(e, i) {
35
41
  throw new Error("fetch failed");
36
42
  const r = await t.blob(), a = URL.createObjectURL(r);
37
43
  try {
38
- xt(a, i);
44
+ At(a, i);
39
45
  } finally {
40
46
  setTimeout(() => URL.revokeObjectURL(a), 0);
41
47
  }
42
48
  }
43
- function Tt({
49
+ function Mt({
44
50
  editor: e,
45
51
  nodeKey: i,
46
52
  href: t,
47
53
  onClose: r
48
54
  }) {
49
55
  const [a, d] = y(
50
- () => it(t)
51
- ), [l, c] = y(() => rt(t)), [D, b] = y(!1), p = L((u) => {
52
- d(u), b(!1);
56
+ () => at(t)
57
+ ), [l, c] = y(() => lt(t)), [D, k] = y(!1), p = L((u) => {
58
+ d(u), k(!1);
53
59
  }, []), m = L((u) => {
54
- c(u), b(!1);
55
- }, []), f = L(() => {
56
- const u = at(l.trim(), a);
57
- if (!u || !lt(u, a)) {
58
- b(!0);
60
+ c(u), k(!1);
61
+ }, []), h = L(() => {
62
+ const u = st(l.trim(), a);
63
+ if (!u || !dt(u, a)) {
64
+ k(!0);
59
65
  return;
60
66
  }
61
67
  Ne(e, i, oe(u)), r();
@@ -63,9 +69,9 @@ function Tt({
63
69
  Ne(e, i, ""), r();
64
70
  }, [e, i, r]), v = L(
65
71
  (u) => {
66
- u.key === "Enter" ? (u.preventDefault(), f()) : u.key === "Escape" && (u.preventDefault(), r());
72
+ u.key === "Enter" ? (u.preventDefault(), h()) : u.key === "Escape" && (u.preventDefault(), r());
67
73
  },
68
- [f, r]
74
+ [h, r]
69
75
  );
70
76
  return {
71
77
  linkType: a,
@@ -74,7 +80,7 @@ function Tt({
74
80
  onLinkTypeChange: p,
75
81
  onUrlInputChange: m,
76
82
  onUrlInputKeyDown: v,
77
- onSave: f,
83
+ onSave: h,
78
84
  onRemove: I
79
85
  };
80
86
  }
@@ -85,12 +91,12 @@ function de({
85
91
  onClose: r,
86
92
  mobile: a
87
93
  }) {
88
- const d = ne(null), l = Tt({ editor: e, nodeKey: i, href: t, onClose: r });
89
- return E(() => {
94
+ const d = ne(null), l = Mt({ editor: e, nodeKey: i, href: t, onClose: r });
95
+ return O(() => {
90
96
  var c;
91
97
  (c = d.current) == null || c.focus({ preventScroll: !0 });
92
98
  }, []), /* @__PURE__ */ n(
93
- st,
99
+ ct,
94
100
  {
95
101
  inputRef: d,
96
102
  linkUrl: l.linkUrl,
@@ -116,28 +122,28 @@ function je({
116
122
  onLinkAction: l
117
123
  }) {
118
124
  return /* @__PURE__ */ N(
119
- R,
125
+ M,
120
126
  {
121
127
  opened: e,
122
128
  onChange: i,
123
- transitionProps: dt,
129
+ transitionProps: ut,
124
130
  shadow: "md",
125
131
  position: "bottom-start",
126
132
  offset: 4,
127
133
  withinPortal: !0,
128
134
  closeOnItemClick: !0,
129
135
  children: [
130
- /* @__PURE__ */ n(R.Target, { children: /* @__PURE__ */ n(
136
+ /* @__PURE__ */ n(M.Target, { children: /* @__PURE__ */ n(
131
137
  re,
132
138
  {
133
139
  label: t("editor.toolbar.more"),
134
- icon: ct,
140
+ icon: pt,
135
141
  iconColor: "var(--mantine-color-gray-text)",
136
142
  "aria-label": t("editor.toolbar.more")
137
143
  }
138
144
  ) }),
139
145
  /* @__PURE__ */ N(
140
- R.Dropdown,
146
+ M.Dropdown,
141
147
  {
142
148
  p: 4,
143
149
  miw: 164,
@@ -145,9 +151,9 @@ function je({
145
151
  onMouseDown: (c) => c.preventDefault(),
146
152
  children: [
147
153
  l && /* @__PURE__ */ n(
148
- R.Item,
154
+ M.Item,
149
155
  {
150
- leftSection: /* @__PURE__ */ n(ee, { align: "center", justify: "center", c: "gray.6", children: /* @__PURE__ */ n(ut, { name: "link", size: 16 }) }),
156
+ leftSection: /* @__PURE__ */ n(ee, { align: "center", justify: "center", c: "gray.6", children: /* @__PURE__ */ n(mt, { name: "link", size: 16 }) }),
151
157
  onClick: (c) => {
152
158
  c.stopPropagation(), l();
153
159
  },
@@ -155,9 +161,9 @@ function je({
155
161
  }
156
162
  ),
157
163
  /* @__PURE__ */ n(
158
- R.Item,
164
+ M.Item,
159
165
  {
160
- leftSection: /* @__PURE__ */ n(ee, { align: "center", justify: "center", c: "gray.6", children: /* @__PURE__ */ n(M, { icon: Ae, size: 16 }) }),
166
+ leftSection: /* @__PURE__ */ n(ee, { align: "center", justify: "center", c: "gray.6", children: /* @__PURE__ */ n(R, { icon: Ae, size: 16 }) }),
161
167
  onClick: (c) => {
162
168
  c.stopPropagation(), r();
163
169
  },
@@ -165,10 +171,10 @@ function je({
165
171
  }
166
172
  ),
167
173
  /* @__PURE__ */ n(
168
- R.Item,
174
+ M.Item,
169
175
  {
170
176
  color: "red",
171
- leftSection: /* @__PURE__ */ n(ee, { align: "center", justify: "center", c: "red.6", children: /* @__PURE__ */ n(M, { icon: Re, size: 16 }) }),
177
+ leftSection: /* @__PURE__ */ n(ee, { align: "center", justify: "center", c: "red.6", children: /* @__PURE__ */ n(R, { icon: Me, size: 16 }) }),
172
178
  onClick: (c) => {
173
179
  c.stopPropagation(), a();
174
180
  },
@@ -188,7 +194,7 @@ const $e = ({
188
194
  setShown: t,
189
195
  id: r
190
196
  }) => {
191
- const [a, { open: d, close: l }] = V(!1), c = Me(), D = ie(() => [
197
+ const [a, { open: d, close: l }] = V(!1), c = Re(), D = ie(() => [
192
198
  {
193
199
  id: !r || r === "0" ? "" : r,
194
200
  Url: i ?? "",
@@ -224,7 +230,7 @@ const $e = ({
224
230
  re,
225
231
  {
226
232
  label: e("editor.image.preview"),
227
- icon: ze,
233
+ icon: We,
228
234
  iconColor: "var(--mantine-color-gray-text)",
229
235
  "aria-label": e("editor.image.preview"),
230
236
  onClick: () => {
@@ -233,24 +239,24 @@ const $e = ({
233
239
  }
234
240
  )
235
241
  ] });
236
- }, Ut = ({
242
+ }, Rt = ({
237
243
  nodeKey: e,
238
244
  src: i,
239
245
  href: t
240
246
  }) => {
241
- const [r] = Z(), a = ae(), [d, l] = y(!1), [c, D] = y(!1), [b, p] = y(!1), { t: m } = Y();
242
- E(() => {
243
- if (!b) return;
247
+ const [r] = Z(), a = ae(), [d, l] = y(!1), [c, D] = y(!1), [k, p] = y(!1), { t: m } = Y();
248
+ O(() => {
249
+ if (!k) return;
244
250
  const v = (u) => {
245
251
  const w = u.target;
246
252
  w != null && w.closest(".floating-link-dropdown") || w != null && w.closest(".floating-link-type-combobox-dropdown") || p(!1);
247
253
  };
248
254
  return document.addEventListener("pointerdown", v, !0), () => document.removeEventListener("pointerdown", v, !0);
249
- }, [b]);
250
- const f = L(() => {
255
+ }, [k]);
256
+ const h = L(() => {
251
257
  r.update(() => {
252
- const v = P(e);
253
- O(v) && v.remove();
258
+ const v = E(e);
259
+ P(v) && v.remove();
254
260
  });
255
261
  }, [r, e]), I = L(async () => {
256
262
  if (i)
@@ -260,9 +266,9 @@ const $e = ({
260
266
  }
261
267
  }, [i]);
262
268
  return /* @__PURE__ */ N(
263
- z,
269
+ W,
264
270
  {
265
- opened: b,
271
+ opened: k,
266
272
  onChange: p,
267
273
  position: "bottom-end",
268
274
  offset: 4,
@@ -271,7 +277,7 @@ const $e = ({
271
277
  withinPortal: !0,
272
278
  closeOnClickOutside: !1,
273
279
  children: [
274
- /* @__PURE__ */ n(z.Target, { children: /* @__PURE__ */ N(
280
+ /* @__PURE__ */ n(W.Target, { children: /* @__PURE__ */ N(
275
281
  "div",
276
282
  {
277
283
  className: `media-actions ${a ? "" : "media-actions--readonly"}`,
@@ -280,7 +286,7 @@ const $e = ({
280
286
  } }),
281
287
  a && /* @__PURE__ */ N(X, { children: [
282
288
  /* @__PURE__ */ n(
283
- We,
289
+ ze,
284
290
  {
285
291
  opened: d,
286
292
  setOpened: l,
@@ -298,7 +304,7 @@ const $e = ({
298
304
  onOpenChange: D,
299
305
  t: m,
300
306
  onDownload: () => void I(),
301
- onDelete: f,
307
+ onDelete: h,
302
308
  hasLink: !!t,
303
309
  onLinkAction: () => p(!0)
304
310
  }
@@ -308,7 +314,7 @@ const $e = ({
308
314
  }
309
315
  ) }),
310
316
  /* @__PURE__ */ n(
311
- z.Dropdown,
317
+ W.Dropdown,
312
318
  {
313
319
  className: `floating-link-dropdown floating-link-dropdown--${t ? "edit" : "create"}-mode`,
314
320
  "data-test-id": "floating-link-dropdown",
@@ -326,24 +332,24 @@ const $e = ({
326
332
  ]
327
333
  }
328
334
  );
329
- }, At = () => {
335
+ }, Wt = () => {
330
336
  };
331
- function Rt({ nodeKey: e, src: i, id: t, href: r }) {
332
- const { t: a } = Y(), [d] = Z(), l = ae(), [c, D] = y(!1), [b, p] = y(!1), [m, f] = y(!1);
333
- E(() => {
337
+ function zt({ nodeKey: e, src: i, id: t, href: r }) {
338
+ const { t: a } = Y(), [d] = Z(), l = ae(), [c, D] = y(!1), [k, p] = y(!1), [m, h] = y(!1);
339
+ O(() => {
334
340
  if (!m) return;
335
341
  const u = (w) => {
336
342
  const S = w.target;
337
- S != null && S.closest(".floating-link-dropdown") || S != null && S.closest(".floating-link-type-combobox-dropdown") || f(!1);
343
+ S != null && S.closest(".floating-link-dropdown") || S != null && S.closest(".floating-link-type-combobox-dropdown") || h(!1);
338
344
  };
339
345
  return document.addEventListener("pointerdown", u, !0), () => document.removeEventListener("pointerdown", u, !0);
340
346
  }, [m]);
341
347
  const I = L(() => {
342
348
  p(!1), d.update(() => {
343
- const u = P(e);
344
- if (!O(u)) return;
349
+ const u = E(e);
350
+ if (!P(u)) return;
345
351
  const w = u.getParent();
346
- pt(w) ? w.remove() : u.remove();
352
+ gt(w) ? w.remove() : u.remove();
347
353
  });
348
354
  }, [d, e]), v = L(async () => {
349
355
  if (i)
@@ -353,10 +359,10 @@ function Rt({ nodeKey: e, src: i, id: t, href: r }) {
353
359
  }
354
360
  }, [i]);
355
361
  return /* @__PURE__ */ N(
356
- z,
362
+ W,
357
363
  {
358
364
  opened: m,
359
- onChange: f,
365
+ onChange: h,
360
366
  position: "bottom-end",
361
367
  offset: 4,
362
368
  shadow: "md",
@@ -364,7 +370,7 @@ function Rt({ nodeKey: e, src: i, id: t, href: r }) {
364
370
  withinPortal: !0,
365
371
  closeOnClickOutside: !1,
366
372
  children: [
367
- /* @__PURE__ */ n(z.Target, { children: /* @__PURE__ */ N(
373
+ /* @__PURE__ */ n(W.Target, { children: /* @__PURE__ */ N(
368
374
  "div",
369
375
  {
370
376
  className: "media-actions visible",
@@ -379,10 +385,10 @@ function Rt({ nodeKey: e, src: i, id: t, href: r }) {
379
385
  },
380
386
  onClick: (u) => u.stopPropagation(),
381
387
  children: [
382
- /* @__PURE__ */ n($e, { t: a, src: i, setShown: At, id: t }),
388
+ /* @__PURE__ */ n($e, { t: a, src: i, setShown: Wt, id: t }),
383
389
  l && /* @__PURE__ */ N(X, { children: [
384
390
  /* @__PURE__ */ n(
385
- We,
391
+ ze,
386
392
  {
387
393
  opened: c,
388
394
  setOpened: D,
@@ -394,13 +400,13 @@ function Rt({ nodeKey: e, src: i, id: t, href: r }) {
394
400
  /* @__PURE__ */ n(
395
401
  je,
396
402
  {
397
- opened: b,
403
+ opened: k,
398
404
  onOpenChange: p,
399
405
  t: a,
400
406
  onDownload: () => void v(),
401
407
  onDelete: I,
402
408
  hasLink: !!r,
403
- onLinkAction: () => f(!0)
409
+ onLinkAction: () => h(!0)
404
410
  }
405
411
  )
406
412
  ] })
@@ -408,7 +414,7 @@ function Rt({ nodeKey: e, src: i, id: t, href: r }) {
408
414
  }
409
415
  ) }),
410
416
  /* @__PURE__ */ n(
411
- z.Dropdown,
417
+ W.Dropdown,
412
418
  {
413
419
  className: `floating-link-dropdown floating-link-dropdown--${r ? "edit" : "create"}-mode`,
414
420
  "data-test-id": "floating-link-dropdown",
@@ -418,7 +424,7 @@ function Rt({ nodeKey: e, src: i, id: t, href: r }) {
418
424
  editor: d,
419
425
  nodeKey: e,
420
426
  href: r,
421
- onClose: () => f(!1)
427
+ onClose: () => h(!1)
422
428
  }
423
429
  )
424
430
  }
@@ -427,10 +433,10 @@ function Rt({ nodeKey: e, src: i, id: t, href: r }) {
427
433
  }
428
434
  );
429
435
  }
430
- function Mt({ nodeKey: e, src: i, id: t, href: r }) {
431
- const { t: a } = Y(), [d] = Z(), l = ae(), c = Me(), [D, { open: b, close: p }] = V(!1), [m, { open: f, close: I }] = V(!1), [v, { open: u, close: w }] = V(!1), S = () => {
436
+ function Ft({ nodeKey: e, src: i, id: t, href: r }) {
437
+ const { t: a } = Y(), [d] = Z(), l = ae(), c = Re(), [D, { open: k, close: p }] = V(!1), [m, { open: h, close: I }] = V(!1), [v, { open: u, close: w }] = V(!1), S = () => {
432
438
  p(), u();
433
- }, W = ie(
439
+ }, z = ie(
434
440
  () => [
435
441
  {
436
442
  id: !t || t === "0" ? "" : t,
@@ -452,18 +458,18 @@ function Mt({ nodeKey: e, src: i, id: t, href: r }) {
452
458
  }
453
459
  ],
454
460
  [i, t]
455
- ), h = () => {
456
- p(), f();
457
- }, x = L(async () => {
461
+ ), f = () => {
462
+ p(), h();
463
+ }, T = L(async () => {
458
464
  if (p(), !!i)
459
465
  try {
460
466
  await se(i, le(i));
461
467
  } catch {
462
468
  }
463
- }, [i, p]), A = L(() => {
469
+ }, [i, p]), x = L(() => {
464
470
  p(), d.update(() => {
465
- const C = P(e);
466
- O(C) && C.remove();
471
+ const C = E(e);
472
+ P(C) && C.remove();
467
473
  });
468
474
  }, [d, e, p]);
469
475
  return /* @__PURE__ */ N(X, { children: [
@@ -483,10 +489,10 @@ function Mt({ nodeKey: e, src: i, id: t, href: r }) {
483
489
  re,
484
490
  {
485
491
  label: a("editor.toolbar.more"),
486
- icon: mt,
492
+ icon: ft,
487
493
  iconColor: "var(--mantine-color-gray-text)",
488
494
  "aria-label": a("editor.toolbar.more"),
489
- onClick: b
495
+ onClick: k
490
496
  }
491
497
  )
492
498
  }
@@ -495,8 +501,8 @@ function Mt({ nodeKey: e, src: i, id: t, href: r }) {
495
501
  _e,
496
502
  {
497
503
  opened: m,
498
- onOpenChange: (C) => C ? f() : I(),
499
- attachments: W,
504
+ onOpenChange: (C) => C ? h() : I(),
505
+ attachments: z,
500
506
  allowDownload: c
501
507
  }
502
508
  ),
@@ -506,7 +512,7 @@ function Mt({ nodeKey: e, src: i, id: t, href: r }) {
506
512
  opened: D,
507
513
  onClose: p,
508
514
  title: a("editor.image.mobileActions"),
509
- children: /* @__PURE__ */ N(et, { gap: 4, p: 0, children: [
515
+ children: /* @__PURE__ */ N(tt, { gap: 4, p: 0, children: [
510
516
  /* @__PURE__ */ n(
511
517
  G,
512
518
  {
@@ -516,11 +522,11 @@ function Mt({ nodeKey: e, src: i, id: t, href: r }) {
516
522
  fullWidth: !0,
517
523
  justify: "flex-start",
518
524
  bg: "var(--editor-action-bg)",
519
- onClick: h,
525
+ onClick: f,
520
526
  leftSection: /* @__PURE__ */ n(
521
- M,
527
+ R,
522
528
  {
523
- icon: ze,
529
+ icon: We,
524
530
  size: 16,
525
531
  color: "var(--mantine-color-dimmed)"
526
532
  }
@@ -539,9 +545,9 @@ function Mt({ nodeKey: e, src: i, id: t, href: r }) {
539
545
  bg: "var(--editor-action-bg)",
540
546
  onClick: S,
541
547
  leftSection: /* @__PURE__ */ n(
542
- M,
548
+ R,
543
549
  {
544
- icon: gt,
550
+ icon: ht,
545
551
  size: 16,
546
552
  color: "var(--mantine-color-dimmed)"
547
553
  }
@@ -558,9 +564,9 @@ function Mt({ nodeKey: e, src: i, id: t, href: r }) {
558
564
  fullWidth: !0,
559
565
  justify: "flex-start",
560
566
  bg: "var(--editor-action-bg)",
561
- onClick: () => void x(),
567
+ onClick: () => void T(),
562
568
  leftSection: /* @__PURE__ */ n(
563
- M,
569
+ R,
564
570
  {
565
571
  icon: Ae,
566
572
  size: 16,
@@ -579,11 +585,11 @@ function Mt({ nodeKey: e, src: i, id: t, href: r }) {
579
585
  fullWidth: !0,
580
586
  justify: "flex-start",
581
587
  bg: "var(--editor-action-bg)",
582
- onClick: A,
588
+ onClick: x,
583
589
  leftSection: /* @__PURE__ */ n(
584
- M,
590
+ R,
585
591
  {
586
- icon: Re,
592
+ icon: Me,
587
593
  size: 16,
588
594
  color: "var(--mantine-color-red-6)"
589
595
  }
@@ -614,7 +620,7 @@ function Mt({ nodeKey: e, src: i, id: t, href: r }) {
614
620
  )
615
621
  ] });
616
622
  }
617
- const xe = 75, Te = (e) => {
623
+ const Te = 75, Ue = (e) => {
618
624
  const {
619
625
  width: i,
620
626
  height: t,
@@ -624,10 +630,10 @@ const xe = 75, Te = (e) => {
624
630
  id: l,
625
631
  altText: c,
626
632
  imageRef: D,
627
- maxWidth: b,
633
+ maxWidth: k,
628
634
  aspectRatio: p,
629
635
  href: m
630
- } = e, f = ne(null);
636
+ } = e, h = ne(null);
631
637
  return /* @__PURE__ */ N(
632
638
  "div",
633
639
  {
@@ -642,7 +648,7 @@ const xe = 75, Te = (e) => {
642
648
  },
643
649
  children: [
644
650
  /* @__PURE__ */ n(
645
- tt,
651
+ ot,
646
652
  {
647
653
  visible: r,
648
654
  zIndex: 1e3,
@@ -660,15 +666,15 @@ const xe = 75, Te = (e) => {
660
666
  rel: m ? "noopener noreferrer" : void 0,
661
667
  draggable: !1,
662
668
  onMouseDown: m ? (I) => {
663
- f.current = { x: I.clientX, y: I.clientY };
669
+ h.current = { x: I.clientX, y: I.clientY };
664
670
  } : void 0,
665
671
  onClick: m ? (I) => {
666
672
  I.preventDefault();
667
- const v = f.current;
668
- f.current = null, !(v && Math.hypot(I.clientX - v.x, I.clientY - v.y) > 5) && window.open(oe(m), "_blank", "noopener,noreferrer");
673
+ const v = h.current;
674
+ h.current = null, !(v && Math.hypot(I.clientX - v.x, I.clientY - v.y) > 5) && window.open(oe(m), "_blank", "noopener,noreferrer");
669
675
  } : void 0,
670
676
  children: /* @__PURE__ */ n(
671
- zt,
677
+ _t,
672
678
  {
673
679
  className: null,
674
680
  src: d,
@@ -676,14 +682,14 @@ const xe = 75, Te = (e) => {
676
682
  imageRef: D,
677
683
  width: "inherit",
678
684
  height: "inherit",
679
- maxWidth: b || "auto",
685
+ maxWidth: k || "auto",
680
686
  id: l
681
687
  }
682
688
  )
683
689
  }
684
690
  ),
685
- Oe && /* @__PURE__ */ n(
686
- Mt,
691
+ Pe && /* @__PURE__ */ n(
692
+ Ft,
687
693
  {
688
694
  nodeKey: e.nodeKey,
689
695
  src: d,
@@ -691,8 +697,8 @@ const xe = 75, Te = (e) => {
691
697
  href: m
692
698
  }
693
699
  ),
694
- Ee && /* @__PURE__ */ n(
695
- Rt,
700
+ Oe && /* @__PURE__ */ n(
701
+ zt,
696
702
  {
697
703
  nodeKey: e.nodeKey,
698
704
  src: d,
@@ -700,12 +706,12 @@ const xe = 75, Te = (e) => {
700
706
  href: m
701
707
  }
702
708
  ),
703
- Ot && !Oe && !Ee && /* @__PURE__ */ n(Ut, { nodeKey: e.nodeKey, src: d, href: m })
709
+ Tt && !Pe && !Oe && /* @__PURE__ */ n(Rt, { nodeKey: e.nodeKey, src: d, href: m })
704
710
  ]
705
711
  }
706
712
  );
707
713
  };
708
- function zt({
714
+ function _t({
709
715
  altText: e,
710
716
  className: i,
711
717
  imageRef: t,
@@ -715,7 +721,7 @@ function zt({
715
721
  maxWidth: l,
716
722
  id: c
717
723
  }) {
718
- const [D, b] = y(!1);
724
+ const [D, k] = y(!1);
719
725
  return /* @__PURE__ */ n(
720
726
  "img",
721
727
  {
@@ -730,19 +736,19 @@ function zt({
730
736
  },
731
737
  onLoad: () => {
732
738
  r.includes("splash") ? setTimeout(() => {
733
- b(!0);
734
- }, 100) : b(!0);
739
+ k(!0);
740
+ }, 100) : k(!0);
735
741
  },
736
742
  draggable: "false",
737
743
  "data-id": c
738
744
  }
739
745
  );
740
746
  }
741
- function lo(e) {
742
- const { disable: i } = Ue(Fe);
743
- return i && ht.isPlaceholderSrc(e.src) ? null : /* @__PURE__ */ n(Wt, { ...e });
747
+ function uo(e) {
748
+ const { disable: i } = xe(Fe);
749
+ return i && wt.isPlaceholderSrc(e.src) ? null : /* @__PURE__ */ n(jt, { ...e });
744
750
  }
745
- function Wt({
751
+ function jt({
746
752
  src: e,
747
753
  altText: i,
748
754
  nodeKey: t,
@@ -752,32 +758,32 @@ function Wt({
752
758
  showCaption: l,
753
759
  caption: c,
754
760
  id: D,
755
- create: b,
761
+ create: k,
756
762
  alignment: p,
757
763
  imagePickerTab: m,
758
- aspectRatio: f,
764
+ aspectRatio: h,
759
765
  href: I
760
766
  }) {
761
- var be, ve;
762
- const v = ne(null), [u, w] = y(!0), [S, W] = y(!1), [h] = Z(), [x, A] = y(!0), [C, F] = y({
767
+ var ke, ve;
768
+ const v = ne(null), [u, w] = y(!0), [S, z] = y(!1), [f] = Z(), [T, x] = y(!0), [C, F] = y({
763
769
  width: 0,
764
770
  height: 0
765
- }), { start: ce, cancel: ue } = ft(), [Ft, _] = y(0), {
771
+ }), { start: ce, cancel: ue } = bt(), [$t, _] = y(0), {
766
772
  fetchUploadMedia: j,
767
773
  fetchDeleteMedia: pe,
768
- maxFileSize: _t,
769
- imperativeHandleRef: T,
770
- disable: Be
771
- } = Ue(Fe), $ = te.has(e) && (((be = te.get(e)) == null ? void 0 : be.mediaNodeKeys.length) === 0 || ((ve = te.get(e)) == null ? void 0 : ve.mediaNodeKeys.length) === void 0 || e.trim() === ""), { t: B } = Y(), me = (o) => {
774
+ maxFileSize: Ht,
775
+ imperativeHandleRef: U,
776
+ disable: He
777
+ } = xe(Fe), $ = te.has(e) && (((ke = te.get(e)) == null ? void 0 : ke.mediaNodeKeys.length) === 0 || ((ve = te.get(e)) == null ? void 0 : ve.mediaNodeKeys.length) === void 0 || e.trim() === ""), { t: H } = Y(), me = (o) => {
772
778
  if (typeof o == "number") return o > 0 ? o : null;
773
779
  if (typeof o == "string" && !o.includes("%")) {
774
780
  const g = parseFloat(o);
775
781
  return Number.isFinite(g) && g > 0 ? g : null;
776
782
  }
777
783
  return null;
778
- }, U = me(r), ge = me(a), he = U && ge ? U / ge : void 0, [He, Ge] = y(
784
+ }, A = me(r), ge = me(a), Be = xt(r), fe = A && ge ? A / ge : void 0, [Ge, Ve] = y(
779
785
  void 0
780
- ), fe = ie(() => {
786
+ ), he = ie(() => {
781
787
  try {
782
788
  const o = parseFloat(
783
789
  localStorage.getItem("layers-img-ratio:" + e) || ""
@@ -786,13 +792,13 @@ function Wt({
786
792
  } catch {
787
793
  return;
788
794
  }
789
- }, [e]), Ve = he ?? f ?? fe ?? He, [Xe, J] = y(!1), Ye = !Xe && !he && (f ?? fe) != null, [jt, Ze] = y(0);
790
- E(() => h.registerDecoratorListener(() => {
791
- Ze((o) => o + 1);
792
- }), [$]), E(() => {
793
- const o = h.getElementByKey(t);
795
+ }, [e]), Xe = fe ?? h ?? he ?? Ge, [Ye, J] = y(!1), Ze = !Ye && !fe && (h ?? he) != null, [Bt, Je] = y(0);
796
+ O(() => f.registerDecoratorListener(() => {
797
+ Je((o) => o + 1);
798
+ }), [$]), O(() => {
799
+ const o = f.getElementByKey(t);
794
800
  o && (o.style.removeProperty("aspect-ratio"), o.style.removeProperty("width"));
795
- }, [h, t]), E(() => {
801
+ }, [f, t]), O(() => {
796
802
  if (!e || e.startsWith("data:image/") || !e.trim()) {
797
803
  w(!1);
798
804
  return;
@@ -801,15 +807,15 @@ function Wt({
801
807
  o.src = e, o.onload = () => {
802
808
  if (w(!1), o.naturalWidth) {
803
809
  const g = o.naturalWidth / o.naturalHeight;
804
- if (Ge(g), o.naturalWidth >= 100)
810
+ if (Ve(g), o.naturalWidth >= 100)
805
811
  try {
806
812
  localStorage.setItem("layers-img-ratio:" + e, String(g));
807
813
  } catch {
808
814
  }
809
- !f && o.naturalWidth >= 100 && h.update(
815
+ !h && o.naturalWidth >= 100 && f.update(
810
816
  () => {
811
- const s = P(t);
812
- O(s) && s.getAspectRatio() == null && s.setAspectRatio(g);
817
+ const s = E(t);
818
+ P(s) && s.getAspectRatio() == null && s.setAspectRatio(g);
813
819
  },
814
820
  { tag: "history-merge" }
815
821
  );
@@ -818,156 +824,156 @@ function Wt({
818
824
  w(!1);
819
825
  };
820
826
  }, [e, $]);
821
- const Je = (o, g) => {
822
- h.update(() => {
823
- nt(null);
824
- const s = P(t);
825
- O(s) && s.setWidthAndHeight(o, g);
827
+ const Qe = (o, g) => {
828
+ f.update(() => {
829
+ it(null);
830
+ const s = E(t);
831
+ P(s) && s.setWidthAndHeight(o, g);
826
832
  });
827
- }, { historyState: we } = wt(), {
828
- settings: { showNestedEditorTreeView: ke }
829
- } = kt();
830
- function Qe(o) {
833
+ }, { historyState: we } = kt(), {
834
+ settings: { showNestedEditorTreeView: be }
835
+ } = vt();
836
+ function qe(o) {
831
837
  return new Promise((g, s) => {
832
- if (Nt(o)) {
833
- const H = St(o);
834
- g(H ? Pt(H) : { width: 0, height: 0 });
838
+ if (Et(o)) {
839
+ const B = Pt(o);
840
+ g(B ? Ot(B) : { width: 0, height: 0 });
835
841
  return;
836
842
  }
837
- const k = new Image();
838
- k.src = o, k.onload = () => {
839
- g({ width: k.width, height: k.height });
840
- }, k.onerror = () => {
843
+ const b = new Image();
844
+ b.src = o, b.onload = () => {
845
+ g({ width: b.width, height: b.height });
846
+ }, b.onerror = () => {
841
847
  s(new Error("Failed to load image"));
842
848
  };
843
849
  });
844
850
  }
845
- E(() => {
846
- let o = r, g = a, s = xe;
851
+ O(() => {
852
+ let o = r, g = a, s = Te;
847
853
  if ((e.includes("unsplash") ? e.trim() : !$ && e.trim() || e.includes("upload-src-editor")) && e !== "upload") {
848
- if (U != null && U >= s) {
849
- A(!1), F({ width: U, height: U }), J(!0);
854
+ if (A != null && A >= s) {
855
+ x(!1), F({ width: A, height: A }), J(!0);
850
856
  return;
851
857
  }
852
- Qe(e).then(({ width: k, height: H }) => {
858
+ qe(e).then(({ width: b, height: B }) => {
853
859
  var ye, Ie;
854
- if (typeof o == "number" && o < s && k < s)
855
- A(!0), F({
860
+ if (typeof o == "number" && o < s && b < s)
861
+ x(!0), F({
856
862
  width: o,
857
863
  height: g
858
864
  });
859
- else if (k < s)
860
- A(!0), F({
861
- width: k,
862
- height: H
865
+ else if (b < s)
866
+ x(!0), F({
867
+ width: b,
868
+ height: B
863
869
  });
864
870
  else if (F({
865
- width: k,
866
- height: k
867
- }), A(!1), U == null) {
868
- const K = ((Ie = (ye = h.getElementByKey(t)) == null ? void 0 : ye.parentElement) == null ? void 0 : Ie.getBoundingClientRect().width) ?? 0;
869
- if (K > 0 && k < K) {
870
- const Ce = k / K * 100;
871
- h.update(
871
+ width: b,
872
+ height: b
873
+ }), x(!1), !Be) {
874
+ const K = ((Ie = (ye = f.getElementByKey(t)) == null ? void 0 : ye.parentElement) == null ? void 0 : Ie.getBoundingClientRect().width) ?? 0;
875
+ if (K > 0 && b < K) {
876
+ const Ce = b / K * 100;
877
+ f.update(
872
878
  () => {
873
- const De = P(t);
874
- O(De) && De.setWidthAndHeight(Ce, Ce);
879
+ const De = E(t);
880
+ P(De) && De.setWidthAndHeight(Ce, Ce);
875
881
  },
876
882
  { tag: "history-merge" }
877
883
  );
878
884
  }
879
885
  }
880
886
  J(!0);
881
- }).catch((k) => {
882
- J(!0), console.warn("Ошибка при загрузке изображения:", k.message);
887
+ }).catch((b) => {
888
+ J(!0), console.warn("Ошибка при загрузке изображения:", b.message);
883
889
  });
884
890
  }
885
- }, [e, $]), E(() => {
886
- C.width && C.height && x && h.update(() => {
887
- const o = P(t);
888
- O(o) && o.setWidthAndHeight(C.width, C.height);
891
+ }, [e, $]), O(() => {
892
+ C.width && C.height && T && f.update(() => {
893
+ const o = E(t);
894
+ P(o) && o.setWidthAndHeight(C.width, C.height);
889
895
  });
890
- }, [C.width, C.height, x]);
891
- const qe = L(
892
- (o) => bt(h, t, o),
893
- [h, t]
896
+ }, [C.width, C.height, T]);
897
+ const Ke = L(
898
+ (o) => yt(f, t, o),
899
+ [f, t]
894
900
  ), Q = L(
895
901
  (o, g) => {
896
- W(!1), w(!1), h.update(() => {
897
- const s = P(t);
898
- O(s) && (s.setSrc(o), s.setId(g));
902
+ z(!1), w(!1), f.update(() => {
903
+ const s = E(t);
904
+ P(s) && (s.setSrc(o), s.setId(g));
899
905
  });
900
906
  },
901
- [h, t]
902
- ), Ke = L(() => {
903
- ue(), W(!1), w(!1), _(0);
907
+ [f, t]
908
+ ), et = L(() => {
909
+ ue(), z(!1), w(!1), _(0);
904
910
  }, [ue]), q = L(
905
911
  (o) => {
906
- W(!0), w(!0);
912
+ z(!0), w(!0);
907
913
  const g = ce();
908
914
  j && j(
909
915
  o[0],
910
- (s, k) => {
911
- Q(s, k), _(0);
916
+ (s, b) => {
917
+ Q(s, b), _(0);
912
918
  },
913
919
  (s) => {
914
- s && Et({
915
- message: B("editor.gallery.errorFile")
920
+ s && Ut({
921
+ message: H("editor.gallery.errorFile")
916
922
  }), _(0), Q(e.startsWith("blob:") ? "upload" : "", "");
917
923
  },
918
924
  g,
919
925
  (s) => {
920
926
  _(s);
921
927
  },
922
- h.getEditorState().read(() => {
923
- const s = P(t);
924
- return O(s) ? s.getId() : void 0;
928
+ f.getEditorState().read(() => {
929
+ const s = E(t);
930
+ return P(s) ? s.getId() : void 0;
925
931
  })
926
932
  );
927
933
  },
928
- [h, j, t, ce, B, Q, e]
934
+ [f, j, t, ce, H, Q, e]
929
935
  );
930
- return E(() => h.registerCommand(
931
- vt,
932
- (o) => !e.startsWith("blob:") && e !== "upload" || o.targetNodeKey !== t ? !1 : (q(o.files), !0),
933
- ot
934
- ), [h, q, t, e]), !e || e === "upload" ? S ? /* @__PURE__ */ n(Le, { "data-editor-image-picker-drop-root": !0, w: "100%", children: /* @__PURE__ */ n(yt, { onCancel: Ke }) }) : /* @__PURE__ */ n(Le, { "data-editor-image-picker-drop-root": !0, w: "100%", children: /* @__PURE__ */ n(
936
+ return O(() => f.registerCommand(
935
937
  It,
938
+ (o) => !e.startsWith("blob:") && e !== "upload" || o.targetNodeKey !== t ? !1 : (q(o.files), !0),
939
+ nt
940
+ ), [f, q, t, e]), !e || e === "upload" ? S ? /* @__PURE__ */ n(Le, { "data-editor-image-picker-drop-root": !0, w: "100%", children: /* @__PURE__ */ n(Ct, { onCancel: et }) }) : /* @__PURE__ */ n(Le, { "data-editor-image-picker-drop-root": !0, w: "100%", children: /* @__PURE__ */ n(
941
+ Dt,
936
942
  {
937
943
  inline: !0,
938
944
  nodeKey: t,
939
945
  defaultTabValue: m,
940
- onWriteTabToNode: qe,
946
+ onWriteTabToNode: Ke,
941
947
  onUpload: (o) => {
942
- var s, k;
948
+ var s, b;
943
949
  if (!j || !o.length) return;
944
950
  q([o[0]]);
945
951
  const g = o.slice(1);
946
- g.length && ((k = (s = T == null ? void 0 : T.current) == null ? void 0 : s.insertImages) == null || k.call(s, g));
952
+ g.length && ((b = (s = U == null ? void 0 : U.current) == null ? void 0 : s.insertImages) == null || b.call(s, g));
947
953
  },
948
954
  popoverProps: {
949
955
  opened: !0,
950
956
  position: "bottom",
951
- zIndex: Ct
957
+ zIndex: Lt
952
958
  },
953
959
  onChange: (o) => {
954
- h.update(() => {
955
- const g = P(t);
956
- O(g) && g.setSrc(o);
960
+ f.update(() => {
961
+ const g = E(t);
962
+ P(g) && g.setSrc(o);
957
963
  });
958
964
  }
959
965
  }
960
- ) }) : x && !Ye ? /* @__PURE__ */ n(
961
- Te,
966
+ ) }) : T && !Ze ? /* @__PURE__ */ n(
967
+ Ue,
962
968
  {
963
969
  width: C.width,
964
970
  height: C.height,
965
971
  isLoading: u,
966
972
  isError: !1,
967
- isIcon: x,
973
+ isIcon: T,
968
974
  src: e,
969
975
  id: D,
970
- editor: h,
976
+ editor: f,
971
977
  nodeKey: t,
972
978
  fetchDeleteMedia: pe,
973
979
  altText: i,
@@ -977,39 +983,39 @@ function Wt({
977
983
  caption: c,
978
984
  isCollabActive: !1,
979
985
  historyState: we,
980
- showNestedEditorTreeView: ke,
981
- t: B,
986
+ showNestedEditorTreeView: be,
987
+ t: H,
982
988
  href: I
983
989
  }
984
990
  ) : /* @__PURE__ */ n(
985
- Dt,
991
+ Nt,
986
992
  {
987
- editor: h,
988
- isIcon: x,
989
- minWidthPx: xe,
990
- width: Pe(r),
991
- height: Pe(a),
993
+ editor: f,
994
+ isIcon: T,
995
+ minWidthPx: Te,
996
+ width: Ee(r),
997
+ height: Ee(a),
992
998
  initialWidth: C.width || "",
993
999
  initialHeight: C.height || "",
994
- onResizeEnd: Je,
1000
+ onResizeEnd: Qe,
995
1001
  alignment: p,
996
- disable: Be,
1002
+ disable: He,
997
1003
  onRegisterDecoratorEnter: (o) => {
998
- T != null && T.current && (T.current.decoratorEnterAction = o);
1004
+ U != null && U.current && (U.current.decoratorEnterAction = o);
999
1005
  },
1000
- onActivate: () => h.dispatchCommand(Lt, "show_menu"),
1006
+ onActivate: () => f.dispatchCommand(St, "show_menu"),
1001
1007
  children: /* @__PURE__ */ n(
1002
- Te,
1008
+ Ue,
1003
1009
  {
1004
1010
  width: "inherit",
1005
1011
  height: "inherit",
1006
- aspectRatio: Ve,
1012
+ aspectRatio: Xe,
1007
1013
  isLoading: u,
1008
1014
  isError: !1,
1009
- isIcon: x,
1015
+ isIcon: T,
1010
1016
  src: e,
1011
1017
  id: D,
1012
- editor: h,
1018
+ editor: f,
1013
1019
  nodeKey: t,
1014
1020
  fetchDeleteMedia: pe,
1015
1021
  altText: i,
@@ -1019,8 +1025,8 @@ function Wt({
1019
1025
  caption: c,
1020
1026
  isCollabActive: !1,
1021
1027
  historyState: we,
1022
- showNestedEditorTreeView: ke,
1023
- t: B,
1028
+ showNestedEditorTreeView: be,
1029
+ t: H,
1024
1030
  href: I
1025
1031
  }
1026
1032
  )
@@ -1028,5 +1034,5 @@ function Wt({
1028
1034
  );
1029
1035
  }
1030
1036
  export {
1031
- lo as default
1037
+ uo as default
1032
1038
  };