reactjs-tiptap-editor 0.0.51 → 0.0.53

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.
@@ -1,51 +1,51 @@
1
- var jn = Object.defineProperty;
2
- var Fn = (e, t, i) => t in e ? jn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
3
- var me = (e, t, i) => Fn(e, typeof t != "symbol" ? t + "" : t, i);
1
+ var Bn = Object.defineProperty;
2
+ var jn = (e, t, i) => t in e ? Bn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
3
+ var fe = (e, t, i) => jn(e, typeof t != "symbol" ? t + "" : t, i);
4
4
  import { jsxs as u, jsx as r, Fragment as q } from "react/jsx-runtime";
5
5
  import * as j from "react";
6
- import Pe, { useState as w, useRef as X, useEffect as z, useCallback as M, useMemo as O, Fragment as nt, forwardRef as Tt, useImperativeHandle as Lt } from "react";
6
+ import Pe, { useState as w, useRef as X, useEffect as z, useCallback as M, useMemo as O, Fragment as nt, forwardRef as Nt, useImperativeHandle as Tt } from "react";
7
7
  import "@radix-ui/react-toast";
8
- import { ChevronRight as Un, Check as Gi, Circle as Vn, ChevronDown as At, ChevronUp as Zi, HelpCircle as Ji, Pencil as Xi, Trash2 as Yi, X as Wn, Plus as Qi, Bold as qn, LoaderCircle as Kn, Italic as Gn, Underline as Zn, Quote as Jn, Strikethrough as Xn, Minus as Yn, Eraser as Qn, PaintRoller as er, Redo2 as tr, Undo2 as ir, Subscript as nr, Superscript as rr, Code as ar, CodeXml as or, Type as cr, IndentIncrease as sr, IndentDecrease as lr, List as dr, ListOrdered as hr, ListTodo as ur, Link as mr, ImageUp as fr, Video as gr, Maximize as xr, Minimize as pr, Table as br, Sparkles as wr, Unlink as _r, BetweenHorizonalEnd as vr, BetweenHorizonalStart as yr, BetweenVerticalStart as kr, BetweenVerticalEnd as Cr, TableCellsMerge as Nr, TableCellsSplit as Tr, Trash as Lr, Replace as yi, ChevronsUpDown as Ar, Heading1 as Sr, Heading2 as Mr, Heading3 as Ir, Heading4 as zr, Heading5 as Hr, Heading6 as Er, Columns2 as ki, Columns3 as Rr, Columns4 as Or, GripVertical as Pr, Copy as en, Clipboard as Dr, PanelLeft as $r, PanelRight as Br, Frame as jr, SmilePlus as Fr, SmilePlusIcon as Ur, Sigma as Vr, BookMarked as Wr, ZoomIn as qr, ZoomOut as Kr, Settings as Gr, Eye as Zr, Paperclip as Jr, CropIcon as Xr, CopyCheck as Yr, Clock3 as Qr, Laugh as ea, LucideTableProperties as ta, LucideSheet as ia, LucideImage as na, LucideFile as ra, LucideVideo as aa, LucideAudioLines as oa } from "lucide-react";
9
- import { B as he, N as ne, a as ce, m as se, R as ue, n as Xt, u as ca, E as sa, i as la, b as da, c as ha, I as ua, U as ma, S as fa, C as ga, f as et, d as xa, e as pa, F as ba, H as wa, T as _a, g as Z, h as va, j as ya, k as ka, O as Ca, l as Na, o as Ta, p as La, L as Aa, q as Sa, r as Ma, s as Ia, D as za, t as vt, P as Ha, v as Ea, w as Ra, G as Oa, x as Pa, y as Da, z as $a, A as Ba, J as ja, K as Fa, M as tn, Q as nn, V as rn, W as Yt, X as Qt, Y as Ua, Z as Va, _ as Wa, $ as qa, a0 as Ka, a1 as Ci } from "./tiptap-BjeL17_y.js";
10
- import { ah as Ga, ai as ee, aj as ei, ak as ti, al as Za, am as an, an as Ja, ao as Ne, e as St, d as Te, ap as on, aq as ii, ar as Xa, P as pe, a as be, Z as De, _ as Be, as as Ya, at as yt, au as cn, ae as Qa } from "./vendor-CXgFM3bq.js";
11
- import { bundledThemes as sn, bundledLanguages as ln, createHighlighter as eo } from "shiki";
12
- import { u as F, C as to, E as io, l as W, B as no, I as kt, V as Ft, M as ro, D as dn, a as ao, b as oo, c as Ni, d as hn, e as co, f as je, g as Fe, h as ni, T as mt, i as ft, j as gt } from "./locales-CV1FzvUW.js";
8
+ import { ChevronRight as Fn, Check as qi, Circle as Un, ChevronDown as Lt, ChevronUp as Ki, HelpCircle as Gi, Pencil as Zi, Trash2 as Ji, X as Vn, Plus as Xi, Bold as Wn, LoaderCircle as qn, Italic as Kn, Underline as Gn, Quote as Zn, Strikethrough as Jn, Minus as Xn, Eraser as Yn, PaintRoller as Qn, Redo2 as er, Undo2 as tr, Subscript as ir, Superscript as nr, Code as rr, CodeXml as ar, Type as or, IndentIncrease as cr, IndentDecrease as sr, List as lr, ListOrdered as dr, ListTodo as hr, Link as ur, ImageUp as mr, Video as fr, Maximize as gr, Minimize as xr, Table as pr, Sparkles as br, Unlink as wr, BetweenHorizonalEnd as _r, BetweenHorizonalStart as vr, BetweenVerticalStart as yr, BetweenVerticalEnd as kr, TableCellsMerge as Cr, TableCellsSplit as Nr, Trash as Tr, Replace as _i, ChevronsUpDown as Lr, Heading1 as Ar, Heading2 as Sr, Heading3 as Mr, Heading4 as Ir, Heading5 as zr, Heading6 as Hr, Columns2 as vi, Columns3 as Er, Columns4 as Rr, GripVertical as Or, Copy as Yi, Clipboard as Pr, PanelLeft as Dr, PanelRight as $r, Frame as Br, SmilePlus as jr, SmilePlusIcon as Fr, Sigma as Ur, BookMarked as Vr, ZoomIn as Wr, ZoomOut as qr, Settings as Kr, Eye as Gr, Paperclip as Zr, CropIcon as Jr, CopyCheck as Xr, Clock3 as Yr, Laugh as Qr, LucideTableProperties as ea, LucideSheet as ta, LucideImage as ia, LucideFile as na, LucideVideo as ra, LucideAudioLines as aa } from "lucide-react";
9
+ import { B as ue, N as ne, a as ce, m as se, R as me, n as Xt, u as oa, E as ca, i as sa, b as la, c as da, I as ha, U as ua, S as ma, C as fa, f as et, d as ga, e as xa, F as pa, H as ba, T as wa, g as Z, h as _a, j as va, k as ya, O as ka, l as Ca, o as Na, p as Ta, L as La, q as Aa, r as Sa, s as Ma, D as Ia, t as vt, P as za, v as Ha, w as Ea, G as Ra, x as Oa, y as Pa, z as Da, A as $a, J as Ba, K as ja, M as Qi, Q as en, V as tn, W as Yt, X as Qt, Y as Fa, Z as Ua, _ as Va, $ as Wa, a0 as qa, a1 as yi } from "./tiptap-BjeL17_y.js";
10
+ import { ah as Ka, ai as ee, aj as ei, ak as ti, al as Ga, am as nn, an as Za, ao as Le, e as At, d as Ae, ap as rn, aq as ii, ar as Ja, P as be, a as we, Z as De, _ as Be, as as Xa, at as yt, au as an, ae as Ya } from "./vendor-CXgFM3bq.js";
11
+ import { bundledThemes as on, bundledLanguages as cn, createHighlighter as Qa } from "shiki";
12
+ import { u as F, C as eo, E as to, l as W, B as io, I as kt, V as jt, M as no, D as sn, a as ro, b as ao, c as ki, d as ln, e as oo, f as je, g as Fe, h as ni, T as mt, i as ft, j as gt } from "./locales-Bl_k4WJe.js";
13
13
  import * as G from "@radix-ui/react-select";
14
14
  import { Slot as ri } from "@radix-ui/react-slot";
15
- import ai, { sticky as so } from "tippy.js";
15
+ import ai, { sticky as co } from "tippy.js";
16
16
  import { flushSync as Ue } from "react-dom";
17
- import lo from "react-image-crop";
17
+ import so from "react-image-crop";
18
18
  import oi from "scroll-into-view-if-needed";
19
- import * as Le from "@radix-ui/react-tabs";
20
- import { defaultNodes as _e, DocxSerializer as ho, defaultMarks as uo } from "prosemirror-docx";
21
- import { Packer as mo } from "docx";
19
+ import * as Se from "@radix-ui/react-tabs";
20
+ import { defaultNodes as ye, DocxSerializer as lo, defaultMarks as ho } from "prosemirror-docx";
21
+ import { Packer as uo } from "docx";
22
22
  import Ct from "mermaid";
23
23
  import * as oe from "@radix-ui/react-dialog";
24
24
  import ci from "katex";
25
- import { proxy as fo, useSnapshot as go } from "valtio";
25
+ import { proxy as mo, useSnapshot as fo } from "valtio";
26
26
  import * as tt from "@radix-ui/react-popover";
27
- import * as un from "@radix-ui/react-label";
28
- import { Resizable as mn } from "re-resizable";
29
- import * as fn from "@radix-ui/react-separator";
30
- import { HexColorPicker as xo } from "react-colorful";
31
- import { TextAlignCenterIcon as po, TextAlignJustifyIcon as bo, TextAlignLeftIcon as wo, TextAlignRightIcon as _o } from "@radix-ui/react-icons";
32
- import * as Ut from "@radix-ui/react-switch";
33
- import { DragHandlePlugin as vo, dragHandlePluginDefaultKey as yo } from "echo-drag-handle-plugin";
27
+ import * as dn from "@radix-ui/react-label";
28
+ import { Resizable as hn } from "re-resizable";
29
+ import * as un from "@radix-ui/react-separator";
30
+ import { HexColorPicker as go } from "react-colorful";
31
+ import { TextAlignCenterIcon as xo, TextAlignJustifyIcon as po, TextAlignLeftIcon as bo, TextAlignRightIcon as wo } from "@radix-ui/react-icons";
32
+ import * as Ft from "@radix-ui/react-switch";
33
+ import { DragHandlePlugin as _o, dragHandlePluginDefaultKey as vo } from "echo-drag-handle-plugin";
34
34
  import * as K from "@radix-ui/react-dropdown-menu";
35
35
  import * as rt from "@radix-ui/react-tooltip";
36
- import * as gn from "@radix-ui/react-toggle";
37
- let Et;
38
- function Rt() {
39
- return Et === void 0 && (Et = navigator.platform.includes("Mac")), Et;
36
+ import * as mn from "@radix-ui/react-toggle";
37
+ let Ht;
38
+ function Et() {
39
+ return Ht === void 0 && (Ht = navigator.platform.includes("Mac")), Ht;
40
40
  }
41
- function Mt(e) {
42
- return `${e}`.toLowerCase() === "mod" ? Rt() ? "⌘" : "Ctrl" : `${e}`.toLowerCase() === "alt" ? Rt() ? "⌥" : "Alt" : `${e}`.toLowerCase() === "shift" ? Rt() ? "⇧" : "Shift" : e;
41
+ function St(e) {
42
+ return `${e}`.toLowerCase() === "mod" ? Et() ? "⌘" : "Ctrl" : `${e}`.toLowerCase() === "alt" ? Et() ? "⌥" : "Alt" : `${e}`.toLowerCase() === "shift" ? Et() ? "⇧" : "Shift" : e;
43
43
  }
44
- function It(e) {
45
- return e.map(Mt).join(" ");
44
+ function Mt(e) {
45
+ return e.map(St).join(" ");
46
46
  }
47
47
  function P(...e) {
48
- return Ga(ee(e));
48
+ return Ka(ee(e));
49
49
  }
50
50
  const _ = Pe.forwardRef(
51
51
  (e, t) => {
@@ -85,7 +85,7 @@ const _ = Pe.forwardRef(
85
85
  ) }),
86
86
  n && /* @__PURE__ */ r(Ie, { ...s, children: /* @__PURE__ */ u("div", { className: "richtext-flex richtext-flex-col richtext-items-center richtext-text-center richtext-max-w-24", children: [
87
87
  /* @__PURE__ */ r("div", { children: n }),
88
- !!(c != null && c.length) && /* @__PURE__ */ r("span", { children: It(c) })
88
+ !!(c != null && c.length) && /* @__PURE__ */ r("span", { children: Mt(c) })
89
89
  ] }) })
90
90
  ] });
91
91
  }
@@ -110,7 +110,7 @@ const _ = Pe.forwardRef(
110
110
  ) }),
111
111
  /* @__PURE__ */ r(Ie, { children: /* @__PURE__ */ u("div", { className: "richtext-flex richtext-flex-col richtext-items-center richtext-text-center richtext-max-w-24", children: [
112
112
  (t == null ? void 0 : t.tooltip) && /* @__PURE__ */ r("div", { children: t == null ? void 0 : t.tooltip }),
113
- /* @__PURE__ */ r("div", { className: "richtext-flex", children: !!((o = t == null ? void 0 : t.shortcutKeys) != null && o.length) && /* @__PURE__ */ r("span", { children: It(t == null ? void 0 : t.shortcutKeys) }) })
113
+ /* @__PURE__ */ r("div", { className: "richtext-flex", children: !!((o = t == null ? void 0 : t.shortcutKeys) != null && o.length) && /* @__PURE__ */ r("span", { children: Mt(t == null ? void 0 : t.shortcutKeys) }) })
114
114
  ] }) })
115
115
  ] });
116
116
  }
@@ -134,11 +134,11 @@ function at(e, t) {
134
134
  }
135
135
  return a;
136
136
  }
137
- function ko(e) {
137
+ function yo(e) {
138
138
  return e;
139
139
  }
140
140
  function ot(e, t, i, n) {
141
- const a = ko, [o, c] = w(a(i)), s = X(o);
141
+ const a = yo, [o, c] = w(a(i)), s = X(o);
142
142
  return z(() => {
143
143
  const h = () => {
144
144
  const l = { ...i, ...e.getAttributes(t) };
@@ -167,7 +167,7 @@ const ct = j.forwardRef(
167
167
  )
168
168
  );
169
169
  ct.displayName = "Textarea";
170
- const Co = ti(
170
+ const ko = ti(
171
171
  "richtext-inline-flex richtext-items-center richtext-justify-center richtext-whitespace-nowrap richtext-rounded-md richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-2 disabled:richtext-pointer-events-none disabled:richtext-opacity-50",
172
172
  {
173
173
  variants: {
@@ -195,14 +195,14 @@ const Co = ti(
195
195
  ({ className: e, variant: t, size: i, asChild: n = !1, ...a }, o) => /* @__PURE__ */ r(
196
196
  n ? ri : "button",
197
197
  {
198
- className: P(Co({ variant: t, size: i, className: e })),
198
+ className: P(ko({ variant: t, size: i, className: e })),
199
199
  ref: o,
200
200
  ...a
201
201
  }
202
202
  )
203
203
  );
204
204
  U.displayName = "Button";
205
- const Ae = K.Root, Se = K.Trigger, Ti = K.Portal, Li = K.Sub, Vt = j.forwardRef(({ className: e, inset: t, children: i, ...n }, a) => /* @__PURE__ */ u(
205
+ const _e = K.Root, ve = K.Trigger, Ci = K.Portal, Ni = K.Sub, Ut = j.forwardRef(({ className: e, inset: t, children: i, ...n }, a) => /* @__PURE__ */ u(
206
206
  K.SubTrigger,
207
207
  {
208
208
  ref: a,
@@ -214,12 +214,12 @@ const Ae = K.Root, Se = K.Trigger, Ti = K.Portal, Li = K.Sub, Vt = j.forwardRef(
214
214
  ...n,
215
215
  children: [
216
216
  i,
217
- /* @__PURE__ */ r(Un, { className: "richtext-ml-auto richtext-h-4 richtext-w-4" })
217
+ /* @__PURE__ */ r(Fn, { className: "richtext-ml-auto richtext-h-4 richtext-w-4" })
218
218
  ]
219
219
  }
220
220
  ));
221
- Vt.displayName = K.SubTrigger.displayName;
222
- const Wt = j.forwardRef(({ className: e, ...t }, i) => /* @__PURE__ */ r(
221
+ Ut.displayName = K.SubTrigger.displayName;
222
+ const Vt = j.forwardRef(({ className: e, ...t }, i) => /* @__PURE__ */ r(
223
223
  K.SubContent,
224
224
  {
225
225
  ref: i,
@@ -230,8 +230,8 @@ const Wt = j.forwardRef(({ className: e, ...t }, i) => /* @__PURE__ */ r(
230
230
  ...t
231
231
  }
232
232
  ));
233
- Wt.displayName = K.SubContent.displayName;
234
- const we = j.forwardRef(({ className: e, sideOffset: t = 4, ...i }, n) => /* @__PURE__ */ r(K.Portal, { children: /* @__PURE__ */ r(
233
+ Vt.displayName = K.SubContent.displayName;
234
+ const pe = j.forwardRef(({ className: e, sideOffset: t = 4, ...i }, n) => /* @__PURE__ */ r(K.Portal, { children: /* @__PURE__ */ r(
235
235
  K.Content,
236
236
  {
237
237
  ref: n,
@@ -243,8 +243,8 @@ const we = j.forwardRef(({ className: e, sideOffset: t = 4, ...i }, n) => /* @__
243
243
  ...i
244
244
  }
245
245
  ) }));
246
- we.displayName = K.Content.displayName;
247
- const fe = j.forwardRef(({ className: e, inset: t, ...i }, n) => /* @__PURE__ */ r(
246
+ pe.displayName = K.Content.displayName;
247
+ const le = j.forwardRef(({ className: e, inset: t, ...i }, n) => /* @__PURE__ */ r(
248
248
  K.Item,
249
249
  {
250
250
  ref: n,
@@ -256,7 +256,7 @@ const fe = j.forwardRef(({ className: e, inset: t, ...i }, n) => /* @__PURE__ */
256
256
  ...i
257
257
  }
258
258
  ));
259
- fe.displayName = K.Item.displayName;
259
+ le.displayName = K.Item.displayName;
260
260
  const Me = j.forwardRef(({ className: e, children: t, checked: i, ...n }, a) => /* @__PURE__ */ u(
261
261
  K.CheckboxItem,
262
262
  {
@@ -268,13 +268,13 @@ const Me = j.forwardRef(({ className: e, children: t, checked: i, ...n }, a) =>
268
268
  checked: i,
269
269
  ...n,
270
270
  children: [
271
- /* @__PURE__ */ r("span", { className: "richtext-absolute richtext-left-2 richtext-flex richtext-h-3.5 richtext-w-3.5 richtext-items-center richtext-justify-center", children: /* @__PURE__ */ r(K.ItemIndicator, { children: /* @__PURE__ */ r(Gi, { className: "richtext-h-4 richtext-w-4" }) }) }),
271
+ /* @__PURE__ */ r("span", { className: "richtext-absolute richtext-left-2 richtext-flex richtext-h-3.5 richtext-w-3.5 richtext-items-center richtext-justify-center", children: /* @__PURE__ */ r(K.ItemIndicator, { children: /* @__PURE__ */ r(qi, { className: "richtext-h-4 richtext-w-4" }) }) }),
272
272
  t
273
273
  ]
274
274
  }
275
275
  ));
276
276
  Me.displayName = K.CheckboxItem.displayName;
277
- const No = j.forwardRef(({ className: e, children: t, ...i }, n) => /* @__PURE__ */ u(
277
+ const Co = j.forwardRef(({ className: e, children: t, ...i }, n) => /* @__PURE__ */ u(
278
278
  K.RadioItem,
279
279
  {
280
280
  ref: n,
@@ -284,13 +284,13 @@ const No = j.forwardRef(({ className: e, children: t, ...i }, n) => /* @__PURE__
284
284
  ),
285
285
  ...i,
286
286
  children: [
287
- /* @__PURE__ */ r("span", { className: "richtext-absolute richtext-left-2 richtext-flex richtext-h-3.5 richtext-w-3.5 richtext-items-center richtext-justify-center", children: /* @__PURE__ */ r(K.ItemIndicator, { children: /* @__PURE__ */ r(Vn, { className: "richtext-h-2 richtext-w-2 richtext-fill-current" }) }) }),
287
+ /* @__PURE__ */ r("span", { className: "richtext-absolute richtext-left-2 richtext-flex richtext-h-3.5 richtext-w-3.5 richtext-items-center richtext-justify-center", children: /* @__PURE__ */ r(K.ItemIndicator, { children: /* @__PURE__ */ r(Un, { className: "richtext-h-2 richtext-w-2 richtext-fill-current" }) }) }),
288
288
  t
289
289
  ]
290
290
  }
291
291
  ));
292
- No.displayName = K.RadioItem.displayName;
293
- const To = j.forwardRef(({ className: e, inset: t, ...i }, n) => /* @__PURE__ */ r(
292
+ Co.displayName = K.RadioItem.displayName;
293
+ const No = j.forwardRef(({ className: e, inset: t, ...i }, n) => /* @__PURE__ */ r(
294
294
  K.Label,
295
295
  {
296
296
  ref: n,
@@ -302,8 +302,8 @@ const To = j.forwardRef(({ className: e, inset: t, ...i }, n) => /* @__PURE__ */
302
302
  ...i
303
303
  }
304
304
  ));
305
- To.displayName = K.Label.displayName;
306
- const zt = j.forwardRef(({ className: e, ...t }, i) => /* @__PURE__ */ r(
305
+ No.displayName = K.Label.displayName;
306
+ const It = j.forwardRef(({ className: e, ...t }, i) => /* @__PURE__ */ r(
307
307
  K.Separator,
308
308
  {
309
309
  ref: i,
@@ -311,8 +311,8 @@ const zt = j.forwardRef(({ className: e, ...t }, i) => /* @__PURE__ */ r(
311
311
  ...t
312
312
  }
313
313
  ));
314
- zt.displayName = K.Separator.displayName;
315
- function xn({
314
+ It.displayName = K.Separator.displayName;
315
+ function fn({
316
316
  className: e,
317
317
  ...t
318
318
  }) {
@@ -324,7 +324,7 @@ function xn({
324
324
  }
325
325
  );
326
326
  }
327
- xn.displayName = "DropdownMenuShortcut";
327
+ fn.displayName = "DropdownMenuShortcut";
328
328
  const te = j.forwardRef(
329
329
  ({ className: e, type: t, ...i }, n) => /* @__PURE__ */ r(
330
330
  "input",
@@ -340,17 +340,17 @@ const te = j.forwardRef(
340
340
  )
341
341
  );
342
342
  te.displayName = "Input";
343
- const Lo = ti(
343
+ const To = ti(
344
344
  "richtext-text-sm richtext-font-medium richtext-leading-none peer-disabled:richtext-cursor-not-allowed peer-disabled:richtext-opacity-70"
345
- ), le = j.forwardRef(({ className: e, ...t }, i) => /* @__PURE__ */ r(
346
- un.Root,
345
+ ), de = j.forwardRef(({ className: e, ...t }, i) => /* @__PURE__ */ r(
346
+ dn.Root,
347
347
  {
348
348
  ref: i,
349
- className: P(Lo(), e),
349
+ className: P(To(), e),
350
350
  ...t
351
351
  }
352
352
  ));
353
- le.displayName = un.Root.displayName;
353
+ de.displayName = dn.Root.displayName;
354
354
  const re = tt.Root, ae = tt.Trigger, ie = j.forwardRef(({ className: e, align: t = "center", sideOffset: i = 4, ...n }, a) => /* @__PURE__ */ r(tt.Portal, { children: /* @__PURE__ */ r(
355
355
  tt.Content,
356
356
  {
@@ -365,9 +365,9 @@ const re = tt.Root, ae = tt.Trigger, ie = j.forwardRef(({ className: e, align: t
365
365
  }
366
366
  ) }));
367
367
  ie.displayName = tt.Content.displayName;
368
- const de = j.forwardRef(
368
+ const he = j.forwardRef(
369
369
  ({ className: e, orientation: t = "horizontal", decorative: i = !0, ...n }, a) => /* @__PURE__ */ r(
370
- fn.Root,
370
+ un.Root,
371
371
  {
372
372
  ref: a,
373
373
  decorative: i,
@@ -381,9 +381,9 @@ const de = j.forwardRef(
381
381
  }
382
382
  )
383
383
  );
384
- de.displayName = fn.Root.displayName;
384
+ he.displayName = un.Root.displayName;
385
385
  const li = j.forwardRef(({ className: e, ...t }, i) => /* @__PURE__ */ r(
386
- Ut.Root,
386
+ Ft.Root,
387
387
  {
388
388
  className: P(
389
389
  "richtext-peer richtext-inline-flex richtext-h-6 richtext-w-11 richtext-shrink-0 richtext-cursor-pointer richtext-items-center richtext-rounded-full richtext-border-2 richtext-border-transparent richtext-transition-colors focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-2 focus-visible:richtext-ring-offset-background disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50 data-[state=checked]:richtext-bg-primary data-[state=unchecked]:richtext-bg-input",
@@ -392,7 +392,7 @@ const li = j.forwardRef(({ className: e, ...t }, i) => /* @__PURE__ */ r(
392
392
  ...t,
393
393
  ref: i,
394
394
  children: /* @__PURE__ */ r(
395
- Ut.Thumb,
395
+ Ft.Thumb,
396
396
  {
397
397
  className: P(
398
398
  "richtext-pointer-events-none richtext-block richtext-h-5 richtext-w-5 richtext-rounded-full richtext-bg-background richtext-shadow-lg richtext-ring-0 richtext-transition-transform data-[state=checked]:richtext-translate-x-5 data-[state=unchecked]:richtext-translate-x-0"
@@ -401,9 +401,9 @@ const li = j.forwardRef(({ className: e, ...t }, i) => /* @__PURE__ */ r(
401
401
  )
402
402
  }
403
403
  ));
404
- li.displayName = Ut.Root.displayName;
405
- const di = Le.Root, Ht = j.forwardRef(({ className: e, ...t }, i) => /* @__PURE__ */ r(
406
- Le.List,
404
+ li.displayName = Ft.Root.displayName;
405
+ const di = Se.Root, zt = j.forwardRef(({ className: e, ...t }, i) => /* @__PURE__ */ r(
406
+ Se.List,
407
407
  {
408
408
  ref: i,
409
409
  className: P(
@@ -413,9 +413,9 @@ const di = Le.Root, Ht = j.forwardRef(({ className: e, ...t }, i) => /* @__PURE_
413
413
  ...t
414
414
  }
415
415
  ));
416
- Ht.displayName = Le.List.displayName;
416
+ zt.displayName = Se.List.displayName;
417
417
  const Ve = j.forwardRef(({ className: e, ...t }, i) => /* @__PURE__ */ r(
418
- Le.Trigger,
418
+ Se.Trigger,
419
419
  {
420
420
  ref: i,
421
421
  className: P(
@@ -425,9 +425,9 @@ const Ve = j.forwardRef(({ className: e, ...t }, i) => /* @__PURE__ */ r(
425
425
  ...t
426
426
  }
427
427
  ));
428
- Ve.displayName = Le.Trigger.displayName;
428
+ Ve.displayName = Se.Trigger.displayName;
429
429
  const We = j.forwardRef(({ className: e, ...t }, i) => /* @__PURE__ */ r(
430
- Le.Content,
430
+ Se.Content,
431
431
  {
432
432
  ref: i,
433
433
  className: P(
@@ -437,8 +437,8 @@ const We = j.forwardRef(({ className: e, ...t }, i) => /* @__PURE__ */ r(
437
437
  ...t
438
438
  }
439
439
  ));
440
- We.displayName = Le.Content.displayName;
441
- const Ao = ti(
440
+ We.displayName = Se.Content.displayName;
441
+ const Lo = ti(
442
442
  "richtext-inline-flex richtext-items-center richtext-justify-center richtext-rounded-md richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors hover:richtext-bg-muted hover:richtext-text-muted-foreground focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-2 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 data-[state=on]:richtext-bg-accent data-[state=on]:richtext-text-accent-foreground",
443
443
  {
444
444
  variants: {
@@ -458,15 +458,15 @@ const Ao = ti(
458
458
  }
459
459
  }
460
460
  ), st = j.forwardRef(({ className: e, variant: t, size: i, ...n }, a) => /* @__PURE__ */ r(
461
- gn.Root,
461
+ mn.Root,
462
462
  {
463
463
  ref: a,
464
- className: P(Ao({ variant: t, size: i, className: e })),
464
+ className: P(Lo({ variant: t, size: i, className: e })),
465
465
  ...n
466
466
  }
467
467
  ));
468
- st.displayName = gn.Root.displayName;
469
- const So = rt.Provider, Ke = rt.Root, Ge = rt.Trigger, Ie = j.forwardRef(({ className: e, sideOffset: t = 4, ...i }, n) => /* @__PURE__ */ r(
468
+ st.displayName = mn.Root.displayName;
469
+ const Ao = rt.Provider, Ke = rt.Root, Ge = rt.Trigger, Ie = j.forwardRef(({ className: e, sideOffset: t = 4, ...i }, n) => /* @__PURE__ */ r(
470
470
  rt.Content,
471
471
  {
472
472
  ref: n,
@@ -479,7 +479,7 @@ const So = rt.Provider, Ke = rt.Root, Ge = rt.Trigger, Ie = j.forwardRef(({ clas
479
479
  }
480
480
  ));
481
481
  Ie.displayName = rt.Content.displayName;
482
- const pn = G.Root, Mo = G.Value, hi = j.forwardRef(({ className: e, children: t, ...i }, n) => /* @__PURE__ */ u(
482
+ const So = G.Root, Mo = G.Value, gn = j.forwardRef(({ className: e, children: t, ...i }, n) => /* @__PURE__ */ u(
483
483
  G.Trigger,
484
484
  {
485
485
  ref: n,
@@ -490,12 +490,12 @@ const pn = G.Root, Mo = G.Value, hi = j.forwardRef(({ className: e, children: t,
490
490
  ...i,
491
491
  children: [
492
492
  t,
493
- /* @__PURE__ */ r(G.Icon, { asChild: !0, children: /* @__PURE__ */ r(At, { className: "richtext-h-4 richtext-w-4 richtext-opacity-50" }) })
493
+ /* @__PURE__ */ r(G.Icon, { asChild: !0, children: /* @__PURE__ */ r(Lt, { className: "richtext-h-4 richtext-w-4 richtext-opacity-50" }) })
494
494
  ]
495
495
  }
496
496
  ));
497
- hi.displayName = G.Trigger.displayName;
498
- const bn = j.forwardRef(({ className: e, ...t }, i) => /* @__PURE__ */ r(
497
+ gn.displayName = G.Trigger.displayName;
498
+ const xn = j.forwardRef(({ className: e, ...t }, i) => /* @__PURE__ */ r(
499
499
  G.ScrollUpButton,
500
500
  {
501
501
  ref: i,
@@ -504,11 +504,11 @@ const bn = j.forwardRef(({ className: e, ...t }, i) => /* @__PURE__ */ r(
504
504
  e
505
505
  ),
506
506
  ...t,
507
- children: /* @__PURE__ */ r(Zi, { className: "richtext-h-4 richtext-w-4" })
507
+ children: /* @__PURE__ */ r(Ki, { className: "richtext-h-4 richtext-w-4" })
508
508
  }
509
509
  ));
510
- bn.displayName = G.ScrollUpButton.displayName;
511
- const wn = j.forwardRef(({ className: e, ...t }, i) => /* @__PURE__ */ r(
510
+ xn.displayName = G.ScrollUpButton.displayName;
511
+ const pn = j.forwardRef(({ className: e, ...t }, i) => /* @__PURE__ */ r(
512
512
  G.ScrollDownButton,
513
513
  {
514
514
  ref: i,
@@ -517,11 +517,11 @@ const wn = j.forwardRef(({ className: e, ...t }, i) => /* @__PURE__ */ r(
517
517
  e
518
518
  ),
519
519
  ...t,
520
- children: /* @__PURE__ */ r(At, { className: "richtext-h-4 richtext-w-4" })
520
+ children: /* @__PURE__ */ r(Lt, { className: "richtext-h-4 richtext-w-4" })
521
521
  }
522
522
  ));
523
- wn.displayName = G.ScrollDownButton.displayName;
524
- const ui = j.forwardRef(({ className: e, children: t, position: i = "popper", ...n }, a) => /* @__PURE__ */ r(G.Portal, { children: /* @__PURE__ */ u(
523
+ pn.displayName = G.ScrollDownButton.displayName;
524
+ const bn = j.forwardRef(({ className: e, children: t, position: i = "popper", ...n }, a) => /* @__PURE__ */ r(G.Portal, { children: /* @__PURE__ */ u(
525
525
  G.Content,
526
526
  {
527
527
  ref: a,
@@ -533,7 +533,7 @@ const ui = j.forwardRef(({ className: e, children: t, position: i = "popper", ..
533
533
  position: i,
534
534
  ...n,
535
535
  children: [
536
- /* @__PURE__ */ r(bn, {}),
536
+ /* @__PURE__ */ r(xn, {}),
537
537
  /* @__PURE__ */ r(
538
538
  G.Viewport,
539
539
  {
@@ -544,11 +544,11 @@ const ui = j.forwardRef(({ className: e, children: t, position: i = "popper", ..
544
544
  children: t
545
545
  }
546
546
  ),
547
- /* @__PURE__ */ r(wn, {})
547
+ /* @__PURE__ */ r(pn, {})
548
548
  ]
549
549
  }
550
550
  ) }));
551
- ui.displayName = G.Content.displayName;
551
+ bn.displayName = G.Content.displayName;
552
552
  const Io = j.forwardRef(({ className: e, ...t }, i) => /* @__PURE__ */ r(
553
553
  G.Label,
554
554
  {
@@ -558,7 +558,7 @@ const Io = j.forwardRef(({ className: e, ...t }, i) => /* @__PURE__ */ r(
558
558
  }
559
559
  ));
560
560
  Io.displayName = G.Label.displayName;
561
- const Nt = j.forwardRef(({ className: e, children: t, ...i }, n) => /* @__PURE__ */ u(
561
+ const Wt = j.forwardRef(({ className: e, children: t, ...i }, n) => /* @__PURE__ */ u(
562
562
  G.Item,
563
563
  {
564
564
  ref: n,
@@ -568,12 +568,12 @@ const Nt = j.forwardRef(({ className: e, children: t, ...i }, n) => /* @__PURE__
568
568
  ),
569
569
  ...i,
570
570
  children: [
571
- /* @__PURE__ */ r("span", { className: "richtext-absolute richtext-left-2 richtext-flex richtext-h-3.5 richtext-w-3.5 richtext-items-center richtext-justify-center", children: /* @__PURE__ */ r(G.ItemIndicator, { children: /* @__PURE__ */ r(Gi, { className: "richtext-h-4 richtext-w-4" }) }) }),
571
+ /* @__PURE__ */ r("span", { className: "richtext-absolute richtext-left-2 richtext-flex richtext-h-3.5 richtext-w-3.5 richtext-items-center richtext-justify-center", children: /* @__PURE__ */ r(G.ItemIndicator, { children: /* @__PURE__ */ r(qi, { className: "richtext-h-4 richtext-w-4" }) }) }),
572
572
  /* @__PURE__ */ r(G.ItemText, { children: t })
573
573
  ]
574
574
  }
575
575
  ));
576
- Nt.displayName = G.Item.displayName;
576
+ Wt.displayName = G.Item.displayName;
577
577
  const zo = j.forwardRef(({ className: e, ...t }, i) => /* @__PURE__ */ r(
578
578
  G.Separator,
579
579
  {
@@ -606,7 +606,7 @@ function Ho({ editor: e, ...t }) {
606
606
  [o, f]
607
607
  );
608
608
  return /* @__PURE__ */ r(
609
- he,
609
+ ue,
610
610
  {
611
611
  editor: e,
612
612
  pluginKey: "Katex-bubble-menu",
@@ -638,11 +638,11 @@ function Ho({ editor: e, ...t }) {
638
638
  g && /* @__PURE__ */ r("div", { className: "richtext-my-[10px] richtext-p-[10px] richtext-rounded-[6px] !richtext-border-[1px]", children: g }),
639
639
  /* @__PURE__ */ u("div", { className: "richtext-flex richtext-items-center richtext-justify-between richtext-gap-[6px]", children: [
640
640
  /* @__PURE__ */ r(U, { onClick: m, className: "richtext-flex-1", children: "Submit" }),
641
- /* @__PURE__ */ r("a", { href: "https://katex.org/docs/supported", target: "_blank", rel: "noreferrer noopener", children: /* @__PURE__ */ r(Ji, { size: 16 }) })
641
+ /* @__PURE__ */ r("a", { href: "https://katex.org/docs/supported", target: "_blank", rel: "noreferrer noopener", children: /* @__PURE__ */ r(Gi, { size: 16 }) })
642
642
  ] })
643
643
  ] }) : /* @__PURE__ */ u("div", { className: "richtext-flex richtext-items-center richtext-justify-center richtext-gap-[6px]", children: [
644
- /* @__PURE__ */ r(_, { tooltip: "Edit", action: () => h(!s), children: /* @__PURE__ */ r(Xi, { size: 16 }) }),
645
- /* @__PURE__ */ r(_, { tooltip: "Delete", action: d, children: /* @__PURE__ */ r(Yi, { size: 16 }) })
644
+ /* @__PURE__ */ r(_, { tooltip: "Edit", action: () => h(!s), children: /* @__PURE__ */ r(Zi, { size: 16 }) }),
645
+ /* @__PURE__ */ r(_, { tooltip: "Delete", action: d, children: /* @__PURE__ */ r(Ji, { size: 16 }) })
646
646
  ] }) })
647
647
  }
648
648
  );
@@ -694,7 +694,7 @@ function Eo(e) {
694
694
  }
695
695
  };
696
696
  }
697
- const Ro = { padding: "0 12px 12px" }, _n = ({ width: e, maxWidth: t, height: i, onOk: n, children: a }) => {
697
+ const Ro = { padding: "0 12px 12px" }, wn = ({ width: e, maxWidth: t, height: i, onOk: n, children: a }) => {
698
698
  const { t: o } = F(), [c, s] = w({
699
699
  width: "",
700
700
  height: "",
@@ -713,7 +713,7 @@ const Ro = { padding: "0 12px 12px" }, _n = ({ width: e, maxWidth: t, height: i,
713
713
  return /* @__PURE__ */ u(re, { modal: !0, children: [
714
714
  /* @__PURE__ */ r(ae, { asChild: !0, children: a }),
715
715
  /* @__PURE__ */ r(ie, { children: /* @__PURE__ */ r("div", { style: Ro, children: /* @__PURE__ */ u("form", { className: "richtext-flex richtext-flex-col richtext-gap-2", onSubmit: h, children: [
716
- /* @__PURE__ */ r(le, { className: "mb-[6px]", children: "Width" }),
716
+ /* @__PURE__ */ r(de, { className: "mb-[6px]", children: "Width" }),
717
717
  /* @__PURE__ */ r("div", { className: "richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5", children: /* @__PURE__ */ r("div", { className: "richtext-relative richtext-items-center richtext-w-full richtext-max-w-sm", children: /* @__PURE__ */ r(
718
718
  te,
719
719
  {
@@ -723,7 +723,7 @@ const Ro = { padding: "0 12px 12px" }, _n = ({ width: e, maxWidth: t, height: i,
723
723
  onChange: (l) => s({ ...c, width: l.target.value })
724
724
  }
725
725
  ) }) }),
726
- /* @__PURE__ */ r(le, { className: "mb-[6px]", children: "Max Width" }),
726
+ /* @__PURE__ */ r(de, { className: "mb-[6px]", children: "Max Width" }),
727
727
  /* @__PURE__ */ r("div", { className: "richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5", children: /* @__PURE__ */ r("div", { className: "richtext-relative richtext-items-center richtext-w-full richtext-max-w-sm", children: /* @__PURE__ */ r(
728
728
  te,
729
729
  {
@@ -733,7 +733,7 @@ const Ro = { padding: "0 12px 12px" }, _n = ({ width: e, maxWidth: t, height: i,
733
733
  onChange: (l) => s({ ...c, maxWidth: l.target.value })
734
734
  }
735
735
  ) }) }),
736
- /* @__PURE__ */ r(le, { className: "mb-[6px]", children: "Height" }),
736
+ /* @__PURE__ */ r(de, { className: "mb-[6px]", children: "Height" }),
737
737
  /* @__PURE__ */ r("div", { className: "richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5", children: /* @__PURE__ */ r("div", { className: "richtext-relative richtext-items-center richtext-w-full richtext-max-w-sm", children: /* @__PURE__ */ r(
738
738
  te,
739
739
  {
@@ -753,7 +753,7 @@ const Ro = { padding: "0 12px 12px" }, _n = ({ width: e, maxWidth: t, height: i,
753
753
  icon: $o,
754
754
  handlerWrap: Bo
755
755
  };
756
- function vn(e, t, i) {
756
+ function _n(e, t, i) {
757
757
  return e < t ? t : e > i ? i : e;
758
758
  }
759
759
  const jo = (e) => typeof e == "number", Fo = (e) => typeof e == "string", Uo = (e) => typeof e == "function";
@@ -763,7 +763,7 @@ function Vo(e, t = "px") {
763
763
  const i = jo(e) ? String(e) : e, n = Number.parseFloat(i), a = i.match(/[a-z%]+$/i), o = a ? a[0] : t;
764
764
  return Number.isNaN(n) ? e : n + o;
765
765
  }
766
- function yn(e, t) {
766
+ function vn(e, t) {
767
767
  if (!e)
768
768
  return !1;
769
769
  const { extensions: i = [] } = (e == null ? void 0 : e.extensionManager) ?? {};
@@ -772,7 +772,7 @@ function yn(e, t) {
772
772
  function qt(e) {
773
773
  return e.map((t) => Fo(t) ? { value: t, name: t } : t);
774
774
  }
775
- const Wo = 10, qo = 200, Ai = 15, Si = { width: "100%", height: "100%", maxWidth: "100%" };
775
+ const Wo = 10, qo = 200, Ti = 15, Li = { width: "100%", height: "100%", maxWidth: "100%" };
776
776
  function Ko({ editor: e, node: t, updateAttributes: i }) {
777
777
  const n = X(null), a = e.isActive(Ee.name), { data: o, width: c, height: s } = t.attrs, [h, l] = w(null), [d, m] = w(!0), [f, g] = w(null), [x, b] = w(!1), [k, L] = w(100), p = M(
778
778
  (T) => {
@@ -781,7 +781,7 @@ function Ko({ editor: e, node: t, updateAttributes: i }) {
781
781
  [b]
782
782
  ), v = M((T) => () => {
783
783
  L(
784
- (I) => vn(T === "minus" ? I - Ai : I + Ai, Wo, qo)
784
+ (I) => _n(T === "minus" ? I - Ti : I + Ti, Wo, qo)
785
785
  );
786
786
  }, []);
787
787
  z(() => {
@@ -805,8 +805,8 @@ function Ko({ editor: e, node: t, updateAttributes: i }) {
805
805
  const C = (T) => {
806
806
  i({ width: T.width, height: T.height });
807
807
  };
808
- return /* @__PURE__ */ r(ne, { className: ee(Xe.wrap, a && Xe.isActive), children: /* @__PURE__ */ r(Za, { onChange: p, children: /* @__PURE__ */ r(
809
- mn,
808
+ return /* @__PURE__ */ r(ne, { className: ee(Xe.wrap, a && Xe.isActive), children: /* @__PURE__ */ r(Ga, { onChange: p, children: /* @__PURE__ */ r(
809
+ hn,
810
810
  {
811
811
  size: { width: Number.parseInt(c), height: Number.parseInt(s) },
812
812
  onResizeStop: (T, I, $, y) => {
@@ -819,9 +819,9 @@ function Ko({ editor: e, node: t, updateAttributes: i }) {
819
819
  "div",
820
820
  {
821
821
  className: ee(Xe.renderWrap, "render-wrapper"),
822
- style: { ...Si, overflow: "hidden" },
822
+ style: { ...Li, overflow: "hidden" },
823
823
  children: [
824
- f && /* @__PURE__ */ r("div", { style: Si, children: /* @__PURE__ */ r("p", { children: f.message || f }) }),
824
+ f && /* @__PURE__ */ r("div", { style: Li, children: /* @__PURE__ */ r("p", { children: f.message || f }) }),
825
825
  d && /* @__PURE__ */ r("p", { children: "Loading..." }),
826
826
  !d && !f && x && /* @__PURE__ */ r(
827
827
  "div",
@@ -916,7 +916,7 @@ function Xo(e) {
916
916
  return typeof a == "object" ? o = Jo(a) : o = a, i[n] = o, i;
917
917
  }, /* @__PURE__ */ Object.create(null));
918
918
  }
919
- const lt = oe.Root, dt = oe.Trigger, Yo = oe.Portal, kn = j.forwardRef(({ className: e, ...t }, i) => /* @__PURE__ */ r(
919
+ const lt = oe.Root, dt = oe.Trigger, Yo = oe.Portal, yn = j.forwardRef(({ className: e, ...t }, i) => /* @__PURE__ */ r(
920
920
  oe.Overlay,
921
921
  {
922
922
  ref: i,
@@ -927,9 +927,9 @@ const lt = oe.Root, dt = oe.Trigger, Yo = oe.Portal, kn = j.forwardRef(({ classN
927
927
  ...t
928
928
  }
929
929
  ));
930
- kn.displayName = oe.Overlay.displayName;
930
+ yn.displayName = oe.Overlay.displayName;
931
931
  const Ze = j.forwardRef(({ className: e, children: t, ...i }, n) => /* @__PURE__ */ u(Yo, { children: [
932
- /* @__PURE__ */ r(kn, {}),
932
+ /* @__PURE__ */ r(yn, {}),
933
933
  /* @__PURE__ */ u(
934
934
  oe.Content,
935
935
  {
@@ -942,7 +942,7 @@ const Ze = j.forwardRef(({ className: e, children: t, ...i }, n) => /* @__PURE__
942
942
  children: [
943
943
  t,
944
944
  /* @__PURE__ */ u(oe.Close, { className: "richtext-absolute richtext-right-4 richtext-top-4 richtext-rounded-sm richtext-opacity-70 richtext-ring-offset-background richtext-transition-opacity hover:richtext-opacity-100 focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-2 disabled:richtext-pointer-events-none data-[state=open]:richtext-bg-accent data-[state=open]:richtext-text-muted-foreground", children: [
945
- /* @__PURE__ */ r(Wn, { className: "richtext-h-4 richtext-w-4" }),
945
+ /* @__PURE__ */ r(Vn, { className: "richtext-h-4 richtext-w-4" }),
946
946
  /* @__PURE__ */ r("span", { className: "richtext-sr-only", children: "Close" })
947
947
  ] })
948
948
  ]
@@ -950,7 +950,7 @@ const Ze = j.forwardRef(({ className: e, children: t, ...i }, n) => /* @__PURE__
950
950
  )
951
951
  ] }));
952
952
  Ze.displayName = oe.Content.displayName;
953
- function Cn({
953
+ function kn({
954
954
  className: e,
955
955
  ...t
956
956
  }) {
@@ -965,7 +965,7 @@ function Cn({
965
965
  }
966
966
  );
967
967
  }
968
- Cn.displayName = "DialogHeader";
968
+ kn.displayName = "DialogHeader";
969
969
  function Je({
970
970
  className: e,
971
971
  ...t
@@ -1003,23 +1003,23 @@ const Qo = j.forwardRef(({ className: e, ...t }, i) => /* @__PURE__ */ r(
1003
1003
  }
1004
1004
  ));
1005
1005
  Qo.displayName = oe.Description.displayName;
1006
- let Ot;
1007
- function mi() {
1006
+ let Rt;
1007
+ function hi() {
1008
1008
  try {
1009
- return Ot || (Ot = Eo()), Ot;
1009
+ return Rt || (Rt = Eo()), Rt;
1010
1010
  } catch {
1011
1011
  throw new Error("Error EventEmitter");
1012
1012
  }
1013
1013
  }
1014
1014
  const Kt = "OPEN_EXCALIDRAW_SETTING_MODAL";
1015
1015
  function ec(e, t) {
1016
- mi().on(e, t);
1016
+ hi().on(e, t);
1017
1017
  }
1018
1018
  function tc(e, t) {
1019
- mi().off(e, t);
1019
+ hi().off(e, t);
1020
1020
  }
1021
1021
  function ic(e) {
1022
- mi().emit(Kt, e);
1022
+ hi().emit(Kt, e);
1023
1023
  }
1024
1024
  const nc = ({ editor: e }) => {
1025
1025
  const [t, i] = w(null), [n, a] = w({}), [o, c] = w({ elements: [], appState: { isLoading: !1 }, files: null }), [s, h] = w(!1), [l, d] = w(!0), [m, f] = w(null), g = M(
@@ -1086,7 +1086,7 @@ const nc = ({ editor: e }) => {
1086
1086
  ]
1087
1087
  }
1088
1088
  );
1089
- }, Mi = { elements: [] }, Ee = ce.create({
1089
+ }, Ai = { elements: [] }, Ee = ce.create({
1090
1090
  name: "excalidraw",
1091
1091
  group: "block",
1092
1092
  selectable: !0,
@@ -1110,7 +1110,7 @@ const nc = ({ editor: e }) => {
1110
1110
  parseHTML: Y("height")
1111
1111
  },
1112
1112
  data: {
1113
- default: Mi,
1113
+ default: Ai,
1114
1114
  parseHTML: Y("data", !0)
1115
1115
  }
1116
1116
  };
@@ -1144,7 +1144,7 @@ const nc = ({ editor: e }) => {
1144
1144
  return {
1145
1145
  setExcalidraw: (e) => ({ tr: t, commands: i, chain: n }) => {
1146
1146
  var a, o, c;
1147
- return e = e || {}, e.data = e.data || Mi, ((c = (o = (a = t.selection) == null ? void 0 : a.node) == null ? void 0 : o.type) == null ? void 0 : c.name) == this.name ? i.updateAttributes(this.name, e) : n().insertContent({
1147
+ return e = e || {}, e.data = e.data || Ai, ((c = (o = (a = t.selection) == null ? void 0 : a.node) == null ? void 0 : o.type) == null ? void 0 : c.name) == this.name ? i.updateAttributes(this.name, e) : n().insertContent({
1148
1148
  type: this.name,
1149
1149
  attrs: e
1150
1150
  }).run();
@@ -1152,7 +1152,7 @@ const nc = ({ editor: e }) => {
1152
1152
  };
1153
1153
  },
1154
1154
  addNodeView() {
1155
- return ue(Go);
1155
+ return me(Go);
1156
1156
  },
1157
1157
  addInputRules() {
1158
1158
  return [
@@ -1163,16 +1163,16 @@ const nc = ({ editor: e }) => {
1163
1163
  })
1164
1164
  ];
1165
1165
  }
1166
- }), ve = /* @__PURE__ */ new Map();
1166
+ }), ke = /* @__PURE__ */ new Map();
1167
1167
  function rc(e) {
1168
1168
  const t = e.options.element;
1169
- ve.has("width") || ve.set("width", t.clientWidth), ve.has("width") && ve.get("width") <= 0 && ve.set("width", t.clientWidth);
1169
+ ke.has("width") || ke.set("width", t.clientWidth), ke.has("width") && ke.get("width") <= 0 && ke.set("width", t.clientWidth);
1170
1170
  const i = { attributes: !0, childList: !0, subtree: !0 }, n = function() {
1171
- ve.set("width", t.clientWidth);
1171
+ ke.set("width", t.clientWidth);
1172
1172
  }, a = new MutationObserver(n);
1173
1173
  return a.observe(t, i), e.on("destroy", () => {
1174
1174
  a.disconnect();
1175
- }), { width: ve.get("width") };
1175
+ }), { width: ke.get("width") };
1176
1176
  }
1177
1177
  function ac({ editor: e }) {
1178
1178
  const { t } = F(), { width: i } = rc(e), n = ot(e, Ee.name, {
@@ -1191,7 +1191,7 @@ function ac({ editor: e }) {
1191
1191
  return z(() => {
1192
1192
  a && (l(), e.chain().updateAttributes(Ee.name, { defaultShowPicker: !1 }).focus().run());
1193
1193
  }, [o, a, e, l]), /* @__PURE__ */ r(
1194
- he,
1194
+ ue,
1195
1195
  {
1196
1196
  className: "bubble-menu",
1197
1197
  editor: e,
@@ -1217,7 +1217,7 @@ function ac({ editor: e }) {
1217
1217
  tooltip: t("editor.edit")
1218
1218
  }
1219
1219
  ),
1220
- /* @__PURE__ */ r(_n, { width: c, maxWidth: i, height: s, onOk: h, children: /* @__PURE__ */ r(
1220
+ /* @__PURE__ */ r(wn, { width: c, maxWidth: i, height: s, onOk: h, children: /* @__PURE__ */ r(
1221
1221
  _,
1222
1222
  {
1223
1223
  icon: "Settings",
@@ -1236,7 +1236,7 @@ function ac({ editor: e }) {
1236
1236
  }
1237
1237
  );
1238
1238
  }
1239
- const oc = "_wrap_5y04w_1", cc = "_handlerWrap_5y04w_11", sc = "_innerWrap_5y04w_15", lc = "_emptyWrap_5y04w_23", Ii = {
1239
+ const oc = "_wrap_5y04w_1", cc = "_handlerWrap_5y04w_11", sc = "_innerWrap_5y04w_15", lc = "_emptyWrap_5y04w_23", Si = {
1240
1240
  wrap: oc,
1241
1241
  handlerWrap: cc,
1242
1242
  innerWrap: sc,
@@ -1271,7 +1271,7 @@ function dc({ editor: e, node: t, updateAttributes: i }) {
1271
1271
  /* @__PURE__ */ r(U, { className: "richtext-w-[60px]", onClick: l, children: "OK" })
1272
1272
  ] }),
1273
1273
  a && /* @__PURE__ */ r(
1274
- mn,
1274
+ hn,
1275
1275
  {
1276
1276
  size: { width: Number.parseInt(o), height: Number.parseInt(c) },
1277
1277
  onResizeStop: (m, f, g, x) => {
@@ -1280,7 +1280,7 @@ function dc({ editor: e, node: t, updateAttributes: i }) {
1280
1280
  height: Number.parseInt(c) + x.height
1281
1281
  });
1282
1282
  },
1283
- children: /* @__PURE__ */ r("div", { className: ee(Ii.wrap, "render-wrapper"), children: /* @__PURE__ */ r("div", { className: Ii.innerWrap, style: { pointerEvents: n ? "none" : "auto" }, children: /* @__PURE__ */ r(
1283
+ children: /* @__PURE__ */ r("div", { className: ee(Si.wrap, "render-wrapper"), children: /* @__PURE__ */ r("div", { className: Si.innerWrap, style: { pointerEvents: n ? "none" : "auto" }, children: /* @__PURE__ */ r(
1284
1284
  "iframe",
1285
1285
  {
1286
1286
  src: a,
@@ -1382,7 +1382,7 @@ const Re = ce.create({
1382
1382
  ];
1383
1383
  },
1384
1384
  addNodeView() {
1385
- return ue(dc);
1385
+ return me(dc);
1386
1386
  }
1387
1387
  });
1388
1388
  function hc({ editor: e }) {
@@ -1413,7 +1413,7 @@ function hc({ editor: e }) {
1413
1413
  ), x = M(() => e.isActive(Re.name) && !a, [e, a]), b = M(() => at(Re.name, e), [e]);
1414
1414
  return /* @__PURE__ */ u(q, { children: [
1415
1415
  /* @__PURE__ */ r(
1416
- he,
1416
+ ue,
1417
1417
  {
1418
1418
  className: "bubble-menu",
1419
1419
  editor: e,
@@ -1447,7 +1447,7 @@ function hc({ editor: e }) {
1447
1447
  tooltip: "Open Edit Link"
1448
1448
  }
1449
1449
  ),
1450
- /* @__PURE__ */ r(_n, { width: i, height: n, onOk: g, children: /* @__PURE__ */ r(
1450
+ /* @__PURE__ */ r(wn, { width: i, height: n, onOk: g, children: /* @__PURE__ */ r(
1451
1451
  _,
1452
1452
  {
1453
1453
  icon: "Settings",
@@ -1473,7 +1473,7 @@ function hc({ editor: e }) {
1473
1473
  children: [
1474
1474
  /* @__PURE__ */ r(dt, {}),
1475
1475
  /* @__PURE__ */ u(Ze, { children: [
1476
- /* @__PURE__ */ r(Cn, { children: /* @__PURE__ */ r(ht, { children: "Edit Link Iframe" }) }),
1476
+ /* @__PURE__ */ r(kn, { children: /* @__PURE__ */ r(ht, { children: "Edit Link Iframe" }) }),
1477
1477
  /* @__PURE__ */ r(
1478
1478
  te,
1479
1479
  {
@@ -1494,7 +1494,7 @@ function hc({ editor: e }) {
1494
1494
  )
1495
1495
  ] });
1496
1496
  }
1497
- function Nn(e = 8) {
1497
+ function Cn(e = 8) {
1498
1498
  return Math.random().toString(36).substring(2, e + 2);
1499
1499
  }
1500
1500
  function uc(e) {
@@ -1524,7 +1524,7 @@ function xc(e) {
1524
1524
  ), i.readAsDataURL(e);
1525
1525
  });
1526
1526
  }
1527
- function fi(e, t) {
1527
+ function ui(e, t) {
1528
1528
  const i = e.split(","), n = i[0].match(/:(.*?);/)[1], a = atob(i[i.length - 1]);
1529
1529
  let o = a.length;
1530
1530
  const c = new Uint8Array(o);
@@ -1532,9 +1532,9 @@ function fi(e, t) {
1532
1532
  c[o] = a.charCodeAt(o);
1533
1533
  return new File([c], t, { type: n });
1534
1534
  }
1535
- const zi = `graph TB
1535
+ const Mi = `graph TB
1536
1536
  a-->b`, pc = ({ editor: e, attrs: t, extension: i }) => {
1537
- const { alt: n, align: a } = t, [o, c] = w(decodeURIComponent(n ?? zi)), [s, h] = w(""), [l, d] = w(!1), m = X(null), f = i == null ? void 0 : i.options.upload, g = async (k) => {
1537
+ const { alt: n, align: a } = t, [o, c] = w(decodeURIComponent(n ?? Mi)), [s, h] = w(""), [l, d] = w(!1), m = X(null), f = i == null ? void 0 : i.options.upload, g = async (k) => {
1538
1538
  try {
1539
1539
  const { svg: L } = await Ct.render("mermaid-svg", k);
1540
1540
  h(L);
@@ -1580,15 +1580,18 @@ a-->b`, pc = ({ editor: e, attrs: t, extension: i }) => {
1580
1580
  autoFocus: !0,
1581
1581
  required: !0,
1582
1582
  rows: 10,
1583
- defaultValue: zi,
1584
- placeholder: "Text"
1583
+ defaultValue: Mi,
1584
+ placeholder: "Text",
1585
+ style: {
1586
+ color: "hsl(var(--richtext-foreground))"
1587
+ }
1585
1588
  }
1586
1589
  ),
1587
1590
  /* @__PURE__ */ r(
1588
1591
  "div",
1589
1592
  {
1590
1593
  className: "richtext-flex-1 richtext-flex richtext-items-center richtext-justify-center richtext-rounded-[10px] richtext-p-[10px]",
1591
- style: { height: "100%", border: "1px solid hsl(var(--border))", minHeight: 500 },
1594
+ style: { height: "100%", border: "1px solid hsl(var(--border))", minHeight: 500, background: "#fff" },
1592
1595
  ref: m,
1593
1596
  dangerouslySetInnerHTML: { __html: s }
1594
1597
  }
@@ -1601,10 +1604,10 @@ a-->b`, pc = ({ editor: e, attrs: t, extension: i }) => {
1601
1604
  onClick: async () => {
1602
1605
  if (o !== "") {
1603
1606
  if (o) {
1604
- const k = m.current.querySelector("svg"), { width: L, height: p } = k.getBoundingClientRect(), v = `mermaid-${Nn()}.svg`;
1605
- let C = an(k.outerHTML);
1607
+ const k = m.current.querySelector("svg"), { width: L, height: p } = k.getBoundingClientRect(), v = `mermaid-${Cn()}.svg`;
1608
+ let C = nn(k.outerHTML);
1606
1609
  if (f) {
1607
- const T = fi(C, v);
1610
+ const T = ui(C, v);
1608
1611
  C = await f(T);
1609
1612
  }
1610
1613
  e == null || e.chain().focus().setMermaid(
@@ -1650,7 +1653,7 @@ const wc = {
1650
1653
  function _c({ item: e, disabled: t, editor: i }) {
1651
1654
  var a;
1652
1655
  const n = e.component;
1653
- return n ? /* @__PURE__ */ r(nt, { children: e.type === "divider" ? /* @__PURE__ */ r(de, { orientation: "vertical", className: "!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]" }) : /* @__PURE__ */ r(
1656
+ return n ? /* @__PURE__ */ r(nt, { children: e.type === "divider" ? /* @__PURE__ */ r(he, { orientation: "vertical", className: "!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]" }) : /* @__PURE__ */ r(
1654
1657
  n,
1655
1658
  {
1656
1659
  ...e.componentProps,
@@ -1663,7 +1666,7 @@ function vc(e) {
1663
1666
  return e.type.name === "mermaid";
1664
1667
  }
1665
1668
  function yc(e) {
1666
- const { lang: t } = F(), i = ot(e.editor, Ki.name), n = bc(e.editor, Ki.name), a = ({ editor: c }) => {
1669
+ const { lang: t } = F(), i = ot(e.editor, Wi.name), n = bc(e.editor, Wi.name), a = ({ editor: c }) => {
1667
1670
  const { selection: s } = c.view.state, { $from: h, to: l } = s;
1668
1671
  let d = !1;
1669
1672
  return c.view.state.doc.nodesBetween(h.pos, l, (m) => {
@@ -1672,7 +1675,7 @@ function yc(e) {
1672
1675
  }), d;
1673
1676
  }, o = O(() => e.disabled ? [] : ls(e.editor), [e.disabled, e.editor, t]);
1674
1677
  return /* @__PURE__ */ r(q, { children: /* @__PURE__ */ r(
1675
- he,
1678
+ ue,
1676
1679
  {
1677
1680
  shouldShow: a,
1678
1681
  editor: e == null ? void 0 : e.editor,
@@ -1705,7 +1708,7 @@ function kc({ editor: e, disabled: t, bubbleMenu: i }) {
1705
1708
  n.includes("table") && !((c = i == null ? void 0 : i.tableConfig) != null && c.hidden) ? /* @__PURE__ */ r(ws, { editor: e }, "table") : null,
1706
1709
  n.includes("link") && !((s = i == null ? void 0 : i.linkConfig) != null && s.hidden) ? /* @__PURE__ */ r(vs, { editor: e, disabled: t }, "link") : null,
1707
1710
  n.includes("image") && !((h = i == null ? void 0 : i.imageConfig) != null && h.hidden) ? /* @__PURE__ */ r(Ns, { editor: e, disabled: t }, "image") : null,
1708
- n.includes(Bn.name) && !((l = i == null ? void 0 : i.imageGifConfig) != null && l.hidden) ? /* @__PURE__ */ r(Ts, { editor: e, disabled: t }, "imageGif") : null,
1711
+ n.includes($n.name) && !((l = i == null ? void 0 : i.imageGifConfig) != null && l.hidden) ? /* @__PURE__ */ r(Ts, { editor: e, disabled: t }, "imageGif") : null,
1709
1712
  n.includes("video") && !((d = i == null ? void 0 : i.videoConfig) != null && d.hidden) ? /* @__PURE__ */ r(Ls, { editor: e, disabled: t }, "video") : null,
1710
1713
  n.includes("katex") && !((m = i == null ? void 0 : i.katexConfig) != null && m.hidden) ? /* @__PURE__ */ r(Ho, { editor: e, disabled: t }, "katex") : null,
1711
1714
  n.includes("excalidraw") && !((f = i == null ? void 0 : i.excalidrawConfig) != null && f.hidden) ? /* @__PURE__ */ r(ac, { editor: e, disabled: t }, "excalidraw") : null,
@@ -1717,17 +1720,17 @@ function kc({ editor: e, disabled: t, bubbleMenu: i }) {
1717
1720
  };
1718
1721
  return i != null && i.render ? i.render({ editor: e, disabled: t || !1, bubbleMenu: i }, a()) : a().filter(Boolean);
1719
1722
  }
1720
- function Hi() {
1723
+ function Ii() {
1721
1724
  return /* @__PURE__ */ r("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ r("path", { fill: "currentColor", d: "M18 14c0-4-6-10.8-6-10.8s-1.33 1.51-2.73 3.52l8.59 8.59c.09-.42.14-.86.14-1.31m-.88 3.12L12.5 12.5L5.27 5.27L4 6.55l3.32 3.32C6.55 11.32 6 12.79 6 14c0 3.31 2.69 6 6 6c1.52 0 2.9-.57 3.96-1.5l2.63 2.63l1.27-1.27z" }) });
1722
1725
  }
1723
- function Tn(e) {
1726
+ function Nn(e) {
1724
1727
  const { t } = F(), {
1725
1728
  highlight: i = !1,
1726
1729
  disabled: n = !1,
1727
1730
  selectedColor: a,
1728
1731
  setSelectedColor: o,
1729
1732
  onChange: c,
1730
- colors: s = to
1733
+ colors: s = eo
1731
1734
  } = e, h = O(() => {
1732
1735
  const g = s, x = [];
1733
1736
  for (let b = 0; b < g.length; b += 10)
@@ -1753,7 +1756,7 @@ function Tn(e) {
1753
1756
  className: "richtext-flex richtext-items-center richtext-p-1 richtext-cursor-pointer rd-1 richtext-gap-[4px] hover:richtext-bg-accent",
1754
1757
  onClick: () => f(void 0),
1755
1758
  children: [
1756
- /* @__PURE__ */ r(Hi, {}),
1759
+ /* @__PURE__ */ r(Ii, {}),
1757
1760
  /* @__PURE__ */ r("span", { className: "richtext-ml-1 richtext-text-sm", children: t("editor.nofill") })
1758
1761
  ]
1759
1762
  }
@@ -1765,7 +1768,7 @@ function Tn(e) {
1765
1768
  f(void 0);
1766
1769
  },
1767
1770
  children: [
1768
- /* @__PURE__ */ r(Hi, {}),
1771
+ /* @__PURE__ */ r(Ii, {}),
1769
1772
  /* @__PURE__ */ r("span", { className: "richtext-ml-1 richtext-text-sm", children: t("editor.default") })
1770
1773
  ]
1771
1774
  }
@@ -1863,7 +1866,7 @@ function Cc({ setColor: e }) {
1863
1866
  ) }),
1864
1867
  /* @__PURE__ */ u(ie, { children: [
1865
1868
  /* @__PURE__ */ u("div", { className: "richtext-flex richtext-flex-col richtext-items-center richtext-justify-center", children: [
1866
- /* @__PURE__ */ r(xo, { color: t, onChange: i }),
1869
+ /* @__PURE__ */ r(go, { color: t, onChange: i }),
1867
1870
  /* @__PURE__ */ r(
1868
1871
  te,
1869
1872
  {
@@ -1876,7 +1879,7 @@ function Cc({ setColor: e }) {
1876
1879
  }
1877
1880
  )
1878
1881
  ] }),
1879
- /* @__PURE__ */ r(de, { className: "richtext-my-[10px]" }),
1882
+ /* @__PURE__ */ r(he, { className: "richtext-my-[10px]" }),
1880
1883
  /* @__PURE__ */ r(
1881
1884
  U,
1882
1885
  {
@@ -1884,7 +1887,7 @@ function Cc({ setColor: e }) {
1884
1887
  c.preventDefault(), e(t), a(!1);
1885
1888
  },
1886
1889
  className: "richtext-w-full",
1887
- children: /* @__PURE__ */ r(Qi, { size: 16 })
1890
+ children: /* @__PURE__ */ r(Xi, { size: 16 })
1888
1891
  }
1889
1892
  )
1890
1893
  ] })
@@ -2024,17 +2027,17 @@ video {
2024
2027
  height: auto
2025
2028
  }
2026
2029
  }
2027
- `, Ln = fo({
2030
+ `, Tn = mo({
2028
2031
  theme: "light"
2029
2032
  });
2030
2033
  function Tc() {
2031
- return go(Ln).theme;
2034
+ return fo(Tn).theme;
2032
2035
  }
2033
2036
  const Lc = {
2034
2037
  setTheme: (e) => {
2035
- Ln.theme = e;
2038
+ Tn.theme = e;
2036
2039
  }
2037
- }, Ei = "data-rc-order", Ri = "data-rc-priority", Ac = "rc-util-key", Gt = /* @__PURE__ */ new Map();
2040
+ }, zi = "data-rc-order", Hi = "data-rc-priority", Ac = "rc-util-key", Gt = /* @__PURE__ */ new Map();
2038
2041
  function Sc(e, t) {
2039
2042
  if (!e)
2040
2043
  return !1;
@@ -2048,30 +2051,30 @@ function Sc(e, t) {
2048
2051
  }
2049
2052
  return !1;
2050
2053
  }
2051
- function An({ mark: e } = {}) {
2054
+ function Ln({ mark: e } = {}) {
2052
2055
  return e ? e.startsWith("data-") ? e : `data-${e}` : Ac;
2053
2056
  }
2054
- function gi(e) {
2057
+ function mi(e) {
2055
2058
  return e.attachTo ? e.attachTo : document.querySelector("head") || document.body;
2056
2059
  }
2057
2060
  function Mc(e) {
2058
2061
  return e === "queue" ? "prependQueue" : e ? "prepend" : "append";
2059
2062
  }
2060
- function Sn(e) {
2063
+ function An(e) {
2061
2064
  return [...(Gt.get(e) || e).children].filter(
2062
2065
  (t) => t.tagName === "STYLE"
2063
2066
  );
2064
2067
  }
2065
- function Mn(e, t = {}) {
2068
+ function Sn(e, t = {}) {
2066
2069
  const { csp: i, prepend: n, priority: a = 0 } = t, o = Mc(n), c = o === "prependQueue", s = document.createElement("style");
2067
- s.setAttribute(Ei, o), c && a && s.setAttribute(Ri, `${a}`), i != null && i.nonce && (s.nonce = i == null ? void 0 : i.nonce), s.innerHTML = e;
2068
- const h = gi(t), { firstChild: l } = h;
2070
+ s.setAttribute(zi, o), c && a && s.setAttribute(Hi, `${a}`), i != null && i.nonce && (s.nonce = i == null ? void 0 : i.nonce), s.innerHTML = e;
2071
+ const h = mi(t), { firstChild: l } = h;
2069
2072
  if (n) {
2070
2073
  if (c) {
2071
- const d = Sn(h).filter((m) => {
2072
- if (!["prepend", "prependQueue"].includes(m.getAttribute(Ei)))
2074
+ const d = An(h).filter((m) => {
2075
+ if (!["prepend", "prependQueue"].includes(m.getAttribute(zi)))
2073
2076
  return !1;
2074
- const f = Number(m.getAttribute(Ri) || 0);
2077
+ const f = Number(m.getAttribute(Hi) || 0);
2075
2078
  return a >= f;
2076
2079
  });
2077
2080
  if (d.length > 0)
@@ -2082,30 +2085,30 @@ function Mn(e, t = {}) {
2082
2085
  h.append(s);
2083
2086
  return s;
2084
2087
  }
2085
- function In(e, t = {}) {
2086
- const i = gi(t);
2087
- return Sn(i).find((n) => n.getAttribute(An(t)) === e);
2088
+ function Mn(e, t = {}) {
2089
+ const i = mi(t);
2090
+ return An(i).find((n) => n.getAttribute(Ln(t)) === e);
2088
2091
  }
2089
2092
  function Ic(e, t = {}) {
2090
- const i = In(e, t);
2093
+ const i = Mn(e, t);
2091
2094
  i && i.remove();
2092
2095
  }
2093
2096
  function zc(e, t) {
2094
2097
  const i = Gt.get(e);
2095
2098
  if (!i || !Sc(document, i)) {
2096
- const n = Mn("", t), { parentNode: a } = n;
2099
+ const n = Sn("", t), { parentNode: a } = n;
2097
2100
  Gt.set(e, a), n.remove();
2098
2101
  }
2099
2102
  }
2100
2103
  function Hc(e, t, i = {}) {
2101
2104
  var c, s, h;
2102
- const n = gi(i);
2105
+ const n = mi(i);
2103
2106
  zc(n, i);
2104
- const a = In(t, i);
2107
+ const a = Mn(t, i);
2105
2108
  if (a)
2106
2109
  return (c = i.csp) != null && c.nonce && a.nonce !== ((s = i.csp) == null ? void 0 : s.nonce) && (a.nonce = (h = i.csp) == null ? void 0 : h.nonce), a.innerHTML !== e && (a.innerHTML = e), a;
2107
- const o = Mn(e, i);
2108
- return o.setAttribute(An(i), t), o;
2110
+ const o = Sn(e, i);
2111
+ return o.setAttribute(Ln(i), t), o;
2109
2112
  }
2110
2113
  function Ec({ editor: e, extensions: t }) {
2111
2114
  const { t: i } = F(), n = O(() => {
@@ -2126,16 +2129,16 @@ function Ec({ editor: e, extensions: t }) {
2126
2129
  }
2127
2130
  function Rc(e, t) {
2128
2131
  const { content: i, extensions: n, useEditorOptions: a = {} } = e, o = O(() => {
2129
- const d = Ja(n, n, "name");
2132
+ const d = Za(n, n, "name");
2130
2133
  return [...n.map((f) => {
2131
2134
  const g = n.find((x) => x.name === f.name);
2132
2135
  return g ? f.configure(g.options) : f;
2133
2136
  }), ...d].map((f, g) => f.configure({ sort: g }));
2134
- }, [n]), c = Ne((d) => {
2137
+ }, [n]), c = Le((d) => {
2135
2138
  var f;
2136
2139
  const m = h(d, e.output);
2137
2140
  (f = e == null ? void 0 : e.onChangeContent) == null || f.call(e, m);
2138
- }, io), s = ca({
2141
+ }, to), s = oa({
2139
2142
  extensions: o,
2140
2143
  content: i,
2141
2144
  onUpdate: ({ editor: d }) => {
@@ -2143,7 +2146,7 @@ function Rc(e, t) {
2143
2146
  },
2144
2147
  ...a
2145
2148
  });
2146
- Lt(t, () => ({
2149
+ Tt(t, () => ({
2147
2150
  editor: s
2148
2151
  })), z(() => {
2149
2152
  document.documentElement.classList.toggle("dark", e.dark), Lc.setTheme(e.dark ? "dark" : "light");
@@ -2159,15 +2162,15 @@ function Rc(e, t) {
2159
2162
  var d;
2160
2163
  (d = s == null ? void 0 : s.destroy) == null || d.call(s);
2161
2164
  }, []);
2162
- const l = yn(s, "characterCount");
2163
- return s ? /* @__PURE__ */ r("div", { className: "reactjs-tiptap-editor", children: /* @__PURE__ */ r(So, { delayDuration: 0, children: /* @__PURE__ */ r("div", { className: "richtext-rounded-[0.5rem] richtext-bg-background richtext-shadow richtext-overflow-hidden richtext-outline richtext-outline-1", children: /* @__PURE__ */ u("div", { className: "richtext-flex richtext-flex-col richtext-w-full richtext-max-h-full", children: [
2165
+ const l = vn(s, "characterCount");
2166
+ return s ? /* @__PURE__ */ r("div", { className: "reactjs-tiptap-editor", children: /* @__PURE__ */ r(Ao, { delayDuration: 0, children: /* @__PURE__ */ r("div", { className: "richtext-rounded-[0.5rem] richtext-bg-background richtext-shadow richtext-overflow-hidden richtext-outline richtext-outline-1", children: /* @__PURE__ */ u("div", { className: "richtext-flex richtext-flex-col richtext-w-full richtext-max-h-full", children: [
2164
2167
  !(e != null && e.hideToolbar) && /* @__PURE__ */ r(Oc, { editor: s, disabled: !!(e != null && e.disabled) }),
2165
- /* @__PURE__ */ r(sa, { className: `richtext-relative ${(e == null ? void 0 : e.contentClass) || ""}`, editor: s }),
2168
+ /* @__PURE__ */ r(ca, { className: `richtext-relative ${(e == null ? void 0 : e.contentClass) || ""}`, editor: s }),
2166
2169
  l && /* @__PURE__ */ r(Ec, { editor: s, extensions: n }),
2167
2170
  !(e != null && e.hideBubble) && /* @__PURE__ */ r(kc, { bubbleMenu: e == null ? void 0 : e.bubbleMenu, editor: s, disabled: e == null ? void 0 : e.disabled })
2168
2171
  ] }) }) }) }) : /* @__PURE__ */ r(q, {});
2169
2172
  }
2170
- const kh = Tt(Rc);
2173
+ const kh = Nt(Rc);
2171
2174
  function Oc({ editor: e, disabled: t }) {
2172
2175
  const { t: i, lang: n } = F(), a = O(() => {
2173
2176
  const c = [...e.extensionManager.extensions].sort((h, l) => {
@@ -2209,7 +2212,7 @@ function Oc({ editor: e, disabled: t }) {
2209
2212
  var h, l;
2210
2213
  const s = o.button.component;
2211
2214
  return /* @__PURE__ */ u("div", { className: "richtext-flex richtext-items-center", children: [
2212
- (o == null ? void 0 : o.spacer) && /* @__PURE__ */ r(de, { orientation: "vertical", className: "!richtext-h-[16px] !richtext-mx-[10px]" }),
2215
+ (o == null ? void 0 : o.spacer) && /* @__PURE__ */ r(he, { orientation: "vertical", className: "!richtext-h-[16px] !richtext-mx-[10px]" }),
2213
2216
  /* @__PURE__ */ r(
2214
2217
  s,
2215
2218
  {
@@ -2217,7 +2220,7 @@ function Oc({ editor: e, disabled: t }) {
2217
2220
  disabled: t || ((l = (h = o == null ? void 0 : o.button) == null ? void 0 : h.componentProps) == null ? void 0 : l.disabled)
2218
2221
  }
2219
2222
  ),
2220
- (o == null ? void 0 : o.divider) && /* @__PURE__ */ r(de, { orientation: "vertical", className: "!richtext-h-auto !richtext-mx-2" })
2223
+ (o == null ? void 0 : o.divider) && /* @__PURE__ */ r(he, { orientation: "vertical", className: "!richtext-h-auto !richtext-mx-2" })
2221
2224
  ] }, `toolbar-item-${c}`);
2222
2225
  }) })
2223
2226
  }
@@ -2321,7 +2324,7 @@ function Fc(e) {
2321
2324
  }
2322
2325
  ) });
2323
2326
  }
2324
- function zn(e) {
2327
+ function In(e) {
2325
2328
  return /* @__PURE__ */ r(
2326
2329
  "svg",
2327
2330
  {
@@ -2388,13 +2391,13 @@ function qc() {
2388
2391
  }
2389
2392
  );
2390
2393
  }
2391
- function Hn() {
2394
+ function zn() {
2392
2395
  return /* @__PURE__ */ u("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 32 32", children: [
2393
2396
  /* @__PURE__ */ r("path", { fill: "currentColor", d: "M30 18v-2h-6v10h2v-4h3v-2h-3v-2zm-11 8h-4V16h4a3.003 3.003 0 0 1 3 3v4a3.003 3.003 0 0 1-3 3m-2-2h2a1 1 0 0 0 1-1v-4a1 1 0 0 0-1-1h-2zm-6-8H6v10h2v-3h3a2.003 2.003 0 0 0 2-2v-3a2 2 0 0 0-2-2m-3 5v-3h3l.001 3z" }),
2394
2397
  /* @__PURE__ */ r("path", { fill: "currentColor", d: "M22 14v-4a.91.91 0 0 0-.3-.7l-7-7A.9.9 0 0 0 14 2H4a2.006 2.006 0 0 0-2 2v24a2 2 0 0 0 2 2h16v-2H4V4h8v6a2.006 2.006 0 0 0 2 2h6v2Zm-8-4V4.4l5.6 5.6Z" })
2395
2398
  ] });
2396
2399
  }
2397
- function En() {
2400
+ function Hn() {
2398
2401
  return /* @__PURE__ */ u(
2399
2402
  "svg",
2400
2403
  {
@@ -2456,100 +2459,100 @@ function es() {
2456
2459
  ] }) });
2457
2460
  }
2458
2461
  const ut = {
2459
- Bold: qn,
2460
- LoaderCircle: Kn,
2461
- Italic: Gn,
2462
- Underline: Zn,
2463
- Quote: Jn,
2462
+ Bold: Wn,
2463
+ LoaderCircle: qn,
2464
+ Italic: Kn,
2465
+ Underline: Gn,
2466
+ Quote: Zn,
2464
2467
  TextQuote: Dc,
2465
- Strikethrough: Xn,
2466
- Minus: Yn,
2467
- Eraser: Qn,
2468
- PaintRoller: er,
2469
- Redo2: tr,
2470
- Undo2: ir,
2471
- AlignCenter: po,
2472
- AlignJustify: bo,
2473
- AlignLeft: wo,
2474
- AlignRight: _o,
2475
- ChevronDown: At,
2476
- Subscript: nr,
2477
- Superscript: rr,
2478
- Code: ar,
2479
- Code2: or,
2480
- Type: cr,
2481
- IndentIncrease: sr,
2482
- IndentDecrease: lr,
2483
- List: dr,
2484
- ListOrdered: hr,
2485
- ListTodo: ur,
2486
- Link: mr,
2487
- ImageUp: fr,
2488
- Video: gr,
2489
- Maximize: xr,
2490
- Minimize: pr,
2491
- Table: br,
2492
- Sparkles: wr,
2493
- Pencil: Xi,
2494
- Unlink: _r,
2495
- BetweenHorizonalEnd: vr,
2496
- BetweenHorizonalStart: yr,
2497
- BetweenVerticalStart: kr,
2498
- BetweenVerticalEnd: Cr,
2499
- TableCellsMerge: Nr,
2500
- TableCellsSplit: Tr,
2501
- Trash2: Yi,
2502
- Trash: Lr,
2503
- Replace: yi,
2504
- ChevronsUpDown: Ar,
2468
+ Strikethrough: Jn,
2469
+ Minus: Xn,
2470
+ Eraser: Yn,
2471
+ PaintRoller: Qn,
2472
+ Redo2: er,
2473
+ Undo2: tr,
2474
+ AlignCenter: xo,
2475
+ AlignJustify: po,
2476
+ AlignLeft: bo,
2477
+ AlignRight: wo,
2478
+ ChevronDown: Lt,
2479
+ Subscript: ir,
2480
+ Superscript: nr,
2481
+ Code: rr,
2482
+ Code2: ar,
2483
+ Type: or,
2484
+ IndentIncrease: cr,
2485
+ IndentDecrease: sr,
2486
+ List: lr,
2487
+ ListOrdered: dr,
2488
+ ListTodo: hr,
2489
+ Link: ur,
2490
+ ImageUp: mr,
2491
+ Video: fr,
2492
+ Maximize: gr,
2493
+ Minimize: xr,
2494
+ Table: pr,
2495
+ Sparkles: br,
2496
+ Pencil: Zi,
2497
+ Unlink: wr,
2498
+ BetweenHorizonalEnd: _r,
2499
+ BetweenHorizonalStart: vr,
2500
+ BetweenVerticalStart: yr,
2501
+ BetweenVerticalEnd: kr,
2502
+ TableCellsMerge: Cr,
2503
+ TableCellsSplit: Nr,
2504
+ Trash2: Ji,
2505
+ Trash: Tr,
2506
+ Replace: _i,
2507
+ ChevronsUpDown: Lr,
2505
2508
  LineHeight: Fc,
2506
2509
  Word: jc,
2507
- Heading1: Sr,
2508
- Heading2: Mr,
2509
- Heading3: Ir,
2510
- Heading4: zr,
2511
- Heading5: Hr,
2512
- Heading6: Er,
2513
- Columns2: ki,
2514
- Columns3: Rr,
2515
- Columns4: Or,
2516
- Plus: Qi,
2517
- Grip: Pr,
2518
- Copy: en,
2519
- Clipboard: Dr,
2520
- PanelLeft: $r,
2521
- PanelRight: Br,
2522
- Columns: ki,
2523
- Iframe: jr,
2524
- MenuDown: zn,
2510
+ Heading1: Ar,
2511
+ Heading2: Sr,
2512
+ Heading3: Mr,
2513
+ Heading4: Ir,
2514
+ Heading5: zr,
2515
+ Heading6: Hr,
2516
+ Columns2: vi,
2517
+ Columns3: Er,
2518
+ Columns4: Rr,
2519
+ Plus: Xi,
2520
+ Grip: Or,
2521
+ Copy: Yi,
2522
+ Clipboard: Pr,
2523
+ PanelLeft: Dr,
2524
+ PanelRight: $r,
2525
+ Columns: vi,
2526
+ Iframe: Br,
2527
+ MenuDown: In,
2525
2528
  SizeS: Wc,
2526
2529
  SizeM: Vc,
2527
2530
  SizeL: Uc,
2528
2531
  AspectRatio: Pc,
2529
- Emoji: Fr,
2532
+ Emoji: jr,
2530
2533
  DeleteColumn: $c,
2531
2534
  DeleteRow: Bc,
2532
- SearchAndReplace: yi,
2533
- EmojiIcon: Ur,
2534
- KatexIcon: Vr,
2535
- ExportPdf: Hn,
2536
- ExportWord: En,
2535
+ SearchAndReplace: _i,
2536
+ EmojiIcon: Fr,
2537
+ KatexIcon: Ur,
2538
+ ExportPdf: zn,
2539
+ ExportWord: Hn,
2537
2540
  ImportWord: qc,
2538
2541
  ColumnAddLeft: Kc,
2539
2542
  ColumnAddRight: Gc,
2540
- BookMarked: Wr,
2543
+ BookMarked: Vr,
2541
2544
  Excalidraw: Zc,
2542
- ZoomIn: qr,
2543
- ZoomOut: Kr,
2544
- Settings: Gr,
2545
- Eye: Zr,
2545
+ ZoomIn: Wr,
2546
+ ZoomOut: qr,
2547
+ Settings: Kr,
2548
+ Eye: Gr,
2546
2549
  TextDirection: Jc,
2547
2550
  LeftToRight: Xc,
2548
2551
  RightToLeft: Yc,
2549
- Attachment: Jr,
2552
+ Attachment: Zr,
2550
2553
  GifIcon: Qc,
2551
- ChevronUp: Zi,
2552
- Crop: Xr,
2554
+ ChevronUp: Ki,
2555
+ Crop: Jr,
2553
2556
  Mermaid: es
2554
2557
  };
2555
2558
  function ts(e) {
@@ -2663,8 +2666,8 @@ function os(e) {
2663
2666
  componentProps: {
2664
2667
  tooltip: W.t(`editor.${n.replace("-", ".")}.tooltip`),
2665
2668
  icon: i[a],
2666
- action: () => e.commands.updateVideo({ width: Ft[n] }),
2667
- isActive: () => e.isActive("video", { width: Ft[n] })
2669
+ action: () => e.commands.updateVideo({ width: jt[n] }),
2670
+ isActive: () => e.isActive("video", { width: jt[n] })
2668
2671
  }
2669
2672
  }));
2670
2673
  }
@@ -2681,7 +2684,7 @@ function cs(e) {
2681
2684
  icon: "Trash2",
2682
2685
  action: () => {
2683
2686
  const { state: t, dispatch: i } = e.view;
2684
- St(t, i);
2687
+ At(t, i);
2685
2688
  }
2686
2689
  }
2687
2690
  }
@@ -2700,7 +2703,7 @@ function ss(e) {
2700
2703
  icon: "Trash2",
2701
2704
  action: () => {
2702
2705
  const { state: t, dispatch: i } = e.view;
2703
- St(t, i);
2706
+ At(t, i);
2704
2707
  }
2705
2708
  }
2706
2709
  }
@@ -2729,7 +2732,7 @@ function ls(e) {
2729
2732
  icon: "Trash2",
2730
2733
  action: () => {
2731
2734
  const { state: t, dispatch: i } = e.view;
2732
- St(t, i);
2735
+ At(t, i);
2733
2736
  }
2734
2737
  }
2735
2738
  }
@@ -2747,14 +2750,14 @@ function ds(e) {
2747
2750
  icon: "Trash2",
2748
2751
  action: () => {
2749
2752
  const { state: t, dispatch: i } = e.view;
2750
- St(t, i);
2753
+ At(t, i);
2751
2754
  }
2752
2755
  }
2753
2756
  }
2754
2757
  ];
2755
2758
  }
2756
2759
  function hs(e, t) {
2757
- return no.reduce((i, n) => {
2760
+ return io.reduce((i, n) => {
2758
2761
  if (n === "divider" && i.length > 0)
2759
2762
  return [...i, {
2760
2763
  type: "divider",
@@ -2765,18 +2768,18 @@ function hs(e, t) {
2765
2768
  return a ? [...i, a.configure().options.button({ editor: e, t, extension: a })] : i;
2766
2769
  }, []);
2767
2770
  }
2768
- var Ce = /* @__PURE__ */ ((e) => (e[e.max = 7] = "max", e[e.min = 0] = "min", e[e.more = 1] = "more", e[e.less = -1] = "less", e))(Ce || {});
2771
+ var Te = /* @__PURE__ */ ((e) => (e[e.max = 7] = "max", e[e.min = 0] = "min", e[e.more = 1] = "more", e[e.less = -1] = "less", e))(Te || {});
2769
2772
  function us(e, t, i) {
2770
2773
  return e < t ? t : e > i ? i : e;
2771
2774
  }
2772
2775
  function ms(e, t, i, n) {
2773
2776
  const { doc: a, selection: o } = e;
2774
- if (!a || !o || !(o instanceof Te || o instanceof on))
2777
+ if (!a || !o || !(o instanceof Ae || o instanceof rn))
2775
2778
  return e;
2776
2779
  const { from: c, to: s } = o;
2777
2780
  return a.nodesBetween(c, s, (h, l) => {
2778
2781
  const d = h.type;
2779
- return i.includes(d.name) ? (e = Zt(e, l, t), !1) : !la(h.type.name, n.extensionManager.extensions);
2782
+ return i.includes(d.name) ? (e = Zt(e, l, t), !1) : !sa(h.type.name, n.extensionManager.extensions);
2780
2783
  }), e;
2781
2784
  }
2782
2785
  function Zt(e, t, i) {
@@ -2794,7 +2797,7 @@ function Zt(e, t, i) {
2794
2797
  };
2795
2798
  return e.setNodeMarkup(t, n.type, s, n.marks);
2796
2799
  }
2797
- function Oi({ delta: e, types: t }) {
2800
+ function Ei({ delta: e, types: t }) {
2798
2801
  return ({ state: i, dispatch: n, editor: a }) => {
2799
2802
  const { selection: o } = i;
2800
2803
  let { tr: c } = i;
@@ -2803,9 +2806,9 @@ function Oi({ delta: e, types: t }) {
2803
2806
  }
2804
2807
  function fs(e) {
2805
2808
  var y, R, A;
2806
- const { pluginKey: t = yo } = e, { t: i } = F(), [n, a] = w(null), [o, c] = w(-1), s = X(null), h = X(null), [l, d] = w(!1), m = e.editor.extensionManager.extensions.some((N) => N.name === "textAlign"), f = e.editor.extensionManager.extensions.some((N) => N.name === "indent"), g = e.editor.extensionManager.extensions.some((N) => N.name === "clear");
2809
+ const { pluginKey: t = vo } = e, { t: i } = F(), [n, a] = w(null), [o, c] = w(-1), s = X(null), h = X(null), [l, d] = w(!1), m = e.editor.extensionManager.extensions.some((N) => N.name === "textAlign"), f = e.editor.extensionManager.extensions.some((N) => N.name === "indent"), g = e.editor.extensionManager.extensions.some((N) => N.name === "clear");
2807
2810
  z(() => {
2808
- s.current && !e.editor.isDestroyed && (h.current = vo({
2811
+ s.current && !e.editor.isDestroyed && (h.current = _o({
2809
2812
  editor: e.editor,
2810
2813
  element: s.current,
2811
2814
  pluginKey: "ContentItemMenu",
@@ -2888,7 +2891,7 @@ function fs(e) {
2888
2891
  children: /* @__PURE__ */ r(D, { name: "Plus", className: "richtext-text-lg richtext-text-neutral-600 dark:richtext-text-neutral-200" })
2889
2892
  }
2890
2893
  ),
2891
- /* @__PURE__ */ u(Ae, { open: l, onOpenChange: $, children: [
2894
+ /* @__PURE__ */ u(_e, { open: l, onOpenChange: $, children: [
2892
2895
  /* @__PURE__ */ u("div", { className: "richtext-relative richtext-flex richtext-flex-col", children: [
2893
2896
  /* @__PURE__ */ u(Ke, { children: [
2894
2897
  /* @__PURE__ */ r(Ge, { asChild: !0, disabled: e == null ? void 0 : e.disabled, children: /* @__PURE__ */ r(
@@ -2907,11 +2910,11 @@ function fs(e) {
2907
2910
  ) }),
2908
2911
  /* @__PURE__ */ r(Ie, { children: i("editor.draghandle.tooltip") })
2909
2912
  ] }),
2910
- /* @__PURE__ */ r(Se, { className: "richtext-absolute richtext-top-0 richtext-left-0 richtext-w-[28px] richtext-h-[28px] richtext-z-0" })
2913
+ /* @__PURE__ */ r(ve, { className: "richtext-absolute richtext-top-0 richtext-left-0 richtext-w-[28px] richtext-h-[28px] richtext-z-0" })
2911
2914
  ] }),
2912
- /* @__PURE__ */ u(we, { className: "richtext-w-48", align: "start", side: "bottom", sideOffset: 0, children: [
2915
+ /* @__PURE__ */ u(pe, { className: "richtext-w-48", align: "start", side: "bottom", sideOffset: 0, children: [
2913
2916
  /* @__PURE__ */ u(
2914
- fe,
2917
+ le,
2915
2918
  {
2916
2919
  onClick: C,
2917
2920
  className: "richtext-flex richtext-gap-3 focus:richtext-text-red-500 focus:richtext-bg-red-400 hover:richtext-bg-red-400 dark:hover:richtext-text-red-500 richtext-bg-opacity-10 hover:richtext-bg-opacity-20 focus:richtext-bg-opacity-30 dark:hover:richtext-bg-opacity-20",
@@ -2921,51 +2924,51 @@ function fs(e) {
2921
2924
  ]
2922
2925
  }
2923
2926
  ),
2924
- g ? /* @__PURE__ */ u(fe, { className: "richtext-flex richtext-gap-3", onClick: x, children: [
2927
+ g ? /* @__PURE__ */ u(le, { className: "richtext-flex richtext-gap-3", onClick: x, children: [
2925
2928
  /* @__PURE__ */ r(D, { name: "PaintRoller" }),
2926
2929
  /* @__PURE__ */ r("span", { children: i("editor.clear.tooltip") })
2927
2930
  ] }) : null,
2928
- /* @__PURE__ */ u(fe, { className: "richtext-flex richtext-gap-3", onClick: b, children: [
2931
+ /* @__PURE__ */ u(le, { className: "richtext-flex richtext-gap-3", onClick: b, children: [
2929
2932
  /* @__PURE__ */ r(D, { name: "Clipboard" }),
2930
2933
  /* @__PURE__ */ r("span", { children: i("editor.copyToClipboard") })
2931
2934
  ] }),
2932
- /* @__PURE__ */ u(fe, { className: "richtext-flex richtext-gap-3", onClick: k, children: [
2935
+ /* @__PURE__ */ u(le, { className: "richtext-flex richtext-gap-3", onClick: k, children: [
2933
2936
  /* @__PURE__ */ r(D, { name: "Copy" }),
2934
2937
  /* @__PURE__ */ r("span", { children: i("editor.copy") })
2935
2938
  ] }),
2936
- m || f ? /* @__PURE__ */ r(zt, {}) : null,
2937
- m ? /* @__PURE__ */ u(Li, { children: [
2938
- /* @__PURE__ */ u(Vt, { className: "richtext-flex richtext-gap-3", children: [
2939
+ m || f ? /* @__PURE__ */ r(It, {}) : null,
2940
+ m ? /* @__PURE__ */ u(Ni, { children: [
2941
+ /* @__PURE__ */ u(Ut, { className: "richtext-flex richtext-gap-3", children: [
2939
2942
  /* @__PURE__ */ r(D, { name: "AlignCenter" }),
2940
2943
  /* @__PURE__ */ r("span", { children: i("editor.textalign.tooltip") })
2941
2944
  ] }),
2942
- /* @__PURE__ */ r(Ti, { children: /* @__PURE__ */ u(Wt, { children: [
2943
- /* @__PURE__ */ u(fe, { className: "richtext-flex richtext-gap-3", onClick: () => L("left"), children: [
2945
+ /* @__PURE__ */ r(Ci, { children: /* @__PURE__ */ u(Vt, { children: [
2946
+ /* @__PURE__ */ u(le, { className: "richtext-flex richtext-gap-3", onClick: () => L("left"), children: [
2944
2947
  /* @__PURE__ */ r(D, { name: "AlignLeft" }),
2945
2948
  /* @__PURE__ */ r("span", { children: i("editor.textalign.left.tooltip") })
2946
2949
  ] }),
2947
- /* @__PURE__ */ u(fe, { className: "richtext-flex richtext-gap-3", onClick: () => L("center"), children: [
2950
+ /* @__PURE__ */ u(le, { className: "richtext-flex richtext-gap-3", onClick: () => L("center"), children: [
2948
2951
  /* @__PURE__ */ r(D, { name: "AlignCenter" }),
2949
2952
  /* @__PURE__ */ r("span", { children: i("editor.textalign.center.tooltip") })
2950
2953
  ] }),
2951
- /* @__PURE__ */ u(fe, { className: "richtext-flex richtext-gap-3", onClick: () => L("right"), children: [
2954
+ /* @__PURE__ */ u(le, { className: "richtext-flex richtext-gap-3", onClick: () => L("right"), children: [
2952
2955
  /* @__PURE__ */ r(D, { name: "AlignRight" }),
2953
2956
  /* @__PURE__ */ r("span", { children: i("editor.textalign.right.tooltip") })
2954
2957
  ] })
2955
2958
  ] }) })
2956
2959
  ] }) : null,
2957
- f ? /* @__PURE__ */ u(Li, { children: [
2958
- /* @__PURE__ */ u(Vt, { className: "richtext-flex richtext-gap-3", children: [
2960
+ f ? /* @__PURE__ */ u(Ni, { children: [
2961
+ /* @__PURE__ */ u(Ut, { className: "richtext-flex richtext-gap-3", children: [
2959
2962
  /* @__PURE__ */ r(D, { name: "IndentIncrease" }),
2960
2963
  /* @__PURE__ */ r("span", { children: i("editor.indent") })
2961
2964
  ] }),
2962
- /* @__PURE__ */ r(Ti, { children: /* @__PURE__ */ u(Wt, { children: [
2965
+ /* @__PURE__ */ r(Ci, { children: /* @__PURE__ */ u(Vt, { children: [
2963
2966
  /* @__PURE__ */ u(
2964
- fe,
2967
+ le,
2965
2968
  {
2966
2969
  className: "richtext-flex richtext-gap-3",
2967
2970
  onClick: p,
2968
- disabled: ((R = n == null ? void 0 : n.attrs) == null ? void 0 : R.indent) >= Ce.max,
2971
+ disabled: ((R = n == null ? void 0 : n.attrs) == null ? void 0 : R.indent) >= Te.max,
2969
2972
  children: [
2970
2973
  /* @__PURE__ */ r(D, { name: "IndentIncrease" }),
2971
2974
  /* @__PURE__ */ r("span", { children: i("editor.indent.tooltip") })
@@ -2973,11 +2976,11 @@ function fs(e) {
2973
2976
  }
2974
2977
  ),
2975
2978
  /* @__PURE__ */ u(
2976
- fe,
2979
+ le,
2977
2980
  {
2978
2981
  className: "richtext-flex richtext-gap-3",
2979
2982
  onClick: v,
2980
- disabled: ((A = n == null ? void 0 : n.attrs) == null ? void 0 : A.indent) <= Ce.min,
2983
+ disabled: ((A = n == null ? void 0 : n.attrs) == null ? void 0 : A.indent) <= Te.min,
2981
2984
  children: [
2982
2985
  /* @__PURE__ */ r(D, { name: "IndentDecrease" }),
2983
2986
  /* @__PURE__ */ r("span", { children: i("editor.outdent.tooltip") })
@@ -3013,10 +3016,10 @@ function xs({ item: e, disabled: t, editor: i }) {
3013
3016
  function ps(e) {
3014
3017
  const { t, lang: i } = F(), n = ({ editor: o }) => {
3015
3018
  const { selection: c } = o.view.state, { $from: s, to: h } = c;
3016
- return s.pos === h ? !1 : c instanceof Te;
3019
+ return s.pos === h ? !1 : c instanceof Ae;
3017
3020
  }, a = O(() => e.disabled || !(e != null && e.editor) ? [] : hs(e.editor, t), [e.disabled, e.editor, i, t]);
3018
- return /* @__PURE__ */ r(he, { shouldShow: n, editor: e == null ? void 0 : e.editor, tippyOptions: gs, children: a != null && a.length ? /* @__PURE__ */ r("div", { className: "richtext-w-auto richtext-px-3 richtext-py-2 richtext-transition-all !richtext-border richtext-rounded-sm richtext-shadow-sm richtext-pointer-events-auto richtext-select-none richtext-border-neutral-200 dark:richtext-border-neutral-800 richtext-bg-background", children: /* @__PURE__ */ r("div", { className: "richtext-flex richtext-items-center richtext-gap-[4px] richtext-flex-nowrap richtext-whitespace-nowrap richtext-h-[26px] richtext-justify-start richtext-relative", children: a == null ? void 0 : a.map((o, c) => (o == null ? void 0 : o.type) === "divider" ? /* @__PURE__ */ r(
3019
- de,
3021
+ return /* @__PURE__ */ r(ue, { shouldShow: n, editor: e == null ? void 0 : e.editor, tippyOptions: gs, children: a != null && a.length ? /* @__PURE__ */ r("div", { className: "richtext-w-auto richtext-px-3 richtext-py-2 richtext-transition-all !richtext-border richtext-rounded-sm richtext-shadow-sm richtext-pointer-events-auto richtext-select-none richtext-border-neutral-200 dark:richtext-border-neutral-800 richtext-bg-background", children: /* @__PURE__ */ r("div", { className: "richtext-flex richtext-items-center richtext-gap-[4px] richtext-flex-nowrap richtext-whitespace-nowrap richtext-h-[26px] richtext-justify-start richtext-relative", children: a == null ? void 0 : a.map((o, c) => (o == null ? void 0 : o.type) === "divider" ? /* @__PURE__ */ r(
3022
+ he,
3020
3023
  {
3021
3024
  orientation: "vertical",
3022
3025
  className: "!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]"
@@ -3084,7 +3087,7 @@ function bs({ fill: e }) {
3084
3087
  }
3085
3088
  );
3086
3089
  }
3087
- function Rn(e) {
3090
+ function En(e) {
3088
3091
  const [t, i] = w(void 0);
3089
3092
  function n(c) {
3090
3093
  var s;
@@ -3113,7 +3116,7 @@ function Rn(e) {
3113
3116
  }
3114
3117
  ),
3115
3118
  /* @__PURE__ */ r(
3116
- Tn,
3119
+ Nn,
3117
3120
  {
3118
3121
  selectedColor: t,
3119
3122
  setSelectedColor: o,
@@ -3127,7 +3130,7 @@ function Rn(e) {
3127
3130
  }
3128
3131
  function ws({ editor: e }) {
3129
3132
  var x, b, k, L, p, v, C, T, I, $, y, R, A, N, B, S, E, H;
3130
- const t = ({ editor: J }) => da(J.view.state, "table"), { t: i } = F();
3133
+ const t = ({ editor: J }) => la(J.view.state, "table"), { t: i } = F();
3131
3134
  function n() {
3132
3135
  e.chain().focus().addColumnBefore().run();
3133
3136
  }
@@ -3159,7 +3162,7 @@ function ws({ editor: e }) {
3159
3162
  e.chain().focus().setTableCellBackground(J).run();
3160
3163
  }
3161
3164
  return /* @__PURE__ */ r(
3162
- he,
3165
+ ue,
3163
3166
  {
3164
3167
  editor: e,
3165
3168
  pluginKey: "table",
@@ -3172,7 +3175,7 @@ function ws({ editor: e }) {
3172
3175
  },
3173
3176
  maxWidth: "auto",
3174
3177
  getReferenceClientRect: () => {
3175
- var vi;
3178
+ var wi;
3176
3179
  const {
3177
3180
  view: J,
3178
3181
  state: {
@@ -3181,10 +3184,10 @@ function ws({ editor: e }) {
3181
3184
  } = e, xe = J.domAtPos(Q).node;
3182
3185
  if (!xe)
3183
3186
  return new DOMRect(-1e3, -1e3, 0, 0);
3184
- const _i = (vi = xe == null ? void 0 : xe.closest) == null ? void 0 : vi.call(xe, ".tableWrapper");
3185
- return _i ? _i.getBoundingClientRect() : new DOMRect(-1e3, -1e3, 0, 0);
3187
+ const bi = (wi = xe == null ? void 0 : xe.closest) == null ? void 0 : wi.call(xe, ".tableWrapper");
3188
+ return bi ? bi.getBoundingClientRect() : new DOMRect(-1e3, -1e3, 0, 0);
3186
3189
  },
3187
- plugins: [so],
3190
+ plugins: [co],
3188
3191
  sticky: "popper"
3189
3192
  },
3190
3193
  children: /* @__PURE__ */ u("div", { className: "richtext-min-w-32 richtext-flex richtext-flex-row richtext-h-full richtext-items-center richtext-leading-none richtext-gap-0.5 richtext-p-2 richtext-w-full richtext-bg-background richtext-rounded-lg richtext-shadow-sm !richtext-border richtext-border-border", children: [
@@ -3224,7 +3227,7 @@ function ws({ editor: e }) {
3224
3227
  disabled: !((v = e == null ? void 0 : (p = e.can()).deleteColumn) != null && v.call(p))
3225
3228
  }
3226
3229
  ),
3227
- /* @__PURE__ */ r(de, { orientation: "vertical", className: "!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]" }),
3230
+ /* @__PURE__ */ r(he, { orientation: "vertical", className: "!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]" }),
3228
3231
  /* @__PURE__ */ r(
3229
3232
  _,
3230
3233
  {
@@ -3261,7 +3264,7 @@ function ws({ editor: e }) {
3261
3264
  disabled: !((R = (y = e == null ? void 0 : e.can()) == null ? void 0 : y.deleteRow) != null && R.call(y))
3262
3265
  }
3263
3266
  ),
3264
- /* @__PURE__ */ r(de, { orientation: "vertical", className: "!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]" }),
3267
+ /* @__PURE__ */ r(he, { orientation: "vertical", className: "!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]" }),
3265
3268
  /* @__PURE__ */ r(
3266
3269
  _,
3267
3270
  {
@@ -3286,9 +3289,9 @@ function ws({ editor: e }) {
3286
3289
  disabled: !((S = (B = e == null ? void 0 : e.can()) == null ? void 0 : B.splitCell) != null && S.call(B))
3287
3290
  }
3288
3291
  ),
3289
- /* @__PURE__ */ r(de, { orientation: "vertical", className: "!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]" }),
3292
+ /* @__PURE__ */ r(he, { orientation: "vertical", className: "!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]" }),
3290
3293
  /* @__PURE__ */ r(
3291
- Rn,
3294
+ En,
3292
3295
  {
3293
3296
  editor: e,
3294
3297
  tooltip: i("editor.table.menu.setCellsBgColor"),
@@ -3314,7 +3317,7 @@ function ws({ editor: e }) {
3314
3317
  }
3315
3318
  );
3316
3319
  }
3317
- function On(e) {
3320
+ function Rn(e) {
3318
3321
  const { t } = F(), [i, n] = w({
3319
3322
  text: "",
3320
3323
  link: ""
@@ -3333,7 +3336,7 @@ function On(e) {
3333
3336
  s.preventDefault(), e == null || e.onSetLink(i.link, i.text, a);
3334
3337
  }
3335
3338
  return /* @__PURE__ */ r("div", { className: "richtext-p-2 richtext-bg-white !richtext-border richtext-rounded-lg richtext-shadow-sm dark:richtext-bg-black border-neutral-200 dark:richtext-border-neutral-800", children: /* @__PURE__ */ u("form", { className: "richtext-flex richtext-flex-col richtext-gap-2", onSubmit: c, children: [
3336
- /* @__PURE__ */ r(le, { className: "mb-[6px]", children: t("editor.link.dialog.text") }),
3339
+ /* @__PURE__ */ r(de, { className: "mb-[6px]", children: t("editor.link.dialog.text") }),
3337
3340
  /* @__PURE__ */ r("div", { className: "richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5 richtext-mb-[10px]", children: /* @__PURE__ */ r("div", { className: "richtext-relative richtext-items-center richtext-w-full richtext-max-w-sm", children: /* @__PURE__ */ r(
3338
3341
  te,
3339
3342
  {
@@ -3345,7 +3348,7 @@ function On(e) {
3345
3348
  onChange: (s) => n({ ...i, text: s.target.value })
3346
3349
  }
3347
3350
  ) }) }),
3348
- /* @__PURE__ */ r(le, { className: "mb-[6px]", children: t("editor.link.dialog.link") }),
3351
+ /* @__PURE__ */ r(de, { className: "mb-[6px]", children: t("editor.link.dialog.link") }),
3349
3352
  /* @__PURE__ */ r("div", { className: "richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5", children: /* @__PURE__ */ u("div", { className: "richtext-relative richtext-items-center richtext-w-full richtext-max-w-sm", children: [
3350
3353
  /* @__PURE__ */ r(
3351
3354
  te,
@@ -3360,7 +3363,7 @@ function On(e) {
3360
3363
  /* @__PURE__ */ r("span", { className: "richtext-absolute richtext-inset-y-0 richtext-flex richtext-items-center richtext-justify-center richtext-px-2 richtext-start-0", children: /* @__PURE__ */ r(D, { className: "richtext-size-5 richtext-text-muted-foreground", name: "Link" }) })
3361
3364
  ] }) }),
3362
3365
  /* @__PURE__ */ u("div", { className: "richtext-flex richtext-items-center richtext-space-x-2", children: [
3363
- /* @__PURE__ */ r(le, { children: t("editor.link.dialog.openInNewTab") }),
3366
+ /* @__PURE__ */ r(de, { children: t("editor.link.dialog.openInNewTab") }),
3364
3367
  /* @__PURE__ */ r(
3365
3368
  li,
3366
3369
  {
@@ -3384,13 +3387,13 @@ function _s(e) {
3384
3387
  target: "_blank",
3385
3388
  rel: "noopener noreferrer",
3386
3389
  className: "richtext-text-sm richtext-underline richtext-break-all",
3387
- children: Xa(e == null ? void 0 : e.link, {
3390
+ children: Ja(e == null ? void 0 : e.link, {
3388
3391
  length: 50,
3389
3392
  omission: "…"
3390
3393
  })
3391
3394
  }
3392
3395
  ),
3393
- (e == null ? void 0 : e.link) && /* @__PURE__ */ r(de, { orientation: "vertical", className: "!richtext-h-4" }),
3396
+ (e == null ? void 0 : e.link) && /* @__PURE__ */ r(he, { orientation: "vertical", className: "!richtext-h-4" }),
3394
3397
  /* @__PURE__ */ u("div", { className: "richtext-flex richtext-flex-nowrap", children: [
3395
3398
  /* @__PURE__ */ r(
3396
3399
  _,
@@ -3439,7 +3442,7 @@ function vs({ editor: e, disabled: t }) {
3439
3442
  e.chain().extendMarkRange("link").unsetLink().focus().run(), n(!1);
3440
3443
  }, [e]);
3441
3444
  return /* @__PURE__ */ r(q, { children: /* @__PURE__ */ r(
3442
- he,
3445
+ ue,
3443
3446
  {
3444
3447
  editor: e,
3445
3448
  shouldShow: o,
@@ -3454,7 +3457,7 @@ function vs({ editor: e, disabled: t }) {
3454
3457
  n(!1);
3455
3458
  }
3456
3459
  },
3457
- children: t ? /* @__PURE__ */ r(q, {}) : /* @__PURE__ */ r(q, { children: i ? /* @__PURE__ */ r(On, { onSetLink: c, editor: e }) : /* @__PURE__ */ r(
3460
+ children: t ? /* @__PURE__ */ r(q, {}) : /* @__PURE__ */ r(q, { children: i ? /* @__PURE__ */ r(Rn, { onSetLink: c, editor: e }) : /* @__PURE__ */ r(
3458
3461
  _s,
3459
3462
  {
3460
3463
  editor: e,
@@ -3468,16 +3471,16 @@ function vs({ editor: e, disabled: t }) {
3468
3471
  }
3469
3472
  ) });
3470
3473
  }
3471
- const xi = {
3474
+ const fi = {
3472
3475
  maxWidth: "auto",
3473
3476
  zIndex: 20,
3474
3477
  appendTo: "parent",
3475
3478
  moveTransition: "transform 0.1s ease-out"
3476
3479
  };
3477
- function pi({ item: e, disabled: t, editor: i }) {
3480
+ function gi({ item: e, disabled: t, editor: i }) {
3478
3481
  var a;
3479
3482
  const n = e.component;
3480
- return n ? /* @__PURE__ */ r(nt, { children: e.type === "divider" ? /* @__PURE__ */ r(de, { orientation: "vertical", className: "!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]" }) : /* @__PURE__ */ r(
3483
+ return n ? /* @__PURE__ */ r(nt, { children: e.type === "divider" ? /* @__PURE__ */ r(he, { orientation: "vertical", className: "!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]" }) : /* @__PURE__ */ r(
3481
3484
  n,
3482
3485
  {
3483
3486
  ...e.componentProps,
@@ -3490,7 +3493,7 @@ function ys(e) {
3490
3493
  return e.type.name === "image";
3491
3494
  }
3492
3495
  function ks(e) {
3493
- return e.type.name === Bn.name;
3496
+ return e.type.name === $n.name;
3494
3497
  }
3495
3498
  function Cs(e) {
3496
3499
  return e.type.name === "video";
@@ -3505,13 +3508,13 @@ function Ns(e) {
3505
3508
  }), h;
3506
3509
  }, n = O(() => e.disabled ? [] : cs(e.editor), [e.disabled, e.editor, t]);
3507
3510
  return /* @__PURE__ */ r(q, { children: /* @__PURE__ */ r(
3508
- he,
3511
+ ue,
3509
3512
  {
3510
3513
  shouldShow: i,
3511
3514
  editor: e == null ? void 0 : e.editor,
3512
- tippyOptions: xi,
3515
+ tippyOptions: fi,
3513
3516
  children: n != null && n.length ? /* @__PURE__ */ r("div", { className: "richtext-w-auto richtext-px-3 richtext-py-2 richtext-transition-all !richtext-border richtext-rounded-sm richtext-shadow-sm richtext-pointer-events-auto richtext-select-none richtext-border-neutral-200 dark:richtext-border-neutral-800 richtext-bg-background", children: /* @__PURE__ */ r("div", { className: "richtext-flex richtext-items-center richtext-flex-nowrap richtext-whitespace-nowrap richtext-h-[26px] richtext-justify-start richtext-relative", children: n == null ? void 0 : n.map((a, o) => /* @__PURE__ */ r(
3514
- pi,
3517
+ gi,
3515
3518
  {
3516
3519
  item: a,
3517
3520
  disabled: e.disabled,
@@ -3532,13 +3535,13 @@ function Ts(e) {
3532
3535
  }), h;
3533
3536
  }, n = O(() => e.disabled ? [] : ss(e.editor), [e.disabled, e.editor, t]);
3534
3537
  return /* @__PURE__ */ r(q, { children: /* @__PURE__ */ r(
3535
- he,
3538
+ ue,
3536
3539
  {
3537
3540
  shouldShow: i,
3538
3541
  editor: e == null ? void 0 : e.editor,
3539
- tippyOptions: xi,
3542
+ tippyOptions: fi,
3540
3543
  children: n != null && n.length ? /* @__PURE__ */ r("div", { className: "richtext-w-auto richtext-px-3 richtext-py-2 richtext-transition-all !richtext-border richtext-rounded-sm richtext-shadow-sm richtext-pointer-events-auto richtext-select-none richtext-border-neutral-200 dark:richtext-border-neutral-800 richtext-bg-background", children: /* @__PURE__ */ r("div", { className: "richtext-flex richtext-items-center richtext-flex-nowrap richtext-whitespace-nowrap richtext-h-[26px] richtext-justify-start richtext-relative", children: n == null ? void 0 : n.map((a, o) => /* @__PURE__ */ r(
3541
- pi,
3544
+ gi,
3542
3545
  {
3543
3546
  item: a,
3544
3547
  disabled: e.disabled,
@@ -3559,13 +3562,13 @@ function Ls(e) {
3559
3562
  }), h;
3560
3563
  }, n = O(() => e.disabled ? [] : ds(e.editor), [e.editor, e.disabled, t]);
3561
3564
  return /* @__PURE__ */ r(q, { children: /* @__PURE__ */ r(
3562
- he,
3565
+ ue,
3563
3566
  {
3564
3567
  shouldShow: i,
3565
3568
  editor: e == null ? void 0 : e.editor,
3566
- tippyOptions: xi,
3569
+ tippyOptions: fi,
3567
3570
  children: n != null && n.length ? /* @__PURE__ */ r("div", { className: "richtext-w-auto richtext-px-3 richtext-py-2 richtext-transition-all !richtext-border richtext-rounded-sm richtext-shadow-sm richtext-pointer-events-auto richtext-select-none richtext-border-neutral-200 dark:richtext-border-neutral-800 richtext-bg-background", children: /* @__PURE__ */ r("div", { className: "richtext-flex richtext-items-center richtext-flex-nowrap richtext-whitespace-nowrap richtext-h-[26px] richtext-justify-start richtext-relative", children: n == null ? void 0 : n.map((a, o) => /* @__PURE__ */ r(
3568
- pi,
3571
+ gi,
3569
3572
  {
3570
3573
  item: a,
3571
3574
  disabled: e.disabled,
@@ -3579,7 +3582,7 @@ function Ls(e) {
3579
3582
  function As({ editor: e }) {
3580
3583
  const { t } = F(), i = M(() => e.isActive(it.name), [e]), n = M(() => at(it.name, e), [e]), a = M(() => e.chain().focus().addColBefore().run(), [e]), o = M(() => e.chain().focus().addColAfter().run(), [e]), c = M(() => e.chain().focus().deleteCol().run(), [e]);
3581
3584
  return /* @__PURE__ */ r(
3582
- he,
3585
+ ue,
3583
3586
  {
3584
3587
  pluginKey: "columns-bubble-menu",
3585
3588
  editor: e,
@@ -3632,7 +3635,7 @@ function As({ editor: e }) {
3632
3635
  }
3633
3636
  );
3634
3637
  }
3635
- const Ch = ha.extend({
3638
+ const Ch = da.extend({
3636
3639
  addOptions() {
3637
3640
  var e;
3638
3641
  return {
@@ -3650,7 +3653,7 @@ const Ch = ha.extend({
3650
3653
  })
3651
3654
  };
3652
3655
  }
3653
- }), Nh = ua.extend({
3656
+ }), Nh = ha.extend({
3654
3657
  addOptions() {
3655
3658
  var e;
3656
3659
  return {
@@ -3670,7 +3673,7 @@ const Ch = ha.extend({
3670
3673
  }
3671
3674
  };
3672
3675
  }
3673
- }), Th = ma.extend({
3676
+ }), Th = ua.extend({
3674
3677
  addOptions() {
3675
3678
  var e;
3676
3679
  return {
@@ -3690,7 +3693,7 @@ const Ch = ha.extend({
3690
3693
  }
3691
3694
  };
3692
3695
  }
3693
- }), Lh = fa.extend({
3696
+ }), Lh = ma.extend({
3694
3697
  addOptions() {
3695
3698
  var e;
3696
3699
  return {
@@ -3708,7 +3711,7 @@ const Ch = ha.extend({
3708
3711
  })
3709
3712
  };
3710
3713
  }
3711
- }), Ah = ga.extend({
3714
+ }), Ah = fa.extend({
3712
3715
  addOptions() {
3713
3716
  var e;
3714
3717
  return {
@@ -3728,29 +3731,29 @@ const Ch = ha.extend({
3728
3731
  }
3729
3732
  });
3730
3733
  let ge, Ye;
3731
- const Pt = /* @__PURE__ */ new Set(), Dt = /* @__PURE__ */ new Set();
3734
+ const Ot = /* @__PURE__ */ new Set(), Pt = /* @__PURE__ */ new Set();
3732
3735
  function Ss() {
3733
3736
  return ge;
3734
3737
  }
3735
3738
  function Ms(e) {
3736
3739
  if (!ge && !Ye) {
3737
3740
  const t = e.themes.filter(
3738
- (n) => !!n && n in sn
3741
+ (n) => !!n && n in on
3739
3742
  ), i = e.languages.filter(
3740
- (n) => !!n && n in ln
3743
+ (n) => !!n && n in cn
3741
3744
  );
3742
- return Ye = eo({ themes: t, langs: i }).then((n) => {
3745
+ return Ye = Qa({ themes: t, langs: i }).then((n) => {
3743
3746
  ge = n;
3744
3747
  }), Ye;
3745
3748
  }
3746
3749
  if (Ye)
3747
3750
  return Ye;
3748
3751
  }
3749
- async function Pn(e) {
3750
- return ge && !ge.getLoadedThemes().includes(e) && !Dt.has(e) && e in sn ? (Dt.add(e), await ge.loadTheme(e), Dt.delete(e), !0) : !1;
3752
+ async function On(e) {
3753
+ return ge && !ge.getLoadedThemes().includes(e) && !Pt.has(e) && e in on ? (Pt.add(e), await ge.loadTheme(e), Pt.delete(e), !0) : !1;
3751
3754
  }
3752
- async function Dn(e) {
3753
- return ge && !ge.getLoadedLanguages().includes(e) && !Pt.has(e) && e in ln ? (Pt.add(e), await ge.loadLanguage(e), Pt.delete(e), !0) : !1;
3755
+ async function Pn(e) {
3756
+ return ge && !ge.getLoadedLanguages().includes(e) && !Ot.has(e) && e in cn ? (Ot.add(e), await ge.loadLanguage(e), Ot.delete(e), !0) : !1;
3754
3757
  }
3755
3758
  async function Is({
3756
3759
  doc: e,
@@ -3766,11 +3769,11 @@ async function Is({
3766
3769
  n
3767
3770
  ];
3768
3771
  ge ? await Promise.all([
3769
- ...o.flatMap((s) => Pn(s)),
3770
- ...c.flatMap((s) => !!s && Dn(s))
3772
+ ...o.flatMap((s) => On(s)),
3773
+ ...c.flatMap((s) => !!s && Pn(s))
3771
3774
  ]) : await Ms({ languages: c, themes: o });
3772
3775
  }
3773
- function Pi({
3776
+ function Ri({
3774
3777
  doc: e,
3775
3778
  name: t,
3776
3779
  defaultTheme: i,
@@ -3803,8 +3806,8 @@ function zs({
3803
3806
  defaultLanguage: t,
3804
3807
  defaultTheme: i
3805
3808
  }) {
3806
- const n = new pe({
3807
- key: new be("shiki"),
3809
+ const n = new be({
3810
+ key: new we("shiki"),
3808
3811
  view(a) {
3809
3812
  class o {
3810
3813
  constructor() {
@@ -3831,8 +3834,8 @@ function zs({
3831
3834
  );
3832
3835
  if ((await Promise.all(
3833
3836
  s.flatMap((d) => [
3834
- Pn(d.node.attrs.theme),
3835
- Dn(d.node.attrs.language)
3837
+ On(d.node.attrs.theme),
3838
+ Pn(d.node.attrs.language)
3836
3839
  ])
3837
3840
  )).includes(!0)) {
3838
3841
  const d = a.state.tr.setMeta("shikiPluginForceDecoration", !0);
@@ -3843,7 +3846,7 @@ function zs({
3843
3846
  return new o();
3844
3847
  },
3845
3848
  state: {
3846
- init: (a, { doc: o }) => Pi({
3849
+ init: (a, { doc: o }) => Ri({
3847
3850
  doc: o,
3848
3851
  name: e,
3849
3852
  defaultLanguage: t,
@@ -3857,7 +3860,7 @@ function zs({
3857
3860
  s.doc,
3858
3861
  (g) => g.type.name === e
3859
3862
  ), f = a.docChanged && ([h, l].includes(e) || m.length !== d.length || a.steps.some((g) => g.from !== void 0 && g.to !== void 0 && d.some((x) => x.pos >= g.from && x.pos + x.node.nodeSize <= g.to)));
3860
- return a.getMeta("shikiPluginForceDecoration") || f ? Pi({
3863
+ return a.getMeta("shikiPluginForceDecoration") || f ? Ri({
3861
3864
  doc: a.doc,
3862
3865
  name: e,
3863
3866
  defaultLanguage: t,
@@ -3877,12 +3880,12 @@ function Hs({ action: e, languages: t, ...i }) {
3877
3880
  const n = (o) => {
3878
3881
  e(o);
3879
3882
  }, a = O(() => t == null ? void 0 : t.map((o) => ({
3880
- title: ro[o] || o,
3883
+ title: no[o] || o,
3881
3884
  // icon: language.icon,
3882
3885
  language: o
3883
3886
  })), [t]);
3884
- return /* @__PURE__ */ u(pn, { children: [
3885
- /* @__PURE__ */ r(hi, { disabled: i == null ? void 0 : i.disabled, asChild: !0, children: /* @__PURE__ */ r(
3887
+ return /* @__PURE__ */ u(_e, { children: [
3888
+ /* @__PURE__ */ r(ve, { disabled: i == null ? void 0 : i.disabled, asChild: !0, children: /* @__PURE__ */ r(
3886
3889
  _,
3887
3890
  {
3888
3891
  tooltip: i == null ? void 0 : i.tooltip,
@@ -3890,18 +3893,10 @@ function Hs({ action: e, languages: t, ...i }) {
3890
3893
  icon: i == null ? void 0 : i.icon
3891
3894
  }
3892
3895
  ) }),
3893
- /* @__PURE__ */ r(ui, { className: "richtext-w-full richtext-max-h-60 richtext-overflow-y-auto", children: a == null ? void 0 : a.map((o) => /* @__PURE__ */ r(
3894
- Nt,
3895
- {
3896
- value: o.language,
3897
- onClick: () => n(o.language),
3898
- children: /* @__PURE__ */ r("div", { className: "richtext-h-full richtext-ml-1", children: o.title })
3899
- },
3900
- `codeblock-${o.title}`
3901
- )) })
3896
+ /* @__PURE__ */ r(pe, { className: "richtext-w-full !richtext-max-h-[180px] !richtext-overflow-y-scroll", children: a == null ? void 0 : a.map((o) => /* @__PURE__ */ r(le, { onClick: () => n(o.language), children: /* @__PURE__ */ r("div", { className: "richtext-h-full richtext-ml-1", children: o.title }) }, `codeblock-${o.title}`)) })
3902
3897
  ] });
3903
3898
  }
3904
- const Es = "_wrap_17npv_1", Rs = "_maxHeight_17npv_10", Os = "_btnCopy_17npv_13", Ps = "_btnDelete_17npv_14", Ds = "_blockInfo_17npv_18", $s = "_selectLang_17npv_28", Bs = "_copied_17npv_54", ye = {
3899
+ const Es = "_wrap_17npv_1", Rs = "_maxHeight_17npv_10", Os = "_btnCopy_17npv_13", Ps = "_btnDelete_17npv_14", Ds = "_blockInfo_17npv_18", $s = "_selectLang_17npv_28", Bs = "_copied_17npv_54", Ce = {
3905
3900
  wrap: Es,
3906
3901
  maxHeight: Rs,
3907
3902
  btnCopy: Os,
@@ -3925,23 +3920,23 @@ function Fs({ editor: e, node: { attrs: t }, updateAttributes: i, extension: n }
3925
3920
  var f, g;
3926
3921
  const { isCopied: a, copyToClipboard: o } = js(), c = O(() => {
3927
3922
  var x;
3928
- return (x = n.options.languages) != null && x.length ? n.options.languages : dn;
3923
+ return (x = n.options.languages) != null && x.length ? n.options.languages : sn;
3929
3924
  }, [n.options.languages]), s = e.isEditable, h = (g = (f = e == null ? void 0 : e.options) == null ? void 0 : f.editorProps) == null ? void 0 : g.print, { language: l } = t, d = X(), m = M(() => at(Us.name, e), [e]);
3930
- return /* @__PURE__ */ u(ne, { className: ee(ye.wrap, !h && ye.maxHeight, "render-wrapper"), children: [
3931
- /* @__PURE__ */ u("div", { className: ye.blockInfo, children: [
3925
+ return /* @__PURE__ */ u(ne, { className: ee(Ce.wrap, !h && Ce.maxHeight, "render-wrapper"), children: [
3926
+ /* @__PURE__ */ u("div", { className: Ce.blockInfo, children: [
3932
3927
  /* @__PURE__ */ r(
3933
3928
  "span",
3934
3929
  {
3935
3930
  onClick: () => o(d.current.innerText),
3936
- className: ee(ye.btnCopy, a && ye.copied),
3937
- children: a ? /* @__PURE__ */ r(Yr, { size: 16 }) : /* @__PURE__ */ r(en, { size: 16 })
3931
+ className: ee(Ce.btnCopy, a && Ce.copied),
3932
+ children: a ? /* @__PURE__ */ r(Xr, { size: 16 }) : /* @__PURE__ */ r(Yi, { size: 16 })
3938
3933
  }
3939
3934
  ),
3940
3935
  /* @__PURE__ */ r(
3941
3936
  "span",
3942
3937
  {
3943
3938
  onClick: m,
3944
- className: ye.btnDelete,
3939
+ className: Ce.btnDelete,
3945
3940
  children: /* @__PURE__ */ r(
3946
3941
  D,
3947
3942
  {
@@ -3950,26 +3945,26 @@ function Fs({ editor: e, node: { attrs: t }, updateAttributes: i, extension: n }
3950
3945
  )
3951
3946
  }
3952
3947
  ),
3953
- /* @__PURE__ */ r("div", { className: ye.selectLang, children: /* @__PURE__ */ u(
3954
- pn,
3948
+ /* @__PURE__ */ r("div", { className: Ce.selectLang, children: /* @__PURE__ */ u(
3949
+ So,
3955
3950
  {
3956
3951
  defaultValue: l || "auto",
3957
3952
  disabled: !s,
3958
3953
  onValueChange: (x) => i({ language: x }),
3959
3954
  children: [
3960
- /* @__PURE__ */ r(hi, { children: /* @__PURE__ */ r(Mo, { placeholder: "Language" }) }),
3961
- /* @__PURE__ */ u(ui, { className: "richtext-max-h-60 richtext-overflow-y-auto", children: [
3962
- /* @__PURE__ */ r(Nt, { value: "auto", children: "Auto" }),
3963
- c.map((x, b) => /* @__PURE__ */ r(Nt, { value: x, children: x.charAt(0).toUpperCase() + x.slice(1) }, `code-lang-${b}`))
3955
+ /* @__PURE__ */ r(gn, { children: /* @__PURE__ */ r(Mo, { placeholder: "Language" }) }),
3956
+ /* @__PURE__ */ u(bn, { className: "richtext-max-h-60 richtext-overflow-y-auto", children: [
3957
+ /* @__PURE__ */ r(Wt, { value: "auto", children: "Auto" }),
3958
+ c.map((x, b) => /* @__PURE__ */ r(Wt, { value: x, children: x.charAt(0).toUpperCase() + x.slice(1) }, `code-lang-${b}`))
3964
3959
  ] })
3965
3960
  ]
3966
3961
  }
3967
3962
  ) })
3968
3963
  ] }),
3969
- /* @__PURE__ */ r("pre", { ref: d, children: /* @__PURE__ */ r(xa, { as: "code" }) })
3964
+ /* @__PURE__ */ r("pre", { ref: d, children: /* @__PURE__ */ r(ga, { as: "code" }) })
3970
3965
  ] });
3971
3966
  }
3972
- const Us = pa.extend({
3967
+ const Us = xa.extend({
3973
3968
  addOptions() {
3974
3969
  var e;
3975
3970
  return {
@@ -3977,7 +3972,7 @@ const Us = pa.extend({
3977
3972
  languages: [],
3978
3973
  button: ({ editor: t, t: i, extension: n }) => {
3979
3974
  var o, c, s;
3980
- const a = (c = (o = n == null ? void 0 : n.options) == null ? void 0 : o.languages) != null && c.length ? (s = n == null ? void 0 : n.options) == null ? void 0 : s.languages : dn;
3975
+ const a = (c = (o = n == null ? void 0 : n.options) == null ? void 0 : o.languages) != null && c.length ? (s = n == null ? void 0 : n.options) == null ? void 0 : s.languages : sn;
3981
3976
  return {
3982
3977
  component: Hs,
3983
3978
  componentProps: {
@@ -3995,7 +3990,7 @@ const Us = pa.extend({
3995
3990
  };
3996
3991
  },
3997
3992
  addNodeView() {
3998
- return ue(Fs);
3993
+ return me(Fs);
3999
3994
  },
4000
3995
  addProseMirrorPlugins() {
4001
3996
  var e;
@@ -4024,8 +4019,8 @@ function Vs(e) {
4024
4019
  action: () => e.editor.chain().focus().unsetFontFamily().run()
4025
4020
  };
4026
4021
  }, [t, i, e]);
4027
- return /* @__PURE__ */ u(Ae, { children: [
4028
- /* @__PURE__ */ r(Se, { disabled: e == null ? void 0 : e.disabled, asChild: !0, children: /* @__PURE__ */ r(
4022
+ return /* @__PURE__ */ u(_e, { children: [
4023
+ /* @__PURE__ */ r(ve, { disabled: e == null ? void 0 : e.disabled, asChild: !0, children: /* @__PURE__ */ r(
4029
4024
  si,
4030
4025
  {
4031
4026
  title: ((a = n == null ? void 0 : n.font) == null ? void 0 : a.length) > 7 ? `${(o = n == null ? void 0 : n.font) == null ? void 0 : o.slice(0, 6)}...` : n == null ? void 0 : n.font,
@@ -4034,21 +4029,21 @@ function Vs(e) {
4034
4029
  icon: "MenuDown"
4035
4030
  }
4036
4031
  ) }),
4037
- /* @__PURE__ */ r(we, { className: "richtext-w-full", children: (c = e == null ? void 0 : e.items) == null ? void 0 : c.map((s, h) => {
4032
+ /* @__PURE__ */ r(pe, { className: "richtext-w-full", children: (c = e == null ? void 0 : e.items) == null ? void 0 : c.map((s, h) => {
4038
4033
  const l = s.font === t("editor.fontFamily.default.tooltip") ? {} : { fontFamily: s.font };
4039
4034
  return /* @__PURE__ */ u(nt, { children: [
4040
4035
  /* @__PURE__ */ r(Me, { checked: (n == null ? void 0 : n.font) === s.font, onClick: s.action, children: /* @__PURE__ */ r("div", { className: "richtext-h-full richtext-ml-1", style: l, children: s.font }) }),
4041
- s.font === t("editor.fontFamily.default.tooltip") && /* @__PURE__ */ r(zt, {})
4036
+ s.font === t("editor.fontFamily.default.tooltip") && /* @__PURE__ */ r(It, {})
4042
4037
  ] }, `font-family-${h}`);
4043
4038
  }) })
4044
4039
  ] });
4045
4040
  }
4046
- const Sh = ba.extend({
4041
+ const Sh = pa.extend({
4047
4042
  addOptions() {
4048
4043
  var e;
4049
4044
  return {
4050
4045
  ...(e = this.parent) == null ? void 0 : e.call(this),
4051
- fontFamilyList: ao,
4046
+ fontFamilyList: ro,
4052
4047
  button({ editor: t, extension: i, t: n }) {
4053
4048
  var l;
4054
4049
  const { extensions: a = [] } = t.extensionManager ?? [], o = qt(((l = i == null ? void 0 : i.options) == null ? void 0 : l.fontFamilyList) || []), c = a.find(
@@ -4096,8 +4091,8 @@ function Ws(e) {
4096
4091
  isActive: () => !1
4097
4092
  };
4098
4093
  }, [e]);
4099
- return /* @__PURE__ */ u(Ae, { children: [
4100
- /* @__PURE__ */ r(Se, { disabled: e == null ? void 0 : e.disabled, asChild: !0, children: /* @__PURE__ */ r(
4094
+ return /* @__PURE__ */ u(_e, { children: [
4095
+ /* @__PURE__ */ r(ve, { disabled: e == null ? void 0 : e.disabled, asChild: !0, children: /* @__PURE__ */ r(
4101
4096
  si,
4102
4097
  {
4103
4098
  title: t == null ? void 0 : t.title,
@@ -4106,7 +4101,7 @@ function Ws(e) {
4106
4101
  icon: "MenuDown"
4107
4102
  }
4108
4103
  ) }),
4109
- /* @__PURE__ */ r(we, { className: "richtext-w-full", children: (i = e == null ? void 0 : e.items) == null ? void 0 : i.map((n, a) => {
4104
+ /* @__PURE__ */ r(pe, { className: "richtext-w-full", children: (i = e == null ? void 0 : e.items) == null ? void 0 : i.map((n, a) => {
4110
4105
  var o, c;
4111
4106
  return /* @__PURE__ */ u(nt, { children: [
4112
4107
  /* @__PURE__ */ u(
@@ -4116,16 +4111,16 @@ function Ws(e) {
4116
4111
  onClick: n.action,
4117
4112
  children: [
4118
4113
  /* @__PURE__ */ r("div", { className: `richtext-ml-1 richtext-h-full heading-${n.level}`, children: n.title }),
4119
- !!((o = n == null ? void 0 : n.shortcutKeys) != null && o.length) && /* @__PURE__ */ r(xn, { className: "richtext-pl-4", children: (c = n == null ? void 0 : n.shortcutKeys) == null ? void 0 : c.map((s) => Mt(s)).join(" ") })
4114
+ !!((o = n == null ? void 0 : n.shortcutKeys) != null && o.length) && /* @__PURE__ */ r(fn, { className: "richtext-pl-4", children: (c = n == null ? void 0 : n.shortcutKeys) == null ? void 0 : c.map((s) => St(s)).join(" ") })
4120
4115
  ]
4121
4116
  }
4122
4117
  ),
4123
- n.level === 0 && /* @__PURE__ */ r(zt, {})
4118
+ n.level === 0 && /* @__PURE__ */ r(It, {})
4124
4119
  ] }, `heading-k-${a}`);
4125
4120
  }) })
4126
4121
  ] });
4127
4122
  }
4128
- const Mh = wa.extend({
4123
+ const Mh = ba.extend({
4129
4124
  addOptions() {
4130
4125
  var e;
4131
4126
  return {
@@ -4212,7 +4207,7 @@ function qs(e) {
4212
4207
  ) }),
4213
4208
  /* @__PURE__ */ u(Ie, { className: "richtext-flex richtext-flex-col richtext-items-center", children: [
4214
4209
  /* @__PURE__ */ r("span", { children: n.title }),
4215
- !!((o = n.shortcutKeys) != null && o.length) && /* @__PURE__ */ r("span", { children: (c = n.shortcutKeys) == null ? void 0 : c.map((s) => Mt(s)).join(" ") })
4210
+ !!((o = n.shortcutKeys) != null && o.length) && /* @__PURE__ */ r("span", { children: (c = n.shortcutKeys) == null ? void 0 : c.map((s) => St(s)).join(" ") })
4216
4211
  ] })
4217
4212
  ] }, `text-align-${a}`);
4218
4213
  })
@@ -4220,7 +4215,7 @@ function qs(e) {
4220
4215
  )
4221
4216
  ] });
4222
4217
  }
4223
- const Ih = _a.extend({
4218
+ const Ih = wa.extend({
4224
4219
  addOptions() {
4225
4220
  var e;
4226
4221
  return {
@@ -4278,8 +4273,8 @@ function Ks(e) {
4278
4273
  isActive: () => !1
4279
4274
  };
4280
4275
  }, [e]);
4281
- return /* @__PURE__ */ u(Ae, { children: [
4282
- /* @__PURE__ */ r(Se, { disabled: e == null ? void 0 : e.disabled, asChild: !0, children: /* @__PURE__ */ r(
4276
+ return /* @__PURE__ */ u(_e, { children: [
4277
+ /* @__PURE__ */ r(ve, { disabled: e == null ? void 0 : e.disabled, asChild: !0, children: /* @__PURE__ */ r(
4283
4278
  si,
4284
4279
  {
4285
4280
  title: i == null ? void 0 : i.title,
@@ -4288,7 +4283,7 @@ function Ks(e) {
4288
4283
  icon: "MenuDown"
4289
4284
  }
4290
4285
  ) }),
4291
- /* @__PURE__ */ r(we, { className: "richtext-w-32 richtext-overflow-y-auto richtext-max-h-96", children: (n = e == null ? void 0 : e.items) == null ? void 0 : n.map((a, o) => /* @__PURE__ */ r(
4286
+ /* @__PURE__ */ r(pe, { className: "richtext-w-32 richtext-overflow-y-auto richtext-max-h-96", children: (n = e == null ? void 0 : e.items) == null ? void 0 : n.map((a, o) => /* @__PURE__ */ r(
4292
4287
  Me,
4293
4288
  {
4294
4289
  checked: i.title === a.title,
@@ -4306,10 +4301,10 @@ const zh = Z.create({
4306
4301
  return {
4307
4302
  ...(e = this.parent) == null ? void 0 : e.call(this),
4308
4303
  types: ["textStyle"],
4309
- fontSizes: [...oo],
4304
+ fontSizes: [...ao],
4310
4305
  button({ editor: t, extension: i, t: n }) {
4311
4306
  var h;
4312
- const a = qt(((h = i.options) == null ? void 0 : h.fontSizes) || Ni), o = qt([Ni])[0], c = a.map((l) => ({
4307
+ const a = qt(((h = i.options) == null ? void 0 : h.fontSizes) || ki), o = qt([ki])[0], c = a.map((l) => ({
4313
4308
  title: l.value === o.value ? n("editor.fontSize.default.tooltip") : String(l.name),
4314
4309
  isActive: () => {
4315
4310
  const { fontSize: d } = t.getAttributes("textStyle");
@@ -4422,7 +4417,7 @@ function Zs(e) {
4422
4417
  return /* @__PURE__ */ u("div", { className: "richtext-flex richtext-items-center richtext-h-[32px]", children: [
4423
4418
  /* @__PURE__ */ r(_, { tooltip: e == null ? void 0 : e.tooltip, disabled: e == null ? void 0 : e.disabled, action: a, children: /* @__PURE__ */ r("span", { className: "richtext-flex richtext-items-center richtext-justify-center richtext-text-sm", children: /* @__PURE__ */ r(Gs, { fill: t }) }) }),
4424
4419
  /* @__PURE__ */ r(
4425
- Tn,
4420
+ Nn,
4426
4421
  {
4427
4422
  selectedColor: t,
4428
4423
  setSelectedColor: o,
@@ -4435,7 +4430,7 @@ function Zs(e) {
4435
4430
  )
4436
4431
  ] });
4437
4432
  }
4438
- const Hh = va.extend({
4433
+ const Hh = _a.extend({
4439
4434
  addOptions() {
4440
4435
  var e;
4441
4436
  return {
@@ -4461,14 +4456,14 @@ const Hh = va.extend({
4461
4456
  }
4462
4457
  };
4463
4458
  }
4464
- }), Eh = ya.extend({
4459
+ }), Eh = va.extend({
4465
4460
  addOptions() {
4466
4461
  var e;
4467
4462
  return {
4468
4463
  ...(e = this.parent) == null ? void 0 : e.call(this),
4469
4464
  multicolor: !0,
4470
4465
  button: ({ editor: t, t: i }) => ({
4471
- component: Rn,
4466
+ component: En,
4472
4467
  componentProps: {
4473
4468
  action: (n) => {
4474
4469
  typeof n == "string" && t.chain().focus().setHighlight({ color: n }).run(), n === void 0 && t.chain().focus().unsetHighlight().run();
@@ -4482,7 +4477,7 @@ const Hh = va.extend({
4482
4477
  })
4483
4478
  };
4484
4479
  }
4485
- }), Rh = ka.extend({
4480
+ }), Rh = ya.extend({
4486
4481
  addOptions() {
4487
4482
  var e;
4488
4483
  return {
@@ -4517,7 +4512,7 @@ const Hh = va.extend({
4517
4512
  })
4518
4513
  };
4519
4514
  }
4520
- }), Ph = Ca.extend({
4515
+ }), Ph = ka.extend({
4521
4516
  addOptions() {
4522
4517
  var e;
4523
4518
  return {
@@ -4535,7 +4530,7 @@ const Hh = va.extend({
4535
4530
  })
4536
4531
  };
4537
4532
  }
4538
- }), Dh = Na.extend({
4533
+ }), Dh = Ca.extend({
4539
4534
  addOptions() {
4540
4535
  var e;
4541
4536
  return {
@@ -4562,9 +4557,9 @@ const Hh = va.extend({
4562
4557
  };
4563
4558
  },
4564
4559
  addExtensions() {
4565
- return [Ta.configure(this.options.taskItem)];
4560
+ return [Na.configure(this.options.taskItem)];
4566
4561
  }
4567
- }), $h = La.extend({
4562
+ }), $h = Ta.extend({
4568
4563
  addOptions() {
4569
4564
  var e;
4570
4565
  return {
@@ -4600,10 +4595,10 @@ function Js(e) {
4600
4595
  children: /* @__PURE__ */ r(D, { name: e == null ? void 0 : e.icon })
4601
4596
  }
4602
4597
  ) }),
4603
- /* @__PURE__ */ r(ie, { hideWhenDetached: !0, className: "richtext-w-full", align: "start", side: "bottom", children: /* @__PURE__ */ r(On, { editor: e.editor, onSetLink: t }) })
4598
+ /* @__PURE__ */ r(ie, { hideWhenDetached: !0, className: "richtext-w-full", align: "start", side: "bottom", children: /* @__PURE__ */ r(Rn, { editor: e.editor, onSetLink: t }) })
4604
4599
  ] });
4605
4600
  }
4606
- const Bh = Aa.extend({
4601
+ const Bh = La.extend({
4607
4602
  inclusive: !1,
4608
4603
  parseHTML() {
4609
4604
  return [
@@ -4657,20 +4652,20 @@ const Bh = Aa.extend({
4657
4652
  },
4658
4653
  addProseMirrorPlugins() {
4659
4654
  return [
4660
- new pe({
4655
+ new be({
4661
4656
  props: {
4662
4657
  handleClick: (e, t) => {
4663
- const { schema: i, doc: n, tr: a } = e.state, o = Sa(n.resolve(t), i.marks.link);
4658
+ const { schema: i, doc: n, tr: a } = e.state, o = Aa(n.resolve(t), i.marks.link);
4664
4659
  if (!o)
4665
4660
  return !1;
4666
- const c = n.resolve(o.from), s = n.resolve(o.to), h = a.setSelection(new Te(c, s));
4661
+ const c = n.resolve(o.from), s = n.resolve(o.to), h = a.setSelection(new Ae(c, s));
4667
4662
  e.dispatch(h);
4668
4663
  }
4669
4664
  }
4670
4665
  })
4671
4666
  ];
4672
4667
  }
4673
- }), jh = Ma.extend({
4668
+ }), jh = Sa.extend({
4674
4669
  renderHTML() {
4675
4670
  return [
4676
4671
  "div",
@@ -4734,11 +4729,11 @@ function Xs(e) {
4734
4729
  ) }),
4735
4730
  i && /* @__PURE__ */ r(Ie, { ...a, children: /* @__PURE__ */ u("div", { className: "richtext-flex richtext-flex-col richtext-items-center richtext-text-center richtext-max-w-24", children: [
4736
4731
  /* @__PURE__ */ r("div", { children: i }),
4737
- !!((l = e == null ? void 0 : e.shortcutKeys) != null && l.length) && /* @__PURE__ */ r("span", { children: It(e == null ? void 0 : e.shortcutKeys) })
4732
+ !!((l = e == null ? void 0 : e.shortcutKeys) != null && l.length) && /* @__PURE__ */ r("span", { children: Mt(e == null ? void 0 : e.shortcutKeys) })
4738
4733
  ] }) })
4739
4734
  ] });
4740
4735
  }
4741
- const Ys = ["undo", "redo"], Fh = Ia.extend({
4736
+ const Ys = ["undo", "redo"], Fh = Ma.extend({
4742
4737
  addOptions() {
4743
4738
  var e;
4744
4739
  return {
@@ -4760,7 +4755,7 @@ const Ys = ["undo", "redo"], Fh = Ia.extend({
4760
4755
  }))
4761
4756
  };
4762
4757
  }
4763
- }), Qs = za.extend({
4758
+ }), Qs = Ia.extend({
4764
4759
  content: "(block|columns)+"
4765
4760
  // echo editor is a block editor
4766
4761
  });
@@ -4784,12 +4779,12 @@ function il(e, t, i = null) {
4784
4779
  }
4785
4780
  return n.columns.createChecked({ cols: t }, a);
4786
4781
  }
4787
- function $t({
4782
+ function Dt({
4788
4783
  state: e,
4789
4784
  dispatch: t,
4790
4785
  type: i
4791
4786
  }) {
4792
- const n = vt((o) => o.type.name === it.name)(e.selection), a = vt((o) => o.type.name === bi.name)(e.selection);
4787
+ const n = vt((o) => o.type.name === it.name)(e.selection), a = vt((o) => o.type.name === xi.name)(e.selection);
4793
4788
  if (t && n && a) {
4794
4789
  const o = n.node, c = a.node.attrs.index, s = o.toJSON();
4795
4790
  let h = c;
@@ -4806,20 +4801,20 @@ function $t({
4806
4801
  })), s.attrs.cols = s.content.length, s.content.forEach((f, g) => {
4807
4802
  f.attrs.index = g;
4808
4803
  });
4809
- const l = Ya.fromJSON(e.schema, s);
4804
+ const l = Xa.fromJSON(e.schema, s);
4810
4805
  let d = n.pos;
4811
4806
  l.content.forEach((f, g, x) => {
4812
4807
  x < h && (d += f.nodeSize);
4813
4808
  });
4814
4809
  const m = e.tr.setTime(Date.now());
4815
4810
  m.replaceWith(n.pos, n.pos + n.node.nodeSize, l).setSelection(
4816
- Te.near(m.doc.resolve(d))
4811
+ Ae.near(m.doc.resolve(d))
4817
4812
  ), t(m);
4818
4813
  }
4819
4814
  return !0;
4820
4815
  }
4821
- function Di({ state: e, dispatch: t, type: i }) {
4822
- const n = vt((o) => o.type.name === it.name)(e.selection), a = vt((o) => o.type.name === bi.name)(e.selection);
4816
+ function Oi({ state: e, dispatch: t, type: i }) {
4817
+ const n = vt((o) => o.type.name === it.name)(e.selection), a = vt((o) => o.type.name === xi.name)(e.selection);
4823
4818
  if (t && n && a) {
4824
4819
  const o = n.node, c = a.node.attrs.index;
4825
4820
  let s = 0;
@@ -4829,7 +4824,7 @@ function Di({ state: e, dispatch: t, type: i }) {
4829
4824
  f < s && (h += d.nodeSize);
4830
4825
  });
4831
4826
  const l = e.tr.setTime(Date.now());
4832
- return l.setSelection(Te.near(l.doc.resolve(h))), t(l), !0;
4827
+ return l.setSelection(Ae.near(l.doc.resolve(h))), t(l), !0;
4833
4828
  }
4834
4829
  return !1;
4835
4830
  }
@@ -4872,31 +4867,31 @@ const nl = 200, it = ce.create({
4872
4867
  const a = il(n.schema, e && e.cols || 3);
4873
4868
  if (i) {
4874
4869
  const o = t.selection.anchor + 1;
4875
- t.replaceSelectionWith(a).scrollIntoView().setSelection(Te.near(t.doc.resolve(o)));
4870
+ t.replaceSelectionWith(a).scrollIntoView().setSelection(Ae.near(t.doc.resolve(o)));
4876
4871
  }
4877
4872
  return !0;
4878
4873
  },
4879
- addColBefore: () => ({ dispatch: e, state: t }) => $t({ dispatch: e, state: t, type: "addBefore" }),
4880
- addColAfter: () => ({ dispatch: e, state: t }) => $t({ dispatch: e, state: t, type: "addAfter" }),
4881
- deleteCol: () => ({ dispatch: e, state: t }) => $t({ dispatch: e, state: t, type: "delete" })
4874
+ addColBefore: () => ({ dispatch: e, state: t }) => Dt({ dispatch: e, state: t, type: "addBefore" }),
4875
+ addColAfter: () => ({ dispatch: e, state: t }) => Dt({ dispatch: e, state: t, type: "addAfter" }),
4876
+ deleteCol: () => ({ dispatch: e, state: t }) => Dt({ dispatch: e, state: t, type: "delete" })
4882
4877
  };
4883
4878
  },
4884
4879
  addKeyboardShortcuts() {
4885
4880
  return {
4886
4881
  "Mod-Alt-G": () => this.editor.commands.insertColumns(),
4887
- Tab: () => Di({
4882
+ Tab: () => Oi({
4888
4883
  state: this.editor.state,
4889
4884
  dispatch: this.editor.view.dispatch,
4890
4885
  type: "after"
4891
4886
  }),
4892
- "Shift-Tab": () => Di({
4887
+ "Shift-Tab": () => Oi({
4893
4888
  state: this.editor.state,
4894
4889
  dispatch: this.editor.view.dispatch,
4895
4890
  type: "before"
4896
4891
  })
4897
4892
  };
4898
4893
  }
4899
- }), bi = ce.create({
4894
+ }), xi = ce.create({
4900
4895
  name: "column",
4901
4896
  content: "block+",
4902
4897
  isolating: !0,
@@ -4948,8 +4943,8 @@ const nl = 200, it = ce.create({
4948
4943
  addProseMirrorPlugins() {
4949
4944
  const { editor: e } = this;
4950
4945
  return [
4951
- new pe({
4952
- key: new be("selection"),
4946
+ new be({
4947
+ key: new we("selection"),
4953
4948
  props: {
4954
4949
  decorations(t) {
4955
4950
  return t.selection.empty || e.isFocused === !0 ? null : De.create(t.doc, [
@@ -5031,15 +5026,15 @@ function al(e) {
5031
5026
  ], [e.editor, t]), n = O(() => i.filter((a) => a.isActive()).pop() ?? {
5032
5027
  label: "Empty"
5033
5028
  }, [i]);
5034
- return /* @__PURE__ */ u(Ae, { children: [
5035
- /* @__PURE__ */ r(Se, { asChild: !0, children: /* @__PURE__ */ u(U, { variant: "ghost", className: "richtext-h-[32px] richtext-flex richtext-gap-1 richtext-px-1.5", children: [
5029
+ return /* @__PURE__ */ u(_e, { children: [
5030
+ /* @__PURE__ */ r(ve, { asChild: !0, children: /* @__PURE__ */ u(U, { variant: "ghost", className: "richtext-h-[32px] richtext-flex richtext-gap-1 richtext-px-1.5", children: [
5036
5031
  /* @__PURE__ */ u("span", { className: "richtext-text-sm richtext-font-normal richtext-whitespace-nowrap", children: [
5037
5032
  " ",
5038
5033
  n == null ? void 0 : n.label
5039
5034
  ] }),
5040
- /* @__PURE__ */ r(At, { className: "richtext-w-4 richtext-h-4" })
5035
+ /* @__PURE__ */ r(Lt, { className: "richtext-w-4 richtext-h-4" })
5041
5036
  ] }) }),
5042
- /* @__PURE__ */ r(we, { hideWhenDetached: !0, className: "richtext-w-full richtext-p-1", align: "start", sideOffset: 5, children: i.map((a, o) => {
5037
+ /* @__PURE__ */ r(pe, { hideWhenDetached: !0, className: "richtext-w-full richtext-p-1", align: "start", sideOffset: 5, children: i.map((a, o) => {
5043
5038
  var s;
5044
5039
  const c = ut[a.iconName];
5045
5040
  return /* @__PURE__ */ r(
@@ -5075,7 +5070,7 @@ const ol = Z.create({
5075
5070
  };
5076
5071
  }
5077
5072
  });
5078
- function $i({ types: e, node: t }) {
5073
+ function Pi({ types: e, node: t }) {
5079
5074
  return Array.isArray(e) && e.includes(t.type) || t.type === e;
5080
5075
  }
5081
5076
  const cl = Z.create({
@@ -5087,9 +5082,9 @@ const cl = Z.create({
5087
5082
  };
5088
5083
  },
5089
5084
  addProseMirrorPlugins() {
5090
- const e = new be(this.name), t = Object.entries(this.editor.schema.nodes).map(([, i]) => i).filter((i) => this.options.notAfter.includes(i.name));
5085
+ const e = new we(this.name), t = Object.entries(this.editor.schema.nodes).map(([, i]) => i).filter((i) => this.options.notAfter.includes(i.name));
5091
5086
  return [
5092
- new pe({
5087
+ new be({
5093
5088
  key: e,
5094
5089
  appendTransaction: (i, n, a) => {
5095
5090
  const { doc: o, tr: c, schema: s } = a, h = e.getState(a), l = o.content.size, d = s.nodes[this.options.node];
@@ -5099,13 +5094,13 @@ const cl = Z.create({
5099
5094
  state: {
5100
5095
  init: (i, n) => {
5101
5096
  const a = n.tr.doc.lastChild;
5102
- return !$i({ node: a, types: t });
5097
+ return !Pi({ node: a, types: t });
5103
5098
  },
5104
5099
  apply: (i, n) => {
5105
5100
  if (!i.docChanged)
5106
5101
  return n;
5107
5102
  const a = i.doc.lastChild;
5108
- return !$i({ node: a, types: t });
5103
+ return !Pi({ node: a, types: t });
5109
5104
  }
5110
5105
  }
5111
5106
  })
@@ -5116,7 +5111,7 @@ const cl = Z.create({
5116
5111
  addExtensions() {
5117
5112
  const e = [];
5118
5113
  return this.options.document !== !1 && e.push(Qs.configure()), this.options.placeholder !== !1 && e.push(
5119
- Ha.configure({
5114
+ za.configure({
5120
5115
  placeholder: ({ node: t, pos: i, editor: n }) => {
5121
5116
  var a, o, c, s;
5122
5117
  return ((a = t == null ? void 0 : t.type) == null ? void 0 : a.name) === "columns" ? "" : ((o = t == null ? void 0 : t.type) == null ? void 0 : o.name) === "heading" ? `${W.t(`editor.heading.h${t.attrs.level}.tooltip`)}` : ((c = t == null ? void 0 : t.type) == null ? void 0 : c.name) === "codeBlock" || ((s = t == null ? void 0 : t.type) == null ? void 0 : s.name) === "table" ? "" : n.extensionManager.extensions.some((h) => h.name === "slashCommand") ? W.t("editor.slash") : i === 0 ? W.t("editor.content") : W.t("editor.content");
@@ -5124,17 +5119,17 @@ const cl = Z.create({
5124
5119
  ...this.options.placeholder
5125
5120
  })
5126
5121
  ), this.options.focus !== !1 && e.push(
5127
- Ea.configure({
5122
+ Ha.configure({
5128
5123
  className: "focus",
5129
5124
  ...this.options.focus
5130
5125
  })
5131
- ), this.options.text !== !1 && e.push(Ra.configure()), this.options.textBubble !== !1 && e.push(ol.configure()), this.options.gapcursor !== !1 && e.push(Oa.configure()), this.options.dropcursor !== !1 && e.push(
5132
- Pa.configure({
5126
+ ), this.options.text !== !1 && e.push(Ea.configure()), this.options.textBubble !== !1 && e.push(ol.configure()), this.options.gapcursor !== !1 && e.push(Ra.configure()), this.options.dropcursor !== !1 && e.push(
5127
+ Oa.configure({
5133
5128
  ...this.options.dropcursor,
5134
5129
  width: 2,
5135
5130
  class: "ProseMirror-dropcursor border-black"
5136
5131
  })
5137
- ), this.options.characterCount !== !1 && e.push(Da.configure(this.options.characterCount)), this.options.paragraph !== !1 && e.push($a.configure(this.options.paragraph)), this.options.hardBreak !== !1 && e.push(Ba.configure(this.options.hardBreak)), this.options.listItem !== !1 && e.push(ja.configure(this.options.listItem)), this.options.textStyle !== !1 && e.push(Fa.configure(this.options.textStyle)), this.options.trailingNode !== !1 && e.push(cl.configure(this.options.trailingNode)), this.options.selection !== !1 && e.push(rl), this.options.multiColumn !== !1 && (e.push(bi), e.push(it)), e;
5132
+ ), this.options.characterCount !== !1 && e.push(Pa.configure(this.options.characterCount)), this.options.paragraph !== !1 && e.push(Da.configure(this.options.paragraph)), this.options.hardBreak !== !1 && e.push($a.configure(this.options.hardBreak)), this.options.listItem !== !1 && e.push(Ba.configure(this.options.listItem)), this.options.textStyle !== !1 && e.push(ja.configure(this.options.textStyle)), this.options.trailingNode !== !1 && e.push(cl.configure(this.options.trailingNode)), this.options.selection !== !1 && e.push(rl), this.options.multiColumn !== !1 && (e.push(xi), e.push(it)), e;
5138
5133
  }
5139
5134
  }), Wh = Z.create({
5140
5135
  name: "subAndSuperScript",
@@ -5168,7 +5163,7 @@ const cl = Z.create({
5168
5163
  },
5169
5164
  addExtensions() {
5170
5165
  const e = [];
5171
- return this.options.subscript !== !1 && e.push(tn.configure(this.options.subscript)), this.options.superscript !== !1 && e.push(nn.configure(this.options.superscript)), e;
5166
+ return this.options.subscript !== !1 && e.push(Qi.configure(this.options.subscript)), this.options.superscript !== !1 && e.push(en.configure(this.options.superscript)), e;
5172
5167
  }
5173
5168
  });
5174
5169
  function sl(e) {
@@ -5185,18 +5180,18 @@ function sl(e) {
5185
5180
  isActive: () => !1
5186
5181
  };
5187
5182
  }, [e]);
5188
- return /* @__PURE__ */ u(Ae, { children: [
5189
- /* @__PURE__ */ r(Se, { disabled: e == null ? void 0 : e.disabled, asChild: !0, children: /* @__PURE__ */ r(
5183
+ return /* @__PURE__ */ u(_e, { children: [
5184
+ /* @__PURE__ */ r(ve, { disabled: e == null ? void 0 : e.disabled, asChild: !0, children: /* @__PURE__ */ r(
5190
5185
  _,
5191
5186
  {
5192
5187
  customClass: "!richtext-w-12 richtext-h-12",
5193
5188
  icon: e == null ? void 0 : e.icon,
5194
5189
  tooltip: e == null ? void 0 : e.tooltip,
5195
5190
  disabled: e == null ? void 0 : e.disabled,
5196
- children: /* @__PURE__ */ r(zn, { className: "richtext-w-3 richtext-h-3 richtext-text-gray-500" })
5191
+ children: /* @__PURE__ */ r(In, { className: "richtext-w-3 richtext-h-3 richtext-text-gray-500" })
5197
5192
  }
5198
5193
  ) }),
5199
- /* @__PURE__ */ r(we, { className: "w-full", children: (i = e == null ? void 0 : e.items) == null ? void 0 : i.map((n, a) => /* @__PURE__ */ u(
5194
+ /* @__PURE__ */ r(pe, { className: "w-full", children: (i = e == null ? void 0 : e.items) == null ? void 0 : i.map((n, a) => /* @__PURE__ */ u(
5200
5195
  Me,
5201
5196
  {
5202
5197
  checked: t.title === n.title,
@@ -5205,7 +5200,7 @@ function sl(e) {
5205
5200
  children: [
5206
5201
  /* @__PURE__ */ r(D, { name: n == null ? void 0 : n.icon }),
5207
5202
  /* @__PURE__ */ r("span", { className: "richtext-ml-1", children: n.title }),
5208
- !!(n != null && n.shortcutKeys) && /* @__PURE__ */ r("span", { className: "richtext-ml-auto richtext-text-xs richtext-tracking-widest richtext-opacity-60", children: It(n.shortcutKeys) })
5203
+ !!(n != null && n.shortcutKeys) && /* @__PURE__ */ r("span", { className: "richtext-ml-auto richtext-text-xs richtext-tracking-widest richtext-opacity-60", children: Mt(n.shortcutKeys) })
5209
5204
  ]
5210
5205
  },
5211
5206
  `more-mark-${a}`
@@ -5248,7 +5243,7 @@ const qh = Z.create({
5248
5243
  },
5249
5244
  addExtensions() {
5250
5245
  const e = [];
5251
- return this.options.subscript !== !1 && e.push(tn.configure(this.options.subscript)), this.options.superscript !== !1 && e.push(nn.configure(this.options.superscript)), e;
5246
+ return this.options.subscript !== !1 && e.push(Qi.configure(this.options.subscript)), this.options.superscript !== !1 && e.push(en.configure(this.options.superscript)), e;
5252
5247
  }
5253
5248
  }), Kh = Z.create({
5254
5249
  name: "indent",
@@ -5257,8 +5252,8 @@ const qh = Z.create({
5257
5252
  return {
5258
5253
  ...(e = this.parent) == null ? void 0 : e.call(this),
5259
5254
  types: ["paragraph", "heading", "blockquote"],
5260
- minIndent: Ce.min,
5261
- maxIndent: Ce.max,
5255
+ minIndent: Te.min,
5256
+ maxIndent: Te.max,
5262
5257
  button({ editor: t, t: i }) {
5263
5258
  return [
5264
5259
  {
@@ -5306,12 +5301,12 @@ const qh = Z.create({
5306
5301
  },
5307
5302
  addCommands() {
5308
5303
  return {
5309
- indent: () => Oi({
5310
- delta: Ce.more,
5304
+ indent: () => Ei({
5305
+ delta: Te.more,
5311
5306
  types: this.options.types
5312
5307
  }),
5313
- outdent: () => Oi({
5314
- delta: Ce.less,
5308
+ outdent: () => Ei({
5309
+ delta: Te.less,
5315
5310
  types: this.options.types
5316
5311
  })
5317
5312
  };
@@ -5343,8 +5338,8 @@ function dl(e) {
5343
5338
  value: "default"
5344
5339
  }), h;
5345
5340
  }, [e]);
5346
- return /* @__PURE__ */ u(Ae, { children: [
5347
- /* @__PURE__ */ r(Se, { disabled: e == null ? void 0 : e.disabled, asChild: !0, children: /* @__PURE__ */ r(
5341
+ return /* @__PURE__ */ u(_e, { children: [
5342
+ /* @__PURE__ */ r(ve, { disabled: e == null ? void 0 : e.disabled, asChild: !0, children: /* @__PURE__ */ r(
5348
5343
  _,
5349
5344
  {
5350
5345
  customClass: "!richtext-w-12 richtext-h-12",
@@ -5354,7 +5349,7 @@ function dl(e) {
5354
5349
  children: /* @__PURE__ */ r(D, { className: "richtext-w-3 richtext-h-3 richtext-ml-1 richtext-text-zinc-500", name: "MenuDown" })
5355
5350
  }
5356
5351
  ) }),
5357
- /* @__PURE__ */ r(we, { className: "richtext-min-w-24", children: o == null ? void 0 : o.map((c, s) => /* @__PURE__ */ r(
5352
+ /* @__PURE__ */ r(pe, { className: "richtext-min-w-24", children: o == null ? void 0 : o.map((c, s) => /* @__PURE__ */ r(
5358
5353
  Me,
5359
5354
  {
5360
5355
  checked: c.value === i,
@@ -5368,9 +5363,9 @@ function dl(e) {
5368
5363
  const hl = ["paragraph", "heading", "list_item", "todo_item"];
5369
5364
  function ul(e, t) {
5370
5365
  const { selection: i, doc: n } = e;
5371
- if (!i || !n || !(i instanceof Te || i instanceof on))
5366
+ if (!i || !n || !(i instanceof Ae || i instanceof rn))
5372
5367
  return e;
5373
- const { from: a, to: o } = i, c = [], s = t && t !== hn ? t : null;
5368
+ const { from: a, to: o } = i, c = [], s = t && t !== ln ? t : null;
5374
5369
  if (n.nodesBetween(a, o, (h, l) => {
5375
5370
  const d = h.type;
5376
5371
  return hl.includes(d.name) ? ((h.attrs.lineHeight || null) !== s && c.push({
@@ -5404,8 +5399,8 @@ const Gh = Z.create({
5404
5399
  return {
5405
5400
  ...(e = this.parent) == null ? void 0 : e.call(this),
5406
5401
  types: ["paragraph", "heading", "list_item", "todo_item"],
5407
- lineHeights: co,
5408
- defaultHeight: hn,
5402
+ lineHeights: oo,
5403
+ defaultHeight: ln,
5409
5404
  button({ editor: t, t: i }) {
5410
5405
  return {
5411
5406
  component: dl,
@@ -5558,7 +5553,7 @@ function fl(e) {
5558
5553
  function gl(e, t) {
5559
5554
  var k, L;
5560
5555
  const [i, n] = w(0), [a, o] = w(0), c = X(null), { t: s } = F(), h = X([]);
5561
- Lt(t, () => ({
5556
+ Tt(t, () => ({
5562
5557
  onKeyDown: l
5563
5558
  })), z(() => {
5564
5559
  if (!c.current)
@@ -5628,10 +5623,10 @@ function gl(e, t) {
5628
5623
  }
5629
5624
  );
5630
5625
  }
5631
- const xl = Tt(gl), ke = "slashCommand";
5626
+ const xl = Nt(gl), Ne = "slashCommand";
5632
5627
  let V;
5633
5628
  const Zh = Z.create({
5634
- name: ke,
5629
+ name: Ne,
5635
5630
  priority: 200,
5636
5631
  onCreate() {
5637
5632
  V = ai("body", {
@@ -5654,12 +5649,12 @@ const Zh = Z.create({
5654
5649
  },
5655
5650
  addProseMirrorPlugins() {
5656
5651
  return [
5657
- rn({
5652
+ tn({
5658
5653
  editor: this.editor,
5659
5654
  char: "/",
5660
5655
  allowSpaces: !0,
5661
5656
  startOfLine: !0,
5662
- pluginKey: new be(ke),
5657
+ pluginKey: new we(Ne),
5663
5658
  allow: ({ state: e, range: t }) => {
5664
5659
  var l, d, m;
5665
5660
  const i = e.doc.resolve(t.from), n = i.depth === 1, a = i.parent.type.name === "paragraph", o = ((l = i.parent.textContent) == null ? void 0 : l.charAt(0)) === "/", c = this.editor.isActive("column"), s = (m = i.parent.textContent) == null ? void 0 : m.slice(
@@ -5701,10 +5696,10 @@ const Zh = Z.create({
5701
5696
  });
5702
5697
  const { view: n } = i.editor, a = () => {
5703
5698
  if (!i.clientRect)
5704
- return i.editor.storage[ke].rect;
5699
+ return i.editor.storage[Ne].rect;
5705
5700
  const c = i.clientRect();
5706
5701
  if (!c)
5707
- return i.editor.storage[ke].rect;
5702
+ return i.editor.storage[Ne].rect;
5708
5703
  let s = c.y;
5709
5704
  if (c.top + e.element.offsetHeight + 40 > window.innerHeight) {
5710
5705
  const h = c.top + e.element.offsetHeight - window.innerHeight + 40;
@@ -5727,15 +5722,15 @@ const Zh = Z.create({
5727
5722
  e.updateProps(i);
5728
5723
  const { view: n } = i.editor, a = () => {
5729
5724
  if (!i.clientRect)
5730
- return i.editor.storage[ke].rect;
5725
+ return i.editor.storage[Ne].rect;
5731
5726
  const s = i.clientRect();
5732
- return s ? new DOMRect(s.x, s.y, s.width, s.height) : i.editor.storage[ke].rect;
5727
+ return s ? new DOMRect(s.x, s.y, s.width, s.height) : i.editor.storage[Ne].rect;
5733
5728
  }, o = () => {
5734
5729
  V == null || V[0].setProps({
5735
5730
  getReferenceClientRect: a
5736
5731
  });
5737
5732
  };
5738
- (c = n.dom.parentElement) == null || c.addEventListener("scroll", o), i.editor.storage[ke].rect = i.clientRect ? a() : {
5733
+ (c = n.dom.parentElement) == null || c.addEventListener("scroll", o), i.editor.storage[Ne].rect = i.clientRect ? a() : {
5739
5734
  width: 0,
5740
5735
  height: 0,
5741
5736
  left: 0,
@@ -5828,7 +5823,7 @@ function pl(e) {
5828
5823
  y.commands.setNodeSelection(R());
5829
5824
  }
5830
5825
  const b = M(
5831
- Ne(() => {
5826
+ Le(() => {
5832
5827
  const { editor: y } = e, { width: R } = getComputedStyle(y.view.dom);
5833
5828
  i((A) => ({
5834
5829
  ...A,
@@ -5853,10 +5848,10 @@ function pl(e) {
5853
5848
  });
5854
5849
  }
5855
5850
  const L = M(
5856
- Ne((y) => {
5851
+ Le((y) => {
5857
5852
  if (y.preventDefault(), y.stopPropagation(), !c)
5858
5853
  return;
5859
- const { x: R, w: A, dir: N } = h, B = (y.clientX - R) * (/l/.test(N) ? -1 : 1), S = cn(A + B, ni, t.width);
5854
+ const { x: R, w: A, dir: N } = h, B = (y.clientX - R) * (/l/.test(N) ? -1 : 1), S = an(A + B, ni, t.width);
5860
5855
  e.updateAttributes({
5861
5856
  width: S,
5862
5857
  height: null
@@ -5957,7 +5952,7 @@ const Jh = Qt.extend({
5957
5952
  };
5958
5953
  },
5959
5954
  addNodeView() {
5960
- return ue(pl);
5955
+ return me(pl);
5961
5956
  },
5962
5957
  addCommands() {
5963
5958
  var e;
@@ -6006,9 +6001,9 @@ const Jh = Qt.extend({
6006
6001
  }
6007
6002
  ];
6008
6003
  }
6009
- }), $e = new be("upload-image");
6004
+ }), $e = new we("upload-image");
6010
6005
  function bl() {
6011
- return new pe({
6006
+ return new be({
6012
6007
  key: $e,
6013
6008
  state: {
6014
6009
  init() {
@@ -6046,7 +6041,7 @@ function _l(e, t) {
6046
6041
  const n = $e.getState(e).find(void 0, void 0, (o) => o.id === t);
6047
6042
  return n.length > 0 ? (a = n[0]) == null ? void 0 : a.from : null;
6048
6043
  }
6049
- function wi({ validateFn: e, onUpload: t, postUpload: i }) {
6044
+ function pi({ validateFn: e, onUpload: t, postUpload: i }) {
6050
6045
  return (n, a, o) => {
6051
6046
  for (const c of n) {
6052
6047
  if (e && !e(c))
@@ -6134,10 +6129,10 @@ function kl({ editor: e, getPos: t }) {
6134
6129
  async function b() {
6135
6130
  var p, v;
6136
6131
  try {
6137
- const C = await fi(h, ((p = m == null ? void 0 : m.file) == null ? void 0 : p.name) || "image.png"), T = (v = e.extensionManager.extensions.find(
6132
+ const C = await ui(h, ((p = m == null ? void 0 : m.file) == null ? void 0 : p.name) || "image.png"), T = (v = e.extensionManager.extensions.find(
6138
6133
  ($) => $.name === "imageUpload"
6139
6134
  )) == null ? void 0 : v.options;
6140
- wi({
6135
+ pi({
6141
6136
  validateFn: () => !0,
6142
6137
  onUpload: T.upload,
6143
6138
  postUpload: T.postUpload
@@ -6170,7 +6165,7 @@ function kl({ editor: e, getPos: t }) {
6170
6165
  /* @__PURE__ */ r(dt, {}),
6171
6166
  /* @__PURE__ */ u(Ze, { className: "[&>button]:richtext-hidden", children: [
6172
6167
  /* @__PURE__ */ r("div", { children: m.src && /* @__PURE__ */ r(
6173
- lo,
6168
+ so,
6174
6169
  {
6175
6170
  crop: c,
6176
6171
  onChange: (p) => s(p),
@@ -6234,7 +6229,7 @@ function Cl(e) {
6234
6229
  const m = d[0], f = (b = e.editor.extensionManager.extensions.find(
6235
6230
  (k) => k.name === "imageUpload"
6236
6231
  )) == null ? void 0 : b.options;
6237
- wi({
6232
+ pi({
6238
6233
  validateFn: () => !0,
6239
6234
  onUpload: f.upload,
6240
6235
  postUpload: f.postUpload
@@ -6259,7 +6254,7 @@ function Cl(e) {
6259
6254
  /* @__PURE__ */ r(D, { name: "Trash2", className: "hover:richtext-text-foreground", onClick: s })
6260
6255
  ] }) }) }),
6261
6256
  /* @__PURE__ */ r(ie, { className: "richtext-w-full", onOpenAutoFocus: (l) => l.preventDefault(), children: /* @__PURE__ */ u(di, { defaultValue: "upload", className: "richtext-w-[400px]", activationMode: "manual", children: [
6262
- /* @__PURE__ */ u(Ht, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
6257
+ /* @__PURE__ */ u(zt, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
6263
6258
  /* @__PURE__ */ u(Ve, { value: "upload", children: [
6264
6259
  t("editor.image.dialog.tab.upload"),
6265
6260
  " "
@@ -6334,7 +6329,7 @@ const Nl = {
6334
6329
  };
6335
6330
  },
6336
6331
  addNodeView() {
6337
- return ue(Cl);
6332
+ return me(Cl);
6338
6333
  },
6339
6334
  addOptions() {
6340
6335
  var e;
@@ -6363,13 +6358,13 @@ const Nl = {
6363
6358
  };
6364
6359
  },
6365
6360
  addProseMirrorPlugins() {
6366
- const t = wi({
6361
+ const t = pi({
6367
6362
  validateFn: (i) => !(!this.options.acceptMimes.includes(i.type) || i.size > this.options.maxSize),
6368
6363
  onUpload: this.options.upload,
6369
6364
  postUpload: this.options.postUpload
6370
6365
  });
6371
6366
  return [
6372
- new pe({
6367
+ new be({
6373
6368
  props: {
6374
6369
  handlePaste: (i, n) => !n.clipboardData || [...n.clipboardData.files || []].some((o) => o.type === "text/html") ? !1 : vl(i, n, t),
6375
6370
  handleDrop: (i, n, a, o) => (!(n instanceof DragEvent) || !n.dataTransfer || yl(i, n, o, t), !1)
@@ -6445,7 +6440,7 @@ const Yh = ce.create({
6445
6440
  allowFullscreen: !0,
6446
6441
  upload: void 0,
6447
6442
  frameborder: !1,
6448
- width: Ft["size-medium"],
6443
+ width: jt["size-medium"],
6449
6444
  HTMLAttributes: {
6450
6445
  class: "iframe-wrapper",
6451
6446
  style: "display: flex;justify-content: center;"
@@ -6496,7 +6491,7 @@ function Ll(e) {
6496
6491
  /* @__PURE__ */ r(D, { name: "Trash2", className: "hover:richtext-text-foreground", onClick: f })
6497
6492
  ] }) }) }),
6498
6493
  /* @__PURE__ */ r(ie, { className: "richtext-w-full", onOpenAutoFocus: (x) => x.preventDefault(), children: /* @__PURE__ */ u(di, { defaultValue: "upload", className: "richtext-w-[400px]", activationMode: "manual", children: [
6499
- /* @__PURE__ */ u(Ht, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
6494
+ /* @__PURE__ */ u(zt, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
6500
6495
  /* @__PURE__ */ u(Ve, { value: "upload", children: [
6501
6496
  t("editor.video.dialog.tab.upload"),
6502
6497
  " "
@@ -6564,7 +6559,7 @@ const Qh = ce.create({
6564
6559
  };
6565
6560
  },
6566
6561
  addNodeView() {
6567
- return ue(Ll);
6562
+ return me(Ll);
6568
6563
  },
6569
6564
  addOptions() {
6570
6565
  var e;
@@ -6602,11 +6597,11 @@ function Al(e, t, i) {
6602
6597
  }
6603
6598
  function Sl(e, t, i) {
6604
6599
  const { doc: n, selection: a } = e;
6605
- return !n || !a || !(a instanceof Qa) || a.forEachCell((o, c) => {
6600
+ return !n || !a || !(a instanceof Ya) || a.forEachCell((o, c) => {
6606
6601
  e = Al(e, c, i);
6607
6602
  }), e;
6608
6603
  }
6609
- function Bi(e, t) {
6604
+ function Di(e, t) {
6610
6605
  return ({ tr: i, state: n, dispatch: a }) => {
6611
6606
  const { selection: o } = n;
6612
6607
  return i = i.setSelection(o), i = Sl(i, t, e), i.docChanged ? (a == null || a(i), !0) : !1;
@@ -6637,21 +6632,21 @@ const Ml = Z.create({
6637
6632
  },
6638
6633
  addCommands() {
6639
6634
  return {
6640
- setTableCellBackground: (e) => Bi(e, this.options),
6641
- unsetTableCellBackground: () => Bi("", this.options)
6635
+ setTableCellBackground: (e) => Di(e, this.options),
6636
+ unsetTableCellBackground: () => Di("", this.options)
6642
6637
  };
6643
6638
  }
6644
6639
  }), Il = /(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i, zl = /CrOS/, Hl = /android|ipad|playbook|silk/i;
6645
- function ji(e = {}) {
6640
+ function $i(e = {}) {
6646
6641
  let t = e.ua || typeof navigator < "u" && navigator.userAgent;
6647
6642
  return t && typeof t == "object" && t.headers && typeof t.headers["user-agent"] == "string" && (t = t.headers["user-agent"]), typeof t != "string" ? !1 : !!(Il.test(t) && !zl.test(t) || e.tablet && Hl.test(t) || e.tablet && e.featureDetect && navigator && navigator.maxTouchPoints > 1 && t.includes("Macintosh") && t.includes("Safari"));
6648
6643
  }
6649
- const Fi = (e) => Array.from({ length: e }).map((t, i) => i + 1);
6644
+ const Bi = (e) => Array.from({ length: e }).map((t, i) => i + 1);
6650
6645
  function El(e) {
6651
6646
  var d;
6652
6647
  const [t, i] = w(!0), [n, a] = w({
6653
- rows: ji() ? mt : ft,
6654
- cols: ji() ? mt : ft
6648
+ rows: $i() ? mt : ft,
6649
+ cols: $i() ? mt : ft
6655
6650
  }), [o, c] = w({
6656
6651
  rows: gt,
6657
6652
  cols: gt
@@ -6683,9 +6678,9 @@ function El(e) {
6683
6678
  return /* @__PURE__ */ u(re, { modal: !0, children: [
6684
6679
  /* @__PURE__ */ r(ae, { asChild: !0, children: e == null ? void 0 : e.children }),
6685
6680
  /* @__PURE__ */ r(ie, { className: "richtext-w-full !richtext-p-2", align: "start", side: "bottom", children: /* @__PURE__ */ u("div", { className: "richtext-p-0 table-grid-size-editor", children: [
6686
- /* @__PURE__ */ r("div", { className: "richtext-flex richtext-flex-col richtext-flex-wrap richtext-justify-between richtext-gap-1", children: (d = Fi(n == null ? void 0 : n.rows)) == null ? void 0 : d.map((m) => {
6681
+ /* @__PURE__ */ r("div", { className: "richtext-flex richtext-flex-col richtext-flex-wrap richtext-justify-between richtext-gap-1", children: (d = Bi(n == null ? void 0 : n.rows)) == null ? void 0 : d.map((m) => {
6687
6682
  var f;
6688
- return /* @__PURE__ */ r("div", { className: "richtext-flex richtext-gap-1", children: (f = Fi(n == null ? void 0 : n.cols)) == null ? void 0 : f.map((g) => /* @__PURE__ */ r(
6683
+ return /* @__PURE__ */ r("div", { className: "richtext-flex richtext-gap-1", children: (f = Bi(n == null ? void 0 : n.cols)) == null ? void 0 : f.map((g) => /* @__PURE__ */ r(
6689
6684
  "div",
6690
6685
  {
6691
6686
  className: `richtext-cursor-pointer richtext-border-border ${g <= o.cols && m <= o.rows && "!richtext-bg-foreground tableCellActive"}`,
@@ -6721,7 +6716,7 @@ function Rl(e) {
6721
6716
  }
6722
6717
  ) });
6723
6718
  }
6724
- const eu = Ua.extend({
6719
+ const eu = Fa.extend({
6725
6720
  addOptions() {
6726
6721
  var e;
6727
6722
  return {
@@ -6742,9 +6737,9 @@ const eu = Ua.extend({
6742
6737
  },
6743
6738
  addExtensions() {
6744
6739
  return [
6745
- Va.configure(this.options.tableRow),
6746
- Wa.configure(this.options.tableHeader),
6747
- qa.configure(this.options.tableCell),
6740
+ Ua.configure(this.options.tableRow),
6741
+ Va.configure(this.options.tableHeader),
6742
+ Wa.configure(this.options.tableCell),
6748
6743
  Ml.configure(this.options.tableCellBackground)
6749
6744
  ];
6750
6745
  }
@@ -6782,8 +6777,8 @@ const eu = Ua.extend({
6782
6777
  },
6783
6778
  addProseMirrorPlugins() {
6784
6779
  return [
6785
- new pe({
6786
- key: new be("format-painter"),
6780
+ new be({
6781
+ key: new we("format-painter"),
6787
6782
  state: {
6788
6783
  init: () => [],
6789
6784
  apply: (e, t) => {
@@ -6871,7 +6866,7 @@ function Ol({ editor: e, ...t }) {
6871
6866
  side: "bottom",
6872
6867
  children: [
6873
6868
  /* @__PURE__ */ u("div", { className: "richtext-mb-[6px] richtext-flex richtext-items-center richtext-justify-between", children: [
6874
- /* @__PURE__ */ r(le, { children: i("editor.search.dialog.text") }),
6869
+ /* @__PURE__ */ r(de, { children: i("editor.search.dialog.text") }),
6875
6870
  /* @__PURE__ */ r("span", { className: "richtext-font-semibold", children: o.length ? `${n + 1}/${o.length}` : "0/0" })
6876
6871
  ] }),
6877
6872
  /* @__PURE__ */ u("div", { className: "richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5 richtext-mb-[10px]", children: [
@@ -6890,7 +6885,7 @@ function Ol({ editor: e, ...t }) {
6890
6885
  /* @__PURE__ */ r(U, { disabled: !o.length, className: "richtext-flex-1", onClick: e.commands.goToPrevSearchResult, children: /* @__PURE__ */ r(D, { name: "ChevronUp" }) }),
6891
6886
  /* @__PURE__ */ r(U, { disabled: !o.length, className: "richtext-flex-1", onClick: e.commands.goToNextSearchResult, children: /* @__PURE__ */ r(D, { name: "ChevronDown" }) })
6892
6887
  ] }),
6893
- /* @__PURE__ */ r(le, { className: "richtext-mb-[6px]", children: i("editor.replace.dialog.text") }),
6888
+ /* @__PURE__ */ r(de, { className: "richtext-mb-[6px]", children: i("editor.replace.dialog.text") }),
6894
6889
  /* @__PURE__ */ r("div", { className: "richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5 richtext-mb-[5px]", children: /* @__PURE__ */ r("div", { className: "richtext-relative richtext-items-center richtext-w-full richtext-max-w-sm", children: /* @__PURE__ */ r(
6895
6890
  te,
6896
6891
  {
@@ -6912,7 +6907,7 @@ function Ol({ editor: e, ...t }) {
6912
6907
  }
6913
6908
  }
6914
6909
  ),
6915
- /* @__PURE__ */ r(le, { children: i("editor.replace.caseSensitive") })
6910
+ /* @__PURE__ */ r(de, { children: i("editor.replace.caseSensitive") })
6916
6911
  ] }),
6917
6912
  /* @__PURE__ */ u("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
6918
6913
  /* @__PURE__ */ r(U, { disabled: !o.length, className: "richtext-flex-1", onClick: e.commands.replace, children: i("editor.replace.dialog.text") }),
@@ -6966,7 +6961,7 @@ function Dl(e, t, i) {
6966
6961
  results: o
6967
6962
  };
6968
6963
  }
6969
- function Ui(e, t, { state: i, dispatch: n }) {
6964
+ function ji(e, t, { state: i, dispatch: n }) {
6970
6965
  if (!t[0])
6971
6966
  return;
6972
6967
  const { from: o, to: c } = t[0];
@@ -6994,7 +6989,7 @@ function Bl(e, t, { tr: i, dispatch: n }) {
6994
6989
  }
6995
6990
  return n(i), !0;
6996
6991
  }
6997
- function Vi({ view: e, tr: t, searchResults: i, searchResultCurrentClass: n, gotoIndex: a }) {
6992
+ function Fi({ view: e, tr: t, searchResults: i, searchResultCurrentClass: n, gotoIndex: a }) {
6998
6993
  const o = i[a];
6999
6994
  if (o) {
7000
6995
  const c = t.setMeta("directDecoration", {
@@ -7052,7 +7047,7 @@ const Jt = "ON_SEARCH_RESULTS", ze = new CustomEvent(Jt), jl = Z.create({
7052
7047
  setCaseSensitive: (e) => ({ state: t, dispatch: i }) => (this.options.caseSensitive = e, Qe(t, i), !1),
7053
7048
  replace: () => ({ state: e, dispatch: t }) => {
7054
7049
  const { replaceTerm: i } = this.options, { currentIndex: n, results: a } = this.storage, o = a[n];
7055
- return o ? (Ui(i, [o], { state: e, dispatch: t }), this.storage.results.splice(n, 1)) : (Ui(i, a, { state: e, dispatch: t }), this.storage.results.shift()), window.dispatchEvent(ze), Qe(e, t), !1;
7050
+ return o ? (ji(i, [o], { state: e, dispatch: t }), this.storage.results.splice(n, 1)) : (ji(i, a, { state: e, dispatch: t }), this.storage.results.shift()), window.dispatchEvent(ze), Qe(e, t), !1;
7056
7051
  },
7057
7052
  replaceAll: () => ({ state: e, tr: t, dispatch: i }) => {
7058
7053
  const { replaceTerm: n } = this.options, { results: a } = this.storage;
@@ -7060,7 +7055,7 @@ const Jt = "ON_SEARCH_RESULTS", ze = new CustomEvent(Jt), jl = Z.create({
7060
7055
  },
7061
7056
  goToPrevSearchResult: () => ({ view: e, tr: t }) => {
7062
7057
  const { searchResultCurrentClass: i } = this.options, { currentIndex: n, results: a } = this.storage, o = (n + a.length - 1) % a.length;
7063
- return this.storage.currentIndex = o, window.dispatchEvent(ze), Vi({
7058
+ return this.storage.currentIndex = o, window.dispatchEvent(ze), Fi({
7064
7059
  view: e,
7065
7060
  tr: t,
7066
7061
  searchResults: a,
@@ -7070,7 +7065,7 @@ const Jt = "ON_SEARCH_RESULTS", ze = new CustomEvent(Jt), jl = Z.create({
7070
7065
  },
7071
7066
  goToNextSearchResult: () => ({ view: e, tr: t }) => {
7072
7067
  const { searchResultCurrentClass: i } = this.options, { currentIndex: n, results: a } = this.storage, o = (n + 1) % a.length;
7073
- return this.storage.currentIndex = o, this.options.onChange && this.options.onChange(), window.dispatchEvent(ze), Vi({
7068
+ return this.storage.currentIndex = o, this.options.onChange && this.options.onChange(), window.dispatchEvent(ze), Fi({
7074
7069
  view: e,
7075
7070
  tr: t,
7076
7071
  searchResults: a,
@@ -7083,8 +7078,8 @@ const Jt = "ON_SEARCH_RESULTS", ze = new CustomEvent(Jt), jl = Z.create({
7083
7078
  addProseMirrorPlugins() {
7084
7079
  const e = this;
7085
7080
  return [
7086
- new pe({
7087
- key: new be("search"),
7081
+ new be({
7082
+ key: new we("search"),
7088
7083
  state: {
7089
7084
  init() {
7090
7085
  return De.empty;
@@ -8969,7 +8964,7 @@ function Ul(e) {
8969
8964
  emoji: qe[t]
8970
8965
  }));
8971
8966
  }
8972
- const $n = Tt((e, t) => {
8967
+ const Dn = Nt((e, t) => {
8973
8968
  const i = X(), [n, a] = w(0), { t: o } = F(), c = (d) => {
8974
8969
  const m = e.items[d];
8975
8970
  m && e.command(m);
@@ -8985,7 +8980,7 @@ const $n = Tt((e, t) => {
8985
8980
  return;
8986
8981
  const d = i.current.querySelector(`span:nth-of-type(${n + 1})`);
8987
8982
  d && oi(d, { behavior: "smooth", scrollMode: "if-needed" });
8988
- }, [n]), Lt(t, () => ({
8983
+ }, [n]), Tt(t, () => ({
8989
8984
  onKeyDown: ({ event: d }) => d.key === "ArrowUp" ? (s(), !0) : d.key === "ArrowDown" ? (h(), !0) : d.key === "Enter" ? (l(), !0) : !1
8990
8985
  })), /* @__PURE__ */ r("div", { className: "richtext-w-[200px] richtext-max-h-[320px] richtext-overflow-x-hidden richtext-overflow-y-auto richtext-rounded-sm !richtext-border richtext-bg-popover richtext-p-1 richtext-text-popover-foreground richtext-shadow-md richtext-outline-none", children: /* @__PURE__ */ r("div", { ref: i, children: e.items.length ? e.items.map((d, m) => /* @__PURE__ */ u(
8991
8986
  "span",
@@ -9002,7 +8997,7 @@ const $n = Tt((e, t) => {
9002
8997
  `emoji-list-code-${m}`
9003
8998
  )) : /* @__PURE__ */ r("div", { className: "richtext-flex richtext-relative richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-outline-none richtext-transition-colors", children: /* @__PURE__ */ r("span", { children: o("no_result_found") }) }) }) });
9004
8999
  });
9005
- $n.displayName = "EmojiList";
9000
+ Dn.displayName = "EmojiList";
9006
9001
  const Vl = [
9007
9002
  "😀",
9008
9003
  "😃",
@@ -10905,23 +10900,23 @@ function ad(e, t = null) {
10905
10900
  function od(e, t) {
10906
10901
  window.localStorage.setItem(e, `${t}`);
10907
10902
  }
10908
- class Bt {
10903
+ class $t {
10909
10904
  constructor(t, i) {
10910
- me(this, "key");
10911
- me(this, "value");
10912
- me(this, "prev");
10913
- me(this, "next");
10905
+ fe(this, "key");
10906
+ fe(this, "value");
10907
+ fe(this, "prev");
10908
+ fe(this, "next");
10914
10909
  this.key = t, this.value = i, this.prev = null, this.next = null;
10915
10910
  }
10916
10911
  }
10917
10912
  class cd {
10918
10913
  constructor(t) {
10919
- me(this, "capacity");
10920
- me(this, "usedCapacity");
10921
- me(this, "head");
10922
- me(this, "tail");
10923
- me(this, "store");
10924
- this.capacity = t || 20, this.usedCapacity = 0, this.store = {}, this.head = new Bt("fakeHeadNode", "fakeHeadNode"), this.tail = new Bt("fakeTailNode", "fakeTailNode"), this.head.next = this.tail, this.tail.prev = this.head;
10914
+ fe(this, "capacity");
10915
+ fe(this, "usedCapacity");
10916
+ fe(this, "head");
10917
+ fe(this, "tail");
10918
+ fe(this, "store");
10919
+ this.capacity = t || 20, this.usedCapacity = 0, this.store = {}, this.head = new $t("fakeHeadNode", "fakeHeadNode"), this.tail = new $t("fakeTailNode", "fakeTailNode"), this.head.next = this.tail, this.tail.prev = this.head;
10925
10920
  }
10926
10921
  removeNode(t) {
10927
10922
  t.prev.next = t.next, t.next.prev = t.prev;
@@ -10948,7 +10943,7 @@ class cd {
10948
10943
  const n = this.store[t];
10949
10944
  n.value = i, this.moveToHead(n);
10950
10945
  } else {
10951
- const n = new Bt(t, i);
10946
+ const n = new $t(t, i);
10952
10947
  if (this.addToHead(n), this.store[t] = n, this.usedCapacity += 1, this.usedCapacity > this.capacity) {
10953
10948
  const a = this.removeTail();
10954
10949
  delete this.store[a.key], this.usedCapacity -= 1;
@@ -10992,11 +10987,11 @@ function sd(e, t) {
10992
10987
  }
10993
10988
  };
10994
10989
  }
10995
- const He = sd("EMOJI_PICKER", 20), Wi = [
10990
+ const He = sd("EMOJI_PICKER", 20), Ui = [
10996
10991
  {
10997
10992
  title: "Smileys & People",
10998
10993
  data: Vl,
10999
- icon: ea
10994
+ icon: Qr
11000
10995
  },
11001
10996
  {
11002
10997
  title: "Animals & Nature",
@@ -11036,7 +11031,7 @@ const He = sd("EMOJI_PICKER", 20), Wi = [
11036
11031
  ], ld = ["😀", "😃", "😄", "😁", "😆", "😅", "😂", "🤣"];
11037
11032
  function dd({ onSelectEmoji: e, children: t }) {
11038
11033
  const [i, n] = w([]), { t: a } = F(), o = O(
11039
- () => i.length ? [{ title: "Frequently used", icon: Qr, data: i }, ...Wi] : Wi,
11034
+ () => i.length ? [{ title: "Frequently used", icon: Yr, data: i }, ...Ui] : Ui,
11040
11035
  [i]
11041
11036
  ), c = M(
11042
11037
  (s) => {
@@ -11055,7 +11050,7 @@ function dd({ onSelectEmoji: e, children: t }) {
11055
11050
  }, []), /* @__PURE__ */ u(re, { modal: !0, children: [
11056
11051
  /* @__PURE__ */ r(ae, { asChild: !0, children: t }),
11057
11052
  /* @__PURE__ */ r(ie, { hideWhenDetached: !0, className: "richtext-w-full richtext-h-full richtext-p-2", align: "start", side: "bottom", children: /* @__PURE__ */ u(di, { defaultValue: "Frequently used", children: [
11058
- /* @__PURE__ */ r(Ht, { className: "richtext-flex richtext-items-center richtext-gap-[4px]", children: o.map((s) => /* @__PURE__ */ r(
11053
+ /* @__PURE__ */ r(zt, { className: "richtext-flex richtext-items-center richtext-gap-[4px]", children: o.map((s) => /* @__PURE__ */ r(
11059
11054
  Ve,
11060
11055
  {
11061
11056
  value: s.title,
@@ -11102,7 +11097,7 @@ function hd({ editor: e, icon: t, ...i }) {
11102
11097
  }
11103
11098
  ) });
11104
11099
  }
11105
- const ud = 200, md = new be("emoji"), iu = ce.create({
11100
+ const ud = 200, md = new we("emoji"), iu = ce.create({
11106
11101
  name: "emoji",
11107
11102
  content: "text*",
11108
11103
  priority: ud,
@@ -11139,7 +11134,7 @@ const ud = 200, md = new be("emoji"), iu = ce.create({
11139
11134
  },
11140
11135
  addProseMirrorPlugins() {
11141
11136
  return [
11142
- rn({
11137
+ tn({
11143
11138
  editor: this.editor,
11144
11139
  ...this.options.suggestion
11145
11140
  })
@@ -11152,7 +11147,7 @@ const ud = 200, md = new be("emoji"), iu = ce.create({
11152
11147
  let e, t, i;
11153
11148
  return {
11154
11149
  onStart: (n) => {
11155
- i = n.editor.isEditable, i && (e = new Yt($n, {
11150
+ i = n.editor.isEditable, i && (e = new Yt(Dn, {
11156
11151
  props: n,
11157
11152
  editor: n.editor
11158
11153
  }), t = ai("body", {
@@ -11248,7 +11243,7 @@ function xd({ editor: e, ...t }) {
11248
11243
  }
11249
11244
  ) }),
11250
11245
  /* @__PURE__ */ u(ie, { hideWhenDetached: !0, className: "richtext-w-full richtext-h-full richtext-p-2", align: "start", side: "bottom", children: [
11251
- /* @__PURE__ */ r(le, { className: "richtext-mb-[6px]", children: i("editor.formula.dialog.text") }),
11246
+ /* @__PURE__ */ r(de, { className: "richtext-mb-[6px]", children: i("editor.formula.dialog.text") }),
11252
11247
  /* @__PURE__ */ r("div", { className: "richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5 richtext-mb-[16px]", children: /* @__PURE__ */ r("div", { className: "richtext-relative richtext-w-full richtext-max-w-sm", children: /* @__PURE__ */ r(
11253
11248
  ct,
11254
11249
  {
@@ -11265,7 +11260,7 @@ function xd({ editor: e, ...t }) {
11265
11260
  d && /* @__PURE__ */ r("div", { className: "richtext-my-[10px] richtext-p-[10px] richtext-rounded-[6px] !richtext-border-[1px]", children: d }),
11266
11261
  /* @__PURE__ */ u("div", { className: "richtext-flex richtext-items-center richtext-justify-between richtext-gap-[6px]", children: [
11267
11262
  /* @__PURE__ */ r(U, { onClick: h, className: "richtext-flex-1", children: "Submit" }),
11268
- /* @__PURE__ */ r("a", { href: "https://katex.org/docs/supported", target: "_blank", rel: "noreferrer noopener", children: /* @__PURE__ */ r(Ji, { size: 16 }) })
11263
+ /* @__PURE__ */ r("a", { href: "https://katex.org/docs/supported", target: "_blank", rel: "noreferrer noopener", children: /* @__PURE__ */ r(Gi, { size: 16 }) })
11269
11264
  ] })
11270
11265
  ] })
11271
11266
  ] });
@@ -11333,7 +11328,7 @@ const Oe = ce.create({
11333
11328
  ];
11334
11329
  },
11335
11330
  addNodeView() {
11336
- return ue(gd);
11331
+ return me(gd);
11337
11332
  }
11338
11333
  });
11339
11334
  function bd(e) {
@@ -11422,7 +11417,7 @@ function yd(e) {
11422
11417
  const g = new DOMParser().parseFromString(m, "text/html"), x = g.querySelectorAll("img");
11423
11418
  if (!x.length)
11424
11419
  return g.body.innerHTML;
11425
- if (yn(e.editor, "image")) {
11420
+ if (vn(e.editor, "image")) {
11426
11421
  const L = (k = e.editor.extensionManager.extensions.find(
11427
11422
  (p) => p.name === "importWord"
11428
11423
  )) == null ? void 0 : k.options;
@@ -11526,18 +11521,18 @@ function Cd(e, t) {
11526
11521
  return console.error("Download is not supported in Node.js"), Promise.resolve();
11527
11522
  }
11528
11523
  const Nd = {
11529
- ..._e,
11530
- hardBreak: _e.hard_break,
11531
- codeBlock: _e.code_block,
11532
- orderedList: _e.ordered_list,
11533
- listItem: _e.list_item,
11534
- bulletList: _e.bullet_list,
11535
- horizontalRule: _e.horizontal_rule,
11524
+ ...ye,
11525
+ hardBreak: ye.hard_break,
11526
+ codeBlock: ye.code_block,
11527
+ orderedList: ye.ordered_list,
11528
+ listItem: ye.list_item,
11529
+ bulletList: ye.bullet_list,
11530
+ horizontalRule: ye.horizontal_rule,
11536
11531
  // Requirement Buffer on browser
11537
11532
  image(e, t) {
11538
11533
  e.renderInline(t), e.closeBlock(t);
11539
11534
  }
11540
- }, Td = new ho(Nd, uo), au = Z.create({
11535
+ }, Td = new lo(Nd, ho), au = Z.create({
11541
11536
  name: "exportWord",
11542
11537
  addOptions() {
11543
11538
  var e;
@@ -11567,7 +11562,7 @@ const Nd = {
11567
11562
  return new Uint8Array(o);
11568
11563
  }
11569
11564
  }, i = Td.serialize(e.state.doc, t);
11570
- return mo.toBlob(i).then((n) => Cd(new Blob([n]), "export-document.docx")), !0;
11565
+ return uo.toBlob(i).then((n) => Cd(new Blob([n]), "export-document.docx")), !0;
11571
11566
  }
11572
11567
  };
11573
11568
  }
@@ -11699,7 +11694,7 @@ const Pd = ce.create({
11699
11694
  return ["toc", se(e)];
11700
11695
  },
11701
11696
  addNodeView() {
11702
- return ue(zd);
11697
+ return me(zd);
11703
11698
  },
11704
11699
  // @ts-expect-error
11705
11700
  addCommands() {
@@ -11789,7 +11784,7 @@ function Dd(e) {
11789
11784
  ) }),
11790
11785
  /* @__PURE__ */ u(Ie, { className: "richtext-flex richtext-flex-col richtext-items-center", children: [
11791
11786
  /* @__PURE__ */ r("span", { children: n.title }),
11792
- !!((o = n.shortcutKeys) != null && o.length) && /* @__PURE__ */ r("span", { children: (c = n.shortcutKeys) == null ? void 0 : c.map((s) => Mt(s)).join(" ") })
11787
+ !!((o = n.shortcutKeys) != null && o.length) && /* @__PURE__ */ r("span", { children: (c = n.shortcutKeys) == null ? void 0 : c.map((s) => St(s)).join(" ") })
11793
11788
  ] })
11794
11789
  ] }, `text-align-${a}`);
11795
11790
  })
@@ -11867,7 +11862,7 @@ const ou = Z.create({
11867
11862
  listUsers: $d,
11868
11863
  itemUser: Bd,
11869
11864
  selectedUser: jd
11870
- }, Fd = Tt((e, t) => {
11865
+ }, Fd = Nt((e, t) => {
11871
11866
  const i = X(), [n, a] = w(0), o = (l) => {
11872
11867
  const d = e.items[l];
11873
11868
  d && e.command({ id: d, label: d });
@@ -11883,7 +11878,7 @@ const ou = Z.create({
11883
11878
  return;
11884
11879
  const l = i.current.querySelector(`span:nth-of-type(${n + 1})`);
11885
11880
  l && oi(l, { behavior: "smooth", scrollMode: "if-needed" });
11886
- }, [n]), Lt(t, () => ({
11881
+ }, [n]), Tt(t, () => ({
11887
11882
  onKeyDown: ({ event: l }) => l.key === "ArrowUp" ? (c(), !0) : l.key === "ArrowDown" ? (s(), !0) : l.key === "Enter" ? (h(), !0) : !1
11888
11883
  })), /* @__PURE__ */ r("div", { className: ee("listUsers", bt.listUsers), children: /* @__PURE__ */ r("div", { ref: i, children: e.items.length ? e.items.map((l, d) => /* @__PURE__ */ r(
11889
11884
  "span",
@@ -11944,7 +11939,7 @@ const ou = Z.create({
11944
11939
  }
11945
11940
  };
11946
11941
  }
11947
- }, cu = Ka.extend({
11942
+ }, cu = qa.extend({
11948
11943
  addAttributes() {
11949
11944
  return {
11950
11945
  id: {
@@ -11966,26 +11961,26 @@ const ou = Z.create({
11966
11961
  function Wd(e) {
11967
11962
  switch (gc(e)) {
11968
11963
  case "audio":
11969
- return /* @__PURE__ */ r(oa, {});
11970
- case "video":
11971
11964
  return /* @__PURE__ */ r(aa, {});
11972
- case "file":
11965
+ case "video":
11973
11966
  return /* @__PURE__ */ r(ra, {});
11974
- case "image":
11967
+ case "file":
11975
11968
  return /* @__PURE__ */ r(na, {});
11969
+ case "image":
11970
+ return /* @__PURE__ */ r(ia, {});
11976
11971
  case "pdf":
11977
- return /* @__PURE__ */ r(Hn, {});
11972
+ return /* @__PURE__ */ r(zn, {});
11978
11973
  case "word":
11979
- return /* @__PURE__ */ r(En, {});
11974
+ return /* @__PURE__ */ r(Hn, {});
11980
11975
  case "excel":
11981
- return /* @__PURE__ */ r(ia, {});
11982
- case "ppt":
11983
11976
  return /* @__PURE__ */ r(ta, {});
11977
+ case "ppt":
11978
+ return /* @__PURE__ */ r(ea, {});
11984
11979
  default:
11985
11980
  return /* @__PURE__ */ r(q, {});
11986
11981
  }
11987
11982
  }
11988
- const qd = "_wrap_gpqtf_1", jt = {
11983
+ const qd = "_wrap_gpqtf_1", Bt = {
11989
11984
  wrap: qd
11990
11985
  };
11991
11986
  function Kd({ editor: e, node: t, updateAttributes: i, deleteNode: n, extension: a }) {
@@ -12017,10 +12012,10 @@ function Kd({ editor: e, node: t, updateAttributes: i, deleteNode: n, extension:
12017
12012
  !f && !s && (p(), i({ hasTrigger: !0 }));
12018
12013
  }, [f, s, p, i]);
12019
12014
  const C = M(() => n(), [e]);
12020
- return c && !f ? /* @__PURE__ */ r(ne, { children: /* @__PURE__ */ u("div", { className: ee(jt.wrap, "render-wrapper"), children: [
12015
+ return c && !f ? /* @__PURE__ */ r(ne, { children: /* @__PURE__ */ u("div", { className: ee(Bt.wrap, "render-wrapper"), children: [
12021
12016
  /* @__PURE__ */ r("p", { style: { cursor: "pointer" }, onClick: p, children: x ? /* @__PURE__ */ r("span", { children: k("editor.attachment.uploading") }) : /* @__PURE__ */ r("span", { children: k("editor.attachment.please_upload") }) }),
12022
12017
  /* @__PURE__ */ r("input", { ref: o, type: "file", hidden: !0, onChange: v })
12023
- ] }) }) : f ? /* @__PURE__ */ r(ne, { children: /* @__PURE__ */ u("div", { className: ee(jt.wrap, "render-wrapper"), onClick: p, children: [
12018
+ ] }) }) : f ? /* @__PURE__ */ r(ne, { children: /* @__PURE__ */ u("div", { className: ee(Bt.wrap, "render-wrapper"), onClick: p, children: [
12024
12019
  /* @__PURE__ */ u("div", { className: "richtext-flex richtext-items-center richtext-gap-[4px]", children: [
12025
12020
  /* @__PURE__ */ r("span", { children: Wd(m) }),
12026
12021
  /* @__PURE__ */ u("span", { children: [
@@ -12042,7 +12037,7 @@ function Kd({ editor: e, node: t, updateAttributes: i, deleteNode: n, extension:
12042
12037
  tooltip: k("editor.delete")
12043
12038
  }
12044
12039
  )
12045
- ] }) }) : g !== "null" ? /* @__PURE__ */ r(ne, { children: /* @__PURE__ */ r("div", { className: ee(jt.wrap, "render-wrapper"), onClick: p, children: /* @__PURE__ */ r("p", { children: g }) }) }) : /* @__PURE__ */ r(q, {});
12040
+ ] }) }) : g !== "null" ? /* @__PURE__ */ r(ne, { children: /* @__PURE__ */ r("div", { className: ee(Bt.wrap, "render-wrapper"), onClick: p, children: /* @__PURE__ */ r("p", { children: g }) }) }) : /* @__PURE__ */ r(q, {});
12046
12041
  }
12047
12042
  const su = ce.create({
12048
12043
  name: "attachment",
@@ -12115,7 +12110,7 @@ const su = ce.create({
12115
12110
  };
12116
12111
  },
12117
12112
  addNodeView() {
12118
- return ue(Kd);
12113
+ return me(Kd);
12119
12114
  }
12120
12115
  }), wt = {
12121
12116
  TOP_LEFT: "tl",
@@ -12170,7 +12165,7 @@ function Gd(e) {
12170
12165
  y.commands.setNodeSelection(R());
12171
12166
  }
12172
12167
  const b = M(
12173
- Ne(() => {
12168
+ Le(() => {
12174
12169
  const { editor: y } = e, { width: R } = getComputedStyle(y.view.dom);
12175
12170
  i((A) => ({
12176
12171
  ...A,
@@ -12195,10 +12190,10 @@ function Gd(e) {
12195
12190
  });
12196
12191
  }
12197
12192
  const L = M(
12198
- Ne((y) => {
12193
+ Le((y) => {
12199
12194
  if (y.preventDefault(), y.stopPropagation(), !c)
12200
12195
  return;
12201
- const { x: R, w: A, dir: N } = h, B = (y.clientX - R) * (/l/.test(N) ? -1 : 1), S = cn(A + B, ni, t.width);
12196
+ const { x: R, w: A, dir: N } = h, B = (y.clientX - R) * (/l/.test(N) ? -1 : 1), S = an(A + B, ni, t.width);
12202
12197
  e.updateAttributes({
12203
12198
  width: S,
12204
12199
  height: null
@@ -12332,7 +12327,7 @@ function Jd({ editor: e, icon: t, giphyApiKey: i, ...n }) {
12332
12327
  }
12333
12328
  );
12334
12329
  }
12335
- const Bn = Qt.extend({
12330
+ const $n = Qt.extend({
12336
12331
  name: "imageGif",
12337
12332
  addOptions() {
12338
12333
  var e;
@@ -12389,7 +12384,7 @@ const Bn = Qt.extend({
12389
12384
  };
12390
12385
  },
12391
12386
  addNodeView() {
12392
- return ue(Gd);
12387
+ return me(Gd);
12393
12388
  },
12394
12389
  addCommands() {
12395
12390
  var e;
@@ -12438,9 +12433,9 @@ const Bn = Qt.extend({
12438
12433
  }
12439
12434
  ];
12440
12435
  }
12441
- }), qi = `graph TB
12436
+ }), Vi = `graph TB
12442
12437
  a-->b`, Xd = ({ editor: e, upload: t }) => {
12443
- const [i, n] = w(qi), [a, o] = w(""), [c, s] = w(!1), h = X(null), l = async (f) => {
12438
+ const [i, n] = w(Vi), [a, o] = w(""), [c, s] = w(!1), h = X(null), l = async (f) => {
12444
12439
  try {
12445
12440
  const { svg: g } = await Ct.render("mermaid-svg", f);
12446
12441
  o(g);
@@ -12486,15 +12481,18 @@ a-->b`, Xd = ({ editor: e, upload: t }) => {
12486
12481
  autoFocus: !0,
12487
12482
  required: !0,
12488
12483
  rows: 10,
12489
- defaultValue: qi,
12490
- placeholder: "Text"
12484
+ defaultValue: Vi,
12485
+ placeholder: "Text",
12486
+ style: {
12487
+ color: "hsl(var(--richtext-foreground))"
12488
+ }
12491
12489
  }
12492
12490
  ),
12493
12491
  /* @__PURE__ */ r(
12494
12492
  "div",
12495
12493
  {
12496
12494
  className: "richtext-flex-1 richtext-flex richtext-items-center richtext-justify-center richtext-rounded-[10px] richtext-p-[10px]",
12497
- style: { height: "100%", border: "1px solid hsl(var(--border))", minHeight: 500 },
12495
+ style: { height: "100%", border: "1px solid hsl(var(--border))", minHeight: 500, background: "#fff" },
12498
12496
  ref: h,
12499
12497
  dangerouslySetInnerHTML: { __html: a }
12500
12498
  }
@@ -12507,10 +12505,10 @@ a-->b`, Xd = ({ editor: e, upload: t }) => {
12507
12505
  onClick: async () => {
12508
12506
  if (i !== "") {
12509
12507
  if (i) {
12510
- const f = h.current.querySelector("svg"), { width: g, height: x } = f.getBoundingClientRect(), b = `mermaid-${Nn()}.svg`;
12511
- let k = an(f.outerHTML);
12508
+ const f = h.current.querySelector("svg"), { width: g, height: x } = f.getBoundingClientRect(), b = `mermaid-${Cn()}.svg`;
12509
+ let k = nn(f.outerHTML);
12512
12510
  if (t) {
12513
- const L = fi(k, b);
12511
+ const L = ui(k, b);
12514
12512
  k = await t(L);
12515
12513
  }
12516
12514
  e == null || e.chain().focus().setMermaid(
@@ -12559,7 +12557,7 @@ function Yd({ editor: e, node: t, updateAttributes: i, getPos: n, selected: a })
12559
12557
  h: 0,
12560
12558
  dir: ""
12561
12559
  }), { align: x } = t == null ? void 0 : t.attrs, b = O(() => {
12562
- const { src: A, alt: N, width: B, height: S } = t == null ? void 0 : t.attrs, E = Ci(B) ? `${B}px` : B, H = Ci(S) ? `${S}px` : S;
12560
+ const { src: A, alt: N, width: B, height: S } = t == null ? void 0 : t.attrs, E = yi(B) ? `${B}px` : B, H = yi(S) ? `${S}px` : S;
12563
12561
  return {
12564
12562
  src: A || void 0,
12565
12563
  alt: N || void 0,
@@ -12584,7 +12582,7 @@ function Yd({ editor: e, node: t, updateAttributes: i, getPos: n, selected: a })
12584
12582
  e.commands.setNodeSelection(n());
12585
12583
  }
12586
12584
  const v = M(
12587
- Ne(() => {
12585
+ Le(() => {
12588
12586
  const { width: A } = getComputedStyle(e.view.dom);
12589
12587
  c((N) => ({
12590
12588
  ...N,
@@ -12609,10 +12607,10 @@ function Yd({ editor: e, node: t, updateAttributes: i, getPos: n, selected: a })
12609
12607
  });
12610
12608
  }
12611
12609
  const T = M(
12612
- Ne((A) => {
12610
+ Le((A) => {
12613
12611
  if (A.preventDefault(), A.stopPropagation(), !d)
12614
12612
  return;
12615
- const { x: N, w: B, dir: S } = f, E = (A.clientX - N) * (/l/.test(S) ? -1 : 1), H = vn(B + E, ni, o.width);
12613
+ const { x: N, w: B, dir: S } = f, E = (A.clientX - N) * (/l/.test(S) ? -1 : 1), H = _n(B + E, ni, o.width);
12616
12614
  i({
12617
12615
  width: H,
12618
12616
  height: null
@@ -12649,7 +12647,7 @@ function Yd({ editor: e, node: t, updateAttributes: i, getPos: n, selected: a })
12649
12647
  draggable: "true",
12650
12648
  "data-drag-handle": !0,
12651
12649
  className: `image-view__body ${a ? "image-view__body--focused" : ""} ${d ? "image-view__body--resizing" : ""}`,
12652
- style: k,
12650
+ style: { ...k, background: "#fff" },
12653
12651
  children: [
12654
12652
  /* @__PURE__ */ r(
12655
12653
  "img",
@@ -12675,7 +12673,7 @@ function Yd({ editor: e, node: t, updateAttributes: i, getPos: n, selected: a })
12675
12673
  }
12676
12674
  ) });
12677
12675
  }
12678
- const Ki = Qt.extend({
12676
+ const Wi = Qt.extend({
12679
12677
  name: "mermaid",
12680
12678
  addOptions() {
12681
12679
  var e;
@@ -12743,7 +12741,7 @@ const Ki = Qt.extend({
12743
12741
  };
12744
12742
  },
12745
12743
  addNodeView() {
12746
- return ue(Yd);
12744
+ return me(Yd);
12747
12745
  },
12748
12746
  // @ts-ignore
12749
12747
  addCommands() {
@@ -12819,8 +12817,8 @@ export {
12819
12817
  Th as U,
12820
12818
  Yh as V,
12821
12819
  su as W,
12822
- Bn as X,
12823
- Ki as Y,
12820
+ $n as X,
12821
+ Wi as Y,
12824
12822
  Us as a,
12825
12823
  zh as b,
12826
12824
  Hh as c,
@@ -12842,7 +12840,7 @@ export {
12842
12840
  Qh as s,
12843
12841
  eu as t,
12844
12842
  tu as u,
12845
- bi as v,
12843
+ xi as v,
12846
12844
  it as w,
12847
12845
  Uh as x,
12848
12846
  Re as y,